amis.define("b6f55bd",function(e,t){"use strict";function r(e,t){return new s(e,t)}Object.defineProperty(t,"__esModule",{value:!0});var n,o=e("11ed2ab"),i=o.__importStar(e("d1bec86")),u=o.__importStar(e("737c70e"));"undefined"!=typeof fetch&&(n=function(e){return fetch(e).then(function(e){return e.text()})});var a=function(){function e(e){this.wrapped=new Promise(e)}return e.prototype.then=function(e,t){var r=this.wrapped;return r.then(e,t)},e.prototype.getWrapped=function(){return this.wrapped},e.resolve=function(e){return Promise.resolve(e)},e.reject=function(e){return Promise.reject(e)},e.all=function(e){return Promise.all(e)},e}(),s=function(){function e(e,t){this._ctx=e,this._languageSettings=t.languageSettings,this._languageId=t.languageId,this._languageService=i.getLanguageService({schemaRequestService:t.enableSchemaRequest&&n,promiseConstructor:a}),this._languageService.configure(this._languageSettings)}return e.prototype.doValidation=function(e){var t=this._getTextDocument(e);if(t){var r=this._languageService.parseJSONDocument(t);return this._languageService.doValidation(t,r)}return Promise.resolve([])},e.prototype.doComplete=function(e,t){var r=this._getTextDocument(e),n=this._languageService.parseJSONDocument(r);return this._languageService.doComplete(r,t,n)},e.prototype.doResolve=function(e){return this._languageService.doResolve(e)},e.prototype.doHover=function(e,t){var r=this._getTextDocument(e),n=this._languageService.parseJSONDocument(r);return this._languageService.doHover(r,t,n)},e.prototype.format=function(e,t,r){var n=this._getTextDocument(e),o=this._languageService.format(n,t,r);return Promise.resolve(o)},e.prototype.resetSchema=function(e){return Promise.resolve(this._languageService.resetSchema(e))},e.prototype.findDocumentSymbols=function(e){var t=this._getTextDocument(e),r=this._languageService.parseJSONDocument(t),n=this._languageService.findDocumentSymbols(t,r);return Promise.resolve(n)},e.prototype.findDocumentColors=function(e){var t=this._getTextDocument(e),r=this._languageService.parseJSONDocument(t),n=this._languageService.findDocumentColors(t,r);return Promise.resolve(n)},e.prototype.getColorPresentations=function(e,t,r){var n=this._getTextDocument(e),o=this._languageService.parseJSONDocument(n),i=this._languageService.getColorPresentations(n,o,t,r);return Promise.resolve(i)},e.prototype.provideFoldingRanges=function(e,t){var r=this._getTextDocument(e),n=this._languageService.getFoldingRanges(r,t);return Promise.resolve(n)},e.prototype._getTextDocument=function(e){for(var t=this._ctx.getMirrorModels(),r=0,n=t;r<n.length;r++){var o=n[r];if(o.uri.toString()===e)return u.TextDocument.create(e,this._languageId,o.version,o.getValue())}return null},e}();t.JSONWorker=s,t.create=r});