amis.define("4435254",function(e,t){"use strict";function r(e,t){return new a(e,t)}Object.defineProperty(t,"__esModule",{value:!0});var i=e("11ed2ab"),n=i.__importStar(e("f5ec2d9")),o=i.__importStar(e("bbb15f3")),a=function(){function e(e,t){switch(this._ctx=e,this._languageSettings=t.languageSettings,this._languageId=t.languageId,this._languageId){case"css":this._languageService=n.getCSSLanguageService();break;case"less":this._languageService=n.getLESSLanguageService();break;case"scss":this._languageService=n.getSCSSLanguageService();break;default:throw new Error("Invalid language id: "+this._languageId)}this._languageService.configure(this._languageSettings)}return e.prototype.doValidation=function(e){var t=this._getTextDocument(e);if(t){var r=this._languageService.parseStylesheet(t),i=this._languageService.doValidation(t,r);return Promise.resolve(i)}return Promise.resolve([])},e.prototype.doComplete=function(e,t){var r=this._getTextDocument(e),i=this._languageService.parseStylesheet(r),n=this._languageService.doComplete(r,t,i);return Promise.resolve(n)},e.prototype.doHover=function(e,t){var r=this._getTextDocument(e),i=this._languageService.parseStylesheet(r),n=this._languageService.doHover(r,t,i);return Promise.resolve(n)},e.prototype.findDefinition=function(e,t){var r=this._getTextDocument(e),i=this._languageService.parseStylesheet(r),n=this._languageService.findDefinition(r,t,i);return Promise.resolve(n)},e.prototype.findReferences=function(e,t){var r=this._getTextDocument(e),i=this._languageService.parseStylesheet(r),n=this._languageService.findReferences(r,t,i);return Promise.resolve(n)},e.prototype.findDocumentHighlights=function(e,t){var r=this._getTextDocument(e),i=this._languageService.parseStylesheet(r),n=this._languageService.findDocumentHighlights(r,t,i);return Promise.resolve(n)},e.prototype.findDocumentSymbols=function(e){var t=this._getTextDocument(e),r=this._languageService.parseStylesheet(t),i=this._languageService.findDocumentSymbols(t,r);return Promise.resolve(i)},e.prototype.doCodeActions=function(e,t,r){var i=this._getTextDocument(e),n=this._languageService.parseStylesheet(i),o=this._languageService.doCodeActions(i,t,r,n);return Promise.resolve(o)},e.prototype.findDocumentColors=function(e){var t=this._getTextDocument(e),r=this._languageService.parseStylesheet(t),i=this._languageService.findDocumentColors(t,r);return Promise.resolve(i)},e.prototype.getColorPresentations=function(e,t,r){var i=this._getTextDocument(e),n=this._languageService.parseStylesheet(i),o=this._languageService.getColorPresentations(i,n,t,r);return Promise.resolve(o)},e.prototype.provideFoldingRanges=function(e,t){var r=this._getTextDocument(e),i=this._languageService.getFoldingRanges(r,t);return Promise.resolve(i)},e.prototype.doRename=function(e,t,r){var i=this._getTextDocument(e),n=this._languageService.parseStylesheet(i),o=this._languageService.doRename(i,t,r,n);return Promise.resolve(o)},e.prototype._getTextDocument=function(e){for(var t=this._ctx.getMirrorModels(),r=0,i=t;r<i.length;r++){var n=i[r];if(n.uri.toString()===e)return o.TextDocument.create(e,this._languageId,n.version,n.getValue())}return null},e}();t.CSSWorker=a,t.create=r});