/*!----------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.6.0(a43fe71b7f6e022d0d1bb2d0ef8fd4e31aa3f431) * Released under the MIT license * https://github.com/Microsoft/vscode/blob/master/LICENSE.txt *-----------------------------------------------------------*/ "use strict";var _amdLoaderGlobal=this,define,AMDLoader;!function(e){function t(){return!!("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.indexOf("Windows")>=0)||"undefined"!=typeof process&&"win32"===process.platform}function n(){return O?A.performance.now():Date.now()}function o(){v="function"==typeof A.importScripts,m="undefined"!=typeof process&&"undefined"!=typeof process.versions&&"undefined"!=typeof process.versions.electron&&"renderer"===process.type,M="undefined"!=typeof process&&"undefined"!=typeof process.versions&&"undefined"!=typeof process.versions.electron&&"browser"===process.type,E="undefined"!=typeof module&&!!module.exports,P=new b(v?new k:E?new I:new L),S=new y(P),P.setModuleManager(S)}function r(){E||(A.console||(A.console={}),A.console.log||(A.console.log=function(){}),A.console.warn||(A.console.warn=A.console.log),A.console.error||(A.console.error=A.console.log))}function i(){v||E||(window.onload=function(){var e,t,n,o=document.getElementsByTagName("script");for(e=0,t=o.length;e=t.length&&e.substr(0,t.length)===t},e.endsWith=function(e,t){return e.length>=t.length&&e.substr(e.length-t.length)===t},e.containsQueryString=function(e){return/^[^\#]*\?/gi.test(e)},e.isAbsolutePath=function(t){return e.startsWith(t,"http://")||e.startsWith(t,"https://")||e.startsWith(t,"file://")||e.startsWith(t,"/")},e.forEachProperty=function(e,t){if(e){var n;for(n in e)e.hasOwnProperty(n)&&t(n,e[n])}},e.isEmpty=function(t){var n=!0;return e.forEachProperty(t,function(){n=!1}),n},e.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===Object.prototype.toString.call(e)},e.recursiveClone=function(t){if(!t||"object"!=typeof t)return t;var n=e.isArray(t)?[]:{};return e.forEachProperty(t,function(t,o){o&&"object"==typeof o?n[t]=e.recursiveClone(o):n[t]=o}),n},e.generateAnonymousModule=function(){return"===anonymous"+e.NEXT_ANONYMOUS_ID++ +"==="},e.isAnonymousModule=function(e){return 0===e.indexOf("===anonymous")},e.NEXT_ANONYMOUS_ID=1,e}();e.Utilities=u;var a=function(){function e(){}return e.validateConfigurationOptions=function(e){function t(e){return"load"===e.errorCode?(console.error('Loading "'+e.moduleId+'" failed'),console.error("Detail: ",e.detail),e.detail&&e.detail.stack&&console.error(e.detail.stack),console.error("Here are the modules that depend on it:"),void console.error(e.neededBy)):"factory"===e.errorCode?(console.error('The factory method of "'+e.moduleId+'" has thrown an exception'),console.error(e.detail),void(e.detail&&e.detail.stack&&console.error(e.detail.stack))):void 0}return e=e||{},"string"!=typeof e.baseUrl&&(e.baseUrl=""),"boolean"!=typeof e.isBuild&&(e.isBuild=!1),"object"!=typeof e.paths&&(e.paths={}),"object"!=typeof e.bundles&&(e.bundles=[]),"object"!=typeof e.shim&&(e.shim={}),"object"!=typeof e.config&&(e.config={}),"undefined"==typeof e.catchError&&(e.catchError=v),"string"!=typeof e.urlArgs&&(e.urlArgs=""),"function"!=typeof e.onError&&(e.onError=t),"object"==typeof e.ignoreDuplicateModules&&u.isArray(e.ignoreDuplicateModules)||(e.ignoreDuplicateModules=[]),e.baseUrl.length>0&&(u.endsWith(e.baseUrl,"/")||(e.baseUrl+="/")),Array.isArray(e.nodeModules)||(e.nodeModules=[]),e},e.mergeConfigurationOptions=function(t,n){void 0===t&&(t=null),void 0===n&&(n=null);var o=u.recursiveClone(n||{});return u.forEachProperty(t,function(e,t){"bundles"===e&&"undefined"!=typeof o.bundles?u.isArray(t)?o.bundles=o.bundles.concat(t):u.forEachProperty(t,function(e,t){var n={location:e,modules:t};o.bundles.push(n)}):"ignoreDuplicateModules"===e&&"undefined"!=typeof o.ignoreDuplicateModules?o.ignoreDuplicateModules=o.ignoreDuplicateModules.concat(t):"paths"===e&&"undefined"!=typeof o.paths?u.forEachProperty(t,function(e,t){return o.paths[e]=t}):"shim"===e&&"undefined"!=typeof o.shim?u.forEachProperty(t,function(e,t){return o.shim[e]=t}):"config"===e&&"undefined"!=typeof o.config?u.forEachProperty(t,function(e,t){return o.config[e]=t}):o[e]=u.recursiveClone(t)}),e.validateConfigurationOptions(o)},e}();e.ConfigurationOptionsUtil=a;var d=function(){function e(e){if(this.options=a.mergeConfigurationOptions(e),this._createIgnoreDuplicateModulesMap(),this._createSortedPathsRules(),this._createShimModules(),this._createOverwriteModuleIdToPath(),""===this.options.baseUrl){if(E&&this.options.nodeRequire&&this.options.nodeRequire.main&&this.options.nodeRequire.main.filename){var t=this.options.nodeRequire.main.filename,n=Math.max(t.lastIndexOf("/"),t.lastIndexOf("\\"));this.options.baseUrl=t.substring(0,n+1)}if(E&&this.options.nodeMain){var t=this.options.nodeMain,n=Math.max(t.lastIndexOf("/"),t.lastIndexOf("\\"));this.options.baseUrl=t.substring(0,n+1)}}}return e.prototype._createOverwriteModuleIdToPath=function(){this.overwriteModuleIdToPath={};for(var e=0;e=0)return["empty:"];var t=e;this.overwriteModuleIdToPath.hasOwnProperty(t)&&(t=this.overwriteModuleIdToPath[t]);var n;if(u.endsWith(t,".js")||u.isAbsolutePath(t))u.endsWith(t,".js")||u.containsQueryString(t)||(t+=".js"),n=[t];else{n=this._applyPaths(t);for(var o=0,r=n.length;o=0){var i=o.substring(0,r),s=o.substring(r+1,o.length);o=this._moduleIdResolver.resolveModule(i)+"!"+s}else o=this._moduleIdResolver.resolveModule(o);this._normalizedDependencies[t]=o,this.addManagerDependency(o,t)}else console.warn("Please check module "+this._id+", the dependency list looks broken"),this._normalizedDependencies[t]=o,this._dependenciesValues[t]=null,this._unresolvedDependenciesCount--},e.prototype.addManagerDependency=function(e,t){if(this._managerDependenciesMap.hasOwnProperty(e))throw new Error("Module "+this._id+" contains multiple times a dependency to "+e);this._managerDependencies.push(e),this._managerDependenciesMap[e]=t},e.prototype.renameDependency=function(e,t){if(!this._managerDependenciesMap.hasOwnProperty(e))throw new Error("Loader: Cannot rename an unknown dependency!");var n=this._managerDependenciesMap[e];delete this._managerDependenciesMap[e],this._managerDependenciesMap[t]=n,this._normalizedDependencies[n]=t},e.prototype.getId=function(){return this._id},e.prototype.getModuleIdResolver=function(){return this._moduleIdResolver},e.prototype.isExportsPassedIn=function(){return this._exportsPassedIn},e.prototype.getExports=function(){return this._exports},e.prototype.getDependencies=function(){return this._managerDependencies},e.prototype.getNormalizedDependencies=function(){return this._normalizedDependencies},e.prototype.getDefineCallStack=function(){return this._defineCallStack},e.prototype._invokeFactory=function(){if(this._moduleIdResolver.isBuild()&&!u.isAnonymousModule(this._id))return{returnedValue:null,producedError:null};var e=null,t=null;if(this._moduleIdResolver.shouldCatchError())try{t=this._callback.apply(A,this._dependenciesValues)}catch(n){e=n}finally{}else t=this._callback.apply(A,this._dependenciesValues);return{returnedValue:t,producedError:e}},e.prototype._complete=function(){var e=null;if(this._callback)if("function"==typeof this._callback){this._recorder.record(p.BeginInvokeFactory,this._id);var t=this._invokeFactory();e=t.producedError,this._recorder.record(p.EndInvokeFactory,this._id),e||"undefined"==typeof t.returnedValue||this._exportsPassedIn&&!u.isEmpty(this._exports)||(this._exports=t.returnedValue)}else this._exports=this._callback;e&&this.getModuleIdResolver().onError({errorCode:"factory",moduleId:this._id,detail:e})},e.prototype.cleanUp=function(){this._moduleIdResolver&&!this._moduleIdResolver.isBuild()&&(this._normalizedDependencies=null,this._moduleIdResolver=null),this._dependencies=null,this._dependenciesValues=null,this._callback=null,this._managerDependencies=null,this._managerDependenciesMap=null},e.prototype.onDependencyError=function(e){return!!this._errorback&&(this._errorback(e),!0)},e.prototype.resolveDependency=function(e,t){if(!this._managerDependenciesMap.hasOwnProperty(e))throw new Error("Cannot resolve a dependency I do not have!");this._dependenciesValues[this._managerDependenciesMap[e]]=t,delete this._managerDependenciesMap[e],this._unresolvedDependenciesCount--,0===this._unresolvedDependenciesCount&&this._complete()},e.prototype.isComplete=function(){return 0===this._unresolvedDependenciesCount},e}();e.Module=h,function(e){e[e.LoaderAvailable=1]="LoaderAvailable",e[e.BeginLoadingScript=10]="BeginLoadingScript",e[e.EndLoadingScriptOK=11]="EndLoadingScriptOK",e[e.EndLoadingScriptError=12]="EndLoadingScriptError",e[e.BeginInvokeFactory=21]="BeginInvokeFactory",e[e.EndInvokeFactory=22]="EndInvokeFactory",e[e.NodeBeginEvaluatingScript=31]="NodeBeginEvaluatingScript",e[e.NodeEndEvaluatingScript=32]="NodeEndEvaluatingScript",e[e.NodeBeginNativeRequire=33]="NodeBeginNativeRequire",e[e.NodeEndNativeRequire=34]="NodeEndNativeRequire"}(e.LoaderEventType||(e.LoaderEventType={}));var p=e.LoaderEventType,f=function(){function e(e,t,n){this.type=e,this.detail=t,this.timestamp=n}return e}();e.LoaderEvent=f;var g=function(){function e(e){this._events=[new f(p.LoaderAvailable,"",e)]}return e.prototype.record=function(e,t){this._events.push(new f(e,t,n()))},e.prototype.getEvents=function(){return this._events},e}();e.LoaderEventRecorder=g;var _=function(){function e(){}return e.prototype.record=function(e,t){},e.prototype.getEvents=function(){return[]},e.INSTANCE=new e,e}();e.NullLoaderEventRecorder=_;var y=function(){function e(e){this._recorder=null,this._config=new d,this._scriptLoader=e,this._modules={},this._knownModules={},this._inverseDependencies={},this._dependencies={},this._inversePluginDependencies={},this._queuedDefineCalls=[],this._loadingScriptsCount=0,this._resolvedScriptPaths={}}return e._findRelevantLocationInStack=function(e,t){for(var n=function(e){return e.replace(/\\/g,"/")},o=n(e),r=t.split(/\n/),i=0;i=0){var r=n.substring(0,o),i=n.substring(o+1,n.length),s={};this._modules.hasOwnProperty(r)&&(s=this._modules[r]);var l=function(e){return t.resolveModule(e)};i="function"==typeof s.normalize?s.normalize(i,l):l(i),n=r+"!"+i}if(!this._modules.hasOwnProperty(n))throw new Error("Check dependency list! Synchronous require cannot resolve module '"+n+"'. This is the first mention of this module!");var u=this._modules[n];if(!u.isComplete())throw new Error("Check dependency list! Synchronous require cannot resolve module '"+n+"'. This module has not been resolved completely yet.");return u.getExports()},e.prototype.configure=function(e,t){var n=this._config.shouldRecordStats();t?this._config=new d(e):this._config=this._config.cloneAndMerge(e),this._config.shouldRecordStats()&&!n&&(this._recorder=null)},e.prototype.getConfigurationOptions=function(){return this._config.getOptionsLiteral()},e.prototype._onLoad=function(e){var t;if(this._loadingScriptsCount--,this._config.isShimmed(e))t=this._config.getShimmedModuleDefine(e),this.defineModule(e,t.dependencies,t.callback,null,t.stack);else if(0===this._queuedDefineCalls.length)this._loadingScriptsCount++,this._onLoadError(e,new Error("No define call received from module "+e+"."));else for(;this._queuedDefineCalls.length>0;){if(t=this._queuedDefineCalls.shift(),t.id===e||null===t.id){t.id=e,this.defineModule(t.id,t.dependencies,t.callback,null,t.stack);break}this.defineModule(t.id,t.dependencies,t.callback,null,t.stack)}if(0===this._loadingScriptsCount)for(;this._queuedDefineCalls.length>0;)t=this._queuedDefineCalls.shift(),null===t.id?(console.warn("Found an unmatched anonymous define call in the define queue. Ignoring it!"),console.warn(t.callback)):this.defineModule(t.id,t.dependencies,t.callback,null,t.stack)},e.prototype._onLoadError=function(e,t){this._loadingScriptsCount--;var n,o={errorCode:"load",moduleId:e,neededBy:this._inverseDependencies[e]?this._inverseDependencies[e].slice(0):[],detail:t},r={},i=!1,s=[];for(s.push(e),r[e]=!0;s.length>0;)if(n=s.shift(),this._modules[n]&&(i=this._modules[n].onDependencyError(o)||i),this._inverseDependencies[n])for(var l=0,u=this._inverseDependencies[n].length;l0;)if(r=u.shift(),this._dependencies.hasOwnProperty(r))for(i=this._dependencies[r],n=0,o=i.length;n0?this.defineModule(u.generateAnonymousModule(),o.dependencies,function(){return n(t)},null,null,new c(this._config,t)):n(t)},e.prototype._resolveDependency=function(e,t,n){var o=this._modules[e];if(this._modules.hasOwnProperty(t)&&this._modules[t].isComplete())o.resolveDependency(t,this._modules[t].getExports());else if(this._dependencies[e].push(t),this._hasDependencyPath(t,e)){console.warn("There is a dependency cycle between '"+t+"' and '"+e+"'. The cyclic path follows:");var r=this._findCyclePath(t,e,0);r.reverse(),r.push(t),console.warn(r.join(" => \n"));var i,s=this._modules.hasOwnProperty(t)?this._modules[t]:null;s&&s.isExportsPassedIn()&&(i=s.getExports()),o.resolveDependency(t,i)}else this._inverseDependencies[t]=this._inverseDependencies[t]||[],this._inverseDependencies[t].push(e),this._modules.hasOwnProperty(t)||this._knownModules.hasOwnProperty(t)||(this._knownModules[t]=!0,this._config.isShimmed(t)?this._resolveShimmedDependency(e,t,n):n(t))},e.prototype._loadModule=function(e,t){var n=this;this._loadingScriptsCount++;var o=e.moduleIdToPaths(t),r=-1,i=function(e){if(r++,r>=o.length)n._onLoadError(t,e);else{var s=o[r],l=n.getRecorder();if(n._config.isBuild()&&"empty:"===s)return n._resolvedScriptPaths[t]=s,n.enqueueDefineModule(t,[],null),void n._onLoad(t);l.record(p.BeginLoadingScript,s),n._scriptLoader.load(s,function(){n._config.isBuild()&&(n._resolvedScriptPaths[t]=s),l.record(p.EndLoadingScriptOK,s),n._onLoad(t)},function(e){l.record(p.EndLoadingScriptError,s),i(e)},l)}};i(null)},e.prototype._resolve=function(e){var t,n,o,r,i,s,l=this;o=e.getId(),r=e.getDependencies(),s=e.getModuleIdResolver(),this._dependencies[o]=[];var u=function(e){return l._loadModule(s,e)};for(t=0,n=r.length;t=0?this._resolvePluginDependency(o,i):this._resolveDependency(o,i,u):e.resolveDependency(i,this._createRequire(s));e.isComplete()&&this._onModuleComplete(o,e.getExports())},e}();e.ModuleManager=y;var v,m,M,E,P,S,D,b=function(){function e(e){this.actualScriptLoader=e,this.callbackMap={}}return e.prototype.setModuleManager=function(e){this.actualScriptLoader.setModuleManager(e)},e.prototype.load=function(e,t,n,o){var r=this,i={callback:t,errorback:n};return this.callbackMap.hasOwnProperty(e)?void this.callbackMap[e].push(i):(this.callbackMap[e]=[i],void this.actualScriptLoader.load(e,function(){return r.triggerCallback(e)},function(t){return r.triggerErrorback(e,t)},o))},e.prototype.triggerCallback=function(e){var t=this.callbackMap[e];delete this.callbackMap[e];for(var n=0;n=0?this._load():this.loadTimeout===-1&&(this.loadTimeout=setTimeout(function(){o.loadTimeout=-1,o._load()},0))},e.prototype._load=function(){var e=this.loadCalls;this.loadCalls=[];var t,n=e.length,o=[];for(t=0;t0?t.insertBefore(e,n[n.length-1]):t.appendChild(e)},e.prototype.createLinkTag=function(e,t,n,o){var r=this,i=document.createElement("link");i.setAttribute("rel","stylesheet"),i.setAttribute("type","text/css"),i.setAttribute("data-name",e);var s=function(){return r._onLoad(e,n)},l=function(t){return r._onLoadError(e,o,t)};return this.attachListeners(e,i,s,l),i.setAttribute("href",t),i},e.prototype._linkTagExists=function(e,t){var n,o,r,i,s=document.getElementsByTagName("link");for(n=0,o=s.length;n0&&this._mergeStyleSheetsTimeout===-1&&(this._mergeStyleSheetsTimeout=window.setTimeout(function(){return e._mergeStyleSheets()},0))},t.prototype._mergeStyleSheet=function(e,t,n,o){for(var r=o.rules.length-1;r>=0;r--)t.insertRule(l.rewriteUrls(n,e,o.rules[r].cssText),0)},t.prototype._asIE9HTMLLinkElement=function(e){return e},t.prototype._mergeStyleSheets=function(){this._mergeStyleSheetsTimeout=-1;var e,t=this._blockedLoads.length,n=document.getElementsByTagName("link"),o=n.length,r=[];for(e=0;e0;)this._insertLinkNode(this._blockedLoads.shift()),a++},t}(n),r=function(e){function t(){e.call(this)}return __extends(t,e),t.prototype.attachListeners=function(e,t,n,o){t.onload=function(){t.onload=null,n()}},t}(o),i=function(){function e(){this.fs=require.nodeRequire("fs")}return e.prototype.load=function(t,n,o,r){var i=this.fs.readFileSync(n,"utf8");i.charCodeAt(0)===e.BOM_CHAR_CODE&&(i=i.substring(1)),o(i)},e.BOM_CHAR_CODE=65279,e}(),s=function(){function e(e){this.cssLoader=e}return e.prototype.load=function(n,o,r,i){i=i||{};var s=i["vs/css"]||{};t.inlineResources=s.inlineResources;var l=o.toUrl(n+".css");this.cssLoader.load(n,l,function(t){i.isBuild&&(e.BUILD_MAP[n]=t,e.BUILD_PATH_MAP[n]=l),r({})},function(e){"function"==typeof r.error&&r.error("Could not find "+l+" or it was empty")})},e.prototype.write=function(n,o,r){var i=r.getEntryPoint();t.cssPluginEntryPoints=t.cssPluginEntryPoints||{},t.cssPluginEntryPoints[i]=t.cssPluginEntryPoints[i]||[],t.cssPluginEntryPoints[i].push({moduleName:o,contents:e.BUILD_MAP[o],fsPath:e.BUILD_PATH_MAP[o]}),r.asModule(n+"!"+o,"define(['vs/css!"+i+"'], {});")},e.prototype.writeFile=function(e,n,o,r,i){if(t.cssPluginEntryPoints&&t.cssPluginEntryPoints.hasOwnProperty(n)){for(var s=o.toUrl(n+".css"),u=["/*---------------------------------------------------------"," * Copyright (c) Microsoft Corporation. All rights reserved."," *--------------------------------------------------------*/"],a=t.cssPluginEntryPoints[n],d=0;d=t.length&&e.substr(0,t.length)===t},e.pathOf=function(e){var t=e.lastIndexOf("/");return t!==-1?e.substr(0,t+1):""},e.joinPaths=function(t,n){function o(t,n){return e.startsWith(t,n)?Math.max(n.length,t.indexOf("/",n.length)):0}function r(e,t){if("./"!==t){if("../"===t){var n=e.length>0?e[e.length-1]:null;if(n&&"/"===n)return;if(n&&"../"!==n)return void e.pop()}e.push(t)}}function i(e,t){for(;t.length>0;){var n=t.indexOf("/"),o=n>=0?t.substring(0,n+1):t;t=n>=0?t.substring(n+1):"",r(e,o)}}var s=0;s=s||o(t,"//"),s=s||o(t,"http://"),s=s||o(t,"https://");var l=[];return i(l,t.substr(s)),n.length>0&&"/"===n.charAt(0)&&(l=[]),i(l,n),t.substring(0,s)+l.join("")},e.commonPrefix=function(e,t){for(var n=Math.min(e.length,t.length),o=0;o0&&(" "===i.charAt(i.length-1)||"\t"===i.charAt(i.length-1));)i=i.substring(0,i.length-1);return'"'!==i.charAt(i.length-1)&&"'"!==i.charAt(i.length-1)||(i=i.substring(0,i.length-1)),e.startsWith(i,"data:")||e.startsWith(i,"http://")||e.startsWith(i,"https://")||(i=n(i)),"url("+i+")"})},e.rewriteUrls=function(t,n,o){return this._replaceURL(o,function(o){var r=e.joinPaths(e.pathOf(t),o);return e.relativePath(n,r)})},e.rewriteOrInlineUrls=function(n,o,r,i,s){var l=require.nodeRequire("fs"),u=require.nodeRequire("path");return this._replaceURL(i,function(i){if(/\.(svg|png)$/.test(i)){var a=u.join(u.dirname(n),i),d=l.readFileSync(a);if(d.length<3e3){t.cssInlinedResources=t.cssInlinedResources||[];var c=a.replace(/\\/g,"/");t.cssInlinedResources.indexOf(c)>=0&&console.warn("CSS INLINING IMAGE AT "+a+" MORE THAN ONCE. CONSIDER CONSOLIDATING CSS RULES"),t.cssInlinedResources.push(c);var h=/\.svg$/.test(i)?"image/svg+xml":"image/png",p=";base64,"+d.toString("base64");if(!s&&/\.svg$/.test(i)){var f=d.toString().replace(/"/g,"'").replace(//g,"%3E").replace(/&/g,"%26").replace(/#/g,"%23").replace(/\s+/g," "),g=","+f;g.length=0?new o:"undefined"!=typeof navigator&&navigator.userAgent.indexOf("MSIE 8")>=0?new r:new n,define("vs/css",new s(e))}()}(CSSLoaderPlugin||(CSSLoaderPlugin={}));var _nlsPluginGlobal=this,NLSLoaderPlugin;!function(e){function t(e,t){var n;return n=0===t.length?e:e.replace(/\{(\d+)\}/g,function(e,n){var o=n[0];return"undefined"!=typeof t[o]?t[o]:e}),u&&(n="["+n.replace(/[aouei]/g,"$&$&")+"]"),n}function n(e,t){var n=e[t];return n?n:(n=e["*"],n?n:null)}function o(e,n){for(var o=[],r=0;r=0,a=Array.prototype.slice,d=function(){function e(){this.localize=o}return e.prototype.setPseudoTranslation=function(e){u=e},e.prototype.create=function(e,t){return{localize:r(t[e])}},e.prototype.load=function(t,i,u,a){if(a=a||{},t&&0!==t.length){var d=void 0;if(s&&s.getString)d=".nls.keys",i([t+d],function(e){u({localize:function(t,n){if(!e[t])return"NLS error: unknown key "+t;var o=e[t].keys;if(n>=o.length)return"NLS error unknow index "+n;var r=o[n],i=[];i[0]=t+"_"+r;for(var l=0;l