text: !function(e,t){for(var n in t)e[n]=t[n]}(exports,function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=53)}([function(e,t){e.exports=require("vscode")},function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.createProtocolConnection=void 0;const o=n(36);r(n(36),t),r(n(92),t),t.createProtocolConnection=function(e,t,n,i){return o.createMessageConnection(e,t,n,i)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProtocolNotificationType=t.ProtocolNotificationType0=t.ProtocolRequestType=t.ProtocolRequestType0=t.RegistrationType=void 0;const i=n(12);t.RegistrationType=class{constructor(e){this.method=e}};class r extends i.RequestType0{constructor(e){super(e)}}t.ProtocolRequestType0=r;class o extends i.RequestType{constructor(e){super(e,i.ParameterStructures.byName)}}t.ProtocolRequestType=o;class s extends i.NotificationType0{constructor(e){super(e)}}t.ProtocolNotificationType0=s;class a extends i.NotificationType{constructor(e){super(e,i.ParameterStructures.byName)}}t.ProtocolNotificationType=a},function(e,t,n){const i=n(16),{MAX_LENGTH:r,MAX_SAFE_INTEGER:o}=n(15),{re:s,t:a}=n(10),c=n(17),{compareIdentifiers:u}=n(23);class l{constructor(e,t){if(t=c(t),e instanceof l){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError("Invalid Version: "+e);if(e.length>r)throw new TypeError(`version is longer than ${r} characters`);i("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const n=e.trim().match(t.loose?s[a.LOOSE]:s[a.FULL]);if(!n)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>o||this.major<0)throw new TypeError("Invalid major version");if(this.minor>o||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>o||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map(e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<o)return t}return e}):this.prerelease=[],this.build=n[5]?n[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+="-"+this.prerelease.join(".")),this.version}toString(){return this.version}compare(e){if(i("SemVer.compare",this.version,this.options,e),!(e instanceof l)){if("string"==typeof e&&e===this.version)return 0;e=new l(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof l||(e=new l(e,this.options)),u(this.major,e.major)||u(this.minor,e.minor)||u(this.patch,e.patch)}comparePre(e){if(e instanceof l||(e=new l(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{const n=this.prerelease[t],r=e.prerelease[t];if(i("prerelease compare",t,n,r),void 0===n&&void 0===r)return 0;if(void 0===r)return 1;if(void 0===n)return-1;if(n!==r)return u(n,r)}while(++t)}compareBuild(e){e instanceof l||(e=new l(e,this.options));let t=0;do{const n=this.build[t],r=e.build[t];if(i("prerelease compare",t,n,r),void 0===n&&void 0===r)return 0;if(void 0===r)return 1;if(void 0===n)return-1;if(n!==r)return u(n,r)}while(++t)}inc(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t),this.inc("pre",t);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":if(0===this.prerelease.length)this.prerelease=[0];else{let e=this.prerelease.length;for(;--e>=0;)"number"==typeof this.prerelease[e]&&(this.prerelease[e]++,e=-2);-1===e&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: "+e)}return this.format(),this.raw=this.version,this}}e.exports=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseLanguageClient=t.MessageTransports=t.TextDocumentFeature=t.State=t.RevealOutputChannelOn=t.CloseAction=t.ErrorAction=void 0;const i=n(0),r=n(1),o=n(42),s=n(112),a=n(113),c=n(8),u=n(114),l=n(30),d=n(49);class h{error(e){r.RAL().console.error(e)}warn(e){r.RAL().console.warn(e)}info(e){r.RAL().console.info(e)}log(e){r.RAL().console.log(e)}}var p,f,g,m,v;!function(e){e[e.Continue=1]="Continue",e[e.Shutdown=2]="Shutdown"}(p=t.ErrorAction||(t.ErrorAction={})),function(e){e[e.DoNotRestart=1]="DoNotRestart",e[e.Restart=2]="Restart"}(f=t.CloseAction||(t.CloseAction={}));class y{constructor(e,t){this.name=e,this.maxRestartCount=t,this.restarts=[]}error(e,t,n){return n&&n<=3?p.Continue:p.Shutdown}closed(){if(this.restarts.push(Date.now()),this.restarts.length<=this.maxRestartCount)return f.Restart;return this.restarts[this.restarts.length-1]-this.restarts[0]<=18e4?(i.window.showErrorMessage(`The ${this.name} server crashed ${this.maxRestartCount+1} times in the last 3 minutes. The server will not be restarted.`),f.DoNotRestart):(this.restarts.shift(),f.Restart)}}!function(e){e[e.Info=1]="Info",e[e.Warn=2]="Warn",e[e.Error=3]="Error",e[e.Never=4]="Never"}(g=t.RevealOutputChannelOn||(t.RevealOutputChannelOn={})),function(e){e[e.Stopped=1]="Stopped",e[e.Starting=3]="Starting",e[e.Running=2]="Running"}(m=t.State||(t.State={})),function(e){e[e.Initial=0]="Initial",e[e.Starting=1]="Starting",e[e.StartFailed=2]="StartFailed",e[e.Running=3]="Running",e[e.Stopping=4]="Stopping",e[e.Stopped=5]="Stopped"}(v||(v={}));const C=[r.SymbolKind.File,r.SymbolKind.Module,r.SymbolKind.Namespace,r.SymbolKind.Package,r.SymbolKind.Class,r.SymbolKind.Method,r.SymbolKind.Property,r.SymbolKind.Field,r.SymbolKind.Constructor,r.SymbolKind.Enum,r.SymbolKind.Interface,r.SymbolKind.Function,r.SymbolKind.Variable,r.SymbolKind.Constant,r.SymbolKind.String,r.SymbolKind.Number,r.SymbolKind.Boolean,r.SymbolKind.Array,r.SymbolKind.Object,r.SymbolKind.Key,r.SymbolKind.Null,r.SymbolKind.EnumMember,r.SymbolKind.Struct,r.SymbolKind.Event,r.SymbolKind.Operator,r.SymbolKind.TypeParameter],R=[r.CompletionItemKind.Text,r.CompletionItemKind.Method,r.CompletionItemKind.Function,r.CompletionItemKind.Constructor,r.CompletionItemKind.Field,r.CompletionItemKind.Variable,r.CompletionItemKind.Class,r.CompletionItemKind.Interface,r.CompletionItemKind.Module,r.CompletionItemKind.Property,r.CompletionItemKind.Unit,r.CompletionItemKind.Value,r.CompletionItemKind.Enum,r.CompletionItemKind.Keyword,r.CompletionItemKind.Snippet,r.CompletionItemKind.Color,r.CompletionItemKind.File,r.CompletionItemKind.Reference,r.CompletionItemKind.Folder,r.CompletionItemKind.EnumMember,r.CompletionItemKind.Constant,r.CompletionItemKind.Struct,r.CompletionItemKind.Event,r.CompletionItemKind.Operator,r.CompletionItemKind.TypeParameter],w=[r.SymbolTag.Deprecated];function b(e,t){return void 0===e[t]&&(e[t]={}),e[t]}var T,S;!function(e){e.fromConfiguration=function(e){const t=i.workspace.getConfiguration("files",e);return{trimTrailingWhitespace:t.get("trimTrailingWhitespace"),trimFinalNewlines:t.get("trimFinalNewlines"),insertFinalNewline:t.get("insertFinalNewline")}}}(T||(T={})),function(e){e.is=function(e){let t=e;return t&&c.func(t.register)&&c.func(t.unregister)&&c.func(t.dispose)&&void 0!==t.registrationType}}(S||(S={}));class _{constructor(e,t,n,i,r,o){this._client=e,this._event=t,this._type=n,this._middleware=i,this._createParams=r,this._selectorFilter=o,this._selectors=new Map}static textDocumentFilter(e,t){for(const n of e)if(i.languages.match(n,t))return!0;return!1}register(e){e.registerOptions.documentSelector&&(this._listener||(this._listener=this._event(this.callback,this)),this._selectors.set(e.id,e.registerOptions.documentSelector))}callback(e){this._selectorFilter&&!this._selectorFilter(this._selectors.values(),e)||(this._middleware?this._middleware(e,e=>this._client.sendNotification(this._type,this._createParams(e))):this._client.sendNotification(this._type,this._createParams(e)),this.notificationSent(e))}notificationSent(e){}unregister(e){this._selectors.delete(e),0===this._selectors.size&&this._listener&&(this._listener.dispose(),this._listener=void 0)}dispose(){this._selectors.clear(),this._listener&&(this._listener.dispose(),this._listener=void 0)}getProvider(e){for(const t of this._selectors.values())if(i.languages.match(t,e))return{send:e=>{this.callback(e)}}}}class P extends _{constructor(e,t){super(e,i.workspace.onDidOpenTextDocument,r.DidOpenTextDocumentNotification.type,e.clientOptions.middleware.didOpen,t=>e.code2ProtocolConverter.asOpenTextDocumentParams(t),_.textDocumentFilter),this._syncedDocuments=t}fillClientCapabilities(e){b(b(e,"textDocument"),"synchronization").dynamicRegistration=!0}initialize(e,t){let n=e.resolvedTextDocumentSync;t&&n&&n.openClose&&this.register({id:l.generateUuid(),registerOptions:{documentSelector:t}})}get registrationType(){return r.DidOpenTextDocumentNotification.type}register(e){if(super.register(e),!e.registerOptions.documentSelector)return;let t=e.registerOptions.documentSelector;i.workspace.textDocuments.forEach(e=>{let n=e.uri.toString();if(!this._syncedDocuments.has(n)&&i.languages.match(t,e)){let t=this._client.clientOptions.middleware,i=e=>{this._client.sendNotification(this._type,this._createParams(e))};t.didOpen?t.didOpen(e,i):i(e),this._syncedDocuments.set(n,e)}})}notificationSent(e){super.notificationSent(e),this._syncedDocuments.set(e.uri.toString(),e)}}class D extends _{constructor(e,t){super(e,i.workspace.onDidCloseTextDocument,r.DidCloseTextDocumentNotification.type,e.clientOptions.middleware.didClose,t=>e.code2ProtocolConverter.asCloseTextDocumentParams(t),_.textDocumentFilter),this._syncedDocuments=t}get registrationType(){return r.DidCloseTextDocumentNotification.type}fillClientCapabilities(e){b(b(e,"textDocument"),"synchronization").dynamicRegistration=!0}initialize(e,t){let n=e.resolvedTextDocumentSync;t&&n&&n.openClose&&this.register({id:l.generateUuid(),registerOptions:{documentSelector:t}})}notificationSent(e){super.notificationSent(e),this._syncedDocuments.delete(e.uri.toString())}unregister(e){let t=this._selectors.get(e);super.unregister(e);let n=this._selectors.values();this._syncedDocuments.forEach(e=>{if(i.languages.match(t,e)&&!this._selectorFilter(n,e)){let t=this._client.clientOptions.middleware,n=e=>{this._client.sendNotification(this._type,this._createParams(e))};this._syncedDocuments.delete(e.uri.toString()),t.didClose?t.didClose(e,n):n(e)}})}}class E{constructor(e){this._client=e,this._changeData=new Map,this._forcingDelivery=!1}get registrationType(){return r.DidChangeTextDocumentNotification.type}fillClientCapabilities(e){b(b(e,"textDocument"),"synchronization").dynamicRegistration=!0}initialize(e,t){let n=e.resolvedTextDocumentSync;t&&n&&void 0!==n.change&&n.change!==r.TextDocumentSyncKind.None&&this.register({id:l.generateUuid(),registerOptions:Object.assign({},{documentSelector:t},{syncKind:n.change})})}register(e){e.registerOptions.documentSelector&&(this._listener||(this._listener=i.workspace.onDidChangeTextDocument(this.callback,this)),this._changeData.set(e.id,{documentSelector:e.registerOptions.documentSelector,syncKind:e.registerOptions.syncKind}))}callback(e){if(0!==e.contentChanges.length)for(const t of this._changeData.values())if(i.languages.match(t.documentSelector,e.document)){let n=this._client.clientOptions.middleware;if(t.syncKind===r.TextDocumentSyncKind.Incremental){let t=this._client.code2ProtocolConverter.asChangeTextDocumentParams(e);n.didChange?n.didChange(e,()=>this._client.sendNotification(r.DidChangeTextDocumentNotification.type,t)):this._client.sendNotification(r.DidChangeTextDocumentNotification.type,t)}else if(t.syncKind===r.TextDocumentSyncKind.Full){let t=e=>{this._changeDelayer?(this._changeDelayer.uri!==e.document.uri.toString()&&(this.forceDelivery(),this._changeDelayer.uri=e.document.uri.toString()),this._changeDelayer.delayer.trigger(()=>{this._client.sendNotification(r.DidChangeTextDocumentNotification.type,this._client.code2ProtocolConverter.asChangeTextDocumentParams(e.document))})):(this._changeDelayer={uri:e.document.uri.toString(),delayer:new u.Delayer(200)},this._changeDelayer.delayer.trigger(()=>{this._client.sendNotification(r.DidChangeTextDocumentNotification.type,this._client.code2ProtocolConverter.asChangeTextDocumentParams(e.document))},-1))};n.didChange?n.didChange(e,t):t(e)}}}unregister(e){this._changeData.delete(e),0===this._changeData.size&&this._listener&&(this._listener.dispose(),this._listener=void 0)}dispose(){this._changeDelayer=void 0,this._forcingDelivery=!1,this._changeData.clear(),this._listener&&(this._listener.dispose(),this._listener=void 0)}forceDelivery(){if(!this._forcingDelivery&&this._changeDelayer)try{this._forcingDelivery=!0,this._changeDelayer.delayer.forceDelivery()}finally{this._forcingDelivery=!1}}getProvider(e){for(const t of this._changeData.values())if(i.languages.match(t.documentSelector,e))return{send:e=>{this.callback(e)}}}}class x extends _{constructor(e){super(e,i.workspace.onWillSaveTextDocument,r.WillSaveTextDocumentNotification.type,e.clientOptions.middleware.willSave,t=>e.code2ProtocolConverter.asWillSaveTextDocumentParams(t),(e,t)=>_.textDocumentFilter(e,t.document))}get registrationType(){return r.WillSaveTextDocumentNotification.type}fillClientCapabilities(e){b(b(e,"textDocument"),"synchronization").willSave=!0}initialize(e,t){let n=e.resolvedTextDocumentSync;t&&n&&n.willSave&&this.register({id:l.generateUuid(),registerOptions:{documentSelector:t}})}}class k{constructor(e){this._client=e,this._selectors=new Map}get registrationType(){return r.WillSaveTextDocumentWaitUntilRequest.type}fillClientCapabilities(e){b(b(e,"textDocument"),"synchronization").willSaveWaitUntil=!0}initialize(e,t){let n=e.resolvedTextDocumentSync;t&&n&&n.willSaveWaitUntil&&this.register({id:l.generateUuid(),registerOptions:{documentSelector:t}})}register(e){e.registerOptions.documentSelector&&(this._listener||(this._listener=i.workspace.onWillSaveTextDocument(this.callback,this)),this._selectors.set(e.id,e.registerOptions.documentSelector))}callback(e){if(_.textDocumentFilter(this._selectors.values(),e.document)){let t=this._client.clientOptions.middleware,n=e=>this._client.sendRequest(r.WillSaveTextDocumentWaitUntilRequest.type,this._client.code2ProtocolConverter.asWillSaveTextDocumentParams(e)).then(e=>{let t=this._client.protocol2CodeConverter.asTextEdits(e);return void 0===t?[]:t});e.waitUntil(t.willSaveWaitUntil?t.willSaveWaitUntil(e,n):n(e))}}unregister(e){this._selectors.delete(e),0===this._selectors.size&&this._listener&&(this._listener.dispose(),this._listener=void 0)}dispose(){this._selectors.clear(),this._listener&&(this._listener.dispose(),this._listener=void 0)}}class O extends _{constructor(e){super(e,i.workspace.onDidSaveTextDocument,r.DidSaveTextDocumentNotification.type,e.clientOptions.middleware.didSave,t=>e.code2ProtocolConverter.asSaveTextDocumentParams(t,this._includeText),_.textDocumentFilter),this._includeText=!1}get registrationType(){return r.DidSaveTextDocumentNotification.type}fillClientCapabilities(e){b(b(e,"textDocument"),"synchronization").didSave=!0}initialize(e,t){const n=e.resolvedTextDocumentSync;if(t&&n&&n.save){const e="boolean"==typeof n.save?{includeText:!1}:{includeText:!!n.save.includeText};this.register({id:l.generateUuid(),registerOptions:Object.assign({},{documentSelector:t},e)})}}register(e){this._includeText=!!e.registerOptions.includeText,super.register(e)}}class F{constructor(e,t){this._client=e,this._notifyFileEvent=t,this._watchers=new Map}get registrationType(){return r.DidChangeWatchedFilesNotification.type}fillClientCapabilities(e){b(b(e,"workspace"),"didChangeWatchedFiles").dynamicRegistration=!0}initialize(e,t){}register(e){if(!Array.isArray(e.registerOptions.watchers))return;let t=[];for(let n of e.registerOptions.watchers){if(!c.string(n.globPattern))continue;let e=!0,o=!0,s=!0;void 0!==n.kind&&null!==n.kind&&(e=0!=(n.kind&r.WatchKind.Create),o=0!=(n.kind&r.WatchKind.Change),s=0!=(n.kind&r.WatchKind.Delete));let a=i.workspace.createFileSystemWatcher(n.globPattern,!e,!o,!s);this.hookListeners(a,e,o,s),t.push(a)}this._watchers.set(e.id,t)}registerRaw(e,t){let n=[];for(let e of t)this.hookListeners(e,!0,!0,!0,n);this._watchers.set(e,n)}hookListeners(e,t,n,i,o){t&&e.onDidCreate(e=>this._notifyFileEvent({uri:this._client.code2ProtocolConverter.asUri(e),type:r.FileChangeType.Created}),null,o),n&&e.onDidChange(e=>this._notifyFileEvent({uri:this._client.code2ProtocolConverter.asUri(e),type:r.FileChangeType.Changed}),null,o),i&&e.onDidDelete(e=>this._notifyFileEvent({uri:this._client.code2ProtocolConverter.asUri(e),type:r.FileChangeType.Deleted}),null,o)}unregister(e){let t=this._watchers.get(e);if(t)for(let e of t)e.dispose()}dispose(){this._watchers.forEach(e=>{for(let t of e)t.dispose()}),this._watchers.clear()}}class q{constructor(e,t){this._client=e,this._registrationType=t,this._registrations=new Map}get registrationType(){return this._registrationType}register(e){if(!e.registerOptions.documentSelector)return;let t=this.registerLanguageProvider(e.registerOptions);this._registrations.set(e.id,{disposable:t[0],data:e,provider:t[1]})}unregister(e){let t=this._registrations.get(e);void 0!==t&&t.disposable.dispose()}dispose(){this._registrations.forEach(e=>{e.disposable.dispose()}),this._registrations.clear()}getRegistration(e,t){if(!t)return[void 0,void 0];if(r.TextDocumentRegistrationOptions.is(t)){const n=r.StaticRegistrationOptions.hasId(t)?t.id:l.generateUuid(),i=t.documentSelector||e;if(i)return[n,Object.assign({},t,{documentSelector:i})]}else if(c.boolean(t)&&!0===t||r.WorkDoneProgressOptions.is(t)){if(!e)return[void 0,void 0];let n=c.boolean(t)&&!0===t?{documentSelector:e}:Object.assign({},t,{documentSelector:e});return[l.generateUuid(),n]}return[void 0,void 0]}getRegistrationOptions(e,t){if(e&&t)return c.boolean(t)&&!0===t?{documentSelector:e}:Object.assign({},t,{documentSelector:e})}getProvider(e){for(const t of this._registrations.values()){let n=t.data.registerOptions.documentSelector;if(null!==n&&i.languages.match(n,e))return t.provider}}getAllProviders(){const e=[];for(const t of this._registrations.values())e.push(t.provider);return e}}t.TextDocumentFeature=q;class N extends q{constructor(e){super(e,r.CompletionRequest.type)}fillClientCapabilities(e){let t=b(b(e,"textDocument"),"completion");t.dynamicRegistration=!0,t.contextSupport=!0,t.completionItem={snippetSupport:!0,commitCharactersSupport:!0,documentationFormat:[r.MarkupKind.Markdown,r.MarkupKind.PlainText],deprecatedSupport:!0,preselectSupport:!0,tagSupport:{valueSet:[r.CompletionItemTag.Deprecated]},insertReplaceSupport:!0,resolveSupport:{properties:["documentation","detail","additionalTextEdits"]},insertTextModeSupport:{valueSet:[r.InsertTextMode.asIs,r.InsertTextMode.adjustIndentation]}},t.completionItemKind={valueSet:R}}initialize(e,t){const n=this.getRegistrationOptions(t,e.completionProvider);n&&this.register({id:l.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t=e.triggerCharacters||[],n={provideCompletionItems:(e,t,n,i)=>{const o=this._client,s=this._client.clientOptions.middleware,a=(e,t,n,i)=>o.sendRequest(r.CompletionRequest.type,o.code2ProtocolConverter.asCompletionParams(e,t,n),i).then(o.protocol2CodeConverter.asCompletionResult,e=>o.handleFailedRequest(r.CompletionRequest.type,e,null));return s.provideCompletionItem?s.provideCompletionItem(e,t,i,n,a):a(e,t,i,n)},resolveCompletionItem:e.resolveProvider?(e,t)=>{const n=this._client,i=this._client.clientOptions.middleware,o=(e,t)=>n.sendRequest(r.CompletionResolveRequest.type,n.code2ProtocolConverter.asCompletionItem(e),t).then(n.protocol2CodeConverter.asCompletionItem,t=>n.handleFailedRequest(r.CompletionResolveRequest.type,t,e));return i.resolveCompletionItem?i.resolveCompletionItem(e,t,o):o(e,t)}:void 0};return[i.languages.registerCompletionItemProvider(e.documentSelector,n,...t),n]}}class I extends q{constructor(e){super(e,r.HoverRequest.type)}fillClientCapabilities(e){const t=b(b(e,"textDocument"),"hover");t.dynamicRegistration=!0,t.contentFormat=[r.MarkupKind.Markdown,r.MarkupKind.PlainText]}initialize(e,t){const n=this.getRegistrationOptions(t,e.hoverProvider);n&&this.register({id:l.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t={provideHover:(e,t,n)=>{const i=this._client,o=(e,t,n)=>i.sendRequest(r.HoverRequest.type,i.code2ProtocolConverter.asTextDocumentPositionParams(e,t),n).then(i.protocol2CodeConverter.asHover,e=>i.handleFailedRequest(r.HoverRequest.type,e,null)),s=i.clientOptions.middleware;return s.provideHover?s.provideHover(e,t,n,o):o(e,t,n)}};return[i.languages.registerHoverProvider(e.documentSelector,t),t]}}class M extends q{constructor(e){super(e,r.SignatureHelpRequest.type)}fillClientCapabilities(e){let t=b(b(e,"textDocument"),"signatureHelp");t.dynamicRegistration=!0,t.signatureInformation={documentationFormat:[r.MarkupKind.Markdown,r.MarkupKind.PlainText]},t.signatureInformation.parameterInformation={labelOffsetSupport:!0},t.signatureInformation.activeParameterSupport=!0,t.contextSupport=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.signatureHelpProvider);n&&this.register({id:l.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t={provideSignatureHelp:(e,t,n,i)=>{const o=this._client,s=(e,t,n,i)=>o.sendRequest(r.SignatureHelpRequest.type,o.code2ProtocolConverter.asSignatureHelpParams(e,t,n),i).then(o.protocol2CodeConverter.asSignatureHelp,e=>o.handleFailedRequest(r.SignatureHelpRequest.type,e,null)),a=o.clientOptions.middleware;return a.provideSignatureHelp?a.provideSignatureHelp(e,t,i,n,s):s(e,t,i,n)}};let n;if(void 0===e.retriggerCharacters){const r=e.triggerCharacters||[];n=i.languages.registerSignatureHelpProvider(e.documentSelector,t,...r)}else{const r={triggerCharacters:e.triggerCharacters||[],retriggerCharacters:e.retriggerCharacters||[]};n=i.languages.registerSignatureHelpProvider(e.documentSelector,t,r)}return[n,t]}}class A extends q{constructor(e){super(e,r.DefinitionRequest.type)}fillClientCapabilities(e){let t=b(b(e,"textDocument"),"definition");t.dynamicRegistration=!0,t.linkSupport=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.definitionProvider);n&&this.register({id:l.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t={provideDefinition:(e,t,n)=>{const i=this._client,o=(e,t,n)=>i.sendRequest(r.DefinitionRequest.type,i.code2ProtocolConverter.asTextDocumentPositionParams(e,t),n).then(i.protocol2CodeConverter.asDefinitionResult,e=>i.handleFailedRequest(r.DefinitionRequest.type,e,null)),s=i.clientOptions.middleware;return s.provideDefinition?s.provideDefinition(e,t,n,o):o(e,t,n)}};return[i.languages.registerDefinitionProvider(e.documentSelector,t),t]}}class L extends q{constructor(e){super(e,r.ReferencesRequest.type)}fillClientCapabilities(e){b(b(e,"textDocument"),"references").dynamicRegistration=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.referencesProvider);n&&this.register({id:l.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t={provideReferences:(e,t,n,i)=>{const o=this._client,s=(e,t,n,i)=>o.sendRequest(r.ReferencesRequest.type,o.code2ProtocolConverter.asReferenceParams(e,t,n),i).then(o.protocol2CodeConverter.asReferences,e=>o.handleFailedRequest(r.ReferencesRequest.type,e,null)),a=o.clientOptions.middleware;return a.provideReferences?a.provideReferences(e,t,n,i,s):s(e,t,n,i)}};return[i.languages.registerReferenceProvider(e.documentSelector,t),t]}}class j extends q{constructor(e){super(e,r.DocumentHighlightRequest.type)}fillClientCapabilities(e){b(b(e,"textDocument"),"documentHighlight").dynamicRegistration=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.documentHighlightProvider);n&&this.register({id:l.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t={provideDocumentHighlights:(e,t,n)=>{const i=this._client,o=(e,t,n)=>i.sendRequest(r.DocumentHighlightRequest.type,i.code2ProtocolConverter.asTextDocumentPositionParams(e,t),n).then(i.protocol2CodeConverter.asDocumentHighlights,e=>i.handleFailedRequest(r.DocumentHighlightRequest.type,e,null)),s=i.clientOptions.middleware;return s.provideDocumentHighlights?s.provideDocumentHighlights(e,t,n,o):o(e,t,n)}};return[i.languages.registerDocumentHighlightProvider(e.documentSelector,t),t]}}class $ extends q{constructor(e){super(e,r.DocumentSymbolRequest.type)}fillClientCapabilities(e){let t=b(b(e,"textDocument"),"documentSymbol");t.dynamicRegistration=!0,t.symbolKind={valueSet:C},t.hierarchicalDocumentSymbolSupport=!0,t.tagSupport={valueSet:w},t.labelSupport=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.documentSymbolProvider);n&&this.register({id:l.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t={provideDocumentSymbols:(e,t)=>{const n=this._client,i=(e,t)=>n.sendRequest(r.DocumentSymbolRequest.type,n.code2ProtocolConverter.asDocumentSymbolParams(e),t).then(e=>{if(null!==e){if(0===e.length)return[];{let t=e[0];return r.DocumentSymbol.is(t)?n.protocol2CodeConverter.asDocumentSymbols(e):n.protocol2CodeConverter.asSymbolInformations(e)}}},e=>n.handleFailedRequest(r.DocumentSymbolRequest.type,e,null)),o=n.clientOptions.middleware;return o.provideDocumentSymbols?o.provideDocumentSymbols(e,t,i):i(e,t)}},n=void 0!==e.label?{label:e.label}:void 0;return[i.languages.registerDocumentSymbolProvider(e.documentSelector,t,n),t]}}class W extends class{constructor(e,t){this._client=e,this._registrationType=t,this._registrations=new Map}get registrationType(){return this._registrationType}register(e){const t=this.registerLanguageProvider(e.registerOptions);this._registrations.set(e.id,{disposable:t[0],provider:t[1]})}unregister(e){let t=this._registrations.get(e);void 0!==t&&t.disposable.dispose()}dispose(){this._registrations.forEach(e=>{e.disposable.dispose()}),this._registrations.clear()}getProviders(){const e=[];for(const t of this._registrations.values())e.push(t.provider);return e}}{constructor(e){super(e,r.WorkspaceSymbolRequest.type)}fillClientCapabilities(e){let t=b(b(e,"workspace"),"symbol");t.dynamicRegistration=!0,t.symbolKind={valueSet:C},t.tagSupport={valueSet:w}}initialize(e){e.workspaceSymbolProvider&&this.register({id:l.generateUuid(),registerOptions:!0===e.workspaceSymbolProvider?{workDoneProgress:!1}:e.workspaceSymbolProvider})}registerLanguageProvider(e){const t={provideWorkspaceSymbols:(e,t)=>{const n=this._client,i=(e,t)=>n.sendRequest(r.WorkspaceSymbolRequest.type,{query:e},t).then(n.protocol2CodeConverter.asSymbolInformations,e=>n.handleFailedRequest(r.WorkspaceSymbolRequest.type,e,null)),o=n.clientOptions.middleware;return o.provideWorkspaceSymbols?o.provideWorkspaceSymbols(e,t,i):i(e,t)}};return[i.languages.registerWorkspaceSymbolProvider(t),t]}}class K extends q{constructor(e){super(e,r.CodeActionRequest.type)}fillClientCapabilities(e){const t=b(b(e,"textDocument"),"codeAction");t.dynamicRegistration=!0,t.isPreferredSupport=!0,t.disabledSupport=!0,t.dataSupport=!0,t.resolveSupport={properties:["edit"]},t.codeActionLiteralSupport={codeActionKind:{valueSet:[r.CodeActionKind.Empty,r.CodeActionKind.QuickFix,r.CodeActionKind.Refactor,r.CodeActionKind.RefactorExtract,r.CodeActionKind.RefactorInline,r.CodeActionKind.RefactorRewrite,r.CodeActionKind.Source,r.CodeActionKind.SourceOrganizeImports]}},t.honorsChangeAnnotations=!1}initialize(e,t){const n=this.getRegistrationOptions(t,e.codeActionProvider);n&&this.register({id:l.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t={provideCodeActions:(e,t,n,i)=>{const o=this._client,s=(e,t,n,i)=>{const s={textDocument:o.code2ProtocolConverter.asTextDocumentIdentifier(e),range:o.code2ProtocolConverter.asRange(t),context:o.code2ProtocolConverter.asCodeActionContext(n)};return o.sendRequest(r.CodeActionRequest.type,s,i).then(e=>{if(null===e)return;const t=[];for(let n of e)r.Command.is(n)?t.push(o.protocol2CodeConverter.asCommand(n)):t.push(o.protocol2CodeConverter.asCodeAction(n));return t},e=>o.handleFailedRequest(r.CodeActionRequest.type,e,null))},a=o.clientOptions.middleware;return a.provideCodeActions?a.provideCodeActions(e,t,n,i,s):s(e,t,n,i)},resolveCodeAction:e.resolveProvider?(e,t)=>{const n=this._client,i=this._client.clientOptions.middleware,o=(e,t)=>n.sendRequest(r.CodeActionResolveRequest.type,n.code2ProtocolConverter.asCodeAction(e),t).then(n.protocol2CodeConverter.asCodeAction,t=>n.handleFailedRequest(r.CodeActionResolveRequest.type,t,e));return i.resolveCodeAction?i.resolveCodeAction(e,t,o):o(e,t)}:void 0};return[i.languages.registerCodeActionsProvider(e.documentSelector,t,e.codeActionKinds?{providedCodeActionKinds:this._client.protocol2CodeConverter.asCodeActionKinds(e.codeActionKinds)}:void 0),t]}}class U extends q{constructor(e){super(e,r.CodeLensRequest.type)}fillClientCapabilities(e){b(b(e,"textDocument"),"codeLens").dynamicRegistration=!0,b(b(e,"workspace"),"codeLens").refreshSupport=!0}initialize(e,t){this._client.onRequest(r.CodeLensRefreshRequest.type,async()=>{for(const e of this.getAllProviders())e.onDidChangeCodeLensEmitter.fire()});const n=this.getRegistrationOptions(t,e.codeLensProvider);n&&this.register({id:l.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t=new i.EventEmitter,n={onDidChangeCodeLenses:t.event,provideCodeLenses:(e,t)=>{const n=this._client,i=(e,t)=>n.sendRequest(r.CodeLensRequest.type,n.code2ProtocolConverter.asCodeLensParams(e),t).then(n.protocol2CodeConverter.asCodeLenses,e=>n.handleFailedRequest(r.CodeLensRequest.type,e,null)),o=n.clientOptions.middleware;return o.provideCodeLenses?o.provideCodeLenses(e,t,i):i(e,t)},resolveCodeLens:e.resolveProvider?(e,t)=>{const n=this._client,i=(e,t)=>n.sendRequest(r.CodeLensResolveRequest.type,n.code2ProtocolConverter.asCodeLens(e),t).then(n.protocol2CodeConverter.asCodeLens,t=>n.handleFailedRequest(r.CodeLensResolveRequest.type,t,e)),o=n.clientOptions.middleware;return o.resolveCodeLens?o.resolveCodeLens(e,t,i):i(e,t)}:void 0};return[i.languages.registerCodeLensProvider(e.documentSelector,n),{provider:n,onDidChangeCodeLensEmitter:t}]}}class H extends q{constructor(e){super(e,r.DocumentFormattingRequest.type)}fillClientCapabilities(e){b(b(e,"textDocument"),"formatting").dynamicRegistration=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.documentFormattingProvider);n&&this.register({id:l.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t={provideDocumentFormattingEdits:(e,t,n)=>{const i=this._client,o=(e,t,n)=>{const o={textDocument:i.code2ProtocolConverter.asTextDocumentIdentifier(e),options:i.code2ProtocolConverter.asFormattingOptions(t,T.fromConfiguration(e))};return i.sendRequest(r.DocumentFormattingRequest.type,o,n).then(i.protocol2CodeConverter.asTextEdits,e=>i.handleFailedRequest(r.DocumentFormattingRequest.type,e,null))},s=i.clientOptions.middleware;return s.provideDocumentFormattingEdits?s.provideDocumentFormattingEdits(e,t,n,o):o(e,t,n)}};return[i.languages.registerDocumentFormattingEditProvider(e.documentSelector,t),t]}}class z extends q{constructor(e){super(e,r.DocumentRangeFormattingRequest.type)}fillClientCapabilities(e){b(b(e,"textDocument"),"rangeFormatting").dynamicRegistration=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.documentRangeFormattingProvider);n&&this.register({id:l.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t={provideDocumentRangeFormattingEdits:(e,t,n,i)=>{const o=this._client,s=(e,t,n,i)=>{const s={textDocument:o.code2ProtocolConverter.asTextDocumentIdentifier(e),range:o.code2ProtocolConverter.asRange(t),options:o.code2ProtocolConverter.asFormattingOptions(n,T.fromConfiguration(e))};return o.sendRequest(r.DocumentRangeFormattingRequest.type,s,i).then(o.protocol2CodeConverter.asTextEdits,e=>o.handleFailedRequest(r.DocumentRangeFormattingRequest.type,e,null))},a=o.clientOptions.middleware;return a.provideDocumentRangeFormattingEdits?a.provideDocumentRangeFormattingEdits(e,t,n,i,s):s(e,t,n,i)}};return[i.languages.registerDocumentRangeFormattingEditProvider(e.documentSelector,t),t]}}class B extends q{constructor(e){super(e,r.DocumentOnTypeFormattingRequest.type)}fillClientCapabilities(e){b(b(e,"textDocument"),"onTypeFormatting").dynamicRegistration=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.documentOnTypeFormattingProvider);n&&this.register({id:l.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t={provideOnTypeFormattingEdits:(e,t,n,i,o)=>{const s=this._client,a=(e,t,n,i,o)=>{let a={textDocument:s.code2ProtocolConverter.asTextDocumentIdentifier(e),position:s.code2ProtocolConverter.asPosition(t),ch:n,options:s.code2ProtocolConverter.asFormattingOptions(i,T.fromConfiguration(e))};return s.sendRequest(r.DocumentOnTypeFormattingRequest.type,a,o).then(s.protocol2CodeConverter.asTextEdits,e=>s.handleFailedRequest(r.DocumentOnTypeFormattingRequest.type,e,null))},c=s.clientOptions.middleware;return c.provideOnTypeFormattingEdits?c.provideOnTypeFormattingEdits(e,t,n,i,o,a):a(e,t,n,i,o)}},n=e.moreTriggerCharacter||[];return[i.languages.registerOnTypeFormattingEditProvider(e.documentSelector,t,e.firstTriggerCharacter,...n),t]}}class G extends q{constructor(e){super(e,r.RenameRequest.type)}fillClientCapabilities(e){let t=b(b(e,"textDocument"),"rename");t.dynamicRegistration=!0,t.prepareSupport=!0,t.prepareSupportDefaultBehavior=r.PrepareSupportDefaultBehavior.Identifier,t.honorsChangeAnnotations=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.renameProvider);n&&(c.boolean(e.renameProvider)&&(n.prepareProvider=!1),this.register({id:l.generateUuid(),registerOptions:n}))}registerLanguageProvider(e){const t={provideRenameEdits:(e,t,n,i)=>{const o=this._client,s=(e,t,n,i)=>{let s={textDocument:o.code2ProtocolConverter.asTextDocumentIdentifier(e),position:o.code2ProtocolConverter.asPosition(t),newName:n};return o.sendRequest(r.RenameRequest.type,s,i).then(o.protocol2CodeConverter.asWorkspaceEdit,e=>o.handleFailedRequest(r.RenameRequest.type,e,null))},a=o.clientOptions.middleware;return a.provideRenameEdits?a.provideRenameEdits(e,t,n,i,s):s(e,t,n,i)},prepareRename:e.prepareProvider?(e,t,n)=>{const i=this._client,o=(e,t,n)=>{let o={textDocument:i.code2ProtocolConverter.asTextDocumentIdentifier(e),position:i.code2ProtocolConverter.asPosition(t)};return i.sendRequest(r.PrepareRenameRequest.type,o,n).then(e=>r.Range.is(e)?i.protocol2CodeConverter.asRange(e):this.isDefaultBehavior(e)?!0===e.defaultBehavior?null:Promise.reject(new Error("The element can't be renamed.")):e&&r.Range.is(e.range)?{range:i.protocol2CodeConverter.asRange(e.range),placeholder:e.placeholder}:Promise.reject(new Error("The element can't be renamed.")),e=>i.handleFailedRequest(r.PrepareRenameRequest.type,e,void 0))},s=i.clientOptions.middleware;return s.prepareRename?s.prepareRename(e,t,n,o):o(e,t,n)}:void 0};return[i.languages.registerRenameProvider(e.documentSelector,t),t]}isDefaultBehavior(e){const t=e;return t&&c.boolean(t.defaultBehavior)}}class V extends q{constructor(e){super(e,r.DocumentLinkRequest.type)}fillClientCapabilities(e){const t=b(b(e,"textDocument"),"documentLink");t.dynamicRegistration=!0,t.tooltipSupport=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.documentLinkProvider);n&&this.register({id:l.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t={provideDocumentLinks:(e,t)=>{const n=this._client,i=(e,t)=>n.sendRequest(r.DocumentLinkRequest.type,n.code2ProtocolConverter.asDocumentLinkParams(e),t).then(n.protocol2CodeConverter.asDocumentLinks,e=>n.handleFailedRequest(r.DocumentLinkRequest.type,e,null)),o=n.clientOptions.middleware;return o.provideDocumentLinks?o.provideDocumentLinks(e,t,i):i(e,t)},resolveDocumentLink:e.resolveProvider?(e,t)=>{const n=this._client;let i=(e,t)=>n.sendRequest(r.DocumentLinkResolveRequest.type,n.code2ProtocolConverter.asDocumentLink(e),t).then(n.protocol2CodeConverter.asDocumentLink,t=>n.handleFailedRequest(r.DocumentLinkResolveRequest.type,t,e));const o=n.clientOptions.middleware;return o.resolveDocumentLink?o.resolveDocumentLink(e,t,i):i(e,t)}:void 0};return[i.languages.registerDocumentLinkProvider(e.documentSelector,t),t]}}class X{constructor(e){this._client=e,this._listeners=new Map}get registrationType(){return r.DidChangeConfigurationNotification.type}fillClientCapabilities(e){b(b(e,"workspace"),"didChangeConfiguration").dynamicRegistration=!0}initialize(){let e=this._client.clientOptions.synchronize.configurationSection;void 0!==e&&this.register({id:l.generateUuid(),registerOptions:{section:e}})}register(e){let t=i.workspace.onDidChangeConfiguration(t=>{this.onDidChangeConfiguration(e.registerOptions.section,t)});this._listeners.set(e.id,t),void 0!==e.registerOptions.section&&this.onDidChangeConfiguration(e.registerOptions.section,void 0)}unregister(e){let t=this._listeners.get(e);t&&(this._listeners.delete(e),t.dispose())}dispose(){for(let e of this._listeners.values())e.dispose();this._listeners.clear()}onDidChangeConfiguration(e,t){let n;if(n=c.string(e)?[e]:e,void 0!==n&&void 0!==t){if(!n.some(e=>t.affectsConfiguration(e)))return}let i=e=>{void 0!==e?this._client.sendNotification(r.DidChangeConfigurationNotification.type,{settings:this.extractSettingsInformation(e)}):this._client.sendNotification(r.DidChangeConfigurationNotification.type,{settings:null})},o=this.getMiddleware();o?o(n,i):i(n)}extractSettingsInformation(e){function t(e,t){let n=e;for(let e=0;e<t.length-1;e++){let i=n[t[e]];i||(i=Object.create(null),n[t[e]]=i),n=i}return n}let n=this._client.clientOptions.workspaceFolder?this._client.clientOptions.workspaceFolder.uri:void 0,r=Object.create(null);for(let s=0;s<e.length;s++){let a=e[s],c=a.indexOf("."),u=null;if(u=c>=0?i.workspace.getConfiguration(a.substr(0,c),n).get(a.substr(c+1)):i.workspace.getConfiguration(void 0,n).get(a),u){let n=e[s].split(".");t(r,n)[n[n.length-1]]=o.toJSONObject(u)}}return r}getMiddleware(){let e=this._client.clientOptions.middleware;return e.workspace&&e.workspace.didChangeConfiguration?e.workspace.didChangeConfiguration:void 0}}class J{constructor(e){this._client=e,this._commands=new Map}get registrationType(){return r.ExecuteCommandRequest.type}fillClientCapabilities(e){b(b(e,"workspace"),"executeCommand").dynamicRegistration=!0}initialize(e){e.executeCommandProvider&&this.register({id:l.generateUuid(),registerOptions:Object.assign({},e.executeCommandProvider)})}register(e){const t=this._client,n=t.clientOptions.middleware,o=(e,n)=>{let i={command:e,arguments:n};return t.sendRequest(r.ExecuteCommandRequest.type,i).then(void 0,e=>t.handleFailedRequest(r.ExecuteCommandRequest.type,e,void 0))};if(e.registerOptions.commands){const t=[];for(const r of e.registerOptions.commands)t.push(i.commands.registerCommand(r,(...e)=>n.executeCommand?n.executeCommand(r,e,o):o(r,e)));this._commands.set(e.id,t)}}unregister(e){let t=this._commands.get(e);t&&t.forEach(e=>e.dispose())}dispose(){this._commands.forEach(e=>{e.forEach(e=>e.dispose())}),this._commands.clear()}}!function(e){e.is=function(e){return e&&r.MessageReader.is(e.reader)&&r.MessageWriter.is(e.writer)}}(t.MessageTransports||(t.MessageTransports={}));class Y{constructor(e,t){this._resolve=e,this._reject=t,this._used=!1}get isUsed(){return this._used}resolve(){this._used=!0,this._resolve()}reject(e){this._used=!0,this._reject(e)}}class Z{constructor(e,t,n){var i;this._traceFormat=r.TraceFormat.Text,this._features=[],this._dynamicFeatures=new Map,this._id=e,this._name=t;const o={isTrusted:!1};void 0!==(n=n||{}).markdown&&!0===n.markdown.isTrusted&&(o.isTrusted=!0),this._clientOptions={documentSelector:n.documentSelector||[],synchronize:n.synchronize||{},diagnosticCollectionName:n.diagnosticCollectionName,outputChannelName:n.outputChannelName||this._name,revealOutputChannelOn:n.revealOutputChannelOn||g.Error,stdioEncoding:n.stdioEncoding||"utf8",initializationOptions:n.initializationOptions,initializationFailedHandler:n.initializationFailedHandler,progressOnInitialization:!!n.progressOnInitialization,errorHandler:n.errorHandler||this.createDefaultErrorHandler(null===(i=n.connectionOptions)||void 0===i?void 0:i.maxRestartCount),middleware:n.middleware||{},uriConverters:n.uriConverters,workspaceFolder:n.workspaceFolder,connectionOptions:n.connectionOptions,markdown:o},this._clientOptions.synchronize=this._clientOptions.synchronize||{},this._state=v.Initial,this._connectionPromise=void 0,this._resolvedConnection=void 0,this._initializeResult=void 0,n.outputChannel?(this._outputChannel=n.outputChannel,this._disposeOutputChannel=!1):(this._outputChannel=void 0,this._disposeOutputChannel=!0),this._traceOutputChannel=n.traceOutputChannel,this._listeners=void 0,this._providers=void 0,this._diagnostics=void 0,this._fileEvents=[],this._fileEventDelayer=new u.Delayer(250),this._onReady=new Promise((e,t)=>{this._onReadyCallbacks=new Y(e,t)}),this._onStop=void 0,this._telemetryEmitter=new r.Emitter,this._stateChangeEmitter=new r.Emitter,this._trace=r.Trace.Off,this._tracer={log:(e,t)=>{c.string(e)?this.logTrace(e,t):this.logObjectTrace(e)}},this._c2p=s.createConverter(n.uriConverters?n.uriConverters.code2Protocol:void 0),this._p2c=a.createConverter(n.uriConverters?n.uriConverters.protocol2Code:void 0,this._clientOptions.markdown.isTrusted),this._syncedDocuments=new Map,this.registerBuiltinFeatures()}get state(){return this._state}set state(e){let t=this.getPublicState();this._state=e;let n=this.getPublicState();n!==t&&this._stateChangeEmitter.fire({oldState:t,newState:n})}getPublicState(){return this.state===v.Running?m.Running:this.state===v.Starting?m.Starting:m.Stopped}get initializeResult(){return this._initializeResult}sendRequest(e,...t){if(!this.isConnectionActive())throw new Error("Language client is not ready yet");this.forceDocumentSync();try{return this._resolvedConnection.sendRequest(e,...t)}catch(t){throw this.error(`Sending request ${c.string(e)?e:e.method} failed.`,t),t}}onRequest(e,t){if(!this.isConnectionActive())throw new Error("Language client is not ready yet");try{return this._resolvedConnection.onRequest(e,t)}catch(t){throw this.error(`Registering request handler ${c.string(e)?e:e.method} failed.`,t),t}}sendNotification(e,t){if(!this.isConnectionActive())throw new Error("Language client is not ready yet");this.forceDocumentSync();try{this._resolvedConnection.sendNotification(e,t)}catch(t){throw this.error(`Sending notification ${c.string(e)?e:e.method} failed.`,t),t}}onNotification(e,t){if(!this.isConnectionActive())throw new Error("Language client is not ready yet");try{return this._resolvedConnection.onNotification(e,t)}catch(t){throw this.error(`Registering notification handler ${c.string(e)?e:e.method} failed.`,t),t}}onProgress(e,t,n){if(!this.isConnectionActive())throw new Error("Language client is not ready yet");try{if(r.WorkDoneProgress.is(e)){const i=this._clientOptions.middleware.handleWorkDoneProgress;if(void 0!==i)return this._resolvedConnection.onProgress(e,t,e=>{i(t,e,()=>n(e))})}return this._resolvedConnection.onProgress(e,t,n)}catch(e){throw this.error(`Registering progress handler for token ${t} failed.`,e),e}}sendProgress(e,t,n){if(!this.isConnectionActive())throw new Error("Language client is not ready yet");this.forceDocumentSync();try{this._resolvedConnection.sendProgress(e,t,n)}catch(e){throw this.error(`Sending progress for token ${t} failed.`,e),e}}get clientOptions(){return this._clientOptions}get protocol2CodeConverter(){return this._p2c}get code2ProtocolConverter(){return this._c2p}get onTelemetry(){return this._telemetryEmitter.event}get onDidChangeState(){return this._stateChangeEmitter.event}get outputChannel(){return this._outputChannel||(this._outputChannel=i.window.createOutputChannel(this._clientOptions.outputChannelName?this._clientOptions.outputChannelName:this._name)),this._outputChannel}get traceOutputChannel(){return this._traceOutputChannel?this._traceOutputChannel:this.outputChannel}get diagnostics(){return this._diagnostics}createDefaultErrorHandler(e){if(void 0!==e&&e<0)throw new Error("Invalid maxRestartCount: "+e);return new y(this._name,null!=e?e:4)}set trace(e){this._trace=e,this.onReady().then(()=>{this.resolveConnection().then(e=>{e.trace(this._trace,this._tracer,{sendNotification:!1,traceFormat:this._traceFormat})})},()=>{})}data2String(e){if(e instanceof r.ResponseError){const t=e;return`  Message: ${t.message}\n  Code: ${t.code} ${t.data?"\n"+t.data.toString():""}`}return e instanceof Error?c.string(e.stack)?e.stack:e.message:c.string(e)?e:e.toString()}info(e,t,n=!0){this.outputChannel.appendLine(`[Info  - ${(new Date).toLocaleTimeString()}] ${e}`),t&&this.outputChannel.appendLine(this.data2String(t)),n&&this._clientOptions.revealOutputChannelOn<=g.Info&&this.showNotificationMessage()}warn(e,t,n=!0){this.outputChannel.appendLine(`[Warn  - ${(new Date).toLocaleTimeString()}] ${e}`),t&&this.outputChannel.appendLine(this.data2String(t)),n&&this._clientOptions.revealOutputChannelOn<=g.Warn&&this.showNotificationMessage()}error(e,t,n=!0){this.outputChannel.appendLine(`[Error - ${(new Date).toLocaleTimeString()}] ${e}`),t&&this.outputChannel.appendLine(this.data2String(t)),n&&this._clientOptions.revealOutputChannelOn<=g.Error&&this.showNotificationMessage()}showNotificationMessage(){i.window.showInformationMessage("A request has failed. See the output for more information.","Go to output").then(()=>{this.outputChannel.show(!0)})}logTrace(e,t){this.traceOutputChannel.appendLine(`[Trace - ${(new Date).toLocaleTimeString()}] ${e}`),t&&this.traceOutputChannel.appendLine(this.data2String(t))}logObjectTrace(e){e.isLSPMessage&&e.type?this.traceOutputChannel.append(`[LSP   - ${(new Date).toLocaleTimeString()}] `):this.traceOutputChannel.append(`[Trace - ${(new Date).toLocaleTimeString()}] `),e&&this.traceOutputChannel.appendLine(""+JSON.stringify(e))}needsStart(){return this.state===v.Initial||this.state===v.Stopping||this.state===v.Stopped}needsStop(){return this.state===v.Starting||this.state===v.Running}onReady(){return this._onReady}isConnectionActive(){return this.state===v.Running&&!!this._resolvedConnection}start(){return this._onReadyCallbacks.isUsed&&(this._onReady=new Promise((e,t)=>{this._onReadyCallbacks=new Y(e,t)})),this._listeners=[],this._providers=[],this._diagnostics||(this._diagnostics=this._clientOptions.diagnosticCollectionName?i.languages.createDiagnosticCollection(this._clientOptions.diagnosticCollectionName):i.languages.createDiagnosticCollection()),this.state=v.Starting,this.resolveConnection().then(e=>(e.onLogMessage(e=>{switch(e.type){case r.MessageType.Error:this.error(e.message,void 0,!1);break;case r.MessageType.Warning:this.warn(e.message,void 0,!1);break;case r.MessageType.Info:this.info(e.message,void 0,!1);break;default:this.outputChannel.appendLine(e.message)}}),e.onShowMessage(e=>{switch(e.type){case r.MessageType.Error:i.window.showErrorMessage(e.message);break;case r.MessageType.Warning:i.window.showWarningMessage(e.message);break;case r.MessageType.Info:i.window.showInformationMessage(e.message);break;default:i.window.showInformationMessage(e.message)}}),e.onRequest(r.ShowMessageRequest.type,e=>{let t;switch(e.type){case r.MessageType.Error:t=i.window.showErrorMessage;break;case r.MessageType.Warning:t=i.window.showWarningMessage;break;case r.MessageType.Info:t=i.window.showInformationMessage;break;default:t=i.window.showInformationMessage}let n=e.actions||[];return t(e.message,...n)}),e.onTelemetry(e=>{this._telemetryEmitter.fire(e)}),e.onRequest(r.ShowDocumentRequest.type,async e=>{var t;const n=async e=>{const t=this.protocol2CodeConverter.asUri(e.uri);try{if(!0===e.external){return{success:await i.env.openExternal(t)}}{const n={};return void 0!==e.selection&&(n.selection=this.protocol2CodeConverter.asRange(e.selection)),void 0===e.takeFocus||!1===e.takeFocus?n.preserveFocus=!0:!0===e.takeFocus&&(n.preserveFocus=!1),await i.window.showTextDocument(t,n),{success:!0}}}catch(e){return{success:!0}}},r=null===(t=this._clientOptions.middleware.window)||void 0===t?void 0:t.showDocument;return void 0!==r?r(e,n):n(e)}),e.listen(),this.initialize(e))).then(void 0,e=>{this.state=v.StartFailed,this._onReadyCallbacks.reject(e),this.error("Starting client failed",e),i.window.showErrorMessage("Couldn't start client "+this._name)}),new i.Disposable(()=>{this.needsStop()&&this.stop()})}resolveConnection(){return this._connectionPromise||(this._connectionPromise=this.createConnection()),this._connectionPromise}initialize(e){this.refreshTrace(e,!1);let t=this._clientOptions.initializationOptions,n=this._clientOptions.workspaceFolder?this._clientOptions.workspaceFolder.uri.fsPath:this._clientGetRootPath(),o={processId:null,clientInfo:{name:i.env.appName,version:i.version},locale:this.getLocale(),rootPath:n||null,rootUri:n?this._c2p.asUri(i.Uri.file(n)):null,capabilities:this.computeClientCapabilities(),initializationOptions:c.func(t)?t():t,trace:r.Trace.toString(this._trace),workspaceFolders:null};if(this.fillInitializeParams(o),this._clientOptions.progressOnInitialization){const t=l.generateUuid(),n=new d.ProgressPart(e,t);return o.workDoneToken=t,this.doInitialize(e,o).then(e=>(n.done(),e),e=>{throw n.cancel(),e})}return this.doInitialize(e,o)}doInitialize(e,t){return e.initialize(t).then(t=>{this._resolvedConnection=e,this._initializeResult=t,this.state=v.Running;let n=void 0;return c.number(t.capabilities.textDocumentSync)?n=t.capabilities.textDocumentSync===r.TextDocumentSyncKind.None?{openClose:!1,change:r.TextDocumentSyncKind.None,save:void 0}:{openClose:!0,change:t.capabilities.textDocumentSync,save:{includeText:!1}}:void 0!==t.capabilities.textDocumentSync&&null!==t.capabilities.textDocumentSync&&(n=t.capabilities.textDocumentSync),this._capabilities=Object.assign({},t.capabilities,{resolvedTextDocumentSync:n}),e.onDiagnostics(e=>this.handleDiagnostics(e)),e.onRequest(r.RegistrationRequest.type,e=>this.handleRegistrationRequest(e)),e.onRequest("client/registerFeature",e=>this.handleRegistrationRequest(e)),e.onRequest(r.UnregistrationRequest.type,e=>this.handleUnregistrationRequest(e)),e.onRequest("client/unregisterFeature",e=>this.handleUnregistrationRequest(e)),e.onRequest(r.ApplyWorkspaceEditRequest.type,e=>this.handleApplyWorkspaceEdit(e)),e.sendNotification(r.InitializedNotification.type,{}),this.hookFileEvents(e),this.hookConfigurationChanged(e),this.initializeFeatures(e),this._onReadyCallbacks.resolve(),t}).then(void 0,t=>{throw this._clientOptions.initializationFailedHandler?this._clientOptions.initializationFailedHandler(t)?this.initialize(e):(this.stop(),this._onReadyCallbacks.reject(t)):t instanceof r.ResponseError&&t.data&&t.data.retry?i.window.showErrorMessage(t.message,{title:"Retry",id:"retry"}).then(n=>{n&&"retry"===n.id?this.initialize(e):(this.stop(),this._onReadyCallbacks.reject(t))}):(t&&t.message&&i.window.showErrorMessage(t.message),this.error("Server initialization failed.",t),this.stop(),this._onReadyCallbacks.reject(t)),t})}_clientGetRootPath(){let e=i.workspace.workspaceFolders;if(!e||0===e.length)return;let t=e[0];return"file"===t.uri.scheme?t.uri.fsPath:void 0}stop(){return this._initializeResult=void 0,this._connectionPromise?this.state===v.Stopping&&this._onStop?this._onStop:(this.state=v.Stopping,this.cleanUp(!1),this._onStop=this.resolveConnection().then(e=>e.shutdown().then(()=>{e.exit(),e.end(),e.dispose(),this.state=v.Stopped,this.cleanUpChannel(),this._onStop=void 0,this._connectionPromise=void 0,this._resolvedConnection=void 0}))):(this.state=v.Stopped,Promise.resolve())}cleanUp(e=!0,t=!0){this._listeners&&(this._listeners.forEach(e=>e.dispose()),this._listeners=void 0),this._providers&&(this._providers.forEach(e=>e.dispose()),this._providers=void 0),this._syncedDocuments&&this._syncedDocuments.clear();for(const e of this._features.values())e.dispose();e&&this.cleanUpChannel(),t&&this._diagnostics&&(this._diagnostics.dispose(),this._diagnostics=void 0)}cleanUpChannel(){this._outputChannel&&this._disposeOutputChannel&&(this._outputChannel.dispose(),this._outputChannel=void 0)}notifyFileEvent(e){var t;const n=this;function i(e){n._fileEvents.push(e),n._fileEventDelayer.trigger(()=>{n.onReady().then(()=>{n.resolveConnection().then(e=>{n.isConnectionActive()&&(n.forceDocumentSync(),e.didChangeWatchedFiles({changes:n._fileEvents})),n._fileEvents=[]})},e=>{n.error("Notify file events failed.",e)})})}const r=null===(t=this.clientOptions.middleware)||void 0===t?void 0:t.workspace;(null==r?void 0:r.didChangeWatchedFile)?r.didChangeWatchedFile(e,i):i(e)}forceDocumentSync(){void 0===this._didChangeTextDocumentFeature&&(this._didChangeTextDocumentFeature=this._dynamicFeatures.get(r.DidChangeTextDocumentNotification.type.method)),this._didChangeTextDocumentFeature.forceDelivery()}handleDiagnostics(e){if(!this._diagnostics)return;let t=this._p2c.asUri(e.uri),n=this._p2c.asDiagnostics(e.diagnostics),i=this.clientOptions.middleware;i.handleDiagnostics?i.handleDiagnostics(t,n,(e,t)=>this.setDiagnostics(e,t)):this.setDiagnostics(t,n)}setDiagnostics(e,t){this._diagnostics&&this._diagnostics.set(e,t)}createConnection(){let e=(e,t,n)=>{this.handleConnectionError(e,t,n)},t=()=>{this.handleConnectionClosed()};return this.createMessageTransports(this._clientOptions.stdioEncoding||"utf8").then(n=>function(e,t,n,i,o){let s=new h,a=r.createProtocolConnection(e,t,s,o);return a.onError(e=>{n(e[0],e[1],e[2])}),a.onClose(i),{listen:()=>a.listen(),sendRequest:(e,...t)=>a.sendRequest(c.string(e)?e:e.method,...t),onRequest:(e,t)=>a.onRequest(c.string(e)?e:e.method,t),sendNotification:(e,t)=>a.sendNotification(c.string(e)?e:e.method,t),onNotification:(e,t)=>a.onNotification(c.string(e)?e:e.method,t),onProgress:a.onProgress,sendProgress:a.sendProgress,trace:(e,t,n)=>{const i={sendNotification:!1,traceFormat:r.TraceFormat.Text};void 0===n?a.trace(e,t,i):(c.boolean(n),a.trace(e,t,n))},initialize:e=>a.sendRequest(r.InitializeRequest.type,e),shutdown:()=>a.sendRequest(r.ShutdownRequest.type,void 0),exit:()=>a.sendNotification(r.ExitNotification.type),onLogMessage:e=>a.onNotification(r.LogMessageNotification.type,e),onShowMessage:e=>a.onNotification(r.ShowMessageNotification.type,e),onTelemetry:e=>a.onNotification(r.TelemetryEventNotification.type,e),didChangeConfiguration:e=>a.sendNotification(r.DidChangeConfigurationNotification.type,e),didChangeWatchedFiles:e=>a.sendNotification(r.DidChangeWatchedFilesNotification.type,e),didOpenTextDocument:e=>a.sendNotification(r.DidOpenTextDocumentNotification.type,e),didChangeTextDocument:e=>a.sendNotification(r.DidChangeTextDocumentNotification.type,e),didCloseTextDocument:e=>a.sendNotification(r.DidCloseTextDocumentNotification.type,e),didSaveTextDocument:e=>a.sendNotification(r.DidSaveTextDocumentNotification.type,e),onDiagnostics:e=>a.onNotification(r.PublishDiagnosticsNotification.type,e),end:()=>a.end(),dispose:()=>a.dispose()}}(n.reader,n.writer,e,t,this._clientOptions.connectionOptions))}handleConnectionClosed(){if(this.state===v.Stopping||this.state===v.Stopped)return;try{this._resolvedConnection&&this._resolvedConnection.dispose()}catch(e){}let e=f.DoNotRestart;try{e=this._clientOptions.errorHandler.closed()}catch(e){}this._connectionPromise=void 0,this._resolvedConnection=void 0,e===f.DoNotRestart?(this.error("Connection to server got closed. Server will not be restarted."),this.state===v.Starting?(this._onReadyCallbacks.reject(new Error("Connection to server got closed. Server will not be restarted.")),this.state=v.StartFailed):this.state=v.Stopped,this.cleanUp(!1,!0)):e===f.Restart&&(this.info("Connection to server got closed. Server will restart."),this.cleanUp(!1,!1),this.state=v.Initial,this.start())}handleConnectionError(e,t,n){this._clientOptions.errorHandler.error(e,t,n)===p.Shutdown&&(this.error("Connection to server is erroring. Shutting down server."),this.stop())}hookConfigurationChanged(e){i.workspace.onDidChangeConfiguration(()=>{this.refreshTrace(e,!0)})}refreshTrace(e,t=!1){let n=i.workspace.getConfiguration(this._id),o=r.Trace.Off,s=r.TraceFormat.Text;if(n){const e=n.get("trace.server","off");"string"==typeof e?o=r.Trace.fromString(e):(o=r.Trace.fromString(n.get("trace.server.verbosity","off")),s=r.TraceFormat.fromString(n.get("trace.server.format","text")))}this._trace=o,this._traceFormat=s,e.trace(this._trace,this._tracer,{sendNotification:t,traceFormat:this._traceFormat})}hookFileEvents(e){let t,n=this._clientOptions.synchronize.fileEvents;n&&(t=c.array(n)?n:[n],t&&this._dynamicFeatures.get(r.DidChangeWatchedFilesNotification.type.method).registerRaw(l.generateUuid(),t))}registerFeatures(e){for(let t of e)this.registerFeature(t)}registerFeature(e){if(this._features.push(e),S.is(e)){const t=e.registrationType;this._dynamicFeatures.set(t.method,e)}}getFeature(e){return this._dynamicFeatures.get(e)}registerBuiltinFeatures(){this.registerFeature(new X(this)),this.registerFeature(new P(this,this._syncedDocuments)),this.registerFeature(new E(this)),this.registerFeature(new x(this)),this.registerFeature(new k(this)),this.registerFeature(new O(this)),this.registerFeature(new D(this,this._syncedDocuments)),this.registerFeature(new F(this,e=>this.notifyFileEvent(e))),this.registerFeature(new N(this)),this.registerFeature(new I(this)),this.registerFeature(new M(this)),this.registerFeature(new A(this)),this.registerFeature(new L(this)),this.registerFeature(new j(this)),this.registerFeature(new $(this)),this.registerFeature(new W(this)),this.registerFeature(new K(this)),this.registerFeature(new U(this)),this.registerFeature(new H(this)),this.registerFeature(new z(this)),this.registerFeature(new B(this)),this.registerFeature(new G(this)),this.registerFeature(new V(this)),this.registerFeature(new J(this))}fillInitializeParams(e){for(let t of this._features)c.func(t.fillInitializeParams)&&t.fillInitializeParams(e)}computeClientCapabilities(){const e={};b(e,"workspace").applyEdit=!0;const t=b(b(e,"workspace"),"workspaceEdit");t.documentChanges=!0,t.resourceOperations=[r.ResourceOperationKind.Create,r.ResourceOperationKind.Rename,r.ResourceOperationKind.Delete],t.failureHandling=r.FailureHandlingKind.TextOnlyTransactional,t.normalizesLineEndings=!0,t.changeAnnotationSupport={groupsOnLabel:!0};const n=b(b(e,"textDocument"),"publishDiagnostics");n.relatedInformation=!0,n.versionSupport=!1,n.tagSupport={valueSet:[r.DiagnosticTag.Unnecessary,r.DiagnosticTag.Deprecated]},n.codeDescriptionSupport=!0,n.dataSupport=!0;const i=b(e,"window");b(i,"showMessage").messageActionItem={additionalPropertiesSupport:!0};b(i,"showDocument").support=!0;const o=b(e,"general");o.regularExpressions={engine:"ECMAScript",version:"ES2020"},o.markdown={parser:"marked",version:"1.1.0"};for(let t of this._features)t.fillClientCapabilities(e);return e}initializeFeatures(e){let t=this._clientOptions.documentSelector;for(let e of this._features)e.initialize(this._capabilities,t)}handleRegistrationRequest(e){return new Promise((t,n)=>{for(const t of e.registrations){const e=this._dynamicFeatures.get(t.method);if(void 0===e)return void n(new Error(`No feature implementation for ${t.method} found. Registration failed.`));const i=t.registerOptions||{};i.documentSelector=i.documentSelector||this._clientOptions.documentSelector;const r={id:t.id,registerOptions:i};try{e.register(r)}catch(e){return void n(e)}}t()})}handleUnregistrationRequest(e){return new Promise((t,n)=>{for(let t of e.unregisterations){const e=this._dynamicFeatures.get(t.method);if(!e)return void n(new Error(`No feature implementation for ${t.method} found. Unregistration failed.`));e.unregister(t.id)}t()})}handleApplyWorkspaceEdit(e){let t=e.edit,n=new Map;i.workspace.textDocuments.forEach(e=>n.set(e.uri.toString(),e));let o=!1;if(t.documentChanges)for(const e of t.documentChanges)if(r.TextDocumentEdit.is(e)&&e.textDocument.version&&e.textDocument.version>=0){let t=n.get(e.textDocument.uri);if(t&&t.version!==e.textDocument.version){o=!0;break}}return o?Promise.resolve({applied:!1}):c.asPromise(i.workspace.applyEdit(this._p2c.asWorkspaceEdit(e.edit)).then(e=>({applied:e})))}handleFailedRequest(e,t,n){if(t instanceof r.ResponseError){if(t.code===r.LSPErrorCodes.RequestCancelled)throw this.makeCancelError();if(t.code===r.LSPErrorCodes.ContentModified)return n}throw this.error(`Request ${e.method} failed.`,t),t}makeCancelError(){const e=new Error(Z.Canceled);return e.name=Z.Canceled,e}}t.BaseLanguageClient=Z,Z.Canceled="Canceled"},function(e,t,n){const i=n(3);e.exports=(e,t,n)=>new i(e,n).compare(new i(t,n))},function(e,t,n){class i{constructor(e,t){if(t=o(t),e instanceof i)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new i(e.raw,t);if(e instanceof s)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map(e=>this.parseRange(e.trim())).filter(e=>e.length),!this.set.length)throw new TypeError("Invalid SemVer Range: "+e);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter(e=>!f(e[0])),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&g(e[0])){this.set=[e];break}}this.format()}format(){return this.range=this.set.map(e=>e.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(e){e=e.trim();const t=`parseRange:${Object.keys(this.options).join(",")}:${e}`,n=r.get(t);if(n)return n;const i=this.options.loose,o=i?u[l.HYPHENRANGELOOSE]:u[l.HYPHENRANGE];e=e.replace(o,D(this.options.includePrerelease)),a("hyphen replace",e),e=e.replace(u[l.COMPARATORTRIM],d),a("comparator trim",e,u[l.COMPARATORTRIM]),e=(e=(e=e.replace(u[l.TILDETRIM],h)).replace(u[l.CARETTRIM],p)).split(/\s+/).join(" ");const c=i?u[l.COMPARATORLOOSE]:u[l.COMPARATOR],g=e.split(" ").map(e=>v(e,this.options)).join(" ").split(/\s+/).map(e=>P(e,this.options)).filter(this.options.loose?e=>!!e.match(c):()=>!0).map(e=>new s(e,this.options)),m=(g.length,new Map);for(const e of g){if(f(e))return[e];m.set(e.value,e)}m.size>1&&m.has("")&&m.delete("");const y=[...m.values()];return r.set(t,y),y}intersects(e,t){if(!(e instanceof i))throw new TypeError("a Range is required");return this.set.some(n=>m(n,t)&&e.set.some(e=>m(e,t)&&n.every(n=>e.every(e=>n.intersects(e,t)))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new c(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(E(this.set[t],e,this.options))return!0;return!1}}e.exports=i;const r=new(n(69))({max:1e3}),o=n(17),s=n(19),a=n(16),c=n(3),{re:u,t:l,comparatorTrimReplace:d,tildeTrimReplace:h,caretTrimReplace:p}=n(10),f=e=>"<0.0.0-0"===e.value,g=e=>""===e.value,m=(e,t)=>{let n=!0;const i=e.slice();let r=i.pop();for(;n&&i.length;)n=i.every(e=>r.intersects(e,t)),r=i.pop();return n},v=(e,t)=>(a("comp",e,t),e=w(e,t),a("caret",e),e=C(e,t),a("tildes",e),e=T(e,t),a("xrange",e),e=_(e,t),a("stars",e),e),y=e=>!e||"x"===e.toLowerCase()||"*"===e,C=(e,t)=>e.trim().split(/\s+/).map(e=>R(e,t)).join(" "),R=(e,t)=>{const n=t.loose?u[l.TILDELOOSE]:u[l.TILDE];return e.replace(n,(t,n,i,r,o)=>{let s;return a("tilde",e,t,n,i,r,o),y(n)?s="":y(i)?s=`>=${n}.0.0 <${+n+1}.0.0-0`:y(r)?s=`>=${n}.${i}.0 <${n}.${+i+1}.0-0`:o?(a("replaceTilde pr",o),s=`>=${n}.${i}.${r}-${o} <${n}.${+i+1}.0-0`):s=`>=${n}.${i}.${r} <${n}.${+i+1}.0-0`,a("tilde return",s),s})},w=(e,t)=>e.trim().split(/\s+/).map(e=>b(e,t)).join(" "),b=(e,t)=>{a("caret",e,t);const n=t.loose?u[l.CARETLOOSE]:u[l.CARET],i=t.includePrerelease?"-0":"";return e.replace(n,(t,n,r,o,s)=>{let c;return a("caret",e,t,n,r,o,s),y(n)?c="":y(r)?c=`>=${n}.0.0${i} <${+n+1}.0.0-0`:y(o)?c="0"===n?`>=${n}.${r}.0${i} <${n}.${+r+1}.0-0`:`>=${n}.${r}.0${i} <${+n+1}.0.0-0`:s?(a("replaceCaret pr",s),c="0"===n?"0"===r?`>=${n}.${r}.${o}-${s} <${n}.${r}.${+o+1}-0`:`>=${n}.${r}.${o}-${s} <${n}.${+r+1}.0-0`:`>=${n}.${r}.${o}-${s} <${+n+1}.0.0-0`):(a("no pr"),c="0"===n?"0"===r?`>=${n}.${r}.${o}${i} <${n}.${r}.${+o+1}-0`:`>=${n}.${r}.${o}${i} <${n}.${+r+1}.0-0`:`>=${n}.${r}.${o} <${+n+1}.0.0-0`),a("caret return",c),c})},T=(e,t)=>(a("replaceXRanges",e,t),e.split(/\s+/).map(e=>S(e,t)).join(" ")),S=(e,t)=>{e=e.trim();const n=t.loose?u[l.XRANGELOOSE]:u[l.XRANGE];return e.replace(n,(n,i,r,o,s,c)=>{a("xRange",e,n,i,r,o,s,c);const u=y(r),l=u||y(o),d=l||y(s),h=d;return"="===i&&h&&(i=""),c=t.includePrerelease?"-0":"",u?n=">"===i||"<"===i?"<0.0.0-0":"*":i&&h?(l&&(o=0),s=0,">"===i?(i=">=",l?(r=+r+1,o=0,s=0):(o=+o+1,s=0)):"<="===i&&(i="<",l?r=+r+1:o=+o+1),"<"===i&&(c="-0"),n=`${i+r}.${o}.${s}${c}`):l?n=`>=${r}.0.0${c} <${+r+1}.0.0-0`:d&&(n=`>=${r}.${o}.0${c} <${r}.${+o+1}.0-0`),a("xRange return",n),n})},_=(e,t)=>(a("replaceStars",e,t),e.trim().replace(u[l.STAR],"")),P=(e,t)=>(a("replaceGTE0",e,t),e.trim().replace(u[t.includePrerelease?l.GTE0PRE:l.GTE0],"")),D=e=>(t,n,i,r,o,s,a,c,u,l,d,h,p)=>`${n=y(i)?"":y(r)?`>=${i}.0.0${e?"-0":""}`:y(o)?`>=${i}.${r}.0${e?"-0":""}`:s?">="+n:`>=${n}${e?"-0":""}`} ${c=y(u)?"":y(l)?`<${+u+1}.0.0-0`:y(d)?`<${u}.${+l+1}.0-0`:h?`<=${u}.${l}.${d}-${h}`:e?`<${u}.${l}.${+d+1}-0`:"<="+c}`.trim(),E=(e,t,n)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(let n=0;n<e.length;n++)if(a(e[n].semver),e[n].semver!==s.ANY&&e[n].semver.prerelease.length>0){const i=e[n].semver;if(i.major===t.major&&i.minor===t.minor&&i.patch===t.patch)return!0}return!1}return!0}},function(e,t,n){"use strict";let i;function r(){if(void 0===i)throw new Error("No runtime abstraction layer installed");return i}Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.install=function(e){if(void 0===e)throw new Error("No runtime abstraction layer provided");i=e}}(r||(r={})),t.default=r},function(e,t,n){"use strict";function i(e){return"string"==typeof e||e instanceof String}function r(e){return"function"==typeof e}function o(e){return Array.isArray(e)}function s(e){return e&&r(e.then)}Object.defineProperty(t,"__esModule",{value:!0}),t.asPromise=t.thenable=t.typedArray=t.stringArray=t.array=t.func=t.error=t.number=t.string=t.boolean=void 0,t.boolean=function(e){return!0===e||!1===e},t.string=i,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=r,t.array=o,t.stringArray=function(e){return o(e)&&e.every(e=>i(e))},t.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)},t.thenable=s,t.asPromise=function(e){return e instanceof Promise?e:s(e)?new Promise((t,n)=>{e.then(e=>t(e),e=>n(e))}):Promise.resolve(e)}},function(e,t){e.exports=require("path")},function(e,t,n){const{MAX_SAFE_COMPONENT_LENGTH:i}=n(15),r=n(16),o=(t=e.exports={}).re=[],s=t.src=[],a=t.t={};let c=0;const u=(e,t,n)=>{const i=c++;r(i,t),a[e]=i,s[i]=t,o[i]=new RegExp(t,n?"g":void 0)};u("NUMERICIDENTIFIER","0|[1-9]\\d*"),u("NUMERICIDENTIFIERLOOSE","[0-9]+"),u("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),u("MAINVERSION",`(${s[a.NUMERICIDENTIFIER]})\\.(${s[a.NUMERICIDENTIFIER]})\\.(${s[a.NUMERICIDENTIFIER]})`),u("MAINVERSIONLOOSE",`(${s[a.NUMERICIDENTIFIERLOOSE]})\\.(${s[a.NUMERICIDENTIFIERLOOSE]})\\.(${s[a.NUMERICIDENTIFIERLOOSE]})`),u("PRERELEASEIDENTIFIER",`(?:${s[a.NUMERICIDENTIFIER]}|${s[a.NONNUMERICIDENTIFIER]})`),u("PRERELEASEIDENTIFIERLOOSE",`(?:${s[a.NUMERICIDENTIFIERLOOSE]}|${s[a.NONNUMERICIDENTIFIER]})`),u("PRERELEASE",`(?:-(${s[a.PRERELEASEIDENTIFIER]}(?:\\.${s[a.PRERELEASEIDENTIFIER]})*))`),u("PRERELEASELOOSE",`(?:-?(${s[a.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${s[a.PRERELEASEIDENTIFIERLOOSE]})*))`),u("BUILDIDENTIFIER","[0-9A-Za-z-]+"),u("BUILD",`(?:\\+(${s[a.BUILDIDENTIFIER]}(?:\\.${s[a.BUILDIDENTIFIER]})*))`),u("FULLPLAIN",`v?${s[a.MAINVERSION]}${s[a.PRERELEASE]}?${s[a.BUILD]}?`),u("FULL",`^${s[a.FULLPLAIN]}$`),u("LOOSEPLAIN",`[v=\\s]*${s[a.MAINVERSIONLOOSE]}${s[a.PRERELEASELOOSE]}?${s[a.BUILD]}?`),u("LOOSE",`^${s[a.LOOSEPLAIN]}$`),u("GTLT","((?:<|>)?=?)"),u("XRANGEIDENTIFIERLOOSE",s[a.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*"),u("XRANGEIDENTIFIER",s[a.NUMERICIDENTIFIER]+"|x|X|\\*"),u("XRANGEPLAIN",`[v=\\s]*(${s[a.XRANGEIDENTIFIER]})(?:\\.(${s[a.XRANGEIDENTIFIER]})(?:\\.(${s[a.XRANGEIDENTIFIER]})(?:${s[a.PRERELEASE]})?${s[a.BUILD]}?)?)?`),u("XRANGEPLAINLOOSE",`[v=\\s]*(${s[a.XRANGEIDENTIFIERLOOSE]})(?:\\.(${s[a.XRANGEIDENTIFIERLOOSE]})(?:\\.(${s[a.XRANGEIDENTIFIERLOOSE]})(?:${s[a.PRERELEASELOOSE]})?${s[a.BUILD]}?)?)?`),u("XRANGE",`^${s[a.GTLT]}\\s*${s[a.XRANGEPLAIN]}$`),u("XRANGELOOSE",`^${s[a.GTLT]}\\s*${s[a.XRANGEPLAINLOOSE]}$`),u("COERCE",`(^|[^\\d])(\\d{1,${i}})(?:\\.(\\d{1,${i}}))?(?:\\.(\\d{1,${i}}))?(?:$|[^\\d])`),u("COERCERTL",s[a.COERCE],!0),u("LONETILDE","(?:~>?)"),u("TILDETRIM",`(\\s*)${s[a.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",u("TILDE",`^${s[a.LONETILDE]}${s[a.XRANGEPLAIN]}$`),u("TILDELOOSE",`^${s[a.LONETILDE]}${s[a.XRANGEPLAINLOOSE]}$`),u("LONECARET","(?:\\^)"),u("CARETTRIM",`(\\s*)${s[a.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",u("CARET",`^${s[a.LONECARET]}${s[a.XRANGEPLAIN]}$`),u("CARETLOOSE",`^${s[a.LONECARET]}${s[a.XRANGEPLAINLOOSE]}$`),u("COMPARATORLOOSE",`^${s[a.GTLT]}\\s*(${s[a.LOOSEPLAIN]})$|^$`),u("COMPARATOR",`^${s[a.GTLT]}\\s*(${s[a.FULLPLAIN]})$|^$`),u("COMPARATORTRIM",`(\\s*)${s[a.GTLT]}\\s*(${s[a.LOOSEPLAIN]}|${s[a.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",u("HYPHENRANGE",`^\\s*(${s[a.XRANGEPLAIN]})\\s+-\\s+(${s[a.XRANGEPLAIN]})\\s*$`),u("HYPHENRANGELOOSE",`^\\s*(${s[a.XRANGEPLAINLOOSE]})\\s+-\\s+(${s[a.XRANGEPLAINLOOSE]})\\s*$`),u("STAR","(<|>)?=?\\s*\\*"),u("GTE0","^\\s*>=\\s*0.0.0\\s*$"),u("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")},function(e,t,n){const{MAX_LENGTH:i}=n(15),{re:r,t:o}=n(10),s=n(3),a=n(17);e.exports=(e,t)=>{if(t=a(t),e instanceof s)return e;if("string"!=typeof e)return null;if(e.length>i)return null;if(!(t.loose?r[o.LOOSE]:r[o.FULL]).test(e))return null;try{return new s(e,t)}catch(e){return null}}},function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.createMessageConnection=t.createServerSocketTransport=t.createClientSocketTransport=t.createServerPipeTransport=t.createClientPipeTransport=t.generateRandomPipeName=t.StreamMessageWriter=t.StreamMessageReader=t.SocketMessageWriter=t.SocketMessageReader=t.IPCMessageWriter=t.IPCMessageReader=void 0;const o=n(82);o.default.install();const s=n(39),a=n(9),c=n(89),u=n(90),l=n(91);r(n(39),t);class d extends s.AbstractMessageReader{constructor(e){super(),this.process=e;let t=this.process;t.on("error",e=>this.fireError(e)),t.on("close",()=>this.fireClose())}listen(e){return this.process.on("message",e),s.Disposable.create(()=>this.process.off("message",e))}}t.IPCMessageReader=d;class h extends s.AbstractMessageWriter{constructor(e){super(),this.process=e,this.errorCount=0;let t=this.process;t.on("error",e=>this.fireError(e)),t.on("close",()=>this.fireClose)}write(e){try{return"function"==typeof this.process.send&&this.process.send(e,void 0,void 0,t=>{t?(this.errorCount++,this.handleError(t,e)):this.errorCount=0}),Promise.resolve()}catch(t){return this.handleError(t,e),Promise.reject(t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){}}t.IPCMessageWriter=h;class p extends s.ReadableStreamMessageReader{constructor(e,t="utf-8"){super(o.default().stream.asReadableStream(e),t)}}t.SocketMessageReader=p;class f extends s.WriteableStreamMessageWriter{constructor(e,t){super(o.default().stream.asWritableStream(e),t),this.socket=e}dispose(){super.dispose(),this.socket.destroy()}}t.SocketMessageWriter=f;class g extends s.ReadableStreamMessageReader{constructor(e,t){super(o.default().stream.asReadableStream(e),t)}}t.StreamMessageReader=g;class m extends s.WriteableStreamMessageWriter{constructor(e,t){super(o.default().stream.asWritableStream(e),t)}}t.StreamMessageWriter=m;const v=process.env.XDG_RUNTIME_DIR,y=new Map([["linux",107],["darwin",103]]);t.generateRandomPipeName=function(){const e=u.randomBytes(21).toString("hex");if("win32"===process.platform)return`\\\\.\\pipe\\vscode-jsonrpc-${e}-sock`;let t;t=v?a.join(v,`vscode-ipc-${e}.sock`):a.join(c.tmpdir(),`vscode-${e}.sock`);const n=y.get(process.platform);return void 0!==n&&t.length>=n&&o.default().console.warn(`WARNING: IPC handle "${t}" is longer than ${n} characters.`),t},t.createClientPipeTransport=function(e,t="utf-8"){let n;const i=new Promise((e,t)=>{n=e});return new Promise((r,o)=>{let s=l.createServer(e=>{s.close(),n([new p(e,t),new f(e,t)])});s.on("error",o),s.listen(e,()=>{s.removeListener("error",o),r({onConnected:()=>i})})})},t.createServerPipeTransport=function(e,t="utf-8"){const n=l.createConnection(e);return[new p(n,t),new f(n,t)]},t.createClientSocketTransport=function(e,t="utf-8"){let n;const i=new Promise((e,t)=>{n=e});return new Promise((r,o)=>{const s=l.createServer(e=>{s.close(),n([new p(e,t),new f(e,t)])});s.on("error",o),s.listen(e,"127.0.0.1",()=>{s.removeListener("error",o),r({onConnected:()=>i})})})},t.createServerSocketTransport=function(e,t="utf-8"){const n=l.createConnection(e,"127.0.0.1");return[new p(n,t),new f(n,t)]},t.createMessageConnection=function(e,t,n,i){n||(n=s.NullLogger);const r=function(e){const t=e;return void 0!==t.read&&void 0!==t.addListener}(e)?new g(e):e,o=function(e){const t=e;return void 0!==t.write&&void 0!==t.addListener}(t)?new m(t):t;return s.ConnectionStrategy.is(i)&&(i={connectionStrategy:i}),s.createMessageConnection(r,o,n,i)}},function(e,t,n){"use strict";function i(e){return"string"==typeof e||e instanceof String}function r(e){return Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.stringArray=t.array=t.func=t.error=t.number=t.string=t.boolean=void 0,t.boolean=function(e){return!0===e||!1===e},t.string=i,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=function(e){return"function"==typeof e},t.array=r,t.stringArray=function(e){return r(e)&&e.every(e=>i(e))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Emitter=t.Event=void 0;const i=n(7);!function(e){const t={dispose(){}};e.None=function(){return t}}(t.Event||(t.Event={}));class r{add(e,t=null,n){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(t),Array.isArray(n)&&n.push({dispose:()=>this.remove(e,t)})}remove(e,t=null){if(!this._callbacks)return;let n=!1;for(let i=0,r=this._callbacks.length;i<r;i++)if(this._callbacks[i]===e){if(this._contexts[i]===t)return this._callbacks.splice(i,1),void this._contexts.splice(i,1);n=!0}if(n)throw new Error("When adding a listener with a context, you should remove it with the same context")}invoke(...e){if(!this._callbacks)return[];const t=[],n=this._callbacks.slice(0),r=this._contexts.slice(0);for(let o=0,s=n.length;o<s;o++)try{t.push(n[o].apply(r[o],e))}catch(e){i.default().console.error(e)}return t}isEmpty(){return!this._callbacks||0===this._callbacks.length}dispose(){this._callbacks=void 0,this._contexts=void 0}}class o{constructor(e){this._options=e}get event(){return this._event||(this._event=(e,t,n)=>{this._callbacks||(this._callbacks=new r),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,t);const i={dispose:()=>{this._callbacks&&(this._callbacks.remove(e,t),i.dispose=o._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(n)&&n.push(i),i}),this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}}t.Emitter=o,o._noop=function(){}},function(e,t){const n=Number.MAX_SAFE_INTEGER||9007199254740991;e.exports={SEMVER_SPEC_VERSION:"2.0.0",MAX_LENGTH:256,MAX_SAFE_INTEGER:n,MAX_SAFE_COMPONENT_LENGTH:16}},function(e,t){const n="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};e.exports=n},function(e,t){const n=["includePrerelease","loose","rtl"];e.exports=e=>e?"object"!=typeof e?{loose:!0}:n.filter(t=>e[t]).reduce((e,t)=>(e[t]=!0,e),{}):{}},function(e,t,n){const i=n(5);e.exports=(e,t,n)=>i(e,t,n)>0},function(e,t,n){const i=Symbol("SemVer ANY");class r{static get ANY(){return i}constructor(e,t){if(t=o(t),e instanceof r){if(e.loose===!!t.loose)return e;e=e.value}u("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===i?this.value="":this.value=this.operator+this.semver.version,u("comp",this)}parse(e){const t=this.options.loose?s[a.COMPARATORLOOSE]:s[a.COMPARATOR],n=e.match(t);if(!n)throw new TypeError("Invalid comparator: "+e);this.operator=void 0!==n[1]?n[1]:"","="===this.operator&&(this.operator=""),n[2]?this.semver=new l(n[2],this.options.loose):this.semver=i}toString(){return this.value}test(e){if(u("Comparator.test",e,this.options.loose),this.semver===i||e===i)return!0;if("string"==typeof e)try{e=new l(e,this.options)}catch(e){return!1}return c(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof r))throw new TypeError("a Comparator is required");if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),""===this.operator)return""===this.value||new d(e.value,t).test(this.value);if(""===e.operator)return""===e.value||new d(this.value,t).test(e.semver);const n=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),i=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),o=this.semver.version===e.semver.version,s=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),a=c(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),u=c(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return n||i||o&&s||a||u}}e.exports=r;const o=n(17),{re:s,t:a}=n(10),c=n(34),u=n(16),l=n(3),d=n(6)},function(e,t,n){const i=n(6);e.exports=(e,t,n)=>{try{t=new i(t,n)}catch(e){return!1}return t.test(e)}},function(e,t){e.exports=require("fs")},function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.SettingMonitor=t.LanguageClient=t.TransportKind=void 0;const o=n(32),s=n(21),a=n(9),c=n(55),u=n(0),l=n(8),d=n(35),h=n(4),p=n(131),f=n(50);r(n(50),t),r(n(132),t);var g,m,v,y,C,R;!function(e){e.is=function(e){return l.string(e.command)}}(g||(g={})),function(e){e[e.stdio=0]="stdio",e[e.ipc=1]="ipc",e[e.pipe=2]="pipe",e[e.socket=3]="socket"}(m=t.TransportKind||(t.TransportKind={})),function(e){e.isSocket=function(e){let t=e;return t&&t.kind===m.socket&&l.number(t.port)}}(v||(v={})),function(e){e.is=function(e){return l.string(e.module)}}(y||(y={})),function(e){e.is=function(e){let t=e;return t&&void 0!==t.writer&&void 0!==t.reader}}(C||(C={})),function(e){e.is=function(e){let t=e;return t&&void 0!==t.process&&"boolean"==typeof t.detached}}(R||(R={}));class w extends d.CommonLanguageClient{constructor(e,t,n,i,r){let o,s,a,c,u;l.string(t)?(o=e,s=t,a=n,c=i,u=!!r):(o=e.toLowerCase(),s=e,a=t,c=n,u=i),void 0===u&&(u=!1),super(o,s,c),this._serverOptions=a,this._forceDebug=u;try{this.checkVersion()}catch(e){throw l.string(e.message)&&this.outputChannel.appendLine(e.message),e}}checkVersion(){let e=c.parse(u.version);if(!e)throw new Error("No valid VS Code version detected. Version string is: "+u.version);if(e.prerelease&&e.prerelease.length>0&&(e.prerelease=[]),!c.satisfies(e,"^1.52.0"))throw new Error("The language client requires VS Code version ^1.52.0 but received version "+u.version)}stop(){return super.stop().then(()=>{if(this._serverProcess){let e=this._serverProcess;this._serverProcess=void 0,void 0!==this._isDetached&&this._isDetached||this.checkProcessDied(e),this._isDetached=void 0}})}checkProcessDied(e){e&&setTimeout(()=>{try{process.kill(e.pid,0),p.terminate(e)}catch(e){}},2e3)}handleConnectionClosed(){this._serverProcess=void 0,super.handleConnectionClosed()}fillInitializeParams(e){super.fillInitializeParams(e),null===e.processId&&(e.processId=process.pid)}createMessageTransports(e){function t(e,t){if(!e&&!t)return;let n=Object.create(null);return Object.keys(process.env).forEach(e=>n[e]=process.env[e]),t&&(n.ELECTRON_RUN_AS_NODE="1",n.ELECTRON_NO_ASAR="1"),e&&Object.keys(e).forEach(t=>n[t]=e[t]),n}const n=["--debug=","--debug-brk=","--inspect=","--inspect-brk="],i=["--debug","--debug-brk","--inspect","--inspect-brk"];function r(e){if(null===e.stdin||null===e.stdout||null===e.stderr)throw new Error("Process created without stdio streams")}let s,a=this._serverOptions;if(l.func(a))return a().then(t=>{if(h.MessageTransports.is(t))return this._isDetached=!!t.detached,t;if(C.is(t))return this._isDetached=!!t.detached,{reader:new f.StreamMessageReader(t.reader),writer:new f.StreamMessageWriter(t.writer)};{let n;return R.is(t)?(n=t.process,this._isDetached=t.detached):(n=t,this._isDetached=!1),n.stderr.on("data",t=>this.outputChannel.append(l.string(t)?t:t.toString(e))),{reader:new f.StreamMessageReader(n.stdout),writer:new f.StreamMessageWriter(n.stdin)}}});let c=a;return s=c.run||c.debug?this._forceDebug||function(){let e=process.execArgv;return!!e&&e.some(e=>n.some(t=>e.startsWith(t))||i.some(t=>e===t))}()?c.debug:c.run:a,this._getServerWorkingDir(s.options).then(n=>{if(y.is(s)&&s.module){let i=s,a=i.transport||m.stdio;if(!i.runtime){let s=void 0;return new Promise((c,u)=>{let d=i.args&&i.args.slice()||[];a===m.ipc?d.push("--node-ipc"):a===m.stdio?d.push("--stdio"):a===m.pipe?(s=f.generateRandomPipeName(),d.push("--pipe="+s)):v.isSocket(a)&&d.push("--socket="+a.port),d.push("--clientProcessId="+process.pid.toString());let h=i.options||Object.create(null);if(h.env=t(h.env,!0),h.execArgv=h.execArgv||[],h.cwd=n,h.silent=!0,a===m.ipc||a===m.stdio){let t=o.fork(i.module,d||[],h);r(t),this._serverProcess=t,t.stderr.on("data",t=>this.outputChannel.append(l.string(t)?t:t.toString(e))),a===m.ipc?(t.stdout.on("data",t=>this.outputChannel.append(l.string(t)?t:t.toString(e))),c({reader:new f.IPCMessageReader(this._serverProcess),writer:new f.IPCMessageWriter(this._serverProcess)})):c({reader:new f.StreamMessageReader(t.stdout),writer:new f.StreamMessageWriter(t.stdin)})}else a===m.pipe?f.createClientPipeTransport(s).then(t=>{let n=o.fork(i.module,d||[],h);r(n),this._serverProcess=n,n.stderr.on("data",t=>this.outputChannel.append(l.string(t)?t:t.toString(e))),n.stdout.on("data",t=>this.outputChannel.append(l.string(t)?t:t.toString(e))),t.onConnected().then(e=>{c({reader:e[0],writer:e[1]})})}):v.isSocket(a)&&f.createClientSocketTransport(a.port).then(t=>{let n=o.fork(i.module,d||[],h);r(n),this._serverProcess=n,n.stderr.on("data",t=>this.outputChannel.append(l.string(t)?t:t.toString(e))),n.stdout.on("data",t=>this.outputChannel.append(l.string(t)?t:t.toString(e))),t.onConnected().then(e=>{c({reader:e[0],writer:e[1]})})})})}{let r=[],s=i.options||Object.create(null);s.execArgv&&s.execArgv.forEach(e=>r.push(e)),r.push(i.module),i.args&&i.args.forEach(e=>r.push(e));const c=Object.create(null);c.cwd=n,c.env=t(s.env,!1);const u=this._getRuntimePath(i.runtime,n);let d=void 0;if(a===m.ipc?(c.stdio=[null,null,null,"ipc"],r.push("--node-ipc")):a===m.stdio?r.push("--stdio"):a===m.pipe?(d=f.generateRandomPipeName(),r.push("--pipe="+d)):v.isSocket(a)&&r.push("--socket="+a.port),r.push("--clientProcessId="+process.pid.toString()),a===m.ipc||a===m.stdio){let t=o.spawn(u,r,c);return t&&t.pid?(this._serverProcess=t,t.stderr.on("data",t=>this.outputChannel.append(l.string(t)?t:t.toString(e))),a===m.ipc?(t.stdout.on("data",t=>this.outputChannel.append(l.string(t)?t:t.toString(e))),Promise.resolve({reader:new f.IPCMessageReader(t),writer:new f.IPCMessageWriter(t)})):Promise.resolve({reader:new f.StreamMessageReader(t.stdout),writer:new f.StreamMessageWriter(t.stdin)})):Promise.reject(`Launching server using runtime ${u} failed.`)}if(a===m.pipe)return f.createClientPipeTransport(d).then(t=>{let n=o.spawn(u,r,c);return n&&n.pid?(this._serverProcess=n,n.stderr.on("data",t=>this.outputChannel.append(l.string(t)?t:t.toString(e))),n.stdout.on("data",t=>this.outputChannel.append(l.string(t)?t:t.toString(e))),t.onConnected().then(e=>({reader:e[0],writer:e[1]}))):Promise.reject(`Launching server using runtime ${u} failed.`)});if(v.isSocket(a))return f.createClientSocketTransport(a.port).then(t=>{let n=o.spawn(u,r,c);return n&&n.pid?(this._serverProcess=n,n.stderr.on("data",t=>this.outputChannel.append(l.string(t)?t:t.toString(e))),n.stdout.on("data",t=>this.outputChannel.append(l.string(t)?t:t.toString(e))),t.onConnected().then(e=>({reader:e[0],writer:e[1]}))):Promise.reject(`Launching server using runtime ${u} failed.`)})}}else if(g.is(s)&&s.command){let t=s,i=t.args||[],r=Object.assign({},t.options);r.cwd=r.cwd||n;let a=o.spawn(t.command,i,r);return a&&a.pid?(a.stderr.on("data",t=>this.outputChannel.append(l.string(t)?t:t.toString(e))),this._serverProcess=a,this._isDetached=!!r.detached,Promise.resolve({reader:new f.StreamMessageReader(a.stdout),writer:new f.StreamMessageWriter(a.stdin)})):Promise.reject(`Launching server using command ${t.command} failed.`)}return Promise.reject(new Error("Unsupported server configuration "+JSON.stringify(a,null,4)))})}_getRuntimePath(e,t){if(a.isAbsolute(e))return e;const n=this._mainGetRootPath();if(void 0!==n){const t=a.join(n,e);if(s.existsSync(t))return t}if(void 0!==t){const n=a.join(t,e);if(s.existsSync(n))return n}return e}_mainGetRootPath(){let e=u.workspace.workspaceFolders;if(!e||0===e.length)return;let t=e[0];return"file"===t.uri.scheme?t.uri.fsPath:void 0}_getServerWorkingDir(e){let t=e&&e.cwd;return t||(t=this.clientOptions.workspaceFolder?this.clientOptions.workspaceFolder.uri.fsPath:this._mainGetRootPath()),t?new Promise(e=>{s.lstat(t,(n,i)=>{e(!n&&i.isDirectory()?t:void 0)})}):Promise.resolve(void 0)}getLocale(){const e=process.env.VSCODE_NLS_CONFIG;if(void 0===e)return"en";let t=void 0;try{t=JSON.parse(e)}catch(e){}return void 0===t||"string"!=typeof t.locale?"en":t.locale}}t.LanguageClient=w;t.SettingMonitor=class{constructor(e,t){this._client=e,this._setting=t,this._listeners=[]}start(){return u.workspace.onDidChangeConfiguration(this.onDidChangeConfiguration,this,this._listeners),this.onDidChangeConfiguration(),new u.Disposable(()=>{this._client.needsStop()&&this._client.stop()})}onDidChangeConfiguration(){let e=this._setting.indexOf("."),t=e>=0?this._setting.substr(0,e):this._setting,n=e>=0?this._setting.substr(e+1):void 0,i=n?u.workspace.getConfiguration(t).get(n,!1):u.workspace.getConfiguration(t);i&&this._client.needsStart()?this._client.start():!i&&this._client.needsStop()&&this._client.stop()}}},function(e,t){const n=/^[0-9]+$/,i=(e,t)=>{const i=n.test(e),r=n.test(t);return i&&r&&(e=+e,t=+t),e===t?0:i&&!r?-1:r&&!i?1:e<t?-1:1};e.exports={compareIdentifiers:i,rcompareIdentifiers:(e,t)=>i(t,e)}},function(e,t,n){const i=n(5);e.exports=(e,t,n)=>0===i(e,t,n)},function(e,t,n){const i=n(3);e.exports=(e,t,n)=>{const r=new i(e,n),o=new i(t,n);return r.compare(o)||r.compareBuild(o)}},function(e,t,n){const i=n(5);e.exports=(e,t,n)=>i(e,t,n)<0},function(e,t,n){const i=n(5);e.exports=(e,t,n)=>i(e,t,n)>=0},function(e,t,n){const i=n(5);e.exports=(e,t,n)=>i(e,t,n)<=0},function(e,t,n){const i=n(3),r=n(19),{ANY:o}=r,s=n(6),a=n(20),c=n(18),u=n(26),l=n(28),d=n(27);e.exports=(e,t,n,h)=>{let p,f,g,m,v;switch(e=new i(e,h),t=new s(t,h),n){case">":p=c,f=l,g=u,m=">",v=">=";break;case"<":p=u,f=d,g=c,m="<",v="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(a(e,t,h))return!1;for(let n=0;n<t.set.length;++n){const i=t.set[n];let s=null,a=null;if(i.forEach(e=>{e.semver===o&&(e=new r(">=0.0.0")),s=s||e,a=a||e,p(e.semver,s.semver,h)?s=e:g(e.semver,a.semver,h)&&(a=e)}),s.operator===m||s.operator===v)return!1;if((!a.operator||a.operator===m)&&f(e,a.semver))return!1;if(a.operator===v&&g(e,a.semver))return!1}return!0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateUuid=t.parse=t.isUUID=t.v4=t.empty=void 0;class i{constructor(e){this._value=e}asHex(){return this._value}equals(e){return this.asHex()===e.asHex()}}class r extends i{constructor(){super([r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),"-",r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),"-","4",r._randomHex(),r._randomHex(),r._randomHex(),"-",r._oneOf(r._timeHighBits),r._randomHex(),r._randomHex(),r._randomHex(),"-",r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex()].join(""))}static _oneOf(e){return e[Math.floor(e.length*Math.random())]}static _randomHex(){return r._oneOf(r._chars)}}function o(){return new r}r._chars=["0","1","2","3","4","5","6","6","7","8","9","a","b","c","d","e","f"],r._timeHighBits=["8","9","a","b"],t.empty=new i("00000000-0000-0000-0000-000000000000"),t.v4=o;const s=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function a(e){return s.test(e)}t.isUUID=a,t.parse=function(e){if(!a(e))throw new Error("invalid uuid");return new i(e)},t.generateUuid=function(){return o().asHex()}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileType=t.serveFileSystemRequests=t.FsReadDirRequest=t.FsStatRequest=t.FsContentRequest=void 0;const i=n(0),r=n(22);var o,s,a;!function(e){e.type=new r.RequestType("fs/content")}(o=t.FsContentRequest||(t.FsContentRequest={})),function(e){e.type=new r.RequestType("fs/stat")}(s=t.FsStatRequest||(t.FsStatRequest={})),function(e){e.type=new r.RequestType("fs/readDir")}(a=t.FsReadDirRequest||(t.FsReadDirRequest={})),t.serveFileSystemRequests=function(e,t){e.onRequest(o.type,e=>{const n=i.Uri.parse(e.uri);return"file"===n.scheme&&t.fs?t.fs.getContent(e.uri):i.workspace.fs.readFile(n).then(n=>new t.TextDecoder(e.encoding).decode(n))}),e.onRequest(a.type,e=>{const n=i.Uri.parse(e);return"file"===n.scheme&&t.fs?t.fs.readDirectory(e):i.workspace.fs.readDirectory(n)}),e.onRequest(s.type,e=>{const n=i.Uri.parse(e);return"file"===n.scheme&&t.fs?t.fs.stat(e):i.workspace.fs.stat(n)})},function(e){e[e.Unknown=0]="Unknown",e[e.File=1]="File",e[e.Directory=2]="Directory",e[e.SymbolicLink=64]="SymbolicLink"}(t.FileType||(t.FileType={}))},function(e,t){e.exports=require("child_process")},function(e,t,n){const i=n(5);e.exports=(e,t,n)=>0!==i(e,t,n)},function(e,t,n){const i=n(24),r=n(33),o=n(18),s=n(27),a=n(26),c=n(28);e.exports=(e,t,n,u)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e===n;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e!==n;case"":case"=":case"==":return i(e,n,u);case"!=":return r(e,n,u);case">":return o(e,n,u);case">=":return s(e,n,u);case"<":return a(e,n,u);case"<=":return c(e,n,u);default:throw new TypeError("Invalid operator: "+t)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProposedFeatures=t.CommonLanguageClient=void 0;const i=n(4),r=n(115),o=n(42),s=n(116),a=n(117),c=n(118),u=n(119),l=n(120),d=n(121),h=n(122),p=n(123),f=n(124),g=n(125),m=n(130);class v extends i.BaseLanguageClient{constructor(e,t,n){super(e,t,n)}registerProposedFeatures(){this.registerFeatures(y.createAll(this))}registerBuiltinFeatures(){super.registerBuiltinFeatures(),this.registerFeature(new o.ConfigurationFeature(this)),this.registerFeature(new a.TypeDefinitionFeature(this)),this.registerFeature(new s.ImplementationFeature(this)),this.registerFeature(new r.ColorProviderFeature(this)),this.registerFeature(new c.WorkspaceFoldersFeature(this)),this.registerFeature(new u.FoldingRangeFeature(this)),this.registerFeature(new l.DeclarationFeature(this)),this.registerFeature(new d.SelectionRangeFeature(this)),this.registerFeature(new h.ProgressFeature(this)),this.registerFeature(new p.CallHierarchyFeature(this)),this.registerFeature(new f.SemanticTokensFeature(this)),this.registerFeature(new m.LinkedEditingFeature(this)),this.registerFeature(new g.DidCreateFilesFeature(this)),this.registerFeature(new g.DidRenameFilesFeature(this)),this.registerFeature(new g.DidDeleteFilesFeature(this)),this.registerFeature(new g.WillCreateFilesFeature(this)),this.registerFeature(new g.WillRenameFilesFeature(this)),this.registerFeature(new g.WillDeleteFilesFeature(this))}}var y;t.CommonLanguageClient=v,function(e){e.createAll=function(e){return[]}}(y=t.ProposedFeatures||(t.ProposedFeatures={}))},function(e,t,n){"use strict";e.exports=n(12)},function(e,t){e.exports=require("util")},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Disposable=void 0,function(e){e.create=function(e){return{dispose:e}}}(t.Disposable||(t.Disposable={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CancellationSenderStrategy=t.CancellationReceiverStrategy=t.ConnectionError=t.ConnectionErrors=t.LogTraceNotification=t.SetTraceNotification=t.TraceFormat=t.Trace=t.ProgressType=t.createMessageConnection=t.NullLogger=t.ConnectionOptions=t.ConnectionStrategy=t.WriteableStreamMessageWriter=t.AbstractMessageWriter=t.MessageWriter=t.ReadableStreamMessageReader=t.AbstractMessageReader=t.MessageReader=t.CancellationToken=t.CancellationTokenSource=t.Emitter=t.Event=t.Disposable=t.ParameterStructures=t.NotificationType9=t.NotificationType8=t.NotificationType7=t.NotificationType6=t.NotificationType5=t.NotificationType4=t.NotificationType3=t.NotificationType2=t.NotificationType1=t.NotificationType0=t.NotificationType=t.ErrorCodes=t.ResponseError=t.RequestType9=t.RequestType8=t.RequestType7=t.RequestType6=t.RequestType5=t.RequestType4=t.RequestType3=t.RequestType2=t.RequestType1=t.RequestType0=t.RequestType=t.RAL=void 0,t.CancellationStrategy=void 0;const i=n(40);Object.defineProperty(t,"RequestType",{enumerable:!0,get:function(){return i.RequestType}}),Object.defineProperty(t,"RequestType0",{enumerable:!0,get:function(){return i.RequestType0}}),Object.defineProperty(t,"RequestType1",{enumerable:!0,get:function(){return i.RequestType1}}),Object.defineProperty(t,"RequestType2",{enumerable:!0,get:function(){return i.RequestType2}}),Object.defineProperty(t,"RequestType3",{enumerable:!0,get:function(){return i.RequestType3}}),Object.defineProperty(t,"RequestType4",{enumerable:!0,get:function(){return i.RequestType4}}),Object.defineProperty(t,"RequestType5",{enumerable:!0,get:function(){return i.RequestType5}}),Object.defineProperty(t,"RequestType6",{enumerable:!0,get:function(){return i.RequestType6}}),Object.defineProperty(t,"RequestType7",{enumerable:!0,get:function(){return i.RequestType7}}),Object.defineProperty(t,"RequestType8",{enumerable:!0,get:function(){return i.RequestType8}}),Object.defineProperty(t,"RequestType9",{enumerable:!0,get:function(){return i.RequestType9}}),Object.defineProperty(t,"ResponseError",{enumerable:!0,get:function(){return i.ResponseError}}),Object.defineProperty(t,"ErrorCodes",{enumerable:!0,get:function(){return i.ErrorCodes}}),Object.defineProperty(t,"NotificationType",{enumerable:!0,get:function(){return i.NotificationType}}),Object.defineProperty(t,"NotificationType0",{enumerable:!0,get:function(){return i.NotificationType0}}),Object.defineProperty(t,"NotificationType1",{enumerable:!0,get:function(){return i.NotificationType1}}),Object.defineProperty(t,"NotificationType2",{enumerable:!0,get:function(){return i.NotificationType2}}),Object.defineProperty(t,"NotificationType3",{enumerable:!0,get:function(){return i.NotificationType3}}),Object.defineProperty(t,"NotificationType4",{enumerable:!0,get:function(){return i.NotificationType4}}),Object.defineProperty(t,"NotificationType5",{enumerable:!0,get:function(){return i.NotificationType5}}),Object.defineProperty(t,"NotificationType6",{enumerable:!0,get:function(){return i.NotificationType6}}),Object.defineProperty(t,"NotificationType7",{enumerable:!0,get:function(){return i.NotificationType7}}),Object.defineProperty(t,"NotificationType8",{enumerable:!0,get:function(){return i.NotificationType8}}),Object.defineProperty(t,"NotificationType9",{enumerable:!0,get:function(){return i.NotificationType9}}),Object.defineProperty(t,"ParameterStructures",{enumerable:!0,get:function(){return i.ParameterStructures}});const r=n(38);Object.defineProperty(t,"Disposable",{enumerable:!0,get:function(){return r.Disposable}});const o=n(14);Object.defineProperty(t,"Event",{enumerable:!0,get:function(){return o.Event}}),Object.defineProperty(t,"Emitter",{enumerable:!0,get:function(){return o.Emitter}});const s=n(41);Object.defineProperty(t,"CancellationTokenSource",{enumerable:!0,get:function(){return s.CancellationTokenSource}}),Object.defineProperty(t,"CancellationToken",{enumerable:!0,get:function(){return s.CancellationToken}});const a=n(84);Object.defineProperty(t,"MessageReader",{enumerable:!0,get:function(){return a.MessageReader}}),Object.defineProperty(t,"AbstractMessageReader",{enumerable:!0,get:function(){return a.AbstractMessageReader}}),Object.defineProperty(t,"ReadableStreamMessageReader",{enumerable:!0,get:function(){return a.ReadableStreamMessageReader}});const c=n(85);Object.defineProperty(t,"MessageWriter",{enumerable:!0,get:function(){return c.MessageWriter}}),Object.defineProperty(t,"AbstractMessageWriter",{enumerable:!0,get:function(){return c.AbstractMessageWriter}}),Object.defineProperty(t,"WriteableStreamMessageWriter",{enumerable:!0,get:function(){return c.WriteableStreamMessageWriter}});const u=n(87);Object.defineProperty(t,"ConnectionStrategy",{enumerable:!0,get:function(){return u.ConnectionStrategy}}),Object.defineProperty(t,"ConnectionOptions",{enumerable:!0,get:function(){return u.ConnectionOptions}}),Object.defineProperty(t,"NullLogger",{enumerable:!0,get:function(){return u.NullLogger}}),Object.defineProperty(t,"createMessageConnection",{enumerable:!0,get:function(){return u.createMessageConnection}}),Object.defineProperty(t,"ProgressType",{enumerable:!0,get:function(){return u.ProgressType}}),Object.defineProperty(t,"Trace",{enumerable:!0,get:function(){return u.Trace}}),Object.defineProperty(t,"TraceFormat",{enumerable:!0,get:function(){return u.TraceFormat}}),Object.defineProperty(t,"SetTraceNotification",{enumerable:!0,get:function(){return u.SetTraceNotification}}),Object.defineProperty(t,"LogTraceNotification",{enumerable:!0,get:function(){return u.LogTraceNotification}}),Object.defineProperty(t,"ConnectionErrors",{enumerable:!0,get:function(){return u.ConnectionErrors}}),Object.defineProperty(t,"ConnectionError",{enumerable:!0,get:function(){return u.ConnectionError}}),Object.defineProperty(t,"CancellationReceiverStrategy",{enumerable:!0,get:function(){return u.CancellationReceiverStrategy}}),Object.defineProperty(t,"CancellationSenderStrategy",{enumerable:!0,get:function(){return u.CancellationSenderStrategy}}),Object.defineProperty(t,"CancellationStrategy",{enumerable:!0,get:function(){return u.CancellationStrategy}});const l=n(7);t.RAL=l.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isResponseMessage=t.isNotificationMessage=t.isRequestMessage=t.NotificationType9=t.NotificationType8=t.NotificationType7=t.NotificationType6=t.NotificationType5=t.NotificationType4=t.NotificationType3=t.NotificationType2=t.NotificationType1=t.NotificationType0=t.NotificationType=t.RequestType9=t.RequestType8=t.RequestType7=t.RequestType6=t.RequestType5=t.RequestType4=t.RequestType3=t.RequestType2=t.RequestType1=t.RequestType=t.RequestType0=t.AbstractMessageSignature=t.ParameterStructures=t.ResponseError=t.ErrorCodes=void 0;const i=n(13);var r;!function(e){e.ParseError=-32700,e.InvalidRequest=-32600,e.MethodNotFound=-32601,e.InvalidParams=-32602,e.InternalError=-32603,e.jsonrpcReservedErrorRangeStart=-32099,e.serverErrorStart=e.jsonrpcReservedErrorRangeStart,e.MessageWriteError=-32099,e.MessageReadError=-32098,e.ServerNotInitialized=-32002,e.UnknownErrorCode=-32001,e.jsonrpcReservedErrorRangeEnd=-32e3,e.serverErrorEnd=e.jsonrpcReservedErrorRangeEnd}(r=t.ErrorCodes||(t.ErrorCodes={}));class o extends Error{constructor(e,t,n){super(t),this.code=i.number(e)?e:r.UnknownErrorCode,this.data=n,Object.setPrototypeOf(this,o.prototype)}toJson(){return{code:this.code,message:this.message,data:this.data}}}t.ResponseError=o;class s{constructor(e){this.kind=e}static is(e){return e===s.auto||e===s.byName||e===s.byPosition}toString(){return this.kind}}t.ParameterStructures=s,s.auto=new s("auto"),s.byPosition=new s("byPosition"),s.byName=new s("byName");class a{constructor(e,t){this.method=e,this.numberOfParams=t}get parameterStructures(){return s.auto}}t.AbstractMessageSignature=a;t.RequestType0=class extends a{constructor(e){super(e,0)}};t.RequestType=class extends a{constructor(e,t=s.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};t.RequestType1=class extends a{constructor(e,t=s.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};t.RequestType2=class extends a{constructor(e){super(e,2)}};t.RequestType3=class extends a{constructor(e){super(e,3)}};t.RequestType4=class extends a{constructor(e){super(e,4)}};t.RequestType5=class extends a{constructor(e){super(e,5)}};t.RequestType6=class extends a{constructor(e){super(e,6)}};t.RequestType7=class extends a{constructor(e){super(e,7)}};t.RequestType8=class extends a{constructor(e){super(e,8)}};t.RequestType9=class extends a{constructor(e){super(e,9)}};t.NotificationType=class extends a{constructor(e,t=s.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};t.NotificationType0=class extends a{constructor(e){super(e,0)}};t.NotificationType1=class extends a{constructor(e,t=s.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};t.NotificationType2=class extends a{constructor(e){super(e,2)}};t.NotificationType3=class extends a{constructor(e){super(e,3)}};t.NotificationType4=class extends a{constructor(e){super(e,4)}};t.NotificationType5=class extends a{constructor(e){super(e,5)}};t.NotificationType6=class extends a{constructor(e){super(e,6)}};t.NotificationType7=class extends a{constructor(e){super(e,7)}};t.NotificationType8=class extends a{constructor(e){super(e,8)}};t.NotificationType9=class extends a{constructor(e){super(e,9)}},t.isRequestMessage=function(e){const t=e;return t&&i.string(t.method)&&(i.string(t.id)||i.number(t.id))},t.isNotificationMessage=function(e){const t=e;return t&&i.string(t.method)&&void 0===e.id},t.isResponseMessage=function(e){const t=e;return t&&(void 0!==t.result||!!t.error)&&(i.string(t.id)||i.number(t.id)||null===t.id)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CancellationTokenSource=t.CancellationToken=void 0;const i=n(7),r=n(13),o=n(14);var s;!function(e){e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:o.Event.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:o.Event.None}),e.is=function(t){const n=t;return n&&(n===e.None||n===e.Cancelled||r.boolean(n.isCancellationRequested)&&!!n.onCancellationRequested)}}(s=t.CancellationToken||(t.CancellationToken={}));const a=Object.freeze((function(e,t){const n=i.default().timer.setTimeout(e.bind(t),0);return{dispose(){i.default().timer.clearTimeout(n)}}}));class c{constructor(){this._isCancelled=!1}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?a:(this._emitter||(this._emitter=new o.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}}t.CancellationTokenSource=class{get token(){return this._token||(this._token=new c),this._token}cancel(){this._token?this._token.cancel():this._token=s.Cancelled}dispose(){this._token?this._token instanceof c&&this._token.dispose():this._token=s.None}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toJSONObject=t.ConfigurationFeature=void 0;const i=n(0),r=n(1);function o(e){if(e){if(Array.isArray(e))return e.map(o);if("object"==typeof e){const t=Object.create(null);for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=o(e[n]));return t}}return e}t.ConfigurationFeature=class{constructor(e){this._client=e}fillClientCapabilities(e){e.workspace=e.workspace||{},e.workspace.configuration=!0}initialize(){let e=this._client;e.onRequest(r.ConfigurationRequest.type,(t,n)=>{let i=e=>{let t=[];for(let n of e.items){let e=void 0!==n.scopeUri&&null!==n.scopeUri?this._client.protocol2CodeConverter.asUri(n.scopeUri):void 0;t.push(this.getConfiguration(e,null!==n.section?n.section:void 0))}return t},r=e.clientOptions.middleware.workspace;return r&&r.configuration?r.configuration(t,n,i):i(t)})}getConfiguration(e,t){let n=null;if(t){let r=t.lastIndexOf(".");if(-1===r)n=o(i.workspace.getConfiguration(void 0,e).get(t));else{let s=i.workspace.getConfiguration(t.substr(0,r),e);s&&(n=o(s.get(t.substr(r+1))))}}else{let t=i.workspace.getConfiguration(void 0,e);n={};for(let e of Object.keys(t))t.has(e)&&(n[e]=o(t.get(e)))}return void 0===n&&(n=null),n}dispose(){}},t.toJSONObject=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(0);class r extends i.CompletionItem{constructor(e){super(e)}}t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(0);class r extends i.CodeLens{constructor(e){super(e)}}t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(0);class r extends i.DocumentLink{constructor(e,t){super(e,t)}}t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(0);class r extends i.CodeAction{constructor(e,t){super(e),this.data=t}}t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProtocolDiagnostic=t.DiagnosticCode=void 0;const i=n(0),r=n(8);!function(e){e.is=function(e){const t=e;return null!=t&&(r.number(t.value)||r.string(t.value))&&r.string(t.target)}}(t.DiagnosticCode||(t.DiagnosticCode={}));class o extends i.Diagnostic{constructor(e,t,n,i){super(e,t,n),this.data=i,this.hasDiagnosticCode=!1}}t.ProtocolDiagnostic=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(0);class r extends i.CallHierarchyItem{constructor(e,t,n,i,r,o,s){super(e,t,n,i,r,o),void 0!==s&&(this.data=s)}}t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProgressPart=void 0;const i=n(0),r=n(1),o=n(8);t.ProgressPart=class{constructor(e,t,n){this._client=e,this._token=t,this._reported=0,this._disposable=this._client.onProgress(r.WorkDoneProgress.type,this._token,e=>{switch(e.kind){case"begin":this.begin(e);break;case"report":this.report(e);break;case"end":this.done(),n&&n(this)}})}begin(e){i.window.withProgress({location:i.ProgressLocation.Window,cancellable:e.cancellable,title:e.title},async(t,n)=>(this._progress=t,this._infinite=void 0===e.percentage,this._cancellationToken=n,this._cancellationToken.onCancellationRequested(()=>{this._client.sendNotification(r.WorkDoneProgressCancelNotification.type,{token:this._token})}),this.report(e),new Promise((e,t)=>{this._resolve=e,this._reject=t})))}report(e){if(this._infinite&&o.string(e.message))this._progress.report({message:e.message});else if(o.number(e.percentage)){let t=Math.max(0,Math.min(e.percentage,100)),n=Math.max(0,t-this._reported);this._progress.report({message:e.message,increment:n}),this._reported+=n}}cancel(){this._disposable&&(this._disposable.dispose(),this._disposable=void 0),this._reject&&(this._reject(),this._resolve=void 0,this._reject=void 0)}done(){this._disposable&&(this._disposable.dispose(),this._disposable=void 0),this._resolve&&(this._resolve(),this._resolve=void 0,this._reject=void 0)}}},function(e,t,n){"use strict";e.exports=n(1)},function(e,t,n){"use strict";var i;function r(){if(void 0===i)throw new Error("No runtime abstraction layer installed");return i}Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.install=function(e){if(void 0===e)throw new Error("No runtime abstraction layer provided");i=e}}(r||(r={})),t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.config=t.loadMessageBundle=t.localize=t.format=t.setPseudo=t.isPseudo=t.isDefined=t.BundleFormat=t.MessageFormat=void 0;var i,r=n(51);function o(e){return void 0!==e}function s(e,n){return t.isPseudo&&(e="［"+e.replace(/[aouei]/g,"$&$&")+"］"),0===n.length?e:e.replace(/\{(\d+)\}/g,(function(e,t){var i=t[0],r=n[i],o=e;return"string"==typeof r?o=r:"number"!=typeof r&&"boolean"!=typeof r&&null!=r||(o=String(r)),o}))}!function(e){e.file="file",e.bundle="bundle",e.both="both"}(t.MessageFormat||(t.MessageFormat={})),function(e){e.standalone="standalone",e.languagePack="languagePack"}(t.BundleFormat||(t.BundleFormat={})),function(e){e.is=function(e){var t=e;return t&&o(t.key)&&o(t.comment)}}(i||(i={})),t.isDefined=o,t.isPseudo=!1,t.setPseudo=function(e){t.isPseudo=e},t.format=s,t.localize=function(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];return s(t,n)},t.loadMessageBundle=function(e){return r.default().loadMessageBundle(e)},t.config=function(e){return r.default().config(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.activate=void 0;const i=n(54),r=n(0),o=n(133),s=n(137),a=n(37);t.activate=function(e){var t,n;const c=`./server/${-1!==((null===(n=null===(t=r.extensions.getExtension("vscode.css-language-features"))||void 0===t?void 0:t.packageJSON)||void 0===n?void 0:n.main)||"").indexOf("/dist/")?"dist":"out"}/node/cssServerMain`,u=e.asAbsolutePath(c),l={execArgv:["--nolazy","--inspect="+(7e3+Math.round(999*Math.random()))]},d={run:{module:u,transport:s.TransportKind.ipc},debug:{module:u,transport:s.TransportKind.ipc,options:l}};o.startClient(e,(e,t,n)=>new s.LanguageClient(e,t,d,n),{fs:i.getNodeFSRequestService(),TextDecoder:a.TextDecoder})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getNodeFSRequestService=void 0;const i=n(21),r=n(0),o=n(31);t.getNodeFSRequestService=function(){function e(e){if(!e.startsWith("file://"))throw new Error("fileRequestService can only handle file URLs")}return{getContent:(t,n)=>(e(t),new Promise((e,o)=>{const s=r.Uri.parse(t);i.readFile(s.fsPath,n,(t,n)=>{if(t)return o(t);e(n.toString())})})),stat:t=>(e(t),new Promise((e,n)=>{const s=r.Uri.parse(t);i.stat(s.fsPath,(t,i)=>{if(t)return"ENOENT"===t.code?e({type:o.FileType.Unknown,ctime:-1,mtime:-1,size:-1}):n(t);let r=o.FileType.Unknown;i.isFile()?r=o.FileType.File:i.isDirectory()?r=o.FileType.Directory:i.isSymbolicLink()&&(r=o.FileType.SymbolicLink),e({type:r,ctime:i.ctime.getTime(),mtime:i.mtime.getTime(),size:i.size})})})),readDirectory:t=>(e(t),new Promise((e,n)=>{const s=r.Uri.parse(t).fsPath;i.readdir(s,{withFileTypes:!0},(t,i)=>{if(t)return n(t);e(i.map(e=>e.isSymbolicLink()?[e.name,o.FileType.SymbolicLink]:e.isDirectory()?[e.name,o.FileType.Directory]:e.isFile()?[e.name,o.FileType.File]:[e.name,o.FileType.Unknown]))})}))}}},function(e,t,n){const i=n(10);e.exports={re:i.re,src:i.src,tokens:i.t,SEMVER_SPEC_VERSION:n(15).SEMVER_SPEC_VERSION,SemVer:n(3),compareIdentifiers:n(23).compareIdentifiers,rcompareIdentifiers:n(23).rcompareIdentifiers,parse:n(11),valid:n(56),clean:n(57),inc:n(58),diff:n(59),major:n(60),minor:n(61),patch:n(62),prerelease:n(63),compare:n(5),rcompare:n(64),compareLoose:n(65),compareBuild:n(25),sort:n(66),rsort:n(67),gt:n(18),lt:n(26),eq:n(24),neq:n(33),gte:n(27),lte:n(28),cmp:n(34),coerce:n(68),Comparator:n(19),Range:n(6),satisfies:n(20),toComparators:n(72),maxSatisfying:n(73),minSatisfying:n(74),minVersion:n(75),validRange:n(76),outside:n(29),gtr:n(77),ltr:n(78),intersects:n(79),simplifyRange:n(80),subset:n(81)}},function(e,t,n){const i=n(11);e.exports=(e,t)=>{const n=i(e,t);return n?n.version:null}},function(e,t,n){const i=n(11);e.exports=(e,t)=>{const n=i(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null}},function(e,t,n){const i=n(3);e.exports=(e,t,n,r)=>{"string"==typeof n&&(r=n,n=void 0);try{return new i(e,n).inc(t,r).version}catch(e){return null}}},function(e,t,n){const i=n(11),r=n(24);e.exports=(e,t)=>{if(r(e,t))return null;{const n=i(e),r=i(t),o=n.prerelease.length||r.prerelease.length,s=o?"pre":"",a=o?"prerelease":"";for(const e in n)if(("major"===e||"minor"===e||"patch"===e)&&n[e]!==r[e])return s+e;return a}}},function(e,t,n){const i=n(3);e.exports=(e,t)=>new i(e,t).major},function(e,t,n){const i=n(3);e.exports=(e,t)=>new i(e,t).minor},function(e,t,n){const i=n(3);e.exports=(e,t)=>new i(e,t).patch},function(e,t,n){const i=n(11);e.exports=(e,t)=>{const n=i(e,t);return n&&n.prerelease.length?n.prerelease:null}},function(e,t,n){const i=n(5);e.exports=(e,t,n)=>i(t,e,n)},function(e,t,n){const i=n(5);e.exports=(e,t)=>i(e,t,!0)},function(e,t,n){const i=n(25);e.exports=(e,t)=>e.sort((e,n)=>i(e,n,t))},function(e,t,n){const i=n(25);e.exports=(e,t)=>e.sort((e,n)=>i(n,e,t))},function(e,t,n){const i=n(3),r=n(11),{re:o,t:s}=n(10);e.exports=(e,t)=>{if(e instanceof i)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let n=null;if((t=t||{}).rtl){let t;for(;(t=o[s.COERCERTL].exec(e))&&(!n||n.index+n[0].length!==e.length);)n&&t.index+t[0].length===n.index+n[0].length||(n=t),o[s.COERCERTL].lastIndex=t.index+t[1].length+t[2].length;o[s.COERCERTL].lastIndex=-1}else n=e.match(o[s.COERCE]);return null===n?null:r(`${n[2]}.${n[3]||"0"}.${n[4]||"0"}`,t)}},function(e,t,n){"use strict";const i=n(70),r=Symbol("max"),o=Symbol("length"),s=Symbol("lengthCalculator"),a=Symbol("allowStale"),c=Symbol("maxAge"),u=Symbol("dispose"),l=Symbol("noDisposeOnSet"),d=Symbol("lruList"),h=Symbol("cache"),p=Symbol("updateAgeOnGet"),f=()=>1;const g=(e,t,n)=>{const i=e[h].get(t);if(i){const t=i.value;if(m(e,t)){if(y(e,i),!e[a])return}else n&&(e[p]&&(i.value.now=Date.now()),e[d].unshiftNode(i));return t.value}},m=(e,t)=>{if(!t||!t.maxAge&&!e[c])return!1;const n=Date.now()-t.now;return t.maxAge?n>t.maxAge:e[c]&&n>e[c]},v=e=>{if(e[o]>e[r])for(let t=e[d].tail;e[o]>e[r]&&null!==t;){const n=t.prev;y(e,t),t=n}},y=(e,t)=>{if(t){const n=t.value;e[u]&&e[u](n.key,n.value),e[o]-=n.length,e[h].delete(n.key),e[d].removeNode(t)}};class C{constructor(e,t,n,i,r){this.key=e,this.value=t,this.length=n,this.now=i,this.maxAge=r||0}}const R=(e,t,n,i)=>{let r=n.value;m(e,r)&&(y(e,n),e[a]||(r=void 0)),r&&t.call(i,r.value,r.key,e)};e.exports=class{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||e.max<0))throw new TypeError("max must be a non-negative number");this[r]=e.max||1/0;const t=e.length||f;if(this[s]="function"!=typeof t?f:t,this[a]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw new TypeError("maxAge must be a number");this[c]=e.maxAge||0,this[u]=e.dispose,this[l]=e.noDisposeOnSet||!1,this[p]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[r]=e||1/0,v(this)}get max(){return this[r]}set allowStale(e){this[a]=!!e}get allowStale(){return this[a]}set maxAge(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[c]=e,v(this)}get maxAge(){return this[c]}set lengthCalculator(e){"function"!=typeof e&&(e=f),e!==this[s]&&(this[s]=e,this[o]=0,this[d].forEach(e=>{e.length=this[s](e.value,e.key),this[o]+=e.length})),v(this)}get lengthCalculator(){return this[s]}get length(){return this[o]}get itemCount(){return this[d].length}rforEach(e,t){t=t||this;for(let n=this[d].tail;null!==n;){const i=n.prev;R(this,e,n,t),n=i}}forEach(e,t){t=t||this;for(let n=this[d].head;null!==n;){const i=n.next;R(this,e,n,t),n=i}}keys(){return this[d].toArray().map(e=>e.key)}values(){return this[d].toArray().map(e=>e.value)}reset(){this[u]&&this[d]&&this[d].length&&this[d].forEach(e=>this[u](e.key,e.value)),this[h]=new Map,this[d]=new i,this[o]=0}dump(){return this[d].map(e=>!m(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[d]}set(e,t,n){if((n=n||this[c])&&"number"!=typeof n)throw new TypeError("maxAge must be a number");const i=n?Date.now():0,a=this[s](t,e);if(this[h].has(e)){if(a>this[r])return y(this,this[h].get(e)),!1;const s=this[h].get(e).value;return this[u]&&(this[l]||this[u](e,s.value)),s.now=i,s.maxAge=n,s.value=t,this[o]+=a-s.length,s.length=a,this.get(e),v(this),!0}const p=new C(e,t,a,i,n);return p.length>this[r]?(this[u]&&this[u](e,t),!1):(this[o]+=p.length,this[d].unshift(p),this[h].set(e,this[d].head),v(this),!0)}has(e){if(!this[h].has(e))return!1;const t=this[h].get(e).value;return!m(this,t)}get(e){return g(this,e,!0)}peek(e){return g(this,e,!1)}pop(){const e=this[d].tail;return e?(y(this,e),e.value):null}del(e){y(this,this[h].get(e))}load(e){this.reset();const t=Date.now();for(let n=e.length-1;n>=0;n--){const i=e[n],r=i.e||0;if(0===r)this.set(i.k,i.v);else{const e=r-t;e>0&&this.set(i.k,i.v,e)}}}prune(){this[h].forEach((e,t)=>g(this,t,!1))}}},function(e,t,n){"use strict";function i(e){var t=this;if(t instanceof i||(t=new i),t.tail=null,t.head=null,t.length=0,e&&"function"==typeof e.forEach)e.forEach((function(e){t.push(e)}));else if(arguments.length>0)for(var n=0,r=arguments.length;n<r;n++)t.push(arguments[n]);return t}function r(e,t,n){var i=t===e.head?new a(n,null,t,e):new a(n,t,t.next,e);return null===i.next&&(e.tail=i),null===i.prev&&(e.head=i),e.length++,i}function o(e,t){e.tail=new a(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function s(e,t){e.head=new a(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function a(e,t,n,i){if(!(this instanceof a))return new a(e,t,n,i);this.list=i,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,n?(n.prev=this,this.next=n):this.next=null}e.exports=i,i.Node=a,i.create=i,i.prototype.removeNode=function(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");var t=e.next,n=e.prev;return t&&(t.prev=n),n&&(n.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=n),e.list.length--,e.next=null,e.prev=null,e.list=null,t},i.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}},i.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}},i.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)o(this,arguments[e]);return this.length},i.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)s(this,arguments[e]);return this.length},i.prototype.pop=function(){if(this.tail){var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e}},i.prototype.shift=function(){if(this.head){var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e}},i.prototype.forEach=function(e,t){t=t||this;for(var n=this.head,i=0;null!==n;i++)e.call(t,n.value,i,this),n=n.next},i.prototype.forEachReverse=function(e,t){t=t||this;for(var n=this.tail,i=this.length-1;null!==n;i--)e.call(t,n.value,i,this),n=n.prev},i.prototype.get=function(e){for(var t=0,n=this.head;null!==n&&t<e;t++)n=n.next;if(t===e&&null!==n)return n.value},i.prototype.getReverse=function(e){for(var t=0,n=this.tail;null!==n&&t<e;t++)n=n.prev;if(t===e&&null!==n)return n.value},i.prototype.map=function(e,t){t=t||this;for(var n=new i,r=this.head;null!==r;)n.push(e.call(t,r.value,this)),r=r.next;return n},i.prototype.mapReverse=function(e,t){t=t||this;for(var n=new i,r=this.tail;null!==r;)n.push(e.call(t,r.value,this)),r=r.prev;return n},i.prototype.reduce=function(e,t){var n,i=this.head;if(arguments.length>1)n=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");i=this.head.next,n=this.head.value}for(var r=0;null!==i;r++)n=e(n,i.value,r),i=i.next;return n},i.prototype.reduceReverse=function(e,t){var n,i=this.tail;if(arguments.length>1)n=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");i=this.tail.prev,n=this.tail.value}for(var r=this.length-1;null!==i;r--)n=e(n,i.value,r),i=i.prev;return n},i.prototype.toArray=function(){for(var e=new Array(this.length),t=0,n=this.head;null!==n;t++)e[t]=n.value,n=n.next;return e},i.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,n=this.tail;null!==n;t++)e[t]=n.value,n=n.prev;return e},i.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var n=new i;if(t<e||t<0)return n;e<0&&(e=0),t>this.length&&(t=this.length);for(var r=0,o=this.head;null!==o&&r<e;r++)o=o.next;for(;null!==o&&r<t;r++,o=o.next)n.push(o.value);return n},i.prototype.sliceReverse=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var n=new i;if(t<e||t<0)return n;e<0&&(e=0),t>this.length&&(t=this.length);for(var r=this.length,o=this.tail;null!==o&&r>t;r--)o=o.prev;for(;null!==o&&r>e;r--,o=o.prev)n.push(o.value);return n},i.prototype.splice=function(e,t,...n){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var i=0,o=this.head;null!==o&&i<e;i++)o=o.next;var s=[];for(i=0;o&&i<t;i++)s.push(o.value),o=this.removeNode(o);null===o&&(o=this.tail),o!==this.head&&o!==this.tail&&(o=o.prev);for(i=0;i<n.length;i++)o=r(this,o,n[i]);return s},i.prototype.reverse=function(){for(var e=this.head,t=this.tail,n=e;null!==n;n=n.prev){var i=n.prev;n.prev=n.next,n.next=i}return this.head=t,this.tail=e,this};try{n(71)(i)}catch(e){}},function(e,t,n){"use strict";e.exports=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}},function(e,t,n){const i=n(6);e.exports=(e,t)=>new i(e,t).set.map(e=>e.map(e=>e.value).join(" ").trim().split(" "))},function(e,t,n){const i=n(3),r=n(6);e.exports=(e,t,n)=>{let o=null,s=null,a=null;try{a=new r(t,n)}catch(e){return null}return e.forEach(e=>{a.test(e)&&(o&&-1!==s.compare(e)||(o=e,s=new i(o,n)))}),o}},function(e,t,n){const i=n(3),r=n(6);e.exports=(e,t,n)=>{let o=null,s=null,a=null;try{a=new r(t,n)}catch(e){return null}return e.forEach(e=>{a.test(e)&&(o&&1!==s.compare(e)||(o=e,s=new i(o,n)))}),o}},function(e,t,n){const i=n(3),r=n(6),o=n(18);e.exports=(e,t)=>{e=new r(e,t);let n=new i("0.0.0");if(e.test(n))return n;if(n=new i("0.0.0-0"),e.test(n))return n;n=null;for(let t=0;t<e.set.length;++t){const r=e.set[t];let s=null;r.forEach(e=>{const t=new i(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":s&&!o(t,s)||(s=t);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+e.operator)}}),!s||n&&!o(n,s)||(n=s)}return n&&e.test(n)?n:null}},function(e,t,n){const i=n(6);e.exports=(e,t)=>{try{return new i(e,t).range||"*"}catch(e){return null}}},function(e,t,n){const i=n(29);e.exports=(e,t,n)=>i(e,t,">",n)},function(e,t,n){const i=n(29);e.exports=(e,t,n)=>i(e,t,"<",n)},function(e,t,n){const i=n(6);e.exports=(e,t,n)=>(e=new i(e,n),t=new i(t,n),e.intersects(t))},function(e,t,n){const i=n(20),r=n(5);e.exports=(e,t,n)=>{const o=[];let s=null,a=null;const c=e.sort((e,t)=>r(e,t,n));for(const e of c){i(e,t,n)?(a=e,s||(s=e)):(a&&o.push([s,a]),a=null,s=null)}s&&o.push([s,null]);const u=[];for(const[e,t]of o)e===t?u.push(e):t||e!==c[0]?t?e===c[0]?u.push("<="+t):u.push(`${e} - ${t}`):u.push(">="+e):u.push("*");const l=u.join(" || "),d="string"==typeof t.raw?t.raw:String(t);return l.length<d.length?l:t}},function(e,t,n){const i=n(6),{ANY:r}=n(19),o=n(20),s=n(5),a=(e,t,n)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===r)return 1===t.length&&t[0].semver===r;const i=new Set;let a,l,d,h,p,f,g;for(const t of e)">"===t.operator||">="===t.operator?a=c(a,t,n):"<"===t.operator||"<="===t.operator?l=u(l,t,n):i.add(t.semver);if(i.size>1)return null;if(a&&l){if(d=s(a.semver,l.semver,n),d>0)return null;if(0===d&&(">="!==a.operator||"<="!==l.operator))return null}for(const e of i){if(a&&!o(e,String(a),n))return null;if(l&&!o(e,String(l),n))return null;for(const i of t)if(!o(e,String(i),n))return!1;return!0}for(const e of t){if(g=g||">"===e.operator||">="===e.operator,f=f||"<"===e.operator||"<="===e.operator,a)if(">"===e.operator||">="===e.operator){if(h=c(a,e,n),h===e&&h!==a)return!1}else if(">="===a.operator&&!o(a.semver,String(e),n))return!1;if(l)if("<"===e.operator||"<="===e.operator){if(p=u(l,e,n),p===e&&p!==l)return!1}else if("<="===l.operator&&!o(l.semver,String(e),n))return!1;if(!e.operator&&(l||a)&&0!==d)return!1}return!(a&&f&&!l&&0!==d)&&!(l&&g&&!a&&0!==d)},c=(e,t,n)=>{if(!e)return t;const i=s(e.semver,t.semver,n);return i>0?e:i<0||">"===t.operator&&">="===e.operator?t:e},u=(e,t,n)=>{if(!e)return t;const i=s(e.semver,t.semver,n);return i<0?e:i>0||"<"===t.operator&&"<="===e.operator?t:e};e.exports=(e,t,n)=>{if(e===t)return!0;e=new i(e,n),t=new i(t,n);let r=!1;e:for(const i of e.set){for(const e of t.set){const t=a(i,e,n);if(r=r||null!==t,t)continue e}if(r)return!1}return!0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(7),r=n(37),o=n(38),s=n(83);class a extends s.AbstractMessageBuffer{constructor(e="utf-8"){super(e)}emptyBuffer(){return a.emptyBuffer}fromString(e,t){return Buffer.from(e,t)}toString(e,t){return e instanceof Buffer?e.toString(t):new r.TextDecoder(t).decode(e)}asNative(e,t){return void 0===t?e instanceof Buffer?e:Buffer.from(e):e instanceof Buffer?e.slice(0,t):Buffer.from(e,0,t)}allocNative(e){return Buffer.allocUnsafe(e)}}a.emptyBuffer=Buffer.allocUnsafe(0);class c{constructor(e){this.stream=e}onClose(e){return this.stream.on("close",e),o.Disposable.create(()=>this.stream.off("close",e))}onError(e){return this.stream.on("error",e),o.Disposable.create(()=>this.stream.off("error",e))}onEnd(e){return this.stream.on("end",e),o.Disposable.create(()=>this.stream.off("end",e))}onData(e){return this.stream.on("data",e),o.Disposable.create(()=>this.stream.off("data",e))}}class u{constructor(e){this.stream=e}onClose(e){return this.stream.on("close",e),o.Disposable.create(()=>this.stream.off("close",e))}onError(e){return this.stream.on("error",e),o.Disposable.create(()=>this.stream.off("error",e))}onEnd(e){return this.stream.on("end",e),o.Disposable.create(()=>this.stream.off("end",e))}write(e,t){return new Promise((n,i)=>{const r=e=>{null==e?n():i(e)};"string"==typeof e?this.stream.write(e,t,r):this.stream.write(e,r)})}end(){this.stream.end()}}const l=Object.freeze({messageBuffer:Object.freeze({create:e=>new a(e)}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:(e,t)=>{try{return Promise.resolve(Buffer.from(JSON.stringify(e,void 0,0),t.charset))}catch(e){return Promise.reject(e)}}}),decoder:Object.freeze({name:"application/json",decode:(e,t)=>{try{return e instanceof Buffer?Promise.resolve(JSON.parse(e.toString(t.charset))):Promise.resolve(JSON.parse(new r.TextDecoder(t.charset).decode(e)))}catch(e){return Promise.reject(e)}}})}),stream:Object.freeze({asReadableStream:e=>new c(e),asWritableStream:e=>new u(e)}),console:console,timer:Object.freeze({setTimeout:(e,t,...n)=>setTimeout(e,t,...n),clearTimeout(e){clearTimeout(e)},setImmediate:(e,...t)=>setImmediate(e,...t),clearImmediate(e){clearImmediate(e)}})});function d(){return l}!function(e){e.install=function(){i.default.install(l)}}(d||(d={})),t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractMessageBuffer=void 0;t.AbstractMessageBuffer=class{constructor(e="utf-8"){this._encoding=e,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(e){const t="string"==typeof e?this.fromString(e,this._encoding):e;this._chunks.push(t),this._totalLength+=t.byteLength}tryReadHeaders(){if(0===this._chunks.length)return;let e=0,t=0,n=0,i=0;e:for(;t<this._chunks.length;){const r=this._chunks[t];for(n=0;n<r.length;){switch(r[n]){case 13:switch(e){case 0:e=1;break;case 2:e=3;break;default:e=0}break;case 10:switch(e){case 1:e=2;break;case 3:e=4,n++;break e;default:e=0}break;default:e=0}n++}i+=r.byteLength,t++}if(4!==e)return;const r=this._read(i+n),o=new Map,s=this.toString(r,"ascii").split("\r\n");if(s.length<2)return o;for(let e=0;e<s.length-2;e++){const t=s[e],n=t.indexOf(":");if(-1===n)throw new Error("Message header must separate key and value using :");const i=t.substr(0,n),r=t.substr(n+1).trim();o.set(i,r)}return o}tryReadBody(e){if(!(this._totalLength<e))return this._read(e)}get numberOfBytes(){return this._totalLength}_read(e){if(0===e)return this.emptyBuffer();if(e>this._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===e){const t=this._chunks[0];return this._chunks.shift(),this._totalLength-=e,this.asNative(t)}if(this._chunks[0].byteLength>e){const t=this._chunks[0],n=this.asNative(t,e);return this._chunks[0]=t.slice(e),this._totalLength-=e,n}const t=this.allocNative(e);let n=0;for(;e>0;){const i=this._chunks[0];if(i.byteLength>e){const r=i.slice(0,e);t.set(r,n),n+=e,this._chunks[0]=i.slice(e),this._totalLength-=e,e-=e}else t.set(i,n),n+=i.byteLength,this._chunks.shift(),this._totalLength-=i.byteLength,e-=i.byteLength}return t}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ReadableStreamMessageReader=t.AbstractMessageReader=t.MessageReader=void 0;const i=n(7),r=n(13),o=n(14);var s;!function(e){e.is=function(e){let t=e;return t&&r.func(t.listen)&&r.func(t.dispose)&&r.func(t.onError)&&r.func(t.onClose)&&r.func(t.onPartialMessage)}}(t.MessageReader||(t.MessageReader={}));class a{constructor(){this.errorEmitter=new o.Emitter,this.closeEmitter=new o.Emitter,this.partialMessageEmitter=new o.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e){this.errorEmitter.fire(this.asError(e))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(e){this.partialMessageEmitter.fire(e)}asError(e){return e instanceof Error?e:new Error("Reader received error. Reason: "+(r.string(e.message)?e.message:"unknown"))}}t.AbstractMessageReader=a,function(e){e.fromOptions=function(e){var t;let n,r;const o=new Map;let s;const a=new Map;if(void 0===e||"string"==typeof e)n=null!=e?e:"utf-8";else{if(n=null!==(t=e.charset)&&void 0!==t?t:"utf-8",void 0!==e.contentDecoder&&(r=e.contentDecoder,o.set(r.name,r)),void 0!==e.contentDecoders)for(const t of e.contentDecoders)o.set(t.name,t);if(void 0!==e.contentTypeDecoder&&(s=e.contentTypeDecoder,a.set(s.name,s)),void 0!==e.contentTypeDecoders)for(const t of e.contentTypeDecoders)a.set(t.name,t)}return void 0===s&&(s=i.default().applicationJson.decoder,a.set(s.name,s)),{charset:n,contentDecoder:r,contentDecoders:o,contentTypeDecoder:s,contentTypeDecoders:a}}}(s||(s={}));t.ReadableStreamMessageReader=class extends a{constructor(e,t){super(),this.readable=e,this.options=s.fromOptions(t),this.buffer=i.default().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0}set partialMessageTimeout(e){this._partialMessageTimeout=e}get partialMessageTimeout(){return this._partialMessageTimeout}listen(e){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=e;const t=this.readable.onData(e=>{this.onData(e)});return this.readable.onError(e=>this.fireError(e)),this.readable.onClose(()=>this.fireClose()),t}onData(e){for(this.buffer.append(e);;){if(-1===this.nextMessageLength){const e=this.buffer.tryReadHeaders();if(!e)return;const t=e.get("Content-Length");if(!t)throw new Error("Header must provide a Content-Length property.");const n=parseInt(t);if(isNaN(n))throw new Error("Content-Length value must be a number.");this.nextMessageLength=n}const e=this.buffer.tryReadBody(this.nextMessageLength);if(void 0===e)return void this.setPartialMessageTimer();let t;this.clearPartialMessageTimer(),this.nextMessageLength=-1,t=void 0!==this.options.contentDecoder?this.options.contentDecoder.decode(e):Promise.resolve(e),t.then(e=>{this.options.contentTypeDecoder.decode(e,this.options).then(e=>{this.callback(e)},e=>{this.fireError(e)})},e=>{this.fireError(e)})}}clearPartialMessageTimer(){this.partialMessageTimer&&(i.default().timer.clearTimeout(this.partialMessageTimer),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),this._partialMessageTimeout<=0||(this.partialMessageTimer=i.default().timer.setTimeout((e,t)=>{this.partialMessageTimer=void 0,e===this.messageToken&&(this.firePartialMessage({messageToken:e,waitingTime:t}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WriteableStreamMessageWriter=t.AbstractMessageWriter=t.MessageWriter=void 0;const i=n(7),r=n(13),o=n(86),s=n(14);var a;!function(e){e.is=function(e){let t=e;return t&&r.func(t.dispose)&&r.func(t.onClose)&&r.func(t.onError)&&r.func(t.write)}}(t.MessageWriter||(t.MessageWriter={}));class c{constructor(){this.errorEmitter=new s.Emitter,this.closeEmitter=new s.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e,t,n){this.errorEmitter.fire([this.asError(e),t,n])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(e){return e instanceof Error?e:new Error("Writer received error. Reason: "+(r.string(e.message)?e.message:"unknown"))}}t.AbstractMessageWriter=c,function(e){e.fromOptions=function(e){var t,n;return void 0===e||"string"==typeof e?{charset:null!=e?e:"utf-8",contentTypeEncoder:i.default().applicationJson.encoder}:{charset:null!==(t=e.charset)&&void 0!==t?t:"utf-8",contentEncoder:e.contentEncoder,contentTypeEncoder:null!==(n=e.contentTypeEncoder)&&void 0!==n?n:i.default().applicationJson.encoder}}}(a||(a={}));t.WriteableStreamMessageWriter=class extends c{constructor(e,t){super(),this.writable=e,this.options=a.fromOptions(t),this.errorCount=0,this.writeSemaphore=new o.Semaphore(1),this.writable.onError(e=>this.fireError(e)),this.writable.onClose(()=>this.fireClose())}async write(e){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(e,this.options).then(e=>void 0!==this.options.contentEncoder?this.options.contentEncoder.encode(e):e).then(t=>{const n=[];return n.push("Content-Length: ",t.byteLength.toString(),"\r\n"),n.push("\r\n"),this.doWrite(e,n,t)},e=>{throw this.fireError(e),e}))}async doWrite(e,t,n){try{return await this.writable.write(t.join(""),"ascii"),this.writable.write(n)}catch(t){return this.handleError(t,e),Promise.reject(t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){this.writable.end()}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Semaphore=void 0;const i=n(7);t.Semaphore=class{constructor(e=1){if(e<=0)throw new Error("Capacity must be greater than 0");this._capacity=e,this._active=0,this._waiting=[]}lock(e){return new Promise((t,n)=>{this._waiting.push({thunk:e,resolve:t,reject:n}),this.runNext()})}get active(){return this._active}runNext(){0!==this._waiting.length&&this._active!==this._capacity&&i.default().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(0===this._waiting.length||this._active===this._capacity)return;const e=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("To many thunks active");try{const t=e.thunk();t instanceof Promise?t.then(t=>{this._active--,e.resolve(t),this.runNext()},t=>{this._active--,e.reject(t),this.runNext()}):(this._active--,e.resolve(t),this.runNext())}catch(t){this._active--,e.reject(t),this.runNext()}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createMessageConnection=t.ConnectionOptions=t.CancellationStrategy=t.CancellationSenderStrategy=t.CancellationReceiverStrategy=t.ConnectionStrategy=t.ConnectionError=t.ConnectionErrors=t.LogTraceNotification=t.SetTraceNotification=t.TraceFormat=t.Trace=t.NullLogger=t.ProgressType=void 0;const i=n(7),r=n(13),o=n(40),s=n(88),a=n(14),c=n(41);var u,l,d,h,p,f,g,m,v,y,C,R,w;!function(e){e.type=new o.NotificationType("$/cancelRequest")}(u||(u={})),function(e){e.type=new o.NotificationType("$/progress")}(l||(l={}));t.ProgressType=class{constructor(){}},function(e){e.is=function(e){return r.func(e)}}(d||(d={})),t.NullLogger=Object.freeze({error:()=>{},warn:()=>{},info:()=>{},log:()=>{}}),function(e){e[e.Off=0]="Off",e[e.Messages=1]="Messages",e[e.Verbose=2]="Verbose"}(h=t.Trace||(t.Trace={})),function(e){e.fromString=function(t){if(!r.string(t))return e.Off;switch(t=t.toLowerCase()){case"off":return e.Off;case"messages":return e.Messages;case"verbose":return e.Verbose;default:return e.Off}},e.toString=function(t){switch(t){case e.Off:return"off";case e.Messages:return"messages";case e.Verbose:return"verbose";default:return"off"}}}(h=t.Trace||(t.Trace={})),function(e){e.Text="text",e.JSON="json"}(t.TraceFormat||(t.TraceFormat={})),function(e){e.fromString=function(t){return"json"===(t=t.toLowerCase())?e.JSON:e.Text}}(p=t.TraceFormat||(t.TraceFormat={})),function(e){e.type=new o.NotificationType("$/setTrace")}(f=t.SetTraceNotification||(t.SetTraceNotification={})),function(e){e.type=new o.NotificationType("$/logTrace")}(g=t.LogTraceNotification||(t.LogTraceNotification={})),function(e){e[e.Closed=1]="Closed",e[e.Disposed=2]="Disposed",e[e.AlreadyListening=3]="AlreadyListening"}(m=t.ConnectionErrors||(t.ConnectionErrors={}));class b extends Error{constructor(e,t){super(t),this.code=e,Object.setPrototypeOf(this,b.prototype)}}t.ConnectionError=b,function(e){e.is=function(e){const t=e;return t&&r.func(t.cancelUndispatched)}}(v=t.ConnectionStrategy||(t.ConnectionStrategy={})),function(e){e.Message=Object.freeze({createCancellationTokenSource:e=>new c.CancellationTokenSource}),e.is=function(e){const t=e;return t&&r.func(t.createCancellationTokenSource)}}(y=t.CancellationReceiverStrategy||(t.CancellationReceiverStrategy={})),function(e){e.Message=Object.freeze({sendCancellation(e,t){e.sendNotification(u.type,{id:t})},cleanup(e){}}),e.is=function(e){const t=e;return t&&r.func(t.sendCancellation)&&r.func(t.cleanup)}}(C=t.CancellationSenderStrategy||(t.CancellationSenderStrategy={})),function(e){e.Message=Object.freeze({receiver:y.Message,sender:C.Message}),e.is=function(e){const t=e;return t&&y.is(t.receiver)&&C.is(t.sender)}}(R=t.CancellationStrategy||(t.CancellationStrategy={})),function(e){e.is=function(e){const t=e;return t&&(R.is(t.cancellationStrategy)||v.is(t.connectionStrategy))}}(t.ConnectionOptions||(t.ConnectionOptions={})),function(e){e[e.New=1]="New",e[e.Listening=2]="Listening",e[e.Closed=3]="Closed",e[e.Disposed=4]="Disposed"}(w||(w={})),t.createMessageConnection=function(e,n,v,y){const C=void 0!==v?v:t.NullLogger;let T=0,S=0,_=0,P=void 0;const D=Object.create(null);let E=void 0;const x=Object.create(null),k=new Map;let O,F,q=new s.LinkedMap,N=Object.create(null),I=Object.create(null),M=h.Off,A=p.Text,L=w.New;const j=new a.Emitter,$=new a.Emitter,W=new a.Emitter,K=new a.Emitter,U=new a.Emitter,H=y&&y.cancellationStrategy?y.cancellationStrategy:R.Message;function z(e){if(null===e)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+e.toString()}function B(e,t){var n;o.isRequestMessage(t)?e.set(z(t.id),t):o.isResponseMessage(t)?e.set(null===(n=t.id)?"res-unknown-"+(++_).toString():"res-"+n.toString(),t):e.set("not-"+(++S).toString(),t)}function G(e){}function V(){return L===w.Listening}function X(){return L===w.Closed}function J(){return L===w.Disposed}function Y(){L!==w.New&&L!==w.Listening||(L=w.Closed,$.fire(void 0))}function Z(){O||0===q.size||(O=i.default().timer.setImmediate(()=>{O=void 0,function(){if(0===q.size)return;const e=q.shift();try{o.isRequestMessage(e)?function(e){if(J())return;function t(t,i,r){const s={jsonrpc:"2.0",id:e.id};t instanceof o.ResponseError?s.error=t.toJson():s.result=void 0===t?null:t,ee(s,i,r),n.write(s)}function i(t,i,r){const o={jsonrpc:"2.0",id:e.id,error:t.toJson()};ee(o,i,r),n.write(o)}!function(e){if(M===h.Off||!F)return;if(A===p.Text){let t=void 0;M===h.Verbose&&e.params&&(t=`Params: ${JSON.stringify(e.params,null,4)}\n\n`),F.log(`Received request '${e.method} - (${e.id})'.`,t)}else te("receive-request",e)}(e);const s=D[e.method];let a,c;s&&(a=s.type,c=s.handler);const u=Date.now();if(c||P){const s=String(e.id),l=H.receiver.createCancellationTokenSource(s);I[s]=l;try{let d;if(c)if(void 0===e.params){if(void 0!==a&&0!==a.numberOfParams)return void i(new o.ResponseError(o.ErrorCodes.InvalidParams,`Request ${e.method} defines ${a.numberOfParams} params but recevied none.`),e.method,u);d=c(l.token)}else if(Array.isArray(e.params)){if(void 0!==a&&a.parameterStructures===o.ParameterStructures.byName)return void i(new o.ResponseError(o.ErrorCodes.InvalidParams,`Request ${e.method} defines parameters by name but received parameters by position`),e.method,u);d=c(...e.params,l.token)}else{if(void 0!==a&&a.parameterStructures===o.ParameterStructures.byPosition)return void i(new o.ResponseError(o.ErrorCodes.InvalidParams,`Request ${e.method} defines parameters by position but received parameters by name`),e.method,u);d=c(e.params,l.token)}else P&&(d=P(e.method,e.params,l.token));const h=d;d?h.then?h.then(n=>{delete I[s],t(n,e.method,u)},t=>{delete I[s],t instanceof o.ResponseError?i(t,e.method,u):t&&r.string(t.message)?i(new o.ResponseError(o.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${t.message}`),e.method,u):i(new o.ResponseError(o.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,u)}):(delete I[s],t(d,e.method,u)):(delete I[s],function(t,i,r){void 0===t&&(t=null);const o={jsonrpc:"2.0",id:e.id,result:t};ee(o,i,r),n.write(o)}(d,e.method,u))}catch(n){delete I[s],n instanceof o.ResponseError?t(n,e.method,u):n&&r.string(n.message)?i(new o.ResponseError(o.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${n.message}`),e.method,u):i(new o.ResponseError(o.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,u)}}else i(new o.ResponseError(o.ErrorCodes.MethodNotFound,"Unhandled method "+e.method),e.method,u)}(e):o.isNotificationMessage(e)?function(e){if(J())return;let t,n=void 0;if(e.method===u.type.method)t=e=>{const t=e.id,n=I[String(t)];n&&n.cancel()};else{const i=x[e.method];i&&(t=i.handler,n=i.type)}if(t||E)try{!function(e){if(M===h.Off||!F||e.method===g.type.method)return;if(A===p.Text){let t=void 0;M===h.Verbose&&(t=e.params?`Params: ${JSON.stringify(e.params,null,4)}\n\n`:"No parameters provided.\n\n"),F.log(`Received notification '${e.method}'.`,t)}else te("receive-notification",e)}(e),t?void 0===e.params?(void 0!==n&&0!==n.numberOfParams&&n.parameterStructures!==o.ParameterStructures.byName&&C.error(`Notification ${e.method} defines ${n.numberOfParams} params but recevied none.`),t()):Array.isArray(e.params)?(void 0!==n&&(n.parameterStructures===o.ParameterStructures.byName&&C.error(`Notification ${e.method} defines parameters by name but received parameters by position`),n.numberOfParams!==e.params.length&&C.error(`Notification ${e.method} defines ${n.numberOfParams} params but received ${e.params.length} argumennts`)),t(...e.params)):(void 0!==n&&n.parameterStructures===o.ParameterStructures.byPosition&&C.error(`Notification ${e.method} defines parameters by position but received parameters by name`),t(e.params)):E&&E(e.method,e.params)}catch(t){t.message?C.error(`Notification handler '${e.method}' failed with message: ${t.message}`):C.error(`Notification handler '${e.method}' failed unexpectedly.`)}else W.fire(e)}(e):o.isResponseMessage(e)?function(e){if(J())return;if(null===e.id)e.error?C.error("Received response message without id: Error is: \n"+JSON.stringify(e.error,void 0,4)):C.error("Received response message without id. No further error information provided.");else{const t=String(e.id),n=N[t];if(function(e,t){if(M===h.Off||!F)return;if(A===p.Text){let n=void 0;if(M===h.Verbose&&(e.error&&e.error.data?n=`Error data: ${JSON.stringify(e.error.data,null,4)}\n\n`:e.result?n=`Result: ${JSON.stringify(e.result,null,4)}\n\n`:void 0===e.error&&(n="No result returned.\n\n")),t){const i=e.error?` Request failed: ${e.error.message} (${e.error.code}).`:"";F.log(`Received response '${t.method} - (${e.id})' in ${Date.now()-t.timerStart}ms.${i}`,n)}else F.log(`Received response ${e.id} without active response promise.`,n)}else te("receive-response",e)}(e,n),n){delete N[t];try{if(e.error){const t=e.error;n.reject(new o.ResponseError(t.code,t.message,t.data))}else{if(void 0===e.result)throw new Error("Should never happen.");n.resolve(e.result)}}catch(e){e.message?C.error(`Response handler '${n.method}' failed with message: ${e.message}`):C.error(`Response handler '${n.method}' failed unexpectedly.`)}}}}(e):function(e){if(!e)return void C.error("Received empty message.");C.error("Received message which is neither a response nor a notification message:\n"+JSON.stringify(e,null,4));const t=e;if(r.string(t.id)||r.number(t.id)){const e=String(t.id),n=N[e];n&&n.reject(new Error("The received response has neither a result nor an error property."))}}(e)}finally{Z()}}()}))}e.onClose(Y),e.onError((function(e){j.fire([e,void 0,void 0])})),n.onClose(Y),n.onError((function(e){j.fire(e)}));const Q=e=>{try{if(o.isNotificationMessage(e)&&e.method===u.type.method){const t=z(e.params.id),i=q.get(t);if(o.isRequestMessage(i)){const r=null==y?void 0:y.connectionStrategy,o=r&&r.cancelUndispatched?r.cancelUndispatched(i,G):void 0;if(o&&(void 0!==o.error||void 0!==o.result))return q.delete(t),o.id=i.id,ee(o,e.method,Date.now()),void n.write(o)}}B(q,e)}finally{Z()}};function ee(e,t,n){if(M!==h.Off&&F)if(A===p.Text){let i=void 0;M===h.Verbose&&(e.error&&e.error.data?i=`Error data: ${JSON.stringify(e.error.data,null,4)}\n\n`:e.result?i=`Result: ${JSON.stringify(e.result,null,4)}\n\n`:void 0===e.error&&(i="No result returned.\n\n")),F.log(`Sending response '${t} - (${e.id})'. Processing request took ${Date.now()-n}ms`,i)}else te("send-response",e)}function te(e,t){if(!F||M===h.Off)return;const n={isLSPMessage:!0,type:e,message:t,timestamp:Date.now()};F.log(n)}function ne(){if(X())throw new b(m.Closed,"Connection is closed.");if(J())throw new b(m.Disposed,"Connection is disposed.")}function ie(e){return void 0===e?null:e}function re(e){return null===e?void 0:e}function oe(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function se(e,t){switch(e){case o.ParameterStructures.auto:return oe(t)?re(t):[ie(t)];case o.ParameterStructures.byName:if(!oe(t))throw new Error("Recevied parameters by name but param is not an object literal.");return re(t);case o.ParameterStructures.byPosition:return[ie(t)];default:throw new Error("Unknown parameter structure "+e.toString())}}function ae(e,t){let n;const i=e.numberOfParams;switch(i){case 0:n=void 0;break;case 1:n=se(e.parameterStructures,t[0]);break;default:n=[];for(let e=0;e<t.length&&e<i;e++)n.push(ie(t[e]));if(t.length<i)for(let e=t.length;e<i;e++)n.push(null)}return n}const ce={sendNotification:(e,...t)=>{let i,s;if(ne(),r.string(e)){i=e;const n=t[0];let r=0,a=o.ParameterStructures.auto;o.ParameterStructures.is(n)&&(r=1,a=n);let c=t.length;const u=c-r;switch(u){case 0:s=void 0;break;case 1:s=se(a,t[r]);break;default:if(a===o.ParameterStructures.byName)throw new Error(`Recevied ${u} parameters for 'by Name' notification parameter structure.`);s=t.slice(r,c).map(e=>ie(e))}}else{const n=t;i=e.method,s=ae(e,n)}const a={jsonrpc:"2.0",method:i,params:s};!function(e){if(M!==h.Off&&F)if(A===p.Text){let t=void 0;M===h.Verbose&&(t=e.params?`Params: ${JSON.stringify(e.params,null,4)}\n\n`:"No parameters provided.\n\n"),F.log(`Sending notification '${e.method}'.`,t)}else te("send-notification",e)}(a),n.write(a)},onNotification:(e,t)=>{let n;return ne(),r.func(e)?E=e:t&&(r.string(e)?(n=e,x[e]={type:void 0,handler:t}):(n=e.method,x[e.method]={type:e,handler:t})),{dispose:()=>{void 0!==n?delete x[n]:E=void 0}}},onProgress:(e,t,n)=>{if(k.has(t))throw new Error(`Progress handler for token ${t} already registered`);return k.set(t,n),{dispose:()=>{k.delete(t)}}},sendProgress:(e,t,n)=>{ce.sendNotification(l.type,{token:t,value:n})},onUnhandledProgress:K.event,sendRequest:(e,...t)=>{let i,s;ne(),function(){if(!V())throw new Error("Call listen() first.")}();let a=void 0;if(r.string(e)){i=e;const n=t[0],r=t[t.length-1];let u=0,l=o.ParameterStructures.auto;o.ParameterStructures.is(n)&&(u=1,l=n);let d=t.length;c.CancellationToken.is(r)&&(d-=1,a=r);const h=d-u;switch(h){case 0:s=void 0;break;case 1:s=se(l,t[u]);break;default:if(l===o.ParameterStructures.byName)throw new Error(`Recevied ${h} parameters for 'by Name' request parameter structure.`);s=t.slice(u,d).map(e=>ie(e))}}else{const n=t;i=e.method,s=ae(e,n);const r=e.numberOfParams;a=c.CancellationToken.is(n[r])?n[r]:void 0}const u=T++;let l;a&&(l=a.onCancellationRequested(()=>{H.sender.sendCancellation(ce,u)}));return new Promise((e,t)=>{const r={jsonrpc:"2.0",id:u,method:i,params:s};let a={method:i,timerStart:Date.now(),resolve:t=>{e(t),H.sender.cleanup(u),null==l||l.dispose()},reject:e=>{t(e),H.sender.cleanup(u),null==l||l.dispose()}};!function(e){if(M!==h.Off&&F)if(A===p.Text){let t=void 0;M===h.Verbose&&e.params&&(t=`Params: ${JSON.stringify(e.params,null,4)}\n\n`),F.log(`Sending request '${e.method} - (${e.id})'.`,t)}else te("send-request",e)}(r);try{n.write(r)}catch(e){a.reject(new o.ResponseError(o.ErrorCodes.MessageWriteError,e.message?e.message:"Unknown reason")),a=null}a&&(N[String(u)]=a)})},onRequest:(e,t)=>{ne();let n=null;return d.is(e)?(n=void 0,P=e):r.string(e)?(n=null,void 0!==t&&(n=e,D[e]={handler:t,type:void 0})):void 0!==t&&(n=e.method,D[e.method]={type:e,handler:t}),{dispose:()=>{null!==n&&(void 0!==n?delete D[n]:P=void 0)}}},trace:(e,t,n)=>{let i=!1,o=p.Text;void 0!==n&&(r.boolean(n)?i=n:(i=n.sendNotification||!1,o=n.traceFormat||p.Text)),M=e,A=o,F=M===h.Off?void 0:t,!i||X()||J()||ce.sendNotification(f.type,{value:h.toString(e)})},onError:j.event,onClose:$.event,onUnhandledNotification:W.event,onDispose:U.event,end:()=>{n.end()},dispose:()=>{if(J())return;L=w.Disposed,U.fire(void 0);const t=new Error("Connection got disposed.");Object.keys(N).forEach(e=>{N[e].reject(t)}),N=Object.create(null),I=Object.create(null),q=new s.LinkedMap,r.func(n.dispose)&&n.dispose(),r.func(e.dispose)&&e.dispose()},listen:()=>{ne(),function(){if(V())throw new b(m.AlreadyListening,"Connection is already listening")}(),L=w.Listening,e.listen(Q)},inspect:()=>{i.default().console.log("inspect")}};return ce.onNotification(g.type,e=>{M!==h.Off&&F&&F.log(e.message,M===h.Verbose?e.verbose:void 0)}),ce.onNotification(l.type,e=>{const t=k.get(e.token);t?t(e.value):K.fire(e)}),ce}},function(e,t,n){"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.LRUCache=t.LinkedMap=t.Touch=void 0,function(e){e.None=0,e.First=1,e.AsOld=e.First,e.Last=2,e.AsNew=e.Last}(i=t.Touch||(t.Touch={}));class r{constructor(){this[Symbol.toStringTag]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){var e;return null===(e=this._head)||void 0===e?void 0:e.value}get last(){var e;return null===(e=this._tail)||void 0===e?void 0:e.value}has(e){return this._map.has(e)}get(e,t=i.None){const n=this._map.get(e);if(n)return t!==i.None&&this.touch(n,t),n.value}set(e,t,n=i.None){let r=this._map.get(e);if(r)r.value=t,n!==i.None&&this.touch(r,n);else{switch(r={key:e,value:t,next:void 0,previous:void 0},n){case i.None:this.addItemLast(r);break;case i.First:this.addItemFirst(r);break;case i.Last:default:this.addItemLast(r)}this._map.set(e,r),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){const t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){const n=this._state;let i=this._head;for(;i;){if(t?e.bind(t)(i.value,i.key,this):e(i.value,i.key,this),this._state!==n)throw new Error("LinkedMap got modified during iteration.");i=i.next}}keys(){const e=this,t=this._state;let n=this._head;const i={[Symbol.iterator]:()=>i,next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){const e={value:n.key,done:!1};return n=n.next,e}return{value:void 0,done:!0}}};return i}values(){const e=this,t=this._state;let n=this._head;const i={[Symbol.iterator]:()=>i,next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){const e={value:n.value,done:!1};return n=n.next,e}return{value:void 0,done:!0}}};return i}entries(){const e=this,t=this._state;let n=this._head;const i={[Symbol.iterator]:()=>i,next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){const e={value:[n.key,n.value],done:!1};return n=n.next,e}return{value:void 0,done:!0}}};return i}[Symbol.iterator](){return this.entries()}trimOld(e){if(e>=this.size)return;if(0===e)return void this.clear();let t=this._head,n=this.size;for(;t&&n>e;)this._map.delete(t.key),t=t.next,n--;this._head=t,this._size=n,t&&(t.previous=void 0),this._state++}addItemFirst(e){if(this._head||this._tail){if(!this._head)throw new Error("Invalid list");e.next=this._head,this._head.previous=e}else this._tail=e;this._head=e,this._state++}addItemLast(e){if(this._head||this._tail){if(!this._tail)throw new Error("Invalid list");e.previous=this._tail,this._tail.next=e}else this._head=e;this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{const t=e.next,n=e.previous;if(!t||!n)throw new Error("Invalid list");t.previous=n,n.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(t===i.First||t===i.Last)if(t===i.First){if(e===this._head)return;const t=e.next,n=e.previous;e===this._tail?(n.next=void 0,this._tail=n):(t.previous=n,n.next=t),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(t===i.Last){if(e===this._tail)return;const t=e.next,n=e.previous;e===this._head?(t.previous=void 0,this._head=t):(t.previous=n,n.next=t),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}toJSON(){const e=[];return this.forEach((t,n)=>{e.push([n,t])}),e}fromJSON(e){this.clear();for(const[t,n]of e)this.set(t,n)}}t.LinkedMap=r;t.LRUCache=class extends r{constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get ratio(){return this._ratio}set ratio(e){this._ratio=Math.min(Math.max(0,e),1),this.checkTrim()}get(e,t=i.AsNew){return super.get(e,t)}peek(e){return super.get(e,i.None)}set(e,t){return super.set(e,t,i.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}},function(e,t){e.exports=require("os")},function(e,t){e.exports=require("crypto")},function(e,t){e.exports=require("net")},function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.LSPErrorCodes=t.createProtocolConnection=void 0,r(n(12),t),r(n(93),t),r(n(2),t),r(n(94),t);var o=n(111);Object.defineProperty(t,"createProtocolConnection",{enumerable:!0,get:function(){return o.createProtocolConnection}}),function(e){e.lspReservedErrorRangeStart=-32899,e.ContentModified=-32801,e.RequestCancelled=-32800,e.lspReservedErrorRangeEnd=-32800}(t.LSPErrorCodes||(t.LSPErrorCodes={}))},function(e,t,n){"use strict";var i,r,o,s,a,c,u,l,d,h,p,f,g,m,v,y,C,R,w,b,T,S,_,P,D,E;n.r(t),n.d(t,"integer",(function(){return i})),n.d(t,"uinteger",(function(){return r})),n.d(t,"Position",(function(){return o})),n.d(t,"Range",(function(){return s})),n.d(t,"Location",(function(){return a})),n.d(t,"LocationLink",(function(){return c})),n.d(t,"Color",(function(){return u})),n.d(t,"ColorInformation",(function(){return l})),n.d(t,"ColorPresentation",(function(){return d})),n.d(t,"FoldingRangeKind",(function(){return h})),n.d(t,"FoldingRange",(function(){return p})),n.d(t,"DiagnosticRelatedInformation",(function(){return f})),n.d(t,"DiagnosticSeverity",(function(){return g})),n.d(t,"DiagnosticTag",(function(){return m})),n.d(t,"CodeDescription",(function(){return v})),n.d(t,"Diagnostic",(function(){return y})),n.d(t,"Command",(function(){return C})),n.d(t,"TextEdit",(function(){return R})),n.d(t,"ChangeAnnotation",(function(){return w})),n.d(t,"ChangeAnnotationIdentifier",(function(){return b})),n.d(t,"AnnotatedTextEdit",(function(){return T})),n.d(t,"TextDocumentEdit",(function(){return S})),n.d(t,"CreateFile",(function(){return _})),n.d(t,"RenameFile",(function(){return P})),n.d(t,"DeleteFile",(function(){return D})),n.d(t,"WorkspaceEdit",(function(){return E})),n.d(t,"WorkspaceChange",(function(){return ae})),n.d(t,"TextDocumentIdentifier",(function(){return x})),n.d(t,"VersionedTextDocumentIdentifier",(function(){return k})),n.d(t,"OptionalVersionedTextDocumentIdentifier",(function(){return O})),n.d(t,"TextDocumentItem",(function(){return F})),n.d(t,"MarkupKind",(function(){return q})),n.d(t,"MarkupContent",(function(){return N})),n.d(t,"CompletionItemKind",(function(){return I})),n.d(t,"InsertTextFormat",(function(){return M})),n.d(t,"CompletionItemTag",(function(){return A})),n.d(t,"InsertReplaceEdit",(function(){return L})),n.d(t,"InsertTextMode",(function(){return j})),n.d(t,"CompletionItem",(function(){return $})),n.d(t,"CompletionList",(function(){return W})),n.d(t,"MarkedString",(function(){return K})),n.d(t,"Hover",(function(){return U})),n.d(t,"ParameterInformation",(function(){return H})),n.d(t,"SignatureInformation",(function(){return z})),n.d(t,"DocumentHighlightKind",(function(){return B})),n.d(t,"DocumentHighlight",(function(){return G})),n.d(t,"SymbolKind",(function(){return V})),n.d(t,"SymbolTag",(function(){return X})),n.d(t,"SymbolInformation",(function(){return J})),n.d(t,"DocumentSymbol",(function(){return Y})),n.d(t,"CodeActionKind",(function(){return Z})),n.d(t,"CodeActionContext",(function(){return Q})),n.d(t,"CodeAction",(function(){return ee})),n.d(t,"CodeLens",(function(){return te})),n.d(t,"FormattingOptions",(function(){return ne})),n.d(t,"DocumentLink",(function(){return ie})),n.d(t,"SelectionRange",(function(){return re})),n.d(t,"EOL",(function(){return ue})),n.d(t,"TextDocument",(function(){return ce})),function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647}(i||(i={})),function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647}(r||(r={})),function(e){e.create=function(e,t){return e===Number.MAX_VALUE&&(e=r.MAX_VALUE),t===Number.MAX_VALUE&&(t=r.MAX_VALUE),{line:e,character:t}},e.is=function(e){var t=e;return le.objectLiteral(t)&&le.uinteger(t.line)&&le.uinteger(t.character)}}(o||(o={})),function(e){e.create=function(e,t,n,i){if(le.uinteger(e)&&le.uinteger(t)&&le.uinteger(n)&&le.uinteger(i))return{start:o.create(e,t),end:o.create(n,i)};if(o.is(e)&&o.is(t))return{start:e,end:t};throw new Error("Range#create called with invalid arguments["+e+", "+t+", "+n+", "+i+"]")},e.is=function(e){var t=e;return le.objectLiteral(t)&&o.is(t.start)&&o.is(t.end)}}(s||(s={})),function(e){e.create=function(e,t){return{uri:e,range:t}},e.is=function(e){var t=e;return le.defined(t)&&s.is(t.range)&&(le.string(t.uri)||le.undefined(t.uri))}}(a||(a={})),function(e){e.create=function(e,t,n,i){return{targetUri:e,targetRange:t,targetSelectionRange:n,originSelectionRange:i}},e.is=function(e){var t=e;return le.defined(t)&&s.is(t.targetRange)&&le.string(t.targetUri)&&(s.is(t.targetSelectionRange)||le.undefined(t.targetSelectionRange))&&(s.is(t.originSelectionRange)||le.undefined(t.originSelectionRange))}}(c||(c={})),function(e){e.create=function(e,t,n,i){return{red:e,green:t,blue:n,alpha:i}},e.is=function(e){var t=e;return le.numberRange(t.red,0,1)&&le.numberRange(t.green,0,1)&&le.numberRange(t.blue,0,1)&&le.numberRange(t.alpha,0,1)}}(u||(u={})),function(e){e.create=function(e,t){return{range:e,color:t}},e.is=function(e){var t=e;return s.is(t.range)&&u.is(t.color)}}(l||(l={})),function(e){e.create=function(e,t,n){return{label:e,textEdit:t,additionalTextEdits:n}},e.is=function(e){var t=e;return le.string(t.label)&&(le.undefined(t.textEdit)||R.is(t))&&(le.undefined(t.additionalTextEdits)||le.typedArray(t.additionalTextEdits,R.is))}}(d||(d={})),function(e){e.Comment="comment",e.Imports="imports",e.Region="region"}(h||(h={})),function(e){e.create=function(e,t,n,i,r){var o={startLine:e,endLine:t};return le.defined(n)&&(o.startCharacter=n),le.defined(i)&&(o.endCharacter=i),le.defined(r)&&(o.kind=r),o},e.is=function(e){var t=e;return le.uinteger(t.startLine)&&le.uinteger(t.startLine)&&(le.undefined(t.startCharacter)||le.uinteger(t.startCharacter))&&(le.undefined(t.endCharacter)||le.uinteger(t.endCharacter))&&(le.undefined(t.kind)||le.string(t.kind))}}(p||(p={})),function(e){e.create=function(e,t){return{location:e,message:t}},e.is=function(e){var t=e;return le.defined(t)&&a.is(t.location)&&le.string(t.message)}}(f||(f={})),function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4}(g||(g={})),function(e){e.Unnecessary=1,e.Deprecated=2}(m||(m={})),function(e){e.is=function(e){var t=e;return null!=t&&le.string(t.href)}}(v||(v={})),function(e){e.create=function(e,t,n,i,r,o){var s={range:e,message:t};return le.defined(n)&&(s.severity=n),le.defined(i)&&(s.code=i),le.defined(r)&&(s.source=r),le.defined(o)&&(s.relatedInformation=o),s},e.is=function(e){var t,n=e;return le.defined(n)&&s.is(n.range)&&le.string(n.message)&&(le.number(n.severity)||le.undefined(n.severity))&&(le.integer(n.code)||le.string(n.code)||le.undefined(n.code))&&(le.undefined(n.codeDescription)||le.string(null===(t=n.codeDescription)||void 0===t?void 0:t.href))&&(le.string(n.source)||le.undefined(n.source))&&(le.undefined(n.relatedInformation)||le.typedArray(n.relatedInformation,f.is))}}(y||(y={})),function(e){e.create=function(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];var r={title:e,command:t};return le.defined(n)&&n.length>0&&(r.arguments=n),r},e.is=function(e){var t=e;return le.defined(t)&&le.string(t.title)&&le.string(t.command)}}(C||(C={})),function(e){e.replace=function(e,t){return{range:e,newText:t}},e.insert=function(e,t){return{range:{start:e,end:e},newText:t}},e.del=function(e){return{range:e,newText:""}},e.is=function(e){var t=e;return le.objectLiteral(t)&&le.string(t.newText)&&s.is(t.range)}}(R||(R={})),function(e){e.create=function(e,t,n){var i={label:e};return void 0!==t&&(i.needsConfirmation=t),void 0!==n&&(i.description=n),i},e.is=function(e){var t=e;return void 0!==t&&le.objectLiteral(t)&&le.string(t.label)&&(le.boolean(t.needsConfirmation)||void 0===t.needsConfirmation)&&(le.string(t.description)||void 0===t.description)}}(w||(w={})),function(e){e.is=function(e){return"string"==typeof e}}(b||(b={})),function(e){e.replace=function(e,t,n){return{range:e,newText:t,annotationId:n}},e.insert=function(e,t,n){return{range:{start:e,end:e},newText:t,annotationId:n}},e.del=function(e,t){return{range:e,newText:"",annotationId:t}},e.is=function(e){var t=e;return R.is(t)&&(w.is(t.annotationId)||b.is(t.annotationId))}}(T||(T={})),function(e){e.create=function(e,t){return{textDocument:e,edits:t}},e.is=function(e){var t=e;return le.defined(t)&&O.is(t.textDocument)&&Array.isArray(t.edits)}}(S||(S={})),function(e){e.create=function(e,t,n){var i={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(i.options=t),void 0!==n&&(i.annotationId=n),i},e.is=function(e){var t=e;return t&&"create"===t.kind&&le.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||le.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||le.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||b.is(t.annotationId))}}(_||(_={})),function(e){e.create=function(e,t,n,i){var r={kind:"rename",oldUri:e,newUri:t};return void 0===n||void 0===n.overwrite&&void 0===n.ignoreIfExists||(r.options=n),void 0!==i&&(r.annotationId=i),r},e.is=function(e){var t=e;return t&&"rename"===t.kind&&le.string(t.oldUri)&&le.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||le.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||le.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||b.is(t.annotationId))}}(P||(P={})),function(e){e.create=function(e,t,n){var i={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(i.options=t),void 0!==n&&(i.annotationId=n),i},e.is=function(e){var t=e;return t&&"delete"===t.kind&&le.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||le.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||le.boolean(t.options.ignoreIfNotExists)))&&(void 0===t.annotationId||b.is(t.annotationId))}}(D||(D={})),function(e){e.is=function(e){var t=e;return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every((function(e){return le.string(e.kind)?_.is(e)||P.is(e)||D.is(e):S.is(e)})))}}(E||(E={}));var x,k,O,F,q,N,I,M,A,L,j,$,W,K,U,H,z,B,G,V,X,J,Y,Z,Q,ee,te,ne,ie,re,oe=function(){function e(e,t){this.edits=e,this.changeAnnotations=t}return e.prototype.insert=function(e,t,n){var i,r;if(void 0===n?i=R.insert(e,t):b.is(n)?(r=n,i=T.insert(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),r=this.changeAnnotations.manage(n),i=T.insert(e,t,r)),this.edits.push(i),void 0!==r)return r},e.prototype.replace=function(e,t,n){var i,r;if(void 0===n?i=R.replace(e,t):b.is(n)?(r=n,i=T.replace(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),r=this.changeAnnotations.manage(n),i=T.replace(e,t,r)),this.edits.push(i),void 0!==r)return r},e.prototype.delete=function(e,t){var n,i;if(void 0===t?n=R.del(e):b.is(t)?(i=t,n=T.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(t),n=T.del(e,i)),this.edits.push(n),void 0!==i)return i},e.prototype.add=function(e){this.edits.push(e)},e.prototype.all=function(){return this.edits},e.prototype.clear=function(){this.edits.splice(0,this.edits.length)},e.prototype.assertChangeAnnotations=function(e){if(void 0===e)throw new Error("Text edit change is not configured to manage change annotations.")},e}(),se=function(){function e(e){this._annotations=void 0===e?Object.create(null):e,this._counter=0,this._size=0}return e.prototype.all=function(){return this._annotations},Object.defineProperty(e.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),e.prototype.manage=function(e,t){var n;if(b.is(e)?n=e:(n=this.nextId(),t=e),void 0!==this._annotations[n])throw new Error("Id "+n+" is already in use.");if(void 0===t)throw new Error("No annotation provided for id "+n);return this._annotations[n]=t,this._size++,n},e.prototype.nextId=function(){return this._counter++,this._counter.toString()},e}(),ae=function(){function e(e){var t=this;this._textEditChanges=Object.create(null),void 0!==e?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new se(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach((function(e){if(S.is(e)){var n=new oe(e.edits,t._changeAnnotations);t._textEditChanges[e.textDocument.uri]=n}}))):e.changes&&Object.keys(e.changes).forEach((function(n){var i=new oe(e.changes[n]);t._textEditChanges[n]=i}))):this._workspaceEdit={}}return Object.defineProperty(e.prototype,"edit",{get:function(){return this.initDocumentChanges(),void 0!==this._changeAnnotations&&(0===this._changeAnnotations.size?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit},enumerable:!1,configurable:!0}),e.prototype.getTextEditChange=function(e){if(O.is(e)){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var t={uri:e.uri,version:e.version};if(!(i=this._textEditChanges[t.uri])){var n={textDocument:t,edits:r=[]};this._workspaceEdit.documentChanges.push(n),i=new oe(r,this._changeAnnotations),this._textEditChanges[t.uri]=i}return i}if(this.initChanges(),void 0===this._workspaceEdit.changes)throw new Error("Workspace edit is not configured for normal text edit changes.");var i;if(!(i=this._textEditChanges[e])){var r=[];this._workspaceEdit.changes[e]=r,i=new oe(r),this._textEditChanges[e]=i}return i},e.prototype.initDocumentChanges=function(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._changeAnnotations=new se,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())},e.prototype.initChanges=function(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._workspaceEdit.changes=Object.create(null))},e.prototype.createFile=function(e,t,n){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var i,r,o;if(w.is(t)||b.is(t)?i=t:n=t,void 0===i?r=_.create(e,n):(o=b.is(i)?i:this._changeAnnotations.manage(i),r=_.create(e,n,o)),this._workspaceEdit.documentChanges.push(r),void 0!==o)return o},e.prototype.renameFile=function(e,t,n,i){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var r,o,s;if(w.is(n)||b.is(n)?r=n:i=n,void 0===r?o=P.create(e,t,i):(s=b.is(r)?r:this._changeAnnotations.manage(r),o=P.create(e,t,i,s)),this._workspaceEdit.documentChanges.push(o),void 0!==s)return s},e.prototype.deleteFile=function(e,t,n){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var i,r,o;if(w.is(t)||b.is(t)?i=t:n=t,void 0===i?r=D.create(e,n):(o=b.is(i)?i:this._changeAnnotations.manage(i),r=D.create(e,n,o)),this._workspaceEdit.documentChanges.push(r),void 0!==o)return o},e}();!function(e){e.create=function(e){return{uri:e}},e.is=function(e){var t=e;return le.defined(t)&&le.string(t.uri)}}(x||(x={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){var t=e;return le.defined(t)&&le.string(t.uri)&&le.integer(t.version)}}(k||(k={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){var t=e;return le.defined(t)&&le.string(t.uri)&&(null===t.version||le.integer(t.version))}}(O||(O={})),function(e){e.create=function(e,t,n,i){return{uri:e,languageId:t,version:n,text:i}},e.is=function(e){var t=e;return le.defined(t)&&le.string(t.uri)&&le.string(t.languageId)&&le.integer(t.version)&&le.string(t.text)}}(F||(F={})),function(e){e.PlainText="plaintext",e.Markdown="markdown"}(q||(q={})),function(e){e.is=function(t){var n=t;return n===e.PlainText||n===e.Markdown}}(q||(q={})),function(e){e.is=function(e){var t=e;return le.objectLiteral(e)&&q.is(t.kind)&&le.string(t.value)}}(N||(N={})),function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25}(I||(I={})),function(e){e.PlainText=1,e.Snippet=2}(M||(M={})),function(e){e.Deprecated=1}(A||(A={})),function(e){e.create=function(e,t,n){return{newText:e,insert:t,replace:n}},e.is=function(e){var t=e;return t&&le.string(t.newText)&&s.is(t.insert)&&s.is(t.replace)}}(L||(L={})),function(e){e.asIs=1,e.adjustIndentation=2}(j||(j={})),function(e){e.create=function(e){return{label:e}}}($||($={})),function(e){e.create=function(e,t){return{items:e||[],isIncomplete:!!t}}}(W||(W={})),function(e){e.fromPlainText=function(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")},e.is=function(e){var t=e;return le.string(t)||le.objectLiteral(t)&&le.string(t.language)&&le.string(t.value)}}(K||(K={})),function(e){e.is=function(e){var t=e;return!!t&&le.objectLiteral(t)&&(N.is(t.contents)||K.is(t.contents)||le.typedArray(t.contents,K.is))&&(void 0===e.range||s.is(e.range))}}(U||(U={})),function(e){e.create=function(e,t){return t?{label:e,documentation:t}:{label:e}}}(H||(H={})),function(e){e.create=function(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];var r={label:e};return le.defined(t)&&(r.documentation=t),le.defined(n)?r.parameters=n:r.parameters=[],r}}(z||(z={})),function(e){e.Text=1,e.Read=2,e.Write=3}(B||(B={})),function(e){e.create=function(e,t){var n={range:e};return le.number(t)&&(n.kind=t),n}}(G||(G={})),function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26}(V||(V={})),function(e){e.Deprecated=1}(X||(X={})),function(e){e.create=function(e,t,n,i,r){var o={name:e,kind:t,location:{uri:i,range:n}};return r&&(o.containerName=r),o}}(J||(J={})),function(e){e.create=function(e,t,n,i,r,o){var s={name:e,detail:t,kind:n,range:i,selectionRange:r};return void 0!==o&&(s.children=o),s},e.is=function(e){var t=e;return t&&le.string(t.name)&&le.number(t.kind)&&s.is(t.range)&&s.is(t.selectionRange)&&(void 0===t.detail||le.string(t.detail))&&(void 0===t.deprecated||le.boolean(t.deprecated))&&(void 0===t.children||Array.isArray(t.children))&&(void 0===t.tags||Array.isArray(t.tags))}}(Y||(Y={})),function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"}(Z||(Z={})),function(e){e.create=function(e,t){var n={diagnostics:e};return null!=t&&(n.only=t),n},e.is=function(e){var t=e;return le.defined(t)&&le.typedArray(t.diagnostics,y.is)&&(void 0===t.only||le.typedArray(t.only,le.string))}}(Q||(Q={})),function(e){e.create=function(e,t,n){var i={title:e},r=!0;return"string"==typeof t?(r=!1,i.kind=t):C.is(t)?i.command=t:i.edit=t,r&&void 0!==n&&(i.kind=n),i},e.is=function(e){var t=e;return t&&le.string(t.title)&&(void 0===t.diagnostics||le.typedArray(t.diagnostics,y.is))&&(void 0===t.kind||le.string(t.kind))&&(void 0!==t.edit||void 0!==t.command)&&(void 0===t.command||C.is(t.command))&&(void 0===t.isPreferred||le.boolean(t.isPreferred))&&(void 0===t.edit||E.is(t.edit))}}(ee||(ee={})),function(e){e.create=function(e,t){var n={range:e};return le.defined(t)&&(n.data=t),n},e.is=function(e){var t=e;return le.defined(t)&&s.is(t.range)&&(le.undefined(t.command)||C.is(t.command))}}(te||(te={})),function(e){e.create=function(e,t){return{tabSize:e,insertSpaces:t}},e.is=function(e){var t=e;return le.defined(t)&&le.uinteger(t.tabSize)&&le.boolean(t.insertSpaces)}}(ne||(ne={})),function(e){e.create=function(e,t,n){return{range:e,target:t,data:n}},e.is=function(e){var t=e;return le.defined(t)&&s.is(t.range)&&(le.undefined(t.target)||le.string(t.target))}}(ie||(ie={})),function(e){e.create=function(e,t){return{range:e,parent:t}},e.is=function(t){var n=t;return void 0!==n&&s.is(n.range)&&(void 0===n.parent||e.is(n.parent))}}(re||(re={}));var ce,ue=["\n","\r\n","\r"];!function(e){e.create=function(e,t,n,i){return new de(e,t,n,i)},e.is=function(e){var t=e;return!!(le.defined(t)&&le.string(t.uri)&&(le.undefined(t.languageId)||le.string(t.languageId))&&le.uinteger(t.lineCount)&&le.func(t.getText)&&le.func(t.positionAt)&&le.func(t.offsetAt))},e.applyEdits=function(e,t){for(var n=e.getText(),i=function e(t,n){if(t.length<=1)return t;var i=t.length/2|0,r=t.slice(0,i),o=t.slice(i);e(r,n),e(o,n);var s=0,a=0,c=0;for(;s<r.length&&a<o.length;){var u=n(r[s],o[a]);t[c++]=u<=0?r[s++]:o[a++]}for(;s<r.length;)t[c++]=r[s++];for(;a<o.length;)t[c++]=o[a++];return t}(t,(function(e,t){var n=e.range.start.line-t.range.start.line;return 0===n?e.range.start.character-t.range.start.character:n})),r=n.length,o=i.length-1;o>=0;o--){var s=i[o],a=e.offsetAt(s.range.start),c=e.offsetAt(s.range.end);if(!(c<=r))throw new Error("Overlapping edit");n=n.substring(0,a)+s.newText+n.substring(c,n.length),r=a}return n}}(ce||(ce={}));var le,de=function(){function e(e,t,n,i){this._uri=e,this._languageId=t,this._version=n,this._content=i,this._lineOffsets=void 0}return Object.defineProperty(e.prototype,"uri",{get:function(){return this._uri},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"version",{get:function(){return this._version},enumerable:!1,configurable:!0}),e.prototype.getText=function(e){if(e){var t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content},e.prototype.update=function(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0},e.prototype.getLineOffsets=function(){if(void 0===this._lineOffsets){for(var e=[],t=this._content,n=!0,i=0;i<t.length;i++){n&&(e.push(i),n=!1);var r=t.charAt(i);n="\r"===r||"\n"===r,"\r"===r&&i+1<t.length&&"\n"===t.charAt(i+1)&&i++}n&&t.length>0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets},e.prototype.positionAt=function(e){e=Math.max(Math.min(e,this._content.length),0);var t=this.getLineOffsets(),n=0,i=t.length;if(0===i)return o.create(0,e);for(;n<i;){var r=Math.floor((n+i)/2);t[r]>e?i=r:n=r+1}var s=n-1;return o.create(s,e-t[s])},e.prototype.offsetAt=function(e){var t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;var n=t[e.line],i=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(n+e.character,i),n)},Object.defineProperty(e.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!1,configurable:!0}),e}();!function(e){var t=Object.prototype.toString;e.defined=function(e){return void 0!==e},e.undefined=function(e){return void 0===e},e.boolean=function(e){return!0===e||!1===e},e.string=function(e){return"[object String]"===t.call(e)},e.number=function(e){return"[object Number]"===t.call(e)},e.numberRange=function(e,n,i){return"[object Number]"===t.call(e)&&n<=e&&e<=i},e.integer=function(e){return"[object Number]"===t.call(e)&&-2147483648<=e&&e<=2147483647},e.uinteger=function(e){return"[object Number]"===t.call(e)&&0<=e&&e<=2147483647},e.func=function(e){return"[object Function]"===t.call(e)},e.objectLiteral=function(e){return null!==e&&"object"==typeof e},e.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)}}(le||(le={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentLinkRequest=t.CodeLensRefreshRequest=t.CodeLensResolveRequest=t.CodeLensRequest=t.WorkspaceSymbolRequest=t.CodeActionResolveRequest=t.CodeActionRequest=t.DocumentSymbolRequest=t.DocumentHighlightRequest=t.ReferencesRequest=t.DefinitionRequest=t.SignatureHelpRequest=t.SignatureHelpTriggerKind=t.HoverRequest=t.CompletionResolveRequest=t.CompletionRequest=t.CompletionTriggerKind=t.PublishDiagnosticsNotification=t.WatchKind=t.FileChangeType=t.DidChangeWatchedFilesNotification=t.WillSaveTextDocumentWaitUntilRequest=t.WillSaveTextDocumentNotification=t.TextDocumentSaveReason=t.DidSaveTextDocumentNotification=t.DidCloseTextDocumentNotification=t.DidChangeTextDocumentNotification=t.TextDocumentContentChangeEvent=t.DidOpenTextDocumentNotification=t.TextDocumentSyncKind=t.TelemetryEventNotification=t.LogMessageNotification=t.ShowMessageRequest=t.ShowMessageNotification=t.MessageType=t.DidChangeConfigurationNotification=t.ExitNotification=t.ShutdownRequest=t.InitializedNotification=t.InitializeError=t.InitializeRequest=t.WorkDoneProgressOptions=t.TextDocumentRegistrationOptions=t.StaticRegistrationOptions=t.FailureHandlingKind=t.ResourceOperationKind=t.UnregistrationRequest=t.RegistrationRequest=t.DocumentSelector=t.DocumentFilter=void 0,t.MonikerRequest=t.MonikerKind=t.UniquenessLevel=t.WillDeleteFilesRequest=t.DidDeleteFilesNotification=t.WillRenameFilesRequest=t.DidRenameFilesNotification=t.WillCreateFilesRequest=t.DidCreateFilesNotification=t.FileOperationPatternKind=t.LinkedEditingRangeRequest=t.ShowDocumentRequest=t.SemanticTokensRegistrationType=t.SemanticTokensRefreshRequest=t.SemanticTokensRangeRequest=t.SemanticTokensDeltaRequest=t.SemanticTokensRequest=t.TokenFormat=t.SemanticTokens=t.SemanticTokenModifiers=t.SemanticTokenTypes=t.CallHierarchyPrepareRequest=t.CallHierarchyOutgoingCallsRequest=t.CallHierarchyIncomingCallsRequest=t.WorkDoneProgressCancelNotification=t.WorkDoneProgressCreateRequest=t.WorkDoneProgress=t.SelectionRangeRequest=t.DeclarationRequest=t.FoldingRangeRequest=t.ColorPresentationRequest=t.DocumentColorRequest=t.ConfigurationRequest=t.DidChangeWorkspaceFoldersNotification=t.WorkspaceFoldersRequest=t.TypeDefinitionRequest=t.ImplementationRequest=t.ApplyWorkspaceEditRequest=t.ExecuteCommandRequest=t.PrepareRenameRequest=t.RenameRequest=t.PrepareSupportDefaultBehavior=t.DocumentOnTypeFormattingRequest=t.DocumentRangeFormattingRequest=t.DocumentFormattingRequest=t.DocumentLinkResolveRequest=void 0;const i=n(95),r=n(2),o=n(96);Object.defineProperty(t,"ImplementationRequest",{enumerable:!0,get:function(){return o.ImplementationRequest}});const s=n(97);Object.defineProperty(t,"TypeDefinitionRequest",{enumerable:!0,get:function(){return s.TypeDefinitionRequest}});const a=n(98);Object.defineProperty(t,"WorkspaceFoldersRequest",{enumerable:!0,get:function(){return a.WorkspaceFoldersRequest}}),Object.defineProperty(t,"DidChangeWorkspaceFoldersNotification",{enumerable:!0,get:function(){return a.DidChangeWorkspaceFoldersNotification}});const c=n(99);Object.defineProperty(t,"ConfigurationRequest",{enumerable:!0,get:function(){return c.ConfigurationRequest}});const u=n(100);Object.defineProperty(t,"DocumentColorRequest",{enumerable:!0,get:function(){return u.DocumentColorRequest}}),Object.defineProperty(t,"ColorPresentationRequest",{enumerable:!0,get:function(){return u.ColorPresentationRequest}});const l=n(101);Object.defineProperty(t,"FoldingRangeRequest",{enumerable:!0,get:function(){return l.FoldingRangeRequest}});const d=n(102);Object.defineProperty(t,"DeclarationRequest",{enumerable:!0,get:function(){return d.DeclarationRequest}});const h=n(103);Object.defineProperty(t,"SelectionRangeRequest",{enumerable:!0,get:function(){return h.SelectionRangeRequest}});const p=n(104);Object.defineProperty(t,"WorkDoneProgress",{enumerable:!0,get:function(){return p.WorkDoneProgress}}),Object.defineProperty(t,"WorkDoneProgressCreateRequest",{enumerable:!0,get:function(){return p.WorkDoneProgressCreateRequest}}),Object.defineProperty(t,"WorkDoneProgressCancelNotification",{enumerable:!0,get:function(){return p.WorkDoneProgressCancelNotification}});const f=n(105);Object.defineProperty(t,"CallHierarchyIncomingCallsRequest",{enumerable:!0,get:function(){return f.CallHierarchyIncomingCallsRequest}}),Object.defineProperty(t,"CallHierarchyOutgoingCallsRequest",{enumerable:!0,get:function(){return f.CallHierarchyOutgoingCallsRequest}}),Object.defineProperty(t,"CallHierarchyPrepareRequest",{enumerable:!0,get:function(){return f.CallHierarchyPrepareRequest}});const g=n(106);Object.defineProperty(t,"SemanticTokenTypes",{enumerable:!0,get:function(){return g.SemanticTokenTypes}}),Object.defineProperty(t,"SemanticTokenModifiers",{enumerable:!0,get:function(){return g.SemanticTokenModifiers}}),Object.defineProperty(t,"SemanticTokens",{enumerable:!0,get:function(){return g.SemanticTokens}}),Object.defineProperty(t,"TokenFormat",{enumerable:!0,get:function(){return g.TokenFormat}}),Object.defineProperty(t,"SemanticTokensRequest",{enumerable:!0,get:function(){return g.SemanticTokensRequest}}),Object.defineProperty(t,"SemanticTokensDeltaRequest",{enumerable:!0,get:function(){return g.SemanticTokensDeltaRequest}}),Object.defineProperty(t,"SemanticTokensRangeRequest",{enumerable:!0,get:function(){return g.SemanticTokensRangeRequest}}),Object.defineProperty(t,"SemanticTokensRefreshRequest",{enumerable:!0,get:function(){return g.SemanticTokensRefreshRequest}}),Object.defineProperty(t,"SemanticTokensRegistrationType",{enumerable:!0,get:function(){return g.SemanticTokensRegistrationType}});const m=n(107);Object.defineProperty(t,"ShowDocumentRequest",{enumerable:!0,get:function(){return m.ShowDocumentRequest}});const v=n(108);Object.defineProperty(t,"LinkedEditingRangeRequest",{enumerable:!0,get:function(){return v.LinkedEditingRangeRequest}});const y=n(109);Object.defineProperty(t,"FileOperationPatternKind",{enumerable:!0,get:function(){return y.FileOperationPatternKind}}),Object.defineProperty(t,"DidCreateFilesNotification",{enumerable:!0,get:function(){return y.DidCreateFilesNotification}}),Object.defineProperty(t,"WillCreateFilesRequest",{enumerable:!0,get:function(){return y.WillCreateFilesRequest}}),Object.defineProperty(t,"DidRenameFilesNotification",{enumerable:!0,get:function(){return y.DidRenameFilesNotification}}),Object.defineProperty(t,"WillRenameFilesRequest",{enumerable:!0,get:function(){return y.WillRenameFilesRequest}}),Object.defineProperty(t,"DidDeleteFilesNotification",{enumerable:!0,get:function(){return y.DidDeleteFilesNotification}}),Object.defineProperty(t,"WillDeleteFilesRequest",{enumerable:!0,get:function(){return y.WillDeleteFilesRequest}});const C=n(110);var R,w;Object.defineProperty(t,"UniquenessLevel",{enumerable:!0,get:function(){return C.UniquenessLevel}}),Object.defineProperty(t,"MonikerKind",{enumerable:!0,get:function(){return C.MonikerKind}}),Object.defineProperty(t,"MonikerRequest",{enumerable:!0,get:function(){return C.MonikerRequest}}),function(e){e.is=function(e){const t=e;return i.string(t.language)||i.string(t.scheme)||i.string(t.pattern)}}(R=t.DocumentFilter||(t.DocumentFilter={})),function(e){e.is=function(e){if(!Array.isArray(e))return!1;for(let t of e)if(!i.string(t)&&!R.is(t))return!1;return!0}}(w=t.DocumentSelector||(t.DocumentSelector={})),function(e){e.type=new r.ProtocolRequestType("client/registerCapability")}(t.RegistrationRequest||(t.RegistrationRequest={})),function(e){e.type=new r.ProtocolRequestType("client/unregisterCapability")}(t.UnregistrationRequest||(t.UnregistrationRequest={})),function(e){e.Create="create",e.Rename="rename",e.Delete="delete"}(t.ResourceOperationKind||(t.ResourceOperationKind={})),function(e){e.Abort="abort",e.Transactional="transactional",e.TextOnlyTransactional="textOnlyTransactional",e.Undo="undo"}(t.FailureHandlingKind||(t.FailureHandlingKind={})),function(e){e.hasId=function(e){const t=e;return t&&i.string(t.id)&&t.id.length>0}}(t.StaticRegistrationOptions||(t.StaticRegistrationOptions={})),function(e){e.is=function(e){const t=e;return t&&(null===t.documentSelector||w.is(t.documentSelector))}}(t.TextDocumentRegistrationOptions||(t.TextDocumentRegistrationOptions={})),function(e){e.is=function(e){const t=e;return i.objectLiteral(t)&&(void 0===t.workDoneProgress||i.boolean(t.workDoneProgress))},e.hasWorkDoneProgress=function(e){const t=e;return t&&i.boolean(t.workDoneProgress)}}(t.WorkDoneProgressOptions||(t.WorkDoneProgressOptions={})),function(e){e.type=new r.ProtocolRequestType("initialize")}(t.InitializeRequest||(t.InitializeRequest={})),function(e){e.unknownProtocolVersion=1}(t.InitializeError||(t.InitializeError={})),function(e){e.type=new r.ProtocolNotificationType("initialized")}(t.InitializedNotification||(t.InitializedNotification={})),function(e){e.type=new r.ProtocolRequestType0("shutdown")}(t.ShutdownRequest||(t.ShutdownRequest={})),function(e){e.type=new r.ProtocolNotificationType0("exit")}(t.ExitNotification||(t.ExitNotification={})),function(e){e.type=new r.ProtocolNotificationType("workspace/didChangeConfiguration")}(t.DidChangeConfigurationNotification||(t.DidChangeConfigurationNotification={})),function(e){e.Error=1,e.Warning=2,e.Info=3,e.Log=4}(t.MessageType||(t.MessageType={})),function(e){e.type=new r.ProtocolNotificationType("window/showMessage")}(t.ShowMessageNotification||(t.ShowMessageNotification={})),function(e){e.type=new r.ProtocolRequestType("window/showMessageRequest")}(t.ShowMessageRequest||(t.ShowMessageRequest={})),function(e){e.type=new r.ProtocolNotificationType("window/logMessage")}(t.LogMessageNotification||(t.LogMessageNotification={})),function(e){e.type=new r.ProtocolNotificationType("telemetry/event")}(t.TelemetryEventNotification||(t.TelemetryEventNotification={})),function(e){e.None=0,e.Full=1,e.Incremental=2}(t.TextDocumentSyncKind||(t.TextDocumentSyncKind={})),function(e){e.method="textDocument/didOpen",e.type=new r.ProtocolNotificationType(e.method)}(t.DidOpenTextDocumentNotification||(t.DidOpenTextDocumentNotification={})),function(e){e.isIncremental=function(e){let t=e;return null!=t&&"string"==typeof t.text&&void 0!==t.range&&(void 0===t.rangeLength||"number"==typeof t.rangeLength)},e.isFull=function(e){let t=e;return null!=t&&"string"==typeof t.text&&void 0===t.range&&void 0===t.rangeLength}}(t.TextDocumentContentChangeEvent||(t.TextDocumentContentChangeEvent={})),function(e){e.method="textDocument/didChange",e.type=new r.ProtocolNotificationType(e.method)}(t.DidChangeTextDocumentNotification||(t.DidChangeTextDocumentNotification={})),function(e){e.method="textDocument/didClose",e.type=new r.ProtocolNotificationType(e.method)}(t.DidCloseTextDocumentNotification||(t.DidCloseTextDocumentNotification={})),function(e){e.method="textDocument/didSave",e.type=new r.ProtocolNotificationType(e.method)}(t.DidSaveTextDocumentNotification||(t.DidSaveTextDocumentNotification={})),function(e){e.Manual=1,e.AfterDelay=2,e.FocusOut=3}(t.TextDocumentSaveReason||(t.TextDocumentSaveReason={})),function(e){e.method="textDocument/willSave",e.type=new r.ProtocolNotificationType(e.method)}(t.WillSaveTextDocumentNotification||(t.WillSaveTextDocumentNotification={})),function(e){e.method="textDocument/willSaveWaitUntil",e.type=new r.ProtocolRequestType(e.method)}(t.WillSaveTextDocumentWaitUntilRequest||(t.WillSaveTextDocumentWaitUntilRequest={})),function(e){e.type=new r.ProtocolNotificationType("workspace/didChangeWatchedFiles")}(t.DidChangeWatchedFilesNotification||(t.DidChangeWatchedFilesNotification={})),function(e){e.Created=1,e.Changed=2,e.Deleted=3}(t.FileChangeType||(t.FileChangeType={})),function(e){e.Create=1,e.Change=2,e.Delete=4}(t.WatchKind||(t.WatchKind={})),function(e){e.type=new r.ProtocolNotificationType("textDocument/publishDiagnostics")}(t.PublishDiagnosticsNotification||(t.PublishDiagnosticsNotification={})),function(e){e.Invoked=1,e.TriggerCharacter=2,e.TriggerForIncompleteCompletions=3}(t.CompletionTriggerKind||(t.CompletionTriggerKind={})),function(e){e.method="textDocument/completion",e.type=new r.ProtocolRequestType(e.method)}(t.CompletionRequest||(t.CompletionRequest={})),function(e){e.method="completionItem/resolve",e.type=new r.ProtocolRequestType(e.method)}(t.CompletionResolveRequest||(t.CompletionResolveRequest={})),function(e){e.method="textDocument/hover",e.type=new r.ProtocolRequestType(e.method)}(t.HoverRequest||(t.HoverRequest={})),function(e){e.Invoked=1,e.TriggerCharacter=2,e.ContentChange=3}(t.SignatureHelpTriggerKind||(t.SignatureHelpTriggerKind={})),function(e){e.method="textDocument/signatureHelp",e.type=new r.ProtocolRequestType(e.method)}(t.SignatureHelpRequest||(t.SignatureHelpRequest={})),function(e){e.method="textDocument/definition",e.type=new r.ProtocolRequestType(e.method)}(t.DefinitionRequest||(t.DefinitionRequest={})),function(e){e.method="textDocument/references",e.type=new r.ProtocolRequestType(e.method)}(t.ReferencesRequest||(t.ReferencesRequest={})),function(e){e.method="textDocument/documentHighlight",e.type=new r.ProtocolRequestType(e.method)}(t.DocumentHighlightRequest||(t.DocumentHighlightRequest={})),function(e){e.method="textDocument/documentSymbol",e.type=new r.ProtocolRequestType(e.method)}(t.DocumentSymbolRequest||(t.DocumentSymbolRequest={})),function(e){e.method="textDocument/codeAction",e.type=new r.ProtocolRequestType(e.method)}(t.CodeActionRequest||(t.CodeActionRequest={})),function(e){e.method="codeAction/resolve",e.type=new r.ProtocolRequestType(e.method)}(t.CodeActionResolveRequest||(t.CodeActionResolveRequest={})),function(e){e.method="workspace/symbol",e.type=new r.ProtocolRequestType(e.method)}(t.WorkspaceSymbolRequest||(t.WorkspaceSymbolRequest={})),function(e){e.method="textDocument/codeLens",e.type=new r.ProtocolRequestType(e.method)}(t.CodeLensRequest||(t.CodeLensRequest={})),function(e){e.method="codeLens/resolve",e.type=new r.ProtocolRequestType(e.method)}(t.CodeLensResolveRequest||(t.CodeLensResolveRequest={})),function(e){e.method="workspace/codeLens/refresh",e.type=new r.ProtocolRequestType0(e.method)}(t.CodeLensRefreshRequest||(t.CodeLensRefreshRequest={})),function(e){e.method="textDocument/documentLink",e.type=new r.ProtocolRequestType(e.method)}(t.DocumentLinkRequest||(t.DocumentLinkRequest={})),function(e){e.method="documentLink/resolve",e.type=new r.ProtocolRequestType(e.method)}(t.DocumentLinkResolveRequest||(t.DocumentLinkResolveRequest={})),function(e){e.method="textDocument/formatting",e.type=new r.ProtocolRequestType(e.method)}(t.DocumentFormattingRequest||(t.DocumentFormattingRequest={})),function(e){e.method="textDocument/rangeFormatting",e.type=new r.ProtocolRequestType(e.method)}(t.DocumentRangeFormattingRequest||(t.DocumentRangeFormattingRequest={})),function(e){e.method="textDocument/onTypeFormatting",e.type=new r.ProtocolRequestType(e.method)}(t.DocumentOnTypeFormattingRequest||(t.DocumentOnTypeFormattingRequest={})),function(e){e.Identifier=1}(t.PrepareSupportDefaultBehavior||(t.PrepareSupportDefaultBehavior={})),function(e){e.method="textDocument/rename",e.type=new r.ProtocolRequestType(e.method)}(t.RenameRequest||(t.RenameRequest={})),function(e){e.method="textDocument/prepareRename",e.type=new r.ProtocolRequestType(e.method)}(t.PrepareRenameRequest||(t.PrepareRenameRequest={})),function(e){e.type=new r.ProtocolRequestType("workspace/executeCommand")}(t.ExecuteCommandRequest||(t.ExecuteCommandRequest={})),function(e){e.type=new r.ProtocolRequestType("workspace/applyEdit")}(t.ApplyWorkspaceEditRequest||(t.ApplyWorkspaceEditRequest={}))},function(e,t,n){"use strict";function i(e){return"string"==typeof e||e instanceof String}function r(e){return Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.objectLiteral=t.typedArray=t.stringArray=t.array=t.func=t.error=t.number=t.string=t.boolean=void 0,t.boolean=function(e){return!0===e||!1===e},t.string=i,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=function(e){return"function"==typeof e},t.array=r,t.stringArray=function(e){return r(e)&&e.every(e=>i(e))},t.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)},t.objectLiteral=function(e){return null!==e&&"object"==typeof e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImplementationRequest=void 0;const i=n(2);!function(e){e.method="textDocument/implementation",e.type=new i.ProtocolRequestType(e.method)}(t.ImplementationRequest||(t.ImplementationRequest={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeDefinitionRequest=void 0;const i=n(2);!function(e){e.method="textDocument/typeDefinition",e.type=new i.ProtocolRequestType(e.method)}(t.TypeDefinitionRequest||(t.TypeDefinitionRequest={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DidChangeWorkspaceFoldersNotification=t.WorkspaceFoldersRequest=void 0;const i=n(2);!function(e){e.type=new i.ProtocolRequestType0("workspace/workspaceFolders")}(t.WorkspaceFoldersRequest||(t.WorkspaceFoldersRequest={})),function(e){e.type=new i.ProtocolNotificationType("workspace/didChangeWorkspaceFolders")}(t.DidChangeWorkspaceFoldersNotification||(t.DidChangeWorkspaceFoldersNotification={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigurationRequest=void 0;const i=n(2);!function(e){e.type=new i.ProtocolRequestType("workspace/configuration")}(t.ConfigurationRequest||(t.ConfigurationRequest={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColorPresentationRequest=t.DocumentColorRequest=void 0;const i=n(2);!function(e){e.method="textDocument/documentColor",e.type=new i.ProtocolRequestType(e.method)}(t.DocumentColorRequest||(t.DocumentColorRequest={})),function(e){e.type=new i.ProtocolRequestType("textDocument/colorPresentation")}(t.ColorPresentationRequest||(t.ColorPresentationRequest={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FoldingRangeRequest=t.FoldingRangeKind=void 0;const i=n(2);!function(e){e.Comment="comment",e.Imports="imports",e.Region="region"}(t.FoldingRangeKind||(t.FoldingRangeKind={})),function(e){e.method="textDocument/foldingRange",e.type=new i.ProtocolRequestType(e.method)}(t.FoldingRangeRequest||(t.FoldingRangeRequest={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DeclarationRequest=void 0;const i=n(2);!function(e){e.method="textDocument/declaration",e.type=new i.ProtocolRequestType(e.method)}(t.DeclarationRequest||(t.DeclarationRequest={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SelectionRangeRequest=void 0;const i=n(2);!function(e){e.method="textDocument/selectionRange",e.type=new i.ProtocolRequestType(e.method)}(t.SelectionRangeRequest||(t.SelectionRangeRequest={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WorkDoneProgressCancelNotification=t.WorkDoneProgressCreateRequest=t.WorkDoneProgress=void 0;const i=n(12),r=n(2);!function(e){e.type=new i.ProgressType,e.is=function(t){return t===e.type}}(t.WorkDoneProgress||(t.WorkDoneProgress={})),function(e){e.type=new r.ProtocolRequestType("window/workDoneProgress/create")}(t.WorkDoneProgressCreateRequest||(t.WorkDoneProgressCreateRequest={})),function(e){e.type=new r.ProtocolNotificationType("window/workDoneProgress/cancel")}(t.WorkDoneProgressCancelNotification||(t.WorkDoneProgressCancelNotification={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CallHierarchyOutgoingCallsRequest=t.CallHierarchyIncomingCallsRequest=t.CallHierarchyPrepareRequest=void 0;const i=n(2);!function(e){e.method="textDocument/prepareCallHierarchy",e.type=new i.ProtocolRequestType(e.method)}(t.CallHierarchyPrepareRequest||(t.CallHierarchyPrepareRequest={})),function(e){e.method="callHierarchy/incomingCalls",e.type=new i.ProtocolRequestType(e.method)}(t.CallHierarchyIncomingCallsRequest||(t.CallHierarchyIncomingCallsRequest={})),function(e){e.method="callHierarchy/outgoingCalls",e.type=new i.ProtocolRequestType(e.method)}(t.CallHierarchyOutgoingCallsRequest||(t.CallHierarchyOutgoingCallsRequest={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SemanticTokensRefreshRequest=t.SemanticTokensRangeRequest=t.SemanticTokensDeltaRequest=t.SemanticTokensRequest=t.SemanticTokensRegistrationType=t.TokenFormat=t.SemanticTokens=t.SemanticTokenModifiers=t.SemanticTokenTypes=void 0;const i=n(2);!function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator"}(t.SemanticTokenTypes||(t.SemanticTokenTypes={})),function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"}(t.SemanticTokenModifiers||(t.SemanticTokenModifiers={})),function(e){e.is=function(e){const t=e;return void 0!==t&&(void 0===t.resultId||"string"==typeof t.resultId)&&Array.isArray(t.data)&&(0===t.data.length||"number"==typeof t.data[0])}}(t.SemanticTokens||(t.SemanticTokens={})),function(e){e.Relative="relative"}(t.TokenFormat||(t.TokenFormat={})),function(e){e.method="textDocument/semanticTokens",e.type=new i.RegistrationType(e.method)}(t.SemanticTokensRegistrationType||(t.SemanticTokensRegistrationType={})),function(e){e.method="textDocument/semanticTokens/full",e.type=new i.ProtocolRequestType(e.method)}(t.SemanticTokensRequest||(t.SemanticTokensRequest={})),function(e){e.method="textDocument/semanticTokens/full/delta",e.type=new i.ProtocolRequestType(e.method)}(t.SemanticTokensDeltaRequest||(t.SemanticTokensDeltaRequest={})),function(e){e.method="textDocument/semanticTokens/range",e.type=new i.ProtocolRequestType(e.method)}(t.SemanticTokensRangeRequest||(t.SemanticTokensRangeRequest={})),function(e){e.method="workspace/semanticTokens/refresh",e.type=new i.ProtocolRequestType0(e.method)}(t.SemanticTokensRefreshRequest||(t.SemanticTokensRefreshRequest={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ShowDocumentRequest=void 0;const i=n(2);!function(e){e.method="window/showDocument",e.type=new i.ProtocolRequestType(e.method)}(t.ShowDocumentRequest||(t.ShowDocumentRequest={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LinkedEditingRangeRequest=void 0;const i=n(2);!function(e){e.method="textDocument/linkedEditingRange",e.type=new i.ProtocolRequestType(e.method)}(t.LinkedEditingRangeRequest||(t.LinkedEditingRangeRequest={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WillDeleteFilesRequest=t.DidDeleteFilesNotification=t.DidRenameFilesNotification=t.WillRenameFilesRequest=t.DidCreateFilesNotification=t.WillCreateFilesRequest=t.FileOperationPatternKind=void 0;const i=n(2);!function(e){e.file="file",e.folder="folder"}(t.FileOperationPatternKind||(t.FileOperationPatternKind={})),function(e){e.method="workspace/willCreateFiles",e.type=new i.ProtocolRequestType(e.method)}(t.WillCreateFilesRequest||(t.WillCreateFilesRequest={})),function(e){e.method="workspace/didCreateFiles",e.type=new i.ProtocolNotificationType(e.method)}(t.DidCreateFilesNotification||(t.DidCreateFilesNotification={})),function(e){e.method="workspace/willRenameFiles",e.type=new i.ProtocolRequestType(e.method)}(t.WillRenameFilesRequest||(t.WillRenameFilesRequest={})),function(e){e.method="workspace/didRenameFiles",e.type=new i.ProtocolNotificationType(e.method)}(t.DidRenameFilesNotification||(t.DidRenameFilesNotification={})),function(e){e.method="workspace/didDeleteFiles",e.type=new i.ProtocolNotificationType(e.method)}(t.DidDeleteFilesNotification||(t.DidDeleteFilesNotification={})),function(e){e.method="workspace/willDeleteFiles",e.type=new i.ProtocolRequestType(e.method)}(t.WillDeleteFilesRequest||(t.WillDeleteFilesRequest={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MonikerRequest=t.MonikerKind=t.UniquenessLevel=void 0;const i=n(2);!function(e){e.document="document",e.project="project",e.group="group",e.scheme="scheme",e.global="global"}(t.UniquenessLevel||(t.UniquenessLevel={})),function(e){e.import="import",e.export="export",e.local="local"}(t.MonikerKind||(t.MonikerKind={})),function(e){e.method="textDocument/moniker",e.type=new i.ProtocolRequestType(e.method)}(t.MonikerRequest||(t.MonikerRequest={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createProtocolConnection=void 0;const i=n(12);t.createProtocolConnection=function(e,t,n,r){return i.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),i.createMessageConnection(e,t,n,r)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createConverter=void 0;const i=n(0),r=n(1),o=n(8),s=n(43),a=n(44),c=n(45),u=n(46),l=n(47),d=n(48),h=n(1);var p;!function(e){e.is=function(e){const t=e;return t&&!!t.inserting&&!!t.replacing}}(p||(p={})),t.createConverter=function(e){const t=e||(e=>e.toString());function n(e){return t(e)}function f(e){return{uri:t(e.uri)}}function g(e){switch(e){case i.TextDocumentSaveReason.Manual:return r.TextDocumentSaveReason.Manual;case i.TextDocumentSaveReason.AfterDelay:return r.TextDocumentSaveReason.AfterDelay;case i.TextDocumentSaveReason.FocusOut:return r.TextDocumentSaveReason.FocusOut}return r.TextDocumentSaveReason.Manual}function m(e){switch(e){case i.CompletionTriggerKind.TriggerCharacter:return r.CompletionTriggerKind.TriggerCharacter;case i.CompletionTriggerKind.TriggerForIncompleteCompletions:return r.CompletionTriggerKind.TriggerForIncompleteCompletions;default:return r.CompletionTriggerKind.Invoked}}function v(e){switch(e){case i.SignatureHelpTriggerKind.Invoke:return r.SignatureHelpTriggerKind.Invoked;case i.SignatureHelpTriggerKind.TriggerCharacter:return r.SignatureHelpTriggerKind.TriggerCharacter;case i.SignatureHelpTriggerKind.ContentChange:return r.SignatureHelpTriggerKind.ContentChange}}function y(e){return{label:e.label}}function C(e){return{label:e.label,parameters:(t=e.parameters,t.map(y))};var t}function R(e){return{line:e.line,character:e.character}}function w(e){return null==e?e:{line:e.line,character:e.character}}function b(e){return null==e?e:{start:w(e.start),end:w(e.end)}}function T(e){return null==e?e:r.Location.create(n(e.uri),b(e.range))}function S(e){switch(e){case i.DiagnosticSeverity.Error:return r.DiagnosticSeverity.Error;case i.DiagnosticSeverity.Warning:return r.DiagnosticSeverity.Warning;case i.DiagnosticSeverity.Information:return r.DiagnosticSeverity.Information;case i.DiagnosticSeverity.Hint:return r.DiagnosticSeverity.Hint}}function _(e){switch(e){case i.DiagnosticTag.Unnecessary:return r.DiagnosticTag.Unnecessary;case i.DiagnosticTag.Deprecated:return r.DiagnosticTag.Deprecated;default:return}}function P(e){return{message:e.message,location:T(e.location)}}function D(e){const t=r.Diagnostic.create(b(e.range),e.message),i=e instanceof l.ProtocolDiagnostic?e:void 0;void 0!==i&&void 0!==i.data&&(t.data=i.data);const s=function(e){if(null!=e)return o.number(e)||o.string(e)?e:{value:e.value,target:n(e.target)}}(e.code);return l.DiagnosticCode.is(s)?void 0!==i&&i.hasDiagnosticCode?t.code=s:(t.code=s.value,t.codeDescription={href:s.target}):t.code=s,o.number(e.severity)&&(t.severity=S(e.severity)),Array.isArray(e.tags)&&(t.tags=function(e){if(!e)return;let t=[];for(let n of e){let e=_(n);void 0!==e&&t.push(e)}return t.length>0?t:void 0}(e.tags)),e.relatedInformation&&(t.relatedInformation=e.relatedInformation.map(P)),e.source&&(t.source=e.source),t}function E(e){return null==e?e:e.map(D)}function x(e){switch(e){case i.CompletionItemTag.Deprecated:return r.CompletionItemTag.Deprecated}}function k(e){return{range:b(e.range),newText:e.newText}}function O(e){return e<=i.SymbolKind.TypeParameter?e+1:r.SymbolKind.Property}function F(e){return e}function q(e){return e.map(F)}function N(e){let t=r.Command.create(e.title,e.command);return e.arguments&&(t.arguments=e.arguments),t}return{asUri:n,asTextDocumentIdentifier:f,asVersionedTextDocumentIdentifier:function(e){return{uri:t(e.uri),version:e.version}},asOpenTextDocumentParams:function(e){return{textDocument:{uri:t(e.uri),languageId:e.languageId,version:e.version,text:e.getText()}}},asChangeTextDocumentParams:function(e){if(function(e){let t=e;return!!t.uri&&!!t.version}(e)){return{textDocument:{uri:t(e.uri),version:e.version},contentChanges:[{text:e.getText()}]}}if(function(e){let t=e;return!!t.document&&!!t.contentChanges}(e)){let n=e.document;return{textDocument:{uri:t(n.uri),version:n.version},contentChanges:e.contentChanges.map(e=>{let t=e.range;return{range:{start:{line:t.start.line,character:t.start.character},end:{line:t.end.line,character:t.end.character}},rangeLength:e.rangeLength,text:e.text}})}}throw Error("Unsupported text document change parameter")},asCloseTextDocumentParams:function(e){return{textDocument:f(e)}},asSaveTextDocumentParams:function(e,t=!1){let n={textDocument:f(e)};return t&&(n.text=e.getText()),n},asWillSaveTextDocumentParams:function(e){return{textDocument:f(e.document),reason:g(e.reason)}},asDidCreateFilesParams:function(e){return{files:e.files.map(e=>({uri:t(e)}))}},asDidRenameFilesParams:function(e){return{files:e.files.map(e=>({oldUri:t(e.oldUri),newUri:t(e.newUri)}))}},asDidDeleteFilesParams:function(e){return{files:e.files.map(e=>({uri:t(e)}))}},asWillCreateFilesParams:function(e){return{files:e.files.map(e=>({uri:t(e)}))}},asWillRenameFilesParams:function(e){return{files:e.files.map(e=>({oldUri:t(e.oldUri),newUri:t(e.newUri)}))}},asWillDeleteFilesParams:function(e){return{files:e.files.map(e=>({uri:t(e)}))}},asTextDocumentPositionParams:function(e,t){return{textDocument:f(e),position:R(t)}},asCompletionParams:function(e,t,n){return{textDocument:f(e),position:R(t),context:{triggerKind:m(n.triggerKind),triggerCharacter:n.triggerCharacter}}},asSignatureHelpParams:function(e,t,n){return{textDocument:f(e),position:R(t),context:{isRetrigger:n.isRetrigger,triggerCharacter:n.triggerCharacter,triggerKind:v(n.triggerKind),activeSignatureHelp:(i=n.activeSignatureHelp,void 0===i?i:{signatures:(r=i.signatures,r.map(C)),activeSignature:i.activeSignature,activeParameter:i.activeParameter})}};var i,r},asWorkerPosition:R,asRange:b,asPosition:w,asPositions:function(e){let t=[];for(let n of e)t.push(w(n));return t},asLocation:T,asDiagnosticSeverity:S,asDiagnosticTag:_,asDiagnostic:D,asDiagnostics:E,asCompletionItem:function(e){let t={label:e.label},n=e instanceof s.default?e:void 0;var a,c;e.detail&&(t.detail=e.detail),e.documentation&&(n&&"$string"!==n.documentationFormat?t.documentation=function(e,t){switch(e){case"$string":return t;case r.MarkupKind.PlainText:return{kind:e,value:t};case r.MarkupKind.Markdown:return{kind:e,value:t.value};default:return"Unsupported Markup content received. Kind is: "+e}}(n.documentationFormat,e.documentation):t.documentation=e.documentation),e.filterText&&(t.filterText=e.filterText),function(e,t){let n=r.InsertTextFormat.PlainText,o=void 0,s=void 0;t.textEdit?(o=t.textEdit.newText,s=t.textEdit.range):t.insertText instanceof i.SnippetString?(n=r.InsertTextFormat.Snippet,o=t.insertText.value):o=t.insertText;t.range&&(s=t.range);e.insertTextFormat=n,t.fromEdit&&void 0!==o&&void 0!==s?e.textEdit=function(e,t){return p.is(t)?r.InsertReplaceEdit.create(e,b(t.inserting),b(t.replacing)):{newText:e,range:b(t)}}(o,s):e.insertText=o}(t,e),o.number(e.kind)&&(t.kind=(a=e.kind,void 0!==(c=n&&n.originalItemKind)?c:a+1)),e.sortText&&(t.sortText=e.sortText),e.additionalTextEdits&&(t.additionalTextEdits=function(e){if(null==e)return e;return e.map(k)}(e.additionalTextEdits)),e.commitCharacters&&(t.commitCharacters=e.commitCharacters.slice()),e.command&&(t.command=N(e.command)),!0!==e.preselect&&!1!==e.preselect||(t.preselect=e.preselect);const u=function(e){if(void 0===e)return e;const t=[];for(let n of e){const e=x(n);void 0!==e&&t.push(e)}return t}(e.tags);if(n){if(void 0!==n.data&&(t.data=n.data),!0===n.deprecated||!1===n.deprecated){if(!0===n.deprecated&&void 0!==u&&u.length>0){const e=u.indexOf(i.CompletionItemTag.Deprecated);-1!==e&&u.splice(e,1)}t.deprecated=n.deprecated}void 0!==n.insertTextMode&&(t.insertTextMode=n.insertTextMode)}return void 0!==u&&u.length>0&&(t.tags=u),void 0===t.insertTextMode&&!0===e.keepWhitespace&&(t.insertTextMode=h.InsertTextMode.adjustIndentation),t},asTextEdit:k,asSymbolKind:O,asSymbolTag:F,asSymbolTags:q,asReferenceParams:function(e,t,n){return{textDocument:f(e),position:R(t),context:{includeDeclaration:n.includeDeclaration}}},asCodeAction:function(e){let t=r.CodeAction.create(e.title);if(e instanceof u.default&&void 0!==e.data&&(t.data=e.data),void 0!==e.kind&&(t.kind=function(e){if(null==e)return;return e.value}(e.kind)),void 0!==e.diagnostics&&(t.diagnostics=E(e.diagnostics)),void 0!==e.edit)throw new Error("VS Code code actions can only be converted to a protocol code action without an edit.");return void 0!==e.command&&(t.command=N(e.command)),void 0!==e.isPreferred&&(t.isPreferred=e.isPreferred),void 0!==e.disabled&&(t.disabled={reason:e.disabled.reason}),t},asCodeActionContext:function(e){if(null==e)return e;let t;return e.only&&o.string(e.only.value)&&(t=[e.only.value]),r.CodeActionContext.create(E(e.diagnostics),t)},asCommand:N,asCodeLens:function(e){let t=r.CodeLens.create(b(e.range));return e.command&&(t.command=N(e.command)),e instanceof a.default&&e.data&&(t.data=e.data),t},asFormattingOptions:function(e,t){const n={tabSize:e.tabSize,insertSpaces:e.insertSpaces};return t.trimTrailingWhitespace&&(n.trimTrailingWhitespace=!0),t.trimFinalNewlines&&(n.trimFinalNewlines=!0),t.insertFinalNewline&&(n.insertFinalNewline=!0),n},asDocumentSymbolParams:function(e){return{textDocument:f(e)}},asCodeLensParams:function(e){return{textDocument:f(e)}},asDocumentLink:function(e){let t=r.DocumentLink.create(b(e.range));e.target&&(t.target=n(e.target)),void 0!==e.tooltip&&(t.tooltip=e.tooltip);let i=e instanceof c.default?e:void 0;return i&&i.data&&(t.data=i.data),t},asDocumentLinkParams:function(e){return{textDocument:f(e)}},asCallHierarchyItem:function(e){const t={name:e.name,kind:O(e.kind),uri:n(e.uri),range:b(e.range),selectionRange:b(e.selectionRange)};return void 0!==e.detail&&e.detail.length>0&&(t.detail=e.detail),void 0!==e.tags&&(t.tags=q(e.tags)),e instanceof d.default&&void 0!==e.data&&(t.data=e.data),t}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createConverter=void 0;const i=n(0),r=n(1),o=n(8),s=n(43),a=n(44),c=n(45),u=n(46),l=n(47),d=n(48),h=n(1);var p;!function(e){e.is=function(e){let t=e;return t&&o.string(t.language)&&o.string(t.value)}}(p||(p={})),t.createConverter=function(e,t){const n=e||(e=>i.Uri.parse(e));function f(e){return n(e)}function g(e){return e.map(m)}function m(e){let t=new l.ProtocolDiagnostic(R(e.range),e.message,b(e.severity),e.data);return void 0!==e.code&&(r.CodeDescription.is(e.codeDescription)?t.code={value:e.code,target:f(e.codeDescription.href)}:l.DiagnosticCode.is(e.code)?(t.hasDiagnosticCode=!0,t.code={value:e.code.value,target:f(e.code.target)}):t.code=e.code),e.source&&(t.source=e.source),e.relatedInformation&&(t.relatedInformation=e.relatedInformation.map(v)),Array.isArray(e.tags)&&(t.tags=function(e){if(!e)return;let t=[];for(let n of e){let e=y(n);void 0!==e&&t.push(e)}return t.length>0?t:void 0}(e.tags)),t}function v(e){return new i.DiagnosticRelatedInformation(N(e.location),e.message)}function y(e){switch(e){case r.DiagnosticTag.Unnecessary:return i.DiagnosticTag.Unnecessary;case r.DiagnosticTag.Deprecated:return i.DiagnosticTag.Deprecated;default:return}}function C(e){if(e)return new i.Position(e.line,e.character)}function R(e){if(e)return new i.Range(C(e.start),C(e.end))}function w(e){return e.map(e=>R(e))}function b(e){if(null==e)return i.DiagnosticSeverity.Error;switch(e){case r.DiagnosticSeverity.Error:return i.DiagnosticSeverity.Error;case r.DiagnosticSeverity.Warning:return i.DiagnosticSeverity.Warning;case r.DiagnosticSeverity.Information:return i.DiagnosticSeverity.Information;case r.DiagnosticSeverity.Hint:return i.DiagnosticSeverity.Hint}return i.DiagnosticSeverity.Error}function T(e){if(o.string(e))return e;switch(e.kind){case r.MarkupKind.Markdown:return S(e.value);case r.MarkupKind.PlainText:return e.value;default:return"Unsupported Markup content received. Kind is: "+e.kind}}function S(e){const n=new i.MarkdownString(e);return!0===t&&(n.isTrusted=t),n}function _(e){switch(e){case r.CompletionItemTag.Deprecated:return i.CompletionItemTag.Deprecated}}function P(e){let t=function(e){if(null==e)return[];const t=[];for(let n of e){const e=_(n);void 0!==e&&t.push(e)}return t}(e.tags),n=new s.default(e.label);e.detail&&(n.detail=e.detail),e.documentation&&(n.documentation=T(e.documentation),n.documentationFormat=o.string(e.documentation)?"$string":e.documentation.kind),e.filterText&&(n.filterText=e.filterText);let a=function(e){return e.textEdit?e.insertTextFormat===r.InsertTextFormat.Snippet?{text:new i.SnippetString(e.textEdit.newText),range:D(e.textEdit),fromEdit:!0}:{text:e.textEdit.newText,range:D(e.textEdit),fromEdit:!0}:e.insertText?e.insertTextFormat===r.InsertTextFormat.Snippet?{text:new i.SnippetString(e.insertText),fromEdit:!1}:{text:e.insertText,fromEdit:!1}:void 0}(e);if(a&&(n.insertText=a.text,n.range=a.range,n.fromEdit=a.fromEdit),o.number(e.kind)){let[t,o]=(c=e.kind,r.CompletionItemKind.Text<=c&&c<=r.CompletionItemKind.TypeParameter?[c-1,void 0]:[i.CompletionItemKind.Text,c]);n.kind=t,o&&(n.originalItemKind=o)}var c;return e.sortText&&(n.sortText=e.sortText),e.additionalTextEdits&&(n.additionalTextEdits=x(e.additionalTextEdits)),o.stringArray(e.commitCharacters)&&(n.commitCharacters=e.commitCharacters.slice()),e.command&&(n.command=z(e.command)),!0!==e.deprecated&&!1!==e.deprecated||(n.deprecated=e.deprecated,!0===e.deprecated&&t.push(i.CompletionItemTag.Deprecated)),!0!==e.preselect&&!1!==e.preselect||(n.preselect=e.preselect),void 0!==e.data&&(n.data=e.data),t.length>0&&(n.tags=t),void 0!==e.insertTextMode&&(n.insertTextMode=e.insertTextMode,e.insertTextMode===h.InsertTextMode.asIs&&(n.keepWhitespace=!0)),n}function D(e){return r.InsertReplaceEdit.is(e)?{inserting:R(e.insert),replacing:R(e.replace)}:R(e.range)}function E(e){if(e)return new i.TextEdit(R(e.range),e.newText)}function x(e){if(e)return e.map(E)}function k(e){return e.map(O)}function O(e){let t=new i.SignatureInformation(e.label);return void 0!==e.documentation&&(t.documentation=T(e.documentation)),void 0!==e.parameters&&(t.parameters=F(e.parameters)),void 0!==e.activeParameter&&(t.activeParameter=e.activeParameter),t}function F(e){return e.map(q)}function q(e){let t=new i.ParameterInformation(e.label);return e.documentation&&(t.documentation=T(e.documentation)),t}function N(e){if(e)return new i.Location(n(e.uri),R(e.range))}function I(e){if(!e)return;let t={targetUri:n(e.targetUri),targetRange:R(e.targetRange),originSelectionRange:R(e.originSelectionRange),targetSelectionRange:R(e.targetSelectionRange)};if(!t.targetSelectionRange)throw new Error("targetSelectionRange must not be undefined or null");return t}function M(e){if(e){if(o.array(e)){if(0===e.length)return[];if(r.LocationLink.is(e[0])){return e.map(e=>I(e))}return e.map(e=>N(e))}return r.LocationLink.is(e)?[I(e)]:N(e)}}function A(e){let t=new i.DocumentHighlight(R(e.range));return o.number(e.kind)&&(t.kind=L(e.kind)),t}function L(e){switch(e){case r.DocumentHighlightKind.Text:return i.DocumentHighlightKind.Text;case r.DocumentHighlightKind.Read:return i.DocumentHighlightKind.Read;case r.DocumentHighlightKind.Write:return i.DocumentHighlightKind.Write}return i.DocumentHighlightKind.Text}function j(e){return e<=r.SymbolKind.TypeParameter?e-1:i.SymbolKind.Property}function $(e){switch(e){case r.SymbolTag.Deprecated:return i.SymbolTag.Deprecated;default:return}}function W(e){if(null==e)return;const t=[];for(const n of e){const e=$(n);void 0!==e&&t.push(e)}return 0===t.length?void 0:t}function K(e,t){let r=new i.SymbolInformation(e.name,j(e.kind),R(e.location.range),e.location.uri?n(e.location.uri):t);return H(r,e),e.containerName&&(r.containerName=e.containerName),r}function U(e){let t=new i.DocumentSymbol(e.name,e.detail||"",j(e.kind),R(e.range),R(e.selectionRange));if(H(t,e),void 0!==e.children&&e.children.length>0){let n=[];for(let t of e.children)n.push(U(t));t.children=n}return t}function H(e,t){e.tags=W(t.tags),t.deprecated&&(e.tags?e.tags.includes(i.SymbolTag.Deprecated)||(e.tags=e.tags.concat(i.SymbolTag.Deprecated)):e.tags=[i.SymbolTag.Deprecated])}function z(e){let t={title:e.title,command:e.command};return e.arguments&&(t.arguments=e.arguments),t}const B=new Map;function G(e){if(null==e)return;let t=B.get(e);if(t)return t;let n=e.split(".");t=i.CodeActionKind.Empty;for(let e of n)t=t.append(e);return t}function V(e){if(!e)return;let t=new a.default(R(e.range));return e.command&&(t.command=z(e.command)),void 0!==e.data&&null!==e.data&&(t.data=e.data),t}function X(e){if(!e)return;const t=new Map;if(void 0!==e.changeAnnotations)for(const n of Object.keys(e.changeAnnotations)){const i=J(e.changeAnnotations[n]);t.set(n,i)}const o=e=>void 0===e?void 0:t.get(e),s=new i.WorkspaceEdit;if(e.documentChanges)for(const t of e.documentChanges)if(r.CreateFile.is(t))s.createFile(n(t.uri),t.options,o(t.annotationId));else if(r.RenameFile.is(t))s.renameFile(n(t.oldUri),n(t.newUri),t.options,o(t.annotationId));else if(r.DeleteFile.is(t))s.deleteFile(n(t.uri),t.options,o(t.annotationId));else{if(!r.TextDocumentEdit.is(t))throw new Error("Unknown workspace edit change received:\n"+JSON.stringify(t,void 0,4));{const e=n(t.textDocument.uri);for(const n of t.edits)h.AnnotatedTextEdit.is(n)?s.replace(e,R(n.range),n.newText,o(n.annotationId)):s.replace(e,R(n.range),n.newText)}}else e.changes&&Object.keys(e.changes).forEach(t=>{s.set(n(t),x(e.changes[t]))});return s}function J(e){if(void 0!==e)return{label:e.label,needsConfirmation:!!e.needsConfirmation,description:e.description}}function Y(e){let t=R(e.range),n=e.target?f(e.target):void 0,i=new c.default(t,n);return void 0!==e.tooltip&&(i.tooltip=e.tooltip),void 0!==e.data&&null!==e.data&&(i.data=e.data),i}function Z(e){return new i.Color(e.red,e.green,e.blue,e.alpha)}function Q(e){return new i.ColorInformation(R(e.range),Z(e.color))}function ee(e){let t=new i.ColorPresentation(e.label);return t.additionalTextEdits=x(e.additionalTextEdits),e.textEdit&&(t.textEdit=E(e.textEdit)),t}function te(e){if(e)switch(e){case r.FoldingRangeKind.Comment:return i.FoldingRangeKind.Comment;case r.FoldingRangeKind.Imports:return i.FoldingRangeKind.Imports;case r.FoldingRangeKind.Region:return i.FoldingRangeKind.Region}}function ne(e){return new i.FoldingRange(e.startLine,e.endLine,te(e.kind))}function ie(e){return new i.SelectionRange(R(e.range),e.parent?ie(e.parent):void 0)}function re(e){if(null===e)return;let t=new d.default(j(e.kind),e.name,e.detail||"",f(e.uri),R(e.range),R(e.selectionRange),e.data);return void 0!==e.tags&&(t.tags=W(e.tags)),t}function oe(e){return new i.CallHierarchyIncomingCall(re(e.from),w(e.fromRanges))}function se(e){return new i.CallHierarchyOutgoingCall(re(e.to),w(e.fromRanges))}function ae(e){return new i.SemanticTokensEdit(e.start,e.deleteCount,void 0!==e.data?new Uint32Array(e.data):void 0)}return B.set(r.CodeActionKind.Empty,i.CodeActionKind.Empty),B.set(r.CodeActionKind.QuickFix,i.CodeActionKind.QuickFix),B.set(r.CodeActionKind.Refactor,i.CodeActionKind.Refactor),B.set(r.CodeActionKind.RefactorExtract,i.CodeActionKind.RefactorExtract),B.set(r.CodeActionKind.RefactorInline,i.CodeActionKind.RefactorInline),B.set(r.CodeActionKind.RefactorRewrite,i.CodeActionKind.RefactorRewrite),B.set(r.CodeActionKind.Source,i.CodeActionKind.Source),B.set(r.CodeActionKind.SourceOrganizeImports,i.CodeActionKind.SourceOrganizeImports),{asUri:f,asDiagnostics:g,asDiagnostic:m,asRange:R,asRanges:w,asPosition:C,asDiagnosticSeverity:b,asDiagnosticTag:y,asHover:function(e){if(e)return new i.Hover(function(e){if(o.string(e))return S(e);if(p.is(e)){return S().appendCodeblock(e.value,e.language)}if(Array.isArray(e)){let t=[];for(let n of e){let e=S();p.is(n)?e.appendCodeblock(n.value,n.language):e.appendMarkdown(n),t.push(e)}return t}{let t;switch(e.kind){case r.MarkupKind.Markdown:return S(e.value);case r.MarkupKind.PlainText:return t=S(),t.appendText(e.value),t;default:return t=S(),t.appendText("Unsupported Markup content received. Kind is: "+e.kind),t}}}(e.contents),R(e.range))},asCompletionResult:function(e){if(!e)return;if(Array.isArray(e)){return e.map(P)}let t=e;return new i.CompletionList(t.items.map(P),t.isIncomplete)},asCompletionItem:P,asTextEdit:E,asTextEdits:x,asSignatureHelp:function(e){if(!e)return;let t=new i.SignatureHelp;return o.number(e.activeSignature)?t.activeSignature=e.activeSignature:t.activeSignature=0,o.number(e.activeParameter)?t.activeParameter=e.activeParameter:t.activeParameter=0,e.signatures&&(t.signatures=k(e.signatures)),t},asSignatureInformations:k,asSignatureInformation:O,asParameterInformations:F,asParameterInformation:q,asDeclarationResult:function(e){if(e)return M(e)},asDefinitionResult:function(e){if(e)return M(e)},asLocation:N,asReferences:function(e){if(e)return e.map(e=>N(e))},asDocumentHighlights:function(e){if(e)return e.map(A)},asDocumentHighlight:A,asDocumentHighlightKind:L,asSymbolKind:j,asSymbolTag:$,asSymbolTags:W,asSymbolInformations:function(e,t){if(e)return e.map(e=>K(e,t))},asSymbolInformation:K,asDocumentSymbols:function(e){if(null!=e)return e.map(U)},asDocumentSymbol:U,asCommand:z,asCommands:function(e){if(e)return e.map(z)},asCodeAction:function(e){if(null==e)return;let t=new u.default(e.title,e.data);return void 0!==e.kind&&(t.kind=G(e.kind)),void 0!==e.diagnostics&&(t.diagnostics=g(e.diagnostics)),void 0!==e.edit&&(t.edit=X(e.edit)),void 0!==e.command&&(t.command=z(e.command)),void 0!==e.isPreferred&&(t.isPreferred=e.isPreferred),void 0!==e.disabled&&(t.disabled={reason:e.disabled.reason}),t},asCodeActionKind:G,asCodeActionKinds:function(e){if(null!=e)return e.map(e=>G(e))},asCodeLens:V,asCodeLenses:function(e){if(e)return e.map(e=>V(e))},asWorkspaceEdit:X,asDocumentLink:Y,asDocumentLinks:function(e){if(e)return e.map(Y)},asFoldingRangeKind:te,asFoldingRange:ne,asFoldingRanges:function(e){if(Array.isArray(e))return e.map(ne)},asColor:Z,asColorInformation:Q,asColorInformations:function(e){if(Array.isArray(e))return e.map(Q)},asColorPresentation:ee,asColorPresentations:function(e){if(Array.isArray(e))return e.map(ee)},asSelectionRange:ie,asSelectionRanges:function(e){if(!Array.isArray(e))return[];let t=[];for(let n of e)t.push(ie(n));return t},asSemanticTokensLegend:function(e){return e},asSemanticTokens:function(e){if(null!=e)return new i.SemanticTokens(new Uint32Array(e.data),e.resultId)},asSemanticTokensEdit:ae,asSemanticTokensEdits:function(e){if(null!=e)return new i.SemanticTokensEdits(e.edits.map(ae),e.resultId)},asCallHierarchyItem:re,asCallHierarchyItems:function(e){if(null!==e)return e.map(e=>re(e))},asCallHierarchyIncomingCall:oe,asCallHierarchyIncomingCalls:function(e){if(null!==e)return e.map(e=>oe(e))},asCallHierarchyOutgoingCall:se,asCallHierarchyOutgoingCalls:function(e){if(null!==e)return e.map(e=>se(e))},asLinkedEditingRanges:function(e){if(null!=e)return new i.LinkedEditingRanges(w(e.ranges),function(e){if(null==e)return;return new RegExp(e)}(e.wordPattern))}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Delayer=void 0;const i=n(1);t.Delayer=class{constructor(e){this.defaultDelay=e,this.timeout=void 0,this.completionPromise=void 0,this.onSuccess=void 0,this.task=void 0}trigger(e,t=this.defaultDelay){return this.task=e,t>=0&&this.cancelTimeout(),this.completionPromise||(this.completionPromise=new Promise(e=>{this.onSuccess=e}).then(()=>{this.completionPromise=void 0,this.onSuccess=void 0;var e=this.task();return this.task=void 0,e})),(t>=0||void 0===this.timeout)&&(this.timeout=i.RAL().timer.setTimeout(()=>{this.timeout=void 0,this.onSuccess(void 0)},t>=0?t:this.defaultDelay)),this.completionPromise}forceDelivery(){if(!this.completionPromise)return;this.cancelTimeout();let e=this.task();return this.completionPromise=void 0,this.onSuccess=void 0,this.task=void 0,e}isTriggered(){return void 0!==this.timeout}cancel(){this.cancelTimeout(),this.completionPromise=void 0}cancelTimeout(){void 0!==this.timeout&&(i.RAL().timer.clearTimeout(this.timeout),this.timeout=void 0)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColorProviderFeature=void 0;const i=n(0),r=n(1),o=n(4);function s(e,t){return void 0===e[t]&&(e[t]={}),e[t]}class a extends o.TextDocumentFeature{constructor(e){super(e,r.DocumentColorRequest.type)}fillClientCapabilities(e){s(s(e,"textDocument"),"colorProvider").dynamicRegistration=!0}initialize(e,t){let[n,i]=this.getRegistration(t,e.colorProvider);n&&i&&this.register({id:n,registerOptions:i})}registerLanguageProvider(e){const t={provideColorPresentations:(e,t,n)=>{const i=this._client,o=(e,t,n)=>{const o={color:e,textDocument:i.code2ProtocolConverter.asTextDocumentIdentifier(t.document),range:i.code2ProtocolConverter.asRange(t.range)};return i.sendRequest(r.ColorPresentationRequest.type,o,n).then(this.asColorPresentations.bind(this),e=>i.handleFailedRequest(r.ColorPresentationRequest.type,e,null))},s=i.clientOptions.middleware;return s.provideColorPresentations?s.provideColorPresentations(e,t,n,o):o(e,t,n)},provideDocumentColors:(e,t)=>{const n=this._client,i=(e,t)=>{const i={textDocument:n.code2ProtocolConverter.asTextDocumentIdentifier(e)};return n.sendRequest(r.DocumentColorRequest.type,i,t).then(this.asColorInformations.bind(this),e=>n.handleFailedRequest(r.ColorPresentationRequest.type,e,null))},o=n.clientOptions.middleware;return o.provideDocumentColors?o.provideDocumentColors(e,t,i):i(e,t)}};return[i.languages.registerColorProvider(e.documentSelector,t),t]}asColor(e){return new i.Color(e.red,e.green,e.blue,e.alpha)}asColorInformations(e){return Array.isArray(e)?e.map(e=>new i.ColorInformation(this._client.protocol2CodeConverter.asRange(e.range),this.asColor(e.color))):[]}asColorPresentations(e){return Array.isArray(e)?e.map(e=>{let t=new i.ColorPresentation(e.label);return t.additionalTextEdits=this._client.protocol2CodeConverter.asTextEdits(e.additionalTextEdits),t.textEdit=this._client.protocol2CodeConverter.asTextEdit(e.textEdit),t}):[]}}t.ColorProviderFeature=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImplementationFeature=void 0;const i=n(0),r=n(1),o=n(4);function s(e,t){return void 0===e[t]&&(e[t]={}),e[t]}class a extends o.TextDocumentFeature{constructor(e){super(e,r.ImplementationRequest.type)}fillClientCapabilities(e){let t=s(s(e,"textDocument"),"implementation");t.dynamicRegistration=!0,t.linkSupport=!0}initialize(e,t){let[n,i]=this.getRegistration(t,e.implementationProvider);n&&i&&this.register({id:n,registerOptions:i})}registerLanguageProvider(e){const t={provideImplementation:(e,t,n)=>{const i=this._client,o=(e,t,n)=>i.sendRequest(r.ImplementationRequest.type,i.code2ProtocolConverter.asTextDocumentPositionParams(e,t),n).then(i.protocol2CodeConverter.asDefinitionResult,e=>i.handleFailedRequest(r.ImplementationRequest.type,e,null)),s=i.clientOptions.middleware;return s.provideImplementation?s.provideImplementation(e,t,n,o):o(e,t,n)}};return[i.languages.registerImplementationProvider(e.documentSelector,t),t]}}t.ImplementationFeature=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeDefinitionFeature=void 0;const i=n(0),r=n(1),o=n(4);function s(e,t){return void 0===e[t]&&(e[t]={}),e[t]}class a extends o.TextDocumentFeature{constructor(e){super(e,r.TypeDefinitionRequest.type)}fillClientCapabilities(e){s(s(e,"textDocument"),"typeDefinition").dynamicRegistration=!0;let t=s(s(e,"textDocument"),"typeDefinition");t.dynamicRegistration=!0,t.linkSupport=!0}initialize(e,t){let[n,i]=this.getRegistration(t,e.typeDefinitionProvider);n&&i&&this.register({id:n,registerOptions:i})}registerLanguageProvider(e){const t={provideTypeDefinition:(e,t,n)=>{const i=this._client,o=(e,t,n)=>i.sendRequest(r.TypeDefinitionRequest.type,i.code2ProtocolConverter.asTextDocumentPositionParams(e,t),n).then(i.protocol2CodeConverter.asDefinitionResult,e=>i.handleFailedRequest(r.TypeDefinitionRequest.type,e,null)),s=i.clientOptions.middleware;return s.provideTypeDefinition?s.provideTypeDefinition(e,t,n,o):o(e,t,n)}};return[i.languages.registerTypeDefinitionProvider(e.documentSelector,t),t]}}t.TypeDefinitionFeature=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceFoldersFeature=t.arrayDiff=void 0;const i=n(30),r=n(0),o=n(1);function s(e,t){if(void 0!==e)return e[t]}function a(e,t){return e.filter(e=>t.indexOf(e)<0)}t.arrayDiff=a;t.WorkspaceFoldersFeature=class{constructor(e){this._client=e,this._listeners=new Map}get registrationType(){return o.DidChangeWorkspaceFoldersNotification.type}fillInitializeParams(e){const t=r.workspace.workspaceFolders;this.initializeWithFolders(t),e.workspaceFolders=void 0===t?null:t.map(e=>this.asProtocol(e))}initializeWithFolders(e){this._initialFolders=e}fillClientCapabilities(e){e.workspace=e.workspace||{},e.workspace.workspaceFolders=!0}initialize(e){const t=this._client;t.onRequest(o.WorkspaceFoldersRequest.type,e=>{const n=()=>{const e=r.workspace.workspaceFolders;if(void 0===e)return null;return e.map(e=>this.asProtocol(e))},i=t.clientOptions.middleware.workspace;return i&&i.workspaceFolders?i.workspaceFolders(e,n):n()});const n=s(s(s(e,"workspace"),"workspaceFolders"),"changeNotifications");let a;"string"==typeof n?a=n:!0===n&&(a=i.generateUuid()),a&&this.register({id:a,registerOptions:void 0})}sendInitialEvent(e){if(this._initialFolders&&e){const t=a(this._initialFolders,e),n=a(e,this._initialFolders);(n.length>0||t.length>0)&&this.doSendEvent(n,t)}else this._initialFolders?this.doSendEvent([],this._initialFolders):e&&this.doSendEvent(e,[])}doSendEvent(e,t){let n={event:{added:e.map(e=>this.asProtocol(e)),removed:t.map(e=>this.asProtocol(e))}};this._client.sendNotification(o.DidChangeWorkspaceFoldersNotification.type,n)}register(e){let t=e.id,n=this._client,i=r.workspace.onDidChangeWorkspaceFolders(e=>{let t=e=>{this.doSendEvent(e.added,e.removed)},i=n.clientOptions.middleware.workspace;i&&i.didChangeWorkspaceFolders?i.didChangeWorkspaceFolders(e,t):t(e)});this._listeners.set(t,i),this.sendInitialEvent(r.workspace.workspaceFolders)}unregister(e){let t=this._listeners.get(e);void 0!==t&&(this._listeners.delete(e),t.dispose())}dispose(){for(let e of this._listeners.values())e.dispose();this._listeners.clear()}asProtocol(e){return void 0===e?null:{uri:this._client.code2ProtocolConverter.asUri(e.uri),name:e.name}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FoldingRangeFeature=void 0;const i=n(0),r=n(1),o=n(4);function s(e,t){return void 0===e[t]&&(e[t]={}),e[t]}class a extends o.TextDocumentFeature{constructor(e){super(e,r.FoldingRangeRequest.type)}fillClientCapabilities(e){let t=s(s(e,"textDocument"),"foldingRange");t.dynamicRegistration=!0,t.rangeLimit=5e3,t.lineFoldingOnly=!0}initialize(e,t){let[n,i]=this.getRegistration(t,e.foldingRangeProvider);n&&i&&this.register({id:n,registerOptions:i})}registerLanguageProvider(e){const t={provideFoldingRanges:(e,t,n)=>{const i=this._client,o=(e,t,n)=>{const o={textDocument:i.code2ProtocolConverter.asTextDocumentIdentifier(e)};return i.sendRequest(r.FoldingRangeRequest.type,o,n).then(a.asFoldingRanges,e=>i.handleFailedRequest(r.FoldingRangeRequest.type,e,null))},s=i.clientOptions.middleware;return s.provideFoldingRanges?s.provideFoldingRanges(e,t,n,o):o(e,0,n)}};return[i.languages.registerFoldingRangeProvider(e.documentSelector,t),t]}static asFoldingRangeKind(e){if(e)switch(e){case r.FoldingRangeKind.Comment:return i.FoldingRangeKind.Comment;case r.FoldingRangeKind.Imports:return i.FoldingRangeKind.Imports;case r.FoldingRangeKind.Region:return i.FoldingRangeKind.Region}}static asFoldingRanges(e){return Array.isArray(e)?e.map(e=>new i.FoldingRange(e.startLine,e.endLine,a.asFoldingRangeKind(e.kind))):[]}}t.FoldingRangeFeature=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DeclarationFeature=void 0;const i=n(0),r=n(1),o=n(4);function s(e,t){return void 0===e[t]&&(e[t]={}),e[t]}class a extends o.TextDocumentFeature{constructor(e){super(e,r.DeclarationRequest.type)}fillClientCapabilities(e){const t=s(s(e,"textDocument"),"declaration");t.dynamicRegistration=!0,t.linkSupport=!0}initialize(e,t){const[n,i]=this.getRegistration(t,e.declarationProvider);n&&i&&this.register({id:n,registerOptions:i})}registerLanguageProvider(e){const t={provideDeclaration:(e,t,n)=>{const i=this._client,o=(e,t,n)=>i.sendRequest(r.DeclarationRequest.type,i.code2ProtocolConverter.asTextDocumentPositionParams(e,t),n).then(i.protocol2CodeConverter.asDeclarationResult,e=>i.handleFailedRequest(r.DeclarationRequest.type,e,null)),s=i.clientOptions.middleware;return s.provideDeclaration?s.provideDeclaration(e,t,n,o):o(e,t,n)}};return[i.languages.registerDeclarationProvider(e.documentSelector,t),t]}}t.DeclarationFeature=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SelectionRangeFeature=void 0;const i=n(0),r=n(1),o=n(4);function s(e,t){return void 0===e[t]&&(e[t]=Object.create(null)),e[t]}class a extends o.TextDocumentFeature{constructor(e){super(e,r.SelectionRangeRequest.type)}fillClientCapabilities(e){s(s(e,"textDocument"),"selectionRange").dynamicRegistration=!0}initialize(e,t){let[n,i]=this.getRegistration(t,e.selectionRangeProvider);n&&i&&this.register({id:n,registerOptions:i})}registerLanguageProvider(e){const t={provideSelectionRanges:(e,t,n)=>{const i=this._client,o=(e,t,n)=>{const o={textDocument:i.code2ProtocolConverter.asTextDocumentIdentifier(e),positions:i.code2ProtocolConverter.asPositions(t)};return i.sendRequest(r.SelectionRangeRequest.type,o,n).then(e=>i.protocol2CodeConverter.asSelectionRanges(e),e=>i.handleFailedRequest(r.SelectionRangeRequest.type,e,null))},s=i.clientOptions.middleware;return s.provideSelectionRanges?s.provideSelectionRanges(e,t,n,o):o(e,t,n)}};return[i.languages.registerSelectionRangeProvider(e.documentSelector,t),t]}}t.SelectionRangeFeature=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProgressFeature=void 0;const i=n(1),r=n(49);t.ProgressFeature=class{constructor(e){this._client=e,this.activeParts=new Set}fillClientCapabilities(e){var t,n;(t=e,n="window",void 0===t[n]&&(t[n]=Object.create(null)),t[n]).workDoneProgress=!0}initialize(){const e=this._client,t=e=>{this.activeParts.delete(e)};e.onRequest(i.WorkDoneProgressCreateRequest.type,e=>{this.activeParts.add(new r.ProgressPart(this._client,e.token,t))})}dispose(){for(const e of this.activeParts)e.done();this.activeParts.clear()}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CallHierarchyFeature=void 0;const i=n(0),r=n(1),o=n(4);function s(e,t){return void 0===e[t]&&(e[t]={}),e[t]}class a{constructor(e){this.client=e,this.middleware=e.clientOptions.middleware}prepareCallHierarchy(e,t,n){const i=this.client,o=this.middleware,s=(e,t,n)=>{const o=i.code2ProtocolConverter.asTextDocumentPositionParams(e,t);return i.sendRequest(r.CallHierarchyPrepareRequest.type,o,n).then(e=>i.protocol2CodeConverter.asCallHierarchyItems(e),e=>i.handleFailedRequest(r.CallHierarchyPrepareRequest.type,e,null))};return o.prepareCallHierarchy?o.prepareCallHierarchy(e,t,n,s):s(e,t,n)}provideCallHierarchyIncomingCalls(e,t){const n=this.client,i=this.middleware,o=(e,t)=>{const i={item:n.code2ProtocolConverter.asCallHierarchyItem(e)};return n.sendRequest(r.CallHierarchyIncomingCallsRequest.type,i,t).then(e=>n.protocol2CodeConverter.asCallHierarchyIncomingCalls(e),e=>n.handleFailedRequest(r.CallHierarchyIncomingCallsRequest.type,e,null))};return i.provideCallHierarchyIncomingCalls?i.provideCallHierarchyIncomingCalls(e,t,o):o(e,t)}provideCallHierarchyOutgoingCalls(e,t){const n=this.client,i=this.middleware,o=(e,t)=>{const i={item:n.code2ProtocolConverter.asCallHierarchyItem(e)};return n.sendRequest(r.CallHierarchyOutgoingCallsRequest.type,i,t).then(e=>n.protocol2CodeConverter.asCallHierarchyOutgoingCalls(e),e=>n.handleFailedRequest(r.CallHierarchyOutgoingCallsRequest.type,e,null))};return i.provideCallHierarchyOutgoingCalls?i.provideCallHierarchyOutgoingCalls(e,t,o):o(e,t)}}class c extends o.TextDocumentFeature{constructor(e){super(e,r.CallHierarchyPrepareRequest.type)}fillClientCapabilities(e){s(s(e,"textDocument"),"callHierarchy").dynamicRegistration=!0}initialize(e,t){const[n,i]=this.getRegistration(t,e.callHierarchyProvider);n&&i&&this.register({id:n,registerOptions:i})}registerLanguageProvider(e){const t=this._client,n=new a(t);return[i.languages.registerCallHierarchyProvider(e.documentSelector,n),n]}}t.CallHierarchyFeature=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SemanticTokensFeature=void 0;const i=n(0),r=n(4),o=n(1),s=n(8);function a(e,t){return void 0===e[t]&&(e[t]={}),e[t]}class c extends r.TextDocumentFeature{constructor(e){super(e,o.SemanticTokensRegistrationType.type)}fillClientCapabilities(e){const t=a(a(e,"textDocument"),"semanticTokens");t.dynamicRegistration=!0,t.tokenTypes=[o.SemanticTokenTypes.namespace,o.SemanticTokenTypes.type,o.SemanticTokenTypes.class,o.SemanticTokenTypes.enum,o.SemanticTokenTypes.interface,o.SemanticTokenTypes.struct,o.SemanticTokenTypes.typeParameter,o.SemanticTokenTypes.parameter,o.SemanticTokenTypes.variable,o.SemanticTokenTypes.property,o.SemanticTokenTypes.enumMember,o.SemanticTokenTypes.event,o.SemanticTokenTypes.function,o.SemanticTokenTypes.method,o.SemanticTokenTypes.macro,o.SemanticTokenTypes.keyword,o.SemanticTokenTypes.modifier,o.SemanticTokenTypes.comment,o.SemanticTokenTypes.string,o.SemanticTokenTypes.number,o.SemanticTokenTypes.regexp,o.SemanticTokenTypes.operator],t.tokenModifiers=[o.SemanticTokenModifiers.declaration,o.SemanticTokenModifiers.definition,o.SemanticTokenModifiers.readonly,o.SemanticTokenModifiers.static,o.SemanticTokenModifiers.deprecated,o.SemanticTokenModifiers.abstract,o.SemanticTokenModifiers.async,o.SemanticTokenModifiers.modification,o.SemanticTokenModifiers.documentation,o.SemanticTokenModifiers.defaultLibrary],t.formats=[o.TokenFormat.Relative],t.requests={range:!0,full:{delta:!0}},t.multilineTokenSupport=!1,t.overlappingTokenSupport=!1,a(a(e,"workspace"),"semanticTokens").refreshSupport=!0}initialize(e,t){this._client.onRequest(o.SemanticTokensRefreshRequest.type,async()=>{for(const e of this.getAllProviders())e.onDidChangeSemanticTokensEmitter.fire()});const[n,i]=this.getRegistration(t,e.semanticTokensProvider);n&&i&&this.register({id:n,registerOptions:i})}registerLanguageProvider(e){const t=s.boolean(e.full)?e.full:void 0!==e.full,n=void 0!==e.full&&"boolean"!=typeof e.full&&!0===e.full.delta,r=new i.EventEmitter,a=t?{onDidChangeSemanticTokens:r.event,provideDocumentSemanticTokens:(e,t)=>{const n=this._client,i=n.clientOptions.middleware,r=(e,t)=>{const i={textDocument:n.code2ProtocolConverter.asTextDocumentIdentifier(e)};return n.sendRequest(o.SemanticTokensRequest.type,i,t).then(e=>n.protocol2CodeConverter.asSemanticTokens(e),e=>n.handleFailedRequest(o.SemanticTokensRequest.type,e,null))};return i.provideDocumentSemanticTokens?i.provideDocumentSemanticTokens(e,t,r):r(e,t)},provideDocumentSemanticTokensEdits:n?(e,t,n)=>{const i=this._client,r=i.clientOptions.middleware,s=(e,t,n)=>{const r={textDocument:i.code2ProtocolConverter.asTextDocumentIdentifier(e),previousResultId:t};return i.sendRequest(o.SemanticTokensDeltaRequest.type,r,n).then(e=>o.SemanticTokens.is(e)?i.protocol2CodeConverter.asSemanticTokens(e):i.protocol2CodeConverter.asSemanticTokensEdits(e),e=>i.handleFailedRequest(o.SemanticTokensDeltaRequest.type,e,null))};return r.provideDocumentSemanticTokensEdits?r.provideDocumentSemanticTokensEdits(e,t,n,s):s(e,t,n)}:void 0}:void 0,c=!0===e.range?{provideDocumentRangeSemanticTokens:(e,t,n)=>{const i=this._client,r=i.clientOptions.middleware,s=(e,t,n)=>{const r={textDocument:i.code2ProtocolConverter.asTextDocumentIdentifier(e),range:i.code2ProtocolConverter.asRange(t)};return i.sendRequest(o.SemanticTokensRangeRequest.type,r,n).then(e=>i.protocol2CodeConverter.asSemanticTokens(e),e=>i.handleFailedRequest(o.SemanticTokensRangeRequest.type,e,null))};return r.provideDocumentRangeSemanticTokens?r.provideDocumentRangeSemanticTokens(e,t,n,s):s(e,t,n)}}:void 0,u=[],l=this._client.protocol2CodeConverter.asSemanticTokensLegend(e.legend);return void 0!==a&&u.push(i.languages.registerDocumentSemanticTokensProvider(e.documentSelector,a,l)),void 0!==c&&u.push(i.languages.registerDocumentRangeSemanticTokensProvider(e.documentSelector,c,l)),[new i.Disposable(()=>u.forEach(e=>e.dispose())),{range:c,full:a,onDidChangeSemanticTokensEmitter:r}]}}t.SemanticTokensFeature=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WillDeleteFilesFeature=t.WillRenameFilesFeature=t.WillCreateFilesFeature=t.DidDeleteFilesFeature=t.DidRenameFilesFeature=t.DidCreateFilesFeature=void 0;const i=n(0),r=n(126),o=n(1),s=n(30);function a(e,t){return void 0===e[t]&&(e[t]={}),e[t]}function c(e,t,n){e[t]=n}class u{constructor(e,t,n,i,r){this._filters=new Map,this._client=e,this._event=t,this._registrationType=n,this._clientCapability=i,this._serverCapability=r}get registrationType(){return this._registrationType}fillClientCapabilities(e){const t=a(a(e,"workspace"),"fileOperations");c(t,"dynamicRegistration",!0),c(t,this._clientCapability,!0)}initialize(e){var t;const n=null===(t=e.workspace)||void 0===t?void 0:t.fileOperations,i=void 0!==n?(r=n,o=this._serverCapability,r[o]):void 0;var r,o;if(void 0!==(null==i?void 0:i.filters))try{this.register({id:s.generateUuid(),registerOptions:{filters:i.filters}})}catch(e){this._client.warn(`Ignoring invalid glob pattern for ${this._serverCapability} registration: ${e}`)}}register(e){this._listener||(this._listener=this._event(this.send,this));const t=e.registerOptions.filters.map(e=>{const t=new r.Minimatch(e.pattern.glob,u.asMinimatchOptions(e.pattern.options));if(!t.makeRe())throw new Error(`Invalid pattern ${e.pattern.glob}!`);return{scheme:e.scheme,matcher:t,kind:e.pattern.matches}});this._filters.set(e.id,t)}unregister(e){this._filters.delete(e),0===this._filters.size&&this._listener&&(this._listener.dispose(),this._listener=void 0)}dispose(){this._filters.clear(),this._listener&&(this._listener.dispose(),this._listener=void 0)}async filter(e,t){const n=await Promise.all(e.files.map(async e=>{const n=t(e),r=n.fsPath.replace(/\\/g,"/");for(const e of this._filters.values())for(const t of e)if(void 0===t.scheme||t.scheme===n.scheme)if(t.matcher.match(r)){if(void 0===t.kind)return!0;const e=await u.getFileType(n);if(void 0===e)return this._client.error(`Failed to determine file type for ${n.toString()}.`),!0;if(e===i.FileType.File&&t.kind===o.FileOperationPatternKind.file||e===i.FileType.Directory&&t.kind===o.FileOperationPatternKind.folder)return!0}else if(t.kind===o.FileOperationPatternKind.folder){if(await u.getFileType(n)===i.FileType.Directory&&t.matcher.match(r+"/"))return!0}return!1})),r=e.files.filter((e,t)=>n[t]);return Object.assign(Object.assign({},e),{files:r})}static async getFileType(e){try{return(await i.workspace.fs.stat(e)).type}catch(e){return}}static asMinimatchOptions(e){if(void 0!==e)return!0===e.ignoreCase?{nocase:!0}:void 0}}class l extends u{constructor(e,t,n,i,r,o,s){super(e,t,n,i,r),this._notificationType=n,this._accessUri=o,this._createParams=s}async send(e){const t=await this.filter(e,this._accessUri);if(t.files.length){const e=async e=>{this._client.sendNotification(this._notificationType,this._createParams(e))};this.doSend(t,e)}}}t.DidCreateFilesFeature=class extends l{constructor(e){super(e,i.workspace.onDidCreateFiles,o.DidCreateFilesNotification.type,"didCreate","didCreate",e=>e,e.code2ProtocolConverter.asDidCreateFilesParams)}doSend(e,t){var n;const i=null===(n=this._client.clientOptions.middleware)||void 0===n?void 0:n.workspace;return(null==i?void 0:i.didCreateFiles)?i.didCreateFiles(e,t):t(e)}};t.DidRenameFilesFeature=class extends l{constructor(e){super(e,i.workspace.onDidRenameFiles,o.DidRenameFilesNotification.type,"didRename","didRename",e=>e.oldUri,e.code2ProtocolConverter.asDidRenameFilesParams)}doSend(e,t){var n;const i=null===(n=this._client.clientOptions.middleware)||void 0===n?void 0:n.workspace;return(null==i?void 0:i.didRenameFiles)?i.didRenameFiles(e,t):t(e)}};t.DidDeleteFilesFeature=class extends l{constructor(e){super(e,i.workspace.onDidDeleteFiles,o.DidDeleteFilesNotification.type,"didDelete","didDelete",e=>e,e.code2ProtocolConverter.asDidDeleteFilesParams)}doSend(e,t){var n;const i=null===(n=this._client.clientOptions.middleware)||void 0===n?void 0:n.workspace;return(null==i?void 0:i.didDeleteFiles)?i.didDeleteFiles(e,t):t(e)}};class d extends u{constructor(e,t,n,i,r,o,s){super(e,t,n,i,r),this._requestType=n,this._accessUri=o,this._createParams=s}async send(e){const t=this.waitUntil(e);e.waitUntil(t)}async waitUntil(e){const t=await this.filter(e,this._accessUri);if(t.files.length){const e=e=>this._client.sendRequest(this._requestType,this._createParams(e)).then(this._client.protocol2CodeConverter.asWorkspaceEdit);return this.doSend(t,e)}}}t.WillCreateFilesFeature=class extends d{constructor(e){super(e,i.workspace.onWillCreateFiles,o.WillCreateFilesRequest.type,"willCreate","willCreate",e=>e,e.code2ProtocolConverter.asWillCreateFilesParams)}doSend(e,t){var n;const i=null===(n=this._client.clientOptions.middleware)||void 0===n?void 0:n.workspace;return(null==i?void 0:i.willCreateFiles)?i.willCreateFiles(e,t):t(e)}};t.WillRenameFilesFeature=class extends d{constructor(e){super(e,i.workspace.onWillRenameFiles,o.WillRenameFilesRequest.type,"willRename","willRename",e=>e.oldUri,e.code2ProtocolConverter.asWillRenameFilesParams)}doSend(e,t){var n;const i=null===(n=this._client.clientOptions.middleware)||void 0===n?void 0:n.workspace;return(null==i?void 0:i.willRenameFiles)?i.willRenameFiles(e,t):t(e)}};t.WillDeleteFilesFeature=class extends d{constructor(e){super(e,i.workspace.onWillDeleteFiles,o.WillDeleteFilesRequest.type,"willDelete","willDelete",e=>e,e.code2ProtocolConverter.asWillDeleteFilesParams)}doSend(e,t){var n;const i=null===(n=this._client.clientOptions.middleware)||void 0===n?void 0:n.workspace;return(null==i?void 0:i.willDeleteFiles)?i.willDeleteFiles(e,t):t(e)}}},function(e,t,n){e.exports=l,l.Minimatch=d;var i={sep:"/"};try{i=n(9)}catch(e){}var r=l.GLOBSTAR=d.GLOBSTAR={},o=n(127),s={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},a="().*{}+?[]^$\\!".split("").reduce((function(e,t){return e[t]=!0,e}),{});var c=/\/+/;function u(e,t){e=e||{},t=t||{};var n={};return Object.keys(t).forEach((function(e){n[e]=t[e]})),Object.keys(e).forEach((function(t){n[t]=e[t]})),n}function l(e,t,n){if("string"!=typeof t)throw new TypeError("glob pattern string required");return n||(n={}),!(!n.nocomment&&"#"===t.charAt(0))&&(""===t.trim()?""===e:new d(t,n).match(e))}function d(e,t){if(!(this instanceof d))return new d(e,t);if("string"!=typeof e)throw new TypeError("glob pattern string required");t||(t={}),e=e.trim(),"/"!==i.sep&&(e=e.split(i.sep).join("/")),this.options=t,this.set=[],this.pattern=e,this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.make()}function h(e,t){if(t||(t=this instanceof d?this.options:{}),void 0===(e=void 0===e?this.pattern:e))throw new TypeError("undefined pattern");return t.nobrace||!e.match(/\{.*\}/)?[e]:o(e)}l.filter=function(e,t){return t=t||{},function(n,i,r){return l(n,e,t)}},l.defaults=function(e){if(!e||!Object.keys(e).length)return l;var t=l,n=function(n,i,r){return t.minimatch(n,i,u(e,r))};return n.Minimatch=function(n,i){return new t.Minimatch(n,u(e,i))},n},d.defaults=function(e){return e&&Object.keys(e).length?l.defaults(e).Minimatch:d},d.prototype.debug=function(){},d.prototype.make=function(){if(this._made)return;var e=this.pattern,t=this.options;if(!t.nocomment&&"#"===e.charAt(0))return void(this.comment=!0);if(!e)return void(this.empty=!0);this.parseNegate();var n=this.globSet=this.braceExpand();t.debug&&(this.debug=console.error);this.debug(this.pattern,n),n=this.globParts=n.map((function(e){return e.split(c)})),this.debug(this.pattern,n),n=n.map((function(e,t,n){return e.map(this.parse,this)}),this),this.debug(this.pattern,n),n=n.filter((function(e){return-1===e.indexOf(!1)})),this.debug(this.pattern,n),this.set=n},d.prototype.parseNegate=function(){var e=this.pattern,t=!1,n=this.options,i=0;if(n.nonegate)return;for(var r=0,o=e.length;r<o&&"!"===e.charAt(r);r++)t=!t,i++;i&&(this.pattern=e.substr(i));this.negate=t},l.braceExpand=function(e,t){return h(e,t)},d.prototype.braceExpand=h,d.prototype.parse=function(e,t){if(e.length>65536)throw new TypeError("pattern is too long");var n=this.options;if(!n.noglobstar&&"**"===e)return r;if(""===e)return"";var i,o="",c=!!n.nocase,u=!1,l=[],d=[],h=!1,f=-1,g=-1,m="."===e.charAt(0)?"":n.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",v=this;function y(){if(i){switch(i){case"*":o+="[^/]*?",c=!0;break;case"?":o+="[^/]",c=!0;break;default:o+="\\"+i}v.debug("clearStateChar %j %j",i,o),i=!1}}for(var C,R=0,w=e.length;R<w&&(C=e.charAt(R));R++)if(this.debug("%s\t%s %s %j",e,R,o,C),u&&a[C])o+="\\"+C,u=!1;else switch(C){case"/":return!1;case"\\":y(),u=!0;continue;case"?":case"*":case"+":case"@":case"!":if(this.debug("%s\t%s %s %j <-- stateChar",e,R,o,C),h){this.debug("  in class"),"!"===C&&R===g+1&&(C="^"),o+=C;continue}v.debug("call clearStateChar %j",i),y(),i=C,n.noext&&y();continue;case"(":if(h){o+="(";continue}if(!i){o+="\\(";continue}l.push({type:i,start:R-1,reStart:o.length,open:s[i].open,close:s[i].close}),o+="!"===i?"(?:(?!(?:":"(?:",this.debug("plType %j %j",i,o),i=!1;continue;case")":if(h||!l.length){o+="\\)";continue}y(),c=!0;var b=l.pop();o+=b.close,"!"===b.type&&d.push(b),b.reEnd=o.length;continue;case"|":if(h||!l.length||u){o+="\\|",u=!1;continue}y(),o+="|";continue;case"[":if(y(),h){o+="\\"+C;continue}h=!0,g=R,f=o.length,o+=C;continue;case"]":if(R===g+1||!h){o+="\\"+C,u=!1;continue}if(h){var T=e.substring(g+1,R);try{RegExp("["+T+"]")}catch(e){var S=this.parse(T,p);o=o.substr(0,f)+"\\["+S[0]+"\\]",c=c||S[1],h=!1;continue}}c=!0,h=!1,o+=C;continue;default:y(),u?u=!1:!a[C]||"^"===C&&h||(o+="\\"),o+=C}h&&(T=e.substr(g+1),S=this.parse(T,p),o=o.substr(0,f)+"\\["+S[0],c=c||S[1]);for(b=l.pop();b;b=l.pop()){var _=o.slice(b.reStart+b.open.length);this.debug("setting tail",o,b),_=_.replace(/((?:\\{2}){0,64})(\\?)\|/g,(function(e,t,n){return n||(n="\\"),t+t+n+"|"})),this.debug("tail=%j\n   %s",_,_,b,o);var P="*"===b.type?"[^/]*?":"?"===b.type?"[^/]":"\\"+b.type;c=!0,o=o.slice(0,b.reStart)+P+"\\("+_}y(),u&&(o+="\\\\");var D=!1;switch(o.charAt(0)){case".":case"[":case"(":D=!0}for(var E=d.length-1;E>-1;E--){var x=d[E],k=o.slice(0,x.reStart),O=o.slice(x.reStart,x.reEnd-8),F=o.slice(x.reEnd-8,x.reEnd),q=o.slice(x.reEnd);F+=q;var N=k.split("(").length-1,I=q;for(R=0;R<N;R++)I=I.replace(/\)[+*?]?/,"");var M="";""===(q=I)&&t!==p&&(M="$"),o=k+O+q+M+F}""!==o&&c&&(o="(?=.)"+o);D&&(o=m+o);if(t===p)return[o,c];if(!c)return function(e){return e.replace(/\\(.)/g,"$1")}(e);var A=n.nocase?"i":"";try{var L=new RegExp("^"+o+"$",A)}catch(e){return new RegExp("$.")}return L._glob=e,L._src=o,L};var p={};l.makeRe=function(e,t){return new d(e,t||{}).makeRe()},d.prototype.makeRe=function(){if(this.regexp||!1===this.regexp)return this.regexp;var e=this.set;if(!e.length)return this.regexp=!1,this.regexp;var t=this.options,n=t.noglobstar?"[^/]*?":t.dot?"(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?":"(?:(?!(?:\\/|^)\\.).)*?",i=t.nocase?"i":"",o=e.map((function(e){return e.map((function(e){return e===r?n:"string"==typeof e?function(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}(e):e._src})).join("\\/")})).join("|");o="^(?:"+o+")$",this.negate&&(o="^(?!"+o+").*$");try{this.regexp=new RegExp(o,i)}catch(e){this.regexp=!1}return this.regexp},l.match=function(e,t,n){var i=new d(t,n=n||{});return e=e.filter((function(e){return i.match(e)})),i.options.nonull&&!e.length&&e.push(t),e},d.prototype.match=function(e,t){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return""===e;if("/"===e&&t)return!0;var n=this.options;"/"!==i.sep&&(e=e.split(i.sep).join("/"));e=e.split(c),this.debug(this.pattern,"split",e);var r,o,s=this.set;for(this.debug(this.pattern,"set",s),o=e.length-1;o>=0&&!(r=e[o]);o--);for(o=0;o<s.length;o++){var a=s[o],u=e;if(n.matchBase&&1===a.length&&(u=[r]),this.matchOne(u,a,t))return!!n.flipNegate||!this.negate}return!n.flipNegate&&this.negate},d.prototype.matchOne=function(e,t,n){var i=this.options;this.debug("matchOne",{this:this,file:e,pattern:t}),this.debug("matchOne",e.length,t.length);for(var o=0,s=0,a=e.length,c=t.length;o<a&&s<c;o++,s++){this.debug("matchOne loop");var u,l=t[s],d=e[o];if(this.debug(t,l,d),!1===l)return!1;if(l===r){this.debug("GLOBSTAR",[t,l,d]);var h=o,p=s+1;if(p===c){for(this.debug("** at the end");o<a;o++)if("."===e[o]||".."===e[o]||!i.dot&&"."===e[o].charAt(0))return!1;return!0}for(;h<a;){var f=e[h];if(this.debug("\nglobstar while",e,h,t,p,f),this.matchOne(e.slice(h),t.slice(p),n))return this.debug("globstar found match!",h,a,f),!0;if("."===f||".."===f||!i.dot&&"."===f.charAt(0)){this.debug("dot detected!",e,h,t,p);break}this.debug("globstar swallow a segment, and continue"),h++}return!(!n||(this.debug("\n>>> no match, partial?",e,h,t,p),h!==a))}if("string"==typeof l?(u=i.nocase?d.toLowerCase()===l.toLowerCase():d===l,this.debug("string match",l,d,u)):(u=d.match(l),this.debug("pattern match",l,d,u)),!u)return!1}if(o===a&&s===c)return!0;if(o===a)return n;if(s===c)return o===a-1&&""===e[o];throw new Error("wtf?")}},function(e,t,n){var i=n(128),r=n(129);e.exports=function(e){if(!e)return[];"{}"===e.substr(0,2)&&(e="\\{\\}"+e.substr(2));return function e(t,n){var o=[],s=r("{","}",t);if(!s||/\$$/.test(s.pre))return[t];var c,u=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(s.body),d=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(s.body),m=u||d,v=s.body.indexOf(",")>=0;if(!m&&!v)return s.post.match(/,.*\}/)?(t=s.pre+"{"+s.body+a+s.post,e(t)):[t];if(m)c=s.body.split(/\.\./);else{if(1===(c=function e(t){if(!t)return[""];var n=[],i=r("{","}",t);if(!i)return t.split(",");var o=i.pre,s=i.body,a=i.post,c=o.split(",");c[c.length-1]+="{"+s+"}";var u=e(a);a.length&&(c[c.length-1]+=u.shift(),c.push.apply(c,u));return n.push.apply(n,c),n}(s.body)).length)if(1===(c=e(c[0],!1).map(h)).length)return(R=s.post.length?e(s.post,!1):[""]).map((function(e){return s.pre+c[0]+e}))}var y,C=s.pre,R=s.post.length?e(s.post,!1):[""];if(m){var w=l(c[0]),b=l(c[1]),T=Math.max(c[0].length,c[1].length),S=3==c.length?Math.abs(l(c[2])):1,_=f;b<w&&(S*=-1,_=g);var P=c.some(p);y=[];for(var D=w;_(D,b);D+=S){var E;if(d)"\\"===(E=String.fromCharCode(D))&&(E="");else if(E=String(D),P){var x=T-E.length;if(x>0){var k=new Array(x+1).join("0");E=D<0?"-"+k+E.slice(1):k+E}}y.push(E)}}else y=i(c,(function(t){return e(t,!1)}));for(var O=0;O<y.length;O++)for(var F=0;F<R.length;F++){var q=C+y[O]+R[F];(!n||m||q)&&o.push(q)}return o}(function(e){return e.split("\\\\").join(o).split("\\{").join(s).split("\\}").join(a).split("\\,").join(c).split("\\.").join(u)}(e),!0).map(d)};var o="\0SLASH"+Math.random()+"\0",s="\0OPEN"+Math.random()+"\0",a="\0CLOSE"+Math.random()+"\0",c="\0COMMA"+Math.random()+"\0",u="\0PERIOD"+Math.random()+"\0";function l(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function d(e){return e.split(o).join("\\").split(s).join("{").split(a).join("}").split(c).join(",").split(u).join(".")}function h(e){return"{"+e+"}"}function p(e){return/^-?0\d/.test(e)}function f(e,t){return e<=t}function g(e,t){return e>=t}},function(e,t){e.exports=function(e,t){for(var i=[],r=0;r<e.length;r++){var o=t(e[r],r);n(o)?i.push.apply(i,o):i.push(o)}return i};var n=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},function(e,t,n){"use strict";function i(e,t,n){e instanceof RegExp&&(e=r(e,n)),t instanceof RegExp&&(t=r(t,n));var i=o(e,t,n);return i&&{start:i[0],end:i[1],pre:n.slice(0,i[0]),body:n.slice(i[0]+e.length,i[1]),post:n.slice(i[1]+t.length)}}function r(e,t){var n=t.match(e);return n?n[0]:null}function o(e,t,n){var i,r,o,s,a,c=n.indexOf(e),u=n.indexOf(t,c+1),l=c;if(c>=0&&u>0){for(i=[],o=n.length;l>=0&&!a;)l==c?(i.push(l),c=n.indexOf(e,l+1)):1==i.length?a=[i.pop(),u]:((r=i.pop())<o&&(o=r,s=u),u=n.indexOf(t,l+1)),l=c<u&&c>=0?c:u;i.length&&(a=[o,s])}return a}e.exports=i,i.range=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LinkedEditingFeature=void 0;const i=n(0),r=n(1),o=n(4);function s(e,t){return void 0===e[t]&&(e[t]={}),e[t]}class a extends o.TextDocumentFeature{constructor(e){super(e,r.LinkedEditingRangeRequest.type)}fillClientCapabilities(e){s(s(e,"textDocument"),"linkedEditingRange").dynamicRegistration=!0}initialize(e,t){let[n,i]=this.getRegistration(t,e.linkedEditingRangeProvider);n&&i&&this.register({id:n,registerOptions:i})}registerLanguageProvider(e){const t={provideLinkedEditingRanges:(e,t,n)=>{const i=this._client,o=(e,t,n)=>i.sendRequest(r.LinkedEditingRangeRequest.type,i.code2ProtocolConverter.asTextDocumentPositionParams(e,t),n).then(i.protocol2CodeConverter.asLinkedEditingRanges,e=>i.handleFailedRequest(r.LinkedEditingRangeRequest.type,e,null)),s=i.clientOptions.middleware;return s.provideLinkedEditingRange?s.provideLinkedEditingRange(e,t,n,o):o(e,t,n)}};return[i.languages.registerLinkedEditingRangeProvider(e.documentSelector,t),t]}}t.LinkedEditingFeature=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.terminate=void 0;const i=n(32),r=n(9),o="win32"===process.platform,s="darwin"===process.platform,a="linux"===process.platform;t.terminate=function(e,t){if(o)try{let n={stdio:["pipe","pipe","ignore"]};return t&&(n.cwd=t),i.execFileSync("taskkill",["/T","/F","/PID",e.pid.toString()],n),!0}catch(e){return!1}else{if(!a&&!s)return e.kill("SIGKILL"),!0;try{var n=r.join(__dirname,"terminateProcess.sh");return!i.spawnSync(n,[e.pid.toString()]).error}catch(e){return!1}}}},function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),r(n(1),t),r(n(4),t),r(n(35),t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.startClient=void 0;const i=n(0),r=n(22),o=n(134),s=n(135),a=n(31);var c;!function(e){e.type=new r.NotificationType("css/customDataChanged")}(c||(c={}));const u=o.loadMessageBundle(n(9).join(__dirname,"cssClient.ts"));t.startClient=function(e,t,n){const r=s.getCustomDataSource(e.subscriptions);let o=["css","scss","less"],l={documentSelector:o,synchronize:{configurationSection:["css","scss","less"]},initializationOptions:{handledSchemas:["file"]},middleware:{provideCompletionItem(e,t,n,r,o){function s(e){const n=e.range;n instanceof i.Range&&n.end.isAfter(t)&&n.start.isBeforeOrEqual(t)&&(e.range={inserting:new i.Range(n.start,t),replacing:n})}function a(e){e.kind===i.CompletionItemKind.Color&&(e.label={label:e.label,description:e.documentation})}function c(e){return e&&((Array.isArray(e)?e:e.items).forEach(s),(Array.isArray(e)?e:e.items).forEach(a)),e}const u=o(e,t,n,r);return(l=u)&&l.then?u.then(c):c(u);var l}}},d=t("css",u(0,null),l);d.registerProposedFeatures(),d.onReady().then(()=>{d.sendNotification(c.type,r.uris),r.onDidChange(()=>{d.sendNotification(c.type,r.uris)}),a.serveFileSystemRequests(d,n)});let h=d.start();e.subscriptions.push(h),d.onReady().then(()=>{e.subscriptions.push(function(){const e=/^(\s*)(\/(\*\s*(#\w*)?)?)?$/;return i.languages.registerCompletionItemProvider(o,{provideCompletionItems(t,n){let r=t.getText(new i.Range(new i.Position(n.line,0),n)).match(e);if(r){let e=new i.Range(new i.Position(n.line,r[1].length),n),t=new i.CompletionItem("#region",i.CompletionItemKind.Snippet);t.range=e,i.TextEdit.replace(e,"/* #region */"),t.insertText=new i.SnippetString("/* #region $1*/"),t.documentation=u(1,null),t.filterText=r[2],t.sortText="za";let o=new i.CompletionItem("#endregion",i.CompletionItemKind.Snippet);return o.range=e,o.insertText="/* #endregion */",o.documentation=u(2,null),o.sortText="zb",o.filterText=r[2],[t,o]}return null}})}())}),i.commands.registerCommand("_css.applyCodeAction",(function(e,t,n){let r=i.window.activeTextEditor;r&&r.document.uri.toString()===e&&(r.document.version!==t&&i.window.showInformationMessage("CSS fix is outdated and can't be applied to the document."),r.edit(e=>{for(let t of n)e.replace(d.protocol2CodeConverter.asRange(t.range),t.newText)}).then(e=>{e||i.window.showErrorMessage("Failed to apply CSS fix to the document. Please consider opening an issue with steps to reproduce.")}))}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.config=t.loadMessageBundle=void 0;var i=n(9),r=n(21),o=n(51),s=n(52),a=n(52);Object.defineProperty(t,"MessageFormat",{enumerable:!0,get:function(){return a.MessageFormat}}),Object.defineProperty(t,"BundleFormat",{enumerable:!0,get:function(){return a.BundleFormat}});var c,u,l=Object.prototype.toString;function d(e){return"[object Number]"===l.call(e)}function h(e){return"[object String]"===l.call(e)}function p(e){return JSON.parse(r.readFileSync(e,"utf8"))}function f(e){return function(t,n){for(var i=[],r=2;r<arguments.length;r++)i[r-2]=arguments[r];return d(t)?t>=e.length?void console.error("Broken localize call found. Index out of bounds. Stacktrace is\n: "+new Error("").stack):s.format(e[t],i):h(n)?(console.warn("Message "+n+" didn't get externalized correctly."),s.format(n,i)):void console.error("Broken localize call found. Stacktrace is\n: "+new Error("").stack)}}function g(e,t){return c[e]=t,t}function m(e,t){var n,o,s,a=i.join(u.cacheRoot,e.id+"-"+e.hash+".json"),c=!1,l=!1;try{return n=JSON.parse(r.readFileSync(a,{encoding:"utf8",flag:"r"})),o=a,s=new Date,r.utimes(o,s,s,(function(){})),n}catch(e){if("ENOENT"===e.code)l=!0;else{if(!(e instanceof SyntaxError))throw e;console.log("Syntax error parsing message bundle: "+e.message+"."),r.unlink(a,(function(e){e&&console.error("Deleting corrupted bundle "+a+" failed.")})),c=!0}}if(!(n=function(e,t){var n=u.translationsConfig[e.id];if(n){var r=p(n).contents,o=p(i.join(t,"nls.metadata.json")),s=Object.create(null);for(var a in o){var c=o[a],l=r[e.outDir+"/"+a];if(l){for(var d=[],f=0;f<c.keys.length;f++){var g=c.keys[f],m=l[h(g)?g:g.key];void 0===m&&(m=c.messages[f]),d.push(m)}s[a]=d}else s[a]=c.messages}return s}}(e,t))||c)return n;if(l)try{r.writeFileSync(a,JSON.stringify(n),{encoding:"utf8",flag:"wx"})}catch(e){if("EEXIST"===e.code)return n;throw e}return n}function v(e){try{return function(e){var t=p(i.join(e,"nls.metadata.json")),n=Object.create(null);for(var r in t){var o=t[r];n[r]=o.messages}return n}(e)}catch(e){return void console.log("Generating default bundle from meta data failed.",e)}}function y(e,t){var n;if(!0===u.languagePackSupport&&void 0!==u.cacheRoot&&void 0!==u.languagePackId&&void 0!==u.translationsConfigFile&&void 0!==u.translationsConfig)try{n=m(e,t)}catch(e){console.log("Load or create bundle failed ",e)}if(!n){if(u.languagePackSupport)return v(t);var o=function(e){for(var t=u.language;t;){var n=i.join(e,"nls.bundle."+t+".json");if(r.existsSync(n))return n;var o=t.lastIndexOf("-");t=o>0?t.substring(0,o):void 0}if(void 0===t){n=i.join(e,"nls.bundle.json");if(r.existsSync(n))return n}}(t);if(o)try{return p(o)}catch(e){console.log("Loading in the box message bundle failed.",e)}n=v(t)}return n}function C(e){if(!e)return s.localize;var t=i.extname(e);if(t&&(e=e.substr(0,e.length-t.length)),u.messageFormat===s.MessageFormat.both||u.messageFormat===s.MessageFormat.bundle){var n=function(e){for(var t,n=i.dirname(e);t=i.join(n,"nls.metadata.header.json"),!r.existsSync(t);){var o=i.dirname(n);if(o===n){t=void 0;break}n=o}return t}(e);if(n){var o=i.dirname(n),a=c[o];if(void 0===a)try{var l=JSON.parse(r.readFileSync(n,"utf8"));try{var d=y(l,o);a=g(o,d?{header:l,nlsBundle:d}:null)}catch(e){console.error("Failed to load nls bundle",e),a=g(o,null)}}catch(e){console.error("Failed to read header file",e),a=g(o,null)}if(a){var h=e.substr(o.length+1).replace(/\\/g,"/"),m=a.nlsBundle[h];return void 0===m?(console.error("Messages for file "+e+" not found. See console for details."),function(){return"Messages not found."}):f(m)}}}if(u.messageFormat===s.MessageFormat.both||u.messageFormat===s.MessageFormat.file)try{var v=p(function(e){var t;if(u.cacheLanguageResolution&&t)t=t;else{if(s.isPseudo||!u.language)t=".nls.json";else for(var n=u.language;n;){var i=".nls."+n+".json";if(r.existsSync(e+i)){t=i;break}var o=n.lastIndexOf("-");o>0?n=n.substring(0,o):(t=".nls.json",n=null)}u.cacheLanguageResolution&&(t=t)}return e+t}(e));return Array.isArray(v)?f(v):s.isDefined(v.messages)&&s.isDefined(v.keys)?f(v.messages):(console.error("String bundle '"+e+"' uses an unsupported format."),function(){return"File bundle has unsupported format. See console for details"})}catch(e){"ENOENT"!==e.code&&console.error("Failed to load single file bundle",e)}return console.error("Failed to load message bundle for file "+e),function(){return"Failed to load message bundle. See console for details."}}function R(e){return e&&(h(e.locale)&&(u.locale=e.locale.toLowerCase(),u.language=u.locale,c=Object.create(null)),void 0!==e.messageFormat&&(u.messageFormat=e.messageFormat),e.bundleFormat===s.BundleFormat.standalone&&!0===u.languagePackSupport&&(u.languagePackSupport=!1)),s.setPseudo("pseudo"===u.locale),C}!function(){if(u={locale:void 0,language:void 0,languagePackSupport:!1,cacheLanguageResolution:!0,messageFormat:s.MessageFormat.bundle},h(process.env.VSCODE_NLS_CONFIG))try{var e=JSON.parse(process.env.VSCODE_NLS_CONFIG),t=void 0;if(e.availableLanguages){var n=e.availableLanguages["*"];h(n)&&(t=n)}if(h(e.locale)&&(u.locale=e.locale.toLowerCase()),void 0===t?u.language=u.locale:"en"!==t&&(u.language=t),function(e){return!0===e||!1===e}(e._languagePackSupport)&&(u.languagePackSupport=e._languagePackSupport),h(e._cacheRoot)&&(u.cacheRoot=e._cacheRoot),h(e._languagePackId)&&(u.languagePackId=e._languagePackId),h(e._translationsConfigFile)){u.translationsConfigFile=e._translationsConfigFile;try{u.translationsConfig=p(u.translationsConfigFile)}catch(t){if(e._corruptedFile){var o=i.dirname(e._corruptedFile);r.exists(o,(function(t){t&&r.writeFile(e._corruptedFile,"corrupted","utf8",(function(e){console.error(e)}))}))}}}}catch(e){}s.setPseudo("pseudo"===u.locale),c=Object.create(null)}(),t.loadMessageBundle=C,t.config=R,o.default.install(Object.freeze({loadMessageBundle:C,config:R}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getCustomDataSource=void 0;const i=n(0),r=n(136);function o(){const e=i.workspace.workspaceFolders,t=[];if(!e)return t;const n=(e,n)=>{if(Array.isArray(e))for(const i of e)"string"==typeof i&&t.push(r.Utils.resolvePath(n,i).toString())};for(let t=0;t<e.length;t++){const r=e[t].uri,o=i.workspace.getConfiguration("css",r).inspect("customData");o&&(n(o.workspaceFolderValue,r),0===t&&(i.workspace.workspaceFile&&n(o.workspaceValue,i.workspace.workspaceFile),n(o.globalValue,r)))}return t}function s(){var e,t,n;const o=[];for(const s of i.extensions.all){const i=null===(n=null===(t=null===(e=s.packageJSON)||void 0===e?void 0:e.contributes)||void 0===t?void 0:t.css)||void 0===n?void 0:n.customData;if(Array.isArray(i))for(const e of i)o.push(r.Utils.joinPath(s.extensionUri,e).toString())}return o}t.getCustomDataSource=function(e){let t=o(),n=s();const r=new i.EventEmitter;return e.push(i.extensions.onDidChange(e=>{const t=s();t.length===n.length&&t.every((e,t)=>e===n[t])||(n=t,r.fire())})),e.push(i.workspace.onDidChangeConfiguration(e=>{e.affectsConfiguration("css.customData")&&(t=o(),r.fire())})),{get uris(){return t.concat(n)},get onDidChange(){return r.event}}}},function(e,t,n){"use strict";var i;n.r(t),n.d(t,"URI",(function(){return r})),n.d(t,"Utils",(function(){return o})),i=(()=>{var e={470:e=>{function t(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function n(e,t){for(var n,i="",r=0,o=-1,s=0,a=0;a<=e.length;++a){if(a<e.length)n=e.charCodeAt(a);else{if(47===n)break;n=47}if(47===n){if(o===a-1||1===s);else if(o!==a-1&&2===s){if(i.length<2||2!==r||46!==i.charCodeAt(i.length-1)||46!==i.charCodeAt(i.length-2))if(i.length>2){var c=i.lastIndexOf("/");if(c!==i.length-1){-1===c?(i="",r=0):r=(i=i.slice(0,c)).length-1-i.lastIndexOf("/"),o=a,s=0;continue}}else if(2===i.length||1===i.length){i="",r=0,o=a,s=0;continue}t&&(i.length>0?i+="/..":i="..",r=2)}else i.length>0?i+="/"+e.slice(o+1,a):i=e.slice(o+1,a),r=a-o-1;o=a,s=0}else 46===n&&-1!==s?++s:s=-1}return i}var i={resolve:function(){for(var e,i="",r=!1,o=arguments.length-1;o>=-1&&!r;o--){var s;o>=0?s=arguments[o]:(void 0===e&&(e=process.cwd()),s=e),t(s),0!==s.length&&(i=s+"/"+i,r=47===s.charCodeAt(0))}return i=n(i,!r),r?i.length>0?"/"+i:"/":i.length>0?i:"."},normalize:function(e){if(t(e),0===e.length)return".";var i=47===e.charCodeAt(0),r=47===e.charCodeAt(e.length-1);return 0!==(e=n(e,!i)).length||i||(e="."),e.length>0&&r&&(e+="/"),i?"/"+e:e},isAbsolute:function(e){return t(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,n=0;n<arguments.length;++n){var r=arguments[n];t(r),r.length>0&&(void 0===e?e=r:e+="/"+r)}return void 0===e?".":i.normalize(e)},relative:function(e,n){if(t(e),t(n),e===n)return"";if((e=i.resolve(e))===(n=i.resolve(n)))return"";for(var r=1;r<e.length&&47===e.charCodeAt(r);++r);for(var o=e.length,s=o-r,a=1;a<n.length&&47===n.charCodeAt(a);++a);for(var c=n.length-a,u=s<c?s:c,l=-1,d=0;d<=u;++d){if(d===u){if(c>u){if(47===n.charCodeAt(a+d))return n.slice(a+d+1);if(0===d)return n.slice(a+d)}else s>u&&(47===e.charCodeAt(r+d)?l=d:0===d&&(l=0));break}var h=e.charCodeAt(r+d);if(h!==n.charCodeAt(a+d))break;47===h&&(l=d)}var p="";for(d=r+l+1;d<=o;++d)d!==o&&47!==e.charCodeAt(d)||(0===p.length?p+="..":p+="/..");return p.length>0?p+n.slice(a+l):(a+=l,47===n.charCodeAt(a)&&++a,n.slice(a))},_makeLong:function(e){return e},dirname:function(e){if(t(e),0===e.length)return".";for(var n=e.charCodeAt(0),i=47===n,r=-1,o=!0,s=e.length-1;s>=1;--s)if(47===(n=e.charCodeAt(s))){if(!o){r=s;break}}else o=!1;return-1===r?i?"/":".":i&&1===r?"//":e.slice(0,r)},basename:function(e,n){if(void 0!==n&&"string"!=typeof n)throw new TypeError('"ext" argument must be a string');t(e);var i,r=0,o=-1,s=!0;if(void 0!==n&&n.length>0&&n.length<=e.length){if(n.length===e.length&&n===e)return"";var a=n.length-1,c=-1;for(i=e.length-1;i>=0;--i){var u=e.charCodeAt(i);if(47===u){if(!s){r=i+1;break}}else-1===c&&(s=!1,c=i+1),a>=0&&(u===n.charCodeAt(a)?-1==--a&&(o=i):(a=-1,o=c))}return r===o?o=c:-1===o&&(o=e.length),e.slice(r,o)}for(i=e.length-1;i>=0;--i)if(47===e.charCodeAt(i)){if(!s){r=i+1;break}}else-1===o&&(s=!1,o=i+1);return-1===o?"":e.slice(r,o)},extname:function(e){t(e);for(var n=-1,i=0,r=-1,o=!0,s=0,a=e.length-1;a>=0;--a){var c=e.charCodeAt(a);if(47!==c)-1===r&&(o=!1,r=a+1),46===c?-1===n?n=a:1!==s&&(s=1):-1!==n&&(s=-1);else if(!o){i=a+1;break}}return-1===n||-1===r||0===s||1===s&&n===r-1&&n===i+1?"":e.slice(n,r)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var n=t.dir||t.root,i=t.base||(t.name||"")+(t.ext||"");return n?n===t.root?n+i:n+"/"+i:i}(0,e)},parse:function(e){t(e);var n={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return n;var i,r=e.charCodeAt(0),o=47===r;o?(n.root="/",i=1):i=0;for(var s=-1,a=0,c=-1,u=!0,l=e.length-1,d=0;l>=i;--l)if(47!==(r=e.charCodeAt(l)))-1===c&&(u=!1,c=l+1),46===r?-1===s?s=l:1!==d&&(d=1):-1!==s&&(d=-1);else if(!u){a=l+1;break}return-1===s||-1===c||0===d||1===d&&s===c-1&&s===a+1?-1!==c&&(n.base=n.name=0===a&&o?e.slice(1,c):e.slice(a,c)):(0===a&&o?(n.name=e.slice(1,s),n.base=e.slice(1,c)):(n.name=e.slice(a,s),n.base=e.slice(a,c)),n.ext=e.slice(s,c)),a>0?n.dir=e.slice(0,a-1):o&&(n.dir="/"),n},sep:"/",delimiter:":",win32:null,posix:null};i.posix=i,e.exports=i},447:(e,t,n)=>{var i;if(n.r(t),n.d(t,{URI:()=>f,Utils:()=>S}),"object"==typeof process)i="win32"===process.platform;else if("object"==typeof navigator){var r=navigator.userAgent;i=r.indexOf("Windows")>=0}var o,s,a=(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),c=/^\w[\w\d+.-]*$/,u=/^\//,l=/^\/\//,d="",h="/",p=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,f=function(){function e(e,t,n,i,r,o){void 0===o&&(o=!1),"object"==typeof e?(this.scheme=e.scheme||d,this.authority=e.authority||d,this.path=e.path||d,this.query=e.query||d,this.fragment=e.fragment||d):(this.scheme=function(e,t){return e||t?e:"file"}(e,o),this.authority=t||d,this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==h&&(t=h+t):t=h}return t}(this.scheme,n||d),this.query=i||d,this.fragment=r||d,function(e,t){if(!e.scheme&&t)throw new Error('[UriError]: Scheme is missing: {scheme: "", authority: "'+e.authority+'", path: "'+e.path+'", query: "'+e.query+'", fragment: "'+e.fragment+'"}');if(e.scheme&&!c.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!u.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(l.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}(this,o))}return e.isUri=function(t){return t instanceof e||!!t&&"string"==typeof t.authority&&"string"==typeof t.fragment&&"string"==typeof t.path&&"string"==typeof t.query&&"string"==typeof t.scheme&&"function"==typeof t.fsPath&&"function"==typeof t.with&&"function"==typeof t.toString},Object.defineProperty(e.prototype,"fsPath",{get:function(){return R(this,!1)},enumerable:!1,configurable:!0}),e.prototype.with=function(e){if(!e)return this;var t=e.scheme,n=e.authority,i=e.path,r=e.query,o=e.fragment;return void 0===t?t=this.scheme:null===t&&(t=d),void 0===n?n=this.authority:null===n&&(n=d),void 0===i?i=this.path:null===i&&(i=d),void 0===r?r=this.query:null===r&&(r=d),void 0===o?o=this.fragment:null===o&&(o=d),t===this.scheme&&n===this.authority&&i===this.path&&r===this.query&&o===this.fragment?this:new m(t,n,i,r,o)},e.parse=function(e,t){void 0===t&&(t=!1);var n=p.exec(e);return n?new m(n[2]||d,T(n[4]||d),T(n[5]||d),T(n[7]||d),T(n[9]||d),t):new m(d,d,d,d,d)},e.file=function(e){var t=d;if(i&&(e=e.replace(/\\/g,h)),e[0]===h&&e[1]===h){var n=e.indexOf(h,2);-1===n?(t=e.substring(2),e=h):(t=e.substring(2,n),e=e.substring(n)||h)}return new m("file",t,e,d,d)},e.from=function(e){return new m(e.scheme,e.authority,e.path,e.query,e.fragment)},e.prototype.toString=function(e){return void 0===e&&(e=!1),w(this,e)},e.prototype.toJSON=function(){return this},e.revive=function(t){if(t){if(t instanceof e)return t;var n=new m(t);return n._formatted=t.external,n._fsPath=t._sep===g?t.fsPath:null,n}return t},e}(),g=i?1:void 0,m=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._formatted=null,t._fsPath=null,t}return a(t,e),Object.defineProperty(t.prototype,"fsPath",{get:function(){return this._fsPath||(this._fsPath=R(this,!1)),this._fsPath},enumerable:!1,configurable:!0}),t.prototype.toString=function(e){return void 0===e&&(e=!1),e?w(this,!0):(this._formatted||(this._formatted=w(this,!1)),this._formatted)},t.prototype.toJSON=function(){var e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=g),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e},t}(f),v=((s={})[58]="%3A",s[47]="%2F",s[63]="%3F",s[35]="%23",s[91]="%5B",s[93]="%5D",s[64]="%40",s[33]="%21",s[36]="%24",s[38]="%26",s[39]="%27",s[40]="%28",s[41]="%29",s[42]="%2A",s[43]="%2B",s[44]="%2C",s[59]="%3B",s[61]="%3D",s[32]="%20",s);function y(e,t){for(var n=void 0,i=-1,r=0;r<e.length;r++){var o=e.charCodeAt(r);if(o>=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||45===o||46===o||95===o||126===o||t&&47===o)-1!==i&&(n+=encodeURIComponent(e.substring(i,r)),i=-1),void 0!==n&&(n+=e.charAt(r));else{void 0===n&&(n=e.substr(0,r));var s=v[o];void 0!==s?(-1!==i&&(n+=encodeURIComponent(e.substring(i,r)),i=-1),n+=s):-1===i&&(i=r)}}return-1!==i&&(n+=encodeURIComponent(e.substring(i))),void 0!==n?n:e}function C(e){for(var t=void 0,n=0;n<e.length;n++){var i=e.charCodeAt(n);35===i||63===i?(void 0===t&&(t=e.substr(0,n)),t+=v[i]):void 0!==t&&(t+=e[n])}return void 0!==t?t:e}function R(e,t){var n;return n=e.authority&&e.path.length>1&&"file"===e.scheme?"//"+e.authority+e.path:47===e.path.charCodeAt(0)&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&58===e.path.charCodeAt(2)?t?e.path.substr(1):e.path[1].toLowerCase()+e.path.substr(2):e.path,i&&(n=n.replace(/\//g,"\\")),n}function w(e,t){var n=t?C:y,i="",r=e.scheme,o=e.authority,s=e.path,a=e.query,c=e.fragment;if(r&&(i+=r,i+=":"),(o||"file"===r)&&(i+=h,i+=h),o){var u=o.indexOf("@");if(-1!==u){var l=o.substr(0,u);o=o.substr(u+1),-1===(u=l.indexOf(":"))?i+=n(l,!1):(i+=n(l.substr(0,u),!1),i+=":",i+=n(l.substr(u+1),!1)),i+="@"}-1===(u=(o=o.toLowerCase()).indexOf(":"))?i+=n(o,!1):(i+=n(o.substr(0,u),!1),i+=o.substr(u))}if(s){if(s.length>=3&&47===s.charCodeAt(0)&&58===s.charCodeAt(2))(d=s.charCodeAt(1))>=65&&d<=90&&(s="/"+String.fromCharCode(d+32)+":"+s.substr(3));else if(s.length>=2&&58===s.charCodeAt(1)){var d;(d=s.charCodeAt(0))>=65&&d<=90&&(s=String.fromCharCode(d+32)+":"+s.substr(2))}i+=n(s,!0)}return a&&(i+="?",i+=n(a,!1)),c&&(i+="#",i+=t?c:y(c,!1)),i}var b=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function T(e){return e.match(b)?e.replace(b,(function(e){return function e(t){try{return decodeURIComponent(t)}catch(n){return t.length>3?t.substr(0,3)+e(t.substr(3)):t}}(e)})):e}var S,_=n(470),P=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var i=Array(e),r=0;for(t=0;t<n;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,r++)i[r]=o[s];return i},D=_.posix||_;!function(e){e.joinPath=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return e.with({path:D.join.apply(D,P([e.path],t))})},e.resolvePath=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var i=e.path||"/";return e.with({path:D.resolve.apply(D,P([i],t))})},e.dirname=function(e){var t=D.dirname(e.path);return 1===t.length&&46===t.charCodeAt(0)?e:e.with({path:t})},e.basename=function(e){return D.basename(e.path)},e.extname=function(e){return D.extname(e.path)}}(S||(S={}))}},t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={exports:{}};return e[i](r,r.exports,n),r.exports}return n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n(447)})();const{URI:r,Utils:o}=i},function(e,t,n){"use strict";e.exports=n(22)}]));
  //# sourceMappingURL=https://ticino.blob.core.windows.net/sourcemaps/c3f126316369cd610563c75b1b1725e0679adfb3/extensions/css-language-features/client/dist/node/cssClientMain.js.map