UNPKG

@jsjoeio/code-server

Version:

Run VS Code on a remote server.

10 lines (9 loc) 196 kB
/*!-------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/(function(){var G=["require","exports","vs/base/common/platform","vs/editor/common/core/position","vs/base/common/errors","vs/base/common/strings","vs/editor/common/core/range","vs/base/common/functional","vs/base/common/lifecycle","vs/base/common/stopwatch","vs/base/common/event","vs/base/common/diff/diff","vs/base/common/types","vs/base/common/uint","vs/base/common/uri","vs/base/common/diff/diffChange","vs/base/common/iterator","vs/base/common/keyCodes","vs/base/common/linkedList","vs/base/common/process","vs/base/common/path","vs/base/common/cancellation","vs/base/common/hash","vs/editor/common/core/characterClassifier","vs/editor/common/core/selection","vs/editor/common/core/token","vs/editor/common/diff/diffComputer","vs/editor/common/model/wordHelper","vs/editor/common/modes/linkComputer","vs/editor/common/modes/supports/inplaceReplaceSupport","vs/editor/common/standalone/standaloneEnums","vs/editor/common/standalone/standaloneBase","vs/editor/common/viewModel/prefixSumComputer","vs/editor/common/model/mirrorTextModel","vs/base/common/worker/simpleWorker","vs/editor/common/services/editorSimpleWorker"],Q=function(I){for(var t=[],M=0,U=I.length;M<U;M++)t[M]=G[I[M]];return t},Le=this,be=typeof global=="object"?global:{},ee;(function(I){I.global=Le;var t=function(){function M(){this._detected=!1,this._isWindows=!1,this._isNode=!1,this._isElectronRenderer=!1,this._isWebWorker=!1}return Object.defineProperty(M.prototype,"isWindows",{get:function(){return this._detect(),this._isWindows},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"isNode",{get:function(){return this._detect(),this._isNode},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"isElectronRenderer",{get:function(){return this._detect(),this._isElectronRenderer},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"isWebWorker",{get:function(){return this._detect(),this._isWebWorker},enumerable:!1,configurable:!0}),M.prototype._detect=function(){this._detected||(this._detected=!0,this._isWindows=M._isWindows(),this._isNode=typeof module!="undefined"&&!!module.exports,this._isElectronRenderer=typeof process!="undefined"&&typeof process.versions!="undefined"&&typeof process.versions.electron!="undefined"&&process.type==="renderer",this._isWebWorker=typeof I.global.importScripts=="function")},M._isWindows=function(){return typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.indexOf("Windows")>=0?!0:typeof process!="undefined"?process.platform==="win32":!1},M}();I.Environment=t})(ee||(ee={}));var ee;(function(I){var t=function(){function C(s,S,l){this.type=s,this.detail=S,this.timestamp=l}return C}();I.LoaderEvent=t;var M=function(){function C(s){this._events=[new t(1,"",s)]}return C.prototype.record=function(s,S){this._events.push(new t(s,S,I.Utilities.getHighPerformanceTimestamp()))},C.prototype.getEvents=function(){return this._events},C}();I.LoaderEventRecorder=M;var U=function(){function C(){}return C.prototype.record=function(s,S){},C.prototype.getEvents=function(){return[]},C.INSTANCE=new C,C}();I.NullLoaderEventRecorder=U})(ee||(ee={}));var ee;(function(I){var t=function(){function M(){}return M.fileUriToFilePath=function(U,C){if(C=decodeURI(C).replace(/%23/g,"#"),U){if(/^file:\/\/\//.test(C))return C.substr(8);if(/^file:\/\//.test(C))return C.substr(5)}else if(/^file:\/\//.test(C))return C.substr(7);return C},M.startsWith=function(U,C){return U.length>=C.length&&U.substr(0,C.length)===C},M.endsWith=function(U,C){return U.length>=C.length&&U.substr(U.length-C.length)===C},M.containsQueryString=function(U){return/^[^\#]*\?/gi.test(U)},M.isAbsolutePath=function(U){return/^((http:\/\/)|(https:\/\/)|(file:\/\/)|(\/))/.test(U)},M.forEachProperty=function(U,C){if(U){var s=void 0;for(s in U)U.hasOwnProperty(s)&&C(s,U[s])}},M.isEmpty=function(U){var C=!0;return M.forEachProperty(U,function(){C=!1}),C},M.recursiveClone=function(U){if(!U||typeof U!="object"||U instanceof RegExp||!Array.isArray(U)&&Object.getPrototypeOf(U)!==Object.prototype)return U;var C=Array.isArray(U)?[]:{};return M.forEachProperty(U,function(s,S){S&&typeof S=="object"?C[s]=M.recursiveClone(S):C[s]=S}),C},M.generateAnonymousModule=function(){return"===anonymous"+M.NEXT_ANONYMOUS_ID+++"==="},M.isAnonymousModule=function(U){return M.startsWith(U,"===anonymous")},M.getHighPerformanceTimestamp=function(){return this.PERFORMANCE_NOW_PROBED||(this.PERFORMANCE_NOW_PROBED=!0,this.HAS_PERFORMANCE_NOW=I.global.performance&&typeof I.global.performance.now=="function"),this.HAS_PERFORMANCE_NOW?I.global.performance.now():Date.now()},M.NEXT_ANONYMOUS_ID=1,M.PERFORMANCE_NOW_PROBED=!1,M.HAS_PERFORMANCE_NOW=!1,M}();I.Utilities=t})(ee||(ee={}));var ee;(function(I){function t(C){if(C instanceof Error)return C;var s=new Error(C.message||String(C)||"Unknown Error");return C.stack&&(s.stack=C.stack),s}I.ensureError=t;var M=function(){function C(){}return C.validateConfigurationOptions=function(s){function S(o){if(o.phase==="loading"){console.error('Loading "'+o.moduleId+'" failed'),console.error(o),console.error("Here are the modules that depend on it:"),console.error(o.neededBy);return}if(o.phase==="factory"){console.error('The factory method of "'+o.moduleId+'" has thrown an exception'),console.error(o);return}}if(s=s||{},typeof s.baseUrl!="string"&&(s.baseUrl=""),typeof s.isBuild!="boolean"&&(s.isBuild=!1),typeof s.paths!="object"&&(s.paths={}),typeof s.config!="object"&&(s.config={}),typeof s.catchError=="undefined"&&(s.catchError=!1),typeof s.recordStats=="undefined"&&(s.recordStats=!1),typeof s.urlArgs!="string"&&(s.urlArgs=""),typeof s.onError!="function"&&(s.onError=S),Array.isArray(s.ignoreDuplicateModules)||(s.ignoreDuplicateModules=[]),s.baseUrl.length>0&&(I.Utilities.endsWith(s.baseUrl,"/")||(s.baseUrl+="/")),typeof s.cspNonce!="string"&&(s.cspNonce=""),typeof s.preferScriptTags=="undefined"&&(s.preferScriptTags=!1),Array.isArray(s.nodeModules)||(s.nodeModules=[]),s.nodeCachedData&&typeof s.nodeCachedData=="object"&&(typeof s.nodeCachedData.seed!="string"&&(s.nodeCachedData.seed="seed"),(typeof s.nodeCachedData.writeDelay!="number"||s.nodeCachedData.writeDelay<0)&&(s.nodeCachedData.writeDelay=1e3*7),!s.nodeCachedData.path||typeof s.nodeCachedData.path!="string")){var l=t(new Error("INVALID cached data configuration, 'path' MUST be set"));l.phase="configuration",s.onError(l),s.nodeCachedData=void 0}return s},C.mergeConfigurationOptions=function(s,S){s===void 0&&(s=null),S===void 0&&(S=null);var l=I.Utilities.recursiveClone(S||{});return I.Utilities.forEachProperty(s,function(o,a){o==="ignoreDuplicateModules"&&typeof l.ignoreDuplicateModules!="undefined"?l.ignoreDuplicateModules=l.ignoreDuplicateModules.concat(a):o==="paths"&&typeof l.paths!="undefined"?I.Utilities.forEachProperty(a,function(E,w){return l.paths[E]=w}):o==="config"&&typeof l.config!="undefined"?I.Utilities.forEachProperty(a,function(E,w){return l.config[E]=w}):l[o]=I.Utilities.recursiveClone(a)}),C.validateConfigurationOptions(l)},C}();I.ConfigurationOptionsUtil=M;var U=function(){function C(s,S){if(this._env=s,this.options=M.mergeConfigurationOptions(S),this._createIgnoreDuplicateModulesMap(),this._createNodeModulesMap(),this._createSortedPathsRules(),this.options.baseUrl===""){if(this.options.nodeRequire&&this.options.nodeRequire.main&&this.options.nodeRequire.main.filename&&this._env.isNode){var l=this.options.nodeRequire.main.filename,o=Math.max(l.lastIndexOf("/"),l.lastIndexOf("\\"));this.options.baseUrl=l.substring(0,o+1)}if(this.options.nodeMain&&this._env.isNode){var l=this.options.nodeMain,o=Math.max(l.lastIndexOf("/"),l.lastIndexOf("\\"));this.options.baseUrl=l.substring(0,o+1)}}}return C.prototype._createIgnoreDuplicateModulesMap=function(){this.ignoreDuplicateModulesMap={};for(var s=0;s<this.options.ignoreDuplicateModules.length;s++)this.ignoreDuplicateModulesMap[this.options.ignoreDuplicateModules[s]]=!0},C.prototype._createNodeModulesMap=function(){this.nodeModulesMap=Object.create(null);for(var s=0,S=this.options.nodeModules;s<S.length;s++){var l=S[s];this.nodeModulesMap[l]=!0}},C.prototype._createSortedPathsRules=function(){var s=this;this.sortedPathsRules=[],I.Utilities.forEachProperty(this.options.paths,function(S,l){Array.isArray(l)?s.sortedPathsRules.push({from:S,to:l}):s.sortedPathsRules.push({from:S,to:[l]})}),this.sortedPathsRules.sort(function(S,l){return l.from.length-S.from.length})},C.prototype.cloneAndMerge=function(s){return new C(this._env,M.mergeConfigurationOptions(s,this.options))},C.prototype.getOptionsLiteral=function(){return this.options},C.prototype._applyPaths=function(s){for(var S,l=0,o=this.sortedPathsRules.length;l<o;l++)if(S=this.sortedPathsRules[l],I.Utilities.startsWith(s,S.from)){for(var a=[],E=0,w=S.to.length;E<w;E++)a.push(S.to[E]+s.substr(S.from.length));return a}return[s]},C.prototype._addUrlArgsToUrl=function(s){return I.Utilities.containsQueryString(s)?s+"&"+this.options.urlArgs:s+"?"+this.options.urlArgs},C.prototype._addUrlArgsIfNecessaryToUrl=function(s){return this.options.urlArgs?this._addUrlArgsToUrl(s):s},C.prototype._addUrlArgsIfNecessaryToUrls=function(s){if(this.options.urlArgs)for(var S=0,l=s.length;S<l;S++)s[S]=this._addUrlArgsToUrl(s[S]);return s},C.prototype.moduleIdToPaths=function(s){var S=this.nodeModulesMap[s]===!0||this.options.amdModulesPattern instanceof RegExp&&!this.options.amdModulesPattern.test(s);if(S)return this.isBuild()?["empty:"]:["node|"+s];var l=s,o;if(!I.Utilities.endsWith(l,".js")&&!I.Utilities.isAbsolutePath(l)){o=this._applyPaths(l);for(var a=0,E=o.length;a<E;a++)this.isBuild()&&o[a]==="empty:"||(I.Utilities.isAbsolutePath(o[a])||(o[a]=this.options.baseUrl+o[a]),!I.Utilities.endsWith(o[a],".js")&&!I.Utilities.containsQueryString(o[a])&&(o[a]=o[a]+".js"))}else!I.Utilities.endsWith(l,".js")&&!I.Utilities.containsQueryString(l)&&(l=l+".js"),o=[l];return this._addUrlArgsIfNecessaryToUrls(o)},C.prototype.requireToUrl=function(s){var S=s;return I.Utilities.isAbsolutePath(S)||(S=this._applyPaths(S)[0],I.Utilities.isAbsolutePath(S)||(S=this.options.baseUrl+S)),this._addUrlArgsIfNecessaryToUrl(S)},C.prototype.isBuild=function(){return this.options.isBuild},C.prototype.isDuplicateMessageIgnoredFor=function(s){return this.ignoreDuplicateModulesMap.hasOwnProperty(s)},C.prototype.getConfigForModule=function(s){if(this.options.config)return this.options.config[s]},C.prototype.shouldCatchError=function(){return this.options.catchError},C.prototype.shouldRecordStats=function(){return this.options.recordStats},C.prototype.onError=function(s){this.options.onError(s)},C}();I.Configuration=U})(ee||(ee={}));var ee;(function(I){var t=function(){function l(o){this._env=o,this._scriptLoader=null,this._callbackMap={}}return l.prototype.load=function(o,a,E,w){var d=this;if(!this._scriptLoader)if(this._env.isWebWorker)this._scriptLoader=new U;else if(this._env.isElectronRenderer){var c=o.getConfig().getOptionsLiteral().preferScriptTags;c?this._scriptLoader=new M:this._scriptLoader=new C(this._env)}else this._env.isNode?this._scriptLoader=new C(this._env):this._scriptLoader=new M;var g={callback:E,errorback:w};if(this._callbackMap.hasOwnProperty(a)){this._callbackMap[a].push(g);return}this._callbackMap[a]=[g],this._scriptLoader.load(o,a,function(){return d.triggerCallback(a)},function(b){return d.triggerErrorback(a,b)})},l.prototype.triggerCallback=function(o){var a=this._callbackMap[o];delete this._callbackMap[o];for(var E=0;E<a.length;E++)a[E].callback()},l.prototype.triggerErrorback=function(o,a){var E=this._callbackMap[o];delete this._callbackMap[o];for(var w=0;w<E.length;w++)E[w].errorback(a)},l}(),M=function(){function l(){}return l.prototype.attachListeners=function(o,a,E){var w=function(){o.removeEventListener("load",d),o.removeEventListener("error",c)},d=function(g){w(),a()},c=function(g){w(),E(g)};o.addEventListener("load",d),o.addEventListener("error",c)},l.prototype.load=function(o,a,E,w){if(/^node\|/.test(a)){var d=o.getConfig().getOptionsLiteral(),c=s(o.getRecorder(),d.nodeRequire||I.global.nodeRequire),g=a.split("|"),b=null;try{b=c(g[1])}catch(i){w(i);return}o.enqueueDefineAnonymousModule([],function(){return b}),E()}else{var A=document.createElement("script");A.setAttribute("async","async"),A.setAttribute("type","text/javascript"),this.attachListeners(A,E,w);var _=o.getConfig().getOptionsLiteral().trustedTypesPolicy;_&&(a=_.createScriptURL(a)),A.setAttribute("src",a);var n=o.getConfig().getOptionsLiteral().cspNonce;n&&A.setAttribute("nonce",n),document.getElementsByTagName("head")[0].appendChild(A)}},l}(),U=function(){function l(){}return l.prototype.load=function(o,a,E,w){var d=o.getConfig().getOptionsLiteral().trustedTypesPolicy,c=/^((http:)|(https:)|(file:))/.test(a)&&a.substring(0,self.origin.length)!==self.origin;if(!c){fetch(a).then(function(g){if(g.status!==200)throw new Error(g.statusText);return g.text()}).then(function(g){g=g+` //# sourceURL=`+a;var b=d?self.eval(d.createScript("",g)):new Function(g);b.call(self),E()}).then(void 0,w);return}try{d&&(a=d.createScriptURL(a)),importScripts(a),E()}catch(g){w(g)}},l}(),C=function(){function l(o){this._env=o,this._didInitialize=!1,this._didPatchNodeRequire=!1}return l.prototype._init=function(o){this._didInitialize||(this._didInitialize=!0,this._fs=o("fs"),this._vm=o("vm"),this._path=o("path"),this._crypto=o("crypto"))},l.prototype._initNodeRequire=function(o,a){var E=a.getConfig().getOptionsLiteral().nodeCachedData;if(!E||this._didPatchNodeRequire)return;this._didPatchNodeRequire=!0;var w=this,d=o("module");function c(g){var b=g.constructor,A=function(n){try{return g.require(n)}finally{}};return A.resolve=function(n,i){return b._resolveFilename(n,g,!1,i)},A.resolve.paths=function(n){return b._resolveLookupPaths(n,g)},A.main=process.mainModule,A.extensions=b._extensions,A.cache=b._cache,A}d.prototype._compile=function(g,b){var A=d.wrap(g.replace(/^#!.*/,"")),_=a.getRecorder(),n=w._getCachedDataPath(E,b),i={filename:b},r;try{var u=w._fs.readFileSync(n);r=u.slice(0,16),i.cachedData=u.slice(16),_.record(60,n)}catch(P){_.record(61,n)}var f=new w._vm.Script(A,i),v=f.runInThisContext(i),h=w._path.dirname(b),m=c(this),N=[this.exports,m,this,b,h,process,be,Buffer],p=v.apply(this.exports,N);return w._handleCachedData(f,A,n,!i.cachedData,a),w._verifyCachedData(f,A,n,r,a),p}},l.prototype.load=function(o,a,E,w){var d=this,c=o.getConfig().getOptionsLiteral(),g=s(o.getRecorder(),c.nodeRequire||I.global.nodeRequire),b=c.nodeInstrumenter||function(v){return v};this._init(g),this._initNodeRequire(g,o);var A=o.getRecorder();if(/^node\|/.test(a)){var _=a.split("|"),n=null;try{n=g(_[1])}catch(v){w(v);return}o.enqueueDefineAnonymousModule([],function(){return n}),E()}else{a=I.Utilities.fileUriToFilePath(this._env.isWindows,a);var i=this._path.normalize(a),r=this._getElectronRendererScriptPathOrUri(i),u=Boolean(c.nodeCachedData),f=u?this._getCachedDataPath(c.nodeCachedData,a):void 0;this._readSourceAndCachedData(i,f,A,function(v,h,m,N){if(v){w(v);return}var p;h.charCodeAt(0)===l._BOM?p=l._PREFIX+h.substring(1)+l._SUFFIX:p=l._PREFIX+h+l._SUFFIX,p=b(p,i);var P={filename:r,cachedData:m},F=d._createAndEvalScript(o,p,P,E,w);d._handleCachedData(F,p,f,u&&!m,o),d._verifyCachedData(F,p,f,N,o)})}},l.prototype._createAndEvalScript=function(o,a,E,w,d){var c=o.getRecorder();c.record(31,E.filename);var g=new this._vm.Script(a,E),b=g.runInThisContext(E),A=o.getGlobalAMDDefineFunc(),_=!1,n=function(){return _=!0,A.apply(null,arguments)};return n.amd=A.amd,b.call(I.global,o.getGlobalAMDRequireFunc(),n,E.filename,this._path.dirname(E.filename)),c.record(32,E.filename),_?w():d(new Error("Didn't receive define call in "+E.filename+"!")),g},l.prototype._getElectronRendererScriptPathOrUri=function(o){if(!this._env.isElectronRenderer)return o;var a=o.match(/^([a-z])\:(.*)/i);return a?"file:///"+(a[1].toUpperCase()+":"+a[2]).replace(/\\/g,"/"):"file://"+o},l.prototype._getCachedDataPath=function(o,a){var E=this._crypto.createHash("md5").update(a,"utf8").update(o.seed,"utf8").update(process.arch,"").digest("hex"),w=this._path.basename(a).replace(/\.js$/,"");return this._path.join(o.path,w+"-"+E+".code")},l.prototype._handleCachedData=function(o,a,E,w,d){var c=this;o.cachedDataRejected?this._fs.unlink(E,function(g){d.getRecorder().record(62,E),c._createAndWriteCachedData(o,a,E,d),g&&d.getConfig().onError(g)}):w&&this._createAndWriteCachedData(o,a,E,d)},l.prototype._createAndWriteCachedData=function(o,a,E,w){var d=this,c=Math.ceil(w.getConfig().getOptionsLiteral().nodeCachedData.writeDelay*(1+Math.random())),g=-1,b=0,A=void 0,_=function(){setTimeout(function(){A||(A=d._crypto.createHash("md5").update(a,"utf8").digest());var n=o.createCachedData();if(!(n.length===0||n.length===g||b>=5)){if(n.length<g){_();return}g=n.length,d._fs.writeFile(E,Buffer.concat([A,n]),function(i){i&&w.getConfig().onError(i),w.getRecorder().record(63,E),_()})}},c*Math.pow(4,b++))};_()},l.prototype._readSourceAndCachedData=function(o,a,E,w){if(!a)this._fs.readFile(o,{encoding:"utf8"},w);else{var d=void 0,c=void 0,g=void 0,b=2,A=function(_){_?w(_):--b==0&&w(void 0,d,c,g)};this._fs.readFile(o,{encoding:"utf8"},function(_,n){d=n,A(_)}),this._fs.readFile(a,function(_,n){!_&&n&&n.length>0?(g=n.slice(0,16),c=n.slice(16),E.record(60,a)):E.record(61,a),A()})}},l.prototype._verifyCachedData=function(o,a,E,w,d){var c=this;!w||o.cachedDataRejected||setTimeout(function(){var g=c._crypto.createHash("md5").update(a,"utf8").digest();w.equals(g)||(d.getConfig().onError(new Error("FAILED TO VERIFY CACHED DATA, deleting stale '"+E+"' now, but a RESTART IS REQUIRED")),c._fs.unlink(E,function(b){b&&d.getConfig().onError(b)}))},Math.ceil(5e3*(1+Math.random())))},l._BOM=65279,l._PREFIX="(function (require, define, __filename, __dirname) { ",l._SUFFIX=` });`,l}();function s(l,o){if(o.__$__isRecorded)return o;var a=function(w){l.record(33,w);try{return o(w)}finally{l.record(34,w)}};return a.__$__isRecorded=!0,a}I.ensureRecordedNodeRequire=s;function S(l){return new t(l)}I.createScriptLoader=S})(ee||(ee={}));var ee;(function(I){var t=function(){function l(o){var a=o.lastIndexOf("/");a!==-1?this.fromModulePath=o.substr(0,a+1):this.fromModulePath=""}return l._normalizeModuleId=function(o){var a=o,E;for(E=/\/\.\//;E.test(a);)a=a.replace(E,"/");for(a=a.replace(/^\.\//g,""),E=/\/(([^\/])|([^\/][^\/\.])|([^\/\.][^\/])|([^\/][^\/][^\/]+))\/\.\.\//;E.test(a);)a=a.replace(E,"/");return a=a.replace(/^(([^\/])|([^\/][^\/\.])|([^\/\.][^\/])|([^\/][^\/][^\/]+))\/\.\.\//,""),a},l.prototype.resolveModule=function(o){var a=o;return I.Utilities.isAbsolutePath(a)||(I.Utilities.startsWith(a,"./")||I.Utilities.startsWith(a,"../"))&&(a=l._normalizeModuleId(this.fromModulePath+a)),a},l.ROOT=new l(""),l}();I.ModuleIdResolver=t;var M=function(){function l(o,a,E,w,d,c){this.id=o,this.strId=a,this.dependencies=E,this._callback=w,this._errorback=d,this.moduleIdResolver=c,this.exports={},this.error=null,this.exportsPassedIn=!1,this.unresolvedDependenciesCount=this.dependencies.length,this._isComplete=!1}return l._safeInvokeFunction=function(o,a){try{return{returnedValue:o.apply(I.global,a),producedError:null}}catch(E){return{returnedValue:null,producedError:E}}},l._invokeFactory=function(o,a,E,w){return o.isBuild()&&!I.Utilities.isAnonymousModule(a)?{returnedValue:null,producedError:null}:o.shouldCatchError()?this._safeInvokeFunction(E,w):{returnedValue:E.apply(I.global,w),producedError:null}},l.prototype.complete=function(o,a,E){this._isComplete=!0;var w=null;if(this._callback)if(typeof this._callback=="function"){o.record(21,this.strId);var d=l._invokeFactory(a,this.strId,this._callback,E);w=d.producedError,o.record(22,this.strId),!w&&typeof d.returnedValue!="undefined"&&(!this.exportsPassedIn||I.Utilities.isEmpty(this.exports))&&(this.exports=d.returnedValue)}else this.exports=this._callback;if(w){var c=I.ensureError(w);c.phase="factory",c.moduleId=this.strId,this.error=c,a.onError(c)}this.dependencies=null,this._callback=null,this._errorback=null,this.moduleIdResolver=null},l.prototype.onDependencyError=function(o){return this._isComplete=!0,this.error=o,this._errorback?(this._errorback(o),!0):!1},l.prototype.isComplete=function(){return this._isComplete},l}();I.Module=M;var U=function(){function l(){this._nextId=0,this._strModuleIdToIntModuleId=new Map,this._intModuleIdToStrModuleId=[],this.getModuleId("exports"),this.getModuleId("module"),this.getModuleId("require")}return l.prototype.getMaxModuleId=function(){return this._nextId},l.prototype.getModuleId=function(o){var a=this._strModuleIdToIntModuleId.get(o);return typeof a=="undefined"&&(a=this._nextId++,this._strModuleIdToIntModuleId.set(o,a),this._intModuleIdToStrModuleId[a]=o),a},l.prototype.getStrModuleId=function(o){return this._intModuleIdToStrModuleId[o]},l}(),C=function(){function l(o){this.id=o}return l.EXPORTS=new l(0),l.MODULE=new l(1),l.REQUIRE=new l(2),l}();I.RegularDependency=C;var s=function(){function l(o,a,E){this.id=o,this.pluginId=a,this.pluginParam=E}return l}();I.PluginDependency=s;var S=function(){function l(o,a,E,w,d){d===void 0&&(d=0),this._env=o,this._scriptLoader=a,this._loaderAvailableTimestamp=d,this._defineFunc=E,this._requireFunc=w,this._moduleIdProvider=new U,this._config=new I.Configuration(this._env),this._hasDependencyCycle=!1,this._modules2=[],this._knownModules2=[],this._inverseDependencies2=[],this._inversePluginDependencies2=new Map,this._currentAnnonymousDefineCall=null,this._recorder=null,this._buildInfoPath=[],this._buildInfoDefineStack=[],this._buildInfoDependencies=[]}return l.prototype.reset=function(){return new l(this._env,this._scriptLoader,this._defineFunc,this._requireFunc,this._loaderAvailableTimestamp)},l.prototype.getGlobalAMDDefineFunc=function(){return this._defineFunc},l.prototype.getGlobalAMDRequireFunc=function(){return this._requireFunc},l._findRelevantLocationInStack=function(o,a){for(var E=function(r){return r.replace(/\\/g,"/")},w=E(o),d=a.split(/\n/),c=0;c<d.length;c++){var g=d[c].match(/(.*):(\d+):(\d+)\)?$/);if(g){var b=g[1],A=g[2],_=g[3],n=Math.max(b.lastIndexOf(" ")+1,b.lastIndexOf("(")+1);if(b=b.substr(n),b=E(b),b===w){var i={line:parseInt(A,10),col:parseInt(_,10)};return i.line===1&&(i.col-="(function (require, define, __filename, __dirname) { ".length),i}}}throw new Error("Could not correlate define call site for needle "+o)},l.prototype.getBuildInfo=function(){if(!this._config.isBuild())return null;for(var o=[],a=0,E=0,w=this._modules2.length;E<w;E++){var d=this._modules2[E];if(!!d){var c=this._buildInfoPath[d.id]||null,g=this._buildInfoDefineStack[d.id]||null,b=this._buildInfoDependencies[d.id];o[a++]={id:d.strId,path:c,defineLocation:c&&g?l._findRelevantLocationInStack(c,g):null,dependencies:b,shim:null,exports:d.exports}}}return o},l.prototype.getRecorder=function(){return this._recorder||(this._config.shouldRecordStats()?this._recorder=new I.LoaderEventRecorder(this._loaderAvailableTimestamp):this._recorder=I.NullLoaderEventRecorder.INSTANCE),this._recorder},l.prototype.getLoaderEvents=function(){return this.getRecorder().getEvents()},l.prototype.enqueueDefineAnonymousModule=function(o,a){if(this._currentAnnonymousDefineCall!==null)throw new Error("Can only have one anonymous define call per script file");var E=null;this._config.isBuild()&&(E=new Error("StackLocation").stack||null),this._currentAnnonymousDefineCall={stack:E,dependencies:o,callback:a}},l.prototype.defineModule=function(o,a,E,w,d,c){var g=this;c===void 0&&(c=new t(o));var b=this._moduleIdProvider.getModuleId(o);if(this._modules2[b]){this._config.isDuplicateMessageIgnoredFor(o)||console.warn("Duplicate definition of module '"+o+"'");return}var A=new M(b,o,this._normalizeDependencies(a,c),E,w,c);this._modules2[b]=A,this._config.isBuild()&&(this._buildInfoDefineStack[b]=d,this._buildInfoDependencies[b]=(A.dependencies||[]).map(function(_){return g._moduleIdProvider.getStrModuleId(_.id)})),this._resolve(A)},l.prototype._normalizeDependency=function(o,a){if(o==="exports")return C.EXPORTS;if(o==="module")return C.MODULE;if(o==="require")return C.REQUIRE;var E=o.indexOf("!");if(E>=0){var w=a.resolveModule(o.substr(0,E)),d=a.resolveModule(o.substr(E+1)),c=this._moduleIdProvider.getModuleId(w+"!"+d),g=this._moduleIdProvider.getModuleId(w);return new s(c,g,d)}return new C(this._moduleIdProvider.getModuleId(a.resolveModule(o)))},l.prototype._normalizeDependencies=function(o,a){for(var E=[],w=0,d=0,c=o.length;d<c;d++)E[w++]=this._normalizeDependency(o[d],a);return E},l.prototype._relativeRequire=function(o,a,E,w){if(typeof a=="string")return this.synchronousRequire(a,o);this.defineModule(I.Utilities.generateAnonymousModule(),a,E,w,null,o)},l.prototype.synchronousRequire=function(o,a){a===void 0&&(a=new t(o));var E=this._normalizeDependency(o,a),w=this._modules2[E.id];if(!w)throw new Error("Check dependency list! Synchronous require cannot resolve module '"+o+"'. This is the first mention of this module!");if(!w.isComplete())throw new Error("Check dependency list! Synchronous require cannot resolve module '"+o+"'. This module has not been resolved completely yet.");if(w.error)throw w.error;return w.exports},l.prototype.configure=function(o,a){var E=this._config.shouldRecordStats();a?this._config=new I.Configuration(this._env,o):this._config=this._config.cloneAndMerge(o),this._config.shouldRecordStats()&&!E&&(this._recorder=null)},l.prototype.getConfig=function(){return this._config},l.prototype._onLoad=function(o){if(this._currentAnnonymousDefineCall!==null){var a=this._currentAnnonymousDefineCall;this._currentAnnonymousDefineCall=null,this.defineModule(this._moduleIdProvider.getStrModuleId(o),a.dependencies,a.callback,null,a.stack)}},l.prototype._createLoadError=function(o,a){var E=this,w=this._moduleIdProvider.getStrModuleId(o),d=(this._inverseDependencies2[o]||[]).map(function(g){return E._moduleIdProvider.getStrModuleId(g)}),c=I.ensureError(a);return c.phase="loading",c.moduleId=w,c.neededBy=d,c},l.prototype._onLoadError=function(o,a){var E=this._createLoadError(o,a);this._modules2[o]||(this._modules2[o]=new M(o,this._moduleIdProvider.getStrModuleId(o),[],function(){},function(){},null));for(var w=[],d=0,c=this._moduleIdProvider.getMaxModuleId();d<c;d++)w[d]=!1;var g=!1,b=[];for(b.push(o),w[o]=!0;b.length>0;){var A=b.shift(),_=this._modules2[A];_&&(g=_.onDependencyError(E)||g);var n=this._inverseDependencies2[A];if(n)for(var d=0,c=n.length;d<c;d++){var i=n[d];w[i]||(b.push(i),w[i]=!0)}}g||this._config.onError(E)},l.prototype._hasDependencyPath=function(o,a){var E=this._modules2[o];if(!E)return!1;for(var w=[],d=0,c=this._moduleIdProvider.getMaxModuleId();d<c;d++)w[d]=!1;var g=[];for(g.push(E),w[o]=!0;g.length>0;){var b=g.shift(),A=b.dependencies;if(A)for(var d=0,c=A.length;d<c;d++){var _=A[d];if(_.id===a)return!0;var n=this._modules2[_.id];n&&!w[_.id]&&(w[_.id]=!0,g.push(n))}}return!1},l.prototype._findCyclePath=function(o,a,E){if(o===a||E===50)return[o];var w=this._modules2[o];if(!w)return null;var d=w.dependencies;if(d)for(var c=0,g=d.length;c<g;c++){var b=this._findCyclePath(d[c].id,a,E+1);if(b!==null)return b.push(o),b}return null},l.prototype._createRequire=function(o){var a=this,E=function(w,d,c){return a._relativeRequire(o,w,d,c)};return E.toUrl=function(w){return a._config.requireToUrl(o.resolveModule(w))},E.getStats=function(){return a.getLoaderEvents()},E.hasDependencyCycle=function(){return a._hasDependencyCycle},E.config=function(w,d){d===void 0&&(d=!1),a.configure(w,d)},E.__$__nodeRequire=I.global.nodeRequire,E},l.prototype._loadModule=function(o){var a=this;if(!(this._modules2[o]||this._knownModules2[o])){this._knownModules2[o]=!0;var E=this._moduleIdProvider.getStrModuleId(o),w=this._config.moduleIdToPaths(E),d=/^@[^\/]+\/[^\/]+$/;this._env.isNode&&(E.indexOf("/")===-1||d.test(E))&&w.push("node|"+E);var c=-1,g=function(b){if(c++,c>=w.length)a._onLoadError(o,b);else{var A=w[c],_=a.getRecorder();if(a._config.isBuild()&&A==="empty:"){a._buildInfoPath[o]=A,a.defineModule(a._moduleIdProvider.getStrModuleId(o),[],null,null,null),a._onLoad(o);return}_.record(10,A),a._scriptLoader.load(a,A,function(){a._config.isBuild()&&(a._buildInfoPath[o]=A),_.record(11,A),a._onLoad(o)},function(n){_.record(12,A),g(n)})}};g(null)}},l.prototype._loadPluginDependency=function(o,a){var E=this;if(!(this._modules2[a.id]||this._knownModules2[a.id])){this._knownModules2[a.id]=!0;var w=function(d){E.defineModule(E._moduleIdProvider.getStrModuleId(a.id),[],d,null,null)};w.error=function(d){E._config.onError(E._createLoadError(a.id,d))},o.load(a.pluginParam,this._createRequire(t.ROOT),w,this._config.getOptionsLiteral())}},l.prototype._resolve=function(o){var a=this,E=o.dependencies;if(E)for(var w=0,d=E.length;w<d;w++){var c=E[w];if(c===C.EXPORTS){o.exportsPassedIn=!0,o.unresolvedDependenciesCount--;continue}if(c===C.MODULE){o.unresolvedDependenciesCount--;continue}if(c===C.REQUIRE){o.unresolvedDependenciesCount--;continue}var g=this._modules2[c.id];if(g&&g.isComplete()){if(g.error){o.onDependencyError(g.error);return}o.unresolvedDependenciesCount--;continue}if(this._hasDependencyPath(c.id,o.id)){this._hasDependencyCycle=!0,console.warn("There is a dependency cycle between '"+this._moduleIdProvider.getStrModuleId(c.id)+"' and '"+this._moduleIdProvider.getStrModuleId(o.id)+"'. The cyclic path follows:");var b=this._findCyclePath(c.id,o.id,0)||[];b.reverse(),b.push(c.id),console.warn(b.map(function(n){return a._moduleIdProvider.getStrModuleId(n)}).join(` => `)),o.unresolvedDependenciesCount--;continue}if(this._inverseDependencies2[c.id]=this._inverseDependencies2[c.id]||[],this._inverseDependencies2[c.id].push(o.id),c instanceof s){var A=this._modules2[c.pluginId];if(A&&A.isComplete()){this._loadPluginDependency(A.exports,c);continue}var _=this._inversePluginDependencies2.get(c.pluginId);_||(_=[],this._inversePluginDependencies2.set(c.pluginId,_)),_.push(c),this._loadModule(c.pluginId);continue}this._loadModule(c.id)}o.unresolvedDependenciesCount===0&&this._onModuleComplete(o)},l.prototype._onModuleComplete=function(o){var a=this,E=this.getRecorder();if(!o.isComplete()){var w=o.dependencies,d=[];if(w)for(var c=0,g=w.length;c<g;c++){var b=w[c];if(b===C.EXPORTS){d[c]=o.exports;continue}if(b===C.MODULE){d[c]={id:o.strId,config:function(){return a._config.getConfigForModule(o.strId)}};continue}if(b===C.REQUIRE){d[c]=this._createRequire(o.moduleIdResolver);continue}var A=this._modules2[b.id];if(A){d[c]=A.exports;continue}d[c]=null}o.complete(E,this._config,d);var _=this._inverseDependencies2[o.id];if(this._inverseDependencies2[o.id]=null,_)for(var c=0,g=_.length;c<g;c++){var n=_[c],i=this._modules2[n];i.unresolvedDependenciesCount--,i.unresolvedDependenciesCount===0&&this._onModuleComplete(i)}var r=this._inversePluginDependencies2.get(o.id);if(r){this._inversePluginDependencies2.delete(o.id);for(var c=0,g=r.length;c<g;c++)this._loadPluginDependency(o.exports,r[c])}}},l}();I.ModuleManager=S})(ee||(ee={}));var z,ee;(function(I){var t=new I.Environment,M=null,U=function(l,o,a){typeof l!="string"&&(a=o,o=l,l=null),(typeof o!="object"||!Array.isArray(o))&&(a=o,o=null),o||(o=["require","exports","module"]),l?M.defineModule(l,o,a,null,null):M.enqueueDefineAnonymousModule(o,a)};U.amd={jQuery:!0};var C=function(l,o){o===void 0&&(o=!1),M.configure(l,o)},s=function(){if(arguments.length===1){if(arguments[0]instanceof Object&&!Array.isArray(arguments[0])){C(arguments[0]);return}if(typeof arguments[0]=="string")return M.synchronousRequire(arguments[0])}if((arguments.length===2||arguments.length===3)&&Array.isArray(arguments[0])){M.defineModule(I.Utilities.generateAnonymousModule(),arguments[0],arguments[1],arguments[2],null);return}throw new Error("Unrecognized require call")};s.config=C,s.getConfig=function(){return M.getConfig().getOptionsLiteral()},s.reset=function(){M=M.reset()},s.getBuildInfo=function(){return M.getBuildInfo()},s.getStats=function(){return M.getLoaderEvents()},s.define=function(){return U.apply(null,arguments)};function S(){if(typeof I.global.require!="undefined"||typeof require!="undefined"){var l=I.global.require||require;if(typeof l=="function"&&typeof l.resolve=="function"){var o=I.ensureRecordedNodeRequire(M.getRecorder(),l);I.global.nodeRequire=o,s.nodeRequire=o,s.__$__nodeRequire=o}}t.isNode&&!t.isElectronRenderer?(module.exports=s,require=s):(t.isElectronRenderer||(I.global.define=U),I.global.require=s)}I.init=S,(typeof I.global.define!="function"||!I.global.define.amd)&&(M=new I.ModuleManager(t,I.createScriptLoader(t),U,s,I.Utilities.getHighPerformanceTimestamp()),typeof I.global.require!="undefined"&&typeof I.global.require!="function"&&s.config(I.global.require),z=function(){return U.apply(null,arguments)},z.amd=U.amd,typeof doNotInitLoader=="undefined"&&S())})(ee||(ee={}));var Se=this,de;(function(I){var t=Se||{},M=t.Plugin&&t.Plugin.Resources?t.Plugin.Resources:void 0,U=t&&t.document&&t.document.location&&t.document.location.hash.indexOf("pseudo=true")>=0;function C(a,E){var w;return E.length===0?w=a:w=a.replace(/\{(\d+)\}/g,function(d,c){var g=c[0];return typeof E[g]!="undefined"?E[g]:d}),U&&(w="\uFF3B"+w.replace(/[aouei]/g,"$&$&")+"\uFF3D"),w}function s(a,E){var w=a[E];return w||(w=a["*"],w)?w:null}function S(a,E){for(var w=[],d=0;d<arguments.length-2;d++)w[d]=arguments[d+2];return C(E,w)}function l(a){return function(E,w){var d=Array.prototype.slice.call(arguments,2);return C(a[E],d)}}var o=function(){function a(){this.localize=S}return a.prototype.setPseudoTranslation=function(E){U=E},a.prototype.create=function(E,w){return{localize:l(w[E])}},a.prototype.load=function(E,w,d,c){if(c=c||{},!E||E.length===0)d({localize:S});else{var g=void 0;if(M&&M.getString)g=".nls.keys",w([E+g],function(_){d({localize:function(n,i){if(!_[n])return"NLS error: unknown key "+n;var r=_[n].keys;if(i>=r.length)return"NLS error unknow index "+i;var u=r[i],f=[];f[0]=n+"_"+u;for(var v=0;v<arguments.length-2;v++)f[v+1]=arguments[v+2];return M.getString.apply(M,f)}})});else if(c.isBuild)w([E+".nls",E+".nls.keys"],function(_,n){a.BUILD_MAP[E]=_,a.BUILD_MAP_KEYS[E]=n,d(_)});else{var b=c["vs/nls"]||{},A=b.availableLanguages?s(b.availableLanguages,E):null;g=".nls",A!==null&&A!==a.DEFAULT_TAG&&(g=g+"."+A),w([E+g],function(_){Array.isArray(_)?_.localize=l(_):_.localize=l(_[E]),d(_)})}}},a.prototype._getEntryPointsMap=function(){return t.nlsPluginEntryPoints=t.nlsPluginEntryPoints||{},t.nlsPluginEntryPoints},a.prototype.write=function(E,w,d){var c=d.getEntryPoint(),g=this._getEntryPointsMap();g[c]=g[c]||[],g[c].push(w),w!==c&&d.asModule(E+"!"+w,"define(['vs/nls', 'vs/nls!"+c+`'], function(nls, data) { return nls.create("`+w+'", data); });')},a.prototype.writeFile=function(E,w,d,c,g){var b=this._getEntryPointsMap();if(b.hasOwnProperty(w)){for(var A=d.toUrl(w+".nls.js"),_=["/*---------------------------------------------------------"," * Copyright (c) Microsoft Corporation. All rights reserved."," *--------------------------------------------------------*/"],n=b[w],i={},r=0;r<n.length;r++)i[n[r]]=a.BUILD_MAP[n[r]];_.push('define("'+w+'.nls", '+JSON.stringify(i,null," ")+");"),c(A,_.join(`\r `))}},a.prototype.finishBuild=function(E){E("nls.metadata.json",JSON.stringify({keys:a.BUILD_MAP_KEYS,messages:a.BUILD_MAP,bundles:this._getEntryPointsMap()},null," "))},a.DEFAULT_TAG="i-default",a.BUILD_MAP={},a.BUILD_MAP_KEYS={},a}();I.NLSPlugin=o,function(){z("vs/nls",new o)}()})(de||(de={})),z(G[15],Q([0,1]),function(I,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DiffChange=void 0;class M{constructor(C,s,S,l){this.originalStart=C,this.originalLength=s,this.modifiedStart=S,this.modifiedLength=l}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}}t.DiffChange=M}),z(G[4],Q([0,1]),function(I,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createErrorWithActions=t.isErrorWithActions=t.ExpectedError=t.NotSupportedError=t.NotImplementedError=t.getErrorMessage=t.disposed=t.readonly=t.illegalState=t.illegalArgument=t.canceled=t.CancellationError=t.isPromiseCanceledError=t.transformErrorForSerialization=t.onUnexpectedExternalError=t.onUnexpectedError=t.setUnexpectedErrorHandler=t.errorHandler=t.ErrorHandler=void 0;class M{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(f){setTimeout(()=>{throw f.stack?new Error(f.message+` `+f.stack):f},0)}}addListener(f){return this.listeners.push(f),()=>{this._removeListener(f)}}emit(f){this.listeners.forEach(v=>{v(f)})}_removeListener(f){this.listeners.splice(this.listeners.indexOf(f),1)}setUnexpectedErrorHandler(f){this.unexpectedErrorHandler=f}getUnexpectedErrorHandler(){return this.unexpectedErrorHandler}onUnexpectedError(f){this.unexpectedErrorHandler(f),this.emit(f)}onUnexpectedExternalError(f){this.unexpectedErrorHandler(f)}}t.ErrorHandler=M,t.errorHandler=new M;function U(u){t.errorHandler.setUnexpectedErrorHandler(u)}t.setUnexpectedErrorHandler=U;function C(u){o(u)||t.errorHandler.onUnexpectedError(u)}t.onUnexpectedError=C;function s(u){o(u)||t.errorHandler.onUnexpectedExternalError(u)}t.onUnexpectedExternalError=s;function S(u){if(u instanceof Error){let{name:f,message:v}=u;const h=u.stacktrace||u.stack;return{$isError:!0,name:f,message:v,stack:h}}return u}t.transformErrorForSerialization=S;const l="Canceled";function o(u){return u instanceof Error&&u.name===l&&u.message===l}t.isPromiseCanceledError=o;class a extends Error{constructor(){super(l);this.name=this.message}}t.CancellationError=a;function E(){const u=new Error(l);return u.name=u.message,u}t.canceled=E;function w(u){return u?new Error(`Illegal argument: ${u}`):new Error("Illegal argument")}t.illegalArgument=w;function d(u){return u?new Error(`Illegal state: ${u}`):new Error("Illegal state")}t.illegalState=d;function c(u){return u?new Error(`readonly property '${u} cannot be changed'`):new Error("readonly property cannot be changed")}t.readonly=c;function g(u){const f=new Error(`${u} has been disposed`);return f.name="DISPOSED",f}t.disposed=g;function b(u){return u?u.message?u.message:u.stack?u.stack.split(` `)[0]:String(u):"Error"}t.getErrorMessage=b;class A extends Error{constructor(f){super("NotImplemented");f&&(this.message=f)}}t.NotImplementedError=A;class _ extends Error{constructor(f){super("NotSupported");f&&(this.message=f)}}t.NotSupportedError=_;class n extends Error{constructor(){super(...arguments);this.isExpected=!0}}t.ExpectedError=n;function i(u){const f=u;return f instanceof Error&&Array.isArray(f.actions)}t.isErrorWithActions=i;function r(u,f=Object.create(null)){const v=new Error(u);return f.actions&&(v.actions=f.actions),v}t.createErrorWithActions=r}),z(G[7],Q([0,1]),function(I,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.once=void 0;function M(U){const C=this;let s=!1,S;return function(){return s||(s=!0,S=U.apply(C,arguments)),S}}t.once=M}),z(G[16],Q([0,1]),function(I,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Iterable=void 0;var M;(function(U){function C(u){return u&&typeof u=="object"&&typeof u[Symbol.iterator]=="function"}U.is=C;const s=Object.freeze([]);function S(){return s}U.empty=S;function*l(u){yield u}U.single=l;function o(u){return u||s}U.from=o;function a(u){return!u||u[Symbol.iterator]().next().done===!0}U.isEmpty=a;function E(u){return u[Symbol.iterator]().next().value}U.first=E;function w(u,f){for(const v of u)if(f(v))return!0;return!1}U.some=w;function d(u,f){for(const v of u)if(f(v))return v}U.find=d;function*c(u,f){for(const v of u)f(v)&&(yield v)}U.filter=c;function*g(u,f){let v=0;for(const h of u)yield f(h,v++)}U.map=g;function*b(...u){for(const f of u)for(const v of f)yield v}U.concat=b;function*A(u){for(const f of u)for(const v of f)yield v}U.concatNested=A;function _(u,f,v){let h=v;for(const m of u)h=f(h,m);return h}U.reduce=_;function*n(u,f,v=u.length){for(f<0&&(f+=u.length),v<0?v+=u.length:v>u.length&&(v=u.length);f<v;f++)yield u[f]}U.slice=n;function i(u,f=Number.POSITIVE_INFINITY){const v=[];if(f===0)return[v,u];const h=u[Symbol.iterator]();for(let m=0;m<f;m++){const N=h.next();if(N.done)return[v,U.empty()];v.push(N.value)}return[v,{[Symbol.iterator](){return h}}]}U.consume=i;function r(u,f,v=(h,m)=>h===m){const h=u[Symbol.iterator](),m=f[Symbol.iterator]();for(;;){const N=h.next(),p=m.next();if(N.done!==p.done)return!1;if(N.done)return!0;if(!v(N.value,p.value))return!1}}U.equals=r})(M=t.Iterable||(t.Iterable={}))}),z(G[17],Q([0,1,4]),function(I,t,M){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ResolvedKeybinding=t.ResolvedKeybindingPart=t.ChordKeybinding=t.SimpleKeybinding=t.createSimpleKeybinding=t.createKeybinding=t.KeyChord=t.KeyMod=t.KeyCodeUtils=t.KeyCode=void 0;var U;(function(n){n[n.DependsOnKbLayout=-1]="DependsOnKbLayout",n[n.Unknown=0]="Unknown",n[n.Backspace=1]="Backspace",n[n.Tab=2]="Tab",n[n.Enter=3]="Enter",n[n.Shift=4]="Shift",n[n.Ctrl=5]="Ctrl",n[n.Alt=6]="Alt",n[n.PauseBreak=7]="PauseBreak",n[n.CapsLock=8]="CapsLock",n[n.Escape=9]="Escape",n[n.Space=10]="Space",n[n.PageUp=11]="PageUp",n[n.PageDown=12]="PageDown",n[n.End=13]="End",n[n.Home=14]="Home",n[n.LeftArrow=15]="LeftArrow",n[n.UpArrow=16]="UpArrow",n[n.RightArrow=17]="RightArrow",n[n.DownArrow=18]="DownArrow",n[n.Insert=19]="Insert",n[n.Delete=20]="Delete",n[n.KEY_0=21]="KEY_0",n[n.KEY_1=22]="KEY_1",n[n.KEY_2=23]="KEY_2",n[n.KEY_3=24]="KEY_3",n[n.KEY_4=25]="KEY_4",n[n.KEY_5=26]="KEY_5",n[n.KEY_6=27]="KEY_6",n[n.KEY_7=28]="KEY_7",n[n.KEY_8=29]="KEY_8",n[n.KEY_9=30]="KEY_9",n[n.KEY_A=31]="KEY_A",n[n.KEY_B=32]="KEY_B",n[n.KEY_C=33]="KEY_C",n[n.KEY_D=34]="KEY_D",n[n.KEY_E=35]="KEY_E",n[n.KEY_F=36]="KEY_F",n[n.KEY_G=37]="KEY_G",n[n.KEY_H=38]="KEY_H",n[n.KEY_I=39]="KEY_I",n[n.KEY_J=40]="KEY_J",n[n.KEY_K=41]="KEY_K",n[n.KEY_L=42]="KEY_L",n[n.KEY_M=43]="KEY_M",n[n.KEY_N=44]="KEY_N",n[n.KEY_O=45]="KEY_O",n[n.KEY_P=46]="KEY_P",n[n.KEY_Q=47]="KEY_Q",n[n.KEY_R=48]="KEY_R",n[n.KEY_S=49]="KEY_S",n[n.KEY_T=50]="KEY_T",n[n.KEY_U=51]="KEY_U",n[n.KEY_V=52]="KEY_V",n[n.KEY_W=53]="KEY_W",n[n.KEY_X=54]="KEY_X",n[n.KEY_Y=55]="KEY_Y",n[n.KEY_Z=56]="KEY_Z",n[n.Meta=57]="Meta",n[n.ContextMenu=58]="ContextMenu",n[n.F1=59]="F1",n[n.F2=60]="F2",n[n.F3=61]="F3",n[n.F4=62]="F4",n[n.F5=63]="F5",n[n.F6=64]="F6",n[n.F7=65]="F7",n[n.F8=66]="F8",n[n.F9=67]="F9",n[n.F10=68]="F10",n[n.F11=69]="F11",n[n.F12=70]="F12",n[n.F13=71]="F13",n[n.F14=72]="F14",n[n.F15=73]="F15",n[n.F16=74]="F16",n[n.F17=75]="F17",n[n.F18=76]="F18",n[n.F19=77]="F19",n[n.NumLock=78]="NumLock",n[n.ScrollLock=79]="ScrollLock",n[n.US_SEMICOLON=80]="US_SEMICOLON",n[n.US_EQUAL=81]="US_EQUAL",n[n.US_COMMA=82]="US_COMMA",n[n.US_MINUS=83]="US_MINUS",n[n.US_DOT=84]="US_DOT",n[n.US_SLASH=85]="US_SLASH",n[n.US_BACKTICK=86]="US_BACKTICK",n[n.US_OPEN_SQUARE_BRACKET=87]="US_OPEN_SQUARE_BRACKET",n[n.US_BACKSLASH=88]="US_BACKSLASH",n[n.US_CLOSE_SQUARE_BRACKET=89]="US_CLOSE_SQUARE_BRACKET",n[n.US_QUOTE=90]="US_QUOTE",n[n.OEM_8=91]="OEM_8",n[n.OEM_102=92]="OEM_102",n[n.NUMPAD_0=93]="NUMPAD_0",n[n.NUMPAD_1=94]="NUMPAD_1",n[n.NUMPAD_2=95]="NUMPAD_2",n[n.NUMPAD_3=96]="NUMPAD_3",n[n.NUMPAD_4=97]="NUMPAD_4",n[n.NUMPAD_5=98]="NUMPAD_5",n[n.NUMPAD_6=99]="NUMPAD_6",n[n.NUMPAD_7=100]="NUMPAD_7",n[n.NUMPAD_8=101]="NUMPAD_8",n[n.NUMPAD_9=102]="NUMPAD_9",n[n.NUMPAD_MULTIPLY=103]="NUMPAD_MULTIPLY",n[n.NUMPAD_ADD=104]="NUMPAD_ADD",n[n.NUMPAD_SEPARATOR=105]="NUMPAD_SEPARATOR",n[n.NUMPAD_SUBTRACT=106]="NUMPAD_SUBTRACT",n[n.NUMPAD_DECIMAL=107]="NUMPAD_DECIMAL",n[n.NUMPAD_DIVIDE=108]="NUMPAD_DIVIDE",n[n.KEY_IN_COMPOSITION=109]="KEY_IN_COMPOSITION",n[n.ABNT_C1=110]="ABNT_C1",n[n.ABNT_C2=111]="ABNT_C2",n[n.MAX_VALUE=112]="MAX_VALUE"})(U=t.KeyCode||(t.KeyCode={}));class C{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(i,r){this._keyCodeToStr[i]=r,this._strToKeyCode[r.toLowerCase()]=i}keyCodeToStr(i){return this._keyCodeToStr[i]}strToKeyCode(i){return this._strToKeyCode[i.toLowerCase()]||0}}const s=new C,S=new C,l=new C;(function(){function n(i,r,u=r,f=u){s.define(i,r),S.define(i,u),l.define(i,f)}n(0,"unknown"),n(1,"Backspace"),n(2,"Tab"),n(3,"Enter"),n(4,"Shift"),n(5,"Ctrl"),n(6,"Alt"),n(7,"PauseBreak"),n(8,"CapsLock"),n(9,"Escape"),n(10,"Space"),n(11,"PageUp"),n(12,"PageDown"),n(13,"End"),n(14,"Home"),n(15,"LeftArrow","Left"),n(16,"UpArrow","Up"),n(17,"RightArrow","Right"),n(18,"DownArrow","Down"),n(19,"Insert"),n(20,"Delete"),n(21,"0"),n(22,"1"),n(23,"2"),n(24,"3"),n(25,"4"),n(26,"5"),n(27,"6"),n(28,"7"),n(29,"8"),n(30,"9"),n(31,"A"),n(32,"B"),n(33,"C"),n(34,"D"),n(35,"E"),n(36,"F"),n(37,"G"),n(38,"H"),n(39,"I"),n(40,"J"),n(41,"K"),n(42,"L"),n(43,"M"),n(44,"N"),n(45,"O"),n(46,"P"),n(47,"Q"),n(48,"R"),n(49,"S"),n(50,"T"),n(51,"U"),n(52,"V"),n(53,"W"),n(54,"X"),n(55,"Y"),n(56,"Z"),n(57,"Meta"),n(58,"ContextMenu"),n(59,"F1"),n(60,"F2"),n(61,"F3"),n(62,"F4"),n(63,"F5"),n(64,"F6"),n(65,"F7"),n(66,"F8"),n(67,"F9"),n(68,"F10"),n(69,"F11"),n(70,"F12"),n(71,"F13"),n(72,"F14"),n(73,"F15"),n(74,"F16"),n(75,"F17"),n(76,"F18"),n(77,"F19"),n(78,"NumLock"),n(79,"ScrollLock"),n(80,";",";","OEM_1"),n(81,"=","=","OEM_PLUS"),n(82,",",",","OEM_COMMA"),n(83,"-","-","OEM_MINUS"),n(84,".",".","OEM_PERIOD"),n(85,"/","/","OEM_2"),n(86,"`","`","OEM_3"),n(110,"ABNT_C1"),n(111,"ABNT_C2"),n(87,"[","[","OEM_4"),n(88,"\\","\\","OEM_5"),n(89,"]","]","OEM_6"),n(90,"'","'","OEM_7"),n(91,"OEM_8"),n(92,"OEM_102"),n(93,"NumPad0"),n(94,"NumPad1"),n(95,"NumPad2"),n(96,"NumPad3"),n(97,"NumPad4"),n(98,"NumPad5"),n(99,"NumPad6"),n(100,"NumPad7"),n(101,"NumPad8"),n(102,"NumPad9"),n(103,"NumPad_Multiply"),n(104,"NumPad_Add"),n(105,"NumPad_Separator"),n(106,"NumPad_Subtract"),n(107,"NumPad_Decimal"),n(108,"NumPad_Divide")})();var o;(function(n){function i(h){return s.keyCodeToStr(h)}n.toString=i;function r(h){return s.strToKeyCode(h)}n.fromString=r;function u(h){return S.keyCodeToStr(h)}n.toUserSettingsUS=u;function f(h){return l.keyCodeToStr(h)}n.toUserSettingsGeneral=f;function v(h){return S.strToKeyCode(h)||l.strToKeyCode(h)}n.fromUserSettings=v})(o=t.KeyCodeUtils||(t.KeyCodeUtils={}));var a;(function(n){n[n.CtrlCmd=2048]="CtrlCmd",n[n.Shift=1024]="Shift",n[n.Alt=512]="Alt",n[n.WinCtrl=256]="WinCtrl",n[n.KeyCode=255]="KeyCode"})(a||(a={}));var E;(function(n){n[n.CtrlCmd=2048]="CtrlCmd",n[n.Shift=1024]="Shift",n[n.Alt=512]="Alt",n[n.WinCtrl=256]="WinCtrl"})(E=t.KeyMod||(t.KeyMod={}));function w(n,i){const r=(i&65535)<<16>>>0;return(n|r)>>>0}t.KeyChord=w;function d(n,i){if(n===0)return null;const r=(n&65535)>>>0,u=(n&4294901760)>>>16;return u!==0?new b([c(r,i),c(u,i)]):new b([c(r,i)])}t.createKeybinding=d;function c(n,i){const r=!!(n&2048),u=!!(n&256),f=i===2?u:r,v=!!(n&1024),h=!!(n&512),m=i===2?r:u,N=n&255;return new g(f,v,h,m,N)}t.createSimpleKeybinding=c;class g{constructor(i,r,u,f,v){this.ctrlKey=i,this.shiftKey=r,this.altKey=u,this.metaKey=f,this.keyCode=v}equals(i){return this.ctrlKey===i.ctrlKey&&this.shiftKey===i.shiftKey&&this.altKey===i.altKey&&this.metaKey===i.metaKey&&this.keyCode===i.keyCode}getHashCode(){const i=this.ctrlKey?"1":"0",r=this.shiftKey?"1":"0",u=this.altKey?"1":"0",f=this.metaKey?"1":"0";return`${i}${r}${u}${f}${this.keyCode}`}isModifierKey(){return this.keyCode===0||this.keyCode===5||this.keyCode===57||this.keyCode===6||this.keyCode===4}toChord(){return new b([this])}isDuplicateModifierCase(){return this.ctrlKey&&this.keyCode===5||this.shiftKey&&this.keyCode===4||this.altKey&&this.keyCode===6||this.metaKey&&this.keyCode===57}}t.SimpleKeybinding=g;class b{constructor(i){if(i.length===0)throw M.illegalArgument("parts");this.parts=i}getHashCode(){let i="";for(let r=0,u=this.parts.length;r<u;r++)r!==0&&(i+=";"),i+=this.parts[r].getHashCode();return i}equals(i){if(i===null||this.parts.length!==i.parts.length)return!1;for(let r=0;r<this.parts.length;r++)if(!this.parts[r].equals(i.parts[r]))return!1;return!0}}t.ChordKeybinding=b;class A{constructor(i,r,u,f,v,h){this.ctrlKey=i,this.shiftKey=r,this.altKey=u,this.metaKey=f,this.keyLabel=v,this.keyAriaLabel=h}}t.ResolvedKeybindingPart=A;class _{}t.ResolvedKeybinding=_}),z(G[8],Q([0,1,7,16]),function(I,t,M,U){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImmortalReference=t.ReferenceCollection=t.MutableDisposable=t.Disposable=t.DisposableStore=t.toDisposable=t.combinedDisposable=t.dispose=t.isDisposable=t.MultiDisposeError=t.trackDisposable=t.setDisposableTracker=void 0;const C=!1;let s=null;function S(i){s=i}if(t.setDisposableTracker=S,C){const i="__is_disposable_tracked__";s=new class{trackDisposable(r){const u=new Error("Potentially leaked disposable").stack;setTimeout(()=>{r[i]||console.log(u)},3e3)}markTracked(r){if(r&&r!==b.None)try{r[i]=!0}catch(u){}}}}function l(i){!s||s.markTracked(i)}function o(i){return s&&s.trackDisposable(i),i}t.trackDisposable=o;class a extends Error{constructor(r){super(`Encountered errors while disposing of store. Errors: [${r.join(", ")}]`);this.errors=r}}t.MultiDisposeError=a;function E(i){return typeof i.dispose=="function"&&i.dispose.length===0}t.isDisposable=E;function w(i){if(U.Iterable.is(i)){let r=[];for(const u of i)if(u){l(u);try{u.dispose()}catch(f){r.push(f)}}if(r.length===1)throw r[0];if(r.length>1)throw new a(r);return Array.isArray(i)?[]:i}else if(i)return l(i),i.dispose(),i}t.dispose=w;function d(...i){return i.forEach(l),c(()=>w(i))}t.combinedDisposable=d;function c(i){const r=o({dispose:()=>{l(r),i()}});return r}t.toDisposable=c;class g{constructor(){this._toDispose=new Set,this._isDisposed=!1}dispose(){this._isDisposed||(l(this),this._isDisposed=!0,this.clear())}clear(){try{w(this._toDispose.values())}finally{this._toDispose.clear()}}add(r){if(!r)return r;if(r===this)throw new Error("Cannot register a disposable on itself!");return l(r),this._isDisposed?g.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").