amis.define("725fcec",function(t,e){"use strict";function i(t,e){return new u(t,e)}Object.defineProperty(e,"__esModule",{value:!0});var r=t("11ed2ab"),o=r.__importStar(t("03ff426")),n=t("ba73a73"),s={NAME:"defaultLib:lib.d.ts",CONTENTS:n.lib_dts},a={NAME:"defaultLib:lib.es6.d.ts",CONTENTS:n.lib_es6_dts},u=function(){function t(t,e){this._extraLibs=Object.create(null),this._languageService=o.createLanguageService(this),this._ctx=t,this._compilerOptions=e.compilerOptions,this._extraLibs=e.extraLibs}return t.prototype.getCompilationSettings=function(){return this._compilerOptions},t.prototype.getScriptFileNames=function(){var t=this._ctx.getMirrorModels().map(function(t){return t.uri.toString()});return t.concat(Object.keys(this._extraLibs))},t.prototype._getModel=function(t){for(var e=this._ctx.getMirrorModels(),i=0;i<e.length;i++)if(e[i].uri.toString()===t)return e[i];return null},t.prototype.getScriptVersion=function(t){var e=this._getModel(t);return e?e.version.toString():this.isDefaultLibFileName(t)?"1":t in this._extraLibs?String(this._extraLibs[t].version):void 0},t.prototype.getScriptSnapshot=function(t){var e,i=this._getModel(t);if(i)e=i.getValue();else if(t in this._extraLibs)e=this._extraLibs[t].content;else if(t===s.NAME)e=s.CONTENTS;else{if(t!==a.NAME)return;e=a.CONTENTS}return{getText:function(t,i){return e.substring(t,i)},getLength:function(){return e.length},getChangeRange:function(){return void 0}}},t.prototype.getScriptKind=function(t){var e=t.substr(t.lastIndexOf(".")+1);switch(e){case"ts":return o.ScriptKind.TS;case"tsx":return o.ScriptKind.TSX;case"js":return o.ScriptKind.JS;case"jsx":return o.ScriptKind.JSX;default:return this.getCompilationSettings().allowJs?o.ScriptKind.JS:o.ScriptKind.TS}},t.prototype.getCurrentDirectory=function(){return""},t.prototype.getDefaultLibFileName=function(t){return t.target<=o.ScriptTarget.ES5?s.NAME:a.NAME},t.prototype.isDefaultLibFileName=function(t){return t===this.getDefaultLibFileName(this._compilerOptions)},t.clearFiles=function(t){t.forEach(function(t){t.file=void 0;var e=t.relatedInformation;e&&e.forEach(function(t){return t.file=void 0})})},t.prototype.getSyntacticDiagnostics=function(e){var i=this._languageService.getSyntacticDiagnostics(e);return t.clearFiles(i),Promise.resolve(i)},t.prototype.getSemanticDiagnostics=function(e){var i=this._languageService.getSemanticDiagnostics(e);return t.clearFiles(i),Promise.resolve(i)},t.prototype.getCompilerOptionsDiagnostics=function(){var e=this._languageService.getCompilerOptionsDiagnostics();return t.clearFiles(e),Promise.resolve(e)},t.prototype.getCompletionsAtPosition=function(t,e){return Promise.resolve(this._languageService.getCompletionsAtPosition(t,e,void 0))},t.prototype.getCompletionEntryDetails=function(t,e,i){return Promise.resolve(this._languageService.getCompletionEntryDetails(t,e,i,void 0,void 0,void 0))},t.prototype.getSignatureHelpItems=function(t,e){return Promise.resolve(this._languageService.getSignatureHelpItems(t,e,void 0))},t.prototype.getQuickInfoAtPosition=function(t,e){return Promise.resolve(this._languageService.getQuickInfoAtPosition(t,e))},t.prototype.getOccurrencesAtPosition=function(t,e){return Promise.resolve(this._languageService.getOccurrencesAtPosition(t,e))},t.prototype.getDefinitionAtPosition=function(t,e){return Promise.resolve(this._languageService.getDefinitionAtPosition(t,e))},t.prototype.getReferencesAtPosition=function(t,e){return Promise.resolve(this._languageService.getReferencesAtPosition(t,e))},t.prototype.getNavigationBarItems=function(t){return Promise.resolve(this._languageService.getNavigationBarItems(t))},t.prototype.getFormattingEditsForDocument=function(t,e){return Promise.resolve(this._languageService.getFormattingEditsForDocument(t,e))},t.prototype.getFormattingEditsForRange=function(t,e,i,r){return Promise.resolve(this._languageService.getFormattingEditsForRange(t,e,i,r))},t.prototype.getFormattingEditsAfterKeystroke=function(t,e,i,r){return Promise.resolve(this._languageService.getFormattingEditsAfterKeystroke(t,e,i,r))},t.prototype.getEmitOutput=function(t){return Promise.resolve(this._languageService.getEmitOutput(t))},t.prototype.updateExtraLibs=function(t){this._extraLibs=t},t}();e.TypeScriptWorker=u,e.create=i});