monaco-editor
Version:
A browser based code editor
11 lines • 377 kB
JavaScript
/*!-----------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
* Released under the MIT license
* https://github.com/microsoft/vscode/blob/main/LICENSE.txt
*-----------------------------------------------------------*/(function(){var J=["require","exports","vs/editor/common/core/range","vs/base/common/errors","vs/editor/common/core/position","vs/editor/common/core/offsetRange","vs/base/common/strings","vs/base/common/arrays","vs/base/common/lifecycle","vs/base/common/event","vs/editor/common/diff/defaultLinesDiffComputer/algorithms/diffAlgorithm","vs/base/common/platform","vs/base/common/assert","vs/editor/common/core/lineRange","vs/base/common/uri","vs/base/common/arraysFind","vs/editor/common/diff/defaultLinesDiffComputer/utils","vs/editor/common/diff/rangeMapping","vs/base/common/functional","vs/base/common/iterator","vs/base/common/linkedList","vs/base/common/map","vs/base/common/stopwatch","vs/base/common/cancellation","vs/base/common/diff/diff","vs/base/common/types","vs/base/common/codiconsUtil","vs/base/common/objects","vs/base/common/uint","vs/editor/common/core/characterClassifier","vs/editor/common/core/textLength","vs/editor/common/core/wordHelper","vs/editor/common/diff/defaultLinesDiffComputer/algorithms/myersDiffAlgorithm","vs/editor/common/diff/defaultLinesDiffComputer/linesSliceCharSequence","vs/editor/common/diff/linesDiffComputer","vs/nls.messages","vs/nls","vs/base/common/path","vs/base/common/network","vs/base/common/cache","vs/base/common/color","vs/base/common/diff/diffChange","vs/base/common/keyCodes","vs/base/common/lazy","vs/base/common/hash","vs/base/common/symbols","vs/base/common/codiconsLibrary","vs/base/common/codicons","vs/editor/common/core/selection","vs/editor/common/core/positionToOffset","vs/editor/common/core/textEdit","vs/editor/common/core/wordCharacterClassifier","vs/editor/common/diff/defaultLinesDiffComputer/heuristicSequenceOptimizations","vs/editor/common/diff/defaultLinesDiffComputer/lineSequence","vs/editor/common/diff/defaultLinesDiffComputer/algorithms/dynamicProgrammingDiffing","vs/editor/common/diff/defaultLinesDiffComputer/computeMovedLines","vs/editor/common/diff/defaultLinesDiffComputer/defaultLinesDiffComputer","vs/editor/common/diff/legacyLinesDiffComputer","vs/editor/common/diff/linesDiffComputers","vs/editor/common/languages/defaultDocumentColorsComputer","vs/editor/common/languages/linkComputer","vs/editor/common/languages/supports/inplaceReplaceSupport","vs/editor/common/model","vs/editor/common/model/prefixSumComputer","vs/editor/common/model/mirrorTextModel","vs/editor/common/model/textModelSearch","vs/editor/common/services/editorWorkerHost","vs/editor/common/services/findSectionHeaders","vs/editor/common/services/unicodeTextModelHighlighter","vs/editor/common/standalone/standaloneEnums","vs/editor/common/tokenizationRegistry","vs/base/common/async","vs/base/common/process","vs/editor/common/languages","vs/editor/common/services/editorBaseApi","vs/editor/common/services/textModelSync/textModelSync.impl","vs/base/common/worker/simpleWorker","vs/editor/common/services/editorSimpleWorker"],Z=function(W){for(var n=[],i=0,x=W.length;i<x;i++)n[i]=J[W[i]];return n};const Re=this,Me=typeof global=="object"?global:{};var ie;(function(W){W.global=Re;class n{get isWindows(){return this._detect(),this._isWindows}get isNode(){return this._detect(),this._isNode}get isElectronRenderer(){return this._detect(),this._isElectronRenderer}get isWebWorker(){return this._detect(),this._isWebWorker}get isElectronNodeIntegrationWebWorker(){return this._detect(),this._isElectronNodeIntegrationWebWorker}constructor(){this._detected=!1,this._isWindows=!1,this._isNode=!1,this._isElectronRenderer=!1,this._isWebWorker=!1,this._isElectronNodeIntegrationWebWorker=!1}_detect(){this._detected||(this._detected=!0,this._isWindows=n._isWindows(),this._isNode=typeof module<"u"&&!!module.exports,this._isElectronRenderer=typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.electron<"u"&&process.type==="renderer",this._isWebWorker=typeof W.global.importScripts=="function",this._isElectronNodeIntegrationWebWorker=this._isWebWorker&&typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.electron<"u"&&process.type==="worker")}static _isWindows(){return typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.indexOf("Windows")>=0?!0:typeof process<"u"?process.platform==="win32":!1}}W.Environment=n})(ie||(ie={}));var ie;(function(W){class n{constructor(d,f,p){this.type=d,this.detail=f,this.timestamp=p}}W.LoaderEvent=n;class i{constructor(d){this._events=[new n(1,"",d)]}record(d,f){this._events.push(new n(d,f,W.Utilities.getHighPerformanceTimestamp()))}getEvents(){return this._events}}W.LoaderEventRecorder=i;class x{record(d,f){}getEvents(){return[]}}x.INSTANCE=new x,W.NullLoaderEventRecorder=x})(ie||(ie={}));var ie;(function(W){class n{static fileUriToFilePath(x,A){if(A=decodeURI(A).replace(/%23/g,"#"),x){if(/^file:\/\/\//.test(A))return A.substr(8);if(/^file:\/\//.test(A))return A.substr(5)}else if(/^file:\/\//.test(A))return A.substr(7);return A}static startsWith(x,A){return x.length>=A.length&&x.substr(0,A.length)===A}static endsWith(x,A){return x.length>=A.length&&x.substr(x.length-A.length)===A}static containsQueryString(x){return/^[^\#]*\?/gi.test(x)}static isAbsolutePath(x){return/^((http:\/\/)|(https:\/\/)|(file:\/\/)|(\/))/.test(x)}static forEachProperty(x,A){if(x){let d;for(d in x)x.hasOwnProperty(d)&&A(d,x[d])}}static isEmpty(x){let A=!0;return n.forEachProperty(x,()=>{A=!1}),A}static recursiveClone(x){if(!x||typeof x!="object"||x instanceof RegExp||!Array.isArray(x)&&Object.getPrototypeOf(x)!==Object.prototype)return x;let A=Array.isArray(x)?[]:{};return n.forEachProperty(x,(d,f)=>{f&&typeof f=="object"?A[d]=n.recursiveClone(f):A[d]=f}),A}static generateAnonymousModule(){return"===anonymous"+n.NEXT_ANONYMOUS_ID+++"==="}static isAnonymousModule(x){return n.startsWith(x,"===anonymous")}static getHighPerformanceTimestamp(){return this.PERFORMANCE_NOW_PROBED||(this.PERFORMANCE_NOW_PROBED=!0,this.HAS_PERFORMANCE_NOW=W.global.performance&&typeof W.global.performance.now=="function"),this.HAS_PERFORMANCE_NOW?W.global.performance.now():Date.now()}}n.NEXT_ANONYMOUS_ID=1,n.PERFORMANCE_NOW_PROBED=!1,n.HAS_PERFORMANCE_NOW=!1,W.Utilities=n})(ie||(ie={}));var ie;(function(W){function n(A){if(A instanceof Error)return A;const d=new Error(A.message||String(A)||"Unknown Error");return A.stack&&(d.stack=A.stack),d}W.ensureError=n;class i{static validateConfigurationOptions(d){function f(p){if(p.phase==="loading"){console.error('Loading "'+p.moduleId+'" failed'),console.error(p),console.error("Here are the modules that depend on it:"),console.error(p.neededBy);return}if(p.phase==="factory"){console.error('The factory function of "'+p.moduleId+'" has thrown an exception'),console.error(p),console.error("Here are the modules that depend on it:"),console.error(p.neededBy);return}}if(d=d||{},typeof d.baseUrl!="string"&&(d.baseUrl=""),typeof d.isBuild!="boolean"&&(d.isBuild=!1),typeof d.paths!="object"&&(d.paths={}),typeof d.config!="object"&&(d.config={}),typeof d.catchError>"u"&&(d.catchError=!1),typeof d.recordStats>"u"&&(d.recordStats=!1),typeof d.urlArgs!="string"&&(d.urlArgs=""),typeof d.onError!="function"&&(d.onError=f),Array.isArray(d.ignoreDuplicateModules)||(d.ignoreDuplicateModules=[]),d.baseUrl.length>0&&(W.Utilities.endsWith(d.baseUrl,"/")||(d.baseUrl+="/")),typeof d.cspNonce!="string"&&(d.cspNonce=""),typeof d.preferScriptTags>"u"&&(d.preferScriptTags=!1),d.nodeCachedData&&typeof d.nodeCachedData=="object"&&(typeof d.nodeCachedData.seed!="string"&&(d.nodeCachedData.seed="seed"),(typeof d.nodeCachedData.writeDelay!="number"||d.nodeCachedData.writeDelay<0)&&(d.nodeCachedData.writeDelay=1e3*7),!d.nodeCachedData.path||typeof d.nodeCachedData.path!="string")){const p=n(new Error("INVALID cached data configuration, 'path' MUST be set"));p.phase="configuration",d.onError(p),d.nodeCachedData=void 0}return d}static mergeConfigurationOptions(d=null,f=null){let p=W.Utilities.recursiveClone(f||{});return W.Utilities.forEachProperty(d,(c,a)=>{c==="ignoreDuplicateModules"&&typeof p.ignoreDuplicateModules<"u"?p.ignoreDuplicateModules=p.ignoreDuplicateModules.concat(a):c==="paths"&&typeof p.paths<"u"?W.Utilities.forEachProperty(a,(m,e)=>p.paths[m]=e):c==="config"&&typeof p.config<"u"?W.Utilities.forEachProperty(a,(m,e)=>p.config[m]=e):p[c]=W.Utilities.recursiveClone(a)}),i.validateConfigurationOptions(p)}}W.ConfigurationOptionsUtil=i;class x{constructor(d,f){if(this._env=d,this.options=i.mergeConfigurationOptions(f),this._createIgnoreDuplicateModulesMap(),this._createSortedPathsRules(),this.options.baseUrl===""&&this.options.nodeRequire&&this.options.nodeRequire.main&&this.options.nodeRequire.main.filename&&this._env.isNode){let p=this.options.nodeRequire.main.filename,c=Math.max(p.lastIndexOf("/"),p.lastIndexOf("\\"));this.options.baseUrl=p.substring(0,c+1)}}_createIgnoreDuplicateModulesMap(){this.ignoreDuplicateModulesMap={};for(let d=0;d<this.options.ignoreDuplicateModules.length;d++)this.ignoreDuplicateModulesMap[this.options.ignoreDuplicateModules[d]]=!0}_createSortedPathsRules(){this.sortedPathsRules=[],W.Utilities.forEachProperty(this.options.paths,(d,f)=>{Array.isArray(f)?this.sortedPathsRules.push({from:d,to:f}):this.sortedPathsRules.push({from:d,to:[f]})}),this.sortedPathsRules.sort((d,f)=>f.from.length-d.from.length)}cloneAndMerge(d){return new x(this._env,i.mergeConfigurationOptions(d,this.options))}getOptionsLiteral(){return this.options}_applyPaths(d){let f;for(let p=0,c=this.sortedPathsRules.length;p<c;p++)if(f=this.sortedPathsRules[p],W.Utilities.startsWith(d,f.from)){let a=[];for(let m=0,e=f.to.length;m<e;m++)a.push(f.to[m]+d.substr(f.from.length));return a}return[d]}_addUrlArgsToUrl(d){return W.Utilities.containsQueryString(d)?d+"&"+this.options.urlArgs:d+"?"+this.options.urlArgs}_addUrlArgsIfNecessaryToUrl(d){return this.options.urlArgs?this._addUrlArgsToUrl(d):d}_addUrlArgsIfNecessaryToUrls(d){if(this.options.urlArgs)for(let f=0,p=d.length;f<p;f++)d[f]=this._addUrlArgsToUrl(d[f]);return d}moduleIdToPaths(d){if(this._env.isNode&&this.options.amdModulesPattern instanceof RegExp&&!this.options.amdModulesPattern.test(d))return this.isBuild()?["empty:"]:["node|"+d];let f=d,p;if(!W.Utilities.endsWith(f,".js")&&!W.Utilities.isAbsolutePath(f)){p=this._applyPaths(f);for(let c=0,a=p.length;c<a;c++)this.isBuild()&&p[c]==="empty:"||(W.Utilities.isAbsolutePath(p[c])||(p[c]=this.options.baseUrl+p[c]),!W.Utilities.endsWith(p[c],".js")&&!W.Utilities.containsQueryString(p[c])&&(p[c]=p[c]+".js"))}else!W.Utilities.endsWith(f,".js")&&!W.Utilities.containsQueryString(f)&&(f=f+".js"),p=[f];return this._addUrlArgsIfNecessaryToUrls(p)}requireToUrl(d){let f=d;return W.Utilities.isAbsolutePath(f)||(f=this._applyPaths(f)[0],W.Utilities.isAbsolutePath(f)||(f=this.options.baseUrl+f)),this._addUrlArgsIfNecessaryToUrl(f)}isBuild(){return this.options.isBuild}shouldInvokeFactory(d){return!!(!this.options.isBuild||W.Utilities.isAnonymousModule(d)||this.options.buildForceInvokeFactory&&this.options.buildForceInvokeFactory[d])}isDuplicateMessageIgnoredFor(d){return this.ignoreDuplicateModulesMap.hasOwnProperty(d)}getConfigForModule(d){if(this.options.config)return this.options.config[d]}shouldCatchError(){return this.options.catchError}shouldRecordStats(){return this.options.recordStats}onError(d){this.options.onError(d)}}W.Configuration=x})(ie||(ie={}));var ie;(function(W){class n{constructor(a){this._env=a,this._scriptLoader=null,this._callbackMap={}}load(a,m,e,h){if(!this._scriptLoader)if(this._env.isWebWorker)this._scriptLoader=new A;else if(this._env.isElectronRenderer){const{preferScriptTags:s}=a.getConfig().getOptionsLiteral();s?this._scriptLoader=new i:this._scriptLoader=new d(this._env)}else this._env.isNode?this._scriptLoader=new d(this._env):this._scriptLoader=new i;let r={callback:e,errorback:h};if(this._callbackMap.hasOwnProperty(m)){this._callbackMap[m].push(r);return}this._callbackMap[m]=[r],this._scriptLoader.load(a,m,()=>this.triggerCallback(m),s=>this.triggerErrorback(m,s))}triggerCallback(a){let m=this._callbackMap[a];delete this._callbackMap[a];for(let e=0;e<m.length;e++)m[e].callback()}triggerErrorback(a,m){let e=this._callbackMap[a];delete this._callbackMap[a];for(let h=0;h<e.length;h++)e[h].errorback(m)}}class i{attachListeners(a,m,e){let h=()=>{a.removeEventListener("load",r),a.removeEventListener("error",s)},r=o=>{h(),m()},s=o=>{h(),e(o)};a.addEventListener("load",r),a.addEventListener("error",s)}load(a,m,e,h){if(/^node\|/.test(m)){let r=a.getConfig().getOptionsLiteral(),s=f(a.getRecorder(),r.nodeRequire||W.global.nodeRequire),o=m.split("|"),u=null;try{u=s(o[1])}catch(S){h(S);return}a.enqueueDefineAnonymousModule([],()=>u),e()}else{let r=document.createElement("script");r.setAttribute("async","async"),r.setAttribute("type","text/javascript"),this.attachListeners(r,e,h);const{trustedTypesPolicy:s}=a.getConfig().getOptionsLiteral();s&&(m=s.createScriptURL(m)),r.setAttribute("src",m);const{cspNonce:o}=a.getConfig().getOptionsLiteral();o&&r.setAttribute("nonce",o),document.getElementsByTagName("head")[0].appendChild(r)}}}function x(c){const{trustedTypesPolicy:a}=c.getConfig().getOptionsLiteral();try{return(a?self.eval(a.createScript("","true")):new Function("true")).call(self),!0}catch{return!1}}class A{constructor(){this._cachedCanUseEval=null}_canUseEval(a){return this._cachedCanUseEval===null&&(this._cachedCanUseEval=x(a)),this._cachedCanUseEval}load(a,m,e,h){if(/^node\|/.test(m)){const r=a.getConfig().getOptionsLiteral(),s=f(a.getRecorder(),r.nodeRequire||W.global.nodeRequire),o=m.split("|");let u=null;try{u=s(o[1])}catch(S){h(S);return}a.enqueueDefineAnonymousModule([],function(){return u}),e()}else{const{trustedTypesPolicy:r}=a.getConfig().getOptionsLiteral();if(!(/^((http:)|(https:)|(file:))/.test(m)&&m.substring(0,self.origin.length)!==self.origin)&&this._canUseEval(a)){fetch(m).then(o=>{if(o.status!==200)throw new Error(o.statusText);return o.text()}).then(o=>{o=`${o}
//# sourceURL=${m}`,(r?self.eval(r.createScript("",o)):new Function(o)).call(self),e()}).then(void 0,h);return}try{r&&(m=r.createScriptURL(m)),importScripts(m),e()}catch(o){h(o)}}}}class d{constructor(a){this._env=a,this._didInitialize=!1,this._didPatchNodeRequire=!1}_init(a){this._didInitialize||(this._didInitialize=!0,this._fs=a("fs"),this._vm=a("vm"),this._path=a("path"),this._crypto=a("crypto"))}_initNodeRequire(a,m){const{nodeCachedData:e}=m.getConfig().getOptionsLiteral();if(!e||this._didPatchNodeRequire)return;this._didPatchNodeRequire=!0;const h=this,r=a("module");function s(o){const u=o.constructor;let S=function(N){try{return o.require(N)}finally{}};return S.resolve=function(N,P){return u._resolveFilename(N,o,!1,P)},S.resolve.paths=function(N){return u._resolveLookupPaths(N,o)},S.main=process.mainModule,S.extensions=u._extensions,S.cache=u._cache,S}r.prototype._compile=function(o,u){const S=r.wrap(o.replace(/^#!.*/,"")),L=m.getRecorder(),N=h._getCachedDataPath(e,u),P={filename:u};let E;try{const y=h._fs.readFileSync(N);E=y.slice(0,16),P.cachedData=y.slice(16),L.record(60,N)}catch{L.record(61,N)}const v=new h._vm.Script(S,P),l=v.runInThisContext(P),b=h._path.dirname(u),g=s(this),w=[this.exports,g,this,u,b,process,Me,Buffer],M=l.apply(this.exports,w);return h._handleCachedData(v,S,N,!P.cachedData,m),h._verifyCachedData(v,S,N,E,m),M}}load(a,m,e,h){const r=a.getConfig().getOptionsLiteral(),s=f(a.getRecorder(),r.nodeRequire||W.global.nodeRequire),o=r.nodeInstrumenter||function(S){return S};this._init(s),this._initNodeRequire(s,a);let u=a.getRecorder();if(/^node\|/.test(m)){let S=m.split("|"),L=null;try{L=s(S[1])}catch(N){h(N);return}a.enqueueDefineAnonymousModule([],()=>L),e()}else{m=W.Utilities.fileUriToFilePath(this._env.isWindows,m);const S=this._path.normalize(m),L=this._getElectronRendererScriptPathOrUri(S),N=!!r.nodeCachedData,P=N?this._getCachedDataPath(r.nodeCachedData,m):void 0;this._readSourceAndCachedData(S,P,u,(E,v,l,b)=>{if(E){h(E);return}let g;v.charCodeAt(0)===d._BOM?g=d._PREFIX+v.substring(1)+d._SUFFIX:g=d._PREFIX+v+d._SUFFIX,g=o(g,S);const w={filename:L,cachedData:l},M=this._createAndEvalScript(a,g,w,e,h);this._handleCachedData(M,g,P,N&&!l,a),this._verifyCachedData(M,g,P,b,a)})}}_createAndEvalScript(a,m,e,h,r){const s=a.getRecorder();s.record(31,e.filename);const o=new this._vm.Script(m,e),u=o.runInThisContext(e),S=a.getGlobalAMDDefineFunc();let L=!1;const N=function(){return L=!0,S.apply(null,arguments)};return N.amd=S.amd,u.call(W.global,a.getGlobalAMDRequireFunc(),N,e.filename,this._path.dirname(e.filename)),s.record(32,e.filename),L?h():r(new Error(`Didn't receive define call in ${e.filename}!`)),o}_getElectronRendererScriptPathOrUri(a){if(!this._env.isElectronRenderer)return a;let m=a.match(/^([a-z])\:(.*)/i);return m?`file:///${(m[1].toUpperCase()+":"+m[2]).replace(/\\/g,"/")}`:`file://${a}`}_getCachedDataPath(a,m){const e=this._crypto.createHash("md5").update(m,"utf8").update(a.seed,"utf8").update(process.arch,"").digest("hex"),h=this._path.basename(m).replace(/\.js$/,"");return this._path.join(a.path,`${h}-${e}.code`)}_handleCachedData(a,m,e,h,r){a.cachedDataRejected?this._fs.unlink(e,s=>{r.getRecorder().record(62,e),this._createAndWriteCachedData(a,m,e,r),s&&r.getConfig().onError(s)}):h&&this._createAndWriteCachedData(a,m,e,r)}_createAndWriteCachedData(a,m,e,h){let r=Math.ceil(h.getConfig().getOptionsLiteral().nodeCachedData.writeDelay*(1+Math.random())),s=-1,o=0,u;const S=()=>{setTimeout(()=>{u||(u=this._crypto.createHash("md5").update(m,"utf8").digest());const L=a.createCachedData();if(!(L.length===0||L.length===s||o>=5)){if(L.length<s){S();return}s=L.length,this._fs.writeFile(e,Buffer.concat([u,L]),N=>{N&&h.getConfig().onError(N),h.getRecorder().record(63,e),S()})}},r*Math.pow(4,o++))};S()}_readSourceAndCachedData(a,m,e,h){if(!m)this._fs.readFile(a,{encoding:"utf8"},h);else{let r,s,o,u=2;const S=L=>{L?h(L):--u===0&&h(void 0,r,s,o)};this._fs.readFile(a,{encoding:"utf8"},(L,N)=>{r=N,S(L)}),this._fs.readFile(m,(L,N)=>{!L&&N&&N.length>0?(o=N.slice(0,16),s=N.slice(16),e.record(60,m)):e.record(61,m),S()})}}_verifyCachedData(a,m,e,h,r){h&&(a.cachedDataRejected||setTimeout(()=>{const s=this._crypto.createHash("md5").update(m,"utf8").digest();h.equals(s)||(r.getConfig().onError(new Error(`FAILED TO VERIFY CACHED DATA, deleting stale '${e}' now, but a RESTART IS REQUIRED`)),this._fs.unlink(e,o=>{o&&r.getConfig().onError(o)}))},Math.ceil(5e3*(1+Math.random()))))}}d._BOM=65279,d._PREFIX="(function (require, define, __filename, __dirname) { ",d._SUFFIX=`
});`;function f(c,a){if(a.__$__isRecorded)return a;const m=function(h){c.record(33,h);try{return a(h)}finally{c.record(34,h)}};return m.__$__isRecorded=!0,m}W.ensureRecordedNodeRequire=f;function p(c){return new n(c)}W.createScriptLoader=p})(ie||(ie={}));var ie;(function(W){class n{constructor(c){let a=c.lastIndexOf("/");a!==-1?this.fromModulePath=c.substr(0,a+1):this.fromModulePath=""}static _normalizeModuleId(c){let a=c,m;for(m=/\/\.\//;m.test(a);)a=a.replace(m,"/");for(a=a.replace(/^\.\//g,""),m=/\/(([^\/])|([^\/][^\/\.])|([^\/\.][^\/])|([^\/][^\/][^\/]+))\/\.\.\//;m.test(a);)a=a.replace(m,"/");return a=a.replace(/^(([^\/])|([^\/][^\/\.])|([^\/\.][^\/])|([^\/][^\/][^\/]+))\/\.\.\//,""),a}resolveModule(c){let a=c;return W.Utilities.isAbsolutePath(a)||(W.Utilities.startsWith(a,"./")||W.Utilities.startsWith(a,"../"))&&(a=n._normalizeModuleId(this.fromModulePath+a)),a}}n.ROOT=new n(""),W.ModuleIdResolver=n;class i{constructor(c,a,m,e,h,r){this.id=c,this.strId=a,this.dependencies=m,this._callback=e,this._errorback=h,this.moduleIdResolver=r,this.exports={},this.error=null,this.exportsPassedIn=!1,this.unresolvedDependenciesCount=this.dependencies.length,this._isComplete=!1}static _safeInvokeFunction(c,a){try{return{returnedValue:c.apply(W.global,a),producedError:null}}catch(m){return{returnedValue:null,producedError:m}}}static _invokeFactory(c,a,m,e){return c.shouldInvokeFactory(a)?c.shouldCatchError()?this._safeInvokeFunction(m,e):{returnedValue:m.apply(W.global,e),producedError:null}:{returnedValue:null,producedError:null}}complete(c,a,m,e){this._isComplete=!0;let h=null;if(this._callback)if(typeof this._callback=="function"){c.record(21,this.strId);let r=i._invokeFactory(a,this.strId,this._callback,m);h=r.producedError,c.record(22,this.strId),!h&&typeof r.returnedValue<"u"&&(!this.exportsPassedIn||W.Utilities.isEmpty(this.exports))&&(this.exports=r.returnedValue)}else this.exports=this._callback;if(h){let r=W.ensureError(h);r.phase="factory",r.moduleId=this.strId,r.neededBy=e(this.id),this.error=r,a.onError(r)}this.dependencies=null,this._callback=null,this._errorback=null,this.moduleIdResolver=null}onDependencyError(c){return this._isComplete=!0,this.error=c,this._errorback?(this._errorback(c),!0):!1}isComplete(){return this._isComplete}}W.Module=i;class x{constructor(){this._nextId=0,this._strModuleIdToIntModuleId=new Map,this._intModuleIdToStrModuleId=[],this.getModuleId("exports"),this.getModuleId("module"),this.getModuleId("require")}getMaxModuleId(){return this._nextId}getModuleId(c){let a=this._strModuleIdToIntModuleId.get(c);return typeof a>"u"&&(a=this._nextId++,this._strModuleIdToIntModuleId.set(c,a),this._intModuleIdToStrModuleId[a]=c),a}getStrModuleId(c){return this._intModuleIdToStrModuleId[c]}}class A{constructor(c){this.id=c}}A.EXPORTS=new A(0),A.MODULE=new A(1),A.REQUIRE=new A(2),W.RegularDependency=A;class d{constructor(c,a,m){this.id=c,this.pluginId=a,this.pluginParam=m}}W.PluginDependency=d;class f{constructor(c,a,m,e,h=0){this._env=c,this._scriptLoader=a,this._loaderAvailableTimestamp=h,this._defineFunc=m,this._requireFunc=e,this._moduleIdProvider=new x,this._config=new W.Configuration(this._env),this._hasDependencyCycle=!1,this._modules2=[],this._knownModules2=[],this._inverseDependencies2=[],this._inversePluginDependencies2=new Map,this._currentAnonymousDefineCall=null,this._recorder=null,this._buildInfoPath=[],this._buildInfoDefineStack=[],this._buildInfoDependencies=[],this._requireFunc.moduleManager=this}reset(){return new f(this._env,this._scriptLoader,this._defineFunc,this._requireFunc,this._loaderAvailableTimestamp)}getGlobalAMDDefineFunc(){return this._defineFunc}getGlobalAMDRequireFunc(){return this._requireFunc}static _findRelevantLocationInStack(c,a){let m=r=>r.replace(/\\/g,"/"),e=m(c),h=a.split(/\n/);for(let r=0;r<h.length;r++){let s=h[r].match(/(.*):(\d+):(\d+)\)?$/);if(s){let o=s[1],u=s[2],S=s[3],L=Math.max(o.lastIndexOf(" ")+1,o.lastIndexOf("(")+1);if(o=o.substr(L),o=m(o),o===e){let N={line:parseInt(u,10),col:parseInt(S,10)};return N.line===1&&(N.col-=53),N}}}throw new Error("Could not correlate define call site for needle "+c)}getBuildInfo(){if(!this._config.isBuild())return null;let c=[],a=0;for(let m=0,e=this._modules2.length;m<e;m++){let h=this._modules2[m];if(!h)continue;let r=this._buildInfoPath[h.id]||null,s=this._buildInfoDefineStack[h.id]||null,o=this._buildInfoDependencies[h.id];c[a++]={id:h.strId,path:r,defineLocation:r&&s?f._findRelevantLocationInStack(r,s):null,dependencies:o,shim:null,exports:h.exports}}return c}getRecorder(){return this._recorder||(this._config.shouldRecordStats()?this._recorder=new W.LoaderEventRecorder(this._loaderAvailableTimestamp):this._recorder=W.NullLoaderEventRecorder.INSTANCE),this._recorder}getLoaderEvents(){return this.getRecorder().getEvents()}enqueueDefineAnonymousModule(c,a){if(this._currentAnonymousDefineCall!==null)throw new Error("Can only have one anonymous define call per script file");let m=null;this._config.isBuild()&&(m=new Error("StackLocation").stack||null),this._currentAnonymousDefineCall={stack:m,dependencies:c,callback:a}}defineModule(c,a,m,e,h,r=new n(c)){let s=this._moduleIdProvider.getModuleId(c);if(this._modules2[s]){this._config.isDuplicateMessageIgnoredFor(c)||console.warn("Duplicate definition of module '"+c+"'");return}let o=new i(s,c,this._normalizeDependencies(a,r),m,e,r);this._modules2[s]=o,this._config.isBuild()&&(this._buildInfoDefineStack[s]=h,this._buildInfoDependencies[s]=(o.dependencies||[]).map(u=>this._moduleIdProvider.getStrModuleId(u.id))),this._resolve(o)}_normalizeDependency(c,a){if(c==="exports")return A.EXPORTS;if(c==="module")return A.MODULE;if(c==="require")return A.REQUIRE;let m=c.indexOf("!");if(m>=0){let e=a.resolveModule(c.substr(0,m)),h=a.resolveModule(c.substr(m+1)),r=this._moduleIdProvider.getModuleId(e+"!"+h),s=this._moduleIdProvider.getModuleId(e);return new d(r,s,h)}return new A(this._moduleIdProvider.getModuleId(a.resolveModule(c)))}_normalizeDependencies(c,a){let m=[],e=0;for(let h=0,r=c.length;h<r;h++)m[e++]=this._normalizeDependency(c[h],a);return m}_relativeRequire(c,a,m,e){if(typeof a=="string")return this.synchronousRequire(a,c);this.defineModule(W.Utilities.generateAnonymousModule(),a,m,e,null,c)}synchronousRequire(c,a=new n(c)){let m=this._normalizeDependency(c,a),e=this._modules2[m.id];if(!e)throw new Error("Check dependency list! Synchronous require cannot resolve module '"+c+"'. This is the first mention of this module!");if(!e.isComplete())throw new Error("Check dependency list! Synchronous require cannot resolve module '"+c+"'. This module has not been resolved completely yet.");if(e.error)throw e.error;return e.exports}configure(c,a){let m=this._config.shouldRecordStats();a?this._config=new W.Configuration(this._env,c):this._config=this._config.cloneAndMerge(c),this._config.shouldRecordStats()&&!m&&(this._recorder=null)}getConfig(){return this._config}_onLoad(c){if(this._currentAnonymousDefineCall!==null){let a=this._currentAnonymousDefineCall;this._currentAnonymousDefineCall=null,this.defineModule(this._moduleIdProvider.getStrModuleId(c),a.dependencies,a.callback,null,a.stack)}}_createLoadError(c,a){let m=this._moduleIdProvider.getStrModuleId(c),e=(this._inverseDependencies2[c]||[]).map(r=>this._moduleIdProvider.getStrModuleId(r));const h=W.ensureError(a);return h.phase="loading",h.moduleId=m,h.neededBy=e,h}_onLoadError(c,a){const m=this._createLoadError(c,a);this._modules2[c]||(this._modules2[c]=new i(c,this._moduleIdProvider.getStrModuleId(c),[],()=>{},null,null));let e=[];for(let s=0,o=this._moduleIdProvider.getMaxModuleId();s<o;s++)e[s]=!1;let h=!1,r=[];for(r.push(c),e[c]=!0;r.length>0;){let s=r.shift(),o=this._modules2[s];o&&(h=o.onDependencyError(m)||h);let u=this._inverseDependencies2[s];if(u)for(let S=0,L=u.length;S<L;S++){let N=u[S];e[N]||(r.push(N),e[N]=!0)}}h||this._config.onError(m)}_hasDependencyPath(c,a){let m=this._modules2[c];if(!m)return!1;let e=[];for(let r=0,s=this._moduleIdProvider.getMaxModuleId();r<s;r++)e[r]=!1;let h=[];for(h.push(m),e[c]=!0;h.length>0;){let s=h.shift().dependencies;if(s)for(let o=0,u=s.length;o<u;o++){let S=s[o];if(S.id===a)return!0;let L=this._modules2[S.id];L&&!e[S.id]&&(e[S.id]=!0,h.push(L))}}return!1}_findCyclePath(c,a,m){if(c===a||m===50)return[c];let e=this._modules2[c];if(!e)return null;let h=e.dependencies;if(h)for(let r=0,s=h.length;r<s;r++){let o=this._findCyclePath(h[r].id,a,m+1);if(o!==null)return o.push(c),o}return null}_createRequire(c){let a=(m,e,h)=>this._relativeRequire(c,m,e,h);return a.toUrl=m=>this._config.requireToUrl(c.resolveModule(m)),a.getStats=()=>this.getLoaderEvents(),a.hasDependencyCycle=()=>this._hasDependencyCycle,a.config=(m,e=!1)=>{this.configure(m,e)},a.__$__nodeRequire=W.global.nodeRequire,a}_loadModule(c){if(this._modules2[c]||this._knownModules2[c])return;this._knownModules2[c]=!0;let a=this._moduleIdProvider.getStrModuleId(c),m=this._config.moduleIdToPaths(a),e=/^@[^\/]+\/[^\/]+$/;this._env.isNode&&(a.indexOf("/")===-1||e.test(a))&&m.push("node|"+a);let h=-1,r=s=>{if(h++,h>=m.length)this._onLoadError(c,s);else{let o=m[h],u=this.getRecorder();if(this._config.isBuild()&&o==="empty:"){this._buildInfoPath[c]=o,this.defineModule(this._moduleIdProvider.getStrModuleId(c),[],null,null,null),this._onLoad(c);return}u.record(10,o),this._scriptLoader.load(this,o,()=>{this._config.isBuild()&&(this._buildInfoPath[c]=o),u.record(11,o),this._onLoad(c)},S=>{u.record(12,o),r(S)})}};r(null)}_loadPluginDependency(c,a){if(this._modules2[a.id]||this._knownModules2[a.id])return;this._knownModules2[a.id]=!0;let m=e=>{this.defineModule(this._moduleIdProvider.getStrModuleId(a.id),[],e,null,null)};m.error=e=>{this._config.onError(this._createLoadError(a.id,e))},c.load(a.pluginParam,this._createRequire(n.ROOT),m,this._config.getOptionsLiteral())}_resolve(c){let a=c.dependencies;if(a)for(let m=0,e=a.length;m<e;m++){let h=a[m];if(h===A.EXPORTS){c.exportsPassedIn=!0,c.unresolvedDependenciesCount--;continue}if(h===A.MODULE){c.unresolvedDependenciesCount--;continue}if(h===A.REQUIRE){c.unresolvedDependenciesCount--;continue}let r=this._modules2[h.id];if(r&&r.isComplete()){if(r.error){c.onDependencyError(r.error);return}c.unresolvedDependenciesCount--;continue}if(this._hasDependencyPath(h.id,c.id)){this._hasDependencyCycle=!0,console.warn("There is a dependency cycle between '"+this._moduleIdProvider.getStrModuleId(h.id)+"' and '"+this._moduleIdProvider.getStrModuleId(c.id)+"'. The cyclic path follows:");let s=this._findCyclePath(h.id,c.id,0)||[];s.reverse(),s.push(h.id),console.warn(s.map(o=>this._moduleIdProvider.getStrModuleId(o)).join(` =>
`)),c.unresolvedDependenciesCount--;continue}if(this._inverseDependencies2[h.id]=this._inverseDependencies2[h.id]||[],this._inverseDependencies2[h.id].push(c.id),h instanceof d){let s=this._modules2[h.pluginId];if(s&&s.isComplete()){this._loadPluginDependency(s.exports,h);continue}let o=this._inversePluginDependencies2.get(h.pluginId);o||(o=[],this._inversePluginDependencies2.set(h.pluginId,o)),o.push(h),this._loadModule(h.pluginId);continue}this._loadModule(h.id)}c.unresolvedDependenciesCount===0&&this._onModuleComplete(c)}_onModuleComplete(c){let a=this.getRecorder();if(c.isComplete())return;let m=c.dependencies,e=[];if(m)for(let o=0,u=m.length;o<u;o++){let S=m[o];if(S===A.EXPORTS){e[o]=c.exports;continue}if(S===A.MODULE){e[o]={id:c.strId,config:()=>this._config.getConfigForModule(c.strId)};continue}if(S===A.REQUIRE){e[o]=this._createRequire(c.moduleIdResolver);continue}let L=this._modules2[S.id];if(L){e[o]=L.exports;continue}e[o]=null}const h=o=>(this._inverseDependencies2[o]||[]).map(u=>this._moduleIdProvider.getStrModuleId(u));c.complete(a,this._config,e,h);let r=this._inverseDependencies2[c.id];if(this._inverseDependencies2[c.id]=null,r)for(let o=0,u=r.length;o<u;o++){let S=r[o],L=this._modules2[S];L.unresolvedDependenciesCount--,L.unresolvedDependenciesCount===0&&this._onModuleComplete(L)}let s=this._inversePluginDependencies2.get(c.id);if(s){this._inversePluginDependencies2.delete(c.id);for(let o=0,u=s.length;o<u;o++)this._loadPluginDependency(c.exports,s[o])}}}W.ModuleManager=f})(ie||(ie={}));var X,ie;(function(W){const n=new W.Environment;let i=null;const x=function(p,c,a){typeof p!="string"&&(a=c,c=p,p=null),(typeof c!="object"||!Array.isArray(c))&&(a=c,c=null),c||(c=["require","exports","module"]),p?i.defineModule(p,c,a,null,null):i.enqueueDefineAnonymousModule(c,a)};x.amd={jQuery:!0};const A=function(p,c=!1){i.configure(p,c)},d=function(){if(arguments.length===1){if(arguments[0]instanceof Object&&!Array.isArray(arguments[0])){A(arguments[0]);return}if(typeof arguments[0]=="string")return i.synchronousRequire(arguments[0])}if((arguments.length===2||arguments.length===3)&&Array.isArray(arguments[0])){i.defineModule(W.Utilities.generateAnonymousModule(),arguments[0],arguments[1],arguments[2],null);return}throw new Error("Unrecognized require call")};d.config=A,d.getConfig=function(){return i.getConfig().getOptionsLiteral()},d.reset=function(){i=i.reset()},d.getBuildInfo=function(){return i.getBuildInfo()},d.getStats=function(){return i.getLoaderEvents()},d.define=x;function f(){if(typeof W.global.require<"u"||typeof require<"u"){const p=W.global.require||require;if(typeof p=="function"&&typeof p.resolve=="function"){const c=W.ensureRecordedNodeRequire(i.getRecorder(),p);W.global.nodeRequire=c,d.nodeRequire=c,d.__$__nodeRequire=c}}n.isNode&&!n.isElectronRenderer&&!n.isElectronNodeIntegrationWebWorker?module.exports=d:(n.isElectronRenderer||(W.global.define=x),W.global.require=d)}W.init=f,(typeof W.global.define!="function"||!W.global.define.amd)&&(i=new W.ModuleManager(n,W.createScriptLoader(n),x,d,W.Utilities.getHighPerformanceTimestamp()),typeof W.global.require<"u"&&typeof W.global.require!="function"&&d.config(W.global.require),X=function(){return x.apply(null,arguments)},X.amd=x.amd,typeof doNotInitLoader>"u"&&f())})(ie||(ie={})),function(){const W=globalThis.MonacoEnvironment,n=W&&W.baseUrl?W.baseUrl:"../../../";function i(e,h){if(W?.createTrustedTypesPolicy)try{return W.createTrustedTypesPolicy(e,h)}catch(r){console.warn(r);return}try{return self.trustedTypes?.createPolicy(e,h)}catch(r){console.warn(r);return}}const x=i("amdLoader",{createScriptURL:e=>e,createScript:(e,...h)=>{const r=h.slice(0,-1).join(","),s=h.pop().toString();return`(function anonymous(${r}) { ${s}
})`}});function A(){try{return(x?globalThis.eval(x.createScript("","true")):new Function("true")).call(globalThis),!0}catch{return!1}}function d(){return new Promise((e,h)=>{if(typeof globalThis.define=="function"&&globalThis.define.amd)return e();const r=n+"vs/loader.js";if(!(/^((http:)|(https:)|(file:))/.test(r)&&r.substring(0,globalThis.origin.length)!==globalThis.origin)&&A()){fetch(r).then(o=>{if(o.status!==200)throw new Error(o.statusText);return o.text()}).then(o=>{o=`${o}
//# sourceURL=${r}`,(x?globalThis.eval(x.createScript("",o)):new Function(o)).call(globalThis),e()}).then(void 0,h);return}x?importScripts(x.createScriptURL(r)):importScripts(r),e()})}function f(){require.config({baseUrl:n,catchError:!0,trustedTypesPolicy:x,amdModulesPattern:/^vs\//})}function p(e){return d().then(()=>(f(),new Promise((h,r)=>{require([e],h,r)})))}function c(e){setTimeout(function(){const h=e.create((r,s)=>{globalThis.postMessage(r,s)});for(self.onmessage=r=>h.onmessage(r.data,r.ports);m.length>0;)self.onmessage(m.shift())},0)}typeof globalThis.define=="function"&&globalThis.define.amd&&f();let a=!0;const m=[];globalThis.onmessage=e=>{if(!a){m.push(e);return}a=!1,p(e.data).then(h=>{c(h)},h=>{console.error(h)})}}(),X(J[7],Z([0,1]),function(W,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Permutation=n.CallbackIterable=n.ArrayQueue=n.booleanComparator=n.numberComparator=n.CompareResult=void 0,n.tail=i,n.tail2=x,n.equals=A,n.removeFastWithoutKeepingOrder=d,n.binarySearch=f,n.binarySearch2=p,n.quickSelect=c,n.groupBy=a,n.groupAdjacentBy=m,n.forEachAdjacent=e,n.forEachWithNeighbors=h,n.coalesce=r,n.coalesceInPlace=s,n.isFalsyOrEmpty=o,n.isNonEmptyArray=u,n.distinct=S,n.firstOrDefault=L,n.range=N,n.arrayInsert=P,n.pushToStart=E,n.pushToEnd=v,n.pushMany=l,n.asArray=b,n.insertInto=g,n.splice=w,n.compareBy=_,n.tieBreakComparators=C,n.reverseOrder=T;function i(F,q=0){return F[F.length-(1+q)]}function x(F){if(F.length===0)throw new Error("Invalid tail call");return[F.slice(0,F.length-1),F[F.length-1]]}function A(F,q,B=(G,$)=>G===$){if(F===q)return!0;if(!F||!q||F.length!==q.length)return!1;for(let G=0,$=F.length;G<$;G++)if(!B(F[G],q[G]))return!1;return!0}function d(F,q){const B=F.length-1;q<B&&(F[q]=F[B]),F.pop()}function f(F,q,B){return p(F.length,G=>B(F[G],q))}function p(F,q){let B=0,G=F-1;for(;B<=G;){const $=(B+G)/2|0,U=q($);if(U<0)B=$+1;else if(U>0)G=$-1;else return $}return-(B+1)}function c(F,q,B){if(F=F|0,F>=q.length)throw new TypeError("invalid index");const G=q[Math.floor(q.length*Math.random())],$=[],U=[],ee=[];for(const re of q){const ue=B(re,G);ue<0?$.push(re):ue>0?U.push(re):ee.push(re)}return F<$.length?c(F,$,B):F<$.length+ee.length?ee[0]:c(F-($.length+ee.length),U,B)}function a(F,q){const B=[];let G;for(const $ of F.slice(0).sort(q))!G||q(G[0],$)!==0?(G=[$],B.push(G)):G.push($);return B}function*m(F,q){let B,G;for(const $ of F)G!==void 0&&q(G,$)?B.push($):(B&&(yield B),B=[$]),G=$;B&&(yield B)}function e(F,q){for(let B=0;B<=F.length;B++)q(B===0?void 0:F[B-1],B===F.length?void 0:F[B])}function h(F,q){for(let B=0;B<F.length;B++)q(B===0?void 0:F[B-1],F[B],B+1===F.length?void 0:F[B+1])}function r(F){return F.filter(q=>!!q)}function s(F){let q=0;for(let B=0;B<F.length;B++)F[B]&&(F[q]=F[B],q+=1);F.length=q}function o(F){return!Array.isArray(F)||F.length===0}function u(F){return Array.isArray(F)&&F.length>0}function S(F,q=B=>B){const B=new Set;return F.filter(G=>{const $=q(G);return B.has($)?!1:(B.add($),!0)})}function L(F,q){return F.length>0?F[0]:q}function N(F,q){let B=typeof q=="number"?F:0;typeof q=="number"?B=F:(B=0,q=F);const G=[];if(B<=q)for(let $=B;$<q;$++)G.push($);else for(let $=B;$>q;$--)G.push($);return G}function P(F,q,B){const G=F.slice(0,q),$=F.slice(q);return G.concat(B,$)}function E(F,q){const B=F.indexOf(q);B>-1&&(F.splice(B,1),F.unshift(q))}function v(F,q){const B=F.indexOf(q);B>-1&&(F.splice(B,1),F.push(q))}function l(F,q){for(const B of q)F.push(B)}function b(F){return Array.isArray(F)?F:[F]}function g(F,q,B){const G=M(F,q),$=F.length,U=B.length;F.length=$+U;for(let ee=$-1;ee>=G;ee--)F[ee+U]=F[ee];for(let ee=0;ee<U;ee++)F[ee+G]=B[ee]}function w(F,q,B,G){const $=M(F,q);let U=F.splice($,B);return U===void 0&&(U=[]),g(F,$,G),U}function M(F,q){return q<0?Math.max(q+F.length,0):Math.min(q,F.length)}var y;(function(F){function q(U){return U<0}F.isLessThan=q;function B(U){return U<=0}F.isLessThanOrEqual=B;function G(U){return U>0}F.isGreaterThan=G;function $(U){return U===0}F.isNeitherLessOrGreaterThan=$,F.greaterThan=1,F.lessThan=-1,F.neitherLessOrGreaterThan=0})(y||(n.CompareResult=y={}));function _(F,q){return(B,G)=>q(F(B),F(G))}function C(...F){return(q,B)=>{for(const G of F){const $=G(q,B);if(!y.isNeitherLessOrGreaterThan($))return $}return y.neitherLessOrGreaterThan}}const R=(F,q)=>F-q;n.numberComparator=R;const D=(F,q)=>(0,n.numberComparator)(F?1:0,q?1:0);n.booleanComparator=D;function T(F){return(q,B)=>-F(q,B)}class O{constructor(q){this.items=q,this.firstIdx=0,this.lastIdx=this.items.length-1}get length(){return this.lastIdx-this.firstIdx+1}takeWhile(q){let B=this.firstIdx;for(;B<this.items.length&&q(this.items[B]);)B++;const G=B===this.firstIdx?null:this.items.slice(this.firstIdx,B);return this.firstIdx=B,G}takeFromEndWhile(q){let B=this.lastIdx;for(;B>=0&&q(this.items[B]);)B--;const G=B===this.lastIdx?null:this.items.slice(B+1,this.lastIdx+1);return this.lastIdx=B,G}peek(){if(this.length!==0)return this.items[this.firstIdx]}dequeue(){const q=this.items[this.firstIdx];return this.firstIdx++,q}takeCount(q){const B=this.items.slice(this.firstIdx,this.firstIdx+q);return this.firstIdx+=q,B}}n.ArrayQueue=O;class z{static{this.empty=new z(q=>{})}constructor(q){this.iterate=q}toArray(){const q=[];return this.iterate(B=>(q.push(B),!0)),q}filter(q){return new z(B=>this.iterate(G=>q(G)?B(G):!0))}map(q){return new z(B=>this.iterate(G=>B(q(G))))}findLast(q){let B;return this.iterate(G=>(q(G)&&(B=G),!0)),B}findLastMaxBy(q){let B,G=!0;return this.iterate($=>((G||y.isGreaterThan(q($,B)))&&(G=!1,B=$),!0)),B}}n.CallbackIterable=z;class j{constructor(q){this._indexMap=q}static createSortPermutation(q,B){const G=Array.from(q.keys()).sort(($,U)=>B(q[$],q[U]));return new j(G)}apply(q){return q.map((B,G)=>q[this._indexMap[G]])}inverse(){const q=this._indexMap.slice();for(let B=0;B<this._indexMap.length;B++)q[this._indexMap[B]]=B;return new j(q)}}n.Permutation=j}),X(J[15],Z([0,1]),function(W,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.MonotonousArray=void 0,n.findLast=i,n.findLastIdx=x,n.findLastMonotonous=A,n.findLastIdxMonotonous=d,n.findFirstMonotonous=f,n.findFirstIdxMonotonousOrArrLen=p,n.findFirstMax=a,n.findLastMax=m,n.findFirstMin=e,n.findMaxIdx=h,n.mapFindFirst=r;function i(s,o){const u=x(s,o);if(u!==-1)return s[u]}function x(s,o,u=s.length-1){for(let S=u;S>=0;S--){const L=s[S];if(o(L))return S}return-1}function A(s,o){const u=d(s,o);return u===-1?void 0:s[u]}function d(s,o,u=0,S=s.length){let L=u,N=S;for(;L<N;){const P=Math.floor((L+N)/2);o(s[P])?L=P+1:N=P}return L-1}function f(s,o){const u=p(s,o);return u===s.length?void 0:s[u]}function p(s,o,u=0,S=s.length){let L=u,N=S;for(;L<N;){const P=Math.floor((L+N)/2);o(s[P])?N=P:L=P+1}return L}class c{static{this.assertInvariants=!1}constructor(o){this._array=o,this._findLastMonotonousLastIdx=0}findLastMonotonous(o){if(c.assertInvariants){if(this._prevFindLastPredicate){for(const S of this._array)if(this._prevFindLastPredicate(S)&&!o(S))throw new Error("MonotonousArray: current predicate must be weaker than (or equal to) the previous predicate.")}this._prevFindLastPredicate=o}const u=d(this._array,o,this._findLastMonotonousLastIdx);return this._findLastMonotonousLastIdx=u+1,u===-1?void 0:this._array[u]}}n.MonotonousArray=c;function a(s,o){if(s.length===0)return;let u=s[0];for(let S=1;S<s.length;S++){const L=s[S];o(L,u)>0&&(u=L)}return u}function m(s,o){if(s.length===0)return;let u=s[0];for(let S=1;S<s.length;S++){const L=s[S];o(L,u)>=0&&(u=L)}return u}function e(s,o){return a(s,(u,S)=>-o(u,S))}function h(s,o){if(s.length===0)return-1;let u=0;for(let S=1;S<s.length;S++){const L=s[S];o(L,s[u])>0&&(u=S)}return u}function r(s,o){for(const u of s){const S=o(u);if(S!==void 0)return S}}}),X(J[39],Z([0,1]),function(W,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.CachedFunction=n.LRUCachedFunction=void 0,n.identity=i;function i(d){return d}class x{constructor(f,p){this.lastCache=void 0,this.lastArgKey=void 0,typeof f=="function"?(this._fn=f,this._computeKey=i):(this._fn=p,this._computeKey=f.getCacheKey)}get(f){const p=this._computeKey(f);return this.lastArgKey!==p&&(this.lastArgKey=p,this.lastCache=this._fn(f)),this.lastCache}}n.LRUCachedFunction=x;class A{get cachedValues(){return this._map}constructor(f,p){this._map=new Map,this._map2=new Map,typeof f=="function"?(this._fn=f,this._computeKey=i):(this._fn=p,this._computeKey=f.getCacheKey)}get(f){const p=this._computeKey(f);if(this._map2.has(p))return this._map2.get(p);const c=this._fn(f);return this._map.set(f,c),this._map2.set(p,c),c}}n.CachedFunction=A}),X(J[40],Z([0,1]),function(W,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Color=n.HSVA=n.HSLA=n.RGBA=void 0;function i(p,c){const a=Math.pow(10,c);return Math.round(p*a)/a}class x{constructor(c,a,m,e=1){this._rgbaBrand=void 0,this.r=Math.min(255,Math.max(0,c))|0,this.g=Math.min(255,Math.max(0,a))|0,this.b=Math.min(255,Math.max(0,m))|0,this.a=i(Math.max(Math.min(1,e),0),3)}static equals(c,a){return c.r===a.r&&c.g===a.g&&c.b===a.b&&c.a===a.a}}n.RGBA=x;class A{constructor(c,a,m,e){this._hslaBrand=void 0,this.h=Math.max(Math.min(360,c),0)|0,this.s=i(Math.max(Math.min(1,a),0),3),this.l=i(Math.max(Math.min(1,m),0),3),this.a=i(Math.max(Math.min(1,e),0),3)}static equals(c,a){return c.h===a.h&&c.s===a.s&&c.l===a.l&&c.a===a.a}static fromRGBA(c){const a=c.r/255,m=c.g/255,e=c.b/255,h=c.a,r=Math.max(a,m,e),s=Math.min(a,m,e);let o=0,u=0;const S=(s+r)/2,L=r-s;if(L>0){switch(u=Math.min(S<=.5?L/(2*S):L/(2-2*S),1),r){case a:o=(m-e)/L+(m<e?6:0);break;case m:o=(e-a)/L+2;break;case e:o=(a-m)/L+4;break}o*=60,o=Math.round(o)}return new A(o,u,S,h)}static _hue2rgb(c,a,m){return m<0&&(m+=1),m>1&&(m-=1),m<1/6?c+(a-c)*6*m:m<1/2?a:m<2/3?c+(a-c)*(2/3-m)*6:c}static toRGBA(c){const a=c.h/360,{s:m,l:e,a:h}=c;let r,s,o;if(m===0)r=s=o=e;else{const u=e<.5?e*(1+m):e+m-e*m,S=2*e-u;r=A._hue2rgb(S,u,a+1/3),s=A._hue2rgb(S,u,a),o=A._hue2rgb(S,u,a-1/3)}return new x(Math.round(r*255),Math.round(s*255),Math.round(o*255),h)}}n.HSLA=A;class d{constructor(c,a,m,e){this._hsvaBrand=void 0,this.h=Math.max(Math.min(360,c),0)|0,this.s=i(Math.max(Math.min(1,a),0),3),this.v=i(Math.max(Math.min(1,m),0),3),this.a=i(Math.max(Math.min(1,e),0),3)}static equals(c,a){return c.h===a.h&&c.s===a.s&&c.v===a.v&&c.a===a.a}static fromRGBA(c){const a=c.r/255,m=c.g/255,e=c.b/255,h=Math.max(a,m,e),r=Math.min(a,m,e),s=h-r,o=h===0?0:s/h;let u;return s===0?u=0:h===a?u=((m-e)/s%6+6)%6:h===m?u=(e-a)/s+2:u=(a-m)/s+4,new d(Math.round(u*60),o,h,c.a)}static toRGBA(c){const{h:a,s:m,v:e,a:h}=c,r=e*m,s=r*(1-Math.abs(a/60%2-1)),o=e-r;let[u,S,L]=[0,0,0];return a<60?(u=r,S=s):a<120?(u=s,S=r):a<180?(S=r,L=s):a<240?(S=s,L=r):a<300?(u=s,L=r):a<=360&&(u=r,L=s),u=Math.round((u+o)*255),S=Math.round((S+o)*255),L=Math.round((L+o)*255),new x(u,S,L,h)}}n.HSVA=d;class f{static fromHex(c){return f.Format.CSS.parseHex(c)||f.red}static equals(c,a){return!c&&!a?!0:!c||!a?!1:c.equals(a)}get hsla(){return this._hsla?this._hsla:A.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:d.fromRGBA(this.rgba)}constructor(c){if(c)if(c instanceof x)this.rgba=c;else if(c instanceof A)this._hsla=c,this.rgba=A.toRGBA(c);else if(c instanceof d)this._hsva=c,this.rgba=d.toRGBA(c);else throw new Error("Invalid color ctor argument");else throw new Error("Color needs a value")}equals(c){return!!c&&x.equals(this.rgba,c.rgba)&&A.equals(this.hsla,c.hsla)&&d.equals(this.hsva,c.hsva)}getRelativeLuminance(){const c=f._relativeLuminanceForComponent(this.rgba.r),a=f._relativeLuminanceForComponent(this.rgba.g),m=f._relativeLuminanceForComponent(this.rgba.b),e=.2126*c+.7152*a+.0722*m;return i(e,4)}static _relativeLuminanceForComponent(c){const a=c/255;return a<=.03928?a/12.92:Math.pow((a+.055)/1.055,2.4)}isLighter(){return(this.rgba.r*299+this.rgba.g*587+this.rgba.b*114)/1e3>=128}isLighterThan(c){const a=this.getRelativeLuminance(),m=c.getRelativeLuminance();return a>m}isDarkerThan(c){const a=this.getRelativeLuminance(),m=c.getRelativeLuminance();return a<m}lighten(c){return new f(new A(this.hsla.h,this.hsla.s,this.hsla.l+this.hsla.l*c,this.hsla.a))}darken(c){return new f(new A(this.hsla.h,this.hsla.s,this.hsla.l-this.hsla.l*c,this.hsla.a))}transparent(c){const{r:a,g:m,b:e,a:h}=this.rgba;return new f(new x(a,m,e,h*c))}isTransparent(){return this.rgba.a===0}isOpaque(){return this.rgba.a===1}opposite(){return new f(new x(255-this.rgba.r,255-this.rgba.g,255-this.rgba.b,this.rgba.a))}makeOpaque(c){if(this.isOpaque()||c.rgba.a!==1)return this;const{r:a,g:m,b:e,a:h}=this.rgba;return new f(new x(c.rgba.r-h*(c.rgba.r-a),c.rgba.g-h*(c.rgba.g-m),c.rgba.b-h*(c.rgba.b-e),1))}toString(){return this._toString||(this._toString=f.Format.CSS.format(this)),this._toString}static getLighterColor(c,a,m){if(c.isLighterThan(a))return c;m=m||.5;const e=c.getRelativeLuminance(),h=a.getRelativeLuminance();return m=m*(h-e)/h,c.lighten(m)}static getDarkerColor(c,a,m){if(c.isDarkerThan(a))return c;m=m||.5;const e=c.getRelativeLuminance(),h=a.getRelativeLuminance();return m=m*(e-h)/e,c.darken(m)}static{this.white=new f(new x(255,255,255,1))}static{this.black=new f(new x(0,0,0,1))}static{this.red=new f(new x(255,0,0,1))}static{this.blue=new f(new x(0,0,255,1))}static{this.green=new f(new x(0,255,0,1))}static{this.cyan=new f(new x(0,255,255,1))}static{this.lightgrey=new f(new x(211,211,211,1))}static{this.transparent=new f(new x(0,0,0,0))}}n.Color=f,function(p){let c;(function(a){let m;(function(e){function h(v){return v.rgba.a===1?`rgb(${v.rgba.r}, ${v.rgba.g}, ${v.rgba.b})`:p.Format.CSS.formatRGBA(v)}e.formatRGB=h;function r(v){return`rgba(${v.rgba.r}, ${v.rgba.g}, ${v.rgba.b}, ${+v.rgba.a.toFixed(2)})`}e.formatRGBA=r;function s(v){return v.hsla.a===1?`hsl(${v.hsla.h}, ${(v.hsla.s*100).toFixed(2)}%, ${(v.hsla.l*100).toFixed(2)}%)`:p.Format.CSS.formatHSLA(v)}e.formatHSL=s;function o(v){return`hsla(${v.hsla.h}, ${(v.hsla.s*100).toFixed(2)}%, ${(v.hsla.l*100).toFixed(2)}%, ${v.hsla.a.toFixed(2)})`}e.formatHSLA=o;function u(v){const l=v.toString(16);return l.length!==2?"0"+l:l}function S(v){return`#${u(v.rgba.r)}${u(v.rgba.g)}${u(v.rgba.b)}`}e.formatHex=S;function L(v,l=!1){return l&&v.rgba.a===1?p.Format.CSS.formatHex(v):`#${u(v.rgba.r)}${u(v.rgba.g)}${u(v.rgba.b)}${u(Math.round(v.rgba.a*255))}`}e.formatHexA=L;function N(v){return v.isOpaque()?p.Format.CSS.formatHex(v):p.Format.CSS.formatRGBA(v)}e.format=N;function P(v){const l=v.length;if(l===0||v.charCodeAt(0)!==35)return null;if(l===7){const b=16*E(v.charCodeAt(1))+E(v.charCodeAt(2)),g=16*E(v.charCodeAt(3))+E(v.charCodeAt(4)),w=16*E(v.charCodeAt(5))+E(v.charCodeAt(6));return new p(new x(b,g,w,1))}if(l===9){const b=16*E(v.charCodeAt(1))+E(v.charCodeAt(2)),g=16*E(v.charCodeAt(3))+E(v.charCodeAt(4)),w=16*E(v.charCodeAt(5))+E(v.charCodeAt(6)),M=16*E(v.charCodeAt(7))+E(v.charCodeAt(8));return new p(new x(b,g,w,M/255))}if(l===4){const b=E(v.charCodeAt(1)),g=E(v.charCodeAt(2)),w=E(v.charCodeAt(3));return new p(new x(16*b+b,16*g+g,16*w+w))}if(l===5){const b=E(v.charCodeAt(1)),g=E(v.charCodeAt(2)),w=E(v.charCodeAt(3)),M=E(v.charCodeAt(4));return new p(new x(16*b+b,16*g+g,16*w+w,(16*M+M)/255))}return null}e.parseHex=P;function E(v){switch(v){case 48:return 0;case 49:return 1;case 50:return 2;case 51:return 3;case 52:return 4;case 53:return 5;case 54:return 6;case 55:return 7;case 56:return 8;case 57:return 9;case 97:return 10;case 65:return 10;case 98:return 11;case 66:return 11;case 99:return 12;case 67:return 12;case 100:return 13;case 68:return 13;case 101:return 14;case 69:return 14;case 102:return 15;case 70:return 15}return 0}})(m=a.CSS||(a.CSS={}))})(c=p.Format||(p.Format={}))}(f||(n.Color=f={}))}),X(J[41],Z([0,1]),function(W,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.DiffChange=void 0;class i{constructor(A,d,f,p){this.originalStart=A,this.originalLength=d,this.modifiedStart=f,this.modifiedLength=p}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}}n.DiffChange=i}),X(J[3],Z([0,1]),function(W,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.BugIndicatingError=n.ErrorNoTelemetry=n.NotSupportedError=n.CancellationError=n.errorHandler=n.ErrorHandler=void 0,n.onUnexpectedError=x,n.onUnexpectedExternalError=A,n.transformErrorForSerialization=d,n.isCancellationError=p,n.cancele