@xano/xanoscript-monaco-editor 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +77 -126
- package/dist/.vite/manifest.json +54 -54
- package/dist/assets/{editor-BivTGeL1.js → editor-4HUBGwOu.js} +1 -1
- package/dist/assets/{extensionHost.worker-bYZXB0kM.js → extensionHost.worker-BEj8h9xB.js} +7 -7
- package/dist/assets/{files.contribution._fileEditorFactory-vS4ZLYi1.js → files.contribution._fileEditorFactory-YNF_vxMj.js} +1 -1
- package/dist/assets/{iconv-lite-umd-DQaTktu2.js → iconv-lite-umd-BCZHOywd.js} +2 -7
- package/dist/assets/{iconv-lite-umd-DYWd8cEa.js → iconv-lite-umd-BGIeO9cR.js} +2 -7
- package/dist/assets/{index-CrbRjSB_.js → index-9GTRLRSC.js} +1 -1
- package/dist/assets/{index-BGwiFEyd.js → index-B48SQPT2.js} +1 -1
- package/dist/assets/{index-VRHnXpb2.js → index-B7W-kS7G.js} +1 -1
- package/dist/assets/{index-51WpeTZl.js → index-CBODr4QR.js} +3 -3
- package/dist/assets/{index-C3pnKX8a.js → index-Cw1WVxjJ.js} +1 -1
- package/dist/assets/{index-BwfWF2CI.js → index-DSexFukl.js} +47 -47
- package/dist/assets/{index-C25FTAfE.js → index-DV2XmbY1.js} +1 -1
- package/dist/assets/{index-B132pG6E.js → index-DoXiLhIy.js} +2 -2
- package/dist/assets/{index-DgK2LcnW.js → index-r-mEMSNw.js} +2 -2
- package/dist/assets/{index-yPQeQvu7.js → index-sQEJqDvC.js} +1 -1
- package/dist/assets/main--VvQJcub.js +4 -0
- package/dist/assets/main-DUUA0eUQ.js +4 -0
- package/dist/assets/main-DWv94O3B.js +1 -0
- package/dist/assets/main-Du3mMy1c.js +1 -0
- package/dist/assets/{tokenClassificationRegistry-DcBtqg2t.js → tokenClassificationRegistry-CZyxOMX0.js} +1 -1
- package/dist/assets/{views-hUfpm9tT.js → views-Bu3Oa5Y-.js} +3 -3
- package/dist/assets/{views-C4cPu3oQ.css → views-qXWInm-E.css} +1 -1
- package/dist/assets/workbenchThemeService.service-CXlQNmVU.js +1 -0
- package/dist/assets/{worker-BIMDXoFp.js → worker-BiA-ZZ0u.js} +2 -2
- package/dist/index.html +1 -1
- package/dist/logic-assistant-script.js +22301 -16325
- package/dist/logic-assistant-script.js.map +4 -4
- package/dist/worker.js +20541 -14435
- package/dist/worker.js.map +4 -4
- package/package.json +3 -1
- package/dist/assets/main-D6ceXGB_.js +0 -4
- package/dist/assets/main-DNugpDp4.js +0 -4
- package/dist/assets/main-FP17jmvp.js +0 -1
- package/dist/assets/main-b5eBH2vx.js +0 -1
- package/dist/assets/workbenchThemeService.service-qBFVnuYD.js +0 -1
package/package.json
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xano/xanoscript-monaco-editor",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Monaco editor with XanoScript language support",
|
|
6
|
+
"main": "dist/index.html",
|
|
6
7
|
"files": [
|
|
7
8
|
"dist"
|
|
8
9
|
],
|
|
@@ -38,6 +39,7 @@
|
|
|
38
39
|
"vitest": "^3.2.4"
|
|
39
40
|
},
|
|
40
41
|
"dependencies": {
|
|
42
|
+
"@xano/xanoscript-language-server": "11.0.4",
|
|
41
43
|
"monaco-editor-wrapper": "^6.9.0",
|
|
42
44
|
"vscode-languageclient": "^9.0.1",
|
|
43
45
|
"vscode-languageserver": "^9.0.1",
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{g as ge}from"./_commonjsHelpers-CqkleIqs.js";function _e(V,ce){return ce.forEach(function(q){q&&typeof q!="string"&&!Array.isArray(q)&&Object.keys(q).forEach(function(U){if(U!=="default"&&!(U in V)){var z=Object.getOwnPropertyDescriptor(q,U);Object.defineProperty(V,U,z.get?z:{enumerable:!0,get:function(){return q[U]}})}})}),Object.freeze(V)}var ie={exports:{}},be=ie.exports,he;function ye(){return he||(he=1,function(V,ce){var q={};(function(U,z){V.exports=z()})(be,()=>(()=>{var U={185:(B,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.UseOnigurumaFindOptions=i.DebugFlags=void 0,i.DebugFlags={InDebugMode:typeof process<"u"&&!!q.VSCODE_TEXTMATE_DEBUG},i.UseOnigurumaFindOptions=!1},151:(B,i,A)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.applyStateStackDiff=i.diffStateStacksRefEq=void 0;const f=A(752);i.diffStateStacksRefEq=function(P,m){let b=0;const c=[];let p=P,R=m;for(;p!==R;)p&&(!R||p.depth>=R.depth)?(b++,p=p.parent):(c.push(R.toStateStackFrame()),R=R.parent);return{pops:b,newFrames:c.reverse()}},i.applyStateStackDiff=function(P,m){let b=P;for(let c=0;c<m.pops;c++)b=b.parent;for(const c of m.newFrames)b=f.StateStackImpl.pushFrame(b,c);return b}},490:(B,i)=>{var A;Object.defineProperty(i,"__esModule",{value:!0}),i.toOptionalTokenType=i.EncodedTokenAttributes=void 0,(A=i.EncodedTokenAttributes||(i.EncodedTokenAttributes={})).toBinaryStr=function(f){return f.toString(2).padStart(32,"0")},A.print=function(f){const P=A.getLanguageId(f),m=A.getTokenType(f),b=A.getFontStyle(f),c=A.getForeground(f),p=A.getBackground(f);console.log({languageId:P,tokenType:m,fontStyle:b,foreground:c,background:p})},A.getLanguageId=function(f){return(255&f)>>>0},A.getTokenType=function(f){return(768&f)>>>8},A.containsBalancedBrackets=function(f){return!!(1024&f)},A.getFontStyle=function(f){return(30720&f)>>>11},A.getForeground=function(f){return(16744448&f)>>>15},A.getBackground=function(f){return(4278190080&f)>>>24},A.set=function(f,P,m,b,c,p,R){let u=A.getLanguageId(f),y=A.getTokenType(f),S=A.containsBalancedBrackets(f)?1:0,g=A.getFontStyle(f),C=A.getForeground(f),l=A.getBackground(f);return P!==0&&(u=P),m!==8&&(y=m),b!==null&&(S=b?1:0),c!==-1&&(g=c),p!==0&&(C=p),R!==0&&(l=R),(u|y<<8|S<<10|g<<11|C<<15|l<<24)>>>0},i.toOptionalTokenType=function(f){return f}},214:(B,i,A)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.BasicScopeAttributesProvider=i.BasicScopeAttributes=void 0;const f=A(807);class P{constructor(p,R){this.languageId=p,this.tokenType=R}}i.BasicScopeAttributes=P;class m{constructor(p,R){this._getBasicScopeAttributes=new f.CachedFn(u=>{const y=this._scopeToLanguage(u),S=this._toStandardTokenType(u);return new P(y,S)}),this._defaultAttributes=new P(p,8),this._embeddedLanguagesMatcher=new b(Object.entries(R||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(p){return p===null?m._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(p)}_scopeToLanguage(p){return this._embeddedLanguagesMatcher.match(p)||0}_toStandardTokenType(p){const R=p.match(m.STANDARD_TOKEN_TYPE_REGEXP);if(!R)return 8;switch(R[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}}i.BasicScopeAttributesProvider=m,m._NULL_SCOPE_METADATA=new P(0,0),m.STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/;class b{constructor(p){if(p.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(p);const R=p.map(([u,y])=>f.escapeRegExpCharacters(u));R.sort(),R.reverse(),this.scopesRegExp=new RegExp(`^((${R.join(")|(")}))($|\\.)`,"")}}match(p){if(!this.scopesRegExp)return;const R=p.match(this.scopesRegExp);return R?this.values.get(R[1]):void 0}}},929:(B,i,A)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.LineTokens=i.BalancedBracketSelectors=i.StateStackImpl=i.AttributedScopeStack=i.Grammar=i.createGrammar=void 0;const f=A(185),P=A(490),m=A(916),b=A(810),c=A(666),p=A(63),R=A(807),u=A(214),y=A(398);function S(o,t,r,a,d){const _=m.createMatchers(t,g),I=c.RuleFactory.getCompiledRuleId(r,a,d.repository);for(const w of _)o.push({debugSelector:t,matcher:w.matcher,ruleId:I,grammar:d,priority:w.priority})}function g(o,t){if(t.length<o.length)return!1;let r=0;return o.every(a=>{for(let d=r;d<t.length;d++)if(C(t[d],a))return r=d+1,!0;return!1})}function C(o,t){if(!o)return!1;if(o===t)return!0;const r=t.length;return o.length>r&&o.substr(0,r)===t&&o[r]==="."}i.createGrammar=function(o,t,r,a,d,_,I,w){return new l(o,t,r,a,d,_,I,w)};class l{constructor(t,r,a,d,_,I,w,v){if(this._rootScopeName=t,this.balancedBracketSelectors=I,this._onigLib=v,this._basicScopeAttributesProvider=new u.BasicScopeAttributesProvider(a,d),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=w,this._grammar=h(r,null),this._injections=null,this._tokenTypeMatchers=[],_)for(const T of Object.keys(_)){const G=m.createMatchers(T,g);for(const N of G)this._tokenTypeMatchers.push({matcher:N.matcher,type:_[T]})}}get themeProvider(){return this._grammarRepository}dispose(){for(const t of this._ruleId2desc)t&&t.dispose()}createOnigScanner(t){return this._onigLib.createOnigScanner(t)}createOnigString(t){return this._onigLib.createOnigString(t)}getMetadataForScope(t){return this._basicScopeAttributesProvider.getBasicScopeAttributes(t)}_collectInjections(){const t=[],r=this._rootScopeName,a=(d=>d===this._rootScopeName?this._grammar:this.getExternalGrammar(d))(r);if(a){const d=a.injections;if(d)for(let I in d)S(t,I,d[I],this,a);const _=this._grammarRepository.injections(r);_&&_.forEach(I=>{const w=this.getExternalGrammar(I);if(w){const v=w.injectionSelector;v&&S(t,v,w,this,w)}})}return t.sort((d,_)=>d.priority-_.priority),t}getInjections(){if(this._injections===null&&(this._injections=this._collectInjections(),f.DebugFlags.InDebugMode&&this._injections.length>0)){console.log(`Grammar ${this._rootScopeName} contains the following injections:`);for(const t of this._injections)console.log(` - ${t.debugSelector}`)}return this._injections}registerRule(t){const r=++this._lastRuleId,a=t(c.ruleIdFromNumber(r));return this._ruleId2desc[r]=a,a}getRule(t){return this._ruleId2desc[c.ruleIdToNumber(t)]}getExternalGrammar(t,r){if(this._includedGrammars[t])return this._includedGrammars[t];if(this._grammarRepository){const a=this._grammarRepository.lookup(t);if(a)return this._includedGrammars[t]=h(a,r&&r.$base),this._includedGrammars[t]}}tokenizeLine(t,r,a=0){const d=this._tokenize(t,r,!1,a);return{tokens:d.lineTokens.getResult(d.ruleStack,d.lineLength),ruleStack:d.ruleStack,stoppedEarly:d.stoppedEarly}}tokenizeLine2(t,r,a=0){const d=this._tokenize(t,r,!0,a);return{tokens:d.lineTokens.getBinaryResult(d.ruleStack,d.lineLength),ruleStack:d.ruleStack,stoppedEarly:d.stoppedEarly}}_tokenize(t,r,a,d){let _;if(this._rootId===-1&&(this._rootId=c.RuleFactory.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections()),r&&r!==e.NULL)_=!1,r.reset();else{_=!0;const G=this._basicScopeAttributesProvider.getDefaultAttributes(),N=this.themeProvider.getDefaults(),O=P.EncodedTokenAttributes.set(0,G.languageId,G.tokenType,null,N.fontStyle,N.foregroundId,N.backgroundId),j=this.getRule(this._rootId).getName(null,null);let D;D=j?s.createRootAndLookUpScopeName(j,O,this):s.createRoot("unknown",O),r=new e(null,this._rootId,-1,-1,!1,null,D,D)}t+=`
|
|
2
|
-
`;const I=this.createOnigString(t),w=I.content.length,v=new n(a,t,this._tokenTypeMatchers,this.balancedBracketSelectors),T=y._tokenizeString(this,I,_,0,r,v,!0,d);return b.disposeOnigString(I),{lineLength:w,lineTokens:v,ruleStack:T.stack,stoppedEarly:T.stoppedEarly}}}function h(o,t){return(o=R.clone(o)).repository=o.repository||{},o.repository.$self={$vscodeTextmateLocation:o.$vscodeTextmateLocation,patterns:o.patterns,name:o.scopeName},o.repository.$base=t||o.repository.$self,o}i.Grammar=l;class s{constructor(t,r,a){this.parent=t,this.scopePath=r,this.tokenAttributes=a}static fromExtension(t,r){let a=t,d=t?.scopePath??null;for(const _ of r)d=p.ScopeStack.push(d,_.scopeNames),a=new s(a,d,_.encodedTokenAttributes);return a}static createRoot(t,r){return new s(null,new p.ScopeStack(null,t),r)}static createRootAndLookUpScopeName(t,r,a){const d=a.getMetadataForScope(t),_=new p.ScopeStack(null,t),I=a.themeProvider.themeMatch(_),w=s.mergeAttributes(r,d,I);return new s(null,_,w)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return s.equals(this,t)}static equals(t,r){for(;;){if(t===r||!t&&!r)return!0;if(!t||!r||t.scopeName!==r.scopeName||t.tokenAttributes!==r.tokenAttributes)return!1;t=t.parent,r=r.parent}}static mergeAttributes(t,r,a){let d=-1,_=0,I=0;return a!==null&&(d=a.fontStyle,_=a.foregroundId,I=a.backgroundId),P.EncodedTokenAttributes.set(t,r.languageId,r.tokenType,null,d,_,I)}pushAttributed(t,r){if(t===null)return this;if(t.indexOf(" ")===-1)return s._pushAttributed(this,t,r);const a=t.split(/ /g);let d=this;for(const _ of a)d=s._pushAttributed(d,_,r);return d}static _pushAttributed(t,r,a){const d=a.getMetadataForScope(r),_=t.scopePath.push(r),I=a.themeProvider.themeMatch(_),w=s.mergeAttributes(t.tokenAttributes,d,I);return new s(t,_,w)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(t){const r=[];let a=this;for(;a&&a!==t;)r.push({encodedTokenAttributes:a.tokenAttributes,scopeNames:a.scopePath.getExtensionIfDefined(a.parent?.scopePath??null)}),a=a.parent;return a===t?r.reverse():void 0}}i.AttributedScopeStack=s;class e{constructor(t,r,a,d,_,I,w,v){this.parent=t,this.ruleId=r,this.beginRuleCapturedEOL=_,this.endRule=I,this.nameScopesList=w,this.contentNameScopesList=v,this._stackElementBrand=void 0,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=a,this._anchorPos=d}equals(t){return t!==null&&e._equals(this,t)}static _equals(t,r){return t===r||!!this._structuralEquals(t,r)&&s.equals(t.contentNameScopesList,r.contentNameScopesList)}static _structuralEquals(t,r){for(;;){if(t===r||!t&&!r)return!0;if(!t||!r||t.depth!==r.depth||t.ruleId!==r.ruleId||t.endRule!==r.endRule)return!1;t=t.parent,r=r.parent}}clone(){return this}static _reset(t){for(;t;)t._enterPos=-1,t._anchorPos=-1,t=t.parent}reset(){e._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,r,a,d,_,I,w){return new e(this,t,r,a,d,_,I,w)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(t){return t.getRule(this.ruleId)}toString(){const t=[];return this._writeString(t,0),"["+t.join(",")+"]"}_writeString(t,r){return this.parent&&(r=this.parent._writeString(t,r)),t[r++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,r}withContentNameScopesList(t){return this.contentNameScopesList===t?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,t)}withEndRule(t){return this.endRule===t?this:new e(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(t){let r=this;for(;r&&r._enterPos===t._enterPos;){if(r.ruleId===t.ruleId)return!0;r=r.parent}return!1}toStateStackFrame(){return{ruleId:c.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(t,r){const a=s.fromExtension(t?.nameScopesList??null,r.nameScopesList);return new e(t,c.ruleIdFromNumber(r.ruleId),r.enterPos??-1,r.anchorPos??-1,r.beginRuleCapturedEOL,r.endRule,a,s.fromExtension(a,r.contentNameScopesList))}}i.StateStackImpl=e,e.NULL=new e(null,0,0,0,!1,null,null,null),i.BalancedBracketSelectors=class{constructor(o,t){this.allowAny=!1,this.balancedBracketScopes=o.flatMap(r=>r==="*"?(this.allowAny=!0,[]):m.createMatchers(r,g).map(a=>a.matcher)),this.unbalancedBracketScopes=t.flatMap(r=>m.createMatchers(r,g).map(a=>a.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(o){for(const t of this.unbalancedBracketScopes)if(t(o))return!1;for(const t of this.balancedBracketScopes)if(t(o))return!0;return this.allowAny}};class n{constructor(t,r,a,d){this.balancedBracketSelectors=d,this._emitBinaryTokens=t,this._tokenTypeOverrides=a,f.DebugFlags.InDebugMode?this._lineText=r:this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}produce(t,r){this.produceFromScopes(t.contentNameScopesList,r)}produceFromScopes(t,r){if(this._lastTokenEndIndex>=r)return;if(this._emitBinaryTokens){let d=t?.tokenAttributes??0,_=!1;if(this.balancedBracketSelectors?.matchesAlways&&(_=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const I=t?.getScopeNames()??[];for(const w of this._tokenTypeOverrides)w.matcher(I)&&(d=P.EncodedTokenAttributes.set(d,0,P.toOptionalTokenType(w.type),null,-1,0,0));this.balancedBracketSelectors&&(_=this.balancedBracketSelectors.match(I))}if(_&&(d=P.EncodedTokenAttributes.set(d,0,8,_,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===d)return void(this._lastTokenEndIndex=r);if(f.DebugFlags.InDebugMode){const I=t?.getScopeNames()??[];console.log(" token: |"+this._lineText.substring(this._lastTokenEndIndex,r).replace(/\n$/,"\\n")+"|");for(let w=0;w<I.length;w++)console.log(" * "+I[w])}return this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(d),void(this._lastTokenEndIndex=r)}const a=t?.getScopeNames()??[];if(f.DebugFlags.InDebugMode){console.log(" token: |"+this._lineText.substring(this._lastTokenEndIndex,r).replace(/\n$/,"\\n")+"|");for(let d=0;d<a.length;d++)console.log(" * "+a[d])}this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:r,scopes:a}),this._lastTokenEndIndex=r}getResult(t,r){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===r-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(t,r),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(t,r){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===r-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(t,r),this._binaryTokens[this._binaryTokens.length-2]=0);const a=new Uint32Array(this._binaryTokens.length);for(let d=0,_=this._binaryTokens.length;d<_;d++)a[d]=this._binaryTokens[d];return a}}i.LineTokens=n},784:(B,i,A)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.parseInclude=i.TopLevelRepositoryReference=i.TopLevelReference=i.RelativeReference=i.SelfReference=i.BaseReference=i.ScopeDependencyProcessor=i.ExternalReferenceCollector=i.TopLevelRepositoryRuleReference=i.TopLevelRuleReference=void 0;const f=A(807);class P{constructor(e){this.scopeName=e}toKey(){return this.scopeName}}i.TopLevelRuleReference=P;class m{constructor(e,n){this.scopeName=e,this.ruleName=n}toKey(){return`${this.scopeName}#${this.ruleName}`}}i.TopLevelRepositoryRuleReference=m;class b{constructor(){this._references=[],this._seenReferenceKeys=new Set,this.visitedRule=new Set}get references(){return this._references}add(e){const n=e.toKey();this._seenReferenceKeys.has(n)||(this._seenReferenceKeys.add(n),this._references.push(e))}}function c(s,e,n,o){const t=n.lookup(s.scopeName);if(!t){if(s.scopeName===e)throw new Error(`No grammar provided for <${e}>`);return}const r=n.lookup(e);s instanceof P?R({baseGrammar:r,selfGrammar:t},o):p(s.ruleName,{baseGrammar:r,selfGrammar:t,repository:t.repository},o);const a=n.injections(s.scopeName);if(a)for(const d of a)o.add(new P(d))}function p(s,e,n){e.repository&&e.repository[s]&&u([e.repository[s]],e,n)}function R(s,e){s.selfGrammar.patterns&&Array.isArray(s.selfGrammar.patterns)&&u(s.selfGrammar.patterns,{...s,repository:s.selfGrammar.repository},e),s.selfGrammar.injections&&u(Object.values(s.selfGrammar.injections),{...s,repository:s.selfGrammar.repository},e)}function u(s,e,n){for(const o of s){if(n.visitedRule.has(o))continue;n.visitedRule.add(o);const t=o.repository?f.mergeObjects({},e.repository,o.repository):e.repository;Array.isArray(o.patterns)&&u(o.patterns,{...e,repository:t},n);const r=o.include;if(!r)continue;const a=h(r);switch(a.kind){case 0:R({...e,selfGrammar:e.baseGrammar},n);break;case 1:R(e,n);break;case 2:p(a.ruleName,{...e,repository:t},n);break;case 3:case 4:const d=a.scopeName===e.selfGrammar.scopeName?e.selfGrammar:a.scopeName===e.baseGrammar.scopeName?e.baseGrammar:void 0;if(d){const _={baseGrammar:e.baseGrammar,selfGrammar:d,repository:t};a.kind===4?p(a.ruleName,_,n):R(_,n)}else a.kind===4?n.add(new m(a.scopeName,a.ruleName)):n.add(new P(a.scopeName))}}}i.ExternalReferenceCollector=b,i.ScopeDependencyProcessor=class{constructor(s,e){this.repo=s,this.initialScopeName=e,this.seenFullScopeRequests=new Set,this.seenPartialScopeRequests=new Set,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new P(this.initialScopeName)]}processQueue(){const s=this.Q;this.Q=[];const e=new b;for(const n of s)c(n,this.initialScopeName,this.repo,e);for(const n of e.references)if(n instanceof P){if(this.seenFullScopeRequests.has(n.scopeName))continue;this.seenFullScopeRequests.add(n.scopeName),this.Q.push(n)}else{if(this.seenFullScopeRequests.has(n.scopeName)||this.seenPartialScopeRequests.has(n.toKey()))continue;this.seenPartialScopeRequests.add(n.toKey()),this.Q.push(n)}}};class y{constructor(){this.kind=0}}i.BaseReference=y;class S{constructor(){this.kind=1}}i.SelfReference=S;class g{constructor(e){this.ruleName=e,this.kind=2}}i.RelativeReference=g;class C{constructor(e){this.scopeName=e,this.kind=3}}i.TopLevelReference=C;class l{constructor(e,n){this.scopeName=e,this.ruleName=n,this.kind=4}}function h(s){if(s==="$base")return new y;if(s==="$self")return new S;const e=s.indexOf("#");if(e===-1)return new C(s);if(e===0)return new g(s.substring(1));{const n=s.substring(0,e),o=s.substring(e+1);return new l(n,o)}}i.TopLevelRepositoryReference=l,i.parseInclude=h},752:function(B,i,A){var f=this&&this.__createBinding||(Object.create?function(m,b,c,p){p===void 0&&(p=c),Object.defineProperty(m,p,{enumerable:!0,get:function(){return b[c]}})}:function(m,b,c,p){p===void 0&&(p=c),m[p]=b[c]}),P=this&&this.__exportStar||function(m,b){for(var c in m)c==="default"||Object.prototype.hasOwnProperty.call(b,c)||f(b,m,c)};Object.defineProperty(i,"__esModule",{value:!0}),P(A(929),i)},398:(B,i,A)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.LocalStackElement=i._tokenizeString=void 0;const f=A(185),P=A(810),m=A(666),b=A(807);class c{constructor(l,h){this.stack=l,this.stoppedEarly=h}}function p(C,l,h,s,e,n,o,t){const r=l.content.length;let a=!1,d=-1;if(o){const w=function(v,T,G,N,O,j){let D=O.beginRuleCapturedEOL?0:-1;const E=[];for(let x=O;x;x=x.pop()){const M=x.getRule(v);M instanceof m.BeginWhileRule&&E.push({rule:M,stack:x})}for(let x=E.pop();x;x=E.pop()){const{ruleScanner:M,findOptions:H}=u(x.rule,v,x.stack.endRule,G,N===D),k=M.findNextMatchSync(T,N,H);if(f.DebugFlags.InDebugMode&&(console.log(" scanning for while rule"),console.log(M.toString())),!k){f.DebugFlags.InDebugMode&&console.log(" popping "+x.rule.debugName+" - "+x.rule.debugWhileRegExp),O=x.stack.pop();break}if(k.ruleId!==m.whileRuleId){O=x.stack.pop();break}k.captureIndices&&k.captureIndices.length&&(j.produce(x.stack,k.captureIndices[0].start),S(v,T,G,x.stack,j,x.rule.whileCaptures,k.captureIndices),j.produce(x.stack,k.captureIndices[0].end),D=k.captureIndices[0].end,k.captureIndices[0].end>N&&(N=k.captureIndices[0].end,G=!1))}return{stack:O,linePos:N,anchorPosition:D,isFirstLine:G}}(C,l,h,s,e,n);e=w.stack,s=w.linePos,h=w.isFirstLine,d=w.anchorPosition}const _=Date.now();for(;!a;){if(t!==0&&Date.now()-_>t)return new c(e,!0);I()}return new c(e,!1);function I(){f.DebugFlags.InDebugMode&&(console.log(""),console.log(`@@scanNext ${s}: |${l.content.substr(s).replace(/\n$/,"\\n")}|`));const w=function(N,O,j,D,E,x){const M=function(W,J,oe,X,K,te){const Y=K.getRule(W),{ruleScanner:Z,findOptions:ee}=R(Y,W,K.endRule,oe,X===te);let Q=0;f.DebugFlags.InDebugMode&&(Q=b.performanceNow());const $=Z.findNextMatchSync(J,X,ee);if(f.DebugFlags.InDebugMode){const ne=b.performanceNow()-Q;ne>5&&console.warn(`Rule ${Y.debugName} (${Y.id}) matching took ${ne} against '${J}'`),console.log(` scanning for (linePos: ${X}, anchorPosition: ${te})`),console.log(Z.toString()),$&&console.log(`matched rule id: ${$.ruleId} from ${$.captureIndices[0].start} to ${$.captureIndices[0].end}`)}return $?{captureIndices:$.captureIndices,matchedRuleId:$.ruleId}:null}(N,O,j,D,E,x),H=N.getInjections();if(H.length===0)return M;const k=function(W,J,oe,X,K,te,Y){let Z,ee=Number.MAX_VALUE,Q=null,$=0;const ne=te.contentNameScopesList.getScopeNames();for(let ae=0,de=W.length;ae<de;ae++){const se=W[ae];if(!se.matcher(ne))continue;const fe=J.getRule(se.ruleId),{ruleScanner:le,findOptions:me}=R(fe,J,null,X,K===Y),re=le.findNextMatchSync(oe,K,me);if(!re)continue;f.DebugFlags.InDebugMode&&(console.log(` matched injection: ${se.debugSelector}`),console.log(le.toString()));const ue=re.captureIndices[0].start;if(!(ue>=ee)&&(ee=ue,Q=re.captureIndices,Z=re.ruleId,$=se.priority,ee===K))break}return Q?{priorityMatch:$===-1,captureIndices:Q,matchedRuleId:Z}:null}(H,N,O,j,D,E,x);if(!k)return M;if(!M)return k;const F=M.captureIndices[0].start,L=k.captureIndices[0].start;return L<F||k.priorityMatch&&L===F?k:M}(C,l,h,s,e,d);if(!w)return f.DebugFlags.InDebugMode&&console.log(" no more matches."),n.produce(e,r),void(a=!0);const v=w.captureIndices,T=w.matchedRuleId,G=!!(v&&v.length>0)&&v[0].end>s;if(T===m.endRuleId){const N=e.getRule(C);f.DebugFlags.InDebugMode&&console.log(" popping "+N.debugName+" - "+N.debugEndRegExp),n.produce(e,v[0].start),e=e.withContentNameScopesList(e.nameScopesList),S(C,l,h,e,n,N.endCaptures,v),n.produce(e,v[0].end);const O=e;if(e=e.parent,d=O.getAnchorPos(),!G&&O.getEnterPos()===s)return f.DebugFlags.InDebugMode&&console.error("[1] - Grammar is in an endless loop - Grammar pushed & popped a rule without advancing"),e=O,n.produce(e,r),void(a=!0)}else{const N=C.getRule(T);n.produce(e,v[0].start);const O=e,j=N.getName(l.content,v),D=e.contentNameScopesList.pushAttributed(j,C);if(e=e.push(T,s,d,v[0].end===r,null,D,D),N instanceof m.BeginEndRule){const E=N;f.DebugFlags.InDebugMode&&console.log(" pushing "+E.debugName+" - "+E.debugBeginRegExp),S(C,l,h,e,n,E.beginCaptures,v),n.produce(e,v[0].end),d=v[0].end;const x=E.getContentName(l.content,v),M=D.pushAttributed(x,C);if(e=e.withContentNameScopesList(M),E.endHasBackReferences&&(e=e.withEndRule(E.getEndWithResolvedBackReferences(l.content,v))),!G&&O.hasSameRuleAs(e))return f.DebugFlags.InDebugMode&&console.error("[2] - Grammar is in an endless loop - Grammar pushed the same rule without advancing"),e=e.pop(),n.produce(e,r),void(a=!0)}else if(N instanceof m.BeginWhileRule){const E=N;f.DebugFlags.InDebugMode&&console.log(" pushing "+E.debugName),S(C,l,h,e,n,E.beginCaptures,v),n.produce(e,v[0].end),d=v[0].end;const x=E.getContentName(l.content,v),M=D.pushAttributed(x,C);if(e=e.withContentNameScopesList(M),E.whileHasBackReferences&&(e=e.withEndRule(E.getWhileWithResolvedBackReferences(l.content,v))),!G&&O.hasSameRuleAs(e))return f.DebugFlags.InDebugMode&&console.error("[3] - Grammar is in an endless loop - Grammar pushed the same rule without advancing"),e=e.pop(),n.produce(e,r),void(a=!0)}else{const E=N;if(f.DebugFlags.InDebugMode&&console.log(" matched "+E.debugName+" - "+E.debugMatchRegExp),S(C,l,h,e,n,E.captures,v),n.produce(e,v[0].end),e=e.pop(),!G)return f.DebugFlags.InDebugMode&&console.error("[4] - Grammar is in an endless loop - Grammar is not advancing, nor is it pushing/popping"),e=e.safePop(),n.produce(e,r),void(a=!0)}}v[0].end>s&&(s=v[0].end,h=!1)}}function R(C,l,h,s,e){return f.UseOnigurumaFindOptions?{ruleScanner:C.compile(l,h),findOptions:y(s,e)}:{ruleScanner:C.compileAG(l,h,s,e),findOptions:0}}function u(C,l,h,s,e){return f.UseOnigurumaFindOptions?{ruleScanner:C.compileWhile(l,h),findOptions:y(s,e)}:{ruleScanner:C.compileWhileAG(l,h,s,e),findOptions:0}}function y(C,l){let h=0;return C||(h|=1),l||(h|=4),h}function S(C,l,h,s,e,n,o){if(n.length===0)return;const t=l.content,r=Math.min(n.length,o.length),a=[],d=o[0].end;for(let _=0;_<r;_++){const I=n[_];if(I===null)continue;const w=o[_];if(w.length===0)continue;if(w.start>d)break;for(;a.length>0&&a[a.length-1].endPos<=w.start;)e.produceFromScopes(a[a.length-1].scopes,a[a.length-1].endPos),a.pop();if(a.length>0?e.produceFromScopes(a[a.length-1].scopes,w.start):e.produce(s,w.start),I.retokenizeCapturedWithRuleId){const T=I.getName(t,o),G=s.contentNameScopesList.pushAttributed(T,C),N=I.getContentName(t,o),O=G.pushAttributed(N,C),j=s.push(I.retokenizeCapturedWithRuleId,w.start,-1,!1,null,G,O),D=C.createOnigString(t.substring(0,w.end));p(C,D,h&&w.start===0,w.start,j,e,!1,0),P.disposeOnigString(D);continue}const v=I.getName(t,o);if(v!==null){const T=(a.length>0?a[a.length-1].scopes:s.contentNameScopesList).pushAttributed(v,C);a.push(new g(T,w.end))}}for(;a.length>0;)e.produceFromScopes(a[a.length-1].scopes,a[a.length-1].endPos),a.pop()}i._tokenizeString=p;class g{constructor(l,h){this.scopes=l,this.endPos=h}}i.LocalStackElement=g},726:(B,i)=>{function A(b,c){throw new Error("Near offset "+b.pos+": "+c+" ~~~"+b.source.substr(b.pos,50)+"~~~")}Object.defineProperty(i,"__esModule",{value:!0}),i.parseJSON=void 0,i.parseJSON=function(b,c,p){let R=new f(b),u=new P,y=0,S=null,g=[],C=[];function l(){g.push(y),C.push(S)}function h(){y=g.pop(),S=C.pop()}function s(e){A(R,e)}for(;m(R,u);){if(y===0){if(S!==null&&s("too many constructs in root"),u.type===3){S={},p&&(S.$vscodeTextmateLocation=u.toLocation(c)),l(),y=1;continue}if(u.type===2){S=[],l(),y=4;continue}s("unexpected token in root")}if(y===2){if(u.type===5){h();continue}if(u.type===7){y=3;continue}s("expected , or }")}if(y===1||y===3){if(y===1&&u.type===5){h();continue}if(u.type===1){let e=u.value;if(m(R,u)&&u.type===6||s("expected colon"),m(R,u)||s("expected value"),y=2,u.type===1){S[e]=u.value;continue}if(u.type===8){S[e]=null;continue}if(u.type===9){S[e]=!0;continue}if(u.type===10){S[e]=!1;continue}if(u.type===11){S[e]=parseFloat(u.value);continue}if(u.type===2){let n=[];S[e]=n,l(),y=4,S=n;continue}if(u.type===3){let n={};p&&(n.$vscodeTextmateLocation=u.toLocation(c)),S[e]=n,l(),y=1,S=n;continue}}s("unexpected token in dict")}if(y===5){if(u.type===4){h();continue}if(u.type===7){y=6;continue}s("expected , or ]")}if(y===4||y===6){if(y===4&&u.type===4){h();continue}if(y=5,u.type===1){S.push(u.value);continue}if(u.type===8){S.push(null);continue}if(u.type===9){S.push(!0);continue}if(u.type===10){S.push(!1);continue}if(u.type===11){S.push(parseFloat(u.value));continue}if(u.type===2){let e=[];S.push(e),l(),y=4,S=e;continue}if(u.type===3){let e={};p&&(e.$vscodeTextmateLocation=u.toLocation(c)),S.push(e),l(),y=1,S=e;continue}s("unexpected token in array")}s("unknown state")}return C.length!==0&&s("unclosed constructs"),S};class f{constructor(c){this.source=c,this.pos=0,this.len=c.length,this.line=1,this.char=0}}class P{constructor(){this.value=null,this.type=0,this.offset=-1,this.len=-1,this.line=-1,this.char=-1}toLocation(c){return{filename:c,line:this.line,char:this.char}}}function m(b,c){c.value=null,c.type=0,c.offset=-1,c.len=-1,c.line=-1,c.char=-1;let p,R=b.source,u=b.pos,y=b.len,S=b.line,g=b.char;for(;;){if(u>=y)return!1;if(p=R.charCodeAt(u),p!==32&&p!==9&&p!==13){if(p!==10)break;u++,S++,g=0}else u++,g++}if(c.offset=u,c.line=S,c.char=g,p===34){for(c.type=1,u++,g++;;){if(u>=y)return!1;if(p=R.charCodeAt(u),u++,g++,p!==92){if(p===34)break}else u++,g++}c.value=R.substring(c.offset+1,u-1).replace(/\\u([0-9A-Fa-f]{4})/g,(C,l)=>String.fromCodePoint(parseInt(l,16))).replace(/\\(.)/g,(C,l)=>{switch(l){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:A(b,"invalid escape sequence")}throw new Error("unreachable")})}else if(p===91)c.type=2,u++,g++;else if(p===123)c.type=3,u++,g++;else if(p===93)c.type=4,u++,g++;else if(p===125)c.type=5,u++,g++;else if(p===58)c.type=6,u++,g++;else if(p===44)c.type=7,u++,g++;else if(p===110){if(c.type=8,u++,g++,p=R.charCodeAt(u),p!==117||(u++,g++,p=R.charCodeAt(u),p!==108)||(u++,g++,p=R.charCodeAt(u),p!==108))return!1;u++,g++}else if(p===116){if(c.type=9,u++,g++,p=R.charCodeAt(u),p!==114||(u++,g++,p=R.charCodeAt(u),p!==117)||(u++,g++,p=R.charCodeAt(u),p!==101))return!1;u++,g++}else if(p===102){if(c.type=10,u++,g++,p=R.charCodeAt(u),p!==97||(u++,g++,p=R.charCodeAt(u),p!==108)||(u++,g++,p=R.charCodeAt(u),p!==115)||(u++,g++,p=R.charCodeAt(u),p!==101))return!1;u++,g++}else for(c.type=11;;){if(u>=y)return!1;if(p=R.charCodeAt(u),!(p===46||p>=48&&p<=57||p===101||p===69||p===45||p===43))break;u++,g++}return c.len=u-c.offset,c.value===null&&(c.value=R.substr(c.offset,c.len)),b.pos=u,b.line=S,b.char=g,!0}},625:function(B,i,A){var f=this&&this.__createBinding||(Object.create?function(y,S,g,C){C===void 0&&(C=g),Object.defineProperty(y,C,{enumerable:!0,get:function(){return S[g]}})}:function(y,S,g,C){C===void 0&&(C=g),y[C]=S[g]}),P=this&&this.__exportStar||function(y,S){for(var g in y)g==="default"||Object.prototype.hasOwnProperty.call(S,g)||f(S,y,g)};Object.defineProperty(i,"__esModule",{value:!0}),i.applyStateStackDiff=i.diffStateStacksRefEq=i.parseRawGrammar=i.INITIAL=i.Registry=void 0;const m=A(752),b=A(150),c=A(583),p=A(63),R=A(784),u=A(151);Object.defineProperty(i,"applyStateStackDiff",{enumerable:!0,get:function(){return u.applyStateStackDiff}}),Object.defineProperty(i,"diffStateStacksRefEq",{enumerable:!0,get:function(){return u.diffStateStacksRefEq}}),P(A(810),i),i.Registry=class{constructor(y){this._options=y,this._syncRegistry=new c.SyncRegistry(p.Theme.createFromRawTheme(y.theme,y.colorMap),y.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(y,S){this._syncRegistry.setTheme(p.Theme.createFromRawTheme(y,S))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(y,S,g){return this.loadGrammarWithConfiguration(y,S,{embeddedLanguages:g})}loadGrammarWithConfiguration(y,S,g){return this._loadGrammar(y,S,g.embeddedLanguages,g.tokenTypes,new m.BalancedBracketSelectors(g.balancedBracketSelectors||[],g.unbalancedBracketSelectors||[]))}loadGrammar(y){return this._loadGrammar(y,0,null,null,null)}async _loadGrammar(y,S,g,C,l){const h=new R.ScopeDependencyProcessor(this._syncRegistry,y);for(;h.Q.length>0;)await Promise.all(h.Q.map(s=>this._loadSingleGrammar(s.scopeName))),h.processQueue();return this._grammarForScopeName(y,S,g,C,l)}async _loadSingleGrammar(y){return this._ensureGrammarCache.has(y)||this._ensureGrammarCache.set(y,this._doLoadSingleGrammar(y)),this._ensureGrammarCache.get(y)}async _doLoadSingleGrammar(y){const S=await this._options.loadGrammar(y);if(S){const g=typeof this._options.getInjections=="function"?this._options.getInjections(y):void 0;this._syncRegistry.addGrammar(S,g)}}async addGrammar(y,S=[],g=0,C=null){return this._syncRegistry.addGrammar(y,S),await this._grammarForScopeName(y.scopeName,g,C)}_grammarForScopeName(y,S=0,g=null,C=null,l=null){return this._syncRegistry.grammarForScopeName(y,S,g,C,l)}},i.INITIAL=m.StateStackImpl.NULL,i.parseRawGrammar=b.parseRawGrammar},916:(B,i)=>{function A(f){return!!f&&!!f.match(/[\w\.:]+/)}Object.defineProperty(i,"__esModule",{value:!0}),i.createMatchers=void 0,i.createMatchers=function(f,P){const m=[],b=function(u){let y=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,S=y.exec(u);return{next:()=>{if(!S)return null;const g=S[0];return S=y.exec(u),g}}}(f);let c=b.next();for(;c!==null;){let u=0;if(c.length===2&&c.charAt(1)===":"){switch(c.charAt(0)){case"R":u=1;break;case"L":u=-1;break;default:console.log(`Unknown priority ${c} in scope selector`)}c=b.next()}let y=R();if(m.push({matcher:y,priority:u}),c!==",")break;c=b.next()}return m;function p(){if(c==="-"){c=b.next();const u=p();return y=>!!u&&!u(y)}if(c==="("){c=b.next();const u=function(){const y=[];let S=R();for(;S&&(y.push(S),c==="|"||c===",");){do c=b.next();while(c==="|"||c===",");S=R()}return g=>y.some(C=>C(g))}();return c===")"&&(c=b.next()),u}if(A(c)){const u=[];do u.push(c),c=b.next();while(A(c));return y=>P(u,y)}return null}function R(){const u=[];let y=p();for(;y;)u.push(y),y=p();return S=>u.every(g=>g(S))}}},810:(B,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.disposeOnigString=void 0,i.disposeOnigString=function(A){typeof A.dispose=="function"&&A.dispose()}},150:(B,i,A)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.parseRawGrammar=void 0;const f=A(578),P=A(185),m=A(726);i.parseRawGrammar=function(b,c=null){return c!==null&&/\.json$/.test(c)?(p=b,R=c,P.DebugFlags.InDebugMode?m.parseJSON(p,R,!0):JSON.parse(p)):function(u,y){return P.DebugFlags.InDebugMode?f.parseWithLocation(u,y,"$vscodeTextmateLocation"):f.parsePLIST(u)}(b,c);var p,R}},578:(B,i)=>{function A(f,P,m){const b=f.length;let c=0,p=1,R=0;function u(k){if(m===null)c+=k;else for(;k>0;)f.charCodeAt(c)===10?(c++,p++,R=0):(c++,R++),k--}function y(k){m===null?c=k:u(k-c)}function S(){for(;c<b;){let k=f.charCodeAt(c);if(k!==32&&k!==9&&k!==13&&k!==10)break;u(1)}}function g(k){return f.substr(c,k.length)===k&&(u(k.length),!0)}function C(k){let F=f.indexOf(k,c);y(F!==-1?F+k.length:b)}function l(k){let F=f.indexOf(k,c);if(F!==-1){let L=f.substring(c,F);return y(F+k.length),L}{let L=f.substr(c);return y(b),L}}b>0&&f.charCodeAt(0)===65279&&(c=1);let h=0,s=null,e=[],n=[],o=null;function t(k,F){e.push(h),n.push(s),h=k,s=F}function r(){if(e.length===0)return a("illegal state stack");h=e.pop(),s=n.pop()}function a(k){throw new Error("Near offset "+c+": "+k+" ~~~"+f.substr(c,50)+"~~~")}const d=function(){if(o===null)return a("missing <key>");let k={};m!==null&&(k[m]={filename:P,line:p,char:R}),s[o]=k,o=null,t(1,k)},_=function(){if(o===null)return a("missing <key>");let k=[];s[o]=k,o=null,t(2,k)},I=function(){let k={};m!==null&&(k[m]={filename:P,line:p,char:R}),s.push(k),t(1,k)},w=function(){let k=[];s.push(k),t(2,k)};function v(){if(h!==1)return a("unexpected </dict>");r()}function T(){return h===1||h!==2?a("unexpected </array>"):void r()}function G(k){if(h===1){if(o===null)return a("missing <key>");s[o]=k,o=null}else h===2?s.push(k):s=k}function N(k){if(isNaN(k))return a("cannot parse float");if(h===1){if(o===null)return a("missing <key>");s[o]=k,o=null}else h===2?s.push(k):s=k}function O(k){if(isNaN(k))return a("cannot parse integer");if(h===1){if(o===null)return a("missing <key>");s[o]=k,o=null}else h===2?s.push(k):s=k}function j(k){if(h===1){if(o===null)return a("missing <key>");s[o]=k,o=null}else h===2?s.push(k):s=k}function D(k){if(h===1){if(o===null)return a("missing <key>");s[o]=k,o=null}else h===2?s.push(k):s=k}function E(k){if(h===1){if(o===null)return a("missing <key>");s[o]=k,o=null}else h===2?s.push(k):s=k}function x(){let k=l(">"),F=!1;return k.charCodeAt(k.length-1)===47&&(F=!0,k=k.substring(0,k.length-1)),{name:k.trim(),isClosed:F}}function M(k){if(k.isClosed)return"";let F=l("</");return C(">"),F.replace(/&#([0-9]+);/g,function(L,W){return String.fromCodePoint(parseInt(W,10))}).replace(/&#x([0-9a-f]+);/g,function(L,W){return String.fromCodePoint(parseInt(W,16))}).replace(/&|<|>|"|'/g,function(L){switch(L){case"&":return"&";case"<":return"<";case">":return">";case""":return'"';case"'":return"'"}return L})}for(;c<b&&(S(),!(c>=b));){const k=f.charCodeAt(c);if(u(1),k!==60)return a("expected <");if(c>=b)return a("unexpected end of input");const F=f.charCodeAt(c);if(F===63){u(1),C("?>");continue}if(F===33){if(u(1),g("--")){C("-->");continue}C(">");continue}if(F===47){if(u(1),S(),g("plist")){C(">");continue}if(g("dict")){C(">"),v();continue}if(g("array")){C(">"),T();continue}return a("unexpected closed tag")}let L=x();switch(L.name){case"dict":h===1?d():h===2?I():(s={},m!==null&&(s[m]={filename:P,line:p,char:R}),t(1,s)),L.isClosed&&v();continue;case"array":h===1?_():h===2?w():(s=[],t(2,s)),L.isClosed&&T();continue;case"key":H=M(L),h!==1?a("unexpected <key>"):o!==null?a("too many <key>"):o=H;continue;case"string":G(M(L));continue;case"real":N(parseFloat(M(L)));continue;case"integer":O(parseInt(M(L),10));continue;case"date":j(new Date(M(L)));continue;case"data":D(M(L));continue;case"true":M(L),E(!0);continue;case"false":M(L),E(!1);continue}if(!/^plist/.test(L.name))return a("unexpected opened tag "+L.name)}var H;return s}Object.defineProperty(i,"__esModule",{value:!0}),i.parsePLIST=i.parseWithLocation=void 0,i.parseWithLocation=function(f,P,m){return A(f,P,m)},i.parsePLIST=function(f){return A(f,null,null)}},583:(B,i,A)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.SyncRegistry=void 0;const f=A(752);i.SyncRegistry=class{constructor(P,m){this._onigLibPromise=m,this._grammars=new Map,this._rawGrammars=new Map,this._injectionGrammars=new Map,this._theme=P}dispose(){for(const P of this._grammars.values())P.dispose()}setTheme(P){this._theme=P}getColorMap(){return this._theme.getColorMap()}addGrammar(P,m){this._rawGrammars.set(P.scopeName,P),m&&this._injectionGrammars.set(P.scopeName,m)}lookup(P){return this._rawGrammars.get(P)}injections(P){return this._injectionGrammars.get(P)}getDefaults(){return this._theme.getDefaults()}themeMatch(P){return this._theme.match(P)}async grammarForScopeName(P,m,b,c,p){if(!this._grammars.has(P)){let R=this._rawGrammars.get(P);if(!R)return null;this._grammars.set(P,f.createGrammar(P,R,m,b,c,p,this,await this._onigLibPromise))}return this._grammars.get(P)}}},666:(B,i,A)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.CompiledRule=i.RegExpSourceList=i.RegExpSource=i.RuleFactory=i.BeginWhileRule=i.BeginEndRule=i.IncludeOnlyRule=i.MatchRule=i.CaptureRule=i.Rule=i.ruleIdToNumber=i.ruleIdFromNumber=i.whileRuleId=i.endRuleId=void 0;const f=A(807),P=A(784),m=/\\(\d+)/,b=/\\(\d+)/g;i.endRuleId=-1,i.whileRuleId=-2,i.ruleIdFromNumber=function(s){return s},i.ruleIdToNumber=function(s){return s};class c{constructor(e,n,o,t){this.$location=e,this.id=n,this._name=o||null,this._nameIsCapturing=f.RegexSource.hasCaptures(this._name),this._contentName=t||null,this._contentNameIsCapturing=f.RegexSource.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${f.basename(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,n){return this._nameIsCapturing&&this._name!==null&&e!==null&&n!==null?f.RegexSource.replaceCaptures(this._name,e,n):this._name}getContentName(e,n){return this._contentNameIsCapturing&&this._contentName!==null?f.RegexSource.replaceCaptures(this._contentName,e,n):this._contentName}}i.Rule=c;class p extends c{constructor(e,n,o,t,r){super(e,n,o,t),this.retokenizeCapturedWithRuleId=r}dispose(){}collectPatterns(e,n){throw new Error("Not supported!")}compile(e,n){throw new Error("Not supported!")}compileAG(e,n,o,t){throw new Error("Not supported!")}}i.CaptureRule=p;class R extends c{constructor(e,n,o,t,r){super(e,n,o,null),this._match=new C(t,this.id),this.captures=r,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,n){n.push(this._match)}compile(e,n){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,n,o,t){return this._getCachedCompiledPatterns(e).compileAG(e,o,t)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new l,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}}i.MatchRule=R;class u extends c{constructor(e,n,o,t,r){super(e,n,o,t),this.patterns=r.patterns,this.hasMissingPatterns=r.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,n){for(const o of this.patterns)e.getRule(o).collectPatterns(e,n)}compile(e,n){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,n,o,t){return this._getCachedCompiledPatterns(e).compileAG(e,o,t)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new l,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}}i.IncludeOnlyRule=u;class y extends c{constructor(e,n,o,t,r,a,d,_,I,w){super(e,n,o,t),this._begin=new C(r,this.id),this.beginCaptures=a,this._end=new C(d||"",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=_,this.applyEndPatternLast=I||!1,this.patterns=w.patterns,this.hasMissingPatterns=w.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,n){return this._end.resolveBackReferences(e,n)}collectPatterns(e,n){n.push(this._begin)}compile(e,n){return this._getCachedCompiledPatterns(e,n).compile(e)}compileAG(e,n,o,t){return this._getCachedCompiledPatterns(e,n).compileAG(e,o,t)}_getCachedCompiledPatterns(e,n){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new l;for(const o of this.patterns)e.getRule(o).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,n):this._cachedCompiledPatterns.setSource(0,n)),this._cachedCompiledPatterns}}i.BeginEndRule=y;class S extends c{constructor(e,n,o,t,r,a,d,_,I){super(e,n,o,t),this._begin=new C(r,this.id),this.beginCaptures=a,this.whileCaptures=_,this._while=new C(d,i.whileRuleId),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=I.patterns,this.hasMissingPatterns=I.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,n){return this._while.resolveBackReferences(e,n)}collectPatterns(e,n){n.push(this._begin)}compile(e,n){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,n,o,t){return this._getCachedCompiledPatterns(e).compileAG(e,o,t)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new l;for(const n of this.patterns)e.getRule(n).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,n){return this._getCachedCompiledWhilePatterns(e,n).compile(e)}compileWhileAG(e,n,o,t){return this._getCachedCompiledWhilePatterns(e,n).compileAG(e,o,t)}_getCachedCompiledWhilePatterns(e,n){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new l,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,n||""),this._cachedCompiledWhilePatterns}}i.BeginWhileRule=S;class g{static createCaptureRule(e,n,o,t,r){return e.registerRule(a=>new p(n,a,o,t,r))}static getCompiledRuleId(e,n,o){return e.id||n.registerRule(t=>{if(e.id=t,e.match)return new R(e.$vscodeTextmateLocation,e.id,e.name,e.match,g._compileCaptures(e.captures,n,o));if(e.begin===void 0){e.repository&&(o=f.mergeObjects({},o,e.repository));let r=e.patterns;return r===void 0&&e.include&&(r=[{include:e.include}]),new u(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,g._compilePatterns(r,n,o))}return e.while?new S(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,g._compileCaptures(e.beginCaptures||e.captures,n,o),e.while,g._compileCaptures(e.whileCaptures||e.captures,n,o),g._compilePatterns(e.patterns,n,o)):new y(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,g._compileCaptures(e.beginCaptures||e.captures,n,o),e.end,g._compileCaptures(e.endCaptures||e.captures,n,o),e.applyEndPatternLast,g._compilePatterns(e.patterns,n,o))}),e.id}static _compileCaptures(e,n,o){let t=[];if(e){let r=0;for(const a in e){if(a==="$vscodeTextmateLocation")continue;const d=parseInt(a,10);d>r&&(r=d)}for(let a=0;a<=r;a++)t[a]=null;for(const a in e){if(a==="$vscodeTextmateLocation")continue;const d=parseInt(a,10);let _=0;e[a].patterns&&(_=g.getCompiledRuleId(e[a],n,o)),t[d]=g.createCaptureRule(n,e[a].$vscodeTextmateLocation,e[a].name,e[a].contentName,_)}}return t}static _compilePatterns(e,n,o){let t=[];if(e)for(let r=0,a=e.length;r<a;r++){const d=e[r];let _=-1;if(d.include){const I=P.parseInclude(d.include);switch(I.kind){case 0:case 1:_=g.getCompiledRuleId(o[d.include],n,o);break;case 2:let w=o[I.ruleName];w&&(_=g.getCompiledRuleId(w,n,o));break;case 3:case 4:const v=I.scopeName,T=I.kind===4?I.ruleName:null,G=n.getExternalGrammar(v,o);if(G)if(T){let N=G.repository[T];N&&(_=g.getCompiledRuleId(N,n,G.repository))}else _=g.getCompiledRuleId(G.repository.$self,n,G.repository)}}else _=g.getCompiledRuleId(d,n,o);if(_!==-1){const I=n.getRule(_);let w=!1;if((I instanceof u||I instanceof y||I instanceof S)&&I.hasMissingPatterns&&I.patterns.length===0&&(w=!0),w)continue;t.push(_)}}return{patterns:t,hasMissingPatterns:(e?e.length:0)!==t.length}}}i.RuleFactory=g;class C{constructor(e,n){if(e){const o=e.length;let t=0,r=[],a=!1;for(let d=0;d<o;d++)if(e.charAt(d)==="\\"&&d+1<o){const _=e.charAt(d+1);_==="z"?(r.push(e.substring(t,d)),r.push("$(?!\\n)(?<!\\n)"),t=d+2):_!=="A"&&_!=="G"||(a=!0),d++}this.hasAnchor=a,t===0?this.source=e:(r.push(e.substring(t,o)),this.source=r.join(""))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=n,this.hasBackReferences=m.test(this.source)}clone(){return new C(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,n){let o=n.map(t=>e.substring(t.start,t.end));return b.lastIndex=0,this.source.replace(b,(t,r)=>f.escapeRegExpCharacters(o[parseInt(r,10)]||""))}_buildAnchorCache(){let e,n,o,t,r=[],a=[],d=[],_=[];for(e=0,n=this.source.length;e<n;e++)o=this.source.charAt(e),r[e]=o,a[e]=o,d[e]=o,_[e]=o,o==="\\"&&e+1<n&&(t=this.source.charAt(e+1),t==="A"?(r[e+1]="",a[e+1]="",d[e+1]="A",_[e+1]="A"):t==="G"?(r[e+1]="",a[e+1]="G",d[e+1]="",_[e+1]="G"):(r[e+1]=t,a[e+1]=t,d[e+1]=t,_[e+1]=t),e++);return{A0_G0:r.join(""),A0_G1:a.join(""),A1_G0:d.join(""),A1_G1:_.join("")}}resolveAnchors(e,n){return this.hasAnchor&&this._anchorCache?e?n?this._anchorCache.A1_G1:this._anchorCache.A1_G0:n?this._anchorCache.A0_G1:this._anchorCache.A0_G0:this.source}}i.RegExpSource=C;class l{constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}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,n){this._items[e].source!==n&&(this._disposeCaches(),this._items[e].setSource(n))}compile(e){if(!this._cached){let n=this._items.map(o=>o.source);this._cached=new h(e,n,this._items.map(o=>o.ruleId))}return this._cached}compileAG(e,n,o){return this._hasAnchors?n?o?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,n,o)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,n,o)),this._anchorCache.A1_G0):o?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,n,o)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,n,o)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,n,o){let t=this._items.map(r=>r.resolveAnchors(n,o));return new h(e,t,this._items.map(r=>r.ruleId))}}i.RegExpSourceList=l;class h{constructor(e,n,o){this.regExps=n,this.rules=o,this.scanner=e.createOnigScanner(n)}dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const e=[];for(let n=0,o=this.rules.length;n<o;n++)e.push(" - "+this.rules[n]+": "+this.regExps[n]);return e.join(`
|
|
4
|
-
`)}findNextMatchSync(e,n,o){const t=this.scanner.findNextMatchSync(e,n,o);return t?{ruleId:this.rules[t.index],captureIndices:t.captureIndices}:null}}i.CompiledRule=h},63:(B,i,A)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.ThemeTrieElement=i.ThemeTrieElementRule=i.ColorMap=i.fontStyleToString=i.ParsedThemeRule=i.parseTheme=i.StyleAttributes=i.ScopeStack=i.Theme=void 0;const f=A(807);class P{constructor(l,h,s){this._colorMap=l,this._defaults=h,this._root=s,this._cachedMatchRoot=new f.CachedFn(e=>this._root.match(e))}static createFromRawTheme(l,h){return this.createFromParsedTheme(p(l),h)}static createFromParsedTheme(l,h){return function(s,e){s.sort((_,I)=>{let w=f.strcmp(_.scope,I.scope);return w!==0?w:(w=f.strArrCmp(_.parentScopes,I.parentScopes),w!==0?w:_.index-I.index)});let n=0,o="#000000",t="#ffffff";for(;s.length>=1&&s[0].scope==="";){let _=s.shift();_.fontStyle!==-1&&(n=_.fontStyle),_.foreground!==null&&(o=_.foreground),_.background!==null&&(t=_.background)}let r=new u(e),a=new c(n,r.getId(o),r.getId(t)),d=new g(new S(0,null,-1,0,0),[]);for(let _=0,I=s.length;_<I;_++){let w=s[_];d.insert(0,w.scope,w.parentScopes,w.fontStyle,r.getId(w.foreground),r.getId(w.background))}return new P(r,a,d)}(l,h)}getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(l){if(l===null)return this._defaults;const h=l.scopeName,s=this._cachedMatchRoot.get(h).find(e=>function(n,o){if(o.length===0)return!0;for(let t=0;t<o.length;t++){let r=o[t],a=!1;if(r===">"){if(t===o.length-1)return!1;r=o[++t],a=!0}for(;n&&!b(n.scopeName,r);){if(a)return!1;n=n.parent}if(!n)return!1;n=n.parent}return!0}(l.parent,e.parentScopes));return s?new c(s.fontStyle,s.foreground,s.background):null}}i.Theme=P;class m{constructor(l,h){this.parent=l,this.scopeName=h}static push(l,h){for(const s of h)l=new m(l,s);return l}static from(...l){let h=null;for(let s=0;s<l.length;s++)h=new m(h,l[s]);return h}push(l){return new m(this,l)}getSegments(){let l=this;const h=[];for(;l;)h.push(l.scopeName),l=l.parent;return h.reverse(),h}toString(){return this.getSegments().join(" ")}extends(l){return this===l||this.parent!==null&&this.parent.extends(l)}getExtensionIfDefined(l){const h=[];let s=this;for(;s&&s!==l;)h.push(s.scopeName),s=s.parent;return s===l?h.reverse():void 0}}function b(C,l){return l===C||C.startsWith(l)&&C[l.length]==="."}i.ScopeStack=m;class c{constructor(l,h,s){this.fontStyle=l,this.foregroundId=h,this.backgroundId=s}}function p(C){if(!C)return[];if(!C.settings||!Array.isArray(C.settings))return[];let l=C.settings,h=[],s=0;for(let e=0,n=l.length;e<n;e++){let o,t=l[e];if(!t.settings)continue;if(typeof t.scope=="string"){let _=t.scope;_=_.replace(/^[,]+/,""),_=_.replace(/[,]+$/,""),o=_.split(",")}else o=Array.isArray(t.scope)?t.scope:[""];let r=-1;if(typeof t.settings.fontStyle=="string"){r=0;let _=t.settings.fontStyle.split(" ");for(let I=0,w=_.length;I<w;I++)switch(_[I]){case"italic":r|=1;break;case"bold":r|=2;break;case"underline":r|=4;break;case"strikethrough":r|=8}}let a=null;typeof t.settings.foreground=="string"&&f.isValidHexColor(t.settings.foreground)&&(a=t.settings.foreground);let d=null;typeof t.settings.background=="string"&&f.isValidHexColor(t.settings.background)&&(d=t.settings.background);for(let _=0,I=o.length;_<I;_++){let w=o[_].trim().split(" "),v=w[w.length-1],T=null;w.length>1&&(T=w.slice(0,w.length-1),T.reverse()),h[s++]=new R(v,T,e,r,a,d)}}return h}i.StyleAttributes=c,i.parseTheme=p;class R{constructor(l,h,s,e,n,o){this.scope=l,this.parentScopes=h,this.index=s,this.fontStyle=e,this.foreground=n,this.background=o}}i.ParsedThemeRule=R,i.fontStyleToString=function(C){if(C===-1)return"not set";let l="";return 1&C&&(l+="italic "),2&C&&(l+="bold "),4&C&&(l+="underline "),8&C&&(l+="strikethrough "),l===""&&(l="none"),l.trim()};class u{constructor(l){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(l)){this._isFrozen=!0;for(let h=0,s=l.length;h<s;h++)this._color2id[l[h]]=h,this._id2color[h]=l[h]}else this._isFrozen=!1}getId(l){if(l===null)return 0;l=l.toUpperCase();let h=this._color2id[l];if(h)return h;if(this._isFrozen)throw new Error(`Missing color in color map - ${l}`);return h=++this._lastColorId,this._color2id[l]=h,this._id2color[h]=l,h}getColorMap(){return this._id2color.slice(0)}}i.ColorMap=u;const y=Object.freeze([]);class S{constructor(l,h,s,e,n){this.scopeDepth=l,this.parentScopes=h||y,this.fontStyle=s,this.foreground=e,this.background=n}clone(){return new S(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(l){let h=[];for(let s=0,e=l.length;s<e;s++)h[s]=l[s].clone();return h}acceptOverwrite(l,h,s,e){this.scopeDepth>l?console.log("how did this happen?"):this.scopeDepth=l,h!==-1&&(this.fontStyle=h),s!==0&&(this.foreground=s),e!==0&&(this.background=e)}}i.ThemeTrieElementRule=S;class g{constructor(l,h=[],s={}){this._mainRule=l,this._children=s,this._rulesWithParentScopes=h}static _cmpBySpecificity(l,h){if(l.scopeDepth!==h.scopeDepth)return h.scopeDepth-l.scopeDepth;let s=0,e=0;for(;l.parentScopes[s]===">"&&s++,h.parentScopes[e]===">"&&e++,!(s>=l.parentScopes.length||e>=h.parentScopes.length);){const n=h.parentScopes[e].length-l.parentScopes[s].length;if(n!==0)return n;s++,e++}return h.parentScopes.length-l.parentScopes.length}match(l){if(l!==""){let s,e,n=l.indexOf(".");if(n===-1?(s=l,e=""):(s=l.substring(0,n),e=l.substring(n+1)),this._children.hasOwnProperty(s))return this._children[s].match(e)}const h=this._rulesWithParentScopes.concat(this._mainRule);return h.sort(g._cmpBySpecificity),h}insert(l,h,s,e,n,o){if(h==="")return void this._doInsertHere(l,s,e,n,o);let t,r,a,d=h.indexOf(".");d===-1?(t=h,r=""):(t=h.substring(0,d),r=h.substring(d+1)),this._children.hasOwnProperty(t)?a=this._children[t]:(a=new g(this._mainRule.clone(),S.cloneArr(this._rulesWithParentScopes)),this._children[t]=a),a.insert(l+1,r,s,e,n,o)}_doInsertHere(l,h,s,e,n){if(h!==null){for(let o=0,t=this._rulesWithParentScopes.length;o<t;o++){let r=this._rulesWithParentScopes[o];if(f.strArrCmp(r.parentScopes,h)===0)return void r.acceptOverwrite(l,s,e,n)}s===-1&&(s=this._mainRule.fontStyle),e===0&&(e=this._mainRule.foreground),n===0&&(n=this._mainRule.background),this._rulesWithParentScopes.push(new S(l,h,s,e,n))}else this._mainRule.acceptOverwrite(l,s,e,n)}}i.ThemeTrieElement=g},807:(B,i)=>{function A(m){return Array.isArray(m)?function(b){let c=[];for(let p=0,R=b.length;p<R;p++)c[p]=A(b[p]);return c}(m):typeof m=="object"?function(b){let c={};for(let p in b)c[p]=A(b[p]);return c}(m):m}Object.defineProperty(i,"__esModule",{value:!0}),i.performanceNow=i.CachedFn=i.escapeRegExpCharacters=i.isValidHexColor=i.strArrCmp=i.strcmp=i.RegexSource=i.basename=i.mergeObjects=i.clone=void 0,i.clone=function(m){return A(m)},i.mergeObjects=function(m,...b){return b.forEach(c=>{for(let p in c)m[p]=c[p]}),m},i.basename=function m(b){const c=~b.lastIndexOf("/")||~b.lastIndexOf("\\");return c===0?b:~c==b.length-1?m(b.substring(0,b.length-1)):b.substr(1+~c)};let f=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g;function P(m,b){return m<b?-1:m>b?1:0}i.RegexSource=class{static hasCaptures(m){return m!==null&&(f.lastIndex=0,f.test(m))}static replaceCaptures(m,b,c){return m.replace(f,(p,R,u,y)=>{let S=c[parseInt(R||u,10)];if(!S)return p;{let g=b.substring(S.start,S.end);for(;g[0]===".";)g=g.substring(1);switch(y){case"downcase":return g.toLowerCase();case"upcase":return g.toUpperCase();default:return g}}})}},i.strcmp=P,i.strArrCmp=function(m,b){if(m===null&&b===null)return 0;if(!m)return-1;if(!b)return 1;let c=m.length,p=b.length;if(c===p){for(let R=0;R<c;R++){let u=P(m[R],b[R]);if(u!==0)return u}return 0}return c-p},i.isValidHexColor=function(m){return!!(/^#[0-9a-f]{6}$/i.test(m)||/^#[0-9a-f]{8}$/i.test(m)||/^#[0-9a-f]{3}$/i.test(m)||/^#[0-9a-f]{4}$/i.test(m))},i.escapeRegExpCharacters=function(m){return m.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")},i.CachedFn=class{constructor(m){this.fn=m,this.cache=new Map}get(m){if(this.cache.has(m))return this.cache.get(m);const b=this.fn(m);return this.cache.set(m,b),b}},i.performanceNow=typeof performance>"u"?function(){return Date.now()}:function(){return performance.now()}}},z={};return function B(i){var A=z[i];if(A!==void 0)return A.exports;var f=z[i]={exports:{}};return U[i].call(f.exports,f,f.exports,B),f.exports}(625)})())}(ie)),ie.exports}var pe=ye(),Se=ge(pe),Ce=_e({__proto__:null,default:Se},[pe]);export{Ce as m};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{tR as ge}from"./index-BwfWF2CI.js";function _e(Q,oe){for(var V=0;V<oe.length;V++){const U=oe[V];if(typeof U!="string"&&!Array.isArray(U)){for(const $ in U)if($!=="default"&&!($ in Q)){const O=Object.getOwnPropertyDescriptor(U,$);O&&Object.defineProperty(Q,$,O.get?O:{enumerable:!0,get:()=>U[$]})}}}return Object.freeze(Object.defineProperty(Q,Symbol.toStringTag,{value:"Module"}))}var ie={exports:{}},be=ie.exports,he;function ye(){return he||(he=1,function(Q,oe){var V={};(function(U,$){Q.exports=$()})(be,()=>(()=>{var U={185:(O,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.UseOnigurumaFindOptions=i.DebugFlags=void 0,i.DebugFlags={InDebugMode:typeof process<"u"&&!!V.VSCODE_TEXTMATE_DEBUG},i.UseOnigurumaFindOptions=!1},151:(O,i,A)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.applyStateStackDiff=i.diffStateStacksRefEq=void 0;const f=A(752);i.diffStateStacksRefEq=function(P,m){let b=0;const c=[];let p=P,R=m;for(;p!==R;)p&&(!R||p.depth>=R.depth)?(b++,p=p.parent):(c.push(R.toStateStackFrame()),R=R.parent);return{pops:b,newFrames:c.reverse()}},i.applyStateStackDiff=function(P,m){let b=P;for(let c=0;c<m.pops;c++)b=b.parent;for(const c of m.newFrames)b=f.StateStackImpl.pushFrame(b,c);return b}},490:(O,i)=>{var A;Object.defineProperty(i,"__esModule",{value:!0}),i.toOptionalTokenType=i.EncodedTokenAttributes=void 0,(A=i.EncodedTokenAttributes||(i.EncodedTokenAttributes={})).toBinaryStr=function(f){return f.toString(2).padStart(32,"0")},A.print=function(f){const P=A.getLanguageId(f),m=A.getTokenType(f),b=A.getFontStyle(f),c=A.getForeground(f),p=A.getBackground(f);console.log({languageId:P,tokenType:m,fontStyle:b,foreground:c,background:p})},A.getLanguageId=function(f){return(255&f)>>>0},A.getTokenType=function(f){return(768&f)>>>8},A.containsBalancedBrackets=function(f){return!!(1024&f)},A.getFontStyle=function(f){return(30720&f)>>>11},A.getForeground=function(f){return(16744448&f)>>>15},A.getBackground=function(f){return(4278190080&f)>>>24},A.set=function(f,P,m,b,c,p,R){let u=A.getLanguageId(f),y=A.getTokenType(f),S=A.containsBalancedBrackets(f)?1:0,g=A.getFontStyle(f),C=A.getForeground(f),l=A.getBackground(f);return P!==0&&(u=P),m!==8&&(y=m),b!==null&&(S=b?1:0),c!==-1&&(g=c),p!==0&&(C=p),R!==0&&(l=R),(u|y<<8|S<<10|g<<11|C<<15|l<<24)>>>0},i.toOptionalTokenType=function(f){return f}},214:(O,i,A)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.BasicScopeAttributesProvider=i.BasicScopeAttributes=void 0;const f=A(807);class P{constructor(p,R){this.languageId=p,this.tokenType=R}}i.BasicScopeAttributes=P;class m{constructor(p,R){this._getBasicScopeAttributes=new f.CachedFn(u=>{const y=this._scopeToLanguage(u),S=this._toStandardTokenType(u);return new P(y,S)}),this._defaultAttributes=new P(p,8),this._embeddedLanguagesMatcher=new b(Object.entries(R||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(p){return p===null?m._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(p)}_scopeToLanguage(p){return this._embeddedLanguagesMatcher.match(p)||0}_toStandardTokenType(p){const R=p.match(m.STANDARD_TOKEN_TYPE_REGEXP);if(!R)return 8;switch(R[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}}i.BasicScopeAttributesProvider=m,m._NULL_SCOPE_METADATA=new P(0,0),m.STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/;class b{constructor(p){if(p.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(p);const R=p.map(([u,y])=>f.escapeRegExpCharacters(u));R.sort(),R.reverse(),this.scopesRegExp=new RegExp(`^((${R.join(")|(")}))($|\\.)`,"")}}match(p){if(!this.scopesRegExp)return;const R=p.match(this.scopesRegExp);return R?this.values.get(R[1]):void 0}}},929:(O,i,A)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.LineTokens=i.BalancedBracketSelectors=i.StateStackImpl=i.AttributedScopeStack=i.Grammar=i.createGrammar=void 0;const f=A(185),P=A(490),m=A(916),b=A(810),c=A(666),p=A(63),R=A(807),u=A(214),y=A(398);function S(o,t,r,a,d){const _=m.createMatchers(t,g),I=c.RuleFactory.getCompiledRuleId(r,a,d.repository);for(const w of _)o.push({debugSelector:t,matcher:w.matcher,ruleId:I,grammar:d,priority:w.priority})}function g(o,t){if(t.length<o.length)return!1;let r=0;return o.every(a=>{for(let d=r;d<t.length;d++)if(C(t[d],a))return r=d+1,!0;return!1})}function C(o,t){if(!o)return!1;if(o===t)return!0;const r=t.length;return o.length>r&&o.substr(0,r)===t&&o[r]==="."}i.createGrammar=function(o,t,r,a,d,_,I,w){return new l(o,t,r,a,d,_,I,w)};class l{constructor(t,r,a,d,_,I,w,v){if(this._rootScopeName=t,this.balancedBracketSelectors=I,this._onigLib=v,this._basicScopeAttributesProvider=new u.BasicScopeAttributesProvider(a,d),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=w,this._grammar=h(r,null),this._injections=null,this._tokenTypeMatchers=[],_)for(const T of Object.keys(_)){const E=m.createMatchers(T,g);for(const N of E)this._tokenTypeMatchers.push({matcher:N.matcher,type:_[T]})}}get themeProvider(){return this._grammarRepository}dispose(){for(const t of this._ruleId2desc)t&&t.dispose()}createOnigScanner(t){return this._onigLib.createOnigScanner(t)}createOnigString(t){return this._onigLib.createOnigString(t)}getMetadataForScope(t){return this._basicScopeAttributesProvider.getBasicScopeAttributes(t)}_collectInjections(){const t=[],r=this._rootScopeName,a=(d=>d===this._rootScopeName?this._grammar:this.getExternalGrammar(d))(r);if(a){const d=a.injections;if(d)for(let I in d)S(t,I,d[I],this,a);const _=this._grammarRepository.injections(r);_&&_.forEach(I=>{const w=this.getExternalGrammar(I);if(w){const v=w.injectionSelector;v&&S(t,v,w,this,w)}})}return t.sort((d,_)=>d.priority-_.priority),t}getInjections(){if(this._injections===null&&(this._injections=this._collectInjections(),f.DebugFlags.InDebugMode&&this._injections.length>0)){console.log(`Grammar ${this._rootScopeName} contains the following injections:`);for(const t of this._injections)console.log(` - ${t.debugSelector}`)}return this._injections}registerRule(t){const r=++this._lastRuleId,a=t(c.ruleIdFromNumber(r));return this._ruleId2desc[r]=a,a}getRule(t){return this._ruleId2desc[c.ruleIdToNumber(t)]}getExternalGrammar(t,r){if(this._includedGrammars[t])return this._includedGrammars[t];if(this._grammarRepository){const a=this._grammarRepository.lookup(t);if(a)return this._includedGrammars[t]=h(a,r&&r.$base),this._includedGrammars[t]}}tokenizeLine(t,r,a=0){const d=this._tokenize(t,r,!1,a);return{tokens:d.lineTokens.getResult(d.ruleStack,d.lineLength),ruleStack:d.ruleStack,stoppedEarly:d.stoppedEarly}}tokenizeLine2(t,r,a=0){const d=this._tokenize(t,r,!0,a);return{tokens:d.lineTokens.getBinaryResult(d.ruleStack,d.lineLength),ruleStack:d.ruleStack,stoppedEarly:d.stoppedEarly}}_tokenize(t,r,a,d){let _;if(this._rootId===-1&&(this._rootId=c.RuleFactory.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections()),r&&r!==e.NULL)_=!1,r.reset();else{_=!0;const E=this._basicScopeAttributesProvider.getDefaultAttributes(),N=this.themeProvider.getDefaults(),D=P.EncodedTokenAttributes.set(0,E.languageId,E.tokenType,null,N.fontStyle,N.foregroundId,N.backgroundId),j=this.getRule(this._rootId).getName(null,null);let F;F=j?s.createRootAndLookUpScopeName(j,D,this):s.createRoot("unknown",D),r=new e(null,this._rootId,-1,-1,!1,null,F,F)}t+=`
|
|
2
|
-
`;const I=this.createOnigString(t),w=I.content.length,v=new n(a,t,this._tokenTypeMatchers,this.balancedBracketSelectors),T=y._tokenizeString(this,I,_,0,r,v,!0,d);return b.disposeOnigString(I),{lineLength:w,lineTokens:v,ruleStack:T.stack,stoppedEarly:T.stoppedEarly}}}function h(o,t){return(o=R.clone(o)).repository=o.repository||{},o.repository.$self={$vscodeTextmateLocation:o.$vscodeTextmateLocation,patterns:o.patterns,name:o.scopeName},o.repository.$base=t||o.repository.$self,o}i.Grammar=l;class s{constructor(t,r,a){this.parent=t,this.scopePath=r,this.tokenAttributes=a}static fromExtension(t,r){let a=t,d=t?.scopePath??null;for(const _ of r)d=p.ScopeStack.push(d,_.scopeNames),a=new s(a,d,_.encodedTokenAttributes);return a}static createRoot(t,r){return new s(null,new p.ScopeStack(null,t),r)}static createRootAndLookUpScopeName(t,r,a){const d=a.getMetadataForScope(t),_=new p.ScopeStack(null,t),I=a.themeProvider.themeMatch(_),w=s.mergeAttributes(r,d,I);return new s(null,_,w)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return s.equals(this,t)}static equals(t,r){for(;;){if(t===r||!t&&!r)return!0;if(!t||!r||t.scopeName!==r.scopeName||t.tokenAttributes!==r.tokenAttributes)return!1;t=t.parent,r=r.parent}}static mergeAttributes(t,r,a){let d=-1,_=0,I=0;return a!==null&&(d=a.fontStyle,_=a.foregroundId,I=a.backgroundId),P.EncodedTokenAttributes.set(t,r.languageId,r.tokenType,null,d,_,I)}pushAttributed(t,r){if(t===null)return this;if(t.indexOf(" ")===-1)return s._pushAttributed(this,t,r);const a=t.split(/ /g);let d=this;for(const _ of a)d=s._pushAttributed(d,_,r);return d}static _pushAttributed(t,r,a){const d=a.getMetadataForScope(r),_=t.scopePath.push(r),I=a.themeProvider.themeMatch(_),w=s.mergeAttributes(t.tokenAttributes,d,I);return new s(t,_,w)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(t){const r=[];let a=this;for(;a&&a!==t;)r.push({encodedTokenAttributes:a.tokenAttributes,scopeNames:a.scopePath.getExtensionIfDefined(a.parent?.scopePath??null)}),a=a.parent;return a===t?r.reverse():void 0}}i.AttributedScopeStack=s;class e{constructor(t,r,a,d,_,I,w,v){this.parent=t,this.ruleId=r,this.beginRuleCapturedEOL=_,this.endRule=I,this.nameScopesList=w,this.contentNameScopesList=v,this._stackElementBrand=void 0,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=a,this._anchorPos=d}equals(t){return t!==null&&e._equals(this,t)}static _equals(t,r){return t===r||!!this._structuralEquals(t,r)&&s.equals(t.contentNameScopesList,r.contentNameScopesList)}static _structuralEquals(t,r){for(;;){if(t===r||!t&&!r)return!0;if(!t||!r||t.depth!==r.depth||t.ruleId!==r.ruleId||t.endRule!==r.endRule)return!1;t=t.parent,r=r.parent}}clone(){return this}static _reset(t){for(;t;)t._enterPos=-1,t._anchorPos=-1,t=t.parent}reset(){e._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,r,a,d,_,I,w){return new e(this,t,r,a,d,_,I,w)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(t){return t.getRule(this.ruleId)}toString(){const t=[];return this._writeString(t,0),"["+t.join(",")+"]"}_writeString(t,r){return this.parent&&(r=this.parent._writeString(t,r)),t[r++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,r}withContentNameScopesList(t){return this.contentNameScopesList===t?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,t)}withEndRule(t){return this.endRule===t?this:new e(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(t){let r=this;for(;r&&r._enterPos===t._enterPos;){if(r.ruleId===t.ruleId)return!0;r=r.parent}return!1}toStateStackFrame(){return{ruleId:c.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(t,r){const a=s.fromExtension(t?.nameScopesList??null,r.nameScopesList);return new e(t,c.ruleIdFromNumber(r.ruleId),r.enterPos??-1,r.anchorPos??-1,r.beginRuleCapturedEOL,r.endRule,a,s.fromExtension(a,r.contentNameScopesList))}}i.StateStackImpl=e,e.NULL=new e(null,0,0,0,!1,null,null,null),i.BalancedBracketSelectors=class{constructor(o,t){this.allowAny=!1,this.balancedBracketScopes=o.flatMap(r=>r==="*"?(this.allowAny=!0,[]):m.createMatchers(r,g).map(a=>a.matcher)),this.unbalancedBracketScopes=t.flatMap(r=>m.createMatchers(r,g).map(a=>a.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(o){for(const t of this.unbalancedBracketScopes)if(t(o))return!1;for(const t of this.balancedBracketScopes)if(t(o))return!0;return this.allowAny}};class n{constructor(t,r,a,d){this.balancedBracketSelectors=d,this._emitBinaryTokens=t,this._tokenTypeOverrides=a,f.DebugFlags.InDebugMode?this._lineText=r:this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}produce(t,r){this.produceFromScopes(t.contentNameScopesList,r)}produceFromScopes(t,r){if(this._lastTokenEndIndex>=r)return;if(this._emitBinaryTokens){let d=t?.tokenAttributes??0,_=!1;if(this.balancedBracketSelectors?.matchesAlways&&(_=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const I=t?.getScopeNames()??[];for(const w of this._tokenTypeOverrides)w.matcher(I)&&(d=P.EncodedTokenAttributes.set(d,0,P.toOptionalTokenType(w.type),null,-1,0,0));this.balancedBracketSelectors&&(_=this.balancedBracketSelectors.match(I))}if(_&&(d=P.EncodedTokenAttributes.set(d,0,8,_,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===d)return void(this._lastTokenEndIndex=r);if(f.DebugFlags.InDebugMode){const I=t?.getScopeNames()??[];console.log(" token: |"+this._lineText.substring(this._lastTokenEndIndex,r).replace(/\n$/,"\\n")+"|");for(let w=0;w<I.length;w++)console.log(" * "+I[w])}return this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(d),void(this._lastTokenEndIndex=r)}const a=t?.getScopeNames()??[];if(f.DebugFlags.InDebugMode){console.log(" token: |"+this._lineText.substring(this._lastTokenEndIndex,r).replace(/\n$/,"\\n")+"|");for(let d=0;d<a.length;d++)console.log(" * "+a[d])}this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:r,scopes:a}),this._lastTokenEndIndex=r}getResult(t,r){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===r-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(t,r),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(t,r){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===r-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(t,r),this._binaryTokens[this._binaryTokens.length-2]=0);const a=new Uint32Array(this._binaryTokens.length);for(let d=0,_=this._binaryTokens.length;d<_;d++)a[d]=this._binaryTokens[d];return a}}i.LineTokens=n},784:(O,i,A)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.parseInclude=i.TopLevelRepositoryReference=i.TopLevelReference=i.RelativeReference=i.SelfReference=i.BaseReference=i.ScopeDependencyProcessor=i.ExternalReferenceCollector=i.TopLevelRepositoryRuleReference=i.TopLevelRuleReference=void 0;const f=A(807);class P{constructor(e){this.scopeName=e}toKey(){return this.scopeName}}i.TopLevelRuleReference=P;class m{constructor(e,n){this.scopeName=e,this.ruleName=n}toKey(){return`${this.scopeName}#${this.ruleName}`}}i.TopLevelRepositoryRuleReference=m;class b{constructor(){this._references=[],this._seenReferenceKeys=new Set,this.visitedRule=new Set}get references(){return this._references}add(e){const n=e.toKey();this._seenReferenceKeys.has(n)||(this._seenReferenceKeys.add(n),this._references.push(e))}}function c(s,e,n,o){const t=n.lookup(s.scopeName);if(!t){if(s.scopeName===e)throw new Error(`No grammar provided for <${e}>`);return}const r=n.lookup(e);s instanceof P?R({baseGrammar:r,selfGrammar:t},o):p(s.ruleName,{baseGrammar:r,selfGrammar:t,repository:t.repository},o);const a=n.injections(s.scopeName);if(a)for(const d of a)o.add(new P(d))}function p(s,e,n){e.repository&&e.repository[s]&&u([e.repository[s]],e,n)}function R(s,e){s.selfGrammar.patterns&&Array.isArray(s.selfGrammar.patterns)&&u(s.selfGrammar.patterns,{...s,repository:s.selfGrammar.repository},e),s.selfGrammar.injections&&u(Object.values(s.selfGrammar.injections),{...s,repository:s.selfGrammar.repository},e)}function u(s,e,n){for(const o of s){if(n.visitedRule.has(o))continue;n.visitedRule.add(o);const t=o.repository?f.mergeObjects({},e.repository,o.repository):e.repository;Array.isArray(o.patterns)&&u(o.patterns,{...e,repository:t},n);const r=o.include;if(!r)continue;const a=h(r);switch(a.kind){case 0:R({...e,selfGrammar:e.baseGrammar},n);break;case 1:R(e,n);break;case 2:p(a.ruleName,{...e,repository:t},n);break;case 3:case 4:const d=a.scopeName===e.selfGrammar.scopeName?e.selfGrammar:a.scopeName===e.baseGrammar.scopeName?e.baseGrammar:void 0;if(d){const _={baseGrammar:e.baseGrammar,selfGrammar:d,repository:t};a.kind===4?p(a.ruleName,_,n):R(_,n)}else a.kind===4?n.add(new m(a.scopeName,a.ruleName)):n.add(new P(a.scopeName))}}}i.ExternalReferenceCollector=b,i.ScopeDependencyProcessor=class{constructor(s,e){this.repo=s,this.initialScopeName=e,this.seenFullScopeRequests=new Set,this.seenPartialScopeRequests=new Set,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new P(this.initialScopeName)]}processQueue(){const s=this.Q;this.Q=[];const e=new b;for(const n of s)c(n,this.initialScopeName,this.repo,e);for(const n of e.references)if(n instanceof P){if(this.seenFullScopeRequests.has(n.scopeName))continue;this.seenFullScopeRequests.add(n.scopeName),this.Q.push(n)}else{if(this.seenFullScopeRequests.has(n.scopeName)||this.seenPartialScopeRequests.has(n.toKey()))continue;this.seenPartialScopeRequests.add(n.toKey()),this.Q.push(n)}}};class y{constructor(){this.kind=0}}i.BaseReference=y;class S{constructor(){this.kind=1}}i.SelfReference=S;class g{constructor(e){this.ruleName=e,this.kind=2}}i.RelativeReference=g;class C{constructor(e){this.scopeName=e,this.kind=3}}i.TopLevelReference=C;class l{constructor(e,n){this.scopeName=e,this.ruleName=n,this.kind=4}}function h(s){if(s==="$base")return new y;if(s==="$self")return new S;const e=s.indexOf("#");if(e===-1)return new C(s);if(e===0)return new g(s.substring(1));{const n=s.substring(0,e),o=s.substring(e+1);return new l(n,o)}}i.TopLevelRepositoryReference=l,i.parseInclude=h},752:function(O,i,A){var f=this&&this.__createBinding||(Object.create?function(m,b,c,p){p===void 0&&(p=c),Object.defineProperty(m,p,{enumerable:!0,get:function(){return b[c]}})}:function(m,b,c,p){p===void 0&&(p=c),m[p]=b[c]}),P=this&&this.__exportStar||function(m,b){for(var c in m)c==="default"||Object.prototype.hasOwnProperty.call(b,c)||f(b,m,c)};Object.defineProperty(i,"__esModule",{value:!0}),P(A(929),i)},398:(O,i,A)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.LocalStackElement=i._tokenizeString=void 0;const f=A(185),P=A(810),m=A(666),b=A(807);class c{constructor(l,h){this.stack=l,this.stoppedEarly=h}}function p(C,l,h,s,e,n,o,t){const r=l.content.length;let a=!1,d=-1;if(o){const w=function(v,T,E,N,D,j){let F=D.beginRuleCapturedEOL?0:-1;const G=[];for(let x=D;x;x=x.pop()){const M=x.getRule(v);M instanceof m.BeginWhileRule&&G.push({rule:M,stack:x})}for(let x=G.pop();x;x=G.pop()){const{ruleScanner:M,findOptions:z}=u(x.rule,v,x.stack.endRule,E,N===F),k=M.findNextMatchSync(T,N,z);if(f.DebugFlags.InDebugMode&&(console.log(" scanning for while rule"),console.log(M.toString())),!k){f.DebugFlags.InDebugMode&&console.log(" popping "+x.rule.debugName+" - "+x.rule.debugWhileRegExp),D=x.stack.pop();break}if(k.ruleId!==m.whileRuleId){D=x.stack.pop();break}k.captureIndices&&k.captureIndices.length&&(j.produce(x.stack,k.captureIndices[0].start),S(v,T,E,x.stack,j,x.rule.whileCaptures,k.captureIndices),j.produce(x.stack,k.captureIndices[0].end),F=k.captureIndices[0].end,k.captureIndices[0].end>N&&(N=k.captureIndices[0].end,E=!1))}return{stack:D,linePos:N,anchorPosition:F,isFirstLine:E}}(C,l,h,s,e,n);e=w.stack,s=w.linePos,h=w.isFirstLine,d=w.anchorPosition}const _=Date.now();for(;!a;){if(t!==0&&Date.now()-_>t)return new c(e,!0);I()}return new c(e,!1);function I(){f.DebugFlags.InDebugMode&&(console.log(""),console.log(`@@scanNext ${s}: |${l.content.substr(s).replace(/\n$/,"\\n")}|`));const w=function(N,D,j,F,G,x){const M=function(q,J,ae,X,H,te){const Y=H.getRule(q),{ruleScanner:Z,findOptions:ee}=R(Y,q,H.endRule,ae,X===te);let K=0;f.DebugFlags.InDebugMode&&(K=b.performanceNow());const W=Z.findNextMatchSync(J,X,ee);if(f.DebugFlags.InDebugMode){const ne=b.performanceNow()-K;ne>5&&console.warn(`Rule ${Y.debugName} (${Y.id}) matching took ${ne} against '${J}'`),console.log(` scanning for (linePos: ${X}, anchorPosition: ${te})`),console.log(Z.toString()),W&&console.log(`matched rule id: ${W.ruleId} from ${W.captureIndices[0].start} to ${W.captureIndices[0].end}`)}return W?{captureIndices:W.captureIndices,matchedRuleId:W.ruleId}:null}(N,D,j,F,G,x),z=N.getInjections();if(z.length===0)return M;const k=function(q,J,ae,X,H,te,Y){let Z,ee=Number.MAX_VALUE,K=null,W=0;const ne=te.contentNameScopesList.getScopeNames();for(let ce=0,de=q.length;ce<de;ce++){const se=q[ce];if(!se.matcher(ne))continue;const fe=J.getRule(se.ruleId),{ruleScanner:le,findOptions:me}=R(fe,J,null,X,H===Y),re=le.findNextMatchSync(ae,H,me);if(!re)continue;f.DebugFlags.InDebugMode&&(console.log(` matched injection: ${se.debugSelector}`),console.log(le.toString()));const ue=re.captureIndices[0].start;if(!(ue>=ee)&&(ee=ue,K=re.captureIndices,Z=re.ruleId,W=se.priority,ee===H))break}return K?{priorityMatch:W===-1,captureIndices:K,matchedRuleId:Z}:null}(z,N,D,j,F,G,x);if(!k)return M;if(!M)return k;const B=M.captureIndices[0].start,L=k.captureIndices[0].start;return L<B||k.priorityMatch&&L===B?k:M}(C,l,h,s,e,d);if(!w)return f.DebugFlags.InDebugMode&&console.log(" no more matches."),n.produce(e,r),void(a=!0);const v=w.captureIndices,T=w.matchedRuleId,E=!!(v&&v.length>0)&&v[0].end>s;if(T===m.endRuleId){const N=e.getRule(C);f.DebugFlags.InDebugMode&&console.log(" popping "+N.debugName+" - "+N.debugEndRegExp),n.produce(e,v[0].start),e=e.withContentNameScopesList(e.nameScopesList),S(C,l,h,e,n,N.endCaptures,v),n.produce(e,v[0].end);const D=e;if(e=e.parent,d=D.getAnchorPos(),!E&&D.getEnterPos()===s)return f.DebugFlags.InDebugMode&&console.error("[1] - Grammar is in an endless loop - Grammar pushed & popped a rule without advancing"),e=D,n.produce(e,r),void(a=!0)}else{const N=C.getRule(T);n.produce(e,v[0].start);const D=e,j=N.getName(l.content,v),F=e.contentNameScopesList.pushAttributed(j,C);if(e=e.push(T,s,d,v[0].end===r,null,F,F),N instanceof m.BeginEndRule){const G=N;f.DebugFlags.InDebugMode&&console.log(" pushing "+G.debugName+" - "+G.debugBeginRegExp),S(C,l,h,e,n,G.beginCaptures,v),n.produce(e,v[0].end),d=v[0].end;const x=G.getContentName(l.content,v),M=F.pushAttributed(x,C);if(e=e.withContentNameScopesList(M),G.endHasBackReferences&&(e=e.withEndRule(G.getEndWithResolvedBackReferences(l.content,v))),!E&&D.hasSameRuleAs(e))return f.DebugFlags.InDebugMode&&console.error("[2] - Grammar is in an endless loop - Grammar pushed the same rule without advancing"),e=e.pop(),n.produce(e,r),void(a=!0)}else if(N instanceof m.BeginWhileRule){const G=N;f.DebugFlags.InDebugMode&&console.log(" pushing "+G.debugName),S(C,l,h,e,n,G.beginCaptures,v),n.produce(e,v[0].end),d=v[0].end;const x=G.getContentName(l.content,v),M=F.pushAttributed(x,C);if(e=e.withContentNameScopesList(M),G.whileHasBackReferences&&(e=e.withEndRule(G.getWhileWithResolvedBackReferences(l.content,v))),!E&&D.hasSameRuleAs(e))return f.DebugFlags.InDebugMode&&console.error("[3] - Grammar is in an endless loop - Grammar pushed the same rule without advancing"),e=e.pop(),n.produce(e,r),void(a=!0)}else{const G=N;if(f.DebugFlags.InDebugMode&&console.log(" matched "+G.debugName+" - "+G.debugMatchRegExp),S(C,l,h,e,n,G.captures,v),n.produce(e,v[0].end),e=e.pop(),!E)return f.DebugFlags.InDebugMode&&console.error("[4] - Grammar is in an endless loop - Grammar is not advancing, nor is it pushing/popping"),e=e.safePop(),n.produce(e,r),void(a=!0)}}v[0].end>s&&(s=v[0].end,h=!1)}}function R(C,l,h,s,e){return f.UseOnigurumaFindOptions?{ruleScanner:C.compile(l,h),findOptions:y(s,e)}:{ruleScanner:C.compileAG(l,h,s,e),findOptions:0}}function u(C,l,h,s,e){return f.UseOnigurumaFindOptions?{ruleScanner:C.compileWhile(l,h),findOptions:y(s,e)}:{ruleScanner:C.compileWhileAG(l,h,s,e),findOptions:0}}function y(C,l){let h=0;return C||(h|=1),l||(h|=4),h}function S(C,l,h,s,e,n,o){if(n.length===0)return;const t=l.content,r=Math.min(n.length,o.length),a=[],d=o[0].end;for(let _=0;_<r;_++){const I=n[_];if(I===null)continue;const w=o[_];if(w.length===0)continue;if(w.start>d)break;for(;a.length>0&&a[a.length-1].endPos<=w.start;)e.produceFromScopes(a[a.length-1].scopes,a[a.length-1].endPos),a.pop();if(a.length>0?e.produceFromScopes(a[a.length-1].scopes,w.start):e.produce(s,w.start),I.retokenizeCapturedWithRuleId){const T=I.getName(t,o),E=s.contentNameScopesList.pushAttributed(T,C),N=I.getContentName(t,o),D=E.pushAttributed(N,C),j=s.push(I.retokenizeCapturedWithRuleId,w.start,-1,!1,null,E,D),F=C.createOnigString(t.substring(0,w.end));p(C,F,h&&w.start===0,w.start,j,e,!1,0),P.disposeOnigString(F);continue}const v=I.getName(t,o);if(v!==null){const T=(a.length>0?a[a.length-1].scopes:s.contentNameScopesList).pushAttributed(v,C);a.push(new g(T,w.end))}}for(;a.length>0;)e.produceFromScopes(a[a.length-1].scopes,a[a.length-1].endPos),a.pop()}i._tokenizeString=p;class g{constructor(l,h){this.scopes=l,this.endPos=h}}i.LocalStackElement=g},726:(O,i)=>{function A(b,c){throw new Error("Near offset "+b.pos+": "+c+" ~~~"+b.source.substr(b.pos,50)+"~~~")}Object.defineProperty(i,"__esModule",{value:!0}),i.parseJSON=void 0,i.parseJSON=function(b,c,p){let R=new f(b),u=new P,y=0,S=null,g=[],C=[];function l(){g.push(y),C.push(S)}function h(){y=g.pop(),S=C.pop()}function s(e){A(R,e)}for(;m(R,u);){if(y===0){if(S!==null&&s("too many constructs in root"),u.type===3){S={},p&&(S.$vscodeTextmateLocation=u.toLocation(c)),l(),y=1;continue}if(u.type===2){S=[],l(),y=4;continue}s("unexpected token in root")}if(y===2){if(u.type===5){h();continue}if(u.type===7){y=3;continue}s("expected , or }")}if(y===1||y===3){if(y===1&&u.type===5){h();continue}if(u.type===1){let e=u.value;if(m(R,u)&&u.type===6||s("expected colon"),m(R,u)||s("expected value"),y=2,u.type===1){S[e]=u.value;continue}if(u.type===8){S[e]=null;continue}if(u.type===9){S[e]=!0;continue}if(u.type===10){S[e]=!1;continue}if(u.type===11){S[e]=parseFloat(u.value);continue}if(u.type===2){let n=[];S[e]=n,l(),y=4,S=n;continue}if(u.type===3){let n={};p&&(n.$vscodeTextmateLocation=u.toLocation(c)),S[e]=n,l(),y=1,S=n;continue}}s("unexpected token in dict")}if(y===5){if(u.type===4){h();continue}if(u.type===7){y=6;continue}s("expected , or ]")}if(y===4||y===6){if(y===4&&u.type===4){h();continue}if(y=5,u.type===1){S.push(u.value);continue}if(u.type===8){S.push(null);continue}if(u.type===9){S.push(!0);continue}if(u.type===10){S.push(!1);continue}if(u.type===11){S.push(parseFloat(u.value));continue}if(u.type===2){let e=[];S.push(e),l(),y=4,S=e;continue}if(u.type===3){let e={};p&&(e.$vscodeTextmateLocation=u.toLocation(c)),S.push(e),l(),y=1,S=e;continue}s("unexpected token in array")}s("unknown state")}return C.length!==0&&s("unclosed constructs"),S};class f{constructor(c){this.source=c,this.pos=0,this.len=c.length,this.line=1,this.char=0}}class P{constructor(){this.value=null,this.type=0,this.offset=-1,this.len=-1,this.line=-1,this.char=-1}toLocation(c){return{filename:c,line:this.line,char:this.char}}}function m(b,c){c.value=null,c.type=0,c.offset=-1,c.len=-1,c.line=-1,c.char=-1;let p,R=b.source,u=b.pos,y=b.len,S=b.line,g=b.char;for(;;){if(u>=y)return!1;if(p=R.charCodeAt(u),p!==32&&p!==9&&p!==13){if(p!==10)break;u++,S++,g=0}else u++,g++}if(c.offset=u,c.line=S,c.char=g,p===34){for(c.type=1,u++,g++;;){if(u>=y)return!1;if(p=R.charCodeAt(u),u++,g++,p!==92){if(p===34)break}else u++,g++}c.value=R.substring(c.offset+1,u-1).replace(/\\u([0-9A-Fa-f]{4})/g,(C,l)=>String.fromCodePoint(parseInt(l,16))).replace(/\\(.)/g,(C,l)=>{switch(l){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:A(b,"invalid escape sequence")}throw new Error("unreachable")})}else if(p===91)c.type=2,u++,g++;else if(p===123)c.type=3,u++,g++;else if(p===93)c.type=4,u++,g++;else if(p===125)c.type=5,u++,g++;else if(p===58)c.type=6,u++,g++;else if(p===44)c.type=7,u++,g++;else if(p===110){if(c.type=8,u++,g++,p=R.charCodeAt(u),p!==117||(u++,g++,p=R.charCodeAt(u),p!==108)||(u++,g++,p=R.charCodeAt(u),p!==108))return!1;u++,g++}else if(p===116){if(c.type=9,u++,g++,p=R.charCodeAt(u),p!==114||(u++,g++,p=R.charCodeAt(u),p!==117)||(u++,g++,p=R.charCodeAt(u),p!==101))return!1;u++,g++}else if(p===102){if(c.type=10,u++,g++,p=R.charCodeAt(u),p!==97||(u++,g++,p=R.charCodeAt(u),p!==108)||(u++,g++,p=R.charCodeAt(u),p!==115)||(u++,g++,p=R.charCodeAt(u),p!==101))return!1;u++,g++}else for(c.type=11;;){if(u>=y)return!1;if(p=R.charCodeAt(u),!(p===46||p>=48&&p<=57||p===101||p===69||p===45||p===43))break;u++,g++}return c.len=u-c.offset,c.value===null&&(c.value=R.substr(c.offset,c.len)),b.pos=u,b.line=S,b.char=g,!0}},625:function(O,i,A){var f=this&&this.__createBinding||(Object.create?function(y,S,g,C){C===void 0&&(C=g),Object.defineProperty(y,C,{enumerable:!0,get:function(){return S[g]}})}:function(y,S,g,C){C===void 0&&(C=g),y[C]=S[g]}),P=this&&this.__exportStar||function(y,S){for(var g in y)g==="default"||Object.prototype.hasOwnProperty.call(S,g)||f(S,y,g)};Object.defineProperty(i,"__esModule",{value:!0}),i.applyStateStackDiff=i.diffStateStacksRefEq=i.parseRawGrammar=i.INITIAL=i.Registry=void 0;const m=A(752),b=A(150),c=A(583),p=A(63),R=A(784),u=A(151);Object.defineProperty(i,"applyStateStackDiff",{enumerable:!0,get:function(){return u.applyStateStackDiff}}),Object.defineProperty(i,"diffStateStacksRefEq",{enumerable:!0,get:function(){return u.diffStateStacksRefEq}}),P(A(810),i),i.Registry=class{constructor(y){this._options=y,this._syncRegistry=new c.SyncRegistry(p.Theme.createFromRawTheme(y.theme,y.colorMap),y.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(y,S){this._syncRegistry.setTheme(p.Theme.createFromRawTheme(y,S))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(y,S,g){return this.loadGrammarWithConfiguration(y,S,{embeddedLanguages:g})}loadGrammarWithConfiguration(y,S,g){return this._loadGrammar(y,S,g.embeddedLanguages,g.tokenTypes,new m.BalancedBracketSelectors(g.balancedBracketSelectors||[],g.unbalancedBracketSelectors||[]))}loadGrammar(y){return this._loadGrammar(y,0,null,null,null)}async _loadGrammar(y,S,g,C,l){const h=new R.ScopeDependencyProcessor(this._syncRegistry,y);for(;h.Q.length>0;)await Promise.all(h.Q.map(s=>this._loadSingleGrammar(s.scopeName))),h.processQueue();return this._grammarForScopeName(y,S,g,C,l)}async _loadSingleGrammar(y){return this._ensureGrammarCache.has(y)||this._ensureGrammarCache.set(y,this._doLoadSingleGrammar(y)),this._ensureGrammarCache.get(y)}async _doLoadSingleGrammar(y){const S=await this._options.loadGrammar(y);if(S){const g=typeof this._options.getInjections=="function"?this._options.getInjections(y):void 0;this._syncRegistry.addGrammar(S,g)}}async addGrammar(y,S=[],g=0,C=null){return this._syncRegistry.addGrammar(y,S),await this._grammarForScopeName(y.scopeName,g,C)}_grammarForScopeName(y,S=0,g=null,C=null,l=null){return this._syncRegistry.grammarForScopeName(y,S,g,C,l)}},i.INITIAL=m.StateStackImpl.NULL,i.parseRawGrammar=b.parseRawGrammar},916:(O,i)=>{function A(f){return!!f&&!!f.match(/[\w\.:]+/)}Object.defineProperty(i,"__esModule",{value:!0}),i.createMatchers=void 0,i.createMatchers=function(f,P){const m=[],b=function(u){let y=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,S=y.exec(u);return{next:()=>{if(!S)return null;const g=S[0];return S=y.exec(u),g}}}(f);let c=b.next();for(;c!==null;){let u=0;if(c.length===2&&c.charAt(1)===":"){switch(c.charAt(0)){case"R":u=1;break;case"L":u=-1;break;default:console.log(`Unknown priority ${c} in scope selector`)}c=b.next()}let y=R();if(m.push({matcher:y,priority:u}),c!==",")break;c=b.next()}return m;function p(){if(c==="-"){c=b.next();const u=p();return y=>!!u&&!u(y)}if(c==="("){c=b.next();const u=function(){const y=[];let S=R();for(;S&&(y.push(S),c==="|"||c===",");){do c=b.next();while(c==="|"||c===",");S=R()}return g=>y.some(C=>C(g))}();return c===")"&&(c=b.next()),u}if(A(c)){const u=[];do u.push(c),c=b.next();while(A(c));return y=>P(u,y)}return null}function R(){const u=[];let y=p();for(;y;)u.push(y),y=p();return S=>u.every(g=>g(S))}}},810:(O,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.disposeOnigString=void 0,i.disposeOnigString=function(A){typeof A.dispose=="function"&&A.dispose()}},150:(O,i,A)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.parseRawGrammar=void 0;const f=A(578),P=A(185),m=A(726);i.parseRawGrammar=function(b,c=null){return c!==null&&/\.json$/.test(c)?(p=b,R=c,P.DebugFlags.InDebugMode?m.parseJSON(p,R,!0):JSON.parse(p)):function(u,y){return P.DebugFlags.InDebugMode?f.parseWithLocation(u,y,"$vscodeTextmateLocation"):f.parsePLIST(u)}(b,c);var p,R}},578:(O,i)=>{function A(f,P,m){const b=f.length;let c=0,p=1,R=0;function u(k){if(m===null)c+=k;else for(;k>0;)f.charCodeAt(c)===10?(c++,p++,R=0):(c++,R++),k--}function y(k){m===null?c=k:u(k-c)}function S(){for(;c<b;){let k=f.charCodeAt(c);if(k!==32&&k!==9&&k!==13&&k!==10)break;u(1)}}function g(k){return f.substr(c,k.length)===k&&(u(k.length),!0)}function C(k){let B=f.indexOf(k,c);y(B!==-1?B+k.length:b)}function l(k){let B=f.indexOf(k,c);if(B!==-1){let L=f.substring(c,B);return y(B+k.length),L}{let L=f.substr(c);return y(b),L}}b>0&&f.charCodeAt(0)===65279&&(c=1);let h=0,s=null,e=[],n=[],o=null;function t(k,B){e.push(h),n.push(s),h=k,s=B}function r(){if(e.length===0)return a("illegal state stack");h=e.pop(),s=n.pop()}function a(k){throw new Error("Near offset "+c+": "+k+" ~~~"+f.substr(c,50)+"~~~")}const d=function(){if(o===null)return a("missing <key>");let k={};m!==null&&(k[m]={filename:P,line:p,char:R}),s[o]=k,o=null,t(1,k)},_=function(){if(o===null)return a("missing <key>");let k=[];s[o]=k,o=null,t(2,k)},I=function(){let k={};m!==null&&(k[m]={filename:P,line:p,char:R}),s.push(k),t(1,k)},w=function(){let k=[];s.push(k),t(2,k)};function v(){if(h!==1)return a("unexpected </dict>");r()}function T(){return h===1||h!==2?a("unexpected </array>"):void r()}function E(k){if(h===1){if(o===null)return a("missing <key>");s[o]=k,o=null}else h===2?s.push(k):s=k}function N(k){if(isNaN(k))return a("cannot parse float");if(h===1){if(o===null)return a("missing <key>");s[o]=k,o=null}else h===2?s.push(k):s=k}function D(k){if(isNaN(k))return a("cannot parse integer");if(h===1){if(o===null)return a("missing <key>");s[o]=k,o=null}else h===2?s.push(k):s=k}function j(k){if(h===1){if(o===null)return a("missing <key>");s[o]=k,o=null}else h===2?s.push(k):s=k}function F(k){if(h===1){if(o===null)return a("missing <key>");s[o]=k,o=null}else h===2?s.push(k):s=k}function G(k){if(h===1){if(o===null)return a("missing <key>");s[o]=k,o=null}else h===2?s.push(k):s=k}function x(){let k=l(">"),B=!1;return k.charCodeAt(k.length-1)===47&&(B=!0,k=k.substring(0,k.length-1)),{name:k.trim(),isClosed:B}}function M(k){if(k.isClosed)return"";let B=l("</");return C(">"),B.replace(/&#([0-9]+);/g,function(L,q){return String.fromCodePoint(parseInt(q,10))}).replace(/&#x([0-9a-f]+);/g,function(L,q){return String.fromCodePoint(parseInt(q,16))}).replace(/&|<|>|"|'/g,function(L){switch(L){case"&":return"&";case"<":return"<";case">":return">";case""":return'"';case"'":return"'"}return L})}for(;c<b&&(S(),!(c>=b));){const k=f.charCodeAt(c);if(u(1),k!==60)return a("expected <");if(c>=b)return a("unexpected end of input");const B=f.charCodeAt(c);if(B===63){u(1),C("?>");continue}if(B===33){if(u(1),g("--")){C("-->");continue}C(">");continue}if(B===47){if(u(1),S(),g("plist")){C(">");continue}if(g("dict")){C(">"),v();continue}if(g("array")){C(">"),T();continue}return a("unexpected closed tag")}let L=x();switch(L.name){case"dict":h===1?d():h===2?I():(s={},m!==null&&(s[m]={filename:P,line:p,char:R}),t(1,s)),L.isClosed&&v();continue;case"array":h===1?_():h===2?w():(s=[],t(2,s)),L.isClosed&&T();continue;case"key":z=M(L),h!==1?a("unexpected <key>"):o!==null?a("too many <key>"):o=z;continue;case"string":E(M(L));continue;case"real":N(parseFloat(M(L)));continue;case"integer":D(parseInt(M(L),10));continue;case"date":j(new Date(M(L)));continue;case"data":F(M(L));continue;case"true":M(L),G(!0);continue;case"false":M(L),G(!1);continue}if(!/^plist/.test(L.name))return a("unexpected opened tag "+L.name)}var z;return s}Object.defineProperty(i,"__esModule",{value:!0}),i.parsePLIST=i.parseWithLocation=void 0,i.parseWithLocation=function(f,P,m){return A(f,P,m)},i.parsePLIST=function(f){return A(f,null,null)}},583:(O,i,A)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.SyncRegistry=void 0;const f=A(752);i.SyncRegistry=class{constructor(P,m){this._onigLibPromise=m,this._grammars=new Map,this._rawGrammars=new Map,this._injectionGrammars=new Map,this._theme=P}dispose(){for(const P of this._grammars.values())P.dispose()}setTheme(P){this._theme=P}getColorMap(){return this._theme.getColorMap()}addGrammar(P,m){this._rawGrammars.set(P.scopeName,P),m&&this._injectionGrammars.set(P.scopeName,m)}lookup(P){return this._rawGrammars.get(P)}injections(P){return this._injectionGrammars.get(P)}getDefaults(){return this._theme.getDefaults()}themeMatch(P){return this._theme.match(P)}async grammarForScopeName(P,m,b,c,p){if(!this._grammars.has(P)){let R=this._rawGrammars.get(P);if(!R)return null;this._grammars.set(P,f.createGrammar(P,R,m,b,c,p,this,await this._onigLibPromise))}return this._grammars.get(P)}}},666:(O,i,A)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.CompiledRule=i.RegExpSourceList=i.RegExpSource=i.RuleFactory=i.BeginWhileRule=i.BeginEndRule=i.IncludeOnlyRule=i.MatchRule=i.CaptureRule=i.Rule=i.ruleIdToNumber=i.ruleIdFromNumber=i.whileRuleId=i.endRuleId=void 0;const f=A(807),P=A(784),m=/\\(\d+)/,b=/\\(\d+)/g;i.endRuleId=-1,i.whileRuleId=-2,i.ruleIdFromNumber=function(s){return s},i.ruleIdToNumber=function(s){return s};class c{constructor(e,n,o,t){this.$location=e,this.id=n,this._name=o||null,this._nameIsCapturing=f.RegexSource.hasCaptures(this._name),this._contentName=t||null,this._contentNameIsCapturing=f.RegexSource.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${f.basename(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,n){return this._nameIsCapturing&&this._name!==null&&e!==null&&n!==null?f.RegexSource.replaceCaptures(this._name,e,n):this._name}getContentName(e,n){return this._contentNameIsCapturing&&this._contentName!==null?f.RegexSource.replaceCaptures(this._contentName,e,n):this._contentName}}i.Rule=c;class p extends c{constructor(e,n,o,t,r){super(e,n,o,t),this.retokenizeCapturedWithRuleId=r}dispose(){}collectPatterns(e,n){throw new Error("Not supported!")}compile(e,n){throw new Error("Not supported!")}compileAG(e,n,o,t){throw new Error("Not supported!")}}i.CaptureRule=p;class R extends c{constructor(e,n,o,t,r){super(e,n,o,null),this._match=new C(t,this.id),this.captures=r,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,n){n.push(this._match)}compile(e,n){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,n,o,t){return this._getCachedCompiledPatterns(e).compileAG(e,o,t)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new l,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}}i.MatchRule=R;class u extends c{constructor(e,n,o,t,r){super(e,n,o,t),this.patterns=r.patterns,this.hasMissingPatterns=r.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,n){for(const o of this.patterns)e.getRule(o).collectPatterns(e,n)}compile(e,n){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,n,o,t){return this._getCachedCompiledPatterns(e).compileAG(e,o,t)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new l,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}}i.IncludeOnlyRule=u;class y extends c{constructor(e,n,o,t,r,a,d,_,I,w){super(e,n,o,t),this._begin=new C(r,this.id),this.beginCaptures=a,this._end=new C(d||"",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=_,this.applyEndPatternLast=I||!1,this.patterns=w.patterns,this.hasMissingPatterns=w.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,n){return this._end.resolveBackReferences(e,n)}collectPatterns(e,n){n.push(this._begin)}compile(e,n){return this._getCachedCompiledPatterns(e,n).compile(e)}compileAG(e,n,o,t){return this._getCachedCompiledPatterns(e,n).compileAG(e,o,t)}_getCachedCompiledPatterns(e,n){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new l;for(const o of this.patterns)e.getRule(o).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,n):this._cachedCompiledPatterns.setSource(0,n)),this._cachedCompiledPatterns}}i.BeginEndRule=y;class S extends c{constructor(e,n,o,t,r,a,d,_,I){super(e,n,o,t),this._begin=new C(r,this.id),this.beginCaptures=a,this.whileCaptures=_,this._while=new C(d,i.whileRuleId),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=I.patterns,this.hasMissingPatterns=I.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,n){return this._while.resolveBackReferences(e,n)}collectPatterns(e,n){n.push(this._begin)}compile(e,n){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,n,o,t){return this._getCachedCompiledPatterns(e).compileAG(e,o,t)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new l;for(const n of this.patterns)e.getRule(n).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,n){return this._getCachedCompiledWhilePatterns(e,n).compile(e)}compileWhileAG(e,n,o,t){return this._getCachedCompiledWhilePatterns(e,n).compileAG(e,o,t)}_getCachedCompiledWhilePatterns(e,n){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new l,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,n||""),this._cachedCompiledWhilePatterns}}i.BeginWhileRule=S;class g{static createCaptureRule(e,n,o,t,r){return e.registerRule(a=>new p(n,a,o,t,r))}static getCompiledRuleId(e,n,o){return e.id||n.registerRule(t=>{if(e.id=t,e.match)return new R(e.$vscodeTextmateLocation,e.id,e.name,e.match,g._compileCaptures(e.captures,n,o));if(e.begin===void 0){e.repository&&(o=f.mergeObjects({},o,e.repository));let r=e.patterns;return r===void 0&&e.include&&(r=[{include:e.include}]),new u(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,g._compilePatterns(r,n,o))}return e.while?new S(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,g._compileCaptures(e.beginCaptures||e.captures,n,o),e.while,g._compileCaptures(e.whileCaptures||e.captures,n,o),g._compilePatterns(e.patterns,n,o)):new y(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,g._compileCaptures(e.beginCaptures||e.captures,n,o),e.end,g._compileCaptures(e.endCaptures||e.captures,n,o),e.applyEndPatternLast,g._compilePatterns(e.patterns,n,o))}),e.id}static _compileCaptures(e,n,o){let t=[];if(e){let r=0;for(const a in e){if(a==="$vscodeTextmateLocation")continue;const d=parseInt(a,10);d>r&&(r=d)}for(let a=0;a<=r;a++)t[a]=null;for(const a in e){if(a==="$vscodeTextmateLocation")continue;const d=parseInt(a,10);let _=0;e[a].patterns&&(_=g.getCompiledRuleId(e[a],n,o)),t[d]=g.createCaptureRule(n,e[a].$vscodeTextmateLocation,e[a].name,e[a].contentName,_)}}return t}static _compilePatterns(e,n,o){let t=[];if(e)for(let r=0,a=e.length;r<a;r++){const d=e[r];let _=-1;if(d.include){const I=P.parseInclude(d.include);switch(I.kind){case 0:case 1:_=g.getCompiledRuleId(o[d.include],n,o);break;case 2:let w=o[I.ruleName];w&&(_=g.getCompiledRuleId(w,n,o));break;case 3:case 4:const v=I.scopeName,T=I.kind===4?I.ruleName:null,E=n.getExternalGrammar(v,o);if(E)if(T){let N=E.repository[T];N&&(_=g.getCompiledRuleId(N,n,E.repository))}else _=g.getCompiledRuleId(E.repository.$self,n,E.repository)}}else _=g.getCompiledRuleId(d,n,o);if(_!==-1){const I=n.getRule(_);let w=!1;if((I instanceof u||I instanceof y||I instanceof S)&&I.hasMissingPatterns&&I.patterns.length===0&&(w=!0),w)continue;t.push(_)}}return{patterns:t,hasMissingPatterns:(e?e.length:0)!==t.length}}}i.RuleFactory=g;class C{constructor(e,n){if(e){const o=e.length;let t=0,r=[],a=!1;for(let d=0;d<o;d++)if(e.charAt(d)==="\\"&&d+1<o){const _=e.charAt(d+1);_==="z"?(r.push(e.substring(t,d)),r.push("$(?!\\n)(?<!\\n)"),t=d+2):_!=="A"&&_!=="G"||(a=!0),d++}this.hasAnchor=a,t===0?this.source=e:(r.push(e.substring(t,o)),this.source=r.join(""))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=n,this.hasBackReferences=m.test(this.source)}clone(){return new C(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,n){let o=n.map(t=>e.substring(t.start,t.end));return b.lastIndex=0,this.source.replace(b,(t,r)=>f.escapeRegExpCharacters(o[parseInt(r,10)]||""))}_buildAnchorCache(){let e,n,o,t,r=[],a=[],d=[],_=[];for(e=0,n=this.source.length;e<n;e++)o=this.source.charAt(e),r[e]=o,a[e]=o,d[e]=o,_[e]=o,o==="\\"&&e+1<n&&(t=this.source.charAt(e+1),t==="A"?(r[e+1]="",a[e+1]="",d[e+1]="A",_[e+1]="A"):t==="G"?(r[e+1]="",a[e+1]="G",d[e+1]="",_[e+1]="G"):(r[e+1]=t,a[e+1]=t,d[e+1]=t,_[e+1]=t),e++);return{A0_G0:r.join(""),A0_G1:a.join(""),A1_G0:d.join(""),A1_G1:_.join("")}}resolveAnchors(e,n){return this.hasAnchor&&this._anchorCache?e?n?this._anchorCache.A1_G1:this._anchorCache.A1_G0:n?this._anchorCache.A0_G1:this._anchorCache.A0_G0:this.source}}i.RegExpSource=C;class l{constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}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,n){this._items[e].source!==n&&(this._disposeCaches(),this._items[e].setSource(n))}compile(e){if(!this._cached){let n=this._items.map(o=>o.source);this._cached=new h(e,n,this._items.map(o=>o.ruleId))}return this._cached}compileAG(e,n,o){return this._hasAnchors?n?o?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,n,o)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,n,o)),this._anchorCache.A1_G0):o?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,n,o)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,n,o)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,n,o){let t=this._items.map(r=>r.resolveAnchors(n,o));return new h(e,t,this._items.map(r=>r.ruleId))}}i.RegExpSourceList=l;class h{constructor(e,n,o){this.regExps=n,this.rules=o,this.scanner=e.createOnigScanner(n)}dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const e=[];for(let n=0,o=this.rules.length;n<o;n++)e.push(" - "+this.rules[n]+": "+this.regExps[n]);return e.join(`
|
|
4
|
-
`)}findNextMatchSync(e,n,o){const t=this.scanner.findNextMatchSync(e,n,o);return t?{ruleId:this.rules[t.index],captureIndices:t.captureIndices}:null}}i.CompiledRule=h},63:(O,i,A)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.ThemeTrieElement=i.ThemeTrieElementRule=i.ColorMap=i.fontStyleToString=i.ParsedThemeRule=i.parseTheme=i.StyleAttributes=i.ScopeStack=i.Theme=void 0;const f=A(807);class P{constructor(l,h,s){this._colorMap=l,this._defaults=h,this._root=s,this._cachedMatchRoot=new f.CachedFn(e=>this._root.match(e))}static createFromRawTheme(l,h){return this.createFromParsedTheme(p(l),h)}static createFromParsedTheme(l,h){return function(s,e){s.sort((_,I)=>{let w=f.strcmp(_.scope,I.scope);return w!==0?w:(w=f.strArrCmp(_.parentScopes,I.parentScopes),w!==0?w:_.index-I.index)});let n=0,o="#000000",t="#ffffff";for(;s.length>=1&&s[0].scope==="";){let _=s.shift();_.fontStyle!==-1&&(n=_.fontStyle),_.foreground!==null&&(o=_.foreground),_.background!==null&&(t=_.background)}let r=new u(e),a=new c(n,r.getId(o),r.getId(t)),d=new g(new S(0,null,-1,0,0),[]);for(let _=0,I=s.length;_<I;_++){let w=s[_];d.insert(0,w.scope,w.parentScopes,w.fontStyle,r.getId(w.foreground),r.getId(w.background))}return new P(r,a,d)}(l,h)}getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(l){if(l===null)return this._defaults;const h=l.scopeName,s=this._cachedMatchRoot.get(h).find(e=>function(n,o){if(o.length===0)return!0;for(let t=0;t<o.length;t++){let r=o[t],a=!1;if(r===">"){if(t===o.length-1)return!1;r=o[++t],a=!0}for(;n&&!b(n.scopeName,r);){if(a)return!1;n=n.parent}if(!n)return!1;n=n.parent}return!0}(l.parent,e.parentScopes));return s?new c(s.fontStyle,s.foreground,s.background):null}}i.Theme=P;class m{constructor(l,h){this.parent=l,this.scopeName=h}static push(l,h){for(const s of h)l=new m(l,s);return l}static from(...l){let h=null;for(let s=0;s<l.length;s++)h=new m(h,l[s]);return h}push(l){return new m(this,l)}getSegments(){let l=this;const h=[];for(;l;)h.push(l.scopeName),l=l.parent;return h.reverse(),h}toString(){return this.getSegments().join(" ")}extends(l){return this===l||this.parent!==null&&this.parent.extends(l)}getExtensionIfDefined(l){const h=[];let s=this;for(;s&&s!==l;)h.push(s.scopeName),s=s.parent;return s===l?h.reverse():void 0}}function b(C,l){return l===C||C.startsWith(l)&&C[l.length]==="."}i.ScopeStack=m;class c{constructor(l,h,s){this.fontStyle=l,this.foregroundId=h,this.backgroundId=s}}function p(C){if(!C)return[];if(!C.settings||!Array.isArray(C.settings))return[];let l=C.settings,h=[],s=0;for(let e=0,n=l.length;e<n;e++){let o,t=l[e];if(!t.settings)continue;if(typeof t.scope=="string"){let _=t.scope;_=_.replace(/^[,]+/,""),_=_.replace(/[,]+$/,""),o=_.split(",")}else o=Array.isArray(t.scope)?t.scope:[""];let r=-1;if(typeof t.settings.fontStyle=="string"){r=0;let _=t.settings.fontStyle.split(" ");for(let I=0,w=_.length;I<w;I++)switch(_[I]){case"italic":r|=1;break;case"bold":r|=2;break;case"underline":r|=4;break;case"strikethrough":r|=8}}let a=null;typeof t.settings.foreground=="string"&&f.isValidHexColor(t.settings.foreground)&&(a=t.settings.foreground);let d=null;typeof t.settings.background=="string"&&f.isValidHexColor(t.settings.background)&&(d=t.settings.background);for(let _=0,I=o.length;_<I;_++){let w=o[_].trim().split(" "),v=w[w.length-1],T=null;w.length>1&&(T=w.slice(0,w.length-1),T.reverse()),h[s++]=new R(v,T,e,r,a,d)}}return h}i.StyleAttributes=c,i.parseTheme=p;class R{constructor(l,h,s,e,n,o){this.scope=l,this.parentScopes=h,this.index=s,this.fontStyle=e,this.foreground=n,this.background=o}}i.ParsedThemeRule=R,i.fontStyleToString=function(C){if(C===-1)return"not set";let l="";return 1&C&&(l+="italic "),2&C&&(l+="bold "),4&C&&(l+="underline "),8&C&&(l+="strikethrough "),l===""&&(l="none"),l.trim()};class u{constructor(l){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(l)){this._isFrozen=!0;for(let h=0,s=l.length;h<s;h++)this._color2id[l[h]]=h,this._id2color[h]=l[h]}else this._isFrozen=!1}getId(l){if(l===null)return 0;l=l.toUpperCase();let h=this._color2id[l];if(h)return h;if(this._isFrozen)throw new Error(`Missing color in color map - ${l}`);return h=++this._lastColorId,this._color2id[l]=h,this._id2color[h]=l,h}getColorMap(){return this._id2color.slice(0)}}i.ColorMap=u;const y=Object.freeze([]);class S{constructor(l,h,s,e,n){this.scopeDepth=l,this.parentScopes=h||y,this.fontStyle=s,this.foreground=e,this.background=n}clone(){return new S(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(l){let h=[];for(let s=0,e=l.length;s<e;s++)h[s]=l[s].clone();return h}acceptOverwrite(l,h,s,e){this.scopeDepth>l?console.log("how did this happen?"):this.scopeDepth=l,h!==-1&&(this.fontStyle=h),s!==0&&(this.foreground=s),e!==0&&(this.background=e)}}i.ThemeTrieElementRule=S;class g{constructor(l,h=[],s={}){this._mainRule=l,this._children=s,this._rulesWithParentScopes=h}static _cmpBySpecificity(l,h){if(l.scopeDepth!==h.scopeDepth)return h.scopeDepth-l.scopeDepth;let s=0,e=0;for(;l.parentScopes[s]===">"&&s++,h.parentScopes[e]===">"&&e++,!(s>=l.parentScopes.length||e>=h.parentScopes.length);){const n=h.parentScopes[e].length-l.parentScopes[s].length;if(n!==0)return n;s++,e++}return h.parentScopes.length-l.parentScopes.length}match(l){if(l!==""){let s,e,n=l.indexOf(".");if(n===-1?(s=l,e=""):(s=l.substring(0,n),e=l.substring(n+1)),this._children.hasOwnProperty(s))return this._children[s].match(e)}const h=this._rulesWithParentScopes.concat(this._mainRule);return h.sort(g._cmpBySpecificity),h}insert(l,h,s,e,n,o){if(h==="")return void this._doInsertHere(l,s,e,n,o);let t,r,a,d=h.indexOf(".");d===-1?(t=h,r=""):(t=h.substring(0,d),r=h.substring(d+1)),this._children.hasOwnProperty(t)?a=this._children[t]:(a=new g(this._mainRule.clone(),S.cloneArr(this._rulesWithParentScopes)),this._children[t]=a),a.insert(l+1,r,s,e,n,o)}_doInsertHere(l,h,s,e,n){if(h!==null){for(let o=0,t=this._rulesWithParentScopes.length;o<t;o++){let r=this._rulesWithParentScopes[o];if(f.strArrCmp(r.parentScopes,h)===0)return void r.acceptOverwrite(l,s,e,n)}s===-1&&(s=this._mainRule.fontStyle),e===0&&(e=this._mainRule.foreground),n===0&&(n=this._mainRule.background),this._rulesWithParentScopes.push(new S(l,h,s,e,n))}else this._mainRule.acceptOverwrite(l,s,e,n)}}i.ThemeTrieElement=g},807:(O,i)=>{function A(m){return Array.isArray(m)?function(b){let c=[];for(let p=0,R=b.length;p<R;p++)c[p]=A(b[p]);return c}(m):typeof m=="object"?function(b){let c={};for(let p in b)c[p]=A(b[p]);return c}(m):m}Object.defineProperty(i,"__esModule",{value:!0}),i.performanceNow=i.CachedFn=i.escapeRegExpCharacters=i.isValidHexColor=i.strArrCmp=i.strcmp=i.RegexSource=i.basename=i.mergeObjects=i.clone=void 0,i.clone=function(m){return A(m)},i.mergeObjects=function(m,...b){return b.forEach(c=>{for(let p in c)m[p]=c[p]}),m},i.basename=function m(b){const c=~b.lastIndexOf("/")||~b.lastIndexOf("\\");return c===0?b:~c==b.length-1?m(b.substring(0,b.length-1)):b.substr(1+~c)};let f=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g;function P(m,b){return m<b?-1:m>b?1:0}i.RegexSource=class{static hasCaptures(m){return m!==null&&(f.lastIndex=0,f.test(m))}static replaceCaptures(m,b,c){return m.replace(f,(p,R,u,y)=>{let S=c[parseInt(R||u,10)];if(!S)return p;{let g=b.substring(S.start,S.end);for(;g[0]===".";)g=g.substring(1);switch(y){case"downcase":return g.toLowerCase();case"upcase":return g.toUpperCase();default:return g}}})}},i.strcmp=P,i.strArrCmp=function(m,b){if(m===null&&b===null)return 0;if(!m)return-1;if(!b)return 1;let c=m.length,p=b.length;if(c===p){for(let R=0;R<c;R++){let u=P(m[R],b[R]);if(u!==0)return u}return 0}return c-p},i.isValidHexColor=function(m){return!!(/^#[0-9a-f]{6}$/i.test(m)||/^#[0-9a-f]{8}$/i.test(m)||/^#[0-9a-f]{3}$/i.test(m)||/^#[0-9a-f]{4}$/i.test(m))},i.escapeRegExpCharacters=function(m){return m.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")},i.CachedFn=class{constructor(m){this.fn=m,this.cache=new Map}get(m){if(this.cache.has(m))return this.cache.get(m);const b=this.fn(m);return this.cache.set(m,b),b}},i.performanceNow=typeof performance>"u"?function(){return Date.now()}:function(){return performance.now()}}},$={};return function O(i){var A=$[i];if(A!==void 0)return A.exports;var f=$[i]={exports:{}};return U[i].call(f.exports,f,f.exports,O),f.exports}(625)})())}(ie)),ie.exports}var pe=ye();const Se=ge(pe),Ce=_e({__proto__:null,default:Se},[pe]);export{Ce as m};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{tR as _t}from"./index-BwfWF2CI.js";function yt(j,V){for(var R=0;R<V.length;R++){const w=V[R];if(typeof w!="string"&&!Array.isArray(w)){for(const A in w)if(A!=="default"&&!(A in j)){const h=Object.getOwnPropertyDescriptor(w,A);h&&Object.defineProperty(j,A,h.get?h:{enumerable:!0,get:()=>w[A]})}}}return Object.freeze(Object.defineProperty(j,Symbol.toStringTag,{value:"Module"}))}var z={exports:{}},vt=z.exports,X;function wt(){return X||(X=1,function(j,V){(function(R,w){j.exports=w()})(vt,()=>{return R={770:function(A,h,O){var U=this&&this.__importDefault||function(m){return m&&m.__esModule?m:{default:m}};Object.defineProperty(h,"__esModule",{value:!0}),h.setDefaultDebugCall=h.createOnigScanner=h.createOnigString=h.loadWASM=h.OnigScanner=h.OnigString=void 0;const D=U(O(418));let t=null,W=!1;class E{static _utf8ByteLength(e){let f=0;for(let c=0,p=e.length;c<p;c++){const s=e.charCodeAt(c);let i=s,o=!1;if(s>=55296&&s<=56319&&c+1<p){const a=e.charCodeAt(c+1);a>=56320&&a<=57343&&(i=65536+(s-55296<<10)|a-56320,o=!0)}f+=i<=127?1:i<=2047?2:i<=65535?3:4,o&&c++}return f}constructor(e){const f=e.length,c=E._utf8ByteLength(e),p=c!==f,s=p?new Uint32Array(f+1):null;p&&(s[f]=c);const i=p?new Uint32Array(c+1):null;p&&(i[c]=f);const o=new Uint8Array(c);let a=0;for(let u=0;u<f;u++){const S=e.charCodeAt(u);let l=S,b=!1;if(S>=55296&&S<=56319&&u+1<f){const x=e.charCodeAt(u+1);x>=56320&&x<=57343&&(l=65536+(S-55296<<10)|x-56320,b=!0)}p&&(s[u]=a,b&&(s[u+1]=a),l<=127?i[a+0]=u:l<=2047?(i[a+0]=u,i[a+1]=u):l<=65535?(i[a+0]=u,i[a+1]=u,i[a+2]=u):(i[a+0]=u,i[a+1]=u,i[a+2]=u,i[a+3]=u)),l<=127?o[a++]=l:l<=2047?(o[a++]=192|(1984&l)>>>6,o[a++]=128|(63&l)>>>0):l<=65535?(o[a++]=224|(61440&l)>>>12,o[a++]=128|(4032&l)>>>6,o[a++]=128|(63&l)>>>0):(o[a++]=240|(1835008&l)>>>18,o[a++]=128|(258048&l)>>>12,o[a++]=128|(4032&l)>>>6,o[a++]=128|(63&l)>>>0),b&&u++}this.utf16Length=f,this.utf8Length=c,this.utf16Value=e,this.utf8Value=o,this.utf16OffsetToUtf8=s,this.utf8OffsetToUtf16=i}createString(e){const f=e._omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,f),f}}class _{constructor(e){if(this.id=++_.LAST_ID,!t)throw new Error("Must invoke loadWASM first.");this._onigBinding=t,this.content=e;const f=new E(e);this.utf16Length=f.utf16Length,this.utf8Length=f.utf8Length,this.utf16OffsetToUtf8=f.utf16OffsetToUtf8,this.utf8OffsetToUtf16=f.utf8OffsetToUtf16,this.utf8Length<1e4&&!_._sharedPtrInUse?(_._sharedPtr||(_._sharedPtr=t._omalloc(1e4)),_._sharedPtrInUse=!0,t.HEAPU8.set(f.utf8Value,_._sharedPtr),this.ptr=_._sharedPtr):this.ptr=f.createString(t)}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===_._sharedPtr?_._sharedPtrInUse=!1:this._onigBinding._ofree(this.ptr)}}h.OnigString=_,_.LAST_ID=0,_._sharedPtr=0,_._sharedPtrInUse=!1;class H{constructor(e){if(!t)throw new Error("Must invoke loadWASM first.");const f=[],c=[];for(let o=0,a=e.length;o<a;o++){const u=new E(e[o]);f[o]=u.createString(t),c[o]=u.utf8Length}const p=t._omalloc(4*e.length);t.HEAPU32.set(f,p/4);const s=t._omalloc(4*e.length);t.HEAPU32.set(c,s/4);const i=t._createOnigScanner(p,s,e.length);for(let o=0,a=e.length;o<a;o++)t._ofree(f[o]);t._ofree(s),t._ofree(p),i===0&&function(o){throw new Error(o.UTF8ToString(o._getLastOnigError()))}(t),this._onigBinding=t,this._ptr=i}dispose(){this._onigBinding._freeOnigScanner(this._ptr)}findNextMatchSync(e,f,c){let p=W,s=0;if(typeof c=="number"?(8&c&&(p=!0),s=c):typeof c=="boolean"&&(p=c),typeof e=="string"){e=new _(e);const i=this._findNextMatchSync(e,f,p,s);return e.dispose(),i}return this._findNextMatchSync(e,f,p,s)}_findNextMatchSync(e,f,c,p){const s=this._onigBinding;let i;if(i=c?s._findNextOnigScannerMatchDbg(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(f),p):s._findNextOnigScannerMatch(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(f),p),i===0)return null;const o=s.HEAPU32;let a=i/4;const u=o[a++],S=o[a++];let l=[];for(let b=0;b<S;b++){const x=e.convertUtf8OffsetToUtf16(o[a++]),B=e.convertUtf8OffsetToUtf16(o[a++]);l[b]={start:x,end:B,length:B-x}}return{index:u,captureIndices:l}}}h.OnigScanner=H;let M=!1,T=null;h.loadWASM=function(m){if(M)return T;let e,f,c,p;if(M=!0,function(s){return typeof s.instantiator=="function"}(m))e=m.instantiator,f=m.print;else{let s;(function(i){return i.data!==void 0})(m)?(s=m.data,f=m.print):s=m,e=function(i){return typeof Response<"u"&&i instanceof Response}(s)?typeof WebAssembly.instantiateStreaming=="function"?function(i){return o=>WebAssembly.instantiateStreaming(i,o)}(s):function(i){return async o=>{const a=await i.arrayBuffer();return WebAssembly.instantiate(a,o)}}(s):function(i){return o=>WebAssembly.instantiate(i,o)}(s)}return T=new Promise((s,i)=>{c=s,p=i}),function(s,i,o,a){(0,D.default)({print:i,instantiateWasm:(u,S)=>{if(typeof performance>"u"){const l=()=>Date.now();u.env.emscripten_get_now=l,u.wasi_snapshot_preview1.emscripten_get_now=l}return s(u).then(l=>S(l.instance),a),{}}}).then(u=>{t=u,o()})}(e,f,c,p),T},h.createOnigString=function(m){return new _(m)},h.createOnigScanner=function(m){return new H(m)},h.setDefaultDebugCall=function(m){W=m}},418:A=>{var h=(typeof document<"u"&&document.currentScript&&document.currentScript.src,function(O){var U,D,t=(O=O||{})!==void 0?O:{};t.ready=new Promise(function(n,r){U=n,D=r});var W,E=Object.assign({},t),_="";function H(n){return t.locateFile?t.locateFile(n,_):_+n}W=function(n){let r;return typeof readbuffer=="function"?new Uint8Array(readbuffer(n)):(r=read(n,"binary"),c(typeof r=="object"),r)},typeof scriptArgs<"u"&&scriptArgs,typeof onig_print<"u"&&(typeof console>"u"&&(console={}),console.log=onig_print,console.warn=console.error=typeof printErr<"u"?printErr:onig_print);var M,T,m=t.print||console.log.bind(console),e=t.printErr||console.warn.bind(console);Object.assign(t,E),E=null,t.arguments&&t.arguments,t.thisProgram&&t.thisProgram,t.quit&&t.quit,t.wasmBinary&&(M=t.wasmBinary),t.noExitRuntime,typeof WebAssembly!="object"&&F("no native wasm support detected");var f=!1;function c(n,r){n||F(r)}var p,s,i,o=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function a(n,r,y){for(var P=r+y,g=r;n[g]&&!(g>=P);)++g;if(g-r>16&&n.buffer&&o)return o.decode(n.subarray(r,g));for(var d="";r<g;){var v=n[r++];if(128&v){var C=63&n[r++];if((224&v)!=192){var N=63&n[r++];if((v=(240&v)==224?(15&v)<<12|C<<6|N:(7&v)<<18|C<<12|N<<6|63&n[r++])<65536)d+=String.fromCharCode(v);else{var Q=v-65536;d+=String.fromCharCode(55296|Q>>10,56320|1023&Q)}}else d+=String.fromCharCode((31&v)<<6|C)}else d+=String.fromCharCode(v)}return d}function u(n,r){return n?a(s,n,r):""}function S(n){p=n,t.HEAP8=new Int8Array(n),t.HEAP16=new Int16Array(n),t.HEAP32=new Int32Array(n),t.HEAPU8=s=new Uint8Array(n),t.HEAPU16=new Uint16Array(n),t.HEAPU32=i=new Uint32Array(n),t.HEAPF32=new Float32Array(n),t.HEAPF64=new Float64Array(n)}t.INITIAL_MEMORY;var l=[],b=[],x=[];function B(){if(t.preRun)for(typeof t.preRun=="function"&&(t.preRun=[t.preRun]);t.preRun.length;)et(t.preRun.shift());$(l)}function tt(){$(b)}function nt(){if(t.postRun)for(typeof t.postRun=="function"&&(t.postRun=[t.postRun]);t.postRun.length;)it(t.postRun.shift());$(x)}function et(n){l.unshift(n)}function rt(n){b.unshift(n)}function it(n){x.unshift(n)}var L=0,k=null;function ot(n){L++,t.monitorRunDependencies&&t.monitorRunDependencies(L)}function at(n){if(L--,t.monitorRunDependencies&&t.monitorRunDependencies(L),L==0&&k){var r=k;k=null,r()}}function F(n){t.onAbort&&t.onAbort(n),e(n="Aborted("+n+")"),f=!0,n+=". Build with -sASSERTIONS for more info.";var r=new WebAssembly.RuntimeError(n);throw D(r),r}var I,Y,st="data:application/octet-stream;base64,";function G(n){return n.startsWith(st)}function ft(n){try{if(n==I&&M)return new Uint8Array(M);if(W)return W(n);throw"both async and sync fetching of the wasm failed"}catch(r){F(r)}}function ut(){return Promise.resolve().then(function(){return ft(I)})}function ct(){var n={env:J,wasi_snapshot_preview1:J};function r(g,d){var v=g.exports;t.asm=v,S((T=t.asm.memory).buffer),t.asm.__indirect_function_table,rt(t.asm.__wasm_call_ctors),at()}function y(g){r(g.instance)}function P(g){return ut().then(function(d){return WebAssembly.instantiate(d,n)}).then(function(d){return d}).then(g,function(d){e("failed to asynchronously prepare wasm: "+d),F(d)})}if(ot(),t.instantiateWasm)try{return t.instantiateWasm(n,r)}catch(g){e("Module.instantiateWasm callback failed with error: "+g),D(g)}return(M||typeof WebAssembly.instantiateStreaming!="function"||G(I)||typeof fetch!="function"?P(y):fetch(I,{credentials:"same-origin"}).then(function(g){return WebAssembly.instantiateStreaming(g,n).then(y,function(d){return e("wasm streaming compile failed: "+d),e("falling back to ArrayBuffer instantiation"),P(y)})})).catch(D),{}}function $(n){for(;n.length>0;)n.shift()(t)}function lt(n,r,y){s.copyWithin(n,r,r+y)}function pt(n){try{return T.grow(n-p.byteLength+65535>>>16),S(T.buffer),1}catch{}}function gt(n){var r,y=s.length,P=2147483648;if((n>>>=0)>P)return!1;for(var g=1;g<=4;g*=2){var d=y*(1+.2/g);if(d=Math.min(d,n+100663296),pt(Math.min(P,(r=Math.max(n,d))+(65536-r%65536)%65536)))return!0}return!1}G(I="onig.wasm")||(I=H(I)),Y=typeof dateNow<"u"?dateNow:()=>performance.now();var ht=[null,[],[]];function dt(n,r){var y=ht[n];r===0||r===10?((n===1?m:e)(a(y,0)),y.length=0):y.push(r)}function mt(n,r,y,P){for(var g=0,d=0;d<y;d++){var v=i[r>>2],C=i[r+4>>2];r+=8;for(var N=0;N<C;N++)dt(n,s[v+N]);g+=C}return i[P>>2]=g,0}var q,J={emscripten_get_now:Y,emscripten_memcpy_big:lt,emscripten_resize_heap:gt,fd_write:mt};function K(n){function r(){q||(q=!0,t.calledRun=!0,f||(tt(),U(t),t.onRuntimeInitialized&&t.onRuntimeInitialized(),nt()))}L>0||(B(),L>0||(t.setStatus?(t.setStatus("Running..."),setTimeout(function(){setTimeout(function(){t.setStatus("")},1),r()},1)):r()))}if(ct(),t.___wasm_call_ctors=function(){return(t.___wasm_call_ctors=t.asm.__wasm_call_ctors).apply(null,arguments)},t.___errno_location=function(){return(t.___errno_location=t.asm.__errno_location).apply(null,arguments)},t._omalloc=function(){return(t._omalloc=t.asm.omalloc).apply(null,arguments)},t._ofree=function(){return(t._ofree=t.asm.ofree).apply(null,arguments)},t._getLastOnigError=function(){return(t._getLastOnigError=t.asm.getLastOnigError).apply(null,arguments)},t._createOnigScanner=function(){return(t._createOnigScanner=t.asm.createOnigScanner).apply(null,arguments)},t._freeOnigScanner=function(){return(t._freeOnigScanner=t.asm.freeOnigScanner).apply(null,arguments)},t._findNextOnigScannerMatch=function(){return(t._findNextOnigScannerMatch=t.asm.findNextOnigScannerMatch).apply(null,arguments)},t._findNextOnigScannerMatchDbg=function(){return(t._findNextOnigScannerMatchDbg=t.asm.findNextOnigScannerMatchDbg).apply(null,arguments)},t.stackSave=function(){return(t.stackSave=t.asm.stackSave).apply(null,arguments)},t.stackRestore=function(){return(t.stackRestore=t.asm.stackRestore).apply(null,arguments)},t.stackAlloc=function(){return(t.stackAlloc=t.asm.stackAlloc).apply(null,arguments)},t.dynCall_jiji=function(){return(t.dynCall_jiji=t.asm.dynCall_jiji).apply(null,arguments)},t.UTF8ToString=u,k=function n(){q||K(),q||(k=n)},t.preInit)for(typeof t.preInit=="function"&&(t.preInit=[t.preInit]);t.preInit.length>0;)t.preInit.pop()();return K(),O.ready});A.exports=h}},w={},function A(h){var O=w[h];if(O!==void 0)return O.exports;var U=w[h]={exports:{}};return R[h].call(U.exports,U,U.exports,A),U.exports}(770);var R,w})}(z)),z.exports}var Z=wt();const St=_t(Z),bt=yt({__proto__:null,default:St},[Z]);export{bt as m};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as _t}from"./_commonjsHelpers-CqkleIqs.js";function yt(j,$){return $.forEach(function(S){S&&typeof S!="string"&&!Array.isArray(S)&&Object.keys(S).forEach(function(w){if(w!=="default"&&!(w in j)){var P=Object.getOwnPropertyDescriptor(S,w);Object.defineProperty(j,w,P.get?P:{enumerable:!0,get:function(){return S[w]}})}})}),Object.freeze(j)}var z={exports:{}},vt=z.exports,X;function wt(){return X||(X=1,function(j,$){(function(S,w){j.exports=w()})(vt,()=>{return S={770:function(P,d,O){var U=this&&this.__importDefault||function(m){return m&&m.__esModule?m:{default:m}};Object.defineProperty(d,"__esModule",{value:!0}),d.setDefaultDebugCall=d.createOnigScanner=d.createOnigString=d.loadWASM=d.OnigScanner=d.OnigString=void 0;const D=U(O(418));let t=null,W=!1;class R{static _utf8ByteLength(e){let f=0;for(let c=0,p=e.length;c<p;c++){const s=e.charCodeAt(c);let i=s,o=!1;if(s>=55296&&s<=56319&&c+1<p){const a=e.charCodeAt(c+1);a>=56320&&a<=57343&&(i=65536+(s-55296<<10)|a-56320,o=!0)}f+=i<=127?1:i<=2047?2:i<=65535?3:4,o&&c++}return f}constructor(e){const f=e.length,c=R._utf8ByteLength(e),p=c!==f,s=p?new Uint32Array(f+1):null;p&&(s[f]=c);const i=p?new Uint32Array(c+1):null;p&&(i[c]=f);const o=new Uint8Array(c);let a=0;for(let u=0;u<f;u++){const A=e.charCodeAt(u);let l=A,b=!1;if(A>=55296&&A<=56319&&u+1<f){const x=e.charCodeAt(u+1);x>=56320&&x<=57343&&(l=65536+(A-55296<<10)|x-56320,b=!0)}p&&(s[u]=a,b&&(s[u+1]=a),l<=127?i[a+0]=u:l<=2047?(i[a+0]=u,i[a+1]=u):l<=65535?(i[a+0]=u,i[a+1]=u,i[a+2]=u):(i[a+0]=u,i[a+1]=u,i[a+2]=u,i[a+3]=u)),l<=127?o[a++]=l:l<=2047?(o[a++]=192|(1984&l)>>>6,o[a++]=128|(63&l)>>>0):l<=65535?(o[a++]=224|(61440&l)>>>12,o[a++]=128|(4032&l)>>>6,o[a++]=128|(63&l)>>>0):(o[a++]=240|(1835008&l)>>>18,o[a++]=128|(258048&l)>>>12,o[a++]=128|(4032&l)>>>6,o[a++]=128|(63&l)>>>0),b&&u++}this.utf16Length=f,this.utf8Length=c,this.utf16Value=e,this.utf8Value=o,this.utf16OffsetToUtf8=s,this.utf8OffsetToUtf16=i}createString(e){const f=e._omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,f),f}}class _{constructor(e){if(this.id=++_.LAST_ID,!t)throw new Error("Must invoke loadWASM first.");this._onigBinding=t,this.content=e;const f=new R(e);this.utf16Length=f.utf16Length,this.utf8Length=f.utf8Length,this.utf16OffsetToUtf8=f.utf16OffsetToUtf8,this.utf8OffsetToUtf16=f.utf8OffsetToUtf16,this.utf8Length<1e4&&!_._sharedPtrInUse?(_._sharedPtr||(_._sharedPtr=t._omalloc(1e4)),_._sharedPtrInUse=!0,t.HEAPU8.set(f.utf8Value,_._sharedPtr),this.ptr=_._sharedPtr):this.ptr=f.createString(t)}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===_._sharedPtr?_._sharedPtrInUse=!1:this._onigBinding._ofree(this.ptr)}}d.OnigString=_,_.LAST_ID=0,_._sharedPtr=0,_._sharedPtrInUse=!1;class B{constructor(e){if(!t)throw new Error("Must invoke loadWASM first.");const f=[],c=[];for(let o=0,a=e.length;o<a;o++){const u=new R(e[o]);f[o]=u.createString(t),c[o]=u.utf8Length}const p=t._omalloc(4*e.length);t.HEAPU32.set(f,p/4);const s=t._omalloc(4*e.length);t.HEAPU32.set(c,s/4);const i=t._createOnigScanner(p,s,e.length);for(let o=0,a=e.length;o<a;o++)t._ofree(f[o]);t._ofree(s),t._ofree(p),i===0&&function(o){throw new Error(o.UTF8ToString(o._getLastOnigError()))}(t),this._onigBinding=t,this._ptr=i}dispose(){this._onigBinding._freeOnigScanner(this._ptr)}findNextMatchSync(e,f,c){let p=W,s=0;if(typeof c=="number"?(8&c&&(p=!0),s=c):typeof c=="boolean"&&(p=c),typeof e=="string"){e=new _(e);const i=this._findNextMatchSync(e,f,p,s);return e.dispose(),i}return this._findNextMatchSync(e,f,p,s)}_findNextMatchSync(e,f,c,p){const s=this._onigBinding;let i;if(i=c?s._findNextOnigScannerMatchDbg(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(f),p):s._findNextOnigScannerMatch(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(f),p),i===0)return null;const o=s.HEAPU32;let a=i/4;const u=o[a++],A=o[a++];let l=[];for(let b=0;b<A;b++){const x=e.convertUtf8OffsetToUtf16(o[a++]),k=e.convertUtf8OffsetToUtf16(o[a++]);l[b]={start:x,end:k,length:k-x}}return{index:u,captureIndices:l}}}d.OnigScanner=B;let M=!1,T=null;d.loadWASM=function(m){if(M)return T;let e,f,c,p;if(M=!0,function(s){return typeof s.instantiator=="function"}(m))e=m.instantiator,f=m.print;else{let s;(function(i){return i.data!==void 0})(m)?(s=m.data,f=m.print):s=m,e=function(i){return typeof Response<"u"&&i instanceof Response}(s)?typeof WebAssembly.instantiateStreaming=="function"?function(i){return o=>WebAssembly.instantiateStreaming(i,o)}(s):function(i){return async o=>{const a=await i.arrayBuffer();return WebAssembly.instantiate(a,o)}}(s):function(i){return o=>WebAssembly.instantiate(i,o)}(s)}return T=new Promise((s,i)=>{c=s,p=i}),function(s,i,o,a){(0,D.default)({print:i,instantiateWasm:(u,A)=>{if(typeof performance>"u"){const l=()=>Date.now();u.env.emscripten_get_now=l,u.wasi_snapshot_preview1.emscripten_get_now=l}return s(u).then(l=>A(l.instance),a),{}}}).then(u=>{t=u,o()})}(e,f,c,p),T},d.createOnigString=function(m){return new _(m)},d.createOnigScanner=function(m){return new B(m)},d.setDefaultDebugCall=function(m){W=m}},418:P=>{var d=(typeof document<"u"&&document.currentScript&&document.currentScript.src,function(O){var U,D,t=(O=O||{})!==void 0?O:{};t.ready=new Promise(function(n,r){U=n,D=r});var W,R=Object.assign({},t),_="";function B(n){return t.locateFile?t.locateFile(n,_):_+n}W=function(n){let r;return typeof readbuffer=="function"?new Uint8Array(readbuffer(n)):(r=read(n,"binary"),c(typeof r=="object"),r)},typeof scriptArgs<"u"&&scriptArgs,typeof onig_print<"u"&&(typeof console>"u"&&(console={}),console.log=onig_print,console.warn=console.error=typeof printErr<"u"?printErr:onig_print);var M,T,m=t.print||console.log.bind(console),e=t.printErr||console.warn.bind(console);Object.assign(t,R),R=null,t.arguments&&t.arguments,t.thisProgram&&t.thisProgram,t.quit&&t.quit,t.wasmBinary&&(M=t.wasmBinary),t.noExitRuntime,typeof WebAssembly!="object"&&F("no native wasm support detected");var f=!1;function c(n,r){n||F(r)}var p,s,i,o=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function a(n,r,y){for(var E=r+y,h=r;n[h]&&!(h>=E);)++h;if(h-r>16&&n.buffer&&o)return o.decode(n.subarray(r,h));for(var g="";r<h;){var v=n[r++];if(128&v){var C=63&n[r++];if((224&v)!=192){var N=63&n[r++];if((v=(240&v)==224?(15&v)<<12|C<<6|N:(7&v)<<18|C<<12|N<<6|63&n[r++])<65536)g+=String.fromCharCode(v);else{var Q=v-65536;g+=String.fromCharCode(55296|Q>>10,56320|1023&Q)}}else g+=String.fromCharCode((31&v)<<6|C)}else g+=String.fromCharCode(v)}return g}function u(n,r){return n?a(s,n,r):""}function A(n){p=n,t.HEAP8=new Int8Array(n),t.HEAP16=new Int16Array(n),t.HEAP32=new Int32Array(n),t.HEAPU8=s=new Uint8Array(n),t.HEAPU16=new Uint16Array(n),t.HEAPU32=i=new Uint32Array(n),t.HEAPF32=new Float32Array(n),t.HEAPF64=new Float64Array(n)}t.INITIAL_MEMORY;var l=[],b=[],x=[];function k(){if(t.preRun)for(typeof t.preRun=="function"&&(t.preRun=[t.preRun]);t.preRun.length;)et(t.preRun.shift());V(l)}function tt(){V(b)}function nt(){if(t.postRun)for(typeof t.postRun=="function"&&(t.postRun=[t.postRun]);t.postRun.length;)it(t.postRun.shift());V(x)}function et(n){l.unshift(n)}function rt(n){b.unshift(n)}function it(n){x.unshift(n)}var L=0,H=null;function ot(n){L++,t.monitorRunDependencies&&t.monitorRunDependencies(L)}function at(n){if(L--,t.monitorRunDependencies&&t.monitorRunDependencies(L),L==0&&H){var r=H;H=null,r()}}function F(n){t.onAbort&&t.onAbort(n),e(n="Aborted("+n+")"),f=!0,n+=". Build with -sASSERTIONS for more info.";var r=new WebAssembly.RuntimeError(n);throw D(r),r}var I,Y,st="data:application/octet-stream;base64,";function G(n){return n.startsWith(st)}function ft(n){try{if(n==I&&M)return new Uint8Array(M);if(W)return W(n);throw"both async and sync fetching of the wasm failed"}catch(r){F(r)}}function ut(){return Promise.resolve().then(function(){return ft(I)})}function ct(){var n={env:J,wasi_snapshot_preview1:J};function r(h,g){var v=h.exports;t.asm=v,A((T=t.asm.memory).buffer),t.asm.__indirect_function_table,rt(t.asm.__wasm_call_ctors),at()}function y(h){r(h.instance)}function E(h){return ut().then(function(g){return WebAssembly.instantiate(g,n)}).then(function(g){return g}).then(h,function(g){e("failed to asynchronously prepare wasm: "+g),F(g)})}if(ot(),t.instantiateWasm)try{return t.instantiateWasm(n,r)}catch(h){e("Module.instantiateWasm callback failed with error: "+h),D(h)}return(M||typeof WebAssembly.instantiateStreaming!="function"||G(I)||typeof fetch!="function"?E(y):fetch(I,{credentials:"same-origin"}).then(function(h){return WebAssembly.instantiateStreaming(h,n).then(y,function(g){return e("wasm streaming compile failed: "+g),e("falling back to ArrayBuffer instantiation"),E(y)})})).catch(D),{}}function V(n){for(;n.length>0;)n.shift()(t)}function lt(n,r,y){s.copyWithin(n,r,r+y)}function pt(n){try{return T.grow(n-p.byteLength+65535>>>16),A(T.buffer),1}catch{}}function ht(n){var r,y=s.length,E=2147483648;if((n>>>=0)>E)return!1;for(var h=1;h<=4;h*=2){var g=y*(1+.2/h);if(g=Math.min(g,n+100663296),pt(Math.min(E,(r=Math.max(n,g))+(65536-r%65536)%65536)))return!0}return!1}G(I="onig.wasm")||(I=B(I)),Y=typeof dateNow<"u"?dateNow:()=>performance.now();var gt=[null,[],[]];function mt(n,r){var y=gt[n];r===0||r===10?((n===1?m:e)(a(y,0)),y.length=0):y.push(r)}function dt(n,r,y,E){for(var h=0,g=0;g<y;g++){var v=i[r>>2],C=i[r+4>>2];r+=8;for(var N=0;N<C;N++)mt(n,s[v+N]);h+=C}return i[E>>2]=h,0}var q,J={emscripten_get_now:Y,emscripten_memcpy_big:lt,emscripten_resize_heap:ht,fd_write:dt};function K(n){function r(){q||(q=!0,t.calledRun=!0,f||(tt(),U(t),t.onRuntimeInitialized&&t.onRuntimeInitialized(),nt()))}L>0||(k(),L>0||(t.setStatus?(t.setStatus("Running..."),setTimeout(function(){setTimeout(function(){t.setStatus("")},1),r()},1)):r()))}if(ct(),t.___wasm_call_ctors=function(){return(t.___wasm_call_ctors=t.asm.__wasm_call_ctors).apply(null,arguments)},t.___errno_location=function(){return(t.___errno_location=t.asm.__errno_location).apply(null,arguments)},t._omalloc=function(){return(t._omalloc=t.asm.omalloc).apply(null,arguments)},t._ofree=function(){return(t._ofree=t.asm.ofree).apply(null,arguments)},t._getLastOnigError=function(){return(t._getLastOnigError=t.asm.getLastOnigError).apply(null,arguments)},t._createOnigScanner=function(){return(t._createOnigScanner=t.asm.createOnigScanner).apply(null,arguments)},t._freeOnigScanner=function(){return(t._freeOnigScanner=t.asm.freeOnigScanner).apply(null,arguments)},t._findNextOnigScannerMatch=function(){return(t._findNextOnigScannerMatch=t.asm.findNextOnigScannerMatch).apply(null,arguments)},t._findNextOnigScannerMatchDbg=function(){return(t._findNextOnigScannerMatchDbg=t.asm.findNextOnigScannerMatchDbg).apply(null,arguments)},t.stackSave=function(){return(t.stackSave=t.asm.stackSave).apply(null,arguments)},t.stackRestore=function(){return(t.stackRestore=t.asm.stackRestore).apply(null,arguments)},t.stackAlloc=function(){return(t.stackAlloc=t.asm.stackAlloc).apply(null,arguments)},t.dynCall_jiji=function(){return(t.dynCall_jiji=t.asm.dynCall_jiji).apply(null,arguments)},t.UTF8ToString=u,H=function n(){q||K(),q||(H=n)},t.preInit)for(typeof t.preInit=="function"&&(t.preInit=[t.preInit]);t.preInit.length>0;)t.preInit.pop()();return K(),O.ready});P.exports=d}},w={},function P(d){var O=w[d];if(O!==void 0)return O.exports;var U=w[d]={exports:{}};return S[d].call(U.exports,U,U.exports,P),U.exports}(770);var S,w})}(z)),z.exports}var Z=wt(),At=_t(Z),bt=yt({__proto__:null,default:At},[Z]);export{bt as m};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{tz as e,c0 as r}from"./index-BwfWF2CI.js";const o=e(r);export{o as I};
|