toyon 0.5.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. package/README.md +2 -0
  2. package/dist/cli.js +5132 -24
  3. package/dist/daemon.js +1016 -316
  4. package/dist/shell/assets/{Editor-DR-GTFmf.js → Editor-D5UJRxLO.js} +4 -4
  5. package/dist/shell/assets/{XTerm-B3kT_naP.js → XTerm-l6IDHxt8.js} +1 -1
  6. package/dist/shell/assets/{cssMode-CB4CczRa.js → cssMode-DIt1Onbo.js} +1 -1
  7. package/dist/shell/assets/{freemarker2-Wjq3dVyB.js → freemarker2-BlnMjxhl.js} +1 -1
  8. package/dist/shell/assets/{grammar-yCr7BdNP.js → grammar-xCgG7hS1.js} +1 -1
  9. package/dist/shell/assets/{handlebars-Bjvi6pTu.js → handlebars-CgcpCzmy.js} +1 -1
  10. package/dist/shell/assets/{html-iB2mKeN2.js → html-yqzA9zjA.js} +1 -1
  11. package/dist/shell/assets/{htmlMode-DtZVhckD.js → htmlMode-AyUHvgCk.js} +1 -1
  12. package/dist/shell/assets/index-BGLn9_S8.js +241 -0
  13. package/dist/shell/assets/index-Cm07OHxH.css +1 -0
  14. package/dist/shell/assets/{javascript-BpuIkItm.js → javascript-CYZ-NuGG.js} +1 -1
  15. package/dist/shell/assets/{jsonMode-QCLe5ypz.js → jsonMode-BpybSxrR.js} +1 -1
  16. package/dist/shell/assets/{liquid-CQI6mzhA.js → liquid-BHHjN7T9.js} +1 -1
  17. package/dist/shell/assets/{lspLanguageFeatures-DqXzGsHQ.js → lspLanguageFeatures-CHyCsA1P.js} +1 -1
  18. package/dist/shell/assets/{mdx-D2Unh-By.js → mdx-CCgYQauJ.js} +1 -1
  19. package/dist/shell/assets/{python-LLSqiJ4D.js → python-C1JulLv8.js} +1 -1
  20. package/dist/shell/assets/{razor-CJ2qsTB8.js → razor-Dj4sWgNm.js} +1 -1
  21. package/dist/shell/assets/{tsMode-CwjjHUH5.js → tsMode-D1gKgsY6.js} +1 -1
  22. package/dist/shell/assets/{xml-BzqCyEOW.js → xml-BHUNgL0o.js} +1 -1
  23. package/dist/shell/assets/{yaml-N1Bfi3ds.js → yaml-CetvwW8L.js} +1 -1
  24. package/dist/shell/index.html +2 -2
  25. package/package.json +1 -1
  26. package/dist/shell/assets/index-DVg10dTN.js +0 -237
  27. package/dist/shell/assets/index-wt4cLIYn.css +0 -1
@@ -1,4 +1,4 @@
1
- import{r as fe,m as Xr,c as jr,d as Gr,u as Jr,j as Zr,h as Qr}from"./index-DVg10dTN.js";/**
1
+ import{r as fe,m as Xr,c as jr,d as Gr,u as Jr,j as Zr,h as Qr}from"./index-BGLn9_S8.js";/**
2
2
  * Copyright (c) 2014-2024 The xterm.js authors. All rights reserved.
3
3
  * @license MIT
4
4
  *
@@ -1 +1 @@
1
- import{c as h,l as s}from"./Editor-DR-GTFmf.js";import{C as c,H as u,D as p,a as m,R as f,b as _,c as w,d as k,F as v,e as D,S as P,f as R,g as I}from"./lspLanguageFeatures-DqXzGsHQ.js";import{h as y,i as T,j as U,t as x,k as j}from"./lspLanguageFeatures-DqXzGsHQ.js";import"./index-DVg10dTN.js";import"./grammar-yCr7BdNP.js";const C=120*1e3;class W{constructor(n){this._defaults=n,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval(()=>this._checkIfIdle(),30*1e3),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker())}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){if(!this._worker)return;Date.now()-this._lastUsedTime>C&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||(this._worker=h({moduleId:"vs/language/css/cssWorker",createWorker:()=>new Worker(new URL("/assets/css.worker-CqwWTjeG.js",import.meta.url),{type:"module"}),label:this._defaults.languageId,createData:{options:this._defaults.options,languageId:this._defaults.languageId}}),this._client=this._worker.getProxy()),this._client}getLanguageServiceWorker(...n){let e;return this._getClient().then(a=>{e=a}).then(a=>{if(this._worker)return this._worker.withSyncedResources(n)}).then(a=>e)}}function L(o){const n=[],e=[],a=new W(o);n.push(a);const r=(...t)=>a.getLanguageServiceWorker(...t);function l(){const{languageId:t,modeConfiguration:i}=o;g(e),i.completionItems&&e.push(s.registerCompletionItemProvider(t,new c(r,["/","-",":"]))),i.hovers&&e.push(s.registerHoverProvider(t,new u(r))),i.documentHighlights&&e.push(s.registerDocumentHighlightProvider(t,new p(r))),i.definitions&&e.push(s.registerDefinitionProvider(t,new m(r))),i.references&&e.push(s.registerReferenceProvider(t,new f(r))),i.documentSymbols&&e.push(s.registerDocumentSymbolProvider(t,new _(r))),i.rename&&e.push(s.registerRenameProvider(t,new w(r))),i.colors&&e.push(s.registerColorProvider(t,new k(r))),i.foldingRanges&&e.push(s.registerFoldingRangeProvider(t,new v(r))),i.diagnostics&&e.push(new D(t,r,o.onDidChange)),i.selectionRanges&&e.push(s.registerSelectionRangeProvider(t,new P(r))),i.documentFormattingEdits&&e.push(s.registerDocumentFormattingEditProvider(t,new R(r))),i.documentRangeFormattingEdits&&e.push(s.registerDocumentRangeFormattingEditProvider(t,new I(r)))}return l(),n.push(d(e)),d(n)}function d(o){return{dispose:()=>g(o)}}function g(o){for(;o.length;)o.pop().dispose()}export{c as CompletionAdapter,m as DefinitionAdapter,D as DiagnosticsAdapter,k as DocumentColorAdapter,R as DocumentFormattingEditProvider,p as DocumentHighlightAdapter,y as DocumentLinkAdapter,I as DocumentRangeFormattingEditProvider,_ as DocumentSymbolAdapter,v as FoldingRangeAdapter,u as HoverAdapter,f as ReferenceAdapter,w as RenameAdapter,P as SelectionRangeAdapter,W as WorkerManager,T as fromPosition,U as fromRange,L as setupMode,x as toRange,j as toTextEdit};
1
+ import{c as h,l as s}from"./Editor-D5UJRxLO.js";import{C as c,H as u,D as p,a as m,R as f,b as _,c as w,d as k,F as v,e as D,S as P,f as R,g as I}from"./lspLanguageFeatures-CHyCsA1P.js";import{h as y,i as T,j as U,t as x,k as j}from"./lspLanguageFeatures-CHyCsA1P.js";import"./index-BGLn9_S8.js";import"./grammar-xCgG7hS1.js";const C=120*1e3;class W{constructor(n){this._defaults=n,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval(()=>this._checkIfIdle(),30*1e3),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker())}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){if(!this._worker)return;Date.now()-this._lastUsedTime>C&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||(this._worker=h({moduleId:"vs/language/css/cssWorker",createWorker:()=>new Worker(new URL("/assets/css.worker-CqwWTjeG.js",import.meta.url),{type:"module"}),label:this._defaults.languageId,createData:{options:this._defaults.options,languageId:this._defaults.languageId}}),this._client=this._worker.getProxy()),this._client}getLanguageServiceWorker(...n){let e;return this._getClient().then(a=>{e=a}).then(a=>{if(this._worker)return this._worker.withSyncedResources(n)}).then(a=>e)}}function L(o){const n=[],e=[],a=new W(o);n.push(a);const r=(...t)=>a.getLanguageServiceWorker(...t);function l(){const{languageId:t,modeConfiguration:i}=o;g(e),i.completionItems&&e.push(s.registerCompletionItemProvider(t,new c(r,["/","-",":"]))),i.hovers&&e.push(s.registerHoverProvider(t,new u(r))),i.documentHighlights&&e.push(s.registerDocumentHighlightProvider(t,new p(r))),i.definitions&&e.push(s.registerDefinitionProvider(t,new m(r))),i.references&&e.push(s.registerReferenceProvider(t,new f(r))),i.documentSymbols&&e.push(s.registerDocumentSymbolProvider(t,new _(r))),i.rename&&e.push(s.registerRenameProvider(t,new w(r))),i.colors&&e.push(s.registerColorProvider(t,new k(r))),i.foldingRanges&&e.push(s.registerFoldingRangeProvider(t,new v(r))),i.diagnostics&&e.push(new D(t,r,o.onDidChange)),i.selectionRanges&&e.push(s.registerSelectionRangeProvider(t,new P(r))),i.documentFormattingEdits&&e.push(s.registerDocumentFormattingEditProvider(t,new R(r))),i.documentRangeFormattingEdits&&e.push(s.registerDocumentRangeFormattingEditProvider(t,new I(r)))}return l(),n.push(d(e)),d(n)}function d(o){return{dispose:()=>g(o)}}function g(o){for(;o.length;)o.pop().dispose()}export{c as CompletionAdapter,m as DefinitionAdapter,D as DiagnosticsAdapter,k as DocumentColorAdapter,R as DocumentFormattingEditProvider,p as DocumentHighlightAdapter,y as DocumentLinkAdapter,I as DocumentRangeFormattingEditProvider,_ as DocumentSymbolAdapter,v as FoldingRangeAdapter,u as HoverAdapter,f as ReferenceAdapter,w as RenameAdapter,P as SelectionRangeAdapter,W as WorkerManager,T as fromPosition,U as fromRange,L as setupMode,x as toRange,j as toTextEdit};
@@ -1,3 +1,3 @@
1
- import{l as c}from"./Editor-DR-GTFmf.js";import"./index-DVg10dTN.js";import"./grammar-yCr7BdNP.js";const s=["assign","flush","ftl","return","global","import","include","break","continue","local","nested","nt","setting","stop","t","lt","rt","fallback"],d=["attempt","autoesc","autoEsc","compress","comment","escape","noescape","function","if","list","items","sep","macro","noparse","noParse","noautoesc","noAutoEsc","outputformat","switch","visit","recurse"],r={close:">",id:"angle",open:"<"},a={close:"\\]",id:"bracket",open:"\\["},F={close:"[>\\]]",id:"auto",open:"[<\\[]"},k={close:"\\}",id:"dollar",open1:"\\$",open2:"\\{"},p={close:"\\]",id:"bracket",open1:"\\[",open2:"="};function l(t){return{brackets:[["<",">"],["[","]"],["(",")"],["{","}"]],comments:{blockComment:[`${t.open}--`,`--${t.close}`]},autoCloseBefore:`
1
+ import{l as c}from"./Editor-D5UJRxLO.js";import"./index-BGLn9_S8.js";import"./grammar-xCgG7hS1.js";const s=["assign","flush","ftl","return","global","import","include","break","continue","local","nested","nt","setting","stop","t","lt","rt","fallback"],d=["attempt","autoesc","autoEsc","compress","comment","escape","noescape","function","if","list","items","sep","macro","noparse","noParse","noautoesc","noAutoEsc","outputformat","switch","visit","recurse"],r={close:">",id:"angle",open:"<"},a={close:"\\]",id:"bracket",open:"\\["},F={close:"[>\\]]",id:"auto",open:"[<\\[]"},k={close:"\\}",id:"dollar",open1:"\\$",open2:"\\{"},p={close:"\\]",id:"bracket",open1:"\\[",open2:"="};function l(t){return{brackets:[["<",">"],["[","]"],["(",")"],["{","}"]],comments:{blockComment:[`${t.open}--`,`--${t.close}`]},autoCloseBefore:`
2
2
  \r }]),.:;=`,autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string"]}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"}],folding:{markers:{start:new RegExp(`${t.open}#(?:${d.join("|")})([^/${t.close}]*(?!/)${t.close})[^${t.open}]*$`),end:new RegExp(`${t.open}/#(?:${d.join("|")})[\\r\\n\\t ]*>`)}},onEnterRules:[{beforeText:new RegExp(`${t.open}#(?!(?:${s.join("|")}))([a-zA-Z_]+)([^/${t.close}]*(?!/)${t.close})[^${t.open}]*$`),afterText:new RegExp(`^${t.open}/#([a-zA-Z_]+)[\\r\\n\\t ]*${t.close}$`),action:{indentAction:c.IndentAction.IndentOutdent}},{beforeText:new RegExp(`${t.open}#(?!(?:${s.join("|")}))([a-zA-Z_]+)([^/${t.close}]*(?!/)${t.close})[^${t.open}]*$`),action:{indentAction:c.IndentAction.Indent}}]}}function g(){return{brackets:[["<",">"],["[","]"],["(",")"],["{","}"]],autoCloseBefore:`
3
3
  \r }]),.:;=`,autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string"]}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"}],folding:{markers:{start:new RegExp(`[<\\[]#(?:${d.join("|")})([^/>\\]]*(?!/)[>\\]])[^<\\[]*$`),end:new RegExp(`[<\\[]/#(?:${d.join("|")})[\\r\\n\\t ]*>`)}},onEnterRules:[{beforeText:new RegExp(`[<\\[]#(?!(?:${s.join("|")}))([a-zA-Z_]+)([^/>\\]]*(?!/)[>\\]])[^[<\\[]]*$`),afterText:new RegExp("^[<\\[]/#([a-zA-Z_]+)[\\r\\n\\t ]*[>\\]]$"),action:{indentAction:c.IndentAction.IndentOutdent}},{beforeText:new RegExp(`[<\\[]#(?!(?:${s.join("|")}))([a-zA-Z_]+)([^/>\\]]*(?!/)[>\\]])[^[<\\[]]*$`),action:{indentAction:c.IndentAction.Indent}}]}}function _(t,n){const i=`_${t.id}_${n.id}`,e=u=>u.replace(/__id__/g,i),o=u=>{const m=u.source.replace(/__id__/g,i);return new RegExp(m,u.flags)};return{unicode:!0,includeLF:!1,start:e("default__id__"),ignoreCase:!1,defaultToken:"invalid",tokenPostfix:".freemarker2",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],[e("open__id__")]:new RegExp(t.open),[e("close__id__")]:new RegExp(t.close),[e("iOpen1__id__")]:new RegExp(n.open1),[e("iOpen2__id__")]:new RegExp(n.open2),[e("iClose__id__")]:new RegExp(n.close),[e("startTag__id__")]:o(/(@open__id__)(#)/),[e("endTag__id__")]:o(/(@open__id__)(\/#)/),[e("startOrEndTag__id__")]:o(/(@open__id__)(\/?#)/),[e("closeTag1__id__")]:o(/((?:@blank)*)(@close__id__)/),[e("closeTag2__id__")]:o(/((?:@blank)*\/?)(@close__id__)/),blank:/[ \t\n\r]/,keywords:["false","true","in","as","using"],directiveStartCloseTag1:/attempt|recover|sep|auto[eE]sc|no(?:autoe|AutoE)sc|compress|default|no[eE]scape|comment|no[pP]arse/,directiveStartCloseTag2:/else|break|continue|return|stop|flush|t|lt|rt|nt|nested|recurse|fallback|ftl/,directiveStartBlank:/if|else[iI]f|list|for[eE]ach|switch|case|assign|global|local|include|import|function|macro|transform|visit|stop|return|call|setting|output[fF]ormat|nested|recurse|escape|ftl|items/,directiveEndCloseTag1:/if|list|items|sep|recover|attempt|for[eE]ach|local|global|assign|function|macro|output[fF]ormat|auto[eE]sc|no(?:autoe|AutoE)sc|compress|transform|switch|escape|no[eE]scape/,escapedChar:/\\(?:[ntrfbgla\\'"\{=]|(?:x[0-9A-Fa-f]{1,4}))/,asciiDigit:/[0-9]/,integer:/[0-9]+/,nonEscapedIdStartChar:/[\$@-Z_a-z\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u1FFF\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183-\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3006\u3031-\u3035\u303B-\u303C\u3040-\u318F\u31A0-\u31BA\u31F0-\u31FF\u3300-\u337F\u3400-\u4DB5\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5-\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40-\uFB41\uFB43-\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,escapedIdChar:/\\[\-\.:#]/,idStartChar:/(?:@nonEscapedIdStartChar)|(?:@escapedIdChar)/,id:/(?:@idStartChar)(?:(?:@idStartChar)|(?:@asciiDigit))*/,specialHashKeys:/\*\*|\*|false|true|in|as|using/,namedSymbols:/&lt;=|&gt;=|\\lte|\\lt|&lt;|\\gte|\\gt|&gt;|&amp;&amp;|\\and|-&gt;|->|==|!=|\+=|-=|\*=|\/=|%=|\+\+|--|<=|&&|\|\||:|\.\.\.|\.\.\*|\.\.<|\.\.!|\?\?|=|<|\+|-|\*|\/|%|\||\.\.|\?|!|&|\.|,|;/,arrows:["->","-&gt;"],delimiters:[";",":",",","."],stringOperators:["lte","lt","gte","gt"],noParseTags:["noparse","noParse","comment"],tokenizer:{[e("default__id__")]:[{include:e("@directive_token__id__")},{include:e("@interpolation_and_text_token__id__")}],[e("fmExpression__id__.directive")]:[{include:e("@blank_and_expression_comment_token__id__")},{include:e("@directive_end_token__id__")},{include:e("@expression_token__id__")}],[e("fmExpression__id__.interpolation")]:[{include:e("@blank_and_expression_comment_token__id__")},{include:e("@expression_token__id__")},{include:e("@greater_operators_token__id__")}],[e("inParen__id__.plain")]:[{include:e("@blank_and_expression_comment_token__id__")},{include:e("@directive_end_token__id__")},{include:e("@expression_token__id__")}],[e("inParen__id__.gt")]:[{include:e("@blank_and_expression_comment_token__id__")},{include:e("@expression_token__id__")},{include:e("@greater_operators_token__id__")}],[e("noSpaceExpression__id__")]:[{include:e("@no_space_expression_end_token__id__")},{include:e("@directive_end_token__id__")},{include:e("@expression_token__id__")}],[e("unifiedCall__id__")]:[{include:e("@unified_call_token__id__")}],[e("singleString__id__")]:[{include:e("@string_single_token__id__")}],[e("doubleString__id__")]:[{include:e("@string_double_token__id__")}],[e("rawSingleString__id__")]:[{include:e("@string_single_raw_token__id__")}],[e("rawDoubleString__id__")]:[{include:e("@string_double_raw_token__id__")}],[e("expressionComment__id__")]:[{include:e("@expression_comment_token__id__")}],[e("noParse__id__")]:[{include:e("@no_parse_token__id__")}],[e("terseComment__id__")]:[{include:e("@terse_comment_token__id__")}],[e("directive_token__id__")]:[[o(/(?:@startTag__id__)(@directiveStartCloseTag1)(?:@closeTag1__id__)/),t.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${n.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${n.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive"},{cases:{"@noParseTags":{token:"tag",next:e("@noParse__id__.$3")},"@default":{token:"tag"}}},{token:"delimiter.directive"},{token:"@brackets.directive"}]],[o(/(?:@startTag__id__)(@directiveStartCloseTag2)(?:@closeTag2__id__)/),t.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${n.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${n.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag"},{token:"delimiter.directive"},{token:"@brackets.directive"}]],[o(/(?:@startTag__id__)(@directiveStartBlank)(@blank)/),t.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${n.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${n.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag"},{token:"",next:e("@fmExpression__id__.directive")}]],[o(/(?:@endTag__id__)(@directiveEndCloseTag1)(?:@closeTag1__id__)/),t.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${n.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${n.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag"},{token:"delimiter.directive"},{token:"@brackets.directive"}]],[o(/(@open__id__)(@)/),t.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${n.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${n.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive",next:e("@unifiedCall__id__")}]],[o(/(@open__id__)(\/@)((?:(?:@id)(?:\.(?:@id))*)?)(?:@closeTag1__id__)/),[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag"},{token:"delimiter.directive"},{token:"@brackets.directive"}]],[o(/(@open__id__)#--/),t.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${n.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${n.id}`}}}:{token:"comment",next:e("@terseComment__id__")}],[o(/(?:@startOrEndTag__id__)([a-zA-Z_]+)/),t.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${n.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${n.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag.invalid",next:e("@fmExpression__id__.directive")}]]],[e("interpolation_and_text_token__id__")]:[[o(/(@iOpen1__id__)(@iOpen2__id__)/),[{token:n.id==="bracket"?"@brackets.interpolation":"delimiter.interpolation"},{token:n.id==="bracket"?"delimiter.interpolation":"@brackets.interpolation",next:e("@fmExpression__id__.interpolation")}]],[/[\$#<\[\{]|(?:@blank)+|[^\$<#\[\{\n\r\t ]+/,{token:"source"}]],[e("string_single_token__id__")]:[[/[^'\\]/,{token:"string"}],[/@escapedChar/,{token:"string.escape"}],[/'/,{token:"string",next:"@pop"}]],[e("string_double_token__id__")]:[[/[^"\\]/,{token:"string"}],[/@escapedChar/,{token:"string.escape"}],[/"/,{token:"string",next:"@pop"}]],[e("string_single_raw_token__id__")]:[[/[^']+/,{token:"string.raw"}],[/'/,{token:"string.raw",next:"@pop"}]],[e("string_double_raw_token__id__")]:[[/[^"]+/,{token:"string.raw"}],[/"/,{token:"string.raw",next:"@pop"}]],[e("expression_token__id__")]:[[/(r?)(['"])/,{cases:{"r'":[{token:"keyword"},{token:"string.raw",next:e("@rawSingleString__id__")}],'r"':[{token:"keyword"},{token:"string.raw",next:e("@rawDoubleString__id__")}],"'":[{token:"source"},{token:"string",next:e("@singleString__id__")}],'"':[{token:"source"},{token:"string",next:e("@doubleString__id__")}]}}],[/(?:@integer)(?:\.(?:@integer))?/,{cases:{"(?:@integer)":{token:"number"},"@default":{token:"number.float"}}}],[/(\.)(@blank*)(@specialHashKeys)/,[{token:"delimiter"},{token:""},{token:"identifier"}]],[/(?:@namedSymbols)/,{cases:{"@arrows":{token:"meta.arrow"},"@delimiters":{token:"delimiter"},"@default":{token:"operators"}}}],[/@id/,{cases:{"@keywords":{token:"keyword.$0"},"@stringOperators":{token:"operators"},"@default":{token:"identifier"}}}],[/[\[\]\(\)\{\}]/,{cases:{"\\[":{cases:{"$S2==gt":{token:"@brackets",next:e("@inParen__id__.gt")},"@default":{token:"@brackets",next:e("@inParen__id__.plain")}}},"\\]":{cases:{...n.id==="bracket"?{"$S2==interpolation":{token:"@brackets.interpolation",next:"@popall"}}:{},...t.id==="bracket"?{"$S2==directive":{token:"@brackets.directive",next:"@popall"}}:{},[e("$S1==inParen__id__")]:{token:"@brackets",next:"@pop"},"@default":{token:"@brackets"}}},"\\(":{token:"@brackets",next:e("@inParen__id__.gt")},"\\)":{cases:{[e("$S1==inParen__id__")]:{token:"@brackets",next:"@pop"},"@default":{token:"@brackets"}}},"\\{":{cases:{"$S2==gt":{token:"@brackets",next:e("@inParen__id__.gt")},"@default":{token:"@brackets",next:e("@inParen__id__.plain")}}},"\\}":{cases:{...n.id==="bracket"?{}:{"$S2==interpolation":{token:"@brackets.interpolation",next:"@popall"}},[e("$S1==inParen__id__")]:{token:"@brackets",next:"@pop"},"@default":{token:"@brackets"}}}}}],[/\$\{/,{token:"delimiter.invalid"}]],[e("blank_and_expression_comment_token__id__")]:[[/(?:@blank)+/,{token:""}],[/[<\[][#!]--/,{token:"comment",next:e("@expressionComment__id__")}]],[e("directive_end_token__id__")]:[[/>/,t.id==="bracket"?{token:"operators"}:{token:"@brackets.directive",next:"@popall"}],[o(/(\/)(@close__id__)/),[{token:"delimiter.directive"},{token:"@brackets.directive",next:"@popall"}]]],[e("greater_operators_token__id__")]:[[/>/,{token:"operators"}],[/>=/,{token:"operators"}]],[e("no_space_expression_end_token__id__")]:[[/(?:@blank)+/,{token:"",switchTo:e("@fmExpression__id__.directive")}]],[e("unified_call_token__id__")]:[[/(@id)((?:@blank)+)/,[{token:"tag"},{token:"",next:e("@fmExpression__id__.directive")}]],[o(/(@id)(\/?)(@close__id__)/),[{token:"tag"},{token:"delimiter.directive"},{token:"@brackets.directive",next:"@popall"}]],[/./,{token:"@rematch",next:e("@noSpaceExpression__id__")}]],[e("no_parse_token__id__")]:[[o(/(@open__id__)(\/#?)([a-zA-Z]+)((?:@blank)*)(@close__id__)/),{cases:{"$S2==$3":[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag"},{token:""},{token:"@brackets.directive",next:"@popall"}],"$S2==comment":[{token:"comment"},{token:"comment"},{token:"comment"},{token:"comment"},{token:"comment"}],"@default":[{token:"source"},{token:"source"},{token:"source"},{token:"source"},{token:"source"}]}}],[/[^<\[\-]+|[<\[\-]/,{cases:{"$S2==comment":{token:"comment"},"@default":{token:"source"}}}]],[e("expression_comment_token__id__")]:[[/--[>\]]/,{token:"comment",next:"@pop"}],[/[^\->\]]+|[>\]\-]/,{token:"comment"}]],[e("terse_comment_token__id__")]:[[o(/--(?:@close__id__)/),{token:"comment",next:"@popall"}],[/[^<\[\-]+|[<\[\-]/,{token:"comment"}]]}}}function A(t){const n=_(r,t),i=_(a,t),e=_(F,t);return{...n,...i,...e,unicode:!0,includeLF:!1,start:`default_auto_${t.id}`,ignoreCase:!1,defaultToken:"invalid",tokenPostfix:".freemarker2",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],tokenizer:{...n.tokenizer,...i.tokenizer,...e.tokenizer}}}const $={conf:l(r),language:_(r,k)},E={conf:l(a),language:_(a,k)},B={conf:l(r),language:_(r,p)},D={conf:l(a),language:_(a,p)},C={conf:g(),language:A(k)},v={conf:g(),language:A(p)};export{B as TagAngleInterpolationBracket,$ as TagAngleInterpolationDollar,v as TagAutoInterpolationBracket,C as TagAutoInterpolationDollar,D as TagBracketInterpolationBracket,E as TagBracketInterpolationDollar};
@@ -1,4 +1,4 @@
1
- var jt=Object.defineProperty;var vt=(t,e,n)=>e in t?jt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var b=(t,e,n)=>vt(t,typeof e!="symbol"?e+"":e,n);import{_ as Ct}from"./index-DVg10dTN.js";var S=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function St(t){return an(t)}function an(t){return Array.isArray(t)?qt(t):t instanceof RegExp?t:typeof t=="object"?Et(t):t}function qt(t){let e=[];for(let n=0,a=t.length;n<a;n++)e[n]=an(t[n]);return e}function Et(t){let e={};for(let n in t)e[n]=an(t[n]);return e}function Tn(t,...e){return e.forEach(n=>{for(let a in n)t[a]=n[a]}),t}function In(t){const e=~t.lastIndexOf("/")||~t.lastIndexOf("\\");return e===0?t:~e===t.length-1?In(t.substring(0,t.length-1)):t.substr(~e+1)}var Re=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,me=class{static hasCaptures(t){return t===null?!1:(Re.lastIndex=0,Re.test(t))}static replaceCaptures(t,e,n){return t.replace(Re,(a,s,i,r)=>{let c=n[parseInt(s||i,10)];if(c){let o=e.substring(c.start,c.end);for(;o[0]===".";)o=o.substring(1);switch(r){case"downcase":return o.toLowerCase();case"upcase":return o.toUpperCase();default:return o}}else return a})}};function Pn(t,e){return t<e?-1:t>e?1:0}function Ln(t,e){if(t===null&&e===null)return 0;if(!t)return-1;if(!e)return 1;let n=t.length,a=e.length;if(n===a){for(let s=0;s<n;s++){let i=Pn(t[s],e[s]);if(i!==0)return i}return 0}return n-a}function bn(t){return!!(/^#[0-9a-f]{6}$/i.test(t)||/^#[0-9a-f]{8}$/i.test(t)||/^#[0-9a-f]{3}$/i.test(t)||/^#[0-9a-f]{4}$/i.test(t))}function On(t){return t.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var Mn=class{constructor(t){b(this,"cache",new Map);this.fn=t}get(t){if(this.cache.has(t))return this.cache.get(t);const e=this.fn(t);return this.cache.set(t,e),e}},fe=class{constructor(t,e,n){b(this,"_cachedMatchRoot",new Mn(t=>this._root.match(t)));this._colorMap=t,this._defaults=e,this._root=n}static createFromRawTheme(t,e){return this.createFromParsedTheme(Gt(t),e)}static createFromParsedTheme(t,e){return zt(t,e)}getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(t){if(t===null)return this._defaults;const e=t.scopeName,a=this._cachedMatchRoot.get(e).find(s=>At(t.parent,s.parentScopes));return a?new Dn(a.fontStyle,a.foreground,a.background):null}},Te=class ge{constructor(e,n){this.parent=e,this.scopeName=n}static push(e,n){for(const a of n)e=new ge(e,a);return e}static from(...e){let n=null;for(let a=0;a<e.length;a++)n=new ge(n,e[a]);return n}push(e){return new ge(this,e)}getSegments(){let e=this;const n=[];for(;e;)n.push(e.scopeName),e=e.parent;return n.reverse(),n}toString(){return this.getSegments().join(" ")}extends(e){return this===e?!0:this.parent===null?!1:this.parent.extends(e)}getExtensionIfDefined(e){const n=[];let a=this;for(;a&&a!==e;)n.push(a.scopeName),a=a.parent;return a===e?n.reverse():void 0}};function At(t,e){if(e.length===0)return!0;for(let n=0;n<e.length;n++){let a=e[n],s=!1;if(a===">"){if(n===e.length-1)return!1;a=e[++n],s=!0}for(;t&&!Nt(t.scopeName,a);){if(s)return!1;t=t.parent}if(!t)return!1;t=t.parent}return!0}function Nt(t,e){return e===t||t.startsWith(e)&&t[e.length]==="."}var Dn=class{constructor(t,e,n){this.fontStyle=t,this.foregroundId=e,this.backgroundId=n}};function Gt(t){if(!t)return[];if(!t.settings||!Array.isArray(t.settings))return[];let e=t.settings,n=[],a=0;for(let s=0,i=e.length;s<i;s++){let r=e[s];if(!r.settings)continue;let c;if(typeof r.scope=="string"){let u=r.scope;u=u.replace(/^[,]+/,""),u=u.replace(/[,]+$/,""),c=u.split(",")}else Array.isArray(r.scope)?c=r.scope:c=[""];let o=-1;if(typeof r.settings.fontStyle=="string"){o=0;let u=r.settings.fontStyle.split(" ");for(let p=0,d=u.length;p<d;p++)switch(u[p]){case"italic":o=o|1;break;case"bold":o=o|2;break;case"underline":o=o|4;break;case"strikethrough":o=o|8;break}}let l=null;typeof r.settings.foreground=="string"&&bn(r.settings.foreground)&&(l=r.settings.foreground);let m=null;typeof r.settings.background=="string"&&bn(r.settings.background)&&(m=r.settings.background);for(let u=0,p=c.length;u<p;u++){let g=c[u].trim().split(" "),x=g[g.length-1],$=null;g.length>1&&($=g.slice(0,g.length-1),$.reverse()),n[a++]=new Ft(x,$,s,o,l,m)}}return n}var Ft=class{constructor(t,e,n,a,s,i){this.scope=t,this.parentScopes=e,this.index=n,this.fontStyle=a,this.foreground=s,this.background=i}},F=(t=>(t[t.NotSet=-1]="NotSet",t[t.None=0]="None",t[t.Italic=1]="Italic",t[t.Bold=2]="Bold",t[t.Underline=4]="Underline",t[t.Strikethrough=8]="Strikethrough",t))(F||{});function zt(t,e){t.sort((o,l)=>{let m=Pn(o.scope,l.scope);return m!==0||(m=Ln(o.parentScopes,l.parentScopes),m!==0)?m:o.index-l.index});let n=0,a="#000000",s="#ffffff";for(;t.length>=1&&t[0].scope==="";){let o=t.shift();o.fontStyle!==-1&&(n=o.fontStyle),o.foreground!==null&&(a=o.foreground),o.background!==null&&(s=o.background)}let i=new Bt(e),r=new Dn(n,i.getId(a),i.getId(s)),c=new Tt(new Ue(0,null,-1,0,0),[]);for(let o=0,l=t.length;o<l;o++){let m=t[o];c.insert(0,m.scope,m.parentScopes,m.fontStyle,i.getId(m.foreground),i.getId(m.background))}return new fe(i,r,c)}var Bt=class{constructor(t){b(this,"_isFrozen");b(this,"_lastColorId");b(this,"_id2color");b(this,"_color2id");if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(t)){this._isFrozen=!0;for(let e=0,n=t.length;e<n;e++)this._color2id[t[e]]=e,this._id2color[e]=t[e]}else this._isFrozen=!1}getId(t){if(t===null)return 0;t=t.toUpperCase();let e=this._color2id[t];if(e)return e;if(this._isFrozen)throw new Error(`Missing color in color map - ${t}`);return e=++this._lastColorId,this._color2id[t]=e,this._id2color[e]=t,e}getColorMap(){return this._id2color.slice(0)}},Rt=Object.freeze([]),Ue=class Un{constructor(e,n,a,s,i){b(this,"scopeDepth");b(this,"parentScopes");b(this,"fontStyle");b(this,"foreground");b(this,"background");this.scopeDepth=e,this.parentScopes=n||Rt,this.fontStyle=a,this.foreground=s,this.background=i}clone(){return new Un(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let n=[];for(let a=0,s=e.length;a<s;a++)n[a]=e[a].clone();return n}acceptOverwrite(e,n,a,s){this.scopeDepth>e?console.log("how did this happen?"):this.scopeDepth=e,n!==-1&&(this.fontStyle=n),a!==0&&(this.foreground=a),s!==0&&(this.background=s)}},Tt=class Ze{constructor(e,n=[],a={}){b(this,"_rulesWithParentScopes");this._mainRule=e,this._children=a,this._rulesWithParentScopes=n}static _cmpBySpecificity(e,n){if(e.scopeDepth!==n.scopeDepth)return n.scopeDepth-e.scopeDepth;let a=0,s=0;for(;e.parentScopes[a]===">"&&a++,n.parentScopes[s]===">"&&s++,!(a>=e.parentScopes.length||s>=n.parentScopes.length);){const i=n.parentScopes[s].length-e.parentScopes[a].length;if(i!==0)return i;a++,s++}return n.parentScopes.length-e.parentScopes.length}match(e){if(e!==""){let a=e.indexOf("."),s,i;if(a===-1?(s=e,i=""):(s=e.substring(0,a),i=e.substring(a+1)),this._children.hasOwnProperty(s))return this._children[s].match(i)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(Ze._cmpBySpecificity),n}insert(e,n,a,s,i,r){if(n===""){this._doInsertHere(e,a,s,i,r);return}let c=n.indexOf("."),o,l;c===-1?(o=n,l=""):(o=n.substring(0,c),l=n.substring(c+1));let m;this._children.hasOwnProperty(o)?m=this._children[o]:(m=new Ze(this._mainRule.clone(),Ue.cloneArr(this._rulesWithParentScopes)),this._children[o]=m),m.insert(e+1,l,a,s,i,r)}_doInsertHere(e,n,a,s,i){if(n===null){this._mainRule.acceptOverwrite(e,a,s,i);return}for(let r=0,c=this._rulesWithParentScopes.length;r<c;r++){let o=this._rulesWithParentScopes[r];if(Ln(o.parentScopes,n)===0){o.acceptOverwrite(e,a,s,i);return}}a===-1&&(a=this._mainRule.fontStyle),s===0&&(s=this._mainRule.foreground),i===0&&(i=this._mainRule.background),this._rulesWithParentScopes.push(new Ue(e,n,a,s,i))}},X=class I{static toBinaryStr(e){return e.toString(2).padStart(32,"0")}static print(e){const n=I.getLanguageId(e),a=I.getTokenType(e),s=I.getFontStyle(e),i=I.getForeground(e),r=I.getBackground(e);console.log({languageId:n,tokenType:a,fontStyle:s,foreground:i,background:r})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return(e&1024)!==0}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(e,n,a,s,i,r,c){let o=I.getLanguageId(e),l=I.getTokenType(e),m=I.containsBalancedBrackets(e)?1:0,u=I.getFontStyle(e),p=I.getForeground(e),d=I.getBackground(e);return n!==0&&(o=n),a!==8&&(l=a),s!==null&&(m=s?1:0),i!==-1&&(u=i),r!==0&&(p=r),c!==0&&(d=c),(o<<0|l<<8|m<<10|u<<11|p<<15|d<<24)>>>0}};function ye(t,e){const n=[],a=It(t);let s=a.next();for(;s!==null;){let o=0;if(s.length===2&&s.charAt(1)===":"){switch(s.charAt(0)){case"R":o=1;break;case"L":o=-1;break;default:console.log(`Unknown priority ${s} in scope selector`)}s=a.next()}let l=r();if(n.push({matcher:l,priority:o}),s!==",")break;s=a.next()}return n;function i(){if(s==="-"){s=a.next();const o=i();return l=>!!o&&!o(l)}if(s==="("){s=a.next();const o=c();return s===")"&&(s=a.next()),o}if(gn(s)){const o=[];do o.push(s),s=a.next();while(gn(s));return l=>e(o,l)}return null}function r(){const o=[];let l=i();for(;l;)o.push(l),l=i();return m=>o.every(u=>u(m))}function c(){const o=[];let l=r();for(;l&&(o.push(l),s==="|"||s===",");){do s=a.next();while(s==="|"||s===",");l=r()}return m=>o.some(u=>u(m))}}function gn(t){return!!t&&!!t.match(/[\w\.:]+/)}function It(t){let e=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=e.exec(t);return{next:()=>{if(!n)return null;const a=n[0];return n=e.exec(t),a}}}function Zn(t){typeof t.dispose=="function"&&t.dispose()}var se=class{constructor(t){this.scopeName=t}toKey(){return this.scopeName}},Pt=class{constructor(t,e){this.scopeName=t,this.ruleName=e}toKey(){return`${this.scopeName}#${this.ruleName}`}},Lt=class{constructor(){b(this,"_references",[]);b(this,"_seenReferenceKeys",new Set);b(this,"visitedRule",new Set)}get references(){return this._references}add(t){const e=t.toKey();this._seenReferenceKeys.has(e)||(this._seenReferenceKeys.add(e),this._references.push(t))}},Ot=class{constructor(t,e){b(this,"seenFullScopeRequests",new Set);b(this,"seenPartialScopeRequests",new Set);b(this,"Q");this.repo=t,this.initialScopeName=e,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new se(this.initialScopeName)]}processQueue(){const t=this.Q;this.Q=[];const e=new Lt;for(const n of t)Mt(n,this.initialScopeName,this.repo,e);for(const n of e.references)if(n instanceof se){if(this.seenFullScopeRequests.has(n.scopeName))continue;this.seenFullScopeRequests.add(n.scopeName),this.Q.push(n)}else{if(this.seenFullScopeRequests.has(n.scopeName)||this.seenPartialScopeRequests.has(n.toKey()))continue;this.seenPartialScopeRequests.add(n.toKey()),this.Q.push(n)}}};function Mt(t,e,n,a){const s=n.lookup(t.scopeName);if(!s){if(t.scopeName===e)throw new Error(`No grammar provided for <${e}>`);return}const i=n.lookup(e);t instanceof se?he({baseGrammar:i,selfGrammar:s},a):We(t.ruleName,{baseGrammar:i,selfGrammar:s,repository:s.repository},a);const r=n.injections(t.scopeName);if(r)for(const c of r)a.add(new se(c))}function We(t,e,n){if(e.repository&&e.repository[t]){const a=e.repository[t];_e([a],e,n)}}function he(t,e){t.selfGrammar.patterns&&Array.isArray(t.selfGrammar.patterns)&&_e(t.selfGrammar.patterns,{...t,repository:t.selfGrammar.repository},e),t.selfGrammar.injections&&_e(Object.values(t.selfGrammar.injections),{...t,repository:t.selfGrammar.repository},e)}function _e(t,e,n){for(const a of t){if(n.visitedRule.has(a))continue;n.visitedRule.add(a);const s=a.repository?Tn({},e.repository,a.repository):e.repository;Array.isArray(a.patterns)&&_e(a.patterns,{...e,repository:s},n);const i=a.include;if(!i)continue;const r=Wn(i);switch(r.kind){case 0:he({...e,selfGrammar:e.baseGrammar},n);break;case 1:he(e,n);break;case 2:We(r.ruleName,{...e,repository:s},n);break;case 3:case 4:const c=r.scopeName===e.selfGrammar.scopeName?e.selfGrammar:r.scopeName===e.baseGrammar.scopeName?e.baseGrammar:void 0;if(c){const o={baseGrammar:e.baseGrammar,selfGrammar:c,repository:s};r.kind===4?We(r.ruleName,o,n):he(o,n)}else r.kind===4?n.add(new Pt(r.scopeName,r.ruleName)):n.add(new se(r.scopeName));break}}}var Dt=class{constructor(){b(this,"kind",0)}},Ut=class{constructor(){b(this,"kind",1)}},Zt=class{constructor(t){b(this,"kind",2);this.ruleName=t}},Wt=class{constructor(t){b(this,"kind",3);this.scopeName=t}},Ht=class{constructor(t,e){b(this,"kind",4);this.scopeName=t,this.ruleName=e}};function Wn(t){if(t==="$base")return new Dt;if(t==="$self")return new Ut;const e=t.indexOf("#");if(e===-1)return new Wt(t);if(e===0)return new Zt(t.substring(1));{const n=t.substring(0,e),a=t.substring(e+1);return new Ht(n,a)}}var Xt=/\\(\d+)/,hn=/\\(\d+)/g,Vt=-1,Hn=-2;var ce=class{constructor(t,e,n,a){b(this,"$location");b(this,"id");b(this,"_nameIsCapturing");b(this,"_name");b(this,"_contentNameIsCapturing");b(this,"_contentName");this.$location=t,this.id=e,this._name=n||null,this._nameIsCapturing=me.hasCaptures(this._name),this._contentName=a||null,this._contentNameIsCapturing=me.hasCaptures(this._contentName)}get debugName(){const t=this.$location?`${In(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${t}`}getName(t,e){return!this._nameIsCapturing||this._name===null||t===null||e===null?this._name:me.replaceCaptures(this._name,t,e)}getContentName(t,e){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:me.replaceCaptures(this._contentName,t,e)}},Yt=class extends ce{constructor(e,n,a,s,i){super(e,n,a,s);b(this,"retokenizeCapturedWithRuleId");this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(e,n){throw new Error("Not supported!")}compile(e,n){throw new Error("Not supported!")}compileAG(e,n,a,s){throw new Error("Not supported!")}},Jt=class extends ce{constructor(e,n,a,s,i){super(e,n,a,null);b(this,"_match");b(this,"captures");b(this,"_cachedCompiledPatterns");this._match=new ie(s,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,n){n.push(this._match)}compile(e,n){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,n,a,s){return this._getCachedCompiledPatterns(e).compileAG(e,a,s)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new re,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},fn=class extends ce{constructor(e,n,a,s,i){super(e,n,a,s);b(this,"hasMissingPatterns");b(this,"patterns");b(this,"_cachedCompiledPatterns");this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,n){for(const a of this.patterns)e.getRule(a).collectPatterns(e,n)}compile(e,n){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,n,a,s){return this._getCachedCompiledPatterns(e).compileAG(e,a,s)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new re,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},He=class extends ce{constructor(e,n,a,s,i,r,c,o,l,m){super(e,n,a,s);b(this,"_begin");b(this,"beginCaptures");b(this,"_end");b(this,"endHasBackReferences");b(this,"endCaptures");b(this,"applyEndPatternLast");b(this,"hasMissingPatterns");b(this,"patterns");b(this,"_cachedCompiledPatterns");this._begin=new ie(i,this.id),this.beginCaptures=r,this._end=new ie(c||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=o,this.applyEndPatternLast=l||!1,this.patterns=m.patterns,this.hasMissingPatterns=m.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,n){return this._end.resolveBackReferences(e,n)}collectPatterns(e,n){n.push(this._begin)}compile(e,n){return this._getCachedCompiledPatterns(e,n).compile(e)}compileAG(e,n,a,s){return this._getCachedCompiledPatterns(e,n).compileAG(e,a,s)}_getCachedCompiledPatterns(e,n){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new re;for(const a of this.patterns)e.getRule(a).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,n):this._cachedCompiledPatterns.setSource(0,n)),this._cachedCompiledPatterns}},$e=class extends ce{constructor(e,n,a,s,i,r,c,o,l){super(e,n,a,s);b(this,"_begin");b(this,"beginCaptures");b(this,"whileCaptures");b(this,"_while");b(this,"whileHasBackReferences");b(this,"hasMissingPatterns");b(this,"patterns");b(this,"_cachedCompiledPatterns");b(this,"_cachedCompiledWhilePatterns");this._begin=new ie(i,this.id),this.beginCaptures=r,this.whileCaptures=o,this._while=new ie(c,Hn),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,n){return this._while.resolveBackReferences(e,n)}collectPatterns(e,n){n.push(this._begin)}compile(e,n){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,n,a,s){return this._getCachedCompiledPatterns(e).compileAG(e,a,s)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new re;for(const n of this.patterns)e.getRule(n).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,n){return this._getCachedCompiledWhilePatterns(e,n).compile(e)}compileWhileAG(e,n,a,s){return this._getCachedCompiledWhilePatterns(e,n).compileAG(e,a,s)}_getCachedCompiledWhilePatterns(e,n){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new re,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,n||"￿"),this._cachedCompiledWhilePatterns}},Xn=class G{static createCaptureRule(e,n,a,s,i){return e.registerRule(r=>new Yt(n,r,a,s,i))}static getCompiledRuleId(e,n,a){return e.id||n.registerRule(s=>{if(e.id=s,e.match)return new Jt(e.$vscodeTextmateLocation,e.id,e.name,e.match,G._compileCaptures(e.captures,n,a));if(typeof e.begin>"u"){e.repository&&(a=Tn({},a,e.repository));let i=e.patterns;return typeof i>"u"&&e.include&&(i=[{include:e.include}]),new fn(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,G._compilePatterns(i,n,a))}return e.while?new $e(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,G._compileCaptures(e.beginCaptures||e.captures,n,a),e.while,G._compileCaptures(e.whileCaptures||e.captures,n,a),G._compilePatterns(e.patterns,n,a)):new He(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,G._compileCaptures(e.beginCaptures||e.captures,n,a),e.end,G._compileCaptures(e.endCaptures||e.captures,n,a),e.applyEndPatternLast,G._compilePatterns(e.patterns,n,a))}),e.id}static _compileCaptures(e,n,a){let s=[];if(e){let i=0;for(const r in e){if(r==="$vscodeTextmateLocation")continue;const c=parseInt(r,10);c>i&&(i=c)}for(let r=0;r<=i;r++)s[r]=null;for(const r in e){if(r==="$vscodeTextmateLocation")continue;const c=parseInt(r,10);let o=0;e[r].patterns&&(o=G.getCompiledRuleId(e[r],n,a)),s[c]=G.createCaptureRule(n,e[r].$vscodeTextmateLocation,e[r].name,e[r].contentName,o)}}return s}static _compilePatterns(e,n,a){let s=[];if(e)for(let i=0,r=e.length;i<r;i++){const c=e[i];let o=-1;if(c.include){const l=Wn(c.include);switch(l.kind){case 0:case 1:o=G.getCompiledRuleId(a[c.include],n,a);break;case 2:let m=a[l.ruleName];m&&(o=G.getCompiledRuleId(m,n,a));break;case 3:case 4:const u=l.scopeName,p=l.kind===4?l.ruleName:null,d=n.getExternalGrammar(u,a);if(d)if(p){let g=d.repository[p];g&&(o=G.getCompiledRuleId(g,n,d.repository))}else o=G.getCompiledRuleId(d.repository.$self,n,d.repository);break}}else o=G.getCompiledRuleId(c,n,a);if(o!==-1){const l=n.getRule(o);let m=!1;if((l instanceof fn||l instanceof He||l instanceof $e)&&l.hasMissingPatterns&&l.patterns.length===0&&(m=!0),m)continue;s.push(o)}}return{patterns:s,hasMissingPatterns:(e?e.length:0)!==s.length}}},ie=class Vn{constructor(e,n){b(this,"source");b(this,"ruleId");b(this,"hasAnchor");b(this,"hasBackReferences");b(this,"_anchorCache");if(e&&typeof e=="string"){const a=e.length;let s=0,i=[],r=!1;for(let c=0;c<a;c++)if(e.charAt(c)==="\\"&&c+1<a){const l=e.charAt(c+1);l==="z"?(i.push(e.substring(s,c)),i.push("$(?!\\n)(?<!\\n)"),s=c+2):(l==="A"||l==="G")&&(r=!0),c++}this.hasAnchor=r,s===0?this.source=e:(i.push(e.substring(s,a)),this.source=i.join(""))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=n,typeof this.source=="string"?this.hasBackReferences=Xt.test(this.source):this.hasBackReferences=!1}clone(){return new Vn(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,n){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let a=n.map(s=>e.substring(s.start,s.end));return hn.lastIndex=0,this.source.replace(hn,(s,i)=>On(a[parseInt(i,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let e=[],n=[],a=[],s=[],i,r,c,o;for(i=0,r=this.source.length;i<r;i++)c=this.source.charAt(i),e[i]=c,n[i]=c,a[i]=c,s[i]=c,c==="\\"&&i+1<r&&(o=this.source.charAt(i+1),o==="A"?(e[i+1]="￿",n[i+1]="￿",a[i+1]="A",s[i+1]="A"):o==="G"?(e[i+1]="￿",n[i+1]="G",a[i+1]="￿",s[i+1]="G"):(e[i+1]=o,n[i+1]=o,a[i+1]=o,s[i+1]=o),i++);return{A0_G0:e.join(""),A0_G1:n.join(""),A1_G0:a.join(""),A1_G1:s.join("")}}resolveAnchors(e,n){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:e?n?this._anchorCache.A1_G1:this._anchorCache.A1_G0:n?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},re=class{constructor(){b(this,"_items");b(this,"_hasAnchors");b(this,"_cached");b(this,"_anchorCache");this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(t){this._items.push(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}unshift(t){this._items.unshift(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}length(){return this._items.length}setSource(t,e){this._items[t].source!==e&&(this._disposeCaches(),this._items[t].setSource(e))}compile(t){if(!this._cached){let e=this._items.map(n=>n.source);this._cached=new yn(t,e,this._items.map(n=>n.ruleId))}return this._cached}compileAG(t,e,n){return this._hasAnchors?e?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(t,e,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(t,e,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(t,e,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(t,e,n)),this._anchorCache.A0_G0):this.compile(t)}_resolveAnchors(t,e,n){let a=this._items.map(s=>s.resolveAnchors(e,n));return new yn(t,a,this._items.map(s=>s.ruleId))}},yn=class{constructor(t,e,n){b(this,"scanner");this.regExps=e,this.rules=n,this.scanner=t.createOnigScanner(e)}dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const t=[];for(let e=0,n=this.rules.length;e<n;e++)t.push(" - "+this.rules[e]+": "+this.regExps[e]);return t.join(`
1
+ var jt=Object.defineProperty;var vt=(t,e,n)=>e in t?jt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var b=(t,e,n)=>vt(t,typeof e!="symbol"?e+"":e,n);import{_ as Ct}from"./index-BGLn9_S8.js";var S=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function St(t){return an(t)}function an(t){return Array.isArray(t)?qt(t):t instanceof RegExp?t:typeof t=="object"?Et(t):t}function qt(t){let e=[];for(let n=0,a=t.length;n<a;n++)e[n]=an(t[n]);return e}function Et(t){let e={};for(let n in t)e[n]=an(t[n]);return e}function Tn(t,...e){return e.forEach(n=>{for(let a in n)t[a]=n[a]}),t}function In(t){const e=~t.lastIndexOf("/")||~t.lastIndexOf("\\");return e===0?t:~e===t.length-1?In(t.substring(0,t.length-1)):t.substr(~e+1)}var Re=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,me=class{static hasCaptures(t){return t===null?!1:(Re.lastIndex=0,Re.test(t))}static replaceCaptures(t,e,n){return t.replace(Re,(a,s,i,r)=>{let c=n[parseInt(s||i,10)];if(c){let o=e.substring(c.start,c.end);for(;o[0]===".";)o=o.substring(1);switch(r){case"downcase":return o.toLowerCase();case"upcase":return o.toUpperCase();default:return o}}else return a})}};function Pn(t,e){return t<e?-1:t>e?1:0}function Ln(t,e){if(t===null&&e===null)return 0;if(!t)return-1;if(!e)return 1;let n=t.length,a=e.length;if(n===a){for(let s=0;s<n;s++){let i=Pn(t[s],e[s]);if(i!==0)return i}return 0}return n-a}function bn(t){return!!(/^#[0-9a-f]{6}$/i.test(t)||/^#[0-9a-f]{8}$/i.test(t)||/^#[0-9a-f]{3}$/i.test(t)||/^#[0-9a-f]{4}$/i.test(t))}function On(t){return t.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var Mn=class{constructor(t){b(this,"cache",new Map);this.fn=t}get(t){if(this.cache.has(t))return this.cache.get(t);const e=this.fn(t);return this.cache.set(t,e),e}},fe=class{constructor(t,e,n){b(this,"_cachedMatchRoot",new Mn(t=>this._root.match(t)));this._colorMap=t,this._defaults=e,this._root=n}static createFromRawTheme(t,e){return this.createFromParsedTheme(Gt(t),e)}static createFromParsedTheme(t,e){return zt(t,e)}getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(t){if(t===null)return this._defaults;const e=t.scopeName,a=this._cachedMatchRoot.get(e).find(s=>At(t.parent,s.parentScopes));return a?new Dn(a.fontStyle,a.foreground,a.background):null}},Te=class ge{constructor(e,n){this.parent=e,this.scopeName=n}static push(e,n){for(const a of n)e=new ge(e,a);return e}static from(...e){let n=null;for(let a=0;a<e.length;a++)n=new ge(n,e[a]);return n}push(e){return new ge(this,e)}getSegments(){let e=this;const n=[];for(;e;)n.push(e.scopeName),e=e.parent;return n.reverse(),n}toString(){return this.getSegments().join(" ")}extends(e){return this===e?!0:this.parent===null?!1:this.parent.extends(e)}getExtensionIfDefined(e){const n=[];let a=this;for(;a&&a!==e;)n.push(a.scopeName),a=a.parent;return a===e?n.reverse():void 0}};function At(t,e){if(e.length===0)return!0;for(let n=0;n<e.length;n++){let a=e[n],s=!1;if(a===">"){if(n===e.length-1)return!1;a=e[++n],s=!0}for(;t&&!Nt(t.scopeName,a);){if(s)return!1;t=t.parent}if(!t)return!1;t=t.parent}return!0}function Nt(t,e){return e===t||t.startsWith(e)&&t[e.length]==="."}var Dn=class{constructor(t,e,n){this.fontStyle=t,this.foregroundId=e,this.backgroundId=n}};function Gt(t){if(!t)return[];if(!t.settings||!Array.isArray(t.settings))return[];let e=t.settings,n=[],a=0;for(let s=0,i=e.length;s<i;s++){let r=e[s];if(!r.settings)continue;let c;if(typeof r.scope=="string"){let u=r.scope;u=u.replace(/^[,]+/,""),u=u.replace(/[,]+$/,""),c=u.split(",")}else Array.isArray(r.scope)?c=r.scope:c=[""];let o=-1;if(typeof r.settings.fontStyle=="string"){o=0;let u=r.settings.fontStyle.split(" ");for(let p=0,d=u.length;p<d;p++)switch(u[p]){case"italic":o=o|1;break;case"bold":o=o|2;break;case"underline":o=o|4;break;case"strikethrough":o=o|8;break}}let l=null;typeof r.settings.foreground=="string"&&bn(r.settings.foreground)&&(l=r.settings.foreground);let m=null;typeof r.settings.background=="string"&&bn(r.settings.background)&&(m=r.settings.background);for(let u=0,p=c.length;u<p;u++){let g=c[u].trim().split(" "),x=g[g.length-1],$=null;g.length>1&&($=g.slice(0,g.length-1),$.reverse()),n[a++]=new Ft(x,$,s,o,l,m)}}return n}var Ft=class{constructor(t,e,n,a,s,i){this.scope=t,this.parentScopes=e,this.index=n,this.fontStyle=a,this.foreground=s,this.background=i}},F=(t=>(t[t.NotSet=-1]="NotSet",t[t.None=0]="None",t[t.Italic=1]="Italic",t[t.Bold=2]="Bold",t[t.Underline=4]="Underline",t[t.Strikethrough=8]="Strikethrough",t))(F||{});function zt(t,e){t.sort((o,l)=>{let m=Pn(o.scope,l.scope);return m!==0||(m=Ln(o.parentScopes,l.parentScopes),m!==0)?m:o.index-l.index});let n=0,a="#000000",s="#ffffff";for(;t.length>=1&&t[0].scope==="";){let o=t.shift();o.fontStyle!==-1&&(n=o.fontStyle),o.foreground!==null&&(a=o.foreground),o.background!==null&&(s=o.background)}let i=new Bt(e),r=new Dn(n,i.getId(a),i.getId(s)),c=new Tt(new Ue(0,null,-1,0,0),[]);for(let o=0,l=t.length;o<l;o++){let m=t[o];c.insert(0,m.scope,m.parentScopes,m.fontStyle,i.getId(m.foreground),i.getId(m.background))}return new fe(i,r,c)}var Bt=class{constructor(t){b(this,"_isFrozen");b(this,"_lastColorId");b(this,"_id2color");b(this,"_color2id");if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(t)){this._isFrozen=!0;for(let e=0,n=t.length;e<n;e++)this._color2id[t[e]]=e,this._id2color[e]=t[e]}else this._isFrozen=!1}getId(t){if(t===null)return 0;t=t.toUpperCase();let e=this._color2id[t];if(e)return e;if(this._isFrozen)throw new Error(`Missing color in color map - ${t}`);return e=++this._lastColorId,this._color2id[t]=e,this._id2color[e]=t,e}getColorMap(){return this._id2color.slice(0)}},Rt=Object.freeze([]),Ue=class Un{constructor(e,n,a,s,i){b(this,"scopeDepth");b(this,"parentScopes");b(this,"fontStyle");b(this,"foreground");b(this,"background");this.scopeDepth=e,this.parentScopes=n||Rt,this.fontStyle=a,this.foreground=s,this.background=i}clone(){return new Un(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let n=[];for(let a=0,s=e.length;a<s;a++)n[a]=e[a].clone();return n}acceptOverwrite(e,n,a,s){this.scopeDepth>e?console.log("how did this happen?"):this.scopeDepth=e,n!==-1&&(this.fontStyle=n),a!==0&&(this.foreground=a),s!==0&&(this.background=s)}},Tt=class Ze{constructor(e,n=[],a={}){b(this,"_rulesWithParentScopes");this._mainRule=e,this._children=a,this._rulesWithParentScopes=n}static _cmpBySpecificity(e,n){if(e.scopeDepth!==n.scopeDepth)return n.scopeDepth-e.scopeDepth;let a=0,s=0;for(;e.parentScopes[a]===">"&&a++,n.parentScopes[s]===">"&&s++,!(a>=e.parentScopes.length||s>=n.parentScopes.length);){const i=n.parentScopes[s].length-e.parentScopes[a].length;if(i!==0)return i;a++,s++}return n.parentScopes.length-e.parentScopes.length}match(e){if(e!==""){let a=e.indexOf("."),s,i;if(a===-1?(s=e,i=""):(s=e.substring(0,a),i=e.substring(a+1)),this._children.hasOwnProperty(s))return this._children[s].match(i)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(Ze._cmpBySpecificity),n}insert(e,n,a,s,i,r){if(n===""){this._doInsertHere(e,a,s,i,r);return}let c=n.indexOf("."),o,l;c===-1?(o=n,l=""):(o=n.substring(0,c),l=n.substring(c+1));let m;this._children.hasOwnProperty(o)?m=this._children[o]:(m=new Ze(this._mainRule.clone(),Ue.cloneArr(this._rulesWithParentScopes)),this._children[o]=m),m.insert(e+1,l,a,s,i,r)}_doInsertHere(e,n,a,s,i){if(n===null){this._mainRule.acceptOverwrite(e,a,s,i);return}for(let r=0,c=this._rulesWithParentScopes.length;r<c;r++){let o=this._rulesWithParentScopes[r];if(Ln(o.parentScopes,n)===0){o.acceptOverwrite(e,a,s,i);return}}a===-1&&(a=this._mainRule.fontStyle),s===0&&(s=this._mainRule.foreground),i===0&&(i=this._mainRule.background),this._rulesWithParentScopes.push(new Ue(e,n,a,s,i))}},X=class I{static toBinaryStr(e){return e.toString(2).padStart(32,"0")}static print(e){const n=I.getLanguageId(e),a=I.getTokenType(e),s=I.getFontStyle(e),i=I.getForeground(e),r=I.getBackground(e);console.log({languageId:n,tokenType:a,fontStyle:s,foreground:i,background:r})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return(e&1024)!==0}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(e,n,a,s,i,r,c){let o=I.getLanguageId(e),l=I.getTokenType(e),m=I.containsBalancedBrackets(e)?1:0,u=I.getFontStyle(e),p=I.getForeground(e),d=I.getBackground(e);return n!==0&&(o=n),a!==8&&(l=a),s!==null&&(m=s?1:0),i!==-1&&(u=i),r!==0&&(p=r),c!==0&&(d=c),(o<<0|l<<8|m<<10|u<<11|p<<15|d<<24)>>>0}};function ye(t,e){const n=[],a=It(t);let s=a.next();for(;s!==null;){let o=0;if(s.length===2&&s.charAt(1)===":"){switch(s.charAt(0)){case"R":o=1;break;case"L":o=-1;break;default:console.log(`Unknown priority ${s} in scope selector`)}s=a.next()}let l=r();if(n.push({matcher:l,priority:o}),s!==",")break;s=a.next()}return n;function i(){if(s==="-"){s=a.next();const o=i();return l=>!!o&&!o(l)}if(s==="("){s=a.next();const o=c();return s===")"&&(s=a.next()),o}if(gn(s)){const o=[];do o.push(s),s=a.next();while(gn(s));return l=>e(o,l)}return null}function r(){const o=[];let l=i();for(;l;)o.push(l),l=i();return m=>o.every(u=>u(m))}function c(){const o=[];let l=r();for(;l&&(o.push(l),s==="|"||s===",");){do s=a.next();while(s==="|"||s===",");l=r()}return m=>o.some(u=>u(m))}}function gn(t){return!!t&&!!t.match(/[\w\.:]+/)}function It(t){let e=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=e.exec(t);return{next:()=>{if(!n)return null;const a=n[0];return n=e.exec(t),a}}}function Zn(t){typeof t.dispose=="function"&&t.dispose()}var se=class{constructor(t){this.scopeName=t}toKey(){return this.scopeName}},Pt=class{constructor(t,e){this.scopeName=t,this.ruleName=e}toKey(){return`${this.scopeName}#${this.ruleName}`}},Lt=class{constructor(){b(this,"_references",[]);b(this,"_seenReferenceKeys",new Set);b(this,"visitedRule",new Set)}get references(){return this._references}add(t){const e=t.toKey();this._seenReferenceKeys.has(e)||(this._seenReferenceKeys.add(e),this._references.push(t))}},Ot=class{constructor(t,e){b(this,"seenFullScopeRequests",new Set);b(this,"seenPartialScopeRequests",new Set);b(this,"Q");this.repo=t,this.initialScopeName=e,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new se(this.initialScopeName)]}processQueue(){const t=this.Q;this.Q=[];const e=new Lt;for(const n of t)Mt(n,this.initialScopeName,this.repo,e);for(const n of e.references)if(n instanceof se){if(this.seenFullScopeRequests.has(n.scopeName))continue;this.seenFullScopeRequests.add(n.scopeName),this.Q.push(n)}else{if(this.seenFullScopeRequests.has(n.scopeName)||this.seenPartialScopeRequests.has(n.toKey()))continue;this.seenPartialScopeRequests.add(n.toKey()),this.Q.push(n)}}};function Mt(t,e,n,a){const s=n.lookup(t.scopeName);if(!s){if(t.scopeName===e)throw new Error(`No grammar provided for <${e}>`);return}const i=n.lookup(e);t instanceof se?he({baseGrammar:i,selfGrammar:s},a):We(t.ruleName,{baseGrammar:i,selfGrammar:s,repository:s.repository},a);const r=n.injections(t.scopeName);if(r)for(const c of r)a.add(new se(c))}function We(t,e,n){if(e.repository&&e.repository[t]){const a=e.repository[t];_e([a],e,n)}}function he(t,e){t.selfGrammar.patterns&&Array.isArray(t.selfGrammar.patterns)&&_e(t.selfGrammar.patterns,{...t,repository:t.selfGrammar.repository},e),t.selfGrammar.injections&&_e(Object.values(t.selfGrammar.injections),{...t,repository:t.selfGrammar.repository},e)}function _e(t,e,n){for(const a of t){if(n.visitedRule.has(a))continue;n.visitedRule.add(a);const s=a.repository?Tn({},e.repository,a.repository):e.repository;Array.isArray(a.patterns)&&_e(a.patterns,{...e,repository:s},n);const i=a.include;if(!i)continue;const r=Wn(i);switch(r.kind){case 0:he({...e,selfGrammar:e.baseGrammar},n);break;case 1:he(e,n);break;case 2:We(r.ruleName,{...e,repository:s},n);break;case 3:case 4:const c=r.scopeName===e.selfGrammar.scopeName?e.selfGrammar:r.scopeName===e.baseGrammar.scopeName?e.baseGrammar:void 0;if(c){const o={baseGrammar:e.baseGrammar,selfGrammar:c,repository:s};r.kind===4?We(r.ruleName,o,n):he(o,n)}else r.kind===4?n.add(new Pt(r.scopeName,r.ruleName)):n.add(new se(r.scopeName));break}}}var Dt=class{constructor(){b(this,"kind",0)}},Ut=class{constructor(){b(this,"kind",1)}},Zt=class{constructor(t){b(this,"kind",2);this.ruleName=t}},Wt=class{constructor(t){b(this,"kind",3);this.scopeName=t}},Ht=class{constructor(t,e){b(this,"kind",4);this.scopeName=t,this.ruleName=e}};function Wn(t){if(t==="$base")return new Dt;if(t==="$self")return new Ut;const e=t.indexOf("#");if(e===-1)return new Wt(t);if(e===0)return new Zt(t.substring(1));{const n=t.substring(0,e),a=t.substring(e+1);return new Ht(n,a)}}var Xt=/\\(\d+)/,hn=/\\(\d+)/g,Vt=-1,Hn=-2;var ce=class{constructor(t,e,n,a){b(this,"$location");b(this,"id");b(this,"_nameIsCapturing");b(this,"_name");b(this,"_contentNameIsCapturing");b(this,"_contentName");this.$location=t,this.id=e,this._name=n||null,this._nameIsCapturing=me.hasCaptures(this._name),this._contentName=a||null,this._contentNameIsCapturing=me.hasCaptures(this._contentName)}get debugName(){const t=this.$location?`${In(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${t}`}getName(t,e){return!this._nameIsCapturing||this._name===null||t===null||e===null?this._name:me.replaceCaptures(this._name,t,e)}getContentName(t,e){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:me.replaceCaptures(this._contentName,t,e)}},Yt=class extends ce{constructor(e,n,a,s,i){super(e,n,a,s);b(this,"retokenizeCapturedWithRuleId");this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(e,n){throw new Error("Not supported!")}compile(e,n){throw new Error("Not supported!")}compileAG(e,n,a,s){throw new Error("Not supported!")}},Jt=class extends ce{constructor(e,n,a,s,i){super(e,n,a,null);b(this,"_match");b(this,"captures");b(this,"_cachedCompiledPatterns");this._match=new ie(s,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,n){n.push(this._match)}compile(e,n){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,n,a,s){return this._getCachedCompiledPatterns(e).compileAG(e,a,s)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new re,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},fn=class extends ce{constructor(e,n,a,s,i){super(e,n,a,s);b(this,"hasMissingPatterns");b(this,"patterns");b(this,"_cachedCompiledPatterns");this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,n){for(const a of this.patterns)e.getRule(a).collectPatterns(e,n)}compile(e,n){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,n,a,s){return this._getCachedCompiledPatterns(e).compileAG(e,a,s)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new re,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},He=class extends ce{constructor(e,n,a,s,i,r,c,o,l,m){super(e,n,a,s);b(this,"_begin");b(this,"beginCaptures");b(this,"_end");b(this,"endHasBackReferences");b(this,"endCaptures");b(this,"applyEndPatternLast");b(this,"hasMissingPatterns");b(this,"patterns");b(this,"_cachedCompiledPatterns");this._begin=new ie(i,this.id),this.beginCaptures=r,this._end=new ie(c||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=o,this.applyEndPatternLast=l||!1,this.patterns=m.patterns,this.hasMissingPatterns=m.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,n){return this._end.resolveBackReferences(e,n)}collectPatterns(e,n){n.push(this._begin)}compile(e,n){return this._getCachedCompiledPatterns(e,n).compile(e)}compileAG(e,n,a,s){return this._getCachedCompiledPatterns(e,n).compileAG(e,a,s)}_getCachedCompiledPatterns(e,n){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new re;for(const a of this.patterns)e.getRule(a).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,n):this._cachedCompiledPatterns.setSource(0,n)),this._cachedCompiledPatterns}},$e=class extends ce{constructor(e,n,a,s,i,r,c,o,l){super(e,n,a,s);b(this,"_begin");b(this,"beginCaptures");b(this,"whileCaptures");b(this,"_while");b(this,"whileHasBackReferences");b(this,"hasMissingPatterns");b(this,"patterns");b(this,"_cachedCompiledPatterns");b(this,"_cachedCompiledWhilePatterns");this._begin=new ie(i,this.id),this.beginCaptures=r,this.whileCaptures=o,this._while=new ie(c,Hn),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,n){return this._while.resolveBackReferences(e,n)}collectPatterns(e,n){n.push(this._begin)}compile(e,n){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,n,a,s){return this._getCachedCompiledPatterns(e).compileAG(e,a,s)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new re;for(const n of this.patterns)e.getRule(n).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,n){return this._getCachedCompiledWhilePatterns(e,n).compile(e)}compileWhileAG(e,n,a,s){return this._getCachedCompiledWhilePatterns(e,n).compileAG(e,a,s)}_getCachedCompiledWhilePatterns(e,n){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new re,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,n||"￿"),this._cachedCompiledWhilePatterns}},Xn=class G{static createCaptureRule(e,n,a,s,i){return e.registerRule(r=>new Yt(n,r,a,s,i))}static getCompiledRuleId(e,n,a){return e.id||n.registerRule(s=>{if(e.id=s,e.match)return new Jt(e.$vscodeTextmateLocation,e.id,e.name,e.match,G._compileCaptures(e.captures,n,a));if(typeof e.begin>"u"){e.repository&&(a=Tn({},a,e.repository));let i=e.patterns;return typeof i>"u"&&e.include&&(i=[{include:e.include}]),new fn(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,G._compilePatterns(i,n,a))}return e.while?new $e(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,G._compileCaptures(e.beginCaptures||e.captures,n,a),e.while,G._compileCaptures(e.whileCaptures||e.captures,n,a),G._compilePatterns(e.patterns,n,a)):new He(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,G._compileCaptures(e.beginCaptures||e.captures,n,a),e.end,G._compileCaptures(e.endCaptures||e.captures,n,a),e.applyEndPatternLast,G._compilePatterns(e.patterns,n,a))}),e.id}static _compileCaptures(e,n,a){let s=[];if(e){let i=0;for(const r in e){if(r==="$vscodeTextmateLocation")continue;const c=parseInt(r,10);c>i&&(i=c)}for(let r=0;r<=i;r++)s[r]=null;for(const r in e){if(r==="$vscodeTextmateLocation")continue;const c=parseInt(r,10);let o=0;e[r].patterns&&(o=G.getCompiledRuleId(e[r],n,a)),s[c]=G.createCaptureRule(n,e[r].$vscodeTextmateLocation,e[r].name,e[r].contentName,o)}}return s}static _compilePatterns(e,n,a){let s=[];if(e)for(let i=0,r=e.length;i<r;i++){const c=e[i];let o=-1;if(c.include){const l=Wn(c.include);switch(l.kind){case 0:case 1:o=G.getCompiledRuleId(a[c.include],n,a);break;case 2:let m=a[l.ruleName];m&&(o=G.getCompiledRuleId(m,n,a));break;case 3:case 4:const u=l.scopeName,p=l.kind===4?l.ruleName:null,d=n.getExternalGrammar(u,a);if(d)if(p){let g=d.repository[p];g&&(o=G.getCompiledRuleId(g,n,d.repository))}else o=G.getCompiledRuleId(d.repository.$self,n,d.repository);break}}else o=G.getCompiledRuleId(c,n,a);if(o!==-1){const l=n.getRule(o);let m=!1;if((l instanceof fn||l instanceof He||l instanceof $e)&&l.hasMissingPatterns&&l.patterns.length===0&&(m=!0),m)continue;s.push(o)}}return{patterns:s,hasMissingPatterns:(e?e.length:0)!==s.length}}},ie=class Vn{constructor(e,n){b(this,"source");b(this,"ruleId");b(this,"hasAnchor");b(this,"hasBackReferences");b(this,"_anchorCache");if(e&&typeof e=="string"){const a=e.length;let s=0,i=[],r=!1;for(let c=0;c<a;c++)if(e.charAt(c)==="\\"&&c+1<a){const l=e.charAt(c+1);l==="z"?(i.push(e.substring(s,c)),i.push("$(?!\\n)(?<!\\n)"),s=c+2):(l==="A"||l==="G")&&(r=!0),c++}this.hasAnchor=r,s===0?this.source=e:(i.push(e.substring(s,a)),this.source=i.join(""))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=n,typeof this.source=="string"?this.hasBackReferences=Xt.test(this.source):this.hasBackReferences=!1}clone(){return new Vn(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,n){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let a=n.map(s=>e.substring(s.start,s.end));return hn.lastIndex=0,this.source.replace(hn,(s,i)=>On(a[parseInt(i,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let e=[],n=[],a=[],s=[],i,r,c,o;for(i=0,r=this.source.length;i<r;i++)c=this.source.charAt(i),e[i]=c,n[i]=c,a[i]=c,s[i]=c,c==="\\"&&i+1<r&&(o=this.source.charAt(i+1),o==="A"?(e[i+1]="￿",n[i+1]="￿",a[i+1]="A",s[i+1]="A"):o==="G"?(e[i+1]="￿",n[i+1]="G",a[i+1]="￿",s[i+1]="G"):(e[i+1]=o,n[i+1]=o,a[i+1]=o,s[i+1]=o),i++);return{A0_G0:e.join(""),A0_G1:n.join(""),A1_G0:a.join(""),A1_G1:s.join("")}}resolveAnchors(e,n){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:e?n?this._anchorCache.A1_G1:this._anchorCache.A1_G0:n?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},re=class{constructor(){b(this,"_items");b(this,"_hasAnchors");b(this,"_cached");b(this,"_anchorCache");this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(t){this._items.push(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}unshift(t){this._items.unshift(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}length(){return this._items.length}setSource(t,e){this._items[t].source!==e&&(this._disposeCaches(),this._items[t].setSource(e))}compile(t){if(!this._cached){let e=this._items.map(n=>n.source);this._cached=new yn(t,e,this._items.map(n=>n.ruleId))}return this._cached}compileAG(t,e,n){return this._hasAnchors?e?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(t,e,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(t,e,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(t,e,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(t,e,n)),this._anchorCache.A0_G0):this.compile(t)}_resolveAnchors(t,e,n){let a=this._items.map(s=>s.resolveAnchors(e,n));return new yn(t,a,this._items.map(s=>s.ruleId))}},yn=class{constructor(t,e,n){b(this,"scanner");this.regExps=e,this.rules=n,this.scanner=t.createOnigScanner(e)}dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const t=[];for(let e=0,n=this.rules.length;e<n;e++)t.push(" - "+this.rules[e]+": "+this.regExps[e]);return t.join(`
2
2
  `)}findNextMatchSync(t,e,n){const a=this.scanner.findNextMatchSync(t,e,n);return a?{ruleId:this.rules[a.index],captureIndices:a.captureIndices}:null}},Ie=class{constructor(t,e){this.languageId=t,this.tokenType=e}},D,Kt=(D=class{constructor(e,n){b(this,"_defaultAttributes");b(this,"_embeddedLanguagesMatcher");b(this,"_getBasicScopeAttributes",new Mn(e=>{const n=this._scopeToLanguage(e),a=this._toStandardTokenType(e);return new Ie(n,a)}));this._defaultAttributes=new Ie(e,8),this._embeddedLanguagesMatcher=new Qt(Object.entries(n||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(e){return e===null?D._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(e)}_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(e){const n=e.match(D.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}},b(D,"_NULL_SCOPE_METADATA",new Ie(0,0)),b(D,"STANDARD_TOKEN_TYPE_REGEXP",/\b(comment|string|regex|meta\.embedded)\b/),D),Qt=class{constructor(t){b(this,"values");b(this,"scopesRegExp");if(t.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(t);const e=t.map(([n,a])=>On(n));e.sort(),e.reverse(),this.scopesRegExp=new RegExp(`^((${e.join(")|(")}))($|\\.)`,"")}}match(t){if(!this.scopesRegExp)return;const e=t.match(this.scopesRegExp);if(e)return this.values.get(e[1])}},_n=class{constructor(t,e){this.stack=t,this.stoppedEarly=e}};function Yn(t,e,n,a,s,i,r,c){const o=e.content.length;let l=!1,m=-1;if(r){const d=ea(t,e,n,a,s,i);s=d.stack,a=d.linePos,n=d.isFirstLine,m=d.anchorPosition}const u=Date.now();for(;!l;){if(c!==0&&Date.now()-u>c)return new _n(s,!0);p()}return new _n(s,!1);function p(){const d=na(t,e,n,a,s,m);if(!d){i.produce(s,o),l=!0;return}const g=d.captureIndices,x=d.matchedRuleId,$=g&&g.length>0?g[0].end>a:!1;if(x===Vt){const y=s.getRule(t);i.produce(s,g[0].start),s=s.withContentNameScopesList(s.nameScopesList),te(t,e,n,s,i,y.endCaptures,g),i.produce(s,g[0].end);const f=s;if(s=s.parent,m=f.getAnchorPos(),!$&&f.getEnterPos()===a){s=f,i.produce(s,o),l=!0;return}}else{const y=t.getRule(x);i.produce(s,g[0].start);const f=s,_=y.getName(e.content,g),w=s.contentNameScopesList.pushAttributed(_,t);if(s=s.push(x,a,m,g[0].end===o,null,w,w),y instanceof He){const j=y;te(t,e,n,s,i,j.beginCaptures,g),i.produce(s,g[0].end),m=g[0].end;const v=j.getContentName(e.content,g),z=w.pushAttributed(v,t);if(s=s.withContentNameScopesList(z),j.endHasBackReferences&&(s=s.withEndRule(j.getEndWithResolvedBackReferences(e.content,g))),!$&&f.hasSameRuleAs(s)){s=s.pop(),i.produce(s,o),l=!0;return}}else if(y instanceof $e){const j=y;te(t,e,n,s,i,j.beginCaptures,g),i.produce(s,g[0].end),m=g[0].end;const v=j.getContentName(e.content,g),z=w.pushAttributed(v,t);if(s=s.withContentNameScopesList(z),j.whileHasBackReferences&&(s=s.withEndRule(j.getWhileWithResolvedBackReferences(e.content,g))),!$&&f.hasSameRuleAs(s)){s=s.pop(),i.produce(s,o),l=!0;return}}else if(te(t,e,n,s,i,y.captures,g),i.produce(s,g[0].end),s=s.pop(),!$){s=s.safePop(),i.produce(s,o),l=!0;return}}g[0].end>a&&(a=g[0].end,n=!1)}}function ea(t,e,n,a,s,i){let r=s.beginRuleCapturedEOL?0:-1;const c=[];for(let o=s;o;o=o.pop()){const l=o.getRule(t);l instanceof $e&&c.push({rule:l,stack:o})}for(let o=c.pop();o;o=c.pop()){const{ruleScanner:l,findOptions:m}=sa(o.rule,t,o.stack.endRule,n,a===r),u=l.findNextMatchSync(e,a,m);if(u){if(u.ruleId!==Hn){s=o.stack.pop();break}u.captureIndices&&u.captureIndices.length&&(i.produce(o.stack,u.captureIndices[0].start),te(t,e,n,o.stack,i,o.rule.whileCaptures,u.captureIndices),i.produce(o.stack,u.captureIndices[0].end),r=u.captureIndices[0].end,u.captureIndices[0].end>a&&(a=u.captureIndices[0].end,n=!1))}else{s=o.stack.pop();break}}return{stack:s,linePos:a,anchorPosition:r,isFirstLine:n}}function na(t,e,n,a,s,i){const r=ta(t,e,n,a,s,i),c=t.getInjections();if(c.length===0)return r;const o=aa(c,t,e,n,a,s,i);if(!o)return r;if(!r)return o;const l=r.captureIndices[0].start,m=o.captureIndices[0].start;return m<l||o.priorityMatch&&m===l?o:r}function ta(t,e,n,a,s,i){const r=s.getRule(t),{ruleScanner:c,findOptions:o}=Jn(r,t,s.endRule,n,a===i),l=c.findNextMatchSync(e,a,o);return l?{captureIndices:l.captureIndices,matchedRuleId:l.ruleId}:null}function aa(t,e,n,a,s,i,r){let c=Number.MAX_VALUE,o=null,l,m=0;const u=i.contentNameScopesList.getScopeNames();for(let p=0,d=t.length;p<d;p++){const g=t[p];if(!g.matcher(u))continue;const x=e.getRule(g.ruleId),{ruleScanner:$,findOptions:y}=Jn(x,e,null,a,s===r),f=$.findNextMatchSync(n,s,y);if(!f)continue;const _=f.captureIndices[0].start;if(!(_>=c)&&(c=_,o=f.captureIndices,l=f.ruleId,m=g.priority,c===s))break}return o?{priorityMatch:m===-1,captureIndices:o,matchedRuleId:l}:null}function Jn(t,e,n,a,s){return{ruleScanner:t.compileAG(e,n,a,s),findOptions:0}}function sa(t,e,n,a,s){return{ruleScanner:t.compileWhileAG(e,n,a,s),findOptions:0}}function te(t,e,n,a,s,i,r){if(i.length===0)return;const c=e.content,o=Math.min(i.length,r.length),l=[],m=r[0].end;for(let u=0;u<o;u++){const p=i[u];if(p===null)continue;const d=r[u];if(d.length===0)continue;if(d.start>m)break;for(;l.length>0&&l[l.length-1].endPos<=d.start;)s.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop();if(l.length>0?s.produceFromScopes(l[l.length-1].scopes,d.start):s.produce(a,d.start),p.retokenizeCapturedWithRuleId){const x=p.getName(c,r),$=a.contentNameScopesList.pushAttributed(x,t),y=p.getContentName(c,r),f=$.pushAttributed(y,t),_=a.push(p.retokenizeCapturedWithRuleId,d.start,-1,!1,null,$,f),w=t.createOnigString(c.substring(0,d.end));Yn(t,w,n&&d.start===0,d.start,_,s,!1,0),Zn(w);continue}const g=p.getName(c,r);if(g!==null){const $=(l.length>0?l[l.length-1].scopes:a.contentNameScopesList).pushAttributed(g,t);l.push(new ia($,d.end))}}for(;l.length>0;)s.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop()}var ia=class{constructor(t,e){b(this,"scopes");b(this,"endPos");this.scopes=t,this.endPos=e}};function ra(t,e,n,a,s,i,r,c){return new ca(t,e,n,a,s,i,r,c)}function $n(t,e,n,a,s){const i=ye(e,xe),r=Xn.getCompiledRuleId(n,a,s.repository);for(const c of i)t.push({debugSelector:e,matcher:c.matcher,ruleId:r,grammar:s,priority:c.priority})}function xe(t,e){if(e.length<t.length)return!1;let n=0;return t.every(a=>{for(let s=n;s<e.length;s++)if(oa(e[s],a))return n=s+1,!0;return!1})}function oa(t,e){if(!t)return!1;if(t===e)return!0;const n=e.length;return t.length>n&&t.substr(0,n)===e&&t[n]==="."}var ca=class{constructor(t,e,n,a,s,i,r,c){b(this,"_rootId");b(this,"_lastRuleId");b(this,"_ruleId2desc");b(this,"_includedGrammars");b(this,"_grammarRepository");b(this,"_grammar");b(this,"_injections");b(this,"_basicScopeAttributesProvider");b(this,"_tokenTypeMatchers");if(this._rootScopeName=t,this.balancedBracketSelectors=i,this._onigLib=c,this._basicScopeAttributesProvider=new Kt(n,a),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=r,this._grammar=xn(e,null),this._injections=null,this._tokenTypeMatchers=[],s)for(const o of Object.keys(s)){const l=ye(o,xe);for(const m of l)this._tokenTypeMatchers.push({matcher:m.matcher,type:s[o]})}}get themeProvider(){return this._grammarRepository}dispose(){for(const t of this._ruleId2desc)t&&t.dispose()}createOnigScanner(t){return this._onigLib.createOnigScanner(t)}createOnigString(t){return this._onigLib.createOnigString(t)}getMetadataForScope(t){return this._basicScopeAttributesProvider.getBasicScopeAttributes(t)}_collectInjections(){const t={lookup:s=>s===this._rootScopeName?this._grammar:this.getExternalGrammar(s),injections:s=>this._grammarRepository.injections(s)},e=[],n=this._rootScopeName,a=t.lookup(n);if(a){const s=a.injections;if(s)for(let r in s)$n(e,r,s[r],this,a);const i=this._grammarRepository.injections(n);i&&i.forEach(r=>{const c=this.getExternalGrammar(r);if(c){const o=c.injectionSelector;o&&$n(e,o,c,this,c)}})}return e.sort((s,i)=>s.priority-i.priority),e}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(t){const e=++this._lastRuleId,n=t(e);return this._ruleId2desc[e]=n,n}getRule(t){return this._ruleId2desc[t]}getExternalGrammar(t,e){if(this._includedGrammars[t])return this._includedGrammars[t];if(this._grammarRepository){const n=this._grammarRepository.lookup(t);if(n)return this._includedGrammars[t]=xn(n,e&&e.$base),this._includedGrammars[t]}}tokenizeLine(t,e,n=0){const a=this._tokenize(t,e,!1,n);return{tokens:a.lineTokens.getResult(a.ruleStack,a.lineLength),ruleStack:a.ruleStack,stoppedEarly:a.stoppedEarly}}tokenizeLine2(t,e,n=0){const a=this._tokenize(t,e,!0,n);return{tokens:a.lineTokens.getBinaryResult(a.ruleStack,a.lineLength),ruleStack:a.ruleStack,stoppedEarly:a.stoppedEarly}}_tokenize(t,e,n,a){this._rootId===-1&&(this._rootId=Xn.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let s;if(!e||e===Xe.NULL){s=!0;const l=this._basicScopeAttributesProvider.getDefaultAttributes(),m=this.themeProvider.getDefaults(),u=X.set(0,l.languageId,l.tokenType,null,m.fontStyle,m.foregroundId,m.backgroundId),p=this.getRule(this._rootId).getName(null,null);let d;p?d=ae.createRootAndLookUpScopeName(p,u,this):d=ae.createRoot("unknown",u),e=new Xe(null,this._rootId,-1,-1,!1,null,d,d)}else s=!1,e.reset();t=t+`
3
3
  `;const i=this.createOnigString(t),r=i.content.length,c=new ua(n,t,this._tokenTypeMatchers,this.balancedBracketSelectors),o=Yn(this,i,s,0,e,c,!0,a);return Zn(i),{lineLength:r,lineTokens:c,ruleStack:o.stack,stoppedEarly:o.stoppedEarly}}};function xn(t,e){return t=St(t),t.repository=t.repository||{},t.repository.$self={$vscodeTextmateLocation:t.$vscodeTextmateLocation,patterns:t.patterns,name:t.scopeName},t.repository.$base=e||t.repository.$self,t}var ae=class L{constructor(e,n,a){this.parent=e,this.scopePath=n,this.tokenAttributes=a}static fromExtension(e,n){let a=e,s=(e==null?void 0:e.scopePath)??null;for(const i of n)s=Te.push(s,i.scopeNames),a=new L(a,s,i.encodedTokenAttributes);return a}static createRoot(e,n){return new L(null,new Te(null,e),n)}static createRootAndLookUpScopeName(e,n,a){const s=a.getMetadataForScope(e),i=new Te(null,e),r=a.themeProvider.themeMatch(i),c=L.mergeAttributes(n,s,r);return new L(null,i,c)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(e){return L.equals(this,e)}static equals(e,n){do{if(e===n||!e&&!n)return!0;if(!e||!n||e.scopeName!==n.scopeName||e.tokenAttributes!==n.tokenAttributes)return!1;e=e.parent,n=n.parent}while(!0)}static mergeAttributes(e,n,a){let s=-1,i=0,r=0;return a!==null&&(s=a.fontStyle,i=a.foregroundId,r=a.backgroundId),X.set(e,n.languageId,n.tokenType,null,s,i,r)}pushAttributed(e,n){if(e===null)return this;if(e.indexOf(" ")===-1)return L._pushAttributed(this,e,n);const a=e.split(/ /g);let s=this;for(const i of a)s=L._pushAttributed(s,i,n);return s}static _pushAttributed(e,n,a){const s=a.getMetadataForScope(n),i=e.scopePath.push(n),r=a.themeProvider.themeMatch(i),c=L.mergeAttributes(e.tokenAttributes,s,r);return new L(e,i,c)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){var s;const n=[];let a=this;for(;a&&a!==e;)n.push({encodedTokenAttributes:a.tokenAttributes,scopeNames:a.scopePath.getExtensionIfDefined(((s=a.parent)==null?void 0:s.scopePath)??null)}),a=a.parent;return a===e?n.reverse():void 0}},P,Xe=(P=class{constructor(e,n,a,s,i,r,c,o){b(this,"_stackElementBrand");b(this,"_enterPos");b(this,"_anchorPos");b(this,"depth");this.parent=e,this.ruleId=n,this.beginRuleCapturedEOL=i,this.endRule=r,this.nameScopesList=c,this.contentNameScopesList=o,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=a,this._anchorPos=s}equals(e){return e===null?!1:P._equals(this,e)}static _equals(e,n){return e===n?!0:this._structuralEquals(e,n)?ae.equals(e.contentNameScopesList,n.contentNameScopesList):!1}static _structuralEquals(e,n){do{if(e===n||!e&&!n)return!0;if(!e||!n||e.depth!==n.depth||e.ruleId!==n.ruleId||e.endRule!==n.endRule)return!1;e=e.parent,n=n.parent}while(!0)}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){P._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(e,n,a,s,i,r,c){return new P(this,e,n,a,s,i,r,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,n){var a,s;return this.parent&&(n=this.parent._writeString(e,n)),e[n++]=`(${this.ruleId}, ${(a=this.nameScopesList)==null?void 0:a.toString()}, ${(s=this.contentNameScopesList)==null?void 0:s.toString()})`,n}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(e){return this.endRule===e?this:new P(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,e,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let n=this;for(;n&&n._enterPos===e._enterPos;){if(n.ruleId===e.ruleId)return!0;n=n.parent}return!1}toStateStackFrame(){var e,n,a;return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:((n=this.nameScopesList)==null?void 0:n.getExtensionIfDefined(((e=this.parent)==null?void 0:e.nameScopesList)??null))??[],contentNameScopesList:((a=this.contentNameScopesList)==null?void 0:a.getExtensionIfDefined(this.nameScopesList))??[]}}static pushFrame(e,n){const a=ae.fromExtension((e==null?void 0:e.nameScopesList)??null,n.nameScopesList);return new P(e,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,a,ae.fromExtension(a,n.contentNameScopesList))}},b(P,"NULL",new P(null,0,0,0,!1,null,null,null)),P),la=class{constructor(t,e){b(this,"balancedBracketScopes");b(this,"unbalancedBracketScopes");b(this,"allowAny",!1);this.balancedBracketScopes=t.flatMap(n=>n==="*"?(this.allowAny=!0,[]):ye(n,xe).map(a=>a.matcher)),this.unbalancedBracketScopes=e.flatMap(n=>ye(n,xe).map(a=>a.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(t){for(const e of this.unbalancedBracketScopes)if(e(t))return!1;for(const e of this.balancedBracketScopes)if(e(t))return!0;return this.allowAny}},ua=class{constructor(t,e,n,a){b(this,"_emitBinaryTokens");b(this,"_lineText");b(this,"_tokens");b(this,"_binaryTokens");b(this,"_lastTokenEndIndex");b(this,"_tokenTypeOverrides");this.balancedBracketSelectors=a,this._emitBinaryTokens=t,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}produce(t,e){this.produceFromScopes(t.contentNameScopesList,e)}produceFromScopes(t,e){var a;if(this._lastTokenEndIndex>=e)return;if(this._emitBinaryTokens){let s=(t==null?void 0:t.tokenAttributes)??0,i=!1;if((a=this.balancedBracketSelectors)!=null&&a.matchesAlways&&(i=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const r=(t==null?void 0:t.getScopeNames())??[];for(const c of this._tokenTypeOverrides)c.matcher(r)&&(s=X.set(s,0,c.type,null,-1,0,0));this.balancedBracketSelectors&&(i=this.balancedBracketSelectors.match(r))}if(i&&(s=X.set(s,0,8,i,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===s){this._lastTokenEndIndex=e;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(s),this._lastTokenEndIndex=e;return}const n=(t==null?void 0:t.getScopeNames())??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:e,scopes:n}),this._lastTokenEndIndex=e}getResult(t,e){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===e-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(t,e),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(t,e){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===e-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(t,e),this._binaryTokens[this._binaryTokens.length-2]=0);const n=new Uint32Array(this._binaryTokens.length);for(let a=0,s=this._binaryTokens.length;a<s;a++)n[a]=this._binaryTokens[a];return n}},ma=class{constructor(t,e){b(this,"_grammars",new Map);b(this,"_rawGrammars",new Map);b(this,"_injectionGrammars",new Map);b(this,"_theme");this._onigLib=e,this._theme=t}dispose(){for(const t of this._grammars.values())t.dispose()}setTheme(t){this._theme=t}getColorMap(){return this._theme.getColorMap()}addGrammar(t,e){this._rawGrammars.set(t.scopeName,t),e&&this._injectionGrammars.set(t.scopeName,e)}lookup(t){return this._rawGrammars.get(t)}injections(t){return this._injectionGrammars.get(t)}getDefaults(){return this._theme.getDefaults()}themeMatch(t){return this._theme.match(t)}grammarForScopeName(t,e,n,a,s){if(!this._grammars.has(t)){let i=this._rawGrammars.get(t);if(!i)return null;this._grammars.set(t,ra(t,i,e,n,a,s,this,this._onigLib))}return this._grammars.get(t)}},pa=class{constructor(e){b(this,"_options");b(this,"_syncRegistry");b(this,"_ensureGrammarCache");this._options=e,this._syncRegistry=new ma(fe.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,n){this._syncRegistry.setTheme(fe.createFromRawTheme(e,n))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,n,a){return this.loadGrammarWithConfiguration(e,n,{embeddedLanguages:a})}loadGrammarWithConfiguration(e,n,a){return this._loadGrammar(e,n,a.embeddedLanguages,a.tokenTypes,new la(a.balancedBracketSelectors||[],a.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,n,a,s,i){const r=new Ot(this._syncRegistry,e);for(;r.Q.length>0;)r.Q.map(c=>this._loadSingleGrammar(c.scopeName)),r.processQueue();return this._grammarForScopeName(e,n,a,s,i)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){const n=this._options.loadGrammar(e);if(n){const a=typeof this._options.getInjections=="function"?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(n,a)}}addGrammar(e,n=[],a=0,s=null){return this._syncRegistry.addGrammar(e,n),this._grammarForScopeName(e.scopeName,a,s)}_grammarForScopeName(e,n=0,a=null,s=null,i=null){return this._syncRegistry.grammarForScopeName(e,n,a,s,i)}},Ve=Xe.NULL;function ke(t,e){const n=typeof t=="string"?{}:{...t.colorReplacements},a=typeof t=="string"?t:t.name;for(const[s,i]of Object.entries((e==null?void 0:e.colorReplacements)||{}))typeof i=="string"?n[s]=i:s===a&&Object.assign(n,i);return n}function W(t,e){return t&&((e==null?void 0:e[t==null?void 0:t.toLowerCase()])||t)}function da(t){return Array.isArray(t)?t:[t]}async function Kn(t){return Promise.resolve(typeof t=="function"?t():t).then(e=>e.default||e)}function Se(t){return!t||["plaintext","txt","text","plain"].includes(t)}function ba(t){return t==="ansi"||Se(t)}function qe(t){return t==="none"}function ga(t){return qe(t)}const ha=/(\r?\n)/g;function Ee(t,e=!1){var i;if(t.length===0)return[["",0]];const n=t.split(ha);let a=0;const s=[];for(let r=0;r<n.length;r+=2){const c=e?n[r]+(n[r+1]||""):n[r];s.push([c,a]),a+=n[r].length,a+=((i=n[r+1])==null?void 0:i.length)||0}return s}const kn={light:"#333333",dark:"#bbbbbb"},wn={light:"#fffffe",dark:"#1e1e1e"},jn="__shiki_resolved";function sn(t){var c,o,l,m,u;if(t!=null&&t[jn])return t;const e={...t};e.tokenColors&&!e.settings&&(e.settings=e.tokenColors,delete e.tokenColors),e.type||(e.type="dark"),e.colorReplacements={...e.colorReplacements},e.settings||(e.settings=[]);let{bg:n,fg:a}=e;if(!n||!a){const p=e.settings?e.settings.find(d=>!d.name&&!d.scope):void 0;(c=p==null?void 0:p.settings)!=null&&c.foreground&&(a=p.settings.foreground),(o=p==null?void 0:p.settings)!=null&&o.background&&(n=p.settings.background),!a&&((l=e==null?void 0:e.colors)!=null&&l["editor.foreground"])&&(a=e.colors["editor.foreground"]),!n&&((m=e==null?void 0:e.colors)!=null&&m["editor.background"])&&(n=e.colors["editor.background"]),a||(a=e.type==="light"?kn.light:kn.dark),n||(n=e.type==="light"?wn.light:wn.dark),e.fg=a,e.bg=n}e.settings[0]&&e.settings[0].settings&&!e.settings[0].scope||e.settings.unshift({settings:{foreground:e.fg,background:e.bg}});let s=0;const i=new Map;function r(p){var g;if(i.has(p))return i.get(p);s+=1;const d=`#${s.toString(16).padStart(8,"0").toLowerCase()}`;return(g=e.colorReplacements)!=null&&g[`#${d}`]?r(p):(i.set(p,d),d)}e.settings=e.settings.map(p=>{var $,y;const d=(($=p.settings)==null?void 0:$.foreground)&&!p.settings.foreground.startsWith("#"),g=((y=p.settings)==null?void 0:y.background)&&!p.settings.background.startsWith("#");if(!d&&!g)return p;const x={...p,settings:{...p.settings}};if(d){const f=r(p.settings.foreground);e.colorReplacements[f]=p.settings.foreground,x.settings.foreground=f}if(g){const f=r(p.settings.background);e.colorReplacements[f]=p.settings.background,x.settings.background=f}return x});for(const p of Object.keys(e.colors||{}))if((p==="editor.foreground"||p==="editor.background"||p.startsWith("terminal.ansi"))&&!((u=e.colors[p])!=null&&u.startsWith("#"))){const d=r(e.colors[p]);e.colorReplacements[d]=e.colors[p],e.colors[p]=d}return Object.defineProperty(e,jn,{enumerable:!1,writable:!1,value:!0}),e}async function Qn(t){return[...new Set((await Promise.all(t.filter(e=>!ba(e)).map(async e=>await Kn(e).then(n=>Array.isArray(n)?n:[n])))).flat())]}async function et(t){return(await Promise.all(t.map(async e=>ga(e)?null:sn(await Kn(e))))).filter(e=>!!e)}function nt(t,e){if(!e)return t;if(e[t]){const n=new Set([t]);for(;e[t];){if(t=e[t],n.has(t))throw new S(`Circular alias \`${[...n].join(" -> ")} -> ${t}\``);n.add(t)}}return t}var fa=class extends pa{constructor(e,n,a,s={}){super(e);b(this,"_resolver");b(this,"_themes");b(this,"_langs");b(this,"_alias");b(this,"_resolvedThemes",new Map);b(this,"_resolvedGrammars",new Map);b(this,"_langMap",new Map);b(this,"_langGraph",new Map);b(this,"_textmateThemeCache",new WeakMap);b(this,"_loadedThemesCache",null);b(this,"_loadedLanguagesCache",null);this._resolver=e,this._themes=n,this._langs=a,this._alias=s,this._themes.map(i=>this.loadTheme(i)),this.loadLanguages(this._langs)}getTheme(e){return typeof e=="string"?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){const n=sn(e);return n.name&&(this._resolvedThemes.set(n.name,n),this._loadedThemesCache=null),n}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(e){let n=this._textmateThemeCache.get(e);n||(n=fe.createFromRawTheme(e),this._textmateThemeCache.set(e,n)),this._syncRegistry.setTheme(n)}getGrammar(e){return e=nt(e,this._alias),this._resolvedGrammars.get(e)}loadLanguage(e){var i,r,c,o;if(this.getGrammar(e.name))return;const n=new Set([...this._langMap.values()].filter(l=>{var m;return(m=l.embeddedLangsLazy)==null?void 0:m.includes(e.name)}));this._resolver.addLanguage(e);const a={balancedBracketSelectors:e.balancedBracketSelectors||["*"],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);const s=this.loadGrammarWithConfiguration(e.scopeName,1,a);if(s.name=e.name,this._resolvedGrammars.set(e.name,s),e.aliases&&e.aliases.forEach(l=>{this._alias[l]=e.name}),this._loadedLanguagesCache=null,n.size)for(const l of n)this._resolvedGrammars.delete(l.name),this._loadedLanguagesCache=null,(r=(i=this._syncRegistry)==null?void 0:i._injectionGrammars)==null||r.delete(l.scopeName),(o=(c=this._syncRegistry)==null?void 0:c._grammars)==null||o.delete(l.scopeName),this.loadLanguage(this._langMap.get(l.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(const s of e)this.resolveEmbeddedLanguages(s);const n=[...this._langGraph.entries()],a=n.filter(([s,i])=>!i);if(a.length){const s=n.filter(([i,r])=>{var c;return r?(c=r.embeddedLanguages||r.embeddedLangs)==null?void 0:c.some(o=>a.map(([l])=>l).includes(o)):!1}).filter(i=>!a.includes(i));throw new S(`Missing languages ${a.map(([i])=>`\`${i}\``).join(", ")}, required by ${s.map(([i])=>`\`${i}\``).join(", ")}`)}for(const[s,i]of n)this._resolver.addLanguage(i);for(const[s,i]of n)this.loadLanguage(i)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(e){this._langMap.set(e.name,e),this._langGraph.set(e.name,e);const n=e.embeddedLanguages??e.embeddedLangs;if(n)for(const a of n)this._langGraph.set(a,this._langMap.get(a))}},ya=class{constructor(t,e){b(this,"_langs",new Map);b(this,"_scopeToLang",new Map);b(this,"_injections",new Map);b(this,"_onigLib");this._onigLib={createOnigScanner:n=>t.createScanner(n),createOnigString:n=>t.createString(n)},e.forEach(n=>this.addLanguage(n))}get onigLib(){return this._onigLib}getLangRegistration(t){return this._langs.get(t)}loadGrammar(t){return this._scopeToLang.get(t)}addLanguage(t){this._langs.set(t.name,t),t.aliases&&t.aliases.forEach(e=>{this._langs.set(e,t)}),this._scopeToLang.set(t.scopeName,t),t.injectTo&&t.injectTo.forEach(e=>{this._injections.get(e)||this._injections.set(e,[]),this._injections.get(e).push(t.scopeName)})}getInjections(t){const e=t.split(".");let n=[];for(let a=1;a<=e.length;a++){const s=e.slice(0,a).join(".");n=[...n,...this._injections.get(s)||[]]}return n}};let ne=0;function _a(t){ne+=1,t.warnings!==!1&&ne>=10&&ne%10===0&&console.warn(`[Shiki] ${ne} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let e=!1;if(!t.engine)throw new S("`engine` option is required for synchronous mode");const n=(t.langs||[]).flat(1),a=(t.themes||[]).flat(1).map(sn),s=new fa(new ya(t.engine,n),a,n,t.langAlias);let i;function r(f){return nt(f,t.langAlias)}function c(f){$();const _=s.getGrammar(typeof f=="string"?f:f.name);if(!_)throw new S(`Language \`${f}\` not found, you may need to load it first`);return _}function o(f){if(f==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};$();const _=s.getTheme(f);if(!_)throw new S(`Theme \`${f}\` not found, you may need to load it first`);return _}function l(f){$();const _=o(f);return i!==f&&(s.setTheme(_),i=f),{theme:_,colorMap:s.getColorMap()}}function m(){return $(),s.getLoadedThemes()}function u(){return $(),s.getLoadedLanguages()}function p(...f){$(),s.loadLanguages(f.flat(1))}async function d(...f){return p(await Qn(f))}function g(...f){$();for(const _ of f.flat(1))s.loadTheme(_)}async function x(...f){return $(),g(await et(f))}function $(){if(e)throw new S("Shiki instance has been disposed")}function y(){e||(e=!0,s.dispose(),ne-=1)}return{setTheme:l,getTheme:o,getLanguage:c,getLoadedThemes:m,getLoadedLanguages:u,resolveLangAlias:r,loadLanguage:d,loadLanguageSync:p,loadTheme:x,loadThemeSync:g,dispose:y,[Symbol.dispose]:y}}async function $a(t){t.engine||console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[e,n,a]=await Promise.all([et(t.themes||[]),Qn(t.langs||[]),t.engine]);return _a({...t,themes:e,langs:n,engine:a})}const tt=new WeakMap;function Ae(t,e){tt.set(t,e)}function oe(t){return tt.get(t)}var Ne=class at{constructor(...e){b(this,"_stacks",{});b(this,"lang");if(e.length===2){const[n,a]=e;this.lang=a,this._stacks=n}else{const[n,a,s]=e;this.lang=a,this._stacks={[s]:n}}}get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(e,n){return new at(Object.fromEntries(da(n).map(a=>[a,Ve])),e)}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){return xa(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function xa(t){const e=[],n=new Set;function a(s){var r;if(n.has(s))return;n.add(s);const i=(r=s==null?void 0:s.nameScopesList)==null?void 0:r.scopeName;i&&e.push(i),s.parent&&a(s.parent)}return a(t),e}function ka(t,e){if(!(t instanceof Ne))throw new S("Invalid grammar state");return t.getInternalStack(e)}const wa=/,/,ja=/ /;function st(t,e,n={}){const{theme:a=t.getLoadedThemes()[0]}=n;if(Se(t.resolveLangAlias(n.lang||"text"))||qe(a))return Ee(e).map(c=>[{content:c[0],offset:c[1]}]);const{theme:s,colorMap:i}=t.setTheme(a),r=t.getLanguage(n.lang||"text");if(n.grammarState){if(n.grammarState.lang!==r.name)throw new S(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${r.name}"`);if(!n.grammarState.themes.includes(s.name))throw new S(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${s.name}"`)}return Ca(e,r,s,i,n)}function va(...t){if(t.length===2)return oe(t[1]);const[e,n,a={}]=t,{lang:s="text",theme:i=e.getLoadedThemes()[0]}=a;if(Se(s)||qe(i))throw new S("Plain language does not have grammar state");if(s==="ansi")throw new S("ANSI language does not have grammar state");const{theme:r,colorMap:c}=e.setTheme(i),o=e.getLanguage(s);return new Ne(rn(n,o,r,c,a).stateStack,o.name,r.name)}function Ca(t,e,n,a,s){const i=rn(t,e,n,a,s),r=new Ne(i.stateStack,e.name,n.name);return Ae(i.tokens,r),i.tokens}function rn(t,e,n,a,s){const i=ke(n,s),{tokenizeMaxLineLength:r=0,tokenizeTimeLimit:c=500,includeExplanation:o=!1}=s,l=Ee(t);let m=s.grammarState?ka(s.grammarState,n.name)??Ve:s.grammarContextCode!=null?rn(s.grammarContextCode,e,n,a,{...s,grammarState:void 0,grammarContextCode:void 0}).stateStack:Ve,u=[];const p=[];for(let d=0,g=l.length;d<g;d++){const[x,$]=l[d];if(x===""){u=[],p.push([]);continue}if(r>0&&x.length>=r){u=[],p.push([{content:x,offset:$,color:"",fontStyle:0}]);continue}let y,f,_;o&&o!=="tokenType"&&(y=e.tokenizeLine(x,m,c),f=y.tokens,_=0);const w=e.tokenizeLine2(x,m,c),j=w.tokens.length/2;for(let v=0;v<j;v++){const z=w.tokens[2*v],J=v+1<j?w.tokens[2*v+2]:x.length;if(z===J)continue;const B=w.tokens[2*v+1],U=W(a[X.getForeground(B)],i),ue=X.getFontStyle(B),Z={content:x.substring(z,J),offset:$+z,color:U,fontStyle:ue};if(o==="tokenType")Z.type=X.getTokenType(B);else if(o){const pn=[];if(o!=="scopeName")for(const M of n.settings){let K;switch(typeof M.scope){case"string":K=M.scope.split(wa).map(Be=>Be.trim());break;case"object":K=M.scope;break;default:continue}pn.push({settings:M,selectors:K.map(Be=>Be.split(ja))})}Z.explanation=[];let dn=0;for(;z+dn<J;){const M=f[_],K=x.substring(M.startIndex,M.endIndex);dn+=K.length,Z.explanation.push({content:K,scopes:o==="scopeName"?Sa(M.scopes):qa(pn,M.scopes)}),_+=1}}u.push(Z)}p.push(u),u=[],m=w.ruleStack}return{tokens:p,stateStack:m}}function Sa(t){return t.map(e=>({scopeName:e}))}function qa(t,e){const n=[];for(let a=0,s=e.length;a<s;a++){const i=e[a];n[a]={scopeName:i,themeMatches:Aa(t,i,e.slice(0,a))}}return n}function vn(t,e){return t===e||e.substring(0,t.length)===t&&e[t.length]==="."}function Ea(t,e,n){if(!vn(t.at(-1),e))return!1;let a=t.length-2,s=n.length-1;for(;a>=0&&s>=0;)vn(t[a],n[s])&&(a-=1),s-=1;return a===-1}function Aa(t,e,n){const a=[];for(const{selectors:s,settings:i}of t)for(const r of s)if(Ea(r,e,n)){a.push(i);break}return a}function it(t,e,n,a=st){const s=Object.entries(n.themes).filter(l=>l[1]).map(l=>({color:l[0],theme:l[1]})),i=s.map(l=>{const m=a(t,e,{...n,theme:l.theme});return{tokens:m,state:oe(m),theme:typeof l.theme=="string"?l.theme:l.theme.name}}),r=Na(...i.map(l=>l.tokens)),c=r[0].map((l,m)=>l.map((u,p)=>{const d={content:u.content,variants:{},offset:u.offset};return"includeExplanation"in n&&n.includeExplanation&&(d.explanation=u.explanation),r.forEach((g,x)=>{const{content:$,explanation:y,offset:f,..._}=g[m][p];d.variants[s[x].color]=_}),d})),o=i[0].state?new Ne(Object.fromEntries(i.map(l=>{var m;return[l.theme,(m=l.state)==null?void 0:m.getInternalStack(l.theme)]})),i[0].state.lang):void 0;return o&&Ae(c,o),c}function Na(...t){const e=t.map(()=>[]),n=t.length;for(let a=0;a<t[0].length;a++){const s=t.map(o=>o[a]),i=e.map(()=>[]);e.forEach((o,l)=>o.push(i[l]));const r=s.map(()=>0),c=s.map(o=>o[0]);for(;c.every(o=>o);){const o=Math.min(...c.map(l=>l.content.length));for(let l=0;l<n;l++){const m=c[l];m.content.length===o?(i[l].push(m),r[l]+=1,c[l]=s[l][r[l]]):(i[l].push({...m,content:m.content.slice(0,o)}),c[l]={...m,content:m.content.slice(o),offset:m.offset+o})}}}return e}const Ga=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class le{constructor(e,n,a){this.normal=n,this.property=e,a&&(this.space=a)}}le.prototype.normal={};le.prototype.property={};le.prototype.space=void 0;function rt(t,e){const n={},a={};for(const s of t)Object.assign(n,s.property),Object.assign(a,s.normal);return new le(n,a,e)}function Ye(t){return t.toLowerCase()}class R{constructor(e,n){this.attribute=n,this.property=e}}R.prototype.attribute="";R.prototype.booleanish=!1;R.prototype.boolean=!1;R.prototype.commaOrSpaceSeparated=!1;R.prototype.commaSeparated=!1;R.prototype.defined=!1;R.prototype.mustUseProperty=!1;R.prototype.number=!1;R.prototype.overloadedBoolean=!1;R.prototype.property="";R.prototype.spaceSeparated=!1;R.prototype.space=void 0;let Fa=0;const k=Y(),q=Y(),Je=Y(),h=Y(),C=Y(),V=Y(),T=Y();function Y(){return 2**++Fa}const Ke=Object.freeze(Object.defineProperty({__proto__:null,boolean:k,booleanish:q,commaOrSpaceSeparated:T,commaSeparated:V,number:h,overloadedBoolean:Je,spaceSeparated:C},Symbol.toStringTag,{value:"Module"})),Pe=Object.keys(Ke);class on extends R{constructor(e,n,a,s){let i=-1;if(super(e,n),Cn(this,"space",s),typeof a=="number")for(;++i<Pe.length;){const r=Pe[i];Cn(this,Pe[i],(a&Ke[r])===Ke[r])}}}on.prototype.defined=!0;function Cn(t,e,n){n&&(t[e]=n)}function ee(t){const e={},n={};for(const[a,s]of Object.entries(t.properties)){const i=new on(a,t.transform(t.attributes||{},a),s,t.space);t.mustUseProperty&&t.mustUseProperty.includes(a)&&(i.mustUseProperty=!0),e[a]=i,n[Ye(a)]=a,n[Ye(i.attribute)]=a}return new le(e,n,t.space)}const ot=ee({properties:{ariaActiveDescendant:null,ariaAtomic:q,ariaAutoComplete:null,ariaBusy:q,ariaChecked:q,ariaColCount:h,ariaColIndex:h,ariaColSpan:h,ariaControls:C,ariaCurrent:null,ariaDescribedBy:C,ariaDetails:null,ariaDisabled:q,ariaDropEffect:C,ariaErrorMessage:null,ariaExpanded:q,ariaFlowTo:C,ariaGrabbed:q,ariaHasPopup:null,ariaHidden:q,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:C,ariaLevel:h,ariaLive:null,ariaModal:q,ariaMultiLine:q,ariaMultiSelectable:q,ariaOrientation:null,ariaOwns:C,ariaPlaceholder:null,ariaPosInSet:h,ariaPressed:q,ariaReadOnly:q,ariaRelevant:null,ariaRequired:q,ariaRoleDescription:C,ariaRowCount:h,ariaRowIndex:h,ariaRowSpan:h,ariaSelected:q,ariaSetSize:h,ariaSort:null,ariaValueMax:h,ariaValueMin:h,ariaValueNow:h,ariaValueText:null,role:null},transform(t,e){return e==="role"?e:"aria-"+e.slice(4).toLowerCase()}});function ct(t,e){return e in t?t[e]:e}function lt(t,e){return ct(t,e.toLowerCase())}const za=ee({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:V,acceptCharset:C,accessKey:C,action:null,allow:null,allowFullScreen:k,allowPaymentRequest:k,allowUserMedia:k,alpha:k,alt:null,as:null,async:k,autoCapitalize:null,autoComplete:C,autoFocus:k,autoPlay:k,blocking:C,capture:null,charSet:null,checked:k,cite:null,className:C,closedBy:null,colorSpace:null,cols:h,colSpan:h,command:null,commandFor:null,content:null,contentEditable:q,controls:k,controlsList:C,coords:h|V,crossOrigin:null,data:null,dateTime:null,decoding:null,default:k,defer:k,dir:null,dirName:null,disabled:k,download:Je,draggable:q,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:k,formTarget:null,headers:C,height:h,hidden:Je,high:h,href:null,hrefLang:null,htmlFor:C,httpEquiv:C,id:null,imageSizes:null,imageSrcSet:null,inert:k,inputMode:null,integrity:null,is:null,isMap:k,itemId:null,itemProp:C,itemRef:C,itemScope:k,itemType:C,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:k,low:h,manifest:null,max:null,maxLength:h,media:null,method:null,min:null,minLength:h,multiple:k,muted:k,name:null,nonce:null,noModule:k,noValidate:k,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:k,optimum:h,pattern:null,ping:C,placeholder:null,playsInline:k,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:k,referrerPolicy:null,rel:C,required:k,reversed:k,rows:h,rowSpan:h,sandbox:C,scope:null,scoped:k,seamless:k,selected:k,shadowRootClonable:k,shadowRootCustomElementRegistry:k,shadowRootDelegatesFocus:k,shadowRootMode:null,shadowRootSerializable:k,shape:null,size:h,sizes:null,slot:null,span:h,spellCheck:q,src:null,srcDoc:null,srcLang:null,srcSet:null,start:h,step:null,style:null,tabIndex:h,target:null,title:null,translate:null,type:null,typeMustMatch:k,useMap:null,value:q,width:h,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:C,axis:null,background:null,bgColor:null,border:h,borderColor:null,bottomMargin:h,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:k,declare:k,event:null,face:null,frame:null,frameBorder:null,hSpace:h,leftMargin:h,link:null,longDesc:null,lowSrc:null,marginHeight:h,marginWidth:h,noResize:k,noHref:k,noShade:k,noWrap:k,object:null,profile:null,prompt:null,rev:null,rightMargin:h,rules:null,scheme:null,scrolling:q,standby:null,summary:null,text:null,topMargin:h,valueType:null,version:null,vAlign:null,vLink:null,vSpace:h,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:k,disablePictureInPicture:k,disableRemotePlayback:k,exportParts:V,part:C,prefix:null,property:null,results:h,security:null,unselectable:null},space:"html",transform:lt}),Ba=ee({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:T,accentHeight:h,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:h,amplitude:h,arabicForm:null,ascent:h,attributeName:null,attributeType:null,azimuth:h,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:h,by:null,calcMode:null,capHeight:h,className:C,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:h,diffuseConstant:h,direction:null,display:null,dur:null,divisor:h,dominantBaseline:null,download:k,dx:null,dy:null,edgeMode:null,editable:null,elevation:h,enableBackground:null,end:null,event:null,exponent:h,externalResourcesRequired:null,fill:null,fillOpacity:h,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:V,g2:V,glyphName:V,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:h,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:h,horizOriginX:h,horizOriginY:h,id:null,ideographic:h,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:h,k:h,k1:h,k2:h,k3:h,k4:h,kernelMatrix:T,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:h,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:h,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:h,overlineThickness:h,paintOrder:null,panose1:null,path:null,pathLength:h,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:C,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:h,pointsAtY:h,pointsAtZ:h,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:T,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:T,rev:T,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:T,requiredFeatures:T,requiredFonts:T,requiredFormats:T,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:h,specularExponent:h,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:h,strikethroughThickness:h,string:null,stroke:null,strokeDashArray:T,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:h,strokeOpacity:h,strokeWidth:null,style:null,surfaceScale:h,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:T,tabIndex:h,tableValues:null,target:null,targetX:h,targetY:h,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:T,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:h,underlineThickness:h,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:h,values:null,vAlphabetic:h,vMathematical:h,vectorEffect:null,vHanging:h,vIdeographic:h,version:null,vertAdvY:h,vertOriginX:h,vertOriginY:h,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:h,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:ct}),ut=ee({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(t,e){return"xlink:"+e.slice(5).toLowerCase()}}),mt=ee({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:lt}),pt=ee({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(t,e){return"xml:"+e.slice(3).toLowerCase()}}),Ra=/[A-Z]/g,Sn=/-[a-z]/g,Ta=/^data[-\w.:]+$/i;function Ia(t,e){const n=Ye(e);let a=e,s=R;if(n in t.normal)return t.property[t.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Ta.test(e)){if(e.charAt(4)==="-"){const i=e.slice(5).replace(Sn,La);a="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=e.slice(4);if(!Sn.test(i)){let r=i.replace(Ra,Pa);r.charAt(0)!=="-"&&(r="-"+r),e="data"+r}}s=on}return new s(a,e)}function Pa(t){return"-"+t.toLowerCase()}function La(t){return t.charAt(1).toUpperCase()}const Oa=rt([ot,za,ut,mt,pt],"html"),dt=rt([ot,Ba,ut,mt,pt],"svg"),qn={}.hasOwnProperty;function Ma(t,e){const n=e||{};function a(s,...i){let r=a.invalid;const c=a.handlers;if(s&&qn.call(s,t)){const o=String(s[t]);r=qn.call(c,o)?c[o]:a.unknown}if(r)return r.call(this,s,...i)}return a.handlers=n.handlers||{},a.invalid=n.invalid,a.unknown=n.unknown,a}const Da=/["&'<>`]/g,Ua=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Za=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,Wa=/[|\\{}()[\]^$+*?.]/g,En=new WeakMap;function Ha(t,e){if(t=t.replace(e.subset?Xa(e.subset):Da,a),e.subset||e.escapeOnly)return t;return t.replace(Ua,n).replace(Za,a);function n(s,i,r){return e.format((s.charCodeAt(0)-55296)*1024+s.charCodeAt(1)-56320+65536,r.charCodeAt(i+2),e)}function a(s,i,r){return e.format(s.charCodeAt(0),r.charCodeAt(i+1),e)}}function Xa(t){let e=En.get(t);return e||(e=Va(t),En.set(t,e)),e}function Va(t){const e=[];let n=-1;for(;++n<t.length;)e.push(t[n].replace(Wa,"\\$&"));return new RegExp("(?:"+e.join("|")+")","g")}const Ya=/[\dA-Fa-f]/;function Ja(t,e,n){const a="&#x"+t.toString(16).toUpperCase();return n&&e&&!Ya.test(String.fromCharCode(e))?a:a+";"}const Ka=/\d/;function Qa(t,e,n){const a="&#"+String(t);return n&&e&&!Ka.test(String.fromCharCode(e))?a:a+";"}const es=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],Le={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},ns=["cent","copy","divide","gt","lt","not","para","times"],bt={}.hasOwnProperty,Qe={};let pe;for(pe in Le)bt.call(Le,pe)&&(Qe[Le[pe]]=pe);const ts=/[^\dA-Za-z]/;function as(t,e,n,a){const s=String.fromCharCode(t);if(bt.call(Qe,s)){const i=Qe[s],r="&"+i;return n&&es.includes(i)&&!ns.includes(i)&&(!a||e&&e!==61&&ts.test(String.fromCharCode(e)))?r:r+";"}return""}function ss(t,e,n){let a=Ja(t,e,n.omitOptionalSemicolons),s;if((n.useNamedReferences||n.useShortestReferences)&&(s=as(t,e,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!s)&&n.useShortestReferences){const i=Qa(t,e,n.omitOptionalSemicolons);i.length<a.length&&(a=i)}return s&&(!n.useShortestReferences||s.length<a.length)?s:a}function Q(t,e){return Ha(t,Object.assign({format:ss},e))}const is=/^>|^->|<!--|-->|--!>|<!-$/g,rs=[">"],os=["<",">"];function cs(t,e,n,a){return a.settings.bogusComments?"<?"+Q(t.value,Object.assign({},a.settings.characterReferences,{subset:rs}))+">":"<!--"+t.value.replace(is,s)+"-->";function s(i){return Q(i,Object.assign({},a.settings.characterReferences,{subset:os}))}}function ls(t,e,n,a){return"<!"+(a.settings.upperDoctype?"DOCTYPE":"doctype")+(a.settings.tightDoctype?"":" ")+"html>"}function An(t,e){const n=String(t);if(typeof e!="string")throw new TypeError("Expected character");let a=0,s=n.indexOf(e);for(;s!==-1;)a++,s=n.indexOf(e,s+e.length);return a}function us(t,e){const n=e||{};return(t[t.length-1]===""?[...t,""]:t).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function ms(t){return t.join(" ").trim()}const ps=/[ \t\n\f\r]/g;function cn(t){return typeof t=="object"?t.type==="text"?Nn(t.value):!1:Nn(t)}function Nn(t){return t.replace(ps,"")===""}const A=ht(1),gt=ht(-1),ds=[];function ht(t){return e;function e(n,a,s){const i=n?n.children:ds;let r=(a||0)+t,c=i[r];if(!s)for(;c&&cn(c);)r+=t,c=i[r];return c}}const bs={}.hasOwnProperty;function ft(t){return e;function e(n,a,s){return bs.call(t,n.tagName)&&t[n.tagName](n,a,s)}}const ln=ft({body:hs,caption:Oe,colgroup:Oe,dd:$s,dt:_s,head:Oe,html:gs,li:ys,optgroup:xs,option:ks,p:fs,rp:Gn,rt:Gn,tbody:js,td:Fn,tfoot:vs,th:Fn,thead:ws,tr:Cs});function Oe(t,e,n){const a=A(n,e,!0);return!a||a.type!=="comment"&&!(a.type==="text"&&cn(a.value.charAt(0)))}function gs(t,e,n){const a=A(n,e);return!a||a.type!=="comment"}function hs(t,e,n){const a=A(n,e);return!a||a.type!=="comment"}function fs(t,e,n){const a=A(n,e);return a?a.type==="element"&&(a.tagName==="address"||a.tagName==="article"||a.tagName==="aside"||a.tagName==="blockquote"||a.tagName==="details"||a.tagName==="div"||a.tagName==="dl"||a.tagName==="fieldset"||a.tagName==="figcaption"||a.tagName==="figure"||a.tagName==="footer"||a.tagName==="form"||a.tagName==="h1"||a.tagName==="h2"||a.tagName==="h3"||a.tagName==="h4"||a.tagName==="h5"||a.tagName==="h6"||a.tagName==="header"||a.tagName==="hgroup"||a.tagName==="hr"||a.tagName==="main"||a.tagName==="menu"||a.tagName==="nav"||a.tagName==="ol"||a.tagName==="p"||a.tagName==="pre"||a.tagName==="section"||a.tagName==="table"||a.tagName==="ul"):!n||!(n.type==="element"&&(n.tagName==="a"||n.tagName==="audio"||n.tagName==="del"||n.tagName==="ins"||n.tagName==="map"||n.tagName==="noscript"||n.tagName==="video"))}function ys(t,e,n){const a=A(n,e);return!a||a.type==="element"&&a.tagName==="li"}function _s(t,e,n){const a=A(n,e);return!!(a&&a.type==="element"&&(a.tagName==="dt"||a.tagName==="dd"))}function $s(t,e,n){const a=A(n,e);return!a||a.type==="element"&&(a.tagName==="dt"||a.tagName==="dd")}function Gn(t,e,n){const a=A(n,e);return!a||a.type==="element"&&(a.tagName==="rp"||a.tagName==="rt")}function xs(t,e,n){const a=A(n,e);return!a||a.type==="element"&&a.tagName==="optgroup"}function ks(t,e,n){const a=A(n,e);return!a||a.type==="element"&&(a.tagName==="option"||a.tagName==="optgroup")}function ws(t,e,n){const a=A(n,e);return!!(a&&a.type==="element"&&(a.tagName==="tbody"||a.tagName==="tfoot"))}function js(t,e,n){const a=A(n,e);return!a||a.type==="element"&&(a.tagName==="tbody"||a.tagName==="tfoot")}function vs(t,e,n){return!A(n,e)}function Cs(t,e,n){const a=A(n,e);return!a||a.type==="element"&&a.tagName==="tr"}function Fn(t,e,n){const a=A(n,e);return!a||a.type==="element"&&(a.tagName==="td"||a.tagName==="th")}const Ss=ft({body:As,colgroup:Ns,head:Es,html:qs,tbody:Gs});function qs(t){const e=A(t,-1);return!e||e.type!=="comment"}function Es(t){const e=new Set;for(const a of t.children)if(a.type==="element"&&(a.tagName==="base"||a.tagName==="title")){if(e.has(a.tagName))return!1;e.add(a.tagName)}const n=t.children[0];return!n||n.type==="element"}function As(t){const e=A(t,-1,!0);return!e||e.type!=="comment"&&!(e.type==="text"&&cn(e.value.charAt(0)))&&!(e.type==="element"&&(e.tagName==="meta"||e.tagName==="link"||e.tagName==="script"||e.tagName==="style"||e.tagName==="template"))}function Ns(t,e,n){const a=gt(n,e),s=A(t,-1,!0);return n&&a&&a.type==="element"&&a.tagName==="colgroup"&&ln(a,n.children.indexOf(a),n)?!1:!!(s&&s.type==="element"&&s.tagName==="col")}function Gs(t,e,n){const a=gt(n,e),s=A(t,-1);return n&&a&&a.type==="element"&&(a.tagName==="thead"||a.tagName==="tbody")&&ln(a,n.children.indexOf(a),n)?!1:!!(s&&s.type==="element"&&s.tagName==="tr")}const de={name:[[`
4
4
  \f\r &/=>`.split(""),`
@@ -1 +1 @@
1
- import{l as e}from"./Editor-DR-GTFmf.js";import"./index-DVg10dTN.js";import"./grammar-yCr7BdNP.js";const t=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],r={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:["{{!--","--}}"]},brackets:[["<!--","-->"],["<",">"],["{{","}}"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"}],onEnterRules:[{beforeText:new RegExp(`<(?!(?:${t.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),afterText:/^<\/(\w[\w\d]*)\s*>$/i,action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:new RegExp(`<(?!(?:${t.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),action:{indentAction:e.IndentAction.Indent}}]},i={defaultToken:"",tokenPostfix:"",tokenizer:{root:[[/\{\{!--/,"comment.block.start.handlebars","@commentBlock"],[/\{\{!/,"comment.start.handlebars","@comment"],[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.root"}],[/<!DOCTYPE/,"metatag.html","@doctype"],[/<!--/,"comment.html","@commentHtml"],[/(<)(\w+)(\/>)/,["delimiter.html","tag.html","delimiter.html"]],[/(<)(script)/,["delimiter.html",{token:"tag.html",next:"@script"}]],[/(<)(style)/,["delimiter.html",{token:"tag.html",next:"@style"}]],[/(<)([:\w]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/(<\/)(\w+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/</,"delimiter.html"],[/\{/,"delimiter.html"],[/[^<{]+/]],doctype:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.comment"}],[/[^>]+/,"metatag.content.html"],[/>/,"metatag.html","@pop"]],comment:[[/\}\}/,"comment.end.handlebars","@pop"],[/./,"comment.content.handlebars"]],commentBlock:[[/--\}\}/,"comment.block.end.handlebars","@pop"],[/./,"comment.content.handlebars"]],commentHtml:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.comment"}],[/-->/,"comment.html","@pop"],[/[^-]+/,"comment.content.html"],[/./,"comment.content.html"]],otherTag:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.otherTag"}],[/\/?>/,"delimiter.html","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.script"}],[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],scriptAfterType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptAfterType"}],[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInEmbeddedState.scriptEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],style:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.style"}],[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],styleAfterType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleAfterType"}],[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInEmbeddedState.styleEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],handlebarsInSimpleState:[[/\{\{\{?/,"delimiter.handlebars"],[/\}\}\}?/,{token:"delimiter.handlebars",switchTo:"@$S2.$S3"}],{include:"handlebarsRoot"}],handlebarsInEmbeddedState:[[/\{\{\{?/,"delimiter.handlebars"],[/\}\}\}?/,{token:"delimiter.handlebars",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}],{include:"handlebarsRoot"}],handlebarsRoot:[[/"[^"]*"/,"string.handlebars"],[/[#/][^\s}]+/,"keyword.helper.handlebars"],[/else\b/,"keyword.helper.handlebars"],[/[\s]+/],[/[^}]/,"variable.parameter.handlebars"]]}};export{r as conf,i as language};
1
+ import{l as e}from"./Editor-D5UJRxLO.js";import"./index-BGLn9_S8.js";import"./grammar-xCgG7hS1.js";const t=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],r={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:["{{!--","--}}"]},brackets:[["<!--","-->"],["<",">"],["{{","}}"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"}],onEnterRules:[{beforeText:new RegExp(`<(?!(?:${t.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),afterText:/^<\/(\w[\w\d]*)\s*>$/i,action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:new RegExp(`<(?!(?:${t.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),action:{indentAction:e.IndentAction.Indent}}]},i={defaultToken:"",tokenPostfix:"",tokenizer:{root:[[/\{\{!--/,"comment.block.start.handlebars","@commentBlock"],[/\{\{!/,"comment.start.handlebars","@comment"],[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.root"}],[/<!DOCTYPE/,"metatag.html","@doctype"],[/<!--/,"comment.html","@commentHtml"],[/(<)(\w+)(\/>)/,["delimiter.html","tag.html","delimiter.html"]],[/(<)(script)/,["delimiter.html",{token:"tag.html",next:"@script"}]],[/(<)(style)/,["delimiter.html",{token:"tag.html",next:"@style"}]],[/(<)([:\w]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/(<\/)(\w+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/</,"delimiter.html"],[/\{/,"delimiter.html"],[/[^<{]+/]],doctype:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.comment"}],[/[^>]+/,"metatag.content.html"],[/>/,"metatag.html","@pop"]],comment:[[/\}\}/,"comment.end.handlebars","@pop"],[/./,"comment.content.handlebars"]],commentBlock:[[/--\}\}/,"comment.block.end.handlebars","@pop"],[/./,"comment.content.handlebars"]],commentHtml:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.comment"}],[/-->/,"comment.html","@pop"],[/[^-]+/,"comment.content.html"],[/./,"comment.content.html"]],otherTag:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.otherTag"}],[/\/?>/,"delimiter.html","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.script"}],[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],scriptAfterType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptAfterType"}],[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInEmbeddedState.scriptEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],style:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.style"}],[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],styleAfterType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleAfterType"}],[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInEmbeddedState.styleEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],handlebarsInSimpleState:[[/\{\{\{?/,"delimiter.handlebars"],[/\}\}\}?/,{token:"delimiter.handlebars",switchTo:"@$S2.$S3"}],{include:"handlebarsRoot"}],handlebarsInEmbeddedState:[[/\{\{\{?/,"delimiter.handlebars"],[/\}\}\}?/,{token:"delimiter.handlebars",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}],{include:"handlebarsRoot"}],handlebarsRoot:[[/"[^"]*"/,"string.handlebars"],[/[#/][^\s}]+/,"keyword.helper.handlebars"],[/else\b/,"keyword.helper.handlebars"],[/[\s]+/],[/[^}]/,"variable.parameter.handlebars"]]}};export{r as conf,i as language};
@@ -1 +1 @@
1
- import{l as e}from"./Editor-DR-GTFmf.js";import"./index-DVg10dTN.js";import"./grammar-yCr7BdNP.js";const t=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],o={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:["<!--","-->"]},brackets:[["<!--","-->"],["<",">"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"}],onEnterRules:[{beforeText:new RegExp(`<(?!(?:${t.join("|")}))([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),afterText:/^<\/([_:\w][_:\w-.\d]*)\s*>$/i,action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:new RegExp(`<(?!(?:${t.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),action:{indentAction:e.IndentAction.Indent}}],folding:{markers:{start:new RegExp("^\\s*<!--\\s*#region\\b.*-->"),end:new RegExp("^\\s*<!--\\s*#endregion\\b.*-->")}}},s={defaultToken:"",tokenPostfix:".html",ignoreCase:!0,tokenizer:{root:[[/<!DOCTYPE/,"metatag","@doctype"],[/<!--/,"comment","@comment"],[/(<)((?:[\w\-]+:)?[\w\-]+)(\s*)(\/>)/,["delimiter","tag","","delimiter"]],[/(<)(script)/,["delimiter",{token:"tag",next:"@script"}]],[/(<)(style)/,["delimiter",{token:"tag",next:"@style"}]],[/(<)((?:[\w\-]+:)?[\w\-]+)/,["delimiter",{token:"tag",next:"@otherTag"}]],[/(<\/)((?:[\w\-]+:)?[\w\-]+)/,["delimiter",{token:"tag",next:"@otherTag"}]],[/</,"delimiter"],[/[^<]+/]],doctype:[[/[^>]+/,"metatag.content"],[/>/,"metatag","@pop"]],comment:[[/-->/,"comment","@pop"],[/[^-]+/,"comment.content"],[/./,"comment.content"]],otherTag:[[/\/?>/,"delimiter","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter","tag",{token:"delimiter",next:"@pop"}]]],scriptAfterType:[[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/"module"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.text/javascript"}],[/'module'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.text/javascript"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/>/,{token:"delimiter",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/[^<]+/,""]],style:[[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter","tag",{token:"delimiter",next:"@pop"}]]],styleAfterType:[[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/>/,{token:"delimiter",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/[^<]+/,""]]}};export{o as conf,s as language};
1
+ import{l as e}from"./Editor-D5UJRxLO.js";import"./index-BGLn9_S8.js";import"./grammar-xCgG7hS1.js";const t=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],o={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:["<!--","-->"]},brackets:[["<!--","-->"],["<",">"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"}],onEnterRules:[{beforeText:new RegExp(`<(?!(?:${t.join("|")}))([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),afterText:/^<\/([_:\w][_:\w-.\d]*)\s*>$/i,action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:new RegExp(`<(?!(?:${t.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),action:{indentAction:e.IndentAction.Indent}}],folding:{markers:{start:new RegExp("^\\s*<!--\\s*#region\\b.*-->"),end:new RegExp("^\\s*<!--\\s*#endregion\\b.*-->")}}},s={defaultToken:"",tokenPostfix:".html",ignoreCase:!0,tokenizer:{root:[[/<!DOCTYPE/,"metatag","@doctype"],[/<!--/,"comment","@comment"],[/(<)((?:[\w\-]+:)?[\w\-]+)(\s*)(\/>)/,["delimiter","tag","","delimiter"]],[/(<)(script)/,["delimiter",{token:"tag",next:"@script"}]],[/(<)(style)/,["delimiter",{token:"tag",next:"@style"}]],[/(<)((?:[\w\-]+:)?[\w\-]+)/,["delimiter",{token:"tag",next:"@otherTag"}]],[/(<\/)((?:[\w\-]+:)?[\w\-]+)/,["delimiter",{token:"tag",next:"@otherTag"}]],[/</,"delimiter"],[/[^<]+/]],doctype:[[/[^>]+/,"metatag.content"],[/>/,"metatag","@pop"]],comment:[[/-->/,"comment","@pop"],[/[^-]+/,"comment.content"],[/./,"comment.content"]],otherTag:[[/\/?>/,"delimiter","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter","tag",{token:"delimiter",next:"@pop"}]]],scriptAfterType:[[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/"module"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.text/javascript"}],[/'module'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.text/javascript"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/>/,{token:"delimiter",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/[^<]+/,""]],style:[[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter","tag",{token:"delimiter",next:"@pop"}]]],styleAfterType:[[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/>/,{token:"delimiter",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/[^<]+/,""]]}};export{o as conf,s as language};
@@ -1 +1 @@
1
- import{c as D,l as t}from"./Editor-DR-GTFmf.js";import{H as d,D as l,h as c,F as u,b as h,S as m,c as p,f as w,g as _,C as R}from"./lspLanguageFeatures-DqXzGsHQ.js";import{a as b,e as y,d as T,R as U,i as x,j as M,t as j,k as O}from"./lspLanguageFeatures-DqXzGsHQ.js";import"./index-DVg10dTN.js";import"./grammar-yCr7BdNP.js";const I=120*1e3;class f{constructor(n){this._defaults=n,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval(()=>this._checkIfIdle(),30*1e3),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker())}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){if(!this._worker)return;Date.now()-this._lastUsedTime>I&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||(this._worker=D({moduleId:"vs/language/html/htmlWorker",createWorker:()=>new Worker(new URL("/assets/html.worker-DhJ4VZMp.js",import.meta.url),{type:"module"}),createData:{languageSettings:this._defaults.options,languageId:this._defaults.languageId},label:this._defaults.languageId}),this._client=this._worker.getProxy()),this._client}getLanguageServiceWorker(...n){let e;return this._getClient().then(r=>{e=r}).then(r=>{if(this._worker)return this._worker.withSyncedResources(n)}).then(r=>e)}}class v extends R{constructor(n){super(n,[".",":","<",'"',"=","/"])}}function F(i){const n=new f(i),e=(...o)=>n.getLanguageServiceWorker(...o);let r=i.languageId;t.registerCompletionItemProvider(r,new v(e)),t.registerHoverProvider(r,new d(e)),t.registerDocumentHighlightProvider(r,new l(e)),t.registerLinkProvider(r,new c(e)),t.registerFoldingRangeProvider(r,new u(e)),t.registerDocumentSymbolProvider(r,new h(e)),t.registerSelectionRangeProvider(r,new m(e)),t.registerRenameProvider(r,new p(e)),r==="html"&&(t.registerDocumentFormattingEditProvider(r,new w(e)),t.registerDocumentRangeFormattingEditProvider(r,new _(e)))}function L(i){const n=[],e=[],r=new f(i);n.push(r);const o=(...s)=>r.getLanguageServiceWorker(...s);function P(){const{languageId:s,modeConfiguration:a}=i;k(e),a.completionItems&&e.push(t.registerCompletionItemProvider(s,new v(o))),a.hovers&&e.push(t.registerHoverProvider(s,new d(o))),a.documentHighlights&&e.push(t.registerDocumentHighlightProvider(s,new l(o))),a.links&&e.push(t.registerLinkProvider(s,new c(o))),a.documentSymbols&&e.push(t.registerDocumentSymbolProvider(s,new h(o))),a.rename&&e.push(t.registerRenameProvider(s,new p(o))),a.foldingRanges&&e.push(t.registerFoldingRangeProvider(s,new u(o))),a.selectionRanges&&e.push(t.registerSelectionRangeProvider(s,new m(o))),a.documentFormattingEdits&&e.push(t.registerDocumentFormattingEditProvider(s,new w(o))),a.documentRangeFormattingEdits&&e.push(t.registerDocumentRangeFormattingEditProvider(s,new _(o)))}return P(),n.push(g(e)),g(n)}function g(i){return{dispose:()=>k(i)}}function k(i){for(;i.length;)i.pop().dispose()}export{R as CompletionAdapter,b as DefinitionAdapter,y as DiagnosticsAdapter,T as DocumentColorAdapter,w as DocumentFormattingEditProvider,l as DocumentHighlightAdapter,c as DocumentLinkAdapter,_ as DocumentRangeFormattingEditProvider,h as DocumentSymbolAdapter,u as FoldingRangeAdapter,d as HoverAdapter,U as ReferenceAdapter,p as RenameAdapter,m as SelectionRangeAdapter,f as WorkerManager,x as fromPosition,M as fromRange,L as setupMode,F as setupMode1,j as toRange,O as toTextEdit};
1
+ import{c as D,l as t}from"./Editor-D5UJRxLO.js";import{H as d,D as l,h as c,F as u,b as h,S as m,c as p,f as w,g as _,C as R}from"./lspLanguageFeatures-CHyCsA1P.js";import{a as b,e as y,d as T,R as U,i as x,j as M,t as j,k as O}from"./lspLanguageFeatures-CHyCsA1P.js";import"./index-BGLn9_S8.js";import"./grammar-xCgG7hS1.js";const I=120*1e3;class f{constructor(n){this._defaults=n,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval(()=>this._checkIfIdle(),30*1e3),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker())}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){if(!this._worker)return;Date.now()-this._lastUsedTime>I&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||(this._worker=D({moduleId:"vs/language/html/htmlWorker",createWorker:()=>new Worker(new URL("/assets/html.worker-DhJ4VZMp.js",import.meta.url),{type:"module"}),createData:{languageSettings:this._defaults.options,languageId:this._defaults.languageId},label:this._defaults.languageId}),this._client=this._worker.getProxy()),this._client}getLanguageServiceWorker(...n){let e;return this._getClient().then(r=>{e=r}).then(r=>{if(this._worker)return this._worker.withSyncedResources(n)}).then(r=>e)}}class v extends R{constructor(n){super(n,[".",":","<",'"',"=","/"])}}function F(i){const n=new f(i),e=(...o)=>n.getLanguageServiceWorker(...o);let r=i.languageId;t.registerCompletionItemProvider(r,new v(e)),t.registerHoverProvider(r,new d(e)),t.registerDocumentHighlightProvider(r,new l(e)),t.registerLinkProvider(r,new c(e)),t.registerFoldingRangeProvider(r,new u(e)),t.registerDocumentSymbolProvider(r,new h(e)),t.registerSelectionRangeProvider(r,new m(e)),t.registerRenameProvider(r,new p(e)),r==="html"&&(t.registerDocumentFormattingEditProvider(r,new w(e)),t.registerDocumentRangeFormattingEditProvider(r,new _(e)))}function L(i){const n=[],e=[],r=new f(i);n.push(r);const o=(...s)=>r.getLanguageServiceWorker(...s);function P(){const{languageId:s,modeConfiguration:a}=i;k(e),a.completionItems&&e.push(t.registerCompletionItemProvider(s,new v(o))),a.hovers&&e.push(t.registerHoverProvider(s,new d(o))),a.documentHighlights&&e.push(t.registerDocumentHighlightProvider(s,new l(o))),a.links&&e.push(t.registerLinkProvider(s,new c(o))),a.documentSymbols&&e.push(t.registerDocumentSymbolProvider(s,new h(o))),a.rename&&e.push(t.registerRenameProvider(s,new p(o))),a.foldingRanges&&e.push(t.registerFoldingRangeProvider(s,new u(o))),a.selectionRanges&&e.push(t.registerSelectionRangeProvider(s,new m(o))),a.documentFormattingEdits&&e.push(t.registerDocumentFormattingEditProvider(s,new w(o))),a.documentRangeFormattingEdits&&e.push(t.registerDocumentRangeFormattingEditProvider(s,new _(o)))}return P(),n.push(g(e)),g(n)}function g(i){return{dispose:()=>k(i)}}function k(i){for(;i.length;)i.pop().dispose()}export{R as CompletionAdapter,b as DefinitionAdapter,y as DiagnosticsAdapter,T as DocumentColorAdapter,w as DocumentFormattingEditProvider,l as DocumentHighlightAdapter,c as DocumentLinkAdapter,_ as DocumentRangeFormattingEditProvider,h as DocumentSymbolAdapter,u as FoldingRangeAdapter,d as HoverAdapter,U as ReferenceAdapter,p as RenameAdapter,m as SelectionRangeAdapter,f as WorkerManager,x as fromPosition,M as fromRange,L as setupMode,F as setupMode1,j as toRange,O as toTextEdit};