@dimina-kit/devtools 0.4.0-dev.20260625063832 → 0.4.0-dev.20260630033804

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 (64) hide show
  1. package/dist/main/app/app.js +2 -0
  2. package/dist/main/index.bundle.js +241 -151
  3. package/dist/main/ipc/bridge-router.d.ts +21 -0
  4. package/dist/main/ipc/bridge-router.js +63 -3
  5. package/dist/main/services/automation/index.js +0 -1
  6. package/dist/main/services/elements-forward/index.js +81 -72
  7. package/dist/main/services/mcp/target-manager.d.ts +3 -3
  8. package/dist/main/services/views/miniapp-partition.d.ts +18 -8
  9. package/dist/main/services/views/miniapp-partition.js +34 -13
  10. package/dist/main/services/views/view-manager.js +76 -41
  11. package/dist/main/services/workbench-coi-server.d.ts +7 -0
  12. package/dist/main/services/workbench-coi-server.js +6 -0
  13. package/dist/main/services/workbench-context.d.ts +4 -2
  14. package/dist/main/services/workbench-context.js +1 -0
  15. package/dist/main/services/workspace/op-lock.d.ts +26 -0
  16. package/dist/main/services/workspace/op-lock.js +23 -0
  17. package/dist/main/services/workspace/workspace-service.d.ts +7 -0
  18. package/dist/main/services/workspace/workspace-service.js +197 -103
  19. package/dist/main/windows/service-host-window/create.d.ts +5 -1
  20. package/dist/main/windows/service-host-window/create.js +6 -3
  21. package/dist/native-host/render/render.js +485 -449
  22. package/dist/native-host/service/service.js +1 -1
  23. package/dist/renderer/assets/index-BMwmmaSp.js +46 -0
  24. package/dist/renderer/entries/main/index.html +1 -1
  25. package/dist/shared/types.d.ts +15 -0
  26. package/dist/vscode-workbench/assets/__vite-browser-external-B0DTNerG.js +1 -0
  27. package/dist/vscode-workbench/assets/__vite-browser-external-BuLjVMfN.js +1 -0
  28. package/dist/vscode-workbench/assets/__vite-browser-external-thkx7I19.js +1 -0
  29. package/dist/vscode-workbench/assets/{dist-SFZ2HNEz.js → dist-CS7SQP3K.js} +4 -4
  30. package/dist/vscode-workbench/assets/dist-VSgdjUlW.js +8 -0
  31. package/dist/vscode-workbench/assets/editor.worker-DmMg51ee.js +41 -0
  32. package/dist/vscode-workbench/assets/extensionHost.worker-BMpl1cpB.js +207 -0
  33. package/dist/vscode-workbench/assets/{iconv-lite-umd-izd5l6fa.js → iconv-lite-umd-D3q-1-o6.js} +1 -1
  34. package/dist/vscode-workbench/assets/{iconv-lite-umd-COfjYshr.js → iconv-lite-umd-Jn9RTrsv.js} +2 -2
  35. package/dist/vscode-workbench/assets/index-zjigpZ25.js +2842 -0
  36. package/dist/vscode-workbench/assets/{jschardet-Bf-VMK4F.js → jschardet-CjCVc2Gw.js} +1 -1
  37. package/dist/vscode-workbench/assets/{jschardet-Dh5TyKsQ.js → jschardet-Cu4ufeHq.js} +1 -1
  38. package/dist/vscode-workbench/assets/{layout.contribution.darwin-cz2ttHTW.js → layout.contribution.darwin-CoH1BZtz.js} +1 -1
  39. package/dist/vscode-workbench/assets/{layout.contribution.linux-fEtdzbcY.js → layout.contribution.linux-Di2FF-CG.js} +1 -1
  40. package/dist/vscode-workbench/assets/{layout.contribution.win-BFyOKI8c.js → layout.contribution.win-moiNStil.js} +1 -1
  41. package/dist/vscode-workbench/assets/{main-Bh8TI5LP.js → main-DzHL45xo.js} +4 -4
  42. package/dist/vscode-workbench/assets/{main2-Bds9Fhfn.js → main2-CWVd-Hyp.js} +1 -1
  43. package/dist/vscode-workbench/assets/{worker-D9ti6A0r.js → worker-CRTb-Arc.js} +7 -7
  44. package/dist/vscode-workbench/assets/{worker-DQtXDXIZ.js → worker-CVB8WPuM.js} +2 -2
  45. package/dist/vscode-workbench/index.html +1 -4
  46. package/package.json +8 -38
  47. package/dist/renderer/assets/index-6XUSo6Su.js +0 -46
  48. package/dist/vscode-workbench/assets/__vite-browser-external-BUwiolNy.js +0 -1
  49. package/dist/vscode-workbench/assets/__vite-browser-external-CmG9GjjO.js +0 -1
  50. package/dist/vscode-workbench/assets/__vite-browser-external-DGJPTKLg.js +0 -1
  51. package/dist/vscode-workbench/assets/_commonjsHelpers-qcUHfnrg.js +0 -1
  52. package/dist/vscode-workbench/assets/chunk-B3K2TuZy.js +0 -1
  53. package/dist/vscode-workbench/assets/chunk-DECur_0Z.js +0 -1
  54. package/dist/vscode-workbench/assets/dist-tesJ1Kd2.js +0 -8
  55. package/dist/vscode-workbench/assets/editor.worker-BC1qOyXG.js +0 -41
  56. package/dist/vscode-workbench/assets/extension.api-BWA2aPAU.js +0 -1
  57. package/dist/vscode-workbench/assets/extensionHost.worker-Dvu35anN.js +0 -207
  58. package/dist/vscode-workbench/assets/index-CQ5xP0pp.js +0 -1656
  59. package/dist/vscode-workbench/assets/localExtensionHost-Ccz7QUdA.js +0 -1188
  60. package/dist/vscode-workbench/assets/main-BDgdQmvs.js +0 -4
  61. package/dist/vscode-workbench/assets/main2-DwfDVleQ.js +0 -1
  62. package/dist/vscode-workbench/assets/preload-helper-xBbMyY7u.js +0 -1
  63. /package/dist/vscode-workbench/assets/{_.contribution-C9aS_G-o.js → _.contribution-B46wcGKQ.js} +0 -0
  64. /package/dist/vscode-workbench/assets/{_commonjsHelpers-BPKu-ps5.js → _commonjsHelpers-DMmVv2OA.js} +0 -0
@@ -1,4 +1,4 @@
1
- import{t as e}from"./_commonjsHelpers-BPKu-ps5.js";var t={exports:{}},n=t.exports,r;function i(){return r?t.exports:(r=1,(function(e,t){(function(t,n){e.exports=n()})(n,(()=>(()=>{var e={185:(e,t)=>{Object.defineProperty(t,`__esModule`,{value:!0}),t.UseOnigurumaFindOptions=t.DebugFlags=void 0,t.DebugFlags={InDebugMode:typeof process<`u`&&!!{}.VSCODE_TEXTMATE_DEBUG},t.UseOnigurumaFindOptions=!1},151:(e,t,n)=>{Object.defineProperty(t,`__esModule`,{value:!0}),t.applyStateStackDiff=t.diffStateStacksRefEq=void 0;let r=n(752);t.diffStateStacksRefEq=function(e,t){let n=0,r=[],i=e,a=t;for(;i!==a;)i&&(!a||i.depth>=a.depth)?(n++,i=i.parent):(r.push(a.toStateStackFrame()),a=a.parent);return{pops:n,newFrames:r.reverse()}},t.applyStateStackDiff=function(e,t){let n=e;for(let e=0;e<t.pops;e++)n=n.parent;for(let e of t.newFrames)n=r.StateStackImpl.pushFrame(n,e);return n}},490:(e,t)=>{Object.defineProperty(t,`__esModule`,{value:!0}),t.toOptionalTokenType=t.EncodedTokenAttributes=t.FontAttribute=void 0;class n{constructor(e,t,n){this.fontFamily=e,this.fontSize=t,this.lineHeight=n}static _getKey(e,t,n){return`${e}|${t}|${n}`}static _get(e,t,r){let i=this._getKey(e,t,r),a=this._map.get(i);return a||(a=new n(e,t,r),this._map.set(i,a)),a}static from(e,t,r){return new n(e,t,r)}with(e){return e?n._get(e.fontFamily||this.fontFamily,e.fontSize||this.fontSize,e.lineHeight||this.lineHeight):this}}var r;t.FontAttribute=n,n._map=new Map,(r=t.EncodedTokenAttributes||={}).toBinaryStr=function(e){return e.toString(2).padStart(32,`0`)},r.print=function(e){let t=r.getLanguageId(e),n=r.getTokenType(e),i=r.getFontStyle(e),a=r.getForeground(e),o=r.getBackground(e);console.log({languageId:t,tokenType:n,fontStyle:i,foreground:a,background:o})},r.getLanguageId=function(e){return(255&e)>>>0},r.getTokenType=function(e){return(768&e)>>>8},r.containsBalancedBrackets=function(e){return!!(1024&e)},r.getFontStyle=function(e){return(30720&e)>>>11},r.getForeground=function(e){return(16744448&e)>>>15},r.getBackground=function(e){return(4278190080&e)>>>24},r.set=function(e,t,n,i,a,o,s){let c=r.getLanguageId(e),l=r.getTokenType(e),u=+!!r.containsBalancedBrackets(e),d=r.getFontStyle(e),f=r.getForeground(e),p=r.getBackground(e);return t!==0&&(c=t),n!==8&&(l=n),i!==null&&(u=+!!i),a!==-1&&(d=a),o!==0&&(f=o),s!==0&&(p=s),(c|l<<8|u<<10|d<<11|f<<15|p<<24)>>>0},t.toOptionalTokenType=function(e){return e}},214:(e,t,n)=>{Object.defineProperty(t,`__esModule`,{value:!0}),t.BasicScopeAttributesProvider=t.BasicScopeAttributes=void 0;let r=n(807);class i{constructor(e,t){this.languageId=e,this.tokenType=t}}t.BasicScopeAttributes=i;class a{constructor(e,t){this._getBasicScopeAttributes=new r.CachedFn((e=>new i(this._scopeToLanguage(e),this._toStandardTokenType(e)))),this._defaultAttributes=new i(e,8),this._embeddedLanguagesMatcher=new o(Object.entries(t||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(e){return e===null?a._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(e)}_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(e){let t=e.match(a.STANDARD_TOKEN_TYPE_REGEXP);if(!t)return 8;switch(t[1]){case`comment`:return 1;case`string`:return 2;case`regex`:return 3;case`meta.embedded`:return 0}throw Error(`Unexpected match for standard token type!`)}}t.BasicScopeAttributesProvider=a,a._NULL_SCOPE_METADATA=new i(0,0),a.STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/;class o{constructor(e){if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);let t=e.map((([e,t])=>r.escapeRegExpCharacters(e)));t.sort(),t.reverse(),this.scopesRegExp=RegExp(`^((${t.join(`)|(`)}))($|\\.)`,``)}}match(e){if(!this.scopesRegExp)return;let t=e.match(this.scopesRegExp);return t?this.values.get(t[1]):void 0}}},929:(e,t,n)=>{Object.defineProperty(t,`__esModule`,{value:!0}),t.LineFonts=t.FontInfo=t.LineTokens=t.BalancedBracketSelectors=t.StateStackImpl=t.AttributedScopeStack=t.Grammar=t.createGrammar=void 0;let r=n(185),i=n(490),a=n(916),o=n(810),s=n(666),c=n(63),l=n(807),u=n(214),d=n(398);function f(e,t,n,r,i){let o=a.createMatchers(t,p),c=s.RuleFactory.getCompiledRuleId(n,r,i.repository);for(let n of o)e.push({debugSelector:t,matcher:n.matcher,ruleId:c,grammar:i,priority:n.priority})}function p(e,t){if(t.length<e.length)return!1;let n=0;return e.every((e=>{for(let r=n;r<t.length;r++)if(m(t[r],e))return n=r+1,!0;return!1}))}function m(e,t){if(!e)return!1;if(e===t)return!0;let n=t.length;return e.length>n&&e.substr(0,n)===t&&e[n]===`.`}t.createGrammar=function(e,t,n,r,i,a,o,s){return new h(e,t,n,r,i,a,o,s)};class h{constructor(e,t,n,r,i,o,s,c){if(this._rootScopeName=e,this.balancedBracketSelectors=o,this._onigLib=c,this._basicScopeAttributesProvider=new u.BasicScopeAttributesProvider(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=s,this._grammar=g(t,null),this._injections=null,this._tokenTypeMatchers=[],i)for(let e of Object.keys(i)){let t=a.createMatchers(e,p);for(let n of t)this._tokenTypeMatchers.push({matcher:n.matcher,type:i[e]})}}get themeProvider(){return this._grammarRepository}dispose(){for(let e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){let e=[],t=this._rootScopeName,n=(e=>e===this._rootScopeName?this._grammar:this.getExternalGrammar(e))(t);if(n){let r=n.injections;if(r)for(let t in r)f(e,t,r[t],this,n);let i=this._grammarRepository.injections(t);i&&i.forEach((t=>{let n=this.getExternalGrammar(t);if(n){let t=n.injectionSelector;t&&f(e,t,n,this,n)}}))}return e.sort(((e,t)=>e.priority-t.priority)),e}getInjections(){if(this._injections===null&&(this._injections=this._collectInjections(),r.DebugFlags.InDebugMode&&this._injections.length>0)){console.log(`Grammar ${this._rootScopeName} contains the following injections:`);for(let e of this._injections)console.log(` - ${e.debugSelector}`)}return this._injections}registerRule(e){let t=++this._lastRuleId,n=e(s.ruleIdFromNumber(t));return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[s.ruleIdToNumber(e)]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){let n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=g(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){let r=this._tokenize(e,t,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly,fonts:r.lineFonts.getResult()}}tokenizeLine2(e,t,n=0){let r=this._tokenize(e,t,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly,fonts:r.lineFonts.getResult()}}_tokenize(e,t,n,r){let a;if(this._rootId===-1&&(this._rootId=s.RuleFactory.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections()),t&&t!==v.NULL)a=!1,t.reset();else{a=!0;let e=this._basicScopeAttributesProvider.getDefaultAttributes(),n=this.themeProvider.getDefaults(),r=i.EncodedTokenAttributes.set(0,e.languageId,e.tokenType,null,n.fontStyle,n.foregroundId,n.backgroundId),o=i.FontAttribute.from(n.fontFamily,n.fontSize,n.lineHeight),s=this.getRule(this._rootId).getName(null,null),c;c=s?_.createRootAndLookUpScopeName(s,r,o,this):_.createRoot(`unknown`,r,o),t=new v(null,this._rootId,-1,-1,!1,null,c,c)}e+=`
2
- `;let c=this.createOnigString(e),l=c.content.length,u=new y(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),f=new x,p=d._tokenizeString(this,c,a,0,t,u,f,!0,r);return o.disposeOnigString(c),{lineLength:l,lineTokens:u,lineFonts:f,ruleStack:p.stack,stoppedEarly:p.stoppedEarly}}}function g(e,t){return(e=l.clone(e)).repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}t.Grammar=h;class _{constructor(e,t,n,r,i){this.parent=e,this.scopePath=t,this.tokenAttributes=n,this.fontAttributes=r,this.styleAttributes=i}static fromExtension(e,t){let n=e,r=e?.scopePath??null;for(let e of t)r=c.ScopeStack.push(r,e.scopeNames),n=new _(n,r,e.encodedTokenAttributes,null,null);return n}static createRoot(e,t,n){return new _(null,new c.ScopeStack(null,e),t,n,null)}static createRootAndLookUpScopeName(e,t,n,r){let i=r.getMetadataForScope(e),a=new c.ScopeStack(null,e),o=r.themeProvider.themeMatch(a);return new _(null,a,_.mergeAttributes(t,i,o),n.with(o),o)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(` `)}equals(e){return _.equals(this,e)}static equals(e,t){for(;;){if(e===t||!e&&!t)return!0;if(!e||!t||e.scopeName!==t.scopeName||e.tokenAttributes!==t.tokenAttributes)return!1;e=e.parent,t=t.parent}}static mergeAttributes(e,t,n){let r=-1,a=0,o=0;return n!==null&&(r=n.fontStyle,a=n.foregroundId,o=n.backgroundId),i.EncodedTokenAttributes.set(e,t.languageId,t.tokenType,null,r,a,o)}pushAttributed(e,t){if(e===null)return this;if(e.indexOf(` `)===-1)return _._pushAttributed(this,e,t);let n=e.split(/ /g),r=this;for(let e of n)r=_._pushAttributed(r,e,t);return r}static _pushAttributed(e,t,n){let r=n.getMetadataForScope(t),i=e.scopePath.push(t),a=n.themeProvider.themeMatch(i);return new _(e,i,_.mergeAttributes(e.tokenAttributes,r,a),e.fontAttributes?.with(a)??null,a)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push({encodedTokenAttributes:n.tokenAttributes,scopeNames:n.scopePath.getExtensionIfDefined(n.parent?.scopePath??null)}),n=n.parent;return n===e?t.reverse():void 0}}t.AttributedScopeStack=_;class v{constructor(e,t,n,r,i,a,o,s){this.parent=e,this.ruleId=t,this.beginRuleCapturedEOL=i,this.endRule=a,this.nameScopesList=o,this.contentNameScopesList=s,this._stackElementBrand=void 0,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=n,this._anchorPos=r}equals(e){return e!==null&&v._equals(this,e)}static _equals(e,t){return e===t||!!this._structuralEquals(e,t)&&_.equals(e.contentNameScopesList,t.contentNameScopesList)}static _structuralEquals(e,t){for(;;){if(e===t||!e&&!t)return!0;if(!e||!t||e.depth!==t.depth||e.ruleId!==t.ruleId||e.endRule!==t.endRule)return!1;e=e.parent,t=t.parent}}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){v._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(e,t,n,r,i,a,o){return new v(this,e,t,n,r,i,a,o)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){let e=[];return this._writeString(e,0),`[`+e.join(`,`)+`]`}_writeString(e,t){return this.parent&&(t=this.parent._writeString(e,t)),e[t++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,t}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(e){return this.endRule===e?this:new v(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,e,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let t=this;for(;t&&t._enterPos===e._enterPos;){if(t.ruleId===e.ruleId)return!0;t=t.parent}return!1}toStateStackFrame(){return{ruleId:s.ruleIdToNumber(this.ruleId),beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(e,t){let n=_.fromExtension(e?.nameScopesList??null,t.nameScopesList);return new v(e,s.ruleIdFromNumber(t.ruleId),t.enterPos??-1,t.anchorPos??-1,t.beginRuleCapturedEOL,t.endRule,n,_.fromExtension(n,t.contentNameScopesList))}}t.StateStackImpl=v,v.NULL=new v(null,0,0,0,!1,null,null,null),t.BalancedBracketSelectors=class{constructor(e,t){this.allowAny=!1,this.balancedBracketScopes=e.flatMap((e=>e===`*`?(this.allowAny=!0,[]):a.createMatchers(e,p).map((e=>e.matcher)))),this.unbalancedBracketScopes=t.flatMap((e=>a.createMatchers(e,p).map((e=>e.matcher))))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(let t of this.unbalancedBracketScopes)if(t(e))return!1;for(let t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}};class y{constructor(e,t,n,i){this.balancedBracketSelectors=i,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,r.DebugFlags.InDebugMode?this._lineText=t:this._lineText=null,this._mergeConsecutiveTokensWithEqualMetadata=!l.containsRTL(t),this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let n=e?.tokenAttributes??0,a=!1;if(this.balancedBracketSelectors?.matchesAlways&&(a=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){let t=e?.getScopeNames()??[];for(let e of this._tokenTypeOverrides)e.matcher(t)&&(n=i.EncodedTokenAttributes.set(n,0,i.toOptionalTokenType(e.type),null,-1,0,0));this.balancedBracketSelectors&&(a=this.balancedBracketSelectors.match(t))}if(a&&(n=i.EncodedTokenAttributes.set(n,0,8,a,-1,0,0)),this._mergeConsecutiveTokensWithEqualMetadata&&this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===n)return void(this._lastTokenEndIndex=t);if(r.DebugFlags.InDebugMode){let n=e?.getScopeNames()??[];console.log(` token: |`+this._lineText.substring(this._lastTokenEndIndex,t).replace(/\n$/,`\\n`)+`|`);for(let e=0;e<n.length;e++)console.log(` * `+n[e])}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(n),this._lastTokenEndIndex=t;return}let n=e?.getScopeNames()??[];if(r.DebugFlags.InDebugMode){console.log(` token: |`+this._lineText.substring(this._lastTokenEndIndex,t).replace(/\n$/,`\\n`)+`|`);for(let e=0;e<n.length;e++)console.log(` * `+n[e])}this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);let n=new Uint32Array(this._binaryTokens.length);for(let e=0,t=this._binaryTokens.length;e<t;e++)n[e]=this._binaryTokens[e];return n}}t.LineTokens=y;class b{constructor(e,t,n,r,i){this.startIndex=e,this.endIndex=t,this.fontFamily=n,this.fontSizeMultiplier=r,this.lineHeightMultiplier=i}optionsEqual(e){return this.fontFamily===e.fontFamily&&this.fontSizeMultiplier===e.fontSizeMultiplier&&this.lineHeightMultiplier===e.lineHeightMultiplier}}t.FontInfo=b;class x{constructor(){this._fonts=[],this._lastIndex=0}produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(!e?.fontAttributes)return void(this._lastIndex=t);let n=e.fontAttributes.fontFamily,r=e.fontAttributes.fontSize,i=e.fontAttributes.lineHeight;if(!n&&!r&&!i)return void(this._lastIndex=t);let a=new b(this._lastIndex,t,n,r,i),o=this._fonts[this._fonts.length-1];o&&o.endIndex===this._lastIndex&&o.optionsEqual(a)?o.endIndex=a.endIndex:this._fonts.push(a),this._lastIndex=t}getResult(){return this._fonts}}t.LineFonts=x},784:(e,t,n)=>{Object.defineProperty(t,`__esModule`,{value:!0}),t.parseInclude=t.TopLevelRepositoryReference=t.TopLevelReference=t.RelativeReference=t.SelfReference=t.BaseReference=t.ScopeDependencyProcessor=t.ExternalReferenceCollector=t.TopLevelRepositoryRuleReference=t.TopLevelRuleReference=void 0;let r=n(807);class i{constructor(e){this.scopeName=e}toKey(){return this.scopeName}}t.TopLevelRuleReference=i;class a{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}}t.TopLevelRepositoryRuleReference=a;class o{constructor(){this._references=[],this._seenReferenceKeys=new Set,this.visitedRule=new Set}get references(){return this._references}add(e){let t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}}function s(e,t,n,r){let a=n.lookup(e.scopeName);if(!a){if(e.scopeName===t)throw Error(`No grammar provided for <${t}>`);return}let o=n.lookup(t);e instanceof i?l({baseGrammar:o,selfGrammar:a},r):c(e.ruleName,{baseGrammar:o,selfGrammar:a,repository:a.repository},r);let s=n.injections(e.scopeName);if(s)for(let e of s)r.add(new i(e))}function c(e,t,n){t.repository&&t.repository[e]&&u([t.repository[e]],t,n)}function l(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&u(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&u(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function u(e,t,n){for(let o of e){if(n.visitedRule.has(o))continue;n.visitedRule.add(o);let e=o.repository?r.mergeObjects({},t.repository,o.repository):t.repository;Array.isArray(o.patterns)&&u(o.patterns,{...t,repository:e},n);let s=o.include;if(!s)continue;let d=g(s);switch(d.kind){case 0:l({...t,selfGrammar:t.baseGrammar},n);break;case 1:l(t,n);break;case 2:c(d.ruleName,{...t,repository:e},n);break;case 3:case 4:let r=d.scopeName===t.selfGrammar.scopeName?t.selfGrammar:d.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(r){let i={baseGrammar:t.baseGrammar,selfGrammar:r,repository:e};d.kind===4?c(d.ruleName,i,n):l(i,n)}else d.kind===4?n.add(new a(d.scopeName,d.ruleName)):n.add(new i(d.scopeName))}}}t.ExternalReferenceCollector=o,t.ScopeDependencyProcessor=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests=new Set,this.seenPartialScopeRequests=new Set,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new i(this.initialScopeName)]}processQueue(){let e=this.Q;this.Q=[];let t=new o;for(let n of e)s(n,this.initialScopeName,this.repo,t);for(let e of t.references)if(e instanceof i){if(this.seenFullScopeRequests.has(e.scopeName))continue;this.seenFullScopeRequests.add(e.scopeName),this.Q.push(e)}else{if(this.seenFullScopeRequests.has(e.scopeName)||this.seenPartialScopeRequests.has(e.toKey()))continue;this.seenPartialScopeRequests.add(e.toKey()),this.Q.push(e)}}};class d{constructor(){this.kind=0}}t.BaseReference=d;class f{constructor(){this.kind=1}}t.SelfReference=f;class p{constructor(e){this.ruleName=e,this.kind=2}}t.RelativeReference=p;class m{constructor(e){this.scopeName=e,this.kind=3}}t.TopLevelReference=m;class h{constructor(e,t){this.scopeName=e,this.ruleName=t,this.kind=4}}function g(e){if(e===`$base`)return new d;if(e===`$self`)return new f;let t=e.indexOf(`#`);return t===-1?new m(e):t===0?new p(e.substring(1)):new h(e.substring(0,t),e.substring(t+1))}t.TopLevelRepositoryReference=h,t.parseInclude=g},752:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)n===`default`||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,`__esModule`,{value:!0}),i(n(929),t)},398:(e,t,n)=>{Object.defineProperty(t,`__esModule`,{value:!0}),t.LocalStackElement=t._tokenizeString=void 0;let r=n(185),i=n(810),a=n(666),o=n(807);class s{constructor(e,t){this.stack=e,this.stoppedEarly=t}}function c(e,t,n,i,c,d,p,m,h){let g=(e,t)=>{d.produce(e,t),p.produce(e,t)},_=t.content.length,v=!1,y=-1;if(m){let o=function(e,t,n,i,o,s,c){let l=(e,t)=>{s.produce(e,t),c.produce(e,t)},d=o.beginRuleCapturedEOL?0:-1,p=[];for(let t=o;t;t=t.pop()){let n=t.getRule(e);n instanceof a.BeginWhileRule&&p.push({rule:n,stack:t})}for(let m=p.pop();m;m=p.pop()){let{ruleScanner:p,findOptions:h}=u(m.rule,e,m.stack.endRule,n,i===d),g=p.findNextMatchSync(t,i,h);if(r.DebugFlags.InDebugMode&&(console.log(` scanning for while rule`),console.log(p.toString())),!g){r.DebugFlags.InDebugMode&&console.log(` popping `+m.rule.debugName+` - `+m.rule.debugWhileRegExp),o=m.stack.pop();break}if(g.ruleId!==a.whileRuleId){o=m.stack.pop();break}g.captureIndices&&g.captureIndices.length&&(l(m.stack,g.captureIndices[0].start),f(e,t,n,m.stack,s,c,m.rule.whileCaptures,g.captureIndices),l(m.stack,g.captureIndices[0].end),d=g.captureIndices[0].end,g.captureIndices[0].end>i&&(i=g.captureIndices[0].end,n=!1))}return{stack:o,linePos:i,anchorPosition:d,isFirstLine:n}}(e,t,n,i,c,d,p);c=o.stack,i=o.linePos,n=o.isFirstLine,y=o.anchorPosition}let b=Date.now();for(;!v;){if(h!==0&&Date.now()-b>h)return new s(c,!0);x()}return new s(c,!1);function x(){r.DebugFlags.InDebugMode&&(console.log(``),console.log(`@@scanNext ${i}: |${t.content.substr(i).replace(/\n$/,`\\n`)}|`));let s=function(e,t,n,i,a,s){let c=function(e,t,n,i,a,s){let c=a.getRule(e),{ruleScanner:u,findOptions:d}=l(c,e,a.endRule,n,i===s),f=0;r.DebugFlags.InDebugMode&&(f=o.performanceNow());let p=u.findNextMatchSync(t,i,d);if(r.DebugFlags.InDebugMode){let e=o.performanceNow()-f;e>5&&console.warn(`Rule ${c.debugName} (${c.id}) matching took ${e} against '${t}'`),console.log(` scanning for (linePos: ${i}, anchorPosition: ${s})`),console.log(u.toString()),p&&console.log(`matched rule id: ${p.ruleId} from ${p.captureIndices[0].start} to ${p.captureIndices[0].end}`)}return p?{captureIndices:p.captureIndices,matchedRuleId:p.ruleId}:null}(e,t,n,i,a,s),u=e.getInjections();if(u.length===0)return c;let d=function(e,t,n,i,a,o,s){let c,u=Number.MAX_VALUE,d=null,f=0,p=o.contentNameScopesList.getScopeNames();for(let o=0,m=e.length;o<m;o++){let m=e[o];if(!m.matcher(p))continue;let{ruleScanner:h,findOptions:g}=l(t.getRule(m.ruleId),t,null,i,a===s),_=h.findNextMatchSync(n,a,g);if(!_)continue;r.DebugFlags.InDebugMode&&(console.log(` matched injection: ${m.debugSelector}`),console.log(h.toString()));let v=_.captureIndices[0].start;if(!(v>=u)&&(u=v,d=_.captureIndices,c=_.ruleId,f=m.priority,u===a))break}return d?{priorityMatch:f===-1,captureIndices:d,matchedRuleId:c}:null}(u,e,t,n,i,a,s);if(!d)return c;if(!c)return d;let f=c.captureIndices[0].start,p=d.captureIndices[0].start;return p<f||d.priorityMatch&&p===f?d:c}(e,t,n,i,c,y);if(!s)return r.DebugFlags.InDebugMode&&console.log(` no more matches.`),g(c,_),void(v=!0);let u=s.captureIndices,m=s.matchedRuleId,h=!!(u&&u.length>0)&&u[0].end>i;if(m===a.endRuleId){let a=c.getRule(e);r.DebugFlags.InDebugMode&&console.log(` popping `+a.debugName+` - `+a.debugEndRegExp),g(c,u[0].start),c=c.withContentNameScopesList(c.nameScopesList),f(e,t,n,c,d,p,a.endCaptures,u),g(c,u[0].end);let o=c;if(c=c.parent,y=o.getAnchorPos(),!h&&o.getEnterPos()===i)return r.DebugFlags.InDebugMode&&console.error(`[1] - Grammar is in an endless loop - Grammar pushed & popped a rule without advancing`),g(c=o,_),void(v=!0)}else{let o=e.getRule(m);g(c,u[0].start);let s=c,l=o.getName(t.content,u),b=c.contentNameScopesList.pushAttributed(l,e);if(c=c.push(m,i,y,u[0].end===_,null,b,b),o instanceof a.BeginEndRule){let i=o;r.DebugFlags.InDebugMode&&console.log(` pushing `+i.debugName+` - `+i.debugBeginRegExp),f(e,t,n,c,d,p,i.beginCaptures,u),g(c,u[0].end),y=u[0].end;let a=i.getContentName(t.content,u),l=b.pushAttributed(a,e);if(c=c.withContentNameScopesList(l),i.endHasBackReferences&&(c=c.withEndRule(i.getEndWithResolvedBackReferences(t.content,u))),!h&&s.hasSameRuleAs(c))return r.DebugFlags.InDebugMode&&console.error(`[2] - Grammar is in an endless loop - Grammar pushed the same rule without advancing`),c=c.pop(),g(c,_),void(v=!0)}else if(o instanceof a.BeginWhileRule){let i=o;r.DebugFlags.InDebugMode&&console.log(` pushing `+i.debugName),f(e,t,n,c,d,p,i.beginCaptures,u),g(c,u[0].end),y=u[0].end;let a=i.getContentName(t.content,u),l=b.pushAttributed(a,e);if(c=c.withContentNameScopesList(l),i.whileHasBackReferences&&(c=c.withEndRule(i.getWhileWithResolvedBackReferences(t.content,u))),!h&&s.hasSameRuleAs(c))return r.DebugFlags.InDebugMode&&console.error(`[3] - Grammar is in an endless loop - Grammar pushed the same rule without advancing`),c=c.pop(),g(c,_),void(v=!0)}else{let i=o;if(r.DebugFlags.InDebugMode&&console.log(` matched `+i.debugName+` - `+i.debugMatchRegExp),f(e,t,n,c,d,p,i.captures,u),g(c,u[0].end),c=c.pop(),!h)return r.DebugFlags.InDebugMode&&console.error(`[4] - Grammar is in an endless loop - Grammar is not advancing, nor is it pushing/popping`),c=c.safePop(),g(c,_),void(v=!0)}}u[0].end>i&&(i=u[0].end,n=!1)}}function l(e,t,n,i,a){return r.UseOnigurumaFindOptions?{ruleScanner:e.compile(t,n),findOptions:d(i,a)}:{ruleScanner:e.compileAG(t,n,i,a),findOptions:0}}function u(e,t,n,i,a){return r.UseOnigurumaFindOptions?{ruleScanner:e.compileWhile(t,n),findOptions:d(i,a)}:{ruleScanner:e.compileWhileAG(t,n,i,a),findOptions:0}}function d(e,t){let n=0;return e||(n|=1),t||(n|=4),n}function f(e,t,n,r,a,o,s,l){let u=(e,t)=>{a.produceFromScopes(e,t),o.produceFromScopes(e,t)},d=(e,t)=>{a.produce(e,t),o.produce(e,t)};if(s.length===0)return;let f=t.content,m=Math.min(s.length,l.length),h=[],g=l[0].end;for(let t=0;t<m;t++){let m=s[t];if(m===null)continue;let _=l[t];if(_.length===0)continue;if(_.start>g)break;for(;h.length>0&&h[h.length-1].endPos<=_.start;)u(h[h.length-1].scopes,h[h.length-1].endPos),h.pop();if(h.length>0?u(h[h.length-1].scopes,_.start):d(r,_.start),m.retokenizeCapturedWithRuleId){let t=m.getName(f,l),s=r.contentNameScopesList.pushAttributed(t,e),u=m.getContentName(f,l),d=s.pushAttributed(u,e),p=r.push(m.retokenizeCapturedWithRuleId,_.start,-1,!1,null,s,d),h=e.createOnigString(f.substring(0,_.end));c(e,h,n&&_.start===0,_.start,p,a,o,!1,0),i.disposeOnigString(h);continue}let v=m.getName(f,l);if(v!==null){let t=(h.length>0?h[h.length-1].scopes:r.contentNameScopesList).pushAttributed(v,e);h.push(new p(t,_.end))}}for(;h.length>0;)u(h[h.length-1].scopes,h[h.length-1].endPos),h.pop()}t._tokenizeString=c;class p{constructor(e,t){this.scopes=e,this.endPos=t}}t.LocalStackElement=p},726:(e,t)=>{function n(e,t){throw Error(`Near offset `+e.pos+`: `+t+` ~~~`+e.source.substr(e.pos,50)+`~~~`)}Object.defineProperty(t,`__esModule`,{value:!0}),t.parseJSON=void 0,t.parseJSON=function(e,t,o){let s=new r(e),c=new i,l=0,u=null,d=[],f=[];function p(){d.push(l),f.push(u)}function m(){l=d.pop(),u=f.pop()}function h(e){n(s,e)}for(;a(s,c);){if(l===0){if(u!==null&&h(`too many constructs in root`),c.type===3){u={},o&&(u.$vscodeTextmateLocation=c.toLocation(t)),p(),l=1;continue}if(c.type===2){u=[],p(),l=4;continue}h(`unexpected token in root`)}if(l===2){if(c.type===5){m();continue}if(c.type===7){l=3;continue}h(`expected , or }`)}if(l===1||l===3){if(l===1&&c.type===5){m();continue}if(c.type===1){let e=c.value;if(a(s,c)&&c.type===6||h(`expected colon`),a(s,c)||h(`expected value`),l=2,c.type===1){u[e]=c.value;continue}if(c.type===8){u[e]=null;continue}if(c.type===9){u[e]=!0;continue}if(c.type===10){u[e]=!1;continue}if(c.type===11){u[e]=parseFloat(c.value);continue}if(c.type===2){let t=[];u[e]=t,p(),l=4,u=t;continue}if(c.type===3){let n={};o&&(n.$vscodeTextmateLocation=c.toLocation(t)),u[e]=n,p(),l=1,u=n;continue}}h(`unexpected token in dict`)}if(l===5){if(c.type===4){m();continue}if(c.type===7){l=6;continue}h(`expected , or ]`)}if(l===4||l===6){if(l===4&&c.type===4){m();continue}if(l=5,c.type===1){u.push(c.value);continue}if(c.type===8){u.push(null);continue}if(c.type===9){u.push(!0);continue}if(c.type===10){u.push(!1);continue}if(c.type===11){u.push(parseFloat(c.value));continue}if(c.type===2){let e=[];u.push(e),p(),l=4,u=e;continue}if(c.type===3){let e={};o&&(e.$vscodeTextmateLocation=c.toLocation(t)),u.push(e),p(),l=1,u=e;continue}h(`unexpected token in array`)}h(`unknown state`)}return f.length!==0&&h(`unclosed constructs`),u};class r{constructor(e){this.source=e,this.pos=0,this.len=e.length,this.line=1,this.char=0}}class i{constructor(){this.value=null,this.type=0,this.offset=-1,this.len=-1,this.line=-1,this.char=-1}toLocation(e){return{filename:e,line:this.line,char:this.char}}}function a(e,t){t.value=null,t.type=0,t.offset=-1,t.len=-1,t.line=-1,t.char=-1;let r,i=e.source,a=e.pos,o=e.len,s=e.line,c=e.char;for(;;){if(a>=o)return!1;if(r=i.charCodeAt(a),r!==32&&r!==9&&r!==13){if(r!==10)break;a++,s++,c=0}else a++,c++}if(t.offset=a,t.line=s,t.char=c,r===34){for(t.type=1,a++,c++;;){if(a>=o)return!1;if(r=i.charCodeAt(a),a++,c++,r!==92){if(r===34)break}else a++,c++}t.value=i.substring(t.offset+1,a-1).replace(/\\u([0-9A-Fa-f]{4})/g,((e,t)=>String.fromCodePoint(parseInt(t,16)))).replace(/\\(.)/g,((t,r)=>{switch(r){case`"`:return`"`;case`\\`:return`\\`;case`/`:return`/`;case`b`:return`\b`;case`f`:return`\f`;case`n`:return`
3
- `;case`r`:return`\r`;case`t`:return` `;default:n(e,`invalid escape sequence`)}throw Error(`unreachable`)}))}else if(r===91)t.type=2,a++,c++;else if(r===123)t.type=3,a++,c++;else if(r===93)t.type=4,a++,c++;else if(r===125)t.type=5,a++,c++;else if(r===58)t.type=6,a++,c++;else if(r===44)t.type=7,a++,c++;else if(r===110){if(t.type=8,a++,c++,r=i.charCodeAt(a),r!==117||(a++,c++,r=i.charCodeAt(a),r!==108)||(a++,c++,r=i.charCodeAt(a),r!==108))return!1;a++,c++}else if(r===116){if(t.type=9,a++,c++,r=i.charCodeAt(a),r!==114||(a++,c++,r=i.charCodeAt(a),r!==117)||(a++,c++,r=i.charCodeAt(a),r!==101))return!1;a++,c++}else if(r===102){if(t.type=10,a++,c++,r=i.charCodeAt(a),r!==97||(a++,c++,r=i.charCodeAt(a),r!==108)||(a++,c++,r=i.charCodeAt(a),r!==115)||(a++,c++,r=i.charCodeAt(a),r!==101))return!1;a++,c++}else for(t.type=11;;){if(a>=o)return!1;if(r=i.charCodeAt(a),!(r===46||r>=48&&r<=57||r===101||r===69||r===45||r===43))break;a++,c++}return t.len=a-t.offset,t.value===null&&(t.value=i.substr(t.offset,t.len)),e.pos=a,e.line=s,e.char=c,!0}},625:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)n===`default`||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,`__esModule`,{value:!0}),t.applyStateStackDiff=t.diffStateStacksRefEq=t.parseRawGrammar=t.INITIAL=t.Registry=void 0;let a=n(752),o=n(150),s=n(583),c=n(63),l=n(784),u=n(151);Object.defineProperty(t,`applyStateStackDiff`,{enumerable:!0,get:function(){return u.applyStateStackDiff}}),Object.defineProperty(t,`diffStateStacksRefEq`,{enumerable:!0,get:function(){return u.diffStateStacksRefEq}}),i(n(810),t),t.Registry=class{constructor(e){this._options=e,this._syncRegistry=new s.SyncRegistry(c.Theme.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(c.Theme.createFromRawTheme(e,t))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,t,n){return this.loadGrammarWithConfiguration(e,t,{embeddedLanguages:n})}loadGrammarWithConfiguration(e,t,n){return this._loadGrammar(e,t,n.embeddedLanguages,n.tokenTypes,new a.BalancedBracketSelectors(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}async _loadGrammar(e,t,n,r,i){let a=new l.ScopeDependencyProcessor(this._syncRegistry,e);for(;a.Q.length>0;)await Promise.all(a.Q.map((e=>this._loadSingleGrammar(e.scopeName)))),a.processQueue();return this._grammarForScopeName(e,t,n,r,i)}async _loadSingleGrammar(e){return this._ensureGrammarCache.has(e)||this._ensureGrammarCache.set(e,this._doLoadSingleGrammar(e)),this._ensureGrammarCache.get(e)}async _doLoadSingleGrammar(e){let t=await this._options.loadGrammar(e);if(t){let n=typeof this._options.getInjections==`function`?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(t,n)}}async addGrammar(e,t=[],n=0,r=null){return this._syncRegistry.addGrammar(e,t),await this._grammarForScopeName(e.scopeName,n,r)}_grammarForScopeName(e,t=0,n=null,r=null,i=null){return this._syncRegistry.grammarForScopeName(e,t,n,r,i)}},t.INITIAL=a.StateStackImpl.NULL,t.parseRawGrammar=o.parseRawGrammar},916:(e,t)=>{function n(e){return!!e&&!!e.match(/[\w\.:]+/)}Object.defineProperty(t,`__esModule`,{value:!0}),t.createMatchers=void 0,t.createMatchers=function(e,t){let r=[],i=function(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;let r=n[0];return n=t.exec(e),r}}}(e),a=i.next();for(;a!==null;){let e=0;if(a.length===2&&a.charAt(1)===`:`){switch(a.charAt(0)){case`R`:e=1;break;case`L`:e=-1;break;default:console.log(`Unknown priority ${a} in scope selector`)}a=i.next()}let t=s();if(r.push({matcher:t,priority:e}),a!==`,`)break;a=i.next()}return r;function o(){if(a===`-`){a=i.next();let e=o();return t=>!!e&&!e(t)}if(a===`(`){a=i.next();let e=function(){let e=[],t=s();for(;t&&(e.push(t),a===`|`||a===`,`);){do a=i.next();while(a===`|`||a===`,`);t=s()}return t=>e.some((e=>e(t)))}();return a===`)`&&(a=i.next()),e}if(n(a)){let e=[];do e.push(a),a=i.next();while(n(a));return n=>t(e,n)}return null}function s(){let e=[],t=o();for(;t;)e.push(t),t=o();return t=>e.every((e=>e(t)))}}},810:(e,t)=>{Object.defineProperty(t,`__esModule`,{value:!0}),t.disposeOnigString=void 0,t.disposeOnigString=function(e){typeof e.dispose==`function`&&e.dispose()}},150:(e,t,n)=>{Object.defineProperty(t,`__esModule`,{value:!0}),t.parseRawGrammar=void 0;let r=n(578),i=n(185),a=n(726);t.parseRawGrammar=function(e,t=null){return t!==null&&/\.json$/.test(t)?(n=e,o=t,i.DebugFlags.InDebugMode?a.parseJSON(n,o,!0):JSON.parse(n)):function(e,t){return i.DebugFlags.InDebugMode?r.parseWithLocation(e,t,`$vscodeTextmateLocation`):r.parsePLIST(e)}(e,t);var n,o}},578:(e,t)=>{function n(e,t,n){let r=e.length,i=0,a=1,o=0;function s(t){if(n===null)i+=t;else for(;t>0;)e.charCodeAt(i)===10?(i++,a++,o=0):(i++,o++),t--}function c(e){n===null?i=e:s(e-i)}function l(){for(;i<r;){let t=e.charCodeAt(i);if(t!==32&&t!==9&&t!==13&&t!==10)break;s(1)}}function u(t){return e.substr(i,t.length)===t&&(s(t.length),!0)}function d(t){let n=e.indexOf(t,i);c(n===-1?r:n+t.length)}function f(t){let n=e.indexOf(t,i);if(n!==-1){let r=e.substring(i,n);return c(n+t.length),r}{let t=e.substr(i);return c(r),t}}r>0&&e.charCodeAt(0)===65279&&(i=1);let p=0,m=null,h=[],g=[],_=null;function v(e,t){h.push(p),g.push(m),p=e,m=t}function y(){if(h.length===0)return b(`illegal state stack`);p=h.pop(),m=g.pop()}function b(t){throw Error(`Near offset `+i+`: `+t+` ~~~`+e.substr(i,50)+`~~~`)}let x=function(){if(_===null)return b(`missing <key>`);let e={};n!==null&&(e[n]={filename:t,line:a,char:o}),m[_]=e,_=null,v(1,e)},S=function(){if(_===null)return b(`missing <key>`);let e=[];m[_]=e,_=null,v(2,e)},C=function(){let e={};n!==null&&(e[n]={filename:t,line:a,char:o}),m.push(e),v(1,e)},w=function(){let e=[];m.push(e),v(2,e)};function T(){if(p!==1)return b(`unexpected </dict>`);y()}function E(){return p===1||p!==2?b(`unexpected </array>`):void y()}function D(e){if(p===1){if(_===null)return b(`missing <key>`);m[_]=e,_=null}else p===2?m.push(e):m=e}function O(e){if(isNaN(e))return b(`cannot parse float`);if(p===1){if(_===null)return b(`missing <key>`);m[_]=e,_=null}else p===2?m.push(e):m=e}function k(e){if(isNaN(e))return b(`cannot parse integer`);if(p===1){if(_===null)return b(`missing <key>`);m[_]=e,_=null}else p===2?m.push(e):m=e}function A(e){if(p===1){if(_===null)return b(`missing <key>`);m[_]=e,_=null}else p===2?m.push(e):m=e}function j(e){if(p===1){if(_===null)return b(`missing <key>`);m[_]=e,_=null}else p===2?m.push(e):m=e}function M(e){if(p===1){if(_===null)return b(`missing <key>`);m[_]=e,_=null}else p===2?m.push(e):m=e}function N(){let e=f(`>`),t=!1;return e.charCodeAt(e.length-1)===47&&(t=!0,e=e.substring(0,e.length-1)),{name:e.trim(),isClosed:t}}function P(e){if(e.isClosed)return``;let t=f(`</`);return d(`>`),t.replace(/&#([0-9]+);/g,(function(e,t){return String.fromCodePoint(parseInt(t,10))})).replace(/&#x([0-9a-f]+);/g,(function(e,t){return String.fromCodePoint(parseInt(t,16))})).replace(/&amp;|&lt;|&gt;|&quot;|&apos;/g,(function(e){switch(e){case`&amp;`:return`&`;case`&lt;`:return`<`;case`&gt;`:return`>`;case`&quot;`:return`"`;case`&apos;`:return`'`}return e}))}for(;i<r&&(l(),!(i>=r));){let c=e.charCodeAt(i);if(s(1),c!==60)return b(`expected <`);if(i>=r)return b(`unexpected end of input`);let f=e.charCodeAt(i);if(f===63){s(1),d(`?>`);continue}if(f===33){if(s(1),u(`--`)){d(`-->`);continue}d(`>`);continue}if(f===47){if(s(1),l(),u(`plist`)){d(`>`);continue}if(u(`dict`)){d(`>`),T();continue}if(u(`array`)){d(`>`),E();continue}return b(`unexpected closed tag`)}let h=N();switch(h.name){case`dict`:p===1?x():p===2?C():(m={},n!==null&&(m[n]={filename:t,line:a,char:o}),v(1,m)),h.isClosed&&T();continue;case`array`:p===1?S():p===2?w():(m=[],v(2,m)),h.isClosed&&E();continue;case`key`:F=P(h),p===1?_===null?_=F:b(`too many <key>`):b(`unexpected <key>`);continue;case`string`:D(P(h));continue;case`real`:O(parseFloat(P(h)));continue;case`integer`:k(parseInt(P(h),10));continue;case`date`:A(new Date(P(h)));continue;case`data`:j(P(h));continue;case`true`:P(h),M(!0);continue;case`false`:P(h),M(!1);continue}if(!/^plist/.test(h.name))return b(`unexpected opened tag `+h.name)}var F;return m}Object.defineProperty(t,`__esModule`,{value:!0}),t.parsePLIST=t.parseWithLocation=void 0,t.parseWithLocation=function(e,t,r){return n(e,t,r)},t.parsePLIST=function(e){return n(e,null,null)}},583:(e,t,n)=>{Object.defineProperty(t,`__esModule`,{value:!0}),t.SyncRegistry=void 0;let r=n(752);t.SyncRegistry=class{constructor(e,t){this._onigLibPromise=t,this._grammars=new Map,this._rawGrammars=new Map,this._injectionGrammars=new Map,this._theme=e}dispose(){for(let e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}async grammarForScopeName(e,t,n,i,a){if(!this._grammars.has(e)){let o=this._rawGrammars.get(e);if(!o)return null;this._grammars.set(e,r.createGrammar(e,o,t,n,i,a,this,await this._onigLibPromise))}return this._grammars.get(e)}}},666:(e,t,n)=>{Object.defineProperty(t,`__esModule`,{value:!0}),t.CompiledRule=t.RegExpSourceList=t.RegExpSource=t.RuleFactory=t.BeginWhileRule=t.BeginEndRule=t.IncludeOnlyRule=t.MatchRule=t.CaptureRule=t.Rule=t.ruleIdToNumber=t.ruleIdFromNumber=t.whileRuleId=t.endRuleId=void 0;let r=n(807),i=n(784),a=/\\(\d+)/,o=/\\(\d+)/g;t.endRuleId=-1,t.whileRuleId=-2,t.ruleIdFromNumber=function(e){return e},t.ruleIdToNumber=function(e){return e};class s{constructor(e,t,n,i){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=r.RegexSource.hasCaptures(this._name),this._contentName=i||null,this._contentNameIsCapturing=r.RegexSource.hasCaptures(this._contentName)}get debugName(){let e=this.$location?`${r.basename(this.$location.filename)}:${this.$location.line}`:`unknown`;return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return this._nameIsCapturing&&this._name!==null&&e!==null&&t!==null?r.RegexSource.replaceCaptures(this._name,e,t):this._name}getContentName(e,t){return this._contentNameIsCapturing&&this._contentName!==null?r.RegexSource.replaceCaptures(this._contentName,e,t):this._contentName}}t.Rule=s;class c extends s{constructor(e,t,n,r,i){super(e,t,n,r),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(e,t){throw Error(`Not supported!`)}compile(e,t){throw Error(`Not supported!`)}compileAG(e,t,n,r){throw Error(`Not supported!`)}}t.CaptureRule=c;class l extends s{constructor(e,t,n,r,i){super(e,t,n,null),this._match=new m(r,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new h,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}}t.MatchRule=l;class u extends s{constructor(e,t,n,r,i){super(e,t,n,r),this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}collectPatterns(e,t){for(let n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new h,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}}t.IncludeOnlyRule=u;class d extends s{constructor(e,t,n,r,i,a,o,s,c,l){super(e,t,n,r),this._begin=new m(i,this.id),this.beginCaptures=a,this._end=new m(o||`￿`,-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=s,this.applyEndPatternLast=c||!1,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new h;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}}t.BeginEndRule=d;class f extends s{constructor(e,n,r,i,a,o,s,c,l){super(e,n,r,i),this._begin=new m(a,this.id),this.beginCaptures=o,this.whileCaptures=c,this._while=new m(s,t.whileRuleId),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(),null),this._cachedCompiledWhilePatterns&&=(this._cachedCompiledWhilePatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new h;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new h,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||`￿`),this._cachedCompiledWhilePatterns}}t.BeginWhileRule=f;class p{static createCaptureRule(e,t,n,r,i){return e.registerRule((e=>new c(t,e,n,r,i)))}static getCompiledRuleId(e,t,n){return e.id||t.registerRule((i=>{if(e.id=i,e.match)return new l(e.$vscodeTextmateLocation,e.id,e.name,e.match,p._compileCaptures(e.captures,t,n));if(e.begin===void 0){e.repository&&(n=r.mergeObjects({},n,e.repository));let i=e.patterns;return i===void 0&&e.include&&(i=[{include:e.include}]),new u(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,p._compilePatterns(i,t,n))}return e.while?new f(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,p._compileCaptures(e.beginCaptures||e.captures,t,n),e.while,p._compileCaptures(e.whileCaptures||e.captures,t,n),p._compilePatterns(e.patterns,t,n)):new d(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,p._compileCaptures(e.beginCaptures||e.captures,t,n),e.end,p._compileCaptures(e.endCaptures||e.captures,t,n),e.applyEndPatternLast,p._compilePatterns(e.patterns,t,n))})),e.id}static _compileCaptures(e,t,n){let r=[];if(e){let i=0;for(let t in e){if(t===`$vscodeTextmateLocation`)continue;let e=parseInt(t,10);e>i&&(i=e)}for(let e=0;e<=i;e++)r[e]=null;for(let i in e){if(i===`$vscodeTextmateLocation`)continue;let a=parseInt(i,10),o=0;e[i].patterns&&(o=p.getCompiledRuleId(e[i],t,n)),r[a]=p.createCaptureRule(t,e[i].$vscodeTextmateLocation,e[i].name,e[i].contentName,o)}}return r}static _compilePatterns(e,t,n){let r=[];if(e)for(let a=0,o=e.length;a<o;a++){let o=e[a],s=-1;if(o.include){let e=i.parseInclude(o.include);switch(e.kind){case 0:case 1:s=p.getCompiledRuleId(n[o.include],t,n);break;case 2:let r=n[e.ruleName];r&&(s=p.getCompiledRuleId(r,t,n));break;case 3:case 4:let i=e.scopeName,a=e.kind===4?e.ruleName:null,c=t.getExternalGrammar(i,n);if(c)if(a){let e=c.repository[a];e&&(s=p.getCompiledRuleId(e,t,c.repository))}else s=p.getCompiledRuleId(c.repository.$self,t,c.repository)}}else s=p.getCompiledRuleId(o,t,n);if(s!==-1){let e=t.getRule(s),n=!1;if((e instanceof u||e instanceof d||e instanceof f)&&e.hasMissingPatterns&&e.patterns.length===0&&(n=!0),n)continue;r.push(s)}}return{patterns:r,hasMissingPatterns:(e?e.length:0)!==r.length}}}t.RuleFactory=p;class m{constructor(e,t){if(e){let t=e.length,n=0,r=[],i=!1;for(let a=0;a<t;a++)if(e.charAt(a)===`\\`&&a+1<t){let t=e.charAt(a+1);t===`z`?(r.push(e.substring(n,a)),r.push(`$(?!\\n)(?<!\\n)`),n=a+2):t!==`A`&&t!==`G`||(i=!0),a++}this.hasAnchor=i,n===0?this.source=e:(r.push(e.substring(n,t)),this.source=r.join(``))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=t,this.hasBackReferences=a.test(this.source)}clone(){return new m(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,t){let n=t.map((t=>e.substring(t.start,t.end)));return o.lastIndex=0,this.source.replace(o,((e,t)=>r.escapeRegExpCharacters(n[parseInt(t,10)]||``)))}_buildAnchorCache(){let e,t,n,r,i=[],a=[],o=[],s=[];for(e=0,t=this.source.length;e<t;e++)n=this.source.charAt(e),i[e]=n,a[e]=n,o[e]=n,s[e]=n,n===`\\`&&e+1<t&&(r=this.source.charAt(e+1),r===`A`?(i[e+1]=`￿`,a[e+1]=`￿`,o[e+1]=`A`,s[e+1]=`A`):r===`G`?(i[e+1]=`￿`,a[e+1]=`G`,o[e+1]=`￿`,s[e+1]=`G`):(i[e+1]=r,a[e+1]=r,o[e+1]=r,s[e+1]=r),e++);return{A0_G0:i.join(``),A0_G1:a.join(``),A1_G0:o.join(``),A1_G1:s.join(``)}}resolveAnchors(e,t){return this.hasAnchor&&this._anchorCache?e?t?this._anchorCache.A1_G1:this._anchorCache.A1_G0:t?this._anchorCache.A0_G1:this._anchorCache.A0_G0:this.source}}t.RegExpSource=m;class h{constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&=(this._cached.dispose(),null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){return this._cached||=new g(e,this._items.map((e=>e.source)),this._items.map((e=>e.ruleId))),this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){return new g(e,this._items.map((e=>e.resolveAnchors(t,n))),this._items.map((e=>e.ruleId)))}}t.RegExpSourceList=h;class g{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}dispose(){typeof this.scanner.dispose==`function`&&this.scanner.dispose()}toString(){let e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(` - `+this.rules[t]+`: `+this.regExps[t]);return e.join(`
4
- `)}findNextMatchSync(e,t,n){let r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}}t.CompiledRule=g},63:(e,t,n)=>{Object.defineProperty(t,`__esModule`,{value:!0}),t.ThemeTrieElement=t.ThemeTrieElementRule=t.ColorMap=t.fontStyleToString=t.ParsedThemeRule=t.parseTheme=t.StyleAttributes=t.ScopeStack=t.Theme=void 0;let r=n(807);class i{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n,this._cachedMatchRoot=new r.CachedFn((e=>this._root.match(e)))}static createFromRawTheme(e,t){return this.createFromParsedTheme(c(e),t)}static createFromParsedTheme(e,t){return function(e,t){e.sort(((e,t)=>{let n=r.strcmp(e.scope,t.scope);return n===0?(n=r.strArrCmp(e.parentScopes,t.parentScopes),n===0?e.index-t.index:n):n}));let n=0,a=`#000000`,o=`#ffffff`,c=``,l=0,d=0;for(;e.length>=1&&e[0].scope===``;){let t=e.shift();t.fontStyle!==-1&&(n=t.fontStyle),t.foreground!==null&&(a=t.foreground),t.background!==null&&(o=t.background),t.fontFamily!==null&&(c=t.fontFamily),t.fontSize!==null&&(l=t.fontSize),t.lineHeight!==null&&(d=t.lineHeight)}let m=new u(t),h=new s(n,m.getId(a),m.getId(o),c,l,d),g=new p(new f(0,null,-1,0,0,c,l,d),[]);for(let t=0,n=e.length;t<n;t++){let n=e[t];g.insert(0,n.scope,n.parentScopes,n.fontStyle,m.getId(n.foreground),m.getId(n.background),n.fontFamily,n.fontSize,n.lineHeight)}return new i(m,h,g)}(e,t)}getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;let t=e.scopeName,n=this._cachedMatchRoot.get(t).find((t=>function(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let r=t[n],i=!1;if(r===`>`){if(n===t.length-1)return!1;r=t[++n],i=!0}for(;e&&!o(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}(e.parent,t.parentScopes)));return n?new s(n.fontStyle,n.foreground,n.background,n.fontFamily,n.fontSize,n.lineHeight):null}}t.Theme=i;class a{constructor(e,t){this.parent=e,this.scopeName=t}static push(e,t){for(let n of t)e=new a(e,n);return e}static from(...e){let t=null;for(let n=0;n<e.length;n++)t=new a(t,e[n]);return t}push(e){return new a(this,e)}getSegments(){let e=this,t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join(` `)}extends(e){return this===e||this.parent!==null&&this.parent.extends(e)}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push(n.scopeName),n=n.parent;return n===e?t.reverse():void 0}}function o(e,t){return t===e||e.startsWith(t)&&e[t.length]===`.`}t.ScopeStack=a;class s{constructor(e,t,n,r,i,a){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n,this.fontFamily=r,this.fontSize=i,this.lineHeight=a}}function c(e){if(!e||!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],i=0;for(let e=0,a=t.length;e<a;e++){let a,o=t[e];if(!o.settings)continue;if(typeof o.scope==`string`){let e=o.scope;e=e.replace(/^[,]+/,``),e=e.replace(/[,]+$/,``),a=e.split(`,`)}else a=Array.isArray(o.scope)?o.scope:[``];let s=-1;if(typeof o.settings.fontStyle==`string`){s=0;let e=o.settings.fontStyle.split(` `);for(let t=0,n=e.length;t<n;t++)switch(e[t]){case`italic`:s|=1;break;case`bold`:s|=2;break;case`underline`:s|=4;break;case`strikethrough`:s|=8}}let c=null;typeof o.settings.foreground==`string`&&r.isValidHexColor(o.settings.foreground)&&(c=o.settings.foreground);let u=null;typeof o.settings.background==`string`&&r.isValidHexColor(o.settings.background)&&(u=o.settings.background);let d=``;typeof o.settings.fontFamily==`string`&&(d=o.settings.fontFamily);let f=0;typeof o.settings.fontSize==`number`&&(f=o.settings.fontSize);let p=0;typeof o.settings.lineHeight==`number`&&(p=o.settings.lineHeight);for(let t=0,r=a.length;t<r;t++){let r=a[t].trim().split(` `),o=r[r.length-1],m=null;r.length>1&&(m=r.slice(0,r.length-1),m.reverse()),n[i++]=new l(o,m,e,s,c,u,d,f,p)}}return n}t.StyleAttributes=s,t.parseTheme=c;class l{constructor(e,t,n,r,i,a,o,s,c){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=i,this.background=a,this.fontFamily=o,this.fontSize=s,this.lineHeight=c}}t.ParsedThemeRule=l,t.fontStyleToString=function(e){if(e===-1)return`not set`;let t=``;return 1&e&&(t+=`italic `),2&e&&(t+=`bold `),4&e&&(t+=`underline `),8&e&&(t+=`strikethrough `),t===``&&(t=`none`),t.trim()};class u{constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}}t.ColorMap=u;let d=Object.freeze([]);class f{constructor(e,t,n,r,i,a,o,s){this.scopeDepth=e,this.parentScopes=t||d,this.fontStyle=n,this.foreground=r,this.background=i,this.fontFamily=a,this.fontSize=o,this.lineHeight=s}clone(){return new f(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background,this.fontFamily,this.fontSize,this.lineHeight)}static cloneArr(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=e[n].clone();return t}acceptOverwrite(e,t,n,r,i,a,o){this.scopeDepth>e?console.log(`how did this happen?`):this.scopeDepth=e,t!==-1&&(this.fontStyle=t),n!==0&&(this.foreground=n),r!==0&&(this.background=r),i!==``&&(this.fontFamily=i),a!==0&&(this.fontSize=a),o!==0&&(this.lineHeight=o)}}t.ThemeTrieElementRule=f;class p{constructor(e,t=[],n={}){this._mainRule=e,this._children=n,this._rulesWithParentScopes=t}static _cmpBySpecificity(e,t){if(e.scopeDepth!==t.scopeDepth)return t.scopeDepth-e.scopeDepth;let n=0,r=0;for(;e.parentScopes[n]===`>`&&n++,t.parentScopes[r]===`>`&&r++,!(n>=e.parentScopes.length||r>=t.parentScopes.length);){let i=t.parentScopes[r].length-e.parentScopes[n].length;if(i!==0)return i;n++,r++}return t.parentScopes.length-e.parentScopes.length}match(e){if(e!==``){let t,n,r=e.indexOf(`.`);if(r===-1?(t=e,n=``):(t=e.substring(0,r),n=e.substring(r+1)),this._children.hasOwnProperty(t))return this._children[t].match(n)}let t=this._rulesWithParentScopes.concat(this._mainRule);return t.sort(p._cmpBySpecificity),t}insert(e,t,n,r,i,a,o,s,c){if(t===``)return void this._doInsertHere(e,n,r,i,a,o,s,c);let l,u,d,m=t.indexOf(`.`);m===-1?(l=t,u=``):(l=t.substring(0,m),u=t.substring(m+1)),this._children.hasOwnProperty(l)?d=this._children[l]:(d=new p(this._mainRule.clone(),f.cloneArr(this._rulesWithParentScopes)),this._children[l]=d),d.insert(e+1,u,n,r,i,a,o,s,c)}_doInsertHere(e,t,n,i,a,o,s,c){if(t!==null){for(let l=0,u=this._rulesWithParentScopes.length;l<u;l++){let u=this._rulesWithParentScopes[l];if(r.strArrCmp(u.parentScopes,t)===0)return void u.acceptOverwrite(e,n,i,a,o,s,c)}n===-1&&(n=this._mainRule.fontStyle),i===0&&(i=this._mainRule.foreground),a===0&&(a=this._mainRule.background),o===``&&(o=this._mainRule.fontFamily),s===0&&(s=this._mainRule.fontSize),c===0&&(c=this._mainRule.lineHeight),this._rulesWithParentScopes.push(new f(e,t,n,i,a,o,s,c))}else this._mainRule.acceptOverwrite(e,n,i,a,o,s,c)}}t.ThemeTrieElement=p},807:(e,t)=>{function n(e){return Array.isArray(e)?function(e){let t=[];for(let r=0,i=e.length;r<i;r++)t[r]=n(e[r]);return t}(e):typeof e==`object`?function(e){let t={};for(let r in e)t[r]=n(e[r]);return t}(e):e}Object.defineProperty(t,`__esModule`,{value:!0}),t.containsRTL=t.performanceNow=t.CachedFn=t.escapeRegExpCharacters=t.isValidHexColor=t.strArrCmp=t.strcmp=t.RegexSource=t.basename=t.mergeObjects=t.clone=void 0,t.clone=function(e){return n(e)},t.mergeObjects=function(e,...t){return t.forEach((t=>{for(let n in t)e[n]=t[n]})),e},t.basename=function e(t){let n=~t.lastIndexOf(`/`)||~t.lastIndexOf(`\\`);return n===0?t:~n==t.length-1?e(t.substring(0,t.length-1)):t.substr(1+~n)};let r,i=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g;function a(e,t){return e<t?-1:+(e>t)}t.RegexSource=class{static hasCaptures(e){return e!==null&&(i.lastIndex=0,i.test(e))}static replaceCaptures(e,t,n){return e.replace(i,((e,r,i,a)=>{let o=n[parseInt(r||i,10)];if(!o)return e;{let e=t.substring(o.start,o.end);for(;e[0]===`.`;)e=e.substring(1);switch(a){case`downcase`:return e.toLowerCase();case`upcase`:return e.toUpperCase();default:return e}}}))}},t.strcmp=a,t.strArrCmp=function(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let r=0;r<n;r++){let n=a(e[r],t[r]);if(n!==0)return n}return 0}return n-r},t.isValidHexColor=function(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))},t.escapeRegExpCharacters=function(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,`\\$&`)},t.CachedFn=class{constructor(e){this.fn=e,this.cache=new Map}get(e){if(this.cache.has(e))return this.cache.get(e);let t=this.fn(e);return this.cache.set(e,t),t}},t.performanceNow=typeof performance>`u`?function(){return Date.now()}:function(){return performance.now()},t.containsRTL=function(e){return r||=/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA\u07FE-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u088E\u08A0-\u08C9\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDC7\uFDF0-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE35\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDD23\uDE80-\uDEA9\uDEAD-\uDF45\uDF51-\uDF81\uDF86-\uDFF6]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD4B-\uDFFF]|\uD83B[\uDC00-\uDEBB])/,r.test(e)}}},t={};return function n(r){var i=t[r];if(i!==void 0)return i.exports;var a=t[r]={exports:{}};return e[r].call(a.exports,a,a.exports,n),a.exports}(625)})()))})(t),t.exports)}function a(e,t){return t.forEach(function(t){t&&typeof t!=`string`&&!Array.isArray(t)&&Object.keys(t).forEach(function(n){if(n!==`default`&&!(n in e)){var r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:function(){return t[n]}})}})}),Object.freeze(e)}var o=i(),s=a({__proto__:null,default:e(o)},[o]);export{s as main};
1
+ import{t as e}from"./_commonjsHelpers-DMmVv2OA.js";var t={exports:{}},n=t.exports,r;function i(){return r?t.exports:(r=1,(function(e,t){(function(t,n){e.exports=n()})(n,(()=>(()=>{var e={185:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.UseOnigurumaFindOptions=t.DebugFlags=void 0,t.DebugFlags={InDebugMode:typeof process<`u`&&!!{}.VSCODE_TEXTMATE_DEBUG},t.UseOnigurumaFindOptions=!1},151:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.applyStateStackDiff=t.diffStateStacksRefEq=void 0;let r=n(752);t.diffStateStacksRefEq=function(e,t){let n=0,r=[],i=e,a=t;for(;i!==a;)i&&(!a||i.depth>=a.depth)?(n++,i=i.parent):(r.push(a.toStateStackFrame()),a=a.parent);return{pops:n,newFrames:r.reverse()}},t.applyStateStackDiff=function(e,t){let n=e;for(let e=0;e<t.pops;e++)n=n.parent;for(let e of t.newFrames)n=r.StateStackImpl.pushFrame(n,e);return n}},490:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.toOptionalTokenType=t.EncodedTokenAttributes=t.FontAttribute=void 0;class n{constructor(e,t,n){this.fontFamily=e,this.fontSize=t,this.lineHeight=n}static _getKey(e,t,n){return`${e}|${t}|${n}`}static _get(e,t,r){let i=this._getKey(e,t,r),a=this._map.get(i);return a||(a=new n(e,t,r),this._map.set(i,a)),a}static from(e,t,r){return new n(e,t,r)}with(e){return e?n._get(e.fontFamily||this.fontFamily,e.fontSize||this.fontSize,e.lineHeight||this.lineHeight):this}}var r;t.FontAttribute=n,n._map=new Map,(r=t.EncodedTokenAttributes||={}).toBinaryStr=function(e){return e.toString(2).padStart(32,`0`)},r.print=function(e){let t=r.getLanguageId(e),n=r.getTokenType(e),i=r.getFontStyle(e),a=r.getForeground(e),o=r.getBackground(e);console.log({languageId:t,tokenType:n,fontStyle:i,foreground:a,background:o})},r.getLanguageId=function(e){return(255&e)>>>0},r.getTokenType=function(e){return(768&e)>>>8},r.containsBalancedBrackets=function(e){return!!(1024&e)},r.getFontStyle=function(e){return(30720&e)>>>11},r.getForeground=function(e){return(16744448&e)>>>15},r.getBackground=function(e){return(4278190080&e)>>>24},r.set=function(e,t,n,i,a,o,s){let c=r.getLanguageId(e),l=r.getTokenType(e),u=+!!r.containsBalancedBrackets(e),d=r.getFontStyle(e),f=r.getForeground(e),p=r.getBackground(e);return t!==0&&(c=t),n!==8&&(l=n),i!==null&&(u=+!!i),a!==-1&&(d=a),o!==0&&(f=o),s!==0&&(p=s),(c|l<<8|u<<10|d<<11|f<<15|p<<24)>>>0},t.toOptionalTokenType=function(e){return e}},214:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BasicScopeAttributesProvider=t.BasicScopeAttributes=void 0;let r=n(807);class i{constructor(e,t){this.languageId=e,this.tokenType=t}}t.BasicScopeAttributes=i;class a{constructor(e,t){this._getBasicScopeAttributes=new r.CachedFn((e=>new i(this._scopeToLanguage(e),this._toStandardTokenType(e)))),this._defaultAttributes=new i(e,8),this._embeddedLanguagesMatcher=new o(Object.entries(t||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(e){return e===null?a._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(e)}_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(e){let t=e.match(a.STANDARD_TOKEN_TYPE_REGEXP);if(!t)return 8;switch(t[1]){case`comment`:return 1;case`string`:return 2;case`regex`:return 3;case`meta.embedded`:return 0}throw Error(`Unexpected match for standard token type!`)}}t.BasicScopeAttributesProvider=a,a._NULL_SCOPE_METADATA=new i(0,0),a.STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/;class o{constructor(e){if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);let t=e.map((([e,t])=>r.escapeRegExpCharacters(e)));t.sort(),t.reverse(),this.scopesRegExp=RegExp(`^((${t.join(`)|(`)}))($|\\.)`,``)}}match(e){if(!this.scopesRegExp)return;let t=e.match(this.scopesRegExp);return t?this.values.get(t[1]):void 0}}},929:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LineFonts=t.FontInfo=t.LineTokens=t.BalancedBracketSelectors=t.StateStackImpl=t.AttributedScopeStack=t.Grammar=t.createGrammar=void 0;let r=n(185),i=n(490),a=n(916),o=n(810),s=n(666),c=n(63),l=n(807),u=n(214),d=n(398);function f(e,t,n,r,i){let o=a.createMatchers(t,p),c=s.RuleFactory.getCompiledRuleId(n,r,i.repository);for(let n of o)e.push({debugSelector:t,matcher:n.matcher,ruleId:c,grammar:i,priority:n.priority})}function p(e,t){if(t.length<e.length)return!1;let n=0;return e.every((e=>{for(let r=n;r<t.length;r++)if(m(t[r],e))return n=r+1,!0;return!1}))}function m(e,t){if(!e)return!1;if(e===t)return!0;let n=t.length;return e.length>n&&e.substr(0,n)===t&&e[n]===`.`}t.createGrammar=function(e,t,n,r,i,a,o,s){return new h(e,t,n,r,i,a,o,s)};class h{constructor(e,t,n,r,i,o,s,c){if(this._rootScopeName=e,this.balancedBracketSelectors=o,this._onigLib=c,this._basicScopeAttributesProvider=new u.BasicScopeAttributesProvider(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=s,this._grammar=g(t,null),this._injections=null,this._tokenTypeMatchers=[],i)for(let e of Object.keys(i)){let t=a.createMatchers(e,p);for(let n of t)this._tokenTypeMatchers.push({matcher:n.matcher,type:i[e]})}}get themeProvider(){return this._grammarRepository}dispose(){for(let e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){let e=[],t=this._rootScopeName,n=(e=>e===this._rootScopeName?this._grammar:this.getExternalGrammar(e))(t);if(n){let r=n.injections;if(r)for(let t in r)f(e,t,r[t],this,n);let i=this._grammarRepository.injections(t);i&&i.forEach((t=>{let n=this.getExternalGrammar(t);if(n){let t=n.injectionSelector;t&&f(e,t,n,this,n)}}))}return e.sort(((e,t)=>e.priority-t.priority)),e}getInjections(){if(this._injections===null&&(this._injections=this._collectInjections(),r.DebugFlags.InDebugMode&&this._injections.length>0)){console.log(`Grammar ${this._rootScopeName} contains the following injections:`);for(let e of this._injections)console.log(` - ${e.debugSelector}`)}return this._injections}registerRule(e){let t=++this._lastRuleId,n=e(s.ruleIdFromNumber(t));return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[s.ruleIdToNumber(e)]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){let n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=g(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){let r=this._tokenize(e,t,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly,fonts:r.lineFonts.getResult()}}tokenizeLine2(e,t,n=0){let r=this._tokenize(e,t,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly,fonts:r.lineFonts.getResult()}}_tokenize(e,t,n,r){let a;if(this._rootId===-1&&(this._rootId=s.RuleFactory.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections()),t&&t!==v.NULL)a=!1,t.reset();else{a=!0;let e=this._basicScopeAttributesProvider.getDefaultAttributes(),n=this.themeProvider.getDefaults(),r=i.EncodedTokenAttributes.set(0,e.languageId,e.tokenType,null,n.fontStyle,n.foregroundId,n.backgroundId),o=i.FontAttribute.from(n.fontFamily,n.fontSize,n.lineHeight),s=this.getRule(this._rootId).getName(null,null),c;c=s?_.createRootAndLookUpScopeName(s,r,o,this):_.createRoot(`unknown`,r,o),t=new v(null,this._rootId,-1,-1,!1,null,c,c)}e+=`
2
+ `;let c=this.createOnigString(e),l=c.content.length,u=new y(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),f=new x,p=d._tokenizeString(this,c,a,0,t,u,f,!0,r);return o.disposeOnigString(c),{lineLength:l,lineTokens:u,lineFonts:f,ruleStack:p.stack,stoppedEarly:p.stoppedEarly}}}function g(e,t){return(e=l.clone(e)).repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}t.Grammar=h;class _{constructor(e,t,n,r,i){this.parent=e,this.scopePath=t,this.tokenAttributes=n,this.fontAttributes=r,this.styleAttributes=i}static fromExtension(e,t){let n=e,r=e?.scopePath??null;for(let e of t)r=c.ScopeStack.push(r,e.scopeNames),n=new _(n,r,e.encodedTokenAttributes,null,null);return n}static createRoot(e,t,n){return new _(null,new c.ScopeStack(null,e),t,n,null)}static createRootAndLookUpScopeName(e,t,n,r){let i=r.getMetadataForScope(e),a=new c.ScopeStack(null,e),o=r.themeProvider.themeMatch(a);return new _(null,a,_.mergeAttributes(t,i,o),n.with(o),o)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(` `)}equals(e){return _.equals(this,e)}static equals(e,t){for(;;){if(e===t||!e&&!t)return!0;if(!e||!t||e.scopeName!==t.scopeName||e.tokenAttributes!==t.tokenAttributes)return!1;e=e.parent,t=t.parent}}static mergeAttributes(e,t,n){let r=-1,a=0,o=0;return n!==null&&(r=n.fontStyle,a=n.foregroundId,o=n.backgroundId),i.EncodedTokenAttributes.set(e,t.languageId,t.tokenType,null,r,a,o)}pushAttributed(e,t){if(e===null)return this;if(e.indexOf(` `)===-1)return _._pushAttributed(this,e,t);let n=e.split(/ /g),r=this;for(let e of n)r=_._pushAttributed(r,e,t);return r}static _pushAttributed(e,t,n){let r=n.getMetadataForScope(t),i=e.scopePath.push(t),a=n.themeProvider.themeMatch(i);return new _(e,i,_.mergeAttributes(e.tokenAttributes,r,a),e.fontAttributes?.with(a)??null,a)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push({encodedTokenAttributes:n.tokenAttributes,scopeNames:n.scopePath.getExtensionIfDefined(n.parent?.scopePath??null)}),n=n.parent;return n===e?t.reverse():void 0}}t.AttributedScopeStack=_;class v{constructor(e,t,n,r,i,a,o,s){this.parent=e,this.ruleId=t,this.beginRuleCapturedEOL=i,this.endRule=a,this.nameScopesList=o,this.contentNameScopesList=s,this._stackElementBrand=void 0,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=n,this._anchorPos=r}equals(e){return e!==null&&v._equals(this,e)}static _equals(e,t){return e===t||!!this._structuralEquals(e,t)&&_.equals(e.contentNameScopesList,t.contentNameScopesList)}static _structuralEquals(e,t){for(;;){if(e===t||!e&&!t)return!0;if(!e||!t||e.depth!==t.depth||e.ruleId!==t.ruleId||e.endRule!==t.endRule)return!1;e=e.parent,t=t.parent}}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){v._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(e,t,n,r,i,a,o){return new v(this,e,t,n,r,i,a,o)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){let e=[];return this._writeString(e,0),`[`+e.join(`,`)+`]`}_writeString(e,t){return this.parent&&(t=this.parent._writeString(e,t)),e[t++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,t}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(e){return this.endRule===e?this:new v(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,e,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let t=this;for(;t&&t._enterPos===e._enterPos;){if(t.ruleId===e.ruleId)return!0;t=t.parent}return!1}toStateStackFrame(){return{ruleId:s.ruleIdToNumber(this.ruleId),beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(e,t){let n=_.fromExtension(e?.nameScopesList??null,t.nameScopesList);return new v(e,s.ruleIdFromNumber(t.ruleId),t.enterPos??-1,t.anchorPos??-1,t.beginRuleCapturedEOL,t.endRule,n,_.fromExtension(n,t.contentNameScopesList))}}t.StateStackImpl=v,v.NULL=new v(null,0,0,0,!1,null,null,null),t.BalancedBracketSelectors=class{constructor(e,t){this.allowAny=!1,this.balancedBracketScopes=e.flatMap((e=>e===`*`?(this.allowAny=!0,[]):a.createMatchers(e,p).map((e=>e.matcher)))),this.unbalancedBracketScopes=t.flatMap((e=>a.createMatchers(e,p).map((e=>e.matcher))))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(let t of this.unbalancedBracketScopes)if(t(e))return!1;for(let t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}};class y{constructor(e,t,n,i){this.balancedBracketSelectors=i,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,r.DebugFlags.InDebugMode?this._lineText=t:this._lineText=null,this._mergeConsecutiveTokensWithEqualMetadata=!l.containsRTL(t),this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let n=e?.tokenAttributes??0,a=!1;if(this.balancedBracketSelectors?.matchesAlways&&(a=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){let t=e?.getScopeNames()??[];for(let e of this._tokenTypeOverrides)e.matcher(t)&&(n=i.EncodedTokenAttributes.set(n,0,i.toOptionalTokenType(e.type),null,-1,0,0));this.balancedBracketSelectors&&(a=this.balancedBracketSelectors.match(t))}if(a&&(n=i.EncodedTokenAttributes.set(n,0,8,a,-1,0,0)),this._mergeConsecutiveTokensWithEqualMetadata&&this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===n)return void(this._lastTokenEndIndex=t);if(r.DebugFlags.InDebugMode){let n=e?.getScopeNames()??[];console.log(` token: |`+this._lineText.substring(this._lastTokenEndIndex,t).replace(/\n$/,`\\n`)+`|`);for(let e=0;e<n.length;e++)console.log(` * `+n[e])}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(n),this._lastTokenEndIndex=t;return}let n=e?.getScopeNames()??[];if(r.DebugFlags.InDebugMode){console.log(` token: |`+this._lineText.substring(this._lastTokenEndIndex,t).replace(/\n$/,`\\n`)+`|`);for(let e=0;e<n.length;e++)console.log(` * `+n[e])}this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);let n=new Uint32Array(this._binaryTokens.length);for(let e=0,t=this._binaryTokens.length;e<t;e++)n[e]=this._binaryTokens[e];return n}}t.LineTokens=y;class b{constructor(e,t,n,r,i){this.startIndex=e,this.endIndex=t,this.fontFamily=n,this.fontSizeMultiplier=r,this.lineHeightMultiplier=i}optionsEqual(e){return this.fontFamily===e.fontFamily&&this.fontSizeMultiplier===e.fontSizeMultiplier&&this.lineHeightMultiplier===e.lineHeightMultiplier}}t.FontInfo=b;class x{constructor(){this._fonts=[],this._lastIndex=0}produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(!e?.fontAttributes)return void(this._lastIndex=t);let n=e.fontAttributes.fontFamily,r=e.fontAttributes.fontSize,i=e.fontAttributes.lineHeight;if(!n&&!r&&!i)return void(this._lastIndex=t);let a=new b(this._lastIndex,t,n,r,i),o=this._fonts[this._fonts.length-1];o&&o.endIndex===this._lastIndex&&o.optionsEqual(a)?o.endIndex=a.endIndex:this._fonts.push(a),this._lastIndex=t}getResult(){return this._fonts}}t.LineFonts=x},784:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseInclude=t.TopLevelRepositoryReference=t.TopLevelReference=t.RelativeReference=t.SelfReference=t.BaseReference=t.ScopeDependencyProcessor=t.ExternalReferenceCollector=t.TopLevelRepositoryRuleReference=t.TopLevelRuleReference=void 0;let r=n(807);class i{constructor(e){this.scopeName=e}toKey(){return this.scopeName}}t.TopLevelRuleReference=i;class a{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}}t.TopLevelRepositoryRuleReference=a;class o{constructor(){this._references=[],this._seenReferenceKeys=new Set,this.visitedRule=new Set}get references(){return this._references}add(e){let t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}}function s(e,t,n,r){let a=n.lookup(e.scopeName);if(!a){if(e.scopeName===t)throw Error(`No grammar provided for <${t}>`);return}let o=n.lookup(t);e instanceof i?l({baseGrammar:o,selfGrammar:a},r):c(e.ruleName,{baseGrammar:o,selfGrammar:a,repository:a.repository},r);let s=n.injections(e.scopeName);if(s)for(let e of s)r.add(new i(e))}function c(e,t,n){t.repository&&t.repository[e]&&u([t.repository[e]],t,n)}function l(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&u(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&u(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function u(e,t,n){for(let o of e){if(n.visitedRule.has(o))continue;n.visitedRule.add(o);let e=o.repository?r.mergeObjects({},t.repository,o.repository):t.repository;Array.isArray(o.patterns)&&u(o.patterns,{...t,repository:e},n);let s=o.include;if(!s)continue;let d=g(s);switch(d.kind){case 0:l({...t,selfGrammar:t.baseGrammar},n);break;case 1:l(t,n);break;case 2:c(d.ruleName,{...t,repository:e},n);break;case 3:case 4:let r=d.scopeName===t.selfGrammar.scopeName?t.selfGrammar:d.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(r){let i={baseGrammar:t.baseGrammar,selfGrammar:r,repository:e};d.kind===4?c(d.ruleName,i,n):l(i,n)}else d.kind===4?n.add(new a(d.scopeName,d.ruleName)):n.add(new i(d.scopeName))}}}t.ExternalReferenceCollector=o,t.ScopeDependencyProcessor=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests=new Set,this.seenPartialScopeRequests=new Set,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new i(this.initialScopeName)]}processQueue(){let e=this.Q;this.Q=[];let t=new o;for(let n of e)s(n,this.initialScopeName,this.repo,t);for(let e of t.references)if(e instanceof i){if(this.seenFullScopeRequests.has(e.scopeName))continue;this.seenFullScopeRequests.add(e.scopeName),this.Q.push(e)}else{if(this.seenFullScopeRequests.has(e.scopeName)||this.seenPartialScopeRequests.has(e.toKey()))continue;this.seenPartialScopeRequests.add(e.toKey()),this.Q.push(e)}}};class d{constructor(){this.kind=0}}t.BaseReference=d;class f{constructor(){this.kind=1}}t.SelfReference=f;class p{constructor(e){this.ruleName=e,this.kind=2}}t.RelativeReference=p;class m{constructor(e){this.scopeName=e,this.kind=3}}t.TopLevelReference=m;class h{constructor(e,t){this.scopeName=e,this.ruleName=t,this.kind=4}}function g(e){if(e===`$base`)return new d;if(e===`$self`)return new f;let t=e.indexOf(`#`);return t===-1?new m(e):t===0?new p(e.substring(1)):new h(e.substring(0,t),e.substring(t+1))}t.TopLevelRepositoryReference=h,t.parseInclude=g},752:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)n==="default"||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(929),t)},398:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LocalStackElement=t._tokenizeString=void 0;let r=n(185),i=n(810),a=n(666),o=n(807);class s{constructor(e,t){this.stack=e,this.stoppedEarly=t}}function c(e,t,n,i,c,d,p,m,h){let g=(e,t)=>{d.produce(e,t),p.produce(e,t)},_=t.content.length,v=!1,y=-1;if(m){let o=function(e,t,n,i,o,s,c){let l=(e,t)=>{s.produce(e,t),c.produce(e,t)},d=o.beginRuleCapturedEOL?0:-1,p=[];for(let t=o;t;t=t.pop()){let n=t.getRule(e);n instanceof a.BeginWhileRule&&p.push({rule:n,stack:t})}for(let m=p.pop();m;m=p.pop()){let{ruleScanner:p,findOptions:h}=u(m.rule,e,m.stack.endRule,n,i===d),g=p.findNextMatchSync(t,i,h);if(r.DebugFlags.InDebugMode&&(console.log(` scanning for while rule`),console.log(p.toString())),!g){r.DebugFlags.InDebugMode&&console.log(` popping `+m.rule.debugName+` - `+m.rule.debugWhileRegExp),o=m.stack.pop();break}if(g.ruleId!==a.whileRuleId){o=m.stack.pop();break}g.captureIndices&&g.captureIndices.length&&(l(m.stack,g.captureIndices[0].start),f(e,t,n,m.stack,s,c,m.rule.whileCaptures,g.captureIndices),l(m.stack,g.captureIndices[0].end),d=g.captureIndices[0].end,g.captureIndices[0].end>i&&(i=g.captureIndices[0].end,n=!1))}return{stack:o,linePos:i,anchorPosition:d,isFirstLine:n}}(e,t,n,i,c,d,p);c=o.stack,i=o.linePos,n=o.isFirstLine,y=o.anchorPosition}let b=Date.now();for(;!v;){if(h!==0&&Date.now()-b>h)return new s(c,!0);x()}return new s(c,!1);function x(){r.DebugFlags.InDebugMode&&(console.log(``),console.log(`@@scanNext ${i}: |${t.content.substr(i).replace(/\n$/,`\\n`)}|`));let s=function(e,t,n,i,a,s){let c=function(e,t,n,i,a,s){let c=a.getRule(e),{ruleScanner:u,findOptions:d}=l(c,e,a.endRule,n,i===s),f=0;r.DebugFlags.InDebugMode&&(f=o.performanceNow());let p=u.findNextMatchSync(t,i,d);if(r.DebugFlags.InDebugMode){let e=o.performanceNow()-f;e>5&&console.warn(`Rule ${c.debugName} (${c.id}) matching took ${e} against '${t}'`),console.log(` scanning for (linePos: ${i}, anchorPosition: ${s})`),console.log(u.toString()),p&&console.log(`matched rule id: ${p.ruleId} from ${p.captureIndices[0].start} to ${p.captureIndices[0].end}`)}return p?{captureIndices:p.captureIndices,matchedRuleId:p.ruleId}:null}(e,t,n,i,a,s),u=e.getInjections();if(u.length===0)return c;let d=function(e,t,n,i,a,o,s){let c,u=Number.MAX_VALUE,d=null,f=0,p=o.contentNameScopesList.getScopeNames();for(let o=0,m=e.length;o<m;o++){let m=e[o];if(!m.matcher(p))continue;let{ruleScanner:h,findOptions:g}=l(t.getRule(m.ruleId),t,null,i,a===s),_=h.findNextMatchSync(n,a,g);if(!_)continue;r.DebugFlags.InDebugMode&&(console.log(` matched injection: ${m.debugSelector}`),console.log(h.toString()));let v=_.captureIndices[0].start;if(!(v>=u)&&(u=v,d=_.captureIndices,c=_.ruleId,f=m.priority,u===a))break}return d?{priorityMatch:f===-1,captureIndices:d,matchedRuleId:c}:null}(u,e,t,n,i,a,s);if(!d)return c;if(!c)return d;let f=c.captureIndices[0].start,p=d.captureIndices[0].start;return p<f||d.priorityMatch&&p===f?d:c}(e,t,n,i,c,y);if(!s)return r.DebugFlags.InDebugMode&&console.log(` no more matches.`),g(c,_),void(v=!0);let u=s.captureIndices,m=s.matchedRuleId,h=!!(u&&u.length>0)&&u[0].end>i;if(m===a.endRuleId){let a=c.getRule(e);r.DebugFlags.InDebugMode&&console.log(` popping `+a.debugName+` - `+a.debugEndRegExp),g(c,u[0].start),c=c.withContentNameScopesList(c.nameScopesList),f(e,t,n,c,d,p,a.endCaptures,u),g(c,u[0].end);let o=c;if(c=c.parent,y=o.getAnchorPos(),!h&&o.getEnterPos()===i)return r.DebugFlags.InDebugMode&&console.error(`[1] - Grammar is in an endless loop - Grammar pushed & popped a rule without advancing`),g(c=o,_),void(v=!0)}else{let o=e.getRule(m);g(c,u[0].start);let s=c,l=o.getName(t.content,u),b=c.contentNameScopesList.pushAttributed(l,e);if(c=c.push(m,i,y,u[0].end===_,null,b,b),o instanceof a.BeginEndRule){let i=o;r.DebugFlags.InDebugMode&&console.log(` pushing `+i.debugName+` - `+i.debugBeginRegExp),f(e,t,n,c,d,p,i.beginCaptures,u),g(c,u[0].end),y=u[0].end;let a=i.getContentName(t.content,u),l=b.pushAttributed(a,e);if(c=c.withContentNameScopesList(l),i.endHasBackReferences&&(c=c.withEndRule(i.getEndWithResolvedBackReferences(t.content,u))),!h&&s.hasSameRuleAs(c))return r.DebugFlags.InDebugMode&&console.error(`[2] - Grammar is in an endless loop - Grammar pushed the same rule without advancing`),c=c.pop(),g(c,_),void(v=!0)}else if(o instanceof a.BeginWhileRule){let i=o;r.DebugFlags.InDebugMode&&console.log(` pushing `+i.debugName),f(e,t,n,c,d,p,i.beginCaptures,u),g(c,u[0].end),y=u[0].end;let a=i.getContentName(t.content,u),l=b.pushAttributed(a,e);if(c=c.withContentNameScopesList(l),i.whileHasBackReferences&&(c=c.withEndRule(i.getWhileWithResolvedBackReferences(t.content,u))),!h&&s.hasSameRuleAs(c))return r.DebugFlags.InDebugMode&&console.error(`[3] - Grammar is in an endless loop - Grammar pushed the same rule without advancing`),c=c.pop(),g(c,_),void(v=!0)}else{let i=o;if(r.DebugFlags.InDebugMode&&console.log(` matched `+i.debugName+` - `+i.debugMatchRegExp),f(e,t,n,c,d,p,i.captures,u),g(c,u[0].end),c=c.pop(),!h)return r.DebugFlags.InDebugMode&&console.error(`[4] - Grammar is in an endless loop - Grammar is not advancing, nor is it pushing/popping`),c=c.safePop(),g(c,_),void(v=!0)}}u[0].end>i&&(i=u[0].end,n=!1)}}function l(e,t,n,i,a){return r.UseOnigurumaFindOptions?{ruleScanner:e.compile(t,n),findOptions:d(i,a)}:{ruleScanner:e.compileAG(t,n,i,a),findOptions:0}}function u(e,t,n,i,a){return r.UseOnigurumaFindOptions?{ruleScanner:e.compileWhile(t,n),findOptions:d(i,a)}:{ruleScanner:e.compileWhileAG(t,n,i,a),findOptions:0}}function d(e,t){let n=0;return e||(n|=1),t||(n|=4),n}function f(e,t,n,r,a,o,s,l){let u=(e,t)=>{a.produceFromScopes(e,t),o.produceFromScopes(e,t)},d=(e,t)=>{a.produce(e,t),o.produce(e,t)};if(s.length===0)return;let f=t.content,m=Math.min(s.length,l.length),h=[],g=l[0].end;for(let t=0;t<m;t++){let m=s[t];if(m===null)continue;let _=l[t];if(_.length===0)continue;if(_.start>g)break;for(;h.length>0&&h[h.length-1].endPos<=_.start;)u(h[h.length-1].scopes,h[h.length-1].endPos),h.pop();if(h.length>0?u(h[h.length-1].scopes,_.start):d(r,_.start),m.retokenizeCapturedWithRuleId){let t=m.getName(f,l),s=r.contentNameScopesList.pushAttributed(t,e),u=m.getContentName(f,l),d=s.pushAttributed(u,e),p=r.push(m.retokenizeCapturedWithRuleId,_.start,-1,!1,null,s,d),h=e.createOnigString(f.substring(0,_.end));c(e,h,n&&_.start===0,_.start,p,a,o,!1,0),i.disposeOnigString(h);continue}let v=m.getName(f,l);if(v!==null){let t=(h.length>0?h[h.length-1].scopes:r.contentNameScopesList).pushAttributed(v,e);h.push(new p(t,_.end))}}for(;h.length>0;)u(h[h.length-1].scopes,h[h.length-1].endPos),h.pop()}t._tokenizeString=c;class p{constructor(e,t){this.scopes=e,this.endPos=t}}t.LocalStackElement=p},726:(e,t)=>{function n(e,t){throw Error(`Near offset `+e.pos+`: `+t+` ~~~`+e.source.substr(e.pos,50)+`~~~`)}Object.defineProperty(t,"__esModule",{value:!0}),t.parseJSON=void 0,t.parseJSON=function(e,t,o){let s=new r(e),c=new i,l=0,u=null,d=[],f=[];function p(){d.push(l),f.push(u)}function m(){l=d.pop(),u=f.pop()}function h(e){n(s,e)}for(;a(s,c);){if(l===0){if(u!==null&&h(`too many constructs in root`),c.type===3){u={},o&&(u.$vscodeTextmateLocation=c.toLocation(t)),p(),l=1;continue}if(c.type===2){u=[],p(),l=4;continue}h(`unexpected token in root`)}if(l===2){if(c.type===5){m();continue}if(c.type===7){l=3;continue}h(`expected , or }`)}if(l===1||l===3){if(l===1&&c.type===5){m();continue}if(c.type===1){let e=c.value;if(a(s,c)&&c.type===6||h(`expected colon`),a(s,c)||h(`expected value`),l=2,c.type===1){u[e]=c.value;continue}if(c.type===8){u[e]=null;continue}if(c.type===9){u[e]=!0;continue}if(c.type===10){u[e]=!1;continue}if(c.type===11){u[e]=parseFloat(c.value);continue}if(c.type===2){let t=[];u[e]=t,p(),l=4,u=t;continue}if(c.type===3){let n={};o&&(n.$vscodeTextmateLocation=c.toLocation(t)),u[e]=n,p(),l=1,u=n;continue}}h(`unexpected token in dict`)}if(l===5){if(c.type===4){m();continue}if(c.type===7){l=6;continue}h(`expected , or ]`)}if(l===4||l===6){if(l===4&&c.type===4){m();continue}if(l=5,c.type===1){u.push(c.value);continue}if(c.type===8){u.push(null);continue}if(c.type===9){u.push(!0);continue}if(c.type===10){u.push(!1);continue}if(c.type===11){u.push(parseFloat(c.value));continue}if(c.type===2){let e=[];u.push(e),p(),l=4,u=e;continue}if(c.type===3){let e={};o&&(e.$vscodeTextmateLocation=c.toLocation(t)),u.push(e),p(),l=1,u=e;continue}h(`unexpected token in array`)}h(`unknown state`)}return f.length!==0&&h(`unclosed constructs`),u};class r{constructor(e){this.source=e,this.pos=0,this.len=e.length,this.line=1,this.char=0}}class i{constructor(){this.value=null,this.type=0,this.offset=-1,this.len=-1,this.line=-1,this.char=-1}toLocation(e){return{filename:e,line:this.line,char:this.char}}}function a(e,t){t.value=null,t.type=0,t.offset=-1,t.len=-1,t.line=-1,t.char=-1;let r,i=e.source,a=e.pos,o=e.len,s=e.line,c=e.char;for(;;){if(a>=o)return!1;if(r=i.charCodeAt(a),r!==32&&r!==9&&r!==13){if(r!==10)break;a++,s++,c=0}else a++,c++}if(t.offset=a,t.line=s,t.char=c,r===34){for(t.type=1,a++,c++;;){if(a>=o)return!1;if(r=i.charCodeAt(a),a++,c++,r!==92){if(r===34)break}else a++,c++}t.value=i.substring(t.offset+1,a-1).replace(/\\u([0-9A-Fa-f]{4})/g,((e,t)=>String.fromCodePoint(parseInt(t,16)))).replace(/\\(.)/g,((t,r)=>{switch(r){case`"`:return`"`;case`\\`:return`\\`;case`/`:return`/`;case`b`:return`\b`;case`f`:return`\f`;case`n`:return`
3
+ `;case`r`:return`\r`;case`t`:return` `;default:n(e,`invalid escape sequence`)}throw Error(`unreachable`)}))}else if(r===91)t.type=2,a++,c++;else if(r===123)t.type=3,a++,c++;else if(r===93)t.type=4,a++,c++;else if(r===125)t.type=5,a++,c++;else if(r===58)t.type=6,a++,c++;else if(r===44)t.type=7,a++,c++;else if(r===110){if(t.type=8,a++,c++,r=i.charCodeAt(a),r!==117||(a++,c++,r=i.charCodeAt(a),r!==108)||(a++,c++,r=i.charCodeAt(a),r!==108))return!1;a++,c++}else if(r===116){if(t.type=9,a++,c++,r=i.charCodeAt(a),r!==114||(a++,c++,r=i.charCodeAt(a),r!==117)||(a++,c++,r=i.charCodeAt(a),r!==101))return!1;a++,c++}else if(r===102){if(t.type=10,a++,c++,r=i.charCodeAt(a),r!==97||(a++,c++,r=i.charCodeAt(a),r!==108)||(a++,c++,r=i.charCodeAt(a),r!==115)||(a++,c++,r=i.charCodeAt(a),r!==101))return!1;a++,c++}else for(t.type=11;;){if(a>=o)return!1;if(r=i.charCodeAt(a),!(r===46||r>=48&&r<=57||r===101||r===69||r===45||r===43))break;a++,c++}return t.len=a-t.offset,t.value===null&&(t.value=i.substr(t.offset,t.len)),e.pos=a,e.line=s,e.char=c,!0}},625:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)n==="default"||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.applyStateStackDiff=t.diffStateStacksRefEq=t.parseRawGrammar=t.INITIAL=t.Registry=void 0;let a=n(752),o=n(150),s=n(583),c=n(63),l=n(784),u=n(151);Object.defineProperty(t,"applyStateStackDiff",{enumerable:!0,get:function(){return u.applyStateStackDiff}}),Object.defineProperty(t,"diffStateStacksRefEq",{enumerable:!0,get:function(){return u.diffStateStacksRefEq}}),i(n(810),t),t.Registry=class{constructor(e){this._options=e,this._syncRegistry=new s.SyncRegistry(c.Theme.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(c.Theme.createFromRawTheme(e,t))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,t,n){return this.loadGrammarWithConfiguration(e,t,{embeddedLanguages:n})}loadGrammarWithConfiguration(e,t,n){return this._loadGrammar(e,t,n.embeddedLanguages,n.tokenTypes,new a.BalancedBracketSelectors(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}async _loadGrammar(e,t,n,r,i){let a=new l.ScopeDependencyProcessor(this._syncRegistry,e);for(;a.Q.length>0;)await Promise.all(a.Q.map((e=>this._loadSingleGrammar(e.scopeName)))),a.processQueue();return this._grammarForScopeName(e,t,n,r,i)}async _loadSingleGrammar(e){return this._ensureGrammarCache.has(e)||this._ensureGrammarCache.set(e,this._doLoadSingleGrammar(e)),this._ensureGrammarCache.get(e)}async _doLoadSingleGrammar(e){let t=await this._options.loadGrammar(e);if(t){let n=typeof this._options.getInjections==`function`?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(t,n)}}async addGrammar(e,t=[],n=0,r=null){return this._syncRegistry.addGrammar(e,t),await this._grammarForScopeName(e.scopeName,n,r)}_grammarForScopeName(e,t=0,n=null,r=null,i=null){return this._syncRegistry.grammarForScopeName(e,t,n,r,i)}},t.INITIAL=a.StateStackImpl.NULL,t.parseRawGrammar=o.parseRawGrammar},916:(e,t)=>{function n(e){return!!e&&!!e.match(/[\w\.:]+/)}Object.defineProperty(t,"__esModule",{value:!0}),t.createMatchers=void 0,t.createMatchers=function(e,t){let r=[],i=function(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;let r=n[0];return n=t.exec(e),r}}}(e),a=i.next();for(;a!==null;){let e=0;if(a.length===2&&a.charAt(1)===`:`){switch(a.charAt(0)){case`R`:e=1;break;case`L`:e=-1;break;default:console.log(`Unknown priority ${a} in scope selector`)}a=i.next()}let t=s();if(r.push({matcher:t,priority:e}),a!==`,`)break;a=i.next()}return r;function o(){if(a===`-`){a=i.next();let e=o();return t=>!!e&&!e(t)}if(a===`(`){a=i.next();let e=function(){let e=[],t=s();for(;t&&(e.push(t),a===`|`||a===`,`);){do a=i.next();while(a===`|`||a===`,`);t=s()}return t=>e.some((e=>e(t)))}();return a===`)`&&(a=i.next()),e}if(n(a)){let e=[];do e.push(a),a=i.next();while(n(a));return n=>t(e,n)}return null}function s(){let e=[],t=o();for(;t;)e.push(t),t=o();return t=>e.every((e=>e(t)))}}},810:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.disposeOnigString=void 0,t.disposeOnigString=function(e){typeof e.dispose==`function`&&e.dispose()}},150:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseRawGrammar=void 0;let r=n(578),i=n(185),a=n(726);t.parseRawGrammar=function(e,t=null){return t!==null&&/\.json$/.test(t)?(n=e,o=t,i.DebugFlags.InDebugMode?a.parseJSON(n,o,!0):JSON.parse(n)):function(e,t){return i.DebugFlags.InDebugMode?r.parseWithLocation(e,t,`$vscodeTextmateLocation`):r.parsePLIST(e)}(e,t);var n,o}},578:(e,t)=>{function n(e,t,n){let r=e.length,i=0,a=1,o=0;function s(t){if(n===null)i+=t;else for(;t>0;)e.charCodeAt(i)===10?(i++,a++,o=0):(i++,o++),t--}function c(e){n===null?i=e:s(e-i)}function l(){for(;i<r;){let t=e.charCodeAt(i);if(t!==32&&t!==9&&t!==13&&t!==10)break;s(1)}}function u(t){return e.substr(i,t.length)===t&&(s(t.length),!0)}function d(t){let n=e.indexOf(t,i);c(n===-1?r:n+t.length)}function f(t){let n=e.indexOf(t,i);if(n!==-1){let r=e.substring(i,n);return c(n+t.length),r}{let t=e.substr(i);return c(r),t}}r>0&&e.charCodeAt(0)===65279&&(i=1);let p=0,m=null,h=[],g=[],_=null;function v(e,t){h.push(p),g.push(m),p=e,m=t}function y(){if(h.length===0)return b(`illegal state stack`);p=h.pop(),m=g.pop()}function b(t){throw Error(`Near offset `+i+`: `+t+` ~~~`+e.substr(i,50)+`~~~`)}let x=function(){if(_===null)return b(`missing <key>`);let e={};n!==null&&(e[n]={filename:t,line:a,char:o}),m[_]=e,_=null,v(1,e)},S=function(){if(_===null)return b(`missing <key>`);let e=[];m[_]=e,_=null,v(2,e)},C=function(){let e={};n!==null&&(e[n]={filename:t,line:a,char:o}),m.push(e),v(1,e)},w=function(){let e=[];m.push(e),v(2,e)};function T(){if(p!==1)return b(`unexpected </dict>`);y()}function E(){return p===1||p!==2?b(`unexpected </array>`):void y()}function D(e){if(p===1){if(_===null)return b(`missing <key>`);m[_]=e,_=null}else p===2?m.push(e):m=e}function O(e){if(isNaN(e))return b(`cannot parse float`);if(p===1){if(_===null)return b(`missing <key>`);m[_]=e,_=null}else p===2?m.push(e):m=e}function k(e){if(isNaN(e))return b(`cannot parse integer`);if(p===1){if(_===null)return b(`missing <key>`);m[_]=e,_=null}else p===2?m.push(e):m=e}function A(e){if(p===1){if(_===null)return b(`missing <key>`);m[_]=e,_=null}else p===2?m.push(e):m=e}function j(e){if(p===1){if(_===null)return b(`missing <key>`);m[_]=e,_=null}else p===2?m.push(e):m=e}function M(e){if(p===1){if(_===null)return b(`missing <key>`);m[_]=e,_=null}else p===2?m.push(e):m=e}function N(){let e=f(`>`),t=!1;return e.charCodeAt(e.length-1)===47&&(t=!0,e=e.substring(0,e.length-1)),{name:e.trim(),isClosed:t}}function P(e){if(e.isClosed)return``;let t=f(`</`);return d(`>`),t.replace(/&#([0-9]+);/g,(function(e,t){return String.fromCodePoint(parseInt(t,10))})).replace(/&#x([0-9a-f]+);/g,(function(e,t){return String.fromCodePoint(parseInt(t,16))})).replace(/&amp;|&lt;|&gt;|&quot;|&apos;/g,(function(e){switch(e){case`&amp;`:return`&`;case`&lt;`:return`<`;case`&gt;`:return`>`;case`&quot;`:return`"`;case`&apos;`:return`'`}return e}))}for(;i<r&&(l(),!(i>=r));){let c=e.charCodeAt(i);if(s(1),c!==60)return b(`expected <`);if(i>=r)return b(`unexpected end of input`);let f=e.charCodeAt(i);if(f===63){s(1),d(`?>`);continue}if(f===33){if(s(1),u(`--`)){d(`-->`);continue}d(`>`);continue}if(f===47){if(s(1),l(),u(`plist`)){d(`>`);continue}if(u(`dict`)){d(`>`),T();continue}if(u(`array`)){d(`>`),E();continue}return b(`unexpected closed tag`)}let h=N();switch(h.name){case`dict`:p===1?x():p===2?C():(m={},n!==null&&(m[n]={filename:t,line:a,char:o}),v(1,m)),h.isClosed&&T();continue;case`array`:p===1?S():p===2?w():(m=[],v(2,m)),h.isClosed&&E();continue;case`key`:F=P(h),p===1?_===null?_=F:b(`too many <key>`):b(`unexpected <key>`);continue;case`string`:D(P(h));continue;case`real`:O(parseFloat(P(h)));continue;case`integer`:k(parseInt(P(h),10));continue;case`date`:A(new Date(P(h)));continue;case`data`:j(P(h));continue;case`true`:P(h),M(!0);continue;case`false`:P(h),M(!1);continue}if(!/^plist/.test(h.name))return b(`unexpected opened tag `+h.name)}var F;return m}Object.defineProperty(t,"__esModule",{value:!0}),t.parsePLIST=t.parseWithLocation=void 0,t.parseWithLocation=function(e,t,r){return n(e,t,r)},t.parsePLIST=function(e){return n(e,null,null)}},583:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SyncRegistry=void 0;let r=n(752);t.SyncRegistry=class{constructor(e,t){this._onigLibPromise=t,this._grammars=new Map,this._rawGrammars=new Map,this._injectionGrammars=new Map,this._theme=e}dispose(){for(let e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}async grammarForScopeName(e,t,n,i,a){if(!this._grammars.has(e)){let o=this._rawGrammars.get(e);if(!o)return null;this._grammars.set(e,r.createGrammar(e,o,t,n,i,a,this,await this._onigLibPromise))}return this._grammars.get(e)}}},666:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CompiledRule=t.RegExpSourceList=t.RegExpSource=t.RuleFactory=t.BeginWhileRule=t.BeginEndRule=t.IncludeOnlyRule=t.MatchRule=t.CaptureRule=t.Rule=t.ruleIdToNumber=t.ruleIdFromNumber=t.whileRuleId=t.endRuleId=void 0;let r=n(807),i=n(784),a=/\\(\d+)/,o=/\\(\d+)/g;t.endRuleId=-1,t.whileRuleId=-2,t.ruleIdFromNumber=function(e){return e},t.ruleIdToNumber=function(e){return e};class s{constructor(e,t,n,i){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=r.RegexSource.hasCaptures(this._name),this._contentName=i||null,this._contentNameIsCapturing=r.RegexSource.hasCaptures(this._contentName)}get debugName(){let e=this.$location?`${r.basename(this.$location.filename)}:${this.$location.line}`:`unknown`;return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return this._nameIsCapturing&&this._name!==null&&e!==null&&t!==null?r.RegexSource.replaceCaptures(this._name,e,t):this._name}getContentName(e,t){return this._contentNameIsCapturing&&this._contentName!==null?r.RegexSource.replaceCaptures(this._contentName,e,t):this._contentName}}t.Rule=s;class c extends s{constructor(e,t,n,r,i){super(e,t,n,r),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(e,t){throw Error(`Not supported!`)}compile(e,t){throw Error(`Not supported!`)}compileAG(e,t,n,r){throw Error(`Not supported!`)}}t.CaptureRule=c;class l extends s{constructor(e,t,n,r,i){super(e,t,n,null),this._match=new m(r,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new h,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}}t.MatchRule=l;class u extends s{constructor(e,t,n,r,i){super(e,t,n,r),this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}collectPatterns(e,t){for(let n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new h,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}}t.IncludeOnlyRule=u;class d extends s{constructor(e,t,n,r,i,a,o,s,c,l){super(e,t,n,r),this._begin=new m(i,this.id),this.beginCaptures=a,this._end=new m(o||`￿`,-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=s,this.applyEndPatternLast=c||!1,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new h;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}}t.BeginEndRule=d;class f extends s{constructor(e,n,r,i,a,o,s,c,l){super(e,n,r,i),this._begin=new m(a,this.id),this.beginCaptures=o,this.whileCaptures=c,this._while=new m(s,t.whileRuleId),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(),null),this._cachedCompiledWhilePatterns&&=(this._cachedCompiledWhilePatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new h;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new h,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||`￿`),this._cachedCompiledWhilePatterns}}t.BeginWhileRule=f;class p{static createCaptureRule(e,t,n,r,i){return e.registerRule((e=>new c(t,e,n,r,i)))}static getCompiledRuleId(e,t,n){return e.id||t.registerRule((i=>{if(e.id=i,e.match)return new l(e.$vscodeTextmateLocation,e.id,e.name,e.match,p._compileCaptures(e.captures,t,n));if(e.begin===void 0){e.repository&&(n=r.mergeObjects({},n,e.repository));let i=e.patterns;return i===void 0&&e.include&&(i=[{include:e.include}]),new u(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,p._compilePatterns(i,t,n))}return e.while?new f(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,p._compileCaptures(e.beginCaptures||e.captures,t,n),e.while,p._compileCaptures(e.whileCaptures||e.captures,t,n),p._compilePatterns(e.patterns,t,n)):new d(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,p._compileCaptures(e.beginCaptures||e.captures,t,n),e.end,p._compileCaptures(e.endCaptures||e.captures,t,n),e.applyEndPatternLast,p._compilePatterns(e.patterns,t,n))})),e.id}static _compileCaptures(e,t,n){let r=[];if(e){let i=0;for(let t in e){if(t===`$vscodeTextmateLocation`)continue;let e=parseInt(t,10);e>i&&(i=e)}for(let e=0;e<=i;e++)r[e]=null;for(let i in e){if(i===`$vscodeTextmateLocation`)continue;let a=parseInt(i,10),o=0;e[i].patterns&&(o=p.getCompiledRuleId(e[i],t,n)),r[a]=p.createCaptureRule(t,e[i].$vscodeTextmateLocation,e[i].name,e[i].contentName,o)}}return r}static _compilePatterns(e,t,n){let r=[];if(e)for(let a=0,o=e.length;a<o;a++){let o=e[a],s=-1;if(o.include){let e=i.parseInclude(o.include);switch(e.kind){case 0:case 1:s=p.getCompiledRuleId(n[o.include],t,n);break;case 2:let r=n[e.ruleName];r&&(s=p.getCompiledRuleId(r,t,n));break;case 3:case 4:let i=e.scopeName,a=e.kind===4?e.ruleName:null,c=t.getExternalGrammar(i,n);if(c)if(a){let e=c.repository[a];e&&(s=p.getCompiledRuleId(e,t,c.repository))}else s=p.getCompiledRuleId(c.repository.$self,t,c.repository)}}else s=p.getCompiledRuleId(o,t,n);if(s!==-1){let e=t.getRule(s),n=!1;if((e instanceof u||e instanceof d||e instanceof f)&&e.hasMissingPatterns&&e.patterns.length===0&&(n=!0),n)continue;r.push(s)}}return{patterns:r,hasMissingPatterns:(e?e.length:0)!==r.length}}}t.RuleFactory=p;class m{constructor(e,t){if(e){let t=e.length,n=0,r=[],i=!1;for(let a=0;a<t;a++)if(e.charAt(a)===`\\`&&a+1<t){let t=e.charAt(a+1);t===`z`?(r.push(e.substring(n,a)),r.push(`$(?!\\n)(?<!\\n)`),n=a+2):t!==`A`&&t!==`G`||(i=!0),a++}this.hasAnchor=i,n===0?this.source=e:(r.push(e.substring(n,t)),this.source=r.join(``))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=t,this.hasBackReferences=a.test(this.source)}clone(){return new m(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,t){let n=t.map((t=>e.substring(t.start,t.end)));return o.lastIndex=0,this.source.replace(o,((e,t)=>r.escapeRegExpCharacters(n[parseInt(t,10)]||``)))}_buildAnchorCache(){let e,t,n,r,i=[],a=[],o=[],s=[];for(e=0,t=this.source.length;e<t;e++)n=this.source.charAt(e),i[e]=n,a[e]=n,o[e]=n,s[e]=n,n===`\\`&&e+1<t&&(r=this.source.charAt(e+1),r===`A`?(i[e+1]=`￿`,a[e+1]=`￿`,o[e+1]=`A`,s[e+1]=`A`):r===`G`?(i[e+1]=`￿`,a[e+1]=`G`,o[e+1]=`￿`,s[e+1]=`G`):(i[e+1]=r,a[e+1]=r,o[e+1]=r,s[e+1]=r),e++);return{A0_G0:i.join(``),A0_G1:a.join(``),A1_G0:o.join(``),A1_G1:s.join(``)}}resolveAnchors(e,t){return this.hasAnchor&&this._anchorCache?e?t?this._anchorCache.A1_G1:this._anchorCache.A1_G0:t?this._anchorCache.A0_G1:this._anchorCache.A0_G0:this.source}}t.RegExpSource=m;class h{constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&=(this._cached.dispose(),null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map((e=>e.source));this._cached=new g(e,t,this._items.map((e=>e.ruleId)))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){return new g(e,this._items.map((e=>e.resolveAnchors(t,n))),this._items.map((e=>e.ruleId)))}}t.RegExpSourceList=h;class g{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}dispose(){typeof this.scanner.dispose==`function`&&this.scanner.dispose()}toString(){let e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(` - `+this.rules[t]+`: `+this.regExps[t]);return e.join(`
4
+ `)}findNextMatchSync(e,t,n){let r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}}t.CompiledRule=g},63:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ThemeTrieElement=t.ThemeTrieElementRule=t.ColorMap=t.fontStyleToString=t.ParsedThemeRule=t.parseTheme=t.StyleAttributes=t.ScopeStack=t.Theme=void 0;let r=n(807);class i{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n,this._cachedMatchRoot=new r.CachedFn((e=>this._root.match(e)))}static createFromRawTheme(e,t){return this.createFromParsedTheme(c(e),t)}static createFromParsedTheme(e,t){return function(e,t){e.sort(((e,t)=>{let n=r.strcmp(e.scope,t.scope);return n===0?(n=r.strArrCmp(e.parentScopes,t.parentScopes),n===0?e.index-t.index:n):n}));let n=0,a=`#000000`,o=`#ffffff`,c=``,l=0,d=0;for(;e.length>=1&&e[0].scope===``;){let t=e.shift();t.fontStyle!==-1&&(n=t.fontStyle),t.foreground!==null&&(a=t.foreground),t.background!==null&&(o=t.background),t.fontFamily!==null&&(c=t.fontFamily),t.fontSize!==null&&(l=t.fontSize),t.lineHeight!==null&&(d=t.lineHeight)}let m=new u(t),h=new s(n,m.getId(a),m.getId(o),c,l,d),g=new p(new f(0,null,-1,0,0,c,l,d),[]);for(let t=0,n=e.length;t<n;t++){let n=e[t];g.insert(0,n.scope,n.parentScopes,n.fontStyle,m.getId(n.foreground),m.getId(n.background),n.fontFamily,n.fontSize,n.lineHeight)}return new i(m,h,g)}(e,t)}getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;let t=e.scopeName,n=this._cachedMatchRoot.get(t).find((t=>function(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let r=t[n],i=!1;if(r===`>`){if(n===t.length-1)return!1;r=t[++n],i=!0}for(;e&&!o(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}(e.parent,t.parentScopes)));return n?new s(n.fontStyle,n.foreground,n.background,n.fontFamily,n.fontSize,n.lineHeight):null}}t.Theme=i;class a{constructor(e,t){this.parent=e,this.scopeName=t}static push(e,t){for(let n of t)e=new a(e,n);return e}static from(...e){let t=null;for(let n=0;n<e.length;n++)t=new a(t,e[n]);return t}push(e){return new a(this,e)}getSegments(){let e=this,t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join(` `)}extends(e){return this===e||this.parent!==null&&this.parent.extends(e)}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push(n.scopeName),n=n.parent;return n===e?t.reverse():void 0}}function o(e,t){return t===e||e.startsWith(t)&&e[t.length]===`.`}t.ScopeStack=a;class s{constructor(e,t,n,r,i,a){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n,this.fontFamily=r,this.fontSize=i,this.lineHeight=a}}function c(e){if(!e||!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],i=0;for(let e=0,a=t.length;e<a;e++){let a,o=t[e];if(!o.settings)continue;if(typeof o.scope==`string`){let e=o.scope;e=e.replace(/^[,]+/,``),e=e.replace(/[,]+$/,``),a=e.split(`,`)}else a=Array.isArray(o.scope)?o.scope:[``];let s=-1;if(typeof o.settings.fontStyle==`string`){s=0;let e=o.settings.fontStyle.split(` `);for(let t=0,n=e.length;t<n;t++)switch(e[t]){case`italic`:s|=1;break;case`bold`:s|=2;break;case`underline`:s|=4;break;case`strikethrough`:s|=8}}let c=null;typeof o.settings.foreground==`string`&&r.isValidHexColor(o.settings.foreground)&&(c=o.settings.foreground);let u=null;typeof o.settings.background==`string`&&r.isValidHexColor(o.settings.background)&&(u=o.settings.background);let d=``;typeof o.settings.fontFamily==`string`&&(d=o.settings.fontFamily);let f=0;typeof o.settings.fontSize==`number`&&(f=o.settings.fontSize);let p=0;typeof o.settings.lineHeight==`number`&&(p=o.settings.lineHeight);for(let t=0,r=a.length;t<r;t++){let r=a[t].trim().split(` `),o=r[r.length-1],m=null;r.length>1&&(m=r.slice(0,r.length-1),m.reverse()),n[i++]=new l(o,m,e,s,c,u,d,f,p)}}return n}t.StyleAttributes=s,t.parseTheme=c;class l{constructor(e,t,n,r,i,a,o,s,c){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=i,this.background=a,this.fontFamily=o,this.fontSize=s,this.lineHeight=c}}t.ParsedThemeRule=l,t.fontStyleToString=function(e){if(e===-1)return`not set`;let t=``;return 1&e&&(t+=`italic `),2&e&&(t+=`bold `),4&e&&(t+=`underline `),8&e&&(t+=`strikethrough `),t===``&&(t=`none`),t.trim()};class u{constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}}t.ColorMap=u;let d=Object.freeze([]);class f{constructor(e,t,n,r,i,a,o,s){this.scopeDepth=e,this.parentScopes=t||d,this.fontStyle=n,this.foreground=r,this.background=i,this.fontFamily=a,this.fontSize=o,this.lineHeight=s}clone(){return new f(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background,this.fontFamily,this.fontSize,this.lineHeight)}static cloneArr(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=e[n].clone();return t}acceptOverwrite(e,t,n,r,i,a,o){this.scopeDepth>e?console.log(`how did this happen?`):this.scopeDepth=e,t!==-1&&(this.fontStyle=t),n!==0&&(this.foreground=n),r!==0&&(this.background=r),i!==``&&(this.fontFamily=i),a!==0&&(this.fontSize=a),o!==0&&(this.lineHeight=o)}}t.ThemeTrieElementRule=f;class p{constructor(e,t=[],n={}){this._mainRule=e,this._children=n,this._rulesWithParentScopes=t}static _cmpBySpecificity(e,t){if(e.scopeDepth!==t.scopeDepth)return t.scopeDepth-e.scopeDepth;let n=0,r=0;for(;e.parentScopes[n]===`>`&&n++,t.parentScopes[r]===`>`&&r++,!(n>=e.parentScopes.length||r>=t.parentScopes.length);){let i=t.parentScopes[r].length-e.parentScopes[n].length;if(i!==0)return i;n++,r++}return t.parentScopes.length-e.parentScopes.length}match(e){if(e!==``){let t,n,r=e.indexOf(`.`);if(r===-1?(t=e,n=``):(t=e.substring(0,r),n=e.substring(r+1)),this._children.hasOwnProperty(t))return this._children[t].match(n)}let t=this._rulesWithParentScopes.concat(this._mainRule);return t.sort(p._cmpBySpecificity),t}insert(e,t,n,r,i,a,o,s,c){if(t===``)return void this._doInsertHere(e,n,r,i,a,o,s,c);let l,u,d,m=t.indexOf(`.`);m===-1?(l=t,u=``):(l=t.substring(0,m),u=t.substring(m+1)),this._children.hasOwnProperty(l)?d=this._children[l]:(d=new p(this._mainRule.clone(),f.cloneArr(this._rulesWithParentScopes)),this._children[l]=d),d.insert(e+1,u,n,r,i,a,o,s,c)}_doInsertHere(e,t,n,i,a,o,s,c){if(t!==null){for(let l=0,u=this._rulesWithParentScopes.length;l<u;l++){let u=this._rulesWithParentScopes[l];if(r.strArrCmp(u.parentScopes,t)===0)return void u.acceptOverwrite(e,n,i,a,o,s,c)}n===-1&&(n=this._mainRule.fontStyle),i===0&&(i=this._mainRule.foreground),a===0&&(a=this._mainRule.background),o===``&&(o=this._mainRule.fontFamily),s===0&&(s=this._mainRule.fontSize),c===0&&(c=this._mainRule.lineHeight),this._rulesWithParentScopes.push(new f(e,t,n,i,a,o,s,c))}else this._mainRule.acceptOverwrite(e,n,i,a,o,s,c)}}t.ThemeTrieElement=p},807:(e,t)=>{function n(e){return Array.isArray(e)?function(e){let t=[];for(let r=0,i=e.length;r<i;r++)t[r]=n(e[r]);return t}(e):typeof e==`object`?function(e){let t={};for(let r in e)t[r]=n(e[r]);return t}(e):e}Object.defineProperty(t,"__esModule",{value:!0}),t.containsRTL=t.performanceNow=t.CachedFn=t.escapeRegExpCharacters=t.isValidHexColor=t.strArrCmp=t.strcmp=t.RegexSource=t.basename=t.mergeObjects=t.clone=void 0,t.clone=function(e){return n(e)},t.mergeObjects=function(e,...t){return t.forEach((t=>{for(let n in t)e[n]=t[n]})),e},t.basename=function e(t){let n=~t.lastIndexOf(`/`)||~t.lastIndexOf(`\\`);return n===0?t:~n==t.length-1?e(t.substring(0,t.length-1)):t.substr(1+~n)};let r,i=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g;function a(e,t){return e<t?-1:+(e>t)}t.RegexSource=class{static hasCaptures(e){return e!==null&&(i.lastIndex=0,i.test(e))}static replaceCaptures(e,t,n){return e.replace(i,((e,r,i,a)=>{let o=n[parseInt(r||i,10)];if(!o)return e;{let e=t.substring(o.start,o.end);for(;e[0]===`.`;)e=e.substring(1);switch(a){case`downcase`:return e.toLowerCase();case`upcase`:return e.toUpperCase();default:return e}}}))}},t.strcmp=a,t.strArrCmp=function(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let r=0;r<n;r++){let n=a(e[r],t[r]);if(n!==0)return n}return 0}return n-r},t.isValidHexColor=function(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))},t.escapeRegExpCharacters=function(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,`\\$&`)},t.CachedFn=class{constructor(e){this.fn=e,this.cache=new Map}get(e){if(this.cache.has(e))return this.cache.get(e);let t=this.fn(e);return this.cache.set(e,t),t}},t.performanceNow=typeof performance>`u`?function(){return Date.now()}:function(){return performance.now()},t.containsRTL=function(e){return r||=/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA\u07FE-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u088E\u08A0-\u08C9\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDC7\uFDF0-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE35\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDD23\uDE80-\uDEA9\uDEAD-\uDF45\uDF51-\uDF81\uDF86-\uDFF6]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD4B-\uDFFF]|\uD83B[\uDC00-\uDEBB])/,r.test(e)}}},t={};return function n(r){var i=t[r];if(i!==void 0)return i.exports;var a=t[r]={exports:{}};return e[r].call(a.exports,a,a.exports,n),a.exports}(625)})()))})(t),t.exports)}function a(e,t){return t.forEach(function(t){t&&typeof t!=`string`&&!Array.isArray(t)&&Object.keys(t).forEach(function(n){if(n!=="default"&&!(n in e)){var r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:function(){return t[n]}})}})}),Object.freeze(e)}var o=i(),s=a({__proto__:null,default:e(o)},[o]);export{s as main};
@@ -1 +1 @@
1
- import{t as e}from"./_commonjsHelpers-qcUHfnrg.js";var t={exports:{}},n=t.exports,r;function i(){return r?t.exports:(r=1,(function(e,t){(function(t,n){e.exports=n()})(n,(()=>{return e={770:function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,`__esModule`,{value:!0}),t.setDefaultDebugCall=t.createOnigScanner=t.createOnigString=t.loadWASM=t.OnigScanner=t.OnigString=void 0;let i=r(n(418)),a=null,o=!1;class s{static _utf8ByteLength(e){let t=0;for(let n=0,r=e.length;n<r;n++){let i=e.charCodeAt(n),a=i,o=!1;if(i>=55296&&i<=56319&&n+1<r){let t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(a=65536+(i-55296<<10)|t-56320,o=!0)}t+=a<=127?1:a<=2047?2:a<=65535?3:4,o&&n++}return t}constructor(e){let t=e.length,n=s._utf8ByteLength(e),r=n!==t,i=r?new Uint32Array(t+1):null;r&&(i[t]=n);let a=r?new Uint32Array(n+1):null;r&&(a[n]=t);let o=new Uint8Array(n),c=0;for(let n=0;n<t;n++){let s=e.charCodeAt(n),l=s,u=!1;if(s>=55296&&s<=56319&&n+1<t){let t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(l=65536+(s-55296<<10)|t-56320,u=!0)}r&&(i[n]=c,u&&(i[n+1]=c),l<=127?a[c+0]=n:l<=2047?(a[c+0]=n,a[c+1]=n):l<=65535?(a[c+0]=n,a[c+1]=n,a[c+2]=n):(a[c+0]=n,a[c+1]=n,a[c+2]=n,a[c+3]=n)),l<=127?o[c++]=l:l<=2047?(o[c++]=192|(1984&l)>>>6,o[c++]=128|(63&l)>>>0):l<=65535?(o[c++]=224|(61440&l)>>>12,o[c++]=128|(4032&l)>>>6,o[c++]=128|(63&l)>>>0):(o[c++]=240|(1835008&l)>>>18,o[c++]=128|(258048&l)>>>12,o[c++]=128|(4032&l)>>>6,o[c++]=128|(63&l)>>>0),u&&n++}this.utf16Length=t,this.utf8Length=n,this.utf16Value=e,this.utf8Value=o,this.utf16OffsetToUtf8=i,this.utf8OffsetToUtf16=a}createString(e){let t=e._omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,t),t}}class c{constructor(e){if(this.id=++c.LAST_ID,!a)throw Error(`Must invoke loadWASM first.`);this._onigBinding=a,this.content=e;let t=new s(e);this.utf16Length=t.utf16Length,this.utf8Length=t.utf8Length,this.utf16OffsetToUtf8=t.utf16OffsetToUtf8,this.utf8OffsetToUtf16=t.utf8OffsetToUtf16,this.utf8Length<1e4&&!c._sharedPtrInUse?(c._sharedPtr||=a._omalloc(1e4),c._sharedPtrInUse=!0,a.HEAPU8.set(t.utf8Value,c._sharedPtr),this.ptr=c._sharedPtr):this.ptr=t.createString(a)}convertUtf8OffsetToUtf16(e){return this.utf8OffsetToUtf16?e<0?0:e>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[e]:e}convertUtf16OffsetToUtf8(e){return this.utf16OffsetToUtf8?e<0?0:e>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[e]:e}dispose(){this.ptr===c._sharedPtr?c._sharedPtrInUse=!1:this._onigBinding._ofree(this.ptr)}}t.OnigString=c,c.LAST_ID=0,c._sharedPtr=0,c._sharedPtrInUse=!1;class l{constructor(e){if(!a)throw Error(`Must invoke loadWASM first.`);let t=[],n=[];for(let r=0,i=e.length;r<i;r++){let i=new s(e[r]);t[r]=i.createString(a),n[r]=i.utf8Length}let r=a._omalloc(4*e.length);a.HEAPU32.set(t,r/4);let i=a._omalloc(4*e.length);a.HEAPU32.set(n,i/4);let o=a._createOnigScanner(r,i,e.length);for(let n=0,r=e.length;n<r;n++)a._ofree(t[n]);a._ofree(i),a._ofree(r),o===0&&function(e){throw Error(e.UTF8ToString(e._getLastOnigError()))}(a),this._onigBinding=a,this._ptr=o}dispose(){this._onigBinding._freeOnigScanner(this._ptr)}findNextMatchSync(e,t,n){let r=o,i=0;if(typeof n==`number`?(8&n&&(r=!0),i=n):typeof n==`boolean`&&(r=n),typeof e==`string`){e=new c(e);let n=this._findNextMatchSync(e,t,r,i);return e.dispose(),n}return this._findNextMatchSync(e,t,r,i)}_findNextMatchSync(e,t,n,r){let i=this._onigBinding,a;if(a=n?i._findNextOnigScannerMatchDbg(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(t),r):i._findNextOnigScannerMatch(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(t),r),a===0)return null;let o=i.HEAPU32,s=a/4,c=o[s++],l=o[s++],u=[];for(let t=0;t<l;t++){let n=e.convertUtf8OffsetToUtf16(o[s++]),r=e.convertUtf8OffsetToUtf16(o[s++]);u[t]={start:n,end:r,length:r-n}}return{index:c,captureIndices:u}}}t.OnigScanner=l;let u=!1,d=null;t.loadWASM=function(e){if(u)return d;let t,n,r,o;if(u=!0,function(e){return typeof e.instantiator==`function`}(e))t=e.instantiator,n=e.print;else{let r;(function(e){return e.data!==void 0})(e)?(r=e.data,n=e.print):r=e,t=function(e){return typeof Response<`u`&&e instanceof Response}(r)?typeof WebAssembly.instantiateStreaming==`function`?function(e){return t=>WebAssembly.instantiateStreaming(e,t)}(r):function(e){return async t=>{let n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}(r):function(e){return t=>WebAssembly.instantiate(e,t)}(r)}return d=new Promise(((e,t)=>{r=e,o=t})),function(e,t,n,r){(0,i.default)({print:t,instantiateWasm:(t,n)=>{if(typeof performance>`u`){let e=()=>Date.now();t.env.emscripten_get_now=e,t.wasi_snapshot_preview1.emscripten_get_now=e}return e(t).then((e=>n(e.instance)),r),{}}}).then((e=>{a=e,n()}))}(t,n,r,o),d},t.createOnigString=function(e){return new c(e)},t.createOnigScanner=function(e){return new l(e)},t.setDefaultDebugCall=function(e){o=e}},418:e=>{e.exports=(function(e){var t,n,r=(e||={})===void 0?{}:e;r.ready=new Promise((function(e,r){t=e,n=r}));var i,a=Object.assign({},r),o=``;function s(e){return r.locateFile?r.locateFile(e,o):o+e}i=function(e){let t;return typeof readbuffer==`function`?new Uint8Array(readbuffer(e)):(t=read(e,`binary`),p(typeof t==`object`),t)},typeof onig_print<`u`&&(typeof console>`u`&&(console={}),console.log=onig_print,console.warn=console.error=typeof printErr<`u`?printErr:onig_print);var c,l,u=r.print||console.log.bind(console),d=r.printErr||console.warn.bind(console);Object.assign(r,a),a=null,r.wasmBinary&&(c=r.wasmBinary),typeof WebAssembly!=`object`&&P(`no native wasm support detected`);var f=!1;function p(e,t){e||P(t)}var m,h,g,_=typeof TextDecoder<`u`?new TextDecoder(`utf8`):void 0;function v(e,t,n){for(var r=t+n,i=t;e[i]&&!(i>=r);)++i;if(i-t>16&&e.buffer&&_)return _.decode(e.subarray(t,i));for(var a=``;t<i;){var o=e[t++];if(128&o){var s=63&e[t++];if((224&o)!=192){var c=63&e[t++];if((o=(240&o)==224?(15&o)<<12|s<<6|c:(7&o)<<18|s<<12|c<<6|63&e[t++])<65536)a+=String.fromCharCode(o);else{var l=o-65536;a+=String.fromCharCode(55296|l>>10,56320|1023&l)}}else a+=String.fromCharCode((31&o)<<6|s)}else a+=String.fromCharCode(o)}return a}function y(e,t){return e?v(h,e,t):``}function b(e){m=e,r.HEAP8=new Int8Array(e),r.HEAP16=new Int16Array(e),r.HEAP32=new Int32Array(e),r.HEAPU8=h=new Uint8Array(e),r.HEAPU16=new Uint16Array(e),r.HEAPU32=g=new Uint32Array(e),r.HEAPF32=new Float32Array(e),r.HEAPF64=new Float64Array(e)}var x=[],S=[],C=[];function w(){if(r.preRun)for(typeof r.preRun==`function`&&(r.preRun=[r.preRun]);r.preRun.length;)D(r.preRun.shift());H(x)}function T(){H(S)}function E(){if(r.postRun)for(typeof r.postRun==`function`&&(r.postRun=[r.postRun]);r.postRun.length;)k(r.postRun.shift());H(C)}function D(e){x.unshift(e)}function O(e){S.unshift(e)}function k(e){C.unshift(e)}var A=0,j=null;function M(e){A++,r.monitorRunDependencies&&r.monitorRunDependencies(A)}function N(e){if(A--,r.monitorRunDependencies&&r.monitorRunDependencies(A),A==0&&j){var t=j;j=null,t()}}function P(e){r.onAbort&&r.onAbort(e),d(e=`Aborted(`+e+`)`),f=!0,e+=`. Build with -sASSERTIONS for more info.`;var t=new WebAssembly.RuntimeError(e);throw n(t),t}var F,I,L=`data:application/octet-stream;base64,`;function R(e){return e.startsWith(L)}function z(e){try{if(e==F&&c)return new Uint8Array(c);if(i)return i(e);throw`both async and sync fetching of the wasm failed`}catch(e){P(e)}}function B(){return Promise.resolve().then((function(){return z(F)}))}function V(){var e={env:X,wasi_snapshot_preview1:X};function t(e,t){r.asm=e.exports,b((l=r.asm.memory).buffer),O(r.asm.__wasm_call_ctors),N()}function i(e){t(e.instance)}function a(t){return B().then((function(t){return WebAssembly.instantiate(t,e)})).then((function(e){return e})).then(t,(function(e){d(`failed to asynchronously prepare wasm: `+e),P(e)}))}if(M(),r.instantiateWasm)try{return r.instantiateWasm(e,t)}catch(e){d(`Module.instantiateWasm callback failed with error: `+e),n(e)}return(c||typeof WebAssembly.instantiateStreaming!=`function`||R(F)||typeof fetch!=`function`?a(i):fetch(F,{credentials:`same-origin`}).then((function(t){return WebAssembly.instantiateStreaming(t,e).then(i,(function(e){return d(`wasm streaming compile failed: `+e),d(`falling back to ArrayBuffer instantiation`),a(i)}))}))).catch(n),{}}function H(e){for(;e.length>0;)e.shift()(r)}function U(e,t,n){h.copyWithin(e,t,t+n)}function W(e){try{return l.grow(e-m.byteLength+65535>>>16),b(l.buffer),1}catch{}}function G(e){var t,n=h.length,r=2147483648;if((e>>>=0)>r)return!1;for(var i=1;i<=4;i*=2){var a=n*(1+.2/i);if(a=Math.min(a,e+100663296),W(Math.min(r,(t=Math.max(e,a))+(65536-t%65536)%65536)))return!0}return!1}R(F=`onig.wasm`)||(F=s(F)),I=typeof dateNow<`u`?dateNow:()=>performance.now();var K=[null,[],[]];function q(e,t){var n=K[e];t===0||t===10?((e===1?u:d)(v(n,0)),n.length=0):n.push(t)}function J(e,t,n,r){for(var i=0,a=0;a<n;a++){var o=g[t>>2],s=g[t+4>>2];t+=8;for(var c=0;c<s;c++)q(e,h[o+c]);i+=s}return g[r>>2]=i,0}var Y,X={emscripten_get_now:I,emscripten_memcpy_big:U,emscripten_resize_heap:G,fd_write:J};function Z(e){function n(){Y||(Y=!0,r.calledRun=!0,f||(T(),t(r),r.onRuntimeInitialized&&r.onRuntimeInitialized(),E()))}A>0||(w(),A>0||(r.setStatus?(r.setStatus(`Running...`),setTimeout((function(){setTimeout((function(){r.setStatus(``)}),1),n()}),1)):n()))}if(V(),r.___wasm_call_ctors=function(){return(r.___wasm_call_ctors=r.asm.__wasm_call_ctors).apply(null,arguments)},r.___errno_location=function(){return(r.___errno_location=r.asm.__errno_location).apply(null,arguments)},r._omalloc=function(){return(r._omalloc=r.asm.omalloc).apply(null,arguments)},r._ofree=function(){return(r._ofree=r.asm.ofree).apply(null,arguments)},r._getLastOnigError=function(){return(r._getLastOnigError=r.asm.getLastOnigError).apply(null,arguments)},r._createOnigScanner=function(){return(r._createOnigScanner=r.asm.createOnigScanner).apply(null,arguments)},r._freeOnigScanner=function(){return(r._freeOnigScanner=r.asm.freeOnigScanner).apply(null,arguments)},r._findNextOnigScannerMatch=function(){return(r._findNextOnigScannerMatch=r.asm.findNextOnigScannerMatch).apply(null,arguments)},r._findNextOnigScannerMatchDbg=function(){return(r._findNextOnigScannerMatchDbg=r.asm.findNextOnigScannerMatchDbg).apply(null,arguments)},r.stackSave=function(){return(r.stackSave=r.asm.stackSave).apply(null,arguments)},r.stackRestore=function(){return(r.stackRestore=r.asm.stackRestore).apply(null,arguments)},r.stackAlloc=function(){return(r.stackAlloc=r.asm.stackAlloc).apply(null,arguments)},r.dynCall_jiji=function(){return(r.dynCall_jiji=r.asm.dynCall_jiji).apply(null,arguments)},r.UTF8ToString=y,j=function e(){Y||Z(),Y||(j=e)},r.preInit)for(typeof r.preInit==`function`&&(r.preInit=[r.preInit]);r.preInit.length>0;)r.preInit.pop()();return Z(),e.ready})}},t={},function n(r){var i=t[r];if(i!==void 0)return i.exports;var a=t[r]={exports:{}};return e[r].call(a.exports,a,a.exports,n),a.exports}(770);var e,t}))})(t),t.exports)}function a(e,t){return t.forEach(function(t){t&&typeof t!=`string`&&!Array.isArray(t)&&Object.keys(t).forEach(function(n){if(n!==`default`&&!(n in e)){var r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:function(){return t[n]}})}})}),Object.freeze(e)}var o=i(),s=a({__proto__:null,default:e(o)},[o]);export{s as main};
1
+ import{t as e}from"./_commonjsHelpers-DMmVv2OA.js";var t={exports:{}},n=t.exports,r;function i(){return r?t.exports:(r=1,(function(e,t){(function(t,n){e.exports=n()})(n,(()=>{return e={770:function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.setDefaultDebugCall=t.createOnigScanner=t.createOnigString=t.loadWASM=t.OnigScanner=t.OnigString=void 0;let i=r(n(418)),a=null,o=!1;class s{static _utf8ByteLength(e){let t=0;for(let n=0,r=e.length;n<r;n++){let i=e.charCodeAt(n),a=i,o=!1;if(i>=55296&&i<=56319&&n+1<r){let t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(a=65536+(i-55296<<10)|t-56320,o=!0)}t+=a<=127?1:a<=2047?2:a<=65535?3:4,o&&n++}return t}constructor(e){let t=e.length,n=s._utf8ByteLength(e),r=n!==t,i=r?new Uint32Array(t+1):null;r&&(i[t]=n);let a=r?new Uint32Array(n+1):null;r&&(a[n]=t);let o=new Uint8Array(n),c=0;for(let n=0;n<t;n++){let s=e.charCodeAt(n),l=s,u=!1;if(s>=55296&&s<=56319&&n+1<t){let t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(l=65536+(s-55296<<10)|t-56320,u=!0)}r&&(i[n]=c,u&&(i[n+1]=c),l<=127?a[c+0]=n:l<=2047?(a[c+0]=n,a[c+1]=n):l<=65535?(a[c+0]=n,a[c+1]=n,a[c+2]=n):(a[c+0]=n,a[c+1]=n,a[c+2]=n,a[c+3]=n)),l<=127?o[c++]=l:l<=2047?(o[c++]=192|(1984&l)>>>6,o[c++]=128|(63&l)>>>0):l<=65535?(o[c++]=224|(61440&l)>>>12,o[c++]=128|(4032&l)>>>6,o[c++]=128|(63&l)>>>0):(o[c++]=240|(1835008&l)>>>18,o[c++]=128|(258048&l)>>>12,o[c++]=128|(4032&l)>>>6,o[c++]=128|(63&l)>>>0),u&&n++}this.utf16Length=t,this.utf8Length=n,this.utf16Value=e,this.utf8Value=o,this.utf16OffsetToUtf8=i,this.utf8OffsetToUtf16=a}createString(e){let t=e._omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,t),t}}class c{constructor(e){if(this.id=++c.LAST_ID,!a)throw Error(`Must invoke loadWASM first.`);this._onigBinding=a,this.content=e;let t=new s(e);this.utf16Length=t.utf16Length,this.utf8Length=t.utf8Length,this.utf16OffsetToUtf8=t.utf16OffsetToUtf8,this.utf8OffsetToUtf16=t.utf8OffsetToUtf16,this.utf8Length<1e4&&!c._sharedPtrInUse?(c._sharedPtr||=a._omalloc(1e4),c._sharedPtrInUse=!0,a.HEAPU8.set(t.utf8Value,c._sharedPtr),this.ptr=c._sharedPtr):this.ptr=t.createString(a)}convertUtf8OffsetToUtf16(e){return this.utf8OffsetToUtf16?e<0?0:e>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[e]:e}convertUtf16OffsetToUtf8(e){return this.utf16OffsetToUtf8?e<0?0:e>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[e]:e}dispose(){this.ptr===c._sharedPtr?c._sharedPtrInUse=!1:this._onigBinding._ofree(this.ptr)}}t.OnigString=c,c.LAST_ID=0,c._sharedPtr=0,c._sharedPtrInUse=!1;class l{constructor(e){if(!a)throw Error(`Must invoke loadWASM first.`);let t=[],n=[];for(let r=0,i=e.length;r<i;r++){let i=new s(e[r]);t[r]=i.createString(a),n[r]=i.utf8Length}let r=a._omalloc(4*e.length);a.HEAPU32.set(t,r/4);let i=a._omalloc(4*e.length);a.HEAPU32.set(n,i/4);let o=a._createOnigScanner(r,i,e.length);for(let n=0,r=e.length;n<r;n++)a._ofree(t[n]);a._ofree(i),a._ofree(r),o===0&&function(e){throw Error(e.UTF8ToString(e._getLastOnigError()))}(a),this._onigBinding=a,this._ptr=o}dispose(){this._onigBinding._freeOnigScanner(this._ptr)}findNextMatchSync(e,t,n){let r=o,i=0;if(typeof n==`number`?(8&n&&(r=!0),i=n):typeof n==`boolean`&&(r=n),typeof e==`string`){e=new c(e);let n=this._findNextMatchSync(e,t,r,i);return e.dispose(),n}return this._findNextMatchSync(e,t,r,i)}_findNextMatchSync(e,t,n,r){let i=this._onigBinding,a;if(a=n?i._findNextOnigScannerMatchDbg(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(t),r):i._findNextOnigScannerMatch(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(t),r),a===0)return null;let o=i.HEAPU32,s=a/4,c=o[s++],l=o[s++],u=[];for(let t=0;t<l;t++){let n=e.convertUtf8OffsetToUtf16(o[s++]),r=e.convertUtf8OffsetToUtf16(o[s++]);u[t]={start:n,end:r,length:r-n}}return{index:c,captureIndices:u}}}t.OnigScanner=l;let u=!1,d=null;t.loadWASM=function(e){if(u)return d;let t,n,r,o;if(u=!0,function(e){return typeof e.instantiator==`function`}(e))t=e.instantiator,n=e.print;else{let r;(function(e){return e.data!==void 0})(e)?(r=e.data,n=e.print):r=e,t=function(e){return typeof Response<`u`&&e instanceof Response}(r)?typeof WebAssembly.instantiateStreaming==`function`?function(e){return t=>WebAssembly.instantiateStreaming(e,t)}(r):function(e){return async t=>{let n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}(r):function(e){return t=>WebAssembly.instantiate(e,t)}(r)}return d=new Promise(((e,t)=>{r=e,o=t})),function(e,t,n,r){(0,i.default)({print:t,instantiateWasm:(t,n)=>{if(typeof performance>`u`){let e=()=>Date.now();t.env.emscripten_get_now=e,t.wasi_snapshot_preview1.emscripten_get_now=e}return e(t).then((e=>n(e.instance)),r),{}}}).then((e=>{a=e,n()}))}(t,n,r,o),d},t.createOnigString=function(e){return new c(e)},t.createOnigScanner=function(e){return new l(e)},t.setDefaultDebugCall=function(e){o=e}},418:e=>{e.exports=(function(e){var t,n,r=(e||={})===void 0?{}:e;r.ready=new Promise((function(e,r){t=e,n=r}));var i,a=Object.assign({},r),o=``;function s(e){return r.locateFile?r.locateFile(e,o):o+e}i=function(e){let t;return typeof readbuffer==`function`?new Uint8Array(readbuffer(e)):(t=read(e,`binary`),p(typeof t==`object`),t)},typeof onig_print<`u`&&(typeof console>`u`&&(console={}),console.log=onig_print,console.warn=console.error=typeof printErr<`u`?printErr:onig_print);var c,l,u=r.print||console.log.bind(console),d=r.printErr||console.warn.bind(console);Object.assign(r,a),a=null,r.wasmBinary&&(c=r.wasmBinary),typeof WebAssembly!=`object`&&P(`no native wasm support detected`);var f=!1;function p(e,t){e||P(t)}var m,h,g,_=typeof TextDecoder<`u`?new TextDecoder(`utf8`):void 0;function v(e,t,n){for(var r=t+n,i=t;e[i]&&!(i>=r);)++i;if(i-t>16&&e.buffer&&_)return _.decode(e.subarray(t,i));for(var a=``;t<i;){var o=e[t++];if(128&o){var s=63&e[t++];if((224&o)!=192){var c=63&e[t++];if((o=(240&o)==224?(15&o)<<12|s<<6|c:(7&o)<<18|s<<12|c<<6|63&e[t++])<65536)a+=String.fromCharCode(o);else{var l=o-65536;a+=String.fromCharCode(55296|l>>10,56320|1023&l)}}else a+=String.fromCharCode((31&o)<<6|s)}else a+=String.fromCharCode(o)}return a}function y(e,t){return e?v(h,e,t):``}function b(e){m=e,r.HEAP8=new Int8Array(e),r.HEAP16=new Int16Array(e),r.HEAP32=new Int32Array(e),r.HEAPU8=h=new Uint8Array(e),r.HEAPU16=new Uint16Array(e),r.HEAPU32=g=new Uint32Array(e),r.HEAPF32=new Float32Array(e),r.HEAPF64=new Float64Array(e)}var x=[],S=[],C=[];function w(){if(r.preRun)for(typeof r.preRun==`function`&&(r.preRun=[r.preRun]);r.preRun.length;)D(r.preRun.shift());H(x)}function T(){H(S)}function E(){if(r.postRun)for(typeof r.postRun==`function`&&(r.postRun=[r.postRun]);r.postRun.length;)k(r.postRun.shift());H(C)}function D(e){x.unshift(e)}function O(e){S.unshift(e)}function k(e){C.unshift(e)}var A=0,j=null;function M(e){A++,r.monitorRunDependencies&&r.monitorRunDependencies(A)}function N(e){if(A--,r.monitorRunDependencies&&r.monitorRunDependencies(A),A==0&&j){var t=j;j=null,t()}}function P(e){r.onAbort&&r.onAbort(e),d(e=`Aborted(`+e+`)`),f=!0,e+=`. Build with -sASSERTIONS for more info.`;var t=new WebAssembly.RuntimeError(e);throw n(t),t}var F,I,L=`data:application/octet-stream;base64,`;function R(e){return e.startsWith(L)}function z(e){try{if(e==F&&c)return new Uint8Array(c);if(i)return i(e);throw`both async and sync fetching of the wasm failed`}catch(e){P(e)}}function B(){return Promise.resolve().then((function(){return z(F)}))}function V(){var e={env:X,wasi_snapshot_preview1:X};function t(e,t){r.asm=e.exports,b((l=r.asm.memory).buffer),O(r.asm.__wasm_call_ctors),N()}function i(e){t(e.instance)}function a(t){return B().then((function(t){return WebAssembly.instantiate(t,e)})).then((function(e){return e})).then(t,(function(e){d(`failed to asynchronously prepare wasm: `+e),P(e)}))}if(M(),r.instantiateWasm)try{return r.instantiateWasm(e,t)}catch(e){d(`Module.instantiateWasm callback failed with error: `+e),n(e)}return(c||typeof WebAssembly.instantiateStreaming!=`function`||R(F)||typeof fetch!=`function`?a(i):fetch(F,{credentials:`same-origin`}).then((function(t){return WebAssembly.instantiateStreaming(t,e).then(i,(function(e){return d(`wasm streaming compile failed: `+e),d(`falling back to ArrayBuffer instantiation`),a(i)}))}))).catch(n),{}}function H(e){for(;e.length>0;)e.shift()(r)}function U(e,t,n){h.copyWithin(e,t,t+n)}function W(e){try{return l.grow(e-m.byteLength+65535>>>16),b(l.buffer),1}catch{}}function G(e){var t,n=h.length,r=2147483648;if((e>>>=0)>r)return!1;for(var i=1;i<=4;i*=2){var a=n*(1+.2/i);if(a=Math.min(a,e+100663296),W(Math.min(r,(t=Math.max(e,a))+(65536-t%65536)%65536)))return!0}return!1}R(F=`onig.wasm`)||(F=s(F)),I=typeof dateNow<`u`?dateNow:()=>performance.now();var K=[null,[],[]];function q(e,t){var n=K[e];t===0||t===10?((e===1?u:d)(v(n,0)),n.length=0):n.push(t)}function J(e,t,n,r){for(var i=0,a=0;a<n;a++){var o=g[t>>2],s=g[t+4>>2];t+=8;for(var c=0;c<s;c++)q(e,h[o+c]);i+=s}return g[r>>2]=i,0}var Y,X={emscripten_get_now:I,emscripten_memcpy_big:U,emscripten_resize_heap:G,fd_write:J};function Z(e){function n(){Y||(Y=!0,r.calledRun=!0,f||(T(),t(r),r.onRuntimeInitialized&&r.onRuntimeInitialized(),E()))}A>0||(w(),A>0||(r.setStatus?(r.setStatus(`Running...`),setTimeout((function(){setTimeout((function(){r.setStatus(``)}),1),n()}),1)):n()))}if(V(),r.___wasm_call_ctors=function(){return(r.___wasm_call_ctors=r.asm.__wasm_call_ctors).apply(null,arguments)},r.___errno_location=function(){return(r.___errno_location=r.asm.__errno_location).apply(null,arguments)},r._omalloc=function(){return(r._omalloc=r.asm.omalloc).apply(null,arguments)},r._ofree=function(){return(r._ofree=r.asm.ofree).apply(null,arguments)},r._getLastOnigError=function(){return(r._getLastOnigError=r.asm.getLastOnigError).apply(null,arguments)},r._createOnigScanner=function(){return(r._createOnigScanner=r.asm.createOnigScanner).apply(null,arguments)},r._freeOnigScanner=function(){return(r._freeOnigScanner=r.asm.freeOnigScanner).apply(null,arguments)},r._findNextOnigScannerMatch=function(){return(r._findNextOnigScannerMatch=r.asm.findNextOnigScannerMatch).apply(null,arguments)},r._findNextOnigScannerMatchDbg=function(){return(r._findNextOnigScannerMatchDbg=r.asm.findNextOnigScannerMatchDbg).apply(null,arguments)},r.stackSave=function(){return(r.stackSave=r.asm.stackSave).apply(null,arguments)},r.stackRestore=function(){return(r.stackRestore=r.asm.stackRestore).apply(null,arguments)},r.stackAlloc=function(){return(r.stackAlloc=r.asm.stackAlloc).apply(null,arguments)},r.dynCall_jiji=function(){return(r.dynCall_jiji=r.asm.dynCall_jiji).apply(null,arguments)},r.UTF8ToString=y,j=function e(){Y||Z(),Y||(j=e)},r.preInit)for(typeof r.preInit==`function`&&(r.preInit=[r.preInit]);r.preInit.length>0;)r.preInit.pop()();return Z(),e.ready})}},t={},function n(r){var i=t[r];if(i!==void 0)return i.exports;var a=t[r]={exports:{}};return e[r].call(a.exports,a,a.exports,n),a.exports}(770);var e,t}))})(t),t.exports)}function a(e,t){return t.forEach(function(t){t&&typeof t!=`string`&&!Array.isArray(t)&&Object.keys(t).forEach(function(n){if(n!=="default"&&!(n in e)){var r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:function(){return t[n]}})}})}),Object.freeze(e)}var o=i(),s=a({__proto__:null,default:e(o)},[o]);export{s as main};