@likec4/mcp 1.57.0 → 1.58.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/dist/chunks/libs/@chevrotain/gast.mjs +1 -1
  2. package/dist/chunks/libs/@hono/mcp.mjs +2 -2
  3. package/dist/chunks/libs/@logtape/logtape.mjs +4 -3
  4. package/dist/chunks/libs/@modelcontextprotocol/sdk.mjs +1 -1
  5. package/dist/chunks/libs/chevrotain-allstar.mjs +2 -2
  6. package/dist/chunks/libs/chevrotain.mjs +25 -25
  7. package/dist/chunks/libs/fdir.mjs +1 -1
  8. package/dist/chunks/libs/hast-util-to-html.mjs +2 -2
  9. package/dist/chunks/libs/langium.mjs +2 -2
  10. package/dist/chunks/libs/mdast-util-find-and-replace.mjs +1 -1
  11. package/dist/chunks/libs/mdast-util-from-markdown.mjs +2 -2
  12. package/dist/chunks/libs/mdast-util-gfm.mjs +5 -5
  13. package/dist/chunks/libs/mdast-util-to-hast.mjs +2 -2
  14. package/dist/chunks/libs/merge-error-cause.mjs +2 -2
  15. package/dist/chunks/libs/nano-spawn.mjs +2 -2
  16. package/dist/chunks/libs/pretty-ms.mjs +1 -1
  17. package/dist/chunks/libs/remeda.mjs +1 -1
  18. package/dist/chunks/libs/ufo.mjs +1 -1
  19. package/dist/chunks/libs/unified.mjs +1 -1
  20. package/dist/chunks/libs/unstorage.mjs +1 -1
  21. package/dist/chunks/libs/which.mjs +1 -1
  22. package/dist/chunks/src.mjs +124 -105
  23. package/dist/cli.mjs +5 -1
  24. package/package.json +21 -21
  25. package/dist/chunks/libs/@chevrotain/utils.mjs +0 -1
  26. package/dist/chunks/libs/bail.mjs +0 -1
  27. package/dist/chunks/libs/ccount.mjs +0 -1
  28. package/dist/chunks/libs/character-entities-html4.mjs +0 -1
  29. package/dist/chunks/libs/character-entities-legacy.mjs +0 -1
  30. package/dist/chunks/libs/citty.mjs +0 -5
  31. package/dist/chunks/libs/comma-separated-tokens.mjs +0 -1
  32. package/dist/chunks/libs/decode-named-character-reference.mjs +0 -1
  33. package/dist/chunks/libs/defu.mjs +0 -1
  34. package/dist/chunks/libs/destr.mjs +0 -1
  35. package/dist/chunks/libs/devlop.mjs +0 -1
  36. package/dist/chunks/libs/escape-string-regexp.mjs +0 -1
  37. package/dist/chunks/libs/extend.mjs +0 -1
  38. package/dist/chunks/libs/is-error-instance.mjs +0 -1
  39. package/dist/chunks/libs/is-plain-obj.mjs +0 -1
  40. package/dist/chunks/libs/isexe.mjs +0 -1
  41. package/dist/chunks/libs/longest-streak.mjs +0 -1
  42. package/dist/chunks/libs/natural-compare-lite.mjs +0 -9
  43. package/dist/chunks/libs/ohash.mjs +0 -1
  44. package/dist/chunks/libs/p-limit.mjs +0 -1
  45. package/dist/chunks/libs/p-timeout.mjs +0 -1
  46. package/dist/chunks/libs/parse-ms.mjs +0 -1
  47. package/dist/chunks/libs/rehype-sanitize.mjs +0 -1
  48. package/dist/chunks/libs/rehype-stringify.mjs +0 -1
  49. package/dist/chunks/libs/remark-gfm.mjs +0 -1
  50. package/dist/chunks/libs/remark-parse.mjs +0 -1
  51. package/dist/chunks/libs/safe-stringify.mjs +0 -1
  52. package/dist/chunks/libs/strip-indent.mjs +0 -1
  53. package/dist/chunks/libs/tinyrainbow.mjs +0 -1
  54. package/dist/chunks/libs/trough.mjs +0 -1
  55. package/dist/chunks/libs/ts-graphviz.mjs +0 -1
  56. package/dist/chunks/libs/unctx.mjs +0 -1
  57. package/dist/chunks/libs/word-wrap.mjs +0 -12
@@ -9,11 +9,11 @@ import{a as t,c as n,i,n as o,o as s,r as c,s as u,t as f}from"../rolldown-runti
9
9
 
10
10
  `),B.log(`Received notification '${t.method}'.`,n)}else logLSPMessage(`receive-notification`,t)}function traceReceivedResponse(t,n){if(!(z===_.Off||!B))if(de===S.Text){let i;if((z===_.Verbose||z===_.Compact)&&(t.error&&t.error.data?i=`Error data: ${stringifyTrace(t.error.data)}\n\n`:t.result?i=`Result: ${stringifyTrace(t.result)}\n\n`:t.error===void 0&&(i=`No result returned.
11
11
 
12
- `)),n){let o=t.error?` Request failed: ${t.error.message} (${t.error.code}).`:``;B.log(`Received response '${n.method} - (${t.id})' in ${Date.now()-n.timerStart}ms.${o}`,i)}else B.log(`Received response ${t.id} without active response promise.`,i)}else logLSPMessage(`receive-response`,t)}function logLSPMessage(t,n){if(!B||z===_.Off)return;let i={isLSPMessage:!0,type:t,message:n,timestamp:Date.now()};B.log(i)}function throwIfClosedOrDisposed(){if(isClosed())throw new ee(D.Closed,`Connection is closed.`);if(isDisposed())throw new ee(D.Disposed,`Connection is disposed.`)}function throwIfListening(){if(isListening())throw new ee(D.AlreadyListening,`Connection is already listening`)}function throwIfNotListening(){if(!isListening())throw Error(`Call listen() first.`)}function undefinedToNull(t){return t===void 0?null:t}function nullToUndefined(t){if(t!==null)return t}function isNamedParam(t){return t!=null&&!Array.isArray(t)&&typeof t==`object`}function computeSingleParam(t,n){switch(t){case o.ParameterStructures.auto:return isNamedParam(n)?nullToUndefined(n):[undefinedToNull(n)];case o.ParameterStructures.byName:if(!isNamedParam(n))throw Error(`Received parameters by name but param is not an object literal.`);return nullToUndefined(n);case o.ParameterStructures.byPosition:return[undefinedToNull(n)];default:throw Error(`Unknown parameter structure ${t.toString()}`)}}function computeMessageParams(t,n){let i,o=t.numberOfParams;switch(o){case 0:i=void 0;break;case 1:i=computeSingleParam(t.parameterStructures,n[0]);break;default:i=[];for(let t=0;t<n.length&&t<o;t++)i.push(undefinedToNull(n[t]));if(n.length<o)for(let t=n.length;t<o;t++)i.push(null);break}return i}let _e={sendNotification:(t,...n)=>{throwIfClosedOrDisposed();let s,c;if(i.string(t)){s=t;let i=n[0],u=0,f=o.ParameterStructures.auto;o.ParameterStructures.is(i)&&(u=1,f=i);let p=n.length,h=p-u;switch(h){case 0:c=void 0;break;case 1:c=computeSingleParam(f,n[u]);break;default:if(f===o.ParameterStructures.byName)throw Error(`Received ${h} parameters for 'by Name' notification parameter structure.`);c=n.slice(u,p).map(t=>undefinedToNull(t));break}}else{let i=n;s=t.method,c=computeMessageParams(t,i)}let u={jsonrpc:`2.0`,method:s,params:c};return traceSendingNotification(u),O.write(u).catch(t=>{throw j.error(`Sending notification failed.`),t})},onNotification:(t,n)=>{throwIfClosedOrDisposed();let o;return i.func(t)?F=t:n&&(i.string(t)?(o=t,oe.set(t,{type:void 0,handler:n})):(o=t.method,oe.set(t.method,{type:t,handler:n}))),{dispose:()=>{o===void 0?F=void 0:oe.delete(o)}}},onProgress:(t,n,i)=>{if(se.has(n))throw Error(`Progress handler for token ${n} already registered`);return se.set(n,i),{dispose:()=>{se.delete(n)}}},sendProgress:(t,n,i)=>_e.sendNotification(h.type,{token:n,value:i}),onUnhandledProgress:me.event,sendRequest:(t,...n)=>{throwIfClosedOrDisposed(),throwIfNotListening();let s,c,f;if(i.string(t)){s=t;let i=n[0],p=n[n.length-1],h=0,g=o.ParameterStructures.auto;o.ParameterStructures.is(i)&&(h=1,g=i);let _=n.length;u.CancellationToken.is(p)&&(--_,f=p);let x=_-h;switch(x){case 0:c=void 0;break;case 1:c=computeSingleParam(g,n[h]);break;default:if(g===o.ParameterStructures.byName)throw Error(`Received ${x} parameters for 'by Name' request parameter structure.`);c=n.slice(h,_).map(t=>undefinedToNull(t));break}}else{let i=n;s=t.method,c=computeMessageParams(t,i);let o=t.numberOfParams;f=u.CancellationToken.is(i[o])?i[o]:void 0}let p=ne++,h;f&&(h=f.onCancellationRequested(()=>{let t=ge.sender.sendCancellation(_e,p);return t===void 0?(j.log(`Received no promise from cancellation strategy when cancelling id ${p}`),Promise.resolve()):t.catch(()=>{j.log(`Sending cancellation messages for id ${p} failed`)})}));let g={jsonrpc:`2.0`,id:p,method:s,params:c};return traceSendingRequest(g),typeof ge.sender.enableCancellation==`function`&&ge.sender.enableCancellation(g),new Promise(async(t,n)=>{let resolveWithCleanup=n=>{t(n),ge.sender.cleanup(p),h?.dispose()},rejectWithCleanup=t=>{n(t),ge.sender.cleanup(p),h?.dispose()},i={method:s,timerStart:Date.now(),resolve:resolveWithCleanup,reject:rejectWithCleanup};try{await O.write(g),le.set(p,i)}catch(t){throw j.error(`Sending request failed.`),i.reject(new o.ResponseError(o.ErrorCodes.MessageWriteError,t.message?t.message:`Unknown reason`)),t}})},onRequest:(t,n)=>{throwIfClosedOrDisposed();let o=null;return g.is(t)?(o=void 0,N=t):i.string(t)?(o=null,n!==void 0&&(o=t,P.set(t,{handler:n,type:void 0}))):n!==void 0&&(o=t.method,P.set(t.method,{type:t,handler:n})),{dispose:()=>{o!==null&&(o===void 0?N=void 0:P.delete(o))}}},hasPendingResponse:()=>le.size>0,trace:async(t,n,o)=>{let s=!1,c=S.Text;o!==void 0&&(i.boolean(o)?s=o:(s=o.sendNotification||!1,c=o.traceFormat||S.Text)),z=t,de=c,B=z===_.Off?void 0:n,s&&!isClosed()&&!isDisposed()&&await _e.sendNotification(T.type,{value:_.toString(t)})},onError:H.event,onClose:fe.event,onUnhandledNotification:pe.event,onDispose:he.event,end:()=>{O.end()},dispose:()=>{if(isDisposed())return;V=I.Disposed,he.fire(void 0);let t=new o.ResponseError(o.ErrorCodes.PendingResponseRejected,`Pending response rejected since connection got disposed`);for(let n of le.values())n.reject(t);le=new Map,R=new Map,ue=new Set,L=new s.LinkedMap,i.func(O.dispose)&&O.dispose(),i.func(x.dispose)&&x.dispose()},listen:()=>{throwIfClosedOrDisposed(),throwIfListening(),V=I.Listening,x.listen(callback)},inspect:()=>{(0,n.default)().console.log(`inspect`)}};return _e.onNotification(E.type,t=>{if(z===_.Off||!B)return;let n=z===_.Verbose||z===_.Compact;B.log(t.message,n?t.verbose:void 0)}),_e.onNotification(h.type,t=>{let n=se.get(t.token);n?n(t.value):me.fire(t)}),_e}t.createMessageConnection=createMessageConnection})),se=f((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ProgressType=t.ProgressToken=t.createMessageConnection=t.NullLogger=t.ConnectionOptions=t.ConnectionStrategy=t.AbstractMessageBuffer=t.WriteableStreamMessageWriter=t.AbstractMessageWriter=t.MessageWriter=t.ReadableStreamMessageReader=t.AbstractMessageReader=t.MessageReader=t.SharedArrayReceiverStrategy=t.SharedArraySenderStrategy=t.CancellationToken=t.CancellationTokenSource=t.Emitter=t.Event=t.Disposable=t.LRUCache=t.Touch=t.LinkedMap=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.Message=t.RAL=void 0,t.MessageStrategy=t.CancellationStrategy=t.CancellationSenderStrategy=t.CancellationReceiverStrategy=t.ConnectionError=t.ConnectionErrors=t.LogTraceNotification=t.SetTraceNotification=t.TraceFormat=t.TraceValues=t.Trace=void 0;let n=te();Object.defineProperty(t,"Message",{enumerable:!0,get:function(){return n.Message}}),Object.defineProperty(t,"RequestType",{enumerable:!0,get:function(){return n.RequestType}}),Object.defineProperty(t,"RequestType0",{enumerable:!0,get:function(){return n.RequestType0}}),Object.defineProperty(t,"RequestType1",{enumerable:!0,get:function(){return n.RequestType1}}),Object.defineProperty(t,"RequestType2",{enumerable:!0,get:function(){return n.RequestType2}}),Object.defineProperty(t,"RequestType3",{enumerable:!0,get:function(){return n.RequestType3}}),Object.defineProperty(t,"RequestType4",{enumerable:!0,get:function(){return n.RequestType4}}),Object.defineProperty(t,"RequestType5",{enumerable:!0,get:function(){return n.RequestType5}}),Object.defineProperty(t,"RequestType6",{enumerable:!0,get:function(){return n.RequestType6}}),Object.defineProperty(t,"RequestType7",{enumerable:!0,get:function(){return n.RequestType7}}),Object.defineProperty(t,"RequestType8",{enumerable:!0,get:function(){return n.RequestType8}}),Object.defineProperty(t,"RequestType9",{enumerable:!0,get:function(){return n.RequestType9}}),Object.defineProperty(t,"ResponseError",{enumerable:!0,get:function(){return n.ResponseError}}),Object.defineProperty(t,"ErrorCodes",{enumerable:!0,get:function(){return n.ErrorCodes}}),Object.defineProperty(t,"NotificationType",{enumerable:!0,get:function(){return n.NotificationType}}),Object.defineProperty(t,"NotificationType0",{enumerable:!0,get:function(){return n.NotificationType0}}),Object.defineProperty(t,"NotificationType1",{enumerable:!0,get:function(){return n.NotificationType1}}),Object.defineProperty(t,"NotificationType2",{enumerable:!0,get:function(){return n.NotificationType2}}),Object.defineProperty(t,"NotificationType3",{enumerable:!0,get:function(){return n.NotificationType3}}),Object.defineProperty(t,"NotificationType4",{enumerable:!0,get:function(){return n.NotificationType4}}),Object.defineProperty(t,"NotificationType5",{enumerable:!0,get:function(){return n.NotificationType5}}),Object.defineProperty(t,"NotificationType6",{enumerable:!0,get:function(){return n.NotificationType6}}),Object.defineProperty(t,"NotificationType7",{enumerable:!0,get:function(){return n.NotificationType7}}),Object.defineProperty(t,"NotificationType8",{enumerable:!0,get:function(){return n.NotificationType8}}),Object.defineProperty(t,"NotificationType9",{enumerable:!0,get:function(){return n.NotificationType9}}),Object.defineProperty(t,"ParameterStructures",{enumerable:!0,get:function(){return n.ParameterStructures}});let i=j();Object.defineProperty(t,"LinkedMap",{enumerable:!0,get:function(){return i.LinkedMap}}),Object.defineProperty(t,"LRUCache",{enumerable:!0,get:function(){return i.LRUCache}}),Object.defineProperty(t,"Touch",{enumerable:!0,get:function(){return i.Touch}});let o=ne();Object.defineProperty(t,"Disposable",{enumerable:!0,get:function(){return o.Disposable}});let s=re();Object.defineProperty(t,"Event",{enumerable:!0,get:function(){return s.Event}}),Object.defineProperty(t,"Emitter",{enumerable:!0,get:function(){return s.Emitter}});let c=N();Object.defineProperty(t,"CancellationTokenSource",{enumerable:!0,get:function(){return c.CancellationTokenSource}}),Object.defineProperty(t,"CancellationToken",{enumerable:!0,get:function(){return c.CancellationToken}});let u=P();Object.defineProperty(t,"SharedArraySenderStrategy",{enumerable:!0,get:function(){return u.SharedArraySenderStrategy}}),Object.defineProperty(t,"SharedArrayReceiverStrategy",{enumerable:!0,get:function(){return u.SharedArrayReceiverStrategy}});let f=ie();Object.defineProperty(t,"MessageReader",{enumerable:!0,get:function(){return f.MessageReader}}),Object.defineProperty(t,"AbstractMessageReader",{enumerable:!0,get:function(){return f.AbstractMessageReader}}),Object.defineProperty(t,"ReadableStreamMessageReader",{enumerable:!0,get:function(){return f.ReadableStreamMessageReader}});let p=ae();Object.defineProperty(t,"MessageWriter",{enumerable:!0,get:function(){return p.MessageWriter}}),Object.defineProperty(t,"AbstractMessageWriter",{enumerable:!0,get:function(){return p.AbstractMessageWriter}}),Object.defineProperty(t,"WriteableStreamMessageWriter",{enumerable:!0,get:function(){return p.WriteableStreamMessageWriter}});let h=oe();Object.defineProperty(t,"AbstractMessageBuffer",{enumerable:!0,get:function(){return h.AbstractMessageBuffer}});let g=I();Object.defineProperty(t,"ConnectionStrategy",{enumerable:!0,get:function(){return g.ConnectionStrategy}}),Object.defineProperty(t,"ConnectionOptions",{enumerable:!0,get:function(){return g.ConnectionOptions}}),Object.defineProperty(t,"NullLogger",{enumerable:!0,get:function(){return g.NullLogger}}),Object.defineProperty(t,"createMessageConnection",{enumerable:!0,get:function(){return g.createMessageConnection}}),Object.defineProperty(t,"ProgressToken",{enumerable:!0,get:function(){return g.ProgressToken}}),Object.defineProperty(t,"ProgressType",{enumerable:!0,get:function(){return g.ProgressType}}),Object.defineProperty(t,"Trace",{enumerable:!0,get:function(){return g.Trace}}),Object.defineProperty(t,"TraceValues",{enumerable:!0,get:function(){return g.TraceValues}}),Object.defineProperty(t,"TraceFormat",{enumerable:!0,get:function(){return g.TraceFormat}}),Object.defineProperty(t,"SetTraceNotification",{enumerable:!0,get:function(){return g.SetTraceNotification}}),Object.defineProperty(t,"LogTraceNotification",{enumerable:!0,get:function(){return g.LogTraceNotification}}),Object.defineProperty(t,"ConnectionErrors",{enumerable:!0,get:function(){return g.ConnectionErrors}}),Object.defineProperty(t,"ConnectionError",{enumerable:!0,get:function(){return g.ConnectionError}}),Object.defineProperty(t,"CancellationReceiverStrategy",{enumerable:!0,get:function(){return g.CancellationReceiverStrategy}}),Object.defineProperty(t,"CancellationSenderStrategy",{enumerable:!0,get:function(){return g.CancellationSenderStrategy}}),Object.defineProperty(t,"CancellationStrategy",{enumerable:!0,get:function(){return g.CancellationStrategy}}),Object.defineProperty(t,"MessageStrategy",{enumerable:!0,get:function(){return g.MessageStrategy}}),t.RAL=M().default})),ce=f((t=>{Object.defineProperty(t,"__esModule",{value:!0});let n=s(`node:util`),i=se();var o=class MessageBuffer extends i.AbstractMessageBuffer{constructor(t=`utf-8`){super(t)}emptyBuffer(){return MessageBuffer.emptyBuffer}fromString(t,n){return Buffer.from(t,n)}toString(t,i){return t instanceof Buffer?t.toString(i):new n.TextDecoder(i).decode(t)}asNative(t,n){return n===void 0?t instanceof Buffer?t:Buffer.from(t):t instanceof Buffer?t.slice(0,n):Buffer.from(t,0,n)}allocNative(t){return Buffer.allocUnsafe(t)}};o.emptyBuffer=Buffer.allocUnsafe(0);var ReadableStreamWrapper=class{constructor(t){this.stream=t}onClose(t){return this.stream.on(`close`,t),i.Disposable.create(()=>this.stream.off(`close`,t))}onError(t){return this.stream.on(`error`,t),i.Disposable.create(()=>this.stream.off(`error`,t))}onEnd(t){return this.stream.on(`end`,t),i.Disposable.create(()=>this.stream.off(`end`,t))}onData(t){return this.stream.on(`data`,t),i.Disposable.create(()=>this.stream.off(`data`,t))}},WritableStreamWrapper=class{constructor(t){this.stream=t}onClose(t){return this.stream.on(`close`,t),i.Disposable.create(()=>this.stream.off(`close`,t))}onError(t){return this.stream.on(`error`,t),i.Disposable.create(()=>this.stream.off(`error`,t))}onEnd(t){return this.stream.on(`end`,t),i.Disposable.create(()=>this.stream.off(`end`,t))}write(t,n){return new Promise((i,o)=>{let callback=t=>{t==null?i():o(t)};typeof t==`string`?this.stream.write(t,n,callback):this.stream.write(t,callback)})}end(){this.stream.end()}};let c=Object.freeze({messageBuffer:Object.freeze({create:t=>new o(t)}),applicationJson:Object.freeze({encoder:Object.freeze({name:`application/json`,encode:(t,n)=>{try{return Promise.resolve(Buffer.from(JSON.stringify(t,void 0,0),n.charset))}catch(t){return Promise.reject(t)}}}),decoder:Object.freeze({name:`application/json`,decode:(t,i)=>{try{return t instanceof Buffer?Promise.resolve(JSON.parse(t.toString(i.charset))):Promise.resolve(JSON.parse(new n.TextDecoder(i.charset).decode(t)))}catch(t){return Promise.reject(t)}}})}),stream:Object.freeze({asReadableStream:t=>new ReadableStreamWrapper(t),asWritableStream:t=>new WritableStreamWrapper(t)}),console,timer:Object.freeze({setTimeout(t,n,...i){let o=setTimeout(t,n,...i);return{dispose:()=>clearTimeout(o)}},setImmediate(t,...n){let i=setImmediate(t,...n);return{dispose:()=>clearImmediate(i)}},setInterval(t,n,...i){let o=setInterval(t,n,...i);return{dispose:()=>clearInterval(o)}}})});function RIL(){return c}(function(t){function install(){i.RAL.install(c)}t.install=install})(RIL||={}),t.default=RIL})),L=f((t=>{var n=t&&t.__createBinding||(Object.create?(function(t,n,i,o){o===void 0&&(o=i);var s=Object.getOwnPropertyDescriptor(n,i);(!s||(`get`in s?!n.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return n[i]}}),Object.defineProperty(t,o,s)}):(function(t,n,i,o){o===void 0&&(o=i),t[o]=n[i]})),i=t&&t.__exportStar||function(t,i){for(var o in t)o!==`default`&&!Object.prototype.hasOwnProperty.call(i,o)&&n(i,t,o)};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.PortMessageWriter=t.PortMessageReader=t.IPCMessageWriter=t.IPCMessageReader=void 0;let o=ce();o.default.install();let c=s(`node:path`),u=s(`node:os`),f=s(`node:crypto`),p=s(`node:net`),h=se();i(se(),t);var IPCMessageReader=class extends h.AbstractMessageReader{constructor(t){super(),this.process=t;let n=this.process;n.on(`error`,t=>this.fireError(t)),n.on(`close`,()=>this.fireClose())}listen(t){return this.process.on(`message`,t),h.Disposable.create(()=>this.process.off(`message`,t))}};t.IPCMessageReader=IPCMessageReader;var IPCMessageWriter=class extends h.AbstractMessageWriter{constructor(t){super(),this.process=t,this.errorCount=0;let n=this.process;n.on(`error`,t=>this.fireError(t)),n.on(`close`,()=>this.fireClose)}write(t){try{return typeof this.process.send==`function`&&this.process.send(t,void 0,void 0,n=>{n?(this.errorCount++,this.handleError(n,t)):this.errorCount=0}),Promise.resolve()}catch(n){return this.handleError(n,t),Promise.reject(n)}}handleError(t,n){this.errorCount++,this.fireError(t,n,this.errorCount)}end(){}};t.IPCMessageWriter=IPCMessageWriter;var PortMessageReader=class extends h.AbstractMessageReader{constructor(t){super(),this.onData=new h.Emitter,t.on(`close`,()=>this.fireClose),t.on(`error`,t=>this.fireError(t)),t.on(`message`,t=>{this.onData.fire(t)})}listen(t){return this.onData.event(t)}};t.PortMessageReader=PortMessageReader;var PortMessageWriter=class extends h.AbstractMessageWriter{constructor(t){super(),this.port=t,this.errorCount=0,t.on(`close`,()=>this.fireClose()),t.on(`error`,t=>this.fireError(t))}write(t){try{return this.port.postMessage(t),Promise.resolve()}catch(n){return this.handleError(n,t),Promise.reject(n)}}handleError(t,n){this.errorCount++,this.fireError(t,n,this.errorCount)}end(){}};t.PortMessageWriter=PortMessageWriter;var SocketMessageReader=class extends h.ReadableStreamMessageReader{constructor(t,n=`utf-8`){super((0,o.default)().stream.asReadableStream(t),n)}};t.SocketMessageReader=SocketMessageReader;var SocketMessageWriter=class extends h.WriteableStreamMessageWriter{constructor(t,n){super((0,o.default)().stream.asWritableStream(t),n),this.socket=t}dispose(){super.dispose(),this.socket.destroy()}};t.SocketMessageWriter=SocketMessageWriter;var StreamMessageReader=class extends h.ReadableStreamMessageReader{constructor(t,n){super((0,o.default)().stream.asReadableStream(t),n)}};t.StreamMessageReader=StreamMessageReader;var StreamMessageWriter=class extends h.WriteableStreamMessageWriter{constructor(t,n){super((0,o.default)().stream.asWritableStream(t),n)}};t.StreamMessageWriter=StreamMessageWriter;let g=process.env.XDG_RUNTIME_DIR,_=new Map([[`linux`,107],[`darwin`,103]]);function generateRandomPipeName(){let t=(0,f.randomBytes)(21).toString(`hex`);if(process.platform===`win32`)return`\\\\.\\pipe\\vscode-jsonrpc-${t}-sock`;let n;n=g?c.join(g,`vscode-ipc-${t}.sock`):c.join(u.tmpdir(),`vscode-${t}.sock`);let i=_.get(process.platform);return i!==void 0&&n.length>i&&(0,o.default)().console.warn(`WARNING: IPC handle "${n}" is longer than ${i} characters.`),n}t.generateRandomPipeName=generateRandomPipeName;function createClientPipeTransport(t,n=`utf-8`){let i,o=new Promise((t,n)=>{i=t});return new Promise((s,c)=>{let u=(0,p.createServer)(t=>{u.close(),i([new SocketMessageReader(t,n),new SocketMessageWriter(t,n)])});u.on(`error`,c),u.listen(t,()=>{u.removeListener(`error`,c),s({onConnected:()=>o})})})}t.createClientPipeTransport=createClientPipeTransport;function createServerPipeTransport(t,n=`utf-8`){let i=(0,p.createConnection)(t);return[new SocketMessageReader(i,n),new SocketMessageWriter(i,n)]}t.createServerPipeTransport=createServerPipeTransport;function createClientSocketTransport(t,n=`utf-8`){let i,o=new Promise((t,n)=>{i=t});return new Promise((s,c)=>{let u=(0,p.createServer)(t=>{u.close(),i([new SocketMessageReader(t,n),new SocketMessageWriter(t,n)])});u.on(`error`,c),u.listen(t,`127.0.0.1`,()=>{u.removeListener(`error`,c),s({onConnected:()=>o})})})}t.createClientSocketTransport=createClientSocketTransport;function createServerSocketTransport(t,n=`utf-8`){let i=(0,p.createConnection)(t,`127.0.0.1`);return[new SocketMessageReader(i,n),new SocketMessageWriter(i,n)]}t.createServerSocketTransport=createServerSocketTransport;function isReadableStream(t){let n=t;return n.read!==void 0&&n.addListener!==void 0}function isWritableStream(t){let n=t;return n.write!==void 0&&n.addListener!==void 0}function createMessageConnection(t,n,i,o){i||=h.NullLogger;let s=isReadableStream(t)?new StreamMessageReader(t):t,c=isWritableStream(n)?new StreamMessageWriter(n):n;return h.ConnectionStrategy.is(o)&&(o={connectionStrategy:o}),(0,h.createMessageConnection)(s,c,i,o)}t.createMessageConnection=createMessageConnection})),le=f(((t,n)=>{n.exports=L()})),ue=c({AnnotatedTextEdit:()=>Ee,ChangeAnnotation:()=>Te,ChangeAnnotationIdentifier:()=>W,CodeAction:()=>ot,CodeActionContext:()=>at,CodeActionKind:()=>rt,CodeActionTriggerKind:()=>it,CodeDescription:()=>Se,CodeLens:()=>st,Color:()=>me,ColorInformation:()=>he,ColorPresentation:()=>ge,Command:()=>we,CompletionItem:()=>We,CompletionItemKind:()=>Re,CompletionItemLabelDetails:()=>Ue,CompletionItemTag:()=>Be,CompletionList:()=>Ge,CreateFile:()=>Oe,DeleteFile:()=>Ae,Diagnostic:()=>Ce,DiagnosticRelatedInformation:()=>ye,DiagnosticSeverity:()=>be,DiagnosticTag:()=>xe,DocumentHighlight:()=>Ze,DocumentHighlightKind:()=>Xe,DocumentLink:()=>lt,DocumentSymbol:()=>nt,DocumentUri:()=>R,EOL:()=>Ot,FoldingRange:()=>ve,FoldingRangeKind:()=>_e,FormattingOptions:()=>ct,Hover:()=>qe,InlayHint:()=>bt,InlayHintKind:()=>vt,InlayHintLabelPart:()=>yt,InlineCompletionContext:()=>Et,InlineCompletionItem:()=>St,InlineCompletionList:()=>Ct,InlineCompletionTriggerKind:()=>wt,InlineValueContext:()=>_t,InlineValueEvaluatableExpression:()=>gt,InlineValueText:()=>mt,InlineValueVariableLookup:()=>ht,InsertReplaceEdit:()=>Ve,InsertTextFormat:()=>ze,InsertTextMode:()=>He,Location:()=>fe,LocationLink:()=>pe,MarkedString:()=>Ke,MarkupContent:()=>Le,MarkupKind:()=>Ie,OptionalVersionedTextDocumentIdentifier:()=>Pe,ParameterInformation:()=>Je,Position:()=>V,Range:()=>H,RenameFile:()=>ke,SelectedCompletionInfo:()=>Tt,SelectionRange:()=>ut,SemanticTokenModifiers:()=>ft,SemanticTokenTypes:()=>dt,SemanticTokens:()=>pt,SignatureInformation:()=>Ye,StringValue:()=>xt,SymbolInformation:()=>et,SymbolKind:()=>Qe,SymbolTag:()=>$e,TextDocument:()=>kt,TextDocumentEdit:()=>De,TextDocumentIdentifier:()=>Me,TextDocumentItem:()=>Fe,TextEdit:()=>U,URI:()=>z,VersionedTextDocumentIdentifier:()=>Ne,WorkspaceChange:()=>WorkspaceChange,WorkspaceEdit:()=>je,WorkspaceFolder:()=>Dt,WorkspaceSymbol:()=>tt,integer:()=>de,uinteger:()=>B}),R,z,de,B,V,H,fe,pe,me,he,ge,_e,ve,ye,be,xe,Se,Ce,we,U,Te,W,Ee,De,Oe,ke,Ae,je,TextEditChangeImpl,ChangeAnnotations,WorkspaceChange,Me,Ne,Pe,Fe,Ie,Le,Re,ze,Be,Ve,He,Ue,We,Ge,Ke,qe,Je,Ye,Xe,Ze,Qe,$e,et,tt,nt,rt,it,at,ot,st,ct,lt,ut,dt,ft,pt,mt,ht,gt,_t,vt,yt,bt,xt,St,Ct,wt,Tt,Et,Dt,Ot,kt,FullTextDocument$1,G,At=o((()=>{(function(t){function is(t){return typeof t==`string`}t.is=is})(R||={}),(function(t){function is(t){return typeof t==`string`}t.is=is})(z||={}),(function(t){t.MIN_VALUE=-2147483648,t.MAX_VALUE=2147483647;function is(n){return typeof n==`number`&&t.MIN_VALUE<=n&&n<=t.MAX_VALUE}t.is=is})(de||={}),(function(t){t.MIN_VALUE=0,t.MAX_VALUE=2147483647;function is(n){return typeof n==`number`&&t.MIN_VALUE<=n&&n<=t.MAX_VALUE}t.is=is})(B||={}),(function(t){function create(t,n){return t===Number.MAX_VALUE&&(t=B.MAX_VALUE),n===Number.MAX_VALUE&&(n=B.MAX_VALUE),{line:t,character:n}}t.create=create;function is(t){let n=t;return G.objectLiteral(n)&&G.uinteger(n.line)&&G.uinteger(n.character)}t.is=is})(V||={}),(function(t){function create(t,n,i,o){if(G.uinteger(t)&&G.uinteger(n)&&G.uinteger(i)&&G.uinteger(o))return{start:V.create(t,n),end:V.create(i,o)};if(V.is(t)&&V.is(n))return{start:t,end:n};throw Error(`Range#create called with invalid arguments[${t}, ${n}, ${i}, ${o}]`)}t.create=create;function is(t){let n=t;return G.objectLiteral(n)&&V.is(n.start)&&V.is(n.end)}t.is=is})(H||={}),(function(t){function create(t,n){return{uri:t,range:n}}t.create=create;function is(t){let n=t;return G.objectLiteral(n)&&H.is(n.range)&&(G.string(n.uri)||G.undefined(n.uri))}t.is=is})(fe||={}),(function(t){function create(t,n,i,o){return{targetUri:t,targetRange:n,targetSelectionRange:i,originSelectionRange:o}}t.create=create;function is(t){let n=t;return G.objectLiteral(n)&&H.is(n.targetRange)&&G.string(n.targetUri)&&H.is(n.targetSelectionRange)&&(H.is(n.originSelectionRange)||G.undefined(n.originSelectionRange))}t.is=is})(pe||={}),(function(t){function create(t,n,i,o){return{red:t,green:n,blue:i,alpha:o}}t.create=create;function is(t){let n=t;return G.objectLiteral(n)&&G.numberRange(n.red,0,1)&&G.numberRange(n.green,0,1)&&G.numberRange(n.blue,0,1)&&G.numberRange(n.alpha,0,1)}t.is=is})(me||={}),(function(t){function create(t,n){return{range:t,color:n}}t.create=create;function is(t){let n=t;return G.objectLiteral(n)&&H.is(n.range)&&me.is(n.color)}t.is=is})(he||={}),(function(t){function create(t,n,i){return{label:t,textEdit:n,additionalTextEdits:i}}t.create=create;function is(t){let n=t;return G.objectLiteral(n)&&G.string(n.label)&&(G.undefined(n.textEdit)||U.is(n))&&(G.undefined(n.additionalTextEdits)||G.typedArray(n.additionalTextEdits,U.is))}t.is=is})(ge||={}),(function(t){t.Comment=`comment`,t.Imports=`imports`,t.Region=`region`})(_e||={}),(function(t){function create(t,n,i,o,s,c){let u={startLine:t,endLine:n};return G.defined(i)&&(u.startCharacter=i),G.defined(o)&&(u.endCharacter=o),G.defined(s)&&(u.kind=s),G.defined(c)&&(u.collapsedText=c),u}t.create=create;function is(t){let n=t;return G.objectLiteral(n)&&G.uinteger(n.startLine)&&G.uinteger(n.startLine)&&(G.undefined(n.startCharacter)||G.uinteger(n.startCharacter))&&(G.undefined(n.endCharacter)||G.uinteger(n.endCharacter))&&(G.undefined(n.kind)||G.string(n.kind))}t.is=is})(ve||={}),(function(t){function create(t,n){return{location:t,message:n}}t.create=create;function is(t){let n=t;return G.defined(n)&&fe.is(n.location)&&G.string(n.message)}t.is=is})(ye||={}),(function(t){t.Error=1,t.Warning=2,t.Information=3,t.Hint=4})(be||={}),(function(t){t.Unnecessary=1,t.Deprecated=2})(xe||={}),(function(t){function is(t){let n=t;return G.objectLiteral(n)&&G.string(n.href)}t.is=is})(Se||={}),(function(t){function create(t,n,i,o,s,c){let u={range:t,message:n};return G.defined(i)&&(u.severity=i),G.defined(o)&&(u.code=o),G.defined(s)&&(u.source=s),G.defined(c)&&(u.relatedInformation=c),u}t.create=create;function is(t){let n=t;return G.defined(n)&&H.is(n.range)&&G.string(n.message)&&(G.number(n.severity)||G.undefined(n.severity))&&(G.integer(n.code)||G.string(n.code)||G.undefined(n.code))&&(G.undefined(n.codeDescription)||G.string(n.codeDescription?.href))&&(G.string(n.source)||G.undefined(n.source))&&(G.undefined(n.relatedInformation)||G.typedArray(n.relatedInformation,ye.is))}t.is=is})(Ce||={}),(function(t){function create(t,n,...i){let o={title:t,command:n};return G.defined(i)&&i.length>0&&(o.arguments=i),o}t.create=create;function is(t){let n=t;return G.defined(n)&&G.string(n.title)&&G.string(n.command)}t.is=is})(we||={}),(function(t){function replace(t,n){return{range:t,newText:n}}t.replace=replace;function insert(t,n){return{range:{start:t,end:t},newText:n}}t.insert=insert;function del(t){return{range:t,newText:``}}t.del=del;function is(t){let n=t;return G.objectLiteral(n)&&G.string(n.newText)&&H.is(n.range)}t.is=is})(U||={}),(function(t){function create(t,n,i){let o={label:t};return n!==void 0&&(o.needsConfirmation=n),i!==void 0&&(o.description=i),o}t.create=create;function is(t){let n=t;return G.objectLiteral(n)&&G.string(n.label)&&(G.boolean(n.needsConfirmation)||n.needsConfirmation===void 0)&&(G.string(n.description)||n.description===void 0)}t.is=is})(Te||={}),(function(t){function is(t){let n=t;return G.string(n)}t.is=is})(W||={}),(function(t){function replace(t,n,i){return{range:t,newText:n,annotationId:i}}t.replace=replace;function insert(t,n,i){return{range:{start:t,end:t},newText:n,annotationId:i}}t.insert=insert;function del(t,n){return{range:t,newText:``,annotationId:n}}t.del=del;function is(t){let n=t;return U.is(n)&&(Te.is(n.annotationId)||W.is(n.annotationId))}t.is=is})(Ee||={}),(function(t){function create(t,n){return{textDocument:t,edits:n}}t.create=create;function is(t){let n=t;return G.defined(n)&&Pe.is(n.textDocument)&&Array.isArray(n.edits)}t.is=is})(De||={}),(function(t){function create(t,n,i){let o={kind:`create`,uri:t};return n!==void 0&&(n.overwrite!==void 0||n.ignoreIfExists!==void 0)&&(o.options=n),i!==void 0&&(o.annotationId=i),o}t.create=create;function is(t){let n=t;return n&&n.kind===`create`&&G.string(n.uri)&&(n.options===void 0||(n.options.overwrite===void 0||G.boolean(n.options.overwrite))&&(n.options.ignoreIfExists===void 0||G.boolean(n.options.ignoreIfExists)))&&(n.annotationId===void 0||W.is(n.annotationId))}t.is=is})(Oe||={}),(function(t){function create(t,n,i,o){let s={kind:`rename`,oldUri:t,newUri:n};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(s.options=i),o!==void 0&&(s.annotationId=o),s}t.create=create;function is(t){let n=t;return n&&n.kind===`rename`&&G.string(n.oldUri)&&G.string(n.newUri)&&(n.options===void 0||(n.options.overwrite===void 0||G.boolean(n.options.overwrite))&&(n.options.ignoreIfExists===void 0||G.boolean(n.options.ignoreIfExists)))&&(n.annotationId===void 0||W.is(n.annotationId))}t.is=is})(ke||={}),(function(t){function create(t,n,i){let o={kind:`delete`,uri:t};return n!==void 0&&(n.recursive!==void 0||n.ignoreIfNotExists!==void 0)&&(o.options=n),i!==void 0&&(o.annotationId=i),o}t.create=create;function is(t){let n=t;return n&&n.kind===`delete`&&G.string(n.uri)&&(n.options===void 0||(n.options.recursive===void 0||G.boolean(n.options.recursive))&&(n.options.ignoreIfNotExists===void 0||G.boolean(n.options.ignoreIfNotExists)))&&(n.annotationId===void 0||W.is(n.annotationId))}t.is=is})(Ae||={}),(function(t){function is(t){let n=t;return n&&(n.changes!==void 0||n.documentChanges!==void 0)&&(n.documentChanges===void 0||n.documentChanges.every(t=>G.string(t.kind)?Oe.is(t)||ke.is(t)||Ae.is(t):De.is(t)))}t.is=is})(je||={}),TextEditChangeImpl=class{constructor(t,n){this.edits=t,this.changeAnnotations=n}insert(t,n,i){let o,s;if(i===void 0?o=U.insert(t,n):W.is(i)?(s=i,o=Ee.insert(t,n,i)):(this.assertChangeAnnotations(this.changeAnnotations),s=this.changeAnnotations.manage(i),o=Ee.insert(t,n,s)),this.edits.push(o),s!==void 0)return s}replace(t,n,i){let o,s;if(i===void 0?o=U.replace(t,n):W.is(i)?(s=i,o=Ee.replace(t,n,i)):(this.assertChangeAnnotations(this.changeAnnotations),s=this.changeAnnotations.manage(i),o=Ee.replace(t,n,s)),this.edits.push(o),s!==void 0)return s}delete(t,n){let i,o;if(n===void 0?i=U.del(t):W.is(n)?(o=n,i=Ee.del(t,n)):(this.assertChangeAnnotations(this.changeAnnotations),o=this.changeAnnotations.manage(n),i=Ee.del(t,o)),this.edits.push(i),o!==void 0)return o}add(t){this.edits.push(t)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(t){if(t===void 0)throw Error(`Text edit change is not configured to manage change annotations.`)}},ChangeAnnotations=class{constructor(t){this._annotations=t===void 0?Object.create(null):t,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(t,n){let i;if(W.is(t)?i=t:(i=this.nextId(),n=t),this._annotations[i]!==void 0)throw Error(`Id ${i} is already in use.`);if(n===void 0)throw Error(`No annotation provided for id ${i}`);return this._annotations[i]=n,this._size++,i}nextId(){return this._counter++,this._counter.toString()}},WorkspaceChange=class{constructor(t){this._textEditChanges=Object.create(null),t===void 0?this._workspaceEdit={}:(this._workspaceEdit=t,t.documentChanges?(this._changeAnnotations=new ChangeAnnotations(t.changeAnnotations),t.changeAnnotations=this._changeAnnotations.all(),t.documentChanges.forEach(t=>{if(De.is(t)){let n=new TextEditChangeImpl(t.edits,this._changeAnnotations);this._textEditChanges[t.textDocument.uri]=n}})):t.changes&&Object.keys(t.changes).forEach(n=>{let i=new TextEditChangeImpl(t.changes[n]);this._textEditChanges[n]=i}))}get edit(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(t){if(Pe.is(t)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw Error(`Workspace edit is not configured for document changes.`);let n={uri:t.uri,version:t.version},i=this._textEditChanges[n.uri];if(!i){let t=[],o={textDocument:n,edits:t};this._workspaceEdit.documentChanges.push(o),i=new TextEditChangeImpl(t,this._changeAnnotations),this._textEditChanges[n.uri]=i}return i}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw Error(`Workspace edit is not configured for normal text edit changes.`);let n=this._textEditChanges[t];if(!n){let i=[];this._workspaceEdit.changes[t]=i,n=new TextEditChangeImpl(i),this._textEditChanges[t]=n}return n}}initDocumentChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new ChangeAnnotations,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))}createFile(t,n,i){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw Error(`Workspace edit is not configured for document changes.`);let o;Te.is(n)||W.is(n)?o=n:i=n;let s,c;if(o===void 0?s=Oe.create(t,i):(c=W.is(o)?o:this._changeAnnotations.manage(o),s=Oe.create(t,i,c)),this._workspaceEdit.documentChanges.push(s),c!==void 0)return c}renameFile(t,n,i,o){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw Error(`Workspace edit is not configured for document changes.`);let s;Te.is(i)||W.is(i)?s=i:o=i;let c,u;if(s===void 0?c=ke.create(t,n,o):(u=W.is(s)?s:this._changeAnnotations.manage(s),c=ke.create(t,n,o,u)),this._workspaceEdit.documentChanges.push(c),u!==void 0)return u}deleteFile(t,n,i){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw Error(`Workspace edit is not configured for document changes.`);let o;Te.is(n)||W.is(n)?o=n:i=n;let s,c;if(o===void 0?s=Ae.create(t,i):(c=W.is(o)?o:this._changeAnnotations.manage(o),s=Ae.create(t,i,c)),this._workspaceEdit.documentChanges.push(s),c!==void 0)return c}},(function(t){function create(t){return{uri:t}}t.create=create;function is(t){let n=t;return G.defined(n)&&G.string(n.uri)}t.is=is})(Me||={}),(function(t){function create(t,n){return{uri:t,version:n}}t.create=create;function is(t){let n=t;return G.defined(n)&&G.string(n.uri)&&G.integer(n.version)}t.is=is})(Ne||={}),(function(t){function create(t,n){return{uri:t,version:n}}t.create=create;function is(t){let n=t;return G.defined(n)&&G.string(n.uri)&&(n.version===null||G.integer(n.version))}t.is=is})(Pe||={}),(function(t){function create(t,n,i,o){return{uri:t,languageId:n,version:i,text:o}}t.create=create;function is(t){let n=t;return G.defined(n)&&G.string(n.uri)&&G.string(n.languageId)&&G.integer(n.version)&&G.string(n.text)}t.is=is})(Fe||={}),(function(t){t.PlainText=`plaintext`,t.Markdown=`markdown`;function is(n){let i=n;return i===t.PlainText||i===t.Markdown}t.is=is})(Ie||={}),(function(t){function is(t){let n=t;return G.objectLiteral(t)&&Ie.is(n.kind)&&G.string(n.value)}t.is=is})(Le||={}),(function(t){t.Text=1,t.Method=2,t.Function=3,t.Constructor=4,t.Field=5,t.Variable=6,t.Class=7,t.Interface=8,t.Module=9,t.Property=10,t.Unit=11,t.Value=12,t.Enum=13,t.Keyword=14,t.Snippet=15,t.Color=16,t.File=17,t.Reference=18,t.Folder=19,t.EnumMember=20,t.Constant=21,t.Struct=22,t.Event=23,t.Operator=24,t.TypeParameter=25})(Re||={}),(function(t){t.PlainText=1,t.Snippet=2})(ze||={}),(function(t){t.Deprecated=1})(Be||={}),(function(t){function create(t,n,i){return{newText:t,insert:n,replace:i}}t.create=create;function is(t){let n=t;return n&&G.string(n.newText)&&H.is(n.insert)&&H.is(n.replace)}t.is=is})(Ve||={}),(function(t){t.asIs=1,t.adjustIndentation=2})(He||={}),(function(t){function is(t){let n=t;return n&&(G.string(n.detail)||n.detail===void 0)&&(G.string(n.description)||n.description===void 0)}t.is=is})(Ue||={}),(function(t){function create(t){return{label:t}}t.create=create})(We||={}),(function(t){function create(t,n){return{items:t||[],isIncomplete:!!n}}t.create=create})(Ge||={}),(function(t){function fromPlainText(t){return t.replace(/[\\`*_{}[\]()#+\-.!]/g,`\\$&`)}t.fromPlainText=fromPlainText;function is(t){let n=t;return G.string(n)||G.objectLiteral(n)&&G.string(n.language)&&G.string(n.value)}t.is=is})(Ke||={}),(function(t){function is(t){let n=t;return!!n&&G.objectLiteral(n)&&(Le.is(n.contents)||Ke.is(n.contents)||G.typedArray(n.contents,Ke.is))&&(t.range===void 0||H.is(t.range))}t.is=is})(qe||={}),(function(t){function create(t,n){return n?{label:t,documentation:n}:{label:t}}t.create=create})(Je||={}),(function(t){function create(t,n,...i){let o={label:t};return G.defined(n)&&(o.documentation=n),G.defined(i)?o.parameters=i:o.parameters=[],o}t.create=create})(Ye||={}),(function(t){t.Text=1,t.Read=2,t.Write=3})(Xe||={}),(function(t){function create(t,n){let i={range:t};return G.number(n)&&(i.kind=n),i}t.create=create})(Ze||={}),(function(t){t.File=1,t.Module=2,t.Namespace=3,t.Package=4,t.Class=5,t.Method=6,t.Property=7,t.Field=8,t.Constructor=9,t.Enum=10,t.Interface=11,t.Function=12,t.Variable=13,t.Constant=14,t.String=15,t.Number=16,t.Boolean=17,t.Array=18,t.Object=19,t.Key=20,t.Null=21,t.EnumMember=22,t.Struct=23,t.Event=24,t.Operator=25,t.TypeParameter=26})(Qe||={}),(function(t){t.Deprecated=1})($e||={}),(function(t){function create(t,n,i,o,s){let c={name:t,kind:n,location:{uri:o,range:i}};return s&&(c.containerName=s),c}t.create=create})(et||={}),(function(t){function create(t,n,i,o){return o===void 0?{name:t,kind:n,location:{uri:i}}:{name:t,kind:n,location:{uri:i,range:o}}}t.create=create})(tt||={}),(function(t){function create(t,n,i,o,s,c){let u={name:t,detail:n,kind:i,range:o,selectionRange:s};return c!==void 0&&(u.children=c),u}t.create=create;function is(t){let n=t;return n&&G.string(n.name)&&G.number(n.kind)&&H.is(n.range)&&H.is(n.selectionRange)&&(n.detail===void 0||G.string(n.detail))&&(n.deprecated===void 0||G.boolean(n.deprecated))&&(n.children===void 0||Array.isArray(n.children))&&(n.tags===void 0||Array.isArray(n.tags))}t.is=is})(nt||={}),(function(t){t.Empty=``,t.QuickFix=`quickfix`,t.Refactor=`refactor`,t.RefactorExtract=`refactor.extract`,t.RefactorInline=`refactor.inline`,t.RefactorRewrite=`refactor.rewrite`,t.Source=`source`,t.SourceOrganizeImports=`source.organizeImports`,t.SourceFixAll=`source.fixAll`})(rt||={}),(function(t){t.Invoked=1,t.Automatic=2})(it||={}),(function(t){function create(t,n,i){let o={diagnostics:t};return n!=null&&(o.only=n),i!=null&&(o.triggerKind=i),o}t.create=create;function is(t){let n=t;return G.defined(n)&&G.typedArray(n.diagnostics,Ce.is)&&(n.only===void 0||G.typedArray(n.only,G.string))&&(n.triggerKind===void 0||n.triggerKind===it.Invoked||n.triggerKind===it.Automatic)}t.is=is})(at||={}),(function(t){function create(t,n,i){let o={title:t},s=!0;return typeof n==`string`?(s=!1,o.kind=n):we.is(n)?o.command=n:o.edit=n,s&&i!==void 0&&(o.kind=i),o}t.create=create;function is(t){let n=t;return n&&G.string(n.title)&&(n.diagnostics===void 0||G.typedArray(n.diagnostics,Ce.is))&&(n.kind===void 0||G.string(n.kind))&&(n.edit!==void 0||n.command!==void 0)&&(n.command===void 0||we.is(n.command))&&(n.isPreferred===void 0||G.boolean(n.isPreferred))&&(n.edit===void 0||je.is(n.edit))}t.is=is})(ot||={}),(function(t){function create(t,n){let i={range:t};return G.defined(n)&&(i.data=n),i}t.create=create;function is(t){let n=t;return G.defined(n)&&H.is(n.range)&&(G.undefined(n.command)||we.is(n.command))}t.is=is})(st||={}),(function(t){function create(t,n){return{tabSize:t,insertSpaces:n}}t.create=create;function is(t){let n=t;return G.defined(n)&&G.uinteger(n.tabSize)&&G.boolean(n.insertSpaces)}t.is=is})(ct||={}),(function(t){function create(t,n,i){return{range:t,target:n,data:i}}t.create=create;function is(t){let n=t;return G.defined(n)&&H.is(n.range)&&(G.undefined(n.target)||G.string(n.target))}t.is=is})(lt||={}),(function(t){function create(t,n){return{range:t,parent:n}}t.create=create;function is(n){let i=n;return G.objectLiteral(i)&&H.is(i.range)&&(i.parent===void 0||t.is(i.parent))}t.is=is})(ut||={}),(function(t){t.namespace=`namespace`,t.type=`type`,t.class=`class`,t.enum=`enum`,t.interface=`interface`,t.struct=`struct`,t.typeParameter=`typeParameter`,t.parameter=`parameter`,t.variable=`variable`,t.property=`property`,t.enumMember=`enumMember`,t.event=`event`,t.function=`function`,t.method=`method`,t.macro=`macro`,t.keyword=`keyword`,t.modifier=`modifier`,t.comment=`comment`,t.string=`string`,t.number=`number`,t.regexp=`regexp`,t.operator=`operator`,t.decorator=`decorator`})(dt||={}),(function(t){t.declaration=`declaration`,t.definition=`definition`,t.readonly=`readonly`,t.static=`static`,t.deprecated=`deprecated`,t.abstract=`abstract`,t.async=`async`,t.modification=`modification`,t.documentation=`documentation`,t.defaultLibrary=`defaultLibrary`})(ft||={}),(function(t){function is(t){let n=t;return G.objectLiteral(n)&&(n.resultId===void 0||typeof n.resultId==`string`)&&Array.isArray(n.data)&&(n.data.length===0||typeof n.data[0]==`number`)}t.is=is})(pt||={}),(function(t){function create(t,n){return{range:t,text:n}}t.create=create;function is(t){let n=t;return n!=null&&H.is(n.range)&&G.string(n.text)}t.is=is})(mt||={}),(function(t){function create(t,n,i){return{range:t,variableName:n,caseSensitiveLookup:i}}t.create=create;function is(t){let n=t;return n!=null&&H.is(n.range)&&G.boolean(n.caseSensitiveLookup)&&(G.string(n.variableName)||n.variableName===void 0)}t.is=is})(ht||={}),(function(t){function create(t,n){return{range:t,expression:n}}t.create=create;function is(t){let n=t;return n!=null&&H.is(n.range)&&(G.string(n.expression)||n.expression===void 0)}t.is=is})(gt||={}),(function(t){function create(t,n){return{frameId:t,stoppedLocation:n}}t.create=create;function is(t){let n=t;return G.defined(n)&&H.is(t.stoppedLocation)}t.is=is})(_t||={}),(function(t){t.Type=1,t.Parameter=2;function is(t){return t===1||t===2}t.is=is})(vt||={}),(function(t){function create(t){return{value:t}}t.create=create;function is(t){let n=t;return G.objectLiteral(n)&&(n.tooltip===void 0||G.string(n.tooltip)||Le.is(n.tooltip))&&(n.location===void 0||fe.is(n.location))&&(n.command===void 0||we.is(n.command))}t.is=is})(yt||={}),(function(t){function create(t,n,i){let o={position:t,label:n};return i!==void 0&&(o.kind=i),o}t.create=create;function is(t){let n=t;return G.objectLiteral(n)&&V.is(n.position)&&(G.string(n.label)||G.typedArray(n.label,yt.is))&&(n.kind===void 0||vt.is(n.kind))&&n.textEdits===void 0||G.typedArray(n.textEdits,U.is)&&(n.tooltip===void 0||G.string(n.tooltip)||Le.is(n.tooltip))&&(n.paddingLeft===void 0||G.boolean(n.paddingLeft))&&(n.paddingRight===void 0||G.boolean(n.paddingRight))}t.is=is})(bt||={}),(function(t){function createSnippet(t){return{kind:`snippet`,value:t}}t.createSnippet=createSnippet})(xt||={}),(function(t){function create(t,n,i,o){return{insertText:t,filterText:n,range:i,command:o}}t.create=create})(St||={}),(function(t){function create(t){return{items:t}}t.create=create})(Ct||={}),(function(t){t.Invoked=0,t.Automatic=1})(wt||={}),(function(t){function create(t,n){return{range:t,text:n}}t.create=create})(Tt||={}),(function(t){function create(t,n){return{triggerKind:t,selectedCompletionInfo:n}}t.create=create})(Et||={}),(function(t){function is(t){let n=t;return G.objectLiteral(n)&&z.is(n.uri)&&G.string(n.name)}t.is=is})(Dt||={}),Ot=[`
12
+ `)),n){let o=t.error?` Request failed: ${t.error.message} (${t.error.code}).`:``;B.log(`Received response '${n.method} - (${t.id})' in ${Date.now()-n.timerStart}ms.${o}`,i)}else B.log(`Received response ${t.id} without active response promise.`,i)}else logLSPMessage(`receive-response`,t)}function logLSPMessage(t,n){if(!B||z===_.Off)return;let i={isLSPMessage:!0,type:t,message:n,timestamp:Date.now()};B.log(i)}function throwIfClosedOrDisposed(){if(isClosed())throw new ee(D.Closed,`Connection is closed.`);if(isDisposed())throw new ee(D.Disposed,`Connection is disposed.`)}function throwIfListening(){if(isListening())throw new ee(D.AlreadyListening,`Connection is already listening`)}function throwIfNotListening(){if(!isListening())throw Error(`Call listen() first.`)}function undefinedToNull(t){return t===void 0?null:t}function nullToUndefined(t){if(t!==null)return t}function isNamedParam(t){return t!=null&&!Array.isArray(t)&&typeof t==`object`}function computeSingleParam(t,n){switch(t){case o.ParameterStructures.auto:return isNamedParam(n)?nullToUndefined(n):[undefinedToNull(n)];case o.ParameterStructures.byName:if(!isNamedParam(n))throw Error(`Received parameters by name but param is not an object literal.`);return nullToUndefined(n);case o.ParameterStructures.byPosition:return[undefinedToNull(n)];default:throw Error(`Unknown parameter structure ${t.toString()}`)}}function computeMessageParams(t,n){let i,o=t.numberOfParams;switch(o){case 0:i=void 0;break;case 1:i=computeSingleParam(t.parameterStructures,n[0]);break;default:i=[];for(let t=0;t<n.length&&t<o;t++)i.push(undefinedToNull(n[t]));if(n.length<o)for(let t=n.length;t<o;t++)i.push(null);break}return i}let _e={sendNotification:(t,...n)=>{throwIfClosedOrDisposed();let s,c;if(i.string(t)){s=t;let i=n[0],u=0,f=o.ParameterStructures.auto;o.ParameterStructures.is(i)&&(u=1,f=i);let p=n.length,h=p-u;switch(h){case 0:c=void 0;break;case 1:c=computeSingleParam(f,n[u]);break;default:if(f===o.ParameterStructures.byName)throw Error(`Received ${h} parameters for 'by Name' notification parameter structure.`);c=n.slice(u,p).map(t=>undefinedToNull(t));break}}else{let i=n;s=t.method,c=computeMessageParams(t,i)}let u={jsonrpc:`2.0`,method:s,params:c};return traceSendingNotification(u),O.write(u).catch(t=>{throw j.error(`Sending notification failed.`),t})},onNotification:(t,n)=>{throwIfClosedOrDisposed();let o;return i.func(t)?F=t:n&&(i.string(t)?(o=t,oe.set(t,{type:void 0,handler:n})):(o=t.method,oe.set(t.method,{type:t,handler:n}))),{dispose:()=>{o===void 0?F=void 0:oe.delete(o)}}},onProgress:(t,n,i)=>{if(se.has(n))throw Error(`Progress handler for token ${n} already registered`);return se.set(n,i),{dispose:()=>{se.delete(n)}}},sendProgress:(t,n,i)=>_e.sendNotification(h.type,{token:n,value:i}),onUnhandledProgress:me.event,sendRequest:(t,...n)=>{throwIfClosedOrDisposed(),throwIfNotListening();let s,c,f;if(i.string(t)){s=t;let i=n[0],p=n[n.length-1],h=0,g=o.ParameterStructures.auto;o.ParameterStructures.is(i)&&(h=1,g=i);let _=n.length;u.CancellationToken.is(p)&&(--_,f=p);let x=_-h;switch(x){case 0:c=void 0;break;case 1:c=computeSingleParam(g,n[h]);break;default:if(g===o.ParameterStructures.byName)throw Error(`Received ${x} parameters for 'by Name' request parameter structure.`);c=n.slice(h,_).map(t=>undefinedToNull(t));break}}else{let i=n;s=t.method,c=computeMessageParams(t,i);let o=t.numberOfParams;f=u.CancellationToken.is(i[o])?i[o]:void 0}let p=ne++,h;f&&(h=f.onCancellationRequested(()=>{let t=ge.sender.sendCancellation(_e,p);return t===void 0?(j.log(`Received no promise from cancellation strategy when cancelling id ${p}`),Promise.resolve()):t.catch(()=>{j.log(`Sending cancellation messages for id ${p} failed`)})}));let g={jsonrpc:`2.0`,id:p,method:s,params:c};return traceSendingRequest(g),typeof ge.sender.enableCancellation==`function`&&ge.sender.enableCancellation(g),new Promise(async(t,n)=>{let resolveWithCleanup=n=>{t(n),ge.sender.cleanup(p),h?.dispose()},rejectWithCleanup=t=>{n(t),ge.sender.cleanup(p),h?.dispose()},i={method:s,timerStart:Date.now(),resolve:resolveWithCleanup,reject:rejectWithCleanup};try{await O.write(g),le.set(p,i)}catch(t){throw j.error(`Sending request failed.`),i.reject(new o.ResponseError(o.ErrorCodes.MessageWriteError,t.message?t.message:`Unknown reason`)),t}})},onRequest:(t,n)=>{throwIfClosedOrDisposed();let o=null;return g.is(t)?(o=void 0,N=t):i.string(t)?(o=null,n!==void 0&&(o=t,P.set(t,{handler:n,type:void 0}))):n!==void 0&&(o=t.method,P.set(t.method,{type:t,handler:n})),{dispose:()=>{o!==null&&(o===void 0?N=void 0:P.delete(o))}}},hasPendingResponse:()=>le.size>0,trace:async(t,n,o)=>{let s=!1,c=S.Text;o!==void 0&&(i.boolean(o)?s=o:(s=o.sendNotification||!1,c=o.traceFormat||S.Text)),z=t,de=c,B=z===_.Off?void 0:n,s&&!isClosed()&&!isDisposed()&&await _e.sendNotification(T.type,{value:_.toString(t)})},onError:H.event,onClose:fe.event,onUnhandledNotification:pe.event,onDispose:he.event,end:()=>{O.end()},dispose:()=>{if(isDisposed())return;V=I.Disposed,he.fire(void 0);let t=new o.ResponseError(o.ErrorCodes.PendingResponseRejected,`Pending response rejected since connection got disposed`);for(let n of le.values())n.reject(t);le=new Map,R=new Map,ue=new Set,L=new s.LinkedMap,i.func(O.dispose)&&O.dispose(),i.func(x.dispose)&&x.dispose()},listen:()=>{throwIfClosedOrDisposed(),throwIfListening(),V=I.Listening,x.listen(callback)},inspect:()=>{(0,n.default)().console.log(`inspect`)}};return _e.onNotification(E.type,t=>{if(z===_.Off||!B)return;let n=z===_.Verbose||z===_.Compact;B.log(t.message,n?t.verbose:void 0)}),_e.onNotification(h.type,t=>{let n=se.get(t.token);n?n(t.value):me.fire(t)}),_e}t.createMessageConnection=createMessageConnection})),se=f((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ProgressType=t.ProgressToken=t.createMessageConnection=t.NullLogger=t.ConnectionOptions=t.ConnectionStrategy=t.AbstractMessageBuffer=t.WriteableStreamMessageWriter=t.AbstractMessageWriter=t.MessageWriter=t.ReadableStreamMessageReader=t.AbstractMessageReader=t.MessageReader=t.SharedArrayReceiverStrategy=t.SharedArraySenderStrategy=t.CancellationToken=t.CancellationTokenSource=t.Emitter=t.Event=t.Disposable=t.LRUCache=t.Touch=t.LinkedMap=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.Message=t.RAL=void 0,t.MessageStrategy=t.CancellationStrategy=t.CancellationSenderStrategy=t.CancellationReceiverStrategy=t.ConnectionError=t.ConnectionErrors=t.LogTraceNotification=t.SetTraceNotification=t.TraceFormat=t.TraceValues=t.Trace=void 0;let n=te();Object.defineProperty(t,"Message",{enumerable:!0,get:function(){return n.Message}}),Object.defineProperty(t,"RequestType",{enumerable:!0,get:function(){return n.RequestType}}),Object.defineProperty(t,"RequestType0",{enumerable:!0,get:function(){return n.RequestType0}}),Object.defineProperty(t,"RequestType1",{enumerable:!0,get:function(){return n.RequestType1}}),Object.defineProperty(t,"RequestType2",{enumerable:!0,get:function(){return n.RequestType2}}),Object.defineProperty(t,"RequestType3",{enumerable:!0,get:function(){return n.RequestType3}}),Object.defineProperty(t,"RequestType4",{enumerable:!0,get:function(){return n.RequestType4}}),Object.defineProperty(t,"RequestType5",{enumerable:!0,get:function(){return n.RequestType5}}),Object.defineProperty(t,"RequestType6",{enumerable:!0,get:function(){return n.RequestType6}}),Object.defineProperty(t,"RequestType7",{enumerable:!0,get:function(){return n.RequestType7}}),Object.defineProperty(t,"RequestType8",{enumerable:!0,get:function(){return n.RequestType8}}),Object.defineProperty(t,"RequestType9",{enumerable:!0,get:function(){return n.RequestType9}}),Object.defineProperty(t,"ResponseError",{enumerable:!0,get:function(){return n.ResponseError}}),Object.defineProperty(t,"ErrorCodes",{enumerable:!0,get:function(){return n.ErrorCodes}}),Object.defineProperty(t,"NotificationType",{enumerable:!0,get:function(){return n.NotificationType}}),Object.defineProperty(t,"NotificationType0",{enumerable:!0,get:function(){return n.NotificationType0}}),Object.defineProperty(t,"NotificationType1",{enumerable:!0,get:function(){return n.NotificationType1}}),Object.defineProperty(t,"NotificationType2",{enumerable:!0,get:function(){return n.NotificationType2}}),Object.defineProperty(t,"NotificationType3",{enumerable:!0,get:function(){return n.NotificationType3}}),Object.defineProperty(t,"NotificationType4",{enumerable:!0,get:function(){return n.NotificationType4}}),Object.defineProperty(t,"NotificationType5",{enumerable:!0,get:function(){return n.NotificationType5}}),Object.defineProperty(t,"NotificationType6",{enumerable:!0,get:function(){return n.NotificationType6}}),Object.defineProperty(t,"NotificationType7",{enumerable:!0,get:function(){return n.NotificationType7}}),Object.defineProperty(t,"NotificationType8",{enumerable:!0,get:function(){return n.NotificationType8}}),Object.defineProperty(t,"NotificationType9",{enumerable:!0,get:function(){return n.NotificationType9}}),Object.defineProperty(t,"ParameterStructures",{enumerable:!0,get:function(){return n.ParameterStructures}});let i=j();Object.defineProperty(t,"LinkedMap",{enumerable:!0,get:function(){return i.LinkedMap}}),Object.defineProperty(t,"LRUCache",{enumerable:!0,get:function(){return i.LRUCache}}),Object.defineProperty(t,"Touch",{enumerable:!0,get:function(){return i.Touch}});let o=ne();Object.defineProperty(t,"Disposable",{enumerable:!0,get:function(){return o.Disposable}});let s=re();Object.defineProperty(t,"Event",{enumerable:!0,get:function(){return s.Event}}),Object.defineProperty(t,"Emitter",{enumerable:!0,get:function(){return s.Emitter}});let c=N();Object.defineProperty(t,"CancellationTokenSource",{enumerable:!0,get:function(){return c.CancellationTokenSource}}),Object.defineProperty(t,"CancellationToken",{enumerable:!0,get:function(){return c.CancellationToken}});let u=P();Object.defineProperty(t,"SharedArraySenderStrategy",{enumerable:!0,get:function(){return u.SharedArraySenderStrategy}}),Object.defineProperty(t,"SharedArrayReceiverStrategy",{enumerable:!0,get:function(){return u.SharedArrayReceiverStrategy}});let f=ie();Object.defineProperty(t,"MessageReader",{enumerable:!0,get:function(){return f.MessageReader}}),Object.defineProperty(t,"AbstractMessageReader",{enumerable:!0,get:function(){return f.AbstractMessageReader}}),Object.defineProperty(t,"ReadableStreamMessageReader",{enumerable:!0,get:function(){return f.ReadableStreamMessageReader}});let p=ae();Object.defineProperty(t,"MessageWriter",{enumerable:!0,get:function(){return p.MessageWriter}}),Object.defineProperty(t,"AbstractMessageWriter",{enumerable:!0,get:function(){return p.AbstractMessageWriter}}),Object.defineProperty(t,"WriteableStreamMessageWriter",{enumerable:!0,get:function(){return p.WriteableStreamMessageWriter}});let h=oe();Object.defineProperty(t,"AbstractMessageBuffer",{enumerable:!0,get:function(){return h.AbstractMessageBuffer}});let g=I();Object.defineProperty(t,"ConnectionStrategy",{enumerable:!0,get:function(){return g.ConnectionStrategy}}),Object.defineProperty(t,"ConnectionOptions",{enumerable:!0,get:function(){return g.ConnectionOptions}}),Object.defineProperty(t,"NullLogger",{enumerable:!0,get:function(){return g.NullLogger}}),Object.defineProperty(t,"createMessageConnection",{enumerable:!0,get:function(){return g.createMessageConnection}}),Object.defineProperty(t,"ProgressToken",{enumerable:!0,get:function(){return g.ProgressToken}}),Object.defineProperty(t,"ProgressType",{enumerable:!0,get:function(){return g.ProgressType}}),Object.defineProperty(t,"Trace",{enumerable:!0,get:function(){return g.Trace}}),Object.defineProperty(t,"TraceValues",{enumerable:!0,get:function(){return g.TraceValues}}),Object.defineProperty(t,"TraceFormat",{enumerable:!0,get:function(){return g.TraceFormat}}),Object.defineProperty(t,"SetTraceNotification",{enumerable:!0,get:function(){return g.SetTraceNotification}}),Object.defineProperty(t,"LogTraceNotification",{enumerable:!0,get:function(){return g.LogTraceNotification}}),Object.defineProperty(t,"ConnectionErrors",{enumerable:!0,get:function(){return g.ConnectionErrors}}),Object.defineProperty(t,"ConnectionError",{enumerable:!0,get:function(){return g.ConnectionError}}),Object.defineProperty(t,"CancellationReceiverStrategy",{enumerable:!0,get:function(){return g.CancellationReceiverStrategy}}),Object.defineProperty(t,"CancellationSenderStrategy",{enumerable:!0,get:function(){return g.CancellationSenderStrategy}}),Object.defineProperty(t,"CancellationStrategy",{enumerable:!0,get:function(){return g.CancellationStrategy}}),Object.defineProperty(t,"MessageStrategy",{enumerable:!0,get:function(){return g.MessageStrategy}}),t.RAL=M().default})),ce=f((t=>{Object.defineProperty(t,"__esModule",{value:!0});let n=s(`node:util`),i=se();var o=class MessageBuffer extends i.AbstractMessageBuffer{constructor(t=`utf-8`){super(t)}emptyBuffer(){return MessageBuffer.emptyBuffer}fromString(t,n){return Buffer.from(t,n)}toString(t,i){return t instanceof Buffer?t.toString(i):new n.TextDecoder(i).decode(t)}asNative(t,n){return n===void 0?t instanceof Buffer?t:Buffer.from(t):t instanceof Buffer?t.slice(0,n):Buffer.from(t,0,n)}allocNative(t){return Buffer.allocUnsafe(t)}};o.emptyBuffer=Buffer.allocUnsafe(0);var ReadableStreamWrapper=class{constructor(t){this.stream=t}onClose(t){return this.stream.on(`close`,t),i.Disposable.create(()=>this.stream.off(`close`,t))}onError(t){return this.stream.on(`error`,t),i.Disposable.create(()=>this.stream.off(`error`,t))}onEnd(t){return this.stream.on(`end`,t),i.Disposable.create(()=>this.stream.off(`end`,t))}onData(t){return this.stream.on(`data`,t),i.Disposable.create(()=>this.stream.off(`data`,t))}},WritableStreamWrapper=class{constructor(t){this.stream=t}onClose(t){return this.stream.on(`close`,t),i.Disposable.create(()=>this.stream.off(`close`,t))}onError(t){return this.stream.on(`error`,t),i.Disposable.create(()=>this.stream.off(`error`,t))}onEnd(t){return this.stream.on(`end`,t),i.Disposable.create(()=>this.stream.off(`end`,t))}write(t,n){return new Promise((i,o)=>{let callback=t=>{t==null?i():o(t)};typeof t==`string`?this.stream.write(t,n,callback):this.stream.write(t,callback)})}end(){this.stream.end()}};let c=Object.freeze({messageBuffer:Object.freeze({create:t=>new o(t)}),applicationJson:Object.freeze({encoder:Object.freeze({name:`application/json`,encode:(t,n)=>{try{return Promise.resolve(Buffer.from(JSON.stringify(t,void 0,0),n.charset))}catch(t){return Promise.reject(t)}}}),decoder:Object.freeze({name:`application/json`,decode:(t,i)=>{try{return t instanceof Buffer?Promise.resolve(JSON.parse(t.toString(i.charset))):Promise.resolve(JSON.parse(new n.TextDecoder(i.charset).decode(t)))}catch(t){return Promise.reject(t)}}})}),stream:Object.freeze({asReadableStream:t=>new ReadableStreamWrapper(t),asWritableStream:t=>new WritableStreamWrapper(t)}),console,timer:Object.freeze({setTimeout(t,n,...i){let o=setTimeout(t,n,...i);return{dispose:()=>clearTimeout(o)}},setImmediate(t,...n){let i=setImmediate(t,...n);return{dispose:()=>clearImmediate(i)}},setInterval(t,n,...i){let o=setInterval(t,n,...i);return{dispose:()=>clearInterval(o)}}})});function RIL(){return c}(function(t){function install(){i.RAL.install(c)}t.install=install})(RIL||={}),t.default=RIL})),L=f((t=>{var n=t&&t.__createBinding||(Object.create?(function(t,n,i,o){o===void 0&&(o=i);var s=Object.getOwnPropertyDescriptor(n,i);(!s||(`get`in s?!n.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return n[i]}}),Object.defineProperty(t,o,s)}):(function(t,n,i,o){o===void 0&&(o=i),t[o]=n[i]})),i=t&&t.__exportStar||function(t,i){for(var o in t)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&n(i,t,o)};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.PortMessageWriter=t.PortMessageReader=t.IPCMessageWriter=t.IPCMessageReader=void 0;let o=ce();o.default.install();let c=s(`node:path`),u=s(`node:os`),f=s(`node:crypto`),p=s(`node:net`),h=se();i(se(),t);var IPCMessageReader=class extends h.AbstractMessageReader{constructor(t){super(),this.process=t;let n=this.process;n.on(`error`,t=>this.fireError(t)),n.on(`close`,()=>this.fireClose())}listen(t){return this.process.on(`message`,t),h.Disposable.create(()=>this.process.off(`message`,t))}};t.IPCMessageReader=IPCMessageReader;var IPCMessageWriter=class extends h.AbstractMessageWriter{constructor(t){super(),this.process=t,this.errorCount=0;let n=this.process;n.on(`error`,t=>this.fireError(t)),n.on(`close`,()=>this.fireClose)}write(t){try{return typeof this.process.send==`function`&&this.process.send(t,void 0,void 0,n=>{n?(this.errorCount++,this.handleError(n,t)):this.errorCount=0}),Promise.resolve()}catch(n){return this.handleError(n,t),Promise.reject(n)}}handleError(t,n){this.errorCount++,this.fireError(t,n,this.errorCount)}end(){}};t.IPCMessageWriter=IPCMessageWriter;var PortMessageReader=class extends h.AbstractMessageReader{constructor(t){super(),this.onData=new h.Emitter,t.on(`close`,()=>this.fireClose),t.on(`error`,t=>this.fireError(t)),t.on(`message`,t=>{this.onData.fire(t)})}listen(t){return this.onData.event(t)}};t.PortMessageReader=PortMessageReader;var PortMessageWriter=class extends h.AbstractMessageWriter{constructor(t){super(),this.port=t,this.errorCount=0,t.on(`close`,()=>this.fireClose()),t.on(`error`,t=>this.fireError(t))}write(t){try{return this.port.postMessage(t),Promise.resolve()}catch(n){return this.handleError(n,t),Promise.reject(n)}}handleError(t,n){this.errorCount++,this.fireError(t,n,this.errorCount)}end(){}};t.PortMessageWriter=PortMessageWriter;var SocketMessageReader=class extends h.ReadableStreamMessageReader{constructor(t,n=`utf-8`){super((0,o.default)().stream.asReadableStream(t),n)}};t.SocketMessageReader=SocketMessageReader;var SocketMessageWriter=class extends h.WriteableStreamMessageWriter{constructor(t,n){super((0,o.default)().stream.asWritableStream(t),n),this.socket=t}dispose(){super.dispose(),this.socket.destroy()}};t.SocketMessageWriter=SocketMessageWriter;var StreamMessageReader=class extends h.ReadableStreamMessageReader{constructor(t,n){super((0,o.default)().stream.asReadableStream(t),n)}};t.StreamMessageReader=StreamMessageReader;var StreamMessageWriter=class extends h.WriteableStreamMessageWriter{constructor(t,n){super((0,o.default)().stream.asWritableStream(t),n)}};t.StreamMessageWriter=StreamMessageWriter;let g=process.env.XDG_RUNTIME_DIR,_=new Map([[`linux`,107],[`darwin`,103]]);function generateRandomPipeName(){let t=(0,f.randomBytes)(21).toString(`hex`);if(process.platform===`win32`)return`\\\\.\\pipe\\vscode-jsonrpc-${t}-sock`;let n;n=g?c.join(g,`vscode-ipc-${t}.sock`):c.join(u.tmpdir(),`vscode-${t}.sock`);let i=_.get(process.platform);return i!==void 0&&n.length>i&&(0,o.default)().console.warn(`WARNING: IPC handle "${n}" is longer than ${i} characters.`),n}t.generateRandomPipeName=generateRandomPipeName;function createClientPipeTransport(t,n=`utf-8`){let i,o=new Promise((t,n)=>{i=t});return new Promise((s,c)=>{let u=(0,p.createServer)(t=>{u.close(),i([new SocketMessageReader(t,n),new SocketMessageWriter(t,n)])});u.on(`error`,c),u.listen(t,()=>{u.removeListener(`error`,c),s({onConnected:()=>o})})})}t.createClientPipeTransport=createClientPipeTransport;function createServerPipeTransport(t,n=`utf-8`){let i=(0,p.createConnection)(t);return[new SocketMessageReader(i,n),new SocketMessageWriter(i,n)]}t.createServerPipeTransport=createServerPipeTransport;function createClientSocketTransport(t,n=`utf-8`){let i,o=new Promise((t,n)=>{i=t});return new Promise((s,c)=>{let u=(0,p.createServer)(t=>{u.close(),i([new SocketMessageReader(t,n),new SocketMessageWriter(t,n)])});u.on(`error`,c),u.listen(t,`127.0.0.1`,()=>{u.removeListener(`error`,c),s({onConnected:()=>o})})})}t.createClientSocketTransport=createClientSocketTransport;function createServerSocketTransport(t,n=`utf-8`){let i=(0,p.createConnection)(t,`127.0.0.1`);return[new SocketMessageReader(i,n),new SocketMessageWriter(i,n)]}t.createServerSocketTransport=createServerSocketTransport;function isReadableStream(t){let n=t;return n.read!==void 0&&n.addListener!==void 0}function isWritableStream(t){let n=t;return n.write!==void 0&&n.addListener!==void 0}function createMessageConnection(t,n,i,o){i||=h.NullLogger;let s=isReadableStream(t)?new StreamMessageReader(t):t,c=isWritableStream(n)?new StreamMessageWriter(n):n;return h.ConnectionStrategy.is(o)&&(o={connectionStrategy:o}),(0,h.createMessageConnection)(s,c,i,o)}t.createMessageConnection=createMessageConnection})),le=f(((t,n)=>{n.exports=L()})),ue=c({AnnotatedTextEdit:()=>Ee,ChangeAnnotation:()=>Te,ChangeAnnotationIdentifier:()=>W,CodeAction:()=>ot,CodeActionContext:()=>at,CodeActionKind:()=>rt,CodeActionTriggerKind:()=>it,CodeDescription:()=>Se,CodeLens:()=>st,Color:()=>me,ColorInformation:()=>he,ColorPresentation:()=>ge,Command:()=>we,CompletionItem:()=>We,CompletionItemKind:()=>Re,CompletionItemLabelDetails:()=>Ue,CompletionItemTag:()=>Be,CompletionList:()=>Ge,CreateFile:()=>Oe,DeleteFile:()=>Ae,Diagnostic:()=>Ce,DiagnosticRelatedInformation:()=>ye,DiagnosticSeverity:()=>be,DiagnosticTag:()=>xe,DocumentHighlight:()=>Ze,DocumentHighlightKind:()=>Xe,DocumentLink:()=>lt,DocumentSymbol:()=>nt,DocumentUri:()=>R,EOL:()=>Ot,FoldingRange:()=>ve,FoldingRangeKind:()=>_e,FormattingOptions:()=>ct,Hover:()=>qe,InlayHint:()=>bt,InlayHintKind:()=>vt,InlayHintLabelPart:()=>yt,InlineCompletionContext:()=>Et,InlineCompletionItem:()=>St,InlineCompletionList:()=>Ct,InlineCompletionTriggerKind:()=>wt,InlineValueContext:()=>_t,InlineValueEvaluatableExpression:()=>gt,InlineValueText:()=>mt,InlineValueVariableLookup:()=>ht,InsertReplaceEdit:()=>Ve,InsertTextFormat:()=>ze,InsertTextMode:()=>He,Location:()=>fe,LocationLink:()=>pe,MarkedString:()=>Ke,MarkupContent:()=>Le,MarkupKind:()=>Ie,OptionalVersionedTextDocumentIdentifier:()=>Pe,ParameterInformation:()=>Je,Position:()=>V,Range:()=>H,RenameFile:()=>ke,SelectedCompletionInfo:()=>Tt,SelectionRange:()=>ut,SemanticTokenModifiers:()=>ft,SemanticTokenTypes:()=>dt,SemanticTokens:()=>pt,SignatureInformation:()=>Ye,StringValue:()=>xt,SymbolInformation:()=>et,SymbolKind:()=>Qe,SymbolTag:()=>$e,TextDocument:()=>kt,TextDocumentEdit:()=>De,TextDocumentIdentifier:()=>Me,TextDocumentItem:()=>Fe,TextEdit:()=>U,URI:()=>z,VersionedTextDocumentIdentifier:()=>Ne,WorkspaceChange:()=>WorkspaceChange,WorkspaceEdit:()=>je,WorkspaceFolder:()=>Dt,WorkspaceSymbol:()=>tt,integer:()=>de,uinteger:()=>B}),R,z,de,B,V,H,fe,pe,me,he,ge,_e,ve,ye,be,xe,Se,Ce,we,U,Te,W,Ee,De,Oe,ke,Ae,je,TextEditChangeImpl,ChangeAnnotations,WorkspaceChange,Me,Ne,Pe,Fe,Ie,Le,Re,ze,Be,Ve,He,Ue,We,Ge,Ke,qe,Je,Ye,Xe,Ze,Qe,$e,et,tt,nt,rt,it,at,ot,st,ct,lt,ut,dt,ft,pt,mt,ht,gt,_t,vt,yt,bt,xt,St,Ct,wt,Tt,Et,Dt,Ot,kt,FullTextDocument$1,G,At=o((()=>{(function(t){function is(t){return typeof t==`string`}t.is=is})(R||={}),(function(t){function is(t){return typeof t==`string`}t.is=is})(z||={}),(function(t){t.MIN_VALUE=-2147483648,t.MAX_VALUE=2147483647;function is(n){return typeof n==`number`&&t.MIN_VALUE<=n&&n<=t.MAX_VALUE}t.is=is})(de||={}),(function(t){t.MIN_VALUE=0,t.MAX_VALUE=2147483647;function is(n){return typeof n==`number`&&t.MIN_VALUE<=n&&n<=t.MAX_VALUE}t.is=is})(B||={}),(function(t){function create(t,n){return t===Number.MAX_VALUE&&(t=B.MAX_VALUE),n===Number.MAX_VALUE&&(n=B.MAX_VALUE),{line:t,character:n}}t.create=create;function is(t){let n=t;return G.objectLiteral(n)&&G.uinteger(n.line)&&G.uinteger(n.character)}t.is=is})(V||={}),(function(t){function create(t,n,i,o){if(G.uinteger(t)&&G.uinteger(n)&&G.uinteger(i)&&G.uinteger(o))return{start:V.create(t,n),end:V.create(i,o)};if(V.is(t)&&V.is(n))return{start:t,end:n};throw Error(`Range#create called with invalid arguments[${t}, ${n}, ${i}, ${o}]`)}t.create=create;function is(t){let n=t;return G.objectLiteral(n)&&V.is(n.start)&&V.is(n.end)}t.is=is})(H||={}),(function(t){function create(t,n){return{uri:t,range:n}}t.create=create;function is(t){let n=t;return G.objectLiteral(n)&&H.is(n.range)&&(G.string(n.uri)||G.undefined(n.uri))}t.is=is})(fe||={}),(function(t){function create(t,n,i,o){return{targetUri:t,targetRange:n,targetSelectionRange:i,originSelectionRange:o}}t.create=create;function is(t){let n=t;return G.objectLiteral(n)&&H.is(n.targetRange)&&G.string(n.targetUri)&&H.is(n.targetSelectionRange)&&(H.is(n.originSelectionRange)||G.undefined(n.originSelectionRange))}t.is=is})(pe||={}),(function(t){function create(t,n,i,o){return{red:t,green:n,blue:i,alpha:o}}t.create=create;function is(t){let n=t;return G.objectLiteral(n)&&G.numberRange(n.red,0,1)&&G.numberRange(n.green,0,1)&&G.numberRange(n.blue,0,1)&&G.numberRange(n.alpha,0,1)}t.is=is})(me||={}),(function(t){function create(t,n){return{range:t,color:n}}t.create=create;function is(t){let n=t;return G.objectLiteral(n)&&H.is(n.range)&&me.is(n.color)}t.is=is})(he||={}),(function(t){function create(t,n,i){return{label:t,textEdit:n,additionalTextEdits:i}}t.create=create;function is(t){let n=t;return G.objectLiteral(n)&&G.string(n.label)&&(G.undefined(n.textEdit)||U.is(n))&&(G.undefined(n.additionalTextEdits)||G.typedArray(n.additionalTextEdits,U.is))}t.is=is})(ge||={}),(function(t){t.Comment=`comment`,t.Imports=`imports`,t.Region=`region`})(_e||={}),(function(t){function create(t,n,i,o,s,c){let u={startLine:t,endLine:n};return G.defined(i)&&(u.startCharacter=i),G.defined(o)&&(u.endCharacter=o),G.defined(s)&&(u.kind=s),G.defined(c)&&(u.collapsedText=c),u}t.create=create;function is(t){let n=t;return G.objectLiteral(n)&&G.uinteger(n.startLine)&&G.uinteger(n.startLine)&&(G.undefined(n.startCharacter)||G.uinteger(n.startCharacter))&&(G.undefined(n.endCharacter)||G.uinteger(n.endCharacter))&&(G.undefined(n.kind)||G.string(n.kind))}t.is=is})(ve||={}),(function(t){function create(t,n){return{location:t,message:n}}t.create=create;function is(t){let n=t;return G.defined(n)&&fe.is(n.location)&&G.string(n.message)}t.is=is})(ye||={}),(function(t){t.Error=1,t.Warning=2,t.Information=3,t.Hint=4})(be||={}),(function(t){t.Unnecessary=1,t.Deprecated=2})(xe||={}),(function(t){function is(t){let n=t;return G.objectLiteral(n)&&G.string(n.href)}t.is=is})(Se||={}),(function(t){function create(t,n,i,o,s,c){let u={range:t,message:n};return G.defined(i)&&(u.severity=i),G.defined(o)&&(u.code=o),G.defined(s)&&(u.source=s),G.defined(c)&&(u.relatedInformation=c),u}t.create=create;function is(t){let n=t;return G.defined(n)&&H.is(n.range)&&G.string(n.message)&&(G.number(n.severity)||G.undefined(n.severity))&&(G.integer(n.code)||G.string(n.code)||G.undefined(n.code))&&(G.undefined(n.codeDescription)||G.string(n.codeDescription?.href))&&(G.string(n.source)||G.undefined(n.source))&&(G.undefined(n.relatedInformation)||G.typedArray(n.relatedInformation,ye.is))}t.is=is})(Ce||={}),(function(t){function create(t,n,...i){let o={title:t,command:n};return G.defined(i)&&i.length>0&&(o.arguments=i),o}t.create=create;function is(t){let n=t;return G.defined(n)&&G.string(n.title)&&G.string(n.command)}t.is=is})(we||={}),(function(t){function replace(t,n){return{range:t,newText:n}}t.replace=replace;function insert(t,n){return{range:{start:t,end:t},newText:n}}t.insert=insert;function del(t){return{range:t,newText:``}}t.del=del;function is(t){let n=t;return G.objectLiteral(n)&&G.string(n.newText)&&H.is(n.range)}t.is=is})(U||={}),(function(t){function create(t,n,i){let o={label:t};return n!==void 0&&(o.needsConfirmation=n),i!==void 0&&(o.description=i),o}t.create=create;function is(t){let n=t;return G.objectLiteral(n)&&G.string(n.label)&&(G.boolean(n.needsConfirmation)||n.needsConfirmation===void 0)&&(G.string(n.description)||n.description===void 0)}t.is=is})(Te||={}),(function(t){function is(t){let n=t;return G.string(n)}t.is=is})(W||={}),(function(t){function replace(t,n,i){return{range:t,newText:n,annotationId:i}}t.replace=replace;function insert(t,n,i){return{range:{start:t,end:t},newText:n,annotationId:i}}t.insert=insert;function del(t,n){return{range:t,newText:``,annotationId:n}}t.del=del;function is(t){let n=t;return U.is(n)&&(Te.is(n.annotationId)||W.is(n.annotationId))}t.is=is})(Ee||={}),(function(t){function create(t,n){return{textDocument:t,edits:n}}t.create=create;function is(t){let n=t;return G.defined(n)&&Pe.is(n.textDocument)&&Array.isArray(n.edits)}t.is=is})(De||={}),(function(t){function create(t,n,i){let o={kind:`create`,uri:t};return n!==void 0&&(n.overwrite!==void 0||n.ignoreIfExists!==void 0)&&(o.options=n),i!==void 0&&(o.annotationId=i),o}t.create=create;function is(t){let n=t;return n&&n.kind===`create`&&G.string(n.uri)&&(n.options===void 0||(n.options.overwrite===void 0||G.boolean(n.options.overwrite))&&(n.options.ignoreIfExists===void 0||G.boolean(n.options.ignoreIfExists)))&&(n.annotationId===void 0||W.is(n.annotationId))}t.is=is})(Oe||={}),(function(t){function create(t,n,i,o){let s={kind:`rename`,oldUri:t,newUri:n};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(s.options=i),o!==void 0&&(s.annotationId=o),s}t.create=create;function is(t){let n=t;return n&&n.kind===`rename`&&G.string(n.oldUri)&&G.string(n.newUri)&&(n.options===void 0||(n.options.overwrite===void 0||G.boolean(n.options.overwrite))&&(n.options.ignoreIfExists===void 0||G.boolean(n.options.ignoreIfExists)))&&(n.annotationId===void 0||W.is(n.annotationId))}t.is=is})(ke||={}),(function(t){function create(t,n,i){let o={kind:`delete`,uri:t};return n!==void 0&&(n.recursive!==void 0||n.ignoreIfNotExists!==void 0)&&(o.options=n),i!==void 0&&(o.annotationId=i),o}t.create=create;function is(t){let n=t;return n&&n.kind===`delete`&&G.string(n.uri)&&(n.options===void 0||(n.options.recursive===void 0||G.boolean(n.options.recursive))&&(n.options.ignoreIfNotExists===void 0||G.boolean(n.options.ignoreIfNotExists)))&&(n.annotationId===void 0||W.is(n.annotationId))}t.is=is})(Ae||={}),(function(t){function is(t){let n=t;return n&&(n.changes!==void 0||n.documentChanges!==void 0)&&(n.documentChanges===void 0||n.documentChanges.every(t=>G.string(t.kind)?Oe.is(t)||ke.is(t)||Ae.is(t):De.is(t)))}t.is=is})(je||={}),TextEditChangeImpl=class{constructor(t,n){this.edits=t,this.changeAnnotations=n}insert(t,n,i){let o,s;if(i===void 0?o=U.insert(t,n):W.is(i)?(s=i,o=Ee.insert(t,n,i)):(this.assertChangeAnnotations(this.changeAnnotations),s=this.changeAnnotations.manage(i),o=Ee.insert(t,n,s)),this.edits.push(o),s!==void 0)return s}replace(t,n,i){let o,s;if(i===void 0?o=U.replace(t,n):W.is(i)?(s=i,o=Ee.replace(t,n,i)):(this.assertChangeAnnotations(this.changeAnnotations),s=this.changeAnnotations.manage(i),o=Ee.replace(t,n,s)),this.edits.push(o),s!==void 0)return s}delete(t,n){let i,o;if(n===void 0?i=U.del(t):W.is(n)?(o=n,i=Ee.del(t,n)):(this.assertChangeAnnotations(this.changeAnnotations),o=this.changeAnnotations.manage(n),i=Ee.del(t,o)),this.edits.push(i),o!==void 0)return o}add(t){this.edits.push(t)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(t){if(t===void 0)throw Error(`Text edit change is not configured to manage change annotations.`)}},ChangeAnnotations=class{constructor(t){this._annotations=t===void 0?Object.create(null):t,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(t,n){let i;if(W.is(t)?i=t:(i=this.nextId(),n=t),this._annotations[i]!==void 0)throw Error(`Id ${i} is already in use.`);if(n===void 0)throw Error(`No annotation provided for id ${i}`);return this._annotations[i]=n,this._size++,i}nextId(){return this._counter++,this._counter.toString()}},WorkspaceChange=class{constructor(t){this._textEditChanges=Object.create(null),t===void 0?this._workspaceEdit={}:(this._workspaceEdit=t,t.documentChanges?(this._changeAnnotations=new ChangeAnnotations(t.changeAnnotations),t.changeAnnotations=this._changeAnnotations.all(),t.documentChanges.forEach(t=>{if(De.is(t)){let n=new TextEditChangeImpl(t.edits,this._changeAnnotations);this._textEditChanges[t.textDocument.uri]=n}})):t.changes&&Object.keys(t.changes).forEach(n=>{let i=new TextEditChangeImpl(t.changes[n]);this._textEditChanges[n]=i}))}get edit(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(t){if(Pe.is(t)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw Error(`Workspace edit is not configured for document changes.`);let n={uri:t.uri,version:t.version},i=this._textEditChanges[n.uri];if(!i){let t=[],o={textDocument:n,edits:t};this._workspaceEdit.documentChanges.push(o),i=new TextEditChangeImpl(t,this._changeAnnotations),this._textEditChanges[n.uri]=i}return i}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw Error(`Workspace edit is not configured for normal text edit changes.`);let n=this._textEditChanges[t];if(!n){let i=[];this._workspaceEdit.changes[t]=i,n=new TextEditChangeImpl(i),this._textEditChanges[t]=n}return n}}initDocumentChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new ChangeAnnotations,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))}createFile(t,n,i){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw Error(`Workspace edit is not configured for document changes.`);let o;Te.is(n)||W.is(n)?o=n:i=n;let s,c;if(o===void 0?s=Oe.create(t,i):(c=W.is(o)?o:this._changeAnnotations.manage(o),s=Oe.create(t,i,c)),this._workspaceEdit.documentChanges.push(s),c!==void 0)return c}renameFile(t,n,i,o){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw Error(`Workspace edit is not configured for document changes.`);let s;Te.is(i)||W.is(i)?s=i:o=i;let c,u;if(s===void 0?c=ke.create(t,n,o):(u=W.is(s)?s:this._changeAnnotations.manage(s),c=ke.create(t,n,o,u)),this._workspaceEdit.documentChanges.push(c),u!==void 0)return u}deleteFile(t,n,i){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw Error(`Workspace edit is not configured for document changes.`);let o;Te.is(n)||W.is(n)?o=n:i=n;let s,c;if(o===void 0?s=Ae.create(t,i):(c=W.is(o)?o:this._changeAnnotations.manage(o),s=Ae.create(t,i,c)),this._workspaceEdit.documentChanges.push(s),c!==void 0)return c}},(function(t){function create(t){return{uri:t}}t.create=create;function is(t){let n=t;return G.defined(n)&&G.string(n.uri)}t.is=is})(Me||={}),(function(t){function create(t,n){return{uri:t,version:n}}t.create=create;function is(t){let n=t;return G.defined(n)&&G.string(n.uri)&&G.integer(n.version)}t.is=is})(Ne||={}),(function(t){function create(t,n){return{uri:t,version:n}}t.create=create;function is(t){let n=t;return G.defined(n)&&G.string(n.uri)&&(n.version===null||G.integer(n.version))}t.is=is})(Pe||={}),(function(t){function create(t,n,i,o){return{uri:t,languageId:n,version:i,text:o}}t.create=create;function is(t){let n=t;return G.defined(n)&&G.string(n.uri)&&G.string(n.languageId)&&G.integer(n.version)&&G.string(n.text)}t.is=is})(Fe||={}),(function(t){t.PlainText=`plaintext`,t.Markdown=`markdown`;function is(n){let i=n;return i===t.PlainText||i===t.Markdown}t.is=is})(Ie||={}),(function(t){function is(t){let n=t;return G.objectLiteral(t)&&Ie.is(n.kind)&&G.string(n.value)}t.is=is})(Le||={}),(function(t){t.Text=1,t.Method=2,t.Function=3,t.Constructor=4,t.Field=5,t.Variable=6,t.Class=7,t.Interface=8,t.Module=9,t.Property=10,t.Unit=11,t.Value=12,t.Enum=13,t.Keyword=14,t.Snippet=15,t.Color=16,t.File=17,t.Reference=18,t.Folder=19,t.EnumMember=20,t.Constant=21,t.Struct=22,t.Event=23,t.Operator=24,t.TypeParameter=25})(Re||={}),(function(t){t.PlainText=1,t.Snippet=2})(ze||={}),(function(t){t.Deprecated=1})(Be||={}),(function(t){function create(t,n,i){return{newText:t,insert:n,replace:i}}t.create=create;function is(t){let n=t;return n&&G.string(n.newText)&&H.is(n.insert)&&H.is(n.replace)}t.is=is})(Ve||={}),(function(t){t.asIs=1,t.adjustIndentation=2})(He||={}),(function(t){function is(t){let n=t;return n&&(G.string(n.detail)||n.detail===void 0)&&(G.string(n.description)||n.description===void 0)}t.is=is})(Ue||={}),(function(t){function create(t){return{label:t}}t.create=create})(We||={}),(function(t){function create(t,n){return{items:t||[],isIncomplete:!!n}}t.create=create})(Ge||={}),(function(t){function fromPlainText(t){return t.replace(/[\\`*_{}[\]()#+\-.!]/g,`\\$&`)}t.fromPlainText=fromPlainText;function is(t){let n=t;return G.string(n)||G.objectLiteral(n)&&G.string(n.language)&&G.string(n.value)}t.is=is})(Ke||={}),(function(t){function is(t){let n=t;return!!n&&G.objectLiteral(n)&&(Le.is(n.contents)||Ke.is(n.contents)||G.typedArray(n.contents,Ke.is))&&(t.range===void 0||H.is(t.range))}t.is=is})(qe||={}),(function(t){function create(t,n){return n?{label:t,documentation:n}:{label:t}}t.create=create})(Je||={}),(function(t){function create(t,n,...i){let o={label:t};return G.defined(n)&&(o.documentation=n),G.defined(i)?o.parameters=i:o.parameters=[],o}t.create=create})(Ye||={}),(function(t){t.Text=1,t.Read=2,t.Write=3})(Xe||={}),(function(t){function create(t,n){let i={range:t};return G.number(n)&&(i.kind=n),i}t.create=create})(Ze||={}),(function(t){t.File=1,t.Module=2,t.Namespace=3,t.Package=4,t.Class=5,t.Method=6,t.Property=7,t.Field=8,t.Constructor=9,t.Enum=10,t.Interface=11,t.Function=12,t.Variable=13,t.Constant=14,t.String=15,t.Number=16,t.Boolean=17,t.Array=18,t.Object=19,t.Key=20,t.Null=21,t.EnumMember=22,t.Struct=23,t.Event=24,t.Operator=25,t.TypeParameter=26})(Qe||={}),(function(t){t.Deprecated=1})($e||={}),(function(t){function create(t,n,i,o,s){let c={name:t,kind:n,location:{uri:o,range:i}};return s&&(c.containerName=s),c}t.create=create})(et||={}),(function(t){function create(t,n,i,o){return o===void 0?{name:t,kind:n,location:{uri:i}}:{name:t,kind:n,location:{uri:i,range:o}}}t.create=create})(tt||={}),(function(t){function create(t,n,i,o,s,c){let u={name:t,detail:n,kind:i,range:o,selectionRange:s};return c!==void 0&&(u.children=c),u}t.create=create;function is(t){let n=t;return n&&G.string(n.name)&&G.number(n.kind)&&H.is(n.range)&&H.is(n.selectionRange)&&(n.detail===void 0||G.string(n.detail))&&(n.deprecated===void 0||G.boolean(n.deprecated))&&(n.children===void 0||Array.isArray(n.children))&&(n.tags===void 0||Array.isArray(n.tags))}t.is=is})(nt||={}),(function(t){t.Empty=``,t.QuickFix=`quickfix`,t.Refactor=`refactor`,t.RefactorExtract=`refactor.extract`,t.RefactorInline=`refactor.inline`,t.RefactorRewrite=`refactor.rewrite`,t.Source=`source`,t.SourceOrganizeImports=`source.organizeImports`,t.SourceFixAll=`source.fixAll`})(rt||={}),(function(t){t.Invoked=1,t.Automatic=2})(it||={}),(function(t){function create(t,n,i){let o={diagnostics:t};return n!=null&&(o.only=n),i!=null&&(o.triggerKind=i),o}t.create=create;function is(t){let n=t;return G.defined(n)&&G.typedArray(n.diagnostics,Ce.is)&&(n.only===void 0||G.typedArray(n.only,G.string))&&(n.triggerKind===void 0||n.triggerKind===it.Invoked||n.triggerKind===it.Automatic)}t.is=is})(at||={}),(function(t){function create(t,n,i){let o={title:t},s=!0;return typeof n==`string`?(s=!1,o.kind=n):we.is(n)?o.command=n:o.edit=n,s&&i!==void 0&&(o.kind=i),o}t.create=create;function is(t){let n=t;return n&&G.string(n.title)&&(n.diagnostics===void 0||G.typedArray(n.diagnostics,Ce.is))&&(n.kind===void 0||G.string(n.kind))&&(n.edit!==void 0||n.command!==void 0)&&(n.command===void 0||we.is(n.command))&&(n.isPreferred===void 0||G.boolean(n.isPreferred))&&(n.edit===void 0||je.is(n.edit))}t.is=is})(ot||={}),(function(t){function create(t,n){let i={range:t};return G.defined(n)&&(i.data=n),i}t.create=create;function is(t){let n=t;return G.defined(n)&&H.is(n.range)&&(G.undefined(n.command)||we.is(n.command))}t.is=is})(st||={}),(function(t){function create(t,n){return{tabSize:t,insertSpaces:n}}t.create=create;function is(t){let n=t;return G.defined(n)&&G.uinteger(n.tabSize)&&G.boolean(n.insertSpaces)}t.is=is})(ct||={}),(function(t){function create(t,n,i){return{range:t,target:n,data:i}}t.create=create;function is(t){let n=t;return G.defined(n)&&H.is(n.range)&&(G.undefined(n.target)||G.string(n.target))}t.is=is})(lt||={}),(function(t){function create(t,n){return{range:t,parent:n}}t.create=create;function is(n){let i=n;return G.objectLiteral(i)&&H.is(i.range)&&(i.parent===void 0||t.is(i.parent))}t.is=is})(ut||={}),(function(t){t.namespace=`namespace`,t.type=`type`,t.class=`class`,t.enum=`enum`,t.interface=`interface`,t.struct=`struct`,t.typeParameter=`typeParameter`,t.parameter=`parameter`,t.variable=`variable`,t.property=`property`,t.enumMember=`enumMember`,t.event=`event`,t.function=`function`,t.method=`method`,t.macro=`macro`,t.keyword=`keyword`,t.modifier=`modifier`,t.comment=`comment`,t.string=`string`,t.number=`number`,t.regexp=`regexp`,t.operator=`operator`,t.decorator=`decorator`})(dt||={}),(function(t){t.declaration=`declaration`,t.definition=`definition`,t.readonly=`readonly`,t.static=`static`,t.deprecated=`deprecated`,t.abstract=`abstract`,t.async=`async`,t.modification=`modification`,t.documentation=`documentation`,t.defaultLibrary=`defaultLibrary`})(ft||={}),(function(t){function is(t){let n=t;return G.objectLiteral(n)&&(n.resultId===void 0||typeof n.resultId==`string`)&&Array.isArray(n.data)&&(n.data.length===0||typeof n.data[0]==`number`)}t.is=is})(pt||={}),(function(t){function create(t,n){return{range:t,text:n}}t.create=create;function is(t){let n=t;return n!=null&&H.is(n.range)&&G.string(n.text)}t.is=is})(mt||={}),(function(t){function create(t,n,i){return{range:t,variableName:n,caseSensitiveLookup:i}}t.create=create;function is(t){let n=t;return n!=null&&H.is(n.range)&&G.boolean(n.caseSensitiveLookup)&&(G.string(n.variableName)||n.variableName===void 0)}t.is=is})(ht||={}),(function(t){function create(t,n){return{range:t,expression:n}}t.create=create;function is(t){let n=t;return n!=null&&H.is(n.range)&&(G.string(n.expression)||n.expression===void 0)}t.is=is})(gt||={}),(function(t){function create(t,n){return{frameId:t,stoppedLocation:n}}t.create=create;function is(t){let n=t;return G.defined(n)&&H.is(t.stoppedLocation)}t.is=is})(_t||={}),(function(t){t.Type=1,t.Parameter=2;function is(t){return t===1||t===2}t.is=is})(vt||={}),(function(t){function create(t){return{value:t}}t.create=create;function is(t){let n=t;return G.objectLiteral(n)&&(n.tooltip===void 0||G.string(n.tooltip)||Le.is(n.tooltip))&&(n.location===void 0||fe.is(n.location))&&(n.command===void 0||we.is(n.command))}t.is=is})(yt||={}),(function(t){function create(t,n,i){let o={position:t,label:n};return i!==void 0&&(o.kind=i),o}t.create=create;function is(t){let n=t;return G.objectLiteral(n)&&V.is(n.position)&&(G.string(n.label)||G.typedArray(n.label,yt.is))&&(n.kind===void 0||vt.is(n.kind))&&n.textEdits===void 0||G.typedArray(n.textEdits,U.is)&&(n.tooltip===void 0||G.string(n.tooltip)||Le.is(n.tooltip))&&(n.paddingLeft===void 0||G.boolean(n.paddingLeft))&&(n.paddingRight===void 0||G.boolean(n.paddingRight))}t.is=is})(bt||={}),(function(t){function createSnippet(t){return{kind:`snippet`,value:t}}t.createSnippet=createSnippet})(xt||={}),(function(t){function create(t,n,i,o){return{insertText:t,filterText:n,range:i,command:o}}t.create=create})(St||={}),(function(t){function create(t){return{items:t}}t.create=create})(Ct||={}),(function(t){t.Invoked=0,t.Automatic=1})(wt||={}),(function(t){function create(t,n){return{range:t,text:n}}t.create=create})(Tt||={}),(function(t){function create(t,n){return{triggerKind:t,selectedCompletionInfo:n}}t.create=create})(Et||={}),(function(t){function is(t){let n=t;return G.objectLiteral(n)&&z.is(n.uri)&&G.string(n.name)}t.is=is})(Dt||={}),Ot=[`
13
13
  `,`\r
14
14
  `,`\r`],(function(t){function create(t,n,i,o){return new FullTextDocument$1(t,n,i,o)}t.create=create;function is(t){let n=t;return!!(G.defined(n)&&G.string(n.uri)&&(G.undefined(n.languageId)||G.string(n.languageId))&&G.uinteger(n.lineCount)&&G.func(n.getText)&&G.func(n.positionAt)&&G.func(n.offsetAt))}t.is=is;function applyEdits(t,n){let i=t.getText(),o=mergeSort(n,(t,n)=>{let i=t.range.start.line-n.range.start.line;return i===0?t.range.start.character-n.range.start.character:i}),s=i.length;for(let n=o.length-1;n>=0;n--){let c=o[n],u=t.offsetAt(c.range.start),f=t.offsetAt(c.range.end);if(f<=s)i=i.substring(0,u)+c.newText+i.substring(f,i.length);else throw Error(`Overlapping edit`);s=u}return i}t.applyEdits=applyEdits;function mergeSort(t,n){if(t.length<=1)return t;let i=t.length/2|0,o=t.slice(0,i),s=t.slice(i);mergeSort(o,n),mergeSort(s,n);let c=0,u=0,f=0;for(;c<o.length&&u<s.length;)n(o[c],s[u])<=0?t[f++]=o[c++]:t[f++]=s[u++];for(;c<o.length;)t[f++]=o[c++];for(;u<s.length;)t[f++]=s[u++];return t}})(kt||={}),FullTextDocument$1=class{static{i(this,`FullTextDocument`)}constructor(t,n,i,o){this._uri=t,this._languageId=n,this._version=i,this._content=o,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(t){if(t){let n=this.offsetAt(t.start),i=this.offsetAt(t.end);return this._content.substring(n,i)}return this._content}update(t,n){this._content=t.text,this._version=n,this._lineOffsets=void 0}getLineOffsets(){if(this._lineOffsets===void 0){let t=[],n=this._content,i=!0;for(let o=0;o<n.length;o++){i&&=(t.push(o),!1);let s=n.charAt(o);i=s===`\r`||s===`
15
15
  `,s===`\r`&&o+1<n.length&&n.charAt(o+1)===`
16
- `&&o++}i&&n.length>0&&t.push(n.length),this._lineOffsets=t}return this._lineOffsets}positionAt(t){t=Math.max(Math.min(t,this._content.length),0);let n=this.getLineOffsets(),i=0,o=n.length;if(o===0)return V.create(0,t);for(;i<o;){let s=Math.floor((i+o)/2);n[s]>t?o=s:i=s+1}let s=i-1;return V.create(s,t-n[s])}offsetAt(t){let n=this.getLineOffsets();if(t.line>=n.length)return this._content.length;if(t.line<0)return 0;let i=n[t.line],o=t.line+1<n.length?n[t.line+1]:this._content.length;return Math.max(Math.min(i+t.character,o),i)}get lineCount(){return this.getLineOffsets().length}},(function(t){let n=Object.prototype.toString;function defined(t){return t!==void 0}t.defined=defined;function undefined(t){return t===void 0}t.undefined=undefined;function boolean(t){return t===!0||t===!1}t.boolean=boolean;function string(t){return n.call(t)===`[object String]`}t.string=string;function number(t){return n.call(t)===`[object Number]`}t.number=number;function numberRange(t,i,o){return n.call(t)===`[object Number]`&&i<=t&&t<=o}t.numberRange=numberRange;function integer(t){return n.call(t)===`[object Number]`&&-2147483648<=t&&t<=2147483647}t.integer=integer;function uinteger(t){return n.call(t)===`[object Number]`&&0<=t&&t<=2147483647}t.uinteger=uinteger;function func(t){return n.call(t)===`[object Function]`}t.func=func;function objectLiteral(t){return typeof t==`object`&&!!t}t.objectLiteral=objectLiteral;function typedArray(t,n){return Array.isArray(t)&&t.every(n)}t.typedArray=typedArray})(G||={})})),K=f((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ProtocolNotificationType=t.ProtocolNotificationType0=t.ProtocolRequestType=t.ProtocolRequestType0=t.RegistrationType=t.MessageDirection=void 0;let n=L();var i;(function(t){t.clientToServer=`clientToServer`,t.serverToClient=`serverToClient`,t.both=`both`})(i||(t.MessageDirection=i={}));var RegistrationType=class{constructor(t){this.method=t}};t.RegistrationType=RegistrationType;var ProtocolRequestType0=class extends n.RequestType0{constructor(t){super(t)}};t.ProtocolRequestType0=ProtocolRequestType0;var ProtocolRequestType=class extends n.RequestType{constructor(t){super(t,n.ParameterStructures.byName)}};t.ProtocolRequestType=ProtocolRequestType;var ProtocolNotificationType0=class extends n.NotificationType0{constructor(t){super(t)}};t.ProtocolNotificationType0=ProtocolNotificationType0;var ProtocolNotificationType=class extends n.NotificationType{constructor(t){super(t,n.ParameterStructures.byName)}};t.ProtocolNotificationType=ProtocolNotificationType})),jt=f((t=>{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;function boolean(t){return t===!0||t===!1}t.boolean=boolean;function string(t){return typeof t==`string`||t instanceof String}t.string=string;function number(t){return typeof t==`number`||t instanceof Number}t.number=number;function error(t){return t instanceof Error}t.error=error;function func(t){return typeof t==`function`}t.func=func;function array(t){return Array.isArray(t)}t.array=array;function stringArray(t){return array(t)&&t.every(t=>string(t))}t.stringArray=stringArray;function typedArray(t,n){return Array.isArray(t)&&t.every(n)}t.typedArray=typedArray;function objectLiteral(t){return typeof t==`object`&&!!t}t.objectLiteral=objectLiteral})),Mt=f((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ImplementationRequest=void 0;let n=K();var i;(function(t){t.method=`textDocument/implementation`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(i||(t.ImplementationRequest=i={}))})),Nt=f((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TypeDefinitionRequest=void 0;let n=K();var i;(function(t){t.method=`textDocument/typeDefinition`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(i||(t.TypeDefinitionRequest=i={}))})),Pt=f((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DidChangeWorkspaceFoldersNotification=t.WorkspaceFoldersRequest=void 0;let n=K();var i;(function(t){t.method=`workspace/workspaceFolders`,t.messageDirection=n.MessageDirection.serverToClient,t.type=new n.ProtocolRequestType0(t.method)})(i||(t.WorkspaceFoldersRequest=i={}));var o;(function(t){t.method=`workspace/didChangeWorkspaceFolders`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolNotificationType(t.method)})(o||(t.DidChangeWorkspaceFoldersNotification=o={}))})),Ft=f((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigurationRequest=void 0;let n=K();var i;(function(t){t.method=`workspace/configuration`,t.messageDirection=n.MessageDirection.serverToClient,t.type=new n.ProtocolRequestType(t.method)})(i||(t.ConfigurationRequest=i={}))})),It=f((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ColorPresentationRequest=t.DocumentColorRequest=void 0;let n=K();var i;(function(t){t.method=`textDocument/documentColor`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(i||(t.DocumentColorRequest=i={}));var o;(function(t){t.method=`textDocument/colorPresentation`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(o||(t.ColorPresentationRequest=o={}))})),Lt=f((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FoldingRangeRefreshRequest=t.FoldingRangeRequest=void 0;let n=K();var i;(function(t){t.method=`textDocument/foldingRange`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(i||(t.FoldingRangeRequest=i={}));var o;(function(t){t.method=`workspace/foldingRange/refresh`,t.messageDirection=n.MessageDirection.serverToClient,t.type=new n.ProtocolRequestType0(t.method)})(o||(t.FoldingRangeRefreshRequest=o={}))})),Rt=f((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DeclarationRequest=void 0;let n=K();var i;(function(t){t.method=`textDocument/declaration`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(i||(t.DeclarationRequest=i={}))})),zt=f((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SelectionRangeRequest=void 0;let n=K();var i;(function(t){t.method=`textDocument/selectionRange`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(i||(t.SelectionRangeRequest=i={}))})),Bt=f((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.WorkDoneProgressCancelNotification=t.WorkDoneProgressCreateRequest=t.WorkDoneProgress=void 0;let n=L(),i=K();var o;(function(t){t.type=new n.ProgressType;function is(n){return n===t.type}t.is=is})(o||(t.WorkDoneProgress=o={}));var s;(function(t){t.method=`window/workDoneProgress/create`,t.messageDirection=i.MessageDirection.serverToClient,t.type=new i.ProtocolRequestType(t.method)})(s||(t.WorkDoneProgressCreateRequest=s={}));var c;(function(t){t.method=`window/workDoneProgress/cancel`,t.messageDirection=i.MessageDirection.clientToServer,t.type=new i.ProtocolNotificationType(t.method)})(c||(t.WorkDoneProgressCancelNotification=c={}))})),Vt=f((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CallHierarchyOutgoingCallsRequest=t.CallHierarchyIncomingCallsRequest=t.CallHierarchyPrepareRequest=void 0;let n=K();var i;(function(t){t.method=`textDocument/prepareCallHierarchy`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(i||(t.CallHierarchyPrepareRequest=i={}));var o;(function(t){t.method=`callHierarchy/incomingCalls`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(o||(t.CallHierarchyIncomingCallsRequest=o={}));var s;(function(t){t.method=`callHierarchy/outgoingCalls`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(s||(t.CallHierarchyOutgoingCallsRequest=s={}))})),Ht=f((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SemanticTokensRefreshRequest=t.SemanticTokensRangeRequest=t.SemanticTokensDeltaRequest=t.SemanticTokensRequest=t.SemanticTokensRegistrationType=t.TokenFormat=void 0;let n=K();var i;(function(t){t.Relative=`relative`})(i||(t.TokenFormat=i={}));var o;(function(t){t.method=`textDocument/semanticTokens`,t.type=new n.RegistrationType(t.method)})(o||(t.SemanticTokensRegistrationType=o={}));var s;(function(t){t.method=`textDocument/semanticTokens/full`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method),t.registrationMethod=o.method})(s||(t.SemanticTokensRequest=s={}));var c;(function(t){t.method=`textDocument/semanticTokens/full/delta`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method),t.registrationMethod=o.method})(c||(t.SemanticTokensDeltaRequest=c={}));var u;(function(t){t.method=`textDocument/semanticTokens/range`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method),t.registrationMethod=o.method})(u||(t.SemanticTokensRangeRequest=u={}));var f;(function(t){t.method=`workspace/semanticTokens/refresh`,t.messageDirection=n.MessageDirection.serverToClient,t.type=new n.ProtocolRequestType0(t.method)})(f||(t.SemanticTokensRefreshRequest=f={}))})),Ut=f((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ShowDocumentRequest=void 0;let n=K();var i;(function(t){t.method=`window/showDocument`,t.messageDirection=n.MessageDirection.serverToClient,t.type=new n.ProtocolRequestType(t.method)})(i||(t.ShowDocumentRequest=i={}))})),Wt=f((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LinkedEditingRangeRequest=void 0;let n=K();var i;(function(t){t.method=`textDocument/linkedEditingRange`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(i||(t.LinkedEditingRangeRequest=i={}))})),Gt=f((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.WillDeleteFilesRequest=t.DidDeleteFilesNotification=t.DidRenameFilesNotification=t.WillRenameFilesRequest=t.DidCreateFilesNotification=t.WillCreateFilesRequest=t.FileOperationPatternKind=void 0;let n=K();var i;(function(t){t.file=`file`,t.folder=`folder`})(i||(t.FileOperationPatternKind=i={}));var o;(function(t){t.method=`workspace/willCreateFiles`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(o||(t.WillCreateFilesRequest=o={}));var s;(function(t){t.method=`workspace/didCreateFiles`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolNotificationType(t.method)})(s||(t.DidCreateFilesNotification=s={}));var c;(function(t){t.method=`workspace/willRenameFiles`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(c||(t.WillRenameFilesRequest=c={}));var u;(function(t){t.method=`workspace/didRenameFiles`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolNotificationType(t.method)})(u||(t.DidRenameFilesNotification=u={}));var f;(function(t){t.method=`workspace/didDeleteFiles`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolNotificationType(t.method)})(f||(t.DidDeleteFilesNotification=f={}));var p;(function(t){t.method=`workspace/willDeleteFiles`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(p||(t.WillDeleteFilesRequest=p={}))})),Kt=f((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MonikerRequest=t.MonikerKind=t.UniquenessLevel=void 0;let n=K();var i;(function(t){t.document=`document`,t.project=`project`,t.group=`group`,t.scheme=`scheme`,t.global=`global`})(i||(t.UniquenessLevel=i={}));var o;(function(t){t.$import=`import`,t.$export=`export`,t.local=`local`})(o||(t.MonikerKind=o={}));var s;(function(t){t.method=`textDocument/moniker`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(s||(t.MonikerRequest=s={}))})),qt=f((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TypeHierarchySubtypesRequest=t.TypeHierarchySupertypesRequest=t.TypeHierarchyPrepareRequest=void 0;let n=K();var i;(function(t){t.method=`textDocument/prepareTypeHierarchy`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(i||(t.TypeHierarchyPrepareRequest=i={}));var o;(function(t){t.method=`typeHierarchy/supertypes`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(o||(t.TypeHierarchySupertypesRequest=o={}));var s;(function(t){t.method=`typeHierarchy/subtypes`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(s||(t.TypeHierarchySubtypesRequest=s={}))})),Jt=f((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.InlineValueRefreshRequest=t.InlineValueRequest=void 0;let n=K();var i;(function(t){t.method=`textDocument/inlineValue`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(i||(t.InlineValueRequest=i={}));var o;(function(t){t.method=`workspace/inlineValue/refresh`,t.messageDirection=n.MessageDirection.serverToClient,t.type=new n.ProtocolRequestType0(t.method)})(o||(t.InlineValueRefreshRequest=o={}))})),Yt=f((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.InlayHintRefreshRequest=t.InlayHintResolveRequest=t.InlayHintRequest=void 0;let n=K();var i;(function(t){t.method=`textDocument/inlayHint`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(i||(t.InlayHintRequest=i={}));var o;(function(t){t.method=`inlayHint/resolve`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(o||(t.InlayHintResolveRequest=o={}));var s;(function(t){t.method=`workspace/inlayHint/refresh`,t.messageDirection=n.MessageDirection.serverToClient,t.type=new n.ProtocolRequestType0(t.method)})(s||(t.InlayHintRefreshRequest=s={}))})),Xt=f((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DiagnosticRefreshRequest=t.WorkspaceDiagnosticRequest=t.DocumentDiagnosticRequest=t.DocumentDiagnosticReportKind=t.DiagnosticServerCancellationData=void 0;let n=L(),i=jt(),o=K();var s;(function(t){function is(t){let n=t;return n&&i.boolean(n.retriggerRequest)}t.is=is})(s||(t.DiagnosticServerCancellationData=s={}));var c;(function(t){t.Full=`full`,t.Unchanged=`unchanged`})(c||(t.DocumentDiagnosticReportKind=c={}));var u;(function(t){t.method=`textDocument/diagnostic`,t.messageDirection=o.MessageDirection.clientToServer,t.type=new o.ProtocolRequestType(t.method),t.partialResult=new n.ProgressType})(u||(t.DocumentDiagnosticRequest=u={}));var f;(function(t){t.method=`workspace/diagnostic`,t.messageDirection=o.MessageDirection.clientToServer,t.type=new o.ProtocolRequestType(t.method),t.partialResult=new n.ProgressType})(f||(t.WorkspaceDiagnosticRequest=f={}));var p;(function(t){t.method=`workspace/diagnostic/refresh`,t.messageDirection=o.MessageDirection.serverToClient,t.type=new o.ProtocolRequestType0(t.method)})(p||(t.DiagnosticRefreshRequest=p={}))})),Zt=f((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DidCloseNotebookDocumentNotification=t.DidSaveNotebookDocumentNotification=t.DidChangeNotebookDocumentNotification=t.NotebookCellArrayChange=t.DidOpenNotebookDocumentNotification=t.NotebookDocumentSyncRegistrationType=t.NotebookDocument=t.NotebookCell=t.ExecutionSummary=t.NotebookCellKind=void 0;let n=(At(),u(ue)),i=jt(),o=K();var s;(function(t){t.Markup=1,t.Code=2;function is(t){return t===1||t===2}t.is=is})(s||(t.NotebookCellKind=s={}));var c;(function(t){function create(t,n){let i={executionOrder:t};return(n===!0||n===!1)&&(i.success=n),i}t.create=create;function is(t){let o=t;return i.objectLiteral(o)&&n.uinteger.is(o.executionOrder)&&(o.success===void 0||i.boolean(o.success))}t.is=is;function equals(t,n){return t===n?!0:t==null||n==null?!1:t.executionOrder===n.executionOrder&&t.success===n.success}t.equals=equals})(c||(t.ExecutionSummary=c={}));var f;(function(t){function create(t,n){return{kind:t,document:n}}t.create=create;function is(t){let o=t;return i.objectLiteral(o)&&s.is(o.kind)&&n.DocumentUri.is(o.document)&&(o.metadata===void 0||i.objectLiteral(o.metadata))}t.is=is;function diff(t,n){let i=new Set;return t.document!==n.document&&i.add(`document`),t.kind!==n.kind&&i.add(`kind`),t.executionSummary!==n.executionSummary&&i.add(`executionSummary`),(t.metadata!==void 0||n.metadata!==void 0)&&!equalsMetadata(t.metadata,n.metadata)&&i.add(`metadata`),(t.executionSummary!==void 0||n.executionSummary!==void 0)&&!c.equals(t.executionSummary,n.executionSummary)&&i.add(`executionSummary`),i}t.diff=diff;function equalsMetadata(t,n){if(t===n)return!0;if(t==null||n==null||typeof t!=typeof n||typeof t!=`object`)return!1;let o=Array.isArray(t),s=Array.isArray(n);if(o!==s)return!1;if(o&&s){if(t.length!==n.length)return!1;for(let i=0;i<t.length;i++)if(!equalsMetadata(t[i],n[i]))return!1}if(i.objectLiteral(t)&&i.objectLiteral(n)){let i=Object.keys(t),o=Object.keys(n);if(i.length!==o.length||(i.sort(),o.sort(),!equalsMetadata(i,o)))return!1;for(let o=0;o<i.length;o++){let s=i[o];if(!equalsMetadata(t[s],n[s]))return!1}}return!0}})(f||(t.NotebookCell=f={}));var p;(function(t){function create(t,n,i,o){return{uri:t,notebookType:n,version:i,cells:o}}t.create=create;function is(t){let o=t;return i.objectLiteral(o)&&i.string(o.uri)&&n.integer.is(o.version)&&i.typedArray(o.cells,f.is)}t.is=is})(p||(t.NotebookDocument=p={}));var h;(function(t){t.method=`notebookDocument/sync`,t.messageDirection=o.MessageDirection.clientToServer,t.type=new o.RegistrationType(t.method)})(h||(t.NotebookDocumentSyncRegistrationType=h={}));var g;(function(t){t.method=`notebookDocument/didOpen`,t.messageDirection=o.MessageDirection.clientToServer,t.type=new o.ProtocolNotificationType(t.method),t.registrationMethod=h.method})(g||(t.DidOpenNotebookDocumentNotification=g={}));var _;(function(t){function is(t){let o=t;return i.objectLiteral(o)&&n.uinteger.is(o.start)&&n.uinteger.is(o.deleteCount)&&(o.cells===void 0||i.typedArray(o.cells,f.is))}t.is=is;function create(t,n,i){let o={start:t,deleteCount:n};return i!==void 0&&(o.cells=i),o}t.create=create})(_||(t.NotebookCellArrayChange=_={}));var x;(function(t){t.method=`notebookDocument/didChange`,t.messageDirection=o.MessageDirection.clientToServer,t.type=new o.ProtocolNotificationType(t.method),t.registrationMethod=h.method})(x||(t.DidChangeNotebookDocumentNotification=x={}));var S;(function(t){t.method=`notebookDocument/didSave`,t.messageDirection=o.MessageDirection.clientToServer,t.type=new o.ProtocolNotificationType(t.method),t.registrationMethod=h.method})(S||(t.DidSaveNotebookDocumentNotification=S={}));var T;(function(t){t.method=`notebookDocument/didClose`,t.messageDirection=o.MessageDirection.clientToServer,t.type=new o.ProtocolNotificationType(t.method),t.registrationMethod=h.method})(T||(t.DidCloseNotebookDocumentNotification=T={}))})),Qt=f((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.InlineCompletionRequest=void 0;let n=K();var i;(function(t){t.method=`textDocument/inlineCompletion`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(i||(t.InlineCompletionRequest=i={}))})),$t=f((t=>{Object.defineProperty(t,"__esModule",{value:!0}),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.RelativePattern=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.InitializeErrorCodes=t.InitializeRequest=t.WorkDoneProgressOptions=t.TextDocumentRegistrationOptions=t.StaticRegistrationOptions=t.PositionEncodingKind=t.FailureHandlingKind=t.ResourceOperationKind=t.UnregistrationRequest=t.RegistrationRequest=t.DocumentSelector=t.NotebookCellTextDocumentFilter=t.NotebookDocumentFilter=t.TextDocumentFilter=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.CallHierarchyPrepareRequest=t.CallHierarchyOutgoingCallsRequest=t.CallHierarchyIncomingCallsRequest=t.WorkDoneProgressCancelNotification=t.WorkDoneProgressCreateRequest=t.WorkDoneProgress=t.SelectionRangeRequest=t.DeclarationRequest=t.FoldingRangeRefreshRequest=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.DocumentRangesFormattingRequest=t.DocumentRangeFormattingRequest=t.DocumentFormattingRequest=t.DocumentLinkResolveRequest=t.DocumentLinkRequest=t.CodeLensRefreshRequest=t.CodeLensResolveRequest=t.CodeLensRequest=t.WorkspaceSymbolResolveRequest=void 0,t.InlineCompletionRequest=t.DidCloseNotebookDocumentNotification=t.DidSaveNotebookDocumentNotification=t.DidChangeNotebookDocumentNotification=t.NotebookCellArrayChange=t.DidOpenNotebookDocumentNotification=t.NotebookDocumentSyncRegistrationType=t.NotebookDocument=t.NotebookCell=t.ExecutionSummary=t.NotebookCellKind=t.DiagnosticRefreshRequest=t.WorkspaceDiagnosticRequest=t.DocumentDiagnosticRequest=t.DocumentDiagnosticReportKind=t.DiagnosticServerCancellationData=t.InlayHintRefreshRequest=t.InlayHintResolveRequest=t.InlayHintRequest=t.InlineValueRefreshRequest=t.InlineValueRequest=t.TypeHierarchySupertypesRequest=t.TypeHierarchySubtypesRequest=t.TypeHierarchyPrepareRequest=void 0;let n=K(),i=(At(),u(ue)),o=jt(),s=Mt();Object.defineProperty(t,"ImplementationRequest",{enumerable:!0,get:function(){return s.ImplementationRequest}});let c=Nt();Object.defineProperty(t,"TypeDefinitionRequest",{enumerable:!0,get:function(){return c.TypeDefinitionRequest}});let f=Pt();Object.defineProperty(t,"WorkspaceFoldersRequest",{enumerable:!0,get:function(){return f.WorkspaceFoldersRequest}}),Object.defineProperty(t,"DidChangeWorkspaceFoldersNotification",{enumerable:!0,get:function(){return f.DidChangeWorkspaceFoldersNotification}});let p=Ft();Object.defineProperty(t,"ConfigurationRequest",{enumerable:!0,get:function(){return p.ConfigurationRequest}});let h=It();Object.defineProperty(t,"DocumentColorRequest",{enumerable:!0,get:function(){return h.DocumentColorRequest}}),Object.defineProperty(t,"ColorPresentationRequest",{enumerable:!0,get:function(){return h.ColorPresentationRequest}});let g=Lt();Object.defineProperty(t,"FoldingRangeRequest",{enumerable:!0,get:function(){return g.FoldingRangeRequest}}),Object.defineProperty(t,"FoldingRangeRefreshRequest",{enumerable:!0,get:function(){return g.FoldingRangeRefreshRequest}});let _=Rt();Object.defineProperty(t,"DeclarationRequest",{enumerable:!0,get:function(){return _.DeclarationRequest}});let x=zt();Object.defineProperty(t,"SelectionRangeRequest",{enumerable:!0,get:function(){return x.SelectionRangeRequest}});let S=Bt();Object.defineProperty(t,"WorkDoneProgress",{enumerable:!0,get:function(){return S.WorkDoneProgress}}),Object.defineProperty(t,"WorkDoneProgressCreateRequest",{enumerable:!0,get:function(){return S.WorkDoneProgressCreateRequest}}),Object.defineProperty(t,"WorkDoneProgressCancelNotification",{enumerable:!0,get:function(){return S.WorkDoneProgressCancelNotification}});let T=Vt();Object.defineProperty(t,"CallHierarchyIncomingCallsRequest",{enumerable:!0,get:function(){return T.CallHierarchyIncomingCallsRequest}}),Object.defineProperty(t,"CallHierarchyOutgoingCallsRequest",{enumerable:!0,get:function(){return T.CallHierarchyOutgoingCallsRequest}}),Object.defineProperty(t,"CallHierarchyPrepareRequest",{enumerable:!0,get:function(){return T.CallHierarchyPrepareRequest}});let E=Ht();Object.defineProperty(t,"TokenFormat",{enumerable:!0,get:function(){return E.TokenFormat}}),Object.defineProperty(t,"SemanticTokensRequest",{enumerable:!0,get:function(){return E.SemanticTokensRequest}}),Object.defineProperty(t,"SemanticTokensDeltaRequest",{enumerable:!0,get:function(){return E.SemanticTokensDeltaRequest}}),Object.defineProperty(t,"SemanticTokensRangeRequest",{enumerable:!0,get:function(){return E.SemanticTokensRangeRequest}}),Object.defineProperty(t,"SemanticTokensRefreshRequest",{enumerable:!0,get:function(){return E.SemanticTokensRefreshRequest}}),Object.defineProperty(t,"SemanticTokensRegistrationType",{enumerable:!0,get:function(){return E.SemanticTokensRegistrationType}});let D=Ut();Object.defineProperty(t,"ShowDocumentRequest",{enumerable:!0,get:function(){return D.ShowDocumentRequest}});let ee=Wt();Object.defineProperty(t,"LinkedEditingRangeRequest",{enumerable:!0,get:function(){return ee.LinkedEditingRangeRequest}});let O=Gt();Object.defineProperty(t,"FileOperationPatternKind",{enumerable:!0,get:function(){return O.FileOperationPatternKind}}),Object.defineProperty(t,"DidCreateFilesNotification",{enumerable:!0,get:function(){return O.DidCreateFilesNotification}}),Object.defineProperty(t,"WillCreateFilesRequest",{enumerable:!0,get:function(){return O.WillCreateFilesRequest}}),Object.defineProperty(t,"DidRenameFilesNotification",{enumerable:!0,get:function(){return O.DidRenameFilesNotification}}),Object.defineProperty(t,"WillRenameFilesRequest",{enumerable:!0,get:function(){return O.WillRenameFilesRequest}}),Object.defineProperty(t,"DidDeleteFilesNotification",{enumerable:!0,get:function(){return O.DidDeleteFilesNotification}}),Object.defineProperty(t,"WillDeleteFilesRequest",{enumerable:!0,get:function(){return O.WillDeleteFilesRequest}});let k=Kt();Object.defineProperty(t,"UniquenessLevel",{enumerable:!0,get:function(){return k.UniquenessLevel}}),Object.defineProperty(t,"MonikerKind",{enumerable:!0,get:function(){return k.MonikerKind}}),Object.defineProperty(t,"MonikerRequest",{enumerable:!0,get:function(){return k.MonikerRequest}});let A=qt();Object.defineProperty(t,"TypeHierarchyPrepareRequest",{enumerable:!0,get:function(){return A.TypeHierarchyPrepareRequest}}),Object.defineProperty(t,"TypeHierarchySubtypesRequest",{enumerable:!0,get:function(){return A.TypeHierarchySubtypesRequest}}),Object.defineProperty(t,"TypeHierarchySupertypesRequest",{enumerable:!0,get:function(){return A.TypeHierarchySupertypesRequest}});let te=Jt();Object.defineProperty(t,"InlineValueRequest",{enumerable:!0,get:function(){return te.InlineValueRequest}}),Object.defineProperty(t,"InlineValueRefreshRequest",{enumerable:!0,get:function(){return te.InlineValueRefreshRequest}});let j=Yt();Object.defineProperty(t,"InlayHintRequest",{enumerable:!0,get:function(){return j.InlayHintRequest}}),Object.defineProperty(t,"InlayHintResolveRequest",{enumerable:!0,get:function(){return j.InlayHintResolveRequest}}),Object.defineProperty(t,"InlayHintRefreshRequest",{enumerable:!0,get:function(){return j.InlayHintRefreshRequest}});let ne=Xt();Object.defineProperty(t,"DiagnosticServerCancellationData",{enumerable:!0,get:function(){return ne.DiagnosticServerCancellationData}}),Object.defineProperty(t,"DocumentDiagnosticReportKind",{enumerable:!0,get:function(){return ne.DocumentDiagnosticReportKind}}),Object.defineProperty(t,"DocumentDiagnosticRequest",{enumerable:!0,get:function(){return ne.DocumentDiagnosticRequest}}),Object.defineProperty(t,"WorkspaceDiagnosticRequest",{enumerable:!0,get:function(){return ne.WorkspaceDiagnosticRequest}}),Object.defineProperty(t,"DiagnosticRefreshRequest",{enumerable:!0,get:function(){return ne.DiagnosticRefreshRequest}});let M=Zt();Object.defineProperty(t,"NotebookCellKind",{enumerable:!0,get:function(){return M.NotebookCellKind}}),Object.defineProperty(t,"ExecutionSummary",{enumerable:!0,get:function(){return M.ExecutionSummary}}),Object.defineProperty(t,"NotebookCell",{enumerable:!0,get:function(){return M.NotebookCell}}),Object.defineProperty(t,"NotebookDocument",{enumerable:!0,get:function(){return M.NotebookDocument}}),Object.defineProperty(t,"NotebookDocumentSyncRegistrationType",{enumerable:!0,get:function(){return M.NotebookDocumentSyncRegistrationType}}),Object.defineProperty(t,"DidOpenNotebookDocumentNotification",{enumerable:!0,get:function(){return M.DidOpenNotebookDocumentNotification}}),Object.defineProperty(t,"NotebookCellArrayChange",{enumerable:!0,get:function(){return M.NotebookCellArrayChange}}),Object.defineProperty(t,"DidChangeNotebookDocumentNotification",{enumerable:!0,get:function(){return M.DidChangeNotebookDocumentNotification}}),Object.defineProperty(t,"DidSaveNotebookDocumentNotification",{enumerable:!0,get:function(){return M.DidSaveNotebookDocumentNotification}}),Object.defineProperty(t,"DidCloseNotebookDocumentNotification",{enumerable:!0,get:function(){return M.DidCloseNotebookDocumentNotification}});let re=Qt();Object.defineProperty(t,"InlineCompletionRequest",{enumerable:!0,get:function(){return re.InlineCompletionRequest}});var N;(function(t){function is(t){let n=t;return o.string(n)||o.string(n.language)||o.string(n.scheme)||o.string(n.pattern)}t.is=is})(N||(t.TextDocumentFilter=N={}));var P;(function(t){function is(t){let n=t;return o.objectLiteral(n)&&(o.string(n.notebookType)||o.string(n.scheme)||o.string(n.pattern))}t.is=is})(P||(t.NotebookDocumentFilter=P={}));var F;(function(t){function is(t){let n=t;return o.objectLiteral(n)&&(o.string(n.notebook)||P.is(n.notebook))&&(n.language===void 0||o.string(n.language))}t.is=is})(F||(t.NotebookCellTextDocumentFilter=F={}));var ie;(function(t){function is(t){if(!Array.isArray(t))return!1;for(let n of t)if(!o.string(n)&&!N.is(n)&&!F.is(n))return!1;return!0}t.is=is})(ie||(t.DocumentSelector=ie={}));var ae;(function(t){t.method=`client/registerCapability`,t.messageDirection=n.MessageDirection.serverToClient,t.type=new n.ProtocolRequestType(t.method)})(ae||(t.RegistrationRequest=ae={}));var oe;(function(t){t.method=`client/unregisterCapability`,t.messageDirection=n.MessageDirection.serverToClient,t.type=new n.ProtocolRequestType(t.method)})(oe||(t.UnregistrationRequest=oe={}));var I;(function(t){t.Create=`create`,t.Rename=`rename`,t.Delete=`delete`})(I||(t.ResourceOperationKind=I={}));var se;(function(t){t.Abort=`abort`,t.Transactional=`transactional`,t.TextOnlyTransactional=`textOnlyTransactional`,t.Undo=`undo`})(se||(t.FailureHandlingKind=se={}));var ce;(function(t){t.UTF8=`utf-8`,t.UTF16=`utf-16`,t.UTF32=`utf-32`})(ce||(t.PositionEncodingKind=ce={}));var L;(function(t){function hasId(t){let n=t;return n&&o.string(n.id)&&n.id.length>0}t.hasId=hasId})(L||(t.StaticRegistrationOptions=L={}));var le;(function(t){function is(t){let n=t;return n&&(n.documentSelector===null||ie.is(n.documentSelector))}t.is=is})(le||(t.TextDocumentRegistrationOptions=le={}));var R;(function(t){function is(t){let n=t;return o.objectLiteral(n)&&(n.workDoneProgress===void 0||o.boolean(n.workDoneProgress))}t.is=is;function hasWorkDoneProgress(t){let n=t;return n&&o.boolean(n.workDoneProgress)}t.hasWorkDoneProgress=hasWorkDoneProgress})(R||(t.WorkDoneProgressOptions=R={}));var z;(function(t){t.method=`initialize`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(z||(t.InitializeRequest=z={}));var de;(function(t){t.unknownProtocolVersion=1})(de||(t.InitializeErrorCodes=de={}));var B;(function(t){t.method=`initialized`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolNotificationType(t.method)})(B||(t.InitializedNotification=B={}));var V;(function(t){t.method=`shutdown`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType0(t.method)})(V||(t.ShutdownRequest=V={}));var H;(function(t){t.method=`exit`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolNotificationType0(t.method)})(H||(t.ExitNotification=H={}));var fe;(function(t){t.method=`workspace/didChangeConfiguration`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolNotificationType(t.method)})(fe||(t.DidChangeConfigurationNotification=fe={}));var pe;(function(t){t.Error=1,t.Warning=2,t.Info=3,t.Log=4,t.Debug=5})(pe||(t.MessageType=pe={}));var me;(function(t){t.method=`window/showMessage`,t.messageDirection=n.MessageDirection.serverToClient,t.type=new n.ProtocolNotificationType(t.method)})(me||(t.ShowMessageNotification=me={}));var he;(function(t){t.method=`window/showMessageRequest`,t.messageDirection=n.MessageDirection.serverToClient,t.type=new n.ProtocolRequestType(t.method)})(he||(t.ShowMessageRequest=he={}));var ge;(function(t){t.method=`window/logMessage`,t.messageDirection=n.MessageDirection.serverToClient,t.type=new n.ProtocolNotificationType(t.method)})(ge||(t.LogMessageNotification=ge={}));var _e;(function(t){t.method=`telemetry/event`,t.messageDirection=n.MessageDirection.serverToClient,t.type=new n.ProtocolNotificationType(t.method)})(_e||(t.TelemetryEventNotification=_e={}));var ve;(function(t){t.None=0,t.Full=1,t.Incremental=2})(ve||(t.TextDocumentSyncKind=ve={}));var ye;(function(t){t.method=`textDocument/didOpen`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolNotificationType(t.method)})(ye||(t.DidOpenTextDocumentNotification=ye={}));var be;(function(t){function isIncremental(t){let n=t;return n!=null&&typeof n.text==`string`&&n.range!==void 0&&(n.rangeLength===void 0||typeof n.rangeLength==`number`)}t.isIncremental=isIncremental;function isFull(t){let n=t;return n!=null&&typeof n.text==`string`&&n.range===void 0&&n.rangeLength===void 0}t.isFull=isFull})(be||(t.TextDocumentContentChangeEvent=be={}));var xe;(function(t){t.method=`textDocument/didChange`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolNotificationType(t.method)})(xe||(t.DidChangeTextDocumentNotification=xe={}));var Se;(function(t){t.method=`textDocument/didClose`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolNotificationType(t.method)})(Se||(t.DidCloseTextDocumentNotification=Se={}));var Ce;(function(t){t.method=`textDocument/didSave`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolNotificationType(t.method)})(Ce||(t.DidSaveTextDocumentNotification=Ce={}));var we;(function(t){t.Manual=1,t.AfterDelay=2,t.FocusOut=3})(we||(t.TextDocumentSaveReason=we={}));var U;(function(t){t.method=`textDocument/willSave`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolNotificationType(t.method)})(U||(t.WillSaveTextDocumentNotification=U={}));var Te;(function(t){t.method=`textDocument/willSaveWaitUntil`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(Te||(t.WillSaveTextDocumentWaitUntilRequest=Te={}));var W;(function(t){t.method=`workspace/didChangeWatchedFiles`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolNotificationType(t.method)})(W||(t.DidChangeWatchedFilesNotification=W={}));var Ee;(function(t){t.Created=1,t.Changed=2,t.Deleted=3})(Ee||(t.FileChangeType=Ee={}));var De;(function(t){function is(t){let n=t;return o.objectLiteral(n)&&(i.URI.is(n.baseUri)||i.WorkspaceFolder.is(n.baseUri))&&o.string(n.pattern)}t.is=is})(De||(t.RelativePattern=De={}));var Oe;(function(t){t.Create=1,t.Change=2,t.Delete=4})(Oe||(t.WatchKind=Oe={}));var ke;(function(t){t.method=`textDocument/publishDiagnostics`,t.messageDirection=n.MessageDirection.serverToClient,t.type=new n.ProtocolNotificationType(t.method)})(ke||(t.PublishDiagnosticsNotification=ke={}));var Ae;(function(t){t.Invoked=1,t.TriggerCharacter=2,t.TriggerForIncompleteCompletions=3})(Ae||(t.CompletionTriggerKind=Ae={}));var je;(function(t){t.method=`textDocument/completion`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(je||(t.CompletionRequest=je={}));var Me;(function(t){t.method=`completionItem/resolve`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(Me||(t.CompletionResolveRequest=Me={}));var Ne;(function(t){t.method=`textDocument/hover`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(Ne||(t.HoverRequest=Ne={}));var Pe;(function(t){t.Invoked=1,t.TriggerCharacter=2,t.ContentChange=3})(Pe||(t.SignatureHelpTriggerKind=Pe={}));var Fe;(function(t){t.method=`textDocument/signatureHelp`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(Fe||(t.SignatureHelpRequest=Fe={}));var Ie;(function(t){t.method=`textDocument/definition`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(Ie||(t.DefinitionRequest=Ie={}));var Le;(function(t){t.method=`textDocument/references`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(Le||(t.ReferencesRequest=Le={}));var Re;(function(t){t.method=`textDocument/documentHighlight`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(Re||(t.DocumentHighlightRequest=Re={}));var ze;(function(t){t.method=`textDocument/documentSymbol`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(ze||(t.DocumentSymbolRequest=ze={}));var Be;(function(t){t.method=`textDocument/codeAction`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(Be||(t.CodeActionRequest=Be={}));var Ve;(function(t){t.method=`codeAction/resolve`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(Ve||(t.CodeActionResolveRequest=Ve={}));var He;(function(t){t.method=`workspace/symbol`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(He||(t.WorkspaceSymbolRequest=He={}));var Ue;(function(t){t.method=`workspaceSymbol/resolve`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(Ue||(t.WorkspaceSymbolResolveRequest=Ue={}));var We;(function(t){t.method=`textDocument/codeLens`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(We||(t.CodeLensRequest=We={}));var Ge;(function(t){t.method=`codeLens/resolve`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(Ge||(t.CodeLensResolveRequest=Ge={}));var Ke;(function(t){t.method=`workspace/codeLens/refresh`,t.messageDirection=n.MessageDirection.serverToClient,t.type=new n.ProtocolRequestType0(t.method)})(Ke||(t.CodeLensRefreshRequest=Ke={}));var qe;(function(t){t.method=`textDocument/documentLink`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(qe||(t.DocumentLinkRequest=qe={}));var Je;(function(t){t.method=`documentLink/resolve`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(Je||(t.DocumentLinkResolveRequest=Je={}));var Ye;(function(t){t.method=`textDocument/formatting`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(Ye||(t.DocumentFormattingRequest=Ye={}));var Xe;(function(t){t.method=`textDocument/rangeFormatting`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(Xe||(t.DocumentRangeFormattingRequest=Xe={}));var Ze;(function(t){t.method=`textDocument/rangesFormatting`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(Ze||(t.DocumentRangesFormattingRequest=Ze={}));var Qe;(function(t){t.method=`textDocument/onTypeFormatting`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(Qe||(t.DocumentOnTypeFormattingRequest=Qe={}));var $e;(function(t){t.Identifier=1})($e||(t.PrepareSupportDefaultBehavior=$e={}));var et;(function(t){t.method=`textDocument/rename`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(et||(t.RenameRequest=et={}));var tt;(function(t){t.method=`textDocument/prepareRename`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(tt||(t.PrepareRenameRequest=tt={}));var nt;(function(t){t.method=`workspace/executeCommand`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(nt||(t.ExecuteCommandRequest=nt={}));var rt;(function(t){t.method=`workspace/applyEdit`,t.messageDirection=n.MessageDirection.serverToClient,t.type=new n.ProtocolRequestType(`workspace/applyEdit`)})(rt||(t.ApplyWorkspaceEditRequest=rt={}))})),en=f((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.createProtocolConnection=void 0;let n=L();function createProtocolConnection(t,i,o,s){return n.ConnectionStrategy.is(s)&&(s={connectionStrategy:s}),(0,n.createMessageConnection)(t,i,o,s)}t.createProtocolConnection=createProtocolConnection})),tn=f((t=>{var n=t&&t.__createBinding||(Object.create?(function(t,n,i,o){o===void 0&&(o=i);var s=Object.getOwnPropertyDescriptor(n,i);(!s||(`get`in s?!n.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return n[i]}}),Object.defineProperty(t,o,s)}):(function(t,n,i,o){o===void 0&&(o=i),t[o]=n[i]})),i=t&&t.__exportStar||function(t,i){for(var o in t)o!==`default`&&!Object.prototype.hasOwnProperty.call(i,o)&&n(i,t,o)};Object.defineProperty(t,"__esModule",{value:!0}),t.LSPErrorCodes=t.createProtocolConnection=void 0,i(L(),t),i((At(),u(ue)),t),i(K(),t),i($t(),t);var o=en();Object.defineProperty(t,"createProtocolConnection",{enumerable:!0,get:function(){return o.createProtocolConnection}});var s;(function(t){t.lspReservedErrorRangeStart=-32899,t.RequestFailed=-32803,t.ServerCancelled=-32802,t.ContentModified=-32801,t.RequestCancelled=-32800,t.lspReservedErrorRangeEnd=-32800})(s||(t.LSPErrorCodes=s={}))})),q=f((t=>{var n=t&&t.__createBinding||(Object.create?(function(t,n,i,o){o===void 0&&(o=i);var s=Object.getOwnPropertyDescriptor(n,i);(!s||(`get`in s?!n.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return n[i]}}),Object.defineProperty(t,o,s)}):(function(t,n,i,o){o===void 0&&(o=i),t[o]=n[i]})),i=t&&t.__exportStar||function(t,i){for(var o in t)o!==`default`&&!Object.prototype.hasOwnProperty.call(i,o)&&n(i,t,o)};Object.defineProperty(t,"__esModule",{value:!0}),t.createProtocolConnection=void 0;let o=le();i(le(),t),i(tn(),t);function createProtocolConnection(t,n,i,s){return(0,o.createMessageConnection)(t,n,i,s)}t.createProtocolConnection=createProtocolConnection})),nn=f((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.generateUuid=t.parse=t.isUUID=t.v4=t.empty=void 0;var ValueUUID=class{constructor(t){this._value=t}asHex(){return this._value}equals(t){return this.asHex()===t.asHex()}},n=class V4UUID extends ValueUUID{static _oneOf(t){return t[Math.floor(t.length*Math.random())]}static _randomHex(){return V4UUID._oneOf(V4UUID._chars)}constructor(){super([V4UUID._randomHex(),V4UUID._randomHex(),V4UUID._randomHex(),V4UUID._randomHex(),V4UUID._randomHex(),V4UUID._randomHex(),V4UUID._randomHex(),V4UUID._randomHex(),`-`,V4UUID._randomHex(),V4UUID._randomHex(),V4UUID._randomHex(),V4UUID._randomHex(),`-`,`4`,V4UUID._randomHex(),V4UUID._randomHex(),V4UUID._randomHex(),`-`,V4UUID._oneOf(V4UUID._timeHighBits),V4UUID._randomHex(),V4UUID._randomHex(),V4UUID._randomHex(),`-`,V4UUID._randomHex(),V4UUID._randomHex(),V4UUID._randomHex(),V4UUID._randomHex(),V4UUID._randomHex(),V4UUID._randomHex(),V4UUID._randomHex(),V4UUID._randomHex(),V4UUID._randomHex(),V4UUID._randomHex(),V4UUID._randomHex(),V4UUID._randomHex()].join(``))}};n._chars=[`0`,`1`,`2`,`3`,`4`,`5`,`6`,`6`,`7`,`8`,`9`,`a`,`b`,`c`,`d`,`e`,`f`],n._timeHighBits=[`8`,`9`,`a`,`b`],t.empty=new ValueUUID(`00000000-0000-0000-0000-000000000000`);function v4(){return new n}t.v4=v4;let i=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function isUUID(t){return i.test(t)}t.isUUID=isUUID;function parse(t){if(!isUUID(t))throw Error(`invalid uuid`);return new ValueUUID(t)}t.parse=parse;function generateUuid(){return v4().asHex()}t.generateUuid=generateUuid})),rn=f((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.attachPartialResult=t.ProgressFeature=t.attachWorkDone=void 0;let n=q(),i=nn();var o=class WorkDoneProgressReporterImpl{constructor(t,n){this._connection=t,this._token=n,WorkDoneProgressReporterImpl.Instances.set(this._token,this)}begin(t,i,o,s){let c={kind:`begin`,title:t,percentage:i,message:o,cancellable:s};this._connection.sendProgress(n.WorkDoneProgress.type,this._token,c)}report(t,i){let o={kind:`report`};typeof t==`number`?(o.percentage=t,i!==void 0&&(o.message=i)):o.message=t,this._connection.sendProgress(n.WorkDoneProgress.type,this._token,o)}done(){WorkDoneProgressReporterImpl.Instances.delete(this._token),this._connection.sendProgress(n.WorkDoneProgress.type,this._token,{kind:`end`})}};o.Instances=new Map;var WorkDoneProgressServerReporterImpl=class extends o{constructor(t,i){super(t,i),this._source=new n.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose(),super.done()}cancel(){this._source.cancel()}},NullProgressReporter=class{constructor(){}begin(){}report(){}done(){}},NullProgressServerReporter=class extends NullProgressReporter{constructor(){super(),this._source=new n.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose()}cancel(){this._source.cancel()}};function attachWorkDone(t,n){if(n===void 0||n.workDoneToken===void 0)return new NullProgressReporter;let i=n.workDoneToken;return delete n.workDoneToken,new o(t,i)}t.attachWorkDone=attachWorkDone;let ProgressFeature=t=>class extends t{constructor(){super(),this._progressSupported=!1}initialize(t){super.initialize(t),t?.window?.workDoneProgress===!0&&(this._progressSupported=!0,this.connection.onNotification(n.WorkDoneProgressCancelNotification.type,t=>{let n=o.Instances.get(t.token);(n instanceof WorkDoneProgressServerReporterImpl||n instanceof NullProgressServerReporter)&&n.cancel()}))}attachWorkDoneProgress(t){return t===void 0?new NullProgressReporter:new o(this.connection,t)}createWorkDoneProgress(){if(this._progressSupported){let t=(0,i.generateUuid)();return this.connection.sendRequest(n.WorkDoneProgressCreateRequest.type,{token:t}).then(()=>new WorkDoneProgressServerReporterImpl(this.connection,t))}else return Promise.resolve(new NullProgressServerReporter)}};t.ProgressFeature=ProgressFeature;var s;(function(t){t.type=new n.ProgressType})(s||={});var ResultProgressReporterImpl=class{constructor(t,n){this._connection=t,this._token=n}report(t){this._connection.sendProgress(s.type,this._token,t)}};function attachPartialResult(t,n){if(n===void 0||n.partialResultToken===void 0)return;let i=n.partialResultToken;return delete n.partialResultToken,new ResultProgressReporterImpl(t,i)}t.attachPartialResult=attachPartialResult})),an=f((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigurationFeature=void 0;let n=q(),i=k(),ConfigurationFeature=t=>class extends t{getConfiguration(t){return t?i.string(t)?this._getConfiguration({section:t}):this._getConfiguration(t):this._getConfiguration({})}_getConfiguration(t){let i={items:Array.isArray(t)?t:[t]};return this.connection.sendRequest(n.ConfigurationRequest.type,i).then(n=>Array.isArray(n)?Array.isArray(t)?n:n[0]:Array.isArray(t)?[]:null)}};t.ConfigurationFeature=ConfigurationFeature})),on=f((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceFoldersFeature=void 0;let n=q(),WorkspaceFoldersFeature=t=>class extends t{constructor(){super(),this._notificationIsAutoRegistered=!1}initialize(t){super.initialize(t);let i=t.workspace;i&&i.workspaceFolders&&(this._onDidChangeWorkspaceFolders=new n.Emitter,this.connection.onNotification(n.DidChangeWorkspaceFoldersNotification.type,t=>{this._onDidChangeWorkspaceFolders.fire(t.event)}))}fillServerCapabilities(t){super.fillServerCapabilities(t);let n=t.workspace?.workspaceFolders?.changeNotifications;this._notificationIsAutoRegistered=n===!0||typeof n==`string`}getWorkspaceFolders(){return this.connection.sendRequest(n.WorkspaceFoldersRequest.type)}get onDidChangeWorkspaceFolders(){if(!this._onDidChangeWorkspaceFolders)throw Error(`Client doesn't support sending workspace folder change events.`);return!this._notificationIsAutoRegistered&&!this._unregistration&&(this._unregistration=this.connection.client.register(n.DidChangeWorkspaceFoldersNotification.type)),this._onDidChangeWorkspaceFolders.event}};t.WorkspaceFoldersFeature=WorkspaceFoldersFeature})),sn=f((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CallHierarchyFeature=void 0;let n=q(),CallHierarchyFeature=t=>class extends t{get callHierarchy(){return{onPrepare:t=>this.connection.onRequest(n.CallHierarchyPrepareRequest.type,(n,i)=>t(n,i,this.attachWorkDoneProgress(n),void 0)),onIncomingCalls:t=>{let i=n.CallHierarchyIncomingCallsRequest.type;return this.connection.onRequest(i,(n,o)=>t(n,o,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(i,n)))},onOutgoingCalls:t=>{let i=n.CallHierarchyOutgoingCallsRequest.type;return this.connection.onRequest(i,(n,o)=>t(n,o,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(i,n)))}}}};t.CallHierarchyFeature=CallHierarchyFeature})),cn=f((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SemanticTokensBuilder=t.SemanticTokensDiff=t.SemanticTokensFeature=void 0;let n=q(),SemanticTokensFeature=t=>class extends t{get semanticTokens(){return{refresh:()=>this.connection.sendRequest(n.SemanticTokensRefreshRequest.type),on:t=>{let i=n.SemanticTokensRequest.type;return this.connection.onRequest(i,(n,o)=>t(n,o,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(i,n)))},onDelta:t=>{let i=n.SemanticTokensDeltaRequest.type;return this.connection.onRequest(i,(n,o)=>t(n,o,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(i,n)))},onRange:t=>{let i=n.SemanticTokensRangeRequest.type;return this.connection.onRequest(i,(n,o)=>t(n,o,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(i,n)))}}}};t.SemanticTokensFeature=SemanticTokensFeature;var SemanticTokensDiff=class{constructor(t,n){this.originalSequence=t,this.modifiedSequence=n}computeDiff(){let t=this.originalSequence.length,n=this.modifiedSequence.length,i=0;for(;i<n&&i<t&&this.originalSequence[i]===this.modifiedSequence[i];)i++;if(i<n&&i<t){let o=t-1,s=n-1;for(;o>=i&&s>=i&&this.originalSequence[o]===this.modifiedSequence[s];)o--,s--;(o<i||s<i)&&(o++,s++);let c=o-i+1,u=this.modifiedSequence.slice(i,s+1);return u.length===1&&u[0]===this.originalSequence[o]?[{start:i,deleteCount:c-1}]:[{start:i,deleteCount:c,data:u}]}else if(i<n)return[{start:i,deleteCount:0,data:this.modifiedSequence.slice(i)}];else if(i<t)return[{start:i,deleteCount:t-i}];else return[]}};t.SemanticTokensDiff=SemanticTokensDiff;var 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(t,n,i,o,s){let c=t,u=n;this._dataLen>0&&(c-=this._prevLine,c===0&&(u-=this._prevChar)),this._data[this._dataLen++]=c,this._data[this._dataLen++]=u,this._data[this._dataLen++]=i,this._data[this._dataLen++]=o,this._data[this._dataLen++]=s,this._prevLine=t,this._prevChar=n}get id(){return this._id.toString()}previousResult(t){this.id===t&&(this._prevData=this._data),this.initialize()}build(){return this._prevData=void 0,{resultId:this.id,data:this._data}}canBuildEdits(){return this._prevData!==void 0}buildEdits(){return this._prevData===void 0?this.build():{resultId:this.id,edits:new SemanticTokensDiff(this._prevData,this._data).computeDiff()}}};t.SemanticTokensBuilder=SemanticTokensBuilder})),ln=f((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ShowDocumentFeature=void 0;let n=q(),ShowDocumentFeature=t=>class extends t{showDocument(t){return this.connection.sendRequest(n.ShowDocumentRequest.type,t)}};t.ShowDocumentFeature=ShowDocumentFeature})),un=f((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FileOperationsFeature=void 0;let n=q(),FileOperationsFeature=t=>class extends t{onDidCreateFiles(t){return this.connection.onNotification(n.DidCreateFilesNotification.type,n=>{t(n)})}onDidRenameFiles(t){return this.connection.onNotification(n.DidRenameFilesNotification.type,n=>{t(n)})}onDidDeleteFiles(t){return this.connection.onNotification(n.DidDeleteFilesNotification.type,n=>{t(n)})}onWillCreateFiles(t){return this.connection.onRequest(n.WillCreateFilesRequest.type,(n,i)=>t(n,i))}onWillRenameFiles(t){return this.connection.onRequest(n.WillRenameFilesRequest.type,(n,i)=>t(n,i))}onWillDeleteFiles(t){return this.connection.onRequest(n.WillDeleteFilesRequest.type,(n,i)=>t(n,i))}};t.FileOperationsFeature=FileOperationsFeature})),dn=f((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LinkedEditingRangeFeature=void 0;let n=q(),LinkedEditingRangeFeature=t=>class extends t{onLinkedEditingRange(t){return this.connection.onRequest(n.LinkedEditingRangeRequest.type,(n,i)=>t(n,i,this.attachWorkDoneProgress(n),void 0))}};t.LinkedEditingRangeFeature=LinkedEditingRangeFeature})),fn=f((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TypeHierarchyFeature=void 0;let n=q(),TypeHierarchyFeature=t=>class extends t{get typeHierarchy(){return{onPrepare:t=>this.connection.onRequest(n.TypeHierarchyPrepareRequest.type,(n,i)=>t(n,i,this.attachWorkDoneProgress(n),void 0)),onSupertypes:t=>{let i=n.TypeHierarchySupertypesRequest.type;return this.connection.onRequest(i,(n,o)=>t(n,o,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(i,n)))},onSubtypes:t=>{let i=n.TypeHierarchySubtypesRequest.type;return this.connection.onRequest(i,(n,o)=>t(n,o,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(i,n)))}}}};t.TypeHierarchyFeature=TypeHierarchyFeature})),pn=f((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.InlineValueFeature=void 0;let n=q(),InlineValueFeature=t=>class extends t{get inlineValue(){return{refresh:()=>this.connection.sendRequest(n.InlineValueRefreshRequest.type),on:t=>this.connection.onRequest(n.InlineValueRequest.type,(n,i)=>t(n,i,this.attachWorkDoneProgress(n)))}}};t.InlineValueFeature=InlineValueFeature})),mn=f((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FoldingRangeFeature=void 0;let n=q(),FoldingRangeFeature=t=>class extends t{get foldingRange(){return{refresh:()=>this.connection.sendRequest(n.FoldingRangeRefreshRequest.type),on:t=>{let i=n.FoldingRangeRequest.type;return this.connection.onRequest(i,(n,o)=>t(n,o,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(i,n)))}}}};t.FoldingRangeFeature=FoldingRangeFeature})),hn=f((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.InlayHintFeature=void 0;let n=q(),InlayHintFeature=t=>class extends t{get inlayHint(){return{refresh:()=>this.connection.sendRequest(n.InlayHintRefreshRequest.type),on:t=>this.connection.onRequest(n.InlayHintRequest.type,(n,i)=>t(n,i,this.attachWorkDoneProgress(n))),resolve:t=>this.connection.onRequest(n.InlayHintResolveRequest.type,(n,i)=>t(n,i))}}};t.InlayHintFeature=InlayHintFeature})),gn=f((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DiagnosticFeature=void 0;let n=q(),DiagnosticFeature=t=>class extends t{get diagnostics(){return{refresh:()=>this.connection.sendRequest(n.DiagnosticRefreshRequest.type),on:t=>this.connection.onRequest(n.DocumentDiagnosticRequest.type,(i,o)=>t(i,o,this.attachWorkDoneProgress(i),this.attachPartialResultProgress(n.DocumentDiagnosticRequest.partialResult,i))),onWorkspace:t=>this.connection.onRequest(n.WorkspaceDiagnosticRequest.type,(i,o)=>t(i,o,this.attachWorkDoneProgress(i),this.attachPartialResultProgress(n.WorkspaceDiagnosticRequest.partialResult,i)))}}};t.DiagnosticFeature=DiagnosticFeature})),_n=f((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TextDocuments=void 0;let n=q();var TextDocuments=class{constructor(t){this._configuration=t,this._syncedDocuments=new Map,this._onDidChangeContent=new n.Emitter,this._onDidOpen=new n.Emitter,this._onDidClose=new n.Emitter,this._onDidSave=new n.Emitter,this._onWillSave=new n.Emitter}get onDidOpen(){return this._onDidOpen.event}get onDidChangeContent(){return this._onDidChangeContent.event}get onWillSave(){return this._onWillSave.event}onWillSaveWaitUntil(t){this._willSaveWaitUntil=t}get onDidSave(){return this._onDidSave.event}get onDidClose(){return this._onDidClose.event}get(t){return this._syncedDocuments.get(t)}all(){return Array.from(this._syncedDocuments.values())}keys(){return Array.from(this._syncedDocuments.keys())}listen(t){t.__textDocumentSync=n.TextDocumentSyncKind.Incremental;let i=[];return i.push(t.onDidOpenTextDocument(t=>{let n=t.textDocument,i=this._configuration.create(n.uri,n.languageId,n.version,n.text);this._syncedDocuments.set(n.uri,i);let o=Object.freeze({document:i});this._onDidOpen.fire(o),this._onDidChangeContent.fire(o)})),i.push(t.onDidChangeTextDocument(t=>{let n=t.textDocument,i=t.contentChanges;if(i.length===0)return;let{version:o}=n;if(o==null)throw Error(`Received document change event for ${n.uri} without valid version identifier`);let s=this._syncedDocuments.get(n.uri);s!==void 0&&(s=this._configuration.update(s,i,o),this._syncedDocuments.set(n.uri,s),this._onDidChangeContent.fire(Object.freeze({document:s})))})),i.push(t.onDidCloseTextDocument(t=>{let n=this._syncedDocuments.get(t.textDocument.uri);n!==void 0&&(this._syncedDocuments.delete(t.textDocument.uri),this._onDidClose.fire(Object.freeze({document:n})))})),i.push(t.onWillSaveTextDocument(t=>{let n=this._syncedDocuments.get(t.textDocument.uri);n!==void 0&&this._onWillSave.fire(Object.freeze({document:n,reason:t.reason}))})),i.push(t.onWillSaveTextDocumentWaitUntil((t,n)=>{let i=this._syncedDocuments.get(t.textDocument.uri);return i!==void 0&&this._willSaveWaitUntil?this._willSaveWaitUntil(Object.freeze({document:i,reason:t.reason}),n):[]})),i.push(t.onDidSaveTextDocument(t=>{let n=this._syncedDocuments.get(t.textDocument.uri);n!==void 0&&this._onDidSave.fire(Object.freeze({document:n}))})),n.Disposable.create(()=>{i.forEach(t=>t.dispose())})}};t.TextDocuments=TextDocuments})),vn=f((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NotebookDocuments=t.NotebookSyncFeature=void 0;let n=q(),i=_n(),NotebookSyncFeature=t=>class extends t{get synchronization(){return{onDidOpenNotebookDocument:t=>this.connection.onNotification(n.DidOpenNotebookDocumentNotification.type,n=>{t(n)}),onDidChangeNotebookDocument:t=>this.connection.onNotification(n.DidChangeNotebookDocumentNotification.type,n=>{t(n)}),onDidSaveNotebookDocument:t=>this.connection.onNotification(n.DidSaveNotebookDocumentNotification.type,n=>{t(n)}),onDidCloseNotebookDocument:t=>this.connection.onNotification(n.DidCloseNotebookDocumentNotification.type,n=>{t(n)})}}};t.NotebookSyncFeature=NotebookSyncFeature;var o=class CellTextDocumentConnection{onDidOpenTextDocument(t){return this.openHandler=t,n.Disposable.create(()=>{this.openHandler=void 0})}openTextDocument(t){this.openHandler&&this.openHandler(t)}onDidChangeTextDocument(t){return this.changeHandler=t,n.Disposable.create(()=>{this.changeHandler=t})}changeTextDocument(t){this.changeHandler&&this.changeHandler(t)}onDidCloseTextDocument(t){return this.closeHandler=t,n.Disposable.create(()=>{this.closeHandler=void 0})}closeTextDocument(t){this.closeHandler&&this.closeHandler(t)}onWillSaveTextDocument(){return CellTextDocumentConnection.NULL_DISPOSE}onWillSaveTextDocumentWaitUntil(){return CellTextDocumentConnection.NULL_DISPOSE}onDidSaveTextDocument(){return CellTextDocumentConnection.NULL_DISPOSE}};o.NULL_DISPOSE=Object.freeze({dispose:()=>{}});var NotebookDocuments=class{constructor(t){t instanceof i.TextDocuments?this._cellTextDocuments=t:this._cellTextDocuments=new i.TextDocuments(t),this.notebookDocuments=new Map,this.notebookCellMap=new Map,this._onDidOpen=new n.Emitter,this._onDidChange=new n.Emitter,this._onDidSave=new n.Emitter,this._onDidClose=new n.Emitter}get cellTextDocuments(){return this._cellTextDocuments}getCellTextDocument(t){return this._cellTextDocuments.get(t.document)}getNotebookDocument(t){return this.notebookDocuments.get(t)}getNotebookCell(t){let n=this.notebookCellMap.get(t);return n&&n[0]}findNotebookDocumentForCell(t){let n=typeof t==`string`?t:t.document,i=this.notebookCellMap.get(n);return i&&i[1]}get onDidOpen(){return this._onDidOpen.event}get onDidSave(){return this._onDidSave.event}get onDidChange(){return this._onDidChange.event}get onDidClose(){return this._onDidClose.event}listen(t){let i=new o,s=[];return s.push(this.cellTextDocuments.listen(i)),s.push(t.notebooks.synchronization.onDidOpenNotebookDocument(t=>{this.notebookDocuments.set(t.notebookDocument.uri,t.notebookDocument);for(let n of t.cellTextDocuments)i.openTextDocument({textDocument:n});this.updateCellMap(t.notebookDocument),this._onDidOpen.fire(t.notebookDocument)})),s.push(t.notebooks.synchronization.onDidChangeNotebookDocument(t=>{let n=this.notebookDocuments.get(t.notebookDocument.uri);if(n===void 0)return;n.version=t.notebookDocument.version;let o=n.metadata,s=!1,c=t.change;c.metadata!==void 0&&(s=!0,n.metadata=c.metadata);let u=[],f=[],p=[],h=[];if(c.cells!==void 0){let t=c.cells;if(t.structure!==void 0){let o=t.structure.array;if(n.cells.splice(o.start,o.deleteCount,...o.cells===void 0?[]:o.cells),t.structure.didOpen!==void 0)for(let n of t.structure.didOpen)i.openTextDocument({textDocument:n}),u.push(n.uri);if(t.structure.didClose)for(let n of t.structure.didClose)i.closeTextDocument({textDocument:n}),f.push(n.uri)}if(t.data!==void 0){let i=new Map(t.data.map(t=>[t.document,t]));for(let t=0;t<=n.cells.length;t++){let o=i.get(n.cells[t].document);if(o!==void 0){let s=n.cells.splice(t,1,o);if(p.push({old:s[0],new:o}),i.delete(o.document),i.size===0)break}}}if(t.textContent!==void 0)for(let n of t.textContent)i.changeTextDocument({textDocument:n.document,contentChanges:n.changes}),h.push(n.document.uri)}this.updateCellMap(n);let g={notebookDocument:n};s&&(g.metadata={old:o,new:n.metadata});let _=[];for(let t of u)_.push(this.getNotebookCell(t));let x=[];for(let t of f)x.push(this.getNotebookCell(t));let S=[];for(let t of h)S.push(this.getNotebookCell(t));(_.length>0||x.length>0||p.length>0||S.length>0)&&(g.cells={added:_,removed:x,changed:{data:p,textContent:S}}),(g.metadata!==void 0||g.cells!==void 0)&&this._onDidChange.fire(g)})),s.push(t.notebooks.synchronization.onDidSaveNotebookDocument(t=>{let n=this.notebookDocuments.get(t.notebookDocument.uri);n!==void 0&&this._onDidSave.fire(n)})),s.push(t.notebooks.synchronization.onDidCloseNotebookDocument(t=>{let n=this.notebookDocuments.get(t.notebookDocument.uri);if(n!==void 0){this._onDidClose.fire(n);for(let n of t.cellTextDocuments)i.closeTextDocument({textDocument:n});this.notebookDocuments.delete(t.notebookDocument.uri);for(let t of n.cells)this.notebookCellMap.delete(t.document)}})),n.Disposable.create(()=>{s.forEach(t=>t.dispose())})}updateCellMap(t){for(let n of t.cells)this.notebookCellMap.set(n.document,[n,t])}};t.NotebookDocuments=NotebookDocuments})),yn=f((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MonikerFeature=void 0;let n=q(),MonikerFeature=t=>class extends t{get moniker(){return{on:t=>{let i=n.MonikerRequest.type;return this.connection.onRequest(i,(n,o)=>t(n,o,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(i,n)))}}}};t.MonikerFeature=MonikerFeature})),bn=f((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.createConnection=t.combineFeatures=t.combineNotebooksFeatures=t.combineLanguagesFeatures=t.combineWorkspaceFeatures=t.combineWindowFeatures=t.combineClientFeatures=t.combineTracerFeatures=t.combineTelemetryFeatures=t.combineConsoleFeatures=t._NotebooksImpl=t._LanguagesImpl=t.BulkUnregistration=t.BulkRegistration=t.ErrorMessageTracker=void 0;let n=q(),i=k(),o=nn(),s=rn(),c=an(),u=on(),f=sn(),p=cn(),h=ln(),g=un(),_=dn(),x=fn(),S=pn(),T=mn(),E=hn(),D=gn(),ee=vn(),O=yn();function null2Undefined(t){if(t!==null)return t}var ErrorMessageTracker=class{constructor(){this._messages=Object.create(null)}add(t){let n=this._messages[t];n||=0,n++,this._messages[t]=n}sendErrors(t){Object.keys(this._messages).forEach(n=>{t.window.showErrorMessage(n)})}};t.ErrorMessageTracker=ErrorMessageTracker;var RemoteConsoleImpl=class{constructor(){}rawAttach(t){this._rawConnection=t}attach(t){this._connection=t}get connection(){if(!this._connection)throw Error(`Remote is not attached to a connection yet.`);return this._connection}fillServerCapabilities(t){}initialize(t){}error(t){this.send(n.MessageType.Error,t)}warn(t){this.send(n.MessageType.Warning,t)}info(t){this.send(n.MessageType.Info,t)}log(t){this.send(n.MessageType.Log,t)}debug(t){this.send(n.MessageType.Debug,t)}send(t,i){this._rawConnection&&this._rawConnection.sendNotification(n.LogMessageNotification.type,{type:t,message:i}).catch(()=>{(0,n.RAL)().console.error(`Sending log message failed`)})}},_RemoteWindowImpl=class{constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw Error(`Remote is not attached to a connection yet.`);return this._connection}initialize(t){}fillServerCapabilities(t){}showErrorMessage(t,...i){let o={type:n.MessageType.Error,message:t,actions:i};return this.connection.sendRequest(n.ShowMessageRequest.type,o).then(null2Undefined)}showWarningMessage(t,...i){let o={type:n.MessageType.Warning,message:t,actions:i};return this.connection.sendRequest(n.ShowMessageRequest.type,o).then(null2Undefined)}showInformationMessage(t,...i){let o={type:n.MessageType.Info,message:t,actions:i};return this.connection.sendRequest(n.ShowMessageRequest.type,o).then(null2Undefined)}};let A=(0,h.ShowDocumentFeature)((0,s.ProgressFeature)(_RemoteWindowImpl));var te;(function(t){function create(){return new BulkRegistrationImpl}t.create=create})(te||(t.BulkRegistration=te={}));var BulkRegistrationImpl=class{constructor(){this._registrations=[],this._registered=new Set}add(t,n){let s=i.string(t)?t:t.method;if(this._registered.has(s))throw Error(`${s} is already added to this registration`);let c=o.generateUuid();this._registrations.push({id:c,method:s,registerOptions:n||{}}),this._registered.add(s)}asRegistrationParams(){return{registrations:this._registrations}}},j;(function(t){function create(){return new BulkUnregistrationImpl(void 0,[])}t.create=create})(j||(t.BulkUnregistration=j={}));var BulkUnregistrationImpl=class{constructor(t,n){this._connection=t,this._unregistrations=new Map,n.forEach(t=>{this._unregistrations.set(t.method,t)})}get isAttached(){return!!this._connection}attach(t){this._connection=t}add(t){this._unregistrations.set(t.method,t)}dispose(){let t=[];for(let n of this._unregistrations.values())t.push(n);let i={unregisterations:t};this._connection.sendRequest(n.UnregistrationRequest.type,i).catch(()=>{this._connection.console.info(`Bulk unregistration failed.`)})}disposeSingle(t){let o=i.string(t)?t:t.method,s=this._unregistrations.get(o);if(!s)return!1;let c={unregisterations:[s]};return this._connection.sendRequest(n.UnregistrationRequest.type,c).then(()=>{this._unregistrations.delete(o)},t=>{this._connection.console.info(`Un-registering request handler for ${s.id} failed.`)}),!0}},RemoteClientImpl=class{attach(t){this._connection=t}get connection(){if(!this._connection)throw Error(`Remote is not attached to a connection yet.`);return this._connection}initialize(t){}fillServerCapabilities(t){}register(t,n,i){return t instanceof BulkRegistrationImpl?this.registerMany(t):t instanceof BulkUnregistrationImpl?this.registerSingle1(t,n,i):this.registerSingle2(t,n)}registerSingle1(t,s,c){let u=i.string(s)?s:s.method,f=o.generateUuid(),p={registrations:[{id:f,method:u,registerOptions:c||{}}]};return t.isAttached||t.attach(this.connection),this.connection.sendRequest(n.RegistrationRequest.type,p).then(n=>(t.add({id:f,method:u}),t),t=>(this.connection.console.info(`Registering request handler for ${u} failed.`),Promise.reject(t)))}registerSingle2(t,s){let c=i.string(t)?t:t.method,u=o.generateUuid(),f={registrations:[{id:u,method:c,registerOptions:s||{}}]};return this.connection.sendRequest(n.RegistrationRequest.type,f).then(t=>n.Disposable.create(()=>{this.unregisterSingle(u,c).catch(()=>{this.connection.console.info(`Un-registering capability with id ${u} failed.`)})}),t=>(this.connection.console.info(`Registering request handler for ${c} failed.`),Promise.reject(t)))}unregisterSingle(t,i){let o={unregisterations:[{id:t,method:i}]};return this.connection.sendRequest(n.UnregistrationRequest.type,o).catch(()=>{this.connection.console.info(`Un-registering request handler for ${t} failed.`)})}registerMany(t){let i=t.asRegistrationParams();return this.connection.sendRequest(n.RegistrationRequest.type,i).then(()=>new BulkUnregistrationImpl(this._connection,i.registrations.map(t=>({id:t.id,method:t.method}))),t=>(this.connection.console.info(`Bulk registration failed.`),Promise.reject(t)))}},_RemoteWorkspaceImpl=class{constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw Error(`Remote is not attached to a connection yet.`);return this._connection}initialize(t){}fillServerCapabilities(t){}applyEdit(t){function isApplyWorkspaceEditParams(t){return t&&!!t.edit}let i=isApplyWorkspaceEditParams(t)?t:{edit:t};return this.connection.sendRequest(n.ApplyWorkspaceEditRequest.type,i)}};let ne=(0,g.FileOperationsFeature)((0,u.WorkspaceFoldersFeature)((0,c.ConfigurationFeature)(_RemoteWorkspaceImpl)));var TracerImpl=class{constructor(){this._trace=n.Trace.Off}attach(t){this._connection=t}get connection(){if(!this._connection)throw Error(`Remote is not attached to a connection yet.`);return this._connection}initialize(t){}fillServerCapabilities(t){}set trace(t){this._trace=t}log(t,i){this._trace!==n.Trace.Off&&this.connection.sendNotification(n.LogTraceNotification.type,{message:t,verbose:this._trace===n.Trace.Verbose?i:void 0}).catch(()=>{})}},TelemetryImpl=class{constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw Error(`Remote is not attached to a connection yet.`);return this._connection}initialize(t){}fillServerCapabilities(t){}logEvent(t){this.connection.sendNotification(n.TelemetryEventNotification.type,t).catch(()=>{this.connection.console.log(`Sending TelemetryEventNotification failed`)})}},_LanguagesImpl=class{constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw Error(`Remote is not attached to a connection yet.`);return this._connection}initialize(t){}fillServerCapabilities(t){}attachWorkDoneProgress(t){return(0,s.attachWorkDone)(this.connection,t)}attachPartialResultProgress(t,n){return(0,s.attachPartialResult)(this.connection,n)}};t._LanguagesImpl=_LanguagesImpl;let M=(0,T.FoldingRangeFeature)((0,O.MonikerFeature)((0,D.DiagnosticFeature)((0,E.InlayHintFeature)((0,S.InlineValueFeature)((0,x.TypeHierarchyFeature)((0,_.LinkedEditingRangeFeature)((0,p.SemanticTokensFeature)((0,f.CallHierarchyFeature)(_LanguagesImpl)))))))));var _NotebooksImpl=class{constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw Error(`Remote is not attached to a connection yet.`);return this._connection}initialize(t){}fillServerCapabilities(t){}attachWorkDoneProgress(t){return(0,s.attachWorkDone)(this.connection,t)}attachPartialResultProgress(t,n){return(0,s.attachPartialResult)(this.connection,n)}};t._NotebooksImpl=_NotebooksImpl;let re=(0,ee.NotebookSyncFeature)(_NotebooksImpl);function combineConsoleFeatures(t,n){return function(i){return n(t(i))}}t.combineConsoleFeatures=combineConsoleFeatures;function combineTelemetryFeatures(t,n){return function(i){return n(t(i))}}t.combineTelemetryFeatures=combineTelemetryFeatures;function combineTracerFeatures(t,n){return function(i){return n(t(i))}}t.combineTracerFeatures=combineTracerFeatures;function combineClientFeatures(t,n){return function(i){return n(t(i))}}t.combineClientFeatures=combineClientFeatures;function combineWindowFeatures(t,n){return function(i){return n(t(i))}}t.combineWindowFeatures=combineWindowFeatures;function combineWorkspaceFeatures(t,n){return function(i){return n(t(i))}}t.combineWorkspaceFeatures=combineWorkspaceFeatures;function combineLanguagesFeatures(t,n){return function(i){return n(t(i))}}t.combineLanguagesFeatures=combineLanguagesFeatures;function combineNotebooksFeatures(t,n){return function(i){return n(t(i))}}t.combineNotebooksFeatures=combineNotebooksFeatures;function combineFeatures(t,n){function combine(t,n,i){return t&&n?i(t,n):t||n}return{__brand:`features`,console:combine(t.console,n.console,combineConsoleFeatures),tracer:combine(t.tracer,n.tracer,combineTracerFeatures),telemetry:combine(t.telemetry,n.telemetry,combineTelemetryFeatures),client:combine(t.client,n.client,combineClientFeatures),window:combine(t.window,n.window,combineWindowFeatures),workspace:combine(t.workspace,n.workspace,combineWorkspaceFeatures),languages:combine(t.languages,n.languages,combineLanguagesFeatures),notebooks:combine(t.notebooks,n.notebooks,combineNotebooksFeatures)}}t.combineFeatures=combineFeatures;function createConnection(t,o,c){let u=c&&c.console?new(c.console(RemoteConsoleImpl)):new RemoteConsoleImpl,f=t(u);u.rawAttach(f);let p=c&&c.tracer?new(c.tracer(TracerImpl)):new TracerImpl,h=c&&c.telemetry?new(c.telemetry(TelemetryImpl)):new TelemetryImpl,g=c&&c.client?new(c.client(RemoteClientImpl)):new RemoteClientImpl,_=c&&c.window?new(c.window(A)):new A,x=c&&c.workspace?new(c.workspace(ne)):new ne,S=c&&c.languages?new(c.languages(M)):new M,T=c&&c.notebooks?new(c.notebooks(re)):new re,E=[u,p,h,g,_,x,S,T];function asPromise(t){return t instanceof Promise?t:i.thenable(t)?new Promise((n,i)=>{t.then(t=>n(t),t=>i(t))}):Promise.resolve(t)}let D,ee,O,k={listen:()=>f.listen(),sendRequest:(t,...n)=>f.sendRequest(i.string(t)?t:t.method,...n),onRequest:(t,n)=>f.onRequest(t,n),sendNotification:(t,n)=>{let o=i.string(t)?t:t.method;return f.sendNotification(o,n)},onNotification:(t,n)=>f.onNotification(t,n),onProgress:f.onProgress,sendProgress:f.sendProgress,onInitialize:t=>(ee=t,{dispose:()=>{ee=void 0}}),onInitialized:t=>f.onNotification(n.InitializedNotification.type,t),onShutdown:t=>(D=t,{dispose:()=>{D=void 0}}),onExit:t=>(O=t,{dispose:()=>{O=void 0}}),get console(){return u},get telemetry(){return h},get tracer(){return p},get client(){return g},get window(){return _},get workspace(){return x},get languages(){return S},get notebooks(){return T},onDidChangeConfiguration:t=>f.onNotification(n.DidChangeConfigurationNotification.type,t),onDidChangeWatchedFiles:t=>f.onNotification(n.DidChangeWatchedFilesNotification.type,t),__textDocumentSync:void 0,onDidOpenTextDocument:t=>f.onNotification(n.DidOpenTextDocumentNotification.type,t),onDidChangeTextDocument:t=>f.onNotification(n.DidChangeTextDocumentNotification.type,t),onDidCloseTextDocument:t=>f.onNotification(n.DidCloseTextDocumentNotification.type,t),onWillSaveTextDocument:t=>f.onNotification(n.WillSaveTextDocumentNotification.type,t),onWillSaveTextDocumentWaitUntil:t=>f.onRequest(n.WillSaveTextDocumentWaitUntilRequest.type,t),onDidSaveTextDocument:t=>f.onNotification(n.DidSaveTextDocumentNotification.type,t),sendDiagnostics:t=>f.sendNotification(n.PublishDiagnosticsNotification.type,t),onHover:t=>f.onRequest(n.HoverRequest.type,(n,i)=>t(n,i,(0,s.attachWorkDone)(f,n),void 0)),onCompletion:t=>f.onRequest(n.CompletionRequest.type,(n,i)=>t(n,i,(0,s.attachWorkDone)(f,n),(0,s.attachPartialResult)(f,n))),onCompletionResolve:t=>f.onRequest(n.CompletionResolveRequest.type,t),onSignatureHelp:t=>f.onRequest(n.SignatureHelpRequest.type,(n,i)=>t(n,i,(0,s.attachWorkDone)(f,n),void 0)),onDeclaration:t=>f.onRequest(n.DeclarationRequest.type,(n,i)=>t(n,i,(0,s.attachWorkDone)(f,n),(0,s.attachPartialResult)(f,n))),onDefinition:t=>f.onRequest(n.DefinitionRequest.type,(n,i)=>t(n,i,(0,s.attachWorkDone)(f,n),(0,s.attachPartialResult)(f,n))),onTypeDefinition:t=>f.onRequest(n.TypeDefinitionRequest.type,(n,i)=>t(n,i,(0,s.attachWorkDone)(f,n),(0,s.attachPartialResult)(f,n))),onImplementation:t=>f.onRequest(n.ImplementationRequest.type,(n,i)=>t(n,i,(0,s.attachWorkDone)(f,n),(0,s.attachPartialResult)(f,n))),onReferences:t=>f.onRequest(n.ReferencesRequest.type,(n,i)=>t(n,i,(0,s.attachWorkDone)(f,n),(0,s.attachPartialResult)(f,n))),onDocumentHighlight:t=>f.onRequest(n.DocumentHighlightRequest.type,(n,i)=>t(n,i,(0,s.attachWorkDone)(f,n),(0,s.attachPartialResult)(f,n))),onDocumentSymbol:t=>f.onRequest(n.DocumentSymbolRequest.type,(n,i)=>t(n,i,(0,s.attachWorkDone)(f,n),(0,s.attachPartialResult)(f,n))),onWorkspaceSymbol:t=>f.onRequest(n.WorkspaceSymbolRequest.type,(n,i)=>t(n,i,(0,s.attachWorkDone)(f,n),(0,s.attachPartialResult)(f,n))),onWorkspaceSymbolResolve:t=>f.onRequest(n.WorkspaceSymbolResolveRequest.type,t),onCodeAction:t=>f.onRequest(n.CodeActionRequest.type,(n,i)=>t(n,i,(0,s.attachWorkDone)(f,n),(0,s.attachPartialResult)(f,n))),onCodeActionResolve:t=>f.onRequest(n.CodeActionResolveRequest.type,(n,i)=>t(n,i)),onCodeLens:t=>f.onRequest(n.CodeLensRequest.type,(n,i)=>t(n,i,(0,s.attachWorkDone)(f,n),(0,s.attachPartialResult)(f,n))),onCodeLensResolve:t=>f.onRequest(n.CodeLensResolveRequest.type,(n,i)=>t(n,i)),onDocumentFormatting:t=>f.onRequest(n.DocumentFormattingRequest.type,(n,i)=>t(n,i,(0,s.attachWorkDone)(f,n),void 0)),onDocumentRangeFormatting:t=>f.onRequest(n.DocumentRangeFormattingRequest.type,(n,i)=>t(n,i,(0,s.attachWorkDone)(f,n),void 0)),onDocumentOnTypeFormatting:t=>f.onRequest(n.DocumentOnTypeFormattingRequest.type,(n,i)=>t(n,i)),onRenameRequest:t=>f.onRequest(n.RenameRequest.type,(n,i)=>t(n,i,(0,s.attachWorkDone)(f,n),void 0)),onPrepareRename:t=>f.onRequest(n.PrepareRenameRequest.type,(n,i)=>t(n,i)),onDocumentLinks:t=>f.onRequest(n.DocumentLinkRequest.type,(n,i)=>t(n,i,(0,s.attachWorkDone)(f,n),(0,s.attachPartialResult)(f,n))),onDocumentLinkResolve:t=>f.onRequest(n.DocumentLinkResolveRequest.type,(n,i)=>t(n,i)),onDocumentColor:t=>f.onRequest(n.DocumentColorRequest.type,(n,i)=>t(n,i,(0,s.attachWorkDone)(f,n),(0,s.attachPartialResult)(f,n))),onColorPresentation:t=>f.onRequest(n.ColorPresentationRequest.type,(n,i)=>t(n,i,(0,s.attachWorkDone)(f,n),(0,s.attachPartialResult)(f,n))),onFoldingRanges:t=>f.onRequest(n.FoldingRangeRequest.type,(n,i)=>t(n,i,(0,s.attachWorkDone)(f,n),(0,s.attachPartialResult)(f,n))),onSelectionRanges:t=>f.onRequest(n.SelectionRangeRequest.type,(n,i)=>t(n,i,(0,s.attachWorkDone)(f,n),(0,s.attachPartialResult)(f,n))),onExecuteCommand:t=>f.onRequest(n.ExecuteCommandRequest.type,(n,i)=>t(n,i,(0,s.attachWorkDone)(f,n),void 0)),dispose:()=>f.dispose()};for(let t of E)t.attach(k);return f.onRequest(n.InitializeRequest.type,t=>{o.initialize(t),i.string(t.trace)&&(p.trace=n.Trace.fromString(t.trace));for(let n of E)n.initialize(t.capabilities);if(ee)return asPromise(ee(t,new n.CancellationTokenSource().token,(0,s.attachWorkDone)(f,t),void 0)).then(t=>{if(t instanceof n.ResponseError)return t;let o=t;o||={capabilities:{}};let s=o.capabilities;s||(s={},o.capabilities=s),s.textDocumentSync===void 0||s.textDocumentSync===null?s.textDocumentSync=i.number(k.__textDocumentSync)?k.__textDocumentSync:n.TextDocumentSyncKind.None:!i.number(s.textDocumentSync)&&!i.number(s.textDocumentSync.change)&&(s.textDocumentSync.change=i.number(k.__textDocumentSync)?k.__textDocumentSync:n.TextDocumentSyncKind.None);for(let t of E)t.fillServerCapabilities(s);return o});{let t={capabilities:{textDocumentSync:n.TextDocumentSyncKind.None}};for(let n of E)n.fillServerCapabilities(t.capabilities);return t}}),f.onRequest(n.ShutdownRequest.type,()=>{if(o.shutdownReceived=!0,D)return D(new n.CancellationTokenSource().token)}),f.onNotification(n.ExitNotification.type,()=>{try{O&&O()}finally{o.shutdownReceived?o.exit(0):o.exit(1)}}),f.onNotification(n.SetTraceNotification.type,t=>{p.trace=n.Trace.fromString(t.value)}),k}t.createConnection=createConnection})),xn=f((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.resolveModulePath=t.FileSystem=t.resolveGlobalYarnPath=t.resolveGlobalNodePath=t.resolve=t.uriToFilePath=void 0;let n=s(`node:url`),i=s(`node:path`),o=s(`node:fs`),c=s(`node:child_process`);function uriToFilePath(t){let o=n.parse(t);if(o.protocol!==`file:`||!o.path)return;let s=o.path.split(`/`);for(var c=0,u=s.length;c<u;c++)s[c]=decodeURIComponent(s[c]);if(process.platform===`win32`&&s.length>1){let t=s[0],n=s[1];t.length===0&&n.length>1&&n[1]===`:`&&s.shift()}return i.normalize(s.join(`/`))}t.uriToFilePath=uriToFilePath;function isWindows(){return process.platform===`win32`}function resolve(t,n,s,u){let f=`NODE_PATH`,p=[`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((h,g)=>{let _=process.env,x=Object.create(null);Object.keys(_).forEach(t=>x[t]=_[t]),n&&o.existsSync(n)&&(x[f]?x[f]=n+i.delimiter+x[f]:x[f]=n,u&&u(`NODE_PATH value is: ${x[f]}`)),x.ELECTRON_RUN_AS_NODE=`1`;try{let n=(0,c.fork)(``,[],{cwd:s,env:x,execArgv:[`-e`,p]});if(n.pid===void 0){g(Error(`Starting process to resolve node module ${t} failed`));return}n.on(`error`,t=>{g(t)}),n.on(`message`,i=>{i.c===`r`&&(n.send({c:`e`}),i.s?h(i.r):g(Error(`Failed to resolve module: ${t}`)))});let i={c:`rs`,a:t};n.send(i)}catch(t){g(t)}})}t.resolve=resolve;function resolveGlobalNodePath(t){let n=`npm`,o=Object.create(null);Object.keys(process.env).forEach(t=>o[t]=process.env[t]),o.NO_UPDATE_NOTIFIER=`true`;let s={encoding:`utf8`,env:o};isWindows()&&(n=`npm.cmd`,s.shell=!0);let handler=()=>{};try{process.on(`SIGPIPE`,handler);let o=(0,c.spawnSync)(n,[`config`,`get`,`prefix`],s).stdout;if(!o){t&&t(`'npm config get prefix' didn't return a value.`);return}let u=o.trim();return t&&t(`'npm config get prefix' value is: ${u}`),u.length>0?isWindows()?i.join(u,`node_modules`):i.join(u,`lib`,`node_modules`):void 0}catch{return}finally{process.removeListener(`SIGPIPE`,handler)}}t.resolveGlobalNodePath=resolveGlobalNodePath;function resolveGlobalYarnPath(t){let n=`yarn`,o={encoding:`utf8`};isWindows()&&(n=`yarn.cmd`,o.shell=!0);let handler=()=>{};try{process.on(`SIGPIPE`,handler);let s=(0,c.spawnSync)(n,[`global`,`dir`,`--json`],o),u=s.stdout;if(!u){t&&(t(`'yarn global dir' didn't return a value.`),s.stderr&&t(s.stderr));return}let f=u.trim().split(/\r?\n/);for(let t of f)try{let n=JSON.parse(t);if(n.type===`log`)return i.join(n.data,`node_modules`)}catch{}return}catch{return}finally{process.removeListener(`SIGPIPE`,handler)}}t.resolveGlobalYarnPath=resolveGlobalYarnPath;var u;(function(t){let n;function isCaseSensitive(){return n===void 0&&(n=process.platform===`win32`?!1:!o.existsSync(__filename.toUpperCase())||!o.existsSync(__filename.toLowerCase())),n}t.isCaseSensitive=isCaseSensitive;function isParent(t,n){return isCaseSensitive()?i.normalize(n).indexOf(i.normalize(t))===0:i.normalize(n).toLowerCase().indexOf(i.normalize(t).toLowerCase())===0}t.isParent=isParent})(u||(t.FileSystem=u={}));function resolveModulePath(t,n,o,s){return o?(i.isAbsolute(o)||(o=i.join(t,o)),resolve(n,o,o,s).then(t=>u.isParent(o,t)?t:Promise.reject(Error(`Failed to load ${n} from node path location.`))).then(void 0,i=>resolve(n,resolveGlobalNodePath(s),t,s))):resolve(n,resolveGlobalNodePath(s),t,s)}t.resolveModulePath=resolveModulePath})),Sn=f(((t,n)=>{n.exports=q()})),Cn=f((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.InlineCompletionFeature=void 0;let n=q(),InlineCompletionFeature=t=>class extends t{get inlineCompletion(){return{on:t=>this.connection.onRequest(n.InlineCompletionRequest.type,(n,i)=>t(n,i,this.attachWorkDoneProgress(n)))}}};t.InlineCompletionFeature=InlineCompletionFeature})),wn=f((t=>{var n=t&&t.__createBinding||(Object.create?(function(t,n,i,o){o===void 0&&(o=i);var s=Object.getOwnPropertyDescriptor(n,i);(!s||(`get`in s?!n.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return n[i]}}),Object.defineProperty(t,o,s)}):(function(t,n,i,o){o===void 0&&(o=i),t[o]=n[i]})),i=t&&t.__exportStar||function(t,i){for(var o in t)o!==`default`&&!Object.prototype.hasOwnProperty.call(i,o)&&n(i,t,o)};Object.defineProperty(t,"__esModule",{value:!0}),t.ProposedFeatures=t.NotebookDocuments=t.TextDocuments=t.SemanticTokensBuilder=void 0;let o=cn();Object.defineProperty(t,"SemanticTokensBuilder",{enumerable:!0,get:function(){return o.SemanticTokensBuilder}});let s=Cn();i(q(),t);let c=_n();Object.defineProperty(t,"TextDocuments",{enumerable:!0,get:function(){return c.TextDocuments}});let u=vn();Object.defineProperty(t,"NotebookDocuments",{enumerable:!0,get:function(){return u.NotebookDocuments}}),i(bn(),t);var f;(function(t){t.all={__brand:`features`,languages:s.InlineCompletionFeature}})(f||(t.ProposedFeatures=f={}))})),Tn=f((t=>{var n=t&&t.__createBinding||(Object.create?(function(t,n,i,o){o===void 0&&(o=i);var s=Object.getOwnPropertyDescriptor(n,i);(!s||(`get`in s?!n.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return n[i]}}),Object.defineProperty(t,o,s)}):(function(t,n,i,o){o===void 0&&(o=i),t[o]=n[i]})),i=t&&t.__exportStar||function(t,i){for(var o in t)o!==`default`&&!Object.prototype.hasOwnProperty.call(i,o)&&n(i,t,o)};Object.defineProperty(t,"__esModule",{value:!0}),t.createConnection=t.Files=void 0;let o=s(`node:util`),c=k(),u=bn(),f=xn(),p=Sn();i(Sn(),t),i(wn(),t);var h;(function(t){t.uriToFilePath=f.uriToFilePath,t.resolveGlobalNodePath=f.resolveGlobalNodePath,t.resolveGlobalYarnPath=f.resolveGlobalYarnPath,t.resolve=f.resolve,t.resolveModulePath=f.resolveModulePath})(h||(t.Files=h={}));let g=!1,_;function setupExitTimer(){let t=`--clientProcessId`;function runTimer(t){try{let n=parseInt(t);isNaN(n)||(_=setInterval(()=>{try{process.kill(n,0)}catch{process.exit(+!g)}},3e3))}catch{}}for(let n=2;n<process.argv.length;n++){let i=process.argv[n];if(i===t&&n+1<process.argv.length){runTimer(process.argv[n+1]);return}else{let n=i.split(`=`);n[0]===t&&runTimer(n[1])}}}setupExitTimer();let x={initialize:t=>{let n=t.processId;c.number(n)&&_===void 0&&setInterval(()=>{try{process.kill(n,0)}catch{process.exit(+!g)}},3e3)},get shutdownReceived(){return g},set shutdownReceived(t){g=t},exit:t=>{process.exit(t)}};function createConnection(t,n,i,o){let s,c,u,f;return t!==void 0&&t.__brand===`features`&&(s=t,t=n,n=i,i=o),p.ConnectionStrategy.is(t)||p.ConnectionOptions.is(t)?f=t:(c=t,u=n,f=i),_createConnection(c,u,f,s)}t.createConnection=createConnection;function _createConnection(t,n,i,o){let s=!1;if(!t&&!n&&process.argv.length>2){let i,o,c=process.argv.slice(2);for(let u=0;u<c.length;u++){let h=c[u];if(h===`--node-ipc`){t=new p.IPCMessageReader(process),n=new p.IPCMessageWriter(process);break}else if(h===`--stdio`){s=!0,t=process.stdin,n=process.stdout;break}else if(h===`--socket`){i=parseInt(c[u+1]);break}else if(h===`--pipe`){o=c[u+1];break}else{var f=h.split(`=`);if(f[0]===`--socket`){i=parseInt(f[1]);break}else if(f[0]===`--pipe`){o=f[1];break}}}if(i){let o=(0,p.createServerSocketTransport)(i);t=o[0],n=o[1]}else if(o){let i=(0,p.createServerPipeTransport)(o);t=i[0],n=i[1]}}var h=`Use arguments of createConnection or set command line parameters: '--node-ipc', '--stdio' or '--socket={number}'`;if(!t)throw Error(`Connection input stream is not set. `+h);if(!n)throw Error(`Connection output stream is not set. `+h);if(c.func(t.read)&&c.func(t.on)){let n=t;n.on(`end`,()=>{process.exit(+!g)}),n.on(`close`,()=>{process.exit(+!g)})}let connectionFactory=o=>{let c=(0,p.createProtocolConnection)(t,n,o,i);return s&&patchConsole(o),c};return(0,u.createConnection)(connectionFactory,x,o)}function patchConsole(t){function serialize(t){return t.map(t=>typeof t==`string`?t:(0,o.inspect)(t)).join(` `)}let n=new Map;console.assert=function assert(n,...i){if(!n)if(i.length===0)t.error(`Assertion failed`);else{let[n,...o]=i;t.error(`Assertion failed: ${n} ${serialize(o)}`)}},console.count=function count(i=`default`){let o=String(i),s=n.get(o)??0;s+=1,n.set(o,s),t.log(`${o}: ${o}`)},console.countReset=function countReset(t){t===void 0?n.clear():n.delete(String(t))},console.debug=function debug(...n){t.log(serialize(n))},console.dir=function dir(n,i){t.log((0,o.inspect)(n,i))},console.log=function log(...n){t.log(serialize(n))},console.error=function error(...n){t.error(serialize(n))},console.trace=function trace(...n){let i=Error().stack.replace(/(.+\n){2}/,``),o=`Trace`;n.length!==0&&(o+=`: ${serialize(n)}`),t.log(`${o}\n${i}`)},console.warn=function warn(...n){t.warn(serialize(n))}}}));function isAstNode(t){return typeof t==`object`&&!!t&&typeof t.$type==`string`}function isReference(t){return typeof t==`object`&&!!t&&typeof t.$refText==`string`}function isAstNodeDescription(t){return typeof t==`object`&&!!t&&typeof t.name==`string`&&typeof t.type==`string`&&typeof t.path==`string`}function isLinkingError(t){return typeof t==`object`&&!!t&&isAstNode(t.container)&&isReference(t.reference)&&typeof t.message==`string`}var AbstractAstReflection=class{constructor(){this.subtypes={},this.allSubtypes={}}isInstance(t,n){return isAstNode(t)&&this.isSubtype(t.$type,n)}isSubtype(t,n){if(t===n)return!0;let i=this.subtypes[t];i||=this.subtypes[t]={};let o=i[n];if(o!==void 0)return o;{let o=this.computeIsSubtype(t,n);return i[n]=o,o}}getAllSubTypes(t){let n=this.allSubtypes[t];if(n)return n;{let n=this.getAllTypes(),i=[];for(let o of n)this.isSubtype(o,t)&&i.push(o);return this.allSubtypes[t]=i,i}}};function isCompositeCstNode(t){return typeof t==`object`&&!!t&&Array.isArray(t.content)}function isLeafCstNode(t){return typeof t==`object`&&!!t&&typeof t.tokenType==`object`}function isRootCstNode(t){return isCompositeCstNode(t)&&typeof t.fullText==`string`}const En=`AbstractRule`,Dn=`AbstractType`,On=`Condition`,kn=`TypeDefinition`,An=`ValueLiteral`,jn=`AbstractElement`;function isAbstractElement(t){return J.isInstance(t,jn)}const Mn=`ArrayLiteral`,Nn=`ArrayType`;function isArrayType(t){return J.isInstance(t,Nn)}const Pn=`BooleanLiteral`;function isBooleanLiteral(t){return J.isInstance(t,Pn)}const Fn=`Conjunction`;function isConjunction(t){return J.isInstance(t,Fn)}const In=`Disjunction`;function isDisjunction(t){return J.isInstance(t,In)}const Ln=`Grammar`,Rn=`GrammarImport`,zn=`InferredType`;function isInferredType(t){return J.isInstance(t,zn)}const Bn=`Interface`;function isInterface(t){return J.isInstance(t,Bn)}const Vn=`NamedArgument`,Hn=`Negation`;function isNegation(t){return J.isInstance(t,Hn)}const Un=`NumberLiteral`,Wn=`Parameter`,Gn=`ParameterReference`;function isParameterReference(t){return J.isInstance(t,Gn)}const Kn=`ParserRule`;function isParserRule(t){return J.isInstance(t,Kn)}const qn=`ReferenceType`;function isReferenceType(t){return J.isInstance(t,qn)}const Jn=`ReturnType`;function isReturnType(t){return J.isInstance(t,Jn)}const Yn=`SimpleType`;function isSimpleType(t){return J.isInstance(t,Yn)}const Xn=`StringLiteral`,Zn=`TerminalRule`;function isTerminalRule(t){return J.isInstance(t,Zn)}const Qn=`Type`;function isType(t){return J.isInstance(t,Qn)}const $n=`TypeAttribute`,er=`UnionType`;function isUnionType(t){return J.isInstance(t,er)}const tr=`Action`;function isAction(t){return J.isInstance(t,tr)}const nr=`Alternatives`;function isAlternatives(t){return J.isInstance(t,nr)}const rr=`Assignment`;function isAssignment(t){return J.isInstance(t,rr)}const ir=`CharacterRange`;function isCharacterRange(t){return J.isInstance(t,ir)}const ar=`CrossReference`;function isCrossReference(t){return J.isInstance(t,ar)}const or=`EndOfFile`;function isEndOfFile(t){return J.isInstance(t,or)}const sr=`Group`;function isGroup(t){return J.isInstance(t,sr)}const cr=`Keyword`;function isKeyword(t){return J.isInstance(t,cr)}const lr=`NegatedToken`;function isNegatedToken(t){return J.isInstance(t,lr)}const ur=`RegexToken`;function isRegexToken(t){return J.isInstance(t,ur)}const dr=`RuleCall`;function isRuleCall(t){return J.isInstance(t,dr)}const fr=`TerminalAlternatives`;function isTerminalAlternatives(t){return J.isInstance(t,fr)}const pr=`TerminalGroup`;function isTerminalGroup(t){return J.isInstance(t,pr)}const mr=`TerminalRuleCall`;function isTerminalRuleCall(t){return J.isInstance(t,mr)}const hr=`UnorderedGroup`;function isUnorderedGroup(t){return J.isInstance(t,hr)}const gr=`UntilToken`;function isUntilToken(t){return J.isInstance(t,gr)}const _r=`Wildcard`;function isWildcard(t){return J.isInstance(t,_r)}var LangiumGrammarAstReflection=class extends AbstractAstReflection{getAllTypes(){return[jn,En,Dn,tr,nr,Mn,Nn,rr,Pn,ir,On,Fn,ar,In,or,Ln,Rn,sr,zn,Bn,cr,Vn,lr,Hn,Un,Wn,Gn,Kn,qn,ur,Jn,dr,Yn,Xn,fr,pr,Zn,mr,Qn,$n,kn,er,hr,gr,An,_r]}computeIsSubtype(t,n){switch(t){case tr:case nr:case rr:case ir:case ar:case or:case sr:case cr:case lr:case ur:case dr:case fr:case pr:case mr:case hr:case gr:case _r:return this.isSubtype(jn,n);case Mn:case Un:case Xn:return this.isSubtype(An,n);case Nn:case qn:case Yn:case er:return this.isSubtype(kn,n);case Pn:return this.isSubtype(`Condition`,n)||this.isSubtype(`ValueLiteral`,n);case Fn:case In:case Hn:case Gn:return this.isSubtype(On,n);case zn:case Bn:case Qn:return this.isSubtype(Dn,n);case Kn:return this.isSubtype(`AbstractRule`,n)||this.isSubtype(`AbstractType`,n);case Zn:return this.isSubtype(En,n);default:return!1}}getReferenceType(t){let n=`${t.container.$type}:${t.property}`;switch(n){case`Action:type`:case`CrossReference:type`:case`Interface:superTypes`:case`ParserRule:returnType`:case`SimpleType:typeRef`:return Dn;case`Grammar:hiddenTokens`:case`ParserRule:hiddenTokens`:case`RuleCall:rule`:return En;case`Grammar:usedGrammars`:return Ln;case`NamedArgument:parameter`:case`ParameterReference:parameter`:return Wn;case`TerminalRuleCall:rule`:return Zn;default:throw Error(`${n} is not a valid reference id.`)}}getTypeMetaData(t){switch(t){case jn:return{name:jn,properties:[{name:`cardinality`},{name:`lookahead`}]};case Mn:return{name:Mn,properties:[{name:`elements`,defaultValue:[]}]};case Nn:return{name:Nn,properties:[{name:`elementType`}]};case Pn:return{name:Pn,properties:[{name:`true`,defaultValue:!1}]};case Fn:return{name:Fn,properties:[{name:`left`},{name:`right`}]};case In:return{name:In,properties:[{name:`left`},{name:`right`}]};case Ln:return{name:Ln,properties:[{name:`definesHiddenTokens`,defaultValue:!1},{name:`hiddenTokens`,defaultValue:[]},{name:`imports`,defaultValue:[]},{name:`interfaces`,defaultValue:[]},{name:`isDeclared`,defaultValue:!1},{name:`name`},{name:`rules`,defaultValue:[]},{name:`types`,defaultValue:[]},{name:`usedGrammars`,defaultValue:[]}]};case Rn:return{name:Rn,properties:[{name:`path`}]};case zn:return{name:zn,properties:[{name:`name`}]};case Bn:return{name:Bn,properties:[{name:`attributes`,defaultValue:[]},{name:`name`},{name:`superTypes`,defaultValue:[]}]};case Vn:return{name:Vn,properties:[{name:`calledByName`,defaultValue:!1},{name:`parameter`},{name:`value`}]};case Hn:return{name:Hn,properties:[{name:`value`}]};case Un:return{name:Un,properties:[{name:`value`}]};case Wn:return{name:Wn,properties:[{name:`name`}]};case Gn:return{name:Gn,properties:[{name:`parameter`}]};case Kn:return{name:Kn,properties:[{name:`dataType`},{name:`definesHiddenTokens`,defaultValue:!1},{name:`definition`},{name:`entry`,defaultValue:!1},{name:`fragment`,defaultValue:!1},{name:`hiddenTokens`,defaultValue:[]},{name:`inferredType`},{name:`name`},{name:`parameters`,defaultValue:[]},{name:`returnType`},{name:`wildcard`,defaultValue:!1}]};case qn:return{name:qn,properties:[{name:`referenceType`}]};case Jn:return{name:Jn,properties:[{name:`name`}]};case Yn:return{name:Yn,properties:[{name:`primitiveType`},{name:`stringType`},{name:`typeRef`}]};case Xn:return{name:Xn,properties:[{name:`value`}]};case Zn:return{name:Zn,properties:[{name:`definition`},{name:`fragment`,defaultValue:!1},{name:`hidden`,defaultValue:!1},{name:`name`},{name:`type`}]};case Qn:return{name:Qn,properties:[{name:`name`},{name:`type`}]};case $n:return{name:$n,properties:[{name:`defaultValue`},{name:`isOptional`,defaultValue:!1},{name:`name`},{name:`type`}]};case er:return{name:er,properties:[{name:`types`,defaultValue:[]}]};case tr:return{name:tr,properties:[{name:`cardinality`},{name:`feature`},{name:`inferredType`},{name:`lookahead`},{name:`operator`},{name:`type`}]};case nr:return{name:nr,properties:[{name:`cardinality`},{name:`elements`,defaultValue:[]},{name:`lookahead`}]};case rr:return{name:rr,properties:[{name:`cardinality`},{name:`feature`},{name:`lookahead`},{name:`operator`},{name:`terminal`}]};case ir:return{name:ir,properties:[{name:`cardinality`},{name:`left`},{name:`lookahead`},{name:`right`}]};case ar:return{name:ar,properties:[{name:`cardinality`},{name:`deprecatedSyntax`,defaultValue:!1},{name:`lookahead`},{name:`terminal`},{name:`type`}]};case or:return{name:or,properties:[{name:`cardinality`},{name:`lookahead`}]};case sr:return{name:sr,properties:[{name:`cardinality`},{name:`elements`,defaultValue:[]},{name:`guardCondition`},{name:`lookahead`}]};case cr:return{name:cr,properties:[{name:`cardinality`},{name:`lookahead`},{name:`value`}]};case lr:return{name:lr,properties:[{name:`cardinality`},{name:`lookahead`},{name:`terminal`}]};case ur:return{name:ur,properties:[{name:`cardinality`},{name:`lookahead`},{name:`regex`}]};case dr:return{name:dr,properties:[{name:`arguments`,defaultValue:[]},{name:`cardinality`},{name:`lookahead`},{name:`rule`}]};case fr:return{name:fr,properties:[{name:`cardinality`},{name:`elements`,defaultValue:[]},{name:`lookahead`}]};case pr:return{name:pr,properties:[{name:`cardinality`},{name:`elements`,defaultValue:[]},{name:`lookahead`}]};case mr:return{name:mr,properties:[{name:`cardinality`},{name:`lookahead`},{name:`rule`}]};case hr:return{name:hr,properties:[{name:`cardinality`},{name:`elements`,defaultValue:[]},{name:`lookahead`}]};case gr:return{name:gr,properties:[{name:`cardinality`},{name:`lookahead`},{name:`terminal`}]};case _r:return{name:_r,properties:[{name:`cardinality`},{name:`lookahead`}]};default:return{name:t,properties:[]}}}};const J=new LangiumGrammarAstReflection;var vr=class StreamImpl{constructor(t,n){this.startFn=t,this.nextFn=n}iterator(){let t={state:this.startFn(),next:()=>this.nextFn(t.state),[Symbol.iterator]:()=>t};return t}[Symbol.iterator](){return this.iterator()}isEmpty(){return!!this.iterator().next().done}count(){let t=this.iterator(),n=0,i=t.next();for(;!i.done;)n++,i=t.next();return n}toArray(){let t=[],n=this.iterator(),i;do i=n.next(),i.value!==void 0&&t.push(i.value);while(!i.done);return t}toSet(){return new Set(this)}toMap(t,n){let i=this.map(i=>[t?t(i):i,n?n(i):i]);return new Map(i)}toString(){return this.join()}concat(t){return new StreamImpl(()=>({first:this.startFn(),firstDone:!1,iterator:t[Symbol.iterator]()}),t=>{let n;if(!t.firstDone){do if(n=this.nextFn(t.first),!n.done)return n;while(!n.done);t.firstDone=!0}do if(n=t.iterator.next(),!n.done)return n;while(!n.done);return Y})}join(t=`,`){let n=this.iterator(),i=``,o,s=!1;do o=n.next(),o.done||(s&&(i+=t),i+=toString$1(o.value)),s=!0;while(!o.done);return i}indexOf(t,n=0){let i=this.iterator(),o=0,s=i.next();for(;!s.done;){if(o>=n&&s.value===t)return o;s=i.next(),o++}return-1}every(t){let n=this.iterator(),i=n.next();for(;!i.done;){if(!t(i.value))return!1;i=n.next()}return!0}some(t){let n=this.iterator(),i=n.next();for(;!i.done;){if(t(i.value))return!0;i=n.next()}return!1}forEach(t){let n=this.iterator(),i=0,o=n.next();for(;!o.done;)t(o.value,i),o=n.next(),i++}map(t){return new StreamImpl(this.startFn,n=>{let{done:i,value:o}=this.nextFn(n);return i?Y:{done:!1,value:t(o)}})}filter(t){return new StreamImpl(this.startFn,n=>{let i;do if(i=this.nextFn(n),!i.done&&t(i.value))return i;while(!i.done);return Y})}nonNullable(){return this.filter(t=>t!=null)}reduce(t,n){let i=this.iterator(),o=n,s=i.next();for(;!s.done;)o=o===void 0?s.value:t(o,s.value),s=i.next();return o}reduceRight(t,n){return this.recursiveReduce(this.iterator(),t,n)}recursiveReduce(t,n,i){let o=t.next();if(o.done)return i;let s=this.recursiveReduce(t,n,i);return s===void 0?o.value:n(s,o.value)}find(t){let n=this.iterator(),i=n.next();for(;!i.done;){if(t(i.value))return i.value;i=n.next()}}findIndex(t){let n=this.iterator(),i=0,o=n.next();for(;!o.done;){if(t(o.value))return i;o=n.next(),i++}return-1}includes(t){let n=this.iterator(),i=n.next();for(;!i.done;){if(i.value===t)return!0;i=n.next()}return!1}flatMap(t){return new StreamImpl(()=>({this:this.startFn()}),n=>{do{if(n.iterator){let t=n.iterator.next();if(t.done)n.iterator=void 0;else return t}let{done:i,value:o}=this.nextFn(n.this);if(!i){let i=t(o);if(isIterable(i))n.iterator=i[Symbol.iterator]();else return{done:!1,value:i}}}while(n.iterator);return Y})}flat(t){if(t===void 0&&(t=1),t<=0)return this;let n=t>1?this.flat(t-1):this;return new StreamImpl(()=>({this:n.startFn()}),t=>{do{if(t.iterator){let n=t.iterator.next();if(n.done)t.iterator=void 0;else return n}let{done:i,value:o}=n.nextFn(t.this);if(!i)if(isIterable(o))t.iterator=o[Symbol.iterator]();else return{done:!1,value:o}}while(t.iterator);return Y})}head(){let t=this.iterator().next();if(!t.done)return t.value}tail(t=1){return new StreamImpl(()=>{let n=this.startFn();for(let i=0;i<t;i++)if(this.nextFn(n).done)return n;return n},this.nextFn)}limit(t){return new StreamImpl(()=>({size:0,state:this.startFn()}),n=>(n.size++,n.size>t?Y:this.nextFn(n.state)))}distinct(t){return new StreamImpl(()=>({set:new Set,internalState:this.startFn()}),n=>{let i;do if(i=this.nextFn(n.internalState),!i.done){let o=t?t(i.value):i.value;if(!n.set.has(o))return n.set.add(o),i}while(!i.done);return Y})}exclude(t,n){let i=new Set;for(let o of t){let t=n?n(o):o;i.add(t)}return this.filter(t=>{let o=n?n(t):t;return!i.has(o)})}};function toString$1(t){return typeof t==`string`?t:t===void 0?`undefined`:typeof t.toString==`function`?t.toString():Object.prototype.toString.call(t)}i(toString$1,`toString`);function isIterable(t){return!!t&&typeof t[Symbol.iterator]==`function`}const yr=new vr(()=>void 0,()=>Y),Y=Object.freeze({done:!0,value:void 0});function stream(...t){if(t.length===1){let n=t[0];if(n instanceof vr)return n;if(isIterable(n))return new vr(()=>n[Symbol.iterator](),t=>t.next());if(typeof n.length==`number`)return new vr(()=>({index:0}),t=>t.index<n.length?{done:!1,value:n[t.index++]}:Y)}return t.length>1?new vr(()=>({collIndex:0,arrIndex:0}),n=>{do{if(n.iterator){let t=n.iterator.next();if(!t.done)return t;n.iterator=void 0}if(n.array){if(n.arrIndex<n.array.length)return{done:!1,value:n.array[n.arrIndex++]};n.array=void 0,n.arrIndex=0}if(n.collIndex<t.length){let i=t[n.collIndex++];isIterable(i)?n.iterator=i[Symbol.iterator]():i&&typeof i.length==`number`&&(n.array=i)}}while(n.iterator||n.array||n.collIndex<t.length);return Y}):yr}var TreeStreamImpl=class extends vr{constructor(t,n,i){super(()=>({iterators:i?.includeRoot?[[t][Symbol.iterator]()]:[n(t)[Symbol.iterator]()],pruned:!1}),t=>{for(t.pruned&&=(t.iterators.pop(),!1);t.iterators.length>0;){let i=t.iterators[t.iterators.length-1].next();if(i.done)t.iterators.pop();else return t.iterators.push(n(i.value)[Symbol.iterator]()),i}return Y})}iterator(){let t={state:this.startFn(),next:()=>this.nextFn(t.state),prune:()=>{t.state.pruned=!0},[Symbol.iterator]:()=>t};return t}},br;(function(t){function sum(t){return t.reduce((t,n)=>t+n,0)}t.sum=sum;function product(t){return t.reduce((t,n)=>t*n,0)}t.product=product;function min(t){return t.reduce((t,n)=>Math.min(t,n))}t.min=min;function max(t){return t.reduce((t,n)=>Math.max(t,n))}t.max=max})(br||={});function streamCst(t){return new TreeStreamImpl(t,t=>isCompositeCstNode(t)?t.content:[],{includeRoot:!0})}function flattenCst(t){return streamCst(t).filter(isLeafCstNode)}function isChildNode(t,n){for(;t.container;)if(t=t.container,t===n)return!0;return!1}function tokenToRange(t){return{start:{character:t.startColumn-1,line:t.startLine-1},end:{character:t.endColumn,line:t.endLine-1}}}function toDocumentSegment(t){if(!t)return;let{offset:n,end:i,range:o}=t;return{range:o,offset:n,end:i,length:i-n}}var xr;(function(t){t[t.Before=0]=`Before`,t[t.After=1]=`After`,t[t.OverlapFront=2]=`OverlapFront`,t[t.OverlapBack=3]=`OverlapBack`,t[t.Inside=4]=`Inside`,t[t.Outside=5]=`Outside`})(xr||={});function compareRange(t,n){if(t.end.line<n.start.line||t.end.line===n.start.line&&t.end.character<=n.start.character)return xr.Before;if(t.start.line>n.end.line||t.start.line===n.end.line&&t.start.character>=n.end.character)return xr.After;let i=t.start.line>n.start.line||t.start.line===n.start.line&&t.start.character>=n.start.character,o=t.end.line<n.end.line||t.end.line===n.end.line&&t.end.character<=n.end.character;return i&&o?xr.Inside:i?xr.OverlapBack:o?xr.OverlapFront:xr.Outside}function inRange(t,n){return compareRange(t,n)>xr.After}const Sr=/^[\w\p{L}]$/u;function findDeclarationNodeAtOffset(t,n,i=Sr){if(t){if(n>0){let o=n-t.offset,s=t.text.charAt(o);i.test(s)||n--}return findLeafNodeAtOffset(t,n)}}function findCommentNode(t,n){if(t){let i=getPreviousNode(t,!0);if(i&&isCommentNode(i,n))return i;if(isRootCstNode(t)){let i=t.content.findIndex(t=>!t.hidden);for(let o=i-1;o>=0;o--){let i=t.content[o];if(isCommentNode(i,n))return i}}}}function isCommentNode(t,n){return isLeafCstNode(t)&&n.includes(t.tokenType.name)}function findLeafNodeAtOffset(t,n){if(isLeafCstNode(t))return t;if(isCompositeCstNode(t)){let i=binarySearch(t,n,!1);if(i)return findLeafNodeAtOffset(i,n)}}function findLeafNodeBeforeOffset(t,n){if(isLeafCstNode(t))return t;if(isCompositeCstNode(t)){let i=binarySearch(t,n,!0);if(i)return findLeafNodeBeforeOffset(i,n)}}function binarySearch(t,n,i){let o=0,s=t.content.length-1,c;for(;o<=s;){let u=Math.floor((o+s)/2),f=t.content[u];if(f.offset<=n&&f.end>n)return f;f.end<=n?(c=i?f:void 0,o=u+1):s=u-1}return c}function getPreviousNode(t,n=!0){for(;t.container;){let i=t.container,o=i.content.indexOf(t);for(;o>0;){o--;let t=i.content[o];if(n||!t.hidden)return t}t=i}}function getNextNode(t,n=!0){for(;t.container;){let i=t.container,o=i.content.indexOf(t),s=i.content.length-1;for(;o<s;){o++;let t=i.content[o];if(n||!t.hidden)return t}t=i}}function getInteriorNodes(t,n){let i=getCommonParent(t,n);return i?i.parent.content.slice(i.a+1,i.b):[]}function getCommonParent(t,n){let i=getParentChain(t),o=getParentChain(n),s;for(let t=0;t<i.length&&t<o.length;t++){let n=i[t],c=o[t];if(n.parent===c.parent)s={parent:n.parent,a:n.index,b:c.index};else break}return s}function getParentChain(t){let n=[];for(;t.container;){let i=t.container,o=i.content.indexOf(t);n.push({parent:i,index:o}),t=i}return n.reverse()}var Cr=c({assignMandatoryProperties:()=>assignMandatoryProperties,copyAstNode:()=>copyAstNode,findLocalReferences:()=>findLocalReferences,findRootNode:()=>findRootNode,getContainerOfType:()=>getContainerOfType,getDocument:()=>getDocument,hasContainerOfType:()=>hasContainerOfType,linkContentToContainer:()=>linkContentToContainer,streamAllContents:()=>streamAllContents,streamAst:()=>streamAst,streamContents:()=>streamContents,streamReferences:()=>streamReferences});function linkContentToContainer(t){for(let[n,i]of Object.entries(t))n.startsWith(`$`)||(Array.isArray(i)?i.forEach((i,o)=>{isAstNode(i)&&(i.$container=t,i.$containerProperty=n,i.$containerIndex=o)}):isAstNode(i)&&(i.$container=t,i.$containerProperty=n))}function getContainerOfType(t,n){let i=t;for(;i;){if(n(i))return i;i=i.$container}}function hasContainerOfType(t,n){let i=t;for(;i;){if(n(i))return!0;i=i.$container}return!1}function getDocument(t){let n=findRootNode(t).$document;if(!n)throw Error(`AST node has no document.`);return n}function findRootNode(t){for(;t.$container;)t=t.$container;return t}function streamContents(t,n){if(!t)throw Error(`Node must be an AstNode.`);let i=n?.range;return new vr(()=>({keys:Object.keys(t),keyIndex:0,arrayIndex:0}),n=>{for(;n.keyIndex<n.keys.length;){let o=n.keys[n.keyIndex];if(!o.startsWith(`$`)){let s=t[o];if(isAstNode(s)){if(n.keyIndex++,isAstNodeInRange(s,i))return{done:!1,value:s}}else if(Array.isArray(s)){for(;n.arrayIndex<s.length;){let t=s[n.arrayIndex++];if(isAstNode(t)&&isAstNodeInRange(t,i))return{done:!1,value:t}}n.arrayIndex=0}}n.keyIndex++}return Y})}function streamAllContents(t,n){if(!t)throw Error(`Root node must be an AstNode.`);return new TreeStreamImpl(t,t=>streamContents(t,n))}function streamAst(t,n){if(!t)throw Error(`Root node must be an AstNode.`);return n?.range&&!isAstNodeInRange(t,n.range)?new TreeStreamImpl(t,()=>[]):new TreeStreamImpl(t,t=>streamContents(t,n),{includeRoot:!0})}function isAstNodeInRange(t,n){if(!n)return!0;let i=t.$cstNode?.range;return i?inRange(i,n):!1}function streamReferences(t){return new vr(()=>({keys:Object.keys(t),keyIndex:0,arrayIndex:0}),n=>{for(;n.keyIndex<n.keys.length;){let i=n.keys[n.keyIndex];if(!i.startsWith(`$`)){let o=t[i];if(isReference(o))return n.keyIndex++,{done:!1,value:{reference:o,container:t,property:i}};if(Array.isArray(o)){for(;n.arrayIndex<o.length;){let s=n.arrayIndex++,c=o[s];if(isReference(c))return{done:!1,value:{reference:c,container:t,property:i,index:s}}}n.arrayIndex=0}}n.keyIndex++}return Y})}function findLocalReferences(t,n=getDocument(t).parseResult.value){let i=[];return streamAst(n).forEach(n=>{streamReferences(n).forEach(n=>{n.reference.ref===t&&i.push(n.reference)})}),stream(i)}function assignMandatoryProperties(t,n){let i=t.getTypeMetaData(n.$type),o=n;for(let t of i.properties)t.defaultValue!==void 0&&o[t.name]===void 0&&(o[t.name]=copyDefaultValue(t.defaultValue))}function copyDefaultValue(t){return Array.isArray(t)?[...t.map(copyDefaultValue)]:t}function copyAstNode(t,n){let i={$type:t.$type};for(let[o,s]of Object.entries(t))if(!o.startsWith(`$`))if(isAstNode(s))i[o]=copyAstNode(s,n);else if(isReference(s))i[o]=n(i,o,s.$refNode,s.$refText);else if(Array.isArray(s)){let t=[];for(let c of s)isAstNode(c)?t.push(copyAstNode(c,n)):isReference(c)?t.push(n(i,o,c.$refNode,c.$refText)):t.push(c);i[o]=t}else i[o]=s;return linkContentToContainer(i),i}var ErrorWithLocation=class extends Error{constructor(t,n){super(t?`${n} at ${t.range.start.line}:${t.range.start.character}`:n)}};function assertUnreachable(t){throw Error(`Error! The input value was not handled.`)}const wr=/\r?\n/gm,Tr=new p;var TerminalRegExpVisitor=class extends h{constructor(){super(...arguments),this.isStarting=!0,this.endRegexpStack=[],this.multiline=!1}get endRegex(){return this.endRegexpStack.join(``)}reset(t){this.multiline=!1,this.regex=t,this.startRegexp=``,this.isStarting=!0,this.endRegexpStack=[]}visitGroup(t){t.quantifier&&(this.isStarting=!1,this.endRegexpStack=[])}visitCharacter(t){let n=String.fromCharCode(t.value);if(!this.multiline&&n===`
16
+ `&&o++}i&&n.length>0&&t.push(n.length),this._lineOffsets=t}return this._lineOffsets}positionAt(t){t=Math.max(Math.min(t,this._content.length),0);let n=this.getLineOffsets(),i=0,o=n.length;if(o===0)return V.create(0,t);for(;i<o;){let s=Math.floor((i+o)/2);n[s]>t?o=s:i=s+1}let s=i-1;return V.create(s,t-n[s])}offsetAt(t){let n=this.getLineOffsets();if(t.line>=n.length)return this._content.length;if(t.line<0)return 0;let i=n[t.line],o=t.line+1<n.length?n[t.line+1]:this._content.length;return Math.max(Math.min(i+t.character,o),i)}get lineCount(){return this.getLineOffsets().length}},(function(t){let n=Object.prototype.toString;function defined(t){return t!==void 0}t.defined=defined;function undefined(t){return t===void 0}t.undefined=undefined;function boolean(t){return t===!0||t===!1}t.boolean=boolean;function string(t){return n.call(t)===`[object String]`}t.string=string;function number(t){return n.call(t)===`[object Number]`}t.number=number;function numberRange(t,i,o){return n.call(t)===`[object Number]`&&i<=t&&t<=o}t.numberRange=numberRange;function integer(t){return n.call(t)===`[object Number]`&&-2147483648<=t&&t<=2147483647}t.integer=integer;function uinteger(t){return n.call(t)===`[object Number]`&&0<=t&&t<=2147483647}t.uinteger=uinteger;function func(t){return n.call(t)===`[object Function]`}t.func=func;function objectLiteral(t){return typeof t==`object`&&!!t}t.objectLiteral=objectLiteral;function typedArray(t,n){return Array.isArray(t)&&t.every(n)}t.typedArray=typedArray})(G||={})})),K=f((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ProtocolNotificationType=t.ProtocolNotificationType0=t.ProtocolRequestType=t.ProtocolRequestType0=t.RegistrationType=t.MessageDirection=void 0;let n=L();var i;(function(t){t.clientToServer=`clientToServer`,t.serverToClient=`serverToClient`,t.both=`both`})(i||(t.MessageDirection=i={}));var RegistrationType=class{constructor(t){this.method=t}};t.RegistrationType=RegistrationType;var ProtocolRequestType0=class extends n.RequestType0{constructor(t){super(t)}};t.ProtocolRequestType0=ProtocolRequestType0;var ProtocolRequestType=class extends n.RequestType{constructor(t){super(t,n.ParameterStructures.byName)}};t.ProtocolRequestType=ProtocolRequestType;var ProtocolNotificationType0=class extends n.NotificationType0{constructor(t){super(t)}};t.ProtocolNotificationType0=ProtocolNotificationType0;var ProtocolNotificationType=class extends n.NotificationType{constructor(t){super(t,n.ParameterStructures.byName)}};t.ProtocolNotificationType=ProtocolNotificationType})),jt=f((t=>{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;function boolean(t){return t===!0||t===!1}t.boolean=boolean;function string(t){return typeof t==`string`||t instanceof String}t.string=string;function number(t){return typeof t==`number`||t instanceof Number}t.number=number;function error(t){return t instanceof Error}t.error=error;function func(t){return typeof t==`function`}t.func=func;function array(t){return Array.isArray(t)}t.array=array;function stringArray(t){return array(t)&&t.every(t=>string(t))}t.stringArray=stringArray;function typedArray(t,n){return Array.isArray(t)&&t.every(n)}t.typedArray=typedArray;function objectLiteral(t){return typeof t==`object`&&!!t}t.objectLiteral=objectLiteral})),Mt=f((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ImplementationRequest=void 0;let n=K();var i;(function(t){t.method=`textDocument/implementation`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(i||(t.ImplementationRequest=i={}))})),Nt=f((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TypeDefinitionRequest=void 0;let n=K();var i;(function(t){t.method=`textDocument/typeDefinition`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(i||(t.TypeDefinitionRequest=i={}))})),Pt=f((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DidChangeWorkspaceFoldersNotification=t.WorkspaceFoldersRequest=void 0;let n=K();var i;(function(t){t.method=`workspace/workspaceFolders`,t.messageDirection=n.MessageDirection.serverToClient,t.type=new n.ProtocolRequestType0(t.method)})(i||(t.WorkspaceFoldersRequest=i={}));var o;(function(t){t.method=`workspace/didChangeWorkspaceFolders`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolNotificationType(t.method)})(o||(t.DidChangeWorkspaceFoldersNotification=o={}))})),Ft=f((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigurationRequest=void 0;let n=K();var i;(function(t){t.method=`workspace/configuration`,t.messageDirection=n.MessageDirection.serverToClient,t.type=new n.ProtocolRequestType(t.method)})(i||(t.ConfigurationRequest=i={}))})),It=f((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ColorPresentationRequest=t.DocumentColorRequest=void 0;let n=K();var i;(function(t){t.method=`textDocument/documentColor`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(i||(t.DocumentColorRequest=i={}));var o;(function(t){t.method=`textDocument/colorPresentation`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(o||(t.ColorPresentationRequest=o={}))})),Lt=f((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FoldingRangeRefreshRequest=t.FoldingRangeRequest=void 0;let n=K();var i;(function(t){t.method=`textDocument/foldingRange`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(i||(t.FoldingRangeRequest=i={}));var o;(function(t){t.method=`workspace/foldingRange/refresh`,t.messageDirection=n.MessageDirection.serverToClient,t.type=new n.ProtocolRequestType0(t.method)})(o||(t.FoldingRangeRefreshRequest=o={}))})),Rt=f((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DeclarationRequest=void 0;let n=K();var i;(function(t){t.method=`textDocument/declaration`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(i||(t.DeclarationRequest=i={}))})),zt=f((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SelectionRangeRequest=void 0;let n=K();var i;(function(t){t.method=`textDocument/selectionRange`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(i||(t.SelectionRangeRequest=i={}))})),Bt=f((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.WorkDoneProgressCancelNotification=t.WorkDoneProgressCreateRequest=t.WorkDoneProgress=void 0;let n=L(),i=K();var o;(function(t){t.type=new n.ProgressType;function is(n){return n===t.type}t.is=is})(o||(t.WorkDoneProgress=o={}));var s;(function(t){t.method=`window/workDoneProgress/create`,t.messageDirection=i.MessageDirection.serverToClient,t.type=new i.ProtocolRequestType(t.method)})(s||(t.WorkDoneProgressCreateRequest=s={}));var c;(function(t){t.method=`window/workDoneProgress/cancel`,t.messageDirection=i.MessageDirection.clientToServer,t.type=new i.ProtocolNotificationType(t.method)})(c||(t.WorkDoneProgressCancelNotification=c={}))})),Vt=f((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CallHierarchyOutgoingCallsRequest=t.CallHierarchyIncomingCallsRequest=t.CallHierarchyPrepareRequest=void 0;let n=K();var i;(function(t){t.method=`textDocument/prepareCallHierarchy`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(i||(t.CallHierarchyPrepareRequest=i={}));var o;(function(t){t.method=`callHierarchy/incomingCalls`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(o||(t.CallHierarchyIncomingCallsRequest=o={}));var s;(function(t){t.method=`callHierarchy/outgoingCalls`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(s||(t.CallHierarchyOutgoingCallsRequest=s={}))})),Ht=f((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SemanticTokensRefreshRequest=t.SemanticTokensRangeRequest=t.SemanticTokensDeltaRequest=t.SemanticTokensRequest=t.SemanticTokensRegistrationType=t.TokenFormat=void 0;let n=K();var i;(function(t){t.Relative=`relative`})(i||(t.TokenFormat=i={}));var o;(function(t){t.method=`textDocument/semanticTokens`,t.type=new n.RegistrationType(t.method)})(o||(t.SemanticTokensRegistrationType=o={}));var s;(function(t){t.method=`textDocument/semanticTokens/full`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method),t.registrationMethod=o.method})(s||(t.SemanticTokensRequest=s={}));var c;(function(t){t.method=`textDocument/semanticTokens/full/delta`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method),t.registrationMethod=o.method})(c||(t.SemanticTokensDeltaRequest=c={}));var u;(function(t){t.method=`textDocument/semanticTokens/range`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method),t.registrationMethod=o.method})(u||(t.SemanticTokensRangeRequest=u={}));var f;(function(t){t.method=`workspace/semanticTokens/refresh`,t.messageDirection=n.MessageDirection.serverToClient,t.type=new n.ProtocolRequestType0(t.method)})(f||(t.SemanticTokensRefreshRequest=f={}))})),Ut=f((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ShowDocumentRequest=void 0;let n=K();var i;(function(t){t.method=`window/showDocument`,t.messageDirection=n.MessageDirection.serverToClient,t.type=new n.ProtocolRequestType(t.method)})(i||(t.ShowDocumentRequest=i={}))})),Wt=f((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LinkedEditingRangeRequest=void 0;let n=K();var i;(function(t){t.method=`textDocument/linkedEditingRange`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(i||(t.LinkedEditingRangeRequest=i={}))})),Gt=f((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.WillDeleteFilesRequest=t.DidDeleteFilesNotification=t.DidRenameFilesNotification=t.WillRenameFilesRequest=t.DidCreateFilesNotification=t.WillCreateFilesRequest=t.FileOperationPatternKind=void 0;let n=K();var i;(function(t){t.file=`file`,t.folder=`folder`})(i||(t.FileOperationPatternKind=i={}));var o;(function(t){t.method=`workspace/willCreateFiles`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(o||(t.WillCreateFilesRequest=o={}));var s;(function(t){t.method=`workspace/didCreateFiles`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolNotificationType(t.method)})(s||(t.DidCreateFilesNotification=s={}));var c;(function(t){t.method=`workspace/willRenameFiles`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(c||(t.WillRenameFilesRequest=c={}));var u;(function(t){t.method=`workspace/didRenameFiles`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolNotificationType(t.method)})(u||(t.DidRenameFilesNotification=u={}));var f;(function(t){t.method=`workspace/didDeleteFiles`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolNotificationType(t.method)})(f||(t.DidDeleteFilesNotification=f={}));var p;(function(t){t.method=`workspace/willDeleteFiles`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(p||(t.WillDeleteFilesRequest=p={}))})),Kt=f((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MonikerRequest=t.MonikerKind=t.UniquenessLevel=void 0;let n=K();var i;(function(t){t.document=`document`,t.project=`project`,t.group=`group`,t.scheme=`scheme`,t.global=`global`})(i||(t.UniquenessLevel=i={}));var o;(function(t){t.$import=`import`,t.$export=`export`,t.local=`local`})(o||(t.MonikerKind=o={}));var s;(function(t){t.method=`textDocument/moniker`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(s||(t.MonikerRequest=s={}))})),qt=f((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TypeHierarchySubtypesRequest=t.TypeHierarchySupertypesRequest=t.TypeHierarchyPrepareRequest=void 0;let n=K();var i;(function(t){t.method=`textDocument/prepareTypeHierarchy`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(i||(t.TypeHierarchyPrepareRequest=i={}));var o;(function(t){t.method=`typeHierarchy/supertypes`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(o||(t.TypeHierarchySupertypesRequest=o={}));var s;(function(t){t.method=`typeHierarchy/subtypes`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(s||(t.TypeHierarchySubtypesRequest=s={}))})),Jt=f((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.InlineValueRefreshRequest=t.InlineValueRequest=void 0;let n=K();var i;(function(t){t.method=`textDocument/inlineValue`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(i||(t.InlineValueRequest=i={}));var o;(function(t){t.method=`workspace/inlineValue/refresh`,t.messageDirection=n.MessageDirection.serverToClient,t.type=new n.ProtocolRequestType0(t.method)})(o||(t.InlineValueRefreshRequest=o={}))})),Yt=f((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.InlayHintRefreshRequest=t.InlayHintResolveRequest=t.InlayHintRequest=void 0;let n=K();var i;(function(t){t.method=`textDocument/inlayHint`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(i||(t.InlayHintRequest=i={}));var o;(function(t){t.method=`inlayHint/resolve`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(o||(t.InlayHintResolveRequest=o={}));var s;(function(t){t.method=`workspace/inlayHint/refresh`,t.messageDirection=n.MessageDirection.serverToClient,t.type=new n.ProtocolRequestType0(t.method)})(s||(t.InlayHintRefreshRequest=s={}))})),Xt=f((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DiagnosticRefreshRequest=t.WorkspaceDiagnosticRequest=t.DocumentDiagnosticRequest=t.DocumentDiagnosticReportKind=t.DiagnosticServerCancellationData=void 0;let n=L(),i=jt(),o=K();var s;(function(t){function is(t){let n=t;return n&&i.boolean(n.retriggerRequest)}t.is=is})(s||(t.DiagnosticServerCancellationData=s={}));var c;(function(t){t.Full=`full`,t.Unchanged=`unchanged`})(c||(t.DocumentDiagnosticReportKind=c={}));var u;(function(t){t.method=`textDocument/diagnostic`,t.messageDirection=o.MessageDirection.clientToServer,t.type=new o.ProtocolRequestType(t.method),t.partialResult=new n.ProgressType})(u||(t.DocumentDiagnosticRequest=u={}));var f;(function(t){t.method=`workspace/diagnostic`,t.messageDirection=o.MessageDirection.clientToServer,t.type=new o.ProtocolRequestType(t.method),t.partialResult=new n.ProgressType})(f||(t.WorkspaceDiagnosticRequest=f={}));var p;(function(t){t.method=`workspace/diagnostic/refresh`,t.messageDirection=o.MessageDirection.serverToClient,t.type=new o.ProtocolRequestType0(t.method)})(p||(t.DiagnosticRefreshRequest=p={}))})),Zt=f((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DidCloseNotebookDocumentNotification=t.DidSaveNotebookDocumentNotification=t.DidChangeNotebookDocumentNotification=t.NotebookCellArrayChange=t.DidOpenNotebookDocumentNotification=t.NotebookDocumentSyncRegistrationType=t.NotebookDocument=t.NotebookCell=t.ExecutionSummary=t.NotebookCellKind=void 0;let n=(At(),u(ue)),i=jt(),o=K();var s;(function(t){t.Markup=1,t.Code=2;function is(t){return t===1||t===2}t.is=is})(s||(t.NotebookCellKind=s={}));var c;(function(t){function create(t,n){let i={executionOrder:t};return(n===!0||n===!1)&&(i.success=n),i}t.create=create;function is(t){let o=t;return i.objectLiteral(o)&&n.uinteger.is(o.executionOrder)&&(o.success===void 0||i.boolean(o.success))}t.is=is;function equals(t,n){return t===n?!0:t==null||n==null?!1:t.executionOrder===n.executionOrder&&t.success===n.success}t.equals=equals})(c||(t.ExecutionSummary=c={}));var f;(function(t){function create(t,n){return{kind:t,document:n}}t.create=create;function is(t){let o=t;return i.objectLiteral(o)&&s.is(o.kind)&&n.DocumentUri.is(o.document)&&(o.metadata===void 0||i.objectLiteral(o.metadata))}t.is=is;function diff(t,n){let i=new Set;return t.document!==n.document&&i.add(`document`),t.kind!==n.kind&&i.add(`kind`),t.executionSummary!==n.executionSummary&&i.add(`executionSummary`),(t.metadata!==void 0||n.metadata!==void 0)&&!equalsMetadata(t.metadata,n.metadata)&&i.add(`metadata`),(t.executionSummary!==void 0||n.executionSummary!==void 0)&&!c.equals(t.executionSummary,n.executionSummary)&&i.add(`executionSummary`),i}t.diff=diff;function equalsMetadata(t,n){if(t===n)return!0;if(t==null||n==null||typeof t!=typeof n||typeof t!=`object`)return!1;let o=Array.isArray(t),s=Array.isArray(n);if(o!==s)return!1;if(o&&s){if(t.length!==n.length)return!1;for(let i=0;i<t.length;i++)if(!equalsMetadata(t[i],n[i]))return!1}if(i.objectLiteral(t)&&i.objectLiteral(n)){let i=Object.keys(t),o=Object.keys(n);if(i.length!==o.length||(i.sort(),o.sort(),!equalsMetadata(i,o)))return!1;for(let o=0;o<i.length;o++){let s=i[o];if(!equalsMetadata(t[s],n[s]))return!1}}return!0}})(f||(t.NotebookCell=f={}));var p;(function(t){function create(t,n,i,o){return{uri:t,notebookType:n,version:i,cells:o}}t.create=create;function is(t){let o=t;return i.objectLiteral(o)&&i.string(o.uri)&&n.integer.is(o.version)&&i.typedArray(o.cells,f.is)}t.is=is})(p||(t.NotebookDocument=p={}));var h;(function(t){t.method=`notebookDocument/sync`,t.messageDirection=o.MessageDirection.clientToServer,t.type=new o.RegistrationType(t.method)})(h||(t.NotebookDocumentSyncRegistrationType=h={}));var g;(function(t){t.method=`notebookDocument/didOpen`,t.messageDirection=o.MessageDirection.clientToServer,t.type=new o.ProtocolNotificationType(t.method),t.registrationMethod=h.method})(g||(t.DidOpenNotebookDocumentNotification=g={}));var _;(function(t){function is(t){let o=t;return i.objectLiteral(o)&&n.uinteger.is(o.start)&&n.uinteger.is(o.deleteCount)&&(o.cells===void 0||i.typedArray(o.cells,f.is))}t.is=is;function create(t,n,i){let o={start:t,deleteCount:n};return i!==void 0&&(o.cells=i),o}t.create=create})(_||(t.NotebookCellArrayChange=_={}));var x;(function(t){t.method=`notebookDocument/didChange`,t.messageDirection=o.MessageDirection.clientToServer,t.type=new o.ProtocolNotificationType(t.method),t.registrationMethod=h.method})(x||(t.DidChangeNotebookDocumentNotification=x={}));var S;(function(t){t.method=`notebookDocument/didSave`,t.messageDirection=o.MessageDirection.clientToServer,t.type=new o.ProtocolNotificationType(t.method),t.registrationMethod=h.method})(S||(t.DidSaveNotebookDocumentNotification=S={}));var T;(function(t){t.method=`notebookDocument/didClose`,t.messageDirection=o.MessageDirection.clientToServer,t.type=new o.ProtocolNotificationType(t.method),t.registrationMethod=h.method})(T||(t.DidCloseNotebookDocumentNotification=T={}))})),Qt=f((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.InlineCompletionRequest=void 0;let n=K();var i;(function(t){t.method=`textDocument/inlineCompletion`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(i||(t.InlineCompletionRequest=i={}))})),$t=f((t=>{Object.defineProperty(t,"__esModule",{value:!0}),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.RelativePattern=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.InitializeErrorCodes=t.InitializeRequest=t.WorkDoneProgressOptions=t.TextDocumentRegistrationOptions=t.StaticRegistrationOptions=t.PositionEncodingKind=t.FailureHandlingKind=t.ResourceOperationKind=t.UnregistrationRequest=t.RegistrationRequest=t.DocumentSelector=t.NotebookCellTextDocumentFilter=t.NotebookDocumentFilter=t.TextDocumentFilter=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.CallHierarchyPrepareRequest=t.CallHierarchyOutgoingCallsRequest=t.CallHierarchyIncomingCallsRequest=t.WorkDoneProgressCancelNotification=t.WorkDoneProgressCreateRequest=t.WorkDoneProgress=t.SelectionRangeRequest=t.DeclarationRequest=t.FoldingRangeRefreshRequest=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.DocumentRangesFormattingRequest=t.DocumentRangeFormattingRequest=t.DocumentFormattingRequest=t.DocumentLinkResolveRequest=t.DocumentLinkRequest=t.CodeLensRefreshRequest=t.CodeLensResolveRequest=t.CodeLensRequest=t.WorkspaceSymbolResolveRequest=void 0,t.InlineCompletionRequest=t.DidCloseNotebookDocumentNotification=t.DidSaveNotebookDocumentNotification=t.DidChangeNotebookDocumentNotification=t.NotebookCellArrayChange=t.DidOpenNotebookDocumentNotification=t.NotebookDocumentSyncRegistrationType=t.NotebookDocument=t.NotebookCell=t.ExecutionSummary=t.NotebookCellKind=t.DiagnosticRefreshRequest=t.WorkspaceDiagnosticRequest=t.DocumentDiagnosticRequest=t.DocumentDiagnosticReportKind=t.DiagnosticServerCancellationData=t.InlayHintRefreshRequest=t.InlayHintResolveRequest=t.InlayHintRequest=t.InlineValueRefreshRequest=t.InlineValueRequest=t.TypeHierarchySupertypesRequest=t.TypeHierarchySubtypesRequest=t.TypeHierarchyPrepareRequest=void 0;let n=K(),i=(At(),u(ue)),o=jt(),s=Mt();Object.defineProperty(t,"ImplementationRequest",{enumerable:!0,get:function(){return s.ImplementationRequest}});let c=Nt();Object.defineProperty(t,"TypeDefinitionRequest",{enumerable:!0,get:function(){return c.TypeDefinitionRequest}});let f=Pt();Object.defineProperty(t,"WorkspaceFoldersRequest",{enumerable:!0,get:function(){return f.WorkspaceFoldersRequest}}),Object.defineProperty(t,"DidChangeWorkspaceFoldersNotification",{enumerable:!0,get:function(){return f.DidChangeWorkspaceFoldersNotification}});let p=Ft();Object.defineProperty(t,"ConfigurationRequest",{enumerable:!0,get:function(){return p.ConfigurationRequest}});let h=It();Object.defineProperty(t,"DocumentColorRequest",{enumerable:!0,get:function(){return h.DocumentColorRequest}}),Object.defineProperty(t,"ColorPresentationRequest",{enumerable:!0,get:function(){return h.ColorPresentationRequest}});let g=Lt();Object.defineProperty(t,"FoldingRangeRequest",{enumerable:!0,get:function(){return g.FoldingRangeRequest}}),Object.defineProperty(t,"FoldingRangeRefreshRequest",{enumerable:!0,get:function(){return g.FoldingRangeRefreshRequest}});let _=Rt();Object.defineProperty(t,"DeclarationRequest",{enumerable:!0,get:function(){return _.DeclarationRequest}});let x=zt();Object.defineProperty(t,"SelectionRangeRequest",{enumerable:!0,get:function(){return x.SelectionRangeRequest}});let S=Bt();Object.defineProperty(t,"WorkDoneProgress",{enumerable:!0,get:function(){return S.WorkDoneProgress}}),Object.defineProperty(t,"WorkDoneProgressCreateRequest",{enumerable:!0,get:function(){return S.WorkDoneProgressCreateRequest}}),Object.defineProperty(t,"WorkDoneProgressCancelNotification",{enumerable:!0,get:function(){return S.WorkDoneProgressCancelNotification}});let T=Vt();Object.defineProperty(t,"CallHierarchyIncomingCallsRequest",{enumerable:!0,get:function(){return T.CallHierarchyIncomingCallsRequest}}),Object.defineProperty(t,"CallHierarchyOutgoingCallsRequest",{enumerable:!0,get:function(){return T.CallHierarchyOutgoingCallsRequest}}),Object.defineProperty(t,"CallHierarchyPrepareRequest",{enumerable:!0,get:function(){return T.CallHierarchyPrepareRequest}});let E=Ht();Object.defineProperty(t,"TokenFormat",{enumerable:!0,get:function(){return E.TokenFormat}}),Object.defineProperty(t,"SemanticTokensRequest",{enumerable:!0,get:function(){return E.SemanticTokensRequest}}),Object.defineProperty(t,"SemanticTokensDeltaRequest",{enumerable:!0,get:function(){return E.SemanticTokensDeltaRequest}}),Object.defineProperty(t,"SemanticTokensRangeRequest",{enumerable:!0,get:function(){return E.SemanticTokensRangeRequest}}),Object.defineProperty(t,"SemanticTokensRefreshRequest",{enumerable:!0,get:function(){return E.SemanticTokensRefreshRequest}}),Object.defineProperty(t,"SemanticTokensRegistrationType",{enumerable:!0,get:function(){return E.SemanticTokensRegistrationType}});let D=Ut();Object.defineProperty(t,"ShowDocumentRequest",{enumerable:!0,get:function(){return D.ShowDocumentRequest}});let ee=Wt();Object.defineProperty(t,"LinkedEditingRangeRequest",{enumerable:!0,get:function(){return ee.LinkedEditingRangeRequest}});let O=Gt();Object.defineProperty(t,"FileOperationPatternKind",{enumerable:!0,get:function(){return O.FileOperationPatternKind}}),Object.defineProperty(t,"DidCreateFilesNotification",{enumerable:!0,get:function(){return O.DidCreateFilesNotification}}),Object.defineProperty(t,"WillCreateFilesRequest",{enumerable:!0,get:function(){return O.WillCreateFilesRequest}}),Object.defineProperty(t,"DidRenameFilesNotification",{enumerable:!0,get:function(){return O.DidRenameFilesNotification}}),Object.defineProperty(t,"WillRenameFilesRequest",{enumerable:!0,get:function(){return O.WillRenameFilesRequest}}),Object.defineProperty(t,"DidDeleteFilesNotification",{enumerable:!0,get:function(){return O.DidDeleteFilesNotification}}),Object.defineProperty(t,"WillDeleteFilesRequest",{enumerable:!0,get:function(){return O.WillDeleteFilesRequest}});let k=Kt();Object.defineProperty(t,"UniquenessLevel",{enumerable:!0,get:function(){return k.UniquenessLevel}}),Object.defineProperty(t,"MonikerKind",{enumerable:!0,get:function(){return k.MonikerKind}}),Object.defineProperty(t,"MonikerRequest",{enumerable:!0,get:function(){return k.MonikerRequest}});let A=qt();Object.defineProperty(t,"TypeHierarchyPrepareRequest",{enumerable:!0,get:function(){return A.TypeHierarchyPrepareRequest}}),Object.defineProperty(t,"TypeHierarchySubtypesRequest",{enumerable:!0,get:function(){return A.TypeHierarchySubtypesRequest}}),Object.defineProperty(t,"TypeHierarchySupertypesRequest",{enumerable:!0,get:function(){return A.TypeHierarchySupertypesRequest}});let te=Jt();Object.defineProperty(t,"InlineValueRequest",{enumerable:!0,get:function(){return te.InlineValueRequest}}),Object.defineProperty(t,"InlineValueRefreshRequest",{enumerable:!0,get:function(){return te.InlineValueRefreshRequest}});let j=Yt();Object.defineProperty(t,"InlayHintRequest",{enumerable:!0,get:function(){return j.InlayHintRequest}}),Object.defineProperty(t,"InlayHintResolveRequest",{enumerable:!0,get:function(){return j.InlayHintResolveRequest}}),Object.defineProperty(t,"InlayHintRefreshRequest",{enumerable:!0,get:function(){return j.InlayHintRefreshRequest}});let ne=Xt();Object.defineProperty(t,"DiagnosticServerCancellationData",{enumerable:!0,get:function(){return ne.DiagnosticServerCancellationData}}),Object.defineProperty(t,"DocumentDiagnosticReportKind",{enumerable:!0,get:function(){return ne.DocumentDiagnosticReportKind}}),Object.defineProperty(t,"DocumentDiagnosticRequest",{enumerable:!0,get:function(){return ne.DocumentDiagnosticRequest}}),Object.defineProperty(t,"WorkspaceDiagnosticRequest",{enumerable:!0,get:function(){return ne.WorkspaceDiagnosticRequest}}),Object.defineProperty(t,"DiagnosticRefreshRequest",{enumerable:!0,get:function(){return ne.DiagnosticRefreshRequest}});let M=Zt();Object.defineProperty(t,"NotebookCellKind",{enumerable:!0,get:function(){return M.NotebookCellKind}}),Object.defineProperty(t,"ExecutionSummary",{enumerable:!0,get:function(){return M.ExecutionSummary}}),Object.defineProperty(t,"NotebookCell",{enumerable:!0,get:function(){return M.NotebookCell}}),Object.defineProperty(t,"NotebookDocument",{enumerable:!0,get:function(){return M.NotebookDocument}}),Object.defineProperty(t,"NotebookDocumentSyncRegistrationType",{enumerable:!0,get:function(){return M.NotebookDocumentSyncRegistrationType}}),Object.defineProperty(t,"DidOpenNotebookDocumentNotification",{enumerable:!0,get:function(){return M.DidOpenNotebookDocumentNotification}}),Object.defineProperty(t,"NotebookCellArrayChange",{enumerable:!0,get:function(){return M.NotebookCellArrayChange}}),Object.defineProperty(t,"DidChangeNotebookDocumentNotification",{enumerable:!0,get:function(){return M.DidChangeNotebookDocumentNotification}}),Object.defineProperty(t,"DidSaveNotebookDocumentNotification",{enumerable:!0,get:function(){return M.DidSaveNotebookDocumentNotification}}),Object.defineProperty(t,"DidCloseNotebookDocumentNotification",{enumerable:!0,get:function(){return M.DidCloseNotebookDocumentNotification}});let re=Qt();Object.defineProperty(t,"InlineCompletionRequest",{enumerable:!0,get:function(){return re.InlineCompletionRequest}});var N;(function(t){function is(t){let n=t;return o.string(n)||o.string(n.language)||o.string(n.scheme)||o.string(n.pattern)}t.is=is})(N||(t.TextDocumentFilter=N={}));var P;(function(t){function is(t){let n=t;return o.objectLiteral(n)&&(o.string(n.notebookType)||o.string(n.scheme)||o.string(n.pattern))}t.is=is})(P||(t.NotebookDocumentFilter=P={}));var F;(function(t){function is(t){let n=t;return o.objectLiteral(n)&&(o.string(n.notebook)||P.is(n.notebook))&&(n.language===void 0||o.string(n.language))}t.is=is})(F||(t.NotebookCellTextDocumentFilter=F={}));var ie;(function(t){function is(t){if(!Array.isArray(t))return!1;for(let n of t)if(!o.string(n)&&!N.is(n)&&!F.is(n))return!1;return!0}t.is=is})(ie||(t.DocumentSelector=ie={}));var ae;(function(t){t.method=`client/registerCapability`,t.messageDirection=n.MessageDirection.serverToClient,t.type=new n.ProtocolRequestType(t.method)})(ae||(t.RegistrationRequest=ae={}));var oe;(function(t){t.method=`client/unregisterCapability`,t.messageDirection=n.MessageDirection.serverToClient,t.type=new n.ProtocolRequestType(t.method)})(oe||(t.UnregistrationRequest=oe={}));var I;(function(t){t.Create=`create`,t.Rename=`rename`,t.Delete=`delete`})(I||(t.ResourceOperationKind=I={}));var se;(function(t){t.Abort=`abort`,t.Transactional=`transactional`,t.TextOnlyTransactional=`textOnlyTransactional`,t.Undo=`undo`})(se||(t.FailureHandlingKind=se={}));var ce;(function(t){t.UTF8=`utf-8`,t.UTF16=`utf-16`,t.UTF32=`utf-32`})(ce||(t.PositionEncodingKind=ce={}));var L;(function(t){function hasId(t){let n=t;return n&&o.string(n.id)&&n.id.length>0}t.hasId=hasId})(L||(t.StaticRegistrationOptions=L={}));var le;(function(t){function is(t){let n=t;return n&&(n.documentSelector===null||ie.is(n.documentSelector))}t.is=is})(le||(t.TextDocumentRegistrationOptions=le={}));var R;(function(t){function is(t){let n=t;return o.objectLiteral(n)&&(n.workDoneProgress===void 0||o.boolean(n.workDoneProgress))}t.is=is;function hasWorkDoneProgress(t){let n=t;return n&&o.boolean(n.workDoneProgress)}t.hasWorkDoneProgress=hasWorkDoneProgress})(R||(t.WorkDoneProgressOptions=R={}));var z;(function(t){t.method=`initialize`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(z||(t.InitializeRequest=z={}));var de;(function(t){t.unknownProtocolVersion=1})(de||(t.InitializeErrorCodes=de={}));var B;(function(t){t.method=`initialized`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolNotificationType(t.method)})(B||(t.InitializedNotification=B={}));var V;(function(t){t.method=`shutdown`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType0(t.method)})(V||(t.ShutdownRequest=V={}));var H;(function(t){t.method=`exit`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolNotificationType0(t.method)})(H||(t.ExitNotification=H={}));var fe;(function(t){t.method=`workspace/didChangeConfiguration`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolNotificationType(t.method)})(fe||(t.DidChangeConfigurationNotification=fe={}));var pe;(function(t){t.Error=1,t.Warning=2,t.Info=3,t.Log=4,t.Debug=5})(pe||(t.MessageType=pe={}));var me;(function(t){t.method=`window/showMessage`,t.messageDirection=n.MessageDirection.serverToClient,t.type=new n.ProtocolNotificationType(t.method)})(me||(t.ShowMessageNotification=me={}));var he;(function(t){t.method=`window/showMessageRequest`,t.messageDirection=n.MessageDirection.serverToClient,t.type=new n.ProtocolRequestType(t.method)})(he||(t.ShowMessageRequest=he={}));var ge;(function(t){t.method=`window/logMessage`,t.messageDirection=n.MessageDirection.serverToClient,t.type=new n.ProtocolNotificationType(t.method)})(ge||(t.LogMessageNotification=ge={}));var _e;(function(t){t.method=`telemetry/event`,t.messageDirection=n.MessageDirection.serverToClient,t.type=new n.ProtocolNotificationType(t.method)})(_e||(t.TelemetryEventNotification=_e={}));var ve;(function(t){t.None=0,t.Full=1,t.Incremental=2})(ve||(t.TextDocumentSyncKind=ve={}));var ye;(function(t){t.method=`textDocument/didOpen`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolNotificationType(t.method)})(ye||(t.DidOpenTextDocumentNotification=ye={}));var be;(function(t){function isIncremental(t){let n=t;return n!=null&&typeof n.text==`string`&&n.range!==void 0&&(n.rangeLength===void 0||typeof n.rangeLength==`number`)}t.isIncremental=isIncremental;function isFull(t){let n=t;return n!=null&&typeof n.text==`string`&&n.range===void 0&&n.rangeLength===void 0}t.isFull=isFull})(be||(t.TextDocumentContentChangeEvent=be={}));var xe;(function(t){t.method=`textDocument/didChange`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolNotificationType(t.method)})(xe||(t.DidChangeTextDocumentNotification=xe={}));var Se;(function(t){t.method=`textDocument/didClose`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolNotificationType(t.method)})(Se||(t.DidCloseTextDocumentNotification=Se={}));var Ce;(function(t){t.method=`textDocument/didSave`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolNotificationType(t.method)})(Ce||(t.DidSaveTextDocumentNotification=Ce={}));var we;(function(t){t.Manual=1,t.AfterDelay=2,t.FocusOut=3})(we||(t.TextDocumentSaveReason=we={}));var U;(function(t){t.method=`textDocument/willSave`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolNotificationType(t.method)})(U||(t.WillSaveTextDocumentNotification=U={}));var Te;(function(t){t.method=`textDocument/willSaveWaitUntil`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(Te||(t.WillSaveTextDocumentWaitUntilRequest=Te={}));var W;(function(t){t.method=`workspace/didChangeWatchedFiles`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolNotificationType(t.method)})(W||(t.DidChangeWatchedFilesNotification=W={}));var Ee;(function(t){t.Created=1,t.Changed=2,t.Deleted=3})(Ee||(t.FileChangeType=Ee={}));var De;(function(t){function is(t){let n=t;return o.objectLiteral(n)&&(i.URI.is(n.baseUri)||i.WorkspaceFolder.is(n.baseUri))&&o.string(n.pattern)}t.is=is})(De||(t.RelativePattern=De={}));var Oe;(function(t){t.Create=1,t.Change=2,t.Delete=4})(Oe||(t.WatchKind=Oe={}));var ke;(function(t){t.method=`textDocument/publishDiagnostics`,t.messageDirection=n.MessageDirection.serverToClient,t.type=new n.ProtocolNotificationType(t.method)})(ke||(t.PublishDiagnosticsNotification=ke={}));var Ae;(function(t){t.Invoked=1,t.TriggerCharacter=2,t.TriggerForIncompleteCompletions=3})(Ae||(t.CompletionTriggerKind=Ae={}));var je;(function(t){t.method=`textDocument/completion`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(je||(t.CompletionRequest=je={}));var Me;(function(t){t.method=`completionItem/resolve`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(Me||(t.CompletionResolveRequest=Me={}));var Ne;(function(t){t.method=`textDocument/hover`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(Ne||(t.HoverRequest=Ne={}));var Pe;(function(t){t.Invoked=1,t.TriggerCharacter=2,t.ContentChange=3})(Pe||(t.SignatureHelpTriggerKind=Pe={}));var Fe;(function(t){t.method=`textDocument/signatureHelp`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(Fe||(t.SignatureHelpRequest=Fe={}));var Ie;(function(t){t.method=`textDocument/definition`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(Ie||(t.DefinitionRequest=Ie={}));var Le;(function(t){t.method=`textDocument/references`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(Le||(t.ReferencesRequest=Le={}));var Re;(function(t){t.method=`textDocument/documentHighlight`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(Re||(t.DocumentHighlightRequest=Re={}));var ze;(function(t){t.method=`textDocument/documentSymbol`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(ze||(t.DocumentSymbolRequest=ze={}));var Be;(function(t){t.method=`textDocument/codeAction`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(Be||(t.CodeActionRequest=Be={}));var Ve;(function(t){t.method=`codeAction/resolve`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(Ve||(t.CodeActionResolveRequest=Ve={}));var He;(function(t){t.method=`workspace/symbol`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(He||(t.WorkspaceSymbolRequest=He={}));var Ue;(function(t){t.method=`workspaceSymbol/resolve`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(Ue||(t.WorkspaceSymbolResolveRequest=Ue={}));var We;(function(t){t.method=`textDocument/codeLens`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(We||(t.CodeLensRequest=We={}));var Ge;(function(t){t.method=`codeLens/resolve`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(Ge||(t.CodeLensResolveRequest=Ge={}));var Ke;(function(t){t.method=`workspace/codeLens/refresh`,t.messageDirection=n.MessageDirection.serverToClient,t.type=new n.ProtocolRequestType0(t.method)})(Ke||(t.CodeLensRefreshRequest=Ke={}));var qe;(function(t){t.method=`textDocument/documentLink`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(qe||(t.DocumentLinkRequest=qe={}));var Je;(function(t){t.method=`documentLink/resolve`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(Je||(t.DocumentLinkResolveRequest=Je={}));var Ye;(function(t){t.method=`textDocument/formatting`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(Ye||(t.DocumentFormattingRequest=Ye={}));var Xe;(function(t){t.method=`textDocument/rangeFormatting`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(Xe||(t.DocumentRangeFormattingRequest=Xe={}));var Ze;(function(t){t.method=`textDocument/rangesFormatting`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(Ze||(t.DocumentRangesFormattingRequest=Ze={}));var Qe;(function(t){t.method=`textDocument/onTypeFormatting`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(Qe||(t.DocumentOnTypeFormattingRequest=Qe={}));var $e;(function(t){t.Identifier=1})($e||(t.PrepareSupportDefaultBehavior=$e={}));var et;(function(t){t.method=`textDocument/rename`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(et||(t.RenameRequest=et={}));var tt;(function(t){t.method=`textDocument/prepareRename`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(tt||(t.PrepareRenameRequest=tt={}));var nt;(function(t){t.method=`workspace/executeCommand`,t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)})(nt||(t.ExecuteCommandRequest=nt={}));var rt;(function(t){t.method=`workspace/applyEdit`,t.messageDirection=n.MessageDirection.serverToClient,t.type=new n.ProtocolRequestType(`workspace/applyEdit`)})(rt||(t.ApplyWorkspaceEditRequest=rt={}))})),en=f((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.createProtocolConnection=void 0;let n=L();function createProtocolConnection(t,i,o,s){return n.ConnectionStrategy.is(s)&&(s={connectionStrategy:s}),(0,n.createMessageConnection)(t,i,o,s)}t.createProtocolConnection=createProtocolConnection})),tn=f((t=>{var n=t&&t.__createBinding||(Object.create?(function(t,n,i,o){o===void 0&&(o=i);var s=Object.getOwnPropertyDescriptor(n,i);(!s||(`get`in s?!n.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return n[i]}}),Object.defineProperty(t,o,s)}):(function(t,n,i,o){o===void 0&&(o=i),t[o]=n[i]})),i=t&&t.__exportStar||function(t,i){for(var o in t)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&n(i,t,o)};Object.defineProperty(t,"__esModule",{value:!0}),t.LSPErrorCodes=t.createProtocolConnection=void 0,i(L(),t),i((At(),u(ue)),t),i(K(),t),i($t(),t);var o=en();Object.defineProperty(t,"createProtocolConnection",{enumerable:!0,get:function(){return o.createProtocolConnection}});var s;(function(t){t.lspReservedErrorRangeStart=-32899,t.RequestFailed=-32803,t.ServerCancelled=-32802,t.ContentModified=-32801,t.RequestCancelled=-32800,t.lspReservedErrorRangeEnd=-32800})(s||(t.LSPErrorCodes=s={}))})),q=f((t=>{var n=t&&t.__createBinding||(Object.create?(function(t,n,i,o){o===void 0&&(o=i);var s=Object.getOwnPropertyDescriptor(n,i);(!s||(`get`in s?!n.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return n[i]}}),Object.defineProperty(t,o,s)}):(function(t,n,i,o){o===void 0&&(o=i),t[o]=n[i]})),i=t&&t.__exportStar||function(t,i){for(var o in t)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&n(i,t,o)};Object.defineProperty(t,"__esModule",{value:!0}),t.createProtocolConnection=void 0;let o=le();i(le(),t),i(tn(),t);function createProtocolConnection(t,n,i,s){return(0,o.createMessageConnection)(t,n,i,s)}t.createProtocolConnection=createProtocolConnection})),nn=f((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.generateUuid=t.parse=t.isUUID=t.v4=t.empty=void 0;var ValueUUID=class{constructor(t){this._value=t}asHex(){return this._value}equals(t){return this.asHex()===t.asHex()}},n=class V4UUID extends ValueUUID{static _oneOf(t){return t[Math.floor(t.length*Math.random())]}static _randomHex(){return V4UUID._oneOf(V4UUID._chars)}constructor(){super([V4UUID._randomHex(),V4UUID._randomHex(),V4UUID._randomHex(),V4UUID._randomHex(),V4UUID._randomHex(),V4UUID._randomHex(),V4UUID._randomHex(),V4UUID._randomHex(),`-`,V4UUID._randomHex(),V4UUID._randomHex(),V4UUID._randomHex(),V4UUID._randomHex(),`-`,`4`,V4UUID._randomHex(),V4UUID._randomHex(),V4UUID._randomHex(),`-`,V4UUID._oneOf(V4UUID._timeHighBits),V4UUID._randomHex(),V4UUID._randomHex(),V4UUID._randomHex(),`-`,V4UUID._randomHex(),V4UUID._randomHex(),V4UUID._randomHex(),V4UUID._randomHex(),V4UUID._randomHex(),V4UUID._randomHex(),V4UUID._randomHex(),V4UUID._randomHex(),V4UUID._randomHex(),V4UUID._randomHex(),V4UUID._randomHex(),V4UUID._randomHex()].join(``))}};n._chars=[`0`,`1`,`2`,`3`,`4`,`5`,`6`,`6`,`7`,`8`,`9`,`a`,`b`,`c`,`d`,`e`,`f`],n._timeHighBits=[`8`,`9`,`a`,`b`],t.empty=new ValueUUID(`00000000-0000-0000-0000-000000000000`);function v4(){return new n}t.v4=v4;let i=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function isUUID(t){return i.test(t)}t.isUUID=isUUID;function parse(t){if(!isUUID(t))throw Error(`invalid uuid`);return new ValueUUID(t)}t.parse=parse;function generateUuid(){return v4().asHex()}t.generateUuid=generateUuid})),rn=f((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.attachPartialResult=t.ProgressFeature=t.attachWorkDone=void 0;let n=q(),i=nn();var o=class WorkDoneProgressReporterImpl{constructor(t,n){this._connection=t,this._token=n,WorkDoneProgressReporterImpl.Instances.set(this._token,this)}begin(t,i,o,s){let c={kind:`begin`,title:t,percentage:i,message:o,cancellable:s};this._connection.sendProgress(n.WorkDoneProgress.type,this._token,c)}report(t,i){let o={kind:`report`};typeof t==`number`?(o.percentage=t,i!==void 0&&(o.message=i)):o.message=t,this._connection.sendProgress(n.WorkDoneProgress.type,this._token,o)}done(){WorkDoneProgressReporterImpl.Instances.delete(this._token),this._connection.sendProgress(n.WorkDoneProgress.type,this._token,{kind:`end`})}};o.Instances=new Map;var WorkDoneProgressServerReporterImpl=class extends o{constructor(t,i){super(t,i),this._source=new n.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose(),super.done()}cancel(){this._source.cancel()}},NullProgressReporter=class{constructor(){}begin(){}report(){}done(){}},NullProgressServerReporter=class extends NullProgressReporter{constructor(){super(),this._source=new n.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose()}cancel(){this._source.cancel()}};function attachWorkDone(t,n){if(n===void 0||n.workDoneToken===void 0)return new NullProgressReporter;let i=n.workDoneToken;return delete n.workDoneToken,new o(t,i)}t.attachWorkDone=attachWorkDone;let ProgressFeature=t=>class extends t{constructor(){super(),this._progressSupported=!1}initialize(t){super.initialize(t),t?.window?.workDoneProgress===!0&&(this._progressSupported=!0,this.connection.onNotification(n.WorkDoneProgressCancelNotification.type,t=>{let n=o.Instances.get(t.token);(n instanceof WorkDoneProgressServerReporterImpl||n instanceof NullProgressServerReporter)&&n.cancel()}))}attachWorkDoneProgress(t){return t===void 0?new NullProgressReporter:new o(this.connection,t)}createWorkDoneProgress(){if(this._progressSupported){let t=(0,i.generateUuid)();return this.connection.sendRequest(n.WorkDoneProgressCreateRequest.type,{token:t}).then(()=>new WorkDoneProgressServerReporterImpl(this.connection,t))}else return Promise.resolve(new NullProgressServerReporter)}};t.ProgressFeature=ProgressFeature;var s;(function(t){t.type=new n.ProgressType})(s||={});var ResultProgressReporterImpl=class{constructor(t,n){this._connection=t,this._token=n}report(t){this._connection.sendProgress(s.type,this._token,t)}};function attachPartialResult(t,n){if(n===void 0||n.partialResultToken===void 0)return;let i=n.partialResultToken;return delete n.partialResultToken,new ResultProgressReporterImpl(t,i)}t.attachPartialResult=attachPartialResult})),an=f((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigurationFeature=void 0;let n=q(),i=k(),ConfigurationFeature=t=>class extends t{getConfiguration(t){return t?i.string(t)?this._getConfiguration({section:t}):this._getConfiguration(t):this._getConfiguration({})}_getConfiguration(t){let i={items:Array.isArray(t)?t:[t]};return this.connection.sendRequest(n.ConfigurationRequest.type,i).then(n=>Array.isArray(n)?Array.isArray(t)?n:n[0]:Array.isArray(t)?[]:null)}};t.ConfigurationFeature=ConfigurationFeature})),on=f((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceFoldersFeature=void 0;let n=q(),WorkspaceFoldersFeature=t=>class extends t{constructor(){super(),this._notificationIsAutoRegistered=!1}initialize(t){super.initialize(t);let i=t.workspace;i&&i.workspaceFolders&&(this._onDidChangeWorkspaceFolders=new n.Emitter,this.connection.onNotification(n.DidChangeWorkspaceFoldersNotification.type,t=>{this._onDidChangeWorkspaceFolders.fire(t.event)}))}fillServerCapabilities(t){super.fillServerCapabilities(t);let n=t.workspace?.workspaceFolders?.changeNotifications;this._notificationIsAutoRegistered=n===!0||typeof n==`string`}getWorkspaceFolders(){return this.connection.sendRequest(n.WorkspaceFoldersRequest.type)}get onDidChangeWorkspaceFolders(){if(!this._onDidChangeWorkspaceFolders)throw Error(`Client doesn't support sending workspace folder change events.`);return!this._notificationIsAutoRegistered&&!this._unregistration&&(this._unregistration=this.connection.client.register(n.DidChangeWorkspaceFoldersNotification.type)),this._onDidChangeWorkspaceFolders.event}};t.WorkspaceFoldersFeature=WorkspaceFoldersFeature})),sn=f((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CallHierarchyFeature=void 0;let n=q(),CallHierarchyFeature=t=>class extends t{get callHierarchy(){return{onPrepare:t=>this.connection.onRequest(n.CallHierarchyPrepareRequest.type,(n,i)=>t(n,i,this.attachWorkDoneProgress(n),void 0)),onIncomingCalls:t=>{let i=n.CallHierarchyIncomingCallsRequest.type;return this.connection.onRequest(i,(n,o)=>t(n,o,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(i,n)))},onOutgoingCalls:t=>{let i=n.CallHierarchyOutgoingCallsRequest.type;return this.connection.onRequest(i,(n,o)=>t(n,o,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(i,n)))}}}};t.CallHierarchyFeature=CallHierarchyFeature})),cn=f((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SemanticTokensBuilder=t.SemanticTokensDiff=t.SemanticTokensFeature=void 0;let n=q(),SemanticTokensFeature=t=>class extends t{get semanticTokens(){return{refresh:()=>this.connection.sendRequest(n.SemanticTokensRefreshRequest.type),on:t=>{let i=n.SemanticTokensRequest.type;return this.connection.onRequest(i,(n,o)=>t(n,o,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(i,n)))},onDelta:t=>{let i=n.SemanticTokensDeltaRequest.type;return this.connection.onRequest(i,(n,o)=>t(n,o,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(i,n)))},onRange:t=>{let i=n.SemanticTokensRangeRequest.type;return this.connection.onRequest(i,(n,o)=>t(n,o,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(i,n)))}}}};t.SemanticTokensFeature=SemanticTokensFeature;var SemanticTokensDiff=class{constructor(t,n){this.originalSequence=t,this.modifiedSequence=n}computeDiff(){let t=this.originalSequence.length,n=this.modifiedSequence.length,i=0;for(;i<n&&i<t&&this.originalSequence[i]===this.modifiedSequence[i];)i++;if(i<n&&i<t){let o=t-1,s=n-1;for(;o>=i&&s>=i&&this.originalSequence[o]===this.modifiedSequence[s];)o--,s--;(o<i||s<i)&&(o++,s++);let c=o-i+1,u=this.modifiedSequence.slice(i,s+1);return u.length===1&&u[0]===this.originalSequence[o]?[{start:i,deleteCount:c-1}]:[{start:i,deleteCount:c,data:u}]}else if(i<n)return[{start:i,deleteCount:0,data:this.modifiedSequence.slice(i)}];else if(i<t)return[{start:i,deleteCount:t-i}];else return[]}};t.SemanticTokensDiff=SemanticTokensDiff;var 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(t,n,i,o,s){let c=t,u=n;this._dataLen>0&&(c-=this._prevLine,c===0&&(u-=this._prevChar)),this._data[this._dataLen++]=c,this._data[this._dataLen++]=u,this._data[this._dataLen++]=i,this._data[this._dataLen++]=o,this._data[this._dataLen++]=s,this._prevLine=t,this._prevChar=n}get id(){return this._id.toString()}previousResult(t){this.id===t&&(this._prevData=this._data),this.initialize()}build(){return this._prevData=void 0,{resultId:this.id,data:this._data}}canBuildEdits(){return this._prevData!==void 0}buildEdits(){return this._prevData===void 0?this.build():{resultId:this.id,edits:new SemanticTokensDiff(this._prevData,this._data).computeDiff()}}};t.SemanticTokensBuilder=SemanticTokensBuilder})),ln=f((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ShowDocumentFeature=void 0;let n=q(),ShowDocumentFeature=t=>class extends t{showDocument(t){return this.connection.sendRequest(n.ShowDocumentRequest.type,t)}};t.ShowDocumentFeature=ShowDocumentFeature})),un=f((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FileOperationsFeature=void 0;let n=q(),FileOperationsFeature=t=>class extends t{onDidCreateFiles(t){return this.connection.onNotification(n.DidCreateFilesNotification.type,n=>{t(n)})}onDidRenameFiles(t){return this.connection.onNotification(n.DidRenameFilesNotification.type,n=>{t(n)})}onDidDeleteFiles(t){return this.connection.onNotification(n.DidDeleteFilesNotification.type,n=>{t(n)})}onWillCreateFiles(t){return this.connection.onRequest(n.WillCreateFilesRequest.type,(n,i)=>t(n,i))}onWillRenameFiles(t){return this.connection.onRequest(n.WillRenameFilesRequest.type,(n,i)=>t(n,i))}onWillDeleteFiles(t){return this.connection.onRequest(n.WillDeleteFilesRequest.type,(n,i)=>t(n,i))}};t.FileOperationsFeature=FileOperationsFeature})),dn=f((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LinkedEditingRangeFeature=void 0;let n=q(),LinkedEditingRangeFeature=t=>class extends t{onLinkedEditingRange(t){return this.connection.onRequest(n.LinkedEditingRangeRequest.type,(n,i)=>t(n,i,this.attachWorkDoneProgress(n),void 0))}};t.LinkedEditingRangeFeature=LinkedEditingRangeFeature})),fn=f((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TypeHierarchyFeature=void 0;let n=q(),TypeHierarchyFeature=t=>class extends t{get typeHierarchy(){return{onPrepare:t=>this.connection.onRequest(n.TypeHierarchyPrepareRequest.type,(n,i)=>t(n,i,this.attachWorkDoneProgress(n),void 0)),onSupertypes:t=>{let i=n.TypeHierarchySupertypesRequest.type;return this.connection.onRequest(i,(n,o)=>t(n,o,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(i,n)))},onSubtypes:t=>{let i=n.TypeHierarchySubtypesRequest.type;return this.connection.onRequest(i,(n,o)=>t(n,o,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(i,n)))}}}};t.TypeHierarchyFeature=TypeHierarchyFeature})),pn=f((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.InlineValueFeature=void 0;let n=q(),InlineValueFeature=t=>class extends t{get inlineValue(){return{refresh:()=>this.connection.sendRequest(n.InlineValueRefreshRequest.type),on:t=>this.connection.onRequest(n.InlineValueRequest.type,(n,i)=>t(n,i,this.attachWorkDoneProgress(n)))}}};t.InlineValueFeature=InlineValueFeature})),mn=f((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FoldingRangeFeature=void 0;let n=q(),FoldingRangeFeature=t=>class extends t{get foldingRange(){return{refresh:()=>this.connection.sendRequest(n.FoldingRangeRefreshRequest.type),on:t=>{let i=n.FoldingRangeRequest.type;return this.connection.onRequest(i,(n,o)=>t(n,o,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(i,n)))}}}};t.FoldingRangeFeature=FoldingRangeFeature})),hn=f((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.InlayHintFeature=void 0;let n=q(),InlayHintFeature=t=>class extends t{get inlayHint(){return{refresh:()=>this.connection.sendRequest(n.InlayHintRefreshRequest.type),on:t=>this.connection.onRequest(n.InlayHintRequest.type,(n,i)=>t(n,i,this.attachWorkDoneProgress(n))),resolve:t=>this.connection.onRequest(n.InlayHintResolveRequest.type,(n,i)=>t(n,i))}}};t.InlayHintFeature=InlayHintFeature})),gn=f((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DiagnosticFeature=void 0;let n=q(),DiagnosticFeature=t=>class extends t{get diagnostics(){return{refresh:()=>this.connection.sendRequest(n.DiagnosticRefreshRequest.type),on:t=>this.connection.onRequest(n.DocumentDiagnosticRequest.type,(i,o)=>t(i,o,this.attachWorkDoneProgress(i),this.attachPartialResultProgress(n.DocumentDiagnosticRequest.partialResult,i))),onWorkspace:t=>this.connection.onRequest(n.WorkspaceDiagnosticRequest.type,(i,o)=>t(i,o,this.attachWorkDoneProgress(i),this.attachPartialResultProgress(n.WorkspaceDiagnosticRequest.partialResult,i)))}}};t.DiagnosticFeature=DiagnosticFeature})),_n=f((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TextDocuments=void 0;let n=q();var TextDocuments=class{constructor(t){this._configuration=t,this._syncedDocuments=new Map,this._onDidChangeContent=new n.Emitter,this._onDidOpen=new n.Emitter,this._onDidClose=new n.Emitter,this._onDidSave=new n.Emitter,this._onWillSave=new n.Emitter}get onDidOpen(){return this._onDidOpen.event}get onDidChangeContent(){return this._onDidChangeContent.event}get onWillSave(){return this._onWillSave.event}onWillSaveWaitUntil(t){this._willSaveWaitUntil=t}get onDidSave(){return this._onDidSave.event}get onDidClose(){return this._onDidClose.event}get(t){return this._syncedDocuments.get(t)}all(){return Array.from(this._syncedDocuments.values())}keys(){return Array.from(this._syncedDocuments.keys())}listen(t){t.__textDocumentSync=n.TextDocumentSyncKind.Incremental;let i=[];return i.push(t.onDidOpenTextDocument(t=>{let n=t.textDocument,i=this._configuration.create(n.uri,n.languageId,n.version,n.text);this._syncedDocuments.set(n.uri,i);let o=Object.freeze({document:i});this._onDidOpen.fire(o),this._onDidChangeContent.fire(o)})),i.push(t.onDidChangeTextDocument(t=>{let n=t.textDocument,i=t.contentChanges;if(i.length===0)return;let{version:o}=n;if(o==null)throw Error(`Received document change event for ${n.uri} without valid version identifier`);let s=this._syncedDocuments.get(n.uri);s!==void 0&&(s=this._configuration.update(s,i,o),this._syncedDocuments.set(n.uri,s),this._onDidChangeContent.fire(Object.freeze({document:s})))})),i.push(t.onDidCloseTextDocument(t=>{let n=this._syncedDocuments.get(t.textDocument.uri);n!==void 0&&(this._syncedDocuments.delete(t.textDocument.uri),this._onDidClose.fire(Object.freeze({document:n})))})),i.push(t.onWillSaveTextDocument(t=>{let n=this._syncedDocuments.get(t.textDocument.uri);n!==void 0&&this._onWillSave.fire(Object.freeze({document:n,reason:t.reason}))})),i.push(t.onWillSaveTextDocumentWaitUntil((t,n)=>{let i=this._syncedDocuments.get(t.textDocument.uri);return i!==void 0&&this._willSaveWaitUntil?this._willSaveWaitUntil(Object.freeze({document:i,reason:t.reason}),n):[]})),i.push(t.onDidSaveTextDocument(t=>{let n=this._syncedDocuments.get(t.textDocument.uri);n!==void 0&&this._onDidSave.fire(Object.freeze({document:n}))})),n.Disposable.create(()=>{i.forEach(t=>t.dispose())})}};t.TextDocuments=TextDocuments})),vn=f((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NotebookDocuments=t.NotebookSyncFeature=void 0;let n=q(),i=_n(),NotebookSyncFeature=t=>class extends t{get synchronization(){return{onDidOpenNotebookDocument:t=>this.connection.onNotification(n.DidOpenNotebookDocumentNotification.type,n=>{t(n)}),onDidChangeNotebookDocument:t=>this.connection.onNotification(n.DidChangeNotebookDocumentNotification.type,n=>{t(n)}),onDidSaveNotebookDocument:t=>this.connection.onNotification(n.DidSaveNotebookDocumentNotification.type,n=>{t(n)}),onDidCloseNotebookDocument:t=>this.connection.onNotification(n.DidCloseNotebookDocumentNotification.type,n=>{t(n)})}}};t.NotebookSyncFeature=NotebookSyncFeature;var o=class CellTextDocumentConnection{onDidOpenTextDocument(t){return this.openHandler=t,n.Disposable.create(()=>{this.openHandler=void 0})}openTextDocument(t){this.openHandler&&this.openHandler(t)}onDidChangeTextDocument(t){return this.changeHandler=t,n.Disposable.create(()=>{this.changeHandler=t})}changeTextDocument(t){this.changeHandler&&this.changeHandler(t)}onDidCloseTextDocument(t){return this.closeHandler=t,n.Disposable.create(()=>{this.closeHandler=void 0})}closeTextDocument(t){this.closeHandler&&this.closeHandler(t)}onWillSaveTextDocument(){return CellTextDocumentConnection.NULL_DISPOSE}onWillSaveTextDocumentWaitUntil(){return CellTextDocumentConnection.NULL_DISPOSE}onDidSaveTextDocument(){return CellTextDocumentConnection.NULL_DISPOSE}};o.NULL_DISPOSE=Object.freeze({dispose:()=>{}});var NotebookDocuments=class{constructor(t){t instanceof i.TextDocuments?this._cellTextDocuments=t:this._cellTextDocuments=new i.TextDocuments(t),this.notebookDocuments=new Map,this.notebookCellMap=new Map,this._onDidOpen=new n.Emitter,this._onDidChange=new n.Emitter,this._onDidSave=new n.Emitter,this._onDidClose=new n.Emitter}get cellTextDocuments(){return this._cellTextDocuments}getCellTextDocument(t){return this._cellTextDocuments.get(t.document)}getNotebookDocument(t){return this.notebookDocuments.get(t)}getNotebookCell(t){let n=this.notebookCellMap.get(t);return n&&n[0]}findNotebookDocumentForCell(t){let n=typeof t==`string`?t:t.document,i=this.notebookCellMap.get(n);return i&&i[1]}get onDidOpen(){return this._onDidOpen.event}get onDidSave(){return this._onDidSave.event}get onDidChange(){return this._onDidChange.event}get onDidClose(){return this._onDidClose.event}listen(t){let i=new o,s=[];return s.push(this.cellTextDocuments.listen(i)),s.push(t.notebooks.synchronization.onDidOpenNotebookDocument(t=>{this.notebookDocuments.set(t.notebookDocument.uri,t.notebookDocument);for(let n of t.cellTextDocuments)i.openTextDocument({textDocument:n});this.updateCellMap(t.notebookDocument),this._onDidOpen.fire(t.notebookDocument)})),s.push(t.notebooks.synchronization.onDidChangeNotebookDocument(t=>{let n=this.notebookDocuments.get(t.notebookDocument.uri);if(n===void 0)return;n.version=t.notebookDocument.version;let o=n.metadata,s=!1,c=t.change;c.metadata!==void 0&&(s=!0,n.metadata=c.metadata);let u=[],f=[],p=[],h=[];if(c.cells!==void 0){let t=c.cells;if(t.structure!==void 0){let o=t.structure.array;if(n.cells.splice(o.start,o.deleteCount,...o.cells===void 0?[]:o.cells),t.structure.didOpen!==void 0)for(let n of t.structure.didOpen)i.openTextDocument({textDocument:n}),u.push(n.uri);if(t.structure.didClose)for(let n of t.structure.didClose)i.closeTextDocument({textDocument:n}),f.push(n.uri)}if(t.data!==void 0){let i=new Map(t.data.map(t=>[t.document,t]));for(let t=0;t<=n.cells.length;t++){let o=i.get(n.cells[t].document);if(o!==void 0){let s=n.cells.splice(t,1,o);if(p.push({old:s[0],new:o}),i.delete(o.document),i.size===0)break}}}if(t.textContent!==void 0)for(let n of t.textContent)i.changeTextDocument({textDocument:n.document,contentChanges:n.changes}),h.push(n.document.uri)}this.updateCellMap(n);let g={notebookDocument:n};s&&(g.metadata={old:o,new:n.metadata});let _=[];for(let t of u)_.push(this.getNotebookCell(t));let x=[];for(let t of f)x.push(this.getNotebookCell(t));let S=[];for(let t of h)S.push(this.getNotebookCell(t));(_.length>0||x.length>0||p.length>0||S.length>0)&&(g.cells={added:_,removed:x,changed:{data:p,textContent:S}}),(g.metadata!==void 0||g.cells!==void 0)&&this._onDidChange.fire(g)})),s.push(t.notebooks.synchronization.onDidSaveNotebookDocument(t=>{let n=this.notebookDocuments.get(t.notebookDocument.uri);n!==void 0&&this._onDidSave.fire(n)})),s.push(t.notebooks.synchronization.onDidCloseNotebookDocument(t=>{let n=this.notebookDocuments.get(t.notebookDocument.uri);if(n!==void 0){this._onDidClose.fire(n);for(let n of t.cellTextDocuments)i.closeTextDocument({textDocument:n});this.notebookDocuments.delete(t.notebookDocument.uri);for(let t of n.cells)this.notebookCellMap.delete(t.document)}})),n.Disposable.create(()=>{s.forEach(t=>t.dispose())})}updateCellMap(t){for(let n of t.cells)this.notebookCellMap.set(n.document,[n,t])}};t.NotebookDocuments=NotebookDocuments})),yn=f((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MonikerFeature=void 0;let n=q(),MonikerFeature=t=>class extends t{get moniker(){return{on:t=>{let i=n.MonikerRequest.type;return this.connection.onRequest(i,(n,o)=>t(n,o,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(i,n)))}}}};t.MonikerFeature=MonikerFeature})),bn=f((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.createConnection=t.combineFeatures=t.combineNotebooksFeatures=t.combineLanguagesFeatures=t.combineWorkspaceFeatures=t.combineWindowFeatures=t.combineClientFeatures=t.combineTracerFeatures=t.combineTelemetryFeatures=t.combineConsoleFeatures=t._NotebooksImpl=t._LanguagesImpl=t.BulkUnregistration=t.BulkRegistration=t.ErrorMessageTracker=void 0;let n=q(),i=k(),o=nn(),s=rn(),c=an(),u=on(),f=sn(),p=cn(),h=ln(),g=un(),_=dn(),x=fn(),S=pn(),T=mn(),E=hn(),D=gn(),ee=vn(),O=yn();function null2Undefined(t){if(t!==null)return t}var ErrorMessageTracker=class{constructor(){this._messages=Object.create(null)}add(t){let n=this._messages[t];n||=0,n++,this._messages[t]=n}sendErrors(t){Object.keys(this._messages).forEach(n=>{t.window.showErrorMessage(n)})}};t.ErrorMessageTracker=ErrorMessageTracker;var RemoteConsoleImpl=class{constructor(){}rawAttach(t){this._rawConnection=t}attach(t){this._connection=t}get connection(){if(!this._connection)throw Error(`Remote is not attached to a connection yet.`);return this._connection}fillServerCapabilities(t){}initialize(t){}error(t){this.send(n.MessageType.Error,t)}warn(t){this.send(n.MessageType.Warning,t)}info(t){this.send(n.MessageType.Info,t)}log(t){this.send(n.MessageType.Log,t)}debug(t){this.send(n.MessageType.Debug,t)}send(t,i){this._rawConnection&&this._rawConnection.sendNotification(n.LogMessageNotification.type,{type:t,message:i}).catch(()=>{(0,n.RAL)().console.error(`Sending log message failed`)})}},_RemoteWindowImpl=class{constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw Error(`Remote is not attached to a connection yet.`);return this._connection}initialize(t){}fillServerCapabilities(t){}showErrorMessage(t,...i){let o={type:n.MessageType.Error,message:t,actions:i};return this.connection.sendRequest(n.ShowMessageRequest.type,o).then(null2Undefined)}showWarningMessage(t,...i){let o={type:n.MessageType.Warning,message:t,actions:i};return this.connection.sendRequest(n.ShowMessageRequest.type,o).then(null2Undefined)}showInformationMessage(t,...i){let o={type:n.MessageType.Info,message:t,actions:i};return this.connection.sendRequest(n.ShowMessageRequest.type,o).then(null2Undefined)}};let A=(0,h.ShowDocumentFeature)((0,s.ProgressFeature)(_RemoteWindowImpl));var te;(function(t){function create(){return new BulkRegistrationImpl}t.create=create})(te||(t.BulkRegistration=te={}));var BulkRegistrationImpl=class{constructor(){this._registrations=[],this._registered=new Set}add(t,n){let s=i.string(t)?t:t.method;if(this._registered.has(s))throw Error(`${s} is already added to this registration`);let c=o.generateUuid();this._registrations.push({id:c,method:s,registerOptions:n||{}}),this._registered.add(s)}asRegistrationParams(){return{registrations:this._registrations}}},j;(function(t){function create(){return new BulkUnregistrationImpl(void 0,[])}t.create=create})(j||(t.BulkUnregistration=j={}));var BulkUnregistrationImpl=class{constructor(t,n){this._connection=t,this._unregistrations=new Map,n.forEach(t=>{this._unregistrations.set(t.method,t)})}get isAttached(){return!!this._connection}attach(t){this._connection=t}add(t){this._unregistrations.set(t.method,t)}dispose(){let t=[];for(let n of this._unregistrations.values())t.push(n);let i={unregisterations:t};this._connection.sendRequest(n.UnregistrationRequest.type,i).catch(()=>{this._connection.console.info(`Bulk unregistration failed.`)})}disposeSingle(t){let o=i.string(t)?t:t.method,s=this._unregistrations.get(o);if(!s)return!1;let c={unregisterations:[s]};return this._connection.sendRequest(n.UnregistrationRequest.type,c).then(()=>{this._unregistrations.delete(o)},t=>{this._connection.console.info(`Un-registering request handler for ${s.id} failed.`)}),!0}},RemoteClientImpl=class{attach(t){this._connection=t}get connection(){if(!this._connection)throw Error(`Remote is not attached to a connection yet.`);return this._connection}initialize(t){}fillServerCapabilities(t){}register(t,n,i){return t instanceof BulkRegistrationImpl?this.registerMany(t):t instanceof BulkUnregistrationImpl?this.registerSingle1(t,n,i):this.registerSingle2(t,n)}registerSingle1(t,s,c){let u=i.string(s)?s:s.method,f=o.generateUuid(),p={registrations:[{id:f,method:u,registerOptions:c||{}}]};return t.isAttached||t.attach(this.connection),this.connection.sendRequest(n.RegistrationRequest.type,p).then(n=>(t.add({id:f,method:u}),t),t=>(this.connection.console.info(`Registering request handler for ${u} failed.`),Promise.reject(t)))}registerSingle2(t,s){let c=i.string(t)?t:t.method,u=o.generateUuid(),f={registrations:[{id:u,method:c,registerOptions:s||{}}]};return this.connection.sendRequest(n.RegistrationRequest.type,f).then(t=>n.Disposable.create(()=>{this.unregisterSingle(u,c).catch(()=>{this.connection.console.info(`Un-registering capability with id ${u} failed.`)})}),t=>(this.connection.console.info(`Registering request handler for ${c} failed.`),Promise.reject(t)))}unregisterSingle(t,i){let o={unregisterations:[{id:t,method:i}]};return this.connection.sendRequest(n.UnregistrationRequest.type,o).catch(()=>{this.connection.console.info(`Un-registering request handler for ${t} failed.`)})}registerMany(t){let i=t.asRegistrationParams();return this.connection.sendRequest(n.RegistrationRequest.type,i).then(()=>new BulkUnregistrationImpl(this._connection,i.registrations.map(t=>({id:t.id,method:t.method}))),t=>(this.connection.console.info(`Bulk registration failed.`),Promise.reject(t)))}},_RemoteWorkspaceImpl=class{constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw Error(`Remote is not attached to a connection yet.`);return this._connection}initialize(t){}fillServerCapabilities(t){}applyEdit(t){function isApplyWorkspaceEditParams(t){return t&&!!t.edit}let i=isApplyWorkspaceEditParams(t)?t:{edit:t};return this.connection.sendRequest(n.ApplyWorkspaceEditRequest.type,i)}};let ne=(0,g.FileOperationsFeature)((0,u.WorkspaceFoldersFeature)((0,c.ConfigurationFeature)(_RemoteWorkspaceImpl)));var TracerImpl=class{constructor(){this._trace=n.Trace.Off}attach(t){this._connection=t}get connection(){if(!this._connection)throw Error(`Remote is not attached to a connection yet.`);return this._connection}initialize(t){}fillServerCapabilities(t){}set trace(t){this._trace=t}log(t,i){this._trace!==n.Trace.Off&&this.connection.sendNotification(n.LogTraceNotification.type,{message:t,verbose:this._trace===n.Trace.Verbose?i:void 0}).catch(()=>{})}},TelemetryImpl=class{constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw Error(`Remote is not attached to a connection yet.`);return this._connection}initialize(t){}fillServerCapabilities(t){}logEvent(t){this.connection.sendNotification(n.TelemetryEventNotification.type,t).catch(()=>{this.connection.console.log(`Sending TelemetryEventNotification failed`)})}},_LanguagesImpl=class{constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw Error(`Remote is not attached to a connection yet.`);return this._connection}initialize(t){}fillServerCapabilities(t){}attachWorkDoneProgress(t){return(0,s.attachWorkDone)(this.connection,t)}attachPartialResultProgress(t,n){return(0,s.attachPartialResult)(this.connection,n)}};t._LanguagesImpl=_LanguagesImpl;let M=(0,T.FoldingRangeFeature)((0,O.MonikerFeature)((0,D.DiagnosticFeature)((0,E.InlayHintFeature)((0,S.InlineValueFeature)((0,x.TypeHierarchyFeature)((0,_.LinkedEditingRangeFeature)((0,p.SemanticTokensFeature)((0,f.CallHierarchyFeature)(_LanguagesImpl)))))))));var _NotebooksImpl=class{constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw Error(`Remote is not attached to a connection yet.`);return this._connection}initialize(t){}fillServerCapabilities(t){}attachWorkDoneProgress(t){return(0,s.attachWorkDone)(this.connection,t)}attachPartialResultProgress(t,n){return(0,s.attachPartialResult)(this.connection,n)}};t._NotebooksImpl=_NotebooksImpl;let re=(0,ee.NotebookSyncFeature)(_NotebooksImpl);function combineConsoleFeatures(t,n){return function(i){return n(t(i))}}t.combineConsoleFeatures=combineConsoleFeatures;function combineTelemetryFeatures(t,n){return function(i){return n(t(i))}}t.combineTelemetryFeatures=combineTelemetryFeatures;function combineTracerFeatures(t,n){return function(i){return n(t(i))}}t.combineTracerFeatures=combineTracerFeatures;function combineClientFeatures(t,n){return function(i){return n(t(i))}}t.combineClientFeatures=combineClientFeatures;function combineWindowFeatures(t,n){return function(i){return n(t(i))}}t.combineWindowFeatures=combineWindowFeatures;function combineWorkspaceFeatures(t,n){return function(i){return n(t(i))}}t.combineWorkspaceFeatures=combineWorkspaceFeatures;function combineLanguagesFeatures(t,n){return function(i){return n(t(i))}}t.combineLanguagesFeatures=combineLanguagesFeatures;function combineNotebooksFeatures(t,n){return function(i){return n(t(i))}}t.combineNotebooksFeatures=combineNotebooksFeatures;function combineFeatures(t,n){function combine(t,n,i){return t&&n?i(t,n):t||n}return{__brand:`features`,console:combine(t.console,n.console,combineConsoleFeatures),tracer:combine(t.tracer,n.tracer,combineTracerFeatures),telemetry:combine(t.telemetry,n.telemetry,combineTelemetryFeatures),client:combine(t.client,n.client,combineClientFeatures),window:combine(t.window,n.window,combineWindowFeatures),workspace:combine(t.workspace,n.workspace,combineWorkspaceFeatures),languages:combine(t.languages,n.languages,combineLanguagesFeatures),notebooks:combine(t.notebooks,n.notebooks,combineNotebooksFeatures)}}t.combineFeatures=combineFeatures;function createConnection(t,o,c){let u=c&&c.console?new(c.console(RemoteConsoleImpl)):new RemoteConsoleImpl,f=t(u);u.rawAttach(f);let p=c&&c.tracer?new(c.tracer(TracerImpl)):new TracerImpl,h=c&&c.telemetry?new(c.telemetry(TelemetryImpl)):new TelemetryImpl,g=c&&c.client?new(c.client(RemoteClientImpl)):new RemoteClientImpl,_=c&&c.window?new(c.window(A)):new A,x=c&&c.workspace?new(c.workspace(ne)):new ne,S=c&&c.languages?new(c.languages(M)):new M,T=c&&c.notebooks?new(c.notebooks(re)):new re,E=[u,p,h,g,_,x,S,T];function asPromise(t){return t instanceof Promise?t:i.thenable(t)?new Promise((n,i)=>{t.then(t=>n(t),t=>i(t))}):Promise.resolve(t)}let D,ee,O,k={listen:()=>f.listen(),sendRequest:(t,...n)=>f.sendRequest(i.string(t)?t:t.method,...n),onRequest:(t,n)=>f.onRequest(t,n),sendNotification:(t,n)=>{let o=i.string(t)?t:t.method;return f.sendNotification(o,n)},onNotification:(t,n)=>f.onNotification(t,n),onProgress:f.onProgress,sendProgress:f.sendProgress,onInitialize:t=>(ee=t,{dispose:()=>{ee=void 0}}),onInitialized:t=>f.onNotification(n.InitializedNotification.type,t),onShutdown:t=>(D=t,{dispose:()=>{D=void 0}}),onExit:t=>(O=t,{dispose:()=>{O=void 0}}),get console(){return u},get telemetry(){return h},get tracer(){return p},get client(){return g},get window(){return _},get workspace(){return x},get languages(){return S},get notebooks(){return T},onDidChangeConfiguration:t=>f.onNotification(n.DidChangeConfigurationNotification.type,t),onDidChangeWatchedFiles:t=>f.onNotification(n.DidChangeWatchedFilesNotification.type,t),__textDocumentSync:void 0,onDidOpenTextDocument:t=>f.onNotification(n.DidOpenTextDocumentNotification.type,t),onDidChangeTextDocument:t=>f.onNotification(n.DidChangeTextDocumentNotification.type,t),onDidCloseTextDocument:t=>f.onNotification(n.DidCloseTextDocumentNotification.type,t),onWillSaveTextDocument:t=>f.onNotification(n.WillSaveTextDocumentNotification.type,t),onWillSaveTextDocumentWaitUntil:t=>f.onRequest(n.WillSaveTextDocumentWaitUntilRequest.type,t),onDidSaveTextDocument:t=>f.onNotification(n.DidSaveTextDocumentNotification.type,t),sendDiagnostics:t=>f.sendNotification(n.PublishDiagnosticsNotification.type,t),onHover:t=>f.onRequest(n.HoverRequest.type,(n,i)=>t(n,i,(0,s.attachWorkDone)(f,n),void 0)),onCompletion:t=>f.onRequest(n.CompletionRequest.type,(n,i)=>t(n,i,(0,s.attachWorkDone)(f,n),(0,s.attachPartialResult)(f,n))),onCompletionResolve:t=>f.onRequest(n.CompletionResolveRequest.type,t),onSignatureHelp:t=>f.onRequest(n.SignatureHelpRequest.type,(n,i)=>t(n,i,(0,s.attachWorkDone)(f,n),void 0)),onDeclaration:t=>f.onRequest(n.DeclarationRequest.type,(n,i)=>t(n,i,(0,s.attachWorkDone)(f,n),(0,s.attachPartialResult)(f,n))),onDefinition:t=>f.onRequest(n.DefinitionRequest.type,(n,i)=>t(n,i,(0,s.attachWorkDone)(f,n),(0,s.attachPartialResult)(f,n))),onTypeDefinition:t=>f.onRequest(n.TypeDefinitionRequest.type,(n,i)=>t(n,i,(0,s.attachWorkDone)(f,n),(0,s.attachPartialResult)(f,n))),onImplementation:t=>f.onRequest(n.ImplementationRequest.type,(n,i)=>t(n,i,(0,s.attachWorkDone)(f,n),(0,s.attachPartialResult)(f,n))),onReferences:t=>f.onRequest(n.ReferencesRequest.type,(n,i)=>t(n,i,(0,s.attachWorkDone)(f,n),(0,s.attachPartialResult)(f,n))),onDocumentHighlight:t=>f.onRequest(n.DocumentHighlightRequest.type,(n,i)=>t(n,i,(0,s.attachWorkDone)(f,n),(0,s.attachPartialResult)(f,n))),onDocumentSymbol:t=>f.onRequest(n.DocumentSymbolRequest.type,(n,i)=>t(n,i,(0,s.attachWorkDone)(f,n),(0,s.attachPartialResult)(f,n))),onWorkspaceSymbol:t=>f.onRequest(n.WorkspaceSymbolRequest.type,(n,i)=>t(n,i,(0,s.attachWorkDone)(f,n),(0,s.attachPartialResult)(f,n))),onWorkspaceSymbolResolve:t=>f.onRequest(n.WorkspaceSymbolResolveRequest.type,t),onCodeAction:t=>f.onRequest(n.CodeActionRequest.type,(n,i)=>t(n,i,(0,s.attachWorkDone)(f,n),(0,s.attachPartialResult)(f,n))),onCodeActionResolve:t=>f.onRequest(n.CodeActionResolveRequest.type,(n,i)=>t(n,i)),onCodeLens:t=>f.onRequest(n.CodeLensRequest.type,(n,i)=>t(n,i,(0,s.attachWorkDone)(f,n),(0,s.attachPartialResult)(f,n))),onCodeLensResolve:t=>f.onRequest(n.CodeLensResolveRequest.type,(n,i)=>t(n,i)),onDocumentFormatting:t=>f.onRequest(n.DocumentFormattingRequest.type,(n,i)=>t(n,i,(0,s.attachWorkDone)(f,n),void 0)),onDocumentRangeFormatting:t=>f.onRequest(n.DocumentRangeFormattingRequest.type,(n,i)=>t(n,i,(0,s.attachWorkDone)(f,n),void 0)),onDocumentOnTypeFormatting:t=>f.onRequest(n.DocumentOnTypeFormattingRequest.type,(n,i)=>t(n,i)),onRenameRequest:t=>f.onRequest(n.RenameRequest.type,(n,i)=>t(n,i,(0,s.attachWorkDone)(f,n),void 0)),onPrepareRename:t=>f.onRequest(n.PrepareRenameRequest.type,(n,i)=>t(n,i)),onDocumentLinks:t=>f.onRequest(n.DocumentLinkRequest.type,(n,i)=>t(n,i,(0,s.attachWorkDone)(f,n),(0,s.attachPartialResult)(f,n))),onDocumentLinkResolve:t=>f.onRequest(n.DocumentLinkResolveRequest.type,(n,i)=>t(n,i)),onDocumentColor:t=>f.onRequest(n.DocumentColorRequest.type,(n,i)=>t(n,i,(0,s.attachWorkDone)(f,n),(0,s.attachPartialResult)(f,n))),onColorPresentation:t=>f.onRequest(n.ColorPresentationRequest.type,(n,i)=>t(n,i,(0,s.attachWorkDone)(f,n),(0,s.attachPartialResult)(f,n))),onFoldingRanges:t=>f.onRequest(n.FoldingRangeRequest.type,(n,i)=>t(n,i,(0,s.attachWorkDone)(f,n),(0,s.attachPartialResult)(f,n))),onSelectionRanges:t=>f.onRequest(n.SelectionRangeRequest.type,(n,i)=>t(n,i,(0,s.attachWorkDone)(f,n),(0,s.attachPartialResult)(f,n))),onExecuteCommand:t=>f.onRequest(n.ExecuteCommandRequest.type,(n,i)=>t(n,i,(0,s.attachWorkDone)(f,n),void 0)),dispose:()=>f.dispose()};for(let t of E)t.attach(k);return f.onRequest(n.InitializeRequest.type,t=>{o.initialize(t),i.string(t.trace)&&(p.trace=n.Trace.fromString(t.trace));for(let n of E)n.initialize(t.capabilities);if(ee)return asPromise(ee(t,new n.CancellationTokenSource().token,(0,s.attachWorkDone)(f,t),void 0)).then(t=>{if(t instanceof n.ResponseError)return t;let o=t;o||={capabilities:{}};let s=o.capabilities;s||(s={},o.capabilities=s),s.textDocumentSync===void 0||s.textDocumentSync===null?s.textDocumentSync=i.number(k.__textDocumentSync)?k.__textDocumentSync:n.TextDocumentSyncKind.None:!i.number(s.textDocumentSync)&&!i.number(s.textDocumentSync.change)&&(s.textDocumentSync.change=i.number(k.__textDocumentSync)?k.__textDocumentSync:n.TextDocumentSyncKind.None);for(let t of E)t.fillServerCapabilities(s);return o});{let t={capabilities:{textDocumentSync:n.TextDocumentSyncKind.None}};for(let n of E)n.fillServerCapabilities(t.capabilities);return t}}),f.onRequest(n.ShutdownRequest.type,()=>{if(o.shutdownReceived=!0,D)return D(new n.CancellationTokenSource().token)}),f.onNotification(n.ExitNotification.type,()=>{try{O&&O()}finally{o.shutdownReceived?o.exit(0):o.exit(1)}}),f.onNotification(n.SetTraceNotification.type,t=>{p.trace=n.Trace.fromString(t.value)}),k}t.createConnection=createConnection})),xn=f((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.resolveModulePath=t.FileSystem=t.resolveGlobalYarnPath=t.resolveGlobalNodePath=t.resolve=t.uriToFilePath=void 0;let n=s(`node:url`),i=s(`node:path`),o=s(`node:fs`),c=s(`node:child_process`);function uriToFilePath(t){let o=n.parse(t);if(o.protocol!==`file:`||!o.path)return;let s=o.path.split(`/`);for(var c=0,u=s.length;c<u;c++)s[c]=decodeURIComponent(s[c]);if(process.platform===`win32`&&s.length>1){let t=s[0],n=s[1];t.length===0&&n.length>1&&n[1]===`:`&&s.shift()}return i.normalize(s.join(`/`))}t.uriToFilePath=uriToFilePath;function isWindows(){return process.platform===`win32`}function resolve(t,n,s,u){let f=`NODE_PATH`,p=[`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((h,g)=>{let _=process.env,x=Object.create(null);Object.keys(_).forEach(t=>x[t]=_[t]),n&&o.existsSync(n)&&(x[f]?x[f]=n+i.delimiter+x[f]:x[f]=n,u&&u(`NODE_PATH value is: ${x[f]}`)),x.ELECTRON_RUN_AS_NODE=`1`;try{let n=(0,c.fork)(``,[],{cwd:s,env:x,execArgv:[`-e`,p]});if(n.pid===void 0){g(Error(`Starting process to resolve node module ${t} failed`));return}n.on(`error`,t=>{g(t)}),n.on(`message`,i=>{i.c===`r`&&(n.send({c:`e`}),i.s?h(i.r):g(Error(`Failed to resolve module: ${t}`)))});let i={c:`rs`,a:t};n.send(i)}catch(t){g(t)}})}t.resolve=resolve;function resolveGlobalNodePath(t){let n=`npm`,o=Object.create(null);Object.keys(process.env).forEach(t=>o[t]=process.env[t]),o.NO_UPDATE_NOTIFIER=`true`;let s={encoding:`utf8`,env:o};isWindows()&&(n=`npm.cmd`,s.shell=!0);let handler=()=>{};try{process.on(`SIGPIPE`,handler);let o=(0,c.spawnSync)(n,[`config`,`get`,`prefix`],s).stdout;if(!o){t&&t(`'npm config get prefix' didn't return a value.`);return}let u=o.trim();return t&&t(`'npm config get prefix' value is: ${u}`),u.length>0?isWindows()?i.join(u,`node_modules`):i.join(u,`lib`,`node_modules`):void 0}catch{return}finally{process.removeListener(`SIGPIPE`,handler)}}t.resolveGlobalNodePath=resolveGlobalNodePath;function resolveGlobalYarnPath(t){let n=`yarn`,o={encoding:`utf8`};isWindows()&&(n=`yarn.cmd`,o.shell=!0);let handler=()=>{};try{process.on(`SIGPIPE`,handler);let s=(0,c.spawnSync)(n,[`global`,`dir`,`--json`],o),u=s.stdout;if(!u){t&&(t(`'yarn global dir' didn't return a value.`),s.stderr&&t(s.stderr));return}let f=u.trim().split(/\r?\n/);for(let t of f)try{let n=JSON.parse(t);if(n.type===`log`)return i.join(n.data,`node_modules`)}catch{}return}catch{return}finally{process.removeListener(`SIGPIPE`,handler)}}t.resolveGlobalYarnPath=resolveGlobalYarnPath;var u;(function(t){let n;function isCaseSensitive(){return n===void 0&&(n=process.platform===`win32`?!1:!o.existsSync(__filename.toUpperCase())||!o.existsSync(__filename.toLowerCase())),n}t.isCaseSensitive=isCaseSensitive;function isParent(t,n){return isCaseSensitive()?i.normalize(n).indexOf(i.normalize(t))===0:i.normalize(n).toLowerCase().indexOf(i.normalize(t).toLowerCase())===0}t.isParent=isParent})(u||(t.FileSystem=u={}));function resolveModulePath(t,n,o,s){return o?(i.isAbsolute(o)||(o=i.join(t,o)),resolve(n,o,o,s).then(t=>u.isParent(o,t)?t:Promise.reject(Error(`Failed to load ${n} from node path location.`))).then(void 0,i=>resolve(n,resolveGlobalNodePath(s),t,s))):resolve(n,resolveGlobalNodePath(s),t,s)}t.resolveModulePath=resolveModulePath})),Sn=f(((t,n)=>{n.exports=q()})),Cn=f((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.InlineCompletionFeature=void 0;let n=q(),InlineCompletionFeature=t=>class extends t{get inlineCompletion(){return{on:t=>this.connection.onRequest(n.InlineCompletionRequest.type,(n,i)=>t(n,i,this.attachWorkDoneProgress(n)))}}};t.InlineCompletionFeature=InlineCompletionFeature})),wn=f((t=>{var n=t&&t.__createBinding||(Object.create?(function(t,n,i,o){o===void 0&&(o=i);var s=Object.getOwnPropertyDescriptor(n,i);(!s||(`get`in s?!n.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return n[i]}}),Object.defineProperty(t,o,s)}):(function(t,n,i,o){o===void 0&&(o=i),t[o]=n[i]})),i=t&&t.__exportStar||function(t,i){for(var o in t)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&n(i,t,o)};Object.defineProperty(t,"__esModule",{value:!0}),t.ProposedFeatures=t.NotebookDocuments=t.TextDocuments=t.SemanticTokensBuilder=void 0;let o=cn();Object.defineProperty(t,"SemanticTokensBuilder",{enumerable:!0,get:function(){return o.SemanticTokensBuilder}});let s=Cn();i(q(),t);let c=_n();Object.defineProperty(t,"TextDocuments",{enumerable:!0,get:function(){return c.TextDocuments}});let u=vn();Object.defineProperty(t,"NotebookDocuments",{enumerable:!0,get:function(){return u.NotebookDocuments}}),i(bn(),t);var f;(function(t){t.all={__brand:`features`,languages:s.InlineCompletionFeature}})(f||(t.ProposedFeatures=f={}))})),Tn=f((t=>{var n=t&&t.__createBinding||(Object.create?(function(t,n,i,o){o===void 0&&(o=i);var s=Object.getOwnPropertyDescriptor(n,i);(!s||(`get`in s?!n.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return n[i]}}),Object.defineProperty(t,o,s)}):(function(t,n,i,o){o===void 0&&(o=i),t[o]=n[i]})),i=t&&t.__exportStar||function(t,i){for(var o in t)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&n(i,t,o)};Object.defineProperty(t,"__esModule",{value:!0}),t.createConnection=t.Files=void 0;let o=s(`node:util`),c=k(),u=bn(),f=xn(),p=Sn();i(Sn(),t),i(wn(),t);var h;(function(t){t.uriToFilePath=f.uriToFilePath,t.resolveGlobalNodePath=f.resolveGlobalNodePath,t.resolveGlobalYarnPath=f.resolveGlobalYarnPath,t.resolve=f.resolve,t.resolveModulePath=f.resolveModulePath})(h||(t.Files=h={}));let g=!1,_;function setupExitTimer(){let t=`--clientProcessId`;function runTimer(t){try{let n=parseInt(t);isNaN(n)||(_=setInterval(()=>{try{process.kill(n,0)}catch{process.exit(+!g)}},3e3))}catch{}}for(let n=2;n<process.argv.length;n++){let i=process.argv[n];if(i===t&&n+1<process.argv.length){runTimer(process.argv[n+1]);return}else{let n=i.split(`=`);n[0]===t&&runTimer(n[1])}}}setupExitTimer();let x={initialize:t=>{let n=t.processId;c.number(n)&&_===void 0&&setInterval(()=>{try{process.kill(n,0)}catch{process.exit(+!g)}},3e3)},get shutdownReceived(){return g},set shutdownReceived(t){g=t},exit:t=>{process.exit(t)}};function createConnection(t,n,i,o){let s,c,u,f;return t!==void 0&&t.__brand===`features`&&(s=t,t=n,n=i,i=o),p.ConnectionStrategy.is(t)||p.ConnectionOptions.is(t)?f=t:(c=t,u=n,f=i),_createConnection(c,u,f,s)}t.createConnection=createConnection;function _createConnection(t,n,i,o){let s=!1;if(!t&&!n&&process.argv.length>2){let i,o,c=process.argv.slice(2);for(let u=0;u<c.length;u++){let h=c[u];if(h===`--node-ipc`){t=new p.IPCMessageReader(process),n=new p.IPCMessageWriter(process);break}else if(h===`--stdio`){s=!0,t=process.stdin,n=process.stdout;break}else if(h===`--socket`){i=parseInt(c[u+1]);break}else if(h===`--pipe`){o=c[u+1];break}else{var f=h.split(`=`);if(f[0]===`--socket`){i=parseInt(f[1]);break}else if(f[0]===`--pipe`){o=f[1];break}}}if(i){let o=(0,p.createServerSocketTransport)(i);t=o[0],n=o[1]}else if(o){let i=(0,p.createServerPipeTransport)(o);t=i[0],n=i[1]}}var h=`Use arguments of createConnection or set command line parameters: '--node-ipc', '--stdio' or '--socket={number}'`;if(!t)throw Error(`Connection input stream is not set. `+h);if(!n)throw Error(`Connection output stream is not set. `+h);if(c.func(t.read)&&c.func(t.on)){let n=t;n.on(`end`,()=>{process.exit(+!g)}),n.on(`close`,()=>{process.exit(+!g)})}let connectionFactory=o=>{let c=(0,p.createProtocolConnection)(t,n,o,i);return s&&patchConsole(o),c};return(0,u.createConnection)(connectionFactory,x,o)}function patchConsole(t){function serialize(t){return t.map(t=>typeof t==`string`?t:(0,o.inspect)(t)).join(` `)}let n=new Map;console.assert=function assert(n,...i){if(!n)if(i.length===0)t.error(`Assertion failed`);else{let[n,...o]=i;t.error(`Assertion failed: ${n} ${serialize(o)}`)}},console.count=function count(i=`default`){let o=String(i),s=n.get(o)??0;s+=1,n.set(o,s),t.log(`${o}: ${o}`)},console.countReset=function countReset(t){t===void 0?n.clear():n.delete(String(t))},console.debug=function debug(...n){t.log(serialize(n))},console.dir=function dir(n,i){t.log((0,o.inspect)(n,i))},console.log=function log(...n){t.log(serialize(n))},console.error=function error(...n){t.error(serialize(n))},console.trace=function trace(...n){let i=Error().stack.replace(/(.+\n){2}/,``),o=`Trace`;n.length!==0&&(o+=`: ${serialize(n)}`),t.log(`${o}\n${i}`)},console.warn=function warn(...n){t.warn(serialize(n))}}}));function isAstNode(t){return typeof t==`object`&&!!t&&typeof t.$type==`string`}function isReference(t){return typeof t==`object`&&!!t&&typeof t.$refText==`string`}function isAstNodeDescription(t){return typeof t==`object`&&!!t&&typeof t.name==`string`&&typeof t.type==`string`&&typeof t.path==`string`}function isLinkingError(t){return typeof t==`object`&&!!t&&isAstNode(t.container)&&isReference(t.reference)&&typeof t.message==`string`}var AbstractAstReflection=class{constructor(){this.subtypes={},this.allSubtypes={}}isInstance(t,n){return isAstNode(t)&&this.isSubtype(t.$type,n)}isSubtype(t,n){if(t===n)return!0;let i=this.subtypes[t];i||=this.subtypes[t]={};let o=i[n];if(o!==void 0)return o;{let o=this.computeIsSubtype(t,n);return i[n]=o,o}}getAllSubTypes(t){let n=this.allSubtypes[t];if(n)return n;{let n=this.getAllTypes(),i=[];for(let o of n)this.isSubtype(o,t)&&i.push(o);return this.allSubtypes[t]=i,i}}};function isCompositeCstNode(t){return typeof t==`object`&&!!t&&Array.isArray(t.content)}function isLeafCstNode(t){return typeof t==`object`&&!!t&&typeof t.tokenType==`object`}function isRootCstNode(t){return isCompositeCstNode(t)&&typeof t.fullText==`string`}const En=`AbstractRule`,Dn=`AbstractType`,On=`Condition`,kn=`TypeDefinition`,An=`ValueLiteral`,jn=`AbstractElement`;function isAbstractElement(t){return J.isInstance(t,jn)}const Mn=`ArrayLiteral`,Nn=`ArrayType`;function isArrayType(t){return J.isInstance(t,Nn)}const Pn=`BooleanLiteral`;function isBooleanLiteral(t){return J.isInstance(t,Pn)}const Fn=`Conjunction`;function isConjunction(t){return J.isInstance(t,Fn)}const In=`Disjunction`;function isDisjunction(t){return J.isInstance(t,In)}const Ln=`Grammar`,Rn=`GrammarImport`,zn=`InferredType`;function isInferredType(t){return J.isInstance(t,zn)}const Bn=`Interface`;function isInterface(t){return J.isInstance(t,Bn)}const Vn=`NamedArgument`,Hn=`Negation`;function isNegation(t){return J.isInstance(t,Hn)}const Un=`NumberLiteral`,Wn=`Parameter`,Gn=`ParameterReference`;function isParameterReference(t){return J.isInstance(t,Gn)}const Kn=`ParserRule`;function isParserRule(t){return J.isInstance(t,Kn)}const qn=`ReferenceType`;function isReferenceType(t){return J.isInstance(t,qn)}const Jn=`ReturnType`;function isReturnType(t){return J.isInstance(t,Jn)}const Yn=`SimpleType`;function isSimpleType(t){return J.isInstance(t,Yn)}const Xn=`StringLiteral`,Zn=`TerminalRule`;function isTerminalRule(t){return J.isInstance(t,Zn)}const Qn=`Type`;function isType(t){return J.isInstance(t,Qn)}const $n=`TypeAttribute`,er=`UnionType`;function isUnionType(t){return J.isInstance(t,er)}const tr=`Action`;function isAction(t){return J.isInstance(t,tr)}const nr=`Alternatives`;function isAlternatives(t){return J.isInstance(t,nr)}const rr=`Assignment`;function isAssignment(t){return J.isInstance(t,rr)}const ir=`CharacterRange`;function isCharacterRange(t){return J.isInstance(t,ir)}const ar=`CrossReference`;function isCrossReference(t){return J.isInstance(t,ar)}const or=`EndOfFile`;function isEndOfFile(t){return J.isInstance(t,or)}const sr=`Group`;function isGroup(t){return J.isInstance(t,sr)}const cr=`Keyword`;function isKeyword(t){return J.isInstance(t,cr)}const lr=`NegatedToken`;function isNegatedToken(t){return J.isInstance(t,lr)}const ur=`RegexToken`;function isRegexToken(t){return J.isInstance(t,ur)}const dr=`RuleCall`;function isRuleCall(t){return J.isInstance(t,dr)}const fr=`TerminalAlternatives`;function isTerminalAlternatives(t){return J.isInstance(t,fr)}const pr=`TerminalGroup`;function isTerminalGroup(t){return J.isInstance(t,pr)}const mr=`TerminalRuleCall`;function isTerminalRuleCall(t){return J.isInstance(t,mr)}const hr=`UnorderedGroup`;function isUnorderedGroup(t){return J.isInstance(t,hr)}const gr=`UntilToken`;function isUntilToken(t){return J.isInstance(t,gr)}const _r=`Wildcard`;function isWildcard(t){return J.isInstance(t,_r)}var LangiumGrammarAstReflection=class extends AbstractAstReflection{getAllTypes(){return[jn,En,Dn,tr,nr,Mn,Nn,rr,Pn,ir,On,Fn,ar,In,or,Ln,Rn,sr,zn,Bn,cr,Vn,lr,Hn,Un,Wn,Gn,Kn,qn,ur,Jn,dr,Yn,Xn,fr,pr,Zn,mr,Qn,$n,kn,er,hr,gr,An,_r]}computeIsSubtype(t,n){switch(t){case tr:case nr:case rr:case ir:case ar:case or:case sr:case cr:case lr:case ur:case dr:case fr:case pr:case mr:case hr:case gr:case _r:return this.isSubtype(jn,n);case Mn:case Un:case Xn:return this.isSubtype(An,n);case Nn:case qn:case Yn:case er:return this.isSubtype(kn,n);case Pn:return this.isSubtype(`Condition`,n)||this.isSubtype(`ValueLiteral`,n);case Fn:case In:case Hn:case Gn:return this.isSubtype(On,n);case zn:case Bn:case Qn:return this.isSubtype(Dn,n);case Kn:return this.isSubtype(`AbstractRule`,n)||this.isSubtype(`AbstractType`,n);case Zn:return this.isSubtype(En,n);default:return!1}}getReferenceType(t){let n=`${t.container.$type}:${t.property}`;switch(n){case`Action:type`:case`CrossReference:type`:case`Interface:superTypes`:case`ParserRule:returnType`:case`SimpleType:typeRef`:return Dn;case`Grammar:hiddenTokens`:case`ParserRule:hiddenTokens`:case`RuleCall:rule`:return En;case`Grammar:usedGrammars`:return Ln;case`NamedArgument:parameter`:case`ParameterReference:parameter`:return Wn;case`TerminalRuleCall:rule`:return Zn;default:throw Error(`${n} is not a valid reference id.`)}}getTypeMetaData(t){switch(t){case jn:return{name:jn,properties:[{name:`cardinality`},{name:`lookahead`}]};case Mn:return{name:Mn,properties:[{name:`elements`,defaultValue:[]}]};case Nn:return{name:Nn,properties:[{name:`elementType`}]};case Pn:return{name:Pn,properties:[{name:`true`,defaultValue:!1}]};case Fn:return{name:Fn,properties:[{name:`left`},{name:`right`}]};case In:return{name:In,properties:[{name:`left`},{name:`right`}]};case Ln:return{name:Ln,properties:[{name:`definesHiddenTokens`,defaultValue:!1},{name:`hiddenTokens`,defaultValue:[]},{name:`imports`,defaultValue:[]},{name:`interfaces`,defaultValue:[]},{name:`isDeclared`,defaultValue:!1},{name:`name`},{name:`rules`,defaultValue:[]},{name:`types`,defaultValue:[]},{name:`usedGrammars`,defaultValue:[]}]};case Rn:return{name:Rn,properties:[{name:`path`}]};case zn:return{name:zn,properties:[{name:`name`}]};case Bn:return{name:Bn,properties:[{name:`attributes`,defaultValue:[]},{name:`name`},{name:`superTypes`,defaultValue:[]}]};case Vn:return{name:Vn,properties:[{name:`calledByName`,defaultValue:!1},{name:`parameter`},{name:`value`}]};case Hn:return{name:Hn,properties:[{name:`value`}]};case Un:return{name:Un,properties:[{name:`value`}]};case Wn:return{name:Wn,properties:[{name:`name`}]};case Gn:return{name:Gn,properties:[{name:`parameter`}]};case Kn:return{name:Kn,properties:[{name:`dataType`},{name:`definesHiddenTokens`,defaultValue:!1},{name:`definition`},{name:`entry`,defaultValue:!1},{name:`fragment`,defaultValue:!1},{name:`hiddenTokens`,defaultValue:[]},{name:`inferredType`},{name:`name`},{name:`parameters`,defaultValue:[]},{name:`returnType`},{name:`wildcard`,defaultValue:!1}]};case qn:return{name:qn,properties:[{name:`referenceType`}]};case Jn:return{name:Jn,properties:[{name:`name`}]};case Yn:return{name:Yn,properties:[{name:`primitiveType`},{name:`stringType`},{name:`typeRef`}]};case Xn:return{name:Xn,properties:[{name:`value`}]};case Zn:return{name:Zn,properties:[{name:`definition`},{name:`fragment`,defaultValue:!1},{name:`hidden`,defaultValue:!1},{name:`name`},{name:`type`}]};case Qn:return{name:Qn,properties:[{name:`name`},{name:`type`}]};case $n:return{name:$n,properties:[{name:`defaultValue`},{name:`isOptional`,defaultValue:!1},{name:`name`},{name:`type`}]};case er:return{name:er,properties:[{name:`types`,defaultValue:[]}]};case tr:return{name:tr,properties:[{name:`cardinality`},{name:`feature`},{name:`inferredType`},{name:`lookahead`},{name:`operator`},{name:`type`}]};case nr:return{name:nr,properties:[{name:`cardinality`},{name:`elements`,defaultValue:[]},{name:`lookahead`}]};case rr:return{name:rr,properties:[{name:`cardinality`},{name:`feature`},{name:`lookahead`},{name:`operator`},{name:`terminal`}]};case ir:return{name:ir,properties:[{name:`cardinality`},{name:`left`},{name:`lookahead`},{name:`right`}]};case ar:return{name:ar,properties:[{name:`cardinality`},{name:`deprecatedSyntax`,defaultValue:!1},{name:`lookahead`},{name:`terminal`},{name:`type`}]};case or:return{name:or,properties:[{name:`cardinality`},{name:`lookahead`}]};case sr:return{name:sr,properties:[{name:`cardinality`},{name:`elements`,defaultValue:[]},{name:`guardCondition`},{name:`lookahead`}]};case cr:return{name:cr,properties:[{name:`cardinality`},{name:`lookahead`},{name:`value`}]};case lr:return{name:lr,properties:[{name:`cardinality`},{name:`lookahead`},{name:`terminal`}]};case ur:return{name:ur,properties:[{name:`cardinality`},{name:`lookahead`},{name:`regex`}]};case dr:return{name:dr,properties:[{name:`arguments`,defaultValue:[]},{name:`cardinality`},{name:`lookahead`},{name:`rule`}]};case fr:return{name:fr,properties:[{name:`cardinality`},{name:`elements`,defaultValue:[]},{name:`lookahead`}]};case pr:return{name:pr,properties:[{name:`cardinality`},{name:`elements`,defaultValue:[]},{name:`lookahead`}]};case mr:return{name:mr,properties:[{name:`cardinality`},{name:`lookahead`},{name:`rule`}]};case hr:return{name:hr,properties:[{name:`cardinality`},{name:`elements`,defaultValue:[]},{name:`lookahead`}]};case gr:return{name:gr,properties:[{name:`cardinality`},{name:`lookahead`},{name:`terminal`}]};case _r:return{name:_r,properties:[{name:`cardinality`},{name:`lookahead`}]};default:return{name:t,properties:[]}}}};const J=new LangiumGrammarAstReflection;var vr=class StreamImpl{constructor(t,n){this.startFn=t,this.nextFn=n}iterator(){let t={state:this.startFn(),next:()=>this.nextFn(t.state),[Symbol.iterator]:()=>t};return t}[Symbol.iterator](){return this.iterator()}isEmpty(){return!!this.iterator().next().done}count(){let t=this.iterator(),n=0,i=t.next();for(;!i.done;)n++,i=t.next();return n}toArray(){let t=[],n=this.iterator(),i;do i=n.next(),i.value!==void 0&&t.push(i.value);while(!i.done);return t}toSet(){return new Set(this)}toMap(t,n){let i=this.map(i=>[t?t(i):i,n?n(i):i]);return new Map(i)}toString(){return this.join()}concat(t){return new StreamImpl(()=>({first:this.startFn(),firstDone:!1,iterator:t[Symbol.iterator]()}),t=>{let n;if(!t.firstDone){do if(n=this.nextFn(t.first),!n.done)return n;while(!n.done);t.firstDone=!0}do if(n=t.iterator.next(),!n.done)return n;while(!n.done);return Y})}join(t=`,`){let n=this.iterator(),i=``,o,s=!1;do o=n.next(),o.done||(s&&(i+=t),i+=toString$1(o.value)),s=!0;while(!o.done);return i}indexOf(t,n=0){let i=this.iterator(),o=0,s=i.next();for(;!s.done;){if(o>=n&&s.value===t)return o;s=i.next(),o++}return-1}every(t){let n=this.iterator(),i=n.next();for(;!i.done;){if(!t(i.value))return!1;i=n.next()}return!0}some(t){let n=this.iterator(),i=n.next();for(;!i.done;){if(t(i.value))return!0;i=n.next()}return!1}forEach(t){let n=this.iterator(),i=0,o=n.next();for(;!o.done;)t(o.value,i),o=n.next(),i++}map(t){return new StreamImpl(this.startFn,n=>{let{done:i,value:o}=this.nextFn(n);return i?Y:{done:!1,value:t(o)}})}filter(t){return new StreamImpl(this.startFn,n=>{let i;do if(i=this.nextFn(n),!i.done&&t(i.value))return i;while(!i.done);return Y})}nonNullable(){return this.filter(t=>t!=null)}reduce(t,n){let i=this.iterator(),o=n,s=i.next();for(;!s.done;)o=o===void 0?s.value:t(o,s.value),s=i.next();return o}reduceRight(t,n){return this.recursiveReduce(this.iterator(),t,n)}recursiveReduce(t,n,i){let o=t.next();if(o.done)return i;let s=this.recursiveReduce(t,n,i);return s===void 0?o.value:n(s,o.value)}find(t){let n=this.iterator(),i=n.next();for(;!i.done;){if(t(i.value))return i.value;i=n.next()}}findIndex(t){let n=this.iterator(),i=0,o=n.next();for(;!o.done;){if(t(o.value))return i;o=n.next(),i++}return-1}includes(t){let n=this.iterator(),i=n.next();for(;!i.done;){if(i.value===t)return!0;i=n.next()}return!1}flatMap(t){return new StreamImpl(()=>({this:this.startFn()}),n=>{do{if(n.iterator){let t=n.iterator.next();if(t.done)n.iterator=void 0;else return t}let{done:i,value:o}=this.nextFn(n.this);if(!i){let i=t(o);if(isIterable(i))n.iterator=i[Symbol.iterator]();else return{done:!1,value:i}}}while(n.iterator);return Y})}flat(t){if(t===void 0&&(t=1),t<=0)return this;let n=t>1?this.flat(t-1):this;return new StreamImpl(()=>({this:n.startFn()}),t=>{do{if(t.iterator){let n=t.iterator.next();if(n.done)t.iterator=void 0;else return n}let{done:i,value:o}=n.nextFn(t.this);if(!i)if(isIterable(o))t.iterator=o[Symbol.iterator]();else return{done:!1,value:o}}while(t.iterator);return Y})}head(){let t=this.iterator().next();if(!t.done)return t.value}tail(t=1){return new StreamImpl(()=>{let n=this.startFn();for(let i=0;i<t;i++)if(this.nextFn(n).done)return n;return n},this.nextFn)}limit(t){return new StreamImpl(()=>({size:0,state:this.startFn()}),n=>(n.size++,n.size>t?Y:this.nextFn(n.state)))}distinct(t){return new StreamImpl(()=>({set:new Set,internalState:this.startFn()}),n=>{let i;do if(i=this.nextFn(n.internalState),!i.done){let o=t?t(i.value):i.value;if(!n.set.has(o))return n.set.add(o),i}while(!i.done);return Y})}exclude(t,n){let i=new Set;for(let o of t){let t=n?n(o):o;i.add(t)}return this.filter(t=>{let o=n?n(t):t;return!i.has(o)})}};function toString$1(t){return typeof t==`string`?t:t===void 0?`undefined`:typeof t.toString==`function`?t.toString():Object.prototype.toString.call(t)}i(toString$1,`toString`);function isIterable(t){return!!t&&typeof t[Symbol.iterator]==`function`}const yr=new vr(()=>void 0,()=>Y),Y=Object.freeze({done:!0,value:void 0});function stream(...t){if(t.length===1){let n=t[0];if(n instanceof vr)return n;if(isIterable(n))return new vr(()=>n[Symbol.iterator](),t=>t.next());if(typeof n.length==`number`)return new vr(()=>({index:0}),t=>t.index<n.length?{done:!1,value:n[t.index++]}:Y)}return t.length>1?new vr(()=>({collIndex:0,arrIndex:0}),n=>{do{if(n.iterator){let t=n.iterator.next();if(!t.done)return t;n.iterator=void 0}if(n.array){if(n.arrIndex<n.array.length)return{done:!1,value:n.array[n.arrIndex++]};n.array=void 0,n.arrIndex=0}if(n.collIndex<t.length){let i=t[n.collIndex++];isIterable(i)?n.iterator=i[Symbol.iterator]():i&&typeof i.length==`number`&&(n.array=i)}}while(n.iterator||n.array||n.collIndex<t.length);return Y}):yr}var TreeStreamImpl=class extends vr{constructor(t,n,i){super(()=>({iterators:i?.includeRoot?[[t][Symbol.iterator]()]:[n(t)[Symbol.iterator]()],pruned:!1}),t=>{for(t.pruned&&=(t.iterators.pop(),!1);t.iterators.length>0;){let i=t.iterators[t.iterators.length-1].next();if(i.done)t.iterators.pop();else return t.iterators.push(n(i.value)[Symbol.iterator]()),i}return Y})}iterator(){let t={state:this.startFn(),next:()=>this.nextFn(t.state),prune:()=>{t.state.pruned=!0},[Symbol.iterator]:()=>t};return t}},br;(function(t){function sum(t){return t.reduce((t,n)=>t+n,0)}t.sum=sum;function product(t){return t.reduce((t,n)=>t*n,0)}t.product=product;function min(t){return t.reduce((t,n)=>Math.min(t,n))}t.min=min;function max(t){return t.reduce((t,n)=>Math.max(t,n))}t.max=max})(br||={});function streamCst(t){return new TreeStreamImpl(t,t=>isCompositeCstNode(t)?t.content:[],{includeRoot:!0})}function flattenCst(t){return streamCst(t).filter(isLeafCstNode)}function isChildNode(t,n){for(;t.container;)if(t=t.container,t===n)return!0;return!1}function tokenToRange(t){return{start:{character:t.startColumn-1,line:t.startLine-1},end:{character:t.endColumn,line:t.endLine-1}}}function toDocumentSegment(t){if(!t)return;let{offset:n,end:i,range:o}=t;return{range:o,offset:n,end:i,length:i-n}}var xr;(function(t){t[t.Before=0]=`Before`,t[t.After=1]=`After`,t[t.OverlapFront=2]=`OverlapFront`,t[t.OverlapBack=3]=`OverlapBack`,t[t.Inside=4]=`Inside`,t[t.Outside=5]=`Outside`})(xr||={});function compareRange(t,n){if(t.end.line<n.start.line||t.end.line===n.start.line&&t.end.character<=n.start.character)return xr.Before;if(t.start.line>n.end.line||t.start.line===n.end.line&&t.start.character>=n.end.character)return xr.After;let i=t.start.line>n.start.line||t.start.line===n.start.line&&t.start.character>=n.start.character,o=t.end.line<n.end.line||t.end.line===n.end.line&&t.end.character<=n.end.character;return i&&o?xr.Inside:i?xr.OverlapBack:o?xr.OverlapFront:xr.Outside}function inRange(t,n){return compareRange(t,n)>xr.After}const Sr=/^[\w\p{L}]$/u;function findDeclarationNodeAtOffset(t,n,i=Sr){if(t){if(n>0){let o=n-t.offset,s=t.text.charAt(o);i.test(s)||n--}return findLeafNodeAtOffset(t,n)}}function findCommentNode(t,n){if(t){let i=getPreviousNode(t,!0);if(i&&isCommentNode(i,n))return i;if(isRootCstNode(t)){let i=t.content.findIndex(t=>!t.hidden);for(let o=i-1;o>=0;o--){let i=t.content[o];if(isCommentNode(i,n))return i}}}}function isCommentNode(t,n){return isLeafCstNode(t)&&n.includes(t.tokenType.name)}function findLeafNodeAtOffset(t,n){if(isLeafCstNode(t))return t;if(isCompositeCstNode(t)){let i=binarySearch(t,n,!1);if(i)return findLeafNodeAtOffset(i,n)}}function findLeafNodeBeforeOffset(t,n){if(isLeafCstNode(t))return t;if(isCompositeCstNode(t)){let i=binarySearch(t,n,!0);if(i)return findLeafNodeBeforeOffset(i,n)}}function binarySearch(t,n,i){let o=0,s=t.content.length-1,c;for(;o<=s;){let u=Math.floor((o+s)/2),f=t.content[u];if(f.offset<=n&&f.end>n)return f;f.end<=n?(c=i?f:void 0,o=u+1):s=u-1}return c}function getPreviousNode(t,n=!0){for(;t.container;){let i=t.container,o=i.content.indexOf(t);for(;o>0;){o--;let t=i.content[o];if(n||!t.hidden)return t}t=i}}function getNextNode(t,n=!0){for(;t.container;){let i=t.container,o=i.content.indexOf(t),s=i.content.length-1;for(;o<s;){o++;let t=i.content[o];if(n||!t.hidden)return t}t=i}}function getInteriorNodes(t,n){let i=getCommonParent(t,n);return i?i.parent.content.slice(i.a+1,i.b):[]}function getCommonParent(t,n){let i=getParentChain(t),o=getParentChain(n),s;for(let t=0;t<i.length&&t<o.length;t++){let n=i[t],c=o[t];if(n.parent===c.parent)s={parent:n.parent,a:n.index,b:c.index};else break}return s}function getParentChain(t){let n=[];for(;t.container;){let i=t.container,o=i.content.indexOf(t);n.push({parent:i,index:o}),t=i}return n.reverse()}var Cr=c({assignMandatoryProperties:()=>assignMandatoryProperties,copyAstNode:()=>copyAstNode,findLocalReferences:()=>findLocalReferences,findRootNode:()=>findRootNode,getContainerOfType:()=>getContainerOfType,getDocument:()=>getDocument,hasContainerOfType:()=>hasContainerOfType,linkContentToContainer:()=>linkContentToContainer,streamAllContents:()=>streamAllContents,streamAst:()=>streamAst,streamContents:()=>streamContents,streamReferences:()=>streamReferences});function linkContentToContainer(t){for(let[n,i]of Object.entries(t))n.startsWith(`$`)||(Array.isArray(i)?i.forEach((i,o)=>{isAstNode(i)&&(i.$container=t,i.$containerProperty=n,i.$containerIndex=o)}):isAstNode(i)&&(i.$container=t,i.$containerProperty=n))}function getContainerOfType(t,n){let i=t;for(;i;){if(n(i))return i;i=i.$container}}function hasContainerOfType(t,n){let i=t;for(;i;){if(n(i))return!0;i=i.$container}return!1}function getDocument(t){let n=findRootNode(t).$document;if(!n)throw Error(`AST node has no document.`);return n}function findRootNode(t){for(;t.$container;)t=t.$container;return t}function streamContents(t,n){if(!t)throw Error(`Node must be an AstNode.`);let i=n?.range;return new vr(()=>({keys:Object.keys(t),keyIndex:0,arrayIndex:0}),n=>{for(;n.keyIndex<n.keys.length;){let o=n.keys[n.keyIndex];if(!o.startsWith(`$`)){let s=t[o];if(isAstNode(s)){if(n.keyIndex++,isAstNodeInRange(s,i))return{done:!1,value:s}}else if(Array.isArray(s)){for(;n.arrayIndex<s.length;){let t=s[n.arrayIndex++];if(isAstNode(t)&&isAstNodeInRange(t,i))return{done:!1,value:t}}n.arrayIndex=0}}n.keyIndex++}return Y})}function streamAllContents(t,n){if(!t)throw Error(`Root node must be an AstNode.`);return new TreeStreamImpl(t,t=>streamContents(t,n))}function streamAst(t,n){if(!t)throw Error(`Root node must be an AstNode.`);return n?.range&&!isAstNodeInRange(t,n.range)?new TreeStreamImpl(t,()=>[]):new TreeStreamImpl(t,t=>streamContents(t,n),{includeRoot:!0})}function isAstNodeInRange(t,n){if(!n)return!0;let i=t.$cstNode?.range;return i?inRange(i,n):!1}function streamReferences(t){return new vr(()=>({keys:Object.keys(t),keyIndex:0,arrayIndex:0}),n=>{for(;n.keyIndex<n.keys.length;){let i=n.keys[n.keyIndex];if(!i.startsWith(`$`)){let o=t[i];if(isReference(o))return n.keyIndex++,{done:!1,value:{reference:o,container:t,property:i}};if(Array.isArray(o)){for(;n.arrayIndex<o.length;){let s=n.arrayIndex++,c=o[s];if(isReference(c))return{done:!1,value:{reference:c,container:t,property:i,index:s}}}n.arrayIndex=0}}n.keyIndex++}return Y})}function findLocalReferences(t,n=getDocument(t).parseResult.value){let i=[];return streamAst(n).forEach(n=>{streamReferences(n).forEach(n=>{n.reference.ref===t&&i.push(n.reference)})}),stream(i)}function assignMandatoryProperties(t,n){let i=t.getTypeMetaData(n.$type),o=n;for(let t of i.properties)t.defaultValue!==void 0&&o[t.name]===void 0&&(o[t.name]=copyDefaultValue(t.defaultValue))}function copyDefaultValue(t){return Array.isArray(t)?[...t.map(copyDefaultValue)]:t}function copyAstNode(t,n){let i={$type:t.$type};for(let[o,s]of Object.entries(t))if(!o.startsWith(`$`))if(isAstNode(s))i[o]=copyAstNode(s,n);else if(isReference(s))i[o]=n(i,o,s.$refNode,s.$refText);else if(Array.isArray(s)){let t=[];for(let c of s)isAstNode(c)?t.push(copyAstNode(c,n)):isReference(c)?t.push(n(i,o,c.$refNode,c.$refText)):t.push(c);i[o]=t}else i[o]=s;return linkContentToContainer(i),i}var ErrorWithLocation=class extends Error{constructor(t,n){super(t?`${n} at ${t.range.start.line}:${t.range.start.character}`:n)}};function assertUnreachable(t){throw Error(`Error! The input value was not handled.`)}const wr=/\r?\n/gm,Tr=new p;var TerminalRegExpVisitor=class extends h{constructor(){super(...arguments),this.isStarting=!0,this.endRegexpStack=[],this.multiline=!1}get endRegex(){return this.endRegexpStack.join(``)}reset(t){this.multiline=!1,this.regex=t,this.startRegexp=``,this.isStarting=!0,this.endRegexpStack=[]}visitGroup(t){t.quantifier&&(this.isStarting=!1,this.endRegexpStack=[])}visitCharacter(t){let n=String.fromCharCode(t.value);if(!this.multiline&&n===`
17
17
  `&&(this.multiline=!0),t.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{let t=escapeRegExp(n);this.endRegexpStack.push(t),this.isStarting&&(this.startRegexp+=t)}}visitSet(t){if(!this.multiline){let n=this.regex.substring(t.loc.begin,t.loc.end),i=new RegExp(n);this.multiline=!!`
18
18
  `.match(i)}if(t.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{let n=this.regex.substring(t.loc.begin,t.loc.end);this.endRegexpStack.push(n),this.isStarting&&(this.startRegexp+=n)}}visitChildren(t){t.type===`Group`&&t.quantifier||super.visitChildren(t)}};const Er=new TerminalRegExpVisitor;function isMultilineComment(t){try{return typeof t==`string`&&(t=new RegExp(t)),t=t.toString(),Er.reset(t),Er.visit(Tr.pattern(t)),Er.multiline}catch{return!1}}const Dr=`\f
19
19
  \r \v \xA0            \u2028\u2029   `.split(``);function isWhitespace(t){let n=typeof t==`string`?new RegExp(t):t;return Dr.some(t=>n.test(t))}function escapeRegExp(t){return t.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function partialMatches(t,n){let i=partialRegExp(t),o=n.match(i);return!!o&&o[0].length>0}function partialRegExp(t){typeof t==`string`&&(t=new RegExp(t));let n=t,i=t.source,o=0;function process(){let t=``,s;function appendRaw(n){t+=i.substr(o,n),o+=n}function appendOptional(n){t+=`(?:`+i.substr(o,n)+`|$)`,o+=n}for(;o<i.length;)switch(i[o]){case`\\`:switch(i[o+1]){case`c`:appendOptional(3);break;case`x`:appendOptional(4);break;case`u`:n.unicode?i[o+2]===`{`?appendOptional(i.indexOf(`}`,o)-o+1):appendOptional(6):appendOptional(2);break;case`p`:case`P`:n.unicode?appendOptional(i.indexOf(`}`,o)-o+1):appendOptional(2);break;case`k`:appendOptional(i.indexOf(`>`,o)-o+1);break;default:appendOptional(2);break}break;case`[`:s=/\[(?:\\.|.)*?\]/g,s.lastIndex=o,s=s.exec(i)||[],appendOptional(s[0].length);break;case`|`:case`^`:case`$`:case`*`:case`+`:case`?`:appendRaw(1);break;case`{`:s=/\{\d+,?\d*\}/g,s.lastIndex=o,s=s.exec(i),s?appendRaw(s[0].length):appendOptional(1);break;case`(`:if(i[o+1]===`?`)switch(i[o+2]){case`:`:t+=`(?:`,o+=3,t+=process()+`|$)`;break;case`=`:t+=`(?=`,o+=3,t+=process()+`)`;break;case`!`:s=o,o+=3,process(),t+=i.substr(s,o-s);break;case`<`:switch(i[o+3]){case`=`:case`!`:s=o,o+=4,process(),t+=i.substr(s,o-s);break;default:appendRaw(i.indexOf(`>`,o)-o+1),t+=process()+`|$)`;break}break}else appendRaw(1),t+=process()+`|$)`;break;case`)`:return++o,t;default:appendOptional(1);break}return t}return new RegExp(process(),t.flags)}var Or=c({findAssignment:()=>findAssignment,findNameAssignment:()=>findNameAssignment,findNodeForKeyword:()=>findNodeForKeyword,findNodeForProperty:()=>findNodeForProperty,findNodesForKeyword:()=>findNodesForKeyword,findNodesForKeywordInternal:()=>findNodesForKeywordInternal,findNodesForProperty:()=>findNodesForProperty,getActionAtElement:()=>getActionAtElement,getActionType:()=>getActionType,getAllReachableRules:()=>getAllReachableRules,getAllRulesUsedForCrossReferences:()=>getAllRulesUsedForCrossReferences,getCrossReferenceTerminal:()=>getCrossReferenceTerminal,getEntryRule:()=>getEntryRule,getExplicitRuleType:()=>getExplicitRuleType,getHiddenRules:()=>getHiddenRules,getRuleType:()=>getRuleType,getRuleTypeName:()=>getRuleTypeName,getTypeName:()=>getTypeName,isArrayCardinality:()=>isArrayCardinality,isArrayOperator:()=>isArrayOperator,isCommentTerminal:()=>isCommentTerminal,isDataType:()=>isDataType,isDataTypeRule:()=>isDataTypeRule,isOptionalCardinality:()=>isOptionalCardinality,terminalRegex:()=>terminalRegex});function getEntryRule(t){return t.rules.find(t=>isParserRule(t)&&t.entry)}function getHiddenRules(t){return t.rules.filter(t=>isTerminalRule(t)&&t.hidden)}function getAllReachableRules(t,n){let i=new Set,o=getEntryRule(t);if(!o)return new Set(t.rules);let s=[o].concat(getHiddenRules(t));for(let t of s)ruleDfs(t,i,n);let c=new Set;for(let n of t.rules)(i.has(n.name)||isTerminalRule(n)&&n.hidden)&&c.add(n);return c}function ruleDfs(t,n,i){n.add(t.name),streamAllContents(t).forEach(t=>{if(isRuleCall(t)||i&&isTerminalRuleCall(t)){let o=t.rule.ref;o&&!n.has(o.name)&&ruleDfs(o,n,i)}})}function getAllRulesUsedForCrossReferences(t){let n=new Set;return streamAllContents(t).forEach(t=>{isCrossReference(t)&&(isParserRule(t.type.ref)&&n.add(t.type.ref),isInferredType(t.type.ref)&&isParserRule(t.type.ref.$container)&&n.add(t.type.ref.$container))}),n}function getCrossReferenceTerminal(t){if(t.terminal)return t.terminal;if(t.type.ref)return findNameAssignment(t.type.ref)?.terminal}function isCommentTerminal(t){return t.hidden&&!isWhitespace(terminalRegex(t))}function findNodesForProperty(t,n){return!t||!n?[]:findNodesForPropertyInternal(t,n,t.astNode,!0)}function findNodeForProperty(t,n,i){if(!t||!n)return;let o=findNodesForPropertyInternal(t,n,t.astNode,!0);if(o.length!==0)return i=i===void 0?0:Math.max(0,Math.min(i,o.length-1)),o[i]}function findNodesForPropertyInternal(t,n,i,o){if(!o){let i=getContainerOfType(t.grammarSource,isAssignment);if(i&&i.feature===n)return[t]}return isCompositeCstNode(t)&&t.astNode===i?t.content.flatMap(t=>findNodesForPropertyInternal(t,n,i,!1)):[]}function findNodesForKeyword(t,n){return t?findNodesForKeywordInternal(t,n,t?.astNode):[]}function findNodeForKeyword(t,n,i){if(!t)return;let o=findNodesForKeywordInternal(t,n,t?.astNode);if(o.length!==0)return i=i===void 0?0:Math.max(0,Math.min(i,o.length-1)),o[i]}function findNodesForKeywordInternal(t,n,i){if(t.astNode!==i)return[];if(isKeyword(t.grammarSource)&&t.grammarSource.value===n)return[t];let o=streamCst(t).iterator(),s,c=[];do if(s=o.next(),!s.done){let t=s.value;t.astNode===i?isKeyword(t.grammarSource)&&t.grammarSource.value===n&&c.push(t):o.prune()}while(!s.done);return c}function findAssignment(t){let n=t.astNode;for(;n===t.container?.astNode;){let n=getContainerOfType(t.grammarSource,isAssignment);if(n)return n;t=t.container}}function findNameAssignment(t){let n=t;return isInferredType(n)&&(isAction(n.$container)?n=n.$container.$container:isParserRule(n.$container)?n=n.$container:assertUnreachable(n.$container)),findNameAssignmentInternal(t,n,new Map)}function findNameAssignmentInternal(t,n,i){function go(n,o){let s;return getContainerOfType(n,isAssignment)||(s=findNameAssignmentInternal(o,o,i)),i.set(t,s),s}if(i.has(t))return i.get(t);i.set(t,void 0);for(let o of streamAllContents(n))if(isAssignment(o)&&o.feature.toLowerCase()===`name`)return i.set(t,o),o;else if(isRuleCall(o)&&isParserRule(o.rule.ref))return go(o,o.rule.ref);else if(isSimpleType(o)&&o.typeRef?.ref)return go(o,o.typeRef.ref)}function getActionAtElement(t){let n=t.$container;if(isGroup(n)){let i=n.elements,o=i.indexOf(t);for(let t=o-1;t>=0;t--){let n=i[t];if(isAction(n))return n;{let n=streamAllContents(i[t]).find(isAction);if(n)return n}}}if(isAbstractElement(n))return getActionAtElement(n)}function isOptionalCardinality(t,n){return t===`?`||t===`*`||isGroup(n)&&!!n.guardCondition}function isArrayCardinality(t){return t===`*`||t===`+`}function isArrayOperator(t){return t===`+=`}function isDataTypeRule(t){return isDataTypeRuleInternal(t,new Set)}function isDataTypeRuleInternal(t,n){if(n.has(t))return!0;n.add(t);for(let i of streamAllContents(t))if(isRuleCall(i)){if(!i.rule.ref||isParserRule(i.rule.ref)&&!isDataTypeRuleInternal(i.rule.ref,n))return!1}else if(isAssignment(i))return!1;else if(isAction(i))return!1;return!!t.definition}function isDataType(t){return isDataTypeInternal(t.type,new Set)}function isDataTypeInternal(t,n){if(n.has(t))return!0;if(n.add(t),isArrayType(t)||isReferenceType(t))return!1;if(isUnionType(t))return t.types.every(t=>isDataTypeInternal(t,n));if(isSimpleType(t)){if(t.primitiveType!==void 0||t.stringType!==void 0)return!0;if(t.typeRef!==void 0){let i=t.typeRef.ref;return isType(i)?isDataTypeInternal(i.type,n):!1}else return!1}else return!1}function getExplicitRuleType(t){if(t.inferredType)return t.inferredType.name;if(t.dataType)return t.dataType;if(t.returnType){let n=t.returnType.ref;if(n&&(isParserRule(n)||isInterface(n)||isType(n)))return n.name}}function getTypeName(t){if(isParserRule(t))return isDataTypeRule(t)?t.name:getExplicitRuleType(t)??t.name;if(isInterface(t)||isType(t)||isReturnType(t))return t.name;if(isAction(t)){let n=getActionType(t);if(n)return n}else if(isInferredType(t))return t.name;throw Error(`Cannot get name of Unknown Type`)}function getActionType(t){if(t.inferredType)return t.inferredType.name;if(t.type?.ref)return getTypeName(t.type.ref)}function getRuleTypeName(t){return isTerminalRule(t)?t.type?.name??`string`:isDataTypeRule(t)?t.name:getExplicitRuleType(t)??t.name}function getRuleType(t){return isTerminalRule(t)?t.type?.name??`string`:getExplicitRuleType(t)??t.name}function terminalRegex(t){let n={s:!1,i:!1,u:!1},i=abstractElementToRegex(t.definition,n),o=Object.entries(n).filter(([,t])=>t).map(([t])=>t).join(``);return new RegExp(i,o)}const kr=`[\\s\\S]`;function abstractElementToRegex(t,n){if(isTerminalAlternatives(t))return terminalAlternativesToRegex(t);if(isTerminalGroup(t))return terminalGroupToRegex(t);if(isCharacterRange(t))return characterRangeToRegex(t);if(isTerminalRuleCall(t)){let n=t.rule.ref;if(!n)throw Error(`Missing rule reference.`);return withCardinality(abstractElementToRegex(n.definition),{cardinality:t.cardinality,lookahead:t.lookahead})}else if(isNegatedToken(t))return negateTokenToRegex(t);else if(isUntilToken(t))return untilTokenToRegex(t);else if(isRegexToken(t)){let i=t.regex.lastIndexOf(`/`),o=t.regex.substring(1,i),s=t.regex.substring(i+1);return n&&(n.i=s.includes(`i`),n.s=s.includes(`s`),n.u=s.includes(`u`)),withCardinality(o,{cardinality:t.cardinality,lookahead:t.lookahead,wrap:!1})}else if(isWildcard(t))return withCardinality(kr,{cardinality:t.cardinality,lookahead:t.lookahead});else throw Error(`Invalid terminal element: ${t?.$type}`)}function terminalAlternativesToRegex(t){return withCardinality(t.elements.map(t=>abstractElementToRegex(t)).join(`|`),{cardinality:t.cardinality,lookahead:t.lookahead})}function terminalGroupToRegex(t){return withCardinality(t.elements.map(t=>abstractElementToRegex(t)).join(``),{cardinality:t.cardinality,lookahead:t.lookahead})}function untilTokenToRegex(t){return withCardinality(`${kr}*?${abstractElementToRegex(t.terminal)}`,{cardinality:t.cardinality,lookahead:t.lookahead})}function negateTokenToRegex(t){return withCardinality(`(?!${abstractElementToRegex(t.terminal)})${kr}*?`,{cardinality:t.cardinality,lookahead:t.lookahead})}function characterRangeToRegex(t){return t.right?withCardinality(`[${keywordToRegex(t.left)}-${keywordToRegex(t.right)}]`,{cardinality:t.cardinality,lookahead:t.lookahead,wrap:!1}):withCardinality(keywordToRegex(t.left),{cardinality:t.cardinality,lookahead:t.lookahead,wrap:!1})}function keywordToRegex(t){return escapeRegExp(t.value)}function withCardinality(t,n){return(n.wrap!==!1||n.lookahead)&&(t=`(${n.lookahead??``}${t})`),n.cardinality?`${t}${n.cardinality}`:t}At();var X=Tn();function findNextFeatures(t,n){let i={stacks:t,tokens:n};return interpretTokens(i),i.stacks.flat().forEach(t=>{t.property=void 0}),findNextFeatureStacks(i.stacks).map(t=>t[t.length-1])}function findNextFeaturesInternal(t){let{next:n,cardinalities:i,visited:o,plus:s}=t,c=[],u=n.feature;if(o.has(u))return[];isGroup(u)||o.add(u);let f,p=u;for(;p.$container;)if(isGroup(p.$container)){f=p.$container;break}else if(isAbstractElement(p.$container))p=p.$container;else break;if(isArrayCardinality(p.cardinality)){let t=findFirstFeaturesInternal({next:{feature:p,type:n.type},cardinalities:i,visited:o,plus:s});for(let n of t)s.add(n.feature);c.push(...t)}if(f){let t=f.elements.indexOf(p);t!==void 0&&t<f.elements.length-1&&c.push(...findNextFeaturesInGroup({feature:f,type:n.type},t+1,i,o,s)),c.every(t=>isOptionalCardinality(t.feature.cardinality,t.feature)||isOptionalCardinality(i.get(t.feature))||s.has(t.feature))&&c.push(...findNextFeaturesInternal({next:{feature:f,type:n.type},cardinalities:i,visited:o,plus:s}))}return c}function findFirstFeatures(t){return isAstNode(t)&&(t={feature:t}),findFirstFeaturesInternal({next:t,cardinalities:new Map,visited:new Set,plus:new Set})}function findFirstFeaturesInternal(t){let{next:n,cardinalities:i,visited:o,plus:s}=t;if(n===void 0)return[];let{feature:c,type:u}=n;if(isGroup(c))return o.has(c)?[]:(o.add(c),findNextFeaturesInGroup(n,0,i,o,s).map(t=>modifyCardinality(t,c.cardinality,i)));if(isAlternatives(c)||isUnorderedGroup(c))return c.elements.flatMap(t=>findFirstFeaturesInternal({next:{feature:t,type:u,property:n.property},cardinalities:i,visited:o,plus:s})).map(t=>modifyCardinality(t,c.cardinality,i));if(isAssignment(c))return findFirstFeaturesInternal({next:{feature:c.terminal,type:u,property:n.property??c.feature},cardinalities:i,visited:o,plus:s}).map(t=>modifyCardinality(t,c.cardinality,i));if(isAction(c))return findNextFeaturesInternal({next:{feature:c,type:getTypeName(c),property:n.property??c.feature},cardinalities:i,visited:o,plus:s});if(isRuleCall(c)&&isParserRule(c.rule.ref)){let t=c.rule.ref;return findFirstFeaturesInternal({next:{feature:t.definition,type:t.fragment||t.dataType?void 0:getExplicitRuleType(t)??t.name,property:n.property},cardinalities:i,visited:o,plus:s}).map(t=>modifyCardinality(t,c.cardinality,i))}else return[n]}function modifyCardinality(t,n,i){return i.set(t.feature,n),t}function findNextFeaturesInGroup(t,n,i,o,s){let c=[],u;for(;n<t.feature.elements.length&&(u={feature:t.feature.elements[n++],type:t.type},c.push(...findFirstFeaturesInternal({next:u,cardinalities:i,visited:o,plus:s})),isOptionalCardinality(u.feature.cardinality??i.get(u.feature),u.feature)););return c}function interpretTokens(t){for(let n of t.tokens)t.stacks=findNextFeatureStacks(t.stacks,n)}function findNextFeatureStacks(t,n){let i=[];for(let o of t)i.push(...interpretStackToken(o,n));return i}function interpretStackToken(t,n){let i=new Map,o=new Set(t.map(t=>t.feature).filter(isPlusFeature)),s=[];for(;t.length>0;){let c=findNextFeaturesInternal({next:t.pop(),cardinalities:i,plus:o,visited:new Set}).filter(t=>n?featureMatches(t.feature,n):!0);for(let n of c)s.push([...t,n]);if(!c.every(t=>isOptionalCardinality(t.feature.cardinality,t.feature)||isOptionalCardinality(i.get(t.feature))))break}return s}function isPlusFeature(t){if(t.cardinality===`+`)return!0;let n=getContainerOfType(t,isAssignment);return!!(n&&n.cardinality===`+`)}function featureMatches(t,n){if(isKeyword(t))return t.value===n.image;if(isRuleCall(t))return ruleMatches(t.rule.ref,n);if(isCrossReference(t)){let i=getCrossReferenceTerminal(t);if(i)return featureMatches(i,n)}return!1}function ruleMatches(t,n){return isParserRule(t)?findFirstFeatures(t.definition).some(t=>featureMatches(t.feature,n)):isTerminalRule(t)?terminalRegex(t).test(n.image):!1}function mergeCompletionProviderOptions(t){let n=Array.from(new Set(t.flatMap(t=>t?.triggerCharacters??[]))),i=Array.from(new Set(t.flatMap(t=>t?.allCommitCharacters??[])));return{triggerCharacters:n.length>0?n:void 0,allCommitCharacters:i.length>0?i:void 0}}var DefaultCompletionProvider=class{constructor(t){this.scopeProvider=t.references.ScopeProvider,this.grammar=t.Grammar,this.completionParser=t.parser.CompletionParser,this.nameProvider=t.references.NameProvider,this.lexer=t.parser.Lexer,this.nodeKindProvider=t.shared.lsp.NodeKindProvider,this.fuzzyMatcher=t.shared.lsp.FuzzyMatcher,this.grammarConfig=t.parser.GrammarConfig,this.astReflection=t.shared.AstReflection,this.documentationProvider=t.documentation.DocumentationProvider}async getCompletion(t,n,i){let o=[],s=this.buildContexts(t,n.position),acceptor=(t,n)=>{let i=this.fillCompletionItem(t,n);i&&o.push(i)},distinctionFunction=t=>isKeyword(t.feature)?t.feature.value:t.feature,c=[];for(let t of s)if(await Promise.all(stream(t.features).distinct(distinctionFunction).exclude(c).map(n=>this.completionFor(t,n,acceptor))),c.push(...t.features),!this.continueCompletion(o))break;return X.CompletionList.create(this.deduplicateItems(o),!0)}deduplicateItems(t){return stream(t).distinct(t=>`${t.kind}_${t.label}_${t.detail}`).toArray()}findFeaturesAt(t,n){let i=t.getText({start:X.Position.create(0,0),end:t.positionAt(n)}),o=this.completionParser.parse(i),s=o.tokens;if(o.tokenIndex===0){let t=getEntryRule(this.grammar),n=findFirstFeatures({feature:t.definition,type:getExplicitRuleType(t)});return s.length>0?(s.shift(),findNextFeatures(n.map(t=>[t]),s)):n}let c=[...s].splice(o.tokenIndex);return findNextFeatures([o.elementStack.map(t=>({feature:t}))],c)}*buildContexts(t,n){let i=t.parseResult.value.$cstNode;if(!i)return;let o=t.textDocument,s=o.getText(),c=o.offsetAt(n),u={document:t,textDocument:o,offset:c,position:n},f=this.findDataTypeRuleStart(i,c);if(f){let[t,n]=f,s=findLeafNodeBeforeOffset(i,t)?.astNode;yield Object.assign(Object.assign({},u),{node:s,tokenOffset:t,tokenEndOffset:n,features:this.findFeaturesAt(o,t)})}let{nextTokenStart:p,nextTokenEnd:h,previousTokenStart:g,previousTokenEnd:_}=this.backtrackToAnyToken(s,c),x=p;c<=p&&g!==void 0&&(x=g);let S=findLeafNodeBeforeOffset(i,x)?.astNode,T=!0;if(g!==void 0&&_!==void 0&&_===c&&(yield Object.assign(Object.assign({},u),{node:S,tokenOffset:g,tokenEndOffset:_,features:this.findFeaturesAt(o,g)}),T=this.performNextTokenCompletion(t,s.substring(g,_),g,_),T&&(yield Object.assign(Object.assign({},u),{node:S,tokenOffset:_,tokenEndOffset:_,features:this.findFeaturesAt(o,_)}))),S)T&&(yield Object.assign(Object.assign({},u),{node:S,tokenOffset:p,tokenEndOffset:h,features:this.findFeaturesAt(o,p)}));else{let t=getEntryRule(this.grammar);if(!t)throw Error(`Missing entry parser rule`);yield Object.assign(Object.assign({},u),{tokenOffset:p,tokenEndOffset:h,features:findFirstFeatures(t.definition)})}}performNextTokenCompletion(t,n,i,o){return/\P{L}$/u.test(n)}findDataTypeRuleStart(t,n){let i=findDeclarationNodeAtOffset(t,n,this.grammarConfig.nameRegexp),o=!!getContainerOfType(i?.grammarSource,isParserRule)?.dataType;if(o){for(;o;)i=i?.container,o=!!getContainerOfType(i?.grammarSource,isParserRule)?.dataType;if(i)return[i.offset,i.end]}}continueCompletion(t){return t.length===0}backtrackToAnyToken(t,n){let i=this.lexer.tokenize(t).tokens;if(i.length===0)return{nextTokenStart:n,nextTokenEnd:n};let o;for(let t of i){if(t.startOffset>=n)return{nextTokenStart:n,nextTokenEnd:n,previousTokenStart:o?o.startOffset:void 0,previousTokenEnd:o?o.endOffset+1:void 0};if(t.endOffset>=n)return{nextTokenStart:t.startOffset,nextTokenEnd:t.endOffset+1,previousTokenStart:o?o.startOffset:void 0,previousTokenEnd:o?o.endOffset+1:void 0};o=t}return{nextTokenStart:n,nextTokenEnd:n,previousTokenStart:o?o.startOffset:void 0,previousTokenEnd:o?o.endOffset+1:void 0}}completionFor(t,n,i){if(isKeyword(n.feature))return this.completionForKeyword(t,n.feature,i);if(isCrossReference(n.feature)&&t.node)return this.completionForCrossReference(t,n,i)}completionForCrossReference(t,n,i){let o=getContainerOfType(n.feature,isAssignment),s=t.node;if(o&&s){n.type&&(s={$type:n.type,$container:s,$containerProperty:n.property},assignMandatoryProperties(this.astReflection,s));let c={reference:{$refText:``},container:s,property:o.feature};try{for(let n of this.getReferenceCandidates(c,t))i(t,this.createReferenceCompletionItem(n))}catch(t){console.error(t)}}}getReferenceCandidates(t,n){return this.scopeProvider.getScope(t).getAllElements()}createReferenceCompletionItem(t){return{nodeDescription:t,kind:this.nodeKindProvider.getCompletionItemKind(t),documentation:this.getReferenceDocumentation(t),detail:t.type,sortText:`0`}}getReferenceDocumentation(t){if(!t.node)return;let n=this.documentationProvider.getDocumentation(t.node);if(n)return{kind:`markdown`,value:n}}completionForKeyword(t,n,i){this.filterKeyword(t,n)&&i(t,{label:n.value,kind:this.getKeywordCompletionItemKind(n),detail:`Keyword`,sortText:`1`})}getKeywordCompletionItemKind(t){return X.CompletionItemKind.Keyword}filterKeyword(t,n){return/\p{L}/u.test(n.value)}fillCompletionItem(t,n){let i;if(typeof n.label==`string`)i=n.label;else if(`node`in n){let t=this.nameProvider.getName(n.node);if(!t)return;i=t}else if(`nodeDescription`in n)i=n.nodeDescription.name;else return;let o;o=typeof n.textEdit?.newText==`string`?n.textEdit.newText:typeof n.insertText==`string`?n.insertText:i;let s=n.textEdit??this.buildCompletionTextEdit(t,i,o);if(s)return{additionalTextEdits:n.additionalTextEdits,command:n.command,commitCharacters:n.commitCharacters,data:n.data,detail:n.detail,documentation:n.documentation,filterText:n.filterText,insertText:n.insertText,insertTextFormat:n.insertTextFormat,insertTextMode:n.insertTextMode,kind:n.kind,labelDetails:n.labelDetails,preselect:n.preselect,sortText:n.sortText,tags:n.tags,textEditText:n.textEditText,textEdit:s,label:i}}buildCompletionTextEdit(t,n,i){let o=t.textDocument.getText().substring(t.tokenOffset,t.offset);if(this.fuzzyMatcher.match(o,n))return{newText:i,range:{start:t.textDocument.positionAt(t.tokenOffset),end:t.position}}}},Ar;(()=>{var t={975:t=>{function e(t){if(typeof t!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(t))}function r(t,n){for(var i,o=``,s=0,c=-1,u=0,f=0;f<=t.length;++f){if(f<t.length)i=t.charCodeAt(f);else{if(i===47)break;i=47}if(i===47){if(!(c===f-1||u===1))if(c!==f-1&&u===2){if(o.length<2||s!==2||o.charCodeAt(o.length-1)!==46||o.charCodeAt(o.length-2)!==46){if(o.length>2){var p=o.lastIndexOf(`/`);if(p!==o.length-1){p===-1?(o=``,s=0):s=(o=o.slice(0,p)).length-1-o.lastIndexOf(`/`),c=f,u=0;continue}}else if(o.length===2||o.length===1){o=``,s=0,c=f,u=0;continue}}n&&(o.length>0?o+=`/..`:o=`..`,s=2)}else o.length>0?o+=`/`+t.slice(c+1,f):o=t.slice(c+1,f),s=f-c-1;c=f,u=0}else i===46&&u!==-1?++u:u=-1}return o}var n={resolve:function(){for(var t,n=``,i=!1,o=arguments.length-1;o>=-1&&!i;o--){var s;o>=0?s=arguments[o]:(t===void 0&&(t=process.cwd()),s=t),e(s),s.length!==0&&(n=s+`/`+n,i=s.charCodeAt(0)===47)}return n=r(n,!i),i?n.length>0?`/`+n:`/`:n.length>0?n:`.`},normalize:function(t){if(e(t),t.length===0)return`.`;var n=t.charCodeAt(0)===47,i=t.charCodeAt(t.length-1)===47;return(t=r(t,!n)).length!==0||n||(t=`.`),t.length>0&&i&&(t+=`/`),n?`/`+t:t},isAbsolute:function(t){return e(t),t.length>0&&t.charCodeAt(0)===47},join:function(){if(arguments.length===0)return`.`;for(var t,i=0;i<arguments.length;++i){var o=arguments[i];e(o),o.length>0&&(t===void 0?t=o:t+=`/`+o)}return t===void 0?`.`:n.normalize(t)},relative:function(t,i){if(e(t),e(i),t===i||(t=n.resolve(t))===(i=n.resolve(i)))return``;for(var o=1;o<t.length&&t.charCodeAt(o)===47;++o);for(var s=t.length,c=s-o,u=1;u<i.length&&i.charCodeAt(u)===47;++u);for(var f=i.length-u,p=c<f?c:f,h=-1,g=0;g<=p;++g){if(g===p){if(f>p){if(i.charCodeAt(u+g)===47)return i.slice(u+g+1);if(g===0)return i.slice(u+g)}else c>p&&(t.charCodeAt(o+g)===47?h=g:g===0&&(h=0));break}var _=t.charCodeAt(o+g);if(_!==i.charCodeAt(u+g))break;_===47&&(h=g)}var x=``;for(g=o+h+1;g<=s;++g)g!==s&&t.charCodeAt(g)!==47||(x.length===0?x+=`..`:x+=`/..`);return x.length>0?x+i.slice(u+h):(u+=h,i.charCodeAt(u)===47&&++u,i.slice(u))},_makeLong:function(t){return t},dirname:function(t){if(e(t),t.length===0)return`.`;for(var n=t.charCodeAt(0),i=n===47,o=-1,s=!0,c=t.length-1;c>=1;--c)if((n=t.charCodeAt(c))===47){if(!s){o=c;break}}else s=!1;return o===-1?i?`/`:`.`:i&&o===1?`//`:t.slice(0,o)},basename:function(t,n){if(n!==void 0&&typeof n!=`string`)throw TypeError(`"ext" argument must be a string`);e(t);var i,o=0,s=-1,c=!0;if(n!==void 0&&n.length>0&&n.length<=t.length){if(n.length===t.length&&n===t)return``;var u=n.length-1,f=-1;for(i=t.length-1;i>=0;--i){var p=t.charCodeAt(i);if(p===47){if(!c){o=i+1;break}}else f===-1&&(c=!1,f=i+1),u>=0&&(p===n.charCodeAt(u)?--u==-1&&(s=i):(u=-1,s=f))}return o===s?s=f:s===-1&&(s=t.length),t.slice(o,s)}for(i=t.length-1;i>=0;--i)if(t.charCodeAt(i)===47){if(!c){o=i+1;break}}else s===-1&&(c=!1,s=i+1);return s===-1?``:t.slice(o,s)},extname:function(t){e(t);for(var n=-1,i=0,o=-1,s=!0,c=0,u=t.length-1;u>=0;--u){var f=t.charCodeAt(u);if(f!==47)o===-1&&(s=!1,o=u+1),f===46?n===-1?n=u:c!==1&&(c=1):n!==-1&&(c=-1);else if(!s){i=u+1;break}}return n===-1||o===-1||c===0||c===1&&n===o-1&&n===i+1?``:t.slice(n,o)},format:function(t){if(typeof t!=`object`||!t)throw TypeError(`The "pathObject" argument must be of type Object. Received type `+typeof t);return function(t,n){var i=n.dir||n.root,o=n.base||(n.name||``)+(n.ext||``);return i?i===n.root?i+o:i+`/`+o:o}(0,t)},parse:function(t){e(t);var n={root:``,dir:``,base:``,ext:``,name:``};if(t.length===0)return n;var i,o=t.charCodeAt(0),s=o===47;s?(n.root=`/`,i=1):i=0;for(var c=-1,u=0,f=-1,p=!0,h=t.length-1,g=0;h>=i;--h)if((o=t.charCodeAt(h))!==47)f===-1&&(p=!1,f=h+1),o===46?c===-1?c=h:g!==1&&(g=1):c!==-1&&(g=-1);else if(!p){u=h+1;break}return c===-1||f===-1||g===0||g===1&&c===f-1&&c===u+1?f!==-1&&(n.base=n.name=u===0&&s?t.slice(1,f):t.slice(u,f)):(u===0&&s?(n.name=t.slice(1,c),n.base=t.slice(1,f)):(n.name=t.slice(u,c),n.base=t.slice(u,f)),n.ext=t.slice(c,f)),u>0?n.dir=t.slice(0,u-1):s&&(n.dir=`/`),n},sep:`/`,delimiter:`:`,win32:null,posix:null};n.posix=n,t.exports=n}},n={};function r(i){var o=n[i];if(o!==void 0)return o.exports;var s=n[i]={exports:{}};return t[i](s,s.exports,r),s.exports}r.d=(t,n)=>{for(var i in n)r.o(n,i)&&!r.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:n[i]})},r.o=(t,n)=>Object.prototype.hasOwnProperty.call(t,n),r.r=t=>{typeof Symbol<`u`&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:`Module`}),Object.defineProperty(t,"__esModule",{value:!0})};var i={};let o;r.r(i),r.d(i,{URI:()=>l,Utils:()=>S}),typeof process==`object`?o=process.platform===`win32`:typeof navigator==`object`&&(o=navigator.userAgent.indexOf(`Windows`)>=0);let s=/^\w[\w\d+.-]*$/,c=/^\//,u=/^\/\//;function a(t,n){if(!t.scheme&&n)throw Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${t.authority}", path: "${t.path}", query: "${t.query}", fragment: "${t.fragment}"}`);if(t.scheme&&!s.test(t.scheme))throw Error(`[UriError]: Scheme contains illegal characters.`);if(t.path){if(t.authority){if(!c.test(t.path))throw Error(`[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character`)}else if(u.test(t.path))throw Error(`[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")`)}}let f=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class l{static isUri(t){return t instanceof l||!!t&&typeof t.authority==`string`&&typeof t.fragment==`string`&&typeof t.path==`string`&&typeof t.query==`string`&&typeof t.scheme==`string`&&typeof t.fsPath==`string`&&typeof t.with==`function`&&typeof t.toString==`function`}scheme;authority;path;query;fragment;constructor(t,n,i,o,s,c=!1){typeof t==`object`?(this.scheme=t.scheme||``,this.authority=t.authority||``,this.path=t.path||``,this.query=t.query||``,this.fragment=t.fragment||``):(this.scheme=function(t,n){return t||n?t:`file`}(t,c),this.authority=n||``,this.path=function(t,n){switch(t){case`https`:case`http`:case`file`:n?n[0]!==`/`&&(n=`/`+n):n=`/`}return n}(this.scheme,i||``),this.query=o||``,this.fragment=s||``,a(this,c))}get fsPath(){return v(this,!1)}with(t){if(!t)return this;let{scheme:n,authority:i,path:o,query:s,fragment:c}=t;return n===void 0?n=this.scheme:n===null&&(n=``),i===void 0?i=this.authority:i===null&&(i=``),o===void 0?o=this.path:o===null&&(o=``),s===void 0?s=this.query:s===null&&(s=``),c===void 0?c=this.fragment:c===null&&(c=``),n===this.scheme&&i===this.authority&&o===this.path&&s===this.query&&c===this.fragment?this:new d(n,i,o,s,c)}static parse(t,n=!1){let i=f.exec(t);return i?new d(i[2]||``,w(i[4]||``),w(i[5]||``),w(i[7]||``),w(i[9]||``),n):new d(``,``,``,``,``)}static file(t){let n=``;if(o&&(t=t.replace(/\\/g,`/`)),t[0]===`/`&&t[1]===`/`){let i=t.indexOf(`/`,2);i===-1?(n=t.substring(2),t=`/`):(n=t.substring(2,i),t=t.substring(i)||`/`)}return new d(`file`,n,t,``,``)}static from(t){let n=new d(t.scheme,t.authority,t.path,t.query,t.fragment);return a(n,!0),n}toString(t=!1){return b(this,t)}toJSON(){return this}static revive(t){if(t){if(t instanceof l)return t;{let n=new d(t);return n._formatted=t.external,n._fsPath=t._sep===p?t.fsPath:null,n}}return t}}let p=o?1:void 0;class d extends l{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||=v(this,!1),this._fsPath}toString(t=!1){return t?b(this,!0):(this._formatted||=b(this,!1),this._formatted)}toJSON(){let t={$mid:1};return this._fsPath&&(t.fsPath=this._fsPath,t._sep=p),this._formatted&&(t.external=this._formatted),this.path&&(t.path=this.path),this.scheme&&(t.scheme=this.scheme),this.authority&&(t.authority=this.authority),this.query&&(t.query=this.query),this.fragment&&(t.fragment=this.fragment),t}}let h={58:`%3A`,47:`%2F`,63:`%3F`,35:`%23`,91:`%5B`,93:`%5D`,64:`%40`,33:`%21`,36:`%24`,38:`%26`,39:`%27`,40:`%28`,41:`%29`,42:`%2A`,43:`%2B`,44:`%2C`,59:`%3B`,61:`%3D`,32:`%20`};function m(t,n,i){let o,s=-1;for(let c=0;c<t.length;c++){let u=t.charCodeAt(c);if(u>=97&&u<=122||u>=65&&u<=90||u>=48&&u<=57||u===45||u===46||u===95||u===126||n&&u===47||i&&u===91||i&&u===93||i&&u===58)s!==-1&&(o+=encodeURIComponent(t.substring(s,c)),s=-1),o!==void 0&&(o+=t.charAt(c));else{o===void 0&&(o=t.substr(0,c));let n=h[u];n===void 0?s===-1&&(s=c):(s!==-1&&(o+=encodeURIComponent(t.substring(s,c)),s=-1),o+=n)}}return s!==-1&&(o+=encodeURIComponent(t.substring(s))),o===void 0?t:o}function y(t){let n;for(let i=0;i<t.length;i++){let o=t.charCodeAt(i);o===35||o===63?(n===void 0&&(n=t.substr(0,i)),n+=h[o]):n!==void 0&&(n+=t[i])}return n===void 0?t:n}function v(t,n){let i;return i=t.authority&&t.path.length>1&&t.scheme===`file`?`//${t.authority}${t.path}`:t.path.charCodeAt(0)===47&&(t.path.charCodeAt(1)>=65&&t.path.charCodeAt(1)<=90||t.path.charCodeAt(1)>=97&&t.path.charCodeAt(1)<=122)&&t.path.charCodeAt(2)===58?n?t.path.substr(1):t.path[1].toLowerCase()+t.path.substr(2):t.path,o&&(i=i.replace(/\//g,`\\`)),i}function b(t,n){let i=n?y:m,o=``,{scheme:s,authority:c,path:u,query:f,fragment:p}=t;if(s&&(o+=s,o+=`:`),(c||s===`file`)&&(o+=`/`,o+=`/`),c){let t=c.indexOf(`@`);if(t!==-1){let n=c.substr(0,t);c=c.substr(t+1),t=n.lastIndexOf(`:`),t===-1?o+=i(n,!1,!1):(o+=i(n.substr(0,t),!1,!1),o+=`:`,o+=i(n.substr(t+1),!1,!0)),o+=`@`}c=c.toLowerCase(),t=c.lastIndexOf(`:`),t===-1?o+=i(c,!1,!0):(o+=i(c.substr(0,t),!1,!0),o+=c.substr(t))}if(u){if(u.length>=3&&u.charCodeAt(0)===47&&u.charCodeAt(2)===58){let t=u.charCodeAt(1);t>=65&&t<=90&&(u=`/${String.fromCharCode(t+32)}:${u.substr(3)}`)}else if(u.length>=2&&u.charCodeAt(1)===58){let t=u.charCodeAt(0);t>=65&&t<=90&&(u=`${String.fromCharCode(t+32)}:${u.substr(2)}`)}o+=i(u,!0,!1)}return f&&(o+=`?`,o+=i(f,!1,!1)),p&&(o+=`#`,o+=n?p:m(p,!1,!1)),o}function C(t){try{return decodeURIComponent(t)}catch{return t.length>3?t.substr(0,3)+C(t.substr(3)):t}}let g=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function w(t){return t.match(g)?t.replace(g,(t=>C(t))):t}var _=r(975);let x=_.posix||_;var S;(function(t){t.joinPath=function(t,...n){return t.with({path:x.join(t.path,...n)})},t.resolvePath=function(t,...n){let i=t.path,o=!1;i[0]!==`/`&&(i=`/`+i,o=!0);let s=x.resolve(i,...n);return o&&s[0]===`/`&&!t.authority&&(s=s.substring(1)),t.with({path:s})},t.dirname=function(t){if(t.path.length===0||t.path===`/`)return t;let n=x.dirname(t.path);return n.length===1&&n.charCodeAt(0)===46&&(n=``),t.with({path:n})},t.basename=function(t){return x.basename(t.path)},t.extname=function(t){return x.extname(t.path)}})(S||={}),Ar=i})();const{URI:jr,Utils:Mr}=Ar;var Z;(function(t){t.basename=Mr.basename,t.dirname=Mr.dirname,t.extname=Mr.extname,t.joinPath=Mr.joinPath,t.resolvePath=Mr.resolvePath;let n=typeof process==`object`&&(process==null?void 0:process.platform)===`win32`;function equals(t,n){return t?.toString()===n?.toString()}t.equals=equals;function relative(t,i){let o=typeof t==`string`?jr.parse(t).path:t.path,s=typeof i==`string`?jr.parse(i).path:i.path,c=o.split(`/`).filter(t=>t.length>0),u=s.split(`/`).filter(t=>t.length>0);if(n){let t=/^[A-Z]:$/;if(c[0]&&t.test(c[0])&&(c[0]=c[0].toLowerCase()),u[0]&&t.test(u[0])&&(u[0]=u[0].toLowerCase()),c[0]!==u[0])return s.substring(1)}let f=0;for(;f<c.length&&c[f]===u[f];f++);return`../`.repeat(c.length-f)+u.slice(f).join(`/`)}t.relative=relative;function normalize(t){return jr.parse(t.toString()).toString()}t.normalize=normalize})(Z||={});var DefaultDefinitionProvider=class{constructor(t){this.nameProvider=t.references.NameProvider,this.references=t.references.References,this.grammarConfig=t.parser.GrammarConfig}getDefinition(t,n,i){let o=t.parseResult.value;if(o.$cstNode){let i=o.$cstNode,s=findDeclarationNodeAtOffset(i,t.textDocument.offsetAt(n.position),this.grammarConfig.nameRegexp);if(s)return this.collectLocationLinks(s,n)}}collectLocationLinks(t,n){let i=this.findLink(t);if(i)return[X.LocationLink.create(i.targetDocument.textDocument.uri,(i.target.astNode.$cstNode??i.target).range,i.target.range,i.source.range)]}findLink(t){let n=this.references.findDeclarationNode(t);if(n?.astNode){let i=getDocument(n.astNode);if(n&&i)return{source:t,target:n,targetDocument:i}}}};function createGrammarConfig(t){let n=[],i=t.Grammar;for(let t of i.rules)isTerminalRule(t)&&isCommentTerminal(t)&&isMultilineComment(terminalRegex(t))&&n.push(t.name);return{multilineCommentRules:n,nameRegexp:Sr}}var CstNodeBuilder=class{constructor(){this.nodeStack=[]}get current(){return this.nodeStack[this.nodeStack.length-1]??this.rootNode}buildRootNode(t){return this.rootNode=new RootCstNodeImpl(t),this.rootNode.root=this.rootNode,this.nodeStack=[this.rootNode],this.rootNode}buildCompositeNode(t){let n=new CompositeCstNodeImpl;return n.grammarSource=t,n.root=this.rootNode,this.current.content.push(n),this.nodeStack.push(n),n}buildLeafNode(t,n){let i=new LeafCstNodeImpl(t.startOffset,t.image.length,tokenToRange(t),t.tokenType,!n);return i.grammarSource=n,i.root=this.rootNode,this.current.content.push(i),i}removeNode(t){let n=t.container;if(n){let i=n.content.indexOf(t);i>=0&&n.content.splice(i,1)}}addHiddenNodes(t){let n=[];for(let i of t){let t=new LeafCstNodeImpl(i.startOffset,i.image.length,tokenToRange(i),i.tokenType,!0);t.root=this.rootNode,n.push(t)}let i=this.current,o=!1;if(i.content.length>0){i.content.push(...n);return}for(;i.container;){let t=i.container.content.indexOf(i);if(t>0){i.container.content.splice(t,0,...n),o=!0;break}i=i.container}o||this.rootNode.content.unshift(...n)}construct(t){let n=this.current;typeof t.$type==`string`&&(this.current.astNode=t),t.$cstNode=n;let i=this.nodeStack.pop();i?.content.length===0&&this.removeNode(i)}},AbstractCstNode=class{get parent(){return this.container}get feature(){return this.grammarSource}get hidden(){return!1}get astNode(){let t=typeof this._astNode?.$type==`string`?this._astNode:this.container?.astNode;if(!t)throw Error(`This node has no associated AST element`);return t}set astNode(t){this._astNode=t}get element(){return this.astNode}get text(){return this.root.fullText.substring(this.offset,this.end)}},LeafCstNodeImpl=class extends AbstractCstNode{get offset(){return this._offset}get length(){return this._length}get end(){return this._offset+this._length}get hidden(){return this._hidden}get tokenType(){return this._tokenType}get range(){return this._range}constructor(t,n,i,o,s=!1){super(),this._hidden=s,this._offset=t,this._tokenType=o,this._length=n,this._range=i}},CompositeCstNodeImpl=class extends AbstractCstNode{constructor(){super(...arguments),this.content=new Nr(this)}get children(){return this.content}get offset(){return this.firstNonHiddenNode?.offset??0}get length(){return this.end-this.offset}get end(){return this.lastNonHiddenNode?.end??0}get range(){let t=this.firstNonHiddenNode,n=this.lastNonHiddenNode;if(t&&n){if(this._rangeCache===void 0){let{range:i}=t,{range:o}=n;this._rangeCache={start:i.start,end:o.end.line<i.start.line?i.start:o.end}}return this._rangeCache}else return{start:V.create(0,0),end:V.create(0,0)}}get firstNonHiddenNode(){for(let t of this.content)if(!t.hidden)return t;return this.content[0]}get lastNonHiddenNode(){for(let t=this.content.length-1;t>=0;t--){let n=this.content[t];if(!n.hidden)return n}return this.content[this.content.length-1]}},Nr=class CstNodeContainer extends Array{constructor(t){super(),this.parent=t,Object.setPrototypeOf(this,CstNodeContainer.prototype)}push(...t){return this.addParents(t),super.push(...t)}unshift(...t){return this.addParents(t),super.unshift(...t)}splice(t,n,...i){return this.addParents(i),super.splice(t,n,...i)}addParents(t){for(let n of t)n.container=this.parent}},RootCstNodeImpl=class extends CompositeCstNodeImpl{get text(){return this._text.substring(this.offset,this.end)}get fullText(){return this._text}constructor(t){super(),this._text=``,this._text=t??``}};const Pr=Symbol(`Datatype`);function isDataTypeNode(t){return t.$type===Pr}const withRuleSuffix=t=>t.endsWith(`​`)?t:t+`​`;var AbstractLangiumParser=class{constructor(t){this._unorderedGroups=new Map,this.allRules=new Map,this.lexer=t.parser.Lexer;let n=this.lexer.definition,i=t.LanguageMetaData.mode===`production`;this.wrapper=new ChevrotainWrapper(n,Object.assign(Object.assign({},t.parser.ParserConfig),{skipValidations:i,errorMessageProvider:t.parser.ParserErrorMessageProvider}))}alternatives(t,n){this.wrapper.wrapOr(t,n)}optional(t,n){this.wrapper.wrapOption(t,n)}many(t,n){this.wrapper.wrapMany(t,n)}atLeastOne(t,n){this.wrapper.wrapAtLeastOne(t,n)}getRule(t){return this.allRules.get(t)}isRecording(){return this.wrapper.IS_RECORDING}get unorderedGroups(){return this._unorderedGroups}getRuleStack(){return this.wrapper.RULE_STACK}finalize(){this.wrapper.wrapSelfAnalysis()}},LangiumParser=class extends AbstractLangiumParser{get current(){return this.stack[this.stack.length-1]}constructor(t){super(t),this.nodeBuilder=new CstNodeBuilder,this.stack=[],this.assignmentMap=new Map,this.linker=t.references.Linker,this.converter=t.parser.ValueConverter,this.astReflection=t.shared.AstReflection}rule(t,n){let i=this.computeRuleType(t),o=this.wrapper.DEFINE_RULE(withRuleSuffix(t.name),this.startImplementation(i,n).bind(this));return this.allRules.set(t.name,o),t.entry&&(this.mainRule=o),o}computeRuleType(t){if(!t.fragment)return isDataTypeRule(t)?Pr:getExplicitRuleType(t)??t.name}parse(t,n={}){this.nodeBuilder.buildRootNode(t);let i=this.lexerResult=this.lexer.tokenize(t);this.wrapper.input=i.tokens;let o=n.rule?this.allRules.get(n.rule):this.mainRule;if(!o)throw Error(n.rule?`No rule found with name '${n.rule}'`:`No main rule available.`);let s=this.doParse(o);return this.nodeBuilder.addHiddenNodes(i.hidden),this.unorderedGroups.clear(),this.lexerResult=void 0,{value:s,lexerErrors:i.errors,lexerReport:i.report,parserErrors:this.wrapper.errors}}doParse(t){let n=t.call(this.wrapper,{});if(this.stack.length>0&&(n=this.construct()),n===void 0)throw Error(`No result from parser`);if(this.stack.length>0)throw Error(`Parser stack is not empty after parsing`);return n}startImplementation(t,n){return i=>{let o=!this.isRecording()&&t!==void 0;if(o){let n={$type:t};this.stack.push(n),t===Pr&&(n.value=``)}return n(i),o?this.construct():void 0}}extractHiddenTokens(t){let n=this.lexerResult.hidden;if(!n.length)return[];let i=t.startOffset;for(let t=0;t<n.length;t++)if(n[t].startOffset>i)return n.splice(0,t);return n.splice(0,n.length)}consume(t,n,i){let o=this.wrapper.wrapConsume(t,n);if(!this.isRecording()&&this.isValidToken(o)){let t=this.extractHiddenTokens(o);this.nodeBuilder.addHiddenNodes(t);let n=this.nodeBuilder.buildLeafNode(o,i),{assignment:s,isCrossRef:c}=this.getAssignment(i),u=this.current;if(s){let t=isKeyword(i)?o.image:this.converter.convert(o.image,n);this.assign(s.operator,s.feature,t,n,c)}else if(isDataTypeNode(u)){let t=o.image;isKeyword(i)||(t=this.converter.convert(t,n).toString()),u.value+=t}}}isValidToken(t){return!t.isInsertedInRecovery&&!isNaN(t.startOffset)&&typeof t.endOffset==`number`&&!isNaN(t.endOffset)}subrule(t,n,i,o,s){let c;!this.isRecording()&&!i&&(c=this.nodeBuilder.buildCompositeNode(o));let u;try{u=this.wrapper.wrapSubrule(t,n,s)}finally{this.isRecording()||(u===void 0&&!i&&(u=this.construct()),u!==void 0&&c&&c.length>0&&this.performSubruleAssignment(u,o,c))}}performSubruleAssignment(t,n,i){let{assignment:o,isCrossRef:s}=this.getAssignment(n);if(o)this.assign(o.operator,o.feature,t,i,s);else if(!o){let n=this.current;if(isDataTypeNode(n))n.value+=t.toString();else if(typeof t==`object`&&t){let i=this.assignWithoutOverride(t,n);this.stack.pop(),this.stack.push(i)}}}action(t,n){if(!this.isRecording()){let i=this.current;if(n.feature&&n.operator){i=this.construct(),this.nodeBuilder.removeNode(i.$cstNode),this.nodeBuilder.buildCompositeNode(n).content.push(i.$cstNode);let o={$type:t};this.stack.push(o),this.assign(n.operator,n.feature,i,i.$cstNode,!1)}else i.$type=t}}construct(){if(this.isRecording())return;let t=this.current;return linkContentToContainer(t),this.nodeBuilder.construct(t),this.stack.pop(),isDataTypeNode(t)?this.converter.convert(t.value,t.$cstNode):(assignMandatoryProperties(this.astReflection,t),t)}getAssignment(t){if(!this.assignmentMap.has(t)){let n=getContainerOfType(t,isAssignment);this.assignmentMap.set(t,{assignment:n,isCrossRef:n?isCrossReference(n.terminal):!1})}return this.assignmentMap.get(t)}assign(t,n,i,o,s){let c=this.current,u;switch(u=s&&typeof i==`string`?this.linker.buildReference(c,n,o,i):i,t){case`=`:c[n]=u;break;case`?=`:c[n]=!0;break;case`+=`:Array.isArray(c[n])||(c[n]=[]),c[n].push(u)}}assignWithoutOverride(t,n){for(let[i,o]of Object.entries(n)){let n=t[i];n===void 0?t[i]=o:Array.isArray(n)&&Array.isArray(o)&&(o.push(...n),t[i]=o)}let i=t.$cstNode;return i&&(i.astNode=void 0,t.$cstNode=void 0),t}get definitionErrors(){return this.wrapper.definitionErrors}},AbstractParserErrorMessageProvider=class{buildMismatchTokenMessage(t){return g.buildMismatchTokenMessage(t)}buildNotAllInputParsedMessage(t){return g.buildNotAllInputParsedMessage(t)}buildNoViableAltMessage(t){return g.buildNoViableAltMessage(t)}buildEarlyExitMessage(t){return g.buildEarlyExitMessage(t)}},LangiumParserErrorMessageProvider=class extends AbstractParserErrorMessageProvider{buildMismatchTokenMessage({expected:t,actual:n}){return`Expecting ${t.LABEL?"`"+t.LABEL+"`":t.name.endsWith(`:KW`)?`keyword '${t.name.substring(0,t.name.length-3)}'`:`token of type '${t.name}'`} but found \`${n.image}\`.`}buildNotAllInputParsedMessage({firstRedundant:t}){return`Expecting end of file but found \`${t.image}\`.`}},LangiumCompletionParser=class extends AbstractLangiumParser{constructor(){super(...arguments),this.tokens=[],this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}action(){}construct(){}parse(t){this.resetState();let n=this.lexer.tokenize(t,{mode:`partial`});return this.tokens=n.tokens,this.wrapper.input=[...this.tokens],this.mainRule.call(this.wrapper,{}),this.unorderedGroups.clear(),{tokens:this.tokens,elementStack:[...this.lastElementStack],tokenIndex:this.nextTokenIndex}}rule(t,n){let i=this.wrapper.DEFINE_RULE(withRuleSuffix(t.name),this.startImplementation(n).bind(this));return this.allRules.set(t.name,i),t.entry&&(this.mainRule=i),i}resetState(){this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}startImplementation(t){return n=>{let i=this.keepStackSize();try{t(n)}finally{this.resetStackSize(i)}}}removeUnexpectedElements(){this.elementStack.splice(this.stackSize)}keepStackSize(){let t=this.elementStack.length;return this.stackSize=t,t}resetStackSize(t){this.removeUnexpectedElements(),this.stackSize=t}consume(t,n,i){this.wrapper.wrapConsume(t,n),this.isRecording()||(this.lastElementStack=[...this.elementStack,i],this.nextTokenIndex=this.currIdx+1)}subrule(t,n,i,o,s){this.before(o),this.wrapper.wrapSubrule(t,n,s),this.after(o)}before(t){this.isRecording()||this.elementStack.push(t)}after(t){if(!this.isRecording()){let n=this.elementStack.lastIndexOf(t);n>=0&&this.elementStack.splice(n)}}get currIdx(){return this.wrapper.currIdx}};const Fr={recoveryEnabled:!0,nodeLocationTracking:`full`,skipValidations:!0,errorMessageProvider:new LangiumParserErrorMessageProvider};var ChevrotainWrapper=class extends x{constructor(t,n){let i=n&&`maxLookahead`in n;super(t,Object.assign(Object.assign(Object.assign({},Fr),{lookaheadStrategy:i?new T({maxLookahead:n.maxLookahead}):new ee({logging:n.skipValidations?()=>{}:void 0})}),n))}get IS_RECORDING(){return this.RECORDING_PHASE}DEFINE_RULE(t,n,i){return this.RULE(t,n,i)}wrapSelfAnalysis(){this.performSelfAnalysis()}wrapConsume(t,n){return this.consume(t,n,void 0)}wrapSubrule(t,n,i){return this.subrule(t,n,{ARGS:[i]})}wrapOr(t,n){this.or(t,n)}wrapOption(t,n){this.option(t,n)}wrapMany(t,n){this.many(t,n)}wrapAtLeastOne(t,n){this.atLeastOne(t,n)}};function createParser(t,n,i){return buildRules({parser:n,tokens:i,ruleNames:new Map},t),n}function buildRules(t,n){let i=getAllReachableRules(n,!1),o=stream(n.rules).filter(isParserRule).filter(t=>i.has(t));for(let n of o){let i=Object.assign(Object.assign({},t),{consume:1,optional:1,subrule:1,many:1,or:1});t.parser.rule(n,buildElement(i,n.definition))}}function buildElement(t,n,i=!1){let method;if(isKeyword(n))method=buildKeyword(t,n);else if(isAction(n))method=buildAction(t,n);else if(isAssignment(n))method=buildElement(t,n.terminal);else if(isCrossReference(n))method=buildCrossReference(t,n);else if(isRuleCall(n))method=buildRuleCall(t,n);else if(isAlternatives(n))method=buildAlternatives(t,n);else if(isUnorderedGroup(n))method=buildUnorderedGroup(t,n);else if(isGroup(n))method=buildGroup(t,n);else if(isEndOfFile(n)){let i=t.consume++;method=()=>t.parser.consume(i,S,n)}else throw new ErrorWithLocation(n.$cstNode,`Unexpected element type: ${n.$type}`);return wrap(t,i?void 0:getGuardCondition(n),method,n.cardinality)}function buildAction(t,n){let i=getTypeName(n);return()=>t.parser.action(i,n)}function buildRuleCall(t,n){let i=n.rule.ref;if(isParserRule(i)){let o=t.subrule++,s=i.fragment,c=n.arguments.length>0?buildRuleCallPredicate(i,n.arguments):()=>({});return u=>t.parser.subrule(o,getRule(t,i),s,n,c(u))}else if(isTerminalRule(i)){let o=t.consume++,s=getToken(t,i.name);return()=>t.parser.consume(o,s,n)}else if(i)assertUnreachable(i);else throw new ErrorWithLocation(n.$cstNode,`Undefined rule: ${n.rule.$refText}`)}function buildRuleCallPredicate(t,n){let i=n.map(t=>buildPredicate(t.value));return n=>{let o={};for(let s=0;s<i.length;s++){let c=t.parameters[s],u=i[s];o[c.name]=u(n)}return o}}function buildPredicate(t){if(isDisjunction(t)){let n=buildPredicate(t.left),i=buildPredicate(t.right);return t=>n(t)||i(t)}else if(isConjunction(t)){let n=buildPredicate(t.left),i=buildPredicate(t.right);return t=>n(t)&&i(t)}else if(isNegation(t)){let n=buildPredicate(t.value);return t=>!n(t)}else if(isParameterReference(t)){let n=t.parameter.ref.name;return t=>t!==void 0&&t[n]===!0}else if(isBooleanLiteral(t)){let n=!!t.true;return()=>n}assertUnreachable(t)}function buildAlternatives(t,n){if(n.elements.length===1)return buildElement(t,n.elements[0]);{let i=[];for(let o of n.elements){let n={ALT:buildElement(t,o,!0)},s=getGuardCondition(o);s&&(n.GATE=buildPredicate(s)),i.push(n)}let o=t.or++;return n=>t.parser.alternatives(o,i.map(t=>{let i={ALT:()=>t.ALT(n)},o=t.GATE;return o&&(i.GATE=()=>o(n)),i}))}}function buildUnorderedGroup(t,n){if(n.elements.length===1)return buildElement(t,n.elements[0]);let i=[];for(let o of n.elements){let n={ALT:buildElement(t,o,!0)},s=getGuardCondition(o);s&&(n.GATE=buildPredicate(s)),i.push(n)}let o=t.or++,idFunc=(t,n)=>`uGroup_${t}_${n.getRuleStack().join(`-`)}`,alternatives=n=>t.parser.alternatives(o,i.map((i,s)=>{let c={ALT:()=>!0},u=t.parser;c.ALT=()=>{if(i.ALT(n),!u.isRecording()){let t=idFunc(o,u);u.unorderedGroups.get(t)||u.unorderedGroups.set(t,[]);let n=u.unorderedGroups.get(t);n?.[s]===void 0&&(n[s]=!0)}};let f=i.GATE;return f?c.GATE=()=>f(n):c.GATE=()=>!u.unorderedGroups.get(idFunc(o,u))?.[s],c})),s=wrap(t,getGuardCondition(n),alternatives,`*`);return n=>{s(n),t.parser.isRecording()||t.parser.unorderedGroups.delete(idFunc(o,t.parser))}}function buildGroup(t,n){let i=n.elements.map(n=>buildElement(t,n));return t=>i.forEach(n=>n(t))}function getGuardCondition(t){if(isGroup(t))return t.guardCondition}function buildCrossReference(t,n,i=n.terminal){if(!i){if(!n.type.ref)throw Error(`Could not resolve reference to type: `+n.type.$refText);let i=findNameAssignment(n.type.ref)?.terminal;if(!i)throw Error(`Could not find name assignment for type: `+getTypeName(n.type.ref));return buildCrossReference(t,n,i)}else if(isRuleCall(i)&&isParserRule(i.rule.ref)){let o=i.rule.ref,s=t.subrule++;return i=>t.parser.subrule(s,getRule(t,o),!1,n,i)}else if(isRuleCall(i)&&isTerminalRule(i.rule.ref)){let o=t.consume++,s=getToken(t,i.rule.ref.name);return()=>t.parser.consume(o,s,n)}else if(isKeyword(i)){let o=t.consume++,s=getToken(t,i.value);return()=>t.parser.consume(o,s,n)}else throw Error(`Could not build cross reference parser`)}function buildKeyword(t,n){let i=t.consume++,o=t.tokens[n.value];if(!o)throw Error(`Could not find token for keyword: `+n.value);return()=>t.parser.consume(i,o,n)}function wrap(t,n,i,o){let s=n&&buildPredicate(n);if(!o)if(s){let n=t.or++;return o=>t.parser.alternatives(n,[{ALT:()=>i(o),GATE:()=>s(o)},{ALT:E(),GATE:()=>!s(o)}])}else return i;if(o===`*`){let n=t.many++;return o=>t.parser.many(n,{DEF:()=>i(o),GATE:s?()=>s(o):void 0})}else if(o===`+`){let n=t.many++;if(s){let o=t.or++;return c=>t.parser.alternatives(o,[{ALT:()=>t.parser.atLeastOne(n,{DEF:()=>i(c)}),GATE:()=>s(c)},{ALT:E(),GATE:()=>!s(c)}])}else return o=>t.parser.atLeastOne(n,{DEF:()=>i(o)})}else if(o===`?`){let n=t.optional++;return o=>t.parser.optional(n,{DEF:()=>i(o),GATE:s?()=>s(o):void 0})}else assertUnreachable(o)}function getRule(t,n){let i=getRuleName(t,n),o=t.parser.getRule(i);if(!o)throw Error(`Rule "${i}" not found."`);return o}function getRuleName(t,n){if(isParserRule(n))return n.name;if(t.ruleNames.has(n))return t.ruleNames.get(n);{let i=n,o=i.$container,s=n.$type;for(;!isParserRule(o);)(isGroup(o)||isAlternatives(o)||isUnorderedGroup(o))&&(s=o.elements.indexOf(i).toString()+`:`+s),i=o,o=o.$container;return s=o.name+`:`+s,t.ruleNames.set(n,s),s}}function getToken(t,n){let i=t.tokens[n];if(!i)throw Error(`Token "${n}" not found."`);return i}function createCompletionParser(t){let n=t.Grammar,i=t.parser.Lexer,o=new LangiumCompletionParser(t);return createParser(n,o,i.definition),o.finalize(),o}function createLangiumParser(t){let n=prepareLangiumParser(t);return n.finalize(),n}function prepareLangiumParser(t){let n=t.Grammar,i=t.parser.Lexer;return createParser(n,new LangiumParser(t),i.definition)}var DefaultTokenBuilder=class{constructor(){this.diagnostics=[]}buildTokens(t,n){let i=stream(getAllReachableRules(t,!1)),o=this.buildTerminalTokens(i),s=this.buildKeywordTokens(i,o,n);return s.push(...o),s}flushLexingReport(t){return{diagnostics:this.popDiagnostics()}}popDiagnostics(){let t=[...this.diagnostics];return this.diagnostics=[],t}buildTerminalTokens(t){return t.filter(isTerminalRule).filter(t=>!t.fragment).map(t=>this.buildTerminalToken(t)).toArray()}buildTerminalToken(t){let n=terminalRegex(t),i=this.requiresCustomPattern(n)?this.regexPatternFunction(n):n,o={name:t.name,PATTERN:i};return typeof i==`function`&&(o.LINE_BREAKS=!0),t.hidden&&(o.GROUP=isWhitespace(n)?_.SKIPPED:`hidden`),o}requiresCustomPattern(t){return t.flags.includes(`u`)||t.flags.includes(`s`)?!0:!!(t.source.includes(`?<=`)||t.source.includes(`?<!`))}regexPatternFunction(t){let n=new RegExp(t,t.flags+`y`);return(t,i)=>(n.lastIndex=i,n.exec(t))}buildKeywordTokens(t,n,i){return t.filter(isParserRule).flatMap(t=>streamAllContents(t).filter(isKeyword)).distinct(t=>t.value).toArray().sort((t,n)=>n.value.length-t.value.length).map(t=>this.buildKeywordToken(t,n,!!i?.caseInsensitive))}buildKeywordToken(t,n,i){let o=this.buildKeywordPattern(t,i),s={name:t.value,PATTERN:o,LONGER_ALT:this.findLongerAlt(t,n)};return typeof o==`function`&&(s.LINE_BREAKS=!0),s}buildKeywordPattern(t,n){return n?new RegExp(escapeRegExp(t.value),`i`):t.value}findLongerAlt(t,n){return n.reduce((n,i)=>{let o=i?.PATTERN;return o?.source&&partialMatches(`^`+o.source+`$`,t.value)&&n.push(i),n},[])}},DefaultValueConverter=class{convert(t,n){let i=n.grammarSource;if(isCrossReference(i)&&(i=getCrossReferenceTerminal(i)),isRuleCall(i)){let o=i.rule.ref;if(!o)throw Error(`This cst node was not parsed by a rule.`);return this.runConverter(o,t,n)}return t}runConverter(t,n,i){switch(t.name.toUpperCase()){case`INT`:return Ir.convertInt(n);case`STRING`:return Ir.convertString(n);case`ID`:return Ir.convertID(n)}switch(getRuleType(t)?.toLowerCase()){case`number`:return Ir.convertNumber(n);case`boolean`:return Ir.convertBoolean(n);case`bigint`:return Ir.convertBigint(n);case`date`:return Ir.convertDate(n);default:return n}}},Ir;(function(t){function convertString(t){let n=``;for(let i=1;i<t.length-1;i++){let o=t.charAt(i);if(o===`\\`){let o=t.charAt(++i);n+=convertEscapeCharacter(o)}else n+=o}return n}t.convertString=convertString;function convertEscapeCharacter(t){switch(t){case`b`:return`\b`;case`f`:return`\f`;case`n`:return`