Skip to content

Instantly share code, notes, and snippets.

@airglow923
Created February 26, 2021 04:00
Show Gist options
  • Save airglow923/4e4a0a686d66fefb88f5d59714f879ab to your computer and use it in GitHub Desktop.
Save airglow923/4e4a0a686d66fefb88f5d59714f879ab to your computer and use it in GitHub Desktop.
/home/hyundeok/git/lsp-examples/vue/node_modules/vls/dist/vueServerMain.js:1
"use strict";var e=require("util"),t=require("path"),n=require("os"),r=require("crypto"),o=require("net"),i=require("url"),s=require("fs"),a=require("child_process"),c=require("./vls.js");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=u(e),d=u(t),f=u(n),h=u(r),p=u(o),g=u(i),m=u(s),y=u(a),v="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function R(e){if(e.__esModule)return e;var t=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(e).forEach((function(n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})})),t}function b(e){var t={exports:{}};return e(t,t.exports),t.exports}var _=b((function(e,t){function n(e){return"string"==typeof e||e instanceof String}function r(e){return"function"==typeof e}function o(e){return Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),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=n,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=>n(e))},t.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)},t.thenable=function(e){return e&&r(e.then)}}));let T;function w(){if(void 0===T)throw new Error("No runtime abstraction layer installed");return T}!function(e){e.install=function(e){if(void 0===e)throw new Error("No runtime abstraction layer provided");T=e}}(w||(w={}));var P=w,C=Object.defineProperty({default:P},"__esModule",{value:!0}),k=b((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Disposable=void 0,(t.Disposable||(t.Disposable={})).create=function(e){return{dispose:e}}})),q=b((function(e,t){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,r=0;e:for(;t<this._chunks.length;){const o=this._chunks[t];for(n=0;n<o.length;){switch(o[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++}r+=o.byteLength,t++}if(4!==e)return;const o=this._read(r+n),i=new Map,s=this.toString(o,"ascii").split("\r\n");if(s.length<2)return i;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 r=t.substr(0,n),o=t.substr(n+1).trim();i.set(r,o)}return i}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 r=this._chunks[0];if(r.byteLength>e){const o=r.slice(0,e);t.set(o,n),n+=e,this._chunks[0]=r.slice(e),this._totalLength-=e,e-=e}else t.set(r,n),n+=r.byteLength,this._chunks.shift(),this._totalLength-=r.byteLength,e-=r.byteLength}return t}}}));class D extends q.AbstractMessageBuffer{constructor(e="utf-8"){super(e)}emptyBuffer(){return D.emptyBuffer}fromString(e,t){return Buffer.from(e,t)}toString(e,t){return e instanceof Buffer?e.toString(t):new l.default.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)}}D.emptyBuffer=Buffer.allocUnsafe(0);class S{constructor(e){this.stream=e}onClose(e){return this.stream.on("close",e),k.Disposable.create(()=>this.stream.off("close",e))}onError(e){return this.stream.on("error",e),k.Disposable.create(()=>this.stream.off("error",e))}onEnd(e){return this.stream.on("end",e),k.Disposable.create(()=>this.stream.off("end",e))}onData(e){return this.stream.on("data",e),k.Disposable.create(()=>this.stream.off("data",e))}}class x{constructor(e){this.stream=e}onClose(e){return this.stream.on("close",e),k.Disposable.create(()=>this.stream.off("close",e))}onError(e){return this.stream.on("error",e),k.Disposable.create(()=>this.stream.off("error",e))}onEnd(e){return this.stream.on("end",e),k.Disposable.create(()=>this.stream.off("end",e))}write(e,t){return new Promise((n,r)=>{const o=e=>{null==e?n():r(e)};"string"==typeof e?this.stream.write(e,t,o):this.stream.write(e,o)})}end(){this.stream.end()}}const E=Object.freeze({messageBuffer:Object.freeze({create:e=>new D(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 l.default.TextDecoder(t.charset).decode(e)))}catch(e){return Promise.reject(e)}}})}),stream:Object.freeze({asReadableStream:e=>new S(e),asWritableStream:e=>new x(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 O(){return E}!function(e){e.install=function(){C.default.install(E)}}(O||(O={}));var N,M,j,F,W,L,I,A,H,z,U,$,B,K,V,J,G,X,Y,Q,Z,ee,te,ne,re,oe,ie=O,se=Object.defineProperty({default:ie},"__esModule",{value:!0}),ae=b((function(e,t){function n(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=n,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=>n(e))}})),ce=b((function(e,t){var n;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,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}(n=t.ErrorCodes||(t.ErrorCodes={}));class r extends Error{constructor(e,t,o){super(t),this.code=ae.number(e)?e:n.UnknownErrorCode,this.data=o,Object.setPrototypeOf(this,r.prototype)}toJson(){return{code:this.code,message:this.message,data:this.data}}}t.ResponseError=r;class o{constructor(e){this.kind=e}static is(e){return e===o.auto||e===o.byName||e===o.byPosition}toString(){return this.kind}}t.ParameterStructures=o,o.auto=new o("auto"),o.byPosition=new o("byPosition"),o.byName=new o("byName");class i{constructor(e,t){this.method=e,this.numberOfParams=t}get parameterStructures(){return o.auto}}t.AbstractMessageSignature=i;t.RequestType0=class extends i{constructor(e){super(e,0)}};t.RequestType=class extends i{constructor(e,t=o.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};t.RequestType1=class extends i{constructor(e,t=o.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};t.RequestType2=class extends i{constructor(e){super(e,2)}};t.RequestType3=class extends i{constructor(e){super(e,3)}};t.RequestType4=class extends i{constructor(e){super(e,4)}};t.RequestType5=class extends i{constructor(e){super(e,5)}};t.RequestType6=class extends i{constructor(e){super(e,6)}};t.RequestType7=class extends i{constructor(e){super(e,7)}};t.RequestType8=class extends i{constructor(e){super(e,8)}};t.RequestType9=class extends i{constructor(e){super(e,9)}};t.NotificationType=class extends i{constructor(e,t=o.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};t.NotificationType0=class extends i{constructor(e){super(e,0)}};t.NotificationType1=class extends i{constructor(e,t=o.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};t.NotificationType2=class extends i{constructor(e){super(e,2)}};t.NotificationType3=class extends i{constructor(e){super(e,3)}};t.NotificationType4=class extends i{constructor(e){super(e,4)}};t.NotificationType5=class extends i{constructor(e){super(e,5)}};t.NotificationType6=class extends i{constructor(e){super(e,6)}};t.NotificationType7=class extends i{constructor(e){super(e,7)}};t.NotificationType8=class extends i{constructor(e){super(e,8)}};t.NotificationType9=class extends i{constructor(e){super(e,9)}},t.isRequestMessage=function(e){const t=e;return t&&ae.string(t.method)&&(ae.string(t.id)||ae.number(t.id))},t.isNotificationMessage=function(e){const t=e;return t&&ae.string(t.method)&&void 0===e.id},t.isResponseMessage=function(e){const t=e;return t&&(void 0!==t.result||!!t.error)&&(ae.string(t.id)||ae.number(t.id)||null===t.id)}})),ue=b((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Emitter=t.Event=void 0,function(e){const t={dispose(){}};e.None=function(){return t}}(t.Event||(t.Event={}));class n{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 r=0,o=this._callbacks.length;r<o;r++)if(this._callbacks[r]===e){if(this._contexts[r]===t)return this._callbacks.splice(r,1),void this._contexts.splice(r,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,i=n.length;o<i;o++)try{t.push(n[o].apply(r[o],e))}catch(e){C.default().console.error(e)}return t}isEmpty(){return!this._callbacks||0===this._callbacks.length}dispose(){this._callbacks=void 0,this._contexts=void 0}}class r{constructor(e){this._options=e}get event(){return this._event||(this._event=(e,t,o)=>{this._callbacks||(this._callbacks=new n),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=r._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(o)&&o.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=r,r._noop=function(){}})),le=b((function(e,t){var n;Object.defineProperty(t,"__esModule",{value:!0}),t.CancellationTokenSource=t.CancellationToken=void 0,function(e){e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:ue.Event.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:ue.Event.None}),e.is=function(t){const n=t;return n&&(n===e.None||n===e.Cancelled||ae.boolean(n.isCancellationRequested)&&!!n.onCancellationRequested)}}(n=t.CancellationToken||(t.CancellationToken={}));const r=Object.freeze((function(e,t){const n=C.default().timer.setTimeout(e.bind(t),0);return{dispose(){C.default().timer.clearTimeout(n)}}}));class o{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?r:(this._emitter||(this._emitter=new ue.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 o),this._token}cancel(){this._token?this._token.cancel():this._token=n.Cancelled}dispose(){this._token?this._token instanceof o&&this._token.dispose():this._token=n.None}}})),de=b((function(e,t){var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ReadableStreamMessageReader=t.AbstractMessageReader=t.MessageReader=void 0,(t.MessageReader||(t.MessageReader={})).is=function(e){let t=e;return t&&ae.func(t.listen)&&ae.func(t.dispose)&&ae.func(t.onError)&&ae.func(t.onClose)&&ae.func(t.onPartialMessage)};class r{constructor(){this.errorEmitter=new ue.Emitter,this.closeEmitter=new ue.Emitter,this.partialMessageEmitter=new ue.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: "+(ae.string(e.message)?e.message:"unknown"))}}t.AbstractMessageReader=r,function(e){e.fromOptions=function(e){var t;let n,r;const o=new Map;let i;const s=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&&(i=e.contentTypeDecoder,s.set(i.name,i)),void 0!==e.contentTypeDecoders)for(const t of e.contentTypeDecoders)s.set(t.name,t)}return void 0===i&&(i=C.default().applicationJson.decoder,s.set(i.name,i)),{charset:n,contentDecoder:r,contentDecoders:o,contentTypeDecoder:i,contentTypeDecoders:s}}}(n||(n={}));t.ReadableStreamMessageReader=class extends r{constructor(e,t){super(),this.readable=e,this.options=n.fromOptions(t),this.buffer=C.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&&(C.default().timer.clearTimeout(this.partialMessageTimer),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),this._partialMessageTimeout<=0||(this.partialMessageTimer=C.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))}}})),fe=b((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Semaphore=void 0;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&&C.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()}}}})),he=b((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.WriteableStreamMessageWriter=t.AbstractMessageWriter=t.MessageWriter=void 0;var n;(t.MessageWriter||(t.MessageWriter={})).is=function(e){let t=e;return t&&ae.func(t.dispose)&&ae.func(t.onClose)&&ae.func(t.onError)&&ae.func(t.write)};class r{constructor(){this.errorEmitter=new ue.Emitter,this.closeEmitter=new ue.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: "+(ae.string(e.message)?e.message:"unknown"))}}t.AbstractMessageWriter=r,function(e){e.fromOptions=function(e){var t,n;return void 0===e||"string"==typeof e?{charset:null!=e?e:"utf-8",contentTypeEncoder:C.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:C.default().applicationJson.encoder}}}(n||(n={}));t.WriteableStreamMessageWriter=class extends r{constructor(e,t){super(),this.writable=e,this.options=n.fromOptions(t),this.errorCount=0,this.writeSemaphore=new fe.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()}}})),pe=b((function(e,t){var n;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}(n=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=n.None){const r=this._map.get(e);if(r)return t!==n.None&&this.touch(r,t),r.value}set(e,t,r=n.None){let o=this._map.get(e);if(o)o.value=t,r!==n.None&&this.touch(o,r);else{switch(o={key:e,value:t,next:void 0,previous:void 0},r){case n.None:this.addItemLast(o);break;case n.First:this.addItemFirst(o);break;case n.Last:default:this.addItemLast(o)}this._map.set(e,o),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 r=this._head;for(;r;){if(t?e.bind(t)(r.value,r.key,this):e(r.value,r.key,this),this._state!==n)throw new Error("LinkedMap got modified during iteration.");r=r.next}}keys(){const e=this,t=this._state;let n=this._head;const r={[Symbol.iterator]:()=>r,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 r}values(){const e=this,t=this._state;let n=this._head;const r={[Symbol.iterator]:()=>r,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 r}entries(){const e=this,t=this._state;let n=this._head;const r={[Symbol.iterator]:()=>r,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 r}[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===n.First||t===n.Last)if(t===n.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===n.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=n.AsNew){return super.get(e,t)}peek(e){return super.get(e,n.None)}set(e,t){return super.set(e,t,n.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}})),ge=b((function(e,t){var n,r,o,i,s,a,c,u,l,d,f,h,p;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,function(e){e.type=new ce.NotificationType("$/cancelRequest")}(n||(n={})),function(e){e.type=new ce.NotificationType("$/progress")}(r||(r={}));t.ProgressType=class{constructor(){}},function(e){e.is=function(e){return ae.func(e)}}(o||(o={})),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"}(i=t.Trace||(t.Trace={})),function(e){e.fromString=function(t){if(!ae.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"}}}(i=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}}(s=t.TraceFormat||(t.TraceFormat={})),function(e){e.type=new ce.NotificationType("$/setTrace")}(a=t.SetTraceNotification||(t.SetTraceNotification={})),function(e){e.type=new ce.NotificationType("$/logTrace")}(c=t.LogTraceNotification||(t.LogTraceNotification={})),function(e){e[e.Closed=1]="Closed",e[e.Disposed=2]="Disposed",e[e.AlreadyListening=3]="AlreadyListening"}(u=t.ConnectionErrors||(t.ConnectionErrors={}));class g extends Error{constructor(e,t){super(t),this.code=e,Object.setPrototypeOf(this,g.prototype)}}t.ConnectionError=g,function(e){e.is=function(e){const t=e;return t&&ae.func(t.cancelUndispatched)}}(l=t.ConnectionStrategy||(t.ConnectionStrategy={})),function(e){e.Message=Object.freeze({createCancellationTokenSource:e=>new le.CancellationTokenSource}),e.is=function(e){const t=e;return t&&ae.func(t.createCancellationTokenSource)}}(d=t.CancellationReceiverStrategy||(t.CancellationReceiverStrategy={})),function(e){e.Message=Object.freeze({sendCancellation(e,t){e.sendNotification(n.type,{id:t})},cleanup(e){}}),e.is=function(e){const t=e;return t&&ae.func(t.sendCancellation)&&ae.func(t.cleanup)}}(f=t.CancellationSenderStrategy||(t.CancellationSenderStrategy={})),function(e){e.Message=Object.freeze({receiver:d.Message,sender:f.Message}),e.is=function(e){const t=e;return t&&d.is(t.receiver)&&f.is(t.sender)}}(h=t.CancellationStrategy||(t.CancellationStrategy={})),(t.ConnectionOptions||(t.ConnectionOptions={})).is=function(e){const t=e;return t&&(h.is(t.cancellationStrategy)||l.is(t.connectionStrategy))},function(e){e[e.New=1]="New",e[e.Listening=2]="Listening",e[e.Closed=3]="Closed",e[e.Disposed=4]="Disposed"}(p||(p={})),t.createMessageConnection=function(e,l,d,f){const m=void 0!==d?d:t.NullLogger;let y=0,v=0,R=0;const b="2.0";let _=void 0;const T=Object.create(null);let w=void 0;const P=Object.create(null),k=new Map;let q,D,S=new pe.LinkedMap,x=Object.create(null),E=Object.create(null),O=i.Off,N=s.Text,M=p.New;const j=new ue.Emitter,F=new ue.Emitter,W=new ue.Emitter,L=new ue.Emitter,I=new ue.Emitter,A=f&&f.cancellationStrategy?f.cancellationStrategy:h.Message;function H(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 z(e,t){var n;ce.isRequestMessage(t)?e.set(H(t.id),t):ce.isResponseMessage(t)?e.set(null===(n=t.id)?"res-unknown-"+(++R).toString():"res-"+n.toString(),t):e.set("not-"+(++v).toString(),t)}function U(e){}function $(){return M===p.Listening}function B(){return M===p.Closed}function K(){return M===p.Disposed}function V(){M!==p.New&&M!==p.Listening||(M=p.Closed,F.fire(void 0))}function J(){q||0===S.size||(q=C.default().timer.setImmediate(()=>{q=void 0,function(){if(0===S.size)return;const e=S.shift();try{ce.isRequestMessage(e)?function(e){if(K())return;function t(t,n,r){const o={jsonrpc:b,id:e.id};t instanceof ce.ResponseError?o.error=t.toJson():o.result=void 0===t?null:t,X(o,n,r),l.write(o)}function n(t,n,r){const o={jsonrpc:b,id:e.id,error:t.toJson()};X(o,n,r),l.write(o)}function r(t,n,r){void 0===t&&(t=null);const o={jsonrpc:b,id:e.id,result:t};X(o,n,r),l.write(o)}!function(e){if(O===i.Off||!D)return;if(N===s.Text){let t=void 0;O===i.Verbose&&e.params&&(t=`Params: ${JSON.stringify(e.params,null,4)}\n\n`),D.log(`Received request '${e.method} - (${e.id})'.`,t)}else Y("receive-request",e)}(e);const o=T[e.method];let a,c;o&&(a=o.type,c=o.handler);const u=Date.now();if(c||_){const o=String(e.id),i=A.receiver.createCancellationTokenSource(o);E[o]=i;try{let s;if(c)if(void 0===e.params){if(void 0!==a&&0!==a.numberOfParams)return void n(new ce.ResponseError(ce.ErrorCodes.InvalidParams,`Request ${e.method} defines ${a.numberOfParams} params but recevied none.`),e.method,u);s=c(i.token)}else if(Array.isArray(e.params)){if(void 0!==a&&a.parameterStructures===ce.ParameterStructures.byName)return void n(new ce.ResponseError(ce.ErrorCodes.InvalidParams,`Request ${e.method} defines parameters by name but received parameters by position`),e.method,u);s=c(...e.params,i.token)}else{if(void 0!==a&&a.parameterStructures===ce.ParameterStructures.byPosition)return void n(new ce.ResponseError(ce.ErrorCodes.InvalidParams,`Request ${e.method} defines parameters by position but received parameters by name`),e.method,u);s=c(e.params,i.token)}else _&&(s=_(e.method,e.params,i.token));const l=s;s?l.then?l.then(n=>{delete E[o],t(n,e.method,u)},t=>{delete E[o],t instanceof ce.ResponseError?n(t,e.method,u):t&&ae.string(t.message)?n(new ce.ResponseError(ce.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${t.message}`),e.method,u):n(new ce.ResponseError(ce.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,u)}):(delete E[o],t(s,e.method,u)):(delete E[o],r(s,e.method,u))}catch(r){delete E[o],r instanceof ce.ResponseError?t(r,e.method,u):r&&ae.string(r.message)?n(new ce.ResponseError(ce.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${r.message}`),e.method,u):n(new ce.ResponseError(ce.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,u)}}else n(new ce.ResponseError(ce.ErrorCodes.MethodNotFound,"Unhandled method "+e.method),e.method,u)}(e):ce.isNotificationMessage(e)?function(e){if(K())return;let t,r=void 0;if(e.method===n.type.method)t=e=>{const t=e.id,n=E[String(t)];n&&n.cancel()};else{const n=P[e.method];n&&(t=n.handler,r=n.type)}if(t||w)try{!function(e){if(O===i.Off||!D||e.method===c.type.method)return;if(N===s.Text){let t=void 0;O===i.Verbose&&(t=e.params?`Params: ${JSON.stringify(e.params,null,4)}\n\n`:"No parameters provided.\n\n"),D.log(`Received notification '${e.method}'.`,t)}else Y("receive-notification",e)}(e),t?void 0===e.params?(void 0!==r&&0!==r.numberOfParams&&r.parameterStructures!==ce.ParameterStructures.byName&&m.error(`Notification ${e.method} defines ${r.numberOfParams} params but recevied none.`),t()):Array.isArray(e.params)?(void 0!==r&&(r.parameterStructures===ce.ParameterStructures.byName&&m.error(`Notification ${e.method} defines parameters by name but received parameters by position`),r.numberOfParams!==e.params.length&&m.error(`Notification ${e.method} defines ${r.numberOfParams} params but received ${e.params.length} argumennts`)),t(...e.params)):(void 0!==r&&r.parameterStructures===ce.ParameterStructures.byPosition&&m.error(`Notification ${e.method} defines parameters by position but received parameters by name`),t(e.params)):w&&w(e.method,e.params)}catch(t){t.message?m.error(`Notification handler '${e.method}' failed with message: ${t.message}`):m.error(`Notification handler '${e.method}' failed unexpectedly.`)}else W.fire(e)}(e):ce.isResponseMessage(e)?function(e){if(K())return;if(null===e.id)e.error?m.error("Received response message without id: Error is: \n"+JSON.stringify(e.error,void 0,4)):m.error("Received response message without id. No further error information provided.");else{const t=String(e.id),n=x[t];if(function(e,t){if(O===i.Off||!D)return;if(N===s.Text){let n=void 0;if(O===i.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 r=e.error?` Request failed: ${e.error.message} (${e.error.code}).`:"";D.log(`Received response '${t.method} - (${e.id})' in ${Date.now()-t.timerStart}ms.${r}`,n)}else D.log(`Received response ${e.id} without active response promise.`,n)}else Y("receive-response",e)}(e,n),n){delete x[t];try{if(e.error){const t=e.error;n.reject(new ce.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?m.error(`Response handler '${n.method}' failed with message: ${e.message}`):m.error(`Response handler '${n.method}' failed unexpectedly.`)}}}}(e):function(e){if(!e)return void m.error("Received empty message.");m.error("Received message which is neither a response nor a notification message:\n"+JSON.stringify(e,null,4));const t=e;if(ae.string(t.id)||ae.number(t.id)){const e=String(t.id),n=x[e];n&&n.reject(new Error("The received response has neither a result nor an error property."))}}(e)}finally{J()}}()}))}e.onClose(V),e.onError((function(e){j.fire([e,void 0,void 0])})),l.onClose(V),l.onError((function(e){j.fire(e)}));const G=e=>{try{if(ce.isNotificationMessage(e)&&e.method===n.type.method){const t=H(e.params.id),n=S.get(t);if(ce.isRequestMessage(n)){const r=null==f?void 0:f.connectionStrategy,o=r&&r.cancelUndispatched?r.cancelUndispatched(n,U):void 0;if(o&&(void 0!==o.error||void 0!==o.result))return S.delete(t),o.id=n.id,X(o,e.method,Date.now()),void l.write(o)}}z(S,e)}finally{J()}};function X(e,t,n){if(O!==i.Off&&D)if(N===s.Text){let r=void 0;O===i.Verbose&&(e.error&&e.error.data?r=`Error data: ${JSON.stringify(e.error.data,null,4)}\n\n`:e.result?r=`Result: ${JSON.stringify(e.result,null,4)}\n\n`:void 0===e.error&&(r="No result returned.\n\n")),D.log(`Sending response '${t} - (${e.id})'. Processing request took ${Date.now()-n}ms`,r)}else Y("send-response",e)}function Y(e,t){if(!D||O===i.Off)return;const n={isLSPMessage:!0,type:e,message:t,timestamp:Date.now()};D.log(n)}function Q(){if(B())throw new g(u.Closed,"Connection is closed.");if(K())throw new g(u.Disposed,"Connection is disposed.")}function Z(e){return void 0===e?null:e}function ee(e){return null===e?void 0:e}function te(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function ne(e,t){switch(e){case ce.ParameterStructures.auto:return te(t)?ee(t):[Z(t)];case ce.ParameterStructures.byName:if(!te(t))throw new Error("Recevied parameters by name but param is not an object literal.");return ee(t);case ce.ParameterStructures.byPosition:return[Z(t)];default:throw new Error("Unknown parameter structure "+e.toString())}}function re(e,t){let n;const r=e.numberOfParams;switch(r){case 0:n=void 0;break;case 1:n=ne(e.parameterStructures,t[0]);break;default:n=[];for(let e=0;e<t.length&&e<r;e++)n.push(Z(t[e]));if(t.length<r)for(let e=t.length;e<r;e++)n.push(null)}return n}const oe={sendNotification:(e,...t)=>{let n,r;if(Q(),ae.string(e)){n=e;const o=t[0];let i=0,s=ce.ParameterStructures.auto;ce.ParameterStructures.is(o)&&(i=1,s=o);let a=t.length;const c=a-i;switch(c){case 0:r=void 0;break;case 1:r=ne(s,t[i]);break;default:if(s===ce.ParameterStructures.byName)throw new Error(`Recevied ${c} parameters for 'by Name' notification parameter structure.`);r=t.slice(i,a).map(e=>Z(e))}}else{const o=t;n=e.method,r=re(e,o)}const o={jsonrpc:b,method:n,params:r};!function(e){if(O!==i.Off&&D)if(N===s.Text){let t=void 0;O===i.Verbose&&(t=e.params?`Params: ${JSON.stringify(e.params,null,4)}\n\n`:"No parameters provided.\n\n"),D.log(`Sending notification '${e.method}'.`,t)}else Y("send-notification",e)}(o),l.write(o)},onNotification:(e,t)=>{let n;return Q(),ae.func(e)?w=e:t&&(ae.string(e)?(n=e,P[e]={type:void 0,handler:t}):(n=e.method,P[e.method]={type:e,handler:t})),{dispose:()=>{void 0!==n?delete P[n]:w=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)=>{oe.sendNotification(r.type,{token:t,value:n})},onUnhandledProgress:L.event,sendRequest:(e,...t)=>{let n,r;Q(),function(){if(!$())throw new Error("Call listen() first.")}();let o=void 0;if(ae.string(e)){n=e;const i=t[0],s=t[t.length-1];let a=0,c=ce.ParameterStructures.auto;ce.ParameterStructures.is(i)&&(a=1,c=i);let u=t.length;le.CancellationToken.is(s)&&(u-=1,o=s);const l=u-a;switch(l){case 0:r=void 0;break;case 1:r=ne(c,t[a]);break;default:if(c===ce.ParameterStructures.byName)throw new Error(`Recevied ${l} parameters for 'by Name' request parameter structure.`);r=t.slice(a,u).map(e=>Z(e))}}else{const i=t;n=e.method,r=re(e,i);const s=e.numberOfParams;o=le.CancellationToken.is(i[s])?i[s]:void 0}const a=y++;let c;o&&(c=o.onCancellationRequested(()=>{A.sender.sendCancellation(oe,a)}));return new Promise((e,t)=>{const o={jsonrpc:b,id:a,method:n,params:r};let u={method:n,timerStart:Date.now(),resolve:t=>{e(t),A.sender.cleanup(a),null==c||c.dispose()},reject:e=>{t(e),A.sender.cleanup(a),null==c||c.dispose()}};!function(e){if(O!==i.Off&&D)if(N===s.Text){let t=void 0;O===i.Verbose&&e.params&&(t=`Params: ${JSON.stringify(e.params,null,4)}\n\n`),D.log(`Sending request '${e.method} - (${e.id})'.`,t)}else Y("send-request",e)}(o);try{l.write(o)}catch(e){u.reject(new ce.ResponseError(ce.ErrorCodes.MessageWriteError,e.message?e.message:"Unknown reason")),u=null}u&&(x[String(a)]=u)})},onRequest:(e,t)=>{Q();let n=null;return o.is(e)?(n=void 0,_=e):ae.string(e)?(n=null,void 0!==t&&(n=e,T[e]={handler:t,type:void 0})):void 0!==t&&(n=e.method,T[e.method]={type:e,handler:t}),{dispose:()=>{null!==n&&(void 0!==n?delete T[n]:_=void 0)}}},trace:(e,t,n)=>{let r=!1,o=s.Text;void 0!==n&&(ae.boolean(n)?r=n:(r=n.sendNotification||!1,o=n.traceFormat||s.Text)),O=e,N=o,D=O===i.Off?void 0:t,!r||B()||K()||oe.sendNotification(a.type,{value:i.toString(e)})},onError:j.event,onClose:F.event,onUnhandledNotification:W.event,onDispose:I.event,end:()=>{l.end()},dispose:()=>{if(K())return;M=p.Disposed,I.fire(void 0);const t=new Error("Connection got disposed.");Object.keys(x).forEach(e=>{x[e].reject(t)}),x=Object.create(null),E=Object.create(null),S=new pe.LinkedMap,ae.func(l.dispose)&&l.dispose(),ae.func(e.dispose)&&e.dispose()},listen:()=>{Q(),function(){if($())throw new g(u.AlreadyListening,"Connection is already listening")}(),M=p.Listening,e.listen(G)},inspect:()=>{C.default().console.log("inspect")}};return oe.onNotification(c.type,e=>{O!==i.Off&&D&&D.log(e.message,O===i.Verbose?e.verbose:void 0)}),oe.onNotification(r.type,e=>{const t=k.get(e.token);t?t(e.value):L.fire(e)}),oe}})),me=b((function(e,t){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,Object.defineProperty(t,"RequestType",{enumerable:!0,get:function(){return ce.RequestType}}),Object.defineProperty(t,"RequestType0",{enumerable:!0,get:function(){return ce.RequestType0}}),Object.defineProperty(t,"RequestType1",{enumerable:!0,get:function(){return ce.RequestType1}}),Object.defineProperty(t,"RequestType2",{enumerable:!0,get:function(){return ce.RequestType2}}),Object.defineProperty(t,"RequestType3",{enumerable:!0,get:function(){return ce.RequestType3}}),Object.defineProperty(t,"RequestType4",{enumerable:!0,get:function(){return ce.RequestType4}}),Object.defineProperty(t,"RequestType5",{enumerable:!0,get:function(){return ce.RequestType5}}),Object.defineProperty(t,"RequestType6",{enumerable:!0,get:function(){return ce.RequestType6}}),Object.defineProperty(t,"RequestType7",{enumerable:!0,get:function(){return ce.RequestType7}}),Object.defineProperty(t,"RequestType8",{enumerable:!0,get:function(){return ce.RequestType8}}),Object.defineProperty(t,"RequestType9",{enumerable:!0,get:function(){return ce.RequestType9}}),Object.defineProperty(t,"ResponseError",{enumerable:!0,get:function(){return ce.ResponseError}}),Object.defineProperty(t,"ErrorCodes",{enumerable:!0,get:function(){return ce.ErrorCodes}}),Object.defineProperty(t,"NotificationType",{enumerable:!0,get:function(){return ce.NotificationType}}),Object.defineProperty(t,"NotificationType0",{enumerable:!0,get:function(){return ce.NotificationType0}}),Object.defineProperty(t,"NotificationType1",{enumerable:!0,get:function(){return ce.NotificationType1}}),Object.defineProperty(t,"NotificationType2",{enumerable:!0,get:function(){return ce.NotificationType2}}),Object.defineProperty(t,"NotificationType3",{enumerable:!0,get:function(){return ce.NotificationType3}}),Object.defineProperty(t,"NotificationType4",{enumerable:!0,get:function(){return ce.NotificationType4}}),Object.defineProperty(t,"NotificationType5",{enumerable:!0,get:function(){return ce.NotificationType5}}),Object.defineProperty(t,"NotificationType6",{enumerable:!0,get:function(){return ce.NotificationType6}}),Object.defineProperty(t,"NotificationType7",{enumerable:!0,get:function(){return ce.NotificationType7}}),Object.defineProperty(t,"NotificationType8",{enumerable:!0,get:function(){return ce.NotificationType8}}),Object.defineProperty(t,"NotificationType9",{enumerable:!0,get:function(){return ce.NotificationType9}}),Object.defineProperty(t,"ParameterStructures",{enumerable:!0,get:function(){return ce.ParameterStructures}}),Object.defineProperty(t,"Disposable",{enumerable:!0,get:function(){return k.Disposable}}),Object.defineProperty(t,"Event",{enumerable:!0,get:function(){return ue.Event}}),Object.defineProperty(t,"Emitter",{enumerable:!0,get:function(){return ue.Emitter}}),Object.defineProperty(t,"CancellationTokenSource",{enumerable:!0,get:function(){return le.CancellationTokenSource}}),Object.defineProperty(t,"CancellationToken",{enumerable:!0,get:function(){return le.CancellationToken}}),Object.defineProperty(t,"MessageReader",{enumerable:!0,get:function(){return de.MessageReader}}),Object.defineProperty(t,"AbstractMessageReader",{enumerable:!0,get:function(){return de.AbstractMessageReader}}),Object.defineProperty(t,"ReadableStreamMessageReader",{enumerable:!0,get:function(){return de.ReadableStreamMessageReader}}),Object.defineProperty(t,"MessageWriter",{enumerable:!0,get:function(){return he.MessageWriter}}),Object.defineProperty(t,"AbstractMessageWriter",{enumerable:!0,get:function(){return he.AbstractMessageWriter}}),Object.defineProperty(t,"WriteableStreamMessageWriter",{enumerable:!0,get:function(){return he.WriteableStreamMessageWriter}}),Object.defineProperty(t,"ConnectionStrategy",{enumerable:!0,get:function(){return ge.ConnectionStrategy}}),Object.defineProperty(t,"ConnectionOptions",{enumerable:!0,get:function(){return ge.ConnectionOptions}}),Object.defineProperty(t,"NullLogger",{enumerable:!0,get:function(){return ge.NullLogger}}),Object.defineProperty(t,"createMessageConnection",{enumerable:!0,get:function(){return ge.createMessageConnection}}),Object.defineProperty(t,"ProgressType",{enumerable:!0,get:function(){return ge.ProgressType}}),Object.defineProperty(t,"Trace",{enumerable:!0,get:function(){return ge.Trace}}),Object.defineProperty(t,"TraceFormat",{enumerable:!0,get:function(){return ge.TraceFormat}}),Object.defineProperty(t,"SetTraceNotification",{enumerable:!0,get:function(){return ge.SetTraceNotification}}),Object.defineProperty(t,"LogTraceNotification",{enumerable:!0,get:function(){return ge.LogTraceNotification}}),Object.defineProperty(t,"ConnectionErrors",{enumerable:!0,get:function(){return ge.ConnectionErrors}}),Object.defineProperty(t,"ConnectionError",{enumerable:!0,get:function(){return ge.ConnectionError}}),Object.defineProperty(t,"CancellationReceiverStrategy",{enumerable:!0,get:function(){return ge.CancellationReceiverStrategy}}),Object.defineProperty(t,"CancellationSenderStrategy",{enumerable:!0,get:function(){return ge.CancellationSenderStrategy}}),Object.defineProperty(t,"CancellationStrategy",{enumerable:!0,get:function(){return ge.CancellationStrategy}}),t.RAL=C.default})),ye=b((function(e,t){var n=v&&v.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),r=v&&v.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};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,se.default.install(),r(me,t);class o extends me.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),me.Disposable.create(()=>this.process.off("message",e))}}t.IPCMessageReader=o;class i extends me.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=i;class s extends me.ReadableStreamMessageReader{constructor(e,t="utf-8"){super(se.default().stream.asReadableStream(e),t)}}t.SocketMessageReader=s;class a extends me.WriteableStreamMessageWriter{constructor(e,t){super(se.default().stream.asWritableStream(e),t),this.socket=e}dispose(){super.dispose(),this.socket.destroy()}}t.SocketMessageWriter=a;class c extends me.ReadableStreamMessageReader{constructor(e,t){super(se.default().stream.asReadableStream(e),t)}}t.StreamMessageReader=c;class u extends me.WriteableStreamMessageWriter{constructor(e,t){super(se.default().stream.asWritableStream(e),t)}}t.StreamMessageWriter=u;const l=process.env.XDG_RUNTIME_DIR,g=new Map([["linux",107],["darwin",103]]);t.generateRandomPipeName=function(){const e=h.default.randomBytes(21).toString("hex");if("win32"===process.platform)return`\\\\.\\pipe\\vscode-jsonrpc-${e}-sock`;let t;t=l?d.default.join(l,`vscode-ipc-${e}.sock`):d.default.join(f.default.tmpdir(),`vscode-${e}.sock`);const n=g.get(process.platform);return void 0!==n&&t.length>=n&&se.default().console.warn(`WARNING: IPC handle "${t}" is longer than ${n} characters.`),t},t.createClientPipeTransport=function(e,t="utf-8"){let n;const r=new Promise((e,t)=>{n=e});return new Promise((o,i)=>{let c=p.default.createServer(e=>{c.close(),n([new s(e,t),new a(e,t)])});c.on("error",i),c.listen(e,()=>{c.removeListener("error",i),o({onConnected:()=>r})})})},t.createServerPipeTransport=function(e,t="utf-8"){const n=p.default.createConnection(e);return[new s(n,t),new a(n,t)]},t.createClientSocketTransport=function(e,t="utf-8"){let n;const r=new Promise((e,t)=>{n=e});return new Promise((o,i)=>{const c=p.default.createServer(e=>{c.close(),n([new s(e,t),new a(e,t)])});c.on("error",i),c.listen(e,"127.0.0.1",()=>{c.removeListener("error",i),o({onConnected:()=>r})})})},t.createServerSocketTransport=function(e,t="utf-8"){const n=p.default.createConnection(e,"127.0.0.1");return[new s(n,t),new a(n,t)]},t.createMessageConnection=function(e,t,n,r){n||(n=me.NullLogger);const o=function(e){const t=e;return void 0!==t.read&&void 0!==t.addListener}(e)?new c(e):e,i=function(e){const t=e;return void 0!==t.write&&void 0!==t.addListener}(t)?new u(t):t;return me.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),me.createMessageConnection(o,i,n,r)}})),ve=ye;!function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647}(N||(N={})),function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647}(M||(M={})),function(e){e.create=function(e,t){return e===Number.MAX_VALUE&&(e=M.MAX_VALUE),t===Number.MAX_VALUE&&(t=M.MAX_VALUE),{line:e,character:t}},e.is=function(e){var t=e;return Ze.objectLiteral(t)&&Ze.uinteger(t.line)&&Ze.uinteger(t.character)}}(j||(j={})),function(e){e.create=function(e,t,n,r){if(Ze.uinteger(e)&&Ze.uinteger(t)&&Ze.uinteger(n)&&Ze.uinteger(r))return{start:j.create(e,t),end:j.create(n,r)};if(j.is(e)&&j.is(t))return{start:e,end:t};throw new Error("Range#create called with invalid arguments["+e+", "+t+", "+n+", "+r+"]")},e.is=function(e){var t=e;return Ze.objectLiteral(t)&&j.is(t.start)&&j.is(t.end)}}(F||(F={})),function(e){e.create=function(e,t){return{uri:e,range:t}},e.is=function(e){var t=e;return Ze.defined(t)&&F.is(t.range)&&(Ze.string(t.uri)||Ze.undefined(t.uri))}}(W||(W={})),function(e){e.create=function(e,t,n,r){return{targetUri:e,targetRange:t,targetSelectionRange:n,originSelectionRange:r}},e.is=function(e){var t=e;return Ze.defined(t)&&F.is(t.targetRange)&&Ze.string(t.targetUri)&&(F.is(t.targetSelectionRange)||Ze.undefined(t.targetSelectionRange))&&(F.is(t.originSelectionRange)||Ze.undefined(t.originSelectionRange))}}(L||(L={})),function(e){e.create=function(e,t,n,r){return{red:e,green:t,blue:n,alpha:r}},e.is=function(e){var t=e;return Ze.numberRange(t.red,0,1)&&Ze.numberRange(t.green,0,1)&&Ze.numberRange(t.blue,0,1)&&Ze.numberRange(t.alpha,0,1)}}(I||(I={})),function(e){e.create=function(e,t){return{range:e,color:t}},e.is=function(e){var t=e;return F.is(t.range)&&I.is(t.color)}}(A||(A={})),function(e){e.create=function(e,t,n){return{label:e,textEdit:t,additionalTextEdits:n}},e.is=function(e){var t=e;return Ze.string(t.label)&&(Ze.undefined(t.textEdit)||X.is(t))&&(Ze.undefined(t.additionalTextEdits)||Ze.typedArray(t.additionalTextEdits,X.is))}}(H||(H={})),function(e){e.Comment="comment",e.Imports="imports",e.Region="region"}(z||(z={})),function(e){e.create=function(e,t,n,r,o){var i={startLine:e,endLine:t};return Ze.defined(n)&&(i.startCharacter=n),Ze.defined(r)&&(i.endCharacter=r),Ze.defined(o)&&(i.kind=o),i},e.is=function(e){var t=e;return Ze.uinteger(t.startLine)&&Ze.uinteger(t.startLine)&&(Ze.undefined(t.startCharacter)||Ze.uinteger(t.startCharacter))&&(Ze.undefined(t.endCharacter)||Ze.uinteger(t.endCharacter))&&(Ze.undefined(t.kind)||Ze.string(t.kind))}}(U||(U={})),function(e){e.create=function(e,t){return{location:e,message:t}},e.is=function(e){var t=e;return Ze.defined(t)&&W.is(t.location)&&Ze.string(t.message)}}($||($={})),function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4}(B||(B={})),function(e){e.Unnecessary=1,e.Deprecated=2}(K||(K={})),function(e){e.is=function(e){var t=e;return null!=t&&Ze.string(t.href)}}(V||(V={})),function(e){e.create=function(e,t,n,r,o,i){var s={range:e,message:t};return Ze.defined(n)&&(s.severity=n),Ze.defined(r)&&(s.code=r),Ze.defined(o)&&(s.source=o),Ze.defined(i)&&(s.relatedInformation=i),s},e.is=function(e){var t,n=e;return Ze.defined(n)&&F.is(n.range)&&Ze.string(n.message)&&(Ze.number(n.severity)||Ze.undefined(n.severity))&&(Ze.integer(n.code)||Ze.string(n.code)||Ze.undefined(n.code))&&(Ze.undefined(n.codeDescription)||Ze.string(null===(t=n.codeDescription)||void 0===t?void 0:t.href))&&(Ze.string(n.source)||Ze.undefined(n.source))&&(Ze.undefined(n.relatedInformation)||Ze.typedArray(n.relatedInformation,$.is))}}(J||(J={})),function(e){e.create=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var o={title:e,command:t};return Ze.defined(n)&&n.length>0&&(o.arguments=n),o},e.is=function(e){var t=e;return Ze.defined(t)&&Ze.string(t.title)&&Ze.string(t.command)}}(G||(G={})),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 Ze.objectLiteral(t)&&Ze.string(t.newText)&&F.is(t.range)}}(X||(X={})),function(e){e.create=function(e,t,n){var r={label:e};return void 0!==t&&(r.needsConfirmation=t),void 0!==n&&(r.description=n),r},e.is=function(e){var t=e;return void 0!==t&&Ze.objectLiteral(t)&&Ze.string(t.label)&&(Ze.boolean(t.needsConfirmation)||void 0===t.needsConfirmation)&&(Ze.string(t.description)||void 0===t.description)}}(Y||(Y={})),function(e){e.is=function(e){return"string"==typeof e}}(Q||(Q={})),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 X.is(t)&&(Y.is(t.annotationId)||Q.is(t.annotationId))}}(Z||(Z={})),function(e){e.create=function(e,t){return{textDocument:e,edits:t}},e.is=function(e){var t=e;return Ze.defined(t)&&_e.is(t.textDocument)&&Array.isArray(t.edits)}}(ee||(ee={})),function(e){e.create=function(e,t,n){var r={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(r.options=t),void 0!==n&&(r.annotationId=n),r},e.is=function(e){var t=e;return t&&"create"===t.kind&&Ze.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||Ze.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Ze.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||Q.is(t.annotationId))}}(te||(te={})),function(e){e.create=function(e,t,n,r){var o={kind:"rename",oldUri:e,newUri:t};return void 0===n||void 0===n.overwrite&&void 0===n.ignoreIfExists||(o.options=n),void 0!==r&&(o.annotationId=r),o},e.is=function(e){var t=e;return t&&"rename"===t.kind&&Ze.string(t.oldUri)&&Ze.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||Ze.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Ze.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||Q.is(t.annotationId))}}(ne||(ne={})),function(e){e.create=function(e,t,n){var r={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(r.options=t),void 0!==n&&(r.annotationId=n),r},e.is=function(e){var t=e;return t&&"delete"===t.kind&&Ze.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||Ze.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||Ze.boolean(t.options.ignoreIfNotExists)))&&(void 0===t.annotationId||Q.is(t.annotationId))}}(re||(re={})),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 Ze.string(e.kind)?te.is(e)||ne.is(e)||re.is(e):ee.is(e)})))}}(oe||(oe={}));var Re,be,_e,Te,we,Pe,Ce,ke,qe,De,Se,xe,Ee,Oe,Ne,Me,je,Fe,We,Le,Ie,Ae,He,ze,Ue,$e,Be,Ke,Ve,Je,Ge=function(){function e(e,t){this.edits=e,this.changeAnnotations=t}return e.prototype.insert=function(e,t,n){var r,o;if(void 0===n?r=X.insert(e,t):Q.is(n)?(o=n,r=Z.insert(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),o=this.changeAnnotations.manage(n),r=Z.insert(e,t,o)),this.edits.push(r),void 0!==o)return o},e.prototype.replace=function(e,t,n){var r,o;if(void 0===n?r=X.replace(e,t):Q.is(n)?(o=n,r=Z.replace(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),o=this.changeAnnotations.manage(n),r=Z.replace(e,t,o)),this.edits.push(r),void 0!==o)return o},e.prototype.delete=function(e,t){var n,r;if(void 0===t?n=X.del(e):Q.is(t)?(r=t,n=Z.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),r=this.changeAnnotations.manage(t),n=Z.del(e,r)),this.edits.push(n),void 0!==r)return r},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}(),Xe=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(Q.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}(),Ye=function(){function e(e){var t=this;this._textEditChanges=Object.create(null),void 0!==e?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new Xe(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach((function(e){if(ee.is(e)){var n=new Ge(e.edits,t._changeAnnotations);t._textEditChanges[e.textDocument.uri]=n}}))):e.changes&&Object.keys(e.changes).forEach((function(n){var r=new Ge(e.changes[n]);t._textEditChanges[n]=r}))):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(_e.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(!(r=this._textEditChanges[t.uri])){var n={textDocument:t,edits:o=[]};this._workspaceEdit.documentChanges.push(n),r=new Ge(o,this._changeAnnotations),this._textEditChanges[t.uri]=r}return r}if(this.initChanges(),void 0===this._workspaceEdit.changes)throw new Error("Workspace edit is not configured for normal text edit changes.");var r;if(!(r=this._textEditChanges[e])){var o=[];this._workspaceEdit.changes[e]=o,r=new Ge(o),this._textEditChanges[e]=r}return r},e.prototype.initDocumentChanges=function(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._changeAnnotations=new Xe,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 r,o,i;if(Y.is(t)||Q.is(t)?r=t:n=t,void 0===r?o=te.create(e,n):(i=Q.is(r)?r:this._changeAnnotations.manage(r),o=te.create(e,n,i)),this._workspaceEdit.documentChanges.push(o),void 0!==i)return i},e.prototype.renameFile=function(e,t,n,r){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var o,i,s;if(Y.is(n)||Q.is(n)?o=n:r=n,void 0===o?i=ne.create(e,t,r):(s=Q.is(o)?o:this._changeAnnotations.manage(o),i=ne.create(e,t,r,s)),this._workspaceEdit.documentChanges.push(i),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 r,o,i;if(Y.is(t)||Q.is(t)?r=t:n=t,void 0===r?o=re.create(e,n):(i=Q.is(r)?r:this._changeAnnotations.manage(r),o=re.create(e,n,i)),this._workspaceEdit.documentChanges.push(o),void 0!==i)return i},e}();!function(e){e.create=function(e){return{uri:e}},e.is=function(e){var t=e;return Ze.defined(t)&&Ze.string(t.uri)}}(Re||(Re={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){var t=e;return Ze.defined(t)&&Ze.string(t.uri)&&Ze.integer(t.version)}}(be||(be={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){var t=e;return Ze.defined(t)&&Ze.string(t.uri)&&(null===t.version||Ze.integer(t.version))}}(_e||(_e={})),function(e){e.create=function(e,t,n,r){return{uri:e,languageId:t,version:n,text:r}},e.is=function(e){var t=e;return Ze.defined(t)&&Ze.string(t.uri)&&Ze.string(t.languageId)&&Ze.integer(t.version)&&Ze.string(t.text)}}(Te||(Te={})),function(e){e.PlainText="plaintext",e.Markdown="markdown"}(we||(we={})),function(e){e.is=function(t){var n=t;return n===e.PlainText||n===e.Markdown}}(we||(we={})),function(e){e.is=function(e){var t=e;return Ze.objectLiteral(e)&&we.is(t.kind)&&Ze.string(t.value)}}(Pe||(Pe={})),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}(Ce||(Ce={})),function(e){e.PlainText=1,e.Snippet=2}(ke||(ke={})),function(e){e.Deprecated=1}(qe||(qe={})),function(e){e.create=function(e,t,n){return{newText:e,insert:t,replace:n}},e.is=function(e){var t=e;return t&&Ze.string(t.newText)&&F.is(t.insert)&&F.is(t.replace)}}(De||(De={})),function(e){e.asIs=1,e.adjustIndentation=2}(Se||(Se={})),function(e){e.create=function(e){return{label:e}}}(xe||(xe={})),function(e){e.create=function(e,t){return{items:e||[],isIncomplete:!!t}}}(Ee||(Ee={})),function(e){e.fromPlainText=function(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")},e.is=function(e){var t=e;return Ze.string(t)||Ze.objectLiteral(t)&&Ze.string(t.language)&&Ze.string(t.value)}}(Oe||(Oe={})),function(e){e.is=function(e){var t=e;return!!t&&Ze.objectLiteral(t)&&(Pe.is(t.contents)||Oe.is(t.contents)||Ze.typedArray(t.contents,Oe.is))&&(void 0===e.range||F.is(e.range))}}(Ne||(Ne={})),function(e){e.create=function(e,t){return t?{label:e,documentation:t}:{label:e}}}(Me||(Me={})),function(e){e.create=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var o={label:e};return Ze.defined(t)&&(o.documentation=t),Ze.defined(n)?o.parameters=n:o.parameters=[],o}}(je||(je={})),function(e){e.Text=1,e.Read=2,e.Write=3}(Fe||(Fe={})),function(e){e.create=function(e,t){var n={range:e};return Ze.number(t)&&(n.kind=t),n}}(We||(We={})),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}(Le||(Le={})),function(e){e.Deprecated=1}(Ie||(Ie={})),function(e){e.create=function(e,t,n,r,o){var i={name:e,kind:t,location:{uri:r,range:n}};return o&&(i.containerName=o),i}}(Ae||(Ae={})),function(e){e.create=function(e,t,n,r,o,i){var s={name:e,detail:t,kind:n,range:r,selectionRange:o};return void 0!==i&&(s.children=i),s},e.is=function(e){var t=e;return t&&Ze.string(t.name)&&Ze.number(t.kind)&&F.is(t.range)&&F.is(t.selectionRange)&&(void 0===t.detail||Ze.string(t.detail))&&(void 0===t.deprecated||Ze.boolean(t.deprecated))&&(void 0===t.children||Array.isArray(t.children))&&(void 0===t.tags||Array.isArray(t.tags))}}(He||(He={})),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"}(ze||(ze={})),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 Ze.defined(t)&&Ze.typedArray(t.diagnostics,J.is)&&(void 0===t.only||Ze.typedArray(t.only,Ze.string))}}(Ue||(Ue={})),function(e){e.create=function(e,t,n){var r={title:e},o=!0;return"string"==typeof t?(o=!1,r.kind=t):G.is(t)?r.command=t:r.edit=t,o&&void 0!==n&&(r.kind=n),r},e.is=function(e){var t=e;return t&&Ze.string(t.title)&&(void 0===t.diagnostics||Ze.typedArray(t.diagnostics,J.is))&&(void 0===t.kind||Ze.string(t.kind))&&(void 0!==t.edit||void 0!==t.command)&&(void 0===t.command||G.is(t.command))&&(void 0===t.isPreferred||Ze.boolean(t.isPreferred))&&(void 0===t.edit||oe.is(t.edit))}}($e||($e={})),function(e){e.create=function(e,t){var n={range:e};return Ze.defined(t)&&(n.data=t),n},e.is=function(e){var t=e;return Ze.defined(t)&&F.is(t.range)&&(Ze.undefined(t.command)||G.is(t.command))}}(Be||(Be={})),function(e){e.create=function(e,t){return{tabSize:e,insertSpaces:t}},e.is=function(e){var t=e;return Ze.defined(t)&&Ze.uinteger(t.tabSize)&&Ze.boolean(t.insertSpaces)}}(Ke||(Ke={})),function(e){e.create=function(e,t,n){return{range:e,target:t,data:n}},e.is=function(e){var t=e;return Ze.defined(t)&&F.is(t.range)&&(Ze.undefined(t.target)||Ze.string(t.target))}}(Ve||(Ve={})),function(e){e.create=function(e,t){return{range:e,parent:t}},e.is=function(t){var n=t;return void 0!==n&&F.is(n.range)&&(void 0===n.parent||e.is(n.parent))}}(Je||(Je={}));var Qe;!function(e){function t(e,n){if(e.length<=1)return e;var r=e.length/2|0,o=e.slice(0,r),i=e.slice(r);t(o,n),t(i,n);for(var s=0,a=0,c=0;s<o.length&&a<i.length;){var u=n(o[s],i[a]);e[c++]=u<=0?o[s++]:i[a++]}for(;s<o.length;)e[c++]=o[s++];for(;a<i.length;)e[c++]=i[a++];return e}e.create=function(e,t,n,r){return new et(e,t,n,r)},e.is=function(e){var t=e;return!!(Ze.defined(t)&&Ze.string(t.uri)&&(Ze.undefined(t.languageId)||Ze.string(t.languageId))&&Ze.uinteger(t.lineCount)&&Ze.func(t.getText)&&Ze.func(t.positionAt)&&Ze.func(t.offsetAt))},e.applyEdits=function(e,n){for(var r=e.getText(),o=t(n,(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})),i=r.length,s=o.length-1;s>=0;s--){var a=o[s],c=e.offsetAt(a.range.start),u=e.offsetAt(a.range.end);if(!(u<=i))throw new Error("Overlapping edit");r=r.substring(0,c)+a.newText+r.substring(u,r.length),i=c}return r}}(Qe||(Qe={}));var Ze,et=function(){function e(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,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,r=0;r<t.length;r++){n&&(e.push(r),n=!1);var o=t.charAt(r);n="\r"===o||"\n"===o,"\r"===o&&r+1<t.length&&"\n"===t.charAt(r+1)&&r++}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,r=t.length;if(0===r)return j.create(0,e);for(;n<r;){var o=Math.floor((n+r)/2);t[o]>e?r=o:n=o+1}var i=n-1;return j.create(i,e-t[i])},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],r=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(n+e.character,r),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,r){return"[object Number]"===t.call(e)&&n<=e&&e<=r},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)}}(Ze||(Ze={}));var tt=Object.freeze({__proto__:null,get integer(){return N},get uinteger(){return M},get Position(){return j},get Range(){return F},get Location(){return W},get LocationLink(){return L},get Color(){return I},get ColorInformation(){return A},get ColorPresentation(){return H},get FoldingRangeKind(){return z},get FoldingRange(){return U},get DiagnosticRelatedInformation(){return $},get DiagnosticSeverity(){return B},get DiagnosticTag(){return K},get CodeDescription(){return V},get Diagnostic(){return J},get Command(){return G},get TextEdit(){return X},get ChangeAnnotation(){return Y},get ChangeAnnotationIdentifier(){return Q},get AnnotatedTextEdit(){return Z},get TextDocumentEdit(){return ee},get CreateFile(){return te},get RenameFile(){return ne},get DeleteFile(){return re},get WorkspaceEdit(){return oe},WorkspaceChange:Ye,get TextDocumentIdentifier(){return Re},get VersionedTextDocumentIdentifier(){return be},get OptionalVersionedTextDocumentIdentifier(){return _e},get TextDocumentItem(){return Te},get MarkupKind(){return we},get MarkupContent(){return Pe},get CompletionItemKind(){return Ce},get InsertTextFormat(){return ke},get CompletionItemTag(){return qe},get InsertReplaceEdit(){return De},get InsertTextMode(){return Se},get CompletionItem(){return xe},get CompletionList(){return Ee},get MarkedString(){return Oe},get Hover(){return Ne},get ParameterInformation(){return Me},get SignatureInformation(){return je},get DocumentHighlightKind(){return Fe},get DocumentHighlight(){return We},get SymbolKind(){return Le},get SymbolTag(){return Ie},get SymbolInformation(){return Ae},get DocumentSymbol(){return He},get CodeActionKind(){return ze},get CodeActionContext(){return Ue},get CodeAction(){return $e},get CodeLens(){return Be},get FormattingOptions(){return Ke},get DocumentLink(){return Ve},get SelectionRange(){return Je},EOL:["\n","\r\n","\r"],get TextDocument(){return Qe}}),nt=b((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.ProtocolNotificationType=t.ProtocolNotificationType0=t.ProtocolRequestType=t.ProtocolRequestType0=t.RegistrationType=void 0;t.RegistrationType=class{constructor(e){this.method=e}};class n extends ye.RequestType0{constructor(e){super(e)}}t.ProtocolRequestType0=n;class r extends ye.RequestType{constructor(e){super(e,ye.ParameterStructures.byName)}}t.ProtocolRequestType=r;class o extends ye.NotificationType0{constructor(e){super(e)}}t.ProtocolNotificationType0=o;class i extends ye.NotificationType{constructor(e){super(e,ye.ParameterStructures.byName)}}t.ProtocolNotificationType=i})),rt=b((function(e,t){function n(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=n,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=>n(e))},t.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)},t.objectLiteral=function(e){return null!==e&&"object"==typeof e}})),ot=b((function(e,t){var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ImplementationRequest=void 0,(n=t.ImplementationRequest||(t.ImplementationRequest={})).method="textDocument/implementation",n.type=new nt.ProtocolRequestType(n.method)})),it=b((function(e,t){var n;Object.defineProperty(t,"__esModule",{value:!0}),t.TypeDefinitionRequest=void 0,(n=t.TypeDefinitionRequest||(t.TypeDefinitionRequest={})).method="textDocument/typeDefinition",n.type=new nt.ProtocolRequestType(n.method)})),st=b((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.DidChangeWorkspaceFoldersNotification=t.WorkspaceFoldersRequest=void 0,(t.WorkspaceFoldersRequest||(t.WorkspaceFoldersRequest={})).type=new nt.ProtocolRequestType0("workspace/workspaceFolders"),(t.DidChangeWorkspaceFoldersNotification||(t.DidChangeWorkspaceFoldersNotification={})).type=new nt.ProtocolNotificationType("workspace/didChangeWorkspaceFolders")})),at=b((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigurationRequest=void 0,(t.ConfigurationRequest||(t.ConfigurationRequest={})).type=new nt.ProtocolRequestType("workspace/configuration")})),ct=b((function(e,t){var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ColorPresentationRequest=t.DocumentColorRequest=void 0,(n=t.DocumentColorRequest||(t.DocumentColorRequest={})).method="textDocument/documentColor",n.type=new nt.ProtocolRequestType(n.method),(t.ColorPresentationRequest||(t.ColorPresentationRequest={})).type=new nt.ProtocolRequestType("textDocument/colorPresentation")})),ut=b((function(e,t){var n;Object.defineProperty(t,"__esModule",{value:!0}),t.FoldingRangeRequest=t.FoldingRangeKind=void 0,function(e){e.Comment="comment",e.Imports="imports",e.Region="region"}(t.FoldingRangeKind||(t.FoldingRangeKind={})),(n=t.FoldingRangeRequest||(t.FoldingRangeRequest={})).method="textDocument/foldingRange",n.type=new nt.ProtocolRequestType(n.method)})),lt=b((function(e,t){var n;Object.defineProperty(t,"__esModule",{value:!0}),t.DeclarationRequest=void 0,(n=t.DeclarationRequest||(t.DeclarationRequest={})).method="textDocument/declaration",n.type=new nt.ProtocolRequestType(n.method)})),dt=b((function(e,t){var n;Object.defineProperty(t,"__esModule",{value:!0}),t.SelectionRangeRequest=void 0,(n=t.SelectionRangeRequest||(t.SelectionRangeRequest={})).method="textDocument/selectionRange",n.type=new nt.ProtocolRequestType(n.method)})),ft=b((function(e,t){var n;Object.defineProperty(t,"__esModule",{value:!0}),t.WorkDoneProgressCancelNotification=t.WorkDoneProgressCreateRequest=t.WorkDoneProgress=void 0,(n=t.WorkDoneProgress||(t.WorkDoneProgress={})).type=new ye.ProgressType,n.is=function(e){return e===n.type},(t.WorkDoneProgressCreateRequest||(t.WorkDoneProgressCreateRequest={})).type=new nt.ProtocolRequestType("window/workDoneProgress/create"),(t.WorkDoneProgressCancelNotification||(t.WorkDoneProgressCancelNotification={})).type=new nt.ProtocolNotificationType("window/workDoneProgress/cancel")})),ht=b((function(e,t){var n,r,o;Object.defineProperty(t,"__esModule",{value:!0}),t.CallHierarchyOutgoingCallsRequest=t.CallHierarchyIncomingCallsRequest=t.CallHierarchyPrepareRequest=void 0,(n=t.CallHierarchyPrepareRequest||(t.CallHierarchyPrepareRequest={})).method="textDocument/prepareCallHierarchy",n.type=new nt.ProtocolRequestType(n.method),(r=t.CallHierarchyIncomingCallsRequest||(t.CallHierarchyIncomingCallsRequest={})).method="callHierarchy/incomingCalls",r.type=new nt.ProtocolRequestType(r.method),(o=t.CallHierarchyOutgoingCallsRequest||(t.CallHierarchyOutgoingCallsRequest={})).method="callHierarchy/outgoingCalls",o.type=new nt.ProtocolRequestType(o.method)})),pt=b((function(e,t){var n,r,o,i,s,a,c;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,(n=t.SemanticTokenTypes||(t.SemanticTokenTypes={})).namespace="namespace",n.type="type",n.class="class",n.enum="enum",n.interface="interface",n.struct="struct",n.typeParameter="typeParameter",n.parameter="parameter",n.variable="variable",n.property="property",n.enumMember="enumMember",n.event="event",n.function="function",n.method="method",n.macro="macro",n.keyword="keyword",n.modifier="modifier",n.comment="comment",n.string="string",n.number="number",n.regexp="regexp",n.operator="operator",(r=t.SemanticTokenModifiers||(t.SemanticTokenModifiers={})).declaration="declaration",r.definition="definition",r.readonly="readonly",r.static="static",r.deprecated="deprecated",r.abstract="abstract",r.async="async",r.modification="modification",r.documentation="documentation",r.defaultLibrary="defaultLibrary",(t.SemanticTokens||(t.SemanticTokens={})).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.TokenFormat||(t.TokenFormat={})).Relative="relative",(o=t.SemanticTokensRegistrationType||(t.SemanticTokensRegistrationType={})).method="textDocument/semanticTokens",o.type=new nt.RegistrationType(o.method),(i=t.SemanticTokensRequest||(t.SemanticTokensRequest={})).method="textDocument/semanticTokens/full",i.type=new nt.ProtocolRequestType(i.method),(s=t.SemanticTokensDeltaRequest||(t.SemanticTokensDeltaRequest={})).method="textDocument/semanticTokens/full/delta",s.type=new nt.ProtocolRequestType(s.method),(a=t.SemanticTokensRangeRequest||(t.SemanticTokensRangeRequest={})).method="textDocument/semanticTokens/range",a.type=new nt.ProtocolRequestType(a.method),(c=t.SemanticTokensRefreshRequest||(t.SemanticTokensRefreshRequest={})).method="workspace/semanticTokens/refresh",c.type=new nt.ProtocolRequestType0(c.method)})),gt=b((function(e,t){var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ShowDocumentRequest=void 0,(n=t.ShowDocumentRequest||(t.ShowDocumentRequest={})).method="window/showDocument",n.type=new nt.ProtocolRequestType(n.method)})),mt=b((function(e,t){var n;Object.defineProperty(t,"__esModule",{value:!0}),t.LinkedEditingRangeRequest=void 0,(n=t.LinkedEditingRangeRequest||(t.LinkedEditingRangeRequest={})).method="textDocument/linkedEditingRange",n.type=new nt.ProtocolRequestType(n.method)})),yt=b((function(e,t){var n,r,o,i,s,a,c;Object.defineProperty(t,"__esModule",{value:!0}),t.WillDeleteFilesRequest=t.DidDeleteFilesNotification=t.DidRenameFilesNotification=t.WillRenameFilesRequest=t.DidCreateFilesNotification=t.WillCreateFilesRequest=t.FileOperationPatternKind=void 0,(n=t.FileOperationPatternKind||(t.FileOperationPatternKind={})).file="file",n.folder="folder",(r=t.WillCreateFilesRequest||(t.WillCreateFilesRequest={})).method="workspace/willCreateFiles",r.type=new nt.ProtocolRequestType(r.method),(o=t.DidCreateFilesNotification||(t.DidCreateFilesNotification={})).method="workspace/didCreateFiles",o.type=new nt.ProtocolNotificationType(o.method),(i=t.WillRenameFilesRequest||(t.WillRenameFilesRequest={})).method="workspace/willRenameFiles",i.type=new nt.ProtocolRequestType(i.method),(s=t.DidRenameFilesNotification||(t.DidRenameFilesNotification={})).method="workspace/didRenameFiles",s.type=new nt.ProtocolNotificationType(s.method),(a=t.DidDeleteFilesNotification||(t.DidDeleteFilesNotification={})).method="workspace/didDeleteFiles",a.type=new nt.ProtocolNotificationType(a.method),(c=t.WillDeleteFilesRequest||(t.WillDeleteFilesRequest={})).method="workspace/willDeleteFiles",c.type=new nt.ProtocolRequestType(c.method)})),vt=b((function(e,t){var n,r,o;Object.defineProperty(t,"__esModule",{value:!0}),t.MonikerRequest=t.MonikerKind=t.UniquenessLevel=void 0,(n=t.UniquenessLevel||(t.UniquenessLevel={})).document="document",n.project="project",n.group="group",n.scheme="scheme",n.global="global",(r=t.MonikerKind||(t.MonikerKind={})).import="import",r.export="export",r.local="local",(o=t.MonikerRequest||(t.MonikerRequest={})).method="textDocument/moniker",o.type=new nt.ProtocolRequestType(o.method)})),Rt=b((function(e,t){var n,r,o,i,s,a,c,u,l,d,f,h,p,g,m,y,v,R,b,_,T,w,P,C,k,q,D,S,x,E,O,N,M,j,F,W,L,I,A,H;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,Object.defineProperty(t,"ImplementationRequest",{enumerable:!0,get:function(){return ot.ImplementationRequest}}),Object.defineProperty(t,"TypeDefinitionRequest",{enumerable:!0,get:function(){return it.TypeDefinitionRequest}}),Object.defineProperty(t,"WorkspaceFoldersRequest",{enumerable:!0,get:function(){return st.WorkspaceFoldersRequest}}),Object.defineProperty(t,"DidChangeWorkspaceFoldersNotification",{enumerable:!0,get:function(){return st.DidChangeWorkspaceFoldersNotification}}),Object.defineProperty(t,"ConfigurationRequest",{enumerable:!0,get:function(){return at.ConfigurationRequest}}),Object.defineProperty(t,"DocumentColorRequest",{enumerable:!0,get:function(){return ct.DocumentColorRequest}}),Object.defineProperty(t,"ColorPresentationRequest",{enumerable:!0,get:function(){return ct.ColorPresentationRequest}}),Object.defineProperty(t,"FoldingRangeRequest",{enumerable:!0,get:function(){return ut.FoldingRangeRequest}}),Object.defineProperty(t,"DeclarationRequest",{enumerable:!0,get:function(){return lt.DeclarationRequest}}),Object.defineProperty(t,"SelectionRangeRequest",{enumerable:!0,get:function(){return dt.SelectionRangeRequest}}),Object.defineProperty(t,"WorkDoneProgress",{enumerable:!0,get:function(){return ft.WorkDoneProgress}}),Object.defineProperty(t,"WorkDoneProgressCreateRequest",{enumerable:!0,get:function(){return ft.WorkDoneProgressCreateRequest}}),Object.defineProperty(t,"WorkDoneProgressCancelNotification",{enumerable:!0,get:function(){return ft.WorkDoneProgressCancelNotification}}),Object.defineProperty(t,"CallHierarchyIncomingCallsRequest",{enumerable:!0,get:function(){return ht.CallHierarchyIncomingCallsRequest}}),Object.defineProperty(t,"CallHierarchyOutgoingCallsRequest",{enumerable:!0,get:function(){return ht.CallHierarchyOutgoingCallsRequest}}),Object.defineProperty(t,"CallHierarchyPrepareRequest",{enumerable:!0,get:function(){return ht.CallHierarchyPrepareRequest}}),Object.defineProperty(t,"SemanticTokenTypes",{enumerable:!0,get:function(){return pt.SemanticTokenTypes}}),Object.defineProperty(t,"SemanticTokenModifiers",{enumerable:!0,get:function(){return pt.SemanticTokenModifiers}}),Object.defineProperty(t,"SemanticTokens",{enumerable:!0,get:function(){return pt.SemanticTokens}}),Object.defineProperty(t,"TokenFormat",{enumerable:!0,get:function(){return pt.TokenFormat}}),Object.defineProperty(t,"SemanticTokensRequest",{enumerable:!0,get:function(){return pt.SemanticTokensRequest}}),Object.defineProperty(t,"SemanticTokensDeltaRequest",{enumerable:!0,get:function(){return pt.SemanticTokensDeltaRequest}}),Object.defineProperty(t,"SemanticTokensRangeRequest",{enumerable:!0,get:function(){return pt.SemanticTokensRangeRequest}}),Object.defineProperty(t,"SemanticTokensRefreshRequest",{enumerable:!0,get:function(){return pt.SemanticTokensRefreshRequest}}),Object.defineProperty(t,"SemanticTokensRegistrationType",{enumerable:!0,get:function(){return pt.SemanticTokensRegistrationType}}),Object.defineProperty(t,"ShowDocumentRequest",{enumerable:!0,get:function(){return gt.ShowDocumentRequest}}),Object.defineProperty(t,"LinkedEditingRangeRequest",{enumerable:!0,get:function(){return mt.LinkedEditingRangeRequest}}),Object.defineProperty(t,"FileOperationPatternKind",{enumerable:!0,get:function(){return yt.FileOperationPatternKind}}),Object.defineProperty(t,"DidCreateFilesNotification",{enumerable:!0,get:function(){return yt.DidCreateFilesNotification}}),Object.defineProperty(t,"WillCreateFilesRequest",{enumerable:!0,get:function(){return yt.WillCreateFilesRequest}}),Object.defineProperty(t,"DidRenameFilesNotification",{enumerable:!0,get:function(){return yt.DidRenameFilesNotification}}),Object.defineProperty(t,"WillRenameFilesRequest",{enumerable:!0,get:function(){return yt.WillRenameFilesRequest}}),Object.defineProperty(t,"DidDeleteFilesNotification",{enumerable:!0,get:function(){return yt.DidDeleteFilesNotification}}),Object.defineProperty(t,"WillDeleteFilesRequest",{enumerable:!0,get:function(){return yt.WillDeleteFilesRequest}}),Object.defineProperty(t,"UniquenessLevel",{enumerable:!0,get:function(){return vt.UniquenessLevel}}),Object.defineProperty(t,"MonikerKind",{enumerable:!0,get:function(){return vt.MonikerKind}}),Object.defineProperty(t,"MonikerRequest",{enumerable:!0,get:function(){return vt.MonikerRequest}}),function(e){e.is=function(e){const t=e;return rt.string(t.language)||rt.string(t.scheme)||rt.string(t.pattern)}}(n=t.DocumentFilter||(t.DocumentFilter={})),function(e){e.is=function(e){if(!Array.isArray(e))return!1;for(let t of e)if(!rt.string(t)&&!n.is(t))return!1;return!0}}(r=t.DocumentSelector||(t.DocumentSelector={})),(t.RegistrationRequest||(t.RegistrationRequest={})).type=new nt.ProtocolRequestType("client/registerCapability"),(t.UnregistrationRequest||(t.UnregistrationRequest={})).type=new nt.ProtocolRequestType("client/unregisterCapability"),(o=t.ResourceOperationKind||(t.ResourceOperationKind={})).Create="create",o.Rename="rename",o.Delete="delete",(i=t.FailureHandlingKind||(t.FailureHandlingKind={})).Abort="abort",i.Transactional="transactional",i.TextOnlyTransactional="textOnlyTransactional",i.Undo="undo",(t.StaticRegistrationOptions||(t.StaticRegistrationOptions={})).hasId=function(e){const t=e;return t&&rt.string(t.id)&&t.id.length>0},(t.TextDocumentRegistrationOptions||(t.TextDocumentRegistrationOptions={})).is=function(e){const t=e;return t&&(null===t.documentSelector||r.is(t.documentSelector))},(s=t.WorkDoneProgressOptions||(t.WorkDoneProgressOptions={})).is=function(e){const t=e;return rt.objectLiteral(t)&&(void 0===t.workDoneProgress||rt.boolean(t.workDoneProgress))},s.hasWorkDoneProgress=function(e){const t=e;return t&&rt.boolean(t.workDoneProgress)},(t.InitializeRequest||(t.InitializeRequest={})).type=new nt.ProtocolRequestType("initialize"),(t.InitializeError||(t.InitializeError={})).unknownProtocolVersion=1,(t.InitializedNotification||(t.InitializedNotification={})).type=new nt.ProtocolNotificationType("initialized"),(t.ShutdownRequest||(t.ShutdownRequest={})).type=new nt.ProtocolRequestType0("shutdown"),(t.ExitNotification||(t.ExitNotification={})).type=new nt.ProtocolNotificationType0("exit"),(t.DidChangeConfigurationNotification||(t.DidChangeConfigurationNotification={})).type=new nt.ProtocolNotificationType("workspace/didChangeConfiguration"),(a=t.MessageType||(t.MessageType={})).Error=1,a.Warning=2,a.Info=3,a.Log=4,(t.ShowMessageNotification||(t.ShowMessageNotification={})).type=new nt.ProtocolNotificationType("window/showMessage"),(t.ShowMessageRequest||(t.ShowMessageRequest={})).type=new nt.ProtocolRequestType("window/showMessageRequest"),(t.LogMessageNotification||(t.LogMessageNotification={})).type=new nt.ProtocolNotificationType("window/logMessage"),(t.TelemetryEventNotification||(t.TelemetryEventNotification={})).type=new nt.ProtocolNotificationType("telemetry/event"),(c=t.TextDocumentSyncKind||(t.TextDocumentSyncKind={})).None=0,c.Full=1,c.Incremental=2,(u=t.DidOpenTextDocumentNotification||(t.DidOpenTextDocumentNotification={})).method="textDocument/didOpen",u.type=new nt.ProtocolNotificationType(u.method),(l=t.TextDocumentContentChangeEvent||(t.TextDocumentContentChangeEvent={})).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)},l.isFull=function(e){let t=e;return null!=t&&"string"==typeof t.text&&void 0===t.range&&void 0===t.rangeLength},(d=t.DidChangeTextDocumentNotification||(t.DidChangeTextDocumentNotification={})).method="textDocument/didChange",d.type=new nt.ProtocolNotificationType(d.method),(f=t.DidCloseTextDocumentNotification||(t.DidCloseTextDocumentNotification={})).method="textDocument/didClose",f.type=new nt.ProtocolNotificationType(f.method),(h=t.DidSaveTextDocumentNotification||(t.DidSaveTextDocumentNotification={})).method="textDocument/didSave",h.type=new nt.ProtocolNotificationType(h.method),(p=t.TextDocumentSaveReason||(t.TextDocumentSaveReason={})).Manual=1,p.AfterDelay=2,p.FocusOut=3,(g=t.WillSaveTextDocumentNotification||(t.WillSaveTextDocumentNotification={})).method="textDocument/willSave",g.type=new nt.ProtocolNotificationType(g.method),(m=t.WillSaveTextDocumentWaitUntilRequest||(t.WillSaveTextDocumentWaitUntilRequest={})).method="textDocument/willSaveWaitUntil",m.type=new nt.ProtocolRequestType(m.method),(t.DidChangeWatchedFilesNotification||(t.DidChangeWatchedFilesNotification={})).type=new nt.ProtocolNotificationType("workspace/didChangeWatchedFiles"),(y=t.FileChangeType||(t.FileChangeType={})).Created=1,y.Changed=2,y.Deleted=3,(v=t.WatchKind||(t.WatchKind={})).Create=1,v.Change=2,v.Delete=4,(t.PublishDiagnosticsNotification||(t.PublishDiagnosticsNotification={})).type=new nt.ProtocolNotificationType("textDocument/publishDiagnostics"),(R=t.CompletionTriggerKind||(t.CompletionTriggerKind={})).Invoked=1,R.TriggerCharacter=2,R.TriggerForIncompleteCompletions=3,(b=t.CompletionRequest||(t.CompletionRequest={})).method="textDocument/completion",b.type=new nt.ProtocolRequestType(b.method),(_=t.CompletionResolveRequest||(t.CompletionResolveRequest={})).method="completionItem/resolve",_.type=new nt.ProtocolRequestType(_.method),(T=t.HoverRequest||(t.HoverRequest={})).method="textDocument/hover",T.type=new nt.ProtocolRequestType(T.method),(w=t.SignatureHelpTriggerKind||(t.SignatureHelpTriggerKind={})).Invoked=1,w.TriggerCharacter=2,w.ContentChange=3,(P=t.SignatureHelpRequest||(t.SignatureHelpRequest={})).method="textDocument/signatureHelp",P.type=new nt.ProtocolRequestType(P.method),(C=t.DefinitionRequest||(t.DefinitionRequest={})).method="textDocument/definition",C.type=new nt.ProtocolRequestType(C.method),(k=t.ReferencesRequest||(t.ReferencesRequest={})).method="textDocument/references",k.type=new nt.ProtocolRequestType(k.method),(q=t.DocumentHighlightRequest||(t.DocumentHighlightRequest={})).method="textDocument/documentHighlight",q.type=new nt.ProtocolRequestType(q.method),(D=t.DocumentSymbolRequest||(t.DocumentSymbolRequest={})).method="textDocument/documentSymbol",D.type=new nt.ProtocolRequestType(D.method),(S=t.CodeActionRequest||(t.CodeActionRequest={})).method="textDocument/codeAction",S.type=new nt.ProtocolRequestType(S.method),(x=t.CodeActionResolveRequest||(t.CodeActionResolveRequest={})).method="codeAction/resolve",x.type=new nt.ProtocolRequestType(x.method),(E=t.WorkspaceSymbolRequest||(t.WorkspaceSymbolRequest={})).method="workspace/symbol",E.type=new nt.ProtocolRequestType(E.method),(O=t.CodeLensRequest||(t.CodeLensRequest={})).method="textDocument/codeLens",O.type=new nt.ProtocolRequestType(O.method),(N=t.CodeLensResolveRequest||(t.CodeLensResolveRequest={})).method="codeLens/resolve",N.type=new nt.ProtocolRequestType(N.method),(M=t.CodeLensRefreshRequest||(t.CodeLensRefreshRequest={})).method="workspace/codeLens/refresh",M.type=new nt.ProtocolRequestType0(M.method),(j=t.DocumentLinkRequest||(t.DocumentLinkRequest={})).method="textDocument/documentLink",j.type=new nt.ProtocolRequestType(j.method),(F=t.DocumentLinkResolveRequest||(t.DocumentLinkResolveRequest={})).method="documentLink/resolve",F.type=new nt.ProtocolRequestType(F.method),(W=t.DocumentFormattingRequest||(t.DocumentFormattingRequest={})).method="textDocument/formatting",W.type=new nt.ProtocolRequestType(W.method),(L=t.DocumentRangeFormattingRequest||(t.DocumentRangeFormattingRequest={})).method="textDocument/rangeFormatting",L.type=new nt.ProtocolRequestType(L.method),(I=t.DocumentOnTypeFormattingRequest||(t.DocumentOnTypeFormattingRequest={})).method="textDocument/onTypeFormatting",I.type=new nt.ProtocolRequestType(I.method),(t.PrepareSupportDefaultBehavior||(t.PrepareSupportDefaultBehavior={})).Identifier=1,(A=t.RenameRequest||(t.RenameRequest={})).method="textDocument/rename",A.type=new nt.ProtocolRequestType(A.method),(H=t.PrepareRenameRequest||(t.PrepareRenameRequest={})).method="textDocument/prepareRename",H.type=new nt.ProtocolRequestType(H.method),(t.ExecuteCommandRequest||(t.ExecuteCommandRequest={})).type=new nt.ProtocolRequestType("workspace/executeCommand"),(t.ApplyWorkspaceEditRequest||(t.ApplyWorkspaceEditRequest={})).type=new nt.ProtocolRequestType("workspace/applyEdit")})),bt=b((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.createProtocolConnection=void 0,t.createProtocolConnection=function(e,t,n,r){return ye.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),ye.createMessageConnection(e,t,n,r)}})),_t=R(tt),Tt=b((function(e,t){var n,r=v&&v.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=v&&v.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.LSPErrorCodes=t.createProtocolConnection=void 0,o(ye,t),o(_t,t),o(nt,t),o(Rt,t),Object.defineProperty(t,"createProtocolConnection",{enumerable:!0,get:function(){return bt.createProtocolConnection}}),(n=t.LSPErrorCodes||(t.LSPErrorCodes={})).lspReservedErrorRangeStart=-32899,n.ContentModified=-32801,n.RequestCancelled=-32800,n.lspReservedErrorRangeEnd=-32800})),wt=b((function(e,t){var n=v&&v.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),r=v&&v.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.createProtocolConnection=void 0,r(ve,t),r(Tt,t),t.createProtocolConnection=function(e,t,n,r){return ve.createMessageConnection(e,t,n,r)}})),Pt=b((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.generateUuid=t.parse=t.isUUID=t.v4=t.empty=void 0;class n{constructor(e){this._value=e}asHex(){return this._value}equals(e){return this.asHex()===e.asHex()}}class r extends n{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 n("00000000-0000-0000-0000-000000000000"),t.v4=o;const i=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function s(e){return i.test(e)}t.isUUID=s,t.parse=function(e){if(!s(e))throw new Error("invalid uuid");return new n(e)},t.generateUuid=function(){return o().asHex()}})),Ct=b((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.attachPartialResult=t.ProgressFeature=t.attachWorkDone=void 0;class n{constructor(e,t){this._connection=e,this._token=t,n.Instances.set(this._token,this)}begin(e,t,n,r){let o={kind:"begin",title:e,percentage:t,message:n,cancellable:r};this._connection.sendProgress(wt.WorkDoneProgress.type,this._token,o)}report(e,t){let n={kind:"report"};"number"==typeof e?(n.percentage=e,void 0!==t&&(n.message=t)):n.message=e,this._connection.sendProgress(wt.WorkDoneProgress.type,this._token,n)}done(){n.Instances.delete(this._token),this._connection.sendProgress(wt.WorkDoneProgress.type,this._token,{kind:"end"})}}n.Instances=new Map;class r extends n{constructor(e,t){super(e,t),this._source=new wt.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose(),super.done()}cancel(){this._source.cancel()}}class o{constructor(){}begin(){}report(){}done(){}}class i extends o{constructor(){super(),this._source=new wt.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose()}cancel(){this._source.cancel()}}t.attachWorkDone=function(e,t){if(void 0===t||void 0===t.workDoneToken)return new o;const r=t.workDoneToken;return delete t.workDoneToken,new n(e,r)};var s;t.ProgressFeature=e=>class extends e{constructor(){super(),this._progressSupported=!1}initialize(e){var t;!0===(null===(t=null==e?void 0:e.window)||void 0===t?void 0:t.workDoneProgress)&&(this._progressSupported=!0,this.connection.onNotification(wt.WorkDoneProgressCancelNotification.type,e=>{let t=n.Instances.get(e.token);(t instanceof r||t instanceof i)&&t.cancel()}))}attachWorkDoneProgress(e){return void 0===e?new o:new n(this.connection,e)}createWorkDoneProgress(){if(this._progressSupported){const e=Pt.generateUuid();return this.connection.sendRequest(wt.WorkDoneProgressCreateRequest.type,{token:e}).then(()=>new r(this.connection,e))}return Promise.resolve(new i)}},function(e){e.type=new wt.ProgressType}(s||(s={}));class a{constructor(e,t){this._connection=e,this._token=t}report(e){this._connection.sendProgress(s.type,this._token,e)}}t.attachPartialResult=function(e,t){if(void 0===t||void 0===t.partialResultToken)return;const n=t.partialResultToken;return delete t.partialResultToken,new a(e,n)}})),kt=b((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigurationFeature=void 0;t.ConfigurationFeature=e=>class extends e{getConfiguration(e){return e?_.string(e)?this._getConfiguration({section:e}):this._getConfiguration(e):this._getConfiguration({})}_getConfiguration(e){let t={items:Array.isArray(e)?e:[e]};return this.connection.sendRequest(wt.ConfigurationRequest.type,t).then(t=>Array.isArray(e)?t:t[0])}}})),qt=b((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceFoldersFeature=void 0;t.WorkspaceFoldersFeature=e=>class extends e{initialize(e){let t=e.workspace;t&&t.workspaceFolders&&(this._onDidChangeWorkspaceFolders=new wt.Emitter,this.connection.onNotification(wt.DidChangeWorkspaceFoldersNotification.type,e=>{this._onDidChangeWorkspaceFolders.fire(e.event)}))}getWorkspaceFolders(){return this.connection.sendRequest(wt.WorkspaceFoldersRequest.type)}get onDidChangeWorkspaceFolders(){if(!this._onDidChangeWorkspaceFolders)throw new Error("Client doesn't support sending workspace folder change events.");return this._unregistration||(this._unregistration=this.connection.client.register(wt.DidChangeWorkspaceFoldersNotification.type)),this._onDidChangeWorkspaceFolders.event}}})),Dt=b((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.CallHierarchyFeature=void 0;t.CallHierarchyFeature=e=>class extends e{get callHierarchy(){return{onPrepare:e=>{this.connection.onRequest(wt.CallHierarchyPrepareRequest.type,(t,n)=>e(t,n,this.attachWorkDoneProgress(t),void 0))},onIncomingCalls:e=>{const t=wt.CallHierarchyIncomingCallsRequest.type;this.connection.onRequest(t,(n,r)=>e(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n)))},onOutgoingCalls:e=>{const t=wt.CallHierarchyOutgoingCallsRequest.type;this.connection.onRequest(t,(n,r)=>e(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n)))}}}}})),St=b((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.SemanticTokensBuilder=t.SemanticTokensFeature=void 0;t.SemanticTokensFeature=e=>class extends e{get semanticTokens(){return{on:e=>{const t=wt.SemanticTokensRequest.type;this.connection.onRequest(t,(n,r)=>e(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n)))},onDelta:e=>{const t=wt.SemanticTokensDeltaRequest.type;this.connection.onRequest(t,(n,r)=>e(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n)))},onRange:e=>{const t=wt.SemanticTokensRangeRequest.type;this.connection.onRequest(t,(n,r)=>e(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n)))}}}};t.SemanticTokensBuilder=class{constructor(){this._prevData=void 0,this.initialize()}initialize(){this._id=Date.now(),this._prevLine=0,this._prevChar=0,this._data=[],this._dataLen=0}push(e,t,n,r,o){let i=e,s=t;this._dataLen>0&&(i-=this._prevLine,0===i&&(s-=this._prevChar)),this._data[this._dataLen++]=i,this._data[this._dataLen++]=s,this._data[this._dataLen++]=n,this._data[this._dataLen++]=r,this._data[this._dataLen++]=o,this._prevLine=e,this._prevChar=t}get id(){return this._id.toString()}previousResult(e){this.id===e&&(this._prevData=this._data),this.initialize()}build(){return this._prevData=void 0,{resultId:this.id,data:this._data}}canBuildEdits(){return void 0!==this._prevData}buildEdits(){if(void 0!==this._prevData){const e=this._prevData.length,t=this._data.length;let n=0;for(;n<t&&n<e&&this._prevData[n]===this._data[n];)n++;if(n<t&&n<e){let r=0;for(;r<t&&r<e&&this._prevData[e-1-r]===this._data[t-1-r];)r++;const o=this._data.slice(n,t-r);return{resultId:this.id,edits:[{start:n,deleteCount:e-r-n,data:o}]}}return n<t?{resultId:this.id,edits:[{start:n,deleteCount:0,data:this._data.slice(n)}]}:n<e?{resultId:this.id,edits:[{start:n,deleteCount:e-n}]}:{resultId:this.id,edits:[]}}return this.build()}}})),xt=b((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.ShowDocumentFeature=void 0;t.ShowDocumentFeature=e=>class extends e{showDocument(e){return this.connection.sendRequest(wt.ShowDocumentRequest.type,e)}}})),Et=b((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.FileOperationsFeature=void 0;t.FileOperationsFeature=e=>class extends e{onDidCreateFiles(e){this.connection.onNotification(wt.DidCreateFilesNotification.type,t=>{e(t)})}onDidRenameFiles(e){this.connection.onNotification(wt.DidRenameFilesNotification.type,t=>{e(t)})}onDidDeleteFiles(e){this.connection.onNotification(wt.DidDeleteFilesNotification.type,t=>{e(t)})}onWillCreateFiles(e){return this.connection.onRequest(wt.WillCreateFilesRequest.type,(t,n)=>e(t,n))}onWillRenameFiles(e){return this.connection.onRequest(wt.WillRenameFilesRequest.type,(t,n)=>e(t,n))}onWillDeleteFiles(e){return this.connection.onRequest(wt.WillDeleteFilesRequest.type,(t,n)=>e(t,n))}}})),Ot=b((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.LinkedEditingRangeFeature=void 0;t.LinkedEditingRangeFeature=e=>class extends e{onLinkedEditingRange(e){this.connection.onRequest(wt.LinkedEditingRangeRequest.type,(t,n)=>e(t,n,this.attachWorkDoneProgress(t),void 0))}}})),Nt=b((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MonikerFeature=void 0;t.MonikerFeature=e=>class extends e{get moniker(){return{on:e=>{const t=wt.MonikerRequest.type;this.connection.onRequest(t,(n,r)=>e(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n)))}}}}})),Mt=b((function(e,t){function n(e){if(null!==e)return e}Object.defineProperty(t,"__esModule",{value:!0}),t.createConnection=t.combineFeatures=t.combineLanguagesFeatures=t.combineWorkspaceFeatures=t.combineWindowFeatures=t.combineClientFeatures=t.combineTracerFeatures=t.combineTelemetryFeatures=t.combineConsoleFeatures=t._LanguagesImpl=t.BulkUnregistration=t.BulkRegistration=t.ErrorMessageTracker=t.TextDocuments=void 0;t.TextDocuments=class{constructor(e){this._documents=Object.create(null),this._configuration=e,this._onDidChangeContent=new wt.Emitter,this._onDidOpen=new wt.Emitter,this._onDidClose=new wt.Emitter,this._onDidSave=new wt.Emitter,this._onWillSave=new wt.Emitter}get onDidChangeContent(){return this._onDidChangeContent.event}get onDidOpen(){return this._onDidOpen.event}get onWillSave(){return this._onWillSave.event}onWillSaveWaitUntil(e){this._willSaveWaitUntil=e}get onDidSave(){return this._onDidSave.event}get onDidClose(){return this._onDidClose.event}get(e){return this._documents[e]}all(){return Object.keys(this._documents).map(e=>this._documents[e])}keys(){return Object.keys(this._documents)}listen(e){e.__textDocumentSync=wt.TextDocumentSyncKind.Full,e.onDidOpenTextDocument(e=>{let t=e.textDocument,n=this._configuration.create(t.uri,t.languageId,t.version,t.text);this._documents[t.uri]=n;let r=Object.freeze({document:n});this._onDidOpen.fire(r),this._onDidChangeContent.fire(r)}),e.onDidChangeTextDocument(e=>{let t=e.textDocument,n=e.contentChanges;if(0===n.length)return;let r=this._documents[t.uri];const{version:o}=t;if(null==o)throw new Error(`Received document change event for ${t.uri} without valid version identifier`);r=this._configuration.update(r,n,o),this._documents[t.uri]=r,this._onDidChangeContent.fire(Object.freeze({document:r}))}),e.onDidCloseTextDocument(e=>{let t=this._documents[e.textDocument.uri];t&&(delete this._documents[e.textDocument.uri],this._onDidClose.fire(Object.freeze({document:t})))}),e.onWillSaveTextDocument(e=>{let t=this._documents[e.textDocument.uri];t&&this._onWillSave.fire(Object.freeze({document:t,reason:e.reason}))}),e.onWillSaveTextDocumentWaitUntil((e,t)=>{let n=this._documents[e.textDocument.uri];return n&&this._willSaveWaitUntil?this._willSaveWaitUntil(Object.freeze({document:n,reason:e.reason}),t):[]}),e.onDidSaveTextDocument(e=>{let t=this._documents[e.textDocument.uri];t&&this._onDidSave.fire(Object.freeze({document:t}))})}};t.ErrorMessageTracker=class{constructor(){this._messages=Object.create(null)}add(e){let t=this._messages[e];t||(t=0),t++,this._messages[e]=t}sendErrors(e){Object.keys(this._messages).forEach(t=>{e.window.showErrorMessage(t)})}};class r{constructor(){}rawAttach(e){this._rawConnection=e}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}fillServerCapabilities(e){}initialize(e){}error(e){this.send(wt.MessageType.Error,e)}warn(e){this.send(wt.MessageType.Warning,e)}info(e){this.send(wt.MessageType.Info,e)}log(e){this.send(wt.MessageType.Log,e)}send(e,t){this._rawConnection&&this._rawConnection.sendNotification(wt.LogMessageNotification.type,{type:e,message:t})}}const o=xt.ShowDocumentFeature(Ct.ProgressFeature(class{constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}showErrorMessage(e,...t){let r={type:wt.MessageType.Error,message:e,actions:t};return this.connection.sendRequest(wt.ShowMessageRequest.type,r).then(n)}showWarningMessage(e,...t){let r={type:wt.MessageType.Warning,message:e,actions:t};return this.connection.sendRequest(wt.ShowMessageRequest.type,r).then(n)}showInformationMessage(e,...t){let r={type:wt.MessageType.Info,message:e,actions:t};return this.connection.sendRequest(wt.ShowMessageRequest.type,r).then(n)}}));(t.BulkRegistration||(t.BulkRegistration={})).create=function(){return new i};class i{constructor(){this._registrations=[],this._registered=new Set}add(e,t){const n=_.string(e)?e:e.method;if(this._registered.has(n))throw new Error(n+" is already added to this registration");const r=Pt.generateUuid();this._registrations.push({id:r,method:n,registerOptions:t||{}}),this._registered.add(n)}asRegistrationParams(){return{registrations:this._registrations}}}(t.BulkUnregistration||(t.BulkUnregistration={})).create=function(){return new s(void 0,[])};class s{constructor(e,t){this._connection=e,this._unregistrations=new Map,t.forEach(e=>{this._unregistrations.set(e.method,e)})}get isAttached(){return!!this._connection}attach(e){this._connection=e}add(e){this._unregistrations.set(e.method,e)}dispose(){let e=[];for(let t of this._unregistrations.values())e.push(t);let t={unregisterations:e};this._connection.sendRequest(wt.UnregistrationRequest.type,t).then(void 0,e=>{this._connection.console.info("Bulk unregistration failed.")})}disposeSingle(e){const t=_.string(e)?e:e.method,n=this._unregistrations.get(t);if(!n)return!1;let r={unregisterations:[n]};return this._connection.sendRequest(wt.UnregistrationRequest.type,r).then(()=>{this._unregistrations.delete(t)},e=>{this._connection.console.info(`Un-registering request handler for ${n.id} failed.`)}),!0}}class a{attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}register(e,t,n){return e instanceof i?this.registerMany(e):e instanceof s?this.registerSingle1(e,t,n):this.registerSingle2(e,t)}registerSingle1(e,t,n){const r=_.string(t)?t:t.method,o=Pt.generateUuid();let i={registrations:[{id:o,method:r,registerOptions:n||{}}]};return e.isAttached||e.attach(this.connection),this.connection.sendRequest(wt.RegistrationRequest.type,i).then(t=>(e.add({id:o,method:r}),e),e=>(this.connection.console.info(`Registering request handler for ${r} failed.`),Promise.reject(e)))}registerSingle2(e,t){const n=_.string(e)?e:e.method,r=Pt.generateUuid();let o={registrations:[{id:r,method:n,registerOptions:t||{}}]};return this.connection.sendRequest(wt.RegistrationRequest.type,o).then(e=>wt.Disposable.create(()=>{this.unregisterSingle(r,n)}),e=>(this.connection.console.info(`Registering request handler for ${n} failed.`),Promise.reject(e)))}unregisterSingle(e,t){let n={unregisterations:[{id:e,method:t}]};return this.connection.sendRequest(wt.UnregistrationRequest.type,n).then(void 0,t=>{this.connection.console.info(`Un-registering request handler for ${e} failed.`)})}registerMany(e){let t=e.asRegistrationParams();return this.connection.sendRequest(wt.RegistrationRequest.type,t).then(()=>new s(this._connection,t.registrations.map(e=>({id:e.id,method:e.method}))),e=>(this.connection.console.info("Bulk registration failed."),Promise.reject(e)))}}const c=Et.FileOperationsFeature(qt.WorkspaceFoldersFeature(kt.ConfigurationFeature(class{constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}applyEdit(e){let t=(n=e)&&n.edit?e:{edit:e};var n;return this.connection.sendRequest(wt.ApplyWorkspaceEditRequest.type,t)}})));class u{constructor(){this._trace=wt.Trace.Off}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}set trace(e){this._trace=e}log(e,t){this._trace!==wt.Trace.Off&&this.connection.sendNotification(wt.LogTraceNotification.type,{message:e,verbose:this._trace===wt.Trace.Verbose?t:void 0})}}class l{constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}logEvent(e){this.connection.sendNotification(wt.TelemetryEventNotification.type,e)}}class d{constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}attachWorkDoneProgress(e){return Ct.attachWorkDone(this.connection,e)}attachPartialResultProgress(e,t){return Ct.attachPartialResult(this.connection,t)}}t._LanguagesImpl=d;const f=Nt.MonikerFeature(Ot.LinkedEditingRangeFeature(St.SemanticTokensFeature(Dt.CallHierarchyFeature(d))));function h(e,t){return function(n){return t(e(n))}}function p(e,t){return function(n){return t(e(n))}}function g(e,t){return function(n){return t(e(n))}}function m(e,t){return function(n){return t(e(n))}}function y(e,t){return function(n){return t(e(n))}}function v(e,t){return function(n){return t(e(n))}}t.combineConsoleFeatures=h,t.combineTelemetryFeatures=p,t.combineTracerFeatures=g,t.combineClientFeatures=m,t.combineWindowFeatures=y,t.combineWorkspaceFeatures=v,t.combineLanguagesFeatures=function(e,t){return function(n){return t(e(n))}},t.combineFeatures=function(e,t){function n(e,t,n){return e&&t?n(e,t):e||t}return{__brand:"features",console:n(e.console,t.console,h),tracer:n(e.tracer,t.tracer,g),telemetry:n(e.telemetry,t.telemetry,p),client:n(e.client,t.client,m),window:n(e.window,t.window,y),workspace:n(e.workspace,t.workspace,v)}},t.createConnection=function(e,t,n){const i=n&&n.console?new(n.console(r)):new r,s=e(i);i.rawAttach(s);const d=n&&n.tracer?new(n.tracer(u)):new u,h=n&&n.telemetry?new(n.telemetry(l)):new l,p=n&&n.client?new(n.client(a)):new a,g=n&&n.window?new(n.window(o)):new o,m=n&&n.workspace?new(n.workspace(c)):new c,y=n&&n.languages?new(n.languages(f)):new f,v=[i,d,h,p,g,m,y];function R(e){return e instanceof Promise?e:_.thenable(e)?new Promise((t,n)=>{e.then(e=>t(e),e=>n(e))}):Promise.resolve(e)}let b=void 0,T=void 0,w=void 0,P={listen:()=>s.listen(),sendRequest:(e,...t)=>s.sendRequest(_.string(e)?e:e.method,...t),onRequest:(e,t)=>s.onRequest(e,t),sendNotification:(e,t)=>{const n=_.string(e)?e:e.method;1===arguments.length?s.sendNotification(n):s.sendNotification(n,t)},onNotification:(e,t)=>s.onNotification(e,t),onProgress:s.onProgress,sendProgress:s.sendProgress,onInitialize:e=>T=e,onInitialized:e=>s.onNotification(wt.InitializedNotification.type,e),onShutdown:e=>b=e,onExit:e=>w=e,get console(){return i},get telemetry(){return h},get tracer(){return d},get client(){return p},get window(){return g},get workspace(){return m},get languages(){return y},onDidChangeConfiguration:e=>s.onNotification(wt.DidChangeConfigurationNotification.type,e),onDidChangeWatchedFiles:e=>s.onNotification(wt.DidChangeWatchedFilesNotification.type,e),__textDocumentSync:void 0,onDidOpenTextDocument:e=>s.onNotification(wt.DidOpenTextDocumentNotification.type,e),onDidChangeTextDocument:e=>s.onNotification(wt.DidChangeTextDocumentNotification.type,e),onDidCloseTextDocument:e=>s.onNotification(wt.DidCloseTextDocumentNotification.type,e),onWillSaveTextDocument:e=>s.onNotification(wt.WillSaveTextDocumentNotification.type,e),onWillSaveTextDocumentWaitUntil:e=>s.onRequest(wt.WillSaveTextDocumentWaitUntilRequest.type,e),onDidSaveTextDocument:e=>s.onNotification(wt.DidSaveTextDocumentNotification.type,e),sendDiagnostics:e=>s.sendNotification(wt.PublishDiagnosticsNotification.type,e),onHover:e=>s.onRequest(wt.HoverRequest.type,(t,n)=>e(t,n,Ct.attachWorkDone(s,t),void 0)),onCompletion:e=>s.onRequest(wt.CompletionRequest.type,(t,n)=>e(t,n,Ct.attachWorkDone(s,t),Ct.attachPartialResult(s,t))),onCompletionResolve:e=>s.onRequest(wt.CompletionResolveRequest.type,e),onSignatureHelp:e=>s.onRequest(wt.SignatureHelpRequest.type,(t,n)=>e(t,n,Ct.attachWorkDone(s,t),void 0)),onDeclaration:e=>s.onRequest(wt.DeclarationRequest.type,(t,n)=>e(t,n,Ct.attachWorkDone(s,t),Ct.attachPartialResult(s,t))),onDefinition:e=>s.onRequest(wt.DefinitionRequest.type,(t,n)=>e(t,n,Ct.attachWorkDone(s,t),Ct.attachPartialResult(s,t))),onTypeDefinition:e=>s.onRequest(wt.TypeDefinitionRequest.type,(t,n)=>e(t,n,Ct.attachWorkDone(s,t),Ct.attachPartialResult(s,t))),onImplementation:e=>s.onRequest(wt.ImplementationRequest.type,(t,n)=>e(t,n,Ct.attachWorkDone(s,t),Ct.attachPartialResult(s,t))),onReferences:e=>s.onRequest(wt.ReferencesRequest.type,(t,n)=>e(t,n,Ct.attachWorkDone(s,t),Ct.attachPartialResult(s,t))),onDocumentHighlight:e=>s.onRequest(wt.DocumentHighlightRequest.type,(t,n)=>e(t,n,Ct.attachWorkDone(s,t),Ct.attachPartialResult(s,t))),onDocumentSymbol:e=>s.onRequest(wt.DocumentSymbolRequest.type,(t,n)=>e(t,n,Ct.attachWorkDone(s,t),Ct.attachPartialResult(s,t))),onWorkspaceSymbol:e=>s.onRequest(wt.WorkspaceSymbolRequest.type,(t,n)=>e(t,n,Ct.attachWorkDone(s,t),Ct.attachPartialResult(s,t))),onCodeAction:e=>s.onRequest(wt.CodeActionRequest.type,(t,n)=>e(t,n,Ct.attachWorkDone(s,t),Ct.attachPartialResult(s,t))),onCodeActionResolve:e=>s.onRequest(wt.CodeActionResolveRequest.type,(t,n)=>e(t,n)),onCodeLens:e=>s.onRequest(wt.CodeLensRequest.type,(t,n)=>e(t,n,Ct.attachWorkDone(s,t),Ct.attachPartialResult(s,t))),onCodeLensResolve:e=>s.onRequest(wt.CodeLensResolveRequest.type,(t,n)=>e(t,n)),onDocumentFormatting:e=>s.onRequest(wt.DocumentFormattingRequest.type,(t,n)=>e(t,n,Ct.attachWorkDone(s,t),void 0)),onDocumentRangeFormatting:e=>s.onRequest(wt.DocumentRangeFormattingRequest.type,(t,n)=>e(t,n,Ct.attachWorkDone(s,t),void 0)),onDocumentOnTypeFormatting:e=>s.onRequest(wt.DocumentOnTypeFormattingRequest.type,(t,n)=>e(t,n)),onRenameRequest:e=>s.onRequest(wt.RenameRequest.type,(t,n)=>e(t,n,Ct.attachWorkDone(s,t),void 0)),onPrepareRename:e=>s.onRequest(wt.PrepareRenameRequest.type,(t,n)=>e(t,n)),onDocumentLinks:e=>s.onRequest(wt.DocumentLinkRequest.type,(t,n)=>e(t,n,Ct.attachWorkDone(s,t),Ct.attachPartialResult(s,t))),onDocumentLinkResolve:e=>s.onRequest(wt.DocumentLinkResolveRequest.type,(t,n)=>e(t,n)),onDocumentColor:e=>s.onRequest(wt.DocumentColorRequest.type,(t,n)=>e(t,n,Ct.attachWorkDone(s,t),Ct.attachPartialResult(s,t))),onColorPresentation:e=>s.onRequest(wt.ColorPresentationRequest.type,(t,n)=>e(t,n,Ct.attachWorkDone(s,t),Ct.attachPartialResult(s,t))),onFoldingRanges:e=>s.onRequest(wt.FoldingRangeRequest.type,(t,n)=>e(t,n,Ct.attachWorkDone(s,t),Ct.attachPartialResult(s,t))),onSelectionRanges:e=>s.onRequest(wt.SelectionRangeRequest.type,(t,n)=>e(t,n,Ct.attachWorkDone(s,t),Ct.attachPartialResult(s,t))),onExecuteCommand:e=>s.onRequest(wt.ExecuteCommandRequest.type,(t,n)=>e(t,n,Ct.attachWorkDone(s,t),void 0)),dispose:()=>s.dispose()};for(let e of v)e.attach(P);return s.onRequest(wt.InitializeRequest.type,e=>{t.initialize(e),_.string(e.trace)&&(d.trace=wt.Trace.fromString(e.trace));for(let t of v)t.initialize(e.capabilities);if(T){return R(T(e,(new wt.CancellationTokenSource).token,Ct.attachWorkDone(s,e),void 0)).then(e=>{if(e instanceof wt.ResponseError)return e;let t=e;t||(t={capabilities:{}});let n=t.capabilities;n||(n={},t.capabilities=n),void 0===n.textDocumentSync||null===n.textDocumentSync?n.textDocumentSync=_.number(P.__textDocumentSync)?P.__textDocumentSync:wt.TextDocumentSyncKind.None:_.number(n.textDocumentSync)||_.number(n.textDocumentSync.change)||(n.textDocumentSync.change=_.number(P.__textDocumentSync)?P.__textDocumentSync:wt.TextDocumentSyncKind.None);for(let e of v)e.fillServerCapabilities(n);return t})}{let e={capabilities:{textDocumentSync:wt.TextDocumentSyncKind.None}};for(let t of v)t.fillServerCapabilities(e.capabilities);return e}}),s.onRequest(wt.ShutdownRequest.type,()=>(t.shutdownReceived=!0,b?b((new wt.CancellationTokenSource).token):void 0)),s.onNotification(wt.ExitNotification.type,()=>{try{w&&w()}finally{t.shutdownReceived?t.exit(0):t.exit(1)}}),s.onNotification(wt.SetTraceNotification.type,e=>{d.trace=wt.Trace.fromString(e.value)}),P}})),jt=b((function(e,t){function n(){return"win32"===process.platform}function r(e,t,n,r){const o=["var p = process;","p.on('message',function(m){","if(m.c==='e'){","p.exit(0);","}","else if(m.c==='rs'){","try{","var r=require.resolve(m.a);","p.send({c:'r',s:true,r:r});","}","catch(err){","p.send({c:'r',s:false});","}","}","});"].join("");return new Promise((i,s)=>{let a=process.env,c=Object.create(null);Object.keys(a).forEach(e=>c[e]=a[e]),t&&m.default.existsSync(t)&&(c.NODE_PATH?c.NODE_PATH=t+d.default.delimiter+c.NODE_PATH:c.NODE_PATH=t,r&&r("NODE_PATH value is: "+c.NODE_PATH)),c.ELECTRON_RUN_AS_NODE="1";try{let t=y.default.fork("",[],{cwd:n,env:c,execArgv:["-e",o]});if(void 0===t.pid)return void s(new Error(`Starting process to resolve node module ${e} failed`));t.on("error",e=>{s(e)}),t.on("message",n=>{"r"===n.c&&(t.send({c:"e"}),n.s?i(n.r):s(new Error("Failed to resolve module: "+e)))});let r={c:"rs",a:e};t.send(r)}catch(e){s(e)}})}function o(e){let t="npm";const r=Object.create(null);Object.keys(process.env).forEach(e=>r[e]=process.env[e]),r.NO_UPDATE_NOTIFIER="true";const o={encoding:"utf8",env:r};n()&&(t="npm.cmd",o.shell=!0);let i=()=>{};try{process.on("SIGPIPE",i);let r=y.default.spawnSync(t,["config","get","prefix"],o).stdout;if(!r)return void(e&&e("'npm config get prefix' didn't return a value."));let s=r.trim();return e&&e("'npm config get prefix' value is: "+s),s.length>0?n()?d.default.join(s,"node_modules"):d.default.join(s,"lib","node_modules"):void 0}catch(e){return}finally{process.removeListener("SIGPIPE",i)}}var i;Object.defineProperty(t,"__esModule",{value:!0}),t.resolveModulePath=t.FileSystem=t.resolveGlobalYarnPath=t.resolveGlobalNodePath=t.resolve=t.uriToFilePath=void 0,t.uriToFilePath=function(e){let t=g.default.parse(e);if("file:"!==t.protocol||!t.path)return;let n=t.path.split("/");for(var r=0,o=n.length;r<o;r++)n[r]=decodeURIComponent(n[r]);if("win32"===process.platform&&n.length>1){let e=n[0],t=n[1];0===e.length&&t.length>1&&":"===t[1]&&n.shift()}return d.default.normalize(n.join("/"))},t.resolve=r,t.resolveGlobalNodePath=o,t.resolveGlobalYarnPath=function(e){let t="yarn",r={encoding:"utf8"};n()&&(t="yarn.cmd",r.shell=!0);let o=()=>{};try{process.on("SIGPIPE",o);let n=y.default.spawnSync(t,["global","dir","--json"],r),i=n.stdout;if(!i)return void(e&&(e("'yarn global dir' didn't return a value."),n.stderr&&e(n.stderr)));let s=i.trim().split(/\r?\n/);for(let e of s)try{let t=JSON.parse(e);if("log"===t.type)return d.default.join(t.data,"node_modules")}catch(e){}return}catch(e){return}finally{process.removeListener("SIGPIPE",o)}},function(e){let t=void 0;function n(){return void 0!==t||(t="win32"!==process.platform&&(!m.default.existsSync(__filename.toUpperCase())||!m.default.existsSync(__filename.toLowerCase()))),t}e.isCaseSensitive=n,e.isParent=function(e,t){return n()?0===d.default.normalize(t).indexOf(d.default.normalize(e)):0===d.default.normalize(t).toLowerCase().indexOf(d.default.normalize(e).toLowerCase())}}(i=t.FileSystem||(t.FileSystem={})),t.resolveModulePath=function(e,t,n,s){return n?(d.default.isAbsolute(n)||(n=d.default.join(e,n)),r(t,n,n,s).then(e=>i.isParent(n,e)?e:Promise.reject(new Error(`Failed to load ${t} from node path location.`))).then(void 0,n=>r(t,o(s),e,s))):r(t,o(s),e,s)}})),Ft=wt,Wt=b((function(e,t){var n=v&&v.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),r=v&&v.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.ProposedFeatures=t.SemanticTokensBuilder=void 0,Object.defineProperty(t,"SemanticTokensBuilder",{enumerable:!0,get:function(){return St.SemanticTokensBuilder}}),r(wt,t),r(Mt,t),(t.ProposedFeatures||(t.ProposedFeatures={})).all={__brand:"features"}})),Lt=b((function(e,t){var n,r=v&&v.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=v&&v.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.createConnection=t.Files=void 0,o(Ft,t),o(Wt,t),(n=t.Files||(t.Files={})).uriToFilePath=jt.uriToFilePath,n.resolveGlobalNodePath=jt.resolveGlobalNodePath,n.resolveGlobalYarnPath=jt.resolveGlobalYarnPath,n.resolve=jt.resolve,n.resolveModulePath=jt.resolveModulePath;let i=!1,s=void 0;!function(){const e="--clientProcessId";function t(e){try{let t=parseInt(e);isNaN(t)||(s=setInterval(()=>{try{process.kill(t,0)}catch(e){process.exit(i?0:1)}},3e3))}catch(e){}}for(let n=2;n<process.argv.length;n++){let r=process.argv[n];if(r===e&&n+1<process.argv.length)return void t(process.argv[n+1]);{let n=r.split("=");n[0]===e&&t(n[1])}}}();const a={initialize:e=>{const t=e.processId;_.number(t)&&void 0===s&&setInterval(()=>{try{process.kill(t,0)}catch(e){process.exit(i?0:1)}},3e3)},get shutdownReceived(){return i},set shutdownReceived(e){i=e},exit:e=>{process.exit(e)}};t.createConnection=function(e,t,n,r){let o,s,c,u;return void 0!==e&&"features"===e.__brand&&(o=e,e=t,t=n,n=r),Ft.ConnectionStrategy.is(e)||Ft.ConnectionOptions.is(e)?u=e:(s=e,c=t,u=n),function(e,t,n,r){if(!e&&!t&&process.argv.length>2){let n=void 0,r=void 0,i=process.argv.slice(2);for(let s=0;s<i.length;s++){let a=i[s];if("--node-ipc"===a){e=new Ft.IPCMessageReader(process),t=new Ft.IPCMessageWriter(process);break}if("--stdio"===a){e=process.stdin,t=process.stdout;break}if("--socket"===a){n=parseInt(i[s+1]);break}if("--pipe"===a){r=i[s+1];break}var o=a.split("=");if("--socket"===o[0]){n=parseInt(o[1]);break}if("--pipe"===o[0]){r=o[1];break}}if(n){let r=Ft.createServerSocketTransport(n);e=r[0],t=r[1]}else if(r){let n=Ft.createServerPipeTransport(r);e=n[0],t=n[1]}}var s="Use arguments of createConnection or set command line parameters: '--node-ipc', '--stdio' or '--socket={number}'";if(!e)throw new Error("Connection input stream is not set. "+s);if(!t)throw new Error("Connection output stream is not set. "+s);if(_.func(e.read)&&_.func(e.on)){let t=e;t.on("end",()=>{process.exit(i?0:1)}),t.on("close",()=>{process.exit(i?0:1)})}const c=r=>Ft.createProtocolConnection(e,t,r,n);return Mt.createConnection(c,a,r)}(s,c,u,o)}}));const It=process.argv.length<=2?Lt.createConnection(process.stdin,process.stdout):Lt.createConnection();console.log=(...e)=>It.console.log(e.join(" ")),console.error=(...e)=>It.console.error(e.join(" "));const At=new c.VLS(It);It.onInitialize(async e=>(await At.init(e),console.log("Vetur initialized"),{capabilities:At.capabilities})),At.listen();
r [Error]: Method not found
at /home/hyundeok/git/lsp-examples/vue/node_modules/vls/dist/vueServerMain.js:1:33573
at /home/hyundeok/git/lsp-examples/vue/node_modules/vls/dist/vueServerMain.js:1:33868
at Immediate.<anonymous> (/home/hyundeok/git/lsp-examples/vue/node_modules/vls/dist/vueServerMain.js:1:34233)
at processImmediate (node:internal/timers:464:21) {
code: -32601,
data: undefined
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment