From 4d8a8393789aac322be5155ec9f4e8409e21c43d Mon Sep 17 00:00:00 2001 From: Rodrigo Pombo Date: Thu, 28 Mar 2024 11:45:35 +0100 Subject: [PATCH 1/3] Refactor annotation extraction --- lib/dist/browser.esm.mjs | 2 +- lib/dist/index.cjs.js | 2 +- lib/dist/index.d.ts | 32 ++++++++++++++++++-------------- lib/dist/index.esm.mjs | 2 +- lib/dist/worker.esm.mjs | 2 +- lib/src/comments.ts | 27 +++++++++++++++++++++------ 6 files changed, 43 insertions(+), 24 deletions(-) diff --git a/lib/dist/browser.esm.mjs b/lib/dist/browser.esm.mjs index 5b72707..80067b3 100644 --- a/lib/dist/browser.esm.mjs +++ b/lib/dist/browser.esm.mjs @@ -1 +1 @@ -async function A(A,B){throw new Error("no fs")}async function B(A){const B=await fetch(`https://lighter.codehike.org/${A}.json`);return await B.json()}const Q=A=>/^#([A-Fa-f0-9]{3,4}){1,2}$/.test(A),g=(A,B)=>A.match(new RegExp(`.{${B}}`,"g")),E=A=>parseInt(A.repeat(2/A.length),16);function C(A,B){return void 0!==A?A/255:"number"!=typeof B||B<0||B>1?1:B}function I(A,B){if(!A)return A;const{r:I,g:D,b:w,a:o}=function(A){if(!A)return;if(!Q(A))throw new Error("Invalid color string, must be a valid hex color");const B=Math.floor((A.length-1)/3),I=g(A.slice(1),B),[D,w,o,s]=I.map(E);return{r:D,g:w,b:o,a:C(s,1)}}(A);return function(A){if(!A)return;const{r:B,g:Q,b:g,a:E}=A,C=Math.round(255*E);return`#${B.toString(16).padStart(2,"0")}${Q.toString(16).padStart(2,"0")}${g.toString(16).padStart(2,"0")}${C.toString(16).padStart(2,"0")}`}({r:I,g:D,b:w,a:o*B})}function D(A,B){const Q=A.colors||{};if(Q[B])return Q[B];const g=o[B];if(!g)throw new Error(`Unknown theme color key: ${B}`);return"string"==typeof g?D(A,g):function(A,B){const Q=B[A.type];if(Array.isArray(Q)){const[B,g,...E]=Q;return B(D(A,g),...E)}return Q}(A,g)}const w="#6FC3DF",o={"editor.foreground":{dark:"#bbbbbb",light:"#333333",hc:"#ffffff"},"editorLineNumber.foreground":{dark:"#858585",light:"#237893",hc:"#fffffe"},"editor.selectionBackground":{light:"#ADD6FF",dark:"#264F78",hc:"#f3f518"},"editor.background":{light:"#fffffe",dark:"#1E1E1E",hc:"#000000"},"editorGroupHeader.tabsBackground":{dark:"#252526",light:"#F3F3F3"},"tab.activeBackground":"editor.background","tab.activeForeground":{dark:"#ffffff",light:"#333333",hc:"#ffffff"},"tab.border":{dark:"#252526",light:"#F3F3F3",hc:w},"tab.activeBorder":"tab.activeBackground","tab.inactiveBackground":{dark:"#2D2D2D",light:"#ECECEC"},"tab.inactiveForeground":{dark:[I,"tab.activeForeground",.5],light:[I,"tab.activeForeground",.5],hc:"#ffffff"},"diffEditor.insertedTextBackground":{dark:"#9ccc2c33",light:"#9ccc2c40"},"diffEditor.removedTextBackground":{dark:"#ff000033",light:"#ff000033"},"diffEditor.insertedLineBackground":{dark:"#9bb95533",light:"#9bb95533"},"diffEditor.removedLineBackground":{dark:"#ff000033",light:"#ff000033"},"icon.foreground":{dark:"#C5C5C5",light:"#424242",hc:"#FFFFFF"},"sideBar.background":{dark:"#252526",light:"#F3F3F3",hc:"#000000"},"sideBar.foreground":"editor.foreground","sideBar.border":"sideBar.background","list.inactiveSelectionBackground":{dark:"#37373D",light:"#E4E6F1"},"list.inactiveSelectionForeground":{},"list.hoverBackground":{dark:"#2A2D2E",light:"#F0F0F0"},"list.hoverForeground":{},"editorGroupHeader.tabsBorder":{hc:w},"tab.activeBorderTop":{hc:w},"tab.hoverBackground":"tab.inactiveBackground","tab.hoverForeground":"tab.inactiveForeground","editor.rangeHighlightBackground":{dark:"#ffffff0b",light:"#fdff0033"},"editor.infoForeground":{dark:"#3794FF",light:"#1a85ff",hc:"#3794FF"},"input.border":{hc:w},"input.background":{dark:"#3C3C3C",light:"#fffffe",hc:"#000000"},"input.foreground":"editor.foreground","editor.lineHighlightBackground":{},focusBorder:{light:"#0090F1",dark:"#007FD4",hc:w},"editorGroup.border":{dark:"#444444",light:"#E7E7E7",hc:w},"list.activeSelectionBackground":{dark:"#094771",light:"#0060C0",hc:"#000000"},"list.activeSelectionForeground":{dark:"#fffffe",light:"#fffffe",hc:"#fffffe"},"lighter.inlineBackground":{dark:[I,"editor.background",.9],light:[I,"editor.background",.9]},"terminal.background":"editor.background","terminal.foreground":"editor.foreground","terminal.ansiBlack":{dark:"#000000",light:"#000000",hc:"#000000"},"terminal.ansiRed":{dark:"#cd3131",light:"#cd3131",hc:"#cd0000"},"terminal.ansiGreen":{dark:"#0DBC79",light:"#00BC00",hc:"#00cd00"},"terminal.ansiYellow":{dark:"#e5e510",light:"#949800",hc:"#cdcd00"},"terminal.ansiBlue":{dark:"#2472c8",light:"#0451a5",hc:"#0000ee"},"terminal.ansiMagenta":{dark:"#bc3fbc",light:"#bc05bc",hc:"#cd00cd"},"terminal.ansiCyan":{dark:"#11a8cd",light:"#0598bc",hc:"#00cdcd"},"terminal.ansiWhite":{dark:"#e5e5e5",light:"#555555",hc:"#e5e5e5"},"terminal.ansiBrightBlack":{dark:"#666666",light:"#666666",hc:"#7f7f7f"},"terminal.ansiBrightRed":{dark:"#f14c4c",light:"#cd3131",hc:"#ff0000"},"terminal.ansiBrightGreen":{dark:"#23d18b",light:"#14CE14",hc:"#00ff00"},"terminal.ansiBrightYellow":{dark:"#f5f543",light:"#b5ba00",hc:"#ffff00"},"terminal.ansiBrightBlue":{dark:"#3b8eea",light:"#0451a5",hc:"#5c5cff"},"terminal.ansiBrightMagenta":{dark:"#d670d6",light:"#bc05bc",hc:"#ff00ff"},"terminal.ansiBrightCyan":{dark:"#29b8db",light:"#0598bc",hc:"#00ffff"},"terminal.ansiBrightWhite":{dark:"#e5e5e5",light:"#a5a5a5",hc:"#ffffff"}},s=new Map,e=new Map;async function c(Q){if("string"==typeof Q){const g=Q;if(!M.includes(g))throw new h(g);if(!s.has(g)){const Q=async function(Q){try{return await A()}catch(A){return await B(`themes/${Q}`)}}(g).then((A=>(e.set(g,A),A)));s.set(g,Q)}return s.get(g)}return Q}function i(A){let B=null;if("string"==typeof A){if(B=e.get(A),!B)throw new Error("Syntax highlighting error: theme not loaded")}else B=A;return function(A){if(!A)return;const B=A.settings||A.tokenColors||[],Q={name:A.name||"unknown-theme",type:t(A),foreground:"",background:"",settings:B,colors:A.colors||{},colorNames:A.colorNames},g=B.find((A=>!A.scope));if(g){const{foreground:A,background:B}=(null==g?void 0:g.settings)||{},E={};A&&!Q.colors["editor.foreground"]&&(E["editor.foreground"]=A),B&&!Q.colors["editor.background"]&&(E["editor.background"]=B),Object.keys(E).length>0&&(Q.colors=Object.assign(Object.assign({},Q.colors),E)),Q.foreground=A,Q.background=B}g||(Q.settings=[{settings:{foreground:D(Q,"editor.foreground"),background:D(Q,"editor.background")}},...Q.settings]);if(Q.background=Q.background||D(Q,"editor.background"),Q.foreground=Q.foreground||D(Q,"editor.foreground"),"from-css"===A.type&&!Q.colorNames){const A={};let B=0;Q.settings=Q.settings.map((Q=>{const g=Object.assign(Object.assign({},Q),{settings:Object.assign({},Q.settings)}),{foreground:E,background:C}=g.settings||{};return E&&!A[E]&&(A[E]=`#${B.toString(16).padStart(6,"0")}`,B++),C&&!A[C]&&(A[C]=`#${B.toString(16).padStart(6,"0")}`,B++),E&&(g.settings.foreground=A[E]),C&&(g.settings.background=A[C]),g})),Q.colorNames=A}return Q}(B)}function t(A){var B;if("from-css"===A.type)return"from-css";return"light"===(A.type?A.type:(null===(B=A.name)||void 0===B?void 0:B.toLowerCase().includes("light"))?"light":"dark")?"light":"dark"}const M=["dark-plus","dracula-soft","dracula","github-dark","github-dark-dimmed","github-from-css","github-light","light-plus","material-darker","material-default","material-from-css","material-lighter","material-ocean","material-palenight","min-dark","min-light","monokai","nord","one-dark-pro","poimandres","slack-dark","slack-ochin","solarized-dark","solarized-light"];class h extends Error{constructor(A){super(`Unknown theme: ${A}`),this.theme=A}}function a(A){const B=B=>"colorScheme"===B?function(A){return"from-css"===A.type?"var(--ch-0)":A.type}(A):"foreground"===B?A.foreground:"background"===B?A.background:D(A,B);return{colorScheme:B("colorScheme"),foreground:B("foreground"),background:B("background"),lighter:{inlineBackground:B("lighter.inlineBackground")},editor:{background:B("editor.background"),foreground:B("editor.foreground"),lineHighlightBackground:B("editor.lineHighlightBackground"),rangeHighlightBackground:B("editor.rangeHighlightBackground"),infoForeground:B("editor.infoForeground"),selectionBackground:B("editor.selectionBackground")},focusBorder:B("focusBorder"),tab:{activeBackground:B("tab.activeBackground"),activeForeground:B("tab.activeForeground"),inactiveBackground:B("tab.inactiveBackground"),inactiveForeground:B("tab.inactiveForeground"),border:B("tab.border"),activeBorder:B("tab.activeBorder"),activeBorderTop:B("tab.activeBorderTop")},editorGroup:{border:B("editorGroup.border")},editorGroupHeader:{tabsBackground:B("editorGroupHeader.tabsBackground")},editorLineNumber:{foreground:B("editorLineNumber.foreground")},input:{background:B("input.background"),foreground:B("input.foreground"),border:B("input.border")},icon:{foreground:B("icon.foreground")},sideBar:{background:B("sideBar.background"),foreground:B("sideBar.foreground"),border:B("sideBar.border")},list:{activeSelectionBackground:B("list.activeSelectionBackground"),activeSelectionForeground:B("list.activeSelectionForeground"),hoverBackground:B("list.hoverBackground"),hoverForeground:B("list.hoverForeground")}}}const F=["abap","actionscript-3","ada","apache","apex","apl","applescript","ara","asm","astro","awk","ballerina","bash","bat","batch","be","beancount","berry","bibtex","bicep","blade","c","c#","cadence","cdc","clarity","clj","clojure","cmake","cmd","cobol","codeql","coffee","console","cpp","crystal","cs","csharp","css","cue","cypher","d","dart","dax","diff","docker","dockerfile","dream-maker","elixir","elm","erb","erl","erlang","f#","fish","fs","fsharp","fsl","gdresource","gdscript","gdshader","gherkin","git-commit","git-rebase","glimmer-js","glimmer-ts","glsl","gnuplot","go","graphql","groovy","hack","haml","handlebars","haskell","hbs","hcl","hjson","hlsl","hs","html","http","imba","ini","jade","java","javascript","jinja-html","jison","js","json","json5","jsonc","jsonl","jsonnet","jssm","jsx","julia","kotlin","kql","kusto","latex","less","liquid","lisp","logo","lua","make","makefile","markdown","marko","matlab","md","mdx","mermaid","narrat","nextflow","nginx","nim","nix","objc","objective-c","objective-cpp","ocaml","pascal","perl","perl6","php","plsql","postcss","powerquery","powershell","prisma","prolog","properties","proto","ps","ps1","pug","puppet","purescript","py","python","ql","r","raku","razor","rb","reg","rel","riscv","rs","rst","ruby","rust","sas","sass","scala","scheme","scss","sh","shader","shaderlab","shell","shellscript","shellsession","smalltalk","solidity","sparql","sql","ssh-config","stata","styl","stylus","svelte","swift","system-verilog","tasl","tcl","terminal","tex","text","toml","ts","tsx","turtle","twig","txt","typescript","v","vb","verilog","vhdl","vim","viml","vimscript","vue","vue-html","vyper","wasm","wenyan","wgsl","wolfram","xml","xsl","yaml","yml","zenscript","zsh","文言"],G={abap:"source.abap","actionscript-3":"source.actionscript.3",ada:"source.ada",apache:"source.apacheconf",apex:"source.apex",apl:"source.apl",applescript:"source.applescript",ara:"source.ara",asm:"source.asm.x86_64",astro:"source.astro",awk:"source.awk",ballerina:"source.ballerina",bat:"source.batchfile",batch:"source.batchfile",beancount:"text.beancount",berry:"source.berry",be:"source.berry",bibtex:"text.bibtex",bicep:"source.bicep",blade:"text.html.php.blade",c:"source.c",cadence:"source.cadence",cdc:"source.cadence",clarity:"source.clar",clojure:"source.clojure",clj:"source.clojure",cmake:"source.cmake",cobol:"source.cobol",codeql:"source.ql",ql:"source.ql",coffee:"source.coffee",cpp:"source.cpp",crystal:"source.crystal",csharp:"source.cs","c#":"source.cs",cs:"source.cs",css:"source.css",cue:"source.cue",cypher:"source.cypher",d:"source.d",dart:"source.dart",dax:"source.dax",diff:"source.diff",docker:"source.dockerfile",dockerfile:"source.dockerfile","dream-maker":"source.dm",elixir:"source.elixir",elm:"source.elm",erb:"text.html.erb",erlang:"source.erlang",erl:"source.erlang",fish:"source.fish",fsharp:"source.fsharp","f#":"source.fsharp",fs:"source.fsharp",gdresource:"source.gdresource",gdscript:"source.gdscript",gdshader:"source.gdshader",gherkin:"text.gherkin.feature","git-commit":"text.git-commit","git-rebase":"text.git-rebase","glimmer-js":"source.gjs","glimmer-ts":"source.gts",glsl:"source.glsl",gnuplot:"source.gnuplot",go:"source.go",graphql:"source.graphql",groovy:"source.groovy",hack:"source.hack",haml:"text.haml",handlebars:"text.html.handlebars",hbs:"text.html.handlebars",haskell:"source.haskell",hs:"source.haskell",hcl:"source.hcl",hjson:"source.hjson",hlsl:"source.hlsl",html:"text.html.basic",http:"source.http",imba:"source.imba",ini:"source.ini",properties:"source.ini",java:"source.java",javascript:"source.js",js:"source.js","jinja-html":"text.html.jinja",jison:"source.jison",json:"source.json",json5:"source.json5",jsonc:"source.json.comments",jsonl:"source.json.lines",jsonnet:"source.jsonnet",jssm:"source.jssm",fsl:"source.jssm",jsx:"source.js.jsx",julia:"source.julia",kotlin:"source.kotlin",kusto:"source.kusto",kql:"source.kusto",latex:"text.tex.latex",less:"source.css.less",liquid:"text.html.liquid",lisp:"source.lisp",logo:"source.logo",lua:"source.lua",make:"source.makefile",makefile:"source.makefile",markdown:"text.html.markdown",md:"text.html.markdown",marko:"text.marko",matlab:"source.matlab",mdx:"source.mdx",mermaid:"source.mermaid",narrat:"source.narrat",nextflow:"source.nextflow",nginx:"source.nginx",nim:"source.nim",nix:"source.nix","objective-c":"source.objc",objc:"source.objc","objective-cpp":"source.objcpp",ocaml:"source.ocaml",pascal:"source.pascal",perl:"source.perl",php:"source.php",plsql:"source.plsql.oracle",postcss:"source.css.postcss",powerquery:"source.powerquery",powershell:"source.powershell",ps:"source.powershell",ps1:"source.powershell",prisma:"source.prisma",prolog:"source.prolog",proto:"source.proto",pug:"text.pug",jade:"text.pug",puppet:"source.puppet",purescript:"source.purescript",python:"source.python",py:"source.python",r:"source.r",raku:"source.perl.6",perl6:"source.perl.6",razor:"text.aspnetcorerazor",reg:"source.reg",rel:"source.rel",riscv:"source.riscv",rst:"source.rst",ruby:"source.ruby",rb:"source.ruby",rust:"source.rust",rs:"source.rust",sas:"source.sas",sass:"source.sass",scala:"source.scala",scheme:"source.scheme",scss:"source.css.scss",shaderlab:"source.shaderlab",shader:"source.shaderlab",shellscript:"source.shell",bash:"source.shell",console:"source.shell",sh:"source.shell",shell:"source.shell",zsh:"source.shell",shellsession:"text.shell-session",smalltalk:"source.smalltalk",solidity:"source.solidity",sparql:"source.sparql",sql:"source.sql","ssh-config":"source.ssh-config",stata:"source.stata",stylus:"source.stylus",styl:"source.stylus",svelte:"source.svelte",swift:"source.swift","system-verilog":"source.systemverilog",tasl:"source.tasl",tcl:"source.tcl",tex:"text.tex",toml:"source.toml",tsx:"source.tsx",turtle:"source.turtle",twig:"text.html.twig",txt:"source.txt",typescript:"source.ts",ts:"source.ts",v:"source.v",vb:"source.asp.vb.net",cmd:"source.asp.vb.net",verilog:"source.verilog",vhdl:"source.vhdl",viml:"source.viml",vim:"source.viml",vimscript:"source.viml","vue-html":"text.html.vue-html",vue:"source.vue",vyper:"source.vyper",wasm:"source.wat",wenyan:"source.wenyan","文言":"source.wenyan",wgsl:"source.wgsl",wolfram:"source.wolfram",xml:"text.xml",xsl:"text.xml.xsl",yaml:"source.yaml",yml:"source.yaml",zenscript:"source.zenscript"},n={"source.abap":{id:"abap",path:"abap.tmLanguage.json",embeddedScopes:[]},"source.actionscript.3":{id:"actionscript-3",path:"actionscript-3.tmLanguage.json",embeddedScopes:[]},"source.ada":{id:"ada",path:"ada.tmLanguage.json",embeddedScopes:[]},"source.apacheconf":{id:"apache",path:"apache.tmLanguage.json",embeddedScopes:[]},"source.apex":{id:"apex",path:"apex.tmLanguage.json",embeddedScopes:[]},"source.apl":{id:"apl",path:"apl.tmLanguage.json",embeddedScopes:["source.java","source.json","source.js","source.css","text.xml","text.html.basic"]},"source.applescript":{id:"applescript",path:"applescript.tmLanguage.json",embeddedScopes:[]},"source.ara":{id:"ara",path:"ara.tmLanguage.json",embeddedScopes:[]},"source.asm.x86_64":{id:"asm",path:"asm.tmLanguage.json",embeddedScopes:[]},"source.astro":{id:"astro",path:"astro.tmLanguage.json",embeddedScopes:["source.tsx","source.css.postcss","source.css.less","source.css.scss","source.css","source.sass","source.stylus","source.ts","source.js","source.json"]},"source.awk":{id:"awk",path:"awk.tmLanguage.json",embeddedScopes:[]},"source.ballerina":{id:"ballerina",path:"ballerina.tmLanguage.json",embeddedScopes:[]},"source.batchfile":{id:"bat",path:"bat.tmLanguage.json",embeddedScopes:[]},"text.beancount":{id:"beancount",path:"beancount.tmLanguage.json",embeddedScopes:[]},"source.berry":{id:"berry",path:"berry.tmLanguage.json",embeddedScopes:[]},"text.bibtex":{id:"bibtex",path:"bibtex.tmLanguage.json",embeddedScopes:[]},"source.bicep":{id:"bicep",path:"bicep.tmLanguage.json",embeddedScopes:[]},"text.html.php.blade":{id:"blade",path:"blade.tmLanguage.json",embeddedScopes:["source.java","source.css","source.json","source.js","source.sql","text.xml","text.html.basic"]},"source.c":{id:"c",path:"c.tmLanguage.json",embeddedScopes:[]},"source.cadence":{id:"cadence",path:"cadence.tmLanguage.json",embeddedScopes:[]},"source.clar":{id:"clarity",path:"clarity.tmLanguage.json",embeddedScopes:[]},"source.clojure":{id:"clojure",path:"clojure.tmLanguage.json",embeddedScopes:[]},"source.cmake":{id:"cmake",path:"cmake.tmLanguage.json",embeddedScopes:[]},"source.cobol":{id:"cobol",path:"cobol.tmLanguage.json",embeddedScopes:["source.css","source.js","source.java","text.html.basic","source.sql"]},"source.ql":{id:"codeql",path:"codeql.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.stylus","source.sass","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.tsx","source.ts","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.css.scss","source.swift","source.objc","source.css.less","source.json.comments","source.json","source.js","text.pug","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.coffee","source.clojure","source.batchfile","source.yaml","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","text.html.basic","source.css","text.html.markdown"]},"source.coffee":{id:"coffee",path:"coffee.tmLanguage.json",embeddedScopes:["source.js"]},"source.cpp":{id:"cpp",path:"cpp.tmLanguage.json",embeddedScopes:["source.c","source.sql","source.glsl"]},"source.crystal":{id:"crystal",path:"crystal.tmLanguage.json",embeddedScopes:["source.shell","source.js","source.c","source.css","source.sql","text.html.basic"]},"source.cs":{id:"csharp",path:"csharp.tmLanguage.json",embeddedScopes:[]},"source.css":{id:"css",path:"css.tmLanguage.json",embeddedScopes:[]},"source.cue":{id:"cue",path:"cue.tmLanguage.json",embeddedScopes:[]},"source.cypher":{id:"cypher",path:"cypher.tmLanguage.json",embeddedScopes:[]},"source.d":{id:"d",path:"d.tmLanguage.json",embeddedScopes:[]},"source.dart":{id:"dart",path:"dart.tmLanguage.json",embeddedScopes:[]},"source.dax":{id:"dax",path:"dax.tmLanguage.json",embeddedScopes:[]},"source.diff":{id:"diff",path:"diff.tmLanguage.json",embeddedScopes:[]},"source.dockerfile":{id:"docker",path:"docker.tmLanguage.json",embeddedScopes:[]},"source.dm":{id:"dream-maker",path:"dream-maker.tmLanguage.json",embeddedScopes:[]},"source.elixir":{id:"elixir",path:"elixir.tmLanguage.json",embeddedScopes:["source.css","source.js","text.html.basic"]},"source.elm":{id:"elm",path:"elm.tmLanguage.json",embeddedScopes:["source.c","source.glsl"]},"text.html.erb":{id:"erb",path:"erb.tmLanguage.json",embeddedScopes:["source.java","source.lua","source.shell","source.c","source.sql","text.xml","source.css","source.js","source.ruby","text.html.basic"]},"source.erlang":{id:"erlang",path:"erlang.tmLanguage.json",embeddedScopes:[]},"source.fish":{id:"fish",path:"fish.tmLanguage.json",embeddedScopes:[]},"source.fsharp":{id:"fsharp",path:"fsharp.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.stylus","source.sass","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.cs","source.tsx","source.ts","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.css.scss","source.swift","source.objc","source.css.less","source.json.comments","source.json","source.js","text.pug","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.coffee","source.clojure","source.batchfile","source.yaml","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","text.html.basic","source.css","text.html.markdown"]},"source.gdresource":{id:"gdresource",path:"gdresource.tmLanguage.json",embeddedScopes:["source.gdscript","source.gdshader"]},"source.gdscript":{id:"gdscript",path:"gdscript.tmLanguage.json",embeddedScopes:[]},"source.gdshader":{id:"gdshader",path:"gdshader.tmLanguage.json",embeddedScopes:[]},"text.gherkin.feature":{id:"gherkin",path:"gherkin.tmLanguage.json",embeddedScopes:[]},"text.git-commit":{id:"git-commit",path:"git-commit.tmLanguage.json",embeddedScopes:["source.diff"]},"text.git-rebase":{id:"git-rebase",path:"git-rebase.tmLanguage.json",embeddedScopes:["source.shell"]},"source.gjs":{id:"glimmer-js",path:"glimmer-js.tmLanguage.json",embeddedScopes:["source.yaml","source.css","text.html.basic","text.html.handlebars","source.js"]},"source.gts":{id:"glimmer-ts",path:"glimmer-ts.tmLanguage.json",embeddedScopes:["source.yaml","source.js","source.css","text.html.basic","text.html.handlebars","source.ts"]},"source.glsl":{id:"glsl",path:"glsl.tmLanguage.json",embeddedScopes:["source.c"]},"source.gnuplot":{id:"gnuplot",path:"gnuplot.tmLanguage.json",embeddedScopes:[]},"source.go":{id:"go",path:"go.tmLanguage.json",embeddedScopes:[]},"source.graphql":{id:"graphql",path:"graphql.tmLanguage.json",embeddedScopes:["source.tsx","source.js.jsx","source.ts","source.js"]},"source.groovy":{id:"groovy",path:"groovy.tmLanguage.json",embeddedScopes:[]},"source.hack":{id:"hack",path:"hack.tmLanguage.json",embeddedScopes:["source.css","source.js","source.sql","text.html.basic"]},"text.haml":{id:"haml",path:"haml.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.stylus","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.tsx","source.ts","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.css.scss","source.swift","source.objc","source.css.less","source.json.comments","source.json","text.pug","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.clojure","source.batchfile","source.yaml","text.xml.xsl","source.asp.vb.net","source.php","source.r","source.perl","source.makefile","source.java","source.ini","source.lua","source.shell","source.c","source.sql","text.xml","text.html.basic","source.css","text.html.markdown","source.coffee","source.sass","source.js","source.ruby"]},"text.html.handlebars":{id:"handlebars",path:"handlebars.tmLanguage.json",embeddedScopes:["source.yaml","source.js","source.css","text.html.basic"]},"source.haskell":{id:"haskell",path:"haskell.tmLanguage.json",embeddedScopes:[]},"source.hcl":{id:"hcl",path:"hcl.tmLanguage.json",embeddedScopes:[]},"source.hjson":{id:"hjson",path:"hjson.tmLanguage.json",embeddedScopes:[]},"source.hlsl":{id:"hlsl",path:"hlsl.tmLanguage.json",embeddedScopes:[]},"text.html.basic":{id:"html",path:"html.tmLanguage.json",embeddedScopes:["source.css","source.js"]},"source.http":{id:"http",path:"http.tmLanguage.json",embeddedScopes:["source.tsx","source.js.jsx","source.ts","source.js","source.java","source.graphql","text.xml","source.json","source.shell"]},"source.imba":{id:"imba",path:"imba.tmLanguage.json",embeddedScopes:[]},"source.ini":{id:"ini",path:"ini.tmLanguage.json",embeddedScopes:[]},"source.java":{id:"java",path:"java.tmLanguage.json",embeddedScopes:[]},"source.js":{id:"javascript",path:"javascript.tmLanguage.json",embeddedScopes:[]},"text.html.jinja":{id:"jinja-html",path:"jinja-html.tmLanguage.json",embeddedScopes:["source.css","source.js","text.html.basic"]},"source.jison":{id:"jison",path:"jison.tmLanguage.json",embeddedScopes:["source.js"]},"source.json":{id:"json",path:"json.tmLanguage.json",embeddedScopes:[]},"source.json5":{id:"json5",path:"json5.tmLanguage.json",embeddedScopes:[]},"source.json.comments":{id:"jsonc",path:"jsonc.tmLanguage.json",embeddedScopes:[]},"source.json.lines":{id:"jsonl",path:"jsonl.tmLanguage.json",embeddedScopes:[]},"source.jsonnet":{id:"jsonnet",path:"jsonnet.tmLanguage.json",embeddedScopes:[]},"source.jssm":{id:"jssm",path:"jssm.tmLanguage.json",embeddedScopes:[]},"source.js.jsx":{id:"jsx",path:"jsx.tmLanguage.json",embeddedScopes:[]},"source.julia":{id:"julia",path:"julia.tmLanguage.json",embeddedScopes:["source.c","source.glsl","source.sql","source.r","source.js","source.python","source.cpp"]},"source.kotlin":{id:"kotlin",path:"kotlin.tmLanguage.json",embeddedScopes:[]},"source.kusto":{id:"kusto",path:"kusto.tmLanguage.json",embeddedScopes:[]},"text.tex.latex":{id:"latex",path:"latex.tmLanguage.json",embeddedScopes:["source.glsl","source.shell","source.sql","source.cpp","source.c","source.r","source.gnuplot","source.scala","source.rust","source.yaml","source.python","source.ts","source.js","source.ruby","source.julia","source.lua","source.java","text.xml","text.html.basic","source.haskell","source.css","text.tex"]},"source.css.less":{id:"less",path:"less.tmLanguage.json",embeddedScopes:["source.css"]},"text.html.liquid":{id:"liquid",path:"liquid.tmLanguage.json",embeddedScopes:["source.js","source.json","source.css","text.html.basic"]},"source.lisp":{id:"lisp",path:"lisp.tmLanguage.json",embeddedScopes:[]},"source.logo":{id:"logo",path:"logo.tmLanguage.json",embeddedScopes:[]},"source.lua":{id:"lua",path:"lua.tmLanguage.json",embeddedScopes:["source.c"]},"source.makefile":{id:"make",path:"make.tmLanguage.json",embeddedScopes:[]},"text.html.markdown":{id:"markdown",path:"markdown.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.stylus","source.sass","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.tsx","source.ts","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.css.scss","source.swift","source.objc","source.css.less","source.json.comments","source.json","source.js","text.pug","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.coffee","source.clojure","source.batchfile","source.yaml","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","text.html.basic","source.css"]},"text.marko":{id:"marko",path:"marko.tmLanguage.json",embeddedScopes:["source.js","source.css.scss","source.css.less","source.css"]},"source.matlab":{id:"matlab",path:"matlab.tmLanguage.json",embeddedScopes:[]},"source.mdx":{id:"mdx",path:"mdx.tmLanguage.json",embeddedScopes:["source.gnuplot","text.tex","source.stylus","source.sass","text.bibtex","text.tex.latex","text.html.handlebars","source.dart","source.fsharp","source.powershell","source.perl.6","source.json.comments","text.pug","source.groovy","text.git-rebase","text.git-commit","source.batchfile","text.xml.xsl","source.asp.vb.net","source.php","source.js.jsx","source.glsl","source.ts","source.swift","text.xml","source.sql","text.shell-session","source.shell","source.css.scss","source.scala","source.rust","source.ruby","source.r","source.python","source.perl","source.objc","text.html.markdown","source.makefile","source.lua","source.css.less","source.kotlin","source.julia","source.json","source.js","source.java","source.ini","text.html.basic","source.haskell","source.graphql","source.go","source.erlang","source.elm","source.elixir","source.dockerfile","source.diff","source.css","source.cs","source.cpp","source.coffee","source.clojure","source.c","source.yaml","source.toml","source.tsx"]},"source.mermaid":{id:"mermaid",path:"mermaid.tmLanguage.json",embeddedScopes:[]},"source.narrat":{id:"narrat",path:"narrat.tmLanguage.json",embeddedScopes:[]},"source.nextflow":{id:"nextflow",path:"nextflow.tmLanguage.json",embeddedScopes:[]},"source.nginx":{id:"nginx",path:"nginx.tmLanguage.json",embeddedScopes:["source.c","source.lua"]},"source.nim":{id:"nim",path:"nim.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.stylus","source.sass","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.tsx","source.ts","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.css.scss","source.swift","source.objc","source.css.less","source.json.comments","source.json","text.pug","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.coffee","source.clojure","source.batchfile","source.yaml","text.xml.xsl","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.ini","source.java","text.html.markdown","source.glsl","source.css","source.js","text.xml","text.html.basic","source.c"]},"source.nix":{id:"nix",path:"nix.tmLanguage.json",embeddedScopes:[]},"source.objc":{id:"objective-c",path:"objective-c.tmLanguage.json",embeddedScopes:[]},"source.objcpp":{id:"objective-cpp",path:"objective-cpp.tmLanguage.json",embeddedScopes:[]},"source.ocaml":{id:"ocaml",path:"ocaml.tmLanguage.json",embeddedScopes:[]},"source.pascal":{id:"pascal",path:"pascal.tmLanguage.json",embeddedScopes:[]},"source.perl":{id:"perl",path:"perl.tmLanguage.json",embeddedScopes:["source.java","source.sql","source.js","source.css","text.xml","text.html.basic"]},"source.php":{id:"php",path:"php.tmLanguage.json",embeddedScopes:["source.java","source.css","source.json","source.js","source.sql","text.xml","text.html.basic"]},"source.plsql.oracle":{id:"plsql",path:"plsql.tmLanguage.json",embeddedScopes:[]},"source.css.postcss":{id:"postcss",path:"postcss.tmLanguage.json",embeddedScopes:[]},"source.powerquery":{id:"powerquery",path:"powerquery.tmLanguage.json",embeddedScopes:[]},"source.powershell":{id:"powershell",path:"powershell.tmLanguage.json",embeddedScopes:[]},"source.prisma":{id:"prisma",path:"prisma.tmLanguage.json",embeddedScopes:[]},"source.prolog":{id:"prolog",path:"prolog.tmLanguage.json",embeddedScopes:[]},"source.proto":{id:"proto",path:"proto.tmLanguage.json",embeddedScopes:[]},"text.pug":{id:"pug",path:"pug.tmLanguage.json",embeddedScopes:["text.html.basic","source.coffee","source.stylus","source.css.scss","source.sass","source.css","source.js"]},"source.puppet":{id:"puppet",path:"puppet.tmLanguage.json",embeddedScopes:[]},"source.purescript":{id:"purescript",path:"purescript.tmLanguage.json",embeddedScopes:[]},"source.python":{id:"python",path:"python.tmLanguage.json",embeddedScopes:[]},"source.r":{id:"r",path:"r.tmLanguage.json",embeddedScopes:[]},"source.perl.6":{id:"raku",path:"raku.tmLanguage.json",embeddedScopes:[]},"text.aspnetcorerazor":{id:"razor",path:"razor.tmLanguage.json",embeddedScopes:["source.css","source.js","source.cs","text.html.basic"]},"source.reg":{id:"reg",path:"reg.tmLanguage.json",embeddedScopes:[]},"source.rel":{id:"rel",path:"rel.tmLanguage.json",embeddedScopes:[]},"source.riscv":{id:"riscv",path:"riscv.tmLanguage.json",embeddedScopes:[]},"source.rst":{id:"rst",path:"rst.tmLanguage.json",embeddedScopes:["source.java","source.lua","source.c","source.css","text.xml","text.html.basic","source.sql","source.glsl","source.ruby","source.cmake","source.yaml","source.shell","source.js","source.python","source.cpp"]},"source.ruby":{id:"ruby",path:"ruby.tmLanguage.json",embeddedScopes:["source.java","source.lua","source.shell","source.js","source.c","source.css","source.sql","text.xml","text.html.basic"]},"source.rust":{id:"rust",path:"rust.tmLanguage.json",embeddedScopes:[]},"source.sas":{id:"sas",path:"sas.tmLanguage.json",embeddedScopes:["source.sql"]},"source.sass":{id:"sass",path:"sass.tmLanguage.json",embeddedScopes:[]},"source.scala":{id:"scala",path:"scala.tmLanguage.json",embeddedScopes:[]},"source.scheme":{id:"scheme",path:"scheme.tmLanguage.json",embeddedScopes:[]},"source.css.scss":{id:"scss",path:"scss.tmLanguage.json",embeddedScopes:["source.css"]},"source.shaderlab":{id:"shaderlab",path:"shaderlab.tmLanguage.json",embeddedScopes:["source.hlsl"]},"source.shell":{id:"shellscript",path:"shellscript.tmLanguage.json",embeddedScopes:[]},"text.shell-session":{id:"shellsession",path:"shellsession.tmLanguage.json",embeddedScopes:["source.shell"]},"source.smalltalk":{id:"smalltalk",path:"smalltalk.tmLanguage.json",embeddedScopes:[]},"source.solidity":{id:"solidity",path:"solidity.tmLanguage.json",embeddedScopes:[]},"source.sparql":{id:"sparql",path:"sparql.tmLanguage.json",embeddedScopes:["source.turtle"]},"source.sql":{id:"sql",path:"sql.tmLanguage.json",embeddedScopes:[]},"source.ssh-config":{id:"ssh-config",path:"ssh-config.tmLanguage.json",embeddedScopes:[]},"source.stata":{id:"stata",path:"stata.tmLanguage.json",embeddedScopes:["source.sql"]},"source.stylus":{id:"stylus",path:"stylus.tmLanguage.json",embeddedScopes:[]},"source.svelte":{id:"svelte",path:"svelte.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.tsx","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.swift","source.objc","source.json.comments","source.json","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.clojure","source.batchfile","source.yaml","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","text.html.basic","text.html.markdown","text.pug","source.css.postcss","source.css.less","source.css.scss","source.css","source.sass","source.stylus","source.coffee","source.ts","source.js"]},"source.swift":{id:"swift",path:"swift.tmLanguage.json",embeddedScopes:[]},"source.systemverilog":{id:"system-verilog",path:"system-verilog.tmLanguage.json",embeddedScopes:[]},"source.tasl":{id:"tasl",path:"tasl.tmLanguage.json",embeddedScopes:[]},"source.tcl":{id:"tcl",path:"tcl.tmLanguage.json",embeddedScopes:[]},"text.tex":{id:"tex",path:"tex.tmLanguage.json",embeddedScopes:["source.r"]},"source.toml":{id:"toml",path:"toml.tmLanguage.json",embeddedScopes:[]},"source.tsx":{id:"tsx",path:"tsx.tmLanguage.json",embeddedScopes:[]},"source.turtle":{id:"turtle",path:"turtle.tmLanguage.json",embeddedScopes:[]},"text.html.twig":{id:"twig",path:"twig.tmLanguage.json",embeddedScopes:["source.java","source.lua","source.shell","source.c","source.json","source.sql","text.xml","text.html.basic","source.ruby","source.python","source.php","source.js","source.css"]},"source.txt":{id:"txt",path:"txt.tmLanguage.json",embeddedScopes:[]},"source.ts":{id:"typescript",path:"typescript.tmLanguage.json",embeddedScopes:[]},"source.v":{id:"v",path:"v.tmLanguage.json",embeddedScopes:[]},"source.asp.vb.net":{id:"vb",path:"vb.tmLanguage.json",embeddedScopes:[]},"source.verilog":{id:"verilog",path:"verilog.tmLanguage.json",embeddedScopes:[]},"source.vhdl":{id:"vhdl",path:"vhdl.tmLanguage.json",embeddedScopes:[]},"source.viml":{id:"viml",path:"viml.tmLanguage.json",embeddedScopes:[]},"text.html.vue-html":{id:"vue-html",path:"vue-html.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.swift","source.objc","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.coffee","source.clojure","source.batchfile","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","source.graphql","source.toml","source.yaml","source.json5","source.json.comments","source.json","source.tsx","source.js.jsx","source.ts","source.css.less","source.css.scss","source.css","source.sass","source.stylus","text.pug","text.html.markdown","text.html.basic","source.js","source.vue"]},"source.vue":{id:"vue",path:"vue.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.swift","source.objc","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.coffee","source.clojure","source.batchfile","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","source.graphql","source.toml","source.yaml","source.json5","source.json.comments","source.json","source.tsx","source.js.jsx","source.ts","source.js","source.css.less","source.css.scss","source.css","source.sass","source.stylus","text.pug","text.html.markdown","text.html.basic"]},"source.vyper":{id:"vyper",path:"vyper.tmLanguage.json",embeddedScopes:[]},"source.wat":{id:"wasm",path:"wasm.tmLanguage.json",embeddedScopes:[]},"source.wenyan":{id:"wenyan",path:"wenyan.tmLanguage.json",embeddedScopes:[]},"source.wgsl":{id:"wgsl",path:"wgsl.tmLanguage.json",embeddedScopes:[]},"source.wolfram":{id:"wolfram",path:"wolfram.tmLanguage.json",embeddedScopes:[]},"text.xml":{id:"xml",path:"xml.tmLanguage.json",embeddedScopes:["source.java"]},"text.xml.xsl":{id:"xsl",path:"xsl.tmLanguage.json",embeddedScopes:["source.java","text.xml"]},"source.yaml":{id:"yaml",path:"yaml.tmLanguage.json",embeddedScopes:[]},"source.zenscript":{id:"zenscript",path:"zenscript.tmLanguage.json",embeddedScopes:[]}};var r={d:(A,B)=>{for(var Q in B)r.o(B,Q)&&!r.o(A,Q)&&Object.defineProperty(A,Q,{enumerable:!0,get:B[Q]})},o:(A,B)=>Object.prototype.hasOwnProperty.call(A,B)},N={};r.d(N,{_X:()=>XA,Bz:()=>TA,ot:()=>WA,u:()=>bA,jG:()=>K,Pn:()=>ZA});const L="undefined"!=typeof process&&!!process.env.VSCODE_TEXTMATE_DEBUG;var H;function k(A,B){const Q=[],g=function(A){let B=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,Q=B.exec(A);return{next:()=>{if(!Q)return null;const g=Q[0];return Q=B.exec(A),g}}}(A);let E=g.next();for(;null!==E;){let A=0;if(2===E.length&&":"===E.charAt(1)){switch(E.charAt(0)){case"R":A=1;break;case"L":A=-1;break;default:console.log(`Unknown priority ${E} in scope selector`)}E=g.next()}let B=I();if(Q.push({matcher:B,priority:A}),","!==E)break;E=g.next()}return Q;function C(){if("-"===E){E=g.next();const A=C();return B=>!!A&&!A(B)}if("("===E){E=g.next();const A=function(){const A=[];let B=I();for(;B&&(A.push(B),"|"===E||","===E);){do{E=g.next()}while("|"===E||","===E);B=I()}return B=>A.some((A=>A(B)))}();return")"===E&&(E=g.next()),A}if(R(E)){const A=[];do{A.push(E),E=g.next()}while(R(E));return Q=>B(A,Q)}return null}function I(){const A=[];let B=C();for(;B;)A.push(B),B=C();return B=>A.every((A=>A(B)))}}function R(A){return!!A&&!!A.match(/[\w\.:]+/)}function K(A){"function"==typeof A.dispose&&A.dispose()}function Y(A){return Array.isArray(A)?function(A){let B=[];for(let Q=0,g=A.length;Q{for(let Q in B)A[Q]=B[Q]})),A}function P(A){const B=~A.lastIndexOf("/")||~A.lastIndexOf("\\");return 0===B?A:~B==A.length-1?P(A.substring(0,A.length-1)):A.substr(1+~B)}!function(A){A.toBinaryStr=function(A){let B=A.toString(2);for(;B.length<32;)B="0"+B;return B},A.print=function(B){const Q=A.getLanguageId(B),g=A.getTokenType(B),E=A.getFontStyle(B),C=A.getForeground(B),I=A.getBackground(B);console.log({languageId:Q,tokenType:g,fontStyle:E,foreground:C,background:I})},A.getLanguageId=function(A){return(255&A)>>>0},A.getTokenType=function(A){return(768&A)>>>8},A.containsBalancedBrackets=function(A){return 0!=(1024&A)},A.getFontStyle=function(A){return(30720&A)>>>11},A.getForeground=function(A){return(16744448&A)>>>15},A.getBackground=function(A){return(4278190080&A)>>>24},A.set=function(B,Q,g,E,C,I,D){let w=A.getLanguageId(B),o=A.getTokenType(B),s=A.containsBalancedBrackets(B)?1:0,e=A.getFontStyle(B),c=A.getForeground(B),i=A.getBackground(B);return 0!==Q&&(w=Q),8!==g&&(o=g),null!==E&&(s=E?1:0),-1!==C&&(e=C),0!==I&&(c=I),0!==D&&(i=D),(w<<0|o<<8|s<<10|e<<11|c<<15|i<<24)>>>0}}(H||(H={}));let u=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g;class J{static hasCaptures(A){return null!==A&&(u.lastIndex=0,u.test(A))}static replaceCaptures(A,B,Q){return A.replace(u,((A,g,E,C)=>{let I=Q[parseInt(g||E,10)];if(!I)return A;{let A=B.substring(I.start,I.end);for(;"."===A[0];)A=A.substring(1);switch(C){case"downcase":return A.toLowerCase();case"upcase":return A.toUpperCase();default:return A}}}))}}function y(A,B){return AB?1:0}function S(A,B){if(null===A&&null===B)return 0;if(!A)return-1;if(!B)return 1;let Q=A.length,g=B.length;if(Q===g){for(let g=0;g`);return}const C=Q.lookup(B);A instanceof f?T({baseGrammar:C,selfGrammar:E},g):W(A.ruleName,{baseGrammar:C,selfGrammar:E,repository:E.repository},g);const I=Q.injections(A.scopeName);if(I)for(const A of I)g.add(new f(A))}function W(A,B,Q){B.repository&&B.repository[A]&&X([B.repository[A]],B,Q)}function T(A,B){A.selfGrammar.patterns&&Array.isArray(A.selfGrammar.patterns)&&X(A.selfGrammar.patterns,{...A,repository:A.selfGrammar.repository},B),A.selfGrammar.injections&&X(Object.values(A.selfGrammar.injections),{...A,repository:A.selfGrammar.repository},B)}function X(A,B,Q){for(const g of A){if(Q.visitedRule.has(g))continue;Q.visitedRule.add(g);const A=g.repository?U({},B.repository,g.repository):B.repository;Array.isArray(g.patterns)&&X(g.patterns,{...B,repository:A},Q);const E=g.include;if(!E)continue;const C=_(E);switch(C.kind){case 0:T({...B,selfGrammar:B.baseGrammar},Q);break;case 1:T(B,Q);break;case 2:W(C.ruleName,{...B,repository:A},Q);break;case 3:case 4:const g=C.scopeName===B.selfGrammar.scopeName?B.selfGrammar:C.scopeName===B.baseGrammar.scopeName?B.baseGrammar:void 0;if(g){const E={baseGrammar:B.baseGrammar,selfGrammar:g,repository:A};4===C.kind?W(C.ruleName,E,Q):T(E,Q)}else 4===C.kind?Q.add(new m(C.scopeName,C.ruleName)):Q.add(new f(C.scopeName))}}}class Z{constructor(){this.kind=0}}class v{constructor(){this.kind=1}}class j{constructor(A){this.ruleName=A,this.kind=2}}class V{constructor(A){this.scopeName=A,this.kind=3}}class z{constructor(A,B){this.scopeName=A,this.ruleName=B,this.kind=4}}function _(A){if("$base"===A)return new Z;if("$self"===A)return new v;const B=A.indexOf("#");if(-1===B)return new V(A);if(0===B)return new j(A.substring(1));{const Q=A.substring(0,B),g=A.substring(B+1);return new z(Q,g)}}const $=/\\(\d+)/,AA=/\\(\d+)/g;class BA{constructor(A,B,Q,g){this.$location=A,this.id=B,this._name=Q||null,this._nameIsCapturing=J.hasCaptures(this._name),this._contentName=g||null,this._contentNameIsCapturing=J.hasCaptures(this._contentName)}get debugName(){const A=this.$location?`${P(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${A}`}getName(A,B){return this._nameIsCapturing&&null!==this._name&&null!==A&&null!==B?J.replaceCaptures(this._name,A,B):this._name}getContentName(A,B){return this._contentNameIsCapturing&&null!==this._contentName?J.replaceCaptures(this._contentName,A,B):this._contentName}}class QA extends BA{constructor(A,B,Q,g,E){super(A,B,Q,g),this.retokenizeCapturedWithRuleId=E}dispose(){}collectPatterns(A,B){throw new Error("Not supported!")}compile(A,B){throw new Error("Not supported!")}compileAG(A,B,Q,g){throw new Error("Not supported!")}}class gA extends BA{constructor(A,B,Q,g,E){super(A,B,Q,null),this._match=new wA(g,this.id),this.captures=E,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(A,B){B.push(this._match)}compile(A,B){return this._getCachedCompiledPatterns(A).compile(A)}compileAG(A,B,Q,g){return this._getCachedCompiledPatterns(A).compileAG(A,Q,g)}_getCachedCompiledPatterns(A){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new oA,this.collectPatterns(A,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}}class EA extends BA{constructor(A,B,Q,g,E){super(A,B,Q,g),this.patterns=E.patterns,this.hasMissingPatterns=E.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(A,B){for(const Q of this.patterns)A.getRule(Q).collectPatterns(A,B)}compile(A,B){return this._getCachedCompiledPatterns(A).compile(A)}compileAG(A,B,Q,g){return this._getCachedCompiledPatterns(A).compileAG(A,Q,g)}_getCachedCompiledPatterns(A){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new oA,this.collectPatterns(A,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}}class CA extends BA{constructor(A,B,Q,g,E,C,I,D,w,o){super(A,B,Q,g),this._begin=new wA(E,this.id),this.beginCaptures=C,this._end=new wA(I||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=D,this.applyEndPatternLast=w||!1,this.patterns=o.patterns,this.hasMissingPatterns=o.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(A,B){return this._end.resolveBackReferences(A,B)}collectPatterns(A,B){B.push(this._begin)}compile(A,B){return this._getCachedCompiledPatterns(A,B).compile(A)}compileAG(A,B,Q,g){return this._getCachedCompiledPatterns(A,B).compileAG(A,Q,g)}_getCachedCompiledPatterns(A,B){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new oA;for(const B of this.patterns)A.getRule(B).collectPatterns(A,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,B):this._cachedCompiledPatterns.setSource(0,B)),this._cachedCompiledPatterns}}class IA extends BA{constructor(A,B,Q,g,E,C,I,D,w){super(A,B,Q,g),this._begin=new wA(E,this.id),this.beginCaptures=C,this.whileCaptures=D,this._while=new wA(I,-2),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=w.patterns,this.hasMissingPatterns=w.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(A,B){return this._while.resolveBackReferences(A,B)}collectPatterns(A,B){B.push(this._begin)}compile(A,B){return this._getCachedCompiledPatterns(A).compile(A)}compileAG(A,B,Q,g){return this._getCachedCompiledPatterns(A).compileAG(A,Q,g)}_getCachedCompiledPatterns(A){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new oA;for(const B of this.patterns)A.getRule(B).collectPatterns(A,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(A,B){return this._getCachedCompiledWhilePatterns(A,B).compile(A)}compileWhileAG(A,B,Q,g){return this._getCachedCompiledWhilePatterns(A,B).compileAG(A,Q,g)}_getCachedCompiledWhilePatterns(A,B){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new oA,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,B||"￿"),this._cachedCompiledWhilePatterns}}class DA{static createCaptureRule(A,B,Q,g,E){return A.registerRule((A=>new QA(B,A,Q,g,E)))}static getCompiledRuleId(A,B,Q){return A.id||B.registerRule((g=>{if(A.id=g,A.match)return new gA(A.$vscodeTextmateLocation,A.id,A.name,A.match,DA._compileCaptures(A.captures,B,Q));if(void 0===A.begin){A.repository&&(Q=U({},Q,A.repository));let g=A.patterns;return void 0===g&&A.include&&(g=[{include:A.include}]),new EA(A.$vscodeTextmateLocation,A.id,A.name,A.contentName,DA._compilePatterns(g,B,Q))}return A.while?new IA(A.$vscodeTextmateLocation,A.id,A.name,A.contentName,A.begin,DA._compileCaptures(A.beginCaptures||A.captures,B,Q),A.while,DA._compileCaptures(A.whileCaptures||A.captures,B,Q),DA._compilePatterns(A.patterns,B,Q)):new CA(A.$vscodeTextmateLocation,A.id,A.name,A.contentName,A.begin,DA._compileCaptures(A.beginCaptures||A.captures,B,Q),A.end,DA._compileCaptures(A.endCaptures||A.captures,B,Q),A.applyEndPatternLast,DA._compilePatterns(A.patterns,B,Q))})),A.id}static _compileCaptures(A,B,Q){let g=[];if(A){let E=0;for(const B in A){if("$vscodeTextmateLocation"===B)continue;const A=parseInt(B,10);A>E&&(E=A)}for(let A=0;A<=E;A++)g[A]=null;for(const E in A){if("$vscodeTextmateLocation"===E)continue;const C=parseInt(E,10);let I=0;A[E].patterns&&(I=DA.getCompiledRuleId(A[E],B,Q)),g[C]=DA.createCaptureRule(B,A[E].$vscodeTextmateLocation,A[E].name,A[E].contentName,I)}}return g}static _compilePatterns(A,B,Q){let g=[];if(A)for(let E=0,C=A.length;EA.substring(B.start,B.end)));return AA.lastIndex=0,this.source.replace(AA,((A,B)=>l(Q[parseInt(B,10)]||"")))}_buildAnchorCache(){let A,B,Q,g,E=[],C=[],I=[],D=[];for(A=0,B=this.source.length;AA.source));this._cached=new sA(A,B,this._items.map((A=>A.ruleId)))}return this._cached}compileAG(A,B,Q){return this._hasAnchors?B?Q?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(A,B,Q)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(A,B,Q)),this._anchorCache.A1_G0):Q?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(A,B,Q)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(A,B,Q)),this._anchorCache.A0_G0):this.compile(A)}_resolveAnchors(A,B,Q){let g=this._items.map((A=>A.resolveAnchors(B,Q)));return new sA(A,g,this._items.map((A=>A.ruleId)))}}class sA{constructor(A,B,Q){this.regExps=B,this.rules=Q,this.scanner=A.createOnigScanner(B)}dispose(){"function"==typeof this.scanner.dispose&&this.scanner.dispose()}toString(){const A=[];for(let B=0,Q=this.rules.length;Bthis._root.match(A)))}static createFromRawTheme(A,B){return this.createFromParsedTheme(function(A){if(!A)return[];if(!A.settings||!Array.isArray(A.settings))return[];let B=A.settings,Q=[],g=0;for(let A=0,E=B.length;A1&&(s=C.slice(0,C.length-1),s.reverse()),Q[g++]=new MA(o,s,A,I,D,w)}}return Q}(A),B)}static createFromParsedTheme(A,B){return function(A,B){A.sort(((A,B)=>{let Q=y(A.scope,B.scope);return 0!==Q?Q:(Q=S(A.parentScopes,B.parentScopes),0!==Q?Q:A.index-B.index)}));let Q=0,g="#000000",E="#ffffff";for(;A.length>=1&&""===A[0].scope;){let B=A.shift();-1!==B.fontStyle&&(Q=B.fontStyle),null!==B.foreground&&(g=B.foreground),null!==B.background&&(E=B.background)}let C=new hA(B),I=new tA(Q,C.getId(g),C.getId(E)),D=new FA(new aA(0,null,-1,0,0),[]);for(let B=0,Q=A.length;Bfunction(A,B){if(null===B)return!0;let Q=0,g=B[Q];for(;A;){if(iA(A.scopeName,g)){if(Q++,Q===B.length)return!0;g=B[Q]}A=A.parent}return!1}(A.parent,B.parentScopes)));return Q?new tA(Q.fontStyle,Q.foreground,Q.background):null}}class cA{constructor(A,B){this.parent=A,this.scopeName=B}static push(A,B){for(const Q of B)A=new cA(A,Q);return A}static from(...A){let B=null;for(let Q=0;QA?console.log("how did this happen?"):this.scopeDepth=A,-1!==B&&(this.fontStyle=B),0!==Q&&(this.foreground=Q),0!==g&&(this.background=g)}}class FA{constructor(A,B=[],Q={}){this._mainRule=A,this._children=Q,this._rulesWithParentScopes=B}static _sortBySpecificity(A){return 1===A.length||A.sort(this._cmpBySpecificity),A}static _cmpBySpecificity(A,B){if(A.scopeDepth===B.scopeDepth){const Q=A.parentScopes,g=B.parentScopes;let E=null===Q?0:Q.length,C=null===g?0:g.length;if(E===C)for(let A=0;A{const B=this._scopeToLanguage(A),Q=this._toStandardTokenType(A);return new GA(B,Q)})),this._defaultAttributes=new GA(A,8),this._embeddedLanguagesMatcher=new rA(Object.entries(B||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(A){return null===A?nA._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(A)}_scopeToLanguage(A){return this._embeddedLanguagesMatcher.match(A)||0}_toStandardTokenType(A){const B=A.match(nA.STANDARD_TOKEN_TYPE_REGEXP);if(!B)return 8;switch(B[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}}nA._NULL_SCOPE_METADATA=new GA(0,0),nA.STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/;class rA{constructor(A){if(0===A.length)this.values=null,this.scopesRegExp=null;else{this.values=new Map(A);const B=A.map((([A,B])=>l(A)));B.sort(),B.reverse(),this.scopesRegExp=new RegExp(`^((${B.join(")|(")}))($|\\.)`,"")}}match(A){if(!this.scopesRegExp)return;const B=A.match(this.scopesRegExp);return B?this.values.get(B[1]):void 0}}class NA{constructor(A,B){this.stack=A,this.stoppedEarly=B}}function LA(A,B,Q,g,E,C,I,D){const w=B.content.length;let o=!1,s=-1;if(I){const I=function(A,B,Q,g,E,C){let I=E.beginRuleCapturedEOL?0:-1;const D=[];for(let B=E;B;B=B.pop()){const Q=B.getRule(A);Q instanceof IA&&D.push({rule:Q,stack:B})}for(let w=D.pop();w;w=D.pop()){const{ruleScanner:D,findOptions:o}=kA(w.rule,A,w.stack.endRule,Q,g===I),s=D.findNextMatchSync(B,g,o);if(L&&(console.log(" scanning for while rule"),console.log(D.toString())),!s){L&&console.log(" popping "+w.rule.debugName+" - "+w.rule.debugWhileRegExp),E=w.stack.pop();break}if(-2!==s.ruleId){E=w.stack.pop();break}s.captureIndices&&s.captureIndices.length&&(C.produce(w.stack,s.captureIndices[0].start),RA(A,B,Q,w.stack,C,w.rule.whileCaptures,s.captureIndices),C.produce(w.stack,s.captureIndices[0].end),I=s.captureIndices[0].end,s.captureIndices[0].end>g&&(g=s.captureIndices[0].end,Q=!1))}return{stack:E,linePos:g,anchorPosition:I,isFirstLine:Q}}(A,B,Q,g,E,C);E=I.stack,g=I.linePos,Q=I.isFirstLine,s=I.anchorPosition}const e=Date.now();for(;!o;){if(0!==D&&Date.now()-e>D)return new NA(E,!0);c()}return new NA(E,!1);function c(){L&&(console.log(""),console.log(`@@scanNext ${g}: |${B.content.substr(g).replace(/\n$/,"\\n")}|`));const I=function(A,B,Q,g,E,C){const I=function(A,B,Q,g,E,C){const I=E.getRule(A),{ruleScanner:D,findOptions:w}=HA(I,A,E.endRule,Q,g===C);let o=0;L&&(o=x());const s=D.findNextMatchSync(B,g,w);if(L){const A=x()-o;A>5&&console.warn(`Rule ${I.debugName} (${I.id}) matching took ${A} against '${B}'`),console.log(` scanning for (linePos: ${g}, anchorPosition: ${C})`),console.log(D.toString()),s&&console.log(`matched rule id: ${s.ruleId} from ${s.captureIndices[0].start} to ${s.captureIndices[0].end}`)}return s?{captureIndices:s.captureIndices,matchedRuleId:s.ruleId}:null}(A,B,Q,g,E,C),D=A.getInjections();if(0===D.length)return I;const w=function(A,B,Q,g,E,C,I){let D,w=Number.MAX_VALUE,o=null,s=0;const e=C.contentNameScopesList.getScopeNames();for(let C=0,c=A.length;C=w)&&(w=a,o=h.captureIndices,D=h.ruleId,s=c.priority,w===E))break}return o?{priorityMatch:-1===s,captureIndices:o,matchedRuleId:D}:null}(D,A,B,Q,g,E,C);if(!w)return I;if(!I)return w;const o=I.captureIndices[0].start,s=w.captureIndices[0].start;return s0)&&D[0].end>g;if(-1===e){const I=E.getRule(A);L&&console.log(" popping "+I.debugName+" - "+I.debugEndRegExp),C.produce(E,D[0].start),E=E.withContentNameScopesList(E.nameScopesList),RA(A,B,Q,E,C,I.endCaptures,D),C.produce(E,D[0].end);const e=E;if(E=E.parent,s=e.getAnchorPos(),!c&&e.getEnterPos()===g)return L&&console.error("[1] - Grammar is in an endless loop - Grammar pushed & popped a rule without advancing"),E=e,C.produce(E,w),void(o=!0)}else{const I=A.getRule(e);C.produce(E,D[0].start);const i=E,t=I.getName(B.content,D),M=E.contentNameScopesList.pushAttributed(t,A);if(E=E.push(e,g,s,D[0].end===w,null,M,M),I instanceof CA){const g=I;L&&console.log(" pushing "+g.debugName+" - "+g.debugBeginRegExp),RA(A,B,Q,E,C,g.beginCaptures,D),C.produce(E,D[0].end),s=D[0].end;const e=g.getContentName(B.content,D),t=M.pushAttributed(e,A);if(E=E.withContentNameScopesList(t),g.endHasBackReferences&&(E=E.withEndRule(g.getEndWithResolvedBackReferences(B.content,D))),!c&&i.hasSameRuleAs(E))return L&&console.error("[2] - Grammar is in an endless loop - Grammar pushed the same rule without advancing"),E=E.pop(),C.produce(E,w),void(o=!0)}else if(I instanceof IA){const g=I;L&&console.log(" pushing "+g.debugName),RA(A,B,Q,E,C,g.beginCaptures,D),C.produce(E,D[0].end),s=D[0].end;const e=g.getContentName(B.content,D),t=M.pushAttributed(e,A);if(E=E.withContentNameScopesList(t),g.whileHasBackReferences&&(E=E.withEndRule(g.getWhileWithResolvedBackReferences(B.content,D))),!c&&i.hasSameRuleAs(E))return L&&console.error("[3] - Grammar is in an endless loop - Grammar pushed the same rule without advancing"),E=E.pop(),C.produce(E,w),void(o=!0)}else{const g=I;if(L&&console.log(" matched "+g.debugName+" - "+g.debugMatchRegExp),RA(A,B,Q,E,C,g.captures,D),C.produce(E,D[0].end),E=E.pop(),!c)return L&&console.error("[4] - Grammar is in an endless loop - Grammar is not advancing, nor is it pushing/popping"),E=E.safePop(),C.produce(E,w),void(o=!0)}}D[0].end>g&&(g=D[0].end,Q=!1)}}function HA(A,B,Q,g,E){return{ruleScanner:A.compileAG(B,Q,g,E),findOptions:0}}function kA(A,B,Q,g,E){return{ruleScanner:A.compileWhileAG(B,Q,g,E),findOptions:0}}function RA(A,B,Q,g,E,C,I){if(0===C.length)return;const D=B.content,w=Math.min(C.length,I.length),o=[],s=I[0].end;for(let B=0;Bs)break;for(;o.length>0&&o[o.length-1].endPos<=e.start;)E.produceFromScopes(o[o.length-1].scopes,o[o.length-1].endPos),o.pop();if(o.length>0?E.produceFromScopes(o[o.length-1].scopes,e.start):E.produce(g,e.start),w.retokenizeCapturedWithRuleId){const B=w.getName(D,I),C=g.contentNameScopesList.pushAttributed(B,A),o=w.getContentName(D,I),s=C.pushAttributed(o,A),c=g.push(w.retokenizeCapturedWithRuleId,e.start,-1,!1,null,C,s),i=A.createOnigString(D.substring(0,e.end));LA(A,i,Q&&0===e.start,e.start,c,E,!1,0),K(i);continue}const c=w.getName(D,I);if(null!==c){const B=(o.length>0?o[o.length-1].scopes:g.contentNameScopesList).pushAttributed(c,A);o.push(new KA(B,e.end))}}for(;o.length>0;)E.produceFromScopes(o[o.length-1].scopes,o[o.length-1].endPos),o.pop()}class KA{constructor(A,B){this.scopes=A,this.endPos=B}}function YA(A,B,Q,g,E){const C=k(B,UA),I=DA.getCompiledRuleId(Q,g,E.repository);for(const Q of C)A.push({debugSelector:B,matcher:Q.matcher,ruleId:I,grammar:E,priority:Q.priority})}function UA(A,B){if(B.length{for(let g=Q;gQ&&A.substr(0,Q)===B&&"."===A[Q]}class uA{constructor(A,B,Q,g,E,C,I,D){if(this._rootScopeName=A,this.balancedBracketSelectors=C,this._onigLib=D,this._basicScopeAttributesProvider=new nA(Q,g),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=I,this._grammar=JA(B,null),this._injections=null,this._tokenTypeMatchers=[],E)for(const A of Object.keys(E)){const B=k(A,UA);for(const Q of B)this._tokenTypeMatchers.push({matcher:Q.matcher,type:E[A]})}}get themeProvider(){return this._grammarRepository}dispose(){for(const A of this._ruleId2desc)A&&A.dispose()}createOnigScanner(A){return this._onigLib.createOnigScanner(A)}createOnigString(A){return this._onigLib.createOnigString(A)}getMetadataForScope(A){return this._basicScopeAttributesProvider.getBasicScopeAttributes(A)}_collectInjections(){const A=[],B=this._rootScopeName,Q=(A=>A===this._rootScopeName?this._grammar:this.getExternalGrammar(A))(B);if(Q){const g=Q.injections;if(g)for(let B in g)YA(A,B,g[B],this,Q);const E=this._grammarRepository.injections(B);E&&E.forEach((B=>{const Q=this.getExternalGrammar(B);if(Q){const B=Q.injectionSelector;B&&YA(A,B,Q,this,Q)}}))}return A.sort(((A,B)=>A.priority-B.priority)),A}getInjections(){if(null===this._injections&&(this._injections=this._collectInjections(),L&&this._injections.length>0)){console.log(`Grammar ${this._rootScopeName} contains the following injections:`);for(const A of this._injections)console.log(` - ${A.debugSelector}`)}return this._injections}registerRule(A){const B=++this._lastRuleId,Q=A(B);return this._ruleId2desc[B]=Q,Q}getRule(A){return this._ruleId2desc[A]}getExternalGrammar(A,B){if(this._includedGrammars[A])return this._includedGrammars[A];if(this._grammarRepository){const Q=this._grammarRepository.lookup(A);if(Q)return this._includedGrammars[A]=JA(Q,B&&B.$base),this._includedGrammars[A]}}tokenizeLine(A,B,Q=0){const g=this._tokenize(A,B,!1,Q);return{tokens:g.lineTokens.getResult(g.ruleStack,g.lineLength),ruleStack:g.ruleStack,stoppedEarly:g.stoppedEarly}}tokenizeLine2(A,B,Q=0){const g=this._tokenize(A,B,!0,Q);return{tokens:g.lineTokens.getBinaryResult(g.ruleStack,g.lineLength),ruleStack:g.ruleStack,stoppedEarly:g.stoppedEarly}}_tokenize(A,B,Q,g){let E;if(-1===this._rootId&&(this._rootId=DA.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections()),B&&B!==SA.NULL)E=!1,B.reset();else{E=!0;const A=this._basicScopeAttributesProvider.getDefaultAttributes(),Q=this.themeProvider.getDefaults(),g=H.set(0,A.languageId,A.tokenType,null,Q.fontStyle,Q.foregroundId,Q.backgroundId),C=this.getRule(this._rootId).getName(null,null);let I;I=C?yA.createRootAndLookUpScopeName(C,g,this):yA.createRoot("unknown",g),B=new SA(null,this._rootId,-1,-1,!1,null,I,I)}A+="\n";const C=this.createOnigString(A),I=C.content.length,D=new lA(Q,A,this._tokenTypeMatchers,this.balancedBracketSelectors),w=LA(this,C,E,0,B,D,!0,g);return K(C),{lineLength:I,lineTokens:D,ruleStack:w.stack,stoppedEarly:w.stoppedEarly}}}function JA(A,B){return(A=Y(A)).repository=A.repository||{},A.repository.$self={$vscodeTextmateLocation:A.$vscodeTextmateLocation,patterns:A.patterns,name:A.scopeName},A.repository.$base=B||A.repository.$self,A}class yA{constructor(A,B,Q){this.parent=A,this.scopePath=B,this.tokenAttributes=Q}static fromExtension(A,B){let Q=A,g=A?.scopePath??null;for(const A of B)g=cA.push(g,A.scopeNames),Q=new yA(Q,g,A.encodedTokenAttributes);return Q}static createRoot(A,B){return new yA(null,new cA(null,A),B)}static createRootAndLookUpScopeName(A,B,Q){const g=Q.getMetadataForScope(A),E=new cA(null,A),C=Q.themeProvider.themeMatch(E),I=yA.mergeAttributes(B,g,C);return new yA(null,E,I)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(A){return yA.equals(this,A)}static equals(A,B){for(;;){if(A===B)return!0;if(!A&&!B)return!0;if(!A||!B)return!1;if(A.scopeName!==B.scopeName||A.tokenAttributes!==B.tokenAttributes)return!1;A=A.parent,B=B.parent}}static mergeAttributes(A,B,Q){let g=-1,E=0,C=0;return null!==Q&&(g=Q.fontStyle,E=Q.foregroundId,C=Q.backgroundId),H.set(A,B.languageId,B.tokenType,null,g,E,C)}pushAttributed(A,B){if(null===A)return this;if(-1===A.indexOf(" "))return yA._pushAttributed(this,A,B);const Q=A.split(/ /g);let g=this;for(const A of Q)g=yA._pushAttributed(g,A,B);return g}static _pushAttributed(A,B,Q){const g=Q.getMetadataForScope(B),E=A.scopePath.push(B),C=Q.themeProvider.themeMatch(E),I=yA.mergeAttributes(A.tokenAttributes,g,C);return new yA(A,E,I)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(A){const B=[];let Q=this;for(;Q&&Q!==A;)B.push({encodedTokenAttributes:Q.tokenAttributes,scopeNames:Q.scopePath.getExtensionIfDefined(Q.parent?.scopePath??null)}),Q=Q.parent;return Q===A?B.reverse():void 0}}class SA{constructor(A,B,Q,g,E,C,I,D){this.parent=A,this.ruleId=B,this.beginRuleCapturedEOL=E,this.endRule=C,this.nameScopesList=I,this.contentNameScopesList=D,this._stackElementBrand=void 0,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=Q,this._anchorPos=g}equals(A){return null!==A&&SA._equals(this,A)}static _equals(A,B){return A===B||!!this._structuralEquals(A,B)&&yA.equals(A.contentNameScopesList,B.contentNameScopesList)}static _structuralEquals(A,B){for(;;){if(A===B)return!0;if(!A&&!B)return!0;if(!A||!B)return!1;if(A.depth!==B.depth||A.ruleId!==B.ruleId||A.endRule!==B.endRule)return!1;A=A.parent,B=B.parent}}clone(){return this}static _reset(A){for(;A;)A._enterPos=-1,A._anchorPos=-1,A=A.parent}reset(){SA._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(A,B,Q,g,E,C,I){return new SA(this,A,B,Q,g,E,C,I)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(A){return A.getRule(this.ruleId)}toString(){const A=[];return this._writeString(A,0),"["+A.join(",")+"]"}_writeString(A,B){return this.parent&&(B=this.parent._writeString(A,B)),A[B++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,B}withContentNameScopesList(A){return this.contentNameScopesList===A?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,A)}withEndRule(A){return this.endRule===A?this:new SA(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,A,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(A){let B=this;for(;B&&B._enterPos===A._enterPos;){if(B.ruleId===A.ruleId)return!0;B=B.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(A,B){const Q=yA.fromExtension(A?.nameScopesList??null,B.nameScopesList);return new SA(A,B.ruleId,B.enterPos??-1,B.anchorPos??-1,B.beginRuleCapturedEOL,B.endRule,Q,yA.fromExtension(Q,B.contentNameScopesList))}}SA.NULL=new SA(null,0,0,0,!1,null,null,null);class pA{constructor(A,B){this.allowAny=!1,this.balancedBracketScopes=A.flatMap((A=>"*"===A?(this.allowAny=!0,[]):k(A,UA).map((A=>A.matcher)))),this.unbalancedBracketScopes=B.flatMap((A=>k(A,UA).map((A=>A.matcher))))}get matchesAlways(){return this.allowAny&&0===this.unbalancedBracketScopes.length}get matchesNever(){return 0===this.balancedBracketScopes.length&&!this.allowAny}match(A){for(const B of this.unbalancedBracketScopes)if(B(A))return!1;for(const B of this.balancedBracketScopes)if(B(A))return!0;return this.allowAny}}class lA{constructor(A,B,Q,g){this.balancedBracketSelectors=g,this._emitBinaryTokens=A,this._tokenTypeOverrides=Q,this._lineText=L?B:null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}produce(A,B){this.produceFromScopes(A.contentNameScopesList,B)}produceFromScopes(A,B){if(this._lastTokenEndIndex>=B)return;if(this._emitBinaryTokens){let Q=A?.tokenAttributes??0,g=!1;if(this.balancedBracketSelectors?.matchesAlways&&(g=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const B=A?.getScopeNames()??[];for(const A of this._tokenTypeOverrides)A.matcher(B)&&(Q=H.set(Q,0,A.type,null,-1,0,0));this.balancedBracketSelectors&&(g=this.balancedBracketSelectors.match(B))}if(g&&(Q=H.set(Q,0,8,g,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===Q)return void(this._lastTokenEndIndex=B);if(L){const Q=A?.getScopeNames()??[];console.log(" token: |"+this._lineText.substring(this._lastTokenEndIndex,B).replace(/\n$/,"\\n")+"|");for(let A=0;A0&&this._tokens[this._tokens.length-1].startIndex===B-1&&this._tokens.pop(),0===this._tokens.length&&(this._lastTokenEndIndex=-1,this.produce(A,B),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(A,B){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===B-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),0===this._binaryTokens.length&&(this._lastTokenEndIndex=-1,this.produce(A,B),this._binaryTokens[this._binaryTokens.length-2]=0);const Q=new Uint32Array(this._binaryTokens.length);for(let A=0,B=this._binaryTokens.length;A0;)10===A.charCodeAt(E)?(E++,C++,I=0):(E++,I++),B--}function w(A){null===Q?E=A:D(A-E)}function o(){for(;E0&&65279===A.charCodeAt(0)&&(E=1);let i=0,t=null,M=[],h=[],a=null;function F(A,B){M.push(i),h.push(t),i=A,t=B}function G(){if(0===M.length)return n("illegal state stack");i=M.pop(),t=h.pop()}function n(B){throw new Error("Near offset "+E+": "+B+" ~~~"+A.substr(E,50)+"~~~")}const r=function(){if(null===a)return n("missing ");let A={};null!==Q&&(A[Q]={filename:B,line:C,char:I}),t[a]=A,a=null,F(1,A)},N=function(){if(null===a)return n("missing ");let A=[];t[a]=A,a=null,F(2,A)},L=function(){let A={};null!==Q&&(A[Q]={filename:B,line:C,char:I}),t.push(A),F(1,A)},H=function(){let A=[];t.push(A),F(2,A)};function k(){if(1!==i)return n("unexpected ");G()}function R(){return 1===i||2!==i?n("unexpected "):void G()}function K(A){if(1===i){if(null===a)return n("missing ");t[a]=A,a=null}else 2===i?t.push(A):t=A}function Y(A){if(isNaN(A))return n("cannot parse float");if(1===i){if(null===a)return n("missing ");t[a]=A,a=null}else 2===i?t.push(A):t=A}function U(A){if(isNaN(A))return n("cannot parse integer");if(1===i){if(null===a)return n("missing ");t[a]=A,a=null}else 2===i?t.push(A):t=A}function P(A){if(1===i){if(null===a)return n("missing ");t[a]=A,a=null}else 2===i?t.push(A):t=A}function u(A){if(1===i){if(null===a)return n("missing ");t[a]=A,a=null}else 2===i?t.push(A):t=A}function J(A){if(1===i){if(null===a)return n("missing ");t[a]=A,a=null}else 2===i?t.push(A):t=A}function y(){let A=c(">"),B=!1;return 47===A.charCodeAt(A.length-1)&&(B=!0,A=A.substring(0,A.length-1)),{name:A.trim(),isClosed:B}}function S(A){if(A.isClosed)return"";let B=c(""),B.replace(/&#([0-9]+);/g,(function(A,B){return String.fromCodePoint(parseInt(B,10))})).replace(/&#x([0-9a-f]+);/g,(function(A,B){return String.fromCodePoint(parseInt(B,16))})).replace(/&|<|>|"|'/g,(function(A){switch(A){case"&":return"&";case"<":return"<";case">":return">";case""":return'"';case"'":return"'"}return A}))}for(;E=g));){const w=A.charCodeAt(E);if(D(1),60!==w)return n("expected <");if(E>=g)return n("unexpected end of input");const c=A.charCodeAt(E);if(63===c){D(1),e("?>");continue}if(33===c){if(D(1),s("--")){e("--\x3e");continue}e(">");continue}if(47===c){if(D(1),o(),s("plist")){e(">");continue}if(s("dict")){e(">"),k();continue}if(s("array")){e(">"),R();continue}return n("unexpected closed tag")}let M=y();switch(M.name){case"dict":1===i?r():2===i?L():(t={},null!==Q&&(t[Q]={filename:B,line:C,char:I}),F(1,t)),M.isClosed&&k();continue;case"array":1===i?N():2===i?H():(t=[],F(2,t)),M.isClosed&&R();continue;case"key":p=S(M),1!==i?n("unexpected "):null!==a?n("too many "):a=p;continue;case"string":K(S(M));continue;case"real":Y(parseFloat(S(M)));continue;case"integer":U(parseInt(S(M),10));continue;case"date":P(new Date(S(M)));continue;case"data":u(S(M));continue;case"true":S(M),J(!0);continue;case"false":S(M),J(!1);continue}if(!/^plist/.test(M.name))return n("unexpected opened tag "+M.name)}var p;return t}function xA(A,B){throw new Error("Near offset "+A.pos+": "+B+" ~~~"+A.source.substr(A.pos,50)+"~~~")}class fA{constructor(A){this.source=A,this.pos=0,this.len=A.length,this.line=1,this.char=0}}class mA{constructor(){this.value=null,this.type=0,this.offset=-1,this.len=-1,this.line=-1,this.char=-1}toLocation(A){return{filename:A,line:this.line,char:this.char}}}function OA(A,B){B.value=null,B.type=0,B.offset=-1,B.len=-1,B.line=-1,B.char=-1;let Q,g=A.source,E=A.pos,C=A.len,I=A.line,D=A.char;for(;;){if(E>=C)return!1;if(Q=g.charCodeAt(E),32!==Q&&9!==Q&&13!==Q){if(10!==Q)break;E++,I++,D=0}else E++,D++}if(B.offset=E,B.line=I,B.char=D,34===Q){for(B.type=1,E++,D++;;){if(E>=C)return!1;if(Q=g.charCodeAt(E),E++,D++,92!==Q){if(34===Q)break}else E++,D++}B.value=g.substring(B.offset+1,E-1).replace(/\\u([0-9A-Fa-f]{4})/g,((A,B)=>String.fromCodePoint(parseInt(B,16)))).replace(/\\(.)/g,((B,Q)=>{switch(Q){case'"':return'"';case"\\":return"\\";case"/":return"/";case"b":return"\b";case"f":return"\f";case"n":return"\n";case"r":return"\r";case"t":return"\t";default:xA(A,"invalid escape sequence")}throw new Error("unreachable")}))}else if(91===Q)B.type=2,E++,D++;else if(123===Q)B.type=3,E++,D++;else if(93===Q)B.type=4,E++,D++;else if(125===Q)B.type=5,E++,D++;else if(58===Q)B.type=6,E++,D++;else if(44===Q)B.type=7,E++,D++;else if(110===Q){if(B.type=8,E++,D++,Q=g.charCodeAt(E),117!==Q)return!1;if(E++,D++,Q=g.charCodeAt(E),108!==Q)return!1;if(E++,D++,Q=g.charCodeAt(E),108!==Q)return!1;E++,D++}else if(116===Q){if(B.type=9,E++,D++,Q=g.charCodeAt(E),114!==Q)return!1;if(E++,D++,Q=g.charCodeAt(E),117!==Q)return!1;if(E++,D++,Q=g.charCodeAt(E),101!==Q)return!1;E++,D++}else if(102===Q){if(B.type=10,E++,D++,Q=g.charCodeAt(E),97!==Q)return!1;if(E++,D++,Q=g.charCodeAt(E),108!==Q)return!1;if(E++,D++,Q=g.charCodeAt(E),115!==Q)return!1;if(E++,D++,Q=g.charCodeAt(E),101!==Q)return!1;E++,D++}else for(B.type=11;;){if(E>=C)return!1;if(Q=g.charCodeAt(E),!(46===Q||Q>=48&&Q<=57||101===Q||69===Q||45===Q||43===Q))break;E++,D++}return B.len=E-B.offset,null===B.value&&(B.value=g.substr(B.offset,B.len)),A.pos=E,A.line=I,A.char=D,!0}class qA{constructor(A,B){this._onigLibPromise=B,this._grammars=new Map,this._rawGrammars=new Map,this._injectionGrammars=new Map,this._theme=A}dispose(){for(const A of this._grammars.values())A.dispose()}setTheme(A){this._theme=A}getColorMap(){return this._theme.getColorMap()}addGrammar(A,B){this._rawGrammars.set(A.scopeName,A),B&&this._injectionGrammars.set(A.scopeName,B)}lookup(A){return this._rawGrammars.get(A)}injections(A){return this._injectionGrammars.get(A)}getDefaults(){return this._theme.getDefaults()}themeMatch(A){return this._theme.match(A)}async grammarForScopeName(A,B,Q,g,E){if(!this._grammars.has(A)){let C=this._rawGrammars.get(A);if(!C)return null;this._grammars.set(A,function(A,B,Q,g,E,C,I,D){return new uA(A,B,Q,g,E,C,I,D)}(A,C,B,Q,g,E,this,await this._onigLibPromise))}return this._grammars.get(A)}}function bA(A,B){let Q=0;const g=[];let E=A,C=B;for(;E!==C;)E&&(!C||E.depth>=C.depth)?(Q++,E=E.parent):(g.push(C.toStateStackFrame()),C=C.parent);return{pops:Q,newFrames:g.reverse()}}function WA(A,B){let Q=A;for(let A=0;A0;)await Promise.all(C.Q.map((A=>this._loadSingleGrammar(A.scopeName)))),C.processQueue();return this._grammarForScopeName(A,B,Q,g,E)}async _loadSingleGrammar(A){return this._ensureGrammarCache.has(A)||this._ensureGrammarCache.set(A,this._doLoadSingleGrammar(A)),this._ensureGrammarCache.get(A)}async _doLoadSingleGrammar(A){const B=await this._options.loadGrammar(A);if(B){const Q="function"==typeof this._options.getInjections?this._options.getInjections(A):void 0;this._syncRegistry.addGrammar(B,Q)}}async addGrammar(A,B=[],Q=0,g=null){return this._syncRegistry.addGrammar(A,B),await this._grammarForScopeName(A.scopeName,Q,g)}_grammarForScopeName(A,B=0,Q=null,g=null,E=null){return this._syncRegistry.grammarForScopeName(A,B,Q,g,E)}}const XA=SA.NULL,ZA=function(A,B=null){return null!==B&&/\.json$/.test(B)?(Q=A,L?function(A,B,Q){let g=new fA(A),E=new mA,C=0,I=null,D=[],w=[];function o(){D.push(C),w.push(I)}function s(){C=D.pop(),I=w.pop()}function e(A){xA(g,A)}for(;OA(g,E);){if(0===C){if(null!==I&&e("too many constructs in root"),3===E.type){I={},I.$vscodeTextmateLocation=E.toLocation(B),o(),C=1;continue}if(2===E.type){I=[],o(),C=4;continue}e("unexpected token in root")}if(2===C){if(5===E.type){s();continue}if(7===E.type){C=3;continue}e("expected , or }")}if(1===C||3===C){if(1===C&&5===E.type){s();continue}if(1===E.type){let A=E.value;if(OA(g,E)&&6===E.type||e("expected colon"),OA(g,E)||e("expected value"),C=2,1===E.type){I[A]=E.value;continue}if(8===E.type){I[A]=null;continue}if(9===E.type){I[A]=!0;continue}if(10===E.type){I[A]=!1;continue}if(11===E.type){I[A]=parseFloat(E.value);continue}if(2===E.type){let B=[];I[A]=B,o(),C=4,I=B;continue}if(3===E.type){let Q={};Q.$vscodeTextmateLocation=E.toLocation(B),I[A]=Q,o(),C=1,I=Q;continue}}e("unexpected token in dict")}if(5===C){if(4===E.type){s();continue}if(7===E.type){C=6;continue}e("expected , or ]")}if(4===C||6===C){if(4===C&&4===E.type){s();continue}if(C=5,1===E.type){I.push(E.value);continue}if(8===E.type){I.push(null);continue}if(9===E.type){I.push(!0);continue}if(10===E.type){I.push(!1);continue}if(11===E.type){I.push(parseFloat(E.value));continue}if(2===E.type){let A=[];I.push(A),o(),C=4,I=A;continue}if(3===E.type){let A={};A.$vscodeTextmateLocation=E.toLocation(B),I.push(A),o(),C=1,I=A;continue}e("unexpected token in array")}e("unknown state")}return 0!==w.length&&e("unclosed constructs"),I}(Q,B):JSON.parse(Q)):function(A,B){return L?function(A,B,Q){return dA(A,B,"$vscodeTextmateLocation")}(A,B):function(A){return dA(A,null,null)}(A)}(A,B);var Q};var vA=N.Bz,jA=("undefined"!=typeof document&&document.currentScript&&document.currentScript.src,function(A){var B,Q,g=void 0!==(A=A||{})?A:{};g.ready=new Promise((function(A,g){B=A,Q=g}));var E,C=Object.assign({},g),I=!1;E=function(A){let B;return"function"==typeof readbuffer?new Uint8Array(readbuffer(A)):(B=read(A,"binary"),"object"==typeof B||L(Q),B);var Q},"undefined"!=typeof scriptArgs&&scriptArgs,"undefined"!=typeof onig_print&&("undefined"==typeof console&&(console={}),console.log=onig_print,console.warn=console.error="undefined"!=typeof printErr?printErr:onig_print);var D,w,o=g.print||console.log.bind(console),s=g.printErr||console.warn.bind(console);Object.assign(g,C),C=null,g.arguments&&g.arguments,g.thisProgram&&g.thisProgram,g.quit&&g.quit,g.wasmBinary&&(D=g.wasmBinary),g.noExitRuntime,"object"!=typeof WebAssembly&&L("no native wasm support detected");var e,c,i,t=!1,M="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function h(A,B,Q){for(var g=B+Q,E=B;A[E]&&!(E>=g);)++E;if(E-B>16&&A.buffer&&M)return M.decode(A.subarray(B,E));for(var C="";B>10,56320|1023&o)}}else C+=String.fromCharCode((31&I)<<6|D)}else C+=String.fromCharCode(I)}return C}function a(A){e=A,g.HEAP8=new Int8Array(A),g.HEAP16=new Int16Array(A),g.HEAP32=new Int32Array(A),g.HEAPU8=c=new Uint8Array(A),g.HEAPU16=new Uint16Array(A),g.HEAPU32=i=new Uint32Array(A),g.HEAPF32=new Float32Array(A),g.HEAPF64=new Float64Array(A)}g.INITIAL_MEMORY;var F=[],G=[],n=[],r=0,N=null;function L(A){g.onAbort&&g.onAbort(A),s(A="Aborted("+A+")"),t=!0,A+=". Build with -sASSERTIONS for more info.";var B=new WebAssembly.RuntimeError(A);throw Q(B),B}var H,k,R,K="data:application/octet-stream;base64,";function Y(A){return A.startsWith(K)}function U(A){try{if(A==H&&D)return new Uint8Array(D);if(E)return E(A);throw"both async and sync fetching of the wasm failed"}catch(A){L(A)}}function P(A){for(;A.length>0;)A.shift()(g)}function u(A){try{return w.grow(A-e.byteLength+65535>>>16),a(w.buffer),1}catch(A){}}Y(H="onig.wasm")||(k=H,H=g.locateFile?g.locateFile(k,""):""+k),R="undefined"!=typeof dateNow?dateNow:()=>performance.now();var J=[null,[],[]];function y(A,B){var Q=J[A];0===B||10===B?((1===A?o:s)(h(Q,0)),Q.length=0):Q.push(B)}var S,p={emscripten_get_now:R,emscripten_memcpy_big:function(A,B,Q){c.copyWithin(A,B,B+Q)},emscripten_resize_heap:function(A){var B=c.length,Q=2147483648;if((A>>>=0)>Q)return!1;let g=(A,B)=>A+(B-A%B)%B;for(var E=1;E<=4;E*=2){var C=B*(1+.2/E);if(C=Math.min(C,A+100663296),u(Math.min(Q,g(Math.max(A,C),65536))))return!0}return!1},fd_write:function(A,B,Q,g){for(var E=0,C=0;C>2],D=i[B+4>>2];B+=8;for(var w=0;w>2]=E,0}};function l(A){function Q(){S||(S=!0,g.calledRun=!0,t||(P(G),B(g),g.onRuntimeInitialized&&g.onRuntimeInitialized(),function(){if(g.postRun)for("function"==typeof g.postRun&&(g.postRun=[g.postRun]);g.postRun.length;)A=g.postRun.shift(),n.unshift(A);var A;P(n)}()))}r>0||(function(){if(g.preRun)for("function"==typeof g.preRun&&(g.preRun=[g.preRun]);g.preRun.length;)A=g.preRun.shift(),F.unshift(A);var A;P(F)}(),r>0||(g.setStatus?(g.setStatus("Running..."),setTimeout((function(){setTimeout((function(){g.setStatus("")}),1),Q()}),1)):Q()))}if(function(){var A={env:p,wasi_snapshot_preview1:p};function B(A,B){var Q,E=A.exports;g.asm=E,a((w=g.asm.memory).buffer),g.asm.__indirect_function_table,Q=g.asm.__wasm_call_ctors,G.unshift(Q),function(A){if(r--,g.monitorRunDependencies&&g.monitorRunDependencies(r),0==r&&N){var B=N;N=null,B()}}()}function E(A){B(A.instance)}function C(B){return(!D&&I&&"function"==typeof fetch?fetch(H,{credentials:"same-origin"}).then((function(A){if(!A.ok)throw"failed to load wasm binary file at '"+H+"'";return A.arrayBuffer()})).catch((function(){return U(H)})):Promise.resolve().then((function(){return U(H)}))).then((function(B){return WebAssembly.instantiate(B,A)})).then((function(A){return A})).then(B,(function(A){s("failed to asynchronously prepare wasm: "+A),L(A)}))}if(r++,g.monitorRunDependencies&&g.monitorRunDependencies(r),g.instantiateWasm)try{return g.instantiateWasm(A,B)}catch(A){s("Module.instantiateWasm callback failed with error: "+A),Q(A)}(D||"function"!=typeof WebAssembly.instantiateStreaming||Y(H)||"function"!=typeof fetch?C(E):fetch(H,{credentials:"same-origin"}).then((function(B){return WebAssembly.instantiateStreaming(B,A).then(E,(function(A){return s("wasm streaming compile failed: "+A),s("falling back to ArrayBuffer instantiation"),C(E)}))}))).catch(Q)}(),g.___wasm_call_ctors=function(){return(g.___wasm_call_ctors=g.asm.__wasm_call_ctors).apply(null,arguments)},g.___errno_location=function(){return(g.___errno_location=g.asm.__errno_location).apply(null,arguments)},g._omalloc=function(){return(g._omalloc=g.asm.omalloc).apply(null,arguments)},g._ofree=function(){return(g._ofree=g.asm.ofree).apply(null,arguments)},g._getLastOnigError=function(){return(g._getLastOnigError=g.asm.getLastOnigError).apply(null,arguments)},g._createOnigScanner=function(){return(g._createOnigScanner=g.asm.createOnigScanner).apply(null,arguments)},g._freeOnigScanner=function(){return(g._freeOnigScanner=g.asm.freeOnigScanner).apply(null,arguments)},g._findNextOnigScannerMatch=function(){return(g._findNextOnigScannerMatch=g.asm.findNextOnigScannerMatch).apply(null,arguments)},g._findNextOnigScannerMatchDbg=function(){return(g._findNextOnigScannerMatchDbg=g.asm.findNextOnigScannerMatchDbg).apply(null,arguments)},g.stackSave=function(){return(g.stackSave=g.asm.stackSave).apply(null,arguments)},g.stackRestore=function(){return(g.stackRestore=g.asm.stackRestore).apply(null,arguments)},g.stackAlloc=function(){return(g.stackAlloc=g.asm.stackAlloc).apply(null,arguments)},g.dynCall_jiji=function(){return(g.dynCall_jiji=g.asm.dynCall_jiji).apply(null,arguments)},g.UTF8ToString=function(A,B){return A?h(c,A,B):""},N=function A(){S||l(),S||(N=A)},g.preInit)for("function"==typeof g.preInit&&(g.preInit=[g.preInit]);g.preInit.length>0;)g.preInit.pop()();return l(),A.ready});let VA=null;class zA{static _utf8ByteLength(A){let B=0;for(let Q=0,g=A.length;Q=55296&&E<=56319&&Q+1=56320&&B<=57343&&(C=65536+(E-55296<<10)|B-56320,I=!0)}B+=C<=127?1:C<=2047?2:C<=65535?3:4,I&&Q++}return B}constructor(A){const B=A.length,Q=zA._utf8ByteLength(A),g=Q!==B,E=g?new Uint32Array(B+1):null;g&&(E[B]=Q);const C=g?new Uint32Array(Q+1):null;g&&(C[Q]=B);const I=new Uint8Array(Q);let D=0;for(let Q=0;Q=55296&&w<=56319&&Q+1=56320&&B<=57343&&(o=65536+(w-55296<<10)|B-56320,s=!0)}g&&(E[Q]=D,s&&(E[Q+1]=D),o<=127?C[D+0]=Q:o<=2047?(C[D+0]=Q,C[D+1]=Q):o<=65535?(C[D+0]=Q,C[D+1]=Q,C[D+2]=Q):(C[D+0]=Q,C[D+1]=Q,C[D+2]=Q,C[D+3]=Q)),o<=127?I[D++]=o:o<=2047?(I[D++]=192|(1984&o)>>>6,I[D++]=128|(63&o)>>>0):o<=65535?(I[D++]=224|(61440&o)>>>12,I[D++]=128|(4032&o)>>>6,I[D++]=128|(63&o)>>>0):(I[D++]=240|(1835008&o)>>>18,I[D++]=128|(258048&o)>>>12,I[D++]=128|(4032&o)>>>6,I[D++]=128|(63&o)>>>0),s&&Q++}this.utf16Length=B,this.utf8Length=Q,this.utf16Value=A,this.utf8Value=I,this.utf16OffsetToUtf8=E,this.utf8OffsetToUtf16=C}createString(A){const B=A._omalloc(this.utf8Length);return A.HEAPU8.set(this.utf8Value,B),B}}class _A{constructor(A){if(this.id=++_A.LAST_ID,!VA)throw new Error("Must invoke loadWASM first.");this._onigBinding=VA,this.content=A;const B=new zA(A);this.utf16Length=B.utf16Length,this.utf8Length=B.utf8Length,this.utf16OffsetToUtf8=B.utf16OffsetToUtf8,this.utf8OffsetToUtf16=B.utf8OffsetToUtf16,this.utf8Length<1e4&&!_A._sharedPtrInUse?(_A._sharedPtr||(_A._sharedPtr=VA._omalloc(1e4)),_A._sharedPtrInUse=!0,VA.HEAPU8.set(B.utf8Value,_A._sharedPtr),this.ptr=_A._sharedPtr):this.ptr=B.createString(VA)}convertUtf8OffsetToUtf16(A){return this.utf8OffsetToUtf16?A<0?0:A>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[A]:A}convertUtf16OffsetToUtf8(A){return this.utf16OffsetToUtf8?A<0?0:A>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[A]:A}dispose(){this.ptr===_A._sharedPtr?_A._sharedPtrInUse=!1:this._onigBinding._ofree(this.ptr)}}_A.LAST_ID=0,_A._sharedPtr=0,_A._sharedPtrInUse=!1;class $A{constructor(A){if(!VA)throw new Error("Must invoke loadWASM first.");const B=[],Q=[];for(let g=0,E=A.length;gWebAssembly.instantiateStreaming(A,B)}(g):function(A){return async B=>{const Q=await A.arrayBuffer();return WebAssembly.instantiate(Q,B)}}(g):function(A){return B=>WebAssembly.instantiate(A,B)}(g)}return BB=new Promise(((A,B)=>{g=A,E=B})),function(A,B,Q,g){jA({print:B,instantiateWasm:(B,Q)=>{if("undefined"==typeof performance){const A=()=>Date.now();B.env.emscripten_get_now=A,B.wasi_snapshot_preview1.emscripten_get_now=A}return A(B).then((A=>Q(A.instance)),g),{}}}).then((A=>{VA=A,Q()}))}(B,Q,g,E),BB}function gB(A){return new _A(A)}function EB(A){return new $A(A)}function CB(A){const B=G[A];if(!B)return;const{id:Q}=n[B];return{id:Q,scopeName:B}}const IB=new Map;let DB,wB;async function oB(A){if(IB.has(A))return IB.get(A);const Q=function(A){return n[A]}(A);if(!Q)return Promise.resolve(void 0);let g;if(void 0===DB&&(g=sB(Q.path),DB=g.then((()=>!0)).catch((()=>!1))),void 0===wB&&(wB=await DB),wB){const B=g||sB(Q.path);return IB.set(A,B),B}const E=B(`grammars/${Q.id}`);Q.embeddedScopes.forEach((A=>{if(!IB.has(A)){const B=E.then((B=>B.find((B=>B.scopeName===A))));IB.set(A,B)}}));const C=E.then((B=>B.find((B=>B.scopeName===A))));return IB.set(A,C),C}async function sB(B){return await A()}const eB=30720,cB=16744448,iB=16775168,tB=11,MB=15,hB={NotSet:-1,None:0,Italic:1,Bold:2,Underline:4,Strikethrough:8};function aB(A,B,Q,g){const{tokens:E,ruleStack:C}=A.tokenizeLine2(Q,B),I=[];let D=Q.length;for(let A=E.length-2;A>=0;A-=2){const B=E[A],g=E[A+1],C=Q.slice(B,D);I.unshift({content:C,metadata:g}),D=B}let w=[];if(null==g?void 0:g.preserveWhitespace)w=I;else for(let A=0;A0?w[w.length-1].content+=B.content:A{const{rawTokens:E,nextStack:C}=aB(B,g,A,{preserveWhitespace:!0}),I=E.map((({content:A,metadata:B})=>({content:A,style:GB(B,Q)}))),D=function(A,B,Q,g){const{tokens:E}=Q.tokenizeLine(A,B),C=[];for(let B=0;B{if(w+=A.content.length,Q>>MB]},g=(A&eB)>>>tB;return g&hB.Italic&&(Q.fontStyle="italic"),g&hB.Bold&&(Q.fontWeight="bold"),g&hB.Underline&&(Q.textDecoration="underline"),g&hB.Strikethrough&&(Q.textDecoration="line-through"),Q}var nB=function(A){var B=null;if("undefined"!=typeof process&&null!=process.versions&&null!=process.versions.node)B=Buffer.from(A,"base64");else{var Q=globalThis.atob(A),g=Q.length;B=new Uint8Array(new ArrayBuffer(g));for(var E=0;E({createOnigScanner:EB,createOnigString:gB})));rB=new vA({onigLib:A,loadGrammar:A=>oB(A)})}const B=A.filter((A=>!NB(A))).map((A=>{const B=CB(A);if(!B)throw new kB(A);return rB.loadGrammar(B.scopeName)}));return Promise.all(B)}function HB(A){if(NB(A))return{langId:A,grammar:null};const B=CB(A);if(!B)throw new kB(A);const Q=function(A){const{_syncRegistry:B}=rB;return null==B?void 0:B._grammars.get(A)}(B.scopeName);if(!Q)throw new Error(`Syntax highlighting error: grammar for ${A} not loaded`);return{langId:B.id,grammar:Q}}class kB extends Error{constructor(A){super(`Unknown language: ${A}`),this.alias=A}}function RB(A,B,Q){rB.setTheme(Q);const g=function(A){const B=rB.getColorMap();return A.colorNames?B.map((B=>Object.keys(A.colorNames).find((Q=>A.colorNames[Q].toUpperCase()===B.toUpperCase()))||B)):B}(Q);return function(A,B,Q){let g=null;return A.split(/\r?\n|\r/g).map((A=>{const{rawTokens:E,nextStack:C}=aB(B,g,A);return g=C,E.map((({content:A,metadata:B})=>({content:A,style:GB(B,Q)})))}))}(A,B,g)}function KB(A){return A.split(/\r?\n|\r/g).map((A=>[{content:A,style:{}}]))}function YB(A,B){if(!A)return[{fromLineNumber:B,toLineNumber:B}];if(A.startsWith("["))return UB(A,B);return uB(A.slice(1,-1)).map((A=>{if(A.includes("[")){console.log("part",A);const[Q,g]=A.split("["),E=Number(Q),C=B+E-1;if(!JB(C))throw new yB(Q);return UB("["+g,C)}const{from:Q,to:g}=PB(A);return[{fromLineNumber:Q+B-1,toLineNumber:g+B-1}]})).flat()}function UB(A,B){return uB(A.slice(1,-1)).map((A=>{const{from:Q,to:g}=PB(A);return{lineNumber:B,fromColumn:Q,toColumn:g}}))}function PB(A){const[B,Q]=A.split(":");if(!JB(B))throw new yB(B);const g=Number(B);if(g<1)throw new SB;if(Q){if(!JB(Q))throw new yB(Q);return{from:g,to:+Q}}return{from:g,to:g}}function uB(A){return A.split(/,(?![^\[]*\])/g)}function JB(A){A=A.toString();var B=Math.abs(A),Q=parseInt(A,10);return!isNaN(B)&&Q===B&&B.toString()===A}class yB extends Error{constructor(A){super(`Invalid number "${A}" in range string`),this.number=A,Object.setPrototypeOf(this,new.target.prototype)}}class SB extends Error{constructor(){super("Invalid line or column number in range string"),Object.setPrototypeOf(this,new.target.prototype)}}const pB="#001",lB="#010",dB={name:"comments",type:"light",foreground:"",background:"",colors:{},settings:[{settings:{foreground:"#000"}},{scope:["punctuation.definition.comment"],settings:{foreground:pB}},{scope:"comment",settings:{foreground:lB}}]};function xB(A,B,Q,g){const E=B?RB(A,B,dB):KB(A),C=[];let I=1;const D=E.map((A=>{const{annotations:B,lineWithoutComments:E}=function(A,B,Q){if(!A.some((A=>A.style.color===pB)))return{annotations:[],lineWithoutComments:A};const g=[];let E=0;for(;E!A.tokens.includes(B)));C.every((A=>""===A.content.trim()))&&(C=null);return{annotations:g.map((A=>({name:A.name,query:A.query,ranges:A.ranges}))),lineWithoutComments:C}}(A,g,I);if(C.push(...B),!E)return null;const D=E.map((A=>A.content)).join("");return["mdx","jsx","tsx"].includes(Q)&&B.length>0&&"{}"===D.trim()?null:(I++,D)})).filter((A=>null!==A)).join("\n");return{newCode:D,annotations:C}}function fB(A,B){var Q;const g=A.match(/\s*([\w-]+)?(\([^\)]*\)|\[[^\]]*\])?(.*)$/),E=g[1],C=g[2],I=null===(Q=g[3])||void 0===Q?void 0:Q.trim();return B.includes(E)?{name:E,rangeString:C,query:I}:null}function mB(A,B){let Q=[],g=1;return A.forEach((A=>{Q.push({fromColumn:g,toColumn:g+A.content.length-1,token:A}),g+=A.content.length})),B.forEach((A=>{Q=function(A,B){const{range:Q}=B,{fromColumn:g,toColumn:E}=Q,C=[];let I=0;for(;IE){const[A,Q]=qB(B,E+1);D.tokens.push(A),C.push(Q)}else D.tokens.push(B);I++}else C.push(D);for(;IOB(A)))}function OB(A){return"tokens"in A?{annotationName:A.annotationName,annotationQuery:A.annotationQuery,fromColumn:A.fromColumn,toColumn:A.toColumn,tokens:A.tokens.map((A=>OB(A)))}:A.token}function qB(A,B){if("token"in A){const Q=Object.assign(Object.assign({},A.token),{content:A.token.content.slice(0,B-A.fromColumn)}),g=Object.assign(Object.assign({},A.token),{content:A.token.content.slice(B-A.fromColumn)});return[Object.assign(Object.assign({},A),{toColumn:B-1,token:Q}),Object.assign(Object.assign({},A),{fromColumn:B,token:g})]}{const Q=[],g=[];A.tokens.forEach((A=>{if(A.toColumn=B)g.push(A);else{const[E,C]=qB(A,B);Q.push(E),g.push(C)}}));return[Object.assign(Object.assign({},A),{toColumn:B-1,tokens:Q}),Object.assign(Object.assign({},A),{fromColumn:B,tokens:g})]}}function bB(A,B){let Q=A.map(((A,B)=>({fromLineNumber:B+1,toLineNumber:B+1,line:A})));return B.forEach((A=>{Q=function(A,B){const{range:Q,name:g,query:E}=B,{fromLineNumber:C,toLineNumber:I}=Q,D=[];let w=0;for(;wI){const[A,Q]=TB(B,I+1);o.lines.push(A),D.push(Q)}else o.lines.push(B);w++}else D.push(o);for(;wWB(A)))}function WB(A){return"line"in A?{lineNumber:A.fromLineNumber,tokens:A.line.tokens}:{annotationName:A.annotationName,annotationQuery:A.annotationQuery,fromLineNumber:A.fromLineNumber,toLineNumber:A.toLineNumber,lines:A.lines.map((A=>WB(A)))}}function TB(A,B){if("line"in A)return[Object.assign(Object.assign({},A),{toLineNumber:B-1}),Object.assign(Object.assign({},A),{fromLineNumber:B})];{const Q=[],g=[];return A.lines.forEach((A=>{if(A.toLineNumber=B)g.push(A);else{const[E,C]=TB(A,B);Q.push(E),g.push(C)}})),[Object.assign(Object.assign({},A),{toLineNumber:B-1,lines:Q}),Object.assign(Object.assign({},A),{fromLineNumber:B,lines:g})]}}function XB(A,B){const{inlineAnnotations:Q,multilineAnnotations:g}=function(A){const B=[],Q=[];return A.forEach((A=>{A.ranges.forEach((g=>{"lineNumber"in g?B.push(Object.assign(Object.assign({},A),{range:g})):Q.push(Object.assign(Object.assign({},A),{range:g}))}))})),{inlineAnnotations:B,multilineAnnotations:Q}}(B);return bB(A.map(((A,B)=>{const g=Q.filter((A=>A.range.lineNumber===B+1));return{lineNumber:B+1,tokens:mB(A,g)}})),g)}var ZB=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],vB={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",9:"strikethrough"};function jB(A,B){const Q=A.indexOf("[",B);if(-1!==Q){const B=A.indexOf("m",Q);return{sequence:A.substring(Q+2,B).split(";"),startPosition:Q,position:B+1}}return{position:A.length}}function VB(A,B){let Q=1;const g=A[B+Q++];let E;if("2"===g){const g=[A[B+Q++],A[B+Q++],A[B+Q]].map((A=>Number.parseInt(A)));3!==g.length||g.some((A=>Number.isNaN(A)))||(E={type:"rgb",rgb:g})}else if("5"===g){const g=Number.parseInt(A[B+Q]);Number.isNaN(g)||(E={type:"table",index:Number(g)})}return[Q,E]}function zB(A){const B=[];for(let Q=0;Q=90&&E<=97?B.push({type:"setForegroundColor",value:{type:"named",name:ZB[E-90+8]}}):E>=100&&E<=107&&B.push({type:"setBackgroundColor",value:{type:"named",name:ZB[E-100+8]}})}return B}function _B(A,B){const Q=function(){let A=null,B=null,Q=new Set;return{parse(g){const E=[];let C=0;do{const I=jB(g,C),D=I.sequence?g.substring(C,I.startPosition):g.substring(C);if(D.length>0&&E.push({value:D,foreground:A,background:B,decorations:new Set(Q)}),I.sequence){const g=zB(I.sequence);for(const E of g)"resetAll"===E.type?(A=null,B=null,Q.clear()):"resetForegroundColor"===E.type?A=null:"resetBackgroundColor"===E.type?B=null:"resetDecoration"===E.type&&Q.delete(E.value);for(const E of g)"setForegroundColor"===E.type?A=E.value:"setBackgroundColor"===E.type?B=E.value:"setDecoration"===E.type&&Q.add(E.value)}C=I.position}while(Cfunction(A,B,Q){const g=A.parse(B),E=g.map((({value:A,foreground:B,background:g,decorations:E})=>{const C=$B(B,Q),I={};C&&(I.color=C);const D=$B(g,Q);return D&&(I.background=D),E.has("bold")&&(I.fontWeight="bold"),E.has("italic")&&(I.fontStyle="italic"),E.has("underline")&&(I.textDecoration="underline"),E.has("strikethrough")&&(I.textDecoration="line-through"),E.has("reverse")&&(I.color=D,I.background=C),E.has("dim")&&(I.opacity=.5),{content:A,style:I}}));return E}(Q,A,B)));return g}function $B(A,B){if(A){if("named"===A.type){return D(B,"terminal.ansi"+(A.name[0].toUpperCase()+A.name.slice(1)))}if("rgb"===A.type){const[B,Q,g]=A.rgb;return`rgb(${B}, ${Q}, ${g})`}}}async function AQ(A,B){await Promise.all([LB(A),c(B)])}async function BQ(A,B,Q="dark-plus",g={}){const E=A||"",C=B||"text";if("string"!=typeof E)throw new Error("Syntax highlighter error: code must be a string");if("string"!=typeof C)throw new Error("Syntax highlighter error: lang must be a string");return await AQ([C],Q),QQ(E,C,Q,g)}function QQ(A,B,Q="dark-plus",g={}){const E=A||"",C=B||"text";if("string"!=typeof E)throw new Error("Syntax highlighter error: code must be a string");if("string"!=typeof C)throw new Error("Syntax highlighter error: lang must be a string");const{langId:I,grammar:w}=HB(C),o=i(Q),s="text"==I?KB(E):"terminal"==I?_B(E,o):(null==g?void 0:g.scopes)?function(A,B,Q){return rB.setTheme(Q),FB(A,B,rB.getColorMap())}(E,w,o):RB(E,w,o),e="terminal"==I?function(A){return{color:D(A,"terminal.foreground"),background:D(A,"terminal.background")}}(o):{color:o.foreground,background:o.background};if(function(A){return"annotations"in A}(g)){return{lines:XB(s,(null==g?void 0:g.annotations)||[]),lang:I,style:e}}return{lines:s,lang:I,style:e}}async function gQ(A,B,Q){if(!Q)return{code:A,annotations:[]};await LB([B]);const{grammar:g}=HB(B),{newCode:E,annotations:C}=xB(A,g,B,Q);return{code:E,annotations:C}}async function EQ(A){if(!A)throw new Error("Syntax highlighter error: undefined theme");await AQ([],A);return a(i(A))}function CQ(A){if(!A)throw new Error("Syntax highlighter error: undefined theme");return a(i(A))}export{F as LANG_NAMES,M as THEME_NAMES,kB as UnknownLanguageError,h as UnknownThemeError,gQ as extractAnnotations,EQ as getThemeColors,CQ as getThemeColorsSync,BQ as highlight,QQ as highlightSync,AQ as preload}; +async function A(A,B){throw new Error("no fs")}async function B(A){const B=await fetch(`https://lighter.codehike.org/${A}.json`);return await B.json()}const Q=A=>/^#([A-Fa-f0-9]{3,4}){1,2}$/.test(A),g=(A,B)=>A.match(new RegExp(`.{${B}}`,"g")),E=A=>parseInt(A.repeat(2/A.length),16);function C(A,B){return void 0!==A?A/255:"number"!=typeof B||B<0||B>1?1:B}function I(A,B){if(!A)return A;const{r:I,g:D,b:w,a:o}=function(A){if(!A)return;if(!Q(A))throw new Error("Invalid color string, must be a valid hex color");const B=Math.floor((A.length-1)/3),I=g(A.slice(1),B),[D,w,o,s]=I.map(E);return{r:D,g:w,b:o,a:C(s,1)}}(A);return function(A){if(!A)return;const{r:B,g:Q,b:g,a:E}=A,C=Math.round(255*E);return`#${B.toString(16).padStart(2,"0")}${Q.toString(16).padStart(2,"0")}${g.toString(16).padStart(2,"0")}${C.toString(16).padStart(2,"0")}`}({r:I,g:D,b:w,a:o*B})}function D(A,B){const Q=A.colors||{};if(Q[B])return Q[B];const g=o[B];if(!g)throw new Error(`Unknown theme color key: ${B}`);return"string"==typeof g?D(A,g):function(A,B){const Q=B[A.type];if(Array.isArray(Q)){const[B,g,...E]=Q;return B(D(A,g),...E)}return Q}(A,g)}const w="#6FC3DF",o={"editor.foreground":{dark:"#bbbbbb",light:"#333333",hc:"#ffffff"},"editorLineNumber.foreground":{dark:"#858585",light:"#237893",hc:"#fffffe"},"editor.selectionBackground":{light:"#ADD6FF",dark:"#264F78",hc:"#f3f518"},"editor.background":{light:"#fffffe",dark:"#1E1E1E",hc:"#000000"},"editorGroupHeader.tabsBackground":{dark:"#252526",light:"#F3F3F3"},"tab.activeBackground":"editor.background","tab.activeForeground":{dark:"#ffffff",light:"#333333",hc:"#ffffff"},"tab.border":{dark:"#252526",light:"#F3F3F3",hc:w},"tab.activeBorder":"tab.activeBackground","tab.inactiveBackground":{dark:"#2D2D2D",light:"#ECECEC"},"tab.inactiveForeground":{dark:[I,"tab.activeForeground",.5],light:[I,"tab.activeForeground",.5],hc:"#ffffff"},"diffEditor.insertedTextBackground":{dark:"#9ccc2c33",light:"#9ccc2c40"},"diffEditor.removedTextBackground":{dark:"#ff000033",light:"#ff000033"},"diffEditor.insertedLineBackground":{dark:"#9bb95533",light:"#9bb95533"},"diffEditor.removedLineBackground":{dark:"#ff000033",light:"#ff000033"},"icon.foreground":{dark:"#C5C5C5",light:"#424242",hc:"#FFFFFF"},"sideBar.background":{dark:"#252526",light:"#F3F3F3",hc:"#000000"},"sideBar.foreground":"editor.foreground","sideBar.border":"sideBar.background","list.inactiveSelectionBackground":{dark:"#37373D",light:"#E4E6F1"},"list.inactiveSelectionForeground":{},"list.hoverBackground":{dark:"#2A2D2E",light:"#F0F0F0"},"list.hoverForeground":{},"editorGroupHeader.tabsBorder":{hc:w},"tab.activeBorderTop":{hc:w},"tab.hoverBackground":"tab.inactiveBackground","tab.hoverForeground":"tab.inactiveForeground","editor.rangeHighlightBackground":{dark:"#ffffff0b",light:"#fdff0033"},"editor.infoForeground":{dark:"#3794FF",light:"#1a85ff",hc:"#3794FF"},"input.border":{hc:w},"input.background":{dark:"#3C3C3C",light:"#fffffe",hc:"#000000"},"input.foreground":"editor.foreground","editor.lineHighlightBackground":{},focusBorder:{light:"#0090F1",dark:"#007FD4",hc:w},"editorGroup.border":{dark:"#444444",light:"#E7E7E7",hc:w},"list.activeSelectionBackground":{dark:"#094771",light:"#0060C0",hc:"#000000"},"list.activeSelectionForeground":{dark:"#fffffe",light:"#fffffe",hc:"#fffffe"},"lighter.inlineBackground":{dark:[I,"editor.background",.9],light:[I,"editor.background",.9]},"terminal.background":"editor.background","terminal.foreground":"editor.foreground","terminal.ansiBlack":{dark:"#000000",light:"#000000",hc:"#000000"},"terminal.ansiRed":{dark:"#cd3131",light:"#cd3131",hc:"#cd0000"},"terminal.ansiGreen":{dark:"#0DBC79",light:"#00BC00",hc:"#00cd00"},"terminal.ansiYellow":{dark:"#e5e510",light:"#949800",hc:"#cdcd00"},"terminal.ansiBlue":{dark:"#2472c8",light:"#0451a5",hc:"#0000ee"},"terminal.ansiMagenta":{dark:"#bc3fbc",light:"#bc05bc",hc:"#cd00cd"},"terminal.ansiCyan":{dark:"#11a8cd",light:"#0598bc",hc:"#00cdcd"},"terminal.ansiWhite":{dark:"#e5e5e5",light:"#555555",hc:"#e5e5e5"},"terminal.ansiBrightBlack":{dark:"#666666",light:"#666666",hc:"#7f7f7f"},"terminal.ansiBrightRed":{dark:"#f14c4c",light:"#cd3131",hc:"#ff0000"},"terminal.ansiBrightGreen":{dark:"#23d18b",light:"#14CE14",hc:"#00ff00"},"terminal.ansiBrightYellow":{dark:"#f5f543",light:"#b5ba00",hc:"#ffff00"},"terminal.ansiBrightBlue":{dark:"#3b8eea",light:"#0451a5",hc:"#5c5cff"},"terminal.ansiBrightMagenta":{dark:"#d670d6",light:"#bc05bc",hc:"#ff00ff"},"terminal.ansiBrightCyan":{dark:"#29b8db",light:"#0598bc",hc:"#00ffff"},"terminal.ansiBrightWhite":{dark:"#e5e5e5",light:"#a5a5a5",hc:"#ffffff"}},s=new Map,e=new Map;async function c(Q){if("string"==typeof Q){const g=Q;if(!M.includes(g))throw new h(g);if(!s.has(g)){const Q=async function(Q){try{return await A()}catch(A){return await B(`themes/${Q}`)}}(g).then((A=>(e.set(g,A),A)));s.set(g,Q)}return s.get(g)}return Q}function i(A){let B=null;if("string"==typeof A){if(B=e.get(A),!B)throw new Error("Syntax highlighting error: theme not loaded")}else B=A;return function(A){if(!A)return;const B=A.settings||A.tokenColors||[],Q={name:A.name||"unknown-theme",type:t(A),foreground:"",background:"",settings:B,colors:A.colors||{},colorNames:A.colorNames},g=B.find((A=>!A.scope));if(g){const{foreground:A,background:B}=(null==g?void 0:g.settings)||{},E={};A&&!Q.colors["editor.foreground"]&&(E["editor.foreground"]=A),B&&!Q.colors["editor.background"]&&(E["editor.background"]=B),Object.keys(E).length>0&&(Q.colors=Object.assign(Object.assign({},Q.colors),E)),Q.foreground=A,Q.background=B}g||(Q.settings=[{settings:{foreground:D(Q,"editor.foreground"),background:D(Q,"editor.background")}},...Q.settings]);if(Q.background=Q.background||D(Q,"editor.background"),Q.foreground=Q.foreground||D(Q,"editor.foreground"),"from-css"===A.type&&!Q.colorNames){const A={};let B=0;Q.settings=Q.settings.map((Q=>{const g=Object.assign(Object.assign({},Q),{settings:Object.assign({},Q.settings)}),{foreground:E,background:C}=g.settings||{};return E&&!A[E]&&(A[E]=`#${B.toString(16).padStart(6,"0")}`,B++),C&&!A[C]&&(A[C]=`#${B.toString(16).padStart(6,"0")}`,B++),E&&(g.settings.foreground=A[E]),C&&(g.settings.background=A[C]),g})),Q.colorNames=A}return Q}(B)}function t(A){var B;if("from-css"===A.type)return"from-css";return"light"===(A.type?A.type:(null===(B=A.name)||void 0===B?void 0:B.toLowerCase().includes("light"))?"light":"dark")?"light":"dark"}const M=["dark-plus","dracula-soft","dracula","github-dark","github-dark-dimmed","github-from-css","github-light","light-plus","material-darker","material-default","material-from-css","material-lighter","material-ocean","material-palenight","min-dark","min-light","monokai","nord","one-dark-pro","poimandres","slack-dark","slack-ochin","solarized-dark","solarized-light"];class h extends Error{constructor(A){super(`Unknown theme: ${A}`),this.theme=A}}function a(A){const B=B=>"colorScheme"===B?function(A){return"from-css"===A.type?"var(--ch-0)":A.type}(A):"foreground"===B?A.foreground:"background"===B?A.background:D(A,B);return{colorScheme:B("colorScheme"),foreground:B("foreground"),background:B("background"),lighter:{inlineBackground:B("lighter.inlineBackground")},editor:{background:B("editor.background"),foreground:B("editor.foreground"),lineHighlightBackground:B("editor.lineHighlightBackground"),rangeHighlightBackground:B("editor.rangeHighlightBackground"),infoForeground:B("editor.infoForeground"),selectionBackground:B("editor.selectionBackground")},focusBorder:B("focusBorder"),tab:{activeBackground:B("tab.activeBackground"),activeForeground:B("tab.activeForeground"),inactiveBackground:B("tab.inactiveBackground"),inactiveForeground:B("tab.inactiveForeground"),border:B("tab.border"),activeBorder:B("tab.activeBorder"),activeBorderTop:B("tab.activeBorderTop")},editorGroup:{border:B("editorGroup.border")},editorGroupHeader:{tabsBackground:B("editorGroupHeader.tabsBackground")},editorLineNumber:{foreground:B("editorLineNumber.foreground")},input:{background:B("input.background"),foreground:B("input.foreground"),border:B("input.border")},icon:{foreground:B("icon.foreground")},sideBar:{background:B("sideBar.background"),foreground:B("sideBar.foreground"),border:B("sideBar.border")},list:{activeSelectionBackground:B("list.activeSelectionBackground"),activeSelectionForeground:B("list.activeSelectionForeground"),hoverBackground:B("list.hoverBackground"),hoverForeground:B("list.hoverForeground")}}}const F=["abap","actionscript-3","ada","apache","apex","apl","applescript","ara","asm","astro","awk","ballerina","bash","bat","batch","be","beancount","berry","bibtex","bicep","blade","c","c#","cadence","cdc","clarity","clj","clojure","cmake","cmd","cobol","codeql","coffee","console","cpp","crystal","cs","csharp","css","cue","cypher","d","dart","dax","diff","docker","dockerfile","dream-maker","elixir","elm","erb","erl","erlang","f#","fish","fs","fsharp","fsl","gdresource","gdscript","gdshader","gherkin","git-commit","git-rebase","glimmer-js","glimmer-ts","glsl","gnuplot","go","graphql","groovy","hack","haml","handlebars","haskell","hbs","hcl","hjson","hlsl","hs","html","http","imba","ini","jade","java","javascript","jinja-html","jison","js","json","json5","jsonc","jsonl","jsonnet","jssm","jsx","julia","kotlin","kql","kusto","latex","less","liquid","lisp","logo","lua","make","makefile","markdown","marko","matlab","md","mdx","mermaid","narrat","nextflow","nginx","nim","nix","objc","objective-c","objective-cpp","ocaml","pascal","perl","perl6","php","plsql","postcss","powerquery","powershell","prisma","prolog","properties","proto","ps","ps1","pug","puppet","purescript","py","python","ql","r","raku","razor","rb","reg","rel","riscv","rs","rst","ruby","rust","sas","sass","scala","scheme","scss","sh","shader","shaderlab","shell","shellscript","shellsession","smalltalk","solidity","sparql","sql","ssh-config","stata","styl","stylus","svelte","swift","system-verilog","tasl","tcl","terminal","tex","text","toml","ts","tsx","turtle","twig","txt","typescript","v","vb","verilog","vhdl","vim","viml","vimscript","vue","vue-html","vyper","wasm","wenyan","wgsl","wolfram","xml","xsl","yaml","yml","zenscript","zsh","文言"],G={abap:"source.abap","actionscript-3":"source.actionscript.3",ada:"source.ada",apache:"source.apacheconf",apex:"source.apex",apl:"source.apl",applescript:"source.applescript",ara:"source.ara",asm:"source.asm.x86_64",astro:"source.astro",awk:"source.awk",ballerina:"source.ballerina",bat:"source.batchfile",batch:"source.batchfile",beancount:"text.beancount",berry:"source.berry",be:"source.berry",bibtex:"text.bibtex",bicep:"source.bicep",blade:"text.html.php.blade",c:"source.c",cadence:"source.cadence",cdc:"source.cadence",clarity:"source.clar",clojure:"source.clojure",clj:"source.clojure",cmake:"source.cmake",cobol:"source.cobol",codeql:"source.ql",ql:"source.ql",coffee:"source.coffee",cpp:"source.cpp",crystal:"source.crystal",csharp:"source.cs","c#":"source.cs",cs:"source.cs",css:"source.css",cue:"source.cue",cypher:"source.cypher",d:"source.d",dart:"source.dart",dax:"source.dax",diff:"source.diff",docker:"source.dockerfile",dockerfile:"source.dockerfile","dream-maker":"source.dm",elixir:"source.elixir",elm:"source.elm",erb:"text.html.erb",erlang:"source.erlang",erl:"source.erlang",fish:"source.fish",fsharp:"source.fsharp","f#":"source.fsharp",fs:"source.fsharp",gdresource:"source.gdresource",gdscript:"source.gdscript",gdshader:"source.gdshader",gherkin:"text.gherkin.feature","git-commit":"text.git-commit","git-rebase":"text.git-rebase","glimmer-js":"source.gjs","glimmer-ts":"source.gts",glsl:"source.glsl",gnuplot:"source.gnuplot",go:"source.go",graphql:"source.graphql",groovy:"source.groovy",hack:"source.hack",haml:"text.haml",handlebars:"text.html.handlebars",hbs:"text.html.handlebars",haskell:"source.haskell",hs:"source.haskell",hcl:"source.hcl",hjson:"source.hjson",hlsl:"source.hlsl",html:"text.html.basic",http:"source.http",imba:"source.imba",ini:"source.ini",properties:"source.ini",java:"source.java",javascript:"source.js",js:"source.js","jinja-html":"text.html.jinja",jison:"source.jison",json:"source.json",json5:"source.json5",jsonc:"source.json.comments",jsonl:"source.json.lines",jsonnet:"source.jsonnet",jssm:"source.jssm",fsl:"source.jssm",jsx:"source.js.jsx",julia:"source.julia",kotlin:"source.kotlin",kusto:"source.kusto",kql:"source.kusto",latex:"text.tex.latex",less:"source.css.less",liquid:"text.html.liquid",lisp:"source.lisp",logo:"source.logo",lua:"source.lua",make:"source.makefile",makefile:"source.makefile",markdown:"text.html.markdown",md:"text.html.markdown",marko:"text.marko",matlab:"source.matlab",mdx:"source.mdx",mermaid:"source.mermaid",narrat:"source.narrat",nextflow:"source.nextflow",nginx:"source.nginx",nim:"source.nim",nix:"source.nix","objective-c":"source.objc",objc:"source.objc","objective-cpp":"source.objcpp",ocaml:"source.ocaml",pascal:"source.pascal",perl:"source.perl",php:"source.php",plsql:"source.plsql.oracle",postcss:"source.css.postcss",powerquery:"source.powerquery",powershell:"source.powershell",ps:"source.powershell",ps1:"source.powershell",prisma:"source.prisma",prolog:"source.prolog",proto:"source.proto",pug:"text.pug",jade:"text.pug",puppet:"source.puppet",purescript:"source.purescript",python:"source.python",py:"source.python",r:"source.r",raku:"source.perl.6",perl6:"source.perl.6",razor:"text.aspnetcorerazor",reg:"source.reg",rel:"source.rel",riscv:"source.riscv",rst:"source.rst",ruby:"source.ruby",rb:"source.ruby",rust:"source.rust",rs:"source.rust",sas:"source.sas",sass:"source.sass",scala:"source.scala",scheme:"source.scheme",scss:"source.css.scss",shaderlab:"source.shaderlab",shader:"source.shaderlab",shellscript:"source.shell",bash:"source.shell",console:"source.shell",sh:"source.shell",shell:"source.shell",zsh:"source.shell",shellsession:"text.shell-session",smalltalk:"source.smalltalk",solidity:"source.solidity",sparql:"source.sparql",sql:"source.sql","ssh-config":"source.ssh-config",stata:"source.stata",stylus:"source.stylus",styl:"source.stylus",svelte:"source.svelte",swift:"source.swift","system-verilog":"source.systemverilog",tasl:"source.tasl",tcl:"source.tcl",tex:"text.tex",toml:"source.toml",tsx:"source.tsx",turtle:"source.turtle",twig:"text.html.twig",txt:"source.txt",typescript:"source.ts",ts:"source.ts",v:"source.v",vb:"source.asp.vb.net",cmd:"source.asp.vb.net",verilog:"source.verilog",vhdl:"source.vhdl",viml:"source.viml",vim:"source.viml",vimscript:"source.viml","vue-html":"text.html.vue-html",vue:"source.vue",vyper:"source.vyper",wasm:"source.wat",wenyan:"source.wenyan","文言":"source.wenyan",wgsl:"source.wgsl",wolfram:"source.wolfram",xml:"text.xml",xsl:"text.xml.xsl",yaml:"source.yaml",yml:"source.yaml",zenscript:"source.zenscript"},n={"source.abap":{id:"abap",path:"abap.tmLanguage.json",embeddedScopes:[]},"source.actionscript.3":{id:"actionscript-3",path:"actionscript-3.tmLanguage.json",embeddedScopes:[]},"source.ada":{id:"ada",path:"ada.tmLanguage.json",embeddedScopes:[]},"source.apacheconf":{id:"apache",path:"apache.tmLanguage.json",embeddedScopes:[]},"source.apex":{id:"apex",path:"apex.tmLanguage.json",embeddedScopes:[]},"source.apl":{id:"apl",path:"apl.tmLanguage.json",embeddedScopes:["source.java","source.json","source.js","source.css","text.xml","text.html.basic"]},"source.applescript":{id:"applescript",path:"applescript.tmLanguage.json",embeddedScopes:[]},"source.ara":{id:"ara",path:"ara.tmLanguage.json",embeddedScopes:[]},"source.asm.x86_64":{id:"asm",path:"asm.tmLanguage.json",embeddedScopes:[]},"source.astro":{id:"astro",path:"astro.tmLanguage.json",embeddedScopes:["source.tsx","source.css.postcss","source.css.less","source.css.scss","source.css","source.sass","source.stylus","source.ts","source.js","source.json"]},"source.awk":{id:"awk",path:"awk.tmLanguage.json",embeddedScopes:[]},"source.ballerina":{id:"ballerina",path:"ballerina.tmLanguage.json",embeddedScopes:[]},"source.batchfile":{id:"bat",path:"bat.tmLanguage.json",embeddedScopes:[]},"text.beancount":{id:"beancount",path:"beancount.tmLanguage.json",embeddedScopes:[]},"source.berry":{id:"berry",path:"berry.tmLanguage.json",embeddedScopes:[]},"text.bibtex":{id:"bibtex",path:"bibtex.tmLanguage.json",embeddedScopes:[]},"source.bicep":{id:"bicep",path:"bicep.tmLanguage.json",embeddedScopes:[]},"text.html.php.blade":{id:"blade",path:"blade.tmLanguage.json",embeddedScopes:["source.java","source.css","source.json","source.js","source.sql","text.xml","text.html.basic"]},"source.c":{id:"c",path:"c.tmLanguage.json",embeddedScopes:[]},"source.cadence":{id:"cadence",path:"cadence.tmLanguage.json",embeddedScopes:[]},"source.clar":{id:"clarity",path:"clarity.tmLanguage.json",embeddedScopes:[]},"source.clojure":{id:"clojure",path:"clojure.tmLanguage.json",embeddedScopes:[]},"source.cmake":{id:"cmake",path:"cmake.tmLanguage.json",embeddedScopes:[]},"source.cobol":{id:"cobol",path:"cobol.tmLanguage.json",embeddedScopes:["source.css","source.js","source.java","text.html.basic","source.sql"]},"source.ql":{id:"codeql",path:"codeql.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.stylus","source.sass","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.tsx","source.ts","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.css.scss","source.swift","source.objc","source.css.less","source.json.comments","source.json","source.js","text.pug","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.coffee","source.clojure","source.batchfile","source.yaml","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","text.html.basic","source.css","text.html.markdown"]},"source.coffee":{id:"coffee",path:"coffee.tmLanguage.json",embeddedScopes:["source.js"]},"source.cpp":{id:"cpp",path:"cpp.tmLanguage.json",embeddedScopes:["source.c","source.sql","source.glsl"]},"source.crystal":{id:"crystal",path:"crystal.tmLanguage.json",embeddedScopes:["source.shell","source.js","source.c","source.css","source.sql","text.html.basic"]},"source.cs":{id:"csharp",path:"csharp.tmLanguage.json",embeddedScopes:[]},"source.css":{id:"css",path:"css.tmLanguage.json",embeddedScopes:[]},"source.cue":{id:"cue",path:"cue.tmLanguage.json",embeddedScopes:[]},"source.cypher":{id:"cypher",path:"cypher.tmLanguage.json",embeddedScopes:[]},"source.d":{id:"d",path:"d.tmLanguage.json",embeddedScopes:[]},"source.dart":{id:"dart",path:"dart.tmLanguage.json",embeddedScopes:[]},"source.dax":{id:"dax",path:"dax.tmLanguage.json",embeddedScopes:[]},"source.diff":{id:"diff",path:"diff.tmLanguage.json",embeddedScopes:[]},"source.dockerfile":{id:"docker",path:"docker.tmLanguage.json",embeddedScopes:[]},"source.dm":{id:"dream-maker",path:"dream-maker.tmLanguage.json",embeddedScopes:[]},"source.elixir":{id:"elixir",path:"elixir.tmLanguage.json",embeddedScopes:["source.css","source.js","text.html.basic"]},"source.elm":{id:"elm",path:"elm.tmLanguage.json",embeddedScopes:["source.c","source.glsl"]},"text.html.erb":{id:"erb",path:"erb.tmLanguage.json",embeddedScopes:["source.java","source.lua","source.shell","source.c","source.sql","text.xml","source.css","source.js","source.ruby","text.html.basic"]},"source.erlang":{id:"erlang",path:"erlang.tmLanguage.json",embeddedScopes:[]},"source.fish":{id:"fish",path:"fish.tmLanguage.json",embeddedScopes:[]},"source.fsharp":{id:"fsharp",path:"fsharp.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.stylus","source.sass","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.cs","source.tsx","source.ts","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.css.scss","source.swift","source.objc","source.css.less","source.json.comments","source.json","source.js","text.pug","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.coffee","source.clojure","source.batchfile","source.yaml","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","text.html.basic","source.css","text.html.markdown"]},"source.gdresource":{id:"gdresource",path:"gdresource.tmLanguage.json",embeddedScopes:["source.gdscript","source.gdshader"]},"source.gdscript":{id:"gdscript",path:"gdscript.tmLanguage.json",embeddedScopes:[]},"source.gdshader":{id:"gdshader",path:"gdshader.tmLanguage.json",embeddedScopes:[]},"text.gherkin.feature":{id:"gherkin",path:"gherkin.tmLanguage.json",embeddedScopes:[]},"text.git-commit":{id:"git-commit",path:"git-commit.tmLanguage.json",embeddedScopes:["source.diff"]},"text.git-rebase":{id:"git-rebase",path:"git-rebase.tmLanguage.json",embeddedScopes:["source.shell"]},"source.gjs":{id:"glimmer-js",path:"glimmer-js.tmLanguage.json",embeddedScopes:["source.yaml","source.css","text.html.basic","text.html.handlebars","source.js"]},"source.gts":{id:"glimmer-ts",path:"glimmer-ts.tmLanguage.json",embeddedScopes:["source.yaml","source.js","source.css","text.html.basic","text.html.handlebars","source.ts"]},"source.glsl":{id:"glsl",path:"glsl.tmLanguage.json",embeddedScopes:["source.c"]},"source.gnuplot":{id:"gnuplot",path:"gnuplot.tmLanguage.json",embeddedScopes:[]},"source.go":{id:"go",path:"go.tmLanguage.json",embeddedScopes:[]},"source.graphql":{id:"graphql",path:"graphql.tmLanguage.json",embeddedScopes:["source.tsx","source.js.jsx","source.ts","source.js"]},"source.groovy":{id:"groovy",path:"groovy.tmLanguage.json",embeddedScopes:[]},"source.hack":{id:"hack",path:"hack.tmLanguage.json",embeddedScopes:["source.css","source.js","source.sql","text.html.basic"]},"text.haml":{id:"haml",path:"haml.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.stylus","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.tsx","source.ts","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.css.scss","source.swift","source.objc","source.css.less","source.json.comments","source.json","text.pug","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.clojure","source.batchfile","source.yaml","text.xml.xsl","source.asp.vb.net","source.php","source.r","source.perl","source.makefile","source.java","source.ini","source.lua","source.shell","source.c","source.sql","text.xml","text.html.basic","source.css","text.html.markdown","source.coffee","source.sass","source.js","source.ruby"]},"text.html.handlebars":{id:"handlebars",path:"handlebars.tmLanguage.json",embeddedScopes:["source.yaml","source.js","source.css","text.html.basic"]},"source.haskell":{id:"haskell",path:"haskell.tmLanguage.json",embeddedScopes:[]},"source.hcl":{id:"hcl",path:"hcl.tmLanguage.json",embeddedScopes:[]},"source.hjson":{id:"hjson",path:"hjson.tmLanguage.json",embeddedScopes:[]},"source.hlsl":{id:"hlsl",path:"hlsl.tmLanguage.json",embeddedScopes:[]},"text.html.basic":{id:"html",path:"html.tmLanguage.json",embeddedScopes:["source.css","source.js"]},"source.http":{id:"http",path:"http.tmLanguage.json",embeddedScopes:["source.tsx","source.js.jsx","source.ts","source.js","source.java","source.graphql","text.xml","source.json","source.shell"]},"source.imba":{id:"imba",path:"imba.tmLanguage.json",embeddedScopes:[]},"source.ini":{id:"ini",path:"ini.tmLanguage.json",embeddedScopes:[]},"source.java":{id:"java",path:"java.tmLanguage.json",embeddedScopes:[]},"source.js":{id:"javascript",path:"javascript.tmLanguage.json",embeddedScopes:[]},"text.html.jinja":{id:"jinja-html",path:"jinja-html.tmLanguage.json",embeddedScopes:["source.css","source.js","text.html.basic"]},"source.jison":{id:"jison",path:"jison.tmLanguage.json",embeddedScopes:["source.js"]},"source.json":{id:"json",path:"json.tmLanguage.json",embeddedScopes:[]},"source.json5":{id:"json5",path:"json5.tmLanguage.json",embeddedScopes:[]},"source.json.comments":{id:"jsonc",path:"jsonc.tmLanguage.json",embeddedScopes:[]},"source.json.lines":{id:"jsonl",path:"jsonl.tmLanguage.json",embeddedScopes:[]},"source.jsonnet":{id:"jsonnet",path:"jsonnet.tmLanguage.json",embeddedScopes:[]},"source.jssm":{id:"jssm",path:"jssm.tmLanguage.json",embeddedScopes:[]},"source.js.jsx":{id:"jsx",path:"jsx.tmLanguage.json",embeddedScopes:[]},"source.julia":{id:"julia",path:"julia.tmLanguage.json",embeddedScopes:["source.c","source.glsl","source.sql","source.r","source.js","source.python","source.cpp"]},"source.kotlin":{id:"kotlin",path:"kotlin.tmLanguage.json",embeddedScopes:[]},"source.kusto":{id:"kusto",path:"kusto.tmLanguage.json",embeddedScopes:[]},"text.tex.latex":{id:"latex",path:"latex.tmLanguage.json",embeddedScopes:["source.glsl","source.shell","source.sql","source.cpp","source.c","source.r","source.gnuplot","source.scala","source.rust","source.yaml","source.python","source.ts","source.js","source.ruby","source.julia","source.lua","source.java","text.xml","text.html.basic","source.haskell","source.css","text.tex"]},"source.css.less":{id:"less",path:"less.tmLanguage.json",embeddedScopes:["source.css"]},"text.html.liquid":{id:"liquid",path:"liquid.tmLanguage.json",embeddedScopes:["source.js","source.json","source.css","text.html.basic"]},"source.lisp":{id:"lisp",path:"lisp.tmLanguage.json",embeddedScopes:[]},"source.logo":{id:"logo",path:"logo.tmLanguage.json",embeddedScopes:[]},"source.lua":{id:"lua",path:"lua.tmLanguage.json",embeddedScopes:["source.c"]},"source.makefile":{id:"make",path:"make.tmLanguage.json",embeddedScopes:[]},"text.html.markdown":{id:"markdown",path:"markdown.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.stylus","source.sass","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.tsx","source.ts","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.css.scss","source.swift","source.objc","source.css.less","source.json.comments","source.json","source.js","text.pug","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.coffee","source.clojure","source.batchfile","source.yaml","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","text.html.basic","source.css"]},"text.marko":{id:"marko",path:"marko.tmLanguage.json",embeddedScopes:["source.js","source.css.scss","source.css.less","source.css"]},"source.matlab":{id:"matlab",path:"matlab.tmLanguage.json",embeddedScopes:[]},"source.mdx":{id:"mdx",path:"mdx.tmLanguage.json",embeddedScopes:["source.gnuplot","text.tex","source.stylus","source.sass","text.bibtex","text.tex.latex","text.html.handlebars","source.dart","source.fsharp","source.powershell","source.perl.6","source.json.comments","text.pug","source.groovy","text.git-rebase","text.git-commit","source.batchfile","text.xml.xsl","source.asp.vb.net","source.php","source.js.jsx","source.glsl","source.ts","source.swift","text.xml","source.sql","text.shell-session","source.shell","source.css.scss","source.scala","source.rust","source.ruby","source.r","source.python","source.perl","source.objc","text.html.markdown","source.makefile","source.lua","source.css.less","source.kotlin","source.julia","source.json","source.js","source.java","source.ini","text.html.basic","source.haskell","source.graphql","source.go","source.erlang","source.elm","source.elixir","source.dockerfile","source.diff","source.css","source.cs","source.cpp","source.coffee","source.clojure","source.c","source.yaml","source.toml","source.tsx"]},"source.mermaid":{id:"mermaid",path:"mermaid.tmLanguage.json",embeddedScopes:[]},"source.narrat":{id:"narrat",path:"narrat.tmLanguage.json",embeddedScopes:[]},"source.nextflow":{id:"nextflow",path:"nextflow.tmLanguage.json",embeddedScopes:[]},"source.nginx":{id:"nginx",path:"nginx.tmLanguage.json",embeddedScopes:["source.c","source.lua"]},"source.nim":{id:"nim",path:"nim.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.stylus","source.sass","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.tsx","source.ts","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.css.scss","source.swift","source.objc","source.css.less","source.json.comments","source.json","text.pug","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.coffee","source.clojure","source.batchfile","source.yaml","text.xml.xsl","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.ini","source.java","text.html.markdown","source.glsl","source.css","source.js","text.xml","text.html.basic","source.c"]},"source.nix":{id:"nix",path:"nix.tmLanguage.json",embeddedScopes:[]},"source.objc":{id:"objective-c",path:"objective-c.tmLanguage.json",embeddedScopes:[]},"source.objcpp":{id:"objective-cpp",path:"objective-cpp.tmLanguage.json",embeddedScopes:[]},"source.ocaml":{id:"ocaml",path:"ocaml.tmLanguage.json",embeddedScopes:[]},"source.pascal":{id:"pascal",path:"pascal.tmLanguage.json",embeddedScopes:[]},"source.perl":{id:"perl",path:"perl.tmLanguage.json",embeddedScopes:["source.java","source.sql","source.js","source.css","text.xml","text.html.basic"]},"source.php":{id:"php",path:"php.tmLanguage.json",embeddedScopes:["source.java","source.css","source.json","source.js","source.sql","text.xml","text.html.basic"]},"source.plsql.oracle":{id:"plsql",path:"plsql.tmLanguage.json",embeddedScopes:[]},"source.css.postcss":{id:"postcss",path:"postcss.tmLanguage.json",embeddedScopes:[]},"source.powerquery":{id:"powerquery",path:"powerquery.tmLanguage.json",embeddedScopes:[]},"source.powershell":{id:"powershell",path:"powershell.tmLanguage.json",embeddedScopes:[]},"source.prisma":{id:"prisma",path:"prisma.tmLanguage.json",embeddedScopes:[]},"source.prolog":{id:"prolog",path:"prolog.tmLanguage.json",embeddedScopes:[]},"source.proto":{id:"proto",path:"proto.tmLanguage.json",embeddedScopes:[]},"text.pug":{id:"pug",path:"pug.tmLanguage.json",embeddedScopes:["text.html.basic","source.coffee","source.stylus","source.css.scss","source.sass","source.css","source.js"]},"source.puppet":{id:"puppet",path:"puppet.tmLanguage.json",embeddedScopes:[]},"source.purescript":{id:"purescript",path:"purescript.tmLanguage.json",embeddedScopes:[]},"source.python":{id:"python",path:"python.tmLanguage.json",embeddedScopes:[]},"source.r":{id:"r",path:"r.tmLanguage.json",embeddedScopes:[]},"source.perl.6":{id:"raku",path:"raku.tmLanguage.json",embeddedScopes:[]},"text.aspnetcorerazor":{id:"razor",path:"razor.tmLanguage.json",embeddedScopes:["source.css","source.js","source.cs","text.html.basic"]},"source.reg":{id:"reg",path:"reg.tmLanguage.json",embeddedScopes:[]},"source.rel":{id:"rel",path:"rel.tmLanguage.json",embeddedScopes:[]},"source.riscv":{id:"riscv",path:"riscv.tmLanguage.json",embeddedScopes:[]},"source.rst":{id:"rst",path:"rst.tmLanguage.json",embeddedScopes:["source.java","source.lua","source.c","source.css","text.xml","text.html.basic","source.sql","source.glsl","source.ruby","source.cmake","source.yaml","source.shell","source.js","source.python","source.cpp"]},"source.ruby":{id:"ruby",path:"ruby.tmLanguage.json",embeddedScopes:["source.java","source.lua","source.shell","source.js","source.c","source.css","source.sql","text.xml","text.html.basic"]},"source.rust":{id:"rust",path:"rust.tmLanguage.json",embeddedScopes:[]},"source.sas":{id:"sas",path:"sas.tmLanguage.json",embeddedScopes:["source.sql"]},"source.sass":{id:"sass",path:"sass.tmLanguage.json",embeddedScopes:[]},"source.scala":{id:"scala",path:"scala.tmLanguage.json",embeddedScopes:[]},"source.scheme":{id:"scheme",path:"scheme.tmLanguage.json",embeddedScopes:[]},"source.css.scss":{id:"scss",path:"scss.tmLanguage.json",embeddedScopes:["source.css"]},"source.shaderlab":{id:"shaderlab",path:"shaderlab.tmLanguage.json",embeddedScopes:["source.hlsl"]},"source.shell":{id:"shellscript",path:"shellscript.tmLanguage.json",embeddedScopes:[]},"text.shell-session":{id:"shellsession",path:"shellsession.tmLanguage.json",embeddedScopes:["source.shell"]},"source.smalltalk":{id:"smalltalk",path:"smalltalk.tmLanguage.json",embeddedScopes:[]},"source.solidity":{id:"solidity",path:"solidity.tmLanguage.json",embeddedScopes:[]},"source.sparql":{id:"sparql",path:"sparql.tmLanguage.json",embeddedScopes:["source.turtle"]},"source.sql":{id:"sql",path:"sql.tmLanguage.json",embeddedScopes:[]},"source.ssh-config":{id:"ssh-config",path:"ssh-config.tmLanguage.json",embeddedScopes:[]},"source.stata":{id:"stata",path:"stata.tmLanguage.json",embeddedScopes:["source.sql"]},"source.stylus":{id:"stylus",path:"stylus.tmLanguage.json",embeddedScopes:[]},"source.svelte":{id:"svelte",path:"svelte.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.tsx","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.swift","source.objc","source.json.comments","source.json","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.clojure","source.batchfile","source.yaml","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","text.html.basic","text.html.markdown","text.pug","source.css.postcss","source.css.less","source.css.scss","source.css","source.sass","source.stylus","source.coffee","source.ts","source.js"]},"source.swift":{id:"swift",path:"swift.tmLanguage.json",embeddedScopes:[]},"source.systemverilog":{id:"system-verilog",path:"system-verilog.tmLanguage.json",embeddedScopes:[]},"source.tasl":{id:"tasl",path:"tasl.tmLanguage.json",embeddedScopes:[]},"source.tcl":{id:"tcl",path:"tcl.tmLanguage.json",embeddedScopes:[]},"text.tex":{id:"tex",path:"tex.tmLanguage.json",embeddedScopes:["source.r"]},"source.toml":{id:"toml",path:"toml.tmLanguage.json",embeddedScopes:[]},"source.tsx":{id:"tsx",path:"tsx.tmLanguage.json",embeddedScopes:[]},"source.turtle":{id:"turtle",path:"turtle.tmLanguage.json",embeddedScopes:[]},"text.html.twig":{id:"twig",path:"twig.tmLanguage.json",embeddedScopes:["source.java","source.lua","source.shell","source.c","source.json","source.sql","text.xml","text.html.basic","source.ruby","source.python","source.php","source.js","source.css"]},"source.txt":{id:"txt",path:"txt.tmLanguage.json",embeddedScopes:[]},"source.ts":{id:"typescript",path:"typescript.tmLanguage.json",embeddedScopes:[]},"source.v":{id:"v",path:"v.tmLanguage.json",embeddedScopes:[]},"source.asp.vb.net":{id:"vb",path:"vb.tmLanguage.json",embeddedScopes:[]},"source.verilog":{id:"verilog",path:"verilog.tmLanguage.json",embeddedScopes:[]},"source.vhdl":{id:"vhdl",path:"vhdl.tmLanguage.json",embeddedScopes:[]},"source.viml":{id:"viml",path:"viml.tmLanguage.json",embeddedScopes:[]},"text.html.vue-html":{id:"vue-html",path:"vue-html.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.swift","source.objc","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.coffee","source.clojure","source.batchfile","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","source.graphql","source.toml","source.yaml","source.json5","source.json.comments","source.json","source.tsx","source.js.jsx","source.ts","source.css.less","source.css.scss","source.css","source.sass","source.stylus","text.pug","text.html.markdown","text.html.basic","source.js","source.vue"]},"source.vue":{id:"vue",path:"vue.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.swift","source.objc","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.coffee","source.clojure","source.batchfile","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","source.graphql","source.toml","source.yaml","source.json5","source.json.comments","source.json","source.tsx","source.js.jsx","source.ts","source.js","source.css.less","source.css.scss","source.css","source.sass","source.stylus","text.pug","text.html.markdown","text.html.basic"]},"source.vyper":{id:"vyper",path:"vyper.tmLanguage.json",embeddedScopes:[]},"source.wat":{id:"wasm",path:"wasm.tmLanguage.json",embeddedScopes:[]},"source.wenyan":{id:"wenyan",path:"wenyan.tmLanguage.json",embeddedScopes:[]},"source.wgsl":{id:"wgsl",path:"wgsl.tmLanguage.json",embeddedScopes:[]},"source.wolfram":{id:"wolfram",path:"wolfram.tmLanguage.json",embeddedScopes:[]},"text.xml":{id:"xml",path:"xml.tmLanguage.json",embeddedScopes:["source.java"]},"text.xml.xsl":{id:"xsl",path:"xsl.tmLanguage.json",embeddedScopes:["source.java","text.xml"]},"source.yaml":{id:"yaml",path:"yaml.tmLanguage.json",embeddedScopes:[]},"source.zenscript":{id:"zenscript",path:"zenscript.tmLanguage.json",embeddedScopes:[]}};var r={d:(A,B)=>{for(var Q in B)r.o(B,Q)&&!r.o(A,Q)&&Object.defineProperty(A,Q,{enumerable:!0,get:B[Q]})},o:(A,B)=>Object.prototype.hasOwnProperty.call(A,B)},N={};r.d(N,{_X:()=>XA,Bz:()=>TA,ot:()=>WA,u:()=>bA,jG:()=>K,Pn:()=>vA});const L="undefined"!=typeof process&&!!process.env.VSCODE_TEXTMATE_DEBUG;var H;function k(A,B){const Q=[],g=function(A){let B=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,Q=B.exec(A);return{next:()=>{if(!Q)return null;const g=Q[0];return Q=B.exec(A),g}}}(A);let E=g.next();for(;null!==E;){let A=0;if(2===E.length&&":"===E.charAt(1)){switch(E.charAt(0)){case"R":A=1;break;case"L":A=-1;break;default:console.log(`Unknown priority ${E} in scope selector`)}E=g.next()}let B=I();if(Q.push({matcher:B,priority:A}),","!==E)break;E=g.next()}return Q;function C(){if("-"===E){E=g.next();const A=C();return B=>!!A&&!A(B)}if("("===E){E=g.next();const A=function(){const A=[];let B=I();for(;B&&(A.push(B),"|"===E||","===E);){do{E=g.next()}while("|"===E||","===E);B=I()}return B=>A.some((A=>A(B)))}();return")"===E&&(E=g.next()),A}if(R(E)){const A=[];do{A.push(E),E=g.next()}while(R(E));return Q=>B(A,Q)}return null}function I(){const A=[];let B=C();for(;B;)A.push(B),B=C();return B=>A.every((A=>A(B)))}}function R(A){return!!A&&!!A.match(/[\w\.:]+/)}function K(A){"function"==typeof A.dispose&&A.dispose()}function Y(A){return Array.isArray(A)?function(A){let B=[];for(let Q=0,g=A.length;Q{for(let Q in B)A[Q]=B[Q]})),A}function P(A){const B=~A.lastIndexOf("/")||~A.lastIndexOf("\\");return 0===B?A:~B==A.length-1?P(A.substring(0,A.length-1)):A.substr(1+~B)}!function(A){A.toBinaryStr=function(A){let B=A.toString(2);for(;B.length<32;)B="0"+B;return B},A.print=function(B){const Q=A.getLanguageId(B),g=A.getTokenType(B),E=A.getFontStyle(B),C=A.getForeground(B),I=A.getBackground(B);console.log({languageId:Q,tokenType:g,fontStyle:E,foreground:C,background:I})},A.getLanguageId=function(A){return(255&A)>>>0},A.getTokenType=function(A){return(768&A)>>>8},A.containsBalancedBrackets=function(A){return 0!=(1024&A)},A.getFontStyle=function(A){return(30720&A)>>>11},A.getForeground=function(A){return(16744448&A)>>>15},A.getBackground=function(A){return(4278190080&A)>>>24},A.set=function(B,Q,g,E,C,I,D){let w=A.getLanguageId(B),o=A.getTokenType(B),s=A.containsBalancedBrackets(B)?1:0,e=A.getFontStyle(B),c=A.getForeground(B),i=A.getBackground(B);return 0!==Q&&(w=Q),8!==g&&(o=g),null!==E&&(s=E?1:0),-1!==C&&(e=C),0!==I&&(c=I),0!==D&&(i=D),(w<<0|o<<8|s<<10|e<<11|c<<15|i<<24)>>>0}}(H||(H={}));let u=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g;class J{static hasCaptures(A){return null!==A&&(u.lastIndex=0,u.test(A))}static replaceCaptures(A,B,Q){return A.replace(u,((A,g,E,C)=>{let I=Q[parseInt(g||E,10)];if(!I)return A;{let A=B.substring(I.start,I.end);for(;"."===A[0];)A=A.substring(1);switch(C){case"downcase":return A.toLowerCase();case"upcase":return A.toUpperCase();default:return A}}}))}}function y(A,B){return AB?1:0}function S(A,B){if(null===A&&null===B)return 0;if(!A)return-1;if(!B)return 1;let Q=A.length,g=B.length;if(Q===g){for(let g=0;g`);return}const C=Q.lookup(B);A instanceof f?T({baseGrammar:C,selfGrammar:E},g):W(A.ruleName,{baseGrammar:C,selfGrammar:E,repository:E.repository},g);const I=Q.injections(A.scopeName);if(I)for(const A of I)g.add(new f(A))}function W(A,B,Q){B.repository&&B.repository[A]&&X([B.repository[A]],B,Q)}function T(A,B){A.selfGrammar.patterns&&Array.isArray(A.selfGrammar.patterns)&&X(A.selfGrammar.patterns,{...A,repository:A.selfGrammar.repository},B),A.selfGrammar.injections&&X(Object.values(A.selfGrammar.injections),{...A,repository:A.selfGrammar.repository},B)}function X(A,B,Q){for(const g of A){if(Q.visitedRule.has(g))continue;Q.visitedRule.add(g);const A=g.repository?U({},B.repository,g.repository):B.repository;Array.isArray(g.patterns)&&X(g.patterns,{...B,repository:A},Q);const E=g.include;if(!E)continue;const C=_(E);switch(C.kind){case 0:T({...B,selfGrammar:B.baseGrammar},Q);break;case 1:T(B,Q);break;case 2:W(C.ruleName,{...B,repository:A},Q);break;case 3:case 4:const g=C.scopeName===B.selfGrammar.scopeName?B.selfGrammar:C.scopeName===B.baseGrammar.scopeName?B.baseGrammar:void 0;if(g){const E={baseGrammar:B.baseGrammar,selfGrammar:g,repository:A};4===C.kind?W(C.ruleName,E,Q):T(E,Q)}else 4===C.kind?Q.add(new m(C.scopeName,C.ruleName)):Q.add(new f(C.scopeName))}}}class v{constructor(){this.kind=0}}class Z{constructor(){this.kind=1}}class j{constructor(A){this.ruleName=A,this.kind=2}}class V{constructor(A){this.scopeName=A,this.kind=3}}class z{constructor(A,B){this.scopeName=A,this.ruleName=B,this.kind=4}}function _(A){if("$base"===A)return new v;if("$self"===A)return new Z;const B=A.indexOf("#");if(-1===B)return new V(A);if(0===B)return new j(A.substring(1));{const Q=A.substring(0,B),g=A.substring(B+1);return new z(Q,g)}}const $=/\\(\d+)/,AA=/\\(\d+)/g;class BA{constructor(A,B,Q,g){this.$location=A,this.id=B,this._name=Q||null,this._nameIsCapturing=J.hasCaptures(this._name),this._contentName=g||null,this._contentNameIsCapturing=J.hasCaptures(this._contentName)}get debugName(){const A=this.$location?`${P(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${A}`}getName(A,B){return this._nameIsCapturing&&null!==this._name&&null!==A&&null!==B?J.replaceCaptures(this._name,A,B):this._name}getContentName(A,B){return this._contentNameIsCapturing&&null!==this._contentName?J.replaceCaptures(this._contentName,A,B):this._contentName}}class QA extends BA{constructor(A,B,Q,g,E){super(A,B,Q,g),this.retokenizeCapturedWithRuleId=E}dispose(){}collectPatterns(A,B){throw new Error("Not supported!")}compile(A,B){throw new Error("Not supported!")}compileAG(A,B,Q,g){throw new Error("Not supported!")}}class gA extends BA{constructor(A,B,Q,g,E){super(A,B,Q,null),this._match=new wA(g,this.id),this.captures=E,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(A,B){B.push(this._match)}compile(A,B){return this._getCachedCompiledPatterns(A).compile(A)}compileAG(A,B,Q,g){return this._getCachedCompiledPatterns(A).compileAG(A,Q,g)}_getCachedCompiledPatterns(A){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new oA,this.collectPatterns(A,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}}class EA extends BA{constructor(A,B,Q,g,E){super(A,B,Q,g),this.patterns=E.patterns,this.hasMissingPatterns=E.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(A,B){for(const Q of this.patterns)A.getRule(Q).collectPatterns(A,B)}compile(A,B){return this._getCachedCompiledPatterns(A).compile(A)}compileAG(A,B,Q,g){return this._getCachedCompiledPatterns(A).compileAG(A,Q,g)}_getCachedCompiledPatterns(A){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new oA,this.collectPatterns(A,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}}class CA extends BA{constructor(A,B,Q,g,E,C,I,D,w,o){super(A,B,Q,g),this._begin=new wA(E,this.id),this.beginCaptures=C,this._end=new wA(I||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=D,this.applyEndPatternLast=w||!1,this.patterns=o.patterns,this.hasMissingPatterns=o.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(A,B){return this._end.resolveBackReferences(A,B)}collectPatterns(A,B){B.push(this._begin)}compile(A,B){return this._getCachedCompiledPatterns(A,B).compile(A)}compileAG(A,B,Q,g){return this._getCachedCompiledPatterns(A,B).compileAG(A,Q,g)}_getCachedCompiledPatterns(A,B){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new oA;for(const B of this.patterns)A.getRule(B).collectPatterns(A,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,B):this._cachedCompiledPatterns.setSource(0,B)),this._cachedCompiledPatterns}}class IA extends BA{constructor(A,B,Q,g,E,C,I,D,w){super(A,B,Q,g),this._begin=new wA(E,this.id),this.beginCaptures=C,this.whileCaptures=D,this._while=new wA(I,-2),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=w.patterns,this.hasMissingPatterns=w.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(A,B){return this._while.resolveBackReferences(A,B)}collectPatterns(A,B){B.push(this._begin)}compile(A,B){return this._getCachedCompiledPatterns(A).compile(A)}compileAG(A,B,Q,g){return this._getCachedCompiledPatterns(A).compileAG(A,Q,g)}_getCachedCompiledPatterns(A){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new oA;for(const B of this.patterns)A.getRule(B).collectPatterns(A,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(A,B){return this._getCachedCompiledWhilePatterns(A,B).compile(A)}compileWhileAG(A,B,Q,g){return this._getCachedCompiledWhilePatterns(A,B).compileAG(A,Q,g)}_getCachedCompiledWhilePatterns(A,B){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new oA,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,B||"￿"),this._cachedCompiledWhilePatterns}}class DA{static createCaptureRule(A,B,Q,g,E){return A.registerRule((A=>new QA(B,A,Q,g,E)))}static getCompiledRuleId(A,B,Q){return A.id||B.registerRule((g=>{if(A.id=g,A.match)return new gA(A.$vscodeTextmateLocation,A.id,A.name,A.match,DA._compileCaptures(A.captures,B,Q));if(void 0===A.begin){A.repository&&(Q=U({},Q,A.repository));let g=A.patterns;return void 0===g&&A.include&&(g=[{include:A.include}]),new EA(A.$vscodeTextmateLocation,A.id,A.name,A.contentName,DA._compilePatterns(g,B,Q))}return A.while?new IA(A.$vscodeTextmateLocation,A.id,A.name,A.contentName,A.begin,DA._compileCaptures(A.beginCaptures||A.captures,B,Q),A.while,DA._compileCaptures(A.whileCaptures||A.captures,B,Q),DA._compilePatterns(A.patterns,B,Q)):new CA(A.$vscodeTextmateLocation,A.id,A.name,A.contentName,A.begin,DA._compileCaptures(A.beginCaptures||A.captures,B,Q),A.end,DA._compileCaptures(A.endCaptures||A.captures,B,Q),A.applyEndPatternLast,DA._compilePatterns(A.patterns,B,Q))})),A.id}static _compileCaptures(A,B,Q){let g=[];if(A){let E=0;for(const B in A){if("$vscodeTextmateLocation"===B)continue;const A=parseInt(B,10);A>E&&(E=A)}for(let A=0;A<=E;A++)g[A]=null;for(const E in A){if("$vscodeTextmateLocation"===E)continue;const C=parseInt(E,10);let I=0;A[E].patterns&&(I=DA.getCompiledRuleId(A[E],B,Q)),g[C]=DA.createCaptureRule(B,A[E].$vscodeTextmateLocation,A[E].name,A[E].contentName,I)}}return g}static _compilePatterns(A,B,Q){let g=[];if(A)for(let E=0,C=A.length;EA.substring(B.start,B.end)));return AA.lastIndex=0,this.source.replace(AA,((A,B)=>l(Q[parseInt(B,10)]||"")))}_buildAnchorCache(){let A,B,Q,g,E=[],C=[],I=[],D=[];for(A=0,B=this.source.length;AA.source));this._cached=new sA(A,B,this._items.map((A=>A.ruleId)))}return this._cached}compileAG(A,B,Q){return this._hasAnchors?B?Q?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(A,B,Q)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(A,B,Q)),this._anchorCache.A1_G0):Q?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(A,B,Q)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(A,B,Q)),this._anchorCache.A0_G0):this.compile(A)}_resolveAnchors(A,B,Q){let g=this._items.map((A=>A.resolveAnchors(B,Q)));return new sA(A,g,this._items.map((A=>A.ruleId)))}}class sA{constructor(A,B,Q){this.regExps=B,this.rules=Q,this.scanner=A.createOnigScanner(B)}dispose(){"function"==typeof this.scanner.dispose&&this.scanner.dispose()}toString(){const A=[];for(let B=0,Q=this.rules.length;Bthis._root.match(A)))}static createFromRawTheme(A,B){return this.createFromParsedTheme(function(A){if(!A)return[];if(!A.settings||!Array.isArray(A.settings))return[];let B=A.settings,Q=[],g=0;for(let A=0,E=B.length;A1&&(s=C.slice(0,C.length-1),s.reverse()),Q[g++]=new MA(o,s,A,I,D,w)}}return Q}(A),B)}static createFromParsedTheme(A,B){return function(A,B){A.sort(((A,B)=>{let Q=y(A.scope,B.scope);return 0!==Q?Q:(Q=S(A.parentScopes,B.parentScopes),0!==Q?Q:A.index-B.index)}));let Q=0,g="#000000",E="#ffffff";for(;A.length>=1&&""===A[0].scope;){let B=A.shift();-1!==B.fontStyle&&(Q=B.fontStyle),null!==B.foreground&&(g=B.foreground),null!==B.background&&(E=B.background)}let C=new hA(B),I=new tA(Q,C.getId(g),C.getId(E)),D=new FA(new aA(0,null,-1,0,0),[]);for(let B=0,Q=A.length;Bfunction(A,B){if(null===B)return!0;let Q=0,g=B[Q];for(;A;){if(iA(A.scopeName,g)){if(Q++,Q===B.length)return!0;g=B[Q]}A=A.parent}return!1}(A.parent,B.parentScopes)));return Q?new tA(Q.fontStyle,Q.foreground,Q.background):null}}class cA{constructor(A,B){this.parent=A,this.scopeName=B}static push(A,B){for(const Q of B)A=new cA(A,Q);return A}static from(...A){let B=null;for(let Q=0;QA?console.log("how did this happen?"):this.scopeDepth=A,-1!==B&&(this.fontStyle=B),0!==Q&&(this.foreground=Q),0!==g&&(this.background=g)}}class FA{constructor(A,B=[],Q={}){this._mainRule=A,this._children=Q,this._rulesWithParentScopes=B}static _sortBySpecificity(A){return 1===A.length||A.sort(this._cmpBySpecificity),A}static _cmpBySpecificity(A,B){if(A.scopeDepth===B.scopeDepth){const Q=A.parentScopes,g=B.parentScopes;let E=null===Q?0:Q.length,C=null===g?0:g.length;if(E===C)for(let A=0;A{const B=this._scopeToLanguage(A),Q=this._toStandardTokenType(A);return new GA(B,Q)})),this._defaultAttributes=new GA(A,8),this._embeddedLanguagesMatcher=new rA(Object.entries(B||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(A){return null===A?nA._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(A)}_scopeToLanguage(A){return this._embeddedLanguagesMatcher.match(A)||0}_toStandardTokenType(A){const B=A.match(nA.STANDARD_TOKEN_TYPE_REGEXP);if(!B)return 8;switch(B[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}}nA._NULL_SCOPE_METADATA=new GA(0,0),nA.STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/;class rA{constructor(A){if(0===A.length)this.values=null,this.scopesRegExp=null;else{this.values=new Map(A);const B=A.map((([A,B])=>l(A)));B.sort(),B.reverse(),this.scopesRegExp=new RegExp(`^((${B.join(")|(")}))($|\\.)`,"")}}match(A){if(!this.scopesRegExp)return;const B=A.match(this.scopesRegExp);return B?this.values.get(B[1]):void 0}}class NA{constructor(A,B){this.stack=A,this.stoppedEarly=B}}function LA(A,B,Q,g,E,C,I,D){const w=B.content.length;let o=!1,s=-1;if(I){const I=function(A,B,Q,g,E,C){let I=E.beginRuleCapturedEOL?0:-1;const D=[];for(let B=E;B;B=B.pop()){const Q=B.getRule(A);Q instanceof IA&&D.push({rule:Q,stack:B})}for(let w=D.pop();w;w=D.pop()){const{ruleScanner:D,findOptions:o}=kA(w.rule,A,w.stack.endRule,Q,g===I),s=D.findNextMatchSync(B,g,o);if(L&&(console.log(" scanning for while rule"),console.log(D.toString())),!s){L&&console.log(" popping "+w.rule.debugName+" - "+w.rule.debugWhileRegExp),E=w.stack.pop();break}if(-2!==s.ruleId){E=w.stack.pop();break}s.captureIndices&&s.captureIndices.length&&(C.produce(w.stack,s.captureIndices[0].start),RA(A,B,Q,w.stack,C,w.rule.whileCaptures,s.captureIndices),C.produce(w.stack,s.captureIndices[0].end),I=s.captureIndices[0].end,s.captureIndices[0].end>g&&(g=s.captureIndices[0].end,Q=!1))}return{stack:E,linePos:g,anchorPosition:I,isFirstLine:Q}}(A,B,Q,g,E,C);E=I.stack,g=I.linePos,Q=I.isFirstLine,s=I.anchorPosition}const e=Date.now();for(;!o;){if(0!==D&&Date.now()-e>D)return new NA(E,!0);c()}return new NA(E,!1);function c(){L&&(console.log(""),console.log(`@@scanNext ${g}: |${B.content.substr(g).replace(/\n$/,"\\n")}|`));const I=function(A,B,Q,g,E,C){const I=function(A,B,Q,g,E,C){const I=E.getRule(A),{ruleScanner:D,findOptions:w}=HA(I,A,E.endRule,Q,g===C);let o=0;L&&(o=x());const s=D.findNextMatchSync(B,g,w);if(L){const A=x()-o;A>5&&console.warn(`Rule ${I.debugName} (${I.id}) matching took ${A} against '${B}'`),console.log(` scanning for (linePos: ${g}, anchorPosition: ${C})`),console.log(D.toString()),s&&console.log(`matched rule id: ${s.ruleId} from ${s.captureIndices[0].start} to ${s.captureIndices[0].end}`)}return s?{captureIndices:s.captureIndices,matchedRuleId:s.ruleId}:null}(A,B,Q,g,E,C),D=A.getInjections();if(0===D.length)return I;const w=function(A,B,Q,g,E,C,I){let D,w=Number.MAX_VALUE,o=null,s=0;const e=C.contentNameScopesList.getScopeNames();for(let C=0,c=A.length;C=w)&&(w=a,o=h.captureIndices,D=h.ruleId,s=c.priority,w===E))break}return o?{priorityMatch:-1===s,captureIndices:o,matchedRuleId:D}:null}(D,A,B,Q,g,E,C);if(!w)return I;if(!I)return w;const o=I.captureIndices[0].start,s=w.captureIndices[0].start;return s0)&&D[0].end>g;if(-1===e){const I=E.getRule(A);L&&console.log(" popping "+I.debugName+" - "+I.debugEndRegExp),C.produce(E,D[0].start),E=E.withContentNameScopesList(E.nameScopesList),RA(A,B,Q,E,C,I.endCaptures,D),C.produce(E,D[0].end);const e=E;if(E=E.parent,s=e.getAnchorPos(),!c&&e.getEnterPos()===g)return L&&console.error("[1] - Grammar is in an endless loop - Grammar pushed & popped a rule without advancing"),E=e,C.produce(E,w),void(o=!0)}else{const I=A.getRule(e);C.produce(E,D[0].start);const i=E,t=I.getName(B.content,D),M=E.contentNameScopesList.pushAttributed(t,A);if(E=E.push(e,g,s,D[0].end===w,null,M,M),I instanceof CA){const g=I;L&&console.log(" pushing "+g.debugName+" - "+g.debugBeginRegExp),RA(A,B,Q,E,C,g.beginCaptures,D),C.produce(E,D[0].end),s=D[0].end;const e=g.getContentName(B.content,D),t=M.pushAttributed(e,A);if(E=E.withContentNameScopesList(t),g.endHasBackReferences&&(E=E.withEndRule(g.getEndWithResolvedBackReferences(B.content,D))),!c&&i.hasSameRuleAs(E))return L&&console.error("[2] - Grammar is in an endless loop - Grammar pushed the same rule without advancing"),E=E.pop(),C.produce(E,w),void(o=!0)}else if(I instanceof IA){const g=I;L&&console.log(" pushing "+g.debugName),RA(A,B,Q,E,C,g.beginCaptures,D),C.produce(E,D[0].end),s=D[0].end;const e=g.getContentName(B.content,D),t=M.pushAttributed(e,A);if(E=E.withContentNameScopesList(t),g.whileHasBackReferences&&(E=E.withEndRule(g.getWhileWithResolvedBackReferences(B.content,D))),!c&&i.hasSameRuleAs(E))return L&&console.error("[3] - Grammar is in an endless loop - Grammar pushed the same rule without advancing"),E=E.pop(),C.produce(E,w),void(o=!0)}else{const g=I;if(L&&console.log(" matched "+g.debugName+" - "+g.debugMatchRegExp),RA(A,B,Q,E,C,g.captures,D),C.produce(E,D[0].end),E=E.pop(),!c)return L&&console.error("[4] - Grammar is in an endless loop - Grammar is not advancing, nor is it pushing/popping"),E=E.safePop(),C.produce(E,w),void(o=!0)}}D[0].end>g&&(g=D[0].end,Q=!1)}}function HA(A,B,Q,g,E){return{ruleScanner:A.compileAG(B,Q,g,E),findOptions:0}}function kA(A,B,Q,g,E){return{ruleScanner:A.compileWhileAG(B,Q,g,E),findOptions:0}}function RA(A,B,Q,g,E,C,I){if(0===C.length)return;const D=B.content,w=Math.min(C.length,I.length),o=[],s=I[0].end;for(let B=0;Bs)break;for(;o.length>0&&o[o.length-1].endPos<=e.start;)E.produceFromScopes(o[o.length-1].scopes,o[o.length-1].endPos),o.pop();if(o.length>0?E.produceFromScopes(o[o.length-1].scopes,e.start):E.produce(g,e.start),w.retokenizeCapturedWithRuleId){const B=w.getName(D,I),C=g.contentNameScopesList.pushAttributed(B,A),o=w.getContentName(D,I),s=C.pushAttributed(o,A),c=g.push(w.retokenizeCapturedWithRuleId,e.start,-1,!1,null,C,s),i=A.createOnigString(D.substring(0,e.end));LA(A,i,Q&&0===e.start,e.start,c,E,!1,0),K(i);continue}const c=w.getName(D,I);if(null!==c){const B=(o.length>0?o[o.length-1].scopes:g.contentNameScopesList).pushAttributed(c,A);o.push(new KA(B,e.end))}}for(;o.length>0;)E.produceFromScopes(o[o.length-1].scopes,o[o.length-1].endPos),o.pop()}class KA{constructor(A,B){this.scopes=A,this.endPos=B}}function YA(A,B,Q,g,E){const C=k(B,UA),I=DA.getCompiledRuleId(Q,g,E.repository);for(const Q of C)A.push({debugSelector:B,matcher:Q.matcher,ruleId:I,grammar:E,priority:Q.priority})}function UA(A,B){if(B.length{for(let g=Q;gQ&&A.substr(0,Q)===B&&"."===A[Q]}class uA{constructor(A,B,Q,g,E,C,I,D){if(this._rootScopeName=A,this.balancedBracketSelectors=C,this._onigLib=D,this._basicScopeAttributesProvider=new nA(Q,g),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=I,this._grammar=JA(B,null),this._injections=null,this._tokenTypeMatchers=[],E)for(const A of Object.keys(E)){const B=k(A,UA);for(const Q of B)this._tokenTypeMatchers.push({matcher:Q.matcher,type:E[A]})}}get themeProvider(){return this._grammarRepository}dispose(){for(const A of this._ruleId2desc)A&&A.dispose()}createOnigScanner(A){return this._onigLib.createOnigScanner(A)}createOnigString(A){return this._onigLib.createOnigString(A)}getMetadataForScope(A){return this._basicScopeAttributesProvider.getBasicScopeAttributes(A)}_collectInjections(){const A=[],B=this._rootScopeName,Q=(A=>A===this._rootScopeName?this._grammar:this.getExternalGrammar(A))(B);if(Q){const g=Q.injections;if(g)for(let B in g)YA(A,B,g[B],this,Q);const E=this._grammarRepository.injections(B);E&&E.forEach((B=>{const Q=this.getExternalGrammar(B);if(Q){const B=Q.injectionSelector;B&&YA(A,B,Q,this,Q)}}))}return A.sort(((A,B)=>A.priority-B.priority)),A}getInjections(){if(null===this._injections&&(this._injections=this._collectInjections(),L&&this._injections.length>0)){console.log(`Grammar ${this._rootScopeName} contains the following injections:`);for(const A of this._injections)console.log(` - ${A.debugSelector}`)}return this._injections}registerRule(A){const B=++this._lastRuleId,Q=A(B);return this._ruleId2desc[B]=Q,Q}getRule(A){return this._ruleId2desc[A]}getExternalGrammar(A,B){if(this._includedGrammars[A])return this._includedGrammars[A];if(this._grammarRepository){const Q=this._grammarRepository.lookup(A);if(Q)return this._includedGrammars[A]=JA(Q,B&&B.$base),this._includedGrammars[A]}}tokenizeLine(A,B,Q=0){const g=this._tokenize(A,B,!1,Q);return{tokens:g.lineTokens.getResult(g.ruleStack,g.lineLength),ruleStack:g.ruleStack,stoppedEarly:g.stoppedEarly}}tokenizeLine2(A,B,Q=0){const g=this._tokenize(A,B,!0,Q);return{tokens:g.lineTokens.getBinaryResult(g.ruleStack,g.lineLength),ruleStack:g.ruleStack,stoppedEarly:g.stoppedEarly}}_tokenize(A,B,Q,g){let E;if(-1===this._rootId&&(this._rootId=DA.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections()),B&&B!==SA.NULL)E=!1,B.reset();else{E=!0;const A=this._basicScopeAttributesProvider.getDefaultAttributes(),Q=this.themeProvider.getDefaults(),g=H.set(0,A.languageId,A.tokenType,null,Q.fontStyle,Q.foregroundId,Q.backgroundId),C=this.getRule(this._rootId).getName(null,null);let I;I=C?yA.createRootAndLookUpScopeName(C,g,this):yA.createRoot("unknown",g),B=new SA(null,this._rootId,-1,-1,!1,null,I,I)}A+="\n";const C=this.createOnigString(A),I=C.content.length,D=new lA(Q,A,this._tokenTypeMatchers,this.balancedBracketSelectors),w=LA(this,C,E,0,B,D,!0,g);return K(C),{lineLength:I,lineTokens:D,ruleStack:w.stack,stoppedEarly:w.stoppedEarly}}}function JA(A,B){return(A=Y(A)).repository=A.repository||{},A.repository.$self={$vscodeTextmateLocation:A.$vscodeTextmateLocation,patterns:A.patterns,name:A.scopeName},A.repository.$base=B||A.repository.$self,A}class yA{constructor(A,B,Q){this.parent=A,this.scopePath=B,this.tokenAttributes=Q}static fromExtension(A,B){let Q=A,g=A?.scopePath??null;for(const A of B)g=cA.push(g,A.scopeNames),Q=new yA(Q,g,A.encodedTokenAttributes);return Q}static createRoot(A,B){return new yA(null,new cA(null,A),B)}static createRootAndLookUpScopeName(A,B,Q){const g=Q.getMetadataForScope(A),E=new cA(null,A),C=Q.themeProvider.themeMatch(E),I=yA.mergeAttributes(B,g,C);return new yA(null,E,I)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(A){return yA.equals(this,A)}static equals(A,B){for(;;){if(A===B)return!0;if(!A&&!B)return!0;if(!A||!B)return!1;if(A.scopeName!==B.scopeName||A.tokenAttributes!==B.tokenAttributes)return!1;A=A.parent,B=B.parent}}static mergeAttributes(A,B,Q){let g=-1,E=0,C=0;return null!==Q&&(g=Q.fontStyle,E=Q.foregroundId,C=Q.backgroundId),H.set(A,B.languageId,B.tokenType,null,g,E,C)}pushAttributed(A,B){if(null===A)return this;if(-1===A.indexOf(" "))return yA._pushAttributed(this,A,B);const Q=A.split(/ /g);let g=this;for(const A of Q)g=yA._pushAttributed(g,A,B);return g}static _pushAttributed(A,B,Q){const g=Q.getMetadataForScope(B),E=A.scopePath.push(B),C=Q.themeProvider.themeMatch(E),I=yA.mergeAttributes(A.tokenAttributes,g,C);return new yA(A,E,I)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(A){const B=[];let Q=this;for(;Q&&Q!==A;)B.push({encodedTokenAttributes:Q.tokenAttributes,scopeNames:Q.scopePath.getExtensionIfDefined(Q.parent?.scopePath??null)}),Q=Q.parent;return Q===A?B.reverse():void 0}}class SA{constructor(A,B,Q,g,E,C,I,D){this.parent=A,this.ruleId=B,this.beginRuleCapturedEOL=E,this.endRule=C,this.nameScopesList=I,this.contentNameScopesList=D,this._stackElementBrand=void 0,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=Q,this._anchorPos=g}equals(A){return null!==A&&SA._equals(this,A)}static _equals(A,B){return A===B||!!this._structuralEquals(A,B)&&yA.equals(A.contentNameScopesList,B.contentNameScopesList)}static _structuralEquals(A,B){for(;;){if(A===B)return!0;if(!A&&!B)return!0;if(!A||!B)return!1;if(A.depth!==B.depth||A.ruleId!==B.ruleId||A.endRule!==B.endRule)return!1;A=A.parent,B=B.parent}}clone(){return this}static _reset(A){for(;A;)A._enterPos=-1,A._anchorPos=-1,A=A.parent}reset(){SA._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(A,B,Q,g,E,C,I){return new SA(this,A,B,Q,g,E,C,I)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(A){return A.getRule(this.ruleId)}toString(){const A=[];return this._writeString(A,0),"["+A.join(",")+"]"}_writeString(A,B){return this.parent&&(B=this.parent._writeString(A,B)),A[B++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,B}withContentNameScopesList(A){return this.contentNameScopesList===A?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,A)}withEndRule(A){return this.endRule===A?this:new SA(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,A,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(A){let B=this;for(;B&&B._enterPos===A._enterPos;){if(B.ruleId===A.ruleId)return!0;B=B.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(A,B){const Q=yA.fromExtension(A?.nameScopesList??null,B.nameScopesList);return new SA(A,B.ruleId,B.enterPos??-1,B.anchorPos??-1,B.beginRuleCapturedEOL,B.endRule,Q,yA.fromExtension(Q,B.contentNameScopesList))}}SA.NULL=new SA(null,0,0,0,!1,null,null,null);class pA{constructor(A,B){this.allowAny=!1,this.balancedBracketScopes=A.flatMap((A=>"*"===A?(this.allowAny=!0,[]):k(A,UA).map((A=>A.matcher)))),this.unbalancedBracketScopes=B.flatMap((A=>k(A,UA).map((A=>A.matcher))))}get matchesAlways(){return this.allowAny&&0===this.unbalancedBracketScopes.length}get matchesNever(){return 0===this.balancedBracketScopes.length&&!this.allowAny}match(A){for(const B of this.unbalancedBracketScopes)if(B(A))return!1;for(const B of this.balancedBracketScopes)if(B(A))return!0;return this.allowAny}}class lA{constructor(A,B,Q,g){this.balancedBracketSelectors=g,this._emitBinaryTokens=A,this._tokenTypeOverrides=Q,this._lineText=L?B:null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}produce(A,B){this.produceFromScopes(A.contentNameScopesList,B)}produceFromScopes(A,B){if(this._lastTokenEndIndex>=B)return;if(this._emitBinaryTokens){let Q=A?.tokenAttributes??0,g=!1;if(this.balancedBracketSelectors?.matchesAlways&&(g=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const B=A?.getScopeNames()??[];for(const A of this._tokenTypeOverrides)A.matcher(B)&&(Q=H.set(Q,0,A.type,null,-1,0,0));this.balancedBracketSelectors&&(g=this.balancedBracketSelectors.match(B))}if(g&&(Q=H.set(Q,0,8,g,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===Q)return void(this._lastTokenEndIndex=B);if(L){const Q=A?.getScopeNames()??[];console.log(" token: |"+this._lineText.substring(this._lastTokenEndIndex,B).replace(/\n$/,"\\n")+"|");for(let A=0;A0&&this._tokens[this._tokens.length-1].startIndex===B-1&&this._tokens.pop(),0===this._tokens.length&&(this._lastTokenEndIndex=-1,this.produce(A,B),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(A,B){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===B-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),0===this._binaryTokens.length&&(this._lastTokenEndIndex=-1,this.produce(A,B),this._binaryTokens[this._binaryTokens.length-2]=0);const Q=new Uint32Array(this._binaryTokens.length);for(let A=0,B=this._binaryTokens.length;A0;)10===A.charCodeAt(E)?(E++,C++,I=0):(E++,I++),B--}function w(A){null===Q?E=A:D(A-E)}function o(){for(;E0&&65279===A.charCodeAt(0)&&(E=1);let i=0,t=null,M=[],h=[],a=null;function F(A,B){M.push(i),h.push(t),i=A,t=B}function G(){if(0===M.length)return n("illegal state stack");i=M.pop(),t=h.pop()}function n(B){throw new Error("Near offset "+E+": "+B+" ~~~"+A.substr(E,50)+"~~~")}const r=function(){if(null===a)return n("missing ");let A={};null!==Q&&(A[Q]={filename:B,line:C,char:I}),t[a]=A,a=null,F(1,A)},N=function(){if(null===a)return n("missing ");let A=[];t[a]=A,a=null,F(2,A)},L=function(){let A={};null!==Q&&(A[Q]={filename:B,line:C,char:I}),t.push(A),F(1,A)},H=function(){let A=[];t.push(A),F(2,A)};function k(){if(1!==i)return n("unexpected ");G()}function R(){return 1===i||2!==i?n("unexpected "):void G()}function K(A){if(1===i){if(null===a)return n("missing ");t[a]=A,a=null}else 2===i?t.push(A):t=A}function Y(A){if(isNaN(A))return n("cannot parse float");if(1===i){if(null===a)return n("missing ");t[a]=A,a=null}else 2===i?t.push(A):t=A}function U(A){if(isNaN(A))return n("cannot parse integer");if(1===i){if(null===a)return n("missing ");t[a]=A,a=null}else 2===i?t.push(A):t=A}function P(A){if(1===i){if(null===a)return n("missing ");t[a]=A,a=null}else 2===i?t.push(A):t=A}function u(A){if(1===i){if(null===a)return n("missing ");t[a]=A,a=null}else 2===i?t.push(A):t=A}function J(A){if(1===i){if(null===a)return n("missing ");t[a]=A,a=null}else 2===i?t.push(A):t=A}function y(){let A=c(">"),B=!1;return 47===A.charCodeAt(A.length-1)&&(B=!0,A=A.substring(0,A.length-1)),{name:A.trim(),isClosed:B}}function S(A){if(A.isClosed)return"";let B=c(""),B.replace(/&#([0-9]+);/g,(function(A,B){return String.fromCodePoint(parseInt(B,10))})).replace(/&#x([0-9a-f]+);/g,(function(A,B){return String.fromCodePoint(parseInt(B,16))})).replace(/&|<|>|"|'/g,(function(A){switch(A){case"&":return"&";case"<":return"<";case">":return">";case""":return'"';case"'":return"'"}return A}))}for(;E=g));){const w=A.charCodeAt(E);if(D(1),60!==w)return n("expected <");if(E>=g)return n("unexpected end of input");const c=A.charCodeAt(E);if(63===c){D(1),e("?>");continue}if(33===c){if(D(1),s("--")){e("--\x3e");continue}e(">");continue}if(47===c){if(D(1),o(),s("plist")){e(">");continue}if(s("dict")){e(">"),k();continue}if(s("array")){e(">"),R();continue}return n("unexpected closed tag")}let M=y();switch(M.name){case"dict":1===i?r():2===i?L():(t={},null!==Q&&(t[Q]={filename:B,line:C,char:I}),F(1,t)),M.isClosed&&k();continue;case"array":1===i?N():2===i?H():(t=[],F(2,t)),M.isClosed&&R();continue;case"key":p=S(M),1!==i?n("unexpected "):null!==a?n("too many "):a=p;continue;case"string":K(S(M));continue;case"real":Y(parseFloat(S(M)));continue;case"integer":U(parseInt(S(M),10));continue;case"date":P(new Date(S(M)));continue;case"data":u(S(M));continue;case"true":S(M),J(!0);continue;case"false":S(M),J(!1);continue}if(!/^plist/.test(M.name))return n("unexpected opened tag "+M.name)}var p;return t}function xA(A,B){throw new Error("Near offset "+A.pos+": "+B+" ~~~"+A.source.substr(A.pos,50)+"~~~")}class fA{constructor(A){this.source=A,this.pos=0,this.len=A.length,this.line=1,this.char=0}}class mA{constructor(){this.value=null,this.type=0,this.offset=-1,this.len=-1,this.line=-1,this.char=-1}toLocation(A){return{filename:A,line:this.line,char:this.char}}}function OA(A,B){B.value=null,B.type=0,B.offset=-1,B.len=-1,B.line=-1,B.char=-1;let Q,g=A.source,E=A.pos,C=A.len,I=A.line,D=A.char;for(;;){if(E>=C)return!1;if(Q=g.charCodeAt(E),32!==Q&&9!==Q&&13!==Q){if(10!==Q)break;E++,I++,D=0}else E++,D++}if(B.offset=E,B.line=I,B.char=D,34===Q){for(B.type=1,E++,D++;;){if(E>=C)return!1;if(Q=g.charCodeAt(E),E++,D++,92!==Q){if(34===Q)break}else E++,D++}B.value=g.substring(B.offset+1,E-1).replace(/\\u([0-9A-Fa-f]{4})/g,((A,B)=>String.fromCodePoint(parseInt(B,16)))).replace(/\\(.)/g,((B,Q)=>{switch(Q){case'"':return'"';case"\\":return"\\";case"/":return"/";case"b":return"\b";case"f":return"\f";case"n":return"\n";case"r":return"\r";case"t":return"\t";default:xA(A,"invalid escape sequence")}throw new Error("unreachable")}))}else if(91===Q)B.type=2,E++,D++;else if(123===Q)B.type=3,E++,D++;else if(93===Q)B.type=4,E++,D++;else if(125===Q)B.type=5,E++,D++;else if(58===Q)B.type=6,E++,D++;else if(44===Q)B.type=7,E++,D++;else if(110===Q){if(B.type=8,E++,D++,Q=g.charCodeAt(E),117!==Q)return!1;if(E++,D++,Q=g.charCodeAt(E),108!==Q)return!1;if(E++,D++,Q=g.charCodeAt(E),108!==Q)return!1;E++,D++}else if(116===Q){if(B.type=9,E++,D++,Q=g.charCodeAt(E),114!==Q)return!1;if(E++,D++,Q=g.charCodeAt(E),117!==Q)return!1;if(E++,D++,Q=g.charCodeAt(E),101!==Q)return!1;E++,D++}else if(102===Q){if(B.type=10,E++,D++,Q=g.charCodeAt(E),97!==Q)return!1;if(E++,D++,Q=g.charCodeAt(E),108!==Q)return!1;if(E++,D++,Q=g.charCodeAt(E),115!==Q)return!1;if(E++,D++,Q=g.charCodeAt(E),101!==Q)return!1;E++,D++}else for(B.type=11;;){if(E>=C)return!1;if(Q=g.charCodeAt(E),!(46===Q||Q>=48&&Q<=57||101===Q||69===Q||45===Q||43===Q))break;E++,D++}return B.len=E-B.offset,null===B.value&&(B.value=g.substr(B.offset,B.len)),A.pos=E,A.line=I,A.char=D,!0}class qA{constructor(A,B){this._onigLibPromise=B,this._grammars=new Map,this._rawGrammars=new Map,this._injectionGrammars=new Map,this._theme=A}dispose(){for(const A of this._grammars.values())A.dispose()}setTheme(A){this._theme=A}getColorMap(){return this._theme.getColorMap()}addGrammar(A,B){this._rawGrammars.set(A.scopeName,A),B&&this._injectionGrammars.set(A.scopeName,B)}lookup(A){return this._rawGrammars.get(A)}injections(A){return this._injectionGrammars.get(A)}getDefaults(){return this._theme.getDefaults()}themeMatch(A){return this._theme.match(A)}async grammarForScopeName(A,B,Q,g,E){if(!this._grammars.has(A)){let C=this._rawGrammars.get(A);if(!C)return null;this._grammars.set(A,function(A,B,Q,g,E,C,I,D){return new uA(A,B,Q,g,E,C,I,D)}(A,C,B,Q,g,E,this,await this._onigLibPromise))}return this._grammars.get(A)}}function bA(A,B){let Q=0;const g=[];let E=A,C=B;for(;E!==C;)E&&(!C||E.depth>=C.depth)?(Q++,E=E.parent):(g.push(C.toStateStackFrame()),C=C.parent);return{pops:Q,newFrames:g.reverse()}}function WA(A,B){let Q=A;for(let A=0;A0;)await Promise.all(C.Q.map((A=>this._loadSingleGrammar(A.scopeName)))),C.processQueue();return this._grammarForScopeName(A,B,Q,g,E)}async _loadSingleGrammar(A){return this._ensureGrammarCache.has(A)||this._ensureGrammarCache.set(A,this._doLoadSingleGrammar(A)),this._ensureGrammarCache.get(A)}async _doLoadSingleGrammar(A){const B=await this._options.loadGrammar(A);if(B){const Q="function"==typeof this._options.getInjections?this._options.getInjections(A):void 0;this._syncRegistry.addGrammar(B,Q)}}async addGrammar(A,B=[],Q=0,g=null){return this._syncRegistry.addGrammar(A,B),await this._grammarForScopeName(A.scopeName,Q,g)}_grammarForScopeName(A,B=0,Q=null,g=null,E=null){return this._syncRegistry.grammarForScopeName(A,B,Q,g,E)}}const XA=SA.NULL,vA=function(A,B=null){return null!==B&&/\.json$/.test(B)?(Q=A,L?function(A,B,Q){let g=new fA(A),E=new mA,C=0,I=null,D=[],w=[];function o(){D.push(C),w.push(I)}function s(){C=D.pop(),I=w.pop()}function e(A){xA(g,A)}for(;OA(g,E);){if(0===C){if(null!==I&&e("too many constructs in root"),3===E.type){I={},I.$vscodeTextmateLocation=E.toLocation(B),o(),C=1;continue}if(2===E.type){I=[],o(),C=4;continue}e("unexpected token in root")}if(2===C){if(5===E.type){s();continue}if(7===E.type){C=3;continue}e("expected , or }")}if(1===C||3===C){if(1===C&&5===E.type){s();continue}if(1===E.type){let A=E.value;if(OA(g,E)&&6===E.type||e("expected colon"),OA(g,E)||e("expected value"),C=2,1===E.type){I[A]=E.value;continue}if(8===E.type){I[A]=null;continue}if(9===E.type){I[A]=!0;continue}if(10===E.type){I[A]=!1;continue}if(11===E.type){I[A]=parseFloat(E.value);continue}if(2===E.type){let B=[];I[A]=B,o(),C=4,I=B;continue}if(3===E.type){let Q={};Q.$vscodeTextmateLocation=E.toLocation(B),I[A]=Q,o(),C=1,I=Q;continue}}e("unexpected token in dict")}if(5===C){if(4===E.type){s();continue}if(7===E.type){C=6;continue}e("expected , or ]")}if(4===C||6===C){if(4===C&&4===E.type){s();continue}if(C=5,1===E.type){I.push(E.value);continue}if(8===E.type){I.push(null);continue}if(9===E.type){I.push(!0);continue}if(10===E.type){I.push(!1);continue}if(11===E.type){I.push(parseFloat(E.value));continue}if(2===E.type){let A=[];I.push(A),o(),C=4,I=A;continue}if(3===E.type){let A={};A.$vscodeTextmateLocation=E.toLocation(B),I.push(A),o(),C=1,I=A;continue}e("unexpected token in array")}e("unknown state")}return 0!==w.length&&e("unclosed constructs"),I}(Q,B):JSON.parse(Q)):function(A,B){return L?function(A,B,Q){return dA(A,B,"$vscodeTextmateLocation")}(A,B):function(A){return dA(A,null,null)}(A)}(A,B);var Q};var ZA=N.Bz,jA=("undefined"!=typeof document&&document.currentScript&&document.currentScript.src,function(A){var B,Q,g=void 0!==(A=A||{})?A:{};g.ready=new Promise((function(A,g){B=A,Q=g}));var E,C=Object.assign({},g),I=!1;E=function(A){let B;return"function"==typeof readbuffer?new Uint8Array(readbuffer(A)):(B=read(A,"binary"),"object"==typeof B||L(Q),B);var Q},"undefined"!=typeof scriptArgs&&scriptArgs,"undefined"!=typeof onig_print&&("undefined"==typeof console&&(console={}),console.log=onig_print,console.warn=console.error="undefined"!=typeof printErr?printErr:onig_print);var D,w,o=g.print||console.log.bind(console),s=g.printErr||console.warn.bind(console);Object.assign(g,C),C=null,g.arguments&&g.arguments,g.thisProgram&&g.thisProgram,g.quit&&g.quit,g.wasmBinary&&(D=g.wasmBinary),g.noExitRuntime,"object"!=typeof WebAssembly&&L("no native wasm support detected");var e,c,i,t=!1,M="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function h(A,B,Q){for(var g=B+Q,E=B;A[E]&&!(E>=g);)++E;if(E-B>16&&A.buffer&&M)return M.decode(A.subarray(B,E));for(var C="";B>10,56320|1023&o)}}else C+=String.fromCharCode((31&I)<<6|D)}else C+=String.fromCharCode(I)}return C}function a(A){e=A,g.HEAP8=new Int8Array(A),g.HEAP16=new Int16Array(A),g.HEAP32=new Int32Array(A),g.HEAPU8=c=new Uint8Array(A),g.HEAPU16=new Uint16Array(A),g.HEAPU32=i=new Uint32Array(A),g.HEAPF32=new Float32Array(A),g.HEAPF64=new Float64Array(A)}g.INITIAL_MEMORY;var F=[],G=[],n=[],r=0,N=null;function L(A){g.onAbort&&g.onAbort(A),s(A="Aborted("+A+")"),t=!0,A+=". Build with -sASSERTIONS for more info.";var B=new WebAssembly.RuntimeError(A);throw Q(B),B}var H,k,R,K="data:application/octet-stream;base64,";function Y(A){return A.startsWith(K)}function U(A){try{if(A==H&&D)return new Uint8Array(D);if(E)return E(A);throw"both async and sync fetching of the wasm failed"}catch(A){L(A)}}function P(A){for(;A.length>0;)A.shift()(g)}function u(A){try{return w.grow(A-e.byteLength+65535>>>16),a(w.buffer),1}catch(A){}}Y(H="onig.wasm")||(k=H,H=g.locateFile?g.locateFile(k,""):""+k),R="undefined"!=typeof dateNow?dateNow:()=>performance.now();var J=[null,[],[]];function y(A,B){var Q=J[A];0===B||10===B?((1===A?o:s)(h(Q,0)),Q.length=0):Q.push(B)}var S,p={emscripten_get_now:R,emscripten_memcpy_big:function(A,B,Q){c.copyWithin(A,B,B+Q)},emscripten_resize_heap:function(A){var B=c.length,Q=2147483648;if((A>>>=0)>Q)return!1;let g=(A,B)=>A+(B-A%B)%B;for(var E=1;E<=4;E*=2){var C=B*(1+.2/E);if(C=Math.min(C,A+100663296),u(Math.min(Q,g(Math.max(A,C),65536))))return!0}return!1},fd_write:function(A,B,Q,g){for(var E=0,C=0;C>2],D=i[B+4>>2];B+=8;for(var w=0;w>2]=E,0}};function l(A){function Q(){S||(S=!0,g.calledRun=!0,t||(P(G),B(g),g.onRuntimeInitialized&&g.onRuntimeInitialized(),function(){if(g.postRun)for("function"==typeof g.postRun&&(g.postRun=[g.postRun]);g.postRun.length;)A=g.postRun.shift(),n.unshift(A);var A;P(n)}()))}r>0||(function(){if(g.preRun)for("function"==typeof g.preRun&&(g.preRun=[g.preRun]);g.preRun.length;)A=g.preRun.shift(),F.unshift(A);var A;P(F)}(),r>0||(g.setStatus?(g.setStatus("Running..."),setTimeout((function(){setTimeout((function(){g.setStatus("")}),1),Q()}),1)):Q()))}if(function(){var A={env:p,wasi_snapshot_preview1:p};function B(A,B){var Q,E=A.exports;g.asm=E,a((w=g.asm.memory).buffer),g.asm.__indirect_function_table,Q=g.asm.__wasm_call_ctors,G.unshift(Q),function(A){if(r--,g.monitorRunDependencies&&g.monitorRunDependencies(r),0==r&&N){var B=N;N=null,B()}}()}function E(A){B(A.instance)}function C(B){return(!D&&I&&"function"==typeof fetch?fetch(H,{credentials:"same-origin"}).then((function(A){if(!A.ok)throw"failed to load wasm binary file at '"+H+"'";return A.arrayBuffer()})).catch((function(){return U(H)})):Promise.resolve().then((function(){return U(H)}))).then((function(B){return WebAssembly.instantiate(B,A)})).then((function(A){return A})).then(B,(function(A){s("failed to asynchronously prepare wasm: "+A),L(A)}))}if(r++,g.monitorRunDependencies&&g.monitorRunDependencies(r),g.instantiateWasm)try{return g.instantiateWasm(A,B)}catch(A){s("Module.instantiateWasm callback failed with error: "+A),Q(A)}(D||"function"!=typeof WebAssembly.instantiateStreaming||Y(H)||"function"!=typeof fetch?C(E):fetch(H,{credentials:"same-origin"}).then((function(B){return WebAssembly.instantiateStreaming(B,A).then(E,(function(A){return s("wasm streaming compile failed: "+A),s("falling back to ArrayBuffer instantiation"),C(E)}))}))).catch(Q)}(),g.___wasm_call_ctors=function(){return(g.___wasm_call_ctors=g.asm.__wasm_call_ctors).apply(null,arguments)},g.___errno_location=function(){return(g.___errno_location=g.asm.__errno_location).apply(null,arguments)},g._omalloc=function(){return(g._omalloc=g.asm.omalloc).apply(null,arguments)},g._ofree=function(){return(g._ofree=g.asm.ofree).apply(null,arguments)},g._getLastOnigError=function(){return(g._getLastOnigError=g.asm.getLastOnigError).apply(null,arguments)},g._createOnigScanner=function(){return(g._createOnigScanner=g.asm.createOnigScanner).apply(null,arguments)},g._freeOnigScanner=function(){return(g._freeOnigScanner=g.asm.freeOnigScanner).apply(null,arguments)},g._findNextOnigScannerMatch=function(){return(g._findNextOnigScannerMatch=g.asm.findNextOnigScannerMatch).apply(null,arguments)},g._findNextOnigScannerMatchDbg=function(){return(g._findNextOnigScannerMatchDbg=g.asm.findNextOnigScannerMatchDbg).apply(null,arguments)},g.stackSave=function(){return(g.stackSave=g.asm.stackSave).apply(null,arguments)},g.stackRestore=function(){return(g.stackRestore=g.asm.stackRestore).apply(null,arguments)},g.stackAlloc=function(){return(g.stackAlloc=g.asm.stackAlloc).apply(null,arguments)},g.dynCall_jiji=function(){return(g.dynCall_jiji=g.asm.dynCall_jiji).apply(null,arguments)},g.UTF8ToString=function(A,B){return A?h(c,A,B):""},N=function A(){S||l(),S||(N=A)},g.preInit)for("function"==typeof g.preInit&&(g.preInit=[g.preInit]);g.preInit.length>0;)g.preInit.pop()();return l(),A.ready});let VA=null;class zA{static _utf8ByteLength(A){let B=0;for(let Q=0,g=A.length;Q=55296&&E<=56319&&Q+1=56320&&B<=57343&&(C=65536+(E-55296<<10)|B-56320,I=!0)}B+=C<=127?1:C<=2047?2:C<=65535?3:4,I&&Q++}return B}constructor(A){const B=A.length,Q=zA._utf8ByteLength(A),g=Q!==B,E=g?new Uint32Array(B+1):null;g&&(E[B]=Q);const C=g?new Uint32Array(Q+1):null;g&&(C[Q]=B);const I=new Uint8Array(Q);let D=0;for(let Q=0;Q=55296&&w<=56319&&Q+1=56320&&B<=57343&&(o=65536+(w-55296<<10)|B-56320,s=!0)}g&&(E[Q]=D,s&&(E[Q+1]=D),o<=127?C[D+0]=Q:o<=2047?(C[D+0]=Q,C[D+1]=Q):o<=65535?(C[D+0]=Q,C[D+1]=Q,C[D+2]=Q):(C[D+0]=Q,C[D+1]=Q,C[D+2]=Q,C[D+3]=Q)),o<=127?I[D++]=o:o<=2047?(I[D++]=192|(1984&o)>>>6,I[D++]=128|(63&o)>>>0):o<=65535?(I[D++]=224|(61440&o)>>>12,I[D++]=128|(4032&o)>>>6,I[D++]=128|(63&o)>>>0):(I[D++]=240|(1835008&o)>>>18,I[D++]=128|(258048&o)>>>12,I[D++]=128|(4032&o)>>>6,I[D++]=128|(63&o)>>>0),s&&Q++}this.utf16Length=B,this.utf8Length=Q,this.utf16Value=A,this.utf8Value=I,this.utf16OffsetToUtf8=E,this.utf8OffsetToUtf16=C}createString(A){const B=A._omalloc(this.utf8Length);return A.HEAPU8.set(this.utf8Value,B),B}}class _A{constructor(A){if(this.id=++_A.LAST_ID,!VA)throw new Error("Must invoke loadWASM first.");this._onigBinding=VA,this.content=A;const B=new zA(A);this.utf16Length=B.utf16Length,this.utf8Length=B.utf8Length,this.utf16OffsetToUtf8=B.utf16OffsetToUtf8,this.utf8OffsetToUtf16=B.utf8OffsetToUtf16,this.utf8Length<1e4&&!_A._sharedPtrInUse?(_A._sharedPtr||(_A._sharedPtr=VA._omalloc(1e4)),_A._sharedPtrInUse=!0,VA.HEAPU8.set(B.utf8Value,_A._sharedPtr),this.ptr=_A._sharedPtr):this.ptr=B.createString(VA)}convertUtf8OffsetToUtf16(A){return this.utf8OffsetToUtf16?A<0?0:A>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[A]:A}convertUtf16OffsetToUtf8(A){return this.utf16OffsetToUtf8?A<0?0:A>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[A]:A}dispose(){this.ptr===_A._sharedPtr?_A._sharedPtrInUse=!1:this._onigBinding._ofree(this.ptr)}}_A.LAST_ID=0,_A._sharedPtr=0,_A._sharedPtrInUse=!1;class $A{constructor(A){if(!VA)throw new Error("Must invoke loadWASM first.");const B=[],Q=[];for(let g=0,E=A.length;gWebAssembly.instantiateStreaming(A,B)}(g):function(A){return async B=>{const Q=await A.arrayBuffer();return WebAssembly.instantiate(Q,B)}}(g):function(A){return B=>WebAssembly.instantiate(A,B)}(g)}return BB=new Promise(((A,B)=>{g=A,E=B})),function(A,B,Q,g){jA({print:B,instantiateWasm:(B,Q)=>{if("undefined"==typeof performance){const A=()=>Date.now();B.env.emscripten_get_now=A,B.wasi_snapshot_preview1.emscripten_get_now=A}return A(B).then((A=>Q(A.instance)),g),{}}}).then((A=>{VA=A,Q()}))}(B,Q,g,E),BB}function gB(A){return new _A(A)}function EB(A){return new $A(A)}function CB(A){const B=G[A];if(!B)return;const{id:Q}=n[B];return{id:Q,scopeName:B}}const IB=new Map;let DB,wB;async function oB(A){if(IB.has(A))return IB.get(A);const Q=function(A){return n[A]}(A);if(!Q)return Promise.resolve(void 0);let g;if(void 0===DB&&(g=sB(Q.path),DB=g.then((()=>!0)).catch((()=>!1))),void 0===wB&&(wB=await DB),wB){const B=g||sB(Q.path);return IB.set(A,B),B}const E=B(`grammars/${Q.id}`);Q.embeddedScopes.forEach((A=>{if(!IB.has(A)){const B=E.then((B=>B.find((B=>B.scopeName===A))));IB.set(A,B)}}));const C=E.then((B=>B.find((B=>B.scopeName===A))));return IB.set(A,C),C}async function sB(B){return await A()}const eB=30720,cB=16744448,iB=16775168,tB=11,MB=15,hB={NotSet:-1,None:0,Italic:1,Bold:2,Underline:4,Strikethrough:8};function aB(A,B,Q,g){const{tokens:E,ruleStack:C}=A.tokenizeLine2(Q,B),I=[];let D=Q.length;for(let A=E.length-2;A>=0;A-=2){const B=E[A],g=E[A+1],C=Q.slice(B,D);I.unshift({content:C,metadata:g}),D=B}let w=[];if(null==g?void 0:g.preserveWhitespace)w=I;else for(let A=0;A0?w[w.length-1].content+=B.content:A{const{rawTokens:E,nextStack:C}=aB(B,g,A,{preserveWhitespace:!0}),I=E.map((({content:A,metadata:B})=>({content:A,style:GB(B,Q)}))),D=function(A,B,Q,g){const{tokens:E}=Q.tokenizeLine(A,B),C=[];for(let B=0;B{if(w+=A.content.length,Q>>MB]},g=(A&eB)>>>tB;return g&hB.Italic&&(Q.fontStyle="italic"),g&hB.Bold&&(Q.fontWeight="bold"),g&hB.Underline&&(Q.textDecoration="underline"),g&hB.Strikethrough&&(Q.textDecoration="line-through"),Q}var nB=function(A){var B=null;if("undefined"!=typeof process&&null!=process.versions&&null!=process.versions.node)B=Buffer.from(A,"base64");else{var Q=globalThis.atob(A),g=Q.length;B=new Uint8Array(new ArrayBuffer(g));for(var E=0;E({createOnigScanner:EB,createOnigString:gB})));rB=new ZA({onigLib:A,loadGrammar:A=>oB(A)})}const B=A.filter((A=>!NB(A))).map((A=>{const B=CB(A);if(!B)throw new kB(A);return rB.loadGrammar(B.scopeName)}));return Promise.all(B)}function HB(A){if(NB(A))return{langId:A,grammar:null};const B=CB(A);if(!B)throw new kB(A);const Q=function(A){const{_syncRegistry:B}=rB;return null==B?void 0:B._grammars.get(A)}(B.scopeName);if(!Q)throw new Error(`Syntax highlighting error: grammar for ${A} not loaded`);return{langId:B.id,grammar:Q}}class kB extends Error{constructor(A){super(`Unknown language: ${A}`),this.alias=A}}function RB(A,B,Q){rB.setTheme(Q);const g=function(A){const B=rB.getColorMap();return A.colorNames?B.map((B=>Object.keys(A.colorNames).find((Q=>A.colorNames[Q].toUpperCase()===B.toUpperCase()))||B)):B}(Q);return function(A,B,Q){let g=null;return A.split(/\r?\n|\r/g).map((A=>{const{rawTokens:E,nextStack:C}=aB(B,g,A);return g=C,E.map((({content:A,metadata:B})=>({content:A,style:GB(B,Q)})))}))}(A,B,g)}function KB(A){return A.split(/\r?\n|\r/g).map((A=>[{content:A,style:{}}]))}function YB(A,B){return PB(A.slice(1,-1)).map((A=>{const{from:Q,to:g}=UB(A);return{lineNumber:B,fromColumn:Q,toColumn:g}}))}function UB(A){const[B,Q]=A.split(":");if(!uB(B))throw new JB(B);const g=Number(B);if(g<1)throw new yB;if(Q){if(!uB(Q))throw new JB(Q);return{from:g,to:+Q}}return{from:g,to:g}}function PB(A){return A.split(/,(?![^\[]*\])/g)}function uB(A){A=A.toString();var B=Math.abs(A),Q=parseInt(A,10);return!isNaN(B)&&Q===B&&B.toString()===A}class JB extends Error{constructor(A){super(`Invalid number "${A}" in range string`),this.number=A,Object.setPrototypeOf(this,new.target.prototype)}}class yB extends Error{constructor(){super("Invalid line or column number in range string"),Object.setPrototypeOf(this,new.target.prototype)}}const SB="#001",pB="#010",lB={name:"comments",type:"light",foreground:"",background:"",colors:{},settings:[{settings:{foreground:"#000"}},{scope:["punctuation.definition.comment"],settings:{foreground:SB}},{scope:"comment",settings:{foreground:pB}}]};function dB(A,B,Q,g){const E=B?RB(A,B,lB):KB(A),C=[];let I=1;const D=E.map((A=>{const{annotations:B,lineWithoutComments:E}=function(A,B,Q){if(!A.some((A=>A.style.color===SB)))return{annotations:[],lineWithoutComments:A};const g=[];let E=0;for(;E!A.tokens.includes(B)));C.every((A=>""===A.content.trim()))&&(C=null);return{annotations:g.map((A=>({name:A.name,query:A.query,lineNumber:A.lineNumber,rangeString:A.rangeString}))),lineWithoutComments:C}}(A,g,I);if(C.push(...B),!E)return null;const D=E.map((A=>A.content)).join("");return["mdx","jsx","tsx"].includes(Q)&&B.length>0&&"{}"===D.trim()?null:(I++,D)})).filter((A=>null!==A)).join("\n"),w=C.map((A=>{var{rangeString:B,lineNumber:Q}=A,g=function(A,B){var Q={};for(var g in A)Object.prototype.hasOwnProperty.call(A,g)&&B.indexOf(g)<0&&(Q[g]=A[g]);if(null!=A&&"function"==typeof Object.getOwnPropertySymbols){var E=0;for(g=Object.getOwnPropertySymbols(A);E{if(A.includes("[")){const[Q,g]=A.split("["),E=Number(Q),C=B+E-1;if(!uB(C))throw new JB(Q);return YB("["+g,C)}const{from:Q,to:g}=UB(A);return[{fromLineNumber:Q+B-1,toLineNumber:g+B-1}]})).flat():[{fromLineNumber:B,toLineNumber:B}]}(B,Q);return Object.assign(Object.assign({},g),{ranges:E})}));return{newCode:D,annotations:w}}function xB(A,B){var Q;const g=A.match(/\s*([\w-]+)?(\([^\)]*\)|\[[^\]]*\])?(.*)$/),E=g[1],C=g[2],I=null===(Q=g[3])||void 0===Q?void 0:Q.trim();return B.includes(E)?{name:E,rangeString:C,query:I}:null}function fB(A,B){let Q=[],g=1;return A.forEach((A=>{Q.push({fromColumn:g,toColumn:g+A.content.length-1,token:A}),g+=A.content.length})),B.forEach((A=>{Q=function(A,B){const{range:Q}=B,{fromColumn:g,toColumn:E}=Q,C=[];let I=0;for(;IE){const[A,Q]=OB(B,E+1);D.tokens.push(A),C.push(Q)}else D.tokens.push(B);I++}else C.push(D);for(;ImB(A)))}function mB(A){return"tokens"in A?{annotationName:A.annotationName,annotationQuery:A.annotationQuery,fromColumn:A.fromColumn,toColumn:A.toColumn,tokens:A.tokens.map((A=>mB(A)))}:A.token}function OB(A,B){if("token"in A){const Q=Object.assign(Object.assign({},A.token),{content:A.token.content.slice(0,B-A.fromColumn)}),g=Object.assign(Object.assign({},A.token),{content:A.token.content.slice(B-A.fromColumn)});return[Object.assign(Object.assign({},A),{toColumn:B-1,token:Q}),Object.assign(Object.assign({},A),{fromColumn:B,token:g})]}{const Q=[],g=[];A.tokens.forEach((A=>{if(A.toColumn=B)g.push(A);else{const[E,C]=OB(A,B);Q.push(E),g.push(C)}}));return[Object.assign(Object.assign({},A),{toColumn:B-1,tokens:Q}),Object.assign(Object.assign({},A),{fromColumn:B,tokens:g})]}}function qB(A,B){let Q=A.map(((A,B)=>({fromLineNumber:B+1,toLineNumber:B+1,line:A})));return B.forEach((A=>{Q=function(A,B){const{range:Q,name:g,query:E}=B,{fromLineNumber:C,toLineNumber:I}=Q,D=[];let w=0;for(;wI){const[A,Q]=WB(B,I+1);o.lines.push(A),D.push(Q)}else o.lines.push(B);w++}else D.push(o);for(;wbB(A)))}function bB(A){return"line"in A?{lineNumber:A.fromLineNumber,tokens:A.line.tokens}:{annotationName:A.annotationName,annotationQuery:A.annotationQuery,fromLineNumber:A.fromLineNumber,toLineNumber:A.toLineNumber,lines:A.lines.map((A=>bB(A)))}}function WB(A,B){if("line"in A)return[Object.assign(Object.assign({},A),{toLineNumber:B-1}),Object.assign(Object.assign({},A),{fromLineNumber:B})];{const Q=[],g=[];return A.lines.forEach((A=>{if(A.toLineNumber=B)g.push(A);else{const[E,C]=WB(A,B);Q.push(E),g.push(C)}})),[Object.assign(Object.assign({},A),{toLineNumber:B-1,lines:Q}),Object.assign(Object.assign({},A),{fromLineNumber:B,lines:g})]}}function TB(A,B){const{inlineAnnotations:Q,multilineAnnotations:g}=function(A){const B=[],Q=[];return A.forEach((A=>{A.ranges.forEach((g=>{"lineNumber"in g?B.push(Object.assign(Object.assign({},A),{range:g})):Q.push(Object.assign(Object.assign({},A),{range:g}))}))})),{inlineAnnotations:B,multilineAnnotations:Q}}(B);return qB(A.map(((A,B)=>{const g=Q.filter((A=>A.range.lineNumber===B+1));return{lineNumber:B+1,tokens:fB(A,g)}})),g)}var XB=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],vB={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",9:"strikethrough"};function ZB(A,B){const Q=A.indexOf("[",B);if(-1!==Q){const B=A.indexOf("m",Q);return{sequence:A.substring(Q+2,B).split(";"),startPosition:Q,position:B+1}}return{position:A.length}}function jB(A,B){let Q=1;const g=A[B+Q++];let E;if("2"===g){const g=[A[B+Q++],A[B+Q++],A[B+Q]].map((A=>Number.parseInt(A)));3!==g.length||g.some((A=>Number.isNaN(A)))||(E={type:"rgb",rgb:g})}else if("5"===g){const g=Number.parseInt(A[B+Q]);Number.isNaN(g)||(E={type:"table",index:Number(g)})}return[Q,E]}function VB(A){const B=[];for(let Q=0;Q=90&&E<=97?B.push({type:"setForegroundColor",value:{type:"named",name:XB[E-90+8]}}):E>=100&&E<=107&&B.push({type:"setBackgroundColor",value:{type:"named",name:XB[E-100+8]}})}return B}function zB(A,B){const Q=function(){let A=null,B=null,Q=new Set;return{parse(g){const E=[];let C=0;do{const I=ZB(g,C),D=I.sequence?g.substring(C,I.startPosition):g.substring(C);if(D.length>0&&E.push({value:D,foreground:A,background:B,decorations:new Set(Q)}),I.sequence){const g=VB(I.sequence);for(const E of g)"resetAll"===E.type?(A=null,B=null,Q.clear()):"resetForegroundColor"===E.type?A=null:"resetBackgroundColor"===E.type?B=null:"resetDecoration"===E.type&&Q.delete(E.value);for(const E of g)"setForegroundColor"===E.type?A=E.value:"setBackgroundColor"===E.type?B=E.value:"setDecoration"===E.type&&Q.add(E.value)}C=I.position}while(Cfunction(A,B,Q){const g=A.parse(B),E=g.map((({value:A,foreground:B,background:g,decorations:E})=>{const C=_B(B,Q),I={};C&&(I.color=C);const D=_B(g,Q);return D&&(I.background=D),E.has("bold")&&(I.fontWeight="bold"),E.has("italic")&&(I.fontStyle="italic"),E.has("underline")&&(I.textDecoration="underline"),E.has("strikethrough")&&(I.textDecoration="line-through"),E.has("reverse")&&(I.color=D,I.background=C),E.has("dim")&&(I.opacity=.5),{content:A,style:I}}));return E}(Q,A,B)));return g}function _B(A,B){if(A){if("named"===A.type){return D(B,"terminal.ansi"+(A.name[0].toUpperCase()+A.name.slice(1)))}if("rgb"===A.type){const[B,Q,g]=A.rgb;return`rgb(${B}, ${Q}, ${g})`}}}async function $B(A,B){await Promise.all([LB(A),c(B)])}async function AQ(A,B,Q="dark-plus",g={}){const E=A||"",C=B||"text";if("string"!=typeof E)throw new Error("Syntax highlighter error: code must be a string");if("string"!=typeof C)throw new Error("Syntax highlighter error: lang must be a string");return await $B([C],Q),BQ(E,C,Q,g)}function BQ(A,B,Q="dark-plus",g={}){const E=A||"",C=B||"text";if("string"!=typeof E)throw new Error("Syntax highlighter error: code must be a string");if("string"!=typeof C)throw new Error("Syntax highlighter error: lang must be a string");const{langId:I,grammar:w}=HB(C),o=i(Q),s="text"==I?KB(E):"terminal"==I?zB(E,o):(null==g?void 0:g.scopes)?function(A,B,Q){return rB.setTheme(Q),FB(A,B,rB.getColorMap())}(E,w,o):RB(E,w,o),e="terminal"==I?function(A){return{color:D(A,"terminal.foreground"),background:D(A,"terminal.background")}}(o):{color:o.foreground,background:o.background};if(function(A){return"annotations"in A}(g)){return{lines:TB(s,(null==g?void 0:g.annotations)||[]),lang:I,style:e}}return{lines:s,lang:I,style:e}}async function QQ(A,B,Q){if(!Q)return{code:A,annotations:[]};await LB([B]);const{grammar:g}=HB(B),{newCode:E,annotations:C}=dB(A,g,B,Q);return{code:E,annotations:C}}async function gQ(A){if(!A)throw new Error("Syntax highlighter error: undefined theme");await $B([],A);return a(i(A))}function EQ(A){if(!A)throw new Error("Syntax highlighter error: undefined theme");return a(i(A))}export{F as LANG_NAMES,M as THEME_NAMES,kB as UnknownLanguageError,h as UnknownThemeError,QQ as extractAnnotations,gQ as getThemeColors,EQ as getThemeColorsSync,AQ as highlight,BQ as highlightSync,$B as preload}; diff --git a/lib/dist/index.cjs.js b/lib/dist/index.cjs.js index 8c10740..bf4c987 100644 --- a/lib/dist/index.cjs.js +++ b/lib/dist/index.cjs.js @@ -1 +1 @@ -"use strict";function A(A){if(A&&A.__esModule)return A;var B=Object.create(null);return A&&Object.keys(A).forEach((function(Q){if("default"!==Q){var g=Object.getOwnPropertyDescriptor(A,Q);Object.defineProperty(B,Q,g.get?g:{enumerable:!0,get:function(){return A[Q]}})}})),B.default=A,Object.freeze(B)}function B(A,B){var Q=require("fs"),g=require("path"),E=g.parse,C=require("os");var I=function(A,B){var Q="/";/^([A-Za-z]:)/.test(A)?Q="":/^\\\\/.test(A)&&(Q="\\\\");for(var C=[A],I=E(A);I.dir!==C[C.length-1];)C.push(I.dir),I=E(I.dir);return C.reduce((function(A,E){return A.concat(B.map((function(A){return g.resolve(Q,E,A)})))}),[])};const D=C.homedir||function(){var A=process.env.HOME,B=process.env.LOGNAME||process.env.USER||process.env.LNAME||process.env.USERNAME;return"win32"===process.platform?process.env.USERPROFILE||process.env.HOMEDRIVE+process.env.HOMEPATH||A||null:"darwin"===process.platform?A||(B?"/Users/"+B:null):"linux"===process.platform?A||(0===process.getuid()?"/root":B?"/home/"+B:null):A||null};var w="win32"!==process.platform&&Q.realpathSync&&"function"==typeof Q.realpathSync.native?Q.realpathSync.native:Q.realpathSync,o=D(),s=function(A,B,Q){return Q&&!1===Q.preserveSymlinks?A(B):B},e=function(A,B,Q){for(var E=function(A,B,Q){var g=B&&B.moduleDirectory?[].concat(B.moduleDirectory):["node_modules"];if(B&&"function"==typeof B.paths)return B.paths(Q,A,(function(){return I(A,g)}),B);var E=I(A,g);return B&&B.paths?E.concat(B.paths):E}(B,Q,A),C=0;CA.promises)),C=await Promise.resolve().then((function(){return A(require("path"))})),{URL:I}=await Promise.resolve().then((function(){return A(require("url"))})),D=new I(".","undefined"==typeof document?new(require("url").URL)("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("index.cjs.js",document.baseURI).href).pathname;try{let A=C.resolve(D,"..",Q),B=C.resolve(A,g);const I=await E.readFile(B,"utf8");if(!I)throw new Error("no results");return JSON.parse(I)}catch(A){const I=B("@code-hike/lighter",{basedir:D});let w=C.resolve(I,"..","..",Q),o=C.resolve(w,g);return JSON.parse(await E.readFile(o,"utf8"))}}async function g(B){if("function"==typeof fetch){const A=await fetch(`https://lighter.codehike.org/${B}.json`);return await A.json()}const Q=await Promise.resolve().then((function(){return A(require("https"))})),g={host:"lighter.codehike.org",path:`/${B}.json`,method:"GET"};return new Promise(((A,B)=>{const E=Q.request(g,(B=>{let Q="";B.on("data",(A=>{Q+=A})),B.on("end",(()=>{A(JSON.parse(Q))}))}));E.on("error",(A=>{B(A)})),E.end()}))}Object.defineProperty(exports,"__esModule",{value:!0});const E=A=>/^#([A-Fa-f0-9]{3,4}){1,2}$/.test(A),C=(A,B)=>A.match(new RegExp(`.{${B}}`,"g")),I=A=>parseInt(A.repeat(2/A.length),16);function D(A,B){return void 0!==A?A/255:"number"!=typeof B||B<0||B>1?1:B}function w(A,B){if(!A)return A;const{r:Q,g:g,b:w,a:o}=function(A){if(!A)return;if(!E(A))throw new Error("Invalid color string, must be a valid hex color");const B=Math.floor((A.length-1)/3),Q=C(A.slice(1),B),[g,w,o,s]=Q.map(I);return{r:g,g:w,b:o,a:D(s,1)}}(A);return function(A){if(!A)return;const{r:B,g:Q,b:g,a:E}=A,C=Math.round(255*E);return`#${B.toString(16).padStart(2,"0")}${Q.toString(16).padStart(2,"0")}${g.toString(16).padStart(2,"0")}${C.toString(16).padStart(2,"0")}`}({r:Q,g:g,b:w,a:o*B})}function o(A,B){const Q=A.colors||{};if(Q[B])return Q[B];const g=e[B];if(!g)throw new Error(`Unknown theme color key: ${B}`);return"string"==typeof g?o(A,g):function(A,B){const Q=B[A.type];if(Array.isArray(Q)){const[B,g,...E]=Q;return B(o(A,g),...E)}return Q}(A,g)}const s="#6FC3DF",e={"editor.foreground":{dark:"#bbbbbb",light:"#333333",hc:"#ffffff"},"editorLineNumber.foreground":{dark:"#858585",light:"#237893",hc:"#fffffe"},"editor.selectionBackground":{light:"#ADD6FF",dark:"#264F78",hc:"#f3f518"},"editor.background":{light:"#fffffe",dark:"#1E1E1E",hc:"#000000"},"editorGroupHeader.tabsBackground":{dark:"#252526",light:"#F3F3F3"},"tab.activeBackground":"editor.background","tab.activeForeground":{dark:"#ffffff",light:"#333333",hc:"#ffffff"},"tab.border":{dark:"#252526",light:"#F3F3F3",hc:s},"tab.activeBorder":"tab.activeBackground","tab.inactiveBackground":{dark:"#2D2D2D",light:"#ECECEC"},"tab.inactiveForeground":{dark:[w,"tab.activeForeground",.5],light:[w,"tab.activeForeground",.5],hc:"#ffffff"},"diffEditor.insertedTextBackground":{dark:"#9ccc2c33",light:"#9ccc2c40"},"diffEditor.removedTextBackground":{dark:"#ff000033",light:"#ff000033"},"diffEditor.insertedLineBackground":{dark:"#9bb95533",light:"#9bb95533"},"diffEditor.removedLineBackground":{dark:"#ff000033",light:"#ff000033"},"icon.foreground":{dark:"#C5C5C5",light:"#424242",hc:"#FFFFFF"},"sideBar.background":{dark:"#252526",light:"#F3F3F3",hc:"#000000"},"sideBar.foreground":"editor.foreground","sideBar.border":"sideBar.background","list.inactiveSelectionBackground":{dark:"#37373D",light:"#E4E6F1"},"list.inactiveSelectionForeground":{},"list.hoverBackground":{dark:"#2A2D2E",light:"#F0F0F0"},"list.hoverForeground":{},"editorGroupHeader.tabsBorder":{hc:s},"tab.activeBorderTop":{hc:s},"tab.hoverBackground":"tab.inactiveBackground","tab.hoverForeground":"tab.inactiveForeground","editor.rangeHighlightBackground":{dark:"#ffffff0b",light:"#fdff0033"},"editor.infoForeground":{dark:"#3794FF",light:"#1a85ff",hc:"#3794FF"},"input.border":{hc:s},"input.background":{dark:"#3C3C3C",light:"#fffffe",hc:"#000000"},"input.foreground":"editor.foreground","editor.lineHighlightBackground":{},focusBorder:{light:"#0090F1",dark:"#007FD4",hc:s},"editorGroup.border":{dark:"#444444",light:"#E7E7E7",hc:s},"list.activeSelectionBackground":{dark:"#094771",light:"#0060C0",hc:"#000000"},"list.activeSelectionForeground":{dark:"#fffffe",light:"#fffffe",hc:"#fffffe"},"lighter.inlineBackground":{dark:[w,"editor.background",.9],light:[w,"editor.background",.9]},"terminal.background":"editor.background","terminal.foreground":"editor.foreground","terminal.ansiBlack":{dark:"#000000",light:"#000000",hc:"#000000"},"terminal.ansiRed":{dark:"#cd3131",light:"#cd3131",hc:"#cd0000"},"terminal.ansiGreen":{dark:"#0DBC79",light:"#00BC00",hc:"#00cd00"},"terminal.ansiYellow":{dark:"#e5e510",light:"#949800",hc:"#cdcd00"},"terminal.ansiBlue":{dark:"#2472c8",light:"#0451a5",hc:"#0000ee"},"terminal.ansiMagenta":{dark:"#bc3fbc",light:"#bc05bc",hc:"#cd00cd"},"terminal.ansiCyan":{dark:"#11a8cd",light:"#0598bc",hc:"#00cdcd"},"terminal.ansiWhite":{dark:"#e5e5e5",light:"#555555",hc:"#e5e5e5"},"terminal.ansiBrightBlack":{dark:"#666666",light:"#666666",hc:"#7f7f7f"},"terminal.ansiBrightRed":{dark:"#f14c4c",light:"#cd3131",hc:"#ff0000"},"terminal.ansiBrightGreen":{dark:"#23d18b",light:"#14CE14",hc:"#00ff00"},"terminal.ansiBrightYellow":{dark:"#f5f543",light:"#b5ba00",hc:"#ffff00"},"terminal.ansiBrightBlue":{dark:"#3b8eea",light:"#0451a5",hc:"#5c5cff"},"terminal.ansiBrightMagenta":{dark:"#d670d6",light:"#bc05bc",hc:"#ff00ff"},"terminal.ansiBrightCyan":{dark:"#29b8db",light:"#0598bc",hc:"#00ffff"},"terminal.ansiBrightWhite":{dark:"#e5e5e5",light:"#a5a5a5",hc:"#ffffff"}},c=new Map,i=new Map;async function t(A){if("string"==typeof A){const B=A;if(!a.includes(B))throw new n(B);if(!c.has(B)){const A=async function(A){try{return await Q("themes",A+".json")}catch(B){return await g(`themes/${A}`)}}(B).then((A=>(i.set(B,A),A)));c.set(B,A)}return c.get(B)}return A}function M(A){let B=null;if("string"==typeof A){if(B=i.get(A),!B)throw new Error("Syntax highlighting error: theme not loaded")}else B=A;return function(A){if(!A)return;const B=A.settings||A.tokenColors||[],Q={name:A.name||"unknown-theme",type:h(A),foreground:"",background:"",settings:B,colors:A.colors||{},colorNames:A.colorNames},g=B.find((A=>!A.scope));if(g){const{foreground:A,background:B}=(null==g?void 0:g.settings)||{},E={};A&&!Q.colors["editor.foreground"]&&(E["editor.foreground"]=A),B&&!Q.colors["editor.background"]&&(E["editor.background"]=B),Object.keys(E).length>0&&(Q.colors=Object.assign(Object.assign({},Q.colors),E)),Q.foreground=A,Q.background=B}g||(Q.settings=[{settings:{foreground:o(Q,"editor.foreground"),background:o(Q,"editor.background")}},...Q.settings]);if(Q.background=Q.background||o(Q,"editor.background"),Q.foreground=Q.foreground||o(Q,"editor.foreground"),"from-css"===A.type&&!Q.colorNames){const A={};let B=0;Q.settings=Q.settings.map((Q=>{const g=Object.assign(Object.assign({},Q),{settings:Object.assign({},Q.settings)}),{foreground:E,background:C}=g.settings||{};return E&&!A[E]&&(A[E]=`#${B.toString(16).padStart(6,"0")}`,B++),C&&!A[C]&&(A[C]=`#${B.toString(16).padStart(6,"0")}`,B++),E&&(g.settings.foreground=A[E]),C&&(g.settings.background=A[C]),g})),Q.colorNames=A}return Q}(B)}function h(A){var B;if("from-css"===A.type)return"from-css";return"light"===(A.type?A.type:(null===(B=A.name)||void 0===B?void 0:B.toLowerCase().includes("light"))?"light":"dark")?"light":"dark"}const a=["dark-plus","dracula-soft","dracula","github-dark","github-dark-dimmed","github-from-css","github-light","light-plus","material-darker","material-default","material-from-css","material-lighter","material-ocean","material-palenight","min-dark","min-light","monokai","nord","one-dark-pro","poimandres","slack-dark","slack-ochin","solarized-dark","solarized-light"];class n extends Error{constructor(A){super(`Unknown theme: ${A}`),this.theme=A}}function F(A){const B=B=>"colorScheme"===B?function(A){return"from-css"===A.type?"var(--ch-0)":A.type}(A):"foreground"===B?A.foreground:"background"===B?A.background:o(A,B);return{colorScheme:B("colorScheme"),foreground:B("foreground"),background:B("background"),lighter:{inlineBackground:B("lighter.inlineBackground")},editor:{background:B("editor.background"),foreground:B("editor.foreground"),lineHighlightBackground:B("editor.lineHighlightBackground"),rangeHighlightBackground:B("editor.rangeHighlightBackground"),infoForeground:B("editor.infoForeground"),selectionBackground:B("editor.selectionBackground")},focusBorder:B("focusBorder"),tab:{activeBackground:B("tab.activeBackground"),activeForeground:B("tab.activeForeground"),inactiveBackground:B("tab.inactiveBackground"),inactiveForeground:B("tab.inactiveForeground"),border:B("tab.border"),activeBorder:B("tab.activeBorder"),activeBorderTop:B("tab.activeBorderTop")},editorGroup:{border:B("editorGroup.border")},editorGroupHeader:{tabsBackground:B("editorGroupHeader.tabsBackground")},editorLineNumber:{foreground:B("editorLineNumber.foreground")},input:{background:B("input.background"),foreground:B("input.foreground"),border:B("input.border")},icon:{foreground:B("icon.foreground")},sideBar:{background:B("sideBar.background"),foreground:B("sideBar.foreground"),border:B("sideBar.border")},list:{activeSelectionBackground:B("list.activeSelectionBackground"),activeSelectionForeground:B("list.activeSelectionForeground"),hoverBackground:B("list.hoverBackground"),hoverForeground:B("list.hoverForeground")}}}const r={abap:"source.abap","actionscript-3":"source.actionscript.3",ada:"source.ada",apache:"source.apacheconf",apex:"source.apex",apl:"source.apl",applescript:"source.applescript",ara:"source.ara",asm:"source.asm.x86_64",astro:"source.astro",awk:"source.awk",ballerina:"source.ballerina",bat:"source.batchfile",batch:"source.batchfile",beancount:"text.beancount",berry:"source.berry",be:"source.berry",bibtex:"text.bibtex",bicep:"source.bicep",blade:"text.html.php.blade",c:"source.c",cadence:"source.cadence",cdc:"source.cadence",clarity:"source.clar",clojure:"source.clojure",clj:"source.clojure",cmake:"source.cmake",cobol:"source.cobol",codeql:"source.ql",ql:"source.ql",coffee:"source.coffee",cpp:"source.cpp",crystal:"source.crystal",csharp:"source.cs","c#":"source.cs",cs:"source.cs",css:"source.css",cue:"source.cue",cypher:"source.cypher",d:"source.d",dart:"source.dart",dax:"source.dax",diff:"source.diff",docker:"source.dockerfile",dockerfile:"source.dockerfile","dream-maker":"source.dm",elixir:"source.elixir",elm:"source.elm",erb:"text.html.erb",erlang:"source.erlang",erl:"source.erlang",fish:"source.fish",fsharp:"source.fsharp","f#":"source.fsharp",fs:"source.fsharp",gdresource:"source.gdresource",gdscript:"source.gdscript",gdshader:"source.gdshader",gherkin:"text.gherkin.feature","git-commit":"text.git-commit","git-rebase":"text.git-rebase","glimmer-js":"source.gjs","glimmer-ts":"source.gts",glsl:"source.glsl",gnuplot:"source.gnuplot",go:"source.go",graphql:"source.graphql",groovy:"source.groovy",hack:"source.hack",haml:"text.haml",handlebars:"text.html.handlebars",hbs:"text.html.handlebars",haskell:"source.haskell",hs:"source.haskell",hcl:"source.hcl",hjson:"source.hjson",hlsl:"source.hlsl",html:"text.html.basic",http:"source.http",imba:"source.imba",ini:"source.ini",properties:"source.ini",java:"source.java",javascript:"source.js",js:"source.js","jinja-html":"text.html.jinja",jison:"source.jison",json:"source.json",json5:"source.json5",jsonc:"source.json.comments",jsonl:"source.json.lines",jsonnet:"source.jsonnet",jssm:"source.jssm",fsl:"source.jssm",jsx:"source.js.jsx",julia:"source.julia",kotlin:"source.kotlin",kusto:"source.kusto",kql:"source.kusto",latex:"text.tex.latex",less:"source.css.less",liquid:"text.html.liquid",lisp:"source.lisp",logo:"source.logo",lua:"source.lua",make:"source.makefile",makefile:"source.makefile",markdown:"text.html.markdown",md:"text.html.markdown",marko:"text.marko",matlab:"source.matlab",mdx:"source.mdx",mermaid:"source.mermaid",narrat:"source.narrat",nextflow:"source.nextflow",nginx:"source.nginx",nim:"source.nim",nix:"source.nix","objective-c":"source.objc",objc:"source.objc","objective-cpp":"source.objcpp",ocaml:"source.ocaml",pascal:"source.pascal",perl:"source.perl",php:"source.php",plsql:"source.plsql.oracle",postcss:"source.css.postcss",powerquery:"source.powerquery",powershell:"source.powershell",ps:"source.powershell",ps1:"source.powershell",prisma:"source.prisma",prolog:"source.prolog",proto:"source.proto",pug:"text.pug",jade:"text.pug",puppet:"source.puppet",purescript:"source.purescript",python:"source.python",py:"source.python",r:"source.r",raku:"source.perl.6",perl6:"source.perl.6",razor:"text.aspnetcorerazor",reg:"source.reg",rel:"source.rel",riscv:"source.riscv",rst:"source.rst",ruby:"source.ruby",rb:"source.ruby",rust:"source.rust",rs:"source.rust",sas:"source.sas",sass:"source.sass",scala:"source.scala",scheme:"source.scheme",scss:"source.css.scss",shaderlab:"source.shaderlab",shader:"source.shaderlab",shellscript:"source.shell",bash:"source.shell",console:"source.shell",sh:"source.shell",shell:"source.shell",zsh:"source.shell",shellsession:"text.shell-session",smalltalk:"source.smalltalk",solidity:"source.solidity",sparql:"source.sparql",sql:"source.sql","ssh-config":"source.ssh-config",stata:"source.stata",stylus:"source.stylus",styl:"source.stylus",svelte:"source.svelte",swift:"source.swift","system-verilog":"source.systemverilog",tasl:"source.tasl",tcl:"source.tcl",tex:"text.tex",toml:"source.toml",tsx:"source.tsx",turtle:"source.turtle",twig:"text.html.twig",txt:"source.txt",typescript:"source.ts",ts:"source.ts",v:"source.v",vb:"source.asp.vb.net",cmd:"source.asp.vb.net",verilog:"source.verilog",vhdl:"source.vhdl",viml:"source.viml",vim:"source.viml",vimscript:"source.viml","vue-html":"text.html.vue-html",vue:"source.vue",vyper:"source.vyper",wasm:"source.wat",wenyan:"source.wenyan","文言":"source.wenyan",wgsl:"source.wgsl",wolfram:"source.wolfram",xml:"text.xml",xsl:"text.xml.xsl",yaml:"source.yaml",yml:"source.yaml",zenscript:"source.zenscript"},G={"source.abap":{id:"abap",path:"abap.tmLanguage.json",embeddedScopes:[]},"source.actionscript.3":{id:"actionscript-3",path:"actionscript-3.tmLanguage.json",embeddedScopes:[]},"source.ada":{id:"ada",path:"ada.tmLanguage.json",embeddedScopes:[]},"source.apacheconf":{id:"apache",path:"apache.tmLanguage.json",embeddedScopes:[]},"source.apex":{id:"apex",path:"apex.tmLanguage.json",embeddedScopes:[]},"source.apl":{id:"apl",path:"apl.tmLanguage.json",embeddedScopes:["source.java","source.json","source.js","source.css","text.xml","text.html.basic"]},"source.applescript":{id:"applescript",path:"applescript.tmLanguage.json",embeddedScopes:[]},"source.ara":{id:"ara",path:"ara.tmLanguage.json",embeddedScopes:[]},"source.asm.x86_64":{id:"asm",path:"asm.tmLanguage.json",embeddedScopes:[]},"source.astro":{id:"astro",path:"astro.tmLanguage.json",embeddedScopes:["source.tsx","source.css.postcss","source.css.less","source.css.scss","source.css","source.sass","source.stylus","source.ts","source.js","source.json"]},"source.awk":{id:"awk",path:"awk.tmLanguage.json",embeddedScopes:[]},"source.ballerina":{id:"ballerina",path:"ballerina.tmLanguage.json",embeddedScopes:[]},"source.batchfile":{id:"bat",path:"bat.tmLanguage.json",embeddedScopes:[]},"text.beancount":{id:"beancount",path:"beancount.tmLanguage.json",embeddedScopes:[]},"source.berry":{id:"berry",path:"berry.tmLanguage.json",embeddedScopes:[]},"text.bibtex":{id:"bibtex",path:"bibtex.tmLanguage.json",embeddedScopes:[]},"source.bicep":{id:"bicep",path:"bicep.tmLanguage.json",embeddedScopes:[]},"text.html.php.blade":{id:"blade",path:"blade.tmLanguage.json",embeddedScopes:["source.java","source.css","source.json","source.js","source.sql","text.xml","text.html.basic"]},"source.c":{id:"c",path:"c.tmLanguage.json",embeddedScopes:[]},"source.cadence":{id:"cadence",path:"cadence.tmLanguage.json",embeddedScopes:[]},"source.clar":{id:"clarity",path:"clarity.tmLanguage.json",embeddedScopes:[]},"source.clojure":{id:"clojure",path:"clojure.tmLanguage.json",embeddedScopes:[]},"source.cmake":{id:"cmake",path:"cmake.tmLanguage.json",embeddedScopes:[]},"source.cobol":{id:"cobol",path:"cobol.tmLanguage.json",embeddedScopes:["source.css","source.js","source.java","text.html.basic","source.sql"]},"source.ql":{id:"codeql",path:"codeql.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.stylus","source.sass","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.tsx","source.ts","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.css.scss","source.swift","source.objc","source.css.less","source.json.comments","source.json","source.js","text.pug","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.coffee","source.clojure","source.batchfile","source.yaml","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","text.html.basic","source.css","text.html.markdown"]},"source.coffee":{id:"coffee",path:"coffee.tmLanguage.json",embeddedScopes:["source.js"]},"source.cpp":{id:"cpp",path:"cpp.tmLanguage.json",embeddedScopes:["source.c","source.sql","source.glsl"]},"source.crystal":{id:"crystal",path:"crystal.tmLanguage.json",embeddedScopes:["source.shell","source.js","source.c","source.css","source.sql","text.html.basic"]},"source.cs":{id:"csharp",path:"csharp.tmLanguage.json",embeddedScopes:[]},"source.css":{id:"css",path:"css.tmLanguage.json",embeddedScopes:[]},"source.cue":{id:"cue",path:"cue.tmLanguage.json",embeddedScopes:[]},"source.cypher":{id:"cypher",path:"cypher.tmLanguage.json",embeddedScopes:[]},"source.d":{id:"d",path:"d.tmLanguage.json",embeddedScopes:[]},"source.dart":{id:"dart",path:"dart.tmLanguage.json",embeddedScopes:[]},"source.dax":{id:"dax",path:"dax.tmLanguage.json",embeddedScopes:[]},"source.diff":{id:"diff",path:"diff.tmLanguage.json",embeddedScopes:[]},"source.dockerfile":{id:"docker",path:"docker.tmLanguage.json",embeddedScopes:[]},"source.dm":{id:"dream-maker",path:"dream-maker.tmLanguage.json",embeddedScopes:[]},"source.elixir":{id:"elixir",path:"elixir.tmLanguage.json",embeddedScopes:["source.css","source.js","text.html.basic"]},"source.elm":{id:"elm",path:"elm.tmLanguage.json",embeddedScopes:["source.c","source.glsl"]},"text.html.erb":{id:"erb",path:"erb.tmLanguage.json",embeddedScopes:["source.java","source.lua","source.shell","source.c","source.sql","text.xml","source.css","source.js","source.ruby","text.html.basic"]},"source.erlang":{id:"erlang",path:"erlang.tmLanguage.json",embeddedScopes:[]},"source.fish":{id:"fish",path:"fish.tmLanguage.json",embeddedScopes:[]},"source.fsharp":{id:"fsharp",path:"fsharp.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.stylus","source.sass","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.cs","source.tsx","source.ts","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.css.scss","source.swift","source.objc","source.css.less","source.json.comments","source.json","source.js","text.pug","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.coffee","source.clojure","source.batchfile","source.yaml","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","text.html.basic","source.css","text.html.markdown"]},"source.gdresource":{id:"gdresource",path:"gdresource.tmLanguage.json",embeddedScopes:["source.gdscript","source.gdshader"]},"source.gdscript":{id:"gdscript",path:"gdscript.tmLanguage.json",embeddedScopes:[]},"source.gdshader":{id:"gdshader",path:"gdshader.tmLanguage.json",embeddedScopes:[]},"text.gherkin.feature":{id:"gherkin",path:"gherkin.tmLanguage.json",embeddedScopes:[]},"text.git-commit":{id:"git-commit",path:"git-commit.tmLanguage.json",embeddedScopes:["source.diff"]},"text.git-rebase":{id:"git-rebase",path:"git-rebase.tmLanguage.json",embeddedScopes:["source.shell"]},"source.gjs":{id:"glimmer-js",path:"glimmer-js.tmLanguage.json",embeddedScopes:["source.yaml","source.css","text.html.basic","text.html.handlebars","source.js"]},"source.gts":{id:"glimmer-ts",path:"glimmer-ts.tmLanguage.json",embeddedScopes:["source.yaml","source.js","source.css","text.html.basic","text.html.handlebars","source.ts"]},"source.glsl":{id:"glsl",path:"glsl.tmLanguage.json",embeddedScopes:["source.c"]},"source.gnuplot":{id:"gnuplot",path:"gnuplot.tmLanguage.json",embeddedScopes:[]},"source.go":{id:"go",path:"go.tmLanguage.json",embeddedScopes:[]},"source.graphql":{id:"graphql",path:"graphql.tmLanguage.json",embeddedScopes:["source.tsx","source.js.jsx","source.ts","source.js"]},"source.groovy":{id:"groovy",path:"groovy.tmLanguage.json",embeddedScopes:[]},"source.hack":{id:"hack",path:"hack.tmLanguage.json",embeddedScopes:["source.css","source.js","source.sql","text.html.basic"]},"text.haml":{id:"haml",path:"haml.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.stylus","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.tsx","source.ts","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.css.scss","source.swift","source.objc","source.css.less","source.json.comments","source.json","text.pug","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.clojure","source.batchfile","source.yaml","text.xml.xsl","source.asp.vb.net","source.php","source.r","source.perl","source.makefile","source.java","source.ini","source.lua","source.shell","source.c","source.sql","text.xml","text.html.basic","source.css","text.html.markdown","source.coffee","source.sass","source.js","source.ruby"]},"text.html.handlebars":{id:"handlebars",path:"handlebars.tmLanguage.json",embeddedScopes:["source.yaml","source.js","source.css","text.html.basic"]},"source.haskell":{id:"haskell",path:"haskell.tmLanguage.json",embeddedScopes:[]},"source.hcl":{id:"hcl",path:"hcl.tmLanguage.json",embeddedScopes:[]},"source.hjson":{id:"hjson",path:"hjson.tmLanguage.json",embeddedScopes:[]},"source.hlsl":{id:"hlsl",path:"hlsl.tmLanguage.json",embeddedScopes:[]},"text.html.basic":{id:"html",path:"html.tmLanguage.json",embeddedScopes:["source.css","source.js"]},"source.http":{id:"http",path:"http.tmLanguage.json",embeddedScopes:["source.tsx","source.js.jsx","source.ts","source.js","source.java","source.graphql","text.xml","source.json","source.shell"]},"source.imba":{id:"imba",path:"imba.tmLanguage.json",embeddedScopes:[]},"source.ini":{id:"ini",path:"ini.tmLanguage.json",embeddedScopes:[]},"source.java":{id:"java",path:"java.tmLanguage.json",embeddedScopes:[]},"source.js":{id:"javascript",path:"javascript.tmLanguage.json",embeddedScopes:[]},"text.html.jinja":{id:"jinja-html",path:"jinja-html.tmLanguage.json",embeddedScopes:["source.css","source.js","text.html.basic"]},"source.jison":{id:"jison",path:"jison.tmLanguage.json",embeddedScopes:["source.js"]},"source.json":{id:"json",path:"json.tmLanguage.json",embeddedScopes:[]},"source.json5":{id:"json5",path:"json5.tmLanguage.json",embeddedScopes:[]},"source.json.comments":{id:"jsonc",path:"jsonc.tmLanguage.json",embeddedScopes:[]},"source.json.lines":{id:"jsonl",path:"jsonl.tmLanguage.json",embeddedScopes:[]},"source.jsonnet":{id:"jsonnet",path:"jsonnet.tmLanguage.json",embeddedScopes:[]},"source.jssm":{id:"jssm",path:"jssm.tmLanguage.json",embeddedScopes:[]},"source.js.jsx":{id:"jsx",path:"jsx.tmLanguage.json",embeddedScopes:[]},"source.julia":{id:"julia",path:"julia.tmLanguage.json",embeddedScopes:["source.c","source.glsl","source.sql","source.r","source.js","source.python","source.cpp"]},"source.kotlin":{id:"kotlin",path:"kotlin.tmLanguage.json",embeddedScopes:[]},"source.kusto":{id:"kusto",path:"kusto.tmLanguage.json",embeddedScopes:[]},"text.tex.latex":{id:"latex",path:"latex.tmLanguage.json",embeddedScopes:["source.glsl","source.shell","source.sql","source.cpp","source.c","source.r","source.gnuplot","source.scala","source.rust","source.yaml","source.python","source.ts","source.js","source.ruby","source.julia","source.lua","source.java","text.xml","text.html.basic","source.haskell","source.css","text.tex"]},"source.css.less":{id:"less",path:"less.tmLanguage.json",embeddedScopes:["source.css"]},"text.html.liquid":{id:"liquid",path:"liquid.tmLanguage.json",embeddedScopes:["source.js","source.json","source.css","text.html.basic"]},"source.lisp":{id:"lisp",path:"lisp.tmLanguage.json",embeddedScopes:[]},"source.logo":{id:"logo",path:"logo.tmLanguage.json",embeddedScopes:[]},"source.lua":{id:"lua",path:"lua.tmLanguage.json",embeddedScopes:["source.c"]},"source.makefile":{id:"make",path:"make.tmLanguage.json",embeddedScopes:[]},"text.html.markdown":{id:"markdown",path:"markdown.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.stylus","source.sass","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.tsx","source.ts","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.css.scss","source.swift","source.objc","source.css.less","source.json.comments","source.json","source.js","text.pug","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.coffee","source.clojure","source.batchfile","source.yaml","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","text.html.basic","source.css"]},"text.marko":{id:"marko",path:"marko.tmLanguage.json",embeddedScopes:["source.js","source.css.scss","source.css.less","source.css"]},"source.matlab":{id:"matlab",path:"matlab.tmLanguage.json",embeddedScopes:[]},"source.mdx":{id:"mdx",path:"mdx.tmLanguage.json",embeddedScopes:["source.gnuplot","text.tex","source.stylus","source.sass","text.bibtex","text.tex.latex","text.html.handlebars","source.dart","source.fsharp","source.powershell","source.perl.6","source.json.comments","text.pug","source.groovy","text.git-rebase","text.git-commit","source.batchfile","text.xml.xsl","source.asp.vb.net","source.php","source.js.jsx","source.glsl","source.ts","source.swift","text.xml","source.sql","text.shell-session","source.shell","source.css.scss","source.scala","source.rust","source.ruby","source.r","source.python","source.perl","source.objc","text.html.markdown","source.makefile","source.lua","source.css.less","source.kotlin","source.julia","source.json","source.js","source.java","source.ini","text.html.basic","source.haskell","source.graphql","source.go","source.erlang","source.elm","source.elixir","source.dockerfile","source.diff","source.css","source.cs","source.cpp","source.coffee","source.clojure","source.c","source.yaml","source.toml","source.tsx"]},"source.mermaid":{id:"mermaid",path:"mermaid.tmLanguage.json",embeddedScopes:[]},"source.narrat":{id:"narrat",path:"narrat.tmLanguage.json",embeddedScopes:[]},"source.nextflow":{id:"nextflow",path:"nextflow.tmLanguage.json",embeddedScopes:[]},"source.nginx":{id:"nginx",path:"nginx.tmLanguage.json",embeddedScopes:["source.c","source.lua"]},"source.nim":{id:"nim",path:"nim.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.stylus","source.sass","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.tsx","source.ts","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.css.scss","source.swift","source.objc","source.css.less","source.json.comments","source.json","text.pug","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.coffee","source.clojure","source.batchfile","source.yaml","text.xml.xsl","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.ini","source.java","text.html.markdown","source.glsl","source.css","source.js","text.xml","text.html.basic","source.c"]},"source.nix":{id:"nix",path:"nix.tmLanguage.json",embeddedScopes:[]},"source.objc":{id:"objective-c",path:"objective-c.tmLanguage.json",embeddedScopes:[]},"source.objcpp":{id:"objective-cpp",path:"objective-cpp.tmLanguage.json",embeddedScopes:[]},"source.ocaml":{id:"ocaml",path:"ocaml.tmLanguage.json",embeddedScopes:[]},"source.pascal":{id:"pascal",path:"pascal.tmLanguage.json",embeddedScopes:[]},"source.perl":{id:"perl",path:"perl.tmLanguage.json",embeddedScopes:["source.java","source.sql","source.js","source.css","text.xml","text.html.basic"]},"source.php":{id:"php",path:"php.tmLanguage.json",embeddedScopes:["source.java","source.css","source.json","source.js","source.sql","text.xml","text.html.basic"]},"source.plsql.oracle":{id:"plsql",path:"plsql.tmLanguage.json",embeddedScopes:[]},"source.css.postcss":{id:"postcss",path:"postcss.tmLanguage.json",embeddedScopes:[]},"source.powerquery":{id:"powerquery",path:"powerquery.tmLanguage.json",embeddedScopes:[]},"source.powershell":{id:"powershell",path:"powershell.tmLanguage.json",embeddedScopes:[]},"source.prisma":{id:"prisma",path:"prisma.tmLanguage.json",embeddedScopes:[]},"source.prolog":{id:"prolog",path:"prolog.tmLanguage.json",embeddedScopes:[]},"source.proto":{id:"proto",path:"proto.tmLanguage.json",embeddedScopes:[]},"text.pug":{id:"pug",path:"pug.tmLanguage.json",embeddedScopes:["text.html.basic","source.coffee","source.stylus","source.css.scss","source.sass","source.css","source.js"]},"source.puppet":{id:"puppet",path:"puppet.tmLanguage.json",embeddedScopes:[]},"source.purescript":{id:"purescript",path:"purescript.tmLanguage.json",embeddedScopes:[]},"source.python":{id:"python",path:"python.tmLanguage.json",embeddedScopes:[]},"source.r":{id:"r",path:"r.tmLanguage.json",embeddedScopes:[]},"source.perl.6":{id:"raku",path:"raku.tmLanguage.json",embeddedScopes:[]},"text.aspnetcorerazor":{id:"razor",path:"razor.tmLanguage.json",embeddedScopes:["source.css","source.js","source.cs","text.html.basic"]},"source.reg":{id:"reg",path:"reg.tmLanguage.json",embeddedScopes:[]},"source.rel":{id:"rel",path:"rel.tmLanguage.json",embeddedScopes:[]},"source.riscv":{id:"riscv",path:"riscv.tmLanguage.json",embeddedScopes:[]},"source.rst":{id:"rst",path:"rst.tmLanguage.json",embeddedScopes:["source.java","source.lua","source.c","source.css","text.xml","text.html.basic","source.sql","source.glsl","source.ruby","source.cmake","source.yaml","source.shell","source.js","source.python","source.cpp"]},"source.ruby":{id:"ruby",path:"ruby.tmLanguage.json",embeddedScopes:["source.java","source.lua","source.shell","source.js","source.c","source.css","source.sql","text.xml","text.html.basic"]},"source.rust":{id:"rust",path:"rust.tmLanguage.json",embeddedScopes:[]},"source.sas":{id:"sas",path:"sas.tmLanguage.json",embeddedScopes:["source.sql"]},"source.sass":{id:"sass",path:"sass.tmLanguage.json",embeddedScopes:[]},"source.scala":{id:"scala",path:"scala.tmLanguage.json",embeddedScopes:[]},"source.scheme":{id:"scheme",path:"scheme.tmLanguage.json",embeddedScopes:[]},"source.css.scss":{id:"scss",path:"scss.tmLanguage.json",embeddedScopes:["source.css"]},"source.shaderlab":{id:"shaderlab",path:"shaderlab.tmLanguage.json",embeddedScopes:["source.hlsl"]},"source.shell":{id:"shellscript",path:"shellscript.tmLanguage.json",embeddedScopes:[]},"text.shell-session":{id:"shellsession",path:"shellsession.tmLanguage.json",embeddedScopes:["source.shell"]},"source.smalltalk":{id:"smalltalk",path:"smalltalk.tmLanguage.json",embeddedScopes:[]},"source.solidity":{id:"solidity",path:"solidity.tmLanguage.json",embeddedScopes:[]},"source.sparql":{id:"sparql",path:"sparql.tmLanguage.json",embeddedScopes:["source.turtle"]},"source.sql":{id:"sql",path:"sql.tmLanguage.json",embeddedScopes:[]},"source.ssh-config":{id:"ssh-config",path:"ssh-config.tmLanguage.json",embeddedScopes:[]},"source.stata":{id:"stata",path:"stata.tmLanguage.json",embeddedScopes:["source.sql"]},"source.stylus":{id:"stylus",path:"stylus.tmLanguage.json",embeddedScopes:[]},"source.svelte":{id:"svelte",path:"svelte.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.tsx","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.swift","source.objc","source.json.comments","source.json","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.clojure","source.batchfile","source.yaml","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","text.html.basic","text.html.markdown","text.pug","source.css.postcss","source.css.less","source.css.scss","source.css","source.sass","source.stylus","source.coffee","source.ts","source.js"]},"source.swift":{id:"swift",path:"swift.tmLanguage.json",embeddedScopes:[]},"source.systemverilog":{id:"system-verilog",path:"system-verilog.tmLanguage.json",embeddedScopes:[]},"source.tasl":{id:"tasl",path:"tasl.tmLanguage.json",embeddedScopes:[]},"source.tcl":{id:"tcl",path:"tcl.tmLanguage.json",embeddedScopes:[]},"text.tex":{id:"tex",path:"tex.tmLanguage.json",embeddedScopes:["source.r"]},"source.toml":{id:"toml",path:"toml.tmLanguage.json",embeddedScopes:[]},"source.tsx":{id:"tsx",path:"tsx.tmLanguage.json",embeddedScopes:[]},"source.turtle":{id:"turtle",path:"turtle.tmLanguage.json",embeddedScopes:[]},"text.html.twig":{id:"twig",path:"twig.tmLanguage.json",embeddedScopes:["source.java","source.lua","source.shell","source.c","source.json","source.sql","text.xml","text.html.basic","source.ruby","source.python","source.php","source.js","source.css"]},"source.txt":{id:"txt",path:"txt.tmLanguage.json",embeddedScopes:[]},"source.ts":{id:"typescript",path:"typescript.tmLanguage.json",embeddedScopes:[]},"source.v":{id:"v",path:"v.tmLanguage.json",embeddedScopes:[]},"source.asp.vb.net":{id:"vb",path:"vb.tmLanguage.json",embeddedScopes:[]},"source.verilog":{id:"verilog",path:"verilog.tmLanguage.json",embeddedScopes:[]},"source.vhdl":{id:"vhdl",path:"vhdl.tmLanguage.json",embeddedScopes:[]},"source.viml":{id:"viml",path:"viml.tmLanguage.json",embeddedScopes:[]},"text.html.vue-html":{id:"vue-html",path:"vue-html.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.swift","source.objc","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.coffee","source.clojure","source.batchfile","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","source.graphql","source.toml","source.yaml","source.json5","source.json.comments","source.json","source.tsx","source.js.jsx","source.ts","source.css.less","source.css.scss","source.css","source.sass","source.stylus","text.pug","text.html.markdown","text.html.basic","source.js","source.vue"]},"source.vue":{id:"vue",path:"vue.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.swift","source.objc","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.coffee","source.clojure","source.batchfile","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","source.graphql","source.toml","source.yaml","source.json5","source.json.comments","source.json","source.tsx","source.js.jsx","source.ts","source.js","source.css.less","source.css.scss","source.css","source.sass","source.stylus","text.pug","text.html.markdown","text.html.basic"]},"source.vyper":{id:"vyper",path:"vyper.tmLanguage.json",embeddedScopes:[]},"source.wat":{id:"wasm",path:"wasm.tmLanguage.json",embeddedScopes:[]},"source.wenyan":{id:"wenyan",path:"wenyan.tmLanguage.json",embeddedScopes:[]},"source.wgsl":{id:"wgsl",path:"wgsl.tmLanguage.json",embeddedScopes:[]},"source.wolfram":{id:"wolfram",path:"wolfram.tmLanguage.json",embeddedScopes:[]},"text.xml":{id:"xml",path:"xml.tmLanguage.json",embeddedScopes:["source.java"]},"text.xml.xsl":{id:"xsl",path:"xsl.tmLanguage.json",embeddedScopes:["source.java","text.xml"]},"source.yaml":{id:"yaml",path:"yaml.tmLanguage.json",embeddedScopes:[]},"source.zenscript":{id:"zenscript",path:"zenscript.tmLanguage.json",embeddedScopes:[]}};var N={d:(A,B)=>{for(var Q in B)N.o(B,Q)&&!N.o(A,Q)&&Object.defineProperty(A,Q,{enumerable:!0,get:B[Q]})},o:(A,B)=>Object.prototype.hasOwnProperty.call(A,B)},L={};N.d(L,{_X:()=>XA,Bz:()=>vA,ot:()=>TA,u:()=>WA,jG:()=>Y,Pn:()=>ZA});const H="undefined"!=typeof process&&!!process.env.VSCODE_TEXTMATE_DEBUG;var k;function R(A,B){const Q=[],g=function(A){let B=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,Q=B.exec(A);return{next:()=>{if(!Q)return null;const g=Q[0];return Q=B.exec(A),g}}}(A);let E=g.next();for(;null!==E;){let A=0;if(2===E.length&&":"===E.charAt(1)){switch(E.charAt(0)){case"R":A=1;break;case"L":A=-1;break;default:console.log(`Unknown priority ${E} in scope selector`)}E=g.next()}let B=I();if(Q.push({matcher:B,priority:A}),","!==E)break;E=g.next()}return Q;function C(){if("-"===E){E=g.next();const A=C();return B=>!!A&&!A(B)}if("("===E){E=g.next();const A=function(){const A=[];let B=I();for(;B&&(A.push(B),"|"===E||","===E);){do{E=g.next()}while("|"===E||","===E);B=I()}return B=>A.some((A=>A(B)))}();return")"===E&&(E=g.next()),A}if(K(E)){const A=[];do{A.push(E),E=g.next()}while(K(E));return Q=>B(A,Q)}return null}function I(){const A=[];let B=C();for(;B;)A.push(B),B=C();return B=>A.every((A=>A(B)))}}function K(A){return!!A&&!!A.match(/[\w\.:]+/)}function Y(A){"function"==typeof A.dispose&&A.dispose()}function U(A){return Array.isArray(A)?function(A){let B=[];for(let Q=0,g=A.length;Q{for(let Q in B)A[Q]=B[Q]})),A}function P(A){const B=~A.lastIndexOf("/")||~A.lastIndexOf("\\");return 0===B?A:~B==A.length-1?P(A.substring(0,A.length-1)):A.substr(1+~B)}!function(A){A.toBinaryStr=function(A){let B=A.toString(2);for(;B.length<32;)B="0"+B;return B},A.print=function(B){const Q=A.getLanguageId(B),g=A.getTokenType(B),E=A.getFontStyle(B),C=A.getForeground(B),I=A.getBackground(B);console.log({languageId:Q,tokenType:g,fontStyle:E,foreground:C,background:I})},A.getLanguageId=function(A){return(255&A)>>>0},A.getTokenType=function(A){return(768&A)>>>8},A.containsBalancedBrackets=function(A){return 0!=(1024&A)},A.getFontStyle=function(A){return(30720&A)>>>11},A.getForeground=function(A){return(16744448&A)>>>15},A.getBackground=function(A){return(4278190080&A)>>>24},A.set=function(B,Q,g,E,C,I,D){let w=A.getLanguageId(B),o=A.getTokenType(B),s=A.containsBalancedBrackets(B)?1:0,e=A.getFontStyle(B),c=A.getForeground(B),i=A.getBackground(B);return 0!==Q&&(w=Q),8!==g&&(o=g),null!==E&&(s=E?1:0),-1!==C&&(e=C),0!==I&&(c=I),0!==D&&(i=D),(w<<0|o<<8|s<<10|e<<11|c<<15|i<<24)>>>0}}(k||(k={}));let y=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g;class J{static hasCaptures(A){return null!==A&&(y.lastIndex=0,y.test(A))}static replaceCaptures(A,B,Q){return A.replace(y,((A,g,E,C)=>{let I=Q[parseInt(g||E,10)];if(!I)return A;{let A=B.substring(I.start,I.end);for(;"."===A[0];)A=A.substring(1);switch(C){case"downcase":return A.toLowerCase();case"upcase":return A.toUpperCase();default:return A}}}))}}function S(A,B){return AB?1:0}function p(A,B){if(null===A&&null===B)return 0;if(!A)return-1;if(!B)return 1;let Q=A.length,g=B.length;if(Q===g){for(let g=0;g`);return}const C=Q.lookup(B);A instanceof m?v({baseGrammar:C,selfGrammar:E},g):T(A.ruleName,{baseGrammar:C,selfGrammar:E,repository:E.repository},g);const I=Q.injections(A.scopeName);if(I)for(const A of I)g.add(new m(A))}function T(A,B,Q){B.repository&&B.repository[A]&&X([B.repository[A]],B,Q)}function v(A,B){A.selfGrammar.patterns&&Array.isArray(A.selfGrammar.patterns)&&X(A.selfGrammar.patterns,{...A,repository:A.selfGrammar.repository},B),A.selfGrammar.injections&&X(Object.values(A.selfGrammar.injections),{...A,repository:A.selfGrammar.repository},B)}function X(A,B,Q){for(const g of A){if(Q.visitedRule.has(g))continue;Q.visitedRule.add(g);const A=g.repository?u({},B.repository,g.repository):B.repository;Array.isArray(g.patterns)&&X(g.patterns,{...B,repository:A},Q);const E=g.include;if(!E)continue;const C=$(E);switch(C.kind){case 0:v({...B,selfGrammar:B.baseGrammar},Q);break;case 1:v(B,Q);break;case 2:T(C.ruleName,{...B,repository:A},Q);break;case 3:case 4:const g=C.scopeName===B.selfGrammar.scopeName?B.selfGrammar:C.scopeName===B.baseGrammar.scopeName?B.baseGrammar:void 0;if(g){const E={baseGrammar:B.baseGrammar,selfGrammar:g,repository:A};4===C.kind?T(C.ruleName,E,Q):v(E,Q)}else 4===C.kind?Q.add(new O(C.scopeName,C.ruleName)):Q.add(new m(C.scopeName))}}}class Z{constructor(){this.kind=0}}class j{constructor(){this.kind=1}}class V{constructor(A){this.ruleName=A,this.kind=2}}class z{constructor(A){this.scopeName=A,this.kind=3}}class _{constructor(A,B){this.scopeName=A,this.ruleName=B,this.kind=4}}function $(A){if("$base"===A)return new Z;if("$self"===A)return new j;const B=A.indexOf("#");if(-1===B)return new z(A);if(0===B)return new V(A.substring(1));{const Q=A.substring(0,B),g=A.substring(B+1);return new _(Q,g)}}const AA=/\\(\d+)/,BA=/\\(\d+)/g;class QA{constructor(A,B,Q,g){this.$location=A,this.id=B,this._name=Q||null,this._nameIsCapturing=J.hasCaptures(this._name),this._contentName=g||null,this._contentNameIsCapturing=J.hasCaptures(this._contentName)}get debugName(){const A=this.$location?`${P(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${A}`}getName(A,B){return this._nameIsCapturing&&null!==this._name&&null!==A&&null!==B?J.replaceCaptures(this._name,A,B):this._name}getContentName(A,B){return this._contentNameIsCapturing&&null!==this._contentName?J.replaceCaptures(this._contentName,A,B):this._contentName}}class gA extends QA{constructor(A,B,Q,g,E){super(A,B,Q,g),this.retokenizeCapturedWithRuleId=E}dispose(){}collectPatterns(A,B){throw new Error("Not supported!")}compile(A,B){throw new Error("Not supported!")}compileAG(A,B,Q,g){throw new Error("Not supported!")}}class EA extends QA{constructor(A,B,Q,g,E){super(A,B,Q,null),this._match=new oA(g,this.id),this.captures=E,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(A,B){B.push(this._match)}compile(A,B){return this._getCachedCompiledPatterns(A).compile(A)}compileAG(A,B,Q,g){return this._getCachedCompiledPatterns(A).compileAG(A,Q,g)}_getCachedCompiledPatterns(A){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new sA,this.collectPatterns(A,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}}class CA extends QA{constructor(A,B,Q,g,E){super(A,B,Q,g),this.patterns=E.patterns,this.hasMissingPatterns=E.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(A,B){for(const Q of this.patterns)A.getRule(Q).collectPatterns(A,B)}compile(A,B){return this._getCachedCompiledPatterns(A).compile(A)}compileAG(A,B,Q,g){return this._getCachedCompiledPatterns(A).compileAG(A,Q,g)}_getCachedCompiledPatterns(A){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new sA,this.collectPatterns(A,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}}class IA extends QA{constructor(A,B,Q,g,E,C,I,D,w,o){super(A,B,Q,g),this._begin=new oA(E,this.id),this.beginCaptures=C,this._end=new oA(I||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=D,this.applyEndPatternLast=w||!1,this.patterns=o.patterns,this.hasMissingPatterns=o.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(A,B){return this._end.resolveBackReferences(A,B)}collectPatterns(A,B){B.push(this._begin)}compile(A,B){return this._getCachedCompiledPatterns(A,B).compile(A)}compileAG(A,B,Q,g){return this._getCachedCompiledPatterns(A,B).compileAG(A,Q,g)}_getCachedCompiledPatterns(A,B){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new sA;for(const B of this.patterns)A.getRule(B).collectPatterns(A,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,B):this._cachedCompiledPatterns.setSource(0,B)),this._cachedCompiledPatterns}}class DA extends QA{constructor(A,B,Q,g,E,C,I,D,w){super(A,B,Q,g),this._begin=new oA(E,this.id),this.beginCaptures=C,this.whileCaptures=D,this._while=new oA(I,-2),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=w.patterns,this.hasMissingPatterns=w.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(A,B){return this._while.resolveBackReferences(A,B)}collectPatterns(A,B){B.push(this._begin)}compile(A,B){return this._getCachedCompiledPatterns(A).compile(A)}compileAG(A,B,Q,g){return this._getCachedCompiledPatterns(A).compileAG(A,Q,g)}_getCachedCompiledPatterns(A){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new sA;for(const B of this.patterns)A.getRule(B).collectPatterns(A,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(A,B){return this._getCachedCompiledWhilePatterns(A,B).compile(A)}compileWhileAG(A,B,Q,g){return this._getCachedCompiledWhilePatterns(A,B).compileAG(A,Q,g)}_getCachedCompiledWhilePatterns(A,B){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new sA,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,B||"￿"),this._cachedCompiledWhilePatterns}}class wA{static createCaptureRule(A,B,Q,g,E){return A.registerRule((A=>new gA(B,A,Q,g,E)))}static getCompiledRuleId(A,B,Q){return A.id||B.registerRule((g=>{if(A.id=g,A.match)return new EA(A.$vscodeTextmateLocation,A.id,A.name,A.match,wA._compileCaptures(A.captures,B,Q));if(void 0===A.begin){A.repository&&(Q=u({},Q,A.repository));let g=A.patterns;return void 0===g&&A.include&&(g=[{include:A.include}]),new CA(A.$vscodeTextmateLocation,A.id,A.name,A.contentName,wA._compilePatterns(g,B,Q))}return A.while?new DA(A.$vscodeTextmateLocation,A.id,A.name,A.contentName,A.begin,wA._compileCaptures(A.beginCaptures||A.captures,B,Q),A.while,wA._compileCaptures(A.whileCaptures||A.captures,B,Q),wA._compilePatterns(A.patterns,B,Q)):new IA(A.$vscodeTextmateLocation,A.id,A.name,A.contentName,A.begin,wA._compileCaptures(A.beginCaptures||A.captures,B,Q),A.end,wA._compileCaptures(A.endCaptures||A.captures,B,Q),A.applyEndPatternLast,wA._compilePatterns(A.patterns,B,Q))})),A.id}static _compileCaptures(A,B,Q){let g=[];if(A){let E=0;for(const B in A){if("$vscodeTextmateLocation"===B)continue;const A=parseInt(B,10);A>E&&(E=A)}for(let A=0;A<=E;A++)g[A]=null;for(const E in A){if("$vscodeTextmateLocation"===E)continue;const C=parseInt(E,10);let I=0;A[E].patterns&&(I=wA.getCompiledRuleId(A[E],B,Q)),g[C]=wA.createCaptureRule(B,A[E].$vscodeTextmateLocation,A[E].name,A[E].contentName,I)}}return g}static _compilePatterns(A,B,Q){let g=[];if(A)for(let E=0,C=A.length;EA.substring(B.start,B.end)));return BA.lastIndex=0,this.source.replace(BA,((A,B)=>d(Q[parseInt(B,10)]||"")))}_buildAnchorCache(){let A,B,Q,g,E=[],C=[],I=[],D=[];for(A=0,B=this.source.length;AA.source));this._cached=new eA(A,B,this._items.map((A=>A.ruleId)))}return this._cached}compileAG(A,B,Q){return this._hasAnchors?B?Q?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(A,B,Q)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(A,B,Q)),this._anchorCache.A1_G0):Q?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(A,B,Q)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(A,B,Q)),this._anchorCache.A0_G0):this.compile(A)}_resolveAnchors(A,B,Q){let g=this._items.map((A=>A.resolveAnchors(B,Q)));return new eA(A,g,this._items.map((A=>A.ruleId)))}}class eA{constructor(A,B,Q){this.regExps=B,this.rules=Q,this.scanner=A.createOnigScanner(B)}dispose(){"function"==typeof this.scanner.dispose&&this.scanner.dispose()}toString(){const A=[];for(let B=0,Q=this.rules.length;Bthis._root.match(A)))}static createFromRawTheme(A,B){return this.createFromParsedTheme(function(A){if(!A)return[];if(!A.settings||!Array.isArray(A.settings))return[];let B=A.settings,Q=[],g=0;for(let A=0,E=B.length;A1&&(s=C.slice(0,C.length-1),s.reverse()),Q[g++]=new hA(o,s,A,I,D,w)}}return Q}(A),B)}static createFromParsedTheme(A,B){return function(A,B){A.sort(((A,B)=>{let Q=S(A.scope,B.scope);return 0!==Q?Q:(Q=p(A.parentScopes,B.parentScopes),0!==Q?Q:A.index-B.index)}));let Q=0,g="#000000",E="#ffffff";for(;A.length>=1&&""===A[0].scope;){let B=A.shift();-1!==B.fontStyle&&(Q=B.fontStyle),null!==B.foreground&&(g=B.foreground),null!==B.background&&(E=B.background)}let C=new aA(B),I=new MA(Q,C.getId(g),C.getId(E)),D=new FA(new nA(0,null,-1,0,0),[]);for(let B=0,Q=A.length;Bfunction(A,B){if(null===B)return!0;let Q=0,g=B[Q];for(;A;){if(tA(A.scopeName,g)){if(Q++,Q===B.length)return!0;g=B[Q]}A=A.parent}return!1}(A.parent,B.parentScopes)));return Q?new MA(Q.fontStyle,Q.foreground,Q.background):null}}class iA{constructor(A,B){this.parent=A,this.scopeName=B}static push(A,B){for(const Q of B)A=new iA(A,Q);return A}static from(...A){let B=null;for(let Q=0;QA?console.log("how did this happen?"):this.scopeDepth=A,-1!==B&&(this.fontStyle=B),0!==Q&&(this.foreground=Q),0!==g&&(this.background=g)}}class FA{constructor(A,B=[],Q={}){this._mainRule=A,this._children=Q,this._rulesWithParentScopes=B}static _sortBySpecificity(A){return 1===A.length||A.sort(this._cmpBySpecificity),A}static _cmpBySpecificity(A,B){if(A.scopeDepth===B.scopeDepth){const Q=A.parentScopes,g=B.parentScopes;let E=null===Q?0:Q.length,C=null===g?0:g.length;if(E===C)for(let A=0;A{const B=this._scopeToLanguage(A),Q=this._toStandardTokenType(A);return new rA(B,Q)})),this._defaultAttributes=new rA(A,8),this._embeddedLanguagesMatcher=new NA(Object.entries(B||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(A){return null===A?GA._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(A)}_scopeToLanguage(A){return this._embeddedLanguagesMatcher.match(A)||0}_toStandardTokenType(A){const B=A.match(GA.STANDARD_TOKEN_TYPE_REGEXP);if(!B)return 8;switch(B[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}}GA._NULL_SCOPE_METADATA=new rA(0,0),GA.STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/;class NA{constructor(A){if(0===A.length)this.values=null,this.scopesRegExp=null;else{this.values=new Map(A);const B=A.map((([A,B])=>d(A)));B.sort(),B.reverse(),this.scopesRegExp=new RegExp(`^((${B.join(")|(")}))($|\\.)`,"")}}match(A){if(!this.scopesRegExp)return;const B=A.match(this.scopesRegExp);return B?this.values.get(B[1]):void 0}}class LA{constructor(A,B){this.stack=A,this.stoppedEarly=B}}function HA(A,B,Q,g,E,C,I,D){const w=B.content.length;let o=!1,s=-1;if(I){const I=function(A,B,Q,g,E,C){let I=E.beginRuleCapturedEOL?0:-1;const D=[];for(let B=E;B;B=B.pop()){const Q=B.getRule(A);Q instanceof DA&&D.push({rule:Q,stack:B})}for(let w=D.pop();w;w=D.pop()){const{ruleScanner:D,findOptions:o}=RA(w.rule,A,w.stack.endRule,Q,g===I),s=D.findNextMatchSync(B,g,o);if(H&&(console.log(" scanning for while rule"),console.log(D.toString())),!s){H&&console.log(" popping "+w.rule.debugName+" - "+w.rule.debugWhileRegExp),E=w.stack.pop();break}if(-2!==s.ruleId){E=w.stack.pop();break}s.captureIndices&&s.captureIndices.length&&(C.produce(w.stack,s.captureIndices[0].start),KA(A,B,Q,w.stack,C,w.rule.whileCaptures,s.captureIndices),C.produce(w.stack,s.captureIndices[0].end),I=s.captureIndices[0].end,s.captureIndices[0].end>g&&(g=s.captureIndices[0].end,Q=!1))}return{stack:E,linePos:g,anchorPosition:I,isFirstLine:Q}}(A,B,Q,g,E,C);E=I.stack,g=I.linePos,Q=I.isFirstLine,s=I.anchorPosition}const e=Date.now();for(;!o;){if(0!==D&&Date.now()-e>D)return new LA(E,!0);c()}return new LA(E,!1);function c(){H&&(console.log(""),console.log(`@@scanNext ${g}: |${B.content.substr(g).replace(/\n$/,"\\n")}|`));const I=function(A,B,Q,g,E,C){const I=function(A,B,Q,g,E,C){const I=E.getRule(A),{ruleScanner:D,findOptions:w}=kA(I,A,E.endRule,Q,g===C);let o=0;H&&(o=x());const s=D.findNextMatchSync(B,g,w);if(H){const A=x()-o;A>5&&console.warn(`Rule ${I.debugName} (${I.id}) matching took ${A} against '${B}'`),console.log(` scanning for (linePos: ${g}, anchorPosition: ${C})`),console.log(D.toString()),s&&console.log(`matched rule id: ${s.ruleId} from ${s.captureIndices[0].start} to ${s.captureIndices[0].end}`)}return s?{captureIndices:s.captureIndices,matchedRuleId:s.ruleId}:null}(A,B,Q,g,E,C),D=A.getInjections();if(0===D.length)return I;const w=function(A,B,Q,g,E,C,I){let D,w=Number.MAX_VALUE,o=null,s=0;const e=C.contentNameScopesList.getScopeNames();for(let C=0,c=A.length;C=w)&&(w=a,o=h.captureIndices,D=h.ruleId,s=c.priority,w===E))break}return o?{priorityMatch:-1===s,captureIndices:o,matchedRuleId:D}:null}(D,A,B,Q,g,E,C);if(!w)return I;if(!I)return w;const o=I.captureIndices[0].start,s=w.captureIndices[0].start;return s0)&&D[0].end>g;if(-1===e){const I=E.getRule(A);H&&console.log(" popping "+I.debugName+" - "+I.debugEndRegExp),C.produce(E,D[0].start),E=E.withContentNameScopesList(E.nameScopesList),KA(A,B,Q,E,C,I.endCaptures,D),C.produce(E,D[0].end);const e=E;if(E=E.parent,s=e.getAnchorPos(),!c&&e.getEnterPos()===g)return H&&console.error("[1] - Grammar is in an endless loop - Grammar pushed & popped a rule without advancing"),E=e,C.produce(E,w),void(o=!0)}else{const I=A.getRule(e);C.produce(E,D[0].start);const i=E,t=I.getName(B.content,D),M=E.contentNameScopesList.pushAttributed(t,A);if(E=E.push(e,g,s,D[0].end===w,null,M,M),I instanceof IA){const g=I;H&&console.log(" pushing "+g.debugName+" - "+g.debugBeginRegExp),KA(A,B,Q,E,C,g.beginCaptures,D),C.produce(E,D[0].end),s=D[0].end;const e=g.getContentName(B.content,D),t=M.pushAttributed(e,A);if(E=E.withContentNameScopesList(t),g.endHasBackReferences&&(E=E.withEndRule(g.getEndWithResolvedBackReferences(B.content,D))),!c&&i.hasSameRuleAs(E))return H&&console.error("[2] - Grammar is in an endless loop - Grammar pushed the same rule without advancing"),E=E.pop(),C.produce(E,w),void(o=!0)}else if(I instanceof DA){const g=I;H&&console.log(" pushing "+g.debugName),KA(A,B,Q,E,C,g.beginCaptures,D),C.produce(E,D[0].end),s=D[0].end;const e=g.getContentName(B.content,D),t=M.pushAttributed(e,A);if(E=E.withContentNameScopesList(t),g.whileHasBackReferences&&(E=E.withEndRule(g.getWhileWithResolvedBackReferences(B.content,D))),!c&&i.hasSameRuleAs(E))return H&&console.error("[3] - Grammar is in an endless loop - Grammar pushed the same rule without advancing"),E=E.pop(),C.produce(E,w),void(o=!0)}else{const g=I;if(H&&console.log(" matched "+g.debugName+" - "+g.debugMatchRegExp),KA(A,B,Q,E,C,g.captures,D),C.produce(E,D[0].end),E=E.pop(),!c)return H&&console.error("[4] - Grammar is in an endless loop - Grammar is not advancing, nor is it pushing/popping"),E=E.safePop(),C.produce(E,w),void(o=!0)}}D[0].end>g&&(g=D[0].end,Q=!1)}}function kA(A,B,Q,g,E){return{ruleScanner:A.compileAG(B,Q,g,E),findOptions:0}}function RA(A,B,Q,g,E){return{ruleScanner:A.compileWhileAG(B,Q,g,E),findOptions:0}}function KA(A,B,Q,g,E,C,I){if(0===C.length)return;const D=B.content,w=Math.min(C.length,I.length),o=[],s=I[0].end;for(let B=0;Bs)break;for(;o.length>0&&o[o.length-1].endPos<=e.start;)E.produceFromScopes(o[o.length-1].scopes,o[o.length-1].endPos),o.pop();if(o.length>0?E.produceFromScopes(o[o.length-1].scopes,e.start):E.produce(g,e.start),w.retokenizeCapturedWithRuleId){const B=w.getName(D,I),C=g.contentNameScopesList.pushAttributed(B,A),o=w.getContentName(D,I),s=C.pushAttributed(o,A),c=g.push(w.retokenizeCapturedWithRuleId,e.start,-1,!1,null,C,s),i=A.createOnigString(D.substring(0,e.end));HA(A,i,Q&&0===e.start,e.start,c,E,!1,0),Y(i);continue}const c=w.getName(D,I);if(null!==c){const B=(o.length>0?o[o.length-1].scopes:g.contentNameScopesList).pushAttributed(c,A);o.push(new YA(B,e.end))}}for(;o.length>0;)E.produceFromScopes(o[o.length-1].scopes,o[o.length-1].endPos),o.pop()}class YA{constructor(A,B){this.scopes=A,this.endPos=B}}function UA(A,B,Q,g,E){const C=R(B,uA),I=wA.getCompiledRuleId(Q,g,E.repository);for(const Q of C)A.push({debugSelector:B,matcher:Q.matcher,ruleId:I,grammar:E,priority:Q.priority})}function uA(A,B){if(B.length{for(let g=Q;gQ&&A.substr(0,Q)===B&&"."===A[Q]}class yA{constructor(A,B,Q,g,E,C,I,D){if(this._rootScopeName=A,this.balancedBracketSelectors=C,this._onigLib=D,this._basicScopeAttributesProvider=new GA(Q,g),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=I,this._grammar=JA(B,null),this._injections=null,this._tokenTypeMatchers=[],E)for(const A of Object.keys(E)){const B=R(A,uA);for(const Q of B)this._tokenTypeMatchers.push({matcher:Q.matcher,type:E[A]})}}get themeProvider(){return this._grammarRepository}dispose(){for(const A of this._ruleId2desc)A&&A.dispose()}createOnigScanner(A){return this._onigLib.createOnigScanner(A)}createOnigString(A){return this._onigLib.createOnigString(A)}getMetadataForScope(A){return this._basicScopeAttributesProvider.getBasicScopeAttributes(A)}_collectInjections(){const A=[],B=this._rootScopeName,Q=(A=>A===this._rootScopeName?this._grammar:this.getExternalGrammar(A))(B);if(Q){const g=Q.injections;if(g)for(let B in g)UA(A,B,g[B],this,Q);const E=this._grammarRepository.injections(B);E&&E.forEach((B=>{const Q=this.getExternalGrammar(B);if(Q){const B=Q.injectionSelector;B&&UA(A,B,Q,this,Q)}}))}return A.sort(((A,B)=>A.priority-B.priority)),A}getInjections(){if(null===this._injections&&(this._injections=this._collectInjections(),H&&this._injections.length>0)){console.log(`Grammar ${this._rootScopeName} contains the following injections:`);for(const A of this._injections)console.log(` - ${A.debugSelector}`)}return this._injections}registerRule(A){const B=++this._lastRuleId,Q=A(B);return this._ruleId2desc[B]=Q,Q}getRule(A){return this._ruleId2desc[A]}getExternalGrammar(A,B){if(this._includedGrammars[A])return this._includedGrammars[A];if(this._grammarRepository){const Q=this._grammarRepository.lookup(A);if(Q)return this._includedGrammars[A]=JA(Q,B&&B.$base),this._includedGrammars[A]}}tokenizeLine(A,B,Q=0){const g=this._tokenize(A,B,!1,Q);return{tokens:g.lineTokens.getResult(g.ruleStack,g.lineLength),ruleStack:g.ruleStack,stoppedEarly:g.stoppedEarly}}tokenizeLine2(A,B,Q=0){const g=this._tokenize(A,B,!0,Q);return{tokens:g.lineTokens.getBinaryResult(g.ruleStack,g.lineLength),ruleStack:g.ruleStack,stoppedEarly:g.stoppedEarly}}_tokenize(A,B,Q,g){let E;if(-1===this._rootId&&(this._rootId=wA.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections()),B&&B!==pA.NULL)E=!1,B.reset();else{E=!0;const A=this._basicScopeAttributesProvider.getDefaultAttributes(),Q=this.themeProvider.getDefaults(),g=k.set(0,A.languageId,A.tokenType,null,Q.fontStyle,Q.foregroundId,Q.backgroundId),C=this.getRule(this._rootId).getName(null,null);let I;I=C?SA.createRootAndLookUpScopeName(C,g,this):SA.createRoot("unknown",g),B=new pA(null,this._rootId,-1,-1,!1,null,I,I)}A+="\n";const C=this.createOnigString(A),I=C.content.length,D=new dA(Q,A,this._tokenTypeMatchers,this.balancedBracketSelectors),w=HA(this,C,E,0,B,D,!0,g);return Y(C),{lineLength:I,lineTokens:D,ruleStack:w.stack,stoppedEarly:w.stoppedEarly}}}function JA(A,B){return(A=U(A)).repository=A.repository||{},A.repository.$self={$vscodeTextmateLocation:A.$vscodeTextmateLocation,patterns:A.patterns,name:A.scopeName},A.repository.$base=B||A.repository.$self,A}class SA{constructor(A,B,Q){this.parent=A,this.scopePath=B,this.tokenAttributes=Q}static fromExtension(A,B){let Q=A,g=A?.scopePath??null;for(const A of B)g=iA.push(g,A.scopeNames),Q=new SA(Q,g,A.encodedTokenAttributes);return Q}static createRoot(A,B){return new SA(null,new iA(null,A),B)}static createRootAndLookUpScopeName(A,B,Q){const g=Q.getMetadataForScope(A),E=new iA(null,A),C=Q.themeProvider.themeMatch(E),I=SA.mergeAttributes(B,g,C);return new SA(null,E,I)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(A){return SA.equals(this,A)}static equals(A,B){for(;;){if(A===B)return!0;if(!A&&!B)return!0;if(!A||!B)return!1;if(A.scopeName!==B.scopeName||A.tokenAttributes!==B.tokenAttributes)return!1;A=A.parent,B=B.parent}}static mergeAttributes(A,B,Q){let g=-1,E=0,C=0;return null!==Q&&(g=Q.fontStyle,E=Q.foregroundId,C=Q.backgroundId),k.set(A,B.languageId,B.tokenType,null,g,E,C)}pushAttributed(A,B){if(null===A)return this;if(-1===A.indexOf(" "))return SA._pushAttributed(this,A,B);const Q=A.split(/ /g);let g=this;for(const A of Q)g=SA._pushAttributed(g,A,B);return g}static _pushAttributed(A,B,Q){const g=Q.getMetadataForScope(B),E=A.scopePath.push(B),C=Q.themeProvider.themeMatch(E),I=SA.mergeAttributes(A.tokenAttributes,g,C);return new SA(A,E,I)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(A){const B=[];let Q=this;for(;Q&&Q!==A;)B.push({encodedTokenAttributes:Q.tokenAttributes,scopeNames:Q.scopePath.getExtensionIfDefined(Q.parent?.scopePath??null)}),Q=Q.parent;return Q===A?B.reverse():void 0}}class pA{constructor(A,B,Q,g,E,C,I,D){this.parent=A,this.ruleId=B,this.beginRuleCapturedEOL=E,this.endRule=C,this.nameScopesList=I,this.contentNameScopesList=D,this._stackElementBrand=void 0,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=Q,this._anchorPos=g}equals(A){return null!==A&&pA._equals(this,A)}static _equals(A,B){return A===B||!!this._structuralEquals(A,B)&&SA.equals(A.contentNameScopesList,B.contentNameScopesList)}static _structuralEquals(A,B){for(;;){if(A===B)return!0;if(!A&&!B)return!0;if(!A||!B)return!1;if(A.depth!==B.depth||A.ruleId!==B.ruleId||A.endRule!==B.endRule)return!1;A=A.parent,B=B.parent}}clone(){return this}static _reset(A){for(;A;)A._enterPos=-1,A._anchorPos=-1,A=A.parent}reset(){pA._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(A,B,Q,g,E,C,I){return new pA(this,A,B,Q,g,E,C,I)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(A){return A.getRule(this.ruleId)}toString(){const A=[];return this._writeString(A,0),"["+A.join(",")+"]"}_writeString(A,B){return this.parent&&(B=this.parent._writeString(A,B)),A[B++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,B}withContentNameScopesList(A){return this.contentNameScopesList===A?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,A)}withEndRule(A){return this.endRule===A?this:new pA(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,A,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(A){let B=this;for(;B&&B._enterPos===A._enterPos;){if(B.ruleId===A.ruleId)return!0;B=B.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(A,B){const Q=SA.fromExtension(A?.nameScopesList??null,B.nameScopesList);return new pA(A,B.ruleId,B.enterPos??-1,B.anchorPos??-1,B.beginRuleCapturedEOL,B.endRule,Q,SA.fromExtension(Q,B.contentNameScopesList))}}pA.NULL=new pA(null,0,0,0,!1,null,null,null);class lA{constructor(A,B){this.allowAny=!1,this.balancedBracketScopes=A.flatMap((A=>"*"===A?(this.allowAny=!0,[]):R(A,uA).map((A=>A.matcher)))),this.unbalancedBracketScopes=B.flatMap((A=>R(A,uA).map((A=>A.matcher))))}get matchesAlways(){return this.allowAny&&0===this.unbalancedBracketScopes.length}get matchesNever(){return 0===this.balancedBracketScopes.length&&!this.allowAny}match(A){for(const B of this.unbalancedBracketScopes)if(B(A))return!1;for(const B of this.balancedBracketScopes)if(B(A))return!0;return this.allowAny}}class dA{constructor(A,B,Q,g){this.balancedBracketSelectors=g,this._emitBinaryTokens=A,this._tokenTypeOverrides=Q,this._lineText=H?B:null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}produce(A,B){this.produceFromScopes(A.contentNameScopesList,B)}produceFromScopes(A,B){if(this._lastTokenEndIndex>=B)return;if(this._emitBinaryTokens){let Q=A?.tokenAttributes??0,g=!1;if(this.balancedBracketSelectors?.matchesAlways&&(g=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const B=A?.getScopeNames()??[];for(const A of this._tokenTypeOverrides)A.matcher(B)&&(Q=k.set(Q,0,A.type,null,-1,0,0));this.balancedBracketSelectors&&(g=this.balancedBracketSelectors.match(B))}if(g&&(Q=k.set(Q,0,8,g,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===Q)return void(this._lastTokenEndIndex=B);if(H){const Q=A?.getScopeNames()??[];console.log(" token: |"+this._lineText.substring(this._lastTokenEndIndex,B).replace(/\n$/,"\\n")+"|");for(let A=0;A0&&this._tokens[this._tokens.length-1].startIndex===B-1&&this._tokens.pop(),0===this._tokens.length&&(this._lastTokenEndIndex=-1,this.produce(A,B),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(A,B){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===B-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),0===this._binaryTokens.length&&(this._lastTokenEndIndex=-1,this.produce(A,B),this._binaryTokens[this._binaryTokens.length-2]=0);const Q=new Uint32Array(this._binaryTokens.length);for(let A=0,B=this._binaryTokens.length;A0;)10===A.charCodeAt(E)?(E++,C++,I=0):(E++,I++),B--}function w(A){null===Q?E=A:D(A-E)}function o(){for(;E0&&65279===A.charCodeAt(0)&&(E=1);let i=0,t=null,M=[],h=[],a=null;function n(A,B){M.push(i),h.push(t),i=A,t=B}function F(){if(0===M.length)return r("illegal state stack");i=M.pop(),t=h.pop()}function r(B){throw new Error("Near offset "+E+": "+B+" ~~~"+A.substr(E,50)+"~~~")}const G=function(){if(null===a)return r("missing ");let A={};null!==Q&&(A[Q]={filename:B,line:C,char:I}),t[a]=A,a=null,n(1,A)},N=function(){if(null===a)return r("missing ");let A=[];t[a]=A,a=null,n(2,A)},L=function(){let A={};null!==Q&&(A[Q]={filename:B,line:C,char:I}),t.push(A),n(1,A)},H=function(){let A=[];t.push(A),n(2,A)};function k(){if(1!==i)return r("unexpected ");F()}function R(){return 1===i||2!==i?r("unexpected "):void F()}function K(A){if(1===i){if(null===a)return r("missing ");t[a]=A,a=null}else 2===i?t.push(A):t=A}function Y(A){if(isNaN(A))return r("cannot parse float");if(1===i){if(null===a)return r("missing ");t[a]=A,a=null}else 2===i?t.push(A):t=A}function U(A){if(isNaN(A))return r("cannot parse integer");if(1===i){if(null===a)return r("missing ");t[a]=A,a=null}else 2===i?t.push(A):t=A}function u(A){if(1===i){if(null===a)return r("missing ");t[a]=A,a=null}else 2===i?t.push(A):t=A}function P(A){if(1===i){if(null===a)return r("missing ");t[a]=A,a=null}else 2===i?t.push(A):t=A}function y(A){if(1===i){if(null===a)return r("missing ");t[a]=A,a=null}else 2===i?t.push(A):t=A}function J(){let A=c(">"),B=!1;return 47===A.charCodeAt(A.length-1)&&(B=!0,A=A.substring(0,A.length-1)),{name:A.trim(),isClosed:B}}function S(A){if(A.isClosed)return"";let B=c(""),B.replace(/&#([0-9]+);/g,(function(A,B){return String.fromCodePoint(parseInt(B,10))})).replace(/&#x([0-9a-f]+);/g,(function(A,B){return String.fromCodePoint(parseInt(B,16))})).replace(/&|<|>|"|'/g,(function(A){switch(A){case"&":return"&";case"<":return"<";case">":return">";case""":return'"';case"'":return"'"}return A}))}for(;E=g));){const w=A.charCodeAt(E);if(D(1),60!==w)return r("expected <");if(E>=g)return r("unexpected end of input");const c=A.charCodeAt(E);if(63===c){D(1),e("?>");continue}if(33===c){if(D(1),s("--")){e("--\x3e");continue}e(">");continue}if(47===c){if(D(1),o(),s("plist")){e(">");continue}if(s("dict")){e(">"),k();continue}if(s("array")){e(">"),R();continue}return r("unexpected closed tag")}let M=J();switch(M.name){case"dict":1===i?G():2===i?L():(t={},null!==Q&&(t[Q]={filename:B,line:C,char:I}),n(1,t)),M.isClosed&&k();continue;case"array":1===i?N():2===i?H():(t=[],n(2,t)),M.isClosed&&R();continue;case"key":p=S(M),1!==i?r("unexpected "):null!==a?r("too many "):a=p;continue;case"string":K(S(M));continue;case"real":Y(parseFloat(S(M)));continue;case"integer":U(parseInt(S(M),10));continue;case"date":u(new Date(S(M)));continue;case"data":P(S(M));continue;case"true":S(M),y(!0);continue;case"false":S(M),y(!1);continue}if(!/^plist/.test(M.name))return r("unexpected opened tag "+M.name)}var p;return t}function xA(A,B){throw new Error("Near offset "+A.pos+": "+B+" ~~~"+A.source.substr(A.pos,50)+"~~~")}class mA{constructor(A){this.source=A,this.pos=0,this.len=A.length,this.line=1,this.char=0}}class OA{constructor(){this.value=null,this.type=0,this.offset=-1,this.len=-1,this.line=-1,this.char=-1}toLocation(A){return{filename:A,line:this.line,char:this.char}}}function qA(A,B){B.value=null,B.type=0,B.offset=-1,B.len=-1,B.line=-1,B.char=-1;let Q,g=A.source,E=A.pos,C=A.len,I=A.line,D=A.char;for(;;){if(E>=C)return!1;if(Q=g.charCodeAt(E),32!==Q&&9!==Q&&13!==Q){if(10!==Q)break;E++,I++,D=0}else E++,D++}if(B.offset=E,B.line=I,B.char=D,34===Q){for(B.type=1,E++,D++;;){if(E>=C)return!1;if(Q=g.charCodeAt(E),E++,D++,92!==Q){if(34===Q)break}else E++,D++}B.value=g.substring(B.offset+1,E-1).replace(/\\u([0-9A-Fa-f]{4})/g,((A,B)=>String.fromCodePoint(parseInt(B,16)))).replace(/\\(.)/g,((B,Q)=>{switch(Q){case'"':return'"';case"\\":return"\\";case"/":return"/";case"b":return"\b";case"f":return"\f";case"n":return"\n";case"r":return"\r";case"t":return"\t";default:xA(A,"invalid escape sequence")}throw new Error("unreachable")}))}else if(91===Q)B.type=2,E++,D++;else if(123===Q)B.type=3,E++,D++;else if(93===Q)B.type=4,E++,D++;else if(125===Q)B.type=5,E++,D++;else if(58===Q)B.type=6,E++,D++;else if(44===Q)B.type=7,E++,D++;else if(110===Q){if(B.type=8,E++,D++,Q=g.charCodeAt(E),117!==Q)return!1;if(E++,D++,Q=g.charCodeAt(E),108!==Q)return!1;if(E++,D++,Q=g.charCodeAt(E),108!==Q)return!1;E++,D++}else if(116===Q){if(B.type=9,E++,D++,Q=g.charCodeAt(E),114!==Q)return!1;if(E++,D++,Q=g.charCodeAt(E),117!==Q)return!1;if(E++,D++,Q=g.charCodeAt(E),101!==Q)return!1;E++,D++}else if(102===Q){if(B.type=10,E++,D++,Q=g.charCodeAt(E),97!==Q)return!1;if(E++,D++,Q=g.charCodeAt(E),108!==Q)return!1;if(E++,D++,Q=g.charCodeAt(E),115!==Q)return!1;if(E++,D++,Q=g.charCodeAt(E),101!==Q)return!1;E++,D++}else for(B.type=11;;){if(E>=C)return!1;if(Q=g.charCodeAt(E),!(46===Q||Q>=48&&Q<=57||101===Q||69===Q||45===Q||43===Q))break;E++,D++}return B.len=E-B.offset,null===B.value&&(B.value=g.substr(B.offset,B.len)),A.pos=E,A.line=I,A.char=D,!0}class bA{constructor(A,B){this._onigLibPromise=B,this._grammars=new Map,this._rawGrammars=new Map,this._injectionGrammars=new Map,this._theme=A}dispose(){for(const A of this._grammars.values())A.dispose()}setTheme(A){this._theme=A}getColorMap(){return this._theme.getColorMap()}addGrammar(A,B){this._rawGrammars.set(A.scopeName,A),B&&this._injectionGrammars.set(A.scopeName,B)}lookup(A){return this._rawGrammars.get(A)}injections(A){return this._injectionGrammars.get(A)}getDefaults(){return this._theme.getDefaults()}themeMatch(A){return this._theme.match(A)}async grammarForScopeName(A,B,Q,g,E){if(!this._grammars.has(A)){let C=this._rawGrammars.get(A);if(!C)return null;this._grammars.set(A,function(A,B,Q,g,E,C,I,D){return new yA(A,B,Q,g,E,C,I,D)}(A,C,B,Q,g,E,this,await this._onigLibPromise))}return this._grammars.get(A)}}function WA(A,B){let Q=0;const g=[];let E=A,C=B;for(;E!==C;)E&&(!C||E.depth>=C.depth)?(Q++,E=E.parent):(g.push(C.toStateStackFrame()),C=C.parent);return{pops:Q,newFrames:g.reverse()}}function TA(A,B){let Q=A;for(let A=0;A0;)await Promise.all(C.Q.map((A=>this._loadSingleGrammar(A.scopeName)))),C.processQueue();return this._grammarForScopeName(A,B,Q,g,E)}async _loadSingleGrammar(A){return this._ensureGrammarCache.has(A)||this._ensureGrammarCache.set(A,this._doLoadSingleGrammar(A)),this._ensureGrammarCache.get(A)}async _doLoadSingleGrammar(A){const B=await this._options.loadGrammar(A);if(B){const Q="function"==typeof this._options.getInjections?this._options.getInjections(A):void 0;this._syncRegistry.addGrammar(B,Q)}}async addGrammar(A,B=[],Q=0,g=null){return this._syncRegistry.addGrammar(A,B),await this._grammarForScopeName(A.scopeName,Q,g)}_grammarForScopeName(A,B=0,Q=null,g=null,E=null){return this._syncRegistry.grammarForScopeName(A,B,Q,g,E)}}const XA=pA.NULL,ZA=function(A,B=null){return null!==B&&/\.json$/.test(B)?(Q=A,H?function(A,B,Q){let g=new mA(A),E=new OA,C=0,I=null,D=[],w=[];function o(){D.push(C),w.push(I)}function s(){C=D.pop(),I=w.pop()}function e(A){xA(g,A)}for(;qA(g,E);){if(0===C){if(null!==I&&e("too many constructs in root"),3===E.type){I={},I.$vscodeTextmateLocation=E.toLocation(B),o(),C=1;continue}if(2===E.type){I=[],o(),C=4;continue}e("unexpected token in root")}if(2===C){if(5===E.type){s();continue}if(7===E.type){C=3;continue}e("expected , or }")}if(1===C||3===C){if(1===C&&5===E.type){s();continue}if(1===E.type){let A=E.value;if(qA(g,E)&&6===E.type||e("expected colon"),qA(g,E)||e("expected value"),C=2,1===E.type){I[A]=E.value;continue}if(8===E.type){I[A]=null;continue}if(9===E.type){I[A]=!0;continue}if(10===E.type){I[A]=!1;continue}if(11===E.type){I[A]=parseFloat(E.value);continue}if(2===E.type){let B=[];I[A]=B,o(),C=4,I=B;continue}if(3===E.type){let Q={};Q.$vscodeTextmateLocation=E.toLocation(B),I[A]=Q,o(),C=1,I=Q;continue}}e("unexpected token in dict")}if(5===C){if(4===E.type){s();continue}if(7===E.type){C=6;continue}e("expected , or ]")}if(4===C||6===C){if(4===C&&4===E.type){s();continue}if(C=5,1===E.type){I.push(E.value);continue}if(8===E.type){I.push(null);continue}if(9===E.type){I.push(!0);continue}if(10===E.type){I.push(!1);continue}if(11===E.type){I.push(parseFloat(E.value));continue}if(2===E.type){let A=[];I.push(A),o(),C=4,I=A;continue}if(3===E.type){let A={};A.$vscodeTextmateLocation=E.toLocation(B),I.push(A),o(),C=1,I=A;continue}e("unexpected token in array")}e("unknown state")}return 0!==w.length&&e("unclosed constructs"),I}(Q,B):JSON.parse(Q)):function(A,B){return H?function(A,B,Q){return fA(A,B,"$vscodeTextmateLocation")}(A,B):function(A){return fA(A,null,null)}(A)}(A,B);var Q};var jA=L.Bz,VA=("undefined"!=typeof document&&document.currentScript&&document.currentScript.src,function(A){var B,Q,g=void 0!==(A=A||{})?A:{};g.ready=new Promise((function(A,g){B=A,Q=g}));var E,C=Object.assign({},g),I=!1;E=function(A){let B;return"function"==typeof readbuffer?new Uint8Array(readbuffer(A)):(B=read(A,"binary"),"object"==typeof B||L(Q),B);var Q},"undefined"!=typeof scriptArgs&&scriptArgs,"undefined"!=typeof onig_print&&("undefined"==typeof console&&(console={}),console.log=onig_print,console.warn=console.error="undefined"!=typeof printErr?printErr:onig_print);var D,w,o=g.print||console.log.bind(console),s=g.printErr||console.warn.bind(console);Object.assign(g,C),C=null,g.arguments&&g.arguments,g.thisProgram&&g.thisProgram,g.quit&&g.quit,g.wasmBinary&&(D=g.wasmBinary),g.noExitRuntime,"object"!=typeof WebAssembly&&L("no native wasm support detected");var e,c,i,t=!1,M="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function h(A,B,Q){for(var g=B+Q,E=B;A[E]&&!(E>=g);)++E;if(E-B>16&&A.buffer&&M)return M.decode(A.subarray(B,E));for(var C="";B>10,56320|1023&o)}}else C+=String.fromCharCode((31&I)<<6|D)}else C+=String.fromCharCode(I)}return C}function a(A){e=A,g.HEAP8=new Int8Array(A),g.HEAP16=new Int16Array(A),g.HEAP32=new Int32Array(A),g.HEAPU8=c=new Uint8Array(A),g.HEAPU16=new Uint16Array(A),g.HEAPU32=i=new Uint32Array(A),g.HEAPF32=new Float32Array(A),g.HEAPF64=new Float64Array(A)}g.INITIAL_MEMORY;var n=[],F=[],r=[],G=0,N=null;function L(A){g.onAbort&&g.onAbort(A),s(A="Aborted("+A+")"),t=!0,A+=". Build with -sASSERTIONS for more info.";var B=new WebAssembly.RuntimeError(A);throw Q(B),B}var H,k,R,K="data:application/octet-stream;base64,";function Y(A){return A.startsWith(K)}function U(A){try{if(A==H&&D)return new Uint8Array(D);if(E)return E(A);throw"both async and sync fetching of the wasm failed"}catch(A){L(A)}}function u(A){for(;A.length>0;)A.shift()(g)}function P(A){try{return w.grow(A-e.byteLength+65535>>>16),a(w.buffer),1}catch(A){}}Y(H="onig.wasm")||(k=H,H=g.locateFile?g.locateFile(k,""):""+k),R="undefined"!=typeof dateNow?dateNow:()=>performance.now();var y=[null,[],[]];function J(A,B){var Q=y[A];0===B||10===B?((1===A?o:s)(h(Q,0)),Q.length=0):Q.push(B)}var S,p={emscripten_get_now:R,emscripten_memcpy_big:function(A,B,Q){c.copyWithin(A,B,B+Q)},emscripten_resize_heap:function(A){var B=c.length,Q=2147483648;if((A>>>=0)>Q)return!1;let g=(A,B)=>A+(B-A%B)%B;for(var E=1;E<=4;E*=2){var C=B*(1+.2/E);if(C=Math.min(C,A+100663296),P(Math.min(Q,g(Math.max(A,C),65536))))return!0}return!1},fd_write:function(A,B,Q,g){for(var E=0,C=0;C>2],D=i[B+4>>2];B+=8;for(var w=0;w>2]=E,0}};function l(A){function Q(){S||(S=!0,g.calledRun=!0,t||(u(F),B(g),g.onRuntimeInitialized&&g.onRuntimeInitialized(),function(){if(g.postRun)for("function"==typeof g.postRun&&(g.postRun=[g.postRun]);g.postRun.length;)A=g.postRun.shift(),r.unshift(A);var A;u(r)}()))}G>0||(function(){if(g.preRun)for("function"==typeof g.preRun&&(g.preRun=[g.preRun]);g.preRun.length;)A=g.preRun.shift(),n.unshift(A);var A;u(n)}(),G>0||(g.setStatus?(g.setStatus("Running..."),setTimeout((function(){setTimeout((function(){g.setStatus("")}),1),Q()}),1)):Q()))}if(function(){var A={env:p,wasi_snapshot_preview1:p};function B(A,B){var Q,E=A.exports;g.asm=E,a((w=g.asm.memory).buffer),g.asm.__indirect_function_table,Q=g.asm.__wasm_call_ctors,F.unshift(Q),function(A){if(G--,g.monitorRunDependencies&&g.monitorRunDependencies(G),0==G&&N){var B=N;N=null,B()}}()}function E(A){B(A.instance)}function C(B){return(!D&&I&&"function"==typeof fetch?fetch(H,{credentials:"same-origin"}).then((function(A){if(!A.ok)throw"failed to load wasm binary file at '"+H+"'";return A.arrayBuffer()})).catch((function(){return U(H)})):Promise.resolve().then((function(){return U(H)}))).then((function(B){return WebAssembly.instantiate(B,A)})).then((function(A){return A})).then(B,(function(A){s("failed to asynchronously prepare wasm: "+A),L(A)}))}if(G++,g.monitorRunDependencies&&g.monitorRunDependencies(G),g.instantiateWasm)try{return g.instantiateWasm(A,B)}catch(A){s("Module.instantiateWasm callback failed with error: "+A),Q(A)}(D||"function"!=typeof WebAssembly.instantiateStreaming||Y(H)||"function"!=typeof fetch?C(E):fetch(H,{credentials:"same-origin"}).then((function(B){return WebAssembly.instantiateStreaming(B,A).then(E,(function(A){return s("wasm streaming compile failed: "+A),s("falling back to ArrayBuffer instantiation"),C(E)}))}))).catch(Q)}(),g.___wasm_call_ctors=function(){return(g.___wasm_call_ctors=g.asm.__wasm_call_ctors).apply(null,arguments)},g.___errno_location=function(){return(g.___errno_location=g.asm.__errno_location).apply(null,arguments)},g._omalloc=function(){return(g._omalloc=g.asm.omalloc).apply(null,arguments)},g._ofree=function(){return(g._ofree=g.asm.ofree).apply(null,arguments)},g._getLastOnigError=function(){return(g._getLastOnigError=g.asm.getLastOnigError).apply(null,arguments)},g._createOnigScanner=function(){return(g._createOnigScanner=g.asm.createOnigScanner).apply(null,arguments)},g._freeOnigScanner=function(){return(g._freeOnigScanner=g.asm.freeOnigScanner).apply(null,arguments)},g._findNextOnigScannerMatch=function(){return(g._findNextOnigScannerMatch=g.asm.findNextOnigScannerMatch).apply(null,arguments)},g._findNextOnigScannerMatchDbg=function(){return(g._findNextOnigScannerMatchDbg=g.asm.findNextOnigScannerMatchDbg).apply(null,arguments)},g.stackSave=function(){return(g.stackSave=g.asm.stackSave).apply(null,arguments)},g.stackRestore=function(){return(g.stackRestore=g.asm.stackRestore).apply(null,arguments)},g.stackAlloc=function(){return(g.stackAlloc=g.asm.stackAlloc).apply(null,arguments)},g.dynCall_jiji=function(){return(g.dynCall_jiji=g.asm.dynCall_jiji).apply(null,arguments)},g.UTF8ToString=function(A,B){return A?h(c,A,B):""},N=function A(){S||l(),S||(N=A)},g.preInit)for("function"==typeof g.preInit&&(g.preInit=[g.preInit]);g.preInit.length>0;)g.preInit.pop()();return l(),A.ready});let zA=null;class _A{static _utf8ByteLength(A){let B=0;for(let Q=0,g=A.length;Q=55296&&E<=56319&&Q+1=56320&&B<=57343&&(C=65536+(E-55296<<10)|B-56320,I=!0)}B+=C<=127?1:C<=2047?2:C<=65535?3:4,I&&Q++}return B}constructor(A){const B=A.length,Q=_A._utf8ByteLength(A),g=Q!==B,E=g?new Uint32Array(B+1):null;g&&(E[B]=Q);const C=g?new Uint32Array(Q+1):null;g&&(C[Q]=B);const I=new Uint8Array(Q);let D=0;for(let Q=0;Q=55296&&w<=56319&&Q+1=56320&&B<=57343&&(o=65536+(w-55296<<10)|B-56320,s=!0)}g&&(E[Q]=D,s&&(E[Q+1]=D),o<=127?C[D+0]=Q:o<=2047?(C[D+0]=Q,C[D+1]=Q):o<=65535?(C[D+0]=Q,C[D+1]=Q,C[D+2]=Q):(C[D+0]=Q,C[D+1]=Q,C[D+2]=Q,C[D+3]=Q)),o<=127?I[D++]=o:o<=2047?(I[D++]=192|(1984&o)>>>6,I[D++]=128|(63&o)>>>0):o<=65535?(I[D++]=224|(61440&o)>>>12,I[D++]=128|(4032&o)>>>6,I[D++]=128|(63&o)>>>0):(I[D++]=240|(1835008&o)>>>18,I[D++]=128|(258048&o)>>>12,I[D++]=128|(4032&o)>>>6,I[D++]=128|(63&o)>>>0),s&&Q++}this.utf16Length=B,this.utf8Length=Q,this.utf16Value=A,this.utf8Value=I,this.utf16OffsetToUtf8=E,this.utf8OffsetToUtf16=C}createString(A){const B=A._omalloc(this.utf8Length);return A.HEAPU8.set(this.utf8Value,B),B}}class $A{constructor(A){if(this.id=++$A.LAST_ID,!zA)throw new Error("Must invoke loadWASM first.");this._onigBinding=zA,this.content=A;const B=new _A(A);this.utf16Length=B.utf16Length,this.utf8Length=B.utf8Length,this.utf16OffsetToUtf8=B.utf16OffsetToUtf8,this.utf8OffsetToUtf16=B.utf8OffsetToUtf16,this.utf8Length<1e4&&!$A._sharedPtrInUse?($A._sharedPtr||($A._sharedPtr=zA._omalloc(1e4)),$A._sharedPtrInUse=!0,zA.HEAPU8.set(B.utf8Value,$A._sharedPtr),this.ptr=$A._sharedPtr):this.ptr=B.createString(zA)}convertUtf8OffsetToUtf16(A){return this.utf8OffsetToUtf16?A<0?0:A>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[A]:A}convertUtf16OffsetToUtf8(A){return this.utf16OffsetToUtf8?A<0?0:A>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[A]:A}dispose(){this.ptr===$A._sharedPtr?$A._sharedPtrInUse=!1:this._onigBinding._ofree(this.ptr)}}$A.LAST_ID=0,$A._sharedPtr=0,$A._sharedPtrInUse=!1;class AB{constructor(A){if(!zA)throw new Error("Must invoke loadWASM first.");const B=[],Q=[];for(let g=0,E=A.length;gWebAssembly.instantiateStreaming(A,B)}(g):function(A){return async B=>{const Q=await A.arrayBuffer();return WebAssembly.instantiate(Q,B)}}(g):function(A){return B=>WebAssembly.instantiate(A,B)}(g)}return QB=new Promise(((A,B)=>{g=A,E=B})),function(A,B,Q,g){VA({print:B,instantiateWasm:(B,Q)=>{if("undefined"==typeof performance){const A=()=>Date.now();B.env.emscripten_get_now=A,B.wasi_snapshot_preview1.emscripten_get_now=A}return A(B).then((A=>Q(A.instance)),g),{}}}).then((A=>{zA=A,Q()}))}(B,Q,g,E),QB}function EB(A){return new $A(A)}function CB(A){return new AB(A)}function IB(A){const B=r[A];if(!B)return;const{id:Q}=G[B];return{id:Q,scopeName:B}}const DB=new Map;let wB,oB;async function sB(A){if(DB.has(A))return DB.get(A);const B=function(A){return G[A]}(A);if(!B)return Promise.resolve(void 0);let Q;if(void 0===wB&&(Q=eB(B.path),wB=Q.then((()=>!0)).catch((()=>!1))),void 0===oB&&(oB=await wB),oB){const g=Q||eB(B.path);return DB.set(A,g),g}const E=g(`grammars/${B.id}`);B.embeddedScopes.forEach((A=>{if(!DB.has(A)){const B=E.then((B=>B.find((B=>B.scopeName===A))));DB.set(A,B)}}));const C=E.then((B=>B.find((B=>B.scopeName===A))));return DB.set(A,C),C}async function eB(A){return await Q("grammars",A)}const cB=30720,iB=16744448,tB=16775168,MB=11,hB=15,aB={NotSet:-1,None:0,Italic:1,Bold:2,Underline:4,Strikethrough:8};function nB(A,B,Q,g){const{tokens:E,ruleStack:C}=A.tokenizeLine2(Q,B),I=[];let D=Q.length;for(let A=E.length-2;A>=0;A-=2){const B=E[A],g=E[A+1],C=Q.slice(B,D);I.unshift({content:C,metadata:g}),D=B}let w=[];if(null==g?void 0:g.preserveWhitespace)w=I;else for(let A=0;A0?w[w.length-1].content+=B.content:A{const{rawTokens:E,nextStack:C}=nB(B,g,A,{preserveWhitespace:!0}),I=E.map((({content:A,metadata:B})=>({content:A,style:rB(B,Q)}))),D=function(A,B,Q,g){const{tokens:E}=Q.tokenizeLine(A,B),C=[];for(let B=0;B{if(w+=A.content.length,Q>>hB]},g=(A&cB)>>>MB;return g&aB.Italic&&(Q.fontStyle="italic"),g&aB.Bold&&(Q.fontWeight="bold"),g&aB.Underline&&(Q.textDecoration="underline"),g&aB.Strikethrough&&(Q.textDecoration="line-through"),Q}var GB=function(A){var B=null;if("undefined"!=typeof process&&null!=process.versions&&null!=process.versions.node)B=Buffer.from(A,"base64");else{var Q=globalThis.atob(A),g=Q.length;B=new Uint8Array(new ArrayBuffer(g));for(var E=0;E({createOnigScanner:CB,createOnigString:EB})));NB=new jA({onigLib:A,loadGrammar:A=>sB(A)})}const B=A.filter((A=>!LB(A))).map((A=>{const B=IB(A);if(!B)throw new RB(A);return NB.loadGrammar(B.scopeName)}));return Promise.all(B)}function kB(A){if(LB(A))return{langId:A,grammar:null};const B=IB(A);if(!B)throw new RB(A);const Q=function(A){const{_syncRegistry:B}=NB;return null==B?void 0:B._grammars.get(A)}(B.scopeName);if(!Q)throw new Error(`Syntax highlighting error: grammar for ${A} not loaded`);return{langId:B.id,grammar:Q}}class RB extends Error{constructor(A){super(`Unknown language: ${A}`),this.alias=A}}function KB(A,B,Q){NB.setTheme(Q);const g=function(A){const B=NB.getColorMap();return A.colorNames?B.map((B=>Object.keys(A.colorNames).find((Q=>A.colorNames[Q].toUpperCase()===B.toUpperCase()))||B)):B}(Q);return function(A,B,Q){let g=null;return A.split(/\r?\n|\r/g).map((A=>{const{rawTokens:E,nextStack:C}=nB(B,g,A);return g=C,E.map((({content:A,metadata:B})=>({content:A,style:rB(B,Q)})))}))}(A,B,g)}function YB(A){return A.split(/\r?\n|\r/g).map((A=>[{content:A,style:{}}]))}function UB(A,B){if(!A)return[{fromLineNumber:B,toLineNumber:B}];if(A.startsWith("["))return uB(A,B);return yB(A.slice(1,-1)).map((A=>{if(A.includes("[")){console.log("part",A);const[Q,g]=A.split("["),E=Number(Q),C=B+E-1;if(!JB(C))throw new SB(Q);return uB("["+g,C)}const{from:Q,to:g}=PB(A);return[{fromLineNumber:Q+B-1,toLineNumber:g+B-1}]})).flat()}function uB(A,B){return yB(A.slice(1,-1)).map((A=>{const{from:Q,to:g}=PB(A);return{lineNumber:B,fromColumn:Q,toColumn:g}}))}function PB(A){const[B,Q]=A.split(":");if(!JB(B))throw new SB(B);const g=Number(B);if(g<1)throw new pB;if(Q){if(!JB(Q))throw new SB(Q);return{from:g,to:+Q}}return{from:g,to:g}}function yB(A){return A.split(/,(?![^\[]*\])/g)}function JB(A){A=A.toString();var B=Math.abs(A),Q=parseInt(A,10);return!isNaN(B)&&Q===B&&B.toString()===A}class SB extends Error{constructor(A){super(`Invalid number "${A}" in range string`),this.number=A,Object.setPrototypeOf(this,new.target.prototype)}}class pB extends Error{constructor(){super("Invalid line or column number in range string"),Object.setPrototypeOf(this,new.target.prototype)}}const lB="#001",dB="#010",fB={name:"comments",type:"light",foreground:"",background:"",colors:{},settings:[{settings:{foreground:"#000"}},{scope:["punctuation.definition.comment"],settings:{foreground:lB}},{scope:"comment",settings:{foreground:dB}}]};function xB(A,B,Q,g){const E=B?KB(A,B,fB):YB(A),C=[];let I=1;const D=E.map((A=>{const{annotations:B,lineWithoutComments:E}=function(A,B,Q){if(!A.some((A=>A.style.color===lB)))return{annotations:[],lineWithoutComments:A};const g=[];let E=0;for(;E!A.tokens.includes(B)));C.every((A=>""===A.content.trim()))&&(C=null);return{annotations:g.map((A=>({name:A.name,query:A.query,ranges:A.ranges}))),lineWithoutComments:C}}(A,g,I);if(C.push(...B),!E)return null;const D=E.map((A=>A.content)).join("");return["mdx","jsx","tsx"].includes(Q)&&B.length>0&&"{}"===D.trim()?null:(I++,D)})).filter((A=>null!==A)).join("\n");return{newCode:D,annotations:C}}function mB(A,B){var Q;const g=A.match(/\s*([\w-]+)?(\([^\)]*\)|\[[^\]]*\])?(.*)$/),E=g[1],C=g[2],I=null===(Q=g[3])||void 0===Q?void 0:Q.trim();return B.includes(E)?{name:E,rangeString:C,query:I}:null}function OB(A,B){let Q=[],g=1;return A.forEach((A=>{Q.push({fromColumn:g,toColumn:g+A.content.length-1,token:A}),g+=A.content.length})),B.forEach((A=>{Q=function(A,B){const{range:Q}=B,{fromColumn:g,toColumn:E}=Q,C=[];let I=0;for(;IE){const[A,Q]=bB(B,E+1);D.tokens.push(A),C.push(Q)}else D.tokens.push(B);I++}else C.push(D);for(;IqB(A)))}function qB(A){return"tokens"in A?{annotationName:A.annotationName,annotationQuery:A.annotationQuery,fromColumn:A.fromColumn,toColumn:A.toColumn,tokens:A.tokens.map((A=>qB(A)))}:A.token}function bB(A,B){if("token"in A){const Q=Object.assign(Object.assign({},A.token),{content:A.token.content.slice(0,B-A.fromColumn)}),g=Object.assign(Object.assign({},A.token),{content:A.token.content.slice(B-A.fromColumn)});return[Object.assign(Object.assign({},A),{toColumn:B-1,token:Q}),Object.assign(Object.assign({},A),{fromColumn:B,token:g})]}{const Q=[],g=[];A.tokens.forEach((A=>{if(A.toColumn=B)g.push(A);else{const[E,C]=bB(A,B);Q.push(E),g.push(C)}}));return[Object.assign(Object.assign({},A),{toColumn:B-1,tokens:Q}),Object.assign(Object.assign({},A),{fromColumn:B,tokens:g})]}}function WB(A,B){let Q=A.map(((A,B)=>({fromLineNumber:B+1,toLineNumber:B+1,line:A})));return B.forEach((A=>{Q=function(A,B){const{range:Q,name:g,query:E}=B,{fromLineNumber:C,toLineNumber:I}=Q,D=[];let w=0;for(;wI){const[A,Q]=vB(B,I+1);o.lines.push(A),D.push(Q)}else o.lines.push(B);w++}else D.push(o);for(;wTB(A)))}function TB(A){return"line"in A?{lineNumber:A.fromLineNumber,tokens:A.line.tokens}:{annotationName:A.annotationName,annotationQuery:A.annotationQuery,fromLineNumber:A.fromLineNumber,toLineNumber:A.toLineNumber,lines:A.lines.map((A=>TB(A)))}}function vB(A,B){if("line"in A)return[Object.assign(Object.assign({},A),{toLineNumber:B-1}),Object.assign(Object.assign({},A),{fromLineNumber:B})];{const Q=[],g=[];return A.lines.forEach((A=>{if(A.toLineNumber=B)g.push(A);else{const[E,C]=vB(A,B);Q.push(E),g.push(C)}})),[Object.assign(Object.assign({},A),{toLineNumber:B-1,lines:Q}),Object.assign(Object.assign({},A),{fromLineNumber:B,lines:g})]}}function XB(A,B){const{inlineAnnotations:Q,multilineAnnotations:g}=function(A){const B=[],Q=[];return A.forEach((A=>{A.ranges.forEach((g=>{"lineNumber"in g?B.push(Object.assign(Object.assign({},A),{range:g})):Q.push(Object.assign(Object.assign({},A),{range:g}))}))})),{inlineAnnotations:B,multilineAnnotations:Q}}(B);return WB(A.map(((A,B)=>{const g=Q.filter((A=>A.range.lineNumber===B+1));return{lineNumber:B+1,tokens:OB(A,g)}})),g)}var ZB=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],jB={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",9:"strikethrough"};function VB(A,B){const Q=A.indexOf("[",B);if(-1!==Q){const B=A.indexOf("m",Q);return{sequence:A.substring(Q+2,B).split(";"),startPosition:Q,position:B+1}}return{position:A.length}}function zB(A,B){let Q=1;const g=A[B+Q++];let E;if("2"===g){const g=[A[B+Q++],A[B+Q++],A[B+Q]].map((A=>Number.parseInt(A)));3!==g.length||g.some((A=>Number.isNaN(A)))||(E={type:"rgb",rgb:g})}else if("5"===g){const g=Number.parseInt(A[B+Q]);Number.isNaN(g)||(E={type:"table",index:Number(g)})}return[Q,E]}function _B(A){const B=[];for(let Q=0;Q=90&&E<=97?B.push({type:"setForegroundColor",value:{type:"named",name:ZB[E-90+8]}}):E>=100&&E<=107&&B.push({type:"setBackgroundColor",value:{type:"named",name:ZB[E-100+8]}})}return B}function $B(A,B){const Q=function(){let A=null,B=null,Q=new Set;return{parse(g){const E=[];let C=0;do{const I=VB(g,C),D=I.sequence?g.substring(C,I.startPosition):g.substring(C);if(D.length>0&&E.push({value:D,foreground:A,background:B,decorations:new Set(Q)}),I.sequence){const g=_B(I.sequence);for(const E of g)"resetAll"===E.type?(A=null,B=null,Q.clear()):"resetForegroundColor"===E.type?A=null:"resetBackgroundColor"===E.type?B=null:"resetDecoration"===E.type&&Q.delete(E.value);for(const E of g)"setForegroundColor"===E.type?A=E.value:"setBackgroundColor"===E.type?B=E.value:"setDecoration"===E.type&&Q.add(E.value)}C=I.position}while(Cfunction(A,B,Q){const g=A.parse(B),E=g.map((({value:A,foreground:B,background:g,decorations:E})=>{const C=AQ(B,Q),I={};C&&(I.color=C);const D=AQ(g,Q);return D&&(I.background=D),E.has("bold")&&(I.fontWeight="bold"),E.has("italic")&&(I.fontStyle="italic"),E.has("underline")&&(I.textDecoration="underline"),E.has("strikethrough")&&(I.textDecoration="line-through"),E.has("reverse")&&(I.color=D,I.background=C),E.has("dim")&&(I.opacity=.5),{content:A,style:I}}));return E}(Q,A,B)));return g}function AQ(A,B){if(A){if("named"===A.type){return o(B,"terminal.ansi"+(A.name[0].toUpperCase()+A.name.slice(1)))}if("rgb"===A.type){const[B,Q,g]=A.rgb;return`rgb(${B}, ${Q}, ${g})`}}}async function BQ(A,B){await Promise.all([HB(A),t(B)])}function QQ(A,B,Q="dark-plus",g={}){const E=A||"",C=B||"text";if("string"!=typeof E)throw new Error("Syntax highlighter error: code must be a string");if("string"!=typeof C)throw new Error("Syntax highlighter error: lang must be a string");const{langId:I,grammar:D}=kB(C),w=M(Q),s="text"==I?YB(E):"terminal"==I?$B(E,w):(null==g?void 0:g.scopes)?function(A,B,Q){return NB.setTheme(Q),FB(A,B,NB.getColorMap())}(E,D,w):KB(E,D,w),e="terminal"==I?function(A){return{color:o(A,"terminal.foreground"),background:o(A,"terminal.background")}}(w):{color:w.foreground,background:w.background};if(function(A){return"annotations"in A}(g)){return{lines:XB(s,(null==g?void 0:g.annotations)||[]),lang:I,style:e}}return{lines:s,lang:I,style:e}}exports.LANG_NAMES=["abap","actionscript-3","ada","apache","apex","apl","applescript","ara","asm","astro","awk","ballerina","bash","bat","batch","be","beancount","berry","bibtex","bicep","blade","c","c#","cadence","cdc","clarity","clj","clojure","cmake","cmd","cobol","codeql","coffee","console","cpp","crystal","cs","csharp","css","cue","cypher","d","dart","dax","diff","docker","dockerfile","dream-maker","elixir","elm","erb","erl","erlang","f#","fish","fs","fsharp","fsl","gdresource","gdscript","gdshader","gherkin","git-commit","git-rebase","glimmer-js","glimmer-ts","glsl","gnuplot","go","graphql","groovy","hack","haml","handlebars","haskell","hbs","hcl","hjson","hlsl","hs","html","http","imba","ini","jade","java","javascript","jinja-html","jison","js","json","json5","jsonc","jsonl","jsonnet","jssm","jsx","julia","kotlin","kql","kusto","latex","less","liquid","lisp","logo","lua","make","makefile","markdown","marko","matlab","md","mdx","mermaid","narrat","nextflow","nginx","nim","nix","objc","objective-c","objective-cpp","ocaml","pascal","perl","perl6","php","plsql","postcss","powerquery","powershell","prisma","prolog","properties","proto","ps","ps1","pug","puppet","purescript","py","python","ql","r","raku","razor","rb","reg","rel","riscv","rs","rst","ruby","rust","sas","sass","scala","scheme","scss","sh","shader","shaderlab","shell","shellscript","shellsession","smalltalk","solidity","sparql","sql","ssh-config","stata","styl","stylus","svelte","swift","system-verilog","tasl","tcl","terminal","tex","text","toml","ts","tsx","turtle","twig","txt","typescript","v","vb","verilog","vhdl","vim","viml","vimscript","vue","vue-html","vyper","wasm","wenyan","wgsl","wolfram","xml","xsl","yaml","yml","zenscript","zsh","文言"],exports.THEME_NAMES=a,exports.UnknownLanguageError=RB,exports.UnknownThemeError=n,exports.extractAnnotations=async function(A,B,Q){if(!Q)return{code:A,annotations:[]};await HB([B]);const{grammar:g}=kB(B),{newCode:E,annotations:C}=xB(A,g,B,Q);return{code:E,annotations:C}},exports.getThemeColors=async function(A){if(!A)throw new Error("Syntax highlighter error: undefined theme");return await BQ([],A),F(M(A))},exports.getThemeColorsSync=function(A){if(!A)throw new Error("Syntax highlighter error: undefined theme");return F(M(A))},exports.highlight=async function(A,B,Q="dark-plus",g={}){const E=A||"",C=B||"text";if("string"!=typeof E)throw new Error("Syntax highlighter error: code must be a string");if("string"!=typeof C)throw new Error("Syntax highlighter error: lang must be a string");return await BQ([C],Q),QQ(E,C,Q,g)},exports.highlightSync=QQ,exports.preload=BQ; +"use strict";function A(A){if(A&&A.__esModule)return A;var B=Object.create(null);return A&&Object.keys(A).forEach((function(Q){if("default"!==Q){var g=Object.getOwnPropertyDescriptor(A,Q);Object.defineProperty(B,Q,g.get?g:{enumerable:!0,get:function(){return A[Q]}})}})),B.default=A,Object.freeze(B)}function B(A,B){var Q=require("fs"),g=require("path"),E=g.parse,C=require("os");var I=function(A,B){var Q="/";/^([A-Za-z]:)/.test(A)?Q="":/^\\\\/.test(A)&&(Q="\\\\");for(var C=[A],I=E(A);I.dir!==C[C.length-1];)C.push(I.dir),I=E(I.dir);return C.reduce((function(A,E){return A.concat(B.map((function(A){return g.resolve(Q,E,A)})))}),[])};const D=C.homedir||function(){var A=process.env.HOME,B=process.env.LOGNAME||process.env.USER||process.env.LNAME||process.env.USERNAME;return"win32"===process.platform?process.env.USERPROFILE||process.env.HOMEDRIVE+process.env.HOMEPATH||A||null:"darwin"===process.platform?A||(B?"/Users/"+B:null):"linux"===process.platform?A||(0===process.getuid()?"/root":B?"/home/"+B:null):A||null};var w="win32"!==process.platform&&Q.realpathSync&&"function"==typeof Q.realpathSync.native?Q.realpathSync.native:Q.realpathSync,o=D(),s=function(A,B,Q){return Q&&!1===Q.preserveSymlinks?A(B):B},e=function(A,B,Q){for(var E=function(A,B,Q){var g=B&&B.moduleDirectory?[].concat(B.moduleDirectory):["node_modules"];if(B&&"function"==typeof B.paths)return B.paths(Q,A,(function(){return I(A,g)}),B);var E=I(A,g);return B&&B.paths?E.concat(B.paths):E}(B,Q,A),C=0;CA.promises)),C=await Promise.resolve().then((function(){return A(require("path"))})),{URL:I}=await Promise.resolve().then((function(){return A(require("url"))})),D=new I(".","undefined"==typeof document?new(require("url").URL)("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("index.cjs.js",document.baseURI).href).pathname;try{let A=C.resolve(D,"..",Q),B=C.resolve(A,g);const I=await E.readFile(B,"utf8");if(!I)throw new Error("no results");return JSON.parse(I)}catch(A){const I=B("@code-hike/lighter",{basedir:D});let w=C.resolve(I,"..","..",Q),o=C.resolve(w,g);return JSON.parse(await E.readFile(o,"utf8"))}}async function g(B){if("function"==typeof fetch){const A=await fetch(`https://lighter.codehike.org/${B}.json`);return await A.json()}const Q=await Promise.resolve().then((function(){return A(require("https"))})),g={host:"lighter.codehike.org",path:`/${B}.json`,method:"GET"};return new Promise(((A,B)=>{const E=Q.request(g,(B=>{let Q="";B.on("data",(A=>{Q+=A})),B.on("end",(()=>{A(JSON.parse(Q))}))}));E.on("error",(A=>{B(A)})),E.end()}))}Object.defineProperty(exports,"__esModule",{value:!0});const E=A=>/^#([A-Fa-f0-9]{3,4}){1,2}$/.test(A),C=(A,B)=>A.match(new RegExp(`.{${B}}`,"g")),I=A=>parseInt(A.repeat(2/A.length),16);function D(A,B){return void 0!==A?A/255:"number"!=typeof B||B<0||B>1?1:B}function w(A,B){if(!A)return A;const{r:Q,g:g,b:w,a:o}=function(A){if(!A)return;if(!E(A))throw new Error("Invalid color string, must be a valid hex color");const B=Math.floor((A.length-1)/3),Q=C(A.slice(1),B),[g,w,o,s]=Q.map(I);return{r:g,g:w,b:o,a:D(s,1)}}(A);return function(A){if(!A)return;const{r:B,g:Q,b:g,a:E}=A,C=Math.round(255*E);return`#${B.toString(16).padStart(2,"0")}${Q.toString(16).padStart(2,"0")}${g.toString(16).padStart(2,"0")}${C.toString(16).padStart(2,"0")}`}({r:Q,g:g,b:w,a:o*B})}function o(A,B){const Q=A.colors||{};if(Q[B])return Q[B];const g=e[B];if(!g)throw new Error(`Unknown theme color key: ${B}`);return"string"==typeof g?o(A,g):function(A,B){const Q=B[A.type];if(Array.isArray(Q)){const[B,g,...E]=Q;return B(o(A,g),...E)}return Q}(A,g)}const s="#6FC3DF",e={"editor.foreground":{dark:"#bbbbbb",light:"#333333",hc:"#ffffff"},"editorLineNumber.foreground":{dark:"#858585",light:"#237893",hc:"#fffffe"},"editor.selectionBackground":{light:"#ADD6FF",dark:"#264F78",hc:"#f3f518"},"editor.background":{light:"#fffffe",dark:"#1E1E1E",hc:"#000000"},"editorGroupHeader.tabsBackground":{dark:"#252526",light:"#F3F3F3"},"tab.activeBackground":"editor.background","tab.activeForeground":{dark:"#ffffff",light:"#333333",hc:"#ffffff"},"tab.border":{dark:"#252526",light:"#F3F3F3",hc:s},"tab.activeBorder":"tab.activeBackground","tab.inactiveBackground":{dark:"#2D2D2D",light:"#ECECEC"},"tab.inactiveForeground":{dark:[w,"tab.activeForeground",.5],light:[w,"tab.activeForeground",.5],hc:"#ffffff"},"diffEditor.insertedTextBackground":{dark:"#9ccc2c33",light:"#9ccc2c40"},"diffEditor.removedTextBackground":{dark:"#ff000033",light:"#ff000033"},"diffEditor.insertedLineBackground":{dark:"#9bb95533",light:"#9bb95533"},"diffEditor.removedLineBackground":{dark:"#ff000033",light:"#ff000033"},"icon.foreground":{dark:"#C5C5C5",light:"#424242",hc:"#FFFFFF"},"sideBar.background":{dark:"#252526",light:"#F3F3F3",hc:"#000000"},"sideBar.foreground":"editor.foreground","sideBar.border":"sideBar.background","list.inactiveSelectionBackground":{dark:"#37373D",light:"#E4E6F1"},"list.inactiveSelectionForeground":{},"list.hoverBackground":{dark:"#2A2D2E",light:"#F0F0F0"},"list.hoverForeground":{},"editorGroupHeader.tabsBorder":{hc:s},"tab.activeBorderTop":{hc:s},"tab.hoverBackground":"tab.inactiveBackground","tab.hoverForeground":"tab.inactiveForeground","editor.rangeHighlightBackground":{dark:"#ffffff0b",light:"#fdff0033"},"editor.infoForeground":{dark:"#3794FF",light:"#1a85ff",hc:"#3794FF"},"input.border":{hc:s},"input.background":{dark:"#3C3C3C",light:"#fffffe",hc:"#000000"},"input.foreground":"editor.foreground","editor.lineHighlightBackground":{},focusBorder:{light:"#0090F1",dark:"#007FD4",hc:s},"editorGroup.border":{dark:"#444444",light:"#E7E7E7",hc:s},"list.activeSelectionBackground":{dark:"#094771",light:"#0060C0",hc:"#000000"},"list.activeSelectionForeground":{dark:"#fffffe",light:"#fffffe",hc:"#fffffe"},"lighter.inlineBackground":{dark:[w,"editor.background",.9],light:[w,"editor.background",.9]},"terminal.background":"editor.background","terminal.foreground":"editor.foreground","terminal.ansiBlack":{dark:"#000000",light:"#000000",hc:"#000000"},"terminal.ansiRed":{dark:"#cd3131",light:"#cd3131",hc:"#cd0000"},"terminal.ansiGreen":{dark:"#0DBC79",light:"#00BC00",hc:"#00cd00"},"terminal.ansiYellow":{dark:"#e5e510",light:"#949800",hc:"#cdcd00"},"terminal.ansiBlue":{dark:"#2472c8",light:"#0451a5",hc:"#0000ee"},"terminal.ansiMagenta":{dark:"#bc3fbc",light:"#bc05bc",hc:"#cd00cd"},"terminal.ansiCyan":{dark:"#11a8cd",light:"#0598bc",hc:"#00cdcd"},"terminal.ansiWhite":{dark:"#e5e5e5",light:"#555555",hc:"#e5e5e5"},"terminal.ansiBrightBlack":{dark:"#666666",light:"#666666",hc:"#7f7f7f"},"terminal.ansiBrightRed":{dark:"#f14c4c",light:"#cd3131",hc:"#ff0000"},"terminal.ansiBrightGreen":{dark:"#23d18b",light:"#14CE14",hc:"#00ff00"},"terminal.ansiBrightYellow":{dark:"#f5f543",light:"#b5ba00",hc:"#ffff00"},"terminal.ansiBrightBlue":{dark:"#3b8eea",light:"#0451a5",hc:"#5c5cff"},"terminal.ansiBrightMagenta":{dark:"#d670d6",light:"#bc05bc",hc:"#ff00ff"},"terminal.ansiBrightCyan":{dark:"#29b8db",light:"#0598bc",hc:"#00ffff"},"terminal.ansiBrightWhite":{dark:"#e5e5e5",light:"#a5a5a5",hc:"#ffffff"}},c=new Map,i=new Map;async function t(A){if("string"==typeof A){const B=A;if(!h.includes(B))throw new n(B);if(!c.has(B)){const A=async function(A){try{return await Q("themes",A+".json")}catch(B){return await g(`themes/${A}`)}}(B).then((A=>(i.set(B,A),A)));c.set(B,A)}return c.get(B)}return A}function M(A){let B=null;if("string"==typeof A){if(B=i.get(A),!B)throw new Error("Syntax highlighting error: theme not loaded")}else B=A;return function(A){if(!A)return;const B=A.settings||A.tokenColors||[],Q={name:A.name||"unknown-theme",type:a(A),foreground:"",background:"",settings:B,colors:A.colors||{},colorNames:A.colorNames},g=B.find((A=>!A.scope));if(g){const{foreground:A,background:B}=(null==g?void 0:g.settings)||{},E={};A&&!Q.colors["editor.foreground"]&&(E["editor.foreground"]=A),B&&!Q.colors["editor.background"]&&(E["editor.background"]=B),Object.keys(E).length>0&&(Q.colors=Object.assign(Object.assign({},Q.colors),E)),Q.foreground=A,Q.background=B}g||(Q.settings=[{settings:{foreground:o(Q,"editor.foreground"),background:o(Q,"editor.background")}},...Q.settings]);if(Q.background=Q.background||o(Q,"editor.background"),Q.foreground=Q.foreground||o(Q,"editor.foreground"),"from-css"===A.type&&!Q.colorNames){const A={};let B=0;Q.settings=Q.settings.map((Q=>{const g=Object.assign(Object.assign({},Q),{settings:Object.assign({},Q.settings)}),{foreground:E,background:C}=g.settings||{};return E&&!A[E]&&(A[E]=`#${B.toString(16).padStart(6,"0")}`,B++),C&&!A[C]&&(A[C]=`#${B.toString(16).padStart(6,"0")}`,B++),E&&(g.settings.foreground=A[E]),C&&(g.settings.background=A[C]),g})),Q.colorNames=A}return Q}(B)}function a(A){var B;if("from-css"===A.type)return"from-css";return"light"===(A.type?A.type:(null===(B=A.name)||void 0===B?void 0:B.toLowerCase().includes("light"))?"light":"dark")?"light":"dark"}const h=["dark-plus","dracula-soft","dracula","github-dark","github-dark-dimmed","github-from-css","github-light","light-plus","material-darker","material-default","material-from-css","material-lighter","material-ocean","material-palenight","min-dark","min-light","monokai","nord","one-dark-pro","poimandres","slack-dark","slack-ochin","solarized-dark","solarized-light"];class n extends Error{constructor(A){super(`Unknown theme: ${A}`),this.theme=A}}function F(A){const B=B=>"colorScheme"===B?function(A){return"from-css"===A.type?"var(--ch-0)":A.type}(A):"foreground"===B?A.foreground:"background"===B?A.background:o(A,B);return{colorScheme:B("colorScheme"),foreground:B("foreground"),background:B("background"),lighter:{inlineBackground:B("lighter.inlineBackground")},editor:{background:B("editor.background"),foreground:B("editor.foreground"),lineHighlightBackground:B("editor.lineHighlightBackground"),rangeHighlightBackground:B("editor.rangeHighlightBackground"),infoForeground:B("editor.infoForeground"),selectionBackground:B("editor.selectionBackground")},focusBorder:B("focusBorder"),tab:{activeBackground:B("tab.activeBackground"),activeForeground:B("tab.activeForeground"),inactiveBackground:B("tab.inactiveBackground"),inactiveForeground:B("tab.inactiveForeground"),border:B("tab.border"),activeBorder:B("tab.activeBorder"),activeBorderTop:B("tab.activeBorderTop")},editorGroup:{border:B("editorGroup.border")},editorGroupHeader:{tabsBackground:B("editorGroupHeader.tabsBackground")},editorLineNumber:{foreground:B("editorLineNumber.foreground")},input:{background:B("input.background"),foreground:B("input.foreground"),border:B("input.border")},icon:{foreground:B("icon.foreground")},sideBar:{background:B("sideBar.background"),foreground:B("sideBar.foreground"),border:B("sideBar.border")},list:{activeSelectionBackground:B("list.activeSelectionBackground"),activeSelectionForeground:B("list.activeSelectionForeground"),hoverBackground:B("list.hoverBackground"),hoverForeground:B("list.hoverForeground")}}}const r={abap:"source.abap","actionscript-3":"source.actionscript.3",ada:"source.ada",apache:"source.apacheconf",apex:"source.apex",apl:"source.apl",applescript:"source.applescript",ara:"source.ara",asm:"source.asm.x86_64",astro:"source.astro",awk:"source.awk",ballerina:"source.ballerina",bat:"source.batchfile",batch:"source.batchfile",beancount:"text.beancount",berry:"source.berry",be:"source.berry",bibtex:"text.bibtex",bicep:"source.bicep",blade:"text.html.php.blade",c:"source.c",cadence:"source.cadence",cdc:"source.cadence",clarity:"source.clar",clojure:"source.clojure",clj:"source.clojure",cmake:"source.cmake",cobol:"source.cobol",codeql:"source.ql",ql:"source.ql",coffee:"source.coffee",cpp:"source.cpp",crystal:"source.crystal",csharp:"source.cs","c#":"source.cs",cs:"source.cs",css:"source.css",cue:"source.cue",cypher:"source.cypher",d:"source.d",dart:"source.dart",dax:"source.dax",diff:"source.diff",docker:"source.dockerfile",dockerfile:"source.dockerfile","dream-maker":"source.dm",elixir:"source.elixir",elm:"source.elm",erb:"text.html.erb",erlang:"source.erlang",erl:"source.erlang",fish:"source.fish",fsharp:"source.fsharp","f#":"source.fsharp",fs:"source.fsharp",gdresource:"source.gdresource",gdscript:"source.gdscript",gdshader:"source.gdshader",gherkin:"text.gherkin.feature","git-commit":"text.git-commit","git-rebase":"text.git-rebase","glimmer-js":"source.gjs","glimmer-ts":"source.gts",glsl:"source.glsl",gnuplot:"source.gnuplot",go:"source.go",graphql:"source.graphql",groovy:"source.groovy",hack:"source.hack",haml:"text.haml",handlebars:"text.html.handlebars",hbs:"text.html.handlebars",haskell:"source.haskell",hs:"source.haskell",hcl:"source.hcl",hjson:"source.hjson",hlsl:"source.hlsl",html:"text.html.basic",http:"source.http",imba:"source.imba",ini:"source.ini",properties:"source.ini",java:"source.java",javascript:"source.js",js:"source.js","jinja-html":"text.html.jinja",jison:"source.jison",json:"source.json",json5:"source.json5",jsonc:"source.json.comments",jsonl:"source.json.lines",jsonnet:"source.jsonnet",jssm:"source.jssm",fsl:"source.jssm",jsx:"source.js.jsx",julia:"source.julia",kotlin:"source.kotlin",kusto:"source.kusto",kql:"source.kusto",latex:"text.tex.latex",less:"source.css.less",liquid:"text.html.liquid",lisp:"source.lisp",logo:"source.logo",lua:"source.lua",make:"source.makefile",makefile:"source.makefile",markdown:"text.html.markdown",md:"text.html.markdown",marko:"text.marko",matlab:"source.matlab",mdx:"source.mdx",mermaid:"source.mermaid",narrat:"source.narrat",nextflow:"source.nextflow",nginx:"source.nginx",nim:"source.nim",nix:"source.nix","objective-c":"source.objc",objc:"source.objc","objective-cpp":"source.objcpp",ocaml:"source.ocaml",pascal:"source.pascal",perl:"source.perl",php:"source.php",plsql:"source.plsql.oracle",postcss:"source.css.postcss",powerquery:"source.powerquery",powershell:"source.powershell",ps:"source.powershell",ps1:"source.powershell",prisma:"source.prisma",prolog:"source.prolog",proto:"source.proto",pug:"text.pug",jade:"text.pug",puppet:"source.puppet",purescript:"source.purescript",python:"source.python",py:"source.python",r:"source.r",raku:"source.perl.6",perl6:"source.perl.6",razor:"text.aspnetcorerazor",reg:"source.reg",rel:"source.rel",riscv:"source.riscv",rst:"source.rst",ruby:"source.ruby",rb:"source.ruby",rust:"source.rust",rs:"source.rust",sas:"source.sas",sass:"source.sass",scala:"source.scala",scheme:"source.scheme",scss:"source.css.scss",shaderlab:"source.shaderlab",shader:"source.shaderlab",shellscript:"source.shell",bash:"source.shell",console:"source.shell",sh:"source.shell",shell:"source.shell",zsh:"source.shell",shellsession:"text.shell-session",smalltalk:"source.smalltalk",solidity:"source.solidity",sparql:"source.sparql",sql:"source.sql","ssh-config":"source.ssh-config",stata:"source.stata",stylus:"source.stylus",styl:"source.stylus",svelte:"source.svelte",swift:"source.swift","system-verilog":"source.systemverilog",tasl:"source.tasl",tcl:"source.tcl",tex:"text.tex",toml:"source.toml",tsx:"source.tsx",turtle:"source.turtle",twig:"text.html.twig",txt:"source.txt",typescript:"source.ts",ts:"source.ts",v:"source.v",vb:"source.asp.vb.net",cmd:"source.asp.vb.net",verilog:"source.verilog",vhdl:"source.vhdl",viml:"source.viml",vim:"source.viml",vimscript:"source.viml","vue-html":"text.html.vue-html",vue:"source.vue",vyper:"source.vyper",wasm:"source.wat",wenyan:"source.wenyan","文言":"source.wenyan",wgsl:"source.wgsl",wolfram:"source.wolfram",xml:"text.xml",xsl:"text.xml.xsl",yaml:"source.yaml",yml:"source.yaml",zenscript:"source.zenscript"},G={"source.abap":{id:"abap",path:"abap.tmLanguage.json",embeddedScopes:[]},"source.actionscript.3":{id:"actionscript-3",path:"actionscript-3.tmLanguage.json",embeddedScopes:[]},"source.ada":{id:"ada",path:"ada.tmLanguage.json",embeddedScopes:[]},"source.apacheconf":{id:"apache",path:"apache.tmLanguage.json",embeddedScopes:[]},"source.apex":{id:"apex",path:"apex.tmLanguage.json",embeddedScopes:[]},"source.apl":{id:"apl",path:"apl.tmLanguage.json",embeddedScopes:["source.java","source.json","source.js","source.css","text.xml","text.html.basic"]},"source.applescript":{id:"applescript",path:"applescript.tmLanguage.json",embeddedScopes:[]},"source.ara":{id:"ara",path:"ara.tmLanguage.json",embeddedScopes:[]},"source.asm.x86_64":{id:"asm",path:"asm.tmLanguage.json",embeddedScopes:[]},"source.astro":{id:"astro",path:"astro.tmLanguage.json",embeddedScopes:["source.tsx","source.css.postcss","source.css.less","source.css.scss","source.css","source.sass","source.stylus","source.ts","source.js","source.json"]},"source.awk":{id:"awk",path:"awk.tmLanguage.json",embeddedScopes:[]},"source.ballerina":{id:"ballerina",path:"ballerina.tmLanguage.json",embeddedScopes:[]},"source.batchfile":{id:"bat",path:"bat.tmLanguage.json",embeddedScopes:[]},"text.beancount":{id:"beancount",path:"beancount.tmLanguage.json",embeddedScopes:[]},"source.berry":{id:"berry",path:"berry.tmLanguage.json",embeddedScopes:[]},"text.bibtex":{id:"bibtex",path:"bibtex.tmLanguage.json",embeddedScopes:[]},"source.bicep":{id:"bicep",path:"bicep.tmLanguage.json",embeddedScopes:[]},"text.html.php.blade":{id:"blade",path:"blade.tmLanguage.json",embeddedScopes:["source.java","source.css","source.json","source.js","source.sql","text.xml","text.html.basic"]},"source.c":{id:"c",path:"c.tmLanguage.json",embeddedScopes:[]},"source.cadence":{id:"cadence",path:"cadence.tmLanguage.json",embeddedScopes:[]},"source.clar":{id:"clarity",path:"clarity.tmLanguage.json",embeddedScopes:[]},"source.clojure":{id:"clojure",path:"clojure.tmLanguage.json",embeddedScopes:[]},"source.cmake":{id:"cmake",path:"cmake.tmLanguage.json",embeddedScopes:[]},"source.cobol":{id:"cobol",path:"cobol.tmLanguage.json",embeddedScopes:["source.css","source.js","source.java","text.html.basic","source.sql"]},"source.ql":{id:"codeql",path:"codeql.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.stylus","source.sass","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.tsx","source.ts","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.css.scss","source.swift","source.objc","source.css.less","source.json.comments","source.json","source.js","text.pug","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.coffee","source.clojure","source.batchfile","source.yaml","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","text.html.basic","source.css","text.html.markdown"]},"source.coffee":{id:"coffee",path:"coffee.tmLanguage.json",embeddedScopes:["source.js"]},"source.cpp":{id:"cpp",path:"cpp.tmLanguage.json",embeddedScopes:["source.c","source.sql","source.glsl"]},"source.crystal":{id:"crystal",path:"crystal.tmLanguage.json",embeddedScopes:["source.shell","source.js","source.c","source.css","source.sql","text.html.basic"]},"source.cs":{id:"csharp",path:"csharp.tmLanguage.json",embeddedScopes:[]},"source.css":{id:"css",path:"css.tmLanguage.json",embeddedScopes:[]},"source.cue":{id:"cue",path:"cue.tmLanguage.json",embeddedScopes:[]},"source.cypher":{id:"cypher",path:"cypher.tmLanguage.json",embeddedScopes:[]},"source.d":{id:"d",path:"d.tmLanguage.json",embeddedScopes:[]},"source.dart":{id:"dart",path:"dart.tmLanguage.json",embeddedScopes:[]},"source.dax":{id:"dax",path:"dax.tmLanguage.json",embeddedScopes:[]},"source.diff":{id:"diff",path:"diff.tmLanguage.json",embeddedScopes:[]},"source.dockerfile":{id:"docker",path:"docker.tmLanguage.json",embeddedScopes:[]},"source.dm":{id:"dream-maker",path:"dream-maker.tmLanguage.json",embeddedScopes:[]},"source.elixir":{id:"elixir",path:"elixir.tmLanguage.json",embeddedScopes:["source.css","source.js","text.html.basic"]},"source.elm":{id:"elm",path:"elm.tmLanguage.json",embeddedScopes:["source.c","source.glsl"]},"text.html.erb":{id:"erb",path:"erb.tmLanguage.json",embeddedScopes:["source.java","source.lua","source.shell","source.c","source.sql","text.xml","source.css","source.js","source.ruby","text.html.basic"]},"source.erlang":{id:"erlang",path:"erlang.tmLanguage.json",embeddedScopes:[]},"source.fish":{id:"fish",path:"fish.tmLanguage.json",embeddedScopes:[]},"source.fsharp":{id:"fsharp",path:"fsharp.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.stylus","source.sass","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.cs","source.tsx","source.ts","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.css.scss","source.swift","source.objc","source.css.less","source.json.comments","source.json","source.js","text.pug","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.coffee","source.clojure","source.batchfile","source.yaml","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","text.html.basic","source.css","text.html.markdown"]},"source.gdresource":{id:"gdresource",path:"gdresource.tmLanguage.json",embeddedScopes:["source.gdscript","source.gdshader"]},"source.gdscript":{id:"gdscript",path:"gdscript.tmLanguage.json",embeddedScopes:[]},"source.gdshader":{id:"gdshader",path:"gdshader.tmLanguage.json",embeddedScopes:[]},"text.gherkin.feature":{id:"gherkin",path:"gherkin.tmLanguage.json",embeddedScopes:[]},"text.git-commit":{id:"git-commit",path:"git-commit.tmLanguage.json",embeddedScopes:["source.diff"]},"text.git-rebase":{id:"git-rebase",path:"git-rebase.tmLanguage.json",embeddedScopes:["source.shell"]},"source.gjs":{id:"glimmer-js",path:"glimmer-js.tmLanguage.json",embeddedScopes:["source.yaml","source.css","text.html.basic","text.html.handlebars","source.js"]},"source.gts":{id:"glimmer-ts",path:"glimmer-ts.tmLanguage.json",embeddedScopes:["source.yaml","source.js","source.css","text.html.basic","text.html.handlebars","source.ts"]},"source.glsl":{id:"glsl",path:"glsl.tmLanguage.json",embeddedScopes:["source.c"]},"source.gnuplot":{id:"gnuplot",path:"gnuplot.tmLanguage.json",embeddedScopes:[]},"source.go":{id:"go",path:"go.tmLanguage.json",embeddedScopes:[]},"source.graphql":{id:"graphql",path:"graphql.tmLanguage.json",embeddedScopes:["source.tsx","source.js.jsx","source.ts","source.js"]},"source.groovy":{id:"groovy",path:"groovy.tmLanguage.json",embeddedScopes:[]},"source.hack":{id:"hack",path:"hack.tmLanguage.json",embeddedScopes:["source.css","source.js","source.sql","text.html.basic"]},"text.haml":{id:"haml",path:"haml.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.stylus","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.tsx","source.ts","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.css.scss","source.swift","source.objc","source.css.less","source.json.comments","source.json","text.pug","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.clojure","source.batchfile","source.yaml","text.xml.xsl","source.asp.vb.net","source.php","source.r","source.perl","source.makefile","source.java","source.ini","source.lua","source.shell","source.c","source.sql","text.xml","text.html.basic","source.css","text.html.markdown","source.coffee","source.sass","source.js","source.ruby"]},"text.html.handlebars":{id:"handlebars",path:"handlebars.tmLanguage.json",embeddedScopes:["source.yaml","source.js","source.css","text.html.basic"]},"source.haskell":{id:"haskell",path:"haskell.tmLanguage.json",embeddedScopes:[]},"source.hcl":{id:"hcl",path:"hcl.tmLanguage.json",embeddedScopes:[]},"source.hjson":{id:"hjson",path:"hjson.tmLanguage.json",embeddedScopes:[]},"source.hlsl":{id:"hlsl",path:"hlsl.tmLanguage.json",embeddedScopes:[]},"text.html.basic":{id:"html",path:"html.tmLanguage.json",embeddedScopes:["source.css","source.js"]},"source.http":{id:"http",path:"http.tmLanguage.json",embeddedScopes:["source.tsx","source.js.jsx","source.ts","source.js","source.java","source.graphql","text.xml","source.json","source.shell"]},"source.imba":{id:"imba",path:"imba.tmLanguage.json",embeddedScopes:[]},"source.ini":{id:"ini",path:"ini.tmLanguage.json",embeddedScopes:[]},"source.java":{id:"java",path:"java.tmLanguage.json",embeddedScopes:[]},"source.js":{id:"javascript",path:"javascript.tmLanguage.json",embeddedScopes:[]},"text.html.jinja":{id:"jinja-html",path:"jinja-html.tmLanguage.json",embeddedScopes:["source.css","source.js","text.html.basic"]},"source.jison":{id:"jison",path:"jison.tmLanguage.json",embeddedScopes:["source.js"]},"source.json":{id:"json",path:"json.tmLanguage.json",embeddedScopes:[]},"source.json5":{id:"json5",path:"json5.tmLanguage.json",embeddedScopes:[]},"source.json.comments":{id:"jsonc",path:"jsonc.tmLanguage.json",embeddedScopes:[]},"source.json.lines":{id:"jsonl",path:"jsonl.tmLanguage.json",embeddedScopes:[]},"source.jsonnet":{id:"jsonnet",path:"jsonnet.tmLanguage.json",embeddedScopes:[]},"source.jssm":{id:"jssm",path:"jssm.tmLanguage.json",embeddedScopes:[]},"source.js.jsx":{id:"jsx",path:"jsx.tmLanguage.json",embeddedScopes:[]},"source.julia":{id:"julia",path:"julia.tmLanguage.json",embeddedScopes:["source.c","source.glsl","source.sql","source.r","source.js","source.python","source.cpp"]},"source.kotlin":{id:"kotlin",path:"kotlin.tmLanguage.json",embeddedScopes:[]},"source.kusto":{id:"kusto",path:"kusto.tmLanguage.json",embeddedScopes:[]},"text.tex.latex":{id:"latex",path:"latex.tmLanguage.json",embeddedScopes:["source.glsl","source.shell","source.sql","source.cpp","source.c","source.r","source.gnuplot","source.scala","source.rust","source.yaml","source.python","source.ts","source.js","source.ruby","source.julia","source.lua","source.java","text.xml","text.html.basic","source.haskell","source.css","text.tex"]},"source.css.less":{id:"less",path:"less.tmLanguage.json",embeddedScopes:["source.css"]},"text.html.liquid":{id:"liquid",path:"liquid.tmLanguage.json",embeddedScopes:["source.js","source.json","source.css","text.html.basic"]},"source.lisp":{id:"lisp",path:"lisp.tmLanguage.json",embeddedScopes:[]},"source.logo":{id:"logo",path:"logo.tmLanguage.json",embeddedScopes:[]},"source.lua":{id:"lua",path:"lua.tmLanguage.json",embeddedScopes:["source.c"]},"source.makefile":{id:"make",path:"make.tmLanguage.json",embeddedScopes:[]},"text.html.markdown":{id:"markdown",path:"markdown.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.stylus","source.sass","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.tsx","source.ts","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.css.scss","source.swift","source.objc","source.css.less","source.json.comments","source.json","source.js","text.pug","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.coffee","source.clojure","source.batchfile","source.yaml","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","text.html.basic","source.css"]},"text.marko":{id:"marko",path:"marko.tmLanguage.json",embeddedScopes:["source.js","source.css.scss","source.css.less","source.css"]},"source.matlab":{id:"matlab",path:"matlab.tmLanguage.json",embeddedScopes:[]},"source.mdx":{id:"mdx",path:"mdx.tmLanguage.json",embeddedScopes:["source.gnuplot","text.tex","source.stylus","source.sass","text.bibtex","text.tex.latex","text.html.handlebars","source.dart","source.fsharp","source.powershell","source.perl.6","source.json.comments","text.pug","source.groovy","text.git-rebase","text.git-commit","source.batchfile","text.xml.xsl","source.asp.vb.net","source.php","source.js.jsx","source.glsl","source.ts","source.swift","text.xml","source.sql","text.shell-session","source.shell","source.css.scss","source.scala","source.rust","source.ruby","source.r","source.python","source.perl","source.objc","text.html.markdown","source.makefile","source.lua","source.css.less","source.kotlin","source.julia","source.json","source.js","source.java","source.ini","text.html.basic","source.haskell","source.graphql","source.go","source.erlang","source.elm","source.elixir","source.dockerfile","source.diff","source.css","source.cs","source.cpp","source.coffee","source.clojure","source.c","source.yaml","source.toml","source.tsx"]},"source.mermaid":{id:"mermaid",path:"mermaid.tmLanguage.json",embeddedScopes:[]},"source.narrat":{id:"narrat",path:"narrat.tmLanguage.json",embeddedScopes:[]},"source.nextflow":{id:"nextflow",path:"nextflow.tmLanguage.json",embeddedScopes:[]},"source.nginx":{id:"nginx",path:"nginx.tmLanguage.json",embeddedScopes:["source.c","source.lua"]},"source.nim":{id:"nim",path:"nim.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.stylus","source.sass","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.tsx","source.ts","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.css.scss","source.swift","source.objc","source.css.less","source.json.comments","source.json","text.pug","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.coffee","source.clojure","source.batchfile","source.yaml","text.xml.xsl","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.ini","source.java","text.html.markdown","source.glsl","source.css","source.js","text.xml","text.html.basic","source.c"]},"source.nix":{id:"nix",path:"nix.tmLanguage.json",embeddedScopes:[]},"source.objc":{id:"objective-c",path:"objective-c.tmLanguage.json",embeddedScopes:[]},"source.objcpp":{id:"objective-cpp",path:"objective-cpp.tmLanguage.json",embeddedScopes:[]},"source.ocaml":{id:"ocaml",path:"ocaml.tmLanguage.json",embeddedScopes:[]},"source.pascal":{id:"pascal",path:"pascal.tmLanguage.json",embeddedScopes:[]},"source.perl":{id:"perl",path:"perl.tmLanguage.json",embeddedScopes:["source.java","source.sql","source.js","source.css","text.xml","text.html.basic"]},"source.php":{id:"php",path:"php.tmLanguage.json",embeddedScopes:["source.java","source.css","source.json","source.js","source.sql","text.xml","text.html.basic"]},"source.plsql.oracle":{id:"plsql",path:"plsql.tmLanguage.json",embeddedScopes:[]},"source.css.postcss":{id:"postcss",path:"postcss.tmLanguage.json",embeddedScopes:[]},"source.powerquery":{id:"powerquery",path:"powerquery.tmLanguage.json",embeddedScopes:[]},"source.powershell":{id:"powershell",path:"powershell.tmLanguage.json",embeddedScopes:[]},"source.prisma":{id:"prisma",path:"prisma.tmLanguage.json",embeddedScopes:[]},"source.prolog":{id:"prolog",path:"prolog.tmLanguage.json",embeddedScopes:[]},"source.proto":{id:"proto",path:"proto.tmLanguage.json",embeddedScopes:[]},"text.pug":{id:"pug",path:"pug.tmLanguage.json",embeddedScopes:["text.html.basic","source.coffee","source.stylus","source.css.scss","source.sass","source.css","source.js"]},"source.puppet":{id:"puppet",path:"puppet.tmLanguage.json",embeddedScopes:[]},"source.purescript":{id:"purescript",path:"purescript.tmLanguage.json",embeddedScopes:[]},"source.python":{id:"python",path:"python.tmLanguage.json",embeddedScopes:[]},"source.r":{id:"r",path:"r.tmLanguage.json",embeddedScopes:[]},"source.perl.6":{id:"raku",path:"raku.tmLanguage.json",embeddedScopes:[]},"text.aspnetcorerazor":{id:"razor",path:"razor.tmLanguage.json",embeddedScopes:["source.css","source.js","source.cs","text.html.basic"]},"source.reg":{id:"reg",path:"reg.tmLanguage.json",embeddedScopes:[]},"source.rel":{id:"rel",path:"rel.tmLanguage.json",embeddedScopes:[]},"source.riscv":{id:"riscv",path:"riscv.tmLanguage.json",embeddedScopes:[]},"source.rst":{id:"rst",path:"rst.tmLanguage.json",embeddedScopes:["source.java","source.lua","source.c","source.css","text.xml","text.html.basic","source.sql","source.glsl","source.ruby","source.cmake","source.yaml","source.shell","source.js","source.python","source.cpp"]},"source.ruby":{id:"ruby",path:"ruby.tmLanguage.json",embeddedScopes:["source.java","source.lua","source.shell","source.js","source.c","source.css","source.sql","text.xml","text.html.basic"]},"source.rust":{id:"rust",path:"rust.tmLanguage.json",embeddedScopes:[]},"source.sas":{id:"sas",path:"sas.tmLanguage.json",embeddedScopes:["source.sql"]},"source.sass":{id:"sass",path:"sass.tmLanguage.json",embeddedScopes:[]},"source.scala":{id:"scala",path:"scala.tmLanguage.json",embeddedScopes:[]},"source.scheme":{id:"scheme",path:"scheme.tmLanguage.json",embeddedScopes:[]},"source.css.scss":{id:"scss",path:"scss.tmLanguage.json",embeddedScopes:["source.css"]},"source.shaderlab":{id:"shaderlab",path:"shaderlab.tmLanguage.json",embeddedScopes:["source.hlsl"]},"source.shell":{id:"shellscript",path:"shellscript.tmLanguage.json",embeddedScopes:[]},"text.shell-session":{id:"shellsession",path:"shellsession.tmLanguage.json",embeddedScopes:["source.shell"]},"source.smalltalk":{id:"smalltalk",path:"smalltalk.tmLanguage.json",embeddedScopes:[]},"source.solidity":{id:"solidity",path:"solidity.tmLanguage.json",embeddedScopes:[]},"source.sparql":{id:"sparql",path:"sparql.tmLanguage.json",embeddedScopes:["source.turtle"]},"source.sql":{id:"sql",path:"sql.tmLanguage.json",embeddedScopes:[]},"source.ssh-config":{id:"ssh-config",path:"ssh-config.tmLanguage.json",embeddedScopes:[]},"source.stata":{id:"stata",path:"stata.tmLanguage.json",embeddedScopes:["source.sql"]},"source.stylus":{id:"stylus",path:"stylus.tmLanguage.json",embeddedScopes:[]},"source.svelte":{id:"svelte",path:"svelte.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.tsx","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.swift","source.objc","source.json.comments","source.json","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.clojure","source.batchfile","source.yaml","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","text.html.basic","text.html.markdown","text.pug","source.css.postcss","source.css.less","source.css.scss","source.css","source.sass","source.stylus","source.coffee","source.ts","source.js"]},"source.swift":{id:"swift",path:"swift.tmLanguage.json",embeddedScopes:[]},"source.systemverilog":{id:"system-verilog",path:"system-verilog.tmLanguage.json",embeddedScopes:[]},"source.tasl":{id:"tasl",path:"tasl.tmLanguage.json",embeddedScopes:[]},"source.tcl":{id:"tcl",path:"tcl.tmLanguage.json",embeddedScopes:[]},"text.tex":{id:"tex",path:"tex.tmLanguage.json",embeddedScopes:["source.r"]},"source.toml":{id:"toml",path:"toml.tmLanguage.json",embeddedScopes:[]},"source.tsx":{id:"tsx",path:"tsx.tmLanguage.json",embeddedScopes:[]},"source.turtle":{id:"turtle",path:"turtle.tmLanguage.json",embeddedScopes:[]},"text.html.twig":{id:"twig",path:"twig.tmLanguage.json",embeddedScopes:["source.java","source.lua","source.shell","source.c","source.json","source.sql","text.xml","text.html.basic","source.ruby","source.python","source.php","source.js","source.css"]},"source.txt":{id:"txt",path:"txt.tmLanguage.json",embeddedScopes:[]},"source.ts":{id:"typescript",path:"typescript.tmLanguage.json",embeddedScopes:[]},"source.v":{id:"v",path:"v.tmLanguage.json",embeddedScopes:[]},"source.asp.vb.net":{id:"vb",path:"vb.tmLanguage.json",embeddedScopes:[]},"source.verilog":{id:"verilog",path:"verilog.tmLanguage.json",embeddedScopes:[]},"source.vhdl":{id:"vhdl",path:"vhdl.tmLanguage.json",embeddedScopes:[]},"source.viml":{id:"viml",path:"viml.tmLanguage.json",embeddedScopes:[]},"text.html.vue-html":{id:"vue-html",path:"vue-html.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.swift","source.objc","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.coffee","source.clojure","source.batchfile","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","source.graphql","source.toml","source.yaml","source.json5","source.json.comments","source.json","source.tsx","source.js.jsx","source.ts","source.css.less","source.css.scss","source.css","source.sass","source.stylus","text.pug","text.html.markdown","text.html.basic","source.js","source.vue"]},"source.vue":{id:"vue",path:"vue.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.swift","source.objc","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.coffee","source.clojure","source.batchfile","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","source.graphql","source.toml","source.yaml","source.json5","source.json.comments","source.json","source.tsx","source.js.jsx","source.ts","source.js","source.css.less","source.css.scss","source.css","source.sass","source.stylus","text.pug","text.html.markdown","text.html.basic"]},"source.vyper":{id:"vyper",path:"vyper.tmLanguage.json",embeddedScopes:[]},"source.wat":{id:"wasm",path:"wasm.tmLanguage.json",embeddedScopes:[]},"source.wenyan":{id:"wenyan",path:"wenyan.tmLanguage.json",embeddedScopes:[]},"source.wgsl":{id:"wgsl",path:"wgsl.tmLanguage.json",embeddedScopes:[]},"source.wolfram":{id:"wolfram",path:"wolfram.tmLanguage.json",embeddedScopes:[]},"text.xml":{id:"xml",path:"xml.tmLanguage.json",embeddedScopes:["source.java"]},"text.xml.xsl":{id:"xsl",path:"xsl.tmLanguage.json",embeddedScopes:["source.java","text.xml"]},"source.yaml":{id:"yaml",path:"yaml.tmLanguage.json",embeddedScopes:[]},"source.zenscript":{id:"zenscript",path:"zenscript.tmLanguage.json",embeddedScopes:[]}};var N={d:(A,B)=>{for(var Q in B)N.o(B,Q)&&!N.o(A,Q)&&Object.defineProperty(A,Q,{enumerable:!0,get:B[Q]})},o:(A,B)=>Object.prototype.hasOwnProperty.call(A,B)},L={};N.d(L,{_X:()=>XA,Bz:()=>vA,ot:()=>TA,u:()=>WA,jG:()=>Y,Pn:()=>ZA});const H="undefined"!=typeof process&&!!process.env.VSCODE_TEXTMATE_DEBUG;var k;function R(A,B){const Q=[],g=function(A){let B=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,Q=B.exec(A);return{next:()=>{if(!Q)return null;const g=Q[0];return Q=B.exec(A),g}}}(A);let E=g.next();for(;null!==E;){let A=0;if(2===E.length&&":"===E.charAt(1)){switch(E.charAt(0)){case"R":A=1;break;case"L":A=-1;break;default:console.log(`Unknown priority ${E} in scope selector`)}E=g.next()}let B=I();if(Q.push({matcher:B,priority:A}),","!==E)break;E=g.next()}return Q;function C(){if("-"===E){E=g.next();const A=C();return B=>!!A&&!A(B)}if("("===E){E=g.next();const A=function(){const A=[];let B=I();for(;B&&(A.push(B),"|"===E||","===E);){do{E=g.next()}while("|"===E||","===E);B=I()}return B=>A.some((A=>A(B)))}();return")"===E&&(E=g.next()),A}if(K(E)){const A=[];do{A.push(E),E=g.next()}while(K(E));return Q=>B(A,Q)}return null}function I(){const A=[];let B=C();for(;B;)A.push(B),B=C();return B=>A.every((A=>A(B)))}}function K(A){return!!A&&!!A.match(/[\w\.:]+/)}function Y(A){"function"==typeof A.dispose&&A.dispose()}function U(A){return Array.isArray(A)?function(A){let B=[];for(let Q=0,g=A.length;Q{for(let Q in B)A[Q]=B[Q]})),A}function P(A){const B=~A.lastIndexOf("/")||~A.lastIndexOf("\\");return 0===B?A:~B==A.length-1?P(A.substring(0,A.length-1)):A.substr(1+~B)}!function(A){A.toBinaryStr=function(A){let B=A.toString(2);for(;B.length<32;)B="0"+B;return B},A.print=function(B){const Q=A.getLanguageId(B),g=A.getTokenType(B),E=A.getFontStyle(B),C=A.getForeground(B),I=A.getBackground(B);console.log({languageId:Q,tokenType:g,fontStyle:E,foreground:C,background:I})},A.getLanguageId=function(A){return(255&A)>>>0},A.getTokenType=function(A){return(768&A)>>>8},A.containsBalancedBrackets=function(A){return 0!=(1024&A)},A.getFontStyle=function(A){return(30720&A)>>>11},A.getForeground=function(A){return(16744448&A)>>>15},A.getBackground=function(A){return(4278190080&A)>>>24},A.set=function(B,Q,g,E,C,I,D){let w=A.getLanguageId(B),o=A.getTokenType(B),s=A.containsBalancedBrackets(B)?1:0,e=A.getFontStyle(B),c=A.getForeground(B),i=A.getBackground(B);return 0!==Q&&(w=Q),8!==g&&(o=g),null!==E&&(s=E?1:0),-1!==C&&(e=C),0!==I&&(c=I),0!==D&&(i=D),(w<<0|o<<8|s<<10|e<<11|c<<15|i<<24)>>>0}}(k||(k={}));let y=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g;class J{static hasCaptures(A){return null!==A&&(y.lastIndex=0,y.test(A))}static replaceCaptures(A,B,Q){return A.replace(y,((A,g,E,C)=>{let I=Q[parseInt(g||E,10)];if(!I)return A;{let A=B.substring(I.start,I.end);for(;"."===A[0];)A=A.substring(1);switch(C){case"downcase":return A.toLowerCase();case"upcase":return A.toUpperCase();default:return A}}}))}}function S(A,B){return AB?1:0}function p(A,B){if(null===A&&null===B)return 0;if(!A)return-1;if(!B)return 1;let Q=A.length,g=B.length;if(Q===g){for(let g=0;g`);return}const C=Q.lookup(B);A instanceof m?v({baseGrammar:C,selfGrammar:E},g):T(A.ruleName,{baseGrammar:C,selfGrammar:E,repository:E.repository},g);const I=Q.injections(A.scopeName);if(I)for(const A of I)g.add(new m(A))}function T(A,B,Q){B.repository&&B.repository[A]&&X([B.repository[A]],B,Q)}function v(A,B){A.selfGrammar.patterns&&Array.isArray(A.selfGrammar.patterns)&&X(A.selfGrammar.patterns,{...A,repository:A.selfGrammar.repository},B),A.selfGrammar.injections&&X(Object.values(A.selfGrammar.injections),{...A,repository:A.selfGrammar.repository},B)}function X(A,B,Q){for(const g of A){if(Q.visitedRule.has(g))continue;Q.visitedRule.add(g);const A=g.repository?u({},B.repository,g.repository):B.repository;Array.isArray(g.patterns)&&X(g.patterns,{...B,repository:A},Q);const E=g.include;if(!E)continue;const C=$(E);switch(C.kind){case 0:v({...B,selfGrammar:B.baseGrammar},Q);break;case 1:v(B,Q);break;case 2:T(C.ruleName,{...B,repository:A},Q);break;case 3:case 4:const g=C.scopeName===B.selfGrammar.scopeName?B.selfGrammar:C.scopeName===B.baseGrammar.scopeName?B.baseGrammar:void 0;if(g){const E={baseGrammar:B.baseGrammar,selfGrammar:g,repository:A};4===C.kind?T(C.ruleName,E,Q):v(E,Q)}else 4===C.kind?Q.add(new O(C.scopeName,C.ruleName)):Q.add(new m(C.scopeName))}}}class Z{constructor(){this.kind=0}}class j{constructor(){this.kind=1}}class V{constructor(A){this.ruleName=A,this.kind=2}}class z{constructor(A){this.scopeName=A,this.kind=3}}class _{constructor(A,B){this.scopeName=A,this.ruleName=B,this.kind=4}}function $(A){if("$base"===A)return new Z;if("$self"===A)return new j;const B=A.indexOf("#");if(-1===B)return new z(A);if(0===B)return new V(A.substring(1));{const Q=A.substring(0,B),g=A.substring(B+1);return new _(Q,g)}}const AA=/\\(\d+)/,BA=/\\(\d+)/g;class QA{constructor(A,B,Q,g){this.$location=A,this.id=B,this._name=Q||null,this._nameIsCapturing=J.hasCaptures(this._name),this._contentName=g||null,this._contentNameIsCapturing=J.hasCaptures(this._contentName)}get debugName(){const A=this.$location?`${P(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${A}`}getName(A,B){return this._nameIsCapturing&&null!==this._name&&null!==A&&null!==B?J.replaceCaptures(this._name,A,B):this._name}getContentName(A,B){return this._contentNameIsCapturing&&null!==this._contentName?J.replaceCaptures(this._contentName,A,B):this._contentName}}class gA extends QA{constructor(A,B,Q,g,E){super(A,B,Q,g),this.retokenizeCapturedWithRuleId=E}dispose(){}collectPatterns(A,B){throw new Error("Not supported!")}compile(A,B){throw new Error("Not supported!")}compileAG(A,B,Q,g){throw new Error("Not supported!")}}class EA extends QA{constructor(A,B,Q,g,E){super(A,B,Q,null),this._match=new oA(g,this.id),this.captures=E,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(A,B){B.push(this._match)}compile(A,B){return this._getCachedCompiledPatterns(A).compile(A)}compileAG(A,B,Q,g){return this._getCachedCompiledPatterns(A).compileAG(A,Q,g)}_getCachedCompiledPatterns(A){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new sA,this.collectPatterns(A,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}}class CA extends QA{constructor(A,B,Q,g,E){super(A,B,Q,g),this.patterns=E.patterns,this.hasMissingPatterns=E.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(A,B){for(const Q of this.patterns)A.getRule(Q).collectPatterns(A,B)}compile(A,B){return this._getCachedCompiledPatterns(A).compile(A)}compileAG(A,B,Q,g){return this._getCachedCompiledPatterns(A).compileAG(A,Q,g)}_getCachedCompiledPatterns(A){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new sA,this.collectPatterns(A,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}}class IA extends QA{constructor(A,B,Q,g,E,C,I,D,w,o){super(A,B,Q,g),this._begin=new oA(E,this.id),this.beginCaptures=C,this._end=new oA(I||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=D,this.applyEndPatternLast=w||!1,this.patterns=o.patterns,this.hasMissingPatterns=o.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(A,B){return this._end.resolveBackReferences(A,B)}collectPatterns(A,B){B.push(this._begin)}compile(A,B){return this._getCachedCompiledPatterns(A,B).compile(A)}compileAG(A,B,Q,g){return this._getCachedCompiledPatterns(A,B).compileAG(A,Q,g)}_getCachedCompiledPatterns(A,B){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new sA;for(const B of this.patterns)A.getRule(B).collectPatterns(A,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,B):this._cachedCompiledPatterns.setSource(0,B)),this._cachedCompiledPatterns}}class DA extends QA{constructor(A,B,Q,g,E,C,I,D,w){super(A,B,Q,g),this._begin=new oA(E,this.id),this.beginCaptures=C,this.whileCaptures=D,this._while=new oA(I,-2),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=w.patterns,this.hasMissingPatterns=w.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(A,B){return this._while.resolveBackReferences(A,B)}collectPatterns(A,B){B.push(this._begin)}compile(A,B){return this._getCachedCompiledPatterns(A).compile(A)}compileAG(A,B,Q,g){return this._getCachedCompiledPatterns(A).compileAG(A,Q,g)}_getCachedCompiledPatterns(A){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new sA;for(const B of this.patterns)A.getRule(B).collectPatterns(A,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(A,B){return this._getCachedCompiledWhilePatterns(A,B).compile(A)}compileWhileAG(A,B,Q,g){return this._getCachedCompiledWhilePatterns(A,B).compileAG(A,Q,g)}_getCachedCompiledWhilePatterns(A,B){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new sA,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,B||"￿"),this._cachedCompiledWhilePatterns}}class wA{static createCaptureRule(A,B,Q,g,E){return A.registerRule((A=>new gA(B,A,Q,g,E)))}static getCompiledRuleId(A,B,Q){return A.id||B.registerRule((g=>{if(A.id=g,A.match)return new EA(A.$vscodeTextmateLocation,A.id,A.name,A.match,wA._compileCaptures(A.captures,B,Q));if(void 0===A.begin){A.repository&&(Q=u({},Q,A.repository));let g=A.patterns;return void 0===g&&A.include&&(g=[{include:A.include}]),new CA(A.$vscodeTextmateLocation,A.id,A.name,A.contentName,wA._compilePatterns(g,B,Q))}return A.while?new DA(A.$vscodeTextmateLocation,A.id,A.name,A.contentName,A.begin,wA._compileCaptures(A.beginCaptures||A.captures,B,Q),A.while,wA._compileCaptures(A.whileCaptures||A.captures,B,Q),wA._compilePatterns(A.patterns,B,Q)):new IA(A.$vscodeTextmateLocation,A.id,A.name,A.contentName,A.begin,wA._compileCaptures(A.beginCaptures||A.captures,B,Q),A.end,wA._compileCaptures(A.endCaptures||A.captures,B,Q),A.applyEndPatternLast,wA._compilePatterns(A.patterns,B,Q))})),A.id}static _compileCaptures(A,B,Q){let g=[];if(A){let E=0;for(const B in A){if("$vscodeTextmateLocation"===B)continue;const A=parseInt(B,10);A>E&&(E=A)}for(let A=0;A<=E;A++)g[A]=null;for(const E in A){if("$vscodeTextmateLocation"===E)continue;const C=parseInt(E,10);let I=0;A[E].patterns&&(I=wA.getCompiledRuleId(A[E],B,Q)),g[C]=wA.createCaptureRule(B,A[E].$vscodeTextmateLocation,A[E].name,A[E].contentName,I)}}return g}static _compilePatterns(A,B,Q){let g=[];if(A)for(let E=0,C=A.length;EA.substring(B.start,B.end)));return BA.lastIndex=0,this.source.replace(BA,((A,B)=>d(Q[parseInt(B,10)]||"")))}_buildAnchorCache(){let A,B,Q,g,E=[],C=[],I=[],D=[];for(A=0,B=this.source.length;AA.source));this._cached=new eA(A,B,this._items.map((A=>A.ruleId)))}return this._cached}compileAG(A,B,Q){return this._hasAnchors?B?Q?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(A,B,Q)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(A,B,Q)),this._anchorCache.A1_G0):Q?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(A,B,Q)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(A,B,Q)),this._anchorCache.A0_G0):this.compile(A)}_resolveAnchors(A,B,Q){let g=this._items.map((A=>A.resolveAnchors(B,Q)));return new eA(A,g,this._items.map((A=>A.ruleId)))}}class eA{constructor(A,B,Q){this.regExps=B,this.rules=Q,this.scanner=A.createOnigScanner(B)}dispose(){"function"==typeof this.scanner.dispose&&this.scanner.dispose()}toString(){const A=[];for(let B=0,Q=this.rules.length;Bthis._root.match(A)))}static createFromRawTheme(A,B){return this.createFromParsedTheme(function(A){if(!A)return[];if(!A.settings||!Array.isArray(A.settings))return[];let B=A.settings,Q=[],g=0;for(let A=0,E=B.length;A1&&(s=C.slice(0,C.length-1),s.reverse()),Q[g++]=new aA(o,s,A,I,D,w)}}return Q}(A),B)}static createFromParsedTheme(A,B){return function(A,B){A.sort(((A,B)=>{let Q=S(A.scope,B.scope);return 0!==Q?Q:(Q=p(A.parentScopes,B.parentScopes),0!==Q?Q:A.index-B.index)}));let Q=0,g="#000000",E="#ffffff";for(;A.length>=1&&""===A[0].scope;){let B=A.shift();-1!==B.fontStyle&&(Q=B.fontStyle),null!==B.foreground&&(g=B.foreground),null!==B.background&&(E=B.background)}let C=new hA(B),I=new MA(Q,C.getId(g),C.getId(E)),D=new FA(new nA(0,null,-1,0,0),[]);for(let B=0,Q=A.length;Bfunction(A,B){if(null===B)return!0;let Q=0,g=B[Q];for(;A;){if(tA(A.scopeName,g)){if(Q++,Q===B.length)return!0;g=B[Q]}A=A.parent}return!1}(A.parent,B.parentScopes)));return Q?new MA(Q.fontStyle,Q.foreground,Q.background):null}}class iA{constructor(A,B){this.parent=A,this.scopeName=B}static push(A,B){for(const Q of B)A=new iA(A,Q);return A}static from(...A){let B=null;for(let Q=0;QA?console.log("how did this happen?"):this.scopeDepth=A,-1!==B&&(this.fontStyle=B),0!==Q&&(this.foreground=Q),0!==g&&(this.background=g)}}class FA{constructor(A,B=[],Q={}){this._mainRule=A,this._children=Q,this._rulesWithParentScopes=B}static _sortBySpecificity(A){return 1===A.length||A.sort(this._cmpBySpecificity),A}static _cmpBySpecificity(A,B){if(A.scopeDepth===B.scopeDepth){const Q=A.parentScopes,g=B.parentScopes;let E=null===Q?0:Q.length,C=null===g?0:g.length;if(E===C)for(let A=0;A{const B=this._scopeToLanguage(A),Q=this._toStandardTokenType(A);return new rA(B,Q)})),this._defaultAttributes=new rA(A,8),this._embeddedLanguagesMatcher=new NA(Object.entries(B||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(A){return null===A?GA._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(A)}_scopeToLanguage(A){return this._embeddedLanguagesMatcher.match(A)||0}_toStandardTokenType(A){const B=A.match(GA.STANDARD_TOKEN_TYPE_REGEXP);if(!B)return 8;switch(B[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}}GA._NULL_SCOPE_METADATA=new rA(0,0),GA.STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/;class NA{constructor(A){if(0===A.length)this.values=null,this.scopesRegExp=null;else{this.values=new Map(A);const B=A.map((([A,B])=>d(A)));B.sort(),B.reverse(),this.scopesRegExp=new RegExp(`^((${B.join(")|(")}))($|\\.)`,"")}}match(A){if(!this.scopesRegExp)return;const B=A.match(this.scopesRegExp);return B?this.values.get(B[1]):void 0}}class LA{constructor(A,B){this.stack=A,this.stoppedEarly=B}}function HA(A,B,Q,g,E,C,I,D){const w=B.content.length;let o=!1,s=-1;if(I){const I=function(A,B,Q,g,E,C){let I=E.beginRuleCapturedEOL?0:-1;const D=[];for(let B=E;B;B=B.pop()){const Q=B.getRule(A);Q instanceof DA&&D.push({rule:Q,stack:B})}for(let w=D.pop();w;w=D.pop()){const{ruleScanner:D,findOptions:o}=RA(w.rule,A,w.stack.endRule,Q,g===I),s=D.findNextMatchSync(B,g,o);if(H&&(console.log(" scanning for while rule"),console.log(D.toString())),!s){H&&console.log(" popping "+w.rule.debugName+" - "+w.rule.debugWhileRegExp),E=w.stack.pop();break}if(-2!==s.ruleId){E=w.stack.pop();break}s.captureIndices&&s.captureIndices.length&&(C.produce(w.stack,s.captureIndices[0].start),KA(A,B,Q,w.stack,C,w.rule.whileCaptures,s.captureIndices),C.produce(w.stack,s.captureIndices[0].end),I=s.captureIndices[0].end,s.captureIndices[0].end>g&&(g=s.captureIndices[0].end,Q=!1))}return{stack:E,linePos:g,anchorPosition:I,isFirstLine:Q}}(A,B,Q,g,E,C);E=I.stack,g=I.linePos,Q=I.isFirstLine,s=I.anchorPosition}const e=Date.now();for(;!o;){if(0!==D&&Date.now()-e>D)return new LA(E,!0);c()}return new LA(E,!1);function c(){H&&(console.log(""),console.log(`@@scanNext ${g}: |${B.content.substr(g).replace(/\n$/,"\\n")}|`));const I=function(A,B,Q,g,E,C){const I=function(A,B,Q,g,E,C){const I=E.getRule(A),{ruleScanner:D,findOptions:w}=kA(I,A,E.endRule,Q,g===C);let o=0;H&&(o=x());const s=D.findNextMatchSync(B,g,w);if(H){const A=x()-o;A>5&&console.warn(`Rule ${I.debugName} (${I.id}) matching took ${A} against '${B}'`),console.log(` scanning for (linePos: ${g}, anchorPosition: ${C})`),console.log(D.toString()),s&&console.log(`matched rule id: ${s.ruleId} from ${s.captureIndices[0].start} to ${s.captureIndices[0].end}`)}return s?{captureIndices:s.captureIndices,matchedRuleId:s.ruleId}:null}(A,B,Q,g,E,C),D=A.getInjections();if(0===D.length)return I;const w=function(A,B,Q,g,E,C,I){let D,w=Number.MAX_VALUE,o=null,s=0;const e=C.contentNameScopesList.getScopeNames();for(let C=0,c=A.length;C=w)&&(w=h,o=a.captureIndices,D=a.ruleId,s=c.priority,w===E))break}return o?{priorityMatch:-1===s,captureIndices:o,matchedRuleId:D}:null}(D,A,B,Q,g,E,C);if(!w)return I;if(!I)return w;const o=I.captureIndices[0].start,s=w.captureIndices[0].start;return s0)&&D[0].end>g;if(-1===e){const I=E.getRule(A);H&&console.log(" popping "+I.debugName+" - "+I.debugEndRegExp),C.produce(E,D[0].start),E=E.withContentNameScopesList(E.nameScopesList),KA(A,B,Q,E,C,I.endCaptures,D),C.produce(E,D[0].end);const e=E;if(E=E.parent,s=e.getAnchorPos(),!c&&e.getEnterPos()===g)return H&&console.error("[1] - Grammar is in an endless loop - Grammar pushed & popped a rule without advancing"),E=e,C.produce(E,w),void(o=!0)}else{const I=A.getRule(e);C.produce(E,D[0].start);const i=E,t=I.getName(B.content,D),M=E.contentNameScopesList.pushAttributed(t,A);if(E=E.push(e,g,s,D[0].end===w,null,M,M),I instanceof IA){const g=I;H&&console.log(" pushing "+g.debugName+" - "+g.debugBeginRegExp),KA(A,B,Q,E,C,g.beginCaptures,D),C.produce(E,D[0].end),s=D[0].end;const e=g.getContentName(B.content,D),t=M.pushAttributed(e,A);if(E=E.withContentNameScopesList(t),g.endHasBackReferences&&(E=E.withEndRule(g.getEndWithResolvedBackReferences(B.content,D))),!c&&i.hasSameRuleAs(E))return H&&console.error("[2] - Grammar is in an endless loop - Grammar pushed the same rule without advancing"),E=E.pop(),C.produce(E,w),void(o=!0)}else if(I instanceof DA){const g=I;H&&console.log(" pushing "+g.debugName),KA(A,B,Q,E,C,g.beginCaptures,D),C.produce(E,D[0].end),s=D[0].end;const e=g.getContentName(B.content,D),t=M.pushAttributed(e,A);if(E=E.withContentNameScopesList(t),g.whileHasBackReferences&&(E=E.withEndRule(g.getWhileWithResolvedBackReferences(B.content,D))),!c&&i.hasSameRuleAs(E))return H&&console.error("[3] - Grammar is in an endless loop - Grammar pushed the same rule without advancing"),E=E.pop(),C.produce(E,w),void(o=!0)}else{const g=I;if(H&&console.log(" matched "+g.debugName+" - "+g.debugMatchRegExp),KA(A,B,Q,E,C,g.captures,D),C.produce(E,D[0].end),E=E.pop(),!c)return H&&console.error("[4] - Grammar is in an endless loop - Grammar is not advancing, nor is it pushing/popping"),E=E.safePop(),C.produce(E,w),void(o=!0)}}D[0].end>g&&(g=D[0].end,Q=!1)}}function kA(A,B,Q,g,E){return{ruleScanner:A.compileAG(B,Q,g,E),findOptions:0}}function RA(A,B,Q,g,E){return{ruleScanner:A.compileWhileAG(B,Q,g,E),findOptions:0}}function KA(A,B,Q,g,E,C,I){if(0===C.length)return;const D=B.content,w=Math.min(C.length,I.length),o=[],s=I[0].end;for(let B=0;Bs)break;for(;o.length>0&&o[o.length-1].endPos<=e.start;)E.produceFromScopes(o[o.length-1].scopes,o[o.length-1].endPos),o.pop();if(o.length>0?E.produceFromScopes(o[o.length-1].scopes,e.start):E.produce(g,e.start),w.retokenizeCapturedWithRuleId){const B=w.getName(D,I),C=g.contentNameScopesList.pushAttributed(B,A),o=w.getContentName(D,I),s=C.pushAttributed(o,A),c=g.push(w.retokenizeCapturedWithRuleId,e.start,-1,!1,null,C,s),i=A.createOnigString(D.substring(0,e.end));HA(A,i,Q&&0===e.start,e.start,c,E,!1,0),Y(i);continue}const c=w.getName(D,I);if(null!==c){const B=(o.length>0?o[o.length-1].scopes:g.contentNameScopesList).pushAttributed(c,A);o.push(new YA(B,e.end))}}for(;o.length>0;)E.produceFromScopes(o[o.length-1].scopes,o[o.length-1].endPos),o.pop()}class YA{constructor(A,B){this.scopes=A,this.endPos=B}}function UA(A,B,Q,g,E){const C=R(B,uA),I=wA.getCompiledRuleId(Q,g,E.repository);for(const Q of C)A.push({debugSelector:B,matcher:Q.matcher,ruleId:I,grammar:E,priority:Q.priority})}function uA(A,B){if(B.length{for(let g=Q;gQ&&A.substr(0,Q)===B&&"."===A[Q]}class yA{constructor(A,B,Q,g,E,C,I,D){if(this._rootScopeName=A,this.balancedBracketSelectors=C,this._onigLib=D,this._basicScopeAttributesProvider=new GA(Q,g),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=I,this._grammar=JA(B,null),this._injections=null,this._tokenTypeMatchers=[],E)for(const A of Object.keys(E)){const B=R(A,uA);for(const Q of B)this._tokenTypeMatchers.push({matcher:Q.matcher,type:E[A]})}}get themeProvider(){return this._grammarRepository}dispose(){for(const A of this._ruleId2desc)A&&A.dispose()}createOnigScanner(A){return this._onigLib.createOnigScanner(A)}createOnigString(A){return this._onigLib.createOnigString(A)}getMetadataForScope(A){return this._basicScopeAttributesProvider.getBasicScopeAttributes(A)}_collectInjections(){const A=[],B=this._rootScopeName,Q=(A=>A===this._rootScopeName?this._grammar:this.getExternalGrammar(A))(B);if(Q){const g=Q.injections;if(g)for(let B in g)UA(A,B,g[B],this,Q);const E=this._grammarRepository.injections(B);E&&E.forEach((B=>{const Q=this.getExternalGrammar(B);if(Q){const B=Q.injectionSelector;B&&UA(A,B,Q,this,Q)}}))}return A.sort(((A,B)=>A.priority-B.priority)),A}getInjections(){if(null===this._injections&&(this._injections=this._collectInjections(),H&&this._injections.length>0)){console.log(`Grammar ${this._rootScopeName} contains the following injections:`);for(const A of this._injections)console.log(` - ${A.debugSelector}`)}return this._injections}registerRule(A){const B=++this._lastRuleId,Q=A(B);return this._ruleId2desc[B]=Q,Q}getRule(A){return this._ruleId2desc[A]}getExternalGrammar(A,B){if(this._includedGrammars[A])return this._includedGrammars[A];if(this._grammarRepository){const Q=this._grammarRepository.lookup(A);if(Q)return this._includedGrammars[A]=JA(Q,B&&B.$base),this._includedGrammars[A]}}tokenizeLine(A,B,Q=0){const g=this._tokenize(A,B,!1,Q);return{tokens:g.lineTokens.getResult(g.ruleStack,g.lineLength),ruleStack:g.ruleStack,stoppedEarly:g.stoppedEarly}}tokenizeLine2(A,B,Q=0){const g=this._tokenize(A,B,!0,Q);return{tokens:g.lineTokens.getBinaryResult(g.ruleStack,g.lineLength),ruleStack:g.ruleStack,stoppedEarly:g.stoppedEarly}}_tokenize(A,B,Q,g){let E;if(-1===this._rootId&&(this._rootId=wA.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections()),B&&B!==pA.NULL)E=!1,B.reset();else{E=!0;const A=this._basicScopeAttributesProvider.getDefaultAttributes(),Q=this.themeProvider.getDefaults(),g=k.set(0,A.languageId,A.tokenType,null,Q.fontStyle,Q.foregroundId,Q.backgroundId),C=this.getRule(this._rootId).getName(null,null);let I;I=C?SA.createRootAndLookUpScopeName(C,g,this):SA.createRoot("unknown",g),B=new pA(null,this._rootId,-1,-1,!1,null,I,I)}A+="\n";const C=this.createOnigString(A),I=C.content.length,D=new dA(Q,A,this._tokenTypeMatchers,this.balancedBracketSelectors),w=HA(this,C,E,0,B,D,!0,g);return Y(C),{lineLength:I,lineTokens:D,ruleStack:w.stack,stoppedEarly:w.stoppedEarly}}}function JA(A,B){return(A=U(A)).repository=A.repository||{},A.repository.$self={$vscodeTextmateLocation:A.$vscodeTextmateLocation,patterns:A.patterns,name:A.scopeName},A.repository.$base=B||A.repository.$self,A}class SA{constructor(A,B,Q){this.parent=A,this.scopePath=B,this.tokenAttributes=Q}static fromExtension(A,B){let Q=A,g=A?.scopePath??null;for(const A of B)g=iA.push(g,A.scopeNames),Q=new SA(Q,g,A.encodedTokenAttributes);return Q}static createRoot(A,B){return new SA(null,new iA(null,A),B)}static createRootAndLookUpScopeName(A,B,Q){const g=Q.getMetadataForScope(A),E=new iA(null,A),C=Q.themeProvider.themeMatch(E),I=SA.mergeAttributes(B,g,C);return new SA(null,E,I)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(A){return SA.equals(this,A)}static equals(A,B){for(;;){if(A===B)return!0;if(!A&&!B)return!0;if(!A||!B)return!1;if(A.scopeName!==B.scopeName||A.tokenAttributes!==B.tokenAttributes)return!1;A=A.parent,B=B.parent}}static mergeAttributes(A,B,Q){let g=-1,E=0,C=0;return null!==Q&&(g=Q.fontStyle,E=Q.foregroundId,C=Q.backgroundId),k.set(A,B.languageId,B.tokenType,null,g,E,C)}pushAttributed(A,B){if(null===A)return this;if(-1===A.indexOf(" "))return SA._pushAttributed(this,A,B);const Q=A.split(/ /g);let g=this;for(const A of Q)g=SA._pushAttributed(g,A,B);return g}static _pushAttributed(A,B,Q){const g=Q.getMetadataForScope(B),E=A.scopePath.push(B),C=Q.themeProvider.themeMatch(E),I=SA.mergeAttributes(A.tokenAttributes,g,C);return new SA(A,E,I)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(A){const B=[];let Q=this;for(;Q&&Q!==A;)B.push({encodedTokenAttributes:Q.tokenAttributes,scopeNames:Q.scopePath.getExtensionIfDefined(Q.parent?.scopePath??null)}),Q=Q.parent;return Q===A?B.reverse():void 0}}class pA{constructor(A,B,Q,g,E,C,I,D){this.parent=A,this.ruleId=B,this.beginRuleCapturedEOL=E,this.endRule=C,this.nameScopesList=I,this.contentNameScopesList=D,this._stackElementBrand=void 0,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=Q,this._anchorPos=g}equals(A){return null!==A&&pA._equals(this,A)}static _equals(A,B){return A===B||!!this._structuralEquals(A,B)&&SA.equals(A.contentNameScopesList,B.contentNameScopesList)}static _structuralEquals(A,B){for(;;){if(A===B)return!0;if(!A&&!B)return!0;if(!A||!B)return!1;if(A.depth!==B.depth||A.ruleId!==B.ruleId||A.endRule!==B.endRule)return!1;A=A.parent,B=B.parent}}clone(){return this}static _reset(A){for(;A;)A._enterPos=-1,A._anchorPos=-1,A=A.parent}reset(){pA._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(A,B,Q,g,E,C,I){return new pA(this,A,B,Q,g,E,C,I)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(A){return A.getRule(this.ruleId)}toString(){const A=[];return this._writeString(A,0),"["+A.join(",")+"]"}_writeString(A,B){return this.parent&&(B=this.parent._writeString(A,B)),A[B++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,B}withContentNameScopesList(A){return this.contentNameScopesList===A?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,A)}withEndRule(A){return this.endRule===A?this:new pA(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,A,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(A){let B=this;for(;B&&B._enterPos===A._enterPos;){if(B.ruleId===A.ruleId)return!0;B=B.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(A,B){const Q=SA.fromExtension(A?.nameScopesList??null,B.nameScopesList);return new pA(A,B.ruleId,B.enterPos??-1,B.anchorPos??-1,B.beginRuleCapturedEOL,B.endRule,Q,SA.fromExtension(Q,B.contentNameScopesList))}}pA.NULL=new pA(null,0,0,0,!1,null,null,null);class lA{constructor(A,B){this.allowAny=!1,this.balancedBracketScopes=A.flatMap((A=>"*"===A?(this.allowAny=!0,[]):R(A,uA).map((A=>A.matcher)))),this.unbalancedBracketScopes=B.flatMap((A=>R(A,uA).map((A=>A.matcher))))}get matchesAlways(){return this.allowAny&&0===this.unbalancedBracketScopes.length}get matchesNever(){return 0===this.balancedBracketScopes.length&&!this.allowAny}match(A){for(const B of this.unbalancedBracketScopes)if(B(A))return!1;for(const B of this.balancedBracketScopes)if(B(A))return!0;return this.allowAny}}class dA{constructor(A,B,Q,g){this.balancedBracketSelectors=g,this._emitBinaryTokens=A,this._tokenTypeOverrides=Q,this._lineText=H?B:null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}produce(A,B){this.produceFromScopes(A.contentNameScopesList,B)}produceFromScopes(A,B){if(this._lastTokenEndIndex>=B)return;if(this._emitBinaryTokens){let Q=A?.tokenAttributes??0,g=!1;if(this.balancedBracketSelectors?.matchesAlways&&(g=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const B=A?.getScopeNames()??[];for(const A of this._tokenTypeOverrides)A.matcher(B)&&(Q=k.set(Q,0,A.type,null,-1,0,0));this.balancedBracketSelectors&&(g=this.balancedBracketSelectors.match(B))}if(g&&(Q=k.set(Q,0,8,g,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===Q)return void(this._lastTokenEndIndex=B);if(H){const Q=A?.getScopeNames()??[];console.log(" token: |"+this._lineText.substring(this._lastTokenEndIndex,B).replace(/\n$/,"\\n")+"|");for(let A=0;A0&&this._tokens[this._tokens.length-1].startIndex===B-1&&this._tokens.pop(),0===this._tokens.length&&(this._lastTokenEndIndex=-1,this.produce(A,B),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(A,B){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===B-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),0===this._binaryTokens.length&&(this._lastTokenEndIndex=-1,this.produce(A,B),this._binaryTokens[this._binaryTokens.length-2]=0);const Q=new Uint32Array(this._binaryTokens.length);for(let A=0,B=this._binaryTokens.length;A0;)10===A.charCodeAt(E)?(E++,C++,I=0):(E++,I++),B--}function w(A){null===Q?E=A:D(A-E)}function o(){for(;E0&&65279===A.charCodeAt(0)&&(E=1);let i=0,t=null,M=[],a=[],h=null;function n(A,B){M.push(i),a.push(t),i=A,t=B}function F(){if(0===M.length)return r("illegal state stack");i=M.pop(),t=a.pop()}function r(B){throw new Error("Near offset "+E+": "+B+" ~~~"+A.substr(E,50)+"~~~")}const G=function(){if(null===h)return r("missing ");let A={};null!==Q&&(A[Q]={filename:B,line:C,char:I}),t[h]=A,h=null,n(1,A)},N=function(){if(null===h)return r("missing ");let A=[];t[h]=A,h=null,n(2,A)},L=function(){let A={};null!==Q&&(A[Q]={filename:B,line:C,char:I}),t.push(A),n(1,A)},H=function(){let A=[];t.push(A),n(2,A)};function k(){if(1!==i)return r("unexpected ");F()}function R(){return 1===i||2!==i?r("unexpected "):void F()}function K(A){if(1===i){if(null===h)return r("missing ");t[h]=A,h=null}else 2===i?t.push(A):t=A}function Y(A){if(isNaN(A))return r("cannot parse float");if(1===i){if(null===h)return r("missing ");t[h]=A,h=null}else 2===i?t.push(A):t=A}function U(A){if(isNaN(A))return r("cannot parse integer");if(1===i){if(null===h)return r("missing ");t[h]=A,h=null}else 2===i?t.push(A):t=A}function u(A){if(1===i){if(null===h)return r("missing ");t[h]=A,h=null}else 2===i?t.push(A):t=A}function P(A){if(1===i){if(null===h)return r("missing ");t[h]=A,h=null}else 2===i?t.push(A):t=A}function y(A){if(1===i){if(null===h)return r("missing ");t[h]=A,h=null}else 2===i?t.push(A):t=A}function J(){let A=c(">"),B=!1;return 47===A.charCodeAt(A.length-1)&&(B=!0,A=A.substring(0,A.length-1)),{name:A.trim(),isClosed:B}}function S(A){if(A.isClosed)return"";let B=c(""),B.replace(/&#([0-9]+);/g,(function(A,B){return String.fromCodePoint(parseInt(B,10))})).replace(/&#x([0-9a-f]+);/g,(function(A,B){return String.fromCodePoint(parseInt(B,16))})).replace(/&|<|>|"|'/g,(function(A){switch(A){case"&":return"&";case"<":return"<";case">":return">";case""":return'"';case"'":return"'"}return A}))}for(;E=g));){const w=A.charCodeAt(E);if(D(1),60!==w)return r("expected <");if(E>=g)return r("unexpected end of input");const c=A.charCodeAt(E);if(63===c){D(1),e("?>");continue}if(33===c){if(D(1),s("--")){e("--\x3e");continue}e(">");continue}if(47===c){if(D(1),o(),s("plist")){e(">");continue}if(s("dict")){e(">"),k();continue}if(s("array")){e(">"),R();continue}return r("unexpected closed tag")}let M=J();switch(M.name){case"dict":1===i?G():2===i?L():(t={},null!==Q&&(t[Q]={filename:B,line:C,char:I}),n(1,t)),M.isClosed&&k();continue;case"array":1===i?N():2===i?H():(t=[],n(2,t)),M.isClosed&&R();continue;case"key":p=S(M),1!==i?r("unexpected "):null!==h?r("too many "):h=p;continue;case"string":K(S(M));continue;case"real":Y(parseFloat(S(M)));continue;case"integer":U(parseInt(S(M),10));continue;case"date":u(new Date(S(M)));continue;case"data":P(S(M));continue;case"true":S(M),y(!0);continue;case"false":S(M),y(!1);continue}if(!/^plist/.test(M.name))return r("unexpected opened tag "+M.name)}var p;return t}function xA(A,B){throw new Error("Near offset "+A.pos+": "+B+" ~~~"+A.source.substr(A.pos,50)+"~~~")}class mA{constructor(A){this.source=A,this.pos=0,this.len=A.length,this.line=1,this.char=0}}class OA{constructor(){this.value=null,this.type=0,this.offset=-1,this.len=-1,this.line=-1,this.char=-1}toLocation(A){return{filename:A,line:this.line,char:this.char}}}function qA(A,B){B.value=null,B.type=0,B.offset=-1,B.len=-1,B.line=-1,B.char=-1;let Q,g=A.source,E=A.pos,C=A.len,I=A.line,D=A.char;for(;;){if(E>=C)return!1;if(Q=g.charCodeAt(E),32!==Q&&9!==Q&&13!==Q){if(10!==Q)break;E++,I++,D=0}else E++,D++}if(B.offset=E,B.line=I,B.char=D,34===Q){for(B.type=1,E++,D++;;){if(E>=C)return!1;if(Q=g.charCodeAt(E),E++,D++,92!==Q){if(34===Q)break}else E++,D++}B.value=g.substring(B.offset+1,E-1).replace(/\\u([0-9A-Fa-f]{4})/g,((A,B)=>String.fromCodePoint(parseInt(B,16)))).replace(/\\(.)/g,((B,Q)=>{switch(Q){case'"':return'"';case"\\":return"\\";case"/":return"/";case"b":return"\b";case"f":return"\f";case"n":return"\n";case"r":return"\r";case"t":return"\t";default:xA(A,"invalid escape sequence")}throw new Error("unreachable")}))}else if(91===Q)B.type=2,E++,D++;else if(123===Q)B.type=3,E++,D++;else if(93===Q)B.type=4,E++,D++;else if(125===Q)B.type=5,E++,D++;else if(58===Q)B.type=6,E++,D++;else if(44===Q)B.type=7,E++,D++;else if(110===Q){if(B.type=8,E++,D++,Q=g.charCodeAt(E),117!==Q)return!1;if(E++,D++,Q=g.charCodeAt(E),108!==Q)return!1;if(E++,D++,Q=g.charCodeAt(E),108!==Q)return!1;E++,D++}else if(116===Q){if(B.type=9,E++,D++,Q=g.charCodeAt(E),114!==Q)return!1;if(E++,D++,Q=g.charCodeAt(E),117!==Q)return!1;if(E++,D++,Q=g.charCodeAt(E),101!==Q)return!1;E++,D++}else if(102===Q){if(B.type=10,E++,D++,Q=g.charCodeAt(E),97!==Q)return!1;if(E++,D++,Q=g.charCodeAt(E),108!==Q)return!1;if(E++,D++,Q=g.charCodeAt(E),115!==Q)return!1;if(E++,D++,Q=g.charCodeAt(E),101!==Q)return!1;E++,D++}else for(B.type=11;;){if(E>=C)return!1;if(Q=g.charCodeAt(E),!(46===Q||Q>=48&&Q<=57||101===Q||69===Q||45===Q||43===Q))break;E++,D++}return B.len=E-B.offset,null===B.value&&(B.value=g.substr(B.offset,B.len)),A.pos=E,A.line=I,A.char=D,!0}class bA{constructor(A,B){this._onigLibPromise=B,this._grammars=new Map,this._rawGrammars=new Map,this._injectionGrammars=new Map,this._theme=A}dispose(){for(const A of this._grammars.values())A.dispose()}setTheme(A){this._theme=A}getColorMap(){return this._theme.getColorMap()}addGrammar(A,B){this._rawGrammars.set(A.scopeName,A),B&&this._injectionGrammars.set(A.scopeName,B)}lookup(A){return this._rawGrammars.get(A)}injections(A){return this._injectionGrammars.get(A)}getDefaults(){return this._theme.getDefaults()}themeMatch(A){return this._theme.match(A)}async grammarForScopeName(A,B,Q,g,E){if(!this._grammars.has(A)){let C=this._rawGrammars.get(A);if(!C)return null;this._grammars.set(A,function(A,B,Q,g,E,C,I,D){return new yA(A,B,Q,g,E,C,I,D)}(A,C,B,Q,g,E,this,await this._onigLibPromise))}return this._grammars.get(A)}}function WA(A,B){let Q=0;const g=[];let E=A,C=B;for(;E!==C;)E&&(!C||E.depth>=C.depth)?(Q++,E=E.parent):(g.push(C.toStateStackFrame()),C=C.parent);return{pops:Q,newFrames:g.reverse()}}function TA(A,B){let Q=A;for(let A=0;A0;)await Promise.all(C.Q.map((A=>this._loadSingleGrammar(A.scopeName)))),C.processQueue();return this._grammarForScopeName(A,B,Q,g,E)}async _loadSingleGrammar(A){return this._ensureGrammarCache.has(A)||this._ensureGrammarCache.set(A,this._doLoadSingleGrammar(A)),this._ensureGrammarCache.get(A)}async _doLoadSingleGrammar(A){const B=await this._options.loadGrammar(A);if(B){const Q="function"==typeof this._options.getInjections?this._options.getInjections(A):void 0;this._syncRegistry.addGrammar(B,Q)}}async addGrammar(A,B=[],Q=0,g=null){return this._syncRegistry.addGrammar(A,B),await this._grammarForScopeName(A.scopeName,Q,g)}_grammarForScopeName(A,B=0,Q=null,g=null,E=null){return this._syncRegistry.grammarForScopeName(A,B,Q,g,E)}}const XA=pA.NULL,ZA=function(A,B=null){return null!==B&&/\.json$/.test(B)?(Q=A,H?function(A,B,Q){let g=new mA(A),E=new OA,C=0,I=null,D=[],w=[];function o(){D.push(C),w.push(I)}function s(){C=D.pop(),I=w.pop()}function e(A){xA(g,A)}for(;qA(g,E);){if(0===C){if(null!==I&&e("too many constructs in root"),3===E.type){I={},I.$vscodeTextmateLocation=E.toLocation(B),o(),C=1;continue}if(2===E.type){I=[],o(),C=4;continue}e("unexpected token in root")}if(2===C){if(5===E.type){s();continue}if(7===E.type){C=3;continue}e("expected , or }")}if(1===C||3===C){if(1===C&&5===E.type){s();continue}if(1===E.type){let A=E.value;if(qA(g,E)&&6===E.type||e("expected colon"),qA(g,E)||e("expected value"),C=2,1===E.type){I[A]=E.value;continue}if(8===E.type){I[A]=null;continue}if(9===E.type){I[A]=!0;continue}if(10===E.type){I[A]=!1;continue}if(11===E.type){I[A]=parseFloat(E.value);continue}if(2===E.type){let B=[];I[A]=B,o(),C=4,I=B;continue}if(3===E.type){let Q={};Q.$vscodeTextmateLocation=E.toLocation(B),I[A]=Q,o(),C=1,I=Q;continue}}e("unexpected token in dict")}if(5===C){if(4===E.type){s();continue}if(7===E.type){C=6;continue}e("expected , or ]")}if(4===C||6===C){if(4===C&&4===E.type){s();continue}if(C=5,1===E.type){I.push(E.value);continue}if(8===E.type){I.push(null);continue}if(9===E.type){I.push(!0);continue}if(10===E.type){I.push(!1);continue}if(11===E.type){I.push(parseFloat(E.value));continue}if(2===E.type){let A=[];I.push(A),o(),C=4,I=A;continue}if(3===E.type){let A={};A.$vscodeTextmateLocation=E.toLocation(B),I.push(A),o(),C=1,I=A;continue}e("unexpected token in array")}e("unknown state")}return 0!==w.length&&e("unclosed constructs"),I}(Q,B):JSON.parse(Q)):function(A,B){return H?function(A,B,Q){return fA(A,B,"$vscodeTextmateLocation")}(A,B):function(A){return fA(A,null,null)}(A)}(A,B);var Q};var jA=L.Bz,VA=("undefined"!=typeof document&&document.currentScript&&document.currentScript.src,function(A){var B,Q,g=void 0!==(A=A||{})?A:{};g.ready=new Promise((function(A,g){B=A,Q=g}));var E,C=Object.assign({},g),I=!1;E=function(A){let B;return"function"==typeof readbuffer?new Uint8Array(readbuffer(A)):(B=read(A,"binary"),"object"==typeof B||L(Q),B);var Q},"undefined"!=typeof scriptArgs&&scriptArgs,"undefined"!=typeof onig_print&&("undefined"==typeof console&&(console={}),console.log=onig_print,console.warn=console.error="undefined"!=typeof printErr?printErr:onig_print);var D,w,o=g.print||console.log.bind(console),s=g.printErr||console.warn.bind(console);Object.assign(g,C),C=null,g.arguments&&g.arguments,g.thisProgram&&g.thisProgram,g.quit&&g.quit,g.wasmBinary&&(D=g.wasmBinary),g.noExitRuntime,"object"!=typeof WebAssembly&&L("no native wasm support detected");var e,c,i,t=!1,M="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function a(A,B,Q){for(var g=B+Q,E=B;A[E]&&!(E>=g);)++E;if(E-B>16&&A.buffer&&M)return M.decode(A.subarray(B,E));for(var C="";B>10,56320|1023&o)}}else C+=String.fromCharCode((31&I)<<6|D)}else C+=String.fromCharCode(I)}return C}function h(A){e=A,g.HEAP8=new Int8Array(A),g.HEAP16=new Int16Array(A),g.HEAP32=new Int32Array(A),g.HEAPU8=c=new Uint8Array(A),g.HEAPU16=new Uint16Array(A),g.HEAPU32=i=new Uint32Array(A),g.HEAPF32=new Float32Array(A),g.HEAPF64=new Float64Array(A)}g.INITIAL_MEMORY;var n=[],F=[],r=[],G=0,N=null;function L(A){g.onAbort&&g.onAbort(A),s(A="Aborted("+A+")"),t=!0,A+=". Build with -sASSERTIONS for more info.";var B=new WebAssembly.RuntimeError(A);throw Q(B),B}var H,k,R,K="data:application/octet-stream;base64,";function Y(A){return A.startsWith(K)}function U(A){try{if(A==H&&D)return new Uint8Array(D);if(E)return E(A);throw"both async and sync fetching of the wasm failed"}catch(A){L(A)}}function u(A){for(;A.length>0;)A.shift()(g)}function P(A){try{return w.grow(A-e.byteLength+65535>>>16),h(w.buffer),1}catch(A){}}Y(H="onig.wasm")||(k=H,H=g.locateFile?g.locateFile(k,""):""+k),R="undefined"!=typeof dateNow?dateNow:()=>performance.now();var y=[null,[],[]];function J(A,B){var Q=y[A];0===B||10===B?((1===A?o:s)(a(Q,0)),Q.length=0):Q.push(B)}var S,p={emscripten_get_now:R,emscripten_memcpy_big:function(A,B,Q){c.copyWithin(A,B,B+Q)},emscripten_resize_heap:function(A){var B=c.length,Q=2147483648;if((A>>>=0)>Q)return!1;let g=(A,B)=>A+(B-A%B)%B;for(var E=1;E<=4;E*=2){var C=B*(1+.2/E);if(C=Math.min(C,A+100663296),P(Math.min(Q,g(Math.max(A,C),65536))))return!0}return!1},fd_write:function(A,B,Q,g){for(var E=0,C=0;C>2],D=i[B+4>>2];B+=8;for(var w=0;w>2]=E,0}};function l(A){function Q(){S||(S=!0,g.calledRun=!0,t||(u(F),B(g),g.onRuntimeInitialized&&g.onRuntimeInitialized(),function(){if(g.postRun)for("function"==typeof g.postRun&&(g.postRun=[g.postRun]);g.postRun.length;)A=g.postRun.shift(),r.unshift(A);var A;u(r)}()))}G>0||(function(){if(g.preRun)for("function"==typeof g.preRun&&(g.preRun=[g.preRun]);g.preRun.length;)A=g.preRun.shift(),n.unshift(A);var A;u(n)}(),G>0||(g.setStatus?(g.setStatus("Running..."),setTimeout((function(){setTimeout((function(){g.setStatus("")}),1),Q()}),1)):Q()))}if(function(){var A={env:p,wasi_snapshot_preview1:p};function B(A,B){var Q,E=A.exports;g.asm=E,h((w=g.asm.memory).buffer),g.asm.__indirect_function_table,Q=g.asm.__wasm_call_ctors,F.unshift(Q),function(A){if(G--,g.monitorRunDependencies&&g.monitorRunDependencies(G),0==G&&N){var B=N;N=null,B()}}()}function E(A){B(A.instance)}function C(B){return(!D&&I&&"function"==typeof fetch?fetch(H,{credentials:"same-origin"}).then((function(A){if(!A.ok)throw"failed to load wasm binary file at '"+H+"'";return A.arrayBuffer()})).catch((function(){return U(H)})):Promise.resolve().then((function(){return U(H)}))).then((function(B){return WebAssembly.instantiate(B,A)})).then((function(A){return A})).then(B,(function(A){s("failed to asynchronously prepare wasm: "+A),L(A)}))}if(G++,g.monitorRunDependencies&&g.monitorRunDependencies(G),g.instantiateWasm)try{return g.instantiateWasm(A,B)}catch(A){s("Module.instantiateWasm callback failed with error: "+A),Q(A)}(D||"function"!=typeof WebAssembly.instantiateStreaming||Y(H)||"function"!=typeof fetch?C(E):fetch(H,{credentials:"same-origin"}).then((function(B){return WebAssembly.instantiateStreaming(B,A).then(E,(function(A){return s("wasm streaming compile failed: "+A),s("falling back to ArrayBuffer instantiation"),C(E)}))}))).catch(Q)}(),g.___wasm_call_ctors=function(){return(g.___wasm_call_ctors=g.asm.__wasm_call_ctors).apply(null,arguments)},g.___errno_location=function(){return(g.___errno_location=g.asm.__errno_location).apply(null,arguments)},g._omalloc=function(){return(g._omalloc=g.asm.omalloc).apply(null,arguments)},g._ofree=function(){return(g._ofree=g.asm.ofree).apply(null,arguments)},g._getLastOnigError=function(){return(g._getLastOnigError=g.asm.getLastOnigError).apply(null,arguments)},g._createOnigScanner=function(){return(g._createOnigScanner=g.asm.createOnigScanner).apply(null,arguments)},g._freeOnigScanner=function(){return(g._freeOnigScanner=g.asm.freeOnigScanner).apply(null,arguments)},g._findNextOnigScannerMatch=function(){return(g._findNextOnigScannerMatch=g.asm.findNextOnigScannerMatch).apply(null,arguments)},g._findNextOnigScannerMatchDbg=function(){return(g._findNextOnigScannerMatchDbg=g.asm.findNextOnigScannerMatchDbg).apply(null,arguments)},g.stackSave=function(){return(g.stackSave=g.asm.stackSave).apply(null,arguments)},g.stackRestore=function(){return(g.stackRestore=g.asm.stackRestore).apply(null,arguments)},g.stackAlloc=function(){return(g.stackAlloc=g.asm.stackAlloc).apply(null,arguments)},g.dynCall_jiji=function(){return(g.dynCall_jiji=g.asm.dynCall_jiji).apply(null,arguments)},g.UTF8ToString=function(A,B){return A?a(c,A,B):""},N=function A(){S||l(),S||(N=A)},g.preInit)for("function"==typeof g.preInit&&(g.preInit=[g.preInit]);g.preInit.length>0;)g.preInit.pop()();return l(),A.ready});let zA=null;class _A{static _utf8ByteLength(A){let B=0;for(let Q=0,g=A.length;Q=55296&&E<=56319&&Q+1=56320&&B<=57343&&(C=65536+(E-55296<<10)|B-56320,I=!0)}B+=C<=127?1:C<=2047?2:C<=65535?3:4,I&&Q++}return B}constructor(A){const B=A.length,Q=_A._utf8ByteLength(A),g=Q!==B,E=g?new Uint32Array(B+1):null;g&&(E[B]=Q);const C=g?new Uint32Array(Q+1):null;g&&(C[Q]=B);const I=new Uint8Array(Q);let D=0;for(let Q=0;Q=55296&&w<=56319&&Q+1=56320&&B<=57343&&(o=65536+(w-55296<<10)|B-56320,s=!0)}g&&(E[Q]=D,s&&(E[Q+1]=D),o<=127?C[D+0]=Q:o<=2047?(C[D+0]=Q,C[D+1]=Q):o<=65535?(C[D+0]=Q,C[D+1]=Q,C[D+2]=Q):(C[D+0]=Q,C[D+1]=Q,C[D+2]=Q,C[D+3]=Q)),o<=127?I[D++]=o:o<=2047?(I[D++]=192|(1984&o)>>>6,I[D++]=128|(63&o)>>>0):o<=65535?(I[D++]=224|(61440&o)>>>12,I[D++]=128|(4032&o)>>>6,I[D++]=128|(63&o)>>>0):(I[D++]=240|(1835008&o)>>>18,I[D++]=128|(258048&o)>>>12,I[D++]=128|(4032&o)>>>6,I[D++]=128|(63&o)>>>0),s&&Q++}this.utf16Length=B,this.utf8Length=Q,this.utf16Value=A,this.utf8Value=I,this.utf16OffsetToUtf8=E,this.utf8OffsetToUtf16=C}createString(A){const B=A._omalloc(this.utf8Length);return A.HEAPU8.set(this.utf8Value,B),B}}class $A{constructor(A){if(this.id=++$A.LAST_ID,!zA)throw new Error("Must invoke loadWASM first.");this._onigBinding=zA,this.content=A;const B=new _A(A);this.utf16Length=B.utf16Length,this.utf8Length=B.utf8Length,this.utf16OffsetToUtf8=B.utf16OffsetToUtf8,this.utf8OffsetToUtf16=B.utf8OffsetToUtf16,this.utf8Length<1e4&&!$A._sharedPtrInUse?($A._sharedPtr||($A._sharedPtr=zA._omalloc(1e4)),$A._sharedPtrInUse=!0,zA.HEAPU8.set(B.utf8Value,$A._sharedPtr),this.ptr=$A._sharedPtr):this.ptr=B.createString(zA)}convertUtf8OffsetToUtf16(A){return this.utf8OffsetToUtf16?A<0?0:A>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[A]:A}convertUtf16OffsetToUtf8(A){return this.utf16OffsetToUtf8?A<0?0:A>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[A]:A}dispose(){this.ptr===$A._sharedPtr?$A._sharedPtrInUse=!1:this._onigBinding._ofree(this.ptr)}}$A.LAST_ID=0,$A._sharedPtr=0,$A._sharedPtrInUse=!1;class AB{constructor(A){if(!zA)throw new Error("Must invoke loadWASM first.");const B=[],Q=[];for(let g=0,E=A.length;gWebAssembly.instantiateStreaming(A,B)}(g):function(A){return async B=>{const Q=await A.arrayBuffer();return WebAssembly.instantiate(Q,B)}}(g):function(A){return B=>WebAssembly.instantiate(A,B)}(g)}return QB=new Promise(((A,B)=>{g=A,E=B})),function(A,B,Q,g){VA({print:B,instantiateWasm:(B,Q)=>{if("undefined"==typeof performance){const A=()=>Date.now();B.env.emscripten_get_now=A,B.wasi_snapshot_preview1.emscripten_get_now=A}return A(B).then((A=>Q(A.instance)),g),{}}}).then((A=>{zA=A,Q()}))}(B,Q,g,E),QB}function EB(A){return new $A(A)}function CB(A){return new AB(A)}function IB(A){const B=r[A];if(!B)return;const{id:Q}=G[B];return{id:Q,scopeName:B}}const DB=new Map;let wB,oB;async function sB(A){if(DB.has(A))return DB.get(A);const B=function(A){return G[A]}(A);if(!B)return Promise.resolve(void 0);let Q;if(void 0===wB&&(Q=eB(B.path),wB=Q.then((()=>!0)).catch((()=>!1))),void 0===oB&&(oB=await wB),oB){const g=Q||eB(B.path);return DB.set(A,g),g}const E=g(`grammars/${B.id}`);B.embeddedScopes.forEach((A=>{if(!DB.has(A)){const B=E.then((B=>B.find((B=>B.scopeName===A))));DB.set(A,B)}}));const C=E.then((B=>B.find((B=>B.scopeName===A))));return DB.set(A,C),C}async function eB(A){return await Q("grammars",A)}const cB=30720,iB=16744448,tB=16775168,MB=11,aB=15,hB={NotSet:-1,None:0,Italic:1,Bold:2,Underline:4,Strikethrough:8};function nB(A,B,Q,g){const{tokens:E,ruleStack:C}=A.tokenizeLine2(Q,B),I=[];let D=Q.length;for(let A=E.length-2;A>=0;A-=2){const B=E[A],g=E[A+1],C=Q.slice(B,D);I.unshift({content:C,metadata:g}),D=B}let w=[];if(null==g?void 0:g.preserveWhitespace)w=I;else for(let A=0;A0?w[w.length-1].content+=B.content:A{const{rawTokens:E,nextStack:C}=nB(B,g,A,{preserveWhitespace:!0}),I=E.map((({content:A,metadata:B})=>({content:A,style:rB(B,Q)}))),D=function(A,B,Q,g){const{tokens:E}=Q.tokenizeLine(A,B),C=[];for(let B=0;B{if(w+=A.content.length,Q>>aB]},g=(A&cB)>>>MB;return g&hB.Italic&&(Q.fontStyle="italic"),g&hB.Bold&&(Q.fontWeight="bold"),g&hB.Underline&&(Q.textDecoration="underline"),g&hB.Strikethrough&&(Q.textDecoration="line-through"),Q}var GB=function(A){var B=null;if("undefined"!=typeof process&&null!=process.versions&&null!=process.versions.node)B=Buffer.from(A,"base64");else{var Q=globalThis.atob(A),g=Q.length;B=new Uint8Array(new ArrayBuffer(g));for(var E=0;E({createOnigScanner:CB,createOnigString:EB})));NB=new jA({onigLib:A,loadGrammar:A=>sB(A)})}const B=A.filter((A=>!LB(A))).map((A=>{const B=IB(A);if(!B)throw new RB(A);return NB.loadGrammar(B.scopeName)}));return Promise.all(B)}function kB(A){if(LB(A))return{langId:A,grammar:null};const B=IB(A);if(!B)throw new RB(A);const Q=function(A){const{_syncRegistry:B}=NB;return null==B?void 0:B._grammars.get(A)}(B.scopeName);if(!Q)throw new Error(`Syntax highlighting error: grammar for ${A} not loaded`);return{langId:B.id,grammar:Q}}class RB extends Error{constructor(A){super(`Unknown language: ${A}`),this.alias=A}}function KB(A,B,Q){NB.setTheme(Q);const g=function(A){const B=NB.getColorMap();return A.colorNames?B.map((B=>Object.keys(A.colorNames).find((Q=>A.colorNames[Q].toUpperCase()===B.toUpperCase()))||B)):B}(Q);return function(A,B,Q){let g=null;return A.split(/\r?\n|\r/g).map((A=>{const{rawTokens:E,nextStack:C}=nB(B,g,A);return g=C,E.map((({content:A,metadata:B})=>({content:A,style:rB(B,Q)})))}))}(A,B,g)}function YB(A){return A.split(/\r?\n|\r/g).map((A=>[{content:A,style:{}}]))}function UB(A,B){return PB(A.slice(1,-1)).map((A=>{const{from:Q,to:g}=uB(A);return{lineNumber:B,fromColumn:Q,toColumn:g}}))}function uB(A){const[B,Q]=A.split(":");if(!yB(B))throw new JB(B);const g=Number(B);if(g<1)throw new SB;if(Q){if(!yB(Q))throw new JB(Q);return{from:g,to:+Q}}return{from:g,to:g}}function PB(A){return A.split(/,(?![^\[]*\])/g)}function yB(A){A=A.toString();var B=Math.abs(A),Q=parseInt(A,10);return!isNaN(B)&&Q===B&&B.toString()===A}class JB extends Error{constructor(A){super(`Invalid number "${A}" in range string`),this.number=A,Object.setPrototypeOf(this,new.target.prototype)}}class SB extends Error{constructor(){super("Invalid line or column number in range string"),Object.setPrototypeOf(this,new.target.prototype)}}const pB="#001",lB="#010",dB={name:"comments",type:"light",foreground:"",background:"",colors:{},settings:[{settings:{foreground:"#000"}},{scope:["punctuation.definition.comment"],settings:{foreground:pB}},{scope:"comment",settings:{foreground:lB}}]};function fB(A,B,Q,g){const E=B?KB(A,B,dB):YB(A),C=[];let I=1;const D=E.map((A=>{const{annotations:B,lineWithoutComments:E}=function(A,B,Q){if(!A.some((A=>A.style.color===pB)))return{annotations:[],lineWithoutComments:A};const g=[];let E=0;for(;E!A.tokens.includes(B)));C.every((A=>""===A.content.trim()))&&(C=null);return{annotations:g.map((A=>({name:A.name,query:A.query,lineNumber:A.lineNumber,rangeString:A.rangeString}))),lineWithoutComments:C}}(A,g,I);if(C.push(...B),!E)return null;const D=E.map((A=>A.content)).join("");return["mdx","jsx","tsx"].includes(Q)&&B.length>0&&"{}"===D.trim()?null:(I++,D)})).filter((A=>null!==A)).join("\n"),w=C.map((A=>{var{rangeString:B,lineNumber:Q}=A,g=function(A,B){var Q={};for(var g in A)Object.prototype.hasOwnProperty.call(A,g)&&B.indexOf(g)<0&&(Q[g]=A[g]);if(null!=A&&"function"==typeof Object.getOwnPropertySymbols){var E=0;for(g=Object.getOwnPropertySymbols(A);E{if(A.includes("[")){const[Q,g]=A.split("["),E=Number(Q),C=B+E-1;if(!yB(C))throw new JB(Q);return UB("["+g,C)}const{from:Q,to:g}=uB(A);return[{fromLineNumber:Q+B-1,toLineNumber:g+B-1}]})).flat():[{fromLineNumber:B,toLineNumber:B}]}(B,Q);return Object.assign(Object.assign({},g),{ranges:E})}));return{newCode:D,annotations:w}}function xB(A,B){var Q;const g=A.match(/\s*([\w-]+)?(\([^\)]*\)|\[[^\]]*\])?(.*)$/),E=g[1],C=g[2],I=null===(Q=g[3])||void 0===Q?void 0:Q.trim();return B.includes(E)?{name:E,rangeString:C,query:I}:null}function mB(A,B){let Q=[],g=1;return A.forEach((A=>{Q.push({fromColumn:g,toColumn:g+A.content.length-1,token:A}),g+=A.content.length})),B.forEach((A=>{Q=function(A,B){const{range:Q}=B,{fromColumn:g,toColumn:E}=Q,C=[];let I=0;for(;IE){const[A,Q]=qB(B,E+1);D.tokens.push(A),C.push(Q)}else D.tokens.push(B);I++}else C.push(D);for(;IOB(A)))}function OB(A){return"tokens"in A?{annotationName:A.annotationName,annotationQuery:A.annotationQuery,fromColumn:A.fromColumn,toColumn:A.toColumn,tokens:A.tokens.map((A=>OB(A)))}:A.token}function qB(A,B){if("token"in A){const Q=Object.assign(Object.assign({},A.token),{content:A.token.content.slice(0,B-A.fromColumn)}),g=Object.assign(Object.assign({},A.token),{content:A.token.content.slice(B-A.fromColumn)});return[Object.assign(Object.assign({},A),{toColumn:B-1,token:Q}),Object.assign(Object.assign({},A),{fromColumn:B,token:g})]}{const Q=[],g=[];A.tokens.forEach((A=>{if(A.toColumn=B)g.push(A);else{const[E,C]=qB(A,B);Q.push(E),g.push(C)}}));return[Object.assign(Object.assign({},A),{toColumn:B-1,tokens:Q}),Object.assign(Object.assign({},A),{fromColumn:B,tokens:g})]}}function bB(A,B){let Q=A.map(((A,B)=>({fromLineNumber:B+1,toLineNumber:B+1,line:A})));return B.forEach((A=>{Q=function(A,B){const{range:Q,name:g,query:E}=B,{fromLineNumber:C,toLineNumber:I}=Q,D=[];let w=0;for(;wI){const[A,Q]=TB(B,I+1);o.lines.push(A),D.push(Q)}else o.lines.push(B);w++}else D.push(o);for(;wWB(A)))}function WB(A){return"line"in A?{lineNumber:A.fromLineNumber,tokens:A.line.tokens}:{annotationName:A.annotationName,annotationQuery:A.annotationQuery,fromLineNumber:A.fromLineNumber,toLineNumber:A.toLineNumber,lines:A.lines.map((A=>WB(A)))}}function TB(A,B){if("line"in A)return[Object.assign(Object.assign({},A),{toLineNumber:B-1}),Object.assign(Object.assign({},A),{fromLineNumber:B})];{const Q=[],g=[];return A.lines.forEach((A=>{if(A.toLineNumber=B)g.push(A);else{const[E,C]=TB(A,B);Q.push(E),g.push(C)}})),[Object.assign(Object.assign({},A),{toLineNumber:B-1,lines:Q}),Object.assign(Object.assign({},A),{fromLineNumber:B,lines:g})]}}function vB(A,B){const{inlineAnnotations:Q,multilineAnnotations:g}=function(A){const B=[],Q=[];return A.forEach((A=>{A.ranges.forEach((g=>{"lineNumber"in g?B.push(Object.assign(Object.assign({},A),{range:g})):Q.push(Object.assign(Object.assign({},A),{range:g}))}))})),{inlineAnnotations:B,multilineAnnotations:Q}}(B);return bB(A.map(((A,B)=>{const g=Q.filter((A=>A.range.lineNumber===B+1));return{lineNumber:B+1,tokens:mB(A,g)}})),g)}var XB=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],ZB={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",9:"strikethrough"};function jB(A,B){const Q=A.indexOf("[",B);if(-1!==Q){const B=A.indexOf("m",Q);return{sequence:A.substring(Q+2,B).split(";"),startPosition:Q,position:B+1}}return{position:A.length}}function VB(A,B){let Q=1;const g=A[B+Q++];let E;if("2"===g){const g=[A[B+Q++],A[B+Q++],A[B+Q]].map((A=>Number.parseInt(A)));3!==g.length||g.some((A=>Number.isNaN(A)))||(E={type:"rgb",rgb:g})}else if("5"===g){const g=Number.parseInt(A[B+Q]);Number.isNaN(g)||(E={type:"table",index:Number(g)})}return[Q,E]}function zB(A){const B=[];for(let Q=0;Q=90&&E<=97?B.push({type:"setForegroundColor",value:{type:"named",name:XB[E-90+8]}}):E>=100&&E<=107&&B.push({type:"setBackgroundColor",value:{type:"named",name:XB[E-100+8]}})}return B}function _B(A,B){const Q=function(){let A=null,B=null,Q=new Set;return{parse(g){const E=[];let C=0;do{const I=jB(g,C),D=I.sequence?g.substring(C,I.startPosition):g.substring(C);if(D.length>0&&E.push({value:D,foreground:A,background:B,decorations:new Set(Q)}),I.sequence){const g=zB(I.sequence);for(const E of g)"resetAll"===E.type?(A=null,B=null,Q.clear()):"resetForegroundColor"===E.type?A=null:"resetBackgroundColor"===E.type?B=null:"resetDecoration"===E.type&&Q.delete(E.value);for(const E of g)"setForegroundColor"===E.type?A=E.value:"setBackgroundColor"===E.type?B=E.value:"setDecoration"===E.type&&Q.add(E.value)}C=I.position}while(Cfunction(A,B,Q){const g=A.parse(B),E=g.map((({value:A,foreground:B,background:g,decorations:E})=>{const C=$B(B,Q),I={};C&&(I.color=C);const D=$B(g,Q);return D&&(I.background=D),E.has("bold")&&(I.fontWeight="bold"),E.has("italic")&&(I.fontStyle="italic"),E.has("underline")&&(I.textDecoration="underline"),E.has("strikethrough")&&(I.textDecoration="line-through"),E.has("reverse")&&(I.color=D,I.background=C),E.has("dim")&&(I.opacity=.5),{content:A,style:I}}));return E}(Q,A,B)));return g}function $B(A,B){if(A){if("named"===A.type){return o(B,"terminal.ansi"+(A.name[0].toUpperCase()+A.name.slice(1)))}if("rgb"===A.type){const[B,Q,g]=A.rgb;return`rgb(${B}, ${Q}, ${g})`}}}async function AQ(A,B){await Promise.all([HB(A),t(B)])}function BQ(A,B,Q="dark-plus",g={}){const E=A||"",C=B||"text";if("string"!=typeof E)throw new Error("Syntax highlighter error: code must be a string");if("string"!=typeof C)throw new Error("Syntax highlighter error: lang must be a string");const{langId:I,grammar:D}=kB(C),w=M(Q),s="text"==I?YB(E):"terminal"==I?_B(E,w):(null==g?void 0:g.scopes)?function(A,B,Q){return NB.setTheme(Q),FB(A,B,NB.getColorMap())}(E,D,w):KB(E,D,w),e="terminal"==I?function(A){return{color:o(A,"terminal.foreground"),background:o(A,"terminal.background")}}(w):{color:w.foreground,background:w.background};if(function(A){return"annotations"in A}(g)){return{lines:vB(s,(null==g?void 0:g.annotations)||[]),lang:I,style:e}}return{lines:s,lang:I,style:e}}exports.LANG_NAMES=["abap","actionscript-3","ada","apache","apex","apl","applescript","ara","asm","astro","awk","ballerina","bash","bat","batch","be","beancount","berry","bibtex","bicep","blade","c","c#","cadence","cdc","clarity","clj","clojure","cmake","cmd","cobol","codeql","coffee","console","cpp","crystal","cs","csharp","css","cue","cypher","d","dart","dax","diff","docker","dockerfile","dream-maker","elixir","elm","erb","erl","erlang","f#","fish","fs","fsharp","fsl","gdresource","gdscript","gdshader","gherkin","git-commit","git-rebase","glimmer-js","glimmer-ts","glsl","gnuplot","go","graphql","groovy","hack","haml","handlebars","haskell","hbs","hcl","hjson","hlsl","hs","html","http","imba","ini","jade","java","javascript","jinja-html","jison","js","json","json5","jsonc","jsonl","jsonnet","jssm","jsx","julia","kotlin","kql","kusto","latex","less","liquid","lisp","logo","lua","make","makefile","markdown","marko","matlab","md","mdx","mermaid","narrat","nextflow","nginx","nim","nix","objc","objective-c","objective-cpp","ocaml","pascal","perl","perl6","php","plsql","postcss","powerquery","powershell","prisma","prolog","properties","proto","ps","ps1","pug","puppet","purescript","py","python","ql","r","raku","razor","rb","reg","rel","riscv","rs","rst","ruby","rust","sas","sass","scala","scheme","scss","sh","shader","shaderlab","shell","shellscript","shellsession","smalltalk","solidity","sparql","sql","ssh-config","stata","styl","stylus","svelte","swift","system-verilog","tasl","tcl","terminal","tex","text","toml","ts","tsx","turtle","twig","txt","typescript","v","vb","verilog","vhdl","vim","viml","vimscript","vue","vue-html","vyper","wasm","wenyan","wgsl","wolfram","xml","xsl","yaml","yml","zenscript","zsh","文言"],exports.THEME_NAMES=h,exports.UnknownLanguageError=RB,exports.UnknownThemeError=n,exports.extractAnnotations=async function(A,B,Q){if(!Q)return{code:A,annotations:[]};await HB([B]);const{grammar:g}=kB(B),{newCode:E,annotations:C}=fB(A,g,B,Q);return{code:E,annotations:C}},exports.getThemeColors=async function(A){if(!A)throw new Error("Syntax highlighter error: undefined theme");return await AQ([],A),F(M(A))},exports.getThemeColorsSync=function(A){if(!A)throw new Error("Syntax highlighter error: undefined theme");return F(M(A))},exports.highlight=async function(A,B,Q="dark-plus",g={}){const E=A||"",C=B||"text";if("string"!=typeof E)throw new Error("Syntax highlighter error: code must be a string");if("string"!=typeof C)throw new Error("Syntax highlighter error: lang must be a string");return await AQ([C],Q),BQ(E,C,Q,g)},exports.highlightSync=BQ,exports.preload=AQ; diff --git a/lib/dist/index.d.ts b/lib/dist/index.d.ts index 3a787b9..dd97b65 100644 --- a/lib/dist/index.d.ts +++ b/lib/dist/index.d.ts @@ -1,3 +1,16 @@ +type LineNumber = number; +type ColumnNumber = number; +type MultiLineRange = { + fromLineNumber: LineNumber; + toLineNumber: LineNumber; +}; +type InlineRange = { + lineNumber: LineNumber; + fromColumn: ColumnNumber; + toColumn: ColumnNumber; +}; +type CodeRange = MultiLineRange | InlineRange; + type RawTheme = { name?: string; type?: string; @@ -30,19 +43,6 @@ type NamesTuple = typeof LANG_NAMES; type LanguageAlias = NamesTuple[number]; type LanguageName = "abap" | "actionscript-3" | "ada" | "apache" | "apex" | "apl" | "applescript" | "ara" | "asm" | "astro" | "awk" | "ballerina" | "bat" | "beancount" | "berry" | "bibtex" | "bicep" | "blade" | "c" | "cadence" | "clarity" | "clojure" | "cmake" | "cobol" | "codeql" | "coffee" | "cpp" | "crystal" | "csharp" | "css" | "cue" | "cypher" | "d" | "dart" | "dax" | "diff" | "docker" | "dream-maker" | "elixir" | "elm" | "erb" | "erlang" | "fish" | "fsharp" | "gdresource" | "gdscript" | "gdshader" | "gherkin" | "git-commit" | "git-rebase" | "glimmer-js" | "glimmer-ts" | "glsl" | "gnuplot" | "go" | "graphql" | "groovy" | "hack" | "haml" | "handlebars" | "haskell" | "hcl" | "hjson" | "hlsl" | "html" | "http" | "imba" | "ini" | "java" | "javascript" | "jinja-html" | "jison" | "json" | "json5" | "jsonc" | "jsonl" | "jsonnet" | "jssm" | "jsx" | "julia" | "kotlin" | "kusto" | "latex" | "less" | "liquid" | "lisp" | "logo" | "lua" | "make" | "markdown" | "marko" | "matlab" | "mdx" | "mermaid" | "narrat" | "nextflow" | "nginx" | "nim" | "nix" | "objective-c" | "objective-cpp" | "ocaml" | "pascal" | "perl" | "php" | "plsql" | "postcss" | "powerquery" | "powershell" | "prisma" | "prolog" | "proto" | "pug" | "puppet" | "purescript" | "python" | "r" | "raku" | "razor" | "reg" | "rel" | "riscv" | "rst" | "ruby" | "rust" | "sas" | "sass" | "scala" | "scheme" | "scss" | "shaderlab" | "shellscript" | "shellsession" | "smalltalk" | "solidity" | "sparql" | "sql" | "ssh-config" | "stata" | "stylus" | "svelte" | "swift" | "system-verilog" | "tasl" | "tcl" | "tex" | "toml" | "tsx" | "turtle" | "twig" | "txt" | "typescript" | "v" | "vb" | "verilog" | "vhdl" | "viml" | "vue-html" | "vue" | "vyper" | "wasm" | "wenyan" | "wgsl" | "wolfram" | "xml" | "xsl" | "yaml" | "zenscript"; -type LineNumber = number; -type ColumnNumber = number; -type MultiLineRange = { - fromLineNumber: LineNumber; - toLineNumber: LineNumber; -}; -type InlineRange = { - lineNumber: LineNumber; - fromColumn: ColumnNumber; - toColumn: ColumnNumber; -}; -type CodeRange = MultiLineRange | InlineRange; - type Annotation = { name: string; query?: string; @@ -121,7 +121,11 @@ declare function highlightSync(code: string, lang: LanguageAlias, themeOrThemeNa declare function highlightSync(code: string, lang: LanguageAlias, themeOrThemeName: Theme, config: AnnotatedConfig): AnnotatedLighterResult; declare function extractAnnotations(code: string, lang: LanguageAlias, annotationExtractor?: AnnotationExtractor): Promise<{ code: string; - annotations: Annotation[]; + annotations: { + ranges: CodeRange[]; + name: string; + query?: string; + }[]; }>; declare function getThemeColors(themeOrThemeName: Theme): Promise<{ colorScheme: string; diff --git a/lib/dist/index.esm.mjs b/lib/dist/index.esm.mjs index ed658a3..6493707 100644 --- a/lib/dist/index.esm.mjs +++ b/lib/dist/index.esm.mjs @@ -1 +1 @@ -function A(A,B){var Q=require("fs"),g=require("path"),E=g.parse,C=require("os");var I=function(A,B){var Q="/";/^([A-Za-z]:)/.test(A)?Q="":/^\\\\/.test(A)&&(Q="\\\\");for(var C=[A],I=E(A);I.dir!==C[C.length-1];)C.push(I.dir),I=E(I.dir);return C.reduce((function(A,E){return A.concat(B.map((function(A){return g.resolve(Q,E,A)})))}),[])};const D=C.homedir||function(){var A=process.env.HOME,B=process.env.LOGNAME||process.env.USER||process.env.LNAME||process.env.USERNAME;return"win32"===process.platform?process.env.USERPROFILE||process.env.HOMEDRIVE+process.env.HOMEPATH||A||null:"darwin"===process.platform?A||(B?"/Users/"+B:null):"linux"===process.platform?A||(0===process.getuid()?"/root":B?"/home/"+B:null):A||null};var w="win32"!==process.platform&&Q.realpathSync&&"function"==typeof Q.realpathSync.native?Q.realpathSync.native:Q.realpathSync,o=D(),s=function(A,B,Q){return Q&&!1===Q.preserveSymlinks?A(B):B},e=function(A,B,Q){for(var E=function(A,B,Q){var g=B&&B.moduleDirectory?[].concat(B.moduleDirectory):["node_modules"];if(B&&"function"==typeof B.paths)return B.paths(Q,A,(function(){return I(A,g)}),B);var E=I(A,g);return B&&B.paths?E.concat(B.paths):E}(B,Q,A),C=0;CA.promises)),E=await import("path"),{URL:C}=await import("url"),I=new C(".",import.meta.url).pathname;try{let A=E.resolve(I,"..",B),C=E.resolve(A,Q);const D=await g.readFile(C,"utf8");if(!D)throw new Error("no results");return JSON.parse(D)}catch(C){const D=A("@code-hike/lighter",{basedir:I});let w=E.resolve(D,"..","..",B),o=E.resolve(w,Q);return JSON.parse(await g.readFile(o,"utf8"))}}async function Q(A){if("function"==typeof fetch){const B=await fetch(`https://lighter.codehike.org/${A}.json`);return await B.json()}const B=await import("https"),Q={host:"lighter.codehike.org",path:`/${A}.json`,method:"GET"};return new Promise(((A,g)=>{const E=B.request(Q,(B=>{let Q="";B.on("data",(A=>{Q+=A})),B.on("end",(()=>{A(JSON.parse(Q))}))}));E.on("error",(A=>{g(A)})),E.end()}))}const g=A=>/^#([A-Fa-f0-9]{3,4}){1,2}$/.test(A),E=(A,B)=>A.match(new RegExp(`.{${B}}`,"g")),C=A=>parseInt(A.repeat(2/A.length),16);function I(A,B){return void 0!==A?A/255:"number"!=typeof B||B<0||B>1?1:B}function D(A,B){if(!A)return A;const{r:Q,g:D,b:w,a:o}=function(A){if(!A)return;if(!g(A))throw new Error("Invalid color string, must be a valid hex color");const B=Math.floor((A.length-1)/3),Q=E(A.slice(1),B),[D,w,o,s]=Q.map(C);return{r:D,g:w,b:o,a:I(s,1)}}(A);return function(A){if(!A)return;const{r:B,g:Q,b:g,a:E}=A,C=Math.round(255*E);return`#${B.toString(16).padStart(2,"0")}${Q.toString(16).padStart(2,"0")}${g.toString(16).padStart(2,"0")}${C.toString(16).padStart(2,"0")}`}({r:Q,g:D,b:w,a:o*B})}function w(A,B){const Q=A.colors||{};if(Q[B])return Q[B];const g=s[B];if(!g)throw new Error(`Unknown theme color key: ${B}`);return"string"==typeof g?w(A,g):function(A,B){const Q=B[A.type];if(Array.isArray(Q)){const[B,g,...E]=Q;return B(w(A,g),...E)}return Q}(A,g)}const o="#6FC3DF",s={"editor.foreground":{dark:"#bbbbbb",light:"#333333",hc:"#ffffff"},"editorLineNumber.foreground":{dark:"#858585",light:"#237893",hc:"#fffffe"},"editor.selectionBackground":{light:"#ADD6FF",dark:"#264F78",hc:"#f3f518"},"editor.background":{light:"#fffffe",dark:"#1E1E1E",hc:"#000000"},"editorGroupHeader.tabsBackground":{dark:"#252526",light:"#F3F3F3"},"tab.activeBackground":"editor.background","tab.activeForeground":{dark:"#ffffff",light:"#333333",hc:"#ffffff"},"tab.border":{dark:"#252526",light:"#F3F3F3",hc:o},"tab.activeBorder":"tab.activeBackground","tab.inactiveBackground":{dark:"#2D2D2D",light:"#ECECEC"},"tab.inactiveForeground":{dark:[D,"tab.activeForeground",.5],light:[D,"tab.activeForeground",.5],hc:"#ffffff"},"diffEditor.insertedTextBackground":{dark:"#9ccc2c33",light:"#9ccc2c40"},"diffEditor.removedTextBackground":{dark:"#ff000033",light:"#ff000033"},"diffEditor.insertedLineBackground":{dark:"#9bb95533",light:"#9bb95533"},"diffEditor.removedLineBackground":{dark:"#ff000033",light:"#ff000033"},"icon.foreground":{dark:"#C5C5C5",light:"#424242",hc:"#FFFFFF"},"sideBar.background":{dark:"#252526",light:"#F3F3F3",hc:"#000000"},"sideBar.foreground":"editor.foreground","sideBar.border":"sideBar.background","list.inactiveSelectionBackground":{dark:"#37373D",light:"#E4E6F1"},"list.inactiveSelectionForeground":{},"list.hoverBackground":{dark:"#2A2D2E",light:"#F0F0F0"},"list.hoverForeground":{},"editorGroupHeader.tabsBorder":{hc:o},"tab.activeBorderTop":{hc:o},"tab.hoverBackground":"tab.inactiveBackground","tab.hoverForeground":"tab.inactiveForeground","editor.rangeHighlightBackground":{dark:"#ffffff0b",light:"#fdff0033"},"editor.infoForeground":{dark:"#3794FF",light:"#1a85ff",hc:"#3794FF"},"input.border":{hc:o},"input.background":{dark:"#3C3C3C",light:"#fffffe",hc:"#000000"},"input.foreground":"editor.foreground","editor.lineHighlightBackground":{},focusBorder:{light:"#0090F1",dark:"#007FD4",hc:o},"editorGroup.border":{dark:"#444444",light:"#E7E7E7",hc:o},"list.activeSelectionBackground":{dark:"#094771",light:"#0060C0",hc:"#000000"},"list.activeSelectionForeground":{dark:"#fffffe",light:"#fffffe",hc:"#fffffe"},"lighter.inlineBackground":{dark:[D,"editor.background",.9],light:[D,"editor.background",.9]},"terminal.background":"editor.background","terminal.foreground":"editor.foreground","terminal.ansiBlack":{dark:"#000000",light:"#000000",hc:"#000000"},"terminal.ansiRed":{dark:"#cd3131",light:"#cd3131",hc:"#cd0000"},"terminal.ansiGreen":{dark:"#0DBC79",light:"#00BC00",hc:"#00cd00"},"terminal.ansiYellow":{dark:"#e5e510",light:"#949800",hc:"#cdcd00"},"terminal.ansiBlue":{dark:"#2472c8",light:"#0451a5",hc:"#0000ee"},"terminal.ansiMagenta":{dark:"#bc3fbc",light:"#bc05bc",hc:"#cd00cd"},"terminal.ansiCyan":{dark:"#11a8cd",light:"#0598bc",hc:"#00cdcd"},"terminal.ansiWhite":{dark:"#e5e5e5",light:"#555555",hc:"#e5e5e5"},"terminal.ansiBrightBlack":{dark:"#666666",light:"#666666",hc:"#7f7f7f"},"terminal.ansiBrightRed":{dark:"#f14c4c",light:"#cd3131",hc:"#ff0000"},"terminal.ansiBrightGreen":{dark:"#23d18b",light:"#14CE14",hc:"#00ff00"},"terminal.ansiBrightYellow":{dark:"#f5f543",light:"#b5ba00",hc:"#ffff00"},"terminal.ansiBrightBlue":{dark:"#3b8eea",light:"#0451a5",hc:"#5c5cff"},"terminal.ansiBrightMagenta":{dark:"#d670d6",light:"#bc05bc",hc:"#ff00ff"},"terminal.ansiBrightCyan":{dark:"#29b8db",light:"#0598bc",hc:"#00ffff"},"terminal.ansiBrightWhite":{dark:"#e5e5e5",light:"#a5a5a5",hc:"#ffffff"}},e=new Map,c=new Map;async function i(A){if("string"==typeof A){const g=A;if(!h.includes(g))throw new a(g);if(!e.has(g)){const A=async function(A){try{return await B("themes",A+".json")}catch(B){return await Q(`themes/${A}`)}}(g).then((A=>(c.set(g,A),A)));e.set(g,A)}return e.get(g)}return A}function t(A){let B=null;if("string"==typeof A){if(B=c.get(A),!B)throw new Error("Syntax highlighting error: theme not loaded")}else B=A;return function(A){if(!A)return;const B=A.settings||A.tokenColors||[],Q={name:A.name||"unknown-theme",type:M(A),foreground:"",background:"",settings:B,colors:A.colors||{},colorNames:A.colorNames},g=B.find((A=>!A.scope));if(g){const{foreground:A,background:B}=(null==g?void 0:g.settings)||{},E={};A&&!Q.colors["editor.foreground"]&&(E["editor.foreground"]=A),B&&!Q.colors["editor.background"]&&(E["editor.background"]=B),Object.keys(E).length>0&&(Q.colors=Object.assign(Object.assign({},Q.colors),E)),Q.foreground=A,Q.background=B}g||(Q.settings=[{settings:{foreground:w(Q,"editor.foreground"),background:w(Q,"editor.background")}},...Q.settings]);if(Q.background=Q.background||w(Q,"editor.background"),Q.foreground=Q.foreground||w(Q,"editor.foreground"),"from-css"===A.type&&!Q.colorNames){const A={};let B=0;Q.settings=Q.settings.map((Q=>{const g=Object.assign(Object.assign({},Q),{settings:Object.assign({},Q.settings)}),{foreground:E,background:C}=g.settings||{};return E&&!A[E]&&(A[E]=`#${B.toString(16).padStart(6,"0")}`,B++),C&&!A[C]&&(A[C]=`#${B.toString(16).padStart(6,"0")}`,B++),E&&(g.settings.foreground=A[E]),C&&(g.settings.background=A[C]),g})),Q.colorNames=A}return Q}(B)}function M(A){var B;if("from-css"===A.type)return"from-css";return"light"===(A.type?A.type:(null===(B=A.name)||void 0===B?void 0:B.toLowerCase().includes("light"))?"light":"dark")?"light":"dark"}const h=["dark-plus","dracula-soft","dracula","github-dark","github-dark-dimmed","github-from-css","github-light","light-plus","material-darker","material-default","material-from-css","material-lighter","material-ocean","material-palenight","min-dark","min-light","monokai","nord","one-dark-pro","poimandres","slack-dark","slack-ochin","solarized-dark","solarized-light"];class a extends Error{constructor(A){super(`Unknown theme: ${A}`),this.theme=A}}function n(A){const B=B=>"colorScheme"===B?function(A){return"from-css"===A.type?"var(--ch-0)":A.type}(A):"foreground"===B?A.foreground:"background"===B?A.background:w(A,B);return{colorScheme:B("colorScheme"),foreground:B("foreground"),background:B("background"),lighter:{inlineBackground:B("lighter.inlineBackground")},editor:{background:B("editor.background"),foreground:B("editor.foreground"),lineHighlightBackground:B("editor.lineHighlightBackground"),rangeHighlightBackground:B("editor.rangeHighlightBackground"),infoForeground:B("editor.infoForeground"),selectionBackground:B("editor.selectionBackground")},focusBorder:B("focusBorder"),tab:{activeBackground:B("tab.activeBackground"),activeForeground:B("tab.activeForeground"),inactiveBackground:B("tab.inactiveBackground"),inactiveForeground:B("tab.inactiveForeground"),border:B("tab.border"),activeBorder:B("tab.activeBorder"),activeBorderTop:B("tab.activeBorderTop")},editorGroup:{border:B("editorGroup.border")},editorGroupHeader:{tabsBackground:B("editorGroupHeader.tabsBackground")},editorLineNumber:{foreground:B("editorLineNumber.foreground")},input:{background:B("input.background"),foreground:B("input.foreground"),border:B("input.border")},icon:{foreground:B("icon.foreground")},sideBar:{background:B("sideBar.background"),foreground:B("sideBar.foreground"),border:B("sideBar.border")},list:{activeSelectionBackground:B("list.activeSelectionBackground"),activeSelectionForeground:B("list.activeSelectionForeground"),hoverBackground:B("list.hoverBackground"),hoverForeground:B("list.hoverForeground")}}}const F=["abap","actionscript-3","ada","apache","apex","apl","applescript","ara","asm","astro","awk","ballerina","bash","bat","batch","be","beancount","berry","bibtex","bicep","blade","c","c#","cadence","cdc","clarity","clj","clojure","cmake","cmd","cobol","codeql","coffee","console","cpp","crystal","cs","csharp","css","cue","cypher","d","dart","dax","diff","docker","dockerfile","dream-maker","elixir","elm","erb","erl","erlang","f#","fish","fs","fsharp","fsl","gdresource","gdscript","gdshader","gherkin","git-commit","git-rebase","glimmer-js","glimmer-ts","glsl","gnuplot","go","graphql","groovy","hack","haml","handlebars","haskell","hbs","hcl","hjson","hlsl","hs","html","http","imba","ini","jade","java","javascript","jinja-html","jison","js","json","json5","jsonc","jsonl","jsonnet","jssm","jsx","julia","kotlin","kql","kusto","latex","less","liquid","lisp","logo","lua","make","makefile","markdown","marko","matlab","md","mdx","mermaid","narrat","nextflow","nginx","nim","nix","objc","objective-c","objective-cpp","ocaml","pascal","perl","perl6","php","plsql","postcss","powerquery","powershell","prisma","prolog","properties","proto","ps","ps1","pug","puppet","purescript","py","python","ql","r","raku","razor","rb","reg","rel","riscv","rs","rst","ruby","rust","sas","sass","scala","scheme","scss","sh","shader","shaderlab","shell","shellscript","shellsession","smalltalk","solidity","sparql","sql","ssh-config","stata","styl","stylus","svelte","swift","system-verilog","tasl","tcl","terminal","tex","text","toml","ts","tsx","turtle","twig","txt","typescript","v","vb","verilog","vhdl","vim","viml","vimscript","vue","vue-html","vyper","wasm","wenyan","wgsl","wolfram","xml","xsl","yaml","yml","zenscript","zsh","文言"],G={abap:"source.abap","actionscript-3":"source.actionscript.3",ada:"source.ada",apache:"source.apacheconf",apex:"source.apex",apl:"source.apl",applescript:"source.applescript",ara:"source.ara",asm:"source.asm.x86_64",astro:"source.astro",awk:"source.awk",ballerina:"source.ballerina",bat:"source.batchfile",batch:"source.batchfile",beancount:"text.beancount",berry:"source.berry",be:"source.berry",bibtex:"text.bibtex",bicep:"source.bicep",blade:"text.html.php.blade",c:"source.c",cadence:"source.cadence",cdc:"source.cadence",clarity:"source.clar",clojure:"source.clojure",clj:"source.clojure",cmake:"source.cmake",cobol:"source.cobol",codeql:"source.ql",ql:"source.ql",coffee:"source.coffee",cpp:"source.cpp",crystal:"source.crystal",csharp:"source.cs","c#":"source.cs",cs:"source.cs",css:"source.css",cue:"source.cue",cypher:"source.cypher",d:"source.d",dart:"source.dart",dax:"source.dax",diff:"source.diff",docker:"source.dockerfile",dockerfile:"source.dockerfile","dream-maker":"source.dm",elixir:"source.elixir",elm:"source.elm",erb:"text.html.erb",erlang:"source.erlang",erl:"source.erlang",fish:"source.fish",fsharp:"source.fsharp","f#":"source.fsharp",fs:"source.fsharp",gdresource:"source.gdresource",gdscript:"source.gdscript",gdshader:"source.gdshader",gherkin:"text.gherkin.feature","git-commit":"text.git-commit","git-rebase":"text.git-rebase","glimmer-js":"source.gjs","glimmer-ts":"source.gts",glsl:"source.glsl",gnuplot:"source.gnuplot",go:"source.go",graphql:"source.graphql",groovy:"source.groovy",hack:"source.hack",haml:"text.haml",handlebars:"text.html.handlebars",hbs:"text.html.handlebars",haskell:"source.haskell",hs:"source.haskell",hcl:"source.hcl",hjson:"source.hjson",hlsl:"source.hlsl",html:"text.html.basic",http:"source.http",imba:"source.imba",ini:"source.ini",properties:"source.ini",java:"source.java",javascript:"source.js",js:"source.js","jinja-html":"text.html.jinja",jison:"source.jison",json:"source.json",json5:"source.json5",jsonc:"source.json.comments",jsonl:"source.json.lines",jsonnet:"source.jsonnet",jssm:"source.jssm",fsl:"source.jssm",jsx:"source.js.jsx",julia:"source.julia",kotlin:"source.kotlin",kusto:"source.kusto",kql:"source.kusto",latex:"text.tex.latex",less:"source.css.less",liquid:"text.html.liquid",lisp:"source.lisp",logo:"source.logo",lua:"source.lua",make:"source.makefile",makefile:"source.makefile",markdown:"text.html.markdown",md:"text.html.markdown",marko:"text.marko",matlab:"source.matlab",mdx:"source.mdx",mermaid:"source.mermaid",narrat:"source.narrat",nextflow:"source.nextflow",nginx:"source.nginx",nim:"source.nim",nix:"source.nix","objective-c":"source.objc",objc:"source.objc","objective-cpp":"source.objcpp",ocaml:"source.ocaml",pascal:"source.pascal",perl:"source.perl",php:"source.php",plsql:"source.plsql.oracle",postcss:"source.css.postcss",powerquery:"source.powerquery",powershell:"source.powershell",ps:"source.powershell",ps1:"source.powershell",prisma:"source.prisma",prolog:"source.prolog",proto:"source.proto",pug:"text.pug",jade:"text.pug",puppet:"source.puppet",purescript:"source.purescript",python:"source.python",py:"source.python",r:"source.r",raku:"source.perl.6",perl6:"source.perl.6",razor:"text.aspnetcorerazor",reg:"source.reg",rel:"source.rel",riscv:"source.riscv",rst:"source.rst",ruby:"source.ruby",rb:"source.ruby",rust:"source.rust",rs:"source.rust",sas:"source.sas",sass:"source.sass",scala:"source.scala",scheme:"source.scheme",scss:"source.css.scss",shaderlab:"source.shaderlab",shader:"source.shaderlab",shellscript:"source.shell",bash:"source.shell",console:"source.shell",sh:"source.shell",shell:"source.shell",zsh:"source.shell",shellsession:"text.shell-session",smalltalk:"source.smalltalk",solidity:"source.solidity",sparql:"source.sparql",sql:"source.sql","ssh-config":"source.ssh-config",stata:"source.stata",stylus:"source.stylus",styl:"source.stylus",svelte:"source.svelte",swift:"source.swift","system-verilog":"source.systemverilog",tasl:"source.tasl",tcl:"source.tcl",tex:"text.tex",toml:"source.toml",tsx:"source.tsx",turtle:"source.turtle",twig:"text.html.twig",txt:"source.txt",typescript:"source.ts",ts:"source.ts",v:"source.v",vb:"source.asp.vb.net",cmd:"source.asp.vb.net",verilog:"source.verilog",vhdl:"source.vhdl",viml:"source.viml",vim:"source.viml",vimscript:"source.viml","vue-html":"text.html.vue-html",vue:"source.vue",vyper:"source.vyper",wasm:"source.wat",wenyan:"source.wenyan","文言":"source.wenyan",wgsl:"source.wgsl",wolfram:"source.wolfram",xml:"text.xml",xsl:"text.xml.xsl",yaml:"source.yaml",yml:"source.yaml",zenscript:"source.zenscript"},r={"source.abap":{id:"abap",path:"abap.tmLanguage.json",embeddedScopes:[]},"source.actionscript.3":{id:"actionscript-3",path:"actionscript-3.tmLanguage.json",embeddedScopes:[]},"source.ada":{id:"ada",path:"ada.tmLanguage.json",embeddedScopes:[]},"source.apacheconf":{id:"apache",path:"apache.tmLanguage.json",embeddedScopes:[]},"source.apex":{id:"apex",path:"apex.tmLanguage.json",embeddedScopes:[]},"source.apl":{id:"apl",path:"apl.tmLanguage.json",embeddedScopes:["source.java","source.json","source.js","source.css","text.xml","text.html.basic"]},"source.applescript":{id:"applescript",path:"applescript.tmLanguage.json",embeddedScopes:[]},"source.ara":{id:"ara",path:"ara.tmLanguage.json",embeddedScopes:[]},"source.asm.x86_64":{id:"asm",path:"asm.tmLanguage.json",embeddedScopes:[]},"source.astro":{id:"astro",path:"astro.tmLanguage.json",embeddedScopes:["source.tsx","source.css.postcss","source.css.less","source.css.scss","source.css","source.sass","source.stylus","source.ts","source.js","source.json"]},"source.awk":{id:"awk",path:"awk.tmLanguage.json",embeddedScopes:[]},"source.ballerina":{id:"ballerina",path:"ballerina.tmLanguage.json",embeddedScopes:[]},"source.batchfile":{id:"bat",path:"bat.tmLanguage.json",embeddedScopes:[]},"text.beancount":{id:"beancount",path:"beancount.tmLanguage.json",embeddedScopes:[]},"source.berry":{id:"berry",path:"berry.tmLanguage.json",embeddedScopes:[]},"text.bibtex":{id:"bibtex",path:"bibtex.tmLanguage.json",embeddedScopes:[]},"source.bicep":{id:"bicep",path:"bicep.tmLanguage.json",embeddedScopes:[]},"text.html.php.blade":{id:"blade",path:"blade.tmLanguage.json",embeddedScopes:["source.java","source.css","source.json","source.js","source.sql","text.xml","text.html.basic"]},"source.c":{id:"c",path:"c.tmLanguage.json",embeddedScopes:[]},"source.cadence":{id:"cadence",path:"cadence.tmLanguage.json",embeddedScopes:[]},"source.clar":{id:"clarity",path:"clarity.tmLanguage.json",embeddedScopes:[]},"source.clojure":{id:"clojure",path:"clojure.tmLanguage.json",embeddedScopes:[]},"source.cmake":{id:"cmake",path:"cmake.tmLanguage.json",embeddedScopes:[]},"source.cobol":{id:"cobol",path:"cobol.tmLanguage.json",embeddedScopes:["source.css","source.js","source.java","text.html.basic","source.sql"]},"source.ql":{id:"codeql",path:"codeql.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.stylus","source.sass","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.tsx","source.ts","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.css.scss","source.swift","source.objc","source.css.less","source.json.comments","source.json","source.js","text.pug","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.coffee","source.clojure","source.batchfile","source.yaml","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","text.html.basic","source.css","text.html.markdown"]},"source.coffee":{id:"coffee",path:"coffee.tmLanguage.json",embeddedScopes:["source.js"]},"source.cpp":{id:"cpp",path:"cpp.tmLanguage.json",embeddedScopes:["source.c","source.sql","source.glsl"]},"source.crystal":{id:"crystal",path:"crystal.tmLanguage.json",embeddedScopes:["source.shell","source.js","source.c","source.css","source.sql","text.html.basic"]},"source.cs":{id:"csharp",path:"csharp.tmLanguage.json",embeddedScopes:[]},"source.css":{id:"css",path:"css.tmLanguage.json",embeddedScopes:[]},"source.cue":{id:"cue",path:"cue.tmLanguage.json",embeddedScopes:[]},"source.cypher":{id:"cypher",path:"cypher.tmLanguage.json",embeddedScopes:[]},"source.d":{id:"d",path:"d.tmLanguage.json",embeddedScopes:[]},"source.dart":{id:"dart",path:"dart.tmLanguage.json",embeddedScopes:[]},"source.dax":{id:"dax",path:"dax.tmLanguage.json",embeddedScopes:[]},"source.diff":{id:"diff",path:"diff.tmLanguage.json",embeddedScopes:[]},"source.dockerfile":{id:"docker",path:"docker.tmLanguage.json",embeddedScopes:[]},"source.dm":{id:"dream-maker",path:"dream-maker.tmLanguage.json",embeddedScopes:[]},"source.elixir":{id:"elixir",path:"elixir.tmLanguage.json",embeddedScopes:["source.css","source.js","text.html.basic"]},"source.elm":{id:"elm",path:"elm.tmLanguage.json",embeddedScopes:["source.c","source.glsl"]},"text.html.erb":{id:"erb",path:"erb.tmLanguage.json",embeddedScopes:["source.java","source.lua","source.shell","source.c","source.sql","text.xml","source.css","source.js","source.ruby","text.html.basic"]},"source.erlang":{id:"erlang",path:"erlang.tmLanguage.json",embeddedScopes:[]},"source.fish":{id:"fish",path:"fish.tmLanguage.json",embeddedScopes:[]},"source.fsharp":{id:"fsharp",path:"fsharp.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.stylus","source.sass","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.cs","source.tsx","source.ts","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.css.scss","source.swift","source.objc","source.css.less","source.json.comments","source.json","source.js","text.pug","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.coffee","source.clojure","source.batchfile","source.yaml","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","text.html.basic","source.css","text.html.markdown"]},"source.gdresource":{id:"gdresource",path:"gdresource.tmLanguage.json",embeddedScopes:["source.gdscript","source.gdshader"]},"source.gdscript":{id:"gdscript",path:"gdscript.tmLanguage.json",embeddedScopes:[]},"source.gdshader":{id:"gdshader",path:"gdshader.tmLanguage.json",embeddedScopes:[]},"text.gherkin.feature":{id:"gherkin",path:"gherkin.tmLanguage.json",embeddedScopes:[]},"text.git-commit":{id:"git-commit",path:"git-commit.tmLanguage.json",embeddedScopes:["source.diff"]},"text.git-rebase":{id:"git-rebase",path:"git-rebase.tmLanguage.json",embeddedScopes:["source.shell"]},"source.gjs":{id:"glimmer-js",path:"glimmer-js.tmLanguage.json",embeddedScopes:["source.yaml","source.css","text.html.basic","text.html.handlebars","source.js"]},"source.gts":{id:"glimmer-ts",path:"glimmer-ts.tmLanguage.json",embeddedScopes:["source.yaml","source.js","source.css","text.html.basic","text.html.handlebars","source.ts"]},"source.glsl":{id:"glsl",path:"glsl.tmLanguage.json",embeddedScopes:["source.c"]},"source.gnuplot":{id:"gnuplot",path:"gnuplot.tmLanguage.json",embeddedScopes:[]},"source.go":{id:"go",path:"go.tmLanguage.json",embeddedScopes:[]},"source.graphql":{id:"graphql",path:"graphql.tmLanguage.json",embeddedScopes:["source.tsx","source.js.jsx","source.ts","source.js"]},"source.groovy":{id:"groovy",path:"groovy.tmLanguage.json",embeddedScopes:[]},"source.hack":{id:"hack",path:"hack.tmLanguage.json",embeddedScopes:["source.css","source.js","source.sql","text.html.basic"]},"text.haml":{id:"haml",path:"haml.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.stylus","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.tsx","source.ts","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.css.scss","source.swift","source.objc","source.css.less","source.json.comments","source.json","text.pug","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.clojure","source.batchfile","source.yaml","text.xml.xsl","source.asp.vb.net","source.php","source.r","source.perl","source.makefile","source.java","source.ini","source.lua","source.shell","source.c","source.sql","text.xml","text.html.basic","source.css","text.html.markdown","source.coffee","source.sass","source.js","source.ruby"]},"text.html.handlebars":{id:"handlebars",path:"handlebars.tmLanguage.json",embeddedScopes:["source.yaml","source.js","source.css","text.html.basic"]},"source.haskell":{id:"haskell",path:"haskell.tmLanguage.json",embeddedScopes:[]},"source.hcl":{id:"hcl",path:"hcl.tmLanguage.json",embeddedScopes:[]},"source.hjson":{id:"hjson",path:"hjson.tmLanguage.json",embeddedScopes:[]},"source.hlsl":{id:"hlsl",path:"hlsl.tmLanguage.json",embeddedScopes:[]},"text.html.basic":{id:"html",path:"html.tmLanguage.json",embeddedScopes:["source.css","source.js"]},"source.http":{id:"http",path:"http.tmLanguage.json",embeddedScopes:["source.tsx","source.js.jsx","source.ts","source.js","source.java","source.graphql","text.xml","source.json","source.shell"]},"source.imba":{id:"imba",path:"imba.tmLanguage.json",embeddedScopes:[]},"source.ini":{id:"ini",path:"ini.tmLanguage.json",embeddedScopes:[]},"source.java":{id:"java",path:"java.tmLanguage.json",embeddedScopes:[]},"source.js":{id:"javascript",path:"javascript.tmLanguage.json",embeddedScopes:[]},"text.html.jinja":{id:"jinja-html",path:"jinja-html.tmLanguage.json",embeddedScopes:["source.css","source.js","text.html.basic"]},"source.jison":{id:"jison",path:"jison.tmLanguage.json",embeddedScopes:["source.js"]},"source.json":{id:"json",path:"json.tmLanguage.json",embeddedScopes:[]},"source.json5":{id:"json5",path:"json5.tmLanguage.json",embeddedScopes:[]},"source.json.comments":{id:"jsonc",path:"jsonc.tmLanguage.json",embeddedScopes:[]},"source.json.lines":{id:"jsonl",path:"jsonl.tmLanguage.json",embeddedScopes:[]},"source.jsonnet":{id:"jsonnet",path:"jsonnet.tmLanguage.json",embeddedScopes:[]},"source.jssm":{id:"jssm",path:"jssm.tmLanguage.json",embeddedScopes:[]},"source.js.jsx":{id:"jsx",path:"jsx.tmLanguage.json",embeddedScopes:[]},"source.julia":{id:"julia",path:"julia.tmLanguage.json",embeddedScopes:["source.c","source.glsl","source.sql","source.r","source.js","source.python","source.cpp"]},"source.kotlin":{id:"kotlin",path:"kotlin.tmLanguage.json",embeddedScopes:[]},"source.kusto":{id:"kusto",path:"kusto.tmLanguage.json",embeddedScopes:[]},"text.tex.latex":{id:"latex",path:"latex.tmLanguage.json",embeddedScopes:["source.glsl","source.shell","source.sql","source.cpp","source.c","source.r","source.gnuplot","source.scala","source.rust","source.yaml","source.python","source.ts","source.js","source.ruby","source.julia","source.lua","source.java","text.xml","text.html.basic","source.haskell","source.css","text.tex"]},"source.css.less":{id:"less",path:"less.tmLanguage.json",embeddedScopes:["source.css"]},"text.html.liquid":{id:"liquid",path:"liquid.tmLanguage.json",embeddedScopes:["source.js","source.json","source.css","text.html.basic"]},"source.lisp":{id:"lisp",path:"lisp.tmLanguage.json",embeddedScopes:[]},"source.logo":{id:"logo",path:"logo.tmLanguage.json",embeddedScopes:[]},"source.lua":{id:"lua",path:"lua.tmLanguage.json",embeddedScopes:["source.c"]},"source.makefile":{id:"make",path:"make.tmLanguage.json",embeddedScopes:[]},"text.html.markdown":{id:"markdown",path:"markdown.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.stylus","source.sass","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.tsx","source.ts","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.css.scss","source.swift","source.objc","source.css.less","source.json.comments","source.json","source.js","text.pug","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.coffee","source.clojure","source.batchfile","source.yaml","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","text.html.basic","source.css"]},"text.marko":{id:"marko",path:"marko.tmLanguage.json",embeddedScopes:["source.js","source.css.scss","source.css.less","source.css"]},"source.matlab":{id:"matlab",path:"matlab.tmLanguage.json",embeddedScopes:[]},"source.mdx":{id:"mdx",path:"mdx.tmLanguage.json",embeddedScopes:["source.gnuplot","text.tex","source.stylus","source.sass","text.bibtex","text.tex.latex","text.html.handlebars","source.dart","source.fsharp","source.powershell","source.perl.6","source.json.comments","text.pug","source.groovy","text.git-rebase","text.git-commit","source.batchfile","text.xml.xsl","source.asp.vb.net","source.php","source.js.jsx","source.glsl","source.ts","source.swift","text.xml","source.sql","text.shell-session","source.shell","source.css.scss","source.scala","source.rust","source.ruby","source.r","source.python","source.perl","source.objc","text.html.markdown","source.makefile","source.lua","source.css.less","source.kotlin","source.julia","source.json","source.js","source.java","source.ini","text.html.basic","source.haskell","source.graphql","source.go","source.erlang","source.elm","source.elixir","source.dockerfile","source.diff","source.css","source.cs","source.cpp","source.coffee","source.clojure","source.c","source.yaml","source.toml","source.tsx"]},"source.mermaid":{id:"mermaid",path:"mermaid.tmLanguage.json",embeddedScopes:[]},"source.narrat":{id:"narrat",path:"narrat.tmLanguage.json",embeddedScopes:[]},"source.nextflow":{id:"nextflow",path:"nextflow.tmLanguage.json",embeddedScopes:[]},"source.nginx":{id:"nginx",path:"nginx.tmLanguage.json",embeddedScopes:["source.c","source.lua"]},"source.nim":{id:"nim",path:"nim.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.stylus","source.sass","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.tsx","source.ts","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.css.scss","source.swift","source.objc","source.css.less","source.json.comments","source.json","text.pug","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.coffee","source.clojure","source.batchfile","source.yaml","text.xml.xsl","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.ini","source.java","text.html.markdown","source.glsl","source.css","source.js","text.xml","text.html.basic","source.c"]},"source.nix":{id:"nix",path:"nix.tmLanguage.json",embeddedScopes:[]},"source.objc":{id:"objective-c",path:"objective-c.tmLanguage.json",embeddedScopes:[]},"source.objcpp":{id:"objective-cpp",path:"objective-cpp.tmLanguage.json",embeddedScopes:[]},"source.ocaml":{id:"ocaml",path:"ocaml.tmLanguage.json",embeddedScopes:[]},"source.pascal":{id:"pascal",path:"pascal.tmLanguage.json",embeddedScopes:[]},"source.perl":{id:"perl",path:"perl.tmLanguage.json",embeddedScopes:["source.java","source.sql","source.js","source.css","text.xml","text.html.basic"]},"source.php":{id:"php",path:"php.tmLanguage.json",embeddedScopes:["source.java","source.css","source.json","source.js","source.sql","text.xml","text.html.basic"]},"source.plsql.oracle":{id:"plsql",path:"plsql.tmLanguage.json",embeddedScopes:[]},"source.css.postcss":{id:"postcss",path:"postcss.tmLanguage.json",embeddedScopes:[]},"source.powerquery":{id:"powerquery",path:"powerquery.tmLanguage.json",embeddedScopes:[]},"source.powershell":{id:"powershell",path:"powershell.tmLanguage.json",embeddedScopes:[]},"source.prisma":{id:"prisma",path:"prisma.tmLanguage.json",embeddedScopes:[]},"source.prolog":{id:"prolog",path:"prolog.tmLanguage.json",embeddedScopes:[]},"source.proto":{id:"proto",path:"proto.tmLanguage.json",embeddedScopes:[]},"text.pug":{id:"pug",path:"pug.tmLanguage.json",embeddedScopes:["text.html.basic","source.coffee","source.stylus","source.css.scss","source.sass","source.css","source.js"]},"source.puppet":{id:"puppet",path:"puppet.tmLanguage.json",embeddedScopes:[]},"source.purescript":{id:"purescript",path:"purescript.tmLanguage.json",embeddedScopes:[]},"source.python":{id:"python",path:"python.tmLanguage.json",embeddedScopes:[]},"source.r":{id:"r",path:"r.tmLanguage.json",embeddedScopes:[]},"source.perl.6":{id:"raku",path:"raku.tmLanguage.json",embeddedScopes:[]},"text.aspnetcorerazor":{id:"razor",path:"razor.tmLanguage.json",embeddedScopes:["source.css","source.js","source.cs","text.html.basic"]},"source.reg":{id:"reg",path:"reg.tmLanguage.json",embeddedScopes:[]},"source.rel":{id:"rel",path:"rel.tmLanguage.json",embeddedScopes:[]},"source.riscv":{id:"riscv",path:"riscv.tmLanguage.json",embeddedScopes:[]},"source.rst":{id:"rst",path:"rst.tmLanguage.json",embeddedScopes:["source.java","source.lua","source.c","source.css","text.xml","text.html.basic","source.sql","source.glsl","source.ruby","source.cmake","source.yaml","source.shell","source.js","source.python","source.cpp"]},"source.ruby":{id:"ruby",path:"ruby.tmLanguage.json",embeddedScopes:["source.java","source.lua","source.shell","source.js","source.c","source.css","source.sql","text.xml","text.html.basic"]},"source.rust":{id:"rust",path:"rust.tmLanguage.json",embeddedScopes:[]},"source.sas":{id:"sas",path:"sas.tmLanguage.json",embeddedScopes:["source.sql"]},"source.sass":{id:"sass",path:"sass.tmLanguage.json",embeddedScopes:[]},"source.scala":{id:"scala",path:"scala.tmLanguage.json",embeddedScopes:[]},"source.scheme":{id:"scheme",path:"scheme.tmLanguage.json",embeddedScopes:[]},"source.css.scss":{id:"scss",path:"scss.tmLanguage.json",embeddedScopes:["source.css"]},"source.shaderlab":{id:"shaderlab",path:"shaderlab.tmLanguage.json",embeddedScopes:["source.hlsl"]},"source.shell":{id:"shellscript",path:"shellscript.tmLanguage.json",embeddedScopes:[]},"text.shell-session":{id:"shellsession",path:"shellsession.tmLanguage.json",embeddedScopes:["source.shell"]},"source.smalltalk":{id:"smalltalk",path:"smalltalk.tmLanguage.json",embeddedScopes:[]},"source.solidity":{id:"solidity",path:"solidity.tmLanguage.json",embeddedScopes:[]},"source.sparql":{id:"sparql",path:"sparql.tmLanguage.json",embeddedScopes:["source.turtle"]},"source.sql":{id:"sql",path:"sql.tmLanguage.json",embeddedScopes:[]},"source.ssh-config":{id:"ssh-config",path:"ssh-config.tmLanguage.json",embeddedScopes:[]},"source.stata":{id:"stata",path:"stata.tmLanguage.json",embeddedScopes:["source.sql"]},"source.stylus":{id:"stylus",path:"stylus.tmLanguage.json",embeddedScopes:[]},"source.svelte":{id:"svelte",path:"svelte.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.tsx","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.swift","source.objc","source.json.comments","source.json","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.clojure","source.batchfile","source.yaml","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","text.html.basic","text.html.markdown","text.pug","source.css.postcss","source.css.less","source.css.scss","source.css","source.sass","source.stylus","source.coffee","source.ts","source.js"]},"source.swift":{id:"swift",path:"swift.tmLanguage.json",embeddedScopes:[]},"source.systemverilog":{id:"system-verilog",path:"system-verilog.tmLanguage.json",embeddedScopes:[]},"source.tasl":{id:"tasl",path:"tasl.tmLanguage.json",embeddedScopes:[]},"source.tcl":{id:"tcl",path:"tcl.tmLanguage.json",embeddedScopes:[]},"text.tex":{id:"tex",path:"tex.tmLanguage.json",embeddedScopes:["source.r"]},"source.toml":{id:"toml",path:"toml.tmLanguage.json",embeddedScopes:[]},"source.tsx":{id:"tsx",path:"tsx.tmLanguage.json",embeddedScopes:[]},"source.turtle":{id:"turtle",path:"turtle.tmLanguage.json",embeddedScopes:[]},"text.html.twig":{id:"twig",path:"twig.tmLanguage.json",embeddedScopes:["source.java","source.lua","source.shell","source.c","source.json","source.sql","text.xml","text.html.basic","source.ruby","source.python","source.php","source.js","source.css"]},"source.txt":{id:"txt",path:"txt.tmLanguage.json",embeddedScopes:[]},"source.ts":{id:"typescript",path:"typescript.tmLanguage.json",embeddedScopes:[]},"source.v":{id:"v",path:"v.tmLanguage.json",embeddedScopes:[]},"source.asp.vb.net":{id:"vb",path:"vb.tmLanguage.json",embeddedScopes:[]},"source.verilog":{id:"verilog",path:"verilog.tmLanguage.json",embeddedScopes:[]},"source.vhdl":{id:"vhdl",path:"vhdl.tmLanguage.json",embeddedScopes:[]},"source.viml":{id:"viml",path:"viml.tmLanguage.json",embeddedScopes:[]},"text.html.vue-html":{id:"vue-html",path:"vue-html.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.swift","source.objc","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.coffee","source.clojure","source.batchfile","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","source.graphql","source.toml","source.yaml","source.json5","source.json.comments","source.json","source.tsx","source.js.jsx","source.ts","source.css.less","source.css.scss","source.css","source.sass","source.stylus","text.pug","text.html.markdown","text.html.basic","source.js","source.vue"]},"source.vue":{id:"vue",path:"vue.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.swift","source.objc","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.coffee","source.clojure","source.batchfile","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","source.graphql","source.toml","source.yaml","source.json5","source.json.comments","source.json","source.tsx","source.js.jsx","source.ts","source.js","source.css.less","source.css.scss","source.css","source.sass","source.stylus","text.pug","text.html.markdown","text.html.basic"]},"source.vyper":{id:"vyper",path:"vyper.tmLanguage.json",embeddedScopes:[]},"source.wat":{id:"wasm",path:"wasm.tmLanguage.json",embeddedScopes:[]},"source.wenyan":{id:"wenyan",path:"wenyan.tmLanguage.json",embeddedScopes:[]},"source.wgsl":{id:"wgsl",path:"wgsl.tmLanguage.json",embeddedScopes:[]},"source.wolfram":{id:"wolfram",path:"wolfram.tmLanguage.json",embeddedScopes:[]},"text.xml":{id:"xml",path:"xml.tmLanguage.json",embeddedScopes:["source.java"]},"text.xml.xsl":{id:"xsl",path:"xsl.tmLanguage.json",embeddedScopes:["source.java","text.xml"]},"source.yaml":{id:"yaml",path:"yaml.tmLanguage.json",embeddedScopes:[]},"source.zenscript":{id:"zenscript",path:"zenscript.tmLanguage.json",embeddedScopes:[]}};var N={d:(A,B)=>{for(var Q in B)N.o(B,Q)&&!N.o(A,Q)&&Object.defineProperty(A,Q,{enumerable:!0,get:B[Q]})},o:(A,B)=>Object.prototype.hasOwnProperty.call(A,B)},L={};N.d(L,{_X:()=>vA,Bz:()=>XA,ot:()=>TA,u:()=>WA,jG:()=>Y,Pn:()=>ZA});const H="undefined"!=typeof process&&!!process.env.VSCODE_TEXTMATE_DEBUG;var k;function R(A,B){const Q=[],g=function(A){let B=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,Q=B.exec(A);return{next:()=>{if(!Q)return null;const g=Q[0];return Q=B.exec(A),g}}}(A);let E=g.next();for(;null!==E;){let A=0;if(2===E.length&&":"===E.charAt(1)){switch(E.charAt(0)){case"R":A=1;break;case"L":A=-1;break;default:console.log(`Unknown priority ${E} in scope selector`)}E=g.next()}let B=I();if(Q.push({matcher:B,priority:A}),","!==E)break;E=g.next()}return Q;function C(){if("-"===E){E=g.next();const A=C();return B=>!!A&&!A(B)}if("("===E){E=g.next();const A=function(){const A=[];let B=I();for(;B&&(A.push(B),"|"===E||","===E);){do{E=g.next()}while("|"===E||","===E);B=I()}return B=>A.some((A=>A(B)))}();return")"===E&&(E=g.next()),A}if(K(E)){const A=[];do{A.push(E),E=g.next()}while(K(E));return Q=>B(A,Q)}return null}function I(){const A=[];let B=C();for(;B;)A.push(B),B=C();return B=>A.every((A=>A(B)))}}function K(A){return!!A&&!!A.match(/[\w\.:]+/)}function Y(A){"function"==typeof A.dispose&&A.dispose()}function U(A){return Array.isArray(A)?function(A){let B=[];for(let Q=0,g=A.length;Q{for(let Q in B)A[Q]=B[Q]})),A}function u(A){const B=~A.lastIndexOf("/")||~A.lastIndexOf("\\");return 0===B?A:~B==A.length-1?u(A.substring(0,A.length-1)):A.substr(1+~B)}!function(A){A.toBinaryStr=function(A){let B=A.toString(2);for(;B.length<32;)B="0"+B;return B},A.print=function(B){const Q=A.getLanguageId(B),g=A.getTokenType(B),E=A.getFontStyle(B),C=A.getForeground(B),I=A.getBackground(B);console.log({languageId:Q,tokenType:g,fontStyle:E,foreground:C,background:I})},A.getLanguageId=function(A){return(255&A)>>>0},A.getTokenType=function(A){return(768&A)>>>8},A.containsBalancedBrackets=function(A){return 0!=(1024&A)},A.getFontStyle=function(A){return(30720&A)>>>11},A.getForeground=function(A){return(16744448&A)>>>15},A.getBackground=function(A){return(4278190080&A)>>>24},A.set=function(B,Q,g,E,C,I,D){let w=A.getLanguageId(B),o=A.getTokenType(B),s=A.containsBalancedBrackets(B)?1:0,e=A.getFontStyle(B),c=A.getForeground(B),i=A.getBackground(B);return 0!==Q&&(w=Q),8!==g&&(o=g),null!==E&&(s=E?1:0),-1!==C&&(e=C),0!==I&&(c=I),0!==D&&(i=D),(w<<0|o<<8|s<<10|e<<11|c<<15|i<<24)>>>0}}(k||(k={}));let y=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g;class J{static hasCaptures(A){return null!==A&&(y.lastIndex=0,y.test(A))}static replaceCaptures(A,B,Q){return A.replace(y,((A,g,E,C)=>{let I=Q[parseInt(g||E,10)];if(!I)return A;{let A=B.substring(I.start,I.end);for(;"."===A[0];)A=A.substring(1);switch(C){case"downcase":return A.toLowerCase();case"upcase":return A.toUpperCase();default:return A}}}))}}function S(A,B){return AB?1:0}function p(A,B){if(null===A&&null===B)return 0;if(!A)return-1;if(!B)return 1;let Q=A.length,g=B.length;if(Q===g){for(let g=0;g`);return}const C=Q.lookup(B);A instanceof m?X({baseGrammar:C,selfGrammar:E},g):T(A.ruleName,{baseGrammar:C,selfGrammar:E,repository:E.repository},g);const I=Q.injections(A.scopeName);if(I)for(const A of I)g.add(new m(A))}function T(A,B,Q){B.repository&&B.repository[A]&&v([B.repository[A]],B,Q)}function X(A,B){A.selfGrammar.patterns&&Array.isArray(A.selfGrammar.patterns)&&v(A.selfGrammar.patterns,{...A,repository:A.selfGrammar.repository},B),A.selfGrammar.injections&&v(Object.values(A.selfGrammar.injections),{...A,repository:A.selfGrammar.repository},B)}function v(A,B,Q){for(const g of A){if(Q.visitedRule.has(g))continue;Q.visitedRule.add(g);const A=g.repository?P({},B.repository,g.repository):B.repository;Array.isArray(g.patterns)&&v(g.patterns,{...B,repository:A},Q);const E=g.include;if(!E)continue;const C=$(E);switch(C.kind){case 0:X({...B,selfGrammar:B.baseGrammar},Q);break;case 1:X(B,Q);break;case 2:T(C.ruleName,{...B,repository:A},Q);break;case 3:case 4:const g=C.scopeName===B.selfGrammar.scopeName?B.selfGrammar:C.scopeName===B.baseGrammar.scopeName?B.baseGrammar:void 0;if(g){const E={baseGrammar:B.baseGrammar,selfGrammar:g,repository:A};4===C.kind?T(C.ruleName,E,Q):X(E,Q)}else 4===C.kind?Q.add(new O(C.scopeName,C.ruleName)):Q.add(new m(C.scopeName))}}}class Z{constructor(){this.kind=0}}class j{constructor(){this.kind=1}}class V{constructor(A){this.ruleName=A,this.kind=2}}class z{constructor(A){this.scopeName=A,this.kind=3}}class _{constructor(A,B){this.scopeName=A,this.ruleName=B,this.kind=4}}function $(A){if("$base"===A)return new Z;if("$self"===A)return new j;const B=A.indexOf("#");if(-1===B)return new z(A);if(0===B)return new V(A.substring(1));{const Q=A.substring(0,B),g=A.substring(B+1);return new _(Q,g)}}const AA=/\\(\d+)/,BA=/\\(\d+)/g;class QA{constructor(A,B,Q,g){this.$location=A,this.id=B,this._name=Q||null,this._nameIsCapturing=J.hasCaptures(this._name),this._contentName=g||null,this._contentNameIsCapturing=J.hasCaptures(this._contentName)}get debugName(){const A=this.$location?`${u(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${A}`}getName(A,B){return this._nameIsCapturing&&null!==this._name&&null!==A&&null!==B?J.replaceCaptures(this._name,A,B):this._name}getContentName(A,B){return this._contentNameIsCapturing&&null!==this._contentName?J.replaceCaptures(this._contentName,A,B):this._contentName}}class gA extends QA{constructor(A,B,Q,g,E){super(A,B,Q,g),this.retokenizeCapturedWithRuleId=E}dispose(){}collectPatterns(A,B){throw new Error("Not supported!")}compile(A,B){throw new Error("Not supported!")}compileAG(A,B,Q,g){throw new Error("Not supported!")}}class EA extends QA{constructor(A,B,Q,g,E){super(A,B,Q,null),this._match=new oA(g,this.id),this.captures=E,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(A,B){B.push(this._match)}compile(A,B){return this._getCachedCompiledPatterns(A).compile(A)}compileAG(A,B,Q,g){return this._getCachedCompiledPatterns(A).compileAG(A,Q,g)}_getCachedCompiledPatterns(A){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new sA,this.collectPatterns(A,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}}class CA extends QA{constructor(A,B,Q,g,E){super(A,B,Q,g),this.patterns=E.patterns,this.hasMissingPatterns=E.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(A,B){for(const Q of this.patterns)A.getRule(Q).collectPatterns(A,B)}compile(A,B){return this._getCachedCompiledPatterns(A).compile(A)}compileAG(A,B,Q,g){return this._getCachedCompiledPatterns(A).compileAG(A,Q,g)}_getCachedCompiledPatterns(A){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new sA,this.collectPatterns(A,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}}class IA extends QA{constructor(A,B,Q,g,E,C,I,D,w,o){super(A,B,Q,g),this._begin=new oA(E,this.id),this.beginCaptures=C,this._end=new oA(I||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=D,this.applyEndPatternLast=w||!1,this.patterns=o.patterns,this.hasMissingPatterns=o.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(A,B){return this._end.resolveBackReferences(A,B)}collectPatterns(A,B){B.push(this._begin)}compile(A,B){return this._getCachedCompiledPatterns(A,B).compile(A)}compileAG(A,B,Q,g){return this._getCachedCompiledPatterns(A,B).compileAG(A,Q,g)}_getCachedCompiledPatterns(A,B){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new sA;for(const B of this.patterns)A.getRule(B).collectPatterns(A,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,B):this._cachedCompiledPatterns.setSource(0,B)),this._cachedCompiledPatterns}}class DA extends QA{constructor(A,B,Q,g,E,C,I,D,w){super(A,B,Q,g),this._begin=new oA(E,this.id),this.beginCaptures=C,this.whileCaptures=D,this._while=new oA(I,-2),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=w.patterns,this.hasMissingPatterns=w.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(A,B){return this._while.resolveBackReferences(A,B)}collectPatterns(A,B){B.push(this._begin)}compile(A,B){return this._getCachedCompiledPatterns(A).compile(A)}compileAG(A,B,Q,g){return this._getCachedCompiledPatterns(A).compileAG(A,Q,g)}_getCachedCompiledPatterns(A){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new sA;for(const B of this.patterns)A.getRule(B).collectPatterns(A,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(A,B){return this._getCachedCompiledWhilePatterns(A,B).compile(A)}compileWhileAG(A,B,Q,g){return this._getCachedCompiledWhilePatterns(A,B).compileAG(A,Q,g)}_getCachedCompiledWhilePatterns(A,B){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new sA,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,B||"￿"),this._cachedCompiledWhilePatterns}}class wA{static createCaptureRule(A,B,Q,g,E){return A.registerRule((A=>new gA(B,A,Q,g,E)))}static getCompiledRuleId(A,B,Q){return A.id||B.registerRule((g=>{if(A.id=g,A.match)return new EA(A.$vscodeTextmateLocation,A.id,A.name,A.match,wA._compileCaptures(A.captures,B,Q));if(void 0===A.begin){A.repository&&(Q=P({},Q,A.repository));let g=A.patterns;return void 0===g&&A.include&&(g=[{include:A.include}]),new CA(A.$vscodeTextmateLocation,A.id,A.name,A.contentName,wA._compilePatterns(g,B,Q))}return A.while?new DA(A.$vscodeTextmateLocation,A.id,A.name,A.contentName,A.begin,wA._compileCaptures(A.beginCaptures||A.captures,B,Q),A.while,wA._compileCaptures(A.whileCaptures||A.captures,B,Q),wA._compilePatterns(A.patterns,B,Q)):new IA(A.$vscodeTextmateLocation,A.id,A.name,A.contentName,A.begin,wA._compileCaptures(A.beginCaptures||A.captures,B,Q),A.end,wA._compileCaptures(A.endCaptures||A.captures,B,Q),A.applyEndPatternLast,wA._compilePatterns(A.patterns,B,Q))})),A.id}static _compileCaptures(A,B,Q){let g=[];if(A){let E=0;for(const B in A){if("$vscodeTextmateLocation"===B)continue;const A=parseInt(B,10);A>E&&(E=A)}for(let A=0;A<=E;A++)g[A]=null;for(const E in A){if("$vscodeTextmateLocation"===E)continue;const C=parseInt(E,10);let I=0;A[E].patterns&&(I=wA.getCompiledRuleId(A[E],B,Q)),g[C]=wA.createCaptureRule(B,A[E].$vscodeTextmateLocation,A[E].name,A[E].contentName,I)}}return g}static _compilePatterns(A,B,Q){let g=[];if(A)for(let E=0,C=A.length;EA.substring(B.start,B.end)));return BA.lastIndex=0,this.source.replace(BA,((A,B)=>d(Q[parseInt(B,10)]||"")))}_buildAnchorCache(){let A,B,Q,g,E=[],C=[],I=[],D=[];for(A=0,B=this.source.length;AA.source));this._cached=new eA(A,B,this._items.map((A=>A.ruleId)))}return this._cached}compileAG(A,B,Q){return this._hasAnchors?B?Q?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(A,B,Q)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(A,B,Q)),this._anchorCache.A1_G0):Q?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(A,B,Q)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(A,B,Q)),this._anchorCache.A0_G0):this.compile(A)}_resolveAnchors(A,B,Q){let g=this._items.map((A=>A.resolveAnchors(B,Q)));return new eA(A,g,this._items.map((A=>A.ruleId)))}}class eA{constructor(A,B,Q){this.regExps=B,this.rules=Q,this.scanner=A.createOnigScanner(B)}dispose(){"function"==typeof this.scanner.dispose&&this.scanner.dispose()}toString(){const A=[];for(let B=0,Q=this.rules.length;Bthis._root.match(A)))}static createFromRawTheme(A,B){return this.createFromParsedTheme(function(A){if(!A)return[];if(!A.settings||!Array.isArray(A.settings))return[];let B=A.settings,Q=[],g=0;for(let A=0,E=B.length;A1&&(s=C.slice(0,C.length-1),s.reverse()),Q[g++]=new hA(o,s,A,I,D,w)}}return Q}(A),B)}static createFromParsedTheme(A,B){return function(A,B){A.sort(((A,B)=>{let Q=S(A.scope,B.scope);return 0!==Q?Q:(Q=p(A.parentScopes,B.parentScopes),0!==Q?Q:A.index-B.index)}));let Q=0,g="#000000",E="#ffffff";for(;A.length>=1&&""===A[0].scope;){let B=A.shift();-1!==B.fontStyle&&(Q=B.fontStyle),null!==B.foreground&&(g=B.foreground),null!==B.background&&(E=B.background)}let C=new aA(B),I=new MA(Q,C.getId(g),C.getId(E)),D=new FA(new nA(0,null,-1,0,0),[]);for(let B=0,Q=A.length;Bfunction(A,B){if(null===B)return!0;let Q=0,g=B[Q];for(;A;){if(tA(A.scopeName,g)){if(Q++,Q===B.length)return!0;g=B[Q]}A=A.parent}return!1}(A.parent,B.parentScopes)));return Q?new MA(Q.fontStyle,Q.foreground,Q.background):null}}class iA{constructor(A,B){this.parent=A,this.scopeName=B}static push(A,B){for(const Q of B)A=new iA(A,Q);return A}static from(...A){let B=null;for(let Q=0;QA?console.log("how did this happen?"):this.scopeDepth=A,-1!==B&&(this.fontStyle=B),0!==Q&&(this.foreground=Q),0!==g&&(this.background=g)}}class FA{constructor(A,B=[],Q={}){this._mainRule=A,this._children=Q,this._rulesWithParentScopes=B}static _sortBySpecificity(A){return 1===A.length||A.sort(this._cmpBySpecificity),A}static _cmpBySpecificity(A,B){if(A.scopeDepth===B.scopeDepth){const Q=A.parentScopes,g=B.parentScopes;let E=null===Q?0:Q.length,C=null===g?0:g.length;if(E===C)for(let A=0;A{const B=this._scopeToLanguage(A),Q=this._toStandardTokenType(A);return new GA(B,Q)})),this._defaultAttributes=new GA(A,8),this._embeddedLanguagesMatcher=new NA(Object.entries(B||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(A){return null===A?rA._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(A)}_scopeToLanguage(A){return this._embeddedLanguagesMatcher.match(A)||0}_toStandardTokenType(A){const B=A.match(rA.STANDARD_TOKEN_TYPE_REGEXP);if(!B)return 8;switch(B[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}}rA._NULL_SCOPE_METADATA=new GA(0,0),rA.STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/;class NA{constructor(A){if(0===A.length)this.values=null,this.scopesRegExp=null;else{this.values=new Map(A);const B=A.map((([A,B])=>d(A)));B.sort(),B.reverse(),this.scopesRegExp=new RegExp(`^((${B.join(")|(")}))($|\\.)`,"")}}match(A){if(!this.scopesRegExp)return;const B=A.match(this.scopesRegExp);return B?this.values.get(B[1]):void 0}}class LA{constructor(A,B){this.stack=A,this.stoppedEarly=B}}function HA(A,B,Q,g,E,C,I,D){const w=B.content.length;let o=!1,s=-1;if(I){const I=function(A,B,Q,g,E,C){let I=E.beginRuleCapturedEOL?0:-1;const D=[];for(let B=E;B;B=B.pop()){const Q=B.getRule(A);Q instanceof DA&&D.push({rule:Q,stack:B})}for(let w=D.pop();w;w=D.pop()){const{ruleScanner:D,findOptions:o}=RA(w.rule,A,w.stack.endRule,Q,g===I),s=D.findNextMatchSync(B,g,o);if(H&&(console.log(" scanning for while rule"),console.log(D.toString())),!s){H&&console.log(" popping "+w.rule.debugName+" - "+w.rule.debugWhileRegExp),E=w.stack.pop();break}if(-2!==s.ruleId){E=w.stack.pop();break}s.captureIndices&&s.captureIndices.length&&(C.produce(w.stack,s.captureIndices[0].start),KA(A,B,Q,w.stack,C,w.rule.whileCaptures,s.captureIndices),C.produce(w.stack,s.captureIndices[0].end),I=s.captureIndices[0].end,s.captureIndices[0].end>g&&(g=s.captureIndices[0].end,Q=!1))}return{stack:E,linePos:g,anchorPosition:I,isFirstLine:Q}}(A,B,Q,g,E,C);E=I.stack,g=I.linePos,Q=I.isFirstLine,s=I.anchorPosition}const e=Date.now();for(;!o;){if(0!==D&&Date.now()-e>D)return new LA(E,!0);c()}return new LA(E,!1);function c(){H&&(console.log(""),console.log(`@@scanNext ${g}: |${B.content.substr(g).replace(/\n$/,"\\n")}|`));const I=function(A,B,Q,g,E,C){const I=function(A,B,Q,g,E,C){const I=E.getRule(A),{ruleScanner:D,findOptions:w}=kA(I,A,E.endRule,Q,g===C);let o=0;H&&(o=x());const s=D.findNextMatchSync(B,g,w);if(H){const A=x()-o;A>5&&console.warn(`Rule ${I.debugName} (${I.id}) matching took ${A} against '${B}'`),console.log(` scanning for (linePos: ${g}, anchorPosition: ${C})`),console.log(D.toString()),s&&console.log(`matched rule id: ${s.ruleId} from ${s.captureIndices[0].start} to ${s.captureIndices[0].end}`)}return s?{captureIndices:s.captureIndices,matchedRuleId:s.ruleId}:null}(A,B,Q,g,E,C),D=A.getInjections();if(0===D.length)return I;const w=function(A,B,Q,g,E,C,I){let D,w=Number.MAX_VALUE,o=null,s=0;const e=C.contentNameScopesList.getScopeNames();for(let C=0,c=A.length;C=w)&&(w=a,o=h.captureIndices,D=h.ruleId,s=c.priority,w===E))break}return o?{priorityMatch:-1===s,captureIndices:o,matchedRuleId:D}:null}(D,A,B,Q,g,E,C);if(!w)return I;if(!I)return w;const o=I.captureIndices[0].start,s=w.captureIndices[0].start;return s0)&&D[0].end>g;if(-1===e){const I=E.getRule(A);H&&console.log(" popping "+I.debugName+" - "+I.debugEndRegExp),C.produce(E,D[0].start),E=E.withContentNameScopesList(E.nameScopesList),KA(A,B,Q,E,C,I.endCaptures,D),C.produce(E,D[0].end);const e=E;if(E=E.parent,s=e.getAnchorPos(),!c&&e.getEnterPos()===g)return H&&console.error("[1] - Grammar is in an endless loop - Grammar pushed & popped a rule without advancing"),E=e,C.produce(E,w),void(o=!0)}else{const I=A.getRule(e);C.produce(E,D[0].start);const i=E,t=I.getName(B.content,D),M=E.contentNameScopesList.pushAttributed(t,A);if(E=E.push(e,g,s,D[0].end===w,null,M,M),I instanceof IA){const g=I;H&&console.log(" pushing "+g.debugName+" - "+g.debugBeginRegExp),KA(A,B,Q,E,C,g.beginCaptures,D),C.produce(E,D[0].end),s=D[0].end;const e=g.getContentName(B.content,D),t=M.pushAttributed(e,A);if(E=E.withContentNameScopesList(t),g.endHasBackReferences&&(E=E.withEndRule(g.getEndWithResolvedBackReferences(B.content,D))),!c&&i.hasSameRuleAs(E))return H&&console.error("[2] - Grammar is in an endless loop - Grammar pushed the same rule without advancing"),E=E.pop(),C.produce(E,w),void(o=!0)}else if(I instanceof DA){const g=I;H&&console.log(" pushing "+g.debugName),KA(A,B,Q,E,C,g.beginCaptures,D),C.produce(E,D[0].end),s=D[0].end;const e=g.getContentName(B.content,D),t=M.pushAttributed(e,A);if(E=E.withContentNameScopesList(t),g.whileHasBackReferences&&(E=E.withEndRule(g.getWhileWithResolvedBackReferences(B.content,D))),!c&&i.hasSameRuleAs(E))return H&&console.error("[3] - Grammar is in an endless loop - Grammar pushed the same rule without advancing"),E=E.pop(),C.produce(E,w),void(o=!0)}else{const g=I;if(H&&console.log(" matched "+g.debugName+" - "+g.debugMatchRegExp),KA(A,B,Q,E,C,g.captures,D),C.produce(E,D[0].end),E=E.pop(),!c)return H&&console.error("[4] - Grammar is in an endless loop - Grammar is not advancing, nor is it pushing/popping"),E=E.safePop(),C.produce(E,w),void(o=!0)}}D[0].end>g&&(g=D[0].end,Q=!1)}}function kA(A,B,Q,g,E){return{ruleScanner:A.compileAG(B,Q,g,E),findOptions:0}}function RA(A,B,Q,g,E){return{ruleScanner:A.compileWhileAG(B,Q,g,E),findOptions:0}}function KA(A,B,Q,g,E,C,I){if(0===C.length)return;const D=B.content,w=Math.min(C.length,I.length),o=[],s=I[0].end;for(let B=0;Bs)break;for(;o.length>0&&o[o.length-1].endPos<=e.start;)E.produceFromScopes(o[o.length-1].scopes,o[o.length-1].endPos),o.pop();if(o.length>0?E.produceFromScopes(o[o.length-1].scopes,e.start):E.produce(g,e.start),w.retokenizeCapturedWithRuleId){const B=w.getName(D,I),C=g.contentNameScopesList.pushAttributed(B,A),o=w.getContentName(D,I),s=C.pushAttributed(o,A),c=g.push(w.retokenizeCapturedWithRuleId,e.start,-1,!1,null,C,s),i=A.createOnigString(D.substring(0,e.end));HA(A,i,Q&&0===e.start,e.start,c,E,!1,0),Y(i);continue}const c=w.getName(D,I);if(null!==c){const B=(o.length>0?o[o.length-1].scopes:g.contentNameScopesList).pushAttributed(c,A);o.push(new YA(B,e.end))}}for(;o.length>0;)E.produceFromScopes(o[o.length-1].scopes,o[o.length-1].endPos),o.pop()}class YA{constructor(A,B){this.scopes=A,this.endPos=B}}function UA(A,B,Q,g,E){const C=R(B,PA),I=wA.getCompiledRuleId(Q,g,E.repository);for(const Q of C)A.push({debugSelector:B,matcher:Q.matcher,ruleId:I,grammar:E,priority:Q.priority})}function PA(A,B){if(B.length{for(let g=Q;gQ&&A.substr(0,Q)===B&&"."===A[Q]}class yA{constructor(A,B,Q,g,E,C,I,D){if(this._rootScopeName=A,this.balancedBracketSelectors=C,this._onigLib=D,this._basicScopeAttributesProvider=new rA(Q,g),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=I,this._grammar=JA(B,null),this._injections=null,this._tokenTypeMatchers=[],E)for(const A of Object.keys(E)){const B=R(A,PA);for(const Q of B)this._tokenTypeMatchers.push({matcher:Q.matcher,type:E[A]})}}get themeProvider(){return this._grammarRepository}dispose(){for(const A of this._ruleId2desc)A&&A.dispose()}createOnigScanner(A){return this._onigLib.createOnigScanner(A)}createOnigString(A){return this._onigLib.createOnigString(A)}getMetadataForScope(A){return this._basicScopeAttributesProvider.getBasicScopeAttributes(A)}_collectInjections(){const A=[],B=this._rootScopeName,Q=(A=>A===this._rootScopeName?this._grammar:this.getExternalGrammar(A))(B);if(Q){const g=Q.injections;if(g)for(let B in g)UA(A,B,g[B],this,Q);const E=this._grammarRepository.injections(B);E&&E.forEach((B=>{const Q=this.getExternalGrammar(B);if(Q){const B=Q.injectionSelector;B&&UA(A,B,Q,this,Q)}}))}return A.sort(((A,B)=>A.priority-B.priority)),A}getInjections(){if(null===this._injections&&(this._injections=this._collectInjections(),H&&this._injections.length>0)){console.log(`Grammar ${this._rootScopeName} contains the following injections:`);for(const A of this._injections)console.log(` - ${A.debugSelector}`)}return this._injections}registerRule(A){const B=++this._lastRuleId,Q=A(B);return this._ruleId2desc[B]=Q,Q}getRule(A){return this._ruleId2desc[A]}getExternalGrammar(A,B){if(this._includedGrammars[A])return this._includedGrammars[A];if(this._grammarRepository){const Q=this._grammarRepository.lookup(A);if(Q)return this._includedGrammars[A]=JA(Q,B&&B.$base),this._includedGrammars[A]}}tokenizeLine(A,B,Q=0){const g=this._tokenize(A,B,!1,Q);return{tokens:g.lineTokens.getResult(g.ruleStack,g.lineLength),ruleStack:g.ruleStack,stoppedEarly:g.stoppedEarly}}tokenizeLine2(A,B,Q=0){const g=this._tokenize(A,B,!0,Q);return{tokens:g.lineTokens.getBinaryResult(g.ruleStack,g.lineLength),ruleStack:g.ruleStack,stoppedEarly:g.stoppedEarly}}_tokenize(A,B,Q,g){let E;if(-1===this._rootId&&(this._rootId=wA.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections()),B&&B!==pA.NULL)E=!1,B.reset();else{E=!0;const A=this._basicScopeAttributesProvider.getDefaultAttributes(),Q=this.themeProvider.getDefaults(),g=k.set(0,A.languageId,A.tokenType,null,Q.fontStyle,Q.foregroundId,Q.backgroundId),C=this.getRule(this._rootId).getName(null,null);let I;I=C?SA.createRootAndLookUpScopeName(C,g,this):SA.createRoot("unknown",g),B=new pA(null,this._rootId,-1,-1,!1,null,I,I)}A+="\n";const C=this.createOnigString(A),I=C.content.length,D=new dA(Q,A,this._tokenTypeMatchers,this.balancedBracketSelectors),w=HA(this,C,E,0,B,D,!0,g);return Y(C),{lineLength:I,lineTokens:D,ruleStack:w.stack,stoppedEarly:w.stoppedEarly}}}function JA(A,B){return(A=U(A)).repository=A.repository||{},A.repository.$self={$vscodeTextmateLocation:A.$vscodeTextmateLocation,patterns:A.patterns,name:A.scopeName},A.repository.$base=B||A.repository.$self,A}class SA{constructor(A,B,Q){this.parent=A,this.scopePath=B,this.tokenAttributes=Q}static fromExtension(A,B){let Q=A,g=A?.scopePath??null;for(const A of B)g=iA.push(g,A.scopeNames),Q=new SA(Q,g,A.encodedTokenAttributes);return Q}static createRoot(A,B){return new SA(null,new iA(null,A),B)}static createRootAndLookUpScopeName(A,B,Q){const g=Q.getMetadataForScope(A),E=new iA(null,A),C=Q.themeProvider.themeMatch(E),I=SA.mergeAttributes(B,g,C);return new SA(null,E,I)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(A){return SA.equals(this,A)}static equals(A,B){for(;;){if(A===B)return!0;if(!A&&!B)return!0;if(!A||!B)return!1;if(A.scopeName!==B.scopeName||A.tokenAttributes!==B.tokenAttributes)return!1;A=A.parent,B=B.parent}}static mergeAttributes(A,B,Q){let g=-1,E=0,C=0;return null!==Q&&(g=Q.fontStyle,E=Q.foregroundId,C=Q.backgroundId),k.set(A,B.languageId,B.tokenType,null,g,E,C)}pushAttributed(A,B){if(null===A)return this;if(-1===A.indexOf(" "))return SA._pushAttributed(this,A,B);const Q=A.split(/ /g);let g=this;for(const A of Q)g=SA._pushAttributed(g,A,B);return g}static _pushAttributed(A,B,Q){const g=Q.getMetadataForScope(B),E=A.scopePath.push(B),C=Q.themeProvider.themeMatch(E),I=SA.mergeAttributes(A.tokenAttributes,g,C);return new SA(A,E,I)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(A){const B=[];let Q=this;for(;Q&&Q!==A;)B.push({encodedTokenAttributes:Q.tokenAttributes,scopeNames:Q.scopePath.getExtensionIfDefined(Q.parent?.scopePath??null)}),Q=Q.parent;return Q===A?B.reverse():void 0}}class pA{constructor(A,B,Q,g,E,C,I,D){this.parent=A,this.ruleId=B,this.beginRuleCapturedEOL=E,this.endRule=C,this.nameScopesList=I,this.contentNameScopesList=D,this._stackElementBrand=void 0,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=Q,this._anchorPos=g}equals(A){return null!==A&&pA._equals(this,A)}static _equals(A,B){return A===B||!!this._structuralEquals(A,B)&&SA.equals(A.contentNameScopesList,B.contentNameScopesList)}static _structuralEquals(A,B){for(;;){if(A===B)return!0;if(!A&&!B)return!0;if(!A||!B)return!1;if(A.depth!==B.depth||A.ruleId!==B.ruleId||A.endRule!==B.endRule)return!1;A=A.parent,B=B.parent}}clone(){return this}static _reset(A){for(;A;)A._enterPos=-1,A._anchorPos=-1,A=A.parent}reset(){pA._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(A,B,Q,g,E,C,I){return new pA(this,A,B,Q,g,E,C,I)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(A){return A.getRule(this.ruleId)}toString(){const A=[];return this._writeString(A,0),"["+A.join(",")+"]"}_writeString(A,B){return this.parent&&(B=this.parent._writeString(A,B)),A[B++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,B}withContentNameScopesList(A){return this.contentNameScopesList===A?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,A)}withEndRule(A){return this.endRule===A?this:new pA(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,A,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(A){let B=this;for(;B&&B._enterPos===A._enterPos;){if(B.ruleId===A.ruleId)return!0;B=B.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(A,B){const Q=SA.fromExtension(A?.nameScopesList??null,B.nameScopesList);return new pA(A,B.ruleId,B.enterPos??-1,B.anchorPos??-1,B.beginRuleCapturedEOL,B.endRule,Q,SA.fromExtension(Q,B.contentNameScopesList))}}pA.NULL=new pA(null,0,0,0,!1,null,null,null);class lA{constructor(A,B){this.allowAny=!1,this.balancedBracketScopes=A.flatMap((A=>"*"===A?(this.allowAny=!0,[]):R(A,PA).map((A=>A.matcher)))),this.unbalancedBracketScopes=B.flatMap((A=>R(A,PA).map((A=>A.matcher))))}get matchesAlways(){return this.allowAny&&0===this.unbalancedBracketScopes.length}get matchesNever(){return 0===this.balancedBracketScopes.length&&!this.allowAny}match(A){for(const B of this.unbalancedBracketScopes)if(B(A))return!1;for(const B of this.balancedBracketScopes)if(B(A))return!0;return this.allowAny}}class dA{constructor(A,B,Q,g){this.balancedBracketSelectors=g,this._emitBinaryTokens=A,this._tokenTypeOverrides=Q,this._lineText=H?B:null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}produce(A,B){this.produceFromScopes(A.contentNameScopesList,B)}produceFromScopes(A,B){if(this._lastTokenEndIndex>=B)return;if(this._emitBinaryTokens){let Q=A?.tokenAttributes??0,g=!1;if(this.balancedBracketSelectors?.matchesAlways&&(g=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const B=A?.getScopeNames()??[];for(const A of this._tokenTypeOverrides)A.matcher(B)&&(Q=k.set(Q,0,A.type,null,-1,0,0));this.balancedBracketSelectors&&(g=this.balancedBracketSelectors.match(B))}if(g&&(Q=k.set(Q,0,8,g,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===Q)return void(this._lastTokenEndIndex=B);if(H){const Q=A?.getScopeNames()??[];console.log(" token: |"+this._lineText.substring(this._lastTokenEndIndex,B).replace(/\n$/,"\\n")+"|");for(let A=0;A0&&this._tokens[this._tokens.length-1].startIndex===B-1&&this._tokens.pop(),0===this._tokens.length&&(this._lastTokenEndIndex=-1,this.produce(A,B),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(A,B){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===B-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),0===this._binaryTokens.length&&(this._lastTokenEndIndex=-1,this.produce(A,B),this._binaryTokens[this._binaryTokens.length-2]=0);const Q=new Uint32Array(this._binaryTokens.length);for(let A=0,B=this._binaryTokens.length;A0;)10===A.charCodeAt(E)?(E++,C++,I=0):(E++,I++),B--}function w(A){null===Q?E=A:D(A-E)}function o(){for(;E0&&65279===A.charCodeAt(0)&&(E=1);let i=0,t=null,M=[],h=[],a=null;function n(A,B){M.push(i),h.push(t),i=A,t=B}function F(){if(0===M.length)return G("illegal state stack");i=M.pop(),t=h.pop()}function G(B){throw new Error("Near offset "+E+": "+B+" ~~~"+A.substr(E,50)+"~~~")}const r=function(){if(null===a)return G("missing ");let A={};null!==Q&&(A[Q]={filename:B,line:C,char:I}),t[a]=A,a=null,n(1,A)},N=function(){if(null===a)return G("missing ");let A=[];t[a]=A,a=null,n(2,A)},L=function(){let A={};null!==Q&&(A[Q]={filename:B,line:C,char:I}),t.push(A),n(1,A)},H=function(){let A=[];t.push(A),n(2,A)};function k(){if(1!==i)return G("unexpected ");F()}function R(){return 1===i||2!==i?G("unexpected "):void F()}function K(A){if(1===i){if(null===a)return G("missing ");t[a]=A,a=null}else 2===i?t.push(A):t=A}function Y(A){if(isNaN(A))return G("cannot parse float");if(1===i){if(null===a)return G("missing ");t[a]=A,a=null}else 2===i?t.push(A):t=A}function U(A){if(isNaN(A))return G("cannot parse integer");if(1===i){if(null===a)return G("missing ");t[a]=A,a=null}else 2===i?t.push(A):t=A}function P(A){if(1===i){if(null===a)return G("missing ");t[a]=A,a=null}else 2===i?t.push(A):t=A}function u(A){if(1===i){if(null===a)return G("missing ");t[a]=A,a=null}else 2===i?t.push(A):t=A}function y(A){if(1===i){if(null===a)return G("missing ");t[a]=A,a=null}else 2===i?t.push(A):t=A}function J(){let A=c(">"),B=!1;return 47===A.charCodeAt(A.length-1)&&(B=!0,A=A.substring(0,A.length-1)),{name:A.trim(),isClosed:B}}function S(A){if(A.isClosed)return"";let B=c(""),B.replace(/&#([0-9]+);/g,(function(A,B){return String.fromCodePoint(parseInt(B,10))})).replace(/&#x([0-9a-f]+);/g,(function(A,B){return String.fromCodePoint(parseInt(B,16))})).replace(/&|<|>|"|'/g,(function(A){switch(A){case"&":return"&";case"<":return"<";case">":return">";case""":return'"';case"'":return"'"}return A}))}for(;E=g));){const w=A.charCodeAt(E);if(D(1),60!==w)return G("expected <");if(E>=g)return G("unexpected end of input");const c=A.charCodeAt(E);if(63===c){D(1),e("?>");continue}if(33===c){if(D(1),s("--")){e("--\x3e");continue}e(">");continue}if(47===c){if(D(1),o(),s("plist")){e(">");continue}if(s("dict")){e(">"),k();continue}if(s("array")){e(">"),R();continue}return G("unexpected closed tag")}let M=J();switch(M.name){case"dict":1===i?r():2===i?L():(t={},null!==Q&&(t[Q]={filename:B,line:C,char:I}),n(1,t)),M.isClosed&&k();continue;case"array":1===i?N():2===i?H():(t=[],n(2,t)),M.isClosed&&R();continue;case"key":p=S(M),1!==i?G("unexpected "):null!==a?G("too many "):a=p;continue;case"string":K(S(M));continue;case"real":Y(parseFloat(S(M)));continue;case"integer":U(parseInt(S(M),10));continue;case"date":P(new Date(S(M)));continue;case"data":u(S(M));continue;case"true":S(M),y(!0);continue;case"false":S(M),y(!1);continue}if(!/^plist/.test(M.name))return G("unexpected opened tag "+M.name)}var p;return t}function xA(A,B){throw new Error("Near offset "+A.pos+": "+B+" ~~~"+A.source.substr(A.pos,50)+"~~~")}class mA{constructor(A){this.source=A,this.pos=0,this.len=A.length,this.line=1,this.char=0}}class OA{constructor(){this.value=null,this.type=0,this.offset=-1,this.len=-1,this.line=-1,this.char=-1}toLocation(A){return{filename:A,line:this.line,char:this.char}}}function qA(A,B){B.value=null,B.type=0,B.offset=-1,B.len=-1,B.line=-1,B.char=-1;let Q,g=A.source,E=A.pos,C=A.len,I=A.line,D=A.char;for(;;){if(E>=C)return!1;if(Q=g.charCodeAt(E),32!==Q&&9!==Q&&13!==Q){if(10!==Q)break;E++,I++,D=0}else E++,D++}if(B.offset=E,B.line=I,B.char=D,34===Q){for(B.type=1,E++,D++;;){if(E>=C)return!1;if(Q=g.charCodeAt(E),E++,D++,92!==Q){if(34===Q)break}else E++,D++}B.value=g.substring(B.offset+1,E-1).replace(/\\u([0-9A-Fa-f]{4})/g,((A,B)=>String.fromCodePoint(parseInt(B,16)))).replace(/\\(.)/g,((B,Q)=>{switch(Q){case'"':return'"';case"\\":return"\\";case"/":return"/";case"b":return"\b";case"f":return"\f";case"n":return"\n";case"r":return"\r";case"t":return"\t";default:xA(A,"invalid escape sequence")}throw new Error("unreachable")}))}else if(91===Q)B.type=2,E++,D++;else if(123===Q)B.type=3,E++,D++;else if(93===Q)B.type=4,E++,D++;else if(125===Q)B.type=5,E++,D++;else if(58===Q)B.type=6,E++,D++;else if(44===Q)B.type=7,E++,D++;else if(110===Q){if(B.type=8,E++,D++,Q=g.charCodeAt(E),117!==Q)return!1;if(E++,D++,Q=g.charCodeAt(E),108!==Q)return!1;if(E++,D++,Q=g.charCodeAt(E),108!==Q)return!1;E++,D++}else if(116===Q){if(B.type=9,E++,D++,Q=g.charCodeAt(E),114!==Q)return!1;if(E++,D++,Q=g.charCodeAt(E),117!==Q)return!1;if(E++,D++,Q=g.charCodeAt(E),101!==Q)return!1;E++,D++}else if(102===Q){if(B.type=10,E++,D++,Q=g.charCodeAt(E),97!==Q)return!1;if(E++,D++,Q=g.charCodeAt(E),108!==Q)return!1;if(E++,D++,Q=g.charCodeAt(E),115!==Q)return!1;if(E++,D++,Q=g.charCodeAt(E),101!==Q)return!1;E++,D++}else for(B.type=11;;){if(E>=C)return!1;if(Q=g.charCodeAt(E),!(46===Q||Q>=48&&Q<=57||101===Q||69===Q||45===Q||43===Q))break;E++,D++}return B.len=E-B.offset,null===B.value&&(B.value=g.substr(B.offset,B.len)),A.pos=E,A.line=I,A.char=D,!0}class bA{constructor(A,B){this._onigLibPromise=B,this._grammars=new Map,this._rawGrammars=new Map,this._injectionGrammars=new Map,this._theme=A}dispose(){for(const A of this._grammars.values())A.dispose()}setTheme(A){this._theme=A}getColorMap(){return this._theme.getColorMap()}addGrammar(A,B){this._rawGrammars.set(A.scopeName,A),B&&this._injectionGrammars.set(A.scopeName,B)}lookup(A){return this._rawGrammars.get(A)}injections(A){return this._injectionGrammars.get(A)}getDefaults(){return this._theme.getDefaults()}themeMatch(A){return this._theme.match(A)}async grammarForScopeName(A,B,Q,g,E){if(!this._grammars.has(A)){let C=this._rawGrammars.get(A);if(!C)return null;this._grammars.set(A,function(A,B,Q,g,E,C,I,D){return new yA(A,B,Q,g,E,C,I,D)}(A,C,B,Q,g,E,this,await this._onigLibPromise))}return this._grammars.get(A)}}function WA(A,B){let Q=0;const g=[];let E=A,C=B;for(;E!==C;)E&&(!C||E.depth>=C.depth)?(Q++,E=E.parent):(g.push(C.toStateStackFrame()),C=C.parent);return{pops:Q,newFrames:g.reverse()}}function TA(A,B){let Q=A;for(let A=0;A0;)await Promise.all(C.Q.map((A=>this._loadSingleGrammar(A.scopeName)))),C.processQueue();return this._grammarForScopeName(A,B,Q,g,E)}async _loadSingleGrammar(A){return this._ensureGrammarCache.has(A)||this._ensureGrammarCache.set(A,this._doLoadSingleGrammar(A)),this._ensureGrammarCache.get(A)}async _doLoadSingleGrammar(A){const B=await this._options.loadGrammar(A);if(B){const Q="function"==typeof this._options.getInjections?this._options.getInjections(A):void 0;this._syncRegistry.addGrammar(B,Q)}}async addGrammar(A,B=[],Q=0,g=null){return this._syncRegistry.addGrammar(A,B),await this._grammarForScopeName(A.scopeName,Q,g)}_grammarForScopeName(A,B=0,Q=null,g=null,E=null){return this._syncRegistry.grammarForScopeName(A,B,Q,g,E)}}const vA=pA.NULL,ZA=function(A,B=null){return null!==B&&/\.json$/.test(B)?(Q=A,H?function(A,B,Q){let g=new mA(A),E=new OA,C=0,I=null,D=[],w=[];function o(){D.push(C),w.push(I)}function s(){C=D.pop(),I=w.pop()}function e(A){xA(g,A)}for(;qA(g,E);){if(0===C){if(null!==I&&e("too many constructs in root"),3===E.type){I={},I.$vscodeTextmateLocation=E.toLocation(B),o(),C=1;continue}if(2===E.type){I=[],o(),C=4;continue}e("unexpected token in root")}if(2===C){if(5===E.type){s();continue}if(7===E.type){C=3;continue}e("expected , or }")}if(1===C||3===C){if(1===C&&5===E.type){s();continue}if(1===E.type){let A=E.value;if(qA(g,E)&&6===E.type||e("expected colon"),qA(g,E)||e("expected value"),C=2,1===E.type){I[A]=E.value;continue}if(8===E.type){I[A]=null;continue}if(9===E.type){I[A]=!0;continue}if(10===E.type){I[A]=!1;continue}if(11===E.type){I[A]=parseFloat(E.value);continue}if(2===E.type){let B=[];I[A]=B,o(),C=4,I=B;continue}if(3===E.type){let Q={};Q.$vscodeTextmateLocation=E.toLocation(B),I[A]=Q,o(),C=1,I=Q;continue}}e("unexpected token in dict")}if(5===C){if(4===E.type){s();continue}if(7===E.type){C=6;continue}e("expected , or ]")}if(4===C||6===C){if(4===C&&4===E.type){s();continue}if(C=5,1===E.type){I.push(E.value);continue}if(8===E.type){I.push(null);continue}if(9===E.type){I.push(!0);continue}if(10===E.type){I.push(!1);continue}if(11===E.type){I.push(parseFloat(E.value));continue}if(2===E.type){let A=[];I.push(A),o(),C=4,I=A;continue}if(3===E.type){let A={};A.$vscodeTextmateLocation=E.toLocation(B),I.push(A),o(),C=1,I=A;continue}e("unexpected token in array")}e("unknown state")}return 0!==w.length&&e("unclosed constructs"),I}(Q,B):JSON.parse(Q)):function(A,B){return H?function(A,B,Q){return fA(A,B,"$vscodeTextmateLocation")}(A,B):function(A){return fA(A,null,null)}(A)}(A,B);var Q};var jA=L.Bz,VA=("undefined"!=typeof document&&document.currentScript&&document.currentScript.src,function(A){var B,Q,g=void 0!==(A=A||{})?A:{};g.ready=new Promise((function(A,g){B=A,Q=g}));var E,C=Object.assign({},g),I=!1;E=function(A){let B;return"function"==typeof readbuffer?new Uint8Array(readbuffer(A)):(B=read(A,"binary"),"object"==typeof B||L(Q),B);var Q},"undefined"!=typeof scriptArgs&&scriptArgs,"undefined"!=typeof onig_print&&("undefined"==typeof console&&(console={}),console.log=onig_print,console.warn=console.error="undefined"!=typeof printErr?printErr:onig_print);var D,w,o=g.print||console.log.bind(console),s=g.printErr||console.warn.bind(console);Object.assign(g,C),C=null,g.arguments&&g.arguments,g.thisProgram&&g.thisProgram,g.quit&&g.quit,g.wasmBinary&&(D=g.wasmBinary),g.noExitRuntime,"object"!=typeof WebAssembly&&L("no native wasm support detected");var e,c,i,t=!1,M="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function h(A,B,Q){for(var g=B+Q,E=B;A[E]&&!(E>=g);)++E;if(E-B>16&&A.buffer&&M)return M.decode(A.subarray(B,E));for(var C="";B>10,56320|1023&o)}}else C+=String.fromCharCode((31&I)<<6|D)}else C+=String.fromCharCode(I)}return C}function a(A){e=A,g.HEAP8=new Int8Array(A),g.HEAP16=new Int16Array(A),g.HEAP32=new Int32Array(A),g.HEAPU8=c=new Uint8Array(A),g.HEAPU16=new Uint16Array(A),g.HEAPU32=i=new Uint32Array(A),g.HEAPF32=new Float32Array(A),g.HEAPF64=new Float64Array(A)}g.INITIAL_MEMORY;var n=[],F=[],G=[],r=0,N=null;function L(A){g.onAbort&&g.onAbort(A),s(A="Aborted("+A+")"),t=!0,A+=". Build with -sASSERTIONS for more info.";var B=new WebAssembly.RuntimeError(A);throw Q(B),B}var H,k,R,K="data:application/octet-stream;base64,";function Y(A){return A.startsWith(K)}function U(A){try{if(A==H&&D)return new Uint8Array(D);if(E)return E(A);throw"both async and sync fetching of the wasm failed"}catch(A){L(A)}}function P(A){for(;A.length>0;)A.shift()(g)}function u(A){try{return w.grow(A-e.byteLength+65535>>>16),a(w.buffer),1}catch(A){}}Y(H="onig.wasm")||(k=H,H=g.locateFile?g.locateFile(k,""):""+k),R="undefined"!=typeof dateNow?dateNow:()=>performance.now();var y=[null,[],[]];function J(A,B){var Q=y[A];0===B||10===B?((1===A?o:s)(h(Q,0)),Q.length=0):Q.push(B)}var S,p={emscripten_get_now:R,emscripten_memcpy_big:function(A,B,Q){c.copyWithin(A,B,B+Q)},emscripten_resize_heap:function(A){var B=c.length,Q=2147483648;if((A>>>=0)>Q)return!1;let g=(A,B)=>A+(B-A%B)%B;for(var E=1;E<=4;E*=2){var C=B*(1+.2/E);if(C=Math.min(C,A+100663296),u(Math.min(Q,g(Math.max(A,C),65536))))return!0}return!1},fd_write:function(A,B,Q,g){for(var E=0,C=0;C>2],D=i[B+4>>2];B+=8;for(var w=0;w>2]=E,0}};function l(A){function Q(){S||(S=!0,g.calledRun=!0,t||(P(F),B(g),g.onRuntimeInitialized&&g.onRuntimeInitialized(),function(){if(g.postRun)for("function"==typeof g.postRun&&(g.postRun=[g.postRun]);g.postRun.length;)A=g.postRun.shift(),G.unshift(A);var A;P(G)}()))}r>0||(function(){if(g.preRun)for("function"==typeof g.preRun&&(g.preRun=[g.preRun]);g.preRun.length;)A=g.preRun.shift(),n.unshift(A);var A;P(n)}(),r>0||(g.setStatus?(g.setStatus("Running..."),setTimeout((function(){setTimeout((function(){g.setStatus("")}),1),Q()}),1)):Q()))}if(function(){var A={env:p,wasi_snapshot_preview1:p};function B(A,B){var Q,E=A.exports;g.asm=E,a((w=g.asm.memory).buffer),g.asm.__indirect_function_table,Q=g.asm.__wasm_call_ctors,F.unshift(Q),function(A){if(r--,g.monitorRunDependencies&&g.monitorRunDependencies(r),0==r&&N){var B=N;N=null,B()}}()}function E(A){B(A.instance)}function C(B){return(!D&&I&&"function"==typeof fetch?fetch(H,{credentials:"same-origin"}).then((function(A){if(!A.ok)throw"failed to load wasm binary file at '"+H+"'";return A.arrayBuffer()})).catch((function(){return U(H)})):Promise.resolve().then((function(){return U(H)}))).then((function(B){return WebAssembly.instantiate(B,A)})).then((function(A){return A})).then(B,(function(A){s("failed to asynchronously prepare wasm: "+A),L(A)}))}if(r++,g.monitorRunDependencies&&g.monitorRunDependencies(r),g.instantiateWasm)try{return g.instantiateWasm(A,B)}catch(A){s("Module.instantiateWasm callback failed with error: "+A),Q(A)}(D||"function"!=typeof WebAssembly.instantiateStreaming||Y(H)||"function"!=typeof fetch?C(E):fetch(H,{credentials:"same-origin"}).then((function(B){return WebAssembly.instantiateStreaming(B,A).then(E,(function(A){return s("wasm streaming compile failed: "+A),s("falling back to ArrayBuffer instantiation"),C(E)}))}))).catch(Q)}(),g.___wasm_call_ctors=function(){return(g.___wasm_call_ctors=g.asm.__wasm_call_ctors).apply(null,arguments)},g.___errno_location=function(){return(g.___errno_location=g.asm.__errno_location).apply(null,arguments)},g._omalloc=function(){return(g._omalloc=g.asm.omalloc).apply(null,arguments)},g._ofree=function(){return(g._ofree=g.asm.ofree).apply(null,arguments)},g._getLastOnigError=function(){return(g._getLastOnigError=g.asm.getLastOnigError).apply(null,arguments)},g._createOnigScanner=function(){return(g._createOnigScanner=g.asm.createOnigScanner).apply(null,arguments)},g._freeOnigScanner=function(){return(g._freeOnigScanner=g.asm.freeOnigScanner).apply(null,arguments)},g._findNextOnigScannerMatch=function(){return(g._findNextOnigScannerMatch=g.asm.findNextOnigScannerMatch).apply(null,arguments)},g._findNextOnigScannerMatchDbg=function(){return(g._findNextOnigScannerMatchDbg=g.asm.findNextOnigScannerMatchDbg).apply(null,arguments)},g.stackSave=function(){return(g.stackSave=g.asm.stackSave).apply(null,arguments)},g.stackRestore=function(){return(g.stackRestore=g.asm.stackRestore).apply(null,arguments)},g.stackAlloc=function(){return(g.stackAlloc=g.asm.stackAlloc).apply(null,arguments)},g.dynCall_jiji=function(){return(g.dynCall_jiji=g.asm.dynCall_jiji).apply(null,arguments)},g.UTF8ToString=function(A,B){return A?h(c,A,B):""},N=function A(){S||l(),S||(N=A)},g.preInit)for("function"==typeof g.preInit&&(g.preInit=[g.preInit]);g.preInit.length>0;)g.preInit.pop()();return l(),A.ready});let zA=null;class _A{static _utf8ByteLength(A){let B=0;for(let Q=0,g=A.length;Q=55296&&E<=56319&&Q+1=56320&&B<=57343&&(C=65536+(E-55296<<10)|B-56320,I=!0)}B+=C<=127?1:C<=2047?2:C<=65535?3:4,I&&Q++}return B}constructor(A){const B=A.length,Q=_A._utf8ByteLength(A),g=Q!==B,E=g?new Uint32Array(B+1):null;g&&(E[B]=Q);const C=g?new Uint32Array(Q+1):null;g&&(C[Q]=B);const I=new Uint8Array(Q);let D=0;for(let Q=0;Q=55296&&w<=56319&&Q+1=56320&&B<=57343&&(o=65536+(w-55296<<10)|B-56320,s=!0)}g&&(E[Q]=D,s&&(E[Q+1]=D),o<=127?C[D+0]=Q:o<=2047?(C[D+0]=Q,C[D+1]=Q):o<=65535?(C[D+0]=Q,C[D+1]=Q,C[D+2]=Q):(C[D+0]=Q,C[D+1]=Q,C[D+2]=Q,C[D+3]=Q)),o<=127?I[D++]=o:o<=2047?(I[D++]=192|(1984&o)>>>6,I[D++]=128|(63&o)>>>0):o<=65535?(I[D++]=224|(61440&o)>>>12,I[D++]=128|(4032&o)>>>6,I[D++]=128|(63&o)>>>0):(I[D++]=240|(1835008&o)>>>18,I[D++]=128|(258048&o)>>>12,I[D++]=128|(4032&o)>>>6,I[D++]=128|(63&o)>>>0),s&&Q++}this.utf16Length=B,this.utf8Length=Q,this.utf16Value=A,this.utf8Value=I,this.utf16OffsetToUtf8=E,this.utf8OffsetToUtf16=C}createString(A){const B=A._omalloc(this.utf8Length);return A.HEAPU8.set(this.utf8Value,B),B}}class $A{constructor(A){if(this.id=++$A.LAST_ID,!zA)throw new Error("Must invoke loadWASM first.");this._onigBinding=zA,this.content=A;const B=new _A(A);this.utf16Length=B.utf16Length,this.utf8Length=B.utf8Length,this.utf16OffsetToUtf8=B.utf16OffsetToUtf8,this.utf8OffsetToUtf16=B.utf8OffsetToUtf16,this.utf8Length<1e4&&!$A._sharedPtrInUse?($A._sharedPtr||($A._sharedPtr=zA._omalloc(1e4)),$A._sharedPtrInUse=!0,zA.HEAPU8.set(B.utf8Value,$A._sharedPtr),this.ptr=$A._sharedPtr):this.ptr=B.createString(zA)}convertUtf8OffsetToUtf16(A){return this.utf8OffsetToUtf16?A<0?0:A>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[A]:A}convertUtf16OffsetToUtf8(A){return this.utf16OffsetToUtf8?A<0?0:A>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[A]:A}dispose(){this.ptr===$A._sharedPtr?$A._sharedPtrInUse=!1:this._onigBinding._ofree(this.ptr)}}$A.LAST_ID=0,$A._sharedPtr=0,$A._sharedPtrInUse=!1;class AB{constructor(A){if(!zA)throw new Error("Must invoke loadWASM first.");const B=[],Q=[];for(let g=0,E=A.length;gWebAssembly.instantiateStreaming(A,B)}(g):function(A){return async B=>{const Q=await A.arrayBuffer();return WebAssembly.instantiate(Q,B)}}(g):function(A){return B=>WebAssembly.instantiate(A,B)}(g)}return QB=new Promise(((A,B)=>{g=A,E=B})),function(A,B,Q,g){VA({print:B,instantiateWasm:(B,Q)=>{if("undefined"==typeof performance){const A=()=>Date.now();B.env.emscripten_get_now=A,B.wasi_snapshot_preview1.emscripten_get_now=A}return A(B).then((A=>Q(A.instance)),g),{}}}).then((A=>{zA=A,Q()}))}(B,Q,g,E),QB}function EB(A){return new $A(A)}function CB(A){return new AB(A)}function IB(A){const B=G[A];if(!B)return;const{id:Q}=r[B];return{id:Q,scopeName:B}}const DB=new Map;let wB,oB;async function sB(A){if(DB.has(A))return DB.get(A);const B=function(A){return r[A]}(A);if(!B)return Promise.resolve(void 0);let g;if(void 0===wB&&(g=eB(B.path),wB=g.then((()=>!0)).catch((()=>!1))),void 0===oB&&(oB=await wB),oB){const Q=g||eB(B.path);return DB.set(A,Q),Q}const E=Q(`grammars/${B.id}`);B.embeddedScopes.forEach((A=>{if(!DB.has(A)){const B=E.then((B=>B.find((B=>B.scopeName===A))));DB.set(A,B)}}));const C=E.then((B=>B.find((B=>B.scopeName===A))));return DB.set(A,C),C}async function eB(A){return await B("grammars",A)}const cB=30720,iB=16744448,tB=16775168,MB=11,hB=15,aB={NotSet:-1,None:0,Italic:1,Bold:2,Underline:4,Strikethrough:8};function nB(A,B,Q,g){const{tokens:E,ruleStack:C}=A.tokenizeLine2(Q,B),I=[];let D=Q.length;for(let A=E.length-2;A>=0;A-=2){const B=E[A],g=E[A+1],C=Q.slice(B,D);I.unshift({content:C,metadata:g}),D=B}let w=[];if(null==g?void 0:g.preserveWhitespace)w=I;else for(let A=0;A0?w[w.length-1].content+=B.content:A{const{rawTokens:E,nextStack:C}=nB(B,g,A,{preserveWhitespace:!0}),I=E.map((({content:A,metadata:B})=>({content:A,style:GB(B,Q)}))),D=function(A,B,Q,g){const{tokens:E}=Q.tokenizeLine(A,B),C=[];for(let B=0;B{if(w+=A.content.length,Q>>hB]},g=(A&cB)>>>MB;return g&aB.Italic&&(Q.fontStyle="italic"),g&aB.Bold&&(Q.fontWeight="bold"),g&aB.Underline&&(Q.textDecoration="underline"),g&aB.Strikethrough&&(Q.textDecoration="line-through"),Q}var rB=function(A){var B=null;if("undefined"!=typeof process&&null!=process.versions&&null!=process.versions.node)B=Buffer.from(A,"base64");else{var Q=globalThis.atob(A),g=Q.length;B=new Uint8Array(new ArrayBuffer(g));for(var E=0;E({createOnigScanner:CB,createOnigString:EB})));NB=new jA({onigLib:A,loadGrammar:A=>sB(A)})}const B=A.filter((A=>!LB(A))).map((A=>{const B=IB(A);if(!B)throw new RB(A);return NB.loadGrammar(B.scopeName)}));return Promise.all(B)}function kB(A){if(LB(A))return{langId:A,grammar:null};const B=IB(A);if(!B)throw new RB(A);const Q=function(A){const{_syncRegistry:B}=NB;return null==B?void 0:B._grammars.get(A)}(B.scopeName);if(!Q)throw new Error(`Syntax highlighting error: grammar for ${A} not loaded`);return{langId:B.id,grammar:Q}}class RB extends Error{constructor(A){super(`Unknown language: ${A}`),this.alias=A}}function KB(A,B,Q){NB.setTheme(Q);const g=function(A){const B=NB.getColorMap();return A.colorNames?B.map((B=>Object.keys(A.colorNames).find((Q=>A.colorNames[Q].toUpperCase()===B.toUpperCase()))||B)):B}(Q);return function(A,B,Q){let g=null;return A.split(/\r?\n|\r/g).map((A=>{const{rawTokens:E,nextStack:C}=nB(B,g,A);return g=C,E.map((({content:A,metadata:B})=>({content:A,style:GB(B,Q)})))}))}(A,B,g)}function YB(A){return A.split(/\r?\n|\r/g).map((A=>[{content:A,style:{}}]))}function UB(A,B){if(!A)return[{fromLineNumber:B,toLineNumber:B}];if(A.startsWith("["))return PB(A,B);return yB(A.slice(1,-1)).map((A=>{if(A.includes("[")){console.log("part",A);const[Q,g]=A.split("["),E=Number(Q),C=B+E-1;if(!JB(C))throw new SB(Q);return PB("["+g,C)}const{from:Q,to:g}=uB(A);return[{fromLineNumber:Q+B-1,toLineNumber:g+B-1}]})).flat()}function PB(A,B){return yB(A.slice(1,-1)).map((A=>{const{from:Q,to:g}=uB(A);return{lineNumber:B,fromColumn:Q,toColumn:g}}))}function uB(A){const[B,Q]=A.split(":");if(!JB(B))throw new SB(B);const g=Number(B);if(g<1)throw new pB;if(Q){if(!JB(Q))throw new SB(Q);return{from:g,to:+Q}}return{from:g,to:g}}function yB(A){return A.split(/,(?![^\[]*\])/g)}function JB(A){A=A.toString();var B=Math.abs(A),Q=parseInt(A,10);return!isNaN(B)&&Q===B&&B.toString()===A}class SB extends Error{constructor(A){super(`Invalid number "${A}" in range string`),this.number=A,Object.setPrototypeOf(this,new.target.prototype)}}class pB extends Error{constructor(){super("Invalid line or column number in range string"),Object.setPrototypeOf(this,new.target.prototype)}}const lB="#001",dB="#010",fB={name:"comments",type:"light",foreground:"",background:"",colors:{},settings:[{settings:{foreground:"#000"}},{scope:["punctuation.definition.comment"],settings:{foreground:lB}},{scope:"comment",settings:{foreground:dB}}]};function xB(A,B,Q,g){const E=B?KB(A,B,fB):YB(A),C=[];let I=1;const D=E.map((A=>{const{annotations:B,lineWithoutComments:E}=function(A,B,Q){if(!A.some((A=>A.style.color===lB)))return{annotations:[],lineWithoutComments:A};const g=[];let E=0;for(;E!A.tokens.includes(B)));C.every((A=>""===A.content.trim()))&&(C=null);return{annotations:g.map((A=>({name:A.name,query:A.query,ranges:A.ranges}))),lineWithoutComments:C}}(A,g,I);if(C.push(...B),!E)return null;const D=E.map((A=>A.content)).join("");return["mdx","jsx","tsx"].includes(Q)&&B.length>0&&"{}"===D.trim()?null:(I++,D)})).filter((A=>null!==A)).join("\n");return{newCode:D,annotations:C}}function mB(A,B){var Q;const g=A.match(/\s*([\w-]+)?(\([^\)]*\)|\[[^\]]*\])?(.*)$/),E=g[1],C=g[2],I=null===(Q=g[3])||void 0===Q?void 0:Q.trim();return B.includes(E)?{name:E,rangeString:C,query:I}:null}function OB(A,B){let Q=[],g=1;return A.forEach((A=>{Q.push({fromColumn:g,toColumn:g+A.content.length-1,token:A}),g+=A.content.length})),B.forEach((A=>{Q=function(A,B){const{range:Q}=B,{fromColumn:g,toColumn:E}=Q,C=[];let I=0;for(;IE){const[A,Q]=bB(B,E+1);D.tokens.push(A),C.push(Q)}else D.tokens.push(B);I++}else C.push(D);for(;IqB(A)))}function qB(A){return"tokens"in A?{annotationName:A.annotationName,annotationQuery:A.annotationQuery,fromColumn:A.fromColumn,toColumn:A.toColumn,tokens:A.tokens.map((A=>qB(A)))}:A.token}function bB(A,B){if("token"in A){const Q=Object.assign(Object.assign({},A.token),{content:A.token.content.slice(0,B-A.fromColumn)}),g=Object.assign(Object.assign({},A.token),{content:A.token.content.slice(B-A.fromColumn)});return[Object.assign(Object.assign({},A),{toColumn:B-1,token:Q}),Object.assign(Object.assign({},A),{fromColumn:B,token:g})]}{const Q=[],g=[];A.tokens.forEach((A=>{if(A.toColumn=B)g.push(A);else{const[E,C]=bB(A,B);Q.push(E),g.push(C)}}));return[Object.assign(Object.assign({},A),{toColumn:B-1,tokens:Q}),Object.assign(Object.assign({},A),{fromColumn:B,tokens:g})]}}function WB(A,B){let Q=A.map(((A,B)=>({fromLineNumber:B+1,toLineNumber:B+1,line:A})));return B.forEach((A=>{Q=function(A,B){const{range:Q,name:g,query:E}=B,{fromLineNumber:C,toLineNumber:I}=Q,D=[];let w=0;for(;wI){const[A,Q]=XB(B,I+1);o.lines.push(A),D.push(Q)}else o.lines.push(B);w++}else D.push(o);for(;wTB(A)))}function TB(A){return"line"in A?{lineNumber:A.fromLineNumber,tokens:A.line.tokens}:{annotationName:A.annotationName,annotationQuery:A.annotationQuery,fromLineNumber:A.fromLineNumber,toLineNumber:A.toLineNumber,lines:A.lines.map((A=>TB(A)))}}function XB(A,B){if("line"in A)return[Object.assign(Object.assign({},A),{toLineNumber:B-1}),Object.assign(Object.assign({},A),{fromLineNumber:B})];{const Q=[],g=[];return A.lines.forEach((A=>{if(A.toLineNumber=B)g.push(A);else{const[E,C]=XB(A,B);Q.push(E),g.push(C)}})),[Object.assign(Object.assign({},A),{toLineNumber:B-1,lines:Q}),Object.assign(Object.assign({},A),{fromLineNumber:B,lines:g})]}}function vB(A,B){const{inlineAnnotations:Q,multilineAnnotations:g}=function(A){const B=[],Q=[];return A.forEach((A=>{A.ranges.forEach((g=>{"lineNumber"in g?B.push(Object.assign(Object.assign({},A),{range:g})):Q.push(Object.assign(Object.assign({},A),{range:g}))}))})),{inlineAnnotations:B,multilineAnnotations:Q}}(B);return WB(A.map(((A,B)=>{const g=Q.filter((A=>A.range.lineNumber===B+1));return{lineNumber:B+1,tokens:OB(A,g)}})),g)}var ZB=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],jB={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",9:"strikethrough"};function VB(A,B){const Q=A.indexOf("[",B);if(-1!==Q){const B=A.indexOf("m",Q);return{sequence:A.substring(Q+2,B).split(";"),startPosition:Q,position:B+1}}return{position:A.length}}function zB(A,B){let Q=1;const g=A[B+Q++];let E;if("2"===g){const g=[A[B+Q++],A[B+Q++],A[B+Q]].map((A=>Number.parseInt(A)));3!==g.length||g.some((A=>Number.isNaN(A)))||(E={type:"rgb",rgb:g})}else if("5"===g){const g=Number.parseInt(A[B+Q]);Number.isNaN(g)||(E={type:"table",index:Number(g)})}return[Q,E]}function _B(A){const B=[];for(let Q=0;Q=90&&E<=97?B.push({type:"setForegroundColor",value:{type:"named",name:ZB[E-90+8]}}):E>=100&&E<=107&&B.push({type:"setBackgroundColor",value:{type:"named",name:ZB[E-100+8]}})}return B}function $B(A,B){const Q=function(){let A=null,B=null,Q=new Set;return{parse(g){const E=[];let C=0;do{const I=VB(g,C),D=I.sequence?g.substring(C,I.startPosition):g.substring(C);if(D.length>0&&E.push({value:D,foreground:A,background:B,decorations:new Set(Q)}),I.sequence){const g=_B(I.sequence);for(const E of g)"resetAll"===E.type?(A=null,B=null,Q.clear()):"resetForegroundColor"===E.type?A=null:"resetBackgroundColor"===E.type?B=null:"resetDecoration"===E.type&&Q.delete(E.value);for(const E of g)"setForegroundColor"===E.type?A=E.value:"setBackgroundColor"===E.type?B=E.value:"setDecoration"===E.type&&Q.add(E.value)}C=I.position}while(Cfunction(A,B,Q){const g=A.parse(B),E=g.map((({value:A,foreground:B,background:g,decorations:E})=>{const C=AQ(B,Q),I={};C&&(I.color=C);const D=AQ(g,Q);return D&&(I.background=D),E.has("bold")&&(I.fontWeight="bold"),E.has("italic")&&(I.fontStyle="italic"),E.has("underline")&&(I.textDecoration="underline"),E.has("strikethrough")&&(I.textDecoration="line-through"),E.has("reverse")&&(I.color=D,I.background=C),E.has("dim")&&(I.opacity=.5),{content:A,style:I}}));return E}(Q,A,B)));return g}function AQ(A,B){if(A){if("named"===A.type){return w(B,"terminal.ansi"+(A.name[0].toUpperCase()+A.name.slice(1)))}if("rgb"===A.type){const[B,Q,g]=A.rgb;return`rgb(${B}, ${Q}, ${g})`}}}async function BQ(A,B){await Promise.all([HB(A),i(B)])}async function QQ(A,B,Q="dark-plus",g={}){const E=A||"",C=B||"text";if("string"!=typeof E)throw new Error("Syntax highlighter error: code must be a string");if("string"!=typeof C)throw new Error("Syntax highlighter error: lang must be a string");return await BQ([C],Q),gQ(E,C,Q,g)}function gQ(A,B,Q="dark-plus",g={}){const E=A||"",C=B||"text";if("string"!=typeof E)throw new Error("Syntax highlighter error: code must be a string");if("string"!=typeof C)throw new Error("Syntax highlighter error: lang must be a string");const{langId:I,grammar:D}=kB(C),o=t(Q),s="text"==I?YB(E):"terminal"==I?$B(E,o):(null==g?void 0:g.scopes)?function(A,B,Q){return NB.setTheme(Q),FB(A,B,NB.getColorMap())}(E,D,o):KB(E,D,o),e="terminal"==I?function(A){return{color:w(A,"terminal.foreground"),background:w(A,"terminal.background")}}(o):{color:o.foreground,background:o.background};if(function(A){return"annotations"in A}(g)){return{lines:vB(s,(null==g?void 0:g.annotations)||[]),lang:I,style:e}}return{lines:s,lang:I,style:e}}async function EQ(A,B,Q){if(!Q)return{code:A,annotations:[]};await HB([B]);const{grammar:g}=kB(B),{newCode:E,annotations:C}=xB(A,g,B,Q);return{code:E,annotations:C}}async function CQ(A){if(!A)throw new Error("Syntax highlighter error: undefined theme");await BQ([],A);return n(t(A))}function IQ(A){if(!A)throw new Error("Syntax highlighter error: undefined theme");return n(t(A))}export{F as LANG_NAMES,h as THEME_NAMES,RB as UnknownLanguageError,a as UnknownThemeError,EQ as extractAnnotations,CQ as getThemeColors,IQ as getThemeColorsSync,QQ as highlight,gQ as highlightSync,BQ as preload}; +function A(A,B){var Q=require("fs"),g=require("path"),E=g.parse,C=require("os");var I=function(A,B){var Q="/";/^([A-Za-z]:)/.test(A)?Q="":/^\\\\/.test(A)&&(Q="\\\\");for(var C=[A],I=E(A);I.dir!==C[C.length-1];)C.push(I.dir),I=E(I.dir);return C.reduce((function(A,E){return A.concat(B.map((function(A){return g.resolve(Q,E,A)})))}),[])};const D=C.homedir||function(){var A=process.env.HOME,B=process.env.LOGNAME||process.env.USER||process.env.LNAME||process.env.USERNAME;return"win32"===process.platform?process.env.USERPROFILE||process.env.HOMEDRIVE+process.env.HOMEPATH||A||null:"darwin"===process.platform?A||(B?"/Users/"+B:null):"linux"===process.platform?A||(0===process.getuid()?"/root":B?"/home/"+B:null):A||null};var w="win32"!==process.platform&&Q.realpathSync&&"function"==typeof Q.realpathSync.native?Q.realpathSync.native:Q.realpathSync,o=D(),s=function(A,B,Q){return Q&&!1===Q.preserveSymlinks?A(B):B},e=function(A,B,Q){for(var E=function(A,B,Q){var g=B&&B.moduleDirectory?[].concat(B.moduleDirectory):["node_modules"];if(B&&"function"==typeof B.paths)return B.paths(Q,A,(function(){return I(A,g)}),B);var E=I(A,g);return B&&B.paths?E.concat(B.paths):E}(B,Q,A),C=0;CA.promises)),E=await import("path"),{URL:C}=await import("url"),I=new C(".",import.meta.url).pathname;try{let A=E.resolve(I,"..",B),C=E.resolve(A,Q);const D=await g.readFile(C,"utf8");if(!D)throw new Error("no results");return JSON.parse(D)}catch(C){const D=A("@code-hike/lighter",{basedir:I});let w=E.resolve(D,"..","..",B),o=E.resolve(w,Q);return JSON.parse(await g.readFile(o,"utf8"))}}async function Q(A){if("function"==typeof fetch){const B=await fetch(`https://lighter.codehike.org/${A}.json`);return await B.json()}const B=await import("https"),Q={host:"lighter.codehike.org",path:`/${A}.json`,method:"GET"};return new Promise(((A,g)=>{const E=B.request(Q,(B=>{let Q="";B.on("data",(A=>{Q+=A})),B.on("end",(()=>{A(JSON.parse(Q))}))}));E.on("error",(A=>{g(A)})),E.end()}))}const g=A=>/^#([A-Fa-f0-9]{3,4}){1,2}$/.test(A),E=(A,B)=>A.match(new RegExp(`.{${B}}`,"g")),C=A=>parseInt(A.repeat(2/A.length),16);function I(A,B){return void 0!==A?A/255:"number"!=typeof B||B<0||B>1?1:B}function D(A,B){if(!A)return A;const{r:Q,g:D,b:w,a:o}=function(A){if(!A)return;if(!g(A))throw new Error("Invalid color string, must be a valid hex color");const B=Math.floor((A.length-1)/3),Q=E(A.slice(1),B),[D,w,o,s]=Q.map(C);return{r:D,g:w,b:o,a:I(s,1)}}(A);return function(A){if(!A)return;const{r:B,g:Q,b:g,a:E}=A,C=Math.round(255*E);return`#${B.toString(16).padStart(2,"0")}${Q.toString(16).padStart(2,"0")}${g.toString(16).padStart(2,"0")}${C.toString(16).padStart(2,"0")}`}({r:Q,g:D,b:w,a:o*B})}function w(A,B){const Q=A.colors||{};if(Q[B])return Q[B];const g=s[B];if(!g)throw new Error(`Unknown theme color key: ${B}`);return"string"==typeof g?w(A,g):function(A,B){const Q=B[A.type];if(Array.isArray(Q)){const[B,g,...E]=Q;return B(w(A,g),...E)}return Q}(A,g)}const o="#6FC3DF",s={"editor.foreground":{dark:"#bbbbbb",light:"#333333",hc:"#ffffff"},"editorLineNumber.foreground":{dark:"#858585",light:"#237893",hc:"#fffffe"},"editor.selectionBackground":{light:"#ADD6FF",dark:"#264F78",hc:"#f3f518"},"editor.background":{light:"#fffffe",dark:"#1E1E1E",hc:"#000000"},"editorGroupHeader.tabsBackground":{dark:"#252526",light:"#F3F3F3"},"tab.activeBackground":"editor.background","tab.activeForeground":{dark:"#ffffff",light:"#333333",hc:"#ffffff"},"tab.border":{dark:"#252526",light:"#F3F3F3",hc:o},"tab.activeBorder":"tab.activeBackground","tab.inactiveBackground":{dark:"#2D2D2D",light:"#ECECEC"},"tab.inactiveForeground":{dark:[D,"tab.activeForeground",.5],light:[D,"tab.activeForeground",.5],hc:"#ffffff"},"diffEditor.insertedTextBackground":{dark:"#9ccc2c33",light:"#9ccc2c40"},"diffEditor.removedTextBackground":{dark:"#ff000033",light:"#ff000033"},"diffEditor.insertedLineBackground":{dark:"#9bb95533",light:"#9bb95533"},"diffEditor.removedLineBackground":{dark:"#ff000033",light:"#ff000033"},"icon.foreground":{dark:"#C5C5C5",light:"#424242",hc:"#FFFFFF"},"sideBar.background":{dark:"#252526",light:"#F3F3F3",hc:"#000000"},"sideBar.foreground":"editor.foreground","sideBar.border":"sideBar.background","list.inactiveSelectionBackground":{dark:"#37373D",light:"#E4E6F1"},"list.inactiveSelectionForeground":{},"list.hoverBackground":{dark:"#2A2D2E",light:"#F0F0F0"},"list.hoverForeground":{},"editorGroupHeader.tabsBorder":{hc:o},"tab.activeBorderTop":{hc:o},"tab.hoverBackground":"tab.inactiveBackground","tab.hoverForeground":"tab.inactiveForeground","editor.rangeHighlightBackground":{dark:"#ffffff0b",light:"#fdff0033"},"editor.infoForeground":{dark:"#3794FF",light:"#1a85ff",hc:"#3794FF"},"input.border":{hc:o},"input.background":{dark:"#3C3C3C",light:"#fffffe",hc:"#000000"},"input.foreground":"editor.foreground","editor.lineHighlightBackground":{},focusBorder:{light:"#0090F1",dark:"#007FD4",hc:o},"editorGroup.border":{dark:"#444444",light:"#E7E7E7",hc:o},"list.activeSelectionBackground":{dark:"#094771",light:"#0060C0",hc:"#000000"},"list.activeSelectionForeground":{dark:"#fffffe",light:"#fffffe",hc:"#fffffe"},"lighter.inlineBackground":{dark:[D,"editor.background",.9],light:[D,"editor.background",.9]},"terminal.background":"editor.background","terminal.foreground":"editor.foreground","terminal.ansiBlack":{dark:"#000000",light:"#000000",hc:"#000000"},"terminal.ansiRed":{dark:"#cd3131",light:"#cd3131",hc:"#cd0000"},"terminal.ansiGreen":{dark:"#0DBC79",light:"#00BC00",hc:"#00cd00"},"terminal.ansiYellow":{dark:"#e5e510",light:"#949800",hc:"#cdcd00"},"terminal.ansiBlue":{dark:"#2472c8",light:"#0451a5",hc:"#0000ee"},"terminal.ansiMagenta":{dark:"#bc3fbc",light:"#bc05bc",hc:"#cd00cd"},"terminal.ansiCyan":{dark:"#11a8cd",light:"#0598bc",hc:"#00cdcd"},"terminal.ansiWhite":{dark:"#e5e5e5",light:"#555555",hc:"#e5e5e5"},"terminal.ansiBrightBlack":{dark:"#666666",light:"#666666",hc:"#7f7f7f"},"terminal.ansiBrightRed":{dark:"#f14c4c",light:"#cd3131",hc:"#ff0000"},"terminal.ansiBrightGreen":{dark:"#23d18b",light:"#14CE14",hc:"#00ff00"},"terminal.ansiBrightYellow":{dark:"#f5f543",light:"#b5ba00",hc:"#ffff00"},"terminal.ansiBrightBlue":{dark:"#3b8eea",light:"#0451a5",hc:"#5c5cff"},"terminal.ansiBrightMagenta":{dark:"#d670d6",light:"#bc05bc",hc:"#ff00ff"},"terminal.ansiBrightCyan":{dark:"#29b8db",light:"#0598bc",hc:"#00ffff"},"terminal.ansiBrightWhite":{dark:"#e5e5e5",light:"#a5a5a5",hc:"#ffffff"}},e=new Map,c=new Map;async function i(A){if("string"==typeof A){const g=A;if(!a.includes(g))throw new h(g);if(!e.has(g)){const A=async function(A){try{return await B("themes",A+".json")}catch(B){return await Q(`themes/${A}`)}}(g).then((A=>(c.set(g,A),A)));e.set(g,A)}return e.get(g)}return A}function t(A){let B=null;if("string"==typeof A){if(B=c.get(A),!B)throw new Error("Syntax highlighting error: theme not loaded")}else B=A;return function(A){if(!A)return;const B=A.settings||A.tokenColors||[],Q={name:A.name||"unknown-theme",type:M(A),foreground:"",background:"",settings:B,colors:A.colors||{},colorNames:A.colorNames},g=B.find((A=>!A.scope));if(g){const{foreground:A,background:B}=(null==g?void 0:g.settings)||{},E={};A&&!Q.colors["editor.foreground"]&&(E["editor.foreground"]=A),B&&!Q.colors["editor.background"]&&(E["editor.background"]=B),Object.keys(E).length>0&&(Q.colors=Object.assign(Object.assign({},Q.colors),E)),Q.foreground=A,Q.background=B}g||(Q.settings=[{settings:{foreground:w(Q,"editor.foreground"),background:w(Q,"editor.background")}},...Q.settings]);if(Q.background=Q.background||w(Q,"editor.background"),Q.foreground=Q.foreground||w(Q,"editor.foreground"),"from-css"===A.type&&!Q.colorNames){const A={};let B=0;Q.settings=Q.settings.map((Q=>{const g=Object.assign(Object.assign({},Q),{settings:Object.assign({},Q.settings)}),{foreground:E,background:C}=g.settings||{};return E&&!A[E]&&(A[E]=`#${B.toString(16).padStart(6,"0")}`,B++),C&&!A[C]&&(A[C]=`#${B.toString(16).padStart(6,"0")}`,B++),E&&(g.settings.foreground=A[E]),C&&(g.settings.background=A[C]),g})),Q.colorNames=A}return Q}(B)}function M(A){var B;if("from-css"===A.type)return"from-css";return"light"===(A.type?A.type:(null===(B=A.name)||void 0===B?void 0:B.toLowerCase().includes("light"))?"light":"dark")?"light":"dark"}const a=["dark-plus","dracula-soft","dracula","github-dark","github-dark-dimmed","github-from-css","github-light","light-plus","material-darker","material-default","material-from-css","material-lighter","material-ocean","material-palenight","min-dark","min-light","monokai","nord","one-dark-pro","poimandres","slack-dark","slack-ochin","solarized-dark","solarized-light"];class h extends Error{constructor(A){super(`Unknown theme: ${A}`),this.theme=A}}function n(A){const B=B=>"colorScheme"===B?function(A){return"from-css"===A.type?"var(--ch-0)":A.type}(A):"foreground"===B?A.foreground:"background"===B?A.background:w(A,B);return{colorScheme:B("colorScheme"),foreground:B("foreground"),background:B("background"),lighter:{inlineBackground:B("lighter.inlineBackground")},editor:{background:B("editor.background"),foreground:B("editor.foreground"),lineHighlightBackground:B("editor.lineHighlightBackground"),rangeHighlightBackground:B("editor.rangeHighlightBackground"),infoForeground:B("editor.infoForeground"),selectionBackground:B("editor.selectionBackground")},focusBorder:B("focusBorder"),tab:{activeBackground:B("tab.activeBackground"),activeForeground:B("tab.activeForeground"),inactiveBackground:B("tab.inactiveBackground"),inactiveForeground:B("tab.inactiveForeground"),border:B("tab.border"),activeBorder:B("tab.activeBorder"),activeBorderTop:B("tab.activeBorderTop")},editorGroup:{border:B("editorGroup.border")},editorGroupHeader:{tabsBackground:B("editorGroupHeader.tabsBackground")},editorLineNumber:{foreground:B("editorLineNumber.foreground")},input:{background:B("input.background"),foreground:B("input.foreground"),border:B("input.border")},icon:{foreground:B("icon.foreground")},sideBar:{background:B("sideBar.background"),foreground:B("sideBar.foreground"),border:B("sideBar.border")},list:{activeSelectionBackground:B("list.activeSelectionBackground"),activeSelectionForeground:B("list.activeSelectionForeground"),hoverBackground:B("list.hoverBackground"),hoverForeground:B("list.hoverForeground")}}}const F=["abap","actionscript-3","ada","apache","apex","apl","applescript","ara","asm","astro","awk","ballerina","bash","bat","batch","be","beancount","berry","bibtex","bicep","blade","c","c#","cadence","cdc","clarity","clj","clojure","cmake","cmd","cobol","codeql","coffee","console","cpp","crystal","cs","csharp","css","cue","cypher","d","dart","dax","diff","docker","dockerfile","dream-maker","elixir","elm","erb","erl","erlang","f#","fish","fs","fsharp","fsl","gdresource","gdscript","gdshader","gherkin","git-commit","git-rebase","glimmer-js","glimmer-ts","glsl","gnuplot","go","graphql","groovy","hack","haml","handlebars","haskell","hbs","hcl","hjson","hlsl","hs","html","http","imba","ini","jade","java","javascript","jinja-html","jison","js","json","json5","jsonc","jsonl","jsonnet","jssm","jsx","julia","kotlin","kql","kusto","latex","less","liquid","lisp","logo","lua","make","makefile","markdown","marko","matlab","md","mdx","mermaid","narrat","nextflow","nginx","nim","nix","objc","objective-c","objective-cpp","ocaml","pascal","perl","perl6","php","plsql","postcss","powerquery","powershell","prisma","prolog","properties","proto","ps","ps1","pug","puppet","purescript","py","python","ql","r","raku","razor","rb","reg","rel","riscv","rs","rst","ruby","rust","sas","sass","scala","scheme","scss","sh","shader","shaderlab","shell","shellscript","shellsession","smalltalk","solidity","sparql","sql","ssh-config","stata","styl","stylus","svelte","swift","system-verilog","tasl","tcl","terminal","tex","text","toml","ts","tsx","turtle","twig","txt","typescript","v","vb","verilog","vhdl","vim","viml","vimscript","vue","vue-html","vyper","wasm","wenyan","wgsl","wolfram","xml","xsl","yaml","yml","zenscript","zsh","文言"],G={abap:"source.abap","actionscript-3":"source.actionscript.3",ada:"source.ada",apache:"source.apacheconf",apex:"source.apex",apl:"source.apl",applescript:"source.applescript",ara:"source.ara",asm:"source.asm.x86_64",astro:"source.astro",awk:"source.awk",ballerina:"source.ballerina",bat:"source.batchfile",batch:"source.batchfile",beancount:"text.beancount",berry:"source.berry",be:"source.berry",bibtex:"text.bibtex",bicep:"source.bicep",blade:"text.html.php.blade",c:"source.c",cadence:"source.cadence",cdc:"source.cadence",clarity:"source.clar",clojure:"source.clojure",clj:"source.clojure",cmake:"source.cmake",cobol:"source.cobol",codeql:"source.ql",ql:"source.ql",coffee:"source.coffee",cpp:"source.cpp",crystal:"source.crystal",csharp:"source.cs","c#":"source.cs",cs:"source.cs",css:"source.css",cue:"source.cue",cypher:"source.cypher",d:"source.d",dart:"source.dart",dax:"source.dax",diff:"source.diff",docker:"source.dockerfile",dockerfile:"source.dockerfile","dream-maker":"source.dm",elixir:"source.elixir",elm:"source.elm",erb:"text.html.erb",erlang:"source.erlang",erl:"source.erlang",fish:"source.fish",fsharp:"source.fsharp","f#":"source.fsharp",fs:"source.fsharp",gdresource:"source.gdresource",gdscript:"source.gdscript",gdshader:"source.gdshader",gherkin:"text.gherkin.feature","git-commit":"text.git-commit","git-rebase":"text.git-rebase","glimmer-js":"source.gjs","glimmer-ts":"source.gts",glsl:"source.glsl",gnuplot:"source.gnuplot",go:"source.go",graphql:"source.graphql",groovy:"source.groovy",hack:"source.hack",haml:"text.haml",handlebars:"text.html.handlebars",hbs:"text.html.handlebars",haskell:"source.haskell",hs:"source.haskell",hcl:"source.hcl",hjson:"source.hjson",hlsl:"source.hlsl",html:"text.html.basic",http:"source.http",imba:"source.imba",ini:"source.ini",properties:"source.ini",java:"source.java",javascript:"source.js",js:"source.js","jinja-html":"text.html.jinja",jison:"source.jison",json:"source.json",json5:"source.json5",jsonc:"source.json.comments",jsonl:"source.json.lines",jsonnet:"source.jsonnet",jssm:"source.jssm",fsl:"source.jssm",jsx:"source.js.jsx",julia:"source.julia",kotlin:"source.kotlin",kusto:"source.kusto",kql:"source.kusto",latex:"text.tex.latex",less:"source.css.less",liquid:"text.html.liquid",lisp:"source.lisp",logo:"source.logo",lua:"source.lua",make:"source.makefile",makefile:"source.makefile",markdown:"text.html.markdown",md:"text.html.markdown",marko:"text.marko",matlab:"source.matlab",mdx:"source.mdx",mermaid:"source.mermaid",narrat:"source.narrat",nextflow:"source.nextflow",nginx:"source.nginx",nim:"source.nim",nix:"source.nix","objective-c":"source.objc",objc:"source.objc","objective-cpp":"source.objcpp",ocaml:"source.ocaml",pascal:"source.pascal",perl:"source.perl",php:"source.php",plsql:"source.plsql.oracle",postcss:"source.css.postcss",powerquery:"source.powerquery",powershell:"source.powershell",ps:"source.powershell",ps1:"source.powershell",prisma:"source.prisma",prolog:"source.prolog",proto:"source.proto",pug:"text.pug",jade:"text.pug",puppet:"source.puppet",purescript:"source.purescript",python:"source.python",py:"source.python",r:"source.r",raku:"source.perl.6",perl6:"source.perl.6",razor:"text.aspnetcorerazor",reg:"source.reg",rel:"source.rel",riscv:"source.riscv",rst:"source.rst",ruby:"source.ruby",rb:"source.ruby",rust:"source.rust",rs:"source.rust",sas:"source.sas",sass:"source.sass",scala:"source.scala",scheme:"source.scheme",scss:"source.css.scss",shaderlab:"source.shaderlab",shader:"source.shaderlab",shellscript:"source.shell",bash:"source.shell",console:"source.shell",sh:"source.shell",shell:"source.shell",zsh:"source.shell",shellsession:"text.shell-session",smalltalk:"source.smalltalk",solidity:"source.solidity",sparql:"source.sparql",sql:"source.sql","ssh-config":"source.ssh-config",stata:"source.stata",stylus:"source.stylus",styl:"source.stylus",svelte:"source.svelte",swift:"source.swift","system-verilog":"source.systemverilog",tasl:"source.tasl",tcl:"source.tcl",tex:"text.tex",toml:"source.toml",tsx:"source.tsx",turtle:"source.turtle",twig:"text.html.twig",txt:"source.txt",typescript:"source.ts",ts:"source.ts",v:"source.v",vb:"source.asp.vb.net",cmd:"source.asp.vb.net",verilog:"source.verilog",vhdl:"source.vhdl",viml:"source.viml",vim:"source.viml",vimscript:"source.viml","vue-html":"text.html.vue-html",vue:"source.vue",vyper:"source.vyper",wasm:"source.wat",wenyan:"source.wenyan","文言":"source.wenyan",wgsl:"source.wgsl",wolfram:"source.wolfram",xml:"text.xml",xsl:"text.xml.xsl",yaml:"source.yaml",yml:"source.yaml",zenscript:"source.zenscript"},r={"source.abap":{id:"abap",path:"abap.tmLanguage.json",embeddedScopes:[]},"source.actionscript.3":{id:"actionscript-3",path:"actionscript-3.tmLanguage.json",embeddedScopes:[]},"source.ada":{id:"ada",path:"ada.tmLanguage.json",embeddedScopes:[]},"source.apacheconf":{id:"apache",path:"apache.tmLanguage.json",embeddedScopes:[]},"source.apex":{id:"apex",path:"apex.tmLanguage.json",embeddedScopes:[]},"source.apl":{id:"apl",path:"apl.tmLanguage.json",embeddedScopes:["source.java","source.json","source.js","source.css","text.xml","text.html.basic"]},"source.applescript":{id:"applescript",path:"applescript.tmLanguage.json",embeddedScopes:[]},"source.ara":{id:"ara",path:"ara.tmLanguage.json",embeddedScopes:[]},"source.asm.x86_64":{id:"asm",path:"asm.tmLanguage.json",embeddedScopes:[]},"source.astro":{id:"astro",path:"astro.tmLanguage.json",embeddedScopes:["source.tsx","source.css.postcss","source.css.less","source.css.scss","source.css","source.sass","source.stylus","source.ts","source.js","source.json"]},"source.awk":{id:"awk",path:"awk.tmLanguage.json",embeddedScopes:[]},"source.ballerina":{id:"ballerina",path:"ballerina.tmLanguage.json",embeddedScopes:[]},"source.batchfile":{id:"bat",path:"bat.tmLanguage.json",embeddedScopes:[]},"text.beancount":{id:"beancount",path:"beancount.tmLanguage.json",embeddedScopes:[]},"source.berry":{id:"berry",path:"berry.tmLanguage.json",embeddedScopes:[]},"text.bibtex":{id:"bibtex",path:"bibtex.tmLanguage.json",embeddedScopes:[]},"source.bicep":{id:"bicep",path:"bicep.tmLanguage.json",embeddedScopes:[]},"text.html.php.blade":{id:"blade",path:"blade.tmLanguage.json",embeddedScopes:["source.java","source.css","source.json","source.js","source.sql","text.xml","text.html.basic"]},"source.c":{id:"c",path:"c.tmLanguage.json",embeddedScopes:[]},"source.cadence":{id:"cadence",path:"cadence.tmLanguage.json",embeddedScopes:[]},"source.clar":{id:"clarity",path:"clarity.tmLanguage.json",embeddedScopes:[]},"source.clojure":{id:"clojure",path:"clojure.tmLanguage.json",embeddedScopes:[]},"source.cmake":{id:"cmake",path:"cmake.tmLanguage.json",embeddedScopes:[]},"source.cobol":{id:"cobol",path:"cobol.tmLanguage.json",embeddedScopes:["source.css","source.js","source.java","text.html.basic","source.sql"]},"source.ql":{id:"codeql",path:"codeql.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.stylus","source.sass","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.tsx","source.ts","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.css.scss","source.swift","source.objc","source.css.less","source.json.comments","source.json","source.js","text.pug","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.coffee","source.clojure","source.batchfile","source.yaml","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","text.html.basic","source.css","text.html.markdown"]},"source.coffee":{id:"coffee",path:"coffee.tmLanguage.json",embeddedScopes:["source.js"]},"source.cpp":{id:"cpp",path:"cpp.tmLanguage.json",embeddedScopes:["source.c","source.sql","source.glsl"]},"source.crystal":{id:"crystal",path:"crystal.tmLanguage.json",embeddedScopes:["source.shell","source.js","source.c","source.css","source.sql","text.html.basic"]},"source.cs":{id:"csharp",path:"csharp.tmLanguage.json",embeddedScopes:[]},"source.css":{id:"css",path:"css.tmLanguage.json",embeddedScopes:[]},"source.cue":{id:"cue",path:"cue.tmLanguage.json",embeddedScopes:[]},"source.cypher":{id:"cypher",path:"cypher.tmLanguage.json",embeddedScopes:[]},"source.d":{id:"d",path:"d.tmLanguage.json",embeddedScopes:[]},"source.dart":{id:"dart",path:"dart.tmLanguage.json",embeddedScopes:[]},"source.dax":{id:"dax",path:"dax.tmLanguage.json",embeddedScopes:[]},"source.diff":{id:"diff",path:"diff.tmLanguage.json",embeddedScopes:[]},"source.dockerfile":{id:"docker",path:"docker.tmLanguage.json",embeddedScopes:[]},"source.dm":{id:"dream-maker",path:"dream-maker.tmLanguage.json",embeddedScopes:[]},"source.elixir":{id:"elixir",path:"elixir.tmLanguage.json",embeddedScopes:["source.css","source.js","text.html.basic"]},"source.elm":{id:"elm",path:"elm.tmLanguage.json",embeddedScopes:["source.c","source.glsl"]},"text.html.erb":{id:"erb",path:"erb.tmLanguage.json",embeddedScopes:["source.java","source.lua","source.shell","source.c","source.sql","text.xml","source.css","source.js","source.ruby","text.html.basic"]},"source.erlang":{id:"erlang",path:"erlang.tmLanguage.json",embeddedScopes:[]},"source.fish":{id:"fish",path:"fish.tmLanguage.json",embeddedScopes:[]},"source.fsharp":{id:"fsharp",path:"fsharp.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.stylus","source.sass","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.cs","source.tsx","source.ts","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.css.scss","source.swift","source.objc","source.css.less","source.json.comments","source.json","source.js","text.pug","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.coffee","source.clojure","source.batchfile","source.yaml","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","text.html.basic","source.css","text.html.markdown"]},"source.gdresource":{id:"gdresource",path:"gdresource.tmLanguage.json",embeddedScopes:["source.gdscript","source.gdshader"]},"source.gdscript":{id:"gdscript",path:"gdscript.tmLanguage.json",embeddedScopes:[]},"source.gdshader":{id:"gdshader",path:"gdshader.tmLanguage.json",embeddedScopes:[]},"text.gherkin.feature":{id:"gherkin",path:"gherkin.tmLanguage.json",embeddedScopes:[]},"text.git-commit":{id:"git-commit",path:"git-commit.tmLanguage.json",embeddedScopes:["source.diff"]},"text.git-rebase":{id:"git-rebase",path:"git-rebase.tmLanguage.json",embeddedScopes:["source.shell"]},"source.gjs":{id:"glimmer-js",path:"glimmer-js.tmLanguage.json",embeddedScopes:["source.yaml","source.css","text.html.basic","text.html.handlebars","source.js"]},"source.gts":{id:"glimmer-ts",path:"glimmer-ts.tmLanguage.json",embeddedScopes:["source.yaml","source.js","source.css","text.html.basic","text.html.handlebars","source.ts"]},"source.glsl":{id:"glsl",path:"glsl.tmLanguage.json",embeddedScopes:["source.c"]},"source.gnuplot":{id:"gnuplot",path:"gnuplot.tmLanguage.json",embeddedScopes:[]},"source.go":{id:"go",path:"go.tmLanguage.json",embeddedScopes:[]},"source.graphql":{id:"graphql",path:"graphql.tmLanguage.json",embeddedScopes:["source.tsx","source.js.jsx","source.ts","source.js"]},"source.groovy":{id:"groovy",path:"groovy.tmLanguage.json",embeddedScopes:[]},"source.hack":{id:"hack",path:"hack.tmLanguage.json",embeddedScopes:["source.css","source.js","source.sql","text.html.basic"]},"text.haml":{id:"haml",path:"haml.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.stylus","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.tsx","source.ts","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.css.scss","source.swift","source.objc","source.css.less","source.json.comments","source.json","text.pug","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.clojure","source.batchfile","source.yaml","text.xml.xsl","source.asp.vb.net","source.php","source.r","source.perl","source.makefile","source.java","source.ini","source.lua","source.shell","source.c","source.sql","text.xml","text.html.basic","source.css","text.html.markdown","source.coffee","source.sass","source.js","source.ruby"]},"text.html.handlebars":{id:"handlebars",path:"handlebars.tmLanguage.json",embeddedScopes:["source.yaml","source.js","source.css","text.html.basic"]},"source.haskell":{id:"haskell",path:"haskell.tmLanguage.json",embeddedScopes:[]},"source.hcl":{id:"hcl",path:"hcl.tmLanguage.json",embeddedScopes:[]},"source.hjson":{id:"hjson",path:"hjson.tmLanguage.json",embeddedScopes:[]},"source.hlsl":{id:"hlsl",path:"hlsl.tmLanguage.json",embeddedScopes:[]},"text.html.basic":{id:"html",path:"html.tmLanguage.json",embeddedScopes:["source.css","source.js"]},"source.http":{id:"http",path:"http.tmLanguage.json",embeddedScopes:["source.tsx","source.js.jsx","source.ts","source.js","source.java","source.graphql","text.xml","source.json","source.shell"]},"source.imba":{id:"imba",path:"imba.tmLanguage.json",embeddedScopes:[]},"source.ini":{id:"ini",path:"ini.tmLanguage.json",embeddedScopes:[]},"source.java":{id:"java",path:"java.tmLanguage.json",embeddedScopes:[]},"source.js":{id:"javascript",path:"javascript.tmLanguage.json",embeddedScopes:[]},"text.html.jinja":{id:"jinja-html",path:"jinja-html.tmLanguage.json",embeddedScopes:["source.css","source.js","text.html.basic"]},"source.jison":{id:"jison",path:"jison.tmLanguage.json",embeddedScopes:["source.js"]},"source.json":{id:"json",path:"json.tmLanguage.json",embeddedScopes:[]},"source.json5":{id:"json5",path:"json5.tmLanguage.json",embeddedScopes:[]},"source.json.comments":{id:"jsonc",path:"jsonc.tmLanguage.json",embeddedScopes:[]},"source.json.lines":{id:"jsonl",path:"jsonl.tmLanguage.json",embeddedScopes:[]},"source.jsonnet":{id:"jsonnet",path:"jsonnet.tmLanguage.json",embeddedScopes:[]},"source.jssm":{id:"jssm",path:"jssm.tmLanguage.json",embeddedScopes:[]},"source.js.jsx":{id:"jsx",path:"jsx.tmLanguage.json",embeddedScopes:[]},"source.julia":{id:"julia",path:"julia.tmLanguage.json",embeddedScopes:["source.c","source.glsl","source.sql","source.r","source.js","source.python","source.cpp"]},"source.kotlin":{id:"kotlin",path:"kotlin.tmLanguage.json",embeddedScopes:[]},"source.kusto":{id:"kusto",path:"kusto.tmLanguage.json",embeddedScopes:[]},"text.tex.latex":{id:"latex",path:"latex.tmLanguage.json",embeddedScopes:["source.glsl","source.shell","source.sql","source.cpp","source.c","source.r","source.gnuplot","source.scala","source.rust","source.yaml","source.python","source.ts","source.js","source.ruby","source.julia","source.lua","source.java","text.xml","text.html.basic","source.haskell","source.css","text.tex"]},"source.css.less":{id:"less",path:"less.tmLanguage.json",embeddedScopes:["source.css"]},"text.html.liquid":{id:"liquid",path:"liquid.tmLanguage.json",embeddedScopes:["source.js","source.json","source.css","text.html.basic"]},"source.lisp":{id:"lisp",path:"lisp.tmLanguage.json",embeddedScopes:[]},"source.logo":{id:"logo",path:"logo.tmLanguage.json",embeddedScopes:[]},"source.lua":{id:"lua",path:"lua.tmLanguage.json",embeddedScopes:["source.c"]},"source.makefile":{id:"make",path:"make.tmLanguage.json",embeddedScopes:[]},"text.html.markdown":{id:"markdown",path:"markdown.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.stylus","source.sass","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.tsx","source.ts","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.css.scss","source.swift","source.objc","source.css.less","source.json.comments","source.json","source.js","text.pug","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.coffee","source.clojure","source.batchfile","source.yaml","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","text.html.basic","source.css"]},"text.marko":{id:"marko",path:"marko.tmLanguage.json",embeddedScopes:["source.js","source.css.scss","source.css.less","source.css"]},"source.matlab":{id:"matlab",path:"matlab.tmLanguage.json",embeddedScopes:[]},"source.mdx":{id:"mdx",path:"mdx.tmLanguage.json",embeddedScopes:["source.gnuplot","text.tex","source.stylus","source.sass","text.bibtex","text.tex.latex","text.html.handlebars","source.dart","source.fsharp","source.powershell","source.perl.6","source.json.comments","text.pug","source.groovy","text.git-rebase","text.git-commit","source.batchfile","text.xml.xsl","source.asp.vb.net","source.php","source.js.jsx","source.glsl","source.ts","source.swift","text.xml","source.sql","text.shell-session","source.shell","source.css.scss","source.scala","source.rust","source.ruby","source.r","source.python","source.perl","source.objc","text.html.markdown","source.makefile","source.lua","source.css.less","source.kotlin","source.julia","source.json","source.js","source.java","source.ini","text.html.basic","source.haskell","source.graphql","source.go","source.erlang","source.elm","source.elixir","source.dockerfile","source.diff","source.css","source.cs","source.cpp","source.coffee","source.clojure","source.c","source.yaml","source.toml","source.tsx"]},"source.mermaid":{id:"mermaid",path:"mermaid.tmLanguage.json",embeddedScopes:[]},"source.narrat":{id:"narrat",path:"narrat.tmLanguage.json",embeddedScopes:[]},"source.nextflow":{id:"nextflow",path:"nextflow.tmLanguage.json",embeddedScopes:[]},"source.nginx":{id:"nginx",path:"nginx.tmLanguage.json",embeddedScopes:["source.c","source.lua"]},"source.nim":{id:"nim",path:"nim.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.stylus","source.sass","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.tsx","source.ts","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.css.scss","source.swift","source.objc","source.css.less","source.json.comments","source.json","text.pug","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.coffee","source.clojure","source.batchfile","source.yaml","text.xml.xsl","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.ini","source.java","text.html.markdown","source.glsl","source.css","source.js","text.xml","text.html.basic","source.c"]},"source.nix":{id:"nix",path:"nix.tmLanguage.json",embeddedScopes:[]},"source.objc":{id:"objective-c",path:"objective-c.tmLanguage.json",embeddedScopes:[]},"source.objcpp":{id:"objective-cpp",path:"objective-cpp.tmLanguage.json",embeddedScopes:[]},"source.ocaml":{id:"ocaml",path:"ocaml.tmLanguage.json",embeddedScopes:[]},"source.pascal":{id:"pascal",path:"pascal.tmLanguage.json",embeddedScopes:[]},"source.perl":{id:"perl",path:"perl.tmLanguage.json",embeddedScopes:["source.java","source.sql","source.js","source.css","text.xml","text.html.basic"]},"source.php":{id:"php",path:"php.tmLanguage.json",embeddedScopes:["source.java","source.css","source.json","source.js","source.sql","text.xml","text.html.basic"]},"source.plsql.oracle":{id:"plsql",path:"plsql.tmLanguage.json",embeddedScopes:[]},"source.css.postcss":{id:"postcss",path:"postcss.tmLanguage.json",embeddedScopes:[]},"source.powerquery":{id:"powerquery",path:"powerquery.tmLanguage.json",embeddedScopes:[]},"source.powershell":{id:"powershell",path:"powershell.tmLanguage.json",embeddedScopes:[]},"source.prisma":{id:"prisma",path:"prisma.tmLanguage.json",embeddedScopes:[]},"source.prolog":{id:"prolog",path:"prolog.tmLanguage.json",embeddedScopes:[]},"source.proto":{id:"proto",path:"proto.tmLanguage.json",embeddedScopes:[]},"text.pug":{id:"pug",path:"pug.tmLanguage.json",embeddedScopes:["text.html.basic","source.coffee","source.stylus","source.css.scss","source.sass","source.css","source.js"]},"source.puppet":{id:"puppet",path:"puppet.tmLanguage.json",embeddedScopes:[]},"source.purescript":{id:"purescript",path:"purescript.tmLanguage.json",embeddedScopes:[]},"source.python":{id:"python",path:"python.tmLanguage.json",embeddedScopes:[]},"source.r":{id:"r",path:"r.tmLanguage.json",embeddedScopes:[]},"source.perl.6":{id:"raku",path:"raku.tmLanguage.json",embeddedScopes:[]},"text.aspnetcorerazor":{id:"razor",path:"razor.tmLanguage.json",embeddedScopes:["source.css","source.js","source.cs","text.html.basic"]},"source.reg":{id:"reg",path:"reg.tmLanguage.json",embeddedScopes:[]},"source.rel":{id:"rel",path:"rel.tmLanguage.json",embeddedScopes:[]},"source.riscv":{id:"riscv",path:"riscv.tmLanguage.json",embeddedScopes:[]},"source.rst":{id:"rst",path:"rst.tmLanguage.json",embeddedScopes:["source.java","source.lua","source.c","source.css","text.xml","text.html.basic","source.sql","source.glsl","source.ruby","source.cmake","source.yaml","source.shell","source.js","source.python","source.cpp"]},"source.ruby":{id:"ruby",path:"ruby.tmLanguage.json",embeddedScopes:["source.java","source.lua","source.shell","source.js","source.c","source.css","source.sql","text.xml","text.html.basic"]},"source.rust":{id:"rust",path:"rust.tmLanguage.json",embeddedScopes:[]},"source.sas":{id:"sas",path:"sas.tmLanguage.json",embeddedScopes:["source.sql"]},"source.sass":{id:"sass",path:"sass.tmLanguage.json",embeddedScopes:[]},"source.scala":{id:"scala",path:"scala.tmLanguage.json",embeddedScopes:[]},"source.scheme":{id:"scheme",path:"scheme.tmLanguage.json",embeddedScopes:[]},"source.css.scss":{id:"scss",path:"scss.tmLanguage.json",embeddedScopes:["source.css"]},"source.shaderlab":{id:"shaderlab",path:"shaderlab.tmLanguage.json",embeddedScopes:["source.hlsl"]},"source.shell":{id:"shellscript",path:"shellscript.tmLanguage.json",embeddedScopes:[]},"text.shell-session":{id:"shellsession",path:"shellsession.tmLanguage.json",embeddedScopes:["source.shell"]},"source.smalltalk":{id:"smalltalk",path:"smalltalk.tmLanguage.json",embeddedScopes:[]},"source.solidity":{id:"solidity",path:"solidity.tmLanguage.json",embeddedScopes:[]},"source.sparql":{id:"sparql",path:"sparql.tmLanguage.json",embeddedScopes:["source.turtle"]},"source.sql":{id:"sql",path:"sql.tmLanguage.json",embeddedScopes:[]},"source.ssh-config":{id:"ssh-config",path:"ssh-config.tmLanguage.json",embeddedScopes:[]},"source.stata":{id:"stata",path:"stata.tmLanguage.json",embeddedScopes:["source.sql"]},"source.stylus":{id:"stylus",path:"stylus.tmLanguage.json",embeddedScopes:[]},"source.svelte":{id:"svelte",path:"svelte.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.tsx","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.swift","source.objc","source.json.comments","source.json","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.clojure","source.batchfile","source.yaml","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","text.html.basic","text.html.markdown","text.pug","source.css.postcss","source.css.less","source.css.scss","source.css","source.sass","source.stylus","source.coffee","source.ts","source.js"]},"source.swift":{id:"swift",path:"swift.tmLanguage.json",embeddedScopes:[]},"source.systemverilog":{id:"system-verilog",path:"system-verilog.tmLanguage.json",embeddedScopes:[]},"source.tasl":{id:"tasl",path:"tasl.tmLanguage.json",embeddedScopes:[]},"source.tcl":{id:"tcl",path:"tcl.tmLanguage.json",embeddedScopes:[]},"text.tex":{id:"tex",path:"tex.tmLanguage.json",embeddedScopes:["source.r"]},"source.toml":{id:"toml",path:"toml.tmLanguage.json",embeddedScopes:[]},"source.tsx":{id:"tsx",path:"tsx.tmLanguage.json",embeddedScopes:[]},"source.turtle":{id:"turtle",path:"turtle.tmLanguage.json",embeddedScopes:[]},"text.html.twig":{id:"twig",path:"twig.tmLanguage.json",embeddedScopes:["source.java","source.lua","source.shell","source.c","source.json","source.sql","text.xml","text.html.basic","source.ruby","source.python","source.php","source.js","source.css"]},"source.txt":{id:"txt",path:"txt.tmLanguage.json",embeddedScopes:[]},"source.ts":{id:"typescript",path:"typescript.tmLanguage.json",embeddedScopes:[]},"source.v":{id:"v",path:"v.tmLanguage.json",embeddedScopes:[]},"source.asp.vb.net":{id:"vb",path:"vb.tmLanguage.json",embeddedScopes:[]},"source.verilog":{id:"verilog",path:"verilog.tmLanguage.json",embeddedScopes:[]},"source.vhdl":{id:"vhdl",path:"vhdl.tmLanguage.json",embeddedScopes:[]},"source.viml":{id:"viml",path:"viml.tmLanguage.json",embeddedScopes:[]},"text.html.vue-html":{id:"vue-html",path:"vue-html.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.swift","source.objc","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.coffee","source.clojure","source.batchfile","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","source.graphql","source.toml","source.yaml","source.json5","source.json.comments","source.json","source.tsx","source.js.jsx","source.ts","source.css.less","source.css.scss","source.css","source.sass","source.stylus","text.pug","text.html.markdown","text.html.basic","source.js","source.vue"]},"source.vue":{id:"vue",path:"vue.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.swift","source.objc","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.coffee","source.clojure","source.batchfile","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","source.graphql","source.toml","source.yaml","source.json5","source.json.comments","source.json","source.tsx","source.js.jsx","source.ts","source.js","source.css.less","source.css.scss","source.css","source.sass","source.stylus","text.pug","text.html.markdown","text.html.basic"]},"source.vyper":{id:"vyper",path:"vyper.tmLanguage.json",embeddedScopes:[]},"source.wat":{id:"wasm",path:"wasm.tmLanguage.json",embeddedScopes:[]},"source.wenyan":{id:"wenyan",path:"wenyan.tmLanguage.json",embeddedScopes:[]},"source.wgsl":{id:"wgsl",path:"wgsl.tmLanguage.json",embeddedScopes:[]},"source.wolfram":{id:"wolfram",path:"wolfram.tmLanguage.json",embeddedScopes:[]},"text.xml":{id:"xml",path:"xml.tmLanguage.json",embeddedScopes:["source.java"]},"text.xml.xsl":{id:"xsl",path:"xsl.tmLanguage.json",embeddedScopes:["source.java","text.xml"]},"source.yaml":{id:"yaml",path:"yaml.tmLanguage.json",embeddedScopes:[]},"source.zenscript":{id:"zenscript",path:"zenscript.tmLanguage.json",embeddedScopes:[]}};var N={d:(A,B)=>{for(var Q in B)N.o(B,Q)&&!N.o(A,Q)&&Object.defineProperty(A,Q,{enumerable:!0,get:B[Q]})},o:(A,B)=>Object.prototype.hasOwnProperty.call(A,B)},L={};N.d(L,{_X:()=>vA,Bz:()=>XA,ot:()=>TA,u:()=>WA,jG:()=>Y,Pn:()=>ZA});const H="undefined"!=typeof process&&!!process.env.VSCODE_TEXTMATE_DEBUG;var k;function R(A,B){const Q=[],g=function(A){let B=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,Q=B.exec(A);return{next:()=>{if(!Q)return null;const g=Q[0];return Q=B.exec(A),g}}}(A);let E=g.next();for(;null!==E;){let A=0;if(2===E.length&&":"===E.charAt(1)){switch(E.charAt(0)){case"R":A=1;break;case"L":A=-1;break;default:console.log(`Unknown priority ${E} in scope selector`)}E=g.next()}let B=I();if(Q.push({matcher:B,priority:A}),","!==E)break;E=g.next()}return Q;function C(){if("-"===E){E=g.next();const A=C();return B=>!!A&&!A(B)}if("("===E){E=g.next();const A=function(){const A=[];let B=I();for(;B&&(A.push(B),"|"===E||","===E);){do{E=g.next()}while("|"===E||","===E);B=I()}return B=>A.some((A=>A(B)))}();return")"===E&&(E=g.next()),A}if(K(E)){const A=[];do{A.push(E),E=g.next()}while(K(E));return Q=>B(A,Q)}return null}function I(){const A=[];let B=C();for(;B;)A.push(B),B=C();return B=>A.every((A=>A(B)))}}function K(A){return!!A&&!!A.match(/[\w\.:]+/)}function Y(A){"function"==typeof A.dispose&&A.dispose()}function U(A){return Array.isArray(A)?function(A){let B=[];for(let Q=0,g=A.length;Q{for(let Q in B)A[Q]=B[Q]})),A}function u(A){const B=~A.lastIndexOf("/")||~A.lastIndexOf("\\");return 0===B?A:~B==A.length-1?u(A.substring(0,A.length-1)):A.substr(1+~B)}!function(A){A.toBinaryStr=function(A){let B=A.toString(2);for(;B.length<32;)B="0"+B;return B},A.print=function(B){const Q=A.getLanguageId(B),g=A.getTokenType(B),E=A.getFontStyle(B),C=A.getForeground(B),I=A.getBackground(B);console.log({languageId:Q,tokenType:g,fontStyle:E,foreground:C,background:I})},A.getLanguageId=function(A){return(255&A)>>>0},A.getTokenType=function(A){return(768&A)>>>8},A.containsBalancedBrackets=function(A){return 0!=(1024&A)},A.getFontStyle=function(A){return(30720&A)>>>11},A.getForeground=function(A){return(16744448&A)>>>15},A.getBackground=function(A){return(4278190080&A)>>>24},A.set=function(B,Q,g,E,C,I,D){let w=A.getLanguageId(B),o=A.getTokenType(B),s=A.containsBalancedBrackets(B)?1:0,e=A.getFontStyle(B),c=A.getForeground(B),i=A.getBackground(B);return 0!==Q&&(w=Q),8!==g&&(o=g),null!==E&&(s=E?1:0),-1!==C&&(e=C),0!==I&&(c=I),0!==D&&(i=D),(w<<0|o<<8|s<<10|e<<11|c<<15|i<<24)>>>0}}(k||(k={}));let y=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g;class J{static hasCaptures(A){return null!==A&&(y.lastIndex=0,y.test(A))}static replaceCaptures(A,B,Q){return A.replace(y,((A,g,E,C)=>{let I=Q[parseInt(g||E,10)];if(!I)return A;{let A=B.substring(I.start,I.end);for(;"."===A[0];)A=A.substring(1);switch(C){case"downcase":return A.toLowerCase();case"upcase":return A.toUpperCase();default:return A}}}))}}function S(A,B){return AB?1:0}function p(A,B){if(null===A&&null===B)return 0;if(!A)return-1;if(!B)return 1;let Q=A.length,g=B.length;if(Q===g){for(let g=0;g`);return}const C=Q.lookup(B);A instanceof m?X({baseGrammar:C,selfGrammar:E},g):T(A.ruleName,{baseGrammar:C,selfGrammar:E,repository:E.repository},g);const I=Q.injections(A.scopeName);if(I)for(const A of I)g.add(new m(A))}function T(A,B,Q){B.repository&&B.repository[A]&&v([B.repository[A]],B,Q)}function X(A,B){A.selfGrammar.patterns&&Array.isArray(A.selfGrammar.patterns)&&v(A.selfGrammar.patterns,{...A,repository:A.selfGrammar.repository},B),A.selfGrammar.injections&&v(Object.values(A.selfGrammar.injections),{...A,repository:A.selfGrammar.repository},B)}function v(A,B,Q){for(const g of A){if(Q.visitedRule.has(g))continue;Q.visitedRule.add(g);const A=g.repository?P({},B.repository,g.repository):B.repository;Array.isArray(g.patterns)&&v(g.patterns,{...B,repository:A},Q);const E=g.include;if(!E)continue;const C=$(E);switch(C.kind){case 0:X({...B,selfGrammar:B.baseGrammar},Q);break;case 1:X(B,Q);break;case 2:T(C.ruleName,{...B,repository:A},Q);break;case 3:case 4:const g=C.scopeName===B.selfGrammar.scopeName?B.selfGrammar:C.scopeName===B.baseGrammar.scopeName?B.baseGrammar:void 0;if(g){const E={baseGrammar:B.baseGrammar,selfGrammar:g,repository:A};4===C.kind?T(C.ruleName,E,Q):X(E,Q)}else 4===C.kind?Q.add(new O(C.scopeName,C.ruleName)):Q.add(new m(C.scopeName))}}}class Z{constructor(){this.kind=0}}class j{constructor(){this.kind=1}}class V{constructor(A){this.ruleName=A,this.kind=2}}class z{constructor(A){this.scopeName=A,this.kind=3}}class _{constructor(A,B){this.scopeName=A,this.ruleName=B,this.kind=4}}function $(A){if("$base"===A)return new Z;if("$self"===A)return new j;const B=A.indexOf("#");if(-1===B)return new z(A);if(0===B)return new V(A.substring(1));{const Q=A.substring(0,B),g=A.substring(B+1);return new _(Q,g)}}const AA=/\\(\d+)/,BA=/\\(\d+)/g;class QA{constructor(A,B,Q,g){this.$location=A,this.id=B,this._name=Q||null,this._nameIsCapturing=J.hasCaptures(this._name),this._contentName=g||null,this._contentNameIsCapturing=J.hasCaptures(this._contentName)}get debugName(){const A=this.$location?`${u(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${A}`}getName(A,B){return this._nameIsCapturing&&null!==this._name&&null!==A&&null!==B?J.replaceCaptures(this._name,A,B):this._name}getContentName(A,B){return this._contentNameIsCapturing&&null!==this._contentName?J.replaceCaptures(this._contentName,A,B):this._contentName}}class gA extends QA{constructor(A,B,Q,g,E){super(A,B,Q,g),this.retokenizeCapturedWithRuleId=E}dispose(){}collectPatterns(A,B){throw new Error("Not supported!")}compile(A,B){throw new Error("Not supported!")}compileAG(A,B,Q,g){throw new Error("Not supported!")}}class EA extends QA{constructor(A,B,Q,g,E){super(A,B,Q,null),this._match=new oA(g,this.id),this.captures=E,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(A,B){B.push(this._match)}compile(A,B){return this._getCachedCompiledPatterns(A).compile(A)}compileAG(A,B,Q,g){return this._getCachedCompiledPatterns(A).compileAG(A,Q,g)}_getCachedCompiledPatterns(A){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new sA,this.collectPatterns(A,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}}class CA extends QA{constructor(A,B,Q,g,E){super(A,B,Q,g),this.patterns=E.patterns,this.hasMissingPatterns=E.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(A,B){for(const Q of this.patterns)A.getRule(Q).collectPatterns(A,B)}compile(A,B){return this._getCachedCompiledPatterns(A).compile(A)}compileAG(A,B,Q,g){return this._getCachedCompiledPatterns(A).compileAG(A,Q,g)}_getCachedCompiledPatterns(A){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new sA,this.collectPatterns(A,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}}class IA extends QA{constructor(A,B,Q,g,E,C,I,D,w,o){super(A,B,Q,g),this._begin=new oA(E,this.id),this.beginCaptures=C,this._end=new oA(I||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=D,this.applyEndPatternLast=w||!1,this.patterns=o.patterns,this.hasMissingPatterns=o.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(A,B){return this._end.resolveBackReferences(A,B)}collectPatterns(A,B){B.push(this._begin)}compile(A,B){return this._getCachedCompiledPatterns(A,B).compile(A)}compileAG(A,B,Q,g){return this._getCachedCompiledPatterns(A,B).compileAG(A,Q,g)}_getCachedCompiledPatterns(A,B){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new sA;for(const B of this.patterns)A.getRule(B).collectPatterns(A,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,B):this._cachedCompiledPatterns.setSource(0,B)),this._cachedCompiledPatterns}}class DA extends QA{constructor(A,B,Q,g,E,C,I,D,w){super(A,B,Q,g),this._begin=new oA(E,this.id),this.beginCaptures=C,this.whileCaptures=D,this._while=new oA(I,-2),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=w.patterns,this.hasMissingPatterns=w.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(A,B){return this._while.resolveBackReferences(A,B)}collectPatterns(A,B){B.push(this._begin)}compile(A,B){return this._getCachedCompiledPatterns(A).compile(A)}compileAG(A,B,Q,g){return this._getCachedCompiledPatterns(A).compileAG(A,Q,g)}_getCachedCompiledPatterns(A){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new sA;for(const B of this.patterns)A.getRule(B).collectPatterns(A,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(A,B){return this._getCachedCompiledWhilePatterns(A,B).compile(A)}compileWhileAG(A,B,Q,g){return this._getCachedCompiledWhilePatterns(A,B).compileAG(A,Q,g)}_getCachedCompiledWhilePatterns(A,B){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new sA,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,B||"￿"),this._cachedCompiledWhilePatterns}}class wA{static createCaptureRule(A,B,Q,g,E){return A.registerRule((A=>new gA(B,A,Q,g,E)))}static getCompiledRuleId(A,B,Q){return A.id||B.registerRule((g=>{if(A.id=g,A.match)return new EA(A.$vscodeTextmateLocation,A.id,A.name,A.match,wA._compileCaptures(A.captures,B,Q));if(void 0===A.begin){A.repository&&(Q=P({},Q,A.repository));let g=A.patterns;return void 0===g&&A.include&&(g=[{include:A.include}]),new CA(A.$vscodeTextmateLocation,A.id,A.name,A.contentName,wA._compilePatterns(g,B,Q))}return A.while?new DA(A.$vscodeTextmateLocation,A.id,A.name,A.contentName,A.begin,wA._compileCaptures(A.beginCaptures||A.captures,B,Q),A.while,wA._compileCaptures(A.whileCaptures||A.captures,B,Q),wA._compilePatterns(A.patterns,B,Q)):new IA(A.$vscodeTextmateLocation,A.id,A.name,A.contentName,A.begin,wA._compileCaptures(A.beginCaptures||A.captures,B,Q),A.end,wA._compileCaptures(A.endCaptures||A.captures,B,Q),A.applyEndPatternLast,wA._compilePatterns(A.patterns,B,Q))})),A.id}static _compileCaptures(A,B,Q){let g=[];if(A){let E=0;for(const B in A){if("$vscodeTextmateLocation"===B)continue;const A=parseInt(B,10);A>E&&(E=A)}for(let A=0;A<=E;A++)g[A]=null;for(const E in A){if("$vscodeTextmateLocation"===E)continue;const C=parseInt(E,10);let I=0;A[E].patterns&&(I=wA.getCompiledRuleId(A[E],B,Q)),g[C]=wA.createCaptureRule(B,A[E].$vscodeTextmateLocation,A[E].name,A[E].contentName,I)}}return g}static _compilePatterns(A,B,Q){let g=[];if(A)for(let E=0,C=A.length;EA.substring(B.start,B.end)));return BA.lastIndex=0,this.source.replace(BA,((A,B)=>d(Q[parseInt(B,10)]||"")))}_buildAnchorCache(){let A,B,Q,g,E=[],C=[],I=[],D=[];for(A=0,B=this.source.length;AA.source));this._cached=new eA(A,B,this._items.map((A=>A.ruleId)))}return this._cached}compileAG(A,B,Q){return this._hasAnchors?B?Q?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(A,B,Q)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(A,B,Q)),this._anchorCache.A1_G0):Q?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(A,B,Q)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(A,B,Q)),this._anchorCache.A0_G0):this.compile(A)}_resolveAnchors(A,B,Q){let g=this._items.map((A=>A.resolveAnchors(B,Q)));return new eA(A,g,this._items.map((A=>A.ruleId)))}}class eA{constructor(A,B,Q){this.regExps=B,this.rules=Q,this.scanner=A.createOnigScanner(B)}dispose(){"function"==typeof this.scanner.dispose&&this.scanner.dispose()}toString(){const A=[];for(let B=0,Q=this.rules.length;Bthis._root.match(A)))}static createFromRawTheme(A,B){return this.createFromParsedTheme(function(A){if(!A)return[];if(!A.settings||!Array.isArray(A.settings))return[];let B=A.settings,Q=[],g=0;for(let A=0,E=B.length;A1&&(s=C.slice(0,C.length-1),s.reverse()),Q[g++]=new aA(o,s,A,I,D,w)}}return Q}(A),B)}static createFromParsedTheme(A,B){return function(A,B){A.sort(((A,B)=>{let Q=S(A.scope,B.scope);return 0!==Q?Q:(Q=p(A.parentScopes,B.parentScopes),0!==Q?Q:A.index-B.index)}));let Q=0,g="#000000",E="#ffffff";for(;A.length>=1&&""===A[0].scope;){let B=A.shift();-1!==B.fontStyle&&(Q=B.fontStyle),null!==B.foreground&&(g=B.foreground),null!==B.background&&(E=B.background)}let C=new hA(B),I=new MA(Q,C.getId(g),C.getId(E)),D=new FA(new nA(0,null,-1,0,0),[]);for(let B=0,Q=A.length;Bfunction(A,B){if(null===B)return!0;let Q=0,g=B[Q];for(;A;){if(tA(A.scopeName,g)){if(Q++,Q===B.length)return!0;g=B[Q]}A=A.parent}return!1}(A.parent,B.parentScopes)));return Q?new MA(Q.fontStyle,Q.foreground,Q.background):null}}class iA{constructor(A,B){this.parent=A,this.scopeName=B}static push(A,B){for(const Q of B)A=new iA(A,Q);return A}static from(...A){let B=null;for(let Q=0;QA?console.log("how did this happen?"):this.scopeDepth=A,-1!==B&&(this.fontStyle=B),0!==Q&&(this.foreground=Q),0!==g&&(this.background=g)}}class FA{constructor(A,B=[],Q={}){this._mainRule=A,this._children=Q,this._rulesWithParentScopes=B}static _sortBySpecificity(A){return 1===A.length||A.sort(this._cmpBySpecificity),A}static _cmpBySpecificity(A,B){if(A.scopeDepth===B.scopeDepth){const Q=A.parentScopes,g=B.parentScopes;let E=null===Q?0:Q.length,C=null===g?0:g.length;if(E===C)for(let A=0;A{const B=this._scopeToLanguage(A),Q=this._toStandardTokenType(A);return new GA(B,Q)})),this._defaultAttributes=new GA(A,8),this._embeddedLanguagesMatcher=new NA(Object.entries(B||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(A){return null===A?rA._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(A)}_scopeToLanguage(A){return this._embeddedLanguagesMatcher.match(A)||0}_toStandardTokenType(A){const B=A.match(rA.STANDARD_TOKEN_TYPE_REGEXP);if(!B)return 8;switch(B[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}}rA._NULL_SCOPE_METADATA=new GA(0,0),rA.STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/;class NA{constructor(A){if(0===A.length)this.values=null,this.scopesRegExp=null;else{this.values=new Map(A);const B=A.map((([A,B])=>d(A)));B.sort(),B.reverse(),this.scopesRegExp=new RegExp(`^((${B.join(")|(")}))($|\\.)`,"")}}match(A){if(!this.scopesRegExp)return;const B=A.match(this.scopesRegExp);return B?this.values.get(B[1]):void 0}}class LA{constructor(A,B){this.stack=A,this.stoppedEarly=B}}function HA(A,B,Q,g,E,C,I,D){const w=B.content.length;let o=!1,s=-1;if(I){const I=function(A,B,Q,g,E,C){let I=E.beginRuleCapturedEOL?0:-1;const D=[];for(let B=E;B;B=B.pop()){const Q=B.getRule(A);Q instanceof DA&&D.push({rule:Q,stack:B})}for(let w=D.pop();w;w=D.pop()){const{ruleScanner:D,findOptions:o}=RA(w.rule,A,w.stack.endRule,Q,g===I),s=D.findNextMatchSync(B,g,o);if(H&&(console.log(" scanning for while rule"),console.log(D.toString())),!s){H&&console.log(" popping "+w.rule.debugName+" - "+w.rule.debugWhileRegExp),E=w.stack.pop();break}if(-2!==s.ruleId){E=w.stack.pop();break}s.captureIndices&&s.captureIndices.length&&(C.produce(w.stack,s.captureIndices[0].start),KA(A,B,Q,w.stack,C,w.rule.whileCaptures,s.captureIndices),C.produce(w.stack,s.captureIndices[0].end),I=s.captureIndices[0].end,s.captureIndices[0].end>g&&(g=s.captureIndices[0].end,Q=!1))}return{stack:E,linePos:g,anchorPosition:I,isFirstLine:Q}}(A,B,Q,g,E,C);E=I.stack,g=I.linePos,Q=I.isFirstLine,s=I.anchorPosition}const e=Date.now();for(;!o;){if(0!==D&&Date.now()-e>D)return new LA(E,!0);c()}return new LA(E,!1);function c(){H&&(console.log(""),console.log(`@@scanNext ${g}: |${B.content.substr(g).replace(/\n$/,"\\n")}|`));const I=function(A,B,Q,g,E,C){const I=function(A,B,Q,g,E,C){const I=E.getRule(A),{ruleScanner:D,findOptions:w}=kA(I,A,E.endRule,Q,g===C);let o=0;H&&(o=x());const s=D.findNextMatchSync(B,g,w);if(H){const A=x()-o;A>5&&console.warn(`Rule ${I.debugName} (${I.id}) matching took ${A} against '${B}'`),console.log(` scanning for (linePos: ${g}, anchorPosition: ${C})`),console.log(D.toString()),s&&console.log(`matched rule id: ${s.ruleId} from ${s.captureIndices[0].start} to ${s.captureIndices[0].end}`)}return s?{captureIndices:s.captureIndices,matchedRuleId:s.ruleId}:null}(A,B,Q,g,E,C),D=A.getInjections();if(0===D.length)return I;const w=function(A,B,Q,g,E,C,I){let D,w=Number.MAX_VALUE,o=null,s=0;const e=C.contentNameScopesList.getScopeNames();for(let C=0,c=A.length;C=w)&&(w=h,o=a.captureIndices,D=a.ruleId,s=c.priority,w===E))break}return o?{priorityMatch:-1===s,captureIndices:o,matchedRuleId:D}:null}(D,A,B,Q,g,E,C);if(!w)return I;if(!I)return w;const o=I.captureIndices[0].start,s=w.captureIndices[0].start;return s0)&&D[0].end>g;if(-1===e){const I=E.getRule(A);H&&console.log(" popping "+I.debugName+" - "+I.debugEndRegExp),C.produce(E,D[0].start),E=E.withContentNameScopesList(E.nameScopesList),KA(A,B,Q,E,C,I.endCaptures,D),C.produce(E,D[0].end);const e=E;if(E=E.parent,s=e.getAnchorPos(),!c&&e.getEnterPos()===g)return H&&console.error("[1] - Grammar is in an endless loop - Grammar pushed & popped a rule without advancing"),E=e,C.produce(E,w),void(o=!0)}else{const I=A.getRule(e);C.produce(E,D[0].start);const i=E,t=I.getName(B.content,D),M=E.contentNameScopesList.pushAttributed(t,A);if(E=E.push(e,g,s,D[0].end===w,null,M,M),I instanceof IA){const g=I;H&&console.log(" pushing "+g.debugName+" - "+g.debugBeginRegExp),KA(A,B,Q,E,C,g.beginCaptures,D),C.produce(E,D[0].end),s=D[0].end;const e=g.getContentName(B.content,D),t=M.pushAttributed(e,A);if(E=E.withContentNameScopesList(t),g.endHasBackReferences&&(E=E.withEndRule(g.getEndWithResolvedBackReferences(B.content,D))),!c&&i.hasSameRuleAs(E))return H&&console.error("[2] - Grammar is in an endless loop - Grammar pushed the same rule without advancing"),E=E.pop(),C.produce(E,w),void(o=!0)}else if(I instanceof DA){const g=I;H&&console.log(" pushing "+g.debugName),KA(A,B,Q,E,C,g.beginCaptures,D),C.produce(E,D[0].end),s=D[0].end;const e=g.getContentName(B.content,D),t=M.pushAttributed(e,A);if(E=E.withContentNameScopesList(t),g.whileHasBackReferences&&(E=E.withEndRule(g.getWhileWithResolvedBackReferences(B.content,D))),!c&&i.hasSameRuleAs(E))return H&&console.error("[3] - Grammar is in an endless loop - Grammar pushed the same rule without advancing"),E=E.pop(),C.produce(E,w),void(o=!0)}else{const g=I;if(H&&console.log(" matched "+g.debugName+" - "+g.debugMatchRegExp),KA(A,B,Q,E,C,g.captures,D),C.produce(E,D[0].end),E=E.pop(),!c)return H&&console.error("[4] - Grammar is in an endless loop - Grammar is not advancing, nor is it pushing/popping"),E=E.safePop(),C.produce(E,w),void(o=!0)}}D[0].end>g&&(g=D[0].end,Q=!1)}}function kA(A,B,Q,g,E){return{ruleScanner:A.compileAG(B,Q,g,E),findOptions:0}}function RA(A,B,Q,g,E){return{ruleScanner:A.compileWhileAG(B,Q,g,E),findOptions:0}}function KA(A,B,Q,g,E,C,I){if(0===C.length)return;const D=B.content,w=Math.min(C.length,I.length),o=[],s=I[0].end;for(let B=0;Bs)break;for(;o.length>0&&o[o.length-1].endPos<=e.start;)E.produceFromScopes(o[o.length-1].scopes,o[o.length-1].endPos),o.pop();if(o.length>0?E.produceFromScopes(o[o.length-1].scopes,e.start):E.produce(g,e.start),w.retokenizeCapturedWithRuleId){const B=w.getName(D,I),C=g.contentNameScopesList.pushAttributed(B,A),o=w.getContentName(D,I),s=C.pushAttributed(o,A),c=g.push(w.retokenizeCapturedWithRuleId,e.start,-1,!1,null,C,s),i=A.createOnigString(D.substring(0,e.end));HA(A,i,Q&&0===e.start,e.start,c,E,!1,0),Y(i);continue}const c=w.getName(D,I);if(null!==c){const B=(o.length>0?o[o.length-1].scopes:g.contentNameScopesList).pushAttributed(c,A);o.push(new YA(B,e.end))}}for(;o.length>0;)E.produceFromScopes(o[o.length-1].scopes,o[o.length-1].endPos),o.pop()}class YA{constructor(A,B){this.scopes=A,this.endPos=B}}function UA(A,B,Q,g,E){const C=R(B,PA),I=wA.getCompiledRuleId(Q,g,E.repository);for(const Q of C)A.push({debugSelector:B,matcher:Q.matcher,ruleId:I,grammar:E,priority:Q.priority})}function PA(A,B){if(B.length{for(let g=Q;gQ&&A.substr(0,Q)===B&&"."===A[Q]}class yA{constructor(A,B,Q,g,E,C,I,D){if(this._rootScopeName=A,this.balancedBracketSelectors=C,this._onigLib=D,this._basicScopeAttributesProvider=new rA(Q,g),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=I,this._grammar=JA(B,null),this._injections=null,this._tokenTypeMatchers=[],E)for(const A of Object.keys(E)){const B=R(A,PA);for(const Q of B)this._tokenTypeMatchers.push({matcher:Q.matcher,type:E[A]})}}get themeProvider(){return this._grammarRepository}dispose(){for(const A of this._ruleId2desc)A&&A.dispose()}createOnigScanner(A){return this._onigLib.createOnigScanner(A)}createOnigString(A){return this._onigLib.createOnigString(A)}getMetadataForScope(A){return this._basicScopeAttributesProvider.getBasicScopeAttributes(A)}_collectInjections(){const A=[],B=this._rootScopeName,Q=(A=>A===this._rootScopeName?this._grammar:this.getExternalGrammar(A))(B);if(Q){const g=Q.injections;if(g)for(let B in g)UA(A,B,g[B],this,Q);const E=this._grammarRepository.injections(B);E&&E.forEach((B=>{const Q=this.getExternalGrammar(B);if(Q){const B=Q.injectionSelector;B&&UA(A,B,Q,this,Q)}}))}return A.sort(((A,B)=>A.priority-B.priority)),A}getInjections(){if(null===this._injections&&(this._injections=this._collectInjections(),H&&this._injections.length>0)){console.log(`Grammar ${this._rootScopeName} contains the following injections:`);for(const A of this._injections)console.log(` - ${A.debugSelector}`)}return this._injections}registerRule(A){const B=++this._lastRuleId,Q=A(B);return this._ruleId2desc[B]=Q,Q}getRule(A){return this._ruleId2desc[A]}getExternalGrammar(A,B){if(this._includedGrammars[A])return this._includedGrammars[A];if(this._grammarRepository){const Q=this._grammarRepository.lookup(A);if(Q)return this._includedGrammars[A]=JA(Q,B&&B.$base),this._includedGrammars[A]}}tokenizeLine(A,B,Q=0){const g=this._tokenize(A,B,!1,Q);return{tokens:g.lineTokens.getResult(g.ruleStack,g.lineLength),ruleStack:g.ruleStack,stoppedEarly:g.stoppedEarly}}tokenizeLine2(A,B,Q=0){const g=this._tokenize(A,B,!0,Q);return{tokens:g.lineTokens.getBinaryResult(g.ruleStack,g.lineLength),ruleStack:g.ruleStack,stoppedEarly:g.stoppedEarly}}_tokenize(A,B,Q,g){let E;if(-1===this._rootId&&(this._rootId=wA.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections()),B&&B!==pA.NULL)E=!1,B.reset();else{E=!0;const A=this._basicScopeAttributesProvider.getDefaultAttributes(),Q=this.themeProvider.getDefaults(),g=k.set(0,A.languageId,A.tokenType,null,Q.fontStyle,Q.foregroundId,Q.backgroundId),C=this.getRule(this._rootId).getName(null,null);let I;I=C?SA.createRootAndLookUpScopeName(C,g,this):SA.createRoot("unknown",g),B=new pA(null,this._rootId,-1,-1,!1,null,I,I)}A+="\n";const C=this.createOnigString(A),I=C.content.length,D=new dA(Q,A,this._tokenTypeMatchers,this.balancedBracketSelectors),w=HA(this,C,E,0,B,D,!0,g);return Y(C),{lineLength:I,lineTokens:D,ruleStack:w.stack,stoppedEarly:w.stoppedEarly}}}function JA(A,B){return(A=U(A)).repository=A.repository||{},A.repository.$self={$vscodeTextmateLocation:A.$vscodeTextmateLocation,patterns:A.patterns,name:A.scopeName},A.repository.$base=B||A.repository.$self,A}class SA{constructor(A,B,Q){this.parent=A,this.scopePath=B,this.tokenAttributes=Q}static fromExtension(A,B){let Q=A,g=A?.scopePath??null;for(const A of B)g=iA.push(g,A.scopeNames),Q=new SA(Q,g,A.encodedTokenAttributes);return Q}static createRoot(A,B){return new SA(null,new iA(null,A),B)}static createRootAndLookUpScopeName(A,B,Q){const g=Q.getMetadataForScope(A),E=new iA(null,A),C=Q.themeProvider.themeMatch(E),I=SA.mergeAttributes(B,g,C);return new SA(null,E,I)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(A){return SA.equals(this,A)}static equals(A,B){for(;;){if(A===B)return!0;if(!A&&!B)return!0;if(!A||!B)return!1;if(A.scopeName!==B.scopeName||A.tokenAttributes!==B.tokenAttributes)return!1;A=A.parent,B=B.parent}}static mergeAttributes(A,B,Q){let g=-1,E=0,C=0;return null!==Q&&(g=Q.fontStyle,E=Q.foregroundId,C=Q.backgroundId),k.set(A,B.languageId,B.tokenType,null,g,E,C)}pushAttributed(A,B){if(null===A)return this;if(-1===A.indexOf(" "))return SA._pushAttributed(this,A,B);const Q=A.split(/ /g);let g=this;for(const A of Q)g=SA._pushAttributed(g,A,B);return g}static _pushAttributed(A,B,Q){const g=Q.getMetadataForScope(B),E=A.scopePath.push(B),C=Q.themeProvider.themeMatch(E),I=SA.mergeAttributes(A.tokenAttributes,g,C);return new SA(A,E,I)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(A){const B=[];let Q=this;for(;Q&&Q!==A;)B.push({encodedTokenAttributes:Q.tokenAttributes,scopeNames:Q.scopePath.getExtensionIfDefined(Q.parent?.scopePath??null)}),Q=Q.parent;return Q===A?B.reverse():void 0}}class pA{constructor(A,B,Q,g,E,C,I,D){this.parent=A,this.ruleId=B,this.beginRuleCapturedEOL=E,this.endRule=C,this.nameScopesList=I,this.contentNameScopesList=D,this._stackElementBrand=void 0,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=Q,this._anchorPos=g}equals(A){return null!==A&&pA._equals(this,A)}static _equals(A,B){return A===B||!!this._structuralEquals(A,B)&&SA.equals(A.contentNameScopesList,B.contentNameScopesList)}static _structuralEquals(A,B){for(;;){if(A===B)return!0;if(!A&&!B)return!0;if(!A||!B)return!1;if(A.depth!==B.depth||A.ruleId!==B.ruleId||A.endRule!==B.endRule)return!1;A=A.parent,B=B.parent}}clone(){return this}static _reset(A){for(;A;)A._enterPos=-1,A._anchorPos=-1,A=A.parent}reset(){pA._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(A,B,Q,g,E,C,I){return new pA(this,A,B,Q,g,E,C,I)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(A){return A.getRule(this.ruleId)}toString(){const A=[];return this._writeString(A,0),"["+A.join(",")+"]"}_writeString(A,B){return this.parent&&(B=this.parent._writeString(A,B)),A[B++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,B}withContentNameScopesList(A){return this.contentNameScopesList===A?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,A)}withEndRule(A){return this.endRule===A?this:new pA(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,A,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(A){let B=this;for(;B&&B._enterPos===A._enterPos;){if(B.ruleId===A.ruleId)return!0;B=B.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(A,B){const Q=SA.fromExtension(A?.nameScopesList??null,B.nameScopesList);return new pA(A,B.ruleId,B.enterPos??-1,B.anchorPos??-1,B.beginRuleCapturedEOL,B.endRule,Q,SA.fromExtension(Q,B.contentNameScopesList))}}pA.NULL=new pA(null,0,0,0,!1,null,null,null);class lA{constructor(A,B){this.allowAny=!1,this.balancedBracketScopes=A.flatMap((A=>"*"===A?(this.allowAny=!0,[]):R(A,PA).map((A=>A.matcher)))),this.unbalancedBracketScopes=B.flatMap((A=>R(A,PA).map((A=>A.matcher))))}get matchesAlways(){return this.allowAny&&0===this.unbalancedBracketScopes.length}get matchesNever(){return 0===this.balancedBracketScopes.length&&!this.allowAny}match(A){for(const B of this.unbalancedBracketScopes)if(B(A))return!1;for(const B of this.balancedBracketScopes)if(B(A))return!0;return this.allowAny}}class dA{constructor(A,B,Q,g){this.balancedBracketSelectors=g,this._emitBinaryTokens=A,this._tokenTypeOverrides=Q,this._lineText=H?B:null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}produce(A,B){this.produceFromScopes(A.contentNameScopesList,B)}produceFromScopes(A,B){if(this._lastTokenEndIndex>=B)return;if(this._emitBinaryTokens){let Q=A?.tokenAttributes??0,g=!1;if(this.balancedBracketSelectors?.matchesAlways&&(g=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const B=A?.getScopeNames()??[];for(const A of this._tokenTypeOverrides)A.matcher(B)&&(Q=k.set(Q,0,A.type,null,-1,0,0));this.balancedBracketSelectors&&(g=this.balancedBracketSelectors.match(B))}if(g&&(Q=k.set(Q,0,8,g,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===Q)return void(this._lastTokenEndIndex=B);if(H){const Q=A?.getScopeNames()??[];console.log(" token: |"+this._lineText.substring(this._lastTokenEndIndex,B).replace(/\n$/,"\\n")+"|");for(let A=0;A0&&this._tokens[this._tokens.length-1].startIndex===B-1&&this._tokens.pop(),0===this._tokens.length&&(this._lastTokenEndIndex=-1,this.produce(A,B),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(A,B){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===B-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),0===this._binaryTokens.length&&(this._lastTokenEndIndex=-1,this.produce(A,B),this._binaryTokens[this._binaryTokens.length-2]=0);const Q=new Uint32Array(this._binaryTokens.length);for(let A=0,B=this._binaryTokens.length;A0;)10===A.charCodeAt(E)?(E++,C++,I=0):(E++,I++),B--}function w(A){null===Q?E=A:D(A-E)}function o(){for(;E0&&65279===A.charCodeAt(0)&&(E=1);let i=0,t=null,M=[],a=[],h=null;function n(A,B){M.push(i),a.push(t),i=A,t=B}function F(){if(0===M.length)return G("illegal state stack");i=M.pop(),t=a.pop()}function G(B){throw new Error("Near offset "+E+": "+B+" ~~~"+A.substr(E,50)+"~~~")}const r=function(){if(null===h)return G("missing ");let A={};null!==Q&&(A[Q]={filename:B,line:C,char:I}),t[h]=A,h=null,n(1,A)},N=function(){if(null===h)return G("missing ");let A=[];t[h]=A,h=null,n(2,A)},L=function(){let A={};null!==Q&&(A[Q]={filename:B,line:C,char:I}),t.push(A),n(1,A)},H=function(){let A=[];t.push(A),n(2,A)};function k(){if(1!==i)return G("unexpected ");F()}function R(){return 1===i||2!==i?G("unexpected "):void F()}function K(A){if(1===i){if(null===h)return G("missing ");t[h]=A,h=null}else 2===i?t.push(A):t=A}function Y(A){if(isNaN(A))return G("cannot parse float");if(1===i){if(null===h)return G("missing ");t[h]=A,h=null}else 2===i?t.push(A):t=A}function U(A){if(isNaN(A))return G("cannot parse integer");if(1===i){if(null===h)return G("missing ");t[h]=A,h=null}else 2===i?t.push(A):t=A}function P(A){if(1===i){if(null===h)return G("missing ");t[h]=A,h=null}else 2===i?t.push(A):t=A}function u(A){if(1===i){if(null===h)return G("missing ");t[h]=A,h=null}else 2===i?t.push(A):t=A}function y(A){if(1===i){if(null===h)return G("missing ");t[h]=A,h=null}else 2===i?t.push(A):t=A}function J(){let A=c(">"),B=!1;return 47===A.charCodeAt(A.length-1)&&(B=!0,A=A.substring(0,A.length-1)),{name:A.trim(),isClosed:B}}function S(A){if(A.isClosed)return"";let B=c(""),B.replace(/&#([0-9]+);/g,(function(A,B){return String.fromCodePoint(parseInt(B,10))})).replace(/&#x([0-9a-f]+);/g,(function(A,B){return String.fromCodePoint(parseInt(B,16))})).replace(/&|<|>|"|'/g,(function(A){switch(A){case"&":return"&";case"<":return"<";case">":return">";case""":return'"';case"'":return"'"}return A}))}for(;E=g));){const w=A.charCodeAt(E);if(D(1),60!==w)return G("expected <");if(E>=g)return G("unexpected end of input");const c=A.charCodeAt(E);if(63===c){D(1),e("?>");continue}if(33===c){if(D(1),s("--")){e("--\x3e");continue}e(">");continue}if(47===c){if(D(1),o(),s("plist")){e(">");continue}if(s("dict")){e(">"),k();continue}if(s("array")){e(">"),R();continue}return G("unexpected closed tag")}let M=J();switch(M.name){case"dict":1===i?r():2===i?L():(t={},null!==Q&&(t[Q]={filename:B,line:C,char:I}),n(1,t)),M.isClosed&&k();continue;case"array":1===i?N():2===i?H():(t=[],n(2,t)),M.isClosed&&R();continue;case"key":p=S(M),1!==i?G("unexpected "):null!==h?G("too many "):h=p;continue;case"string":K(S(M));continue;case"real":Y(parseFloat(S(M)));continue;case"integer":U(parseInt(S(M),10));continue;case"date":P(new Date(S(M)));continue;case"data":u(S(M));continue;case"true":S(M),y(!0);continue;case"false":S(M),y(!1);continue}if(!/^plist/.test(M.name))return G("unexpected opened tag "+M.name)}var p;return t}function xA(A,B){throw new Error("Near offset "+A.pos+": "+B+" ~~~"+A.source.substr(A.pos,50)+"~~~")}class mA{constructor(A){this.source=A,this.pos=0,this.len=A.length,this.line=1,this.char=0}}class OA{constructor(){this.value=null,this.type=0,this.offset=-1,this.len=-1,this.line=-1,this.char=-1}toLocation(A){return{filename:A,line:this.line,char:this.char}}}function qA(A,B){B.value=null,B.type=0,B.offset=-1,B.len=-1,B.line=-1,B.char=-1;let Q,g=A.source,E=A.pos,C=A.len,I=A.line,D=A.char;for(;;){if(E>=C)return!1;if(Q=g.charCodeAt(E),32!==Q&&9!==Q&&13!==Q){if(10!==Q)break;E++,I++,D=0}else E++,D++}if(B.offset=E,B.line=I,B.char=D,34===Q){for(B.type=1,E++,D++;;){if(E>=C)return!1;if(Q=g.charCodeAt(E),E++,D++,92!==Q){if(34===Q)break}else E++,D++}B.value=g.substring(B.offset+1,E-1).replace(/\\u([0-9A-Fa-f]{4})/g,((A,B)=>String.fromCodePoint(parseInt(B,16)))).replace(/\\(.)/g,((B,Q)=>{switch(Q){case'"':return'"';case"\\":return"\\";case"/":return"/";case"b":return"\b";case"f":return"\f";case"n":return"\n";case"r":return"\r";case"t":return"\t";default:xA(A,"invalid escape sequence")}throw new Error("unreachable")}))}else if(91===Q)B.type=2,E++,D++;else if(123===Q)B.type=3,E++,D++;else if(93===Q)B.type=4,E++,D++;else if(125===Q)B.type=5,E++,D++;else if(58===Q)B.type=6,E++,D++;else if(44===Q)B.type=7,E++,D++;else if(110===Q){if(B.type=8,E++,D++,Q=g.charCodeAt(E),117!==Q)return!1;if(E++,D++,Q=g.charCodeAt(E),108!==Q)return!1;if(E++,D++,Q=g.charCodeAt(E),108!==Q)return!1;E++,D++}else if(116===Q){if(B.type=9,E++,D++,Q=g.charCodeAt(E),114!==Q)return!1;if(E++,D++,Q=g.charCodeAt(E),117!==Q)return!1;if(E++,D++,Q=g.charCodeAt(E),101!==Q)return!1;E++,D++}else if(102===Q){if(B.type=10,E++,D++,Q=g.charCodeAt(E),97!==Q)return!1;if(E++,D++,Q=g.charCodeAt(E),108!==Q)return!1;if(E++,D++,Q=g.charCodeAt(E),115!==Q)return!1;if(E++,D++,Q=g.charCodeAt(E),101!==Q)return!1;E++,D++}else for(B.type=11;;){if(E>=C)return!1;if(Q=g.charCodeAt(E),!(46===Q||Q>=48&&Q<=57||101===Q||69===Q||45===Q||43===Q))break;E++,D++}return B.len=E-B.offset,null===B.value&&(B.value=g.substr(B.offset,B.len)),A.pos=E,A.line=I,A.char=D,!0}class bA{constructor(A,B){this._onigLibPromise=B,this._grammars=new Map,this._rawGrammars=new Map,this._injectionGrammars=new Map,this._theme=A}dispose(){for(const A of this._grammars.values())A.dispose()}setTheme(A){this._theme=A}getColorMap(){return this._theme.getColorMap()}addGrammar(A,B){this._rawGrammars.set(A.scopeName,A),B&&this._injectionGrammars.set(A.scopeName,B)}lookup(A){return this._rawGrammars.get(A)}injections(A){return this._injectionGrammars.get(A)}getDefaults(){return this._theme.getDefaults()}themeMatch(A){return this._theme.match(A)}async grammarForScopeName(A,B,Q,g,E){if(!this._grammars.has(A)){let C=this._rawGrammars.get(A);if(!C)return null;this._grammars.set(A,function(A,B,Q,g,E,C,I,D){return new yA(A,B,Q,g,E,C,I,D)}(A,C,B,Q,g,E,this,await this._onigLibPromise))}return this._grammars.get(A)}}function WA(A,B){let Q=0;const g=[];let E=A,C=B;for(;E!==C;)E&&(!C||E.depth>=C.depth)?(Q++,E=E.parent):(g.push(C.toStateStackFrame()),C=C.parent);return{pops:Q,newFrames:g.reverse()}}function TA(A,B){let Q=A;for(let A=0;A0;)await Promise.all(C.Q.map((A=>this._loadSingleGrammar(A.scopeName)))),C.processQueue();return this._grammarForScopeName(A,B,Q,g,E)}async _loadSingleGrammar(A){return this._ensureGrammarCache.has(A)||this._ensureGrammarCache.set(A,this._doLoadSingleGrammar(A)),this._ensureGrammarCache.get(A)}async _doLoadSingleGrammar(A){const B=await this._options.loadGrammar(A);if(B){const Q="function"==typeof this._options.getInjections?this._options.getInjections(A):void 0;this._syncRegistry.addGrammar(B,Q)}}async addGrammar(A,B=[],Q=0,g=null){return this._syncRegistry.addGrammar(A,B),await this._grammarForScopeName(A.scopeName,Q,g)}_grammarForScopeName(A,B=0,Q=null,g=null,E=null){return this._syncRegistry.grammarForScopeName(A,B,Q,g,E)}}const vA=pA.NULL,ZA=function(A,B=null){return null!==B&&/\.json$/.test(B)?(Q=A,H?function(A,B,Q){let g=new mA(A),E=new OA,C=0,I=null,D=[],w=[];function o(){D.push(C),w.push(I)}function s(){C=D.pop(),I=w.pop()}function e(A){xA(g,A)}for(;qA(g,E);){if(0===C){if(null!==I&&e("too many constructs in root"),3===E.type){I={},I.$vscodeTextmateLocation=E.toLocation(B),o(),C=1;continue}if(2===E.type){I=[],o(),C=4;continue}e("unexpected token in root")}if(2===C){if(5===E.type){s();continue}if(7===E.type){C=3;continue}e("expected , or }")}if(1===C||3===C){if(1===C&&5===E.type){s();continue}if(1===E.type){let A=E.value;if(qA(g,E)&&6===E.type||e("expected colon"),qA(g,E)||e("expected value"),C=2,1===E.type){I[A]=E.value;continue}if(8===E.type){I[A]=null;continue}if(9===E.type){I[A]=!0;continue}if(10===E.type){I[A]=!1;continue}if(11===E.type){I[A]=parseFloat(E.value);continue}if(2===E.type){let B=[];I[A]=B,o(),C=4,I=B;continue}if(3===E.type){let Q={};Q.$vscodeTextmateLocation=E.toLocation(B),I[A]=Q,o(),C=1,I=Q;continue}}e("unexpected token in dict")}if(5===C){if(4===E.type){s();continue}if(7===E.type){C=6;continue}e("expected , or ]")}if(4===C||6===C){if(4===C&&4===E.type){s();continue}if(C=5,1===E.type){I.push(E.value);continue}if(8===E.type){I.push(null);continue}if(9===E.type){I.push(!0);continue}if(10===E.type){I.push(!1);continue}if(11===E.type){I.push(parseFloat(E.value));continue}if(2===E.type){let A=[];I.push(A),o(),C=4,I=A;continue}if(3===E.type){let A={};A.$vscodeTextmateLocation=E.toLocation(B),I.push(A),o(),C=1,I=A;continue}e("unexpected token in array")}e("unknown state")}return 0!==w.length&&e("unclosed constructs"),I}(Q,B):JSON.parse(Q)):function(A,B){return H?function(A,B,Q){return fA(A,B,"$vscodeTextmateLocation")}(A,B):function(A){return fA(A,null,null)}(A)}(A,B);var Q};var jA=L.Bz,VA=("undefined"!=typeof document&&document.currentScript&&document.currentScript.src,function(A){var B,Q,g=void 0!==(A=A||{})?A:{};g.ready=new Promise((function(A,g){B=A,Q=g}));var E,C=Object.assign({},g),I=!1;E=function(A){let B;return"function"==typeof readbuffer?new Uint8Array(readbuffer(A)):(B=read(A,"binary"),"object"==typeof B||L(Q),B);var Q},"undefined"!=typeof scriptArgs&&scriptArgs,"undefined"!=typeof onig_print&&("undefined"==typeof console&&(console={}),console.log=onig_print,console.warn=console.error="undefined"!=typeof printErr?printErr:onig_print);var D,w,o=g.print||console.log.bind(console),s=g.printErr||console.warn.bind(console);Object.assign(g,C),C=null,g.arguments&&g.arguments,g.thisProgram&&g.thisProgram,g.quit&&g.quit,g.wasmBinary&&(D=g.wasmBinary),g.noExitRuntime,"object"!=typeof WebAssembly&&L("no native wasm support detected");var e,c,i,t=!1,M="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function a(A,B,Q){for(var g=B+Q,E=B;A[E]&&!(E>=g);)++E;if(E-B>16&&A.buffer&&M)return M.decode(A.subarray(B,E));for(var C="";B>10,56320|1023&o)}}else C+=String.fromCharCode((31&I)<<6|D)}else C+=String.fromCharCode(I)}return C}function h(A){e=A,g.HEAP8=new Int8Array(A),g.HEAP16=new Int16Array(A),g.HEAP32=new Int32Array(A),g.HEAPU8=c=new Uint8Array(A),g.HEAPU16=new Uint16Array(A),g.HEAPU32=i=new Uint32Array(A),g.HEAPF32=new Float32Array(A),g.HEAPF64=new Float64Array(A)}g.INITIAL_MEMORY;var n=[],F=[],G=[],r=0,N=null;function L(A){g.onAbort&&g.onAbort(A),s(A="Aborted("+A+")"),t=!0,A+=". Build with -sASSERTIONS for more info.";var B=new WebAssembly.RuntimeError(A);throw Q(B),B}var H,k,R,K="data:application/octet-stream;base64,";function Y(A){return A.startsWith(K)}function U(A){try{if(A==H&&D)return new Uint8Array(D);if(E)return E(A);throw"both async and sync fetching of the wasm failed"}catch(A){L(A)}}function P(A){for(;A.length>0;)A.shift()(g)}function u(A){try{return w.grow(A-e.byteLength+65535>>>16),h(w.buffer),1}catch(A){}}Y(H="onig.wasm")||(k=H,H=g.locateFile?g.locateFile(k,""):""+k),R="undefined"!=typeof dateNow?dateNow:()=>performance.now();var y=[null,[],[]];function J(A,B){var Q=y[A];0===B||10===B?((1===A?o:s)(a(Q,0)),Q.length=0):Q.push(B)}var S,p={emscripten_get_now:R,emscripten_memcpy_big:function(A,B,Q){c.copyWithin(A,B,B+Q)},emscripten_resize_heap:function(A){var B=c.length,Q=2147483648;if((A>>>=0)>Q)return!1;let g=(A,B)=>A+(B-A%B)%B;for(var E=1;E<=4;E*=2){var C=B*(1+.2/E);if(C=Math.min(C,A+100663296),u(Math.min(Q,g(Math.max(A,C),65536))))return!0}return!1},fd_write:function(A,B,Q,g){for(var E=0,C=0;C>2],D=i[B+4>>2];B+=8;for(var w=0;w>2]=E,0}};function l(A){function Q(){S||(S=!0,g.calledRun=!0,t||(P(F),B(g),g.onRuntimeInitialized&&g.onRuntimeInitialized(),function(){if(g.postRun)for("function"==typeof g.postRun&&(g.postRun=[g.postRun]);g.postRun.length;)A=g.postRun.shift(),G.unshift(A);var A;P(G)}()))}r>0||(function(){if(g.preRun)for("function"==typeof g.preRun&&(g.preRun=[g.preRun]);g.preRun.length;)A=g.preRun.shift(),n.unshift(A);var A;P(n)}(),r>0||(g.setStatus?(g.setStatus("Running..."),setTimeout((function(){setTimeout((function(){g.setStatus("")}),1),Q()}),1)):Q()))}if(function(){var A={env:p,wasi_snapshot_preview1:p};function B(A,B){var Q,E=A.exports;g.asm=E,h((w=g.asm.memory).buffer),g.asm.__indirect_function_table,Q=g.asm.__wasm_call_ctors,F.unshift(Q),function(A){if(r--,g.monitorRunDependencies&&g.monitorRunDependencies(r),0==r&&N){var B=N;N=null,B()}}()}function E(A){B(A.instance)}function C(B){return(!D&&I&&"function"==typeof fetch?fetch(H,{credentials:"same-origin"}).then((function(A){if(!A.ok)throw"failed to load wasm binary file at '"+H+"'";return A.arrayBuffer()})).catch((function(){return U(H)})):Promise.resolve().then((function(){return U(H)}))).then((function(B){return WebAssembly.instantiate(B,A)})).then((function(A){return A})).then(B,(function(A){s("failed to asynchronously prepare wasm: "+A),L(A)}))}if(r++,g.monitorRunDependencies&&g.monitorRunDependencies(r),g.instantiateWasm)try{return g.instantiateWasm(A,B)}catch(A){s("Module.instantiateWasm callback failed with error: "+A),Q(A)}(D||"function"!=typeof WebAssembly.instantiateStreaming||Y(H)||"function"!=typeof fetch?C(E):fetch(H,{credentials:"same-origin"}).then((function(B){return WebAssembly.instantiateStreaming(B,A).then(E,(function(A){return s("wasm streaming compile failed: "+A),s("falling back to ArrayBuffer instantiation"),C(E)}))}))).catch(Q)}(),g.___wasm_call_ctors=function(){return(g.___wasm_call_ctors=g.asm.__wasm_call_ctors).apply(null,arguments)},g.___errno_location=function(){return(g.___errno_location=g.asm.__errno_location).apply(null,arguments)},g._omalloc=function(){return(g._omalloc=g.asm.omalloc).apply(null,arguments)},g._ofree=function(){return(g._ofree=g.asm.ofree).apply(null,arguments)},g._getLastOnigError=function(){return(g._getLastOnigError=g.asm.getLastOnigError).apply(null,arguments)},g._createOnigScanner=function(){return(g._createOnigScanner=g.asm.createOnigScanner).apply(null,arguments)},g._freeOnigScanner=function(){return(g._freeOnigScanner=g.asm.freeOnigScanner).apply(null,arguments)},g._findNextOnigScannerMatch=function(){return(g._findNextOnigScannerMatch=g.asm.findNextOnigScannerMatch).apply(null,arguments)},g._findNextOnigScannerMatchDbg=function(){return(g._findNextOnigScannerMatchDbg=g.asm.findNextOnigScannerMatchDbg).apply(null,arguments)},g.stackSave=function(){return(g.stackSave=g.asm.stackSave).apply(null,arguments)},g.stackRestore=function(){return(g.stackRestore=g.asm.stackRestore).apply(null,arguments)},g.stackAlloc=function(){return(g.stackAlloc=g.asm.stackAlloc).apply(null,arguments)},g.dynCall_jiji=function(){return(g.dynCall_jiji=g.asm.dynCall_jiji).apply(null,arguments)},g.UTF8ToString=function(A,B){return A?a(c,A,B):""},N=function A(){S||l(),S||(N=A)},g.preInit)for("function"==typeof g.preInit&&(g.preInit=[g.preInit]);g.preInit.length>0;)g.preInit.pop()();return l(),A.ready});let zA=null;class _A{static _utf8ByteLength(A){let B=0;for(let Q=0,g=A.length;Q=55296&&E<=56319&&Q+1=56320&&B<=57343&&(C=65536+(E-55296<<10)|B-56320,I=!0)}B+=C<=127?1:C<=2047?2:C<=65535?3:4,I&&Q++}return B}constructor(A){const B=A.length,Q=_A._utf8ByteLength(A),g=Q!==B,E=g?new Uint32Array(B+1):null;g&&(E[B]=Q);const C=g?new Uint32Array(Q+1):null;g&&(C[Q]=B);const I=new Uint8Array(Q);let D=0;for(let Q=0;Q=55296&&w<=56319&&Q+1=56320&&B<=57343&&(o=65536+(w-55296<<10)|B-56320,s=!0)}g&&(E[Q]=D,s&&(E[Q+1]=D),o<=127?C[D+0]=Q:o<=2047?(C[D+0]=Q,C[D+1]=Q):o<=65535?(C[D+0]=Q,C[D+1]=Q,C[D+2]=Q):(C[D+0]=Q,C[D+1]=Q,C[D+2]=Q,C[D+3]=Q)),o<=127?I[D++]=o:o<=2047?(I[D++]=192|(1984&o)>>>6,I[D++]=128|(63&o)>>>0):o<=65535?(I[D++]=224|(61440&o)>>>12,I[D++]=128|(4032&o)>>>6,I[D++]=128|(63&o)>>>0):(I[D++]=240|(1835008&o)>>>18,I[D++]=128|(258048&o)>>>12,I[D++]=128|(4032&o)>>>6,I[D++]=128|(63&o)>>>0),s&&Q++}this.utf16Length=B,this.utf8Length=Q,this.utf16Value=A,this.utf8Value=I,this.utf16OffsetToUtf8=E,this.utf8OffsetToUtf16=C}createString(A){const B=A._omalloc(this.utf8Length);return A.HEAPU8.set(this.utf8Value,B),B}}class $A{constructor(A){if(this.id=++$A.LAST_ID,!zA)throw new Error("Must invoke loadWASM first.");this._onigBinding=zA,this.content=A;const B=new _A(A);this.utf16Length=B.utf16Length,this.utf8Length=B.utf8Length,this.utf16OffsetToUtf8=B.utf16OffsetToUtf8,this.utf8OffsetToUtf16=B.utf8OffsetToUtf16,this.utf8Length<1e4&&!$A._sharedPtrInUse?($A._sharedPtr||($A._sharedPtr=zA._omalloc(1e4)),$A._sharedPtrInUse=!0,zA.HEAPU8.set(B.utf8Value,$A._sharedPtr),this.ptr=$A._sharedPtr):this.ptr=B.createString(zA)}convertUtf8OffsetToUtf16(A){return this.utf8OffsetToUtf16?A<0?0:A>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[A]:A}convertUtf16OffsetToUtf8(A){return this.utf16OffsetToUtf8?A<0?0:A>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[A]:A}dispose(){this.ptr===$A._sharedPtr?$A._sharedPtrInUse=!1:this._onigBinding._ofree(this.ptr)}}$A.LAST_ID=0,$A._sharedPtr=0,$A._sharedPtrInUse=!1;class AB{constructor(A){if(!zA)throw new Error("Must invoke loadWASM first.");const B=[],Q=[];for(let g=0,E=A.length;gWebAssembly.instantiateStreaming(A,B)}(g):function(A){return async B=>{const Q=await A.arrayBuffer();return WebAssembly.instantiate(Q,B)}}(g):function(A){return B=>WebAssembly.instantiate(A,B)}(g)}return QB=new Promise(((A,B)=>{g=A,E=B})),function(A,B,Q,g){VA({print:B,instantiateWasm:(B,Q)=>{if("undefined"==typeof performance){const A=()=>Date.now();B.env.emscripten_get_now=A,B.wasi_snapshot_preview1.emscripten_get_now=A}return A(B).then((A=>Q(A.instance)),g),{}}}).then((A=>{zA=A,Q()}))}(B,Q,g,E),QB}function EB(A){return new $A(A)}function CB(A){return new AB(A)}function IB(A){const B=G[A];if(!B)return;const{id:Q}=r[B];return{id:Q,scopeName:B}}const DB=new Map;let wB,oB;async function sB(A){if(DB.has(A))return DB.get(A);const B=function(A){return r[A]}(A);if(!B)return Promise.resolve(void 0);let g;if(void 0===wB&&(g=eB(B.path),wB=g.then((()=>!0)).catch((()=>!1))),void 0===oB&&(oB=await wB),oB){const Q=g||eB(B.path);return DB.set(A,Q),Q}const E=Q(`grammars/${B.id}`);B.embeddedScopes.forEach((A=>{if(!DB.has(A)){const B=E.then((B=>B.find((B=>B.scopeName===A))));DB.set(A,B)}}));const C=E.then((B=>B.find((B=>B.scopeName===A))));return DB.set(A,C),C}async function eB(A){return await B("grammars",A)}const cB=30720,iB=16744448,tB=16775168,MB=11,aB=15,hB={NotSet:-1,None:0,Italic:1,Bold:2,Underline:4,Strikethrough:8};function nB(A,B,Q,g){const{tokens:E,ruleStack:C}=A.tokenizeLine2(Q,B),I=[];let D=Q.length;for(let A=E.length-2;A>=0;A-=2){const B=E[A],g=E[A+1],C=Q.slice(B,D);I.unshift({content:C,metadata:g}),D=B}let w=[];if(null==g?void 0:g.preserveWhitespace)w=I;else for(let A=0;A0?w[w.length-1].content+=B.content:A{const{rawTokens:E,nextStack:C}=nB(B,g,A,{preserveWhitespace:!0}),I=E.map((({content:A,metadata:B})=>({content:A,style:GB(B,Q)}))),D=function(A,B,Q,g){const{tokens:E}=Q.tokenizeLine(A,B),C=[];for(let B=0;B{if(w+=A.content.length,Q>>aB]},g=(A&cB)>>>MB;return g&hB.Italic&&(Q.fontStyle="italic"),g&hB.Bold&&(Q.fontWeight="bold"),g&hB.Underline&&(Q.textDecoration="underline"),g&hB.Strikethrough&&(Q.textDecoration="line-through"),Q}var rB=function(A){var B=null;if("undefined"!=typeof process&&null!=process.versions&&null!=process.versions.node)B=Buffer.from(A,"base64");else{var Q=globalThis.atob(A),g=Q.length;B=new Uint8Array(new ArrayBuffer(g));for(var E=0;E({createOnigScanner:CB,createOnigString:EB})));NB=new jA({onigLib:A,loadGrammar:A=>sB(A)})}const B=A.filter((A=>!LB(A))).map((A=>{const B=IB(A);if(!B)throw new RB(A);return NB.loadGrammar(B.scopeName)}));return Promise.all(B)}function kB(A){if(LB(A))return{langId:A,grammar:null};const B=IB(A);if(!B)throw new RB(A);const Q=function(A){const{_syncRegistry:B}=NB;return null==B?void 0:B._grammars.get(A)}(B.scopeName);if(!Q)throw new Error(`Syntax highlighting error: grammar for ${A} not loaded`);return{langId:B.id,grammar:Q}}class RB extends Error{constructor(A){super(`Unknown language: ${A}`),this.alias=A}}function KB(A,B,Q){NB.setTheme(Q);const g=function(A){const B=NB.getColorMap();return A.colorNames?B.map((B=>Object.keys(A.colorNames).find((Q=>A.colorNames[Q].toUpperCase()===B.toUpperCase()))||B)):B}(Q);return function(A,B,Q){let g=null;return A.split(/\r?\n|\r/g).map((A=>{const{rawTokens:E,nextStack:C}=nB(B,g,A);return g=C,E.map((({content:A,metadata:B})=>({content:A,style:GB(B,Q)})))}))}(A,B,g)}function YB(A){return A.split(/\r?\n|\r/g).map((A=>[{content:A,style:{}}]))}function UB(A,B){return uB(A.slice(1,-1)).map((A=>{const{from:Q,to:g}=PB(A);return{lineNumber:B,fromColumn:Q,toColumn:g}}))}function PB(A){const[B,Q]=A.split(":");if(!yB(B))throw new JB(B);const g=Number(B);if(g<1)throw new SB;if(Q){if(!yB(Q))throw new JB(Q);return{from:g,to:+Q}}return{from:g,to:g}}function uB(A){return A.split(/,(?![^\[]*\])/g)}function yB(A){A=A.toString();var B=Math.abs(A),Q=parseInt(A,10);return!isNaN(B)&&Q===B&&B.toString()===A}class JB extends Error{constructor(A){super(`Invalid number "${A}" in range string`),this.number=A,Object.setPrototypeOf(this,new.target.prototype)}}class SB extends Error{constructor(){super("Invalid line or column number in range string"),Object.setPrototypeOf(this,new.target.prototype)}}const pB="#001",lB="#010",dB={name:"comments",type:"light",foreground:"",background:"",colors:{},settings:[{settings:{foreground:"#000"}},{scope:["punctuation.definition.comment"],settings:{foreground:pB}},{scope:"comment",settings:{foreground:lB}}]};function fB(A,B,Q,g){const E=B?KB(A,B,dB):YB(A),C=[];let I=1;const D=E.map((A=>{const{annotations:B,lineWithoutComments:E}=function(A,B,Q){if(!A.some((A=>A.style.color===pB)))return{annotations:[],lineWithoutComments:A};const g=[];let E=0;for(;E!A.tokens.includes(B)));C.every((A=>""===A.content.trim()))&&(C=null);return{annotations:g.map((A=>({name:A.name,query:A.query,lineNumber:A.lineNumber,rangeString:A.rangeString}))),lineWithoutComments:C}}(A,g,I);if(C.push(...B),!E)return null;const D=E.map((A=>A.content)).join("");return["mdx","jsx","tsx"].includes(Q)&&B.length>0&&"{}"===D.trim()?null:(I++,D)})).filter((A=>null!==A)).join("\n"),w=C.map((A=>{var{rangeString:B,lineNumber:Q}=A,g=function(A,B){var Q={};for(var g in A)Object.prototype.hasOwnProperty.call(A,g)&&B.indexOf(g)<0&&(Q[g]=A[g]);if(null!=A&&"function"==typeof Object.getOwnPropertySymbols){var E=0;for(g=Object.getOwnPropertySymbols(A);E{if(A.includes("[")){const[Q,g]=A.split("["),E=Number(Q),C=B+E-1;if(!yB(C))throw new JB(Q);return UB("["+g,C)}const{from:Q,to:g}=PB(A);return[{fromLineNumber:Q+B-1,toLineNumber:g+B-1}]})).flat():[{fromLineNumber:B,toLineNumber:B}]}(B,Q);return Object.assign(Object.assign({},g),{ranges:E})}));return{newCode:D,annotations:w}}function xB(A,B){var Q;const g=A.match(/\s*([\w-]+)?(\([^\)]*\)|\[[^\]]*\])?(.*)$/),E=g[1],C=g[2],I=null===(Q=g[3])||void 0===Q?void 0:Q.trim();return B.includes(E)?{name:E,rangeString:C,query:I}:null}function mB(A,B){let Q=[],g=1;return A.forEach((A=>{Q.push({fromColumn:g,toColumn:g+A.content.length-1,token:A}),g+=A.content.length})),B.forEach((A=>{Q=function(A,B){const{range:Q}=B,{fromColumn:g,toColumn:E}=Q,C=[];let I=0;for(;IE){const[A,Q]=qB(B,E+1);D.tokens.push(A),C.push(Q)}else D.tokens.push(B);I++}else C.push(D);for(;IOB(A)))}function OB(A){return"tokens"in A?{annotationName:A.annotationName,annotationQuery:A.annotationQuery,fromColumn:A.fromColumn,toColumn:A.toColumn,tokens:A.tokens.map((A=>OB(A)))}:A.token}function qB(A,B){if("token"in A){const Q=Object.assign(Object.assign({},A.token),{content:A.token.content.slice(0,B-A.fromColumn)}),g=Object.assign(Object.assign({},A.token),{content:A.token.content.slice(B-A.fromColumn)});return[Object.assign(Object.assign({},A),{toColumn:B-1,token:Q}),Object.assign(Object.assign({},A),{fromColumn:B,token:g})]}{const Q=[],g=[];A.tokens.forEach((A=>{if(A.toColumn=B)g.push(A);else{const[E,C]=qB(A,B);Q.push(E),g.push(C)}}));return[Object.assign(Object.assign({},A),{toColumn:B-1,tokens:Q}),Object.assign(Object.assign({},A),{fromColumn:B,tokens:g})]}}function bB(A,B){let Q=A.map(((A,B)=>({fromLineNumber:B+1,toLineNumber:B+1,line:A})));return B.forEach((A=>{Q=function(A,B){const{range:Q,name:g,query:E}=B,{fromLineNumber:C,toLineNumber:I}=Q,D=[];let w=0;for(;wI){const[A,Q]=TB(B,I+1);o.lines.push(A),D.push(Q)}else o.lines.push(B);w++}else D.push(o);for(;wWB(A)))}function WB(A){return"line"in A?{lineNumber:A.fromLineNumber,tokens:A.line.tokens}:{annotationName:A.annotationName,annotationQuery:A.annotationQuery,fromLineNumber:A.fromLineNumber,toLineNumber:A.toLineNumber,lines:A.lines.map((A=>WB(A)))}}function TB(A,B){if("line"in A)return[Object.assign(Object.assign({},A),{toLineNumber:B-1}),Object.assign(Object.assign({},A),{fromLineNumber:B})];{const Q=[],g=[];return A.lines.forEach((A=>{if(A.toLineNumber=B)g.push(A);else{const[E,C]=TB(A,B);Q.push(E),g.push(C)}})),[Object.assign(Object.assign({},A),{toLineNumber:B-1,lines:Q}),Object.assign(Object.assign({},A),{fromLineNumber:B,lines:g})]}}function XB(A,B){const{inlineAnnotations:Q,multilineAnnotations:g}=function(A){const B=[],Q=[];return A.forEach((A=>{A.ranges.forEach((g=>{"lineNumber"in g?B.push(Object.assign(Object.assign({},A),{range:g})):Q.push(Object.assign(Object.assign({},A),{range:g}))}))})),{inlineAnnotations:B,multilineAnnotations:Q}}(B);return bB(A.map(((A,B)=>{const g=Q.filter((A=>A.range.lineNumber===B+1));return{lineNumber:B+1,tokens:mB(A,g)}})),g)}var vB=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],ZB={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",9:"strikethrough"};function jB(A,B){const Q=A.indexOf("[",B);if(-1!==Q){const B=A.indexOf("m",Q);return{sequence:A.substring(Q+2,B).split(";"),startPosition:Q,position:B+1}}return{position:A.length}}function VB(A,B){let Q=1;const g=A[B+Q++];let E;if("2"===g){const g=[A[B+Q++],A[B+Q++],A[B+Q]].map((A=>Number.parseInt(A)));3!==g.length||g.some((A=>Number.isNaN(A)))||(E={type:"rgb",rgb:g})}else if("5"===g){const g=Number.parseInt(A[B+Q]);Number.isNaN(g)||(E={type:"table",index:Number(g)})}return[Q,E]}function zB(A){const B=[];for(let Q=0;Q=90&&E<=97?B.push({type:"setForegroundColor",value:{type:"named",name:vB[E-90+8]}}):E>=100&&E<=107&&B.push({type:"setBackgroundColor",value:{type:"named",name:vB[E-100+8]}})}return B}function _B(A,B){const Q=function(){let A=null,B=null,Q=new Set;return{parse(g){const E=[];let C=0;do{const I=jB(g,C),D=I.sequence?g.substring(C,I.startPosition):g.substring(C);if(D.length>0&&E.push({value:D,foreground:A,background:B,decorations:new Set(Q)}),I.sequence){const g=zB(I.sequence);for(const E of g)"resetAll"===E.type?(A=null,B=null,Q.clear()):"resetForegroundColor"===E.type?A=null:"resetBackgroundColor"===E.type?B=null:"resetDecoration"===E.type&&Q.delete(E.value);for(const E of g)"setForegroundColor"===E.type?A=E.value:"setBackgroundColor"===E.type?B=E.value:"setDecoration"===E.type&&Q.add(E.value)}C=I.position}while(Cfunction(A,B,Q){const g=A.parse(B),E=g.map((({value:A,foreground:B,background:g,decorations:E})=>{const C=$B(B,Q),I={};C&&(I.color=C);const D=$B(g,Q);return D&&(I.background=D),E.has("bold")&&(I.fontWeight="bold"),E.has("italic")&&(I.fontStyle="italic"),E.has("underline")&&(I.textDecoration="underline"),E.has("strikethrough")&&(I.textDecoration="line-through"),E.has("reverse")&&(I.color=D,I.background=C),E.has("dim")&&(I.opacity=.5),{content:A,style:I}}));return E}(Q,A,B)));return g}function $B(A,B){if(A){if("named"===A.type){return w(B,"terminal.ansi"+(A.name[0].toUpperCase()+A.name.slice(1)))}if("rgb"===A.type){const[B,Q,g]=A.rgb;return`rgb(${B}, ${Q}, ${g})`}}}async function AQ(A,B){await Promise.all([HB(A),i(B)])}async function BQ(A,B,Q="dark-plus",g={}){const E=A||"",C=B||"text";if("string"!=typeof E)throw new Error("Syntax highlighter error: code must be a string");if("string"!=typeof C)throw new Error("Syntax highlighter error: lang must be a string");return await AQ([C],Q),QQ(E,C,Q,g)}function QQ(A,B,Q="dark-plus",g={}){const E=A||"",C=B||"text";if("string"!=typeof E)throw new Error("Syntax highlighter error: code must be a string");if("string"!=typeof C)throw new Error("Syntax highlighter error: lang must be a string");const{langId:I,grammar:D}=kB(C),o=t(Q),s="text"==I?YB(E):"terminal"==I?_B(E,o):(null==g?void 0:g.scopes)?function(A,B,Q){return NB.setTheme(Q),FB(A,B,NB.getColorMap())}(E,D,o):KB(E,D,o),e="terminal"==I?function(A){return{color:w(A,"terminal.foreground"),background:w(A,"terminal.background")}}(o):{color:o.foreground,background:o.background};if(function(A){return"annotations"in A}(g)){return{lines:XB(s,(null==g?void 0:g.annotations)||[]),lang:I,style:e}}return{lines:s,lang:I,style:e}}async function gQ(A,B,Q){if(!Q)return{code:A,annotations:[]};await HB([B]);const{grammar:g}=kB(B),{newCode:E,annotations:C}=fB(A,g,B,Q);return{code:E,annotations:C}}async function EQ(A){if(!A)throw new Error("Syntax highlighter error: undefined theme");await AQ([],A);return n(t(A))}function CQ(A){if(!A)throw new Error("Syntax highlighter error: undefined theme");return n(t(A))}export{F as LANG_NAMES,a as THEME_NAMES,RB as UnknownLanguageError,h as UnknownThemeError,gQ as extractAnnotations,EQ as getThemeColors,CQ as getThemeColorsSync,BQ as highlight,QQ as highlightSync,AQ as preload}; diff --git a/lib/dist/worker.esm.mjs b/lib/dist/worker.esm.mjs index fb069f0..7bb0944 100644 --- a/lib/dist/worker.esm.mjs +++ b/lib/dist/worker.esm.mjs @@ -1 +1 @@ -import e from"./onig.wasm?module";async function t(e,t){throw new Error("no fs")}async function s(e){const t=await fetch(`https://lighter.codehike.org/${e}.json`);return await t.json()}const r=e=>/^#([A-Fa-f0-9]{3,4}){1,2}$/.test(e),o=(e,t)=>e.match(new RegExp(`.{${t}}`,"g")),n=e=>parseInt(e.repeat(2/e.length),16);function c(e,t){return void 0!==e?e/255:"number"!=typeof t||t<0||t>1?1:t}function a(e,t){if(!e)return e;const{r:s,g:a,b:i,a:u}=function(e){if(!e)return;if(!r(e))throw new Error("Invalid color string, must be a valid hex color");const t=Math.floor((e.length-1)/3),s=o(e.slice(1),t),[a,i,u,l]=s.map(n);return{r:a,g:i,b:u,a:c(l,1)}}(e);return function(e){if(!e)return;const{r:t,g:s,b:r,a:o}=e,n=Math.round(255*o);return`#${t.toString(16).padStart(2,"0")}${s.toString(16).padStart(2,"0")}${r.toString(16).padStart(2,"0")}${n.toString(16).padStart(2,"0")}`}({r:s,g:a,b:i,a:u*t})}function i(e,t){const s=e.colors||{};if(s[t])return s[t];const r=l[t];if(!r)throw new Error(`Unknown theme color key: ${t}`);return"string"==typeof r?i(e,r):function(e,t){const s=t[e.type];if(Array.isArray(s)){const[t,r,...o]=s;return t(i(e,r),...o)}return s}(e,r)}const u="#6FC3DF",l={"editor.foreground":{dark:"#bbbbbb",light:"#333333",hc:"#ffffff"},"editorLineNumber.foreground":{dark:"#858585",light:"#237893",hc:"#fffffe"},"editor.selectionBackground":{light:"#ADD6FF",dark:"#264F78",hc:"#f3f518"},"editor.background":{light:"#fffffe",dark:"#1E1E1E",hc:"#000000"},"editorGroupHeader.tabsBackground":{dark:"#252526",light:"#F3F3F3"},"tab.activeBackground":"editor.background","tab.activeForeground":{dark:"#ffffff",light:"#333333",hc:"#ffffff"},"tab.border":{dark:"#252526",light:"#F3F3F3",hc:u},"tab.activeBorder":"tab.activeBackground","tab.inactiveBackground":{dark:"#2D2D2D",light:"#ECECEC"},"tab.inactiveForeground":{dark:[a,"tab.activeForeground",.5],light:[a,"tab.activeForeground",.5],hc:"#ffffff"},"diffEditor.insertedTextBackground":{dark:"#9ccc2c33",light:"#9ccc2c40"},"diffEditor.removedTextBackground":{dark:"#ff000033",light:"#ff000033"},"diffEditor.insertedLineBackground":{dark:"#9bb95533",light:"#9bb95533"},"diffEditor.removedLineBackground":{dark:"#ff000033",light:"#ff000033"},"icon.foreground":{dark:"#C5C5C5",light:"#424242",hc:"#FFFFFF"},"sideBar.background":{dark:"#252526",light:"#F3F3F3",hc:"#000000"},"sideBar.foreground":"editor.foreground","sideBar.border":"sideBar.background","list.inactiveSelectionBackground":{dark:"#37373D",light:"#E4E6F1"},"list.inactiveSelectionForeground":{},"list.hoverBackground":{dark:"#2A2D2E",light:"#F0F0F0"},"list.hoverForeground":{},"editorGroupHeader.tabsBorder":{hc:u},"tab.activeBorderTop":{hc:u},"tab.hoverBackground":"tab.inactiveBackground","tab.hoverForeground":"tab.inactiveForeground","editor.rangeHighlightBackground":{dark:"#ffffff0b",light:"#fdff0033"},"editor.infoForeground":{dark:"#3794FF",light:"#1a85ff",hc:"#3794FF"},"input.border":{hc:u},"input.background":{dark:"#3C3C3C",light:"#fffffe",hc:"#000000"},"input.foreground":"editor.foreground","editor.lineHighlightBackground":{},focusBorder:{light:"#0090F1",dark:"#007FD4",hc:u},"editorGroup.border":{dark:"#444444",light:"#E7E7E7",hc:u},"list.activeSelectionBackground":{dark:"#094771",light:"#0060C0",hc:"#000000"},"list.activeSelectionForeground":{dark:"#fffffe",light:"#fffffe",hc:"#fffffe"},"lighter.inlineBackground":{dark:[a,"editor.background",.9],light:[a,"editor.background",.9]},"terminal.background":"editor.background","terminal.foreground":"editor.foreground","terminal.ansiBlack":{dark:"#000000",light:"#000000",hc:"#000000"},"terminal.ansiRed":{dark:"#cd3131",light:"#cd3131",hc:"#cd0000"},"terminal.ansiGreen":{dark:"#0DBC79",light:"#00BC00",hc:"#00cd00"},"terminal.ansiYellow":{dark:"#e5e510",light:"#949800",hc:"#cdcd00"},"terminal.ansiBlue":{dark:"#2472c8",light:"#0451a5",hc:"#0000ee"},"terminal.ansiMagenta":{dark:"#bc3fbc",light:"#bc05bc",hc:"#cd00cd"},"terminal.ansiCyan":{dark:"#11a8cd",light:"#0598bc",hc:"#00cdcd"},"terminal.ansiWhite":{dark:"#e5e5e5",light:"#555555",hc:"#e5e5e5"},"terminal.ansiBrightBlack":{dark:"#666666",light:"#666666",hc:"#7f7f7f"},"terminal.ansiBrightRed":{dark:"#f14c4c",light:"#cd3131",hc:"#ff0000"},"terminal.ansiBrightGreen":{dark:"#23d18b",light:"#14CE14",hc:"#00ff00"},"terminal.ansiBrightYellow":{dark:"#f5f543",light:"#b5ba00",hc:"#ffff00"},"terminal.ansiBrightBlue":{dark:"#3b8eea",light:"#0451a5",hc:"#5c5cff"},"terminal.ansiBrightMagenta":{dark:"#d670d6",light:"#bc05bc",hc:"#ff00ff"},"terminal.ansiBrightCyan":{dark:"#29b8db",light:"#0598bc",hc:"#00ffff"},"terminal.ansiBrightWhite":{dark:"#e5e5e5",light:"#a5a5a5",hc:"#ffffff"}},h=new Map,d=new Map;async function p(e){if("string"==typeof e){const r=e;if(!f.includes(r))throw new b(r);if(!h.has(r)){const e=async function(e){try{return await t()}catch(t){return await s(`themes/${e}`)}}(r).then((e=>(d.set(r,e),e)));h.set(r,e)}return h.get(r)}return e}function m(e){let t=null;if("string"==typeof e){if(t=d.get(e),!t)throw new Error("Syntax highlighting error: theme not loaded")}else t=e;return function(e){if(!e)return;const t=e.settings||e.tokenColors||[],s={name:e.name||"unknown-theme",type:g(e),foreground:"",background:"",settings:t,colors:e.colors||{},colorNames:e.colorNames},r=t.find((e=>!e.scope));if(r){const{foreground:e,background:t}=(null==r?void 0:r.settings)||{},o={};e&&!s.colors["editor.foreground"]&&(o["editor.foreground"]=e),t&&!s.colors["editor.background"]&&(o["editor.background"]=t),Object.keys(o).length>0&&(s.colors=Object.assign(Object.assign({},s.colors),o)),s.foreground=e,s.background=t}r||(s.settings=[{settings:{foreground:i(s,"editor.foreground"),background:i(s,"editor.background")}},...s.settings]);if(s.background=s.background||i(s,"editor.background"),s.foreground=s.foreground||i(s,"editor.foreground"),"from-css"===e.type&&!s.colorNames){const e={};let t=0;s.settings=s.settings.map((s=>{const r=Object.assign(Object.assign({},s),{settings:Object.assign({},s.settings)}),{foreground:o,background:n}=r.settings||{};return o&&!e[o]&&(e[o]=`#${t.toString(16).padStart(6,"0")}`,t++),n&&!e[n]&&(e[n]=`#${t.toString(16).padStart(6,"0")}`,t++),o&&(r.settings.foreground=e[o]),n&&(r.settings.background=e[n]),r})),s.colorNames=e}return s}(t)}function g(e){var t;if("from-css"===e.type)return"from-css";return"light"===(e.type?e.type:(null===(t=e.name)||void 0===t?void 0:t.toLowerCase().includes("light"))?"light":"dark")?"light":"dark"}const f=["dark-plus","dracula-soft","dracula","github-dark","github-dark-dimmed","github-from-css","github-light","light-plus","material-darker","material-default","material-from-css","material-lighter","material-ocean","material-palenight","min-dark","min-light","monokai","nord","one-dark-pro","poimandres","slack-dark","slack-ochin","solarized-dark","solarized-light"];class b extends Error{constructor(e){super(`Unknown theme: ${e}`),this.theme=e}}function y(e){const t=t=>"colorScheme"===t?function(e){return"from-css"===e.type?"var(--ch-0)":e.type}(e):"foreground"===t?e.foreground:"background"===t?e.background:i(e,t);return{colorScheme:t("colorScheme"),foreground:t("foreground"),background:t("background"),lighter:{inlineBackground:t("lighter.inlineBackground")},editor:{background:t("editor.background"),foreground:t("editor.foreground"),lineHighlightBackground:t("editor.lineHighlightBackground"),rangeHighlightBackground:t("editor.rangeHighlightBackground"),infoForeground:t("editor.infoForeground"),selectionBackground:t("editor.selectionBackground")},focusBorder:t("focusBorder"),tab:{activeBackground:t("tab.activeBackground"),activeForeground:t("tab.activeForeground"),inactiveBackground:t("tab.inactiveBackground"),inactiveForeground:t("tab.inactiveForeground"),border:t("tab.border"),activeBorder:t("tab.activeBorder"),activeBorderTop:t("tab.activeBorderTop")},editorGroup:{border:t("editorGroup.border")},editorGroupHeader:{tabsBackground:t("editorGroupHeader.tabsBackground")},editorLineNumber:{foreground:t("editorLineNumber.foreground")},input:{background:t("input.background"),foreground:t("input.foreground"),border:t("input.border")},icon:{foreground:t("icon.foreground")},sideBar:{background:t("sideBar.background"),foreground:t("sideBar.foreground"),border:t("sideBar.border")},list:{activeSelectionBackground:t("list.activeSelectionBackground"),activeSelectionForeground:t("list.activeSelectionForeground"),hoverBackground:t("list.hoverBackground"),hoverForeground:t("list.hoverForeground")}}}const _=["abap","actionscript-3","ada","apache","apex","apl","applescript","ara","asm","astro","awk","ballerina","bash","bat","batch","be","beancount","berry","bibtex","bicep","blade","c","c#","cadence","cdc","clarity","clj","clojure","cmake","cmd","cobol","codeql","coffee","console","cpp","crystal","cs","csharp","css","cue","cypher","d","dart","dax","diff","docker","dockerfile","dream-maker","elixir","elm","erb","erl","erlang","f#","fish","fs","fsharp","fsl","gdresource","gdscript","gdshader","gherkin","git-commit","git-rebase","glimmer-js","glimmer-ts","glsl","gnuplot","go","graphql","groovy","hack","haml","handlebars","haskell","hbs","hcl","hjson","hlsl","hs","html","http","imba","ini","jade","java","javascript","jinja-html","jison","js","json","json5","jsonc","jsonl","jsonnet","jssm","jsx","julia","kotlin","kql","kusto","latex","less","liquid","lisp","logo","lua","make","makefile","markdown","marko","matlab","md","mdx","mermaid","narrat","nextflow","nginx","nim","nix","objc","objective-c","objective-cpp","ocaml","pascal","perl","perl6","php","plsql","postcss","powerquery","powershell","prisma","prolog","properties","proto","ps","ps1","pug","puppet","purescript","py","python","ql","r","raku","razor","rb","reg","rel","riscv","rs","rst","ruby","rust","sas","sass","scala","scheme","scss","sh","shader","shaderlab","shell","shellscript","shellsession","smalltalk","solidity","sparql","sql","ssh-config","stata","styl","stylus","svelte","swift","system-verilog","tasl","tcl","terminal","tex","text","toml","ts","tsx","turtle","twig","txt","typescript","v","vb","verilog","vhdl","vim","viml","vimscript","vue","vue-html","vyper","wasm","wenyan","wgsl","wolfram","xml","xsl","yaml","yml","zenscript","zsh","文言"],x={abap:"source.abap","actionscript-3":"source.actionscript.3",ada:"source.ada",apache:"source.apacheconf",apex:"source.apex",apl:"source.apl",applescript:"source.applescript",ara:"source.ara",asm:"source.asm.x86_64",astro:"source.astro",awk:"source.awk",ballerina:"source.ballerina",bat:"source.batchfile",batch:"source.batchfile",beancount:"text.beancount",berry:"source.berry",be:"source.berry",bibtex:"text.bibtex",bicep:"source.bicep",blade:"text.html.php.blade",c:"source.c",cadence:"source.cadence",cdc:"source.cadence",clarity:"source.clar",clojure:"source.clojure",clj:"source.clojure",cmake:"source.cmake",cobol:"source.cobol",codeql:"source.ql",ql:"source.ql",coffee:"source.coffee",cpp:"source.cpp",crystal:"source.crystal",csharp:"source.cs","c#":"source.cs",cs:"source.cs",css:"source.css",cue:"source.cue",cypher:"source.cypher",d:"source.d",dart:"source.dart",dax:"source.dax",diff:"source.diff",docker:"source.dockerfile",dockerfile:"source.dockerfile","dream-maker":"source.dm",elixir:"source.elixir",elm:"source.elm",erb:"text.html.erb",erlang:"source.erlang",erl:"source.erlang",fish:"source.fish",fsharp:"source.fsharp","f#":"source.fsharp",fs:"source.fsharp",gdresource:"source.gdresource",gdscript:"source.gdscript",gdshader:"source.gdshader",gherkin:"text.gherkin.feature","git-commit":"text.git-commit","git-rebase":"text.git-rebase","glimmer-js":"source.gjs","glimmer-ts":"source.gts",glsl:"source.glsl",gnuplot:"source.gnuplot",go:"source.go",graphql:"source.graphql",groovy:"source.groovy",hack:"source.hack",haml:"text.haml",handlebars:"text.html.handlebars",hbs:"text.html.handlebars",haskell:"source.haskell",hs:"source.haskell",hcl:"source.hcl",hjson:"source.hjson",hlsl:"source.hlsl",html:"text.html.basic",http:"source.http",imba:"source.imba",ini:"source.ini",properties:"source.ini",java:"source.java",javascript:"source.js",js:"source.js","jinja-html":"text.html.jinja",jison:"source.jison",json:"source.json",json5:"source.json5",jsonc:"source.json.comments",jsonl:"source.json.lines",jsonnet:"source.jsonnet",jssm:"source.jssm",fsl:"source.jssm",jsx:"source.js.jsx",julia:"source.julia",kotlin:"source.kotlin",kusto:"source.kusto",kql:"source.kusto",latex:"text.tex.latex",less:"source.css.less",liquid:"text.html.liquid",lisp:"source.lisp",logo:"source.logo",lua:"source.lua",make:"source.makefile",makefile:"source.makefile",markdown:"text.html.markdown",md:"text.html.markdown",marko:"text.marko",matlab:"source.matlab",mdx:"source.mdx",mermaid:"source.mermaid",narrat:"source.narrat",nextflow:"source.nextflow",nginx:"source.nginx",nim:"source.nim",nix:"source.nix","objective-c":"source.objc",objc:"source.objc","objective-cpp":"source.objcpp",ocaml:"source.ocaml",pascal:"source.pascal",perl:"source.perl",php:"source.php",plsql:"source.plsql.oracle",postcss:"source.css.postcss",powerquery:"source.powerquery",powershell:"source.powershell",ps:"source.powershell",ps1:"source.powershell",prisma:"source.prisma",prolog:"source.prolog",proto:"source.proto",pug:"text.pug",jade:"text.pug",puppet:"source.puppet",purescript:"source.purescript",python:"source.python",py:"source.python",r:"source.r",raku:"source.perl.6",perl6:"source.perl.6",razor:"text.aspnetcorerazor",reg:"source.reg",rel:"source.rel",riscv:"source.riscv",rst:"source.rst",ruby:"source.ruby",rb:"source.ruby",rust:"source.rust",rs:"source.rust",sas:"source.sas",sass:"source.sass",scala:"source.scala",scheme:"source.scheme",scss:"source.css.scss",shaderlab:"source.shaderlab",shader:"source.shaderlab",shellscript:"source.shell",bash:"source.shell",console:"source.shell",sh:"source.shell",shell:"source.shell",zsh:"source.shell",shellsession:"text.shell-session",smalltalk:"source.smalltalk",solidity:"source.solidity",sparql:"source.sparql",sql:"source.sql","ssh-config":"source.ssh-config",stata:"source.stata",stylus:"source.stylus",styl:"source.stylus",svelte:"source.svelte",swift:"source.swift","system-verilog":"source.systemverilog",tasl:"source.tasl",tcl:"source.tcl",tex:"text.tex",toml:"source.toml",tsx:"source.tsx",turtle:"source.turtle",twig:"text.html.twig",txt:"source.txt",typescript:"source.ts",ts:"source.ts",v:"source.v",vb:"source.asp.vb.net",cmd:"source.asp.vb.net",verilog:"source.verilog",vhdl:"source.vhdl",viml:"source.viml",vim:"source.viml",vimscript:"source.viml","vue-html":"text.html.vue-html",vue:"source.vue",vyper:"source.vyper",wasm:"source.wat",wenyan:"source.wenyan","文言":"source.wenyan",wgsl:"source.wgsl",wolfram:"source.wolfram",xml:"text.xml",xsl:"text.xml.xsl",yaml:"source.yaml",yml:"source.yaml",zenscript:"source.zenscript"},k={"source.abap":{id:"abap",path:"abap.tmLanguage.json",embeddedScopes:[]},"source.actionscript.3":{id:"actionscript-3",path:"actionscript-3.tmLanguage.json",embeddedScopes:[]},"source.ada":{id:"ada",path:"ada.tmLanguage.json",embeddedScopes:[]},"source.apacheconf":{id:"apache",path:"apache.tmLanguage.json",embeddedScopes:[]},"source.apex":{id:"apex",path:"apex.tmLanguage.json",embeddedScopes:[]},"source.apl":{id:"apl",path:"apl.tmLanguage.json",embeddedScopes:["source.java","source.json","source.js","source.css","text.xml","text.html.basic"]},"source.applescript":{id:"applescript",path:"applescript.tmLanguage.json",embeddedScopes:[]},"source.ara":{id:"ara",path:"ara.tmLanguage.json",embeddedScopes:[]},"source.asm.x86_64":{id:"asm",path:"asm.tmLanguage.json",embeddedScopes:[]},"source.astro":{id:"astro",path:"astro.tmLanguage.json",embeddedScopes:["source.tsx","source.css.postcss","source.css.less","source.css.scss","source.css","source.sass","source.stylus","source.ts","source.js","source.json"]},"source.awk":{id:"awk",path:"awk.tmLanguage.json",embeddedScopes:[]},"source.ballerina":{id:"ballerina",path:"ballerina.tmLanguage.json",embeddedScopes:[]},"source.batchfile":{id:"bat",path:"bat.tmLanguage.json",embeddedScopes:[]},"text.beancount":{id:"beancount",path:"beancount.tmLanguage.json",embeddedScopes:[]},"source.berry":{id:"berry",path:"berry.tmLanguage.json",embeddedScopes:[]},"text.bibtex":{id:"bibtex",path:"bibtex.tmLanguage.json",embeddedScopes:[]},"source.bicep":{id:"bicep",path:"bicep.tmLanguage.json",embeddedScopes:[]},"text.html.php.blade":{id:"blade",path:"blade.tmLanguage.json",embeddedScopes:["source.java","source.css","source.json","source.js","source.sql","text.xml","text.html.basic"]},"source.c":{id:"c",path:"c.tmLanguage.json",embeddedScopes:[]},"source.cadence":{id:"cadence",path:"cadence.tmLanguage.json",embeddedScopes:[]},"source.clar":{id:"clarity",path:"clarity.tmLanguage.json",embeddedScopes:[]},"source.clojure":{id:"clojure",path:"clojure.tmLanguage.json",embeddedScopes:[]},"source.cmake":{id:"cmake",path:"cmake.tmLanguage.json",embeddedScopes:[]},"source.cobol":{id:"cobol",path:"cobol.tmLanguage.json",embeddedScopes:["source.css","source.js","source.java","text.html.basic","source.sql"]},"source.ql":{id:"codeql",path:"codeql.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.stylus","source.sass","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.tsx","source.ts","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.css.scss","source.swift","source.objc","source.css.less","source.json.comments","source.json","source.js","text.pug","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.coffee","source.clojure","source.batchfile","source.yaml","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","text.html.basic","source.css","text.html.markdown"]},"source.coffee":{id:"coffee",path:"coffee.tmLanguage.json",embeddedScopes:["source.js"]},"source.cpp":{id:"cpp",path:"cpp.tmLanguage.json",embeddedScopes:["source.c","source.sql","source.glsl"]},"source.crystal":{id:"crystal",path:"crystal.tmLanguage.json",embeddedScopes:["source.shell","source.js","source.c","source.css","source.sql","text.html.basic"]},"source.cs":{id:"csharp",path:"csharp.tmLanguage.json",embeddedScopes:[]},"source.css":{id:"css",path:"css.tmLanguage.json",embeddedScopes:[]},"source.cue":{id:"cue",path:"cue.tmLanguage.json",embeddedScopes:[]},"source.cypher":{id:"cypher",path:"cypher.tmLanguage.json",embeddedScopes:[]},"source.d":{id:"d",path:"d.tmLanguage.json",embeddedScopes:[]},"source.dart":{id:"dart",path:"dart.tmLanguage.json",embeddedScopes:[]},"source.dax":{id:"dax",path:"dax.tmLanguage.json",embeddedScopes:[]},"source.diff":{id:"diff",path:"diff.tmLanguage.json",embeddedScopes:[]},"source.dockerfile":{id:"docker",path:"docker.tmLanguage.json",embeddedScopes:[]},"source.dm":{id:"dream-maker",path:"dream-maker.tmLanguage.json",embeddedScopes:[]},"source.elixir":{id:"elixir",path:"elixir.tmLanguage.json",embeddedScopes:["source.css","source.js","text.html.basic"]},"source.elm":{id:"elm",path:"elm.tmLanguage.json",embeddedScopes:["source.c","source.glsl"]},"text.html.erb":{id:"erb",path:"erb.tmLanguage.json",embeddedScopes:["source.java","source.lua","source.shell","source.c","source.sql","text.xml","source.css","source.js","source.ruby","text.html.basic"]},"source.erlang":{id:"erlang",path:"erlang.tmLanguage.json",embeddedScopes:[]},"source.fish":{id:"fish",path:"fish.tmLanguage.json",embeddedScopes:[]},"source.fsharp":{id:"fsharp",path:"fsharp.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.stylus","source.sass","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.cs","source.tsx","source.ts","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.css.scss","source.swift","source.objc","source.css.less","source.json.comments","source.json","source.js","text.pug","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.coffee","source.clojure","source.batchfile","source.yaml","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","text.html.basic","source.css","text.html.markdown"]},"source.gdresource":{id:"gdresource",path:"gdresource.tmLanguage.json",embeddedScopes:["source.gdscript","source.gdshader"]},"source.gdscript":{id:"gdscript",path:"gdscript.tmLanguage.json",embeddedScopes:[]},"source.gdshader":{id:"gdshader",path:"gdshader.tmLanguage.json",embeddedScopes:[]},"text.gherkin.feature":{id:"gherkin",path:"gherkin.tmLanguage.json",embeddedScopes:[]},"text.git-commit":{id:"git-commit",path:"git-commit.tmLanguage.json",embeddedScopes:["source.diff"]},"text.git-rebase":{id:"git-rebase",path:"git-rebase.tmLanguage.json",embeddedScopes:["source.shell"]},"source.gjs":{id:"glimmer-js",path:"glimmer-js.tmLanguage.json",embeddedScopes:["source.yaml","source.css","text.html.basic","text.html.handlebars","source.js"]},"source.gts":{id:"glimmer-ts",path:"glimmer-ts.tmLanguage.json",embeddedScopes:["source.yaml","source.js","source.css","text.html.basic","text.html.handlebars","source.ts"]},"source.glsl":{id:"glsl",path:"glsl.tmLanguage.json",embeddedScopes:["source.c"]},"source.gnuplot":{id:"gnuplot",path:"gnuplot.tmLanguage.json",embeddedScopes:[]},"source.go":{id:"go",path:"go.tmLanguage.json",embeddedScopes:[]},"source.graphql":{id:"graphql",path:"graphql.tmLanguage.json",embeddedScopes:["source.tsx","source.js.jsx","source.ts","source.js"]},"source.groovy":{id:"groovy",path:"groovy.tmLanguage.json",embeddedScopes:[]},"source.hack":{id:"hack",path:"hack.tmLanguage.json",embeddedScopes:["source.css","source.js","source.sql","text.html.basic"]},"text.haml":{id:"haml",path:"haml.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.stylus","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.tsx","source.ts","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.css.scss","source.swift","source.objc","source.css.less","source.json.comments","source.json","text.pug","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.clojure","source.batchfile","source.yaml","text.xml.xsl","source.asp.vb.net","source.php","source.r","source.perl","source.makefile","source.java","source.ini","source.lua","source.shell","source.c","source.sql","text.xml","text.html.basic","source.css","text.html.markdown","source.coffee","source.sass","source.js","source.ruby"]},"text.html.handlebars":{id:"handlebars",path:"handlebars.tmLanguage.json",embeddedScopes:["source.yaml","source.js","source.css","text.html.basic"]},"source.haskell":{id:"haskell",path:"haskell.tmLanguage.json",embeddedScopes:[]},"source.hcl":{id:"hcl",path:"hcl.tmLanguage.json",embeddedScopes:[]},"source.hjson":{id:"hjson",path:"hjson.tmLanguage.json",embeddedScopes:[]},"source.hlsl":{id:"hlsl",path:"hlsl.tmLanguage.json",embeddedScopes:[]},"text.html.basic":{id:"html",path:"html.tmLanguage.json",embeddedScopes:["source.css","source.js"]},"source.http":{id:"http",path:"http.tmLanguage.json",embeddedScopes:["source.tsx","source.js.jsx","source.ts","source.js","source.java","source.graphql","text.xml","source.json","source.shell"]},"source.imba":{id:"imba",path:"imba.tmLanguage.json",embeddedScopes:[]},"source.ini":{id:"ini",path:"ini.tmLanguage.json",embeddedScopes:[]},"source.java":{id:"java",path:"java.tmLanguage.json",embeddedScopes:[]},"source.js":{id:"javascript",path:"javascript.tmLanguage.json",embeddedScopes:[]},"text.html.jinja":{id:"jinja-html",path:"jinja-html.tmLanguage.json",embeddedScopes:["source.css","source.js","text.html.basic"]},"source.jison":{id:"jison",path:"jison.tmLanguage.json",embeddedScopes:["source.js"]},"source.json":{id:"json",path:"json.tmLanguage.json",embeddedScopes:[]},"source.json5":{id:"json5",path:"json5.tmLanguage.json",embeddedScopes:[]},"source.json.comments":{id:"jsonc",path:"jsonc.tmLanguage.json",embeddedScopes:[]},"source.json.lines":{id:"jsonl",path:"jsonl.tmLanguage.json",embeddedScopes:[]},"source.jsonnet":{id:"jsonnet",path:"jsonnet.tmLanguage.json",embeddedScopes:[]},"source.jssm":{id:"jssm",path:"jssm.tmLanguage.json",embeddedScopes:[]},"source.js.jsx":{id:"jsx",path:"jsx.tmLanguage.json",embeddedScopes:[]},"source.julia":{id:"julia",path:"julia.tmLanguage.json",embeddedScopes:["source.c","source.glsl","source.sql","source.r","source.js","source.python","source.cpp"]},"source.kotlin":{id:"kotlin",path:"kotlin.tmLanguage.json",embeddedScopes:[]},"source.kusto":{id:"kusto",path:"kusto.tmLanguage.json",embeddedScopes:[]},"text.tex.latex":{id:"latex",path:"latex.tmLanguage.json",embeddedScopes:["source.glsl","source.shell","source.sql","source.cpp","source.c","source.r","source.gnuplot","source.scala","source.rust","source.yaml","source.python","source.ts","source.js","source.ruby","source.julia","source.lua","source.java","text.xml","text.html.basic","source.haskell","source.css","text.tex"]},"source.css.less":{id:"less",path:"less.tmLanguage.json",embeddedScopes:["source.css"]},"text.html.liquid":{id:"liquid",path:"liquid.tmLanguage.json",embeddedScopes:["source.js","source.json","source.css","text.html.basic"]},"source.lisp":{id:"lisp",path:"lisp.tmLanguage.json",embeddedScopes:[]},"source.logo":{id:"logo",path:"logo.tmLanguage.json",embeddedScopes:[]},"source.lua":{id:"lua",path:"lua.tmLanguage.json",embeddedScopes:["source.c"]},"source.makefile":{id:"make",path:"make.tmLanguage.json",embeddedScopes:[]},"text.html.markdown":{id:"markdown",path:"markdown.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.stylus","source.sass","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.tsx","source.ts","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.css.scss","source.swift","source.objc","source.css.less","source.json.comments","source.json","source.js","text.pug","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.coffee","source.clojure","source.batchfile","source.yaml","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","text.html.basic","source.css"]},"text.marko":{id:"marko",path:"marko.tmLanguage.json",embeddedScopes:["source.js","source.css.scss","source.css.less","source.css"]},"source.matlab":{id:"matlab",path:"matlab.tmLanguage.json",embeddedScopes:[]},"source.mdx":{id:"mdx",path:"mdx.tmLanguage.json",embeddedScopes:["source.gnuplot","text.tex","source.stylus","source.sass","text.bibtex","text.tex.latex","text.html.handlebars","source.dart","source.fsharp","source.powershell","source.perl.6","source.json.comments","text.pug","source.groovy","text.git-rebase","text.git-commit","source.batchfile","text.xml.xsl","source.asp.vb.net","source.php","source.js.jsx","source.glsl","source.ts","source.swift","text.xml","source.sql","text.shell-session","source.shell","source.css.scss","source.scala","source.rust","source.ruby","source.r","source.python","source.perl","source.objc","text.html.markdown","source.makefile","source.lua","source.css.less","source.kotlin","source.julia","source.json","source.js","source.java","source.ini","text.html.basic","source.haskell","source.graphql","source.go","source.erlang","source.elm","source.elixir","source.dockerfile","source.diff","source.css","source.cs","source.cpp","source.coffee","source.clojure","source.c","source.yaml","source.toml","source.tsx"]},"source.mermaid":{id:"mermaid",path:"mermaid.tmLanguage.json",embeddedScopes:[]},"source.narrat":{id:"narrat",path:"narrat.tmLanguage.json",embeddedScopes:[]},"source.nextflow":{id:"nextflow",path:"nextflow.tmLanguage.json",embeddedScopes:[]},"source.nginx":{id:"nginx",path:"nginx.tmLanguage.json",embeddedScopes:["source.c","source.lua"]},"source.nim":{id:"nim",path:"nim.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.stylus","source.sass","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.tsx","source.ts","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.css.scss","source.swift","source.objc","source.css.less","source.json.comments","source.json","text.pug","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.coffee","source.clojure","source.batchfile","source.yaml","text.xml.xsl","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.ini","source.java","text.html.markdown","source.glsl","source.css","source.js","text.xml","text.html.basic","source.c"]},"source.nix":{id:"nix",path:"nix.tmLanguage.json",embeddedScopes:[]},"source.objc":{id:"objective-c",path:"objective-c.tmLanguage.json",embeddedScopes:[]},"source.objcpp":{id:"objective-cpp",path:"objective-cpp.tmLanguage.json",embeddedScopes:[]},"source.ocaml":{id:"ocaml",path:"ocaml.tmLanguage.json",embeddedScopes:[]},"source.pascal":{id:"pascal",path:"pascal.tmLanguage.json",embeddedScopes:[]},"source.perl":{id:"perl",path:"perl.tmLanguage.json",embeddedScopes:["source.java","source.sql","source.js","source.css","text.xml","text.html.basic"]},"source.php":{id:"php",path:"php.tmLanguage.json",embeddedScopes:["source.java","source.css","source.json","source.js","source.sql","text.xml","text.html.basic"]},"source.plsql.oracle":{id:"plsql",path:"plsql.tmLanguage.json",embeddedScopes:[]},"source.css.postcss":{id:"postcss",path:"postcss.tmLanguage.json",embeddedScopes:[]},"source.powerquery":{id:"powerquery",path:"powerquery.tmLanguage.json",embeddedScopes:[]},"source.powershell":{id:"powershell",path:"powershell.tmLanguage.json",embeddedScopes:[]},"source.prisma":{id:"prisma",path:"prisma.tmLanguage.json",embeddedScopes:[]},"source.prolog":{id:"prolog",path:"prolog.tmLanguage.json",embeddedScopes:[]},"source.proto":{id:"proto",path:"proto.tmLanguage.json",embeddedScopes:[]},"text.pug":{id:"pug",path:"pug.tmLanguage.json",embeddedScopes:["text.html.basic","source.coffee","source.stylus","source.css.scss","source.sass","source.css","source.js"]},"source.puppet":{id:"puppet",path:"puppet.tmLanguage.json",embeddedScopes:[]},"source.purescript":{id:"purescript",path:"purescript.tmLanguage.json",embeddedScopes:[]},"source.python":{id:"python",path:"python.tmLanguage.json",embeddedScopes:[]},"source.r":{id:"r",path:"r.tmLanguage.json",embeddedScopes:[]},"source.perl.6":{id:"raku",path:"raku.tmLanguage.json",embeddedScopes:[]},"text.aspnetcorerazor":{id:"razor",path:"razor.tmLanguage.json",embeddedScopes:["source.css","source.js","source.cs","text.html.basic"]},"source.reg":{id:"reg",path:"reg.tmLanguage.json",embeddedScopes:[]},"source.rel":{id:"rel",path:"rel.tmLanguage.json",embeddedScopes:[]},"source.riscv":{id:"riscv",path:"riscv.tmLanguage.json",embeddedScopes:[]},"source.rst":{id:"rst",path:"rst.tmLanguage.json",embeddedScopes:["source.java","source.lua","source.c","source.css","text.xml","text.html.basic","source.sql","source.glsl","source.ruby","source.cmake","source.yaml","source.shell","source.js","source.python","source.cpp"]},"source.ruby":{id:"ruby",path:"ruby.tmLanguage.json",embeddedScopes:["source.java","source.lua","source.shell","source.js","source.c","source.css","source.sql","text.xml","text.html.basic"]},"source.rust":{id:"rust",path:"rust.tmLanguage.json",embeddedScopes:[]},"source.sas":{id:"sas",path:"sas.tmLanguage.json",embeddedScopes:["source.sql"]},"source.sass":{id:"sass",path:"sass.tmLanguage.json",embeddedScopes:[]},"source.scala":{id:"scala",path:"scala.tmLanguage.json",embeddedScopes:[]},"source.scheme":{id:"scheme",path:"scheme.tmLanguage.json",embeddedScopes:[]},"source.css.scss":{id:"scss",path:"scss.tmLanguage.json",embeddedScopes:["source.css"]},"source.shaderlab":{id:"shaderlab",path:"shaderlab.tmLanguage.json",embeddedScopes:["source.hlsl"]},"source.shell":{id:"shellscript",path:"shellscript.tmLanguage.json",embeddedScopes:[]},"text.shell-session":{id:"shellsession",path:"shellsession.tmLanguage.json",embeddedScopes:["source.shell"]},"source.smalltalk":{id:"smalltalk",path:"smalltalk.tmLanguage.json",embeddedScopes:[]},"source.solidity":{id:"solidity",path:"solidity.tmLanguage.json",embeddedScopes:[]},"source.sparql":{id:"sparql",path:"sparql.tmLanguage.json",embeddedScopes:["source.turtle"]},"source.sql":{id:"sql",path:"sql.tmLanguage.json",embeddedScopes:[]},"source.ssh-config":{id:"ssh-config",path:"ssh-config.tmLanguage.json",embeddedScopes:[]},"source.stata":{id:"stata",path:"stata.tmLanguage.json",embeddedScopes:["source.sql"]},"source.stylus":{id:"stylus",path:"stylus.tmLanguage.json",embeddedScopes:[]},"source.svelte":{id:"svelte",path:"svelte.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.tsx","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.swift","source.objc","source.json.comments","source.json","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.clojure","source.batchfile","source.yaml","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","text.html.basic","text.html.markdown","text.pug","source.css.postcss","source.css.less","source.css.scss","source.css","source.sass","source.stylus","source.coffee","source.ts","source.js"]},"source.swift":{id:"swift",path:"swift.tmLanguage.json",embeddedScopes:[]},"source.systemverilog":{id:"system-verilog",path:"system-verilog.tmLanguage.json",embeddedScopes:[]},"source.tasl":{id:"tasl",path:"tasl.tmLanguage.json",embeddedScopes:[]},"source.tcl":{id:"tcl",path:"tcl.tmLanguage.json",embeddedScopes:[]},"text.tex":{id:"tex",path:"tex.tmLanguage.json",embeddedScopes:["source.r"]},"source.toml":{id:"toml",path:"toml.tmLanguage.json",embeddedScopes:[]},"source.tsx":{id:"tsx",path:"tsx.tmLanguage.json",embeddedScopes:[]},"source.turtle":{id:"turtle",path:"turtle.tmLanguage.json",embeddedScopes:[]},"text.html.twig":{id:"twig",path:"twig.tmLanguage.json",embeddedScopes:["source.java","source.lua","source.shell","source.c","source.json","source.sql","text.xml","text.html.basic","source.ruby","source.python","source.php","source.js","source.css"]},"source.txt":{id:"txt",path:"txt.tmLanguage.json",embeddedScopes:[]},"source.ts":{id:"typescript",path:"typescript.tmLanguage.json",embeddedScopes:[]},"source.v":{id:"v",path:"v.tmLanguage.json",embeddedScopes:[]},"source.asp.vb.net":{id:"vb",path:"vb.tmLanguage.json",embeddedScopes:[]},"source.verilog":{id:"verilog",path:"verilog.tmLanguage.json",embeddedScopes:[]},"source.vhdl":{id:"vhdl",path:"vhdl.tmLanguage.json",embeddedScopes:[]},"source.viml":{id:"viml",path:"viml.tmLanguage.json",embeddedScopes:[]},"text.html.vue-html":{id:"vue-html",path:"vue-html.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.swift","source.objc","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.coffee","source.clojure","source.batchfile","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","source.graphql","source.toml","source.yaml","source.json5","source.json.comments","source.json","source.tsx","source.js.jsx","source.ts","source.css.less","source.css.scss","source.css","source.sass","source.stylus","text.pug","text.html.markdown","text.html.basic","source.js","source.vue"]},"source.vue":{id:"vue",path:"vue.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.swift","source.objc","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.coffee","source.clojure","source.batchfile","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","source.graphql","source.toml","source.yaml","source.json5","source.json.comments","source.json","source.tsx","source.js.jsx","source.ts","source.js","source.css.less","source.css.scss","source.css","source.sass","source.stylus","text.pug","text.html.markdown","text.html.basic"]},"source.vyper":{id:"vyper",path:"vyper.tmLanguage.json",embeddedScopes:[]},"source.wat":{id:"wasm",path:"wasm.tmLanguage.json",embeddedScopes:[]},"source.wenyan":{id:"wenyan",path:"wenyan.tmLanguage.json",embeddedScopes:[]},"source.wgsl":{id:"wgsl",path:"wgsl.tmLanguage.json",embeddedScopes:[]},"source.wolfram":{id:"wolfram",path:"wolfram.tmLanguage.json",embeddedScopes:[]},"text.xml":{id:"xml",path:"xml.tmLanguage.json",embeddedScopes:["source.java"]},"text.xml.xsl":{id:"xsl",path:"xsl.tmLanguage.json",embeddedScopes:["source.java","text.xml"]},"source.yaml":{id:"yaml",path:"yaml.tmLanguage.json",embeddedScopes:[]},"source.zenscript":{id:"zenscript",path:"zenscript.tmLanguage.json",embeddedScopes:[]}};var j={d:(e,t)=>{for(var s in t)j.o(t,s)&&!j.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},S={};j.d(S,{_X:()=>Qe,Bz:()=>He,ot:()=>ze,u:()=>De,jG:()=>A,Pn:()=>Ke});const w="undefined"!=typeof process&&!!process.env.VSCODE_TEXTMATE_DEBUG;var v;function L(e,t){const s=[],r=function(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,s=t.exec(e);return{next:()=>{if(!s)return null;const r=s[0];return s=t.exec(e),r}}}(e);let o=r.next();for(;null!==o;){let e=0;if(2===o.length&&":"===o.charAt(1)){switch(o.charAt(0)){case"R":e=1;break;case"L":e=-1;break;default:console.log(`Unknown priority ${o} in scope selector`)}o=r.next()}let t=c();if(s.push({matcher:t,priority:e}),","!==o)break;o=r.next()}return s;function n(){if("-"===o){o=r.next();const e=n();return t=>!!e&&!e(t)}if("("===o){o=r.next();const e=function(){const e=[];let t=c();for(;t&&(e.push(t),"|"===o||","===o);){do{o=r.next()}while("|"===o||","===o);t=c()}return t=>e.some((e=>e(t)))}();return")"===o&&(o=r.next()),e}if(C(o)){const e=[];do{e.push(o),o=r.next()}while(C(o));return s=>t(e,s)}return null}function c(){const e=[];let t=n();for(;t;)e.push(t),t=n();return t=>e.every((e=>e(t)))}}function C(e){return!!e&&!!e.match(/[\w\.:]+/)}function A(e){"function"==typeof e.dispose&&e.dispose()}function N(e){return Array.isArray(e)?function(e){let t=[];for(let s=0,r=e.length;s{for(let s in t)e[s]=t[s]})),e}function R(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return 0===t?e:~t==e.length-1?R(e.substring(0,e.length-1)):e.substr(1+~t)}!function(e){e.toBinaryStr=function(e){let t=e.toString(2);for(;t.length<32;)t="0"+t;return t},e.print=function(t){const s=e.getLanguageId(t),r=e.getTokenType(t),o=e.getFontStyle(t),n=e.getForeground(t),c=e.getBackground(t);console.log({languageId:s,tokenType:r,fontStyle:o,foreground:n,background:c})},e.getLanguageId=function(e){return(255&e)>>>0},e.getTokenType=function(e){return(768&e)>>>8},e.containsBalancedBrackets=function(e){return 0!=(1024&e)},e.getFontStyle=function(e){return(30720&e)>>>11},e.getForeground=function(e){return(16744448&e)>>>15},e.getBackground=function(e){return(4278190080&e)>>>24},e.set=function(t,s,r,o,n,c,a){let i=e.getLanguageId(t),u=e.getTokenType(t),l=e.containsBalancedBrackets(t)?1:0,h=e.getFontStyle(t),d=e.getForeground(t),p=e.getBackground(t);return 0!==s&&(i=s),8!==r&&(u=r),null!==o&&(l=o?1:0),-1!==n&&(h=n),0!==c&&(d=c),0!==a&&(p=a),(i<<0|u<<8|l<<10|h<<11|d<<15|p<<24)>>>0}}(v||(v={}));let I=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g;class E{static hasCaptures(e){return null!==e&&(I.lastIndex=0,I.test(e))}static replaceCaptures(e,t,s){return e.replace(I,((e,r,o,n)=>{let c=s[parseInt(r||o,10)];if(!c)return e;{let e=t.substring(c.start,c.end);for(;"."===e[0];)e=e.substring(1);switch(n){case"downcase":return e.toLowerCase();case"upcase":return e.toUpperCase();default:return e}}}))}}function B(e,t){return et?1:0}function G(e,t){if(null===e&&null===t)return 0;if(!e)return-1;if(!t)return 1;let s=e.length,r=t.length;if(s===r){for(let r=0;r`);return}const n=s.lookup(t);e instanceof $?H({baseGrammar:n,selfGrammar:o},r):z(e.ruleName,{baseGrammar:n,selfGrammar:o,repository:o.repository},r);const c=s.injections(e.scopeName);if(c)for(const e of c)r.add(new $(e))}function z(e,t,s){t.repository&&t.repository[e]&&Q([t.repository[e]],t,s)}function H(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&Q(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&Q(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function Q(e,t,s){for(const r of e){if(s.visitedRule.has(r))continue;s.visitedRule.add(r);const e=r.repository?P({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&Q(r.patterns,{...t,repository:e},s);const o=r.include;if(!o)continue;const n=Z(o);switch(n.kind){case 0:H({...t,selfGrammar:t.baseGrammar},s);break;case 1:H(t,s);break;case 2:z(n.ruleName,{...t,repository:e},s);break;case 3:case 4:const r=n.scopeName===t.selfGrammar.scopeName?t.selfGrammar:n.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(r){const o={baseGrammar:t.baseGrammar,selfGrammar:r,repository:e};4===n.kind?z(n.ruleName,o,s):H(o,s)}else 4===n.kind?s.add(new M(n.scopeName,n.ruleName)):s.add(new $(n.scopeName))}}}class K{constructor(){this.kind=0}}class V{constructor(){this.kind=1}}class Y{constructor(e){this.ruleName=e,this.kind=2}}class X{constructor(e){this.scopeName=e,this.kind=3}}class J{constructor(e,t){this.scopeName=e,this.ruleName=t,this.kind=4}}function Z(e){if("$base"===e)return new K;if("$self"===e)return new V;const t=e.indexOf("#");if(-1===t)return new X(e);if(0===t)return new Y(e.substring(1));{const s=e.substring(0,t),r=e.substring(t+1);return new J(s,r)}}const ee=/\\(\d+)/,te=/\\(\d+)/g;class se{constructor(e,t,s,r){this.$location=e,this.id=t,this._name=s||null,this._nameIsCapturing=E.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=E.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${R(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return this._nameIsCapturing&&null!==this._name&&null!==e&&null!==t?E.replaceCaptures(this._name,e,t):this._name}getContentName(e,t){return this._contentNameIsCapturing&&null!==this._contentName?E.replaceCaptures(this._contentName,e,t):this._contentName}}class re extends se{constructor(e,t,s,r,o){super(e,t,s,r),this.retokenizeCapturedWithRuleId=o}dispose(){}collectPatterns(e,t){throw new Error("Not supported!")}compile(e,t){throw new Error("Not supported!")}compileAG(e,t,s,r){throw new Error("Not supported!")}}class oe extends se{constructor(e,t,s,r,o){super(e,t,s,null),this._match=new ue(r,this.id),this.captures=o,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,s,r){return this._getCachedCompiledPatterns(e).compileAG(e,s,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new le,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}}class ne extends se{constructor(e,t,s,r,o){super(e,t,s,r),this.patterns=o.patterns,this.hasMissingPatterns=o.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(const s of this.patterns)e.getRule(s).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,s,r){return this._getCachedCompiledPatterns(e).compileAG(e,s,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new le,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}}class ce extends se{constructor(e,t,s,r,o,n,c,a,i,u){super(e,t,s,r),this._begin=new ue(o,this.id),this.beginCaptures=n,this._end=new ue(c||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=a,this.applyEndPatternLast=i||!1,this.patterns=u.patterns,this.hasMissingPatterns=u.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(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,s,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,s,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new le;for(const 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}}class ae extends se{constructor(e,t,s,r,o,n,c,a,i){super(e,t,s,r),this._begin=new ue(o,this.id),this.beginCaptures=n,this.whileCaptures=a,this._while=new ue(c,-2),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,s,r){return this._getCachedCompiledPatterns(e).compileAG(e,s,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new le;for(const 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,s,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,s,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new le,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||"￿"),this._cachedCompiledWhilePatterns}}class ie{static createCaptureRule(e,t,s,r,o){return e.registerRule((e=>new re(t,e,s,r,o)))}static getCompiledRuleId(e,t,s){return e.id||t.registerRule((r=>{if(e.id=r,e.match)return new oe(e.$vscodeTextmateLocation,e.id,e.name,e.match,ie._compileCaptures(e.captures,t,s));if(void 0===e.begin){e.repository&&(s=P({},s,e.repository));let r=e.patterns;return void 0===r&&e.include&&(r=[{include:e.include}]),new ne(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,ie._compilePatterns(r,t,s))}return e.while?new ae(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,ie._compileCaptures(e.beginCaptures||e.captures,t,s),e.while,ie._compileCaptures(e.whileCaptures||e.captures,t,s),ie._compilePatterns(e.patterns,t,s)):new ce(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,ie._compileCaptures(e.beginCaptures||e.captures,t,s),e.end,ie._compileCaptures(e.endCaptures||e.captures,t,s),e.applyEndPatternLast,ie._compilePatterns(e.patterns,t,s))})),e.id}static _compileCaptures(e,t,s){let r=[];if(e){let o=0;for(const t in e){if("$vscodeTextmateLocation"===t)continue;const e=parseInt(t,10);e>o&&(o=e)}for(let e=0;e<=o;e++)r[e]=null;for(const o in e){if("$vscodeTextmateLocation"===o)continue;const n=parseInt(o,10);let c=0;e[o].patterns&&(c=ie.getCompiledRuleId(e[o],t,s)),r[n]=ie.createCaptureRule(t,e[o].$vscodeTextmateLocation,e[o].name,e[o].contentName,c)}}return r}static _compilePatterns(e,t,s){let r=[];if(e)for(let o=0,n=e.length;oe.substring(t.start,t.end)));return te.lastIndex=0,this.source.replace(te,((e,t)=>O(s[parseInt(t,10)]||"")))}_buildAnchorCache(){let e,t,s,r,o=[],n=[],c=[],a=[];for(e=0,t=this.source.length;ee.source));this._cached=new he(e,t,this._items.map((e=>e.ruleId)))}return this._cached}compileAG(e,t,s){return this._hasAnchors?t?s?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,s)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,s)),this._anchorCache.A1_G0):s?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,s)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,s)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,s){let r=this._items.map((e=>e.resolveAnchors(t,s)));return new he(e,r,this._items.map((e=>e.ruleId)))}}class he{constructor(e,t,s){this.regExps=t,this.rules=s,this.scanner=e.createOnigScanner(t)}dispose(){"function"==typeof this.scanner.dispose&&this.scanner.dispose()}toString(){const e=[];for(let t=0,s=this.rules.length;tthis._root.match(e)))}static createFromRawTheme(e,t){return this.createFromParsedTheme(function(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,s=[],r=0;for(let e=0,o=t.length;e1&&(l=n.slice(0,n.length-1),l.reverse()),s[r++]=new fe(u,l,e,c,a,i)}}return s}(e),t)}static createFromParsedTheme(e,t){return function(e,t){e.sort(((e,t)=>{let s=B(e.scope,t.scope);return 0!==s?s:(s=G(e.parentScopes,t.parentScopes),0!==s?s:e.index-t.index)}));let s=0,r="#000000",o="#ffffff";for(;e.length>=1&&""===e[0].scope;){let t=e.shift();-1!==t.fontStyle&&(s=t.fontStyle),null!==t.foreground&&(r=t.foreground),null!==t.background&&(o=t.background)}let n=new be(t),c=new ge(s,n.getId(r),n.getId(o)),a=new _e(new ye(0,null,-1,0,0),[]);for(let t=0,s=e.length;tfunction(e,t){if(null===t)return!0;let s=0,r=t[s];for(;e;){if(me(e.scopeName,r)){if(s++,s===t.length)return!0;r=t[s]}e=e.parent}return!1}(e.parent,t.parentScopes)));return s?new ge(s.fontStyle,s.foreground,s.background):null}}class pe{constructor(e,t){this.parent=e,this.scopeName=t}static push(e,t){for(const s of t)e=new pe(e,s);return e}static from(...e){let t=null;for(let s=0;se?console.log("how did this happen?"):this.scopeDepth=e,-1!==t&&(this.fontStyle=t),0!==s&&(this.foreground=s),0!==r&&(this.background=r)}}class _e{constructor(e,t=[],s={}){this._mainRule=e,this._children=s,this._rulesWithParentScopes=t}static _sortBySpecificity(e){return 1===e.length||e.sort(this._cmpBySpecificity),e}static _cmpBySpecificity(e,t){if(e.scopeDepth===t.scopeDepth){const s=e.parentScopes,r=t.parentScopes;let o=null===s?0:s.length,n=null===r?0:r.length;if(o===n)for(let e=0;e{const t=this._scopeToLanguage(e),s=this._toStandardTokenType(e);return new xe(t,s)})),this._defaultAttributes=new xe(e,8),this._embeddedLanguagesMatcher=new je(Object.entries(t||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(e){return null===e?ke._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(e)}_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(e){const t=e.match(ke.STANDARD_TOKEN_TYPE_REGEXP);if(!t)return 8;switch(t[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}}ke._NULL_SCOPE_METADATA=new xe(0,0),ke.STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/;class je{constructor(e){if(0===e.length)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const t=e.map((([e,t])=>O(e)));t.sort(),t.reverse(),this.scopesRegExp=new RegExp(`^((${t.join(")|(")}))($|\\.)`,"")}}match(e){if(!this.scopesRegExp)return;const t=e.match(this.scopesRegExp);return t?this.values.get(t[1]):void 0}}class Se{constructor(e,t){this.stack=e,this.stoppedEarly=t}}function we(e,t,s,r,o,n,c,a){const i=t.content.length;let u=!1,l=-1;if(c){const c=function(e,t,s,r,o,n){let c=o.beginRuleCapturedEOL?0:-1;const a=[];for(let t=o;t;t=t.pop()){const s=t.getRule(e);s instanceof ae&&a.push({rule:s,stack:t})}for(let i=a.pop();i;i=a.pop()){const{ruleScanner:a,findOptions:u}=Le(i.rule,e,i.stack.endRule,s,r===c),l=a.findNextMatchSync(t,r,u);if(w&&(console.log(" scanning for while rule"),console.log(a.toString())),!l){w&&console.log(" popping "+i.rule.debugName+" - "+i.rule.debugWhileRegExp),o=i.stack.pop();break}if(-2!==l.ruleId){o=i.stack.pop();break}l.captureIndices&&l.captureIndices.length&&(n.produce(i.stack,l.captureIndices[0].start),Ce(e,t,s,i.stack,n,i.rule.whileCaptures,l.captureIndices),n.produce(i.stack,l.captureIndices[0].end),c=l.captureIndices[0].end,l.captureIndices[0].end>r&&(r=l.captureIndices[0].end,s=!1))}return{stack:o,linePos:r,anchorPosition:c,isFirstLine:s}}(e,t,s,r,o,n);o=c.stack,r=c.linePos,s=c.isFirstLine,l=c.anchorPosition}const h=Date.now();for(;!u;){if(0!==a&&Date.now()-h>a)return new Se(o,!0);d()}return new Se(o,!1);function d(){w&&(console.log(""),console.log(`@@scanNext ${r}: |${t.content.substr(r).replace(/\n$/,"\\n")}|`));const c=function(e,t,s,r,o,n){const c=function(e,t,s,r,o,n){const c=o.getRule(e),{ruleScanner:a,findOptions:i}=ve(c,e,o.endRule,s,r===n);let u=0;w&&(u=q());const l=a.findNextMatchSync(t,r,i);if(w){const e=q()-u;e>5&&console.warn(`Rule ${c.debugName} (${c.id}) matching took ${e} against '${t}'`),console.log(` scanning for (linePos: ${r}, anchorPosition: ${n})`),console.log(a.toString()),l&&console.log(`matched rule id: ${l.ruleId} from ${l.captureIndices[0].start} to ${l.captureIndices[0].end}`)}return l?{captureIndices:l.captureIndices,matchedRuleId:l.ruleId}:null}(e,t,s,r,o,n),a=e.getInjections();if(0===a.length)return c;const i=function(e,t,s,r,o,n,c){let a,i=Number.MAX_VALUE,u=null,l=0;const h=n.contentNameScopesList.getScopeNames();for(let n=0,d=e.length;n=i)&&(i=b,u=f.captureIndices,a=f.ruleId,l=d.priority,i===o))break}return u?{priorityMatch:-1===l,captureIndices:u,matchedRuleId:a}:null}(a,e,t,s,r,o,n);if(!i)return c;if(!c)return i;const u=c.captureIndices[0].start,l=i.captureIndices[0].start;return l0)&&a[0].end>r;if(-1===h){const c=o.getRule(e);w&&console.log(" popping "+c.debugName+" - "+c.debugEndRegExp),n.produce(o,a[0].start),o=o.withContentNameScopesList(o.nameScopesList),Ce(e,t,s,o,n,c.endCaptures,a),n.produce(o,a[0].end);const h=o;if(o=o.parent,l=h.getAnchorPos(),!d&&h.getEnterPos()===r)return w&&console.error("[1] - Grammar is in an endless loop - Grammar pushed & popped a rule without advancing"),o=h,n.produce(o,i),void(u=!0)}else{const c=e.getRule(h);n.produce(o,a[0].start);const p=o,m=c.getName(t.content,a),g=o.contentNameScopesList.pushAttributed(m,e);if(o=o.push(h,r,l,a[0].end===i,null,g,g),c instanceof ce){const r=c;w&&console.log(" pushing "+r.debugName+" - "+r.debugBeginRegExp),Ce(e,t,s,o,n,r.beginCaptures,a),n.produce(o,a[0].end),l=a[0].end;const h=r.getContentName(t.content,a),m=g.pushAttributed(h,e);if(o=o.withContentNameScopesList(m),r.endHasBackReferences&&(o=o.withEndRule(r.getEndWithResolvedBackReferences(t.content,a))),!d&&p.hasSameRuleAs(o))return w&&console.error("[2] - Grammar is in an endless loop - Grammar pushed the same rule without advancing"),o=o.pop(),n.produce(o,i),void(u=!0)}else if(c instanceof ae){const r=c;w&&console.log(" pushing "+r.debugName),Ce(e,t,s,o,n,r.beginCaptures,a),n.produce(o,a[0].end),l=a[0].end;const h=r.getContentName(t.content,a),m=g.pushAttributed(h,e);if(o=o.withContentNameScopesList(m),r.whileHasBackReferences&&(o=o.withEndRule(r.getWhileWithResolvedBackReferences(t.content,a))),!d&&p.hasSameRuleAs(o))return w&&console.error("[3] - Grammar is in an endless loop - Grammar pushed the same rule without advancing"),o=o.pop(),n.produce(o,i),void(u=!0)}else{const r=c;if(w&&console.log(" matched "+r.debugName+" - "+r.debugMatchRegExp),Ce(e,t,s,o,n,r.captures,a),n.produce(o,a[0].end),o=o.pop(),!d)return w&&console.error("[4] - Grammar is in an endless loop - Grammar is not advancing, nor is it pushing/popping"),o=o.safePop(),n.produce(o,i),void(u=!0)}}a[0].end>r&&(r=a[0].end,s=!1)}}function ve(e,t,s,r,o){return{ruleScanner:e.compileAG(t,s,r,o),findOptions:0}}function Le(e,t,s,r,o){return{ruleScanner:e.compileWhileAG(t,s,r,o),findOptions:0}}function Ce(e,t,s,r,o,n,c){if(0===n.length)return;const a=t.content,i=Math.min(n.length,c.length),u=[],l=c[0].end;for(let t=0;tl)break;for(;u.length>0&&u[u.length-1].endPos<=h.start;)o.produceFromScopes(u[u.length-1].scopes,u[u.length-1].endPos),u.pop();if(u.length>0?o.produceFromScopes(u[u.length-1].scopes,h.start):o.produce(r,h.start),i.retokenizeCapturedWithRuleId){const t=i.getName(a,c),n=r.contentNameScopesList.pushAttributed(t,e),u=i.getContentName(a,c),l=n.pushAttributed(u,e),d=r.push(i.retokenizeCapturedWithRuleId,h.start,-1,!1,null,n,l),p=e.createOnigString(a.substring(0,h.end));we(e,p,s&&0===h.start,h.start,d,o,!1,0),A(p);continue}const d=i.getName(a,c);if(null!==d){const t=(u.length>0?u[u.length-1].scopes:r.contentNameScopesList).pushAttributed(d,e);u.push(new Ae(t,h.end))}}for(;u.length>0;)o.produceFromScopes(u[u.length-1].scopes,u[u.length-1].endPos),u.pop()}class Ae{constructor(e,t){this.scopes=e,this.endPos=t}}function Ne(e,t,s,r,o){const n=L(t,Pe),c=ie.getCompiledRuleId(s,r,o.repository);for(const s of n)e.push({debugSelector:t,matcher:s.matcher,ruleId:c,grammar:o,priority:s.priority})}function Pe(e,t){if(t.length{for(let r=s;rs&&e.substr(0,s)===t&&"."===e[s]}class Ie{constructor(e,t,s,r,o,n,c,a){if(this._rootScopeName=e,this.balancedBracketSelectors=n,this._onigLib=a,this._basicScopeAttributesProvider=new ke(s,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=c,this._grammar=Ee(t,null),this._injections=null,this._tokenTypeMatchers=[],o)for(const e of Object.keys(o)){const t=L(e,Pe);for(const s of t)this._tokenTypeMatchers.push({matcher:s.matcher,type:o[e]})}}get themeProvider(){return this._grammarRepository}dispose(){for(const e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){const e=[],t=this._rootScopeName,s=(e=>e===this._rootScopeName?this._grammar:this.getExternalGrammar(e))(t);if(s){const r=s.injections;if(r)for(let t in r)Ne(e,t,r[t],this,s);const o=this._grammarRepository.injections(t);o&&o.forEach((t=>{const s=this.getExternalGrammar(t);if(s){const t=s.injectionSelector;t&&Ne(e,t,s,this,s)}}))}return e.sort(((e,t)=>e.priority-t.priority)),e}getInjections(){if(null===this._injections&&(this._injections=this._collectInjections(),w&&this._injections.length>0)){console.log(`Grammar ${this._rootScopeName} contains the following injections:`);for(const e of this._injections)console.log(` - ${e.debugSelector}`)}return this._injections}registerRule(e){const t=++this._lastRuleId,s=e(t);return this._ruleId2desc[t]=s,s}getRule(e){return this._ruleId2desc[e]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){const s=this._grammarRepository.lookup(e);if(s)return this._includedGrammars[e]=Ee(s,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,s=0){const r=this._tokenize(e,t,!1,s);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(e,t,s=0){const r=this._tokenize(e,t,!0,s);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(e,t,s,r){let o;if(-1===this._rootId&&(this._rootId=ie.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections()),t&&t!==Ge.NULL)o=!1,t.reset();else{o=!0;const e=this._basicScopeAttributesProvider.getDefaultAttributes(),s=this.themeProvider.getDefaults(),r=v.set(0,e.languageId,e.tokenType,null,s.fontStyle,s.foregroundId,s.backgroundId),n=this.getRule(this._rootId).getName(null,null);let c;c=n?Be.createRootAndLookUpScopeName(n,r,this):Be.createRoot("unknown",r),t=new Ge(null,this._rootId,-1,-1,!1,null,c,c)}e+="\n";const n=this.createOnigString(e),c=n.content.length,a=new Oe(s,e,this._tokenTypeMatchers,this.balancedBracketSelectors),i=we(this,n,o,0,t,a,!0,r);return A(n),{lineLength:c,lineTokens:a,ruleStack:i.stack,stoppedEarly:i.stoppedEarly}}}function Ee(e,t){return(e=N(e)).repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}class Be{constructor(e,t,s){this.parent=e,this.scopePath=t,this.tokenAttributes=s}static fromExtension(e,t){let s=e,r=e?.scopePath??null;for(const e of t)r=pe.push(r,e.scopeNames),s=new Be(s,r,e.encodedTokenAttributes);return s}static createRoot(e,t){return new Be(null,new pe(null,e),t)}static createRootAndLookUpScopeName(e,t,s){const r=s.getMetadataForScope(e),o=new pe(null,e),n=s.themeProvider.themeMatch(o),c=Be.mergeAttributes(t,r,n);return new Be(null,o,c)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(e){return Be.equals(this,e)}static equals(e,t){for(;;){if(e===t)return!0;if(!e&&!t)return!0;if(!e||!t)return!1;if(e.scopeName!==t.scopeName||e.tokenAttributes!==t.tokenAttributes)return!1;e=e.parent,t=t.parent}}static mergeAttributes(e,t,s){let r=-1,o=0,n=0;return null!==s&&(r=s.fontStyle,o=s.foregroundId,n=s.backgroundId),v.set(e,t.languageId,t.tokenType,null,r,o,n)}pushAttributed(e,t){if(null===e)return this;if(-1===e.indexOf(" "))return Be._pushAttributed(this,e,t);const s=e.split(/ /g);let r=this;for(const e of s)r=Be._pushAttributed(r,e,t);return r}static _pushAttributed(e,t,s){const r=s.getMetadataForScope(t),o=e.scopePath.push(t),n=s.themeProvider.themeMatch(o),c=Be.mergeAttributes(e.tokenAttributes,r,n);return new Be(e,o,c)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){const t=[];let s=this;for(;s&&s!==e;)t.push({encodedTokenAttributes:s.tokenAttributes,scopeNames:s.scopePath.getExtensionIfDefined(s.parent?.scopePath??null)}),s=s.parent;return s===e?t.reverse():void 0}}class Ge{constructor(e,t,s,r,o,n,c,a){this.parent=e,this.ruleId=t,this.beginRuleCapturedEOL=o,this.endRule=n,this.nameScopesList=c,this.contentNameScopesList=a,this._stackElementBrand=void 0,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=s,this._anchorPos=r}equals(e){return null!==e&&Ge._equals(this,e)}static _equals(e,t){return e===t||!!this._structuralEquals(e,t)&&Be.equals(e.contentNameScopesList,t.contentNameScopesList)}static _structuralEquals(e,t){for(;;){if(e===t)return!0;if(!e&&!t)return!0;if(!e||!t)return!1;if(e.depth!==t.depth||e.ruleId!==t.ruleId||e.endRule!==t.endRule)return!1;e=e.parent,t=t.parent}}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){Ge._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(e,t,s,r,o,n,c){return new Ge(this,e,t,s,r,o,n,c)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){const e=[];return this._writeString(e,0),"["+e.join(",")+"]"}_writeString(e,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(e){return this.endRule===e?this:new Ge(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,e,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let t=this;for(;t&&t._enterPos===e._enterPos;){if(t.ruleId===e.ruleId)return!0;t=t.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(e,t){const s=Be.fromExtension(e?.nameScopesList??null,t.nameScopesList);return new Ge(e,t.ruleId,t.enterPos??-1,t.anchorPos??-1,t.beginRuleCapturedEOL,t.endRule,s,Be.fromExtension(s,t.contentNameScopesList))}}Ge.NULL=new Ge(null,0,0,0,!1,null,null,null);class Te{constructor(e,t){this.allowAny=!1,this.balancedBracketScopes=e.flatMap((e=>"*"===e?(this.allowAny=!0,[]):L(e,Pe).map((e=>e.matcher)))),this.unbalancedBracketScopes=t.flatMap((e=>L(e,Pe).map((e=>e.matcher))))}get matchesAlways(){return this.allowAny&&0===this.unbalancedBracketScopes.length}get matchesNever(){return 0===this.balancedBracketScopes.length&&!this.allowAny}match(e){for(const t of this.unbalancedBracketScopes)if(t(e))return!1;for(const t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}}class Oe{constructor(e,t,s,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=s,this._lineText=w?t:null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let s=e?.tokenAttributes??0,r=!1;if(this.balancedBracketSelectors?.matchesAlways&&(r=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const t=e?.getScopeNames()??[];for(const e of this._tokenTypeOverrides)e.matcher(t)&&(s=v.set(s,0,e.type,null,-1,0,0));this.balancedBracketSelectors&&(r=this.balancedBracketSelectors.match(t))}if(r&&(s=v.set(s,0,8,r,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===s)return void(this._lastTokenEndIndex=t);if(w){const s=e?.getScopeNames()??[];console.log(" token: |"+this._lineText.substring(this._lastTokenEndIndex,t).replace(/\n$/,"\\n")+"|");for(let e=0;e0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),0===this._tokens.length&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),0===this._binaryTokens.length&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);const s=new Uint32Array(this._binaryTokens.length);for(let e=0,t=this._binaryTokens.length;e0;)10===e.charCodeAt(o)?(o++,n++,c=0):(o++,c++),t--}function i(e){null===s?o=e:a(e-o)}function u(){for(;o0&&65279===e.charCodeAt(0)&&(o=1);let p=0,m=null,g=[],f=[],b=null;function y(e,t){g.push(p),f.push(m),p=e,m=t}function _(){if(0===g.length)return x("illegal state stack");p=g.pop(),m=f.pop()}function x(t){throw new Error("Near offset "+o+": "+t+" ~~~"+e.substr(o,50)+"~~~")}const k=function(){if(null===b)return x("missing ");let e={};null!==s&&(e[s]={filename:t,line:n,char:c}),m[b]=e,b=null,y(1,e)},j=function(){if(null===b)return x("missing ");let e=[];m[b]=e,b=null,y(2,e)},S=function(){let e={};null!==s&&(e[s]={filename:t,line:n,char:c}),m.push(e),y(1,e)},w=function(){let e=[];m.push(e),y(2,e)};function v(){if(1!==p)return x("unexpected ");_()}function L(){return 1===p||2!==p?x("unexpected "):void _()}function C(e){if(1===p){if(null===b)return x("missing ");m[b]=e,b=null}else 2===p?m.push(e):m=e}function A(e){if(isNaN(e))return x("cannot parse float");if(1===p){if(null===b)return x("missing ");m[b]=e,b=null}else 2===p?m.push(e):m=e}function N(e){if(isNaN(e))return x("cannot parse integer");if(1===p){if(null===b)return x("missing ");m[b]=e,b=null}else 2===p?m.push(e):m=e}function P(e){if(1===p){if(null===b)return x("missing ");m[b]=e,b=null}else 2===p?m.push(e):m=e}function R(e){if(1===p){if(null===b)return x("missing ");m[b]=e,b=null}else 2===p?m.push(e):m=e}function I(e){if(1===p){if(null===b)return x("missing ");m[b]=e,b=null}else 2===p?m.push(e):m=e}function E(){let e=d(">"),t=!1;return 47===e.charCodeAt(e.length-1)&&(t=!0,e=e.substring(0,e.length-1)),{name:e.trim(),isClosed:t}}function B(e){if(e.isClosed)return"";let t=d(""),t.replace(/&#([0-9]+);/g,(function(e,t){return String.fromCodePoint(parseInt(t,10))})).replace(/&#x([0-9a-f]+);/g,(function(e,t){return String.fromCodePoint(parseInt(t,16))})).replace(/&|<|>|"|'/g,(function(e){switch(e){case"&":return"&";case"<":return"<";case">":return">";case""":return'"';case"'":return"'"}return e}))}for(;o=r));){const i=e.charCodeAt(o);if(a(1),60!==i)return x("expected <");if(o>=r)return x("unexpected end of input");const d=e.charCodeAt(o);if(63===d){a(1),h("?>");continue}if(33===d){if(a(1),l("--")){h("--\x3e");continue}h(">");continue}if(47===d){if(a(1),u(),l("plist")){h(">");continue}if(l("dict")){h(">"),v();continue}if(l("array")){h(">"),L();continue}return x("unexpected closed tag")}let g=E();switch(g.name){case"dict":1===p?k():2===p?S():(m={},null!==s&&(m[s]={filename:t,line:n,char:c}),y(1,m)),g.isClosed&&v();continue;case"array":1===p?j():2===p?w():(m=[],y(2,m)),g.isClosed&&L();continue;case"key":G=B(g),1!==p?x("unexpected "):null!==b?x("too many "):b=G;continue;case"string":C(B(g));continue;case"real":A(parseFloat(B(g)));continue;case"integer":N(parseInt(B(g),10));continue;case"date":P(new Date(B(g)));continue;case"data":R(B(g));continue;case"true":B(g),I(!0);continue;case"false":B(g),I(!1);continue}if(!/^plist/.test(g.name))return x("unexpected opened tag "+g.name)}var G;return m}function qe(e,t){throw new Error("Near offset "+e.pos+": "+t+" ~~~"+e.source.substr(e.pos,50)+"~~~")}class $e{constructor(e){this.source=e,this.pos=0,this.len=e.length,this.line=1,this.char=0}}class Me{constructor(){this.value=null,this.type=0,this.offset=-1,this.len=-1,this.line=-1,this.char=-1}toLocation(e){return{filename:e,line:this.line,char:this.char}}}function Ue(e,t){t.value=null,t.type=0,t.offset=-1,t.len=-1,t.line=-1,t.char=-1;let s,r=e.source,o=e.pos,n=e.len,c=e.line,a=e.char;for(;;){if(o>=n)return!1;if(s=r.charCodeAt(o),32!==s&&9!==s&&13!==s){if(10!==s)break;o++,c++,a=0}else o++,a++}if(t.offset=o,t.line=c,t.char=a,34===s){for(t.type=1,o++,a++;;){if(o>=n)return!1;if(s=r.charCodeAt(o),o++,a++,92!==s){if(34===s)break}else o++,a++}t.value=r.substring(t.offset+1,o-1).replace(/\\u([0-9A-Fa-f]{4})/g,((e,t)=>String.fromCodePoint(parseInt(t,16)))).replace(/\\(.)/g,((t,s)=>{switch(s){case'"':return'"';case"\\":return"\\";case"/":return"/";case"b":return"\b";case"f":return"\f";case"n":return"\n";case"r":return"\r";case"t":return"\t";default:qe(e,"invalid escape sequence")}throw new Error("unreachable")}))}else if(91===s)t.type=2,o++,a++;else if(123===s)t.type=3,o++,a++;else if(93===s)t.type=4,o++,a++;else if(125===s)t.type=5,o++,a++;else if(58===s)t.type=6,o++,a++;else if(44===s)t.type=7,o++,a++;else if(110===s){if(t.type=8,o++,a++,s=r.charCodeAt(o),117!==s)return!1;if(o++,a++,s=r.charCodeAt(o),108!==s)return!1;if(o++,a++,s=r.charCodeAt(o),108!==s)return!1;o++,a++}else if(116===s){if(t.type=9,o++,a++,s=r.charCodeAt(o),114!==s)return!1;if(o++,a++,s=r.charCodeAt(o),117!==s)return!1;if(o++,a++,s=r.charCodeAt(o),101!==s)return!1;o++,a++}else if(102===s){if(t.type=10,o++,a++,s=r.charCodeAt(o),97!==s)return!1;if(o++,a++,s=r.charCodeAt(o),108!==s)return!1;if(o++,a++,s=r.charCodeAt(o),115!==s)return!1;if(o++,a++,s=r.charCodeAt(o),101!==s)return!1;o++,a++}else for(t.type=11;;){if(o>=n)return!1;if(s=r.charCodeAt(o),!(46===s||s>=48&&s<=57||101===s||69===s||45===s||43===s))break;o++,a++}return t.len=o-t.offset,null===t.value&&(t.value=r.substr(t.offset,t.len)),e.pos=o,e.line=c,e.char=a,!0}class We{constructor(e,t){this._onigLibPromise=t,this._grammars=new Map,this._rawGrammars=new Map,this._injectionGrammars=new Map,this._theme=e}dispose(){for(const e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}async grammarForScopeName(e,t,s,r,o){if(!this._grammars.has(e)){let n=this._rawGrammars.get(e);if(!n)return null;this._grammars.set(e,function(e,t,s,r,o,n,c,a){return new Ie(e,t,s,r,o,n,c,a)}(e,n,t,s,r,o,this,await this._onigLibPromise))}return this._grammars.get(e)}}function De(e,t){let s=0;const r=[];let o=e,n=t;for(;o!==n;)o&&(!n||o.depth>=n.depth)?(s++,o=o.parent):(r.push(n.toStateStackFrame()),n=n.parent);return{pops:s,newFrames:r.reverse()}}function ze(e,t){let s=e;for(let e=0;e0;)await Promise.all(n.Q.map((e=>this._loadSingleGrammar(e.scopeName)))),n.processQueue();return this._grammarForScopeName(e,t,s,r,o)}async _loadSingleGrammar(e){return this._ensureGrammarCache.has(e)||this._ensureGrammarCache.set(e,this._doLoadSingleGrammar(e)),this._ensureGrammarCache.get(e)}async _doLoadSingleGrammar(e){const t=await this._options.loadGrammar(e);if(t){const s="function"==typeof this._options.getInjections?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(t,s)}}async addGrammar(e,t=[],s=0,r=null){return this._syncRegistry.addGrammar(e,t),await this._grammarForScopeName(e.scopeName,s,r)}_grammarForScopeName(e,t=0,s=null,r=null,o=null){return this._syncRegistry.grammarForScopeName(e,t,s,r,o)}}const Qe=Ge.NULL,Ke=function(e,t=null){return null!==t&&/\.json$/.test(t)?(s=e,w?function(e,t,s){let r=new $e(e),o=new Me,n=0,c=null,a=[],i=[];function u(){a.push(n),i.push(c)}function l(){n=a.pop(),c=i.pop()}function h(e){qe(r,e)}for(;Ue(r,o);){if(0===n){if(null!==c&&h("too many constructs in root"),3===o.type){c={},c.$vscodeTextmateLocation=o.toLocation(t),u(),n=1;continue}if(2===o.type){c=[],u(),n=4;continue}h("unexpected token in root")}if(2===n){if(5===o.type){l();continue}if(7===o.type){n=3;continue}h("expected , or }")}if(1===n||3===n){if(1===n&&5===o.type){l();continue}if(1===o.type){let e=o.value;if(Ue(r,o)&&6===o.type||h("expected colon"),Ue(r,o)||h("expected value"),n=2,1===o.type){c[e]=o.value;continue}if(8===o.type){c[e]=null;continue}if(9===o.type){c[e]=!0;continue}if(10===o.type){c[e]=!1;continue}if(11===o.type){c[e]=parseFloat(o.value);continue}if(2===o.type){let t=[];c[e]=t,u(),n=4,c=t;continue}if(3===o.type){let s={};s.$vscodeTextmateLocation=o.toLocation(t),c[e]=s,u(),n=1,c=s;continue}}h("unexpected token in dict")}if(5===n){if(4===o.type){l();continue}if(7===o.type){n=6;continue}h("expected , or ]")}if(4===n||6===n){if(4===n&&4===o.type){l();continue}if(n=5,1===o.type){c.push(o.value);continue}if(8===o.type){c.push(null);continue}if(9===o.type){c.push(!0);continue}if(10===o.type){c.push(!1);continue}if(11===o.type){c.push(parseFloat(o.value));continue}if(2===o.type){let e=[];c.push(e),u(),n=4,c=e;continue}if(3===o.type){let e={};e.$vscodeTextmateLocation=o.toLocation(t),c.push(e),u(),n=1,c=e;continue}h("unexpected token in array")}h("unknown state")}return 0!==i.length&&h("unclosed constructs"),c}(s,t):JSON.parse(s)):function(e,t){return w?function(e,t,s){return Fe(e,t,"$vscodeTextmateLocation")}(e,t):function(e){return Fe(e,null,null)}(e)}(e,t);var s};var Ve=S.Bz,Ye=("undefined"!=typeof document&&document.currentScript&&document.currentScript.src,function(e){var t,s,r=void 0!==(e=e||{})?e:{};r.ready=new Promise((function(e,r){t=e,s=r}));var o,n=Object.assign({},r),c=!1;o=function(e){let t;return"function"==typeof readbuffer?new Uint8Array(readbuffer(e)):(t=read(e,"binary"),"object"==typeof t||S(s),t);var s},"undefined"!=typeof scriptArgs&&scriptArgs,"undefined"!=typeof onig_print&&("undefined"==typeof console&&(console={}),console.log=onig_print,console.warn=console.error="undefined"!=typeof printErr?printErr:onig_print);var a,i,u=r.print||console.log.bind(console),l=r.printErr||console.warn.bind(console);Object.assign(r,n),n=null,r.arguments&&r.arguments,r.thisProgram&&r.thisProgram,r.quit&&r.quit,r.wasmBinary&&(a=r.wasmBinary),r.noExitRuntime,"object"!=typeof WebAssembly&&S("no native wasm support detected");var h,d,p,m=!1,g="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function f(e,t,s){for(var r=t+s,o=t;e[o]&&!(o>=r);)++o;if(o-t>16&&e.buffer&&g)return g.decode(e.subarray(t,o));for(var n="";t>10,56320|1023&u)}}else n+=String.fromCharCode((31&c)<<6|a)}else n+=String.fromCharCode(c)}return n}function b(e){h=e,r.HEAP8=new Int8Array(e),r.HEAP16=new Int16Array(e),r.HEAP32=new Int32Array(e),r.HEAPU8=d=new Uint8Array(e),r.HEAPU16=new Uint16Array(e),r.HEAPU32=p=new Uint32Array(e),r.HEAPF32=new Float32Array(e),r.HEAPF64=new Float64Array(e)}r.INITIAL_MEMORY;var y=[],_=[],x=[],k=0,j=null;function S(e){r.onAbort&&r.onAbort(e),l(e="Aborted("+e+")"),m=!0,e+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(e);throw s(t),t}var w,v,L,C="data:application/octet-stream;base64,";function A(e){return e.startsWith(C)}function N(e){try{if(e==w&&a)return new Uint8Array(a);if(o)return o(e);throw"both async and sync fetching of the wasm failed"}catch(e){S(e)}}function P(e){for(;e.length>0;)e.shift()(r)}function R(e){try{return i.grow(e-h.byteLength+65535>>>16),b(i.buffer),1}catch(e){}}A(w="onig.wasm")||(v=w,w=r.locateFile?r.locateFile(v,""):""+v),L="undefined"!=typeof dateNow?dateNow:()=>performance.now();var I=[null,[],[]];function E(e,t){var s=I[e];0===t||10===t?((1===e?u:l)(f(s,0)),s.length=0):s.push(t)}var B,G={emscripten_get_now:L,emscripten_memcpy_big:function(e,t,s){d.copyWithin(e,t,t+s)},emscripten_resize_heap:function(e){var t=d.length,s=2147483648;if((e>>>=0)>s)return!1;let r=(e,t)=>e+(t-e%t)%t;for(var o=1;o<=4;o*=2){var n=t*(1+.2/o);if(n=Math.min(n,e+100663296),R(Math.min(s,r(Math.max(e,n),65536))))return!0}return!1},fd_write:function(e,t,s,r){for(var o=0,n=0;n>2],a=p[t+4>>2];t+=8;for(var i=0;i>2]=o,0}};function T(e){function s(){B||(B=!0,r.calledRun=!0,m||(P(_),t(r),r.onRuntimeInitialized&&r.onRuntimeInitialized(),function(){if(r.postRun)for("function"==typeof r.postRun&&(r.postRun=[r.postRun]);r.postRun.length;)e=r.postRun.shift(),x.unshift(e);var e;P(x)}()))}k>0||(function(){if(r.preRun)for("function"==typeof r.preRun&&(r.preRun=[r.preRun]);r.preRun.length;)e=r.preRun.shift(),y.unshift(e);var e;P(y)}(),k>0||(r.setStatus?(r.setStatus("Running..."),setTimeout((function(){setTimeout((function(){r.setStatus("")}),1),s()}),1)):s()))}if(function(){var e={env:G,wasi_snapshot_preview1:G};function t(e,t){var s,o=e.exports;r.asm=o,b((i=r.asm.memory).buffer),r.asm.__indirect_function_table,s=r.asm.__wasm_call_ctors,_.unshift(s),function(e){if(k--,r.monitorRunDependencies&&r.monitorRunDependencies(k),0==k&&j){var t=j;j=null,t()}}()}function o(e){t(e.instance)}function n(t){return(!a&&c&&"function"==typeof fetch?fetch(w,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+w+"'";return e.arrayBuffer()})).catch((function(){return N(w)})):Promise.resolve().then((function(){return N(w)}))).then((function(t){return WebAssembly.instantiate(t,e)})).then((function(e){return e})).then(t,(function(e){l("failed to asynchronously prepare wasm: "+e),S(e)}))}if(k++,r.monitorRunDependencies&&r.monitorRunDependencies(k),r.instantiateWasm)try{return r.instantiateWasm(e,t)}catch(e){l("Module.instantiateWasm callback failed with error: "+e),s(e)}(a||"function"!=typeof WebAssembly.instantiateStreaming||A(w)||"function"!=typeof fetch?n(o):fetch(w,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,e).then(o,(function(e){return l("wasm streaming compile failed: "+e),l("falling back to ArrayBuffer instantiation"),n(o)}))}))).catch(s)}(),r.___wasm_call_ctors=function(){return(r.___wasm_call_ctors=r.asm.__wasm_call_ctors).apply(null,arguments)},r.___errno_location=function(){return(r.___errno_location=r.asm.__errno_location).apply(null,arguments)},r._omalloc=function(){return(r._omalloc=r.asm.omalloc).apply(null,arguments)},r._ofree=function(){return(r._ofree=r.asm.ofree).apply(null,arguments)},r._getLastOnigError=function(){return(r._getLastOnigError=r.asm.getLastOnigError).apply(null,arguments)},r._createOnigScanner=function(){return(r._createOnigScanner=r.asm.createOnigScanner).apply(null,arguments)},r._freeOnigScanner=function(){return(r._freeOnigScanner=r.asm.freeOnigScanner).apply(null,arguments)},r._findNextOnigScannerMatch=function(){return(r._findNextOnigScannerMatch=r.asm.findNextOnigScannerMatch).apply(null,arguments)},r._findNextOnigScannerMatchDbg=function(){return(r._findNextOnigScannerMatchDbg=r.asm.findNextOnigScannerMatchDbg).apply(null,arguments)},r.stackSave=function(){return(r.stackSave=r.asm.stackSave).apply(null,arguments)},r.stackRestore=function(){return(r.stackRestore=r.asm.stackRestore).apply(null,arguments)},r.stackAlloc=function(){return(r.stackAlloc=r.asm.stackAlloc).apply(null,arguments)},r.dynCall_jiji=function(){return(r.dynCall_jiji=r.asm.dynCall_jiji).apply(null,arguments)},r.UTF8ToString=function(e,t){return e?f(d,e,t):""},j=function e(){B||T(),B||(j=e)},r.preInit)for("function"==typeof r.preInit&&(r.preInit=[r.preInit]);r.preInit.length>0;)r.preInit.pop()();return T(),e.ready});let Xe=null;class Je{static _utf8ByteLength(e){let t=0;for(let s=0,r=e.length;s=55296&&o<=56319&&s+1=56320&&t<=57343&&(n=65536+(o-55296<<10)|t-56320,c=!0)}t+=n<=127?1:n<=2047?2:n<=65535?3:4,c&&s++}return t}constructor(e){const t=e.length,s=Je._utf8ByteLength(e),r=s!==t,o=r?new Uint32Array(t+1):null;r&&(o[t]=s);const n=r?new Uint32Array(s+1):null;r&&(n[s]=t);const c=new Uint8Array(s);let a=0;for(let s=0;s=55296&&i<=56319&&s+1=56320&&t<=57343&&(u=65536+(i-55296<<10)|t-56320,l=!0)}r&&(o[s]=a,l&&(o[s+1]=a),u<=127?n[a+0]=s:u<=2047?(n[a+0]=s,n[a+1]=s):u<=65535?(n[a+0]=s,n[a+1]=s,n[a+2]=s):(n[a+0]=s,n[a+1]=s,n[a+2]=s,n[a+3]=s)),u<=127?c[a++]=u:u<=2047?(c[a++]=192|(1984&u)>>>6,c[a++]=128|(63&u)>>>0):u<=65535?(c[a++]=224|(61440&u)>>>12,c[a++]=128|(4032&u)>>>6,c[a++]=128|(63&u)>>>0):(c[a++]=240|(1835008&u)>>>18,c[a++]=128|(258048&u)>>>12,c[a++]=128|(4032&u)>>>6,c[a++]=128|(63&u)>>>0),l&&s++}this.utf16Length=t,this.utf8Length=s,this.utf16Value=e,this.utf8Value=c,this.utf16OffsetToUtf8=o,this.utf8OffsetToUtf16=n}createString(e){const t=e._omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,t),t}}class Ze{constructor(e){if(this.id=++Ze.LAST_ID,!Xe)throw new Error("Must invoke loadWASM first.");this._onigBinding=Xe,this.content=e;const t=new Je(e);this.utf16Length=t.utf16Length,this.utf8Length=t.utf8Length,this.utf16OffsetToUtf8=t.utf16OffsetToUtf8,this.utf8OffsetToUtf16=t.utf8OffsetToUtf16,this.utf8Length<1e4&&!Ze._sharedPtrInUse?(Ze._sharedPtr||(Ze._sharedPtr=Xe._omalloc(1e4)),Ze._sharedPtrInUse=!0,Xe.HEAPU8.set(t.utf8Value,Ze._sharedPtr),this.ptr=Ze._sharedPtr):this.ptr=t.createString(Xe)}convertUtf8OffsetToUtf16(e){return this.utf8OffsetToUtf16?e<0?0:e>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[e]:e}convertUtf16OffsetToUtf8(e){return this.utf16OffsetToUtf8?e<0?0:e>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[e]:e}dispose(){this.ptr===Ze._sharedPtr?Ze._sharedPtrInUse=!1:this._onigBinding._ofree(this.ptr)}}Ze.LAST_ID=0,Ze._sharedPtr=0,Ze._sharedPtrInUse=!1;class et{constructor(e){if(!Xe)throw new Error("Must invoke loadWASM first.");const t=[],s=[];for(let r=0,o=e.length;rWebAssembly.instantiateStreaming(e,t)}(r):function(e){return async t=>{const s=await e.arrayBuffer();return WebAssembly.instantiate(s,t)}}(r):function(e){return t=>WebAssembly.instantiate(e,t)}(r)}return st=new Promise(((e,t)=>{r=e,o=t})),function(e,t,s,r){Ye({print:t,instantiateWasm:(t,s)=>{if("undefined"==typeof performance){const e=()=>Date.now();t.env.emscripten_get_now=e,t.wasi_snapshot_preview1.emscripten_get_now=e}return e(t).then((e=>s(e.instance)),r),{}}}).then((e=>{Xe=e,s()}))}(t,s,r,o),st}function ot(e){return new Ze(e)}function nt(e){return new et(e)}function ct(e){const t=x[e];if(!t)return;const{id:s}=k[t];return{id:s,scopeName:t}}const at=new Map;let it,ut;async function lt(e){if(at.has(e))return at.get(e);const t=function(e){return k[e]}(e);if(!t)return Promise.resolve(void 0);let r;if(void 0===it&&(r=ht(t.path),it=r.then((()=>!0)).catch((()=>!1))),void 0===ut&&(ut=await it),ut){const s=r||ht(t.path);return at.set(e,s),s}const o=s(`grammars/${t.id}`);t.embeddedScopes.forEach((e=>{if(!at.has(e)){const t=o.then((t=>t.find((t=>t.scopeName===e))));at.set(e,t)}}));const n=o.then((t=>t.find((t=>t.scopeName===e))));return at.set(e,n),n}async function ht(e){return await t()}const dt=30720,pt=16744448,mt=16775168,gt=11,ft=15,bt={NotSet:-1,None:0,Italic:1,Bold:2,Underline:4,Strikethrough:8};function yt(e,t,s,r){const{tokens:o,ruleStack:n}=e.tokenizeLine2(s,t),c=[];let a=s.length;for(let e=o.length-2;e>=0;e-=2){const t=o[e],r=o[e+1],n=s.slice(t,a);c.unshift({content:n,metadata:r}),a=t}let i=[];if(null==r?void 0:r.preserveWhitespace)i=c;else for(let e=0;e0?i[i.length-1].content+=t.content:e{const{rawTokens:o,nextStack:n}=yt(t,r,e,{preserveWhitespace:!0}),c=o.map((({content:e,metadata:t})=>({content:e,style:xt(t,s)}))),a=function(e,t,s,r){const{tokens:o}=s.tokenizeLine(e,t),n=[];for(let t=0;t{if(i+=e.content.length,s>>ft]},r=(e&dt)>>>gt;return r&bt.Italic&&(s.fontStyle="italic"),r&bt.Bold&&(s.fontWeight="bold"),r&bt.Underline&&(s.textDecoration="underline"),r&bt.Strikethrough&&(s.textDecoration="line-through"),s}var kt={instantiator:t=>WebAssembly.instantiate(e,t).then((e=>({instance:e})))};let jt=null;function St(e){return"text"==e||"terminal"==e}function wt(e){if(!jt){const e=rt(kt).then((()=>({createOnigScanner:nt,createOnigString:ot})));jt=new Ve({onigLib:e,loadGrammar:e=>lt(e)})}const t=e.filter((e=>!St(e))).map((e=>{const t=ct(e);if(!t)throw new Lt(e);return jt.loadGrammar(t.scopeName)}));return Promise.all(t)}function vt(e){if(St(e))return{langId:e,grammar:null};const t=ct(e);if(!t)throw new Lt(e);const s=function(e){const{_syncRegistry:t}=jt;return null==t?void 0:t._grammars.get(e)}(t.scopeName);if(!s)throw new Error(`Syntax highlighting error: grammar for ${e} not loaded`);return{langId:t.id,grammar:s}}class Lt extends Error{constructor(e){super(`Unknown language: ${e}`),this.alias=e}}function Ct(e,t,s){jt.setTheme(s);const r=function(e){const t=jt.getColorMap();return e.colorNames?t.map((t=>Object.keys(e.colorNames).find((s=>e.colorNames[s].toUpperCase()===t.toUpperCase()))||t)):t}(s);return function(e,t,s){let r=null;return e.split(/\r?\n|\r/g).map((e=>{const{rawTokens:o,nextStack:n}=yt(t,r,e);return r=n,o.map((({content:e,metadata:t})=>({content:e,style:xt(t,s)})))}))}(e,t,r)}function At(e){return e.split(/\r?\n|\r/g).map((e=>[{content:e,style:{}}]))}function Nt(e,t){if(!e)return[{fromLineNumber:t,toLineNumber:t}];if(e.startsWith("["))return Pt(e,t);return It(e.slice(1,-1)).map((e=>{if(e.includes("[")){console.log("part",e);const[s,r]=e.split("["),o=Number(s),n=t+o-1;if(!Et(n))throw new Bt(s);return Pt("["+r,n)}const{from:s,to:r}=Rt(e);return[{fromLineNumber:s+t-1,toLineNumber:r+t-1}]})).flat()}function Pt(e,t){return It(e.slice(1,-1)).map((e=>{const{from:s,to:r}=Rt(e);return{lineNumber:t,fromColumn:s,toColumn:r}}))}function Rt(e){const[t,s]=e.split(":");if(!Et(t))throw new Bt(t);const r=Number(t);if(r<1)throw new Gt;if(s){if(!Et(s))throw new Bt(s);return{from:r,to:+s}}return{from:r,to:r}}function It(e){return e.split(/,(?![^\[]*\])/g)}function Et(e){e=e.toString();var t=Math.abs(e),s=parseInt(e,10);return!isNaN(t)&&s===t&&t.toString()===e}class Bt extends Error{constructor(e){super(`Invalid number "${e}" in range string`),this.number=e,Object.setPrototypeOf(this,new.target.prototype)}}class Gt extends Error{constructor(){super("Invalid line or column number in range string"),Object.setPrototypeOf(this,new.target.prototype)}}const Tt="#001",Ot="#010",Ft={name:"comments",type:"light",foreground:"",background:"",colors:{},settings:[{settings:{foreground:"#000"}},{scope:["punctuation.definition.comment"],settings:{foreground:Tt}},{scope:"comment",settings:{foreground:Ot}}]};function qt(e,t,s,r){const o=t?Ct(e,t,Ft):At(e),n=[];let c=1;const a=o.map((e=>{const{annotations:t,lineWithoutComments:o}=function(e,t,s){if(!e.some((e=>e.style.color===Tt)))return{annotations:[],lineWithoutComments:e};const r=[];let o=0;for(;o!e.tokens.includes(t)));n.every((e=>""===e.content.trim()))&&(n=null);return{annotations:r.map((e=>({name:e.name,query:e.query,ranges:e.ranges}))),lineWithoutComments:n}}(e,r,c);if(n.push(...t),!o)return null;const a=o.map((e=>e.content)).join("");return["mdx","jsx","tsx"].includes(s)&&t.length>0&&"{}"===a.trim()?null:(c++,a)})).filter((e=>null!==e)).join("\n");return{newCode:a,annotations:n}}function $t(e,t){var s;const r=e.match(/\s*([\w-]+)?(\([^\)]*\)|\[[^\]]*\])?(.*)$/),o=r[1],n=r[2],c=null===(s=r[3])||void 0===s?void 0:s.trim();return t.includes(o)?{name:o,rangeString:n,query:c}:null}function Mt(e,t){let s=[],r=1;return e.forEach((e=>{s.push({fromColumn:r,toColumn:r+e.content.length-1,token:e}),r+=e.content.length})),t.forEach((e=>{s=function(e,t){const{range:s}=t,{fromColumn:r,toColumn:o}=s,n=[];let c=0;for(;co){const[e,s]=Wt(t,o+1);a.tokens.push(e),n.push(s)}else a.tokens.push(t);c++}else n.push(a);for(;cUt(e)))}function Ut(e){return"tokens"in e?{annotationName:e.annotationName,annotationQuery:e.annotationQuery,fromColumn:e.fromColumn,toColumn:e.toColumn,tokens:e.tokens.map((e=>Ut(e)))}:e.token}function Wt(e,t){if("token"in e){const s=Object.assign(Object.assign({},e.token),{content:e.token.content.slice(0,t-e.fromColumn)}),r=Object.assign(Object.assign({},e.token),{content:e.token.content.slice(t-e.fromColumn)});return[Object.assign(Object.assign({},e),{toColumn:t-1,token:s}),Object.assign(Object.assign({},e),{fromColumn:t,token:r})]}{const s=[],r=[];e.tokens.forEach((e=>{if(e.toColumn=t)r.push(e);else{const[o,n]=Wt(e,t);s.push(o),r.push(n)}}));return[Object.assign(Object.assign({},e),{toColumn:t-1,tokens:s}),Object.assign(Object.assign({},e),{fromColumn:t,tokens:r})]}}function Dt(e,t){let s=e.map(((e,t)=>({fromLineNumber:t+1,toLineNumber:t+1,line:e})));return t.forEach((e=>{s=function(e,t){const{range:s,name:r,query:o}=t,{fromLineNumber:n,toLineNumber:c}=s,a=[];let i=0;for(;ic){const[e,s]=Ht(t,c+1);u.lines.push(e),a.push(s)}else u.lines.push(t);i++}else a.push(u);for(;izt(e)))}function zt(e){return"line"in e?{lineNumber:e.fromLineNumber,tokens:e.line.tokens}:{annotationName:e.annotationName,annotationQuery:e.annotationQuery,fromLineNumber:e.fromLineNumber,toLineNumber:e.toLineNumber,lines:e.lines.map((e=>zt(e)))}}function Ht(e,t){if("line"in e)return[Object.assign(Object.assign({},e),{toLineNumber:t-1}),Object.assign(Object.assign({},e),{fromLineNumber:t})];{const s=[],r=[];return e.lines.forEach((e=>{if(e.toLineNumber=t)r.push(e);else{const[o,n]=Ht(e,t);s.push(o),r.push(n)}})),[Object.assign(Object.assign({},e),{toLineNumber:t-1,lines:s}),Object.assign(Object.assign({},e),{fromLineNumber:t,lines:r})]}}function Qt(e,t){const{inlineAnnotations:s,multilineAnnotations:r}=function(e){const t=[],s=[];return e.forEach((e=>{e.ranges.forEach((r=>{"lineNumber"in r?t.push(Object.assign(Object.assign({},e),{range:r})):s.push(Object.assign(Object.assign({},e),{range:r}))}))})),{inlineAnnotations:t,multilineAnnotations:s}}(t);return Dt(e.map(((e,t)=>{const r=s.filter((e=>e.range.lineNumber===t+1));return{lineNumber:t+1,tokens:Mt(e,r)}})),r)}var Kt=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],Vt={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",9:"strikethrough"};function Yt(e,t){const s=e.indexOf("[",t);if(-1!==s){const t=e.indexOf("m",s);return{sequence:e.substring(s+2,t).split(";"),startPosition:s,position:t+1}}return{position:e.length}}function Xt(e,t){let s=1;const r=e[t+s++];let o;if("2"===r){const r=[e[t+s++],e[t+s++],e[t+s]].map((e=>Number.parseInt(e)));3!==r.length||r.some((e=>Number.isNaN(e)))||(o={type:"rgb",rgb:r})}else if("5"===r){const r=Number.parseInt(e[t+s]);Number.isNaN(r)||(o={type:"table",index:Number(r)})}return[s,o]}function Jt(e){const t=[];for(let s=0;s=90&&o<=97?t.push({type:"setForegroundColor",value:{type:"named",name:Kt[o-90+8]}}):o>=100&&o<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:Kt[o-100+8]}})}return t}function Zt(e,t){const s=function(){let e=null,t=null,s=new Set;return{parse(r){const o=[];let n=0;do{const c=Yt(r,n),a=c.sequence?r.substring(n,c.startPosition):r.substring(n);if(a.length>0&&o.push({value:a,foreground:e,background:t,decorations:new Set(s)}),c.sequence){const r=Jt(c.sequence);for(const o of r)"resetAll"===o.type?(e=null,t=null,s.clear()):"resetForegroundColor"===o.type?e=null:"resetBackgroundColor"===o.type?t=null:"resetDecoration"===o.type&&s.delete(o.value);for(const o of r)"setForegroundColor"===o.type?e=o.value:"setBackgroundColor"===o.type?t=o.value:"setDecoration"===o.type&&s.add(o.value)}n=c.position}while(nfunction(e,t,s){const r=e.parse(t),o=r.map((({value:e,foreground:t,background:r,decorations:o})=>{const n=es(t,s),c={};n&&(c.color=n);const a=es(r,s);return a&&(c.background=a),o.has("bold")&&(c.fontWeight="bold"),o.has("italic")&&(c.fontStyle="italic"),o.has("underline")&&(c.textDecoration="underline"),o.has("strikethrough")&&(c.textDecoration="line-through"),o.has("reverse")&&(c.color=a,c.background=n),o.has("dim")&&(c.opacity=.5),{content:e,style:c}}));return o}(s,e,t)));return r}function es(e,t){if(e){if("named"===e.type){return i(t,"terminal.ansi"+(e.name[0].toUpperCase()+e.name.slice(1)))}if("rgb"===e.type){const[t,s,r]=e.rgb;return`rgb(${t}, ${s}, ${r})`}}}async function ts(e,t){await Promise.all([wt(e),p(t)])}async function ss(e,t,s="dark-plus",r={}){const o=e||"",n=t||"text";if("string"!=typeof o)throw new Error("Syntax highlighter error: code must be a string");if("string"!=typeof n)throw new Error("Syntax highlighter error: lang must be a string");return await ts([n],s),rs(o,n,s,r)}function rs(e,t,s="dark-plus",r={}){const o=e||"",n=t||"text";if("string"!=typeof o)throw new Error("Syntax highlighter error: code must be a string");if("string"!=typeof n)throw new Error("Syntax highlighter error: lang must be a string");const{langId:c,grammar:a}=vt(n),u=m(s),l="text"==c?At(o):"terminal"==c?Zt(o,u):(null==r?void 0:r.scopes)?function(e,t,s){return jt.setTheme(s),_t(e,t,jt.getColorMap())}(o,a,u):Ct(o,a,u),h="terminal"==c?function(e){return{color:i(e,"terminal.foreground"),background:i(e,"terminal.background")}}(u):{color:u.foreground,background:u.background};if(function(e){return"annotations"in e}(r)){return{lines:Qt(l,(null==r?void 0:r.annotations)||[]),lang:c,style:h}}return{lines:l,lang:c,style:h}}async function os(e,t,s){if(!s)return{code:e,annotations:[]};await wt([t]);const{grammar:r}=vt(t),{newCode:o,annotations:n}=qt(e,r,t,s);return{code:o,annotations:n}}async function ns(e){if(!e)throw new Error("Syntax highlighter error: undefined theme");await ts([],e);return y(m(e))}function cs(e){if(!e)throw new Error("Syntax highlighter error: undefined theme");return y(m(e))}export{_ as LANG_NAMES,f as THEME_NAMES,Lt as UnknownLanguageError,b as UnknownThemeError,os as extractAnnotations,ns as getThemeColors,cs as getThemeColorsSync,ss as highlight,rs as highlightSync,ts as preload}; +import e from"./onig.wasm?module";async function t(e,t){throw new Error("no fs")}async function s(e){const t=await fetch(`https://lighter.codehike.org/${e}.json`);return await t.json()}const r=e=>/^#([A-Fa-f0-9]{3,4}){1,2}$/.test(e),o=(e,t)=>e.match(new RegExp(`.{${t}}`,"g")),n=e=>parseInt(e.repeat(2/e.length),16);function c(e,t){return void 0!==e?e/255:"number"!=typeof t||t<0||t>1?1:t}function a(e,t){if(!e)return e;const{r:s,g:a,b:i,a:u}=function(e){if(!e)return;if(!r(e))throw new Error("Invalid color string, must be a valid hex color");const t=Math.floor((e.length-1)/3),s=o(e.slice(1),t),[a,i,u,l]=s.map(n);return{r:a,g:i,b:u,a:c(l,1)}}(e);return function(e){if(!e)return;const{r:t,g:s,b:r,a:o}=e,n=Math.round(255*o);return`#${t.toString(16).padStart(2,"0")}${s.toString(16).padStart(2,"0")}${r.toString(16).padStart(2,"0")}${n.toString(16).padStart(2,"0")}`}({r:s,g:a,b:i,a:u*t})}function i(e,t){const s=e.colors||{};if(s[t])return s[t];const r=l[t];if(!r)throw new Error(`Unknown theme color key: ${t}`);return"string"==typeof r?i(e,r):function(e,t){const s=t[e.type];if(Array.isArray(s)){const[t,r,...o]=s;return t(i(e,r),...o)}return s}(e,r)}const u="#6FC3DF",l={"editor.foreground":{dark:"#bbbbbb",light:"#333333",hc:"#ffffff"},"editorLineNumber.foreground":{dark:"#858585",light:"#237893",hc:"#fffffe"},"editor.selectionBackground":{light:"#ADD6FF",dark:"#264F78",hc:"#f3f518"},"editor.background":{light:"#fffffe",dark:"#1E1E1E",hc:"#000000"},"editorGroupHeader.tabsBackground":{dark:"#252526",light:"#F3F3F3"},"tab.activeBackground":"editor.background","tab.activeForeground":{dark:"#ffffff",light:"#333333",hc:"#ffffff"},"tab.border":{dark:"#252526",light:"#F3F3F3",hc:u},"tab.activeBorder":"tab.activeBackground","tab.inactiveBackground":{dark:"#2D2D2D",light:"#ECECEC"},"tab.inactiveForeground":{dark:[a,"tab.activeForeground",.5],light:[a,"tab.activeForeground",.5],hc:"#ffffff"},"diffEditor.insertedTextBackground":{dark:"#9ccc2c33",light:"#9ccc2c40"},"diffEditor.removedTextBackground":{dark:"#ff000033",light:"#ff000033"},"diffEditor.insertedLineBackground":{dark:"#9bb95533",light:"#9bb95533"},"diffEditor.removedLineBackground":{dark:"#ff000033",light:"#ff000033"},"icon.foreground":{dark:"#C5C5C5",light:"#424242",hc:"#FFFFFF"},"sideBar.background":{dark:"#252526",light:"#F3F3F3",hc:"#000000"},"sideBar.foreground":"editor.foreground","sideBar.border":"sideBar.background","list.inactiveSelectionBackground":{dark:"#37373D",light:"#E4E6F1"},"list.inactiveSelectionForeground":{},"list.hoverBackground":{dark:"#2A2D2E",light:"#F0F0F0"},"list.hoverForeground":{},"editorGroupHeader.tabsBorder":{hc:u},"tab.activeBorderTop":{hc:u},"tab.hoverBackground":"tab.inactiveBackground","tab.hoverForeground":"tab.inactiveForeground","editor.rangeHighlightBackground":{dark:"#ffffff0b",light:"#fdff0033"},"editor.infoForeground":{dark:"#3794FF",light:"#1a85ff",hc:"#3794FF"},"input.border":{hc:u},"input.background":{dark:"#3C3C3C",light:"#fffffe",hc:"#000000"},"input.foreground":"editor.foreground","editor.lineHighlightBackground":{},focusBorder:{light:"#0090F1",dark:"#007FD4",hc:u},"editorGroup.border":{dark:"#444444",light:"#E7E7E7",hc:u},"list.activeSelectionBackground":{dark:"#094771",light:"#0060C0",hc:"#000000"},"list.activeSelectionForeground":{dark:"#fffffe",light:"#fffffe",hc:"#fffffe"},"lighter.inlineBackground":{dark:[a,"editor.background",.9],light:[a,"editor.background",.9]},"terminal.background":"editor.background","terminal.foreground":"editor.foreground","terminal.ansiBlack":{dark:"#000000",light:"#000000",hc:"#000000"},"terminal.ansiRed":{dark:"#cd3131",light:"#cd3131",hc:"#cd0000"},"terminal.ansiGreen":{dark:"#0DBC79",light:"#00BC00",hc:"#00cd00"},"terminal.ansiYellow":{dark:"#e5e510",light:"#949800",hc:"#cdcd00"},"terminal.ansiBlue":{dark:"#2472c8",light:"#0451a5",hc:"#0000ee"},"terminal.ansiMagenta":{dark:"#bc3fbc",light:"#bc05bc",hc:"#cd00cd"},"terminal.ansiCyan":{dark:"#11a8cd",light:"#0598bc",hc:"#00cdcd"},"terminal.ansiWhite":{dark:"#e5e5e5",light:"#555555",hc:"#e5e5e5"},"terminal.ansiBrightBlack":{dark:"#666666",light:"#666666",hc:"#7f7f7f"},"terminal.ansiBrightRed":{dark:"#f14c4c",light:"#cd3131",hc:"#ff0000"},"terminal.ansiBrightGreen":{dark:"#23d18b",light:"#14CE14",hc:"#00ff00"},"terminal.ansiBrightYellow":{dark:"#f5f543",light:"#b5ba00",hc:"#ffff00"},"terminal.ansiBrightBlue":{dark:"#3b8eea",light:"#0451a5",hc:"#5c5cff"},"terminal.ansiBrightMagenta":{dark:"#d670d6",light:"#bc05bc",hc:"#ff00ff"},"terminal.ansiBrightCyan":{dark:"#29b8db",light:"#0598bc",hc:"#00ffff"},"terminal.ansiBrightWhite":{dark:"#e5e5e5",light:"#a5a5a5",hc:"#ffffff"}},h=new Map,d=new Map;async function p(e){if("string"==typeof e){const r=e;if(!f.includes(r))throw new b(r);if(!h.has(r)){const e=async function(e){try{return await t()}catch(t){return await s(`themes/${e}`)}}(r).then((e=>(d.set(r,e),e)));h.set(r,e)}return h.get(r)}return e}function m(e){let t=null;if("string"==typeof e){if(t=d.get(e),!t)throw new Error("Syntax highlighting error: theme not loaded")}else t=e;return function(e){if(!e)return;const t=e.settings||e.tokenColors||[],s={name:e.name||"unknown-theme",type:g(e),foreground:"",background:"",settings:t,colors:e.colors||{},colorNames:e.colorNames},r=t.find((e=>!e.scope));if(r){const{foreground:e,background:t}=(null==r?void 0:r.settings)||{},o={};e&&!s.colors["editor.foreground"]&&(o["editor.foreground"]=e),t&&!s.colors["editor.background"]&&(o["editor.background"]=t),Object.keys(o).length>0&&(s.colors=Object.assign(Object.assign({},s.colors),o)),s.foreground=e,s.background=t}r||(s.settings=[{settings:{foreground:i(s,"editor.foreground"),background:i(s,"editor.background")}},...s.settings]);if(s.background=s.background||i(s,"editor.background"),s.foreground=s.foreground||i(s,"editor.foreground"),"from-css"===e.type&&!s.colorNames){const e={};let t=0;s.settings=s.settings.map((s=>{const r=Object.assign(Object.assign({},s),{settings:Object.assign({},s.settings)}),{foreground:o,background:n}=r.settings||{};return o&&!e[o]&&(e[o]=`#${t.toString(16).padStart(6,"0")}`,t++),n&&!e[n]&&(e[n]=`#${t.toString(16).padStart(6,"0")}`,t++),o&&(r.settings.foreground=e[o]),n&&(r.settings.background=e[n]),r})),s.colorNames=e}return s}(t)}function g(e){var t;if("from-css"===e.type)return"from-css";return"light"===(e.type?e.type:(null===(t=e.name)||void 0===t?void 0:t.toLowerCase().includes("light"))?"light":"dark")?"light":"dark"}const f=["dark-plus","dracula-soft","dracula","github-dark","github-dark-dimmed","github-from-css","github-light","light-plus","material-darker","material-default","material-from-css","material-lighter","material-ocean","material-palenight","min-dark","min-light","monokai","nord","one-dark-pro","poimandres","slack-dark","slack-ochin","solarized-dark","solarized-light"];class b extends Error{constructor(e){super(`Unknown theme: ${e}`),this.theme=e}}function y(e){const t=t=>"colorScheme"===t?function(e){return"from-css"===e.type?"var(--ch-0)":e.type}(e):"foreground"===t?e.foreground:"background"===t?e.background:i(e,t);return{colorScheme:t("colorScheme"),foreground:t("foreground"),background:t("background"),lighter:{inlineBackground:t("lighter.inlineBackground")},editor:{background:t("editor.background"),foreground:t("editor.foreground"),lineHighlightBackground:t("editor.lineHighlightBackground"),rangeHighlightBackground:t("editor.rangeHighlightBackground"),infoForeground:t("editor.infoForeground"),selectionBackground:t("editor.selectionBackground")},focusBorder:t("focusBorder"),tab:{activeBackground:t("tab.activeBackground"),activeForeground:t("tab.activeForeground"),inactiveBackground:t("tab.inactiveBackground"),inactiveForeground:t("tab.inactiveForeground"),border:t("tab.border"),activeBorder:t("tab.activeBorder"),activeBorderTop:t("tab.activeBorderTop")},editorGroup:{border:t("editorGroup.border")},editorGroupHeader:{tabsBackground:t("editorGroupHeader.tabsBackground")},editorLineNumber:{foreground:t("editorLineNumber.foreground")},input:{background:t("input.background"),foreground:t("input.foreground"),border:t("input.border")},icon:{foreground:t("icon.foreground")},sideBar:{background:t("sideBar.background"),foreground:t("sideBar.foreground"),border:t("sideBar.border")},list:{activeSelectionBackground:t("list.activeSelectionBackground"),activeSelectionForeground:t("list.activeSelectionForeground"),hoverBackground:t("list.hoverBackground"),hoverForeground:t("list.hoverForeground")}}}const _=["abap","actionscript-3","ada","apache","apex","apl","applescript","ara","asm","astro","awk","ballerina","bash","bat","batch","be","beancount","berry","bibtex","bicep","blade","c","c#","cadence","cdc","clarity","clj","clojure","cmake","cmd","cobol","codeql","coffee","console","cpp","crystal","cs","csharp","css","cue","cypher","d","dart","dax","diff","docker","dockerfile","dream-maker","elixir","elm","erb","erl","erlang","f#","fish","fs","fsharp","fsl","gdresource","gdscript","gdshader","gherkin","git-commit","git-rebase","glimmer-js","glimmer-ts","glsl","gnuplot","go","graphql","groovy","hack","haml","handlebars","haskell","hbs","hcl","hjson","hlsl","hs","html","http","imba","ini","jade","java","javascript","jinja-html","jison","js","json","json5","jsonc","jsonl","jsonnet","jssm","jsx","julia","kotlin","kql","kusto","latex","less","liquid","lisp","logo","lua","make","makefile","markdown","marko","matlab","md","mdx","mermaid","narrat","nextflow","nginx","nim","nix","objc","objective-c","objective-cpp","ocaml","pascal","perl","perl6","php","plsql","postcss","powerquery","powershell","prisma","prolog","properties","proto","ps","ps1","pug","puppet","purescript","py","python","ql","r","raku","razor","rb","reg","rel","riscv","rs","rst","ruby","rust","sas","sass","scala","scheme","scss","sh","shader","shaderlab","shell","shellscript","shellsession","smalltalk","solidity","sparql","sql","ssh-config","stata","styl","stylus","svelte","swift","system-verilog","tasl","tcl","terminal","tex","text","toml","ts","tsx","turtle","twig","txt","typescript","v","vb","verilog","vhdl","vim","viml","vimscript","vue","vue-html","vyper","wasm","wenyan","wgsl","wolfram","xml","xsl","yaml","yml","zenscript","zsh","文言"],x={abap:"source.abap","actionscript-3":"source.actionscript.3",ada:"source.ada",apache:"source.apacheconf",apex:"source.apex",apl:"source.apl",applescript:"source.applescript",ara:"source.ara",asm:"source.asm.x86_64",astro:"source.astro",awk:"source.awk",ballerina:"source.ballerina",bat:"source.batchfile",batch:"source.batchfile",beancount:"text.beancount",berry:"source.berry",be:"source.berry",bibtex:"text.bibtex",bicep:"source.bicep",blade:"text.html.php.blade",c:"source.c",cadence:"source.cadence",cdc:"source.cadence",clarity:"source.clar",clojure:"source.clojure",clj:"source.clojure",cmake:"source.cmake",cobol:"source.cobol",codeql:"source.ql",ql:"source.ql",coffee:"source.coffee",cpp:"source.cpp",crystal:"source.crystal",csharp:"source.cs","c#":"source.cs",cs:"source.cs",css:"source.css",cue:"source.cue",cypher:"source.cypher",d:"source.d",dart:"source.dart",dax:"source.dax",diff:"source.diff",docker:"source.dockerfile",dockerfile:"source.dockerfile","dream-maker":"source.dm",elixir:"source.elixir",elm:"source.elm",erb:"text.html.erb",erlang:"source.erlang",erl:"source.erlang",fish:"source.fish",fsharp:"source.fsharp","f#":"source.fsharp",fs:"source.fsharp",gdresource:"source.gdresource",gdscript:"source.gdscript",gdshader:"source.gdshader",gherkin:"text.gherkin.feature","git-commit":"text.git-commit","git-rebase":"text.git-rebase","glimmer-js":"source.gjs","glimmer-ts":"source.gts",glsl:"source.glsl",gnuplot:"source.gnuplot",go:"source.go",graphql:"source.graphql",groovy:"source.groovy",hack:"source.hack",haml:"text.haml",handlebars:"text.html.handlebars",hbs:"text.html.handlebars",haskell:"source.haskell",hs:"source.haskell",hcl:"source.hcl",hjson:"source.hjson",hlsl:"source.hlsl",html:"text.html.basic",http:"source.http",imba:"source.imba",ini:"source.ini",properties:"source.ini",java:"source.java",javascript:"source.js",js:"source.js","jinja-html":"text.html.jinja",jison:"source.jison",json:"source.json",json5:"source.json5",jsonc:"source.json.comments",jsonl:"source.json.lines",jsonnet:"source.jsonnet",jssm:"source.jssm",fsl:"source.jssm",jsx:"source.js.jsx",julia:"source.julia",kotlin:"source.kotlin",kusto:"source.kusto",kql:"source.kusto",latex:"text.tex.latex",less:"source.css.less",liquid:"text.html.liquid",lisp:"source.lisp",logo:"source.logo",lua:"source.lua",make:"source.makefile",makefile:"source.makefile",markdown:"text.html.markdown",md:"text.html.markdown",marko:"text.marko",matlab:"source.matlab",mdx:"source.mdx",mermaid:"source.mermaid",narrat:"source.narrat",nextflow:"source.nextflow",nginx:"source.nginx",nim:"source.nim",nix:"source.nix","objective-c":"source.objc",objc:"source.objc","objective-cpp":"source.objcpp",ocaml:"source.ocaml",pascal:"source.pascal",perl:"source.perl",php:"source.php",plsql:"source.plsql.oracle",postcss:"source.css.postcss",powerquery:"source.powerquery",powershell:"source.powershell",ps:"source.powershell",ps1:"source.powershell",prisma:"source.prisma",prolog:"source.prolog",proto:"source.proto",pug:"text.pug",jade:"text.pug",puppet:"source.puppet",purescript:"source.purescript",python:"source.python",py:"source.python",r:"source.r",raku:"source.perl.6",perl6:"source.perl.6",razor:"text.aspnetcorerazor",reg:"source.reg",rel:"source.rel",riscv:"source.riscv",rst:"source.rst",ruby:"source.ruby",rb:"source.ruby",rust:"source.rust",rs:"source.rust",sas:"source.sas",sass:"source.sass",scala:"source.scala",scheme:"source.scheme",scss:"source.css.scss",shaderlab:"source.shaderlab",shader:"source.shaderlab",shellscript:"source.shell",bash:"source.shell",console:"source.shell",sh:"source.shell",shell:"source.shell",zsh:"source.shell",shellsession:"text.shell-session",smalltalk:"source.smalltalk",solidity:"source.solidity",sparql:"source.sparql",sql:"source.sql","ssh-config":"source.ssh-config",stata:"source.stata",stylus:"source.stylus",styl:"source.stylus",svelte:"source.svelte",swift:"source.swift","system-verilog":"source.systemverilog",tasl:"source.tasl",tcl:"source.tcl",tex:"text.tex",toml:"source.toml",tsx:"source.tsx",turtle:"source.turtle",twig:"text.html.twig",txt:"source.txt",typescript:"source.ts",ts:"source.ts",v:"source.v",vb:"source.asp.vb.net",cmd:"source.asp.vb.net",verilog:"source.verilog",vhdl:"source.vhdl",viml:"source.viml",vim:"source.viml",vimscript:"source.viml","vue-html":"text.html.vue-html",vue:"source.vue",vyper:"source.vyper",wasm:"source.wat",wenyan:"source.wenyan","文言":"source.wenyan",wgsl:"source.wgsl",wolfram:"source.wolfram",xml:"text.xml",xsl:"text.xml.xsl",yaml:"source.yaml",yml:"source.yaml",zenscript:"source.zenscript"},k={"source.abap":{id:"abap",path:"abap.tmLanguage.json",embeddedScopes:[]},"source.actionscript.3":{id:"actionscript-3",path:"actionscript-3.tmLanguage.json",embeddedScopes:[]},"source.ada":{id:"ada",path:"ada.tmLanguage.json",embeddedScopes:[]},"source.apacheconf":{id:"apache",path:"apache.tmLanguage.json",embeddedScopes:[]},"source.apex":{id:"apex",path:"apex.tmLanguage.json",embeddedScopes:[]},"source.apl":{id:"apl",path:"apl.tmLanguage.json",embeddedScopes:["source.java","source.json","source.js","source.css","text.xml","text.html.basic"]},"source.applescript":{id:"applescript",path:"applescript.tmLanguage.json",embeddedScopes:[]},"source.ara":{id:"ara",path:"ara.tmLanguage.json",embeddedScopes:[]},"source.asm.x86_64":{id:"asm",path:"asm.tmLanguage.json",embeddedScopes:[]},"source.astro":{id:"astro",path:"astro.tmLanguage.json",embeddedScopes:["source.tsx","source.css.postcss","source.css.less","source.css.scss","source.css","source.sass","source.stylus","source.ts","source.js","source.json"]},"source.awk":{id:"awk",path:"awk.tmLanguage.json",embeddedScopes:[]},"source.ballerina":{id:"ballerina",path:"ballerina.tmLanguage.json",embeddedScopes:[]},"source.batchfile":{id:"bat",path:"bat.tmLanguage.json",embeddedScopes:[]},"text.beancount":{id:"beancount",path:"beancount.tmLanguage.json",embeddedScopes:[]},"source.berry":{id:"berry",path:"berry.tmLanguage.json",embeddedScopes:[]},"text.bibtex":{id:"bibtex",path:"bibtex.tmLanguage.json",embeddedScopes:[]},"source.bicep":{id:"bicep",path:"bicep.tmLanguage.json",embeddedScopes:[]},"text.html.php.blade":{id:"blade",path:"blade.tmLanguage.json",embeddedScopes:["source.java","source.css","source.json","source.js","source.sql","text.xml","text.html.basic"]},"source.c":{id:"c",path:"c.tmLanguage.json",embeddedScopes:[]},"source.cadence":{id:"cadence",path:"cadence.tmLanguage.json",embeddedScopes:[]},"source.clar":{id:"clarity",path:"clarity.tmLanguage.json",embeddedScopes:[]},"source.clojure":{id:"clojure",path:"clojure.tmLanguage.json",embeddedScopes:[]},"source.cmake":{id:"cmake",path:"cmake.tmLanguage.json",embeddedScopes:[]},"source.cobol":{id:"cobol",path:"cobol.tmLanguage.json",embeddedScopes:["source.css","source.js","source.java","text.html.basic","source.sql"]},"source.ql":{id:"codeql",path:"codeql.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.stylus","source.sass","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.tsx","source.ts","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.css.scss","source.swift","source.objc","source.css.less","source.json.comments","source.json","source.js","text.pug","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.coffee","source.clojure","source.batchfile","source.yaml","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","text.html.basic","source.css","text.html.markdown"]},"source.coffee":{id:"coffee",path:"coffee.tmLanguage.json",embeddedScopes:["source.js"]},"source.cpp":{id:"cpp",path:"cpp.tmLanguage.json",embeddedScopes:["source.c","source.sql","source.glsl"]},"source.crystal":{id:"crystal",path:"crystal.tmLanguage.json",embeddedScopes:["source.shell","source.js","source.c","source.css","source.sql","text.html.basic"]},"source.cs":{id:"csharp",path:"csharp.tmLanguage.json",embeddedScopes:[]},"source.css":{id:"css",path:"css.tmLanguage.json",embeddedScopes:[]},"source.cue":{id:"cue",path:"cue.tmLanguage.json",embeddedScopes:[]},"source.cypher":{id:"cypher",path:"cypher.tmLanguage.json",embeddedScopes:[]},"source.d":{id:"d",path:"d.tmLanguage.json",embeddedScopes:[]},"source.dart":{id:"dart",path:"dart.tmLanguage.json",embeddedScopes:[]},"source.dax":{id:"dax",path:"dax.tmLanguage.json",embeddedScopes:[]},"source.diff":{id:"diff",path:"diff.tmLanguage.json",embeddedScopes:[]},"source.dockerfile":{id:"docker",path:"docker.tmLanguage.json",embeddedScopes:[]},"source.dm":{id:"dream-maker",path:"dream-maker.tmLanguage.json",embeddedScopes:[]},"source.elixir":{id:"elixir",path:"elixir.tmLanguage.json",embeddedScopes:["source.css","source.js","text.html.basic"]},"source.elm":{id:"elm",path:"elm.tmLanguage.json",embeddedScopes:["source.c","source.glsl"]},"text.html.erb":{id:"erb",path:"erb.tmLanguage.json",embeddedScopes:["source.java","source.lua","source.shell","source.c","source.sql","text.xml","source.css","source.js","source.ruby","text.html.basic"]},"source.erlang":{id:"erlang",path:"erlang.tmLanguage.json",embeddedScopes:[]},"source.fish":{id:"fish",path:"fish.tmLanguage.json",embeddedScopes:[]},"source.fsharp":{id:"fsharp",path:"fsharp.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.stylus","source.sass","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.cs","source.tsx","source.ts","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.css.scss","source.swift","source.objc","source.css.less","source.json.comments","source.json","source.js","text.pug","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.coffee","source.clojure","source.batchfile","source.yaml","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","text.html.basic","source.css","text.html.markdown"]},"source.gdresource":{id:"gdresource",path:"gdresource.tmLanguage.json",embeddedScopes:["source.gdscript","source.gdshader"]},"source.gdscript":{id:"gdscript",path:"gdscript.tmLanguage.json",embeddedScopes:[]},"source.gdshader":{id:"gdshader",path:"gdshader.tmLanguage.json",embeddedScopes:[]},"text.gherkin.feature":{id:"gherkin",path:"gherkin.tmLanguage.json",embeddedScopes:[]},"text.git-commit":{id:"git-commit",path:"git-commit.tmLanguage.json",embeddedScopes:["source.diff"]},"text.git-rebase":{id:"git-rebase",path:"git-rebase.tmLanguage.json",embeddedScopes:["source.shell"]},"source.gjs":{id:"glimmer-js",path:"glimmer-js.tmLanguage.json",embeddedScopes:["source.yaml","source.css","text.html.basic","text.html.handlebars","source.js"]},"source.gts":{id:"glimmer-ts",path:"glimmer-ts.tmLanguage.json",embeddedScopes:["source.yaml","source.js","source.css","text.html.basic","text.html.handlebars","source.ts"]},"source.glsl":{id:"glsl",path:"glsl.tmLanguage.json",embeddedScopes:["source.c"]},"source.gnuplot":{id:"gnuplot",path:"gnuplot.tmLanguage.json",embeddedScopes:[]},"source.go":{id:"go",path:"go.tmLanguage.json",embeddedScopes:[]},"source.graphql":{id:"graphql",path:"graphql.tmLanguage.json",embeddedScopes:["source.tsx","source.js.jsx","source.ts","source.js"]},"source.groovy":{id:"groovy",path:"groovy.tmLanguage.json",embeddedScopes:[]},"source.hack":{id:"hack",path:"hack.tmLanguage.json",embeddedScopes:["source.css","source.js","source.sql","text.html.basic"]},"text.haml":{id:"haml",path:"haml.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.stylus","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.tsx","source.ts","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.css.scss","source.swift","source.objc","source.css.less","source.json.comments","source.json","text.pug","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.clojure","source.batchfile","source.yaml","text.xml.xsl","source.asp.vb.net","source.php","source.r","source.perl","source.makefile","source.java","source.ini","source.lua","source.shell","source.c","source.sql","text.xml","text.html.basic","source.css","text.html.markdown","source.coffee","source.sass","source.js","source.ruby"]},"text.html.handlebars":{id:"handlebars",path:"handlebars.tmLanguage.json",embeddedScopes:["source.yaml","source.js","source.css","text.html.basic"]},"source.haskell":{id:"haskell",path:"haskell.tmLanguage.json",embeddedScopes:[]},"source.hcl":{id:"hcl",path:"hcl.tmLanguage.json",embeddedScopes:[]},"source.hjson":{id:"hjson",path:"hjson.tmLanguage.json",embeddedScopes:[]},"source.hlsl":{id:"hlsl",path:"hlsl.tmLanguage.json",embeddedScopes:[]},"text.html.basic":{id:"html",path:"html.tmLanguage.json",embeddedScopes:["source.css","source.js"]},"source.http":{id:"http",path:"http.tmLanguage.json",embeddedScopes:["source.tsx","source.js.jsx","source.ts","source.js","source.java","source.graphql","text.xml","source.json","source.shell"]},"source.imba":{id:"imba",path:"imba.tmLanguage.json",embeddedScopes:[]},"source.ini":{id:"ini",path:"ini.tmLanguage.json",embeddedScopes:[]},"source.java":{id:"java",path:"java.tmLanguage.json",embeddedScopes:[]},"source.js":{id:"javascript",path:"javascript.tmLanguage.json",embeddedScopes:[]},"text.html.jinja":{id:"jinja-html",path:"jinja-html.tmLanguage.json",embeddedScopes:["source.css","source.js","text.html.basic"]},"source.jison":{id:"jison",path:"jison.tmLanguage.json",embeddedScopes:["source.js"]},"source.json":{id:"json",path:"json.tmLanguage.json",embeddedScopes:[]},"source.json5":{id:"json5",path:"json5.tmLanguage.json",embeddedScopes:[]},"source.json.comments":{id:"jsonc",path:"jsonc.tmLanguage.json",embeddedScopes:[]},"source.json.lines":{id:"jsonl",path:"jsonl.tmLanguage.json",embeddedScopes:[]},"source.jsonnet":{id:"jsonnet",path:"jsonnet.tmLanguage.json",embeddedScopes:[]},"source.jssm":{id:"jssm",path:"jssm.tmLanguage.json",embeddedScopes:[]},"source.js.jsx":{id:"jsx",path:"jsx.tmLanguage.json",embeddedScopes:[]},"source.julia":{id:"julia",path:"julia.tmLanguage.json",embeddedScopes:["source.c","source.glsl","source.sql","source.r","source.js","source.python","source.cpp"]},"source.kotlin":{id:"kotlin",path:"kotlin.tmLanguage.json",embeddedScopes:[]},"source.kusto":{id:"kusto",path:"kusto.tmLanguage.json",embeddedScopes:[]},"text.tex.latex":{id:"latex",path:"latex.tmLanguage.json",embeddedScopes:["source.glsl","source.shell","source.sql","source.cpp","source.c","source.r","source.gnuplot","source.scala","source.rust","source.yaml","source.python","source.ts","source.js","source.ruby","source.julia","source.lua","source.java","text.xml","text.html.basic","source.haskell","source.css","text.tex"]},"source.css.less":{id:"less",path:"less.tmLanguage.json",embeddedScopes:["source.css"]},"text.html.liquid":{id:"liquid",path:"liquid.tmLanguage.json",embeddedScopes:["source.js","source.json","source.css","text.html.basic"]},"source.lisp":{id:"lisp",path:"lisp.tmLanguage.json",embeddedScopes:[]},"source.logo":{id:"logo",path:"logo.tmLanguage.json",embeddedScopes:[]},"source.lua":{id:"lua",path:"lua.tmLanguage.json",embeddedScopes:["source.c"]},"source.makefile":{id:"make",path:"make.tmLanguage.json",embeddedScopes:[]},"text.html.markdown":{id:"markdown",path:"markdown.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.stylus","source.sass","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.tsx","source.ts","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.css.scss","source.swift","source.objc","source.css.less","source.json.comments","source.json","source.js","text.pug","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.coffee","source.clojure","source.batchfile","source.yaml","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","text.html.basic","source.css"]},"text.marko":{id:"marko",path:"marko.tmLanguage.json",embeddedScopes:["source.js","source.css.scss","source.css.less","source.css"]},"source.matlab":{id:"matlab",path:"matlab.tmLanguage.json",embeddedScopes:[]},"source.mdx":{id:"mdx",path:"mdx.tmLanguage.json",embeddedScopes:["source.gnuplot","text.tex","source.stylus","source.sass","text.bibtex","text.tex.latex","text.html.handlebars","source.dart","source.fsharp","source.powershell","source.perl.6","source.json.comments","text.pug","source.groovy","text.git-rebase","text.git-commit","source.batchfile","text.xml.xsl","source.asp.vb.net","source.php","source.js.jsx","source.glsl","source.ts","source.swift","text.xml","source.sql","text.shell-session","source.shell","source.css.scss","source.scala","source.rust","source.ruby","source.r","source.python","source.perl","source.objc","text.html.markdown","source.makefile","source.lua","source.css.less","source.kotlin","source.julia","source.json","source.js","source.java","source.ini","text.html.basic","source.haskell","source.graphql","source.go","source.erlang","source.elm","source.elixir","source.dockerfile","source.diff","source.css","source.cs","source.cpp","source.coffee","source.clojure","source.c","source.yaml","source.toml","source.tsx"]},"source.mermaid":{id:"mermaid",path:"mermaid.tmLanguage.json",embeddedScopes:[]},"source.narrat":{id:"narrat",path:"narrat.tmLanguage.json",embeddedScopes:[]},"source.nextflow":{id:"nextflow",path:"nextflow.tmLanguage.json",embeddedScopes:[]},"source.nginx":{id:"nginx",path:"nginx.tmLanguage.json",embeddedScopes:["source.c","source.lua"]},"source.nim":{id:"nim",path:"nim.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.stylus","source.sass","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.tsx","source.ts","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.css.scss","source.swift","source.objc","source.css.less","source.json.comments","source.json","text.pug","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.coffee","source.clojure","source.batchfile","source.yaml","text.xml.xsl","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.ini","source.java","text.html.markdown","source.glsl","source.css","source.js","text.xml","text.html.basic","source.c"]},"source.nix":{id:"nix",path:"nix.tmLanguage.json",embeddedScopes:[]},"source.objc":{id:"objective-c",path:"objective-c.tmLanguage.json",embeddedScopes:[]},"source.objcpp":{id:"objective-cpp",path:"objective-cpp.tmLanguage.json",embeddedScopes:[]},"source.ocaml":{id:"ocaml",path:"ocaml.tmLanguage.json",embeddedScopes:[]},"source.pascal":{id:"pascal",path:"pascal.tmLanguage.json",embeddedScopes:[]},"source.perl":{id:"perl",path:"perl.tmLanguage.json",embeddedScopes:["source.java","source.sql","source.js","source.css","text.xml","text.html.basic"]},"source.php":{id:"php",path:"php.tmLanguage.json",embeddedScopes:["source.java","source.css","source.json","source.js","source.sql","text.xml","text.html.basic"]},"source.plsql.oracle":{id:"plsql",path:"plsql.tmLanguage.json",embeddedScopes:[]},"source.css.postcss":{id:"postcss",path:"postcss.tmLanguage.json",embeddedScopes:[]},"source.powerquery":{id:"powerquery",path:"powerquery.tmLanguage.json",embeddedScopes:[]},"source.powershell":{id:"powershell",path:"powershell.tmLanguage.json",embeddedScopes:[]},"source.prisma":{id:"prisma",path:"prisma.tmLanguage.json",embeddedScopes:[]},"source.prolog":{id:"prolog",path:"prolog.tmLanguage.json",embeddedScopes:[]},"source.proto":{id:"proto",path:"proto.tmLanguage.json",embeddedScopes:[]},"text.pug":{id:"pug",path:"pug.tmLanguage.json",embeddedScopes:["text.html.basic","source.coffee","source.stylus","source.css.scss","source.sass","source.css","source.js"]},"source.puppet":{id:"puppet",path:"puppet.tmLanguage.json",embeddedScopes:[]},"source.purescript":{id:"purescript",path:"purescript.tmLanguage.json",embeddedScopes:[]},"source.python":{id:"python",path:"python.tmLanguage.json",embeddedScopes:[]},"source.r":{id:"r",path:"r.tmLanguage.json",embeddedScopes:[]},"source.perl.6":{id:"raku",path:"raku.tmLanguage.json",embeddedScopes:[]},"text.aspnetcorerazor":{id:"razor",path:"razor.tmLanguage.json",embeddedScopes:["source.css","source.js","source.cs","text.html.basic"]},"source.reg":{id:"reg",path:"reg.tmLanguage.json",embeddedScopes:[]},"source.rel":{id:"rel",path:"rel.tmLanguage.json",embeddedScopes:[]},"source.riscv":{id:"riscv",path:"riscv.tmLanguage.json",embeddedScopes:[]},"source.rst":{id:"rst",path:"rst.tmLanguage.json",embeddedScopes:["source.java","source.lua","source.c","source.css","text.xml","text.html.basic","source.sql","source.glsl","source.ruby","source.cmake","source.yaml","source.shell","source.js","source.python","source.cpp"]},"source.ruby":{id:"ruby",path:"ruby.tmLanguage.json",embeddedScopes:["source.java","source.lua","source.shell","source.js","source.c","source.css","source.sql","text.xml","text.html.basic"]},"source.rust":{id:"rust",path:"rust.tmLanguage.json",embeddedScopes:[]},"source.sas":{id:"sas",path:"sas.tmLanguage.json",embeddedScopes:["source.sql"]},"source.sass":{id:"sass",path:"sass.tmLanguage.json",embeddedScopes:[]},"source.scala":{id:"scala",path:"scala.tmLanguage.json",embeddedScopes:[]},"source.scheme":{id:"scheme",path:"scheme.tmLanguage.json",embeddedScopes:[]},"source.css.scss":{id:"scss",path:"scss.tmLanguage.json",embeddedScopes:["source.css"]},"source.shaderlab":{id:"shaderlab",path:"shaderlab.tmLanguage.json",embeddedScopes:["source.hlsl"]},"source.shell":{id:"shellscript",path:"shellscript.tmLanguage.json",embeddedScopes:[]},"text.shell-session":{id:"shellsession",path:"shellsession.tmLanguage.json",embeddedScopes:["source.shell"]},"source.smalltalk":{id:"smalltalk",path:"smalltalk.tmLanguage.json",embeddedScopes:[]},"source.solidity":{id:"solidity",path:"solidity.tmLanguage.json",embeddedScopes:[]},"source.sparql":{id:"sparql",path:"sparql.tmLanguage.json",embeddedScopes:["source.turtle"]},"source.sql":{id:"sql",path:"sql.tmLanguage.json",embeddedScopes:[]},"source.ssh-config":{id:"ssh-config",path:"ssh-config.tmLanguage.json",embeddedScopes:[]},"source.stata":{id:"stata",path:"stata.tmLanguage.json",embeddedScopes:["source.sql"]},"source.stylus":{id:"stylus",path:"stylus.tmLanguage.json",embeddedScopes:[]},"source.svelte":{id:"svelte",path:"svelte.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.tsx","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.swift","source.objc","source.json.comments","source.json","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.clojure","source.batchfile","source.yaml","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","text.html.basic","text.html.markdown","text.pug","source.css.postcss","source.css.less","source.css.scss","source.css","source.sass","source.stylus","source.coffee","source.ts","source.js"]},"source.swift":{id:"swift",path:"swift.tmLanguage.json",embeddedScopes:[]},"source.systemverilog":{id:"system-verilog",path:"system-verilog.tmLanguage.json",embeddedScopes:[]},"source.tasl":{id:"tasl",path:"tasl.tmLanguage.json",embeddedScopes:[]},"source.tcl":{id:"tcl",path:"tcl.tmLanguage.json",embeddedScopes:[]},"text.tex":{id:"tex",path:"tex.tmLanguage.json",embeddedScopes:["source.r"]},"source.toml":{id:"toml",path:"toml.tmLanguage.json",embeddedScopes:[]},"source.tsx":{id:"tsx",path:"tsx.tmLanguage.json",embeddedScopes:[]},"source.turtle":{id:"turtle",path:"turtle.tmLanguage.json",embeddedScopes:[]},"text.html.twig":{id:"twig",path:"twig.tmLanguage.json",embeddedScopes:["source.java","source.lua","source.shell","source.c","source.json","source.sql","text.xml","text.html.basic","source.ruby","source.python","source.php","source.js","source.css"]},"source.txt":{id:"txt",path:"txt.tmLanguage.json",embeddedScopes:[]},"source.ts":{id:"typescript",path:"typescript.tmLanguage.json",embeddedScopes:[]},"source.v":{id:"v",path:"v.tmLanguage.json",embeddedScopes:[]},"source.asp.vb.net":{id:"vb",path:"vb.tmLanguage.json",embeddedScopes:[]},"source.verilog":{id:"verilog",path:"verilog.tmLanguage.json",embeddedScopes:[]},"source.vhdl":{id:"vhdl",path:"vhdl.tmLanguage.json",embeddedScopes:[]},"source.viml":{id:"viml",path:"viml.tmLanguage.json",embeddedScopes:[]},"text.html.vue-html":{id:"vue-html",path:"vue-html.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.swift","source.objc","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.coffee","source.clojure","source.batchfile","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","source.graphql","source.toml","source.yaml","source.json5","source.json.comments","source.json","source.tsx","source.js.jsx","source.ts","source.css.less","source.css.scss","source.css","source.sass","source.stylus","text.pug","text.html.markdown","text.html.basic","source.js","source.vue"]},"source.vue":{id:"vue",path:"vue.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.swift","source.objc","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.coffee","source.clojure","source.batchfile","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","source.graphql","source.toml","source.yaml","source.json5","source.json.comments","source.json","source.tsx","source.js.jsx","source.ts","source.js","source.css.less","source.css.scss","source.css","source.sass","source.stylus","text.pug","text.html.markdown","text.html.basic"]},"source.vyper":{id:"vyper",path:"vyper.tmLanguage.json",embeddedScopes:[]},"source.wat":{id:"wasm",path:"wasm.tmLanguage.json",embeddedScopes:[]},"source.wenyan":{id:"wenyan",path:"wenyan.tmLanguage.json",embeddedScopes:[]},"source.wgsl":{id:"wgsl",path:"wgsl.tmLanguage.json",embeddedScopes:[]},"source.wolfram":{id:"wolfram",path:"wolfram.tmLanguage.json",embeddedScopes:[]},"text.xml":{id:"xml",path:"xml.tmLanguage.json",embeddedScopes:["source.java"]},"text.xml.xsl":{id:"xsl",path:"xsl.tmLanguage.json",embeddedScopes:["source.java","text.xml"]},"source.yaml":{id:"yaml",path:"yaml.tmLanguage.json",embeddedScopes:[]},"source.zenscript":{id:"zenscript",path:"zenscript.tmLanguage.json",embeddedScopes:[]}};var j={d:(e,t)=>{for(var s in t)j.o(t,s)&&!j.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},S={};j.d(S,{_X:()=>Qe,Bz:()=>He,ot:()=>ze,u:()=>De,jG:()=>A,Pn:()=>Ke});const w="undefined"!=typeof process&&!!process.env.VSCODE_TEXTMATE_DEBUG;var v;function L(e,t){const s=[],r=function(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,s=t.exec(e);return{next:()=>{if(!s)return null;const r=s[0];return s=t.exec(e),r}}}(e);let o=r.next();for(;null!==o;){let e=0;if(2===o.length&&":"===o.charAt(1)){switch(o.charAt(0)){case"R":e=1;break;case"L":e=-1;break;default:console.log(`Unknown priority ${o} in scope selector`)}o=r.next()}let t=c();if(s.push({matcher:t,priority:e}),","!==o)break;o=r.next()}return s;function n(){if("-"===o){o=r.next();const e=n();return t=>!!e&&!e(t)}if("("===o){o=r.next();const e=function(){const e=[];let t=c();for(;t&&(e.push(t),"|"===o||","===o);){do{o=r.next()}while("|"===o||","===o);t=c()}return t=>e.some((e=>e(t)))}();return")"===o&&(o=r.next()),e}if(C(o)){const e=[];do{e.push(o),o=r.next()}while(C(o));return s=>t(e,s)}return null}function c(){const e=[];let t=n();for(;t;)e.push(t),t=n();return t=>e.every((e=>e(t)))}}function C(e){return!!e&&!!e.match(/[\w\.:]+/)}function A(e){"function"==typeof e.dispose&&e.dispose()}function N(e){return Array.isArray(e)?function(e){let t=[];for(let s=0,r=e.length;s{for(let s in t)e[s]=t[s]})),e}function R(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return 0===t?e:~t==e.length-1?R(e.substring(0,e.length-1)):e.substr(1+~t)}!function(e){e.toBinaryStr=function(e){let t=e.toString(2);for(;t.length<32;)t="0"+t;return t},e.print=function(t){const s=e.getLanguageId(t),r=e.getTokenType(t),o=e.getFontStyle(t),n=e.getForeground(t),c=e.getBackground(t);console.log({languageId:s,tokenType:r,fontStyle:o,foreground:n,background:c})},e.getLanguageId=function(e){return(255&e)>>>0},e.getTokenType=function(e){return(768&e)>>>8},e.containsBalancedBrackets=function(e){return 0!=(1024&e)},e.getFontStyle=function(e){return(30720&e)>>>11},e.getForeground=function(e){return(16744448&e)>>>15},e.getBackground=function(e){return(4278190080&e)>>>24},e.set=function(t,s,r,o,n,c,a){let i=e.getLanguageId(t),u=e.getTokenType(t),l=e.containsBalancedBrackets(t)?1:0,h=e.getFontStyle(t),d=e.getForeground(t),p=e.getBackground(t);return 0!==s&&(i=s),8!==r&&(u=r),null!==o&&(l=o?1:0),-1!==n&&(h=n),0!==c&&(d=c),0!==a&&(p=a),(i<<0|u<<8|l<<10|h<<11|d<<15|p<<24)>>>0}}(v||(v={}));let I=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g;class E{static hasCaptures(e){return null!==e&&(I.lastIndex=0,I.test(e))}static replaceCaptures(e,t,s){return e.replace(I,((e,r,o,n)=>{let c=s[parseInt(r||o,10)];if(!c)return e;{let e=t.substring(c.start,c.end);for(;"."===e[0];)e=e.substring(1);switch(n){case"downcase":return e.toLowerCase();case"upcase":return e.toUpperCase();default:return e}}}))}}function B(e,t){return et?1:0}function O(e,t){if(null===e&&null===t)return 0;if(!e)return-1;if(!t)return 1;let s=e.length,r=t.length;if(s===r){for(let r=0;r`);return}const n=s.lookup(t);e instanceof $?H({baseGrammar:n,selfGrammar:o},r):z(e.ruleName,{baseGrammar:n,selfGrammar:o,repository:o.repository},r);const c=s.injections(e.scopeName);if(c)for(const e of c)r.add(new $(e))}function z(e,t,s){t.repository&&t.repository[e]&&Q([t.repository[e]],t,s)}function H(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&Q(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&Q(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function Q(e,t,s){for(const r of e){if(s.visitedRule.has(r))continue;s.visitedRule.add(r);const e=r.repository?P({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&Q(r.patterns,{...t,repository:e},s);const o=r.include;if(!o)continue;const n=Z(o);switch(n.kind){case 0:H({...t,selfGrammar:t.baseGrammar},s);break;case 1:H(t,s);break;case 2:z(n.ruleName,{...t,repository:e},s);break;case 3:case 4:const r=n.scopeName===t.selfGrammar.scopeName?t.selfGrammar:n.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(r){const o={baseGrammar:t.baseGrammar,selfGrammar:r,repository:e};4===n.kind?z(n.ruleName,o,s):H(o,s)}else 4===n.kind?s.add(new M(n.scopeName,n.ruleName)):s.add(new $(n.scopeName))}}}class K{constructor(){this.kind=0}}class V{constructor(){this.kind=1}}class Y{constructor(e){this.ruleName=e,this.kind=2}}class X{constructor(e){this.scopeName=e,this.kind=3}}class J{constructor(e,t){this.scopeName=e,this.ruleName=t,this.kind=4}}function Z(e){if("$base"===e)return new K;if("$self"===e)return new V;const t=e.indexOf("#");if(-1===t)return new X(e);if(0===t)return new Y(e.substring(1));{const s=e.substring(0,t),r=e.substring(t+1);return new J(s,r)}}const ee=/\\(\d+)/,te=/\\(\d+)/g;class se{constructor(e,t,s,r){this.$location=e,this.id=t,this._name=s||null,this._nameIsCapturing=E.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=E.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${R(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return this._nameIsCapturing&&null!==this._name&&null!==e&&null!==t?E.replaceCaptures(this._name,e,t):this._name}getContentName(e,t){return this._contentNameIsCapturing&&null!==this._contentName?E.replaceCaptures(this._contentName,e,t):this._contentName}}class re extends se{constructor(e,t,s,r,o){super(e,t,s,r),this.retokenizeCapturedWithRuleId=o}dispose(){}collectPatterns(e,t){throw new Error("Not supported!")}compile(e,t){throw new Error("Not supported!")}compileAG(e,t,s,r){throw new Error("Not supported!")}}class oe extends se{constructor(e,t,s,r,o){super(e,t,s,null),this._match=new ue(r,this.id),this.captures=o,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,s,r){return this._getCachedCompiledPatterns(e).compileAG(e,s,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new le,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}}class ne extends se{constructor(e,t,s,r,o){super(e,t,s,r),this.patterns=o.patterns,this.hasMissingPatterns=o.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(const s of this.patterns)e.getRule(s).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,s,r){return this._getCachedCompiledPatterns(e).compileAG(e,s,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new le,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}}class ce extends se{constructor(e,t,s,r,o,n,c,a,i,u){super(e,t,s,r),this._begin=new ue(o,this.id),this.beginCaptures=n,this._end=new ue(c||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=a,this.applyEndPatternLast=i||!1,this.patterns=u.patterns,this.hasMissingPatterns=u.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(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,s,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,s,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new le;for(const 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}}class ae extends se{constructor(e,t,s,r,o,n,c,a,i){super(e,t,s,r),this._begin=new ue(o,this.id),this.beginCaptures=n,this.whileCaptures=a,this._while=new ue(c,-2),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,s,r){return this._getCachedCompiledPatterns(e).compileAG(e,s,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new le;for(const 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,s,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,s,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new le,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||"￿"),this._cachedCompiledWhilePatterns}}class ie{static createCaptureRule(e,t,s,r,o){return e.registerRule((e=>new re(t,e,s,r,o)))}static getCompiledRuleId(e,t,s){return e.id||t.registerRule((r=>{if(e.id=r,e.match)return new oe(e.$vscodeTextmateLocation,e.id,e.name,e.match,ie._compileCaptures(e.captures,t,s));if(void 0===e.begin){e.repository&&(s=P({},s,e.repository));let r=e.patterns;return void 0===r&&e.include&&(r=[{include:e.include}]),new ne(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,ie._compilePatterns(r,t,s))}return e.while?new ae(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,ie._compileCaptures(e.beginCaptures||e.captures,t,s),e.while,ie._compileCaptures(e.whileCaptures||e.captures,t,s),ie._compilePatterns(e.patterns,t,s)):new ce(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,ie._compileCaptures(e.beginCaptures||e.captures,t,s),e.end,ie._compileCaptures(e.endCaptures||e.captures,t,s),e.applyEndPatternLast,ie._compilePatterns(e.patterns,t,s))})),e.id}static _compileCaptures(e,t,s){let r=[];if(e){let o=0;for(const t in e){if("$vscodeTextmateLocation"===t)continue;const e=parseInt(t,10);e>o&&(o=e)}for(let e=0;e<=o;e++)r[e]=null;for(const o in e){if("$vscodeTextmateLocation"===o)continue;const n=parseInt(o,10);let c=0;e[o].patterns&&(c=ie.getCompiledRuleId(e[o],t,s)),r[n]=ie.createCaptureRule(t,e[o].$vscodeTextmateLocation,e[o].name,e[o].contentName,c)}}return r}static _compilePatterns(e,t,s){let r=[];if(e)for(let o=0,n=e.length;oe.substring(t.start,t.end)));return te.lastIndex=0,this.source.replace(te,((e,t)=>T(s[parseInt(t,10)]||"")))}_buildAnchorCache(){let e,t,s,r,o=[],n=[],c=[],a=[];for(e=0,t=this.source.length;ee.source));this._cached=new he(e,t,this._items.map((e=>e.ruleId)))}return this._cached}compileAG(e,t,s){return this._hasAnchors?t?s?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,s)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,s)),this._anchorCache.A1_G0):s?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,s)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,s)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,s){let r=this._items.map((e=>e.resolveAnchors(t,s)));return new he(e,r,this._items.map((e=>e.ruleId)))}}class he{constructor(e,t,s){this.regExps=t,this.rules=s,this.scanner=e.createOnigScanner(t)}dispose(){"function"==typeof this.scanner.dispose&&this.scanner.dispose()}toString(){const e=[];for(let t=0,s=this.rules.length;tthis._root.match(e)))}static createFromRawTheme(e,t){return this.createFromParsedTheme(function(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,s=[],r=0;for(let e=0,o=t.length;e1&&(l=n.slice(0,n.length-1),l.reverse()),s[r++]=new fe(u,l,e,c,a,i)}}return s}(e),t)}static createFromParsedTheme(e,t){return function(e,t){e.sort(((e,t)=>{let s=B(e.scope,t.scope);return 0!==s?s:(s=O(e.parentScopes,t.parentScopes),0!==s?s:e.index-t.index)}));let s=0,r="#000000",o="#ffffff";for(;e.length>=1&&""===e[0].scope;){let t=e.shift();-1!==t.fontStyle&&(s=t.fontStyle),null!==t.foreground&&(r=t.foreground),null!==t.background&&(o=t.background)}let n=new be(t),c=new ge(s,n.getId(r),n.getId(o)),a=new _e(new ye(0,null,-1,0,0),[]);for(let t=0,s=e.length;tfunction(e,t){if(null===t)return!0;let s=0,r=t[s];for(;e;){if(me(e.scopeName,r)){if(s++,s===t.length)return!0;r=t[s]}e=e.parent}return!1}(e.parent,t.parentScopes)));return s?new ge(s.fontStyle,s.foreground,s.background):null}}class pe{constructor(e,t){this.parent=e,this.scopeName=t}static push(e,t){for(const s of t)e=new pe(e,s);return e}static from(...e){let t=null;for(let s=0;se?console.log("how did this happen?"):this.scopeDepth=e,-1!==t&&(this.fontStyle=t),0!==s&&(this.foreground=s),0!==r&&(this.background=r)}}class _e{constructor(e,t=[],s={}){this._mainRule=e,this._children=s,this._rulesWithParentScopes=t}static _sortBySpecificity(e){return 1===e.length||e.sort(this._cmpBySpecificity),e}static _cmpBySpecificity(e,t){if(e.scopeDepth===t.scopeDepth){const s=e.parentScopes,r=t.parentScopes;let o=null===s?0:s.length,n=null===r?0:r.length;if(o===n)for(let e=0;e{const t=this._scopeToLanguage(e),s=this._toStandardTokenType(e);return new xe(t,s)})),this._defaultAttributes=new xe(e,8),this._embeddedLanguagesMatcher=new je(Object.entries(t||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(e){return null===e?ke._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(e)}_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(e){const t=e.match(ke.STANDARD_TOKEN_TYPE_REGEXP);if(!t)return 8;switch(t[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}}ke._NULL_SCOPE_METADATA=new xe(0,0),ke.STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/;class je{constructor(e){if(0===e.length)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const t=e.map((([e,t])=>T(e)));t.sort(),t.reverse(),this.scopesRegExp=new RegExp(`^((${t.join(")|(")}))($|\\.)`,"")}}match(e){if(!this.scopesRegExp)return;const t=e.match(this.scopesRegExp);return t?this.values.get(t[1]):void 0}}class Se{constructor(e,t){this.stack=e,this.stoppedEarly=t}}function we(e,t,s,r,o,n,c,a){const i=t.content.length;let u=!1,l=-1;if(c){const c=function(e,t,s,r,o,n){let c=o.beginRuleCapturedEOL?0:-1;const a=[];for(let t=o;t;t=t.pop()){const s=t.getRule(e);s instanceof ae&&a.push({rule:s,stack:t})}for(let i=a.pop();i;i=a.pop()){const{ruleScanner:a,findOptions:u}=Le(i.rule,e,i.stack.endRule,s,r===c),l=a.findNextMatchSync(t,r,u);if(w&&(console.log(" scanning for while rule"),console.log(a.toString())),!l){w&&console.log(" popping "+i.rule.debugName+" - "+i.rule.debugWhileRegExp),o=i.stack.pop();break}if(-2!==l.ruleId){o=i.stack.pop();break}l.captureIndices&&l.captureIndices.length&&(n.produce(i.stack,l.captureIndices[0].start),Ce(e,t,s,i.stack,n,i.rule.whileCaptures,l.captureIndices),n.produce(i.stack,l.captureIndices[0].end),c=l.captureIndices[0].end,l.captureIndices[0].end>r&&(r=l.captureIndices[0].end,s=!1))}return{stack:o,linePos:r,anchorPosition:c,isFirstLine:s}}(e,t,s,r,o,n);o=c.stack,r=c.linePos,s=c.isFirstLine,l=c.anchorPosition}const h=Date.now();for(;!u;){if(0!==a&&Date.now()-h>a)return new Se(o,!0);d()}return new Se(o,!1);function d(){w&&(console.log(""),console.log(`@@scanNext ${r}: |${t.content.substr(r).replace(/\n$/,"\\n")}|`));const c=function(e,t,s,r,o,n){const c=function(e,t,s,r,o,n){const c=o.getRule(e),{ruleScanner:a,findOptions:i}=ve(c,e,o.endRule,s,r===n);let u=0;w&&(u=q());const l=a.findNextMatchSync(t,r,i);if(w){const e=q()-u;e>5&&console.warn(`Rule ${c.debugName} (${c.id}) matching took ${e} against '${t}'`),console.log(` scanning for (linePos: ${r}, anchorPosition: ${n})`),console.log(a.toString()),l&&console.log(`matched rule id: ${l.ruleId} from ${l.captureIndices[0].start} to ${l.captureIndices[0].end}`)}return l?{captureIndices:l.captureIndices,matchedRuleId:l.ruleId}:null}(e,t,s,r,o,n),a=e.getInjections();if(0===a.length)return c;const i=function(e,t,s,r,o,n,c){let a,i=Number.MAX_VALUE,u=null,l=0;const h=n.contentNameScopesList.getScopeNames();for(let n=0,d=e.length;n=i)&&(i=b,u=f.captureIndices,a=f.ruleId,l=d.priority,i===o))break}return u?{priorityMatch:-1===l,captureIndices:u,matchedRuleId:a}:null}(a,e,t,s,r,o,n);if(!i)return c;if(!c)return i;const u=c.captureIndices[0].start,l=i.captureIndices[0].start;return l0)&&a[0].end>r;if(-1===h){const c=o.getRule(e);w&&console.log(" popping "+c.debugName+" - "+c.debugEndRegExp),n.produce(o,a[0].start),o=o.withContentNameScopesList(o.nameScopesList),Ce(e,t,s,o,n,c.endCaptures,a),n.produce(o,a[0].end);const h=o;if(o=o.parent,l=h.getAnchorPos(),!d&&h.getEnterPos()===r)return w&&console.error("[1] - Grammar is in an endless loop - Grammar pushed & popped a rule without advancing"),o=h,n.produce(o,i),void(u=!0)}else{const c=e.getRule(h);n.produce(o,a[0].start);const p=o,m=c.getName(t.content,a),g=o.contentNameScopesList.pushAttributed(m,e);if(o=o.push(h,r,l,a[0].end===i,null,g,g),c instanceof ce){const r=c;w&&console.log(" pushing "+r.debugName+" - "+r.debugBeginRegExp),Ce(e,t,s,o,n,r.beginCaptures,a),n.produce(o,a[0].end),l=a[0].end;const h=r.getContentName(t.content,a),m=g.pushAttributed(h,e);if(o=o.withContentNameScopesList(m),r.endHasBackReferences&&(o=o.withEndRule(r.getEndWithResolvedBackReferences(t.content,a))),!d&&p.hasSameRuleAs(o))return w&&console.error("[2] - Grammar is in an endless loop - Grammar pushed the same rule without advancing"),o=o.pop(),n.produce(o,i),void(u=!0)}else if(c instanceof ae){const r=c;w&&console.log(" pushing "+r.debugName),Ce(e,t,s,o,n,r.beginCaptures,a),n.produce(o,a[0].end),l=a[0].end;const h=r.getContentName(t.content,a),m=g.pushAttributed(h,e);if(o=o.withContentNameScopesList(m),r.whileHasBackReferences&&(o=o.withEndRule(r.getWhileWithResolvedBackReferences(t.content,a))),!d&&p.hasSameRuleAs(o))return w&&console.error("[3] - Grammar is in an endless loop - Grammar pushed the same rule without advancing"),o=o.pop(),n.produce(o,i),void(u=!0)}else{const r=c;if(w&&console.log(" matched "+r.debugName+" - "+r.debugMatchRegExp),Ce(e,t,s,o,n,r.captures,a),n.produce(o,a[0].end),o=o.pop(),!d)return w&&console.error("[4] - Grammar is in an endless loop - Grammar is not advancing, nor is it pushing/popping"),o=o.safePop(),n.produce(o,i),void(u=!0)}}a[0].end>r&&(r=a[0].end,s=!1)}}function ve(e,t,s,r,o){return{ruleScanner:e.compileAG(t,s,r,o),findOptions:0}}function Le(e,t,s,r,o){return{ruleScanner:e.compileWhileAG(t,s,r,o),findOptions:0}}function Ce(e,t,s,r,o,n,c){if(0===n.length)return;const a=t.content,i=Math.min(n.length,c.length),u=[],l=c[0].end;for(let t=0;tl)break;for(;u.length>0&&u[u.length-1].endPos<=h.start;)o.produceFromScopes(u[u.length-1].scopes,u[u.length-1].endPos),u.pop();if(u.length>0?o.produceFromScopes(u[u.length-1].scopes,h.start):o.produce(r,h.start),i.retokenizeCapturedWithRuleId){const t=i.getName(a,c),n=r.contentNameScopesList.pushAttributed(t,e),u=i.getContentName(a,c),l=n.pushAttributed(u,e),d=r.push(i.retokenizeCapturedWithRuleId,h.start,-1,!1,null,n,l),p=e.createOnigString(a.substring(0,h.end));we(e,p,s&&0===h.start,h.start,d,o,!1,0),A(p);continue}const d=i.getName(a,c);if(null!==d){const t=(u.length>0?u[u.length-1].scopes:r.contentNameScopesList).pushAttributed(d,e);u.push(new Ae(t,h.end))}}for(;u.length>0;)o.produceFromScopes(u[u.length-1].scopes,u[u.length-1].endPos),u.pop()}class Ae{constructor(e,t){this.scopes=e,this.endPos=t}}function Ne(e,t,s,r,o){const n=L(t,Pe),c=ie.getCompiledRuleId(s,r,o.repository);for(const s of n)e.push({debugSelector:t,matcher:s.matcher,ruleId:c,grammar:o,priority:s.priority})}function Pe(e,t){if(t.length{for(let r=s;rs&&e.substr(0,s)===t&&"."===e[s]}class Ie{constructor(e,t,s,r,o,n,c,a){if(this._rootScopeName=e,this.balancedBracketSelectors=n,this._onigLib=a,this._basicScopeAttributesProvider=new ke(s,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=c,this._grammar=Ee(t,null),this._injections=null,this._tokenTypeMatchers=[],o)for(const e of Object.keys(o)){const t=L(e,Pe);for(const s of t)this._tokenTypeMatchers.push({matcher:s.matcher,type:o[e]})}}get themeProvider(){return this._grammarRepository}dispose(){for(const e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){const e=[],t=this._rootScopeName,s=(e=>e===this._rootScopeName?this._grammar:this.getExternalGrammar(e))(t);if(s){const r=s.injections;if(r)for(let t in r)Ne(e,t,r[t],this,s);const o=this._grammarRepository.injections(t);o&&o.forEach((t=>{const s=this.getExternalGrammar(t);if(s){const t=s.injectionSelector;t&&Ne(e,t,s,this,s)}}))}return e.sort(((e,t)=>e.priority-t.priority)),e}getInjections(){if(null===this._injections&&(this._injections=this._collectInjections(),w&&this._injections.length>0)){console.log(`Grammar ${this._rootScopeName} contains the following injections:`);for(const e of this._injections)console.log(` - ${e.debugSelector}`)}return this._injections}registerRule(e){const t=++this._lastRuleId,s=e(t);return this._ruleId2desc[t]=s,s}getRule(e){return this._ruleId2desc[e]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){const s=this._grammarRepository.lookup(e);if(s)return this._includedGrammars[e]=Ee(s,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,s=0){const r=this._tokenize(e,t,!1,s);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(e,t,s=0){const r=this._tokenize(e,t,!0,s);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(e,t,s,r){let o;if(-1===this._rootId&&(this._rootId=ie.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections()),t&&t!==Oe.NULL)o=!1,t.reset();else{o=!0;const e=this._basicScopeAttributesProvider.getDefaultAttributes(),s=this.themeProvider.getDefaults(),r=v.set(0,e.languageId,e.tokenType,null,s.fontStyle,s.foregroundId,s.backgroundId),n=this.getRule(this._rootId).getName(null,null);let c;c=n?Be.createRootAndLookUpScopeName(n,r,this):Be.createRoot("unknown",r),t=new Oe(null,this._rootId,-1,-1,!1,null,c,c)}e+="\n";const n=this.createOnigString(e),c=n.content.length,a=new Te(s,e,this._tokenTypeMatchers,this.balancedBracketSelectors),i=we(this,n,o,0,t,a,!0,r);return A(n),{lineLength:c,lineTokens:a,ruleStack:i.stack,stoppedEarly:i.stoppedEarly}}}function Ee(e,t){return(e=N(e)).repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}class Be{constructor(e,t,s){this.parent=e,this.scopePath=t,this.tokenAttributes=s}static fromExtension(e,t){let s=e,r=e?.scopePath??null;for(const e of t)r=pe.push(r,e.scopeNames),s=new Be(s,r,e.encodedTokenAttributes);return s}static createRoot(e,t){return new Be(null,new pe(null,e),t)}static createRootAndLookUpScopeName(e,t,s){const r=s.getMetadataForScope(e),o=new pe(null,e),n=s.themeProvider.themeMatch(o),c=Be.mergeAttributes(t,r,n);return new Be(null,o,c)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(e){return Be.equals(this,e)}static equals(e,t){for(;;){if(e===t)return!0;if(!e&&!t)return!0;if(!e||!t)return!1;if(e.scopeName!==t.scopeName||e.tokenAttributes!==t.tokenAttributes)return!1;e=e.parent,t=t.parent}}static mergeAttributes(e,t,s){let r=-1,o=0,n=0;return null!==s&&(r=s.fontStyle,o=s.foregroundId,n=s.backgroundId),v.set(e,t.languageId,t.tokenType,null,r,o,n)}pushAttributed(e,t){if(null===e)return this;if(-1===e.indexOf(" "))return Be._pushAttributed(this,e,t);const s=e.split(/ /g);let r=this;for(const e of s)r=Be._pushAttributed(r,e,t);return r}static _pushAttributed(e,t,s){const r=s.getMetadataForScope(t),o=e.scopePath.push(t),n=s.themeProvider.themeMatch(o),c=Be.mergeAttributes(e.tokenAttributes,r,n);return new Be(e,o,c)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){const t=[];let s=this;for(;s&&s!==e;)t.push({encodedTokenAttributes:s.tokenAttributes,scopeNames:s.scopePath.getExtensionIfDefined(s.parent?.scopePath??null)}),s=s.parent;return s===e?t.reverse():void 0}}class Oe{constructor(e,t,s,r,o,n,c,a){this.parent=e,this.ruleId=t,this.beginRuleCapturedEOL=o,this.endRule=n,this.nameScopesList=c,this.contentNameScopesList=a,this._stackElementBrand=void 0,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=s,this._anchorPos=r}equals(e){return null!==e&&Oe._equals(this,e)}static _equals(e,t){return e===t||!!this._structuralEquals(e,t)&&Be.equals(e.contentNameScopesList,t.contentNameScopesList)}static _structuralEquals(e,t){for(;;){if(e===t)return!0;if(!e&&!t)return!0;if(!e||!t)return!1;if(e.depth!==t.depth||e.ruleId!==t.ruleId||e.endRule!==t.endRule)return!1;e=e.parent,t=t.parent}}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){Oe._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(e,t,s,r,o,n,c){return new Oe(this,e,t,s,r,o,n,c)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){const e=[];return this._writeString(e,0),"["+e.join(",")+"]"}_writeString(e,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(e){return this.endRule===e?this:new Oe(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,e,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let t=this;for(;t&&t._enterPos===e._enterPos;){if(t.ruleId===e.ruleId)return!0;t=t.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(e,t){const s=Be.fromExtension(e?.nameScopesList??null,t.nameScopesList);return new Oe(e,t.ruleId,t.enterPos??-1,t.anchorPos??-1,t.beginRuleCapturedEOL,t.endRule,s,Be.fromExtension(s,t.contentNameScopesList))}}Oe.NULL=new Oe(null,0,0,0,!1,null,null,null);class Ge{constructor(e,t){this.allowAny=!1,this.balancedBracketScopes=e.flatMap((e=>"*"===e?(this.allowAny=!0,[]):L(e,Pe).map((e=>e.matcher)))),this.unbalancedBracketScopes=t.flatMap((e=>L(e,Pe).map((e=>e.matcher))))}get matchesAlways(){return this.allowAny&&0===this.unbalancedBracketScopes.length}get matchesNever(){return 0===this.balancedBracketScopes.length&&!this.allowAny}match(e){for(const t of this.unbalancedBracketScopes)if(t(e))return!1;for(const t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}}class Te{constructor(e,t,s,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=s,this._lineText=w?t:null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let s=e?.tokenAttributes??0,r=!1;if(this.balancedBracketSelectors?.matchesAlways&&(r=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const t=e?.getScopeNames()??[];for(const e of this._tokenTypeOverrides)e.matcher(t)&&(s=v.set(s,0,e.type,null,-1,0,0));this.balancedBracketSelectors&&(r=this.balancedBracketSelectors.match(t))}if(r&&(s=v.set(s,0,8,r,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===s)return void(this._lastTokenEndIndex=t);if(w){const s=e?.getScopeNames()??[];console.log(" token: |"+this._lineText.substring(this._lastTokenEndIndex,t).replace(/\n$/,"\\n")+"|");for(let e=0;e0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),0===this._tokens.length&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),0===this._binaryTokens.length&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);const s=new Uint32Array(this._binaryTokens.length);for(let e=0,t=this._binaryTokens.length;e0;)10===e.charCodeAt(o)?(o++,n++,c=0):(o++,c++),t--}function i(e){null===s?o=e:a(e-o)}function u(){for(;o0&&65279===e.charCodeAt(0)&&(o=1);let p=0,m=null,g=[],f=[],b=null;function y(e,t){g.push(p),f.push(m),p=e,m=t}function _(){if(0===g.length)return x("illegal state stack");p=g.pop(),m=f.pop()}function x(t){throw new Error("Near offset "+o+": "+t+" ~~~"+e.substr(o,50)+"~~~")}const k=function(){if(null===b)return x("missing ");let e={};null!==s&&(e[s]={filename:t,line:n,char:c}),m[b]=e,b=null,y(1,e)},j=function(){if(null===b)return x("missing ");let e=[];m[b]=e,b=null,y(2,e)},S=function(){let e={};null!==s&&(e[s]={filename:t,line:n,char:c}),m.push(e),y(1,e)},w=function(){let e=[];m.push(e),y(2,e)};function v(){if(1!==p)return x("unexpected ");_()}function L(){return 1===p||2!==p?x("unexpected "):void _()}function C(e){if(1===p){if(null===b)return x("missing ");m[b]=e,b=null}else 2===p?m.push(e):m=e}function A(e){if(isNaN(e))return x("cannot parse float");if(1===p){if(null===b)return x("missing ");m[b]=e,b=null}else 2===p?m.push(e):m=e}function N(e){if(isNaN(e))return x("cannot parse integer");if(1===p){if(null===b)return x("missing ");m[b]=e,b=null}else 2===p?m.push(e):m=e}function P(e){if(1===p){if(null===b)return x("missing ");m[b]=e,b=null}else 2===p?m.push(e):m=e}function R(e){if(1===p){if(null===b)return x("missing ");m[b]=e,b=null}else 2===p?m.push(e):m=e}function I(e){if(1===p){if(null===b)return x("missing ");m[b]=e,b=null}else 2===p?m.push(e):m=e}function E(){let e=d(">"),t=!1;return 47===e.charCodeAt(e.length-1)&&(t=!0,e=e.substring(0,e.length-1)),{name:e.trim(),isClosed:t}}function B(e){if(e.isClosed)return"";let t=d(""),t.replace(/&#([0-9]+);/g,(function(e,t){return String.fromCodePoint(parseInt(t,10))})).replace(/&#x([0-9a-f]+);/g,(function(e,t){return String.fromCodePoint(parseInt(t,16))})).replace(/&|<|>|"|'/g,(function(e){switch(e){case"&":return"&";case"<":return"<";case">":return">";case""":return'"';case"'":return"'"}return e}))}for(;o=r));){const i=e.charCodeAt(o);if(a(1),60!==i)return x("expected <");if(o>=r)return x("unexpected end of input");const d=e.charCodeAt(o);if(63===d){a(1),h("?>");continue}if(33===d){if(a(1),l("--")){h("--\x3e");continue}h(">");continue}if(47===d){if(a(1),u(),l("plist")){h(">");continue}if(l("dict")){h(">"),v();continue}if(l("array")){h(">"),L();continue}return x("unexpected closed tag")}let g=E();switch(g.name){case"dict":1===p?k():2===p?S():(m={},null!==s&&(m[s]={filename:t,line:n,char:c}),y(1,m)),g.isClosed&&v();continue;case"array":1===p?j():2===p?w():(m=[],y(2,m)),g.isClosed&&L();continue;case"key":O=B(g),1!==p?x("unexpected "):null!==b?x("too many "):b=O;continue;case"string":C(B(g));continue;case"real":A(parseFloat(B(g)));continue;case"integer":N(parseInt(B(g),10));continue;case"date":P(new Date(B(g)));continue;case"data":R(B(g));continue;case"true":B(g),I(!0);continue;case"false":B(g),I(!1);continue}if(!/^plist/.test(g.name))return x("unexpected opened tag "+g.name)}var O;return m}function qe(e,t){throw new Error("Near offset "+e.pos+": "+t+" ~~~"+e.source.substr(e.pos,50)+"~~~")}class $e{constructor(e){this.source=e,this.pos=0,this.len=e.length,this.line=1,this.char=0}}class Me{constructor(){this.value=null,this.type=0,this.offset=-1,this.len=-1,this.line=-1,this.char=-1}toLocation(e){return{filename:e,line:this.line,char:this.char}}}function Ue(e,t){t.value=null,t.type=0,t.offset=-1,t.len=-1,t.line=-1,t.char=-1;let s,r=e.source,o=e.pos,n=e.len,c=e.line,a=e.char;for(;;){if(o>=n)return!1;if(s=r.charCodeAt(o),32!==s&&9!==s&&13!==s){if(10!==s)break;o++,c++,a=0}else o++,a++}if(t.offset=o,t.line=c,t.char=a,34===s){for(t.type=1,o++,a++;;){if(o>=n)return!1;if(s=r.charCodeAt(o),o++,a++,92!==s){if(34===s)break}else o++,a++}t.value=r.substring(t.offset+1,o-1).replace(/\\u([0-9A-Fa-f]{4})/g,((e,t)=>String.fromCodePoint(parseInt(t,16)))).replace(/\\(.)/g,((t,s)=>{switch(s){case'"':return'"';case"\\":return"\\";case"/":return"/";case"b":return"\b";case"f":return"\f";case"n":return"\n";case"r":return"\r";case"t":return"\t";default:qe(e,"invalid escape sequence")}throw new Error("unreachable")}))}else if(91===s)t.type=2,o++,a++;else if(123===s)t.type=3,o++,a++;else if(93===s)t.type=4,o++,a++;else if(125===s)t.type=5,o++,a++;else if(58===s)t.type=6,o++,a++;else if(44===s)t.type=7,o++,a++;else if(110===s){if(t.type=8,o++,a++,s=r.charCodeAt(o),117!==s)return!1;if(o++,a++,s=r.charCodeAt(o),108!==s)return!1;if(o++,a++,s=r.charCodeAt(o),108!==s)return!1;o++,a++}else if(116===s){if(t.type=9,o++,a++,s=r.charCodeAt(o),114!==s)return!1;if(o++,a++,s=r.charCodeAt(o),117!==s)return!1;if(o++,a++,s=r.charCodeAt(o),101!==s)return!1;o++,a++}else if(102===s){if(t.type=10,o++,a++,s=r.charCodeAt(o),97!==s)return!1;if(o++,a++,s=r.charCodeAt(o),108!==s)return!1;if(o++,a++,s=r.charCodeAt(o),115!==s)return!1;if(o++,a++,s=r.charCodeAt(o),101!==s)return!1;o++,a++}else for(t.type=11;;){if(o>=n)return!1;if(s=r.charCodeAt(o),!(46===s||s>=48&&s<=57||101===s||69===s||45===s||43===s))break;o++,a++}return t.len=o-t.offset,null===t.value&&(t.value=r.substr(t.offset,t.len)),e.pos=o,e.line=c,e.char=a,!0}class We{constructor(e,t){this._onigLibPromise=t,this._grammars=new Map,this._rawGrammars=new Map,this._injectionGrammars=new Map,this._theme=e}dispose(){for(const e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}async grammarForScopeName(e,t,s,r,o){if(!this._grammars.has(e)){let n=this._rawGrammars.get(e);if(!n)return null;this._grammars.set(e,function(e,t,s,r,o,n,c,a){return new Ie(e,t,s,r,o,n,c,a)}(e,n,t,s,r,o,this,await this._onigLibPromise))}return this._grammars.get(e)}}function De(e,t){let s=0;const r=[];let o=e,n=t;for(;o!==n;)o&&(!n||o.depth>=n.depth)?(s++,o=o.parent):(r.push(n.toStateStackFrame()),n=n.parent);return{pops:s,newFrames:r.reverse()}}function ze(e,t){let s=e;for(let e=0;e0;)await Promise.all(n.Q.map((e=>this._loadSingleGrammar(e.scopeName)))),n.processQueue();return this._grammarForScopeName(e,t,s,r,o)}async _loadSingleGrammar(e){return this._ensureGrammarCache.has(e)||this._ensureGrammarCache.set(e,this._doLoadSingleGrammar(e)),this._ensureGrammarCache.get(e)}async _doLoadSingleGrammar(e){const t=await this._options.loadGrammar(e);if(t){const s="function"==typeof this._options.getInjections?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(t,s)}}async addGrammar(e,t=[],s=0,r=null){return this._syncRegistry.addGrammar(e,t),await this._grammarForScopeName(e.scopeName,s,r)}_grammarForScopeName(e,t=0,s=null,r=null,o=null){return this._syncRegistry.grammarForScopeName(e,t,s,r,o)}}const Qe=Oe.NULL,Ke=function(e,t=null){return null!==t&&/\.json$/.test(t)?(s=e,w?function(e,t,s){let r=new $e(e),o=new Me,n=0,c=null,a=[],i=[];function u(){a.push(n),i.push(c)}function l(){n=a.pop(),c=i.pop()}function h(e){qe(r,e)}for(;Ue(r,o);){if(0===n){if(null!==c&&h("too many constructs in root"),3===o.type){c={},c.$vscodeTextmateLocation=o.toLocation(t),u(),n=1;continue}if(2===o.type){c=[],u(),n=4;continue}h("unexpected token in root")}if(2===n){if(5===o.type){l();continue}if(7===o.type){n=3;continue}h("expected , or }")}if(1===n||3===n){if(1===n&&5===o.type){l();continue}if(1===o.type){let e=o.value;if(Ue(r,o)&&6===o.type||h("expected colon"),Ue(r,o)||h("expected value"),n=2,1===o.type){c[e]=o.value;continue}if(8===o.type){c[e]=null;continue}if(9===o.type){c[e]=!0;continue}if(10===o.type){c[e]=!1;continue}if(11===o.type){c[e]=parseFloat(o.value);continue}if(2===o.type){let t=[];c[e]=t,u(),n=4,c=t;continue}if(3===o.type){let s={};s.$vscodeTextmateLocation=o.toLocation(t),c[e]=s,u(),n=1,c=s;continue}}h("unexpected token in dict")}if(5===n){if(4===o.type){l();continue}if(7===o.type){n=6;continue}h("expected , or ]")}if(4===n||6===n){if(4===n&&4===o.type){l();continue}if(n=5,1===o.type){c.push(o.value);continue}if(8===o.type){c.push(null);continue}if(9===o.type){c.push(!0);continue}if(10===o.type){c.push(!1);continue}if(11===o.type){c.push(parseFloat(o.value));continue}if(2===o.type){let e=[];c.push(e),u(),n=4,c=e;continue}if(3===o.type){let e={};e.$vscodeTextmateLocation=o.toLocation(t),c.push(e),u(),n=1,c=e;continue}h("unexpected token in array")}h("unknown state")}return 0!==i.length&&h("unclosed constructs"),c}(s,t):JSON.parse(s)):function(e,t){return w?function(e,t,s){return Fe(e,t,"$vscodeTextmateLocation")}(e,t):function(e){return Fe(e,null,null)}(e)}(e,t);var s};var Ve=S.Bz,Ye=("undefined"!=typeof document&&document.currentScript&&document.currentScript.src,function(e){var t,s,r=void 0!==(e=e||{})?e:{};r.ready=new Promise((function(e,r){t=e,s=r}));var o,n=Object.assign({},r),c=!1;o=function(e){let t;return"function"==typeof readbuffer?new Uint8Array(readbuffer(e)):(t=read(e,"binary"),"object"==typeof t||S(s),t);var s},"undefined"!=typeof scriptArgs&&scriptArgs,"undefined"!=typeof onig_print&&("undefined"==typeof console&&(console={}),console.log=onig_print,console.warn=console.error="undefined"!=typeof printErr?printErr:onig_print);var a,i,u=r.print||console.log.bind(console),l=r.printErr||console.warn.bind(console);Object.assign(r,n),n=null,r.arguments&&r.arguments,r.thisProgram&&r.thisProgram,r.quit&&r.quit,r.wasmBinary&&(a=r.wasmBinary),r.noExitRuntime,"object"!=typeof WebAssembly&&S("no native wasm support detected");var h,d,p,m=!1,g="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function f(e,t,s){for(var r=t+s,o=t;e[o]&&!(o>=r);)++o;if(o-t>16&&e.buffer&&g)return g.decode(e.subarray(t,o));for(var n="";t>10,56320|1023&u)}}else n+=String.fromCharCode((31&c)<<6|a)}else n+=String.fromCharCode(c)}return n}function b(e){h=e,r.HEAP8=new Int8Array(e),r.HEAP16=new Int16Array(e),r.HEAP32=new Int32Array(e),r.HEAPU8=d=new Uint8Array(e),r.HEAPU16=new Uint16Array(e),r.HEAPU32=p=new Uint32Array(e),r.HEAPF32=new Float32Array(e),r.HEAPF64=new Float64Array(e)}r.INITIAL_MEMORY;var y=[],_=[],x=[],k=0,j=null;function S(e){r.onAbort&&r.onAbort(e),l(e="Aborted("+e+")"),m=!0,e+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(e);throw s(t),t}var w,v,L,C="data:application/octet-stream;base64,";function A(e){return e.startsWith(C)}function N(e){try{if(e==w&&a)return new Uint8Array(a);if(o)return o(e);throw"both async and sync fetching of the wasm failed"}catch(e){S(e)}}function P(e){for(;e.length>0;)e.shift()(r)}function R(e){try{return i.grow(e-h.byteLength+65535>>>16),b(i.buffer),1}catch(e){}}A(w="onig.wasm")||(v=w,w=r.locateFile?r.locateFile(v,""):""+v),L="undefined"!=typeof dateNow?dateNow:()=>performance.now();var I=[null,[],[]];function E(e,t){var s=I[e];0===t||10===t?((1===e?u:l)(f(s,0)),s.length=0):s.push(t)}var B,O={emscripten_get_now:L,emscripten_memcpy_big:function(e,t,s){d.copyWithin(e,t,t+s)},emscripten_resize_heap:function(e){var t=d.length,s=2147483648;if((e>>>=0)>s)return!1;let r=(e,t)=>e+(t-e%t)%t;for(var o=1;o<=4;o*=2){var n=t*(1+.2/o);if(n=Math.min(n,e+100663296),R(Math.min(s,r(Math.max(e,n),65536))))return!0}return!1},fd_write:function(e,t,s,r){for(var o=0,n=0;n>2],a=p[t+4>>2];t+=8;for(var i=0;i>2]=o,0}};function G(e){function s(){B||(B=!0,r.calledRun=!0,m||(P(_),t(r),r.onRuntimeInitialized&&r.onRuntimeInitialized(),function(){if(r.postRun)for("function"==typeof r.postRun&&(r.postRun=[r.postRun]);r.postRun.length;)e=r.postRun.shift(),x.unshift(e);var e;P(x)}()))}k>0||(function(){if(r.preRun)for("function"==typeof r.preRun&&(r.preRun=[r.preRun]);r.preRun.length;)e=r.preRun.shift(),y.unshift(e);var e;P(y)}(),k>0||(r.setStatus?(r.setStatus("Running..."),setTimeout((function(){setTimeout((function(){r.setStatus("")}),1),s()}),1)):s()))}if(function(){var e={env:O,wasi_snapshot_preview1:O};function t(e,t){var s,o=e.exports;r.asm=o,b((i=r.asm.memory).buffer),r.asm.__indirect_function_table,s=r.asm.__wasm_call_ctors,_.unshift(s),function(e){if(k--,r.monitorRunDependencies&&r.monitorRunDependencies(k),0==k&&j){var t=j;j=null,t()}}()}function o(e){t(e.instance)}function n(t){return(!a&&c&&"function"==typeof fetch?fetch(w,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+w+"'";return e.arrayBuffer()})).catch((function(){return N(w)})):Promise.resolve().then((function(){return N(w)}))).then((function(t){return WebAssembly.instantiate(t,e)})).then((function(e){return e})).then(t,(function(e){l("failed to asynchronously prepare wasm: "+e),S(e)}))}if(k++,r.monitorRunDependencies&&r.monitorRunDependencies(k),r.instantiateWasm)try{return r.instantiateWasm(e,t)}catch(e){l("Module.instantiateWasm callback failed with error: "+e),s(e)}(a||"function"!=typeof WebAssembly.instantiateStreaming||A(w)||"function"!=typeof fetch?n(o):fetch(w,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,e).then(o,(function(e){return l("wasm streaming compile failed: "+e),l("falling back to ArrayBuffer instantiation"),n(o)}))}))).catch(s)}(),r.___wasm_call_ctors=function(){return(r.___wasm_call_ctors=r.asm.__wasm_call_ctors).apply(null,arguments)},r.___errno_location=function(){return(r.___errno_location=r.asm.__errno_location).apply(null,arguments)},r._omalloc=function(){return(r._omalloc=r.asm.omalloc).apply(null,arguments)},r._ofree=function(){return(r._ofree=r.asm.ofree).apply(null,arguments)},r._getLastOnigError=function(){return(r._getLastOnigError=r.asm.getLastOnigError).apply(null,arguments)},r._createOnigScanner=function(){return(r._createOnigScanner=r.asm.createOnigScanner).apply(null,arguments)},r._freeOnigScanner=function(){return(r._freeOnigScanner=r.asm.freeOnigScanner).apply(null,arguments)},r._findNextOnigScannerMatch=function(){return(r._findNextOnigScannerMatch=r.asm.findNextOnigScannerMatch).apply(null,arguments)},r._findNextOnigScannerMatchDbg=function(){return(r._findNextOnigScannerMatchDbg=r.asm.findNextOnigScannerMatchDbg).apply(null,arguments)},r.stackSave=function(){return(r.stackSave=r.asm.stackSave).apply(null,arguments)},r.stackRestore=function(){return(r.stackRestore=r.asm.stackRestore).apply(null,arguments)},r.stackAlloc=function(){return(r.stackAlloc=r.asm.stackAlloc).apply(null,arguments)},r.dynCall_jiji=function(){return(r.dynCall_jiji=r.asm.dynCall_jiji).apply(null,arguments)},r.UTF8ToString=function(e,t){return e?f(d,e,t):""},j=function e(){B||G(),B||(j=e)},r.preInit)for("function"==typeof r.preInit&&(r.preInit=[r.preInit]);r.preInit.length>0;)r.preInit.pop()();return G(),e.ready});let Xe=null;class Je{static _utf8ByteLength(e){let t=0;for(let s=0,r=e.length;s=55296&&o<=56319&&s+1=56320&&t<=57343&&(n=65536+(o-55296<<10)|t-56320,c=!0)}t+=n<=127?1:n<=2047?2:n<=65535?3:4,c&&s++}return t}constructor(e){const t=e.length,s=Je._utf8ByteLength(e),r=s!==t,o=r?new Uint32Array(t+1):null;r&&(o[t]=s);const n=r?new Uint32Array(s+1):null;r&&(n[s]=t);const c=new Uint8Array(s);let a=0;for(let s=0;s=55296&&i<=56319&&s+1=56320&&t<=57343&&(u=65536+(i-55296<<10)|t-56320,l=!0)}r&&(o[s]=a,l&&(o[s+1]=a),u<=127?n[a+0]=s:u<=2047?(n[a+0]=s,n[a+1]=s):u<=65535?(n[a+0]=s,n[a+1]=s,n[a+2]=s):(n[a+0]=s,n[a+1]=s,n[a+2]=s,n[a+3]=s)),u<=127?c[a++]=u:u<=2047?(c[a++]=192|(1984&u)>>>6,c[a++]=128|(63&u)>>>0):u<=65535?(c[a++]=224|(61440&u)>>>12,c[a++]=128|(4032&u)>>>6,c[a++]=128|(63&u)>>>0):(c[a++]=240|(1835008&u)>>>18,c[a++]=128|(258048&u)>>>12,c[a++]=128|(4032&u)>>>6,c[a++]=128|(63&u)>>>0),l&&s++}this.utf16Length=t,this.utf8Length=s,this.utf16Value=e,this.utf8Value=c,this.utf16OffsetToUtf8=o,this.utf8OffsetToUtf16=n}createString(e){const t=e._omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,t),t}}class Ze{constructor(e){if(this.id=++Ze.LAST_ID,!Xe)throw new Error("Must invoke loadWASM first.");this._onigBinding=Xe,this.content=e;const t=new Je(e);this.utf16Length=t.utf16Length,this.utf8Length=t.utf8Length,this.utf16OffsetToUtf8=t.utf16OffsetToUtf8,this.utf8OffsetToUtf16=t.utf8OffsetToUtf16,this.utf8Length<1e4&&!Ze._sharedPtrInUse?(Ze._sharedPtr||(Ze._sharedPtr=Xe._omalloc(1e4)),Ze._sharedPtrInUse=!0,Xe.HEAPU8.set(t.utf8Value,Ze._sharedPtr),this.ptr=Ze._sharedPtr):this.ptr=t.createString(Xe)}convertUtf8OffsetToUtf16(e){return this.utf8OffsetToUtf16?e<0?0:e>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[e]:e}convertUtf16OffsetToUtf8(e){return this.utf16OffsetToUtf8?e<0?0:e>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[e]:e}dispose(){this.ptr===Ze._sharedPtr?Ze._sharedPtrInUse=!1:this._onigBinding._ofree(this.ptr)}}Ze.LAST_ID=0,Ze._sharedPtr=0,Ze._sharedPtrInUse=!1;class et{constructor(e){if(!Xe)throw new Error("Must invoke loadWASM first.");const t=[],s=[];for(let r=0,o=e.length;rWebAssembly.instantiateStreaming(e,t)}(r):function(e){return async t=>{const s=await e.arrayBuffer();return WebAssembly.instantiate(s,t)}}(r):function(e){return t=>WebAssembly.instantiate(e,t)}(r)}return st=new Promise(((e,t)=>{r=e,o=t})),function(e,t,s,r){Ye({print:t,instantiateWasm:(t,s)=>{if("undefined"==typeof performance){const e=()=>Date.now();t.env.emscripten_get_now=e,t.wasi_snapshot_preview1.emscripten_get_now=e}return e(t).then((e=>s(e.instance)),r),{}}}).then((e=>{Xe=e,s()}))}(t,s,r,o),st}function ot(e){return new Ze(e)}function nt(e){return new et(e)}function ct(e){const t=x[e];if(!t)return;const{id:s}=k[t];return{id:s,scopeName:t}}const at=new Map;let it,ut;async function lt(e){if(at.has(e))return at.get(e);const t=function(e){return k[e]}(e);if(!t)return Promise.resolve(void 0);let r;if(void 0===it&&(r=ht(t.path),it=r.then((()=>!0)).catch((()=>!1))),void 0===ut&&(ut=await it),ut){const s=r||ht(t.path);return at.set(e,s),s}const o=s(`grammars/${t.id}`);t.embeddedScopes.forEach((e=>{if(!at.has(e)){const t=o.then((t=>t.find((t=>t.scopeName===e))));at.set(e,t)}}));const n=o.then((t=>t.find((t=>t.scopeName===e))));return at.set(e,n),n}async function ht(e){return await t()}const dt=30720,pt=16744448,mt=16775168,gt=11,ft=15,bt={NotSet:-1,None:0,Italic:1,Bold:2,Underline:4,Strikethrough:8};function yt(e,t,s,r){const{tokens:o,ruleStack:n}=e.tokenizeLine2(s,t),c=[];let a=s.length;for(let e=o.length-2;e>=0;e-=2){const t=o[e],r=o[e+1],n=s.slice(t,a);c.unshift({content:n,metadata:r}),a=t}let i=[];if(null==r?void 0:r.preserveWhitespace)i=c;else for(let e=0;e0?i[i.length-1].content+=t.content:e{const{rawTokens:o,nextStack:n}=yt(t,r,e,{preserveWhitespace:!0}),c=o.map((({content:e,metadata:t})=>({content:e,style:xt(t,s)}))),a=function(e,t,s,r){const{tokens:o}=s.tokenizeLine(e,t),n=[];for(let t=0;t{if(i+=e.content.length,s>>ft]},r=(e&dt)>>>gt;return r&bt.Italic&&(s.fontStyle="italic"),r&bt.Bold&&(s.fontWeight="bold"),r&bt.Underline&&(s.textDecoration="underline"),r&bt.Strikethrough&&(s.textDecoration="line-through"),s}var kt={instantiator:t=>WebAssembly.instantiate(e,t).then((e=>({instance:e})))};let jt=null;function St(e){return"text"==e||"terminal"==e}function wt(e){if(!jt){const e=rt(kt).then((()=>({createOnigScanner:nt,createOnigString:ot})));jt=new Ve({onigLib:e,loadGrammar:e=>lt(e)})}const t=e.filter((e=>!St(e))).map((e=>{const t=ct(e);if(!t)throw new Lt(e);return jt.loadGrammar(t.scopeName)}));return Promise.all(t)}function vt(e){if(St(e))return{langId:e,grammar:null};const t=ct(e);if(!t)throw new Lt(e);const s=function(e){const{_syncRegistry:t}=jt;return null==t?void 0:t._grammars.get(e)}(t.scopeName);if(!s)throw new Error(`Syntax highlighting error: grammar for ${e} not loaded`);return{langId:t.id,grammar:s}}class Lt extends Error{constructor(e){super(`Unknown language: ${e}`),this.alias=e}}function Ct(e,t,s){jt.setTheme(s);const r=function(e){const t=jt.getColorMap();return e.colorNames?t.map((t=>Object.keys(e.colorNames).find((s=>e.colorNames[s].toUpperCase()===t.toUpperCase()))||t)):t}(s);return function(e,t,s){let r=null;return e.split(/\r?\n|\r/g).map((e=>{const{rawTokens:o,nextStack:n}=yt(t,r,e);return r=n,o.map((({content:e,metadata:t})=>({content:e,style:xt(t,s)})))}))}(e,t,r)}function At(e){return e.split(/\r?\n|\r/g).map((e=>[{content:e,style:{}}]))}function Nt(e,t){return Rt(e.slice(1,-1)).map((e=>{const{from:s,to:r}=Pt(e);return{lineNumber:t,fromColumn:s,toColumn:r}}))}function Pt(e){const[t,s]=e.split(":");if(!It(t))throw new Et(t);const r=Number(t);if(r<1)throw new Bt;if(s){if(!It(s))throw new Et(s);return{from:r,to:+s}}return{from:r,to:r}}function Rt(e){return e.split(/,(?![^\[]*\])/g)}function It(e){e=e.toString();var t=Math.abs(e),s=parseInt(e,10);return!isNaN(t)&&s===t&&t.toString()===e}class Et extends Error{constructor(e){super(`Invalid number "${e}" in range string`),this.number=e,Object.setPrototypeOf(this,new.target.prototype)}}class Bt extends Error{constructor(){super("Invalid line or column number in range string"),Object.setPrototypeOf(this,new.target.prototype)}}const Ot="#001",Gt="#010",Tt={name:"comments",type:"light",foreground:"",background:"",colors:{},settings:[{settings:{foreground:"#000"}},{scope:["punctuation.definition.comment"],settings:{foreground:Ot}},{scope:"comment",settings:{foreground:Gt}}]};function Ft(e,t,s,r){const o=t?Ct(e,t,Tt):At(e),n=[];let c=1;const a=o.map((e=>{const{annotations:t,lineWithoutComments:o}=function(e,t,s){if(!e.some((e=>e.style.color===Ot)))return{annotations:[],lineWithoutComments:e};const r=[];let o=0;for(;o!e.tokens.includes(t)));n.every((e=>""===e.content.trim()))&&(n=null);return{annotations:r.map((e=>({name:e.name,query:e.query,lineNumber:e.lineNumber,rangeString:e.rangeString}))),lineWithoutComments:n}}(e,r,c);if(n.push(...t),!o)return null;const a=o.map((e=>e.content)).join("");return["mdx","jsx","tsx"].includes(s)&&t.length>0&&"{}"===a.trim()?null:(c++,a)})).filter((e=>null!==e)).join("\n"),i=n.map((e=>{var{rangeString:t,lineNumber:s}=e,r=function(e,t){var s={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(s[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o{if(e.includes("[")){const[s,r]=e.split("["),o=Number(s),n=t+o-1;if(!It(n))throw new Et(s);return Nt("["+r,n)}const{from:s,to:r}=Pt(e);return[{fromLineNumber:s+t-1,toLineNumber:r+t-1}]})).flat():[{fromLineNumber:t,toLineNumber:t}]}(t,s);return Object.assign(Object.assign({},r),{ranges:o})}));return{newCode:a,annotations:i}}function qt(e,t){var s;const r=e.match(/\s*([\w-]+)?(\([^\)]*\)|\[[^\]]*\])?(.*)$/),o=r[1],n=r[2],c=null===(s=r[3])||void 0===s?void 0:s.trim();return t.includes(o)?{name:o,rangeString:n,query:c}:null}function $t(e,t){let s=[],r=1;return e.forEach((e=>{s.push({fromColumn:r,toColumn:r+e.content.length-1,token:e}),r+=e.content.length})),t.forEach((e=>{s=function(e,t){const{range:s}=t,{fromColumn:r,toColumn:o}=s,n=[];let c=0;for(;co){const[e,s]=Ut(t,o+1);a.tokens.push(e),n.push(s)}else a.tokens.push(t);c++}else n.push(a);for(;cMt(e)))}function Mt(e){return"tokens"in e?{annotationName:e.annotationName,annotationQuery:e.annotationQuery,fromColumn:e.fromColumn,toColumn:e.toColumn,tokens:e.tokens.map((e=>Mt(e)))}:e.token}function Ut(e,t){if("token"in e){const s=Object.assign(Object.assign({},e.token),{content:e.token.content.slice(0,t-e.fromColumn)}),r=Object.assign(Object.assign({},e.token),{content:e.token.content.slice(t-e.fromColumn)});return[Object.assign(Object.assign({},e),{toColumn:t-1,token:s}),Object.assign(Object.assign({},e),{fromColumn:t,token:r})]}{const s=[],r=[];e.tokens.forEach((e=>{if(e.toColumn=t)r.push(e);else{const[o,n]=Ut(e,t);s.push(o),r.push(n)}}));return[Object.assign(Object.assign({},e),{toColumn:t-1,tokens:s}),Object.assign(Object.assign({},e),{fromColumn:t,tokens:r})]}}function Wt(e,t){let s=e.map(((e,t)=>({fromLineNumber:t+1,toLineNumber:t+1,line:e})));return t.forEach((e=>{s=function(e,t){const{range:s,name:r,query:o}=t,{fromLineNumber:n,toLineNumber:c}=s,a=[];let i=0;for(;ic){const[e,s]=zt(t,c+1);u.lines.push(e),a.push(s)}else u.lines.push(t);i++}else a.push(u);for(;iDt(e)))}function Dt(e){return"line"in e?{lineNumber:e.fromLineNumber,tokens:e.line.tokens}:{annotationName:e.annotationName,annotationQuery:e.annotationQuery,fromLineNumber:e.fromLineNumber,toLineNumber:e.toLineNumber,lines:e.lines.map((e=>Dt(e)))}}function zt(e,t){if("line"in e)return[Object.assign(Object.assign({},e),{toLineNumber:t-1}),Object.assign(Object.assign({},e),{fromLineNumber:t})];{const s=[],r=[];return e.lines.forEach((e=>{if(e.toLineNumber=t)r.push(e);else{const[o,n]=zt(e,t);s.push(o),r.push(n)}})),[Object.assign(Object.assign({},e),{toLineNumber:t-1,lines:s}),Object.assign(Object.assign({},e),{fromLineNumber:t,lines:r})]}}function Ht(e,t){const{inlineAnnotations:s,multilineAnnotations:r}=function(e){const t=[],s=[];return e.forEach((e=>{e.ranges.forEach((r=>{"lineNumber"in r?t.push(Object.assign(Object.assign({},e),{range:r})):s.push(Object.assign(Object.assign({},e),{range:r}))}))})),{inlineAnnotations:t,multilineAnnotations:s}}(t);return Wt(e.map(((e,t)=>{const r=s.filter((e=>e.range.lineNumber===t+1));return{lineNumber:t+1,tokens:$t(e,r)}})),r)}var Qt=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],Kt={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",9:"strikethrough"};function Vt(e,t){const s=e.indexOf("[",t);if(-1!==s){const t=e.indexOf("m",s);return{sequence:e.substring(s+2,t).split(";"),startPosition:s,position:t+1}}return{position:e.length}}function Yt(e,t){let s=1;const r=e[t+s++];let o;if("2"===r){const r=[e[t+s++],e[t+s++],e[t+s]].map((e=>Number.parseInt(e)));3!==r.length||r.some((e=>Number.isNaN(e)))||(o={type:"rgb",rgb:r})}else if("5"===r){const r=Number.parseInt(e[t+s]);Number.isNaN(r)||(o={type:"table",index:Number(r)})}return[s,o]}function Xt(e){const t=[];for(let s=0;s=90&&o<=97?t.push({type:"setForegroundColor",value:{type:"named",name:Qt[o-90+8]}}):o>=100&&o<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:Qt[o-100+8]}})}return t}function Jt(e,t){const s=function(){let e=null,t=null,s=new Set;return{parse(r){const o=[];let n=0;do{const c=Vt(r,n),a=c.sequence?r.substring(n,c.startPosition):r.substring(n);if(a.length>0&&o.push({value:a,foreground:e,background:t,decorations:new Set(s)}),c.sequence){const r=Xt(c.sequence);for(const o of r)"resetAll"===o.type?(e=null,t=null,s.clear()):"resetForegroundColor"===o.type?e=null:"resetBackgroundColor"===o.type?t=null:"resetDecoration"===o.type&&s.delete(o.value);for(const o of r)"setForegroundColor"===o.type?e=o.value:"setBackgroundColor"===o.type?t=o.value:"setDecoration"===o.type&&s.add(o.value)}n=c.position}while(nfunction(e,t,s){const r=e.parse(t),o=r.map((({value:e,foreground:t,background:r,decorations:o})=>{const n=Zt(t,s),c={};n&&(c.color=n);const a=Zt(r,s);return a&&(c.background=a),o.has("bold")&&(c.fontWeight="bold"),o.has("italic")&&(c.fontStyle="italic"),o.has("underline")&&(c.textDecoration="underline"),o.has("strikethrough")&&(c.textDecoration="line-through"),o.has("reverse")&&(c.color=a,c.background=n),o.has("dim")&&(c.opacity=.5),{content:e,style:c}}));return o}(s,e,t)));return r}function Zt(e,t){if(e){if("named"===e.type){return i(t,"terminal.ansi"+(e.name[0].toUpperCase()+e.name.slice(1)))}if("rgb"===e.type){const[t,s,r]=e.rgb;return`rgb(${t}, ${s}, ${r})`}}}async function es(e,t){await Promise.all([wt(e),p(t)])}async function ts(e,t,s="dark-plus",r={}){const o=e||"",n=t||"text";if("string"!=typeof o)throw new Error("Syntax highlighter error: code must be a string");if("string"!=typeof n)throw new Error("Syntax highlighter error: lang must be a string");return await es([n],s),ss(o,n,s,r)}function ss(e,t,s="dark-plus",r={}){const o=e||"",n=t||"text";if("string"!=typeof o)throw new Error("Syntax highlighter error: code must be a string");if("string"!=typeof n)throw new Error("Syntax highlighter error: lang must be a string");const{langId:c,grammar:a}=vt(n),u=m(s),l="text"==c?At(o):"terminal"==c?Jt(o,u):(null==r?void 0:r.scopes)?function(e,t,s){return jt.setTheme(s),_t(e,t,jt.getColorMap())}(o,a,u):Ct(o,a,u),h="terminal"==c?function(e){return{color:i(e,"terminal.foreground"),background:i(e,"terminal.background")}}(u):{color:u.foreground,background:u.background};if(function(e){return"annotations"in e}(r)){return{lines:Ht(l,(null==r?void 0:r.annotations)||[]),lang:c,style:h}}return{lines:l,lang:c,style:h}}async function rs(e,t,s){if(!s)return{code:e,annotations:[]};await wt([t]);const{grammar:r}=vt(t),{newCode:o,annotations:n}=Ft(e,r,t,s);return{code:o,annotations:n}}async function os(e){if(!e)throw new Error("Syntax highlighter error: undefined theme");await es([],e);return y(m(e))}function ns(e){if(!e)throw new Error("Syntax highlighter error: undefined theme");return y(m(e))}export{_ as LANG_NAMES,f as THEME_NAMES,Lt as UnknownLanguageError,b as UnknownThemeError,rs as extractAnnotations,os as getThemeColors,ns as getThemeColorsSync,ts as highlight,ss as highlightSync,es as preload}; diff --git a/lib/src/comments.ts b/lib/src/comments.ts index 81481a0..05634d2 100644 --- a/lib/src/comments.ts +++ b/lib/src/comments.ts @@ -38,6 +38,8 @@ export type AnnotationData = { query?: string; }; +type RawAnnotation = AnnotationData & { lineNumber: number }; + export type AnnotationExtractor = | string[] | ((comment: string) => null | AnnotationData); @@ -52,7 +54,7 @@ export function extractCommentsFromCode( ? highlightText(code) : highlightTokens(code, grammar, commentsTheme); - const allAnnotations: Annotation[] = []; + const allAnnotations: RawAnnotation[] = []; let lineNumber = 1; const newCode = lines @@ -86,14 +88,24 @@ export function extractCommentsFromCode( .filter((line) => line !== null) .join(`\n`); - return { newCode, annotations: allAnnotations }; + const annotations = allAnnotations.map( + ({ rangeString, lineNumber, ...rest }) => { + const ranges = parseRelativeRanges(rangeString, lineNumber); + return { ...rest, ranges }; + } + ); + + return { newCode, annotations }; } function getAnnotationsFromLine( tokens: Token[], annotationExtractor: AnnotationExtractor, lineNumber: number -) { +): { + annotations: RawAnnotation[]; + lineWithoutComments: Token[] | null; +} { // if no punctuation return empty if (!tokens.some((token) => token.style.color === PUNCTUATION)) { return { annotations: [], lineWithoutComments: tokens }; @@ -104,7 +116,8 @@ function getAnnotationsFromLine( tokens: Token[]; name: string; query?: string; - ranges: CodeRange[]; + rangeString: string; + lineNumber: number; }[] = []; let i = 0; while (i < tokens.length) { @@ -144,7 +157,8 @@ function getAnnotationsFromLine( tokens: commentTokens, name, query, - ranges: parseRelativeRanges(rangeString, lineNumber), + rangeString, + lineNumber, }); i += 2; @@ -165,7 +179,8 @@ function getAnnotationsFromLine( annotations: comments.map((a) => ({ name: a.name, query: a.query, - ranges: a.ranges, + lineNumber: a.lineNumber, + rangeString: a.rangeString, })), lineWithoutComments: newLine, }; From 30e6fa7c122b07e9075b0a88144970a4a5e69995 Mon Sep 17 00:00:00 2001 From: Rodrigo Pombo Date: Thu, 28 Mar 2024 12:09:08 +0100 Subject: [PATCH 2/3] Add test extraction helper --- lib/test/__snapshots__/browser.test.ts.snap | 2 +- lib/test/__snapshots__/cjs.test.ts.snap | 2 +- lib/test/__snapshots__/esm.test.ts.snap | 2 +- lib/test/annotations.ts | 49 ++++++++++++--------- 4 files changed, 30 insertions(+), 25 deletions(-) diff --git a/lib/test/__snapshots__/browser.test.ts.snap b/lib/test/__snapshots__/browser.test.ts.snap index 8dc52a5..6ed613c 100644 --- a/lib/test/__snapshots__/browser.test.ts.snap +++ b/lib/test/__snapshots__/browser.test.ts.snap @@ -453,7 +453,7 @@ const y = 2;", exports[`extract annottations with prefix 2`] = ` { - "lang": "javascript", + "lang": "jsx", "lines": [ { "lineNumber": 1, diff --git a/lib/test/__snapshots__/cjs.test.ts.snap b/lib/test/__snapshots__/cjs.test.ts.snap index 8dc52a5..6ed613c 100644 --- a/lib/test/__snapshots__/cjs.test.ts.snap +++ b/lib/test/__snapshots__/cjs.test.ts.snap @@ -453,7 +453,7 @@ const y = 2;", exports[`extract annottations with prefix 2`] = ` { - "lang": "javascript", + "lang": "jsx", "lines": [ { "lineNumber": 1, diff --git a/lib/test/__snapshots__/esm.test.ts.snap b/lib/test/__snapshots__/esm.test.ts.snap index 8dc52a5..6ed613c 100644 --- a/lib/test/__snapshots__/esm.test.ts.snap +++ b/lib/test/__snapshots__/esm.test.ts.snap @@ -453,7 +453,7 @@ const y = 2;", exports[`extract annottations with prefix 2`] = ` { - "lang": "javascript", + "lang": "jsx", "lines": [ { "lineNumber": 1, diff --git a/lib/test/annotations.ts b/lib/test/annotations.ts index 26de926..eeb1fe3 100644 --- a/lib/test/annotations.ts +++ b/lib/test/annotations.ts @@ -1,6 +1,14 @@ import { expect, test } from "vitest"; export function runAnnotationTests({ extractAnnotations, highlight }) { + async function extract(code: string, lang: string) { + const extracted = await extractAnnotations(code, lang, extractor); + const highlighted = await highlight(extracted.code, lang, "dark-plus", { + annotations: extracted.annotations, + }); + return { extracted, highlighted }; + } + test("extract annottations", async () => { const code = ` const x = 1; @@ -79,27 +87,24 @@ const x = 1; // !xy[3:5] bar const y = 2;`.trim(); - const extractor = (comment: string) => { - const regex = /\s*(!?[\w-]+)?(\([^\)]*\)|\[[^\]]*\])?(.*)$/; - const match = comment.match(regex); - const name = match[1]; - const rangeString = match[2]; - const query = match[3]?.trim(); - if (!name || !name.startsWith("!")) { - return null; - } - return { - name: name.slice(1), - rangeString, - query, - }; - }; - - const result = await extractAnnotations(code, "jsx", extractor); - expect(result).toMatchSnapshot(); - const hResult = await highlight(result.code, "js", "dark-plus", { - annotations: result.annotations, - }); - expect(hResult).toMatchSnapshot(); + const { extracted, highlighted } = await extract(code, "jsx"); + expect(extracted).toMatchSnapshot(); + expect(highlighted).toMatchSnapshot(); }); } + +const extractor = (comment: string) => { + const regex = /\s*(!?[\w-]+)?(\([^\)]*\)|\[[^\]]*\])?(.*)$/; + const match = comment.match(regex); + const name = match[1]; + const rangeString = match[2]; + const query = match[3]?.trim(); + if (!name || !name.startsWith("!")) { + return null; + } + return { + name: name.slice(1), + rangeString, + query, + }; +}; From 87a94c0981731accfc59c2d1b20bc5d9e9e015ba Mon Sep 17 00:00:00 2001 From: Rodrigo Pombo Date: Sat, 30 Mar 2024 11:58:09 +0100 Subject: [PATCH 3/3] Regex annotations --- .changeset/many-phones-wonder.md | 5 + lib/dist/browser.esm.mjs | 2 +- lib/dist/index.cjs.js | 2 +- lib/dist/index.esm.mjs | 2 +- lib/dist/worker.esm.mjs | 2 +- lib/src/comments.ts | 26 +- lib/src/extractor.test.ts | 18 + lib/src/extractor.ts | 19 + lib/src/regex-range.test.ts | 123 ++ lib/src/regex-range.ts | 87 + lib/test/__snapshots__/browser.test.ts.snap | 1747 ++++++++++++++++--- lib/test/__snapshots__/cjs.test.ts.snap | 1747 ++++++++++++++++--- lib/test/__snapshots__/esm.test.ts.snap | 1747 ++++++++++++++++--- lib/test/annotations.ts | 89 + 14 files changed, 4892 insertions(+), 724 deletions(-) create mode 100644 .changeset/many-phones-wonder.md create mode 100644 lib/src/extractor.test.ts create mode 100644 lib/src/extractor.ts create mode 100644 lib/src/regex-range.test.ts create mode 100644 lib/src/regex-range.ts diff --git a/.changeset/many-phones-wonder.md b/.changeset/many-phones-wonder.md new file mode 100644 index 0000000..6217016 --- /dev/null +++ b/.changeset/many-phones-wonder.md @@ -0,0 +1,5 @@ +--- +"@code-hike/lighter": patch +--- + +Add regex annotations diff --git a/lib/dist/browser.esm.mjs b/lib/dist/browser.esm.mjs index 80067b3..4a0f662 100644 --- a/lib/dist/browser.esm.mjs +++ b/lib/dist/browser.esm.mjs @@ -1 +1 @@ -async function A(A,B){throw new Error("no fs")}async function B(A){const B=await fetch(`https://lighter.codehike.org/${A}.json`);return await B.json()}const Q=A=>/^#([A-Fa-f0-9]{3,4}){1,2}$/.test(A),g=(A,B)=>A.match(new RegExp(`.{${B}}`,"g")),E=A=>parseInt(A.repeat(2/A.length),16);function C(A,B){return void 0!==A?A/255:"number"!=typeof B||B<0||B>1?1:B}function I(A,B){if(!A)return A;const{r:I,g:D,b:w,a:o}=function(A){if(!A)return;if(!Q(A))throw new Error("Invalid color string, must be a valid hex color");const B=Math.floor((A.length-1)/3),I=g(A.slice(1),B),[D,w,o,s]=I.map(E);return{r:D,g:w,b:o,a:C(s,1)}}(A);return function(A){if(!A)return;const{r:B,g:Q,b:g,a:E}=A,C=Math.round(255*E);return`#${B.toString(16).padStart(2,"0")}${Q.toString(16).padStart(2,"0")}${g.toString(16).padStart(2,"0")}${C.toString(16).padStart(2,"0")}`}({r:I,g:D,b:w,a:o*B})}function D(A,B){const Q=A.colors||{};if(Q[B])return Q[B];const g=o[B];if(!g)throw new Error(`Unknown theme color key: ${B}`);return"string"==typeof g?D(A,g):function(A,B){const Q=B[A.type];if(Array.isArray(Q)){const[B,g,...E]=Q;return B(D(A,g),...E)}return Q}(A,g)}const w="#6FC3DF",o={"editor.foreground":{dark:"#bbbbbb",light:"#333333",hc:"#ffffff"},"editorLineNumber.foreground":{dark:"#858585",light:"#237893",hc:"#fffffe"},"editor.selectionBackground":{light:"#ADD6FF",dark:"#264F78",hc:"#f3f518"},"editor.background":{light:"#fffffe",dark:"#1E1E1E",hc:"#000000"},"editorGroupHeader.tabsBackground":{dark:"#252526",light:"#F3F3F3"},"tab.activeBackground":"editor.background","tab.activeForeground":{dark:"#ffffff",light:"#333333",hc:"#ffffff"},"tab.border":{dark:"#252526",light:"#F3F3F3",hc:w},"tab.activeBorder":"tab.activeBackground","tab.inactiveBackground":{dark:"#2D2D2D",light:"#ECECEC"},"tab.inactiveForeground":{dark:[I,"tab.activeForeground",.5],light:[I,"tab.activeForeground",.5],hc:"#ffffff"},"diffEditor.insertedTextBackground":{dark:"#9ccc2c33",light:"#9ccc2c40"},"diffEditor.removedTextBackground":{dark:"#ff000033",light:"#ff000033"},"diffEditor.insertedLineBackground":{dark:"#9bb95533",light:"#9bb95533"},"diffEditor.removedLineBackground":{dark:"#ff000033",light:"#ff000033"},"icon.foreground":{dark:"#C5C5C5",light:"#424242",hc:"#FFFFFF"},"sideBar.background":{dark:"#252526",light:"#F3F3F3",hc:"#000000"},"sideBar.foreground":"editor.foreground","sideBar.border":"sideBar.background","list.inactiveSelectionBackground":{dark:"#37373D",light:"#E4E6F1"},"list.inactiveSelectionForeground":{},"list.hoverBackground":{dark:"#2A2D2E",light:"#F0F0F0"},"list.hoverForeground":{},"editorGroupHeader.tabsBorder":{hc:w},"tab.activeBorderTop":{hc:w},"tab.hoverBackground":"tab.inactiveBackground","tab.hoverForeground":"tab.inactiveForeground","editor.rangeHighlightBackground":{dark:"#ffffff0b",light:"#fdff0033"},"editor.infoForeground":{dark:"#3794FF",light:"#1a85ff",hc:"#3794FF"},"input.border":{hc:w},"input.background":{dark:"#3C3C3C",light:"#fffffe",hc:"#000000"},"input.foreground":"editor.foreground","editor.lineHighlightBackground":{},focusBorder:{light:"#0090F1",dark:"#007FD4",hc:w},"editorGroup.border":{dark:"#444444",light:"#E7E7E7",hc:w},"list.activeSelectionBackground":{dark:"#094771",light:"#0060C0",hc:"#000000"},"list.activeSelectionForeground":{dark:"#fffffe",light:"#fffffe",hc:"#fffffe"},"lighter.inlineBackground":{dark:[I,"editor.background",.9],light:[I,"editor.background",.9]},"terminal.background":"editor.background","terminal.foreground":"editor.foreground","terminal.ansiBlack":{dark:"#000000",light:"#000000",hc:"#000000"},"terminal.ansiRed":{dark:"#cd3131",light:"#cd3131",hc:"#cd0000"},"terminal.ansiGreen":{dark:"#0DBC79",light:"#00BC00",hc:"#00cd00"},"terminal.ansiYellow":{dark:"#e5e510",light:"#949800",hc:"#cdcd00"},"terminal.ansiBlue":{dark:"#2472c8",light:"#0451a5",hc:"#0000ee"},"terminal.ansiMagenta":{dark:"#bc3fbc",light:"#bc05bc",hc:"#cd00cd"},"terminal.ansiCyan":{dark:"#11a8cd",light:"#0598bc",hc:"#00cdcd"},"terminal.ansiWhite":{dark:"#e5e5e5",light:"#555555",hc:"#e5e5e5"},"terminal.ansiBrightBlack":{dark:"#666666",light:"#666666",hc:"#7f7f7f"},"terminal.ansiBrightRed":{dark:"#f14c4c",light:"#cd3131",hc:"#ff0000"},"terminal.ansiBrightGreen":{dark:"#23d18b",light:"#14CE14",hc:"#00ff00"},"terminal.ansiBrightYellow":{dark:"#f5f543",light:"#b5ba00",hc:"#ffff00"},"terminal.ansiBrightBlue":{dark:"#3b8eea",light:"#0451a5",hc:"#5c5cff"},"terminal.ansiBrightMagenta":{dark:"#d670d6",light:"#bc05bc",hc:"#ff00ff"},"terminal.ansiBrightCyan":{dark:"#29b8db",light:"#0598bc",hc:"#00ffff"},"terminal.ansiBrightWhite":{dark:"#e5e5e5",light:"#a5a5a5",hc:"#ffffff"}},s=new Map,e=new Map;async function c(Q){if("string"==typeof Q){const g=Q;if(!M.includes(g))throw new h(g);if(!s.has(g)){const Q=async function(Q){try{return await A()}catch(A){return await B(`themes/${Q}`)}}(g).then((A=>(e.set(g,A),A)));s.set(g,Q)}return s.get(g)}return Q}function i(A){let B=null;if("string"==typeof A){if(B=e.get(A),!B)throw new Error("Syntax highlighting error: theme not loaded")}else B=A;return function(A){if(!A)return;const B=A.settings||A.tokenColors||[],Q={name:A.name||"unknown-theme",type:t(A),foreground:"",background:"",settings:B,colors:A.colors||{},colorNames:A.colorNames},g=B.find((A=>!A.scope));if(g){const{foreground:A,background:B}=(null==g?void 0:g.settings)||{},E={};A&&!Q.colors["editor.foreground"]&&(E["editor.foreground"]=A),B&&!Q.colors["editor.background"]&&(E["editor.background"]=B),Object.keys(E).length>0&&(Q.colors=Object.assign(Object.assign({},Q.colors),E)),Q.foreground=A,Q.background=B}g||(Q.settings=[{settings:{foreground:D(Q,"editor.foreground"),background:D(Q,"editor.background")}},...Q.settings]);if(Q.background=Q.background||D(Q,"editor.background"),Q.foreground=Q.foreground||D(Q,"editor.foreground"),"from-css"===A.type&&!Q.colorNames){const A={};let B=0;Q.settings=Q.settings.map((Q=>{const g=Object.assign(Object.assign({},Q),{settings:Object.assign({},Q.settings)}),{foreground:E,background:C}=g.settings||{};return E&&!A[E]&&(A[E]=`#${B.toString(16).padStart(6,"0")}`,B++),C&&!A[C]&&(A[C]=`#${B.toString(16).padStart(6,"0")}`,B++),E&&(g.settings.foreground=A[E]),C&&(g.settings.background=A[C]),g})),Q.colorNames=A}return Q}(B)}function t(A){var B;if("from-css"===A.type)return"from-css";return"light"===(A.type?A.type:(null===(B=A.name)||void 0===B?void 0:B.toLowerCase().includes("light"))?"light":"dark")?"light":"dark"}const M=["dark-plus","dracula-soft","dracula","github-dark","github-dark-dimmed","github-from-css","github-light","light-plus","material-darker","material-default","material-from-css","material-lighter","material-ocean","material-palenight","min-dark","min-light","monokai","nord","one-dark-pro","poimandres","slack-dark","slack-ochin","solarized-dark","solarized-light"];class h extends Error{constructor(A){super(`Unknown theme: ${A}`),this.theme=A}}function a(A){const B=B=>"colorScheme"===B?function(A){return"from-css"===A.type?"var(--ch-0)":A.type}(A):"foreground"===B?A.foreground:"background"===B?A.background:D(A,B);return{colorScheme:B("colorScheme"),foreground:B("foreground"),background:B("background"),lighter:{inlineBackground:B("lighter.inlineBackground")},editor:{background:B("editor.background"),foreground:B("editor.foreground"),lineHighlightBackground:B("editor.lineHighlightBackground"),rangeHighlightBackground:B("editor.rangeHighlightBackground"),infoForeground:B("editor.infoForeground"),selectionBackground:B("editor.selectionBackground")},focusBorder:B("focusBorder"),tab:{activeBackground:B("tab.activeBackground"),activeForeground:B("tab.activeForeground"),inactiveBackground:B("tab.inactiveBackground"),inactiveForeground:B("tab.inactiveForeground"),border:B("tab.border"),activeBorder:B("tab.activeBorder"),activeBorderTop:B("tab.activeBorderTop")},editorGroup:{border:B("editorGroup.border")},editorGroupHeader:{tabsBackground:B("editorGroupHeader.tabsBackground")},editorLineNumber:{foreground:B("editorLineNumber.foreground")},input:{background:B("input.background"),foreground:B("input.foreground"),border:B("input.border")},icon:{foreground:B("icon.foreground")},sideBar:{background:B("sideBar.background"),foreground:B("sideBar.foreground"),border:B("sideBar.border")},list:{activeSelectionBackground:B("list.activeSelectionBackground"),activeSelectionForeground:B("list.activeSelectionForeground"),hoverBackground:B("list.hoverBackground"),hoverForeground:B("list.hoverForeground")}}}const F=["abap","actionscript-3","ada","apache","apex","apl","applescript","ara","asm","astro","awk","ballerina","bash","bat","batch","be","beancount","berry","bibtex","bicep","blade","c","c#","cadence","cdc","clarity","clj","clojure","cmake","cmd","cobol","codeql","coffee","console","cpp","crystal","cs","csharp","css","cue","cypher","d","dart","dax","diff","docker","dockerfile","dream-maker","elixir","elm","erb","erl","erlang","f#","fish","fs","fsharp","fsl","gdresource","gdscript","gdshader","gherkin","git-commit","git-rebase","glimmer-js","glimmer-ts","glsl","gnuplot","go","graphql","groovy","hack","haml","handlebars","haskell","hbs","hcl","hjson","hlsl","hs","html","http","imba","ini","jade","java","javascript","jinja-html","jison","js","json","json5","jsonc","jsonl","jsonnet","jssm","jsx","julia","kotlin","kql","kusto","latex","less","liquid","lisp","logo","lua","make","makefile","markdown","marko","matlab","md","mdx","mermaid","narrat","nextflow","nginx","nim","nix","objc","objective-c","objective-cpp","ocaml","pascal","perl","perl6","php","plsql","postcss","powerquery","powershell","prisma","prolog","properties","proto","ps","ps1","pug","puppet","purescript","py","python","ql","r","raku","razor","rb","reg","rel","riscv","rs","rst","ruby","rust","sas","sass","scala","scheme","scss","sh","shader","shaderlab","shell","shellscript","shellsession","smalltalk","solidity","sparql","sql","ssh-config","stata","styl","stylus","svelte","swift","system-verilog","tasl","tcl","terminal","tex","text","toml","ts","tsx","turtle","twig","txt","typescript","v","vb","verilog","vhdl","vim","viml","vimscript","vue","vue-html","vyper","wasm","wenyan","wgsl","wolfram","xml","xsl","yaml","yml","zenscript","zsh","文言"],G={abap:"source.abap","actionscript-3":"source.actionscript.3",ada:"source.ada",apache:"source.apacheconf",apex:"source.apex",apl:"source.apl",applescript:"source.applescript",ara:"source.ara",asm:"source.asm.x86_64",astro:"source.astro",awk:"source.awk",ballerina:"source.ballerina",bat:"source.batchfile",batch:"source.batchfile",beancount:"text.beancount",berry:"source.berry",be:"source.berry",bibtex:"text.bibtex",bicep:"source.bicep",blade:"text.html.php.blade",c:"source.c",cadence:"source.cadence",cdc:"source.cadence",clarity:"source.clar",clojure:"source.clojure",clj:"source.clojure",cmake:"source.cmake",cobol:"source.cobol",codeql:"source.ql",ql:"source.ql",coffee:"source.coffee",cpp:"source.cpp",crystal:"source.crystal",csharp:"source.cs","c#":"source.cs",cs:"source.cs",css:"source.css",cue:"source.cue",cypher:"source.cypher",d:"source.d",dart:"source.dart",dax:"source.dax",diff:"source.diff",docker:"source.dockerfile",dockerfile:"source.dockerfile","dream-maker":"source.dm",elixir:"source.elixir",elm:"source.elm",erb:"text.html.erb",erlang:"source.erlang",erl:"source.erlang",fish:"source.fish",fsharp:"source.fsharp","f#":"source.fsharp",fs:"source.fsharp",gdresource:"source.gdresource",gdscript:"source.gdscript",gdshader:"source.gdshader",gherkin:"text.gherkin.feature","git-commit":"text.git-commit","git-rebase":"text.git-rebase","glimmer-js":"source.gjs","glimmer-ts":"source.gts",glsl:"source.glsl",gnuplot:"source.gnuplot",go:"source.go",graphql:"source.graphql",groovy:"source.groovy",hack:"source.hack",haml:"text.haml",handlebars:"text.html.handlebars",hbs:"text.html.handlebars",haskell:"source.haskell",hs:"source.haskell",hcl:"source.hcl",hjson:"source.hjson",hlsl:"source.hlsl",html:"text.html.basic",http:"source.http",imba:"source.imba",ini:"source.ini",properties:"source.ini",java:"source.java",javascript:"source.js",js:"source.js","jinja-html":"text.html.jinja",jison:"source.jison",json:"source.json",json5:"source.json5",jsonc:"source.json.comments",jsonl:"source.json.lines",jsonnet:"source.jsonnet",jssm:"source.jssm",fsl:"source.jssm",jsx:"source.js.jsx",julia:"source.julia",kotlin:"source.kotlin",kusto:"source.kusto",kql:"source.kusto",latex:"text.tex.latex",less:"source.css.less",liquid:"text.html.liquid",lisp:"source.lisp",logo:"source.logo",lua:"source.lua",make:"source.makefile",makefile:"source.makefile",markdown:"text.html.markdown",md:"text.html.markdown",marko:"text.marko",matlab:"source.matlab",mdx:"source.mdx",mermaid:"source.mermaid",narrat:"source.narrat",nextflow:"source.nextflow",nginx:"source.nginx",nim:"source.nim",nix:"source.nix","objective-c":"source.objc",objc:"source.objc","objective-cpp":"source.objcpp",ocaml:"source.ocaml",pascal:"source.pascal",perl:"source.perl",php:"source.php",plsql:"source.plsql.oracle",postcss:"source.css.postcss",powerquery:"source.powerquery",powershell:"source.powershell",ps:"source.powershell",ps1:"source.powershell",prisma:"source.prisma",prolog:"source.prolog",proto:"source.proto",pug:"text.pug",jade:"text.pug",puppet:"source.puppet",purescript:"source.purescript",python:"source.python",py:"source.python",r:"source.r",raku:"source.perl.6",perl6:"source.perl.6",razor:"text.aspnetcorerazor",reg:"source.reg",rel:"source.rel",riscv:"source.riscv",rst:"source.rst",ruby:"source.ruby",rb:"source.ruby",rust:"source.rust",rs:"source.rust",sas:"source.sas",sass:"source.sass",scala:"source.scala",scheme:"source.scheme",scss:"source.css.scss",shaderlab:"source.shaderlab",shader:"source.shaderlab",shellscript:"source.shell",bash:"source.shell",console:"source.shell",sh:"source.shell",shell:"source.shell",zsh:"source.shell",shellsession:"text.shell-session",smalltalk:"source.smalltalk",solidity:"source.solidity",sparql:"source.sparql",sql:"source.sql","ssh-config":"source.ssh-config",stata:"source.stata",stylus:"source.stylus",styl:"source.stylus",svelte:"source.svelte",swift:"source.swift","system-verilog":"source.systemverilog",tasl:"source.tasl",tcl:"source.tcl",tex:"text.tex",toml:"source.toml",tsx:"source.tsx",turtle:"source.turtle",twig:"text.html.twig",txt:"source.txt",typescript:"source.ts",ts:"source.ts",v:"source.v",vb:"source.asp.vb.net",cmd:"source.asp.vb.net",verilog:"source.verilog",vhdl:"source.vhdl",viml:"source.viml",vim:"source.viml",vimscript:"source.viml","vue-html":"text.html.vue-html",vue:"source.vue",vyper:"source.vyper",wasm:"source.wat",wenyan:"source.wenyan","文言":"source.wenyan",wgsl:"source.wgsl",wolfram:"source.wolfram",xml:"text.xml",xsl:"text.xml.xsl",yaml:"source.yaml",yml:"source.yaml",zenscript:"source.zenscript"},n={"source.abap":{id:"abap",path:"abap.tmLanguage.json",embeddedScopes:[]},"source.actionscript.3":{id:"actionscript-3",path:"actionscript-3.tmLanguage.json",embeddedScopes:[]},"source.ada":{id:"ada",path:"ada.tmLanguage.json",embeddedScopes:[]},"source.apacheconf":{id:"apache",path:"apache.tmLanguage.json",embeddedScopes:[]},"source.apex":{id:"apex",path:"apex.tmLanguage.json",embeddedScopes:[]},"source.apl":{id:"apl",path:"apl.tmLanguage.json",embeddedScopes:["source.java","source.json","source.js","source.css","text.xml","text.html.basic"]},"source.applescript":{id:"applescript",path:"applescript.tmLanguage.json",embeddedScopes:[]},"source.ara":{id:"ara",path:"ara.tmLanguage.json",embeddedScopes:[]},"source.asm.x86_64":{id:"asm",path:"asm.tmLanguage.json",embeddedScopes:[]},"source.astro":{id:"astro",path:"astro.tmLanguage.json",embeddedScopes:["source.tsx","source.css.postcss","source.css.less","source.css.scss","source.css","source.sass","source.stylus","source.ts","source.js","source.json"]},"source.awk":{id:"awk",path:"awk.tmLanguage.json",embeddedScopes:[]},"source.ballerina":{id:"ballerina",path:"ballerina.tmLanguage.json",embeddedScopes:[]},"source.batchfile":{id:"bat",path:"bat.tmLanguage.json",embeddedScopes:[]},"text.beancount":{id:"beancount",path:"beancount.tmLanguage.json",embeddedScopes:[]},"source.berry":{id:"berry",path:"berry.tmLanguage.json",embeddedScopes:[]},"text.bibtex":{id:"bibtex",path:"bibtex.tmLanguage.json",embeddedScopes:[]},"source.bicep":{id:"bicep",path:"bicep.tmLanguage.json",embeddedScopes:[]},"text.html.php.blade":{id:"blade",path:"blade.tmLanguage.json",embeddedScopes:["source.java","source.css","source.json","source.js","source.sql","text.xml","text.html.basic"]},"source.c":{id:"c",path:"c.tmLanguage.json",embeddedScopes:[]},"source.cadence":{id:"cadence",path:"cadence.tmLanguage.json",embeddedScopes:[]},"source.clar":{id:"clarity",path:"clarity.tmLanguage.json",embeddedScopes:[]},"source.clojure":{id:"clojure",path:"clojure.tmLanguage.json",embeddedScopes:[]},"source.cmake":{id:"cmake",path:"cmake.tmLanguage.json",embeddedScopes:[]},"source.cobol":{id:"cobol",path:"cobol.tmLanguage.json",embeddedScopes:["source.css","source.js","source.java","text.html.basic","source.sql"]},"source.ql":{id:"codeql",path:"codeql.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.stylus","source.sass","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.tsx","source.ts","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.css.scss","source.swift","source.objc","source.css.less","source.json.comments","source.json","source.js","text.pug","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.coffee","source.clojure","source.batchfile","source.yaml","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","text.html.basic","source.css","text.html.markdown"]},"source.coffee":{id:"coffee",path:"coffee.tmLanguage.json",embeddedScopes:["source.js"]},"source.cpp":{id:"cpp",path:"cpp.tmLanguage.json",embeddedScopes:["source.c","source.sql","source.glsl"]},"source.crystal":{id:"crystal",path:"crystal.tmLanguage.json",embeddedScopes:["source.shell","source.js","source.c","source.css","source.sql","text.html.basic"]},"source.cs":{id:"csharp",path:"csharp.tmLanguage.json",embeddedScopes:[]},"source.css":{id:"css",path:"css.tmLanguage.json",embeddedScopes:[]},"source.cue":{id:"cue",path:"cue.tmLanguage.json",embeddedScopes:[]},"source.cypher":{id:"cypher",path:"cypher.tmLanguage.json",embeddedScopes:[]},"source.d":{id:"d",path:"d.tmLanguage.json",embeddedScopes:[]},"source.dart":{id:"dart",path:"dart.tmLanguage.json",embeddedScopes:[]},"source.dax":{id:"dax",path:"dax.tmLanguage.json",embeddedScopes:[]},"source.diff":{id:"diff",path:"diff.tmLanguage.json",embeddedScopes:[]},"source.dockerfile":{id:"docker",path:"docker.tmLanguage.json",embeddedScopes:[]},"source.dm":{id:"dream-maker",path:"dream-maker.tmLanguage.json",embeddedScopes:[]},"source.elixir":{id:"elixir",path:"elixir.tmLanguage.json",embeddedScopes:["source.css","source.js","text.html.basic"]},"source.elm":{id:"elm",path:"elm.tmLanguage.json",embeddedScopes:["source.c","source.glsl"]},"text.html.erb":{id:"erb",path:"erb.tmLanguage.json",embeddedScopes:["source.java","source.lua","source.shell","source.c","source.sql","text.xml","source.css","source.js","source.ruby","text.html.basic"]},"source.erlang":{id:"erlang",path:"erlang.tmLanguage.json",embeddedScopes:[]},"source.fish":{id:"fish",path:"fish.tmLanguage.json",embeddedScopes:[]},"source.fsharp":{id:"fsharp",path:"fsharp.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.stylus","source.sass","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.cs","source.tsx","source.ts","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.css.scss","source.swift","source.objc","source.css.less","source.json.comments","source.json","source.js","text.pug","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.coffee","source.clojure","source.batchfile","source.yaml","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","text.html.basic","source.css","text.html.markdown"]},"source.gdresource":{id:"gdresource",path:"gdresource.tmLanguage.json",embeddedScopes:["source.gdscript","source.gdshader"]},"source.gdscript":{id:"gdscript",path:"gdscript.tmLanguage.json",embeddedScopes:[]},"source.gdshader":{id:"gdshader",path:"gdshader.tmLanguage.json",embeddedScopes:[]},"text.gherkin.feature":{id:"gherkin",path:"gherkin.tmLanguage.json",embeddedScopes:[]},"text.git-commit":{id:"git-commit",path:"git-commit.tmLanguage.json",embeddedScopes:["source.diff"]},"text.git-rebase":{id:"git-rebase",path:"git-rebase.tmLanguage.json",embeddedScopes:["source.shell"]},"source.gjs":{id:"glimmer-js",path:"glimmer-js.tmLanguage.json",embeddedScopes:["source.yaml","source.css","text.html.basic","text.html.handlebars","source.js"]},"source.gts":{id:"glimmer-ts",path:"glimmer-ts.tmLanguage.json",embeddedScopes:["source.yaml","source.js","source.css","text.html.basic","text.html.handlebars","source.ts"]},"source.glsl":{id:"glsl",path:"glsl.tmLanguage.json",embeddedScopes:["source.c"]},"source.gnuplot":{id:"gnuplot",path:"gnuplot.tmLanguage.json",embeddedScopes:[]},"source.go":{id:"go",path:"go.tmLanguage.json",embeddedScopes:[]},"source.graphql":{id:"graphql",path:"graphql.tmLanguage.json",embeddedScopes:["source.tsx","source.js.jsx","source.ts","source.js"]},"source.groovy":{id:"groovy",path:"groovy.tmLanguage.json",embeddedScopes:[]},"source.hack":{id:"hack",path:"hack.tmLanguage.json",embeddedScopes:["source.css","source.js","source.sql","text.html.basic"]},"text.haml":{id:"haml",path:"haml.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.stylus","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.tsx","source.ts","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.css.scss","source.swift","source.objc","source.css.less","source.json.comments","source.json","text.pug","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.clojure","source.batchfile","source.yaml","text.xml.xsl","source.asp.vb.net","source.php","source.r","source.perl","source.makefile","source.java","source.ini","source.lua","source.shell","source.c","source.sql","text.xml","text.html.basic","source.css","text.html.markdown","source.coffee","source.sass","source.js","source.ruby"]},"text.html.handlebars":{id:"handlebars",path:"handlebars.tmLanguage.json",embeddedScopes:["source.yaml","source.js","source.css","text.html.basic"]},"source.haskell":{id:"haskell",path:"haskell.tmLanguage.json",embeddedScopes:[]},"source.hcl":{id:"hcl",path:"hcl.tmLanguage.json",embeddedScopes:[]},"source.hjson":{id:"hjson",path:"hjson.tmLanguage.json",embeddedScopes:[]},"source.hlsl":{id:"hlsl",path:"hlsl.tmLanguage.json",embeddedScopes:[]},"text.html.basic":{id:"html",path:"html.tmLanguage.json",embeddedScopes:["source.css","source.js"]},"source.http":{id:"http",path:"http.tmLanguage.json",embeddedScopes:["source.tsx","source.js.jsx","source.ts","source.js","source.java","source.graphql","text.xml","source.json","source.shell"]},"source.imba":{id:"imba",path:"imba.tmLanguage.json",embeddedScopes:[]},"source.ini":{id:"ini",path:"ini.tmLanguage.json",embeddedScopes:[]},"source.java":{id:"java",path:"java.tmLanguage.json",embeddedScopes:[]},"source.js":{id:"javascript",path:"javascript.tmLanguage.json",embeddedScopes:[]},"text.html.jinja":{id:"jinja-html",path:"jinja-html.tmLanguage.json",embeddedScopes:["source.css","source.js","text.html.basic"]},"source.jison":{id:"jison",path:"jison.tmLanguage.json",embeddedScopes:["source.js"]},"source.json":{id:"json",path:"json.tmLanguage.json",embeddedScopes:[]},"source.json5":{id:"json5",path:"json5.tmLanguage.json",embeddedScopes:[]},"source.json.comments":{id:"jsonc",path:"jsonc.tmLanguage.json",embeddedScopes:[]},"source.json.lines":{id:"jsonl",path:"jsonl.tmLanguage.json",embeddedScopes:[]},"source.jsonnet":{id:"jsonnet",path:"jsonnet.tmLanguage.json",embeddedScopes:[]},"source.jssm":{id:"jssm",path:"jssm.tmLanguage.json",embeddedScopes:[]},"source.js.jsx":{id:"jsx",path:"jsx.tmLanguage.json",embeddedScopes:[]},"source.julia":{id:"julia",path:"julia.tmLanguage.json",embeddedScopes:["source.c","source.glsl","source.sql","source.r","source.js","source.python","source.cpp"]},"source.kotlin":{id:"kotlin",path:"kotlin.tmLanguage.json",embeddedScopes:[]},"source.kusto":{id:"kusto",path:"kusto.tmLanguage.json",embeddedScopes:[]},"text.tex.latex":{id:"latex",path:"latex.tmLanguage.json",embeddedScopes:["source.glsl","source.shell","source.sql","source.cpp","source.c","source.r","source.gnuplot","source.scala","source.rust","source.yaml","source.python","source.ts","source.js","source.ruby","source.julia","source.lua","source.java","text.xml","text.html.basic","source.haskell","source.css","text.tex"]},"source.css.less":{id:"less",path:"less.tmLanguage.json",embeddedScopes:["source.css"]},"text.html.liquid":{id:"liquid",path:"liquid.tmLanguage.json",embeddedScopes:["source.js","source.json","source.css","text.html.basic"]},"source.lisp":{id:"lisp",path:"lisp.tmLanguage.json",embeddedScopes:[]},"source.logo":{id:"logo",path:"logo.tmLanguage.json",embeddedScopes:[]},"source.lua":{id:"lua",path:"lua.tmLanguage.json",embeddedScopes:["source.c"]},"source.makefile":{id:"make",path:"make.tmLanguage.json",embeddedScopes:[]},"text.html.markdown":{id:"markdown",path:"markdown.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.stylus","source.sass","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.tsx","source.ts","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.css.scss","source.swift","source.objc","source.css.less","source.json.comments","source.json","source.js","text.pug","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.coffee","source.clojure","source.batchfile","source.yaml","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","text.html.basic","source.css"]},"text.marko":{id:"marko",path:"marko.tmLanguage.json",embeddedScopes:["source.js","source.css.scss","source.css.less","source.css"]},"source.matlab":{id:"matlab",path:"matlab.tmLanguage.json",embeddedScopes:[]},"source.mdx":{id:"mdx",path:"mdx.tmLanguage.json",embeddedScopes:["source.gnuplot","text.tex","source.stylus","source.sass","text.bibtex","text.tex.latex","text.html.handlebars","source.dart","source.fsharp","source.powershell","source.perl.6","source.json.comments","text.pug","source.groovy","text.git-rebase","text.git-commit","source.batchfile","text.xml.xsl","source.asp.vb.net","source.php","source.js.jsx","source.glsl","source.ts","source.swift","text.xml","source.sql","text.shell-session","source.shell","source.css.scss","source.scala","source.rust","source.ruby","source.r","source.python","source.perl","source.objc","text.html.markdown","source.makefile","source.lua","source.css.less","source.kotlin","source.julia","source.json","source.js","source.java","source.ini","text.html.basic","source.haskell","source.graphql","source.go","source.erlang","source.elm","source.elixir","source.dockerfile","source.diff","source.css","source.cs","source.cpp","source.coffee","source.clojure","source.c","source.yaml","source.toml","source.tsx"]},"source.mermaid":{id:"mermaid",path:"mermaid.tmLanguage.json",embeddedScopes:[]},"source.narrat":{id:"narrat",path:"narrat.tmLanguage.json",embeddedScopes:[]},"source.nextflow":{id:"nextflow",path:"nextflow.tmLanguage.json",embeddedScopes:[]},"source.nginx":{id:"nginx",path:"nginx.tmLanguage.json",embeddedScopes:["source.c","source.lua"]},"source.nim":{id:"nim",path:"nim.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.stylus","source.sass","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.tsx","source.ts","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.css.scss","source.swift","source.objc","source.css.less","source.json.comments","source.json","text.pug","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.coffee","source.clojure","source.batchfile","source.yaml","text.xml.xsl","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.ini","source.java","text.html.markdown","source.glsl","source.css","source.js","text.xml","text.html.basic","source.c"]},"source.nix":{id:"nix",path:"nix.tmLanguage.json",embeddedScopes:[]},"source.objc":{id:"objective-c",path:"objective-c.tmLanguage.json",embeddedScopes:[]},"source.objcpp":{id:"objective-cpp",path:"objective-cpp.tmLanguage.json",embeddedScopes:[]},"source.ocaml":{id:"ocaml",path:"ocaml.tmLanguage.json",embeddedScopes:[]},"source.pascal":{id:"pascal",path:"pascal.tmLanguage.json",embeddedScopes:[]},"source.perl":{id:"perl",path:"perl.tmLanguage.json",embeddedScopes:["source.java","source.sql","source.js","source.css","text.xml","text.html.basic"]},"source.php":{id:"php",path:"php.tmLanguage.json",embeddedScopes:["source.java","source.css","source.json","source.js","source.sql","text.xml","text.html.basic"]},"source.plsql.oracle":{id:"plsql",path:"plsql.tmLanguage.json",embeddedScopes:[]},"source.css.postcss":{id:"postcss",path:"postcss.tmLanguage.json",embeddedScopes:[]},"source.powerquery":{id:"powerquery",path:"powerquery.tmLanguage.json",embeddedScopes:[]},"source.powershell":{id:"powershell",path:"powershell.tmLanguage.json",embeddedScopes:[]},"source.prisma":{id:"prisma",path:"prisma.tmLanguage.json",embeddedScopes:[]},"source.prolog":{id:"prolog",path:"prolog.tmLanguage.json",embeddedScopes:[]},"source.proto":{id:"proto",path:"proto.tmLanguage.json",embeddedScopes:[]},"text.pug":{id:"pug",path:"pug.tmLanguage.json",embeddedScopes:["text.html.basic","source.coffee","source.stylus","source.css.scss","source.sass","source.css","source.js"]},"source.puppet":{id:"puppet",path:"puppet.tmLanguage.json",embeddedScopes:[]},"source.purescript":{id:"purescript",path:"purescript.tmLanguage.json",embeddedScopes:[]},"source.python":{id:"python",path:"python.tmLanguage.json",embeddedScopes:[]},"source.r":{id:"r",path:"r.tmLanguage.json",embeddedScopes:[]},"source.perl.6":{id:"raku",path:"raku.tmLanguage.json",embeddedScopes:[]},"text.aspnetcorerazor":{id:"razor",path:"razor.tmLanguage.json",embeddedScopes:["source.css","source.js","source.cs","text.html.basic"]},"source.reg":{id:"reg",path:"reg.tmLanguage.json",embeddedScopes:[]},"source.rel":{id:"rel",path:"rel.tmLanguage.json",embeddedScopes:[]},"source.riscv":{id:"riscv",path:"riscv.tmLanguage.json",embeddedScopes:[]},"source.rst":{id:"rst",path:"rst.tmLanguage.json",embeddedScopes:["source.java","source.lua","source.c","source.css","text.xml","text.html.basic","source.sql","source.glsl","source.ruby","source.cmake","source.yaml","source.shell","source.js","source.python","source.cpp"]},"source.ruby":{id:"ruby",path:"ruby.tmLanguage.json",embeddedScopes:["source.java","source.lua","source.shell","source.js","source.c","source.css","source.sql","text.xml","text.html.basic"]},"source.rust":{id:"rust",path:"rust.tmLanguage.json",embeddedScopes:[]},"source.sas":{id:"sas",path:"sas.tmLanguage.json",embeddedScopes:["source.sql"]},"source.sass":{id:"sass",path:"sass.tmLanguage.json",embeddedScopes:[]},"source.scala":{id:"scala",path:"scala.tmLanguage.json",embeddedScopes:[]},"source.scheme":{id:"scheme",path:"scheme.tmLanguage.json",embeddedScopes:[]},"source.css.scss":{id:"scss",path:"scss.tmLanguage.json",embeddedScopes:["source.css"]},"source.shaderlab":{id:"shaderlab",path:"shaderlab.tmLanguage.json",embeddedScopes:["source.hlsl"]},"source.shell":{id:"shellscript",path:"shellscript.tmLanguage.json",embeddedScopes:[]},"text.shell-session":{id:"shellsession",path:"shellsession.tmLanguage.json",embeddedScopes:["source.shell"]},"source.smalltalk":{id:"smalltalk",path:"smalltalk.tmLanguage.json",embeddedScopes:[]},"source.solidity":{id:"solidity",path:"solidity.tmLanguage.json",embeddedScopes:[]},"source.sparql":{id:"sparql",path:"sparql.tmLanguage.json",embeddedScopes:["source.turtle"]},"source.sql":{id:"sql",path:"sql.tmLanguage.json",embeddedScopes:[]},"source.ssh-config":{id:"ssh-config",path:"ssh-config.tmLanguage.json",embeddedScopes:[]},"source.stata":{id:"stata",path:"stata.tmLanguage.json",embeddedScopes:["source.sql"]},"source.stylus":{id:"stylus",path:"stylus.tmLanguage.json",embeddedScopes:[]},"source.svelte":{id:"svelte",path:"svelte.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.tsx","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.swift","source.objc","source.json.comments","source.json","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.clojure","source.batchfile","source.yaml","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","text.html.basic","text.html.markdown","text.pug","source.css.postcss","source.css.less","source.css.scss","source.css","source.sass","source.stylus","source.coffee","source.ts","source.js"]},"source.swift":{id:"swift",path:"swift.tmLanguage.json",embeddedScopes:[]},"source.systemverilog":{id:"system-verilog",path:"system-verilog.tmLanguage.json",embeddedScopes:[]},"source.tasl":{id:"tasl",path:"tasl.tmLanguage.json",embeddedScopes:[]},"source.tcl":{id:"tcl",path:"tcl.tmLanguage.json",embeddedScopes:[]},"text.tex":{id:"tex",path:"tex.tmLanguage.json",embeddedScopes:["source.r"]},"source.toml":{id:"toml",path:"toml.tmLanguage.json",embeddedScopes:[]},"source.tsx":{id:"tsx",path:"tsx.tmLanguage.json",embeddedScopes:[]},"source.turtle":{id:"turtle",path:"turtle.tmLanguage.json",embeddedScopes:[]},"text.html.twig":{id:"twig",path:"twig.tmLanguage.json",embeddedScopes:["source.java","source.lua","source.shell","source.c","source.json","source.sql","text.xml","text.html.basic","source.ruby","source.python","source.php","source.js","source.css"]},"source.txt":{id:"txt",path:"txt.tmLanguage.json",embeddedScopes:[]},"source.ts":{id:"typescript",path:"typescript.tmLanguage.json",embeddedScopes:[]},"source.v":{id:"v",path:"v.tmLanguage.json",embeddedScopes:[]},"source.asp.vb.net":{id:"vb",path:"vb.tmLanguage.json",embeddedScopes:[]},"source.verilog":{id:"verilog",path:"verilog.tmLanguage.json",embeddedScopes:[]},"source.vhdl":{id:"vhdl",path:"vhdl.tmLanguage.json",embeddedScopes:[]},"source.viml":{id:"viml",path:"viml.tmLanguage.json",embeddedScopes:[]},"text.html.vue-html":{id:"vue-html",path:"vue-html.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.swift","source.objc","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.coffee","source.clojure","source.batchfile","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","source.graphql","source.toml","source.yaml","source.json5","source.json.comments","source.json","source.tsx","source.js.jsx","source.ts","source.css.less","source.css.scss","source.css","source.sass","source.stylus","text.pug","text.html.markdown","text.html.basic","source.js","source.vue"]},"source.vue":{id:"vue",path:"vue.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.swift","source.objc","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.coffee","source.clojure","source.batchfile","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","source.graphql","source.toml","source.yaml","source.json5","source.json.comments","source.json","source.tsx","source.js.jsx","source.ts","source.js","source.css.less","source.css.scss","source.css","source.sass","source.stylus","text.pug","text.html.markdown","text.html.basic"]},"source.vyper":{id:"vyper",path:"vyper.tmLanguage.json",embeddedScopes:[]},"source.wat":{id:"wasm",path:"wasm.tmLanguage.json",embeddedScopes:[]},"source.wenyan":{id:"wenyan",path:"wenyan.tmLanguage.json",embeddedScopes:[]},"source.wgsl":{id:"wgsl",path:"wgsl.tmLanguage.json",embeddedScopes:[]},"source.wolfram":{id:"wolfram",path:"wolfram.tmLanguage.json",embeddedScopes:[]},"text.xml":{id:"xml",path:"xml.tmLanguage.json",embeddedScopes:["source.java"]},"text.xml.xsl":{id:"xsl",path:"xsl.tmLanguage.json",embeddedScopes:["source.java","text.xml"]},"source.yaml":{id:"yaml",path:"yaml.tmLanguage.json",embeddedScopes:[]},"source.zenscript":{id:"zenscript",path:"zenscript.tmLanguage.json",embeddedScopes:[]}};var r={d:(A,B)=>{for(var Q in B)r.o(B,Q)&&!r.o(A,Q)&&Object.defineProperty(A,Q,{enumerable:!0,get:B[Q]})},o:(A,B)=>Object.prototype.hasOwnProperty.call(A,B)},N={};r.d(N,{_X:()=>XA,Bz:()=>TA,ot:()=>WA,u:()=>bA,jG:()=>K,Pn:()=>vA});const L="undefined"!=typeof process&&!!process.env.VSCODE_TEXTMATE_DEBUG;var H;function k(A,B){const Q=[],g=function(A){let B=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,Q=B.exec(A);return{next:()=>{if(!Q)return null;const g=Q[0];return Q=B.exec(A),g}}}(A);let E=g.next();for(;null!==E;){let A=0;if(2===E.length&&":"===E.charAt(1)){switch(E.charAt(0)){case"R":A=1;break;case"L":A=-1;break;default:console.log(`Unknown priority ${E} in scope selector`)}E=g.next()}let B=I();if(Q.push({matcher:B,priority:A}),","!==E)break;E=g.next()}return Q;function C(){if("-"===E){E=g.next();const A=C();return B=>!!A&&!A(B)}if("("===E){E=g.next();const A=function(){const A=[];let B=I();for(;B&&(A.push(B),"|"===E||","===E);){do{E=g.next()}while("|"===E||","===E);B=I()}return B=>A.some((A=>A(B)))}();return")"===E&&(E=g.next()),A}if(R(E)){const A=[];do{A.push(E),E=g.next()}while(R(E));return Q=>B(A,Q)}return null}function I(){const A=[];let B=C();for(;B;)A.push(B),B=C();return B=>A.every((A=>A(B)))}}function R(A){return!!A&&!!A.match(/[\w\.:]+/)}function K(A){"function"==typeof A.dispose&&A.dispose()}function Y(A){return Array.isArray(A)?function(A){let B=[];for(let Q=0,g=A.length;Q{for(let Q in B)A[Q]=B[Q]})),A}function P(A){const B=~A.lastIndexOf("/")||~A.lastIndexOf("\\");return 0===B?A:~B==A.length-1?P(A.substring(0,A.length-1)):A.substr(1+~B)}!function(A){A.toBinaryStr=function(A){let B=A.toString(2);for(;B.length<32;)B="0"+B;return B},A.print=function(B){const Q=A.getLanguageId(B),g=A.getTokenType(B),E=A.getFontStyle(B),C=A.getForeground(B),I=A.getBackground(B);console.log({languageId:Q,tokenType:g,fontStyle:E,foreground:C,background:I})},A.getLanguageId=function(A){return(255&A)>>>0},A.getTokenType=function(A){return(768&A)>>>8},A.containsBalancedBrackets=function(A){return 0!=(1024&A)},A.getFontStyle=function(A){return(30720&A)>>>11},A.getForeground=function(A){return(16744448&A)>>>15},A.getBackground=function(A){return(4278190080&A)>>>24},A.set=function(B,Q,g,E,C,I,D){let w=A.getLanguageId(B),o=A.getTokenType(B),s=A.containsBalancedBrackets(B)?1:0,e=A.getFontStyle(B),c=A.getForeground(B),i=A.getBackground(B);return 0!==Q&&(w=Q),8!==g&&(o=g),null!==E&&(s=E?1:0),-1!==C&&(e=C),0!==I&&(c=I),0!==D&&(i=D),(w<<0|o<<8|s<<10|e<<11|c<<15|i<<24)>>>0}}(H||(H={}));let u=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g;class J{static hasCaptures(A){return null!==A&&(u.lastIndex=0,u.test(A))}static replaceCaptures(A,B,Q){return A.replace(u,((A,g,E,C)=>{let I=Q[parseInt(g||E,10)];if(!I)return A;{let A=B.substring(I.start,I.end);for(;"."===A[0];)A=A.substring(1);switch(C){case"downcase":return A.toLowerCase();case"upcase":return A.toUpperCase();default:return A}}}))}}function y(A,B){return AB?1:0}function S(A,B){if(null===A&&null===B)return 0;if(!A)return-1;if(!B)return 1;let Q=A.length,g=B.length;if(Q===g){for(let g=0;g`);return}const C=Q.lookup(B);A instanceof f?T({baseGrammar:C,selfGrammar:E},g):W(A.ruleName,{baseGrammar:C,selfGrammar:E,repository:E.repository},g);const I=Q.injections(A.scopeName);if(I)for(const A of I)g.add(new f(A))}function W(A,B,Q){B.repository&&B.repository[A]&&X([B.repository[A]],B,Q)}function T(A,B){A.selfGrammar.patterns&&Array.isArray(A.selfGrammar.patterns)&&X(A.selfGrammar.patterns,{...A,repository:A.selfGrammar.repository},B),A.selfGrammar.injections&&X(Object.values(A.selfGrammar.injections),{...A,repository:A.selfGrammar.repository},B)}function X(A,B,Q){for(const g of A){if(Q.visitedRule.has(g))continue;Q.visitedRule.add(g);const A=g.repository?U({},B.repository,g.repository):B.repository;Array.isArray(g.patterns)&&X(g.patterns,{...B,repository:A},Q);const E=g.include;if(!E)continue;const C=_(E);switch(C.kind){case 0:T({...B,selfGrammar:B.baseGrammar},Q);break;case 1:T(B,Q);break;case 2:W(C.ruleName,{...B,repository:A},Q);break;case 3:case 4:const g=C.scopeName===B.selfGrammar.scopeName?B.selfGrammar:C.scopeName===B.baseGrammar.scopeName?B.baseGrammar:void 0;if(g){const E={baseGrammar:B.baseGrammar,selfGrammar:g,repository:A};4===C.kind?W(C.ruleName,E,Q):T(E,Q)}else 4===C.kind?Q.add(new m(C.scopeName,C.ruleName)):Q.add(new f(C.scopeName))}}}class v{constructor(){this.kind=0}}class Z{constructor(){this.kind=1}}class j{constructor(A){this.ruleName=A,this.kind=2}}class V{constructor(A){this.scopeName=A,this.kind=3}}class z{constructor(A,B){this.scopeName=A,this.ruleName=B,this.kind=4}}function _(A){if("$base"===A)return new v;if("$self"===A)return new Z;const B=A.indexOf("#");if(-1===B)return new V(A);if(0===B)return new j(A.substring(1));{const Q=A.substring(0,B),g=A.substring(B+1);return new z(Q,g)}}const $=/\\(\d+)/,AA=/\\(\d+)/g;class BA{constructor(A,B,Q,g){this.$location=A,this.id=B,this._name=Q||null,this._nameIsCapturing=J.hasCaptures(this._name),this._contentName=g||null,this._contentNameIsCapturing=J.hasCaptures(this._contentName)}get debugName(){const A=this.$location?`${P(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${A}`}getName(A,B){return this._nameIsCapturing&&null!==this._name&&null!==A&&null!==B?J.replaceCaptures(this._name,A,B):this._name}getContentName(A,B){return this._contentNameIsCapturing&&null!==this._contentName?J.replaceCaptures(this._contentName,A,B):this._contentName}}class QA extends BA{constructor(A,B,Q,g,E){super(A,B,Q,g),this.retokenizeCapturedWithRuleId=E}dispose(){}collectPatterns(A,B){throw new Error("Not supported!")}compile(A,B){throw new Error("Not supported!")}compileAG(A,B,Q,g){throw new Error("Not supported!")}}class gA extends BA{constructor(A,B,Q,g,E){super(A,B,Q,null),this._match=new wA(g,this.id),this.captures=E,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(A,B){B.push(this._match)}compile(A,B){return this._getCachedCompiledPatterns(A).compile(A)}compileAG(A,B,Q,g){return this._getCachedCompiledPatterns(A).compileAG(A,Q,g)}_getCachedCompiledPatterns(A){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new oA,this.collectPatterns(A,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}}class EA extends BA{constructor(A,B,Q,g,E){super(A,B,Q,g),this.patterns=E.patterns,this.hasMissingPatterns=E.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(A,B){for(const Q of this.patterns)A.getRule(Q).collectPatterns(A,B)}compile(A,B){return this._getCachedCompiledPatterns(A).compile(A)}compileAG(A,B,Q,g){return this._getCachedCompiledPatterns(A).compileAG(A,Q,g)}_getCachedCompiledPatterns(A){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new oA,this.collectPatterns(A,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}}class CA extends BA{constructor(A,B,Q,g,E,C,I,D,w,o){super(A,B,Q,g),this._begin=new wA(E,this.id),this.beginCaptures=C,this._end=new wA(I||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=D,this.applyEndPatternLast=w||!1,this.patterns=o.patterns,this.hasMissingPatterns=o.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(A,B){return this._end.resolveBackReferences(A,B)}collectPatterns(A,B){B.push(this._begin)}compile(A,B){return this._getCachedCompiledPatterns(A,B).compile(A)}compileAG(A,B,Q,g){return this._getCachedCompiledPatterns(A,B).compileAG(A,Q,g)}_getCachedCompiledPatterns(A,B){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new oA;for(const B of this.patterns)A.getRule(B).collectPatterns(A,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,B):this._cachedCompiledPatterns.setSource(0,B)),this._cachedCompiledPatterns}}class IA extends BA{constructor(A,B,Q,g,E,C,I,D,w){super(A,B,Q,g),this._begin=new wA(E,this.id),this.beginCaptures=C,this.whileCaptures=D,this._while=new wA(I,-2),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=w.patterns,this.hasMissingPatterns=w.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(A,B){return this._while.resolveBackReferences(A,B)}collectPatterns(A,B){B.push(this._begin)}compile(A,B){return this._getCachedCompiledPatterns(A).compile(A)}compileAG(A,B,Q,g){return this._getCachedCompiledPatterns(A).compileAG(A,Q,g)}_getCachedCompiledPatterns(A){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new oA;for(const B of this.patterns)A.getRule(B).collectPatterns(A,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(A,B){return this._getCachedCompiledWhilePatterns(A,B).compile(A)}compileWhileAG(A,B,Q,g){return this._getCachedCompiledWhilePatterns(A,B).compileAG(A,Q,g)}_getCachedCompiledWhilePatterns(A,B){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new oA,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,B||"￿"),this._cachedCompiledWhilePatterns}}class DA{static createCaptureRule(A,B,Q,g,E){return A.registerRule((A=>new QA(B,A,Q,g,E)))}static getCompiledRuleId(A,B,Q){return A.id||B.registerRule((g=>{if(A.id=g,A.match)return new gA(A.$vscodeTextmateLocation,A.id,A.name,A.match,DA._compileCaptures(A.captures,B,Q));if(void 0===A.begin){A.repository&&(Q=U({},Q,A.repository));let g=A.patterns;return void 0===g&&A.include&&(g=[{include:A.include}]),new EA(A.$vscodeTextmateLocation,A.id,A.name,A.contentName,DA._compilePatterns(g,B,Q))}return A.while?new IA(A.$vscodeTextmateLocation,A.id,A.name,A.contentName,A.begin,DA._compileCaptures(A.beginCaptures||A.captures,B,Q),A.while,DA._compileCaptures(A.whileCaptures||A.captures,B,Q),DA._compilePatterns(A.patterns,B,Q)):new CA(A.$vscodeTextmateLocation,A.id,A.name,A.contentName,A.begin,DA._compileCaptures(A.beginCaptures||A.captures,B,Q),A.end,DA._compileCaptures(A.endCaptures||A.captures,B,Q),A.applyEndPatternLast,DA._compilePatterns(A.patterns,B,Q))})),A.id}static _compileCaptures(A,B,Q){let g=[];if(A){let E=0;for(const B in A){if("$vscodeTextmateLocation"===B)continue;const A=parseInt(B,10);A>E&&(E=A)}for(let A=0;A<=E;A++)g[A]=null;for(const E in A){if("$vscodeTextmateLocation"===E)continue;const C=parseInt(E,10);let I=0;A[E].patterns&&(I=DA.getCompiledRuleId(A[E],B,Q)),g[C]=DA.createCaptureRule(B,A[E].$vscodeTextmateLocation,A[E].name,A[E].contentName,I)}}return g}static _compilePatterns(A,B,Q){let g=[];if(A)for(let E=0,C=A.length;EA.substring(B.start,B.end)));return AA.lastIndex=0,this.source.replace(AA,((A,B)=>l(Q[parseInt(B,10)]||"")))}_buildAnchorCache(){let A,B,Q,g,E=[],C=[],I=[],D=[];for(A=0,B=this.source.length;AA.source));this._cached=new sA(A,B,this._items.map((A=>A.ruleId)))}return this._cached}compileAG(A,B,Q){return this._hasAnchors?B?Q?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(A,B,Q)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(A,B,Q)),this._anchorCache.A1_G0):Q?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(A,B,Q)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(A,B,Q)),this._anchorCache.A0_G0):this.compile(A)}_resolveAnchors(A,B,Q){let g=this._items.map((A=>A.resolveAnchors(B,Q)));return new sA(A,g,this._items.map((A=>A.ruleId)))}}class sA{constructor(A,B,Q){this.regExps=B,this.rules=Q,this.scanner=A.createOnigScanner(B)}dispose(){"function"==typeof this.scanner.dispose&&this.scanner.dispose()}toString(){const A=[];for(let B=0,Q=this.rules.length;Bthis._root.match(A)))}static createFromRawTheme(A,B){return this.createFromParsedTheme(function(A){if(!A)return[];if(!A.settings||!Array.isArray(A.settings))return[];let B=A.settings,Q=[],g=0;for(let A=0,E=B.length;A1&&(s=C.slice(0,C.length-1),s.reverse()),Q[g++]=new MA(o,s,A,I,D,w)}}return Q}(A),B)}static createFromParsedTheme(A,B){return function(A,B){A.sort(((A,B)=>{let Q=y(A.scope,B.scope);return 0!==Q?Q:(Q=S(A.parentScopes,B.parentScopes),0!==Q?Q:A.index-B.index)}));let Q=0,g="#000000",E="#ffffff";for(;A.length>=1&&""===A[0].scope;){let B=A.shift();-1!==B.fontStyle&&(Q=B.fontStyle),null!==B.foreground&&(g=B.foreground),null!==B.background&&(E=B.background)}let C=new hA(B),I=new tA(Q,C.getId(g),C.getId(E)),D=new FA(new aA(0,null,-1,0,0),[]);for(let B=0,Q=A.length;Bfunction(A,B){if(null===B)return!0;let Q=0,g=B[Q];for(;A;){if(iA(A.scopeName,g)){if(Q++,Q===B.length)return!0;g=B[Q]}A=A.parent}return!1}(A.parent,B.parentScopes)));return Q?new tA(Q.fontStyle,Q.foreground,Q.background):null}}class cA{constructor(A,B){this.parent=A,this.scopeName=B}static push(A,B){for(const Q of B)A=new cA(A,Q);return A}static from(...A){let B=null;for(let Q=0;QA?console.log("how did this happen?"):this.scopeDepth=A,-1!==B&&(this.fontStyle=B),0!==Q&&(this.foreground=Q),0!==g&&(this.background=g)}}class FA{constructor(A,B=[],Q={}){this._mainRule=A,this._children=Q,this._rulesWithParentScopes=B}static _sortBySpecificity(A){return 1===A.length||A.sort(this._cmpBySpecificity),A}static _cmpBySpecificity(A,B){if(A.scopeDepth===B.scopeDepth){const Q=A.parentScopes,g=B.parentScopes;let E=null===Q?0:Q.length,C=null===g?0:g.length;if(E===C)for(let A=0;A{const B=this._scopeToLanguage(A),Q=this._toStandardTokenType(A);return new GA(B,Q)})),this._defaultAttributes=new GA(A,8),this._embeddedLanguagesMatcher=new rA(Object.entries(B||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(A){return null===A?nA._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(A)}_scopeToLanguage(A){return this._embeddedLanguagesMatcher.match(A)||0}_toStandardTokenType(A){const B=A.match(nA.STANDARD_TOKEN_TYPE_REGEXP);if(!B)return 8;switch(B[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}}nA._NULL_SCOPE_METADATA=new GA(0,0),nA.STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/;class rA{constructor(A){if(0===A.length)this.values=null,this.scopesRegExp=null;else{this.values=new Map(A);const B=A.map((([A,B])=>l(A)));B.sort(),B.reverse(),this.scopesRegExp=new RegExp(`^((${B.join(")|(")}))($|\\.)`,"")}}match(A){if(!this.scopesRegExp)return;const B=A.match(this.scopesRegExp);return B?this.values.get(B[1]):void 0}}class NA{constructor(A,B){this.stack=A,this.stoppedEarly=B}}function LA(A,B,Q,g,E,C,I,D){const w=B.content.length;let o=!1,s=-1;if(I){const I=function(A,B,Q,g,E,C){let I=E.beginRuleCapturedEOL?0:-1;const D=[];for(let B=E;B;B=B.pop()){const Q=B.getRule(A);Q instanceof IA&&D.push({rule:Q,stack:B})}for(let w=D.pop();w;w=D.pop()){const{ruleScanner:D,findOptions:o}=kA(w.rule,A,w.stack.endRule,Q,g===I),s=D.findNextMatchSync(B,g,o);if(L&&(console.log(" scanning for while rule"),console.log(D.toString())),!s){L&&console.log(" popping "+w.rule.debugName+" - "+w.rule.debugWhileRegExp),E=w.stack.pop();break}if(-2!==s.ruleId){E=w.stack.pop();break}s.captureIndices&&s.captureIndices.length&&(C.produce(w.stack,s.captureIndices[0].start),RA(A,B,Q,w.stack,C,w.rule.whileCaptures,s.captureIndices),C.produce(w.stack,s.captureIndices[0].end),I=s.captureIndices[0].end,s.captureIndices[0].end>g&&(g=s.captureIndices[0].end,Q=!1))}return{stack:E,linePos:g,anchorPosition:I,isFirstLine:Q}}(A,B,Q,g,E,C);E=I.stack,g=I.linePos,Q=I.isFirstLine,s=I.anchorPosition}const e=Date.now();for(;!o;){if(0!==D&&Date.now()-e>D)return new NA(E,!0);c()}return new NA(E,!1);function c(){L&&(console.log(""),console.log(`@@scanNext ${g}: |${B.content.substr(g).replace(/\n$/,"\\n")}|`));const I=function(A,B,Q,g,E,C){const I=function(A,B,Q,g,E,C){const I=E.getRule(A),{ruleScanner:D,findOptions:w}=HA(I,A,E.endRule,Q,g===C);let o=0;L&&(o=x());const s=D.findNextMatchSync(B,g,w);if(L){const A=x()-o;A>5&&console.warn(`Rule ${I.debugName} (${I.id}) matching took ${A} against '${B}'`),console.log(` scanning for (linePos: ${g}, anchorPosition: ${C})`),console.log(D.toString()),s&&console.log(`matched rule id: ${s.ruleId} from ${s.captureIndices[0].start} to ${s.captureIndices[0].end}`)}return s?{captureIndices:s.captureIndices,matchedRuleId:s.ruleId}:null}(A,B,Q,g,E,C),D=A.getInjections();if(0===D.length)return I;const w=function(A,B,Q,g,E,C,I){let D,w=Number.MAX_VALUE,o=null,s=0;const e=C.contentNameScopesList.getScopeNames();for(let C=0,c=A.length;C=w)&&(w=a,o=h.captureIndices,D=h.ruleId,s=c.priority,w===E))break}return o?{priorityMatch:-1===s,captureIndices:o,matchedRuleId:D}:null}(D,A,B,Q,g,E,C);if(!w)return I;if(!I)return w;const o=I.captureIndices[0].start,s=w.captureIndices[0].start;return s0)&&D[0].end>g;if(-1===e){const I=E.getRule(A);L&&console.log(" popping "+I.debugName+" - "+I.debugEndRegExp),C.produce(E,D[0].start),E=E.withContentNameScopesList(E.nameScopesList),RA(A,B,Q,E,C,I.endCaptures,D),C.produce(E,D[0].end);const e=E;if(E=E.parent,s=e.getAnchorPos(),!c&&e.getEnterPos()===g)return L&&console.error("[1] - Grammar is in an endless loop - Grammar pushed & popped a rule without advancing"),E=e,C.produce(E,w),void(o=!0)}else{const I=A.getRule(e);C.produce(E,D[0].start);const i=E,t=I.getName(B.content,D),M=E.contentNameScopesList.pushAttributed(t,A);if(E=E.push(e,g,s,D[0].end===w,null,M,M),I instanceof CA){const g=I;L&&console.log(" pushing "+g.debugName+" - "+g.debugBeginRegExp),RA(A,B,Q,E,C,g.beginCaptures,D),C.produce(E,D[0].end),s=D[0].end;const e=g.getContentName(B.content,D),t=M.pushAttributed(e,A);if(E=E.withContentNameScopesList(t),g.endHasBackReferences&&(E=E.withEndRule(g.getEndWithResolvedBackReferences(B.content,D))),!c&&i.hasSameRuleAs(E))return L&&console.error("[2] - Grammar is in an endless loop - Grammar pushed the same rule without advancing"),E=E.pop(),C.produce(E,w),void(o=!0)}else if(I instanceof IA){const g=I;L&&console.log(" pushing "+g.debugName),RA(A,B,Q,E,C,g.beginCaptures,D),C.produce(E,D[0].end),s=D[0].end;const e=g.getContentName(B.content,D),t=M.pushAttributed(e,A);if(E=E.withContentNameScopesList(t),g.whileHasBackReferences&&(E=E.withEndRule(g.getWhileWithResolvedBackReferences(B.content,D))),!c&&i.hasSameRuleAs(E))return L&&console.error("[3] - Grammar is in an endless loop - Grammar pushed the same rule without advancing"),E=E.pop(),C.produce(E,w),void(o=!0)}else{const g=I;if(L&&console.log(" matched "+g.debugName+" - "+g.debugMatchRegExp),RA(A,B,Q,E,C,g.captures,D),C.produce(E,D[0].end),E=E.pop(),!c)return L&&console.error("[4] - Grammar is in an endless loop - Grammar is not advancing, nor is it pushing/popping"),E=E.safePop(),C.produce(E,w),void(o=!0)}}D[0].end>g&&(g=D[0].end,Q=!1)}}function HA(A,B,Q,g,E){return{ruleScanner:A.compileAG(B,Q,g,E),findOptions:0}}function kA(A,B,Q,g,E){return{ruleScanner:A.compileWhileAG(B,Q,g,E),findOptions:0}}function RA(A,B,Q,g,E,C,I){if(0===C.length)return;const D=B.content,w=Math.min(C.length,I.length),o=[],s=I[0].end;for(let B=0;Bs)break;for(;o.length>0&&o[o.length-1].endPos<=e.start;)E.produceFromScopes(o[o.length-1].scopes,o[o.length-1].endPos),o.pop();if(o.length>0?E.produceFromScopes(o[o.length-1].scopes,e.start):E.produce(g,e.start),w.retokenizeCapturedWithRuleId){const B=w.getName(D,I),C=g.contentNameScopesList.pushAttributed(B,A),o=w.getContentName(D,I),s=C.pushAttributed(o,A),c=g.push(w.retokenizeCapturedWithRuleId,e.start,-1,!1,null,C,s),i=A.createOnigString(D.substring(0,e.end));LA(A,i,Q&&0===e.start,e.start,c,E,!1,0),K(i);continue}const c=w.getName(D,I);if(null!==c){const B=(o.length>0?o[o.length-1].scopes:g.contentNameScopesList).pushAttributed(c,A);o.push(new KA(B,e.end))}}for(;o.length>0;)E.produceFromScopes(o[o.length-1].scopes,o[o.length-1].endPos),o.pop()}class KA{constructor(A,B){this.scopes=A,this.endPos=B}}function YA(A,B,Q,g,E){const C=k(B,UA),I=DA.getCompiledRuleId(Q,g,E.repository);for(const Q of C)A.push({debugSelector:B,matcher:Q.matcher,ruleId:I,grammar:E,priority:Q.priority})}function UA(A,B){if(B.length{for(let g=Q;gQ&&A.substr(0,Q)===B&&"."===A[Q]}class uA{constructor(A,B,Q,g,E,C,I,D){if(this._rootScopeName=A,this.balancedBracketSelectors=C,this._onigLib=D,this._basicScopeAttributesProvider=new nA(Q,g),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=I,this._grammar=JA(B,null),this._injections=null,this._tokenTypeMatchers=[],E)for(const A of Object.keys(E)){const B=k(A,UA);for(const Q of B)this._tokenTypeMatchers.push({matcher:Q.matcher,type:E[A]})}}get themeProvider(){return this._grammarRepository}dispose(){for(const A of this._ruleId2desc)A&&A.dispose()}createOnigScanner(A){return this._onigLib.createOnigScanner(A)}createOnigString(A){return this._onigLib.createOnigString(A)}getMetadataForScope(A){return this._basicScopeAttributesProvider.getBasicScopeAttributes(A)}_collectInjections(){const A=[],B=this._rootScopeName,Q=(A=>A===this._rootScopeName?this._grammar:this.getExternalGrammar(A))(B);if(Q){const g=Q.injections;if(g)for(let B in g)YA(A,B,g[B],this,Q);const E=this._grammarRepository.injections(B);E&&E.forEach((B=>{const Q=this.getExternalGrammar(B);if(Q){const B=Q.injectionSelector;B&&YA(A,B,Q,this,Q)}}))}return A.sort(((A,B)=>A.priority-B.priority)),A}getInjections(){if(null===this._injections&&(this._injections=this._collectInjections(),L&&this._injections.length>0)){console.log(`Grammar ${this._rootScopeName} contains the following injections:`);for(const A of this._injections)console.log(` - ${A.debugSelector}`)}return this._injections}registerRule(A){const B=++this._lastRuleId,Q=A(B);return this._ruleId2desc[B]=Q,Q}getRule(A){return this._ruleId2desc[A]}getExternalGrammar(A,B){if(this._includedGrammars[A])return this._includedGrammars[A];if(this._grammarRepository){const Q=this._grammarRepository.lookup(A);if(Q)return this._includedGrammars[A]=JA(Q,B&&B.$base),this._includedGrammars[A]}}tokenizeLine(A,B,Q=0){const g=this._tokenize(A,B,!1,Q);return{tokens:g.lineTokens.getResult(g.ruleStack,g.lineLength),ruleStack:g.ruleStack,stoppedEarly:g.stoppedEarly}}tokenizeLine2(A,B,Q=0){const g=this._tokenize(A,B,!0,Q);return{tokens:g.lineTokens.getBinaryResult(g.ruleStack,g.lineLength),ruleStack:g.ruleStack,stoppedEarly:g.stoppedEarly}}_tokenize(A,B,Q,g){let E;if(-1===this._rootId&&(this._rootId=DA.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections()),B&&B!==SA.NULL)E=!1,B.reset();else{E=!0;const A=this._basicScopeAttributesProvider.getDefaultAttributes(),Q=this.themeProvider.getDefaults(),g=H.set(0,A.languageId,A.tokenType,null,Q.fontStyle,Q.foregroundId,Q.backgroundId),C=this.getRule(this._rootId).getName(null,null);let I;I=C?yA.createRootAndLookUpScopeName(C,g,this):yA.createRoot("unknown",g),B=new SA(null,this._rootId,-1,-1,!1,null,I,I)}A+="\n";const C=this.createOnigString(A),I=C.content.length,D=new lA(Q,A,this._tokenTypeMatchers,this.balancedBracketSelectors),w=LA(this,C,E,0,B,D,!0,g);return K(C),{lineLength:I,lineTokens:D,ruleStack:w.stack,stoppedEarly:w.stoppedEarly}}}function JA(A,B){return(A=Y(A)).repository=A.repository||{},A.repository.$self={$vscodeTextmateLocation:A.$vscodeTextmateLocation,patterns:A.patterns,name:A.scopeName},A.repository.$base=B||A.repository.$self,A}class yA{constructor(A,B,Q){this.parent=A,this.scopePath=B,this.tokenAttributes=Q}static fromExtension(A,B){let Q=A,g=A?.scopePath??null;for(const A of B)g=cA.push(g,A.scopeNames),Q=new yA(Q,g,A.encodedTokenAttributes);return Q}static createRoot(A,B){return new yA(null,new cA(null,A),B)}static createRootAndLookUpScopeName(A,B,Q){const g=Q.getMetadataForScope(A),E=new cA(null,A),C=Q.themeProvider.themeMatch(E),I=yA.mergeAttributes(B,g,C);return new yA(null,E,I)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(A){return yA.equals(this,A)}static equals(A,B){for(;;){if(A===B)return!0;if(!A&&!B)return!0;if(!A||!B)return!1;if(A.scopeName!==B.scopeName||A.tokenAttributes!==B.tokenAttributes)return!1;A=A.parent,B=B.parent}}static mergeAttributes(A,B,Q){let g=-1,E=0,C=0;return null!==Q&&(g=Q.fontStyle,E=Q.foregroundId,C=Q.backgroundId),H.set(A,B.languageId,B.tokenType,null,g,E,C)}pushAttributed(A,B){if(null===A)return this;if(-1===A.indexOf(" "))return yA._pushAttributed(this,A,B);const Q=A.split(/ /g);let g=this;for(const A of Q)g=yA._pushAttributed(g,A,B);return g}static _pushAttributed(A,B,Q){const g=Q.getMetadataForScope(B),E=A.scopePath.push(B),C=Q.themeProvider.themeMatch(E),I=yA.mergeAttributes(A.tokenAttributes,g,C);return new yA(A,E,I)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(A){const B=[];let Q=this;for(;Q&&Q!==A;)B.push({encodedTokenAttributes:Q.tokenAttributes,scopeNames:Q.scopePath.getExtensionIfDefined(Q.parent?.scopePath??null)}),Q=Q.parent;return Q===A?B.reverse():void 0}}class SA{constructor(A,B,Q,g,E,C,I,D){this.parent=A,this.ruleId=B,this.beginRuleCapturedEOL=E,this.endRule=C,this.nameScopesList=I,this.contentNameScopesList=D,this._stackElementBrand=void 0,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=Q,this._anchorPos=g}equals(A){return null!==A&&SA._equals(this,A)}static _equals(A,B){return A===B||!!this._structuralEquals(A,B)&&yA.equals(A.contentNameScopesList,B.contentNameScopesList)}static _structuralEquals(A,B){for(;;){if(A===B)return!0;if(!A&&!B)return!0;if(!A||!B)return!1;if(A.depth!==B.depth||A.ruleId!==B.ruleId||A.endRule!==B.endRule)return!1;A=A.parent,B=B.parent}}clone(){return this}static _reset(A){for(;A;)A._enterPos=-1,A._anchorPos=-1,A=A.parent}reset(){SA._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(A,B,Q,g,E,C,I){return new SA(this,A,B,Q,g,E,C,I)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(A){return A.getRule(this.ruleId)}toString(){const A=[];return this._writeString(A,0),"["+A.join(",")+"]"}_writeString(A,B){return this.parent&&(B=this.parent._writeString(A,B)),A[B++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,B}withContentNameScopesList(A){return this.contentNameScopesList===A?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,A)}withEndRule(A){return this.endRule===A?this:new SA(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,A,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(A){let B=this;for(;B&&B._enterPos===A._enterPos;){if(B.ruleId===A.ruleId)return!0;B=B.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(A,B){const Q=yA.fromExtension(A?.nameScopesList??null,B.nameScopesList);return new SA(A,B.ruleId,B.enterPos??-1,B.anchorPos??-1,B.beginRuleCapturedEOL,B.endRule,Q,yA.fromExtension(Q,B.contentNameScopesList))}}SA.NULL=new SA(null,0,0,0,!1,null,null,null);class pA{constructor(A,B){this.allowAny=!1,this.balancedBracketScopes=A.flatMap((A=>"*"===A?(this.allowAny=!0,[]):k(A,UA).map((A=>A.matcher)))),this.unbalancedBracketScopes=B.flatMap((A=>k(A,UA).map((A=>A.matcher))))}get matchesAlways(){return this.allowAny&&0===this.unbalancedBracketScopes.length}get matchesNever(){return 0===this.balancedBracketScopes.length&&!this.allowAny}match(A){for(const B of this.unbalancedBracketScopes)if(B(A))return!1;for(const B of this.balancedBracketScopes)if(B(A))return!0;return this.allowAny}}class lA{constructor(A,B,Q,g){this.balancedBracketSelectors=g,this._emitBinaryTokens=A,this._tokenTypeOverrides=Q,this._lineText=L?B:null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}produce(A,B){this.produceFromScopes(A.contentNameScopesList,B)}produceFromScopes(A,B){if(this._lastTokenEndIndex>=B)return;if(this._emitBinaryTokens){let Q=A?.tokenAttributes??0,g=!1;if(this.balancedBracketSelectors?.matchesAlways&&(g=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const B=A?.getScopeNames()??[];for(const A of this._tokenTypeOverrides)A.matcher(B)&&(Q=H.set(Q,0,A.type,null,-1,0,0));this.balancedBracketSelectors&&(g=this.balancedBracketSelectors.match(B))}if(g&&(Q=H.set(Q,0,8,g,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===Q)return void(this._lastTokenEndIndex=B);if(L){const Q=A?.getScopeNames()??[];console.log(" token: |"+this._lineText.substring(this._lastTokenEndIndex,B).replace(/\n$/,"\\n")+"|");for(let A=0;A0&&this._tokens[this._tokens.length-1].startIndex===B-1&&this._tokens.pop(),0===this._tokens.length&&(this._lastTokenEndIndex=-1,this.produce(A,B),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(A,B){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===B-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),0===this._binaryTokens.length&&(this._lastTokenEndIndex=-1,this.produce(A,B),this._binaryTokens[this._binaryTokens.length-2]=0);const Q=new Uint32Array(this._binaryTokens.length);for(let A=0,B=this._binaryTokens.length;A0;)10===A.charCodeAt(E)?(E++,C++,I=0):(E++,I++),B--}function w(A){null===Q?E=A:D(A-E)}function o(){for(;E0&&65279===A.charCodeAt(0)&&(E=1);let i=0,t=null,M=[],h=[],a=null;function F(A,B){M.push(i),h.push(t),i=A,t=B}function G(){if(0===M.length)return n("illegal state stack");i=M.pop(),t=h.pop()}function n(B){throw new Error("Near offset "+E+": "+B+" ~~~"+A.substr(E,50)+"~~~")}const r=function(){if(null===a)return n("missing ");let A={};null!==Q&&(A[Q]={filename:B,line:C,char:I}),t[a]=A,a=null,F(1,A)},N=function(){if(null===a)return n("missing ");let A=[];t[a]=A,a=null,F(2,A)},L=function(){let A={};null!==Q&&(A[Q]={filename:B,line:C,char:I}),t.push(A),F(1,A)},H=function(){let A=[];t.push(A),F(2,A)};function k(){if(1!==i)return n("unexpected ");G()}function R(){return 1===i||2!==i?n("unexpected "):void G()}function K(A){if(1===i){if(null===a)return n("missing ");t[a]=A,a=null}else 2===i?t.push(A):t=A}function Y(A){if(isNaN(A))return n("cannot parse float");if(1===i){if(null===a)return n("missing ");t[a]=A,a=null}else 2===i?t.push(A):t=A}function U(A){if(isNaN(A))return n("cannot parse integer");if(1===i){if(null===a)return n("missing ");t[a]=A,a=null}else 2===i?t.push(A):t=A}function P(A){if(1===i){if(null===a)return n("missing ");t[a]=A,a=null}else 2===i?t.push(A):t=A}function u(A){if(1===i){if(null===a)return n("missing ");t[a]=A,a=null}else 2===i?t.push(A):t=A}function J(A){if(1===i){if(null===a)return n("missing ");t[a]=A,a=null}else 2===i?t.push(A):t=A}function y(){let A=c(">"),B=!1;return 47===A.charCodeAt(A.length-1)&&(B=!0,A=A.substring(0,A.length-1)),{name:A.trim(),isClosed:B}}function S(A){if(A.isClosed)return"";let B=c(""),B.replace(/&#([0-9]+);/g,(function(A,B){return String.fromCodePoint(parseInt(B,10))})).replace(/&#x([0-9a-f]+);/g,(function(A,B){return String.fromCodePoint(parseInt(B,16))})).replace(/&|<|>|"|'/g,(function(A){switch(A){case"&":return"&";case"<":return"<";case">":return">";case""":return'"';case"'":return"'"}return A}))}for(;E=g));){const w=A.charCodeAt(E);if(D(1),60!==w)return n("expected <");if(E>=g)return n("unexpected end of input");const c=A.charCodeAt(E);if(63===c){D(1),e("?>");continue}if(33===c){if(D(1),s("--")){e("--\x3e");continue}e(">");continue}if(47===c){if(D(1),o(),s("plist")){e(">");continue}if(s("dict")){e(">"),k();continue}if(s("array")){e(">"),R();continue}return n("unexpected closed tag")}let M=y();switch(M.name){case"dict":1===i?r():2===i?L():(t={},null!==Q&&(t[Q]={filename:B,line:C,char:I}),F(1,t)),M.isClosed&&k();continue;case"array":1===i?N():2===i?H():(t=[],F(2,t)),M.isClosed&&R();continue;case"key":p=S(M),1!==i?n("unexpected "):null!==a?n("too many "):a=p;continue;case"string":K(S(M));continue;case"real":Y(parseFloat(S(M)));continue;case"integer":U(parseInt(S(M),10));continue;case"date":P(new Date(S(M)));continue;case"data":u(S(M));continue;case"true":S(M),J(!0);continue;case"false":S(M),J(!1);continue}if(!/^plist/.test(M.name))return n("unexpected opened tag "+M.name)}var p;return t}function xA(A,B){throw new Error("Near offset "+A.pos+": "+B+" ~~~"+A.source.substr(A.pos,50)+"~~~")}class fA{constructor(A){this.source=A,this.pos=0,this.len=A.length,this.line=1,this.char=0}}class mA{constructor(){this.value=null,this.type=0,this.offset=-1,this.len=-1,this.line=-1,this.char=-1}toLocation(A){return{filename:A,line:this.line,char:this.char}}}function OA(A,B){B.value=null,B.type=0,B.offset=-1,B.len=-1,B.line=-1,B.char=-1;let Q,g=A.source,E=A.pos,C=A.len,I=A.line,D=A.char;for(;;){if(E>=C)return!1;if(Q=g.charCodeAt(E),32!==Q&&9!==Q&&13!==Q){if(10!==Q)break;E++,I++,D=0}else E++,D++}if(B.offset=E,B.line=I,B.char=D,34===Q){for(B.type=1,E++,D++;;){if(E>=C)return!1;if(Q=g.charCodeAt(E),E++,D++,92!==Q){if(34===Q)break}else E++,D++}B.value=g.substring(B.offset+1,E-1).replace(/\\u([0-9A-Fa-f]{4})/g,((A,B)=>String.fromCodePoint(parseInt(B,16)))).replace(/\\(.)/g,((B,Q)=>{switch(Q){case'"':return'"';case"\\":return"\\";case"/":return"/";case"b":return"\b";case"f":return"\f";case"n":return"\n";case"r":return"\r";case"t":return"\t";default:xA(A,"invalid escape sequence")}throw new Error("unreachable")}))}else if(91===Q)B.type=2,E++,D++;else if(123===Q)B.type=3,E++,D++;else if(93===Q)B.type=4,E++,D++;else if(125===Q)B.type=5,E++,D++;else if(58===Q)B.type=6,E++,D++;else if(44===Q)B.type=7,E++,D++;else if(110===Q){if(B.type=8,E++,D++,Q=g.charCodeAt(E),117!==Q)return!1;if(E++,D++,Q=g.charCodeAt(E),108!==Q)return!1;if(E++,D++,Q=g.charCodeAt(E),108!==Q)return!1;E++,D++}else if(116===Q){if(B.type=9,E++,D++,Q=g.charCodeAt(E),114!==Q)return!1;if(E++,D++,Q=g.charCodeAt(E),117!==Q)return!1;if(E++,D++,Q=g.charCodeAt(E),101!==Q)return!1;E++,D++}else if(102===Q){if(B.type=10,E++,D++,Q=g.charCodeAt(E),97!==Q)return!1;if(E++,D++,Q=g.charCodeAt(E),108!==Q)return!1;if(E++,D++,Q=g.charCodeAt(E),115!==Q)return!1;if(E++,D++,Q=g.charCodeAt(E),101!==Q)return!1;E++,D++}else for(B.type=11;;){if(E>=C)return!1;if(Q=g.charCodeAt(E),!(46===Q||Q>=48&&Q<=57||101===Q||69===Q||45===Q||43===Q))break;E++,D++}return B.len=E-B.offset,null===B.value&&(B.value=g.substr(B.offset,B.len)),A.pos=E,A.line=I,A.char=D,!0}class qA{constructor(A,B){this._onigLibPromise=B,this._grammars=new Map,this._rawGrammars=new Map,this._injectionGrammars=new Map,this._theme=A}dispose(){for(const A of this._grammars.values())A.dispose()}setTheme(A){this._theme=A}getColorMap(){return this._theme.getColorMap()}addGrammar(A,B){this._rawGrammars.set(A.scopeName,A),B&&this._injectionGrammars.set(A.scopeName,B)}lookup(A){return this._rawGrammars.get(A)}injections(A){return this._injectionGrammars.get(A)}getDefaults(){return this._theme.getDefaults()}themeMatch(A){return this._theme.match(A)}async grammarForScopeName(A,B,Q,g,E){if(!this._grammars.has(A)){let C=this._rawGrammars.get(A);if(!C)return null;this._grammars.set(A,function(A,B,Q,g,E,C,I,D){return new uA(A,B,Q,g,E,C,I,D)}(A,C,B,Q,g,E,this,await this._onigLibPromise))}return this._grammars.get(A)}}function bA(A,B){let Q=0;const g=[];let E=A,C=B;for(;E!==C;)E&&(!C||E.depth>=C.depth)?(Q++,E=E.parent):(g.push(C.toStateStackFrame()),C=C.parent);return{pops:Q,newFrames:g.reverse()}}function WA(A,B){let Q=A;for(let A=0;A0;)await Promise.all(C.Q.map((A=>this._loadSingleGrammar(A.scopeName)))),C.processQueue();return this._grammarForScopeName(A,B,Q,g,E)}async _loadSingleGrammar(A){return this._ensureGrammarCache.has(A)||this._ensureGrammarCache.set(A,this._doLoadSingleGrammar(A)),this._ensureGrammarCache.get(A)}async _doLoadSingleGrammar(A){const B=await this._options.loadGrammar(A);if(B){const Q="function"==typeof this._options.getInjections?this._options.getInjections(A):void 0;this._syncRegistry.addGrammar(B,Q)}}async addGrammar(A,B=[],Q=0,g=null){return this._syncRegistry.addGrammar(A,B),await this._grammarForScopeName(A.scopeName,Q,g)}_grammarForScopeName(A,B=0,Q=null,g=null,E=null){return this._syncRegistry.grammarForScopeName(A,B,Q,g,E)}}const XA=SA.NULL,vA=function(A,B=null){return null!==B&&/\.json$/.test(B)?(Q=A,L?function(A,B,Q){let g=new fA(A),E=new mA,C=0,I=null,D=[],w=[];function o(){D.push(C),w.push(I)}function s(){C=D.pop(),I=w.pop()}function e(A){xA(g,A)}for(;OA(g,E);){if(0===C){if(null!==I&&e("too many constructs in root"),3===E.type){I={},I.$vscodeTextmateLocation=E.toLocation(B),o(),C=1;continue}if(2===E.type){I=[],o(),C=4;continue}e("unexpected token in root")}if(2===C){if(5===E.type){s();continue}if(7===E.type){C=3;continue}e("expected , or }")}if(1===C||3===C){if(1===C&&5===E.type){s();continue}if(1===E.type){let A=E.value;if(OA(g,E)&&6===E.type||e("expected colon"),OA(g,E)||e("expected value"),C=2,1===E.type){I[A]=E.value;continue}if(8===E.type){I[A]=null;continue}if(9===E.type){I[A]=!0;continue}if(10===E.type){I[A]=!1;continue}if(11===E.type){I[A]=parseFloat(E.value);continue}if(2===E.type){let B=[];I[A]=B,o(),C=4,I=B;continue}if(3===E.type){let Q={};Q.$vscodeTextmateLocation=E.toLocation(B),I[A]=Q,o(),C=1,I=Q;continue}}e("unexpected token in dict")}if(5===C){if(4===E.type){s();continue}if(7===E.type){C=6;continue}e("expected , or ]")}if(4===C||6===C){if(4===C&&4===E.type){s();continue}if(C=5,1===E.type){I.push(E.value);continue}if(8===E.type){I.push(null);continue}if(9===E.type){I.push(!0);continue}if(10===E.type){I.push(!1);continue}if(11===E.type){I.push(parseFloat(E.value));continue}if(2===E.type){let A=[];I.push(A),o(),C=4,I=A;continue}if(3===E.type){let A={};A.$vscodeTextmateLocation=E.toLocation(B),I.push(A),o(),C=1,I=A;continue}e("unexpected token in array")}e("unknown state")}return 0!==w.length&&e("unclosed constructs"),I}(Q,B):JSON.parse(Q)):function(A,B){return L?function(A,B,Q){return dA(A,B,"$vscodeTextmateLocation")}(A,B):function(A){return dA(A,null,null)}(A)}(A,B);var Q};var ZA=N.Bz,jA=("undefined"!=typeof document&&document.currentScript&&document.currentScript.src,function(A){var B,Q,g=void 0!==(A=A||{})?A:{};g.ready=new Promise((function(A,g){B=A,Q=g}));var E,C=Object.assign({},g),I=!1;E=function(A){let B;return"function"==typeof readbuffer?new Uint8Array(readbuffer(A)):(B=read(A,"binary"),"object"==typeof B||L(Q),B);var Q},"undefined"!=typeof scriptArgs&&scriptArgs,"undefined"!=typeof onig_print&&("undefined"==typeof console&&(console={}),console.log=onig_print,console.warn=console.error="undefined"!=typeof printErr?printErr:onig_print);var D,w,o=g.print||console.log.bind(console),s=g.printErr||console.warn.bind(console);Object.assign(g,C),C=null,g.arguments&&g.arguments,g.thisProgram&&g.thisProgram,g.quit&&g.quit,g.wasmBinary&&(D=g.wasmBinary),g.noExitRuntime,"object"!=typeof WebAssembly&&L("no native wasm support detected");var e,c,i,t=!1,M="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function h(A,B,Q){for(var g=B+Q,E=B;A[E]&&!(E>=g);)++E;if(E-B>16&&A.buffer&&M)return M.decode(A.subarray(B,E));for(var C="";B>10,56320|1023&o)}}else C+=String.fromCharCode((31&I)<<6|D)}else C+=String.fromCharCode(I)}return C}function a(A){e=A,g.HEAP8=new Int8Array(A),g.HEAP16=new Int16Array(A),g.HEAP32=new Int32Array(A),g.HEAPU8=c=new Uint8Array(A),g.HEAPU16=new Uint16Array(A),g.HEAPU32=i=new Uint32Array(A),g.HEAPF32=new Float32Array(A),g.HEAPF64=new Float64Array(A)}g.INITIAL_MEMORY;var F=[],G=[],n=[],r=0,N=null;function L(A){g.onAbort&&g.onAbort(A),s(A="Aborted("+A+")"),t=!0,A+=". Build with -sASSERTIONS for more info.";var B=new WebAssembly.RuntimeError(A);throw Q(B),B}var H,k,R,K="data:application/octet-stream;base64,";function Y(A){return A.startsWith(K)}function U(A){try{if(A==H&&D)return new Uint8Array(D);if(E)return E(A);throw"both async and sync fetching of the wasm failed"}catch(A){L(A)}}function P(A){for(;A.length>0;)A.shift()(g)}function u(A){try{return w.grow(A-e.byteLength+65535>>>16),a(w.buffer),1}catch(A){}}Y(H="onig.wasm")||(k=H,H=g.locateFile?g.locateFile(k,""):""+k),R="undefined"!=typeof dateNow?dateNow:()=>performance.now();var J=[null,[],[]];function y(A,B){var Q=J[A];0===B||10===B?((1===A?o:s)(h(Q,0)),Q.length=0):Q.push(B)}var S,p={emscripten_get_now:R,emscripten_memcpy_big:function(A,B,Q){c.copyWithin(A,B,B+Q)},emscripten_resize_heap:function(A){var B=c.length,Q=2147483648;if((A>>>=0)>Q)return!1;let g=(A,B)=>A+(B-A%B)%B;for(var E=1;E<=4;E*=2){var C=B*(1+.2/E);if(C=Math.min(C,A+100663296),u(Math.min(Q,g(Math.max(A,C),65536))))return!0}return!1},fd_write:function(A,B,Q,g){for(var E=0,C=0;C>2],D=i[B+4>>2];B+=8;for(var w=0;w>2]=E,0}};function l(A){function Q(){S||(S=!0,g.calledRun=!0,t||(P(G),B(g),g.onRuntimeInitialized&&g.onRuntimeInitialized(),function(){if(g.postRun)for("function"==typeof g.postRun&&(g.postRun=[g.postRun]);g.postRun.length;)A=g.postRun.shift(),n.unshift(A);var A;P(n)}()))}r>0||(function(){if(g.preRun)for("function"==typeof g.preRun&&(g.preRun=[g.preRun]);g.preRun.length;)A=g.preRun.shift(),F.unshift(A);var A;P(F)}(),r>0||(g.setStatus?(g.setStatus("Running..."),setTimeout((function(){setTimeout((function(){g.setStatus("")}),1),Q()}),1)):Q()))}if(function(){var A={env:p,wasi_snapshot_preview1:p};function B(A,B){var Q,E=A.exports;g.asm=E,a((w=g.asm.memory).buffer),g.asm.__indirect_function_table,Q=g.asm.__wasm_call_ctors,G.unshift(Q),function(A){if(r--,g.monitorRunDependencies&&g.monitorRunDependencies(r),0==r&&N){var B=N;N=null,B()}}()}function E(A){B(A.instance)}function C(B){return(!D&&I&&"function"==typeof fetch?fetch(H,{credentials:"same-origin"}).then((function(A){if(!A.ok)throw"failed to load wasm binary file at '"+H+"'";return A.arrayBuffer()})).catch((function(){return U(H)})):Promise.resolve().then((function(){return U(H)}))).then((function(B){return WebAssembly.instantiate(B,A)})).then((function(A){return A})).then(B,(function(A){s("failed to asynchronously prepare wasm: "+A),L(A)}))}if(r++,g.monitorRunDependencies&&g.monitorRunDependencies(r),g.instantiateWasm)try{return g.instantiateWasm(A,B)}catch(A){s("Module.instantiateWasm callback failed with error: "+A),Q(A)}(D||"function"!=typeof WebAssembly.instantiateStreaming||Y(H)||"function"!=typeof fetch?C(E):fetch(H,{credentials:"same-origin"}).then((function(B){return WebAssembly.instantiateStreaming(B,A).then(E,(function(A){return s("wasm streaming compile failed: "+A),s("falling back to ArrayBuffer instantiation"),C(E)}))}))).catch(Q)}(),g.___wasm_call_ctors=function(){return(g.___wasm_call_ctors=g.asm.__wasm_call_ctors).apply(null,arguments)},g.___errno_location=function(){return(g.___errno_location=g.asm.__errno_location).apply(null,arguments)},g._omalloc=function(){return(g._omalloc=g.asm.omalloc).apply(null,arguments)},g._ofree=function(){return(g._ofree=g.asm.ofree).apply(null,arguments)},g._getLastOnigError=function(){return(g._getLastOnigError=g.asm.getLastOnigError).apply(null,arguments)},g._createOnigScanner=function(){return(g._createOnigScanner=g.asm.createOnigScanner).apply(null,arguments)},g._freeOnigScanner=function(){return(g._freeOnigScanner=g.asm.freeOnigScanner).apply(null,arguments)},g._findNextOnigScannerMatch=function(){return(g._findNextOnigScannerMatch=g.asm.findNextOnigScannerMatch).apply(null,arguments)},g._findNextOnigScannerMatchDbg=function(){return(g._findNextOnigScannerMatchDbg=g.asm.findNextOnigScannerMatchDbg).apply(null,arguments)},g.stackSave=function(){return(g.stackSave=g.asm.stackSave).apply(null,arguments)},g.stackRestore=function(){return(g.stackRestore=g.asm.stackRestore).apply(null,arguments)},g.stackAlloc=function(){return(g.stackAlloc=g.asm.stackAlloc).apply(null,arguments)},g.dynCall_jiji=function(){return(g.dynCall_jiji=g.asm.dynCall_jiji).apply(null,arguments)},g.UTF8ToString=function(A,B){return A?h(c,A,B):""},N=function A(){S||l(),S||(N=A)},g.preInit)for("function"==typeof g.preInit&&(g.preInit=[g.preInit]);g.preInit.length>0;)g.preInit.pop()();return l(),A.ready});let VA=null;class zA{static _utf8ByteLength(A){let B=0;for(let Q=0,g=A.length;Q=55296&&E<=56319&&Q+1=56320&&B<=57343&&(C=65536+(E-55296<<10)|B-56320,I=!0)}B+=C<=127?1:C<=2047?2:C<=65535?3:4,I&&Q++}return B}constructor(A){const B=A.length,Q=zA._utf8ByteLength(A),g=Q!==B,E=g?new Uint32Array(B+1):null;g&&(E[B]=Q);const C=g?new Uint32Array(Q+1):null;g&&(C[Q]=B);const I=new Uint8Array(Q);let D=0;for(let Q=0;Q=55296&&w<=56319&&Q+1=56320&&B<=57343&&(o=65536+(w-55296<<10)|B-56320,s=!0)}g&&(E[Q]=D,s&&(E[Q+1]=D),o<=127?C[D+0]=Q:o<=2047?(C[D+0]=Q,C[D+1]=Q):o<=65535?(C[D+0]=Q,C[D+1]=Q,C[D+2]=Q):(C[D+0]=Q,C[D+1]=Q,C[D+2]=Q,C[D+3]=Q)),o<=127?I[D++]=o:o<=2047?(I[D++]=192|(1984&o)>>>6,I[D++]=128|(63&o)>>>0):o<=65535?(I[D++]=224|(61440&o)>>>12,I[D++]=128|(4032&o)>>>6,I[D++]=128|(63&o)>>>0):(I[D++]=240|(1835008&o)>>>18,I[D++]=128|(258048&o)>>>12,I[D++]=128|(4032&o)>>>6,I[D++]=128|(63&o)>>>0),s&&Q++}this.utf16Length=B,this.utf8Length=Q,this.utf16Value=A,this.utf8Value=I,this.utf16OffsetToUtf8=E,this.utf8OffsetToUtf16=C}createString(A){const B=A._omalloc(this.utf8Length);return A.HEAPU8.set(this.utf8Value,B),B}}class _A{constructor(A){if(this.id=++_A.LAST_ID,!VA)throw new Error("Must invoke loadWASM first.");this._onigBinding=VA,this.content=A;const B=new zA(A);this.utf16Length=B.utf16Length,this.utf8Length=B.utf8Length,this.utf16OffsetToUtf8=B.utf16OffsetToUtf8,this.utf8OffsetToUtf16=B.utf8OffsetToUtf16,this.utf8Length<1e4&&!_A._sharedPtrInUse?(_A._sharedPtr||(_A._sharedPtr=VA._omalloc(1e4)),_A._sharedPtrInUse=!0,VA.HEAPU8.set(B.utf8Value,_A._sharedPtr),this.ptr=_A._sharedPtr):this.ptr=B.createString(VA)}convertUtf8OffsetToUtf16(A){return this.utf8OffsetToUtf16?A<0?0:A>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[A]:A}convertUtf16OffsetToUtf8(A){return this.utf16OffsetToUtf8?A<0?0:A>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[A]:A}dispose(){this.ptr===_A._sharedPtr?_A._sharedPtrInUse=!1:this._onigBinding._ofree(this.ptr)}}_A.LAST_ID=0,_A._sharedPtr=0,_A._sharedPtrInUse=!1;class $A{constructor(A){if(!VA)throw new Error("Must invoke loadWASM first.");const B=[],Q=[];for(let g=0,E=A.length;gWebAssembly.instantiateStreaming(A,B)}(g):function(A){return async B=>{const Q=await A.arrayBuffer();return WebAssembly.instantiate(Q,B)}}(g):function(A){return B=>WebAssembly.instantiate(A,B)}(g)}return BB=new Promise(((A,B)=>{g=A,E=B})),function(A,B,Q,g){jA({print:B,instantiateWasm:(B,Q)=>{if("undefined"==typeof performance){const A=()=>Date.now();B.env.emscripten_get_now=A,B.wasi_snapshot_preview1.emscripten_get_now=A}return A(B).then((A=>Q(A.instance)),g),{}}}).then((A=>{VA=A,Q()}))}(B,Q,g,E),BB}function gB(A){return new _A(A)}function EB(A){return new $A(A)}function CB(A){const B=G[A];if(!B)return;const{id:Q}=n[B];return{id:Q,scopeName:B}}const IB=new Map;let DB,wB;async function oB(A){if(IB.has(A))return IB.get(A);const Q=function(A){return n[A]}(A);if(!Q)return Promise.resolve(void 0);let g;if(void 0===DB&&(g=sB(Q.path),DB=g.then((()=>!0)).catch((()=>!1))),void 0===wB&&(wB=await DB),wB){const B=g||sB(Q.path);return IB.set(A,B),B}const E=B(`grammars/${Q.id}`);Q.embeddedScopes.forEach((A=>{if(!IB.has(A)){const B=E.then((B=>B.find((B=>B.scopeName===A))));IB.set(A,B)}}));const C=E.then((B=>B.find((B=>B.scopeName===A))));return IB.set(A,C),C}async function sB(B){return await A()}const eB=30720,cB=16744448,iB=16775168,tB=11,MB=15,hB={NotSet:-1,None:0,Italic:1,Bold:2,Underline:4,Strikethrough:8};function aB(A,B,Q,g){const{tokens:E,ruleStack:C}=A.tokenizeLine2(Q,B),I=[];let D=Q.length;for(let A=E.length-2;A>=0;A-=2){const B=E[A],g=E[A+1],C=Q.slice(B,D);I.unshift({content:C,metadata:g}),D=B}let w=[];if(null==g?void 0:g.preserveWhitespace)w=I;else for(let A=0;A0?w[w.length-1].content+=B.content:A{const{rawTokens:E,nextStack:C}=aB(B,g,A,{preserveWhitespace:!0}),I=E.map((({content:A,metadata:B})=>({content:A,style:GB(B,Q)}))),D=function(A,B,Q,g){const{tokens:E}=Q.tokenizeLine(A,B),C=[];for(let B=0;B{if(w+=A.content.length,Q>>MB]},g=(A&eB)>>>tB;return g&hB.Italic&&(Q.fontStyle="italic"),g&hB.Bold&&(Q.fontWeight="bold"),g&hB.Underline&&(Q.textDecoration="underline"),g&hB.Strikethrough&&(Q.textDecoration="line-through"),Q}var nB=function(A){var B=null;if("undefined"!=typeof process&&null!=process.versions&&null!=process.versions.node)B=Buffer.from(A,"base64");else{var Q=globalThis.atob(A),g=Q.length;B=new Uint8Array(new ArrayBuffer(g));for(var E=0;E({createOnigScanner:EB,createOnigString:gB})));rB=new ZA({onigLib:A,loadGrammar:A=>oB(A)})}const B=A.filter((A=>!NB(A))).map((A=>{const B=CB(A);if(!B)throw new kB(A);return rB.loadGrammar(B.scopeName)}));return Promise.all(B)}function HB(A){if(NB(A))return{langId:A,grammar:null};const B=CB(A);if(!B)throw new kB(A);const Q=function(A){const{_syncRegistry:B}=rB;return null==B?void 0:B._grammars.get(A)}(B.scopeName);if(!Q)throw new Error(`Syntax highlighting error: grammar for ${A} not loaded`);return{langId:B.id,grammar:Q}}class kB extends Error{constructor(A){super(`Unknown language: ${A}`),this.alias=A}}function RB(A,B,Q){rB.setTheme(Q);const g=function(A){const B=rB.getColorMap();return A.colorNames?B.map((B=>Object.keys(A.colorNames).find((Q=>A.colorNames[Q].toUpperCase()===B.toUpperCase()))||B)):B}(Q);return function(A,B,Q){let g=null;return A.split(/\r?\n|\r/g).map((A=>{const{rawTokens:E,nextStack:C}=aB(B,g,A);return g=C,E.map((({content:A,metadata:B})=>({content:A,style:GB(B,Q)})))}))}(A,B,g)}function KB(A){return A.split(/\r?\n|\r/g).map((A=>[{content:A,style:{}}]))}function YB(A,B){return PB(A.slice(1,-1)).map((A=>{const{from:Q,to:g}=UB(A);return{lineNumber:B,fromColumn:Q,toColumn:g}}))}function UB(A){const[B,Q]=A.split(":");if(!uB(B))throw new JB(B);const g=Number(B);if(g<1)throw new yB;if(Q){if(!uB(Q))throw new JB(Q);return{from:g,to:+Q}}return{from:g,to:g}}function PB(A){return A.split(/,(?![^\[]*\])/g)}function uB(A){A=A.toString();var B=Math.abs(A),Q=parseInt(A,10);return!isNaN(B)&&Q===B&&B.toString()===A}class JB extends Error{constructor(A){super(`Invalid number "${A}" in range string`),this.number=A,Object.setPrototypeOf(this,new.target.prototype)}}class yB extends Error{constructor(){super("Invalid line or column number in range string"),Object.setPrototypeOf(this,new.target.prototype)}}const SB="#001",pB="#010",lB={name:"comments",type:"light",foreground:"",background:"",colors:{},settings:[{settings:{foreground:"#000"}},{scope:["punctuation.definition.comment"],settings:{foreground:SB}},{scope:"comment",settings:{foreground:pB}}]};function dB(A,B,Q,g){const E=B?RB(A,B,lB):KB(A),C=[];let I=1;const D=E.map((A=>{const{annotations:B,lineWithoutComments:E}=function(A,B,Q){if(!A.some((A=>A.style.color===SB)))return{annotations:[],lineWithoutComments:A};const g=[];let E=0;for(;E!A.tokens.includes(B)));C.every((A=>""===A.content.trim()))&&(C=null);return{annotations:g.map((A=>({name:A.name,query:A.query,lineNumber:A.lineNumber,rangeString:A.rangeString}))),lineWithoutComments:C}}(A,g,I);if(C.push(...B),!E)return null;const D=E.map((A=>A.content)).join("");return["mdx","jsx","tsx"].includes(Q)&&B.length>0&&"{}"===D.trim()?null:(I++,D)})).filter((A=>null!==A)).join("\n"),w=C.map((A=>{var{rangeString:B,lineNumber:Q}=A,g=function(A,B){var Q={};for(var g in A)Object.prototype.hasOwnProperty.call(A,g)&&B.indexOf(g)<0&&(Q[g]=A[g]);if(null!=A&&"function"==typeof Object.getOwnPropertySymbols){var E=0;for(g=Object.getOwnPropertySymbols(A);E{if(A.includes("[")){const[Q,g]=A.split("["),E=Number(Q),C=B+E-1;if(!uB(C))throw new JB(Q);return YB("["+g,C)}const{from:Q,to:g}=UB(A);return[{fromLineNumber:Q+B-1,toLineNumber:g+B-1}]})).flat():[{fromLineNumber:B,toLineNumber:B}]}(B,Q);return Object.assign(Object.assign({},g),{ranges:E})}));return{newCode:D,annotations:w}}function xB(A,B){var Q;const g=A.match(/\s*([\w-]+)?(\([^\)]*\)|\[[^\]]*\])?(.*)$/),E=g[1],C=g[2],I=null===(Q=g[3])||void 0===Q?void 0:Q.trim();return B.includes(E)?{name:E,rangeString:C,query:I}:null}function fB(A,B){let Q=[],g=1;return A.forEach((A=>{Q.push({fromColumn:g,toColumn:g+A.content.length-1,token:A}),g+=A.content.length})),B.forEach((A=>{Q=function(A,B){const{range:Q}=B,{fromColumn:g,toColumn:E}=Q,C=[];let I=0;for(;IE){const[A,Q]=OB(B,E+1);D.tokens.push(A),C.push(Q)}else D.tokens.push(B);I++}else C.push(D);for(;ImB(A)))}function mB(A){return"tokens"in A?{annotationName:A.annotationName,annotationQuery:A.annotationQuery,fromColumn:A.fromColumn,toColumn:A.toColumn,tokens:A.tokens.map((A=>mB(A)))}:A.token}function OB(A,B){if("token"in A){const Q=Object.assign(Object.assign({},A.token),{content:A.token.content.slice(0,B-A.fromColumn)}),g=Object.assign(Object.assign({},A.token),{content:A.token.content.slice(B-A.fromColumn)});return[Object.assign(Object.assign({},A),{toColumn:B-1,token:Q}),Object.assign(Object.assign({},A),{fromColumn:B,token:g})]}{const Q=[],g=[];A.tokens.forEach((A=>{if(A.toColumn=B)g.push(A);else{const[E,C]=OB(A,B);Q.push(E),g.push(C)}}));return[Object.assign(Object.assign({},A),{toColumn:B-1,tokens:Q}),Object.assign(Object.assign({},A),{fromColumn:B,tokens:g})]}}function qB(A,B){let Q=A.map(((A,B)=>({fromLineNumber:B+1,toLineNumber:B+1,line:A})));return B.forEach((A=>{Q=function(A,B){const{range:Q,name:g,query:E}=B,{fromLineNumber:C,toLineNumber:I}=Q,D=[];let w=0;for(;wI){const[A,Q]=WB(B,I+1);o.lines.push(A),D.push(Q)}else o.lines.push(B);w++}else D.push(o);for(;wbB(A)))}function bB(A){return"line"in A?{lineNumber:A.fromLineNumber,tokens:A.line.tokens}:{annotationName:A.annotationName,annotationQuery:A.annotationQuery,fromLineNumber:A.fromLineNumber,toLineNumber:A.toLineNumber,lines:A.lines.map((A=>bB(A)))}}function WB(A,B){if("line"in A)return[Object.assign(Object.assign({},A),{toLineNumber:B-1}),Object.assign(Object.assign({},A),{fromLineNumber:B})];{const Q=[],g=[];return A.lines.forEach((A=>{if(A.toLineNumber=B)g.push(A);else{const[E,C]=WB(A,B);Q.push(E),g.push(C)}})),[Object.assign(Object.assign({},A),{toLineNumber:B-1,lines:Q}),Object.assign(Object.assign({},A),{fromLineNumber:B,lines:g})]}}function TB(A,B){const{inlineAnnotations:Q,multilineAnnotations:g}=function(A){const B=[],Q=[];return A.forEach((A=>{A.ranges.forEach((g=>{"lineNumber"in g?B.push(Object.assign(Object.assign({},A),{range:g})):Q.push(Object.assign(Object.assign({},A),{range:g}))}))})),{inlineAnnotations:B,multilineAnnotations:Q}}(B);return qB(A.map(((A,B)=>{const g=Q.filter((A=>A.range.lineNumber===B+1));return{lineNumber:B+1,tokens:fB(A,g)}})),g)}var XB=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],vB={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",9:"strikethrough"};function ZB(A,B){const Q=A.indexOf("[",B);if(-1!==Q){const B=A.indexOf("m",Q);return{sequence:A.substring(Q+2,B).split(";"),startPosition:Q,position:B+1}}return{position:A.length}}function jB(A,B){let Q=1;const g=A[B+Q++];let E;if("2"===g){const g=[A[B+Q++],A[B+Q++],A[B+Q]].map((A=>Number.parseInt(A)));3!==g.length||g.some((A=>Number.isNaN(A)))||(E={type:"rgb",rgb:g})}else if("5"===g){const g=Number.parseInt(A[B+Q]);Number.isNaN(g)||(E={type:"table",index:Number(g)})}return[Q,E]}function VB(A){const B=[];for(let Q=0;Q=90&&E<=97?B.push({type:"setForegroundColor",value:{type:"named",name:XB[E-90+8]}}):E>=100&&E<=107&&B.push({type:"setBackgroundColor",value:{type:"named",name:XB[E-100+8]}})}return B}function zB(A,B){const Q=function(){let A=null,B=null,Q=new Set;return{parse(g){const E=[];let C=0;do{const I=ZB(g,C),D=I.sequence?g.substring(C,I.startPosition):g.substring(C);if(D.length>0&&E.push({value:D,foreground:A,background:B,decorations:new Set(Q)}),I.sequence){const g=VB(I.sequence);for(const E of g)"resetAll"===E.type?(A=null,B=null,Q.clear()):"resetForegroundColor"===E.type?A=null:"resetBackgroundColor"===E.type?B=null:"resetDecoration"===E.type&&Q.delete(E.value);for(const E of g)"setForegroundColor"===E.type?A=E.value:"setBackgroundColor"===E.type?B=E.value:"setDecoration"===E.type&&Q.add(E.value)}C=I.position}while(Cfunction(A,B,Q){const g=A.parse(B),E=g.map((({value:A,foreground:B,background:g,decorations:E})=>{const C=_B(B,Q),I={};C&&(I.color=C);const D=_B(g,Q);return D&&(I.background=D),E.has("bold")&&(I.fontWeight="bold"),E.has("italic")&&(I.fontStyle="italic"),E.has("underline")&&(I.textDecoration="underline"),E.has("strikethrough")&&(I.textDecoration="line-through"),E.has("reverse")&&(I.color=D,I.background=C),E.has("dim")&&(I.opacity=.5),{content:A,style:I}}));return E}(Q,A,B)));return g}function _B(A,B){if(A){if("named"===A.type){return D(B,"terminal.ansi"+(A.name[0].toUpperCase()+A.name.slice(1)))}if("rgb"===A.type){const[B,Q,g]=A.rgb;return`rgb(${B}, ${Q}, ${g})`}}}async function $B(A,B){await Promise.all([LB(A),c(B)])}async function AQ(A,B,Q="dark-plus",g={}){const E=A||"",C=B||"text";if("string"!=typeof E)throw new Error("Syntax highlighter error: code must be a string");if("string"!=typeof C)throw new Error("Syntax highlighter error: lang must be a string");return await $B([C],Q),BQ(E,C,Q,g)}function BQ(A,B,Q="dark-plus",g={}){const E=A||"",C=B||"text";if("string"!=typeof E)throw new Error("Syntax highlighter error: code must be a string");if("string"!=typeof C)throw new Error("Syntax highlighter error: lang must be a string");const{langId:I,grammar:w}=HB(C),o=i(Q),s="text"==I?KB(E):"terminal"==I?zB(E,o):(null==g?void 0:g.scopes)?function(A,B,Q){return rB.setTheme(Q),FB(A,B,rB.getColorMap())}(E,w,o):RB(E,w,o),e="terminal"==I?function(A){return{color:D(A,"terminal.foreground"),background:D(A,"terminal.background")}}(o):{color:o.foreground,background:o.background};if(function(A){return"annotations"in A}(g)){return{lines:TB(s,(null==g?void 0:g.annotations)||[]),lang:I,style:e}}return{lines:s,lang:I,style:e}}async function QQ(A,B,Q){if(!Q)return{code:A,annotations:[]};await LB([B]);const{grammar:g}=HB(B),{newCode:E,annotations:C}=dB(A,g,B,Q);return{code:E,annotations:C}}async function gQ(A){if(!A)throw new Error("Syntax highlighter error: undefined theme");await $B([],A);return a(i(A))}function EQ(A){if(!A)throw new Error("Syntax highlighter error: undefined theme");return a(i(A))}export{F as LANG_NAMES,M as THEME_NAMES,kB as UnknownLanguageError,h as UnknownThemeError,QQ as extractAnnotations,gQ as getThemeColors,EQ as getThemeColorsSync,AQ as highlight,BQ as highlightSync,$B as preload}; +async function A(A,B){throw new Error("no fs")}async function B(A){const B=await fetch(`https://lighter.codehike.org/${A}.json`);return await B.json()}const Q=A=>/^#([A-Fa-f0-9]{3,4}){1,2}$/.test(A),g=(A,B)=>A.match(new RegExp(`.{${B}}`,"g")),E=A=>parseInt(A.repeat(2/A.length),16);function C(A,B){return void 0!==A?A/255:"number"!=typeof B||B<0||B>1?1:B}function I(A,B){if(!A)return A;const{r:I,g:D,b:w,a:o}=function(A){if(!A)return;if(!Q(A))throw new Error("Invalid color string, must be a valid hex color");const B=Math.floor((A.length-1)/3),I=g(A.slice(1),B),[D,w,o,s]=I.map(E);return{r:D,g:w,b:o,a:C(s,1)}}(A);return function(A){if(!A)return;const{r:B,g:Q,b:g,a:E}=A,C=Math.round(255*E);return`#${B.toString(16).padStart(2,"0")}${Q.toString(16).padStart(2,"0")}${g.toString(16).padStart(2,"0")}${C.toString(16).padStart(2,"0")}`}({r:I,g:D,b:w,a:o*B})}function D(A,B){const Q=A.colors||{};if(Q[B])return Q[B];const g=o[B];if(!g)throw new Error(`Unknown theme color key: ${B}`);return"string"==typeof g?D(A,g):function(A,B){const Q=B[A.type];if(Array.isArray(Q)){const[B,g,...E]=Q;return B(D(A,g),...E)}return Q}(A,g)}const w="#6FC3DF",o={"editor.foreground":{dark:"#bbbbbb",light:"#333333",hc:"#ffffff"},"editorLineNumber.foreground":{dark:"#858585",light:"#237893",hc:"#fffffe"},"editor.selectionBackground":{light:"#ADD6FF",dark:"#264F78",hc:"#f3f518"},"editor.background":{light:"#fffffe",dark:"#1E1E1E",hc:"#000000"},"editorGroupHeader.tabsBackground":{dark:"#252526",light:"#F3F3F3"},"tab.activeBackground":"editor.background","tab.activeForeground":{dark:"#ffffff",light:"#333333",hc:"#ffffff"},"tab.border":{dark:"#252526",light:"#F3F3F3",hc:w},"tab.activeBorder":"tab.activeBackground","tab.inactiveBackground":{dark:"#2D2D2D",light:"#ECECEC"},"tab.inactiveForeground":{dark:[I,"tab.activeForeground",.5],light:[I,"tab.activeForeground",.5],hc:"#ffffff"},"diffEditor.insertedTextBackground":{dark:"#9ccc2c33",light:"#9ccc2c40"},"diffEditor.removedTextBackground":{dark:"#ff000033",light:"#ff000033"},"diffEditor.insertedLineBackground":{dark:"#9bb95533",light:"#9bb95533"},"diffEditor.removedLineBackground":{dark:"#ff000033",light:"#ff000033"},"icon.foreground":{dark:"#C5C5C5",light:"#424242",hc:"#FFFFFF"},"sideBar.background":{dark:"#252526",light:"#F3F3F3",hc:"#000000"},"sideBar.foreground":"editor.foreground","sideBar.border":"sideBar.background","list.inactiveSelectionBackground":{dark:"#37373D",light:"#E4E6F1"},"list.inactiveSelectionForeground":{},"list.hoverBackground":{dark:"#2A2D2E",light:"#F0F0F0"},"list.hoverForeground":{},"editorGroupHeader.tabsBorder":{hc:w},"tab.activeBorderTop":{hc:w},"tab.hoverBackground":"tab.inactiveBackground","tab.hoverForeground":"tab.inactiveForeground","editor.rangeHighlightBackground":{dark:"#ffffff0b",light:"#fdff0033"},"editor.infoForeground":{dark:"#3794FF",light:"#1a85ff",hc:"#3794FF"},"input.border":{hc:w},"input.background":{dark:"#3C3C3C",light:"#fffffe",hc:"#000000"},"input.foreground":"editor.foreground","editor.lineHighlightBackground":{},focusBorder:{light:"#0090F1",dark:"#007FD4",hc:w},"editorGroup.border":{dark:"#444444",light:"#E7E7E7",hc:w},"list.activeSelectionBackground":{dark:"#094771",light:"#0060C0",hc:"#000000"},"list.activeSelectionForeground":{dark:"#fffffe",light:"#fffffe",hc:"#fffffe"},"lighter.inlineBackground":{dark:[I,"editor.background",.9],light:[I,"editor.background",.9]},"terminal.background":"editor.background","terminal.foreground":"editor.foreground","terminal.ansiBlack":{dark:"#000000",light:"#000000",hc:"#000000"},"terminal.ansiRed":{dark:"#cd3131",light:"#cd3131",hc:"#cd0000"},"terminal.ansiGreen":{dark:"#0DBC79",light:"#00BC00",hc:"#00cd00"},"terminal.ansiYellow":{dark:"#e5e510",light:"#949800",hc:"#cdcd00"},"terminal.ansiBlue":{dark:"#2472c8",light:"#0451a5",hc:"#0000ee"},"terminal.ansiMagenta":{dark:"#bc3fbc",light:"#bc05bc",hc:"#cd00cd"},"terminal.ansiCyan":{dark:"#11a8cd",light:"#0598bc",hc:"#00cdcd"},"terminal.ansiWhite":{dark:"#e5e5e5",light:"#555555",hc:"#e5e5e5"},"terminal.ansiBrightBlack":{dark:"#666666",light:"#666666",hc:"#7f7f7f"},"terminal.ansiBrightRed":{dark:"#f14c4c",light:"#cd3131",hc:"#ff0000"},"terminal.ansiBrightGreen":{dark:"#23d18b",light:"#14CE14",hc:"#00ff00"},"terminal.ansiBrightYellow":{dark:"#f5f543",light:"#b5ba00",hc:"#ffff00"},"terminal.ansiBrightBlue":{dark:"#3b8eea",light:"#0451a5",hc:"#5c5cff"},"terminal.ansiBrightMagenta":{dark:"#d670d6",light:"#bc05bc",hc:"#ff00ff"},"terminal.ansiBrightCyan":{dark:"#29b8db",light:"#0598bc",hc:"#00ffff"},"terminal.ansiBrightWhite":{dark:"#e5e5e5",light:"#a5a5a5",hc:"#ffffff"}},s=new Map,e=new Map;async function c(Q){if("string"==typeof Q){const g=Q;if(!M.includes(g))throw new h(g);if(!s.has(g)){const Q=async function(Q){try{return await A()}catch(A){return await B(`themes/${Q}`)}}(g).then((A=>(e.set(g,A),A)));s.set(g,Q)}return s.get(g)}return Q}function i(A){let B=null;if("string"==typeof A){if(B=e.get(A),!B)throw new Error("Syntax highlighting error: theme not loaded")}else B=A;return function(A){if(!A)return;const B=A.settings||A.tokenColors||[],Q={name:A.name||"unknown-theme",type:t(A),foreground:"",background:"",settings:B,colors:A.colors||{},colorNames:A.colorNames},g=B.find((A=>!A.scope));if(g){const{foreground:A,background:B}=(null==g?void 0:g.settings)||{},E={};A&&!Q.colors["editor.foreground"]&&(E["editor.foreground"]=A),B&&!Q.colors["editor.background"]&&(E["editor.background"]=B),Object.keys(E).length>0&&(Q.colors=Object.assign(Object.assign({},Q.colors),E)),Q.foreground=A,Q.background=B}g||(Q.settings=[{settings:{foreground:D(Q,"editor.foreground"),background:D(Q,"editor.background")}},...Q.settings]);if(Q.background=Q.background||D(Q,"editor.background"),Q.foreground=Q.foreground||D(Q,"editor.foreground"),"from-css"===A.type&&!Q.colorNames){const A={};let B=0;Q.settings=Q.settings.map((Q=>{const g=Object.assign(Object.assign({},Q),{settings:Object.assign({},Q.settings)}),{foreground:E,background:C}=g.settings||{};return E&&!A[E]&&(A[E]=`#${B.toString(16).padStart(6,"0")}`,B++),C&&!A[C]&&(A[C]=`#${B.toString(16).padStart(6,"0")}`,B++),E&&(g.settings.foreground=A[E]),C&&(g.settings.background=A[C]),g})),Q.colorNames=A}return Q}(B)}function t(A){var B;if("from-css"===A.type)return"from-css";return"light"===(A.type?A.type:(null===(B=A.name)||void 0===B?void 0:B.toLowerCase().includes("light"))?"light":"dark")?"light":"dark"}const M=["dark-plus","dracula-soft","dracula","github-dark","github-dark-dimmed","github-from-css","github-light","light-plus","material-darker","material-default","material-from-css","material-lighter","material-ocean","material-palenight","min-dark","min-light","monokai","nord","one-dark-pro","poimandres","slack-dark","slack-ochin","solarized-dark","solarized-light"];class h extends Error{constructor(A){super(`Unknown theme: ${A}`),this.theme=A}}function a(A){const B=B=>"colorScheme"===B?function(A){return"from-css"===A.type?"var(--ch-0)":A.type}(A):"foreground"===B?A.foreground:"background"===B?A.background:D(A,B);return{colorScheme:B("colorScheme"),foreground:B("foreground"),background:B("background"),lighter:{inlineBackground:B("lighter.inlineBackground")},editor:{background:B("editor.background"),foreground:B("editor.foreground"),lineHighlightBackground:B("editor.lineHighlightBackground"),rangeHighlightBackground:B("editor.rangeHighlightBackground"),infoForeground:B("editor.infoForeground"),selectionBackground:B("editor.selectionBackground")},focusBorder:B("focusBorder"),tab:{activeBackground:B("tab.activeBackground"),activeForeground:B("tab.activeForeground"),inactiveBackground:B("tab.inactiveBackground"),inactiveForeground:B("tab.inactiveForeground"),border:B("tab.border"),activeBorder:B("tab.activeBorder"),activeBorderTop:B("tab.activeBorderTop")},editorGroup:{border:B("editorGroup.border")},editorGroupHeader:{tabsBackground:B("editorGroupHeader.tabsBackground")},editorLineNumber:{foreground:B("editorLineNumber.foreground")},input:{background:B("input.background"),foreground:B("input.foreground"),border:B("input.border")},icon:{foreground:B("icon.foreground")},sideBar:{background:B("sideBar.background"),foreground:B("sideBar.foreground"),border:B("sideBar.border")},list:{activeSelectionBackground:B("list.activeSelectionBackground"),activeSelectionForeground:B("list.activeSelectionForeground"),hoverBackground:B("list.hoverBackground"),hoverForeground:B("list.hoverForeground")}}}const F=["abap","actionscript-3","ada","apache","apex","apl","applescript","ara","asm","astro","awk","ballerina","bash","bat","batch","be","beancount","berry","bibtex","bicep","blade","c","c#","cadence","cdc","clarity","clj","clojure","cmake","cmd","cobol","codeql","coffee","console","cpp","crystal","cs","csharp","css","cue","cypher","d","dart","dax","diff","docker","dockerfile","dream-maker","elixir","elm","erb","erl","erlang","f#","fish","fs","fsharp","fsl","gdresource","gdscript","gdshader","gherkin","git-commit","git-rebase","glimmer-js","glimmer-ts","glsl","gnuplot","go","graphql","groovy","hack","haml","handlebars","haskell","hbs","hcl","hjson","hlsl","hs","html","http","imba","ini","jade","java","javascript","jinja-html","jison","js","json","json5","jsonc","jsonl","jsonnet","jssm","jsx","julia","kotlin","kql","kusto","latex","less","liquid","lisp","logo","lua","make","makefile","markdown","marko","matlab","md","mdx","mermaid","narrat","nextflow","nginx","nim","nix","objc","objective-c","objective-cpp","ocaml","pascal","perl","perl6","php","plsql","postcss","powerquery","powershell","prisma","prolog","properties","proto","ps","ps1","pug","puppet","purescript","py","python","ql","r","raku","razor","rb","reg","rel","riscv","rs","rst","ruby","rust","sas","sass","scala","scheme","scss","sh","shader","shaderlab","shell","shellscript","shellsession","smalltalk","solidity","sparql","sql","ssh-config","stata","styl","stylus","svelte","swift","system-verilog","tasl","tcl","terminal","tex","text","toml","ts","tsx","turtle","twig","txt","typescript","v","vb","verilog","vhdl","vim","viml","vimscript","vue","vue-html","vyper","wasm","wenyan","wgsl","wolfram","xml","xsl","yaml","yml","zenscript","zsh","文言"],n={abap:"source.abap","actionscript-3":"source.actionscript.3",ada:"source.ada",apache:"source.apacheconf",apex:"source.apex",apl:"source.apl",applescript:"source.applescript",ara:"source.ara",asm:"source.asm.x86_64",astro:"source.astro",awk:"source.awk",ballerina:"source.ballerina",bat:"source.batchfile",batch:"source.batchfile",beancount:"text.beancount",berry:"source.berry",be:"source.berry",bibtex:"text.bibtex",bicep:"source.bicep",blade:"text.html.php.blade",c:"source.c",cadence:"source.cadence",cdc:"source.cadence",clarity:"source.clar",clojure:"source.clojure",clj:"source.clojure",cmake:"source.cmake",cobol:"source.cobol",codeql:"source.ql",ql:"source.ql",coffee:"source.coffee",cpp:"source.cpp",crystal:"source.crystal",csharp:"source.cs","c#":"source.cs",cs:"source.cs",css:"source.css",cue:"source.cue",cypher:"source.cypher",d:"source.d",dart:"source.dart",dax:"source.dax",diff:"source.diff",docker:"source.dockerfile",dockerfile:"source.dockerfile","dream-maker":"source.dm",elixir:"source.elixir",elm:"source.elm",erb:"text.html.erb",erlang:"source.erlang",erl:"source.erlang",fish:"source.fish",fsharp:"source.fsharp","f#":"source.fsharp",fs:"source.fsharp",gdresource:"source.gdresource",gdscript:"source.gdscript",gdshader:"source.gdshader",gherkin:"text.gherkin.feature","git-commit":"text.git-commit","git-rebase":"text.git-rebase","glimmer-js":"source.gjs","glimmer-ts":"source.gts",glsl:"source.glsl",gnuplot:"source.gnuplot",go:"source.go",graphql:"source.graphql",groovy:"source.groovy",hack:"source.hack",haml:"text.haml",handlebars:"text.html.handlebars",hbs:"text.html.handlebars",haskell:"source.haskell",hs:"source.haskell",hcl:"source.hcl",hjson:"source.hjson",hlsl:"source.hlsl",html:"text.html.basic",http:"source.http",imba:"source.imba",ini:"source.ini",properties:"source.ini",java:"source.java",javascript:"source.js",js:"source.js","jinja-html":"text.html.jinja",jison:"source.jison",json:"source.json",json5:"source.json5",jsonc:"source.json.comments",jsonl:"source.json.lines",jsonnet:"source.jsonnet",jssm:"source.jssm",fsl:"source.jssm",jsx:"source.js.jsx",julia:"source.julia",kotlin:"source.kotlin",kusto:"source.kusto",kql:"source.kusto",latex:"text.tex.latex",less:"source.css.less",liquid:"text.html.liquid",lisp:"source.lisp",logo:"source.logo",lua:"source.lua",make:"source.makefile",makefile:"source.makefile",markdown:"text.html.markdown",md:"text.html.markdown",marko:"text.marko",matlab:"source.matlab",mdx:"source.mdx",mermaid:"source.mermaid",narrat:"source.narrat",nextflow:"source.nextflow",nginx:"source.nginx",nim:"source.nim",nix:"source.nix","objective-c":"source.objc",objc:"source.objc","objective-cpp":"source.objcpp",ocaml:"source.ocaml",pascal:"source.pascal",perl:"source.perl",php:"source.php",plsql:"source.plsql.oracle",postcss:"source.css.postcss",powerquery:"source.powerquery",powershell:"source.powershell",ps:"source.powershell",ps1:"source.powershell",prisma:"source.prisma",prolog:"source.prolog",proto:"source.proto",pug:"text.pug",jade:"text.pug",puppet:"source.puppet",purescript:"source.purescript",python:"source.python",py:"source.python",r:"source.r",raku:"source.perl.6",perl6:"source.perl.6",razor:"text.aspnetcorerazor",reg:"source.reg",rel:"source.rel",riscv:"source.riscv",rst:"source.rst",ruby:"source.ruby",rb:"source.ruby",rust:"source.rust",rs:"source.rust",sas:"source.sas",sass:"source.sass",scala:"source.scala",scheme:"source.scheme",scss:"source.css.scss",shaderlab:"source.shaderlab",shader:"source.shaderlab",shellscript:"source.shell",bash:"source.shell",console:"source.shell",sh:"source.shell",shell:"source.shell",zsh:"source.shell",shellsession:"text.shell-session",smalltalk:"source.smalltalk",solidity:"source.solidity",sparql:"source.sparql",sql:"source.sql","ssh-config":"source.ssh-config",stata:"source.stata",stylus:"source.stylus",styl:"source.stylus",svelte:"source.svelte",swift:"source.swift","system-verilog":"source.systemverilog",tasl:"source.tasl",tcl:"source.tcl",tex:"text.tex",toml:"source.toml",tsx:"source.tsx",turtle:"source.turtle",twig:"text.html.twig",txt:"source.txt",typescript:"source.ts",ts:"source.ts",v:"source.v",vb:"source.asp.vb.net",cmd:"source.asp.vb.net",verilog:"source.verilog",vhdl:"source.vhdl",viml:"source.viml",vim:"source.viml",vimscript:"source.viml","vue-html":"text.html.vue-html",vue:"source.vue",vyper:"source.vyper",wasm:"source.wat",wenyan:"source.wenyan","文言":"source.wenyan",wgsl:"source.wgsl",wolfram:"source.wolfram",xml:"text.xml",xsl:"text.xml.xsl",yaml:"source.yaml",yml:"source.yaml",zenscript:"source.zenscript"},G={"source.abap":{id:"abap",path:"abap.tmLanguage.json",embeddedScopes:[]},"source.actionscript.3":{id:"actionscript-3",path:"actionscript-3.tmLanguage.json",embeddedScopes:[]},"source.ada":{id:"ada",path:"ada.tmLanguage.json",embeddedScopes:[]},"source.apacheconf":{id:"apache",path:"apache.tmLanguage.json",embeddedScopes:[]},"source.apex":{id:"apex",path:"apex.tmLanguage.json",embeddedScopes:[]},"source.apl":{id:"apl",path:"apl.tmLanguage.json",embeddedScopes:["source.java","source.json","source.js","source.css","text.xml","text.html.basic"]},"source.applescript":{id:"applescript",path:"applescript.tmLanguage.json",embeddedScopes:[]},"source.ara":{id:"ara",path:"ara.tmLanguage.json",embeddedScopes:[]},"source.asm.x86_64":{id:"asm",path:"asm.tmLanguage.json",embeddedScopes:[]},"source.astro":{id:"astro",path:"astro.tmLanguage.json",embeddedScopes:["source.tsx","source.css.postcss","source.css.less","source.css.scss","source.css","source.sass","source.stylus","source.ts","source.js","source.json"]},"source.awk":{id:"awk",path:"awk.tmLanguage.json",embeddedScopes:[]},"source.ballerina":{id:"ballerina",path:"ballerina.tmLanguage.json",embeddedScopes:[]},"source.batchfile":{id:"bat",path:"bat.tmLanguage.json",embeddedScopes:[]},"text.beancount":{id:"beancount",path:"beancount.tmLanguage.json",embeddedScopes:[]},"source.berry":{id:"berry",path:"berry.tmLanguage.json",embeddedScopes:[]},"text.bibtex":{id:"bibtex",path:"bibtex.tmLanguage.json",embeddedScopes:[]},"source.bicep":{id:"bicep",path:"bicep.tmLanguage.json",embeddedScopes:[]},"text.html.php.blade":{id:"blade",path:"blade.tmLanguage.json",embeddedScopes:["source.java","source.css","source.json","source.js","source.sql","text.xml","text.html.basic"]},"source.c":{id:"c",path:"c.tmLanguage.json",embeddedScopes:[]},"source.cadence":{id:"cadence",path:"cadence.tmLanguage.json",embeddedScopes:[]},"source.clar":{id:"clarity",path:"clarity.tmLanguage.json",embeddedScopes:[]},"source.clojure":{id:"clojure",path:"clojure.tmLanguage.json",embeddedScopes:[]},"source.cmake":{id:"cmake",path:"cmake.tmLanguage.json",embeddedScopes:[]},"source.cobol":{id:"cobol",path:"cobol.tmLanguage.json",embeddedScopes:["source.css","source.js","source.java","text.html.basic","source.sql"]},"source.ql":{id:"codeql",path:"codeql.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.stylus","source.sass","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.tsx","source.ts","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.css.scss","source.swift","source.objc","source.css.less","source.json.comments","source.json","source.js","text.pug","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.coffee","source.clojure","source.batchfile","source.yaml","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","text.html.basic","source.css","text.html.markdown"]},"source.coffee":{id:"coffee",path:"coffee.tmLanguage.json",embeddedScopes:["source.js"]},"source.cpp":{id:"cpp",path:"cpp.tmLanguage.json",embeddedScopes:["source.c","source.sql","source.glsl"]},"source.crystal":{id:"crystal",path:"crystal.tmLanguage.json",embeddedScopes:["source.shell","source.js","source.c","source.css","source.sql","text.html.basic"]},"source.cs":{id:"csharp",path:"csharp.tmLanguage.json",embeddedScopes:[]},"source.css":{id:"css",path:"css.tmLanguage.json",embeddedScopes:[]},"source.cue":{id:"cue",path:"cue.tmLanguage.json",embeddedScopes:[]},"source.cypher":{id:"cypher",path:"cypher.tmLanguage.json",embeddedScopes:[]},"source.d":{id:"d",path:"d.tmLanguage.json",embeddedScopes:[]},"source.dart":{id:"dart",path:"dart.tmLanguage.json",embeddedScopes:[]},"source.dax":{id:"dax",path:"dax.tmLanguage.json",embeddedScopes:[]},"source.diff":{id:"diff",path:"diff.tmLanguage.json",embeddedScopes:[]},"source.dockerfile":{id:"docker",path:"docker.tmLanguage.json",embeddedScopes:[]},"source.dm":{id:"dream-maker",path:"dream-maker.tmLanguage.json",embeddedScopes:[]},"source.elixir":{id:"elixir",path:"elixir.tmLanguage.json",embeddedScopes:["source.css","source.js","text.html.basic"]},"source.elm":{id:"elm",path:"elm.tmLanguage.json",embeddedScopes:["source.c","source.glsl"]},"text.html.erb":{id:"erb",path:"erb.tmLanguage.json",embeddedScopes:["source.java","source.lua","source.shell","source.c","source.sql","text.xml","source.css","source.js","source.ruby","text.html.basic"]},"source.erlang":{id:"erlang",path:"erlang.tmLanguage.json",embeddedScopes:[]},"source.fish":{id:"fish",path:"fish.tmLanguage.json",embeddedScopes:[]},"source.fsharp":{id:"fsharp",path:"fsharp.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.stylus","source.sass","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.cs","source.tsx","source.ts","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.css.scss","source.swift","source.objc","source.css.less","source.json.comments","source.json","source.js","text.pug","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.coffee","source.clojure","source.batchfile","source.yaml","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","text.html.basic","source.css","text.html.markdown"]},"source.gdresource":{id:"gdresource",path:"gdresource.tmLanguage.json",embeddedScopes:["source.gdscript","source.gdshader"]},"source.gdscript":{id:"gdscript",path:"gdscript.tmLanguage.json",embeddedScopes:[]},"source.gdshader":{id:"gdshader",path:"gdshader.tmLanguage.json",embeddedScopes:[]},"text.gherkin.feature":{id:"gherkin",path:"gherkin.tmLanguage.json",embeddedScopes:[]},"text.git-commit":{id:"git-commit",path:"git-commit.tmLanguage.json",embeddedScopes:["source.diff"]},"text.git-rebase":{id:"git-rebase",path:"git-rebase.tmLanguage.json",embeddedScopes:["source.shell"]},"source.gjs":{id:"glimmer-js",path:"glimmer-js.tmLanguage.json",embeddedScopes:["source.yaml","source.css","text.html.basic","text.html.handlebars","source.js"]},"source.gts":{id:"glimmer-ts",path:"glimmer-ts.tmLanguage.json",embeddedScopes:["source.yaml","source.js","source.css","text.html.basic","text.html.handlebars","source.ts"]},"source.glsl":{id:"glsl",path:"glsl.tmLanguage.json",embeddedScopes:["source.c"]},"source.gnuplot":{id:"gnuplot",path:"gnuplot.tmLanguage.json",embeddedScopes:[]},"source.go":{id:"go",path:"go.tmLanguage.json",embeddedScopes:[]},"source.graphql":{id:"graphql",path:"graphql.tmLanguage.json",embeddedScopes:["source.tsx","source.js.jsx","source.ts","source.js"]},"source.groovy":{id:"groovy",path:"groovy.tmLanguage.json",embeddedScopes:[]},"source.hack":{id:"hack",path:"hack.tmLanguage.json",embeddedScopes:["source.css","source.js","source.sql","text.html.basic"]},"text.haml":{id:"haml",path:"haml.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.stylus","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.tsx","source.ts","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.css.scss","source.swift","source.objc","source.css.less","source.json.comments","source.json","text.pug","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.clojure","source.batchfile","source.yaml","text.xml.xsl","source.asp.vb.net","source.php","source.r","source.perl","source.makefile","source.java","source.ini","source.lua","source.shell","source.c","source.sql","text.xml","text.html.basic","source.css","text.html.markdown","source.coffee","source.sass","source.js","source.ruby"]},"text.html.handlebars":{id:"handlebars",path:"handlebars.tmLanguage.json",embeddedScopes:["source.yaml","source.js","source.css","text.html.basic"]},"source.haskell":{id:"haskell",path:"haskell.tmLanguage.json",embeddedScopes:[]},"source.hcl":{id:"hcl",path:"hcl.tmLanguage.json",embeddedScopes:[]},"source.hjson":{id:"hjson",path:"hjson.tmLanguage.json",embeddedScopes:[]},"source.hlsl":{id:"hlsl",path:"hlsl.tmLanguage.json",embeddedScopes:[]},"text.html.basic":{id:"html",path:"html.tmLanguage.json",embeddedScopes:["source.css","source.js"]},"source.http":{id:"http",path:"http.tmLanguage.json",embeddedScopes:["source.tsx","source.js.jsx","source.ts","source.js","source.java","source.graphql","text.xml","source.json","source.shell"]},"source.imba":{id:"imba",path:"imba.tmLanguage.json",embeddedScopes:[]},"source.ini":{id:"ini",path:"ini.tmLanguage.json",embeddedScopes:[]},"source.java":{id:"java",path:"java.tmLanguage.json",embeddedScopes:[]},"source.js":{id:"javascript",path:"javascript.tmLanguage.json",embeddedScopes:[]},"text.html.jinja":{id:"jinja-html",path:"jinja-html.tmLanguage.json",embeddedScopes:["source.css","source.js","text.html.basic"]},"source.jison":{id:"jison",path:"jison.tmLanguage.json",embeddedScopes:["source.js"]},"source.json":{id:"json",path:"json.tmLanguage.json",embeddedScopes:[]},"source.json5":{id:"json5",path:"json5.tmLanguage.json",embeddedScopes:[]},"source.json.comments":{id:"jsonc",path:"jsonc.tmLanguage.json",embeddedScopes:[]},"source.json.lines":{id:"jsonl",path:"jsonl.tmLanguage.json",embeddedScopes:[]},"source.jsonnet":{id:"jsonnet",path:"jsonnet.tmLanguage.json",embeddedScopes:[]},"source.jssm":{id:"jssm",path:"jssm.tmLanguage.json",embeddedScopes:[]},"source.js.jsx":{id:"jsx",path:"jsx.tmLanguage.json",embeddedScopes:[]},"source.julia":{id:"julia",path:"julia.tmLanguage.json",embeddedScopes:["source.c","source.glsl","source.sql","source.r","source.js","source.python","source.cpp"]},"source.kotlin":{id:"kotlin",path:"kotlin.tmLanguage.json",embeddedScopes:[]},"source.kusto":{id:"kusto",path:"kusto.tmLanguage.json",embeddedScopes:[]},"text.tex.latex":{id:"latex",path:"latex.tmLanguage.json",embeddedScopes:["source.glsl","source.shell","source.sql","source.cpp","source.c","source.r","source.gnuplot","source.scala","source.rust","source.yaml","source.python","source.ts","source.js","source.ruby","source.julia","source.lua","source.java","text.xml","text.html.basic","source.haskell","source.css","text.tex"]},"source.css.less":{id:"less",path:"less.tmLanguage.json",embeddedScopes:["source.css"]},"text.html.liquid":{id:"liquid",path:"liquid.tmLanguage.json",embeddedScopes:["source.js","source.json","source.css","text.html.basic"]},"source.lisp":{id:"lisp",path:"lisp.tmLanguage.json",embeddedScopes:[]},"source.logo":{id:"logo",path:"logo.tmLanguage.json",embeddedScopes:[]},"source.lua":{id:"lua",path:"lua.tmLanguage.json",embeddedScopes:["source.c"]},"source.makefile":{id:"make",path:"make.tmLanguage.json",embeddedScopes:[]},"text.html.markdown":{id:"markdown",path:"markdown.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.stylus","source.sass","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.tsx","source.ts","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.css.scss","source.swift","source.objc","source.css.less","source.json.comments","source.json","source.js","text.pug","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.coffee","source.clojure","source.batchfile","source.yaml","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","text.html.basic","source.css"]},"text.marko":{id:"marko",path:"marko.tmLanguage.json",embeddedScopes:["source.js","source.css.scss","source.css.less","source.css"]},"source.matlab":{id:"matlab",path:"matlab.tmLanguage.json",embeddedScopes:[]},"source.mdx":{id:"mdx",path:"mdx.tmLanguage.json",embeddedScopes:["source.gnuplot","text.tex","source.stylus","source.sass","text.bibtex","text.tex.latex","text.html.handlebars","source.dart","source.fsharp","source.powershell","source.perl.6","source.json.comments","text.pug","source.groovy","text.git-rebase","text.git-commit","source.batchfile","text.xml.xsl","source.asp.vb.net","source.php","source.js.jsx","source.glsl","source.ts","source.swift","text.xml","source.sql","text.shell-session","source.shell","source.css.scss","source.scala","source.rust","source.ruby","source.r","source.python","source.perl","source.objc","text.html.markdown","source.makefile","source.lua","source.css.less","source.kotlin","source.julia","source.json","source.js","source.java","source.ini","text.html.basic","source.haskell","source.graphql","source.go","source.erlang","source.elm","source.elixir","source.dockerfile","source.diff","source.css","source.cs","source.cpp","source.coffee","source.clojure","source.c","source.yaml","source.toml","source.tsx"]},"source.mermaid":{id:"mermaid",path:"mermaid.tmLanguage.json",embeddedScopes:[]},"source.narrat":{id:"narrat",path:"narrat.tmLanguage.json",embeddedScopes:[]},"source.nextflow":{id:"nextflow",path:"nextflow.tmLanguage.json",embeddedScopes:[]},"source.nginx":{id:"nginx",path:"nginx.tmLanguage.json",embeddedScopes:["source.c","source.lua"]},"source.nim":{id:"nim",path:"nim.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.stylus","source.sass","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.tsx","source.ts","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.css.scss","source.swift","source.objc","source.css.less","source.json.comments","source.json","text.pug","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.coffee","source.clojure","source.batchfile","source.yaml","text.xml.xsl","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.ini","source.java","text.html.markdown","source.glsl","source.css","source.js","text.xml","text.html.basic","source.c"]},"source.nix":{id:"nix",path:"nix.tmLanguage.json",embeddedScopes:[]},"source.objc":{id:"objective-c",path:"objective-c.tmLanguage.json",embeddedScopes:[]},"source.objcpp":{id:"objective-cpp",path:"objective-cpp.tmLanguage.json",embeddedScopes:[]},"source.ocaml":{id:"ocaml",path:"ocaml.tmLanguage.json",embeddedScopes:[]},"source.pascal":{id:"pascal",path:"pascal.tmLanguage.json",embeddedScopes:[]},"source.perl":{id:"perl",path:"perl.tmLanguage.json",embeddedScopes:["source.java","source.sql","source.js","source.css","text.xml","text.html.basic"]},"source.php":{id:"php",path:"php.tmLanguage.json",embeddedScopes:["source.java","source.css","source.json","source.js","source.sql","text.xml","text.html.basic"]},"source.plsql.oracle":{id:"plsql",path:"plsql.tmLanguage.json",embeddedScopes:[]},"source.css.postcss":{id:"postcss",path:"postcss.tmLanguage.json",embeddedScopes:[]},"source.powerquery":{id:"powerquery",path:"powerquery.tmLanguage.json",embeddedScopes:[]},"source.powershell":{id:"powershell",path:"powershell.tmLanguage.json",embeddedScopes:[]},"source.prisma":{id:"prisma",path:"prisma.tmLanguage.json",embeddedScopes:[]},"source.prolog":{id:"prolog",path:"prolog.tmLanguage.json",embeddedScopes:[]},"source.proto":{id:"proto",path:"proto.tmLanguage.json",embeddedScopes:[]},"text.pug":{id:"pug",path:"pug.tmLanguage.json",embeddedScopes:["text.html.basic","source.coffee","source.stylus","source.css.scss","source.sass","source.css","source.js"]},"source.puppet":{id:"puppet",path:"puppet.tmLanguage.json",embeddedScopes:[]},"source.purescript":{id:"purescript",path:"purescript.tmLanguage.json",embeddedScopes:[]},"source.python":{id:"python",path:"python.tmLanguage.json",embeddedScopes:[]},"source.r":{id:"r",path:"r.tmLanguage.json",embeddedScopes:[]},"source.perl.6":{id:"raku",path:"raku.tmLanguage.json",embeddedScopes:[]},"text.aspnetcorerazor":{id:"razor",path:"razor.tmLanguage.json",embeddedScopes:["source.css","source.js","source.cs","text.html.basic"]},"source.reg":{id:"reg",path:"reg.tmLanguage.json",embeddedScopes:[]},"source.rel":{id:"rel",path:"rel.tmLanguage.json",embeddedScopes:[]},"source.riscv":{id:"riscv",path:"riscv.tmLanguage.json",embeddedScopes:[]},"source.rst":{id:"rst",path:"rst.tmLanguage.json",embeddedScopes:["source.java","source.lua","source.c","source.css","text.xml","text.html.basic","source.sql","source.glsl","source.ruby","source.cmake","source.yaml","source.shell","source.js","source.python","source.cpp"]},"source.ruby":{id:"ruby",path:"ruby.tmLanguage.json",embeddedScopes:["source.java","source.lua","source.shell","source.js","source.c","source.css","source.sql","text.xml","text.html.basic"]},"source.rust":{id:"rust",path:"rust.tmLanguage.json",embeddedScopes:[]},"source.sas":{id:"sas",path:"sas.tmLanguage.json",embeddedScopes:["source.sql"]},"source.sass":{id:"sass",path:"sass.tmLanguage.json",embeddedScopes:[]},"source.scala":{id:"scala",path:"scala.tmLanguage.json",embeddedScopes:[]},"source.scheme":{id:"scheme",path:"scheme.tmLanguage.json",embeddedScopes:[]},"source.css.scss":{id:"scss",path:"scss.tmLanguage.json",embeddedScopes:["source.css"]},"source.shaderlab":{id:"shaderlab",path:"shaderlab.tmLanguage.json",embeddedScopes:["source.hlsl"]},"source.shell":{id:"shellscript",path:"shellscript.tmLanguage.json",embeddedScopes:[]},"text.shell-session":{id:"shellsession",path:"shellsession.tmLanguage.json",embeddedScopes:["source.shell"]},"source.smalltalk":{id:"smalltalk",path:"smalltalk.tmLanguage.json",embeddedScopes:[]},"source.solidity":{id:"solidity",path:"solidity.tmLanguage.json",embeddedScopes:[]},"source.sparql":{id:"sparql",path:"sparql.tmLanguage.json",embeddedScopes:["source.turtle"]},"source.sql":{id:"sql",path:"sql.tmLanguage.json",embeddedScopes:[]},"source.ssh-config":{id:"ssh-config",path:"ssh-config.tmLanguage.json",embeddedScopes:[]},"source.stata":{id:"stata",path:"stata.tmLanguage.json",embeddedScopes:["source.sql"]},"source.stylus":{id:"stylus",path:"stylus.tmLanguage.json",embeddedScopes:[]},"source.svelte":{id:"svelte",path:"svelte.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.tsx","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.swift","source.objc","source.json.comments","source.json","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.clojure","source.batchfile","source.yaml","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","text.html.basic","text.html.markdown","text.pug","source.css.postcss","source.css.less","source.css.scss","source.css","source.sass","source.stylus","source.coffee","source.ts","source.js"]},"source.swift":{id:"swift",path:"swift.tmLanguage.json",embeddedScopes:[]},"source.systemverilog":{id:"system-verilog",path:"system-verilog.tmLanguage.json",embeddedScopes:[]},"source.tasl":{id:"tasl",path:"tasl.tmLanguage.json",embeddedScopes:[]},"source.tcl":{id:"tcl",path:"tcl.tmLanguage.json",embeddedScopes:[]},"text.tex":{id:"tex",path:"tex.tmLanguage.json",embeddedScopes:["source.r"]},"source.toml":{id:"toml",path:"toml.tmLanguage.json",embeddedScopes:[]},"source.tsx":{id:"tsx",path:"tsx.tmLanguage.json",embeddedScopes:[]},"source.turtle":{id:"turtle",path:"turtle.tmLanguage.json",embeddedScopes:[]},"text.html.twig":{id:"twig",path:"twig.tmLanguage.json",embeddedScopes:["source.java","source.lua","source.shell","source.c","source.json","source.sql","text.xml","text.html.basic","source.ruby","source.python","source.php","source.js","source.css"]},"source.txt":{id:"txt",path:"txt.tmLanguage.json",embeddedScopes:[]},"source.ts":{id:"typescript",path:"typescript.tmLanguage.json",embeddedScopes:[]},"source.v":{id:"v",path:"v.tmLanguage.json",embeddedScopes:[]},"source.asp.vb.net":{id:"vb",path:"vb.tmLanguage.json",embeddedScopes:[]},"source.verilog":{id:"verilog",path:"verilog.tmLanguage.json",embeddedScopes:[]},"source.vhdl":{id:"vhdl",path:"vhdl.tmLanguage.json",embeddedScopes:[]},"source.viml":{id:"viml",path:"viml.tmLanguage.json",embeddedScopes:[]},"text.html.vue-html":{id:"vue-html",path:"vue-html.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.swift","source.objc","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.coffee","source.clojure","source.batchfile","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","source.graphql","source.toml","source.yaml","source.json5","source.json.comments","source.json","source.tsx","source.js.jsx","source.ts","source.css.less","source.css.scss","source.css","source.sass","source.stylus","text.pug","text.html.markdown","text.html.basic","source.js","source.vue"]},"source.vue":{id:"vue",path:"vue.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.swift","source.objc","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.coffee","source.clojure","source.batchfile","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","source.graphql","source.toml","source.yaml","source.json5","source.json.comments","source.json","source.tsx","source.js.jsx","source.ts","source.js","source.css.less","source.css.scss","source.css","source.sass","source.stylus","text.pug","text.html.markdown","text.html.basic"]},"source.vyper":{id:"vyper",path:"vyper.tmLanguage.json",embeddedScopes:[]},"source.wat":{id:"wasm",path:"wasm.tmLanguage.json",embeddedScopes:[]},"source.wenyan":{id:"wenyan",path:"wenyan.tmLanguage.json",embeddedScopes:[]},"source.wgsl":{id:"wgsl",path:"wgsl.tmLanguage.json",embeddedScopes:[]},"source.wolfram":{id:"wolfram",path:"wolfram.tmLanguage.json",embeddedScopes:[]},"text.xml":{id:"xml",path:"xml.tmLanguage.json",embeddedScopes:["source.java"]},"text.xml.xsl":{id:"xsl",path:"xsl.tmLanguage.json",embeddedScopes:["source.java","text.xml"]},"source.yaml":{id:"yaml",path:"yaml.tmLanguage.json",embeddedScopes:[]},"source.zenscript":{id:"zenscript",path:"zenscript.tmLanguage.json",embeddedScopes:[]}};var r={d:(A,B)=>{for(var Q in B)r.o(B,Q)&&!r.o(A,Q)&&Object.defineProperty(A,Q,{enumerable:!0,get:B[Q]})},o:(A,B)=>Object.prototype.hasOwnProperty.call(A,B)},N={};r.d(N,{_X:()=>XA,Bz:()=>TA,ot:()=>WA,u:()=>bA,jG:()=>K,Pn:()=>vA});const L="undefined"!=typeof process&&!!process.env.VSCODE_TEXTMATE_DEBUG;var H;function k(A,B){const Q=[],g=function(A){let B=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,Q=B.exec(A);return{next:()=>{if(!Q)return null;const g=Q[0];return Q=B.exec(A),g}}}(A);let E=g.next();for(;null!==E;){let A=0;if(2===E.length&&":"===E.charAt(1)){switch(E.charAt(0)){case"R":A=1;break;case"L":A=-1;break;default:console.log(`Unknown priority ${E} in scope selector`)}E=g.next()}let B=I();if(Q.push({matcher:B,priority:A}),","!==E)break;E=g.next()}return Q;function C(){if("-"===E){E=g.next();const A=C();return B=>!!A&&!A(B)}if("("===E){E=g.next();const A=function(){const A=[];let B=I();for(;B&&(A.push(B),"|"===E||","===E);){do{E=g.next()}while("|"===E||","===E);B=I()}return B=>A.some((A=>A(B)))}();return")"===E&&(E=g.next()),A}if(R(E)){const A=[];do{A.push(E),E=g.next()}while(R(E));return Q=>B(A,Q)}return null}function I(){const A=[];let B=C();for(;B;)A.push(B),B=C();return B=>A.every((A=>A(B)))}}function R(A){return!!A&&!!A.match(/[\w\.:]+/)}function K(A){"function"==typeof A.dispose&&A.dispose()}function Y(A){return Array.isArray(A)?function(A){let B=[];for(let Q=0,g=A.length;Q{for(let Q in B)A[Q]=B[Q]})),A}function P(A){const B=~A.lastIndexOf("/")||~A.lastIndexOf("\\");return 0===B?A:~B==A.length-1?P(A.substring(0,A.length-1)):A.substr(1+~B)}!function(A){A.toBinaryStr=function(A){let B=A.toString(2);for(;B.length<32;)B="0"+B;return B},A.print=function(B){const Q=A.getLanguageId(B),g=A.getTokenType(B),E=A.getFontStyle(B),C=A.getForeground(B),I=A.getBackground(B);console.log({languageId:Q,tokenType:g,fontStyle:E,foreground:C,background:I})},A.getLanguageId=function(A){return(255&A)>>>0},A.getTokenType=function(A){return(768&A)>>>8},A.containsBalancedBrackets=function(A){return 0!=(1024&A)},A.getFontStyle=function(A){return(30720&A)>>>11},A.getForeground=function(A){return(16744448&A)>>>15},A.getBackground=function(A){return(4278190080&A)>>>24},A.set=function(B,Q,g,E,C,I,D){let w=A.getLanguageId(B),o=A.getTokenType(B),s=A.containsBalancedBrackets(B)?1:0,e=A.getFontStyle(B),c=A.getForeground(B),i=A.getBackground(B);return 0!==Q&&(w=Q),8!==g&&(o=g),null!==E&&(s=E?1:0),-1!==C&&(e=C),0!==I&&(c=I),0!==D&&(i=D),(w<<0|o<<8|s<<10|e<<11|c<<15|i<<24)>>>0}}(H||(H={}));let u=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g;class y{static hasCaptures(A){return null!==A&&(u.lastIndex=0,u.test(A))}static replaceCaptures(A,B,Q){return A.replace(u,((A,g,E,C)=>{let I=Q[parseInt(g||E,10)];if(!I)return A;{let A=B.substring(I.start,I.end);for(;"."===A[0];)A=A.substring(1);switch(C){case"downcase":return A.toLowerCase();case"upcase":return A.toUpperCase();default:return A}}}))}}function J(A,B){return AB?1:0}function S(A,B){if(null===A&&null===B)return 0;if(!A)return-1;if(!B)return 1;let Q=A.length,g=B.length;if(Q===g){for(let g=0;g`);return}const C=Q.lookup(B);A instanceof x?T({baseGrammar:C,selfGrammar:E},g):W(A.ruleName,{baseGrammar:C,selfGrammar:E,repository:E.repository},g);const I=Q.injections(A.scopeName);if(I)for(const A of I)g.add(new x(A))}function W(A,B,Q){B.repository&&B.repository[A]&&X([B.repository[A]],B,Q)}function T(A,B){A.selfGrammar.patterns&&Array.isArray(A.selfGrammar.patterns)&&X(A.selfGrammar.patterns,{...A,repository:A.selfGrammar.repository},B),A.selfGrammar.injections&&X(Object.values(A.selfGrammar.injections),{...A,repository:A.selfGrammar.repository},B)}function X(A,B,Q){for(const g of A){if(Q.visitedRule.has(g))continue;Q.visitedRule.add(g);const A=g.repository?U({},B.repository,g.repository):B.repository;Array.isArray(g.patterns)&&X(g.patterns,{...B,repository:A},Q);const E=g.include;if(!E)continue;const C=_(E);switch(C.kind){case 0:T({...B,selfGrammar:B.baseGrammar},Q);break;case 1:T(B,Q);break;case 2:W(C.ruleName,{...B,repository:A},Q);break;case 3:case 4:const g=C.scopeName===B.selfGrammar.scopeName?B.selfGrammar:C.scopeName===B.baseGrammar.scopeName?B.baseGrammar:void 0;if(g){const E={baseGrammar:B.baseGrammar,selfGrammar:g,repository:A};4===C.kind?W(C.ruleName,E,Q):T(E,Q)}else 4===C.kind?Q.add(new m(C.scopeName,C.ruleName)):Q.add(new x(C.scopeName))}}}class v{constructor(){this.kind=0}}class Z{constructor(){this.kind=1}}class j{constructor(A){this.ruleName=A,this.kind=2}}class V{constructor(A){this.scopeName=A,this.kind=3}}class z{constructor(A,B){this.scopeName=A,this.ruleName=B,this.kind=4}}function _(A){if("$base"===A)return new v;if("$self"===A)return new Z;const B=A.indexOf("#");if(-1===B)return new V(A);if(0===B)return new j(A.substring(1));{const Q=A.substring(0,B),g=A.substring(B+1);return new z(Q,g)}}const $=/\\(\d+)/,AA=/\\(\d+)/g;class BA{constructor(A,B,Q,g){this.$location=A,this.id=B,this._name=Q||null,this._nameIsCapturing=y.hasCaptures(this._name),this._contentName=g||null,this._contentNameIsCapturing=y.hasCaptures(this._contentName)}get debugName(){const A=this.$location?`${P(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${A}`}getName(A,B){return this._nameIsCapturing&&null!==this._name&&null!==A&&null!==B?y.replaceCaptures(this._name,A,B):this._name}getContentName(A,B){return this._contentNameIsCapturing&&null!==this._contentName?y.replaceCaptures(this._contentName,A,B):this._contentName}}class QA extends BA{constructor(A,B,Q,g,E){super(A,B,Q,g),this.retokenizeCapturedWithRuleId=E}dispose(){}collectPatterns(A,B){throw new Error("Not supported!")}compile(A,B){throw new Error("Not supported!")}compileAG(A,B,Q,g){throw new Error("Not supported!")}}class gA extends BA{constructor(A,B,Q,g,E){super(A,B,Q,null),this._match=new wA(g,this.id),this.captures=E,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(A,B){B.push(this._match)}compile(A,B){return this._getCachedCompiledPatterns(A).compile(A)}compileAG(A,B,Q,g){return this._getCachedCompiledPatterns(A).compileAG(A,Q,g)}_getCachedCompiledPatterns(A){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new oA,this.collectPatterns(A,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}}class EA extends BA{constructor(A,B,Q,g,E){super(A,B,Q,g),this.patterns=E.patterns,this.hasMissingPatterns=E.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(A,B){for(const Q of this.patterns)A.getRule(Q).collectPatterns(A,B)}compile(A,B){return this._getCachedCompiledPatterns(A).compile(A)}compileAG(A,B,Q,g){return this._getCachedCompiledPatterns(A).compileAG(A,Q,g)}_getCachedCompiledPatterns(A){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new oA,this.collectPatterns(A,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}}class CA extends BA{constructor(A,B,Q,g,E,C,I,D,w,o){super(A,B,Q,g),this._begin=new wA(E,this.id),this.beginCaptures=C,this._end=new wA(I||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=D,this.applyEndPatternLast=w||!1,this.patterns=o.patterns,this.hasMissingPatterns=o.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(A,B){return this._end.resolveBackReferences(A,B)}collectPatterns(A,B){B.push(this._begin)}compile(A,B){return this._getCachedCompiledPatterns(A,B).compile(A)}compileAG(A,B,Q,g){return this._getCachedCompiledPatterns(A,B).compileAG(A,Q,g)}_getCachedCompiledPatterns(A,B){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new oA;for(const B of this.patterns)A.getRule(B).collectPatterns(A,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,B):this._cachedCompiledPatterns.setSource(0,B)),this._cachedCompiledPatterns}}class IA extends BA{constructor(A,B,Q,g,E,C,I,D,w){super(A,B,Q,g),this._begin=new wA(E,this.id),this.beginCaptures=C,this.whileCaptures=D,this._while=new wA(I,-2),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=w.patterns,this.hasMissingPatterns=w.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(A,B){return this._while.resolveBackReferences(A,B)}collectPatterns(A,B){B.push(this._begin)}compile(A,B){return this._getCachedCompiledPatterns(A).compile(A)}compileAG(A,B,Q,g){return this._getCachedCompiledPatterns(A).compileAG(A,Q,g)}_getCachedCompiledPatterns(A){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new oA;for(const B of this.patterns)A.getRule(B).collectPatterns(A,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(A,B){return this._getCachedCompiledWhilePatterns(A,B).compile(A)}compileWhileAG(A,B,Q,g){return this._getCachedCompiledWhilePatterns(A,B).compileAG(A,Q,g)}_getCachedCompiledWhilePatterns(A,B){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new oA,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,B||"￿"),this._cachedCompiledWhilePatterns}}class DA{static createCaptureRule(A,B,Q,g,E){return A.registerRule((A=>new QA(B,A,Q,g,E)))}static getCompiledRuleId(A,B,Q){return A.id||B.registerRule((g=>{if(A.id=g,A.match)return new gA(A.$vscodeTextmateLocation,A.id,A.name,A.match,DA._compileCaptures(A.captures,B,Q));if(void 0===A.begin){A.repository&&(Q=U({},Q,A.repository));let g=A.patterns;return void 0===g&&A.include&&(g=[{include:A.include}]),new EA(A.$vscodeTextmateLocation,A.id,A.name,A.contentName,DA._compilePatterns(g,B,Q))}return A.while?new IA(A.$vscodeTextmateLocation,A.id,A.name,A.contentName,A.begin,DA._compileCaptures(A.beginCaptures||A.captures,B,Q),A.while,DA._compileCaptures(A.whileCaptures||A.captures,B,Q),DA._compilePatterns(A.patterns,B,Q)):new CA(A.$vscodeTextmateLocation,A.id,A.name,A.contentName,A.begin,DA._compileCaptures(A.beginCaptures||A.captures,B,Q),A.end,DA._compileCaptures(A.endCaptures||A.captures,B,Q),A.applyEndPatternLast,DA._compilePatterns(A.patterns,B,Q))})),A.id}static _compileCaptures(A,B,Q){let g=[];if(A){let E=0;for(const B in A){if("$vscodeTextmateLocation"===B)continue;const A=parseInt(B,10);A>E&&(E=A)}for(let A=0;A<=E;A++)g[A]=null;for(const E in A){if("$vscodeTextmateLocation"===E)continue;const C=parseInt(E,10);let I=0;A[E].patterns&&(I=DA.getCompiledRuleId(A[E],B,Q)),g[C]=DA.createCaptureRule(B,A[E].$vscodeTextmateLocation,A[E].name,A[E].contentName,I)}}return g}static _compilePatterns(A,B,Q){let g=[];if(A)for(let E=0,C=A.length;EA.substring(B.start,B.end)));return AA.lastIndex=0,this.source.replace(AA,((A,B)=>l(Q[parseInt(B,10)]||"")))}_buildAnchorCache(){let A,B,Q,g,E=[],C=[],I=[],D=[];for(A=0,B=this.source.length;AA.source));this._cached=new sA(A,B,this._items.map((A=>A.ruleId)))}return this._cached}compileAG(A,B,Q){return this._hasAnchors?B?Q?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(A,B,Q)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(A,B,Q)),this._anchorCache.A1_G0):Q?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(A,B,Q)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(A,B,Q)),this._anchorCache.A0_G0):this.compile(A)}_resolveAnchors(A,B,Q){let g=this._items.map((A=>A.resolveAnchors(B,Q)));return new sA(A,g,this._items.map((A=>A.ruleId)))}}class sA{constructor(A,B,Q){this.regExps=B,this.rules=Q,this.scanner=A.createOnigScanner(B)}dispose(){"function"==typeof this.scanner.dispose&&this.scanner.dispose()}toString(){const A=[];for(let B=0,Q=this.rules.length;Bthis._root.match(A)))}static createFromRawTheme(A,B){return this.createFromParsedTheme(function(A){if(!A)return[];if(!A.settings||!Array.isArray(A.settings))return[];let B=A.settings,Q=[],g=0;for(let A=0,E=B.length;A1&&(s=C.slice(0,C.length-1),s.reverse()),Q[g++]=new MA(o,s,A,I,D,w)}}return Q}(A),B)}static createFromParsedTheme(A,B){return function(A,B){A.sort(((A,B)=>{let Q=J(A.scope,B.scope);return 0!==Q?Q:(Q=S(A.parentScopes,B.parentScopes),0!==Q?Q:A.index-B.index)}));let Q=0,g="#000000",E="#ffffff";for(;A.length>=1&&""===A[0].scope;){let B=A.shift();-1!==B.fontStyle&&(Q=B.fontStyle),null!==B.foreground&&(g=B.foreground),null!==B.background&&(E=B.background)}let C=new hA(B),I=new tA(Q,C.getId(g),C.getId(E)),D=new FA(new aA(0,null,-1,0,0),[]);for(let B=0,Q=A.length;Bfunction(A,B){if(null===B)return!0;let Q=0,g=B[Q];for(;A;){if(iA(A.scopeName,g)){if(Q++,Q===B.length)return!0;g=B[Q]}A=A.parent}return!1}(A.parent,B.parentScopes)));return Q?new tA(Q.fontStyle,Q.foreground,Q.background):null}}class cA{constructor(A,B){this.parent=A,this.scopeName=B}static push(A,B){for(const Q of B)A=new cA(A,Q);return A}static from(...A){let B=null;for(let Q=0;QA?console.log("how did this happen?"):this.scopeDepth=A,-1!==B&&(this.fontStyle=B),0!==Q&&(this.foreground=Q),0!==g&&(this.background=g)}}class FA{constructor(A,B=[],Q={}){this._mainRule=A,this._children=Q,this._rulesWithParentScopes=B}static _sortBySpecificity(A){return 1===A.length||A.sort(this._cmpBySpecificity),A}static _cmpBySpecificity(A,B){if(A.scopeDepth===B.scopeDepth){const Q=A.parentScopes,g=B.parentScopes;let E=null===Q?0:Q.length,C=null===g?0:g.length;if(E===C)for(let A=0;A{const B=this._scopeToLanguage(A),Q=this._toStandardTokenType(A);return new nA(B,Q)})),this._defaultAttributes=new nA(A,8),this._embeddedLanguagesMatcher=new rA(Object.entries(B||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(A){return null===A?GA._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(A)}_scopeToLanguage(A){return this._embeddedLanguagesMatcher.match(A)||0}_toStandardTokenType(A){const B=A.match(GA.STANDARD_TOKEN_TYPE_REGEXP);if(!B)return 8;switch(B[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}}GA._NULL_SCOPE_METADATA=new nA(0,0),GA.STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/;class rA{constructor(A){if(0===A.length)this.values=null,this.scopesRegExp=null;else{this.values=new Map(A);const B=A.map((([A,B])=>l(A)));B.sort(),B.reverse(),this.scopesRegExp=new RegExp(`^((${B.join(")|(")}))($|\\.)`,"")}}match(A){if(!this.scopesRegExp)return;const B=A.match(this.scopesRegExp);return B?this.values.get(B[1]):void 0}}class NA{constructor(A,B){this.stack=A,this.stoppedEarly=B}}function LA(A,B,Q,g,E,C,I,D){const w=B.content.length;let o=!1,s=-1;if(I){const I=function(A,B,Q,g,E,C){let I=E.beginRuleCapturedEOL?0:-1;const D=[];for(let B=E;B;B=B.pop()){const Q=B.getRule(A);Q instanceof IA&&D.push({rule:Q,stack:B})}for(let w=D.pop();w;w=D.pop()){const{ruleScanner:D,findOptions:o}=kA(w.rule,A,w.stack.endRule,Q,g===I),s=D.findNextMatchSync(B,g,o);if(L&&(console.log(" scanning for while rule"),console.log(D.toString())),!s){L&&console.log(" popping "+w.rule.debugName+" - "+w.rule.debugWhileRegExp),E=w.stack.pop();break}if(-2!==s.ruleId){E=w.stack.pop();break}s.captureIndices&&s.captureIndices.length&&(C.produce(w.stack,s.captureIndices[0].start),RA(A,B,Q,w.stack,C,w.rule.whileCaptures,s.captureIndices),C.produce(w.stack,s.captureIndices[0].end),I=s.captureIndices[0].end,s.captureIndices[0].end>g&&(g=s.captureIndices[0].end,Q=!1))}return{stack:E,linePos:g,anchorPosition:I,isFirstLine:Q}}(A,B,Q,g,E,C);E=I.stack,g=I.linePos,Q=I.isFirstLine,s=I.anchorPosition}const e=Date.now();for(;!o;){if(0!==D&&Date.now()-e>D)return new NA(E,!0);c()}return new NA(E,!1);function c(){L&&(console.log(""),console.log(`@@scanNext ${g}: |${B.content.substr(g).replace(/\n$/,"\\n")}|`));const I=function(A,B,Q,g,E,C){const I=function(A,B,Q,g,E,C){const I=E.getRule(A),{ruleScanner:D,findOptions:w}=HA(I,A,E.endRule,Q,g===C);let o=0;L&&(o=f());const s=D.findNextMatchSync(B,g,w);if(L){const A=f()-o;A>5&&console.warn(`Rule ${I.debugName} (${I.id}) matching took ${A} against '${B}'`),console.log(` scanning for (linePos: ${g}, anchorPosition: ${C})`),console.log(D.toString()),s&&console.log(`matched rule id: ${s.ruleId} from ${s.captureIndices[0].start} to ${s.captureIndices[0].end}`)}return s?{captureIndices:s.captureIndices,matchedRuleId:s.ruleId}:null}(A,B,Q,g,E,C),D=A.getInjections();if(0===D.length)return I;const w=function(A,B,Q,g,E,C,I){let D,w=Number.MAX_VALUE,o=null,s=0;const e=C.contentNameScopesList.getScopeNames();for(let C=0,c=A.length;C=w)&&(w=a,o=h.captureIndices,D=h.ruleId,s=c.priority,w===E))break}return o?{priorityMatch:-1===s,captureIndices:o,matchedRuleId:D}:null}(D,A,B,Q,g,E,C);if(!w)return I;if(!I)return w;const o=I.captureIndices[0].start,s=w.captureIndices[0].start;return s0)&&D[0].end>g;if(-1===e){const I=E.getRule(A);L&&console.log(" popping "+I.debugName+" - "+I.debugEndRegExp),C.produce(E,D[0].start),E=E.withContentNameScopesList(E.nameScopesList),RA(A,B,Q,E,C,I.endCaptures,D),C.produce(E,D[0].end);const e=E;if(E=E.parent,s=e.getAnchorPos(),!c&&e.getEnterPos()===g)return L&&console.error("[1] - Grammar is in an endless loop - Grammar pushed & popped a rule without advancing"),E=e,C.produce(E,w),void(o=!0)}else{const I=A.getRule(e);C.produce(E,D[0].start);const i=E,t=I.getName(B.content,D),M=E.contentNameScopesList.pushAttributed(t,A);if(E=E.push(e,g,s,D[0].end===w,null,M,M),I instanceof CA){const g=I;L&&console.log(" pushing "+g.debugName+" - "+g.debugBeginRegExp),RA(A,B,Q,E,C,g.beginCaptures,D),C.produce(E,D[0].end),s=D[0].end;const e=g.getContentName(B.content,D),t=M.pushAttributed(e,A);if(E=E.withContentNameScopesList(t),g.endHasBackReferences&&(E=E.withEndRule(g.getEndWithResolvedBackReferences(B.content,D))),!c&&i.hasSameRuleAs(E))return L&&console.error("[2] - Grammar is in an endless loop - Grammar pushed the same rule without advancing"),E=E.pop(),C.produce(E,w),void(o=!0)}else if(I instanceof IA){const g=I;L&&console.log(" pushing "+g.debugName),RA(A,B,Q,E,C,g.beginCaptures,D),C.produce(E,D[0].end),s=D[0].end;const e=g.getContentName(B.content,D),t=M.pushAttributed(e,A);if(E=E.withContentNameScopesList(t),g.whileHasBackReferences&&(E=E.withEndRule(g.getWhileWithResolvedBackReferences(B.content,D))),!c&&i.hasSameRuleAs(E))return L&&console.error("[3] - Grammar is in an endless loop - Grammar pushed the same rule without advancing"),E=E.pop(),C.produce(E,w),void(o=!0)}else{const g=I;if(L&&console.log(" matched "+g.debugName+" - "+g.debugMatchRegExp),RA(A,B,Q,E,C,g.captures,D),C.produce(E,D[0].end),E=E.pop(),!c)return L&&console.error("[4] - Grammar is in an endless loop - Grammar is not advancing, nor is it pushing/popping"),E=E.safePop(),C.produce(E,w),void(o=!0)}}D[0].end>g&&(g=D[0].end,Q=!1)}}function HA(A,B,Q,g,E){return{ruleScanner:A.compileAG(B,Q,g,E),findOptions:0}}function kA(A,B,Q,g,E){return{ruleScanner:A.compileWhileAG(B,Q,g,E),findOptions:0}}function RA(A,B,Q,g,E,C,I){if(0===C.length)return;const D=B.content,w=Math.min(C.length,I.length),o=[],s=I[0].end;for(let B=0;Bs)break;for(;o.length>0&&o[o.length-1].endPos<=e.start;)E.produceFromScopes(o[o.length-1].scopes,o[o.length-1].endPos),o.pop();if(o.length>0?E.produceFromScopes(o[o.length-1].scopes,e.start):E.produce(g,e.start),w.retokenizeCapturedWithRuleId){const B=w.getName(D,I),C=g.contentNameScopesList.pushAttributed(B,A),o=w.getContentName(D,I),s=C.pushAttributed(o,A),c=g.push(w.retokenizeCapturedWithRuleId,e.start,-1,!1,null,C,s),i=A.createOnigString(D.substring(0,e.end));LA(A,i,Q&&0===e.start,e.start,c,E,!1,0),K(i);continue}const c=w.getName(D,I);if(null!==c){const B=(o.length>0?o[o.length-1].scopes:g.contentNameScopesList).pushAttributed(c,A);o.push(new KA(B,e.end))}}for(;o.length>0;)E.produceFromScopes(o[o.length-1].scopes,o[o.length-1].endPos),o.pop()}class KA{constructor(A,B){this.scopes=A,this.endPos=B}}function YA(A,B,Q,g,E){const C=k(B,UA),I=DA.getCompiledRuleId(Q,g,E.repository);for(const Q of C)A.push({debugSelector:B,matcher:Q.matcher,ruleId:I,grammar:E,priority:Q.priority})}function UA(A,B){if(B.length{for(let g=Q;gQ&&A.substr(0,Q)===B&&"."===A[Q]}class uA{constructor(A,B,Q,g,E,C,I,D){if(this._rootScopeName=A,this.balancedBracketSelectors=C,this._onigLib=D,this._basicScopeAttributesProvider=new GA(Q,g),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=I,this._grammar=yA(B,null),this._injections=null,this._tokenTypeMatchers=[],E)for(const A of Object.keys(E)){const B=k(A,UA);for(const Q of B)this._tokenTypeMatchers.push({matcher:Q.matcher,type:E[A]})}}get themeProvider(){return this._grammarRepository}dispose(){for(const A of this._ruleId2desc)A&&A.dispose()}createOnigScanner(A){return this._onigLib.createOnigScanner(A)}createOnigString(A){return this._onigLib.createOnigString(A)}getMetadataForScope(A){return this._basicScopeAttributesProvider.getBasicScopeAttributes(A)}_collectInjections(){const A=[],B=this._rootScopeName,Q=(A=>A===this._rootScopeName?this._grammar:this.getExternalGrammar(A))(B);if(Q){const g=Q.injections;if(g)for(let B in g)YA(A,B,g[B],this,Q);const E=this._grammarRepository.injections(B);E&&E.forEach((B=>{const Q=this.getExternalGrammar(B);if(Q){const B=Q.injectionSelector;B&&YA(A,B,Q,this,Q)}}))}return A.sort(((A,B)=>A.priority-B.priority)),A}getInjections(){if(null===this._injections&&(this._injections=this._collectInjections(),L&&this._injections.length>0)){console.log(`Grammar ${this._rootScopeName} contains the following injections:`);for(const A of this._injections)console.log(` - ${A.debugSelector}`)}return this._injections}registerRule(A){const B=++this._lastRuleId,Q=A(B);return this._ruleId2desc[B]=Q,Q}getRule(A){return this._ruleId2desc[A]}getExternalGrammar(A,B){if(this._includedGrammars[A])return this._includedGrammars[A];if(this._grammarRepository){const Q=this._grammarRepository.lookup(A);if(Q)return this._includedGrammars[A]=yA(Q,B&&B.$base),this._includedGrammars[A]}}tokenizeLine(A,B,Q=0){const g=this._tokenize(A,B,!1,Q);return{tokens:g.lineTokens.getResult(g.ruleStack,g.lineLength),ruleStack:g.ruleStack,stoppedEarly:g.stoppedEarly}}tokenizeLine2(A,B,Q=0){const g=this._tokenize(A,B,!0,Q);return{tokens:g.lineTokens.getBinaryResult(g.ruleStack,g.lineLength),ruleStack:g.ruleStack,stoppedEarly:g.stoppedEarly}}_tokenize(A,B,Q,g){let E;if(-1===this._rootId&&(this._rootId=DA.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections()),B&&B!==SA.NULL)E=!1,B.reset();else{E=!0;const A=this._basicScopeAttributesProvider.getDefaultAttributes(),Q=this.themeProvider.getDefaults(),g=H.set(0,A.languageId,A.tokenType,null,Q.fontStyle,Q.foregroundId,Q.backgroundId),C=this.getRule(this._rootId).getName(null,null);let I;I=C?JA.createRootAndLookUpScopeName(C,g,this):JA.createRoot("unknown",g),B=new SA(null,this._rootId,-1,-1,!1,null,I,I)}A+="\n";const C=this.createOnigString(A),I=C.content.length,D=new lA(Q,A,this._tokenTypeMatchers,this.balancedBracketSelectors),w=LA(this,C,E,0,B,D,!0,g);return K(C),{lineLength:I,lineTokens:D,ruleStack:w.stack,stoppedEarly:w.stoppedEarly}}}function yA(A,B){return(A=Y(A)).repository=A.repository||{},A.repository.$self={$vscodeTextmateLocation:A.$vscodeTextmateLocation,patterns:A.patterns,name:A.scopeName},A.repository.$base=B||A.repository.$self,A}class JA{constructor(A,B,Q){this.parent=A,this.scopePath=B,this.tokenAttributes=Q}static fromExtension(A,B){let Q=A,g=A?.scopePath??null;for(const A of B)g=cA.push(g,A.scopeNames),Q=new JA(Q,g,A.encodedTokenAttributes);return Q}static createRoot(A,B){return new JA(null,new cA(null,A),B)}static createRootAndLookUpScopeName(A,B,Q){const g=Q.getMetadataForScope(A),E=new cA(null,A),C=Q.themeProvider.themeMatch(E),I=JA.mergeAttributes(B,g,C);return new JA(null,E,I)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(A){return JA.equals(this,A)}static equals(A,B){for(;;){if(A===B)return!0;if(!A&&!B)return!0;if(!A||!B)return!1;if(A.scopeName!==B.scopeName||A.tokenAttributes!==B.tokenAttributes)return!1;A=A.parent,B=B.parent}}static mergeAttributes(A,B,Q){let g=-1,E=0,C=0;return null!==Q&&(g=Q.fontStyle,E=Q.foregroundId,C=Q.backgroundId),H.set(A,B.languageId,B.tokenType,null,g,E,C)}pushAttributed(A,B){if(null===A)return this;if(-1===A.indexOf(" "))return JA._pushAttributed(this,A,B);const Q=A.split(/ /g);let g=this;for(const A of Q)g=JA._pushAttributed(g,A,B);return g}static _pushAttributed(A,B,Q){const g=Q.getMetadataForScope(B),E=A.scopePath.push(B),C=Q.themeProvider.themeMatch(E),I=JA.mergeAttributes(A.tokenAttributes,g,C);return new JA(A,E,I)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(A){const B=[];let Q=this;for(;Q&&Q!==A;)B.push({encodedTokenAttributes:Q.tokenAttributes,scopeNames:Q.scopePath.getExtensionIfDefined(Q.parent?.scopePath??null)}),Q=Q.parent;return Q===A?B.reverse():void 0}}class SA{constructor(A,B,Q,g,E,C,I,D){this.parent=A,this.ruleId=B,this.beginRuleCapturedEOL=E,this.endRule=C,this.nameScopesList=I,this.contentNameScopesList=D,this._stackElementBrand=void 0,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=Q,this._anchorPos=g}equals(A){return null!==A&&SA._equals(this,A)}static _equals(A,B){return A===B||!!this._structuralEquals(A,B)&&JA.equals(A.contentNameScopesList,B.contentNameScopesList)}static _structuralEquals(A,B){for(;;){if(A===B)return!0;if(!A&&!B)return!0;if(!A||!B)return!1;if(A.depth!==B.depth||A.ruleId!==B.ruleId||A.endRule!==B.endRule)return!1;A=A.parent,B=B.parent}}clone(){return this}static _reset(A){for(;A;)A._enterPos=-1,A._anchorPos=-1,A=A.parent}reset(){SA._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(A,B,Q,g,E,C,I){return new SA(this,A,B,Q,g,E,C,I)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(A){return A.getRule(this.ruleId)}toString(){const A=[];return this._writeString(A,0),"["+A.join(",")+"]"}_writeString(A,B){return this.parent&&(B=this.parent._writeString(A,B)),A[B++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,B}withContentNameScopesList(A){return this.contentNameScopesList===A?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,A)}withEndRule(A){return this.endRule===A?this:new SA(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,A,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(A){let B=this;for(;B&&B._enterPos===A._enterPos;){if(B.ruleId===A.ruleId)return!0;B=B.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(A,B){const Q=JA.fromExtension(A?.nameScopesList??null,B.nameScopesList);return new SA(A,B.ruleId,B.enterPos??-1,B.anchorPos??-1,B.beginRuleCapturedEOL,B.endRule,Q,JA.fromExtension(Q,B.contentNameScopesList))}}SA.NULL=new SA(null,0,0,0,!1,null,null,null);class pA{constructor(A,B){this.allowAny=!1,this.balancedBracketScopes=A.flatMap((A=>"*"===A?(this.allowAny=!0,[]):k(A,UA).map((A=>A.matcher)))),this.unbalancedBracketScopes=B.flatMap((A=>k(A,UA).map((A=>A.matcher))))}get matchesAlways(){return this.allowAny&&0===this.unbalancedBracketScopes.length}get matchesNever(){return 0===this.balancedBracketScopes.length&&!this.allowAny}match(A){for(const B of this.unbalancedBracketScopes)if(B(A))return!1;for(const B of this.balancedBracketScopes)if(B(A))return!0;return this.allowAny}}class lA{constructor(A,B,Q,g){this.balancedBracketSelectors=g,this._emitBinaryTokens=A,this._tokenTypeOverrides=Q,this._lineText=L?B:null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}produce(A,B){this.produceFromScopes(A.contentNameScopesList,B)}produceFromScopes(A,B){if(this._lastTokenEndIndex>=B)return;if(this._emitBinaryTokens){let Q=A?.tokenAttributes??0,g=!1;if(this.balancedBracketSelectors?.matchesAlways&&(g=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const B=A?.getScopeNames()??[];for(const A of this._tokenTypeOverrides)A.matcher(B)&&(Q=H.set(Q,0,A.type,null,-1,0,0));this.balancedBracketSelectors&&(g=this.balancedBracketSelectors.match(B))}if(g&&(Q=H.set(Q,0,8,g,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===Q)return void(this._lastTokenEndIndex=B);if(L){const Q=A?.getScopeNames()??[];console.log(" token: |"+this._lineText.substring(this._lastTokenEndIndex,B).replace(/\n$/,"\\n")+"|");for(let A=0;A0&&this._tokens[this._tokens.length-1].startIndex===B-1&&this._tokens.pop(),0===this._tokens.length&&(this._lastTokenEndIndex=-1,this.produce(A,B),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(A,B){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===B-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),0===this._binaryTokens.length&&(this._lastTokenEndIndex=-1,this.produce(A,B),this._binaryTokens[this._binaryTokens.length-2]=0);const Q=new Uint32Array(this._binaryTokens.length);for(let A=0,B=this._binaryTokens.length;A0;)10===A.charCodeAt(E)?(E++,C++,I=0):(E++,I++),B--}function w(A){null===Q?E=A:D(A-E)}function o(){for(;E0&&65279===A.charCodeAt(0)&&(E=1);let i=0,t=null,M=[],h=[],a=null;function F(A,B){M.push(i),h.push(t),i=A,t=B}function n(){if(0===M.length)return G("illegal state stack");i=M.pop(),t=h.pop()}function G(B){throw new Error("Near offset "+E+": "+B+" ~~~"+A.substr(E,50)+"~~~")}const r=function(){if(null===a)return G("missing ");let A={};null!==Q&&(A[Q]={filename:B,line:C,char:I}),t[a]=A,a=null,F(1,A)},N=function(){if(null===a)return G("missing ");let A=[];t[a]=A,a=null,F(2,A)},L=function(){let A={};null!==Q&&(A[Q]={filename:B,line:C,char:I}),t.push(A),F(1,A)},H=function(){let A=[];t.push(A),F(2,A)};function k(){if(1!==i)return G("unexpected ");n()}function R(){return 1===i||2!==i?G("unexpected "):void n()}function K(A){if(1===i){if(null===a)return G("missing ");t[a]=A,a=null}else 2===i?t.push(A):t=A}function Y(A){if(isNaN(A))return G("cannot parse float");if(1===i){if(null===a)return G("missing ");t[a]=A,a=null}else 2===i?t.push(A):t=A}function U(A){if(isNaN(A))return G("cannot parse integer");if(1===i){if(null===a)return G("missing ");t[a]=A,a=null}else 2===i?t.push(A):t=A}function P(A){if(1===i){if(null===a)return G("missing ");t[a]=A,a=null}else 2===i?t.push(A):t=A}function u(A){if(1===i){if(null===a)return G("missing ");t[a]=A,a=null}else 2===i?t.push(A):t=A}function y(A){if(1===i){if(null===a)return G("missing ");t[a]=A,a=null}else 2===i?t.push(A):t=A}function J(){let A=c(">"),B=!1;return 47===A.charCodeAt(A.length-1)&&(B=!0,A=A.substring(0,A.length-1)),{name:A.trim(),isClosed:B}}function S(A){if(A.isClosed)return"";let B=c(""),B.replace(/&#([0-9]+);/g,(function(A,B){return String.fromCodePoint(parseInt(B,10))})).replace(/&#x([0-9a-f]+);/g,(function(A,B){return String.fromCodePoint(parseInt(B,16))})).replace(/&|<|>|"|'/g,(function(A){switch(A){case"&":return"&";case"<":return"<";case">":return">";case""":return'"';case"'":return"'"}return A}))}for(;E=g));){const w=A.charCodeAt(E);if(D(1),60!==w)return G("expected <");if(E>=g)return G("unexpected end of input");const c=A.charCodeAt(E);if(63===c){D(1),e("?>");continue}if(33===c){if(D(1),s("--")){e("--\x3e");continue}e(">");continue}if(47===c){if(D(1),o(),s("plist")){e(">");continue}if(s("dict")){e(">"),k();continue}if(s("array")){e(">"),R();continue}return G("unexpected closed tag")}let M=J();switch(M.name){case"dict":1===i?r():2===i?L():(t={},null!==Q&&(t[Q]={filename:B,line:C,char:I}),F(1,t)),M.isClosed&&k();continue;case"array":1===i?N():2===i?H():(t=[],F(2,t)),M.isClosed&&R();continue;case"key":p=S(M),1!==i?G("unexpected "):null!==a?G("too many "):a=p;continue;case"string":K(S(M));continue;case"real":Y(parseFloat(S(M)));continue;case"integer":U(parseInt(S(M),10));continue;case"date":P(new Date(S(M)));continue;case"data":u(S(M));continue;case"true":S(M),y(!0);continue;case"false":S(M),y(!1);continue}if(!/^plist/.test(M.name))return G("unexpected opened tag "+M.name)}var p;return t}function fA(A,B){throw new Error("Near offset "+A.pos+": "+B+" ~~~"+A.source.substr(A.pos,50)+"~~~")}class xA{constructor(A){this.source=A,this.pos=0,this.len=A.length,this.line=1,this.char=0}}class mA{constructor(){this.value=null,this.type=0,this.offset=-1,this.len=-1,this.line=-1,this.char=-1}toLocation(A){return{filename:A,line:this.line,char:this.char}}}function OA(A,B){B.value=null,B.type=0,B.offset=-1,B.len=-1,B.line=-1,B.char=-1;let Q,g=A.source,E=A.pos,C=A.len,I=A.line,D=A.char;for(;;){if(E>=C)return!1;if(Q=g.charCodeAt(E),32!==Q&&9!==Q&&13!==Q){if(10!==Q)break;E++,I++,D=0}else E++,D++}if(B.offset=E,B.line=I,B.char=D,34===Q){for(B.type=1,E++,D++;;){if(E>=C)return!1;if(Q=g.charCodeAt(E),E++,D++,92!==Q){if(34===Q)break}else E++,D++}B.value=g.substring(B.offset+1,E-1).replace(/\\u([0-9A-Fa-f]{4})/g,((A,B)=>String.fromCodePoint(parseInt(B,16)))).replace(/\\(.)/g,((B,Q)=>{switch(Q){case'"':return'"';case"\\":return"\\";case"/":return"/";case"b":return"\b";case"f":return"\f";case"n":return"\n";case"r":return"\r";case"t":return"\t";default:fA(A,"invalid escape sequence")}throw new Error("unreachable")}))}else if(91===Q)B.type=2,E++,D++;else if(123===Q)B.type=3,E++,D++;else if(93===Q)B.type=4,E++,D++;else if(125===Q)B.type=5,E++,D++;else if(58===Q)B.type=6,E++,D++;else if(44===Q)B.type=7,E++,D++;else if(110===Q){if(B.type=8,E++,D++,Q=g.charCodeAt(E),117!==Q)return!1;if(E++,D++,Q=g.charCodeAt(E),108!==Q)return!1;if(E++,D++,Q=g.charCodeAt(E),108!==Q)return!1;E++,D++}else if(116===Q){if(B.type=9,E++,D++,Q=g.charCodeAt(E),114!==Q)return!1;if(E++,D++,Q=g.charCodeAt(E),117!==Q)return!1;if(E++,D++,Q=g.charCodeAt(E),101!==Q)return!1;E++,D++}else if(102===Q){if(B.type=10,E++,D++,Q=g.charCodeAt(E),97!==Q)return!1;if(E++,D++,Q=g.charCodeAt(E),108!==Q)return!1;if(E++,D++,Q=g.charCodeAt(E),115!==Q)return!1;if(E++,D++,Q=g.charCodeAt(E),101!==Q)return!1;E++,D++}else for(B.type=11;;){if(E>=C)return!1;if(Q=g.charCodeAt(E),!(46===Q||Q>=48&&Q<=57||101===Q||69===Q||45===Q||43===Q))break;E++,D++}return B.len=E-B.offset,null===B.value&&(B.value=g.substr(B.offset,B.len)),A.pos=E,A.line=I,A.char=D,!0}class qA{constructor(A,B){this._onigLibPromise=B,this._grammars=new Map,this._rawGrammars=new Map,this._injectionGrammars=new Map,this._theme=A}dispose(){for(const A of this._grammars.values())A.dispose()}setTheme(A){this._theme=A}getColorMap(){return this._theme.getColorMap()}addGrammar(A,B){this._rawGrammars.set(A.scopeName,A),B&&this._injectionGrammars.set(A.scopeName,B)}lookup(A){return this._rawGrammars.get(A)}injections(A){return this._injectionGrammars.get(A)}getDefaults(){return this._theme.getDefaults()}themeMatch(A){return this._theme.match(A)}async grammarForScopeName(A,B,Q,g,E){if(!this._grammars.has(A)){let C=this._rawGrammars.get(A);if(!C)return null;this._grammars.set(A,function(A,B,Q,g,E,C,I,D){return new uA(A,B,Q,g,E,C,I,D)}(A,C,B,Q,g,E,this,await this._onigLibPromise))}return this._grammars.get(A)}}function bA(A,B){let Q=0;const g=[];let E=A,C=B;for(;E!==C;)E&&(!C||E.depth>=C.depth)?(Q++,E=E.parent):(g.push(C.toStateStackFrame()),C=C.parent);return{pops:Q,newFrames:g.reverse()}}function WA(A,B){let Q=A;for(let A=0;A0;)await Promise.all(C.Q.map((A=>this._loadSingleGrammar(A.scopeName)))),C.processQueue();return this._grammarForScopeName(A,B,Q,g,E)}async _loadSingleGrammar(A){return this._ensureGrammarCache.has(A)||this._ensureGrammarCache.set(A,this._doLoadSingleGrammar(A)),this._ensureGrammarCache.get(A)}async _doLoadSingleGrammar(A){const B=await this._options.loadGrammar(A);if(B){const Q="function"==typeof this._options.getInjections?this._options.getInjections(A):void 0;this._syncRegistry.addGrammar(B,Q)}}async addGrammar(A,B=[],Q=0,g=null){return this._syncRegistry.addGrammar(A,B),await this._grammarForScopeName(A.scopeName,Q,g)}_grammarForScopeName(A,B=0,Q=null,g=null,E=null){return this._syncRegistry.grammarForScopeName(A,B,Q,g,E)}}const XA=SA.NULL,vA=function(A,B=null){return null!==B&&/\.json$/.test(B)?(Q=A,L?function(A,B,Q){let g=new xA(A),E=new mA,C=0,I=null,D=[],w=[];function o(){D.push(C),w.push(I)}function s(){C=D.pop(),I=w.pop()}function e(A){fA(g,A)}for(;OA(g,E);){if(0===C){if(null!==I&&e("too many constructs in root"),3===E.type){I={},I.$vscodeTextmateLocation=E.toLocation(B),o(),C=1;continue}if(2===E.type){I=[],o(),C=4;continue}e("unexpected token in root")}if(2===C){if(5===E.type){s();continue}if(7===E.type){C=3;continue}e("expected , or }")}if(1===C||3===C){if(1===C&&5===E.type){s();continue}if(1===E.type){let A=E.value;if(OA(g,E)&&6===E.type||e("expected colon"),OA(g,E)||e("expected value"),C=2,1===E.type){I[A]=E.value;continue}if(8===E.type){I[A]=null;continue}if(9===E.type){I[A]=!0;continue}if(10===E.type){I[A]=!1;continue}if(11===E.type){I[A]=parseFloat(E.value);continue}if(2===E.type){let B=[];I[A]=B,o(),C=4,I=B;continue}if(3===E.type){let Q={};Q.$vscodeTextmateLocation=E.toLocation(B),I[A]=Q,o(),C=1,I=Q;continue}}e("unexpected token in dict")}if(5===C){if(4===E.type){s();continue}if(7===E.type){C=6;continue}e("expected , or ]")}if(4===C||6===C){if(4===C&&4===E.type){s();continue}if(C=5,1===E.type){I.push(E.value);continue}if(8===E.type){I.push(null);continue}if(9===E.type){I.push(!0);continue}if(10===E.type){I.push(!1);continue}if(11===E.type){I.push(parseFloat(E.value));continue}if(2===E.type){let A=[];I.push(A),o(),C=4,I=A;continue}if(3===E.type){let A={};A.$vscodeTextmateLocation=E.toLocation(B),I.push(A),o(),C=1,I=A;continue}e("unexpected token in array")}e("unknown state")}return 0!==w.length&&e("unclosed constructs"),I}(Q,B):JSON.parse(Q)):function(A,B){return L?function(A,B,Q){return dA(A,B,"$vscodeTextmateLocation")}(A,B):function(A){return dA(A,null,null)}(A)}(A,B);var Q};var ZA=N.Bz,jA=("undefined"!=typeof document&&document.currentScript&&document.currentScript.src,function(A){var B,Q,g=void 0!==(A=A||{})?A:{};g.ready=new Promise((function(A,g){B=A,Q=g}));var E,C=Object.assign({},g),I=!1;E=function(A){let B;return"function"==typeof readbuffer?new Uint8Array(readbuffer(A)):(B=read(A,"binary"),"object"==typeof B||L(Q),B);var Q},"undefined"!=typeof scriptArgs&&scriptArgs,"undefined"!=typeof onig_print&&("undefined"==typeof console&&(console={}),console.log=onig_print,console.warn=console.error="undefined"!=typeof printErr?printErr:onig_print);var D,w,o=g.print||console.log.bind(console),s=g.printErr||console.warn.bind(console);Object.assign(g,C),C=null,g.arguments&&g.arguments,g.thisProgram&&g.thisProgram,g.quit&&g.quit,g.wasmBinary&&(D=g.wasmBinary),g.noExitRuntime,"object"!=typeof WebAssembly&&L("no native wasm support detected");var e,c,i,t=!1,M="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function h(A,B,Q){for(var g=B+Q,E=B;A[E]&&!(E>=g);)++E;if(E-B>16&&A.buffer&&M)return M.decode(A.subarray(B,E));for(var C="";B>10,56320|1023&o)}}else C+=String.fromCharCode((31&I)<<6|D)}else C+=String.fromCharCode(I)}return C}function a(A){e=A,g.HEAP8=new Int8Array(A),g.HEAP16=new Int16Array(A),g.HEAP32=new Int32Array(A),g.HEAPU8=c=new Uint8Array(A),g.HEAPU16=new Uint16Array(A),g.HEAPU32=i=new Uint32Array(A),g.HEAPF32=new Float32Array(A),g.HEAPF64=new Float64Array(A)}g.INITIAL_MEMORY;var F=[],n=[],G=[],r=0,N=null;function L(A){g.onAbort&&g.onAbort(A),s(A="Aborted("+A+")"),t=!0,A+=". Build with -sASSERTIONS for more info.";var B=new WebAssembly.RuntimeError(A);throw Q(B),B}var H,k,R,K="data:application/octet-stream;base64,";function Y(A){return A.startsWith(K)}function U(A){try{if(A==H&&D)return new Uint8Array(D);if(E)return E(A);throw"both async and sync fetching of the wasm failed"}catch(A){L(A)}}function P(A){for(;A.length>0;)A.shift()(g)}function u(A){try{return w.grow(A-e.byteLength+65535>>>16),a(w.buffer),1}catch(A){}}Y(H="onig.wasm")||(k=H,H=g.locateFile?g.locateFile(k,""):""+k),R="undefined"!=typeof dateNow?dateNow:()=>performance.now();var y=[null,[],[]];function J(A,B){var Q=y[A];0===B||10===B?((1===A?o:s)(h(Q,0)),Q.length=0):Q.push(B)}var S,p={emscripten_get_now:R,emscripten_memcpy_big:function(A,B,Q){c.copyWithin(A,B,B+Q)},emscripten_resize_heap:function(A){var B=c.length,Q=2147483648;if((A>>>=0)>Q)return!1;let g=(A,B)=>A+(B-A%B)%B;for(var E=1;E<=4;E*=2){var C=B*(1+.2/E);if(C=Math.min(C,A+100663296),u(Math.min(Q,g(Math.max(A,C),65536))))return!0}return!1},fd_write:function(A,B,Q,g){for(var E=0,C=0;C>2],D=i[B+4>>2];B+=8;for(var w=0;w>2]=E,0}};function l(A){function Q(){S||(S=!0,g.calledRun=!0,t||(P(n),B(g),g.onRuntimeInitialized&&g.onRuntimeInitialized(),function(){if(g.postRun)for("function"==typeof g.postRun&&(g.postRun=[g.postRun]);g.postRun.length;)A=g.postRun.shift(),G.unshift(A);var A;P(G)}()))}r>0||(function(){if(g.preRun)for("function"==typeof g.preRun&&(g.preRun=[g.preRun]);g.preRun.length;)A=g.preRun.shift(),F.unshift(A);var A;P(F)}(),r>0||(g.setStatus?(g.setStatus("Running..."),setTimeout((function(){setTimeout((function(){g.setStatus("")}),1),Q()}),1)):Q()))}if(function(){var A={env:p,wasi_snapshot_preview1:p};function B(A,B){var Q,E=A.exports;g.asm=E,a((w=g.asm.memory).buffer),g.asm.__indirect_function_table,Q=g.asm.__wasm_call_ctors,n.unshift(Q),function(A){if(r--,g.monitorRunDependencies&&g.monitorRunDependencies(r),0==r&&N){var B=N;N=null,B()}}()}function E(A){B(A.instance)}function C(B){return(!D&&I&&"function"==typeof fetch?fetch(H,{credentials:"same-origin"}).then((function(A){if(!A.ok)throw"failed to load wasm binary file at '"+H+"'";return A.arrayBuffer()})).catch((function(){return U(H)})):Promise.resolve().then((function(){return U(H)}))).then((function(B){return WebAssembly.instantiate(B,A)})).then((function(A){return A})).then(B,(function(A){s("failed to asynchronously prepare wasm: "+A),L(A)}))}if(r++,g.monitorRunDependencies&&g.monitorRunDependencies(r),g.instantiateWasm)try{return g.instantiateWasm(A,B)}catch(A){s("Module.instantiateWasm callback failed with error: "+A),Q(A)}(D||"function"!=typeof WebAssembly.instantiateStreaming||Y(H)||"function"!=typeof fetch?C(E):fetch(H,{credentials:"same-origin"}).then((function(B){return WebAssembly.instantiateStreaming(B,A).then(E,(function(A){return s("wasm streaming compile failed: "+A),s("falling back to ArrayBuffer instantiation"),C(E)}))}))).catch(Q)}(),g.___wasm_call_ctors=function(){return(g.___wasm_call_ctors=g.asm.__wasm_call_ctors).apply(null,arguments)},g.___errno_location=function(){return(g.___errno_location=g.asm.__errno_location).apply(null,arguments)},g._omalloc=function(){return(g._omalloc=g.asm.omalloc).apply(null,arguments)},g._ofree=function(){return(g._ofree=g.asm.ofree).apply(null,arguments)},g._getLastOnigError=function(){return(g._getLastOnigError=g.asm.getLastOnigError).apply(null,arguments)},g._createOnigScanner=function(){return(g._createOnigScanner=g.asm.createOnigScanner).apply(null,arguments)},g._freeOnigScanner=function(){return(g._freeOnigScanner=g.asm.freeOnigScanner).apply(null,arguments)},g._findNextOnigScannerMatch=function(){return(g._findNextOnigScannerMatch=g.asm.findNextOnigScannerMatch).apply(null,arguments)},g._findNextOnigScannerMatchDbg=function(){return(g._findNextOnigScannerMatchDbg=g.asm.findNextOnigScannerMatchDbg).apply(null,arguments)},g.stackSave=function(){return(g.stackSave=g.asm.stackSave).apply(null,arguments)},g.stackRestore=function(){return(g.stackRestore=g.asm.stackRestore).apply(null,arguments)},g.stackAlloc=function(){return(g.stackAlloc=g.asm.stackAlloc).apply(null,arguments)},g.dynCall_jiji=function(){return(g.dynCall_jiji=g.asm.dynCall_jiji).apply(null,arguments)},g.UTF8ToString=function(A,B){return A?h(c,A,B):""},N=function A(){S||l(),S||(N=A)},g.preInit)for("function"==typeof g.preInit&&(g.preInit=[g.preInit]);g.preInit.length>0;)g.preInit.pop()();return l(),A.ready});let VA=null;class zA{static _utf8ByteLength(A){let B=0;for(let Q=0,g=A.length;Q=55296&&E<=56319&&Q+1=56320&&B<=57343&&(C=65536+(E-55296<<10)|B-56320,I=!0)}B+=C<=127?1:C<=2047?2:C<=65535?3:4,I&&Q++}return B}constructor(A){const B=A.length,Q=zA._utf8ByteLength(A),g=Q!==B,E=g?new Uint32Array(B+1):null;g&&(E[B]=Q);const C=g?new Uint32Array(Q+1):null;g&&(C[Q]=B);const I=new Uint8Array(Q);let D=0;for(let Q=0;Q=55296&&w<=56319&&Q+1=56320&&B<=57343&&(o=65536+(w-55296<<10)|B-56320,s=!0)}g&&(E[Q]=D,s&&(E[Q+1]=D),o<=127?C[D+0]=Q:o<=2047?(C[D+0]=Q,C[D+1]=Q):o<=65535?(C[D+0]=Q,C[D+1]=Q,C[D+2]=Q):(C[D+0]=Q,C[D+1]=Q,C[D+2]=Q,C[D+3]=Q)),o<=127?I[D++]=o:o<=2047?(I[D++]=192|(1984&o)>>>6,I[D++]=128|(63&o)>>>0):o<=65535?(I[D++]=224|(61440&o)>>>12,I[D++]=128|(4032&o)>>>6,I[D++]=128|(63&o)>>>0):(I[D++]=240|(1835008&o)>>>18,I[D++]=128|(258048&o)>>>12,I[D++]=128|(4032&o)>>>6,I[D++]=128|(63&o)>>>0),s&&Q++}this.utf16Length=B,this.utf8Length=Q,this.utf16Value=A,this.utf8Value=I,this.utf16OffsetToUtf8=E,this.utf8OffsetToUtf16=C}createString(A){const B=A._omalloc(this.utf8Length);return A.HEAPU8.set(this.utf8Value,B),B}}class _A{constructor(A){if(this.id=++_A.LAST_ID,!VA)throw new Error("Must invoke loadWASM first.");this._onigBinding=VA,this.content=A;const B=new zA(A);this.utf16Length=B.utf16Length,this.utf8Length=B.utf8Length,this.utf16OffsetToUtf8=B.utf16OffsetToUtf8,this.utf8OffsetToUtf16=B.utf8OffsetToUtf16,this.utf8Length<1e4&&!_A._sharedPtrInUse?(_A._sharedPtr||(_A._sharedPtr=VA._omalloc(1e4)),_A._sharedPtrInUse=!0,VA.HEAPU8.set(B.utf8Value,_A._sharedPtr),this.ptr=_A._sharedPtr):this.ptr=B.createString(VA)}convertUtf8OffsetToUtf16(A){return this.utf8OffsetToUtf16?A<0?0:A>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[A]:A}convertUtf16OffsetToUtf8(A){return this.utf16OffsetToUtf8?A<0?0:A>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[A]:A}dispose(){this.ptr===_A._sharedPtr?_A._sharedPtrInUse=!1:this._onigBinding._ofree(this.ptr)}}_A.LAST_ID=0,_A._sharedPtr=0,_A._sharedPtrInUse=!1;class $A{constructor(A){if(!VA)throw new Error("Must invoke loadWASM first.");const B=[],Q=[];for(let g=0,E=A.length;gWebAssembly.instantiateStreaming(A,B)}(g):function(A){return async B=>{const Q=await A.arrayBuffer();return WebAssembly.instantiate(Q,B)}}(g):function(A){return B=>WebAssembly.instantiate(A,B)}(g)}return BB=new Promise(((A,B)=>{g=A,E=B})),function(A,B,Q,g){jA({print:B,instantiateWasm:(B,Q)=>{if("undefined"==typeof performance){const A=()=>Date.now();B.env.emscripten_get_now=A,B.wasi_snapshot_preview1.emscripten_get_now=A}return A(B).then((A=>Q(A.instance)),g),{}}}).then((A=>{VA=A,Q()}))}(B,Q,g,E),BB}function gB(A){return new _A(A)}function EB(A){return new $A(A)}function CB(A){const B=n[A];if(!B)return;const{id:Q}=G[B];return{id:Q,scopeName:B}}const IB=new Map;let DB,wB;async function oB(A){if(IB.has(A))return IB.get(A);const Q=function(A){return G[A]}(A);if(!Q)return Promise.resolve(void 0);let g;if(void 0===DB&&(g=sB(Q.path),DB=g.then((()=>!0)).catch((()=>!1))),void 0===wB&&(wB=await DB),wB){const B=g||sB(Q.path);return IB.set(A,B),B}const E=B(`grammars/${Q.id}`);Q.embeddedScopes.forEach((A=>{if(!IB.has(A)){const B=E.then((B=>B.find((B=>B.scopeName===A))));IB.set(A,B)}}));const C=E.then((B=>B.find((B=>B.scopeName===A))));return IB.set(A,C),C}async function sB(B){return await A()}const eB=30720,cB=16744448,iB=16775168,tB=11,MB=15,hB={NotSet:-1,None:0,Italic:1,Bold:2,Underline:4,Strikethrough:8};function aB(A,B,Q,g){const{tokens:E,ruleStack:C}=A.tokenizeLine2(Q,B),I=[];let D=Q.length;for(let A=E.length-2;A>=0;A-=2){const B=E[A],g=E[A+1],C=Q.slice(B,D);I.unshift({content:C,metadata:g}),D=B}let w=[];if(null==g?void 0:g.preserveWhitespace)w=I;else for(let A=0;A0?w[w.length-1].content+=B.content:A{const{rawTokens:E,nextStack:C}=aB(B,g,A,{preserveWhitespace:!0}),I=E.map((({content:A,metadata:B})=>({content:A,style:nB(B,Q)}))),D=function(A,B,Q,g){const{tokens:E}=Q.tokenizeLine(A,B),C=[];for(let B=0;B{if(w+=A.content.length,Q>>MB]},g=(A&eB)>>>tB;return g&hB.Italic&&(Q.fontStyle="italic"),g&hB.Bold&&(Q.fontWeight="bold"),g&hB.Underline&&(Q.textDecoration="underline"),g&hB.Strikethrough&&(Q.textDecoration="line-through"),Q}var GB=function(A){var B=null;if("undefined"!=typeof process&&null!=process.versions&&null!=process.versions.node)B=Buffer.from(A,"base64");else{var Q=globalThis.atob(A),g=Q.length;B=new Uint8Array(new ArrayBuffer(g));for(var E=0;E({createOnigScanner:EB,createOnigString:gB})));rB=new ZA({onigLib:A,loadGrammar:A=>oB(A)})}const B=A.filter((A=>!NB(A))).map((A=>{const B=CB(A);if(!B)throw new kB(A);return rB.loadGrammar(B.scopeName)}));return Promise.all(B)}function HB(A){if(NB(A))return{langId:A,grammar:null};const B=CB(A);if(!B)throw new kB(A);const Q=function(A){const{_syncRegistry:B}=rB;return null==B?void 0:B._grammars.get(A)}(B.scopeName);if(!Q)throw new Error(`Syntax highlighting error: grammar for ${A} not loaded`);return{langId:B.id,grammar:Q}}class kB extends Error{constructor(A){super(`Unknown language: ${A}`),this.alias=A}}function RB(A,B,Q){rB.setTheme(Q);const g=function(A){const B=rB.getColorMap();return A.colorNames?B.map((B=>Object.keys(A.colorNames).find((Q=>A.colorNames[Q].toUpperCase()===B.toUpperCase()))||B)):B}(Q);return function(A,B,Q){let g=null;return A.split(/\r?\n|\r/g).map((A=>{const{rawTokens:E,nextStack:C}=aB(B,g,A);return g=C,E.map((({content:A,metadata:B})=>({content:A,style:nB(B,Q)})))}))}(A,B,g)}function KB(A){return A.split(/\r?\n|\r/g).map((A=>[{content:A,style:{}}]))}function YB(A,B){return PB(A.slice(1,-1)).map((A=>{const{from:Q,to:g}=UB(A);return{lineNumber:B,fromColumn:Q,toColumn:g}}))}function UB(A){const[B,Q]=A.split(":");if(!uB(B))throw new yB(B);const g=Number(B);if(g<1)throw new JB;if(Q){if(!uB(Q))throw new yB(Q);return{from:g,to:+Q}}return{from:g,to:g}}function PB(A){return A.split(/,(?![^\[]*\])/g)}function uB(A){A=A.toString();var B=Math.abs(A),Q=parseInt(A,10);return!isNaN(B)&&Q===B&&B.toString()===A}class yB extends Error{constructor(A){super(`Invalid number "${A}" in range string`),this.number=A,Object.setPrototypeOf(this,new.target.prototype)}}class JB extends Error{constructor(){super("Invalid line or column number in range string"),Object.setPrototypeOf(this,new.target.prototype)}}const SB="#001",pB="#010",lB={name:"comments",type:"light",foreground:"",background:"",colors:{},settings:[{settings:{foreground:"#000"}},{scope:["punctuation.definition.comment"],settings:{foreground:SB}},{scope:"comment",settings:{foreground:pB}}]};function dB(A,B,Q,g){const E=B?RB(A,B,lB):KB(A),C=[];let I=1;const D=E.map((A=>{const{annotations:B,lineWithoutComments:E}=function(A,B,Q){if(!A.some((A=>A.style.color===SB)))return{annotations:[],lineWithoutComments:A};const g=[];let E=0;for(;E!A.tokens.includes(B)));C.every((A=>""===A.content.trim()))&&(C=null);return{annotations:g.map((A=>({name:A.name,query:A.query,lineNumber:A.lineNumber,rangeString:A.rangeString}))),lineWithoutComments:C}}(A,g,I);if(C.push(...B),!E)return null;const D=E.map((A=>A.content)).join("");return["mdx","jsx","tsx"].includes(Q)&&B.length>0&&"{}"===D.trim()?null:(I++,D)})).filter((A=>null!==A)).join("\n"),w=C.map((A=>{var{rangeString:B,lineNumber:Q}=A,g=function(A,B){var Q={};for(var g in A)Object.prototype.hasOwnProperty.call(A,g)&&B.indexOf(g)<0&&(Q[g]=A[g]);if(null!=A&&"function"==typeof Object.getOwnPropertySymbols){var E=0;for(g=Object.getOwnPropertySymbols(A);EA.ranges.length>0));return{newCode:D,annotations:w}}function fB(A,B,Q){return A&&A.startsWith("(/")?function(A,B,Q){const g=B.match(/\(\/([\s\S]*?)\/([gimuy]*)\)/);if(!g)throw new Error(`Invalid RegExp string: ${B}`);const E=new RegExp(g[1],g[2]),C=A.split(/\r?\n/).slice(Q-1).join("\n");if(!E.global){const A=E.exec(C);if(!A)return[];const B=C.slice(0,A.index).split("\n").length+Q-1;return[{fromLineNumber:B,toLineNumber:B+A[0].split("\n").length-1}]}let I;const D=[];for(;I=E.exec(C);){const A=C.slice(0,I.index).split("\n").length+Q-1,B=A+I[0].split("\n").length-1,g=D[D.length-1];g&&g.fromLineNumber===A||D.push({fromLineNumber:A,toLineNumber:B})}return D}(Q,A,B):A&&A.startsWith("[/")?function(A,B,Q){const g=B.match(/\[\/([\s\S]*?)\/([gimuy]*)\]/);if(!g)throw new Error(`Invalid RegExp string: ${B}`);let E=g[2]||"";E+="d";const C=new RegExp(g[1],E);let I=A.split(/\r?\n/);I=I.slice(Q-1),C.multiline||(I=[I[0]]);const D=[];return I.forEach(((A,B)=>{if(!C.global){if(D.length>0)return;const g=C.exec(A);if(!g)return;const E=g.indices[1]||g.indices[0];return void D.push({lineNumber:B+Q,fromColumn:E[0]+1,toColumn:E[1]})}let g;for(;g=C.exec(A);){const A=g.indices[1]||g.indices[0];D.push({lineNumber:B+Q,fromColumn:A[0]+1,toColumn:A[1]})}})),D}(Q,A,B):function(A,B){return A?A.startsWith("[")?YB(A,B):PB(A.slice(1,-1)).map((A=>{if(A.includes("[")){const[Q,g]=A.split("["),E=Number(Q),C=B+E-1;if(!uB(C))throw new yB(Q);return YB("["+g,C)}const{from:Q,to:g}=UB(A);return[{fromLineNumber:Q+B-1,toLineNumber:g+B-1}]})).flat():[{fromLineNumber:B,toLineNumber:B}]}(A,B)}function xB(A,B){var Q;const g=A.match(/\s*([\w-]+)?(\([^\)]*\)|\[[^\]]*\])?(.*)$/),E=g[1],C=g[2],I=null===(Q=g[3])||void 0===Q?void 0:Q.trim();return B.includes(E)?{name:E,rangeString:C,query:I}:null}function mB(A,B){let Q=[],g=1;return A.forEach((A=>{Q.push({fromColumn:g,toColumn:g+A.content.length-1,token:A}),g+=A.content.length})),B.forEach((A=>{Q=function(A,B){const{range:Q}=B,{fromColumn:g,toColumn:E}=Q,C=[];let I=0;for(;IE){const[A,Q]=qB(B,E+1);D.tokens.push(A),C.push(Q)}else D.tokens.push(B);I++}else C.push(D);for(;IOB(A)))}function OB(A){return"tokens"in A?{annotationName:A.annotationName,annotationQuery:A.annotationQuery,fromColumn:A.fromColumn,toColumn:A.toColumn,tokens:A.tokens.map((A=>OB(A)))}:A.token}function qB(A,B){if("token"in A){const Q=Object.assign(Object.assign({},A.token),{content:A.token.content.slice(0,B-A.fromColumn)}),g=Object.assign(Object.assign({},A.token),{content:A.token.content.slice(B-A.fromColumn)});return[Object.assign(Object.assign({},A),{toColumn:B-1,token:Q}),Object.assign(Object.assign({},A),{fromColumn:B,token:g})]}{const Q=[],g=[];A.tokens.forEach((A=>{if(A.toColumn=B)g.push(A);else{const[E,C]=qB(A,B);Q.push(E),g.push(C)}}));return[Object.assign(Object.assign({},A),{toColumn:B-1,tokens:Q}),Object.assign(Object.assign({},A),{fromColumn:B,tokens:g})]}}function bB(A,B){let Q=A.map(((A,B)=>({fromLineNumber:B+1,toLineNumber:B+1,line:A})));return B.forEach((A=>{Q=function(A,B){const{range:Q,name:g,query:E}=B,{fromLineNumber:C,toLineNumber:I}=Q,D=[];let w=0;for(;wI){const[A,Q]=TB(B,I+1);o.lines.push(A),D.push(Q)}else o.lines.push(B);w++}else D.push(o);for(;wWB(A)))}function WB(A){return"line"in A?{lineNumber:A.fromLineNumber,tokens:A.line.tokens}:{annotationName:A.annotationName,annotationQuery:A.annotationQuery,fromLineNumber:A.fromLineNumber,toLineNumber:A.toLineNumber,lines:A.lines.map((A=>WB(A)))}}function TB(A,B){if("line"in A)return[Object.assign(Object.assign({},A),{toLineNumber:B-1}),Object.assign(Object.assign({},A),{fromLineNumber:B})];{const Q=[],g=[];return A.lines.forEach((A=>{if(A.toLineNumber=B)g.push(A);else{const[E,C]=TB(A,B);Q.push(E),g.push(C)}})),[Object.assign(Object.assign({},A),{toLineNumber:B-1,lines:Q}),Object.assign(Object.assign({},A),{fromLineNumber:B,lines:g})]}}function XB(A,B){const{inlineAnnotations:Q,multilineAnnotations:g}=function(A){const B=[],Q=[];return A.forEach((A=>{A.ranges.forEach((g=>{"lineNumber"in g?B.push(Object.assign(Object.assign({},A),{range:g})):Q.push(Object.assign(Object.assign({},A),{range:g}))}))})),{inlineAnnotations:B,multilineAnnotations:Q}}(B);return bB(A.map(((A,B)=>{const g=Q.filter((A=>A.range.lineNumber===B+1));return{lineNumber:B+1,tokens:mB(A,g)}})),g)}var vB=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],ZB={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",9:"strikethrough"};function jB(A,B){const Q=A.indexOf("[",B);if(-1!==Q){const B=A.indexOf("m",Q);return{sequence:A.substring(Q+2,B).split(";"),startPosition:Q,position:B+1}}return{position:A.length}}function VB(A,B){let Q=1;const g=A[B+Q++];let E;if("2"===g){const g=[A[B+Q++],A[B+Q++],A[B+Q]].map((A=>Number.parseInt(A)));3!==g.length||g.some((A=>Number.isNaN(A)))||(E={type:"rgb",rgb:g})}else if("5"===g){const g=Number.parseInt(A[B+Q]);Number.isNaN(g)||(E={type:"table",index:Number(g)})}return[Q,E]}function zB(A){const B=[];for(let Q=0;Q=90&&E<=97?B.push({type:"setForegroundColor",value:{type:"named",name:vB[E-90+8]}}):E>=100&&E<=107&&B.push({type:"setBackgroundColor",value:{type:"named",name:vB[E-100+8]}})}return B}function _B(A,B){const Q=function(){let A=null,B=null,Q=new Set;return{parse(g){const E=[];let C=0;do{const I=jB(g,C),D=I.sequence?g.substring(C,I.startPosition):g.substring(C);if(D.length>0&&E.push({value:D,foreground:A,background:B,decorations:new Set(Q)}),I.sequence){const g=zB(I.sequence);for(const E of g)"resetAll"===E.type?(A=null,B=null,Q.clear()):"resetForegroundColor"===E.type?A=null:"resetBackgroundColor"===E.type?B=null:"resetDecoration"===E.type&&Q.delete(E.value);for(const E of g)"setForegroundColor"===E.type?A=E.value:"setBackgroundColor"===E.type?B=E.value:"setDecoration"===E.type&&Q.add(E.value)}C=I.position}while(Cfunction(A,B,Q){const g=A.parse(B),E=g.map((({value:A,foreground:B,background:g,decorations:E})=>{const C=$B(B,Q),I={};C&&(I.color=C);const D=$B(g,Q);return D&&(I.background=D),E.has("bold")&&(I.fontWeight="bold"),E.has("italic")&&(I.fontStyle="italic"),E.has("underline")&&(I.textDecoration="underline"),E.has("strikethrough")&&(I.textDecoration="line-through"),E.has("reverse")&&(I.color=D,I.background=C),E.has("dim")&&(I.opacity=.5),{content:A,style:I}}));return E}(Q,A,B)));return g}function $B(A,B){if(A){if("named"===A.type){return D(B,"terminal.ansi"+(A.name[0].toUpperCase()+A.name.slice(1)))}if("rgb"===A.type){const[B,Q,g]=A.rgb;return`rgb(${B}, ${Q}, ${g})`}}}async function AQ(A,B){await Promise.all([LB(A),c(B)])}async function BQ(A,B,Q="dark-plus",g={}){const E=A||"",C=B||"text";if("string"!=typeof E)throw new Error("Syntax highlighter error: code must be a string");if("string"!=typeof C)throw new Error("Syntax highlighter error: lang must be a string");return await AQ([C],Q),QQ(E,C,Q,g)}function QQ(A,B,Q="dark-plus",g={}){const E=A||"",C=B||"text";if("string"!=typeof E)throw new Error("Syntax highlighter error: code must be a string");if("string"!=typeof C)throw new Error("Syntax highlighter error: lang must be a string");const{langId:I,grammar:w}=HB(C),o=i(Q),s="text"==I?KB(E):"terminal"==I?_B(E,o):(null==g?void 0:g.scopes)?function(A,B,Q){return rB.setTheme(Q),FB(A,B,rB.getColorMap())}(E,w,o):RB(E,w,o),e="terminal"==I?function(A){return{color:D(A,"terminal.foreground"),background:D(A,"terminal.background")}}(o):{color:o.foreground,background:o.background};if(function(A){return"annotations"in A}(g)){return{lines:XB(s,(null==g?void 0:g.annotations)||[]),lang:I,style:e}}return{lines:s,lang:I,style:e}}async function gQ(A,B,Q){if(!Q)return{code:A,annotations:[]};await LB([B]);const{grammar:g}=HB(B),{newCode:E,annotations:C}=dB(A,g,B,Q);return{code:E,annotations:C}}async function EQ(A){if(!A)throw new Error("Syntax highlighter error: undefined theme");await AQ([],A);return a(i(A))}function CQ(A){if(!A)throw new Error("Syntax highlighter error: undefined theme");return a(i(A))}export{F as LANG_NAMES,M as THEME_NAMES,kB as UnknownLanguageError,h as UnknownThemeError,gQ as extractAnnotations,EQ as getThemeColors,CQ as getThemeColorsSync,BQ as highlight,QQ as highlightSync,AQ as preload}; diff --git a/lib/dist/index.cjs.js b/lib/dist/index.cjs.js index bf4c987..78d170c 100644 --- a/lib/dist/index.cjs.js +++ b/lib/dist/index.cjs.js @@ -1 +1 @@ -"use strict";function A(A){if(A&&A.__esModule)return A;var B=Object.create(null);return A&&Object.keys(A).forEach((function(Q){if("default"!==Q){var g=Object.getOwnPropertyDescriptor(A,Q);Object.defineProperty(B,Q,g.get?g:{enumerable:!0,get:function(){return A[Q]}})}})),B.default=A,Object.freeze(B)}function B(A,B){var Q=require("fs"),g=require("path"),E=g.parse,C=require("os");var I=function(A,B){var Q="/";/^([A-Za-z]:)/.test(A)?Q="":/^\\\\/.test(A)&&(Q="\\\\");for(var C=[A],I=E(A);I.dir!==C[C.length-1];)C.push(I.dir),I=E(I.dir);return C.reduce((function(A,E){return A.concat(B.map((function(A){return g.resolve(Q,E,A)})))}),[])};const D=C.homedir||function(){var A=process.env.HOME,B=process.env.LOGNAME||process.env.USER||process.env.LNAME||process.env.USERNAME;return"win32"===process.platform?process.env.USERPROFILE||process.env.HOMEDRIVE+process.env.HOMEPATH||A||null:"darwin"===process.platform?A||(B?"/Users/"+B:null):"linux"===process.platform?A||(0===process.getuid()?"/root":B?"/home/"+B:null):A||null};var w="win32"!==process.platform&&Q.realpathSync&&"function"==typeof Q.realpathSync.native?Q.realpathSync.native:Q.realpathSync,o=D(),s=function(A,B,Q){return Q&&!1===Q.preserveSymlinks?A(B):B},e=function(A,B,Q){for(var E=function(A,B,Q){var g=B&&B.moduleDirectory?[].concat(B.moduleDirectory):["node_modules"];if(B&&"function"==typeof B.paths)return B.paths(Q,A,(function(){return I(A,g)}),B);var E=I(A,g);return B&&B.paths?E.concat(B.paths):E}(B,Q,A),C=0;CA.promises)),C=await Promise.resolve().then((function(){return A(require("path"))})),{URL:I}=await Promise.resolve().then((function(){return A(require("url"))})),D=new I(".","undefined"==typeof document?new(require("url").URL)("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("index.cjs.js",document.baseURI).href).pathname;try{let A=C.resolve(D,"..",Q),B=C.resolve(A,g);const I=await E.readFile(B,"utf8");if(!I)throw new Error("no results");return JSON.parse(I)}catch(A){const I=B("@code-hike/lighter",{basedir:D});let w=C.resolve(I,"..","..",Q),o=C.resolve(w,g);return JSON.parse(await E.readFile(o,"utf8"))}}async function g(B){if("function"==typeof fetch){const A=await fetch(`https://lighter.codehike.org/${B}.json`);return await A.json()}const Q=await Promise.resolve().then((function(){return A(require("https"))})),g={host:"lighter.codehike.org",path:`/${B}.json`,method:"GET"};return new Promise(((A,B)=>{const E=Q.request(g,(B=>{let Q="";B.on("data",(A=>{Q+=A})),B.on("end",(()=>{A(JSON.parse(Q))}))}));E.on("error",(A=>{B(A)})),E.end()}))}Object.defineProperty(exports,"__esModule",{value:!0});const E=A=>/^#([A-Fa-f0-9]{3,4}){1,2}$/.test(A),C=(A,B)=>A.match(new RegExp(`.{${B}}`,"g")),I=A=>parseInt(A.repeat(2/A.length),16);function D(A,B){return void 0!==A?A/255:"number"!=typeof B||B<0||B>1?1:B}function w(A,B){if(!A)return A;const{r:Q,g:g,b:w,a:o}=function(A){if(!A)return;if(!E(A))throw new Error("Invalid color string, must be a valid hex color");const B=Math.floor((A.length-1)/3),Q=C(A.slice(1),B),[g,w,o,s]=Q.map(I);return{r:g,g:w,b:o,a:D(s,1)}}(A);return function(A){if(!A)return;const{r:B,g:Q,b:g,a:E}=A,C=Math.round(255*E);return`#${B.toString(16).padStart(2,"0")}${Q.toString(16).padStart(2,"0")}${g.toString(16).padStart(2,"0")}${C.toString(16).padStart(2,"0")}`}({r:Q,g:g,b:w,a:o*B})}function o(A,B){const Q=A.colors||{};if(Q[B])return Q[B];const g=e[B];if(!g)throw new Error(`Unknown theme color key: ${B}`);return"string"==typeof g?o(A,g):function(A,B){const Q=B[A.type];if(Array.isArray(Q)){const[B,g,...E]=Q;return B(o(A,g),...E)}return Q}(A,g)}const s="#6FC3DF",e={"editor.foreground":{dark:"#bbbbbb",light:"#333333",hc:"#ffffff"},"editorLineNumber.foreground":{dark:"#858585",light:"#237893",hc:"#fffffe"},"editor.selectionBackground":{light:"#ADD6FF",dark:"#264F78",hc:"#f3f518"},"editor.background":{light:"#fffffe",dark:"#1E1E1E",hc:"#000000"},"editorGroupHeader.tabsBackground":{dark:"#252526",light:"#F3F3F3"},"tab.activeBackground":"editor.background","tab.activeForeground":{dark:"#ffffff",light:"#333333",hc:"#ffffff"},"tab.border":{dark:"#252526",light:"#F3F3F3",hc:s},"tab.activeBorder":"tab.activeBackground","tab.inactiveBackground":{dark:"#2D2D2D",light:"#ECECEC"},"tab.inactiveForeground":{dark:[w,"tab.activeForeground",.5],light:[w,"tab.activeForeground",.5],hc:"#ffffff"},"diffEditor.insertedTextBackground":{dark:"#9ccc2c33",light:"#9ccc2c40"},"diffEditor.removedTextBackground":{dark:"#ff000033",light:"#ff000033"},"diffEditor.insertedLineBackground":{dark:"#9bb95533",light:"#9bb95533"},"diffEditor.removedLineBackground":{dark:"#ff000033",light:"#ff000033"},"icon.foreground":{dark:"#C5C5C5",light:"#424242",hc:"#FFFFFF"},"sideBar.background":{dark:"#252526",light:"#F3F3F3",hc:"#000000"},"sideBar.foreground":"editor.foreground","sideBar.border":"sideBar.background","list.inactiveSelectionBackground":{dark:"#37373D",light:"#E4E6F1"},"list.inactiveSelectionForeground":{},"list.hoverBackground":{dark:"#2A2D2E",light:"#F0F0F0"},"list.hoverForeground":{},"editorGroupHeader.tabsBorder":{hc:s},"tab.activeBorderTop":{hc:s},"tab.hoverBackground":"tab.inactiveBackground","tab.hoverForeground":"tab.inactiveForeground","editor.rangeHighlightBackground":{dark:"#ffffff0b",light:"#fdff0033"},"editor.infoForeground":{dark:"#3794FF",light:"#1a85ff",hc:"#3794FF"},"input.border":{hc:s},"input.background":{dark:"#3C3C3C",light:"#fffffe",hc:"#000000"},"input.foreground":"editor.foreground","editor.lineHighlightBackground":{},focusBorder:{light:"#0090F1",dark:"#007FD4",hc:s},"editorGroup.border":{dark:"#444444",light:"#E7E7E7",hc:s},"list.activeSelectionBackground":{dark:"#094771",light:"#0060C0",hc:"#000000"},"list.activeSelectionForeground":{dark:"#fffffe",light:"#fffffe",hc:"#fffffe"},"lighter.inlineBackground":{dark:[w,"editor.background",.9],light:[w,"editor.background",.9]},"terminal.background":"editor.background","terminal.foreground":"editor.foreground","terminal.ansiBlack":{dark:"#000000",light:"#000000",hc:"#000000"},"terminal.ansiRed":{dark:"#cd3131",light:"#cd3131",hc:"#cd0000"},"terminal.ansiGreen":{dark:"#0DBC79",light:"#00BC00",hc:"#00cd00"},"terminal.ansiYellow":{dark:"#e5e510",light:"#949800",hc:"#cdcd00"},"terminal.ansiBlue":{dark:"#2472c8",light:"#0451a5",hc:"#0000ee"},"terminal.ansiMagenta":{dark:"#bc3fbc",light:"#bc05bc",hc:"#cd00cd"},"terminal.ansiCyan":{dark:"#11a8cd",light:"#0598bc",hc:"#00cdcd"},"terminal.ansiWhite":{dark:"#e5e5e5",light:"#555555",hc:"#e5e5e5"},"terminal.ansiBrightBlack":{dark:"#666666",light:"#666666",hc:"#7f7f7f"},"terminal.ansiBrightRed":{dark:"#f14c4c",light:"#cd3131",hc:"#ff0000"},"terminal.ansiBrightGreen":{dark:"#23d18b",light:"#14CE14",hc:"#00ff00"},"terminal.ansiBrightYellow":{dark:"#f5f543",light:"#b5ba00",hc:"#ffff00"},"terminal.ansiBrightBlue":{dark:"#3b8eea",light:"#0451a5",hc:"#5c5cff"},"terminal.ansiBrightMagenta":{dark:"#d670d6",light:"#bc05bc",hc:"#ff00ff"},"terminal.ansiBrightCyan":{dark:"#29b8db",light:"#0598bc",hc:"#00ffff"},"terminal.ansiBrightWhite":{dark:"#e5e5e5",light:"#a5a5a5",hc:"#ffffff"}},c=new Map,i=new Map;async function t(A){if("string"==typeof A){const B=A;if(!h.includes(B))throw new n(B);if(!c.has(B)){const A=async function(A){try{return await Q("themes",A+".json")}catch(B){return await g(`themes/${A}`)}}(B).then((A=>(i.set(B,A),A)));c.set(B,A)}return c.get(B)}return A}function M(A){let B=null;if("string"==typeof A){if(B=i.get(A),!B)throw new Error("Syntax highlighting error: theme not loaded")}else B=A;return function(A){if(!A)return;const B=A.settings||A.tokenColors||[],Q={name:A.name||"unknown-theme",type:a(A),foreground:"",background:"",settings:B,colors:A.colors||{},colorNames:A.colorNames},g=B.find((A=>!A.scope));if(g){const{foreground:A,background:B}=(null==g?void 0:g.settings)||{},E={};A&&!Q.colors["editor.foreground"]&&(E["editor.foreground"]=A),B&&!Q.colors["editor.background"]&&(E["editor.background"]=B),Object.keys(E).length>0&&(Q.colors=Object.assign(Object.assign({},Q.colors),E)),Q.foreground=A,Q.background=B}g||(Q.settings=[{settings:{foreground:o(Q,"editor.foreground"),background:o(Q,"editor.background")}},...Q.settings]);if(Q.background=Q.background||o(Q,"editor.background"),Q.foreground=Q.foreground||o(Q,"editor.foreground"),"from-css"===A.type&&!Q.colorNames){const A={};let B=0;Q.settings=Q.settings.map((Q=>{const g=Object.assign(Object.assign({},Q),{settings:Object.assign({},Q.settings)}),{foreground:E,background:C}=g.settings||{};return E&&!A[E]&&(A[E]=`#${B.toString(16).padStart(6,"0")}`,B++),C&&!A[C]&&(A[C]=`#${B.toString(16).padStart(6,"0")}`,B++),E&&(g.settings.foreground=A[E]),C&&(g.settings.background=A[C]),g})),Q.colorNames=A}return Q}(B)}function a(A){var B;if("from-css"===A.type)return"from-css";return"light"===(A.type?A.type:(null===(B=A.name)||void 0===B?void 0:B.toLowerCase().includes("light"))?"light":"dark")?"light":"dark"}const h=["dark-plus","dracula-soft","dracula","github-dark","github-dark-dimmed","github-from-css","github-light","light-plus","material-darker","material-default","material-from-css","material-lighter","material-ocean","material-palenight","min-dark","min-light","monokai","nord","one-dark-pro","poimandres","slack-dark","slack-ochin","solarized-dark","solarized-light"];class n extends Error{constructor(A){super(`Unknown theme: ${A}`),this.theme=A}}function F(A){const B=B=>"colorScheme"===B?function(A){return"from-css"===A.type?"var(--ch-0)":A.type}(A):"foreground"===B?A.foreground:"background"===B?A.background:o(A,B);return{colorScheme:B("colorScheme"),foreground:B("foreground"),background:B("background"),lighter:{inlineBackground:B("lighter.inlineBackground")},editor:{background:B("editor.background"),foreground:B("editor.foreground"),lineHighlightBackground:B("editor.lineHighlightBackground"),rangeHighlightBackground:B("editor.rangeHighlightBackground"),infoForeground:B("editor.infoForeground"),selectionBackground:B("editor.selectionBackground")},focusBorder:B("focusBorder"),tab:{activeBackground:B("tab.activeBackground"),activeForeground:B("tab.activeForeground"),inactiveBackground:B("tab.inactiveBackground"),inactiveForeground:B("tab.inactiveForeground"),border:B("tab.border"),activeBorder:B("tab.activeBorder"),activeBorderTop:B("tab.activeBorderTop")},editorGroup:{border:B("editorGroup.border")},editorGroupHeader:{tabsBackground:B("editorGroupHeader.tabsBackground")},editorLineNumber:{foreground:B("editorLineNumber.foreground")},input:{background:B("input.background"),foreground:B("input.foreground"),border:B("input.border")},icon:{foreground:B("icon.foreground")},sideBar:{background:B("sideBar.background"),foreground:B("sideBar.foreground"),border:B("sideBar.border")},list:{activeSelectionBackground:B("list.activeSelectionBackground"),activeSelectionForeground:B("list.activeSelectionForeground"),hoverBackground:B("list.hoverBackground"),hoverForeground:B("list.hoverForeground")}}}const r={abap:"source.abap","actionscript-3":"source.actionscript.3",ada:"source.ada",apache:"source.apacheconf",apex:"source.apex",apl:"source.apl",applescript:"source.applescript",ara:"source.ara",asm:"source.asm.x86_64",astro:"source.astro",awk:"source.awk",ballerina:"source.ballerina",bat:"source.batchfile",batch:"source.batchfile",beancount:"text.beancount",berry:"source.berry",be:"source.berry",bibtex:"text.bibtex",bicep:"source.bicep",blade:"text.html.php.blade",c:"source.c",cadence:"source.cadence",cdc:"source.cadence",clarity:"source.clar",clojure:"source.clojure",clj:"source.clojure",cmake:"source.cmake",cobol:"source.cobol",codeql:"source.ql",ql:"source.ql",coffee:"source.coffee",cpp:"source.cpp",crystal:"source.crystal",csharp:"source.cs","c#":"source.cs",cs:"source.cs",css:"source.css",cue:"source.cue",cypher:"source.cypher",d:"source.d",dart:"source.dart",dax:"source.dax",diff:"source.diff",docker:"source.dockerfile",dockerfile:"source.dockerfile","dream-maker":"source.dm",elixir:"source.elixir",elm:"source.elm",erb:"text.html.erb",erlang:"source.erlang",erl:"source.erlang",fish:"source.fish",fsharp:"source.fsharp","f#":"source.fsharp",fs:"source.fsharp",gdresource:"source.gdresource",gdscript:"source.gdscript",gdshader:"source.gdshader",gherkin:"text.gherkin.feature","git-commit":"text.git-commit","git-rebase":"text.git-rebase","glimmer-js":"source.gjs","glimmer-ts":"source.gts",glsl:"source.glsl",gnuplot:"source.gnuplot",go:"source.go",graphql:"source.graphql",groovy:"source.groovy",hack:"source.hack",haml:"text.haml",handlebars:"text.html.handlebars",hbs:"text.html.handlebars",haskell:"source.haskell",hs:"source.haskell",hcl:"source.hcl",hjson:"source.hjson",hlsl:"source.hlsl",html:"text.html.basic",http:"source.http",imba:"source.imba",ini:"source.ini",properties:"source.ini",java:"source.java",javascript:"source.js",js:"source.js","jinja-html":"text.html.jinja",jison:"source.jison",json:"source.json",json5:"source.json5",jsonc:"source.json.comments",jsonl:"source.json.lines",jsonnet:"source.jsonnet",jssm:"source.jssm",fsl:"source.jssm",jsx:"source.js.jsx",julia:"source.julia",kotlin:"source.kotlin",kusto:"source.kusto",kql:"source.kusto",latex:"text.tex.latex",less:"source.css.less",liquid:"text.html.liquid",lisp:"source.lisp",logo:"source.logo",lua:"source.lua",make:"source.makefile",makefile:"source.makefile",markdown:"text.html.markdown",md:"text.html.markdown",marko:"text.marko",matlab:"source.matlab",mdx:"source.mdx",mermaid:"source.mermaid",narrat:"source.narrat",nextflow:"source.nextflow",nginx:"source.nginx",nim:"source.nim",nix:"source.nix","objective-c":"source.objc",objc:"source.objc","objective-cpp":"source.objcpp",ocaml:"source.ocaml",pascal:"source.pascal",perl:"source.perl",php:"source.php",plsql:"source.plsql.oracle",postcss:"source.css.postcss",powerquery:"source.powerquery",powershell:"source.powershell",ps:"source.powershell",ps1:"source.powershell",prisma:"source.prisma",prolog:"source.prolog",proto:"source.proto",pug:"text.pug",jade:"text.pug",puppet:"source.puppet",purescript:"source.purescript",python:"source.python",py:"source.python",r:"source.r",raku:"source.perl.6",perl6:"source.perl.6",razor:"text.aspnetcorerazor",reg:"source.reg",rel:"source.rel",riscv:"source.riscv",rst:"source.rst",ruby:"source.ruby",rb:"source.ruby",rust:"source.rust",rs:"source.rust",sas:"source.sas",sass:"source.sass",scala:"source.scala",scheme:"source.scheme",scss:"source.css.scss",shaderlab:"source.shaderlab",shader:"source.shaderlab",shellscript:"source.shell",bash:"source.shell",console:"source.shell",sh:"source.shell",shell:"source.shell",zsh:"source.shell",shellsession:"text.shell-session",smalltalk:"source.smalltalk",solidity:"source.solidity",sparql:"source.sparql",sql:"source.sql","ssh-config":"source.ssh-config",stata:"source.stata",stylus:"source.stylus",styl:"source.stylus",svelte:"source.svelte",swift:"source.swift","system-verilog":"source.systemverilog",tasl:"source.tasl",tcl:"source.tcl",tex:"text.tex",toml:"source.toml",tsx:"source.tsx",turtle:"source.turtle",twig:"text.html.twig",txt:"source.txt",typescript:"source.ts",ts:"source.ts",v:"source.v",vb:"source.asp.vb.net",cmd:"source.asp.vb.net",verilog:"source.verilog",vhdl:"source.vhdl",viml:"source.viml",vim:"source.viml",vimscript:"source.viml","vue-html":"text.html.vue-html",vue:"source.vue",vyper:"source.vyper",wasm:"source.wat",wenyan:"source.wenyan","文言":"source.wenyan",wgsl:"source.wgsl",wolfram:"source.wolfram",xml:"text.xml",xsl:"text.xml.xsl",yaml:"source.yaml",yml:"source.yaml",zenscript:"source.zenscript"},G={"source.abap":{id:"abap",path:"abap.tmLanguage.json",embeddedScopes:[]},"source.actionscript.3":{id:"actionscript-3",path:"actionscript-3.tmLanguage.json",embeddedScopes:[]},"source.ada":{id:"ada",path:"ada.tmLanguage.json",embeddedScopes:[]},"source.apacheconf":{id:"apache",path:"apache.tmLanguage.json",embeddedScopes:[]},"source.apex":{id:"apex",path:"apex.tmLanguage.json",embeddedScopes:[]},"source.apl":{id:"apl",path:"apl.tmLanguage.json",embeddedScopes:["source.java","source.json","source.js","source.css","text.xml","text.html.basic"]},"source.applescript":{id:"applescript",path:"applescript.tmLanguage.json",embeddedScopes:[]},"source.ara":{id:"ara",path:"ara.tmLanguage.json",embeddedScopes:[]},"source.asm.x86_64":{id:"asm",path:"asm.tmLanguage.json",embeddedScopes:[]},"source.astro":{id:"astro",path:"astro.tmLanguage.json",embeddedScopes:["source.tsx","source.css.postcss","source.css.less","source.css.scss","source.css","source.sass","source.stylus","source.ts","source.js","source.json"]},"source.awk":{id:"awk",path:"awk.tmLanguage.json",embeddedScopes:[]},"source.ballerina":{id:"ballerina",path:"ballerina.tmLanguage.json",embeddedScopes:[]},"source.batchfile":{id:"bat",path:"bat.tmLanguage.json",embeddedScopes:[]},"text.beancount":{id:"beancount",path:"beancount.tmLanguage.json",embeddedScopes:[]},"source.berry":{id:"berry",path:"berry.tmLanguage.json",embeddedScopes:[]},"text.bibtex":{id:"bibtex",path:"bibtex.tmLanguage.json",embeddedScopes:[]},"source.bicep":{id:"bicep",path:"bicep.tmLanguage.json",embeddedScopes:[]},"text.html.php.blade":{id:"blade",path:"blade.tmLanguage.json",embeddedScopes:["source.java","source.css","source.json","source.js","source.sql","text.xml","text.html.basic"]},"source.c":{id:"c",path:"c.tmLanguage.json",embeddedScopes:[]},"source.cadence":{id:"cadence",path:"cadence.tmLanguage.json",embeddedScopes:[]},"source.clar":{id:"clarity",path:"clarity.tmLanguage.json",embeddedScopes:[]},"source.clojure":{id:"clojure",path:"clojure.tmLanguage.json",embeddedScopes:[]},"source.cmake":{id:"cmake",path:"cmake.tmLanguage.json",embeddedScopes:[]},"source.cobol":{id:"cobol",path:"cobol.tmLanguage.json",embeddedScopes:["source.css","source.js","source.java","text.html.basic","source.sql"]},"source.ql":{id:"codeql",path:"codeql.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.stylus","source.sass","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.tsx","source.ts","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.css.scss","source.swift","source.objc","source.css.less","source.json.comments","source.json","source.js","text.pug","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.coffee","source.clojure","source.batchfile","source.yaml","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","text.html.basic","source.css","text.html.markdown"]},"source.coffee":{id:"coffee",path:"coffee.tmLanguage.json",embeddedScopes:["source.js"]},"source.cpp":{id:"cpp",path:"cpp.tmLanguage.json",embeddedScopes:["source.c","source.sql","source.glsl"]},"source.crystal":{id:"crystal",path:"crystal.tmLanguage.json",embeddedScopes:["source.shell","source.js","source.c","source.css","source.sql","text.html.basic"]},"source.cs":{id:"csharp",path:"csharp.tmLanguage.json",embeddedScopes:[]},"source.css":{id:"css",path:"css.tmLanguage.json",embeddedScopes:[]},"source.cue":{id:"cue",path:"cue.tmLanguage.json",embeddedScopes:[]},"source.cypher":{id:"cypher",path:"cypher.tmLanguage.json",embeddedScopes:[]},"source.d":{id:"d",path:"d.tmLanguage.json",embeddedScopes:[]},"source.dart":{id:"dart",path:"dart.tmLanguage.json",embeddedScopes:[]},"source.dax":{id:"dax",path:"dax.tmLanguage.json",embeddedScopes:[]},"source.diff":{id:"diff",path:"diff.tmLanguage.json",embeddedScopes:[]},"source.dockerfile":{id:"docker",path:"docker.tmLanguage.json",embeddedScopes:[]},"source.dm":{id:"dream-maker",path:"dream-maker.tmLanguage.json",embeddedScopes:[]},"source.elixir":{id:"elixir",path:"elixir.tmLanguage.json",embeddedScopes:["source.css","source.js","text.html.basic"]},"source.elm":{id:"elm",path:"elm.tmLanguage.json",embeddedScopes:["source.c","source.glsl"]},"text.html.erb":{id:"erb",path:"erb.tmLanguage.json",embeddedScopes:["source.java","source.lua","source.shell","source.c","source.sql","text.xml","source.css","source.js","source.ruby","text.html.basic"]},"source.erlang":{id:"erlang",path:"erlang.tmLanguage.json",embeddedScopes:[]},"source.fish":{id:"fish",path:"fish.tmLanguage.json",embeddedScopes:[]},"source.fsharp":{id:"fsharp",path:"fsharp.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.stylus","source.sass","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.cs","source.tsx","source.ts","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.css.scss","source.swift","source.objc","source.css.less","source.json.comments","source.json","source.js","text.pug","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.coffee","source.clojure","source.batchfile","source.yaml","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","text.html.basic","source.css","text.html.markdown"]},"source.gdresource":{id:"gdresource",path:"gdresource.tmLanguage.json",embeddedScopes:["source.gdscript","source.gdshader"]},"source.gdscript":{id:"gdscript",path:"gdscript.tmLanguage.json",embeddedScopes:[]},"source.gdshader":{id:"gdshader",path:"gdshader.tmLanguage.json",embeddedScopes:[]},"text.gherkin.feature":{id:"gherkin",path:"gherkin.tmLanguage.json",embeddedScopes:[]},"text.git-commit":{id:"git-commit",path:"git-commit.tmLanguage.json",embeddedScopes:["source.diff"]},"text.git-rebase":{id:"git-rebase",path:"git-rebase.tmLanguage.json",embeddedScopes:["source.shell"]},"source.gjs":{id:"glimmer-js",path:"glimmer-js.tmLanguage.json",embeddedScopes:["source.yaml","source.css","text.html.basic","text.html.handlebars","source.js"]},"source.gts":{id:"glimmer-ts",path:"glimmer-ts.tmLanguage.json",embeddedScopes:["source.yaml","source.js","source.css","text.html.basic","text.html.handlebars","source.ts"]},"source.glsl":{id:"glsl",path:"glsl.tmLanguage.json",embeddedScopes:["source.c"]},"source.gnuplot":{id:"gnuplot",path:"gnuplot.tmLanguage.json",embeddedScopes:[]},"source.go":{id:"go",path:"go.tmLanguage.json",embeddedScopes:[]},"source.graphql":{id:"graphql",path:"graphql.tmLanguage.json",embeddedScopes:["source.tsx","source.js.jsx","source.ts","source.js"]},"source.groovy":{id:"groovy",path:"groovy.tmLanguage.json",embeddedScopes:[]},"source.hack":{id:"hack",path:"hack.tmLanguage.json",embeddedScopes:["source.css","source.js","source.sql","text.html.basic"]},"text.haml":{id:"haml",path:"haml.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.stylus","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.tsx","source.ts","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.css.scss","source.swift","source.objc","source.css.less","source.json.comments","source.json","text.pug","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.clojure","source.batchfile","source.yaml","text.xml.xsl","source.asp.vb.net","source.php","source.r","source.perl","source.makefile","source.java","source.ini","source.lua","source.shell","source.c","source.sql","text.xml","text.html.basic","source.css","text.html.markdown","source.coffee","source.sass","source.js","source.ruby"]},"text.html.handlebars":{id:"handlebars",path:"handlebars.tmLanguage.json",embeddedScopes:["source.yaml","source.js","source.css","text.html.basic"]},"source.haskell":{id:"haskell",path:"haskell.tmLanguage.json",embeddedScopes:[]},"source.hcl":{id:"hcl",path:"hcl.tmLanguage.json",embeddedScopes:[]},"source.hjson":{id:"hjson",path:"hjson.tmLanguage.json",embeddedScopes:[]},"source.hlsl":{id:"hlsl",path:"hlsl.tmLanguage.json",embeddedScopes:[]},"text.html.basic":{id:"html",path:"html.tmLanguage.json",embeddedScopes:["source.css","source.js"]},"source.http":{id:"http",path:"http.tmLanguage.json",embeddedScopes:["source.tsx","source.js.jsx","source.ts","source.js","source.java","source.graphql","text.xml","source.json","source.shell"]},"source.imba":{id:"imba",path:"imba.tmLanguage.json",embeddedScopes:[]},"source.ini":{id:"ini",path:"ini.tmLanguage.json",embeddedScopes:[]},"source.java":{id:"java",path:"java.tmLanguage.json",embeddedScopes:[]},"source.js":{id:"javascript",path:"javascript.tmLanguage.json",embeddedScopes:[]},"text.html.jinja":{id:"jinja-html",path:"jinja-html.tmLanguage.json",embeddedScopes:["source.css","source.js","text.html.basic"]},"source.jison":{id:"jison",path:"jison.tmLanguage.json",embeddedScopes:["source.js"]},"source.json":{id:"json",path:"json.tmLanguage.json",embeddedScopes:[]},"source.json5":{id:"json5",path:"json5.tmLanguage.json",embeddedScopes:[]},"source.json.comments":{id:"jsonc",path:"jsonc.tmLanguage.json",embeddedScopes:[]},"source.json.lines":{id:"jsonl",path:"jsonl.tmLanguage.json",embeddedScopes:[]},"source.jsonnet":{id:"jsonnet",path:"jsonnet.tmLanguage.json",embeddedScopes:[]},"source.jssm":{id:"jssm",path:"jssm.tmLanguage.json",embeddedScopes:[]},"source.js.jsx":{id:"jsx",path:"jsx.tmLanguage.json",embeddedScopes:[]},"source.julia":{id:"julia",path:"julia.tmLanguage.json",embeddedScopes:["source.c","source.glsl","source.sql","source.r","source.js","source.python","source.cpp"]},"source.kotlin":{id:"kotlin",path:"kotlin.tmLanguage.json",embeddedScopes:[]},"source.kusto":{id:"kusto",path:"kusto.tmLanguage.json",embeddedScopes:[]},"text.tex.latex":{id:"latex",path:"latex.tmLanguage.json",embeddedScopes:["source.glsl","source.shell","source.sql","source.cpp","source.c","source.r","source.gnuplot","source.scala","source.rust","source.yaml","source.python","source.ts","source.js","source.ruby","source.julia","source.lua","source.java","text.xml","text.html.basic","source.haskell","source.css","text.tex"]},"source.css.less":{id:"less",path:"less.tmLanguage.json",embeddedScopes:["source.css"]},"text.html.liquid":{id:"liquid",path:"liquid.tmLanguage.json",embeddedScopes:["source.js","source.json","source.css","text.html.basic"]},"source.lisp":{id:"lisp",path:"lisp.tmLanguage.json",embeddedScopes:[]},"source.logo":{id:"logo",path:"logo.tmLanguage.json",embeddedScopes:[]},"source.lua":{id:"lua",path:"lua.tmLanguage.json",embeddedScopes:["source.c"]},"source.makefile":{id:"make",path:"make.tmLanguage.json",embeddedScopes:[]},"text.html.markdown":{id:"markdown",path:"markdown.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.stylus","source.sass","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.tsx","source.ts","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.css.scss","source.swift","source.objc","source.css.less","source.json.comments","source.json","source.js","text.pug","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.coffee","source.clojure","source.batchfile","source.yaml","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","text.html.basic","source.css"]},"text.marko":{id:"marko",path:"marko.tmLanguage.json",embeddedScopes:["source.js","source.css.scss","source.css.less","source.css"]},"source.matlab":{id:"matlab",path:"matlab.tmLanguage.json",embeddedScopes:[]},"source.mdx":{id:"mdx",path:"mdx.tmLanguage.json",embeddedScopes:["source.gnuplot","text.tex","source.stylus","source.sass","text.bibtex","text.tex.latex","text.html.handlebars","source.dart","source.fsharp","source.powershell","source.perl.6","source.json.comments","text.pug","source.groovy","text.git-rebase","text.git-commit","source.batchfile","text.xml.xsl","source.asp.vb.net","source.php","source.js.jsx","source.glsl","source.ts","source.swift","text.xml","source.sql","text.shell-session","source.shell","source.css.scss","source.scala","source.rust","source.ruby","source.r","source.python","source.perl","source.objc","text.html.markdown","source.makefile","source.lua","source.css.less","source.kotlin","source.julia","source.json","source.js","source.java","source.ini","text.html.basic","source.haskell","source.graphql","source.go","source.erlang","source.elm","source.elixir","source.dockerfile","source.diff","source.css","source.cs","source.cpp","source.coffee","source.clojure","source.c","source.yaml","source.toml","source.tsx"]},"source.mermaid":{id:"mermaid",path:"mermaid.tmLanguage.json",embeddedScopes:[]},"source.narrat":{id:"narrat",path:"narrat.tmLanguage.json",embeddedScopes:[]},"source.nextflow":{id:"nextflow",path:"nextflow.tmLanguage.json",embeddedScopes:[]},"source.nginx":{id:"nginx",path:"nginx.tmLanguage.json",embeddedScopes:["source.c","source.lua"]},"source.nim":{id:"nim",path:"nim.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.stylus","source.sass","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.tsx","source.ts","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.css.scss","source.swift","source.objc","source.css.less","source.json.comments","source.json","text.pug","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.coffee","source.clojure","source.batchfile","source.yaml","text.xml.xsl","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.ini","source.java","text.html.markdown","source.glsl","source.css","source.js","text.xml","text.html.basic","source.c"]},"source.nix":{id:"nix",path:"nix.tmLanguage.json",embeddedScopes:[]},"source.objc":{id:"objective-c",path:"objective-c.tmLanguage.json",embeddedScopes:[]},"source.objcpp":{id:"objective-cpp",path:"objective-cpp.tmLanguage.json",embeddedScopes:[]},"source.ocaml":{id:"ocaml",path:"ocaml.tmLanguage.json",embeddedScopes:[]},"source.pascal":{id:"pascal",path:"pascal.tmLanguage.json",embeddedScopes:[]},"source.perl":{id:"perl",path:"perl.tmLanguage.json",embeddedScopes:["source.java","source.sql","source.js","source.css","text.xml","text.html.basic"]},"source.php":{id:"php",path:"php.tmLanguage.json",embeddedScopes:["source.java","source.css","source.json","source.js","source.sql","text.xml","text.html.basic"]},"source.plsql.oracle":{id:"plsql",path:"plsql.tmLanguage.json",embeddedScopes:[]},"source.css.postcss":{id:"postcss",path:"postcss.tmLanguage.json",embeddedScopes:[]},"source.powerquery":{id:"powerquery",path:"powerquery.tmLanguage.json",embeddedScopes:[]},"source.powershell":{id:"powershell",path:"powershell.tmLanguage.json",embeddedScopes:[]},"source.prisma":{id:"prisma",path:"prisma.tmLanguage.json",embeddedScopes:[]},"source.prolog":{id:"prolog",path:"prolog.tmLanguage.json",embeddedScopes:[]},"source.proto":{id:"proto",path:"proto.tmLanguage.json",embeddedScopes:[]},"text.pug":{id:"pug",path:"pug.tmLanguage.json",embeddedScopes:["text.html.basic","source.coffee","source.stylus","source.css.scss","source.sass","source.css","source.js"]},"source.puppet":{id:"puppet",path:"puppet.tmLanguage.json",embeddedScopes:[]},"source.purescript":{id:"purescript",path:"purescript.tmLanguage.json",embeddedScopes:[]},"source.python":{id:"python",path:"python.tmLanguage.json",embeddedScopes:[]},"source.r":{id:"r",path:"r.tmLanguage.json",embeddedScopes:[]},"source.perl.6":{id:"raku",path:"raku.tmLanguage.json",embeddedScopes:[]},"text.aspnetcorerazor":{id:"razor",path:"razor.tmLanguage.json",embeddedScopes:["source.css","source.js","source.cs","text.html.basic"]},"source.reg":{id:"reg",path:"reg.tmLanguage.json",embeddedScopes:[]},"source.rel":{id:"rel",path:"rel.tmLanguage.json",embeddedScopes:[]},"source.riscv":{id:"riscv",path:"riscv.tmLanguage.json",embeddedScopes:[]},"source.rst":{id:"rst",path:"rst.tmLanguage.json",embeddedScopes:["source.java","source.lua","source.c","source.css","text.xml","text.html.basic","source.sql","source.glsl","source.ruby","source.cmake","source.yaml","source.shell","source.js","source.python","source.cpp"]},"source.ruby":{id:"ruby",path:"ruby.tmLanguage.json",embeddedScopes:["source.java","source.lua","source.shell","source.js","source.c","source.css","source.sql","text.xml","text.html.basic"]},"source.rust":{id:"rust",path:"rust.tmLanguage.json",embeddedScopes:[]},"source.sas":{id:"sas",path:"sas.tmLanguage.json",embeddedScopes:["source.sql"]},"source.sass":{id:"sass",path:"sass.tmLanguage.json",embeddedScopes:[]},"source.scala":{id:"scala",path:"scala.tmLanguage.json",embeddedScopes:[]},"source.scheme":{id:"scheme",path:"scheme.tmLanguage.json",embeddedScopes:[]},"source.css.scss":{id:"scss",path:"scss.tmLanguage.json",embeddedScopes:["source.css"]},"source.shaderlab":{id:"shaderlab",path:"shaderlab.tmLanguage.json",embeddedScopes:["source.hlsl"]},"source.shell":{id:"shellscript",path:"shellscript.tmLanguage.json",embeddedScopes:[]},"text.shell-session":{id:"shellsession",path:"shellsession.tmLanguage.json",embeddedScopes:["source.shell"]},"source.smalltalk":{id:"smalltalk",path:"smalltalk.tmLanguage.json",embeddedScopes:[]},"source.solidity":{id:"solidity",path:"solidity.tmLanguage.json",embeddedScopes:[]},"source.sparql":{id:"sparql",path:"sparql.tmLanguage.json",embeddedScopes:["source.turtle"]},"source.sql":{id:"sql",path:"sql.tmLanguage.json",embeddedScopes:[]},"source.ssh-config":{id:"ssh-config",path:"ssh-config.tmLanguage.json",embeddedScopes:[]},"source.stata":{id:"stata",path:"stata.tmLanguage.json",embeddedScopes:["source.sql"]},"source.stylus":{id:"stylus",path:"stylus.tmLanguage.json",embeddedScopes:[]},"source.svelte":{id:"svelte",path:"svelte.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.tsx","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.swift","source.objc","source.json.comments","source.json","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.clojure","source.batchfile","source.yaml","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","text.html.basic","text.html.markdown","text.pug","source.css.postcss","source.css.less","source.css.scss","source.css","source.sass","source.stylus","source.coffee","source.ts","source.js"]},"source.swift":{id:"swift",path:"swift.tmLanguage.json",embeddedScopes:[]},"source.systemverilog":{id:"system-verilog",path:"system-verilog.tmLanguage.json",embeddedScopes:[]},"source.tasl":{id:"tasl",path:"tasl.tmLanguage.json",embeddedScopes:[]},"source.tcl":{id:"tcl",path:"tcl.tmLanguage.json",embeddedScopes:[]},"text.tex":{id:"tex",path:"tex.tmLanguage.json",embeddedScopes:["source.r"]},"source.toml":{id:"toml",path:"toml.tmLanguage.json",embeddedScopes:[]},"source.tsx":{id:"tsx",path:"tsx.tmLanguage.json",embeddedScopes:[]},"source.turtle":{id:"turtle",path:"turtle.tmLanguage.json",embeddedScopes:[]},"text.html.twig":{id:"twig",path:"twig.tmLanguage.json",embeddedScopes:["source.java","source.lua","source.shell","source.c","source.json","source.sql","text.xml","text.html.basic","source.ruby","source.python","source.php","source.js","source.css"]},"source.txt":{id:"txt",path:"txt.tmLanguage.json",embeddedScopes:[]},"source.ts":{id:"typescript",path:"typescript.tmLanguage.json",embeddedScopes:[]},"source.v":{id:"v",path:"v.tmLanguage.json",embeddedScopes:[]},"source.asp.vb.net":{id:"vb",path:"vb.tmLanguage.json",embeddedScopes:[]},"source.verilog":{id:"verilog",path:"verilog.tmLanguage.json",embeddedScopes:[]},"source.vhdl":{id:"vhdl",path:"vhdl.tmLanguage.json",embeddedScopes:[]},"source.viml":{id:"viml",path:"viml.tmLanguage.json",embeddedScopes:[]},"text.html.vue-html":{id:"vue-html",path:"vue-html.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.swift","source.objc","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.coffee","source.clojure","source.batchfile","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","source.graphql","source.toml","source.yaml","source.json5","source.json.comments","source.json","source.tsx","source.js.jsx","source.ts","source.css.less","source.css.scss","source.css","source.sass","source.stylus","text.pug","text.html.markdown","text.html.basic","source.js","source.vue"]},"source.vue":{id:"vue",path:"vue.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.swift","source.objc","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.coffee","source.clojure","source.batchfile","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","source.graphql","source.toml","source.yaml","source.json5","source.json.comments","source.json","source.tsx","source.js.jsx","source.ts","source.js","source.css.less","source.css.scss","source.css","source.sass","source.stylus","text.pug","text.html.markdown","text.html.basic"]},"source.vyper":{id:"vyper",path:"vyper.tmLanguage.json",embeddedScopes:[]},"source.wat":{id:"wasm",path:"wasm.tmLanguage.json",embeddedScopes:[]},"source.wenyan":{id:"wenyan",path:"wenyan.tmLanguage.json",embeddedScopes:[]},"source.wgsl":{id:"wgsl",path:"wgsl.tmLanguage.json",embeddedScopes:[]},"source.wolfram":{id:"wolfram",path:"wolfram.tmLanguage.json",embeddedScopes:[]},"text.xml":{id:"xml",path:"xml.tmLanguage.json",embeddedScopes:["source.java"]},"text.xml.xsl":{id:"xsl",path:"xsl.tmLanguage.json",embeddedScopes:["source.java","text.xml"]},"source.yaml":{id:"yaml",path:"yaml.tmLanguage.json",embeddedScopes:[]},"source.zenscript":{id:"zenscript",path:"zenscript.tmLanguage.json",embeddedScopes:[]}};var N={d:(A,B)=>{for(var Q in B)N.o(B,Q)&&!N.o(A,Q)&&Object.defineProperty(A,Q,{enumerable:!0,get:B[Q]})},o:(A,B)=>Object.prototype.hasOwnProperty.call(A,B)},L={};N.d(L,{_X:()=>XA,Bz:()=>vA,ot:()=>TA,u:()=>WA,jG:()=>Y,Pn:()=>ZA});const H="undefined"!=typeof process&&!!process.env.VSCODE_TEXTMATE_DEBUG;var k;function R(A,B){const Q=[],g=function(A){let B=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,Q=B.exec(A);return{next:()=>{if(!Q)return null;const g=Q[0];return Q=B.exec(A),g}}}(A);let E=g.next();for(;null!==E;){let A=0;if(2===E.length&&":"===E.charAt(1)){switch(E.charAt(0)){case"R":A=1;break;case"L":A=-1;break;default:console.log(`Unknown priority ${E} in scope selector`)}E=g.next()}let B=I();if(Q.push({matcher:B,priority:A}),","!==E)break;E=g.next()}return Q;function C(){if("-"===E){E=g.next();const A=C();return B=>!!A&&!A(B)}if("("===E){E=g.next();const A=function(){const A=[];let B=I();for(;B&&(A.push(B),"|"===E||","===E);){do{E=g.next()}while("|"===E||","===E);B=I()}return B=>A.some((A=>A(B)))}();return")"===E&&(E=g.next()),A}if(K(E)){const A=[];do{A.push(E),E=g.next()}while(K(E));return Q=>B(A,Q)}return null}function I(){const A=[];let B=C();for(;B;)A.push(B),B=C();return B=>A.every((A=>A(B)))}}function K(A){return!!A&&!!A.match(/[\w\.:]+/)}function Y(A){"function"==typeof A.dispose&&A.dispose()}function U(A){return Array.isArray(A)?function(A){let B=[];for(let Q=0,g=A.length;Q{for(let Q in B)A[Q]=B[Q]})),A}function P(A){const B=~A.lastIndexOf("/")||~A.lastIndexOf("\\");return 0===B?A:~B==A.length-1?P(A.substring(0,A.length-1)):A.substr(1+~B)}!function(A){A.toBinaryStr=function(A){let B=A.toString(2);for(;B.length<32;)B="0"+B;return B},A.print=function(B){const Q=A.getLanguageId(B),g=A.getTokenType(B),E=A.getFontStyle(B),C=A.getForeground(B),I=A.getBackground(B);console.log({languageId:Q,tokenType:g,fontStyle:E,foreground:C,background:I})},A.getLanguageId=function(A){return(255&A)>>>0},A.getTokenType=function(A){return(768&A)>>>8},A.containsBalancedBrackets=function(A){return 0!=(1024&A)},A.getFontStyle=function(A){return(30720&A)>>>11},A.getForeground=function(A){return(16744448&A)>>>15},A.getBackground=function(A){return(4278190080&A)>>>24},A.set=function(B,Q,g,E,C,I,D){let w=A.getLanguageId(B),o=A.getTokenType(B),s=A.containsBalancedBrackets(B)?1:0,e=A.getFontStyle(B),c=A.getForeground(B),i=A.getBackground(B);return 0!==Q&&(w=Q),8!==g&&(o=g),null!==E&&(s=E?1:0),-1!==C&&(e=C),0!==I&&(c=I),0!==D&&(i=D),(w<<0|o<<8|s<<10|e<<11|c<<15|i<<24)>>>0}}(k||(k={}));let y=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g;class J{static hasCaptures(A){return null!==A&&(y.lastIndex=0,y.test(A))}static replaceCaptures(A,B,Q){return A.replace(y,((A,g,E,C)=>{let I=Q[parseInt(g||E,10)];if(!I)return A;{let A=B.substring(I.start,I.end);for(;"."===A[0];)A=A.substring(1);switch(C){case"downcase":return A.toLowerCase();case"upcase":return A.toUpperCase();default:return A}}}))}}function S(A,B){return AB?1:0}function p(A,B){if(null===A&&null===B)return 0;if(!A)return-1;if(!B)return 1;let Q=A.length,g=B.length;if(Q===g){for(let g=0;g`);return}const C=Q.lookup(B);A instanceof m?v({baseGrammar:C,selfGrammar:E},g):T(A.ruleName,{baseGrammar:C,selfGrammar:E,repository:E.repository},g);const I=Q.injections(A.scopeName);if(I)for(const A of I)g.add(new m(A))}function T(A,B,Q){B.repository&&B.repository[A]&&X([B.repository[A]],B,Q)}function v(A,B){A.selfGrammar.patterns&&Array.isArray(A.selfGrammar.patterns)&&X(A.selfGrammar.patterns,{...A,repository:A.selfGrammar.repository},B),A.selfGrammar.injections&&X(Object.values(A.selfGrammar.injections),{...A,repository:A.selfGrammar.repository},B)}function X(A,B,Q){for(const g of A){if(Q.visitedRule.has(g))continue;Q.visitedRule.add(g);const A=g.repository?u({},B.repository,g.repository):B.repository;Array.isArray(g.patterns)&&X(g.patterns,{...B,repository:A},Q);const E=g.include;if(!E)continue;const C=$(E);switch(C.kind){case 0:v({...B,selfGrammar:B.baseGrammar},Q);break;case 1:v(B,Q);break;case 2:T(C.ruleName,{...B,repository:A},Q);break;case 3:case 4:const g=C.scopeName===B.selfGrammar.scopeName?B.selfGrammar:C.scopeName===B.baseGrammar.scopeName?B.baseGrammar:void 0;if(g){const E={baseGrammar:B.baseGrammar,selfGrammar:g,repository:A};4===C.kind?T(C.ruleName,E,Q):v(E,Q)}else 4===C.kind?Q.add(new O(C.scopeName,C.ruleName)):Q.add(new m(C.scopeName))}}}class Z{constructor(){this.kind=0}}class j{constructor(){this.kind=1}}class V{constructor(A){this.ruleName=A,this.kind=2}}class z{constructor(A){this.scopeName=A,this.kind=3}}class _{constructor(A,B){this.scopeName=A,this.ruleName=B,this.kind=4}}function $(A){if("$base"===A)return new Z;if("$self"===A)return new j;const B=A.indexOf("#");if(-1===B)return new z(A);if(0===B)return new V(A.substring(1));{const Q=A.substring(0,B),g=A.substring(B+1);return new _(Q,g)}}const AA=/\\(\d+)/,BA=/\\(\d+)/g;class QA{constructor(A,B,Q,g){this.$location=A,this.id=B,this._name=Q||null,this._nameIsCapturing=J.hasCaptures(this._name),this._contentName=g||null,this._contentNameIsCapturing=J.hasCaptures(this._contentName)}get debugName(){const A=this.$location?`${P(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${A}`}getName(A,B){return this._nameIsCapturing&&null!==this._name&&null!==A&&null!==B?J.replaceCaptures(this._name,A,B):this._name}getContentName(A,B){return this._contentNameIsCapturing&&null!==this._contentName?J.replaceCaptures(this._contentName,A,B):this._contentName}}class gA extends QA{constructor(A,B,Q,g,E){super(A,B,Q,g),this.retokenizeCapturedWithRuleId=E}dispose(){}collectPatterns(A,B){throw new Error("Not supported!")}compile(A,B){throw new Error("Not supported!")}compileAG(A,B,Q,g){throw new Error("Not supported!")}}class EA extends QA{constructor(A,B,Q,g,E){super(A,B,Q,null),this._match=new oA(g,this.id),this.captures=E,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(A,B){B.push(this._match)}compile(A,B){return this._getCachedCompiledPatterns(A).compile(A)}compileAG(A,B,Q,g){return this._getCachedCompiledPatterns(A).compileAG(A,Q,g)}_getCachedCompiledPatterns(A){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new sA,this.collectPatterns(A,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}}class CA extends QA{constructor(A,B,Q,g,E){super(A,B,Q,g),this.patterns=E.patterns,this.hasMissingPatterns=E.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(A,B){for(const Q of this.patterns)A.getRule(Q).collectPatterns(A,B)}compile(A,B){return this._getCachedCompiledPatterns(A).compile(A)}compileAG(A,B,Q,g){return this._getCachedCompiledPatterns(A).compileAG(A,Q,g)}_getCachedCompiledPatterns(A){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new sA,this.collectPatterns(A,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}}class IA extends QA{constructor(A,B,Q,g,E,C,I,D,w,o){super(A,B,Q,g),this._begin=new oA(E,this.id),this.beginCaptures=C,this._end=new oA(I||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=D,this.applyEndPatternLast=w||!1,this.patterns=o.patterns,this.hasMissingPatterns=o.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(A,B){return this._end.resolveBackReferences(A,B)}collectPatterns(A,B){B.push(this._begin)}compile(A,B){return this._getCachedCompiledPatterns(A,B).compile(A)}compileAG(A,B,Q,g){return this._getCachedCompiledPatterns(A,B).compileAG(A,Q,g)}_getCachedCompiledPatterns(A,B){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new sA;for(const B of this.patterns)A.getRule(B).collectPatterns(A,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,B):this._cachedCompiledPatterns.setSource(0,B)),this._cachedCompiledPatterns}}class DA extends QA{constructor(A,B,Q,g,E,C,I,D,w){super(A,B,Q,g),this._begin=new oA(E,this.id),this.beginCaptures=C,this.whileCaptures=D,this._while=new oA(I,-2),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=w.patterns,this.hasMissingPatterns=w.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(A,B){return this._while.resolveBackReferences(A,B)}collectPatterns(A,B){B.push(this._begin)}compile(A,B){return this._getCachedCompiledPatterns(A).compile(A)}compileAG(A,B,Q,g){return this._getCachedCompiledPatterns(A).compileAG(A,Q,g)}_getCachedCompiledPatterns(A){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new sA;for(const B of this.patterns)A.getRule(B).collectPatterns(A,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(A,B){return this._getCachedCompiledWhilePatterns(A,B).compile(A)}compileWhileAG(A,B,Q,g){return this._getCachedCompiledWhilePatterns(A,B).compileAG(A,Q,g)}_getCachedCompiledWhilePatterns(A,B){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new sA,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,B||"￿"),this._cachedCompiledWhilePatterns}}class wA{static createCaptureRule(A,B,Q,g,E){return A.registerRule((A=>new gA(B,A,Q,g,E)))}static getCompiledRuleId(A,B,Q){return A.id||B.registerRule((g=>{if(A.id=g,A.match)return new EA(A.$vscodeTextmateLocation,A.id,A.name,A.match,wA._compileCaptures(A.captures,B,Q));if(void 0===A.begin){A.repository&&(Q=u({},Q,A.repository));let g=A.patterns;return void 0===g&&A.include&&(g=[{include:A.include}]),new CA(A.$vscodeTextmateLocation,A.id,A.name,A.contentName,wA._compilePatterns(g,B,Q))}return A.while?new DA(A.$vscodeTextmateLocation,A.id,A.name,A.contentName,A.begin,wA._compileCaptures(A.beginCaptures||A.captures,B,Q),A.while,wA._compileCaptures(A.whileCaptures||A.captures,B,Q),wA._compilePatterns(A.patterns,B,Q)):new IA(A.$vscodeTextmateLocation,A.id,A.name,A.contentName,A.begin,wA._compileCaptures(A.beginCaptures||A.captures,B,Q),A.end,wA._compileCaptures(A.endCaptures||A.captures,B,Q),A.applyEndPatternLast,wA._compilePatterns(A.patterns,B,Q))})),A.id}static _compileCaptures(A,B,Q){let g=[];if(A){let E=0;for(const B in A){if("$vscodeTextmateLocation"===B)continue;const A=parseInt(B,10);A>E&&(E=A)}for(let A=0;A<=E;A++)g[A]=null;for(const E in A){if("$vscodeTextmateLocation"===E)continue;const C=parseInt(E,10);let I=0;A[E].patterns&&(I=wA.getCompiledRuleId(A[E],B,Q)),g[C]=wA.createCaptureRule(B,A[E].$vscodeTextmateLocation,A[E].name,A[E].contentName,I)}}return g}static _compilePatterns(A,B,Q){let g=[];if(A)for(let E=0,C=A.length;EA.substring(B.start,B.end)));return BA.lastIndex=0,this.source.replace(BA,((A,B)=>d(Q[parseInt(B,10)]||"")))}_buildAnchorCache(){let A,B,Q,g,E=[],C=[],I=[],D=[];for(A=0,B=this.source.length;AA.source));this._cached=new eA(A,B,this._items.map((A=>A.ruleId)))}return this._cached}compileAG(A,B,Q){return this._hasAnchors?B?Q?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(A,B,Q)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(A,B,Q)),this._anchorCache.A1_G0):Q?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(A,B,Q)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(A,B,Q)),this._anchorCache.A0_G0):this.compile(A)}_resolveAnchors(A,B,Q){let g=this._items.map((A=>A.resolveAnchors(B,Q)));return new eA(A,g,this._items.map((A=>A.ruleId)))}}class eA{constructor(A,B,Q){this.regExps=B,this.rules=Q,this.scanner=A.createOnigScanner(B)}dispose(){"function"==typeof this.scanner.dispose&&this.scanner.dispose()}toString(){const A=[];for(let B=0,Q=this.rules.length;Bthis._root.match(A)))}static createFromRawTheme(A,B){return this.createFromParsedTheme(function(A){if(!A)return[];if(!A.settings||!Array.isArray(A.settings))return[];let B=A.settings,Q=[],g=0;for(let A=0,E=B.length;A1&&(s=C.slice(0,C.length-1),s.reverse()),Q[g++]=new aA(o,s,A,I,D,w)}}return Q}(A),B)}static createFromParsedTheme(A,B){return function(A,B){A.sort(((A,B)=>{let Q=S(A.scope,B.scope);return 0!==Q?Q:(Q=p(A.parentScopes,B.parentScopes),0!==Q?Q:A.index-B.index)}));let Q=0,g="#000000",E="#ffffff";for(;A.length>=1&&""===A[0].scope;){let B=A.shift();-1!==B.fontStyle&&(Q=B.fontStyle),null!==B.foreground&&(g=B.foreground),null!==B.background&&(E=B.background)}let C=new hA(B),I=new MA(Q,C.getId(g),C.getId(E)),D=new FA(new nA(0,null,-1,0,0),[]);for(let B=0,Q=A.length;Bfunction(A,B){if(null===B)return!0;let Q=0,g=B[Q];for(;A;){if(tA(A.scopeName,g)){if(Q++,Q===B.length)return!0;g=B[Q]}A=A.parent}return!1}(A.parent,B.parentScopes)));return Q?new MA(Q.fontStyle,Q.foreground,Q.background):null}}class iA{constructor(A,B){this.parent=A,this.scopeName=B}static push(A,B){for(const Q of B)A=new iA(A,Q);return A}static from(...A){let B=null;for(let Q=0;QA?console.log("how did this happen?"):this.scopeDepth=A,-1!==B&&(this.fontStyle=B),0!==Q&&(this.foreground=Q),0!==g&&(this.background=g)}}class FA{constructor(A,B=[],Q={}){this._mainRule=A,this._children=Q,this._rulesWithParentScopes=B}static _sortBySpecificity(A){return 1===A.length||A.sort(this._cmpBySpecificity),A}static _cmpBySpecificity(A,B){if(A.scopeDepth===B.scopeDepth){const Q=A.parentScopes,g=B.parentScopes;let E=null===Q?0:Q.length,C=null===g?0:g.length;if(E===C)for(let A=0;A{const B=this._scopeToLanguage(A),Q=this._toStandardTokenType(A);return new rA(B,Q)})),this._defaultAttributes=new rA(A,8),this._embeddedLanguagesMatcher=new NA(Object.entries(B||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(A){return null===A?GA._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(A)}_scopeToLanguage(A){return this._embeddedLanguagesMatcher.match(A)||0}_toStandardTokenType(A){const B=A.match(GA.STANDARD_TOKEN_TYPE_REGEXP);if(!B)return 8;switch(B[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}}GA._NULL_SCOPE_METADATA=new rA(0,0),GA.STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/;class NA{constructor(A){if(0===A.length)this.values=null,this.scopesRegExp=null;else{this.values=new Map(A);const B=A.map((([A,B])=>d(A)));B.sort(),B.reverse(),this.scopesRegExp=new RegExp(`^((${B.join(")|(")}))($|\\.)`,"")}}match(A){if(!this.scopesRegExp)return;const B=A.match(this.scopesRegExp);return B?this.values.get(B[1]):void 0}}class LA{constructor(A,B){this.stack=A,this.stoppedEarly=B}}function HA(A,B,Q,g,E,C,I,D){const w=B.content.length;let o=!1,s=-1;if(I){const I=function(A,B,Q,g,E,C){let I=E.beginRuleCapturedEOL?0:-1;const D=[];for(let B=E;B;B=B.pop()){const Q=B.getRule(A);Q instanceof DA&&D.push({rule:Q,stack:B})}for(let w=D.pop();w;w=D.pop()){const{ruleScanner:D,findOptions:o}=RA(w.rule,A,w.stack.endRule,Q,g===I),s=D.findNextMatchSync(B,g,o);if(H&&(console.log(" scanning for while rule"),console.log(D.toString())),!s){H&&console.log(" popping "+w.rule.debugName+" - "+w.rule.debugWhileRegExp),E=w.stack.pop();break}if(-2!==s.ruleId){E=w.stack.pop();break}s.captureIndices&&s.captureIndices.length&&(C.produce(w.stack,s.captureIndices[0].start),KA(A,B,Q,w.stack,C,w.rule.whileCaptures,s.captureIndices),C.produce(w.stack,s.captureIndices[0].end),I=s.captureIndices[0].end,s.captureIndices[0].end>g&&(g=s.captureIndices[0].end,Q=!1))}return{stack:E,linePos:g,anchorPosition:I,isFirstLine:Q}}(A,B,Q,g,E,C);E=I.stack,g=I.linePos,Q=I.isFirstLine,s=I.anchorPosition}const e=Date.now();for(;!o;){if(0!==D&&Date.now()-e>D)return new LA(E,!0);c()}return new LA(E,!1);function c(){H&&(console.log(""),console.log(`@@scanNext ${g}: |${B.content.substr(g).replace(/\n$/,"\\n")}|`));const I=function(A,B,Q,g,E,C){const I=function(A,B,Q,g,E,C){const I=E.getRule(A),{ruleScanner:D,findOptions:w}=kA(I,A,E.endRule,Q,g===C);let o=0;H&&(o=x());const s=D.findNextMatchSync(B,g,w);if(H){const A=x()-o;A>5&&console.warn(`Rule ${I.debugName} (${I.id}) matching took ${A} against '${B}'`),console.log(` scanning for (linePos: ${g}, anchorPosition: ${C})`),console.log(D.toString()),s&&console.log(`matched rule id: ${s.ruleId} from ${s.captureIndices[0].start} to ${s.captureIndices[0].end}`)}return s?{captureIndices:s.captureIndices,matchedRuleId:s.ruleId}:null}(A,B,Q,g,E,C),D=A.getInjections();if(0===D.length)return I;const w=function(A,B,Q,g,E,C,I){let D,w=Number.MAX_VALUE,o=null,s=0;const e=C.contentNameScopesList.getScopeNames();for(let C=0,c=A.length;C=w)&&(w=h,o=a.captureIndices,D=a.ruleId,s=c.priority,w===E))break}return o?{priorityMatch:-1===s,captureIndices:o,matchedRuleId:D}:null}(D,A,B,Q,g,E,C);if(!w)return I;if(!I)return w;const o=I.captureIndices[0].start,s=w.captureIndices[0].start;return s0)&&D[0].end>g;if(-1===e){const I=E.getRule(A);H&&console.log(" popping "+I.debugName+" - "+I.debugEndRegExp),C.produce(E,D[0].start),E=E.withContentNameScopesList(E.nameScopesList),KA(A,B,Q,E,C,I.endCaptures,D),C.produce(E,D[0].end);const e=E;if(E=E.parent,s=e.getAnchorPos(),!c&&e.getEnterPos()===g)return H&&console.error("[1] - Grammar is in an endless loop - Grammar pushed & popped a rule without advancing"),E=e,C.produce(E,w),void(o=!0)}else{const I=A.getRule(e);C.produce(E,D[0].start);const i=E,t=I.getName(B.content,D),M=E.contentNameScopesList.pushAttributed(t,A);if(E=E.push(e,g,s,D[0].end===w,null,M,M),I instanceof IA){const g=I;H&&console.log(" pushing "+g.debugName+" - "+g.debugBeginRegExp),KA(A,B,Q,E,C,g.beginCaptures,D),C.produce(E,D[0].end),s=D[0].end;const e=g.getContentName(B.content,D),t=M.pushAttributed(e,A);if(E=E.withContentNameScopesList(t),g.endHasBackReferences&&(E=E.withEndRule(g.getEndWithResolvedBackReferences(B.content,D))),!c&&i.hasSameRuleAs(E))return H&&console.error("[2] - Grammar is in an endless loop - Grammar pushed the same rule without advancing"),E=E.pop(),C.produce(E,w),void(o=!0)}else if(I instanceof DA){const g=I;H&&console.log(" pushing "+g.debugName),KA(A,B,Q,E,C,g.beginCaptures,D),C.produce(E,D[0].end),s=D[0].end;const e=g.getContentName(B.content,D),t=M.pushAttributed(e,A);if(E=E.withContentNameScopesList(t),g.whileHasBackReferences&&(E=E.withEndRule(g.getWhileWithResolvedBackReferences(B.content,D))),!c&&i.hasSameRuleAs(E))return H&&console.error("[3] - Grammar is in an endless loop - Grammar pushed the same rule without advancing"),E=E.pop(),C.produce(E,w),void(o=!0)}else{const g=I;if(H&&console.log(" matched "+g.debugName+" - "+g.debugMatchRegExp),KA(A,B,Q,E,C,g.captures,D),C.produce(E,D[0].end),E=E.pop(),!c)return H&&console.error("[4] - Grammar is in an endless loop - Grammar is not advancing, nor is it pushing/popping"),E=E.safePop(),C.produce(E,w),void(o=!0)}}D[0].end>g&&(g=D[0].end,Q=!1)}}function kA(A,B,Q,g,E){return{ruleScanner:A.compileAG(B,Q,g,E),findOptions:0}}function RA(A,B,Q,g,E){return{ruleScanner:A.compileWhileAG(B,Q,g,E),findOptions:0}}function KA(A,B,Q,g,E,C,I){if(0===C.length)return;const D=B.content,w=Math.min(C.length,I.length),o=[],s=I[0].end;for(let B=0;Bs)break;for(;o.length>0&&o[o.length-1].endPos<=e.start;)E.produceFromScopes(o[o.length-1].scopes,o[o.length-1].endPos),o.pop();if(o.length>0?E.produceFromScopes(o[o.length-1].scopes,e.start):E.produce(g,e.start),w.retokenizeCapturedWithRuleId){const B=w.getName(D,I),C=g.contentNameScopesList.pushAttributed(B,A),o=w.getContentName(D,I),s=C.pushAttributed(o,A),c=g.push(w.retokenizeCapturedWithRuleId,e.start,-1,!1,null,C,s),i=A.createOnigString(D.substring(0,e.end));HA(A,i,Q&&0===e.start,e.start,c,E,!1,0),Y(i);continue}const c=w.getName(D,I);if(null!==c){const B=(o.length>0?o[o.length-1].scopes:g.contentNameScopesList).pushAttributed(c,A);o.push(new YA(B,e.end))}}for(;o.length>0;)E.produceFromScopes(o[o.length-1].scopes,o[o.length-1].endPos),o.pop()}class YA{constructor(A,B){this.scopes=A,this.endPos=B}}function UA(A,B,Q,g,E){const C=R(B,uA),I=wA.getCompiledRuleId(Q,g,E.repository);for(const Q of C)A.push({debugSelector:B,matcher:Q.matcher,ruleId:I,grammar:E,priority:Q.priority})}function uA(A,B){if(B.length{for(let g=Q;gQ&&A.substr(0,Q)===B&&"."===A[Q]}class yA{constructor(A,B,Q,g,E,C,I,D){if(this._rootScopeName=A,this.balancedBracketSelectors=C,this._onigLib=D,this._basicScopeAttributesProvider=new GA(Q,g),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=I,this._grammar=JA(B,null),this._injections=null,this._tokenTypeMatchers=[],E)for(const A of Object.keys(E)){const B=R(A,uA);for(const Q of B)this._tokenTypeMatchers.push({matcher:Q.matcher,type:E[A]})}}get themeProvider(){return this._grammarRepository}dispose(){for(const A of this._ruleId2desc)A&&A.dispose()}createOnigScanner(A){return this._onigLib.createOnigScanner(A)}createOnigString(A){return this._onigLib.createOnigString(A)}getMetadataForScope(A){return this._basicScopeAttributesProvider.getBasicScopeAttributes(A)}_collectInjections(){const A=[],B=this._rootScopeName,Q=(A=>A===this._rootScopeName?this._grammar:this.getExternalGrammar(A))(B);if(Q){const g=Q.injections;if(g)for(let B in g)UA(A,B,g[B],this,Q);const E=this._grammarRepository.injections(B);E&&E.forEach((B=>{const Q=this.getExternalGrammar(B);if(Q){const B=Q.injectionSelector;B&&UA(A,B,Q,this,Q)}}))}return A.sort(((A,B)=>A.priority-B.priority)),A}getInjections(){if(null===this._injections&&(this._injections=this._collectInjections(),H&&this._injections.length>0)){console.log(`Grammar ${this._rootScopeName} contains the following injections:`);for(const A of this._injections)console.log(` - ${A.debugSelector}`)}return this._injections}registerRule(A){const B=++this._lastRuleId,Q=A(B);return this._ruleId2desc[B]=Q,Q}getRule(A){return this._ruleId2desc[A]}getExternalGrammar(A,B){if(this._includedGrammars[A])return this._includedGrammars[A];if(this._grammarRepository){const Q=this._grammarRepository.lookup(A);if(Q)return this._includedGrammars[A]=JA(Q,B&&B.$base),this._includedGrammars[A]}}tokenizeLine(A,B,Q=0){const g=this._tokenize(A,B,!1,Q);return{tokens:g.lineTokens.getResult(g.ruleStack,g.lineLength),ruleStack:g.ruleStack,stoppedEarly:g.stoppedEarly}}tokenizeLine2(A,B,Q=0){const g=this._tokenize(A,B,!0,Q);return{tokens:g.lineTokens.getBinaryResult(g.ruleStack,g.lineLength),ruleStack:g.ruleStack,stoppedEarly:g.stoppedEarly}}_tokenize(A,B,Q,g){let E;if(-1===this._rootId&&(this._rootId=wA.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections()),B&&B!==pA.NULL)E=!1,B.reset();else{E=!0;const A=this._basicScopeAttributesProvider.getDefaultAttributes(),Q=this.themeProvider.getDefaults(),g=k.set(0,A.languageId,A.tokenType,null,Q.fontStyle,Q.foregroundId,Q.backgroundId),C=this.getRule(this._rootId).getName(null,null);let I;I=C?SA.createRootAndLookUpScopeName(C,g,this):SA.createRoot("unknown",g),B=new pA(null,this._rootId,-1,-1,!1,null,I,I)}A+="\n";const C=this.createOnigString(A),I=C.content.length,D=new dA(Q,A,this._tokenTypeMatchers,this.balancedBracketSelectors),w=HA(this,C,E,0,B,D,!0,g);return Y(C),{lineLength:I,lineTokens:D,ruleStack:w.stack,stoppedEarly:w.stoppedEarly}}}function JA(A,B){return(A=U(A)).repository=A.repository||{},A.repository.$self={$vscodeTextmateLocation:A.$vscodeTextmateLocation,patterns:A.patterns,name:A.scopeName},A.repository.$base=B||A.repository.$self,A}class SA{constructor(A,B,Q){this.parent=A,this.scopePath=B,this.tokenAttributes=Q}static fromExtension(A,B){let Q=A,g=A?.scopePath??null;for(const A of B)g=iA.push(g,A.scopeNames),Q=new SA(Q,g,A.encodedTokenAttributes);return Q}static createRoot(A,B){return new SA(null,new iA(null,A),B)}static createRootAndLookUpScopeName(A,B,Q){const g=Q.getMetadataForScope(A),E=new iA(null,A),C=Q.themeProvider.themeMatch(E),I=SA.mergeAttributes(B,g,C);return new SA(null,E,I)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(A){return SA.equals(this,A)}static equals(A,B){for(;;){if(A===B)return!0;if(!A&&!B)return!0;if(!A||!B)return!1;if(A.scopeName!==B.scopeName||A.tokenAttributes!==B.tokenAttributes)return!1;A=A.parent,B=B.parent}}static mergeAttributes(A,B,Q){let g=-1,E=0,C=0;return null!==Q&&(g=Q.fontStyle,E=Q.foregroundId,C=Q.backgroundId),k.set(A,B.languageId,B.tokenType,null,g,E,C)}pushAttributed(A,B){if(null===A)return this;if(-1===A.indexOf(" "))return SA._pushAttributed(this,A,B);const Q=A.split(/ /g);let g=this;for(const A of Q)g=SA._pushAttributed(g,A,B);return g}static _pushAttributed(A,B,Q){const g=Q.getMetadataForScope(B),E=A.scopePath.push(B),C=Q.themeProvider.themeMatch(E),I=SA.mergeAttributes(A.tokenAttributes,g,C);return new SA(A,E,I)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(A){const B=[];let Q=this;for(;Q&&Q!==A;)B.push({encodedTokenAttributes:Q.tokenAttributes,scopeNames:Q.scopePath.getExtensionIfDefined(Q.parent?.scopePath??null)}),Q=Q.parent;return Q===A?B.reverse():void 0}}class pA{constructor(A,B,Q,g,E,C,I,D){this.parent=A,this.ruleId=B,this.beginRuleCapturedEOL=E,this.endRule=C,this.nameScopesList=I,this.contentNameScopesList=D,this._stackElementBrand=void 0,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=Q,this._anchorPos=g}equals(A){return null!==A&&pA._equals(this,A)}static _equals(A,B){return A===B||!!this._structuralEquals(A,B)&&SA.equals(A.contentNameScopesList,B.contentNameScopesList)}static _structuralEquals(A,B){for(;;){if(A===B)return!0;if(!A&&!B)return!0;if(!A||!B)return!1;if(A.depth!==B.depth||A.ruleId!==B.ruleId||A.endRule!==B.endRule)return!1;A=A.parent,B=B.parent}}clone(){return this}static _reset(A){for(;A;)A._enterPos=-1,A._anchorPos=-1,A=A.parent}reset(){pA._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(A,B,Q,g,E,C,I){return new pA(this,A,B,Q,g,E,C,I)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(A){return A.getRule(this.ruleId)}toString(){const A=[];return this._writeString(A,0),"["+A.join(",")+"]"}_writeString(A,B){return this.parent&&(B=this.parent._writeString(A,B)),A[B++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,B}withContentNameScopesList(A){return this.contentNameScopesList===A?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,A)}withEndRule(A){return this.endRule===A?this:new pA(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,A,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(A){let B=this;for(;B&&B._enterPos===A._enterPos;){if(B.ruleId===A.ruleId)return!0;B=B.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(A,B){const Q=SA.fromExtension(A?.nameScopesList??null,B.nameScopesList);return new pA(A,B.ruleId,B.enterPos??-1,B.anchorPos??-1,B.beginRuleCapturedEOL,B.endRule,Q,SA.fromExtension(Q,B.contentNameScopesList))}}pA.NULL=new pA(null,0,0,0,!1,null,null,null);class lA{constructor(A,B){this.allowAny=!1,this.balancedBracketScopes=A.flatMap((A=>"*"===A?(this.allowAny=!0,[]):R(A,uA).map((A=>A.matcher)))),this.unbalancedBracketScopes=B.flatMap((A=>R(A,uA).map((A=>A.matcher))))}get matchesAlways(){return this.allowAny&&0===this.unbalancedBracketScopes.length}get matchesNever(){return 0===this.balancedBracketScopes.length&&!this.allowAny}match(A){for(const B of this.unbalancedBracketScopes)if(B(A))return!1;for(const B of this.balancedBracketScopes)if(B(A))return!0;return this.allowAny}}class dA{constructor(A,B,Q,g){this.balancedBracketSelectors=g,this._emitBinaryTokens=A,this._tokenTypeOverrides=Q,this._lineText=H?B:null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}produce(A,B){this.produceFromScopes(A.contentNameScopesList,B)}produceFromScopes(A,B){if(this._lastTokenEndIndex>=B)return;if(this._emitBinaryTokens){let Q=A?.tokenAttributes??0,g=!1;if(this.balancedBracketSelectors?.matchesAlways&&(g=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const B=A?.getScopeNames()??[];for(const A of this._tokenTypeOverrides)A.matcher(B)&&(Q=k.set(Q,0,A.type,null,-1,0,0));this.balancedBracketSelectors&&(g=this.balancedBracketSelectors.match(B))}if(g&&(Q=k.set(Q,0,8,g,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===Q)return void(this._lastTokenEndIndex=B);if(H){const Q=A?.getScopeNames()??[];console.log(" token: |"+this._lineText.substring(this._lastTokenEndIndex,B).replace(/\n$/,"\\n")+"|");for(let A=0;A0&&this._tokens[this._tokens.length-1].startIndex===B-1&&this._tokens.pop(),0===this._tokens.length&&(this._lastTokenEndIndex=-1,this.produce(A,B),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(A,B){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===B-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),0===this._binaryTokens.length&&(this._lastTokenEndIndex=-1,this.produce(A,B),this._binaryTokens[this._binaryTokens.length-2]=0);const Q=new Uint32Array(this._binaryTokens.length);for(let A=0,B=this._binaryTokens.length;A0;)10===A.charCodeAt(E)?(E++,C++,I=0):(E++,I++),B--}function w(A){null===Q?E=A:D(A-E)}function o(){for(;E0&&65279===A.charCodeAt(0)&&(E=1);let i=0,t=null,M=[],a=[],h=null;function n(A,B){M.push(i),a.push(t),i=A,t=B}function F(){if(0===M.length)return r("illegal state stack");i=M.pop(),t=a.pop()}function r(B){throw new Error("Near offset "+E+": "+B+" ~~~"+A.substr(E,50)+"~~~")}const G=function(){if(null===h)return r("missing ");let A={};null!==Q&&(A[Q]={filename:B,line:C,char:I}),t[h]=A,h=null,n(1,A)},N=function(){if(null===h)return r("missing ");let A=[];t[h]=A,h=null,n(2,A)},L=function(){let A={};null!==Q&&(A[Q]={filename:B,line:C,char:I}),t.push(A),n(1,A)},H=function(){let A=[];t.push(A),n(2,A)};function k(){if(1!==i)return r("unexpected ");F()}function R(){return 1===i||2!==i?r("unexpected "):void F()}function K(A){if(1===i){if(null===h)return r("missing ");t[h]=A,h=null}else 2===i?t.push(A):t=A}function Y(A){if(isNaN(A))return r("cannot parse float");if(1===i){if(null===h)return r("missing ");t[h]=A,h=null}else 2===i?t.push(A):t=A}function U(A){if(isNaN(A))return r("cannot parse integer");if(1===i){if(null===h)return r("missing ");t[h]=A,h=null}else 2===i?t.push(A):t=A}function u(A){if(1===i){if(null===h)return r("missing ");t[h]=A,h=null}else 2===i?t.push(A):t=A}function P(A){if(1===i){if(null===h)return r("missing ");t[h]=A,h=null}else 2===i?t.push(A):t=A}function y(A){if(1===i){if(null===h)return r("missing ");t[h]=A,h=null}else 2===i?t.push(A):t=A}function J(){let A=c(">"),B=!1;return 47===A.charCodeAt(A.length-1)&&(B=!0,A=A.substring(0,A.length-1)),{name:A.trim(),isClosed:B}}function S(A){if(A.isClosed)return"";let B=c(""),B.replace(/&#([0-9]+);/g,(function(A,B){return String.fromCodePoint(parseInt(B,10))})).replace(/&#x([0-9a-f]+);/g,(function(A,B){return String.fromCodePoint(parseInt(B,16))})).replace(/&|<|>|"|'/g,(function(A){switch(A){case"&":return"&";case"<":return"<";case">":return">";case""":return'"';case"'":return"'"}return A}))}for(;E=g));){const w=A.charCodeAt(E);if(D(1),60!==w)return r("expected <");if(E>=g)return r("unexpected end of input");const c=A.charCodeAt(E);if(63===c){D(1),e("?>");continue}if(33===c){if(D(1),s("--")){e("--\x3e");continue}e(">");continue}if(47===c){if(D(1),o(),s("plist")){e(">");continue}if(s("dict")){e(">"),k();continue}if(s("array")){e(">"),R();continue}return r("unexpected closed tag")}let M=J();switch(M.name){case"dict":1===i?G():2===i?L():(t={},null!==Q&&(t[Q]={filename:B,line:C,char:I}),n(1,t)),M.isClosed&&k();continue;case"array":1===i?N():2===i?H():(t=[],n(2,t)),M.isClosed&&R();continue;case"key":p=S(M),1!==i?r("unexpected "):null!==h?r("too many "):h=p;continue;case"string":K(S(M));continue;case"real":Y(parseFloat(S(M)));continue;case"integer":U(parseInt(S(M),10));continue;case"date":u(new Date(S(M)));continue;case"data":P(S(M));continue;case"true":S(M),y(!0);continue;case"false":S(M),y(!1);continue}if(!/^plist/.test(M.name))return r("unexpected opened tag "+M.name)}var p;return t}function xA(A,B){throw new Error("Near offset "+A.pos+": "+B+" ~~~"+A.source.substr(A.pos,50)+"~~~")}class mA{constructor(A){this.source=A,this.pos=0,this.len=A.length,this.line=1,this.char=0}}class OA{constructor(){this.value=null,this.type=0,this.offset=-1,this.len=-1,this.line=-1,this.char=-1}toLocation(A){return{filename:A,line:this.line,char:this.char}}}function qA(A,B){B.value=null,B.type=0,B.offset=-1,B.len=-1,B.line=-1,B.char=-1;let Q,g=A.source,E=A.pos,C=A.len,I=A.line,D=A.char;for(;;){if(E>=C)return!1;if(Q=g.charCodeAt(E),32!==Q&&9!==Q&&13!==Q){if(10!==Q)break;E++,I++,D=0}else E++,D++}if(B.offset=E,B.line=I,B.char=D,34===Q){for(B.type=1,E++,D++;;){if(E>=C)return!1;if(Q=g.charCodeAt(E),E++,D++,92!==Q){if(34===Q)break}else E++,D++}B.value=g.substring(B.offset+1,E-1).replace(/\\u([0-9A-Fa-f]{4})/g,((A,B)=>String.fromCodePoint(parseInt(B,16)))).replace(/\\(.)/g,((B,Q)=>{switch(Q){case'"':return'"';case"\\":return"\\";case"/":return"/";case"b":return"\b";case"f":return"\f";case"n":return"\n";case"r":return"\r";case"t":return"\t";default:xA(A,"invalid escape sequence")}throw new Error("unreachable")}))}else if(91===Q)B.type=2,E++,D++;else if(123===Q)B.type=3,E++,D++;else if(93===Q)B.type=4,E++,D++;else if(125===Q)B.type=5,E++,D++;else if(58===Q)B.type=6,E++,D++;else if(44===Q)B.type=7,E++,D++;else if(110===Q){if(B.type=8,E++,D++,Q=g.charCodeAt(E),117!==Q)return!1;if(E++,D++,Q=g.charCodeAt(E),108!==Q)return!1;if(E++,D++,Q=g.charCodeAt(E),108!==Q)return!1;E++,D++}else if(116===Q){if(B.type=9,E++,D++,Q=g.charCodeAt(E),114!==Q)return!1;if(E++,D++,Q=g.charCodeAt(E),117!==Q)return!1;if(E++,D++,Q=g.charCodeAt(E),101!==Q)return!1;E++,D++}else if(102===Q){if(B.type=10,E++,D++,Q=g.charCodeAt(E),97!==Q)return!1;if(E++,D++,Q=g.charCodeAt(E),108!==Q)return!1;if(E++,D++,Q=g.charCodeAt(E),115!==Q)return!1;if(E++,D++,Q=g.charCodeAt(E),101!==Q)return!1;E++,D++}else for(B.type=11;;){if(E>=C)return!1;if(Q=g.charCodeAt(E),!(46===Q||Q>=48&&Q<=57||101===Q||69===Q||45===Q||43===Q))break;E++,D++}return B.len=E-B.offset,null===B.value&&(B.value=g.substr(B.offset,B.len)),A.pos=E,A.line=I,A.char=D,!0}class bA{constructor(A,B){this._onigLibPromise=B,this._grammars=new Map,this._rawGrammars=new Map,this._injectionGrammars=new Map,this._theme=A}dispose(){for(const A of this._grammars.values())A.dispose()}setTheme(A){this._theme=A}getColorMap(){return this._theme.getColorMap()}addGrammar(A,B){this._rawGrammars.set(A.scopeName,A),B&&this._injectionGrammars.set(A.scopeName,B)}lookup(A){return this._rawGrammars.get(A)}injections(A){return this._injectionGrammars.get(A)}getDefaults(){return this._theme.getDefaults()}themeMatch(A){return this._theme.match(A)}async grammarForScopeName(A,B,Q,g,E){if(!this._grammars.has(A)){let C=this._rawGrammars.get(A);if(!C)return null;this._grammars.set(A,function(A,B,Q,g,E,C,I,D){return new yA(A,B,Q,g,E,C,I,D)}(A,C,B,Q,g,E,this,await this._onigLibPromise))}return this._grammars.get(A)}}function WA(A,B){let Q=0;const g=[];let E=A,C=B;for(;E!==C;)E&&(!C||E.depth>=C.depth)?(Q++,E=E.parent):(g.push(C.toStateStackFrame()),C=C.parent);return{pops:Q,newFrames:g.reverse()}}function TA(A,B){let Q=A;for(let A=0;A0;)await Promise.all(C.Q.map((A=>this._loadSingleGrammar(A.scopeName)))),C.processQueue();return this._grammarForScopeName(A,B,Q,g,E)}async _loadSingleGrammar(A){return this._ensureGrammarCache.has(A)||this._ensureGrammarCache.set(A,this._doLoadSingleGrammar(A)),this._ensureGrammarCache.get(A)}async _doLoadSingleGrammar(A){const B=await this._options.loadGrammar(A);if(B){const Q="function"==typeof this._options.getInjections?this._options.getInjections(A):void 0;this._syncRegistry.addGrammar(B,Q)}}async addGrammar(A,B=[],Q=0,g=null){return this._syncRegistry.addGrammar(A,B),await this._grammarForScopeName(A.scopeName,Q,g)}_grammarForScopeName(A,B=0,Q=null,g=null,E=null){return this._syncRegistry.grammarForScopeName(A,B,Q,g,E)}}const XA=pA.NULL,ZA=function(A,B=null){return null!==B&&/\.json$/.test(B)?(Q=A,H?function(A,B,Q){let g=new mA(A),E=new OA,C=0,I=null,D=[],w=[];function o(){D.push(C),w.push(I)}function s(){C=D.pop(),I=w.pop()}function e(A){xA(g,A)}for(;qA(g,E);){if(0===C){if(null!==I&&e("too many constructs in root"),3===E.type){I={},I.$vscodeTextmateLocation=E.toLocation(B),o(),C=1;continue}if(2===E.type){I=[],o(),C=4;continue}e("unexpected token in root")}if(2===C){if(5===E.type){s();continue}if(7===E.type){C=3;continue}e("expected , or }")}if(1===C||3===C){if(1===C&&5===E.type){s();continue}if(1===E.type){let A=E.value;if(qA(g,E)&&6===E.type||e("expected colon"),qA(g,E)||e("expected value"),C=2,1===E.type){I[A]=E.value;continue}if(8===E.type){I[A]=null;continue}if(9===E.type){I[A]=!0;continue}if(10===E.type){I[A]=!1;continue}if(11===E.type){I[A]=parseFloat(E.value);continue}if(2===E.type){let B=[];I[A]=B,o(),C=4,I=B;continue}if(3===E.type){let Q={};Q.$vscodeTextmateLocation=E.toLocation(B),I[A]=Q,o(),C=1,I=Q;continue}}e("unexpected token in dict")}if(5===C){if(4===E.type){s();continue}if(7===E.type){C=6;continue}e("expected , or ]")}if(4===C||6===C){if(4===C&&4===E.type){s();continue}if(C=5,1===E.type){I.push(E.value);continue}if(8===E.type){I.push(null);continue}if(9===E.type){I.push(!0);continue}if(10===E.type){I.push(!1);continue}if(11===E.type){I.push(parseFloat(E.value));continue}if(2===E.type){let A=[];I.push(A),o(),C=4,I=A;continue}if(3===E.type){let A={};A.$vscodeTextmateLocation=E.toLocation(B),I.push(A),o(),C=1,I=A;continue}e("unexpected token in array")}e("unknown state")}return 0!==w.length&&e("unclosed constructs"),I}(Q,B):JSON.parse(Q)):function(A,B){return H?function(A,B,Q){return fA(A,B,"$vscodeTextmateLocation")}(A,B):function(A){return fA(A,null,null)}(A)}(A,B);var Q};var jA=L.Bz,VA=("undefined"!=typeof document&&document.currentScript&&document.currentScript.src,function(A){var B,Q,g=void 0!==(A=A||{})?A:{};g.ready=new Promise((function(A,g){B=A,Q=g}));var E,C=Object.assign({},g),I=!1;E=function(A){let B;return"function"==typeof readbuffer?new Uint8Array(readbuffer(A)):(B=read(A,"binary"),"object"==typeof B||L(Q),B);var Q},"undefined"!=typeof scriptArgs&&scriptArgs,"undefined"!=typeof onig_print&&("undefined"==typeof console&&(console={}),console.log=onig_print,console.warn=console.error="undefined"!=typeof printErr?printErr:onig_print);var D,w,o=g.print||console.log.bind(console),s=g.printErr||console.warn.bind(console);Object.assign(g,C),C=null,g.arguments&&g.arguments,g.thisProgram&&g.thisProgram,g.quit&&g.quit,g.wasmBinary&&(D=g.wasmBinary),g.noExitRuntime,"object"!=typeof WebAssembly&&L("no native wasm support detected");var e,c,i,t=!1,M="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function a(A,B,Q){for(var g=B+Q,E=B;A[E]&&!(E>=g);)++E;if(E-B>16&&A.buffer&&M)return M.decode(A.subarray(B,E));for(var C="";B>10,56320|1023&o)}}else C+=String.fromCharCode((31&I)<<6|D)}else C+=String.fromCharCode(I)}return C}function h(A){e=A,g.HEAP8=new Int8Array(A),g.HEAP16=new Int16Array(A),g.HEAP32=new Int32Array(A),g.HEAPU8=c=new Uint8Array(A),g.HEAPU16=new Uint16Array(A),g.HEAPU32=i=new Uint32Array(A),g.HEAPF32=new Float32Array(A),g.HEAPF64=new Float64Array(A)}g.INITIAL_MEMORY;var n=[],F=[],r=[],G=0,N=null;function L(A){g.onAbort&&g.onAbort(A),s(A="Aborted("+A+")"),t=!0,A+=". Build with -sASSERTIONS for more info.";var B=new WebAssembly.RuntimeError(A);throw Q(B),B}var H,k,R,K="data:application/octet-stream;base64,";function Y(A){return A.startsWith(K)}function U(A){try{if(A==H&&D)return new Uint8Array(D);if(E)return E(A);throw"both async and sync fetching of the wasm failed"}catch(A){L(A)}}function u(A){for(;A.length>0;)A.shift()(g)}function P(A){try{return w.grow(A-e.byteLength+65535>>>16),h(w.buffer),1}catch(A){}}Y(H="onig.wasm")||(k=H,H=g.locateFile?g.locateFile(k,""):""+k),R="undefined"!=typeof dateNow?dateNow:()=>performance.now();var y=[null,[],[]];function J(A,B){var Q=y[A];0===B||10===B?((1===A?o:s)(a(Q,0)),Q.length=0):Q.push(B)}var S,p={emscripten_get_now:R,emscripten_memcpy_big:function(A,B,Q){c.copyWithin(A,B,B+Q)},emscripten_resize_heap:function(A){var B=c.length,Q=2147483648;if((A>>>=0)>Q)return!1;let g=(A,B)=>A+(B-A%B)%B;for(var E=1;E<=4;E*=2){var C=B*(1+.2/E);if(C=Math.min(C,A+100663296),P(Math.min(Q,g(Math.max(A,C),65536))))return!0}return!1},fd_write:function(A,B,Q,g){for(var E=0,C=0;C>2],D=i[B+4>>2];B+=8;for(var w=0;w>2]=E,0}};function l(A){function Q(){S||(S=!0,g.calledRun=!0,t||(u(F),B(g),g.onRuntimeInitialized&&g.onRuntimeInitialized(),function(){if(g.postRun)for("function"==typeof g.postRun&&(g.postRun=[g.postRun]);g.postRun.length;)A=g.postRun.shift(),r.unshift(A);var A;u(r)}()))}G>0||(function(){if(g.preRun)for("function"==typeof g.preRun&&(g.preRun=[g.preRun]);g.preRun.length;)A=g.preRun.shift(),n.unshift(A);var A;u(n)}(),G>0||(g.setStatus?(g.setStatus("Running..."),setTimeout((function(){setTimeout((function(){g.setStatus("")}),1),Q()}),1)):Q()))}if(function(){var A={env:p,wasi_snapshot_preview1:p};function B(A,B){var Q,E=A.exports;g.asm=E,h((w=g.asm.memory).buffer),g.asm.__indirect_function_table,Q=g.asm.__wasm_call_ctors,F.unshift(Q),function(A){if(G--,g.monitorRunDependencies&&g.monitorRunDependencies(G),0==G&&N){var B=N;N=null,B()}}()}function E(A){B(A.instance)}function C(B){return(!D&&I&&"function"==typeof fetch?fetch(H,{credentials:"same-origin"}).then((function(A){if(!A.ok)throw"failed to load wasm binary file at '"+H+"'";return A.arrayBuffer()})).catch((function(){return U(H)})):Promise.resolve().then((function(){return U(H)}))).then((function(B){return WebAssembly.instantiate(B,A)})).then((function(A){return A})).then(B,(function(A){s("failed to asynchronously prepare wasm: "+A),L(A)}))}if(G++,g.monitorRunDependencies&&g.monitorRunDependencies(G),g.instantiateWasm)try{return g.instantiateWasm(A,B)}catch(A){s("Module.instantiateWasm callback failed with error: "+A),Q(A)}(D||"function"!=typeof WebAssembly.instantiateStreaming||Y(H)||"function"!=typeof fetch?C(E):fetch(H,{credentials:"same-origin"}).then((function(B){return WebAssembly.instantiateStreaming(B,A).then(E,(function(A){return s("wasm streaming compile failed: "+A),s("falling back to ArrayBuffer instantiation"),C(E)}))}))).catch(Q)}(),g.___wasm_call_ctors=function(){return(g.___wasm_call_ctors=g.asm.__wasm_call_ctors).apply(null,arguments)},g.___errno_location=function(){return(g.___errno_location=g.asm.__errno_location).apply(null,arguments)},g._omalloc=function(){return(g._omalloc=g.asm.omalloc).apply(null,arguments)},g._ofree=function(){return(g._ofree=g.asm.ofree).apply(null,arguments)},g._getLastOnigError=function(){return(g._getLastOnigError=g.asm.getLastOnigError).apply(null,arguments)},g._createOnigScanner=function(){return(g._createOnigScanner=g.asm.createOnigScanner).apply(null,arguments)},g._freeOnigScanner=function(){return(g._freeOnigScanner=g.asm.freeOnigScanner).apply(null,arguments)},g._findNextOnigScannerMatch=function(){return(g._findNextOnigScannerMatch=g.asm.findNextOnigScannerMatch).apply(null,arguments)},g._findNextOnigScannerMatchDbg=function(){return(g._findNextOnigScannerMatchDbg=g.asm.findNextOnigScannerMatchDbg).apply(null,arguments)},g.stackSave=function(){return(g.stackSave=g.asm.stackSave).apply(null,arguments)},g.stackRestore=function(){return(g.stackRestore=g.asm.stackRestore).apply(null,arguments)},g.stackAlloc=function(){return(g.stackAlloc=g.asm.stackAlloc).apply(null,arguments)},g.dynCall_jiji=function(){return(g.dynCall_jiji=g.asm.dynCall_jiji).apply(null,arguments)},g.UTF8ToString=function(A,B){return A?a(c,A,B):""},N=function A(){S||l(),S||(N=A)},g.preInit)for("function"==typeof g.preInit&&(g.preInit=[g.preInit]);g.preInit.length>0;)g.preInit.pop()();return l(),A.ready});let zA=null;class _A{static _utf8ByteLength(A){let B=0;for(let Q=0,g=A.length;Q=55296&&E<=56319&&Q+1=56320&&B<=57343&&(C=65536+(E-55296<<10)|B-56320,I=!0)}B+=C<=127?1:C<=2047?2:C<=65535?3:4,I&&Q++}return B}constructor(A){const B=A.length,Q=_A._utf8ByteLength(A),g=Q!==B,E=g?new Uint32Array(B+1):null;g&&(E[B]=Q);const C=g?new Uint32Array(Q+1):null;g&&(C[Q]=B);const I=new Uint8Array(Q);let D=0;for(let Q=0;Q=55296&&w<=56319&&Q+1=56320&&B<=57343&&(o=65536+(w-55296<<10)|B-56320,s=!0)}g&&(E[Q]=D,s&&(E[Q+1]=D),o<=127?C[D+0]=Q:o<=2047?(C[D+0]=Q,C[D+1]=Q):o<=65535?(C[D+0]=Q,C[D+1]=Q,C[D+2]=Q):(C[D+0]=Q,C[D+1]=Q,C[D+2]=Q,C[D+3]=Q)),o<=127?I[D++]=o:o<=2047?(I[D++]=192|(1984&o)>>>6,I[D++]=128|(63&o)>>>0):o<=65535?(I[D++]=224|(61440&o)>>>12,I[D++]=128|(4032&o)>>>6,I[D++]=128|(63&o)>>>0):(I[D++]=240|(1835008&o)>>>18,I[D++]=128|(258048&o)>>>12,I[D++]=128|(4032&o)>>>6,I[D++]=128|(63&o)>>>0),s&&Q++}this.utf16Length=B,this.utf8Length=Q,this.utf16Value=A,this.utf8Value=I,this.utf16OffsetToUtf8=E,this.utf8OffsetToUtf16=C}createString(A){const B=A._omalloc(this.utf8Length);return A.HEAPU8.set(this.utf8Value,B),B}}class $A{constructor(A){if(this.id=++$A.LAST_ID,!zA)throw new Error("Must invoke loadWASM first.");this._onigBinding=zA,this.content=A;const B=new _A(A);this.utf16Length=B.utf16Length,this.utf8Length=B.utf8Length,this.utf16OffsetToUtf8=B.utf16OffsetToUtf8,this.utf8OffsetToUtf16=B.utf8OffsetToUtf16,this.utf8Length<1e4&&!$A._sharedPtrInUse?($A._sharedPtr||($A._sharedPtr=zA._omalloc(1e4)),$A._sharedPtrInUse=!0,zA.HEAPU8.set(B.utf8Value,$A._sharedPtr),this.ptr=$A._sharedPtr):this.ptr=B.createString(zA)}convertUtf8OffsetToUtf16(A){return this.utf8OffsetToUtf16?A<0?0:A>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[A]:A}convertUtf16OffsetToUtf8(A){return this.utf16OffsetToUtf8?A<0?0:A>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[A]:A}dispose(){this.ptr===$A._sharedPtr?$A._sharedPtrInUse=!1:this._onigBinding._ofree(this.ptr)}}$A.LAST_ID=0,$A._sharedPtr=0,$A._sharedPtrInUse=!1;class AB{constructor(A){if(!zA)throw new Error("Must invoke loadWASM first.");const B=[],Q=[];for(let g=0,E=A.length;gWebAssembly.instantiateStreaming(A,B)}(g):function(A){return async B=>{const Q=await A.arrayBuffer();return WebAssembly.instantiate(Q,B)}}(g):function(A){return B=>WebAssembly.instantiate(A,B)}(g)}return QB=new Promise(((A,B)=>{g=A,E=B})),function(A,B,Q,g){VA({print:B,instantiateWasm:(B,Q)=>{if("undefined"==typeof performance){const A=()=>Date.now();B.env.emscripten_get_now=A,B.wasi_snapshot_preview1.emscripten_get_now=A}return A(B).then((A=>Q(A.instance)),g),{}}}).then((A=>{zA=A,Q()}))}(B,Q,g,E),QB}function EB(A){return new $A(A)}function CB(A){return new AB(A)}function IB(A){const B=r[A];if(!B)return;const{id:Q}=G[B];return{id:Q,scopeName:B}}const DB=new Map;let wB,oB;async function sB(A){if(DB.has(A))return DB.get(A);const B=function(A){return G[A]}(A);if(!B)return Promise.resolve(void 0);let Q;if(void 0===wB&&(Q=eB(B.path),wB=Q.then((()=>!0)).catch((()=>!1))),void 0===oB&&(oB=await wB),oB){const g=Q||eB(B.path);return DB.set(A,g),g}const E=g(`grammars/${B.id}`);B.embeddedScopes.forEach((A=>{if(!DB.has(A)){const B=E.then((B=>B.find((B=>B.scopeName===A))));DB.set(A,B)}}));const C=E.then((B=>B.find((B=>B.scopeName===A))));return DB.set(A,C),C}async function eB(A){return await Q("grammars",A)}const cB=30720,iB=16744448,tB=16775168,MB=11,aB=15,hB={NotSet:-1,None:0,Italic:1,Bold:2,Underline:4,Strikethrough:8};function nB(A,B,Q,g){const{tokens:E,ruleStack:C}=A.tokenizeLine2(Q,B),I=[];let D=Q.length;for(let A=E.length-2;A>=0;A-=2){const B=E[A],g=E[A+1],C=Q.slice(B,D);I.unshift({content:C,metadata:g}),D=B}let w=[];if(null==g?void 0:g.preserveWhitespace)w=I;else for(let A=0;A0?w[w.length-1].content+=B.content:A{const{rawTokens:E,nextStack:C}=nB(B,g,A,{preserveWhitespace:!0}),I=E.map((({content:A,metadata:B})=>({content:A,style:rB(B,Q)}))),D=function(A,B,Q,g){const{tokens:E}=Q.tokenizeLine(A,B),C=[];for(let B=0;B{if(w+=A.content.length,Q>>aB]},g=(A&cB)>>>MB;return g&hB.Italic&&(Q.fontStyle="italic"),g&hB.Bold&&(Q.fontWeight="bold"),g&hB.Underline&&(Q.textDecoration="underline"),g&hB.Strikethrough&&(Q.textDecoration="line-through"),Q}var GB=function(A){var B=null;if("undefined"!=typeof process&&null!=process.versions&&null!=process.versions.node)B=Buffer.from(A,"base64");else{var Q=globalThis.atob(A),g=Q.length;B=new Uint8Array(new ArrayBuffer(g));for(var E=0;E({createOnigScanner:CB,createOnigString:EB})));NB=new jA({onigLib:A,loadGrammar:A=>sB(A)})}const B=A.filter((A=>!LB(A))).map((A=>{const B=IB(A);if(!B)throw new RB(A);return NB.loadGrammar(B.scopeName)}));return Promise.all(B)}function kB(A){if(LB(A))return{langId:A,grammar:null};const B=IB(A);if(!B)throw new RB(A);const Q=function(A){const{_syncRegistry:B}=NB;return null==B?void 0:B._grammars.get(A)}(B.scopeName);if(!Q)throw new Error(`Syntax highlighting error: grammar for ${A} not loaded`);return{langId:B.id,grammar:Q}}class RB extends Error{constructor(A){super(`Unknown language: ${A}`),this.alias=A}}function KB(A,B,Q){NB.setTheme(Q);const g=function(A){const B=NB.getColorMap();return A.colorNames?B.map((B=>Object.keys(A.colorNames).find((Q=>A.colorNames[Q].toUpperCase()===B.toUpperCase()))||B)):B}(Q);return function(A,B,Q){let g=null;return A.split(/\r?\n|\r/g).map((A=>{const{rawTokens:E,nextStack:C}=nB(B,g,A);return g=C,E.map((({content:A,metadata:B})=>({content:A,style:rB(B,Q)})))}))}(A,B,g)}function YB(A){return A.split(/\r?\n|\r/g).map((A=>[{content:A,style:{}}]))}function UB(A,B){return PB(A.slice(1,-1)).map((A=>{const{from:Q,to:g}=uB(A);return{lineNumber:B,fromColumn:Q,toColumn:g}}))}function uB(A){const[B,Q]=A.split(":");if(!yB(B))throw new JB(B);const g=Number(B);if(g<1)throw new SB;if(Q){if(!yB(Q))throw new JB(Q);return{from:g,to:+Q}}return{from:g,to:g}}function PB(A){return A.split(/,(?![^\[]*\])/g)}function yB(A){A=A.toString();var B=Math.abs(A),Q=parseInt(A,10);return!isNaN(B)&&Q===B&&B.toString()===A}class JB extends Error{constructor(A){super(`Invalid number "${A}" in range string`),this.number=A,Object.setPrototypeOf(this,new.target.prototype)}}class SB extends Error{constructor(){super("Invalid line or column number in range string"),Object.setPrototypeOf(this,new.target.prototype)}}const pB="#001",lB="#010",dB={name:"comments",type:"light",foreground:"",background:"",colors:{},settings:[{settings:{foreground:"#000"}},{scope:["punctuation.definition.comment"],settings:{foreground:pB}},{scope:"comment",settings:{foreground:lB}}]};function fB(A,B,Q,g){const E=B?KB(A,B,dB):YB(A),C=[];let I=1;const D=E.map((A=>{const{annotations:B,lineWithoutComments:E}=function(A,B,Q){if(!A.some((A=>A.style.color===pB)))return{annotations:[],lineWithoutComments:A};const g=[];let E=0;for(;E!A.tokens.includes(B)));C.every((A=>""===A.content.trim()))&&(C=null);return{annotations:g.map((A=>({name:A.name,query:A.query,lineNumber:A.lineNumber,rangeString:A.rangeString}))),lineWithoutComments:C}}(A,g,I);if(C.push(...B),!E)return null;const D=E.map((A=>A.content)).join("");return["mdx","jsx","tsx"].includes(Q)&&B.length>0&&"{}"===D.trim()?null:(I++,D)})).filter((A=>null!==A)).join("\n"),w=C.map((A=>{var{rangeString:B,lineNumber:Q}=A,g=function(A,B){var Q={};for(var g in A)Object.prototype.hasOwnProperty.call(A,g)&&B.indexOf(g)<0&&(Q[g]=A[g]);if(null!=A&&"function"==typeof Object.getOwnPropertySymbols){var E=0;for(g=Object.getOwnPropertySymbols(A);E{if(A.includes("[")){const[Q,g]=A.split("["),E=Number(Q),C=B+E-1;if(!yB(C))throw new JB(Q);return UB("["+g,C)}const{from:Q,to:g}=uB(A);return[{fromLineNumber:Q+B-1,toLineNumber:g+B-1}]})).flat():[{fromLineNumber:B,toLineNumber:B}]}(B,Q);return Object.assign(Object.assign({},g),{ranges:E})}));return{newCode:D,annotations:w}}function xB(A,B){var Q;const g=A.match(/\s*([\w-]+)?(\([^\)]*\)|\[[^\]]*\])?(.*)$/),E=g[1],C=g[2],I=null===(Q=g[3])||void 0===Q?void 0:Q.trim();return B.includes(E)?{name:E,rangeString:C,query:I}:null}function mB(A,B){let Q=[],g=1;return A.forEach((A=>{Q.push({fromColumn:g,toColumn:g+A.content.length-1,token:A}),g+=A.content.length})),B.forEach((A=>{Q=function(A,B){const{range:Q}=B,{fromColumn:g,toColumn:E}=Q,C=[];let I=0;for(;IE){const[A,Q]=qB(B,E+1);D.tokens.push(A),C.push(Q)}else D.tokens.push(B);I++}else C.push(D);for(;IOB(A)))}function OB(A){return"tokens"in A?{annotationName:A.annotationName,annotationQuery:A.annotationQuery,fromColumn:A.fromColumn,toColumn:A.toColumn,tokens:A.tokens.map((A=>OB(A)))}:A.token}function qB(A,B){if("token"in A){const Q=Object.assign(Object.assign({},A.token),{content:A.token.content.slice(0,B-A.fromColumn)}),g=Object.assign(Object.assign({},A.token),{content:A.token.content.slice(B-A.fromColumn)});return[Object.assign(Object.assign({},A),{toColumn:B-1,token:Q}),Object.assign(Object.assign({},A),{fromColumn:B,token:g})]}{const Q=[],g=[];A.tokens.forEach((A=>{if(A.toColumn=B)g.push(A);else{const[E,C]=qB(A,B);Q.push(E),g.push(C)}}));return[Object.assign(Object.assign({},A),{toColumn:B-1,tokens:Q}),Object.assign(Object.assign({},A),{fromColumn:B,tokens:g})]}}function bB(A,B){let Q=A.map(((A,B)=>({fromLineNumber:B+1,toLineNumber:B+1,line:A})));return B.forEach((A=>{Q=function(A,B){const{range:Q,name:g,query:E}=B,{fromLineNumber:C,toLineNumber:I}=Q,D=[];let w=0;for(;wI){const[A,Q]=TB(B,I+1);o.lines.push(A),D.push(Q)}else o.lines.push(B);w++}else D.push(o);for(;wWB(A)))}function WB(A){return"line"in A?{lineNumber:A.fromLineNumber,tokens:A.line.tokens}:{annotationName:A.annotationName,annotationQuery:A.annotationQuery,fromLineNumber:A.fromLineNumber,toLineNumber:A.toLineNumber,lines:A.lines.map((A=>WB(A)))}}function TB(A,B){if("line"in A)return[Object.assign(Object.assign({},A),{toLineNumber:B-1}),Object.assign(Object.assign({},A),{fromLineNumber:B})];{const Q=[],g=[];return A.lines.forEach((A=>{if(A.toLineNumber=B)g.push(A);else{const[E,C]=TB(A,B);Q.push(E),g.push(C)}})),[Object.assign(Object.assign({},A),{toLineNumber:B-1,lines:Q}),Object.assign(Object.assign({},A),{fromLineNumber:B,lines:g})]}}function vB(A,B){const{inlineAnnotations:Q,multilineAnnotations:g}=function(A){const B=[],Q=[];return A.forEach((A=>{A.ranges.forEach((g=>{"lineNumber"in g?B.push(Object.assign(Object.assign({},A),{range:g})):Q.push(Object.assign(Object.assign({},A),{range:g}))}))})),{inlineAnnotations:B,multilineAnnotations:Q}}(B);return bB(A.map(((A,B)=>{const g=Q.filter((A=>A.range.lineNumber===B+1));return{lineNumber:B+1,tokens:mB(A,g)}})),g)}var XB=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],ZB={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",9:"strikethrough"};function jB(A,B){const Q=A.indexOf("[",B);if(-1!==Q){const B=A.indexOf("m",Q);return{sequence:A.substring(Q+2,B).split(";"),startPosition:Q,position:B+1}}return{position:A.length}}function VB(A,B){let Q=1;const g=A[B+Q++];let E;if("2"===g){const g=[A[B+Q++],A[B+Q++],A[B+Q]].map((A=>Number.parseInt(A)));3!==g.length||g.some((A=>Number.isNaN(A)))||(E={type:"rgb",rgb:g})}else if("5"===g){const g=Number.parseInt(A[B+Q]);Number.isNaN(g)||(E={type:"table",index:Number(g)})}return[Q,E]}function zB(A){const B=[];for(let Q=0;Q=90&&E<=97?B.push({type:"setForegroundColor",value:{type:"named",name:XB[E-90+8]}}):E>=100&&E<=107&&B.push({type:"setBackgroundColor",value:{type:"named",name:XB[E-100+8]}})}return B}function _B(A,B){const Q=function(){let A=null,B=null,Q=new Set;return{parse(g){const E=[];let C=0;do{const I=jB(g,C),D=I.sequence?g.substring(C,I.startPosition):g.substring(C);if(D.length>0&&E.push({value:D,foreground:A,background:B,decorations:new Set(Q)}),I.sequence){const g=zB(I.sequence);for(const E of g)"resetAll"===E.type?(A=null,B=null,Q.clear()):"resetForegroundColor"===E.type?A=null:"resetBackgroundColor"===E.type?B=null:"resetDecoration"===E.type&&Q.delete(E.value);for(const E of g)"setForegroundColor"===E.type?A=E.value:"setBackgroundColor"===E.type?B=E.value:"setDecoration"===E.type&&Q.add(E.value)}C=I.position}while(Cfunction(A,B,Q){const g=A.parse(B),E=g.map((({value:A,foreground:B,background:g,decorations:E})=>{const C=$B(B,Q),I={};C&&(I.color=C);const D=$B(g,Q);return D&&(I.background=D),E.has("bold")&&(I.fontWeight="bold"),E.has("italic")&&(I.fontStyle="italic"),E.has("underline")&&(I.textDecoration="underline"),E.has("strikethrough")&&(I.textDecoration="line-through"),E.has("reverse")&&(I.color=D,I.background=C),E.has("dim")&&(I.opacity=.5),{content:A,style:I}}));return E}(Q,A,B)));return g}function $B(A,B){if(A){if("named"===A.type){return o(B,"terminal.ansi"+(A.name[0].toUpperCase()+A.name.slice(1)))}if("rgb"===A.type){const[B,Q,g]=A.rgb;return`rgb(${B}, ${Q}, ${g})`}}}async function AQ(A,B){await Promise.all([HB(A),t(B)])}function BQ(A,B,Q="dark-plus",g={}){const E=A||"",C=B||"text";if("string"!=typeof E)throw new Error("Syntax highlighter error: code must be a string");if("string"!=typeof C)throw new Error("Syntax highlighter error: lang must be a string");const{langId:I,grammar:D}=kB(C),w=M(Q),s="text"==I?YB(E):"terminal"==I?_B(E,w):(null==g?void 0:g.scopes)?function(A,B,Q){return NB.setTheme(Q),FB(A,B,NB.getColorMap())}(E,D,w):KB(E,D,w),e="terminal"==I?function(A){return{color:o(A,"terminal.foreground"),background:o(A,"terminal.background")}}(w):{color:w.foreground,background:w.background};if(function(A){return"annotations"in A}(g)){return{lines:vB(s,(null==g?void 0:g.annotations)||[]),lang:I,style:e}}return{lines:s,lang:I,style:e}}exports.LANG_NAMES=["abap","actionscript-3","ada","apache","apex","apl","applescript","ara","asm","astro","awk","ballerina","bash","bat","batch","be","beancount","berry","bibtex","bicep","blade","c","c#","cadence","cdc","clarity","clj","clojure","cmake","cmd","cobol","codeql","coffee","console","cpp","crystal","cs","csharp","css","cue","cypher","d","dart","dax","diff","docker","dockerfile","dream-maker","elixir","elm","erb","erl","erlang","f#","fish","fs","fsharp","fsl","gdresource","gdscript","gdshader","gherkin","git-commit","git-rebase","glimmer-js","glimmer-ts","glsl","gnuplot","go","graphql","groovy","hack","haml","handlebars","haskell","hbs","hcl","hjson","hlsl","hs","html","http","imba","ini","jade","java","javascript","jinja-html","jison","js","json","json5","jsonc","jsonl","jsonnet","jssm","jsx","julia","kotlin","kql","kusto","latex","less","liquid","lisp","logo","lua","make","makefile","markdown","marko","matlab","md","mdx","mermaid","narrat","nextflow","nginx","nim","nix","objc","objective-c","objective-cpp","ocaml","pascal","perl","perl6","php","plsql","postcss","powerquery","powershell","prisma","prolog","properties","proto","ps","ps1","pug","puppet","purescript","py","python","ql","r","raku","razor","rb","reg","rel","riscv","rs","rst","ruby","rust","sas","sass","scala","scheme","scss","sh","shader","shaderlab","shell","shellscript","shellsession","smalltalk","solidity","sparql","sql","ssh-config","stata","styl","stylus","svelte","swift","system-verilog","tasl","tcl","terminal","tex","text","toml","ts","tsx","turtle","twig","txt","typescript","v","vb","verilog","vhdl","vim","viml","vimscript","vue","vue-html","vyper","wasm","wenyan","wgsl","wolfram","xml","xsl","yaml","yml","zenscript","zsh","文言"],exports.THEME_NAMES=h,exports.UnknownLanguageError=RB,exports.UnknownThemeError=n,exports.extractAnnotations=async function(A,B,Q){if(!Q)return{code:A,annotations:[]};await HB([B]);const{grammar:g}=kB(B),{newCode:E,annotations:C}=fB(A,g,B,Q);return{code:E,annotations:C}},exports.getThemeColors=async function(A){if(!A)throw new Error("Syntax highlighter error: undefined theme");return await AQ([],A),F(M(A))},exports.getThemeColorsSync=function(A){if(!A)throw new Error("Syntax highlighter error: undefined theme");return F(M(A))},exports.highlight=async function(A,B,Q="dark-plus",g={}){const E=A||"",C=B||"text";if("string"!=typeof E)throw new Error("Syntax highlighter error: code must be a string");if("string"!=typeof C)throw new Error("Syntax highlighter error: lang must be a string");return await AQ([C],Q),BQ(E,C,Q,g)},exports.highlightSync=BQ,exports.preload=AQ; +"use strict";function A(A){if(A&&A.__esModule)return A;var B=Object.create(null);return A&&Object.keys(A).forEach((function(Q){if("default"!==Q){var g=Object.getOwnPropertyDescriptor(A,Q);Object.defineProperty(B,Q,g.get?g:{enumerable:!0,get:function(){return A[Q]}})}})),B.default=A,Object.freeze(B)}function B(A,B){var Q=require("fs"),g=require("path"),E=g.parse,C=require("os");var I=function(A,B){var Q="/";/^([A-Za-z]:)/.test(A)?Q="":/^\\\\/.test(A)&&(Q="\\\\");for(var C=[A],I=E(A);I.dir!==C[C.length-1];)C.push(I.dir),I=E(I.dir);return C.reduce((function(A,E){return A.concat(B.map((function(A){return g.resolve(Q,E,A)})))}),[])};const D=C.homedir||function(){var A=process.env.HOME,B=process.env.LOGNAME||process.env.USER||process.env.LNAME||process.env.USERNAME;return"win32"===process.platform?process.env.USERPROFILE||process.env.HOMEDRIVE+process.env.HOMEPATH||A||null:"darwin"===process.platform?A||(B?"/Users/"+B:null):"linux"===process.platform?A||(0===process.getuid()?"/root":B?"/home/"+B:null):A||null};var w="win32"!==process.platform&&Q.realpathSync&&"function"==typeof Q.realpathSync.native?Q.realpathSync.native:Q.realpathSync,o=D(),s=function(A,B,Q){return Q&&!1===Q.preserveSymlinks?A(B):B},e=function(A,B,Q){for(var E=function(A,B,Q){var g=B&&B.moduleDirectory?[].concat(B.moduleDirectory):["node_modules"];if(B&&"function"==typeof B.paths)return B.paths(Q,A,(function(){return I(A,g)}),B);var E=I(A,g);return B&&B.paths?E.concat(B.paths):E}(B,Q,A),C=0;CA.promises)),C=await Promise.resolve().then((function(){return A(require("path"))})),{URL:I}=await Promise.resolve().then((function(){return A(require("url"))})),D=new I(".","undefined"==typeof document?new(require("url").URL)("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("index.cjs.js",document.baseURI).href).pathname;try{let A=C.resolve(D,"..",Q),B=C.resolve(A,g);const I=await E.readFile(B,"utf8");if(!I)throw new Error("no results");return JSON.parse(I)}catch(A){const I=B("@code-hike/lighter",{basedir:D});let w=C.resolve(I,"..","..",Q),o=C.resolve(w,g);return JSON.parse(await E.readFile(o,"utf8"))}}async function g(B){if("function"==typeof fetch){const A=await fetch(`https://lighter.codehike.org/${B}.json`);return await A.json()}const Q=await Promise.resolve().then((function(){return A(require("https"))})),g={host:"lighter.codehike.org",path:`/${B}.json`,method:"GET"};return new Promise(((A,B)=>{const E=Q.request(g,(B=>{let Q="";B.on("data",(A=>{Q+=A})),B.on("end",(()=>{A(JSON.parse(Q))}))}));E.on("error",(A=>{B(A)})),E.end()}))}Object.defineProperty(exports,"__esModule",{value:!0});const E=A=>/^#([A-Fa-f0-9]{3,4}){1,2}$/.test(A),C=(A,B)=>A.match(new RegExp(`.{${B}}`,"g")),I=A=>parseInt(A.repeat(2/A.length),16);function D(A,B){return void 0!==A?A/255:"number"!=typeof B||B<0||B>1?1:B}function w(A,B){if(!A)return A;const{r:Q,g:g,b:w,a:o}=function(A){if(!A)return;if(!E(A))throw new Error("Invalid color string, must be a valid hex color");const B=Math.floor((A.length-1)/3),Q=C(A.slice(1),B),[g,w,o,s]=Q.map(I);return{r:g,g:w,b:o,a:D(s,1)}}(A);return function(A){if(!A)return;const{r:B,g:Q,b:g,a:E}=A,C=Math.round(255*E);return`#${B.toString(16).padStart(2,"0")}${Q.toString(16).padStart(2,"0")}${g.toString(16).padStart(2,"0")}${C.toString(16).padStart(2,"0")}`}({r:Q,g:g,b:w,a:o*B})}function o(A,B){const Q=A.colors||{};if(Q[B])return Q[B];const g=e[B];if(!g)throw new Error(`Unknown theme color key: ${B}`);return"string"==typeof g?o(A,g):function(A,B){const Q=B[A.type];if(Array.isArray(Q)){const[B,g,...E]=Q;return B(o(A,g),...E)}return Q}(A,g)}const s="#6FC3DF",e={"editor.foreground":{dark:"#bbbbbb",light:"#333333",hc:"#ffffff"},"editorLineNumber.foreground":{dark:"#858585",light:"#237893",hc:"#fffffe"},"editor.selectionBackground":{light:"#ADD6FF",dark:"#264F78",hc:"#f3f518"},"editor.background":{light:"#fffffe",dark:"#1E1E1E",hc:"#000000"},"editorGroupHeader.tabsBackground":{dark:"#252526",light:"#F3F3F3"},"tab.activeBackground":"editor.background","tab.activeForeground":{dark:"#ffffff",light:"#333333",hc:"#ffffff"},"tab.border":{dark:"#252526",light:"#F3F3F3",hc:s},"tab.activeBorder":"tab.activeBackground","tab.inactiveBackground":{dark:"#2D2D2D",light:"#ECECEC"},"tab.inactiveForeground":{dark:[w,"tab.activeForeground",.5],light:[w,"tab.activeForeground",.5],hc:"#ffffff"},"diffEditor.insertedTextBackground":{dark:"#9ccc2c33",light:"#9ccc2c40"},"diffEditor.removedTextBackground":{dark:"#ff000033",light:"#ff000033"},"diffEditor.insertedLineBackground":{dark:"#9bb95533",light:"#9bb95533"},"diffEditor.removedLineBackground":{dark:"#ff000033",light:"#ff000033"},"icon.foreground":{dark:"#C5C5C5",light:"#424242",hc:"#FFFFFF"},"sideBar.background":{dark:"#252526",light:"#F3F3F3",hc:"#000000"},"sideBar.foreground":"editor.foreground","sideBar.border":"sideBar.background","list.inactiveSelectionBackground":{dark:"#37373D",light:"#E4E6F1"},"list.inactiveSelectionForeground":{},"list.hoverBackground":{dark:"#2A2D2E",light:"#F0F0F0"},"list.hoverForeground":{},"editorGroupHeader.tabsBorder":{hc:s},"tab.activeBorderTop":{hc:s},"tab.hoverBackground":"tab.inactiveBackground","tab.hoverForeground":"tab.inactiveForeground","editor.rangeHighlightBackground":{dark:"#ffffff0b",light:"#fdff0033"},"editor.infoForeground":{dark:"#3794FF",light:"#1a85ff",hc:"#3794FF"},"input.border":{hc:s},"input.background":{dark:"#3C3C3C",light:"#fffffe",hc:"#000000"},"input.foreground":"editor.foreground","editor.lineHighlightBackground":{},focusBorder:{light:"#0090F1",dark:"#007FD4",hc:s},"editorGroup.border":{dark:"#444444",light:"#E7E7E7",hc:s},"list.activeSelectionBackground":{dark:"#094771",light:"#0060C0",hc:"#000000"},"list.activeSelectionForeground":{dark:"#fffffe",light:"#fffffe",hc:"#fffffe"},"lighter.inlineBackground":{dark:[w,"editor.background",.9],light:[w,"editor.background",.9]},"terminal.background":"editor.background","terminal.foreground":"editor.foreground","terminal.ansiBlack":{dark:"#000000",light:"#000000",hc:"#000000"},"terminal.ansiRed":{dark:"#cd3131",light:"#cd3131",hc:"#cd0000"},"terminal.ansiGreen":{dark:"#0DBC79",light:"#00BC00",hc:"#00cd00"},"terminal.ansiYellow":{dark:"#e5e510",light:"#949800",hc:"#cdcd00"},"terminal.ansiBlue":{dark:"#2472c8",light:"#0451a5",hc:"#0000ee"},"terminal.ansiMagenta":{dark:"#bc3fbc",light:"#bc05bc",hc:"#cd00cd"},"terminal.ansiCyan":{dark:"#11a8cd",light:"#0598bc",hc:"#00cdcd"},"terminal.ansiWhite":{dark:"#e5e5e5",light:"#555555",hc:"#e5e5e5"},"terminal.ansiBrightBlack":{dark:"#666666",light:"#666666",hc:"#7f7f7f"},"terminal.ansiBrightRed":{dark:"#f14c4c",light:"#cd3131",hc:"#ff0000"},"terminal.ansiBrightGreen":{dark:"#23d18b",light:"#14CE14",hc:"#00ff00"},"terminal.ansiBrightYellow":{dark:"#f5f543",light:"#b5ba00",hc:"#ffff00"},"terminal.ansiBrightBlue":{dark:"#3b8eea",light:"#0451a5",hc:"#5c5cff"},"terminal.ansiBrightMagenta":{dark:"#d670d6",light:"#bc05bc",hc:"#ff00ff"},"terminal.ansiBrightCyan":{dark:"#29b8db",light:"#0598bc",hc:"#00ffff"},"terminal.ansiBrightWhite":{dark:"#e5e5e5",light:"#a5a5a5",hc:"#ffffff"}},c=new Map,i=new Map;async function t(A){if("string"==typeof A){const B=A;if(!a.includes(B))throw new n(B);if(!c.has(B)){const A=async function(A){try{return await Q("themes",A+".json")}catch(B){return await g(`themes/${A}`)}}(B).then((A=>(i.set(B,A),A)));c.set(B,A)}return c.get(B)}return A}function M(A){let B=null;if("string"==typeof A){if(B=i.get(A),!B)throw new Error("Syntax highlighting error: theme not loaded")}else B=A;return function(A){if(!A)return;const B=A.settings||A.tokenColors||[],Q={name:A.name||"unknown-theme",type:h(A),foreground:"",background:"",settings:B,colors:A.colors||{},colorNames:A.colorNames},g=B.find((A=>!A.scope));if(g){const{foreground:A,background:B}=(null==g?void 0:g.settings)||{},E={};A&&!Q.colors["editor.foreground"]&&(E["editor.foreground"]=A),B&&!Q.colors["editor.background"]&&(E["editor.background"]=B),Object.keys(E).length>0&&(Q.colors=Object.assign(Object.assign({},Q.colors),E)),Q.foreground=A,Q.background=B}g||(Q.settings=[{settings:{foreground:o(Q,"editor.foreground"),background:o(Q,"editor.background")}},...Q.settings]);if(Q.background=Q.background||o(Q,"editor.background"),Q.foreground=Q.foreground||o(Q,"editor.foreground"),"from-css"===A.type&&!Q.colorNames){const A={};let B=0;Q.settings=Q.settings.map((Q=>{const g=Object.assign(Object.assign({},Q),{settings:Object.assign({},Q.settings)}),{foreground:E,background:C}=g.settings||{};return E&&!A[E]&&(A[E]=`#${B.toString(16).padStart(6,"0")}`,B++),C&&!A[C]&&(A[C]=`#${B.toString(16).padStart(6,"0")}`,B++),E&&(g.settings.foreground=A[E]),C&&(g.settings.background=A[C]),g})),Q.colorNames=A}return Q}(B)}function h(A){var B;if("from-css"===A.type)return"from-css";return"light"===(A.type?A.type:(null===(B=A.name)||void 0===B?void 0:B.toLowerCase().includes("light"))?"light":"dark")?"light":"dark"}const a=["dark-plus","dracula-soft","dracula","github-dark","github-dark-dimmed","github-from-css","github-light","light-plus","material-darker","material-default","material-from-css","material-lighter","material-ocean","material-palenight","min-dark","min-light","monokai","nord","one-dark-pro","poimandres","slack-dark","slack-ochin","solarized-dark","solarized-light"];class n extends Error{constructor(A){super(`Unknown theme: ${A}`),this.theme=A}}function r(A){const B=B=>"colorScheme"===B?function(A){return"from-css"===A.type?"var(--ch-0)":A.type}(A):"foreground"===B?A.foreground:"background"===B?A.background:o(A,B);return{colorScheme:B("colorScheme"),foreground:B("foreground"),background:B("background"),lighter:{inlineBackground:B("lighter.inlineBackground")},editor:{background:B("editor.background"),foreground:B("editor.foreground"),lineHighlightBackground:B("editor.lineHighlightBackground"),rangeHighlightBackground:B("editor.rangeHighlightBackground"),infoForeground:B("editor.infoForeground"),selectionBackground:B("editor.selectionBackground")},focusBorder:B("focusBorder"),tab:{activeBackground:B("tab.activeBackground"),activeForeground:B("tab.activeForeground"),inactiveBackground:B("tab.inactiveBackground"),inactiveForeground:B("tab.inactiveForeground"),border:B("tab.border"),activeBorder:B("tab.activeBorder"),activeBorderTop:B("tab.activeBorderTop")},editorGroup:{border:B("editorGroup.border")},editorGroupHeader:{tabsBackground:B("editorGroupHeader.tabsBackground")},editorLineNumber:{foreground:B("editorLineNumber.foreground")},input:{background:B("input.background"),foreground:B("input.foreground"),border:B("input.border")},icon:{foreground:B("icon.foreground")},sideBar:{background:B("sideBar.background"),foreground:B("sideBar.foreground"),border:B("sideBar.border")},list:{activeSelectionBackground:B("list.activeSelectionBackground"),activeSelectionForeground:B("list.activeSelectionForeground"),hoverBackground:B("list.hoverBackground"),hoverForeground:B("list.hoverForeground")}}}const F={abap:"source.abap","actionscript-3":"source.actionscript.3",ada:"source.ada",apache:"source.apacheconf",apex:"source.apex",apl:"source.apl",applescript:"source.applescript",ara:"source.ara",asm:"source.asm.x86_64",astro:"source.astro",awk:"source.awk",ballerina:"source.ballerina",bat:"source.batchfile",batch:"source.batchfile",beancount:"text.beancount",berry:"source.berry",be:"source.berry",bibtex:"text.bibtex",bicep:"source.bicep",blade:"text.html.php.blade",c:"source.c",cadence:"source.cadence",cdc:"source.cadence",clarity:"source.clar",clojure:"source.clojure",clj:"source.clojure",cmake:"source.cmake",cobol:"source.cobol",codeql:"source.ql",ql:"source.ql",coffee:"source.coffee",cpp:"source.cpp",crystal:"source.crystal",csharp:"source.cs","c#":"source.cs",cs:"source.cs",css:"source.css",cue:"source.cue",cypher:"source.cypher",d:"source.d",dart:"source.dart",dax:"source.dax",diff:"source.diff",docker:"source.dockerfile",dockerfile:"source.dockerfile","dream-maker":"source.dm",elixir:"source.elixir",elm:"source.elm",erb:"text.html.erb",erlang:"source.erlang",erl:"source.erlang",fish:"source.fish",fsharp:"source.fsharp","f#":"source.fsharp",fs:"source.fsharp",gdresource:"source.gdresource",gdscript:"source.gdscript",gdshader:"source.gdshader",gherkin:"text.gherkin.feature","git-commit":"text.git-commit","git-rebase":"text.git-rebase","glimmer-js":"source.gjs","glimmer-ts":"source.gts",glsl:"source.glsl",gnuplot:"source.gnuplot",go:"source.go",graphql:"source.graphql",groovy:"source.groovy",hack:"source.hack",haml:"text.haml",handlebars:"text.html.handlebars",hbs:"text.html.handlebars",haskell:"source.haskell",hs:"source.haskell",hcl:"source.hcl",hjson:"source.hjson",hlsl:"source.hlsl",html:"text.html.basic",http:"source.http",imba:"source.imba",ini:"source.ini",properties:"source.ini",java:"source.java",javascript:"source.js",js:"source.js","jinja-html":"text.html.jinja",jison:"source.jison",json:"source.json",json5:"source.json5",jsonc:"source.json.comments",jsonl:"source.json.lines",jsonnet:"source.jsonnet",jssm:"source.jssm",fsl:"source.jssm",jsx:"source.js.jsx",julia:"source.julia",kotlin:"source.kotlin",kusto:"source.kusto",kql:"source.kusto",latex:"text.tex.latex",less:"source.css.less",liquid:"text.html.liquid",lisp:"source.lisp",logo:"source.logo",lua:"source.lua",make:"source.makefile",makefile:"source.makefile",markdown:"text.html.markdown",md:"text.html.markdown",marko:"text.marko",matlab:"source.matlab",mdx:"source.mdx",mermaid:"source.mermaid",narrat:"source.narrat",nextflow:"source.nextflow",nginx:"source.nginx",nim:"source.nim",nix:"source.nix","objective-c":"source.objc",objc:"source.objc","objective-cpp":"source.objcpp",ocaml:"source.ocaml",pascal:"source.pascal",perl:"source.perl",php:"source.php",plsql:"source.plsql.oracle",postcss:"source.css.postcss",powerquery:"source.powerquery",powershell:"source.powershell",ps:"source.powershell",ps1:"source.powershell",prisma:"source.prisma",prolog:"source.prolog",proto:"source.proto",pug:"text.pug",jade:"text.pug",puppet:"source.puppet",purescript:"source.purescript",python:"source.python",py:"source.python",r:"source.r",raku:"source.perl.6",perl6:"source.perl.6",razor:"text.aspnetcorerazor",reg:"source.reg",rel:"source.rel",riscv:"source.riscv",rst:"source.rst",ruby:"source.ruby",rb:"source.ruby",rust:"source.rust",rs:"source.rust",sas:"source.sas",sass:"source.sass",scala:"source.scala",scheme:"source.scheme",scss:"source.css.scss",shaderlab:"source.shaderlab",shader:"source.shaderlab",shellscript:"source.shell",bash:"source.shell",console:"source.shell",sh:"source.shell",shell:"source.shell",zsh:"source.shell",shellsession:"text.shell-session",smalltalk:"source.smalltalk",solidity:"source.solidity",sparql:"source.sparql",sql:"source.sql","ssh-config":"source.ssh-config",stata:"source.stata",stylus:"source.stylus",styl:"source.stylus",svelte:"source.svelte",swift:"source.swift","system-verilog":"source.systemverilog",tasl:"source.tasl",tcl:"source.tcl",tex:"text.tex",toml:"source.toml",tsx:"source.tsx",turtle:"source.turtle",twig:"text.html.twig",txt:"source.txt",typescript:"source.ts",ts:"source.ts",v:"source.v",vb:"source.asp.vb.net",cmd:"source.asp.vb.net",verilog:"source.verilog",vhdl:"source.vhdl",viml:"source.viml",vim:"source.viml",vimscript:"source.viml","vue-html":"text.html.vue-html",vue:"source.vue",vyper:"source.vyper",wasm:"source.wat",wenyan:"source.wenyan","文言":"source.wenyan",wgsl:"source.wgsl",wolfram:"source.wolfram",xml:"text.xml",xsl:"text.xml.xsl",yaml:"source.yaml",yml:"source.yaml",zenscript:"source.zenscript"},G={"source.abap":{id:"abap",path:"abap.tmLanguage.json",embeddedScopes:[]},"source.actionscript.3":{id:"actionscript-3",path:"actionscript-3.tmLanguage.json",embeddedScopes:[]},"source.ada":{id:"ada",path:"ada.tmLanguage.json",embeddedScopes:[]},"source.apacheconf":{id:"apache",path:"apache.tmLanguage.json",embeddedScopes:[]},"source.apex":{id:"apex",path:"apex.tmLanguage.json",embeddedScopes:[]},"source.apl":{id:"apl",path:"apl.tmLanguage.json",embeddedScopes:["source.java","source.json","source.js","source.css","text.xml","text.html.basic"]},"source.applescript":{id:"applescript",path:"applescript.tmLanguage.json",embeddedScopes:[]},"source.ara":{id:"ara",path:"ara.tmLanguage.json",embeddedScopes:[]},"source.asm.x86_64":{id:"asm",path:"asm.tmLanguage.json",embeddedScopes:[]},"source.astro":{id:"astro",path:"astro.tmLanguage.json",embeddedScopes:["source.tsx","source.css.postcss","source.css.less","source.css.scss","source.css","source.sass","source.stylus","source.ts","source.js","source.json"]},"source.awk":{id:"awk",path:"awk.tmLanguage.json",embeddedScopes:[]},"source.ballerina":{id:"ballerina",path:"ballerina.tmLanguage.json",embeddedScopes:[]},"source.batchfile":{id:"bat",path:"bat.tmLanguage.json",embeddedScopes:[]},"text.beancount":{id:"beancount",path:"beancount.tmLanguage.json",embeddedScopes:[]},"source.berry":{id:"berry",path:"berry.tmLanguage.json",embeddedScopes:[]},"text.bibtex":{id:"bibtex",path:"bibtex.tmLanguage.json",embeddedScopes:[]},"source.bicep":{id:"bicep",path:"bicep.tmLanguage.json",embeddedScopes:[]},"text.html.php.blade":{id:"blade",path:"blade.tmLanguage.json",embeddedScopes:["source.java","source.css","source.json","source.js","source.sql","text.xml","text.html.basic"]},"source.c":{id:"c",path:"c.tmLanguage.json",embeddedScopes:[]},"source.cadence":{id:"cadence",path:"cadence.tmLanguage.json",embeddedScopes:[]},"source.clar":{id:"clarity",path:"clarity.tmLanguage.json",embeddedScopes:[]},"source.clojure":{id:"clojure",path:"clojure.tmLanguage.json",embeddedScopes:[]},"source.cmake":{id:"cmake",path:"cmake.tmLanguage.json",embeddedScopes:[]},"source.cobol":{id:"cobol",path:"cobol.tmLanguage.json",embeddedScopes:["source.css","source.js","source.java","text.html.basic","source.sql"]},"source.ql":{id:"codeql",path:"codeql.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.stylus","source.sass","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.tsx","source.ts","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.css.scss","source.swift","source.objc","source.css.less","source.json.comments","source.json","source.js","text.pug","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.coffee","source.clojure","source.batchfile","source.yaml","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","text.html.basic","source.css","text.html.markdown"]},"source.coffee":{id:"coffee",path:"coffee.tmLanguage.json",embeddedScopes:["source.js"]},"source.cpp":{id:"cpp",path:"cpp.tmLanguage.json",embeddedScopes:["source.c","source.sql","source.glsl"]},"source.crystal":{id:"crystal",path:"crystal.tmLanguage.json",embeddedScopes:["source.shell","source.js","source.c","source.css","source.sql","text.html.basic"]},"source.cs":{id:"csharp",path:"csharp.tmLanguage.json",embeddedScopes:[]},"source.css":{id:"css",path:"css.tmLanguage.json",embeddedScopes:[]},"source.cue":{id:"cue",path:"cue.tmLanguage.json",embeddedScopes:[]},"source.cypher":{id:"cypher",path:"cypher.tmLanguage.json",embeddedScopes:[]},"source.d":{id:"d",path:"d.tmLanguage.json",embeddedScopes:[]},"source.dart":{id:"dart",path:"dart.tmLanguage.json",embeddedScopes:[]},"source.dax":{id:"dax",path:"dax.tmLanguage.json",embeddedScopes:[]},"source.diff":{id:"diff",path:"diff.tmLanguage.json",embeddedScopes:[]},"source.dockerfile":{id:"docker",path:"docker.tmLanguage.json",embeddedScopes:[]},"source.dm":{id:"dream-maker",path:"dream-maker.tmLanguage.json",embeddedScopes:[]},"source.elixir":{id:"elixir",path:"elixir.tmLanguage.json",embeddedScopes:["source.css","source.js","text.html.basic"]},"source.elm":{id:"elm",path:"elm.tmLanguage.json",embeddedScopes:["source.c","source.glsl"]},"text.html.erb":{id:"erb",path:"erb.tmLanguage.json",embeddedScopes:["source.java","source.lua","source.shell","source.c","source.sql","text.xml","source.css","source.js","source.ruby","text.html.basic"]},"source.erlang":{id:"erlang",path:"erlang.tmLanguage.json",embeddedScopes:[]},"source.fish":{id:"fish",path:"fish.tmLanguage.json",embeddedScopes:[]},"source.fsharp":{id:"fsharp",path:"fsharp.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.stylus","source.sass","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.cs","source.tsx","source.ts","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.css.scss","source.swift","source.objc","source.css.less","source.json.comments","source.json","source.js","text.pug","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.coffee","source.clojure","source.batchfile","source.yaml","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","text.html.basic","source.css","text.html.markdown"]},"source.gdresource":{id:"gdresource",path:"gdresource.tmLanguage.json",embeddedScopes:["source.gdscript","source.gdshader"]},"source.gdscript":{id:"gdscript",path:"gdscript.tmLanguage.json",embeddedScopes:[]},"source.gdshader":{id:"gdshader",path:"gdshader.tmLanguage.json",embeddedScopes:[]},"text.gherkin.feature":{id:"gherkin",path:"gherkin.tmLanguage.json",embeddedScopes:[]},"text.git-commit":{id:"git-commit",path:"git-commit.tmLanguage.json",embeddedScopes:["source.diff"]},"text.git-rebase":{id:"git-rebase",path:"git-rebase.tmLanguage.json",embeddedScopes:["source.shell"]},"source.gjs":{id:"glimmer-js",path:"glimmer-js.tmLanguage.json",embeddedScopes:["source.yaml","source.css","text.html.basic","text.html.handlebars","source.js"]},"source.gts":{id:"glimmer-ts",path:"glimmer-ts.tmLanguage.json",embeddedScopes:["source.yaml","source.js","source.css","text.html.basic","text.html.handlebars","source.ts"]},"source.glsl":{id:"glsl",path:"glsl.tmLanguage.json",embeddedScopes:["source.c"]},"source.gnuplot":{id:"gnuplot",path:"gnuplot.tmLanguage.json",embeddedScopes:[]},"source.go":{id:"go",path:"go.tmLanguage.json",embeddedScopes:[]},"source.graphql":{id:"graphql",path:"graphql.tmLanguage.json",embeddedScopes:["source.tsx","source.js.jsx","source.ts","source.js"]},"source.groovy":{id:"groovy",path:"groovy.tmLanguage.json",embeddedScopes:[]},"source.hack":{id:"hack",path:"hack.tmLanguage.json",embeddedScopes:["source.css","source.js","source.sql","text.html.basic"]},"text.haml":{id:"haml",path:"haml.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.stylus","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.tsx","source.ts","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.css.scss","source.swift","source.objc","source.css.less","source.json.comments","source.json","text.pug","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.clojure","source.batchfile","source.yaml","text.xml.xsl","source.asp.vb.net","source.php","source.r","source.perl","source.makefile","source.java","source.ini","source.lua","source.shell","source.c","source.sql","text.xml","text.html.basic","source.css","text.html.markdown","source.coffee","source.sass","source.js","source.ruby"]},"text.html.handlebars":{id:"handlebars",path:"handlebars.tmLanguage.json",embeddedScopes:["source.yaml","source.js","source.css","text.html.basic"]},"source.haskell":{id:"haskell",path:"haskell.tmLanguage.json",embeddedScopes:[]},"source.hcl":{id:"hcl",path:"hcl.tmLanguage.json",embeddedScopes:[]},"source.hjson":{id:"hjson",path:"hjson.tmLanguage.json",embeddedScopes:[]},"source.hlsl":{id:"hlsl",path:"hlsl.tmLanguage.json",embeddedScopes:[]},"text.html.basic":{id:"html",path:"html.tmLanguage.json",embeddedScopes:["source.css","source.js"]},"source.http":{id:"http",path:"http.tmLanguage.json",embeddedScopes:["source.tsx","source.js.jsx","source.ts","source.js","source.java","source.graphql","text.xml","source.json","source.shell"]},"source.imba":{id:"imba",path:"imba.tmLanguage.json",embeddedScopes:[]},"source.ini":{id:"ini",path:"ini.tmLanguage.json",embeddedScopes:[]},"source.java":{id:"java",path:"java.tmLanguage.json",embeddedScopes:[]},"source.js":{id:"javascript",path:"javascript.tmLanguage.json",embeddedScopes:[]},"text.html.jinja":{id:"jinja-html",path:"jinja-html.tmLanguage.json",embeddedScopes:["source.css","source.js","text.html.basic"]},"source.jison":{id:"jison",path:"jison.tmLanguage.json",embeddedScopes:["source.js"]},"source.json":{id:"json",path:"json.tmLanguage.json",embeddedScopes:[]},"source.json5":{id:"json5",path:"json5.tmLanguage.json",embeddedScopes:[]},"source.json.comments":{id:"jsonc",path:"jsonc.tmLanguage.json",embeddedScopes:[]},"source.json.lines":{id:"jsonl",path:"jsonl.tmLanguage.json",embeddedScopes:[]},"source.jsonnet":{id:"jsonnet",path:"jsonnet.tmLanguage.json",embeddedScopes:[]},"source.jssm":{id:"jssm",path:"jssm.tmLanguage.json",embeddedScopes:[]},"source.js.jsx":{id:"jsx",path:"jsx.tmLanguage.json",embeddedScopes:[]},"source.julia":{id:"julia",path:"julia.tmLanguage.json",embeddedScopes:["source.c","source.glsl","source.sql","source.r","source.js","source.python","source.cpp"]},"source.kotlin":{id:"kotlin",path:"kotlin.tmLanguage.json",embeddedScopes:[]},"source.kusto":{id:"kusto",path:"kusto.tmLanguage.json",embeddedScopes:[]},"text.tex.latex":{id:"latex",path:"latex.tmLanguage.json",embeddedScopes:["source.glsl","source.shell","source.sql","source.cpp","source.c","source.r","source.gnuplot","source.scala","source.rust","source.yaml","source.python","source.ts","source.js","source.ruby","source.julia","source.lua","source.java","text.xml","text.html.basic","source.haskell","source.css","text.tex"]},"source.css.less":{id:"less",path:"less.tmLanguage.json",embeddedScopes:["source.css"]},"text.html.liquid":{id:"liquid",path:"liquid.tmLanguage.json",embeddedScopes:["source.js","source.json","source.css","text.html.basic"]},"source.lisp":{id:"lisp",path:"lisp.tmLanguage.json",embeddedScopes:[]},"source.logo":{id:"logo",path:"logo.tmLanguage.json",embeddedScopes:[]},"source.lua":{id:"lua",path:"lua.tmLanguage.json",embeddedScopes:["source.c"]},"source.makefile":{id:"make",path:"make.tmLanguage.json",embeddedScopes:[]},"text.html.markdown":{id:"markdown",path:"markdown.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.stylus","source.sass","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.tsx","source.ts","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.css.scss","source.swift","source.objc","source.css.less","source.json.comments","source.json","source.js","text.pug","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.coffee","source.clojure","source.batchfile","source.yaml","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","text.html.basic","source.css"]},"text.marko":{id:"marko",path:"marko.tmLanguage.json",embeddedScopes:["source.js","source.css.scss","source.css.less","source.css"]},"source.matlab":{id:"matlab",path:"matlab.tmLanguage.json",embeddedScopes:[]},"source.mdx":{id:"mdx",path:"mdx.tmLanguage.json",embeddedScopes:["source.gnuplot","text.tex","source.stylus","source.sass","text.bibtex","text.tex.latex","text.html.handlebars","source.dart","source.fsharp","source.powershell","source.perl.6","source.json.comments","text.pug","source.groovy","text.git-rebase","text.git-commit","source.batchfile","text.xml.xsl","source.asp.vb.net","source.php","source.js.jsx","source.glsl","source.ts","source.swift","text.xml","source.sql","text.shell-session","source.shell","source.css.scss","source.scala","source.rust","source.ruby","source.r","source.python","source.perl","source.objc","text.html.markdown","source.makefile","source.lua","source.css.less","source.kotlin","source.julia","source.json","source.js","source.java","source.ini","text.html.basic","source.haskell","source.graphql","source.go","source.erlang","source.elm","source.elixir","source.dockerfile","source.diff","source.css","source.cs","source.cpp","source.coffee","source.clojure","source.c","source.yaml","source.toml","source.tsx"]},"source.mermaid":{id:"mermaid",path:"mermaid.tmLanguage.json",embeddedScopes:[]},"source.narrat":{id:"narrat",path:"narrat.tmLanguage.json",embeddedScopes:[]},"source.nextflow":{id:"nextflow",path:"nextflow.tmLanguage.json",embeddedScopes:[]},"source.nginx":{id:"nginx",path:"nginx.tmLanguage.json",embeddedScopes:["source.c","source.lua"]},"source.nim":{id:"nim",path:"nim.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.stylus","source.sass","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.tsx","source.ts","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.css.scss","source.swift","source.objc","source.css.less","source.json.comments","source.json","text.pug","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.coffee","source.clojure","source.batchfile","source.yaml","text.xml.xsl","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.ini","source.java","text.html.markdown","source.glsl","source.css","source.js","text.xml","text.html.basic","source.c"]},"source.nix":{id:"nix",path:"nix.tmLanguage.json",embeddedScopes:[]},"source.objc":{id:"objective-c",path:"objective-c.tmLanguage.json",embeddedScopes:[]},"source.objcpp":{id:"objective-cpp",path:"objective-cpp.tmLanguage.json",embeddedScopes:[]},"source.ocaml":{id:"ocaml",path:"ocaml.tmLanguage.json",embeddedScopes:[]},"source.pascal":{id:"pascal",path:"pascal.tmLanguage.json",embeddedScopes:[]},"source.perl":{id:"perl",path:"perl.tmLanguage.json",embeddedScopes:["source.java","source.sql","source.js","source.css","text.xml","text.html.basic"]},"source.php":{id:"php",path:"php.tmLanguage.json",embeddedScopes:["source.java","source.css","source.json","source.js","source.sql","text.xml","text.html.basic"]},"source.plsql.oracle":{id:"plsql",path:"plsql.tmLanguage.json",embeddedScopes:[]},"source.css.postcss":{id:"postcss",path:"postcss.tmLanguage.json",embeddedScopes:[]},"source.powerquery":{id:"powerquery",path:"powerquery.tmLanguage.json",embeddedScopes:[]},"source.powershell":{id:"powershell",path:"powershell.tmLanguage.json",embeddedScopes:[]},"source.prisma":{id:"prisma",path:"prisma.tmLanguage.json",embeddedScopes:[]},"source.prolog":{id:"prolog",path:"prolog.tmLanguage.json",embeddedScopes:[]},"source.proto":{id:"proto",path:"proto.tmLanguage.json",embeddedScopes:[]},"text.pug":{id:"pug",path:"pug.tmLanguage.json",embeddedScopes:["text.html.basic","source.coffee","source.stylus","source.css.scss","source.sass","source.css","source.js"]},"source.puppet":{id:"puppet",path:"puppet.tmLanguage.json",embeddedScopes:[]},"source.purescript":{id:"purescript",path:"purescript.tmLanguage.json",embeddedScopes:[]},"source.python":{id:"python",path:"python.tmLanguage.json",embeddedScopes:[]},"source.r":{id:"r",path:"r.tmLanguage.json",embeddedScopes:[]},"source.perl.6":{id:"raku",path:"raku.tmLanguage.json",embeddedScopes:[]},"text.aspnetcorerazor":{id:"razor",path:"razor.tmLanguage.json",embeddedScopes:["source.css","source.js","source.cs","text.html.basic"]},"source.reg":{id:"reg",path:"reg.tmLanguage.json",embeddedScopes:[]},"source.rel":{id:"rel",path:"rel.tmLanguage.json",embeddedScopes:[]},"source.riscv":{id:"riscv",path:"riscv.tmLanguage.json",embeddedScopes:[]},"source.rst":{id:"rst",path:"rst.tmLanguage.json",embeddedScopes:["source.java","source.lua","source.c","source.css","text.xml","text.html.basic","source.sql","source.glsl","source.ruby","source.cmake","source.yaml","source.shell","source.js","source.python","source.cpp"]},"source.ruby":{id:"ruby",path:"ruby.tmLanguage.json",embeddedScopes:["source.java","source.lua","source.shell","source.js","source.c","source.css","source.sql","text.xml","text.html.basic"]},"source.rust":{id:"rust",path:"rust.tmLanguage.json",embeddedScopes:[]},"source.sas":{id:"sas",path:"sas.tmLanguage.json",embeddedScopes:["source.sql"]},"source.sass":{id:"sass",path:"sass.tmLanguage.json",embeddedScopes:[]},"source.scala":{id:"scala",path:"scala.tmLanguage.json",embeddedScopes:[]},"source.scheme":{id:"scheme",path:"scheme.tmLanguage.json",embeddedScopes:[]},"source.css.scss":{id:"scss",path:"scss.tmLanguage.json",embeddedScopes:["source.css"]},"source.shaderlab":{id:"shaderlab",path:"shaderlab.tmLanguage.json",embeddedScopes:["source.hlsl"]},"source.shell":{id:"shellscript",path:"shellscript.tmLanguage.json",embeddedScopes:[]},"text.shell-session":{id:"shellsession",path:"shellsession.tmLanguage.json",embeddedScopes:["source.shell"]},"source.smalltalk":{id:"smalltalk",path:"smalltalk.tmLanguage.json",embeddedScopes:[]},"source.solidity":{id:"solidity",path:"solidity.tmLanguage.json",embeddedScopes:[]},"source.sparql":{id:"sparql",path:"sparql.tmLanguage.json",embeddedScopes:["source.turtle"]},"source.sql":{id:"sql",path:"sql.tmLanguage.json",embeddedScopes:[]},"source.ssh-config":{id:"ssh-config",path:"ssh-config.tmLanguage.json",embeddedScopes:[]},"source.stata":{id:"stata",path:"stata.tmLanguage.json",embeddedScopes:["source.sql"]},"source.stylus":{id:"stylus",path:"stylus.tmLanguage.json",embeddedScopes:[]},"source.svelte":{id:"svelte",path:"svelte.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.tsx","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.swift","source.objc","source.json.comments","source.json","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.clojure","source.batchfile","source.yaml","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","text.html.basic","text.html.markdown","text.pug","source.css.postcss","source.css.less","source.css.scss","source.css","source.sass","source.stylus","source.coffee","source.ts","source.js"]},"source.swift":{id:"swift",path:"swift.tmLanguage.json",embeddedScopes:[]},"source.systemverilog":{id:"system-verilog",path:"system-verilog.tmLanguage.json",embeddedScopes:[]},"source.tasl":{id:"tasl",path:"tasl.tmLanguage.json",embeddedScopes:[]},"source.tcl":{id:"tcl",path:"tcl.tmLanguage.json",embeddedScopes:[]},"text.tex":{id:"tex",path:"tex.tmLanguage.json",embeddedScopes:["source.r"]},"source.toml":{id:"toml",path:"toml.tmLanguage.json",embeddedScopes:[]},"source.tsx":{id:"tsx",path:"tsx.tmLanguage.json",embeddedScopes:[]},"source.turtle":{id:"turtle",path:"turtle.tmLanguage.json",embeddedScopes:[]},"text.html.twig":{id:"twig",path:"twig.tmLanguage.json",embeddedScopes:["source.java","source.lua","source.shell","source.c","source.json","source.sql","text.xml","text.html.basic","source.ruby","source.python","source.php","source.js","source.css"]},"source.txt":{id:"txt",path:"txt.tmLanguage.json",embeddedScopes:[]},"source.ts":{id:"typescript",path:"typescript.tmLanguage.json",embeddedScopes:[]},"source.v":{id:"v",path:"v.tmLanguage.json",embeddedScopes:[]},"source.asp.vb.net":{id:"vb",path:"vb.tmLanguage.json",embeddedScopes:[]},"source.verilog":{id:"verilog",path:"verilog.tmLanguage.json",embeddedScopes:[]},"source.vhdl":{id:"vhdl",path:"vhdl.tmLanguage.json",embeddedScopes:[]},"source.viml":{id:"viml",path:"viml.tmLanguage.json",embeddedScopes:[]},"text.html.vue-html":{id:"vue-html",path:"vue-html.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.swift","source.objc","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.coffee","source.clojure","source.batchfile","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","source.graphql","source.toml","source.yaml","source.json5","source.json.comments","source.json","source.tsx","source.js.jsx","source.ts","source.css.less","source.css.scss","source.css","source.sass","source.stylus","text.pug","text.html.markdown","text.html.basic","source.js","source.vue"]},"source.vue":{id:"vue",path:"vue.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.swift","source.objc","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.coffee","source.clojure","source.batchfile","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","source.graphql","source.toml","source.yaml","source.json5","source.json.comments","source.json","source.tsx","source.js.jsx","source.ts","source.js","source.css.less","source.css.scss","source.css","source.sass","source.stylus","text.pug","text.html.markdown","text.html.basic"]},"source.vyper":{id:"vyper",path:"vyper.tmLanguage.json",embeddedScopes:[]},"source.wat":{id:"wasm",path:"wasm.tmLanguage.json",embeddedScopes:[]},"source.wenyan":{id:"wenyan",path:"wenyan.tmLanguage.json",embeddedScopes:[]},"source.wgsl":{id:"wgsl",path:"wgsl.tmLanguage.json",embeddedScopes:[]},"source.wolfram":{id:"wolfram",path:"wolfram.tmLanguage.json",embeddedScopes:[]},"text.xml":{id:"xml",path:"xml.tmLanguage.json",embeddedScopes:["source.java"]},"text.xml.xsl":{id:"xsl",path:"xsl.tmLanguage.json",embeddedScopes:["source.java","text.xml"]},"source.yaml":{id:"yaml",path:"yaml.tmLanguage.json",embeddedScopes:[]},"source.zenscript":{id:"zenscript",path:"zenscript.tmLanguage.json",embeddedScopes:[]}};var N={d:(A,B)=>{for(var Q in B)N.o(B,Q)&&!N.o(A,Q)&&Object.defineProperty(A,Q,{enumerable:!0,get:B[Q]})},o:(A,B)=>Object.prototype.hasOwnProperty.call(A,B)},L={};N.d(L,{_X:()=>XA,Bz:()=>vA,ot:()=>TA,u:()=>WA,jG:()=>Y,Pn:()=>ZA});const H="undefined"!=typeof process&&!!process.env.VSCODE_TEXTMATE_DEBUG;var k;function R(A,B){const Q=[],g=function(A){let B=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,Q=B.exec(A);return{next:()=>{if(!Q)return null;const g=Q[0];return Q=B.exec(A),g}}}(A);let E=g.next();for(;null!==E;){let A=0;if(2===E.length&&":"===E.charAt(1)){switch(E.charAt(0)){case"R":A=1;break;case"L":A=-1;break;default:console.log(`Unknown priority ${E} in scope selector`)}E=g.next()}let B=I();if(Q.push({matcher:B,priority:A}),","!==E)break;E=g.next()}return Q;function C(){if("-"===E){E=g.next();const A=C();return B=>!!A&&!A(B)}if("("===E){E=g.next();const A=function(){const A=[];let B=I();for(;B&&(A.push(B),"|"===E||","===E);){do{E=g.next()}while("|"===E||","===E);B=I()}return B=>A.some((A=>A(B)))}();return")"===E&&(E=g.next()),A}if(K(E)){const A=[];do{A.push(E),E=g.next()}while(K(E));return Q=>B(A,Q)}return null}function I(){const A=[];let B=C();for(;B;)A.push(B),B=C();return B=>A.every((A=>A(B)))}}function K(A){return!!A&&!!A.match(/[\w\.:]+/)}function Y(A){"function"==typeof A.dispose&&A.dispose()}function U(A){return Array.isArray(A)?function(A){let B=[];for(let Q=0,g=A.length;Q{for(let Q in B)A[Q]=B[Q]})),A}function P(A){const B=~A.lastIndexOf("/")||~A.lastIndexOf("\\");return 0===B?A:~B==A.length-1?P(A.substring(0,A.length-1)):A.substr(1+~B)}!function(A){A.toBinaryStr=function(A){let B=A.toString(2);for(;B.length<32;)B="0"+B;return B},A.print=function(B){const Q=A.getLanguageId(B),g=A.getTokenType(B),E=A.getFontStyle(B),C=A.getForeground(B),I=A.getBackground(B);console.log({languageId:Q,tokenType:g,fontStyle:E,foreground:C,background:I})},A.getLanguageId=function(A){return(255&A)>>>0},A.getTokenType=function(A){return(768&A)>>>8},A.containsBalancedBrackets=function(A){return 0!=(1024&A)},A.getFontStyle=function(A){return(30720&A)>>>11},A.getForeground=function(A){return(16744448&A)>>>15},A.getBackground=function(A){return(4278190080&A)>>>24},A.set=function(B,Q,g,E,C,I,D){let w=A.getLanguageId(B),o=A.getTokenType(B),s=A.containsBalancedBrackets(B)?1:0,e=A.getFontStyle(B),c=A.getForeground(B),i=A.getBackground(B);return 0!==Q&&(w=Q),8!==g&&(o=g),null!==E&&(s=E?1:0),-1!==C&&(e=C),0!==I&&(c=I),0!==D&&(i=D),(w<<0|o<<8|s<<10|e<<11|c<<15|i<<24)>>>0}}(k||(k={}));let y=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g;class J{static hasCaptures(A){return null!==A&&(y.lastIndex=0,y.test(A))}static replaceCaptures(A,B,Q){return A.replace(y,((A,g,E,C)=>{let I=Q[parseInt(g||E,10)];if(!I)return A;{let A=B.substring(I.start,I.end);for(;"."===A[0];)A=A.substring(1);switch(C){case"downcase":return A.toLowerCase();case"upcase":return A.toUpperCase();default:return A}}}))}}function S(A,B){return AB?1:0}function p(A,B){if(null===A&&null===B)return 0;if(!A)return-1;if(!B)return 1;let Q=A.length,g=B.length;if(Q===g){for(let g=0;g`);return}const C=Q.lookup(B);A instanceof m?v({baseGrammar:C,selfGrammar:E},g):T(A.ruleName,{baseGrammar:C,selfGrammar:E,repository:E.repository},g);const I=Q.injections(A.scopeName);if(I)for(const A of I)g.add(new m(A))}function T(A,B,Q){B.repository&&B.repository[A]&&X([B.repository[A]],B,Q)}function v(A,B){A.selfGrammar.patterns&&Array.isArray(A.selfGrammar.patterns)&&X(A.selfGrammar.patterns,{...A,repository:A.selfGrammar.repository},B),A.selfGrammar.injections&&X(Object.values(A.selfGrammar.injections),{...A,repository:A.selfGrammar.repository},B)}function X(A,B,Q){for(const g of A){if(Q.visitedRule.has(g))continue;Q.visitedRule.add(g);const A=g.repository?u({},B.repository,g.repository):B.repository;Array.isArray(g.patterns)&&X(g.patterns,{...B,repository:A},Q);const E=g.include;if(!E)continue;const C=$(E);switch(C.kind){case 0:v({...B,selfGrammar:B.baseGrammar},Q);break;case 1:v(B,Q);break;case 2:T(C.ruleName,{...B,repository:A},Q);break;case 3:case 4:const g=C.scopeName===B.selfGrammar.scopeName?B.selfGrammar:C.scopeName===B.baseGrammar.scopeName?B.baseGrammar:void 0;if(g){const E={baseGrammar:B.baseGrammar,selfGrammar:g,repository:A};4===C.kind?T(C.ruleName,E,Q):v(E,Q)}else 4===C.kind?Q.add(new O(C.scopeName,C.ruleName)):Q.add(new m(C.scopeName))}}}class Z{constructor(){this.kind=0}}class j{constructor(){this.kind=1}}class V{constructor(A){this.ruleName=A,this.kind=2}}class z{constructor(A){this.scopeName=A,this.kind=3}}class _{constructor(A,B){this.scopeName=A,this.ruleName=B,this.kind=4}}function $(A){if("$base"===A)return new Z;if("$self"===A)return new j;const B=A.indexOf("#");if(-1===B)return new z(A);if(0===B)return new V(A.substring(1));{const Q=A.substring(0,B),g=A.substring(B+1);return new _(Q,g)}}const AA=/\\(\d+)/,BA=/\\(\d+)/g;class QA{constructor(A,B,Q,g){this.$location=A,this.id=B,this._name=Q||null,this._nameIsCapturing=J.hasCaptures(this._name),this._contentName=g||null,this._contentNameIsCapturing=J.hasCaptures(this._contentName)}get debugName(){const A=this.$location?`${P(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${A}`}getName(A,B){return this._nameIsCapturing&&null!==this._name&&null!==A&&null!==B?J.replaceCaptures(this._name,A,B):this._name}getContentName(A,B){return this._contentNameIsCapturing&&null!==this._contentName?J.replaceCaptures(this._contentName,A,B):this._contentName}}class gA extends QA{constructor(A,B,Q,g,E){super(A,B,Q,g),this.retokenizeCapturedWithRuleId=E}dispose(){}collectPatterns(A,B){throw new Error("Not supported!")}compile(A,B){throw new Error("Not supported!")}compileAG(A,B,Q,g){throw new Error("Not supported!")}}class EA extends QA{constructor(A,B,Q,g,E){super(A,B,Q,null),this._match=new oA(g,this.id),this.captures=E,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(A,B){B.push(this._match)}compile(A,B){return this._getCachedCompiledPatterns(A).compile(A)}compileAG(A,B,Q,g){return this._getCachedCompiledPatterns(A).compileAG(A,Q,g)}_getCachedCompiledPatterns(A){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new sA,this.collectPatterns(A,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}}class CA extends QA{constructor(A,B,Q,g,E){super(A,B,Q,g),this.patterns=E.patterns,this.hasMissingPatterns=E.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(A,B){for(const Q of this.patterns)A.getRule(Q).collectPatterns(A,B)}compile(A,B){return this._getCachedCompiledPatterns(A).compile(A)}compileAG(A,B,Q,g){return this._getCachedCompiledPatterns(A).compileAG(A,Q,g)}_getCachedCompiledPatterns(A){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new sA,this.collectPatterns(A,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}}class IA extends QA{constructor(A,B,Q,g,E,C,I,D,w,o){super(A,B,Q,g),this._begin=new oA(E,this.id),this.beginCaptures=C,this._end=new oA(I||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=D,this.applyEndPatternLast=w||!1,this.patterns=o.patterns,this.hasMissingPatterns=o.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(A,B){return this._end.resolveBackReferences(A,B)}collectPatterns(A,B){B.push(this._begin)}compile(A,B){return this._getCachedCompiledPatterns(A,B).compile(A)}compileAG(A,B,Q,g){return this._getCachedCompiledPatterns(A,B).compileAG(A,Q,g)}_getCachedCompiledPatterns(A,B){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new sA;for(const B of this.patterns)A.getRule(B).collectPatterns(A,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,B):this._cachedCompiledPatterns.setSource(0,B)),this._cachedCompiledPatterns}}class DA extends QA{constructor(A,B,Q,g,E,C,I,D,w){super(A,B,Q,g),this._begin=new oA(E,this.id),this.beginCaptures=C,this.whileCaptures=D,this._while=new oA(I,-2),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=w.patterns,this.hasMissingPatterns=w.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(A,B){return this._while.resolveBackReferences(A,B)}collectPatterns(A,B){B.push(this._begin)}compile(A,B){return this._getCachedCompiledPatterns(A).compile(A)}compileAG(A,B,Q,g){return this._getCachedCompiledPatterns(A).compileAG(A,Q,g)}_getCachedCompiledPatterns(A){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new sA;for(const B of this.patterns)A.getRule(B).collectPatterns(A,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(A,B){return this._getCachedCompiledWhilePatterns(A,B).compile(A)}compileWhileAG(A,B,Q,g){return this._getCachedCompiledWhilePatterns(A,B).compileAG(A,Q,g)}_getCachedCompiledWhilePatterns(A,B){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new sA,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,B||"￿"),this._cachedCompiledWhilePatterns}}class wA{static createCaptureRule(A,B,Q,g,E){return A.registerRule((A=>new gA(B,A,Q,g,E)))}static getCompiledRuleId(A,B,Q){return A.id||B.registerRule((g=>{if(A.id=g,A.match)return new EA(A.$vscodeTextmateLocation,A.id,A.name,A.match,wA._compileCaptures(A.captures,B,Q));if(void 0===A.begin){A.repository&&(Q=u({},Q,A.repository));let g=A.patterns;return void 0===g&&A.include&&(g=[{include:A.include}]),new CA(A.$vscodeTextmateLocation,A.id,A.name,A.contentName,wA._compilePatterns(g,B,Q))}return A.while?new DA(A.$vscodeTextmateLocation,A.id,A.name,A.contentName,A.begin,wA._compileCaptures(A.beginCaptures||A.captures,B,Q),A.while,wA._compileCaptures(A.whileCaptures||A.captures,B,Q),wA._compilePatterns(A.patterns,B,Q)):new IA(A.$vscodeTextmateLocation,A.id,A.name,A.contentName,A.begin,wA._compileCaptures(A.beginCaptures||A.captures,B,Q),A.end,wA._compileCaptures(A.endCaptures||A.captures,B,Q),A.applyEndPatternLast,wA._compilePatterns(A.patterns,B,Q))})),A.id}static _compileCaptures(A,B,Q){let g=[];if(A){let E=0;for(const B in A){if("$vscodeTextmateLocation"===B)continue;const A=parseInt(B,10);A>E&&(E=A)}for(let A=0;A<=E;A++)g[A]=null;for(const E in A){if("$vscodeTextmateLocation"===E)continue;const C=parseInt(E,10);let I=0;A[E].patterns&&(I=wA.getCompiledRuleId(A[E],B,Q)),g[C]=wA.createCaptureRule(B,A[E].$vscodeTextmateLocation,A[E].name,A[E].contentName,I)}}return g}static _compilePatterns(A,B,Q){let g=[];if(A)for(let E=0,C=A.length;EA.substring(B.start,B.end)));return BA.lastIndex=0,this.source.replace(BA,((A,B)=>d(Q[parseInt(B,10)]||"")))}_buildAnchorCache(){let A,B,Q,g,E=[],C=[],I=[],D=[];for(A=0,B=this.source.length;AA.source));this._cached=new eA(A,B,this._items.map((A=>A.ruleId)))}return this._cached}compileAG(A,B,Q){return this._hasAnchors?B?Q?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(A,B,Q)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(A,B,Q)),this._anchorCache.A1_G0):Q?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(A,B,Q)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(A,B,Q)),this._anchorCache.A0_G0):this.compile(A)}_resolveAnchors(A,B,Q){let g=this._items.map((A=>A.resolveAnchors(B,Q)));return new eA(A,g,this._items.map((A=>A.ruleId)))}}class eA{constructor(A,B,Q){this.regExps=B,this.rules=Q,this.scanner=A.createOnigScanner(B)}dispose(){"function"==typeof this.scanner.dispose&&this.scanner.dispose()}toString(){const A=[];for(let B=0,Q=this.rules.length;Bthis._root.match(A)))}static createFromRawTheme(A,B){return this.createFromParsedTheme(function(A){if(!A)return[];if(!A.settings||!Array.isArray(A.settings))return[];let B=A.settings,Q=[],g=0;for(let A=0,E=B.length;A1&&(s=C.slice(0,C.length-1),s.reverse()),Q[g++]=new hA(o,s,A,I,D,w)}}return Q}(A),B)}static createFromParsedTheme(A,B){return function(A,B){A.sort(((A,B)=>{let Q=S(A.scope,B.scope);return 0!==Q?Q:(Q=p(A.parentScopes,B.parentScopes),0!==Q?Q:A.index-B.index)}));let Q=0,g="#000000",E="#ffffff";for(;A.length>=1&&""===A[0].scope;){let B=A.shift();-1!==B.fontStyle&&(Q=B.fontStyle),null!==B.foreground&&(g=B.foreground),null!==B.background&&(E=B.background)}let C=new aA(B),I=new MA(Q,C.getId(g),C.getId(E)),D=new rA(new nA(0,null,-1,0,0),[]);for(let B=0,Q=A.length;Bfunction(A,B){if(null===B)return!0;let Q=0,g=B[Q];for(;A;){if(tA(A.scopeName,g)){if(Q++,Q===B.length)return!0;g=B[Q]}A=A.parent}return!1}(A.parent,B.parentScopes)));return Q?new MA(Q.fontStyle,Q.foreground,Q.background):null}}class iA{constructor(A,B){this.parent=A,this.scopeName=B}static push(A,B){for(const Q of B)A=new iA(A,Q);return A}static from(...A){let B=null;for(let Q=0;QA?console.log("how did this happen?"):this.scopeDepth=A,-1!==B&&(this.fontStyle=B),0!==Q&&(this.foreground=Q),0!==g&&(this.background=g)}}class rA{constructor(A,B=[],Q={}){this._mainRule=A,this._children=Q,this._rulesWithParentScopes=B}static _sortBySpecificity(A){return 1===A.length||A.sort(this._cmpBySpecificity),A}static _cmpBySpecificity(A,B){if(A.scopeDepth===B.scopeDepth){const Q=A.parentScopes,g=B.parentScopes;let E=null===Q?0:Q.length,C=null===g?0:g.length;if(E===C)for(let A=0;A{const B=this._scopeToLanguage(A),Q=this._toStandardTokenType(A);return new FA(B,Q)})),this._defaultAttributes=new FA(A,8),this._embeddedLanguagesMatcher=new NA(Object.entries(B||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(A){return null===A?GA._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(A)}_scopeToLanguage(A){return this._embeddedLanguagesMatcher.match(A)||0}_toStandardTokenType(A){const B=A.match(GA.STANDARD_TOKEN_TYPE_REGEXP);if(!B)return 8;switch(B[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}}GA._NULL_SCOPE_METADATA=new FA(0,0),GA.STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/;class NA{constructor(A){if(0===A.length)this.values=null,this.scopesRegExp=null;else{this.values=new Map(A);const B=A.map((([A,B])=>d(A)));B.sort(),B.reverse(),this.scopesRegExp=new RegExp(`^((${B.join(")|(")}))($|\\.)`,"")}}match(A){if(!this.scopesRegExp)return;const B=A.match(this.scopesRegExp);return B?this.values.get(B[1]):void 0}}class LA{constructor(A,B){this.stack=A,this.stoppedEarly=B}}function HA(A,B,Q,g,E,C,I,D){const w=B.content.length;let o=!1,s=-1;if(I){const I=function(A,B,Q,g,E,C){let I=E.beginRuleCapturedEOL?0:-1;const D=[];for(let B=E;B;B=B.pop()){const Q=B.getRule(A);Q instanceof DA&&D.push({rule:Q,stack:B})}for(let w=D.pop();w;w=D.pop()){const{ruleScanner:D,findOptions:o}=RA(w.rule,A,w.stack.endRule,Q,g===I),s=D.findNextMatchSync(B,g,o);if(H&&(console.log(" scanning for while rule"),console.log(D.toString())),!s){H&&console.log(" popping "+w.rule.debugName+" - "+w.rule.debugWhileRegExp),E=w.stack.pop();break}if(-2!==s.ruleId){E=w.stack.pop();break}s.captureIndices&&s.captureIndices.length&&(C.produce(w.stack,s.captureIndices[0].start),KA(A,B,Q,w.stack,C,w.rule.whileCaptures,s.captureIndices),C.produce(w.stack,s.captureIndices[0].end),I=s.captureIndices[0].end,s.captureIndices[0].end>g&&(g=s.captureIndices[0].end,Q=!1))}return{stack:E,linePos:g,anchorPosition:I,isFirstLine:Q}}(A,B,Q,g,E,C);E=I.stack,g=I.linePos,Q=I.isFirstLine,s=I.anchorPosition}const e=Date.now();for(;!o;){if(0!==D&&Date.now()-e>D)return new LA(E,!0);c()}return new LA(E,!1);function c(){H&&(console.log(""),console.log(`@@scanNext ${g}: |${B.content.substr(g).replace(/\n$/,"\\n")}|`));const I=function(A,B,Q,g,E,C){const I=function(A,B,Q,g,E,C){const I=E.getRule(A),{ruleScanner:D,findOptions:w}=kA(I,A,E.endRule,Q,g===C);let o=0;H&&(o=x());const s=D.findNextMatchSync(B,g,w);if(H){const A=x()-o;A>5&&console.warn(`Rule ${I.debugName} (${I.id}) matching took ${A} against '${B}'`),console.log(` scanning for (linePos: ${g}, anchorPosition: ${C})`),console.log(D.toString()),s&&console.log(`matched rule id: ${s.ruleId} from ${s.captureIndices[0].start} to ${s.captureIndices[0].end}`)}return s?{captureIndices:s.captureIndices,matchedRuleId:s.ruleId}:null}(A,B,Q,g,E,C),D=A.getInjections();if(0===D.length)return I;const w=function(A,B,Q,g,E,C,I){let D,w=Number.MAX_VALUE,o=null,s=0;const e=C.contentNameScopesList.getScopeNames();for(let C=0,c=A.length;C=w)&&(w=a,o=h.captureIndices,D=h.ruleId,s=c.priority,w===E))break}return o?{priorityMatch:-1===s,captureIndices:o,matchedRuleId:D}:null}(D,A,B,Q,g,E,C);if(!w)return I;if(!I)return w;const o=I.captureIndices[0].start,s=w.captureIndices[0].start;return s0)&&D[0].end>g;if(-1===e){const I=E.getRule(A);H&&console.log(" popping "+I.debugName+" - "+I.debugEndRegExp),C.produce(E,D[0].start),E=E.withContentNameScopesList(E.nameScopesList),KA(A,B,Q,E,C,I.endCaptures,D),C.produce(E,D[0].end);const e=E;if(E=E.parent,s=e.getAnchorPos(),!c&&e.getEnterPos()===g)return H&&console.error("[1] - Grammar is in an endless loop - Grammar pushed & popped a rule without advancing"),E=e,C.produce(E,w),void(o=!0)}else{const I=A.getRule(e);C.produce(E,D[0].start);const i=E,t=I.getName(B.content,D),M=E.contentNameScopesList.pushAttributed(t,A);if(E=E.push(e,g,s,D[0].end===w,null,M,M),I instanceof IA){const g=I;H&&console.log(" pushing "+g.debugName+" - "+g.debugBeginRegExp),KA(A,B,Q,E,C,g.beginCaptures,D),C.produce(E,D[0].end),s=D[0].end;const e=g.getContentName(B.content,D),t=M.pushAttributed(e,A);if(E=E.withContentNameScopesList(t),g.endHasBackReferences&&(E=E.withEndRule(g.getEndWithResolvedBackReferences(B.content,D))),!c&&i.hasSameRuleAs(E))return H&&console.error("[2] - Grammar is in an endless loop - Grammar pushed the same rule without advancing"),E=E.pop(),C.produce(E,w),void(o=!0)}else if(I instanceof DA){const g=I;H&&console.log(" pushing "+g.debugName),KA(A,B,Q,E,C,g.beginCaptures,D),C.produce(E,D[0].end),s=D[0].end;const e=g.getContentName(B.content,D),t=M.pushAttributed(e,A);if(E=E.withContentNameScopesList(t),g.whileHasBackReferences&&(E=E.withEndRule(g.getWhileWithResolvedBackReferences(B.content,D))),!c&&i.hasSameRuleAs(E))return H&&console.error("[3] - Grammar is in an endless loop - Grammar pushed the same rule without advancing"),E=E.pop(),C.produce(E,w),void(o=!0)}else{const g=I;if(H&&console.log(" matched "+g.debugName+" - "+g.debugMatchRegExp),KA(A,B,Q,E,C,g.captures,D),C.produce(E,D[0].end),E=E.pop(),!c)return H&&console.error("[4] - Grammar is in an endless loop - Grammar is not advancing, nor is it pushing/popping"),E=E.safePop(),C.produce(E,w),void(o=!0)}}D[0].end>g&&(g=D[0].end,Q=!1)}}function kA(A,B,Q,g,E){return{ruleScanner:A.compileAG(B,Q,g,E),findOptions:0}}function RA(A,B,Q,g,E){return{ruleScanner:A.compileWhileAG(B,Q,g,E),findOptions:0}}function KA(A,B,Q,g,E,C,I){if(0===C.length)return;const D=B.content,w=Math.min(C.length,I.length),o=[],s=I[0].end;for(let B=0;Bs)break;for(;o.length>0&&o[o.length-1].endPos<=e.start;)E.produceFromScopes(o[o.length-1].scopes,o[o.length-1].endPos),o.pop();if(o.length>0?E.produceFromScopes(o[o.length-1].scopes,e.start):E.produce(g,e.start),w.retokenizeCapturedWithRuleId){const B=w.getName(D,I),C=g.contentNameScopesList.pushAttributed(B,A),o=w.getContentName(D,I),s=C.pushAttributed(o,A),c=g.push(w.retokenizeCapturedWithRuleId,e.start,-1,!1,null,C,s),i=A.createOnigString(D.substring(0,e.end));HA(A,i,Q&&0===e.start,e.start,c,E,!1,0),Y(i);continue}const c=w.getName(D,I);if(null!==c){const B=(o.length>0?o[o.length-1].scopes:g.contentNameScopesList).pushAttributed(c,A);o.push(new YA(B,e.end))}}for(;o.length>0;)E.produceFromScopes(o[o.length-1].scopes,o[o.length-1].endPos),o.pop()}class YA{constructor(A,B){this.scopes=A,this.endPos=B}}function UA(A,B,Q,g,E){const C=R(B,uA),I=wA.getCompiledRuleId(Q,g,E.repository);for(const Q of C)A.push({debugSelector:B,matcher:Q.matcher,ruleId:I,grammar:E,priority:Q.priority})}function uA(A,B){if(B.length{for(let g=Q;gQ&&A.substr(0,Q)===B&&"."===A[Q]}class yA{constructor(A,B,Q,g,E,C,I,D){if(this._rootScopeName=A,this.balancedBracketSelectors=C,this._onigLib=D,this._basicScopeAttributesProvider=new GA(Q,g),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=I,this._grammar=JA(B,null),this._injections=null,this._tokenTypeMatchers=[],E)for(const A of Object.keys(E)){const B=R(A,uA);for(const Q of B)this._tokenTypeMatchers.push({matcher:Q.matcher,type:E[A]})}}get themeProvider(){return this._grammarRepository}dispose(){for(const A of this._ruleId2desc)A&&A.dispose()}createOnigScanner(A){return this._onigLib.createOnigScanner(A)}createOnigString(A){return this._onigLib.createOnigString(A)}getMetadataForScope(A){return this._basicScopeAttributesProvider.getBasicScopeAttributes(A)}_collectInjections(){const A=[],B=this._rootScopeName,Q=(A=>A===this._rootScopeName?this._grammar:this.getExternalGrammar(A))(B);if(Q){const g=Q.injections;if(g)for(let B in g)UA(A,B,g[B],this,Q);const E=this._grammarRepository.injections(B);E&&E.forEach((B=>{const Q=this.getExternalGrammar(B);if(Q){const B=Q.injectionSelector;B&&UA(A,B,Q,this,Q)}}))}return A.sort(((A,B)=>A.priority-B.priority)),A}getInjections(){if(null===this._injections&&(this._injections=this._collectInjections(),H&&this._injections.length>0)){console.log(`Grammar ${this._rootScopeName} contains the following injections:`);for(const A of this._injections)console.log(` - ${A.debugSelector}`)}return this._injections}registerRule(A){const B=++this._lastRuleId,Q=A(B);return this._ruleId2desc[B]=Q,Q}getRule(A){return this._ruleId2desc[A]}getExternalGrammar(A,B){if(this._includedGrammars[A])return this._includedGrammars[A];if(this._grammarRepository){const Q=this._grammarRepository.lookup(A);if(Q)return this._includedGrammars[A]=JA(Q,B&&B.$base),this._includedGrammars[A]}}tokenizeLine(A,B,Q=0){const g=this._tokenize(A,B,!1,Q);return{tokens:g.lineTokens.getResult(g.ruleStack,g.lineLength),ruleStack:g.ruleStack,stoppedEarly:g.stoppedEarly}}tokenizeLine2(A,B,Q=0){const g=this._tokenize(A,B,!0,Q);return{tokens:g.lineTokens.getBinaryResult(g.ruleStack,g.lineLength),ruleStack:g.ruleStack,stoppedEarly:g.stoppedEarly}}_tokenize(A,B,Q,g){let E;if(-1===this._rootId&&(this._rootId=wA.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections()),B&&B!==pA.NULL)E=!1,B.reset();else{E=!0;const A=this._basicScopeAttributesProvider.getDefaultAttributes(),Q=this.themeProvider.getDefaults(),g=k.set(0,A.languageId,A.tokenType,null,Q.fontStyle,Q.foregroundId,Q.backgroundId),C=this.getRule(this._rootId).getName(null,null);let I;I=C?SA.createRootAndLookUpScopeName(C,g,this):SA.createRoot("unknown",g),B=new pA(null,this._rootId,-1,-1,!1,null,I,I)}A+="\n";const C=this.createOnigString(A),I=C.content.length,D=new dA(Q,A,this._tokenTypeMatchers,this.balancedBracketSelectors),w=HA(this,C,E,0,B,D,!0,g);return Y(C),{lineLength:I,lineTokens:D,ruleStack:w.stack,stoppedEarly:w.stoppedEarly}}}function JA(A,B){return(A=U(A)).repository=A.repository||{},A.repository.$self={$vscodeTextmateLocation:A.$vscodeTextmateLocation,patterns:A.patterns,name:A.scopeName},A.repository.$base=B||A.repository.$self,A}class SA{constructor(A,B,Q){this.parent=A,this.scopePath=B,this.tokenAttributes=Q}static fromExtension(A,B){let Q=A,g=A?.scopePath??null;for(const A of B)g=iA.push(g,A.scopeNames),Q=new SA(Q,g,A.encodedTokenAttributes);return Q}static createRoot(A,B){return new SA(null,new iA(null,A),B)}static createRootAndLookUpScopeName(A,B,Q){const g=Q.getMetadataForScope(A),E=new iA(null,A),C=Q.themeProvider.themeMatch(E),I=SA.mergeAttributes(B,g,C);return new SA(null,E,I)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(A){return SA.equals(this,A)}static equals(A,B){for(;;){if(A===B)return!0;if(!A&&!B)return!0;if(!A||!B)return!1;if(A.scopeName!==B.scopeName||A.tokenAttributes!==B.tokenAttributes)return!1;A=A.parent,B=B.parent}}static mergeAttributes(A,B,Q){let g=-1,E=0,C=0;return null!==Q&&(g=Q.fontStyle,E=Q.foregroundId,C=Q.backgroundId),k.set(A,B.languageId,B.tokenType,null,g,E,C)}pushAttributed(A,B){if(null===A)return this;if(-1===A.indexOf(" "))return SA._pushAttributed(this,A,B);const Q=A.split(/ /g);let g=this;for(const A of Q)g=SA._pushAttributed(g,A,B);return g}static _pushAttributed(A,B,Q){const g=Q.getMetadataForScope(B),E=A.scopePath.push(B),C=Q.themeProvider.themeMatch(E),I=SA.mergeAttributes(A.tokenAttributes,g,C);return new SA(A,E,I)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(A){const B=[];let Q=this;for(;Q&&Q!==A;)B.push({encodedTokenAttributes:Q.tokenAttributes,scopeNames:Q.scopePath.getExtensionIfDefined(Q.parent?.scopePath??null)}),Q=Q.parent;return Q===A?B.reverse():void 0}}class pA{constructor(A,B,Q,g,E,C,I,D){this.parent=A,this.ruleId=B,this.beginRuleCapturedEOL=E,this.endRule=C,this.nameScopesList=I,this.contentNameScopesList=D,this._stackElementBrand=void 0,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=Q,this._anchorPos=g}equals(A){return null!==A&&pA._equals(this,A)}static _equals(A,B){return A===B||!!this._structuralEquals(A,B)&&SA.equals(A.contentNameScopesList,B.contentNameScopesList)}static _structuralEquals(A,B){for(;;){if(A===B)return!0;if(!A&&!B)return!0;if(!A||!B)return!1;if(A.depth!==B.depth||A.ruleId!==B.ruleId||A.endRule!==B.endRule)return!1;A=A.parent,B=B.parent}}clone(){return this}static _reset(A){for(;A;)A._enterPos=-1,A._anchorPos=-1,A=A.parent}reset(){pA._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(A,B,Q,g,E,C,I){return new pA(this,A,B,Q,g,E,C,I)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(A){return A.getRule(this.ruleId)}toString(){const A=[];return this._writeString(A,0),"["+A.join(",")+"]"}_writeString(A,B){return this.parent&&(B=this.parent._writeString(A,B)),A[B++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,B}withContentNameScopesList(A){return this.contentNameScopesList===A?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,A)}withEndRule(A){return this.endRule===A?this:new pA(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,A,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(A){let B=this;for(;B&&B._enterPos===A._enterPos;){if(B.ruleId===A.ruleId)return!0;B=B.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(A,B){const Q=SA.fromExtension(A?.nameScopesList??null,B.nameScopesList);return new pA(A,B.ruleId,B.enterPos??-1,B.anchorPos??-1,B.beginRuleCapturedEOL,B.endRule,Q,SA.fromExtension(Q,B.contentNameScopesList))}}pA.NULL=new pA(null,0,0,0,!1,null,null,null);class lA{constructor(A,B){this.allowAny=!1,this.balancedBracketScopes=A.flatMap((A=>"*"===A?(this.allowAny=!0,[]):R(A,uA).map((A=>A.matcher)))),this.unbalancedBracketScopes=B.flatMap((A=>R(A,uA).map((A=>A.matcher))))}get matchesAlways(){return this.allowAny&&0===this.unbalancedBracketScopes.length}get matchesNever(){return 0===this.balancedBracketScopes.length&&!this.allowAny}match(A){for(const B of this.unbalancedBracketScopes)if(B(A))return!1;for(const B of this.balancedBracketScopes)if(B(A))return!0;return this.allowAny}}class dA{constructor(A,B,Q,g){this.balancedBracketSelectors=g,this._emitBinaryTokens=A,this._tokenTypeOverrides=Q,this._lineText=H?B:null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}produce(A,B){this.produceFromScopes(A.contentNameScopesList,B)}produceFromScopes(A,B){if(this._lastTokenEndIndex>=B)return;if(this._emitBinaryTokens){let Q=A?.tokenAttributes??0,g=!1;if(this.balancedBracketSelectors?.matchesAlways&&(g=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const B=A?.getScopeNames()??[];for(const A of this._tokenTypeOverrides)A.matcher(B)&&(Q=k.set(Q,0,A.type,null,-1,0,0));this.balancedBracketSelectors&&(g=this.balancedBracketSelectors.match(B))}if(g&&(Q=k.set(Q,0,8,g,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===Q)return void(this._lastTokenEndIndex=B);if(H){const Q=A?.getScopeNames()??[];console.log(" token: |"+this._lineText.substring(this._lastTokenEndIndex,B).replace(/\n$/,"\\n")+"|");for(let A=0;A0&&this._tokens[this._tokens.length-1].startIndex===B-1&&this._tokens.pop(),0===this._tokens.length&&(this._lastTokenEndIndex=-1,this.produce(A,B),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(A,B){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===B-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),0===this._binaryTokens.length&&(this._lastTokenEndIndex=-1,this.produce(A,B),this._binaryTokens[this._binaryTokens.length-2]=0);const Q=new Uint32Array(this._binaryTokens.length);for(let A=0,B=this._binaryTokens.length;A0;)10===A.charCodeAt(E)?(E++,C++,I=0):(E++,I++),B--}function w(A){null===Q?E=A:D(A-E)}function o(){for(;E0&&65279===A.charCodeAt(0)&&(E=1);let i=0,t=null,M=[],h=[],a=null;function n(A,B){M.push(i),h.push(t),i=A,t=B}function r(){if(0===M.length)return F("illegal state stack");i=M.pop(),t=h.pop()}function F(B){throw new Error("Near offset "+E+": "+B+" ~~~"+A.substr(E,50)+"~~~")}const G=function(){if(null===a)return F("missing ");let A={};null!==Q&&(A[Q]={filename:B,line:C,char:I}),t[a]=A,a=null,n(1,A)},N=function(){if(null===a)return F("missing ");let A=[];t[a]=A,a=null,n(2,A)},L=function(){let A={};null!==Q&&(A[Q]={filename:B,line:C,char:I}),t.push(A),n(1,A)},H=function(){let A=[];t.push(A),n(2,A)};function k(){if(1!==i)return F("unexpected ");r()}function R(){return 1===i||2!==i?F("unexpected "):void r()}function K(A){if(1===i){if(null===a)return F("missing ");t[a]=A,a=null}else 2===i?t.push(A):t=A}function Y(A){if(isNaN(A))return F("cannot parse float");if(1===i){if(null===a)return F("missing ");t[a]=A,a=null}else 2===i?t.push(A):t=A}function U(A){if(isNaN(A))return F("cannot parse integer");if(1===i){if(null===a)return F("missing ");t[a]=A,a=null}else 2===i?t.push(A):t=A}function u(A){if(1===i){if(null===a)return F("missing ");t[a]=A,a=null}else 2===i?t.push(A):t=A}function P(A){if(1===i){if(null===a)return F("missing ");t[a]=A,a=null}else 2===i?t.push(A):t=A}function y(A){if(1===i){if(null===a)return F("missing ");t[a]=A,a=null}else 2===i?t.push(A):t=A}function J(){let A=c(">"),B=!1;return 47===A.charCodeAt(A.length-1)&&(B=!0,A=A.substring(0,A.length-1)),{name:A.trim(),isClosed:B}}function S(A){if(A.isClosed)return"";let B=c(""),B.replace(/&#([0-9]+);/g,(function(A,B){return String.fromCodePoint(parseInt(B,10))})).replace(/&#x([0-9a-f]+);/g,(function(A,B){return String.fromCodePoint(parseInt(B,16))})).replace(/&|<|>|"|'/g,(function(A){switch(A){case"&":return"&";case"<":return"<";case">":return">";case""":return'"';case"'":return"'"}return A}))}for(;E=g));){const w=A.charCodeAt(E);if(D(1),60!==w)return F("expected <");if(E>=g)return F("unexpected end of input");const c=A.charCodeAt(E);if(63===c){D(1),e("?>");continue}if(33===c){if(D(1),s("--")){e("--\x3e");continue}e(">");continue}if(47===c){if(D(1),o(),s("plist")){e(">");continue}if(s("dict")){e(">"),k();continue}if(s("array")){e(">"),R();continue}return F("unexpected closed tag")}let M=J();switch(M.name){case"dict":1===i?G():2===i?L():(t={},null!==Q&&(t[Q]={filename:B,line:C,char:I}),n(1,t)),M.isClosed&&k();continue;case"array":1===i?N():2===i?H():(t=[],n(2,t)),M.isClosed&&R();continue;case"key":p=S(M),1!==i?F("unexpected "):null!==a?F("too many "):a=p;continue;case"string":K(S(M));continue;case"real":Y(parseFloat(S(M)));continue;case"integer":U(parseInt(S(M),10));continue;case"date":u(new Date(S(M)));continue;case"data":P(S(M));continue;case"true":S(M),y(!0);continue;case"false":S(M),y(!1);continue}if(!/^plist/.test(M.name))return F("unexpected opened tag "+M.name)}var p;return t}function xA(A,B){throw new Error("Near offset "+A.pos+": "+B+" ~~~"+A.source.substr(A.pos,50)+"~~~")}class mA{constructor(A){this.source=A,this.pos=0,this.len=A.length,this.line=1,this.char=0}}class OA{constructor(){this.value=null,this.type=0,this.offset=-1,this.len=-1,this.line=-1,this.char=-1}toLocation(A){return{filename:A,line:this.line,char:this.char}}}function qA(A,B){B.value=null,B.type=0,B.offset=-1,B.len=-1,B.line=-1,B.char=-1;let Q,g=A.source,E=A.pos,C=A.len,I=A.line,D=A.char;for(;;){if(E>=C)return!1;if(Q=g.charCodeAt(E),32!==Q&&9!==Q&&13!==Q){if(10!==Q)break;E++,I++,D=0}else E++,D++}if(B.offset=E,B.line=I,B.char=D,34===Q){for(B.type=1,E++,D++;;){if(E>=C)return!1;if(Q=g.charCodeAt(E),E++,D++,92!==Q){if(34===Q)break}else E++,D++}B.value=g.substring(B.offset+1,E-1).replace(/\\u([0-9A-Fa-f]{4})/g,((A,B)=>String.fromCodePoint(parseInt(B,16)))).replace(/\\(.)/g,((B,Q)=>{switch(Q){case'"':return'"';case"\\":return"\\";case"/":return"/";case"b":return"\b";case"f":return"\f";case"n":return"\n";case"r":return"\r";case"t":return"\t";default:xA(A,"invalid escape sequence")}throw new Error("unreachable")}))}else if(91===Q)B.type=2,E++,D++;else if(123===Q)B.type=3,E++,D++;else if(93===Q)B.type=4,E++,D++;else if(125===Q)B.type=5,E++,D++;else if(58===Q)B.type=6,E++,D++;else if(44===Q)B.type=7,E++,D++;else if(110===Q){if(B.type=8,E++,D++,Q=g.charCodeAt(E),117!==Q)return!1;if(E++,D++,Q=g.charCodeAt(E),108!==Q)return!1;if(E++,D++,Q=g.charCodeAt(E),108!==Q)return!1;E++,D++}else if(116===Q){if(B.type=9,E++,D++,Q=g.charCodeAt(E),114!==Q)return!1;if(E++,D++,Q=g.charCodeAt(E),117!==Q)return!1;if(E++,D++,Q=g.charCodeAt(E),101!==Q)return!1;E++,D++}else if(102===Q){if(B.type=10,E++,D++,Q=g.charCodeAt(E),97!==Q)return!1;if(E++,D++,Q=g.charCodeAt(E),108!==Q)return!1;if(E++,D++,Q=g.charCodeAt(E),115!==Q)return!1;if(E++,D++,Q=g.charCodeAt(E),101!==Q)return!1;E++,D++}else for(B.type=11;;){if(E>=C)return!1;if(Q=g.charCodeAt(E),!(46===Q||Q>=48&&Q<=57||101===Q||69===Q||45===Q||43===Q))break;E++,D++}return B.len=E-B.offset,null===B.value&&(B.value=g.substr(B.offset,B.len)),A.pos=E,A.line=I,A.char=D,!0}class bA{constructor(A,B){this._onigLibPromise=B,this._grammars=new Map,this._rawGrammars=new Map,this._injectionGrammars=new Map,this._theme=A}dispose(){for(const A of this._grammars.values())A.dispose()}setTheme(A){this._theme=A}getColorMap(){return this._theme.getColorMap()}addGrammar(A,B){this._rawGrammars.set(A.scopeName,A),B&&this._injectionGrammars.set(A.scopeName,B)}lookup(A){return this._rawGrammars.get(A)}injections(A){return this._injectionGrammars.get(A)}getDefaults(){return this._theme.getDefaults()}themeMatch(A){return this._theme.match(A)}async grammarForScopeName(A,B,Q,g,E){if(!this._grammars.has(A)){let C=this._rawGrammars.get(A);if(!C)return null;this._grammars.set(A,function(A,B,Q,g,E,C,I,D){return new yA(A,B,Q,g,E,C,I,D)}(A,C,B,Q,g,E,this,await this._onigLibPromise))}return this._grammars.get(A)}}function WA(A,B){let Q=0;const g=[];let E=A,C=B;for(;E!==C;)E&&(!C||E.depth>=C.depth)?(Q++,E=E.parent):(g.push(C.toStateStackFrame()),C=C.parent);return{pops:Q,newFrames:g.reverse()}}function TA(A,B){let Q=A;for(let A=0;A0;)await Promise.all(C.Q.map((A=>this._loadSingleGrammar(A.scopeName)))),C.processQueue();return this._grammarForScopeName(A,B,Q,g,E)}async _loadSingleGrammar(A){return this._ensureGrammarCache.has(A)||this._ensureGrammarCache.set(A,this._doLoadSingleGrammar(A)),this._ensureGrammarCache.get(A)}async _doLoadSingleGrammar(A){const B=await this._options.loadGrammar(A);if(B){const Q="function"==typeof this._options.getInjections?this._options.getInjections(A):void 0;this._syncRegistry.addGrammar(B,Q)}}async addGrammar(A,B=[],Q=0,g=null){return this._syncRegistry.addGrammar(A,B),await this._grammarForScopeName(A.scopeName,Q,g)}_grammarForScopeName(A,B=0,Q=null,g=null,E=null){return this._syncRegistry.grammarForScopeName(A,B,Q,g,E)}}const XA=pA.NULL,ZA=function(A,B=null){return null!==B&&/\.json$/.test(B)?(Q=A,H?function(A,B,Q){let g=new mA(A),E=new OA,C=0,I=null,D=[],w=[];function o(){D.push(C),w.push(I)}function s(){C=D.pop(),I=w.pop()}function e(A){xA(g,A)}for(;qA(g,E);){if(0===C){if(null!==I&&e("too many constructs in root"),3===E.type){I={},I.$vscodeTextmateLocation=E.toLocation(B),o(),C=1;continue}if(2===E.type){I=[],o(),C=4;continue}e("unexpected token in root")}if(2===C){if(5===E.type){s();continue}if(7===E.type){C=3;continue}e("expected , or }")}if(1===C||3===C){if(1===C&&5===E.type){s();continue}if(1===E.type){let A=E.value;if(qA(g,E)&&6===E.type||e("expected colon"),qA(g,E)||e("expected value"),C=2,1===E.type){I[A]=E.value;continue}if(8===E.type){I[A]=null;continue}if(9===E.type){I[A]=!0;continue}if(10===E.type){I[A]=!1;continue}if(11===E.type){I[A]=parseFloat(E.value);continue}if(2===E.type){let B=[];I[A]=B,o(),C=4,I=B;continue}if(3===E.type){let Q={};Q.$vscodeTextmateLocation=E.toLocation(B),I[A]=Q,o(),C=1,I=Q;continue}}e("unexpected token in dict")}if(5===C){if(4===E.type){s();continue}if(7===E.type){C=6;continue}e("expected , or ]")}if(4===C||6===C){if(4===C&&4===E.type){s();continue}if(C=5,1===E.type){I.push(E.value);continue}if(8===E.type){I.push(null);continue}if(9===E.type){I.push(!0);continue}if(10===E.type){I.push(!1);continue}if(11===E.type){I.push(parseFloat(E.value));continue}if(2===E.type){let A=[];I.push(A),o(),C=4,I=A;continue}if(3===E.type){let A={};A.$vscodeTextmateLocation=E.toLocation(B),I.push(A),o(),C=1,I=A;continue}e("unexpected token in array")}e("unknown state")}return 0!==w.length&&e("unclosed constructs"),I}(Q,B):JSON.parse(Q)):function(A,B){return H?function(A,B,Q){return fA(A,B,"$vscodeTextmateLocation")}(A,B):function(A){return fA(A,null,null)}(A)}(A,B);var Q};var jA=L.Bz,VA=("undefined"!=typeof document&&document.currentScript&&document.currentScript.src,function(A){var B,Q,g=void 0!==(A=A||{})?A:{};g.ready=new Promise((function(A,g){B=A,Q=g}));var E,C=Object.assign({},g),I=!1;E=function(A){let B;return"function"==typeof readbuffer?new Uint8Array(readbuffer(A)):(B=read(A,"binary"),"object"==typeof B||L(Q),B);var Q},"undefined"!=typeof scriptArgs&&scriptArgs,"undefined"!=typeof onig_print&&("undefined"==typeof console&&(console={}),console.log=onig_print,console.warn=console.error="undefined"!=typeof printErr?printErr:onig_print);var D,w,o=g.print||console.log.bind(console),s=g.printErr||console.warn.bind(console);Object.assign(g,C),C=null,g.arguments&&g.arguments,g.thisProgram&&g.thisProgram,g.quit&&g.quit,g.wasmBinary&&(D=g.wasmBinary),g.noExitRuntime,"object"!=typeof WebAssembly&&L("no native wasm support detected");var e,c,i,t=!1,M="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function h(A,B,Q){for(var g=B+Q,E=B;A[E]&&!(E>=g);)++E;if(E-B>16&&A.buffer&&M)return M.decode(A.subarray(B,E));for(var C="";B>10,56320|1023&o)}}else C+=String.fromCharCode((31&I)<<6|D)}else C+=String.fromCharCode(I)}return C}function a(A){e=A,g.HEAP8=new Int8Array(A),g.HEAP16=new Int16Array(A),g.HEAP32=new Int32Array(A),g.HEAPU8=c=new Uint8Array(A),g.HEAPU16=new Uint16Array(A),g.HEAPU32=i=new Uint32Array(A),g.HEAPF32=new Float32Array(A),g.HEAPF64=new Float64Array(A)}g.INITIAL_MEMORY;var n=[],r=[],F=[],G=0,N=null;function L(A){g.onAbort&&g.onAbort(A),s(A="Aborted("+A+")"),t=!0,A+=". Build with -sASSERTIONS for more info.";var B=new WebAssembly.RuntimeError(A);throw Q(B),B}var H,k,R,K="data:application/octet-stream;base64,";function Y(A){return A.startsWith(K)}function U(A){try{if(A==H&&D)return new Uint8Array(D);if(E)return E(A);throw"both async and sync fetching of the wasm failed"}catch(A){L(A)}}function u(A){for(;A.length>0;)A.shift()(g)}function P(A){try{return w.grow(A-e.byteLength+65535>>>16),a(w.buffer),1}catch(A){}}Y(H="onig.wasm")||(k=H,H=g.locateFile?g.locateFile(k,""):""+k),R="undefined"!=typeof dateNow?dateNow:()=>performance.now();var y=[null,[],[]];function J(A,B){var Q=y[A];0===B||10===B?((1===A?o:s)(h(Q,0)),Q.length=0):Q.push(B)}var S,p={emscripten_get_now:R,emscripten_memcpy_big:function(A,B,Q){c.copyWithin(A,B,B+Q)},emscripten_resize_heap:function(A){var B=c.length,Q=2147483648;if((A>>>=0)>Q)return!1;let g=(A,B)=>A+(B-A%B)%B;for(var E=1;E<=4;E*=2){var C=B*(1+.2/E);if(C=Math.min(C,A+100663296),P(Math.min(Q,g(Math.max(A,C),65536))))return!0}return!1},fd_write:function(A,B,Q,g){for(var E=0,C=0;C>2],D=i[B+4>>2];B+=8;for(var w=0;w>2]=E,0}};function l(A){function Q(){S||(S=!0,g.calledRun=!0,t||(u(r),B(g),g.onRuntimeInitialized&&g.onRuntimeInitialized(),function(){if(g.postRun)for("function"==typeof g.postRun&&(g.postRun=[g.postRun]);g.postRun.length;)A=g.postRun.shift(),F.unshift(A);var A;u(F)}()))}G>0||(function(){if(g.preRun)for("function"==typeof g.preRun&&(g.preRun=[g.preRun]);g.preRun.length;)A=g.preRun.shift(),n.unshift(A);var A;u(n)}(),G>0||(g.setStatus?(g.setStatus("Running..."),setTimeout((function(){setTimeout((function(){g.setStatus("")}),1),Q()}),1)):Q()))}if(function(){var A={env:p,wasi_snapshot_preview1:p};function B(A,B){var Q,E=A.exports;g.asm=E,a((w=g.asm.memory).buffer),g.asm.__indirect_function_table,Q=g.asm.__wasm_call_ctors,r.unshift(Q),function(A){if(G--,g.monitorRunDependencies&&g.monitorRunDependencies(G),0==G&&N){var B=N;N=null,B()}}()}function E(A){B(A.instance)}function C(B){return(!D&&I&&"function"==typeof fetch?fetch(H,{credentials:"same-origin"}).then((function(A){if(!A.ok)throw"failed to load wasm binary file at '"+H+"'";return A.arrayBuffer()})).catch((function(){return U(H)})):Promise.resolve().then((function(){return U(H)}))).then((function(B){return WebAssembly.instantiate(B,A)})).then((function(A){return A})).then(B,(function(A){s("failed to asynchronously prepare wasm: "+A),L(A)}))}if(G++,g.monitorRunDependencies&&g.monitorRunDependencies(G),g.instantiateWasm)try{return g.instantiateWasm(A,B)}catch(A){s("Module.instantiateWasm callback failed with error: "+A),Q(A)}(D||"function"!=typeof WebAssembly.instantiateStreaming||Y(H)||"function"!=typeof fetch?C(E):fetch(H,{credentials:"same-origin"}).then((function(B){return WebAssembly.instantiateStreaming(B,A).then(E,(function(A){return s("wasm streaming compile failed: "+A),s("falling back to ArrayBuffer instantiation"),C(E)}))}))).catch(Q)}(),g.___wasm_call_ctors=function(){return(g.___wasm_call_ctors=g.asm.__wasm_call_ctors).apply(null,arguments)},g.___errno_location=function(){return(g.___errno_location=g.asm.__errno_location).apply(null,arguments)},g._omalloc=function(){return(g._omalloc=g.asm.omalloc).apply(null,arguments)},g._ofree=function(){return(g._ofree=g.asm.ofree).apply(null,arguments)},g._getLastOnigError=function(){return(g._getLastOnigError=g.asm.getLastOnigError).apply(null,arguments)},g._createOnigScanner=function(){return(g._createOnigScanner=g.asm.createOnigScanner).apply(null,arguments)},g._freeOnigScanner=function(){return(g._freeOnigScanner=g.asm.freeOnigScanner).apply(null,arguments)},g._findNextOnigScannerMatch=function(){return(g._findNextOnigScannerMatch=g.asm.findNextOnigScannerMatch).apply(null,arguments)},g._findNextOnigScannerMatchDbg=function(){return(g._findNextOnigScannerMatchDbg=g.asm.findNextOnigScannerMatchDbg).apply(null,arguments)},g.stackSave=function(){return(g.stackSave=g.asm.stackSave).apply(null,arguments)},g.stackRestore=function(){return(g.stackRestore=g.asm.stackRestore).apply(null,arguments)},g.stackAlloc=function(){return(g.stackAlloc=g.asm.stackAlloc).apply(null,arguments)},g.dynCall_jiji=function(){return(g.dynCall_jiji=g.asm.dynCall_jiji).apply(null,arguments)},g.UTF8ToString=function(A,B){return A?h(c,A,B):""},N=function A(){S||l(),S||(N=A)},g.preInit)for("function"==typeof g.preInit&&(g.preInit=[g.preInit]);g.preInit.length>0;)g.preInit.pop()();return l(),A.ready});let zA=null;class _A{static _utf8ByteLength(A){let B=0;for(let Q=0,g=A.length;Q=55296&&E<=56319&&Q+1=56320&&B<=57343&&(C=65536+(E-55296<<10)|B-56320,I=!0)}B+=C<=127?1:C<=2047?2:C<=65535?3:4,I&&Q++}return B}constructor(A){const B=A.length,Q=_A._utf8ByteLength(A),g=Q!==B,E=g?new Uint32Array(B+1):null;g&&(E[B]=Q);const C=g?new Uint32Array(Q+1):null;g&&(C[Q]=B);const I=new Uint8Array(Q);let D=0;for(let Q=0;Q=55296&&w<=56319&&Q+1=56320&&B<=57343&&(o=65536+(w-55296<<10)|B-56320,s=!0)}g&&(E[Q]=D,s&&(E[Q+1]=D),o<=127?C[D+0]=Q:o<=2047?(C[D+0]=Q,C[D+1]=Q):o<=65535?(C[D+0]=Q,C[D+1]=Q,C[D+2]=Q):(C[D+0]=Q,C[D+1]=Q,C[D+2]=Q,C[D+3]=Q)),o<=127?I[D++]=o:o<=2047?(I[D++]=192|(1984&o)>>>6,I[D++]=128|(63&o)>>>0):o<=65535?(I[D++]=224|(61440&o)>>>12,I[D++]=128|(4032&o)>>>6,I[D++]=128|(63&o)>>>0):(I[D++]=240|(1835008&o)>>>18,I[D++]=128|(258048&o)>>>12,I[D++]=128|(4032&o)>>>6,I[D++]=128|(63&o)>>>0),s&&Q++}this.utf16Length=B,this.utf8Length=Q,this.utf16Value=A,this.utf8Value=I,this.utf16OffsetToUtf8=E,this.utf8OffsetToUtf16=C}createString(A){const B=A._omalloc(this.utf8Length);return A.HEAPU8.set(this.utf8Value,B),B}}class $A{constructor(A){if(this.id=++$A.LAST_ID,!zA)throw new Error("Must invoke loadWASM first.");this._onigBinding=zA,this.content=A;const B=new _A(A);this.utf16Length=B.utf16Length,this.utf8Length=B.utf8Length,this.utf16OffsetToUtf8=B.utf16OffsetToUtf8,this.utf8OffsetToUtf16=B.utf8OffsetToUtf16,this.utf8Length<1e4&&!$A._sharedPtrInUse?($A._sharedPtr||($A._sharedPtr=zA._omalloc(1e4)),$A._sharedPtrInUse=!0,zA.HEAPU8.set(B.utf8Value,$A._sharedPtr),this.ptr=$A._sharedPtr):this.ptr=B.createString(zA)}convertUtf8OffsetToUtf16(A){return this.utf8OffsetToUtf16?A<0?0:A>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[A]:A}convertUtf16OffsetToUtf8(A){return this.utf16OffsetToUtf8?A<0?0:A>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[A]:A}dispose(){this.ptr===$A._sharedPtr?$A._sharedPtrInUse=!1:this._onigBinding._ofree(this.ptr)}}$A.LAST_ID=0,$A._sharedPtr=0,$A._sharedPtrInUse=!1;class AB{constructor(A){if(!zA)throw new Error("Must invoke loadWASM first.");const B=[],Q=[];for(let g=0,E=A.length;gWebAssembly.instantiateStreaming(A,B)}(g):function(A){return async B=>{const Q=await A.arrayBuffer();return WebAssembly.instantiate(Q,B)}}(g):function(A){return B=>WebAssembly.instantiate(A,B)}(g)}return QB=new Promise(((A,B)=>{g=A,E=B})),function(A,B,Q,g){VA({print:B,instantiateWasm:(B,Q)=>{if("undefined"==typeof performance){const A=()=>Date.now();B.env.emscripten_get_now=A,B.wasi_snapshot_preview1.emscripten_get_now=A}return A(B).then((A=>Q(A.instance)),g),{}}}).then((A=>{zA=A,Q()}))}(B,Q,g,E),QB}function EB(A){return new $A(A)}function CB(A){return new AB(A)}function IB(A){const B=F[A];if(!B)return;const{id:Q}=G[B];return{id:Q,scopeName:B}}const DB=new Map;let wB,oB;async function sB(A){if(DB.has(A))return DB.get(A);const B=function(A){return G[A]}(A);if(!B)return Promise.resolve(void 0);let Q;if(void 0===wB&&(Q=eB(B.path),wB=Q.then((()=>!0)).catch((()=>!1))),void 0===oB&&(oB=await wB),oB){const g=Q||eB(B.path);return DB.set(A,g),g}const E=g(`grammars/${B.id}`);B.embeddedScopes.forEach((A=>{if(!DB.has(A)){const B=E.then((B=>B.find((B=>B.scopeName===A))));DB.set(A,B)}}));const C=E.then((B=>B.find((B=>B.scopeName===A))));return DB.set(A,C),C}async function eB(A){return await Q("grammars",A)}const cB=30720,iB=16744448,tB=16775168,MB=11,hB=15,aB={NotSet:-1,None:0,Italic:1,Bold:2,Underline:4,Strikethrough:8};function nB(A,B,Q,g){const{tokens:E,ruleStack:C}=A.tokenizeLine2(Q,B),I=[];let D=Q.length;for(let A=E.length-2;A>=0;A-=2){const B=E[A],g=E[A+1],C=Q.slice(B,D);I.unshift({content:C,metadata:g}),D=B}let w=[];if(null==g?void 0:g.preserveWhitespace)w=I;else for(let A=0;A0?w[w.length-1].content+=B.content:A{const{rawTokens:E,nextStack:C}=nB(B,g,A,{preserveWhitespace:!0}),I=E.map((({content:A,metadata:B})=>({content:A,style:FB(B,Q)}))),D=function(A,B,Q,g){const{tokens:E}=Q.tokenizeLine(A,B),C=[];for(let B=0;B{if(w+=A.content.length,Q>>hB]},g=(A&cB)>>>MB;return g&aB.Italic&&(Q.fontStyle="italic"),g&aB.Bold&&(Q.fontWeight="bold"),g&aB.Underline&&(Q.textDecoration="underline"),g&aB.Strikethrough&&(Q.textDecoration="line-through"),Q}var GB=function(A){var B=null;if("undefined"!=typeof process&&null!=process.versions&&null!=process.versions.node)B=Buffer.from(A,"base64");else{var Q=globalThis.atob(A),g=Q.length;B=new Uint8Array(new ArrayBuffer(g));for(var E=0;E({createOnigScanner:CB,createOnigString:EB})));NB=new jA({onigLib:A,loadGrammar:A=>sB(A)})}const B=A.filter((A=>!LB(A))).map((A=>{const B=IB(A);if(!B)throw new RB(A);return NB.loadGrammar(B.scopeName)}));return Promise.all(B)}function kB(A){if(LB(A))return{langId:A,grammar:null};const B=IB(A);if(!B)throw new RB(A);const Q=function(A){const{_syncRegistry:B}=NB;return null==B?void 0:B._grammars.get(A)}(B.scopeName);if(!Q)throw new Error(`Syntax highlighting error: grammar for ${A} not loaded`);return{langId:B.id,grammar:Q}}class RB extends Error{constructor(A){super(`Unknown language: ${A}`),this.alias=A}}function KB(A,B,Q){NB.setTheme(Q);const g=function(A){const B=NB.getColorMap();return A.colorNames?B.map((B=>Object.keys(A.colorNames).find((Q=>A.colorNames[Q].toUpperCase()===B.toUpperCase()))||B)):B}(Q);return function(A,B,Q){let g=null;return A.split(/\r?\n|\r/g).map((A=>{const{rawTokens:E,nextStack:C}=nB(B,g,A);return g=C,E.map((({content:A,metadata:B})=>({content:A,style:FB(B,Q)})))}))}(A,B,g)}function YB(A){return A.split(/\r?\n|\r/g).map((A=>[{content:A,style:{}}]))}function UB(A,B){return PB(A.slice(1,-1)).map((A=>{const{from:Q,to:g}=uB(A);return{lineNumber:B,fromColumn:Q,toColumn:g}}))}function uB(A){const[B,Q]=A.split(":");if(!yB(B))throw new JB(B);const g=Number(B);if(g<1)throw new SB;if(Q){if(!yB(Q))throw new JB(Q);return{from:g,to:+Q}}return{from:g,to:g}}function PB(A){return A.split(/,(?![^\[]*\])/g)}function yB(A){A=A.toString();var B=Math.abs(A),Q=parseInt(A,10);return!isNaN(B)&&Q===B&&B.toString()===A}class JB extends Error{constructor(A){super(`Invalid number "${A}" in range string`),this.number=A,Object.setPrototypeOf(this,new.target.prototype)}}class SB extends Error{constructor(){super("Invalid line or column number in range string"),Object.setPrototypeOf(this,new.target.prototype)}}const pB="#001",lB="#010",dB={name:"comments",type:"light",foreground:"",background:"",colors:{},settings:[{settings:{foreground:"#000"}},{scope:["punctuation.definition.comment"],settings:{foreground:pB}},{scope:"comment",settings:{foreground:lB}}]};function fB(A,B,Q,g){const E=B?KB(A,B,dB):YB(A),C=[];let I=1;const D=E.map((A=>{const{annotations:B,lineWithoutComments:E}=function(A,B,Q){if(!A.some((A=>A.style.color===pB)))return{annotations:[],lineWithoutComments:A};const g=[];let E=0;for(;E!A.tokens.includes(B)));C.every((A=>""===A.content.trim()))&&(C=null);return{annotations:g.map((A=>({name:A.name,query:A.query,lineNumber:A.lineNumber,rangeString:A.rangeString}))),lineWithoutComments:C}}(A,g,I);if(C.push(...B),!E)return null;const D=E.map((A=>A.content)).join("");return["mdx","jsx","tsx"].includes(Q)&&B.length>0&&"{}"===D.trim()?null:(I++,D)})).filter((A=>null!==A)).join("\n"),w=C.map((A=>{var{rangeString:B,lineNumber:Q}=A,g=function(A,B){var Q={};for(var g in A)Object.prototype.hasOwnProperty.call(A,g)&&B.indexOf(g)<0&&(Q[g]=A[g]);if(null!=A&&"function"==typeof Object.getOwnPropertySymbols){var E=0;for(g=Object.getOwnPropertySymbols(A);EA.ranges.length>0));return{newCode:D,annotations:w}}function xB(A,B,Q){return A&&A.startsWith("(/")?function(A,B,Q){const g=B.match(/\(\/([\s\S]*?)\/([gimuy]*)\)/);if(!g)throw new Error(`Invalid RegExp string: ${B}`);const E=new RegExp(g[1],g[2]),C=A.split(/\r?\n/).slice(Q-1).join("\n");if(!E.global){const A=E.exec(C);if(!A)return[];const B=C.slice(0,A.index).split("\n").length+Q-1;return[{fromLineNumber:B,toLineNumber:B+A[0].split("\n").length-1}]}let I;const D=[];for(;I=E.exec(C);){const A=C.slice(0,I.index).split("\n").length+Q-1,B=A+I[0].split("\n").length-1,g=D[D.length-1];g&&g.fromLineNumber===A||D.push({fromLineNumber:A,toLineNumber:B})}return D}(Q,A,B):A&&A.startsWith("[/")?function(A,B,Q){const g=B.match(/\[\/([\s\S]*?)\/([gimuy]*)\]/);if(!g)throw new Error(`Invalid RegExp string: ${B}`);let E=g[2]||"";E+="d";const C=new RegExp(g[1],E);let I=A.split(/\r?\n/);I=I.slice(Q-1),C.multiline||(I=[I[0]]);const D=[];return I.forEach(((A,B)=>{if(!C.global){if(D.length>0)return;const g=C.exec(A);if(!g)return;const E=g.indices[1]||g.indices[0];return void D.push({lineNumber:B+Q,fromColumn:E[0]+1,toColumn:E[1]})}let g;for(;g=C.exec(A);){const A=g.indices[1]||g.indices[0];D.push({lineNumber:B+Q,fromColumn:A[0]+1,toColumn:A[1]})}})),D}(Q,A,B):function(A,B){return A?A.startsWith("[")?UB(A,B):PB(A.slice(1,-1)).map((A=>{if(A.includes("[")){const[Q,g]=A.split("["),E=Number(Q),C=B+E-1;if(!yB(C))throw new JB(Q);return UB("["+g,C)}const{from:Q,to:g}=uB(A);return[{fromLineNumber:Q+B-1,toLineNumber:g+B-1}]})).flat():[{fromLineNumber:B,toLineNumber:B}]}(A,B)}function mB(A,B){var Q;const g=A.match(/\s*([\w-]+)?(\([^\)]*\)|\[[^\]]*\])?(.*)$/),E=g[1],C=g[2],I=null===(Q=g[3])||void 0===Q?void 0:Q.trim();return B.includes(E)?{name:E,rangeString:C,query:I}:null}function OB(A,B){let Q=[],g=1;return A.forEach((A=>{Q.push({fromColumn:g,toColumn:g+A.content.length-1,token:A}),g+=A.content.length})),B.forEach((A=>{Q=function(A,B){const{range:Q}=B,{fromColumn:g,toColumn:E}=Q,C=[];let I=0;for(;IE){const[A,Q]=bB(B,E+1);D.tokens.push(A),C.push(Q)}else D.tokens.push(B);I++}else C.push(D);for(;IqB(A)))}function qB(A){return"tokens"in A?{annotationName:A.annotationName,annotationQuery:A.annotationQuery,fromColumn:A.fromColumn,toColumn:A.toColumn,tokens:A.tokens.map((A=>qB(A)))}:A.token}function bB(A,B){if("token"in A){const Q=Object.assign(Object.assign({},A.token),{content:A.token.content.slice(0,B-A.fromColumn)}),g=Object.assign(Object.assign({},A.token),{content:A.token.content.slice(B-A.fromColumn)});return[Object.assign(Object.assign({},A),{toColumn:B-1,token:Q}),Object.assign(Object.assign({},A),{fromColumn:B,token:g})]}{const Q=[],g=[];A.tokens.forEach((A=>{if(A.toColumn=B)g.push(A);else{const[E,C]=bB(A,B);Q.push(E),g.push(C)}}));return[Object.assign(Object.assign({},A),{toColumn:B-1,tokens:Q}),Object.assign(Object.assign({},A),{fromColumn:B,tokens:g})]}}function WB(A,B){let Q=A.map(((A,B)=>({fromLineNumber:B+1,toLineNumber:B+1,line:A})));return B.forEach((A=>{Q=function(A,B){const{range:Q,name:g,query:E}=B,{fromLineNumber:C,toLineNumber:I}=Q,D=[];let w=0;for(;wI){const[A,Q]=vB(B,I+1);o.lines.push(A),D.push(Q)}else o.lines.push(B);w++}else D.push(o);for(;wTB(A)))}function TB(A){return"line"in A?{lineNumber:A.fromLineNumber,tokens:A.line.tokens}:{annotationName:A.annotationName,annotationQuery:A.annotationQuery,fromLineNumber:A.fromLineNumber,toLineNumber:A.toLineNumber,lines:A.lines.map((A=>TB(A)))}}function vB(A,B){if("line"in A)return[Object.assign(Object.assign({},A),{toLineNumber:B-1}),Object.assign(Object.assign({},A),{fromLineNumber:B})];{const Q=[],g=[];return A.lines.forEach((A=>{if(A.toLineNumber=B)g.push(A);else{const[E,C]=vB(A,B);Q.push(E),g.push(C)}})),[Object.assign(Object.assign({},A),{toLineNumber:B-1,lines:Q}),Object.assign(Object.assign({},A),{fromLineNumber:B,lines:g})]}}function XB(A,B){const{inlineAnnotations:Q,multilineAnnotations:g}=function(A){const B=[],Q=[];return A.forEach((A=>{A.ranges.forEach((g=>{"lineNumber"in g?B.push(Object.assign(Object.assign({},A),{range:g})):Q.push(Object.assign(Object.assign({},A),{range:g}))}))})),{inlineAnnotations:B,multilineAnnotations:Q}}(B);return WB(A.map(((A,B)=>{const g=Q.filter((A=>A.range.lineNumber===B+1));return{lineNumber:B+1,tokens:OB(A,g)}})),g)}var ZB=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],jB={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",9:"strikethrough"};function VB(A,B){const Q=A.indexOf("[",B);if(-1!==Q){const B=A.indexOf("m",Q);return{sequence:A.substring(Q+2,B).split(";"),startPosition:Q,position:B+1}}return{position:A.length}}function zB(A,B){let Q=1;const g=A[B+Q++];let E;if("2"===g){const g=[A[B+Q++],A[B+Q++],A[B+Q]].map((A=>Number.parseInt(A)));3!==g.length||g.some((A=>Number.isNaN(A)))||(E={type:"rgb",rgb:g})}else if("5"===g){const g=Number.parseInt(A[B+Q]);Number.isNaN(g)||(E={type:"table",index:Number(g)})}return[Q,E]}function _B(A){const B=[];for(let Q=0;Q=90&&E<=97?B.push({type:"setForegroundColor",value:{type:"named",name:ZB[E-90+8]}}):E>=100&&E<=107&&B.push({type:"setBackgroundColor",value:{type:"named",name:ZB[E-100+8]}})}return B}function $B(A,B){const Q=function(){let A=null,B=null,Q=new Set;return{parse(g){const E=[];let C=0;do{const I=VB(g,C),D=I.sequence?g.substring(C,I.startPosition):g.substring(C);if(D.length>0&&E.push({value:D,foreground:A,background:B,decorations:new Set(Q)}),I.sequence){const g=_B(I.sequence);for(const E of g)"resetAll"===E.type?(A=null,B=null,Q.clear()):"resetForegroundColor"===E.type?A=null:"resetBackgroundColor"===E.type?B=null:"resetDecoration"===E.type&&Q.delete(E.value);for(const E of g)"setForegroundColor"===E.type?A=E.value:"setBackgroundColor"===E.type?B=E.value:"setDecoration"===E.type&&Q.add(E.value)}C=I.position}while(Cfunction(A,B,Q){const g=A.parse(B),E=g.map((({value:A,foreground:B,background:g,decorations:E})=>{const C=AQ(B,Q),I={};C&&(I.color=C);const D=AQ(g,Q);return D&&(I.background=D),E.has("bold")&&(I.fontWeight="bold"),E.has("italic")&&(I.fontStyle="italic"),E.has("underline")&&(I.textDecoration="underline"),E.has("strikethrough")&&(I.textDecoration="line-through"),E.has("reverse")&&(I.color=D,I.background=C),E.has("dim")&&(I.opacity=.5),{content:A,style:I}}));return E}(Q,A,B)));return g}function AQ(A,B){if(A){if("named"===A.type){return o(B,"terminal.ansi"+(A.name[0].toUpperCase()+A.name.slice(1)))}if("rgb"===A.type){const[B,Q,g]=A.rgb;return`rgb(${B}, ${Q}, ${g})`}}}async function BQ(A,B){await Promise.all([HB(A),t(B)])}function QQ(A,B,Q="dark-plus",g={}){const E=A||"",C=B||"text";if("string"!=typeof E)throw new Error("Syntax highlighter error: code must be a string");if("string"!=typeof C)throw new Error("Syntax highlighter error: lang must be a string");const{langId:I,grammar:D}=kB(C),w=M(Q),s="text"==I?YB(E):"terminal"==I?$B(E,w):(null==g?void 0:g.scopes)?function(A,B,Q){return NB.setTheme(Q),rB(A,B,NB.getColorMap())}(E,D,w):KB(E,D,w),e="terminal"==I?function(A){return{color:o(A,"terminal.foreground"),background:o(A,"terminal.background")}}(w):{color:w.foreground,background:w.background};if(function(A){return"annotations"in A}(g)){return{lines:XB(s,(null==g?void 0:g.annotations)||[]),lang:I,style:e}}return{lines:s,lang:I,style:e}}exports.LANG_NAMES=["abap","actionscript-3","ada","apache","apex","apl","applescript","ara","asm","astro","awk","ballerina","bash","bat","batch","be","beancount","berry","bibtex","bicep","blade","c","c#","cadence","cdc","clarity","clj","clojure","cmake","cmd","cobol","codeql","coffee","console","cpp","crystal","cs","csharp","css","cue","cypher","d","dart","dax","diff","docker","dockerfile","dream-maker","elixir","elm","erb","erl","erlang","f#","fish","fs","fsharp","fsl","gdresource","gdscript","gdshader","gherkin","git-commit","git-rebase","glimmer-js","glimmer-ts","glsl","gnuplot","go","graphql","groovy","hack","haml","handlebars","haskell","hbs","hcl","hjson","hlsl","hs","html","http","imba","ini","jade","java","javascript","jinja-html","jison","js","json","json5","jsonc","jsonl","jsonnet","jssm","jsx","julia","kotlin","kql","kusto","latex","less","liquid","lisp","logo","lua","make","makefile","markdown","marko","matlab","md","mdx","mermaid","narrat","nextflow","nginx","nim","nix","objc","objective-c","objective-cpp","ocaml","pascal","perl","perl6","php","plsql","postcss","powerquery","powershell","prisma","prolog","properties","proto","ps","ps1","pug","puppet","purescript","py","python","ql","r","raku","razor","rb","reg","rel","riscv","rs","rst","ruby","rust","sas","sass","scala","scheme","scss","sh","shader","shaderlab","shell","shellscript","shellsession","smalltalk","solidity","sparql","sql","ssh-config","stata","styl","stylus","svelte","swift","system-verilog","tasl","tcl","terminal","tex","text","toml","ts","tsx","turtle","twig","txt","typescript","v","vb","verilog","vhdl","vim","viml","vimscript","vue","vue-html","vyper","wasm","wenyan","wgsl","wolfram","xml","xsl","yaml","yml","zenscript","zsh","文言"],exports.THEME_NAMES=a,exports.UnknownLanguageError=RB,exports.UnknownThemeError=n,exports.extractAnnotations=async function(A,B,Q){if(!Q)return{code:A,annotations:[]};await HB([B]);const{grammar:g}=kB(B),{newCode:E,annotations:C}=fB(A,g,B,Q);return{code:E,annotations:C}},exports.getThemeColors=async function(A){if(!A)throw new Error("Syntax highlighter error: undefined theme");return await BQ([],A),r(M(A))},exports.getThemeColorsSync=function(A){if(!A)throw new Error("Syntax highlighter error: undefined theme");return r(M(A))},exports.highlight=async function(A,B,Q="dark-plus",g={}){const E=A||"",C=B||"text";if("string"!=typeof E)throw new Error("Syntax highlighter error: code must be a string");if("string"!=typeof C)throw new Error("Syntax highlighter error: lang must be a string");return await BQ([C],Q),QQ(E,C,Q,g)},exports.highlightSync=QQ,exports.preload=BQ; diff --git a/lib/dist/index.esm.mjs b/lib/dist/index.esm.mjs index 6493707..e2abd91 100644 --- a/lib/dist/index.esm.mjs +++ b/lib/dist/index.esm.mjs @@ -1 +1 @@ -function A(A,B){var Q=require("fs"),g=require("path"),E=g.parse,C=require("os");var I=function(A,B){var Q="/";/^([A-Za-z]:)/.test(A)?Q="":/^\\\\/.test(A)&&(Q="\\\\");for(var C=[A],I=E(A);I.dir!==C[C.length-1];)C.push(I.dir),I=E(I.dir);return C.reduce((function(A,E){return A.concat(B.map((function(A){return g.resolve(Q,E,A)})))}),[])};const D=C.homedir||function(){var A=process.env.HOME,B=process.env.LOGNAME||process.env.USER||process.env.LNAME||process.env.USERNAME;return"win32"===process.platform?process.env.USERPROFILE||process.env.HOMEDRIVE+process.env.HOMEPATH||A||null:"darwin"===process.platform?A||(B?"/Users/"+B:null):"linux"===process.platform?A||(0===process.getuid()?"/root":B?"/home/"+B:null):A||null};var w="win32"!==process.platform&&Q.realpathSync&&"function"==typeof Q.realpathSync.native?Q.realpathSync.native:Q.realpathSync,o=D(),s=function(A,B,Q){return Q&&!1===Q.preserveSymlinks?A(B):B},e=function(A,B,Q){for(var E=function(A,B,Q){var g=B&&B.moduleDirectory?[].concat(B.moduleDirectory):["node_modules"];if(B&&"function"==typeof B.paths)return B.paths(Q,A,(function(){return I(A,g)}),B);var E=I(A,g);return B&&B.paths?E.concat(B.paths):E}(B,Q,A),C=0;CA.promises)),E=await import("path"),{URL:C}=await import("url"),I=new C(".",import.meta.url).pathname;try{let A=E.resolve(I,"..",B),C=E.resolve(A,Q);const D=await g.readFile(C,"utf8");if(!D)throw new Error("no results");return JSON.parse(D)}catch(C){const D=A("@code-hike/lighter",{basedir:I});let w=E.resolve(D,"..","..",B),o=E.resolve(w,Q);return JSON.parse(await g.readFile(o,"utf8"))}}async function Q(A){if("function"==typeof fetch){const B=await fetch(`https://lighter.codehike.org/${A}.json`);return await B.json()}const B=await import("https"),Q={host:"lighter.codehike.org",path:`/${A}.json`,method:"GET"};return new Promise(((A,g)=>{const E=B.request(Q,(B=>{let Q="";B.on("data",(A=>{Q+=A})),B.on("end",(()=>{A(JSON.parse(Q))}))}));E.on("error",(A=>{g(A)})),E.end()}))}const g=A=>/^#([A-Fa-f0-9]{3,4}){1,2}$/.test(A),E=(A,B)=>A.match(new RegExp(`.{${B}}`,"g")),C=A=>parseInt(A.repeat(2/A.length),16);function I(A,B){return void 0!==A?A/255:"number"!=typeof B||B<0||B>1?1:B}function D(A,B){if(!A)return A;const{r:Q,g:D,b:w,a:o}=function(A){if(!A)return;if(!g(A))throw new Error("Invalid color string, must be a valid hex color");const B=Math.floor((A.length-1)/3),Q=E(A.slice(1),B),[D,w,o,s]=Q.map(C);return{r:D,g:w,b:o,a:I(s,1)}}(A);return function(A){if(!A)return;const{r:B,g:Q,b:g,a:E}=A,C=Math.round(255*E);return`#${B.toString(16).padStart(2,"0")}${Q.toString(16).padStart(2,"0")}${g.toString(16).padStart(2,"0")}${C.toString(16).padStart(2,"0")}`}({r:Q,g:D,b:w,a:o*B})}function w(A,B){const Q=A.colors||{};if(Q[B])return Q[B];const g=s[B];if(!g)throw new Error(`Unknown theme color key: ${B}`);return"string"==typeof g?w(A,g):function(A,B){const Q=B[A.type];if(Array.isArray(Q)){const[B,g,...E]=Q;return B(w(A,g),...E)}return Q}(A,g)}const o="#6FC3DF",s={"editor.foreground":{dark:"#bbbbbb",light:"#333333",hc:"#ffffff"},"editorLineNumber.foreground":{dark:"#858585",light:"#237893",hc:"#fffffe"},"editor.selectionBackground":{light:"#ADD6FF",dark:"#264F78",hc:"#f3f518"},"editor.background":{light:"#fffffe",dark:"#1E1E1E",hc:"#000000"},"editorGroupHeader.tabsBackground":{dark:"#252526",light:"#F3F3F3"},"tab.activeBackground":"editor.background","tab.activeForeground":{dark:"#ffffff",light:"#333333",hc:"#ffffff"},"tab.border":{dark:"#252526",light:"#F3F3F3",hc:o},"tab.activeBorder":"tab.activeBackground","tab.inactiveBackground":{dark:"#2D2D2D",light:"#ECECEC"},"tab.inactiveForeground":{dark:[D,"tab.activeForeground",.5],light:[D,"tab.activeForeground",.5],hc:"#ffffff"},"diffEditor.insertedTextBackground":{dark:"#9ccc2c33",light:"#9ccc2c40"},"diffEditor.removedTextBackground":{dark:"#ff000033",light:"#ff000033"},"diffEditor.insertedLineBackground":{dark:"#9bb95533",light:"#9bb95533"},"diffEditor.removedLineBackground":{dark:"#ff000033",light:"#ff000033"},"icon.foreground":{dark:"#C5C5C5",light:"#424242",hc:"#FFFFFF"},"sideBar.background":{dark:"#252526",light:"#F3F3F3",hc:"#000000"},"sideBar.foreground":"editor.foreground","sideBar.border":"sideBar.background","list.inactiveSelectionBackground":{dark:"#37373D",light:"#E4E6F1"},"list.inactiveSelectionForeground":{},"list.hoverBackground":{dark:"#2A2D2E",light:"#F0F0F0"},"list.hoverForeground":{},"editorGroupHeader.tabsBorder":{hc:o},"tab.activeBorderTop":{hc:o},"tab.hoverBackground":"tab.inactiveBackground","tab.hoverForeground":"tab.inactiveForeground","editor.rangeHighlightBackground":{dark:"#ffffff0b",light:"#fdff0033"},"editor.infoForeground":{dark:"#3794FF",light:"#1a85ff",hc:"#3794FF"},"input.border":{hc:o},"input.background":{dark:"#3C3C3C",light:"#fffffe",hc:"#000000"},"input.foreground":"editor.foreground","editor.lineHighlightBackground":{},focusBorder:{light:"#0090F1",dark:"#007FD4",hc:o},"editorGroup.border":{dark:"#444444",light:"#E7E7E7",hc:o},"list.activeSelectionBackground":{dark:"#094771",light:"#0060C0",hc:"#000000"},"list.activeSelectionForeground":{dark:"#fffffe",light:"#fffffe",hc:"#fffffe"},"lighter.inlineBackground":{dark:[D,"editor.background",.9],light:[D,"editor.background",.9]},"terminal.background":"editor.background","terminal.foreground":"editor.foreground","terminal.ansiBlack":{dark:"#000000",light:"#000000",hc:"#000000"},"terminal.ansiRed":{dark:"#cd3131",light:"#cd3131",hc:"#cd0000"},"terminal.ansiGreen":{dark:"#0DBC79",light:"#00BC00",hc:"#00cd00"},"terminal.ansiYellow":{dark:"#e5e510",light:"#949800",hc:"#cdcd00"},"terminal.ansiBlue":{dark:"#2472c8",light:"#0451a5",hc:"#0000ee"},"terminal.ansiMagenta":{dark:"#bc3fbc",light:"#bc05bc",hc:"#cd00cd"},"terminal.ansiCyan":{dark:"#11a8cd",light:"#0598bc",hc:"#00cdcd"},"terminal.ansiWhite":{dark:"#e5e5e5",light:"#555555",hc:"#e5e5e5"},"terminal.ansiBrightBlack":{dark:"#666666",light:"#666666",hc:"#7f7f7f"},"terminal.ansiBrightRed":{dark:"#f14c4c",light:"#cd3131",hc:"#ff0000"},"terminal.ansiBrightGreen":{dark:"#23d18b",light:"#14CE14",hc:"#00ff00"},"terminal.ansiBrightYellow":{dark:"#f5f543",light:"#b5ba00",hc:"#ffff00"},"terminal.ansiBrightBlue":{dark:"#3b8eea",light:"#0451a5",hc:"#5c5cff"},"terminal.ansiBrightMagenta":{dark:"#d670d6",light:"#bc05bc",hc:"#ff00ff"},"terminal.ansiBrightCyan":{dark:"#29b8db",light:"#0598bc",hc:"#00ffff"},"terminal.ansiBrightWhite":{dark:"#e5e5e5",light:"#a5a5a5",hc:"#ffffff"}},e=new Map,c=new Map;async function i(A){if("string"==typeof A){const g=A;if(!a.includes(g))throw new h(g);if(!e.has(g)){const A=async function(A){try{return await B("themes",A+".json")}catch(B){return await Q(`themes/${A}`)}}(g).then((A=>(c.set(g,A),A)));e.set(g,A)}return e.get(g)}return A}function t(A){let B=null;if("string"==typeof A){if(B=c.get(A),!B)throw new Error("Syntax highlighting error: theme not loaded")}else B=A;return function(A){if(!A)return;const B=A.settings||A.tokenColors||[],Q={name:A.name||"unknown-theme",type:M(A),foreground:"",background:"",settings:B,colors:A.colors||{},colorNames:A.colorNames},g=B.find((A=>!A.scope));if(g){const{foreground:A,background:B}=(null==g?void 0:g.settings)||{},E={};A&&!Q.colors["editor.foreground"]&&(E["editor.foreground"]=A),B&&!Q.colors["editor.background"]&&(E["editor.background"]=B),Object.keys(E).length>0&&(Q.colors=Object.assign(Object.assign({},Q.colors),E)),Q.foreground=A,Q.background=B}g||(Q.settings=[{settings:{foreground:w(Q,"editor.foreground"),background:w(Q,"editor.background")}},...Q.settings]);if(Q.background=Q.background||w(Q,"editor.background"),Q.foreground=Q.foreground||w(Q,"editor.foreground"),"from-css"===A.type&&!Q.colorNames){const A={};let B=0;Q.settings=Q.settings.map((Q=>{const g=Object.assign(Object.assign({},Q),{settings:Object.assign({},Q.settings)}),{foreground:E,background:C}=g.settings||{};return E&&!A[E]&&(A[E]=`#${B.toString(16).padStart(6,"0")}`,B++),C&&!A[C]&&(A[C]=`#${B.toString(16).padStart(6,"0")}`,B++),E&&(g.settings.foreground=A[E]),C&&(g.settings.background=A[C]),g})),Q.colorNames=A}return Q}(B)}function M(A){var B;if("from-css"===A.type)return"from-css";return"light"===(A.type?A.type:(null===(B=A.name)||void 0===B?void 0:B.toLowerCase().includes("light"))?"light":"dark")?"light":"dark"}const a=["dark-plus","dracula-soft","dracula","github-dark","github-dark-dimmed","github-from-css","github-light","light-plus","material-darker","material-default","material-from-css","material-lighter","material-ocean","material-palenight","min-dark","min-light","monokai","nord","one-dark-pro","poimandres","slack-dark","slack-ochin","solarized-dark","solarized-light"];class h extends Error{constructor(A){super(`Unknown theme: ${A}`),this.theme=A}}function n(A){const B=B=>"colorScheme"===B?function(A){return"from-css"===A.type?"var(--ch-0)":A.type}(A):"foreground"===B?A.foreground:"background"===B?A.background:w(A,B);return{colorScheme:B("colorScheme"),foreground:B("foreground"),background:B("background"),lighter:{inlineBackground:B("lighter.inlineBackground")},editor:{background:B("editor.background"),foreground:B("editor.foreground"),lineHighlightBackground:B("editor.lineHighlightBackground"),rangeHighlightBackground:B("editor.rangeHighlightBackground"),infoForeground:B("editor.infoForeground"),selectionBackground:B("editor.selectionBackground")},focusBorder:B("focusBorder"),tab:{activeBackground:B("tab.activeBackground"),activeForeground:B("tab.activeForeground"),inactiveBackground:B("tab.inactiveBackground"),inactiveForeground:B("tab.inactiveForeground"),border:B("tab.border"),activeBorder:B("tab.activeBorder"),activeBorderTop:B("tab.activeBorderTop")},editorGroup:{border:B("editorGroup.border")},editorGroupHeader:{tabsBackground:B("editorGroupHeader.tabsBackground")},editorLineNumber:{foreground:B("editorLineNumber.foreground")},input:{background:B("input.background"),foreground:B("input.foreground"),border:B("input.border")},icon:{foreground:B("icon.foreground")},sideBar:{background:B("sideBar.background"),foreground:B("sideBar.foreground"),border:B("sideBar.border")},list:{activeSelectionBackground:B("list.activeSelectionBackground"),activeSelectionForeground:B("list.activeSelectionForeground"),hoverBackground:B("list.hoverBackground"),hoverForeground:B("list.hoverForeground")}}}const F=["abap","actionscript-3","ada","apache","apex","apl","applescript","ara","asm","astro","awk","ballerina","bash","bat","batch","be","beancount","berry","bibtex","bicep","blade","c","c#","cadence","cdc","clarity","clj","clojure","cmake","cmd","cobol","codeql","coffee","console","cpp","crystal","cs","csharp","css","cue","cypher","d","dart","dax","diff","docker","dockerfile","dream-maker","elixir","elm","erb","erl","erlang","f#","fish","fs","fsharp","fsl","gdresource","gdscript","gdshader","gherkin","git-commit","git-rebase","glimmer-js","glimmer-ts","glsl","gnuplot","go","graphql","groovy","hack","haml","handlebars","haskell","hbs","hcl","hjson","hlsl","hs","html","http","imba","ini","jade","java","javascript","jinja-html","jison","js","json","json5","jsonc","jsonl","jsonnet","jssm","jsx","julia","kotlin","kql","kusto","latex","less","liquid","lisp","logo","lua","make","makefile","markdown","marko","matlab","md","mdx","mermaid","narrat","nextflow","nginx","nim","nix","objc","objective-c","objective-cpp","ocaml","pascal","perl","perl6","php","plsql","postcss","powerquery","powershell","prisma","prolog","properties","proto","ps","ps1","pug","puppet","purescript","py","python","ql","r","raku","razor","rb","reg","rel","riscv","rs","rst","ruby","rust","sas","sass","scala","scheme","scss","sh","shader","shaderlab","shell","shellscript","shellsession","smalltalk","solidity","sparql","sql","ssh-config","stata","styl","stylus","svelte","swift","system-verilog","tasl","tcl","terminal","tex","text","toml","ts","tsx","turtle","twig","txt","typescript","v","vb","verilog","vhdl","vim","viml","vimscript","vue","vue-html","vyper","wasm","wenyan","wgsl","wolfram","xml","xsl","yaml","yml","zenscript","zsh","文言"],G={abap:"source.abap","actionscript-3":"source.actionscript.3",ada:"source.ada",apache:"source.apacheconf",apex:"source.apex",apl:"source.apl",applescript:"source.applescript",ara:"source.ara",asm:"source.asm.x86_64",astro:"source.astro",awk:"source.awk",ballerina:"source.ballerina",bat:"source.batchfile",batch:"source.batchfile",beancount:"text.beancount",berry:"source.berry",be:"source.berry",bibtex:"text.bibtex",bicep:"source.bicep",blade:"text.html.php.blade",c:"source.c",cadence:"source.cadence",cdc:"source.cadence",clarity:"source.clar",clojure:"source.clojure",clj:"source.clojure",cmake:"source.cmake",cobol:"source.cobol",codeql:"source.ql",ql:"source.ql",coffee:"source.coffee",cpp:"source.cpp",crystal:"source.crystal",csharp:"source.cs","c#":"source.cs",cs:"source.cs",css:"source.css",cue:"source.cue",cypher:"source.cypher",d:"source.d",dart:"source.dart",dax:"source.dax",diff:"source.diff",docker:"source.dockerfile",dockerfile:"source.dockerfile","dream-maker":"source.dm",elixir:"source.elixir",elm:"source.elm",erb:"text.html.erb",erlang:"source.erlang",erl:"source.erlang",fish:"source.fish",fsharp:"source.fsharp","f#":"source.fsharp",fs:"source.fsharp",gdresource:"source.gdresource",gdscript:"source.gdscript",gdshader:"source.gdshader",gherkin:"text.gherkin.feature","git-commit":"text.git-commit","git-rebase":"text.git-rebase","glimmer-js":"source.gjs","glimmer-ts":"source.gts",glsl:"source.glsl",gnuplot:"source.gnuplot",go:"source.go",graphql:"source.graphql",groovy:"source.groovy",hack:"source.hack",haml:"text.haml",handlebars:"text.html.handlebars",hbs:"text.html.handlebars",haskell:"source.haskell",hs:"source.haskell",hcl:"source.hcl",hjson:"source.hjson",hlsl:"source.hlsl",html:"text.html.basic",http:"source.http",imba:"source.imba",ini:"source.ini",properties:"source.ini",java:"source.java",javascript:"source.js",js:"source.js","jinja-html":"text.html.jinja",jison:"source.jison",json:"source.json",json5:"source.json5",jsonc:"source.json.comments",jsonl:"source.json.lines",jsonnet:"source.jsonnet",jssm:"source.jssm",fsl:"source.jssm",jsx:"source.js.jsx",julia:"source.julia",kotlin:"source.kotlin",kusto:"source.kusto",kql:"source.kusto",latex:"text.tex.latex",less:"source.css.less",liquid:"text.html.liquid",lisp:"source.lisp",logo:"source.logo",lua:"source.lua",make:"source.makefile",makefile:"source.makefile",markdown:"text.html.markdown",md:"text.html.markdown",marko:"text.marko",matlab:"source.matlab",mdx:"source.mdx",mermaid:"source.mermaid",narrat:"source.narrat",nextflow:"source.nextflow",nginx:"source.nginx",nim:"source.nim",nix:"source.nix","objective-c":"source.objc",objc:"source.objc","objective-cpp":"source.objcpp",ocaml:"source.ocaml",pascal:"source.pascal",perl:"source.perl",php:"source.php",plsql:"source.plsql.oracle",postcss:"source.css.postcss",powerquery:"source.powerquery",powershell:"source.powershell",ps:"source.powershell",ps1:"source.powershell",prisma:"source.prisma",prolog:"source.prolog",proto:"source.proto",pug:"text.pug",jade:"text.pug",puppet:"source.puppet",purescript:"source.purescript",python:"source.python",py:"source.python",r:"source.r",raku:"source.perl.6",perl6:"source.perl.6",razor:"text.aspnetcorerazor",reg:"source.reg",rel:"source.rel",riscv:"source.riscv",rst:"source.rst",ruby:"source.ruby",rb:"source.ruby",rust:"source.rust",rs:"source.rust",sas:"source.sas",sass:"source.sass",scala:"source.scala",scheme:"source.scheme",scss:"source.css.scss",shaderlab:"source.shaderlab",shader:"source.shaderlab",shellscript:"source.shell",bash:"source.shell",console:"source.shell",sh:"source.shell",shell:"source.shell",zsh:"source.shell",shellsession:"text.shell-session",smalltalk:"source.smalltalk",solidity:"source.solidity",sparql:"source.sparql",sql:"source.sql","ssh-config":"source.ssh-config",stata:"source.stata",stylus:"source.stylus",styl:"source.stylus",svelte:"source.svelte",swift:"source.swift","system-verilog":"source.systemverilog",tasl:"source.tasl",tcl:"source.tcl",tex:"text.tex",toml:"source.toml",tsx:"source.tsx",turtle:"source.turtle",twig:"text.html.twig",txt:"source.txt",typescript:"source.ts",ts:"source.ts",v:"source.v",vb:"source.asp.vb.net",cmd:"source.asp.vb.net",verilog:"source.verilog",vhdl:"source.vhdl",viml:"source.viml",vim:"source.viml",vimscript:"source.viml","vue-html":"text.html.vue-html",vue:"source.vue",vyper:"source.vyper",wasm:"source.wat",wenyan:"source.wenyan","文言":"source.wenyan",wgsl:"source.wgsl",wolfram:"source.wolfram",xml:"text.xml",xsl:"text.xml.xsl",yaml:"source.yaml",yml:"source.yaml",zenscript:"source.zenscript"},r={"source.abap":{id:"abap",path:"abap.tmLanguage.json",embeddedScopes:[]},"source.actionscript.3":{id:"actionscript-3",path:"actionscript-3.tmLanguage.json",embeddedScopes:[]},"source.ada":{id:"ada",path:"ada.tmLanguage.json",embeddedScopes:[]},"source.apacheconf":{id:"apache",path:"apache.tmLanguage.json",embeddedScopes:[]},"source.apex":{id:"apex",path:"apex.tmLanguage.json",embeddedScopes:[]},"source.apl":{id:"apl",path:"apl.tmLanguage.json",embeddedScopes:["source.java","source.json","source.js","source.css","text.xml","text.html.basic"]},"source.applescript":{id:"applescript",path:"applescript.tmLanguage.json",embeddedScopes:[]},"source.ara":{id:"ara",path:"ara.tmLanguage.json",embeddedScopes:[]},"source.asm.x86_64":{id:"asm",path:"asm.tmLanguage.json",embeddedScopes:[]},"source.astro":{id:"astro",path:"astro.tmLanguage.json",embeddedScopes:["source.tsx","source.css.postcss","source.css.less","source.css.scss","source.css","source.sass","source.stylus","source.ts","source.js","source.json"]},"source.awk":{id:"awk",path:"awk.tmLanguage.json",embeddedScopes:[]},"source.ballerina":{id:"ballerina",path:"ballerina.tmLanguage.json",embeddedScopes:[]},"source.batchfile":{id:"bat",path:"bat.tmLanguage.json",embeddedScopes:[]},"text.beancount":{id:"beancount",path:"beancount.tmLanguage.json",embeddedScopes:[]},"source.berry":{id:"berry",path:"berry.tmLanguage.json",embeddedScopes:[]},"text.bibtex":{id:"bibtex",path:"bibtex.tmLanguage.json",embeddedScopes:[]},"source.bicep":{id:"bicep",path:"bicep.tmLanguage.json",embeddedScopes:[]},"text.html.php.blade":{id:"blade",path:"blade.tmLanguage.json",embeddedScopes:["source.java","source.css","source.json","source.js","source.sql","text.xml","text.html.basic"]},"source.c":{id:"c",path:"c.tmLanguage.json",embeddedScopes:[]},"source.cadence":{id:"cadence",path:"cadence.tmLanguage.json",embeddedScopes:[]},"source.clar":{id:"clarity",path:"clarity.tmLanguage.json",embeddedScopes:[]},"source.clojure":{id:"clojure",path:"clojure.tmLanguage.json",embeddedScopes:[]},"source.cmake":{id:"cmake",path:"cmake.tmLanguage.json",embeddedScopes:[]},"source.cobol":{id:"cobol",path:"cobol.tmLanguage.json",embeddedScopes:["source.css","source.js","source.java","text.html.basic","source.sql"]},"source.ql":{id:"codeql",path:"codeql.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.stylus","source.sass","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.tsx","source.ts","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.css.scss","source.swift","source.objc","source.css.less","source.json.comments","source.json","source.js","text.pug","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.coffee","source.clojure","source.batchfile","source.yaml","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","text.html.basic","source.css","text.html.markdown"]},"source.coffee":{id:"coffee",path:"coffee.tmLanguage.json",embeddedScopes:["source.js"]},"source.cpp":{id:"cpp",path:"cpp.tmLanguage.json",embeddedScopes:["source.c","source.sql","source.glsl"]},"source.crystal":{id:"crystal",path:"crystal.tmLanguage.json",embeddedScopes:["source.shell","source.js","source.c","source.css","source.sql","text.html.basic"]},"source.cs":{id:"csharp",path:"csharp.tmLanguage.json",embeddedScopes:[]},"source.css":{id:"css",path:"css.tmLanguage.json",embeddedScopes:[]},"source.cue":{id:"cue",path:"cue.tmLanguage.json",embeddedScopes:[]},"source.cypher":{id:"cypher",path:"cypher.tmLanguage.json",embeddedScopes:[]},"source.d":{id:"d",path:"d.tmLanguage.json",embeddedScopes:[]},"source.dart":{id:"dart",path:"dart.tmLanguage.json",embeddedScopes:[]},"source.dax":{id:"dax",path:"dax.tmLanguage.json",embeddedScopes:[]},"source.diff":{id:"diff",path:"diff.tmLanguage.json",embeddedScopes:[]},"source.dockerfile":{id:"docker",path:"docker.tmLanguage.json",embeddedScopes:[]},"source.dm":{id:"dream-maker",path:"dream-maker.tmLanguage.json",embeddedScopes:[]},"source.elixir":{id:"elixir",path:"elixir.tmLanguage.json",embeddedScopes:["source.css","source.js","text.html.basic"]},"source.elm":{id:"elm",path:"elm.tmLanguage.json",embeddedScopes:["source.c","source.glsl"]},"text.html.erb":{id:"erb",path:"erb.tmLanguage.json",embeddedScopes:["source.java","source.lua","source.shell","source.c","source.sql","text.xml","source.css","source.js","source.ruby","text.html.basic"]},"source.erlang":{id:"erlang",path:"erlang.tmLanguage.json",embeddedScopes:[]},"source.fish":{id:"fish",path:"fish.tmLanguage.json",embeddedScopes:[]},"source.fsharp":{id:"fsharp",path:"fsharp.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.stylus","source.sass","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.cs","source.tsx","source.ts","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.css.scss","source.swift","source.objc","source.css.less","source.json.comments","source.json","source.js","text.pug","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.coffee","source.clojure","source.batchfile","source.yaml","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","text.html.basic","source.css","text.html.markdown"]},"source.gdresource":{id:"gdresource",path:"gdresource.tmLanguage.json",embeddedScopes:["source.gdscript","source.gdshader"]},"source.gdscript":{id:"gdscript",path:"gdscript.tmLanguage.json",embeddedScopes:[]},"source.gdshader":{id:"gdshader",path:"gdshader.tmLanguage.json",embeddedScopes:[]},"text.gherkin.feature":{id:"gherkin",path:"gherkin.tmLanguage.json",embeddedScopes:[]},"text.git-commit":{id:"git-commit",path:"git-commit.tmLanguage.json",embeddedScopes:["source.diff"]},"text.git-rebase":{id:"git-rebase",path:"git-rebase.tmLanguage.json",embeddedScopes:["source.shell"]},"source.gjs":{id:"glimmer-js",path:"glimmer-js.tmLanguage.json",embeddedScopes:["source.yaml","source.css","text.html.basic","text.html.handlebars","source.js"]},"source.gts":{id:"glimmer-ts",path:"glimmer-ts.tmLanguage.json",embeddedScopes:["source.yaml","source.js","source.css","text.html.basic","text.html.handlebars","source.ts"]},"source.glsl":{id:"glsl",path:"glsl.tmLanguage.json",embeddedScopes:["source.c"]},"source.gnuplot":{id:"gnuplot",path:"gnuplot.tmLanguage.json",embeddedScopes:[]},"source.go":{id:"go",path:"go.tmLanguage.json",embeddedScopes:[]},"source.graphql":{id:"graphql",path:"graphql.tmLanguage.json",embeddedScopes:["source.tsx","source.js.jsx","source.ts","source.js"]},"source.groovy":{id:"groovy",path:"groovy.tmLanguage.json",embeddedScopes:[]},"source.hack":{id:"hack",path:"hack.tmLanguage.json",embeddedScopes:["source.css","source.js","source.sql","text.html.basic"]},"text.haml":{id:"haml",path:"haml.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.stylus","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.tsx","source.ts","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.css.scss","source.swift","source.objc","source.css.less","source.json.comments","source.json","text.pug","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.clojure","source.batchfile","source.yaml","text.xml.xsl","source.asp.vb.net","source.php","source.r","source.perl","source.makefile","source.java","source.ini","source.lua","source.shell","source.c","source.sql","text.xml","text.html.basic","source.css","text.html.markdown","source.coffee","source.sass","source.js","source.ruby"]},"text.html.handlebars":{id:"handlebars",path:"handlebars.tmLanguage.json",embeddedScopes:["source.yaml","source.js","source.css","text.html.basic"]},"source.haskell":{id:"haskell",path:"haskell.tmLanguage.json",embeddedScopes:[]},"source.hcl":{id:"hcl",path:"hcl.tmLanguage.json",embeddedScopes:[]},"source.hjson":{id:"hjson",path:"hjson.tmLanguage.json",embeddedScopes:[]},"source.hlsl":{id:"hlsl",path:"hlsl.tmLanguage.json",embeddedScopes:[]},"text.html.basic":{id:"html",path:"html.tmLanguage.json",embeddedScopes:["source.css","source.js"]},"source.http":{id:"http",path:"http.tmLanguage.json",embeddedScopes:["source.tsx","source.js.jsx","source.ts","source.js","source.java","source.graphql","text.xml","source.json","source.shell"]},"source.imba":{id:"imba",path:"imba.tmLanguage.json",embeddedScopes:[]},"source.ini":{id:"ini",path:"ini.tmLanguage.json",embeddedScopes:[]},"source.java":{id:"java",path:"java.tmLanguage.json",embeddedScopes:[]},"source.js":{id:"javascript",path:"javascript.tmLanguage.json",embeddedScopes:[]},"text.html.jinja":{id:"jinja-html",path:"jinja-html.tmLanguage.json",embeddedScopes:["source.css","source.js","text.html.basic"]},"source.jison":{id:"jison",path:"jison.tmLanguage.json",embeddedScopes:["source.js"]},"source.json":{id:"json",path:"json.tmLanguage.json",embeddedScopes:[]},"source.json5":{id:"json5",path:"json5.tmLanguage.json",embeddedScopes:[]},"source.json.comments":{id:"jsonc",path:"jsonc.tmLanguage.json",embeddedScopes:[]},"source.json.lines":{id:"jsonl",path:"jsonl.tmLanguage.json",embeddedScopes:[]},"source.jsonnet":{id:"jsonnet",path:"jsonnet.tmLanguage.json",embeddedScopes:[]},"source.jssm":{id:"jssm",path:"jssm.tmLanguage.json",embeddedScopes:[]},"source.js.jsx":{id:"jsx",path:"jsx.tmLanguage.json",embeddedScopes:[]},"source.julia":{id:"julia",path:"julia.tmLanguage.json",embeddedScopes:["source.c","source.glsl","source.sql","source.r","source.js","source.python","source.cpp"]},"source.kotlin":{id:"kotlin",path:"kotlin.tmLanguage.json",embeddedScopes:[]},"source.kusto":{id:"kusto",path:"kusto.tmLanguage.json",embeddedScopes:[]},"text.tex.latex":{id:"latex",path:"latex.tmLanguage.json",embeddedScopes:["source.glsl","source.shell","source.sql","source.cpp","source.c","source.r","source.gnuplot","source.scala","source.rust","source.yaml","source.python","source.ts","source.js","source.ruby","source.julia","source.lua","source.java","text.xml","text.html.basic","source.haskell","source.css","text.tex"]},"source.css.less":{id:"less",path:"less.tmLanguage.json",embeddedScopes:["source.css"]},"text.html.liquid":{id:"liquid",path:"liquid.tmLanguage.json",embeddedScopes:["source.js","source.json","source.css","text.html.basic"]},"source.lisp":{id:"lisp",path:"lisp.tmLanguage.json",embeddedScopes:[]},"source.logo":{id:"logo",path:"logo.tmLanguage.json",embeddedScopes:[]},"source.lua":{id:"lua",path:"lua.tmLanguage.json",embeddedScopes:["source.c"]},"source.makefile":{id:"make",path:"make.tmLanguage.json",embeddedScopes:[]},"text.html.markdown":{id:"markdown",path:"markdown.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.stylus","source.sass","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.tsx","source.ts","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.css.scss","source.swift","source.objc","source.css.less","source.json.comments","source.json","source.js","text.pug","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.coffee","source.clojure","source.batchfile","source.yaml","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","text.html.basic","source.css"]},"text.marko":{id:"marko",path:"marko.tmLanguage.json",embeddedScopes:["source.js","source.css.scss","source.css.less","source.css"]},"source.matlab":{id:"matlab",path:"matlab.tmLanguage.json",embeddedScopes:[]},"source.mdx":{id:"mdx",path:"mdx.tmLanguage.json",embeddedScopes:["source.gnuplot","text.tex","source.stylus","source.sass","text.bibtex","text.tex.latex","text.html.handlebars","source.dart","source.fsharp","source.powershell","source.perl.6","source.json.comments","text.pug","source.groovy","text.git-rebase","text.git-commit","source.batchfile","text.xml.xsl","source.asp.vb.net","source.php","source.js.jsx","source.glsl","source.ts","source.swift","text.xml","source.sql","text.shell-session","source.shell","source.css.scss","source.scala","source.rust","source.ruby","source.r","source.python","source.perl","source.objc","text.html.markdown","source.makefile","source.lua","source.css.less","source.kotlin","source.julia","source.json","source.js","source.java","source.ini","text.html.basic","source.haskell","source.graphql","source.go","source.erlang","source.elm","source.elixir","source.dockerfile","source.diff","source.css","source.cs","source.cpp","source.coffee","source.clojure","source.c","source.yaml","source.toml","source.tsx"]},"source.mermaid":{id:"mermaid",path:"mermaid.tmLanguage.json",embeddedScopes:[]},"source.narrat":{id:"narrat",path:"narrat.tmLanguage.json",embeddedScopes:[]},"source.nextflow":{id:"nextflow",path:"nextflow.tmLanguage.json",embeddedScopes:[]},"source.nginx":{id:"nginx",path:"nginx.tmLanguage.json",embeddedScopes:["source.c","source.lua"]},"source.nim":{id:"nim",path:"nim.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.stylus","source.sass","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.tsx","source.ts","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.css.scss","source.swift","source.objc","source.css.less","source.json.comments","source.json","text.pug","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.coffee","source.clojure","source.batchfile","source.yaml","text.xml.xsl","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.ini","source.java","text.html.markdown","source.glsl","source.css","source.js","text.xml","text.html.basic","source.c"]},"source.nix":{id:"nix",path:"nix.tmLanguage.json",embeddedScopes:[]},"source.objc":{id:"objective-c",path:"objective-c.tmLanguage.json",embeddedScopes:[]},"source.objcpp":{id:"objective-cpp",path:"objective-cpp.tmLanguage.json",embeddedScopes:[]},"source.ocaml":{id:"ocaml",path:"ocaml.tmLanguage.json",embeddedScopes:[]},"source.pascal":{id:"pascal",path:"pascal.tmLanguage.json",embeddedScopes:[]},"source.perl":{id:"perl",path:"perl.tmLanguage.json",embeddedScopes:["source.java","source.sql","source.js","source.css","text.xml","text.html.basic"]},"source.php":{id:"php",path:"php.tmLanguage.json",embeddedScopes:["source.java","source.css","source.json","source.js","source.sql","text.xml","text.html.basic"]},"source.plsql.oracle":{id:"plsql",path:"plsql.tmLanguage.json",embeddedScopes:[]},"source.css.postcss":{id:"postcss",path:"postcss.tmLanguage.json",embeddedScopes:[]},"source.powerquery":{id:"powerquery",path:"powerquery.tmLanguage.json",embeddedScopes:[]},"source.powershell":{id:"powershell",path:"powershell.tmLanguage.json",embeddedScopes:[]},"source.prisma":{id:"prisma",path:"prisma.tmLanguage.json",embeddedScopes:[]},"source.prolog":{id:"prolog",path:"prolog.tmLanguage.json",embeddedScopes:[]},"source.proto":{id:"proto",path:"proto.tmLanguage.json",embeddedScopes:[]},"text.pug":{id:"pug",path:"pug.tmLanguage.json",embeddedScopes:["text.html.basic","source.coffee","source.stylus","source.css.scss","source.sass","source.css","source.js"]},"source.puppet":{id:"puppet",path:"puppet.tmLanguage.json",embeddedScopes:[]},"source.purescript":{id:"purescript",path:"purescript.tmLanguage.json",embeddedScopes:[]},"source.python":{id:"python",path:"python.tmLanguage.json",embeddedScopes:[]},"source.r":{id:"r",path:"r.tmLanguage.json",embeddedScopes:[]},"source.perl.6":{id:"raku",path:"raku.tmLanguage.json",embeddedScopes:[]},"text.aspnetcorerazor":{id:"razor",path:"razor.tmLanguage.json",embeddedScopes:["source.css","source.js","source.cs","text.html.basic"]},"source.reg":{id:"reg",path:"reg.tmLanguage.json",embeddedScopes:[]},"source.rel":{id:"rel",path:"rel.tmLanguage.json",embeddedScopes:[]},"source.riscv":{id:"riscv",path:"riscv.tmLanguage.json",embeddedScopes:[]},"source.rst":{id:"rst",path:"rst.tmLanguage.json",embeddedScopes:["source.java","source.lua","source.c","source.css","text.xml","text.html.basic","source.sql","source.glsl","source.ruby","source.cmake","source.yaml","source.shell","source.js","source.python","source.cpp"]},"source.ruby":{id:"ruby",path:"ruby.tmLanguage.json",embeddedScopes:["source.java","source.lua","source.shell","source.js","source.c","source.css","source.sql","text.xml","text.html.basic"]},"source.rust":{id:"rust",path:"rust.tmLanguage.json",embeddedScopes:[]},"source.sas":{id:"sas",path:"sas.tmLanguage.json",embeddedScopes:["source.sql"]},"source.sass":{id:"sass",path:"sass.tmLanguage.json",embeddedScopes:[]},"source.scala":{id:"scala",path:"scala.tmLanguage.json",embeddedScopes:[]},"source.scheme":{id:"scheme",path:"scheme.tmLanguage.json",embeddedScopes:[]},"source.css.scss":{id:"scss",path:"scss.tmLanguage.json",embeddedScopes:["source.css"]},"source.shaderlab":{id:"shaderlab",path:"shaderlab.tmLanguage.json",embeddedScopes:["source.hlsl"]},"source.shell":{id:"shellscript",path:"shellscript.tmLanguage.json",embeddedScopes:[]},"text.shell-session":{id:"shellsession",path:"shellsession.tmLanguage.json",embeddedScopes:["source.shell"]},"source.smalltalk":{id:"smalltalk",path:"smalltalk.tmLanguage.json",embeddedScopes:[]},"source.solidity":{id:"solidity",path:"solidity.tmLanguage.json",embeddedScopes:[]},"source.sparql":{id:"sparql",path:"sparql.tmLanguage.json",embeddedScopes:["source.turtle"]},"source.sql":{id:"sql",path:"sql.tmLanguage.json",embeddedScopes:[]},"source.ssh-config":{id:"ssh-config",path:"ssh-config.tmLanguage.json",embeddedScopes:[]},"source.stata":{id:"stata",path:"stata.tmLanguage.json",embeddedScopes:["source.sql"]},"source.stylus":{id:"stylus",path:"stylus.tmLanguage.json",embeddedScopes:[]},"source.svelte":{id:"svelte",path:"svelte.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.tsx","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.swift","source.objc","source.json.comments","source.json","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.clojure","source.batchfile","source.yaml","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","text.html.basic","text.html.markdown","text.pug","source.css.postcss","source.css.less","source.css.scss","source.css","source.sass","source.stylus","source.coffee","source.ts","source.js"]},"source.swift":{id:"swift",path:"swift.tmLanguage.json",embeddedScopes:[]},"source.systemverilog":{id:"system-verilog",path:"system-verilog.tmLanguage.json",embeddedScopes:[]},"source.tasl":{id:"tasl",path:"tasl.tmLanguage.json",embeddedScopes:[]},"source.tcl":{id:"tcl",path:"tcl.tmLanguage.json",embeddedScopes:[]},"text.tex":{id:"tex",path:"tex.tmLanguage.json",embeddedScopes:["source.r"]},"source.toml":{id:"toml",path:"toml.tmLanguage.json",embeddedScopes:[]},"source.tsx":{id:"tsx",path:"tsx.tmLanguage.json",embeddedScopes:[]},"source.turtle":{id:"turtle",path:"turtle.tmLanguage.json",embeddedScopes:[]},"text.html.twig":{id:"twig",path:"twig.tmLanguage.json",embeddedScopes:["source.java","source.lua","source.shell","source.c","source.json","source.sql","text.xml","text.html.basic","source.ruby","source.python","source.php","source.js","source.css"]},"source.txt":{id:"txt",path:"txt.tmLanguage.json",embeddedScopes:[]},"source.ts":{id:"typescript",path:"typescript.tmLanguage.json",embeddedScopes:[]},"source.v":{id:"v",path:"v.tmLanguage.json",embeddedScopes:[]},"source.asp.vb.net":{id:"vb",path:"vb.tmLanguage.json",embeddedScopes:[]},"source.verilog":{id:"verilog",path:"verilog.tmLanguage.json",embeddedScopes:[]},"source.vhdl":{id:"vhdl",path:"vhdl.tmLanguage.json",embeddedScopes:[]},"source.viml":{id:"viml",path:"viml.tmLanguage.json",embeddedScopes:[]},"text.html.vue-html":{id:"vue-html",path:"vue-html.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.swift","source.objc","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.coffee","source.clojure","source.batchfile","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","source.graphql","source.toml","source.yaml","source.json5","source.json.comments","source.json","source.tsx","source.js.jsx","source.ts","source.css.less","source.css.scss","source.css","source.sass","source.stylus","text.pug","text.html.markdown","text.html.basic","source.js","source.vue"]},"source.vue":{id:"vue",path:"vue.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.swift","source.objc","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.coffee","source.clojure","source.batchfile","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","source.graphql","source.toml","source.yaml","source.json5","source.json.comments","source.json","source.tsx","source.js.jsx","source.ts","source.js","source.css.less","source.css.scss","source.css","source.sass","source.stylus","text.pug","text.html.markdown","text.html.basic"]},"source.vyper":{id:"vyper",path:"vyper.tmLanguage.json",embeddedScopes:[]},"source.wat":{id:"wasm",path:"wasm.tmLanguage.json",embeddedScopes:[]},"source.wenyan":{id:"wenyan",path:"wenyan.tmLanguage.json",embeddedScopes:[]},"source.wgsl":{id:"wgsl",path:"wgsl.tmLanguage.json",embeddedScopes:[]},"source.wolfram":{id:"wolfram",path:"wolfram.tmLanguage.json",embeddedScopes:[]},"text.xml":{id:"xml",path:"xml.tmLanguage.json",embeddedScopes:["source.java"]},"text.xml.xsl":{id:"xsl",path:"xsl.tmLanguage.json",embeddedScopes:["source.java","text.xml"]},"source.yaml":{id:"yaml",path:"yaml.tmLanguage.json",embeddedScopes:[]},"source.zenscript":{id:"zenscript",path:"zenscript.tmLanguage.json",embeddedScopes:[]}};var N={d:(A,B)=>{for(var Q in B)N.o(B,Q)&&!N.o(A,Q)&&Object.defineProperty(A,Q,{enumerable:!0,get:B[Q]})},o:(A,B)=>Object.prototype.hasOwnProperty.call(A,B)},L={};N.d(L,{_X:()=>vA,Bz:()=>XA,ot:()=>TA,u:()=>WA,jG:()=>Y,Pn:()=>ZA});const H="undefined"!=typeof process&&!!process.env.VSCODE_TEXTMATE_DEBUG;var k;function R(A,B){const Q=[],g=function(A){let B=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,Q=B.exec(A);return{next:()=>{if(!Q)return null;const g=Q[0];return Q=B.exec(A),g}}}(A);let E=g.next();for(;null!==E;){let A=0;if(2===E.length&&":"===E.charAt(1)){switch(E.charAt(0)){case"R":A=1;break;case"L":A=-1;break;default:console.log(`Unknown priority ${E} in scope selector`)}E=g.next()}let B=I();if(Q.push({matcher:B,priority:A}),","!==E)break;E=g.next()}return Q;function C(){if("-"===E){E=g.next();const A=C();return B=>!!A&&!A(B)}if("("===E){E=g.next();const A=function(){const A=[];let B=I();for(;B&&(A.push(B),"|"===E||","===E);){do{E=g.next()}while("|"===E||","===E);B=I()}return B=>A.some((A=>A(B)))}();return")"===E&&(E=g.next()),A}if(K(E)){const A=[];do{A.push(E),E=g.next()}while(K(E));return Q=>B(A,Q)}return null}function I(){const A=[];let B=C();for(;B;)A.push(B),B=C();return B=>A.every((A=>A(B)))}}function K(A){return!!A&&!!A.match(/[\w\.:]+/)}function Y(A){"function"==typeof A.dispose&&A.dispose()}function U(A){return Array.isArray(A)?function(A){let B=[];for(let Q=0,g=A.length;Q{for(let Q in B)A[Q]=B[Q]})),A}function u(A){const B=~A.lastIndexOf("/")||~A.lastIndexOf("\\");return 0===B?A:~B==A.length-1?u(A.substring(0,A.length-1)):A.substr(1+~B)}!function(A){A.toBinaryStr=function(A){let B=A.toString(2);for(;B.length<32;)B="0"+B;return B},A.print=function(B){const Q=A.getLanguageId(B),g=A.getTokenType(B),E=A.getFontStyle(B),C=A.getForeground(B),I=A.getBackground(B);console.log({languageId:Q,tokenType:g,fontStyle:E,foreground:C,background:I})},A.getLanguageId=function(A){return(255&A)>>>0},A.getTokenType=function(A){return(768&A)>>>8},A.containsBalancedBrackets=function(A){return 0!=(1024&A)},A.getFontStyle=function(A){return(30720&A)>>>11},A.getForeground=function(A){return(16744448&A)>>>15},A.getBackground=function(A){return(4278190080&A)>>>24},A.set=function(B,Q,g,E,C,I,D){let w=A.getLanguageId(B),o=A.getTokenType(B),s=A.containsBalancedBrackets(B)?1:0,e=A.getFontStyle(B),c=A.getForeground(B),i=A.getBackground(B);return 0!==Q&&(w=Q),8!==g&&(o=g),null!==E&&(s=E?1:0),-1!==C&&(e=C),0!==I&&(c=I),0!==D&&(i=D),(w<<0|o<<8|s<<10|e<<11|c<<15|i<<24)>>>0}}(k||(k={}));let y=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g;class J{static hasCaptures(A){return null!==A&&(y.lastIndex=0,y.test(A))}static replaceCaptures(A,B,Q){return A.replace(y,((A,g,E,C)=>{let I=Q[parseInt(g||E,10)];if(!I)return A;{let A=B.substring(I.start,I.end);for(;"."===A[0];)A=A.substring(1);switch(C){case"downcase":return A.toLowerCase();case"upcase":return A.toUpperCase();default:return A}}}))}}function S(A,B){return AB?1:0}function p(A,B){if(null===A&&null===B)return 0;if(!A)return-1;if(!B)return 1;let Q=A.length,g=B.length;if(Q===g){for(let g=0;g`);return}const C=Q.lookup(B);A instanceof m?X({baseGrammar:C,selfGrammar:E},g):T(A.ruleName,{baseGrammar:C,selfGrammar:E,repository:E.repository},g);const I=Q.injections(A.scopeName);if(I)for(const A of I)g.add(new m(A))}function T(A,B,Q){B.repository&&B.repository[A]&&v([B.repository[A]],B,Q)}function X(A,B){A.selfGrammar.patterns&&Array.isArray(A.selfGrammar.patterns)&&v(A.selfGrammar.patterns,{...A,repository:A.selfGrammar.repository},B),A.selfGrammar.injections&&v(Object.values(A.selfGrammar.injections),{...A,repository:A.selfGrammar.repository},B)}function v(A,B,Q){for(const g of A){if(Q.visitedRule.has(g))continue;Q.visitedRule.add(g);const A=g.repository?P({},B.repository,g.repository):B.repository;Array.isArray(g.patterns)&&v(g.patterns,{...B,repository:A},Q);const E=g.include;if(!E)continue;const C=$(E);switch(C.kind){case 0:X({...B,selfGrammar:B.baseGrammar},Q);break;case 1:X(B,Q);break;case 2:T(C.ruleName,{...B,repository:A},Q);break;case 3:case 4:const g=C.scopeName===B.selfGrammar.scopeName?B.selfGrammar:C.scopeName===B.baseGrammar.scopeName?B.baseGrammar:void 0;if(g){const E={baseGrammar:B.baseGrammar,selfGrammar:g,repository:A};4===C.kind?T(C.ruleName,E,Q):X(E,Q)}else 4===C.kind?Q.add(new O(C.scopeName,C.ruleName)):Q.add(new m(C.scopeName))}}}class Z{constructor(){this.kind=0}}class j{constructor(){this.kind=1}}class V{constructor(A){this.ruleName=A,this.kind=2}}class z{constructor(A){this.scopeName=A,this.kind=3}}class _{constructor(A,B){this.scopeName=A,this.ruleName=B,this.kind=4}}function $(A){if("$base"===A)return new Z;if("$self"===A)return new j;const B=A.indexOf("#");if(-1===B)return new z(A);if(0===B)return new V(A.substring(1));{const Q=A.substring(0,B),g=A.substring(B+1);return new _(Q,g)}}const AA=/\\(\d+)/,BA=/\\(\d+)/g;class QA{constructor(A,B,Q,g){this.$location=A,this.id=B,this._name=Q||null,this._nameIsCapturing=J.hasCaptures(this._name),this._contentName=g||null,this._contentNameIsCapturing=J.hasCaptures(this._contentName)}get debugName(){const A=this.$location?`${u(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${A}`}getName(A,B){return this._nameIsCapturing&&null!==this._name&&null!==A&&null!==B?J.replaceCaptures(this._name,A,B):this._name}getContentName(A,B){return this._contentNameIsCapturing&&null!==this._contentName?J.replaceCaptures(this._contentName,A,B):this._contentName}}class gA extends QA{constructor(A,B,Q,g,E){super(A,B,Q,g),this.retokenizeCapturedWithRuleId=E}dispose(){}collectPatterns(A,B){throw new Error("Not supported!")}compile(A,B){throw new Error("Not supported!")}compileAG(A,B,Q,g){throw new Error("Not supported!")}}class EA extends QA{constructor(A,B,Q,g,E){super(A,B,Q,null),this._match=new oA(g,this.id),this.captures=E,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(A,B){B.push(this._match)}compile(A,B){return this._getCachedCompiledPatterns(A).compile(A)}compileAG(A,B,Q,g){return this._getCachedCompiledPatterns(A).compileAG(A,Q,g)}_getCachedCompiledPatterns(A){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new sA,this.collectPatterns(A,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}}class CA extends QA{constructor(A,B,Q,g,E){super(A,B,Q,g),this.patterns=E.patterns,this.hasMissingPatterns=E.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(A,B){for(const Q of this.patterns)A.getRule(Q).collectPatterns(A,B)}compile(A,B){return this._getCachedCompiledPatterns(A).compile(A)}compileAG(A,B,Q,g){return this._getCachedCompiledPatterns(A).compileAG(A,Q,g)}_getCachedCompiledPatterns(A){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new sA,this.collectPatterns(A,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}}class IA extends QA{constructor(A,B,Q,g,E,C,I,D,w,o){super(A,B,Q,g),this._begin=new oA(E,this.id),this.beginCaptures=C,this._end=new oA(I||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=D,this.applyEndPatternLast=w||!1,this.patterns=o.patterns,this.hasMissingPatterns=o.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(A,B){return this._end.resolveBackReferences(A,B)}collectPatterns(A,B){B.push(this._begin)}compile(A,B){return this._getCachedCompiledPatterns(A,B).compile(A)}compileAG(A,B,Q,g){return this._getCachedCompiledPatterns(A,B).compileAG(A,Q,g)}_getCachedCompiledPatterns(A,B){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new sA;for(const B of this.patterns)A.getRule(B).collectPatterns(A,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,B):this._cachedCompiledPatterns.setSource(0,B)),this._cachedCompiledPatterns}}class DA extends QA{constructor(A,B,Q,g,E,C,I,D,w){super(A,B,Q,g),this._begin=new oA(E,this.id),this.beginCaptures=C,this.whileCaptures=D,this._while=new oA(I,-2),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=w.patterns,this.hasMissingPatterns=w.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(A,B){return this._while.resolveBackReferences(A,B)}collectPatterns(A,B){B.push(this._begin)}compile(A,B){return this._getCachedCompiledPatterns(A).compile(A)}compileAG(A,B,Q,g){return this._getCachedCompiledPatterns(A).compileAG(A,Q,g)}_getCachedCompiledPatterns(A){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new sA;for(const B of this.patterns)A.getRule(B).collectPatterns(A,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(A,B){return this._getCachedCompiledWhilePatterns(A,B).compile(A)}compileWhileAG(A,B,Q,g){return this._getCachedCompiledWhilePatterns(A,B).compileAG(A,Q,g)}_getCachedCompiledWhilePatterns(A,B){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new sA,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,B||"￿"),this._cachedCompiledWhilePatterns}}class wA{static createCaptureRule(A,B,Q,g,E){return A.registerRule((A=>new gA(B,A,Q,g,E)))}static getCompiledRuleId(A,B,Q){return A.id||B.registerRule((g=>{if(A.id=g,A.match)return new EA(A.$vscodeTextmateLocation,A.id,A.name,A.match,wA._compileCaptures(A.captures,B,Q));if(void 0===A.begin){A.repository&&(Q=P({},Q,A.repository));let g=A.patterns;return void 0===g&&A.include&&(g=[{include:A.include}]),new CA(A.$vscodeTextmateLocation,A.id,A.name,A.contentName,wA._compilePatterns(g,B,Q))}return A.while?new DA(A.$vscodeTextmateLocation,A.id,A.name,A.contentName,A.begin,wA._compileCaptures(A.beginCaptures||A.captures,B,Q),A.while,wA._compileCaptures(A.whileCaptures||A.captures,B,Q),wA._compilePatterns(A.patterns,B,Q)):new IA(A.$vscodeTextmateLocation,A.id,A.name,A.contentName,A.begin,wA._compileCaptures(A.beginCaptures||A.captures,B,Q),A.end,wA._compileCaptures(A.endCaptures||A.captures,B,Q),A.applyEndPatternLast,wA._compilePatterns(A.patterns,B,Q))})),A.id}static _compileCaptures(A,B,Q){let g=[];if(A){let E=0;for(const B in A){if("$vscodeTextmateLocation"===B)continue;const A=parseInt(B,10);A>E&&(E=A)}for(let A=0;A<=E;A++)g[A]=null;for(const E in A){if("$vscodeTextmateLocation"===E)continue;const C=parseInt(E,10);let I=0;A[E].patterns&&(I=wA.getCompiledRuleId(A[E],B,Q)),g[C]=wA.createCaptureRule(B,A[E].$vscodeTextmateLocation,A[E].name,A[E].contentName,I)}}return g}static _compilePatterns(A,B,Q){let g=[];if(A)for(let E=0,C=A.length;EA.substring(B.start,B.end)));return BA.lastIndex=0,this.source.replace(BA,((A,B)=>d(Q[parseInt(B,10)]||"")))}_buildAnchorCache(){let A,B,Q,g,E=[],C=[],I=[],D=[];for(A=0,B=this.source.length;AA.source));this._cached=new eA(A,B,this._items.map((A=>A.ruleId)))}return this._cached}compileAG(A,B,Q){return this._hasAnchors?B?Q?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(A,B,Q)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(A,B,Q)),this._anchorCache.A1_G0):Q?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(A,B,Q)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(A,B,Q)),this._anchorCache.A0_G0):this.compile(A)}_resolveAnchors(A,B,Q){let g=this._items.map((A=>A.resolveAnchors(B,Q)));return new eA(A,g,this._items.map((A=>A.ruleId)))}}class eA{constructor(A,B,Q){this.regExps=B,this.rules=Q,this.scanner=A.createOnigScanner(B)}dispose(){"function"==typeof this.scanner.dispose&&this.scanner.dispose()}toString(){const A=[];for(let B=0,Q=this.rules.length;Bthis._root.match(A)))}static createFromRawTheme(A,B){return this.createFromParsedTheme(function(A){if(!A)return[];if(!A.settings||!Array.isArray(A.settings))return[];let B=A.settings,Q=[],g=0;for(let A=0,E=B.length;A1&&(s=C.slice(0,C.length-1),s.reverse()),Q[g++]=new aA(o,s,A,I,D,w)}}return Q}(A),B)}static createFromParsedTheme(A,B){return function(A,B){A.sort(((A,B)=>{let Q=S(A.scope,B.scope);return 0!==Q?Q:(Q=p(A.parentScopes,B.parentScopes),0!==Q?Q:A.index-B.index)}));let Q=0,g="#000000",E="#ffffff";for(;A.length>=1&&""===A[0].scope;){let B=A.shift();-1!==B.fontStyle&&(Q=B.fontStyle),null!==B.foreground&&(g=B.foreground),null!==B.background&&(E=B.background)}let C=new hA(B),I=new MA(Q,C.getId(g),C.getId(E)),D=new FA(new nA(0,null,-1,0,0),[]);for(let B=0,Q=A.length;Bfunction(A,B){if(null===B)return!0;let Q=0,g=B[Q];for(;A;){if(tA(A.scopeName,g)){if(Q++,Q===B.length)return!0;g=B[Q]}A=A.parent}return!1}(A.parent,B.parentScopes)));return Q?new MA(Q.fontStyle,Q.foreground,Q.background):null}}class iA{constructor(A,B){this.parent=A,this.scopeName=B}static push(A,B){for(const Q of B)A=new iA(A,Q);return A}static from(...A){let B=null;for(let Q=0;QA?console.log("how did this happen?"):this.scopeDepth=A,-1!==B&&(this.fontStyle=B),0!==Q&&(this.foreground=Q),0!==g&&(this.background=g)}}class FA{constructor(A,B=[],Q={}){this._mainRule=A,this._children=Q,this._rulesWithParentScopes=B}static _sortBySpecificity(A){return 1===A.length||A.sort(this._cmpBySpecificity),A}static _cmpBySpecificity(A,B){if(A.scopeDepth===B.scopeDepth){const Q=A.parentScopes,g=B.parentScopes;let E=null===Q?0:Q.length,C=null===g?0:g.length;if(E===C)for(let A=0;A{const B=this._scopeToLanguage(A),Q=this._toStandardTokenType(A);return new GA(B,Q)})),this._defaultAttributes=new GA(A,8),this._embeddedLanguagesMatcher=new NA(Object.entries(B||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(A){return null===A?rA._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(A)}_scopeToLanguage(A){return this._embeddedLanguagesMatcher.match(A)||0}_toStandardTokenType(A){const B=A.match(rA.STANDARD_TOKEN_TYPE_REGEXP);if(!B)return 8;switch(B[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}}rA._NULL_SCOPE_METADATA=new GA(0,0),rA.STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/;class NA{constructor(A){if(0===A.length)this.values=null,this.scopesRegExp=null;else{this.values=new Map(A);const B=A.map((([A,B])=>d(A)));B.sort(),B.reverse(),this.scopesRegExp=new RegExp(`^((${B.join(")|(")}))($|\\.)`,"")}}match(A){if(!this.scopesRegExp)return;const B=A.match(this.scopesRegExp);return B?this.values.get(B[1]):void 0}}class LA{constructor(A,B){this.stack=A,this.stoppedEarly=B}}function HA(A,B,Q,g,E,C,I,D){const w=B.content.length;let o=!1,s=-1;if(I){const I=function(A,B,Q,g,E,C){let I=E.beginRuleCapturedEOL?0:-1;const D=[];for(let B=E;B;B=B.pop()){const Q=B.getRule(A);Q instanceof DA&&D.push({rule:Q,stack:B})}for(let w=D.pop();w;w=D.pop()){const{ruleScanner:D,findOptions:o}=RA(w.rule,A,w.stack.endRule,Q,g===I),s=D.findNextMatchSync(B,g,o);if(H&&(console.log(" scanning for while rule"),console.log(D.toString())),!s){H&&console.log(" popping "+w.rule.debugName+" - "+w.rule.debugWhileRegExp),E=w.stack.pop();break}if(-2!==s.ruleId){E=w.stack.pop();break}s.captureIndices&&s.captureIndices.length&&(C.produce(w.stack,s.captureIndices[0].start),KA(A,B,Q,w.stack,C,w.rule.whileCaptures,s.captureIndices),C.produce(w.stack,s.captureIndices[0].end),I=s.captureIndices[0].end,s.captureIndices[0].end>g&&(g=s.captureIndices[0].end,Q=!1))}return{stack:E,linePos:g,anchorPosition:I,isFirstLine:Q}}(A,B,Q,g,E,C);E=I.stack,g=I.linePos,Q=I.isFirstLine,s=I.anchorPosition}const e=Date.now();for(;!o;){if(0!==D&&Date.now()-e>D)return new LA(E,!0);c()}return new LA(E,!1);function c(){H&&(console.log(""),console.log(`@@scanNext ${g}: |${B.content.substr(g).replace(/\n$/,"\\n")}|`));const I=function(A,B,Q,g,E,C){const I=function(A,B,Q,g,E,C){const I=E.getRule(A),{ruleScanner:D,findOptions:w}=kA(I,A,E.endRule,Q,g===C);let o=0;H&&(o=x());const s=D.findNextMatchSync(B,g,w);if(H){const A=x()-o;A>5&&console.warn(`Rule ${I.debugName} (${I.id}) matching took ${A} against '${B}'`),console.log(` scanning for (linePos: ${g}, anchorPosition: ${C})`),console.log(D.toString()),s&&console.log(`matched rule id: ${s.ruleId} from ${s.captureIndices[0].start} to ${s.captureIndices[0].end}`)}return s?{captureIndices:s.captureIndices,matchedRuleId:s.ruleId}:null}(A,B,Q,g,E,C),D=A.getInjections();if(0===D.length)return I;const w=function(A,B,Q,g,E,C,I){let D,w=Number.MAX_VALUE,o=null,s=0;const e=C.contentNameScopesList.getScopeNames();for(let C=0,c=A.length;C=w)&&(w=h,o=a.captureIndices,D=a.ruleId,s=c.priority,w===E))break}return o?{priorityMatch:-1===s,captureIndices:o,matchedRuleId:D}:null}(D,A,B,Q,g,E,C);if(!w)return I;if(!I)return w;const o=I.captureIndices[0].start,s=w.captureIndices[0].start;return s0)&&D[0].end>g;if(-1===e){const I=E.getRule(A);H&&console.log(" popping "+I.debugName+" - "+I.debugEndRegExp),C.produce(E,D[0].start),E=E.withContentNameScopesList(E.nameScopesList),KA(A,B,Q,E,C,I.endCaptures,D),C.produce(E,D[0].end);const e=E;if(E=E.parent,s=e.getAnchorPos(),!c&&e.getEnterPos()===g)return H&&console.error("[1] - Grammar is in an endless loop - Grammar pushed & popped a rule without advancing"),E=e,C.produce(E,w),void(o=!0)}else{const I=A.getRule(e);C.produce(E,D[0].start);const i=E,t=I.getName(B.content,D),M=E.contentNameScopesList.pushAttributed(t,A);if(E=E.push(e,g,s,D[0].end===w,null,M,M),I instanceof IA){const g=I;H&&console.log(" pushing "+g.debugName+" - "+g.debugBeginRegExp),KA(A,B,Q,E,C,g.beginCaptures,D),C.produce(E,D[0].end),s=D[0].end;const e=g.getContentName(B.content,D),t=M.pushAttributed(e,A);if(E=E.withContentNameScopesList(t),g.endHasBackReferences&&(E=E.withEndRule(g.getEndWithResolvedBackReferences(B.content,D))),!c&&i.hasSameRuleAs(E))return H&&console.error("[2] - Grammar is in an endless loop - Grammar pushed the same rule without advancing"),E=E.pop(),C.produce(E,w),void(o=!0)}else if(I instanceof DA){const g=I;H&&console.log(" pushing "+g.debugName),KA(A,B,Q,E,C,g.beginCaptures,D),C.produce(E,D[0].end),s=D[0].end;const e=g.getContentName(B.content,D),t=M.pushAttributed(e,A);if(E=E.withContentNameScopesList(t),g.whileHasBackReferences&&(E=E.withEndRule(g.getWhileWithResolvedBackReferences(B.content,D))),!c&&i.hasSameRuleAs(E))return H&&console.error("[3] - Grammar is in an endless loop - Grammar pushed the same rule without advancing"),E=E.pop(),C.produce(E,w),void(o=!0)}else{const g=I;if(H&&console.log(" matched "+g.debugName+" - "+g.debugMatchRegExp),KA(A,B,Q,E,C,g.captures,D),C.produce(E,D[0].end),E=E.pop(),!c)return H&&console.error("[4] - Grammar is in an endless loop - Grammar is not advancing, nor is it pushing/popping"),E=E.safePop(),C.produce(E,w),void(o=!0)}}D[0].end>g&&(g=D[0].end,Q=!1)}}function kA(A,B,Q,g,E){return{ruleScanner:A.compileAG(B,Q,g,E),findOptions:0}}function RA(A,B,Q,g,E){return{ruleScanner:A.compileWhileAG(B,Q,g,E),findOptions:0}}function KA(A,B,Q,g,E,C,I){if(0===C.length)return;const D=B.content,w=Math.min(C.length,I.length),o=[],s=I[0].end;for(let B=0;Bs)break;for(;o.length>0&&o[o.length-1].endPos<=e.start;)E.produceFromScopes(o[o.length-1].scopes,o[o.length-1].endPos),o.pop();if(o.length>0?E.produceFromScopes(o[o.length-1].scopes,e.start):E.produce(g,e.start),w.retokenizeCapturedWithRuleId){const B=w.getName(D,I),C=g.contentNameScopesList.pushAttributed(B,A),o=w.getContentName(D,I),s=C.pushAttributed(o,A),c=g.push(w.retokenizeCapturedWithRuleId,e.start,-1,!1,null,C,s),i=A.createOnigString(D.substring(0,e.end));HA(A,i,Q&&0===e.start,e.start,c,E,!1,0),Y(i);continue}const c=w.getName(D,I);if(null!==c){const B=(o.length>0?o[o.length-1].scopes:g.contentNameScopesList).pushAttributed(c,A);o.push(new YA(B,e.end))}}for(;o.length>0;)E.produceFromScopes(o[o.length-1].scopes,o[o.length-1].endPos),o.pop()}class YA{constructor(A,B){this.scopes=A,this.endPos=B}}function UA(A,B,Q,g,E){const C=R(B,PA),I=wA.getCompiledRuleId(Q,g,E.repository);for(const Q of C)A.push({debugSelector:B,matcher:Q.matcher,ruleId:I,grammar:E,priority:Q.priority})}function PA(A,B){if(B.length{for(let g=Q;gQ&&A.substr(0,Q)===B&&"."===A[Q]}class yA{constructor(A,B,Q,g,E,C,I,D){if(this._rootScopeName=A,this.balancedBracketSelectors=C,this._onigLib=D,this._basicScopeAttributesProvider=new rA(Q,g),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=I,this._grammar=JA(B,null),this._injections=null,this._tokenTypeMatchers=[],E)for(const A of Object.keys(E)){const B=R(A,PA);for(const Q of B)this._tokenTypeMatchers.push({matcher:Q.matcher,type:E[A]})}}get themeProvider(){return this._grammarRepository}dispose(){for(const A of this._ruleId2desc)A&&A.dispose()}createOnigScanner(A){return this._onigLib.createOnigScanner(A)}createOnigString(A){return this._onigLib.createOnigString(A)}getMetadataForScope(A){return this._basicScopeAttributesProvider.getBasicScopeAttributes(A)}_collectInjections(){const A=[],B=this._rootScopeName,Q=(A=>A===this._rootScopeName?this._grammar:this.getExternalGrammar(A))(B);if(Q){const g=Q.injections;if(g)for(let B in g)UA(A,B,g[B],this,Q);const E=this._grammarRepository.injections(B);E&&E.forEach((B=>{const Q=this.getExternalGrammar(B);if(Q){const B=Q.injectionSelector;B&&UA(A,B,Q,this,Q)}}))}return A.sort(((A,B)=>A.priority-B.priority)),A}getInjections(){if(null===this._injections&&(this._injections=this._collectInjections(),H&&this._injections.length>0)){console.log(`Grammar ${this._rootScopeName} contains the following injections:`);for(const A of this._injections)console.log(` - ${A.debugSelector}`)}return this._injections}registerRule(A){const B=++this._lastRuleId,Q=A(B);return this._ruleId2desc[B]=Q,Q}getRule(A){return this._ruleId2desc[A]}getExternalGrammar(A,B){if(this._includedGrammars[A])return this._includedGrammars[A];if(this._grammarRepository){const Q=this._grammarRepository.lookup(A);if(Q)return this._includedGrammars[A]=JA(Q,B&&B.$base),this._includedGrammars[A]}}tokenizeLine(A,B,Q=0){const g=this._tokenize(A,B,!1,Q);return{tokens:g.lineTokens.getResult(g.ruleStack,g.lineLength),ruleStack:g.ruleStack,stoppedEarly:g.stoppedEarly}}tokenizeLine2(A,B,Q=0){const g=this._tokenize(A,B,!0,Q);return{tokens:g.lineTokens.getBinaryResult(g.ruleStack,g.lineLength),ruleStack:g.ruleStack,stoppedEarly:g.stoppedEarly}}_tokenize(A,B,Q,g){let E;if(-1===this._rootId&&(this._rootId=wA.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections()),B&&B!==pA.NULL)E=!1,B.reset();else{E=!0;const A=this._basicScopeAttributesProvider.getDefaultAttributes(),Q=this.themeProvider.getDefaults(),g=k.set(0,A.languageId,A.tokenType,null,Q.fontStyle,Q.foregroundId,Q.backgroundId),C=this.getRule(this._rootId).getName(null,null);let I;I=C?SA.createRootAndLookUpScopeName(C,g,this):SA.createRoot("unknown",g),B=new pA(null,this._rootId,-1,-1,!1,null,I,I)}A+="\n";const C=this.createOnigString(A),I=C.content.length,D=new dA(Q,A,this._tokenTypeMatchers,this.balancedBracketSelectors),w=HA(this,C,E,0,B,D,!0,g);return Y(C),{lineLength:I,lineTokens:D,ruleStack:w.stack,stoppedEarly:w.stoppedEarly}}}function JA(A,B){return(A=U(A)).repository=A.repository||{},A.repository.$self={$vscodeTextmateLocation:A.$vscodeTextmateLocation,patterns:A.patterns,name:A.scopeName},A.repository.$base=B||A.repository.$self,A}class SA{constructor(A,B,Q){this.parent=A,this.scopePath=B,this.tokenAttributes=Q}static fromExtension(A,B){let Q=A,g=A?.scopePath??null;for(const A of B)g=iA.push(g,A.scopeNames),Q=new SA(Q,g,A.encodedTokenAttributes);return Q}static createRoot(A,B){return new SA(null,new iA(null,A),B)}static createRootAndLookUpScopeName(A,B,Q){const g=Q.getMetadataForScope(A),E=new iA(null,A),C=Q.themeProvider.themeMatch(E),I=SA.mergeAttributes(B,g,C);return new SA(null,E,I)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(A){return SA.equals(this,A)}static equals(A,B){for(;;){if(A===B)return!0;if(!A&&!B)return!0;if(!A||!B)return!1;if(A.scopeName!==B.scopeName||A.tokenAttributes!==B.tokenAttributes)return!1;A=A.parent,B=B.parent}}static mergeAttributes(A,B,Q){let g=-1,E=0,C=0;return null!==Q&&(g=Q.fontStyle,E=Q.foregroundId,C=Q.backgroundId),k.set(A,B.languageId,B.tokenType,null,g,E,C)}pushAttributed(A,B){if(null===A)return this;if(-1===A.indexOf(" "))return SA._pushAttributed(this,A,B);const Q=A.split(/ /g);let g=this;for(const A of Q)g=SA._pushAttributed(g,A,B);return g}static _pushAttributed(A,B,Q){const g=Q.getMetadataForScope(B),E=A.scopePath.push(B),C=Q.themeProvider.themeMatch(E),I=SA.mergeAttributes(A.tokenAttributes,g,C);return new SA(A,E,I)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(A){const B=[];let Q=this;for(;Q&&Q!==A;)B.push({encodedTokenAttributes:Q.tokenAttributes,scopeNames:Q.scopePath.getExtensionIfDefined(Q.parent?.scopePath??null)}),Q=Q.parent;return Q===A?B.reverse():void 0}}class pA{constructor(A,B,Q,g,E,C,I,D){this.parent=A,this.ruleId=B,this.beginRuleCapturedEOL=E,this.endRule=C,this.nameScopesList=I,this.contentNameScopesList=D,this._stackElementBrand=void 0,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=Q,this._anchorPos=g}equals(A){return null!==A&&pA._equals(this,A)}static _equals(A,B){return A===B||!!this._structuralEquals(A,B)&&SA.equals(A.contentNameScopesList,B.contentNameScopesList)}static _structuralEquals(A,B){for(;;){if(A===B)return!0;if(!A&&!B)return!0;if(!A||!B)return!1;if(A.depth!==B.depth||A.ruleId!==B.ruleId||A.endRule!==B.endRule)return!1;A=A.parent,B=B.parent}}clone(){return this}static _reset(A){for(;A;)A._enterPos=-1,A._anchorPos=-1,A=A.parent}reset(){pA._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(A,B,Q,g,E,C,I){return new pA(this,A,B,Q,g,E,C,I)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(A){return A.getRule(this.ruleId)}toString(){const A=[];return this._writeString(A,0),"["+A.join(",")+"]"}_writeString(A,B){return this.parent&&(B=this.parent._writeString(A,B)),A[B++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,B}withContentNameScopesList(A){return this.contentNameScopesList===A?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,A)}withEndRule(A){return this.endRule===A?this:new pA(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,A,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(A){let B=this;for(;B&&B._enterPos===A._enterPos;){if(B.ruleId===A.ruleId)return!0;B=B.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(A,B){const Q=SA.fromExtension(A?.nameScopesList??null,B.nameScopesList);return new pA(A,B.ruleId,B.enterPos??-1,B.anchorPos??-1,B.beginRuleCapturedEOL,B.endRule,Q,SA.fromExtension(Q,B.contentNameScopesList))}}pA.NULL=new pA(null,0,0,0,!1,null,null,null);class lA{constructor(A,B){this.allowAny=!1,this.balancedBracketScopes=A.flatMap((A=>"*"===A?(this.allowAny=!0,[]):R(A,PA).map((A=>A.matcher)))),this.unbalancedBracketScopes=B.flatMap((A=>R(A,PA).map((A=>A.matcher))))}get matchesAlways(){return this.allowAny&&0===this.unbalancedBracketScopes.length}get matchesNever(){return 0===this.balancedBracketScopes.length&&!this.allowAny}match(A){for(const B of this.unbalancedBracketScopes)if(B(A))return!1;for(const B of this.balancedBracketScopes)if(B(A))return!0;return this.allowAny}}class dA{constructor(A,B,Q,g){this.balancedBracketSelectors=g,this._emitBinaryTokens=A,this._tokenTypeOverrides=Q,this._lineText=H?B:null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}produce(A,B){this.produceFromScopes(A.contentNameScopesList,B)}produceFromScopes(A,B){if(this._lastTokenEndIndex>=B)return;if(this._emitBinaryTokens){let Q=A?.tokenAttributes??0,g=!1;if(this.balancedBracketSelectors?.matchesAlways&&(g=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const B=A?.getScopeNames()??[];for(const A of this._tokenTypeOverrides)A.matcher(B)&&(Q=k.set(Q,0,A.type,null,-1,0,0));this.balancedBracketSelectors&&(g=this.balancedBracketSelectors.match(B))}if(g&&(Q=k.set(Q,0,8,g,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===Q)return void(this._lastTokenEndIndex=B);if(H){const Q=A?.getScopeNames()??[];console.log(" token: |"+this._lineText.substring(this._lastTokenEndIndex,B).replace(/\n$/,"\\n")+"|");for(let A=0;A0&&this._tokens[this._tokens.length-1].startIndex===B-1&&this._tokens.pop(),0===this._tokens.length&&(this._lastTokenEndIndex=-1,this.produce(A,B),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(A,B){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===B-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),0===this._binaryTokens.length&&(this._lastTokenEndIndex=-1,this.produce(A,B),this._binaryTokens[this._binaryTokens.length-2]=0);const Q=new Uint32Array(this._binaryTokens.length);for(let A=0,B=this._binaryTokens.length;A0;)10===A.charCodeAt(E)?(E++,C++,I=0):(E++,I++),B--}function w(A){null===Q?E=A:D(A-E)}function o(){for(;E0&&65279===A.charCodeAt(0)&&(E=1);let i=0,t=null,M=[],a=[],h=null;function n(A,B){M.push(i),a.push(t),i=A,t=B}function F(){if(0===M.length)return G("illegal state stack");i=M.pop(),t=a.pop()}function G(B){throw new Error("Near offset "+E+": "+B+" ~~~"+A.substr(E,50)+"~~~")}const r=function(){if(null===h)return G("missing ");let A={};null!==Q&&(A[Q]={filename:B,line:C,char:I}),t[h]=A,h=null,n(1,A)},N=function(){if(null===h)return G("missing ");let A=[];t[h]=A,h=null,n(2,A)},L=function(){let A={};null!==Q&&(A[Q]={filename:B,line:C,char:I}),t.push(A),n(1,A)},H=function(){let A=[];t.push(A),n(2,A)};function k(){if(1!==i)return G("unexpected ");F()}function R(){return 1===i||2!==i?G("unexpected "):void F()}function K(A){if(1===i){if(null===h)return G("missing ");t[h]=A,h=null}else 2===i?t.push(A):t=A}function Y(A){if(isNaN(A))return G("cannot parse float");if(1===i){if(null===h)return G("missing ");t[h]=A,h=null}else 2===i?t.push(A):t=A}function U(A){if(isNaN(A))return G("cannot parse integer");if(1===i){if(null===h)return G("missing ");t[h]=A,h=null}else 2===i?t.push(A):t=A}function P(A){if(1===i){if(null===h)return G("missing ");t[h]=A,h=null}else 2===i?t.push(A):t=A}function u(A){if(1===i){if(null===h)return G("missing ");t[h]=A,h=null}else 2===i?t.push(A):t=A}function y(A){if(1===i){if(null===h)return G("missing ");t[h]=A,h=null}else 2===i?t.push(A):t=A}function J(){let A=c(">"),B=!1;return 47===A.charCodeAt(A.length-1)&&(B=!0,A=A.substring(0,A.length-1)),{name:A.trim(),isClosed:B}}function S(A){if(A.isClosed)return"";let B=c(""),B.replace(/&#([0-9]+);/g,(function(A,B){return String.fromCodePoint(parseInt(B,10))})).replace(/&#x([0-9a-f]+);/g,(function(A,B){return String.fromCodePoint(parseInt(B,16))})).replace(/&|<|>|"|'/g,(function(A){switch(A){case"&":return"&";case"<":return"<";case">":return">";case""":return'"';case"'":return"'"}return A}))}for(;E=g));){const w=A.charCodeAt(E);if(D(1),60!==w)return G("expected <");if(E>=g)return G("unexpected end of input");const c=A.charCodeAt(E);if(63===c){D(1),e("?>");continue}if(33===c){if(D(1),s("--")){e("--\x3e");continue}e(">");continue}if(47===c){if(D(1),o(),s("plist")){e(">");continue}if(s("dict")){e(">"),k();continue}if(s("array")){e(">"),R();continue}return G("unexpected closed tag")}let M=J();switch(M.name){case"dict":1===i?r():2===i?L():(t={},null!==Q&&(t[Q]={filename:B,line:C,char:I}),n(1,t)),M.isClosed&&k();continue;case"array":1===i?N():2===i?H():(t=[],n(2,t)),M.isClosed&&R();continue;case"key":p=S(M),1!==i?G("unexpected "):null!==h?G("too many "):h=p;continue;case"string":K(S(M));continue;case"real":Y(parseFloat(S(M)));continue;case"integer":U(parseInt(S(M),10));continue;case"date":P(new Date(S(M)));continue;case"data":u(S(M));continue;case"true":S(M),y(!0);continue;case"false":S(M),y(!1);continue}if(!/^plist/.test(M.name))return G("unexpected opened tag "+M.name)}var p;return t}function xA(A,B){throw new Error("Near offset "+A.pos+": "+B+" ~~~"+A.source.substr(A.pos,50)+"~~~")}class mA{constructor(A){this.source=A,this.pos=0,this.len=A.length,this.line=1,this.char=0}}class OA{constructor(){this.value=null,this.type=0,this.offset=-1,this.len=-1,this.line=-1,this.char=-1}toLocation(A){return{filename:A,line:this.line,char:this.char}}}function qA(A,B){B.value=null,B.type=0,B.offset=-1,B.len=-1,B.line=-1,B.char=-1;let Q,g=A.source,E=A.pos,C=A.len,I=A.line,D=A.char;for(;;){if(E>=C)return!1;if(Q=g.charCodeAt(E),32!==Q&&9!==Q&&13!==Q){if(10!==Q)break;E++,I++,D=0}else E++,D++}if(B.offset=E,B.line=I,B.char=D,34===Q){for(B.type=1,E++,D++;;){if(E>=C)return!1;if(Q=g.charCodeAt(E),E++,D++,92!==Q){if(34===Q)break}else E++,D++}B.value=g.substring(B.offset+1,E-1).replace(/\\u([0-9A-Fa-f]{4})/g,((A,B)=>String.fromCodePoint(parseInt(B,16)))).replace(/\\(.)/g,((B,Q)=>{switch(Q){case'"':return'"';case"\\":return"\\";case"/":return"/";case"b":return"\b";case"f":return"\f";case"n":return"\n";case"r":return"\r";case"t":return"\t";default:xA(A,"invalid escape sequence")}throw new Error("unreachable")}))}else if(91===Q)B.type=2,E++,D++;else if(123===Q)B.type=3,E++,D++;else if(93===Q)B.type=4,E++,D++;else if(125===Q)B.type=5,E++,D++;else if(58===Q)B.type=6,E++,D++;else if(44===Q)B.type=7,E++,D++;else if(110===Q){if(B.type=8,E++,D++,Q=g.charCodeAt(E),117!==Q)return!1;if(E++,D++,Q=g.charCodeAt(E),108!==Q)return!1;if(E++,D++,Q=g.charCodeAt(E),108!==Q)return!1;E++,D++}else if(116===Q){if(B.type=9,E++,D++,Q=g.charCodeAt(E),114!==Q)return!1;if(E++,D++,Q=g.charCodeAt(E),117!==Q)return!1;if(E++,D++,Q=g.charCodeAt(E),101!==Q)return!1;E++,D++}else if(102===Q){if(B.type=10,E++,D++,Q=g.charCodeAt(E),97!==Q)return!1;if(E++,D++,Q=g.charCodeAt(E),108!==Q)return!1;if(E++,D++,Q=g.charCodeAt(E),115!==Q)return!1;if(E++,D++,Q=g.charCodeAt(E),101!==Q)return!1;E++,D++}else for(B.type=11;;){if(E>=C)return!1;if(Q=g.charCodeAt(E),!(46===Q||Q>=48&&Q<=57||101===Q||69===Q||45===Q||43===Q))break;E++,D++}return B.len=E-B.offset,null===B.value&&(B.value=g.substr(B.offset,B.len)),A.pos=E,A.line=I,A.char=D,!0}class bA{constructor(A,B){this._onigLibPromise=B,this._grammars=new Map,this._rawGrammars=new Map,this._injectionGrammars=new Map,this._theme=A}dispose(){for(const A of this._grammars.values())A.dispose()}setTheme(A){this._theme=A}getColorMap(){return this._theme.getColorMap()}addGrammar(A,B){this._rawGrammars.set(A.scopeName,A),B&&this._injectionGrammars.set(A.scopeName,B)}lookup(A){return this._rawGrammars.get(A)}injections(A){return this._injectionGrammars.get(A)}getDefaults(){return this._theme.getDefaults()}themeMatch(A){return this._theme.match(A)}async grammarForScopeName(A,B,Q,g,E){if(!this._grammars.has(A)){let C=this._rawGrammars.get(A);if(!C)return null;this._grammars.set(A,function(A,B,Q,g,E,C,I,D){return new yA(A,B,Q,g,E,C,I,D)}(A,C,B,Q,g,E,this,await this._onigLibPromise))}return this._grammars.get(A)}}function WA(A,B){let Q=0;const g=[];let E=A,C=B;for(;E!==C;)E&&(!C||E.depth>=C.depth)?(Q++,E=E.parent):(g.push(C.toStateStackFrame()),C=C.parent);return{pops:Q,newFrames:g.reverse()}}function TA(A,B){let Q=A;for(let A=0;A0;)await Promise.all(C.Q.map((A=>this._loadSingleGrammar(A.scopeName)))),C.processQueue();return this._grammarForScopeName(A,B,Q,g,E)}async _loadSingleGrammar(A){return this._ensureGrammarCache.has(A)||this._ensureGrammarCache.set(A,this._doLoadSingleGrammar(A)),this._ensureGrammarCache.get(A)}async _doLoadSingleGrammar(A){const B=await this._options.loadGrammar(A);if(B){const Q="function"==typeof this._options.getInjections?this._options.getInjections(A):void 0;this._syncRegistry.addGrammar(B,Q)}}async addGrammar(A,B=[],Q=0,g=null){return this._syncRegistry.addGrammar(A,B),await this._grammarForScopeName(A.scopeName,Q,g)}_grammarForScopeName(A,B=0,Q=null,g=null,E=null){return this._syncRegistry.grammarForScopeName(A,B,Q,g,E)}}const vA=pA.NULL,ZA=function(A,B=null){return null!==B&&/\.json$/.test(B)?(Q=A,H?function(A,B,Q){let g=new mA(A),E=new OA,C=0,I=null,D=[],w=[];function o(){D.push(C),w.push(I)}function s(){C=D.pop(),I=w.pop()}function e(A){xA(g,A)}for(;qA(g,E);){if(0===C){if(null!==I&&e("too many constructs in root"),3===E.type){I={},I.$vscodeTextmateLocation=E.toLocation(B),o(),C=1;continue}if(2===E.type){I=[],o(),C=4;continue}e("unexpected token in root")}if(2===C){if(5===E.type){s();continue}if(7===E.type){C=3;continue}e("expected , or }")}if(1===C||3===C){if(1===C&&5===E.type){s();continue}if(1===E.type){let A=E.value;if(qA(g,E)&&6===E.type||e("expected colon"),qA(g,E)||e("expected value"),C=2,1===E.type){I[A]=E.value;continue}if(8===E.type){I[A]=null;continue}if(9===E.type){I[A]=!0;continue}if(10===E.type){I[A]=!1;continue}if(11===E.type){I[A]=parseFloat(E.value);continue}if(2===E.type){let B=[];I[A]=B,o(),C=4,I=B;continue}if(3===E.type){let Q={};Q.$vscodeTextmateLocation=E.toLocation(B),I[A]=Q,o(),C=1,I=Q;continue}}e("unexpected token in dict")}if(5===C){if(4===E.type){s();continue}if(7===E.type){C=6;continue}e("expected , or ]")}if(4===C||6===C){if(4===C&&4===E.type){s();continue}if(C=5,1===E.type){I.push(E.value);continue}if(8===E.type){I.push(null);continue}if(9===E.type){I.push(!0);continue}if(10===E.type){I.push(!1);continue}if(11===E.type){I.push(parseFloat(E.value));continue}if(2===E.type){let A=[];I.push(A),o(),C=4,I=A;continue}if(3===E.type){let A={};A.$vscodeTextmateLocation=E.toLocation(B),I.push(A),o(),C=1,I=A;continue}e("unexpected token in array")}e("unknown state")}return 0!==w.length&&e("unclosed constructs"),I}(Q,B):JSON.parse(Q)):function(A,B){return H?function(A,B,Q){return fA(A,B,"$vscodeTextmateLocation")}(A,B):function(A){return fA(A,null,null)}(A)}(A,B);var Q};var jA=L.Bz,VA=("undefined"!=typeof document&&document.currentScript&&document.currentScript.src,function(A){var B,Q,g=void 0!==(A=A||{})?A:{};g.ready=new Promise((function(A,g){B=A,Q=g}));var E,C=Object.assign({},g),I=!1;E=function(A){let B;return"function"==typeof readbuffer?new Uint8Array(readbuffer(A)):(B=read(A,"binary"),"object"==typeof B||L(Q),B);var Q},"undefined"!=typeof scriptArgs&&scriptArgs,"undefined"!=typeof onig_print&&("undefined"==typeof console&&(console={}),console.log=onig_print,console.warn=console.error="undefined"!=typeof printErr?printErr:onig_print);var D,w,o=g.print||console.log.bind(console),s=g.printErr||console.warn.bind(console);Object.assign(g,C),C=null,g.arguments&&g.arguments,g.thisProgram&&g.thisProgram,g.quit&&g.quit,g.wasmBinary&&(D=g.wasmBinary),g.noExitRuntime,"object"!=typeof WebAssembly&&L("no native wasm support detected");var e,c,i,t=!1,M="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function a(A,B,Q){for(var g=B+Q,E=B;A[E]&&!(E>=g);)++E;if(E-B>16&&A.buffer&&M)return M.decode(A.subarray(B,E));for(var C="";B>10,56320|1023&o)}}else C+=String.fromCharCode((31&I)<<6|D)}else C+=String.fromCharCode(I)}return C}function h(A){e=A,g.HEAP8=new Int8Array(A),g.HEAP16=new Int16Array(A),g.HEAP32=new Int32Array(A),g.HEAPU8=c=new Uint8Array(A),g.HEAPU16=new Uint16Array(A),g.HEAPU32=i=new Uint32Array(A),g.HEAPF32=new Float32Array(A),g.HEAPF64=new Float64Array(A)}g.INITIAL_MEMORY;var n=[],F=[],G=[],r=0,N=null;function L(A){g.onAbort&&g.onAbort(A),s(A="Aborted("+A+")"),t=!0,A+=". Build with -sASSERTIONS for more info.";var B=new WebAssembly.RuntimeError(A);throw Q(B),B}var H,k,R,K="data:application/octet-stream;base64,";function Y(A){return A.startsWith(K)}function U(A){try{if(A==H&&D)return new Uint8Array(D);if(E)return E(A);throw"both async and sync fetching of the wasm failed"}catch(A){L(A)}}function P(A){for(;A.length>0;)A.shift()(g)}function u(A){try{return w.grow(A-e.byteLength+65535>>>16),h(w.buffer),1}catch(A){}}Y(H="onig.wasm")||(k=H,H=g.locateFile?g.locateFile(k,""):""+k),R="undefined"!=typeof dateNow?dateNow:()=>performance.now();var y=[null,[],[]];function J(A,B){var Q=y[A];0===B||10===B?((1===A?o:s)(a(Q,0)),Q.length=0):Q.push(B)}var S,p={emscripten_get_now:R,emscripten_memcpy_big:function(A,B,Q){c.copyWithin(A,B,B+Q)},emscripten_resize_heap:function(A){var B=c.length,Q=2147483648;if((A>>>=0)>Q)return!1;let g=(A,B)=>A+(B-A%B)%B;for(var E=1;E<=4;E*=2){var C=B*(1+.2/E);if(C=Math.min(C,A+100663296),u(Math.min(Q,g(Math.max(A,C),65536))))return!0}return!1},fd_write:function(A,B,Q,g){for(var E=0,C=0;C>2],D=i[B+4>>2];B+=8;for(var w=0;w>2]=E,0}};function l(A){function Q(){S||(S=!0,g.calledRun=!0,t||(P(F),B(g),g.onRuntimeInitialized&&g.onRuntimeInitialized(),function(){if(g.postRun)for("function"==typeof g.postRun&&(g.postRun=[g.postRun]);g.postRun.length;)A=g.postRun.shift(),G.unshift(A);var A;P(G)}()))}r>0||(function(){if(g.preRun)for("function"==typeof g.preRun&&(g.preRun=[g.preRun]);g.preRun.length;)A=g.preRun.shift(),n.unshift(A);var A;P(n)}(),r>0||(g.setStatus?(g.setStatus("Running..."),setTimeout((function(){setTimeout((function(){g.setStatus("")}),1),Q()}),1)):Q()))}if(function(){var A={env:p,wasi_snapshot_preview1:p};function B(A,B){var Q,E=A.exports;g.asm=E,h((w=g.asm.memory).buffer),g.asm.__indirect_function_table,Q=g.asm.__wasm_call_ctors,F.unshift(Q),function(A){if(r--,g.monitorRunDependencies&&g.monitorRunDependencies(r),0==r&&N){var B=N;N=null,B()}}()}function E(A){B(A.instance)}function C(B){return(!D&&I&&"function"==typeof fetch?fetch(H,{credentials:"same-origin"}).then((function(A){if(!A.ok)throw"failed to load wasm binary file at '"+H+"'";return A.arrayBuffer()})).catch((function(){return U(H)})):Promise.resolve().then((function(){return U(H)}))).then((function(B){return WebAssembly.instantiate(B,A)})).then((function(A){return A})).then(B,(function(A){s("failed to asynchronously prepare wasm: "+A),L(A)}))}if(r++,g.monitorRunDependencies&&g.monitorRunDependencies(r),g.instantiateWasm)try{return g.instantiateWasm(A,B)}catch(A){s("Module.instantiateWasm callback failed with error: "+A),Q(A)}(D||"function"!=typeof WebAssembly.instantiateStreaming||Y(H)||"function"!=typeof fetch?C(E):fetch(H,{credentials:"same-origin"}).then((function(B){return WebAssembly.instantiateStreaming(B,A).then(E,(function(A){return s("wasm streaming compile failed: "+A),s("falling back to ArrayBuffer instantiation"),C(E)}))}))).catch(Q)}(),g.___wasm_call_ctors=function(){return(g.___wasm_call_ctors=g.asm.__wasm_call_ctors).apply(null,arguments)},g.___errno_location=function(){return(g.___errno_location=g.asm.__errno_location).apply(null,arguments)},g._omalloc=function(){return(g._omalloc=g.asm.omalloc).apply(null,arguments)},g._ofree=function(){return(g._ofree=g.asm.ofree).apply(null,arguments)},g._getLastOnigError=function(){return(g._getLastOnigError=g.asm.getLastOnigError).apply(null,arguments)},g._createOnigScanner=function(){return(g._createOnigScanner=g.asm.createOnigScanner).apply(null,arguments)},g._freeOnigScanner=function(){return(g._freeOnigScanner=g.asm.freeOnigScanner).apply(null,arguments)},g._findNextOnigScannerMatch=function(){return(g._findNextOnigScannerMatch=g.asm.findNextOnigScannerMatch).apply(null,arguments)},g._findNextOnigScannerMatchDbg=function(){return(g._findNextOnigScannerMatchDbg=g.asm.findNextOnigScannerMatchDbg).apply(null,arguments)},g.stackSave=function(){return(g.stackSave=g.asm.stackSave).apply(null,arguments)},g.stackRestore=function(){return(g.stackRestore=g.asm.stackRestore).apply(null,arguments)},g.stackAlloc=function(){return(g.stackAlloc=g.asm.stackAlloc).apply(null,arguments)},g.dynCall_jiji=function(){return(g.dynCall_jiji=g.asm.dynCall_jiji).apply(null,arguments)},g.UTF8ToString=function(A,B){return A?a(c,A,B):""},N=function A(){S||l(),S||(N=A)},g.preInit)for("function"==typeof g.preInit&&(g.preInit=[g.preInit]);g.preInit.length>0;)g.preInit.pop()();return l(),A.ready});let zA=null;class _A{static _utf8ByteLength(A){let B=0;for(let Q=0,g=A.length;Q=55296&&E<=56319&&Q+1=56320&&B<=57343&&(C=65536+(E-55296<<10)|B-56320,I=!0)}B+=C<=127?1:C<=2047?2:C<=65535?3:4,I&&Q++}return B}constructor(A){const B=A.length,Q=_A._utf8ByteLength(A),g=Q!==B,E=g?new Uint32Array(B+1):null;g&&(E[B]=Q);const C=g?new Uint32Array(Q+1):null;g&&(C[Q]=B);const I=new Uint8Array(Q);let D=0;for(let Q=0;Q=55296&&w<=56319&&Q+1=56320&&B<=57343&&(o=65536+(w-55296<<10)|B-56320,s=!0)}g&&(E[Q]=D,s&&(E[Q+1]=D),o<=127?C[D+0]=Q:o<=2047?(C[D+0]=Q,C[D+1]=Q):o<=65535?(C[D+0]=Q,C[D+1]=Q,C[D+2]=Q):(C[D+0]=Q,C[D+1]=Q,C[D+2]=Q,C[D+3]=Q)),o<=127?I[D++]=o:o<=2047?(I[D++]=192|(1984&o)>>>6,I[D++]=128|(63&o)>>>0):o<=65535?(I[D++]=224|(61440&o)>>>12,I[D++]=128|(4032&o)>>>6,I[D++]=128|(63&o)>>>0):(I[D++]=240|(1835008&o)>>>18,I[D++]=128|(258048&o)>>>12,I[D++]=128|(4032&o)>>>6,I[D++]=128|(63&o)>>>0),s&&Q++}this.utf16Length=B,this.utf8Length=Q,this.utf16Value=A,this.utf8Value=I,this.utf16OffsetToUtf8=E,this.utf8OffsetToUtf16=C}createString(A){const B=A._omalloc(this.utf8Length);return A.HEAPU8.set(this.utf8Value,B),B}}class $A{constructor(A){if(this.id=++$A.LAST_ID,!zA)throw new Error("Must invoke loadWASM first.");this._onigBinding=zA,this.content=A;const B=new _A(A);this.utf16Length=B.utf16Length,this.utf8Length=B.utf8Length,this.utf16OffsetToUtf8=B.utf16OffsetToUtf8,this.utf8OffsetToUtf16=B.utf8OffsetToUtf16,this.utf8Length<1e4&&!$A._sharedPtrInUse?($A._sharedPtr||($A._sharedPtr=zA._omalloc(1e4)),$A._sharedPtrInUse=!0,zA.HEAPU8.set(B.utf8Value,$A._sharedPtr),this.ptr=$A._sharedPtr):this.ptr=B.createString(zA)}convertUtf8OffsetToUtf16(A){return this.utf8OffsetToUtf16?A<0?0:A>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[A]:A}convertUtf16OffsetToUtf8(A){return this.utf16OffsetToUtf8?A<0?0:A>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[A]:A}dispose(){this.ptr===$A._sharedPtr?$A._sharedPtrInUse=!1:this._onigBinding._ofree(this.ptr)}}$A.LAST_ID=0,$A._sharedPtr=0,$A._sharedPtrInUse=!1;class AB{constructor(A){if(!zA)throw new Error("Must invoke loadWASM first.");const B=[],Q=[];for(let g=0,E=A.length;gWebAssembly.instantiateStreaming(A,B)}(g):function(A){return async B=>{const Q=await A.arrayBuffer();return WebAssembly.instantiate(Q,B)}}(g):function(A){return B=>WebAssembly.instantiate(A,B)}(g)}return QB=new Promise(((A,B)=>{g=A,E=B})),function(A,B,Q,g){VA({print:B,instantiateWasm:(B,Q)=>{if("undefined"==typeof performance){const A=()=>Date.now();B.env.emscripten_get_now=A,B.wasi_snapshot_preview1.emscripten_get_now=A}return A(B).then((A=>Q(A.instance)),g),{}}}).then((A=>{zA=A,Q()}))}(B,Q,g,E),QB}function EB(A){return new $A(A)}function CB(A){return new AB(A)}function IB(A){const B=G[A];if(!B)return;const{id:Q}=r[B];return{id:Q,scopeName:B}}const DB=new Map;let wB,oB;async function sB(A){if(DB.has(A))return DB.get(A);const B=function(A){return r[A]}(A);if(!B)return Promise.resolve(void 0);let g;if(void 0===wB&&(g=eB(B.path),wB=g.then((()=>!0)).catch((()=>!1))),void 0===oB&&(oB=await wB),oB){const Q=g||eB(B.path);return DB.set(A,Q),Q}const E=Q(`grammars/${B.id}`);B.embeddedScopes.forEach((A=>{if(!DB.has(A)){const B=E.then((B=>B.find((B=>B.scopeName===A))));DB.set(A,B)}}));const C=E.then((B=>B.find((B=>B.scopeName===A))));return DB.set(A,C),C}async function eB(A){return await B("grammars",A)}const cB=30720,iB=16744448,tB=16775168,MB=11,aB=15,hB={NotSet:-1,None:0,Italic:1,Bold:2,Underline:4,Strikethrough:8};function nB(A,B,Q,g){const{tokens:E,ruleStack:C}=A.tokenizeLine2(Q,B),I=[];let D=Q.length;for(let A=E.length-2;A>=0;A-=2){const B=E[A],g=E[A+1],C=Q.slice(B,D);I.unshift({content:C,metadata:g}),D=B}let w=[];if(null==g?void 0:g.preserveWhitespace)w=I;else for(let A=0;A0?w[w.length-1].content+=B.content:A{const{rawTokens:E,nextStack:C}=nB(B,g,A,{preserveWhitespace:!0}),I=E.map((({content:A,metadata:B})=>({content:A,style:GB(B,Q)}))),D=function(A,B,Q,g){const{tokens:E}=Q.tokenizeLine(A,B),C=[];for(let B=0;B{if(w+=A.content.length,Q>>aB]},g=(A&cB)>>>MB;return g&hB.Italic&&(Q.fontStyle="italic"),g&hB.Bold&&(Q.fontWeight="bold"),g&hB.Underline&&(Q.textDecoration="underline"),g&hB.Strikethrough&&(Q.textDecoration="line-through"),Q}var rB=function(A){var B=null;if("undefined"!=typeof process&&null!=process.versions&&null!=process.versions.node)B=Buffer.from(A,"base64");else{var Q=globalThis.atob(A),g=Q.length;B=new Uint8Array(new ArrayBuffer(g));for(var E=0;E({createOnigScanner:CB,createOnigString:EB})));NB=new jA({onigLib:A,loadGrammar:A=>sB(A)})}const B=A.filter((A=>!LB(A))).map((A=>{const B=IB(A);if(!B)throw new RB(A);return NB.loadGrammar(B.scopeName)}));return Promise.all(B)}function kB(A){if(LB(A))return{langId:A,grammar:null};const B=IB(A);if(!B)throw new RB(A);const Q=function(A){const{_syncRegistry:B}=NB;return null==B?void 0:B._grammars.get(A)}(B.scopeName);if(!Q)throw new Error(`Syntax highlighting error: grammar for ${A} not loaded`);return{langId:B.id,grammar:Q}}class RB extends Error{constructor(A){super(`Unknown language: ${A}`),this.alias=A}}function KB(A,B,Q){NB.setTheme(Q);const g=function(A){const B=NB.getColorMap();return A.colorNames?B.map((B=>Object.keys(A.colorNames).find((Q=>A.colorNames[Q].toUpperCase()===B.toUpperCase()))||B)):B}(Q);return function(A,B,Q){let g=null;return A.split(/\r?\n|\r/g).map((A=>{const{rawTokens:E,nextStack:C}=nB(B,g,A);return g=C,E.map((({content:A,metadata:B})=>({content:A,style:GB(B,Q)})))}))}(A,B,g)}function YB(A){return A.split(/\r?\n|\r/g).map((A=>[{content:A,style:{}}]))}function UB(A,B){return uB(A.slice(1,-1)).map((A=>{const{from:Q,to:g}=PB(A);return{lineNumber:B,fromColumn:Q,toColumn:g}}))}function PB(A){const[B,Q]=A.split(":");if(!yB(B))throw new JB(B);const g=Number(B);if(g<1)throw new SB;if(Q){if(!yB(Q))throw new JB(Q);return{from:g,to:+Q}}return{from:g,to:g}}function uB(A){return A.split(/,(?![^\[]*\])/g)}function yB(A){A=A.toString();var B=Math.abs(A),Q=parseInt(A,10);return!isNaN(B)&&Q===B&&B.toString()===A}class JB extends Error{constructor(A){super(`Invalid number "${A}" in range string`),this.number=A,Object.setPrototypeOf(this,new.target.prototype)}}class SB extends Error{constructor(){super("Invalid line or column number in range string"),Object.setPrototypeOf(this,new.target.prototype)}}const pB="#001",lB="#010",dB={name:"comments",type:"light",foreground:"",background:"",colors:{},settings:[{settings:{foreground:"#000"}},{scope:["punctuation.definition.comment"],settings:{foreground:pB}},{scope:"comment",settings:{foreground:lB}}]};function fB(A,B,Q,g){const E=B?KB(A,B,dB):YB(A),C=[];let I=1;const D=E.map((A=>{const{annotations:B,lineWithoutComments:E}=function(A,B,Q){if(!A.some((A=>A.style.color===pB)))return{annotations:[],lineWithoutComments:A};const g=[];let E=0;for(;E!A.tokens.includes(B)));C.every((A=>""===A.content.trim()))&&(C=null);return{annotations:g.map((A=>({name:A.name,query:A.query,lineNumber:A.lineNumber,rangeString:A.rangeString}))),lineWithoutComments:C}}(A,g,I);if(C.push(...B),!E)return null;const D=E.map((A=>A.content)).join("");return["mdx","jsx","tsx"].includes(Q)&&B.length>0&&"{}"===D.trim()?null:(I++,D)})).filter((A=>null!==A)).join("\n"),w=C.map((A=>{var{rangeString:B,lineNumber:Q}=A,g=function(A,B){var Q={};for(var g in A)Object.prototype.hasOwnProperty.call(A,g)&&B.indexOf(g)<0&&(Q[g]=A[g]);if(null!=A&&"function"==typeof Object.getOwnPropertySymbols){var E=0;for(g=Object.getOwnPropertySymbols(A);E{if(A.includes("[")){const[Q,g]=A.split("["),E=Number(Q),C=B+E-1;if(!yB(C))throw new JB(Q);return UB("["+g,C)}const{from:Q,to:g}=PB(A);return[{fromLineNumber:Q+B-1,toLineNumber:g+B-1}]})).flat():[{fromLineNumber:B,toLineNumber:B}]}(B,Q);return Object.assign(Object.assign({},g),{ranges:E})}));return{newCode:D,annotations:w}}function xB(A,B){var Q;const g=A.match(/\s*([\w-]+)?(\([^\)]*\)|\[[^\]]*\])?(.*)$/),E=g[1],C=g[2],I=null===(Q=g[3])||void 0===Q?void 0:Q.trim();return B.includes(E)?{name:E,rangeString:C,query:I}:null}function mB(A,B){let Q=[],g=1;return A.forEach((A=>{Q.push({fromColumn:g,toColumn:g+A.content.length-1,token:A}),g+=A.content.length})),B.forEach((A=>{Q=function(A,B){const{range:Q}=B,{fromColumn:g,toColumn:E}=Q,C=[];let I=0;for(;IE){const[A,Q]=qB(B,E+1);D.tokens.push(A),C.push(Q)}else D.tokens.push(B);I++}else C.push(D);for(;IOB(A)))}function OB(A){return"tokens"in A?{annotationName:A.annotationName,annotationQuery:A.annotationQuery,fromColumn:A.fromColumn,toColumn:A.toColumn,tokens:A.tokens.map((A=>OB(A)))}:A.token}function qB(A,B){if("token"in A){const Q=Object.assign(Object.assign({},A.token),{content:A.token.content.slice(0,B-A.fromColumn)}),g=Object.assign(Object.assign({},A.token),{content:A.token.content.slice(B-A.fromColumn)});return[Object.assign(Object.assign({},A),{toColumn:B-1,token:Q}),Object.assign(Object.assign({},A),{fromColumn:B,token:g})]}{const Q=[],g=[];A.tokens.forEach((A=>{if(A.toColumn=B)g.push(A);else{const[E,C]=qB(A,B);Q.push(E),g.push(C)}}));return[Object.assign(Object.assign({},A),{toColumn:B-1,tokens:Q}),Object.assign(Object.assign({},A),{fromColumn:B,tokens:g})]}}function bB(A,B){let Q=A.map(((A,B)=>({fromLineNumber:B+1,toLineNumber:B+1,line:A})));return B.forEach((A=>{Q=function(A,B){const{range:Q,name:g,query:E}=B,{fromLineNumber:C,toLineNumber:I}=Q,D=[];let w=0;for(;wI){const[A,Q]=TB(B,I+1);o.lines.push(A),D.push(Q)}else o.lines.push(B);w++}else D.push(o);for(;wWB(A)))}function WB(A){return"line"in A?{lineNumber:A.fromLineNumber,tokens:A.line.tokens}:{annotationName:A.annotationName,annotationQuery:A.annotationQuery,fromLineNumber:A.fromLineNumber,toLineNumber:A.toLineNumber,lines:A.lines.map((A=>WB(A)))}}function TB(A,B){if("line"in A)return[Object.assign(Object.assign({},A),{toLineNumber:B-1}),Object.assign(Object.assign({},A),{fromLineNumber:B})];{const Q=[],g=[];return A.lines.forEach((A=>{if(A.toLineNumber=B)g.push(A);else{const[E,C]=TB(A,B);Q.push(E),g.push(C)}})),[Object.assign(Object.assign({},A),{toLineNumber:B-1,lines:Q}),Object.assign(Object.assign({},A),{fromLineNumber:B,lines:g})]}}function XB(A,B){const{inlineAnnotations:Q,multilineAnnotations:g}=function(A){const B=[],Q=[];return A.forEach((A=>{A.ranges.forEach((g=>{"lineNumber"in g?B.push(Object.assign(Object.assign({},A),{range:g})):Q.push(Object.assign(Object.assign({},A),{range:g}))}))})),{inlineAnnotations:B,multilineAnnotations:Q}}(B);return bB(A.map(((A,B)=>{const g=Q.filter((A=>A.range.lineNumber===B+1));return{lineNumber:B+1,tokens:mB(A,g)}})),g)}var vB=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],ZB={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",9:"strikethrough"};function jB(A,B){const Q=A.indexOf("[",B);if(-1!==Q){const B=A.indexOf("m",Q);return{sequence:A.substring(Q+2,B).split(";"),startPosition:Q,position:B+1}}return{position:A.length}}function VB(A,B){let Q=1;const g=A[B+Q++];let E;if("2"===g){const g=[A[B+Q++],A[B+Q++],A[B+Q]].map((A=>Number.parseInt(A)));3!==g.length||g.some((A=>Number.isNaN(A)))||(E={type:"rgb",rgb:g})}else if("5"===g){const g=Number.parseInt(A[B+Q]);Number.isNaN(g)||(E={type:"table",index:Number(g)})}return[Q,E]}function zB(A){const B=[];for(let Q=0;Q=90&&E<=97?B.push({type:"setForegroundColor",value:{type:"named",name:vB[E-90+8]}}):E>=100&&E<=107&&B.push({type:"setBackgroundColor",value:{type:"named",name:vB[E-100+8]}})}return B}function _B(A,B){const Q=function(){let A=null,B=null,Q=new Set;return{parse(g){const E=[];let C=0;do{const I=jB(g,C),D=I.sequence?g.substring(C,I.startPosition):g.substring(C);if(D.length>0&&E.push({value:D,foreground:A,background:B,decorations:new Set(Q)}),I.sequence){const g=zB(I.sequence);for(const E of g)"resetAll"===E.type?(A=null,B=null,Q.clear()):"resetForegroundColor"===E.type?A=null:"resetBackgroundColor"===E.type?B=null:"resetDecoration"===E.type&&Q.delete(E.value);for(const E of g)"setForegroundColor"===E.type?A=E.value:"setBackgroundColor"===E.type?B=E.value:"setDecoration"===E.type&&Q.add(E.value)}C=I.position}while(Cfunction(A,B,Q){const g=A.parse(B),E=g.map((({value:A,foreground:B,background:g,decorations:E})=>{const C=$B(B,Q),I={};C&&(I.color=C);const D=$B(g,Q);return D&&(I.background=D),E.has("bold")&&(I.fontWeight="bold"),E.has("italic")&&(I.fontStyle="italic"),E.has("underline")&&(I.textDecoration="underline"),E.has("strikethrough")&&(I.textDecoration="line-through"),E.has("reverse")&&(I.color=D,I.background=C),E.has("dim")&&(I.opacity=.5),{content:A,style:I}}));return E}(Q,A,B)));return g}function $B(A,B){if(A){if("named"===A.type){return w(B,"terminal.ansi"+(A.name[0].toUpperCase()+A.name.slice(1)))}if("rgb"===A.type){const[B,Q,g]=A.rgb;return`rgb(${B}, ${Q}, ${g})`}}}async function AQ(A,B){await Promise.all([HB(A),i(B)])}async function BQ(A,B,Q="dark-plus",g={}){const E=A||"",C=B||"text";if("string"!=typeof E)throw new Error("Syntax highlighter error: code must be a string");if("string"!=typeof C)throw new Error("Syntax highlighter error: lang must be a string");return await AQ([C],Q),QQ(E,C,Q,g)}function QQ(A,B,Q="dark-plus",g={}){const E=A||"",C=B||"text";if("string"!=typeof E)throw new Error("Syntax highlighter error: code must be a string");if("string"!=typeof C)throw new Error("Syntax highlighter error: lang must be a string");const{langId:I,grammar:D}=kB(C),o=t(Q),s="text"==I?YB(E):"terminal"==I?_B(E,o):(null==g?void 0:g.scopes)?function(A,B,Q){return NB.setTheme(Q),FB(A,B,NB.getColorMap())}(E,D,o):KB(E,D,o),e="terminal"==I?function(A){return{color:w(A,"terminal.foreground"),background:w(A,"terminal.background")}}(o):{color:o.foreground,background:o.background};if(function(A){return"annotations"in A}(g)){return{lines:XB(s,(null==g?void 0:g.annotations)||[]),lang:I,style:e}}return{lines:s,lang:I,style:e}}async function gQ(A,B,Q){if(!Q)return{code:A,annotations:[]};await HB([B]);const{grammar:g}=kB(B),{newCode:E,annotations:C}=fB(A,g,B,Q);return{code:E,annotations:C}}async function EQ(A){if(!A)throw new Error("Syntax highlighter error: undefined theme");await AQ([],A);return n(t(A))}function CQ(A){if(!A)throw new Error("Syntax highlighter error: undefined theme");return n(t(A))}export{F as LANG_NAMES,a as THEME_NAMES,RB as UnknownLanguageError,h as UnknownThemeError,gQ as extractAnnotations,EQ as getThemeColors,CQ as getThemeColorsSync,BQ as highlight,QQ as highlightSync,AQ as preload}; +function A(A,B){var Q=require("fs"),g=require("path"),E=g.parse,C=require("os");var I=function(A,B){var Q="/";/^([A-Za-z]:)/.test(A)?Q="":/^\\\\/.test(A)&&(Q="\\\\");for(var C=[A],I=E(A);I.dir!==C[C.length-1];)C.push(I.dir),I=E(I.dir);return C.reduce((function(A,E){return A.concat(B.map((function(A){return g.resolve(Q,E,A)})))}),[])};const D=C.homedir||function(){var A=process.env.HOME,B=process.env.LOGNAME||process.env.USER||process.env.LNAME||process.env.USERNAME;return"win32"===process.platform?process.env.USERPROFILE||process.env.HOMEDRIVE+process.env.HOMEPATH||A||null:"darwin"===process.platform?A||(B?"/Users/"+B:null):"linux"===process.platform?A||(0===process.getuid()?"/root":B?"/home/"+B:null):A||null};var w="win32"!==process.platform&&Q.realpathSync&&"function"==typeof Q.realpathSync.native?Q.realpathSync.native:Q.realpathSync,o=D(),s=function(A,B,Q){return Q&&!1===Q.preserveSymlinks?A(B):B},e=function(A,B,Q){for(var E=function(A,B,Q){var g=B&&B.moduleDirectory?[].concat(B.moduleDirectory):["node_modules"];if(B&&"function"==typeof B.paths)return B.paths(Q,A,(function(){return I(A,g)}),B);var E=I(A,g);return B&&B.paths?E.concat(B.paths):E}(B,Q,A),C=0;CA.promises)),E=await import("path"),{URL:C}=await import("url"),I=new C(".",import.meta.url).pathname;try{let A=E.resolve(I,"..",B),C=E.resolve(A,Q);const D=await g.readFile(C,"utf8");if(!D)throw new Error("no results");return JSON.parse(D)}catch(C){const D=A("@code-hike/lighter",{basedir:I});let w=E.resolve(D,"..","..",B),o=E.resolve(w,Q);return JSON.parse(await g.readFile(o,"utf8"))}}async function Q(A){if("function"==typeof fetch){const B=await fetch(`https://lighter.codehike.org/${A}.json`);return await B.json()}const B=await import("https"),Q={host:"lighter.codehike.org",path:`/${A}.json`,method:"GET"};return new Promise(((A,g)=>{const E=B.request(Q,(B=>{let Q="";B.on("data",(A=>{Q+=A})),B.on("end",(()=>{A(JSON.parse(Q))}))}));E.on("error",(A=>{g(A)})),E.end()}))}const g=A=>/^#([A-Fa-f0-9]{3,4}){1,2}$/.test(A),E=(A,B)=>A.match(new RegExp(`.{${B}}`,"g")),C=A=>parseInt(A.repeat(2/A.length),16);function I(A,B){return void 0!==A?A/255:"number"!=typeof B||B<0||B>1?1:B}function D(A,B){if(!A)return A;const{r:Q,g:D,b:w,a:o}=function(A){if(!A)return;if(!g(A))throw new Error("Invalid color string, must be a valid hex color");const B=Math.floor((A.length-1)/3),Q=E(A.slice(1),B),[D,w,o,s]=Q.map(C);return{r:D,g:w,b:o,a:I(s,1)}}(A);return function(A){if(!A)return;const{r:B,g:Q,b:g,a:E}=A,C=Math.round(255*E);return`#${B.toString(16).padStart(2,"0")}${Q.toString(16).padStart(2,"0")}${g.toString(16).padStart(2,"0")}${C.toString(16).padStart(2,"0")}`}({r:Q,g:D,b:w,a:o*B})}function w(A,B){const Q=A.colors||{};if(Q[B])return Q[B];const g=s[B];if(!g)throw new Error(`Unknown theme color key: ${B}`);return"string"==typeof g?w(A,g):function(A,B){const Q=B[A.type];if(Array.isArray(Q)){const[B,g,...E]=Q;return B(w(A,g),...E)}return Q}(A,g)}const o="#6FC3DF",s={"editor.foreground":{dark:"#bbbbbb",light:"#333333",hc:"#ffffff"},"editorLineNumber.foreground":{dark:"#858585",light:"#237893",hc:"#fffffe"},"editor.selectionBackground":{light:"#ADD6FF",dark:"#264F78",hc:"#f3f518"},"editor.background":{light:"#fffffe",dark:"#1E1E1E",hc:"#000000"},"editorGroupHeader.tabsBackground":{dark:"#252526",light:"#F3F3F3"},"tab.activeBackground":"editor.background","tab.activeForeground":{dark:"#ffffff",light:"#333333",hc:"#ffffff"},"tab.border":{dark:"#252526",light:"#F3F3F3",hc:o},"tab.activeBorder":"tab.activeBackground","tab.inactiveBackground":{dark:"#2D2D2D",light:"#ECECEC"},"tab.inactiveForeground":{dark:[D,"tab.activeForeground",.5],light:[D,"tab.activeForeground",.5],hc:"#ffffff"},"diffEditor.insertedTextBackground":{dark:"#9ccc2c33",light:"#9ccc2c40"},"diffEditor.removedTextBackground":{dark:"#ff000033",light:"#ff000033"},"diffEditor.insertedLineBackground":{dark:"#9bb95533",light:"#9bb95533"},"diffEditor.removedLineBackground":{dark:"#ff000033",light:"#ff000033"},"icon.foreground":{dark:"#C5C5C5",light:"#424242",hc:"#FFFFFF"},"sideBar.background":{dark:"#252526",light:"#F3F3F3",hc:"#000000"},"sideBar.foreground":"editor.foreground","sideBar.border":"sideBar.background","list.inactiveSelectionBackground":{dark:"#37373D",light:"#E4E6F1"},"list.inactiveSelectionForeground":{},"list.hoverBackground":{dark:"#2A2D2E",light:"#F0F0F0"},"list.hoverForeground":{},"editorGroupHeader.tabsBorder":{hc:o},"tab.activeBorderTop":{hc:o},"tab.hoverBackground":"tab.inactiveBackground","tab.hoverForeground":"tab.inactiveForeground","editor.rangeHighlightBackground":{dark:"#ffffff0b",light:"#fdff0033"},"editor.infoForeground":{dark:"#3794FF",light:"#1a85ff",hc:"#3794FF"},"input.border":{hc:o},"input.background":{dark:"#3C3C3C",light:"#fffffe",hc:"#000000"},"input.foreground":"editor.foreground","editor.lineHighlightBackground":{},focusBorder:{light:"#0090F1",dark:"#007FD4",hc:o},"editorGroup.border":{dark:"#444444",light:"#E7E7E7",hc:o},"list.activeSelectionBackground":{dark:"#094771",light:"#0060C0",hc:"#000000"},"list.activeSelectionForeground":{dark:"#fffffe",light:"#fffffe",hc:"#fffffe"},"lighter.inlineBackground":{dark:[D,"editor.background",.9],light:[D,"editor.background",.9]},"terminal.background":"editor.background","terminal.foreground":"editor.foreground","terminal.ansiBlack":{dark:"#000000",light:"#000000",hc:"#000000"},"terminal.ansiRed":{dark:"#cd3131",light:"#cd3131",hc:"#cd0000"},"terminal.ansiGreen":{dark:"#0DBC79",light:"#00BC00",hc:"#00cd00"},"terminal.ansiYellow":{dark:"#e5e510",light:"#949800",hc:"#cdcd00"},"terminal.ansiBlue":{dark:"#2472c8",light:"#0451a5",hc:"#0000ee"},"terminal.ansiMagenta":{dark:"#bc3fbc",light:"#bc05bc",hc:"#cd00cd"},"terminal.ansiCyan":{dark:"#11a8cd",light:"#0598bc",hc:"#00cdcd"},"terminal.ansiWhite":{dark:"#e5e5e5",light:"#555555",hc:"#e5e5e5"},"terminal.ansiBrightBlack":{dark:"#666666",light:"#666666",hc:"#7f7f7f"},"terminal.ansiBrightRed":{dark:"#f14c4c",light:"#cd3131",hc:"#ff0000"},"terminal.ansiBrightGreen":{dark:"#23d18b",light:"#14CE14",hc:"#00ff00"},"terminal.ansiBrightYellow":{dark:"#f5f543",light:"#b5ba00",hc:"#ffff00"},"terminal.ansiBrightBlue":{dark:"#3b8eea",light:"#0451a5",hc:"#5c5cff"},"terminal.ansiBrightMagenta":{dark:"#d670d6",light:"#bc05bc",hc:"#ff00ff"},"terminal.ansiBrightCyan":{dark:"#29b8db",light:"#0598bc",hc:"#00ffff"},"terminal.ansiBrightWhite":{dark:"#e5e5e5",light:"#a5a5a5",hc:"#ffffff"}},e=new Map,c=new Map;async function i(A){if("string"==typeof A){const g=A;if(!h.includes(g))throw new a(g);if(!e.has(g)){const A=async function(A){try{return await B("themes",A+".json")}catch(B){return await Q(`themes/${A}`)}}(g).then((A=>(c.set(g,A),A)));e.set(g,A)}return e.get(g)}return A}function t(A){let B=null;if("string"==typeof A){if(B=c.get(A),!B)throw new Error("Syntax highlighting error: theme not loaded")}else B=A;return function(A){if(!A)return;const B=A.settings||A.tokenColors||[],Q={name:A.name||"unknown-theme",type:M(A),foreground:"",background:"",settings:B,colors:A.colors||{},colorNames:A.colorNames},g=B.find((A=>!A.scope));if(g){const{foreground:A,background:B}=(null==g?void 0:g.settings)||{},E={};A&&!Q.colors["editor.foreground"]&&(E["editor.foreground"]=A),B&&!Q.colors["editor.background"]&&(E["editor.background"]=B),Object.keys(E).length>0&&(Q.colors=Object.assign(Object.assign({},Q.colors),E)),Q.foreground=A,Q.background=B}g||(Q.settings=[{settings:{foreground:w(Q,"editor.foreground"),background:w(Q,"editor.background")}},...Q.settings]);if(Q.background=Q.background||w(Q,"editor.background"),Q.foreground=Q.foreground||w(Q,"editor.foreground"),"from-css"===A.type&&!Q.colorNames){const A={};let B=0;Q.settings=Q.settings.map((Q=>{const g=Object.assign(Object.assign({},Q),{settings:Object.assign({},Q.settings)}),{foreground:E,background:C}=g.settings||{};return E&&!A[E]&&(A[E]=`#${B.toString(16).padStart(6,"0")}`,B++),C&&!A[C]&&(A[C]=`#${B.toString(16).padStart(6,"0")}`,B++),E&&(g.settings.foreground=A[E]),C&&(g.settings.background=A[C]),g})),Q.colorNames=A}return Q}(B)}function M(A){var B;if("from-css"===A.type)return"from-css";return"light"===(A.type?A.type:(null===(B=A.name)||void 0===B?void 0:B.toLowerCase().includes("light"))?"light":"dark")?"light":"dark"}const h=["dark-plus","dracula-soft","dracula","github-dark","github-dark-dimmed","github-from-css","github-light","light-plus","material-darker","material-default","material-from-css","material-lighter","material-ocean","material-palenight","min-dark","min-light","monokai","nord","one-dark-pro","poimandres","slack-dark","slack-ochin","solarized-dark","solarized-light"];class a extends Error{constructor(A){super(`Unknown theme: ${A}`),this.theme=A}}function n(A){const B=B=>"colorScheme"===B?function(A){return"from-css"===A.type?"var(--ch-0)":A.type}(A):"foreground"===B?A.foreground:"background"===B?A.background:w(A,B);return{colorScheme:B("colorScheme"),foreground:B("foreground"),background:B("background"),lighter:{inlineBackground:B("lighter.inlineBackground")},editor:{background:B("editor.background"),foreground:B("editor.foreground"),lineHighlightBackground:B("editor.lineHighlightBackground"),rangeHighlightBackground:B("editor.rangeHighlightBackground"),infoForeground:B("editor.infoForeground"),selectionBackground:B("editor.selectionBackground")},focusBorder:B("focusBorder"),tab:{activeBackground:B("tab.activeBackground"),activeForeground:B("tab.activeForeground"),inactiveBackground:B("tab.inactiveBackground"),inactiveForeground:B("tab.inactiveForeground"),border:B("tab.border"),activeBorder:B("tab.activeBorder"),activeBorderTop:B("tab.activeBorderTop")},editorGroup:{border:B("editorGroup.border")},editorGroupHeader:{tabsBackground:B("editorGroupHeader.tabsBackground")},editorLineNumber:{foreground:B("editorLineNumber.foreground")},input:{background:B("input.background"),foreground:B("input.foreground"),border:B("input.border")},icon:{foreground:B("icon.foreground")},sideBar:{background:B("sideBar.background"),foreground:B("sideBar.foreground"),border:B("sideBar.border")},list:{activeSelectionBackground:B("list.activeSelectionBackground"),activeSelectionForeground:B("list.activeSelectionForeground"),hoverBackground:B("list.hoverBackground"),hoverForeground:B("list.hoverForeground")}}}const F=["abap","actionscript-3","ada","apache","apex","apl","applescript","ara","asm","astro","awk","ballerina","bash","bat","batch","be","beancount","berry","bibtex","bicep","blade","c","c#","cadence","cdc","clarity","clj","clojure","cmake","cmd","cobol","codeql","coffee","console","cpp","crystal","cs","csharp","css","cue","cypher","d","dart","dax","diff","docker","dockerfile","dream-maker","elixir","elm","erb","erl","erlang","f#","fish","fs","fsharp","fsl","gdresource","gdscript","gdshader","gherkin","git-commit","git-rebase","glimmer-js","glimmer-ts","glsl","gnuplot","go","graphql","groovy","hack","haml","handlebars","haskell","hbs","hcl","hjson","hlsl","hs","html","http","imba","ini","jade","java","javascript","jinja-html","jison","js","json","json5","jsonc","jsonl","jsonnet","jssm","jsx","julia","kotlin","kql","kusto","latex","less","liquid","lisp","logo","lua","make","makefile","markdown","marko","matlab","md","mdx","mermaid","narrat","nextflow","nginx","nim","nix","objc","objective-c","objective-cpp","ocaml","pascal","perl","perl6","php","plsql","postcss","powerquery","powershell","prisma","prolog","properties","proto","ps","ps1","pug","puppet","purescript","py","python","ql","r","raku","razor","rb","reg","rel","riscv","rs","rst","ruby","rust","sas","sass","scala","scheme","scss","sh","shader","shaderlab","shell","shellscript","shellsession","smalltalk","solidity","sparql","sql","ssh-config","stata","styl","stylus","svelte","swift","system-verilog","tasl","tcl","terminal","tex","text","toml","ts","tsx","turtle","twig","txt","typescript","v","vb","verilog","vhdl","vim","viml","vimscript","vue","vue-html","vyper","wasm","wenyan","wgsl","wolfram","xml","xsl","yaml","yml","zenscript","zsh","文言"],r={abap:"source.abap","actionscript-3":"source.actionscript.3",ada:"source.ada",apache:"source.apacheconf",apex:"source.apex",apl:"source.apl",applescript:"source.applescript",ara:"source.ara",asm:"source.asm.x86_64",astro:"source.astro",awk:"source.awk",ballerina:"source.ballerina",bat:"source.batchfile",batch:"source.batchfile",beancount:"text.beancount",berry:"source.berry",be:"source.berry",bibtex:"text.bibtex",bicep:"source.bicep",blade:"text.html.php.blade",c:"source.c",cadence:"source.cadence",cdc:"source.cadence",clarity:"source.clar",clojure:"source.clojure",clj:"source.clojure",cmake:"source.cmake",cobol:"source.cobol",codeql:"source.ql",ql:"source.ql",coffee:"source.coffee",cpp:"source.cpp",crystal:"source.crystal",csharp:"source.cs","c#":"source.cs",cs:"source.cs",css:"source.css",cue:"source.cue",cypher:"source.cypher",d:"source.d",dart:"source.dart",dax:"source.dax",diff:"source.diff",docker:"source.dockerfile",dockerfile:"source.dockerfile","dream-maker":"source.dm",elixir:"source.elixir",elm:"source.elm",erb:"text.html.erb",erlang:"source.erlang",erl:"source.erlang",fish:"source.fish",fsharp:"source.fsharp","f#":"source.fsharp",fs:"source.fsharp",gdresource:"source.gdresource",gdscript:"source.gdscript",gdshader:"source.gdshader",gherkin:"text.gherkin.feature","git-commit":"text.git-commit","git-rebase":"text.git-rebase","glimmer-js":"source.gjs","glimmer-ts":"source.gts",glsl:"source.glsl",gnuplot:"source.gnuplot",go:"source.go",graphql:"source.graphql",groovy:"source.groovy",hack:"source.hack",haml:"text.haml",handlebars:"text.html.handlebars",hbs:"text.html.handlebars",haskell:"source.haskell",hs:"source.haskell",hcl:"source.hcl",hjson:"source.hjson",hlsl:"source.hlsl",html:"text.html.basic",http:"source.http",imba:"source.imba",ini:"source.ini",properties:"source.ini",java:"source.java",javascript:"source.js",js:"source.js","jinja-html":"text.html.jinja",jison:"source.jison",json:"source.json",json5:"source.json5",jsonc:"source.json.comments",jsonl:"source.json.lines",jsonnet:"source.jsonnet",jssm:"source.jssm",fsl:"source.jssm",jsx:"source.js.jsx",julia:"source.julia",kotlin:"source.kotlin",kusto:"source.kusto",kql:"source.kusto",latex:"text.tex.latex",less:"source.css.less",liquid:"text.html.liquid",lisp:"source.lisp",logo:"source.logo",lua:"source.lua",make:"source.makefile",makefile:"source.makefile",markdown:"text.html.markdown",md:"text.html.markdown",marko:"text.marko",matlab:"source.matlab",mdx:"source.mdx",mermaid:"source.mermaid",narrat:"source.narrat",nextflow:"source.nextflow",nginx:"source.nginx",nim:"source.nim",nix:"source.nix","objective-c":"source.objc",objc:"source.objc","objective-cpp":"source.objcpp",ocaml:"source.ocaml",pascal:"source.pascal",perl:"source.perl",php:"source.php",plsql:"source.plsql.oracle",postcss:"source.css.postcss",powerquery:"source.powerquery",powershell:"source.powershell",ps:"source.powershell",ps1:"source.powershell",prisma:"source.prisma",prolog:"source.prolog",proto:"source.proto",pug:"text.pug",jade:"text.pug",puppet:"source.puppet",purescript:"source.purescript",python:"source.python",py:"source.python",r:"source.r",raku:"source.perl.6",perl6:"source.perl.6",razor:"text.aspnetcorerazor",reg:"source.reg",rel:"source.rel",riscv:"source.riscv",rst:"source.rst",ruby:"source.ruby",rb:"source.ruby",rust:"source.rust",rs:"source.rust",sas:"source.sas",sass:"source.sass",scala:"source.scala",scheme:"source.scheme",scss:"source.css.scss",shaderlab:"source.shaderlab",shader:"source.shaderlab",shellscript:"source.shell",bash:"source.shell",console:"source.shell",sh:"source.shell",shell:"source.shell",zsh:"source.shell",shellsession:"text.shell-session",smalltalk:"source.smalltalk",solidity:"source.solidity",sparql:"source.sparql",sql:"source.sql","ssh-config":"source.ssh-config",stata:"source.stata",stylus:"source.stylus",styl:"source.stylus",svelte:"source.svelte",swift:"source.swift","system-verilog":"source.systemverilog",tasl:"source.tasl",tcl:"source.tcl",tex:"text.tex",toml:"source.toml",tsx:"source.tsx",turtle:"source.turtle",twig:"text.html.twig",txt:"source.txt",typescript:"source.ts",ts:"source.ts",v:"source.v",vb:"source.asp.vb.net",cmd:"source.asp.vb.net",verilog:"source.verilog",vhdl:"source.vhdl",viml:"source.viml",vim:"source.viml",vimscript:"source.viml","vue-html":"text.html.vue-html",vue:"source.vue",vyper:"source.vyper",wasm:"source.wat",wenyan:"source.wenyan","文言":"source.wenyan",wgsl:"source.wgsl",wolfram:"source.wolfram",xml:"text.xml",xsl:"text.xml.xsl",yaml:"source.yaml",yml:"source.yaml",zenscript:"source.zenscript"},G={"source.abap":{id:"abap",path:"abap.tmLanguage.json",embeddedScopes:[]},"source.actionscript.3":{id:"actionscript-3",path:"actionscript-3.tmLanguage.json",embeddedScopes:[]},"source.ada":{id:"ada",path:"ada.tmLanguage.json",embeddedScopes:[]},"source.apacheconf":{id:"apache",path:"apache.tmLanguage.json",embeddedScopes:[]},"source.apex":{id:"apex",path:"apex.tmLanguage.json",embeddedScopes:[]},"source.apl":{id:"apl",path:"apl.tmLanguage.json",embeddedScopes:["source.java","source.json","source.js","source.css","text.xml","text.html.basic"]},"source.applescript":{id:"applescript",path:"applescript.tmLanguage.json",embeddedScopes:[]},"source.ara":{id:"ara",path:"ara.tmLanguage.json",embeddedScopes:[]},"source.asm.x86_64":{id:"asm",path:"asm.tmLanguage.json",embeddedScopes:[]},"source.astro":{id:"astro",path:"astro.tmLanguage.json",embeddedScopes:["source.tsx","source.css.postcss","source.css.less","source.css.scss","source.css","source.sass","source.stylus","source.ts","source.js","source.json"]},"source.awk":{id:"awk",path:"awk.tmLanguage.json",embeddedScopes:[]},"source.ballerina":{id:"ballerina",path:"ballerina.tmLanguage.json",embeddedScopes:[]},"source.batchfile":{id:"bat",path:"bat.tmLanguage.json",embeddedScopes:[]},"text.beancount":{id:"beancount",path:"beancount.tmLanguage.json",embeddedScopes:[]},"source.berry":{id:"berry",path:"berry.tmLanguage.json",embeddedScopes:[]},"text.bibtex":{id:"bibtex",path:"bibtex.tmLanguage.json",embeddedScopes:[]},"source.bicep":{id:"bicep",path:"bicep.tmLanguage.json",embeddedScopes:[]},"text.html.php.blade":{id:"blade",path:"blade.tmLanguage.json",embeddedScopes:["source.java","source.css","source.json","source.js","source.sql","text.xml","text.html.basic"]},"source.c":{id:"c",path:"c.tmLanguage.json",embeddedScopes:[]},"source.cadence":{id:"cadence",path:"cadence.tmLanguage.json",embeddedScopes:[]},"source.clar":{id:"clarity",path:"clarity.tmLanguage.json",embeddedScopes:[]},"source.clojure":{id:"clojure",path:"clojure.tmLanguage.json",embeddedScopes:[]},"source.cmake":{id:"cmake",path:"cmake.tmLanguage.json",embeddedScopes:[]},"source.cobol":{id:"cobol",path:"cobol.tmLanguage.json",embeddedScopes:["source.css","source.js","source.java","text.html.basic","source.sql"]},"source.ql":{id:"codeql",path:"codeql.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.stylus","source.sass","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.tsx","source.ts","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.css.scss","source.swift","source.objc","source.css.less","source.json.comments","source.json","source.js","text.pug","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.coffee","source.clojure","source.batchfile","source.yaml","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","text.html.basic","source.css","text.html.markdown"]},"source.coffee":{id:"coffee",path:"coffee.tmLanguage.json",embeddedScopes:["source.js"]},"source.cpp":{id:"cpp",path:"cpp.tmLanguage.json",embeddedScopes:["source.c","source.sql","source.glsl"]},"source.crystal":{id:"crystal",path:"crystal.tmLanguage.json",embeddedScopes:["source.shell","source.js","source.c","source.css","source.sql","text.html.basic"]},"source.cs":{id:"csharp",path:"csharp.tmLanguage.json",embeddedScopes:[]},"source.css":{id:"css",path:"css.tmLanguage.json",embeddedScopes:[]},"source.cue":{id:"cue",path:"cue.tmLanguage.json",embeddedScopes:[]},"source.cypher":{id:"cypher",path:"cypher.tmLanguage.json",embeddedScopes:[]},"source.d":{id:"d",path:"d.tmLanguage.json",embeddedScopes:[]},"source.dart":{id:"dart",path:"dart.tmLanguage.json",embeddedScopes:[]},"source.dax":{id:"dax",path:"dax.tmLanguage.json",embeddedScopes:[]},"source.diff":{id:"diff",path:"diff.tmLanguage.json",embeddedScopes:[]},"source.dockerfile":{id:"docker",path:"docker.tmLanguage.json",embeddedScopes:[]},"source.dm":{id:"dream-maker",path:"dream-maker.tmLanguage.json",embeddedScopes:[]},"source.elixir":{id:"elixir",path:"elixir.tmLanguage.json",embeddedScopes:["source.css","source.js","text.html.basic"]},"source.elm":{id:"elm",path:"elm.tmLanguage.json",embeddedScopes:["source.c","source.glsl"]},"text.html.erb":{id:"erb",path:"erb.tmLanguage.json",embeddedScopes:["source.java","source.lua","source.shell","source.c","source.sql","text.xml","source.css","source.js","source.ruby","text.html.basic"]},"source.erlang":{id:"erlang",path:"erlang.tmLanguage.json",embeddedScopes:[]},"source.fish":{id:"fish",path:"fish.tmLanguage.json",embeddedScopes:[]},"source.fsharp":{id:"fsharp",path:"fsharp.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.stylus","source.sass","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.cs","source.tsx","source.ts","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.css.scss","source.swift","source.objc","source.css.less","source.json.comments","source.json","source.js","text.pug","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.coffee","source.clojure","source.batchfile","source.yaml","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","text.html.basic","source.css","text.html.markdown"]},"source.gdresource":{id:"gdresource",path:"gdresource.tmLanguage.json",embeddedScopes:["source.gdscript","source.gdshader"]},"source.gdscript":{id:"gdscript",path:"gdscript.tmLanguage.json",embeddedScopes:[]},"source.gdshader":{id:"gdshader",path:"gdshader.tmLanguage.json",embeddedScopes:[]},"text.gherkin.feature":{id:"gherkin",path:"gherkin.tmLanguage.json",embeddedScopes:[]},"text.git-commit":{id:"git-commit",path:"git-commit.tmLanguage.json",embeddedScopes:["source.diff"]},"text.git-rebase":{id:"git-rebase",path:"git-rebase.tmLanguage.json",embeddedScopes:["source.shell"]},"source.gjs":{id:"glimmer-js",path:"glimmer-js.tmLanguage.json",embeddedScopes:["source.yaml","source.css","text.html.basic","text.html.handlebars","source.js"]},"source.gts":{id:"glimmer-ts",path:"glimmer-ts.tmLanguage.json",embeddedScopes:["source.yaml","source.js","source.css","text.html.basic","text.html.handlebars","source.ts"]},"source.glsl":{id:"glsl",path:"glsl.tmLanguage.json",embeddedScopes:["source.c"]},"source.gnuplot":{id:"gnuplot",path:"gnuplot.tmLanguage.json",embeddedScopes:[]},"source.go":{id:"go",path:"go.tmLanguage.json",embeddedScopes:[]},"source.graphql":{id:"graphql",path:"graphql.tmLanguage.json",embeddedScopes:["source.tsx","source.js.jsx","source.ts","source.js"]},"source.groovy":{id:"groovy",path:"groovy.tmLanguage.json",embeddedScopes:[]},"source.hack":{id:"hack",path:"hack.tmLanguage.json",embeddedScopes:["source.css","source.js","source.sql","text.html.basic"]},"text.haml":{id:"haml",path:"haml.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.stylus","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.tsx","source.ts","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.css.scss","source.swift","source.objc","source.css.less","source.json.comments","source.json","text.pug","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.clojure","source.batchfile","source.yaml","text.xml.xsl","source.asp.vb.net","source.php","source.r","source.perl","source.makefile","source.java","source.ini","source.lua","source.shell","source.c","source.sql","text.xml","text.html.basic","source.css","text.html.markdown","source.coffee","source.sass","source.js","source.ruby"]},"text.html.handlebars":{id:"handlebars",path:"handlebars.tmLanguage.json",embeddedScopes:["source.yaml","source.js","source.css","text.html.basic"]},"source.haskell":{id:"haskell",path:"haskell.tmLanguage.json",embeddedScopes:[]},"source.hcl":{id:"hcl",path:"hcl.tmLanguage.json",embeddedScopes:[]},"source.hjson":{id:"hjson",path:"hjson.tmLanguage.json",embeddedScopes:[]},"source.hlsl":{id:"hlsl",path:"hlsl.tmLanguage.json",embeddedScopes:[]},"text.html.basic":{id:"html",path:"html.tmLanguage.json",embeddedScopes:["source.css","source.js"]},"source.http":{id:"http",path:"http.tmLanguage.json",embeddedScopes:["source.tsx","source.js.jsx","source.ts","source.js","source.java","source.graphql","text.xml","source.json","source.shell"]},"source.imba":{id:"imba",path:"imba.tmLanguage.json",embeddedScopes:[]},"source.ini":{id:"ini",path:"ini.tmLanguage.json",embeddedScopes:[]},"source.java":{id:"java",path:"java.tmLanguage.json",embeddedScopes:[]},"source.js":{id:"javascript",path:"javascript.tmLanguage.json",embeddedScopes:[]},"text.html.jinja":{id:"jinja-html",path:"jinja-html.tmLanguage.json",embeddedScopes:["source.css","source.js","text.html.basic"]},"source.jison":{id:"jison",path:"jison.tmLanguage.json",embeddedScopes:["source.js"]},"source.json":{id:"json",path:"json.tmLanguage.json",embeddedScopes:[]},"source.json5":{id:"json5",path:"json5.tmLanguage.json",embeddedScopes:[]},"source.json.comments":{id:"jsonc",path:"jsonc.tmLanguage.json",embeddedScopes:[]},"source.json.lines":{id:"jsonl",path:"jsonl.tmLanguage.json",embeddedScopes:[]},"source.jsonnet":{id:"jsonnet",path:"jsonnet.tmLanguage.json",embeddedScopes:[]},"source.jssm":{id:"jssm",path:"jssm.tmLanguage.json",embeddedScopes:[]},"source.js.jsx":{id:"jsx",path:"jsx.tmLanguage.json",embeddedScopes:[]},"source.julia":{id:"julia",path:"julia.tmLanguage.json",embeddedScopes:["source.c","source.glsl","source.sql","source.r","source.js","source.python","source.cpp"]},"source.kotlin":{id:"kotlin",path:"kotlin.tmLanguage.json",embeddedScopes:[]},"source.kusto":{id:"kusto",path:"kusto.tmLanguage.json",embeddedScopes:[]},"text.tex.latex":{id:"latex",path:"latex.tmLanguage.json",embeddedScopes:["source.glsl","source.shell","source.sql","source.cpp","source.c","source.r","source.gnuplot","source.scala","source.rust","source.yaml","source.python","source.ts","source.js","source.ruby","source.julia","source.lua","source.java","text.xml","text.html.basic","source.haskell","source.css","text.tex"]},"source.css.less":{id:"less",path:"less.tmLanguage.json",embeddedScopes:["source.css"]},"text.html.liquid":{id:"liquid",path:"liquid.tmLanguage.json",embeddedScopes:["source.js","source.json","source.css","text.html.basic"]},"source.lisp":{id:"lisp",path:"lisp.tmLanguage.json",embeddedScopes:[]},"source.logo":{id:"logo",path:"logo.tmLanguage.json",embeddedScopes:[]},"source.lua":{id:"lua",path:"lua.tmLanguage.json",embeddedScopes:["source.c"]},"source.makefile":{id:"make",path:"make.tmLanguage.json",embeddedScopes:[]},"text.html.markdown":{id:"markdown",path:"markdown.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.stylus","source.sass","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.tsx","source.ts","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.css.scss","source.swift","source.objc","source.css.less","source.json.comments","source.json","source.js","text.pug","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.coffee","source.clojure","source.batchfile","source.yaml","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","text.html.basic","source.css"]},"text.marko":{id:"marko",path:"marko.tmLanguage.json",embeddedScopes:["source.js","source.css.scss","source.css.less","source.css"]},"source.matlab":{id:"matlab",path:"matlab.tmLanguage.json",embeddedScopes:[]},"source.mdx":{id:"mdx",path:"mdx.tmLanguage.json",embeddedScopes:["source.gnuplot","text.tex","source.stylus","source.sass","text.bibtex","text.tex.latex","text.html.handlebars","source.dart","source.fsharp","source.powershell","source.perl.6","source.json.comments","text.pug","source.groovy","text.git-rebase","text.git-commit","source.batchfile","text.xml.xsl","source.asp.vb.net","source.php","source.js.jsx","source.glsl","source.ts","source.swift","text.xml","source.sql","text.shell-session","source.shell","source.css.scss","source.scala","source.rust","source.ruby","source.r","source.python","source.perl","source.objc","text.html.markdown","source.makefile","source.lua","source.css.less","source.kotlin","source.julia","source.json","source.js","source.java","source.ini","text.html.basic","source.haskell","source.graphql","source.go","source.erlang","source.elm","source.elixir","source.dockerfile","source.diff","source.css","source.cs","source.cpp","source.coffee","source.clojure","source.c","source.yaml","source.toml","source.tsx"]},"source.mermaid":{id:"mermaid",path:"mermaid.tmLanguage.json",embeddedScopes:[]},"source.narrat":{id:"narrat",path:"narrat.tmLanguage.json",embeddedScopes:[]},"source.nextflow":{id:"nextflow",path:"nextflow.tmLanguage.json",embeddedScopes:[]},"source.nginx":{id:"nginx",path:"nginx.tmLanguage.json",embeddedScopes:["source.c","source.lua"]},"source.nim":{id:"nim",path:"nim.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.stylus","source.sass","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.tsx","source.ts","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.css.scss","source.swift","source.objc","source.css.less","source.json.comments","source.json","text.pug","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.coffee","source.clojure","source.batchfile","source.yaml","text.xml.xsl","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.ini","source.java","text.html.markdown","source.glsl","source.css","source.js","text.xml","text.html.basic","source.c"]},"source.nix":{id:"nix",path:"nix.tmLanguage.json",embeddedScopes:[]},"source.objc":{id:"objective-c",path:"objective-c.tmLanguage.json",embeddedScopes:[]},"source.objcpp":{id:"objective-cpp",path:"objective-cpp.tmLanguage.json",embeddedScopes:[]},"source.ocaml":{id:"ocaml",path:"ocaml.tmLanguage.json",embeddedScopes:[]},"source.pascal":{id:"pascal",path:"pascal.tmLanguage.json",embeddedScopes:[]},"source.perl":{id:"perl",path:"perl.tmLanguage.json",embeddedScopes:["source.java","source.sql","source.js","source.css","text.xml","text.html.basic"]},"source.php":{id:"php",path:"php.tmLanguage.json",embeddedScopes:["source.java","source.css","source.json","source.js","source.sql","text.xml","text.html.basic"]},"source.plsql.oracle":{id:"plsql",path:"plsql.tmLanguage.json",embeddedScopes:[]},"source.css.postcss":{id:"postcss",path:"postcss.tmLanguage.json",embeddedScopes:[]},"source.powerquery":{id:"powerquery",path:"powerquery.tmLanguage.json",embeddedScopes:[]},"source.powershell":{id:"powershell",path:"powershell.tmLanguage.json",embeddedScopes:[]},"source.prisma":{id:"prisma",path:"prisma.tmLanguage.json",embeddedScopes:[]},"source.prolog":{id:"prolog",path:"prolog.tmLanguage.json",embeddedScopes:[]},"source.proto":{id:"proto",path:"proto.tmLanguage.json",embeddedScopes:[]},"text.pug":{id:"pug",path:"pug.tmLanguage.json",embeddedScopes:["text.html.basic","source.coffee","source.stylus","source.css.scss","source.sass","source.css","source.js"]},"source.puppet":{id:"puppet",path:"puppet.tmLanguage.json",embeddedScopes:[]},"source.purescript":{id:"purescript",path:"purescript.tmLanguage.json",embeddedScopes:[]},"source.python":{id:"python",path:"python.tmLanguage.json",embeddedScopes:[]},"source.r":{id:"r",path:"r.tmLanguage.json",embeddedScopes:[]},"source.perl.6":{id:"raku",path:"raku.tmLanguage.json",embeddedScopes:[]},"text.aspnetcorerazor":{id:"razor",path:"razor.tmLanguage.json",embeddedScopes:["source.css","source.js","source.cs","text.html.basic"]},"source.reg":{id:"reg",path:"reg.tmLanguage.json",embeddedScopes:[]},"source.rel":{id:"rel",path:"rel.tmLanguage.json",embeddedScopes:[]},"source.riscv":{id:"riscv",path:"riscv.tmLanguage.json",embeddedScopes:[]},"source.rst":{id:"rst",path:"rst.tmLanguage.json",embeddedScopes:["source.java","source.lua","source.c","source.css","text.xml","text.html.basic","source.sql","source.glsl","source.ruby","source.cmake","source.yaml","source.shell","source.js","source.python","source.cpp"]},"source.ruby":{id:"ruby",path:"ruby.tmLanguage.json",embeddedScopes:["source.java","source.lua","source.shell","source.js","source.c","source.css","source.sql","text.xml","text.html.basic"]},"source.rust":{id:"rust",path:"rust.tmLanguage.json",embeddedScopes:[]},"source.sas":{id:"sas",path:"sas.tmLanguage.json",embeddedScopes:["source.sql"]},"source.sass":{id:"sass",path:"sass.tmLanguage.json",embeddedScopes:[]},"source.scala":{id:"scala",path:"scala.tmLanguage.json",embeddedScopes:[]},"source.scheme":{id:"scheme",path:"scheme.tmLanguage.json",embeddedScopes:[]},"source.css.scss":{id:"scss",path:"scss.tmLanguage.json",embeddedScopes:["source.css"]},"source.shaderlab":{id:"shaderlab",path:"shaderlab.tmLanguage.json",embeddedScopes:["source.hlsl"]},"source.shell":{id:"shellscript",path:"shellscript.tmLanguage.json",embeddedScopes:[]},"text.shell-session":{id:"shellsession",path:"shellsession.tmLanguage.json",embeddedScopes:["source.shell"]},"source.smalltalk":{id:"smalltalk",path:"smalltalk.tmLanguage.json",embeddedScopes:[]},"source.solidity":{id:"solidity",path:"solidity.tmLanguage.json",embeddedScopes:[]},"source.sparql":{id:"sparql",path:"sparql.tmLanguage.json",embeddedScopes:["source.turtle"]},"source.sql":{id:"sql",path:"sql.tmLanguage.json",embeddedScopes:[]},"source.ssh-config":{id:"ssh-config",path:"ssh-config.tmLanguage.json",embeddedScopes:[]},"source.stata":{id:"stata",path:"stata.tmLanguage.json",embeddedScopes:["source.sql"]},"source.stylus":{id:"stylus",path:"stylus.tmLanguage.json",embeddedScopes:[]},"source.svelte":{id:"svelte",path:"svelte.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.tsx","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.swift","source.objc","source.json.comments","source.json","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.clojure","source.batchfile","source.yaml","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","text.html.basic","text.html.markdown","text.pug","source.css.postcss","source.css.less","source.css.scss","source.css","source.sass","source.stylus","source.coffee","source.ts","source.js"]},"source.swift":{id:"swift",path:"swift.tmLanguage.json",embeddedScopes:[]},"source.systemverilog":{id:"system-verilog",path:"system-verilog.tmLanguage.json",embeddedScopes:[]},"source.tasl":{id:"tasl",path:"tasl.tmLanguage.json",embeddedScopes:[]},"source.tcl":{id:"tcl",path:"tcl.tmLanguage.json",embeddedScopes:[]},"text.tex":{id:"tex",path:"tex.tmLanguage.json",embeddedScopes:["source.r"]},"source.toml":{id:"toml",path:"toml.tmLanguage.json",embeddedScopes:[]},"source.tsx":{id:"tsx",path:"tsx.tmLanguage.json",embeddedScopes:[]},"source.turtle":{id:"turtle",path:"turtle.tmLanguage.json",embeddedScopes:[]},"text.html.twig":{id:"twig",path:"twig.tmLanguage.json",embeddedScopes:["source.java","source.lua","source.shell","source.c","source.json","source.sql","text.xml","text.html.basic","source.ruby","source.python","source.php","source.js","source.css"]},"source.txt":{id:"txt",path:"txt.tmLanguage.json",embeddedScopes:[]},"source.ts":{id:"typescript",path:"typescript.tmLanguage.json",embeddedScopes:[]},"source.v":{id:"v",path:"v.tmLanguage.json",embeddedScopes:[]},"source.asp.vb.net":{id:"vb",path:"vb.tmLanguage.json",embeddedScopes:[]},"source.verilog":{id:"verilog",path:"verilog.tmLanguage.json",embeddedScopes:[]},"source.vhdl":{id:"vhdl",path:"vhdl.tmLanguage.json",embeddedScopes:[]},"source.viml":{id:"viml",path:"viml.tmLanguage.json",embeddedScopes:[]},"text.html.vue-html":{id:"vue-html",path:"vue-html.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.swift","source.objc","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.coffee","source.clojure","source.batchfile","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","source.graphql","source.toml","source.yaml","source.json5","source.json.comments","source.json","source.tsx","source.js.jsx","source.ts","source.css.less","source.css.scss","source.css","source.sass","source.stylus","text.pug","text.html.markdown","text.html.basic","source.js","source.vue"]},"source.vue":{id:"vue",path:"vue.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.swift","source.objc","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.coffee","source.clojure","source.batchfile","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","source.graphql","source.toml","source.yaml","source.json5","source.json.comments","source.json","source.tsx","source.js.jsx","source.ts","source.js","source.css.less","source.css.scss","source.css","source.sass","source.stylus","text.pug","text.html.markdown","text.html.basic"]},"source.vyper":{id:"vyper",path:"vyper.tmLanguage.json",embeddedScopes:[]},"source.wat":{id:"wasm",path:"wasm.tmLanguage.json",embeddedScopes:[]},"source.wenyan":{id:"wenyan",path:"wenyan.tmLanguage.json",embeddedScopes:[]},"source.wgsl":{id:"wgsl",path:"wgsl.tmLanguage.json",embeddedScopes:[]},"source.wolfram":{id:"wolfram",path:"wolfram.tmLanguage.json",embeddedScopes:[]},"text.xml":{id:"xml",path:"xml.tmLanguage.json",embeddedScopes:["source.java"]},"text.xml.xsl":{id:"xsl",path:"xsl.tmLanguage.json",embeddedScopes:["source.java","text.xml"]},"source.yaml":{id:"yaml",path:"yaml.tmLanguage.json",embeddedScopes:[]},"source.zenscript":{id:"zenscript",path:"zenscript.tmLanguage.json",embeddedScopes:[]}};var N={d:(A,B)=>{for(var Q in B)N.o(B,Q)&&!N.o(A,Q)&&Object.defineProperty(A,Q,{enumerable:!0,get:B[Q]})},o:(A,B)=>Object.prototype.hasOwnProperty.call(A,B)},L={};N.d(L,{_X:()=>XA,Bz:()=>vA,ot:()=>TA,u:()=>WA,jG:()=>Y,Pn:()=>ZA});const H="undefined"!=typeof process&&!!process.env.VSCODE_TEXTMATE_DEBUG;var k;function R(A,B){const Q=[],g=function(A){let B=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,Q=B.exec(A);return{next:()=>{if(!Q)return null;const g=Q[0];return Q=B.exec(A),g}}}(A);let E=g.next();for(;null!==E;){let A=0;if(2===E.length&&":"===E.charAt(1)){switch(E.charAt(0)){case"R":A=1;break;case"L":A=-1;break;default:console.log(`Unknown priority ${E} in scope selector`)}E=g.next()}let B=I();if(Q.push({matcher:B,priority:A}),","!==E)break;E=g.next()}return Q;function C(){if("-"===E){E=g.next();const A=C();return B=>!!A&&!A(B)}if("("===E){E=g.next();const A=function(){const A=[];let B=I();for(;B&&(A.push(B),"|"===E||","===E);){do{E=g.next()}while("|"===E||","===E);B=I()}return B=>A.some((A=>A(B)))}();return")"===E&&(E=g.next()),A}if(K(E)){const A=[];do{A.push(E),E=g.next()}while(K(E));return Q=>B(A,Q)}return null}function I(){const A=[];let B=C();for(;B;)A.push(B),B=C();return B=>A.every((A=>A(B)))}}function K(A){return!!A&&!!A.match(/[\w\.:]+/)}function Y(A){"function"==typeof A.dispose&&A.dispose()}function U(A){return Array.isArray(A)?function(A){let B=[];for(let Q=0,g=A.length;Q{for(let Q in B)A[Q]=B[Q]})),A}function P(A){const B=~A.lastIndexOf("/")||~A.lastIndexOf("\\");return 0===B?A:~B==A.length-1?P(A.substring(0,A.length-1)):A.substr(1+~B)}!function(A){A.toBinaryStr=function(A){let B=A.toString(2);for(;B.length<32;)B="0"+B;return B},A.print=function(B){const Q=A.getLanguageId(B),g=A.getTokenType(B),E=A.getFontStyle(B),C=A.getForeground(B),I=A.getBackground(B);console.log({languageId:Q,tokenType:g,fontStyle:E,foreground:C,background:I})},A.getLanguageId=function(A){return(255&A)>>>0},A.getTokenType=function(A){return(768&A)>>>8},A.containsBalancedBrackets=function(A){return 0!=(1024&A)},A.getFontStyle=function(A){return(30720&A)>>>11},A.getForeground=function(A){return(16744448&A)>>>15},A.getBackground=function(A){return(4278190080&A)>>>24},A.set=function(B,Q,g,E,C,I,D){let w=A.getLanguageId(B),o=A.getTokenType(B),s=A.containsBalancedBrackets(B)?1:0,e=A.getFontStyle(B),c=A.getForeground(B),i=A.getBackground(B);return 0!==Q&&(w=Q),8!==g&&(o=g),null!==E&&(s=E?1:0),-1!==C&&(e=C),0!==I&&(c=I),0!==D&&(i=D),(w<<0|o<<8|s<<10|e<<11|c<<15|i<<24)>>>0}}(k||(k={}));let y=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g;class J{static hasCaptures(A){return null!==A&&(y.lastIndex=0,y.test(A))}static replaceCaptures(A,B,Q){return A.replace(y,((A,g,E,C)=>{let I=Q[parseInt(g||E,10)];if(!I)return A;{let A=B.substring(I.start,I.end);for(;"."===A[0];)A=A.substring(1);switch(C){case"downcase":return A.toLowerCase();case"upcase":return A.toUpperCase();default:return A}}}))}}function S(A,B){return AB?1:0}function p(A,B){if(null===A&&null===B)return 0;if(!A)return-1;if(!B)return 1;let Q=A.length,g=B.length;if(Q===g){for(let g=0;g`);return}const C=Q.lookup(B);A instanceof m?v({baseGrammar:C,selfGrammar:E},g):T(A.ruleName,{baseGrammar:C,selfGrammar:E,repository:E.repository},g);const I=Q.injections(A.scopeName);if(I)for(const A of I)g.add(new m(A))}function T(A,B,Q){B.repository&&B.repository[A]&&X([B.repository[A]],B,Q)}function v(A,B){A.selfGrammar.patterns&&Array.isArray(A.selfGrammar.patterns)&&X(A.selfGrammar.patterns,{...A,repository:A.selfGrammar.repository},B),A.selfGrammar.injections&&X(Object.values(A.selfGrammar.injections),{...A,repository:A.selfGrammar.repository},B)}function X(A,B,Q){for(const g of A){if(Q.visitedRule.has(g))continue;Q.visitedRule.add(g);const A=g.repository?u({},B.repository,g.repository):B.repository;Array.isArray(g.patterns)&&X(g.patterns,{...B,repository:A},Q);const E=g.include;if(!E)continue;const C=$(E);switch(C.kind){case 0:v({...B,selfGrammar:B.baseGrammar},Q);break;case 1:v(B,Q);break;case 2:T(C.ruleName,{...B,repository:A},Q);break;case 3:case 4:const g=C.scopeName===B.selfGrammar.scopeName?B.selfGrammar:C.scopeName===B.baseGrammar.scopeName?B.baseGrammar:void 0;if(g){const E={baseGrammar:B.baseGrammar,selfGrammar:g,repository:A};4===C.kind?T(C.ruleName,E,Q):v(E,Q)}else 4===C.kind?Q.add(new O(C.scopeName,C.ruleName)):Q.add(new m(C.scopeName))}}}class Z{constructor(){this.kind=0}}class j{constructor(){this.kind=1}}class V{constructor(A){this.ruleName=A,this.kind=2}}class z{constructor(A){this.scopeName=A,this.kind=3}}class _{constructor(A,B){this.scopeName=A,this.ruleName=B,this.kind=4}}function $(A){if("$base"===A)return new Z;if("$self"===A)return new j;const B=A.indexOf("#");if(-1===B)return new z(A);if(0===B)return new V(A.substring(1));{const Q=A.substring(0,B),g=A.substring(B+1);return new _(Q,g)}}const AA=/\\(\d+)/,BA=/\\(\d+)/g;class QA{constructor(A,B,Q,g){this.$location=A,this.id=B,this._name=Q||null,this._nameIsCapturing=J.hasCaptures(this._name),this._contentName=g||null,this._contentNameIsCapturing=J.hasCaptures(this._contentName)}get debugName(){const A=this.$location?`${P(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${A}`}getName(A,B){return this._nameIsCapturing&&null!==this._name&&null!==A&&null!==B?J.replaceCaptures(this._name,A,B):this._name}getContentName(A,B){return this._contentNameIsCapturing&&null!==this._contentName?J.replaceCaptures(this._contentName,A,B):this._contentName}}class gA extends QA{constructor(A,B,Q,g,E){super(A,B,Q,g),this.retokenizeCapturedWithRuleId=E}dispose(){}collectPatterns(A,B){throw new Error("Not supported!")}compile(A,B){throw new Error("Not supported!")}compileAG(A,B,Q,g){throw new Error("Not supported!")}}class EA extends QA{constructor(A,B,Q,g,E){super(A,B,Q,null),this._match=new oA(g,this.id),this.captures=E,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(A,B){B.push(this._match)}compile(A,B){return this._getCachedCompiledPatterns(A).compile(A)}compileAG(A,B,Q,g){return this._getCachedCompiledPatterns(A).compileAG(A,Q,g)}_getCachedCompiledPatterns(A){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new sA,this.collectPatterns(A,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}}class CA extends QA{constructor(A,B,Q,g,E){super(A,B,Q,g),this.patterns=E.patterns,this.hasMissingPatterns=E.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(A,B){for(const Q of this.patterns)A.getRule(Q).collectPatterns(A,B)}compile(A,B){return this._getCachedCompiledPatterns(A).compile(A)}compileAG(A,B,Q,g){return this._getCachedCompiledPatterns(A).compileAG(A,Q,g)}_getCachedCompiledPatterns(A){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new sA,this.collectPatterns(A,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}}class IA extends QA{constructor(A,B,Q,g,E,C,I,D,w,o){super(A,B,Q,g),this._begin=new oA(E,this.id),this.beginCaptures=C,this._end=new oA(I||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=D,this.applyEndPatternLast=w||!1,this.patterns=o.patterns,this.hasMissingPatterns=o.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(A,B){return this._end.resolveBackReferences(A,B)}collectPatterns(A,B){B.push(this._begin)}compile(A,B){return this._getCachedCompiledPatterns(A,B).compile(A)}compileAG(A,B,Q,g){return this._getCachedCompiledPatterns(A,B).compileAG(A,Q,g)}_getCachedCompiledPatterns(A,B){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new sA;for(const B of this.patterns)A.getRule(B).collectPatterns(A,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,B):this._cachedCompiledPatterns.setSource(0,B)),this._cachedCompiledPatterns}}class DA extends QA{constructor(A,B,Q,g,E,C,I,D,w){super(A,B,Q,g),this._begin=new oA(E,this.id),this.beginCaptures=C,this.whileCaptures=D,this._while=new oA(I,-2),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=w.patterns,this.hasMissingPatterns=w.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(A,B){return this._while.resolveBackReferences(A,B)}collectPatterns(A,B){B.push(this._begin)}compile(A,B){return this._getCachedCompiledPatterns(A).compile(A)}compileAG(A,B,Q,g){return this._getCachedCompiledPatterns(A).compileAG(A,Q,g)}_getCachedCompiledPatterns(A){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new sA;for(const B of this.patterns)A.getRule(B).collectPatterns(A,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(A,B){return this._getCachedCompiledWhilePatterns(A,B).compile(A)}compileWhileAG(A,B,Q,g){return this._getCachedCompiledWhilePatterns(A,B).compileAG(A,Q,g)}_getCachedCompiledWhilePatterns(A,B){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new sA,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,B||"￿"),this._cachedCompiledWhilePatterns}}class wA{static createCaptureRule(A,B,Q,g,E){return A.registerRule((A=>new gA(B,A,Q,g,E)))}static getCompiledRuleId(A,B,Q){return A.id||B.registerRule((g=>{if(A.id=g,A.match)return new EA(A.$vscodeTextmateLocation,A.id,A.name,A.match,wA._compileCaptures(A.captures,B,Q));if(void 0===A.begin){A.repository&&(Q=u({},Q,A.repository));let g=A.patterns;return void 0===g&&A.include&&(g=[{include:A.include}]),new CA(A.$vscodeTextmateLocation,A.id,A.name,A.contentName,wA._compilePatterns(g,B,Q))}return A.while?new DA(A.$vscodeTextmateLocation,A.id,A.name,A.contentName,A.begin,wA._compileCaptures(A.beginCaptures||A.captures,B,Q),A.while,wA._compileCaptures(A.whileCaptures||A.captures,B,Q),wA._compilePatterns(A.patterns,B,Q)):new IA(A.$vscodeTextmateLocation,A.id,A.name,A.contentName,A.begin,wA._compileCaptures(A.beginCaptures||A.captures,B,Q),A.end,wA._compileCaptures(A.endCaptures||A.captures,B,Q),A.applyEndPatternLast,wA._compilePatterns(A.patterns,B,Q))})),A.id}static _compileCaptures(A,B,Q){let g=[];if(A){let E=0;for(const B in A){if("$vscodeTextmateLocation"===B)continue;const A=parseInt(B,10);A>E&&(E=A)}for(let A=0;A<=E;A++)g[A]=null;for(const E in A){if("$vscodeTextmateLocation"===E)continue;const C=parseInt(E,10);let I=0;A[E].patterns&&(I=wA.getCompiledRuleId(A[E],B,Q)),g[C]=wA.createCaptureRule(B,A[E].$vscodeTextmateLocation,A[E].name,A[E].contentName,I)}}return g}static _compilePatterns(A,B,Q){let g=[];if(A)for(let E=0,C=A.length;EA.substring(B.start,B.end)));return BA.lastIndex=0,this.source.replace(BA,((A,B)=>d(Q[parseInt(B,10)]||"")))}_buildAnchorCache(){let A,B,Q,g,E=[],C=[],I=[],D=[];for(A=0,B=this.source.length;AA.source));this._cached=new eA(A,B,this._items.map((A=>A.ruleId)))}return this._cached}compileAG(A,B,Q){return this._hasAnchors?B?Q?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(A,B,Q)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(A,B,Q)),this._anchorCache.A1_G0):Q?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(A,B,Q)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(A,B,Q)),this._anchorCache.A0_G0):this.compile(A)}_resolveAnchors(A,B,Q){let g=this._items.map((A=>A.resolveAnchors(B,Q)));return new eA(A,g,this._items.map((A=>A.ruleId)))}}class eA{constructor(A,B,Q){this.regExps=B,this.rules=Q,this.scanner=A.createOnigScanner(B)}dispose(){"function"==typeof this.scanner.dispose&&this.scanner.dispose()}toString(){const A=[];for(let B=0,Q=this.rules.length;Bthis._root.match(A)))}static createFromRawTheme(A,B){return this.createFromParsedTheme(function(A){if(!A)return[];if(!A.settings||!Array.isArray(A.settings))return[];let B=A.settings,Q=[],g=0;for(let A=0,E=B.length;A1&&(s=C.slice(0,C.length-1),s.reverse()),Q[g++]=new hA(o,s,A,I,D,w)}}return Q}(A),B)}static createFromParsedTheme(A,B){return function(A,B){A.sort(((A,B)=>{let Q=S(A.scope,B.scope);return 0!==Q?Q:(Q=p(A.parentScopes,B.parentScopes),0!==Q?Q:A.index-B.index)}));let Q=0,g="#000000",E="#ffffff";for(;A.length>=1&&""===A[0].scope;){let B=A.shift();-1!==B.fontStyle&&(Q=B.fontStyle),null!==B.foreground&&(g=B.foreground),null!==B.background&&(E=B.background)}let C=new aA(B),I=new MA(Q,C.getId(g),C.getId(E)),D=new FA(new nA(0,null,-1,0,0),[]);for(let B=0,Q=A.length;Bfunction(A,B){if(null===B)return!0;let Q=0,g=B[Q];for(;A;){if(tA(A.scopeName,g)){if(Q++,Q===B.length)return!0;g=B[Q]}A=A.parent}return!1}(A.parent,B.parentScopes)));return Q?new MA(Q.fontStyle,Q.foreground,Q.background):null}}class iA{constructor(A,B){this.parent=A,this.scopeName=B}static push(A,B){for(const Q of B)A=new iA(A,Q);return A}static from(...A){let B=null;for(let Q=0;QA?console.log("how did this happen?"):this.scopeDepth=A,-1!==B&&(this.fontStyle=B),0!==Q&&(this.foreground=Q),0!==g&&(this.background=g)}}class FA{constructor(A,B=[],Q={}){this._mainRule=A,this._children=Q,this._rulesWithParentScopes=B}static _sortBySpecificity(A){return 1===A.length||A.sort(this._cmpBySpecificity),A}static _cmpBySpecificity(A,B){if(A.scopeDepth===B.scopeDepth){const Q=A.parentScopes,g=B.parentScopes;let E=null===Q?0:Q.length,C=null===g?0:g.length;if(E===C)for(let A=0;A{const B=this._scopeToLanguage(A),Q=this._toStandardTokenType(A);return new rA(B,Q)})),this._defaultAttributes=new rA(A,8),this._embeddedLanguagesMatcher=new NA(Object.entries(B||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(A){return null===A?GA._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(A)}_scopeToLanguage(A){return this._embeddedLanguagesMatcher.match(A)||0}_toStandardTokenType(A){const B=A.match(GA.STANDARD_TOKEN_TYPE_REGEXP);if(!B)return 8;switch(B[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}}GA._NULL_SCOPE_METADATA=new rA(0,0),GA.STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/;class NA{constructor(A){if(0===A.length)this.values=null,this.scopesRegExp=null;else{this.values=new Map(A);const B=A.map((([A,B])=>d(A)));B.sort(),B.reverse(),this.scopesRegExp=new RegExp(`^((${B.join(")|(")}))($|\\.)`,"")}}match(A){if(!this.scopesRegExp)return;const B=A.match(this.scopesRegExp);return B?this.values.get(B[1]):void 0}}class LA{constructor(A,B){this.stack=A,this.stoppedEarly=B}}function HA(A,B,Q,g,E,C,I,D){const w=B.content.length;let o=!1,s=-1;if(I){const I=function(A,B,Q,g,E,C){let I=E.beginRuleCapturedEOL?0:-1;const D=[];for(let B=E;B;B=B.pop()){const Q=B.getRule(A);Q instanceof DA&&D.push({rule:Q,stack:B})}for(let w=D.pop();w;w=D.pop()){const{ruleScanner:D,findOptions:o}=RA(w.rule,A,w.stack.endRule,Q,g===I),s=D.findNextMatchSync(B,g,o);if(H&&(console.log(" scanning for while rule"),console.log(D.toString())),!s){H&&console.log(" popping "+w.rule.debugName+" - "+w.rule.debugWhileRegExp),E=w.stack.pop();break}if(-2!==s.ruleId){E=w.stack.pop();break}s.captureIndices&&s.captureIndices.length&&(C.produce(w.stack,s.captureIndices[0].start),KA(A,B,Q,w.stack,C,w.rule.whileCaptures,s.captureIndices),C.produce(w.stack,s.captureIndices[0].end),I=s.captureIndices[0].end,s.captureIndices[0].end>g&&(g=s.captureIndices[0].end,Q=!1))}return{stack:E,linePos:g,anchorPosition:I,isFirstLine:Q}}(A,B,Q,g,E,C);E=I.stack,g=I.linePos,Q=I.isFirstLine,s=I.anchorPosition}const e=Date.now();for(;!o;){if(0!==D&&Date.now()-e>D)return new LA(E,!0);c()}return new LA(E,!1);function c(){H&&(console.log(""),console.log(`@@scanNext ${g}: |${B.content.substr(g).replace(/\n$/,"\\n")}|`));const I=function(A,B,Q,g,E,C){const I=function(A,B,Q,g,E,C){const I=E.getRule(A),{ruleScanner:D,findOptions:w}=kA(I,A,E.endRule,Q,g===C);let o=0;H&&(o=x());const s=D.findNextMatchSync(B,g,w);if(H){const A=x()-o;A>5&&console.warn(`Rule ${I.debugName} (${I.id}) matching took ${A} against '${B}'`),console.log(` scanning for (linePos: ${g}, anchorPosition: ${C})`),console.log(D.toString()),s&&console.log(`matched rule id: ${s.ruleId} from ${s.captureIndices[0].start} to ${s.captureIndices[0].end}`)}return s?{captureIndices:s.captureIndices,matchedRuleId:s.ruleId}:null}(A,B,Q,g,E,C),D=A.getInjections();if(0===D.length)return I;const w=function(A,B,Q,g,E,C,I){let D,w=Number.MAX_VALUE,o=null,s=0;const e=C.contentNameScopesList.getScopeNames();for(let C=0,c=A.length;C=w)&&(w=a,o=h.captureIndices,D=h.ruleId,s=c.priority,w===E))break}return o?{priorityMatch:-1===s,captureIndices:o,matchedRuleId:D}:null}(D,A,B,Q,g,E,C);if(!w)return I;if(!I)return w;const o=I.captureIndices[0].start,s=w.captureIndices[0].start;return s0)&&D[0].end>g;if(-1===e){const I=E.getRule(A);H&&console.log(" popping "+I.debugName+" - "+I.debugEndRegExp),C.produce(E,D[0].start),E=E.withContentNameScopesList(E.nameScopesList),KA(A,B,Q,E,C,I.endCaptures,D),C.produce(E,D[0].end);const e=E;if(E=E.parent,s=e.getAnchorPos(),!c&&e.getEnterPos()===g)return H&&console.error("[1] - Grammar is in an endless loop - Grammar pushed & popped a rule without advancing"),E=e,C.produce(E,w),void(o=!0)}else{const I=A.getRule(e);C.produce(E,D[0].start);const i=E,t=I.getName(B.content,D),M=E.contentNameScopesList.pushAttributed(t,A);if(E=E.push(e,g,s,D[0].end===w,null,M,M),I instanceof IA){const g=I;H&&console.log(" pushing "+g.debugName+" - "+g.debugBeginRegExp),KA(A,B,Q,E,C,g.beginCaptures,D),C.produce(E,D[0].end),s=D[0].end;const e=g.getContentName(B.content,D),t=M.pushAttributed(e,A);if(E=E.withContentNameScopesList(t),g.endHasBackReferences&&(E=E.withEndRule(g.getEndWithResolvedBackReferences(B.content,D))),!c&&i.hasSameRuleAs(E))return H&&console.error("[2] - Grammar is in an endless loop - Grammar pushed the same rule without advancing"),E=E.pop(),C.produce(E,w),void(o=!0)}else if(I instanceof DA){const g=I;H&&console.log(" pushing "+g.debugName),KA(A,B,Q,E,C,g.beginCaptures,D),C.produce(E,D[0].end),s=D[0].end;const e=g.getContentName(B.content,D),t=M.pushAttributed(e,A);if(E=E.withContentNameScopesList(t),g.whileHasBackReferences&&(E=E.withEndRule(g.getWhileWithResolvedBackReferences(B.content,D))),!c&&i.hasSameRuleAs(E))return H&&console.error("[3] - Grammar is in an endless loop - Grammar pushed the same rule without advancing"),E=E.pop(),C.produce(E,w),void(o=!0)}else{const g=I;if(H&&console.log(" matched "+g.debugName+" - "+g.debugMatchRegExp),KA(A,B,Q,E,C,g.captures,D),C.produce(E,D[0].end),E=E.pop(),!c)return H&&console.error("[4] - Grammar is in an endless loop - Grammar is not advancing, nor is it pushing/popping"),E=E.safePop(),C.produce(E,w),void(o=!0)}}D[0].end>g&&(g=D[0].end,Q=!1)}}function kA(A,B,Q,g,E){return{ruleScanner:A.compileAG(B,Q,g,E),findOptions:0}}function RA(A,B,Q,g,E){return{ruleScanner:A.compileWhileAG(B,Q,g,E),findOptions:0}}function KA(A,B,Q,g,E,C,I){if(0===C.length)return;const D=B.content,w=Math.min(C.length,I.length),o=[],s=I[0].end;for(let B=0;Bs)break;for(;o.length>0&&o[o.length-1].endPos<=e.start;)E.produceFromScopes(o[o.length-1].scopes,o[o.length-1].endPos),o.pop();if(o.length>0?E.produceFromScopes(o[o.length-1].scopes,e.start):E.produce(g,e.start),w.retokenizeCapturedWithRuleId){const B=w.getName(D,I),C=g.contentNameScopesList.pushAttributed(B,A),o=w.getContentName(D,I),s=C.pushAttributed(o,A),c=g.push(w.retokenizeCapturedWithRuleId,e.start,-1,!1,null,C,s),i=A.createOnigString(D.substring(0,e.end));HA(A,i,Q&&0===e.start,e.start,c,E,!1,0),Y(i);continue}const c=w.getName(D,I);if(null!==c){const B=(o.length>0?o[o.length-1].scopes:g.contentNameScopesList).pushAttributed(c,A);o.push(new YA(B,e.end))}}for(;o.length>0;)E.produceFromScopes(o[o.length-1].scopes,o[o.length-1].endPos),o.pop()}class YA{constructor(A,B){this.scopes=A,this.endPos=B}}function UA(A,B,Q,g,E){const C=R(B,uA),I=wA.getCompiledRuleId(Q,g,E.repository);for(const Q of C)A.push({debugSelector:B,matcher:Q.matcher,ruleId:I,grammar:E,priority:Q.priority})}function uA(A,B){if(B.length{for(let g=Q;gQ&&A.substr(0,Q)===B&&"."===A[Q]}class yA{constructor(A,B,Q,g,E,C,I,D){if(this._rootScopeName=A,this.balancedBracketSelectors=C,this._onigLib=D,this._basicScopeAttributesProvider=new GA(Q,g),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=I,this._grammar=JA(B,null),this._injections=null,this._tokenTypeMatchers=[],E)for(const A of Object.keys(E)){const B=R(A,uA);for(const Q of B)this._tokenTypeMatchers.push({matcher:Q.matcher,type:E[A]})}}get themeProvider(){return this._grammarRepository}dispose(){for(const A of this._ruleId2desc)A&&A.dispose()}createOnigScanner(A){return this._onigLib.createOnigScanner(A)}createOnigString(A){return this._onigLib.createOnigString(A)}getMetadataForScope(A){return this._basicScopeAttributesProvider.getBasicScopeAttributes(A)}_collectInjections(){const A=[],B=this._rootScopeName,Q=(A=>A===this._rootScopeName?this._grammar:this.getExternalGrammar(A))(B);if(Q){const g=Q.injections;if(g)for(let B in g)UA(A,B,g[B],this,Q);const E=this._grammarRepository.injections(B);E&&E.forEach((B=>{const Q=this.getExternalGrammar(B);if(Q){const B=Q.injectionSelector;B&&UA(A,B,Q,this,Q)}}))}return A.sort(((A,B)=>A.priority-B.priority)),A}getInjections(){if(null===this._injections&&(this._injections=this._collectInjections(),H&&this._injections.length>0)){console.log(`Grammar ${this._rootScopeName} contains the following injections:`);for(const A of this._injections)console.log(` - ${A.debugSelector}`)}return this._injections}registerRule(A){const B=++this._lastRuleId,Q=A(B);return this._ruleId2desc[B]=Q,Q}getRule(A){return this._ruleId2desc[A]}getExternalGrammar(A,B){if(this._includedGrammars[A])return this._includedGrammars[A];if(this._grammarRepository){const Q=this._grammarRepository.lookup(A);if(Q)return this._includedGrammars[A]=JA(Q,B&&B.$base),this._includedGrammars[A]}}tokenizeLine(A,B,Q=0){const g=this._tokenize(A,B,!1,Q);return{tokens:g.lineTokens.getResult(g.ruleStack,g.lineLength),ruleStack:g.ruleStack,stoppedEarly:g.stoppedEarly}}tokenizeLine2(A,B,Q=0){const g=this._tokenize(A,B,!0,Q);return{tokens:g.lineTokens.getBinaryResult(g.ruleStack,g.lineLength),ruleStack:g.ruleStack,stoppedEarly:g.stoppedEarly}}_tokenize(A,B,Q,g){let E;if(-1===this._rootId&&(this._rootId=wA.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections()),B&&B!==pA.NULL)E=!1,B.reset();else{E=!0;const A=this._basicScopeAttributesProvider.getDefaultAttributes(),Q=this.themeProvider.getDefaults(),g=k.set(0,A.languageId,A.tokenType,null,Q.fontStyle,Q.foregroundId,Q.backgroundId),C=this.getRule(this._rootId).getName(null,null);let I;I=C?SA.createRootAndLookUpScopeName(C,g,this):SA.createRoot("unknown",g),B=new pA(null,this._rootId,-1,-1,!1,null,I,I)}A+="\n";const C=this.createOnigString(A),I=C.content.length,D=new dA(Q,A,this._tokenTypeMatchers,this.balancedBracketSelectors),w=HA(this,C,E,0,B,D,!0,g);return Y(C),{lineLength:I,lineTokens:D,ruleStack:w.stack,stoppedEarly:w.stoppedEarly}}}function JA(A,B){return(A=U(A)).repository=A.repository||{},A.repository.$self={$vscodeTextmateLocation:A.$vscodeTextmateLocation,patterns:A.patterns,name:A.scopeName},A.repository.$base=B||A.repository.$self,A}class SA{constructor(A,B,Q){this.parent=A,this.scopePath=B,this.tokenAttributes=Q}static fromExtension(A,B){let Q=A,g=A?.scopePath??null;for(const A of B)g=iA.push(g,A.scopeNames),Q=new SA(Q,g,A.encodedTokenAttributes);return Q}static createRoot(A,B){return new SA(null,new iA(null,A),B)}static createRootAndLookUpScopeName(A,B,Q){const g=Q.getMetadataForScope(A),E=new iA(null,A),C=Q.themeProvider.themeMatch(E),I=SA.mergeAttributes(B,g,C);return new SA(null,E,I)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(A){return SA.equals(this,A)}static equals(A,B){for(;;){if(A===B)return!0;if(!A&&!B)return!0;if(!A||!B)return!1;if(A.scopeName!==B.scopeName||A.tokenAttributes!==B.tokenAttributes)return!1;A=A.parent,B=B.parent}}static mergeAttributes(A,B,Q){let g=-1,E=0,C=0;return null!==Q&&(g=Q.fontStyle,E=Q.foregroundId,C=Q.backgroundId),k.set(A,B.languageId,B.tokenType,null,g,E,C)}pushAttributed(A,B){if(null===A)return this;if(-1===A.indexOf(" "))return SA._pushAttributed(this,A,B);const Q=A.split(/ /g);let g=this;for(const A of Q)g=SA._pushAttributed(g,A,B);return g}static _pushAttributed(A,B,Q){const g=Q.getMetadataForScope(B),E=A.scopePath.push(B),C=Q.themeProvider.themeMatch(E),I=SA.mergeAttributes(A.tokenAttributes,g,C);return new SA(A,E,I)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(A){const B=[];let Q=this;for(;Q&&Q!==A;)B.push({encodedTokenAttributes:Q.tokenAttributes,scopeNames:Q.scopePath.getExtensionIfDefined(Q.parent?.scopePath??null)}),Q=Q.parent;return Q===A?B.reverse():void 0}}class pA{constructor(A,B,Q,g,E,C,I,D){this.parent=A,this.ruleId=B,this.beginRuleCapturedEOL=E,this.endRule=C,this.nameScopesList=I,this.contentNameScopesList=D,this._stackElementBrand=void 0,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=Q,this._anchorPos=g}equals(A){return null!==A&&pA._equals(this,A)}static _equals(A,B){return A===B||!!this._structuralEquals(A,B)&&SA.equals(A.contentNameScopesList,B.contentNameScopesList)}static _structuralEquals(A,B){for(;;){if(A===B)return!0;if(!A&&!B)return!0;if(!A||!B)return!1;if(A.depth!==B.depth||A.ruleId!==B.ruleId||A.endRule!==B.endRule)return!1;A=A.parent,B=B.parent}}clone(){return this}static _reset(A){for(;A;)A._enterPos=-1,A._anchorPos=-1,A=A.parent}reset(){pA._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(A,B,Q,g,E,C,I){return new pA(this,A,B,Q,g,E,C,I)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(A){return A.getRule(this.ruleId)}toString(){const A=[];return this._writeString(A,0),"["+A.join(",")+"]"}_writeString(A,B){return this.parent&&(B=this.parent._writeString(A,B)),A[B++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,B}withContentNameScopesList(A){return this.contentNameScopesList===A?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,A)}withEndRule(A){return this.endRule===A?this:new pA(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,A,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(A){let B=this;for(;B&&B._enterPos===A._enterPos;){if(B.ruleId===A.ruleId)return!0;B=B.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(A,B){const Q=SA.fromExtension(A?.nameScopesList??null,B.nameScopesList);return new pA(A,B.ruleId,B.enterPos??-1,B.anchorPos??-1,B.beginRuleCapturedEOL,B.endRule,Q,SA.fromExtension(Q,B.contentNameScopesList))}}pA.NULL=new pA(null,0,0,0,!1,null,null,null);class lA{constructor(A,B){this.allowAny=!1,this.balancedBracketScopes=A.flatMap((A=>"*"===A?(this.allowAny=!0,[]):R(A,uA).map((A=>A.matcher)))),this.unbalancedBracketScopes=B.flatMap((A=>R(A,uA).map((A=>A.matcher))))}get matchesAlways(){return this.allowAny&&0===this.unbalancedBracketScopes.length}get matchesNever(){return 0===this.balancedBracketScopes.length&&!this.allowAny}match(A){for(const B of this.unbalancedBracketScopes)if(B(A))return!1;for(const B of this.balancedBracketScopes)if(B(A))return!0;return this.allowAny}}class dA{constructor(A,B,Q,g){this.balancedBracketSelectors=g,this._emitBinaryTokens=A,this._tokenTypeOverrides=Q,this._lineText=H?B:null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}produce(A,B){this.produceFromScopes(A.contentNameScopesList,B)}produceFromScopes(A,B){if(this._lastTokenEndIndex>=B)return;if(this._emitBinaryTokens){let Q=A?.tokenAttributes??0,g=!1;if(this.balancedBracketSelectors?.matchesAlways&&(g=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const B=A?.getScopeNames()??[];for(const A of this._tokenTypeOverrides)A.matcher(B)&&(Q=k.set(Q,0,A.type,null,-1,0,0));this.balancedBracketSelectors&&(g=this.balancedBracketSelectors.match(B))}if(g&&(Q=k.set(Q,0,8,g,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===Q)return void(this._lastTokenEndIndex=B);if(H){const Q=A?.getScopeNames()??[];console.log(" token: |"+this._lineText.substring(this._lastTokenEndIndex,B).replace(/\n$/,"\\n")+"|");for(let A=0;A0&&this._tokens[this._tokens.length-1].startIndex===B-1&&this._tokens.pop(),0===this._tokens.length&&(this._lastTokenEndIndex=-1,this.produce(A,B),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(A,B){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===B-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),0===this._binaryTokens.length&&(this._lastTokenEndIndex=-1,this.produce(A,B),this._binaryTokens[this._binaryTokens.length-2]=0);const Q=new Uint32Array(this._binaryTokens.length);for(let A=0,B=this._binaryTokens.length;A0;)10===A.charCodeAt(E)?(E++,C++,I=0):(E++,I++),B--}function w(A){null===Q?E=A:D(A-E)}function o(){for(;E0&&65279===A.charCodeAt(0)&&(E=1);let i=0,t=null,M=[],h=[],a=null;function n(A,B){M.push(i),h.push(t),i=A,t=B}function F(){if(0===M.length)return r("illegal state stack");i=M.pop(),t=h.pop()}function r(B){throw new Error("Near offset "+E+": "+B+" ~~~"+A.substr(E,50)+"~~~")}const G=function(){if(null===a)return r("missing ");let A={};null!==Q&&(A[Q]={filename:B,line:C,char:I}),t[a]=A,a=null,n(1,A)},N=function(){if(null===a)return r("missing ");let A=[];t[a]=A,a=null,n(2,A)},L=function(){let A={};null!==Q&&(A[Q]={filename:B,line:C,char:I}),t.push(A),n(1,A)},H=function(){let A=[];t.push(A),n(2,A)};function k(){if(1!==i)return r("unexpected ");F()}function R(){return 1===i||2!==i?r("unexpected "):void F()}function K(A){if(1===i){if(null===a)return r("missing ");t[a]=A,a=null}else 2===i?t.push(A):t=A}function Y(A){if(isNaN(A))return r("cannot parse float");if(1===i){if(null===a)return r("missing ");t[a]=A,a=null}else 2===i?t.push(A):t=A}function U(A){if(isNaN(A))return r("cannot parse integer");if(1===i){if(null===a)return r("missing ");t[a]=A,a=null}else 2===i?t.push(A):t=A}function u(A){if(1===i){if(null===a)return r("missing ");t[a]=A,a=null}else 2===i?t.push(A):t=A}function P(A){if(1===i){if(null===a)return r("missing ");t[a]=A,a=null}else 2===i?t.push(A):t=A}function y(A){if(1===i){if(null===a)return r("missing ");t[a]=A,a=null}else 2===i?t.push(A):t=A}function J(){let A=c(">"),B=!1;return 47===A.charCodeAt(A.length-1)&&(B=!0,A=A.substring(0,A.length-1)),{name:A.trim(),isClosed:B}}function S(A){if(A.isClosed)return"";let B=c(""),B.replace(/&#([0-9]+);/g,(function(A,B){return String.fromCodePoint(parseInt(B,10))})).replace(/&#x([0-9a-f]+);/g,(function(A,B){return String.fromCodePoint(parseInt(B,16))})).replace(/&|<|>|"|'/g,(function(A){switch(A){case"&":return"&";case"<":return"<";case">":return">";case""":return'"';case"'":return"'"}return A}))}for(;E=g));){const w=A.charCodeAt(E);if(D(1),60!==w)return r("expected <");if(E>=g)return r("unexpected end of input");const c=A.charCodeAt(E);if(63===c){D(1),e("?>");continue}if(33===c){if(D(1),s("--")){e("--\x3e");continue}e(">");continue}if(47===c){if(D(1),o(),s("plist")){e(">");continue}if(s("dict")){e(">"),k();continue}if(s("array")){e(">"),R();continue}return r("unexpected closed tag")}let M=J();switch(M.name){case"dict":1===i?G():2===i?L():(t={},null!==Q&&(t[Q]={filename:B,line:C,char:I}),n(1,t)),M.isClosed&&k();continue;case"array":1===i?N():2===i?H():(t=[],n(2,t)),M.isClosed&&R();continue;case"key":p=S(M),1!==i?r("unexpected "):null!==a?r("too many "):a=p;continue;case"string":K(S(M));continue;case"real":Y(parseFloat(S(M)));continue;case"integer":U(parseInt(S(M),10));continue;case"date":u(new Date(S(M)));continue;case"data":P(S(M));continue;case"true":S(M),y(!0);continue;case"false":S(M),y(!1);continue}if(!/^plist/.test(M.name))return r("unexpected opened tag "+M.name)}var p;return t}function xA(A,B){throw new Error("Near offset "+A.pos+": "+B+" ~~~"+A.source.substr(A.pos,50)+"~~~")}class mA{constructor(A){this.source=A,this.pos=0,this.len=A.length,this.line=1,this.char=0}}class OA{constructor(){this.value=null,this.type=0,this.offset=-1,this.len=-1,this.line=-1,this.char=-1}toLocation(A){return{filename:A,line:this.line,char:this.char}}}function qA(A,B){B.value=null,B.type=0,B.offset=-1,B.len=-1,B.line=-1,B.char=-1;let Q,g=A.source,E=A.pos,C=A.len,I=A.line,D=A.char;for(;;){if(E>=C)return!1;if(Q=g.charCodeAt(E),32!==Q&&9!==Q&&13!==Q){if(10!==Q)break;E++,I++,D=0}else E++,D++}if(B.offset=E,B.line=I,B.char=D,34===Q){for(B.type=1,E++,D++;;){if(E>=C)return!1;if(Q=g.charCodeAt(E),E++,D++,92!==Q){if(34===Q)break}else E++,D++}B.value=g.substring(B.offset+1,E-1).replace(/\\u([0-9A-Fa-f]{4})/g,((A,B)=>String.fromCodePoint(parseInt(B,16)))).replace(/\\(.)/g,((B,Q)=>{switch(Q){case'"':return'"';case"\\":return"\\";case"/":return"/";case"b":return"\b";case"f":return"\f";case"n":return"\n";case"r":return"\r";case"t":return"\t";default:xA(A,"invalid escape sequence")}throw new Error("unreachable")}))}else if(91===Q)B.type=2,E++,D++;else if(123===Q)B.type=3,E++,D++;else if(93===Q)B.type=4,E++,D++;else if(125===Q)B.type=5,E++,D++;else if(58===Q)B.type=6,E++,D++;else if(44===Q)B.type=7,E++,D++;else if(110===Q){if(B.type=8,E++,D++,Q=g.charCodeAt(E),117!==Q)return!1;if(E++,D++,Q=g.charCodeAt(E),108!==Q)return!1;if(E++,D++,Q=g.charCodeAt(E),108!==Q)return!1;E++,D++}else if(116===Q){if(B.type=9,E++,D++,Q=g.charCodeAt(E),114!==Q)return!1;if(E++,D++,Q=g.charCodeAt(E),117!==Q)return!1;if(E++,D++,Q=g.charCodeAt(E),101!==Q)return!1;E++,D++}else if(102===Q){if(B.type=10,E++,D++,Q=g.charCodeAt(E),97!==Q)return!1;if(E++,D++,Q=g.charCodeAt(E),108!==Q)return!1;if(E++,D++,Q=g.charCodeAt(E),115!==Q)return!1;if(E++,D++,Q=g.charCodeAt(E),101!==Q)return!1;E++,D++}else for(B.type=11;;){if(E>=C)return!1;if(Q=g.charCodeAt(E),!(46===Q||Q>=48&&Q<=57||101===Q||69===Q||45===Q||43===Q))break;E++,D++}return B.len=E-B.offset,null===B.value&&(B.value=g.substr(B.offset,B.len)),A.pos=E,A.line=I,A.char=D,!0}class bA{constructor(A,B){this._onigLibPromise=B,this._grammars=new Map,this._rawGrammars=new Map,this._injectionGrammars=new Map,this._theme=A}dispose(){for(const A of this._grammars.values())A.dispose()}setTheme(A){this._theme=A}getColorMap(){return this._theme.getColorMap()}addGrammar(A,B){this._rawGrammars.set(A.scopeName,A),B&&this._injectionGrammars.set(A.scopeName,B)}lookup(A){return this._rawGrammars.get(A)}injections(A){return this._injectionGrammars.get(A)}getDefaults(){return this._theme.getDefaults()}themeMatch(A){return this._theme.match(A)}async grammarForScopeName(A,B,Q,g,E){if(!this._grammars.has(A)){let C=this._rawGrammars.get(A);if(!C)return null;this._grammars.set(A,function(A,B,Q,g,E,C,I,D){return new yA(A,B,Q,g,E,C,I,D)}(A,C,B,Q,g,E,this,await this._onigLibPromise))}return this._grammars.get(A)}}function WA(A,B){let Q=0;const g=[];let E=A,C=B;for(;E!==C;)E&&(!C||E.depth>=C.depth)?(Q++,E=E.parent):(g.push(C.toStateStackFrame()),C=C.parent);return{pops:Q,newFrames:g.reverse()}}function TA(A,B){let Q=A;for(let A=0;A0;)await Promise.all(C.Q.map((A=>this._loadSingleGrammar(A.scopeName)))),C.processQueue();return this._grammarForScopeName(A,B,Q,g,E)}async _loadSingleGrammar(A){return this._ensureGrammarCache.has(A)||this._ensureGrammarCache.set(A,this._doLoadSingleGrammar(A)),this._ensureGrammarCache.get(A)}async _doLoadSingleGrammar(A){const B=await this._options.loadGrammar(A);if(B){const Q="function"==typeof this._options.getInjections?this._options.getInjections(A):void 0;this._syncRegistry.addGrammar(B,Q)}}async addGrammar(A,B=[],Q=0,g=null){return this._syncRegistry.addGrammar(A,B),await this._grammarForScopeName(A.scopeName,Q,g)}_grammarForScopeName(A,B=0,Q=null,g=null,E=null){return this._syncRegistry.grammarForScopeName(A,B,Q,g,E)}}const XA=pA.NULL,ZA=function(A,B=null){return null!==B&&/\.json$/.test(B)?(Q=A,H?function(A,B,Q){let g=new mA(A),E=new OA,C=0,I=null,D=[],w=[];function o(){D.push(C),w.push(I)}function s(){C=D.pop(),I=w.pop()}function e(A){xA(g,A)}for(;qA(g,E);){if(0===C){if(null!==I&&e("too many constructs in root"),3===E.type){I={},I.$vscodeTextmateLocation=E.toLocation(B),o(),C=1;continue}if(2===E.type){I=[],o(),C=4;continue}e("unexpected token in root")}if(2===C){if(5===E.type){s();continue}if(7===E.type){C=3;continue}e("expected , or }")}if(1===C||3===C){if(1===C&&5===E.type){s();continue}if(1===E.type){let A=E.value;if(qA(g,E)&&6===E.type||e("expected colon"),qA(g,E)||e("expected value"),C=2,1===E.type){I[A]=E.value;continue}if(8===E.type){I[A]=null;continue}if(9===E.type){I[A]=!0;continue}if(10===E.type){I[A]=!1;continue}if(11===E.type){I[A]=parseFloat(E.value);continue}if(2===E.type){let B=[];I[A]=B,o(),C=4,I=B;continue}if(3===E.type){let Q={};Q.$vscodeTextmateLocation=E.toLocation(B),I[A]=Q,o(),C=1,I=Q;continue}}e("unexpected token in dict")}if(5===C){if(4===E.type){s();continue}if(7===E.type){C=6;continue}e("expected , or ]")}if(4===C||6===C){if(4===C&&4===E.type){s();continue}if(C=5,1===E.type){I.push(E.value);continue}if(8===E.type){I.push(null);continue}if(9===E.type){I.push(!0);continue}if(10===E.type){I.push(!1);continue}if(11===E.type){I.push(parseFloat(E.value));continue}if(2===E.type){let A=[];I.push(A),o(),C=4,I=A;continue}if(3===E.type){let A={};A.$vscodeTextmateLocation=E.toLocation(B),I.push(A),o(),C=1,I=A;continue}e("unexpected token in array")}e("unknown state")}return 0!==w.length&&e("unclosed constructs"),I}(Q,B):JSON.parse(Q)):function(A,B){return H?function(A,B,Q){return fA(A,B,"$vscodeTextmateLocation")}(A,B):function(A){return fA(A,null,null)}(A)}(A,B);var Q};var jA=L.Bz,VA=("undefined"!=typeof document&&document.currentScript&&document.currentScript.src,function(A){var B,Q,g=void 0!==(A=A||{})?A:{};g.ready=new Promise((function(A,g){B=A,Q=g}));var E,C=Object.assign({},g),I=!1;E=function(A){let B;return"function"==typeof readbuffer?new Uint8Array(readbuffer(A)):(B=read(A,"binary"),"object"==typeof B||L(Q),B);var Q},"undefined"!=typeof scriptArgs&&scriptArgs,"undefined"!=typeof onig_print&&("undefined"==typeof console&&(console={}),console.log=onig_print,console.warn=console.error="undefined"!=typeof printErr?printErr:onig_print);var D,w,o=g.print||console.log.bind(console),s=g.printErr||console.warn.bind(console);Object.assign(g,C),C=null,g.arguments&&g.arguments,g.thisProgram&&g.thisProgram,g.quit&&g.quit,g.wasmBinary&&(D=g.wasmBinary),g.noExitRuntime,"object"!=typeof WebAssembly&&L("no native wasm support detected");var e,c,i,t=!1,M="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function h(A,B,Q){for(var g=B+Q,E=B;A[E]&&!(E>=g);)++E;if(E-B>16&&A.buffer&&M)return M.decode(A.subarray(B,E));for(var C="";B>10,56320|1023&o)}}else C+=String.fromCharCode((31&I)<<6|D)}else C+=String.fromCharCode(I)}return C}function a(A){e=A,g.HEAP8=new Int8Array(A),g.HEAP16=new Int16Array(A),g.HEAP32=new Int32Array(A),g.HEAPU8=c=new Uint8Array(A),g.HEAPU16=new Uint16Array(A),g.HEAPU32=i=new Uint32Array(A),g.HEAPF32=new Float32Array(A),g.HEAPF64=new Float64Array(A)}g.INITIAL_MEMORY;var n=[],F=[],r=[],G=0,N=null;function L(A){g.onAbort&&g.onAbort(A),s(A="Aborted("+A+")"),t=!0,A+=". Build with -sASSERTIONS for more info.";var B=new WebAssembly.RuntimeError(A);throw Q(B),B}var H,k,R,K="data:application/octet-stream;base64,";function Y(A){return A.startsWith(K)}function U(A){try{if(A==H&&D)return new Uint8Array(D);if(E)return E(A);throw"both async and sync fetching of the wasm failed"}catch(A){L(A)}}function u(A){for(;A.length>0;)A.shift()(g)}function P(A){try{return w.grow(A-e.byteLength+65535>>>16),a(w.buffer),1}catch(A){}}Y(H="onig.wasm")||(k=H,H=g.locateFile?g.locateFile(k,""):""+k),R="undefined"!=typeof dateNow?dateNow:()=>performance.now();var y=[null,[],[]];function J(A,B){var Q=y[A];0===B||10===B?((1===A?o:s)(h(Q,0)),Q.length=0):Q.push(B)}var S,p={emscripten_get_now:R,emscripten_memcpy_big:function(A,B,Q){c.copyWithin(A,B,B+Q)},emscripten_resize_heap:function(A){var B=c.length,Q=2147483648;if((A>>>=0)>Q)return!1;let g=(A,B)=>A+(B-A%B)%B;for(var E=1;E<=4;E*=2){var C=B*(1+.2/E);if(C=Math.min(C,A+100663296),P(Math.min(Q,g(Math.max(A,C),65536))))return!0}return!1},fd_write:function(A,B,Q,g){for(var E=0,C=0;C>2],D=i[B+4>>2];B+=8;for(var w=0;w>2]=E,0}};function l(A){function Q(){S||(S=!0,g.calledRun=!0,t||(u(F),B(g),g.onRuntimeInitialized&&g.onRuntimeInitialized(),function(){if(g.postRun)for("function"==typeof g.postRun&&(g.postRun=[g.postRun]);g.postRun.length;)A=g.postRun.shift(),r.unshift(A);var A;u(r)}()))}G>0||(function(){if(g.preRun)for("function"==typeof g.preRun&&(g.preRun=[g.preRun]);g.preRun.length;)A=g.preRun.shift(),n.unshift(A);var A;u(n)}(),G>0||(g.setStatus?(g.setStatus("Running..."),setTimeout((function(){setTimeout((function(){g.setStatus("")}),1),Q()}),1)):Q()))}if(function(){var A={env:p,wasi_snapshot_preview1:p};function B(A,B){var Q,E=A.exports;g.asm=E,a((w=g.asm.memory).buffer),g.asm.__indirect_function_table,Q=g.asm.__wasm_call_ctors,F.unshift(Q),function(A){if(G--,g.monitorRunDependencies&&g.monitorRunDependencies(G),0==G&&N){var B=N;N=null,B()}}()}function E(A){B(A.instance)}function C(B){return(!D&&I&&"function"==typeof fetch?fetch(H,{credentials:"same-origin"}).then((function(A){if(!A.ok)throw"failed to load wasm binary file at '"+H+"'";return A.arrayBuffer()})).catch((function(){return U(H)})):Promise.resolve().then((function(){return U(H)}))).then((function(B){return WebAssembly.instantiate(B,A)})).then((function(A){return A})).then(B,(function(A){s("failed to asynchronously prepare wasm: "+A),L(A)}))}if(G++,g.monitorRunDependencies&&g.monitorRunDependencies(G),g.instantiateWasm)try{return g.instantiateWasm(A,B)}catch(A){s("Module.instantiateWasm callback failed with error: "+A),Q(A)}(D||"function"!=typeof WebAssembly.instantiateStreaming||Y(H)||"function"!=typeof fetch?C(E):fetch(H,{credentials:"same-origin"}).then((function(B){return WebAssembly.instantiateStreaming(B,A).then(E,(function(A){return s("wasm streaming compile failed: "+A),s("falling back to ArrayBuffer instantiation"),C(E)}))}))).catch(Q)}(),g.___wasm_call_ctors=function(){return(g.___wasm_call_ctors=g.asm.__wasm_call_ctors).apply(null,arguments)},g.___errno_location=function(){return(g.___errno_location=g.asm.__errno_location).apply(null,arguments)},g._omalloc=function(){return(g._omalloc=g.asm.omalloc).apply(null,arguments)},g._ofree=function(){return(g._ofree=g.asm.ofree).apply(null,arguments)},g._getLastOnigError=function(){return(g._getLastOnigError=g.asm.getLastOnigError).apply(null,arguments)},g._createOnigScanner=function(){return(g._createOnigScanner=g.asm.createOnigScanner).apply(null,arguments)},g._freeOnigScanner=function(){return(g._freeOnigScanner=g.asm.freeOnigScanner).apply(null,arguments)},g._findNextOnigScannerMatch=function(){return(g._findNextOnigScannerMatch=g.asm.findNextOnigScannerMatch).apply(null,arguments)},g._findNextOnigScannerMatchDbg=function(){return(g._findNextOnigScannerMatchDbg=g.asm.findNextOnigScannerMatchDbg).apply(null,arguments)},g.stackSave=function(){return(g.stackSave=g.asm.stackSave).apply(null,arguments)},g.stackRestore=function(){return(g.stackRestore=g.asm.stackRestore).apply(null,arguments)},g.stackAlloc=function(){return(g.stackAlloc=g.asm.stackAlloc).apply(null,arguments)},g.dynCall_jiji=function(){return(g.dynCall_jiji=g.asm.dynCall_jiji).apply(null,arguments)},g.UTF8ToString=function(A,B){return A?h(c,A,B):""},N=function A(){S||l(),S||(N=A)},g.preInit)for("function"==typeof g.preInit&&(g.preInit=[g.preInit]);g.preInit.length>0;)g.preInit.pop()();return l(),A.ready});let zA=null;class _A{static _utf8ByteLength(A){let B=0;for(let Q=0,g=A.length;Q=55296&&E<=56319&&Q+1=56320&&B<=57343&&(C=65536+(E-55296<<10)|B-56320,I=!0)}B+=C<=127?1:C<=2047?2:C<=65535?3:4,I&&Q++}return B}constructor(A){const B=A.length,Q=_A._utf8ByteLength(A),g=Q!==B,E=g?new Uint32Array(B+1):null;g&&(E[B]=Q);const C=g?new Uint32Array(Q+1):null;g&&(C[Q]=B);const I=new Uint8Array(Q);let D=0;for(let Q=0;Q=55296&&w<=56319&&Q+1=56320&&B<=57343&&(o=65536+(w-55296<<10)|B-56320,s=!0)}g&&(E[Q]=D,s&&(E[Q+1]=D),o<=127?C[D+0]=Q:o<=2047?(C[D+0]=Q,C[D+1]=Q):o<=65535?(C[D+0]=Q,C[D+1]=Q,C[D+2]=Q):(C[D+0]=Q,C[D+1]=Q,C[D+2]=Q,C[D+3]=Q)),o<=127?I[D++]=o:o<=2047?(I[D++]=192|(1984&o)>>>6,I[D++]=128|(63&o)>>>0):o<=65535?(I[D++]=224|(61440&o)>>>12,I[D++]=128|(4032&o)>>>6,I[D++]=128|(63&o)>>>0):(I[D++]=240|(1835008&o)>>>18,I[D++]=128|(258048&o)>>>12,I[D++]=128|(4032&o)>>>6,I[D++]=128|(63&o)>>>0),s&&Q++}this.utf16Length=B,this.utf8Length=Q,this.utf16Value=A,this.utf8Value=I,this.utf16OffsetToUtf8=E,this.utf8OffsetToUtf16=C}createString(A){const B=A._omalloc(this.utf8Length);return A.HEAPU8.set(this.utf8Value,B),B}}class $A{constructor(A){if(this.id=++$A.LAST_ID,!zA)throw new Error("Must invoke loadWASM first.");this._onigBinding=zA,this.content=A;const B=new _A(A);this.utf16Length=B.utf16Length,this.utf8Length=B.utf8Length,this.utf16OffsetToUtf8=B.utf16OffsetToUtf8,this.utf8OffsetToUtf16=B.utf8OffsetToUtf16,this.utf8Length<1e4&&!$A._sharedPtrInUse?($A._sharedPtr||($A._sharedPtr=zA._omalloc(1e4)),$A._sharedPtrInUse=!0,zA.HEAPU8.set(B.utf8Value,$A._sharedPtr),this.ptr=$A._sharedPtr):this.ptr=B.createString(zA)}convertUtf8OffsetToUtf16(A){return this.utf8OffsetToUtf16?A<0?0:A>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[A]:A}convertUtf16OffsetToUtf8(A){return this.utf16OffsetToUtf8?A<0?0:A>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[A]:A}dispose(){this.ptr===$A._sharedPtr?$A._sharedPtrInUse=!1:this._onigBinding._ofree(this.ptr)}}$A.LAST_ID=0,$A._sharedPtr=0,$A._sharedPtrInUse=!1;class AB{constructor(A){if(!zA)throw new Error("Must invoke loadWASM first.");const B=[],Q=[];for(let g=0,E=A.length;gWebAssembly.instantiateStreaming(A,B)}(g):function(A){return async B=>{const Q=await A.arrayBuffer();return WebAssembly.instantiate(Q,B)}}(g):function(A){return B=>WebAssembly.instantiate(A,B)}(g)}return QB=new Promise(((A,B)=>{g=A,E=B})),function(A,B,Q,g){VA({print:B,instantiateWasm:(B,Q)=>{if("undefined"==typeof performance){const A=()=>Date.now();B.env.emscripten_get_now=A,B.wasi_snapshot_preview1.emscripten_get_now=A}return A(B).then((A=>Q(A.instance)),g),{}}}).then((A=>{zA=A,Q()}))}(B,Q,g,E),QB}function EB(A){return new $A(A)}function CB(A){return new AB(A)}function IB(A){const B=r[A];if(!B)return;const{id:Q}=G[B];return{id:Q,scopeName:B}}const DB=new Map;let wB,oB;async function sB(A){if(DB.has(A))return DB.get(A);const B=function(A){return G[A]}(A);if(!B)return Promise.resolve(void 0);let g;if(void 0===wB&&(g=eB(B.path),wB=g.then((()=>!0)).catch((()=>!1))),void 0===oB&&(oB=await wB),oB){const Q=g||eB(B.path);return DB.set(A,Q),Q}const E=Q(`grammars/${B.id}`);B.embeddedScopes.forEach((A=>{if(!DB.has(A)){const B=E.then((B=>B.find((B=>B.scopeName===A))));DB.set(A,B)}}));const C=E.then((B=>B.find((B=>B.scopeName===A))));return DB.set(A,C),C}async function eB(A){return await B("grammars",A)}const cB=30720,iB=16744448,tB=16775168,MB=11,hB=15,aB={NotSet:-1,None:0,Italic:1,Bold:2,Underline:4,Strikethrough:8};function nB(A,B,Q,g){const{tokens:E,ruleStack:C}=A.tokenizeLine2(Q,B),I=[];let D=Q.length;for(let A=E.length-2;A>=0;A-=2){const B=E[A],g=E[A+1],C=Q.slice(B,D);I.unshift({content:C,metadata:g}),D=B}let w=[];if(null==g?void 0:g.preserveWhitespace)w=I;else for(let A=0;A0?w[w.length-1].content+=B.content:A{const{rawTokens:E,nextStack:C}=nB(B,g,A,{preserveWhitespace:!0}),I=E.map((({content:A,metadata:B})=>({content:A,style:rB(B,Q)}))),D=function(A,B,Q,g){const{tokens:E}=Q.tokenizeLine(A,B),C=[];for(let B=0;B{if(w+=A.content.length,Q>>hB]},g=(A&cB)>>>MB;return g&aB.Italic&&(Q.fontStyle="italic"),g&aB.Bold&&(Q.fontWeight="bold"),g&aB.Underline&&(Q.textDecoration="underline"),g&aB.Strikethrough&&(Q.textDecoration="line-through"),Q}var GB=function(A){var B=null;if("undefined"!=typeof process&&null!=process.versions&&null!=process.versions.node)B=Buffer.from(A,"base64");else{var Q=globalThis.atob(A),g=Q.length;B=new Uint8Array(new ArrayBuffer(g));for(var E=0;E({createOnigScanner:CB,createOnigString:EB})));NB=new jA({onigLib:A,loadGrammar:A=>sB(A)})}const B=A.filter((A=>!LB(A))).map((A=>{const B=IB(A);if(!B)throw new RB(A);return NB.loadGrammar(B.scopeName)}));return Promise.all(B)}function kB(A){if(LB(A))return{langId:A,grammar:null};const B=IB(A);if(!B)throw new RB(A);const Q=function(A){const{_syncRegistry:B}=NB;return null==B?void 0:B._grammars.get(A)}(B.scopeName);if(!Q)throw new Error(`Syntax highlighting error: grammar for ${A} not loaded`);return{langId:B.id,grammar:Q}}class RB extends Error{constructor(A){super(`Unknown language: ${A}`),this.alias=A}}function KB(A,B,Q){NB.setTheme(Q);const g=function(A){const B=NB.getColorMap();return A.colorNames?B.map((B=>Object.keys(A.colorNames).find((Q=>A.colorNames[Q].toUpperCase()===B.toUpperCase()))||B)):B}(Q);return function(A,B,Q){let g=null;return A.split(/\r?\n|\r/g).map((A=>{const{rawTokens:E,nextStack:C}=nB(B,g,A);return g=C,E.map((({content:A,metadata:B})=>({content:A,style:rB(B,Q)})))}))}(A,B,g)}function YB(A){return A.split(/\r?\n|\r/g).map((A=>[{content:A,style:{}}]))}function UB(A,B){return PB(A.slice(1,-1)).map((A=>{const{from:Q,to:g}=uB(A);return{lineNumber:B,fromColumn:Q,toColumn:g}}))}function uB(A){const[B,Q]=A.split(":");if(!yB(B))throw new JB(B);const g=Number(B);if(g<1)throw new SB;if(Q){if(!yB(Q))throw new JB(Q);return{from:g,to:+Q}}return{from:g,to:g}}function PB(A){return A.split(/,(?![^\[]*\])/g)}function yB(A){A=A.toString();var B=Math.abs(A),Q=parseInt(A,10);return!isNaN(B)&&Q===B&&B.toString()===A}class JB extends Error{constructor(A){super(`Invalid number "${A}" in range string`),this.number=A,Object.setPrototypeOf(this,new.target.prototype)}}class SB extends Error{constructor(){super("Invalid line or column number in range string"),Object.setPrototypeOf(this,new.target.prototype)}}const pB="#001",lB="#010",dB={name:"comments",type:"light",foreground:"",background:"",colors:{},settings:[{settings:{foreground:"#000"}},{scope:["punctuation.definition.comment"],settings:{foreground:pB}},{scope:"comment",settings:{foreground:lB}}]};function fB(A,B,Q,g){const E=B?KB(A,B,dB):YB(A),C=[];let I=1;const D=E.map((A=>{const{annotations:B,lineWithoutComments:E}=function(A,B,Q){if(!A.some((A=>A.style.color===pB)))return{annotations:[],lineWithoutComments:A};const g=[];let E=0;for(;E!A.tokens.includes(B)));C.every((A=>""===A.content.trim()))&&(C=null);return{annotations:g.map((A=>({name:A.name,query:A.query,lineNumber:A.lineNumber,rangeString:A.rangeString}))),lineWithoutComments:C}}(A,g,I);if(C.push(...B),!E)return null;const D=E.map((A=>A.content)).join("");return["mdx","jsx","tsx"].includes(Q)&&B.length>0&&"{}"===D.trim()?null:(I++,D)})).filter((A=>null!==A)).join("\n"),w=C.map((A=>{var{rangeString:B,lineNumber:Q}=A,g=function(A,B){var Q={};for(var g in A)Object.prototype.hasOwnProperty.call(A,g)&&B.indexOf(g)<0&&(Q[g]=A[g]);if(null!=A&&"function"==typeof Object.getOwnPropertySymbols){var E=0;for(g=Object.getOwnPropertySymbols(A);EA.ranges.length>0));return{newCode:D,annotations:w}}function xB(A,B,Q){return A&&A.startsWith("(/")?function(A,B,Q){const g=B.match(/\(\/([\s\S]*?)\/([gimuy]*)\)/);if(!g)throw new Error(`Invalid RegExp string: ${B}`);const E=new RegExp(g[1],g[2]),C=A.split(/\r?\n/).slice(Q-1).join("\n");if(!E.global){const A=E.exec(C);if(!A)return[];const B=C.slice(0,A.index).split("\n").length+Q-1;return[{fromLineNumber:B,toLineNumber:B+A[0].split("\n").length-1}]}let I;const D=[];for(;I=E.exec(C);){const A=C.slice(0,I.index).split("\n").length+Q-1,B=A+I[0].split("\n").length-1,g=D[D.length-1];g&&g.fromLineNumber===A||D.push({fromLineNumber:A,toLineNumber:B})}return D}(Q,A,B):A&&A.startsWith("[/")?function(A,B,Q){const g=B.match(/\[\/([\s\S]*?)\/([gimuy]*)\]/);if(!g)throw new Error(`Invalid RegExp string: ${B}`);let E=g[2]||"";E+="d";const C=new RegExp(g[1],E);let I=A.split(/\r?\n/);I=I.slice(Q-1),C.multiline||(I=[I[0]]);const D=[];return I.forEach(((A,B)=>{if(!C.global){if(D.length>0)return;const g=C.exec(A);if(!g)return;const E=g.indices[1]||g.indices[0];return void D.push({lineNumber:B+Q,fromColumn:E[0]+1,toColumn:E[1]})}let g;for(;g=C.exec(A);){const A=g.indices[1]||g.indices[0];D.push({lineNumber:B+Q,fromColumn:A[0]+1,toColumn:A[1]})}})),D}(Q,A,B):function(A,B){return A?A.startsWith("[")?UB(A,B):PB(A.slice(1,-1)).map((A=>{if(A.includes("[")){const[Q,g]=A.split("["),E=Number(Q),C=B+E-1;if(!yB(C))throw new JB(Q);return UB("["+g,C)}const{from:Q,to:g}=uB(A);return[{fromLineNumber:Q+B-1,toLineNumber:g+B-1}]})).flat():[{fromLineNumber:B,toLineNumber:B}]}(A,B)}function mB(A,B){var Q;const g=A.match(/\s*([\w-]+)?(\([^\)]*\)|\[[^\]]*\])?(.*)$/),E=g[1],C=g[2],I=null===(Q=g[3])||void 0===Q?void 0:Q.trim();return B.includes(E)?{name:E,rangeString:C,query:I}:null}function OB(A,B){let Q=[],g=1;return A.forEach((A=>{Q.push({fromColumn:g,toColumn:g+A.content.length-1,token:A}),g+=A.content.length})),B.forEach((A=>{Q=function(A,B){const{range:Q}=B,{fromColumn:g,toColumn:E}=Q,C=[];let I=0;for(;IE){const[A,Q]=bB(B,E+1);D.tokens.push(A),C.push(Q)}else D.tokens.push(B);I++}else C.push(D);for(;IqB(A)))}function qB(A){return"tokens"in A?{annotationName:A.annotationName,annotationQuery:A.annotationQuery,fromColumn:A.fromColumn,toColumn:A.toColumn,tokens:A.tokens.map((A=>qB(A)))}:A.token}function bB(A,B){if("token"in A){const Q=Object.assign(Object.assign({},A.token),{content:A.token.content.slice(0,B-A.fromColumn)}),g=Object.assign(Object.assign({},A.token),{content:A.token.content.slice(B-A.fromColumn)});return[Object.assign(Object.assign({},A),{toColumn:B-1,token:Q}),Object.assign(Object.assign({},A),{fromColumn:B,token:g})]}{const Q=[],g=[];A.tokens.forEach((A=>{if(A.toColumn=B)g.push(A);else{const[E,C]=bB(A,B);Q.push(E),g.push(C)}}));return[Object.assign(Object.assign({},A),{toColumn:B-1,tokens:Q}),Object.assign(Object.assign({},A),{fromColumn:B,tokens:g})]}}function WB(A,B){let Q=A.map(((A,B)=>({fromLineNumber:B+1,toLineNumber:B+1,line:A})));return B.forEach((A=>{Q=function(A,B){const{range:Q,name:g,query:E}=B,{fromLineNumber:C,toLineNumber:I}=Q,D=[];let w=0;for(;wI){const[A,Q]=vB(B,I+1);o.lines.push(A),D.push(Q)}else o.lines.push(B);w++}else D.push(o);for(;wTB(A)))}function TB(A){return"line"in A?{lineNumber:A.fromLineNumber,tokens:A.line.tokens}:{annotationName:A.annotationName,annotationQuery:A.annotationQuery,fromLineNumber:A.fromLineNumber,toLineNumber:A.toLineNumber,lines:A.lines.map((A=>TB(A)))}}function vB(A,B){if("line"in A)return[Object.assign(Object.assign({},A),{toLineNumber:B-1}),Object.assign(Object.assign({},A),{fromLineNumber:B})];{const Q=[],g=[];return A.lines.forEach((A=>{if(A.toLineNumber=B)g.push(A);else{const[E,C]=vB(A,B);Q.push(E),g.push(C)}})),[Object.assign(Object.assign({},A),{toLineNumber:B-1,lines:Q}),Object.assign(Object.assign({},A),{fromLineNumber:B,lines:g})]}}function XB(A,B){const{inlineAnnotations:Q,multilineAnnotations:g}=function(A){const B=[],Q=[];return A.forEach((A=>{A.ranges.forEach((g=>{"lineNumber"in g?B.push(Object.assign(Object.assign({},A),{range:g})):Q.push(Object.assign(Object.assign({},A),{range:g}))}))})),{inlineAnnotations:B,multilineAnnotations:Q}}(B);return WB(A.map(((A,B)=>{const g=Q.filter((A=>A.range.lineNumber===B+1));return{lineNumber:B+1,tokens:OB(A,g)}})),g)}var ZB=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],jB={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",9:"strikethrough"};function VB(A,B){const Q=A.indexOf("[",B);if(-1!==Q){const B=A.indexOf("m",Q);return{sequence:A.substring(Q+2,B).split(";"),startPosition:Q,position:B+1}}return{position:A.length}}function zB(A,B){let Q=1;const g=A[B+Q++];let E;if("2"===g){const g=[A[B+Q++],A[B+Q++],A[B+Q]].map((A=>Number.parseInt(A)));3!==g.length||g.some((A=>Number.isNaN(A)))||(E={type:"rgb",rgb:g})}else if("5"===g){const g=Number.parseInt(A[B+Q]);Number.isNaN(g)||(E={type:"table",index:Number(g)})}return[Q,E]}function _B(A){const B=[];for(let Q=0;Q=90&&E<=97?B.push({type:"setForegroundColor",value:{type:"named",name:ZB[E-90+8]}}):E>=100&&E<=107&&B.push({type:"setBackgroundColor",value:{type:"named",name:ZB[E-100+8]}})}return B}function $B(A,B){const Q=function(){let A=null,B=null,Q=new Set;return{parse(g){const E=[];let C=0;do{const I=VB(g,C),D=I.sequence?g.substring(C,I.startPosition):g.substring(C);if(D.length>0&&E.push({value:D,foreground:A,background:B,decorations:new Set(Q)}),I.sequence){const g=_B(I.sequence);for(const E of g)"resetAll"===E.type?(A=null,B=null,Q.clear()):"resetForegroundColor"===E.type?A=null:"resetBackgroundColor"===E.type?B=null:"resetDecoration"===E.type&&Q.delete(E.value);for(const E of g)"setForegroundColor"===E.type?A=E.value:"setBackgroundColor"===E.type?B=E.value:"setDecoration"===E.type&&Q.add(E.value)}C=I.position}while(Cfunction(A,B,Q){const g=A.parse(B),E=g.map((({value:A,foreground:B,background:g,decorations:E})=>{const C=AQ(B,Q),I={};C&&(I.color=C);const D=AQ(g,Q);return D&&(I.background=D),E.has("bold")&&(I.fontWeight="bold"),E.has("italic")&&(I.fontStyle="italic"),E.has("underline")&&(I.textDecoration="underline"),E.has("strikethrough")&&(I.textDecoration="line-through"),E.has("reverse")&&(I.color=D,I.background=C),E.has("dim")&&(I.opacity=.5),{content:A,style:I}}));return E}(Q,A,B)));return g}function AQ(A,B){if(A){if("named"===A.type){return w(B,"terminal.ansi"+(A.name[0].toUpperCase()+A.name.slice(1)))}if("rgb"===A.type){const[B,Q,g]=A.rgb;return`rgb(${B}, ${Q}, ${g})`}}}async function BQ(A,B){await Promise.all([HB(A),i(B)])}async function QQ(A,B,Q="dark-plus",g={}){const E=A||"",C=B||"text";if("string"!=typeof E)throw new Error("Syntax highlighter error: code must be a string");if("string"!=typeof C)throw new Error("Syntax highlighter error: lang must be a string");return await BQ([C],Q),gQ(E,C,Q,g)}function gQ(A,B,Q="dark-plus",g={}){const E=A||"",C=B||"text";if("string"!=typeof E)throw new Error("Syntax highlighter error: code must be a string");if("string"!=typeof C)throw new Error("Syntax highlighter error: lang must be a string");const{langId:I,grammar:D}=kB(C),o=t(Q),s="text"==I?YB(E):"terminal"==I?$B(E,o):(null==g?void 0:g.scopes)?function(A,B,Q){return NB.setTheme(Q),FB(A,B,NB.getColorMap())}(E,D,o):KB(E,D,o),e="terminal"==I?function(A){return{color:w(A,"terminal.foreground"),background:w(A,"terminal.background")}}(o):{color:o.foreground,background:o.background};if(function(A){return"annotations"in A}(g)){return{lines:XB(s,(null==g?void 0:g.annotations)||[]),lang:I,style:e}}return{lines:s,lang:I,style:e}}async function EQ(A,B,Q){if(!Q)return{code:A,annotations:[]};await HB([B]);const{grammar:g}=kB(B),{newCode:E,annotations:C}=fB(A,g,B,Q);return{code:E,annotations:C}}async function CQ(A){if(!A)throw new Error("Syntax highlighter error: undefined theme");await BQ([],A);return n(t(A))}function IQ(A){if(!A)throw new Error("Syntax highlighter error: undefined theme");return n(t(A))}export{F as LANG_NAMES,h as THEME_NAMES,RB as UnknownLanguageError,a as UnknownThemeError,EQ as extractAnnotations,CQ as getThemeColors,IQ as getThemeColorsSync,QQ as highlight,gQ as highlightSync,BQ as preload}; diff --git a/lib/dist/worker.esm.mjs b/lib/dist/worker.esm.mjs index 7bb0944..8a787bc 100644 --- a/lib/dist/worker.esm.mjs +++ b/lib/dist/worker.esm.mjs @@ -1 +1 @@ -import e from"./onig.wasm?module";async function t(e,t){throw new Error("no fs")}async function s(e){const t=await fetch(`https://lighter.codehike.org/${e}.json`);return await t.json()}const r=e=>/^#([A-Fa-f0-9]{3,4}){1,2}$/.test(e),o=(e,t)=>e.match(new RegExp(`.{${t}}`,"g")),n=e=>parseInt(e.repeat(2/e.length),16);function c(e,t){return void 0!==e?e/255:"number"!=typeof t||t<0||t>1?1:t}function a(e,t){if(!e)return e;const{r:s,g:a,b:i,a:u}=function(e){if(!e)return;if(!r(e))throw new Error("Invalid color string, must be a valid hex color");const t=Math.floor((e.length-1)/3),s=o(e.slice(1),t),[a,i,u,l]=s.map(n);return{r:a,g:i,b:u,a:c(l,1)}}(e);return function(e){if(!e)return;const{r:t,g:s,b:r,a:o}=e,n=Math.round(255*o);return`#${t.toString(16).padStart(2,"0")}${s.toString(16).padStart(2,"0")}${r.toString(16).padStart(2,"0")}${n.toString(16).padStart(2,"0")}`}({r:s,g:a,b:i,a:u*t})}function i(e,t){const s=e.colors||{};if(s[t])return s[t];const r=l[t];if(!r)throw new Error(`Unknown theme color key: ${t}`);return"string"==typeof r?i(e,r):function(e,t){const s=t[e.type];if(Array.isArray(s)){const[t,r,...o]=s;return t(i(e,r),...o)}return s}(e,r)}const u="#6FC3DF",l={"editor.foreground":{dark:"#bbbbbb",light:"#333333",hc:"#ffffff"},"editorLineNumber.foreground":{dark:"#858585",light:"#237893",hc:"#fffffe"},"editor.selectionBackground":{light:"#ADD6FF",dark:"#264F78",hc:"#f3f518"},"editor.background":{light:"#fffffe",dark:"#1E1E1E",hc:"#000000"},"editorGroupHeader.tabsBackground":{dark:"#252526",light:"#F3F3F3"},"tab.activeBackground":"editor.background","tab.activeForeground":{dark:"#ffffff",light:"#333333",hc:"#ffffff"},"tab.border":{dark:"#252526",light:"#F3F3F3",hc:u},"tab.activeBorder":"tab.activeBackground","tab.inactiveBackground":{dark:"#2D2D2D",light:"#ECECEC"},"tab.inactiveForeground":{dark:[a,"tab.activeForeground",.5],light:[a,"tab.activeForeground",.5],hc:"#ffffff"},"diffEditor.insertedTextBackground":{dark:"#9ccc2c33",light:"#9ccc2c40"},"diffEditor.removedTextBackground":{dark:"#ff000033",light:"#ff000033"},"diffEditor.insertedLineBackground":{dark:"#9bb95533",light:"#9bb95533"},"diffEditor.removedLineBackground":{dark:"#ff000033",light:"#ff000033"},"icon.foreground":{dark:"#C5C5C5",light:"#424242",hc:"#FFFFFF"},"sideBar.background":{dark:"#252526",light:"#F3F3F3",hc:"#000000"},"sideBar.foreground":"editor.foreground","sideBar.border":"sideBar.background","list.inactiveSelectionBackground":{dark:"#37373D",light:"#E4E6F1"},"list.inactiveSelectionForeground":{},"list.hoverBackground":{dark:"#2A2D2E",light:"#F0F0F0"},"list.hoverForeground":{},"editorGroupHeader.tabsBorder":{hc:u},"tab.activeBorderTop":{hc:u},"tab.hoverBackground":"tab.inactiveBackground","tab.hoverForeground":"tab.inactiveForeground","editor.rangeHighlightBackground":{dark:"#ffffff0b",light:"#fdff0033"},"editor.infoForeground":{dark:"#3794FF",light:"#1a85ff",hc:"#3794FF"},"input.border":{hc:u},"input.background":{dark:"#3C3C3C",light:"#fffffe",hc:"#000000"},"input.foreground":"editor.foreground","editor.lineHighlightBackground":{},focusBorder:{light:"#0090F1",dark:"#007FD4",hc:u},"editorGroup.border":{dark:"#444444",light:"#E7E7E7",hc:u},"list.activeSelectionBackground":{dark:"#094771",light:"#0060C0",hc:"#000000"},"list.activeSelectionForeground":{dark:"#fffffe",light:"#fffffe",hc:"#fffffe"},"lighter.inlineBackground":{dark:[a,"editor.background",.9],light:[a,"editor.background",.9]},"terminal.background":"editor.background","terminal.foreground":"editor.foreground","terminal.ansiBlack":{dark:"#000000",light:"#000000",hc:"#000000"},"terminal.ansiRed":{dark:"#cd3131",light:"#cd3131",hc:"#cd0000"},"terminal.ansiGreen":{dark:"#0DBC79",light:"#00BC00",hc:"#00cd00"},"terminal.ansiYellow":{dark:"#e5e510",light:"#949800",hc:"#cdcd00"},"terminal.ansiBlue":{dark:"#2472c8",light:"#0451a5",hc:"#0000ee"},"terminal.ansiMagenta":{dark:"#bc3fbc",light:"#bc05bc",hc:"#cd00cd"},"terminal.ansiCyan":{dark:"#11a8cd",light:"#0598bc",hc:"#00cdcd"},"terminal.ansiWhite":{dark:"#e5e5e5",light:"#555555",hc:"#e5e5e5"},"terminal.ansiBrightBlack":{dark:"#666666",light:"#666666",hc:"#7f7f7f"},"terminal.ansiBrightRed":{dark:"#f14c4c",light:"#cd3131",hc:"#ff0000"},"terminal.ansiBrightGreen":{dark:"#23d18b",light:"#14CE14",hc:"#00ff00"},"terminal.ansiBrightYellow":{dark:"#f5f543",light:"#b5ba00",hc:"#ffff00"},"terminal.ansiBrightBlue":{dark:"#3b8eea",light:"#0451a5",hc:"#5c5cff"},"terminal.ansiBrightMagenta":{dark:"#d670d6",light:"#bc05bc",hc:"#ff00ff"},"terminal.ansiBrightCyan":{dark:"#29b8db",light:"#0598bc",hc:"#00ffff"},"terminal.ansiBrightWhite":{dark:"#e5e5e5",light:"#a5a5a5",hc:"#ffffff"}},h=new Map,d=new Map;async function p(e){if("string"==typeof e){const r=e;if(!f.includes(r))throw new b(r);if(!h.has(r)){const e=async function(e){try{return await t()}catch(t){return await s(`themes/${e}`)}}(r).then((e=>(d.set(r,e),e)));h.set(r,e)}return h.get(r)}return e}function m(e){let t=null;if("string"==typeof e){if(t=d.get(e),!t)throw new Error("Syntax highlighting error: theme not loaded")}else t=e;return function(e){if(!e)return;const t=e.settings||e.tokenColors||[],s={name:e.name||"unknown-theme",type:g(e),foreground:"",background:"",settings:t,colors:e.colors||{},colorNames:e.colorNames},r=t.find((e=>!e.scope));if(r){const{foreground:e,background:t}=(null==r?void 0:r.settings)||{},o={};e&&!s.colors["editor.foreground"]&&(o["editor.foreground"]=e),t&&!s.colors["editor.background"]&&(o["editor.background"]=t),Object.keys(o).length>0&&(s.colors=Object.assign(Object.assign({},s.colors),o)),s.foreground=e,s.background=t}r||(s.settings=[{settings:{foreground:i(s,"editor.foreground"),background:i(s,"editor.background")}},...s.settings]);if(s.background=s.background||i(s,"editor.background"),s.foreground=s.foreground||i(s,"editor.foreground"),"from-css"===e.type&&!s.colorNames){const e={};let t=0;s.settings=s.settings.map((s=>{const r=Object.assign(Object.assign({},s),{settings:Object.assign({},s.settings)}),{foreground:o,background:n}=r.settings||{};return o&&!e[o]&&(e[o]=`#${t.toString(16).padStart(6,"0")}`,t++),n&&!e[n]&&(e[n]=`#${t.toString(16).padStart(6,"0")}`,t++),o&&(r.settings.foreground=e[o]),n&&(r.settings.background=e[n]),r})),s.colorNames=e}return s}(t)}function g(e){var t;if("from-css"===e.type)return"from-css";return"light"===(e.type?e.type:(null===(t=e.name)||void 0===t?void 0:t.toLowerCase().includes("light"))?"light":"dark")?"light":"dark"}const f=["dark-plus","dracula-soft","dracula","github-dark","github-dark-dimmed","github-from-css","github-light","light-plus","material-darker","material-default","material-from-css","material-lighter","material-ocean","material-palenight","min-dark","min-light","monokai","nord","one-dark-pro","poimandres","slack-dark","slack-ochin","solarized-dark","solarized-light"];class b extends Error{constructor(e){super(`Unknown theme: ${e}`),this.theme=e}}function y(e){const t=t=>"colorScheme"===t?function(e){return"from-css"===e.type?"var(--ch-0)":e.type}(e):"foreground"===t?e.foreground:"background"===t?e.background:i(e,t);return{colorScheme:t("colorScheme"),foreground:t("foreground"),background:t("background"),lighter:{inlineBackground:t("lighter.inlineBackground")},editor:{background:t("editor.background"),foreground:t("editor.foreground"),lineHighlightBackground:t("editor.lineHighlightBackground"),rangeHighlightBackground:t("editor.rangeHighlightBackground"),infoForeground:t("editor.infoForeground"),selectionBackground:t("editor.selectionBackground")},focusBorder:t("focusBorder"),tab:{activeBackground:t("tab.activeBackground"),activeForeground:t("tab.activeForeground"),inactiveBackground:t("tab.inactiveBackground"),inactiveForeground:t("tab.inactiveForeground"),border:t("tab.border"),activeBorder:t("tab.activeBorder"),activeBorderTop:t("tab.activeBorderTop")},editorGroup:{border:t("editorGroup.border")},editorGroupHeader:{tabsBackground:t("editorGroupHeader.tabsBackground")},editorLineNumber:{foreground:t("editorLineNumber.foreground")},input:{background:t("input.background"),foreground:t("input.foreground"),border:t("input.border")},icon:{foreground:t("icon.foreground")},sideBar:{background:t("sideBar.background"),foreground:t("sideBar.foreground"),border:t("sideBar.border")},list:{activeSelectionBackground:t("list.activeSelectionBackground"),activeSelectionForeground:t("list.activeSelectionForeground"),hoverBackground:t("list.hoverBackground"),hoverForeground:t("list.hoverForeground")}}}const _=["abap","actionscript-3","ada","apache","apex","apl","applescript","ara","asm","astro","awk","ballerina","bash","bat","batch","be","beancount","berry","bibtex","bicep","blade","c","c#","cadence","cdc","clarity","clj","clojure","cmake","cmd","cobol","codeql","coffee","console","cpp","crystal","cs","csharp","css","cue","cypher","d","dart","dax","diff","docker","dockerfile","dream-maker","elixir","elm","erb","erl","erlang","f#","fish","fs","fsharp","fsl","gdresource","gdscript","gdshader","gherkin","git-commit","git-rebase","glimmer-js","glimmer-ts","glsl","gnuplot","go","graphql","groovy","hack","haml","handlebars","haskell","hbs","hcl","hjson","hlsl","hs","html","http","imba","ini","jade","java","javascript","jinja-html","jison","js","json","json5","jsonc","jsonl","jsonnet","jssm","jsx","julia","kotlin","kql","kusto","latex","less","liquid","lisp","logo","lua","make","makefile","markdown","marko","matlab","md","mdx","mermaid","narrat","nextflow","nginx","nim","nix","objc","objective-c","objective-cpp","ocaml","pascal","perl","perl6","php","plsql","postcss","powerquery","powershell","prisma","prolog","properties","proto","ps","ps1","pug","puppet","purescript","py","python","ql","r","raku","razor","rb","reg","rel","riscv","rs","rst","ruby","rust","sas","sass","scala","scheme","scss","sh","shader","shaderlab","shell","shellscript","shellsession","smalltalk","solidity","sparql","sql","ssh-config","stata","styl","stylus","svelte","swift","system-verilog","tasl","tcl","terminal","tex","text","toml","ts","tsx","turtle","twig","txt","typescript","v","vb","verilog","vhdl","vim","viml","vimscript","vue","vue-html","vyper","wasm","wenyan","wgsl","wolfram","xml","xsl","yaml","yml","zenscript","zsh","文言"],x={abap:"source.abap","actionscript-3":"source.actionscript.3",ada:"source.ada",apache:"source.apacheconf",apex:"source.apex",apl:"source.apl",applescript:"source.applescript",ara:"source.ara",asm:"source.asm.x86_64",astro:"source.astro",awk:"source.awk",ballerina:"source.ballerina",bat:"source.batchfile",batch:"source.batchfile",beancount:"text.beancount",berry:"source.berry",be:"source.berry",bibtex:"text.bibtex",bicep:"source.bicep",blade:"text.html.php.blade",c:"source.c",cadence:"source.cadence",cdc:"source.cadence",clarity:"source.clar",clojure:"source.clojure",clj:"source.clojure",cmake:"source.cmake",cobol:"source.cobol",codeql:"source.ql",ql:"source.ql",coffee:"source.coffee",cpp:"source.cpp",crystal:"source.crystal",csharp:"source.cs","c#":"source.cs",cs:"source.cs",css:"source.css",cue:"source.cue",cypher:"source.cypher",d:"source.d",dart:"source.dart",dax:"source.dax",diff:"source.diff",docker:"source.dockerfile",dockerfile:"source.dockerfile","dream-maker":"source.dm",elixir:"source.elixir",elm:"source.elm",erb:"text.html.erb",erlang:"source.erlang",erl:"source.erlang",fish:"source.fish",fsharp:"source.fsharp","f#":"source.fsharp",fs:"source.fsharp",gdresource:"source.gdresource",gdscript:"source.gdscript",gdshader:"source.gdshader",gherkin:"text.gherkin.feature","git-commit":"text.git-commit","git-rebase":"text.git-rebase","glimmer-js":"source.gjs","glimmer-ts":"source.gts",glsl:"source.glsl",gnuplot:"source.gnuplot",go:"source.go",graphql:"source.graphql",groovy:"source.groovy",hack:"source.hack",haml:"text.haml",handlebars:"text.html.handlebars",hbs:"text.html.handlebars",haskell:"source.haskell",hs:"source.haskell",hcl:"source.hcl",hjson:"source.hjson",hlsl:"source.hlsl",html:"text.html.basic",http:"source.http",imba:"source.imba",ini:"source.ini",properties:"source.ini",java:"source.java",javascript:"source.js",js:"source.js","jinja-html":"text.html.jinja",jison:"source.jison",json:"source.json",json5:"source.json5",jsonc:"source.json.comments",jsonl:"source.json.lines",jsonnet:"source.jsonnet",jssm:"source.jssm",fsl:"source.jssm",jsx:"source.js.jsx",julia:"source.julia",kotlin:"source.kotlin",kusto:"source.kusto",kql:"source.kusto",latex:"text.tex.latex",less:"source.css.less",liquid:"text.html.liquid",lisp:"source.lisp",logo:"source.logo",lua:"source.lua",make:"source.makefile",makefile:"source.makefile",markdown:"text.html.markdown",md:"text.html.markdown",marko:"text.marko",matlab:"source.matlab",mdx:"source.mdx",mermaid:"source.mermaid",narrat:"source.narrat",nextflow:"source.nextflow",nginx:"source.nginx",nim:"source.nim",nix:"source.nix","objective-c":"source.objc",objc:"source.objc","objective-cpp":"source.objcpp",ocaml:"source.ocaml",pascal:"source.pascal",perl:"source.perl",php:"source.php",plsql:"source.plsql.oracle",postcss:"source.css.postcss",powerquery:"source.powerquery",powershell:"source.powershell",ps:"source.powershell",ps1:"source.powershell",prisma:"source.prisma",prolog:"source.prolog",proto:"source.proto",pug:"text.pug",jade:"text.pug",puppet:"source.puppet",purescript:"source.purescript",python:"source.python",py:"source.python",r:"source.r",raku:"source.perl.6",perl6:"source.perl.6",razor:"text.aspnetcorerazor",reg:"source.reg",rel:"source.rel",riscv:"source.riscv",rst:"source.rst",ruby:"source.ruby",rb:"source.ruby",rust:"source.rust",rs:"source.rust",sas:"source.sas",sass:"source.sass",scala:"source.scala",scheme:"source.scheme",scss:"source.css.scss",shaderlab:"source.shaderlab",shader:"source.shaderlab",shellscript:"source.shell",bash:"source.shell",console:"source.shell",sh:"source.shell",shell:"source.shell",zsh:"source.shell",shellsession:"text.shell-session",smalltalk:"source.smalltalk",solidity:"source.solidity",sparql:"source.sparql",sql:"source.sql","ssh-config":"source.ssh-config",stata:"source.stata",stylus:"source.stylus",styl:"source.stylus",svelte:"source.svelte",swift:"source.swift","system-verilog":"source.systemverilog",tasl:"source.tasl",tcl:"source.tcl",tex:"text.tex",toml:"source.toml",tsx:"source.tsx",turtle:"source.turtle",twig:"text.html.twig",txt:"source.txt",typescript:"source.ts",ts:"source.ts",v:"source.v",vb:"source.asp.vb.net",cmd:"source.asp.vb.net",verilog:"source.verilog",vhdl:"source.vhdl",viml:"source.viml",vim:"source.viml",vimscript:"source.viml","vue-html":"text.html.vue-html",vue:"source.vue",vyper:"source.vyper",wasm:"source.wat",wenyan:"source.wenyan","文言":"source.wenyan",wgsl:"source.wgsl",wolfram:"source.wolfram",xml:"text.xml",xsl:"text.xml.xsl",yaml:"source.yaml",yml:"source.yaml",zenscript:"source.zenscript"},k={"source.abap":{id:"abap",path:"abap.tmLanguage.json",embeddedScopes:[]},"source.actionscript.3":{id:"actionscript-3",path:"actionscript-3.tmLanguage.json",embeddedScopes:[]},"source.ada":{id:"ada",path:"ada.tmLanguage.json",embeddedScopes:[]},"source.apacheconf":{id:"apache",path:"apache.tmLanguage.json",embeddedScopes:[]},"source.apex":{id:"apex",path:"apex.tmLanguage.json",embeddedScopes:[]},"source.apl":{id:"apl",path:"apl.tmLanguage.json",embeddedScopes:["source.java","source.json","source.js","source.css","text.xml","text.html.basic"]},"source.applescript":{id:"applescript",path:"applescript.tmLanguage.json",embeddedScopes:[]},"source.ara":{id:"ara",path:"ara.tmLanguage.json",embeddedScopes:[]},"source.asm.x86_64":{id:"asm",path:"asm.tmLanguage.json",embeddedScopes:[]},"source.astro":{id:"astro",path:"astro.tmLanguage.json",embeddedScopes:["source.tsx","source.css.postcss","source.css.less","source.css.scss","source.css","source.sass","source.stylus","source.ts","source.js","source.json"]},"source.awk":{id:"awk",path:"awk.tmLanguage.json",embeddedScopes:[]},"source.ballerina":{id:"ballerina",path:"ballerina.tmLanguage.json",embeddedScopes:[]},"source.batchfile":{id:"bat",path:"bat.tmLanguage.json",embeddedScopes:[]},"text.beancount":{id:"beancount",path:"beancount.tmLanguage.json",embeddedScopes:[]},"source.berry":{id:"berry",path:"berry.tmLanguage.json",embeddedScopes:[]},"text.bibtex":{id:"bibtex",path:"bibtex.tmLanguage.json",embeddedScopes:[]},"source.bicep":{id:"bicep",path:"bicep.tmLanguage.json",embeddedScopes:[]},"text.html.php.blade":{id:"blade",path:"blade.tmLanguage.json",embeddedScopes:["source.java","source.css","source.json","source.js","source.sql","text.xml","text.html.basic"]},"source.c":{id:"c",path:"c.tmLanguage.json",embeddedScopes:[]},"source.cadence":{id:"cadence",path:"cadence.tmLanguage.json",embeddedScopes:[]},"source.clar":{id:"clarity",path:"clarity.tmLanguage.json",embeddedScopes:[]},"source.clojure":{id:"clojure",path:"clojure.tmLanguage.json",embeddedScopes:[]},"source.cmake":{id:"cmake",path:"cmake.tmLanguage.json",embeddedScopes:[]},"source.cobol":{id:"cobol",path:"cobol.tmLanguage.json",embeddedScopes:["source.css","source.js","source.java","text.html.basic","source.sql"]},"source.ql":{id:"codeql",path:"codeql.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.stylus","source.sass","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.tsx","source.ts","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.css.scss","source.swift","source.objc","source.css.less","source.json.comments","source.json","source.js","text.pug","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.coffee","source.clojure","source.batchfile","source.yaml","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","text.html.basic","source.css","text.html.markdown"]},"source.coffee":{id:"coffee",path:"coffee.tmLanguage.json",embeddedScopes:["source.js"]},"source.cpp":{id:"cpp",path:"cpp.tmLanguage.json",embeddedScopes:["source.c","source.sql","source.glsl"]},"source.crystal":{id:"crystal",path:"crystal.tmLanguage.json",embeddedScopes:["source.shell","source.js","source.c","source.css","source.sql","text.html.basic"]},"source.cs":{id:"csharp",path:"csharp.tmLanguage.json",embeddedScopes:[]},"source.css":{id:"css",path:"css.tmLanguage.json",embeddedScopes:[]},"source.cue":{id:"cue",path:"cue.tmLanguage.json",embeddedScopes:[]},"source.cypher":{id:"cypher",path:"cypher.tmLanguage.json",embeddedScopes:[]},"source.d":{id:"d",path:"d.tmLanguage.json",embeddedScopes:[]},"source.dart":{id:"dart",path:"dart.tmLanguage.json",embeddedScopes:[]},"source.dax":{id:"dax",path:"dax.tmLanguage.json",embeddedScopes:[]},"source.diff":{id:"diff",path:"diff.tmLanguage.json",embeddedScopes:[]},"source.dockerfile":{id:"docker",path:"docker.tmLanguage.json",embeddedScopes:[]},"source.dm":{id:"dream-maker",path:"dream-maker.tmLanguage.json",embeddedScopes:[]},"source.elixir":{id:"elixir",path:"elixir.tmLanguage.json",embeddedScopes:["source.css","source.js","text.html.basic"]},"source.elm":{id:"elm",path:"elm.tmLanguage.json",embeddedScopes:["source.c","source.glsl"]},"text.html.erb":{id:"erb",path:"erb.tmLanguage.json",embeddedScopes:["source.java","source.lua","source.shell","source.c","source.sql","text.xml","source.css","source.js","source.ruby","text.html.basic"]},"source.erlang":{id:"erlang",path:"erlang.tmLanguage.json",embeddedScopes:[]},"source.fish":{id:"fish",path:"fish.tmLanguage.json",embeddedScopes:[]},"source.fsharp":{id:"fsharp",path:"fsharp.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.stylus","source.sass","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.cs","source.tsx","source.ts","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.css.scss","source.swift","source.objc","source.css.less","source.json.comments","source.json","source.js","text.pug","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.coffee","source.clojure","source.batchfile","source.yaml","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","text.html.basic","source.css","text.html.markdown"]},"source.gdresource":{id:"gdresource",path:"gdresource.tmLanguage.json",embeddedScopes:["source.gdscript","source.gdshader"]},"source.gdscript":{id:"gdscript",path:"gdscript.tmLanguage.json",embeddedScopes:[]},"source.gdshader":{id:"gdshader",path:"gdshader.tmLanguage.json",embeddedScopes:[]},"text.gherkin.feature":{id:"gherkin",path:"gherkin.tmLanguage.json",embeddedScopes:[]},"text.git-commit":{id:"git-commit",path:"git-commit.tmLanguage.json",embeddedScopes:["source.diff"]},"text.git-rebase":{id:"git-rebase",path:"git-rebase.tmLanguage.json",embeddedScopes:["source.shell"]},"source.gjs":{id:"glimmer-js",path:"glimmer-js.tmLanguage.json",embeddedScopes:["source.yaml","source.css","text.html.basic","text.html.handlebars","source.js"]},"source.gts":{id:"glimmer-ts",path:"glimmer-ts.tmLanguage.json",embeddedScopes:["source.yaml","source.js","source.css","text.html.basic","text.html.handlebars","source.ts"]},"source.glsl":{id:"glsl",path:"glsl.tmLanguage.json",embeddedScopes:["source.c"]},"source.gnuplot":{id:"gnuplot",path:"gnuplot.tmLanguage.json",embeddedScopes:[]},"source.go":{id:"go",path:"go.tmLanguage.json",embeddedScopes:[]},"source.graphql":{id:"graphql",path:"graphql.tmLanguage.json",embeddedScopes:["source.tsx","source.js.jsx","source.ts","source.js"]},"source.groovy":{id:"groovy",path:"groovy.tmLanguage.json",embeddedScopes:[]},"source.hack":{id:"hack",path:"hack.tmLanguage.json",embeddedScopes:["source.css","source.js","source.sql","text.html.basic"]},"text.haml":{id:"haml",path:"haml.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.stylus","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.tsx","source.ts","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.css.scss","source.swift","source.objc","source.css.less","source.json.comments","source.json","text.pug","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.clojure","source.batchfile","source.yaml","text.xml.xsl","source.asp.vb.net","source.php","source.r","source.perl","source.makefile","source.java","source.ini","source.lua","source.shell","source.c","source.sql","text.xml","text.html.basic","source.css","text.html.markdown","source.coffee","source.sass","source.js","source.ruby"]},"text.html.handlebars":{id:"handlebars",path:"handlebars.tmLanguage.json",embeddedScopes:["source.yaml","source.js","source.css","text.html.basic"]},"source.haskell":{id:"haskell",path:"haskell.tmLanguage.json",embeddedScopes:[]},"source.hcl":{id:"hcl",path:"hcl.tmLanguage.json",embeddedScopes:[]},"source.hjson":{id:"hjson",path:"hjson.tmLanguage.json",embeddedScopes:[]},"source.hlsl":{id:"hlsl",path:"hlsl.tmLanguage.json",embeddedScopes:[]},"text.html.basic":{id:"html",path:"html.tmLanguage.json",embeddedScopes:["source.css","source.js"]},"source.http":{id:"http",path:"http.tmLanguage.json",embeddedScopes:["source.tsx","source.js.jsx","source.ts","source.js","source.java","source.graphql","text.xml","source.json","source.shell"]},"source.imba":{id:"imba",path:"imba.tmLanguage.json",embeddedScopes:[]},"source.ini":{id:"ini",path:"ini.tmLanguage.json",embeddedScopes:[]},"source.java":{id:"java",path:"java.tmLanguage.json",embeddedScopes:[]},"source.js":{id:"javascript",path:"javascript.tmLanguage.json",embeddedScopes:[]},"text.html.jinja":{id:"jinja-html",path:"jinja-html.tmLanguage.json",embeddedScopes:["source.css","source.js","text.html.basic"]},"source.jison":{id:"jison",path:"jison.tmLanguage.json",embeddedScopes:["source.js"]},"source.json":{id:"json",path:"json.tmLanguage.json",embeddedScopes:[]},"source.json5":{id:"json5",path:"json5.tmLanguage.json",embeddedScopes:[]},"source.json.comments":{id:"jsonc",path:"jsonc.tmLanguage.json",embeddedScopes:[]},"source.json.lines":{id:"jsonl",path:"jsonl.tmLanguage.json",embeddedScopes:[]},"source.jsonnet":{id:"jsonnet",path:"jsonnet.tmLanguage.json",embeddedScopes:[]},"source.jssm":{id:"jssm",path:"jssm.tmLanguage.json",embeddedScopes:[]},"source.js.jsx":{id:"jsx",path:"jsx.tmLanguage.json",embeddedScopes:[]},"source.julia":{id:"julia",path:"julia.tmLanguage.json",embeddedScopes:["source.c","source.glsl","source.sql","source.r","source.js","source.python","source.cpp"]},"source.kotlin":{id:"kotlin",path:"kotlin.tmLanguage.json",embeddedScopes:[]},"source.kusto":{id:"kusto",path:"kusto.tmLanguage.json",embeddedScopes:[]},"text.tex.latex":{id:"latex",path:"latex.tmLanguage.json",embeddedScopes:["source.glsl","source.shell","source.sql","source.cpp","source.c","source.r","source.gnuplot","source.scala","source.rust","source.yaml","source.python","source.ts","source.js","source.ruby","source.julia","source.lua","source.java","text.xml","text.html.basic","source.haskell","source.css","text.tex"]},"source.css.less":{id:"less",path:"less.tmLanguage.json",embeddedScopes:["source.css"]},"text.html.liquid":{id:"liquid",path:"liquid.tmLanguage.json",embeddedScopes:["source.js","source.json","source.css","text.html.basic"]},"source.lisp":{id:"lisp",path:"lisp.tmLanguage.json",embeddedScopes:[]},"source.logo":{id:"logo",path:"logo.tmLanguage.json",embeddedScopes:[]},"source.lua":{id:"lua",path:"lua.tmLanguage.json",embeddedScopes:["source.c"]},"source.makefile":{id:"make",path:"make.tmLanguage.json",embeddedScopes:[]},"text.html.markdown":{id:"markdown",path:"markdown.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.stylus","source.sass","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.tsx","source.ts","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.css.scss","source.swift","source.objc","source.css.less","source.json.comments","source.json","source.js","text.pug","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.coffee","source.clojure","source.batchfile","source.yaml","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","text.html.basic","source.css"]},"text.marko":{id:"marko",path:"marko.tmLanguage.json",embeddedScopes:["source.js","source.css.scss","source.css.less","source.css"]},"source.matlab":{id:"matlab",path:"matlab.tmLanguage.json",embeddedScopes:[]},"source.mdx":{id:"mdx",path:"mdx.tmLanguage.json",embeddedScopes:["source.gnuplot","text.tex","source.stylus","source.sass","text.bibtex","text.tex.latex","text.html.handlebars","source.dart","source.fsharp","source.powershell","source.perl.6","source.json.comments","text.pug","source.groovy","text.git-rebase","text.git-commit","source.batchfile","text.xml.xsl","source.asp.vb.net","source.php","source.js.jsx","source.glsl","source.ts","source.swift","text.xml","source.sql","text.shell-session","source.shell","source.css.scss","source.scala","source.rust","source.ruby","source.r","source.python","source.perl","source.objc","text.html.markdown","source.makefile","source.lua","source.css.less","source.kotlin","source.julia","source.json","source.js","source.java","source.ini","text.html.basic","source.haskell","source.graphql","source.go","source.erlang","source.elm","source.elixir","source.dockerfile","source.diff","source.css","source.cs","source.cpp","source.coffee","source.clojure","source.c","source.yaml","source.toml","source.tsx"]},"source.mermaid":{id:"mermaid",path:"mermaid.tmLanguage.json",embeddedScopes:[]},"source.narrat":{id:"narrat",path:"narrat.tmLanguage.json",embeddedScopes:[]},"source.nextflow":{id:"nextflow",path:"nextflow.tmLanguage.json",embeddedScopes:[]},"source.nginx":{id:"nginx",path:"nginx.tmLanguage.json",embeddedScopes:["source.c","source.lua"]},"source.nim":{id:"nim",path:"nim.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.stylus","source.sass","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.tsx","source.ts","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.css.scss","source.swift","source.objc","source.css.less","source.json.comments","source.json","text.pug","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.coffee","source.clojure","source.batchfile","source.yaml","text.xml.xsl","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.ini","source.java","text.html.markdown","source.glsl","source.css","source.js","text.xml","text.html.basic","source.c"]},"source.nix":{id:"nix",path:"nix.tmLanguage.json",embeddedScopes:[]},"source.objc":{id:"objective-c",path:"objective-c.tmLanguage.json",embeddedScopes:[]},"source.objcpp":{id:"objective-cpp",path:"objective-cpp.tmLanguage.json",embeddedScopes:[]},"source.ocaml":{id:"ocaml",path:"ocaml.tmLanguage.json",embeddedScopes:[]},"source.pascal":{id:"pascal",path:"pascal.tmLanguage.json",embeddedScopes:[]},"source.perl":{id:"perl",path:"perl.tmLanguage.json",embeddedScopes:["source.java","source.sql","source.js","source.css","text.xml","text.html.basic"]},"source.php":{id:"php",path:"php.tmLanguage.json",embeddedScopes:["source.java","source.css","source.json","source.js","source.sql","text.xml","text.html.basic"]},"source.plsql.oracle":{id:"plsql",path:"plsql.tmLanguage.json",embeddedScopes:[]},"source.css.postcss":{id:"postcss",path:"postcss.tmLanguage.json",embeddedScopes:[]},"source.powerquery":{id:"powerquery",path:"powerquery.tmLanguage.json",embeddedScopes:[]},"source.powershell":{id:"powershell",path:"powershell.tmLanguage.json",embeddedScopes:[]},"source.prisma":{id:"prisma",path:"prisma.tmLanguage.json",embeddedScopes:[]},"source.prolog":{id:"prolog",path:"prolog.tmLanguage.json",embeddedScopes:[]},"source.proto":{id:"proto",path:"proto.tmLanguage.json",embeddedScopes:[]},"text.pug":{id:"pug",path:"pug.tmLanguage.json",embeddedScopes:["text.html.basic","source.coffee","source.stylus","source.css.scss","source.sass","source.css","source.js"]},"source.puppet":{id:"puppet",path:"puppet.tmLanguage.json",embeddedScopes:[]},"source.purescript":{id:"purescript",path:"purescript.tmLanguage.json",embeddedScopes:[]},"source.python":{id:"python",path:"python.tmLanguage.json",embeddedScopes:[]},"source.r":{id:"r",path:"r.tmLanguage.json",embeddedScopes:[]},"source.perl.6":{id:"raku",path:"raku.tmLanguage.json",embeddedScopes:[]},"text.aspnetcorerazor":{id:"razor",path:"razor.tmLanguage.json",embeddedScopes:["source.css","source.js","source.cs","text.html.basic"]},"source.reg":{id:"reg",path:"reg.tmLanguage.json",embeddedScopes:[]},"source.rel":{id:"rel",path:"rel.tmLanguage.json",embeddedScopes:[]},"source.riscv":{id:"riscv",path:"riscv.tmLanguage.json",embeddedScopes:[]},"source.rst":{id:"rst",path:"rst.tmLanguage.json",embeddedScopes:["source.java","source.lua","source.c","source.css","text.xml","text.html.basic","source.sql","source.glsl","source.ruby","source.cmake","source.yaml","source.shell","source.js","source.python","source.cpp"]},"source.ruby":{id:"ruby",path:"ruby.tmLanguage.json",embeddedScopes:["source.java","source.lua","source.shell","source.js","source.c","source.css","source.sql","text.xml","text.html.basic"]},"source.rust":{id:"rust",path:"rust.tmLanguage.json",embeddedScopes:[]},"source.sas":{id:"sas",path:"sas.tmLanguage.json",embeddedScopes:["source.sql"]},"source.sass":{id:"sass",path:"sass.tmLanguage.json",embeddedScopes:[]},"source.scala":{id:"scala",path:"scala.tmLanguage.json",embeddedScopes:[]},"source.scheme":{id:"scheme",path:"scheme.tmLanguage.json",embeddedScopes:[]},"source.css.scss":{id:"scss",path:"scss.tmLanguage.json",embeddedScopes:["source.css"]},"source.shaderlab":{id:"shaderlab",path:"shaderlab.tmLanguage.json",embeddedScopes:["source.hlsl"]},"source.shell":{id:"shellscript",path:"shellscript.tmLanguage.json",embeddedScopes:[]},"text.shell-session":{id:"shellsession",path:"shellsession.tmLanguage.json",embeddedScopes:["source.shell"]},"source.smalltalk":{id:"smalltalk",path:"smalltalk.tmLanguage.json",embeddedScopes:[]},"source.solidity":{id:"solidity",path:"solidity.tmLanguage.json",embeddedScopes:[]},"source.sparql":{id:"sparql",path:"sparql.tmLanguage.json",embeddedScopes:["source.turtle"]},"source.sql":{id:"sql",path:"sql.tmLanguage.json",embeddedScopes:[]},"source.ssh-config":{id:"ssh-config",path:"ssh-config.tmLanguage.json",embeddedScopes:[]},"source.stata":{id:"stata",path:"stata.tmLanguage.json",embeddedScopes:["source.sql"]},"source.stylus":{id:"stylus",path:"stylus.tmLanguage.json",embeddedScopes:[]},"source.svelte":{id:"svelte",path:"svelte.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.tsx","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.swift","source.objc","source.json.comments","source.json","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.clojure","source.batchfile","source.yaml","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","text.html.basic","text.html.markdown","text.pug","source.css.postcss","source.css.less","source.css.scss","source.css","source.sass","source.stylus","source.coffee","source.ts","source.js"]},"source.swift":{id:"swift",path:"swift.tmLanguage.json",embeddedScopes:[]},"source.systemverilog":{id:"system-verilog",path:"system-verilog.tmLanguage.json",embeddedScopes:[]},"source.tasl":{id:"tasl",path:"tasl.tmLanguage.json",embeddedScopes:[]},"source.tcl":{id:"tcl",path:"tcl.tmLanguage.json",embeddedScopes:[]},"text.tex":{id:"tex",path:"tex.tmLanguage.json",embeddedScopes:["source.r"]},"source.toml":{id:"toml",path:"toml.tmLanguage.json",embeddedScopes:[]},"source.tsx":{id:"tsx",path:"tsx.tmLanguage.json",embeddedScopes:[]},"source.turtle":{id:"turtle",path:"turtle.tmLanguage.json",embeddedScopes:[]},"text.html.twig":{id:"twig",path:"twig.tmLanguage.json",embeddedScopes:["source.java","source.lua","source.shell","source.c","source.json","source.sql","text.xml","text.html.basic","source.ruby","source.python","source.php","source.js","source.css"]},"source.txt":{id:"txt",path:"txt.tmLanguage.json",embeddedScopes:[]},"source.ts":{id:"typescript",path:"typescript.tmLanguage.json",embeddedScopes:[]},"source.v":{id:"v",path:"v.tmLanguage.json",embeddedScopes:[]},"source.asp.vb.net":{id:"vb",path:"vb.tmLanguage.json",embeddedScopes:[]},"source.verilog":{id:"verilog",path:"verilog.tmLanguage.json",embeddedScopes:[]},"source.vhdl":{id:"vhdl",path:"vhdl.tmLanguage.json",embeddedScopes:[]},"source.viml":{id:"viml",path:"viml.tmLanguage.json",embeddedScopes:[]},"text.html.vue-html":{id:"vue-html",path:"vue-html.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.swift","source.objc","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.coffee","source.clojure","source.batchfile","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","source.graphql","source.toml","source.yaml","source.json5","source.json.comments","source.json","source.tsx","source.js.jsx","source.ts","source.css.less","source.css.scss","source.css","source.sass","source.stylus","text.pug","text.html.markdown","text.html.basic","source.js","source.vue"]},"source.vue":{id:"vue",path:"vue.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.swift","source.objc","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.coffee","source.clojure","source.batchfile","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","source.graphql","source.toml","source.yaml","source.json5","source.json.comments","source.json","source.tsx","source.js.jsx","source.ts","source.js","source.css.less","source.css.scss","source.css","source.sass","source.stylus","text.pug","text.html.markdown","text.html.basic"]},"source.vyper":{id:"vyper",path:"vyper.tmLanguage.json",embeddedScopes:[]},"source.wat":{id:"wasm",path:"wasm.tmLanguage.json",embeddedScopes:[]},"source.wenyan":{id:"wenyan",path:"wenyan.tmLanguage.json",embeddedScopes:[]},"source.wgsl":{id:"wgsl",path:"wgsl.tmLanguage.json",embeddedScopes:[]},"source.wolfram":{id:"wolfram",path:"wolfram.tmLanguage.json",embeddedScopes:[]},"text.xml":{id:"xml",path:"xml.tmLanguage.json",embeddedScopes:["source.java"]},"text.xml.xsl":{id:"xsl",path:"xsl.tmLanguage.json",embeddedScopes:["source.java","text.xml"]},"source.yaml":{id:"yaml",path:"yaml.tmLanguage.json",embeddedScopes:[]},"source.zenscript":{id:"zenscript",path:"zenscript.tmLanguage.json",embeddedScopes:[]}};var j={d:(e,t)=>{for(var s in t)j.o(t,s)&&!j.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},S={};j.d(S,{_X:()=>Qe,Bz:()=>He,ot:()=>ze,u:()=>De,jG:()=>A,Pn:()=>Ke});const w="undefined"!=typeof process&&!!process.env.VSCODE_TEXTMATE_DEBUG;var v;function L(e,t){const s=[],r=function(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,s=t.exec(e);return{next:()=>{if(!s)return null;const r=s[0];return s=t.exec(e),r}}}(e);let o=r.next();for(;null!==o;){let e=0;if(2===o.length&&":"===o.charAt(1)){switch(o.charAt(0)){case"R":e=1;break;case"L":e=-1;break;default:console.log(`Unknown priority ${o} in scope selector`)}o=r.next()}let t=c();if(s.push({matcher:t,priority:e}),","!==o)break;o=r.next()}return s;function n(){if("-"===o){o=r.next();const e=n();return t=>!!e&&!e(t)}if("("===o){o=r.next();const e=function(){const e=[];let t=c();for(;t&&(e.push(t),"|"===o||","===o);){do{o=r.next()}while("|"===o||","===o);t=c()}return t=>e.some((e=>e(t)))}();return")"===o&&(o=r.next()),e}if(C(o)){const e=[];do{e.push(o),o=r.next()}while(C(o));return s=>t(e,s)}return null}function c(){const e=[];let t=n();for(;t;)e.push(t),t=n();return t=>e.every((e=>e(t)))}}function C(e){return!!e&&!!e.match(/[\w\.:]+/)}function A(e){"function"==typeof e.dispose&&e.dispose()}function N(e){return Array.isArray(e)?function(e){let t=[];for(let s=0,r=e.length;s{for(let s in t)e[s]=t[s]})),e}function R(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return 0===t?e:~t==e.length-1?R(e.substring(0,e.length-1)):e.substr(1+~t)}!function(e){e.toBinaryStr=function(e){let t=e.toString(2);for(;t.length<32;)t="0"+t;return t},e.print=function(t){const s=e.getLanguageId(t),r=e.getTokenType(t),o=e.getFontStyle(t),n=e.getForeground(t),c=e.getBackground(t);console.log({languageId:s,tokenType:r,fontStyle:o,foreground:n,background:c})},e.getLanguageId=function(e){return(255&e)>>>0},e.getTokenType=function(e){return(768&e)>>>8},e.containsBalancedBrackets=function(e){return 0!=(1024&e)},e.getFontStyle=function(e){return(30720&e)>>>11},e.getForeground=function(e){return(16744448&e)>>>15},e.getBackground=function(e){return(4278190080&e)>>>24},e.set=function(t,s,r,o,n,c,a){let i=e.getLanguageId(t),u=e.getTokenType(t),l=e.containsBalancedBrackets(t)?1:0,h=e.getFontStyle(t),d=e.getForeground(t),p=e.getBackground(t);return 0!==s&&(i=s),8!==r&&(u=r),null!==o&&(l=o?1:0),-1!==n&&(h=n),0!==c&&(d=c),0!==a&&(p=a),(i<<0|u<<8|l<<10|h<<11|d<<15|p<<24)>>>0}}(v||(v={}));let I=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g;class E{static hasCaptures(e){return null!==e&&(I.lastIndex=0,I.test(e))}static replaceCaptures(e,t,s){return e.replace(I,((e,r,o,n)=>{let c=s[parseInt(r||o,10)];if(!c)return e;{let e=t.substring(c.start,c.end);for(;"."===e[0];)e=e.substring(1);switch(n){case"downcase":return e.toLowerCase();case"upcase":return e.toUpperCase();default:return e}}}))}}function B(e,t){return et?1:0}function O(e,t){if(null===e&&null===t)return 0;if(!e)return-1;if(!t)return 1;let s=e.length,r=t.length;if(s===r){for(let r=0;r`);return}const n=s.lookup(t);e instanceof $?H({baseGrammar:n,selfGrammar:o},r):z(e.ruleName,{baseGrammar:n,selfGrammar:o,repository:o.repository},r);const c=s.injections(e.scopeName);if(c)for(const e of c)r.add(new $(e))}function z(e,t,s){t.repository&&t.repository[e]&&Q([t.repository[e]],t,s)}function H(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&Q(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&Q(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function Q(e,t,s){for(const r of e){if(s.visitedRule.has(r))continue;s.visitedRule.add(r);const e=r.repository?P({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&Q(r.patterns,{...t,repository:e},s);const o=r.include;if(!o)continue;const n=Z(o);switch(n.kind){case 0:H({...t,selfGrammar:t.baseGrammar},s);break;case 1:H(t,s);break;case 2:z(n.ruleName,{...t,repository:e},s);break;case 3:case 4:const r=n.scopeName===t.selfGrammar.scopeName?t.selfGrammar:n.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(r){const o={baseGrammar:t.baseGrammar,selfGrammar:r,repository:e};4===n.kind?z(n.ruleName,o,s):H(o,s)}else 4===n.kind?s.add(new M(n.scopeName,n.ruleName)):s.add(new $(n.scopeName))}}}class K{constructor(){this.kind=0}}class V{constructor(){this.kind=1}}class Y{constructor(e){this.ruleName=e,this.kind=2}}class X{constructor(e){this.scopeName=e,this.kind=3}}class J{constructor(e,t){this.scopeName=e,this.ruleName=t,this.kind=4}}function Z(e){if("$base"===e)return new K;if("$self"===e)return new V;const t=e.indexOf("#");if(-1===t)return new X(e);if(0===t)return new Y(e.substring(1));{const s=e.substring(0,t),r=e.substring(t+1);return new J(s,r)}}const ee=/\\(\d+)/,te=/\\(\d+)/g;class se{constructor(e,t,s,r){this.$location=e,this.id=t,this._name=s||null,this._nameIsCapturing=E.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=E.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${R(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return this._nameIsCapturing&&null!==this._name&&null!==e&&null!==t?E.replaceCaptures(this._name,e,t):this._name}getContentName(e,t){return this._contentNameIsCapturing&&null!==this._contentName?E.replaceCaptures(this._contentName,e,t):this._contentName}}class re extends se{constructor(e,t,s,r,o){super(e,t,s,r),this.retokenizeCapturedWithRuleId=o}dispose(){}collectPatterns(e,t){throw new Error("Not supported!")}compile(e,t){throw new Error("Not supported!")}compileAG(e,t,s,r){throw new Error("Not supported!")}}class oe extends se{constructor(e,t,s,r,o){super(e,t,s,null),this._match=new ue(r,this.id),this.captures=o,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,s,r){return this._getCachedCompiledPatterns(e).compileAG(e,s,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new le,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}}class ne extends se{constructor(e,t,s,r,o){super(e,t,s,r),this.patterns=o.patterns,this.hasMissingPatterns=o.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(const s of this.patterns)e.getRule(s).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,s,r){return this._getCachedCompiledPatterns(e).compileAG(e,s,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new le,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}}class ce extends se{constructor(e,t,s,r,o,n,c,a,i,u){super(e,t,s,r),this._begin=new ue(o,this.id),this.beginCaptures=n,this._end=new ue(c||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=a,this.applyEndPatternLast=i||!1,this.patterns=u.patterns,this.hasMissingPatterns=u.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(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,s,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,s,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new le;for(const 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}}class ae extends se{constructor(e,t,s,r,o,n,c,a,i){super(e,t,s,r),this._begin=new ue(o,this.id),this.beginCaptures=n,this.whileCaptures=a,this._while=new ue(c,-2),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,s,r){return this._getCachedCompiledPatterns(e).compileAG(e,s,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new le;for(const 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,s,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,s,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new le,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||"￿"),this._cachedCompiledWhilePatterns}}class ie{static createCaptureRule(e,t,s,r,o){return e.registerRule((e=>new re(t,e,s,r,o)))}static getCompiledRuleId(e,t,s){return e.id||t.registerRule((r=>{if(e.id=r,e.match)return new oe(e.$vscodeTextmateLocation,e.id,e.name,e.match,ie._compileCaptures(e.captures,t,s));if(void 0===e.begin){e.repository&&(s=P({},s,e.repository));let r=e.patterns;return void 0===r&&e.include&&(r=[{include:e.include}]),new ne(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,ie._compilePatterns(r,t,s))}return e.while?new ae(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,ie._compileCaptures(e.beginCaptures||e.captures,t,s),e.while,ie._compileCaptures(e.whileCaptures||e.captures,t,s),ie._compilePatterns(e.patterns,t,s)):new ce(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,ie._compileCaptures(e.beginCaptures||e.captures,t,s),e.end,ie._compileCaptures(e.endCaptures||e.captures,t,s),e.applyEndPatternLast,ie._compilePatterns(e.patterns,t,s))})),e.id}static _compileCaptures(e,t,s){let r=[];if(e){let o=0;for(const t in e){if("$vscodeTextmateLocation"===t)continue;const e=parseInt(t,10);e>o&&(o=e)}for(let e=0;e<=o;e++)r[e]=null;for(const o in e){if("$vscodeTextmateLocation"===o)continue;const n=parseInt(o,10);let c=0;e[o].patterns&&(c=ie.getCompiledRuleId(e[o],t,s)),r[n]=ie.createCaptureRule(t,e[o].$vscodeTextmateLocation,e[o].name,e[o].contentName,c)}}return r}static _compilePatterns(e,t,s){let r=[];if(e)for(let o=0,n=e.length;oe.substring(t.start,t.end)));return te.lastIndex=0,this.source.replace(te,((e,t)=>T(s[parseInt(t,10)]||"")))}_buildAnchorCache(){let e,t,s,r,o=[],n=[],c=[],a=[];for(e=0,t=this.source.length;ee.source));this._cached=new he(e,t,this._items.map((e=>e.ruleId)))}return this._cached}compileAG(e,t,s){return this._hasAnchors?t?s?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,s)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,s)),this._anchorCache.A1_G0):s?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,s)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,s)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,s){let r=this._items.map((e=>e.resolveAnchors(t,s)));return new he(e,r,this._items.map((e=>e.ruleId)))}}class he{constructor(e,t,s){this.regExps=t,this.rules=s,this.scanner=e.createOnigScanner(t)}dispose(){"function"==typeof this.scanner.dispose&&this.scanner.dispose()}toString(){const e=[];for(let t=0,s=this.rules.length;tthis._root.match(e)))}static createFromRawTheme(e,t){return this.createFromParsedTheme(function(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,s=[],r=0;for(let e=0,o=t.length;e1&&(l=n.slice(0,n.length-1),l.reverse()),s[r++]=new fe(u,l,e,c,a,i)}}return s}(e),t)}static createFromParsedTheme(e,t){return function(e,t){e.sort(((e,t)=>{let s=B(e.scope,t.scope);return 0!==s?s:(s=O(e.parentScopes,t.parentScopes),0!==s?s:e.index-t.index)}));let s=0,r="#000000",o="#ffffff";for(;e.length>=1&&""===e[0].scope;){let t=e.shift();-1!==t.fontStyle&&(s=t.fontStyle),null!==t.foreground&&(r=t.foreground),null!==t.background&&(o=t.background)}let n=new be(t),c=new ge(s,n.getId(r),n.getId(o)),a=new _e(new ye(0,null,-1,0,0),[]);for(let t=0,s=e.length;tfunction(e,t){if(null===t)return!0;let s=0,r=t[s];for(;e;){if(me(e.scopeName,r)){if(s++,s===t.length)return!0;r=t[s]}e=e.parent}return!1}(e.parent,t.parentScopes)));return s?new ge(s.fontStyle,s.foreground,s.background):null}}class pe{constructor(e,t){this.parent=e,this.scopeName=t}static push(e,t){for(const s of t)e=new pe(e,s);return e}static from(...e){let t=null;for(let s=0;se?console.log("how did this happen?"):this.scopeDepth=e,-1!==t&&(this.fontStyle=t),0!==s&&(this.foreground=s),0!==r&&(this.background=r)}}class _e{constructor(e,t=[],s={}){this._mainRule=e,this._children=s,this._rulesWithParentScopes=t}static _sortBySpecificity(e){return 1===e.length||e.sort(this._cmpBySpecificity),e}static _cmpBySpecificity(e,t){if(e.scopeDepth===t.scopeDepth){const s=e.parentScopes,r=t.parentScopes;let o=null===s?0:s.length,n=null===r?0:r.length;if(o===n)for(let e=0;e{const t=this._scopeToLanguage(e),s=this._toStandardTokenType(e);return new xe(t,s)})),this._defaultAttributes=new xe(e,8),this._embeddedLanguagesMatcher=new je(Object.entries(t||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(e){return null===e?ke._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(e)}_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(e){const t=e.match(ke.STANDARD_TOKEN_TYPE_REGEXP);if(!t)return 8;switch(t[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}}ke._NULL_SCOPE_METADATA=new xe(0,0),ke.STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/;class je{constructor(e){if(0===e.length)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const t=e.map((([e,t])=>T(e)));t.sort(),t.reverse(),this.scopesRegExp=new RegExp(`^((${t.join(")|(")}))($|\\.)`,"")}}match(e){if(!this.scopesRegExp)return;const t=e.match(this.scopesRegExp);return t?this.values.get(t[1]):void 0}}class Se{constructor(e,t){this.stack=e,this.stoppedEarly=t}}function we(e,t,s,r,o,n,c,a){const i=t.content.length;let u=!1,l=-1;if(c){const c=function(e,t,s,r,o,n){let c=o.beginRuleCapturedEOL?0:-1;const a=[];for(let t=o;t;t=t.pop()){const s=t.getRule(e);s instanceof ae&&a.push({rule:s,stack:t})}for(let i=a.pop();i;i=a.pop()){const{ruleScanner:a,findOptions:u}=Le(i.rule,e,i.stack.endRule,s,r===c),l=a.findNextMatchSync(t,r,u);if(w&&(console.log(" scanning for while rule"),console.log(a.toString())),!l){w&&console.log(" popping "+i.rule.debugName+" - "+i.rule.debugWhileRegExp),o=i.stack.pop();break}if(-2!==l.ruleId){o=i.stack.pop();break}l.captureIndices&&l.captureIndices.length&&(n.produce(i.stack,l.captureIndices[0].start),Ce(e,t,s,i.stack,n,i.rule.whileCaptures,l.captureIndices),n.produce(i.stack,l.captureIndices[0].end),c=l.captureIndices[0].end,l.captureIndices[0].end>r&&(r=l.captureIndices[0].end,s=!1))}return{stack:o,linePos:r,anchorPosition:c,isFirstLine:s}}(e,t,s,r,o,n);o=c.stack,r=c.linePos,s=c.isFirstLine,l=c.anchorPosition}const h=Date.now();for(;!u;){if(0!==a&&Date.now()-h>a)return new Se(o,!0);d()}return new Se(o,!1);function d(){w&&(console.log(""),console.log(`@@scanNext ${r}: |${t.content.substr(r).replace(/\n$/,"\\n")}|`));const c=function(e,t,s,r,o,n){const c=function(e,t,s,r,o,n){const c=o.getRule(e),{ruleScanner:a,findOptions:i}=ve(c,e,o.endRule,s,r===n);let u=0;w&&(u=q());const l=a.findNextMatchSync(t,r,i);if(w){const e=q()-u;e>5&&console.warn(`Rule ${c.debugName} (${c.id}) matching took ${e} against '${t}'`),console.log(` scanning for (linePos: ${r}, anchorPosition: ${n})`),console.log(a.toString()),l&&console.log(`matched rule id: ${l.ruleId} from ${l.captureIndices[0].start} to ${l.captureIndices[0].end}`)}return l?{captureIndices:l.captureIndices,matchedRuleId:l.ruleId}:null}(e,t,s,r,o,n),a=e.getInjections();if(0===a.length)return c;const i=function(e,t,s,r,o,n,c){let a,i=Number.MAX_VALUE,u=null,l=0;const h=n.contentNameScopesList.getScopeNames();for(let n=0,d=e.length;n=i)&&(i=b,u=f.captureIndices,a=f.ruleId,l=d.priority,i===o))break}return u?{priorityMatch:-1===l,captureIndices:u,matchedRuleId:a}:null}(a,e,t,s,r,o,n);if(!i)return c;if(!c)return i;const u=c.captureIndices[0].start,l=i.captureIndices[0].start;return l0)&&a[0].end>r;if(-1===h){const c=o.getRule(e);w&&console.log(" popping "+c.debugName+" - "+c.debugEndRegExp),n.produce(o,a[0].start),o=o.withContentNameScopesList(o.nameScopesList),Ce(e,t,s,o,n,c.endCaptures,a),n.produce(o,a[0].end);const h=o;if(o=o.parent,l=h.getAnchorPos(),!d&&h.getEnterPos()===r)return w&&console.error("[1] - Grammar is in an endless loop - Grammar pushed & popped a rule without advancing"),o=h,n.produce(o,i),void(u=!0)}else{const c=e.getRule(h);n.produce(o,a[0].start);const p=o,m=c.getName(t.content,a),g=o.contentNameScopesList.pushAttributed(m,e);if(o=o.push(h,r,l,a[0].end===i,null,g,g),c instanceof ce){const r=c;w&&console.log(" pushing "+r.debugName+" - "+r.debugBeginRegExp),Ce(e,t,s,o,n,r.beginCaptures,a),n.produce(o,a[0].end),l=a[0].end;const h=r.getContentName(t.content,a),m=g.pushAttributed(h,e);if(o=o.withContentNameScopesList(m),r.endHasBackReferences&&(o=o.withEndRule(r.getEndWithResolvedBackReferences(t.content,a))),!d&&p.hasSameRuleAs(o))return w&&console.error("[2] - Grammar is in an endless loop - Grammar pushed the same rule without advancing"),o=o.pop(),n.produce(o,i),void(u=!0)}else if(c instanceof ae){const r=c;w&&console.log(" pushing "+r.debugName),Ce(e,t,s,o,n,r.beginCaptures,a),n.produce(o,a[0].end),l=a[0].end;const h=r.getContentName(t.content,a),m=g.pushAttributed(h,e);if(o=o.withContentNameScopesList(m),r.whileHasBackReferences&&(o=o.withEndRule(r.getWhileWithResolvedBackReferences(t.content,a))),!d&&p.hasSameRuleAs(o))return w&&console.error("[3] - Grammar is in an endless loop - Grammar pushed the same rule without advancing"),o=o.pop(),n.produce(o,i),void(u=!0)}else{const r=c;if(w&&console.log(" matched "+r.debugName+" - "+r.debugMatchRegExp),Ce(e,t,s,o,n,r.captures,a),n.produce(o,a[0].end),o=o.pop(),!d)return w&&console.error("[4] - Grammar is in an endless loop - Grammar is not advancing, nor is it pushing/popping"),o=o.safePop(),n.produce(o,i),void(u=!0)}}a[0].end>r&&(r=a[0].end,s=!1)}}function ve(e,t,s,r,o){return{ruleScanner:e.compileAG(t,s,r,o),findOptions:0}}function Le(e,t,s,r,o){return{ruleScanner:e.compileWhileAG(t,s,r,o),findOptions:0}}function Ce(e,t,s,r,o,n,c){if(0===n.length)return;const a=t.content,i=Math.min(n.length,c.length),u=[],l=c[0].end;for(let t=0;tl)break;for(;u.length>0&&u[u.length-1].endPos<=h.start;)o.produceFromScopes(u[u.length-1].scopes,u[u.length-1].endPos),u.pop();if(u.length>0?o.produceFromScopes(u[u.length-1].scopes,h.start):o.produce(r,h.start),i.retokenizeCapturedWithRuleId){const t=i.getName(a,c),n=r.contentNameScopesList.pushAttributed(t,e),u=i.getContentName(a,c),l=n.pushAttributed(u,e),d=r.push(i.retokenizeCapturedWithRuleId,h.start,-1,!1,null,n,l),p=e.createOnigString(a.substring(0,h.end));we(e,p,s&&0===h.start,h.start,d,o,!1,0),A(p);continue}const d=i.getName(a,c);if(null!==d){const t=(u.length>0?u[u.length-1].scopes:r.contentNameScopesList).pushAttributed(d,e);u.push(new Ae(t,h.end))}}for(;u.length>0;)o.produceFromScopes(u[u.length-1].scopes,u[u.length-1].endPos),u.pop()}class Ae{constructor(e,t){this.scopes=e,this.endPos=t}}function Ne(e,t,s,r,o){const n=L(t,Pe),c=ie.getCompiledRuleId(s,r,o.repository);for(const s of n)e.push({debugSelector:t,matcher:s.matcher,ruleId:c,grammar:o,priority:s.priority})}function Pe(e,t){if(t.length{for(let r=s;rs&&e.substr(0,s)===t&&"."===e[s]}class Ie{constructor(e,t,s,r,o,n,c,a){if(this._rootScopeName=e,this.balancedBracketSelectors=n,this._onigLib=a,this._basicScopeAttributesProvider=new ke(s,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=c,this._grammar=Ee(t,null),this._injections=null,this._tokenTypeMatchers=[],o)for(const e of Object.keys(o)){const t=L(e,Pe);for(const s of t)this._tokenTypeMatchers.push({matcher:s.matcher,type:o[e]})}}get themeProvider(){return this._grammarRepository}dispose(){for(const e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){const e=[],t=this._rootScopeName,s=(e=>e===this._rootScopeName?this._grammar:this.getExternalGrammar(e))(t);if(s){const r=s.injections;if(r)for(let t in r)Ne(e,t,r[t],this,s);const o=this._grammarRepository.injections(t);o&&o.forEach((t=>{const s=this.getExternalGrammar(t);if(s){const t=s.injectionSelector;t&&Ne(e,t,s,this,s)}}))}return e.sort(((e,t)=>e.priority-t.priority)),e}getInjections(){if(null===this._injections&&(this._injections=this._collectInjections(),w&&this._injections.length>0)){console.log(`Grammar ${this._rootScopeName} contains the following injections:`);for(const e of this._injections)console.log(` - ${e.debugSelector}`)}return this._injections}registerRule(e){const t=++this._lastRuleId,s=e(t);return this._ruleId2desc[t]=s,s}getRule(e){return this._ruleId2desc[e]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){const s=this._grammarRepository.lookup(e);if(s)return this._includedGrammars[e]=Ee(s,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,s=0){const r=this._tokenize(e,t,!1,s);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(e,t,s=0){const r=this._tokenize(e,t,!0,s);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(e,t,s,r){let o;if(-1===this._rootId&&(this._rootId=ie.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections()),t&&t!==Oe.NULL)o=!1,t.reset();else{o=!0;const e=this._basicScopeAttributesProvider.getDefaultAttributes(),s=this.themeProvider.getDefaults(),r=v.set(0,e.languageId,e.tokenType,null,s.fontStyle,s.foregroundId,s.backgroundId),n=this.getRule(this._rootId).getName(null,null);let c;c=n?Be.createRootAndLookUpScopeName(n,r,this):Be.createRoot("unknown",r),t=new Oe(null,this._rootId,-1,-1,!1,null,c,c)}e+="\n";const n=this.createOnigString(e),c=n.content.length,a=new Te(s,e,this._tokenTypeMatchers,this.balancedBracketSelectors),i=we(this,n,o,0,t,a,!0,r);return A(n),{lineLength:c,lineTokens:a,ruleStack:i.stack,stoppedEarly:i.stoppedEarly}}}function Ee(e,t){return(e=N(e)).repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}class Be{constructor(e,t,s){this.parent=e,this.scopePath=t,this.tokenAttributes=s}static fromExtension(e,t){let s=e,r=e?.scopePath??null;for(const e of t)r=pe.push(r,e.scopeNames),s=new Be(s,r,e.encodedTokenAttributes);return s}static createRoot(e,t){return new Be(null,new pe(null,e),t)}static createRootAndLookUpScopeName(e,t,s){const r=s.getMetadataForScope(e),o=new pe(null,e),n=s.themeProvider.themeMatch(o),c=Be.mergeAttributes(t,r,n);return new Be(null,o,c)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(e){return Be.equals(this,e)}static equals(e,t){for(;;){if(e===t)return!0;if(!e&&!t)return!0;if(!e||!t)return!1;if(e.scopeName!==t.scopeName||e.tokenAttributes!==t.tokenAttributes)return!1;e=e.parent,t=t.parent}}static mergeAttributes(e,t,s){let r=-1,o=0,n=0;return null!==s&&(r=s.fontStyle,o=s.foregroundId,n=s.backgroundId),v.set(e,t.languageId,t.tokenType,null,r,o,n)}pushAttributed(e,t){if(null===e)return this;if(-1===e.indexOf(" "))return Be._pushAttributed(this,e,t);const s=e.split(/ /g);let r=this;for(const e of s)r=Be._pushAttributed(r,e,t);return r}static _pushAttributed(e,t,s){const r=s.getMetadataForScope(t),o=e.scopePath.push(t),n=s.themeProvider.themeMatch(o),c=Be.mergeAttributes(e.tokenAttributes,r,n);return new Be(e,o,c)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){const t=[];let s=this;for(;s&&s!==e;)t.push({encodedTokenAttributes:s.tokenAttributes,scopeNames:s.scopePath.getExtensionIfDefined(s.parent?.scopePath??null)}),s=s.parent;return s===e?t.reverse():void 0}}class Oe{constructor(e,t,s,r,o,n,c,a){this.parent=e,this.ruleId=t,this.beginRuleCapturedEOL=o,this.endRule=n,this.nameScopesList=c,this.contentNameScopesList=a,this._stackElementBrand=void 0,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=s,this._anchorPos=r}equals(e){return null!==e&&Oe._equals(this,e)}static _equals(e,t){return e===t||!!this._structuralEquals(e,t)&&Be.equals(e.contentNameScopesList,t.contentNameScopesList)}static _structuralEquals(e,t){for(;;){if(e===t)return!0;if(!e&&!t)return!0;if(!e||!t)return!1;if(e.depth!==t.depth||e.ruleId!==t.ruleId||e.endRule!==t.endRule)return!1;e=e.parent,t=t.parent}}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){Oe._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(e,t,s,r,o,n,c){return new Oe(this,e,t,s,r,o,n,c)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){const e=[];return this._writeString(e,0),"["+e.join(",")+"]"}_writeString(e,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(e){return this.endRule===e?this:new Oe(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,e,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let t=this;for(;t&&t._enterPos===e._enterPos;){if(t.ruleId===e.ruleId)return!0;t=t.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(e,t){const s=Be.fromExtension(e?.nameScopesList??null,t.nameScopesList);return new Oe(e,t.ruleId,t.enterPos??-1,t.anchorPos??-1,t.beginRuleCapturedEOL,t.endRule,s,Be.fromExtension(s,t.contentNameScopesList))}}Oe.NULL=new Oe(null,0,0,0,!1,null,null,null);class Ge{constructor(e,t){this.allowAny=!1,this.balancedBracketScopes=e.flatMap((e=>"*"===e?(this.allowAny=!0,[]):L(e,Pe).map((e=>e.matcher)))),this.unbalancedBracketScopes=t.flatMap((e=>L(e,Pe).map((e=>e.matcher))))}get matchesAlways(){return this.allowAny&&0===this.unbalancedBracketScopes.length}get matchesNever(){return 0===this.balancedBracketScopes.length&&!this.allowAny}match(e){for(const t of this.unbalancedBracketScopes)if(t(e))return!1;for(const t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}}class Te{constructor(e,t,s,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=s,this._lineText=w?t:null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let s=e?.tokenAttributes??0,r=!1;if(this.balancedBracketSelectors?.matchesAlways&&(r=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const t=e?.getScopeNames()??[];for(const e of this._tokenTypeOverrides)e.matcher(t)&&(s=v.set(s,0,e.type,null,-1,0,0));this.balancedBracketSelectors&&(r=this.balancedBracketSelectors.match(t))}if(r&&(s=v.set(s,0,8,r,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===s)return void(this._lastTokenEndIndex=t);if(w){const s=e?.getScopeNames()??[];console.log(" token: |"+this._lineText.substring(this._lastTokenEndIndex,t).replace(/\n$/,"\\n")+"|");for(let e=0;e0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),0===this._tokens.length&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),0===this._binaryTokens.length&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);const s=new Uint32Array(this._binaryTokens.length);for(let e=0,t=this._binaryTokens.length;e0;)10===e.charCodeAt(o)?(o++,n++,c=0):(o++,c++),t--}function i(e){null===s?o=e:a(e-o)}function u(){for(;o0&&65279===e.charCodeAt(0)&&(o=1);let p=0,m=null,g=[],f=[],b=null;function y(e,t){g.push(p),f.push(m),p=e,m=t}function _(){if(0===g.length)return x("illegal state stack");p=g.pop(),m=f.pop()}function x(t){throw new Error("Near offset "+o+": "+t+" ~~~"+e.substr(o,50)+"~~~")}const k=function(){if(null===b)return x("missing ");let e={};null!==s&&(e[s]={filename:t,line:n,char:c}),m[b]=e,b=null,y(1,e)},j=function(){if(null===b)return x("missing ");let e=[];m[b]=e,b=null,y(2,e)},S=function(){let e={};null!==s&&(e[s]={filename:t,line:n,char:c}),m.push(e),y(1,e)},w=function(){let e=[];m.push(e),y(2,e)};function v(){if(1!==p)return x("unexpected ");_()}function L(){return 1===p||2!==p?x("unexpected "):void _()}function C(e){if(1===p){if(null===b)return x("missing ");m[b]=e,b=null}else 2===p?m.push(e):m=e}function A(e){if(isNaN(e))return x("cannot parse float");if(1===p){if(null===b)return x("missing ");m[b]=e,b=null}else 2===p?m.push(e):m=e}function N(e){if(isNaN(e))return x("cannot parse integer");if(1===p){if(null===b)return x("missing ");m[b]=e,b=null}else 2===p?m.push(e):m=e}function P(e){if(1===p){if(null===b)return x("missing ");m[b]=e,b=null}else 2===p?m.push(e):m=e}function R(e){if(1===p){if(null===b)return x("missing ");m[b]=e,b=null}else 2===p?m.push(e):m=e}function I(e){if(1===p){if(null===b)return x("missing ");m[b]=e,b=null}else 2===p?m.push(e):m=e}function E(){let e=d(">"),t=!1;return 47===e.charCodeAt(e.length-1)&&(t=!0,e=e.substring(0,e.length-1)),{name:e.trim(),isClosed:t}}function B(e){if(e.isClosed)return"";let t=d(""),t.replace(/&#([0-9]+);/g,(function(e,t){return String.fromCodePoint(parseInt(t,10))})).replace(/&#x([0-9a-f]+);/g,(function(e,t){return String.fromCodePoint(parseInt(t,16))})).replace(/&|<|>|"|'/g,(function(e){switch(e){case"&":return"&";case"<":return"<";case">":return">";case""":return'"';case"'":return"'"}return e}))}for(;o=r));){const i=e.charCodeAt(o);if(a(1),60!==i)return x("expected <");if(o>=r)return x("unexpected end of input");const d=e.charCodeAt(o);if(63===d){a(1),h("?>");continue}if(33===d){if(a(1),l("--")){h("--\x3e");continue}h(">");continue}if(47===d){if(a(1),u(),l("plist")){h(">");continue}if(l("dict")){h(">"),v();continue}if(l("array")){h(">"),L();continue}return x("unexpected closed tag")}let g=E();switch(g.name){case"dict":1===p?k():2===p?S():(m={},null!==s&&(m[s]={filename:t,line:n,char:c}),y(1,m)),g.isClosed&&v();continue;case"array":1===p?j():2===p?w():(m=[],y(2,m)),g.isClosed&&L();continue;case"key":O=B(g),1!==p?x("unexpected "):null!==b?x("too many "):b=O;continue;case"string":C(B(g));continue;case"real":A(parseFloat(B(g)));continue;case"integer":N(parseInt(B(g),10));continue;case"date":P(new Date(B(g)));continue;case"data":R(B(g));continue;case"true":B(g),I(!0);continue;case"false":B(g),I(!1);continue}if(!/^plist/.test(g.name))return x("unexpected opened tag "+g.name)}var O;return m}function qe(e,t){throw new Error("Near offset "+e.pos+": "+t+" ~~~"+e.source.substr(e.pos,50)+"~~~")}class $e{constructor(e){this.source=e,this.pos=0,this.len=e.length,this.line=1,this.char=0}}class Me{constructor(){this.value=null,this.type=0,this.offset=-1,this.len=-1,this.line=-1,this.char=-1}toLocation(e){return{filename:e,line:this.line,char:this.char}}}function Ue(e,t){t.value=null,t.type=0,t.offset=-1,t.len=-1,t.line=-1,t.char=-1;let s,r=e.source,o=e.pos,n=e.len,c=e.line,a=e.char;for(;;){if(o>=n)return!1;if(s=r.charCodeAt(o),32!==s&&9!==s&&13!==s){if(10!==s)break;o++,c++,a=0}else o++,a++}if(t.offset=o,t.line=c,t.char=a,34===s){for(t.type=1,o++,a++;;){if(o>=n)return!1;if(s=r.charCodeAt(o),o++,a++,92!==s){if(34===s)break}else o++,a++}t.value=r.substring(t.offset+1,o-1).replace(/\\u([0-9A-Fa-f]{4})/g,((e,t)=>String.fromCodePoint(parseInt(t,16)))).replace(/\\(.)/g,((t,s)=>{switch(s){case'"':return'"';case"\\":return"\\";case"/":return"/";case"b":return"\b";case"f":return"\f";case"n":return"\n";case"r":return"\r";case"t":return"\t";default:qe(e,"invalid escape sequence")}throw new Error("unreachable")}))}else if(91===s)t.type=2,o++,a++;else if(123===s)t.type=3,o++,a++;else if(93===s)t.type=4,o++,a++;else if(125===s)t.type=5,o++,a++;else if(58===s)t.type=6,o++,a++;else if(44===s)t.type=7,o++,a++;else if(110===s){if(t.type=8,o++,a++,s=r.charCodeAt(o),117!==s)return!1;if(o++,a++,s=r.charCodeAt(o),108!==s)return!1;if(o++,a++,s=r.charCodeAt(o),108!==s)return!1;o++,a++}else if(116===s){if(t.type=9,o++,a++,s=r.charCodeAt(o),114!==s)return!1;if(o++,a++,s=r.charCodeAt(o),117!==s)return!1;if(o++,a++,s=r.charCodeAt(o),101!==s)return!1;o++,a++}else if(102===s){if(t.type=10,o++,a++,s=r.charCodeAt(o),97!==s)return!1;if(o++,a++,s=r.charCodeAt(o),108!==s)return!1;if(o++,a++,s=r.charCodeAt(o),115!==s)return!1;if(o++,a++,s=r.charCodeAt(o),101!==s)return!1;o++,a++}else for(t.type=11;;){if(o>=n)return!1;if(s=r.charCodeAt(o),!(46===s||s>=48&&s<=57||101===s||69===s||45===s||43===s))break;o++,a++}return t.len=o-t.offset,null===t.value&&(t.value=r.substr(t.offset,t.len)),e.pos=o,e.line=c,e.char=a,!0}class We{constructor(e,t){this._onigLibPromise=t,this._grammars=new Map,this._rawGrammars=new Map,this._injectionGrammars=new Map,this._theme=e}dispose(){for(const e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}async grammarForScopeName(e,t,s,r,o){if(!this._grammars.has(e)){let n=this._rawGrammars.get(e);if(!n)return null;this._grammars.set(e,function(e,t,s,r,o,n,c,a){return new Ie(e,t,s,r,o,n,c,a)}(e,n,t,s,r,o,this,await this._onigLibPromise))}return this._grammars.get(e)}}function De(e,t){let s=0;const r=[];let o=e,n=t;for(;o!==n;)o&&(!n||o.depth>=n.depth)?(s++,o=o.parent):(r.push(n.toStateStackFrame()),n=n.parent);return{pops:s,newFrames:r.reverse()}}function ze(e,t){let s=e;for(let e=0;e0;)await Promise.all(n.Q.map((e=>this._loadSingleGrammar(e.scopeName)))),n.processQueue();return this._grammarForScopeName(e,t,s,r,o)}async _loadSingleGrammar(e){return this._ensureGrammarCache.has(e)||this._ensureGrammarCache.set(e,this._doLoadSingleGrammar(e)),this._ensureGrammarCache.get(e)}async _doLoadSingleGrammar(e){const t=await this._options.loadGrammar(e);if(t){const s="function"==typeof this._options.getInjections?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(t,s)}}async addGrammar(e,t=[],s=0,r=null){return this._syncRegistry.addGrammar(e,t),await this._grammarForScopeName(e.scopeName,s,r)}_grammarForScopeName(e,t=0,s=null,r=null,o=null){return this._syncRegistry.grammarForScopeName(e,t,s,r,o)}}const Qe=Oe.NULL,Ke=function(e,t=null){return null!==t&&/\.json$/.test(t)?(s=e,w?function(e,t,s){let r=new $e(e),o=new Me,n=0,c=null,a=[],i=[];function u(){a.push(n),i.push(c)}function l(){n=a.pop(),c=i.pop()}function h(e){qe(r,e)}for(;Ue(r,o);){if(0===n){if(null!==c&&h("too many constructs in root"),3===o.type){c={},c.$vscodeTextmateLocation=o.toLocation(t),u(),n=1;continue}if(2===o.type){c=[],u(),n=4;continue}h("unexpected token in root")}if(2===n){if(5===o.type){l();continue}if(7===o.type){n=3;continue}h("expected , or }")}if(1===n||3===n){if(1===n&&5===o.type){l();continue}if(1===o.type){let e=o.value;if(Ue(r,o)&&6===o.type||h("expected colon"),Ue(r,o)||h("expected value"),n=2,1===o.type){c[e]=o.value;continue}if(8===o.type){c[e]=null;continue}if(9===o.type){c[e]=!0;continue}if(10===o.type){c[e]=!1;continue}if(11===o.type){c[e]=parseFloat(o.value);continue}if(2===o.type){let t=[];c[e]=t,u(),n=4,c=t;continue}if(3===o.type){let s={};s.$vscodeTextmateLocation=o.toLocation(t),c[e]=s,u(),n=1,c=s;continue}}h("unexpected token in dict")}if(5===n){if(4===o.type){l();continue}if(7===o.type){n=6;continue}h("expected , or ]")}if(4===n||6===n){if(4===n&&4===o.type){l();continue}if(n=5,1===o.type){c.push(o.value);continue}if(8===o.type){c.push(null);continue}if(9===o.type){c.push(!0);continue}if(10===o.type){c.push(!1);continue}if(11===o.type){c.push(parseFloat(o.value));continue}if(2===o.type){let e=[];c.push(e),u(),n=4,c=e;continue}if(3===o.type){let e={};e.$vscodeTextmateLocation=o.toLocation(t),c.push(e),u(),n=1,c=e;continue}h("unexpected token in array")}h("unknown state")}return 0!==i.length&&h("unclosed constructs"),c}(s,t):JSON.parse(s)):function(e,t){return w?function(e,t,s){return Fe(e,t,"$vscodeTextmateLocation")}(e,t):function(e){return Fe(e,null,null)}(e)}(e,t);var s};var Ve=S.Bz,Ye=("undefined"!=typeof document&&document.currentScript&&document.currentScript.src,function(e){var t,s,r=void 0!==(e=e||{})?e:{};r.ready=new Promise((function(e,r){t=e,s=r}));var o,n=Object.assign({},r),c=!1;o=function(e){let t;return"function"==typeof readbuffer?new Uint8Array(readbuffer(e)):(t=read(e,"binary"),"object"==typeof t||S(s),t);var s},"undefined"!=typeof scriptArgs&&scriptArgs,"undefined"!=typeof onig_print&&("undefined"==typeof console&&(console={}),console.log=onig_print,console.warn=console.error="undefined"!=typeof printErr?printErr:onig_print);var a,i,u=r.print||console.log.bind(console),l=r.printErr||console.warn.bind(console);Object.assign(r,n),n=null,r.arguments&&r.arguments,r.thisProgram&&r.thisProgram,r.quit&&r.quit,r.wasmBinary&&(a=r.wasmBinary),r.noExitRuntime,"object"!=typeof WebAssembly&&S("no native wasm support detected");var h,d,p,m=!1,g="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function f(e,t,s){for(var r=t+s,o=t;e[o]&&!(o>=r);)++o;if(o-t>16&&e.buffer&&g)return g.decode(e.subarray(t,o));for(var n="";t>10,56320|1023&u)}}else n+=String.fromCharCode((31&c)<<6|a)}else n+=String.fromCharCode(c)}return n}function b(e){h=e,r.HEAP8=new Int8Array(e),r.HEAP16=new Int16Array(e),r.HEAP32=new Int32Array(e),r.HEAPU8=d=new Uint8Array(e),r.HEAPU16=new Uint16Array(e),r.HEAPU32=p=new Uint32Array(e),r.HEAPF32=new Float32Array(e),r.HEAPF64=new Float64Array(e)}r.INITIAL_MEMORY;var y=[],_=[],x=[],k=0,j=null;function S(e){r.onAbort&&r.onAbort(e),l(e="Aborted("+e+")"),m=!0,e+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(e);throw s(t),t}var w,v,L,C="data:application/octet-stream;base64,";function A(e){return e.startsWith(C)}function N(e){try{if(e==w&&a)return new Uint8Array(a);if(o)return o(e);throw"both async and sync fetching of the wasm failed"}catch(e){S(e)}}function P(e){for(;e.length>0;)e.shift()(r)}function R(e){try{return i.grow(e-h.byteLength+65535>>>16),b(i.buffer),1}catch(e){}}A(w="onig.wasm")||(v=w,w=r.locateFile?r.locateFile(v,""):""+v),L="undefined"!=typeof dateNow?dateNow:()=>performance.now();var I=[null,[],[]];function E(e,t){var s=I[e];0===t||10===t?((1===e?u:l)(f(s,0)),s.length=0):s.push(t)}var B,O={emscripten_get_now:L,emscripten_memcpy_big:function(e,t,s){d.copyWithin(e,t,t+s)},emscripten_resize_heap:function(e){var t=d.length,s=2147483648;if((e>>>=0)>s)return!1;let r=(e,t)=>e+(t-e%t)%t;for(var o=1;o<=4;o*=2){var n=t*(1+.2/o);if(n=Math.min(n,e+100663296),R(Math.min(s,r(Math.max(e,n),65536))))return!0}return!1},fd_write:function(e,t,s,r){for(var o=0,n=0;n>2],a=p[t+4>>2];t+=8;for(var i=0;i>2]=o,0}};function G(e){function s(){B||(B=!0,r.calledRun=!0,m||(P(_),t(r),r.onRuntimeInitialized&&r.onRuntimeInitialized(),function(){if(r.postRun)for("function"==typeof r.postRun&&(r.postRun=[r.postRun]);r.postRun.length;)e=r.postRun.shift(),x.unshift(e);var e;P(x)}()))}k>0||(function(){if(r.preRun)for("function"==typeof r.preRun&&(r.preRun=[r.preRun]);r.preRun.length;)e=r.preRun.shift(),y.unshift(e);var e;P(y)}(),k>0||(r.setStatus?(r.setStatus("Running..."),setTimeout((function(){setTimeout((function(){r.setStatus("")}),1),s()}),1)):s()))}if(function(){var e={env:O,wasi_snapshot_preview1:O};function t(e,t){var s,o=e.exports;r.asm=o,b((i=r.asm.memory).buffer),r.asm.__indirect_function_table,s=r.asm.__wasm_call_ctors,_.unshift(s),function(e){if(k--,r.monitorRunDependencies&&r.monitorRunDependencies(k),0==k&&j){var t=j;j=null,t()}}()}function o(e){t(e.instance)}function n(t){return(!a&&c&&"function"==typeof fetch?fetch(w,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+w+"'";return e.arrayBuffer()})).catch((function(){return N(w)})):Promise.resolve().then((function(){return N(w)}))).then((function(t){return WebAssembly.instantiate(t,e)})).then((function(e){return e})).then(t,(function(e){l("failed to asynchronously prepare wasm: "+e),S(e)}))}if(k++,r.monitorRunDependencies&&r.monitorRunDependencies(k),r.instantiateWasm)try{return r.instantiateWasm(e,t)}catch(e){l("Module.instantiateWasm callback failed with error: "+e),s(e)}(a||"function"!=typeof WebAssembly.instantiateStreaming||A(w)||"function"!=typeof fetch?n(o):fetch(w,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,e).then(o,(function(e){return l("wasm streaming compile failed: "+e),l("falling back to ArrayBuffer instantiation"),n(o)}))}))).catch(s)}(),r.___wasm_call_ctors=function(){return(r.___wasm_call_ctors=r.asm.__wasm_call_ctors).apply(null,arguments)},r.___errno_location=function(){return(r.___errno_location=r.asm.__errno_location).apply(null,arguments)},r._omalloc=function(){return(r._omalloc=r.asm.omalloc).apply(null,arguments)},r._ofree=function(){return(r._ofree=r.asm.ofree).apply(null,arguments)},r._getLastOnigError=function(){return(r._getLastOnigError=r.asm.getLastOnigError).apply(null,arguments)},r._createOnigScanner=function(){return(r._createOnigScanner=r.asm.createOnigScanner).apply(null,arguments)},r._freeOnigScanner=function(){return(r._freeOnigScanner=r.asm.freeOnigScanner).apply(null,arguments)},r._findNextOnigScannerMatch=function(){return(r._findNextOnigScannerMatch=r.asm.findNextOnigScannerMatch).apply(null,arguments)},r._findNextOnigScannerMatchDbg=function(){return(r._findNextOnigScannerMatchDbg=r.asm.findNextOnigScannerMatchDbg).apply(null,arguments)},r.stackSave=function(){return(r.stackSave=r.asm.stackSave).apply(null,arguments)},r.stackRestore=function(){return(r.stackRestore=r.asm.stackRestore).apply(null,arguments)},r.stackAlloc=function(){return(r.stackAlloc=r.asm.stackAlloc).apply(null,arguments)},r.dynCall_jiji=function(){return(r.dynCall_jiji=r.asm.dynCall_jiji).apply(null,arguments)},r.UTF8ToString=function(e,t){return e?f(d,e,t):""},j=function e(){B||G(),B||(j=e)},r.preInit)for("function"==typeof r.preInit&&(r.preInit=[r.preInit]);r.preInit.length>0;)r.preInit.pop()();return G(),e.ready});let Xe=null;class Je{static _utf8ByteLength(e){let t=0;for(let s=0,r=e.length;s=55296&&o<=56319&&s+1=56320&&t<=57343&&(n=65536+(o-55296<<10)|t-56320,c=!0)}t+=n<=127?1:n<=2047?2:n<=65535?3:4,c&&s++}return t}constructor(e){const t=e.length,s=Je._utf8ByteLength(e),r=s!==t,o=r?new Uint32Array(t+1):null;r&&(o[t]=s);const n=r?new Uint32Array(s+1):null;r&&(n[s]=t);const c=new Uint8Array(s);let a=0;for(let s=0;s=55296&&i<=56319&&s+1=56320&&t<=57343&&(u=65536+(i-55296<<10)|t-56320,l=!0)}r&&(o[s]=a,l&&(o[s+1]=a),u<=127?n[a+0]=s:u<=2047?(n[a+0]=s,n[a+1]=s):u<=65535?(n[a+0]=s,n[a+1]=s,n[a+2]=s):(n[a+0]=s,n[a+1]=s,n[a+2]=s,n[a+3]=s)),u<=127?c[a++]=u:u<=2047?(c[a++]=192|(1984&u)>>>6,c[a++]=128|(63&u)>>>0):u<=65535?(c[a++]=224|(61440&u)>>>12,c[a++]=128|(4032&u)>>>6,c[a++]=128|(63&u)>>>0):(c[a++]=240|(1835008&u)>>>18,c[a++]=128|(258048&u)>>>12,c[a++]=128|(4032&u)>>>6,c[a++]=128|(63&u)>>>0),l&&s++}this.utf16Length=t,this.utf8Length=s,this.utf16Value=e,this.utf8Value=c,this.utf16OffsetToUtf8=o,this.utf8OffsetToUtf16=n}createString(e){const t=e._omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,t),t}}class Ze{constructor(e){if(this.id=++Ze.LAST_ID,!Xe)throw new Error("Must invoke loadWASM first.");this._onigBinding=Xe,this.content=e;const t=new Je(e);this.utf16Length=t.utf16Length,this.utf8Length=t.utf8Length,this.utf16OffsetToUtf8=t.utf16OffsetToUtf8,this.utf8OffsetToUtf16=t.utf8OffsetToUtf16,this.utf8Length<1e4&&!Ze._sharedPtrInUse?(Ze._sharedPtr||(Ze._sharedPtr=Xe._omalloc(1e4)),Ze._sharedPtrInUse=!0,Xe.HEAPU8.set(t.utf8Value,Ze._sharedPtr),this.ptr=Ze._sharedPtr):this.ptr=t.createString(Xe)}convertUtf8OffsetToUtf16(e){return this.utf8OffsetToUtf16?e<0?0:e>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[e]:e}convertUtf16OffsetToUtf8(e){return this.utf16OffsetToUtf8?e<0?0:e>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[e]:e}dispose(){this.ptr===Ze._sharedPtr?Ze._sharedPtrInUse=!1:this._onigBinding._ofree(this.ptr)}}Ze.LAST_ID=0,Ze._sharedPtr=0,Ze._sharedPtrInUse=!1;class et{constructor(e){if(!Xe)throw new Error("Must invoke loadWASM first.");const t=[],s=[];for(let r=0,o=e.length;rWebAssembly.instantiateStreaming(e,t)}(r):function(e){return async t=>{const s=await e.arrayBuffer();return WebAssembly.instantiate(s,t)}}(r):function(e){return t=>WebAssembly.instantiate(e,t)}(r)}return st=new Promise(((e,t)=>{r=e,o=t})),function(e,t,s,r){Ye({print:t,instantiateWasm:(t,s)=>{if("undefined"==typeof performance){const e=()=>Date.now();t.env.emscripten_get_now=e,t.wasi_snapshot_preview1.emscripten_get_now=e}return e(t).then((e=>s(e.instance)),r),{}}}).then((e=>{Xe=e,s()}))}(t,s,r,o),st}function ot(e){return new Ze(e)}function nt(e){return new et(e)}function ct(e){const t=x[e];if(!t)return;const{id:s}=k[t];return{id:s,scopeName:t}}const at=new Map;let it,ut;async function lt(e){if(at.has(e))return at.get(e);const t=function(e){return k[e]}(e);if(!t)return Promise.resolve(void 0);let r;if(void 0===it&&(r=ht(t.path),it=r.then((()=>!0)).catch((()=>!1))),void 0===ut&&(ut=await it),ut){const s=r||ht(t.path);return at.set(e,s),s}const o=s(`grammars/${t.id}`);t.embeddedScopes.forEach((e=>{if(!at.has(e)){const t=o.then((t=>t.find((t=>t.scopeName===e))));at.set(e,t)}}));const n=o.then((t=>t.find((t=>t.scopeName===e))));return at.set(e,n),n}async function ht(e){return await t()}const dt=30720,pt=16744448,mt=16775168,gt=11,ft=15,bt={NotSet:-1,None:0,Italic:1,Bold:2,Underline:4,Strikethrough:8};function yt(e,t,s,r){const{tokens:o,ruleStack:n}=e.tokenizeLine2(s,t),c=[];let a=s.length;for(let e=o.length-2;e>=0;e-=2){const t=o[e],r=o[e+1],n=s.slice(t,a);c.unshift({content:n,metadata:r}),a=t}let i=[];if(null==r?void 0:r.preserveWhitespace)i=c;else for(let e=0;e0?i[i.length-1].content+=t.content:e{const{rawTokens:o,nextStack:n}=yt(t,r,e,{preserveWhitespace:!0}),c=o.map((({content:e,metadata:t})=>({content:e,style:xt(t,s)}))),a=function(e,t,s,r){const{tokens:o}=s.tokenizeLine(e,t),n=[];for(let t=0;t{if(i+=e.content.length,s>>ft]},r=(e&dt)>>>gt;return r&bt.Italic&&(s.fontStyle="italic"),r&bt.Bold&&(s.fontWeight="bold"),r&bt.Underline&&(s.textDecoration="underline"),r&bt.Strikethrough&&(s.textDecoration="line-through"),s}var kt={instantiator:t=>WebAssembly.instantiate(e,t).then((e=>({instance:e})))};let jt=null;function St(e){return"text"==e||"terminal"==e}function wt(e){if(!jt){const e=rt(kt).then((()=>({createOnigScanner:nt,createOnigString:ot})));jt=new Ve({onigLib:e,loadGrammar:e=>lt(e)})}const t=e.filter((e=>!St(e))).map((e=>{const t=ct(e);if(!t)throw new Lt(e);return jt.loadGrammar(t.scopeName)}));return Promise.all(t)}function vt(e){if(St(e))return{langId:e,grammar:null};const t=ct(e);if(!t)throw new Lt(e);const s=function(e){const{_syncRegistry:t}=jt;return null==t?void 0:t._grammars.get(e)}(t.scopeName);if(!s)throw new Error(`Syntax highlighting error: grammar for ${e} not loaded`);return{langId:t.id,grammar:s}}class Lt extends Error{constructor(e){super(`Unknown language: ${e}`),this.alias=e}}function Ct(e,t,s){jt.setTheme(s);const r=function(e){const t=jt.getColorMap();return e.colorNames?t.map((t=>Object.keys(e.colorNames).find((s=>e.colorNames[s].toUpperCase()===t.toUpperCase()))||t)):t}(s);return function(e,t,s){let r=null;return e.split(/\r?\n|\r/g).map((e=>{const{rawTokens:o,nextStack:n}=yt(t,r,e);return r=n,o.map((({content:e,metadata:t})=>({content:e,style:xt(t,s)})))}))}(e,t,r)}function At(e){return e.split(/\r?\n|\r/g).map((e=>[{content:e,style:{}}]))}function Nt(e,t){return Rt(e.slice(1,-1)).map((e=>{const{from:s,to:r}=Pt(e);return{lineNumber:t,fromColumn:s,toColumn:r}}))}function Pt(e){const[t,s]=e.split(":");if(!It(t))throw new Et(t);const r=Number(t);if(r<1)throw new Bt;if(s){if(!It(s))throw new Et(s);return{from:r,to:+s}}return{from:r,to:r}}function Rt(e){return e.split(/,(?![^\[]*\])/g)}function It(e){e=e.toString();var t=Math.abs(e),s=parseInt(e,10);return!isNaN(t)&&s===t&&t.toString()===e}class Et extends Error{constructor(e){super(`Invalid number "${e}" in range string`),this.number=e,Object.setPrototypeOf(this,new.target.prototype)}}class Bt extends Error{constructor(){super("Invalid line or column number in range string"),Object.setPrototypeOf(this,new.target.prototype)}}const Ot="#001",Gt="#010",Tt={name:"comments",type:"light",foreground:"",background:"",colors:{},settings:[{settings:{foreground:"#000"}},{scope:["punctuation.definition.comment"],settings:{foreground:Ot}},{scope:"comment",settings:{foreground:Gt}}]};function Ft(e,t,s,r){const o=t?Ct(e,t,Tt):At(e),n=[];let c=1;const a=o.map((e=>{const{annotations:t,lineWithoutComments:o}=function(e,t,s){if(!e.some((e=>e.style.color===Ot)))return{annotations:[],lineWithoutComments:e};const r=[];let o=0;for(;o!e.tokens.includes(t)));n.every((e=>""===e.content.trim()))&&(n=null);return{annotations:r.map((e=>({name:e.name,query:e.query,lineNumber:e.lineNumber,rangeString:e.rangeString}))),lineWithoutComments:n}}(e,r,c);if(n.push(...t),!o)return null;const a=o.map((e=>e.content)).join("");return["mdx","jsx","tsx"].includes(s)&&t.length>0&&"{}"===a.trim()?null:(c++,a)})).filter((e=>null!==e)).join("\n"),i=n.map((e=>{var{rangeString:t,lineNumber:s}=e,r=function(e,t){var s={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(s[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o{if(e.includes("[")){const[s,r]=e.split("["),o=Number(s),n=t+o-1;if(!It(n))throw new Et(s);return Nt("["+r,n)}const{from:s,to:r}=Pt(e);return[{fromLineNumber:s+t-1,toLineNumber:r+t-1}]})).flat():[{fromLineNumber:t,toLineNumber:t}]}(t,s);return Object.assign(Object.assign({},r),{ranges:o})}));return{newCode:a,annotations:i}}function qt(e,t){var s;const r=e.match(/\s*([\w-]+)?(\([^\)]*\)|\[[^\]]*\])?(.*)$/),o=r[1],n=r[2],c=null===(s=r[3])||void 0===s?void 0:s.trim();return t.includes(o)?{name:o,rangeString:n,query:c}:null}function $t(e,t){let s=[],r=1;return e.forEach((e=>{s.push({fromColumn:r,toColumn:r+e.content.length-1,token:e}),r+=e.content.length})),t.forEach((e=>{s=function(e,t){const{range:s}=t,{fromColumn:r,toColumn:o}=s,n=[];let c=0;for(;co){const[e,s]=Ut(t,o+1);a.tokens.push(e),n.push(s)}else a.tokens.push(t);c++}else n.push(a);for(;cMt(e)))}function Mt(e){return"tokens"in e?{annotationName:e.annotationName,annotationQuery:e.annotationQuery,fromColumn:e.fromColumn,toColumn:e.toColumn,tokens:e.tokens.map((e=>Mt(e)))}:e.token}function Ut(e,t){if("token"in e){const s=Object.assign(Object.assign({},e.token),{content:e.token.content.slice(0,t-e.fromColumn)}),r=Object.assign(Object.assign({},e.token),{content:e.token.content.slice(t-e.fromColumn)});return[Object.assign(Object.assign({},e),{toColumn:t-1,token:s}),Object.assign(Object.assign({},e),{fromColumn:t,token:r})]}{const s=[],r=[];e.tokens.forEach((e=>{if(e.toColumn=t)r.push(e);else{const[o,n]=Ut(e,t);s.push(o),r.push(n)}}));return[Object.assign(Object.assign({},e),{toColumn:t-1,tokens:s}),Object.assign(Object.assign({},e),{fromColumn:t,tokens:r})]}}function Wt(e,t){let s=e.map(((e,t)=>({fromLineNumber:t+1,toLineNumber:t+1,line:e})));return t.forEach((e=>{s=function(e,t){const{range:s,name:r,query:o}=t,{fromLineNumber:n,toLineNumber:c}=s,a=[];let i=0;for(;ic){const[e,s]=zt(t,c+1);u.lines.push(e),a.push(s)}else u.lines.push(t);i++}else a.push(u);for(;iDt(e)))}function Dt(e){return"line"in e?{lineNumber:e.fromLineNumber,tokens:e.line.tokens}:{annotationName:e.annotationName,annotationQuery:e.annotationQuery,fromLineNumber:e.fromLineNumber,toLineNumber:e.toLineNumber,lines:e.lines.map((e=>Dt(e)))}}function zt(e,t){if("line"in e)return[Object.assign(Object.assign({},e),{toLineNumber:t-1}),Object.assign(Object.assign({},e),{fromLineNumber:t})];{const s=[],r=[];return e.lines.forEach((e=>{if(e.toLineNumber=t)r.push(e);else{const[o,n]=zt(e,t);s.push(o),r.push(n)}})),[Object.assign(Object.assign({},e),{toLineNumber:t-1,lines:s}),Object.assign(Object.assign({},e),{fromLineNumber:t,lines:r})]}}function Ht(e,t){const{inlineAnnotations:s,multilineAnnotations:r}=function(e){const t=[],s=[];return e.forEach((e=>{e.ranges.forEach((r=>{"lineNumber"in r?t.push(Object.assign(Object.assign({},e),{range:r})):s.push(Object.assign(Object.assign({},e),{range:r}))}))})),{inlineAnnotations:t,multilineAnnotations:s}}(t);return Wt(e.map(((e,t)=>{const r=s.filter((e=>e.range.lineNumber===t+1));return{lineNumber:t+1,tokens:$t(e,r)}})),r)}var Qt=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],Kt={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",9:"strikethrough"};function Vt(e,t){const s=e.indexOf("[",t);if(-1!==s){const t=e.indexOf("m",s);return{sequence:e.substring(s+2,t).split(";"),startPosition:s,position:t+1}}return{position:e.length}}function Yt(e,t){let s=1;const r=e[t+s++];let o;if("2"===r){const r=[e[t+s++],e[t+s++],e[t+s]].map((e=>Number.parseInt(e)));3!==r.length||r.some((e=>Number.isNaN(e)))||(o={type:"rgb",rgb:r})}else if("5"===r){const r=Number.parseInt(e[t+s]);Number.isNaN(r)||(o={type:"table",index:Number(r)})}return[s,o]}function Xt(e){const t=[];for(let s=0;s=90&&o<=97?t.push({type:"setForegroundColor",value:{type:"named",name:Qt[o-90+8]}}):o>=100&&o<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:Qt[o-100+8]}})}return t}function Jt(e,t){const s=function(){let e=null,t=null,s=new Set;return{parse(r){const o=[];let n=0;do{const c=Vt(r,n),a=c.sequence?r.substring(n,c.startPosition):r.substring(n);if(a.length>0&&o.push({value:a,foreground:e,background:t,decorations:new Set(s)}),c.sequence){const r=Xt(c.sequence);for(const o of r)"resetAll"===o.type?(e=null,t=null,s.clear()):"resetForegroundColor"===o.type?e=null:"resetBackgroundColor"===o.type?t=null:"resetDecoration"===o.type&&s.delete(o.value);for(const o of r)"setForegroundColor"===o.type?e=o.value:"setBackgroundColor"===o.type?t=o.value:"setDecoration"===o.type&&s.add(o.value)}n=c.position}while(nfunction(e,t,s){const r=e.parse(t),o=r.map((({value:e,foreground:t,background:r,decorations:o})=>{const n=Zt(t,s),c={};n&&(c.color=n);const a=Zt(r,s);return a&&(c.background=a),o.has("bold")&&(c.fontWeight="bold"),o.has("italic")&&(c.fontStyle="italic"),o.has("underline")&&(c.textDecoration="underline"),o.has("strikethrough")&&(c.textDecoration="line-through"),o.has("reverse")&&(c.color=a,c.background=n),o.has("dim")&&(c.opacity=.5),{content:e,style:c}}));return o}(s,e,t)));return r}function Zt(e,t){if(e){if("named"===e.type){return i(t,"terminal.ansi"+(e.name[0].toUpperCase()+e.name.slice(1)))}if("rgb"===e.type){const[t,s,r]=e.rgb;return`rgb(${t}, ${s}, ${r})`}}}async function es(e,t){await Promise.all([wt(e),p(t)])}async function ts(e,t,s="dark-plus",r={}){const o=e||"",n=t||"text";if("string"!=typeof o)throw new Error("Syntax highlighter error: code must be a string");if("string"!=typeof n)throw new Error("Syntax highlighter error: lang must be a string");return await es([n],s),ss(o,n,s,r)}function ss(e,t,s="dark-plus",r={}){const o=e||"",n=t||"text";if("string"!=typeof o)throw new Error("Syntax highlighter error: code must be a string");if("string"!=typeof n)throw new Error("Syntax highlighter error: lang must be a string");const{langId:c,grammar:a}=vt(n),u=m(s),l="text"==c?At(o):"terminal"==c?Jt(o,u):(null==r?void 0:r.scopes)?function(e,t,s){return jt.setTheme(s),_t(e,t,jt.getColorMap())}(o,a,u):Ct(o,a,u),h="terminal"==c?function(e){return{color:i(e,"terminal.foreground"),background:i(e,"terminal.background")}}(u):{color:u.foreground,background:u.background};if(function(e){return"annotations"in e}(r)){return{lines:Ht(l,(null==r?void 0:r.annotations)||[]),lang:c,style:h}}return{lines:l,lang:c,style:h}}async function rs(e,t,s){if(!s)return{code:e,annotations:[]};await wt([t]);const{grammar:r}=vt(t),{newCode:o,annotations:n}=Ft(e,r,t,s);return{code:o,annotations:n}}async function os(e){if(!e)throw new Error("Syntax highlighter error: undefined theme");await es([],e);return y(m(e))}function ns(e){if(!e)throw new Error("Syntax highlighter error: undefined theme");return y(m(e))}export{_ as LANG_NAMES,f as THEME_NAMES,Lt as UnknownLanguageError,b as UnknownThemeError,rs as extractAnnotations,os as getThemeColors,ns as getThemeColorsSync,ts as highlight,ss as highlightSync,es as preload}; +import e from"./onig.wasm?module";async function t(e,t){throw new Error("no fs")}async function s(e){const t=await fetch(`https://lighter.codehike.org/${e}.json`);return await t.json()}const r=e=>/^#([A-Fa-f0-9]{3,4}){1,2}$/.test(e),o=(e,t)=>e.match(new RegExp(`.{${t}}`,"g")),n=e=>parseInt(e.repeat(2/e.length),16);function c(e,t){return void 0!==e?e/255:"number"!=typeof t||t<0||t>1?1:t}function a(e,t){if(!e)return e;const{r:s,g:a,b:i,a:u}=function(e){if(!e)return;if(!r(e))throw new Error("Invalid color string, must be a valid hex color");const t=Math.floor((e.length-1)/3),s=o(e.slice(1),t),[a,i,u,l]=s.map(n);return{r:a,g:i,b:u,a:c(l,1)}}(e);return function(e){if(!e)return;const{r:t,g:s,b:r,a:o}=e,n=Math.round(255*o);return`#${t.toString(16).padStart(2,"0")}${s.toString(16).padStart(2,"0")}${r.toString(16).padStart(2,"0")}${n.toString(16).padStart(2,"0")}`}({r:s,g:a,b:i,a:u*t})}function i(e,t){const s=e.colors||{};if(s[t])return s[t];const r=l[t];if(!r)throw new Error(`Unknown theme color key: ${t}`);return"string"==typeof r?i(e,r):function(e,t){const s=t[e.type];if(Array.isArray(s)){const[t,r,...o]=s;return t(i(e,r),...o)}return s}(e,r)}const u="#6FC3DF",l={"editor.foreground":{dark:"#bbbbbb",light:"#333333",hc:"#ffffff"},"editorLineNumber.foreground":{dark:"#858585",light:"#237893",hc:"#fffffe"},"editor.selectionBackground":{light:"#ADD6FF",dark:"#264F78",hc:"#f3f518"},"editor.background":{light:"#fffffe",dark:"#1E1E1E",hc:"#000000"},"editorGroupHeader.tabsBackground":{dark:"#252526",light:"#F3F3F3"},"tab.activeBackground":"editor.background","tab.activeForeground":{dark:"#ffffff",light:"#333333",hc:"#ffffff"},"tab.border":{dark:"#252526",light:"#F3F3F3",hc:u},"tab.activeBorder":"tab.activeBackground","tab.inactiveBackground":{dark:"#2D2D2D",light:"#ECECEC"},"tab.inactiveForeground":{dark:[a,"tab.activeForeground",.5],light:[a,"tab.activeForeground",.5],hc:"#ffffff"},"diffEditor.insertedTextBackground":{dark:"#9ccc2c33",light:"#9ccc2c40"},"diffEditor.removedTextBackground":{dark:"#ff000033",light:"#ff000033"},"diffEditor.insertedLineBackground":{dark:"#9bb95533",light:"#9bb95533"},"diffEditor.removedLineBackground":{dark:"#ff000033",light:"#ff000033"},"icon.foreground":{dark:"#C5C5C5",light:"#424242",hc:"#FFFFFF"},"sideBar.background":{dark:"#252526",light:"#F3F3F3",hc:"#000000"},"sideBar.foreground":"editor.foreground","sideBar.border":"sideBar.background","list.inactiveSelectionBackground":{dark:"#37373D",light:"#E4E6F1"},"list.inactiveSelectionForeground":{},"list.hoverBackground":{dark:"#2A2D2E",light:"#F0F0F0"},"list.hoverForeground":{},"editorGroupHeader.tabsBorder":{hc:u},"tab.activeBorderTop":{hc:u},"tab.hoverBackground":"tab.inactiveBackground","tab.hoverForeground":"tab.inactiveForeground","editor.rangeHighlightBackground":{dark:"#ffffff0b",light:"#fdff0033"},"editor.infoForeground":{dark:"#3794FF",light:"#1a85ff",hc:"#3794FF"},"input.border":{hc:u},"input.background":{dark:"#3C3C3C",light:"#fffffe",hc:"#000000"},"input.foreground":"editor.foreground","editor.lineHighlightBackground":{},focusBorder:{light:"#0090F1",dark:"#007FD4",hc:u},"editorGroup.border":{dark:"#444444",light:"#E7E7E7",hc:u},"list.activeSelectionBackground":{dark:"#094771",light:"#0060C0",hc:"#000000"},"list.activeSelectionForeground":{dark:"#fffffe",light:"#fffffe",hc:"#fffffe"},"lighter.inlineBackground":{dark:[a,"editor.background",.9],light:[a,"editor.background",.9]},"terminal.background":"editor.background","terminal.foreground":"editor.foreground","terminal.ansiBlack":{dark:"#000000",light:"#000000",hc:"#000000"},"terminal.ansiRed":{dark:"#cd3131",light:"#cd3131",hc:"#cd0000"},"terminal.ansiGreen":{dark:"#0DBC79",light:"#00BC00",hc:"#00cd00"},"terminal.ansiYellow":{dark:"#e5e510",light:"#949800",hc:"#cdcd00"},"terminal.ansiBlue":{dark:"#2472c8",light:"#0451a5",hc:"#0000ee"},"terminal.ansiMagenta":{dark:"#bc3fbc",light:"#bc05bc",hc:"#cd00cd"},"terminal.ansiCyan":{dark:"#11a8cd",light:"#0598bc",hc:"#00cdcd"},"terminal.ansiWhite":{dark:"#e5e5e5",light:"#555555",hc:"#e5e5e5"},"terminal.ansiBrightBlack":{dark:"#666666",light:"#666666",hc:"#7f7f7f"},"terminal.ansiBrightRed":{dark:"#f14c4c",light:"#cd3131",hc:"#ff0000"},"terminal.ansiBrightGreen":{dark:"#23d18b",light:"#14CE14",hc:"#00ff00"},"terminal.ansiBrightYellow":{dark:"#f5f543",light:"#b5ba00",hc:"#ffff00"},"terminal.ansiBrightBlue":{dark:"#3b8eea",light:"#0451a5",hc:"#5c5cff"},"terminal.ansiBrightMagenta":{dark:"#d670d6",light:"#bc05bc",hc:"#ff00ff"},"terminal.ansiBrightCyan":{dark:"#29b8db",light:"#0598bc",hc:"#00ffff"},"terminal.ansiBrightWhite":{dark:"#e5e5e5",light:"#a5a5a5",hc:"#ffffff"}},h=new Map,d=new Map;async function p(e){if("string"==typeof e){const r=e;if(!f.includes(r))throw new b(r);if(!h.has(r)){const e=async function(e){try{return await t()}catch(t){return await s(`themes/${e}`)}}(r).then((e=>(d.set(r,e),e)));h.set(r,e)}return h.get(r)}return e}function m(e){let t=null;if("string"==typeof e){if(t=d.get(e),!t)throw new Error("Syntax highlighting error: theme not loaded")}else t=e;return function(e){if(!e)return;const t=e.settings||e.tokenColors||[],s={name:e.name||"unknown-theme",type:g(e),foreground:"",background:"",settings:t,colors:e.colors||{},colorNames:e.colorNames},r=t.find((e=>!e.scope));if(r){const{foreground:e,background:t}=(null==r?void 0:r.settings)||{},o={};e&&!s.colors["editor.foreground"]&&(o["editor.foreground"]=e),t&&!s.colors["editor.background"]&&(o["editor.background"]=t),Object.keys(o).length>0&&(s.colors=Object.assign(Object.assign({},s.colors),o)),s.foreground=e,s.background=t}r||(s.settings=[{settings:{foreground:i(s,"editor.foreground"),background:i(s,"editor.background")}},...s.settings]);if(s.background=s.background||i(s,"editor.background"),s.foreground=s.foreground||i(s,"editor.foreground"),"from-css"===e.type&&!s.colorNames){const e={};let t=0;s.settings=s.settings.map((s=>{const r=Object.assign(Object.assign({},s),{settings:Object.assign({},s.settings)}),{foreground:o,background:n}=r.settings||{};return o&&!e[o]&&(e[o]=`#${t.toString(16).padStart(6,"0")}`,t++),n&&!e[n]&&(e[n]=`#${t.toString(16).padStart(6,"0")}`,t++),o&&(r.settings.foreground=e[o]),n&&(r.settings.background=e[n]),r})),s.colorNames=e}return s}(t)}function g(e){var t;if("from-css"===e.type)return"from-css";return"light"===(e.type?e.type:(null===(t=e.name)||void 0===t?void 0:t.toLowerCase().includes("light"))?"light":"dark")?"light":"dark"}const f=["dark-plus","dracula-soft","dracula","github-dark","github-dark-dimmed","github-from-css","github-light","light-plus","material-darker","material-default","material-from-css","material-lighter","material-ocean","material-palenight","min-dark","min-light","monokai","nord","one-dark-pro","poimandres","slack-dark","slack-ochin","solarized-dark","solarized-light"];class b extends Error{constructor(e){super(`Unknown theme: ${e}`),this.theme=e}}function y(e){const t=t=>"colorScheme"===t?function(e){return"from-css"===e.type?"var(--ch-0)":e.type}(e):"foreground"===t?e.foreground:"background"===t?e.background:i(e,t);return{colorScheme:t("colorScheme"),foreground:t("foreground"),background:t("background"),lighter:{inlineBackground:t("lighter.inlineBackground")},editor:{background:t("editor.background"),foreground:t("editor.foreground"),lineHighlightBackground:t("editor.lineHighlightBackground"),rangeHighlightBackground:t("editor.rangeHighlightBackground"),infoForeground:t("editor.infoForeground"),selectionBackground:t("editor.selectionBackground")},focusBorder:t("focusBorder"),tab:{activeBackground:t("tab.activeBackground"),activeForeground:t("tab.activeForeground"),inactiveBackground:t("tab.inactiveBackground"),inactiveForeground:t("tab.inactiveForeground"),border:t("tab.border"),activeBorder:t("tab.activeBorder"),activeBorderTop:t("tab.activeBorderTop")},editorGroup:{border:t("editorGroup.border")},editorGroupHeader:{tabsBackground:t("editorGroupHeader.tabsBackground")},editorLineNumber:{foreground:t("editorLineNumber.foreground")},input:{background:t("input.background"),foreground:t("input.foreground"),border:t("input.border")},icon:{foreground:t("icon.foreground")},sideBar:{background:t("sideBar.background"),foreground:t("sideBar.foreground"),border:t("sideBar.border")},list:{activeSelectionBackground:t("list.activeSelectionBackground"),activeSelectionForeground:t("list.activeSelectionForeground"),hoverBackground:t("list.hoverBackground"),hoverForeground:t("list.hoverForeground")}}}const _=["abap","actionscript-3","ada","apache","apex","apl","applescript","ara","asm","astro","awk","ballerina","bash","bat","batch","be","beancount","berry","bibtex","bicep","blade","c","c#","cadence","cdc","clarity","clj","clojure","cmake","cmd","cobol","codeql","coffee","console","cpp","crystal","cs","csharp","css","cue","cypher","d","dart","dax","diff","docker","dockerfile","dream-maker","elixir","elm","erb","erl","erlang","f#","fish","fs","fsharp","fsl","gdresource","gdscript","gdshader","gherkin","git-commit","git-rebase","glimmer-js","glimmer-ts","glsl","gnuplot","go","graphql","groovy","hack","haml","handlebars","haskell","hbs","hcl","hjson","hlsl","hs","html","http","imba","ini","jade","java","javascript","jinja-html","jison","js","json","json5","jsonc","jsonl","jsonnet","jssm","jsx","julia","kotlin","kql","kusto","latex","less","liquid","lisp","logo","lua","make","makefile","markdown","marko","matlab","md","mdx","mermaid","narrat","nextflow","nginx","nim","nix","objc","objective-c","objective-cpp","ocaml","pascal","perl","perl6","php","plsql","postcss","powerquery","powershell","prisma","prolog","properties","proto","ps","ps1","pug","puppet","purescript","py","python","ql","r","raku","razor","rb","reg","rel","riscv","rs","rst","ruby","rust","sas","sass","scala","scheme","scss","sh","shader","shaderlab","shell","shellscript","shellsession","smalltalk","solidity","sparql","sql","ssh-config","stata","styl","stylus","svelte","swift","system-verilog","tasl","tcl","terminal","tex","text","toml","ts","tsx","turtle","twig","txt","typescript","v","vb","verilog","vhdl","vim","viml","vimscript","vue","vue-html","vyper","wasm","wenyan","wgsl","wolfram","xml","xsl","yaml","yml","zenscript","zsh","文言"],x={abap:"source.abap","actionscript-3":"source.actionscript.3",ada:"source.ada",apache:"source.apacheconf",apex:"source.apex",apl:"source.apl",applescript:"source.applescript",ara:"source.ara",asm:"source.asm.x86_64",astro:"source.astro",awk:"source.awk",ballerina:"source.ballerina",bat:"source.batchfile",batch:"source.batchfile",beancount:"text.beancount",berry:"source.berry",be:"source.berry",bibtex:"text.bibtex",bicep:"source.bicep",blade:"text.html.php.blade",c:"source.c",cadence:"source.cadence",cdc:"source.cadence",clarity:"source.clar",clojure:"source.clojure",clj:"source.clojure",cmake:"source.cmake",cobol:"source.cobol",codeql:"source.ql",ql:"source.ql",coffee:"source.coffee",cpp:"source.cpp",crystal:"source.crystal",csharp:"source.cs","c#":"source.cs",cs:"source.cs",css:"source.css",cue:"source.cue",cypher:"source.cypher",d:"source.d",dart:"source.dart",dax:"source.dax",diff:"source.diff",docker:"source.dockerfile",dockerfile:"source.dockerfile","dream-maker":"source.dm",elixir:"source.elixir",elm:"source.elm",erb:"text.html.erb",erlang:"source.erlang",erl:"source.erlang",fish:"source.fish",fsharp:"source.fsharp","f#":"source.fsharp",fs:"source.fsharp",gdresource:"source.gdresource",gdscript:"source.gdscript",gdshader:"source.gdshader",gherkin:"text.gherkin.feature","git-commit":"text.git-commit","git-rebase":"text.git-rebase","glimmer-js":"source.gjs","glimmer-ts":"source.gts",glsl:"source.glsl",gnuplot:"source.gnuplot",go:"source.go",graphql:"source.graphql",groovy:"source.groovy",hack:"source.hack",haml:"text.haml",handlebars:"text.html.handlebars",hbs:"text.html.handlebars",haskell:"source.haskell",hs:"source.haskell",hcl:"source.hcl",hjson:"source.hjson",hlsl:"source.hlsl",html:"text.html.basic",http:"source.http",imba:"source.imba",ini:"source.ini",properties:"source.ini",java:"source.java",javascript:"source.js",js:"source.js","jinja-html":"text.html.jinja",jison:"source.jison",json:"source.json",json5:"source.json5",jsonc:"source.json.comments",jsonl:"source.json.lines",jsonnet:"source.jsonnet",jssm:"source.jssm",fsl:"source.jssm",jsx:"source.js.jsx",julia:"source.julia",kotlin:"source.kotlin",kusto:"source.kusto",kql:"source.kusto",latex:"text.tex.latex",less:"source.css.less",liquid:"text.html.liquid",lisp:"source.lisp",logo:"source.logo",lua:"source.lua",make:"source.makefile",makefile:"source.makefile",markdown:"text.html.markdown",md:"text.html.markdown",marko:"text.marko",matlab:"source.matlab",mdx:"source.mdx",mermaid:"source.mermaid",narrat:"source.narrat",nextflow:"source.nextflow",nginx:"source.nginx",nim:"source.nim",nix:"source.nix","objective-c":"source.objc",objc:"source.objc","objective-cpp":"source.objcpp",ocaml:"source.ocaml",pascal:"source.pascal",perl:"source.perl",php:"source.php",plsql:"source.plsql.oracle",postcss:"source.css.postcss",powerquery:"source.powerquery",powershell:"source.powershell",ps:"source.powershell",ps1:"source.powershell",prisma:"source.prisma",prolog:"source.prolog",proto:"source.proto",pug:"text.pug",jade:"text.pug",puppet:"source.puppet",purescript:"source.purescript",python:"source.python",py:"source.python",r:"source.r",raku:"source.perl.6",perl6:"source.perl.6",razor:"text.aspnetcorerazor",reg:"source.reg",rel:"source.rel",riscv:"source.riscv",rst:"source.rst",ruby:"source.ruby",rb:"source.ruby",rust:"source.rust",rs:"source.rust",sas:"source.sas",sass:"source.sass",scala:"source.scala",scheme:"source.scheme",scss:"source.css.scss",shaderlab:"source.shaderlab",shader:"source.shaderlab",shellscript:"source.shell",bash:"source.shell",console:"source.shell",sh:"source.shell",shell:"source.shell",zsh:"source.shell",shellsession:"text.shell-session",smalltalk:"source.smalltalk",solidity:"source.solidity",sparql:"source.sparql",sql:"source.sql","ssh-config":"source.ssh-config",stata:"source.stata",stylus:"source.stylus",styl:"source.stylus",svelte:"source.svelte",swift:"source.swift","system-verilog":"source.systemverilog",tasl:"source.tasl",tcl:"source.tcl",tex:"text.tex",toml:"source.toml",tsx:"source.tsx",turtle:"source.turtle",twig:"text.html.twig",txt:"source.txt",typescript:"source.ts",ts:"source.ts",v:"source.v",vb:"source.asp.vb.net",cmd:"source.asp.vb.net",verilog:"source.verilog",vhdl:"source.vhdl",viml:"source.viml",vim:"source.viml",vimscript:"source.viml","vue-html":"text.html.vue-html",vue:"source.vue",vyper:"source.vyper",wasm:"source.wat",wenyan:"source.wenyan","文言":"source.wenyan",wgsl:"source.wgsl",wolfram:"source.wolfram",xml:"text.xml",xsl:"text.xml.xsl",yaml:"source.yaml",yml:"source.yaml",zenscript:"source.zenscript"},k={"source.abap":{id:"abap",path:"abap.tmLanguage.json",embeddedScopes:[]},"source.actionscript.3":{id:"actionscript-3",path:"actionscript-3.tmLanguage.json",embeddedScopes:[]},"source.ada":{id:"ada",path:"ada.tmLanguage.json",embeddedScopes:[]},"source.apacheconf":{id:"apache",path:"apache.tmLanguage.json",embeddedScopes:[]},"source.apex":{id:"apex",path:"apex.tmLanguage.json",embeddedScopes:[]},"source.apl":{id:"apl",path:"apl.tmLanguage.json",embeddedScopes:["source.java","source.json","source.js","source.css","text.xml","text.html.basic"]},"source.applescript":{id:"applescript",path:"applescript.tmLanguage.json",embeddedScopes:[]},"source.ara":{id:"ara",path:"ara.tmLanguage.json",embeddedScopes:[]},"source.asm.x86_64":{id:"asm",path:"asm.tmLanguage.json",embeddedScopes:[]},"source.astro":{id:"astro",path:"astro.tmLanguage.json",embeddedScopes:["source.tsx","source.css.postcss","source.css.less","source.css.scss","source.css","source.sass","source.stylus","source.ts","source.js","source.json"]},"source.awk":{id:"awk",path:"awk.tmLanguage.json",embeddedScopes:[]},"source.ballerina":{id:"ballerina",path:"ballerina.tmLanguage.json",embeddedScopes:[]},"source.batchfile":{id:"bat",path:"bat.tmLanguage.json",embeddedScopes:[]},"text.beancount":{id:"beancount",path:"beancount.tmLanguage.json",embeddedScopes:[]},"source.berry":{id:"berry",path:"berry.tmLanguage.json",embeddedScopes:[]},"text.bibtex":{id:"bibtex",path:"bibtex.tmLanguage.json",embeddedScopes:[]},"source.bicep":{id:"bicep",path:"bicep.tmLanguage.json",embeddedScopes:[]},"text.html.php.blade":{id:"blade",path:"blade.tmLanguage.json",embeddedScopes:["source.java","source.css","source.json","source.js","source.sql","text.xml","text.html.basic"]},"source.c":{id:"c",path:"c.tmLanguage.json",embeddedScopes:[]},"source.cadence":{id:"cadence",path:"cadence.tmLanguage.json",embeddedScopes:[]},"source.clar":{id:"clarity",path:"clarity.tmLanguage.json",embeddedScopes:[]},"source.clojure":{id:"clojure",path:"clojure.tmLanguage.json",embeddedScopes:[]},"source.cmake":{id:"cmake",path:"cmake.tmLanguage.json",embeddedScopes:[]},"source.cobol":{id:"cobol",path:"cobol.tmLanguage.json",embeddedScopes:["source.css","source.js","source.java","text.html.basic","source.sql"]},"source.ql":{id:"codeql",path:"codeql.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.stylus","source.sass","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.tsx","source.ts","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.css.scss","source.swift","source.objc","source.css.less","source.json.comments","source.json","source.js","text.pug","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.coffee","source.clojure","source.batchfile","source.yaml","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","text.html.basic","source.css","text.html.markdown"]},"source.coffee":{id:"coffee",path:"coffee.tmLanguage.json",embeddedScopes:["source.js"]},"source.cpp":{id:"cpp",path:"cpp.tmLanguage.json",embeddedScopes:["source.c","source.sql","source.glsl"]},"source.crystal":{id:"crystal",path:"crystal.tmLanguage.json",embeddedScopes:["source.shell","source.js","source.c","source.css","source.sql","text.html.basic"]},"source.cs":{id:"csharp",path:"csharp.tmLanguage.json",embeddedScopes:[]},"source.css":{id:"css",path:"css.tmLanguage.json",embeddedScopes:[]},"source.cue":{id:"cue",path:"cue.tmLanguage.json",embeddedScopes:[]},"source.cypher":{id:"cypher",path:"cypher.tmLanguage.json",embeddedScopes:[]},"source.d":{id:"d",path:"d.tmLanguage.json",embeddedScopes:[]},"source.dart":{id:"dart",path:"dart.tmLanguage.json",embeddedScopes:[]},"source.dax":{id:"dax",path:"dax.tmLanguage.json",embeddedScopes:[]},"source.diff":{id:"diff",path:"diff.tmLanguage.json",embeddedScopes:[]},"source.dockerfile":{id:"docker",path:"docker.tmLanguage.json",embeddedScopes:[]},"source.dm":{id:"dream-maker",path:"dream-maker.tmLanguage.json",embeddedScopes:[]},"source.elixir":{id:"elixir",path:"elixir.tmLanguage.json",embeddedScopes:["source.css","source.js","text.html.basic"]},"source.elm":{id:"elm",path:"elm.tmLanguage.json",embeddedScopes:["source.c","source.glsl"]},"text.html.erb":{id:"erb",path:"erb.tmLanguage.json",embeddedScopes:["source.java","source.lua","source.shell","source.c","source.sql","text.xml","source.css","source.js","source.ruby","text.html.basic"]},"source.erlang":{id:"erlang",path:"erlang.tmLanguage.json",embeddedScopes:[]},"source.fish":{id:"fish",path:"fish.tmLanguage.json",embeddedScopes:[]},"source.fsharp":{id:"fsharp",path:"fsharp.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.stylus","source.sass","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.cs","source.tsx","source.ts","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.css.scss","source.swift","source.objc","source.css.less","source.json.comments","source.json","source.js","text.pug","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.coffee","source.clojure","source.batchfile","source.yaml","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","text.html.basic","source.css","text.html.markdown"]},"source.gdresource":{id:"gdresource",path:"gdresource.tmLanguage.json",embeddedScopes:["source.gdscript","source.gdshader"]},"source.gdscript":{id:"gdscript",path:"gdscript.tmLanguage.json",embeddedScopes:[]},"source.gdshader":{id:"gdshader",path:"gdshader.tmLanguage.json",embeddedScopes:[]},"text.gherkin.feature":{id:"gherkin",path:"gherkin.tmLanguage.json",embeddedScopes:[]},"text.git-commit":{id:"git-commit",path:"git-commit.tmLanguage.json",embeddedScopes:["source.diff"]},"text.git-rebase":{id:"git-rebase",path:"git-rebase.tmLanguage.json",embeddedScopes:["source.shell"]},"source.gjs":{id:"glimmer-js",path:"glimmer-js.tmLanguage.json",embeddedScopes:["source.yaml","source.css","text.html.basic","text.html.handlebars","source.js"]},"source.gts":{id:"glimmer-ts",path:"glimmer-ts.tmLanguage.json",embeddedScopes:["source.yaml","source.js","source.css","text.html.basic","text.html.handlebars","source.ts"]},"source.glsl":{id:"glsl",path:"glsl.tmLanguage.json",embeddedScopes:["source.c"]},"source.gnuplot":{id:"gnuplot",path:"gnuplot.tmLanguage.json",embeddedScopes:[]},"source.go":{id:"go",path:"go.tmLanguage.json",embeddedScopes:[]},"source.graphql":{id:"graphql",path:"graphql.tmLanguage.json",embeddedScopes:["source.tsx","source.js.jsx","source.ts","source.js"]},"source.groovy":{id:"groovy",path:"groovy.tmLanguage.json",embeddedScopes:[]},"source.hack":{id:"hack",path:"hack.tmLanguage.json",embeddedScopes:["source.css","source.js","source.sql","text.html.basic"]},"text.haml":{id:"haml",path:"haml.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.stylus","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.tsx","source.ts","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.css.scss","source.swift","source.objc","source.css.less","source.json.comments","source.json","text.pug","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.clojure","source.batchfile","source.yaml","text.xml.xsl","source.asp.vb.net","source.php","source.r","source.perl","source.makefile","source.java","source.ini","source.lua","source.shell","source.c","source.sql","text.xml","text.html.basic","source.css","text.html.markdown","source.coffee","source.sass","source.js","source.ruby"]},"text.html.handlebars":{id:"handlebars",path:"handlebars.tmLanguage.json",embeddedScopes:["source.yaml","source.js","source.css","text.html.basic"]},"source.haskell":{id:"haskell",path:"haskell.tmLanguage.json",embeddedScopes:[]},"source.hcl":{id:"hcl",path:"hcl.tmLanguage.json",embeddedScopes:[]},"source.hjson":{id:"hjson",path:"hjson.tmLanguage.json",embeddedScopes:[]},"source.hlsl":{id:"hlsl",path:"hlsl.tmLanguage.json",embeddedScopes:[]},"text.html.basic":{id:"html",path:"html.tmLanguage.json",embeddedScopes:["source.css","source.js"]},"source.http":{id:"http",path:"http.tmLanguage.json",embeddedScopes:["source.tsx","source.js.jsx","source.ts","source.js","source.java","source.graphql","text.xml","source.json","source.shell"]},"source.imba":{id:"imba",path:"imba.tmLanguage.json",embeddedScopes:[]},"source.ini":{id:"ini",path:"ini.tmLanguage.json",embeddedScopes:[]},"source.java":{id:"java",path:"java.tmLanguage.json",embeddedScopes:[]},"source.js":{id:"javascript",path:"javascript.tmLanguage.json",embeddedScopes:[]},"text.html.jinja":{id:"jinja-html",path:"jinja-html.tmLanguage.json",embeddedScopes:["source.css","source.js","text.html.basic"]},"source.jison":{id:"jison",path:"jison.tmLanguage.json",embeddedScopes:["source.js"]},"source.json":{id:"json",path:"json.tmLanguage.json",embeddedScopes:[]},"source.json5":{id:"json5",path:"json5.tmLanguage.json",embeddedScopes:[]},"source.json.comments":{id:"jsonc",path:"jsonc.tmLanguage.json",embeddedScopes:[]},"source.json.lines":{id:"jsonl",path:"jsonl.tmLanguage.json",embeddedScopes:[]},"source.jsonnet":{id:"jsonnet",path:"jsonnet.tmLanguage.json",embeddedScopes:[]},"source.jssm":{id:"jssm",path:"jssm.tmLanguage.json",embeddedScopes:[]},"source.js.jsx":{id:"jsx",path:"jsx.tmLanguage.json",embeddedScopes:[]},"source.julia":{id:"julia",path:"julia.tmLanguage.json",embeddedScopes:["source.c","source.glsl","source.sql","source.r","source.js","source.python","source.cpp"]},"source.kotlin":{id:"kotlin",path:"kotlin.tmLanguage.json",embeddedScopes:[]},"source.kusto":{id:"kusto",path:"kusto.tmLanguage.json",embeddedScopes:[]},"text.tex.latex":{id:"latex",path:"latex.tmLanguage.json",embeddedScopes:["source.glsl","source.shell","source.sql","source.cpp","source.c","source.r","source.gnuplot","source.scala","source.rust","source.yaml","source.python","source.ts","source.js","source.ruby","source.julia","source.lua","source.java","text.xml","text.html.basic","source.haskell","source.css","text.tex"]},"source.css.less":{id:"less",path:"less.tmLanguage.json",embeddedScopes:["source.css"]},"text.html.liquid":{id:"liquid",path:"liquid.tmLanguage.json",embeddedScopes:["source.js","source.json","source.css","text.html.basic"]},"source.lisp":{id:"lisp",path:"lisp.tmLanguage.json",embeddedScopes:[]},"source.logo":{id:"logo",path:"logo.tmLanguage.json",embeddedScopes:[]},"source.lua":{id:"lua",path:"lua.tmLanguage.json",embeddedScopes:["source.c"]},"source.makefile":{id:"make",path:"make.tmLanguage.json",embeddedScopes:[]},"text.html.markdown":{id:"markdown",path:"markdown.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.stylus","source.sass","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.tsx","source.ts","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.css.scss","source.swift","source.objc","source.css.less","source.json.comments","source.json","source.js","text.pug","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.coffee","source.clojure","source.batchfile","source.yaml","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","text.html.basic","source.css"]},"text.marko":{id:"marko",path:"marko.tmLanguage.json",embeddedScopes:["source.js","source.css.scss","source.css.less","source.css"]},"source.matlab":{id:"matlab",path:"matlab.tmLanguage.json",embeddedScopes:[]},"source.mdx":{id:"mdx",path:"mdx.tmLanguage.json",embeddedScopes:["source.gnuplot","text.tex","source.stylus","source.sass","text.bibtex","text.tex.latex","text.html.handlebars","source.dart","source.fsharp","source.powershell","source.perl.6","source.json.comments","text.pug","source.groovy","text.git-rebase","text.git-commit","source.batchfile","text.xml.xsl","source.asp.vb.net","source.php","source.js.jsx","source.glsl","source.ts","source.swift","text.xml","source.sql","text.shell-session","source.shell","source.css.scss","source.scala","source.rust","source.ruby","source.r","source.python","source.perl","source.objc","text.html.markdown","source.makefile","source.lua","source.css.less","source.kotlin","source.julia","source.json","source.js","source.java","source.ini","text.html.basic","source.haskell","source.graphql","source.go","source.erlang","source.elm","source.elixir","source.dockerfile","source.diff","source.css","source.cs","source.cpp","source.coffee","source.clojure","source.c","source.yaml","source.toml","source.tsx"]},"source.mermaid":{id:"mermaid",path:"mermaid.tmLanguage.json",embeddedScopes:[]},"source.narrat":{id:"narrat",path:"narrat.tmLanguage.json",embeddedScopes:[]},"source.nextflow":{id:"nextflow",path:"nextflow.tmLanguage.json",embeddedScopes:[]},"source.nginx":{id:"nginx",path:"nginx.tmLanguage.json",embeddedScopes:["source.c","source.lua"]},"source.nim":{id:"nim",path:"nim.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.stylus","source.sass","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.tsx","source.ts","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.css.scss","source.swift","source.objc","source.css.less","source.json.comments","source.json","text.pug","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.coffee","source.clojure","source.batchfile","source.yaml","text.xml.xsl","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.ini","source.java","text.html.markdown","source.glsl","source.css","source.js","text.xml","text.html.basic","source.c"]},"source.nix":{id:"nix",path:"nix.tmLanguage.json",embeddedScopes:[]},"source.objc":{id:"objective-c",path:"objective-c.tmLanguage.json",embeddedScopes:[]},"source.objcpp":{id:"objective-cpp",path:"objective-cpp.tmLanguage.json",embeddedScopes:[]},"source.ocaml":{id:"ocaml",path:"ocaml.tmLanguage.json",embeddedScopes:[]},"source.pascal":{id:"pascal",path:"pascal.tmLanguage.json",embeddedScopes:[]},"source.perl":{id:"perl",path:"perl.tmLanguage.json",embeddedScopes:["source.java","source.sql","source.js","source.css","text.xml","text.html.basic"]},"source.php":{id:"php",path:"php.tmLanguage.json",embeddedScopes:["source.java","source.css","source.json","source.js","source.sql","text.xml","text.html.basic"]},"source.plsql.oracle":{id:"plsql",path:"plsql.tmLanguage.json",embeddedScopes:[]},"source.css.postcss":{id:"postcss",path:"postcss.tmLanguage.json",embeddedScopes:[]},"source.powerquery":{id:"powerquery",path:"powerquery.tmLanguage.json",embeddedScopes:[]},"source.powershell":{id:"powershell",path:"powershell.tmLanguage.json",embeddedScopes:[]},"source.prisma":{id:"prisma",path:"prisma.tmLanguage.json",embeddedScopes:[]},"source.prolog":{id:"prolog",path:"prolog.tmLanguage.json",embeddedScopes:[]},"source.proto":{id:"proto",path:"proto.tmLanguage.json",embeddedScopes:[]},"text.pug":{id:"pug",path:"pug.tmLanguage.json",embeddedScopes:["text.html.basic","source.coffee","source.stylus","source.css.scss","source.sass","source.css","source.js"]},"source.puppet":{id:"puppet",path:"puppet.tmLanguage.json",embeddedScopes:[]},"source.purescript":{id:"purescript",path:"purescript.tmLanguage.json",embeddedScopes:[]},"source.python":{id:"python",path:"python.tmLanguage.json",embeddedScopes:[]},"source.r":{id:"r",path:"r.tmLanguage.json",embeddedScopes:[]},"source.perl.6":{id:"raku",path:"raku.tmLanguage.json",embeddedScopes:[]},"text.aspnetcorerazor":{id:"razor",path:"razor.tmLanguage.json",embeddedScopes:["source.css","source.js","source.cs","text.html.basic"]},"source.reg":{id:"reg",path:"reg.tmLanguage.json",embeddedScopes:[]},"source.rel":{id:"rel",path:"rel.tmLanguage.json",embeddedScopes:[]},"source.riscv":{id:"riscv",path:"riscv.tmLanguage.json",embeddedScopes:[]},"source.rst":{id:"rst",path:"rst.tmLanguage.json",embeddedScopes:["source.java","source.lua","source.c","source.css","text.xml","text.html.basic","source.sql","source.glsl","source.ruby","source.cmake","source.yaml","source.shell","source.js","source.python","source.cpp"]},"source.ruby":{id:"ruby",path:"ruby.tmLanguage.json",embeddedScopes:["source.java","source.lua","source.shell","source.js","source.c","source.css","source.sql","text.xml","text.html.basic"]},"source.rust":{id:"rust",path:"rust.tmLanguage.json",embeddedScopes:[]},"source.sas":{id:"sas",path:"sas.tmLanguage.json",embeddedScopes:["source.sql"]},"source.sass":{id:"sass",path:"sass.tmLanguage.json",embeddedScopes:[]},"source.scala":{id:"scala",path:"scala.tmLanguage.json",embeddedScopes:[]},"source.scheme":{id:"scheme",path:"scheme.tmLanguage.json",embeddedScopes:[]},"source.css.scss":{id:"scss",path:"scss.tmLanguage.json",embeddedScopes:["source.css"]},"source.shaderlab":{id:"shaderlab",path:"shaderlab.tmLanguage.json",embeddedScopes:["source.hlsl"]},"source.shell":{id:"shellscript",path:"shellscript.tmLanguage.json",embeddedScopes:[]},"text.shell-session":{id:"shellsession",path:"shellsession.tmLanguage.json",embeddedScopes:["source.shell"]},"source.smalltalk":{id:"smalltalk",path:"smalltalk.tmLanguage.json",embeddedScopes:[]},"source.solidity":{id:"solidity",path:"solidity.tmLanguage.json",embeddedScopes:[]},"source.sparql":{id:"sparql",path:"sparql.tmLanguage.json",embeddedScopes:["source.turtle"]},"source.sql":{id:"sql",path:"sql.tmLanguage.json",embeddedScopes:[]},"source.ssh-config":{id:"ssh-config",path:"ssh-config.tmLanguage.json",embeddedScopes:[]},"source.stata":{id:"stata",path:"stata.tmLanguage.json",embeddedScopes:["source.sql"]},"source.stylus":{id:"stylus",path:"stylus.tmLanguage.json",embeddedScopes:[]},"source.svelte":{id:"svelte",path:"svelte.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.tsx","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.swift","source.objc","source.json.comments","source.json","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.clojure","source.batchfile","source.yaml","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","text.html.basic","text.html.markdown","text.pug","source.css.postcss","source.css.less","source.css.scss","source.css","source.sass","source.stylus","source.coffee","source.ts","source.js"]},"source.swift":{id:"swift",path:"swift.tmLanguage.json",embeddedScopes:[]},"source.systemverilog":{id:"system-verilog",path:"system-verilog.tmLanguage.json",embeddedScopes:[]},"source.tasl":{id:"tasl",path:"tasl.tmLanguage.json",embeddedScopes:[]},"source.tcl":{id:"tcl",path:"tcl.tmLanguage.json",embeddedScopes:[]},"text.tex":{id:"tex",path:"tex.tmLanguage.json",embeddedScopes:["source.r"]},"source.toml":{id:"toml",path:"toml.tmLanguage.json",embeddedScopes:[]},"source.tsx":{id:"tsx",path:"tsx.tmLanguage.json",embeddedScopes:[]},"source.turtle":{id:"turtle",path:"turtle.tmLanguage.json",embeddedScopes:[]},"text.html.twig":{id:"twig",path:"twig.tmLanguage.json",embeddedScopes:["source.java","source.lua","source.shell","source.c","source.json","source.sql","text.xml","text.html.basic","source.ruby","source.python","source.php","source.js","source.css"]},"source.txt":{id:"txt",path:"txt.tmLanguage.json",embeddedScopes:[]},"source.ts":{id:"typescript",path:"typescript.tmLanguage.json",embeddedScopes:[]},"source.v":{id:"v",path:"v.tmLanguage.json",embeddedScopes:[]},"source.asp.vb.net":{id:"vb",path:"vb.tmLanguage.json",embeddedScopes:[]},"source.verilog":{id:"verilog",path:"verilog.tmLanguage.json",embeddedScopes:[]},"source.vhdl":{id:"vhdl",path:"vhdl.tmLanguage.json",embeddedScopes:[]},"source.viml":{id:"viml",path:"viml.tmLanguage.json",embeddedScopes:[]},"text.html.vue-html":{id:"vue-html",path:"vue-html.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.swift","source.objc","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.coffee","source.clojure","source.batchfile","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","source.graphql","source.toml","source.yaml","source.json5","source.json.comments","source.json","source.tsx","source.js.jsx","source.ts","source.css.less","source.css.scss","source.css","source.sass","source.stylus","text.pug","text.html.markdown","text.html.basic","source.js","source.vue"]},"source.vue":{id:"vue",path:"vue.tmLanguage.json",embeddedScopes:["source.gnuplot","source.haskell","text.tex","source.glsl","text.bibtex","text.tex.latex","source.elixir","source.erlang","text.html.handlebars","source.dart","source.fsharp","source.cs","source.shell","source.scala","source.rust","source.julia","source.python","source.powershell","source.perl.6","source.swift","source.objc","source.groovy","source.go","text.git-rebase","text.git-commit","source.dockerfile","source.diff","source.cpp","source.c","source.coffee","source.clojure","source.batchfile","text.xml.xsl","text.xml","source.asp.vb.net","source.sql","source.php","source.ruby","source.r","source.perl","source.makefile","source.lua","source.java","source.ini","source.graphql","source.toml","source.yaml","source.json5","source.json.comments","source.json","source.tsx","source.js.jsx","source.ts","source.js","source.css.less","source.css.scss","source.css","source.sass","source.stylus","text.pug","text.html.markdown","text.html.basic"]},"source.vyper":{id:"vyper",path:"vyper.tmLanguage.json",embeddedScopes:[]},"source.wat":{id:"wasm",path:"wasm.tmLanguage.json",embeddedScopes:[]},"source.wenyan":{id:"wenyan",path:"wenyan.tmLanguage.json",embeddedScopes:[]},"source.wgsl":{id:"wgsl",path:"wgsl.tmLanguage.json",embeddedScopes:[]},"source.wolfram":{id:"wolfram",path:"wolfram.tmLanguage.json",embeddedScopes:[]},"text.xml":{id:"xml",path:"xml.tmLanguage.json",embeddedScopes:["source.java"]},"text.xml.xsl":{id:"xsl",path:"xsl.tmLanguage.json",embeddedScopes:["source.java","text.xml"]},"source.yaml":{id:"yaml",path:"yaml.tmLanguage.json",embeddedScopes:[]},"source.zenscript":{id:"zenscript",path:"zenscript.tmLanguage.json",embeddedScopes:[]}};var j={d:(e,t)=>{for(var s in t)j.o(t,s)&&!j.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},S={};j.d(S,{_X:()=>Qe,Bz:()=>He,ot:()=>ze,u:()=>De,jG:()=>A,Pn:()=>Ke});const w="undefined"!=typeof process&&!!process.env.VSCODE_TEXTMATE_DEBUG;var v;function L(e,t){const s=[],r=function(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,s=t.exec(e);return{next:()=>{if(!s)return null;const r=s[0];return s=t.exec(e),r}}}(e);let o=r.next();for(;null!==o;){let e=0;if(2===o.length&&":"===o.charAt(1)){switch(o.charAt(0)){case"R":e=1;break;case"L":e=-1;break;default:console.log(`Unknown priority ${o} in scope selector`)}o=r.next()}let t=c();if(s.push({matcher:t,priority:e}),","!==o)break;o=r.next()}return s;function n(){if("-"===o){o=r.next();const e=n();return t=>!!e&&!e(t)}if("("===o){o=r.next();const e=function(){const e=[];let t=c();for(;t&&(e.push(t),"|"===o||","===o);){do{o=r.next()}while("|"===o||","===o);t=c()}return t=>e.some((e=>e(t)))}();return")"===o&&(o=r.next()),e}if(C(o)){const e=[];do{e.push(o),o=r.next()}while(C(o));return s=>t(e,s)}return null}function c(){const e=[];let t=n();for(;t;)e.push(t),t=n();return t=>e.every((e=>e(t)))}}function C(e){return!!e&&!!e.match(/[\w\.:]+/)}function A(e){"function"==typeof e.dispose&&e.dispose()}function N(e){return Array.isArray(e)?function(e){let t=[];for(let s=0,r=e.length;s{for(let s in t)e[s]=t[s]})),e}function R(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return 0===t?e:~t==e.length-1?R(e.substring(0,e.length-1)):e.substr(1+~t)}!function(e){e.toBinaryStr=function(e){let t=e.toString(2);for(;t.length<32;)t="0"+t;return t},e.print=function(t){const s=e.getLanguageId(t),r=e.getTokenType(t),o=e.getFontStyle(t),n=e.getForeground(t),c=e.getBackground(t);console.log({languageId:s,tokenType:r,fontStyle:o,foreground:n,background:c})},e.getLanguageId=function(e){return(255&e)>>>0},e.getTokenType=function(e){return(768&e)>>>8},e.containsBalancedBrackets=function(e){return 0!=(1024&e)},e.getFontStyle=function(e){return(30720&e)>>>11},e.getForeground=function(e){return(16744448&e)>>>15},e.getBackground=function(e){return(4278190080&e)>>>24},e.set=function(t,s,r,o,n,c,a){let i=e.getLanguageId(t),u=e.getTokenType(t),l=e.containsBalancedBrackets(t)?1:0,h=e.getFontStyle(t),d=e.getForeground(t),p=e.getBackground(t);return 0!==s&&(i=s),8!==r&&(u=r),null!==o&&(l=o?1:0),-1!==n&&(h=n),0!==c&&(d=c),0!==a&&(p=a),(i<<0|u<<8|l<<10|h<<11|d<<15|p<<24)>>>0}}(v||(v={}));let E=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g;class I{static hasCaptures(e){return null!==e&&(E.lastIndex=0,E.test(e))}static replaceCaptures(e,t,s){return e.replace(E,((e,r,o,n)=>{let c=s[parseInt(r||o,10)];if(!c)return e;{let e=t.substring(c.start,c.end);for(;"."===e[0];)e=e.substring(1);switch(n){case"downcase":return e.toLowerCase();case"upcase":return e.toUpperCase();default:return e}}}))}}function B(e,t){return et?1:0}function O(e,t){if(null===e&&null===t)return 0;if(!e)return-1;if(!t)return 1;let s=e.length,r=t.length;if(s===r){for(let r=0;r`);return}const n=s.lookup(t);e instanceof $?H({baseGrammar:n,selfGrammar:o},r):z(e.ruleName,{baseGrammar:n,selfGrammar:o,repository:o.repository},r);const c=s.injections(e.scopeName);if(c)for(const e of c)r.add(new $(e))}function z(e,t,s){t.repository&&t.repository[e]&&Q([t.repository[e]],t,s)}function H(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&Q(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&Q(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function Q(e,t,s){for(const r of e){if(s.visitedRule.has(r))continue;s.visitedRule.add(r);const e=r.repository?P({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&Q(r.patterns,{...t,repository:e},s);const o=r.include;if(!o)continue;const n=Z(o);switch(n.kind){case 0:H({...t,selfGrammar:t.baseGrammar},s);break;case 1:H(t,s);break;case 2:z(n.ruleName,{...t,repository:e},s);break;case 3:case 4:const r=n.scopeName===t.selfGrammar.scopeName?t.selfGrammar:n.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(r){const o={baseGrammar:t.baseGrammar,selfGrammar:r,repository:e};4===n.kind?z(n.ruleName,o,s):H(o,s)}else 4===n.kind?s.add(new M(n.scopeName,n.ruleName)):s.add(new $(n.scopeName))}}}class K{constructor(){this.kind=0}}class V{constructor(){this.kind=1}}class Y{constructor(e){this.ruleName=e,this.kind=2}}class X{constructor(e){this.scopeName=e,this.kind=3}}class J{constructor(e,t){this.scopeName=e,this.ruleName=t,this.kind=4}}function Z(e){if("$base"===e)return new K;if("$self"===e)return new V;const t=e.indexOf("#");if(-1===t)return new X(e);if(0===t)return new Y(e.substring(1));{const s=e.substring(0,t),r=e.substring(t+1);return new J(s,r)}}const ee=/\\(\d+)/,te=/\\(\d+)/g;class se{constructor(e,t,s,r){this.$location=e,this.id=t,this._name=s||null,this._nameIsCapturing=I.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=I.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${R(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return this._nameIsCapturing&&null!==this._name&&null!==e&&null!==t?I.replaceCaptures(this._name,e,t):this._name}getContentName(e,t){return this._contentNameIsCapturing&&null!==this._contentName?I.replaceCaptures(this._contentName,e,t):this._contentName}}class re extends se{constructor(e,t,s,r,o){super(e,t,s,r),this.retokenizeCapturedWithRuleId=o}dispose(){}collectPatterns(e,t){throw new Error("Not supported!")}compile(e,t){throw new Error("Not supported!")}compileAG(e,t,s,r){throw new Error("Not supported!")}}class oe extends se{constructor(e,t,s,r,o){super(e,t,s,null),this._match=new ue(r,this.id),this.captures=o,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,s,r){return this._getCachedCompiledPatterns(e).compileAG(e,s,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new le,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}}class ne extends se{constructor(e,t,s,r,o){super(e,t,s,r),this.patterns=o.patterns,this.hasMissingPatterns=o.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(const s of this.patterns)e.getRule(s).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,s,r){return this._getCachedCompiledPatterns(e).compileAG(e,s,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new le,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}}class ce extends se{constructor(e,t,s,r,o,n,c,a,i,u){super(e,t,s,r),this._begin=new ue(o,this.id),this.beginCaptures=n,this._end=new ue(c||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=a,this.applyEndPatternLast=i||!1,this.patterns=u.patterns,this.hasMissingPatterns=u.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(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,s,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,s,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new le;for(const 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}}class ae extends se{constructor(e,t,s,r,o,n,c,a,i){super(e,t,s,r),this._begin=new ue(o,this.id),this.beginCaptures=n,this.whileCaptures=a,this._while=new ue(c,-2),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,s,r){return this._getCachedCompiledPatterns(e).compileAG(e,s,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new le;for(const 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,s,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,s,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new le,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||"￿"),this._cachedCompiledWhilePatterns}}class ie{static createCaptureRule(e,t,s,r,o){return e.registerRule((e=>new re(t,e,s,r,o)))}static getCompiledRuleId(e,t,s){return e.id||t.registerRule((r=>{if(e.id=r,e.match)return new oe(e.$vscodeTextmateLocation,e.id,e.name,e.match,ie._compileCaptures(e.captures,t,s));if(void 0===e.begin){e.repository&&(s=P({},s,e.repository));let r=e.patterns;return void 0===r&&e.include&&(r=[{include:e.include}]),new ne(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,ie._compilePatterns(r,t,s))}return e.while?new ae(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,ie._compileCaptures(e.beginCaptures||e.captures,t,s),e.while,ie._compileCaptures(e.whileCaptures||e.captures,t,s),ie._compilePatterns(e.patterns,t,s)):new ce(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,ie._compileCaptures(e.beginCaptures||e.captures,t,s),e.end,ie._compileCaptures(e.endCaptures||e.captures,t,s),e.applyEndPatternLast,ie._compilePatterns(e.patterns,t,s))})),e.id}static _compileCaptures(e,t,s){let r=[];if(e){let o=0;for(const t in e){if("$vscodeTextmateLocation"===t)continue;const e=parseInt(t,10);e>o&&(o=e)}for(let e=0;e<=o;e++)r[e]=null;for(const o in e){if("$vscodeTextmateLocation"===o)continue;const n=parseInt(o,10);let c=0;e[o].patterns&&(c=ie.getCompiledRuleId(e[o],t,s)),r[n]=ie.createCaptureRule(t,e[o].$vscodeTextmateLocation,e[o].name,e[o].contentName,c)}}return r}static _compilePatterns(e,t,s){let r=[];if(e)for(let o=0,n=e.length;oe.substring(t.start,t.end)));return te.lastIndex=0,this.source.replace(te,((e,t)=>T(s[parseInt(t,10)]||"")))}_buildAnchorCache(){let e,t,s,r,o=[],n=[],c=[],a=[];for(e=0,t=this.source.length;ee.source));this._cached=new he(e,t,this._items.map((e=>e.ruleId)))}return this._cached}compileAG(e,t,s){return this._hasAnchors?t?s?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,s)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,s)),this._anchorCache.A1_G0):s?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,s)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,s)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,s){let r=this._items.map((e=>e.resolveAnchors(t,s)));return new he(e,r,this._items.map((e=>e.ruleId)))}}class he{constructor(e,t,s){this.regExps=t,this.rules=s,this.scanner=e.createOnigScanner(t)}dispose(){"function"==typeof this.scanner.dispose&&this.scanner.dispose()}toString(){const e=[];for(let t=0,s=this.rules.length;tthis._root.match(e)))}static createFromRawTheme(e,t){return this.createFromParsedTheme(function(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,s=[],r=0;for(let e=0,o=t.length;e1&&(l=n.slice(0,n.length-1),l.reverse()),s[r++]=new fe(u,l,e,c,a,i)}}return s}(e),t)}static createFromParsedTheme(e,t){return function(e,t){e.sort(((e,t)=>{let s=B(e.scope,t.scope);return 0!==s?s:(s=O(e.parentScopes,t.parentScopes),0!==s?s:e.index-t.index)}));let s=0,r="#000000",o="#ffffff";for(;e.length>=1&&""===e[0].scope;){let t=e.shift();-1!==t.fontStyle&&(s=t.fontStyle),null!==t.foreground&&(r=t.foreground),null!==t.background&&(o=t.background)}let n=new be(t),c=new ge(s,n.getId(r),n.getId(o)),a=new _e(new ye(0,null,-1,0,0),[]);for(let t=0,s=e.length;tfunction(e,t){if(null===t)return!0;let s=0,r=t[s];for(;e;){if(me(e.scopeName,r)){if(s++,s===t.length)return!0;r=t[s]}e=e.parent}return!1}(e.parent,t.parentScopes)));return s?new ge(s.fontStyle,s.foreground,s.background):null}}class pe{constructor(e,t){this.parent=e,this.scopeName=t}static push(e,t){for(const s of t)e=new pe(e,s);return e}static from(...e){let t=null;for(let s=0;se?console.log("how did this happen?"):this.scopeDepth=e,-1!==t&&(this.fontStyle=t),0!==s&&(this.foreground=s),0!==r&&(this.background=r)}}class _e{constructor(e,t=[],s={}){this._mainRule=e,this._children=s,this._rulesWithParentScopes=t}static _sortBySpecificity(e){return 1===e.length||e.sort(this._cmpBySpecificity),e}static _cmpBySpecificity(e,t){if(e.scopeDepth===t.scopeDepth){const s=e.parentScopes,r=t.parentScopes;let o=null===s?0:s.length,n=null===r?0:r.length;if(o===n)for(let e=0;e{const t=this._scopeToLanguage(e),s=this._toStandardTokenType(e);return new xe(t,s)})),this._defaultAttributes=new xe(e,8),this._embeddedLanguagesMatcher=new je(Object.entries(t||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(e){return null===e?ke._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(e)}_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(e){const t=e.match(ke.STANDARD_TOKEN_TYPE_REGEXP);if(!t)return 8;switch(t[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}}ke._NULL_SCOPE_METADATA=new xe(0,0),ke.STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/;class je{constructor(e){if(0===e.length)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const t=e.map((([e,t])=>T(e)));t.sort(),t.reverse(),this.scopesRegExp=new RegExp(`^((${t.join(")|(")}))($|\\.)`,"")}}match(e){if(!this.scopesRegExp)return;const t=e.match(this.scopesRegExp);return t?this.values.get(t[1]):void 0}}class Se{constructor(e,t){this.stack=e,this.stoppedEarly=t}}function we(e,t,s,r,o,n,c,a){const i=t.content.length;let u=!1,l=-1;if(c){const c=function(e,t,s,r,o,n){let c=o.beginRuleCapturedEOL?0:-1;const a=[];for(let t=o;t;t=t.pop()){const s=t.getRule(e);s instanceof ae&&a.push({rule:s,stack:t})}for(let i=a.pop();i;i=a.pop()){const{ruleScanner:a,findOptions:u}=Le(i.rule,e,i.stack.endRule,s,r===c),l=a.findNextMatchSync(t,r,u);if(w&&(console.log(" scanning for while rule"),console.log(a.toString())),!l){w&&console.log(" popping "+i.rule.debugName+" - "+i.rule.debugWhileRegExp),o=i.stack.pop();break}if(-2!==l.ruleId){o=i.stack.pop();break}l.captureIndices&&l.captureIndices.length&&(n.produce(i.stack,l.captureIndices[0].start),Ce(e,t,s,i.stack,n,i.rule.whileCaptures,l.captureIndices),n.produce(i.stack,l.captureIndices[0].end),c=l.captureIndices[0].end,l.captureIndices[0].end>r&&(r=l.captureIndices[0].end,s=!1))}return{stack:o,linePos:r,anchorPosition:c,isFirstLine:s}}(e,t,s,r,o,n);o=c.stack,r=c.linePos,s=c.isFirstLine,l=c.anchorPosition}const h=Date.now();for(;!u;){if(0!==a&&Date.now()-h>a)return new Se(o,!0);d()}return new Se(o,!1);function d(){w&&(console.log(""),console.log(`@@scanNext ${r}: |${t.content.substr(r).replace(/\n$/,"\\n")}|`));const c=function(e,t,s,r,o,n){const c=function(e,t,s,r,o,n){const c=o.getRule(e),{ruleScanner:a,findOptions:i}=ve(c,e,o.endRule,s,r===n);let u=0;w&&(u=q());const l=a.findNextMatchSync(t,r,i);if(w){const e=q()-u;e>5&&console.warn(`Rule ${c.debugName} (${c.id}) matching took ${e} against '${t}'`),console.log(` scanning for (linePos: ${r}, anchorPosition: ${n})`),console.log(a.toString()),l&&console.log(`matched rule id: ${l.ruleId} from ${l.captureIndices[0].start} to ${l.captureIndices[0].end}`)}return l?{captureIndices:l.captureIndices,matchedRuleId:l.ruleId}:null}(e,t,s,r,o,n),a=e.getInjections();if(0===a.length)return c;const i=function(e,t,s,r,o,n,c){let a,i=Number.MAX_VALUE,u=null,l=0;const h=n.contentNameScopesList.getScopeNames();for(let n=0,d=e.length;n=i)&&(i=b,u=f.captureIndices,a=f.ruleId,l=d.priority,i===o))break}return u?{priorityMatch:-1===l,captureIndices:u,matchedRuleId:a}:null}(a,e,t,s,r,o,n);if(!i)return c;if(!c)return i;const u=c.captureIndices[0].start,l=i.captureIndices[0].start;return l0)&&a[0].end>r;if(-1===h){const c=o.getRule(e);w&&console.log(" popping "+c.debugName+" - "+c.debugEndRegExp),n.produce(o,a[0].start),o=o.withContentNameScopesList(o.nameScopesList),Ce(e,t,s,o,n,c.endCaptures,a),n.produce(o,a[0].end);const h=o;if(o=o.parent,l=h.getAnchorPos(),!d&&h.getEnterPos()===r)return w&&console.error("[1] - Grammar is in an endless loop - Grammar pushed & popped a rule without advancing"),o=h,n.produce(o,i),void(u=!0)}else{const c=e.getRule(h);n.produce(o,a[0].start);const p=o,m=c.getName(t.content,a),g=o.contentNameScopesList.pushAttributed(m,e);if(o=o.push(h,r,l,a[0].end===i,null,g,g),c instanceof ce){const r=c;w&&console.log(" pushing "+r.debugName+" - "+r.debugBeginRegExp),Ce(e,t,s,o,n,r.beginCaptures,a),n.produce(o,a[0].end),l=a[0].end;const h=r.getContentName(t.content,a),m=g.pushAttributed(h,e);if(o=o.withContentNameScopesList(m),r.endHasBackReferences&&(o=o.withEndRule(r.getEndWithResolvedBackReferences(t.content,a))),!d&&p.hasSameRuleAs(o))return w&&console.error("[2] - Grammar is in an endless loop - Grammar pushed the same rule without advancing"),o=o.pop(),n.produce(o,i),void(u=!0)}else if(c instanceof ae){const r=c;w&&console.log(" pushing "+r.debugName),Ce(e,t,s,o,n,r.beginCaptures,a),n.produce(o,a[0].end),l=a[0].end;const h=r.getContentName(t.content,a),m=g.pushAttributed(h,e);if(o=o.withContentNameScopesList(m),r.whileHasBackReferences&&(o=o.withEndRule(r.getWhileWithResolvedBackReferences(t.content,a))),!d&&p.hasSameRuleAs(o))return w&&console.error("[3] - Grammar is in an endless loop - Grammar pushed the same rule without advancing"),o=o.pop(),n.produce(o,i),void(u=!0)}else{const r=c;if(w&&console.log(" matched "+r.debugName+" - "+r.debugMatchRegExp),Ce(e,t,s,o,n,r.captures,a),n.produce(o,a[0].end),o=o.pop(),!d)return w&&console.error("[4] - Grammar is in an endless loop - Grammar is not advancing, nor is it pushing/popping"),o=o.safePop(),n.produce(o,i),void(u=!0)}}a[0].end>r&&(r=a[0].end,s=!1)}}function ve(e,t,s,r,o){return{ruleScanner:e.compileAG(t,s,r,o),findOptions:0}}function Le(e,t,s,r,o){return{ruleScanner:e.compileWhileAG(t,s,r,o),findOptions:0}}function Ce(e,t,s,r,o,n,c){if(0===n.length)return;const a=t.content,i=Math.min(n.length,c.length),u=[],l=c[0].end;for(let t=0;tl)break;for(;u.length>0&&u[u.length-1].endPos<=h.start;)o.produceFromScopes(u[u.length-1].scopes,u[u.length-1].endPos),u.pop();if(u.length>0?o.produceFromScopes(u[u.length-1].scopes,h.start):o.produce(r,h.start),i.retokenizeCapturedWithRuleId){const t=i.getName(a,c),n=r.contentNameScopesList.pushAttributed(t,e),u=i.getContentName(a,c),l=n.pushAttributed(u,e),d=r.push(i.retokenizeCapturedWithRuleId,h.start,-1,!1,null,n,l),p=e.createOnigString(a.substring(0,h.end));we(e,p,s&&0===h.start,h.start,d,o,!1,0),A(p);continue}const d=i.getName(a,c);if(null!==d){const t=(u.length>0?u[u.length-1].scopes:r.contentNameScopesList).pushAttributed(d,e);u.push(new Ae(t,h.end))}}for(;u.length>0;)o.produceFromScopes(u[u.length-1].scopes,u[u.length-1].endPos),u.pop()}class Ae{constructor(e,t){this.scopes=e,this.endPos=t}}function Ne(e,t,s,r,o){const n=L(t,Pe),c=ie.getCompiledRuleId(s,r,o.repository);for(const s of n)e.push({debugSelector:t,matcher:s.matcher,ruleId:c,grammar:o,priority:s.priority})}function Pe(e,t){if(t.length{for(let r=s;rs&&e.substr(0,s)===t&&"."===e[s]}class Ee{constructor(e,t,s,r,o,n,c,a){if(this._rootScopeName=e,this.balancedBracketSelectors=n,this._onigLib=a,this._basicScopeAttributesProvider=new ke(s,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=c,this._grammar=Ie(t,null),this._injections=null,this._tokenTypeMatchers=[],o)for(const e of Object.keys(o)){const t=L(e,Pe);for(const s of t)this._tokenTypeMatchers.push({matcher:s.matcher,type:o[e]})}}get themeProvider(){return this._grammarRepository}dispose(){for(const e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){const e=[],t=this._rootScopeName,s=(e=>e===this._rootScopeName?this._grammar:this.getExternalGrammar(e))(t);if(s){const r=s.injections;if(r)for(let t in r)Ne(e,t,r[t],this,s);const o=this._grammarRepository.injections(t);o&&o.forEach((t=>{const s=this.getExternalGrammar(t);if(s){const t=s.injectionSelector;t&&Ne(e,t,s,this,s)}}))}return e.sort(((e,t)=>e.priority-t.priority)),e}getInjections(){if(null===this._injections&&(this._injections=this._collectInjections(),w&&this._injections.length>0)){console.log(`Grammar ${this._rootScopeName} contains the following injections:`);for(const e of this._injections)console.log(` - ${e.debugSelector}`)}return this._injections}registerRule(e){const t=++this._lastRuleId,s=e(t);return this._ruleId2desc[t]=s,s}getRule(e){return this._ruleId2desc[e]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){const s=this._grammarRepository.lookup(e);if(s)return this._includedGrammars[e]=Ie(s,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,s=0){const r=this._tokenize(e,t,!1,s);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(e,t,s=0){const r=this._tokenize(e,t,!0,s);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(e,t,s,r){let o;if(-1===this._rootId&&(this._rootId=ie.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections()),t&&t!==Oe.NULL)o=!1,t.reset();else{o=!0;const e=this._basicScopeAttributesProvider.getDefaultAttributes(),s=this.themeProvider.getDefaults(),r=v.set(0,e.languageId,e.tokenType,null,s.fontStyle,s.foregroundId,s.backgroundId),n=this.getRule(this._rootId).getName(null,null);let c;c=n?Be.createRootAndLookUpScopeName(n,r,this):Be.createRoot("unknown",r),t=new Oe(null,this._rootId,-1,-1,!1,null,c,c)}e+="\n";const n=this.createOnigString(e),c=n.content.length,a=new Te(s,e,this._tokenTypeMatchers,this.balancedBracketSelectors),i=we(this,n,o,0,t,a,!0,r);return A(n),{lineLength:c,lineTokens:a,ruleStack:i.stack,stoppedEarly:i.stoppedEarly}}}function Ie(e,t){return(e=N(e)).repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}class Be{constructor(e,t,s){this.parent=e,this.scopePath=t,this.tokenAttributes=s}static fromExtension(e,t){let s=e,r=e?.scopePath??null;for(const e of t)r=pe.push(r,e.scopeNames),s=new Be(s,r,e.encodedTokenAttributes);return s}static createRoot(e,t){return new Be(null,new pe(null,e),t)}static createRootAndLookUpScopeName(e,t,s){const r=s.getMetadataForScope(e),o=new pe(null,e),n=s.themeProvider.themeMatch(o),c=Be.mergeAttributes(t,r,n);return new Be(null,o,c)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(e){return Be.equals(this,e)}static equals(e,t){for(;;){if(e===t)return!0;if(!e&&!t)return!0;if(!e||!t)return!1;if(e.scopeName!==t.scopeName||e.tokenAttributes!==t.tokenAttributes)return!1;e=e.parent,t=t.parent}}static mergeAttributes(e,t,s){let r=-1,o=0,n=0;return null!==s&&(r=s.fontStyle,o=s.foregroundId,n=s.backgroundId),v.set(e,t.languageId,t.tokenType,null,r,o,n)}pushAttributed(e,t){if(null===e)return this;if(-1===e.indexOf(" "))return Be._pushAttributed(this,e,t);const s=e.split(/ /g);let r=this;for(const e of s)r=Be._pushAttributed(r,e,t);return r}static _pushAttributed(e,t,s){const r=s.getMetadataForScope(t),o=e.scopePath.push(t),n=s.themeProvider.themeMatch(o),c=Be.mergeAttributes(e.tokenAttributes,r,n);return new Be(e,o,c)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){const t=[];let s=this;for(;s&&s!==e;)t.push({encodedTokenAttributes:s.tokenAttributes,scopeNames:s.scopePath.getExtensionIfDefined(s.parent?.scopePath??null)}),s=s.parent;return s===e?t.reverse():void 0}}class Oe{constructor(e,t,s,r,o,n,c,a){this.parent=e,this.ruleId=t,this.beginRuleCapturedEOL=o,this.endRule=n,this.nameScopesList=c,this.contentNameScopesList=a,this._stackElementBrand=void 0,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=s,this._anchorPos=r}equals(e){return null!==e&&Oe._equals(this,e)}static _equals(e,t){return e===t||!!this._structuralEquals(e,t)&&Be.equals(e.contentNameScopesList,t.contentNameScopesList)}static _structuralEquals(e,t){for(;;){if(e===t)return!0;if(!e&&!t)return!0;if(!e||!t)return!1;if(e.depth!==t.depth||e.ruleId!==t.ruleId||e.endRule!==t.endRule)return!1;e=e.parent,t=t.parent}}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){Oe._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(e,t,s,r,o,n,c){return new Oe(this,e,t,s,r,o,n,c)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){const e=[];return this._writeString(e,0),"["+e.join(",")+"]"}_writeString(e,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(e){return this.endRule===e?this:new Oe(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,e,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let t=this;for(;t&&t._enterPos===e._enterPos;){if(t.ruleId===e.ruleId)return!0;t=t.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(e,t){const s=Be.fromExtension(e?.nameScopesList??null,t.nameScopesList);return new Oe(e,t.ruleId,t.enterPos??-1,t.anchorPos??-1,t.beginRuleCapturedEOL,t.endRule,s,Be.fromExtension(s,t.contentNameScopesList))}}Oe.NULL=new Oe(null,0,0,0,!1,null,null,null);class Ge{constructor(e,t){this.allowAny=!1,this.balancedBracketScopes=e.flatMap((e=>"*"===e?(this.allowAny=!0,[]):L(e,Pe).map((e=>e.matcher)))),this.unbalancedBracketScopes=t.flatMap((e=>L(e,Pe).map((e=>e.matcher))))}get matchesAlways(){return this.allowAny&&0===this.unbalancedBracketScopes.length}get matchesNever(){return 0===this.balancedBracketScopes.length&&!this.allowAny}match(e){for(const t of this.unbalancedBracketScopes)if(t(e))return!1;for(const t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}}class Te{constructor(e,t,s,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=s,this._lineText=w?t:null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let s=e?.tokenAttributes??0,r=!1;if(this.balancedBracketSelectors?.matchesAlways&&(r=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const t=e?.getScopeNames()??[];for(const e of this._tokenTypeOverrides)e.matcher(t)&&(s=v.set(s,0,e.type,null,-1,0,0));this.balancedBracketSelectors&&(r=this.balancedBracketSelectors.match(t))}if(r&&(s=v.set(s,0,8,r,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===s)return void(this._lastTokenEndIndex=t);if(w){const s=e?.getScopeNames()??[];console.log(" token: |"+this._lineText.substring(this._lastTokenEndIndex,t).replace(/\n$/,"\\n")+"|");for(let e=0;e0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),0===this._tokens.length&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),0===this._binaryTokens.length&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);const s=new Uint32Array(this._binaryTokens.length);for(let e=0,t=this._binaryTokens.length;e0;)10===e.charCodeAt(o)?(o++,n++,c=0):(o++,c++),t--}function i(e){null===s?o=e:a(e-o)}function u(){for(;o0&&65279===e.charCodeAt(0)&&(o=1);let p=0,m=null,g=[],f=[],b=null;function y(e,t){g.push(p),f.push(m),p=e,m=t}function _(){if(0===g.length)return x("illegal state stack");p=g.pop(),m=f.pop()}function x(t){throw new Error("Near offset "+o+": "+t+" ~~~"+e.substr(o,50)+"~~~")}const k=function(){if(null===b)return x("missing ");let e={};null!==s&&(e[s]={filename:t,line:n,char:c}),m[b]=e,b=null,y(1,e)},j=function(){if(null===b)return x("missing ");let e=[];m[b]=e,b=null,y(2,e)},S=function(){let e={};null!==s&&(e[s]={filename:t,line:n,char:c}),m.push(e),y(1,e)},w=function(){let e=[];m.push(e),y(2,e)};function v(){if(1!==p)return x("unexpected ");_()}function L(){return 1===p||2!==p?x("unexpected "):void _()}function C(e){if(1===p){if(null===b)return x("missing ");m[b]=e,b=null}else 2===p?m.push(e):m=e}function A(e){if(isNaN(e))return x("cannot parse float");if(1===p){if(null===b)return x("missing ");m[b]=e,b=null}else 2===p?m.push(e):m=e}function N(e){if(isNaN(e))return x("cannot parse integer");if(1===p){if(null===b)return x("missing ");m[b]=e,b=null}else 2===p?m.push(e):m=e}function P(e){if(1===p){if(null===b)return x("missing ");m[b]=e,b=null}else 2===p?m.push(e):m=e}function R(e){if(1===p){if(null===b)return x("missing ");m[b]=e,b=null}else 2===p?m.push(e):m=e}function E(e){if(1===p){if(null===b)return x("missing ");m[b]=e,b=null}else 2===p?m.push(e):m=e}function I(){let e=d(">"),t=!1;return 47===e.charCodeAt(e.length-1)&&(t=!0,e=e.substring(0,e.length-1)),{name:e.trim(),isClosed:t}}function B(e){if(e.isClosed)return"";let t=d(""),t.replace(/&#([0-9]+);/g,(function(e,t){return String.fromCodePoint(parseInt(t,10))})).replace(/&#x([0-9a-f]+);/g,(function(e,t){return String.fromCodePoint(parseInt(t,16))})).replace(/&|<|>|"|'/g,(function(e){switch(e){case"&":return"&";case"<":return"<";case">":return">";case""":return'"';case"'":return"'"}return e}))}for(;o=r));){const i=e.charCodeAt(o);if(a(1),60!==i)return x("expected <");if(o>=r)return x("unexpected end of input");const d=e.charCodeAt(o);if(63===d){a(1),h("?>");continue}if(33===d){if(a(1),l("--")){h("--\x3e");continue}h(">");continue}if(47===d){if(a(1),u(),l("plist")){h(">");continue}if(l("dict")){h(">"),v();continue}if(l("array")){h(">"),L();continue}return x("unexpected closed tag")}let g=I();switch(g.name){case"dict":1===p?k():2===p?S():(m={},null!==s&&(m[s]={filename:t,line:n,char:c}),y(1,m)),g.isClosed&&v();continue;case"array":1===p?j():2===p?w():(m=[],y(2,m)),g.isClosed&&L();continue;case"key":O=B(g),1!==p?x("unexpected "):null!==b?x("too many "):b=O;continue;case"string":C(B(g));continue;case"real":A(parseFloat(B(g)));continue;case"integer":N(parseInt(B(g),10));continue;case"date":P(new Date(B(g)));continue;case"data":R(B(g));continue;case"true":B(g),E(!0);continue;case"false":B(g),E(!1);continue}if(!/^plist/.test(g.name))return x("unexpected opened tag "+g.name)}var O;return m}function qe(e,t){throw new Error("Near offset "+e.pos+": "+t+" ~~~"+e.source.substr(e.pos,50)+"~~~")}class $e{constructor(e){this.source=e,this.pos=0,this.len=e.length,this.line=1,this.char=0}}class Me{constructor(){this.value=null,this.type=0,this.offset=-1,this.len=-1,this.line=-1,this.char=-1}toLocation(e){return{filename:e,line:this.line,char:this.char}}}function We(e,t){t.value=null,t.type=0,t.offset=-1,t.len=-1,t.line=-1,t.char=-1;let s,r=e.source,o=e.pos,n=e.len,c=e.line,a=e.char;for(;;){if(o>=n)return!1;if(s=r.charCodeAt(o),32!==s&&9!==s&&13!==s){if(10!==s)break;o++,c++,a=0}else o++,a++}if(t.offset=o,t.line=c,t.char=a,34===s){for(t.type=1,o++,a++;;){if(o>=n)return!1;if(s=r.charCodeAt(o),o++,a++,92!==s){if(34===s)break}else o++,a++}t.value=r.substring(t.offset+1,o-1).replace(/\\u([0-9A-Fa-f]{4})/g,((e,t)=>String.fromCodePoint(parseInt(t,16)))).replace(/\\(.)/g,((t,s)=>{switch(s){case'"':return'"';case"\\":return"\\";case"/":return"/";case"b":return"\b";case"f":return"\f";case"n":return"\n";case"r":return"\r";case"t":return"\t";default:qe(e,"invalid escape sequence")}throw new Error("unreachable")}))}else if(91===s)t.type=2,o++,a++;else if(123===s)t.type=3,o++,a++;else if(93===s)t.type=4,o++,a++;else if(125===s)t.type=5,o++,a++;else if(58===s)t.type=6,o++,a++;else if(44===s)t.type=7,o++,a++;else if(110===s){if(t.type=8,o++,a++,s=r.charCodeAt(o),117!==s)return!1;if(o++,a++,s=r.charCodeAt(o),108!==s)return!1;if(o++,a++,s=r.charCodeAt(o),108!==s)return!1;o++,a++}else if(116===s){if(t.type=9,o++,a++,s=r.charCodeAt(o),114!==s)return!1;if(o++,a++,s=r.charCodeAt(o),117!==s)return!1;if(o++,a++,s=r.charCodeAt(o),101!==s)return!1;o++,a++}else if(102===s){if(t.type=10,o++,a++,s=r.charCodeAt(o),97!==s)return!1;if(o++,a++,s=r.charCodeAt(o),108!==s)return!1;if(o++,a++,s=r.charCodeAt(o),115!==s)return!1;if(o++,a++,s=r.charCodeAt(o),101!==s)return!1;o++,a++}else for(t.type=11;;){if(o>=n)return!1;if(s=r.charCodeAt(o),!(46===s||s>=48&&s<=57||101===s||69===s||45===s||43===s))break;o++,a++}return t.len=o-t.offset,null===t.value&&(t.value=r.substr(t.offset,t.len)),e.pos=o,e.line=c,e.char=a,!0}class Ue{constructor(e,t){this._onigLibPromise=t,this._grammars=new Map,this._rawGrammars=new Map,this._injectionGrammars=new Map,this._theme=e}dispose(){for(const e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}async grammarForScopeName(e,t,s,r,o){if(!this._grammars.has(e)){let n=this._rawGrammars.get(e);if(!n)return null;this._grammars.set(e,function(e,t,s,r,o,n,c,a){return new Ee(e,t,s,r,o,n,c,a)}(e,n,t,s,r,o,this,await this._onigLibPromise))}return this._grammars.get(e)}}function De(e,t){let s=0;const r=[];let o=e,n=t;for(;o!==n;)o&&(!n||o.depth>=n.depth)?(s++,o=o.parent):(r.push(n.toStateStackFrame()),n=n.parent);return{pops:s,newFrames:r.reverse()}}function ze(e,t){let s=e;for(let e=0;e0;)await Promise.all(n.Q.map((e=>this._loadSingleGrammar(e.scopeName)))),n.processQueue();return this._grammarForScopeName(e,t,s,r,o)}async _loadSingleGrammar(e){return this._ensureGrammarCache.has(e)||this._ensureGrammarCache.set(e,this._doLoadSingleGrammar(e)),this._ensureGrammarCache.get(e)}async _doLoadSingleGrammar(e){const t=await this._options.loadGrammar(e);if(t){const s="function"==typeof this._options.getInjections?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(t,s)}}async addGrammar(e,t=[],s=0,r=null){return this._syncRegistry.addGrammar(e,t),await this._grammarForScopeName(e.scopeName,s,r)}_grammarForScopeName(e,t=0,s=null,r=null,o=null){return this._syncRegistry.grammarForScopeName(e,t,s,r,o)}}const Qe=Oe.NULL,Ke=function(e,t=null){return null!==t&&/\.json$/.test(t)?(s=e,w?function(e,t,s){let r=new $e(e),o=new Me,n=0,c=null,a=[],i=[];function u(){a.push(n),i.push(c)}function l(){n=a.pop(),c=i.pop()}function h(e){qe(r,e)}for(;We(r,o);){if(0===n){if(null!==c&&h("too many constructs in root"),3===o.type){c={},c.$vscodeTextmateLocation=o.toLocation(t),u(),n=1;continue}if(2===o.type){c=[],u(),n=4;continue}h("unexpected token in root")}if(2===n){if(5===o.type){l();continue}if(7===o.type){n=3;continue}h("expected , or }")}if(1===n||3===n){if(1===n&&5===o.type){l();continue}if(1===o.type){let e=o.value;if(We(r,o)&&6===o.type||h("expected colon"),We(r,o)||h("expected value"),n=2,1===o.type){c[e]=o.value;continue}if(8===o.type){c[e]=null;continue}if(9===o.type){c[e]=!0;continue}if(10===o.type){c[e]=!1;continue}if(11===o.type){c[e]=parseFloat(o.value);continue}if(2===o.type){let t=[];c[e]=t,u(),n=4,c=t;continue}if(3===o.type){let s={};s.$vscodeTextmateLocation=o.toLocation(t),c[e]=s,u(),n=1,c=s;continue}}h("unexpected token in dict")}if(5===n){if(4===o.type){l();continue}if(7===o.type){n=6;continue}h("expected , or ]")}if(4===n||6===n){if(4===n&&4===o.type){l();continue}if(n=5,1===o.type){c.push(o.value);continue}if(8===o.type){c.push(null);continue}if(9===o.type){c.push(!0);continue}if(10===o.type){c.push(!1);continue}if(11===o.type){c.push(parseFloat(o.value));continue}if(2===o.type){let e=[];c.push(e),u(),n=4,c=e;continue}if(3===o.type){let e={};e.$vscodeTextmateLocation=o.toLocation(t),c.push(e),u(),n=1,c=e;continue}h("unexpected token in array")}h("unknown state")}return 0!==i.length&&h("unclosed constructs"),c}(s,t):JSON.parse(s)):function(e,t){return w?function(e,t,s){return Fe(e,t,"$vscodeTextmateLocation")}(e,t):function(e){return Fe(e,null,null)}(e)}(e,t);var s};var Ve=S.Bz,Ye=("undefined"!=typeof document&&document.currentScript&&document.currentScript.src,function(e){var t,s,r=void 0!==(e=e||{})?e:{};r.ready=new Promise((function(e,r){t=e,s=r}));var o,n=Object.assign({},r),c=!1;o=function(e){let t;return"function"==typeof readbuffer?new Uint8Array(readbuffer(e)):(t=read(e,"binary"),"object"==typeof t||S(s),t);var s},"undefined"!=typeof scriptArgs&&scriptArgs,"undefined"!=typeof onig_print&&("undefined"==typeof console&&(console={}),console.log=onig_print,console.warn=console.error="undefined"!=typeof printErr?printErr:onig_print);var a,i,u=r.print||console.log.bind(console),l=r.printErr||console.warn.bind(console);Object.assign(r,n),n=null,r.arguments&&r.arguments,r.thisProgram&&r.thisProgram,r.quit&&r.quit,r.wasmBinary&&(a=r.wasmBinary),r.noExitRuntime,"object"!=typeof WebAssembly&&S("no native wasm support detected");var h,d,p,m=!1,g="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function f(e,t,s){for(var r=t+s,o=t;e[o]&&!(o>=r);)++o;if(o-t>16&&e.buffer&&g)return g.decode(e.subarray(t,o));for(var n="";t>10,56320|1023&u)}}else n+=String.fromCharCode((31&c)<<6|a)}else n+=String.fromCharCode(c)}return n}function b(e){h=e,r.HEAP8=new Int8Array(e),r.HEAP16=new Int16Array(e),r.HEAP32=new Int32Array(e),r.HEAPU8=d=new Uint8Array(e),r.HEAPU16=new Uint16Array(e),r.HEAPU32=p=new Uint32Array(e),r.HEAPF32=new Float32Array(e),r.HEAPF64=new Float64Array(e)}r.INITIAL_MEMORY;var y=[],_=[],x=[],k=0,j=null;function S(e){r.onAbort&&r.onAbort(e),l(e="Aborted("+e+")"),m=!0,e+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(e);throw s(t),t}var w,v,L,C="data:application/octet-stream;base64,";function A(e){return e.startsWith(C)}function N(e){try{if(e==w&&a)return new Uint8Array(a);if(o)return o(e);throw"both async and sync fetching of the wasm failed"}catch(e){S(e)}}function P(e){for(;e.length>0;)e.shift()(r)}function R(e){try{return i.grow(e-h.byteLength+65535>>>16),b(i.buffer),1}catch(e){}}A(w="onig.wasm")||(v=w,w=r.locateFile?r.locateFile(v,""):""+v),L="undefined"!=typeof dateNow?dateNow:()=>performance.now();var E=[null,[],[]];function I(e,t){var s=E[e];0===t||10===t?((1===e?u:l)(f(s,0)),s.length=0):s.push(t)}var B,O={emscripten_get_now:L,emscripten_memcpy_big:function(e,t,s){d.copyWithin(e,t,t+s)},emscripten_resize_heap:function(e){var t=d.length,s=2147483648;if((e>>>=0)>s)return!1;let r=(e,t)=>e+(t-e%t)%t;for(var o=1;o<=4;o*=2){var n=t*(1+.2/o);if(n=Math.min(n,e+100663296),R(Math.min(s,r(Math.max(e,n),65536))))return!0}return!1},fd_write:function(e,t,s,r){for(var o=0,n=0;n>2],a=p[t+4>>2];t+=8;for(var i=0;i>2]=o,0}};function G(e){function s(){B||(B=!0,r.calledRun=!0,m||(P(_),t(r),r.onRuntimeInitialized&&r.onRuntimeInitialized(),function(){if(r.postRun)for("function"==typeof r.postRun&&(r.postRun=[r.postRun]);r.postRun.length;)e=r.postRun.shift(),x.unshift(e);var e;P(x)}()))}k>0||(function(){if(r.preRun)for("function"==typeof r.preRun&&(r.preRun=[r.preRun]);r.preRun.length;)e=r.preRun.shift(),y.unshift(e);var e;P(y)}(),k>0||(r.setStatus?(r.setStatus("Running..."),setTimeout((function(){setTimeout((function(){r.setStatus("")}),1),s()}),1)):s()))}if(function(){var e={env:O,wasi_snapshot_preview1:O};function t(e,t){var s,o=e.exports;r.asm=o,b((i=r.asm.memory).buffer),r.asm.__indirect_function_table,s=r.asm.__wasm_call_ctors,_.unshift(s),function(e){if(k--,r.monitorRunDependencies&&r.monitorRunDependencies(k),0==k&&j){var t=j;j=null,t()}}()}function o(e){t(e.instance)}function n(t){return(!a&&c&&"function"==typeof fetch?fetch(w,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+w+"'";return e.arrayBuffer()})).catch((function(){return N(w)})):Promise.resolve().then((function(){return N(w)}))).then((function(t){return WebAssembly.instantiate(t,e)})).then((function(e){return e})).then(t,(function(e){l("failed to asynchronously prepare wasm: "+e),S(e)}))}if(k++,r.monitorRunDependencies&&r.monitorRunDependencies(k),r.instantiateWasm)try{return r.instantiateWasm(e,t)}catch(e){l("Module.instantiateWasm callback failed with error: "+e),s(e)}(a||"function"!=typeof WebAssembly.instantiateStreaming||A(w)||"function"!=typeof fetch?n(o):fetch(w,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,e).then(o,(function(e){return l("wasm streaming compile failed: "+e),l("falling back to ArrayBuffer instantiation"),n(o)}))}))).catch(s)}(),r.___wasm_call_ctors=function(){return(r.___wasm_call_ctors=r.asm.__wasm_call_ctors).apply(null,arguments)},r.___errno_location=function(){return(r.___errno_location=r.asm.__errno_location).apply(null,arguments)},r._omalloc=function(){return(r._omalloc=r.asm.omalloc).apply(null,arguments)},r._ofree=function(){return(r._ofree=r.asm.ofree).apply(null,arguments)},r._getLastOnigError=function(){return(r._getLastOnigError=r.asm.getLastOnigError).apply(null,arguments)},r._createOnigScanner=function(){return(r._createOnigScanner=r.asm.createOnigScanner).apply(null,arguments)},r._freeOnigScanner=function(){return(r._freeOnigScanner=r.asm.freeOnigScanner).apply(null,arguments)},r._findNextOnigScannerMatch=function(){return(r._findNextOnigScannerMatch=r.asm.findNextOnigScannerMatch).apply(null,arguments)},r._findNextOnigScannerMatchDbg=function(){return(r._findNextOnigScannerMatchDbg=r.asm.findNextOnigScannerMatchDbg).apply(null,arguments)},r.stackSave=function(){return(r.stackSave=r.asm.stackSave).apply(null,arguments)},r.stackRestore=function(){return(r.stackRestore=r.asm.stackRestore).apply(null,arguments)},r.stackAlloc=function(){return(r.stackAlloc=r.asm.stackAlloc).apply(null,arguments)},r.dynCall_jiji=function(){return(r.dynCall_jiji=r.asm.dynCall_jiji).apply(null,arguments)},r.UTF8ToString=function(e,t){return e?f(d,e,t):""},j=function e(){B||G(),B||(j=e)},r.preInit)for("function"==typeof r.preInit&&(r.preInit=[r.preInit]);r.preInit.length>0;)r.preInit.pop()();return G(),e.ready});let Xe=null;class Je{static _utf8ByteLength(e){let t=0;for(let s=0,r=e.length;s=55296&&o<=56319&&s+1=56320&&t<=57343&&(n=65536+(o-55296<<10)|t-56320,c=!0)}t+=n<=127?1:n<=2047?2:n<=65535?3:4,c&&s++}return t}constructor(e){const t=e.length,s=Je._utf8ByteLength(e),r=s!==t,o=r?new Uint32Array(t+1):null;r&&(o[t]=s);const n=r?new Uint32Array(s+1):null;r&&(n[s]=t);const c=new Uint8Array(s);let a=0;for(let s=0;s=55296&&i<=56319&&s+1=56320&&t<=57343&&(u=65536+(i-55296<<10)|t-56320,l=!0)}r&&(o[s]=a,l&&(o[s+1]=a),u<=127?n[a+0]=s:u<=2047?(n[a+0]=s,n[a+1]=s):u<=65535?(n[a+0]=s,n[a+1]=s,n[a+2]=s):(n[a+0]=s,n[a+1]=s,n[a+2]=s,n[a+3]=s)),u<=127?c[a++]=u:u<=2047?(c[a++]=192|(1984&u)>>>6,c[a++]=128|(63&u)>>>0):u<=65535?(c[a++]=224|(61440&u)>>>12,c[a++]=128|(4032&u)>>>6,c[a++]=128|(63&u)>>>0):(c[a++]=240|(1835008&u)>>>18,c[a++]=128|(258048&u)>>>12,c[a++]=128|(4032&u)>>>6,c[a++]=128|(63&u)>>>0),l&&s++}this.utf16Length=t,this.utf8Length=s,this.utf16Value=e,this.utf8Value=c,this.utf16OffsetToUtf8=o,this.utf8OffsetToUtf16=n}createString(e){const t=e._omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,t),t}}class Ze{constructor(e){if(this.id=++Ze.LAST_ID,!Xe)throw new Error("Must invoke loadWASM first.");this._onigBinding=Xe,this.content=e;const t=new Je(e);this.utf16Length=t.utf16Length,this.utf8Length=t.utf8Length,this.utf16OffsetToUtf8=t.utf16OffsetToUtf8,this.utf8OffsetToUtf16=t.utf8OffsetToUtf16,this.utf8Length<1e4&&!Ze._sharedPtrInUse?(Ze._sharedPtr||(Ze._sharedPtr=Xe._omalloc(1e4)),Ze._sharedPtrInUse=!0,Xe.HEAPU8.set(t.utf8Value,Ze._sharedPtr),this.ptr=Ze._sharedPtr):this.ptr=t.createString(Xe)}convertUtf8OffsetToUtf16(e){return this.utf8OffsetToUtf16?e<0?0:e>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[e]:e}convertUtf16OffsetToUtf8(e){return this.utf16OffsetToUtf8?e<0?0:e>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[e]:e}dispose(){this.ptr===Ze._sharedPtr?Ze._sharedPtrInUse=!1:this._onigBinding._ofree(this.ptr)}}Ze.LAST_ID=0,Ze._sharedPtr=0,Ze._sharedPtrInUse=!1;class et{constructor(e){if(!Xe)throw new Error("Must invoke loadWASM first.");const t=[],s=[];for(let r=0,o=e.length;rWebAssembly.instantiateStreaming(e,t)}(r):function(e){return async t=>{const s=await e.arrayBuffer();return WebAssembly.instantiate(s,t)}}(r):function(e){return t=>WebAssembly.instantiate(e,t)}(r)}return st=new Promise(((e,t)=>{r=e,o=t})),function(e,t,s,r){Ye({print:t,instantiateWasm:(t,s)=>{if("undefined"==typeof performance){const e=()=>Date.now();t.env.emscripten_get_now=e,t.wasi_snapshot_preview1.emscripten_get_now=e}return e(t).then((e=>s(e.instance)),r),{}}}).then((e=>{Xe=e,s()}))}(t,s,r,o),st}function ot(e){return new Ze(e)}function nt(e){return new et(e)}function ct(e){const t=x[e];if(!t)return;const{id:s}=k[t];return{id:s,scopeName:t}}const at=new Map;let it,ut;async function lt(e){if(at.has(e))return at.get(e);const t=function(e){return k[e]}(e);if(!t)return Promise.resolve(void 0);let r;if(void 0===it&&(r=ht(t.path),it=r.then((()=>!0)).catch((()=>!1))),void 0===ut&&(ut=await it),ut){const s=r||ht(t.path);return at.set(e,s),s}const o=s(`grammars/${t.id}`);t.embeddedScopes.forEach((e=>{if(!at.has(e)){const t=o.then((t=>t.find((t=>t.scopeName===e))));at.set(e,t)}}));const n=o.then((t=>t.find((t=>t.scopeName===e))));return at.set(e,n),n}async function ht(e){return await t()}const dt=30720,pt=16744448,mt=16775168,gt=11,ft=15,bt={NotSet:-1,None:0,Italic:1,Bold:2,Underline:4,Strikethrough:8};function yt(e,t,s,r){const{tokens:o,ruleStack:n}=e.tokenizeLine2(s,t),c=[];let a=s.length;for(let e=o.length-2;e>=0;e-=2){const t=o[e],r=o[e+1],n=s.slice(t,a);c.unshift({content:n,metadata:r}),a=t}let i=[];if(null==r?void 0:r.preserveWhitespace)i=c;else for(let e=0;e0?i[i.length-1].content+=t.content:e{const{rawTokens:o,nextStack:n}=yt(t,r,e,{preserveWhitespace:!0}),c=o.map((({content:e,metadata:t})=>({content:e,style:xt(t,s)}))),a=function(e,t,s,r){const{tokens:o}=s.tokenizeLine(e,t),n=[];for(let t=0;t{if(i+=e.content.length,s>>ft]},r=(e&dt)>>>gt;return r&bt.Italic&&(s.fontStyle="italic"),r&bt.Bold&&(s.fontWeight="bold"),r&bt.Underline&&(s.textDecoration="underline"),r&bt.Strikethrough&&(s.textDecoration="line-through"),s}var kt={instantiator:t=>WebAssembly.instantiate(e,t).then((e=>({instance:e})))};let jt=null;function St(e){return"text"==e||"terminal"==e}function wt(e){if(!jt){const e=rt(kt).then((()=>({createOnigScanner:nt,createOnigString:ot})));jt=new Ve({onigLib:e,loadGrammar:e=>lt(e)})}const t=e.filter((e=>!St(e))).map((e=>{const t=ct(e);if(!t)throw new Lt(e);return jt.loadGrammar(t.scopeName)}));return Promise.all(t)}function vt(e){if(St(e))return{langId:e,grammar:null};const t=ct(e);if(!t)throw new Lt(e);const s=function(e){const{_syncRegistry:t}=jt;return null==t?void 0:t._grammars.get(e)}(t.scopeName);if(!s)throw new Error(`Syntax highlighting error: grammar for ${e} not loaded`);return{langId:t.id,grammar:s}}class Lt extends Error{constructor(e){super(`Unknown language: ${e}`),this.alias=e}}function Ct(e,t,s){jt.setTheme(s);const r=function(e){const t=jt.getColorMap();return e.colorNames?t.map((t=>Object.keys(e.colorNames).find((s=>e.colorNames[s].toUpperCase()===t.toUpperCase()))||t)):t}(s);return function(e,t,s){let r=null;return e.split(/\r?\n|\r/g).map((e=>{const{rawTokens:o,nextStack:n}=yt(t,r,e);return r=n,o.map((({content:e,metadata:t})=>({content:e,style:xt(t,s)})))}))}(e,t,r)}function At(e){return e.split(/\r?\n|\r/g).map((e=>[{content:e,style:{}}]))}function Nt(e,t){return Rt(e.slice(1,-1)).map((e=>{const{from:s,to:r}=Pt(e);return{lineNumber:t,fromColumn:s,toColumn:r}}))}function Pt(e){const[t,s]=e.split(":");if(!Et(t))throw new It(t);const r=Number(t);if(r<1)throw new Bt;if(s){if(!Et(s))throw new It(s);return{from:r,to:+s}}return{from:r,to:r}}function Rt(e){return e.split(/,(?![^\[]*\])/g)}function Et(e){e=e.toString();var t=Math.abs(e),s=parseInt(e,10);return!isNaN(t)&&s===t&&t.toString()===e}class It extends Error{constructor(e){super(`Invalid number "${e}" in range string`),this.number=e,Object.setPrototypeOf(this,new.target.prototype)}}class Bt extends Error{constructor(){super("Invalid line or column number in range string"),Object.setPrototypeOf(this,new.target.prototype)}}const Ot="#001",Gt="#010",Tt={name:"comments",type:"light",foreground:"",background:"",colors:{},settings:[{settings:{foreground:"#000"}},{scope:["punctuation.definition.comment"],settings:{foreground:Ot}},{scope:"comment",settings:{foreground:Gt}}]};function Ft(e,t,s,r){const o=t?Ct(e,t,Tt):At(e),n=[];let c=1;const a=o.map((e=>{const{annotations:t,lineWithoutComments:o}=function(e,t,s){if(!e.some((e=>e.style.color===Ot)))return{annotations:[],lineWithoutComments:e};const r=[];let o=0;for(;o!e.tokens.includes(t)));n.every((e=>""===e.content.trim()))&&(n=null);return{annotations:r.map((e=>({name:e.name,query:e.query,lineNumber:e.lineNumber,rangeString:e.rangeString}))),lineWithoutComments:n}}(e,r,c);if(n.push(...t),!o)return null;const a=o.map((e=>e.content)).join("");return["mdx","jsx","tsx"].includes(s)&&t.length>0&&"{}"===a.trim()?null:(c++,a)})).filter((e=>null!==e)).join("\n"),i=n.map((e=>{var{rangeString:t,lineNumber:s}=e,r=function(e,t){var s={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(s[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);oe.ranges.length>0));return{newCode:a,annotations:i}}function qt(e,t,s){return e&&e.startsWith("(/")?function(e,t,s){const r=t.match(/\(\/([\s\S]*?)\/([gimuy]*)\)/);if(!r)throw new Error(`Invalid RegExp string: ${t}`);const o=new RegExp(r[1],r[2]),n=e.split(/\r?\n/).slice(s-1).join("\n");if(!o.global){const e=o.exec(n);if(!e)return[];const t=n.slice(0,e.index).split("\n").length+s-1;return[{fromLineNumber:t,toLineNumber:t+e[0].split("\n").length-1}]}let c;const a=[];for(;c=o.exec(n);){const e=n.slice(0,c.index).split("\n").length+s-1,t=e+c[0].split("\n").length-1,r=a[a.length-1];r&&r.fromLineNumber===e||a.push({fromLineNumber:e,toLineNumber:t})}return a}(s,e,t):e&&e.startsWith("[/")?function(e,t,s){const r=t.match(/\[\/([\s\S]*?)\/([gimuy]*)\]/);if(!r)throw new Error(`Invalid RegExp string: ${t}`);let o=r[2]||"";o+="d";const n=new RegExp(r[1],o);let c=e.split(/\r?\n/);c=c.slice(s-1),n.multiline||(c=[c[0]]);const a=[];return c.forEach(((e,t)=>{if(!n.global){if(a.length>0)return;const r=n.exec(e);if(!r)return;const o=r.indices[1]||r.indices[0];return void a.push({lineNumber:t+s,fromColumn:o[0]+1,toColumn:o[1]})}let r;for(;r=n.exec(e);){const e=r.indices[1]||r.indices[0];a.push({lineNumber:t+s,fromColumn:e[0]+1,toColumn:e[1]})}})),a}(s,e,t):function(e,t){return e?e.startsWith("[")?Nt(e,t):Rt(e.slice(1,-1)).map((e=>{if(e.includes("[")){const[s,r]=e.split("["),o=Number(s),n=t+o-1;if(!Et(n))throw new It(s);return Nt("["+r,n)}const{from:s,to:r}=Pt(e);return[{fromLineNumber:s+t-1,toLineNumber:r+t-1}]})).flat():[{fromLineNumber:t,toLineNumber:t}]}(e,t)}function $t(e,t){var s;const r=e.match(/\s*([\w-]+)?(\([^\)]*\)|\[[^\]]*\])?(.*)$/),o=r[1],n=r[2],c=null===(s=r[3])||void 0===s?void 0:s.trim();return t.includes(o)?{name:o,rangeString:n,query:c}:null}function Mt(e,t){let s=[],r=1;return e.forEach((e=>{s.push({fromColumn:r,toColumn:r+e.content.length-1,token:e}),r+=e.content.length})),t.forEach((e=>{s=function(e,t){const{range:s}=t,{fromColumn:r,toColumn:o}=s,n=[];let c=0;for(;co){const[e,s]=Ut(t,o+1);a.tokens.push(e),n.push(s)}else a.tokens.push(t);c++}else n.push(a);for(;cWt(e)))}function Wt(e){return"tokens"in e?{annotationName:e.annotationName,annotationQuery:e.annotationQuery,fromColumn:e.fromColumn,toColumn:e.toColumn,tokens:e.tokens.map((e=>Wt(e)))}:e.token}function Ut(e,t){if("token"in e){const s=Object.assign(Object.assign({},e.token),{content:e.token.content.slice(0,t-e.fromColumn)}),r=Object.assign(Object.assign({},e.token),{content:e.token.content.slice(t-e.fromColumn)});return[Object.assign(Object.assign({},e),{toColumn:t-1,token:s}),Object.assign(Object.assign({},e),{fromColumn:t,token:r})]}{const s=[],r=[];e.tokens.forEach((e=>{if(e.toColumn=t)r.push(e);else{const[o,n]=Ut(e,t);s.push(o),r.push(n)}}));return[Object.assign(Object.assign({},e),{toColumn:t-1,tokens:s}),Object.assign(Object.assign({},e),{fromColumn:t,tokens:r})]}}function Dt(e,t){let s=e.map(((e,t)=>({fromLineNumber:t+1,toLineNumber:t+1,line:e})));return t.forEach((e=>{s=function(e,t){const{range:s,name:r,query:o}=t,{fromLineNumber:n,toLineNumber:c}=s,a=[];let i=0;for(;ic){const[e,s]=Ht(t,c+1);u.lines.push(e),a.push(s)}else u.lines.push(t);i++}else a.push(u);for(;izt(e)))}function zt(e){return"line"in e?{lineNumber:e.fromLineNumber,tokens:e.line.tokens}:{annotationName:e.annotationName,annotationQuery:e.annotationQuery,fromLineNumber:e.fromLineNumber,toLineNumber:e.toLineNumber,lines:e.lines.map((e=>zt(e)))}}function Ht(e,t){if("line"in e)return[Object.assign(Object.assign({},e),{toLineNumber:t-1}),Object.assign(Object.assign({},e),{fromLineNumber:t})];{const s=[],r=[];return e.lines.forEach((e=>{if(e.toLineNumber=t)r.push(e);else{const[o,n]=Ht(e,t);s.push(o),r.push(n)}})),[Object.assign(Object.assign({},e),{toLineNumber:t-1,lines:s}),Object.assign(Object.assign({},e),{fromLineNumber:t,lines:r})]}}function Qt(e,t){const{inlineAnnotations:s,multilineAnnotations:r}=function(e){const t=[],s=[];return e.forEach((e=>{e.ranges.forEach((r=>{"lineNumber"in r?t.push(Object.assign(Object.assign({},e),{range:r})):s.push(Object.assign(Object.assign({},e),{range:r}))}))})),{inlineAnnotations:t,multilineAnnotations:s}}(t);return Dt(e.map(((e,t)=>{const r=s.filter((e=>e.range.lineNumber===t+1));return{lineNumber:t+1,tokens:Mt(e,r)}})),r)}var Kt=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],Vt={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",9:"strikethrough"};function Yt(e,t){const s=e.indexOf("[",t);if(-1!==s){const t=e.indexOf("m",s);return{sequence:e.substring(s+2,t).split(";"),startPosition:s,position:t+1}}return{position:e.length}}function Xt(e,t){let s=1;const r=e[t+s++];let o;if("2"===r){const r=[e[t+s++],e[t+s++],e[t+s]].map((e=>Number.parseInt(e)));3!==r.length||r.some((e=>Number.isNaN(e)))||(o={type:"rgb",rgb:r})}else if("5"===r){const r=Number.parseInt(e[t+s]);Number.isNaN(r)||(o={type:"table",index:Number(r)})}return[s,o]}function Jt(e){const t=[];for(let s=0;s=90&&o<=97?t.push({type:"setForegroundColor",value:{type:"named",name:Kt[o-90+8]}}):o>=100&&o<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:Kt[o-100+8]}})}return t}function Zt(e,t){const s=function(){let e=null,t=null,s=new Set;return{parse(r){const o=[];let n=0;do{const c=Yt(r,n),a=c.sequence?r.substring(n,c.startPosition):r.substring(n);if(a.length>0&&o.push({value:a,foreground:e,background:t,decorations:new Set(s)}),c.sequence){const r=Jt(c.sequence);for(const o of r)"resetAll"===o.type?(e=null,t=null,s.clear()):"resetForegroundColor"===o.type?e=null:"resetBackgroundColor"===o.type?t=null:"resetDecoration"===o.type&&s.delete(o.value);for(const o of r)"setForegroundColor"===o.type?e=o.value:"setBackgroundColor"===o.type?t=o.value:"setDecoration"===o.type&&s.add(o.value)}n=c.position}while(nfunction(e,t,s){const r=e.parse(t),o=r.map((({value:e,foreground:t,background:r,decorations:o})=>{const n=es(t,s),c={};n&&(c.color=n);const a=es(r,s);return a&&(c.background=a),o.has("bold")&&(c.fontWeight="bold"),o.has("italic")&&(c.fontStyle="italic"),o.has("underline")&&(c.textDecoration="underline"),o.has("strikethrough")&&(c.textDecoration="line-through"),o.has("reverse")&&(c.color=a,c.background=n),o.has("dim")&&(c.opacity=.5),{content:e,style:c}}));return o}(s,e,t)));return r}function es(e,t){if(e){if("named"===e.type){return i(t,"terminal.ansi"+(e.name[0].toUpperCase()+e.name.slice(1)))}if("rgb"===e.type){const[t,s,r]=e.rgb;return`rgb(${t}, ${s}, ${r})`}}}async function ts(e,t){await Promise.all([wt(e),p(t)])}async function ss(e,t,s="dark-plus",r={}){const o=e||"",n=t||"text";if("string"!=typeof o)throw new Error("Syntax highlighter error: code must be a string");if("string"!=typeof n)throw new Error("Syntax highlighter error: lang must be a string");return await ts([n],s),rs(o,n,s,r)}function rs(e,t,s="dark-plus",r={}){const o=e||"",n=t||"text";if("string"!=typeof o)throw new Error("Syntax highlighter error: code must be a string");if("string"!=typeof n)throw new Error("Syntax highlighter error: lang must be a string");const{langId:c,grammar:a}=vt(n),u=m(s),l="text"==c?At(o):"terminal"==c?Zt(o,u):(null==r?void 0:r.scopes)?function(e,t,s){return jt.setTheme(s),_t(e,t,jt.getColorMap())}(o,a,u):Ct(o,a,u),h="terminal"==c?function(e){return{color:i(e,"terminal.foreground"),background:i(e,"terminal.background")}}(u):{color:u.foreground,background:u.background};if(function(e){return"annotations"in e}(r)){return{lines:Qt(l,(null==r?void 0:r.annotations)||[]),lang:c,style:h}}return{lines:l,lang:c,style:h}}async function os(e,t,s){if(!s)return{code:e,annotations:[]};await wt([t]);const{grammar:r}=vt(t),{newCode:o,annotations:n}=Ft(e,r,t,s);return{code:o,annotations:n}}async function ns(e){if(!e)throw new Error("Syntax highlighter error: undefined theme");await ts([],e);return y(m(e))}function cs(e){if(!e)throw new Error("Syntax highlighter error: undefined theme");return y(m(e))}export{_ as LANG_NAMES,f as THEME_NAMES,Lt as UnknownLanguageError,b as UnknownThemeError,os as extractAnnotations,ns as getThemeColors,cs as getThemeColorsSync,ss as highlight,rs as highlightSync,ts as preload}; diff --git a/lib/src/comments.ts b/lib/src/comments.ts index 05634d2..99e0e96 100644 --- a/lib/src/comments.ts +++ b/lib/src/comments.ts @@ -3,6 +3,7 @@ import { Token } from "./annotations"; import { highlightText, highlightTokens } from "./highlighter"; import { CodeRange, parseRelativeRanges } from "./range"; import { FinalTheme } from "./theme"; +import { blockRegexToRange, inlineRegexToRange } from "./regex-range"; const PUNCTUATION = "#001"; const COMMENT = "#010"; @@ -88,12 +89,12 @@ export function extractCommentsFromCode( .filter((line) => line !== null) .join(`\n`); - const annotations = allAnnotations.map( - ({ rangeString, lineNumber, ...rest }) => { - const ranges = parseRelativeRanges(rangeString, lineNumber); - return { ...rest, ranges }; - } - ); + const annotations = allAnnotations + .map(({ rangeString, lineNumber, ...rest }) => ({ + ...rest, + ranges: parseRangeString(rangeString, lineNumber, newCode), + })) + .filter((a) => a.ranges.length > 0); return { newCode, annotations }; } @@ -186,6 +187,19 @@ function getAnnotationsFromLine( }; } +function parseRangeString( + rangeString: string, + lineNumber: number, + code: string +) { + if (rangeString && rangeString.startsWith("(/")) { + return blockRegexToRange(code, rangeString, lineNumber); + } else if (rangeString && rangeString.startsWith("[/")) { + return inlineRegexToRange(code, rangeString, lineNumber); + } + return parseRelativeRanges(rangeString, lineNumber); +} + function getAnnotationDataFromNames(content: string, names: string[]) { const regex = /\s*([\w-]+)?(\([^\)]*\)|\[[^\]]*\])?(.*)$/; const match = content.match(regex); diff --git a/lib/src/extractor.test.ts b/lib/src/extractor.test.ts new file mode 100644 index 0000000..5e85d89 --- /dev/null +++ b/lib/src/extractor.test.ts @@ -0,0 +1,18 @@ +import { test, expect } from "vitest"; +import { extractor } from "./extractor"; + +test("extraction", () => { + expectExtraction("!foo", ["foo", , ""]); + expectExtraction("!foo(1)", ["foo", "(1)", ""]); + expectExtraction("!foo[1]", ["foo", "[1]", ""]); + expectExtraction("!foo[ ] q q", ["foo", "[ ]", "q q"]); + expectExtraction("!foo(/bar/)", ["foo", "(/bar/)", ""]); + expectExtraction("!foo(/bar baz/g) 1 2", ["foo", "(/bar baz/g)", "1 2"]); + expectExtraction("!Focus(/y/) bar", ["Focus", "(/y/)", "bar"]); +}); + +function expectExtraction(comment: string, expected: [string, string, string]) { + const result = extractor(comment); + const [name, rangeString, query] = expected; + expect(result).toEqual({ name, rangeString, query }); +} diff --git a/lib/src/extractor.ts b/lib/src/extractor.ts new file mode 100644 index 0000000..97dae6e --- /dev/null +++ b/lib/src/extractor.ts @@ -0,0 +1,19 @@ +export function extractor(comment: string, prefix: string = "!") { + // const regex = /\s*(!?[\w-]+)?(\([^\)]*\)|\[[^\]]*\])?(.*)$/; + + const regex = new RegExp( + `\\s*(${prefix}?[\\w-]+)?(\\([^\\)]*\\)|\\[[^\\]]*\\])?(.*)$` + ); + const match = comment.match(regex); + const name = match[1]; + const rangeString = match[2]; + const query = match[3]?.trim(); + if (!name || !name.startsWith(prefix)) { + return null; + } + return { + name: name.slice(prefix.length), + rangeString, + query, + }; +} diff --git a/lib/src/regex-range.test.ts b/lib/src/regex-range.test.ts new file mode 100644 index 0000000..d4fd08e --- /dev/null +++ b/lib/src/regex-range.test.ts @@ -0,0 +1,123 @@ +import { expect, test } from "vitest"; +import { blockRegexToRange, inlineRegexToRange } from "./regex-range"; + +test("block regex range", () => { + const code = ` +function x() { + console.log(1) + console.log(2) + if (true) { + console.log(3) + } +} + +function y() { + console.log(1) +} +`.trim(); + const result = blockRegexToRange(code, "(/^ {2}.*(?:\n {2}.*)*/gm)", 1); + expect(result).toMatchInlineSnapshot(` + [ + { + "fromLineNumber": 2, + "toLineNumber": 6, + }, + { + "fromLineNumber": 10, + "toLineNumber": 10, + }, + ] + `); +}); + +test("block regex range repeated line", () => { + const code = ` +const foo = 1; +const bar = 2 +foo = foo + bar; +`.trim(); + const result = blockRegexToRange(code, "(/foo/g)", 1); + expect(result).toMatchInlineSnapshot(` + [ + { + "fromLineNumber": 1, + "toLineNumber": 1, + }, + { + "fromLineNumber": 3, + "toLineNumber": 3, + }, + ] + `); +}); + +test("inline regex range", () => { + const code = ` +const foo = 1; +const bar = 2 +foo = foo + bar; +`.trim(); + const result = inlineRegexToRange(code, "[/foo/g]", 1); + + expect(result).toMatchInlineSnapshot(` + [ + { + "fromColumn": 7, + "lineNumber": 1, + "toColumn": 9, + }, + ] + `); +}); + +test("inline regex range with capture group", () => { + const code = ` +function C() { + return
+ Hello +
+} +`.trim(); + const result = inlineRegexToRange(code, '[/className="(.*?)"/gm]', 1); + + expect(result).toMatchInlineSnapshot(` + [ + { + "fromColumn": 26, + "lineNumber": 2, + "toColumn": 35, + }, + { + "fromColumn": 22, + "lineNumber": 3, + "toColumn": 34, + }, + { + "fromColumn": 51, + "lineNumber": 3, + "toColumn": 51, + }, + ] + `); +}); + +test("inline regex range with capture group not g", () => { + const code = ` +function C() { + return
+ Hello +
+} +`.trim(); + const result = inlineRegexToRange(code, '[/className="(.*?)"/]', 3); + + expect(result).toMatchInlineSnapshot(` + [ + { + "fromColumn": 22, + "lineNumber": 3, + "toColumn": 34, + }, + ] + `); +}); diff --git a/lib/src/regex-range.ts b/lib/src/regex-range.ts new file mode 100644 index 0000000..f01abf2 --- /dev/null +++ b/lib/src/regex-range.ts @@ -0,0 +1,87 @@ +import { CodeRange, InlineRange, MultiLineRange } from "./range"; + +// parse "(/foo/i)" into an array of ranges +export function blockRegexToRange( + code: string, + regexString: string, + lineNumber: number +): MultiLineRange[] { + const inputMatch = regexString.match(/\(\/([\s\S]*?)\/([gimuy]*)\)/); + if (!inputMatch) throw new Error(`Invalid RegExp string: ${regexString}`); + const regex = new RegExp(inputMatch[1], inputMatch[2]); + + let lines = code.split(/\r?\n/).slice(lineNumber - 1); + const remainingCode = lines.join("\n"); + + if (!regex.global) { + const match = regex.exec(remainingCode); + if (!match) return []; + const fromLineNumber = + remainingCode.slice(0, match.index).split("\n").length + lineNumber - 1; + const toLineNumber = fromLineNumber + match[0].split("\n").length - 1; + return [{ fromLineNumber, toLineNumber }]; + } + + let match; + const results: MultiLineRange[] = []; + while ((match = regex.exec(remainingCode))) { + const fromLineNumber = + remainingCode.slice(0, match.index).split("\n").length + lineNumber - 1; + const toLineNumber = fromLineNumber + match[0].split("\n").length - 1; + + const lastResult = results[results.length - 1]; + if (!lastResult || lastResult.fromLineNumber !== fromLineNumber) { + // only push when it's a new range + results.push({ fromLineNumber, toLineNumber }); + } + } + + return results; +} + +export function inlineRegexToRange( + code: string, + regexString: string, + lineNumber: number +): InlineRange[] { + const inputMatch = regexString.match(/\[\/([\s\S]*?)\/([gimuy]*)\]/); + if (!inputMatch) throw new Error(`Invalid RegExp string: ${regexString}`); + let flags = inputMatch[2] || ""; + flags += "d"; + const regex = new RegExp(inputMatch[1], flags); + let lines = code.split(/\r?\n/); + lines = lines.slice(lineNumber - 1); + + // if the regex is not multiline (`m` flag), only use the first line + if (!regex.multiline) lines = [lines[0]]; + + const ranges: InlineRange[] = []; + + lines.forEach((line, i) => { + if (!regex.global) { + if (ranges.length > 0) return; + const match = regex.exec(line) as any; + if (!match) return; + // if there are capture groups, use indices[1] else use indices[0] + const indices = match.indices[1] || match.indices[0]; + ranges.push({ + lineNumber: i + lineNumber, + fromColumn: indices[0] + 1, + toColumn: indices[1], + }); + return; + } + + let match; + while ((match = regex.exec(line))) { + // if there are capture groups, use indices[1] else use indices[0] + const indices = match.indices[1] || match.indices[0]; + ranges.push({ + lineNumber: i + lineNumber, + fromColumn: indices[0] + 1, + toColumn: indices[1], + }); + } + }); + return ranges; +} diff --git a/lib/test/__snapshots__/browser.test.ts.snap b/lib/test/__snapshots__/browser.test.ts.snap index 6ed613c..222c940 100644 --- a/lib/test/__snapshots__/browser.test.ts.snap +++ b/lib/test/__snapshots__/browser.test.ts.snap @@ -1,25 +1,33 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`extract annottations 1`] = ` +exports[`extract annotation with inline global regex 1`] = ` { "annotations": [ { - "name": "foo", - "query": "", + "name": "Focus", + "query": "bar", "ranges": [ { - "fromLineNumber": 2, - "toLineNumber": 2, + "fromColumn": 8, + "lineNumber": 3, + "toColumn": 8, + }, + { + "fromColumn": 16, + "lineNumber": 3, + "toColumn": 16, }, ], }, ], - "code": "const x = 1; -const y = 2;", + "code": "const x = 1 +const y = 2 +const cy = 2 + y; +const fy = 3;", } `; -exports[`extract annottations 2`] = ` +exports[`extract annotation with inline global regex 2`] = ` { "lang": "javascript", "lines": [ @@ -50,163 +58,137 @@ exports[`extract annottations 2`] = ` "color": "#B5CEA8", }, }, + ], + }, + { + "lineNumber": 2, + "tokens": [ { - "content": ";", + "content": "const ", "style": { - "color": "#D4D4D4", + "color": "#569CD6", }, }, - ], - }, - { - "annotationName": "foo", - "annotationQuery": "", - "fromLineNumber": 2, - "lines": [ { - "lineNumber": 2, - "tokens": [ - { - "content": "const ", - "style": { - "color": "#569CD6", - }, - }, - { - "content": "y", - "style": { - "color": "#4FC1FF", - }, - }, - { - "content": " = ", - "style": { - "color": "#D4D4D4", - }, - }, - { - "content": "2", - "style": { - "color": "#B5CEA8", - }, - }, - { - "content": ";", - "style": { - "color": "#D4D4D4", - }, - }, - ], + "content": "y", + "style": { + "color": "#4FC1FF", + }, }, - ], - "toLineNumber": 2, - }, - ], - "style": { - "background": "#1E1E1E", - "color": "#D4D4D4", - }, -} -`; - -exports[`extract annottations from jsx 1`] = ` -{ - "annotations": [ - { - "name": "foo", - "query": "", - "ranges": [ { - "fromColumn": 3, - "lineNumber": 2, - "toColumn": 5, + "content": " = ", + "style": { + "color": "#D4D4D4", + }, + }, + { + "content": "2", + "style": { + "color": "#B5CEA8", + }, }, ], }, - ], - "code": "const x =
- hey -
", -} -`; - -exports[`extract annottations from jsx 2`] = ` -{ - "lang": "mdx", - "lines": [ { - "lineNumber": 1, + "lineNumber": 3, "tokens": [ { - "content": "const x = ", + "content": "const ", "style": { - "color": "#D4D4D4", + "color": "#569CD6", }, }, { - "content": "<", + "content": "c", "style": { - "color": "#808080", + "color": "#4FC1FF", }, }, { - "content": "div", + "annotationName": "Focus", + "annotationQuery": "bar", + "fromColumn": 8, + "toColumn": 8, + "tokens": [ + { + "content": "y", + "style": { + "color": "#4FC1FF", + }, + }, + ], + }, + { + "content": " = ", "style": { - "color": "#569CD6", + "color": "#D4D4D4", }, }, { - "content": ">", + "content": "2", "style": { - "color": "#808080", + "color": "#B5CEA8", }, }, - ], - }, - { - "lineNumber": 2, - "tokens": [ { - "content": " ", + "content": " + ", "style": { "color": "#D4D4D4", }, }, { - "annotationName": "foo", - "annotationQuery": "", - "fromColumn": 3, - "toColumn": 5, + "annotationName": "Focus", + "annotationQuery": "bar", + "fromColumn": 16, + "toColumn": 16, "tokens": [ { - "content": "hey", + "content": "y", "style": { - "color": "#D4D4D4", + "color": "#9CDCFE", }, }, ], }, + { + "content": ";", + "style": { + "color": "#D4D4D4", + }, + }, ], }, { - "lineNumber": 3, + "lineNumber": 4, "tokens": [ { - "content": "", + "content": " = ", "style": { - "color": "#808080", + "color": "#D4D4D4", + }, + }, + { + "content": "3", + "style": { + "color": "#B5CEA8", + }, + }, + { + "content": ";", + "style": { + "color": "#D4D4D4", }, }, ], @@ -219,60 +201,57 @@ exports[`extract annottations from jsx 2`] = ` } `; -exports[`extract annottations from mdx 1`] = ` +exports[`extract annotation with inline regex 1`] = ` { "annotations": [ { - "name": "foo", - "query": "", + "name": "Focus", + "query": "bar", "ranges": [ { - "fromColumn": 3, - "lineNumber": 1, - "toColumn": 5, + "fromColumn": 8, + "lineNumber": 3, + "toColumn": 8, }, ], }, ], - "code": "# Hi there -{/* bar */}", + "code": "const x = 1 +const y = 2 +const cy = 2 + y; +const fy = 3;", } `; -exports[`extract annottations from mdx 2`] = ` +exports[`extract annotation with inline regex 2`] = ` { - "lang": "mdx", + "lang": "javascript", "lines": [ { "lineNumber": 1, "tokens": [ { - "content": "# ", + "content": "const ", "style": { "color": "#569CD6", - "fontWeight": "bold", }, }, { - "annotationName": "foo", - "annotationQuery": "", - "fromColumn": 3, - "toColumn": 5, - "tokens": [ - { - "content": "Hi ", - "style": { - "color": "#569CD6", - "fontWeight": "bold", - }, - }, - ], + "content": "x", + "style": { + "color": "#4FC1FF", + }, }, { - "content": "there", + "content": " = ", "style": { - "color": "#569CD6", - "fontWeight": "bold", + "color": "#D4D4D4", + }, + }, + { + "content": "1", + "style": { + "color": "#B5CEA8", }, }, ], @@ -281,52 +260,1203 @@ exports[`extract annottations from mdx 2`] = ` "lineNumber": 2, "tokens": [ { - "content": "{", + "content": "const ", "style": { - "color": "#CE9178", + "color": "#569CD6", }, }, { - "content": "/* bar */", + "content": "y", "style": { - "color": "#6A9955", + "color": "#4FC1FF", }, }, { - "content": "}", + "content": " = ", "style": { - "color": "#CE9178", + "color": "#D4D4D4", + }, + }, + { + "content": "2", + "style": { + "color": "#B5CEA8", }, }, ], }, - ], - "style": { - "background": "#1E1E1E", - "color": "#D4D4D4", - }, -} -`; - -exports[`extract annottations from text 1`] = ` -{ - "annotations": [], - "code": "const x = 1; -// foo[3:5] -const y = 2;", -} + { + "lineNumber": 3, + "tokens": [ + { + "content": "const ", + "style": { + "color": "#569CD6", + }, + }, + { + "content": "c", + "style": { + "color": "#4FC1FF", + }, + }, + { + "annotationName": "Focus", + "annotationQuery": "bar", + "fromColumn": 8, + "toColumn": 8, + "tokens": [ + { + "content": "y", + "style": { + "color": "#4FC1FF", + }, + }, + ], + }, + { + "content": " = ", + "style": { + "color": "#D4D4D4", + }, + }, + { + "content": "2", + "style": { + "color": "#B5CEA8", + }, + }, + { + "content": " + ", + "style": { + "color": "#D4D4D4", + }, + }, + { + "content": "y", + "style": { + "color": "#9CDCFE", + }, + }, + { + "content": ";", + "style": { + "color": "#D4D4D4", + }, + }, + ], + }, + { + "lineNumber": 4, + "tokens": [ + { + "content": "const ", + "style": { + "color": "#569CD6", + }, + }, + { + "content": "fy", + "style": { + "color": "#4FC1FF", + }, + }, + { + "content": " = ", + "style": { + "color": "#D4D4D4", + }, + }, + { + "content": "3", + "style": { + "color": "#B5CEA8", + }, + }, + { + "content": ";", + "style": { + "color": "#D4D4D4", + }, + }, + ], + }, + ], + "style": { + "background": "#1E1E1E", + "color": "#D4D4D4", + }, +} +`; + +exports[`extract annotation with multiline inline regex 1`] = ` +{ + "annotations": [ + { + "name": "Fold", + "query": "q", + "ranges": [ + { + "fromColumn": 26, + "lineNumber": 2, + "toColumn": 35, + }, + { + "fromColumn": 22, + "lineNumber": 3, + "toColumn": 34, + }, + { + "fromColumn": 51, + "lineNumber": 3, + "toColumn": 51, + }, + ], + }, + ], + "code": "function C() { + return
+ Hello +
+}", +} +`; + +exports[`extract annotation with multiline inline regex 2`] = ` +{ + "lang": "javascript", + "lines": [ + { + "lineNumber": 1, + "tokens": [ + { + "content": "function ", + "style": { + "color": "#569CD6", + }, + }, + { + "content": "C", + "style": { + "color": "#DCDCAA", + }, + }, + { + "content": "() {", + "style": { + "color": "#D4D4D4", + }, + }, + ], + }, + { + "lineNumber": 2, + "tokens": [ + { + "content": " return ", + "style": { + "color": "#C586C0", + }, + }, + { + "content": "<", + "style": { + "color": "#808080", + }, + }, + { + "content": "div ", + "style": { + "color": "#569CD6", + }, + }, + { + "content": "className", + "style": { + "color": "#9CDCFE", + }, + }, + { + "content": "=", + "style": { + "color": "#D4D4D4", + }, + }, + { + "content": """, + "style": { + "color": "#CE9178", + }, + }, + { + "annotationName": "Fold", + "annotationQuery": "q", + "fromColumn": 26, + "toColumn": 35, + "tokens": [ + { + "content": "bg-red-500", + "style": { + "color": "#CE9178", + }, + }, + ], + }, + { + "content": """, + "style": { + "color": "#CE9178", + }, + }, + { + "content": ">", + "style": { + "color": "#808080", + }, + }, + ], + }, + { + "lineNumber": 3, + "tokens": [ + { + "content": " <", + "style": { + "color": "#808080", + }, + }, + { + "content": "span ", + "style": { + "color": "#569CD6", + }, + }, + { + "content": "className", + "style": { + "color": "#9CDCFE", + }, + }, + { + "content": "=", + "style": { + "color": "#D4D4D4", + }, + }, + { + "content": """, + "style": { + "color": "#CE9178", + }, + }, + { + "annotationName": "Fold", + "annotationQuery": "q", + "fromColumn": 22, + "toColumn": 34, + "tokens": [ + { + "content": "text-blue-500", + "style": { + "color": "#CE9178", + }, + }, + ], + }, + { + "content": """, + "style": { + "color": "#CE9178", + }, + }, + { + "content": "><", + "style": { + "color": "#808080", + }, + }, + { + "content": "a ", + "style": { + "color": "#569CD6", + }, + }, + { + "content": "className", + "style": { + "color": "#9CDCFE", + }, + }, + { + "content": "=", + "style": { + "color": "#D4D4D4", + }, + }, + { + "content": """, + "style": { + "color": "#CE9178", + }, + }, + { + "annotationName": "Fold", + "annotationQuery": "q", + "fromColumn": 51, + "toColumn": 51, + "tokens": [ + { + "content": "x", + "style": { + "color": "#CE9178", + }, + }, + ], + }, + { + "content": """, + "style": { + "color": "#CE9178", + }, + }, + { + "content": ">", + "style": { + "color": "#808080", + }, + }, + { + "content": "Hello", + "style": { + "color": "#D4D4D4", + }, + }, + { + "content": "", + "style": { + "color": "#808080", + }, + }, + ], + }, + { + "lineNumber": 4, + "tokens": [ + { + "content": " ", + "style": { + "color": "#808080", + }, + }, + ], + }, + { + "lineNumber": 5, + "tokens": [ + { + "content": "}", + "style": { + "color": "#D4D4D4", + }, + }, + ], + }, + ], + "style": { + "background": "#1E1E1E", + "color": "#D4D4D4", + }, +} +`; + +exports[`extract annottations 1`] = ` +{ + "annotations": [ + { + "name": "foo", + "query": "", + "ranges": [ + { + "fromLineNumber": 2, + "toLineNumber": 2, + }, + ], + }, + ], + "code": "const x = 1; +const y = 2;", +} +`; + +exports[`extract annottations 2`] = ` +{ + "lang": "javascript", + "lines": [ + { + "lineNumber": 1, + "tokens": [ + { + "content": "const ", + "style": { + "color": "#569CD6", + }, + }, + { + "content": "x", + "style": { + "color": "#4FC1FF", + }, + }, + { + "content": " = ", + "style": { + "color": "#D4D4D4", + }, + }, + { + "content": "1", + "style": { + "color": "#B5CEA8", + }, + }, + { + "content": ";", + "style": { + "color": "#D4D4D4", + }, + }, + ], + }, + { + "annotationName": "foo", + "annotationQuery": "", + "fromLineNumber": 2, + "lines": [ + { + "lineNumber": 2, + "tokens": [ + { + "content": "const ", + "style": { + "color": "#569CD6", + }, + }, + { + "content": "y", + "style": { + "color": "#4FC1FF", + }, + }, + { + "content": " = ", + "style": { + "color": "#D4D4D4", + }, + }, + { + "content": "2", + "style": { + "color": "#B5CEA8", + }, + }, + { + "content": ";", + "style": { + "color": "#D4D4D4", + }, + }, + ], + }, + ], + "toLineNumber": 2, + }, + ], + "style": { + "background": "#1E1E1E", + "color": "#D4D4D4", + }, +} +`; + +exports[`extract annottations from jsx 1`] = ` +{ + "annotations": [ + { + "name": "foo", + "query": "", + "ranges": [ + { + "fromColumn": 3, + "lineNumber": 2, + "toColumn": 5, + }, + ], + }, + ], + "code": "const x =
+ hey +
", +} +`; + +exports[`extract annottations from jsx 2`] = ` +{ + "lang": "mdx", + "lines": [ + { + "lineNumber": 1, + "tokens": [ + { + "content": "const x = ", + "style": { + "color": "#D4D4D4", + }, + }, + { + "content": "<", + "style": { + "color": "#808080", + }, + }, + { + "content": "div", + "style": { + "color": "#569CD6", + }, + }, + { + "content": ">", + "style": { + "color": "#808080", + }, + }, + ], + }, + { + "lineNumber": 2, + "tokens": [ + { + "content": " ", + "style": { + "color": "#D4D4D4", + }, + }, + { + "annotationName": "foo", + "annotationQuery": "", + "fromColumn": 3, + "toColumn": 5, + "tokens": [ + { + "content": "hey", + "style": { + "color": "#D4D4D4", + }, + }, + ], + }, + ], + }, + { + "lineNumber": 3, + "tokens": [ + { + "content": "", + "style": { + "color": "#808080", + }, + }, + ], + }, + ], + "style": { + "background": "#1E1E1E", + "color": "#D4D4D4", + }, +} +`; + +exports[`extract annottations from mdx 1`] = ` +{ + "annotations": [ + { + "name": "foo", + "query": "", + "ranges": [ + { + "fromColumn": 3, + "lineNumber": 1, + "toColumn": 5, + }, + ], + }, + ], + "code": "# Hi there +{/* bar */}", +} +`; + +exports[`extract annottations from mdx 2`] = ` +{ + "lang": "mdx", + "lines": [ + { + "lineNumber": 1, + "tokens": [ + { + "content": "# ", + "style": { + "color": "#569CD6", + "fontWeight": "bold", + }, + }, + { + "annotationName": "foo", + "annotationQuery": "", + "fromColumn": 3, + "toColumn": 5, + "tokens": [ + { + "content": "Hi ", + "style": { + "color": "#569CD6", + "fontWeight": "bold", + }, + }, + ], + }, + { + "content": "there", + "style": { + "color": "#569CD6", + "fontWeight": "bold", + }, + }, + ], + }, + { + "lineNumber": 2, + "tokens": [ + { + "content": "{", + "style": { + "color": "#CE9178", + }, + }, + { + "content": "/* bar */", + "style": { + "color": "#6A9955", + }, + }, + { + "content": "}", + "style": { + "color": "#CE9178", + }, + }, + ], + }, + ], + "style": { + "background": "#1E1E1E", + "color": "#D4D4D4", + }, +} +`; + +exports[`extract annottations from text 1`] = ` +{ + "annotations": [], + "code": "const x = 1; +// foo[3:5] +const y = 2;", +} +`; + +exports[`extract annottations from text 2`] = ` +{ + "lang": "text", + "lines": [ + { + "lineNumber": 1, + "tokens": [ + { + "content": "const x = 1;", + "style": {}, + }, + ], + }, + { + "lineNumber": 2, + "tokens": [ + { + "content": "// foo[3:5]", + "style": {}, + }, + ], + }, + { + "lineNumber": 3, + "tokens": [ + { + "content": "const y = 2;", + "style": {}, + }, + ], + }, + ], + "style": { + "background": "#1E1E1E", + "color": "#D4D4D4", + }, +} +`; + +exports[`extract annottations from txt 1`] = ` +{ + "annotations": [ + { + "name": "foo", + "query": "", + "ranges": [ + { + "fromColumn": 3, + "lineNumber": 2, + "toColumn": 5, + }, + ], + }, + ], + "code": "const x = 1; +const y = 2;", +} +`; + +exports[`extract annottations from txt 2`] = ` +{ + "lang": "txt", + "lines": [ + { + "lineNumber": 1, + "tokens": [ + { + "content": "const x = 1;", + "style": { + "color": "#D4D4D4", + }, + }, + ], + }, + { + "lineNumber": 2, + "tokens": [ + { + "content": "co", + "style": { + "color": "#D4D4D4", + }, + }, + { + "annotationName": "foo", + "annotationQuery": "", + "fromColumn": 3, + "toColumn": 5, + "tokens": [ + { + "content": "nst", + "style": { + "color": "#D4D4D4", + }, + }, + ], + }, + { + "content": " y = 2;", + "style": { + "color": "#D4D4D4", + }, + }, + ], + }, + ], + "style": { + "background": "#1E1E1E", + "color": "#D4D4D4", + }, +} +`; + +exports[`extract annottations with prefix 1`] = ` +{ + "annotations": [ + { + "name": "xy", + "query": "bar", + "ranges": [ + { + "fromColumn": 3, + "lineNumber": 3, + "toColumn": 5, + }, + ], + }, + ], + "code": "// xyz[3:5] foo +const x = 1; +const y = 2;", +} +`; + +exports[`extract annottations with prefix 2`] = ` +{ + "lang": "jsx", + "lines": [ + { + "lineNumber": 1, + "tokens": [ + { + "content": "// xyz[3:5] foo", + "style": { + "color": "#6A9955", + }, + }, + ], + }, + { + "lineNumber": 2, + "tokens": [ + { + "content": "const ", + "style": { + "color": "#569CD6", + }, + }, + { + "content": "x", + "style": { + "color": "#4FC1FF", + }, + }, + { + "content": " = ", + "style": { + "color": "#D4D4D4", + }, + }, + { + "content": "1", + "style": { + "color": "#B5CEA8", + }, + }, + { + "content": ";", + "style": { + "color": "#D4D4D4", + }, + }, + ], + }, + { + "lineNumber": 3, + "tokens": [ + { + "content": "co", + "style": { + "color": "#569CD6", + }, + }, + { + "annotationName": "xy", + "annotationQuery": "bar", + "fromColumn": 3, + "toColumn": 5, + "tokens": [ + { + "content": "nst", + "style": { + "color": "#569CD6", + }, + }, + ], + }, + { + "content": " ", + "style": { + "color": "#569CD6", + }, + }, + { + "content": "y", + "style": { + "color": "#4FC1FF", + }, + }, + { + "content": " = ", + "style": { + "color": "#D4D4D4", + }, + }, + { + "content": "2", + "style": { + "color": "#B5CEA8", + }, + }, + { + "content": ";", + "style": { + "color": "#D4D4D4", + }, + }, + ], + }, + ], + "style": { + "background": "#1E1E1E", + "color": "#D4D4D4", + }, +} `; -exports[`extract annottations from text 2`] = ` +exports[`extract empty annotation with inline regex 1`] = ` { - "lang": "text", + "annotations": [], + "code": "const x = 1 +const y = 2 +const c = 2; +const fy = 3;", +} +`; + +exports[`extract empty annotation with inline regex 2`] = ` +{ + "lang": "javascript", "lines": [ { "lineNumber": 1, "tokens": [ { - "content": "const x = 1;", - "style": {}, + "content": "const ", + "style": { + "color": "#569CD6", + }, + }, + { + "content": "x", + "style": { + "color": "#4FC1FF", + }, + }, + { + "content": " = ", + "style": { + "color": "#D4D4D4", + }, + }, + { + "content": "1", + "style": { + "color": "#B5CEA8", + }, + }, + ], + }, + { + "lineNumber": 2, + "tokens": [ + { + "content": "const ", + "style": { + "color": "#569CD6", + }, + }, + { + "content": "y", + "style": { + "color": "#4FC1FF", + }, + }, + { + "content": " = ", + "style": { + "color": "#D4D4D4", + }, + }, + { + "content": "2", + "style": { + "color": "#B5CEA8", + }, + }, + ], + }, + { + "lineNumber": 3, + "tokens": [ + { + "content": "const ", + "style": { + "color": "#569CD6", + }, + }, + { + "content": "c", + "style": { + "color": "#4FC1FF", + }, + }, + { + "content": " = ", + "style": { + "color": "#D4D4D4", + }, + }, + { + "content": "2", + "style": { + "color": "#B5CEA8", + }, + }, + { + "content": ";", + "style": { + "color": "#D4D4D4", + }, + }, + ], + }, + { + "lineNumber": 4, + "tokens": [ + { + "content": "const ", + "style": { + "color": "#569CD6", + }, + }, + { + "content": "fy", + "style": { + "color": "#4FC1FF", + }, + }, + { + "content": " = ", + "style": { + "color": "#D4D4D4", + }, + }, + { + "content": "3", + "style": { + "color": "#B5CEA8", + }, + }, + { + "content": ";", + "style": { + "color": "#D4D4D4", + }, + }, + ], + }, + ], + "style": { + "background": "#1E1E1E", + "color": "#D4D4D4", + }, +} +`; + +exports[`extract empty line annotation with regex 1`] = ` +{ + "annotations": [], + "code": "const y = 2 +const c = 2;", +} +`; + +exports[`extract empty line annotation with regex 2`] = ` +{ + "lang": "javascript", + "lines": [ + { + "lineNumber": 1, + "tokens": [ + { + "content": "const ", + "style": { + "color": "#569CD6", + }, + }, + { + "content": "y", + "style": { + "color": "#4FC1FF", + }, + }, + { + "content": " = ", + "style": { + "color": "#D4D4D4", + }, + }, + { + "content": "2", + "style": { + "color": "#B5CEA8", + }, }, ], }, @@ -334,17 +1464,34 @@ exports[`extract annottations from text 2`] = ` "lineNumber": 2, "tokens": [ { - "content": "// foo[3:5]", - "style": {}, + "content": "const ", + "style": { + "color": "#569CD6", + }, }, - ], - }, - { - "lineNumber": 3, - "tokens": [ { - "content": "const y = 2;", - "style": {}, + "content": "c", + "style": { + "color": "#4FC1FF", + }, + }, + { + "content": " = ", + "style": { + "color": "#D4D4D4", + }, + }, + { + "content": "2", + "style": { + "color": "#B5CEA8", + }, + }, + { + "content": ";", + "style": { + "color": "#D4D4D4", + }, }, ], }, @@ -356,71 +1503,190 @@ exports[`extract annottations from text 2`] = ` } `; -exports[`extract annottations from txt 1`] = ` +exports[`extract line annotation with global regex 1`] = ` { "annotations": [ { - "name": "foo", - "query": "", + "name": "Focus", + "query": "bar", "ranges": [ { - "fromColumn": 3, - "lineNumber": 2, - "toColumn": 5, + "fromLineNumber": 3, + "toLineNumber": 3, + }, + { + "fromLineNumber": 4, + "toLineNumber": 4, }, ], }, ], - "code": "const x = 1; -const y = 2;", + "code": "const x = 1 +const y = 2 +const cy = 2 + y; +const fy = 3;", } `; -exports[`extract annottations from txt 2`] = ` +exports[`extract line annotation with global regex 2`] = ` { - "lang": "txt", + "lang": "javascript", "lines": [ { "lineNumber": 1, "tokens": [ { - "content": "const x = 1;", + "content": "const ", + "style": { + "color": "#569CD6", + }, + }, + { + "content": "x", + "style": { + "color": "#4FC1FF", + }, + }, + { + "content": " = ", "style": { "color": "#D4D4D4", }, }, + { + "content": "1", + "style": { + "color": "#B5CEA8", + }, + }, ], }, { "lineNumber": 2, "tokens": [ { - "content": "co", + "content": "const ", + "style": { + "color": "#569CD6", + }, + }, + { + "content": "y", + "style": { + "color": "#4FC1FF", + }, + }, + { + "content": " = ", "style": { "color": "#D4D4D4", }, }, { - "annotationName": "foo", - "annotationQuery": "", - "fromColumn": 3, - "toColumn": 5, + "content": "2", + "style": { + "color": "#B5CEA8", + }, + }, + ], + }, + { + "annotationName": "Focus", + "annotationQuery": "bar", + "fromLineNumber": 3, + "lines": [ + { + "lineNumber": 3, "tokens": [ { - "content": "nst", + "content": "const ", + "style": { + "color": "#569CD6", + }, + }, + { + "content": "cy", + "style": { + "color": "#4FC1FF", + }, + }, + { + "content": " = ", + "style": { + "color": "#D4D4D4", + }, + }, + { + "content": "2", + "style": { + "color": "#B5CEA8", + }, + }, + { + "content": " + ", + "style": { + "color": "#D4D4D4", + }, + }, + { + "content": "y", + "style": { + "color": "#9CDCFE", + }, + }, + { + "content": ";", "style": { "color": "#D4D4D4", }, }, ], }, + ], + "toLineNumber": 3, + }, + { + "annotationName": "Focus", + "annotationQuery": "bar", + "fromLineNumber": 4, + "lines": [ { - "content": " y = 2;", - "style": { - "color": "#D4D4D4", - }, + "lineNumber": 4, + "tokens": [ + { + "content": "const ", + "style": { + "color": "#569CD6", + }, + }, + { + "content": "fy", + "style": { + "color": "#4FC1FF", + }, + }, + { + "content": " = ", + "style": { + "color": "#D4D4D4", + }, + }, + { + "content": "3", + "style": { + "color": "#B5CEA8", + }, + }, + { + "content": ";", + "style": { + "color": "#D4D4D4", + }, + }, + ], }, ], + "toLineNumber": 4, }, ], "style": { @@ -430,44 +1696,32 @@ exports[`extract annottations from txt 2`] = ` } `; -exports[`extract annottations with prefix 1`] = ` +exports[`extract line annotation with regex 1`] = ` { "annotations": [ { - "name": "xy", + "name": "Focus", "query": "bar", "ranges": [ { - "fromColumn": 3, - "lineNumber": 3, - "toColumn": 5, + "fromLineNumber": 2, + "toLineNumber": 2, }, ], }, ], - "code": "// xyz[3:5] foo -const x = 1; -const y = 2;", + "code": "const y = 2 +const cy = 2; +const fy = 3;", } `; -exports[`extract annottations with prefix 2`] = ` +exports[`extract line annotation with regex 2`] = ` { - "lang": "jsx", + "lang": "javascript", "lines": [ { "lineNumber": 1, - "tokens": [ - { - "content": "// xyz[3:5] foo", - "style": { - "color": "#6A9955", - }, - }, - ], - }, - { - "lineNumber": 2, "tokens": [ { "content": "const ", @@ -476,7 +1730,7 @@ exports[`extract annottations with prefix 2`] = ` }, }, { - "content": "x", + "content": "y", "style": { "color": "#4FC1FF", }, @@ -488,50 +1742,67 @@ exports[`extract annottations with prefix 2`] = ` }, }, { - "content": "1", + "content": "2", "style": { "color": "#B5CEA8", }, }, - { - "content": ";", - "style": { - "color": "#D4D4D4", - }, - }, ], }, { - "lineNumber": 3, - "tokens": [ - { - "content": "co", - "style": { - "color": "#569CD6", - }, - }, + "annotationName": "Focus", + "annotationQuery": "bar", + "fromLineNumber": 2, + "lines": [ { - "annotationName": "xy", - "annotationQuery": "bar", - "fromColumn": 3, - "toColumn": 5, + "lineNumber": 2, "tokens": [ { - "content": "nst", + "content": "const ", "style": { "color": "#569CD6", }, }, + { + "content": "cy", + "style": { + "color": "#4FC1FF", + }, + }, + { + "content": " = ", + "style": { + "color": "#D4D4D4", + }, + }, + { + "content": "2", + "style": { + "color": "#B5CEA8", + }, + }, + { + "content": ";", + "style": { + "color": "#D4D4D4", + }, + }, ], }, + ], + "toLineNumber": 2, + }, + { + "lineNumber": 3, + "tokens": [ { - "content": " ", + "content": "const ", "style": { "color": "#569CD6", }, }, { - "content": "y", + "content": "fy", "style": { "color": "#4FC1FF", }, @@ -543,7 +1814,7 @@ exports[`extract annottations with prefix 2`] = ` }, }, { - "content": "2", + "content": "3", "style": { "color": "#B5CEA8", }, diff --git a/lib/test/__snapshots__/cjs.test.ts.snap b/lib/test/__snapshots__/cjs.test.ts.snap index 6ed613c..222c940 100644 --- a/lib/test/__snapshots__/cjs.test.ts.snap +++ b/lib/test/__snapshots__/cjs.test.ts.snap @@ -1,25 +1,33 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`extract annottations 1`] = ` +exports[`extract annotation with inline global regex 1`] = ` { "annotations": [ { - "name": "foo", - "query": "", + "name": "Focus", + "query": "bar", "ranges": [ { - "fromLineNumber": 2, - "toLineNumber": 2, + "fromColumn": 8, + "lineNumber": 3, + "toColumn": 8, + }, + { + "fromColumn": 16, + "lineNumber": 3, + "toColumn": 16, }, ], }, ], - "code": "const x = 1; -const y = 2;", + "code": "const x = 1 +const y = 2 +const cy = 2 + y; +const fy = 3;", } `; -exports[`extract annottations 2`] = ` +exports[`extract annotation with inline global regex 2`] = ` { "lang": "javascript", "lines": [ @@ -50,163 +58,137 @@ exports[`extract annottations 2`] = ` "color": "#B5CEA8", }, }, + ], + }, + { + "lineNumber": 2, + "tokens": [ { - "content": ";", + "content": "const ", "style": { - "color": "#D4D4D4", + "color": "#569CD6", }, }, - ], - }, - { - "annotationName": "foo", - "annotationQuery": "", - "fromLineNumber": 2, - "lines": [ { - "lineNumber": 2, - "tokens": [ - { - "content": "const ", - "style": { - "color": "#569CD6", - }, - }, - { - "content": "y", - "style": { - "color": "#4FC1FF", - }, - }, - { - "content": " = ", - "style": { - "color": "#D4D4D4", - }, - }, - { - "content": "2", - "style": { - "color": "#B5CEA8", - }, - }, - { - "content": ";", - "style": { - "color": "#D4D4D4", - }, - }, - ], + "content": "y", + "style": { + "color": "#4FC1FF", + }, }, - ], - "toLineNumber": 2, - }, - ], - "style": { - "background": "#1E1E1E", - "color": "#D4D4D4", - }, -} -`; - -exports[`extract annottations from jsx 1`] = ` -{ - "annotations": [ - { - "name": "foo", - "query": "", - "ranges": [ { - "fromColumn": 3, - "lineNumber": 2, - "toColumn": 5, + "content": " = ", + "style": { + "color": "#D4D4D4", + }, + }, + { + "content": "2", + "style": { + "color": "#B5CEA8", + }, }, ], }, - ], - "code": "const x =
- hey -
", -} -`; - -exports[`extract annottations from jsx 2`] = ` -{ - "lang": "mdx", - "lines": [ { - "lineNumber": 1, + "lineNumber": 3, "tokens": [ { - "content": "const x = ", + "content": "const ", "style": { - "color": "#D4D4D4", + "color": "#569CD6", }, }, { - "content": "<", + "content": "c", "style": { - "color": "#808080", + "color": "#4FC1FF", }, }, { - "content": "div", + "annotationName": "Focus", + "annotationQuery": "bar", + "fromColumn": 8, + "toColumn": 8, + "tokens": [ + { + "content": "y", + "style": { + "color": "#4FC1FF", + }, + }, + ], + }, + { + "content": " = ", "style": { - "color": "#569CD6", + "color": "#D4D4D4", }, }, { - "content": ">", + "content": "2", "style": { - "color": "#808080", + "color": "#B5CEA8", }, }, - ], - }, - { - "lineNumber": 2, - "tokens": [ { - "content": " ", + "content": " + ", "style": { "color": "#D4D4D4", }, }, { - "annotationName": "foo", - "annotationQuery": "", - "fromColumn": 3, - "toColumn": 5, + "annotationName": "Focus", + "annotationQuery": "bar", + "fromColumn": 16, + "toColumn": 16, "tokens": [ { - "content": "hey", + "content": "y", "style": { - "color": "#D4D4D4", + "color": "#9CDCFE", }, }, ], }, + { + "content": ";", + "style": { + "color": "#D4D4D4", + }, + }, ], }, { - "lineNumber": 3, + "lineNumber": 4, "tokens": [ { - "content": "", + "content": " = ", "style": { - "color": "#808080", + "color": "#D4D4D4", + }, + }, + { + "content": "3", + "style": { + "color": "#B5CEA8", + }, + }, + { + "content": ";", + "style": { + "color": "#D4D4D4", }, }, ], @@ -219,60 +201,57 @@ exports[`extract annottations from jsx 2`] = ` } `; -exports[`extract annottations from mdx 1`] = ` +exports[`extract annotation with inline regex 1`] = ` { "annotations": [ { - "name": "foo", - "query": "", + "name": "Focus", + "query": "bar", "ranges": [ { - "fromColumn": 3, - "lineNumber": 1, - "toColumn": 5, + "fromColumn": 8, + "lineNumber": 3, + "toColumn": 8, }, ], }, ], - "code": "# Hi there -{/* bar */}", + "code": "const x = 1 +const y = 2 +const cy = 2 + y; +const fy = 3;", } `; -exports[`extract annottations from mdx 2`] = ` +exports[`extract annotation with inline regex 2`] = ` { - "lang": "mdx", + "lang": "javascript", "lines": [ { "lineNumber": 1, "tokens": [ { - "content": "# ", + "content": "const ", "style": { "color": "#569CD6", - "fontWeight": "bold", }, }, { - "annotationName": "foo", - "annotationQuery": "", - "fromColumn": 3, - "toColumn": 5, - "tokens": [ - { - "content": "Hi ", - "style": { - "color": "#569CD6", - "fontWeight": "bold", - }, - }, - ], + "content": "x", + "style": { + "color": "#4FC1FF", + }, }, { - "content": "there", + "content": " = ", "style": { - "color": "#569CD6", - "fontWeight": "bold", + "color": "#D4D4D4", + }, + }, + { + "content": "1", + "style": { + "color": "#B5CEA8", }, }, ], @@ -281,52 +260,1203 @@ exports[`extract annottations from mdx 2`] = ` "lineNumber": 2, "tokens": [ { - "content": "{", + "content": "const ", "style": { - "color": "#CE9178", + "color": "#569CD6", }, }, { - "content": "/* bar */", + "content": "y", "style": { - "color": "#6A9955", + "color": "#4FC1FF", }, }, { - "content": "}", + "content": " = ", "style": { - "color": "#CE9178", + "color": "#D4D4D4", + }, + }, + { + "content": "2", + "style": { + "color": "#B5CEA8", }, }, ], }, - ], - "style": { - "background": "#1E1E1E", - "color": "#D4D4D4", - }, -} -`; - -exports[`extract annottations from text 1`] = ` -{ - "annotations": [], - "code": "const x = 1; -// foo[3:5] -const y = 2;", -} + { + "lineNumber": 3, + "tokens": [ + { + "content": "const ", + "style": { + "color": "#569CD6", + }, + }, + { + "content": "c", + "style": { + "color": "#4FC1FF", + }, + }, + { + "annotationName": "Focus", + "annotationQuery": "bar", + "fromColumn": 8, + "toColumn": 8, + "tokens": [ + { + "content": "y", + "style": { + "color": "#4FC1FF", + }, + }, + ], + }, + { + "content": " = ", + "style": { + "color": "#D4D4D4", + }, + }, + { + "content": "2", + "style": { + "color": "#B5CEA8", + }, + }, + { + "content": " + ", + "style": { + "color": "#D4D4D4", + }, + }, + { + "content": "y", + "style": { + "color": "#9CDCFE", + }, + }, + { + "content": ";", + "style": { + "color": "#D4D4D4", + }, + }, + ], + }, + { + "lineNumber": 4, + "tokens": [ + { + "content": "const ", + "style": { + "color": "#569CD6", + }, + }, + { + "content": "fy", + "style": { + "color": "#4FC1FF", + }, + }, + { + "content": " = ", + "style": { + "color": "#D4D4D4", + }, + }, + { + "content": "3", + "style": { + "color": "#B5CEA8", + }, + }, + { + "content": ";", + "style": { + "color": "#D4D4D4", + }, + }, + ], + }, + ], + "style": { + "background": "#1E1E1E", + "color": "#D4D4D4", + }, +} +`; + +exports[`extract annotation with multiline inline regex 1`] = ` +{ + "annotations": [ + { + "name": "Fold", + "query": "q", + "ranges": [ + { + "fromColumn": 26, + "lineNumber": 2, + "toColumn": 35, + }, + { + "fromColumn": 22, + "lineNumber": 3, + "toColumn": 34, + }, + { + "fromColumn": 51, + "lineNumber": 3, + "toColumn": 51, + }, + ], + }, + ], + "code": "function C() { + return
+ Hello +
+}", +} +`; + +exports[`extract annotation with multiline inline regex 2`] = ` +{ + "lang": "javascript", + "lines": [ + { + "lineNumber": 1, + "tokens": [ + { + "content": "function ", + "style": { + "color": "#569CD6", + }, + }, + { + "content": "C", + "style": { + "color": "#DCDCAA", + }, + }, + { + "content": "() {", + "style": { + "color": "#D4D4D4", + }, + }, + ], + }, + { + "lineNumber": 2, + "tokens": [ + { + "content": " return ", + "style": { + "color": "#C586C0", + }, + }, + { + "content": "<", + "style": { + "color": "#808080", + }, + }, + { + "content": "div ", + "style": { + "color": "#569CD6", + }, + }, + { + "content": "className", + "style": { + "color": "#9CDCFE", + }, + }, + { + "content": "=", + "style": { + "color": "#D4D4D4", + }, + }, + { + "content": """, + "style": { + "color": "#CE9178", + }, + }, + { + "annotationName": "Fold", + "annotationQuery": "q", + "fromColumn": 26, + "toColumn": 35, + "tokens": [ + { + "content": "bg-red-500", + "style": { + "color": "#CE9178", + }, + }, + ], + }, + { + "content": """, + "style": { + "color": "#CE9178", + }, + }, + { + "content": ">", + "style": { + "color": "#808080", + }, + }, + ], + }, + { + "lineNumber": 3, + "tokens": [ + { + "content": " <", + "style": { + "color": "#808080", + }, + }, + { + "content": "span ", + "style": { + "color": "#569CD6", + }, + }, + { + "content": "className", + "style": { + "color": "#9CDCFE", + }, + }, + { + "content": "=", + "style": { + "color": "#D4D4D4", + }, + }, + { + "content": """, + "style": { + "color": "#CE9178", + }, + }, + { + "annotationName": "Fold", + "annotationQuery": "q", + "fromColumn": 22, + "toColumn": 34, + "tokens": [ + { + "content": "text-blue-500", + "style": { + "color": "#CE9178", + }, + }, + ], + }, + { + "content": """, + "style": { + "color": "#CE9178", + }, + }, + { + "content": "><", + "style": { + "color": "#808080", + }, + }, + { + "content": "a ", + "style": { + "color": "#569CD6", + }, + }, + { + "content": "className", + "style": { + "color": "#9CDCFE", + }, + }, + { + "content": "=", + "style": { + "color": "#D4D4D4", + }, + }, + { + "content": """, + "style": { + "color": "#CE9178", + }, + }, + { + "annotationName": "Fold", + "annotationQuery": "q", + "fromColumn": 51, + "toColumn": 51, + "tokens": [ + { + "content": "x", + "style": { + "color": "#CE9178", + }, + }, + ], + }, + { + "content": """, + "style": { + "color": "#CE9178", + }, + }, + { + "content": ">", + "style": { + "color": "#808080", + }, + }, + { + "content": "Hello", + "style": { + "color": "#D4D4D4", + }, + }, + { + "content": "", + "style": { + "color": "#808080", + }, + }, + ], + }, + { + "lineNumber": 4, + "tokens": [ + { + "content": " ", + "style": { + "color": "#808080", + }, + }, + ], + }, + { + "lineNumber": 5, + "tokens": [ + { + "content": "}", + "style": { + "color": "#D4D4D4", + }, + }, + ], + }, + ], + "style": { + "background": "#1E1E1E", + "color": "#D4D4D4", + }, +} +`; + +exports[`extract annottations 1`] = ` +{ + "annotations": [ + { + "name": "foo", + "query": "", + "ranges": [ + { + "fromLineNumber": 2, + "toLineNumber": 2, + }, + ], + }, + ], + "code": "const x = 1; +const y = 2;", +} +`; + +exports[`extract annottations 2`] = ` +{ + "lang": "javascript", + "lines": [ + { + "lineNumber": 1, + "tokens": [ + { + "content": "const ", + "style": { + "color": "#569CD6", + }, + }, + { + "content": "x", + "style": { + "color": "#4FC1FF", + }, + }, + { + "content": " = ", + "style": { + "color": "#D4D4D4", + }, + }, + { + "content": "1", + "style": { + "color": "#B5CEA8", + }, + }, + { + "content": ";", + "style": { + "color": "#D4D4D4", + }, + }, + ], + }, + { + "annotationName": "foo", + "annotationQuery": "", + "fromLineNumber": 2, + "lines": [ + { + "lineNumber": 2, + "tokens": [ + { + "content": "const ", + "style": { + "color": "#569CD6", + }, + }, + { + "content": "y", + "style": { + "color": "#4FC1FF", + }, + }, + { + "content": " = ", + "style": { + "color": "#D4D4D4", + }, + }, + { + "content": "2", + "style": { + "color": "#B5CEA8", + }, + }, + { + "content": ";", + "style": { + "color": "#D4D4D4", + }, + }, + ], + }, + ], + "toLineNumber": 2, + }, + ], + "style": { + "background": "#1E1E1E", + "color": "#D4D4D4", + }, +} +`; + +exports[`extract annottations from jsx 1`] = ` +{ + "annotations": [ + { + "name": "foo", + "query": "", + "ranges": [ + { + "fromColumn": 3, + "lineNumber": 2, + "toColumn": 5, + }, + ], + }, + ], + "code": "const x =
+ hey +
", +} +`; + +exports[`extract annottations from jsx 2`] = ` +{ + "lang": "mdx", + "lines": [ + { + "lineNumber": 1, + "tokens": [ + { + "content": "const x = ", + "style": { + "color": "#D4D4D4", + }, + }, + { + "content": "<", + "style": { + "color": "#808080", + }, + }, + { + "content": "div", + "style": { + "color": "#569CD6", + }, + }, + { + "content": ">", + "style": { + "color": "#808080", + }, + }, + ], + }, + { + "lineNumber": 2, + "tokens": [ + { + "content": " ", + "style": { + "color": "#D4D4D4", + }, + }, + { + "annotationName": "foo", + "annotationQuery": "", + "fromColumn": 3, + "toColumn": 5, + "tokens": [ + { + "content": "hey", + "style": { + "color": "#D4D4D4", + }, + }, + ], + }, + ], + }, + { + "lineNumber": 3, + "tokens": [ + { + "content": "", + "style": { + "color": "#808080", + }, + }, + ], + }, + ], + "style": { + "background": "#1E1E1E", + "color": "#D4D4D4", + }, +} +`; + +exports[`extract annottations from mdx 1`] = ` +{ + "annotations": [ + { + "name": "foo", + "query": "", + "ranges": [ + { + "fromColumn": 3, + "lineNumber": 1, + "toColumn": 5, + }, + ], + }, + ], + "code": "# Hi there +{/* bar */}", +} +`; + +exports[`extract annottations from mdx 2`] = ` +{ + "lang": "mdx", + "lines": [ + { + "lineNumber": 1, + "tokens": [ + { + "content": "# ", + "style": { + "color": "#569CD6", + "fontWeight": "bold", + }, + }, + { + "annotationName": "foo", + "annotationQuery": "", + "fromColumn": 3, + "toColumn": 5, + "tokens": [ + { + "content": "Hi ", + "style": { + "color": "#569CD6", + "fontWeight": "bold", + }, + }, + ], + }, + { + "content": "there", + "style": { + "color": "#569CD6", + "fontWeight": "bold", + }, + }, + ], + }, + { + "lineNumber": 2, + "tokens": [ + { + "content": "{", + "style": { + "color": "#CE9178", + }, + }, + { + "content": "/* bar */", + "style": { + "color": "#6A9955", + }, + }, + { + "content": "}", + "style": { + "color": "#CE9178", + }, + }, + ], + }, + ], + "style": { + "background": "#1E1E1E", + "color": "#D4D4D4", + }, +} +`; + +exports[`extract annottations from text 1`] = ` +{ + "annotations": [], + "code": "const x = 1; +// foo[3:5] +const y = 2;", +} +`; + +exports[`extract annottations from text 2`] = ` +{ + "lang": "text", + "lines": [ + { + "lineNumber": 1, + "tokens": [ + { + "content": "const x = 1;", + "style": {}, + }, + ], + }, + { + "lineNumber": 2, + "tokens": [ + { + "content": "// foo[3:5]", + "style": {}, + }, + ], + }, + { + "lineNumber": 3, + "tokens": [ + { + "content": "const y = 2;", + "style": {}, + }, + ], + }, + ], + "style": { + "background": "#1E1E1E", + "color": "#D4D4D4", + }, +} +`; + +exports[`extract annottations from txt 1`] = ` +{ + "annotations": [ + { + "name": "foo", + "query": "", + "ranges": [ + { + "fromColumn": 3, + "lineNumber": 2, + "toColumn": 5, + }, + ], + }, + ], + "code": "const x = 1; +const y = 2;", +} +`; + +exports[`extract annottations from txt 2`] = ` +{ + "lang": "txt", + "lines": [ + { + "lineNumber": 1, + "tokens": [ + { + "content": "const x = 1;", + "style": { + "color": "#D4D4D4", + }, + }, + ], + }, + { + "lineNumber": 2, + "tokens": [ + { + "content": "co", + "style": { + "color": "#D4D4D4", + }, + }, + { + "annotationName": "foo", + "annotationQuery": "", + "fromColumn": 3, + "toColumn": 5, + "tokens": [ + { + "content": "nst", + "style": { + "color": "#D4D4D4", + }, + }, + ], + }, + { + "content": " y = 2;", + "style": { + "color": "#D4D4D4", + }, + }, + ], + }, + ], + "style": { + "background": "#1E1E1E", + "color": "#D4D4D4", + }, +} +`; + +exports[`extract annottations with prefix 1`] = ` +{ + "annotations": [ + { + "name": "xy", + "query": "bar", + "ranges": [ + { + "fromColumn": 3, + "lineNumber": 3, + "toColumn": 5, + }, + ], + }, + ], + "code": "// xyz[3:5] foo +const x = 1; +const y = 2;", +} +`; + +exports[`extract annottations with prefix 2`] = ` +{ + "lang": "jsx", + "lines": [ + { + "lineNumber": 1, + "tokens": [ + { + "content": "// xyz[3:5] foo", + "style": { + "color": "#6A9955", + }, + }, + ], + }, + { + "lineNumber": 2, + "tokens": [ + { + "content": "const ", + "style": { + "color": "#569CD6", + }, + }, + { + "content": "x", + "style": { + "color": "#4FC1FF", + }, + }, + { + "content": " = ", + "style": { + "color": "#D4D4D4", + }, + }, + { + "content": "1", + "style": { + "color": "#B5CEA8", + }, + }, + { + "content": ";", + "style": { + "color": "#D4D4D4", + }, + }, + ], + }, + { + "lineNumber": 3, + "tokens": [ + { + "content": "co", + "style": { + "color": "#569CD6", + }, + }, + { + "annotationName": "xy", + "annotationQuery": "bar", + "fromColumn": 3, + "toColumn": 5, + "tokens": [ + { + "content": "nst", + "style": { + "color": "#569CD6", + }, + }, + ], + }, + { + "content": " ", + "style": { + "color": "#569CD6", + }, + }, + { + "content": "y", + "style": { + "color": "#4FC1FF", + }, + }, + { + "content": " = ", + "style": { + "color": "#D4D4D4", + }, + }, + { + "content": "2", + "style": { + "color": "#B5CEA8", + }, + }, + { + "content": ";", + "style": { + "color": "#D4D4D4", + }, + }, + ], + }, + ], + "style": { + "background": "#1E1E1E", + "color": "#D4D4D4", + }, +} `; -exports[`extract annottations from text 2`] = ` +exports[`extract empty annotation with inline regex 1`] = ` { - "lang": "text", + "annotations": [], + "code": "const x = 1 +const y = 2 +const c = 2; +const fy = 3;", +} +`; + +exports[`extract empty annotation with inline regex 2`] = ` +{ + "lang": "javascript", "lines": [ { "lineNumber": 1, "tokens": [ { - "content": "const x = 1;", - "style": {}, + "content": "const ", + "style": { + "color": "#569CD6", + }, + }, + { + "content": "x", + "style": { + "color": "#4FC1FF", + }, + }, + { + "content": " = ", + "style": { + "color": "#D4D4D4", + }, + }, + { + "content": "1", + "style": { + "color": "#B5CEA8", + }, + }, + ], + }, + { + "lineNumber": 2, + "tokens": [ + { + "content": "const ", + "style": { + "color": "#569CD6", + }, + }, + { + "content": "y", + "style": { + "color": "#4FC1FF", + }, + }, + { + "content": " = ", + "style": { + "color": "#D4D4D4", + }, + }, + { + "content": "2", + "style": { + "color": "#B5CEA8", + }, + }, + ], + }, + { + "lineNumber": 3, + "tokens": [ + { + "content": "const ", + "style": { + "color": "#569CD6", + }, + }, + { + "content": "c", + "style": { + "color": "#4FC1FF", + }, + }, + { + "content": " = ", + "style": { + "color": "#D4D4D4", + }, + }, + { + "content": "2", + "style": { + "color": "#B5CEA8", + }, + }, + { + "content": ";", + "style": { + "color": "#D4D4D4", + }, + }, + ], + }, + { + "lineNumber": 4, + "tokens": [ + { + "content": "const ", + "style": { + "color": "#569CD6", + }, + }, + { + "content": "fy", + "style": { + "color": "#4FC1FF", + }, + }, + { + "content": " = ", + "style": { + "color": "#D4D4D4", + }, + }, + { + "content": "3", + "style": { + "color": "#B5CEA8", + }, + }, + { + "content": ";", + "style": { + "color": "#D4D4D4", + }, + }, + ], + }, + ], + "style": { + "background": "#1E1E1E", + "color": "#D4D4D4", + }, +} +`; + +exports[`extract empty line annotation with regex 1`] = ` +{ + "annotations": [], + "code": "const y = 2 +const c = 2;", +} +`; + +exports[`extract empty line annotation with regex 2`] = ` +{ + "lang": "javascript", + "lines": [ + { + "lineNumber": 1, + "tokens": [ + { + "content": "const ", + "style": { + "color": "#569CD6", + }, + }, + { + "content": "y", + "style": { + "color": "#4FC1FF", + }, + }, + { + "content": " = ", + "style": { + "color": "#D4D4D4", + }, + }, + { + "content": "2", + "style": { + "color": "#B5CEA8", + }, }, ], }, @@ -334,17 +1464,34 @@ exports[`extract annottations from text 2`] = ` "lineNumber": 2, "tokens": [ { - "content": "// foo[3:5]", - "style": {}, + "content": "const ", + "style": { + "color": "#569CD6", + }, }, - ], - }, - { - "lineNumber": 3, - "tokens": [ { - "content": "const y = 2;", - "style": {}, + "content": "c", + "style": { + "color": "#4FC1FF", + }, + }, + { + "content": " = ", + "style": { + "color": "#D4D4D4", + }, + }, + { + "content": "2", + "style": { + "color": "#B5CEA8", + }, + }, + { + "content": ";", + "style": { + "color": "#D4D4D4", + }, }, ], }, @@ -356,71 +1503,190 @@ exports[`extract annottations from text 2`] = ` } `; -exports[`extract annottations from txt 1`] = ` +exports[`extract line annotation with global regex 1`] = ` { "annotations": [ { - "name": "foo", - "query": "", + "name": "Focus", + "query": "bar", "ranges": [ { - "fromColumn": 3, - "lineNumber": 2, - "toColumn": 5, + "fromLineNumber": 3, + "toLineNumber": 3, + }, + { + "fromLineNumber": 4, + "toLineNumber": 4, }, ], }, ], - "code": "const x = 1; -const y = 2;", + "code": "const x = 1 +const y = 2 +const cy = 2 + y; +const fy = 3;", } `; -exports[`extract annottations from txt 2`] = ` +exports[`extract line annotation with global regex 2`] = ` { - "lang": "txt", + "lang": "javascript", "lines": [ { "lineNumber": 1, "tokens": [ { - "content": "const x = 1;", + "content": "const ", + "style": { + "color": "#569CD6", + }, + }, + { + "content": "x", + "style": { + "color": "#4FC1FF", + }, + }, + { + "content": " = ", "style": { "color": "#D4D4D4", }, }, + { + "content": "1", + "style": { + "color": "#B5CEA8", + }, + }, ], }, { "lineNumber": 2, "tokens": [ { - "content": "co", + "content": "const ", + "style": { + "color": "#569CD6", + }, + }, + { + "content": "y", + "style": { + "color": "#4FC1FF", + }, + }, + { + "content": " = ", "style": { "color": "#D4D4D4", }, }, { - "annotationName": "foo", - "annotationQuery": "", - "fromColumn": 3, - "toColumn": 5, + "content": "2", + "style": { + "color": "#B5CEA8", + }, + }, + ], + }, + { + "annotationName": "Focus", + "annotationQuery": "bar", + "fromLineNumber": 3, + "lines": [ + { + "lineNumber": 3, "tokens": [ { - "content": "nst", + "content": "const ", + "style": { + "color": "#569CD6", + }, + }, + { + "content": "cy", + "style": { + "color": "#4FC1FF", + }, + }, + { + "content": " = ", + "style": { + "color": "#D4D4D4", + }, + }, + { + "content": "2", + "style": { + "color": "#B5CEA8", + }, + }, + { + "content": " + ", + "style": { + "color": "#D4D4D4", + }, + }, + { + "content": "y", + "style": { + "color": "#9CDCFE", + }, + }, + { + "content": ";", "style": { "color": "#D4D4D4", }, }, ], }, + ], + "toLineNumber": 3, + }, + { + "annotationName": "Focus", + "annotationQuery": "bar", + "fromLineNumber": 4, + "lines": [ { - "content": " y = 2;", - "style": { - "color": "#D4D4D4", - }, + "lineNumber": 4, + "tokens": [ + { + "content": "const ", + "style": { + "color": "#569CD6", + }, + }, + { + "content": "fy", + "style": { + "color": "#4FC1FF", + }, + }, + { + "content": " = ", + "style": { + "color": "#D4D4D4", + }, + }, + { + "content": "3", + "style": { + "color": "#B5CEA8", + }, + }, + { + "content": ";", + "style": { + "color": "#D4D4D4", + }, + }, + ], }, ], + "toLineNumber": 4, }, ], "style": { @@ -430,44 +1696,32 @@ exports[`extract annottations from txt 2`] = ` } `; -exports[`extract annottations with prefix 1`] = ` +exports[`extract line annotation with regex 1`] = ` { "annotations": [ { - "name": "xy", + "name": "Focus", "query": "bar", "ranges": [ { - "fromColumn": 3, - "lineNumber": 3, - "toColumn": 5, + "fromLineNumber": 2, + "toLineNumber": 2, }, ], }, ], - "code": "// xyz[3:5] foo -const x = 1; -const y = 2;", + "code": "const y = 2 +const cy = 2; +const fy = 3;", } `; -exports[`extract annottations with prefix 2`] = ` +exports[`extract line annotation with regex 2`] = ` { - "lang": "jsx", + "lang": "javascript", "lines": [ { "lineNumber": 1, - "tokens": [ - { - "content": "// xyz[3:5] foo", - "style": { - "color": "#6A9955", - }, - }, - ], - }, - { - "lineNumber": 2, "tokens": [ { "content": "const ", @@ -476,7 +1730,7 @@ exports[`extract annottations with prefix 2`] = ` }, }, { - "content": "x", + "content": "y", "style": { "color": "#4FC1FF", }, @@ -488,50 +1742,67 @@ exports[`extract annottations with prefix 2`] = ` }, }, { - "content": "1", + "content": "2", "style": { "color": "#B5CEA8", }, }, - { - "content": ";", - "style": { - "color": "#D4D4D4", - }, - }, ], }, { - "lineNumber": 3, - "tokens": [ - { - "content": "co", - "style": { - "color": "#569CD6", - }, - }, + "annotationName": "Focus", + "annotationQuery": "bar", + "fromLineNumber": 2, + "lines": [ { - "annotationName": "xy", - "annotationQuery": "bar", - "fromColumn": 3, - "toColumn": 5, + "lineNumber": 2, "tokens": [ { - "content": "nst", + "content": "const ", "style": { "color": "#569CD6", }, }, + { + "content": "cy", + "style": { + "color": "#4FC1FF", + }, + }, + { + "content": " = ", + "style": { + "color": "#D4D4D4", + }, + }, + { + "content": "2", + "style": { + "color": "#B5CEA8", + }, + }, + { + "content": ";", + "style": { + "color": "#D4D4D4", + }, + }, ], }, + ], + "toLineNumber": 2, + }, + { + "lineNumber": 3, + "tokens": [ { - "content": " ", + "content": "const ", "style": { "color": "#569CD6", }, }, { - "content": "y", + "content": "fy", "style": { "color": "#4FC1FF", }, @@ -543,7 +1814,7 @@ exports[`extract annottations with prefix 2`] = ` }, }, { - "content": "2", + "content": "3", "style": { "color": "#B5CEA8", }, diff --git a/lib/test/__snapshots__/esm.test.ts.snap b/lib/test/__snapshots__/esm.test.ts.snap index 6ed613c..222c940 100644 --- a/lib/test/__snapshots__/esm.test.ts.snap +++ b/lib/test/__snapshots__/esm.test.ts.snap @@ -1,25 +1,33 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`extract annottations 1`] = ` +exports[`extract annotation with inline global regex 1`] = ` { "annotations": [ { - "name": "foo", - "query": "", + "name": "Focus", + "query": "bar", "ranges": [ { - "fromLineNumber": 2, - "toLineNumber": 2, + "fromColumn": 8, + "lineNumber": 3, + "toColumn": 8, + }, + { + "fromColumn": 16, + "lineNumber": 3, + "toColumn": 16, }, ], }, ], - "code": "const x = 1; -const y = 2;", + "code": "const x = 1 +const y = 2 +const cy = 2 + y; +const fy = 3;", } `; -exports[`extract annottations 2`] = ` +exports[`extract annotation with inline global regex 2`] = ` { "lang": "javascript", "lines": [ @@ -50,163 +58,137 @@ exports[`extract annottations 2`] = ` "color": "#B5CEA8", }, }, + ], + }, + { + "lineNumber": 2, + "tokens": [ { - "content": ";", + "content": "const ", "style": { - "color": "#D4D4D4", + "color": "#569CD6", }, }, - ], - }, - { - "annotationName": "foo", - "annotationQuery": "", - "fromLineNumber": 2, - "lines": [ { - "lineNumber": 2, - "tokens": [ - { - "content": "const ", - "style": { - "color": "#569CD6", - }, - }, - { - "content": "y", - "style": { - "color": "#4FC1FF", - }, - }, - { - "content": " = ", - "style": { - "color": "#D4D4D4", - }, - }, - { - "content": "2", - "style": { - "color": "#B5CEA8", - }, - }, - { - "content": ";", - "style": { - "color": "#D4D4D4", - }, - }, - ], + "content": "y", + "style": { + "color": "#4FC1FF", + }, }, - ], - "toLineNumber": 2, - }, - ], - "style": { - "background": "#1E1E1E", - "color": "#D4D4D4", - }, -} -`; - -exports[`extract annottations from jsx 1`] = ` -{ - "annotations": [ - { - "name": "foo", - "query": "", - "ranges": [ { - "fromColumn": 3, - "lineNumber": 2, - "toColumn": 5, + "content": " = ", + "style": { + "color": "#D4D4D4", + }, + }, + { + "content": "2", + "style": { + "color": "#B5CEA8", + }, }, ], }, - ], - "code": "const x =
- hey -
", -} -`; - -exports[`extract annottations from jsx 2`] = ` -{ - "lang": "mdx", - "lines": [ { - "lineNumber": 1, + "lineNumber": 3, "tokens": [ { - "content": "const x = ", + "content": "const ", "style": { - "color": "#D4D4D4", + "color": "#569CD6", }, }, { - "content": "<", + "content": "c", "style": { - "color": "#808080", + "color": "#4FC1FF", }, }, { - "content": "div", + "annotationName": "Focus", + "annotationQuery": "bar", + "fromColumn": 8, + "toColumn": 8, + "tokens": [ + { + "content": "y", + "style": { + "color": "#4FC1FF", + }, + }, + ], + }, + { + "content": " = ", "style": { - "color": "#569CD6", + "color": "#D4D4D4", }, }, { - "content": ">", + "content": "2", "style": { - "color": "#808080", + "color": "#B5CEA8", }, }, - ], - }, - { - "lineNumber": 2, - "tokens": [ { - "content": " ", + "content": " + ", "style": { "color": "#D4D4D4", }, }, { - "annotationName": "foo", - "annotationQuery": "", - "fromColumn": 3, - "toColumn": 5, + "annotationName": "Focus", + "annotationQuery": "bar", + "fromColumn": 16, + "toColumn": 16, "tokens": [ { - "content": "hey", + "content": "y", "style": { - "color": "#D4D4D4", + "color": "#9CDCFE", }, }, ], }, + { + "content": ";", + "style": { + "color": "#D4D4D4", + }, + }, ], }, { - "lineNumber": 3, + "lineNumber": 4, "tokens": [ { - "content": "", + "content": " = ", "style": { - "color": "#808080", + "color": "#D4D4D4", + }, + }, + { + "content": "3", + "style": { + "color": "#B5CEA8", + }, + }, + { + "content": ";", + "style": { + "color": "#D4D4D4", }, }, ], @@ -219,60 +201,57 @@ exports[`extract annottations from jsx 2`] = ` } `; -exports[`extract annottations from mdx 1`] = ` +exports[`extract annotation with inline regex 1`] = ` { "annotations": [ { - "name": "foo", - "query": "", + "name": "Focus", + "query": "bar", "ranges": [ { - "fromColumn": 3, - "lineNumber": 1, - "toColumn": 5, + "fromColumn": 8, + "lineNumber": 3, + "toColumn": 8, }, ], }, ], - "code": "# Hi there -{/* bar */}", + "code": "const x = 1 +const y = 2 +const cy = 2 + y; +const fy = 3;", } `; -exports[`extract annottations from mdx 2`] = ` +exports[`extract annotation with inline regex 2`] = ` { - "lang": "mdx", + "lang": "javascript", "lines": [ { "lineNumber": 1, "tokens": [ { - "content": "# ", + "content": "const ", "style": { "color": "#569CD6", - "fontWeight": "bold", }, }, { - "annotationName": "foo", - "annotationQuery": "", - "fromColumn": 3, - "toColumn": 5, - "tokens": [ - { - "content": "Hi ", - "style": { - "color": "#569CD6", - "fontWeight": "bold", - }, - }, - ], + "content": "x", + "style": { + "color": "#4FC1FF", + }, }, { - "content": "there", + "content": " = ", "style": { - "color": "#569CD6", - "fontWeight": "bold", + "color": "#D4D4D4", + }, + }, + { + "content": "1", + "style": { + "color": "#B5CEA8", }, }, ], @@ -281,52 +260,1203 @@ exports[`extract annottations from mdx 2`] = ` "lineNumber": 2, "tokens": [ { - "content": "{", + "content": "const ", "style": { - "color": "#CE9178", + "color": "#569CD6", }, }, { - "content": "/* bar */", + "content": "y", "style": { - "color": "#6A9955", + "color": "#4FC1FF", }, }, { - "content": "}", + "content": " = ", "style": { - "color": "#CE9178", + "color": "#D4D4D4", + }, + }, + { + "content": "2", + "style": { + "color": "#B5CEA8", }, }, ], }, - ], - "style": { - "background": "#1E1E1E", - "color": "#D4D4D4", - }, -} -`; - -exports[`extract annottations from text 1`] = ` -{ - "annotations": [], - "code": "const x = 1; -// foo[3:5] -const y = 2;", -} + { + "lineNumber": 3, + "tokens": [ + { + "content": "const ", + "style": { + "color": "#569CD6", + }, + }, + { + "content": "c", + "style": { + "color": "#4FC1FF", + }, + }, + { + "annotationName": "Focus", + "annotationQuery": "bar", + "fromColumn": 8, + "toColumn": 8, + "tokens": [ + { + "content": "y", + "style": { + "color": "#4FC1FF", + }, + }, + ], + }, + { + "content": " = ", + "style": { + "color": "#D4D4D4", + }, + }, + { + "content": "2", + "style": { + "color": "#B5CEA8", + }, + }, + { + "content": " + ", + "style": { + "color": "#D4D4D4", + }, + }, + { + "content": "y", + "style": { + "color": "#9CDCFE", + }, + }, + { + "content": ";", + "style": { + "color": "#D4D4D4", + }, + }, + ], + }, + { + "lineNumber": 4, + "tokens": [ + { + "content": "const ", + "style": { + "color": "#569CD6", + }, + }, + { + "content": "fy", + "style": { + "color": "#4FC1FF", + }, + }, + { + "content": " = ", + "style": { + "color": "#D4D4D4", + }, + }, + { + "content": "3", + "style": { + "color": "#B5CEA8", + }, + }, + { + "content": ";", + "style": { + "color": "#D4D4D4", + }, + }, + ], + }, + ], + "style": { + "background": "#1E1E1E", + "color": "#D4D4D4", + }, +} +`; + +exports[`extract annotation with multiline inline regex 1`] = ` +{ + "annotations": [ + { + "name": "Fold", + "query": "q", + "ranges": [ + { + "fromColumn": 26, + "lineNumber": 2, + "toColumn": 35, + }, + { + "fromColumn": 22, + "lineNumber": 3, + "toColumn": 34, + }, + { + "fromColumn": 51, + "lineNumber": 3, + "toColumn": 51, + }, + ], + }, + ], + "code": "function C() { + return
+ Hello +
+}", +} +`; + +exports[`extract annotation with multiline inline regex 2`] = ` +{ + "lang": "javascript", + "lines": [ + { + "lineNumber": 1, + "tokens": [ + { + "content": "function ", + "style": { + "color": "#569CD6", + }, + }, + { + "content": "C", + "style": { + "color": "#DCDCAA", + }, + }, + { + "content": "() {", + "style": { + "color": "#D4D4D4", + }, + }, + ], + }, + { + "lineNumber": 2, + "tokens": [ + { + "content": " return ", + "style": { + "color": "#C586C0", + }, + }, + { + "content": "<", + "style": { + "color": "#808080", + }, + }, + { + "content": "div ", + "style": { + "color": "#569CD6", + }, + }, + { + "content": "className", + "style": { + "color": "#9CDCFE", + }, + }, + { + "content": "=", + "style": { + "color": "#D4D4D4", + }, + }, + { + "content": """, + "style": { + "color": "#CE9178", + }, + }, + { + "annotationName": "Fold", + "annotationQuery": "q", + "fromColumn": 26, + "toColumn": 35, + "tokens": [ + { + "content": "bg-red-500", + "style": { + "color": "#CE9178", + }, + }, + ], + }, + { + "content": """, + "style": { + "color": "#CE9178", + }, + }, + { + "content": ">", + "style": { + "color": "#808080", + }, + }, + ], + }, + { + "lineNumber": 3, + "tokens": [ + { + "content": " <", + "style": { + "color": "#808080", + }, + }, + { + "content": "span ", + "style": { + "color": "#569CD6", + }, + }, + { + "content": "className", + "style": { + "color": "#9CDCFE", + }, + }, + { + "content": "=", + "style": { + "color": "#D4D4D4", + }, + }, + { + "content": """, + "style": { + "color": "#CE9178", + }, + }, + { + "annotationName": "Fold", + "annotationQuery": "q", + "fromColumn": 22, + "toColumn": 34, + "tokens": [ + { + "content": "text-blue-500", + "style": { + "color": "#CE9178", + }, + }, + ], + }, + { + "content": """, + "style": { + "color": "#CE9178", + }, + }, + { + "content": "><", + "style": { + "color": "#808080", + }, + }, + { + "content": "a ", + "style": { + "color": "#569CD6", + }, + }, + { + "content": "className", + "style": { + "color": "#9CDCFE", + }, + }, + { + "content": "=", + "style": { + "color": "#D4D4D4", + }, + }, + { + "content": """, + "style": { + "color": "#CE9178", + }, + }, + { + "annotationName": "Fold", + "annotationQuery": "q", + "fromColumn": 51, + "toColumn": 51, + "tokens": [ + { + "content": "x", + "style": { + "color": "#CE9178", + }, + }, + ], + }, + { + "content": """, + "style": { + "color": "#CE9178", + }, + }, + { + "content": ">", + "style": { + "color": "#808080", + }, + }, + { + "content": "Hello", + "style": { + "color": "#D4D4D4", + }, + }, + { + "content": "", + "style": { + "color": "#808080", + }, + }, + ], + }, + { + "lineNumber": 4, + "tokens": [ + { + "content": " ", + "style": { + "color": "#808080", + }, + }, + ], + }, + { + "lineNumber": 5, + "tokens": [ + { + "content": "}", + "style": { + "color": "#D4D4D4", + }, + }, + ], + }, + ], + "style": { + "background": "#1E1E1E", + "color": "#D4D4D4", + }, +} +`; + +exports[`extract annottations 1`] = ` +{ + "annotations": [ + { + "name": "foo", + "query": "", + "ranges": [ + { + "fromLineNumber": 2, + "toLineNumber": 2, + }, + ], + }, + ], + "code": "const x = 1; +const y = 2;", +} +`; + +exports[`extract annottations 2`] = ` +{ + "lang": "javascript", + "lines": [ + { + "lineNumber": 1, + "tokens": [ + { + "content": "const ", + "style": { + "color": "#569CD6", + }, + }, + { + "content": "x", + "style": { + "color": "#4FC1FF", + }, + }, + { + "content": " = ", + "style": { + "color": "#D4D4D4", + }, + }, + { + "content": "1", + "style": { + "color": "#B5CEA8", + }, + }, + { + "content": ";", + "style": { + "color": "#D4D4D4", + }, + }, + ], + }, + { + "annotationName": "foo", + "annotationQuery": "", + "fromLineNumber": 2, + "lines": [ + { + "lineNumber": 2, + "tokens": [ + { + "content": "const ", + "style": { + "color": "#569CD6", + }, + }, + { + "content": "y", + "style": { + "color": "#4FC1FF", + }, + }, + { + "content": " = ", + "style": { + "color": "#D4D4D4", + }, + }, + { + "content": "2", + "style": { + "color": "#B5CEA8", + }, + }, + { + "content": ";", + "style": { + "color": "#D4D4D4", + }, + }, + ], + }, + ], + "toLineNumber": 2, + }, + ], + "style": { + "background": "#1E1E1E", + "color": "#D4D4D4", + }, +} +`; + +exports[`extract annottations from jsx 1`] = ` +{ + "annotations": [ + { + "name": "foo", + "query": "", + "ranges": [ + { + "fromColumn": 3, + "lineNumber": 2, + "toColumn": 5, + }, + ], + }, + ], + "code": "const x =
+ hey +
", +} +`; + +exports[`extract annottations from jsx 2`] = ` +{ + "lang": "mdx", + "lines": [ + { + "lineNumber": 1, + "tokens": [ + { + "content": "const x = ", + "style": { + "color": "#D4D4D4", + }, + }, + { + "content": "<", + "style": { + "color": "#808080", + }, + }, + { + "content": "div", + "style": { + "color": "#569CD6", + }, + }, + { + "content": ">", + "style": { + "color": "#808080", + }, + }, + ], + }, + { + "lineNumber": 2, + "tokens": [ + { + "content": " ", + "style": { + "color": "#D4D4D4", + }, + }, + { + "annotationName": "foo", + "annotationQuery": "", + "fromColumn": 3, + "toColumn": 5, + "tokens": [ + { + "content": "hey", + "style": { + "color": "#D4D4D4", + }, + }, + ], + }, + ], + }, + { + "lineNumber": 3, + "tokens": [ + { + "content": "", + "style": { + "color": "#808080", + }, + }, + ], + }, + ], + "style": { + "background": "#1E1E1E", + "color": "#D4D4D4", + }, +} +`; + +exports[`extract annottations from mdx 1`] = ` +{ + "annotations": [ + { + "name": "foo", + "query": "", + "ranges": [ + { + "fromColumn": 3, + "lineNumber": 1, + "toColumn": 5, + }, + ], + }, + ], + "code": "# Hi there +{/* bar */}", +} +`; + +exports[`extract annottations from mdx 2`] = ` +{ + "lang": "mdx", + "lines": [ + { + "lineNumber": 1, + "tokens": [ + { + "content": "# ", + "style": { + "color": "#569CD6", + "fontWeight": "bold", + }, + }, + { + "annotationName": "foo", + "annotationQuery": "", + "fromColumn": 3, + "toColumn": 5, + "tokens": [ + { + "content": "Hi ", + "style": { + "color": "#569CD6", + "fontWeight": "bold", + }, + }, + ], + }, + { + "content": "there", + "style": { + "color": "#569CD6", + "fontWeight": "bold", + }, + }, + ], + }, + { + "lineNumber": 2, + "tokens": [ + { + "content": "{", + "style": { + "color": "#CE9178", + }, + }, + { + "content": "/* bar */", + "style": { + "color": "#6A9955", + }, + }, + { + "content": "}", + "style": { + "color": "#CE9178", + }, + }, + ], + }, + ], + "style": { + "background": "#1E1E1E", + "color": "#D4D4D4", + }, +} +`; + +exports[`extract annottations from text 1`] = ` +{ + "annotations": [], + "code": "const x = 1; +// foo[3:5] +const y = 2;", +} +`; + +exports[`extract annottations from text 2`] = ` +{ + "lang": "text", + "lines": [ + { + "lineNumber": 1, + "tokens": [ + { + "content": "const x = 1;", + "style": {}, + }, + ], + }, + { + "lineNumber": 2, + "tokens": [ + { + "content": "// foo[3:5]", + "style": {}, + }, + ], + }, + { + "lineNumber": 3, + "tokens": [ + { + "content": "const y = 2;", + "style": {}, + }, + ], + }, + ], + "style": { + "background": "#1E1E1E", + "color": "#D4D4D4", + }, +} +`; + +exports[`extract annottations from txt 1`] = ` +{ + "annotations": [ + { + "name": "foo", + "query": "", + "ranges": [ + { + "fromColumn": 3, + "lineNumber": 2, + "toColumn": 5, + }, + ], + }, + ], + "code": "const x = 1; +const y = 2;", +} +`; + +exports[`extract annottations from txt 2`] = ` +{ + "lang": "txt", + "lines": [ + { + "lineNumber": 1, + "tokens": [ + { + "content": "const x = 1;", + "style": { + "color": "#D4D4D4", + }, + }, + ], + }, + { + "lineNumber": 2, + "tokens": [ + { + "content": "co", + "style": { + "color": "#D4D4D4", + }, + }, + { + "annotationName": "foo", + "annotationQuery": "", + "fromColumn": 3, + "toColumn": 5, + "tokens": [ + { + "content": "nst", + "style": { + "color": "#D4D4D4", + }, + }, + ], + }, + { + "content": " y = 2;", + "style": { + "color": "#D4D4D4", + }, + }, + ], + }, + ], + "style": { + "background": "#1E1E1E", + "color": "#D4D4D4", + }, +} +`; + +exports[`extract annottations with prefix 1`] = ` +{ + "annotations": [ + { + "name": "xy", + "query": "bar", + "ranges": [ + { + "fromColumn": 3, + "lineNumber": 3, + "toColumn": 5, + }, + ], + }, + ], + "code": "// xyz[3:5] foo +const x = 1; +const y = 2;", +} +`; + +exports[`extract annottations with prefix 2`] = ` +{ + "lang": "jsx", + "lines": [ + { + "lineNumber": 1, + "tokens": [ + { + "content": "// xyz[3:5] foo", + "style": { + "color": "#6A9955", + }, + }, + ], + }, + { + "lineNumber": 2, + "tokens": [ + { + "content": "const ", + "style": { + "color": "#569CD6", + }, + }, + { + "content": "x", + "style": { + "color": "#4FC1FF", + }, + }, + { + "content": " = ", + "style": { + "color": "#D4D4D4", + }, + }, + { + "content": "1", + "style": { + "color": "#B5CEA8", + }, + }, + { + "content": ";", + "style": { + "color": "#D4D4D4", + }, + }, + ], + }, + { + "lineNumber": 3, + "tokens": [ + { + "content": "co", + "style": { + "color": "#569CD6", + }, + }, + { + "annotationName": "xy", + "annotationQuery": "bar", + "fromColumn": 3, + "toColumn": 5, + "tokens": [ + { + "content": "nst", + "style": { + "color": "#569CD6", + }, + }, + ], + }, + { + "content": " ", + "style": { + "color": "#569CD6", + }, + }, + { + "content": "y", + "style": { + "color": "#4FC1FF", + }, + }, + { + "content": " = ", + "style": { + "color": "#D4D4D4", + }, + }, + { + "content": "2", + "style": { + "color": "#B5CEA8", + }, + }, + { + "content": ";", + "style": { + "color": "#D4D4D4", + }, + }, + ], + }, + ], + "style": { + "background": "#1E1E1E", + "color": "#D4D4D4", + }, +} `; -exports[`extract annottations from text 2`] = ` +exports[`extract empty annotation with inline regex 1`] = ` { - "lang": "text", + "annotations": [], + "code": "const x = 1 +const y = 2 +const c = 2; +const fy = 3;", +} +`; + +exports[`extract empty annotation with inline regex 2`] = ` +{ + "lang": "javascript", "lines": [ { "lineNumber": 1, "tokens": [ { - "content": "const x = 1;", - "style": {}, + "content": "const ", + "style": { + "color": "#569CD6", + }, + }, + { + "content": "x", + "style": { + "color": "#4FC1FF", + }, + }, + { + "content": " = ", + "style": { + "color": "#D4D4D4", + }, + }, + { + "content": "1", + "style": { + "color": "#B5CEA8", + }, + }, + ], + }, + { + "lineNumber": 2, + "tokens": [ + { + "content": "const ", + "style": { + "color": "#569CD6", + }, + }, + { + "content": "y", + "style": { + "color": "#4FC1FF", + }, + }, + { + "content": " = ", + "style": { + "color": "#D4D4D4", + }, + }, + { + "content": "2", + "style": { + "color": "#B5CEA8", + }, + }, + ], + }, + { + "lineNumber": 3, + "tokens": [ + { + "content": "const ", + "style": { + "color": "#569CD6", + }, + }, + { + "content": "c", + "style": { + "color": "#4FC1FF", + }, + }, + { + "content": " = ", + "style": { + "color": "#D4D4D4", + }, + }, + { + "content": "2", + "style": { + "color": "#B5CEA8", + }, + }, + { + "content": ";", + "style": { + "color": "#D4D4D4", + }, + }, + ], + }, + { + "lineNumber": 4, + "tokens": [ + { + "content": "const ", + "style": { + "color": "#569CD6", + }, + }, + { + "content": "fy", + "style": { + "color": "#4FC1FF", + }, + }, + { + "content": " = ", + "style": { + "color": "#D4D4D4", + }, + }, + { + "content": "3", + "style": { + "color": "#B5CEA8", + }, + }, + { + "content": ";", + "style": { + "color": "#D4D4D4", + }, + }, + ], + }, + ], + "style": { + "background": "#1E1E1E", + "color": "#D4D4D4", + }, +} +`; + +exports[`extract empty line annotation with regex 1`] = ` +{ + "annotations": [], + "code": "const y = 2 +const c = 2;", +} +`; + +exports[`extract empty line annotation with regex 2`] = ` +{ + "lang": "javascript", + "lines": [ + { + "lineNumber": 1, + "tokens": [ + { + "content": "const ", + "style": { + "color": "#569CD6", + }, + }, + { + "content": "y", + "style": { + "color": "#4FC1FF", + }, + }, + { + "content": " = ", + "style": { + "color": "#D4D4D4", + }, + }, + { + "content": "2", + "style": { + "color": "#B5CEA8", + }, }, ], }, @@ -334,17 +1464,34 @@ exports[`extract annottations from text 2`] = ` "lineNumber": 2, "tokens": [ { - "content": "// foo[3:5]", - "style": {}, + "content": "const ", + "style": { + "color": "#569CD6", + }, }, - ], - }, - { - "lineNumber": 3, - "tokens": [ { - "content": "const y = 2;", - "style": {}, + "content": "c", + "style": { + "color": "#4FC1FF", + }, + }, + { + "content": " = ", + "style": { + "color": "#D4D4D4", + }, + }, + { + "content": "2", + "style": { + "color": "#B5CEA8", + }, + }, + { + "content": ";", + "style": { + "color": "#D4D4D4", + }, }, ], }, @@ -356,71 +1503,190 @@ exports[`extract annottations from text 2`] = ` } `; -exports[`extract annottations from txt 1`] = ` +exports[`extract line annotation with global regex 1`] = ` { "annotations": [ { - "name": "foo", - "query": "", + "name": "Focus", + "query": "bar", "ranges": [ { - "fromColumn": 3, - "lineNumber": 2, - "toColumn": 5, + "fromLineNumber": 3, + "toLineNumber": 3, + }, + { + "fromLineNumber": 4, + "toLineNumber": 4, }, ], }, ], - "code": "const x = 1; -const y = 2;", + "code": "const x = 1 +const y = 2 +const cy = 2 + y; +const fy = 3;", } `; -exports[`extract annottations from txt 2`] = ` +exports[`extract line annotation with global regex 2`] = ` { - "lang": "txt", + "lang": "javascript", "lines": [ { "lineNumber": 1, "tokens": [ { - "content": "const x = 1;", + "content": "const ", + "style": { + "color": "#569CD6", + }, + }, + { + "content": "x", + "style": { + "color": "#4FC1FF", + }, + }, + { + "content": " = ", "style": { "color": "#D4D4D4", }, }, + { + "content": "1", + "style": { + "color": "#B5CEA8", + }, + }, ], }, { "lineNumber": 2, "tokens": [ { - "content": "co", + "content": "const ", + "style": { + "color": "#569CD6", + }, + }, + { + "content": "y", + "style": { + "color": "#4FC1FF", + }, + }, + { + "content": " = ", "style": { "color": "#D4D4D4", }, }, { - "annotationName": "foo", - "annotationQuery": "", - "fromColumn": 3, - "toColumn": 5, + "content": "2", + "style": { + "color": "#B5CEA8", + }, + }, + ], + }, + { + "annotationName": "Focus", + "annotationQuery": "bar", + "fromLineNumber": 3, + "lines": [ + { + "lineNumber": 3, "tokens": [ { - "content": "nst", + "content": "const ", + "style": { + "color": "#569CD6", + }, + }, + { + "content": "cy", + "style": { + "color": "#4FC1FF", + }, + }, + { + "content": " = ", + "style": { + "color": "#D4D4D4", + }, + }, + { + "content": "2", + "style": { + "color": "#B5CEA8", + }, + }, + { + "content": " + ", + "style": { + "color": "#D4D4D4", + }, + }, + { + "content": "y", + "style": { + "color": "#9CDCFE", + }, + }, + { + "content": ";", "style": { "color": "#D4D4D4", }, }, ], }, + ], + "toLineNumber": 3, + }, + { + "annotationName": "Focus", + "annotationQuery": "bar", + "fromLineNumber": 4, + "lines": [ { - "content": " y = 2;", - "style": { - "color": "#D4D4D4", - }, + "lineNumber": 4, + "tokens": [ + { + "content": "const ", + "style": { + "color": "#569CD6", + }, + }, + { + "content": "fy", + "style": { + "color": "#4FC1FF", + }, + }, + { + "content": " = ", + "style": { + "color": "#D4D4D4", + }, + }, + { + "content": "3", + "style": { + "color": "#B5CEA8", + }, + }, + { + "content": ";", + "style": { + "color": "#D4D4D4", + }, + }, + ], }, ], + "toLineNumber": 4, }, ], "style": { @@ -430,44 +1696,32 @@ exports[`extract annottations from txt 2`] = ` } `; -exports[`extract annottations with prefix 1`] = ` +exports[`extract line annotation with regex 1`] = ` { "annotations": [ { - "name": "xy", + "name": "Focus", "query": "bar", "ranges": [ { - "fromColumn": 3, - "lineNumber": 3, - "toColumn": 5, + "fromLineNumber": 2, + "toLineNumber": 2, }, ], }, ], - "code": "// xyz[3:5] foo -const x = 1; -const y = 2;", + "code": "const y = 2 +const cy = 2; +const fy = 3;", } `; -exports[`extract annottations with prefix 2`] = ` +exports[`extract line annotation with regex 2`] = ` { - "lang": "jsx", + "lang": "javascript", "lines": [ { "lineNumber": 1, - "tokens": [ - { - "content": "// xyz[3:5] foo", - "style": { - "color": "#6A9955", - }, - }, - ], - }, - { - "lineNumber": 2, "tokens": [ { "content": "const ", @@ -476,7 +1730,7 @@ exports[`extract annottations with prefix 2`] = ` }, }, { - "content": "x", + "content": "y", "style": { "color": "#4FC1FF", }, @@ -488,50 +1742,67 @@ exports[`extract annottations with prefix 2`] = ` }, }, { - "content": "1", + "content": "2", "style": { "color": "#B5CEA8", }, }, - { - "content": ";", - "style": { - "color": "#D4D4D4", - }, - }, ], }, { - "lineNumber": 3, - "tokens": [ - { - "content": "co", - "style": { - "color": "#569CD6", - }, - }, + "annotationName": "Focus", + "annotationQuery": "bar", + "fromLineNumber": 2, + "lines": [ { - "annotationName": "xy", - "annotationQuery": "bar", - "fromColumn": 3, - "toColumn": 5, + "lineNumber": 2, "tokens": [ { - "content": "nst", + "content": "const ", "style": { "color": "#569CD6", }, }, + { + "content": "cy", + "style": { + "color": "#4FC1FF", + }, + }, + { + "content": " = ", + "style": { + "color": "#D4D4D4", + }, + }, + { + "content": "2", + "style": { + "color": "#B5CEA8", + }, + }, + { + "content": ";", + "style": { + "color": "#D4D4D4", + }, + }, ], }, + ], + "toLineNumber": 2, + }, + { + "lineNumber": 3, + "tokens": [ { - "content": " ", + "content": "const ", "style": { "color": "#569CD6", }, }, { - "content": "y", + "content": "fy", "style": { "color": "#4FC1FF", }, @@ -543,7 +1814,7 @@ exports[`extract annottations with prefix 2`] = ` }, }, { - "content": "2", + "content": "3", "style": { "color": "#B5CEA8", }, diff --git a/lib/test/annotations.ts b/lib/test/annotations.ts index eeb1fe3..090dd0d 100644 --- a/lib/test/annotations.ts +++ b/lib/test/annotations.ts @@ -91,6 +91,95 @@ const y = 2;`.trim(); expect(extracted).toMatchSnapshot(); expect(highlighted).toMatchSnapshot(); }); + + test("extract empty line annotation with regex", async () => { + const code = ` +const y = 2 +// !Focus(/y/) bar +const c = 2;`.trim(); + + const { extracted, highlighted } = await extract(code, "js"); + expect(extracted).toMatchSnapshot(); + expect(highlighted).toMatchSnapshot(); + }); + + test("extract line annotation with regex", async () => { + const code = ` +const y = 2 +// !Focus(/y/) bar +const cy = 2; +const fy = 3;`.trim(); + + const { extracted, highlighted } = await extract(code, "js"); + expect(extracted).toMatchSnapshot(); + expect(highlighted).toMatchSnapshot(); + }); + + test("extract line annotation with global regex", async () => { + const code = ` +const x = 1 +const y = 2 +// !Focus(/y/g) bar +const cy = 2 + y; +const fy = 3;`.trim(); + + const { extracted, highlighted } = await extract(code, "js"); + expect(extracted).toMatchSnapshot(); + expect(highlighted).toMatchSnapshot(); + }); + + test("extract empty annotation with inline regex", async () => { + const code = ` +const x = 1 +const y = 2 +// !Focus[/y/] bar +const c = 2; +const fy = 3;`.trim(); + + const { extracted, highlighted } = await extract(code, "js"); + expect(extracted).toMatchSnapshot(); + expect(highlighted).toMatchSnapshot(); + }); + + test("extract annotation with inline regex", async () => { + const code = ` +const x = 1 +const y = 2 +// !Focus[/y/] bar +const cy = 2 + y; +const fy = 3;`.trim(); + + const { extracted, highlighted } = await extract(code, "js"); + expect(extracted).toMatchSnapshot(); + expect(highlighted).toMatchSnapshot(); + }); + + test("extract annotation with inline global regex", async () => { + const code = ` +const x = 1 +const y = 2 +// !Focus[/y/g] bar +const cy = 2 + y; +const fy = 3;`.trim(); + + const { extracted, highlighted } = await extract(code, "js"); + expect(extracted).toMatchSnapshot(); + expect(highlighted).toMatchSnapshot(); + }); + + test("extract annotation with multiline inline regex", async () => { + const code = ` +function C() { + // !Fold[/className="(.*?)"/gm] q + return
+ Hello +
+}`.trim(); + + const { extracted, highlighted } = await extract(code, "js"); + expect(extracted).toMatchSnapshot(); + expect(highlighted).toMatchSnapshot(); + }); } const extractor = (comment: string) => {