diff --git a/CHANGELOG.md b/CHANGELOG.md index 1bb672d..0876df4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,12 @@ +## [1.0.59](https://github.com/x-orpheus/react-monaco-editor-lite/compare/v1.0.58...v1.0.59) (2022-06-23) + + +### Bug Fixes + +* monaco-editor ([fe85f24](https://github.com/x-orpheus/react-monaco-editor-lite/commit/fe85f247c16fe523fafa2883b620d0fb429a28ed)) + + + ## [1.0.58](https://github.com/x-orpheus/react-monaco-editor-lite/compare/v1.0.57...v1.0.58) (2022-06-22) diff --git a/build/app.bundle.js b/build/app.bundle.js index c2cd34e..204b157 100644 --- a/build/app.bundle.js +++ b/build/app.bundle.js @@ -1,2 +1,2 @@ /*! For license information please see app.bundle.js.LICENSE.txt */ -(()=>{var e={125:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(81),o=n.n(r),i=n(645),a=n.n(i)()(o());a.push([e.id,".music-monaco-editor-loading {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n width: 100%;\n background: var(--monaco-editor-background);\n}\n.music-monaco-editor-loading-icon {\n width: 60px;\n height: 60px;\n}\n.music-monaco-editor-highlight {\n background: rgba(0, 0, 0, 0.08);\n}\n",""]);const l=a},645:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,o,i){"string"==typeof e&&(e=[[null,e,void 0]]);var a={};if(r)for(var l=0;l0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=i),n&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=n):c[2]=n),o&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=o):c[4]="".concat(o)),t.push(c))}},t}},81:e=>{"use strict";e.exports=function(e){return e[1]}},209:(e,t)=>{"use strict";function n(e,t,n){var r=e.length,o=0,i=1,a=0;function l(t){if(null===n)o+=t;else for(;t>0;)10===e.charCodeAt(o)?(o++,i++,a=0):(o++,a++),t--}function u(e){null===n?o=e:l(e-o)}function s(){for(;o0&&65279===e.charCodeAt(0)&&(o=1);var p=0,h=null,m=[],g=[],v=null;function y(e,t){m.push(p),g.push(h),p=e,h=t}function b(){p=m.pop(),h=g.pop()}function w(t){throw new Error("Near offset "+o+": "+t+" ~~~"+e.substr(o,50)+"~~~")}var _,k,S,E,x,C=function(){null===v&&w("missing ");var e={};null!==n&&(e[n]={filename:t,line:i,char:a}),h[v]=e,v=null,y(1,e)},T=function(){null===v&&w("missing ");var e=[];h[v]=e,v=null,y(2,e)};function P(){1===p?b():w("unexpected ")}function R(){1===p?w("unexpected "):2===p?b():w("unexpected ")}function N(e){1===p?(null===v&&w("missing "),h[v]=e,v=null):2===p?h.push(e):h=e}function A(e){isNaN(e)&&w("cannot parse float"),1===p?(null===v&&w("missing "),h[v]=e,v=null):2===p?h.push(e):h=e}function O(e){isNaN(e)&&w("cannot parse integer"),1===p?(null===v&&w("missing "),h[v]=e,v=null):2===p?h.push(e):h=e}function L(e){1===p?(null===v&&w("missing "),h[v]=e,v=null):2===p?h.push(e):h=e}function I(e){1===p?(null===v&&w("missing "),h[v]=e,v=null):2===p?h.push(e):h=e}function M(e){1===p?(null===v&&w("missing "),h[v]=e,v=null):2===p?h.push(e):h=e}function j(e){if(e.isClosed)return"";var t=d(""),t.replace(/&#([0-9]+);/g,(function(e,t){return String.fromCodePoint(parseInt(t,10))})).replace(/&#x([0-9a-f]+);/g,(function(e,t){return String.fromCodePoint(parseInt(t,16))})).replace(/&|<|>|"|'/g,(function(e){switch(e){case"&":return"&";case"<":return"<";case">":return">";case""":return'"';case"'":return"'"}return e}))}for(;o=r));){var D=e.charCodeAt(o);l(1),60!==D&&w("expected <"),o>=r&&w("unexpected end of input");var z=e.charCodeAt(o);if(63!==z)if(33!==z){if(47===z){if(l(1),s(),c("plist")){f(">");continue}if(c("dict")){f(">"),P();continue}if(c("array")){f(">"),R();continue}w("unexpected closed tag")}var F=(k=void 0,S=void 0,S=!1,47===(k=d(">")).charCodeAt(k.length-1)&&(S=!0,k=k.substring(0,k.length-1)),{name:k.trim(),isClosed:S});switch(F.name){case"dict":1===p?C():2===p?(x=void 0,x={},null!==n&&(x[n]={filename:t,line:i,char:a}),h.push(x),y(1,x)):(h={},null!==n&&(h[n]={filename:t,line:i,char:a}),y(1,h)),F.isClosed&&P();continue;case"array":1===p?T():2===p?(E=void 0,E=[],h.push(E),y(2,E)):y(2,h=[]),F.isClosed&&R();continue;case"key":_=j(F),1===p?(null!==v&&w("too many "),v=_):w("unexpected ");continue;case"string":N(j(F));continue;case"real":A(parseFloat(j(F)));continue;case"integer":O(parseInt(j(F),10));continue;case"date":L(new Date(j(F)));continue;case"data":I(j(F));continue;case"true":j(F),M(!0);continue;case"false":j(F),M(!1);continue}/^plist/.test(F.name)||w("unexpected opened tag "+F.name)}else{if(l(1),c("--")){f("--\x3e");continue}f(">")}else l(1),f("?>")}return h}t.parseWithLocation=function(e,t,r){return n(e,t,r)},t.parse=function(e){return n(e,null,null)}},593:(e,t,n)=>{"use strict";const r=n(411),o=Symbol("max"),i=Symbol("length"),a=Symbol("lengthCalculator"),l=Symbol("allowStale"),u=Symbol("maxAge"),s=Symbol("dispose"),c=Symbol("noDisposeOnSet"),f=Symbol("lruList"),d=Symbol("cache"),p=Symbol("updateAgeOnGet"),h=()=>1,m=(e,t,n)=>{const r=e[d].get(t);if(r){const t=r.value;if(g(e,t)){if(y(e,r),!e[l])return}else n&&(e[p]&&(r.value.now=Date.now()),e[f].unshiftNode(r));return t.value}},g=(e,t)=>{if(!t||!t.maxAge&&!e[u])return!1;const n=Date.now()-t.now;return t.maxAge?n>t.maxAge:e[u]&&n>e[u]},v=e=>{if(e[i]>e[o])for(let t=e[f].tail;e[i]>e[o]&&null!==t;){const n=t.prev;y(e,t),t=n}},y=(e,t)=>{if(t){const n=t.value;e[s]&&e[s](n.key,n.value),e[i]-=n.length,e[d].delete(n.key),e[f].removeNode(t)}};class b{constructor(e,t,n,r,o){this.key=e,this.value=t,this.length=n,this.now=r,this.maxAge=o||0}}const w=(e,t,n,r)=>{let o=n.value;g(e,o)&&(y(e,n),e[l]||(o=void 0)),o&&t.call(r,o.value,o.key,e)};e.exports=class{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||e.max<0))throw new TypeError("max must be a non-negative number");this[o]=e.max||1/0;const t=e.length||h;if(this[a]="function"!=typeof t?h:t,this[l]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw new TypeError("maxAge must be a number");this[u]=e.maxAge||0,this[s]=e.dispose,this[c]=e.noDisposeOnSet||!1,this[p]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[o]=e||1/0,v(this)}get max(){return this[o]}set allowStale(e){this[l]=!!e}get allowStale(){return this[l]}set maxAge(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[u]=e,v(this)}get maxAge(){return this[u]}set lengthCalculator(e){"function"!=typeof e&&(e=h),e!==this[a]&&(this[a]=e,this[i]=0,this[f].forEach((e=>{e.length=this[a](e.value,e.key),this[i]+=e.length}))),v(this)}get lengthCalculator(){return this[a]}get length(){return this[i]}get itemCount(){return this[f].length}rforEach(e,t){t=t||this;for(let n=this[f].tail;null!==n;){const r=n.prev;w(this,e,n,t),n=r}}forEach(e,t){t=t||this;for(let n=this[f].head;null!==n;){const r=n.next;w(this,e,n,t),n=r}}keys(){return this[f].toArray().map((e=>e.key))}values(){return this[f].toArray().map((e=>e.value))}reset(){this[s]&&this[f]&&this[f].length&&this[f].forEach((e=>this[s](e.key,e.value))),this[d]=new Map,this[f]=new r,this[i]=0}dump(){return this[f].map((e=>!g(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[f]}set(e,t,n){if((n=n||this[u])&&"number"!=typeof n)throw new TypeError("maxAge must be a number");const r=n?Date.now():0,l=this[a](t,e);if(this[d].has(e)){if(l>this[o])return y(this,this[d].get(e)),!1;const a=this[d].get(e).value;return this[s]&&(this[c]||this[s](e,a.value)),a.now=r,a.maxAge=n,a.value=t,this[i]+=l-a.length,a.length=l,this.get(e),v(this),!0}const p=new b(e,t,l,r,n);return p.length>this[o]?(this[s]&&this[s](e,t),!1):(this[i]+=p.length,this[f].unshift(p),this[d].set(e,this[f].head),v(this),!0)}has(e){if(!this[d].has(e))return!1;const t=this[d].get(e).value;return!g(this,t)}get(e){return m(this,e,!0)}peek(e){return m(this,e,!1)}pop(){const e=this[f].tail;return e?(y(this,e),e.value):null}del(e){y(this,this[d].get(e))}load(e){this.reset();const t=Date.now();for(let n=e.length-1;n>=0;n--){const r=e[n],o=r.e||0;if(0===o)this.set(r.k,r.v);else{const e=o-t;e>0&&this.set(r.k,r.v,e)}}}prune(){this[d].forEach(((e,t)=>m(this,t,!1)))}}},954:(e,t,n)=>{"use strict";const r=n(439),o=n(934);class i{constructor(e){this._ruleStack=e}get ruleStack(){return this._ruleStack}clone(){return new i(this._ruleStack)}equals(e){return!!(e&&e instanceof i&&e===this&&e._ruleStack===this._ruleStack)}}t.p=function(e,t,n,a){return Promise.all(Array.from(n.keys()).map((async l=>{const u=await t.loadGrammar(n.get(l));e.languages.setTokensProvider(l,{getInitialState:()=>new i(r.INITIAL),tokenize:(e,t)=>{const n=u.tokenizeLine(e,t.ruleStack);return{endState:new i(n.ruleStack),tokens:n.tokens.map((e=>({...e,scopes:a?o.TMToMonacoToken(a,e.scopes):e.scopes[e.scopes.length-1]})))}}})})))}},934:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TMToMonacoToken=(e,t)=>{let n="";for(let e=t[0].length-1;e>=0;e-=1){const r=t[0][e];if("."===r)break;n=r+n}for(let r=t.length-1;r>=0;r-=1){const o=t[r];for(let t=o.length-1;t>=0;t-=1)if("."===o[t]){const r=o.slice(0,t);if(e._themeService.getColorTheme()._tokenTheme._match(r+"."+n)._foreground>1)return r+"."+n;if(e._themeService.getColorTheme()._tokenTheme._match(r)._foreground>1)return r}}return""}},876:(e,t,n)=>{"use strict";var r=n(155);Object.defineProperty(t,"__esModule",{value:!0}),t.CAPTURE_METADATA=void 0!==r&&!!r.env.VSCODE_TEXTMATE_DEBUG,t.IN_DEBUG_MODE=void 0!==r&&!!r.env.VSCODE_TEXTMATE_DEBUG},567:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(550),o=n(313),i=n(716),a=n(876);function l(e,t){for(var n=0,r=t.length;n=0?e[o.substring(0,i)]=!0:e[o]=!0}}}function u(e,t){for(var n in t){var r=t[n];r.patterns&&Array.isArray(r.patterns)&&l(e,r.patterns),r.repository&&u(e,r.repository)}}function s(e,t){if(!e)return!1;if(e===t)return!0;var n=t.length;return e.length>n&&e.substr(0,n)===t&&"."===e[n]}function c(e,t){if(t.length>")}var s=Object.keys(this._embeddedLanguages).map((function(t){return e._escapeRegExpCharacters(t)}));0===s.length?this._embeddedLanguagesRegex=null:(s.sort(),s.reverse(),this._embeddedLanguagesRegex=new RegExp("^(("+s.join(")|(")+"))($|\\.)",""))}return e.prototype.onDidChangeTheme=function(){this._cache=Object.create(null),this._defaultMetaData=new d("",this._initialLanguage,0,[this._themeProvider.getDefaults()])},e.prototype.getDefaultMetadata=function(){return this._defaultMetaData},e._escapeRegExpCharacters=function(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")},e.prototype.getMetadataForScope=function(t){if(null===t)return e._NULL_SCOPE_METADATA;var n=this._cache[t];return n||(n=this._doGetMetadataForScope(t),this._cache[t]=n,n)},e.prototype._doGetMetadataForScope=function(e){var t=this._scopeToLanguage(e),n=this._toStandardTokenType(e),r=this._themeProvider.themeMatch(e);return new d(e,t,n,r)},e.prototype._scopeToLanguage=function(e){if(!e)return 0;if(!this._embeddedLanguagesRegex)return 0;var t=e.match(this._embeddedLanguagesRegex);return t&&(this._embeddedLanguages[t[1]]||0)||0},e.prototype._toStandardTokenType=function(t){var n=t.match(e.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 0;switch(n[1]){case"comment":return 1;case"string":return 2;case"regex":return 4;case"meta.embedded":return 8}throw new Error("Unexpected match for standard token type!")},e._NULL_SCOPE_METADATA=new d("",0,0,null),e.STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/,e}(),h=function(){function e(e,t,n,r,o){if(this._scopeMetadataProvider=new p(t,o,n),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[],this._includedGrammars={},this._grammarRepository=o,this._grammar=m(e,null),this._tokenTypeMatchers=[],r)for(var a=0,l=Object.keys(r);ac)break;for(;s.length>0&&s[s.length-1].endPos<=p.start;)i.produceFromScopes(s[s.length-1].scopes,s[s.length-1].endPos),s.pop();if(s.length>0?i.produceFromScopes(s[s.length-1].scopes,p.start):i.produce(r,p.start),d.retokenizeCapturedWithRuleId){var h=d.getName(o.getString(t),l),m=r.contentNameScopesList.push(e,h),g=d.getContentName(o.getString(t),l),v=m.push(e,g),b=r.push(d.retokenizeCapturedWithRuleId,p.start,null,m,v);y(e,o.createOnigString(o.getString(t).substring(0,p.end)),n&&0===p.start,p.start,b,i)}else{var w=d.getName(o.getString(t),l);if(null!==w){var _=(s.length>0?s[s.length-1].scopes:r.contentNameScopesList).push(e,w);s.push(new k(_,p.end))}}}}}for(;s.length>0;)i.produceFromScopes(s[s.length-1].scopes,s[s.length-1].endPos),s.pop()}}function v(e){for(var t=[],n=0,r=e.rules.length;nr&&(r=h.captureIndices[0].end,n=!1))}return{stack:i,linePos:r,anchorPosition:u,isFirstLine:n}}(e,t,n,r,i,l);i=c.stack,r=c.linePos,n=c.isFirstLine;for(var f=c.anchorPosition;!s;)d();function d(){a.IN_DEBUG_MODE&&(console.log(""),console.log("@@scanNext: |"+o.getString(t).replace(/\n$/,"\\n").substr(r)+"|"));var c=function(e,t,n,r,o,i){var l=function(e,t,n,r,o,i){var l=o.getRule(e).compile(e,o.endRule,n,r===i),u=l.scanner.findNextMatchSync(t,r);return a.IN_DEBUG_MODE&&(console.log(" scanning for"),console.log(v(l))),u?{captureIndices:u.captureIndices,matchedRuleId:l.rules[u.index]}:null}(e,t,n,r,o,i),u=e.getInjections();if(0===u.length)return l;var s=function(e,t,n,r,o,i,l){for(var u,s=Number.MAX_VALUE,c=null,f=0,d=i.contentNameScopesList.generateScopes(),p=0,h=e.length;p=s)&&(s=b,c=y.captureIndices,u=g.rules[y.index],f=m.priority,s===o))break}}}return c?{priorityMatch:-1===f,captureIndices:c,matchedRuleId:u}:null}(u,e,t,n,r,o,i);if(!s)return l;if(!l)return s;var c=l.captureIndices[0].start,f=s.captureIndices[0].start;return f0)&&d[0].end>r;if(-1===p){var m=i.getRule(e);a.IN_DEBUG_MODE&&console.log(" popping "+m.debugName+" - "+m.debugEndRegExp),l.produce(i,d[0].start),i=i.setContentNameScopesList(i.nameScopesList),g(e,t,n,i,l,m.endCaptures,d),l.produce(i,d[0].end);var y=i;if(i=i.pop(),!h&&y.getEnterPos()===r)return console.error("[1] - Grammar is in an endless loop - Grammar pushed & popped a rule without advancing"),i=y,l.produce(i,u),void(s=!0)}else{var b=e.getRule(p);l.produce(i,d[0].start);var w=i,_=b.getName(o.getString(t),d),k=i.contentNameScopesList.push(e,_);if(i=i.push(p,r,null,k,k),b instanceof o.BeginEndRule){var S=b;a.IN_DEBUG_MODE&&console.log(" pushing "+S.debugName+" - "+S.debugBeginRegExp),g(e,t,n,i,l,S.beginCaptures,d),l.produce(i,d[0].end),f=d[0].end;var E=S.getContentName(o.getString(t),d),x=k.push(e,E);if(i=i.setContentNameScopesList(x),S.endHasBackReferences&&(i=i.setEndRule(S.getEndWithResolvedBackReferences(o.getString(t),d))),!h&&w.hasSameRuleAs(i))return console.error("[2] - Grammar is in an endless loop - Grammar pushed the same rule without advancing"),i=i.pop(),l.produce(i,u),void(s=!0)}else if(b instanceof o.BeginWhileRule){if(S=b,a.IN_DEBUG_MODE&&console.log(" pushing "+S.debugName),g(e,t,n,i,l,S.beginCaptures,d),l.produce(i,d[0].end),f=d[0].end,E=S.getContentName(o.getString(t),d),x=k.push(e,E),i=i.setContentNameScopesList(x),S.whileHasBackReferences&&(i=i.setEndRule(S.getWhileWithResolvedBackReferences(o.getString(t),d))),!h&&w.hasSameRuleAs(i))return console.error("[3] - Grammar is in an endless loop - Grammar pushed the same rule without advancing"),i=i.pop(),l.produce(i,u),void(s=!0)}else{var C=b;if(a.IN_DEBUG_MODE&&console.log(" matched "+C.debugName+" - "+C.debugMatchRegExp),g(e,t,n,i,l,C.captures,d),l.produce(i,d[0].end),i=i.pop(),!h)return console.error("[4] - Grammar is in an endless loop - Grammar is not advancing, nor is it pushing/popping"),i=i.safePop(),l.produce(i,u),void(s=!0)}}d[0].end>r&&(r=d[0].end,n=!1)}return i}t.Grammar=h;var b=function(){function e(){}return e.toBinaryStr=function(e){for(var t=e.toString(2);t.length<32;)t="0"+t;return t},e.printMetadata=function(t){var n=e.getLanguageId(t),r=e.getTokenType(t),o=e.getFontStyle(t),i=e.getForeground(t),a=e.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:o,foreground:i,background:a})},e.getLanguageId=function(e){return(255&e)>>>0},e.getTokenType=function(e){return(1792&e)>>>8},e.getFontStyle=function(e){return(14336&e)>>>11},e.getForeground=function(e){return(8372224&e)>>>14},e.getBackground=function(e){return(4286578688&e)>>>23},e.set=function(t,n,r,o,i,a){var l=e.getLanguageId(t),u=e.getTokenType(t),s=e.getFontStyle(t),c=e.getForeground(t),f=e.getBackground(t);return 0!==n&&(l=n),0!==r&&(u=8===r?0:r),-1!==o&&(s=o),0!==i&&(c=i),0!==a&&(f=a),(l<<0|u<<8|s<<11|c<<14|f<<23)>>>0},e}();t.StackElementMetadata=b;var w=function(){function e(e,t,n){this.parent=e,this.scope=t,this.metadata=n}return e._equals=function(e,t){for(;;){if(e===t)return!0;if(e.scope!==t.scope||e.metadata!==t.metadata)return!1;if(e=e.parent,t=t.parent,!e&&!t)return!0;if(!e||!t)return!1}},e.prototype.equals=function(t){return e._equals(this,t)},e._matchesScope=function(e,t,n){return t===e||e.substring(0,n.length)===n},e._matches=function(e,t){if(null===t)return!0;for(var n=t.length,r=0,o=t[r],i=o+".";e;){if(this._matchesScope(e.scope,o,i)){if(++r===n)return!0;i=(o=t[r])+"."}e=e.parent}return!1},e.mergeMetadata=function(e,t,n){if(null===n)return e;var r=-1,o=0,i=0;if(null!==n.themeData)for(var a=0,l=n.themeData.length;a=0?e._push(this,t,n.split(/ /g)):e._push(this,t,[n])},e._generateScopes=function(e){for(var t=[],n=0;e;)t[n++]=e.scope,e=e.parent;return t.reverse(),t},e.prototype.generateScopes=function(){return e._generateScopes(this)},e}();t.ScopeListElement=w;var _=function(){function e(e,t,n,r,o,i){this.parent=e,this.depth=this.parent?this.parent.depth+1:1,this.ruleId=t,this._enterPos=n,this.endRule=r,this.nameScopesList=o,this.contentNameScopesList=i}return e._structuralEquals=function(e,t){for(;;){if(e===t)return!0;if(e.depth!==t.depth||e.ruleId!==t.ruleId||e.endRule!==t.endRule)return!1;if(e=e.parent,t=t.parent,!e&&!t)return!0;if(!e||!t)return!1}},e._equals=function(e,t){return e===t||!!this._structuralEquals(e,t)&&e.contentNameScopesList.equals(t.contentNameScopesList)},e.prototype.clone=function(){return this},e.prototype.equals=function(t){return null!==t&&e._equals(this,t)},e._reset=function(e){for(;e;)e._enterPos=-1,e=e.parent},e.prototype.reset=function(){e._reset(this)},e.prototype.pop=function(){return this.parent},e.prototype.safePop=function(){return this.parent?this.parent:this},e.prototype.push=function(t,n,r,o,i){return new e(this,t,n,r,o,i)},e.prototype.getEnterPos=function(){return this._enterPos},e.prototype.getRule=function(e){return e.getRule(this.ruleId)},e.prototype._writeString=function(e,t){return this.parent&&(t=this.parent._writeString(e,t)),e[t++]="("+this.ruleId+", TODO-"+this.nameScopesList+", TODO-"+this.contentNameScopesList+")",t},e.prototype.toString=function(){var e=[];return this._writeString(e,0),"["+e.join(",")+"]"},e.prototype.setContentNameScopesList=function(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this.endRule,this.nameScopesList,e)},e.prototype.setEndRule=function(t){return this.endRule===t?this:new e(this.parent,this.ruleId,this._enterPos,t,this.nameScopesList,this.contentNameScopesList)},e.prototype.hasSameRuleAs=function(e){return this.ruleId===e.ruleId},e.NULL=new e(null,0,0,null,null,null),e}();t.StackElement=_;var k=function(e,t){this.scopes=e,this.endPos=t};t.LocalStackElement=k;var S=function(){function e(e,t,n){this._emitBinaryTokens=e,this._tokenTypeOverrides=n,a.IN_DEBUG_MODE&&(this._lineText=t),this._emitBinaryTokens?this._binaryTokens=[]:this._tokens=[],this._lastTokenEndIndex=0}return e.prototype.produce=function(e,t){this.produceFromScopes(e.contentNameScopesList,t)},e.prototype.produceFromScopes=function(e,t){if(!(this._lastTokenEndIndex>=t)){if(this._emitBinaryTokens){for(var n=e.metadata,r=0,o=this._tokenTypeOverrides;r0&&this._binaryTokens[this._binaryTokens.length-1]===n||(this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(n)),void(this._lastTokenEndIndex=t)}var l=e.generateScopes();if(a.IN_DEBUG_MODE){console.log(" token: |"+this._lineText.substring(this._lastTokenEndIndex,t).replace(/\n$/,"\\n")+"|");for(var u=0;u0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),0===this._tokens.length&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens},e.prototype.getBinaryResult=function(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),0===this._binaryTokens.length&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);for(var n=new Uint32Array(this._binaryTokens.length),r=0,o=this._binaryTokens.length;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(209),o=n(876),i=n(182);t.parseJSONGrammar=function(e,t){return o.CAPTURE_METADATA?i.parse(e,t,!0):JSON.parse(e)},t.parsePLISTGrammar=function(e,t){return o.CAPTURE_METADATA?r.parseWithLocation(e,t,"$vscodeTextmateLocation"):r.parse(e)}},182:(e,t)=>{"use strict";function n(e,t){throw new Error("Near offset "+e.pos+": "+t+" ~~~"+e.source.substr(e.pos,50)+"~~~")}Object.defineProperty(t,"__esModule",{value:!0}),t.parse=function(e,t,a){var l=new r(e),u=new o,s=0,c=null,f=[],d=[];function p(){f.push(s),d.push(c)}function h(){s=f.pop(),c=d.pop()}function m(e){n(l,e)}for(;i(l,u);){if(0===s){if(null!==c&&m("too many constructs in root"),3===u.type){c={},a&&(c.$vscodeTextmateLocation=u.toLocation(t)),p(),s=1;continue}if(2===u.type){c=[],p(),s=4;continue}m("unexpected token in root")}if(2===s){if(5===u.type){h();continue}if(7===u.type){s=3;continue}m("expected , or }")}if(1===s||3===s){if(1===s&&5===u.type){h();continue}if(1===u.type){var g=u.value;if(i(l,u)&&6===u.type||m("expected colon"),i(l,u)||m("expected value"),s=2,1===u.type){c[g]=u.value;continue}if(8===u.type){c[g]=null;continue}if(9===u.type){c[g]=!0;continue}if(10===u.type){c[g]=!1;continue}if(11===u.type){c[g]=parseFloat(u.value);continue}if(2===u.type){var v=[];c[g]=v,p(),s=4,c=v;continue}if(3===u.type){var y={};a&&(y.$vscodeTextmateLocation=u.toLocation(t)),c[g]=y,p(),s=1,c=y;continue}}m("unexpected token in dict")}if(5===s){if(4===u.type){h();continue}if(7===u.type){s=6;continue}m("expected , or ]")}if(4===s||6===s){if(4===s&&4===u.type){h();continue}if(s=5,1===u.type){c.push(u.value);continue}if(8===u.type){c.push(null);continue}if(9===u.type){c.push(!0);continue}if(10===u.type){c.push(!1);continue}if(11===u.type){c.push(parseFloat(u.value));continue}if(2===u.type){v=[],c.push(v),p(),s=4,c=v;continue}if(3===u.type){y={},a&&(y.$vscodeTextmateLocation=u.toLocation(t)),c.push(y),p(),s=1,c=y;continue}m("unexpected token in array")}m("unknown state")}return 0!==d.length&&m("unclosed constructs"),c};var r=function(e){this.source=e,this.pos=0,this.len=e.length,this.line=1,this.char=0},o=function(){function e(){this.value=null,this.offset=-1,this.len=-1,this.line=-1,this.char=-1}return e.prototype.toLocation=function(e){return{filename:e,line:this.line,char:this.char}},e}();function i(e,t){t.value=null,t.type=0,t.offset=-1,t.len=-1,t.line=-1,t.char=-1;for(var r,o=e.source,i=e.pos,a=e.len,l=e.line,u=e.char;;){if(i>=a)return!1;if(32!==(r=o.charCodeAt(i))&&9!==r&&13!==r){if(10!==r)break;i++,l++,u=0}else i++,u++}if(t.offset=i,t.line=l,t.char=u,34===r){for(t.type=1,i++,u++;;){if(i>=a)return!1;if(r=o.charCodeAt(i),i++,u++,92!==r){if(34===r)break}else i++,u++}t.value=o.substring(t.offset+1,i-1).replace(/\\u([0-9A-Fa-f]{4})/g,(function(e,t){return String.fromCodePoint(parseInt(t,16))})).replace(/\\(.)/g,(function(t,r){switch(r){case'"':return'"';case"\\":return"\\";case"/":return"/";case"b":return"\b";case"f":return"\f";case"n":return"\n";case"r":return"\r";case"t":return"\t";default:n(e,"invalid escape sequence")}}))}else if(91===r)t.type=2,i++,u++;else if(123===r)t.type=3,i++,u++;else if(93===r)t.type=4,i++,u++;else if(125===r)t.type=5,i++,u++;else if(58===r)t.type=6,i++,u++;else if(44===r)t.type=7,i++,u++;else if(110===r){if(t.type=8,i++,u++,117!==(r=o.charCodeAt(i)))return!1;if(i++,u++,108!==(r=o.charCodeAt(i)))return!1;if(i++,u++,108!==(r=o.charCodeAt(i)))return!1;i++,u++}else if(116===r){if(t.type=9,i++,u++,114!==(r=o.charCodeAt(i)))return!1;if(i++,u++,117!==(r=o.charCodeAt(i)))return!1;if(i++,u++,101!==(r=o.charCodeAt(i)))return!1;i++,u++}else if(102===r){if(t.type=10,i++,u++,97!==(r=o.charCodeAt(i)))return!1;if(i++,u++,108!==(r=o.charCodeAt(i)))return!1;if(i++,u++,115!==(r=o.charCodeAt(i)))return!1;if(i++,u++,101!==(r=o.charCodeAt(i)))return!1;i++,u++}else for(t.type=11;;){if(i>=a)return!1;if(!(46===(r=o.charCodeAt(i))||r>=48&&r<=57||101===r||69===r||45===r||43===r))break;i++,u++}return t.len=i-t.offset,null===t.value&&(t.value=o.substr(t.offset,t.len)),e.pos=i,e.line=l,e.char=u,!0}},439:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function l(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){e.done?o(e.value):new n((function(t){t(e.value)})).then(a,l)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]{"use strict";function n(e){return e&&e.match(/[\w\.:]+/)}Object.defineProperty(t,"__esModule",{value:!0}),t.createMatchers=function(e,t){for(var r,o,i,a=[],l=(i=(o=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g).exec(r=e),{next:function(){if(!i)return null;var e=i[0];return i=o.exec(r),e}}),u=l.next();null!==u;){var s=0;if(2===u.length&&":"===u.charAt(1)){switch(u.charAt(0)){case"R":s=1;break;case"L":s=-1;break;default:console.log("Unknown priority "+u+" in scope selector")}u=l.next()}var c=d();if(c&&a.push({matcher:c,priority:s}),","!==u)break;u=l.next()}return a;function f(){if("-"===u){u=l.next();var e=f();return function(t){return e&&!e(t)}}if("("===u){u=l.next();var r=function(){for(var e=[],t=d();t&&(e.push(t),"|"===u||","===u);){do{u=l.next()}while("|"===u||","===u);t=d()}return function(t){return e.some((function(e){return e(t)}))}}();return")"===u&&(u=l.next()),r}if(n(u)){var o=[];do{o.push(u),u=l.next()}while(n(u));return function(e){return t(o,e)}}return null}function d(){for(var e=[],t=f();t;)e.push(t),t=f();return function(t){return e.every((function(e){return e(t)}))}}}},783:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(567),o=function(){function e(e){this._theme=e,this._grammars={},this._rawGrammars={},this._injectionGrammars={}}return e.prototype.setTheme=function(e){var t=this;this._theme=e,Object.keys(this._grammars).forEach((function(e){t._grammars[e].onDidChangeTheme()}))},e.prototype.getColorMap=function(){return this._theme.getColorMap()},e.prototype.addGrammar=function(e,t){this._rawGrammars[e.scopeName]=e;var n={};return r.collectIncludedScopes(n,e),t&&(this._injectionGrammars[e.scopeName]=t,t.forEach((function(e){n[e]=!0}))),Object.keys(n)},e.prototype.lookup=function(e){return this._rawGrammars[e]},e.prototype.injections=function(e){return this._injectionGrammars[e]},e.prototype.getDefaults=function(){return this._theme.getDefaults()},e.prototype.themeMatch=function(e){return this._theme.match(e)},e.prototype.grammarForScopeName=function(e,t,n,o){if(!this._grammars[e]){var i=this._rawGrammars[e];if(!i)return null;this._grammars[e]=r.createGrammar(i,t,n,o,this)}return this._grammars[e]},e}();t.SyncRegistry=o},313:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(520),a=n(550),l=n(105),u=/\\(\d+)/,s=/\\(\d+)/g,c=function(){function e(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=a.RegexSource.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=a.RegexSource.hasCaptures(this._contentName)}return Object.defineProperty(e.prototype,"debugName",{get:function(){return this.constructor.name+"#"+this.id+" @ "+i.basename(this.$location.filename)+":"+this.$location.line},enumerable:!0,configurable:!0}),e.prototype.getName=function(e,t){return this._nameIsCapturing?a.RegexSource.replaceCaptures(this._name,e,t):this._name},e.prototype.getContentName=function(e,t){return this._contentNameIsCapturing?a.RegexSource.replaceCaptures(this._contentName,e,t):this._contentName},e.prototype.collectPatternsRecursive=function(e,t,n){throw new Error("Implement me!")},e.prototype.compile=function(e,t,n,r){throw new Error("Implement me!")},e}();t.Rule=c;var f=function(e){function t(t,n,r,o,i){var a=e.call(this,t,n,r,o)||this;return a.retokenizeCapturedWithRuleId=i,a}return o(t,e),t}(c);t.CaptureRule=f;var d=function(){function e(e,t,n){void 0===n&&(n=!0),n?this._handleAnchors(e):(this.source=e,this.hasAnchor=!1),this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()),this.ruleId=t,this.hasBackReferences=u.test(this.source)}return e.prototype.clone=function(){return new e(this.source,this.ruleId,!0)},e.prototype.setSource=function(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))},e.prototype._handleAnchors=function(e){if(e){var t,n=void 0,r=void 0,o=0,i=[],a=!1;for(n=0,t=e.length;ni&&(i=o);for(a=0;a<=i;a++)u[a]=null;for(l in t)if("$vscodeTextmateLocation"!==l){o=parseInt(l,10);var s=0;t[l].patterns&&(s=e.getCompiledRuleId(t[l],n,r)),u[o]=e.createCaptureRule(n,t[l].$vscodeTextmateLocation,t[l].name,t[l].contentName,s)}}return u},e._compilePatterns=function(t,n,r){var o,i,a,l,u,s,c,f=[];if(t)for(i=0,a=t.length;i=0?(p=o.include.substring(0,m),h=o.include.substring(m+1)):p=o.include,u=n.getExternalGrammar(p,r))if(h){var b=u.repository[h];b&&(l=e.getCompiledRuleId(b,n,u.repository))}else l=e.getCompiledRuleId(u.repository.$self,n,u.repository)}else l=e.getCompiledRuleId(o,n,r);if(-1!==l){if(c=!1,((s=n.getRule(l))instanceof g||s instanceof v||s instanceof y)&&s.hasMissingPatterns&&0===s.patterns.length&&(c=!0),c)continue;f.push(l)}}return{patterns:f,hasMissingPatterns:(t?t.length:0)!==f.length}},e}();t.RuleFactory=b},846:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e,t,n,r,o,i){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=o,this.background=i};function r(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function o(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];for(var t=e.settings,o=[],i=0,a=0,l=t.length;a1&&(v=m.slice(0,m.length-1)).reverse(),o[i++]=new n(g,v,a,c,p,h)}}}return o}function i(e){e.sort((function(e,t){var n=u(e.scope,t.scope);return 0!==n||0!==(n=s(e.parentScopes,t.parentScopes))?n:e.index-t.index}));for(var t=0,n="#000000",r="#ffffff";e.length>=1&&""===e[0].scope;){var o=e.shift();-1!==o.fontStyle&&(t=o.fontStyle),null!==o.foreground&&(n=o.foreground),null!==o.background&&(r=o.background)}for(var i=new a,d=new c(0,null,t,i.getId(n),i.getId(r)),p=new f(new c(0,null,-1,0,0),[]),h=0,m=e.length;ht?1:0}function s(e,t){if(null===e&&null===t)return 0;if(!e)return-1;if(!t)return 1;var n=e.length,r=t.length;if(n===r){for(var o=0;oe?console.log("how did this happen?"):this.scopeDepth=e,-1!==t&&(this.fontStyle=t),0!==n&&(this.foreground=n),0!==r&&(this.background=r)},e}();t.ThemeTrieElementRule=c;var f=function(){function e(e,t,n){void 0===t&&(t=[]),void 0===n&&(n={}),this._mainRule=e,this._rulesWithParentScopes=t,this._children=n}return e._sortBySpecificity=function(e){return 1===e.length||e.sort(this._cmpBySpecificity),e},e._cmpBySpecificity=function(e,t){if(e.scopeDepth===t.scopeDepth){var n=e.parentScopes,r=t.parentScopes,o=null===n?0:n.length,i=null===r?0:r.length;if(o===i)for(var a=0;a{"use strict";function n(e){return Array.isArray(e)?function(e){for(var t=[],r=0,o=e.length;r{"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function o(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,i){for(var a,l,u=o(e),s=1;s{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(710);t.default=class{constructor(e){this.source=e;try{this.scanner=new r.default([this.source])}catch(e){}}searchSync(e,t){let n;return null==t&&(t=0),n=this.scanner.findNextMatchSync(e,t),this.captureIndicesForMatch(e,n)}search(e,t,n){null==t&&(t=0),"function"==typeof t&&(n=t,t=0);try{n(null,this.searchSync(e,t))}catch(e){n(e)}}testSync(e){return"boolean"==typeof this.source||"boolean"==typeof e?this.source===e:null!=this.searchSync(e)}test(e,t){"function"!=typeof t&&(t=()=>{});try{t(null,this.testSync(e))}catch(e){t(e)}}captureIndicesForMatch(e,t){if(null!=t){const{captureIndices:n}=t;let r;e=this.scanner.convertToString(e);for(let t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(593),o=n(527),i=n(922);function a(e){const t=o.onigasmH._malloc(e.utf8Bytes.length);return o.onigasmH.HEAPU8.set(e.utf8Bytes,t),t}function l(e){const t=[];let n=0;for(;0!==o.onigasmH.HEAPU8[e];)t[n++]=o.onigasmH.HEAPU8[e++];return t.join()}const u=new r({dispose:(e,t)=>{const n=o.onigasmH._malloc(t.regexTPtrs.length);if(o.onigasmH.HEAPU8.set(t.regexTPtrs,n),0!==o.onigasmH._disposeCompiledPatterns(n,e.patterns.length)){const e=l(o.onigasmH._getLastError());throw new Error(e)}o.onigasmH._free(n)},max:1e3});class s{constructor(e){if(null===o.onigasmH)throw new Error("Onigasm has not been initialized, call loadWASM from 'onigasm' exports before using any other API");for(let t=0;t0){const e=new Uint32Array(o.onigasmH.HEAPU32.buffer,h,m),t=[];let n=0,r=0;for(;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=class{constructor(e){if(this.substring=(e,t)=>this.source.substring(e,t),this.toString=(e,t)=>this.source,"string"!=typeof e)throw new TypeError("Argument must be a string");this.source=e,this._utf8Bytes=null,this._utf8Indexes=null}get utf8Bytes(){return this._utf8Bytes||this.encode(),this._utf8Bytes}get utf8Indexes(){return this._utf8Bytes||this.encode(),this._utf8Indexes}get content(){return this.source}get length(){return this.source.length}get hasMultiByteCharacters(){return null!==this.utf8Indexes}convertUtf8OffsetToUtf16(e){if(e<0)return 0;if(e>=this._utf8Bytes.length-1)return this.source.length;const t=this.utf8Indexes;return t&&e>=this._mappingTableStartOffset?function(e,t){let n=0,r=e.length;if(0===r)return 0;for(;n=t?r=o:n=o+1}for(;n>0&&(n>=e.length||e[n]>t);)n--;return n>0&&e[n]===e[n-1]&&n--,n}(t,e-this._mappingTableStartOffset)+this._mappingTableStartOffset:e}convertUtf16OffsetToUtf8(e){if(e<0)return 0;const t=this._utf8Bytes;if(e>=this.source.length)return t.length-1;const n=this.utf8Indexes;return n&&e>=this._mappingTableStartOffset?n[e-this._mappingTableStartOffset]+this._mappingTableStartOffset:e}encode(){const e=this.source,t=e.length;let n,r=0,o=0;function i(e){const i=3*(t-e);n=i<=255?new Uint8Array(t-e):i<=65535?new Uint16Array(t-e):new Uint32Array(t-e),o=e,n[r++]=0}const a=new Uint8Array(3*t+1);let l=0,u=0;for(;u57343)s=c;else if(c>=56320)s=65533;else if(u===t-1)s=65533;else{const t=e.charCodeAt(u+1);56320<=t&&t<=57343?(n||i(u),s=65536+((1023&c)<<10)+(1023&t),u+=1,n[r++]=l-o):s=65533}let f,d;if(s<=127?(f=1,d=0):s<=2047?(f=2,d=192):s<=65535?(f=3,d=224):(f=4,d=240),1===f)a[l++]=s;else for(n||i(l),a[l++]=(s>>6*--f)+d;f>0;){const e=s>>6*(f-1);a[l++]=128|63&e,f-=1}u+=1}const s=a.slice(0,l+1);s[l]=0,this._utf8Bytes=s,n&&(this._utf8Indexes=n,this._mappingTableStartOffset=o)}}},105:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(527);t.loadWASM=r.loadWASM;const o=n(197);t.OnigRegExp=o.default;const i=n(710);t.OnigScanner=i.default;const a=n(922);t.OnigString=a.default},782:e=>{var t=("undefined"!=typeof document&&document.currentScript&&document.currentScript.src,function(e){var t,n=void 0!==(e=e||{})?e:{},r={};for(t in n)n.hasOwnProperty(t)&&(r[t]=n[t]);var o,i=[],a=!1,l=!1,u=!0,s="";function c(e){return n.locateFile?n.locateFile(e,s):s+e}u&&(o=function(e){var t;return"function"==typeof readbuffer?new Uint8Array(readbuffer(e)):(y("object"==typeof(t=read(e,"binary"))),t)},"undefined"!=typeof scriptArgs?i=scriptArgs:void 0!==arguments&&(i=arguments),"undefined"!=typeof print&&("undefined"==typeof console&&(console={}),console.log=print,console.warn=console.error="undefined"!=typeof printErr?printErr:print));var f=n.print||console.log.bind(console),d=n.printErr||console.warn.bind(console);for(t in r)r.hasOwnProperty(t)&&(n[t]=r[t]);r=null,n.arguments&&(i=n.arguments),n.thisProgram&&n.thisProgram,n.quit&&n.quit;var p,h,m=function(e){};n.wasmBinary&&(p=n.wasmBinary),n.noExitRuntime&&n.noExitRuntime,"object"!=typeof WebAssembly&&d("no native wasm support detected");var g=new WebAssembly.Table({initial:244,maximum:244,element:"anyfunc"}),v=!1;function y(e,t){e||Z("Assertion failed: "+t)}function b(e){var t=n["_"+e];return y(t,"Cannot call unknown function "+e+", make sure it is exported"),t}function w(e,t,n,r,o){var i={string:function(e){var t=0;if(null!=e&&0!==e){var n=1+(e.length<<2);x(e,t=ke(n),n)}return t},array:function(e){var t=ke(e.length);return C(e,t),t}},a=b(e),l=[],u=0;if(r)for(var s=0;s=r);)++o;if(o-t>16&&e.subarray&&_)return _.decode(e.subarray(t,o));for(var i="";t>10,56320|1023&s)}}else i+=String.fromCharCode((31&a)<<6|l)}else i+=String.fromCharCode(a)}return i}function S(e,t){return e?k(R,e,t):""}function E(e,t,n,r){if(!(r>0))return 0;for(var o=n,i=n+r-1,a=0;a=55296&&l<=57343&&(l=65536+((1023&l)<<10)|1023&e.charCodeAt(++a)),l<=127){if(n>=i)break;t[n++]=l}else if(l<=2047){if(n+1>=i)break;t[n++]=192|l>>6,t[n++]=128|63&l}else if(l<=65535){if(n+2>=i)break;t[n++]=224|l>>12,t[n++]=128|l>>6&63,t[n++]=128|63&l}else{if(n+3>=i)break;t[n++]=240|l>>18,t[n++]=128|l>>12&63,t[n++]=128|l>>6&63,t[n++]=128|63&l}}return t[n]=0,n-o}function x(e,t,n){return E(e,R,t,n)}function C(e,t){P.set(e,t)}"undefined"!=typeof TextDecoder&&new TextDecoder("utf-16le");var T,P,R,N,A=65536;function O(e,t){return e%t>0&&(e+=t-e%t),e}function L(e){T=e,n.HEAP8=P=new Int8Array(e),n.HEAP16=new Int16Array(e),n.HEAP32=N=new Int32Array(e),n.HEAPU8=R=new Uint8Array(e),n.HEAPU16=new Uint16Array(e),n.HEAPU32=new Uint32Array(e),n.HEAPF32=new Float32Array(e),n.HEAPF64=new Float64Array(e)}var I=5507664,M=264624,j=n.TOTAL_MEMORY||157286400;function D(e){for(;e.length>0;){var t=e.shift();if("function"!=typeof t){var r=t.func;"number"==typeof r?void 0===t.arg?n.dynCall_v(r):n.dynCall_vi(r,t.arg):r(void 0===t.arg?null:t.arg)}else t()}}(h=n.wasmMemory?n.wasmMemory:new WebAssembly.Memory({initial:j/A}))&&(T=h.buffer),j=T.byteLength,L(T),N[M>>2]=I;var z=[],F=[],U=[],B=[];function W(){if(n.preRun)for("function"==typeof n.preRun&&(n.preRun=[n.preRun]);n.preRun.length;)V(n.preRun.shift());D(z)}function G(){D(F)}function H(){D(U)}function $(){if(n.postRun)for("function"==typeof n.postRun&&(n.postRun=[n.postRun]);n.postRun.length;)Q(n.postRun.shift());D(B)}function V(e){z.unshift(e)}function Q(e){B.unshift(e)}Math.abs,Math.ceil,Math.floor,Math.min;var q=0,K=null,Y=null;function X(e){q++,n.monitorRunDependencies&&n.monitorRunDependencies(q)}function J(e){if(q--,n.monitorRunDependencies&&n.monitorRunDependencies(q),0==q&&(null!==K&&(clearInterval(K),K=null),Y)){var t=Y;Y=null,t()}}function Z(e){throw n.onAbort&&n.onAbort(e),f(e+=""),d(e),v=!0,e="abort("+e+"). Build with -s ASSERTIONS=1 for more info.",new WebAssembly.RuntimeError(e)}n.preloadedImages={},n.preloadedAudios={};var ee="data:application/octet-stream;base64,";function te(e){return String.prototype.startsWith?e.startsWith(ee):0===e.indexOf(ee)}var ne="onigasm.wasm";function re(){try{if(p)return new Uint8Array(p);if(o)return o(ne);throw"both async and sync fetching of the wasm failed"}catch(e){Z(e)}}function oe(){return p||!a&&!l||"function"!=typeof fetch?new Promise((function(e,t){e(re())})):fetch(ne,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+ne+"'";return e.arrayBuffer()})).catch((function(){return re()}))}function ie(){var e={env:ve,wasi_unstable:ve};function t(e,t){var r=e.exports;n.asm=r,J()}function r(e){t(e.instance)}function o(t){return oe().then((function(t){return WebAssembly.instantiate(t,e)})).then(t,(function(e){d("failed to asynchronously prepare wasm: "+e),Z(e)}))}if(X(),n.instantiateWasm)try{return n.instantiateWasm(e,t)}catch(e){return d("Module.instantiateWasm callback failed with error: "+e),!1}return function(){if(p||"function"!=typeof WebAssembly.instantiateStreaming||te(ne)||"function"!=typeof fetch)return o(r);fetch(ne,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,e).then(r,(function(e){d("wasm streaming compile failed: "+e),d("falling back to ArrayBuffer instantiation"),o(r)}))}))}(),{}}function ae(){Z()}function le(){return P.length}function ue(){return 264624}function se(e,t,n){R.set(R.subarray(t,t+n),e)}function ce(e){try{return h.grow(e-T.byteLength+65535>>16),L(h.buffer),1}catch(e){}}function fe(e){var t=le(),n=2147418112;if(e>n)return!1;for(var r=Math.max(t,16777216);r>2]},getStr:function(){return S(de.get())},get64:function(){var e=de.get();return de.get(),e},getZero:function(){de.get()}};function pe(e){try{return 0}catch(e){return"undefined"!=typeof FS&&e instanceof FS.ErrnoError||Z(e),e.errno}}function he(e,t,n,r,o){try{return 0}catch(e){return"undefined"!=typeof FS&&e instanceof FS.ErrnoError||Z(e),e.errno}}function me(e,t,n,r){try{for(var o=0,i=0;i>2],l=N[t+(8*i+4)>>2],u=0;u>2]=o,0}catch(e){return"undefined"!=typeof FS&&e instanceof FS.ErrnoError||Z(e),e.errno}}function ge(e){m(0|e)}var ve={abort:ae,emscripten_get_sbrk_ptr:ue,emscripten_memcpy_big:se,emscripten_resize_heap:fe,fd_close:pe,fd_seek:he,fd_write:me,memory:h,setTempRet0:ge,table:g},ye=ie();n.asm=ye;var be,we=n.___wasm_call_ctors=function(){return n.asm.__wasm_call_ctors.apply(null,arguments)},_e=(n._malloc=function(){return n.asm.malloc.apply(null,arguments)},n._free=function(){return n.asm.free.apply(null,arguments)},n._getLastError=function(){return n.asm.getLastError.apply(null,arguments)},n._compilePattern=function(){return n.asm.compilePattern.apply(null,arguments)},n._disposeCompiledPatterns=function(){return n.asm.disposeCompiledPatterns.apply(null,arguments)},n._findBestMatch=function(){return n.asm.findBestMatch.apply(null,arguments)},n.___cxa_demangle=function(){return n.asm.__cxa_demangle.apply(null,arguments)},n._setThrew=function(){return n.asm.setThrew.apply(null,arguments)},n.stackSave=function(){return n.asm.stackSave.apply(null,arguments)}),ke=n.stackAlloc=function(){return n.asm.stackAlloc.apply(null,arguments)},Se=n.stackRestore=function(){return n.asm.stackRestore.apply(null,arguments)};function Ee(e){function t(){be||(be=!0,v||(G(),H(),n.onRuntimeInitialized&&n.onRuntimeInitialized(),$()))}e=e||i,q>0||(W(),q>0||(n.setStatus?(n.setStatus("Running..."),setTimeout((function(){setTimeout((function(){n.setStatus("")}),1),t()}),1)):t()))}if(n.__growWasmMemory=function(){return n.asm.__growWasmMemory.apply(null,arguments)},n.dynCall_vi=function(){return n.asm.dynCall_vi.apply(null,arguments)},n.dynCall_iiii=function(){return n.asm.dynCall_iiii.apply(null,arguments)},n.dynCall_iiiii=function(){return n.asm.dynCall_iiiii.apply(null,arguments)},n.dynCall_iii=function(){return n.asm.dynCall_iii.apply(null,arguments)},n.dynCall_iidiiii=function(){return n.asm.dynCall_iidiiii.apply(null,arguments)},n.dynCall_vii=function(){return n.asm.dynCall_vii.apply(null,arguments)},n.dynCall_ii=function(){return n.asm.dynCall_ii.apply(null,arguments)},n.dynCall_i=function(){return n.asm.dynCall_i.apply(null,arguments)},n.dynCall_v=function(){return n.asm.dynCall_v.apply(null,arguments)},n.dynCall_viiiiii=function(){return n.asm.dynCall_viiiiii.apply(null,arguments)},n.dynCall_viiiii=function(){return n.asm.dynCall_viiiii.apply(null,arguments)},n.dynCall_viiii=function(){return n.asm.dynCall_viiii.apply(null,arguments)},n.dynCall_jiji=function(){return n.asm.dynCall_jiji.apply(null,arguments)},n.asm=ye,n.ccall=w,n.then=function(e){if(be)e(n);else{var t=n.onRuntimeInitialized;n.onRuntimeInitialized=function(){t&&t(),e(n)}}return n},Y=function e(){be||Ee(),be||(Y=e)},n.run=Ee,n.preInit)for("function"==typeof n.preInit&&(n.preInit=[n.preInit]);n.preInit.length>0;)n.preInit.pop()();return Ee(),e});e.exports=t},527:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(782);async function o(e){return new Promise(((n,o)=>{const{log:i,warn:a,error:l}=console;r({instantiateWasm:(t,n)=>(WebAssembly.instantiate(e,t).then((e=>{n(e.instance)})).catch((e=>{throw e})),{})}).then((e=>{t.onigasmH=e,n()})),"undefined"!=typeof print&&(console.log=i,console.error=l,console.warn=a)}))}let i=!1;t.loadWASM=async function(e){if(i)throw new Error("Onigasm#init has been called and was succesful, subsequent calls are not allowed once initialized");if("string"==typeof e){const t=await(await fetch(e)).arrayBuffer();await o(t)}else{if(!(e instanceof ArrayBuffer))throw new TypeError("Expected a string (URL of .wasm file) or ArrayBuffer (.wasm file itself) as first parameter");await o(e)}i=!0}},520:(e,t,n)=>{"use strict";var r=n(155),o="win32"===r.platform,i=n(539);function a(e,t){for(var n=[],r=0;r=0&&!e[r];r--);return 0===n&&r===t?e:n>r?[]:e.slice(n,r+1)}var u=/^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/,s=/^([\s\S]*?)((?:\.{1,2}|[^\\\/]+?|)(\.[^.\/\\]*|))(?:[\\\/]*)$/,c={};function f(e){var t=u.exec(e),n=(t[1]||"")+(t[2]||""),r=t[3]||"",o=s.exec(r);return[n,o[1],o[2],o[3]]}function d(e){var t=u.exec(e),n=t[1]||"",r=!!n&&":"!==n[1];return{device:n,isUnc:r,isAbsolute:r||!!t[2],tail:t[3]}}function p(e){return"\\\\"+e.replace(/^[\\\/]+/,"").replace(/[\\\/]+/g,"\\")}c.resolve=function(){for(var e="",t="",n=!1,o=arguments.length-1;o>=-1;o--){var l;if(o>=0?l=arguments[o]:e?(l=r.env["="+e])&&l.substr(0,3).toLowerCase()===e.toLowerCase()+"\\"||(l=e+"\\"):l=r.cwd(),!i.isString(l))throw new TypeError("Arguments to path.resolve must be strings");if(l){var u=d(l),s=u.device,c=u.isUnc,f=u.isAbsolute,h=u.tail;if((!s||!e||s.toLowerCase()===e.toLowerCase())&&(e||(e=s),n||(t=h+"\\"+t,n=f),e&&n))break}}return c&&(e=p(e)),e+(n?"\\":"")+(t=a(t.split(/[\\\/]+/),!n).join("\\"))||"."},c.normalize=function(e){var t=d(e),n=t.device,r=t.isUnc,o=t.isAbsolute,i=t.tail,l=/[\\\/]$/.test(i);return(i=a(i.split(/[\\\/]+/),!o).join("\\"))||o||(i="."),i&&l&&(i+="\\"),r&&(n=p(n)),n+(o?"\\":"")+i},c.isAbsolute=function(e){return d(e).isAbsolute},c.join=function(){for(var e=[],t=0;t=-1&&!t;n--){var o=n>=0?arguments[n]:r.cwd();if(!i.isString(o))throw new TypeError("Arguments to path.resolve must be strings");o&&(e=o+"/"+e,t="/"===o[0])}return(t?"/":"")+(e=a(e.split("/"),!t).join("/"))||"."},m.normalize=function(e){var t=m.isAbsolute(e),n=e&&"/"===e[e.length-1];return(e=a(e.split("/"),!t).join("/"))||t||(e="."),e&&n&&(e+="/"),(t?"/":"")+e},m.isAbsolute=function(e){return"/"===e.charAt(0)},m.join=function(){for(var e="",t=0;t{var t,n,r=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function a(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{n="function"==typeof clearTimeout?clearTimeout:i}catch(e){n=i}}();var l,u=[],s=!1,c=-1;function f(){s&&l&&(s=!1,l.length?u=l.concat(u):c=-1,u.length&&d())}function d(){if(!s){var e=a(f);s=!0;for(var t=u.length;t;){for(l=u,u=[];++c1)for(var n=1;n{"use strict";var r=n(294),o=n(418),i=n(840);function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n