You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
23 KiB
1 line
23 KiB
5 years ago
|
webpackJsonp([169],{3318:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setupMode=function(e){function t(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return r.getLanguageServiceWorker.apply(r,[e].concat(t))}var r=new i.a(e),n=e.languageId;monaco.languages.registerCompletionItemProvider(n,new o.a(t)),monaco.languages.registerHoverProvider(n,new o.h(t)),monaco.languages.registerDocumentHighlightProvider(n,new o.e(t)),monaco.languages.registerDefinitionProvider(n,new o.b(t)),monaco.languages.registerReferenceProvider(n,new o.i(t)),monaco.languages.registerDocumentSymbolProvider(n,new o.f(t)),monaco.languages.registerRenameProvider(n,new o.j(t)),monaco.languages.registerColorProvider(n,new o.d(t)),monaco.languages.registerFoldingRangeProvider(n,new o.g(t)),new o.c(n,t,e)};var i=n(3319),o=n(3320)},3319:function(e,t,n){"use strict";n.d(t,"a",function(){return r});var r=(i.prototype._stopWorker=function(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null},i.prototype.dispose=function(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()},i.prototype._checkIfIdle=function(){this._worker&&12e4<Date.now()-this._lastUsedTime&&this._stopWorker()},i.prototype._getClient=function(){return this._lastUsedTime=Date.now(),this._client||(this._worker=monaco.editor.createWebWorker({moduleId:"vs/language/css/cssWorker",label:this._defaults.languageId,createData:{languageSettings:this._defaults.diagnosticsOptions,languageId:this._defaults.languageId}}),this._client=this._worker.getProxy()),this._client},i.prototype.getLanguageServiceWorker=function(){for(var t,n=this,r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return this._getClient().then(function(e){t=e}).then(function(e){return n._worker.withSyncedResources(r)}).then(function(e){return t})},i);function i(e){var t=this;this._defaults=e,this._worker=null,this._idleCheckInterval=setInterval(function(){return t._checkIfIdle()},3e4),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(function(){return t._stopWorker()})}},3320:function(e,t,n){"use strict";n.d(t,"c",function(){return r}),n.d(t,"a",function(){return d}),n.d(t,"h",function(){return g}),n.d(t,"e",function(){return p}),n.d(t,"b",function(){return b}),n.d(t,"i",function(){return y}),n.d(t,"j",function(){return w}),n.d(t,"f",function(){return C}),n.d(t,"d",function(){return I}),n.d(t,"g",function(){return S});var o=n(3321),u=monaco.Uri,r=(i.prototype.dispose=function(){this._disposables.forEach(function(e){return e&&e.dispose()}),this._disposables=[]},i.prototype._doValidate=function(r,i){this._worker(r).then(function(e){return e.doValidation(r.toString())}).then(function(e){var t=e.map(function(e){return n="number"==typeof(t=e).code?String(t.code):t.code,{severity:function(e){switch(e){case o.b.Error:return monaco.MarkerSeverity.Error;case o.b.Warning:return monaco.MarkerSeverity.Warning;case o.b.Information:return monaco.MarkerSeverity.Info;case o.b.Hint:return monaco.MarkerSeverity.Hint;default:return monaco.MarkerSeverity.Info}}(t.severity),startLineNumber:t.range.start.line+1,startColumn:t.range.start.character+1,endLineNumber:t.range.end.line+1,endColumn:t.range.end.character+1,message:t.message,code:n,source:t.source};var t,n}),n=monaco.editor.getModel(r);n.getModeId()===i&&monaco.editor.setModelMarkers(n,i,t)}).then(void 0,function(e){console.error(e)})},i);function i(e,t,n){var r=this;this._languageId=e,this._worker=t,this._disposables=[],this._listener=Object.create(null);function i(e){var t,n=e.getModeId();n===r._languageId&&(r._listener[e.uri.toString()]=e.onDidChangeContent(function(){clearTimeout(t),t=setTimeout(function(){return r._doValidate(e.uri,n)},500)}),r._doValidate(e.uri,n))}function o(e){monaco.editor.setModelMarkers(e,r._languageId,[]);var t=e.uri.toString(),n=r._listener[t];n&&(n.dispose(),delete r._listener[t])}this._disposables.push(monaco.editor.onDidCreateModel(i)),this._disposables.push(monaco.editor.onWillDisposeModel(o)),this._disposables.push(monaco.editor
|