9 lines
32 KiB
JavaScript
9 lines
32 KiB
JavaScript
|
"use strict";/*!-----------------------------------------------------------
|
||
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||
|
* Version: 0.32.1(8ad5e3bceab16a4d0856c43a374b511dffb1e795)
|
||
|
* Released under the MIT license
|
||
|
* https://github.com/microsoft/vscode/blob/main/LICENSE.txt
|
||
|
*-----------------------------------------------------------*/var _amdLoaderGlobal=this,_commonjsGlobal=typeof global=="object"?global:{},AMDLoader;(function(l){l.global=_amdLoaderGlobal;var E=function(){function v(){this._detected=!1,this._isWindows=!1,this._isNode=!1,this._isElectronRenderer=!1,this._isWebWorker=!1,this._isElectronNodeIntegrationWebWorker=!1}return Object.defineProperty(v.prototype,"isWindows",{get:function(){return this._detect(),this._isWindows},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"isNode",{get:function(){return this._detect(),this._isNode},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"isElectronRenderer",{get:function(){return this._detect(),this._isElectronRenderer},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"isWebWorker",{get:function(){return this._detect(),this._isWebWorker},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"isElectronNodeIntegrationWebWorker",{get:function(){return this._detect(),this._isElectronNodeIntegrationWebWorker},enumerable:!1,configurable:!0}),v.prototype._detect=function(){this._detected||(this._detected=!0,this._isWindows=v._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 l.global.importScripts=="function",this._isElectronNodeIntegrationWebWorker=this._isWebWorker&&typeof process!="undefined"&&typeof process.versions!="undefined"&&typeof process.versions.electron!="undefined"&&process.type==="worker")},v._isWindows=function(){return typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.indexOf("Windows")>=0?!0:typeof process!="undefined"?process.platform==="win32":!1},v}();l.Environment=E})(AMDLoader||(AMDLoader={}));var AMDLoader;(function(l){var E=function(){function a(n,_,s){this.type=n,this.detail=_,this.timestamp=s}return a}();l.LoaderEvent=E;var v=function(){function a(n){this._events=[new E(1,"",n)]}return a.prototype.record=function(n,_){this._events.push(new E(n,_,l.Utilities.getHighPerformanceTimestamp()))},a.prototype.getEvents=function(){return this._events},a}();l.LoaderEventRecorder=v;var g=function(){function a(){}return a.prototype.record=function(n,_){},a.prototype.getEvents=function(){return[]},a.INSTANCE=new a,a}();l.NullLoaderEventRecorder=g})(AMDLoader||(AMDLoader={}));var AMDLoader;(function(l){var E=function(){function v(){}return v.fileUriToFilePath=function(g,a){if(a=decodeURI(a).replace(/%23/g,"#"),g){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},v.startsWith=function(g,a){return g.length>=a.length&&g.substr(0,a.length)===a},v.endsWith=function(g,a){return g.length>=a.length&&g.substr(g.length-a.length)===a},v.containsQueryString=function(g){return/^[^\#]*\?/gi.test(g)},v.isAbsolutePath=function(g){return/^((http:\/\/)|(https:\/\/)|(file:\/\/)|(\/))/.test(g)},v.forEachProperty=function(g,a){if(g){var n=void 0;for(n in g)g.hasOwnProperty(n)&&a(n,g[n])}},v.isEmpty=function(g){var a=!0;return v.forEachProperty(g,function(){a=!1}),a},v.recursiveClone=function(g){if(!g||typeof g!="object"||g instanceof RegExp||!Array.isArray(g)&&Object.getPrototypeOf(g)!==Object.prototype)return g;var a=Array.isArray(g)?[]:{};return v.forEachProperty(g,function(n,_){_&&typeof _=="object"?a[n]=v.recursiveClone(_):a[n]=_}),a},v.generateAnonymousModule=function(){return"===anonymous"+v.NEXT_ANONYMOUS_ID+++"==="},v.isAnonymousModule=function(g){return v.startsWith(g,"===anonymous")},v.getHighPerformanceTimestamp=function(){return this.PERFORMANCE_NOW_PROBED||(this.PERFORMANCE_NOW_PROBED=!0,this.HAS_PERFORMANCE_NOW=l.global.performance&&typeof l.global.performance.now=="function"),this.HAS_PERFORMANCE_NOW?l.global.performance.now():Date.now()},v.NEXT_ANONYMOUS_ID=1,v.PERFORMANCE_NOW_PROBED=!1,v.HAS_PERFORMANCE_NOW=!1,v}();l.Utilities=E})(AMDLoader||(AMDL
|
||
|
//# sourceURL=`+r;var m=d?self.eval(d.createScript("",h)):new Function(h);m.call(self),i()}).then(void 0,o);return}try{d&&(r=d.createScriptURL(r)),importScripts(r),i()}catch(h){o(h)}}},e}(),n=function(){function e(t){this._env=t,this._didInitialize=!1,this._didPatchNodeRequire=!1}return e.prototype._init=function(t){this._didInitialize||(this._didInitialize=!0,this._fs=t("fs"),this._vm=t("vm"),this._path=t("path"),this._crypto=t("crypto"))},e.prototype._initNodeRequire=function(t,r){var i=r.getConfig().getOptionsLiteral().nodeCachedData;if(!i||this._didPatchNodeRequire)return;this._didPatchNodeRequire=!0;var o=this,u=t("module");function c(f){var p=f.constructor,d=function(h){try{return f.require(h)}finally{}};return d.resolve=function(h,m){return p._resolveFilename(h,f,!1,m)},d.resolve.paths=function(h){return p._resolveLookupPaths(h,f)},d.main=process.mainModule,d.extensions=p._extensions,d.cache=p._cache,d}u.prototype._compile=function(f,p){var d=u.wrap(f.replace(/^#!.*/,"")),y=r.getRecorder(),h=o._getCachedDataPath(i,p),m={filename:p},P;try{var I=o._fs.readFileSync(h);P=I.slice(0,16),m.cachedData=I.slice(16),y.record(60,h)}catch{y.record(61,h)}var b=new o._vm.Script(d,m),R=b.runInThisContext(m),U=o._path.dirname(p),w=c(this),O=[this.exports,w,this,p,U,process,_commonjsGlobal,Buffer],C=R.apply(this.exports,O);return o._handleCachedData(b,d,h,!m.cachedData,r),o._verifyCachedData(b,d,h,P,r),C}},e.prototype.load=function(t,r,i,o){var u=this,c=t.getConfig().getOptionsLiteral(),f=_(t.getRecorder(),c.nodeRequire||l.global.nodeRequire),p=c.nodeInstrumenter||function(R){return R};this._init(f),this._initNodeRequire(f,t);var d=t.getRecorder();if(/^node\|/.test(r)){var y=r.split("|"),h=null;try{h=f(y[1])}catch(R){o(R);return}t.enqueueDefineAnonymousModule([],function(){return h}),i()}else{r=l.Utilities.fileUriToFilePath(this._env.isWindows,r);var m=this._path.normalize(r),P=this._getElectronRendererScriptPathOrUri(m),I=Boolean(c.nodeCachedData),b=I?this._getCachedDataPath(c.nodeCachedData,r):void 0;this._readSourceAndCachedData(m,b,d,function(R,U,w,O){if(R){o(R);return}var C;U.charCodeAt(0)===e._BOM?C=e._PREFIX+U.substring(1)+e._SUFFIX:C=e._PREFIX+U+e._SUFFIX,C=p(C,m);var M={filename:P,cachedData:w},N=u._createAndEvalScript(t,C,M,i,o);u._handleCachedData(N,C,b,I&&!w,t),u._verifyCachedData(N,C,b,O,t)})}},e.prototype._createAndEvalScript=function(t,r,i,o,u){var c=t.getRecorder();c.record(31,i.filename);var f=new this._vm.Script(r,i),p=f.runInThisContext(i),d=t.getGlobalAMDDefineFunc(),y=!1,h=function(){return y=!0,d.apply(null,arguments)};return h.amd=d.amd,p.call(l.global,t.getGlobalAMDRequireFunc(),h,i.filename,this._path.dirname(i.filename)),c.record(32,i.filename),y?o():u(new Error("Didn't receive define call in "+i.filename+"!")),f},e.prototype._getElectronRendererScriptPathOrUri=function(t){if(!this._env.isElectronRenderer)return t;var r=t.match(/^([a-z])\:(.*)/i);return r?"file:///"+(r[1].toUpperCase()+":"+r[2]).replace(/\\/g,"/"):"file://"+t},e.prototype._getCachedDataPath=function(t,r){var i=this._crypto.createHash("md5").update(r,"utf8").update(t.seed,"utf8").update(process.arch,"").digest("hex"),o=this._path.basename(r).replace(/\.js$/,"");return this._path.join(t.path,o+"-"+i+".code")},e.prototype._handleCachedData=function(t,r,i,o,u){var c=this;t.cachedDataRejected?this._fs.unlink(i,function(f){u.getRecorder().record(62,i),c._createAndWriteCachedData(t,r,i,u),f&&u.getConfig().onError(f)}):o&&this._createAndWriteCachedData(t,r,i,u)},e.prototype._createAndWriteCachedData=function(t,r,i,o){var u=this,c=Math.ceil(o.getConfig().getOptionsLiteral().nodeCachedData.writeDelay*(1+Math.random())),f=-1,p=0,d=void 0,y=function(){setTimeout(function(){d||(d=u._crypto.createHash("md5").update(r,"utf8").digest());var h=t.createCachedData();if(!(h.length===0||h.length===f||p>=5)){if(h.length<f){y();return}f=h.length,u._fs.writeFile(i,Buffer.concat([d,h]),function(m){m&&o.getConfig().onError(m),o.getRecorder().record(63,i),y()})}},c*Math.pow(4,p++))};y()},e.prototype._readSourceAndCachedData=function(t,r,i,o){if(!r)this._fs.readFile
|
||
|
});`,e}();function _(e,t){if(t.__$__isRecorded)return t;var r=function(o){e.record(33,o);try{return t(o)}finally{e.record(34,o)}};return r.__$__isRecorded=!0,r}l.ensureRecordedNodeRequire=_;function s(e){return new E(e)}l.createScriptLoader=s})(AMDLoader||(AMDLoader={}));var AMDLoader;(function(l){var E=function(){function s(e){var t=e.lastIndexOf("/");t!==-1?this.fromModulePath=e.substr(0,t+1):this.fromModulePath=""}return s._normalizeModuleId=function(e){var t=e,r;for(r=/\/\.\//;r.test(t);)t=t.replace(r,"/");for(t=t.replace(/^\.\//g,""),r=/\/(([^\/])|([^\/][^\/\.])|([^\/\.][^\/])|([^\/][^\/][^\/]+))\/\.\.\//;r.test(t);)t=t.replace(r,"/");return t=t.replace(/^(([^\/])|([^\/][^\/\.])|([^\/\.][^\/])|([^\/][^\/][^\/]+))\/\.\.\//,""),t},s.prototype.resolveModule=function(e){var t=e;return l.Utilities.isAbsolutePath(t)||(l.Utilities.startsWith(t,"./")||l.Utilities.startsWith(t,"../"))&&(t=s._normalizeModuleId(this.fromModulePath+t)),t},s.ROOT=new s(""),s}();l.ModuleIdResolver=E;var v=function(){function s(e,t,r,i,o,u){this.id=e,this.strId=t,this.dependencies=r,this._callback=i,this._errorback=o,this.moduleIdResolver=u,this.exports={},this.error=null,this.exportsPassedIn=!1,this.unresolvedDependenciesCount=this.dependencies.length,this._isComplete=!1}return s._safeInvokeFunction=function(e,t){try{return{returnedValue:e.apply(l.global,t),producedError:null}}catch(r){return{returnedValue:null,producedError:r}}},s._invokeFactory=function(e,t,r,i){return e.isBuild()&&!l.Utilities.isAnonymousModule(t)?{returnedValue:null,producedError:null}:e.shouldCatchError()?this._safeInvokeFunction(r,i):{returnedValue:r.apply(l.global,i),producedError:null}},s.prototype.complete=function(e,t,r){this._isComplete=!0;var i=null;if(this._callback)if(typeof this._callback=="function"){e.record(21,this.strId);var o=s._invokeFactory(t,this.strId,this._callback,r);i=o.producedError,e.record(22,this.strId),!i&&typeof o.returnedValue!="undefined"&&(!this.exportsPassedIn||l.Utilities.isEmpty(this.exports))&&(this.exports=o.returnedValue)}else this.exports=this._callback;if(i){var u=l.ensureError(i);u.phase="factory",u.moduleId=this.strId,this.error=u,t.onError(u)}this.dependencies=null,this._callback=null,this._errorback=null,this.moduleIdResolver=null},s.prototype.onDependencyError=function(e){return this._isComplete=!0,this.error=e,this._errorback?(this._errorback(e),!0):!1},s.prototype.isComplete=function(){return this._isComplete},s}();l.Module=v;var g=function(){function s(){this._nextId=0,this._strModuleIdToIntModuleId=new Map,this._intModuleIdToStrModuleId=[],this.getModuleId("exports"),this.getModuleId("module"),this.getModuleId("require")}return s.prototype.getMaxModuleId=function(){return this._nextId},s.prototype.getModuleId=function(e){var t=this._strModuleIdToIntModuleId.get(e);return typeof t=="undefined"&&(t=this._nextId++,this._strModuleIdToIntModuleId.set(e,t),this._intModuleIdToStrModuleId[t]=e),t},s.prototype.getStrModuleId=function(e){return this._intModuleIdToStrModuleId[e]},s}(),a=function(){function s(e){this.id=e}return s.EXPORTS=new s(0),s.MODULE=new s(1),s.REQUIRE=new s(2),s}();l.RegularDependency=a;var n=function(){function s(e,t,r){this.id=e,this.pluginId=t,this.pluginParam=r}return s}();l.PluginDependency=n;var _=function(){function s(e,t,r,i,o){o===void 0&&(o=0),this._env=e,this._scriptLoader=t,this._loaderAvailableTimestamp=o,this._defineFunc=r,this._requireFunc=i,this._moduleIdProvider=new g,this._config=new l.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=[]}return s.prototype.reset=function(){return new s(this._env,this._scriptLoader,this._defineFunc,this._requireFunc,this._loaderAvailableTimestamp)},s.prototype.getGlobalAMDDefineFunc=function(){return this._defineFunc},s.prototype.getGlobalAMDRequireFunc=function(){return this._requireFunc},s._findRelevantLocationInS
|
||
|
`)),e.unresolvedDependenciesCount--;continue}if(this._inverseDependencies2[u.id]=this._inverseDependencies2[u.id]||[],this._inverseDependencies2[u.id].push(e.id),u instanceof n){var p=this._modules2[u.pluginId];if(p&&p.isComplete()){this._loadPluginDependency(p.exports,u);continue}var d=this._inversePluginDependencies2.get(u.pluginId);d||(d=[],this._inversePluginDependencies2.set(u.pluginId,d)),d.push(u),this._loadModule(u.pluginId);continue}this._loadModule(u.id)}e.unresolvedDependenciesCount===0&&this._onModuleComplete(e)},s.prototype._onModuleComplete=function(e){var t=this,r=this.getRecorder();if(!e.isComplete()){var i=e.dependencies,o=[];if(i)for(var u=0,c=i.length;u<c;u++){var f=i[u];if(f===a.EXPORTS){o[u]=e.exports;continue}if(f===a.MODULE){o[u]={id:e.strId,config:function(){return t._config.getConfigForModule(e.strId)}};continue}if(f===a.REQUIRE){o[u]=this._createRequire(e.moduleIdResolver);continue}var p=this._modules2[f.id];if(p){o[u]=p.exports;continue}o[u]=null}e.complete(r,this._config,o);var d=this._inverseDependencies2[e.id];if(this._inverseDependencies2[e.id]=null,d)for(var u=0,c=d.length;u<c;u++){var y=d[u],h=this._modules2[y];h.unresolvedDependenciesCount--,h.unresolvedDependenciesCount===0&&this._onModuleComplete(h)}var m=this._inversePluginDependencies2.get(e.id);if(m){this._inversePluginDependencies2.delete(e.id);for(var u=0,c=m.length;u<c;u++)this._loadPluginDependency(e.exports,m[u])}}},s}();l.ModuleManager=_})(AMDLoader||(AMDLoader={}));var define,AMDLoader;(function(l){var E=new l.Environment,v=null,g=function(s,e,t){typeof s!="string"&&(t=e,e=s,s=null),(typeof e!="object"||!Array.isArray(e))&&(t=e,e=null),e||(e=["require","exports","module"]),s?v.defineModule(s,e,t,null,null):v.enqueueDefineAnonymousModule(e,t)};g.amd={jQuery:!0};var a=function(s,e){e===void 0&&(e=!1),v.configure(s,e)},n=function(){if(arguments.length===1){if(arguments[0]instanceof Object&&!Array.isArray(arguments[0])){a(arguments[0]);return}if(typeof arguments[0]=="string")return v.synchronousRequire(arguments[0])}if((arguments.length===2||arguments.length===3)&&Array.isArray(arguments[0])){v.defineModule(l.Utilities.generateAnonymousModule(),arguments[0],arguments[1],arguments[2],null);return}throw new Error("Unrecognized require call")};n.config=a,n.getConfig=function(){return v.getConfig().getOptionsLiteral()},n.reset=function(){v=v.reset()},n.getBuildInfo=function(){return v.getBuildInfo()},n.getStats=function(){return v.getLoaderEvents()},n.define=g;function _(){if(typeof l.global.require!="undefined"||typeof require!="undefined"){var s=l.global.require||require;if(typeof s=="function"&&typeof s.resolve=="function"){var e=l.ensureRecordedNodeRequire(v.getRecorder(),s);l.global.nodeRequire=e,n.nodeRequire=e,n.__$__nodeRequire=e}}E.isNode&&!E.isElectronRenderer&&!E.isElectronNodeIntegrationWebWorker?(module.exports=n,require=n):(E.isElectronRenderer||(l.global.define=g),l.global.require=n)}l.init=_,(typeof l.global.define!="function"||!l.global.define.amd)&&(v=new l.ModuleManager(E,l.createScriptLoader(E),g,n,l.Utilities.getHighPerformanceTimestamp()),typeof l.global.require!="undefined"&&typeof l.global.require!="function"&&n.config(l.global.require),define=function(){return g.apply(null,arguments)},define.amd=g.amd,typeof doNotInitLoader=="undefined"&&_())})(AMDLoader||(AMDLoader={}));
|