mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-23 05:41:20 -08:00
Use monaco editor in demo
This commit is contained in:
1 parent
b056a3a8d6
commit
09fbbe5b0d
107 files changed
+1593
-10109
No files matched your search
Binary file not shown.
@@ -0,0 +1,18 @@
|
||||
/*!-----------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Version: 0.30.1(829382514cb1065f5ebb90f436e1c6103e153953)
|
||||
* Released under the MIT license
|
||||
* https://github.com/microsoft/vscode/blob/main/LICENSE.txt
|
||||
*-----------------------------------------------------------*/(function(){var z=["require","exports","vs/base/common/platform","vs/editor/common/core/position","vs/base/common/strings","vs/base/common/event","vs/editor/common/core/range","vs/base/common/errors","vs/base/common/lifecycle","vs/base/common/stopwatch","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/functional","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"],G=function(F){for(var n=[],A=0,D=F.length;A<D;A++)n[A]=z[F[A]];return n},fe=this,he=typeof global=="object"?global:{},Q;(function(F){F.global=fe;var n=function(){function A(){this._detected=!1,this._isWindows=!1,this._isNode=!1,this._isElectronRenderer=!1,this._isWebWorker=!1,this._isElectronNodeIntegrationWebWorker=!1}return Object.defineProperty(A.prototype,"isWindows",{get:function(){return this._detect(),this._isWindows},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"isNode",{get:function(){return this._detect(),this._isNode},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"isElectronRenderer",{get:function(){return this._detect(),this._isElectronRenderer},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"isWebWorker",{get:function(){return this._detect(),this._isWebWorker},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"isElectronNodeIntegrationWebWorker",{get:function(){return this._detect(),this._isElectronNodeIntegrationWebWorker},enumerable:!1,configurable:!0}),A.prototype._detect=function(){this._detected||(this._detected=!0,this._isWindows=A._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 F.global.importScripts=="function",this._isElectronNodeIntegrationWebWorker=this._isWebWorker&&typeof process!="undefined"&&typeof process.versions!="undefined"&&typeof process.versions.electron!="undefined"&&process.type==="worker")},A._isWindows=function(){return typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.indexOf("Windows")>=0?!0:typeof process!="undefined"?process.platform==="win32":!1},A}();F.Environment=n})(Q||(Q={}));var Q;(function(F){var n=function(){function w(s,d,a){this.type=s,this.detail=d,this.timestamp=a}return w}();F.LoaderEvent=n;var A=function(){function w(s){this._events=[new n(1,"",s)]}return w.prototype.record=function(s,d){this._events.push(new n(s,d,F.Utilities.getHighPerformanceTimestamp()))},w.prototype.getEvents=function(){return this._events},w}();F.LoaderEventRecorder=A;var D=function(){function w(){}return w.prototype.record=function(s,d){},w.prototype.getEvents=function(){return[]},w.INSTANCE=new w,w}();F.NullLoaderEventRecorder=D})(Q||(Q={}));var Q;(function(F){var n=function(){function A(){}return A.fileUriToFilePath=function(D,w){if(w=decodeURI(w).replace(/%23/g,"#"),D){if(/^file:\/\/\//.test(w))return w.substr(8);if(/^file:\/\//.test(w))return w.substr(5)}else if(/^file:\/\//.test(w))return w.substr(7);return w},A.startsWith=function(D,w){return D.length>=w.length&&D.substr(0,w.length)===w},A.endsWith=function(D,w){return D.length>=w.length&&D.substr(D.length-w.length)===w},A.containsQueryString=function(D){return/^[^\#]*\?/gi.test(D)},A.isAbsolutePath=function(D){return/^((http:\/\/)|(https:\/\/)|(file:\/\/)|(\/))/.test(D)},A.forEachProperty=function(D,w){if(D){var s=void 0;for(s in D)D.hasOwnProperty(s)&&w(s,D[s])}},A.isEmpty=function(D){var w=!0;return A.forEachProperty(D,function(){w=!1}),w},A.recursiveClone=function(D){if(!D||typeof D!="object"||D instanceof RegExp||!Array.isArray(D)&&Object.getPrototypeOf(D)!==Object.prototype)return D;var w=Array.isArray(D)?[]:{};return A.forEachProperty(D,function(s,d){d&&typeof d=="object"?w[s]=A.recursiveClone(d):w[s]=d}),w},A.generateAnonymousModule=function(){return"===anonymous"+A.NEXT_ANONYMOUS_ID+++"==="},A.isAnonymousModule=function(D){return A.startsWith(D,"===anonymous")},A.getHighPerformanceTimestamp=function(){return this.PERFORMANCE_NOW_PROBED||(this.PERFORMANCE_NOW_PROBED=!0,this.HAS_PERFORMANCE_NOW=F.global.performance&&typeof F.global.performanceLine truncated
|
||||
//# sourceURL=`+C;var r=S?self.eval(S.createScript("",i)):new Function(i);r.call(self),e()}).then(void 0,f);return}try{S&&(C=S.createScriptURL(C)),importScripts(C),e()}catch(i){f(i)}}},u}(),s=function(){function u(c){this._env=c,this._didInitialize=!1,this._didPatchNodeRequire=!1}return u.prototype._init=function(c){this._didInitialize||(this._didInitialize=!0,this._fs=c("fs"),this._vm=c("vm"),this._path=c("path"),this._crypto=c("crypto"))},u.prototype._initNodeRequire=function(c,C){var e=C.getConfig().getOptionsLiteral().nodeCachedData;if(!e||this._didPatchNodeRequire)return;this._didPatchNodeRequire=!0;var f=this,m=c("module");function N(b){var h=b.constructor,S=function(i){try{return b.require(i)}finally{}};return S.resolve=function(i,r){return h._resolveFilename(i,b,!1,r)},S.resolve.paths=function(i){return h._resolveLookupPaths(i,b)},S.main=process.mainModule,S.extensions=h._extensions,S.cache=h._cache,S}m.prototype._compile=function(b,h){var S=m.wrap(b.replace(/^#!.*/,"")),p=C.getRecorder(),i=f._getCachedDataPath(e,h),r={filename:h},l;try{var g=f._fs.readFileSync(i);l=g.slice(0,16),r.cachedData=g.slice(16),p.record(60,i)}catch(P){p.record(61,i)}var v=new f._vm.Script(S,r),o=v.runInThisContext(r),_=f._path.dirname(h),L=N(this),E=[this.exports,L,this,h,_,process,he,Buffer],y=o.apply(this.exports,E);return f._handleCachedData(v,S,i,!r.cachedData,C),f._verifyCachedData(v,S,i,l,C),y}},u.prototype.load=function(c,C,e,f){var m=this,N=c.getConfig().getOptionsLiteral(),b=d(c.getRecorder(),N.nodeRequire||F.global.nodeRequire),h=N.nodeInstrumenter||function(o){return o};this._init(b),this._initNodeRequire(b,c);var S=c.getRecorder();if(/^node\|/.test(C)){var p=C.split("|"),i=null;try{i=b(p[1])}catch(o){f(o);return}c.enqueueDefineAnonymousModule([],function(){return i}),e()}else{C=F.Utilities.fileUriToFilePath(this._env.isWindows,C);var r=this._path.normalize(C),l=this._getElectronRendererScriptPathOrUri(r),g=Boolean(N.nodeCachedData),v=g?this._getCachedDataPath(N.nodeCachedData,C):void 0;this._readSourceAndCachedData(r,v,S,function(o,_,L,E){if(o){f(o);return}var y;_.charCodeAt(0)===u._BOM?y=u._PREFIX+_.substring(1)+u._SUFFIX:y=u._PREFIX+_+u._SUFFIX,y=h(y,r);var P={filename:l,cachedData:L},R=m._createAndEvalScript(c,y,P,e,f);m._handleCachedData(R,y,v,g&&!L,c),m._verifyCachedData(R,y,v,E,c)})}},u.prototype._createAndEvalScript=function(c,C,e,f,m){var N=c.getRecorder();N.record(31,e.filename);var b=new this._vm.Script(C,e),h=b.runInThisContext(e),S=c.getGlobalAMDDefineFunc(),p=!1,i=function(){return p=!0,S.apply(null,arguments)};return i.amd=S.amd,h.call(F.global,c.getGlobalAMDRequireFunc(),i,e.filename,this._path.dirname(e.filename)),N.record(32,e.filename),p?f():m(new Error("Didn't receive define call in "+e.filename+"!")),b},u.prototype._getElectronRendererScriptPathOrUri=function(c){if(!this._env.isElectronRenderer)return c;var C=c.match(/^([a-z])\:(.*)/i);return C?"file:///"+(C[1].toUpperCase()+":"+C[2]).replace(/\\/g,"/"):"file://"+c},u.prototype._getCachedDataPath=function(c,C){var e=this._crypto.createHash("md5").update(C,"utf8").update(c.seed,"utf8").update(process.arch,"").digest("hex"),f=this._path.basename(C).replace(/\.js$/,"");return this._path.join(c.path,f+"-"+e+".code")},u.prototype._handleCachedData=function(c,C,e,f,m){var N=this;c.cachedDataRejected?this._fs.unlink(e,function(b){m.getRecorder().record(62,e),N._createAndWriteCachedData(c,C,e,m),b&&m.getConfig().onError(b)}):f&&this._createAndWriteCachedData(c,C,e,m)},u.prototype._createAndWriteCachedData=function(c,C,e,f){var m=this,N=Math.ceil(f.getConfig().getOptionsLiteral().nodeCachedData.writeDelay*(1+Math.random())),b=-1,h=0,S=void 0,p=function(){setTimeout(function(){S||(S=m._crypto.createHash("md5").update(C,"utf8").digest());var i=c.createCachedData();if(!(i.length===0||i.length===b||h>=5)){if(i.length<b){p();return}b=i.length,m._fs.writeFile(e,Buffer.concat([S,i]),function(r){r&&f.getConfig().onError(r),f.getRecorder().record(63,e),p()})}},N*Math.pow(4,h++))};p()},u.prototype._readSourceAndCachedData=function(c,C,e,f){if(!C)this._fs.readFile(c,{encoding:"utf8"},f);else{var m=void 0,N=void 0,b=void 0,h=2,S=function(p){p?f(p):--h==0&&f(void 0,m,N,b)};this._fs.readFile(c,{encoding:"utf8"},function(p,i){m=i,S(p)}),this._fs.readFile(C,function(p,i){!p&&i&&i.length>0?(b=i.slice(0,16),N=i.slice(16),e.record(60,C)):e.record(61,C),S()})}},u.prototype._verifyCachedData=function(c,C,e,f,m){var N=this;!f||c.cachedDataRejected||setTimeout(function(){var b=N._crypto.createHash("md5").update(C,"utf8").digest();f.equals(b)||(m.getConfig().onError(new Error("FAILED TO VERIFY CACHED DATA, deleting stale '"+e+"' now, but a RESTART IS REQUIRED")),N._fs.unlink(e,function(h){h&&m.getConfig().onError(h)}))},Math.ceil(5e3*(1+Math.random())))},u._BOM=65279,u._PREFIX="(function (require, define, __filename, __dirname) { ",u._SUFFIX=`
|
||||
});`,u}();function d(u,c){if(c.__$__isRecorded)return c;var C=function(f){u.record(33,f);try{return c(f)}finally{u.record(34,f)}};return C.__$__isRecorded=!0,C}F.ensureRecordedNodeRequire=d;function a(u){return new n(u)}F.createScriptLoader=a})(Q||(Q={}));var Q;(function(F){var n=function(){function a(u){var c=u.lastIndexOf("/");c!==-1?this.fromModulePath=u.substr(0,c+1):this.fromModulePath=""}return a._normalizeModuleId=function(u){var c=u,C;for(C=/\/\.\//;C.test(c);)c=c.replace(C,"/");for(c=c.replace(/^\.\//g,""),C=/\/(([^\/])|([^\/][^\/\.])|([^\/\.][^\/])|([^\/][^\/][^\/]+))\/\.\.\//;C.test(c);)c=c.replace(C,"/");return c=c.replace(/^(([^\/])|([^\/][^\/\.])|([^\/\.][^\/])|([^\/][^\/][^\/]+))\/\.\.\//,""),c},a.prototype.resolveModule=function(u){var c=u;return F.Utilities.isAbsolutePath(c)||(F.Utilities.startsWith(c,"./")||F.Utilities.startsWith(c,"../"))&&(c=a._normalizeModuleId(this.fromModulePath+c)),c},a.ROOT=new a(""),a}();F.ModuleIdResolver=n;var A=function(){function a(u,c,C,e,f,m){this.id=u,this.strId=c,this.dependencies=C,this._callback=e,this._errorback=f,this.moduleIdResolver=m,this.exports={},this.error=null,this.exportsPassedIn=!1,this.unresolvedDependenciesCount=this.dependencies.length,this._isComplete=!1}return a._safeInvokeFunction=function(u,c){try{return{returnedValue:u.apply(F.global,c),producedError:null}}catch(C){return{returnedValue:null,producedError:C}}},a._invokeFactory=function(u,c,C,e){return u.isBuild()&&!F.Utilities.isAnonymousModule(c)?{returnedValue:null,producedError:null}:u.shouldCatchError()?this._safeInvokeFunction(C,e):{returnedValue:C.apply(F.global,e),producedError:null}},a.prototype.complete=function(u,c,C){this._isComplete=!0;var e=null;if(this._callback)if(typeof this._callback=="function"){u.record(21,this.strId);var f=a._invokeFactory(c,this.strId,this._callback,C);e=f.producedError,u.record(22,this.strId),!e&&typeof f.returnedValue!="undefined"&&(!this.exportsPassedIn||F.Utilities.isEmpty(this.exports))&&(this.exports=f.returnedValue)}else this.exports=this._callback;if(e){var m=F.ensureError(e);m.phase="factory",m.moduleId=this.strId,this.error=m,c.onError(m)}this.dependencies=null,this._callback=null,this._errorback=null,this.moduleIdResolver=null},a.prototype.onDependencyError=function(u){return this._isComplete=!0,this.error=u,this._errorback?(this._errorback(u),!0):!1},a.prototype.isComplete=function(){return this._isComplete},a}();F.Module=A;var D=function(){function a(){this._nextId=0,this._strModuleIdToIntModuleId=new Map,this._intModuleIdToStrModuleId=[],this.getModuleId("exports"),this.getModuleId("module"),this.getModuleId("require")}return a.prototype.getMaxModuleId=function(){return this._nextId},a.prototype.getModuleId=function(u){var c=this._strModuleIdToIntModuleId.get(u);return typeof c=="undefined"&&(c=this._nextId++,this._strModuleIdToIntModuleId.set(u,c),this._intModuleIdToStrModuleId[c]=u),c},a.prototype.getStrModuleId=function(u){return this._intModuleIdToStrModuleId[u]},a}(),w=function(){function a(u){this.id=u}return a.EXPORTS=new a(0),a.MODULE=new a(1),a.REQUIRE=new a(2),a}();F.RegularDependency=w;var s=function(){function a(u,c,C){this.id=u,this.pluginId=c,this.pluginParam=C}return a}();F.PluginDependency=s;var d=function(){function a(u,c,C,e,f){f===void 0&&(f=0),this._env=u,this._scriptLoader=c,this._loaderAvailableTimestamp=f,this._defineFunc=C,this._requireFunc=e,this._moduleIdProvider=new D,this._config=new F.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 a.prototype.reset=function(){return new a(this._env,this._scriptLoader,this._defineFunc,this._requireFunc,this._loaderAvailableTimestamp)},a.prototype.getGlobalAMDDefineFunc=function(){return this._defineFunc},a.prototype.getGlobalAMDRequireFunc=function(){return this._requireFunc},a._findRelevantLocationInStack=function(u,c){for(var C=function(r){return r.replace(/\\/g,"/")},e=C(u),f=c.split(/\n/),m=0;m<f.length;m++){var N=f[m].match(/(.*):(\d+):(\d+)\)?$/);if(N){var b=N[1],h=N[2],S=N[3],p=Math.max(b.lastIndexOf(" ")+1,b.lastIndexOf("(")+1);if(b=b.substr(p),b=C(b),b===e){var i={line:parseInt(h,10),col:parseInt(S,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 "+u)},a.prototype.getBuildInfo=function(){if(!this._config.isBuild())return null;for(var u=[],c=0,C=0,e=this._modules2.length;C<e;C++){var f=this._modules2[C];if(!!f){var m=this._buildInfoPath[f.id]||null,N=this._buildInfoDefineStack[f.id]||null,b=this._buildInfoDependencies[f.id];u[c++]={id:f.strId,path:m,defineLocation:m&&N?a._findRelevantLocationInStack(m,N):null,dependencies:b,shim:null,exports:f.exports}}}return u},a.prototype.getRecorder=fun
Line truncated
|
||||
`)),u.unresolvedDependenciesCount--;continue}if(this._inverseDependencies2[m.id]=this._inverseDependencies2[m.id]||[],this._inverseDependencies2[m.id].push(u.id),m instanceof s){var h=this._modules2[m.pluginId];if(h&&h.isComplete()){this._loadPluginDependency(h.exports,m);continue}var S=this._inversePluginDependencies2.get(m.pluginId);S||(S=[],this._inversePluginDependencies2.set(m.pluginId,S)),S.push(m),this._loadModule(m.pluginId);continue}this._loadModule(m.id)}u.unresolvedDependenciesCount===0&&this._onModuleComplete(u)},a.prototype._onModuleComplete=function(u){var c=this,C=this.getRecorder();if(!u.isComplete()){var e=u.dependencies,f=[];if(e)for(var m=0,N=e.length;m<N;m++){var b=e[m];if(b===w.EXPORTS){f[m]=u.exports;continue}if(b===w.MODULE){f[m]={id:u.strId,config:function(){return c._config.getConfigForModule(u.strId)}};continue}if(b===w.REQUIRE){f[m]=this._createRequire(u.moduleIdResolver);continue}var h=this._modules2[b.id];if(h){f[m]=h.exports;continue}f[m]=null}u.complete(C,this._config,f);var S=this._inverseDependencies2[u.id];if(this._inverseDependencies2[u.id]=null,S)for(var m=0,N=S.length;m<N;m++){var p=S[m],i=this._modules2[p];i.unresolvedDependenciesCount--,i.unresolvedDependenciesCount===0&&this._onModuleComplete(i)}var r=this._inversePluginDependencies2.get(u.id);if(r){this._inversePluginDependencies2.delete(u.id);for(var m=0,N=r.length;m<N;m++)this._loadPluginDependency(u.exports,r[m])}}},a}();F.ModuleManager=d})(Q||(Q={}));var j,Q;(function(F){var n=new F.Environment,A=null,D=function(a,u,c){typeof a!="string"&&(c=u,u=a,a=null),(typeof u!="object"||!Array.isArray(u))&&(c=u,u=null),u||(u=["require","exports","module"]),a?A.defineModule(a,u,c,null,null):A.enqueueDefineAnonymousModule(u,c)};D.amd={jQuery:!0};var w=function(a,u){u===void 0&&(u=!1),A.configure(a,u)},s=function(){if(arguments.length===1){if(arguments[0]instanceof Object&&!Array.isArray(arguments[0])){w(arguments[0]);return}if(typeof arguments[0]=="string")return A.synchronousRequire(arguments[0])}if((arguments.length===2||arguments.length===3)&&Array.isArray(arguments[0])){A.defineModule(F.Utilities.generateAnonymousModule(),arguments[0],arguments[1],arguments[2],null);return}throw new Error("Unrecognized require call")};s.config=w,s.getConfig=function(){return A.getConfig().getOptionsLiteral()},s.reset=function(){A=A.reset()},s.getBuildInfo=function(){return A.getBuildInfo()},s.getStats=function(){return A.getLoaderEvents()},s.define=D;function d(){if(typeof F.global.require!="undefined"||typeof require!="undefined"){var a=F.global.require||require;if(typeof a=="function"&&typeof a.resolve=="function"){var u=F.ensureRecordedNodeRequire(A.getRecorder(),a);F.global.nodeRequire=u,s.nodeRequire=u,s.__$__nodeRequire=u}}n.isNode&&!n.isElectronRenderer&&!n.isElectronNodeIntegrationWebWorker?(module.exports=s,require=s):(n.isElectronRenderer||(F.global.define=D),F.global.require=s)}F.init=d,(typeof F.global.define!="function"||!F.global.define.amd)&&(A=new F.ModuleManager(n,F.createScriptLoader(n),D,s,F.Utilities.getHighPerformanceTimestamp()),typeof F.global.require!="undefined"&&typeof F.global.require!="function"&&s.config(F.global.require),j=function(){return D.apply(null,arguments)},j.amd=D.amd,typeof doNotInitLoader=="undefined"&&d())})(Q||(Q={})),j(z[14],G([0,1]),function(F,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.DiffChange=void 0;class A{constructor(w,s,d,a){this.originalStart=w,this.originalLength=s,this.modifiedStart=d,this.modifiedLength=a}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}}n.DiffChange=A}),j(z[7],G([0,1]),function(F,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.NotSupportedError=n.illegalState=n.illegalArgument=n.canceled=n.isPromiseCanceledError=n.transformErrorForSerialization=n.onUnexpectedExternalError=n.onUnexpectedError=n.errorHandler=n.ErrorHandler=void 0;class A{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(m){setTimeout(()=>{throw m.stack?new Error(m.message+`
|
||||
|
||||
`+m.stack):m},0)}}emit(m){this.listeners.forEach(N=>{N(m)})}onUnexpectedError(m){this.unexpectedErrorHandler(m),this.emit(m)}onUnexpectedExternalError(m){this.unexpectedErrorHandler(m)}}n.ErrorHandler=A,n.errorHandler=new A;function D(f){a(f)||n.errorHandler.onUnexpectedError(f)}n.onUnexpectedError=D;function w(f){a(f)||n.errorHandler.onUnexpectedExternalError(f)}n.onUnexpectedExternalError=w;function s(f){if(f instanceof Error){let{name:m,message:N}=f;const b=f.stacktrace||f.stack;return{$isError:!0,name:m,message:N,stack:b}}return f}n.transformErrorForSerialization=s;const d="Canceled";function a(f){return f instanceof Error&&f.name===d&&f.message===d}n.isPromiseCanceledError=a;function u(){const f=new Error(d);return f.name=f.message,f}n.canceled=u;function c(f){return f?new Error(`Illegal argument: ${f}`):new Error("Illegal argument")}n.illegalArgument=c;function C(f){return f?new Error(`Illegal state: ${f}`):new Error("Illegal state")}n.illegalState=C;class e extends Error{constructor(m){super("NotSupported");m&&(this.message=m)}}n.NotSupportedError=e}),j(z[15],G([0,1]),function(F,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.once=void 0;function A(D){const w=this;let s=!1,d;return function(){return s||(s=!0,d=D.apply(w,arguments)),d}}n.once=A}),j(z[16],G([0,1]),function(F,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Iterable=void 0;var A;(function(D){function w(l){return l&&typeof l=="object"&&typeof l[Symbol.iterator]=="function"}D.is=w;const s=Object.freeze([]);function d(){return s}D.empty=d;function*a(l){yield l}D.single=a;function u(l){return l||s}D.from=u;function c(l){return!l||l[Symbol.iterator]().next().done===!0}D.isEmpty=c;function C(l){return l[Symbol.iterator]().next().value}D.first=C;function e(l,g){for(const v of l)if(g(v))return!0;return!1}D.some=e;function f(l,g){for(const v of l)if(g(v))return v}D.find=f;function*m(l,g){for(const v of l)g(v)&&(yield v)}D.filter=m;function*N(l,g){let v=0;for(const o of l)yield g(o,v++)}D.map=N;function*b(...l){for(const g of l)for(const v of g)yield v}D.concat=b;function*h(l){for(const g of l)for(const v of g)yield v}D.concatNested=h;function S(l,g,v){let o=v;for(const _ of l)o=g(o,_);return o}D.reduce=S;function*p(l,g,v=l.length){for(g<0&&(g+=l.length),v<0?v+=l.length:v>l.length&&(v=l.length);g<v;g++)yield l[g]}D.slice=p;function i(l,g=Number.POSITIVE_INFINITY){const v=[];if(g===0)return[v,l];const o=l[Symbol.iterator]();for(let _=0;_<g;_++){const L=o.next();if(L.done)return[v,D.empty()];v.push(L.value)}return[v,{[Symbol.iterator](){return o}}]}D.consume=i;function r(l,g,v=(o,_)=>o===_){const o=l[Symbol.iterator](),_=g[Symbol.iterator]();for(;;){const L=o.next(),E=_.next();if(L.done!==E.done)return!1;if(L.done)return!0;if(!v(L.value,E.value))return!1}}D.equals=r})(A=n.Iterable||(n.Iterable={}))}),j(z[17],G([0,1]),function(F,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.KeyChord=n.KeyCodeUtils=n.IMMUTABLE_KEY_CODE_TO_CODE=n.IMMUTABLE_CODE_TO_KEY_CODE=n.NATIVE_WINDOWS_KEY_CODE_TO_KEY_CODE=n.EVENT_KEY_CODE_MAP=void 0;class A{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(f,m){this._keyCodeToStr[f]=m,this._strToKeyCode[m.toLowerCase()]=f}keyCodeToStr(f){return this._keyCodeToStr[f]}strToKeyCode(f){return this._strToKeyCode[f.toLowerCase()]||0}}const D=new A,w=new A,s=new A;n.EVENT_KEY_CODE_MAP=new Array(230),n.NATIVE_WINDOWS_KEY_CODE_TO_KEY_CODE={};const d=[],a=Object.create(null),u=Object.create(null);n.IMMUTABLE_CODE_TO_KEY_CODE=[],n.IMMUTABLE_KEY_CODE_TO_CODE=[];for(let e=0;e<=193;e++)n.IMMUTABLE_CODE_TO_KEY_CODE[e]=-1;for(let e=0;e<=126;e++)n.IMMUTABLE_KEY_CODE_TO_CODE[e]=-1;(function(){const e="",f=[[0,1,0,"None",0,"unknown",0,"VK_UNKNOWN",e,e],[0,1,1,"Hyper",0,e,0,e,e,e],[0,1,2,"Super",0,e,0,e,e,e],[0,1,3,"Fn",0,e,0,e,e,e],[0,1,4,"FnLock",0,e,0,e,e,e],[0,1,5,"Suspend",0,e,0,e,e,e],[0,1,6,"Resume",0,e,0,e,e,e],[0,1,7,"Turbo",0,e,0,e,e,e],[0,1,8,"Sleep",0,e,0,"VK_SLEEP",e,e],[0,1,9,"WakeUp",0,e,0,e,e,e],[31,0,10,"KeyA",31,"A",65,"VK_A",e,e],[32,0,11,"KeyB",32,"B",66,"VK_B",e,e],[33,0,12,"KeyC",33,"C",67,"VK_C",e,e],[34,0,13,"KeyD",34,"D",68,"VK_D",e,e],[35,0,14,"KeyE",35,"E",69,"VK_E",e,e],[36,0,15,"KeyF",36,"F",70,"VK_F",e,e],[37,0,16,"KeyG",37,"G",71,"VK_G",e,e],[38,0,17,"KeyH",38,"H",72,"VK_H",e,e],[39,0,18,"KeyI",39,"I",73,"VK_I",e,e],[40,0,19,"KeyJ",40,"J",74,"VK_J",e,e],[41,0,20,"KeyK",41,"K",75,"VK_K",e,e],[42,0,21,"KeyL",42,"L",76,"VK_L",e,e],[43,0,22,"KeyM",43,"M",77,"VK_M",e,e],[44,0,23,"KeyN",44,"N",78,"VK_N",e,e],[45,0,24,"KeyO",45,"O",79,"VK_O",e,e],[46,0,25,"KeyP",46,"P",80,"VK_P",e,e],[47,0,26,"KeyQ",47,"Q",81,"VK_Q",e,e],[48,0,27,"KeyR",48,"R",82,"VK_R",e,e],[49,0,28,"KeyS",49,"S",83,"VK_S",e,e],[50,0,29,"KeyT",50,"T",84,"VK_T",e,e],[51,0,30,"KeyU",51,"U",85,"VK_U",e,e],[52,0,31,"KeyV",52,"V",86,"VK_V",e,e],[53,0,32,"KeyW",53,"W",87,"VK_W",e,e],[54,0,33,"KeyX",54,"X",88,"VK_X",e,e],[55,0,34,"KeyY",55,"Y",89,"VK_Y",e,e],[56,0,35,"KeyZ",5
Line truncated
|
||||
`).slice(3).join(`
|
||||
`),i=this._stacks.get(p)||0;if(this._stacks.set(p,i+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=S*.5;let r,l=0;for(const[g,v]of this._stacks)(!r||l<v)&&(r=g,l=v);console.warn(`[${this.name}] potential listener LEAK detected, having ${h} listeners already. MOST frequent listener (${l}):`),console.warn(r)}return()=>{const r=this._stacks.get(p)||0;this._stacks.set(p,r-1)}}}class C{constructor(h){var S;this._disposed=!1,this._options=h,this._leakageMon=u>0?new c(this._options&&this._options.leakWarningThreshold):void 0,this._perfMon=((S=this._options)===null||S===void 0?void 0:S._profName)?new a(this._options._profName):void 0}get event(){return this._event||(this._event=(h,S,p)=>{var i;this._listeners||(this._listeners=new w.LinkedList);const r=this._listeners.isEmpty();r&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const l=this._listeners.push(S?[h,S]:h);r&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,h,S);const g=(i=this._leakageMon)===null||i===void 0?void 0:i.check(this._listeners.size),v=(0,D.toDisposable)(()=>{g&&g(),this._disposed||(l(),this._options&&this._options.onLastListenerRemove&&(this._listeners&&!this._listeners.isEmpty()||this._options.onLastListenerRemove(this)))});return p instanceof D.DisposableStore?p.add(v):Array.isArray(p)&&p.push(v),v}),this._event}fire(h){var S,p;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new w.LinkedList);for(let i of this._listeners)this._deliveryQueue.push([i,h]);for((S=this._perfMon)===null||S===void 0||S.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[i,r]=this._deliveryQueue.shift();try{typeof i=="function"?i.call(void 0,r):i[0].call(i[1],r)}catch(l){(0,A.onUnexpectedError)(l)}}(p=this._perfMon)===null||p===void 0||p.stop()}}dispose(){var h,S,p,i,r;this._disposed||(this._disposed=!0,(h=this._listeners)===null||h===void 0||h.clear(),(S=this._deliveryQueue)===null||S===void 0||S.clear(),(i=(p=this._options)===null||p===void 0?void 0:p.onLastListenerRemove)===null||i===void 0||i.call(p),(r=this._leakageMon)===null||r===void 0||r.dispose())}}n.Emitter=C;class e extends C{constructor(h){super(h);this._isPaused=0,this._eventQueue=new w.LinkedList,this._mergeFn=h==null?void 0:h.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused==0)if(this._mergeFn){const h=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(h))}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(h){this._listeners&&(this._isPaused!==0?this._eventQueue.push(h):super.fire(h))}}n.PauseableEmitter=e;class f extends e{constructor(h){var S;super(h);this._delay=(S=h.delay)!==null&&S!==void 0?S:100}fire(h){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(h)}}n.DebounceEmitter=f;class m{constructor(){this.buffers=[]}wrapEvent(h){return(S,p,i)=>h(r=>{const l=this.buffers[this.buffers.length-1];l?l.push(()=>S.call(p,r)):S.call(p,r)},void 0,i)}bufferEvents(h){const S=[];this.buffers.push(S);const p=h();return this.buffers.pop(),S.forEach(i=>i()),p}}n.EventBufferer=m;class N{constructor(){this.listening=!1,this.inputEvent=d.None,this.inputEventListener=D.Disposable.None,this.emitter=new C({onFirstListenerDidAdd:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onLastListenerRemove:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(h){this.inputEvent=h,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=h(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}n.Relay=N}),j(z[21],G([0,1,5]),function(F,n,A){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.CancellationTokenSource=n.CancellationToken=void 0;const D=Object.freeze(function(a,u){const c=setTimeout(a.bind(u),0);return{dispose(){clearTimeout(c)}}});var w;(function(a){function u(c){return c===a.None||c===a.Cancelled||c instanceof s?!0:!c||typeof c!="object"?!1:typeof c.isCancellationRequested=="boolean"&&typeof c.onCancellationRequested=="function"}a.isCancellationToken=u,a.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:A.Event.None}),a.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:D})})(w=n.CancellationToken||(n.CancellationToken={}));class s{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?D:(this._emitter||(this._emitter=new A.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),t
Line truncated
|
||||
${m}
|
||||
})`}}):void 0;function s(){try{return(w?self.eval(w.createScript("","true")):new Function("true")).call(self),!0}catch(C){return!1}}function d(){return new Promise((C,e)=>{if(typeof self.define=="function"&&self.define.amd)return C();const f=D+"vs/loader.js";if(!(/^((http:)|(https:)|(file:))/.test(f)&&f.substring(0,self.origin.length)!==self.origin)&&s()){fetch(f).then(N=>{if(N.status!==200)throw new Error(N.statusText);return N.text()}).then(N=>{N=`${N}
|
||||
//# sourceURL=${f}`,(w?self.eval(w.createScript("",N)):new Function(N)).call(self),C()}).then(void 0,e);return}w?importScripts(w.createScriptURL(f)):importScripts(f),C()})}const a=function(C){d().then(()=>{require.config({baseUrl:D,catchError:!0,trustedTypesPolicy:w,amdModulesPattern:/^vs\//}),require([C],function(e){setTimeout(function(){let f=e.create((m,N)=>{self.postMessage(m,N)},null);for(self.onmessage=m=>f.onmessage(m.data,m.ports);c.length>0;)self.onmessage(c.shift())},0)})})};let u=!0,c=[];self.onmessage=C=>{if(!u){c.push(C);return}u=!1,a(C.data)}}()}).call(this);
|
||||
|
||||
//# sourceMappingURL=../../../../min-maps/vs/base/worker/workerMain.js.map
|
||||
Reference in new issue
Block a user