@codingame/monaco-vscode-html-language-features-default-extension 4.5.1 → 4.5.2
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.
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(()=>{var e={838:e=>{"use strict";function t(e,t,o){e instanceof RegExp&&(e=n(e,o)),t instanceof RegExp&&(t=n(t,o));var r=i(e,t,o);return r&&{start:r[0],end:r[1],pre:o.slice(0,r[0]),body:o.slice(r[0]+e.length,r[1]),post:o.slice(r[1]+t.length)}}function n(e,t){var n=t.match(e);return n?n[0]:null}function i(e,t,n){var i,o,r,s,a,c=n.indexOf(e),u=n.indexOf(t,c+1),l=c;if(c>=0&&u>0){for(i=[],r=n.length;l>=0&&!a;)l==c?(i.push(l),c=n.indexOf(e,l+1)):1==i.length?a=[i.pop(),u]:((o=i.pop())<r&&(r=o,s=u),u=n.indexOf(t,l+1)),l=c<u&&c>=0?c:u;i.length&&(a=[r,s])}return a}e.exports=t,t.range=i},5457:(e,t,n)=>{var i=n(838);e.exports=function(e){return e?("{}"===e.substr(0,2)&&(e="\\{\\}"+e.substr(2)),f(function(e){return e.split("\\\\").join(o).split("\\{").join(r).split("\\}").join(s).split("\\,").join(a).split("\\.").join(c)}(e),!0).map(l)):[]};var o="\0SLASH"+Math.random()+"\0",r="\0OPEN"+Math.random()+"\0",s="\0CLOSE"+Math.random()+"\0",a="\0COMMA"+Math.random()+"\0",c="\0PERIOD"+Math.random()+"\0";function u(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function l(e){return e.split(o).join("\\").split(r).join("{").split(s).join("}").split(a).join(",").split(c).join(".")}function d(e){if(!e)return[""];var t=[],n=i("{","}",e);if(!n)return e.split(",");var o=n.pre,r=n.body,s=n.post,a=o.split(",");a[a.length-1]+="{"+r+"}";var c=d(s);return s.length&&(a[a.length-1]+=c.shift(),a.push.apply(a,c)),t.push.apply(t,a),t}function h(e){return"{"+e+"}"}function g(e){return/^-?0\d/.test(e)}function p(e,t){return e<=t}function m(e,t){return e>=t}function f(e,t){var n=[],o=i("{","}",e);if(!o)return[e];var r=o.pre,a=o.post.length?f(o.post,!1):[""];if(/\$$/.test(o.pre))for(var c=0;c<a.length;c++){var l=r+"{"+o.body+"}"+a[c];n.push(l)}else{var v,y,C=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(o.body),D=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(o.body),b=C||D,R=o.body.indexOf(",")>=0;if(!b&&!R)return o.post.match(/,.*\}/)?f(e=o.pre+"{"+o.body+s+o.post):[e];if(b)v=o.body.split(/\.\./);else if(1===(v=d(o.body)).length&&1===(v=f(v[0],!1).map(h)).length)return a.map((function(e){return o.pre+v[0]+e}));if(b){var w=u(v[0]),S=u(v[1]),T=Math.max(v[0].length,v[1].length),_=3==v.length?Math.abs(u(v[2])):1,k=p;S<w&&(_*=-1,k=m);var P=v.some(g);y=[];for(var x=w;k(x,S);x+=_){var q;if(D)"\\"===(q=String.fromCharCode(x))&&(q="");else if(q=String(x),P){var F=T-q.length;if(F>0){var O=new Array(F+1).join("0");q=x<0?"-"+O+q.slice(1):O+q}}y.push(q)}}else{y=[];for(var E=0;E<v.length;E++)y.push.apply(y,f(v[E],!1))}for(E=0;E<y.length;E++)for(c=0;c<a.length;c++)l=r+y[E]+a[c],(!t||b||l)&&n.push(l)}return n}},9121:e=>{const t="object"==typeof process&&process&&!1;e.exports=t?{sep:"\\"}:{sep:"/"}},3707:(e,t,n)=>{const i=e.exports=(e,t,n={})=>(f(t),!(!n.nocomment&&"#"===t.charAt(0))&&new y(t,n).match(e));e.exports=i;const o=n(9121);i.sep=o.sep;const r=Symbol("globstar **");i.GLOBSTAR=r;const s=n(5457),a={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},c="[^/]",u="[^/]*?",l=e=>e.split("").reduce(((e,t)=>(e[t]=!0,e)),{}),d=l("().*{}+?[]^$\\!"),h=l("[.("),g=/\/+/;i.filter=(e,t={})=>(n,o,r)=>i(n,e,t);const p=(e,t={})=>{const n={};return Object.keys(e).forEach((t=>n[t]=e[t])),Object.keys(t).forEach((e=>n[e]=t[e])),n};i.defaults=e=>{if(!e||"object"!=typeof e||!Object.keys(e).length)return i;const t=i,n=(n,i,o)=>t(n,i,p(e,o));return(n.Minimatch=class extends t.Minimatch{constructor(t,n){super(t,p(e,n))}}).defaults=n=>t.defaults(p(e,n)).Minimatch,n.filter=(n,i)=>t.filter(n,p(e,i)),n.defaults=n=>t.defaults(p(e,n)),n.makeRe=(n,i)=>t.makeRe(n,p(e,i)),n.braceExpand=(n,i)=>t.braceExpand(n,p(e,i)),n.match=(n,i,o)=>t.match(n,i,p(e,o)),n},i.braceExpand=(e,t)=>m(e,t);const m=(e,t={})=>(f(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:s(e)),f=e=>{if("string"!=typeof e)throw new TypeError("invalid pattern");if(e.length>65536)throw new TypeError("pattern is too long")},v=Symbol("subparse");i.makeRe=(e,t)=>new y(e,t||{}).makeRe(),i.match=(e,t,n={})=>{const i=new y(t,n);return e=e.filter((e=>i.match(e))),i.options.nonull&&!e.length&&e.push(t),e};class y{constructor(e,t){f(e),t||(t={}),this.options=t,this.set=[],this.pattern=e,this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||!1===t.allowWindowsEscape,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.make()}debug(){}make(){const e=this.pattern,t=this.options;if(!t.nocomment&&"#"===e.charAt(0))return void(this.comment=!0);if(!e)return void(this.empty=!0);this.parseNegate();let n=this.globSet=this.braceExpand();t.debug&&(this.debug=(...e)=>console.error(...e)),this.debug(this.pattern,n),n=this.globParts=n.map((e=>e.split(g))),this.debug(this.pattern,n),n=n.map(((e,t,n)=>e.map(this.parse,this))),this.debug(this.pattern,n),n=n.filter((e=>-1===e.indexOf(!1))),this.debug(this.pattern,n),this.set=n}parseNegate(){if(this.options.nonegate)return;const e=this.pattern;let t=!1,n=0;for(let i=0;i<e.length&&"!"===e.charAt(i);i++)t=!t,n++;n&&(this.pattern=e.slice(n)),this.negate=t}matchOne(e,t,n){var i=this.options;this.debug("matchOne",{this:this,file:e,pattern:t}),this.debug("matchOne",e.length,t.length);for(var o=0,s=0,a=e.length,c=t.length;o<a&&s<c;o++,s++){this.debug("matchOne loop");var u,l=t[s],d=e[o];if(this.debug(t,l,d),!1===l)return!1;if(l===r){this.debug("GLOBSTAR",[t,l,d]);var h=o,g=s+1;if(g===c){for(this.debug("** at the end");o<a;o++)if("."===e[o]||".."===e[o]||!i.dot&&"."===e[o].charAt(0))return!1;return!0}for(;h<a;){var p=e[h];if(this.debug("\nglobstar while",e,h,t,g,p),this.matchOne(e.slice(h),t.slice(g),n))return this.debug("globstar found match!",h,a,p),!0;if("."===p||".."===p||!i.dot&&"."===p.charAt(0)){this.debug("dot detected!",e,h,t,g);break}this.debug("globstar swallow a segment, and continue"),h++}return!(!n||(this.debug("\n>>> no match, partial?",e,h,t,g),h!==a))}if("string"==typeof l?(u=d===l,this.debug("string match",l,d,u)):(u=d.match(l),this.debug("pattern match",l,d,u)),!u)return!1}if(o===a&&s===c)return!0;if(o===a)return n;if(s===c)return o===a-1&&""===e[o];throw new Error("wtf?")}braceExpand(){return m(this.pattern,this.options)}parse(e,t){f(e);const n=this.options;if("**"===e){if(!n.noglobstar)return r;e="*"}if(""===e)return"";let i="",o=!1,s=!1;const l=[],g=[];let p,m,y,C,D=!1,b=-1,R=-1,w="."===e.charAt(0),S=n.dot||w;const T=e=>"."===e.charAt(0)?"":n.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",_=()=>{if(p){switch(p){case"*":i+=u,o=!0;break;case"?":i+=c,o=!0;break;default:i+="\\"+p}this.debug("clearStateChar %j %j",p,i),p=!1}};for(let t,r=0;r<e.length&&(t=e.charAt(r));r++)if(this.debug("%s\t%s %s %j",e,r,i,t),s){if("/"===t)return!1;d[t]&&(i+="\\"),i+=t,s=!1}else switch(t){case"/":return!1;case"\\":if(D&&"-"===e.charAt(r+1)){i+=t;continue}_(),s=!0;continue;case"?":case"*":case"+":case"@":case"!":if(this.debug("%s\t%s %s %j <-- stateChar",e,r,i,t),D){this.debug(" in class"),"!"===t&&r===R+1&&(t="^"),i+=t;continue}this.debug("call clearStateChar %j",p),_(),p=t,n.noext&&_();continue;case"(":{if(D){i+="(";continue}if(!p){i+="\\(";continue}const t={type:p,start:r-1,reStart:i.length,open:a[p].open,close:a[p].close};this.debug(this.pattern,"\t",t),l.push(t),i+=t.open,0===t.start&&"!"!==t.type&&(w=!0,i+=T(e.slice(r+1))),this.debug("plType %j %j",p,i),p=!1;continue}case")":{const e=l[l.length-1];if(D||!e){i+="\\)";continue}l.pop(),_(),o=!0,y=e,i+=y.close,"!"===y.type&&g.push(Object.assign(y,{reEnd:i.length}));continue}case"|":{const t=l[l.length-1];if(D||!t){i+="\\|";continue}_(),i+="|",0===t.start&&"!"!==t.type&&(w=!0,i+=T(e.slice(r+1)));continue}case"[":if(_(),D){i+="\\"+t;continue}D=!0,R=r,b=i.length,i+=t;continue;case"]":if(r===R+1||!D){i+="\\"+t;continue}m=e.substring(R+1,r);try{RegExp("["+(m.replace(/\\([^-\]])/g,"$1").replace(/[[\]\\]/g,"\\$&")+"]")),i+=t}catch(e){i=i.substring(0,b)+"(?:$.)"}o=!0,D=!1;continue;default:_(),!d[t]||"^"===t&&D||(i+="\\"),i+=t}for(D&&(m=e.slice(R+1),C=this.parse(m,v),i=i.substring(0,b)+"\\["+C[0],o=o||C[1]),y=l.pop();y;y=l.pop()){let e;e=i.slice(y.reStart+y.open.length),this.debug("setting tail",i,y),e=e.replace(/((?:\\{2}){0,64})(\\?)\|/g,((e,t,n)=>(n||(n="\\"),t+t+n+"|"))),this.debug("tail=%j\n %s",e,e,y,i);const t="*"===y.type?u:"?"===y.type?c:"\\"+y.type;o=!0,i=i.slice(0,y.reStart)+t+"\\("+e}_(),s&&(i+="\\\\");const k=h[i.charAt(0)];for(let e=g.length-1;e>-1;e--){const n=g[e],o=i.slice(0,n.reStart),r=i.slice(n.reStart,n.reEnd-8);let s=i.slice(n.reEnd);const a=i.slice(n.reEnd-8,n.reEnd)+s,c=o.split(")").length,u=o.split("(").length-c;let l=s;for(let e=0;e<u;e++)l=l.replace(/\)[+*?]?/,"");s=l,i=o+r+s+(""===s&&t!==v?"(?:$|\\/)":"")+a}if(""!==i&&o&&(i="(?=.)"+i),k&&(i=(w?"":S?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)")+i),t===v)return[i,o];if(n.nocase&&!o&&(o=e.toUpperCase()!==e.toLowerCase()),!o)return(e=>e.replace(/\\(.)/g,"$1"))(e);const P=n.nocase?"i":"";try{return Object.assign(new RegExp("^"+i+"$",P),{_glob:e,_src:i})}catch(e){return new RegExp("$.")}}makeRe(){if(this.regexp||!1===this.regexp)return this.regexp;const e=this.set;if(!e.length)return this.regexp=!1,this.regexp;const t=this.options,n=t.noglobstar?u:t.dot?"(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?":"(?:(?!(?:\\/|^)\\.).)*?",i=t.nocase?"i":"";let o=e.map((e=>((e=e.map((e=>"string"==typeof e?e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):e===r?r:e._src)).reduce(((e,t)=>(e[e.length-1]===r&&t===r||e.push(t),e)),[])).forEach(((t,i)=>{t===r&&e[i-1]!==r&&(0===i?e.length>1?e[i+1]="(?:\\/|"+n+"\\/)?"+e[i+1]:e[i]=n:i===e.length-1?e[i-1]+="(?:\\/|"+n+")?":(e[i-1]+="(?:\\/|\\/"+n+"\\/)"+e[i+1],e[i+1]=r))})),e.filter((e=>e!==r)).join("/")))).join("|");o="^(?:"+o+")$",this.negate&&(o="^(?!"+o+").*$");try{this.regexp=new RegExp(o,i)}catch(e){this.regexp=!1}return this.regexp}match(e,t=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return""===e;if("/"===e&&t)return!0;const n=this.options;"/"!==o.sep&&(e=e.split(o.sep).join("/")),e=e.split(g),this.debug(this.pattern,"split",e);const i=this.set;let r;this.debug(this.pattern,"set",i);for(let t=e.length-1;t>=0&&(r=e[t],!r);t--);for(let o=0;o<i.length;o++){const s=i[o];let a=e;if(n.matchBase&&1===s.length&&(a=[r]),this.matchOne(a,s,t))return!!n.flipNegate||!this.negate}return!n.flipNegate&&this.negate}static defaults(e){return i.defaults(e).Minimatch}}i.Minimatch=y},9838:(e,t,n)=>{"use strict";e.exports=n(9406)},9406:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.createMessageConnection=t.BrowserMessageWriter=t.BrowserMessageReader=void 0,n(6028).default.install();const r=n(5748);o(n(5748),t);class s extends r.AbstractMessageReader{constructor(e){super(),this._onData=new r.Emitter,this._messageListener=e=>{this._onData.fire(e.data)},e.addEventListener("error",(e=>this.fireError(e))),e.onmessage=this._messageListener}listen(e){return this._onData.event(e)}}t.BrowserMessageReader=s;class a extends r.AbstractMessageWriter{constructor(e){super(),this.port=e,this.errorCount=0,e.addEventListener("error",(e=>this.fireError(e)))}write(e){try{return this.port.postMessage(e),Promise.resolve()}catch(t){return this.handleError(t,e),Promise.reject(t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){}}t.BrowserMessageWriter=a,t.createMessageConnection=function(e,t,n,i){return void 0===n&&(n=r.NullLogger),r.ConnectionStrategy.is(i)&&(i={connectionStrategy:i}),(0,r.createMessageConnection)(e,t,n,i)}},6028:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(5748);class o extends i.AbstractMessageBuffer{constructor(e="utf-8"){super(e),this.asciiDecoder=new TextDecoder("ascii")}emptyBuffer(){return o.emptyBuffer}fromString(e,t){return(new TextEncoder).encode(e)}toString(e,t){return"ascii"===t?this.asciiDecoder.decode(e):new TextDecoder(t).decode(e)}asNative(e,t){return void 0===t?e:e.slice(0,t)}allocNative(e){return new Uint8Array(e)}}o.emptyBuffer=new Uint8Array(0);class r{constructor(e){this.socket=e,this._onData=new i.Emitter,this._messageListener=e=>{e.data.arrayBuffer().then((e=>{this._onData.fire(new Uint8Array(e))}),(()=>{(0,i.RAL)().console.error("Converting blob to array buffer failed.")}))},this.socket.addEventListener("message",this._messageListener)}onClose(e){return this.socket.addEventListener("close",e),i.Disposable.create((()=>this.socket.removeEventListener("close",e)))}onError(e){return this.socket.addEventListener("error",e),i.Disposable.create((()=>this.socket.removeEventListener("error",e)))}onEnd(e){return this.socket.addEventListener("end",e),i.Disposable.create((()=>this.socket.removeEventListener("end",e)))}onData(e){return this._onData.event(e)}}class s{constructor(e){this.socket=e}onClose(e){return this.socket.addEventListener("close",e),i.Disposable.create((()=>this.socket.removeEventListener("close",e)))}onError(e){return this.socket.addEventListener("error",e),i.Disposable.create((()=>this.socket.removeEventListener("error",e)))}onEnd(e){return this.socket.addEventListener("end",e),i.Disposable.create((()=>this.socket.removeEventListener("end",e)))}write(e,t){if("string"==typeof e){if(void 0!==t&&"utf-8"!==t)throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${t}`);this.socket.send(e)}else this.socket.send(e);return Promise.resolve()}end(){this.socket.close()}}const a=new TextEncoder,c=Object.freeze({messageBuffer:Object.freeze({create:e=>new o(e)}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:(e,t)=>{if("utf-8"!==t.charset)throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${t.charset}`);return Promise.resolve(a.encode(JSON.stringify(e,void 0,0)))}}),decoder:Object.freeze({name:"application/json",decode:(e,t)=>{if(!(e instanceof Uint8Array))throw new Error("In a Browser environments only Uint8Arrays are supported.");return Promise.resolve(JSON.parse(new TextDecoder(t.charset).decode(e)))}})}),stream:Object.freeze({asReadableStream:e=>new r(e),asWritableStream:e=>new s(e)}),console,timer:Object.freeze({setTimeout(e,t,...n){const i=setTimeout(e,t,...n);return{dispose:()=>clearTimeout(i)}},setImmediate(e,...t){const n=setTimeout(e,0,...t);return{dispose:()=>clearTimeout(n)}},setInterval(e,t,...n){const i=setInterval(e,t,...n);return{dispose:()=>clearInterval(i)}}})});function u(){return c}!function(e){e.install=function(){i.RAL.install(c)}}(u||(u={})),t.default=u},5748:(e,t,n)=>{"use strict";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;const i=n(5285);Object.defineProperty(t,"Message",{enumerable:!0,get:function(){return i.Message}}),Object.defineProperty(t,"RequestType",{enumerable:!0,get:function(){return i.RequestType}}),Object.defineProperty(t,"RequestType0",{enumerable:!0,get:function(){return i.RequestType0}}),Object.defineProperty(t,"RequestType1",{enumerable:!0,get:function(){return i.RequestType1}}),Object.defineProperty(t,"RequestType2",{enumerable:!0,get:function(){return i.RequestType2}}),Object.defineProperty(t,"RequestType3",{enumerable:!0,get:function(){return i.RequestType3}}),Object.defineProperty(t,"RequestType4",{enumerable:!0,get:function(){return i.RequestType4}}),Object.defineProperty(t,"RequestType5",{enumerable:!0,get:function(){return i.RequestType5}}),Object.defineProperty(t,"RequestType6",{enumerable:!0,get:function(){return i.RequestType6}}),Object.defineProperty(t,"RequestType7",{enumerable:!0,get:function(){return i.RequestType7}}),Object.defineProperty(t,"RequestType8",{enumerable:!0,get:function(){return i.RequestType8}}),Object.defineProperty(t,"RequestType9",{enumerable:!0,get:function(){return i.RequestType9}}),Object.defineProperty(t,"ResponseError",{enumerable:!0,get:function(){return i.ResponseError}}),Object.defineProperty(t,"ErrorCodes",{enumerable:!0,get:function(){return i.ErrorCodes}}),Object.defineProperty(t,"NotificationType",{enumerable:!0,get:function(){return i.NotificationType}}),Object.defineProperty(t,"NotificationType0",{enumerable:!0,get:function(){return i.NotificationType0}}),Object.defineProperty(t,"NotificationType1",{enumerable:!0,get:function(){return i.NotificationType1}}),Object.defineProperty(t,"NotificationType2",{enumerable:!0,get:function(){return i.NotificationType2}}),Object.defineProperty(t,"NotificationType3",{enumerable:!0,get:function(){return i.NotificationType3}}),Object.defineProperty(t,"NotificationType4",{enumerable:!0,get:function(){return i.NotificationType4}}),Object.defineProperty(t,"NotificationType5",{enumerable:!0,get:function(){return i.NotificationType5}}),Object.defineProperty(t,"NotificationType6",{enumerable:!0,get:function(){return i.NotificationType6}}),Object.defineProperty(t,"NotificationType7",{enumerable:!0,get:function(){return i.NotificationType7}}),Object.defineProperty(t,"NotificationType8",{enumerable:!0,get:function(){return i.NotificationType8}}),Object.defineProperty(t,"NotificationType9",{enumerable:!0,get:function(){return i.NotificationType9}}),Object.defineProperty(t,"ParameterStructures",{enumerable:!0,get:function(){return i.ParameterStructures}});const o=n(5164);Object.defineProperty(t,"LinkedMap",{enumerable:!0,get:function(){return o.LinkedMap}}),Object.defineProperty(t,"LRUCache",{enumerable:!0,get:function(){return o.LRUCache}}),Object.defineProperty(t,"Touch",{enumerable:!0,get:function(){return o.Touch}});const r=n(8159);Object.defineProperty(t,"Disposable",{enumerable:!0,get:function(){return r.Disposable}});const s=n(345);Object.defineProperty(t,"Event",{enumerable:!0,get:function(){return s.Event}}),Object.defineProperty(t,"Emitter",{enumerable:!0,get:function(){return s.Emitter}});const a=n(7770);Object.defineProperty(t,"CancellationTokenSource",{enumerable:!0,get:function(){return a.CancellationTokenSource}}),Object.defineProperty(t,"CancellationToken",{enumerable:!0,get:function(){return a.CancellationToken}});const c=n(278);Object.defineProperty(t,"SharedArraySenderStrategy",{enumerable:!0,get:function(){return c.SharedArraySenderStrategy}}),Object.defineProperty(t,"SharedArrayReceiverStrategy",{enumerable:!0,get:function(){return c.SharedArrayReceiverStrategy}});const u=n(4806);Object.defineProperty(t,"MessageReader",{enumerable:!0,get:function(){return u.MessageReader}}),Object.defineProperty(t,"AbstractMessageReader",{enumerable:!0,get:function(){return u.AbstractMessageReader}}),Object.defineProperty(t,"ReadableStreamMessageReader",{enumerable:!0,get:function(){return u.ReadableStreamMessageReader}});const l=n(9248);Object.defineProperty(t,"MessageWriter",{enumerable:!0,get:function(){return l.MessageWriter}}),Object.defineProperty(t,"AbstractMessageWriter",{enumerable:!0,get:function(){return l.AbstractMessageWriter}}),Object.defineProperty(t,"WriteableStreamMessageWriter",{enumerable:!0,get:function(){return l.WriteableStreamMessageWriter}});const d=n(5506);Object.defineProperty(t,"AbstractMessageBuffer",{enumerable:!0,get:function(){return d.AbstractMessageBuffer}});const h=n(6336);Object.defineProperty(t,"ConnectionStrategy",{enumerable:!0,get:function(){return h.ConnectionStrategy}}),Object.defineProperty(t,"ConnectionOptions",{enumerable:!0,get:function(){return h.ConnectionOptions}}),Object.defineProperty(t,"NullLogger",{enumerable:!0,get:function(){return h.NullLogger}}),Object.defineProperty(t,"createMessageConnection",{enumerable:!0,get:function(){return h.createMessageConnection}}),Object.defineProperty(t,"ProgressToken",{enumerable:!0,get:function(){return h.ProgressToken}}),Object.defineProperty(t,"ProgressType",{enumerable:!0,get:function(){return h.ProgressType}}),Object.defineProperty(t,"Trace",{enumerable:!0,get:function(){return h.Trace}}),Object.defineProperty(t,"TraceValues",{enumerable:!0,get:function(){return h.TraceValues}}),Object.defineProperty(t,"TraceFormat",{enumerable:!0,get:function(){return h.TraceFormat}}),Object.defineProperty(t,"SetTraceNotification",{enumerable:!0,get:function(){return h.SetTraceNotification}}),Object.defineProperty(t,"LogTraceNotification",{enumerable:!0,get:function(){return h.LogTraceNotification}}),Object.defineProperty(t,"ConnectionErrors",{enumerable:!0,get:function(){return h.ConnectionErrors}}),Object.defineProperty(t,"ConnectionError",{enumerable:!0,get:function(){return h.ConnectionError}}),Object.defineProperty(t,"CancellationReceiverStrategy",{enumerable:!0,get:function(){return h.CancellationReceiverStrategy}}),Object.defineProperty(t,"CancellationSenderStrategy",{enumerable:!0,get:function(){return h.CancellationSenderStrategy}}),Object.defineProperty(t,"CancellationStrategy",{enumerable:!0,get:function(){return h.CancellationStrategy}}),Object.defineProperty(t,"MessageStrategy",{enumerable:!0,get:function(){return h.MessageStrategy}});const g=n(8094);t.RAL=g.default},7770:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CancellationTokenSource=t.CancellationToken=void 0;const i=n(8094),o=n(8472),r=n(345);var s;!function(e){e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:r.Event.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:r.Event.None}),e.is=function(t){const n=t;return n&&(n===e.None||n===e.Cancelled||o.boolean(n.isCancellationRequested)&&!!n.onCancellationRequested)}}(s||(t.CancellationToken=s={}));const a=Object.freeze((function(e,t){const n=(0,i.default)().timer.setTimeout(e.bind(t),0);return{dispose(){n.dispose()}}}));class c{constructor(){this._isCancelled=!1}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?a:(this._emitter||(this._emitter=new r.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}}t.CancellationTokenSource=class{get token(){return this._token||(this._token=new c),this._token}cancel(){this._token?this._token.cancel():this._token=s.Cancelled}dispose(){this._token?this._token instanceof c&&this._token.dispose():this._token=s.None}}},6336:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createMessageConnection=t.ConnectionOptions=t.MessageStrategy=t.CancellationStrategy=t.CancellationSenderStrategy=t.CancellationReceiverStrategy=t.RequestCancellationReceiverStrategy=t.IdCancellationReceiverStrategy=t.ConnectionStrategy=t.ConnectionError=t.ConnectionErrors=t.LogTraceNotification=t.SetTraceNotification=t.TraceFormat=t.TraceValues=t.Trace=t.NullLogger=t.ProgressType=t.ProgressToken=void 0;const i=n(8094),o=n(8472),r=n(5285),s=n(5164),a=n(345),c=n(7770);var u,l,d,h,g,p,m,f,v,y,C,D,b,R,w,S,T,_,k;!function(e){e.type=new r.NotificationType("$/cancelRequest")}(u||(u={})),function(e){e.is=function(e){return"string"==typeof e||"number"==typeof e}}(l||(t.ProgressToken=l={})),function(e){e.type=new r.NotificationType("$/progress")}(d||(d={})),t.ProgressType=class{constructor(){}},function(e){e.is=function(e){return o.func(e)}}(h||(h={})),t.NullLogger=Object.freeze({error:()=>{},warn:()=>{},info:()=>{},log:()=>{}}),function(e){e[e.Off=0]="Off",e[e.Messages=1]="Messages",e[e.Compact=2]="Compact",e[e.Verbose=3]="Verbose"}(g||(t.Trace=g={})),function(e){e.Off="off",e.Messages="messages",e.Compact="compact",e.Verbose="verbose"}(p||(t.TraceValues=p={})),function(e){e.fromString=function(t){if(!o.string(t))return e.Off;switch(t=t.toLowerCase()){case"off":return e.Off;case"messages":return e.Messages;case"compact":return e.Compact;case"verbose":return e.Verbose;default:return e.Off}},e.toString=function(t){switch(t){case e.Off:return"off";case e.Messages:return"messages";case e.Compact:return"compact";case e.Verbose:return"verbose";default:return"off"}}}(g||(t.Trace=g={})),function(e){e.Text="text",e.JSON="json"}(m||(t.TraceFormat=m={})),function(e){e.fromString=function(t){return o.string(t)&&"json"===(t=t.toLowerCase())?e.JSON:e.Text}}(m||(t.TraceFormat=m={})),function(e){e.type=new r.NotificationType("$/setTrace")}(f||(t.SetTraceNotification=f={})),function(e){e.type=new r.NotificationType("$/logTrace")}(v||(t.LogTraceNotification=v={})),function(e){e[e.Closed=1]="Closed",e[e.Disposed=2]="Disposed",e[e.AlreadyListening=3]="AlreadyListening"}(y||(t.ConnectionErrors=y={}));class P extends Error{constructor(e,t){super(t),this.code=e,Object.setPrototypeOf(this,P.prototype)}}t.ConnectionError=P,function(e){e.is=function(e){const t=e;return t&&o.func(t.cancelUndispatched)}}(C||(t.ConnectionStrategy=C={})),function(e){e.is=function(e){const t=e;return t&&(void 0===t.kind||"id"===t.kind)&&o.func(t.createCancellationTokenSource)&&(void 0===t.dispose||o.func(t.dispose))}}(D||(t.IdCancellationReceiverStrategy=D={})),function(e){e.is=function(e){const t=e;return t&&"request"===t.kind&&o.func(t.createCancellationTokenSource)&&(void 0===t.dispose||o.func(t.dispose))}}(b||(t.RequestCancellationReceiverStrategy=b={})),function(e){e.Message=Object.freeze({createCancellationTokenSource:e=>new c.CancellationTokenSource}),e.is=function(e){return D.is(e)||b.is(e)}}(R||(t.CancellationReceiverStrategy=R={})),function(e){e.Message=Object.freeze({sendCancellation:(e,t)=>e.sendNotification(u.type,{id:t}),cleanup(e){}}),e.is=function(e){const t=e;return t&&o.func(t.sendCancellation)&&o.func(t.cleanup)}}(w||(t.CancellationSenderStrategy=w={})),function(e){e.Message=Object.freeze({receiver:R.Message,sender:w.Message}),e.is=function(e){const t=e;return t&&R.is(t.receiver)&&w.is(t.sender)}}(S||(t.CancellationStrategy=S={})),function(e){e.is=function(e){const t=e;return t&&o.func(t.handleMessage)}}(T||(t.MessageStrategy=T={})),function(e){e.is=function(e){const t=e;return t&&(S.is(t.cancellationStrategy)||C.is(t.connectionStrategy)||T.is(t.messageStrategy))}}(_||(t.ConnectionOptions=_={})),function(e){e[e.New=1]="New",e[e.Listening=2]="Listening",e[e.Closed=3]="Closed",e[e.Disposed=4]="Disposed"}(k||(k={})),t.createMessageConnection=function(e,n,p,C){const b=void 0!==p?p:t.NullLogger;let R=0,w=0,_=0;const x="2.0";let q;const F=new Map;let O;const E=new Map,M=new Map;let I,N,L=new s.LinkedMap,A=new Map,j=new Set,H=new Map,K=g.Off,W=m.Text,U=k.New;const $=new a.Emitter,z=new a.Emitter,V=new a.Emitter,B=new a.Emitter,J=new a.Emitter,Q=C&&C.cancellationStrategy?C.cancellationStrategy:S.Message;function X(e){if(null===e)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+e.toString()}function G(e){}function Y(){return U===k.Listening}function Z(){return U===k.Closed}function ee(){return U===k.Disposed}function te(){U!==k.New&&U!==k.Listening||(U=k.Closed,z.fire(void 0))}function ne(){I||0===L.size||(I=(0,i.default)().timer.setImmediate((()=>{I=void 0,function(){if(0===L.size)return;const e=L.shift();try{const t=C?.messageStrategy;T.is(t)?t.handleMessage(e,ie):ie(e)}finally{ne()}}()})))}function ie(e){r.Message.isRequest(e)?function(e){if(ee())return;function t(t,i,o){const s={jsonrpc:x,id:e.id};t instanceof r.ResponseError?s.error=t.toJson():s.result=void 0===t?null:t,se(s,i,o),n.write(s).catch((()=>b.error("Sending response failed.")))}function i(t,i,o){const r={jsonrpc:x,id:e.id,error:t.toJson()};se(r,i,o),n.write(r).catch((()=>b.error("Sending response failed.")))}!function(e){if(K!==g.Off&&N)if(W===m.Text){let t;K!==g.Verbose&&K!==g.Compact||!e.params||(t=`Params: ${re(e.params)}\n\n`),N.log(`Received request '${e.method} - (${e.id})'.`,t)}else ce("receive-request",e)}(e);const s=F.get(e.method);let a,c;s&&(a=s.type,c=s.handler);const u=Date.now();if(c||q){const s=e.id??String(Date.now()),l=D.is(Q.receiver)?Q.receiver.createCancellationTokenSource(s):Q.receiver.createCancellationTokenSource(e);null!==e.id&&j.has(e.id)&&l.cancel(),null!==e.id&&H.set(s,l);try{let d;if(c)if(void 0===e.params){if(void 0!==a&&0!==a.numberOfParams)return void i(new r.ResponseError(r.ErrorCodes.InvalidParams,`Request ${e.method} defines ${a.numberOfParams} params but received none.`),e.method,u);d=c(l.token)}else if(Array.isArray(e.params)){if(void 0!==a&&a.parameterStructures===r.ParameterStructures.byName)return void i(new r.ResponseError(r.ErrorCodes.InvalidParams,`Request ${e.method} defines parameters by name but received parameters by position`),e.method,u);d=c(...e.params,l.token)}else{if(void 0!==a&&a.parameterStructures===r.ParameterStructures.byPosition)return void i(new r.ResponseError(r.ErrorCodes.InvalidParams,`Request ${e.method} defines parameters by position but received parameters by name`),e.method,u);d=c(e.params,l.token)}else q&&(d=q(e.method,e.params,l.token));const h=d;d?h.then?h.then((n=>{H.delete(s),t(n,e.method,u)}),(t=>{H.delete(s),t instanceof r.ResponseError?i(t,e.method,u):t&&o.string(t.message)?i(new r.ResponseError(r.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${t.message}`),e.method,u):i(new r.ResponseError(r.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,u)})):(H.delete(s),t(d,e.method,u)):(H.delete(s),function(t,i,o){void 0===t&&(t=null);const r={jsonrpc:x,id:e.id,result:t};se(r,i,o),n.write(r).catch((()=>b.error("Sending response failed.")))}(d,e.method,u))}catch(n){H.delete(s),n instanceof r.ResponseError?t(n,e.method,u):n&&o.string(n.message)?i(new r.ResponseError(r.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${n.message}`),e.method,u):i(new r.ResponseError(r.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,u)}}else i(new r.ResponseError(r.ErrorCodes.MethodNotFound,`Unhandled method ${e.method}`),e.method,u)}(e):r.Message.isNotification(e)?function(e){if(ee())return;let t,n;if(e.method===u.type.method){const t=e.params.id;return j.delete(t),void ae(e)}{const i=E.get(e.method);i&&(n=i.handler,t=i.type)}if(n||O)try{if(ae(e),n)if(void 0===e.params)void 0!==t&&0!==t.numberOfParams&&t.parameterStructures!==r.ParameterStructures.byName&&b.error(`Notification ${e.method} defines ${t.numberOfParams} params but received none.`),n();else if(Array.isArray(e.params)){const i=e.params;e.method===d.type.method&&2===i.length&&l.is(i[0])?n({token:i[0],value:i[1]}):(void 0!==t&&(t.parameterStructures===r.ParameterStructures.byName&&b.error(`Notification ${e.method} defines parameters by name but received parameters by position`),t.numberOfParams!==e.params.length&&b.error(`Notification ${e.method} defines ${t.numberOfParams} params but received ${i.length} arguments`)),n(...i))}else void 0!==t&&t.parameterStructures===r.ParameterStructures.byPosition&&b.error(`Notification ${e.method} defines parameters by position but received parameters by name`),n(e.params);else O&&O(e.method,e.params)}catch(t){t.message?b.error(`Notification handler '${e.method}' failed with message: ${t.message}`):b.error(`Notification handler '${e.method}' failed unexpectedly.`)}else V.fire(e)}(e):r.Message.isResponse(e)?function(e){if(!ee())if(null===e.id)e.error?b.error(`Received response message without id: Error is: \n${JSON.stringify(e.error,void 0,4)}`):b.error("Received response message without id. No further error information provided.");else{const t=e.id,n=A.get(t);if(function(e,t){if(K!==g.Off&&N)if(W===m.Text){let n;if(K!==g.Verbose&&K!==g.Compact||(e.error&&e.error.data?n=`Error data: ${re(e.error.data)}\n\n`:e.result?n=`Result: ${re(e.result)}\n\n`:void 0===e.error&&(n="No result returned.\n\n")),t){const i=e.error?` Request failed: ${e.error.message} (${e.error.code}).`:"";N.log(`Received response '${t.method} - (${e.id})' in ${Date.now()-t.timerStart}ms.${i}`,n)}else N.log(`Received response ${e.id} without active response promise.`,n)}else ce("receive-response",e)}(e,n),void 0!==n){A.delete(t);try{if(e.error){const t=e.error;n.reject(new r.ResponseError(t.code,t.message,t.data))}else{if(void 0===e.result)throw new Error("Should never happen.");n.resolve(e.result)}}catch(e){e.message?b.error(`Response handler '${n.method}' failed with message: ${e.message}`):b.error(`Response handler '${n.method}' failed unexpectedly.`)}}}}(e):function(e){if(!e)return void b.error("Received empty message.");b.error(`Received message which is neither a response nor a notification message:\n${JSON.stringify(e,null,4)}`);const t=e;if(o.string(t.id)||o.number(t.id)){const e=t.id,n=A.get(e);n&&n.reject(new Error("The received response has neither a result nor an error property."))}}(e)}e.onClose(te),e.onError((function(e){$.fire([e,void 0,void 0])})),n.onClose(te),n.onError((function(e){$.fire(e)}));const oe=e=>{try{if(r.Message.isNotification(e)&&e.method===u.type.method){const t=e.params.id,i=X(t),o=L.get(i);if(r.Message.isRequest(o)){const r=C?.connectionStrategy,s=r&&r.cancelUndispatched?r.cancelUndispatched(o,G):void 0;if(s&&(void 0!==s.error||void 0!==s.result))return L.delete(i),H.delete(t),s.id=o.id,se(s,e.method,Date.now()),void n.write(s).catch((()=>b.error("Sending response for canceled message failed.")))}const s=H.get(t);if(void 0!==s)return s.cancel(),void ae(e);j.add(t)}!function(e,t){var n;r.Message.isRequest(t)?e.set(X(t.id),t):r.Message.isResponse(t)?e.set(null===(n=t.id)?"res-unknown-"+(++_).toString():"res-"+n.toString(),t):e.set("not-"+(++w).toString(),t)}(L,e)}finally{ne()}};function re(e){if(null!=e)switch(K){case g.Verbose:return JSON.stringify(e,null,4);case g.Compact:return JSON.stringify(e);default:return}}function se(e,t,n){if(K!==g.Off&&N)if(W===m.Text){let i;K!==g.Verbose&&K!==g.Compact||(e.error&&e.error.data?i=`Error data: ${re(e.error.data)}\n\n`:e.result?i=`Result: ${re(e.result)}\n\n`:void 0===e.error&&(i="No result returned.\n\n")),N.log(`Sending response '${t} - (${e.id})'. Processing request took ${Date.now()-n}ms`,i)}else ce("send-response",e)}function ae(e){if(K!==g.Off&&N&&e.method!==v.type.method)if(W===m.Text){let t;K!==g.Verbose&&K!==g.Compact||(t=e.params?`Params: ${re(e.params)}\n\n`:"No parameters provided.\n\n"),N.log(`Received notification '${e.method}'.`,t)}else ce("receive-notification",e)}function ce(e,t){if(!N||K===g.Off)return;const n={isLSPMessage:!0,type:e,message:t,timestamp:Date.now()};N.log(n)}function ue(){if(Z())throw new P(y.Closed,"Connection is closed.");if(ee())throw new P(y.Disposed,"Connection is disposed.")}function le(e){return void 0===e?null:e}function de(e){return null===e?void 0:e}function he(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function ge(e,t){switch(e){case r.ParameterStructures.auto:return he(t)?de(t):[le(t)];case r.ParameterStructures.byName:if(!he(t))throw new Error("Received parameters by name but param is not an object literal.");return de(t);case r.ParameterStructures.byPosition:return[le(t)];default:throw new Error(`Unknown parameter structure ${e.toString()}`)}}function pe(e,t){let n;const i=e.numberOfParams;switch(i){case 0:n=void 0;break;case 1:n=ge(e.parameterStructures,t[0]);break;default:n=[];for(let e=0;e<t.length&&e<i;e++)n.push(le(t[e]));if(t.length<i)for(let e=t.length;e<i;e++)n.push(null)}return n}const me={sendNotification:(e,...t)=>{let i,s;if(ue(),o.string(e)){i=e;const n=t[0];let o=0,a=r.ParameterStructures.auto;r.ParameterStructures.is(n)&&(o=1,a=n);let c=t.length;const u=c-o;switch(u){case 0:s=void 0;break;case 1:s=ge(a,t[o]);break;default:if(a===r.ParameterStructures.byName)throw new Error(`Received ${u} parameters for 'by Name' notification parameter structure.`);s=t.slice(o,c).map((e=>le(e)))}}else{const n=t;i=e.method,s=pe(e,n)}const a={jsonrpc:x,method:i,params:s};return function(e){if(K!==g.Off&&N)if(W===m.Text){let t;K!==g.Verbose&&K!==g.Compact||(t=e.params?`Params: ${re(e.params)}\n\n`:"No parameters provided.\n\n"),N.log(`Sending notification '${e.method}'.`,t)}else ce("send-notification",e)}(a),n.write(a).catch((e=>{throw b.error("Sending notification failed."),e}))},onNotification:(e,t)=>{let n;return ue(),o.func(e)?O=e:t&&(o.string(e)?(n=e,E.set(e,{type:void 0,handler:t})):(n=e.method,E.set(e.method,{type:e,handler:t}))),{dispose:()=>{void 0!==n?E.delete(n):O=void 0}}},onProgress:(e,t,n)=>{if(M.has(t))throw new Error(`Progress handler for token ${t} already registered`);return M.set(t,n),{dispose:()=>{M.delete(t)}}},sendProgress:(e,t,n)=>me.sendNotification(d.type,{token:t,value:n}),onUnhandledProgress:B.event,sendRequest:(e,...t)=>{let i,s,a;if(ue(),function(){if(!Y())throw new Error("Call listen() first.")}(),o.string(e)){i=e;const n=t[0],o=t[t.length-1];let u=0,l=r.ParameterStructures.auto;r.ParameterStructures.is(n)&&(u=1,l=n);let d=t.length;c.CancellationToken.is(o)&&(d-=1,a=o);const h=d-u;switch(h){case 0:s=void 0;break;case 1:s=ge(l,t[u]);break;default:if(l===r.ParameterStructures.byName)throw new Error(`Received ${h} parameters for 'by Name' request parameter structure.`);s=t.slice(u,d).map((e=>le(e)))}}else{const n=t;i=e.method,s=pe(e,n);const o=e.numberOfParams;a=c.CancellationToken.is(n[o])?n[o]:void 0}const u=R++;let l;a&&(l=a.onCancellationRequested((()=>{const e=Q.sender.sendCancellation(me,u);return void 0===e?(b.log(`Received no promise from cancellation strategy when cancelling id ${u}`),Promise.resolve()):e.catch((()=>{b.log(`Sending cancellation messages for id ${u} failed`)}))})));const d={jsonrpc:x,id:u,method:i,params:s};return function(e){if(K!==g.Off&&N)if(W===m.Text){let t;K!==g.Verbose&&K!==g.Compact||!e.params||(t=`Params: ${re(e.params)}\n\n`),N.log(`Sending request '${e.method} - (${e.id})'.`,t)}else ce("send-request",e)}(d),"function"==typeof Q.sender.enableCancellation&&Q.sender.enableCancellation(d),new Promise((async(e,t)=>{const o={method:i,timerStart:Date.now(),resolve:t=>{e(t),Q.sender.cleanup(u),l?.dispose()},reject:e=>{t(e),Q.sender.cleanup(u),l?.dispose()}};try{await n.write(d),A.set(u,o)}catch(e){throw b.error("Sending request failed."),o.reject(new r.ResponseError(r.ErrorCodes.MessageWriteError,e.message?e.message:"Unknown reason")),e}}))},onRequest:(e,t)=>{ue();let n=null;return h.is(e)?(n=void 0,q=e):o.string(e)?(n=null,void 0!==t&&(n=e,F.set(e,{handler:t,type:void 0}))):void 0!==t&&(n=e.method,F.set(e.method,{type:e,handler:t})),{dispose:()=>{null!==n&&(void 0!==n?F.delete(n):q=void 0)}}},hasPendingResponse:()=>A.size>0,trace:async(e,t,n)=>{let i=!1,r=m.Text;void 0!==n&&(o.boolean(n)?i=n:(i=n.sendNotification||!1,r=n.traceFormat||m.Text)),K=e,W=r,N=K===g.Off?void 0:t,!i||Z()||ee()||await me.sendNotification(f.type,{value:g.toString(e)})},onError:$.event,onClose:z.event,onUnhandledNotification:V.event,onDispose:J.event,end:()=>{n.end()},dispose:()=>{if(ee())return;U=k.Disposed,J.fire(void 0);const t=new r.ResponseError(r.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(const e of A.values())e.reject(t);A=new Map,H=new Map,j=new Set,L=new s.LinkedMap,o.func(n.dispose)&&n.dispose(),o.func(e.dispose)&&e.dispose()},listen:()=>{ue(),function(){if(Y())throw new P(y.AlreadyListening,"Connection is already listening")}(),U=k.Listening,e.listen(oe)},inspect:()=>{(0,i.default)().console.log("inspect")}};return me.onNotification(v.type,(e=>{if(K===g.Off||!N)return;const t=K===g.Verbose||K===g.Compact;N.log(e.message,t?e.verbose:void 0)})),me.onNotification(d.type,(e=>{const t=M.get(e.token);t?t(e.value):B.fire(e)})),me}},8159:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Disposable=void 0,function(e){e.create=function(e){return{dispose:e}}}(n||(t.Disposable=n={}))},345:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Emitter=t.Event=void 0;const i=n(8094);var o;!function(e){const t={dispose(){}};e.None=function(){return t}}(o||(t.Event=o={}));class r{add(e,t=null,n){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(t),Array.isArray(n)&&n.push({dispose:()=>this.remove(e,t)})}remove(e,t=null){if(!this._callbacks)return;let n=!1;for(let i=0,o=this._callbacks.length;i<o;i++)if(this._callbacks[i]===e){if(this._contexts[i]===t)return this._callbacks.splice(i,1),void this._contexts.splice(i,1);n=!0}if(n)throw new Error("When adding a listener with a context, you should remove it with the same context")}invoke(...e){if(!this._callbacks)return[];const t=[],n=this._callbacks.slice(0),o=this._contexts.slice(0);for(let r=0,s=n.length;r<s;r++)try{t.push(n[r].apply(o[r],e))}catch(e){(0,i.default)().console.error(e)}return t}isEmpty(){return!this._callbacks||0===this._callbacks.length}dispose(){this._callbacks=void 0,this._contexts=void 0}}class s{constructor(e){this._options=e}get event(){return this._event||(this._event=(e,t,n)=>{this._callbacks||(this._callbacks=new r),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,t);const i={dispose:()=>{this._callbacks&&(this._callbacks.remove(e,t),i.dispose=s._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(n)&&n.push(i),i}),this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}}t.Emitter=s,s._noop=function(){}},8472:(e,t)=>{"use strict";function n(e){return"string"==typeof e||e instanceof String}function i(e){return Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.stringArray=t.array=t.func=t.error=t.number=t.string=t.boolean=void 0,t.boolean=function(e){return!0===e||!1===e},t.string=n,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=function(e){return"function"==typeof e},t.array=i,t.stringArray=function(e){return i(e)&&e.every((e=>n(e)))}},5164:(e,t)=>{"use strict";var n,i;Object.defineProperty(t,"__esModule",{value:!0}),t.LRUCache=t.LinkedMap=t.Touch=void 0,function(e){e.None=0,e.First=1,e.AsOld=e.First,e.Last=2,e.AsNew=e.Last}(i||(t.Touch=i={}));class o{constructor(){this[n]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(e){return this._map.has(e)}get(e,t=i.None){const n=this._map.get(e);if(n)return t!==i.None&&this.touch(n,t),n.value}set(e,t,n=i.None){let o=this._map.get(e);if(o)o.value=t,n!==i.None&&this.touch(o,n);else{switch(o={key:e,value:t,next:void 0,previous:void 0},n){case i.None:this.addItemLast(o);break;case i.First:this.addItemFirst(o);break;case i.Last:default:this.addItemLast(o)}this._map.set(e,o),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){const t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){const n=this._state;let i=this._head;for(;i;){if(t?e.bind(t)(i.value,i.key,this):e(i.value,i.key,this),this._state!==n)throw new Error("LinkedMap got modified during iteration.");i=i.next}}keys(){const e=this._state;let t=this._head;const n={[Symbol.iterator]:()=>n,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){const e={value:t.key,done:!1};return t=t.next,e}return{value:void 0,done:!0}}};return n}values(){const e=this._state;let t=this._head;const n={[Symbol.iterator]:()=>n,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){const e={value:t.value,done:!1};return t=t.next,e}return{value:void 0,done:!0}}};return n}entries(){const e=this._state;let t=this._head;const n={[Symbol.iterator]:()=>n,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){const e={value:[t.key,t.value],done:!1};return t=t.next,e}return{value:void 0,done:!0}}};return n}[(n=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(0===e)return void this.clear();let t=this._head,n=this.size;for(;t&&n>e;)this._map.delete(t.key),t=t.next,n--;this._head=t,this._size=n,t&&(t.previous=void 0),this._state++}addItemFirst(e){if(this._head||this._tail){if(!this._head)throw new Error("Invalid list");e.next=this._head,this._head.previous=e}else this._tail=e;this._head=e,this._state++}addItemLast(e){if(this._head||this._tail){if(!this._tail)throw new Error("Invalid list");e.previous=this._tail,this._tail.next=e}else this._head=e;this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{const t=e.next,n=e.previous;if(!t||!n)throw new Error("Invalid list");t.previous=n,n.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(t===i.First||t===i.Last)if(t===i.First){if(e===this._head)return;const t=e.next,n=e.previous;e===this._tail?(n.next=void 0,this._tail=n):(t.previous=n,n.next=t),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(t===i.Last){if(e===this._tail)return;const t=e.next,n=e.previous;e===this._head?(t.previous=void 0,this._head=t):(t.previous=n,n.next=t),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}toJSON(){const e=[];return this.forEach(((t,n)=>{e.push([n,t])})),e}fromJSON(e){this.clear();for(const[t,n]of e)this.set(t,n)}}t.LinkedMap=o,t.LRUCache=class extends o{constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get ratio(){return this._ratio}set ratio(e){this._ratio=Math.min(Math.max(0,e),1),this.checkTrim()}get(e,t=i.AsNew){return super.get(e,t)}peek(e){return super.get(e,i.None)}set(e,t){return super.set(e,t,i.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}},5506:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractMessageBuffer=void 0,t.AbstractMessageBuffer=class{constructor(e="utf-8"){this._encoding=e,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(e){const t="string"==typeof e?this.fromString(e,this._encoding):e;this._chunks.push(t),this._totalLength+=t.byteLength}tryReadHeaders(e=!1){if(0===this._chunks.length)return;let t=0,n=0,i=0,o=0;e:for(;n<this._chunks.length;){const e=this._chunks[n];for(i=0;i<e.length;){switch(e[i]){case 13:switch(t){case 0:t=1;break;case 2:t=3;break;default:t=0}break;case 10:switch(t){case 1:t=2;break;case 3:t=4,i++;break e;default:t=0}break;default:t=0}i++}o+=e.byteLength,n++}if(4!==t)return;const r=this._read(o+i),s=new Map,a=this.toString(r,"ascii").split("\r\n");if(a.length<2)return s;for(let t=0;t<a.length-2;t++){const n=a[t],i=n.indexOf(":");if(-1===i)throw new Error(`Message header must separate key and value using ':'\n${n}`);const o=n.substr(0,i),r=n.substr(i+1).trim();s.set(e?o.toLowerCase():o,r)}return s}tryReadBody(e){if(!(this._totalLength<e))return this._read(e)}get numberOfBytes(){return this._totalLength}_read(e){if(0===e)return this.emptyBuffer();if(e>this._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===e){const t=this._chunks[0];return this._chunks.shift(),this._totalLength-=e,this.asNative(t)}if(this._chunks[0].byteLength>e){const t=this._chunks[0],n=this.asNative(t,e);return this._chunks[0]=t.slice(e),this._totalLength-=e,n}const t=this.allocNative(e);let n=0;for(;e>0;){const i=this._chunks[0];if(i.byteLength>e){const o=i.slice(0,e);t.set(o,n),n+=e,this._chunks[0]=i.slice(e),this._totalLength-=e,e-=e}else t.set(i,n),n+=i.byteLength,this._chunks.shift(),this._totalLength-=i.byteLength,e-=i.byteLength}return t}}},4806:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ReadableStreamMessageReader=t.AbstractMessageReader=t.MessageReader=void 0;const i=n(8094),o=n(8472),r=n(345),s=n(6791);var a,c;!function(e){e.is=function(e){let t=e;return t&&o.func(t.listen)&&o.func(t.dispose)&&o.func(t.onError)&&o.func(t.onClose)&&o.func(t.onPartialMessage)}}(a||(t.MessageReader=a={}));class u{constructor(){this.errorEmitter=new r.Emitter,this.closeEmitter=new r.Emitter,this.partialMessageEmitter=new r.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e){this.errorEmitter.fire(this.asError(e))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(e){this.partialMessageEmitter.fire(e)}asError(e){return e instanceof Error?e:new Error(`Reader received error. Reason: ${o.string(e.message)?e.message:"unknown"}`)}}t.AbstractMessageReader=u,function(e){e.fromOptions=function(e){let t,n;const o=new Map;let r;const s=new Map;if(void 0===e||"string"==typeof e)t=e??"utf-8";else{if(t=e.charset??"utf-8",void 0!==e.contentDecoder&&(n=e.contentDecoder,o.set(n.name,n)),void 0!==e.contentDecoders)for(const t of e.contentDecoders)o.set(t.name,t);if(void 0!==e.contentTypeDecoder&&(r=e.contentTypeDecoder,s.set(r.name,r)),void 0!==e.contentTypeDecoders)for(const t of e.contentTypeDecoders)s.set(t.name,t)}return void 0===r&&(r=(0,i.default)().applicationJson.decoder,s.set(r.name,r)),{charset:t,contentDecoder:n,contentDecoders:o,contentTypeDecoder:r,contentTypeDecoders:s}}}(c||(c={})),t.ReadableStreamMessageReader=class extends u{constructor(e,t){super(),this.readable=e,this.options=c.fromOptions(t),this.buffer=(0,i.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new s.Semaphore(1)}set partialMessageTimeout(e){this._partialMessageTimeout=e}get partialMessageTimeout(){return this._partialMessageTimeout}listen(e){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=e;const t=this.readable.onData((e=>{this.onData(e)}));return this.readable.onError((e=>this.fireError(e))),this.readable.onClose((()=>this.fireClose())),t}onData(e){try{for(this.buffer.append(e);;){if(-1===this.nextMessageLength){const e=this.buffer.tryReadHeaders(!0);if(!e)return;const t=e.get("content-length");if(!t)return void this.fireError(new Error(`Header must provide a Content-Length property.\n${JSON.stringify(Object.fromEntries(e))}`));const n=parseInt(t);if(isNaN(n))return void this.fireError(new Error(`Content-Length value must be a number. Got ${t}`));this.nextMessageLength=n}const e=this.buffer.tryReadBody(this.nextMessageLength);if(void 0===e)return void this.setPartialMessageTimer();this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock((async()=>{const t=void 0!==this.options.contentDecoder?await this.options.contentDecoder.decode(e):e,n=await this.options.contentTypeDecoder.decode(t,this.options);this.callback(n)})).catch((e=>{this.fireError(e)}))}}catch(e){this.fireError(e)}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),this._partialMessageTimeout<=0||(this.partialMessageTimer=(0,i.default)().timer.setTimeout(((e,t)=>{this.partialMessageTimer=void 0,e===this.messageToken&&(this.firePartialMessage({messageToken:e,waitingTime:t}),this.setPartialMessageTimer())}),this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}}},9248:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WriteableStreamMessageWriter=t.AbstractMessageWriter=t.MessageWriter=void 0;const i=n(8094),o=n(8472),r=n(6791),s=n(345);var a,c;!function(e){e.is=function(e){let t=e;return t&&o.func(t.dispose)&&o.func(t.onClose)&&o.func(t.onError)&&o.func(t.write)}}(a||(t.MessageWriter=a={}));class u{constructor(){this.errorEmitter=new s.Emitter,this.closeEmitter=new s.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e,t,n){this.errorEmitter.fire([this.asError(e),t,n])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(e){return e instanceof Error?e:new Error(`Writer received error. Reason: ${o.string(e.message)?e.message:"unknown"}`)}}t.AbstractMessageWriter=u,function(e){e.fromOptions=function(e){return void 0===e||"string"==typeof e?{charset:e??"utf-8",contentTypeEncoder:(0,i.default)().applicationJson.encoder}:{charset:e.charset??"utf-8",contentEncoder:e.contentEncoder,contentTypeEncoder:e.contentTypeEncoder??(0,i.default)().applicationJson.encoder}}}(c||(c={})),t.WriteableStreamMessageWriter=class extends u{constructor(e,t){super(),this.writable=e,this.options=c.fromOptions(t),this.errorCount=0,this.writeSemaphore=new r.Semaphore(1),this.writable.onError((e=>this.fireError(e))),this.writable.onClose((()=>this.fireClose()))}async write(e){return this.writeSemaphore.lock((async()=>this.options.contentTypeEncoder.encode(e,this.options).then((e=>void 0!==this.options.contentEncoder?this.options.contentEncoder.encode(e):e)).then((t=>{const n=[];return n.push("Content-Length: ",t.byteLength.toString(),"\r\n"),n.push("\r\n"),this.doWrite(e,n,t)}),(e=>{throw this.fireError(e),e}))))}async doWrite(e,t,n){try{return await this.writable.write(t.join(""),"ascii"),this.writable.write(n)}catch(t){return this.handleError(t,e),Promise.reject(t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){this.writable.end()}}},5285:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Message=t.NotificationType9=t.NotificationType8=t.NotificationType7=t.NotificationType6=t.NotificationType5=t.NotificationType4=t.NotificationType3=t.NotificationType2=t.NotificationType1=t.NotificationType0=t.NotificationType=t.RequestType9=t.RequestType8=t.RequestType7=t.RequestType6=t.RequestType5=t.RequestType4=t.RequestType3=t.RequestType2=t.RequestType1=t.RequestType=t.RequestType0=t.AbstractMessageSignature=t.ParameterStructures=t.ResponseError=t.ErrorCodes=void 0;const i=n(8472);var o,r;!function(e){e.ParseError=-32700,e.InvalidRequest=-32600,e.MethodNotFound=-32601,e.InvalidParams=-32602,e.InternalError=-32603,e.jsonrpcReservedErrorRangeStart=-32099,e.serverErrorStart=-32099,e.MessageWriteError=-32099,e.MessageReadError=-32098,e.PendingResponseRejected=-32097,e.ConnectionInactive=-32096,e.ServerNotInitialized=-32002,e.UnknownErrorCode=-32001,e.jsonrpcReservedErrorRangeEnd=-32e3,e.serverErrorEnd=-32e3}(o||(t.ErrorCodes=o={}));class s extends Error{constructor(e,t,n){super(t),this.code=i.number(e)?e:o.UnknownErrorCode,this.data=n,Object.setPrototypeOf(this,s.prototype)}toJson(){const e={code:this.code,message:this.message};return void 0!==this.data&&(e.data=this.data),e}}t.ResponseError=s;class a{constructor(e){this.kind=e}static is(e){return e===a.auto||e===a.byName||e===a.byPosition}toString(){return this.kind}}t.ParameterStructures=a,a.auto=new a("auto"),a.byPosition=new a("byPosition"),a.byName=new a("byName");class c{constructor(e,t){this.method=e,this.numberOfParams=t}get parameterStructures(){return a.auto}}t.AbstractMessageSignature=c,t.RequestType0=class extends c{constructor(e){super(e,0)}},t.RequestType=class extends c{constructor(e,t=a.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.RequestType1=class extends c{constructor(e,t=a.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.RequestType2=class extends c{constructor(e){super(e,2)}},t.RequestType3=class extends c{constructor(e){super(e,3)}},t.RequestType4=class extends c{constructor(e){super(e,4)}},t.RequestType5=class extends c{constructor(e){super(e,5)}},t.RequestType6=class extends c{constructor(e){super(e,6)}},t.RequestType7=class extends c{constructor(e){super(e,7)}},t.RequestType8=class extends c{constructor(e){super(e,8)}},t.RequestType9=class extends c{constructor(e){super(e,9)}},t.NotificationType=class extends c{constructor(e,t=a.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.NotificationType0=class extends c{constructor(e){super(e,0)}},t.NotificationType1=class extends c{constructor(e,t=a.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.NotificationType2=class extends c{constructor(e){super(e,2)}},t.NotificationType3=class extends c{constructor(e){super(e,3)}},t.NotificationType4=class extends c{constructor(e){super(e,4)}},t.NotificationType5=class extends c{constructor(e){super(e,5)}},t.NotificationType6=class extends c{constructor(e){super(e,6)}},t.NotificationType7=class extends c{constructor(e){super(e,7)}},t.NotificationType8=class extends c{constructor(e){super(e,8)}},t.NotificationType9=class extends c{constructor(e){super(e,9)}},function(e){e.isRequest=function(e){const t=e;return t&&i.string(t.method)&&(i.string(t.id)||i.number(t.id))},e.isNotification=function(e){const t=e;return t&&i.string(t.method)&&void 0===e.id},e.isResponse=function(e){const t=e;return t&&(void 0!==t.result||!!t.error)&&(i.string(t.id)||i.number(t.id)||null===t.id)}}(r||(t.Message=r={}))},8094:(e,t)=>{"use strict";let n;function i(){if(void 0===n)throw new Error("No runtime abstraction layer installed");return n}Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.install=function(e){if(void 0===e)throw new Error("No runtime abstraction layer provided");n=e}}(i||(i={})),t.default=i},6791:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Semaphore=void 0;const i=n(8094);t.Semaphore=class{constructor(e=1){if(e<=0)throw new Error("Capacity must be greater than 0");this._capacity=e,this._active=0,this._waiting=[]}lock(e){return new Promise(((t,n)=>{this._waiting.push({thunk:e,resolve:t,reject:n}),this.runNext()}))}get active(){return this._active}runNext(){0!==this._waiting.length&&this._active!==this._capacity&&(0,i.default)().timer.setImmediate((()=>this.doRunNext()))}doRunNext(){if(0===this._waiting.length||this._active===this._capacity)return;const e=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("To many thunks active");try{const t=e.thunk();t instanceof Promise?t.then((t=>{this._active--,e.resolve(t),this.runNext()}),(t=>{this._active--,e.reject(t),this.runNext()})):(this._active--,e.resolve(t),this.runNext())}catch(t){this._active--,e.reject(t),this.runNext()}}}},278:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SharedArrayReceiverStrategy=t.SharedArraySenderStrategy=void 0;const i=n(7770);var o;!function(e){e.Continue=0,e.Cancelled=1}(o||(o={})),t.SharedArraySenderStrategy=class{constructor(){this.buffers=new Map}enableCancellation(e){if(null===e.id)return;const t=new SharedArrayBuffer(4);new Int32Array(t,0,1)[0]=o.Continue,this.buffers.set(e.id,t),e.$cancellationData=t}async sendCancellation(e,t){const n=this.buffers.get(t);if(void 0===n)return;const i=new Int32Array(n,0,1);Atomics.store(i,0,o.Cancelled)}cleanup(e){this.buffers.delete(e)}dispose(){this.buffers.clear()}};class r{constructor(e){this.data=new Int32Array(e,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===o.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}}class s{constructor(e){this.token=new r(e)}cancel(){}dispose(){}}t.SharedArrayReceiverStrategy=class{constructor(){this.kind="request"}createCancellationTokenSource(e){const t=e.$cancellationData;return void 0===t?new i.CancellationTokenSource:new s(t)}}},4970:(e,t,n)=>{"use strict";e.exports=n(7053)},7053:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.LanguageClient=void 0;const r=n(9562),s=n(9351);o(n(9351),t),o(n(9562),t);class a extends r.BaseLanguageClient{constructor(e,t,n,i){super(e,t,n),this.worker=i}createMessageTransports(e){const t=new s.BrowserMessageReader(this.worker),n=new s.BrowserMessageWriter(this.worker);return Promise.resolve({reader:t,writer:n})}}t.LanguageClient=a},9562:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.DiagnosticPullMode=t.vsdiag=void 0,o(n(5968),t),o(n(497),t);var r=n(7443);Object.defineProperty(t,"vsdiag",{enumerable:!0,get:function(){return r.vsdiag}}),Object.defineProperty(t,"DiagnosticPullMode",{enumerable:!0,get:function(){return r.DiagnosticPullMode}}),o(n(5760),t)},7973:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CallHierarchyFeature=void 0;const i=n(9496),o=n(5968),r=n(497);class s{constructor(e){this.client=e,this.middleware=e.middleware}prepareCallHierarchy(e,t,n){const i=this.client,r=this.middleware,s=(e,t,n)=>{const r=i.code2ProtocolConverter.asTextDocumentPositionParams(e,t);return i.sendRequest(o.CallHierarchyPrepareRequest.type,r,n).then((e=>n.isCancellationRequested?null:i.protocol2CodeConverter.asCallHierarchyItems(e,n)),(e=>i.handleFailedRequest(o.CallHierarchyPrepareRequest.type,n,e,null)))};return r.prepareCallHierarchy?r.prepareCallHierarchy(e,t,n,s):s(e,t,n)}provideCallHierarchyIncomingCalls(e,t){const n=this.client,i=this.middleware,r=(e,t)=>{const i={item:n.code2ProtocolConverter.asCallHierarchyItem(e)};return n.sendRequest(o.CallHierarchyIncomingCallsRequest.type,i,t).then((e=>t.isCancellationRequested?null:n.protocol2CodeConverter.asCallHierarchyIncomingCalls(e,t)),(e=>n.handleFailedRequest(o.CallHierarchyIncomingCallsRequest.type,t,e,null)))};return i.provideCallHierarchyIncomingCalls?i.provideCallHierarchyIncomingCalls(e,t,r):r(e,t)}provideCallHierarchyOutgoingCalls(e,t){const n=this.client,i=this.middleware,r=(e,t)=>{const i={item:n.code2ProtocolConverter.asCallHierarchyItem(e)};return n.sendRequest(o.CallHierarchyOutgoingCallsRequest.type,i,t).then((e=>t.isCancellationRequested?null:n.protocol2CodeConverter.asCallHierarchyOutgoingCalls(e,t)),(e=>n.handleFailedRequest(o.CallHierarchyOutgoingCallsRequest.type,t,e,null)))};return i.provideCallHierarchyOutgoingCalls?i.provideCallHierarchyOutgoingCalls(e,t,r):r(e,t)}}class a extends r.TextDocumentLanguageFeature{constructor(e){super(e,o.CallHierarchyPrepareRequest.type)}fillClientCapabilities(e){const t=e;(0,r.ensure)((0,r.ensure)(t,"textDocument"),"callHierarchy").dynamicRegistration=!0}initialize(e,t){const[n,i]=this.getRegistration(t,e.callHierarchyProvider);n&&i&&this.register({id:n,registerOptions:i})}registerLanguageProvider(e){const t=this._client,n=new s(t);return[i.languages.registerCallHierarchyProvider(this._client.protocol2CodeConverter.asDocumentSelector(e.documentSelector),n),n]}}t.CallHierarchyFeature=a},5760:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProposedFeatures=t.BaseLanguageClient=t.MessageTransports=t.SuspendMode=t.State=t.CloseAction=t.ErrorAction=t.RevealOutputChannelOn=void 0;const i=n(9496),o=n(5968),r=n(317),s=n(5356),a=n(2116),c=n(8005),u=n(7435),l=n(6181),d=n(497),h=n(7443),g=n(7172),p=n(4103),m=n(5610),f=n(491),v=n(9446),y=n(1258),C=n(1432),D=n(7317),b=n(1690),R=n(8447),w=n(9929),S=n(2155),T=n(4453),_=n(9368),k=n(2865),P=n(7272),x=n(3520),q=n(9190),F=n(7506),O=n(9764),E=n(7201),M=n(5828),I=n(807),N=n(9732),L=n(9314),A=n(4915),j=n(7973),H=n(1845),K=n(392),W=n(2550),U=n(4042),$=n(2275),z=n(863),V=n(2472);var B,J,Q,X,G,Y,Z,ee,te;!function(e){e[e.Debug=0]="Debug",e[e.Info=1]="Info",e[e.Warn=2]="Warn",e[e.Error=3]="Error",e[e.Never=4]="Never"}(B||(t.RevealOutputChannelOn=B={})),function(e){e[e.Continue=1]="Continue",e[e.Shutdown=2]="Shutdown"}(J||(t.ErrorAction=J={})),function(e){e[e.DoNotRestart=1]="DoNotRestart",e[e.Restart=2]="Restart"}(Q||(t.CloseAction=Q={})),function(e){e[e.Stopped=1]="Stopped",e[e.Starting=3]="Starting",e[e.Running=2]="Running"}(X||(t.State=X={})),function(e){e.off="off",e.on="on"}(G||(t.SuspendMode=G={})),function(e){e.sanitizeIsTrusted=function(e){return null!=e&&!!("boolean"==typeof e||"object"==typeof e&&null!==e&&a.stringArray(e.enabledCommands))&&e}}(Y||(Y={}));class ne{constructor(e,t){this.client=e,this.maxRestartCount=t,this.restarts=[]}error(e,t,n){return n&&n<=3?{action:J.Continue}:{action:J.Shutdown}}closed(){return this.restarts.push(Date.now()),this.restarts.length<=this.maxRestartCount?{action:Q.Restart}:this.restarts[this.restarts.length-1]-this.restarts[0]<=18e4?{action:Q.DoNotRestart,message:`The ${this.client.name} server crashed ${this.maxRestartCount+1} times in the last 3 minutes. The server will not be restarted. See the output for more information.`}:(this.restarts.shift(),{action:Q.Restart})}}!function(e){e.Initial="initial",e.Starting="starting",e.StartFailed="startFailed",e.Running="running",e.Stopping="stopping",e.Stopped="stopped"}(Z||(Z={})),function(e){e.is=function(e){return e&&o.MessageReader.is(e.reader)&&o.MessageWriter.is(e.writer)}}(ee||(t.MessageTransports=ee={}));class ie{constructor(e,t,n){this._traceFormat=o.TraceFormat.Text,this._diagnosticQueue=new Map,this._diagnosticQueueState={state:"idle"},this._features=[],this._dynamicFeatures=new Map,this.workspaceEditLock=new c.Semaphore(1),this._id=e,this._name=t;const i={isTrusted:!1,supportHtml:!1};void 0!==(n=n||{}).markdown&&(i.isTrusted=Y.sanitizeIsTrusted(n.markdown.isTrusted),i.supportHtml=!0===n.markdown.supportHtml),this._clientOptions={documentSelector:n.documentSelector??[],synchronize:n.synchronize??{},diagnosticCollectionName:n.diagnosticCollectionName,outputChannelName:n.outputChannelName??this._name,revealOutputChannelOn:n.revealOutputChannelOn??B.Error,stdioEncoding:n.stdioEncoding??"utf8",initializationOptions:n.initializationOptions,initializationFailedHandler:n.initializationFailedHandler,progressOnInitialization:!!n.progressOnInitialization,errorHandler:n.errorHandler??this.createDefaultErrorHandler(n.connectionOptions?.maxRestartCount),middleware:n.middleware??{},uriConverters:n.uriConverters,workspaceFolder:n.workspaceFolder,connectionOptions:n.connectionOptions,markdown:i,diagnosticPullOptions:n.diagnosticPullOptions??{onChange:!0,onSave:!1},notebookDocumentOptions:n.notebookDocumentOptions??{}},this._clientOptions.synchronize=this._clientOptions.synchronize||{},this._state=Z.Initial,this._ignoredRegistrations=new Set,this._listeners=[],this._notificationHandlers=new Map,this._pendingNotificationHandlers=new Map,this._notificationDisposables=new Map,this._requestHandlers=new Map,this._pendingRequestHandlers=new Map,this._requestDisposables=new Map,this._progressHandlers=new Map,this._pendingProgressHandlers=new Map,this._progressDisposables=new Map,this._connection=void 0,this._initializeResult=void 0,n.outputChannel?(this._outputChannel=n.outputChannel,this._disposeOutputChannel=!1):(this._outputChannel=void 0,this._disposeOutputChannel=!0),this._traceOutputChannel=n.traceOutputChannel,this._diagnostics=void 0,this._pendingOpenNotifications=new Set,this._pendingChangeSemaphore=new c.Semaphore(1),this._pendingChangeDelayer=new c.Delayer(250),this._fileEvents=[],this._fileEventDelayer=new c.Delayer(250),this._onStop=void 0,this._telemetryEmitter=new o.Emitter,this._stateChangeEmitter=new o.Emitter,this._trace=o.Trace.Off,this._tracer={log:(e,t)=>{a.string(e)?this.logTrace(e,t):this.logObjectTrace(e)}},this._c2p=r.createConverter(n.uriConverters?n.uriConverters.code2Protocol:void 0),this._p2c=s.createConverter(n.uriConverters?n.uriConverters.protocol2Code:void 0,this._clientOptions.markdown.isTrusted,this._clientOptions.markdown.supportHtml),this._syncedDocuments=new Map,this.registerBuiltinFeatures()}get name(){return this._name}get middleware(){return this._clientOptions.middleware??Object.create(null)}get clientOptions(){return this._clientOptions}get protocol2CodeConverter(){return this._p2c}get code2ProtocolConverter(){return this._c2p}get onTelemetry(){return this._telemetryEmitter.event}get onDidChangeState(){return this._stateChangeEmitter.event}get outputChannel(){return this._outputChannel||(this._outputChannel=i.window.createOutputChannel(this._clientOptions.outputChannelName?this._clientOptions.outputChannelName:this._name)),this._outputChannel}get traceOutputChannel(){return this._traceOutputChannel?this._traceOutputChannel:this.outputChannel}get diagnostics(){return this._diagnostics}get state(){return this.getPublicState()}get $state(){return this._state}set $state(e){let t=this.getPublicState();this._state=e;let n=this.getPublicState();n!==t&&this._stateChangeEmitter.fire({oldState:t,newState:n})}getPublicState(){switch(this.$state){case Z.Starting:return X.Starting;case Z.Running:return X.Running;default:return X.Stopped}}get initializeResult(){return this._initializeResult}async sendRequest(e,...t){if(this.$state===Z.StartFailed||this.$state===Z.Stopping||this.$state===Z.Stopped)return Promise.reject(new o.ResponseError(o.ErrorCodes.ConnectionInactive,"Client is not running"));const n=await this.$start();this._didChangeTextDocumentFeature.syncKind===o.TextDocumentSyncKind.Full&&await this.sendPendingFullTextDocumentChanges(n);const i=this._clientOptions.middleware?.sendRequest;if(void 0!==i){let r,s;return 1===t.length?o.CancellationToken.is(t[0])?s=t[0]:r=t[0]:2===t.length&&(r=t[0],s=t[1]),i(e,r,s,((e,t,i)=>{const o=[];return void 0!==t&&o.push(t),void 0!==i&&o.push(i),n.sendRequest(e,...o)}))}return n.sendRequest(e,...t)}onRequest(e,t){const n="string"==typeof e?e:e.method;this._requestHandlers.set(n,t);const i=this.activeConnection();let o;return void 0!==i?(this._requestDisposables.set(n,i.onRequest(e,t)),o={dispose:()=>{const e=this._requestDisposables.get(n);void 0!==e&&(e.dispose(),this._requestDisposables.delete(n))}}):(this._pendingRequestHandlers.set(n,t),o={dispose:()=>{this._pendingRequestHandlers.delete(n);const e=this._requestDisposables.get(n);void 0!==e&&(e.dispose(),this._requestDisposables.delete(n))}}),{dispose:()=>{this._requestHandlers.delete(n),o.dispose()}}}async sendNotification(e,t){if(this.$state===Z.StartFailed||this.$state===Z.Stopping||this.$state===Z.Stopped)return Promise.reject(new o.ResponseError(o.ErrorCodes.ConnectionInactive,"Client is not running"));const n=this._didChangeTextDocumentFeature.syncKind===o.TextDocumentSyncKind.Full;let i;n&&"string"!=typeof e&&e.method===o.DidOpenTextDocumentNotification.method&&(i=t?.textDocument.uri,this._pendingOpenNotifications.add(i));const r=await this.$start();n&&await this.sendPendingFullTextDocumentChanges(r),void 0!==i&&this._pendingOpenNotifications.delete(i);const s=this._clientOptions.middleware?.sendNotification;return s?s(e,r.sendNotification.bind(r),t):r.sendNotification(e,t)}onNotification(e,t){const n="string"==typeof e?e:e.method;this._notificationHandlers.set(n,t);const i=this.activeConnection();let o;return void 0!==i?(this._notificationDisposables.set(n,i.onNotification(e,t)),o={dispose:()=>{const e=this._notificationDisposables.get(n);void 0!==e&&(e.dispose(),this._notificationDisposables.delete(n))}}):(this._pendingNotificationHandlers.set(n,t),o={dispose:()=>{this._pendingNotificationHandlers.delete(n);const e=this._notificationDisposables.get(n);void 0!==e&&(e.dispose(),this._notificationDisposables.delete(n))}}),{dispose:()=>{this._notificationHandlers.delete(n),o.dispose()}}}async sendProgress(e,t,n){if(this.$state===Z.StartFailed||this.$state===Z.Stopping||this.$state===Z.Stopped)return Promise.reject(new o.ResponseError(o.ErrorCodes.ConnectionInactive,"Client is not running"));try{return(await this.$start()).sendProgress(e,t,n)}catch(e){throw this.error(`Sending progress for token ${t} failed.`,e),e}}onProgress(e,t,n){this._progressHandlers.set(t,{type:e,handler:n});const i=this.activeConnection();let r;const s=this._clientOptions.middleware?.handleWorkDoneProgress,a=o.WorkDoneProgress.is(e)&&void 0!==s?e=>{s(t,e,(()=>n(e)))}:n;return void 0!==i?(this._progressDisposables.set(t,i.onProgress(e,t,a)),r={dispose:()=>{const e=this._progressDisposables.get(t);void 0!==e&&(e.dispose(),this._progressDisposables.delete(t))}}):(this._pendingProgressHandlers.set(t,{type:e,handler:n}),r={dispose:()=>{this._pendingProgressHandlers.delete(t);const e=this._progressDisposables.get(t);void 0!==e&&(e.dispose(),this._progressDisposables.delete(t))}}),{dispose:()=>{this._progressHandlers.delete(t),r.dispose()}}}createDefaultErrorHandler(e){if(void 0!==e&&e<0)throw new Error(`Invalid maxRestartCount: ${e}`);return new ne(this,e??4)}async setTrace(e){this._trace=e;const t=this.activeConnection();void 0!==t&&await t.trace(this._trace,this._tracer,{sendNotification:!1,traceFormat:this._traceFormat})}data2String(e){if(e instanceof o.ResponseError){const t=e;return` Message: ${t.message}\n Code: ${t.code} ${t.data?"\n"+t.data.toString():""}`}return e instanceof Error?a.string(e.stack)?e.stack:e.message:a.string(e)?e:e.toString()}debug(e,t,n=!0){this.logOutputMessage(o.MessageType.Debug,B.Debug,"Debug",e,t,n)}info(e,t,n=!0){this.logOutputMessage(o.MessageType.Info,B.Info,"Info",e,t,n)}warn(e,t,n=!0){this.logOutputMessage(o.MessageType.Warning,B.Warn,"Warn",e,t,n)}error(e,t,n=!0){this.logOutputMessage(o.MessageType.Error,B.Error,"Error",e,t,n)}logOutputMessage(e,t,n,i,o,r){this.outputChannel.appendLine(`[${n.padEnd(5)} - ${(new Date).toLocaleTimeString()}] ${i}`),null!=o&&this.outputChannel.appendLine(this.data2String(o)),("force"===r||r&&this._clientOptions.revealOutputChannelOn<=t)&&this.showNotificationMessage(e,i)}showNotificationMessage(e,t){t=t??"A request has failed. See the output for more information.",(e===o.MessageType.Error?i.window.showErrorMessage:e===o.MessageType.Warning?i.window.showWarningMessage:i.window.showInformationMessage)(t,"Go to output").then((e=>{void 0!==e&&this.outputChannel.show(!0)}))}logTrace(e,t){this.traceOutputChannel.appendLine(`[Trace - ${(new Date).toLocaleTimeString()}] ${e}`),t&&this.traceOutputChannel.appendLine(this.data2String(t))}logObjectTrace(e){e.isLSPMessage&&e.type?this.traceOutputChannel.append(`[LSP - ${(new Date).toLocaleTimeString()}] `):this.traceOutputChannel.append(`[Trace - ${(new Date).toLocaleTimeString()}] `),e&&this.traceOutputChannel.appendLine(`${JSON.stringify(e)}`)}needsStart(){return this.$state===Z.Initial||this.$state===Z.Stopping||this.$state===Z.Stopped}needsStop(){return this.$state===Z.Starting||this.$state===Z.Running}activeConnection(){return this.$state===Z.Running&&void 0!==this._connection?this._connection:void 0}isRunning(){return this.$state===Z.Running}async start(){if("disposing"===this._disposed||"disposed"===this._disposed)throw new Error("Client got disposed and can't be restarted.");if(this.$state===Z.Stopping)throw new Error("Client is currently stopping. Can only restart a full stopped client");if(void 0!==this._onStart)return this._onStart;const[e,t,n]=this.createOnStartPromise();this._onStart=e,void 0===this._diagnostics&&(this._diagnostics=this._clientOptions.diagnosticCollectionName?i.languages.createDiagnosticCollection(this._clientOptions.diagnosticCollectionName):i.languages.createDiagnosticCollection());for(const[e,t]of this._notificationHandlers)this._pendingNotificationHandlers.has(e)||this._pendingNotificationHandlers.set(e,t);for(const[e,t]of this._requestHandlers)this._pendingRequestHandlers.has(e)||this._pendingRequestHandlers.set(e,t);for(const[e,t]of this._progressHandlers)this._pendingProgressHandlers.has(e)||this._pendingProgressHandlers.set(e,t);this.$state=Z.Starting;try{const e=await this.createConnection();e.onNotification(o.LogMessageNotification.type,(e=>{switch(e.type){case o.MessageType.Error:this.error(e.message,void 0,!1);break;case o.MessageType.Warning:this.warn(e.message,void 0,!1);break;case o.MessageType.Info:this.info(e.message,void 0,!1);break;case o.MessageType.Debug:this.debug(e.message,void 0,!1);break;default:this.outputChannel.appendLine(e.message)}})),e.onNotification(o.ShowMessageNotification.type,(e=>{switch(e.type){case o.MessageType.Error:i.window.showErrorMessage(e.message);break;case o.MessageType.Warning:i.window.showWarningMessage(e.message);break;case o.MessageType.Info:i.window.showInformationMessage(e.message);break;default:i.window.showInformationMessage(e.message)}})),e.onRequest(o.ShowMessageRequest.type,(e=>{let t;switch(e.type){case o.MessageType.Error:t=i.window.showErrorMessage;break;case o.MessageType.Warning:t=i.window.showWarningMessage;break;case o.MessageType.Info:t=i.window.showInformationMessage;break;default:t=i.window.showInformationMessage}let n=e.actions||[];return t(e.message,...n)})),e.onNotification(o.TelemetryEventNotification.type,(e=>{this._telemetryEmitter.fire(e)})),e.onRequest(o.ShowDocumentRequest.type,(async e=>{const t=async e=>{const t=this.protocol2CodeConverter.asUri(e.uri);try{if(!0===e.external)return{success:await i.env.openExternal(t)};{const n={};return void 0!==e.selection&&(n.selection=this.protocol2CodeConverter.asRange(e.selection)),void 0===e.takeFocus||!1===e.takeFocus?n.preserveFocus=!0:!0===e.takeFocus&&(n.preserveFocus=!1),await i.window.showTextDocument(t,n),{success:!0}}}catch(e){return{success:!1}}},n=this._clientOptions.middleware.window?.showDocument;return void 0!==n?n(e,t):t(e)})),e.listen(),await this.initialize(e),t()}catch(e){this.$state=Z.StartFailed,this.error(`${this._name} client: couldn't create connection to server.`,e,"force"),n(e)}return this._onStart}createOnStartPromise(){let e,t;return[new Promise(((n,i)=>{e=n,t=i})),e,t]}async initialize(e){this.refreshTrace(e,!1);const t=this._clientOptions.initializationOptions,[n,r]=void 0!==this._clientOptions.workspaceFolder?[this._clientOptions.workspaceFolder.uri.fsPath,[{uri:this._c2p.asUri(this._clientOptions.workspaceFolder.uri),name:this._clientOptions.workspaceFolder.name}]]:[this._clientGetRootPath(),null],s={processId:null,clientInfo:{name:i.env.appName,version:i.version},locale:this.getLocale(),rootPath:n||null,rootUri:n?this._c2p.asUri(i.Uri.file(n)):null,capabilities:this.computeClientCapabilities(),initializationOptions:a.func(t)?t():t,trace:o.Trace.toString(this._trace),workspaceFolders:r};if(this.fillInitializeParams(s),!this._clientOptions.progressOnInitialization)return this.doInitialize(e,s);{const t=u.generateUuid(),n=new l.ProgressPart(e,t);s.workDoneToken=t;try{const t=await this.doInitialize(e,s);return n.done(),t}catch(e){throw n.cancel(),e}}}async doInitialize(e,t){try{const n=await e.initialize(t);if(void 0!==n.capabilities.positionEncoding&&n.capabilities.positionEncoding!==o.PositionEncodingKind.UTF16)throw new Error(`Unsupported position encoding (${n.capabilities.positionEncoding}) received from server ${this.name}`);let i;this._initializeResult=n,this.$state=Z.Running,a.number(n.capabilities.textDocumentSync)?i=n.capabilities.textDocumentSync===o.TextDocumentSyncKind.None?{openClose:!1,change:o.TextDocumentSyncKind.None,save:void 0}:{openClose:!0,change:n.capabilities.textDocumentSync,save:{includeText:!1}}:void 0!==n.capabilities.textDocumentSync&&null!==n.capabilities.textDocumentSync&&(i=n.capabilities.textDocumentSync),this._capabilities=Object.assign({},n.capabilities,{resolvedTextDocumentSync:i}),e.onNotification(o.PublishDiagnosticsNotification.type,(e=>this.handleDiagnostics(e))),e.onRequest(o.RegistrationRequest.type,(e=>this.handleRegistrationRequest(e))),e.onRequest("client/registerFeature",(e=>this.handleRegistrationRequest(e))),e.onRequest(o.UnregistrationRequest.type,(e=>this.handleUnregistrationRequest(e))),e.onRequest("client/unregisterFeature",(e=>this.handleUnregistrationRequest(e))),e.onRequest(o.ApplyWorkspaceEditRequest.type,(e=>this.handleApplyWorkspaceEdit(e)));for(const[t,n]of this._pendingNotificationHandlers)this._notificationDisposables.set(t,e.onNotification(t,n));this._pendingNotificationHandlers.clear();for(const[t,n]of this._pendingRequestHandlers)this._requestDisposables.set(t,e.onRequest(t,n));this._pendingRequestHandlers.clear();for(const[t,n]of this._pendingProgressHandlers)this._progressDisposables.set(t,e.onProgress(n.type,t,n.handler));return this._pendingProgressHandlers.clear(),await e.sendNotification(o.InitializedNotification.type,{}),this.hookFileEvents(e),this.hookConfigurationChanged(e),this.initializeFeatures(e),n}catch(t){throw this._clientOptions.initializationFailedHandler?this._clientOptions.initializationFailedHandler(t)?this.initialize(e):this.stop():t instanceof o.ResponseError&&t.data&&t.data.retry?i.window.showErrorMessage(t.message,{title:"Retry",id:"retry"}).then((t=>{t&&"retry"===t.id?this.initialize(e):this.stop()})):(t&&t.message&&i.window.showErrorMessage(t.message),this.error("Server initialization failed.",t),this.stop()),t}}_clientGetRootPath(){let e=i.workspace.workspaceFolders;if(!e||0===e.length)return;let t=e[0];return"file"===t.uri.scheme?t.uri.fsPath:void 0}stop(e=2e3){return this.shutdown("stop",e)}dispose(e=2e3){try{return this._disposed="disposing",this.stop(e)}finally{this._disposed="disposed"}}async shutdown(e,t){if(this.$state===Z.Stopped||this.$state===Z.Initial)return;if(this.$state===Z.Stopping){if(void 0!==this._onStop)return this._onStop;throw new Error("Client is stopping but no stop promise available.")}const n=this.activeConnection();if(void 0===n||this.$state!==Z.Running)throw new Error(`Client is not running and can't be stopped. It's current state is: ${this.$state}`);this._initializeResult=void 0,this.$state=Z.Stopping,this.cleanUp(e);const i=new Promise((e=>{(0,o.RAL)().timer.setTimeout(e,t)})),r=(async e=>(await e.shutdown(),await e.exit(),e))(n);return this._onStop=Promise.race([i,r]).then((e=>{if(void 0===e)throw this.error("Stopping server timed out",void 0,!1),new Error("Stopping the server timed out");e.end(),e.dispose()}),(e=>{throw this.error("Stopping server failed",e,!1),e})).finally((()=>{this.$state=Z.Stopped,"stop"===e&&this.cleanUpChannel(),this._onStart=void 0,this._onStop=void 0,this._connection=void 0,this._ignoredRegistrations.clear()}))}cleanUp(e){this._fileEvents=[],this._fileEventDelayer.cancel();const t=this._listeners.splice(0,this._listeners.length);for(const e of t)e.dispose();this._syncedDocuments&&this._syncedDocuments.clear();for(const e of Array.from(this._features.entries()).map((e=>e[1])).reverse())e.clear();"stop"===e&&void 0!==this._diagnostics&&(this._diagnostics.dispose(),this._diagnostics=void 0),void 0!==this._idleInterval&&(this._idleInterval.dispose(),this._idleInterval=void 0)}cleanUpChannel(){void 0!==this._outputChannel&&this._disposeOutputChannel&&(this._outputChannel.dispose(),this._outputChannel=void 0)}notifyFileEvent(e){const t=this;async function n(e){return t._fileEvents.push(e),t._fileEventDelayer.trigger((async()=>{await t.sendNotification(o.DidChangeWatchedFilesNotification.type,{changes:t._fileEvents}),t._fileEvents=[]}))}const i=this.clientOptions.middleware?.workspace;(i?.didChangeWatchedFile?i.didChangeWatchedFile(e,n):n(e)).catch((e=>{t.error("Notify file events failed.",e)}))}async sendPendingFullTextDocumentChanges(e){return this._pendingChangeSemaphore.lock((async()=>{try{const t=this._didChangeTextDocumentFeature.getPendingDocumentChanges(this._pendingOpenNotifications);if(0===t.length)return;for(const n of t){const t=this.code2ProtocolConverter.asChangeTextDocumentParams(n);await e.sendNotification(o.DidChangeTextDocumentNotification.type,t),this._didChangeTextDocumentFeature.notificationSent(n,o.DidChangeTextDocumentNotification.type,t)}}catch(e){throw this.error("Sending pending changes failed",e,!1),e}}))}triggerPendingChangeDelivery(){this._pendingChangeDelayer.trigger((async()=>{const e=this.activeConnection();void 0!==e?await this.sendPendingFullTextDocumentChanges(e):this.triggerPendingChangeDelivery()})).catch((e=>this.error("Delivering pending changes failed",e,!1)))}handleDiagnostics(e){if(!this._diagnostics)return;const t=e.uri;"busy"===this._diagnosticQueueState.state&&this._diagnosticQueueState.document===t&&this._diagnosticQueueState.tokenSource.cancel(),this._diagnosticQueue.set(e.uri,e.diagnostics),this.triggerDiagnosticQueue()}triggerDiagnosticQueue(){(0,o.RAL)().timer.setImmediate((()=>{this.workDiagnosticQueue()}))}workDiagnosticQueue(){if("busy"===this._diagnosticQueueState.state)return;const e=this._diagnosticQueue.entries().next();if(!0===e.done)return;const[t,n]=e.value;this._diagnosticQueue.delete(t);const o=new i.CancellationTokenSource;this._diagnosticQueueState={state:"busy",document:t,tokenSource:o},this._p2c.asDiagnostics(n,o.token).then((e=>{if(!o.token.isCancellationRequested){const n=this._p2c.asUri(t),i=this.clientOptions.middleware;i.handleDiagnostics?i.handleDiagnostics(n,e,((e,t)=>this.setDiagnostics(e,t))):this.setDiagnostics(n,e)}})).finally((()=>{this._diagnosticQueueState={state:"idle"},this.triggerDiagnosticQueue()}))}setDiagnostics(e,t){this._diagnostics&&this._diagnostics.set(e,t)}getLocale(){return i.env.language}async $start(){if(this.$state===Z.StartFailed)throw new Error("Previous start failed. Can't restart server.");await this.start();const e=this.activeConnection();if(void 0===e)throw new Error("Starting server failed");return e}async createConnection(){const e=await this.createMessageTransports(this._clientOptions.stdioEncoding||"utf8");return this._connection=function(e,t,n,i,r){const s=new oe,c=(0,o.createProtocolConnection)(e,t,s,r);return c.onError((e=>{n(e[0],e[1],e[2])})),c.onClose(i),{listen:()=>c.listen(),sendRequest:c.sendRequest,onRequest:c.onRequest,hasPendingResponse:c.hasPendingResponse,sendNotification:c.sendNotification,onNotification:c.onNotification,onProgress:c.onProgress,sendProgress:c.sendProgress,trace:(e,t,n)=>{const i={sendNotification:!1,traceFormat:o.TraceFormat.Text};return void 0===n?c.trace(e,t,i):(a.boolean(n),c.trace(e,t,n))},initialize:e=>c.sendRequest(o.InitializeRequest.type,e),shutdown:()=>c.sendRequest(o.ShutdownRequest.type,void 0),exit:()=>c.sendNotification(o.ExitNotification.type),end:()=>c.end(),dispose:()=>c.dispose()}}(e.reader,e.writer,((e,t,n)=>{this.handleConnectionError(e,t,n).catch((e=>this.error("Handling connection error failed",e)))}),(()=>{this.handleConnectionClosed().catch((e=>this.error("Handling connection close failed",e)))}),this._clientOptions.connectionOptions),this._connection}async handleConnectionClosed(){if(this.$state===Z.Stopped)return;try{void 0!==this._connection&&this._connection.dispose()}catch(e){}let e={action:Q.DoNotRestart};if(this.$state!==Z.Stopping)try{e=await this._clientOptions.errorHandler.closed()}catch(e){}this._connection=void 0,e.action===Q.DoNotRestart?(this.error(e.message??"Connection to server got closed. Server will not be restarted.",void 0,!0!==e.handled&&"force"),this.cleanUp("stop"),this.$state===Z.Starting?this.$state=Z.StartFailed:this.$state=Z.Stopped,this._onStop=Promise.resolve(),this._onStart=void 0):e.action===Q.Restart&&(this.info(e.message??"Connection to server got closed. Server will restart.",!e.handled),this.cleanUp("restart"),this.$state=Z.Initial,this._onStop=Promise.resolve(),this._onStart=void 0,this.start().catch((e=>this.error("Restarting server failed",e,"force"))))}async handleConnectionError(e,t,n){const i=await this._clientOptions.errorHandler.error(e,t,n);i.action===J.Shutdown?(this.error(i.message??`Client ${this._name}: connection to server is erroring.\n${e.message}\nShutting down server.`,void 0,!0!==i.handled&&"force"),this.stop().catch((e=>{this.error("Stopping server failed",e,!1)}))):this.error(i.message??`Client ${this._name}: connection to server is erroring.\n${e.message}`,void 0,!0!==i.handled&&"force")}hookConfigurationChanged(e){this._listeners.push(i.workspace.onDidChangeConfiguration((()=>{this.refreshTrace(e,!0)})))}refreshTrace(e,t=!1){const n=i.workspace.getConfiguration(this._id);let r=o.Trace.Off,s=o.TraceFormat.Text;if(n){const e=n.get("trace.server","off");"string"==typeof e?r=o.Trace.fromString(e):(r=o.Trace.fromString(n.get("trace.server.verbosity","off")),s=o.TraceFormat.fromString(n.get("trace.server.format","text")))}this._trace=r,this._traceFormat=s,e.trace(this._trace,this._tracer,{sendNotification:t,traceFormat:this._traceFormat}).catch((e=>{this.error("Updating trace failed with error",e,!1)}))}hookFileEvents(e){let t,n=this._clientOptions.synchronize.fileEvents;n&&(t=a.array(n)?n:[n],t&&this._dynamicFeatures.get(o.DidChangeWatchedFilesNotification.type.method).registerRaw(u.generateUuid(),t))}registerFeatures(e){for(let t of e)this.registerFeature(t)}registerFeature(e){if(this._features.push(e),d.DynamicFeature.is(e)){const t=e.registrationType;this._dynamicFeatures.set(t.method,e)}}getFeature(e){return this._dynamicFeatures.get(e)}hasDedicatedTextSynchronizationFeature(e){const t=this.getFeature(o.NotebookDocumentSyncRegistrationType.method);return void 0!==t&&t instanceof g.NotebookDocumentSyncFeature&&t.handles(e)}registerBuiltinFeatures(){const e=new Map;this.registerFeature(new p.ConfigurationFeature(this)),this.registerFeature(new m.DidOpenTextDocumentFeature(this,this._syncedDocuments)),this._didChangeTextDocumentFeature=new m.DidChangeTextDocumentFeature(this,e),this._didChangeTextDocumentFeature.onPendingChangeAdded((()=>{this.triggerPendingChangeDelivery()})),this.registerFeature(this._didChangeTextDocumentFeature),this.registerFeature(new m.WillSaveFeature(this)),this.registerFeature(new m.WillSaveWaitUntilFeature(this)),this.registerFeature(new m.DidSaveTextDocumentFeature(this)),this.registerFeature(new m.DidCloseTextDocumentFeature(this,this._syncedDocuments,e)),this.registerFeature(new q.FileSystemWatcherFeature(this,(e=>this.notifyFileEvent(e)))),this.registerFeature(new f.CompletionItemFeature(this)),this.registerFeature(new v.HoverFeature(this)),this.registerFeature(new C.SignatureHelpFeature(this)),this.registerFeature(new y.DefinitionFeature(this)),this.registerFeature(new w.ReferencesFeature(this)),this.registerFeature(new D.DocumentHighlightFeature(this)),this.registerFeature(new b.DocumentSymbolFeature(this)),this.registerFeature(new R.WorkspaceSymbolFeature(this)),this.registerFeature(new S.CodeActionFeature(this)),this.registerFeature(new T.CodeLensFeature(this)),this.registerFeature(new _.DocumentFormattingFeature(this)),this.registerFeature(new _.DocumentRangeFormattingFeature(this)),this.registerFeature(new _.DocumentOnTypeFormattingFeature(this)),this.registerFeature(new k.RenameFeature(this)),this.registerFeature(new P.DocumentLinkFeature(this)),this.registerFeature(new x.ExecuteCommandFeature(this)),this.registerFeature(new p.SyncConfigurationFeature(this)),this.registerFeature(new E.TypeDefinitionFeature(this)),this.registerFeature(new O.ImplementationFeature(this)),this.registerFeature(new F.ColorProviderFeature(this)),void 0===this.clientOptions.workspaceFolder&&this.registerFeature(new M.WorkspaceFoldersFeature(this)),this.registerFeature(new I.FoldingRangeFeature(this)),this.registerFeature(new N.DeclarationFeature(this)),this.registerFeature(new L.SelectionRangeFeature(this)),this.registerFeature(new A.ProgressFeature(this)),this.registerFeature(new j.CallHierarchyFeature(this)),this.registerFeature(new H.SemanticTokensFeature(this)),this.registerFeature(new W.LinkedEditingFeature(this)),this.registerFeature(new K.DidCreateFilesFeature(this)),this.registerFeature(new K.DidRenameFilesFeature(this)),this.registerFeature(new K.DidDeleteFilesFeature(this)),this.registerFeature(new K.WillCreateFilesFeature(this)),this.registerFeature(new K.WillRenameFilesFeature(this)),this.registerFeature(new K.WillDeleteFilesFeature(this)),this.registerFeature(new U.TypeHierarchyFeature(this)),this.registerFeature(new $.InlineValueFeature(this)),this.registerFeature(new z.InlayHintsFeature(this)),this.registerFeature(new h.DiagnosticFeature(this)),this.registerFeature(new g.NotebookDocumentSyncFeature(this))}registerProposedFeatures(){this.registerFeatures(te.createAll(this))}fillInitializeParams(e){for(let t of this._features)a.func(t.fillInitializeParams)&&t.fillInitializeParams(e)}computeClientCapabilities(){const e={};(0,d.ensure)(e,"workspace").applyEdit=!0;const t=(0,d.ensure)((0,d.ensure)(e,"workspace"),"workspaceEdit");t.documentChanges=!0,t.resourceOperations=[o.ResourceOperationKind.Create,o.ResourceOperationKind.Rename,o.ResourceOperationKind.Delete],t.failureHandling=o.FailureHandlingKind.TextOnlyTransactional,t.normalizesLineEndings=!0,t.changeAnnotationSupport={groupsOnLabel:!0};const n=(0,d.ensure)((0,d.ensure)(e,"textDocument"),"publishDiagnostics");n.relatedInformation=!0,n.versionSupport=!1,n.tagSupport={valueSet:[o.DiagnosticTag.Unnecessary,o.DiagnosticTag.Deprecated]},n.codeDescriptionSupport=!0,n.dataSupport=!0;const i=(0,d.ensure)(e,"window");(0,d.ensure)(i,"showMessage").messageActionItem={additionalPropertiesSupport:!0},(0,d.ensure)(i,"showDocument").support=!0;const r=(0,d.ensure)(e,"general");r.staleRequestSupport={cancel:!0,retryOnContentModified:Array.from(ie.RequestsToCancelOnContentModified)},r.regularExpressions={engine:"ECMAScript",version:"ES2020"},r.markdown={parser:"marked",version:"1.1.0"},r.positionEncodings=["utf-16"],this._clientOptions.markdown.supportHtml&&(r.markdown.allowedTags=["ul","li","p","code","blockquote","ol","h1","h2","h3","h4","h5","h6","hr","em","pre","table","thead","tbody","tr","th","td","div","del","a","strong","br","img","span"]);for(let t of this._features)t.fillClientCapabilities(e);return e}initializeFeatures(e){const t=this._clientOptions.documentSelector;for(const e of this._features)a.func(e.preInitialize)&&e.preInitialize(this._capabilities,t);for(const e of this._features)e.initialize(this._capabilities,t)}async handleRegistrationRequest(e){const t=this.clientOptions.middleware?.handleRegisterCapability;return t?t(e,(e=>this.doRegisterCapability(e))):this.doRegisterCapability(e)}async doRegisterCapability(e){if(this.isRunning())for(const t of e.registrations){const e=this._dynamicFeatures.get(t.method);if(void 0===e)return Promise.reject(new Error(`No feature implementation for ${t.method} found. Registration failed.`));const n=t.registerOptions??{};n.documentSelector=n.documentSelector??this._clientOptions.documentSelector;const i={id:t.id,registerOptions:n};try{e.register(i)}catch(e){return Promise.reject(e)}}else for(const t of e.registrations)this._ignoredRegistrations.add(t.id)}async handleUnregistrationRequest(e){const t=this.clientOptions.middleware?.handleUnregisterCapability;return t?t(e,(e=>this.doUnregisterCapability(e))):this.doUnregisterCapability(e)}async doUnregisterCapability(e){for(const t of e.unregisterations){if(this._ignoredRegistrations.has(t.id))continue;const e=this._dynamicFeatures.get(t.method);if(!e)return Promise.reject(new Error(`No feature implementation for ${t.method} found. Unregistration failed.`));e.unregister(t.id)}}async handleApplyWorkspaceEdit(e){const t=e.edit,n=await this.workspaceEditLock.lock((()=>this._p2c.asWorkspaceEdit(t))),r=new Map;i.workspace.textDocuments.forEach((e=>r.set(e.uri.toString(),e)));let s=!1;if(t.documentChanges)for(const e of t.documentChanges)if(o.TextDocumentEdit.is(e)&&e.textDocument.version&&e.textDocument.version>=0){const t=this._p2c.asUri(e.textDocument.uri).toString(),n=r.get(t);if(n&&n.version!==e.textDocument.version){s=!0;break}}return s?Promise.resolve({applied:!1}):a.asPromise(i.workspace.applyEdit(n).then((e=>({applied:e}))))}handleFailedRequest(e,t,n,r,s=!0){if(n instanceof o.ResponseError){if(n.code===o.ErrorCodes.PendingResponseRejected||n.code===o.ErrorCodes.ConnectionInactive)return r;if(n.code===o.LSPErrorCodes.RequestCancelled||n.code===o.LSPErrorCodes.ServerCancelled){if(void 0!==t&&t.isCancellationRequested)return r;throw void 0!==n.data?new d.LSPCancellationError(n.data):new i.CancellationError}if(n.code===o.LSPErrorCodes.ContentModified){if(ie.RequestsToCancelOnContentModified.has(e.method)||ie.CancellableResolveCalls.has(e.method))throw new i.CancellationError;return r}}throw this.error(`Request ${e.method} failed.`,n,s),n}}t.BaseLanguageClient=ie,ie.RequestsToCancelOnContentModified=new Set([o.SemanticTokensRequest.method,o.SemanticTokensRangeRequest.method,o.SemanticTokensDeltaRequest.method]),ie.CancellableResolveCalls=new Set([o.CompletionResolveRequest.method,o.CodeLensResolveRequest.method,o.CodeActionResolveRequest.method,o.InlayHintResolveRequest.method,o.DocumentLinkResolveRequest.method,o.WorkspaceSymbolResolveRequest.method]);class oe{error(e){(0,o.RAL)().console.error(e)}warn(e){(0,o.RAL)().console.warn(e)}info(e){(0,o.RAL)().console.info(e)}log(e){(0,o.RAL)().console.log(e)}}!function(e){e.createAll=function(e){return[new V.InlineCompletionItemFeature(e)]}}(te||(t.ProposedFeatures=te={}))},2155:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeActionFeature=void 0;const i=n(9496),o=n(5968),r=n(7435),s=n(497);class a extends s.TextDocumentLanguageFeature{constructor(e){super(e,o.CodeActionRequest.type)}fillClientCapabilities(e){const t=(0,s.ensure)((0,s.ensure)(e,"textDocument"),"codeAction");t.dynamicRegistration=!0,t.isPreferredSupport=!0,t.disabledSupport=!0,t.dataSupport=!0,t.resolveSupport={properties:["edit"]},t.codeActionLiteralSupport={codeActionKind:{valueSet:[o.CodeActionKind.Empty,o.CodeActionKind.QuickFix,o.CodeActionKind.Refactor,o.CodeActionKind.RefactorExtract,o.CodeActionKind.RefactorInline,o.CodeActionKind.RefactorRewrite,o.CodeActionKind.Source,o.CodeActionKind.SourceOrganizeImports]}},t.honorsChangeAnnotations=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.codeActionProvider);n&&this.register({id:r.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t=e.documentSelector,n={provideCodeActions:(e,t,n,i)=>{const r=this._client,s=async(e,t,n,i)=>{const s={textDocument:r.code2ProtocolConverter.asTextDocumentIdentifier(e),range:r.code2ProtocolConverter.asRange(t),context:r.code2ProtocolConverter.asCodeActionContextSync(n)};return r.sendRequest(o.CodeActionRequest.type,s,i).then((e=>i.isCancellationRequested||null==e?null:r.protocol2CodeConverter.asCodeActionResult(e,i)),(e=>r.handleFailedRequest(o.CodeActionRequest.type,i,e,null)))},a=r.middleware;return a.provideCodeActions?a.provideCodeActions(e,t,n,i,s):s(e,t,n,i)},resolveCodeAction:e.resolveProvider?(e,t)=>{const n=this._client,i=this._client.middleware,r=async(e,t)=>n.sendRequest(o.CodeActionResolveRequest.type,n.code2ProtocolConverter.asCodeActionSync(e),t).then((i=>t.isCancellationRequested?e:n.protocol2CodeConverter.asCodeAction(i,t)),(i=>n.handleFailedRequest(o.CodeActionResolveRequest.type,t,i,e)));return i.resolveCodeAction?i.resolveCodeAction(e,t,r):r(e,t)}:void 0};return[i.languages.registerCodeActionsProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),n,e.codeActionKinds?{providedCodeActionKinds:this._client.protocol2CodeConverter.asCodeActionKinds(e.codeActionKinds)}:void 0),n]}}t.CodeActionFeature=a},317:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createConverter=void 0;const i=n(9496),o=n(5968),r=n(2116),s=n(8005),a=n(1143),c=n(225),u=n(8552),l=n(1219),d=n(6965),h=n(7400),g=n(9551),p=n(6832),m=n(134);var f;!function(e){e.is=function(e){const t=e;return t&&!!t.inserting&&!!t.replacing}}(f||(f={})),t.createConverter=function(e){const t=e||(e=>e.toString());function n(e){return t(e)}function v(e){return{uri:t(e.uri)}}function y(e){return{uri:t(e.uri),languageId:e.languageId,version:e.version,text:e.getText()}}function C(e){switch(e){case i.TextDocumentSaveReason.Manual:return o.TextDocumentSaveReason.Manual;case i.TextDocumentSaveReason.AfterDelay:return o.TextDocumentSaveReason.AfterDelay;case i.TextDocumentSaveReason.FocusOut:return o.TextDocumentSaveReason.FocusOut}return o.TextDocumentSaveReason.Manual}function D(e){switch(e){case i.CompletionTriggerKind.TriggerCharacter:return o.CompletionTriggerKind.TriggerCharacter;case i.CompletionTriggerKind.TriggerForIncompleteCompletions:return o.CompletionTriggerKind.TriggerForIncompleteCompletions;default:return o.CompletionTriggerKind.Invoked}}function b(e){switch(e){case i.SignatureHelpTriggerKind.Invoke:return o.SignatureHelpTriggerKind.Invoked;case i.SignatureHelpTriggerKind.TriggerCharacter:return o.SignatureHelpTriggerKind.TriggerCharacter;case i.SignatureHelpTriggerKind.ContentChange:return o.SignatureHelpTriggerKind.ContentChange}}function R(e){return{label:e.label}}function w(e){return{label:e.label,parameters:(t=e.parameters,t.map(R))};var t}function S(e){return{line:e.line,character:e.character}}function T(e){return null==e?e:{line:e.line>o.uinteger.MAX_VALUE?o.uinteger.MAX_VALUE:e.line,character:e.character>o.uinteger.MAX_VALUE?o.uinteger.MAX_VALUE:e.character}}function _(e){return null==e?e:{start:T(e.start),end:T(e.end)}}function k(e){return null==e?e:o.Location.create(n(e.uri),_(e.range))}function P(e){switch(e){case i.DiagnosticSeverity.Error:return o.DiagnosticSeverity.Error;case i.DiagnosticSeverity.Warning:return o.DiagnosticSeverity.Warning;case i.DiagnosticSeverity.Information:return o.DiagnosticSeverity.Information;case i.DiagnosticSeverity.Hint:return o.DiagnosticSeverity.Hint}}function x(e){switch(e){case i.DiagnosticTag.Unnecessary:return o.DiagnosticTag.Unnecessary;case i.DiagnosticTag.Deprecated:return o.DiagnosticTag.Deprecated;default:return}}function q(e){return{message:e.message,location:k(e.location)}}function F(e){const t=o.Diagnostic.create(_(e.range),e.message),i=e instanceof d.ProtocolDiagnostic?e:void 0;void 0!==i&&void 0!==i.data&&(t.data=i.data);const s=function(e){if(null!=e)return r.number(e)||r.string(e)?e:{value:e.value,target:n(e.target)}}(e.code);return d.DiagnosticCode.is(s)?void 0!==i&&i.hasDiagnosticCode?t.code=s:(t.code=s.value,t.codeDescription={href:s.target}):t.code=s,r.number(e.severity)&&(t.severity=P(e.severity)),Array.isArray(e.tags)&&(t.tags=function(e){if(!e)return;let t=[];for(let n of e){let e=x(n);void 0!==e&&t.push(e)}return t.length>0?t:void 0}(e.tags)),e.relatedInformation&&(t.relatedInformation=e.relatedInformation.map(q)),e.source&&(t.source=e.source),t}function O(e,t){return null==e?e:s.map(e,F,t)}function E(e){return null==e?e:e.map(F)}function M(e){switch(e){case i.CompletionItemTag.Deprecated:return o.CompletionItemTag.Deprecated}}function I(e){return{range:_(e.range),newText:e.newText}}function N(e){return null==e?e:e.map(I)}function L(e){return e<=i.SymbolKind.TypeParameter?e+1:o.SymbolKind.Property}function A(e){return e}function j(e){return e.map(A)}function H(e){switch(e){case i.CodeActionTriggerKind.Invoke:return o.CodeActionTriggerKind.Invoked;case i.CodeActionTriggerKind.Automatic:return o.CodeActionTriggerKind.Automatic;default:return}}function K(e){if(null!=e)return e.value}function W(e){let t=o.Command.create(e.title,e.command);return e.arguments&&(t.arguments=e.arguments),t}function U(e){const t=o.InlayHintLabelPart.create(e.value);return void 0!==e.location&&(t.location=k(e.location)),void 0!==e.command&&(t.command=W(e.command)),void 0!==e.tooltip&&(t.tooltip=$(e.tooltip)),t}function $(e){return"string"==typeof e?e:{kind:o.MarkupKind.Markdown,value:e.value}}return{asUri:n,asTextDocumentIdentifier:v,asTextDocumentItem:y,asVersionedTextDocumentIdentifier:function(e){return{uri:t(e.uri),version:e.version}},asOpenTextDocumentParams:function(e){return{textDocument:y(e)}},asChangeTextDocumentParams:function(e,n,i){if(function(e){const t=e;return!!t.uri&&!!t.version}(e))return{textDocument:{uri:t(e.uri),version:e.version},contentChanges:[{text:e.getText()}]};if(function(e){const t=e;return!!t.document&&!!t.contentChanges}(e)){const o=i;return{textDocument:{uri:t(n),version:o},contentChanges:e.contentChanges.map((e=>{const t=e.range;return{range:{start:{line:t.start.line,character:t.start.character},end:{line:t.end.line,character:t.end.character}},rangeLength:e.rangeLength,text:e.text}}))}}throw Error("Unsupported text document change parameter")},asCloseTextDocumentParams:function(e){return{textDocument:v(e)}},asSaveTextDocumentParams:function(e,t=!1){let n={textDocument:v(e)};return t&&(n.text=e.getText()),n},asWillSaveTextDocumentParams:function(e){return{textDocument:v(e.document),reason:C(e.reason)}},asDidCreateFilesParams:function(e){return{files:e.files.map((e=>({uri:t(e)})))}},asDidRenameFilesParams:function(e){return{files:e.files.map((e=>({oldUri:t(e.oldUri),newUri:t(e.newUri)})))}},asDidDeleteFilesParams:function(e){return{files:e.files.map((e=>({uri:t(e)})))}},asWillCreateFilesParams:function(e){return{files:e.files.map((e=>({uri:t(e)})))}},asWillRenameFilesParams:function(e){return{files:e.files.map((e=>({oldUri:t(e.oldUri),newUri:t(e.newUri)})))}},asWillDeleteFilesParams:function(e){return{files:e.files.map((e=>({uri:t(e)})))}},asTextDocumentPositionParams:function(e,t){return{textDocument:v(e),position:S(t)}},asCompletionParams:function(e,t,n){return{textDocument:v(e),position:S(t),context:{triggerKind:D(n.triggerKind),triggerCharacter:n.triggerCharacter}}},asSignatureHelpParams:function(e,t,n){return{textDocument:v(e),position:S(t),context:{isRetrigger:n.isRetrigger,triggerCharacter:n.triggerCharacter,triggerKind:b(n.triggerKind),activeSignatureHelp:(i=n.activeSignatureHelp,void 0===i?i:{signatures:(o=i.signatures,o.map(w)),activeSignature:i.activeSignature,activeParameter:i.activeParameter})}};var i,o},asWorkerPosition:S,asRange:_,asRanges:function(e){return e.map(_)},asPosition:T,asPositions:function(e,t){return s.map(e,T,t)},asPositionsSync:function(e){return e.map(T)},asLocation:k,asDiagnosticSeverity:P,asDiagnosticTag:x,asDiagnostic:F,asDiagnostics:O,asDiagnosticsSync:E,asCompletionItem:function(e,t=!1){let n,s;r.string(e.label)?n=e.label:(n=e.label.label,!t||void 0===e.label.detail&&void 0===e.label.description||(s={detail:e.label.detail,description:e.label.description}));let c={label:n};void 0!==s&&(c.labelDetails=s);let u=e instanceof a.default?e:void 0;var l,d;e.detail&&(c.detail=e.detail),e.documentation&&(u&&"$string"!==u.documentationFormat?c.documentation=function(e,t){switch(e){case"$string":return t;case o.MarkupKind.PlainText:return{kind:e,value:t};case o.MarkupKind.Markdown:return{kind:e,value:t.value};default:return`Unsupported Markup content received. Kind is: ${e}`}}(u.documentationFormat,e.documentation):c.documentation=e.documentation),e.filterText&&(c.filterText=e.filterText),function(e,t){let n,r,s=o.InsertTextFormat.PlainText;t.textEdit?(n=t.textEdit.newText,r=t.textEdit.range):t.insertText instanceof i.SnippetString?(s=o.InsertTextFormat.Snippet,n=t.insertText.value):n=t.insertText,t.range&&(r=t.range),e.insertTextFormat=s,t.fromEdit&&void 0!==n&&void 0!==r?e.textEdit=function(e,t){return f.is(t)?o.InsertReplaceEdit.create(e,_(t.inserting),_(t.replacing)):{newText:e,range:_(t)}}(n,r):e.insertText=n}(c,e),r.number(e.kind)&&(c.kind=(l=e.kind,void 0!==(d=u&&u.originalItemKind)?d:l+1)),e.sortText&&(c.sortText=e.sortText),e.additionalTextEdits&&(c.additionalTextEdits=N(e.additionalTextEdits)),e.commitCharacters&&(c.commitCharacters=e.commitCharacters.slice()),e.command&&(c.command=W(e.command)),!0!==e.preselect&&!1!==e.preselect||(c.preselect=e.preselect);const h=function(e){if(void 0===e)return e;const t=[];for(let n of e){const e=M(n);void 0!==e&&t.push(e)}return t}(e.tags);if(u){if(void 0!==u.data&&(c.data=u.data),!0===u.deprecated||!1===u.deprecated){if(!0===u.deprecated&&void 0!==h&&h.length>0){const e=h.indexOf(i.CompletionItemTag.Deprecated);-1!==e&&h.splice(e,1)}c.deprecated=u.deprecated}void 0!==u.insertTextMode&&(c.insertTextMode=u.insertTextMode)}return void 0!==h&&h.length>0&&(c.tags=h),void 0===c.insertTextMode&&!0===e.keepWhitespace&&(c.insertTextMode=o.InsertTextMode.adjustIndentation),c},asTextEdit:I,asSymbolKind:L,asSymbolTag:A,asSymbolTags:j,asReferenceParams:function(e,t,n){return{textDocument:v(e),position:S(t),context:{includeDeclaration:n.includeDeclaration}}},asCodeAction:async function(e,t){let n=o.CodeAction.create(e.title);if(e instanceof l.default&&void 0!==e.data&&(n.data=e.data),void 0!==e.kind&&(n.kind=K(e.kind)),void 0!==e.diagnostics&&(n.diagnostics=await O(e.diagnostics,t)),void 0!==e.edit)throw new Error("VS Code code actions can only be converted to a protocol code action without an edit.");return void 0!==e.command&&(n.command=W(e.command)),void 0!==e.isPreferred&&(n.isPreferred=e.isPreferred),void 0!==e.disabled&&(n.disabled={reason:e.disabled.reason}),n},asCodeActionSync:function(e){let t=o.CodeAction.create(e.title);if(e instanceof l.default&&void 0!==e.data&&(t.data=e.data),void 0!==e.kind&&(t.kind=K(e.kind)),void 0!==e.diagnostics&&(t.diagnostics=E(e.diagnostics)),void 0!==e.edit)throw new Error("VS Code code actions can only be converted to a protocol code action without an edit.");return void 0!==e.command&&(t.command=W(e.command)),void 0!==e.isPreferred&&(t.isPreferred=e.isPreferred),void 0!==e.disabled&&(t.disabled={reason:e.disabled.reason}),t},asCodeActionContext:async function(e,t){if(null==e)return e;let n;return e.only&&r.string(e.only.value)&&(n=[e.only.value]),o.CodeActionContext.create(await O(e.diagnostics,t),n,H(e.triggerKind))},asCodeActionContextSync:function(e){if(null==e)return e;let t;return e.only&&r.string(e.only.value)&&(t=[e.only.value]),o.CodeActionContext.create(E(e.diagnostics),t,H(e.triggerKind))},asInlineValueContext:function(e){return null==e?e:o.InlineValueContext.create(e.frameId,_(e.stoppedLocation))},asCommand:W,asCodeLens:function(e){let t=o.CodeLens.create(_(e.range));return e.command&&(t.command=W(e.command)),e instanceof c.default&&e.data&&(t.data=e.data),t},asFormattingOptions:function(e,t){const n={tabSize:e.tabSize,insertSpaces:e.insertSpaces};return t.trimTrailingWhitespace&&(n.trimTrailingWhitespace=!0),t.trimFinalNewlines&&(n.trimFinalNewlines=!0),t.insertFinalNewline&&(n.insertFinalNewline=!0),n},asDocumentSymbolParams:function(e){return{textDocument:v(e)}},asCodeLensParams:function(e){return{textDocument:v(e)}},asDocumentLink:function(e){let t=o.DocumentLink.create(_(e.range));e.target&&(t.target=n(e.target)),void 0!==e.tooltip&&(t.tooltip=e.tooltip);let i=e instanceof u.default?e:void 0;return i&&i.data&&(t.data=i.data),t},asDocumentLinkParams:function(e){return{textDocument:v(e)}},asCallHierarchyItem:function(e){const t={name:e.name,kind:L(e.kind),uri:n(e.uri),range:_(e.range),selectionRange:_(e.selectionRange)};return void 0!==e.detail&&e.detail.length>0&&(t.detail=e.detail),void 0!==e.tags&&(t.tags=j(e.tags)),e instanceof h.default&&void 0!==e.data&&(t.data=e.data),t},asTypeHierarchyItem:function(e){const t={name:e.name,kind:L(e.kind),uri:n(e.uri),range:_(e.range),selectionRange:_(e.selectionRange)};return void 0!==e.detail&&e.detail.length>0&&(t.detail=e.detail),void 0!==e.tags&&(t.tags=j(e.tags)),e instanceof g.default&&void 0!==e.data&&(t.data=e.data),t},asInlayHint:function(e){const t="string"==typeof e.label?e.label:e.label.map(U),n=o.InlayHint.create(T(e.position),t);return void 0!==e.kind&&(n.kind=e.kind),void 0!==e.textEdits&&(n.textEdits=N(e.textEdits)),void 0!==e.tooltip&&(n.tooltip=$(e.tooltip)),void 0!==e.paddingLeft&&(n.paddingLeft=e.paddingLeft),void 0!==e.paddingRight&&(n.paddingRight=e.paddingRight),e instanceof m.default&&void 0!==e.data&&(n.data=e.data),n},asWorkspaceSymbol:function(e){const n=e instanceof p.default?{name:e.name,kind:L(e.kind),location:e.hasRange?k(e.location):{uri:t(e.location.uri)},data:e.data}:{name:e.name,kind:L(e.kind),location:k(e.location)};return void 0!==e.tags&&(n.tags=j(e.tags)),""!==e.containerName&&(n.containerName=e.containerName),n},asInlineCompletionParams:function(e,t,n){return{context:o.InlineCompletionContext.create(n.triggerKind,n.selectedCompletionInfo),textDocument:v(e),position:T(t)}}}}},4453:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeLensFeature=void 0;const i=n(9496),o=n(5968),r=n(7435),s=n(497);class a extends s.TextDocumentLanguageFeature{constructor(e){super(e,o.CodeLensRequest.type)}fillClientCapabilities(e){(0,s.ensure)((0,s.ensure)(e,"textDocument"),"codeLens").dynamicRegistration=!0,(0,s.ensure)((0,s.ensure)(e,"workspace"),"codeLens").refreshSupport=!0}initialize(e,t){this._client.onRequest(o.CodeLensRefreshRequest.type,(async()=>{for(const e of this.getAllProviders())e.onDidChangeCodeLensEmitter.fire()}));const n=this.getRegistrationOptions(t,e.codeLensProvider);n&&this.register({id:r.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t=e.documentSelector,n=new i.EventEmitter,r={onDidChangeCodeLenses:n.event,provideCodeLenses:(e,t)=>{const n=this._client,i=(e,t)=>n.sendRequest(o.CodeLensRequest.type,n.code2ProtocolConverter.asCodeLensParams(e),t).then((e=>t.isCancellationRequested?null:n.protocol2CodeConverter.asCodeLenses(e,t)),(e=>n.handleFailedRequest(o.CodeLensRequest.type,t,e,null))),r=n.middleware;return r.provideCodeLenses?r.provideCodeLenses(e,t,i):i(e,t)},resolveCodeLens:e.resolveProvider?(e,t)=>{const n=this._client,i=(e,t)=>n.sendRequest(o.CodeLensResolveRequest.type,n.code2ProtocolConverter.asCodeLens(e),t).then((i=>t.isCancellationRequested?e:n.protocol2CodeConverter.asCodeLens(i)),(i=>n.handleFailedRequest(o.CodeLensResolveRequest.type,t,i,e))),r=n.middleware;return r.resolveCodeLens?r.resolveCodeLens(e,t,i):i(e,t)}:void 0};return[i.languages.registerCodeLensProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),r),{provider:r,onDidChangeCodeLensEmitter:n}]}}t.CodeLensFeature=a},7506:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColorProviderFeature=void 0;const i=n(9496),o=n(5968),r=n(497);class s extends r.TextDocumentLanguageFeature{constructor(e){super(e,o.DocumentColorRequest.type)}fillClientCapabilities(e){(0,r.ensure)((0,r.ensure)(e,"textDocument"),"colorProvider").dynamicRegistration=!0}initialize(e,t){let[n,i]=this.getRegistration(t,e.colorProvider);n&&i&&this.register({id:n,registerOptions:i})}registerLanguageProvider(e){const t=e.documentSelector,n={provideColorPresentations:(e,t,n)=>{const i=this._client,r=(e,t,n)=>{const r={color:e,textDocument:i.code2ProtocolConverter.asTextDocumentIdentifier(t.document),range:i.code2ProtocolConverter.asRange(t.range)};return i.sendRequest(o.ColorPresentationRequest.type,r,n).then((e=>n.isCancellationRequested?null:this._client.protocol2CodeConverter.asColorPresentations(e,n)),(e=>i.handleFailedRequest(o.ColorPresentationRequest.type,n,e,null)))},s=i.middleware;return s.provideColorPresentations?s.provideColorPresentations(e,t,n,r):r(e,t,n)},provideDocumentColors:(e,t)=>{const n=this._client,i=(e,t)=>{const i={textDocument:n.code2ProtocolConverter.asTextDocumentIdentifier(e)};return n.sendRequest(o.DocumentColorRequest.type,i,t).then((e=>t.isCancellationRequested?null:this._client.protocol2CodeConverter.asColorInformations(e,t)),(e=>n.handleFailedRequest(o.DocumentColorRequest.type,t,e,null)))},r=n.middleware;return r.provideDocumentColors?r.provideDocumentColors(e,t,i):i(e,t)}};return[i.languages.registerColorProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),n),n]}}t.ColorProviderFeature=s},491:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CompletionItemFeature=void 0;const i=n(9496),o=n(5968),r=n(497),s=n(7435),a=[o.CompletionItemKind.Text,o.CompletionItemKind.Method,o.CompletionItemKind.Function,o.CompletionItemKind.Constructor,o.CompletionItemKind.Field,o.CompletionItemKind.Variable,o.CompletionItemKind.Class,o.CompletionItemKind.Interface,o.CompletionItemKind.Module,o.CompletionItemKind.Property,o.CompletionItemKind.Unit,o.CompletionItemKind.Value,o.CompletionItemKind.Enum,o.CompletionItemKind.Keyword,o.CompletionItemKind.Snippet,o.CompletionItemKind.Color,o.CompletionItemKind.File,o.CompletionItemKind.Reference,o.CompletionItemKind.Folder,o.CompletionItemKind.EnumMember,o.CompletionItemKind.Constant,o.CompletionItemKind.Struct,o.CompletionItemKind.Event,o.CompletionItemKind.Operator,o.CompletionItemKind.TypeParameter];class c extends r.TextDocumentLanguageFeature{constructor(e){super(e,o.CompletionRequest.type),this.labelDetailsSupport=new Map}fillClientCapabilities(e){let t=(0,r.ensure)((0,r.ensure)(e,"textDocument"),"completion");t.dynamicRegistration=!0,t.contextSupport=!0,t.completionItem={snippetSupport:!0,commitCharactersSupport:!0,documentationFormat:[o.MarkupKind.Markdown,o.MarkupKind.PlainText],deprecatedSupport:!0,preselectSupport:!0,tagSupport:{valueSet:[o.CompletionItemTag.Deprecated]},insertReplaceSupport:!0,resolveSupport:{properties:["documentation","detail","additionalTextEdits"]},insertTextModeSupport:{valueSet:[o.InsertTextMode.asIs,o.InsertTextMode.adjustIndentation]},labelDetailsSupport:!0},t.insertTextMode=o.InsertTextMode.adjustIndentation,t.completionItemKind={valueSet:a},t.completionList={itemDefaults:["commitCharacters","editRange","insertTextFormat","insertTextMode","data"]}}initialize(e,t){const n=this.getRegistrationOptions(t,e.completionProvider);n&&this.register({id:s.generateUuid(),registerOptions:n})}registerLanguageProvider(e,t){this.labelDetailsSupport.set(t,!!e.completionItem?.labelDetailsSupport);const n=e.triggerCharacters??[],r=e.allCommitCharacters,s=e.documentSelector,a={provideCompletionItems:(e,t,n,i)=>{const s=this._client,a=this._client.middleware,c=(e,t,n,i)=>s.sendRequest(o.CompletionRequest.type,s.code2ProtocolConverter.asCompletionParams(e,t,n),i).then((e=>i.isCancellationRequested?null:s.protocol2CodeConverter.asCompletionResult(e,r,i)),(e=>s.handleFailedRequest(o.CompletionRequest.type,i,e,null)));return a.provideCompletionItem?a.provideCompletionItem(e,t,i,n,c):c(e,t,i,n)},resolveCompletionItem:e.resolveProvider?(e,n)=>{const i=this._client,r=this._client.middleware,s=(e,n)=>i.sendRequest(o.CompletionResolveRequest.type,i.code2ProtocolConverter.asCompletionItem(e,!!this.labelDetailsSupport.get(t)),n).then((e=>n.isCancellationRequested?null:i.protocol2CodeConverter.asCompletionItem(e)),(t=>i.handleFailedRequest(o.CompletionResolveRequest.type,n,t,e)));return r.resolveCompletionItem?r.resolveCompletionItem(e,n,s):s(e,n)}:void 0};return[i.languages.registerCompletionItemProvider(this._client.protocol2CodeConverter.asDocumentSelector(s),a,...n),a]}}t.CompletionItemFeature=c},4103:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SyncConfigurationFeature=t.toJSONObject=t.ConfigurationFeature=void 0;const i=n(9496),o=n(5968),r=n(2116),s=n(7435),a=n(497);function c(e){if(e){if(Array.isArray(e))return e.map(c);if("object"==typeof e){const t=Object.create(null);for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=c(e[n]));return t}}return e}t.ConfigurationFeature=class{constructor(e){this._client=e}getState(){return{kind:"static"}}fillClientCapabilities(e){e.workspace=e.workspace||{},e.workspace.configuration=!0}initialize(){let e=this._client;e.onRequest(o.ConfigurationRequest.type,((t,n)=>{let i=e=>{let t=[];for(let n of e.items){let e=void 0!==n.scopeUri&&null!==n.scopeUri?this._client.protocol2CodeConverter.asUri(n.scopeUri):void 0;t.push(this.getConfiguration(e,null!==n.section?n.section:void 0))}return t},o=e.middleware.workspace;return o&&o.configuration?o.configuration(t,n,i):i(t)}))}getConfiguration(e,t){let n=null;if(t){let o=t.lastIndexOf(".");if(-1===o)n=c(i.workspace.getConfiguration(void 0,e).get(t));else{let r=i.workspace.getConfiguration(t.substr(0,o),e);r&&(n=c(r.get(t.substr(o+1))))}}else{let t=i.workspace.getConfiguration(void 0,e);n={};for(let e of Object.keys(t))t.has(e)&&(n[e]=c(t.get(e)))}return void 0===n&&(n=null),n}clear(){}},t.toJSONObject=c,t.SyncConfigurationFeature=class{constructor(e){this._client=e,this.isCleared=!1,this._listeners=new Map}getState(){return{kind:"workspace",id:this.registrationType.method,registrations:this._listeners.size>0}}get registrationType(){return o.DidChangeConfigurationNotification.type}fillClientCapabilities(e){(0,a.ensure)((0,a.ensure)(e,"workspace"),"didChangeConfiguration").dynamicRegistration=!0}initialize(){this.isCleared=!1;let e=this._client.clientOptions.synchronize?.configurationSection;void 0!==e&&this.register({id:s.generateUuid(),registerOptions:{section:e}})}register(e){let t=i.workspace.onDidChangeConfiguration((t=>{this.onDidChangeConfiguration(e.registerOptions.section,t)}));this._listeners.set(e.id,t),void 0!==e.registerOptions.section&&this.onDidChangeConfiguration(e.registerOptions.section,void 0)}unregister(e){let t=this._listeners.get(e);t&&(this._listeners.delete(e),t.dispose())}clear(){for(const e of this._listeners.values())e.dispose();this._listeners.clear(),this.isCleared=!0}onDidChangeConfiguration(e,t){if(this.isCleared)return;let n;if(n=r.string(e)?[e]:e,void 0!==n&&void 0!==t&&!n.some((e=>t.affectsConfiguration(e))))return;const i=async e=>void 0===e?this._client.sendNotification(o.DidChangeConfigurationNotification.type,{settings:null}):this._client.sendNotification(o.DidChangeConfigurationNotification.type,{settings:this.extractSettingsInformation(e)});let s=this._client.middleware.workspace?.didChangeConfiguration;(s?s(n,i):i(n)).catch((e=>{this._client.error(`Sending notification ${o.DidChangeConfigurationNotification.type.method} failed`,e)}))}extractSettingsInformation(e){function t(e,t){let n=e;for(let e=0;e<t.length-1;e++){let i=n[t[e]];i||(i=Object.create(null),n[t[e]]=i),n=i}return n}let n=this._client.clientOptions.workspaceFolder?this._client.clientOptions.workspaceFolder.uri:void 0,o=Object.create(null);for(let r=0;r<e.length;r++){let s=e[r],a=s.indexOf("."),u=null;if(u=a>=0?i.workspace.getConfiguration(s.substr(0,a),n).get(s.substr(a+1)):i.workspace.getConfiguration(void 0,n).get(s),u){let n=e[r].split(".");t(o,n)[n[n.length-1]]=c(u)}}return o}}},9732:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DeclarationFeature=void 0;const i=n(9496),o=n(5968),r=n(497);class s extends r.TextDocumentLanguageFeature{constructor(e){super(e,o.DeclarationRequest.type)}fillClientCapabilities(e){const t=(0,r.ensure)((0,r.ensure)(e,"textDocument"),"declaration");t.dynamicRegistration=!0,t.linkSupport=!0}initialize(e,t){const[n,i]=this.getRegistration(t,e.declarationProvider);n&&i&&this.register({id:n,registerOptions:i})}registerLanguageProvider(e){const t=e.documentSelector,n={provideDeclaration:(e,t,n)=>{const i=this._client,r=(e,t,n)=>i.sendRequest(o.DeclarationRequest.type,i.code2ProtocolConverter.asTextDocumentPositionParams(e,t),n).then((e=>n.isCancellationRequested?null:i.protocol2CodeConverter.asDeclarationResult(e,n)),(e=>i.handleFailedRequest(o.DeclarationRequest.type,n,e,null))),s=i.middleware;return s.provideDeclaration?s.provideDeclaration(e,t,n,r):r(e,t,n)}};return[this.registerProvider(t,n),n]}registerProvider(e,t){return i.languages.registerDeclarationProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}}t.DeclarationFeature=s},1258:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DefinitionFeature=void 0;const i=n(9496),o=n(5968),r=n(497),s=n(7435);class a extends r.TextDocumentLanguageFeature{constructor(e){super(e,o.DefinitionRequest.type)}fillClientCapabilities(e){let t=(0,r.ensure)((0,r.ensure)(e,"textDocument"),"definition");t.dynamicRegistration=!0,t.linkSupport=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.definitionProvider);n&&this.register({id:s.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t=e.documentSelector,n={provideDefinition:(e,t,n)=>{const i=this._client,r=(e,t,n)=>i.sendRequest(o.DefinitionRequest.type,i.code2ProtocolConverter.asTextDocumentPositionParams(e,t),n).then((e=>n.isCancellationRequested?null:i.protocol2CodeConverter.asDefinitionResult(e,n)),(e=>i.handleFailedRequest(o.DefinitionRequest.type,n,e,null))),s=i.middleware;return s.provideDefinition?s.provideDefinition(e,t,n,r):r(e,t,n)}};return[this.registerProvider(t,n),n]}registerProvider(e,t){return i.languages.registerDefinitionProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}}t.DefinitionFeature=a},7443:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DiagnosticFeature=t.DiagnosticPullMode=t.vsdiag=void 0;const i=n(3707),o=n(9496),r=n(5968),s=n(7435),a=n(497);function c(e,t){return void 0===e[t]&&(e[t]={}),e[t]}var u,l,d,h,g;!function(e){let t;!function(e){e.full="full",e.unChanged="unChanged"}(t=e.DocumentDiagnosticReportKind||(e.DocumentDiagnosticReportKind={}))}(u||(t.vsdiag=u={})),function(e){e.onType="onType",e.onSave="onSave"}(l||(t.DiagnosticPullMode=l={})),function(e){e.active="open",e.reschedule="reschedule",e.outDated="drop"}(d||(d={}));class p{constructor(){this.open=new Set,this._onOpen=new o.EventEmitter,this._onClose=new o.EventEmitter,p.fillTabResources(this.open);void 0!==o.window.tabGroups.onDidChangeTabs?this.disposable=o.window.tabGroups.onDidChangeTabs((e=>{if(0===e.closed.length&&0===e.opened.length)return;const t=this.open,n=new Set;p.fillTabResources(n);const i=new Set,r=new Set(n);for(const e of t.values())n.has(e)?r.delete(e):i.add(e);if(this.open=n,i.size>0){const e=new Set;for(const t of i)e.add(o.Uri.parse(t));this._onClose.fire(e)}if(r.size>0){const e=new Set;for(const t of r)e.add(o.Uri.parse(t));this._onOpen.fire(e)}})):this.disposable={dispose:()=>{}}}get onClose(){return this._onClose.event}get onOpen(){return this._onOpen.event}dispose(){this.disposable.dispose()}isActive(e){return e instanceof o.Uri?o.window.activeTextEditor?.document.uri===e:o.window.activeTextEditor?.document===e}isVisible(e){const t=e instanceof o.Uri?e:e.uri;return this.open.has(t.toString())}getTabResources(){const e=new Set;return p.fillTabResources(new Set,e),e}static fillTabResources(e,t){const n=e??new Set;for(const e of o.window.tabGroups.all)for(const i of e.tabs){const e=i.input;let r;e instanceof o.TabInputText?r=e.uri:e instanceof o.TabInputTextDiff?r=e.modified:e instanceof o.TabInputCustom&&(r=e.uri),void 0===r||n.has(r.toString())||(n.add(r.toString()),void 0!==t&&t.add(r))}}}!function(e){e[e.document=1]="document",e[e.workspace=2]="workspace"}(h||(h={})),function(e){e.asKey=function(e){return e instanceof o.Uri?e.toString():e.uri.toString()}}(g||(g={}));class m{constructor(){this.documentPullStates=new Map,this.workspacePullStates=new Map}track(e,t,n){const i=e===h.document?this.documentPullStates:this.workspacePullStates,[r,s,a]=t instanceof o.Uri?[t.toString(),t,n]:[t.uri.toString(),t.uri,t.version];let c=i.get(r);return void 0===c&&(c={document:s,pulledVersion:a,resultId:void 0},i.set(r,c)),c}update(e,t,n,i){const r=e===h.document?this.documentPullStates:this.workspacePullStates,[s,a,c,u]=t instanceof o.Uri?[t.toString(),t,n,i]:[t.uri.toString(),t.uri,t.version,n];let l=r.get(s);void 0===l?(l={document:a,pulledVersion:c,resultId:u},r.set(s,l)):(l.pulledVersion=c,l.resultId=u)}unTrack(e,t){const n=g.asKey(t);(e===h.document?this.documentPullStates:this.workspacePullStates).delete(n)}tracks(e,t){const n=g.asKey(t);return(e===h.document?this.documentPullStates:this.workspacePullStates).has(n)}getResultId(e,t){const n=g.asKey(t);return(e===h.document?this.documentPullStates:this.workspacePullStates).get(n)?.resultId}getAllResultIds(){const e=[];for(let[t,n]of this.workspacePullStates)this.documentPullStates.has(t)&&(n=this.documentPullStates.get(t)),void 0!==n.resultId&&e.push({uri:t,value:n.resultId});return e}}class f{constructor(e,t,n){this.client=e,this.tabs=t,this.options=n,this.isDisposed=!1,this.onDidChangeDiagnosticsEmitter=new o.EventEmitter,this.provider=this.createProvider(),this.diagnostics=o.languages.createDiagnosticCollection(n.identifier),this.openRequests=new Map,this.documentStates=new m,this.workspaceErrorCounter=0}knows(e,t){const n=t instanceof o.Uri?t:t.uri;return this.documentStates.tracks(e,t)||this.openRequests.has(n.toString())}forget(e,t){this.documentStates.unTrack(e,t)}pull(e,t){if(this.isDisposed)return;const n=e instanceof o.Uri?e:e.uri;this.pullAsync(e).then((()=>{t&&t()}),(e=>{this.client.error(`Document pull failed for text document ${n.toString()}`,e,!1)}))}async pullAsync(e,t){if(this.isDisposed)return;const n=e instanceof o.Uri,i=n?e:e.uri,s=i.toString();t=n?t:e.version;const c=this.openRequests.get(s),l=n?this.documentStates.track(h.document,e,t):this.documentStates.track(h.document,e);if(void 0===c){const n=new o.CancellationTokenSource;let c,g;this.openRequests.set(s,{state:d.active,document:e,version:t,tokenSource:n});try{c=await this.provider.provideDiagnostics(e,l.resultId,n.token)??{kind:u.DocumentDiagnosticReportKind.full,items:[]}}catch(t){if(t instanceof a.LSPCancellationError&&r.DiagnosticServerCancellationData.is(t.data)&&!1===t.data.retriggerRequest&&(g={state:d.outDated,document:e}),!(void 0===g&&t instanceof o.CancellationError))throw t;g={state:d.reschedule,document:e}}if(g=g??this.openRequests.get(s),void 0===g)return this.client.error(`Lost request state in diagnostic pull model. Clearing diagnostics for ${s}`),void this.diagnostics.delete(i);if(this.openRequests.delete(s),!this.tabs.isVisible(e))return void this.documentStates.unTrack(h.document,e);if(g.state===d.outDated)return;void 0!==c&&(c.kind===u.DocumentDiagnosticReportKind.full&&this.diagnostics.set(i,c.items),l.pulledVersion=t,l.resultId=c.resultId),g.state===d.reschedule&&this.pull(e)}else c.state===d.active?(c.tokenSource.cancel(),this.openRequests.set(s,{state:d.reschedule,document:c.document})):c.state===d.outDated&&this.openRequests.set(s,{state:d.reschedule,document:c.document})}forgetDocument(e){const t=e instanceof o.Uri?e:e.uri,n=t.toString(),i=this.openRequests.get(n);this.options.workspaceDiagnostics?void 0!==i?this.openRequests.set(n,{state:d.reschedule,document:e}):this.pull(e,(()=>{this.forget(h.document,e)})):(void 0!==i&&(i.state===d.active&&i.tokenSource.cancel(),this.openRequests.set(n,{state:d.outDated,document:e})),this.diagnostics.delete(t),this.forget(h.document,e))}pullWorkspace(){this.isDisposed||this.pullWorkspaceAsync().then((()=>{this.workspaceTimeout=(0,r.RAL)().timer.setTimeout((()=>{this.pullWorkspace()}),2e3)}),(e=>{e instanceof a.LSPCancellationError||r.DiagnosticServerCancellationData.is(e.data)||(this.client.error("Workspace diagnostic pull failed.",e,!1),this.workspaceErrorCounter++),this.workspaceErrorCounter<=5&&(this.workspaceTimeout=(0,r.RAL)().timer.setTimeout((()=>{this.pullWorkspace()}),2e3))}))}async pullWorkspaceAsync(){if(!this.provider.provideWorkspaceDiagnostics||this.isDisposed)return;void 0!==this.workspaceCancellation&&(this.workspaceCancellation.cancel(),this.workspaceCancellation=void 0),this.workspaceCancellation=new o.CancellationTokenSource;const e=this.documentStates.getAllResultIds().map((e=>({uri:this.client.protocol2CodeConverter.asUri(e.uri),value:e.value})));await this.provider.provideWorkspaceDiagnostics(e,this.workspaceCancellation.token,(e=>{if(e&&!this.isDisposed)for(const t of e.items)t.kind===u.DocumentDiagnosticReportKind.full&&(this.documentStates.tracks(h.document,t.uri)||this.diagnostics.set(t.uri,t.items)),this.documentStates.update(h.workspace,t.uri,t.version??void 0,t.resultId)}))}createProvider(){const e={onDidChangeDiagnostics:this.onDidChangeDiagnosticsEmitter.event,provideDiagnostics:(e,t,n)=>{const i=(e,t,n)=>{const i={identifier:this.options.identifier,textDocument:{uri:this.client.code2ProtocolConverter.asUri(e instanceof o.Uri?e:e.uri)},previousResultId:t};return!0!==this.isDisposed&&this.client.isRunning()?this.client.sendRequest(r.DocumentDiagnosticRequest.type,i,n).then((async e=>null==e||this.isDisposed||n.isCancellationRequested?{kind:u.DocumentDiagnosticReportKind.full,items:[]}:e.kind===r.DocumentDiagnosticReportKind.Full?{kind:u.DocumentDiagnosticReportKind.full,resultId:e.resultId,items:await this.client.protocol2CodeConverter.asDiagnostics(e.items,n)}:{kind:u.DocumentDiagnosticReportKind.unChanged,resultId:e.resultId}),(e=>this.client.handleFailedRequest(r.DocumentDiagnosticRequest.type,n,e,{kind:u.DocumentDiagnosticReportKind.full,items:[]}))):{kind:u.DocumentDiagnosticReportKind.full,items:[]}},s=this.client.middleware;return s.provideDiagnostics?s.provideDiagnostics(e,t,n,i):i(e,t,n)}};return this.options.workspaceDiagnostics&&(e.provideWorkspaceDiagnostics=(e,t,n)=>{const i=async e=>e.kind===r.DocumentDiagnosticReportKind.Full?{kind:u.DocumentDiagnosticReportKind.full,uri:this.client.protocol2CodeConverter.asUri(e.uri),resultId:e.resultId,version:e.version,items:await this.client.protocol2CodeConverter.asDiagnostics(e.items,t)}:{kind:u.DocumentDiagnosticReportKind.unChanged,uri:this.client.protocol2CodeConverter.asUri(e.uri),resultId:e.resultId,version:e.version},o=e=>{const t=[];for(const n of e)t.push({uri:this.client.code2ProtocolConverter.asUri(n.uri),value:n.value});return t},a=(e,t)=>{const a=(0,s.generateUuid)(),c=this.client.onProgress(r.WorkspaceDiagnosticRequest.partialResult,a,(async e=>{if(null==e)return void n(null);const t={items:[]};for(const n of e.items)try{t.items.push(await i(n))}catch(e){this.client.error("Converting workspace diagnostics failed.",e)}n(t)})),u={identifier:this.options.identifier,previousResultIds:o(e),partialResultToken:a};return!0!==this.isDisposed&&this.client.isRunning()?this.client.sendRequest(r.WorkspaceDiagnosticRequest.type,u,t).then((async e=>{if(t.isCancellationRequested)return{items:[]};const o={items:[]};for(const t of e.items)o.items.push(await i(t));return c.dispose(),n(o),{items:[]}}),(e=>(c.dispose(),this.client.handleFailedRequest(r.DocumentDiagnosticRequest.type,t,e,{items:[]})))):{items:[]}},c=this.client.middleware;return c.provideWorkspaceDiagnostics?c.provideWorkspaceDiagnostics(e,t,n,a):a(e,t)}),e}dispose(){this.isDisposed=!0,this.workspaceCancellation?.cancel(),this.workspaceTimeout?.dispose();for(const[e,t]of this.openRequests)t.state===d.active&&t.tokenSource.cancel(),this.openRequests.set(e,{state:d.outDated,document:t.document});this.diagnostics.dispose()}}class v{constructor(e){this.diagnosticRequestor=e,this.documents=new r.LinkedMap,this.isDisposed=!1}add(e){if(!0===this.isDisposed)return;const t=g.asKey(e);this.documents.has(t)||(this.documents.set(t,e,r.Touch.Last),this.trigger())}remove(e){const t=g.asKey(e);this.documents.delete(t),0===this.documents.size?this.stop():t===this.endDocumentKey()&&(this.endDocument=this.documents.last)}trigger(){!0!==this.isDisposed&&(void 0===this.intervalHandle?(this.endDocument=this.documents.last,this.intervalHandle=(0,r.RAL)().timer.setInterval((()=>{const e=this.documents.first;if(void 0!==e){const t=g.asKey(e);this.diagnosticRequestor.pull(e),this.documents.set(t,e,r.Touch.Last),t===this.endDocumentKey()&&this.stop()}}),200)):this.endDocument=this.documents.last)}dispose(){this.isDisposed=!0,this.stop(),this.documents.clear()}stop(){this.intervalHandle?.dispose(),this.intervalHandle=void 0,this.endDocument=void 0}endDocumentKey(){return void 0!==this.endDocument?g.asKey(this.endDocument):void 0}}class y{constructor(e,t,n){const s=e.clientOptions.diagnosticPullOptions??{onChange:!0,onSave:!1},a=e.protocol2CodeConverter.asDocumentSelector(n.documentSelector),c=[],u=e=>e instanceof o.Uri?(e=>{const t=n.documentSelector;if(void 0!==s.match)return s.match(t,e);for(const n of t)if(r.TextDocumentFilter.is(n)){if("string"==typeof n)return!1;if(void 0!==n.language&&"*"!==n.language)return!1;if(void 0!==n.scheme&&"*"!==n.scheme&&n.scheme!==e.scheme)return!1;if(void 0!==n.pattern){const t=new i.Minimatch(n.pattern,{noext:!0});if(!t.makeRe())return!1;if(!t.match(e.fsPath))return!1}}return!0})(e):o.languages.match(a,e)>0&&t.isVisible(e),d=e=>e instanceof o.Uri?this.activeTextDocument?.uri.toString()===e.toString():this.activeTextDocument===e;this.diagnosticRequestor=new f(e,t,n),this.backgroundScheduler=new v(this.diagnosticRequestor);const g=e=>{u(e)&&n.interFileDependencies&&!d(e)&&this.backgroundScheduler.add(e)};this.activeTextDocument=o.window.activeTextEditor?.document,o.window.onDidChangeActiveTextEditor((e=>{const t=this.activeTextDocument;this.activeTextDocument=e?.document,void 0!==t&&g(t),void 0!==this.activeTextDocument&&this.backgroundScheduler.remove(this.activeTextDocument)}));const p=e.getFeature(r.DidOpenTextDocumentNotification.method);c.push(p.onNotificationSent((e=>{const t=e.textDocument;this.diagnosticRequestor.knows(h.document,t)||u(t)&&this.diagnosticRequestor.pull(t,(()=>{g(t)}))}))),c.push(t.onOpen((e=>{for(const t of e){if(this.diagnosticRequestor.knows(h.document,t))continue;const e=t.toString();let n;for(const t of o.workspace.textDocuments)if(e===t.uri.toString()){n=t;break}void 0!==n&&u(n)&&this.diagnosticRequestor.pull(n,(()=>{g(n)}))}})));const m=new Set;for(const e of o.workspace.textDocuments)u(e)&&(this.diagnosticRequestor.pull(e,(()=>{g(e)})),m.add(e.uri.toString()));if(!0===s.onTabs)for(const e of t.getTabResources())!m.has(e.toString())&&u(e)&&this.diagnosticRequestor.pull(e,(()=>{g(e)}));if(!0===s.onChange){const t=e.getFeature(r.DidChangeTextDocumentNotification.method);c.push(t.onNotificationSent((async e=>{const t=e.textDocument;void 0!==s.filter&&s.filter(t,l.onType)||!this.diagnosticRequestor.knows(h.document,t)||this.diagnosticRequestor.pull(t,(()=>{this.backgroundScheduler.trigger()}))})))}if(!0===s.onSave){const t=e.getFeature(r.DidSaveTextDocumentNotification.method);c.push(t.onNotificationSent((e=>{const t=e.textDocument;void 0!==s.filter&&s.filter(t,l.onSave)||!this.diagnosticRequestor.knows(h.document,t)||this.diagnosticRequestor.pull(e.textDocument,(()=>{this.backgroundScheduler.trigger()}))})))}const y=e.getFeature(r.DidCloseTextDocumentNotification.method);c.push(y.onNotificationSent((e=>{this.cleanUpDocument(e.textDocument)}))),t.onClose((e=>{for(const t of e)this.cleanUpDocument(t)})),this.diagnosticRequestor.onDidChangeDiagnosticsEmitter.event((()=>{for(const e of o.workspace.textDocuments)u(e)&&this.diagnosticRequestor.pull(e)})),!0===n.workspaceDiagnostics&&"da348dc5-c30a-4515-9d98-31ff3be38d14"!==n.identifier&&this.diagnosticRequestor.pullWorkspace(),this.disposable=o.Disposable.from(...c,this.backgroundScheduler,this.diagnosticRequestor)}get onDidChangeDiagnosticsEmitter(){return this.diagnosticRequestor.onDidChangeDiagnosticsEmitter}get diagnostics(){return this.diagnosticRequestor.provider}cleanUpDocument(e){this.diagnosticRequestor.knows(h.document,e)&&(this.diagnosticRequestor.forgetDocument(e),this.backgroundScheduler.remove(e))}}class C extends a.TextDocumentLanguageFeature{constructor(e){super(e,r.DocumentDiagnosticRequest.type)}fillClientCapabilities(e){let t=c(c(e,"textDocument"),"diagnostic");t.dynamicRegistration=!0,t.relatedDocumentSupport=!1,c(c(e,"workspace"),"diagnostics").refreshSupport=!0}initialize(e,t){this._client.onRequest(r.DiagnosticRefreshRequest.type,(async()=>{for(const e of this.getAllProviders())e.onDidChangeDiagnosticsEmitter.fire()}));let[n,i]=this.getRegistration(t,e.diagnosticProvider);n&&i&&this.register({id:n,registerOptions:i})}clear(){void 0!==this.tabs&&(this.tabs.dispose(),this.tabs=void 0),super.clear()}registerLanguageProvider(e){void 0===this.tabs&&(this.tabs=new p);const t=new y(this._client,this.tabs,e);return[t.disposable,t]}}t.DiagnosticFeature=C},7317:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentHighlightFeature=void 0;const i=n(9496),o=n(5968),r=n(497),s=n(7435);class a extends r.TextDocumentLanguageFeature{constructor(e){super(e,o.DocumentHighlightRequest.type)}fillClientCapabilities(e){(0,r.ensure)((0,r.ensure)(e,"textDocument"),"documentHighlight").dynamicRegistration=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.documentHighlightProvider);n&&this.register({id:s.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t=e.documentSelector,n={provideDocumentHighlights:(e,t,n)=>{const i=this._client,r=(e,t,n)=>i.sendRequest(o.DocumentHighlightRequest.type,i.code2ProtocolConverter.asTextDocumentPositionParams(e,t),n).then((e=>n.isCancellationRequested?null:i.protocol2CodeConverter.asDocumentHighlights(e,n)),(e=>i.handleFailedRequest(o.DocumentHighlightRequest.type,n,e,null))),s=i.middleware;return s.provideDocumentHighlights?s.provideDocumentHighlights(e,t,n,r):r(e,t,n)}};return[i.languages.registerDocumentHighlightProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),n),n]}}t.DocumentHighlightFeature=a},7272:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentLinkFeature=void 0;const i=n(9496),o=n(5968),r=n(497),s=n(7435);class a extends r.TextDocumentLanguageFeature{constructor(e){super(e,o.DocumentLinkRequest.type)}fillClientCapabilities(e){const t=(0,r.ensure)((0,r.ensure)(e,"textDocument"),"documentLink");t.dynamicRegistration=!0,t.tooltipSupport=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.documentLinkProvider);n&&this.register({id:s.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t=e.documentSelector,n={provideDocumentLinks:(e,t)=>{const n=this._client,i=(e,t)=>n.sendRequest(o.DocumentLinkRequest.type,n.code2ProtocolConverter.asDocumentLinkParams(e),t).then((e=>t.isCancellationRequested?null:n.protocol2CodeConverter.asDocumentLinks(e,t)),(e=>n.handleFailedRequest(o.DocumentLinkRequest.type,t,e,null))),r=n.middleware;return r.provideDocumentLinks?r.provideDocumentLinks(e,t,i):i(e,t)},resolveDocumentLink:e.resolveProvider?(e,t)=>{const n=this._client;let i=(e,t)=>n.sendRequest(o.DocumentLinkResolveRequest.type,n.code2ProtocolConverter.asDocumentLink(e),t).then((i=>t.isCancellationRequested?e:n.protocol2CodeConverter.asDocumentLink(i)),(i=>n.handleFailedRequest(o.DocumentLinkResolveRequest.type,t,i,e)));const r=n.middleware;return r.resolveDocumentLink?r.resolveDocumentLink(e,t,i):i(e,t)}:void 0};return[i.languages.registerDocumentLinkProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),n),n]}}t.DocumentLinkFeature=a},1690:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentSymbolFeature=t.SupportedSymbolTags=t.SupportedSymbolKinds=void 0;const i=n(9496),o=n(5968),r=n(497),s=n(7435);t.SupportedSymbolKinds=[o.SymbolKind.File,o.SymbolKind.Module,o.SymbolKind.Namespace,o.SymbolKind.Package,o.SymbolKind.Class,o.SymbolKind.Method,o.SymbolKind.Property,o.SymbolKind.Field,o.SymbolKind.Constructor,o.SymbolKind.Enum,o.SymbolKind.Interface,o.SymbolKind.Function,o.SymbolKind.Variable,o.SymbolKind.Constant,o.SymbolKind.String,o.SymbolKind.Number,o.SymbolKind.Boolean,o.SymbolKind.Array,o.SymbolKind.Object,o.SymbolKind.Key,o.SymbolKind.Null,o.SymbolKind.EnumMember,o.SymbolKind.Struct,o.SymbolKind.Event,o.SymbolKind.Operator,o.SymbolKind.TypeParameter],t.SupportedSymbolTags=[o.SymbolTag.Deprecated];class a extends r.TextDocumentLanguageFeature{constructor(e){super(e,o.DocumentSymbolRequest.type)}fillClientCapabilities(e){let n=(0,r.ensure)((0,r.ensure)(e,"textDocument"),"documentSymbol");n.dynamicRegistration=!0,n.symbolKind={valueSet:t.SupportedSymbolKinds},n.hierarchicalDocumentSymbolSupport=!0,n.tagSupport={valueSet:t.SupportedSymbolTags},n.labelSupport=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.documentSymbolProvider);n&&this.register({id:s.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t=e.documentSelector,n={provideDocumentSymbols:(e,t)=>{const n=this._client,i=async(e,t)=>{try{const i=await n.sendRequest(o.DocumentSymbolRequest.type,n.code2ProtocolConverter.asDocumentSymbolParams(e),t);if(t.isCancellationRequested||null==i)return null;if(0===i.length)return[];{const e=i[0];return o.DocumentSymbol.is(e)?await n.protocol2CodeConverter.asDocumentSymbols(i,t):await n.protocol2CodeConverter.asSymbolInformations(i,t)}}catch(e){return n.handleFailedRequest(o.DocumentSymbolRequest.type,t,e,null)}},r=n.middleware;return r.provideDocumentSymbols?r.provideDocumentSymbols(e,t,i):i(e,t)}},r=void 0!==e.label?{label:e.label}:void 0;return[i.languages.registerDocumentSymbolProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),n,r),n]}}t.DocumentSymbolFeature=a},3520:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExecuteCommandFeature=void 0;const i=n(9496),o=n(5968),r=n(7435),s=n(497);t.ExecuteCommandFeature=class{constructor(e){this._client=e,this._commands=new Map}getState(){return{kind:"workspace",id:this.registrationType.method,registrations:this._commands.size>0}}get registrationType(){return o.ExecuteCommandRequest.type}fillClientCapabilities(e){(0,s.ensure)((0,s.ensure)(e,"workspace"),"executeCommand").dynamicRegistration=!0}initialize(e){e.executeCommandProvider&&this.register({id:r.generateUuid(),registerOptions:Object.assign({},e.executeCommandProvider)})}register(e){const t=this._client,n=t.middleware,r=(e,n)=>{let i={command:e,arguments:n};return t.sendRequest(o.ExecuteCommandRequest.type,i).then(void 0,(e=>t.handleFailedRequest(o.ExecuteCommandRequest.type,void 0,e,void 0)))};if(e.registerOptions.commands){const t=[];for(const o of e.registerOptions.commands)t.push(i.commands.registerCommand(o,((...e)=>n.executeCommand?n.executeCommand(o,e,r):r(o,e))));this._commands.set(e.id,t)}}unregister(e){let t=this._commands.get(e);t&&t.forEach((e=>e.dispose()))}clear(){this._commands.forEach((e=>{e.forEach((e=>e.dispose()))})),this._commands.clear()}}},497:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceFeature=t.TextDocumentLanguageFeature=t.TextDocumentEventFeature=t.DynamicDocumentFeature=t.DynamicFeature=t.StaticFeature=t.ensure=t.LSPCancellationError=void 0;const i=n(9496),o=n(5968),r=n(2116),s=n(7435);class a extends i.CancellationError{constructor(e){super(),this.data=e}}var c,u;t.LSPCancellationError=a,t.ensure=function(e,t){return void 0===e[t]&&(e[t]={}),e[t]},function(e){e.is=function(e){const t=e;return null!=t&&r.func(t.fillClientCapabilities)&&r.func(t.initialize)&&r.func(t.getState)&&r.func(t.clear)&&(void 0===t.fillInitializeParams||r.func(t.fillInitializeParams))}}(c||(t.StaticFeature=c={})),function(e){e.is=function(e){const t=e;return null!=t&&r.func(t.fillClientCapabilities)&&r.func(t.initialize)&&r.func(t.getState)&&r.func(t.clear)&&(void 0===t.fillInitializeParams||r.func(t.fillInitializeParams))&&r.func(t.register)&&r.func(t.unregister)&&void 0!==t.registrationType}}(u||(t.DynamicFeature=u={}));class l{constructor(e){this._client=e}getState(){const e=this.getDocumentSelectors();let t=0;for(const n of e){t++;for(const e of i.workspace.textDocuments)if(i.languages.match(n,e)>0)return{kind:"document",id:this.registrationType.method,registrations:!0,matches:!0}}const n=t>0;return{kind:"document",id:this.registrationType.method,registrations:n,matches:!1}}}t.DynamicDocumentFeature=l,t.TextDocumentEventFeature=class extends l{static textDocumentFilter(e,t){for(const n of e)if(i.languages.match(n,t)>0)return!0;return!1}constructor(e,t,n,o,r,s,a){super(e),this._event=t,this._type=n,this._middleware=o,this._createParams=r,this._textDocument=s,this._selectorFilter=a,this._selectors=new Map,this._onNotificationSent=new i.EventEmitter}getStateInfo(){return[this._selectors.values(),!1]}getDocumentSelectors(){return this._selectors.values()}register(e){e.registerOptions.documentSelector&&(this._listener||(this._listener=this._event((e=>{this.callback(e).catch((e=>{this._client.error(`Sending document notification ${this._type.method} failed.`,e)}))}))),this._selectors.set(e.id,this._client.protocol2CodeConverter.asDocumentSelector(e.registerOptions.documentSelector)))}async callback(e){const t=async e=>{const t=this._createParams(e);await this._client.sendNotification(this._type,t),this.notificationSent(this.getTextDocument(e),this._type,t)};if(this.matches(e)){const n=this._middleware();return n?n(e,(e=>t(e))):t(e)}}matches(e){return!this._client.hasDedicatedTextSynchronizationFeature(this._textDocument(e))&&(!this._selectorFilter||this._selectorFilter(this._selectors.values(),e))}get onNotificationSent(){return this._onNotificationSent.event}notificationSent(e,t,n){this._onNotificationSent.fire({textDocument:e,type:t,params:n})}unregister(e){this._selectors.delete(e),0===this._selectors.size&&this._listener&&(this._listener.dispose(),this._listener=void 0)}clear(){this._selectors.clear(),this._onNotificationSent.dispose(),this._listener&&(this._listener.dispose(),this._listener=void 0)}getProvider(e){for(const t of this._selectors.values())if(i.languages.match(t,e)>0)return{send:e=>this.callback(e)}}},t.TextDocumentLanguageFeature=class extends l{constructor(e,t){super(e),this._registrationType=t,this._registrations=new Map}*getDocumentSelectors(){for(const e of this._registrations.values()){const t=e.data.registerOptions.documentSelector;null!==t&&(yield this._client.protocol2CodeConverter.asDocumentSelector(t))}}get registrationType(){return this._registrationType}register(e){if(!e.registerOptions.documentSelector)return;let t=this.registerLanguageProvider(e.registerOptions,e.id);this._registrations.set(e.id,{disposable:t[0],data:e,provider:t[1]})}unregister(e){let t=this._registrations.get(e);void 0!==t&&t.disposable.dispose()}clear(){this._registrations.forEach((e=>{e.disposable.dispose()})),this._registrations.clear()}getRegistration(e,t){if(!t)return[void 0,void 0];if(o.TextDocumentRegistrationOptions.is(t)){const n=o.StaticRegistrationOptions.hasId(t)?t.id:s.generateUuid(),i=t.documentSelector??e;if(i)return[n,Object.assign({},t,{documentSelector:i})]}else if(r.boolean(t)&&!0===t||o.WorkDoneProgressOptions.is(t)){if(!e)return[void 0,void 0];const n=r.boolean(t)&&!0===t?{documentSelector:e}:Object.assign({},t,{documentSelector:e});return[s.generateUuid(),n]}return[void 0,void 0]}getRegistrationOptions(e,t){if(e&&t)return r.boolean(t)&&!0===t?{documentSelector:e}:Object.assign({},t,{documentSelector:e})}getProvider(e){for(const t of this._registrations.values()){let n=t.data.registerOptions.documentSelector;if(null!==n&&i.languages.match(this._client.protocol2CodeConverter.asDocumentSelector(n),e)>0)return t.provider}}getAllProviders(){const e=[];for(const t of this._registrations.values())e.push(t.provider);return e}},t.WorkspaceFeature=class{constructor(e,t){this._client=e,this._registrationType=t,this._registrations=new Map}getState(){const e=this._registrations.size>0;return{kind:"workspace",id:this._registrationType.method,registrations:e}}get registrationType(){return this._registrationType}register(e){const t=this.registerLanguageProvider(e.registerOptions);this._registrations.set(e.id,{disposable:t[0],provider:t[1]})}unregister(e){let t=this._registrations.get(e);void 0!==t&&t.disposable.dispose()}clear(){this._registrations.forEach((e=>{e.disposable.dispose()})),this._registrations.clear()}getProviders(){const e=[];for(const t of this._registrations.values())e.push(t.provider);return e}}},392:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WillDeleteFilesFeature=t.WillRenameFilesFeature=t.WillCreateFilesFeature=t.DidDeleteFilesFeature=t.DidRenameFilesFeature=t.DidCreateFilesFeature=void 0;const i=n(9496),o=n(3707),r=n(5968),s=n(7435);function a(e,t){return void 0===e[t]&&(e[t]={}),e[t]}function c(e,t,n){e[t]=n}class u{constructor(e,t,n,i,o){this._client=e,this._event=t,this._registrationType=n,this._clientCapability=i,this._serverCapability=o,this._filters=new Map}getState(){return{kind:"workspace",id:this._registrationType.method,registrations:this._filters.size>0}}filterSize(){return this._filters.size}get registrationType(){return this._registrationType}fillClientCapabilities(e){const t=a(a(e,"workspace"),"fileOperations");c(t,"dynamicRegistration",!0),c(t,this._clientCapability,!0)}initialize(e){const t=e.workspace?.fileOperations,n=void 0!==t?t[this._serverCapability]:void 0;if(void 0!==n?.filters)try{this.register({id:s.generateUuid(),registerOptions:{filters:n.filters}})}catch(e){this._client.warn(`Ignoring invalid glob pattern for ${this._serverCapability} registration: ${e}`)}}register(e){this._listener||(this._listener=this._event(this.send,this));const t=e.registerOptions.filters.map((e=>{const t=new o.Minimatch(e.pattern.glob,u.asMinimatchOptions(e.pattern.options));if(!t.makeRe())throw new Error(`Invalid pattern ${e.pattern.glob}!`);return{scheme:e.scheme,matcher:t,kind:e.pattern.matches}}));this._filters.set(e.id,t)}unregister(e){this._filters.delete(e),0===this._filters.size&&this._listener&&(this._listener.dispose(),this._listener=void 0)}clear(){this._filters.clear(),this._listener&&(this._listener.dispose(),this._listener=void 0)}getFileType(e){return u.getFileType(e)}async filter(e,t){const n=await Promise.all(e.files.map((async e=>{const n=t(e),o=n.fsPath.replace(/\\/g,"/");for(const e of this._filters.values())for(const t of e)if(void 0===t.scheme||t.scheme===n.scheme)if(t.matcher.match(o)){if(void 0===t.kind)return!0;const e=await this.getFileType(n);if(void 0===e)return this._client.error(`Failed to determine file type for ${n.toString()}.`),!0;if(e===i.FileType.File&&t.kind===r.FileOperationPatternKind.file||e===i.FileType.Directory&&t.kind===r.FileOperationPatternKind.folder)return!0}else if(t.kind===r.FileOperationPatternKind.folder&&await u.getFileType(n)===i.FileType.Directory&&t.matcher.match(`${o}/`))return!0;return!1}))),o=e.files.filter(((e,t)=>n[t]));return{...e,files:o}}static async getFileType(e){try{return(await i.workspace.fs.stat(e)).type}catch(e){return}}static asMinimatchOptions(e){const t={dot:!0};return!0===e?.ignoreCase&&(t.nocase=!0),t}}class l extends u{constructor(e,t,n,i,o,r,s){super(e,t,n,i,o),this._notificationType=n,this._accessUri=r,this._createParams=s}async send(e){const t=await this.filter(e,this._accessUri);if(t.files.length){const e=async e=>this._client.sendNotification(this._notificationType,this._createParams(e));return this.doSend(t,e)}}}class d extends l{constructor(){super(...arguments),this._fsPathFileTypes=new Map}async getFileType(e){const t=e.fsPath;if(this._fsPathFileTypes.has(t))return this._fsPathFileTypes.get(t);const n=await u.getFileType(e);return n&&this._fsPathFileTypes.set(t,n),n}async cacheFileTypes(e,t){await this.filter(e,t)}clearFileTypeCache(){this._fsPathFileTypes.clear()}unregister(e){super.unregister(e),0===this.filterSize()&&this._willListener&&(this._willListener.dispose(),this._willListener=void 0)}clear(){super.clear(),this._willListener&&(this._willListener.dispose(),this._willListener=void 0)}}t.DidCreateFilesFeature=class extends l{constructor(e){super(e,i.workspace.onDidCreateFiles,r.DidCreateFilesNotification.type,"didCreate","didCreate",(e=>e),e.code2ProtocolConverter.asDidCreateFilesParams)}doSend(e,t){const n=this._client.middleware.workspace;return n?.didCreateFiles?n.didCreateFiles(e,t):t(e)}},t.DidRenameFilesFeature=class extends d{constructor(e){super(e,i.workspace.onDidRenameFiles,r.DidRenameFilesNotification.type,"didRename","didRename",(e=>e.oldUri),e.code2ProtocolConverter.asDidRenameFilesParams)}register(e){this._willListener||(this._willListener=i.workspace.onWillRenameFiles(this.willRename,this)),super.register(e)}willRename(e){e.waitUntil(this.cacheFileTypes(e,(e=>e.oldUri)))}doSend(e,t){this.clearFileTypeCache();const n=this._client.middleware.workspace;return n?.didRenameFiles?n.didRenameFiles(e,t):t(e)}},t.DidDeleteFilesFeature=class extends d{constructor(e){super(e,i.workspace.onDidDeleteFiles,r.DidDeleteFilesNotification.type,"didDelete","didDelete",(e=>e),e.code2ProtocolConverter.asDidDeleteFilesParams)}register(e){this._willListener||(this._willListener=i.workspace.onWillDeleteFiles(this.willDelete,this)),super.register(e)}willDelete(e){e.waitUntil(this.cacheFileTypes(e,(e=>e)))}doSend(e,t){this.clearFileTypeCache();const n=this._client.middleware.workspace;return n?.didDeleteFiles?n.didDeleteFiles(e,t):t(e)}};class h extends u{constructor(e,t,n,i,o,r,s){super(e,t,n,i,o),this._requestType=n,this._accessUri=r,this._createParams=s}async send(e){const t=this.waitUntil(e);e.waitUntil(t)}async waitUntil(e){const t=await this.filter(e,this._accessUri);if(t.files.length){const e=e=>this._client.sendRequest(this._requestType,this._createParams(e),e.token).then(this._client.protocol2CodeConverter.asWorkspaceEdit);return this.doSend(t,e)}}}t.WillCreateFilesFeature=class extends h{constructor(e){super(e,i.workspace.onWillCreateFiles,r.WillCreateFilesRequest.type,"willCreate","willCreate",(e=>e),e.code2ProtocolConverter.asWillCreateFilesParams)}doSend(e,t){const n=this._client.middleware.workspace;return n?.willCreateFiles?n.willCreateFiles(e,t):t(e)}},t.WillRenameFilesFeature=class extends h{constructor(e){super(e,i.workspace.onWillRenameFiles,r.WillRenameFilesRequest.type,"willRename","willRename",(e=>e.oldUri),e.code2ProtocolConverter.asWillRenameFilesParams)}doSend(e,t){const n=this._client.middleware.workspace;return n?.willRenameFiles?n.willRenameFiles(e,t):t(e)}},t.WillDeleteFilesFeature=class extends h{constructor(e){super(e,i.workspace.onWillDeleteFiles,r.WillDeleteFilesRequest.type,"willDelete","willDelete",(e=>e),e.code2ProtocolConverter.asWillDeleteFilesParams)}doSend(e,t){const n=this._client.middleware.workspace;return n?.willDeleteFiles?n.willDeleteFiles(e,t):t(e)}}},9190:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileSystemWatcherFeature=void 0;const i=n(9496),o=n(5968),r=n(497);t.FileSystemWatcherFeature=class{constructor(e,t){this._client=e,this._notifyFileEvent=t,this._watchers=new Map}getState(){return{kind:"workspace",id:this.registrationType.method,registrations:this._watchers.size>0}}get registrationType(){return o.DidChangeWatchedFilesNotification.type}fillClientCapabilities(e){(0,r.ensure)((0,r.ensure)(e,"workspace"),"didChangeWatchedFiles").dynamicRegistration=!0,(0,r.ensure)((0,r.ensure)(e,"workspace"),"didChangeWatchedFiles").relativePatternSupport=!0}initialize(e,t){}register(e){if(!Array.isArray(e.registerOptions.watchers))return;const t=[];for(const n of e.registerOptions.watchers){const e=this._client.protocol2CodeConverter.asGlobPattern(n.globPattern);if(void 0===e)continue;let r=!0,s=!0,a=!0;void 0!==n.kind&&null!==n.kind&&(r=0!=(n.kind&o.WatchKind.Create),s=0!=(n.kind&o.WatchKind.Change),a=0!=(n.kind&o.WatchKind.Delete));const c=i.workspace.createFileSystemWatcher(e,!r,!s,!a);this.hookListeners(c,r,s,a,t),t.push(c)}this._watchers.set(e.id,t)}registerRaw(e,t){let n=[];for(let e of t)this.hookListeners(e,!0,!0,!0,n);this._watchers.set(e,n)}hookListeners(e,t,n,i,r){t&&e.onDidCreate((e=>this._notifyFileEvent({uri:this._client.code2ProtocolConverter.asUri(e),type:o.FileChangeType.Created})),null,r),n&&e.onDidChange((e=>this._notifyFileEvent({uri:this._client.code2ProtocolConverter.asUri(e),type:o.FileChangeType.Changed})),null,r),i&&e.onDidDelete((e=>this._notifyFileEvent({uri:this._client.code2ProtocolConverter.asUri(e),type:o.FileChangeType.Deleted})),null,r)}unregister(e){let t=this._watchers.get(e);if(t)for(let e of t)e.dispose()}clear(){this._watchers.forEach((e=>{for(let t of e)t.dispose()})),this._watchers.clear()}}},807:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FoldingRangeFeature=void 0;const i=n(9496),o=n(5968),r=n(497);class s extends r.TextDocumentLanguageFeature{constructor(e){super(e,o.FoldingRangeRequest.type)}fillClientCapabilities(e){let t=(0,r.ensure)((0,r.ensure)(e,"textDocument"),"foldingRange");t.dynamicRegistration=!0,t.rangeLimit=5e3,t.lineFoldingOnly=!0,t.foldingRangeKind={valueSet:[o.FoldingRangeKind.Comment,o.FoldingRangeKind.Imports,o.FoldingRangeKind.Region]},t.foldingRange={collapsedText:!1},(0,r.ensure)((0,r.ensure)(e,"workspace"),"foldingRange").refreshSupport=!0}initialize(e,t){this._client.onRequest(o.FoldingRangeRefreshRequest.type,(async()=>{for(const e of this.getAllProviders())e.onDidChangeFoldingRange.fire()}));let[n,i]=this.getRegistration(t,e.foldingRangeProvider);n&&i&&this.register({id:n,registerOptions:i})}registerLanguageProvider(e){const t=e.documentSelector,n=new i.EventEmitter,r={onDidChangeFoldingRanges:n.event,provideFoldingRanges:(e,t,n)=>{const i=this._client,r=(e,t,n)=>{const r={textDocument:i.code2ProtocolConverter.asTextDocumentIdentifier(e)};return i.sendRequest(o.FoldingRangeRequest.type,r,n).then((e=>n.isCancellationRequested?null:i.protocol2CodeConverter.asFoldingRanges(e,n)),(e=>i.handleFailedRequest(o.FoldingRangeRequest.type,n,e,null)))},s=i.middleware;return s.provideFoldingRanges?s.provideFoldingRanges(e,t,n,r):r(e,0,n)}};return[i.languages.registerFoldingRangeProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),r),{provider:r,onDidChangeFoldingRange:n}]}}t.FoldingRangeFeature=s},9368:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentOnTypeFormattingFeature=t.DocumentRangeFormattingFeature=t.DocumentFormattingFeature=void 0;const i=n(9496),o=n(5968),r=n(7435),s=n(497);var a;!function(e){e.fromConfiguration=function(e){const t=i.workspace.getConfiguration("files",e);return{trimTrailingWhitespace:t.get("trimTrailingWhitespace"),trimFinalNewlines:t.get("trimFinalNewlines"),insertFinalNewline:t.get("insertFinalNewline")}}}(a||(a={}));class c extends s.TextDocumentLanguageFeature{constructor(e){super(e,o.DocumentFormattingRequest.type)}fillClientCapabilities(e){(0,s.ensure)((0,s.ensure)(e,"textDocument"),"formatting").dynamicRegistration=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.documentFormattingProvider);n&&this.register({id:r.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t=e.documentSelector,n={provideDocumentFormattingEdits:(e,t,n)=>{const i=this._client,r=(e,t,n)=>{const r={textDocument:i.code2ProtocolConverter.asTextDocumentIdentifier(e),options:i.code2ProtocolConverter.asFormattingOptions(t,a.fromConfiguration(e))};return i.sendRequest(o.DocumentFormattingRequest.type,r,n).then((e=>n.isCancellationRequested?null:i.protocol2CodeConverter.asTextEdits(e,n)),(e=>i.handleFailedRequest(o.DocumentFormattingRequest.type,n,e,null)))},s=i.middleware;return s.provideDocumentFormattingEdits?s.provideDocumentFormattingEdits(e,t,n,r):r(e,t,n)}};return[i.languages.registerDocumentFormattingEditProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),n),n]}}t.DocumentFormattingFeature=c;class u extends s.TextDocumentLanguageFeature{constructor(e){super(e,o.DocumentRangeFormattingRequest.type)}fillClientCapabilities(e){const t=(0,s.ensure)((0,s.ensure)(e,"textDocument"),"rangeFormatting");t.dynamicRegistration=!0,t.rangesSupport=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.documentRangeFormattingProvider);n&&this.register({id:r.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t=e.documentSelector,n={provideDocumentRangeFormattingEdits:(e,t,n,i)=>{const r=this._client,s=(e,t,n,i)=>{const s={textDocument:r.code2ProtocolConverter.asTextDocumentIdentifier(e),range:r.code2ProtocolConverter.asRange(t),options:r.code2ProtocolConverter.asFormattingOptions(n,a.fromConfiguration(e))};return r.sendRequest(o.DocumentRangeFormattingRequest.type,s,i).then((e=>i.isCancellationRequested?null:r.protocol2CodeConverter.asTextEdits(e,i)),(e=>r.handleFailedRequest(o.DocumentRangeFormattingRequest.type,i,e,null)))},c=r.middleware;return c.provideDocumentRangeFormattingEdits?c.provideDocumentRangeFormattingEdits(e,t,n,i,s):s(e,t,n,i)}};return e.rangesSupport&&(n.provideDocumentRangesFormattingEdits=(e,t,n,i)=>{const r=this._client,s=(e,t,n,i)=>{const s={textDocument:r.code2ProtocolConverter.asTextDocumentIdentifier(e),ranges:r.code2ProtocolConverter.asRanges(t),options:r.code2ProtocolConverter.asFormattingOptions(n,a.fromConfiguration(e))};return r.sendRequest(o.DocumentRangesFormattingRequest.type,s,i).then((e=>i.isCancellationRequested?null:r.protocol2CodeConverter.asTextEdits(e,i)),(e=>r.handleFailedRequest(o.DocumentRangesFormattingRequest.type,i,e,null)))},c=r.middleware;return c.provideDocumentRangesFormattingEdits?c.provideDocumentRangesFormattingEdits(e,t,n,i,s):s(e,t,n,i)}),[i.languages.registerDocumentRangeFormattingEditProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),n),n]}}t.DocumentRangeFormattingFeature=u;class l extends s.TextDocumentLanguageFeature{constructor(e){super(e,o.DocumentOnTypeFormattingRequest.type)}fillClientCapabilities(e){(0,s.ensure)((0,s.ensure)(e,"textDocument"),"onTypeFormatting").dynamicRegistration=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.documentOnTypeFormattingProvider);n&&this.register({id:r.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t=e.documentSelector,n={provideOnTypeFormattingEdits:(e,t,n,i,r)=>{const s=this._client,c=(e,t,n,i,r)=>{let c={textDocument:s.code2ProtocolConverter.asTextDocumentIdentifier(e),position:s.code2ProtocolConverter.asPosition(t),ch:n,options:s.code2ProtocolConverter.asFormattingOptions(i,a.fromConfiguration(e))};return s.sendRequest(o.DocumentOnTypeFormattingRequest.type,c,r).then((e=>r.isCancellationRequested?null:s.protocol2CodeConverter.asTextEdits(e,r)),(e=>s.handleFailedRequest(o.DocumentOnTypeFormattingRequest.type,r,e,null)))},u=s.middleware;return u.provideOnTypeFormattingEdits?u.provideOnTypeFormattingEdits(e,t,n,i,r,c):c(e,t,n,i,r)}},r=e.moreTriggerCharacter||[];return[i.languages.registerOnTypeFormattingEditProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),n,e.firstTriggerCharacter,...r),n]}}t.DocumentOnTypeFormattingFeature=l},9446:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HoverFeature=void 0;const i=n(9496),o=n(5968),r=n(497),s=n(7435);class a extends r.TextDocumentLanguageFeature{constructor(e){super(e,o.HoverRequest.type)}fillClientCapabilities(e){const t=(0,r.ensure)((0,r.ensure)(e,"textDocument"),"hover");t.dynamicRegistration=!0,t.contentFormat=[o.MarkupKind.Markdown,o.MarkupKind.PlainText]}initialize(e,t){const n=this.getRegistrationOptions(t,e.hoverProvider);n&&this.register({id:s.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t=e.documentSelector,n={provideHover:(e,t,n)=>{const i=this._client,r=(e,t,n)=>i.sendRequest(o.HoverRequest.type,i.code2ProtocolConverter.asTextDocumentPositionParams(e,t),n).then((e=>n.isCancellationRequested?null:i.protocol2CodeConverter.asHover(e)),(e=>i.handleFailedRequest(o.HoverRequest.type,n,e,null))),s=i.middleware;return s.provideHover?s.provideHover(e,t,n,r):r(e,t,n)}};return[this.registerProvider(t,n),n]}registerProvider(e,t){return i.languages.registerHoverProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}}t.HoverFeature=a},9764:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImplementationFeature=void 0;const i=n(9496),o=n(5968),r=n(497);class s extends r.TextDocumentLanguageFeature{constructor(e){super(e,o.ImplementationRequest.type)}fillClientCapabilities(e){let t=(0,r.ensure)((0,r.ensure)(e,"textDocument"),"implementation");t.dynamicRegistration=!0,t.linkSupport=!0}initialize(e,t){let[n,i]=this.getRegistration(t,e.implementationProvider);n&&i&&this.register({id:n,registerOptions:i})}registerLanguageProvider(e){const t=e.documentSelector,n={provideImplementation:(e,t,n)=>{const i=this._client,r=(e,t,n)=>i.sendRequest(o.ImplementationRequest.type,i.code2ProtocolConverter.asTextDocumentPositionParams(e,t),n).then((e=>n.isCancellationRequested?null:i.protocol2CodeConverter.asDefinitionResult(e,n)),(e=>i.handleFailedRequest(o.ImplementationRequest.type,n,e,null))),s=i.middleware;return s.provideImplementation?s.provideImplementation(e,t,n,r):r(e,t,n)}};return[this.registerProvider(t,n),n]}registerProvider(e,t){return i.languages.registerImplementationProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}}t.ImplementationFeature=s},863:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlayHintsFeature=void 0;const i=n(9496),o=n(5968),r=n(497);class s extends r.TextDocumentLanguageFeature{constructor(e){super(e,o.InlayHintRequest.type)}fillClientCapabilities(e){const t=(0,r.ensure)((0,r.ensure)(e,"textDocument"),"inlayHint");t.dynamicRegistration=!0,t.resolveSupport={properties:["tooltip","textEdits","label.tooltip","label.location","label.command"]},(0,r.ensure)((0,r.ensure)(e,"workspace"),"inlayHint").refreshSupport=!0}initialize(e,t){this._client.onRequest(o.InlayHintRefreshRequest.type,(async()=>{for(const e of this.getAllProviders())e.onDidChangeInlayHints.fire()}));const[n,i]=this.getRegistration(t,e.inlayHintProvider);n&&i&&this.register({id:n,registerOptions:i})}registerLanguageProvider(e){const t=e.documentSelector,n=new i.EventEmitter,r={onDidChangeInlayHints:n.event,provideInlayHints:(e,t,n)=>{const i=this._client,r=async(e,t,n)=>{const r={textDocument:i.code2ProtocolConverter.asTextDocumentIdentifier(e),range:i.code2ProtocolConverter.asRange(t)};try{const e=await i.sendRequest(o.InlayHintRequest.type,r,n);return n.isCancellationRequested?null:i.protocol2CodeConverter.asInlayHints(e,n)}catch(e){return i.handleFailedRequest(o.InlayHintRequest.type,n,e,null)}},s=i.middleware;return s.provideInlayHints?s.provideInlayHints(e,t,n,r):r(e,t,n)}};return r.resolveInlayHint=!0===e.resolveProvider?(e,t)=>{const n=this._client,i=async(e,t)=>{try{const i=await n.sendRequest(o.InlayHintResolveRequest.type,n.code2ProtocolConverter.asInlayHint(e),t);if(t.isCancellationRequested)return null;const r=n.protocol2CodeConverter.asInlayHint(i,t);return t.isCancellationRequested?null:r}catch(e){return n.handleFailedRequest(o.InlayHintResolveRequest.type,t,e,null)}},r=n.middleware;return r.resolveInlayHint?r.resolveInlayHint(e,t,i):i(e,t)}:void 0,[this.registerProvider(t,r),{provider:r,onDidChangeInlayHints:n}]}registerProvider(e,t){return i.languages.registerInlayHintsProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}}t.InlayHintsFeature=s},2472:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlineCompletionItemFeature=void 0;const i=n(9496),o=n(5968),r=n(497),s=n(7435);class a extends r.TextDocumentLanguageFeature{constructor(e){super(e,o.InlineCompletionRequest.type)}fillClientCapabilities(e){(0,r.ensure)((0,r.ensure)(e,"textDocument"),"inlineCompletion").dynamicRegistration=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.inlineCompletionProvider);n&&this.register({id:s.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t=e.documentSelector,n={provideInlineCompletionItems:(e,t,n,i)=>{const r=this._client,s=this._client.middleware,a=(e,t,n,i)=>r.sendRequest(o.InlineCompletionRequest.type,r.code2ProtocolConverter.asInlineCompletionParams(e,t,n),i).then((e=>i.isCancellationRequested?null:r.protocol2CodeConverter.asInlineCompletionResult(e,i)),(e=>r.handleFailedRequest(o.InlineCompletionRequest.type,i,e,null)));return s.provideInlineCompletionItems?s.provideInlineCompletionItems(e,t,n,i,a):a(e,t,n,i)}};return[i.languages.registerInlineCompletionItemProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),n),n]}}t.InlineCompletionItemFeature=a},2275:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlineValueFeature=void 0;const i=n(9496),o=n(5968),r=n(497);class s extends r.TextDocumentLanguageFeature{constructor(e){super(e,o.InlineValueRequest.type)}fillClientCapabilities(e){(0,r.ensure)((0,r.ensure)(e,"textDocument"),"inlineValue").dynamicRegistration=!0,(0,r.ensure)((0,r.ensure)(e,"workspace"),"inlineValue").refreshSupport=!0}initialize(e,t){this._client.onRequest(o.InlineValueRefreshRequest.type,(async()=>{for(const e of this.getAllProviders())e.onDidChangeInlineValues.fire()}));const[n,i]=this.getRegistration(t,e.inlineValueProvider);n&&i&&this.register({id:n,registerOptions:i})}registerLanguageProvider(e){const t=e.documentSelector,n=new i.EventEmitter,r={onDidChangeInlineValues:n.event,provideInlineValues:(e,t,n,i)=>{const r=this._client,s=(e,t,n,i)=>{const s={textDocument:r.code2ProtocolConverter.asTextDocumentIdentifier(e),range:r.code2ProtocolConverter.asRange(t),context:r.code2ProtocolConverter.asInlineValueContext(n)};return r.sendRequest(o.InlineValueRequest.type,s,i).then((e=>i.isCancellationRequested?null:r.protocol2CodeConverter.asInlineValues(e,i)),(e=>r.handleFailedRequest(o.InlineValueRequest.type,i,e,null)))},a=r.middleware;return a.provideInlineValues?a.provideInlineValues(e,t,n,i,s):s(e,t,n,i)}};return[this.registerProvider(t,r),{provider:r,onDidChangeInlineValues:n}]}registerProvider(e,t){return i.languages.registerInlineValuesProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}}t.InlineValueFeature=s},2550:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LinkedEditingFeature=void 0;const i=n(9496),o=n(5968),r=n(497);class s extends r.TextDocumentLanguageFeature{constructor(e){super(e,o.LinkedEditingRangeRequest.type)}fillClientCapabilities(e){(0,r.ensure)((0,r.ensure)(e,"textDocument"),"linkedEditingRange").dynamicRegistration=!0}initialize(e,t){let[n,i]=this.getRegistration(t,e.linkedEditingRangeProvider);n&&i&&this.register({id:n,registerOptions:i})}registerLanguageProvider(e){const t=e.documentSelector,n={provideLinkedEditingRanges:(e,t,n)=>{const i=this._client,r=(e,t,n)=>i.sendRequest(o.LinkedEditingRangeRequest.type,i.code2ProtocolConverter.asTextDocumentPositionParams(e,t),n).then((e=>n.isCancellationRequested?null:i.protocol2CodeConverter.asLinkedEditingRanges(e,n)),(e=>i.handleFailedRequest(o.LinkedEditingRangeRequest.type,n,e,null))),s=i.middleware;return s.provideLinkedEditingRange?s.provideLinkedEditingRange(e,t,n,r):r(e,t,n)}};return[this.registerProvider(t,n),n]}registerProvider(e,t){return i.languages.registerLinkedEditingRangeProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}}t.LinkedEditingFeature=s},7172:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NotebookDocumentSyncFeature=void 0;const i=n(9496),o=n(3707),r=n(5968),s=n(7435),a=n(2116);function c(e,t){return void 0===e[t]&&(e[t]={}),e[t]}var u,l,d,h,g;!function(e){let t;!function(t){function n(e,t){return e.map((e=>s(e,t)))}function o(e){return c(new Set,e)}function s(e,t){const n=r.NotebookCell.create(function(e){switch(e){case i.NotebookCellKind.Markup:return r.NotebookCellKind.Markup;case i.NotebookCellKind.Code:return r.NotebookCellKind.Code}}(e.kind),t.asUri(e.document.uri));return Object.keys(e.metadata).length>0&&(n.metadata=o(e.metadata)),void 0!==e.executionSummary&&a.number(e.executionSummary.executionOrder)&&a.boolean(e.executionSummary.success)&&(n.executionSummary={executionOrder:e.executionSummary.executionOrder,success:e.executionSummary.success}),n}function c(e,t){if(e.has(t))throw new Error("Can't deep copy cyclic structures.");if(Array.isArray(t)){const n=[];for(const i of t)if(null!==i&&"object"==typeof i||Array.isArray(i))n.push(c(e,i));else{if(i instanceof RegExp)throw new Error("Can't transfer regular expressions to the server");n.push(i)}return n}{const n=Object.keys(t),i=Object.create(null);for(const o of n){const n=t[o];if(null!==n&&"object"==typeof n||Array.isArray(n))i[o]=c(e,n);else{if(n instanceof RegExp)throw new Error("Can't transfer regular expressions to the server");i[o]=n}}return i}}t.asVersionedNotebookDocumentIdentifier=function(e,t){return{version:e.version,uri:t.asUri(e.uri)}},t.asNotebookDocument=function(e,t,i){const s=r.NotebookDocument.create(i.asUri(e.uri),e.notebookType,e.version,n(t,i));return Object.keys(e.metadata).length>0&&(s.metadata=o(e.metadata)),s},t.asNotebookCells=n,t.asMetadata=o,t.asNotebookCell=s,t.asTextContentChange=function(e,t){const n=t.asChangeTextDocumentParams(e,e.document.uri,e.document.version);return{document:n.textDocument,changes:n.contentChanges}},t.asNotebookDocumentChangeEvent=function(t,n){const i=Object.create(null);if(t.metadata&&(i.metadata=e.c2p.asMetadata(t.metadata)),void 0!==t.cells){const o=Object.create(null),r=t.cells;r.structure&&(o.structure={array:{start:r.structure.array.start,deleteCount:r.structure.array.deleteCount,cells:void 0!==r.structure.array.cells?r.structure.array.cells.map((t=>e.c2p.asNotebookCell(t,n))):void 0},didOpen:void 0!==r.structure.didOpen?r.structure.didOpen.map((e=>n.asOpenTextDocumentParams(e.document).textDocument)):void 0,didClose:void 0!==r.structure.didClose?r.structure.didClose.map((e=>n.asCloseTextDocumentParams(e.document).textDocument)):void 0}),void 0!==r.data&&(o.data=r.data.map((t=>e.c2p.asNotebookCell(t,n)))),void 0!==r.textContent&&(o.textContent=r.textContent.map((t=>e.c2p.asTextContentChange(t,n)))),Object.keys(o).length>0&&(i.cells=o)}return i}}(t=e.c2p||(e.c2p={}))}(u||(u={})),function(e){function t(e,t,i=!0){return!(e.kind!==t.kind||e.document.uri.toString()!==t.document.uri.toString()||e.document.languageId!==t.document.languageId||!function(e,t){return e===t||void 0!==e&&void 0!==t&&(e.executionOrder===t.executionOrder&&e.success===t.success&&function(e,t){return e===t||void 0!==e&&void 0!==t&&(e.startTime===t.startTime&&e.endTime===t.endTime)}(e.timing,t.timing))}(e.executionSummary,t.executionSummary))&&(!i||i&&n(e.metadata,t.metadata))}function n(e,t){if(e===t)return!0;if(null==e||null==t)return!1;if(typeof e!=typeof t)return!1;if("object"!=typeof e)return!1;const o=Array.isArray(e),r=Array.isArray(t);if(o!==r)return!1;if(o&&r){if(e.length!==t.length)return!1;for(let i=0;i<e.length;i++)if(!n(e[i],t[i]))return!1}if(i(e)&&i(t)){const i=Object.keys(e),o=Object.keys(t);if(i.length!==o.length)return!1;if(i.sort(),o.sort(),!n(i,o))return!1;for(let o=0;o<i.length;o++){const r=i[o];if(!n(e[r],t[r]))return!1}return!0}return!1}function i(e){return null!==e&&"object"==typeof e}e.computeDiff=function(e,n,i){const o=e.length,r=n.length;let s=0;for(;s<r&&s<o&&t(e[s],n[s],i);)s++;if(s<r&&s<o){let a=o-1,c=r-1;for(;a>=0&&c>=0&&t(e[a],n[c],i);)a--,c--;const u=a+1-s,l=s===c+1?void 0:n.slice(s,c+1);return void 0!==l?{start:s,deleteCount:u,cells:l}:{start:s,deleteCount:u}}return s<r?{start:s,deleteCount:0,cells:n.slice(s)}:s<o?{start:s,deleteCount:o-s}:void 0},e.isObjectLiteral=i}(l||(l={})),function(e){e.matchNotebook=function(e,t){if("string"==typeof e)return"*"===e||t.notebookType===e;if(void 0!==e.notebookType&&"*"!==e.notebookType&&t.notebookType!==e.notebookType)return!1;const n=t.uri;if(void 0!==e.scheme&&"*"!==e.scheme&&n.scheme!==e.scheme)return!1;if(void 0!==e.pattern){const t=new o.Minimatch(e.pattern,{noext:!0});if(!t.makeRe())return!1;if(!t.match(n.fsPath))return!1}return!0}}(d||(d={})),function(e){function t(e,t,n,i){return void 0===t&&void 0===n?{notebook:e,language:i}:{notebook:{notebookType:e,scheme:t,pattern:n},language:i}}e.asDocumentSelector=function(e){const n=e.notebookSelector,i=[];for(const e of n){const n=("string"==typeof e.notebook?e.notebook:e.notebook?.notebookType)??"*",o="string"==typeof e.notebook?void 0:e.notebook?.scheme,r="string"==typeof e.notebook?void 0:e.notebook?.pattern;if(void 0!==e.cells)for(const s of e.cells)i.push(t(n,o,r,s.language));else i.push(t(n,o,r,void 0))}return i}}(h||(h={})),function(e){e.create=function(e){return{cells:e,uris:new Set(e.map((e=>e.document.uri.toString())))}}}(g||(g={}));class p{constructor(e,t){this.client=e,this.options=t,this.notebookSyncInfo=new Map,this.notebookDidOpen=new Set,this.disposables=[],this.selector=e.protocol2CodeConverter.asDocumentSelector(h.asDocumentSelector(t)),i.workspace.onDidOpenNotebookDocument((e=>{this.notebookDidOpen.add(e.uri.toString()),this.didOpen(e)}),void 0,this.disposables);for(const e of i.workspace.notebookDocuments)this.notebookDidOpen.add(e.uri.toString()),this.didOpen(e);i.workspace.onDidChangeNotebookDocument((e=>this.didChangeNotebookDocument(e)),void 0,this.disposables),!0===this.options.save&&i.workspace.onDidSaveNotebookDocument((e=>this.didSave(e)),void 0,this.disposables),i.workspace.onDidCloseNotebookDocument((e=>{this.didClose(e),this.notebookDidOpen.delete(e.uri.toString())}),void 0,this.disposables)}getState(){for(const e of i.workspace.notebookDocuments)if(void 0!==this.getMatchingCells(e))return{kind:"document",id:"$internal",registrations:!0,matches:!0};return{kind:"document",id:"$internal",registrations:!0,matches:!1}}get mode(){return"notebook"}handles(e){return i.languages.match(this.selector,e)>0}didOpenNotebookCellTextDocument(e,t){if(0===i.languages.match(this.selector,t.document))return;if(!this.notebookDidOpen.has(e.uri.toString()))return;const n=this.notebookSyncInfo.get(e.uri.toString()),o=this.cellMatches(e,t);if(void 0!==n){const i=n.uris.has(t.document.uri.toString());if(o&&i||!o&&!i)return;if(o){const t=this.getMatchingCells(e);if(void 0!==t){const i=this.asNotebookDocumentChangeEvent(e,void 0,n,t);void 0!==i&&this.doSendChange(i,t).catch((()=>{}))}}}else o&&this.doSendOpen(e,[t]).catch((()=>{}))}didChangeNotebookCellTextDocument(e,t){0!==i.languages.match(this.selector,t.document)&&this.doSendChange({notebook:e,cells:{textContent:[t]}},void 0).catch((()=>{}))}didCloseNotebookCellTextDocument(e,t){const n=this.notebookSyncInfo.get(e.uri.toString());if(void 0===n)return;const i=t.document.uri,o=n.cells.findIndex((e=>e.document.uri.toString()===i.toString()));if(-1!==o)if(0===o&&1===n.cells.length)this.doSendClose(e,n.cells).catch((()=>{}));else{const t=n.cells.slice(),i=t.splice(o,1);this.doSendChange({notebook:e,cells:{structure:{array:{start:o,deleteCount:1},didClose:i}}},t).catch((()=>{}))}}dispose(){for(const e of this.disposables)e.dispose()}didOpen(e,t=this.getMatchingCells(e),n=this.notebookSyncInfo.get(e.uri.toString())){if(void 0!==n)if(void 0!==t){const i=this.asNotebookDocumentChangeEvent(e,void 0,n,t);void 0!==i&&this.doSendChange(i,t).catch((()=>{}))}else this.doSendClose(e,[]).catch((()=>{}));else{if(void 0===t)return;this.doSendOpen(e,t).catch((()=>{}))}}didChangeNotebookDocument(e){const t=e.notebook,n=this.notebookSyncInfo.get(t.uri.toString());if(void 0===n){if(0===e.contentChanges.length)return;const i=this.getMatchingCells(t);if(void 0===i)return;this.didOpen(t,i,n)}else{const i=this.getMatchingCells(t);if(void 0===i)return void this.didClose(t,n);const o=this.asNotebookDocumentChangeEvent(e.notebook,e,n,i);void 0!==o&&this.doSendChange(o,i).catch((()=>{}))}}didSave(e){void 0!==this.notebookSyncInfo.get(e.uri.toString())&&this.doSendSave(e).catch((()=>{}))}didClose(e,t=this.notebookSyncInfo.get(e.uri.toString())){if(void 0===t)return;const n=e.getCells().filter((e=>t.uris.has(e.document.uri.toString())));this.doSendClose(e,n).catch((()=>{}))}async sendDidOpenNotebookDocument(e){const t=this.getMatchingCells(e);if(void 0!==t)return this.doSendOpen(e,t)}async doSendOpen(e,t){const n=async(e,t)=>{const n=u.c2p.asNotebookDocument(e,t,this.client.code2ProtocolConverter),i=t.map((e=>this.client.code2ProtocolConverter.asTextDocumentItem(e.document)));try{await this.client.sendNotification(r.DidOpenNotebookDocumentNotification.type,{notebookDocument:n,cellTextDocuments:i})}catch(e){throw this.client.error("Sending DidOpenNotebookDocumentNotification failed",e),e}},i=this.client.middleware?.notebooks;return this.notebookSyncInfo.set(e.uri.toString(),g.create(t)),void 0!==i?.didOpen?i.didOpen(e,t,n):n(e,t)}async sendDidChangeNotebookDocument(e){return this.doSendChange(e,void 0)}async doSendChange(e,t=this.getMatchingCells(e.notebook)){const n=async e=>{try{await this.client.sendNotification(r.DidChangeNotebookDocumentNotification.type,{notebookDocument:u.c2p.asVersionedNotebookDocumentIdentifier(e.notebook,this.client.code2ProtocolConverter),change:u.c2p.asNotebookDocumentChangeEvent(e,this.client.code2ProtocolConverter)})}catch(e){throw this.client.error("Sending DidChangeNotebookDocumentNotification failed",e),e}},i=this.client.middleware?.notebooks;return void 0!==e.cells?.structure&&this.notebookSyncInfo.set(e.notebook.uri.toString(),g.create(t??[])),void 0!==i?.didChange?i?.didChange(e,n):n(e)}async sendDidSaveNotebookDocument(e){return this.doSendSave(e)}async doSendSave(e){const t=async e=>{try{await this.client.sendNotification(r.DidSaveNotebookDocumentNotification.type,{notebookDocument:{uri:this.client.code2ProtocolConverter.asUri(e.uri)}})}catch(e){throw this.client.error("Sending DidSaveNotebookDocumentNotification failed",e),e}},n=this.client.middleware?.notebooks;return void 0!==n?.didSave?n.didSave(e,t):t(e)}async sendDidCloseNotebookDocument(e){return this.doSendClose(e,this.getMatchingCells(e)??[])}async doSendClose(e,t){const n=async(e,t)=>{try{await this.client.sendNotification(r.DidCloseNotebookDocumentNotification.type,{notebookDocument:{uri:this.client.code2ProtocolConverter.asUri(e.uri)},cellTextDocuments:t.map((e=>this.client.code2ProtocolConverter.asTextDocumentIdentifier(e.document)))})}catch(e){throw this.client.error("Sending DidCloseNotebookDocumentNotification failed",e),e}},i=this.client.middleware?.notebooks;return this.notebookSyncInfo.delete(e.uri.toString()),void 0!==i?.didClose?i.didClose(e,t,n):n(e,t)}asNotebookDocumentChangeEvent(e,t,n,i){if(void 0!==t&&t.notebook!==e)throw new Error("Notebook must be identical");const o={notebook:e};let r;if(void 0!==t?.metadata&&(o.metadata=u.c2p.asMetadata(t.metadata)),void 0!==t?.cellChanges&&t.cellChanges.length>0){const e=[];r=new Set(i.map((e=>e.document.uri.toString())));for(const n of t.cellChanges)!r.has(n.cell.document.uri.toString())||void 0===n.executionSummary&&void 0===n.metadata||e.push(n.cell);e.length>0&&(o.cells=o.cells??{},o.cells.data=e)}if((void 0!==t?.contentChanges&&t.contentChanges.length>0||void 0===t)&&void 0!==n&&void 0!==i){const e=n.cells,t=i,r=l.computeDiff(e,t,!1);let s,a;if(void 0!==r){s=void 0===r.cells?new Map:new Map(r.cells.map((e=>[e.document.uri.toString(),e]))),a=0===r.deleteCount?new Map:new Map(e.slice(r.start,r.start+r.deleteCount).map((e=>[e.document.uri.toString(),e])));for(const e of Array.from(a.keys()))s.has(e)&&(a.delete(e),s.delete(e));o.cells=o.cells??{};const t=[],n=[];if(s.size>0||a.size>0){for(const e of s.values())t.push(e);for(const e of a.values())n.push(e)}o.cells.structure={array:r,didOpen:t,didClose:n}}}return Object.keys(o).length>1?o:void 0}getMatchingCells(e,t=e.getCells()){if(void 0!==this.options.notebookSelector)for(const n of this.options.notebookSelector)if(void 0===n.notebook||d.matchNotebook(n.notebook,e)){const i=this.filterCells(e,t,n.cells);return 0===i.length?void 0:i}}cellMatches(e,t){const n=this.getMatchingCells(e,[t]);return void 0!==n&&n[0]===t}filterCells(e,t,n){const i=void 0!==n?t.filter((e=>{const t=e.document.languageId;return n.some((e=>"*"===e.language||t===e.language))})):t;return"function"==typeof this.client.clientOptions.notebookDocumentOptions?.filterCells?this.client.clientOptions.notebookDocumentOptions.filterCells(e,i):i}}class m{constructor(e){this.client=e,this.registrations=new Map,this.registrationType=r.NotebookDocumentSyncRegistrationType.type,i.workspace.onDidOpenTextDocument((e=>{if(e.uri.scheme!==m.CellScheme)return;const[t,n]=this.findNotebookDocumentAndCell(e);if(void 0!==t&&void 0!==n)for(const e of this.registrations.values())e instanceof p&&e.didOpenNotebookCellTextDocument(t,n)})),i.workspace.onDidChangeTextDocument((e=>{if(0===e.contentChanges.length)return;const t=e.document;if(t.uri.scheme!==m.CellScheme)return;const[n]=this.findNotebookDocumentAndCell(t);if(void 0!==n)for(const t of this.registrations.values())t instanceof p&&t.didChangeNotebookCellTextDocument(n,e)})),i.workspace.onDidCloseTextDocument((e=>{if(e.uri.scheme!==m.CellScheme)return;const[t,n]=this.findNotebookDocumentAndCell(e);if(void 0!==t&&void 0!==n)for(const e of this.registrations.values())e instanceof p&&e.didCloseNotebookCellTextDocument(t,n)}))}getState(){if(0===this.registrations.size)return{kind:"document",id:this.registrationType.method,registrations:!1,matches:!1};for(const e of this.registrations.values()){const t=e.getState();if("document"===t.kind&&!0===t.registrations&&!0===t.matches)return{kind:"document",id:this.registrationType.method,registrations:!0,matches:!0}}return{kind:"document",id:this.registrationType.method,registrations:!0,matches:!1}}fillClientCapabilities(e){const t=c(c(e,"notebookDocument"),"synchronization");t.dynamicRegistration=!0,t.executionSummarySupport=!0}preInitialize(e){const t=e.notebookDocumentSync;void 0!==t&&(this.dedicatedChannel=this.client.protocol2CodeConverter.asDocumentSelector(h.asDocumentSelector(t)))}initialize(e){const t=e.notebookDocumentSync;if(void 0===t)return;const n=t.id??s.generateUuid();this.register({id:n,registerOptions:t})}register(e){const t=new p(this.client,e.registerOptions);this.registrations.set(e.id,t)}unregister(e){const t=this.registrations.get(e);t&&t.dispose()}clear(){for(const e of this.registrations.values())e.dispose();this.registrations.clear()}handles(e){if(e.uri.scheme!==m.CellScheme)return!1;if(void 0!==this.dedicatedChannel&&i.languages.match(this.dedicatedChannel,e)>0)return!0;for(const t of this.registrations.values())if(t.handles(e))return!0;return!1}getProvider(e){for(const t of this.registrations.values())if(t.handles(e.document))return t}findNotebookDocumentAndCell(e){const t=e.uri.toString();for(const e of i.workspace.notebookDocuments)for(const n of e.getCells())if(n.document.uri.toString()===t)return[e,n];return[void 0,void 0]}}t.NotebookDocumentSyncFeature=m,m.CellScheme="vscode-notebook-cell"},4915:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProgressFeature=void 0;const i=n(5968),o=n(6181);t.ProgressFeature=class{constructor(e){this._client=e,this.activeParts=new Set}getState(){return{kind:"window",id:i.WorkDoneProgressCreateRequest.method,registrations:this.activeParts.size>0}}fillClientCapabilities(e){var t,n;(t=e,n="window",void 0===t[n]&&(t[n]=Object.create(null)),t[n]).workDoneProgress=!0}initialize(){const e=this._client,t=e=>{this.activeParts.delete(e)};e.onRequest(i.WorkDoneProgressCreateRequest.type,(e=>{this.activeParts.add(new o.ProgressPart(this._client,e.token,t))}))}clear(){for(const e of this.activeParts)e.done();this.activeParts.clear()}}},6181:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProgressPart=void 0;const i=n(9496),o=n(5968),r=n(2116);t.ProgressPart=class{constructor(e,t,n){this._client=e,this._token=t,this._reported=0,this._infinite=!1,this._lspProgressDisposable=this._client.onProgress(o.WorkDoneProgress.type,this._token,(e=>{switch(e.kind){case"begin":this.begin(e);break;case"report":this.report(e);break;case"end":this.done(),n&&n(this)}}))}begin(e){this._infinite=void 0===e.percentage,void 0!==this._lspProgressDisposable&&i.window.withProgress({location:i.ProgressLocation.Window,cancellable:e.cancellable,title:e.title},(async(t,n)=>{if(void 0!==this._lspProgressDisposable)return this._progress=t,this._cancellationToken=n,this._tokenDisposable=this._cancellationToken.onCancellationRequested((()=>{this._client.sendNotification(o.WorkDoneProgressCancelNotification.type,{token:this._token})})),this.report(e),new Promise(((e,t)=>{this._resolve=e,this._reject=t}))}))}report(e){if(this._infinite&&r.string(e.message))void 0!==this._progress&&this._progress.report({message:e.message});else if(r.number(e.percentage)){const t=Math.max(0,Math.min(e.percentage,100)),n=Math.max(0,t-this._reported);this._reported+=n,void 0!==this._progress&&this._progress.report({message:e.message,increment:n})}}cancel(){this.cleanup(),void 0!==this._reject&&(this._reject(),this._resolve=void 0,this._reject=void 0)}done(){this.cleanup(),void 0!==this._resolve&&(this._resolve(),this._resolve=void 0,this._reject=void 0)}cleanup(){void 0!==this._lspProgressDisposable&&(this._lspProgressDisposable.dispose(),this._lspProgressDisposable=void 0),void 0!==this._tokenDisposable&&(this._tokenDisposable.dispose(),this._tokenDisposable=void 0),this._progress=void 0,this._cancellationToken=void 0}}},7400:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(9496);class o extends i.CallHierarchyItem{constructor(e,t,n,i,o,r,s){super(e,t,n,i,o,r),void 0!==s&&(this.data=s)}}t.default=o},1219:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(9496);class o extends i.CodeAction{constructor(e,t){super(e),this.data=t}}t.default=o},225:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(9496);class o extends i.CodeLens{constructor(e){super(e)}}t.default=o},1143:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(9496);class o extends i.CompletionItem{constructor(e){super(e)}}t.default=o},5356:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createConverter=void 0;const i=n(9496),o=n(5968),r=n(2116),s=n(8005),a=n(1143),c=n(225),u=n(8552),l=n(1219),d=n(6965),h=n(7400),g=n(9551),p=n(6832),m=n(134),f=n(5968);var v;!function(e){e.is=function(e){let t=e;return t&&r.string(t.language)&&r.string(t.value)}}(v||(v={})),t.createConverter=function(e,t,n){const y=e||(e=>i.Uri.parse(e));function C(e){return y(e)}function D(e){let t=new d.ProtocolDiagnostic(w(e.range),e.message,T(e.severity),e.data);if(void 0!==e.code)if("string"==typeof e.code||"number"==typeof e.code)o.CodeDescription.is(e.codeDescription)?t.code={value:e.code,target:C(e.codeDescription.href)}:t.code=e.code;else if(d.DiagnosticCode.is(e.code)){t.hasDiagnosticCode=!0;const n=e.code;t.code={value:n.value,target:C(n.target)}}return e.source&&(t.source=e.source),e.relatedInformation&&(t.relatedInformation=function(e){const t=new Array(e.length);for(let n=0;n<e.length;n++){const o=e[n];t[n]=new i.DiagnosticRelatedInformation(L(o.location),o.message)}return t}(e.relatedInformation)),Array.isArray(e.tags)&&(t.tags=function(e){if(!e)return;let t=[];for(let n of e){let e=b(n);void 0!==e&&t.push(e)}return t.length>0?t:void 0}(e.tags)),t}function b(e){switch(e){case o.DiagnosticTag.Unnecessary:return i.DiagnosticTag.Unnecessary;case o.DiagnosticTag.Deprecated:return i.DiagnosticTag.Deprecated;default:return}}function R(e){return e?new i.Position(e.line,e.character):void 0}function w(e){return e?new i.Range(e.start.line,e.start.character,e.end.line,e.end.character):void 0}async function S(e,t){return s.map(e,(e=>new i.Range(e.start.line,e.start.character,e.end.line,e.end.character)),t)}function T(e){if(null==e)return i.DiagnosticSeverity.Error;switch(e){case o.DiagnosticSeverity.Error:return i.DiagnosticSeverity.Error;case o.DiagnosticSeverity.Warning:return i.DiagnosticSeverity.Warning;case o.DiagnosticSeverity.Information:return i.DiagnosticSeverity.Information;case o.DiagnosticSeverity.Hint:return i.DiagnosticSeverity.Hint}return i.DiagnosticSeverity.Error}function _(e){if(r.string(e))return e;switch(e.kind){case o.MarkupKind.Markdown:return k(e.value);case o.MarkupKind.PlainText:return e.value;default:return`Unsupported Markup content received. Kind is: ${e.kind}`}}function k(e){let r;if(void 0===e||"string"==typeof e)r=new i.MarkdownString(e);else switch(e.kind){case o.MarkupKind.Markdown:r=new i.MarkdownString(e.value);break;case o.MarkupKind.PlainText:r=new i.MarkdownString,r.appendText(e.value);break;default:r=new i.MarkdownString,r.appendText(`Unsupported Markup content received. Kind is: ${e.kind}`)}return r.isTrusted=t,r.supportHtml=n,r}function P(e){switch(e){case o.CompletionItemTag.Deprecated:return i.CompletionItemTag.Deprecated}}function x(e,t,n,s,c,u){const l=function(e){if(null==e)return[];const t=[];for(const n of e){const e=P(n);void 0!==e&&t.push(e)}return t}(e.tags),d=function(e){return o.CompletionItemLabelDetails.is(e.labelDetails)?{label:e.label,detail:e.labelDetails.detail,description:e.labelDetails.description}:e.label}(e),h=new a.default(d);e.detail&&(h.detail=e.detail),e.documentation&&(h.documentation=_(e.documentation),h.documentationFormat=r.string(e.documentation)?"$string":e.documentation.kind),e.filterText&&(h.filterText=e.filterText);const g=function(e,t,n){const r=e.insertTextFormat??n;if(void 0!==e.textEdit||void 0!==t){const[n,a]=void 0!==e.textEdit?(s=e.textEdit,o.InsertReplaceEdit.is(s)?[{inserting:w(s.insert),replacing:w(s.replace)},s.newText]:[w(s.range),s.newText]):[t,e.textEditText??e.label];return r===o.InsertTextFormat.Snippet?{text:new i.SnippetString(a),range:n,fromEdit:!0}:{text:a,range:n,fromEdit:!0}}return e.insertText?r===o.InsertTextFormat.Snippet?{text:new i.SnippetString(e.insertText),fromEdit:!1}:{text:e.insertText,fromEdit:!1}:void 0;var s}(e,n,c);if(g&&(h.insertText=g.text,h.range=g.range,h.fromEdit=g.fromEdit),r.number(e.kind)){let[t,n]=(p=e.kind,o.CompletionItemKind.Text<=p&&p<=o.CompletionItemKind.TypeParameter?[p-1,void 0]:[i.CompletionItemKind.Text,p]);h.kind=t,n&&(h.originalItemKind=n)}var p;e.sortText&&(h.sortText=e.sortText),e.additionalTextEdits&&(h.additionalTextEdits=O(e.additionalTextEdits));const m=void 0!==e.commitCharacters?r.stringArray(e.commitCharacters)?e.commitCharacters:void 0:t;m&&(h.commitCharacters=m.slice()),e.command&&(h.command=J(e.command)),!0!==e.deprecated&&!1!==e.deprecated||(h.deprecated=e.deprecated,!0===e.deprecated&&l.push(i.CompletionItemTag.Deprecated)),!0!==e.preselect&&!1!==e.preselect||(h.preselect=e.preselect);const f=e.data??u;void 0!==f&&(h.data=f),l.length>0&&(h.tags=l);const v=e.insertTextMode??s;return void 0!==v&&(h.insertTextMode=v,v===o.InsertTextMode.asIs&&(h.keepWhitespace=!0)),h}function q(e){if(e)return new i.TextEdit(w(e.range),e.newText)}async function F(e,t){if(e)return s.map(e,q,t)}function O(e){if(!e)return;const t=new Array(e.length);for(let n=0;n<e.length;n++)t[n]=q(e[n]);return t}async function E(e,t){return s.mapAsync(e,M,t)}async function M(e,t){let n=new i.SignatureInformation(e.label);return void 0!==e.documentation&&(n.documentation=_(e.documentation)),void 0!==e.parameters&&(n.parameters=await I(e.parameters,t)),void 0!==e.activeParameter&&(n.activeParameter=e.activeParameter),n}function I(e,t){return s.map(e,N,t)}function N(e){let t=new i.ParameterInformation(e.label);return e.documentation&&(t.documentation=_(e.documentation)),t}function L(e){return e?new i.Location(y(e.uri),w(e.range)):void 0}function A(e){if(!e)return;let t={targetUri:y(e.targetUri),targetRange:w(e.targetRange),originSelectionRange:w(e.originSelectionRange),targetSelectionRange:w(e.targetSelectionRange)};if(!t.targetSelectionRange)throw new Error("targetSelectionRange must not be undefined or null");return t}async function j(e,t){if(e){if(r.array(e)){if(0===e.length)return[];if(o.LocationLink.is(e[0])){const n=e;return s.map(n,A,t)}{const n=e;return s.map(n,L,t)}}return o.LocationLink.is(e)?[A(e)]:L(e)}}function H(e){let t=new i.DocumentHighlight(w(e.range));return r.number(e.kind)&&(t.kind=K(e.kind)),t}function K(e){switch(e){case o.DocumentHighlightKind.Text:return i.DocumentHighlightKind.Text;case o.DocumentHighlightKind.Read:return i.DocumentHighlightKind.Read;case o.DocumentHighlightKind.Write:return i.DocumentHighlightKind.Write}return i.DocumentHighlightKind.Text}function W(e){return e<=o.SymbolKind.TypeParameter?e-1:i.SymbolKind.Property}function U(e){switch(e){case o.SymbolTag.Deprecated:return i.SymbolTag.Deprecated;default:return}}function $(e){if(null==e)return;const t=[];for(const n of e){const e=U(n);void 0!==e&&t.push(e)}return 0===t.length?void 0:t}function z(e){const t=e.data,n=e.location,o=void 0===n.range||void 0!==t?new p.default(e.name,W(e.kind),e.containerName??"",void 0===n.range?y(n.uri):new i.Location(y(e.location.uri),w(n.range)),t):new i.SymbolInformation(e.name,W(e.kind),e.containerName??"",new i.Location(y(e.location.uri),w(n.range)));return B(o,e),o}function V(e){let t=new i.DocumentSymbol(e.name,e.detail||"",W(e.kind),w(e.range),w(e.selectionRange));if(B(t,e),void 0!==e.children&&e.children.length>0){let n=[];for(let t of e.children)n.push(V(t));t.children=n}return t}function B(e,t){e.tags=$(t.tags),t.deprecated&&(e.tags?e.tags.includes(i.SymbolTag.Deprecated)||(e.tags=e.tags.concat(i.SymbolTag.Deprecated)):e.tags=[i.SymbolTag.Deprecated])}function J(e){let t={title:e.title,command:e.command};return e.arguments&&(t.arguments=e.arguments),t}const Q=new Map;function X(e){if(null==e)return;let t=Q.get(e);if(t)return t;let n=e.split(".");t=i.CodeActionKind.Empty;for(let e of n)t=t.append(e);return t}async function G(e,t){if(null==e)return;let n=new l.default(e.title,e.data);return void 0!==e.kind&&(n.kind=X(e.kind)),void 0!==e.diagnostics&&(n.diagnostics=function(e){const t=new Array(e.length);for(let n=0;n<e.length;n++)t[n]=D(e[n]);return t}(e.diagnostics)),void 0!==e.edit&&(n.edit=await Z(e.edit,t)),void 0!==e.command&&(n.command=J(e.command)),void 0!==e.isPreferred&&(n.isPreferred=e.isPreferred),void 0!==e.disabled&&(n.disabled={reason:e.disabled.reason}),n}function Y(e){if(!e)return;let t=new c.default(w(e.range));return e.command&&(t.command=J(e.command)),void 0!==e.data&&null!==e.data&&(t.data=e.data),t}async function Z(e,t){if(!e)return;const n=new Map;if(void 0!==e.changeAnnotations){const i=e.changeAnnotations;await s.forEach(Object.keys(i),(e=>{const t=function(e){if(void 0!==e)return{label:e.label,needsConfirmation:!!e.needsConfirmation,description:e.description}}(i[e]);n.set(e,t)}),t)}const r=e=>void 0===e?void 0:n.get(e),a=new i.WorkspaceEdit;if(e.documentChanges){const n=e.documentChanges;await s.forEach(n,(e=>{if(o.CreateFile.is(e))a.createFile(y(e.uri),e.options,r(e.annotationId));else if(o.RenameFile.is(e))a.renameFile(y(e.oldUri),y(e.newUri),e.options,r(e.annotationId));else if(o.DeleteFile.is(e))a.deleteFile(y(e.uri),e.options,r(e.annotationId));else{if(!o.TextDocumentEdit.is(e))throw new Error(`Unknown workspace edit change received:\n${JSON.stringify(e,void 0,4)}`);{const t=y(e.textDocument.uri);for(const n of e.edits)o.AnnotatedTextEdit.is(n)?a.replace(t,w(n.range),n.newText,r(n.annotationId)):a.replace(t,w(n.range),n.newText)}}}),t)}else if(e.changes){const n=e.changes;await s.forEach(Object.keys(n),(e=>{a.set(y(e),O(n[e]))}),t)}return a}function ee(e){let t=w(e.range),n=e.target?C(e.target):void 0,i=new u.default(t,n);return void 0!==e.tooltip&&(i.tooltip=e.tooltip),void 0!==e.data&&null!==e.data&&(i.data=e.data),i}function te(e){return new i.Color(e.red,e.green,e.blue,e.alpha)}function ne(e){return new i.ColorInformation(w(e.range),te(e.color))}function ie(e){let t=new i.ColorPresentation(e.label);return t.additionalTextEdits=O(e.additionalTextEdits),e.textEdit&&(t.textEdit=q(e.textEdit)),t}function oe(e){if(e)switch(e){case o.FoldingRangeKind.Comment:return i.FoldingRangeKind.Comment;case o.FoldingRangeKind.Imports:return i.FoldingRangeKind.Imports;case o.FoldingRangeKind.Region:return i.FoldingRangeKind.Region}}function re(e){return new i.FoldingRange(e.startLine,e.endLine,oe(e.kind))}function se(e){return new i.SelectionRange(w(e.range),e.parent?se(e.parent):void 0)}function ae(e){return o.InlineValueText.is(e)?new i.InlineValueText(w(e.range),e.text):o.InlineValueVariableLookup.is(e)?new i.InlineValueVariableLookup(w(e.range),e.variableName,e.caseSensitiveLookup):new i.InlineValueEvaluatableExpression(w(e.range),e.expression)}async function ce(e,t){const n="string"==typeof e.label?e.label:await s.map(e.label,ue,t),i=new m.default(R(e.position),n);return void 0!==e.kind&&(i.kind=e.kind),void 0!==e.textEdits&&(i.textEdits=await F(e.textEdits,t)),void 0!==e.tooltip&&(i.tooltip=le(e.tooltip)),void 0!==e.paddingLeft&&(i.paddingLeft=e.paddingLeft),void 0!==e.paddingRight&&(i.paddingRight=e.paddingRight),void 0!==e.data&&(i.data=e.data),i}function ue(e){const t=new i.InlayHintLabelPart(e.value);return void 0!==e.location&&(t.location=L(e.location)),void 0!==e.tooltip&&(t.tooltip=le(e.tooltip)),void 0!==e.command&&(t.command=J(e.command)),t}function le(e){return"string"==typeof e?e:k(e)}function de(e){if(null===e)return;const t=new h.default(W(e.kind),e.name,e.detail||"",C(e.uri),w(e.range),w(e.selectionRange),e.data);return void 0!==e.tags&&(t.tags=$(e.tags)),t}async function he(e,t){return new i.CallHierarchyIncomingCall(de(e.from),await S(e.fromRanges,t))}async function ge(e,t){return new i.CallHierarchyOutgoingCall(de(e.to),await S(e.fromRanges,t))}function pe(e){return new i.SemanticTokensEdit(e.start,e.deleteCount,void 0!==e.data?new Uint32Array(e.data):void 0)}function me(e){if(null===e)return;let t=new g.default(W(e.kind),e.name,e.detail||"",C(e.uri),w(e.range),w(e.selectionRange),e.data);return void 0!==e.tags&&(t.tags=$(e.tags)),t}function fe(e){let t,n;t="string"==typeof e.insertText?e.insertText:new i.SnippetString(e.insertText.value),e.command&&(n=J(e.command));const o=new i.InlineCompletionItem(t,w(e.range),n);return e.filterText&&(o.filterText=e.filterText),o}return Q.set(o.CodeActionKind.Empty,i.CodeActionKind.Empty),Q.set(o.CodeActionKind.QuickFix,i.CodeActionKind.QuickFix),Q.set(o.CodeActionKind.Refactor,i.CodeActionKind.Refactor),Q.set(o.CodeActionKind.RefactorExtract,i.CodeActionKind.RefactorExtract),Q.set(o.CodeActionKind.RefactorInline,i.CodeActionKind.RefactorInline),Q.set(o.CodeActionKind.RefactorRewrite,i.CodeActionKind.RefactorRewrite),Q.set(o.CodeActionKind.Source,i.CodeActionKind.Source),Q.set(o.CodeActionKind.SourceOrganizeImports,i.CodeActionKind.SourceOrganizeImports),{asUri:C,asDocumentSelector:function(e){const t=[];for(const n of e)if("string"==typeof n)t.push(n);else if(f.NotebookCellTextDocumentFilter.is(n))if("string"==typeof n.notebook)t.push({notebookType:n.notebook,language:n.language});else{const e=n.notebook.notebookType??"*";t.push({notebookType:e,scheme:n.notebook.scheme,pattern:n.notebook.pattern,language:n.language})}else f.TextDocumentFilter.is(n)&&t.push({language:n.language,scheme:n.scheme,pattern:n.pattern});return t},asDiagnostics:async function(e,t){return s.map(e,D,t)},asDiagnostic:D,asRange:w,asRanges:S,asPosition:R,asDiagnosticSeverity:T,asDiagnosticTag:b,asHover:function(e){if(e)return new i.Hover(function(e){if(r.string(e))return k(e);if(v.is(e))return k().appendCodeblock(e.value,e.language);if(Array.isArray(e)){let t=[];for(let n of e){let e=k();v.is(n)?e.appendCodeblock(n.value,n.language):e.appendMarkdown(n),t.push(e)}return t}return k(e)}(e.contents),w(e.range))},asCompletionResult:async function(e,t,n){if(!e)return;if(Array.isArray(e))return s.map(e,(e=>x(e,t)),n);const r=e,{defaultRange:a,commitCharacters:c}=function(e,t){const n=e.itemDefaults?.editRange,i=e.itemDefaults?.commitCharacters??t;return o.Range.is(n)?{defaultRange:w(n),commitCharacters:i}:void 0!==n?{defaultRange:{inserting:w(n.insert),replacing:w(n.replace)},commitCharacters:i}:{defaultRange:void 0,commitCharacters:i}}(r,t),u=await s.map(r.items,(e=>x(e,c,a,r.itemDefaults?.insertTextMode,r.itemDefaults?.insertTextFormat,r.itemDefaults?.data)),n);return new i.CompletionList(u,r.isIncomplete)},asCompletionItem:x,asTextEdit:q,asTextEdits:F,asSignatureHelp:async function(e,t){if(!e)return;let n=new i.SignatureHelp;return r.number(e.activeSignature)?n.activeSignature=e.activeSignature:n.activeSignature=0,r.number(e.activeParameter)?n.activeParameter=e.activeParameter:n.activeParameter=0,e.signatures&&(n.signatures=await E(e.signatures,t)),n},asSignatureInformations:E,asSignatureInformation:M,asParameterInformations:I,asParameterInformation:N,asDeclarationResult:async function(e,t){if(e)return j(e,t)},asDefinitionResult:async function(e,t){if(e)return j(e,t)},asLocation:L,asReferences:async function(e,t){if(e)return s.map(e,L,t)},asDocumentHighlights:async function(e,t){if(e)return s.map(e,H,t)},asDocumentHighlight:H,asDocumentHighlightKind:K,asSymbolKind:W,asSymbolTag:U,asSymbolTags:$,asSymbolInformations:async function(e,t){if(e)return s.map(e,z,t)},asSymbolInformation:z,asDocumentSymbols:async function(e,t){if(null!=e)return s.map(e,V,t)},asDocumentSymbol:V,asCommand:J,asCommands:async function(e,t){if(e)return s.map(e,J,t)},asCodeAction:G,asCodeActionKind:X,asCodeActionKinds:function(e){if(null!=e)return e.map((e=>X(e)))},asCodeActionResult:function(e,t){return s.mapAsync(e,(async e=>o.Command.is(e)?J(e):G(e,t)),t)},asCodeLens:Y,asCodeLenses:async function(e,t){if(e)return s.map(e,Y,t)},asWorkspaceEdit:Z,asDocumentLink:ee,asDocumentLinks:async function(e,t){if(e)return s.map(e,ee,t)},asFoldingRangeKind:oe,asFoldingRange:re,asFoldingRanges:async function(e,t){if(e)return s.map(e,re,t)},asColor:te,asColorInformation:ne,asColorInformations:async function(e,t){if(e)return s.map(e,ne,t)},asColorPresentation:ie,asColorPresentations:async function(e,t){if(e)return s.map(e,ie,t)},asSelectionRange:se,asSelectionRanges:async function(e,t){return Array.isArray(e)?s.map(e,se,t):[]},asInlineValue:ae,asInlineValues:async function(e,t){return Array.isArray(e)?s.map(e,ae,t):[]},asInlayHint:ce,asInlayHints:async function(e,t){if(Array.isArray(e))return s.mapAsync(e,ce,t)},asSemanticTokensLegend:function(e){return e},asSemanticTokens:async function(e,t){if(null!=e)return new i.SemanticTokens(new Uint32Array(e.data),e.resultId)},asSemanticTokensEdit:pe,asSemanticTokensEdits:async function(e,t){if(null!=e)return new i.SemanticTokensEdits(e.edits.map(pe),e.resultId)},asCallHierarchyItem:de,asCallHierarchyItems:async function(e,t){if(null!==e)return s.map(e,de,t)},asCallHierarchyIncomingCall:he,asCallHierarchyIncomingCalls:async function(e,t){if(null!==e)return s.mapAsync(e,he,t)},asCallHierarchyOutgoingCall:ge,asCallHierarchyOutgoingCalls:async function(e,t){if(null!==e)return s.mapAsync(e,ge,t)},asLinkedEditingRanges:async function(e,t){if(null!=e)return new i.LinkedEditingRanges(await S(e.ranges,t),function(e){if(null!=e)return new RegExp(e)}(e.wordPattern))},asTypeHierarchyItem:me,asTypeHierarchyItems:async function(e,t){if(null!==e)return s.map(e,me,t)},asGlobPattern:function(e){if(r.string(e))return e;if(o.RelativePattern.is(e)){if(o.URI.is(e.baseUri))return new i.RelativePattern(C(e.baseUri),e.pattern);if(o.WorkspaceFolder.is(e.baseUri)){const t=i.workspace.getWorkspaceFolder(C(e.baseUri.uri));return void 0!==t?new i.RelativePattern(t,e.pattern):void 0}}},asInlineCompletionResult:async function(e,t){if(!e)return;if(Array.isArray(e))return s.map(e,(e=>fe(e)),t);const n=e,o=await s.map(n.items,(e=>fe(e)),t);return new i.InlineCompletionList(o)},asInlineCompletionItem:fe}}},6965:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProtocolDiagnostic=t.DiagnosticCode=void 0;const i=n(9496),o=n(2116);var r;!function(e){e.is=function(e){const t=e;return null!=t&&(o.number(t.value)||o.string(t.value))&&o.string(t.target)}}(r||(t.DiagnosticCode=r={}));class s extends i.Diagnostic{constructor(e,t,n,i){super(e,t,n),this.data=i,this.hasDiagnosticCode=!1}}t.ProtocolDiagnostic=s},8552:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(9496);class o extends i.DocumentLink{constructor(e,t){super(e,t)}}t.default=o},134:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(9496);class o extends i.InlayHint{constructor(e,t,n){super(e,t,n)}}t.default=o},9551:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(9496);class o extends i.TypeHierarchyItem{constructor(e,t,n,i,o,r,s){super(e,t,n,i,o,r),void 0!==s&&(this.data=s)}}t.default=o},6832:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(9496);class o extends i.SymbolInformation{constructor(e,t,n,o,r){const s=!(o instanceof i.Uri);super(e,t,n,s?o:new i.Location(o,new i.Range(0,0,0,0))),this.hasRange=s,void 0!==r&&(this.data=r)}}t.default=o},9929:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ReferencesFeature=void 0;const i=n(9496),o=n(5968),r=n(497),s=n(7435);class a extends r.TextDocumentLanguageFeature{constructor(e){super(e,o.ReferencesRequest.type)}fillClientCapabilities(e){(0,r.ensure)((0,r.ensure)(e,"textDocument"),"references").dynamicRegistration=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.referencesProvider);n&&this.register({id:s.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t=e.documentSelector,n={provideReferences:(e,t,n,i)=>{const r=this._client,s=(e,t,n,i)=>r.sendRequest(o.ReferencesRequest.type,r.code2ProtocolConverter.asReferenceParams(e,t,n),i).then((e=>i.isCancellationRequested?null:r.protocol2CodeConverter.asReferences(e,i)),(e=>r.handleFailedRequest(o.ReferencesRequest.type,i,e,null))),a=r.middleware;return a.provideReferences?a.provideReferences(e,t,n,i,s):s(e,t,n,i)}};return[this.registerProvider(t,n),n]}registerProvider(e,t){return i.languages.registerReferenceProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}}t.ReferencesFeature=a},2865:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RenameFeature=void 0;const i=n(9496),o=n(5968),r=n(7435),s=n(2116),a=n(497);class c extends a.TextDocumentLanguageFeature{constructor(e){super(e,o.RenameRequest.type)}fillClientCapabilities(e){let t=(0,a.ensure)((0,a.ensure)(e,"textDocument"),"rename");t.dynamicRegistration=!0,t.prepareSupport=!0,t.prepareSupportDefaultBehavior=o.PrepareSupportDefaultBehavior.Identifier,t.honorsChangeAnnotations=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.renameProvider);n&&(s.boolean(e.renameProvider)&&(n.prepareProvider=!1),this.register({id:r.generateUuid(),registerOptions:n}))}registerLanguageProvider(e){const t=e.documentSelector,n={provideRenameEdits:(e,t,n,i)=>{const r=this._client,s=(e,t,n,i)=>{let s={textDocument:r.code2ProtocolConverter.asTextDocumentIdentifier(e),position:r.code2ProtocolConverter.asPosition(t),newName:n};return r.sendRequest(o.RenameRequest.type,s,i).then((e=>i.isCancellationRequested?null:r.protocol2CodeConverter.asWorkspaceEdit(e,i)),(e=>r.handleFailedRequest(o.RenameRequest.type,i,e,null,!1)))},a=r.middleware;return a.provideRenameEdits?a.provideRenameEdits(e,t,n,i,s):s(e,t,n,i)},prepareRename:e.prepareProvider?(e,t,n)=>{const i=this._client,r=(e,t,n)=>{let r={textDocument:i.code2ProtocolConverter.asTextDocumentIdentifier(e),position:i.code2ProtocolConverter.asPosition(t)};return i.sendRequest(o.PrepareRenameRequest.type,r,n).then((e=>n.isCancellationRequested?null:o.Range.is(e)?i.protocol2CodeConverter.asRange(e):this.isDefaultBehavior(e)?!0===e.defaultBehavior?null:Promise.reject(new Error("The element can't be renamed.")):e&&o.Range.is(e.range)?{range:i.protocol2CodeConverter.asRange(e.range),placeholder:e.placeholder}:Promise.reject(new Error("The element can't be renamed."))),(e=>{throw"string"==typeof e.message?new Error(e.message):new Error("The element can't be renamed.")}))},s=i.middleware;return s.prepareRename?s.prepareRename(e,t,n,r):r(e,t,n)}:void 0};return[this.registerProvider(t,n),n]}registerProvider(e,t){return i.languages.registerRenameProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}isDefaultBehavior(e){const t=e;return t&&s.boolean(t.defaultBehavior)}}t.RenameFeature=c},9314:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SelectionRangeFeature=void 0;const i=n(9496),o=n(5968),r=n(497);class s extends r.TextDocumentLanguageFeature{constructor(e){super(e,o.SelectionRangeRequest.type)}fillClientCapabilities(e){(0,r.ensure)((0,r.ensure)(e,"textDocument"),"selectionRange").dynamicRegistration=!0}initialize(e,t){const[n,i]=this.getRegistration(t,e.selectionRangeProvider);n&&i&&this.register({id:n,registerOptions:i})}registerLanguageProvider(e){const t=e.documentSelector,n={provideSelectionRanges:(e,t,n)=>{const i=this._client,r=async(e,t,n)=>{const r={textDocument:i.code2ProtocolConverter.asTextDocumentIdentifier(e),positions:i.code2ProtocolConverter.asPositionsSync(t,n)};return i.sendRequest(o.SelectionRangeRequest.type,r,n).then((e=>n.isCancellationRequested?null:i.protocol2CodeConverter.asSelectionRanges(e,n)),(e=>i.handleFailedRequest(o.SelectionRangeRequest.type,n,e,null)))},s=i.middleware;return s.provideSelectionRanges?s.provideSelectionRanges(e,t,n,r):r(e,t,n)}};return[this.registerProvider(t,n),n]}registerProvider(e,t){return i.languages.registerSelectionRangeProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}}t.SelectionRangeFeature=s},1845:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SemanticTokensFeature=void 0;const i=n(9496),o=n(5968),r=n(497),s=n(2116);class a extends r.TextDocumentLanguageFeature{constructor(e){super(e,o.SemanticTokensRegistrationType.type)}fillClientCapabilities(e){const t=(0,r.ensure)((0,r.ensure)(e,"textDocument"),"semanticTokens");t.dynamicRegistration=!0,t.tokenTypes=[o.SemanticTokenTypes.namespace,o.SemanticTokenTypes.type,o.SemanticTokenTypes.class,o.SemanticTokenTypes.enum,o.SemanticTokenTypes.interface,o.SemanticTokenTypes.struct,o.SemanticTokenTypes.typeParameter,o.SemanticTokenTypes.parameter,o.SemanticTokenTypes.variable,o.SemanticTokenTypes.property,o.SemanticTokenTypes.enumMember,o.SemanticTokenTypes.event,o.SemanticTokenTypes.function,o.SemanticTokenTypes.method,o.SemanticTokenTypes.macro,o.SemanticTokenTypes.keyword,o.SemanticTokenTypes.modifier,o.SemanticTokenTypes.comment,o.SemanticTokenTypes.string,o.SemanticTokenTypes.number,o.SemanticTokenTypes.regexp,o.SemanticTokenTypes.operator,o.SemanticTokenTypes.decorator],t.tokenModifiers=[o.SemanticTokenModifiers.declaration,o.SemanticTokenModifiers.definition,o.SemanticTokenModifiers.readonly,o.SemanticTokenModifiers.static,o.SemanticTokenModifiers.deprecated,o.SemanticTokenModifiers.abstract,o.SemanticTokenModifiers.async,o.SemanticTokenModifiers.modification,o.SemanticTokenModifiers.documentation,o.SemanticTokenModifiers.defaultLibrary],t.formats=[o.TokenFormat.Relative],t.requests={range:!0,full:{delta:!0}},t.multilineTokenSupport=!1,t.overlappingTokenSupport=!1,t.serverCancelSupport=!0,t.augmentsSyntaxTokens=!0,(0,r.ensure)((0,r.ensure)(e,"workspace"),"semanticTokens").refreshSupport=!0}initialize(e,t){this._client.onRequest(o.SemanticTokensRefreshRequest.type,(async()=>{for(const e of this.getAllProviders())e.onDidChangeSemanticTokensEmitter.fire()}));const[n,i]=this.getRegistration(t,e.semanticTokensProvider);n&&i&&this.register({id:n,registerOptions:i})}registerLanguageProvider(e){const t=e.documentSelector,n=s.boolean(e.full)?e.full:void 0!==e.full,r=void 0!==e.full&&"boolean"!=typeof e.full&&!0===e.full.delta,a=new i.EventEmitter,c=n?{onDidChangeSemanticTokens:a.event,provideDocumentSemanticTokens:(e,t)=>{const n=this._client,i=n.middleware,r=(e,t)=>{const i={textDocument:n.code2ProtocolConverter.asTextDocumentIdentifier(e)};return n.sendRequest(o.SemanticTokensRequest.type,i,t).then((e=>t.isCancellationRequested?null:n.protocol2CodeConverter.asSemanticTokens(e,t)),(e=>n.handleFailedRequest(o.SemanticTokensRequest.type,t,e,null)))};return i.provideDocumentSemanticTokens?i.provideDocumentSemanticTokens(e,t,r):r(e,t)},provideDocumentSemanticTokensEdits:r?(e,t,n)=>{const i=this._client,r=i.middleware,s=(e,t,n)=>{const r={textDocument:i.code2ProtocolConverter.asTextDocumentIdentifier(e),previousResultId:t};return i.sendRequest(o.SemanticTokensDeltaRequest.type,r,n).then((async e=>n.isCancellationRequested?null:o.SemanticTokens.is(e)?await i.protocol2CodeConverter.asSemanticTokens(e,n):await i.protocol2CodeConverter.asSemanticTokensEdits(e,n)),(e=>i.handleFailedRequest(o.SemanticTokensDeltaRequest.type,n,e,null)))};return r.provideDocumentSemanticTokensEdits?r.provideDocumentSemanticTokensEdits(e,t,n,s):s(e,t,n)}:void 0}:void 0,u=!0===e.range?{provideDocumentRangeSemanticTokens:(e,t,n)=>{const i=this._client,r=i.middleware,s=(e,t,n)=>{const r={textDocument:i.code2ProtocolConverter.asTextDocumentIdentifier(e),range:i.code2ProtocolConverter.asRange(t)};return i.sendRequest(o.SemanticTokensRangeRequest.type,r,n).then((e=>n.isCancellationRequested?null:i.protocol2CodeConverter.asSemanticTokens(e,n)),(e=>i.handleFailedRequest(o.SemanticTokensRangeRequest.type,n,e,null)))};return r.provideDocumentRangeSemanticTokens?r.provideDocumentRangeSemanticTokens(e,t,n,s):s(e,t,n)}}:void 0,l=[],d=this._client,h=d.protocol2CodeConverter.asSemanticTokensLegend(e.legend),g=d.protocol2CodeConverter.asDocumentSelector(t);return void 0!==c&&l.push(i.languages.registerDocumentSemanticTokensProvider(g,c,h)),void 0!==u&&l.push(i.languages.registerDocumentRangeSemanticTokensProvider(g,u,h)),[new i.Disposable((()=>l.forEach((e=>e.dispose())))),{range:u,full:c,onDidChangeSemanticTokensEmitter:a}]}}t.SemanticTokensFeature=a},1432:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SignatureHelpFeature=void 0;const i=n(9496),o=n(5968),r=n(497),s=n(7435);class a extends r.TextDocumentLanguageFeature{constructor(e){super(e,o.SignatureHelpRequest.type)}fillClientCapabilities(e){let t=(0,r.ensure)((0,r.ensure)(e,"textDocument"),"signatureHelp");t.dynamicRegistration=!0,t.signatureInformation={documentationFormat:[o.MarkupKind.Markdown,o.MarkupKind.PlainText]},t.signatureInformation.parameterInformation={labelOffsetSupport:!0},t.signatureInformation.activeParameterSupport=!0,t.contextSupport=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.signatureHelpProvider);n&&this.register({id:s.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t={provideSignatureHelp:(e,t,n,i)=>{const r=this._client,s=(e,t,n,i)=>r.sendRequest(o.SignatureHelpRequest.type,r.code2ProtocolConverter.asSignatureHelpParams(e,t,n),i).then((e=>i.isCancellationRequested?null:r.protocol2CodeConverter.asSignatureHelp(e,i)),(e=>r.handleFailedRequest(o.SignatureHelpRequest.type,i,e,null))),a=r.middleware;return a.provideSignatureHelp?a.provideSignatureHelp(e,t,i,n,s):s(e,t,i,n)}};return[this.registerProvider(e,t),t]}registerProvider(e,t){const n=this._client.protocol2CodeConverter.asDocumentSelector(e.documentSelector);if(void 0===e.retriggerCharacters){const o=e.triggerCharacters||[];return i.languages.registerSignatureHelpProvider(n,t,...o)}{const o={triggerCharacters:e.triggerCharacters||[],retriggerCharacters:e.retriggerCharacters||[]};return i.languages.registerSignatureHelpProvider(n,t,o)}}}t.SignatureHelpFeature=a},5610:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DidSaveTextDocumentFeature=t.WillSaveWaitUntilFeature=t.WillSaveFeature=t.DidChangeTextDocumentFeature=t.DidCloseTextDocumentFeature=t.DidOpenTextDocumentFeature=void 0;const i=n(9496),o=n(5968),r=n(497),s=n(7435);class a extends r.TextDocumentEventFeature{constructor(e,t){super(e,i.workspace.onDidOpenTextDocument,o.DidOpenTextDocumentNotification.type,(()=>e.middleware.didOpen),(t=>e.code2ProtocolConverter.asOpenTextDocumentParams(t)),(e=>e),r.TextDocumentEventFeature.textDocumentFilter),this._syncedDocuments=t}get openDocuments(){return this._syncedDocuments.values()}fillClientCapabilities(e){(0,r.ensure)((0,r.ensure)(e,"textDocument"),"synchronization").dynamicRegistration=!0}initialize(e,t){const n=e.resolvedTextDocumentSync;t&&n&&n.openClose&&this.register({id:s.generateUuid(),registerOptions:{documentSelector:t}})}get registrationType(){return o.DidOpenTextDocumentNotification.type}register(e){if(super.register(e),!e.registerOptions.documentSelector)return;const t=this._client.protocol2CodeConverter.asDocumentSelector(e.registerOptions.documentSelector);i.workspace.textDocuments.forEach((e=>{const n=e.uri.toString();if(!this._syncedDocuments.has(n)&&i.languages.match(t,e)>0&&!this._client.hasDedicatedTextSynchronizationFeature(e)){const t=this._client.middleware,i=e=>this._client.sendNotification(this._type,this._createParams(e));(t.didOpen?t.didOpen(e,i):i(e)).catch((e=>{this._client.error(`Sending document notification ${this._type.method} failed`,e)})),this._syncedDocuments.set(n,e)}}))}getTextDocument(e){return e}notificationSent(e,t,n){this._syncedDocuments.set(e.uri.toString(),e),super.notificationSent(e,t,n)}}t.DidOpenTextDocumentFeature=a;class c extends r.TextDocumentEventFeature{constructor(e,t,n){super(e,i.workspace.onDidCloseTextDocument,o.DidCloseTextDocumentNotification.type,(()=>e.middleware.didClose),(t=>e.code2ProtocolConverter.asCloseTextDocumentParams(t)),(e=>e),r.TextDocumentEventFeature.textDocumentFilter),this._syncedDocuments=t,this._pendingTextDocumentChanges=n}get registrationType(){return o.DidCloseTextDocumentNotification.type}fillClientCapabilities(e){(0,r.ensure)((0,r.ensure)(e,"textDocument"),"synchronization").dynamicRegistration=!0}initialize(e,t){let n=e.resolvedTextDocumentSync;t&&n&&n.openClose&&this.register({id:s.generateUuid(),registerOptions:{documentSelector:t}})}async callback(e){await super.callback(e),this._pendingTextDocumentChanges.delete(e.uri.toString())}getTextDocument(e){return e}notificationSent(e,t,n){this._syncedDocuments.delete(e.uri.toString()),super.notificationSent(e,t,n)}unregister(e){const t=this._selectors.get(e);super.unregister(e);const n=this._selectors.values();this._syncedDocuments.forEach((e=>{if(i.languages.match(t,e)>0&&!this._selectorFilter(n,e)&&!this._client.hasDedicatedTextSynchronizationFeature(e)){let t=this._client.middleware,n=e=>this._client.sendNotification(this._type,this._createParams(e));this._syncedDocuments.delete(e.uri.toString()),(t.didClose?t.didClose(e,n):n(e)).catch((e=>{this._client.error(`Sending document notification ${this._type.method} failed`,e)}))}}))}}t.DidCloseTextDocumentFeature=c;class u extends r.DynamicDocumentFeature{constructor(e,t){super(e),this._changeData=new Map,this._onNotificationSent=new i.EventEmitter,this._onPendingChangeAdded=new i.EventEmitter,this._pendingTextDocumentChanges=t,this._syncKind=o.TextDocumentSyncKind.None}get onNotificationSent(){return this._onNotificationSent.event}get onPendingChangeAdded(){return this._onPendingChangeAdded.event}get syncKind(){return this._syncKind}get registrationType(){return o.DidChangeTextDocumentNotification.type}fillClientCapabilities(e){(0,r.ensure)((0,r.ensure)(e,"textDocument"),"synchronization").dynamicRegistration=!0}initialize(e,t){let n=e.resolvedTextDocumentSync;t&&n&&void 0!==n.change&&n.change!==o.TextDocumentSyncKind.None&&this.register({id:s.generateUuid(),registerOptions:Object.assign({},{documentSelector:t},{syncKind:n.change})})}register(e){e.registerOptions.documentSelector&&(this._listener||(this._listener=i.workspace.onDidChangeTextDocument(this.callback,this)),this._changeData.set(e.id,{syncKind:e.registerOptions.syncKind,documentSelector:this._client.protocol2CodeConverter.asDocumentSelector(e.registerOptions.documentSelector)}),this.updateSyncKind(e.registerOptions.syncKind))}*getDocumentSelectors(){for(const e of this._changeData.values())yield e.documentSelector}async callback(e){if(0===e.contentChanges.length)return;const t=e.document.uri,n=e.document.version,r=[];for(const s of this._changeData.values())if(i.languages.match(s.documentSelector,e.document)>0&&!this._client.hasDedicatedTextSynchronizationFeature(e.document)){const i=this._client.middleware;if(s.syncKind===o.TextDocumentSyncKind.Incremental){const s=async e=>{const i=this._client.code2ProtocolConverter.asChangeTextDocumentParams(e,t,n);await this._client.sendNotification(o.DidChangeTextDocumentNotification.type,i),this.notificationSent(e.document,o.DidChangeTextDocumentNotification.type,i)};r.push(i.didChange?i.didChange(e,(e=>s(e))):s(e))}else if(s.syncKind===o.TextDocumentSyncKind.Full){const t=async e=>{const t=e.document.uri.toString();this._pendingTextDocumentChanges.set(t,e.document),this._onPendingChangeAdded.fire()};r.push(i.didChange?i.didChange(e,(e=>t(e))):t(e))}}return Promise.all(r).then(void 0,(e=>{throw this._client.error(`Sending document notification ${o.DidChangeTextDocumentNotification.type.method} failed`,e),e}))}notificationSent(e,t,n){this._onNotificationSent.fire({textDocument:e,type:t,params:n})}unregister(e){if(this._changeData.delete(e),0===this._changeData.size)this._listener&&(this._listener.dispose(),this._listener=void 0),this._syncKind=o.TextDocumentSyncKind.None;else{this._syncKind=o.TextDocumentSyncKind.None;for(const e of this._changeData.values())if(this.updateSyncKind(e.syncKind),this._syncKind===o.TextDocumentSyncKind.Full)break}}clear(){this._pendingTextDocumentChanges.clear(),this._changeData.clear(),this._syncKind=o.TextDocumentSyncKind.None,this._listener&&(this._listener.dispose(),this._listener=void 0)}getPendingDocumentChanges(e){if(0===this._pendingTextDocumentChanges.size)return[];let t;if(0===e.size)t=Array.from(this._pendingTextDocumentChanges.values()),this._pendingTextDocumentChanges.clear();else{t=[];for(const n of this._pendingTextDocumentChanges)e.has(n[0])||(t.push(n[1]),this._pendingTextDocumentChanges.delete(n[0]))}return t}getProvider(e){for(const t of this._changeData.values())if(i.languages.match(t.documentSelector,e)>0)return{send:e=>this.callback(e)}}updateSyncKind(e){if(this._syncKind!==o.TextDocumentSyncKind.Full)switch(e){case o.TextDocumentSyncKind.Full:this._syncKind=e;break;case o.TextDocumentSyncKind.Incremental:this._syncKind===o.TextDocumentSyncKind.None&&(this._syncKind=o.TextDocumentSyncKind.Incremental)}}}t.DidChangeTextDocumentFeature=u;class l extends r.TextDocumentEventFeature{constructor(e){super(e,i.workspace.onWillSaveTextDocument,o.WillSaveTextDocumentNotification.type,(()=>e.middleware.willSave),(t=>e.code2ProtocolConverter.asWillSaveTextDocumentParams(t)),(e=>e.document),((e,t)=>r.TextDocumentEventFeature.textDocumentFilter(e,t.document)))}get registrationType(){return o.WillSaveTextDocumentNotification.type}fillClientCapabilities(e){(0,r.ensure)((0,r.ensure)(e,"textDocument"),"synchronization").willSave=!0}initialize(e,t){let n=e.resolvedTextDocumentSync;t&&n&&n.willSave&&this.register({id:s.generateUuid(),registerOptions:{documentSelector:t}})}getTextDocument(e){return e.document}}t.WillSaveFeature=l;class d extends r.DynamicDocumentFeature{constructor(e){super(e),this._selectors=new Map}getDocumentSelectors(){return this._selectors.values()}get registrationType(){return o.WillSaveTextDocumentWaitUntilRequest.type}fillClientCapabilities(e){(0,r.ensure)((0,r.ensure)(e,"textDocument"),"synchronization").willSaveWaitUntil=!0}initialize(e,t){let n=e.resolvedTextDocumentSync;t&&n&&n.willSaveWaitUntil&&this.register({id:s.generateUuid(),registerOptions:{documentSelector:t}})}register(e){e.registerOptions.documentSelector&&(this._listener||(this._listener=i.workspace.onWillSaveTextDocument(this.callback,this)),this._selectors.set(e.id,this._client.protocol2CodeConverter.asDocumentSelector(e.registerOptions.documentSelector)))}callback(e){if(r.TextDocumentEventFeature.textDocumentFilter(this._selectors.values(),e.document)&&!this._client.hasDedicatedTextSynchronizationFeature(e.document)){let t=this._client.middleware,n=e=>this._client.sendRequest(o.WillSaveTextDocumentWaitUntilRequest.type,this._client.code2ProtocolConverter.asWillSaveTextDocumentParams(e)).then((async e=>{let t=await this._client.protocol2CodeConverter.asTextEdits(e);return void 0===t?[]:t}));e.waitUntil(t.willSaveWaitUntil?t.willSaveWaitUntil(e,n):n(e))}}unregister(e){this._selectors.delete(e),0===this._selectors.size&&this._listener&&(this._listener.dispose(),this._listener=void 0)}clear(){this._selectors.clear(),this._listener&&(this._listener.dispose(),this._listener=void 0)}}t.WillSaveWaitUntilFeature=d;class h extends r.TextDocumentEventFeature{constructor(e){super(e,i.workspace.onDidSaveTextDocument,o.DidSaveTextDocumentNotification.type,(()=>e.middleware.didSave),(t=>e.code2ProtocolConverter.asSaveTextDocumentParams(t,this._includeText)),(e=>e),r.TextDocumentEventFeature.textDocumentFilter),this._includeText=!1}get registrationType(){return o.DidSaveTextDocumentNotification.type}fillClientCapabilities(e){(0,r.ensure)((0,r.ensure)(e,"textDocument"),"synchronization").didSave=!0}initialize(e,t){const n=e.resolvedTextDocumentSync;if(t&&n&&n.save){const e="boolean"==typeof n.save?{includeText:!1}:{includeText:!!n.save.includeText};this.register({id:s.generateUuid(),registerOptions:Object.assign({},{documentSelector:t},e)})}}register(e){this._includeText=!!e.registerOptions.includeText,super.register(e)}getTextDocument(e){return e}}t.DidSaveTextDocumentFeature=h},7201:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeDefinitionFeature=void 0;const i=n(9496),o=n(5968),r=n(497);class s extends r.TextDocumentLanguageFeature{constructor(e){super(e,o.TypeDefinitionRequest.type)}fillClientCapabilities(e){(0,r.ensure)((0,r.ensure)(e,"textDocument"),"typeDefinition").dynamicRegistration=!0;let t=(0,r.ensure)((0,r.ensure)(e,"textDocument"),"typeDefinition");t.dynamicRegistration=!0,t.linkSupport=!0}initialize(e,t){let[n,i]=this.getRegistration(t,e.typeDefinitionProvider);n&&i&&this.register({id:n,registerOptions:i})}registerLanguageProvider(e){const t=e.documentSelector,n={provideTypeDefinition:(e,t,n)=>{const i=this._client,r=(e,t,n)=>i.sendRequest(o.TypeDefinitionRequest.type,i.code2ProtocolConverter.asTextDocumentPositionParams(e,t),n).then((e=>n.isCancellationRequested?null:i.protocol2CodeConverter.asDefinitionResult(e,n)),(e=>i.handleFailedRequest(o.TypeDefinitionRequest.type,n,e,null))),s=i.middleware;return s.provideTypeDefinition?s.provideTypeDefinition(e,t,n,r):r(e,t,n)}};return[this.registerProvider(t,n),n]}registerProvider(e,t){return i.languages.registerTypeDefinitionProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}}t.TypeDefinitionFeature=s},4042:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeHierarchyFeature=void 0;const i=n(9496),o=n(5968),r=n(497);class s{constructor(e){this.client=e,this.middleware=e.middleware}prepareTypeHierarchy(e,t,n){const i=this.client,r=this.middleware,s=(e,t,n)=>{const r=i.code2ProtocolConverter.asTextDocumentPositionParams(e,t);return i.sendRequest(o.TypeHierarchyPrepareRequest.type,r,n).then((e=>n.isCancellationRequested?null:i.protocol2CodeConverter.asTypeHierarchyItems(e,n)),(e=>i.handleFailedRequest(o.TypeHierarchyPrepareRequest.type,n,e,null)))};return r.prepareTypeHierarchy?r.prepareTypeHierarchy(e,t,n,s):s(e,t,n)}provideTypeHierarchySupertypes(e,t){const n=this.client,i=this.middleware,r=(e,t)=>{const i={item:n.code2ProtocolConverter.asTypeHierarchyItem(e)};return n.sendRequest(o.TypeHierarchySupertypesRequest.type,i,t).then((e=>t.isCancellationRequested?null:n.protocol2CodeConverter.asTypeHierarchyItems(e,t)),(e=>n.handleFailedRequest(o.TypeHierarchySupertypesRequest.type,t,e,null)))};return i.provideTypeHierarchySupertypes?i.provideTypeHierarchySupertypes(e,t,r):r(e,t)}provideTypeHierarchySubtypes(e,t){const n=this.client,i=this.middleware,r=(e,t)=>{const i={item:n.code2ProtocolConverter.asTypeHierarchyItem(e)};return n.sendRequest(o.TypeHierarchySubtypesRequest.type,i,t).then((e=>t.isCancellationRequested?null:n.protocol2CodeConverter.asTypeHierarchyItems(e,t)),(e=>n.handleFailedRequest(o.TypeHierarchySubtypesRequest.type,t,e,null)))};return i.provideTypeHierarchySubtypes?i.provideTypeHierarchySubtypes(e,t,r):r(e,t)}}class a extends r.TextDocumentLanguageFeature{constructor(e){super(e,o.TypeHierarchyPrepareRequest.type)}fillClientCapabilities(e){(0,r.ensure)((0,r.ensure)(e,"textDocument"),"typeHierarchy").dynamicRegistration=!0}initialize(e,t){const[n,i]=this.getRegistration(t,e.typeHierarchyProvider);n&&i&&this.register({id:n,registerOptions:i})}registerLanguageProvider(e){const t=this._client,n=new s(t);return[i.languages.registerTypeHierarchyProvider(t.protocol2CodeConverter.asDocumentSelector(e.documentSelector),n),n]}}t.TypeHierarchyFeature=a},8005:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.forEach=t.mapAsync=t.map=t.clearTestMode=t.setTestMode=t.Semaphore=t.Delayer=void 0;const i=n(5968);t.Delayer=class{constructor(e){this.defaultDelay=e,this.timeout=void 0,this.completionPromise=void 0,this.onSuccess=void 0,this.task=void 0}trigger(e,t=this.defaultDelay){return this.task=e,t>=0&&this.cancelTimeout(),this.completionPromise||(this.completionPromise=new Promise((e=>{this.onSuccess=e})).then((()=>{this.completionPromise=void 0,this.onSuccess=void 0;var e=this.task();return this.task=void 0,e}))),(t>=0||void 0===this.timeout)&&(this.timeout=(0,i.RAL)().timer.setTimeout((()=>{this.timeout=void 0,this.onSuccess(void 0)}),t>=0?t:this.defaultDelay)),this.completionPromise}forceDelivery(){if(!this.completionPromise)return;this.cancelTimeout();let e=this.task();return this.completionPromise=void 0,this.onSuccess=void 0,this.task=void 0,e}isTriggered(){return void 0!==this.timeout}cancel(){this.cancelTimeout(),this.completionPromise=void 0}cancelTimeout(){void 0!==this.timeout&&(this.timeout.dispose(),this.timeout=void 0)}},t.Semaphore=class{constructor(e=1){if(e<=0)throw new Error("Capacity must be greater than 0");this._capacity=e,this._active=0,this._waiting=[]}lock(e){return new Promise(((t,n)=>{this._waiting.push({thunk:e,resolve:t,reject:n}),this.runNext()}))}get active(){return this._active}runNext(){0!==this._waiting.length&&this._active!==this._capacity&&(0,i.RAL)().timer.setImmediate((()=>this.doRunNext()))}doRunNext(){if(0===this._waiting.length||this._active===this._capacity)return;const e=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("To many thunks active");try{const t=e.thunk();t instanceof Promise?t.then((t=>{this._active--,e.resolve(t),this.runNext()}),(t=>{this._active--,e.reject(t),this.runNext()})):(this._active--,e.resolve(t),this.runNext())}catch(t){this._active--,e.reject(t),this.runNext()}}};let o=!1;t.setTestMode=function(){o=!0},t.clearTestMode=function(){o=!1};class r{constructor(e=15){this.yieldAfter=!0===o?Math.max(e,2):Math.max(e,15),this.startTime=Date.now(),this.counter=0,this.total=0,this.counterInterval=1}start(){this.counter=0,this.total=0,this.counterInterval=1,this.startTime=Date.now()}shouldYield(){if(++this.counter>=this.counterInterval){const e=Date.now()-this.startTime,t=Math.max(0,this.yieldAfter-e);if(this.total+=this.counter,this.counter=0,e>=this.yieldAfter||t<=1)return this.counterInterval=1,this.total=0,!0;switch(e){case 0:case 1:this.counterInterval=2*this.total}}return!1}}t.map=async function(e,t,n,o){if(0===e.length)return[];const s=new Array(e.length),a=new r(o?.yieldAfter);function c(n){a.start();for(let i=n;i<e.length;i++)if(s[i]=t(e[i]),a.shouldYield())return o?.yieldCallback&&o.yieldCallback(),i+1;return-1}let u=c(0);for(;-1!==u&&(void 0===n||!n.isCancellationRequested);)u=await new Promise((e=>{(0,i.RAL)().timer.setImmediate((()=>{e(c(u))}))}));return s},t.mapAsync=async function(e,t,n,o){if(0===e.length)return[];const s=new Array(e.length),a=new r(o?.yieldAfter);async function c(i){a.start();for(let r=i;r<e.length;r++)if(s[r]=await t(e[r],n),a.shouldYield())return o?.yieldCallback&&o.yieldCallback(),r+1;return-1}let u=await c(0);for(;-1!==u&&(void 0===n||!n.isCancellationRequested);)u=await new Promise((e=>{(0,i.RAL)().timer.setImmediate((()=>{e(c(u))}))}));return s},t.forEach=async function(e,t,n,o){if(0===e.length)return;const s=new r(o?.yieldAfter);function a(n){s.start();for(let i=n;i<e.length;i++)if(t(e[i]),s.shouldYield())return o?.yieldCallback&&o.yieldCallback(),i+1;return-1}let c=a(0);for(;-1!==c&&(void 0===n||!n.isCancellationRequested);)c=await new Promise((e=>{(0,i.RAL)().timer.setImmediate((()=>{e(a(c))}))}))}},2116:(e,t)=>{"use strict";function n(e){return"string"==typeof e||e instanceof String}function i(e){return"function"==typeof e}function o(e){return Array.isArray(e)}function r(e){return e&&i(e.then)}Object.defineProperty(t,"__esModule",{value:!0}),t.asPromise=t.thenable=t.typedArray=t.stringArray=t.array=t.func=t.error=t.number=t.string=t.boolean=void 0,t.boolean=function(e){return!0===e||!1===e},t.string=n,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=i,t.array=o,t.stringArray=function(e){return o(e)&&e.every((e=>n(e)))},t.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)},t.thenable=r,t.asPromise=function(e){return e instanceof Promise?e:r(e)?new Promise(((t,n)=>{e.then((e=>t(e)),(e=>n(e)))})):Promise.resolve(e)}},7435:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateUuid=t.parse=t.isUUID=t.v4=t.empty=void 0;class n{constructor(e){this._value=e}asHex(){return this._value}equals(e){return this.asHex()===e.asHex()}}class i extends n{static _oneOf(e){return e[Math.floor(e.length*Math.random())]}static _randomHex(){return i._oneOf(i._chars)}constructor(){super([i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),"-",i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),"-","4",i._randomHex(),i._randomHex(),i._randomHex(),"-",i._oneOf(i._timeHighBits),i._randomHex(),i._randomHex(),i._randomHex(),"-",i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex()].join(""))}}function o(){return new i}i._chars=["0","1","2","3","4","5","6","6","7","8","9","a","b","c","d","e","f"],i._timeHighBits=["8","9","a","b"],t.empty=new n("00000000-0000-0000-0000-000000000000"),t.v4=o;const r=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function s(e){return r.test(e)}t.isUUID=s,t.parse=function(e){if(!s(e))throw new Error("invalid uuid");return new n(e)},t.generateUuid=function(){return o().asHex()}},5828:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceFoldersFeature=t.arrayDiff=void 0;const i=n(7435),o=n(9496),r=n(5968);function s(e,t){if(null!=e)return e[t]}function a(e,t){return e.filter((e=>t.indexOf(e)<0))}t.arrayDiff=a,t.WorkspaceFoldersFeature=class{constructor(e){this._client=e,this._listeners=new Map}getState(){return{kind:"workspace",id:this.registrationType.method,registrations:this._listeners.size>0}}get registrationType(){return r.DidChangeWorkspaceFoldersNotification.type}fillInitializeParams(e){const t=o.workspace.workspaceFolders;this.initializeWithFolders(t),e.workspaceFolders=void 0===t?null:t.map((e=>this.asProtocol(e)))}initializeWithFolders(e){this._initialFolders=e}fillClientCapabilities(e){e.workspace=e.workspace||{},e.workspace.workspaceFolders=!0}initialize(e){const t=this._client;t.onRequest(r.WorkspaceFoldersRequest.type,(e=>{const n=()=>{const e=o.workspace.workspaceFolders;return void 0===e?null:e.map((e=>this.asProtocol(e)))},i=t.middleware.workspace;return i&&i.workspaceFolders?i.workspaceFolders(e,n):n()}));const n=s(s(s(e,"workspace"),"workspaceFolders"),"changeNotifications");let a;"string"==typeof n?a=n:!0===n&&(a=i.generateUuid()),a&&this.register({id:a,registerOptions:void 0})}sendInitialEvent(e){let t;if(this._initialFolders&&e){const n=a(this._initialFolders,e),i=a(e,this._initialFolders);(i.length>0||n.length>0)&&(t=this.doSendEvent(i,n))}else this._initialFolders?t=this.doSendEvent([],this._initialFolders):e&&(t=this.doSendEvent(e,[]));void 0!==t&&t.catch((e=>{this._client.error(`Sending notification ${r.DidChangeWorkspaceFoldersNotification.type.method} failed`,e)}))}doSendEvent(e,t){let n={event:{added:e.map((e=>this.asProtocol(e))),removed:t.map((e=>this.asProtocol(e)))}};return this._client.sendNotification(r.DidChangeWorkspaceFoldersNotification.type,n)}register(e){let t=e.id,n=this._client,i=o.workspace.onDidChangeWorkspaceFolders((e=>{let t=e=>this.doSendEvent(e.added,e.removed),i=n.middleware.workspace;(i&&i.didChangeWorkspaceFolders?i.didChangeWorkspaceFolders(e,t):t(e)).catch((e=>{this._client.error(`Sending notification ${r.DidChangeWorkspaceFoldersNotification.type.method} failed`,e)}))}));this._listeners.set(t,i),this.sendInitialEvent(o.workspace.workspaceFolders)}unregister(e){let t=this._listeners.get(e);void 0!==t&&(this._listeners.delete(e),t.dispose())}clear(){for(let e of this._listeners.values())e.dispose();this._listeners.clear()}asProtocol(e){return void 0===e?null:{uri:this._client.code2ProtocolConverter.asUri(e.uri),name:e.name}}}},8447:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceSymbolFeature=void 0;const i=n(9496),o=n(5968),r=n(497),s=n(1690),a=n(7435);class c extends r.WorkspaceFeature{constructor(e){super(e,o.WorkspaceSymbolRequest.type)}fillClientCapabilities(e){let t=(0,r.ensure)((0,r.ensure)(e,"workspace"),"symbol");t.dynamicRegistration=!0,t.symbolKind={valueSet:s.SupportedSymbolKinds},t.tagSupport={valueSet:s.SupportedSymbolTags},t.resolveSupport={properties:["location.range"]}}initialize(e){e.workspaceSymbolProvider&&this.register({id:a.generateUuid(),registerOptions:!0===e.workspaceSymbolProvider?{workDoneProgress:!1}:e.workspaceSymbolProvider})}registerLanguageProvider(e){const t={provideWorkspaceSymbols:(e,t)=>{const n=this._client,i=(e,t)=>n.sendRequest(o.WorkspaceSymbolRequest.type,{query:e},t).then((e=>t.isCancellationRequested?null:n.protocol2CodeConverter.asSymbolInformations(e,t)),(e=>n.handleFailedRequest(o.WorkspaceSymbolRequest.type,t,e,null))),r=n.middleware;return r.provideWorkspaceSymbols?r.provideWorkspaceSymbols(e,t,i):i(e,t)},resolveWorkspaceSymbol:!0===e.resolveProvider?(e,t)=>{const n=this._client,i=(e,t)=>n.sendRequest(o.WorkspaceSymbolResolveRequest.type,n.code2ProtocolConverter.asWorkspaceSymbol(e),t).then((e=>t.isCancellationRequested?null:n.protocol2CodeConverter.asSymbolInformation(e)),(e=>n.handleFailedRequest(o.WorkspaceSymbolResolveRequest.type,t,e,null))),r=n.middleware;return r.resolveWorkspaceSymbol?r.resolveWorkspaceSymbol(e,t,i):i(e,t)}:void 0};return[i.languages.registerWorkspaceSymbolProvider(t),t]}}t.WorkspaceSymbolFeature=c},9351:(e,t,n)=>{"use strict";e.exports=n(5968)},5968:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.createProtocolConnection=void 0;const r=n(9838);o(n(9838),t),o(n(559),t),t.createProtocolConnection=function(e,t,n,i){return(0,r.createMessageConnection)(e,t,n,i)}},559:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.LSPErrorCodes=t.createProtocolConnection=void 0,o(n(9406),t),o(n(1516),t),o(n(4742),t),o(n(7304),t);var r,s=n(7558);Object.defineProperty(t,"createProtocolConnection",{enumerable:!0,get:function(){return s.createProtocolConnection}}),function(e){e.lspReservedErrorRangeStart=-32899,e.RequestFailed=-32803,e.ServerCancelled=-32802,e.ContentModified=-32801,e.RequestCancelled=-32800,e.lspReservedErrorRangeEnd=-32800}(r||(t.LSPErrorCodes=r={}))},7558:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createProtocolConnection=void 0;const i=n(9406);t.createProtocolConnection=function(e,t,n,o){return i.ConnectionStrategy.is(o)&&(o={connectionStrategy:o}),(0,i.createMessageConnection)(e,t,n,o)}},4742:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProtocolNotificationType=t.ProtocolNotificationType0=t.ProtocolRequestType=t.ProtocolRequestType0=t.RegistrationType=t.MessageDirection=void 0;const i=n(9406);var o;!function(e){e.clientToServer="clientToServer",e.serverToClient="serverToClient",e.both="both"}(o||(t.MessageDirection=o={})),t.RegistrationType=class{constructor(e){this.method=e}};class r extends i.RequestType0{constructor(e){super(e)}}t.ProtocolRequestType0=r;class s extends i.RequestType{constructor(e){super(e,i.ParameterStructures.byName)}}t.ProtocolRequestType=s;class a extends i.NotificationType0{constructor(e){super(e)}}t.ProtocolNotificationType0=a;class c extends i.NotificationType{constructor(e){super(e,i.ParameterStructures.byName)}}t.ProtocolNotificationType=c},2565:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CallHierarchyOutgoingCallsRequest=t.CallHierarchyIncomingCallsRequest=t.CallHierarchyPrepareRequest=void 0;const i=n(4742);var o,r,s;!function(e){e.method="textDocument/prepareCallHierarchy",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(o||(t.CallHierarchyPrepareRequest=o={})),function(e){e.method="callHierarchy/incomingCalls",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(r||(t.CallHierarchyIncomingCallsRequest=r={})),function(e){e.method="callHierarchy/outgoingCalls",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(s||(t.CallHierarchyOutgoingCallsRequest=s={}))},5509:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColorPresentationRequest=t.DocumentColorRequest=void 0;const i=n(4742);var o,r;!function(e){e.method="textDocument/documentColor",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(o||(t.DocumentColorRequest=o={})),function(e){e.method="textDocument/colorPresentation",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(r||(t.ColorPresentationRequest=r={}))},7296:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigurationRequest=void 0;const i=n(4742);var o;!function(e){e.method="workspace/configuration",e.messageDirection=i.MessageDirection.serverToClient,e.type=new i.ProtocolRequestType(e.method)}(o||(t.ConfigurationRequest=o={}))},9137:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DeclarationRequest=void 0;const i=n(4742);var o;!function(e){e.method="textDocument/declaration",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(o||(t.DeclarationRequest=o={}))},8338:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DiagnosticRefreshRequest=t.WorkspaceDiagnosticRequest=t.DocumentDiagnosticRequest=t.DocumentDiagnosticReportKind=t.DiagnosticServerCancellationData=void 0;const i=n(9406),o=n(9348),r=n(4742);var s,a,c,u,l;!function(e){e.is=function(e){const t=e;return t&&o.boolean(t.retriggerRequest)}}(s||(t.DiagnosticServerCancellationData=s={})),function(e){e.Full="full",e.Unchanged="unchanged"}(a||(t.DocumentDiagnosticReportKind=a={})),function(e){e.method="textDocument/diagnostic",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method),e.partialResult=new i.ProgressType}(c||(t.DocumentDiagnosticRequest=c={})),function(e){e.method="workspace/diagnostic",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method),e.partialResult=new i.ProgressType}(u||(t.WorkspaceDiagnosticRequest=u={})),function(e){e.method="workspace/diagnostic/refresh",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType0(e.method)}(l||(t.DiagnosticRefreshRequest=l={}))},2235:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WillDeleteFilesRequest=t.DidDeleteFilesNotification=t.DidRenameFilesNotification=t.WillRenameFilesRequest=t.DidCreateFilesNotification=t.WillCreateFilesRequest=t.FileOperationPatternKind=void 0;const i=n(4742);var o,r,s,a,c,u,l;!function(e){e.file="file",e.folder="folder"}(o||(t.FileOperationPatternKind=o={})),function(e){e.method="workspace/willCreateFiles",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(r||(t.WillCreateFilesRequest=r={})),function(e){e.method="workspace/didCreateFiles",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolNotificationType(e.method)}(s||(t.DidCreateFilesNotification=s={})),function(e){e.method="workspace/willRenameFiles",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(a||(t.WillRenameFilesRequest=a={})),function(e){e.method="workspace/didRenameFiles",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolNotificationType(e.method)}(c||(t.DidRenameFilesNotification=c={})),function(e){e.method="workspace/didDeleteFiles",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolNotificationType(e.method)}(u||(t.DidDeleteFilesNotification=u={})),function(e){e.method="workspace/willDeleteFiles",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(l||(t.WillDeleteFilesRequest=l={}))},5171:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FoldingRangeRefreshRequest=t.FoldingRangeRequest=void 0;const i=n(4742);var o,r;!function(e){e.method="textDocument/foldingRange",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(o||(t.FoldingRangeRequest=o={})),function(e){e.method="workspace/foldingRange/refresh",e.messageDirection=i.MessageDirection.serverToClient,e.type=new i.ProtocolRequestType0(e.method)}(r||(t.FoldingRangeRefreshRequest=r={}))},2441:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImplementationRequest=void 0;const i=n(4742);var o;!function(e){e.method="textDocument/implementation",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(o||(t.ImplementationRequest=o={}))},4248:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlayHintRefreshRequest=t.InlayHintResolveRequest=t.InlayHintRequest=void 0;const i=n(4742);var o,r,s;!function(e){e.method="textDocument/inlayHint",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(o||(t.InlayHintRequest=o={})),function(e){e.method="inlayHint/resolve",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(r||(t.InlayHintResolveRequest=r={})),function(e){e.method="workspace/inlayHint/refresh",e.messageDirection=i.MessageDirection.serverToClient,e.type=new i.ProtocolRequestType0(e.method)}(s||(t.InlayHintRefreshRequest=s={}))},9366:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlineCompletionRequest=void 0;const i=n(4742);var o;!function(e){e.method="textDocument/inlineCompletion",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(o||(t.InlineCompletionRequest=o={}))},1557:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlineValueRefreshRequest=t.InlineValueRequest=void 0;const i=n(4742);var o,r;!function(e){e.method="textDocument/inlineValue",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(o||(t.InlineValueRequest=o={})),function(e){e.method="workspace/inlineValue/refresh",e.messageDirection=i.MessageDirection.serverToClient,e.type=new i.ProtocolRequestType0(e.method)}(r||(t.InlineValueRefreshRequest=r={}))},7304:(e,t,n)=>{"use strict";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;const i=n(4742),o=n(1516),r=n(9348),s=n(2441);Object.defineProperty(t,"ImplementationRequest",{enumerable:!0,get:function(){return s.ImplementationRequest}});const a=n(8685);Object.defineProperty(t,"TypeDefinitionRequest",{enumerable:!0,get:function(){return a.TypeDefinitionRequest}});const c=n(6098);Object.defineProperty(t,"WorkspaceFoldersRequest",{enumerable:!0,get:function(){return c.WorkspaceFoldersRequest}}),Object.defineProperty(t,"DidChangeWorkspaceFoldersNotification",{enumerable:!0,get:function(){return c.DidChangeWorkspaceFoldersNotification}});const u=n(7296);Object.defineProperty(t,"ConfigurationRequest",{enumerable:!0,get:function(){return u.ConfigurationRequest}});const l=n(5509);Object.defineProperty(t,"DocumentColorRequest",{enumerable:!0,get:function(){return l.DocumentColorRequest}}),Object.defineProperty(t,"ColorPresentationRequest",{enumerable:!0,get:function(){return l.ColorPresentationRequest}});const d=n(5171);Object.defineProperty(t,"FoldingRangeRequest",{enumerable:!0,get:function(){return d.FoldingRangeRequest}}),Object.defineProperty(t,"FoldingRangeRefreshRequest",{enumerable:!0,get:function(){return d.FoldingRangeRefreshRequest}});const h=n(9137);Object.defineProperty(t,"DeclarationRequest",{enumerable:!0,get:function(){return h.DeclarationRequest}});const g=n(2964);Object.defineProperty(t,"SelectionRangeRequest",{enumerable:!0,get:function(){return g.SelectionRangeRequest}});const p=n(7450);Object.defineProperty(t,"WorkDoneProgress",{enumerable:!0,get:function(){return p.WorkDoneProgress}}),Object.defineProperty(t,"WorkDoneProgressCreateRequest",{enumerable:!0,get:function(){return p.WorkDoneProgressCreateRequest}}),Object.defineProperty(t,"WorkDoneProgressCancelNotification",{enumerable:!0,get:function(){return p.WorkDoneProgressCancelNotification}});const m=n(2565);Object.defineProperty(t,"CallHierarchyIncomingCallsRequest",{enumerable:!0,get:function(){return m.CallHierarchyIncomingCallsRequest}}),Object.defineProperty(t,"CallHierarchyOutgoingCallsRequest",{enumerable:!0,get:function(){return m.CallHierarchyOutgoingCallsRequest}}),Object.defineProperty(t,"CallHierarchyPrepareRequest",{enumerable:!0,get:function(){return m.CallHierarchyPrepareRequest}});const f=n(5402);Object.defineProperty(t,"TokenFormat",{enumerable:!0,get:function(){return f.TokenFormat}}),Object.defineProperty(t,"SemanticTokensRequest",{enumerable:!0,get:function(){return f.SemanticTokensRequest}}),Object.defineProperty(t,"SemanticTokensDeltaRequest",{enumerable:!0,get:function(){return f.SemanticTokensDeltaRequest}}),Object.defineProperty(t,"SemanticTokensRangeRequest",{enumerable:!0,get:function(){return f.SemanticTokensRangeRequest}}),Object.defineProperty(t,"SemanticTokensRefreshRequest",{enumerable:!0,get:function(){return f.SemanticTokensRefreshRequest}}),Object.defineProperty(t,"SemanticTokensRegistrationType",{enumerable:!0,get:function(){return f.SemanticTokensRegistrationType}});const v=n(903);Object.defineProperty(t,"ShowDocumentRequest",{enumerable:!0,get:function(){return v.ShowDocumentRequest}});const y=n(7323);Object.defineProperty(t,"LinkedEditingRangeRequest",{enumerable:!0,get:function(){return y.LinkedEditingRangeRequest}});const C=n(2235);Object.defineProperty(t,"FileOperationPatternKind",{enumerable:!0,get:function(){return C.FileOperationPatternKind}}),Object.defineProperty(t,"DidCreateFilesNotification",{enumerable:!0,get:function(){return C.DidCreateFilesNotification}}),Object.defineProperty(t,"WillCreateFilesRequest",{enumerable:!0,get:function(){return C.WillCreateFilesRequest}}),Object.defineProperty(t,"DidRenameFilesNotification",{enumerable:!0,get:function(){return C.DidRenameFilesNotification}}),Object.defineProperty(t,"WillRenameFilesRequest",{enumerable:!0,get:function(){return C.WillRenameFilesRequest}}),Object.defineProperty(t,"DidDeleteFilesNotification",{enumerable:!0,get:function(){return C.DidDeleteFilesNotification}}),Object.defineProperty(t,"WillDeleteFilesRequest",{enumerable:!0,get:function(){return C.WillDeleteFilesRequest}});const D=n(9219);Object.defineProperty(t,"UniquenessLevel",{enumerable:!0,get:function(){return D.UniquenessLevel}}),Object.defineProperty(t,"MonikerKind",{enumerable:!0,get:function(){return D.MonikerKind}}),Object.defineProperty(t,"MonikerRequest",{enumerable:!0,get:function(){return D.MonikerRequest}});const b=n(9970);Object.defineProperty(t,"TypeHierarchyPrepareRequest",{enumerable:!0,get:function(){return b.TypeHierarchyPrepareRequest}}),Object.defineProperty(t,"TypeHierarchySubtypesRequest",{enumerable:!0,get:function(){return b.TypeHierarchySubtypesRequest}}),Object.defineProperty(t,"TypeHierarchySupertypesRequest",{enumerable:!0,get:function(){return b.TypeHierarchySupertypesRequest}});const R=n(1557);Object.defineProperty(t,"InlineValueRequest",{enumerable:!0,get:function(){return R.InlineValueRequest}}),Object.defineProperty(t,"InlineValueRefreshRequest",{enumerable:!0,get:function(){return R.InlineValueRefreshRequest}});const w=n(4248);Object.defineProperty(t,"InlayHintRequest",{enumerable:!0,get:function(){return w.InlayHintRequest}}),Object.defineProperty(t,"InlayHintResolveRequest",{enumerable:!0,get:function(){return w.InlayHintResolveRequest}}),Object.defineProperty(t,"InlayHintRefreshRequest",{enumerable:!0,get:function(){return w.InlayHintRefreshRequest}});const S=n(8338);Object.defineProperty(t,"DiagnosticServerCancellationData",{enumerable:!0,get:function(){return S.DiagnosticServerCancellationData}}),Object.defineProperty(t,"DocumentDiagnosticReportKind",{enumerable:!0,get:function(){return S.DocumentDiagnosticReportKind}}),Object.defineProperty(t,"DocumentDiagnosticRequest",{enumerable:!0,get:function(){return S.DocumentDiagnosticRequest}}),Object.defineProperty(t,"WorkspaceDiagnosticRequest",{enumerable:!0,get:function(){return S.WorkspaceDiagnosticRequest}}),Object.defineProperty(t,"DiagnosticRefreshRequest",{enumerable:!0,get:function(){return S.DiagnosticRefreshRequest}});const T=n(5626);Object.defineProperty(t,"NotebookCellKind",{enumerable:!0,get:function(){return T.NotebookCellKind}}),Object.defineProperty(t,"ExecutionSummary",{enumerable:!0,get:function(){return T.ExecutionSummary}}),Object.defineProperty(t,"NotebookCell",{enumerable:!0,get:function(){return T.NotebookCell}}),Object.defineProperty(t,"NotebookDocument",{enumerable:!0,get:function(){return T.NotebookDocument}}),Object.defineProperty(t,"NotebookDocumentSyncRegistrationType",{enumerable:!0,get:function(){return T.NotebookDocumentSyncRegistrationType}}),Object.defineProperty(t,"DidOpenNotebookDocumentNotification",{enumerable:!0,get:function(){return T.DidOpenNotebookDocumentNotification}}),Object.defineProperty(t,"NotebookCellArrayChange",{enumerable:!0,get:function(){return T.NotebookCellArrayChange}}),Object.defineProperty(t,"DidChangeNotebookDocumentNotification",{enumerable:!0,get:function(){return T.DidChangeNotebookDocumentNotification}}),Object.defineProperty(t,"DidSaveNotebookDocumentNotification",{enumerable:!0,get:function(){return T.DidSaveNotebookDocumentNotification}}),Object.defineProperty(t,"DidCloseNotebookDocumentNotification",{enumerable:!0,get:function(){return T.DidCloseNotebookDocumentNotification}});const _=n(9366);var k,P,x,q,F,O,E,M,I,N,L,A,j,H,K,W,U,$,z,V,B,J,Q,X,G,Y,Z,ee,te,ne,ie,oe,re,se,ae,ce,ue,le,de,he,ge,pe,me,fe,ve,ye,Ce,De,be,Re,we,Se,Te,_e,ke,Pe,xe,qe,Fe,Oe,Ee,Me,Ie,Ne,Le;Object.defineProperty(t,"InlineCompletionRequest",{enumerable:!0,get:function(){return _.InlineCompletionRequest}}),function(e){e.is=function(e){const t=e;return r.string(t)||r.string(t.language)||r.string(t.scheme)||r.string(t.pattern)}}(k||(t.TextDocumentFilter=k={})),function(e){e.is=function(e){const t=e;return r.objectLiteral(t)&&(r.string(t.notebookType)||r.string(t.scheme)||r.string(t.pattern))}}(P||(t.NotebookDocumentFilter=P={})),function(e){e.is=function(e){const t=e;return r.objectLiteral(t)&&(r.string(t.notebook)||P.is(t.notebook))&&(void 0===t.language||r.string(t.language))}}(x||(t.NotebookCellTextDocumentFilter=x={})),function(e){e.is=function(e){if(!Array.isArray(e))return!1;for(let t of e)if(!r.string(t)&&!k.is(t)&&!x.is(t))return!1;return!0}}(q||(t.DocumentSelector=q={})),function(e){e.method="client/registerCapability",e.messageDirection=i.MessageDirection.serverToClient,e.type=new i.ProtocolRequestType(e.method)}(F||(t.RegistrationRequest=F={})),function(e){e.method="client/unregisterCapability",e.messageDirection=i.MessageDirection.serverToClient,e.type=new i.ProtocolRequestType(e.method)}(O||(t.UnregistrationRequest=O={})),function(e){e.Create="create",e.Rename="rename",e.Delete="delete"}(E||(t.ResourceOperationKind=E={})),function(e){e.Abort="abort",e.Transactional="transactional",e.TextOnlyTransactional="textOnlyTransactional",e.Undo="undo"}(M||(t.FailureHandlingKind=M={})),function(e){e.UTF8="utf-8",e.UTF16="utf-16",e.UTF32="utf-32"}(I||(t.PositionEncodingKind=I={})),function(e){e.hasId=function(e){const t=e;return t&&r.string(t.id)&&t.id.length>0}}(N||(t.StaticRegistrationOptions=N={})),function(e){e.is=function(e){const t=e;return t&&(null===t.documentSelector||q.is(t.documentSelector))}}(L||(t.TextDocumentRegistrationOptions=L={})),function(e){e.is=function(e){const t=e;return r.objectLiteral(t)&&(void 0===t.workDoneProgress||r.boolean(t.workDoneProgress))},e.hasWorkDoneProgress=function(e){const t=e;return t&&r.boolean(t.workDoneProgress)}}(A||(t.WorkDoneProgressOptions=A={})),function(e){e.method="initialize",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(j||(t.InitializeRequest=j={})),function(e){e.unknownProtocolVersion=1}(H||(t.InitializeErrorCodes=H={})),function(e){e.method="initialized",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolNotificationType(e.method)}(K||(t.InitializedNotification=K={})),function(e){e.method="shutdown",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType0(e.method)}(W||(t.ShutdownRequest=W={})),function(e){e.method="exit",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolNotificationType0(e.method)}(U||(t.ExitNotification=U={})),function(e){e.method="workspace/didChangeConfiguration",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolNotificationType(e.method)}($||(t.DidChangeConfigurationNotification=$={})),function(e){e.Error=1,e.Warning=2,e.Info=3,e.Log=4,e.Debug=5}(z||(t.MessageType=z={})),function(e){e.method="window/showMessage",e.messageDirection=i.MessageDirection.serverToClient,e.type=new i.ProtocolNotificationType(e.method)}(V||(t.ShowMessageNotification=V={})),function(e){e.method="window/showMessageRequest",e.messageDirection=i.MessageDirection.serverToClient,e.type=new i.ProtocolRequestType(e.method)}(B||(t.ShowMessageRequest=B={})),function(e){e.method="window/logMessage",e.messageDirection=i.MessageDirection.serverToClient,e.type=new i.ProtocolNotificationType(e.method)}(J||(t.LogMessageNotification=J={})),function(e){e.method="telemetry/event",e.messageDirection=i.MessageDirection.serverToClient,e.type=new i.ProtocolNotificationType(e.method)}(Q||(t.TelemetryEventNotification=Q={})),function(e){e.None=0,e.Full=1,e.Incremental=2}(X||(t.TextDocumentSyncKind=X={})),function(e){e.method="textDocument/didOpen",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolNotificationType(e.method)}(G||(t.DidOpenTextDocumentNotification=G={})),function(e){e.isIncremental=function(e){let t=e;return null!=t&&"string"==typeof t.text&&void 0!==t.range&&(void 0===t.rangeLength||"number"==typeof t.rangeLength)},e.isFull=function(e){let t=e;return null!=t&&"string"==typeof t.text&&void 0===t.range&&void 0===t.rangeLength}}(Y||(t.TextDocumentContentChangeEvent=Y={})),function(e){e.method="textDocument/didChange",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolNotificationType(e.method)}(Z||(t.DidChangeTextDocumentNotification=Z={})),function(e){e.method="textDocument/didClose",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolNotificationType(e.method)}(ee||(t.DidCloseTextDocumentNotification=ee={})),function(e){e.method="textDocument/didSave",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolNotificationType(e.method)}(te||(t.DidSaveTextDocumentNotification=te={})),function(e){e.Manual=1,e.AfterDelay=2,e.FocusOut=3}(ne||(t.TextDocumentSaveReason=ne={})),function(e){e.method="textDocument/willSave",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolNotificationType(e.method)}(ie||(t.WillSaveTextDocumentNotification=ie={})),function(e){e.method="textDocument/willSaveWaitUntil",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(oe||(t.WillSaveTextDocumentWaitUntilRequest=oe={})),function(e){e.method="workspace/didChangeWatchedFiles",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolNotificationType(e.method)}(re||(t.DidChangeWatchedFilesNotification=re={})),function(e){e.Created=1,e.Changed=2,e.Deleted=3}(se||(t.FileChangeType=se={})),function(e){e.is=function(e){const t=e;return r.objectLiteral(t)&&(o.URI.is(t.baseUri)||o.WorkspaceFolder.is(t.baseUri))&&r.string(t.pattern)}}(ae||(t.RelativePattern=ae={})),function(e){e.Create=1,e.Change=2,e.Delete=4}(ce||(t.WatchKind=ce={})),function(e){e.method="textDocument/publishDiagnostics",e.messageDirection=i.MessageDirection.serverToClient,e.type=new i.ProtocolNotificationType(e.method)}(ue||(t.PublishDiagnosticsNotification=ue={})),function(e){e.Invoked=1,e.TriggerCharacter=2,e.TriggerForIncompleteCompletions=3}(le||(t.CompletionTriggerKind=le={})),function(e){e.method="textDocument/completion",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(de||(t.CompletionRequest=de={})),function(e){e.method="completionItem/resolve",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(he||(t.CompletionResolveRequest=he={})),function(e){e.method="textDocument/hover",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(ge||(t.HoverRequest=ge={})),function(e){e.Invoked=1,e.TriggerCharacter=2,e.ContentChange=3}(pe||(t.SignatureHelpTriggerKind=pe={})),function(e){e.method="textDocument/signatureHelp",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(me||(t.SignatureHelpRequest=me={})),function(e){e.method="textDocument/definition",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(fe||(t.DefinitionRequest=fe={})),function(e){e.method="textDocument/references",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(ve||(t.ReferencesRequest=ve={})),function(e){e.method="textDocument/documentHighlight",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(ye||(t.DocumentHighlightRequest=ye={})),function(e){e.method="textDocument/documentSymbol",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(Ce||(t.DocumentSymbolRequest=Ce={})),function(e){e.method="textDocument/codeAction",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(De||(t.CodeActionRequest=De={})),function(e){e.method="codeAction/resolve",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(be||(t.CodeActionResolveRequest=be={})),function(e){e.method="workspace/symbol",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(Re||(t.WorkspaceSymbolRequest=Re={})),function(e){e.method="workspaceSymbol/resolve",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(we||(t.WorkspaceSymbolResolveRequest=we={})),function(e){e.method="textDocument/codeLens",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(Se||(t.CodeLensRequest=Se={})),function(e){e.method="codeLens/resolve",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(Te||(t.CodeLensResolveRequest=Te={})),function(e){e.method="workspace/codeLens/refresh",e.messageDirection=i.MessageDirection.serverToClient,e.type=new i.ProtocolRequestType0(e.method)}(_e||(t.CodeLensRefreshRequest=_e={})),function(e){e.method="textDocument/documentLink",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(ke||(t.DocumentLinkRequest=ke={})),function(e){e.method="documentLink/resolve",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(Pe||(t.DocumentLinkResolveRequest=Pe={})),function(e){e.method="textDocument/formatting",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(xe||(t.DocumentFormattingRequest=xe={})),function(e){e.method="textDocument/rangeFormatting",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(qe||(t.DocumentRangeFormattingRequest=qe={})),function(e){e.method="textDocument/rangesFormatting",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(Fe||(t.DocumentRangesFormattingRequest=Fe={})),function(e){e.method="textDocument/onTypeFormatting",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(Oe||(t.DocumentOnTypeFormattingRequest=Oe={})),function(e){e.Identifier=1}(Ee||(t.PrepareSupportDefaultBehavior=Ee={})),function(e){e.method="textDocument/rename",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(Me||(t.RenameRequest=Me={})),function(e){e.method="textDocument/prepareRename",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(Ie||(t.PrepareRenameRequest=Ie={})),function(e){e.method="workspace/executeCommand",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(Ne||(t.ExecuteCommandRequest=Ne={})),function(e){e.method="workspace/applyEdit",e.messageDirection=i.MessageDirection.serverToClient,e.type=new i.ProtocolRequestType("workspace/applyEdit")}(Le||(t.ApplyWorkspaceEditRequest=Le={}))},7323:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LinkedEditingRangeRequest=void 0;const i=n(4742);var o;!function(e){e.method="textDocument/linkedEditingRange",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(o||(t.LinkedEditingRangeRequest=o={}))},9219:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MonikerRequest=t.MonikerKind=t.UniquenessLevel=void 0;const i=n(4742);var o,r,s;!function(e){e.document="document",e.project="project",e.group="group",e.scheme="scheme",e.global="global"}(o||(t.UniquenessLevel=o={})),function(e){e.$import="import",e.$export="export",e.local="local"}(r||(t.MonikerKind=r={})),function(e){e.method="textDocument/moniker",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(s||(t.MonikerRequest=s={}))},5626:(e,t,n)=>{"use strict";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;const i=n(1516),o=n(9348),r=n(4742);var s,a,c,u,l,d,h,g,p,m;!function(e){e.Markup=1,e.Code=2,e.is=function(e){return 1===e||2===e}}(s||(t.NotebookCellKind=s={})),function(e){e.create=function(e,t){const n={executionOrder:e};return!0!==t&&!1!==t||(n.success=t),n},e.is=function(e){const t=e;return o.objectLiteral(t)&&i.uinteger.is(t.executionOrder)&&(void 0===t.success||o.boolean(t.success))},e.equals=function(e,t){return e===t||null!=e&&null!=t&&e.executionOrder===t.executionOrder&&e.success===t.success}}(a||(t.ExecutionSummary=a={})),function(e){function t(e,n){if(e===n)return!0;if(null==e||null==n)return!1;if(typeof e!=typeof n)return!1;if("object"!=typeof e)return!1;const i=Array.isArray(e),r=Array.isArray(n);if(i!==r)return!1;if(i&&r){if(e.length!==n.length)return!1;for(let i=0;i<e.length;i++)if(!t(e[i],n[i]))return!1}if(o.objectLiteral(e)&&o.objectLiteral(n)){const i=Object.keys(e),o=Object.keys(n);if(i.length!==o.length)return!1;if(i.sort(),o.sort(),!t(i,o))return!1;for(let o=0;o<i.length;o++){const r=i[o];if(!t(e[r],n[r]))return!1}}return!0}e.create=function(e,t){return{kind:e,document:t}},e.is=function(e){const t=e;return o.objectLiteral(t)&&s.is(t.kind)&&i.DocumentUri.is(t.document)&&(void 0===t.metadata||o.objectLiteral(t.metadata))},e.diff=function(e,n){const i=new Set;return e.document!==n.document&&i.add("document"),e.kind!==n.kind&&i.add("kind"),e.executionSummary!==n.executionSummary&&i.add("executionSummary"),void 0===e.metadata&&void 0===n.metadata||t(e.metadata,n.metadata)||i.add("metadata"),void 0===e.executionSummary&&void 0===n.executionSummary||a.equals(e.executionSummary,n.executionSummary)||i.add("executionSummary"),i}}(c||(t.NotebookCell=c={})),function(e){e.create=function(e,t,n,i){return{uri:e,notebookType:t,version:n,cells:i}},e.is=function(e){const t=e;return o.objectLiteral(t)&&o.string(t.uri)&&i.integer.is(t.version)&&o.typedArray(t.cells,c.is)}}(u||(t.NotebookDocument=u={})),function(e){e.method="notebookDocument/sync",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.RegistrationType(e.method)}(l||(t.NotebookDocumentSyncRegistrationType=l={})),function(e){e.method="notebookDocument/didOpen",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method),e.registrationMethod=l.method}(d||(t.DidOpenNotebookDocumentNotification=d={})),function(e){e.is=function(e){const t=e;return o.objectLiteral(t)&&i.uinteger.is(t.start)&&i.uinteger.is(t.deleteCount)&&(void 0===t.cells||o.typedArray(t.cells,c.is))},e.create=function(e,t,n){const i={start:e,deleteCount:t};return void 0!==n&&(i.cells=n),i}}(h||(t.NotebookCellArrayChange=h={})),function(e){e.method="notebookDocument/didChange",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method),e.registrationMethod=l.method}(g||(t.DidChangeNotebookDocumentNotification=g={})),function(e){e.method="notebookDocument/didSave",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method),e.registrationMethod=l.method}(p||(t.DidSaveNotebookDocumentNotification=p={})),function(e){e.method="notebookDocument/didClose",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method),e.registrationMethod=l.method}(m||(t.DidCloseNotebookDocumentNotification=m={}))},7450:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WorkDoneProgressCancelNotification=t.WorkDoneProgressCreateRequest=t.WorkDoneProgress=void 0;const i=n(9406),o=n(4742);var r,s,a;!function(e){e.type=new i.ProgressType,e.is=function(t){return t===e.type}}(r||(t.WorkDoneProgress=r={})),function(e){e.method="window/workDoneProgress/create",e.messageDirection=o.MessageDirection.serverToClient,e.type=new o.ProtocolRequestType(e.method)}(s||(t.WorkDoneProgressCreateRequest=s={})),function(e){e.method="window/workDoneProgress/cancel",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolNotificationType(e.method)}(a||(t.WorkDoneProgressCancelNotification=a={}))},2964:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SelectionRangeRequest=void 0;const i=n(4742);var o;!function(e){e.method="textDocument/selectionRange",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(o||(t.SelectionRangeRequest=o={}))},5402:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SemanticTokensRefreshRequest=t.SemanticTokensRangeRequest=t.SemanticTokensDeltaRequest=t.SemanticTokensRequest=t.SemanticTokensRegistrationType=t.TokenFormat=void 0;const i=n(4742);var o,r,s,a,c,u;!function(e){e.Relative="relative"}(o||(t.TokenFormat=o={})),function(e){e.method="textDocument/semanticTokens",e.type=new i.RegistrationType(e.method)}(r||(t.SemanticTokensRegistrationType=r={})),function(e){e.method="textDocument/semanticTokens/full",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method),e.registrationMethod=r.method}(s||(t.SemanticTokensRequest=s={})),function(e){e.method="textDocument/semanticTokens/full/delta",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method),e.registrationMethod=r.method}(a||(t.SemanticTokensDeltaRequest=a={})),function(e){e.method="textDocument/semanticTokens/range",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method),e.registrationMethod=r.method}(c||(t.SemanticTokensRangeRequest=c={})),function(e){e.method="workspace/semanticTokens/refresh",e.messageDirection=i.MessageDirection.serverToClient,e.type=new i.ProtocolRequestType0(e.method)}(u||(t.SemanticTokensRefreshRequest=u={}))},903:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ShowDocumentRequest=void 0;const i=n(4742);var o;!function(e){e.method="window/showDocument",e.messageDirection=i.MessageDirection.serverToClient,e.type=new i.ProtocolRequestType(e.method)}(o||(t.ShowDocumentRequest=o={}))},8685:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeDefinitionRequest=void 0;const i=n(4742);var o;!function(e){e.method="textDocument/typeDefinition",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(o||(t.TypeDefinitionRequest=o={}))},9970:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeHierarchySubtypesRequest=t.TypeHierarchySupertypesRequest=t.TypeHierarchyPrepareRequest=void 0;const i=n(4742);var o,r,s;!function(e){e.method="textDocument/prepareTypeHierarchy",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(o||(t.TypeHierarchyPrepareRequest=o={})),function(e){e.method="typeHierarchy/supertypes",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(r||(t.TypeHierarchySupertypesRequest=r={})),function(e){e.method="typeHierarchy/subtypes",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(s||(t.TypeHierarchySubtypesRequest=s={}))},6098:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DidChangeWorkspaceFoldersNotification=t.WorkspaceFoldersRequest=void 0;const i=n(4742);var o,r;!function(e){e.method="workspace/workspaceFolders",e.messageDirection=i.MessageDirection.serverToClient,e.type=new i.ProtocolRequestType0(e.method)}(o||(t.WorkspaceFoldersRequest=o={})),function(e){e.method="workspace/didChangeWorkspaceFolders",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolNotificationType(e.method)}(r||(t.DidChangeWorkspaceFoldersNotification=r={}))},9348:(e,t)=>{"use strict";function n(e){return"string"==typeof e||e instanceof String}function i(e){return Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.objectLiteral=t.typedArray=t.stringArray=t.array=t.func=t.error=t.number=t.string=t.boolean=void 0,t.boolean=function(e){return!0===e||!1===e},t.string=n,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=function(e){return"function"==typeof e},t.array=i,t.stringArray=function(e){return i(e)&&e.every((e=>n(e)))},t.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)},t.objectLiteral=function(e){return null!==e&&"object"==typeof e}},7237:function(e){var t;t=()=>(()=>{"use strict";var e={470:e=>{function t(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function n(e,t){for(var n,i="",o=0,r=-1,s=0,a=0;a<=e.length;++a){if(a<e.length)n=e.charCodeAt(a);else{if(47===n)break;n=47}if(47===n){if(r===a-1||1===s);else if(r!==a-1&&2===s){if(i.length<2||2!==o||46!==i.charCodeAt(i.length-1)||46!==i.charCodeAt(i.length-2))if(i.length>2){var c=i.lastIndexOf("/");if(c!==i.length-1){-1===c?(i="",o=0):o=(i=i.slice(0,c)).length-1-i.lastIndexOf("/"),r=a,s=0;continue}}else if(2===i.length||1===i.length){i="",o=0,r=a,s=0;continue}t&&(i.length>0?i+="/..":i="..",o=2)}else i.length>0?i+="/"+e.slice(r+1,a):i=e.slice(r+1,a),o=a-r-1;r=a,s=0}else 46===n&&-1!==s?++s:s=-1}return i}var i={resolve:function(){for(var e,i="",o=!1,r=arguments.length-1;r>=-1&&!o;r--){var s;r>=0?s=arguments[r]:(void 0===e&&(e=process.cwd()),s=e),t(s),0!==s.length&&(i=s+"/"+i,o=47===s.charCodeAt(0))}return i=n(i,!o),o?i.length>0?"/"+i:"/":i.length>0?i:"."},normalize:function(e){if(t(e),0===e.length)return".";var i=47===e.charCodeAt(0),o=47===e.charCodeAt(e.length-1);return 0!==(e=n(e,!i)).length||i||(e="."),e.length>0&&o&&(e+="/"),i?"/"+e:e},isAbsolute:function(e){return t(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,n=0;n<arguments.length;++n){var o=arguments[n];t(o),o.length>0&&(void 0===e?e=o:e+="/"+o)}return void 0===e?".":i.normalize(e)},relative:function(e,n){if(t(e),t(n),e===n)return"";if((e=i.resolve(e))===(n=i.resolve(n)))return"";for(var o=1;o<e.length&&47===e.charCodeAt(o);++o);for(var r=e.length,s=r-o,a=1;a<n.length&&47===n.charCodeAt(a);++a);for(var c=n.length-a,u=s<c?s:c,l=-1,d=0;d<=u;++d){if(d===u){if(c>u){if(47===n.charCodeAt(a+d))return n.slice(a+d+1);if(0===d)return n.slice(a+d)}else s>u&&(47===e.charCodeAt(o+d)?l=d:0===d&&(l=0));break}var h=e.charCodeAt(o+d);if(h!==n.charCodeAt(a+d))break;47===h&&(l=d)}var g="";for(d=o+l+1;d<=r;++d)d!==r&&47!==e.charCodeAt(d)||(0===g.length?g+="..":g+="/..");return g.length>0?g+n.slice(a+l):(a+=l,47===n.charCodeAt(a)&&++a,n.slice(a))},_makeLong:function(e){return e},dirname:function(e){if(t(e),0===e.length)return".";for(var n=e.charCodeAt(0),i=47===n,o=-1,r=!0,s=e.length-1;s>=1;--s)if(47===(n=e.charCodeAt(s))){if(!r){o=s;break}}else r=!1;return-1===o?i?"/":".":i&&1===o?"//":e.slice(0,o)},basename:function(e,n){if(void 0!==n&&"string"!=typeof n)throw new TypeError('"ext" argument must be a string');t(e);var i,o=0,r=-1,s=!0;if(void 0!==n&&n.length>0&&n.length<=e.length){if(n.length===e.length&&n===e)return"";var a=n.length-1,c=-1;for(i=e.length-1;i>=0;--i){var u=e.charCodeAt(i);if(47===u){if(!s){o=i+1;break}}else-1===c&&(s=!1,c=i+1),a>=0&&(u===n.charCodeAt(a)?-1==--a&&(r=i):(a=-1,r=c))}return o===r?r=c:-1===r&&(r=e.length),e.slice(o,r)}for(i=e.length-1;i>=0;--i)if(47===e.charCodeAt(i)){if(!s){o=i+1;break}}else-1===r&&(s=!1,r=i+1);return-1===r?"":e.slice(o,r)},extname:function(e){t(e);for(var n=-1,i=0,o=-1,r=!0,s=0,a=e.length-1;a>=0;--a){var c=e.charCodeAt(a);if(47!==c)-1===o&&(r=!1,o=a+1),46===c?-1===n?n=a:1!==s&&(s=1):-1!==n&&(s=-1);else if(!r){i=a+1;break}}return-1===n||-1===o||0===s||1===s&&n===o-1&&n===i+1?"":e.slice(n,o)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var n=t.dir||t.root,i=t.base||(t.name||"")+(t.ext||"");return n?n===t.root?n+i:n+"/"+i:i}(0,e)},parse:function(e){t(e);var n={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return n;var i,o=e.charCodeAt(0),r=47===o;r?(n.root="/",i=1):i=0;for(var s=-1,a=0,c=-1,u=!0,l=e.length-1,d=0;l>=i;--l)if(47!==(o=e.charCodeAt(l)))-1===c&&(u=!1,c=l+1),46===o?-1===s?s=l:1!==d&&(d=1):-1!==s&&(d=-1);else if(!u){a=l+1;break}return-1===s||-1===c||0===d||1===d&&s===c-1&&s===a+1?-1!==c&&(n.base=n.name=0===a&&r?e.slice(1,c):e.slice(a,c)):(0===a&&r?(n.name=e.slice(1,s),n.base=e.slice(1,c)):(n.name=e.slice(a,s),n.base=e.slice(a,c)),n.ext=e.slice(s,c)),a>0?n.dir=e.slice(0,a-1):r&&(n.dir="/"),n},sep:"/",delimiter:":",win32:null,posix:null};i.posix=i,e.exports=i},674:(e,t)=>{if(Object.defineProperty(t,"__esModule",{value:!0}),t.isWindows=void 0,"object"==typeof process)t.isWindows=!1;else if("object"==typeof navigator){let e=navigator.userAgent;t.isWindows=e.indexOf("Windows")>=0}},796:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.uriToFsPath=t.URI=void 0;const i=n(674),o=/^\w[\w\d+.-]*$/,r=/^\//,s=/^\/\//;function a(e,t){if(!e.scheme&&t)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!o.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!r.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(s.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}const c="",u="/",l=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class d{static isUri(e){return e instanceof d||!!e&&"string"==typeof e.authority&&"string"==typeof e.fragment&&"string"==typeof e.path&&"string"==typeof e.query&&"string"==typeof e.scheme&&"string"==typeof e.fsPath&&"function"==typeof e.with&&"function"==typeof e.toString}scheme;authority;path;query;fragment;constructor(e,t,n,i,o,r=!1){"object"==typeof e?(this.scheme=e.scheme||c,this.authority=e.authority||c,this.path=e.path||c,this.query=e.query||c,this.fragment=e.fragment||c):(this.scheme=function(e,t){return e||t?e:"file"}(e,r),this.authority=t||c,this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==u&&(t=u+t):t=u}return t}(this.scheme,n||c),this.query=i||c,this.fragment=o||c,a(this,r))}get fsPath(){return v(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:n,path:i,query:o,fragment:r}=e;return void 0===t?t=this.scheme:null===t&&(t=c),void 0===n?n=this.authority:null===n&&(n=c),void 0===i?i=this.path:null===i&&(i=c),void 0===o?o=this.query:null===o&&(o=c),void 0===r?r=this.fragment:null===r&&(r=c),t===this.scheme&&n===this.authority&&i===this.path&&o===this.query&&r===this.fragment?this:new g(t,n,i,o,r)}static parse(e,t=!1){const n=l.exec(e);return n?new g(n[2]||c,b(n[4]||c),b(n[5]||c),b(n[7]||c),b(n[9]||c),t):new g(c,c,c,c,c)}static file(e){let t=c;if(i.isWindows&&(e=e.replace(/\\/g,u)),e[0]===u&&e[1]===u){const n=e.indexOf(u,2);-1===n?(t=e.substring(2),e=u):(t=e.substring(2,n),e=e.substring(n)||u)}return new g("file",t,e,c,c)}static from(e){const t=new g(e.scheme,e.authority,e.path,e.query,e.fragment);return a(t,!0),t}toString(e=!1){return y(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof d)return e;{const t=new g(e);return t._formatted=e.external,t._fsPath=e._sep===h?e.fsPath:null,t}}return e}}t.URI=d;const h=i.isWindows?1:void 0;class g extends d{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=v(this,!1)),this._fsPath}toString(e=!1){return e?y(this,!0):(this._formatted||(this._formatted=y(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=h),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}}const p={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(e,t,n){let i,o=-1;for(let r=0;r<e.length;r++){const s=e.charCodeAt(r);if(s>=97&&s<=122||s>=65&&s<=90||s>=48&&s<=57||45===s||46===s||95===s||126===s||t&&47===s||n&&91===s||n&&93===s||n&&58===s)-1!==o&&(i+=encodeURIComponent(e.substring(o,r)),o=-1),void 0!==i&&(i+=e.charAt(r));else{void 0===i&&(i=e.substr(0,r));const t=p[s];void 0!==t?(-1!==o&&(i+=encodeURIComponent(e.substring(o,r)),o=-1),i+=t):-1===o&&(o=r)}}return-1!==o&&(i+=encodeURIComponent(e.substring(o))),void 0!==i?i:e}function f(e){let t;for(let n=0;n<e.length;n++){const i=e.charCodeAt(n);35===i||63===i?(void 0===t&&(t=e.substr(0,n)),t+=p[i]):void 0!==t&&(t+=e[n])}return void 0!==t?t:e}function v(e,t){let n;return n=e.authority&&e.path.length>1&&"file"===e.scheme?`//${e.authority}${e.path}`:47===e.path.charCodeAt(0)&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&58===e.path.charCodeAt(2)?t?e.path.substr(1):e.path[1].toLowerCase()+e.path.substr(2):e.path,i.isWindows&&(n=n.replace(/\//g,"\\")),n}function y(e,t){const n=t?f:m;let i="",{scheme:o,authority:r,path:s,query:a,fragment:c}=e;if(o&&(i+=o,i+=":"),(r||"file"===o)&&(i+=u,i+=u),r){let e=r.indexOf("@");if(-1!==e){const t=r.substr(0,e);r=r.substr(e+1),e=t.lastIndexOf(":"),-1===e?i+=n(t,!1,!1):(i+=n(t.substr(0,e),!1,!1),i+=":",i+=n(t.substr(e+1),!1,!0)),i+="@"}r=r.toLowerCase(),e=r.lastIndexOf(":"),-1===e?i+=n(r,!1,!0):(i+=n(r.substr(0,e),!1,!0),i+=r.substr(e))}if(s){if(s.length>=3&&47===s.charCodeAt(0)&&58===s.charCodeAt(2)){const e=s.charCodeAt(1);e>=65&&e<=90&&(s=`/${String.fromCharCode(e+32)}:${s.substr(3)}`)}else if(s.length>=2&&58===s.charCodeAt(1)){const e=s.charCodeAt(0);e>=65&&e<=90&&(s=`${String.fromCharCode(e+32)}:${s.substr(2)}`)}i+=n(s,!0,!1)}return a&&(i+="?",i+=n(a,!1,!1)),c&&(i+="#",i+=t?c:m(c,!1,!1)),i}function C(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+C(e.substr(3)):e}}t.uriToFsPath=v;const D=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function b(e){return e.match(D)?e.replace(D,(e=>C(e))):e}},679:function(e,t,n){var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Utils=void 0;const s=r(n(470)),a=s.posix||s,c="/";var u;!function(e){e.joinPath=function(e,...t){return e.with({path:a.join(e.path,...t)})},e.resolvePath=function(e,...t){let n=e.path,i=!1;n[0]!==c&&(n=c+n,i=!0);let o=a.resolve(n,...t);return i&&o[0]===c&&!e.authority&&(o=o.substring(1)),e.with({path:o})},e.dirname=function(e){if(0===e.path.length||e.path===c)return e;let t=a.dirname(e.path);return 1===t.length&&46===t.charCodeAt(0)&&(t=""),e.with({path:t})},e.basename=function(e){return a.basename(e.path)},e.extname=function(e){return a.extname(e.path)}}(u||(t.Utils=u={}))}},t={};function n(i){var o=t[i];if(void 0!==o)return o.exports;var r=t[i]={exports:{}};return e[i].call(r.exports,r,r.exports,n),r.exports}var i={};return(()=>{var e=i;Object.defineProperty(e,"__esModule",{value:!0}),e.Utils=e.URI=void 0;const t=n(796);Object.defineProperty(e,"URI",{enumerable:!0,get:function(){return t.URI}});const o=n(679);Object.defineProperty(e,"Utils",{enumerable:!0,get:function(){return o.Utils}})})(),i})(),e.exports=t()},6058:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.activateAutoInsertion=function(e,t,n){const o=[];i.workspace.onDidChangeTextDocument((function({document:e,contentChanges:t,reason:n}){if(!r||0===t.length||n===i.TextDocumentChangeReason.Undo||n===i.TextDocumentChangeReason.Redo)return;if(e!==(i.window.activeTextEditor&&i.window.activeTextEditor.document))return;a&&a.dispose();const o=t[t.length-1],c=o.text[o.text.length-1];s.autoQuote&&0===o.rangeLength&&"="===c?u("autoQuote",e,o):!s.autoClose||0!==o.rangeLength||">"!==c&&"/"!==c||u("autoClose",e,o)}),null,o);let r=!1;const s={autoQuote:!1,autoClose:!1};let a;function c(){r=!1;const e=i.window.activeTextEditor;if(!e)return;const n=e.document;if(!t.useAutoInsert(n.languageId))return;const o=i.workspace.getConfiguration(void 0,n.uri);s.autoQuote=o.get("html.autoCreateQuotes")??!1,s.autoClose=o.get("html.autoClosingTags")??!1,r=s.autoQuote||s.autoClose}function u(t,o,r){const c=r.range.start,u=o.version;a=n.timer.setTimeout((()=>{const n=new i.Position(c.line,c.character+r.text.length);e(t,o,n).then((e=>{if(e&&s[t]){const t=i.window.activeTextEditor;if(t){const r=t.document;if(o===r&&r.version===u){const o=t.selections;o.length&&o.some((e=>e.active.isEqual(n)))?t.insertSnippet(new i.SnippetString(e),o.map((e=>e.active))):t.insertSnippet(new i.SnippetString(e),n)}}}})),a=void 0}),100)}return c(),i.window.onDidChangeActiveTextEditor(c,null,o),o.push({dispose:()=>{a?.dispose()}}),i.Disposable.from(...o)};const i=n(9496)},1438:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getCustomDataSource=function(e,t){let n=new Set,o=new Set;const s=new Set;a(s),c(n,o);const u=new i.EventEmitter;return t.push(i.extensions.onDidChange((e=>{const t=new Set,i=new Set;c(t,i),(r(t,n)||r(i,o))&&(n=t,o=i,u.fire())}))),t.push(i.workspace.onDidChangeConfiguration((e=>{e.affectsConfiguration("html.customData")&&(s.clear(),a(s),u.fire())}))),t.push(i.workspace.onDidChangeTextDocument((e=>{const t=e.document.uri.toString();(o.has(t)||s.has(t))&&u.fire()}))),{get uris(){return[...n].concat([...o],[...s])},get onDidChange(){return u.event},getContent(t){const o=i.Uri.parse(t);return n.has(t)?i.workspace.fs.readFile(o).then((t=>(new e.TextDecoder).decode(t))):i.workspace.openTextDocument(o).then((e=>e.getText()))}}};const i=n(9496),o=n(7237);function r(e,t){if(e.size!==t.size)return!0;for(const n of e)if(!t.has(n))return!0;return!1}function s(e){return/^(?<scheme>\w[\w\d+.-]*):/.test(e)}function a(e){const t=i.workspace.workspaceFolders,n=new Set;if(!t)return n;const r=(t,n)=>{if(Array.isArray(t))for(const i of t)"string"==typeof i&&(s(i)?e.add(i):e.add(o.Utils.resolvePath(n,i).toString()))};for(let e=0;e<t.length;e++){const n=t[e].uri,o=i.workspace.getConfiguration("html",n).inspect("customData");o&&(r(o.workspaceFolderValue,n),0===e&&(i.workspace.workspaceFile&&r(o.workspaceValue,i.workspace.workspaceFile),r(o.globalValue,n)))}return n}function c(e,t){for(const n of i.extensions.allAcrossExtensionHosts){const o=n.packageJSON?.contributes?.html?.customData;if(Array.isArray(o))for(const r of o)s(r)?t.add(r):e.add(i.Uri.joinPath(n.extensionUri,r).toString())}}},8890:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.languageServerDescription=void 0,t.startClient=async function(e,n,o){const r=i.window.createOutputChannel(t.languageServerDescription),s=(0,c.getLanguageParticipants)();e.subscriptions.push(s);let a=await m(s,n,r,o);const u="html.promptForLinkedEditing";if(void 0!==i.extensions.getExtension("formulahendry.auto-rename-tag")&&!1!==e.globalState.get(u)){const t=i.workspace.getConfiguration("editor",{languageId:"html"});if(!t.get("linkedEditing")&&!t.get("renameOnType")){const t=i.window.onDidChangeActiveTextEditor((async n=>{if(n&&s.hasLanguage(n.document.languageId)){e.globalState.update(u,!1),t.dispose();const n=i.l10n.t("Configure");await i.window.showInformationMessage(i.l10n.t("VS Code now has built-in support for auto-renaming tags. Do you want to enable it?"),n)===n&&i.commands.executeCommand("workbench.action.openSettings",p.linkedEditing)}}));e.subscriptions.push(t)}}let l;return s.onDidChange((()=>{l&&l.dispose(),l=o.timer.setTimeout((async()=>{if(a){r.appendLine("Extensions have changed, restarting HTML server..."),r.appendLine("");const e=a;a=void 0,await e.dispose(),a=await m(s,n,r,o)}}),2e3)})),{dispose:async()=>{l?.dispose(),await(a?.dispose()),r.dispose()}}};const i=n(9496),o=n(7053),r=n(3582),s=n(1438),a=n(6058),c=n(4253);var u,l,d,h,g,p;async function m(e,n,c,m){const f=[],v=e.documentSelector;let y;const C={documentSelector:v,synchronize:{configurationSection:["html","css","javascript","js/ts"]},initializationOptions:{embeddedLanguages:{css:!0,javascript:!0},handledSchemas:["file"],provideFormatter:!1,customCapabilities:{rangeFormatting:{editLimit:1e4}}},middleware:{provideCompletionItem(e,t,n,o,r){function s(e){const n=e.range;n instanceof i.Range&&n.end.isAfter(t)&&n.start.isBeforeOrEqual(t)&&(e.range={inserting:new i.Range(n.start,t),replacing:n})}function a(e){return e&&(Array.isArray(e)?e:e.items).forEach(s),e}const c=r(e,t,n,o);return(u=c)&&u.then?c.then(a):a(c);var u}}};C.outputChannel=c;const D=n("html",t.languageServerDescription,C);D.registerProposedFeatures(),await D.start(),f.push((0,r.serveFileSystemRequests)(D,m));const b=(0,s.getCustomDataSource)(m,f);D.sendNotification(u.type,b.uris),b.onDidChange((()=>{D.sendNotification(u.type,b.uris)}),void 0,f),f.push(D.onRequest(l.type,b.getContent));const R=(0,a.activateAutoInsertion)(((e,t,n)=>{const i={kind:e,textDocument:D.code2ProtocolConverter.asTextDocumentIdentifier(t),position:D.code2ProtocolConverter.asPosition(n)};return D.sendRequest(d.type,i)}),e,m);f.push(R);const w=D.onTelemetry((e=>{m.telemetry?.sendTelemetryEvent(e.key,e.data)}));function S(){const e=i.workspace.getConfiguration().get(p.formatEnable);!e&&y?(y.dispose(),y=void 0):e&&!y&&(y=i.languages.registerDocumentRangeFormattingEditProvider(v,{provideDocumentRangeFormattingEdits(e,t,n,r){const s=i.workspace.getConfiguration("files",e),a={trimTrailingWhitespace:s.get("trimTrailingWhitespace"),trimFinalNewlines:s.get("trimFinalNewlines"),insertFinalNewline:s.get("insertFinalNewline")},c={textDocument:D.code2ProtocolConverter.asTextDocumentIdentifier(e),range:D.code2ProtocolConverter.asRange(t),options:D.code2ProtocolConverter.asFormattingOptions(n,a)};return D.sendRequest(o.DocumentRangeFormattingRequest.type,c,r).then(D.protocol2CodeConverter.asTextEdits,(e=>(D.handleFailedRequest(o.DocumentRangeFormattingRequest.type,void 0,e,[]),Promise.resolve([]))))}}))}f.push(w),S(),f.push({dispose:()=>y&&y.dispose()}),f.push(i.workspace.onDidChangeConfiguration((e=>e.affectsConfiguration(p.formatEnable)&&S()))),D.sendRequest(g.type).then((e=>{if(e){const t={provideDocumentSemanticTokens(e){const t={textDocument:D.code2ProtocolConverter.asTextDocumentIdentifier(e)};return D.sendRequest(h.type,t).then((e=>e&&new i.SemanticTokens(new Uint32Array(e))))},provideDocumentRangeSemanticTokens(e,t){const n={textDocument:D.code2ProtocolConverter.asTextDocumentIdentifier(e),ranges:[D.code2ProtocolConverter.asRange(t)]};return D.sendRequest(h.type,n).then((e=>e&&new i.SemanticTokens(new Uint32Array(e))))}};f.push(i.languages.registerDocumentSemanticTokensProvider(v,t,new i.SemanticTokensLegend(e.types,e.modifiers)))}}));const T=/^(\s*)(<(!(-(-\s*(#\w*)?)?)?)?)?$/,_=/^(\s*)(<(h(t(m(l)?)?)?)?)?$/;return f.push(i.languages.registerCompletionItemProvider(v,{provideCompletionItems(e,t){const n=[],o=e.getText(new i.Range(new i.Position(t.line,0),t)),r=o.match(T);if(r){const e=new i.Range(new i.Position(t.line,r[1].length),t),o=new i.CompletionItem("#region",i.CompletionItemKind.Snippet);o.range=e,o.insertText=new i.SnippetString("\x3c!-- #region $1--\x3e"),o.documentation=i.l10n.t("Folding Region Start"),o.filterText=r[2],o.sortText="za",n.push(o);const s=new i.CompletionItem("#endregion",i.CompletionItemKind.Snippet);s.range=e,s.insertText=new i.SnippetString("\x3c!-- #endregion --\x3e"),s.documentation=i.l10n.t("Folding Region End"),s.filterText=r[2],s.sortText="zb",n.push(s)}const s=o.match(_);if(s&&e.getText(new i.Range(new i.Position(0,0),t)).match(_)){const e=new i.Range(new i.Position(t.line,s[1].length),t),o=new i.CompletionItem("HTML sample",i.CompletionItemKind.Snippet);o.range=e;const r=["<!DOCTYPE html>","<html>","<head>","\t<meta charset='utf-8'>","\t<meta http-equiv='X-UA-Compatible' content='IE=edge'>","\t<title>${1:Page Title}</title>","\t<meta name='viewport' content='width=device-width, initial-scale=1'>","\t<link rel='stylesheet' type='text/css' media='screen' href='${2:main.css}'>","\t<script src='${3:main.js}'><\/script>","</head>","<body>","\t$0","</body>","</html>"].join("\n");o.insertText=new i.SnippetString(r),o.documentation=i.l10n.t("Simple HTML5 starting point"),o.filterText=s[2],o.sortText="za",n.push(o)}return n}})),{dispose:async()=>{await D.stop(),f.forEach((e=>e.dispose())),y?.dispose()}}}!function(e){e.type=new o.NotificationType("html/customDataChanged")}(u||(u={})),function(e){e.type=new o.RequestType("html/customDataContent")}(l||(l={})),function(e){e.type=new o.RequestType("html/autoInsert")}(d||(d={})),function(e){e.type=new o.RequestType("html/semanticTokens")}(h||(h={})),function(e){e.type=new o.RequestType0("html/semanticTokenLegend")}(g||(g={})),function(e){e.linkedEditing="editor.linkedEditing",e.formatEnable="html.format.enable"}(p||(p={})),t.languageServerDescription=i.l10n.t("HTML Language Server")},4253:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getLanguageParticipants=function(){const e=new i.EventEmitter;let t=new Set,n=new Set;function r(){const e=t,r=n;t=new Set,t.add("html"),n=new Set,n.add("html");for(const e of i.extensions.allAcrossExtensionHosts){const i=e.packageJSON?.contributes?.htmlLanguageParticipants;if(Array.isArray(i))for(const e of i){const i=e.languageId;"string"==typeof i&&(t.add(i),!1!==e.autoInsert&&n.add(i))}}return!o(t,e)||!o(n,r)}r();const s=i.extensions.onDidChange((t=>{r()&&e.fire()}));return{onDidChange:e.event,get documentSelector(){return Array.from(t)},hasLanguage:e=>t.has(e),useAutoInsert:e=>n.has(e),dispose:()=>s.dispose()}};const i=n(9496);function o(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}},3582:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileType=t.FsReadDirRequest=t.FsStatRequest=void 0,t.serveFileSystemRequests=function(e,t){const n=[];return n.push(e.onRequest(s.type,(e=>{const n=i.Uri.parse(e);return"file"===n.scheme&&t.fileFs?t.fileFs.readDirectory(e):i.workspace.fs.readDirectory(n)}))),n.push(e.onRequest(r.type,(e=>{const n=i.Uri.parse(e);return"file"===n.scheme&&t.fileFs?t.fileFs.stat(e):i.workspace.fs.stat(n)}))),i.Disposable.from(...n)};const i=n(9496),o=n(7053);var r,s,a;!function(e){e.type=new o.RequestType("fs/stat")}(r||(t.FsStatRequest=r={})),function(e){e.type=new o.RequestType("fs/readDir")}(s||(t.FsReadDirRequest=s={})),function(e){e[e.Unknown=0]="Unknown",e[e.File=1]="File",e[e.Directory=2]="Directory",e[e.SymbolicLink=64]="SymbolicLink"}(a||(t.FileType=a={}))},9496:e=>{"use strict";e.exports=require("vscode")},1516:(e,t,n)=>{"use strict";var i,o,r,s,a,c,u,l,d,h,g,p,m,f,v,y,C,D,b,R,w,S,T,_,k,P,x,q,F,O,E,M,I,N,L,A,j,H,K,W,U,$,z,V,B,J,Q,X,G,Y,Z,ee,te,ne,ie,oe,re,se,ae,ce,ue,le,de,he,ge,pe,me,fe,ve,ye,Ce,De,be,Re,we,Se,Te,_e;n.r(t),n.d(t,{AnnotatedTextEdit:()=>T,ChangeAnnotation:()=>w,ChangeAnnotationIdentifier:()=>S,CodeAction:()=>re,CodeActionContext:()=>oe,CodeActionKind:()=>ne,CodeActionTriggerKind:()=>ie,CodeDescription:()=>C,CodeLens:()=>se,Color:()=>d,ColorInformation:()=>h,ColorPresentation:()=>g,Command:()=>b,CompletionItem:()=>U,CompletionItemKind:()=>L,CompletionItemLabelDetails:()=>W,CompletionItemTag:()=>j,CompletionList:()=>$,CreateFile:()=>k,DeleteFile:()=>x,Diagnostic:()=>D,DiagnosticRelatedInformation:()=>f,DiagnosticSeverity:()=>v,DiagnosticTag:()=>y,DocumentHighlight:()=>X,DocumentHighlightKind:()=>Q,DocumentLink:()=>ce,DocumentSymbol:()=>te,DocumentUri:()=>i,EOL:()=>qe,FoldingRange:()=>m,FoldingRangeKind:()=>p,FormattingOptions:()=>ae,Hover:()=>V,InlayHint:()=>Ce,InlayHintKind:()=>ve,InlayHintLabelPart:()=>ye,InlineCompletionContext:()=>Te,InlineCompletionItem:()=>be,InlineCompletionList:()=>Re,InlineCompletionTriggerKind:()=>we,InlineValueContext:()=>fe,InlineValueEvaluatableExpression:()=>me,InlineValueText:()=>ge,InlineValueVariableLookup:()=>pe,InsertReplaceEdit:()=>H,InsertTextFormat:()=>A,InsertTextMode:()=>K,Location:()=>u,LocationLink:()=>l,MarkedString:()=>z,MarkupContent:()=>N,MarkupKind:()=>I,OptionalVersionedTextDocumentIdentifier:()=>E,ParameterInformation:()=>B,Position:()=>a,Range:()=>c,RenameFile:()=>P,SelectedCompletionInfo:()=>Se,SelectionRange:()=>ue,SemanticTokenModifiers:()=>de,SemanticTokenTypes:()=>le,SemanticTokens:()=>he,SignatureInformation:()=>J,StringValue:()=>De,SymbolInformation:()=>Z,SymbolKind:()=>G,SymbolTag:()=>Y,TextDocument:()=>Fe,TextDocumentEdit:()=>_,TextDocumentIdentifier:()=>F,TextDocumentItem:()=>M,TextEdit:()=>R,URI:()=>o,VersionedTextDocumentIdentifier:()=>O,WorkspaceChange:()=>xe,WorkspaceEdit:()=>q,WorkspaceFolder:()=>_e,WorkspaceSymbol:()=>ee,integer:()=>r,uinteger:()=>s}),function(e){e.is=function(e){return"string"==typeof e}}(i||(i={})),function(e){e.is=function(e){return"string"==typeof e}}(o||(o={})),function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647,e.is=function(t){return"number"==typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}}(r||(r={})),function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647,e.is=function(t){return"number"==typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}}(s||(s={})),function(e){e.create=function(e,t){return e===Number.MAX_VALUE&&(e=s.MAX_VALUE),t===Number.MAX_VALUE&&(t=s.MAX_VALUE),{line:e,character:t}},e.is=function(e){let t=e;return Oe.objectLiteral(t)&&Oe.uinteger(t.line)&&Oe.uinteger(t.character)}}(a||(a={})),function(e){e.create=function(e,t,n,i){if(Oe.uinteger(e)&&Oe.uinteger(t)&&Oe.uinteger(n)&&Oe.uinteger(i))return{start:a.create(e,t),end:a.create(n,i)};if(a.is(e)&&a.is(t))return{start:e,end:t};throw new Error(`Range#create called with invalid arguments[${e}, ${t}, ${n}, ${i}]`)},e.is=function(e){let t=e;return Oe.objectLiteral(t)&&a.is(t.start)&&a.is(t.end)}}(c||(c={})),function(e){e.create=function(e,t){return{uri:e,range:t}},e.is=function(e){let t=e;return Oe.objectLiteral(t)&&c.is(t.range)&&(Oe.string(t.uri)||Oe.undefined(t.uri))}}(u||(u={})),function(e){e.create=function(e,t,n,i){return{targetUri:e,targetRange:t,targetSelectionRange:n,originSelectionRange:i}},e.is=function(e){let t=e;return Oe.objectLiteral(t)&&c.is(t.targetRange)&&Oe.string(t.targetUri)&&c.is(t.targetSelectionRange)&&(c.is(t.originSelectionRange)||Oe.undefined(t.originSelectionRange))}}(l||(l={})),function(e){e.create=function(e,t,n,i){return{red:e,green:t,blue:n,alpha:i}},e.is=function(e){const t=e;return Oe.objectLiteral(t)&&Oe.numberRange(t.red,0,1)&&Oe.numberRange(t.green,0,1)&&Oe.numberRange(t.blue,0,1)&&Oe.numberRange(t.alpha,0,1)}}(d||(d={})),function(e){e.create=function(e,t){return{range:e,color:t}},e.is=function(e){const t=e;return Oe.objectLiteral(t)&&c.is(t.range)&&d.is(t.color)}}(h||(h={})),function(e){e.create=function(e,t,n){return{label:e,textEdit:t,additionalTextEdits:n}},e.is=function(e){const t=e;return Oe.objectLiteral(t)&&Oe.string(t.label)&&(Oe.undefined(t.textEdit)||R.is(t))&&(Oe.undefined(t.additionalTextEdits)||Oe.typedArray(t.additionalTextEdits,R.is))}}(g||(g={})),function(e){e.Comment="comment",e.Imports="imports",e.Region="region"}(p||(p={})),function(e){e.create=function(e,t,n,i,o,r){const s={startLine:e,endLine:t};return Oe.defined(n)&&(s.startCharacter=n),Oe.defined(i)&&(s.endCharacter=i),Oe.defined(o)&&(s.kind=o),Oe.defined(r)&&(s.collapsedText=r),s},e.is=function(e){const t=e;return Oe.objectLiteral(t)&&Oe.uinteger(t.startLine)&&Oe.uinteger(t.startLine)&&(Oe.undefined(t.startCharacter)||Oe.uinteger(t.startCharacter))&&(Oe.undefined(t.endCharacter)||Oe.uinteger(t.endCharacter))&&(Oe.undefined(t.kind)||Oe.string(t.kind))}}(m||(m={})),function(e){e.create=function(e,t){return{location:e,message:t}},e.is=function(e){let t=e;return Oe.defined(t)&&u.is(t.location)&&Oe.string(t.message)}}(f||(f={})),function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4}(v||(v={})),function(e){e.Unnecessary=1,e.Deprecated=2}(y||(y={})),function(e){e.is=function(e){const t=e;return Oe.objectLiteral(t)&&Oe.string(t.href)}}(C||(C={})),function(e){e.create=function(e,t,n,i,o,r){let s={range:e,message:t};return Oe.defined(n)&&(s.severity=n),Oe.defined(i)&&(s.code=i),Oe.defined(o)&&(s.source=o),Oe.defined(r)&&(s.relatedInformation=r),s},e.is=function(e){var t;let n=e;return Oe.defined(n)&&c.is(n.range)&&Oe.string(n.message)&&(Oe.number(n.severity)||Oe.undefined(n.severity))&&(Oe.integer(n.code)||Oe.string(n.code)||Oe.undefined(n.code))&&(Oe.undefined(n.codeDescription)||Oe.string(null===(t=n.codeDescription)||void 0===t?void 0:t.href))&&(Oe.string(n.source)||Oe.undefined(n.source))&&(Oe.undefined(n.relatedInformation)||Oe.typedArray(n.relatedInformation,f.is))}}(D||(D={})),function(e){e.create=function(e,t,...n){let i={title:e,command:t};return Oe.defined(n)&&n.length>0&&(i.arguments=n),i},e.is=function(e){let t=e;return Oe.defined(t)&&Oe.string(t.title)&&Oe.string(t.command)}}(b||(b={})),function(e){e.replace=function(e,t){return{range:e,newText:t}},e.insert=function(e,t){return{range:{start:e,end:e},newText:t}},e.del=function(e){return{range:e,newText:""}},e.is=function(e){const t=e;return Oe.objectLiteral(t)&&Oe.string(t.newText)&&c.is(t.range)}}(R||(R={})),function(e){e.create=function(e,t,n){const i={label:e};return void 0!==t&&(i.needsConfirmation=t),void 0!==n&&(i.description=n),i},e.is=function(e){const t=e;return Oe.objectLiteral(t)&&Oe.string(t.label)&&(Oe.boolean(t.needsConfirmation)||void 0===t.needsConfirmation)&&(Oe.string(t.description)||void 0===t.description)}}(w||(w={})),function(e){e.is=function(e){const t=e;return Oe.string(t)}}(S||(S={})),function(e){e.replace=function(e,t,n){return{range:e,newText:t,annotationId:n}},e.insert=function(e,t,n){return{range:{start:e,end:e},newText:t,annotationId:n}},e.del=function(e,t){return{range:e,newText:"",annotationId:t}},e.is=function(e){const t=e;return R.is(t)&&(w.is(t.annotationId)||S.is(t.annotationId))}}(T||(T={})),function(e){e.create=function(e,t){return{textDocument:e,edits:t}},e.is=function(e){let t=e;return Oe.defined(t)&&E.is(t.textDocument)&&Array.isArray(t.edits)}}(_||(_={})),function(e){e.create=function(e,t,n){let i={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(i.options=t),void 0!==n&&(i.annotationId=n),i},e.is=function(e){let t=e;return t&&"create"===t.kind&&Oe.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||Oe.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Oe.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||S.is(t.annotationId))}}(k||(k={})),function(e){e.create=function(e,t,n,i){let o={kind:"rename",oldUri:e,newUri:t};return void 0===n||void 0===n.overwrite&&void 0===n.ignoreIfExists||(o.options=n),void 0!==i&&(o.annotationId=i),o},e.is=function(e){let t=e;return t&&"rename"===t.kind&&Oe.string(t.oldUri)&&Oe.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||Oe.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Oe.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||S.is(t.annotationId))}}(P||(P={})),function(e){e.create=function(e,t,n){let i={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(i.options=t),void 0!==n&&(i.annotationId=n),i},e.is=function(e){let t=e;return t&&"delete"===t.kind&&Oe.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||Oe.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||Oe.boolean(t.options.ignoreIfNotExists)))&&(void 0===t.annotationId||S.is(t.annotationId))}}(x||(x={})),function(e){e.is=function(e){let t=e;return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every((e=>Oe.string(e.kind)?k.is(e)||P.is(e)||x.is(e):_.is(e))))}}(q||(q={}));class ke{constructor(e,t){this.edits=e,this.changeAnnotations=t}insert(e,t,n){let i,o;if(void 0===n?i=R.insert(e,t):S.is(n)?(o=n,i=T.insert(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),o=this.changeAnnotations.manage(n),i=T.insert(e,t,o)),this.edits.push(i),void 0!==o)return o}replace(e,t,n){let i,o;if(void 0===n?i=R.replace(e,t):S.is(n)?(o=n,i=T.replace(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),o=this.changeAnnotations.manage(n),i=T.replace(e,t,o)),this.edits.push(i),void 0!==o)return o}delete(e,t){let n,i;if(void 0===t?n=R.del(e):S.is(t)?(i=t,n=T.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(t),n=T.del(e,i)),this.edits.push(n),void 0!==i)return i}add(e){this.edits.push(e)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(e){if(void 0===e)throw new Error("Text edit change is not configured to manage change annotations.")}}class Pe{constructor(e){this._annotations=void 0===e?Object.create(null):e,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(e,t){let n;if(S.is(e)?n=e:(n=this.nextId(),t=e),void 0!==this._annotations[n])throw new Error(`Id ${n} is already in use.`);if(void 0===t)throw new Error(`No annotation provided for id ${n}`);return this._annotations[n]=t,this._size++,n}nextId(){return this._counter++,this._counter.toString()}}class xe{constructor(e){this._textEditChanges=Object.create(null),void 0!==e?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new Pe(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach((e=>{if(_.is(e)){const t=new ke(e.edits,this._changeAnnotations);this._textEditChanges[e.textDocument.uri]=t}}))):e.changes&&Object.keys(e.changes).forEach((t=>{const n=new ke(e.changes[t]);this._textEditChanges[t]=n}))):this._workspaceEdit={}}get edit(){return this.initDocumentChanges(),void 0!==this._changeAnnotations&&(0===this._changeAnnotations.size?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(e){if(E.is(e)){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");const t={uri:e.uri,version:e.version};let n=this._textEditChanges[t.uri];if(!n){const e=[],i={textDocument:t,edits:e};this._workspaceEdit.documentChanges.push(i),n=new ke(e,this._changeAnnotations),this._textEditChanges[t.uri]=n}return n}{if(this.initChanges(),void 0===this._workspaceEdit.changes)throw new Error("Workspace edit is not configured for normal text edit changes.");let t=this._textEditChanges[e];if(!t){let n=[];this._workspaceEdit.changes[e]=n,t=new ke(n),this._textEditChanges[e]=t}return t}}initDocumentChanges(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._changeAnnotations=new Pe,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._workspaceEdit.changes=Object.create(null))}createFile(e,t,n){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");let i,o,r;if(w.is(t)||S.is(t)?i=t:n=t,void 0===i?o=k.create(e,n):(r=S.is(i)?i:this._changeAnnotations.manage(i),o=k.create(e,n,r)),this._workspaceEdit.documentChanges.push(o),void 0!==r)return r}renameFile(e,t,n,i){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");let o,r,s;if(w.is(n)||S.is(n)?o=n:i=n,void 0===o?r=P.create(e,t,i):(s=S.is(o)?o:this._changeAnnotations.manage(o),r=P.create(e,t,i,s)),this._workspaceEdit.documentChanges.push(r),void 0!==s)return s}deleteFile(e,t,n){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");let i,o,r;if(w.is(t)||S.is(t)?i=t:n=t,void 0===i?o=x.create(e,n):(r=S.is(i)?i:this._changeAnnotations.manage(i),o=x.create(e,n,r)),this._workspaceEdit.documentChanges.push(o),void 0!==r)return r}}!function(e){e.create=function(e){return{uri:e}},e.is=function(e){let t=e;return Oe.defined(t)&&Oe.string(t.uri)}}(F||(F={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){let t=e;return Oe.defined(t)&&Oe.string(t.uri)&&Oe.integer(t.version)}}(O||(O={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){let t=e;return Oe.defined(t)&&Oe.string(t.uri)&&(null===t.version||Oe.integer(t.version))}}(E||(E={})),function(e){e.create=function(e,t,n,i){return{uri:e,languageId:t,version:n,text:i}},e.is=function(e){let t=e;return Oe.defined(t)&&Oe.string(t.uri)&&Oe.string(t.languageId)&&Oe.integer(t.version)&&Oe.string(t.text)}}(M||(M={})),function(e){e.PlainText="plaintext",e.Markdown="markdown",e.is=function(t){const n=t;return n===e.PlainText||n===e.Markdown}}(I||(I={})),function(e){e.is=function(e){const t=e;return Oe.objectLiteral(e)&&I.is(t.kind)&&Oe.string(t.value)}}(N||(N={})),function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25}(L||(L={})),function(e){e.PlainText=1,e.Snippet=2}(A||(A={})),function(e){e.Deprecated=1}(j||(j={})),function(e){e.create=function(e,t,n){return{newText:e,insert:t,replace:n}},e.is=function(e){const t=e;return t&&Oe.string(t.newText)&&c.is(t.insert)&&c.is(t.replace)}}(H||(H={})),function(e){e.asIs=1,e.adjustIndentation=2}(K||(K={})),function(e){e.is=function(e){const t=e;return t&&(Oe.string(t.detail)||void 0===t.detail)&&(Oe.string(t.description)||void 0===t.description)}}(W||(W={})),function(e){e.create=function(e){return{label:e}}}(U||(U={})),function(e){e.create=function(e,t){return{items:e||[],isIncomplete:!!t}}}($||($={})),function(e){e.fromPlainText=function(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")},e.is=function(e){const t=e;return Oe.string(t)||Oe.objectLiteral(t)&&Oe.string(t.language)&&Oe.string(t.value)}}(z||(z={})),function(e){e.is=function(e){let t=e;return!!t&&Oe.objectLiteral(t)&&(N.is(t.contents)||z.is(t.contents)||Oe.typedArray(t.contents,z.is))&&(void 0===e.range||c.is(e.range))}}(V||(V={})),function(e){e.create=function(e,t){return t?{label:e,documentation:t}:{label:e}}}(B||(B={})),function(e){e.create=function(e,t,...n){let i={label:e};return Oe.defined(t)&&(i.documentation=t),Oe.defined(n)?i.parameters=n:i.parameters=[],i}}(J||(J={})),function(e){e.Text=1,e.Read=2,e.Write=3}(Q||(Q={})),function(e){e.create=function(e,t){let n={range:e};return Oe.number(t)&&(n.kind=t),n}}(X||(X={})),function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26}(G||(G={})),function(e){e.Deprecated=1}(Y||(Y={})),function(e){e.create=function(e,t,n,i,o){let r={name:e,kind:t,location:{uri:i,range:n}};return o&&(r.containerName=o),r}}(Z||(Z={})),function(e){e.create=function(e,t,n,i){return void 0!==i?{name:e,kind:t,location:{uri:n,range:i}}:{name:e,kind:t,location:{uri:n}}}}(ee||(ee={})),function(e){e.create=function(e,t,n,i,o,r){let s={name:e,detail:t,kind:n,range:i,selectionRange:o};return void 0!==r&&(s.children=r),s},e.is=function(e){let t=e;return t&&Oe.string(t.name)&&Oe.number(t.kind)&&c.is(t.range)&&c.is(t.selectionRange)&&(void 0===t.detail||Oe.string(t.detail))&&(void 0===t.deprecated||Oe.boolean(t.deprecated))&&(void 0===t.children||Array.isArray(t.children))&&(void 0===t.tags||Array.isArray(t.tags))}}(te||(te={})),function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"}(ne||(ne={})),function(e){e.Invoked=1,e.Automatic=2}(ie||(ie={})),function(e){e.create=function(e,t,n){let i={diagnostics:e};return null!=t&&(i.only=t),null!=n&&(i.triggerKind=n),i},e.is=function(e){let t=e;return Oe.defined(t)&&Oe.typedArray(t.diagnostics,D.is)&&(void 0===t.only||Oe.typedArray(t.only,Oe.string))&&(void 0===t.triggerKind||t.triggerKind===ie.Invoked||t.triggerKind===ie.Automatic)}}(oe||(oe={})),function(e){e.create=function(e,t,n){let i={title:e},o=!0;return"string"==typeof t?(o=!1,i.kind=t):b.is(t)?i.command=t:i.edit=t,o&&void 0!==n&&(i.kind=n),i},e.is=function(e){let t=e;return t&&Oe.string(t.title)&&(void 0===t.diagnostics||Oe.typedArray(t.diagnostics,D.is))&&(void 0===t.kind||Oe.string(t.kind))&&(void 0!==t.edit||void 0!==t.command)&&(void 0===t.command||b.is(t.command))&&(void 0===t.isPreferred||Oe.boolean(t.isPreferred))&&(void 0===t.edit||q.is(t.edit))}}(re||(re={})),function(e){e.create=function(e,t){let n={range:e};return Oe.defined(t)&&(n.data=t),n},e.is=function(e){let t=e;return Oe.defined(t)&&c.is(t.range)&&(Oe.undefined(t.command)||b.is(t.command))}}(se||(se={})),function(e){e.create=function(e,t){return{tabSize:e,insertSpaces:t}},e.is=function(e){let t=e;return Oe.defined(t)&&Oe.uinteger(t.tabSize)&&Oe.boolean(t.insertSpaces)}}(ae||(ae={})),function(e){e.create=function(e,t,n){return{range:e,target:t,data:n}},e.is=function(e){let t=e;return Oe.defined(t)&&c.is(t.range)&&(Oe.undefined(t.target)||Oe.string(t.target))}}(ce||(ce={})),function(e){e.create=function(e,t){return{range:e,parent:t}},e.is=function(t){let n=t;return Oe.objectLiteral(n)&&c.is(n.range)&&(void 0===n.parent||e.is(n.parent))}}(ue||(ue={})),function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator"}(le||(le={})),function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"}(de||(de={})),function(e){e.is=function(e){const t=e;return Oe.objectLiteral(t)&&(void 0===t.resultId||"string"==typeof t.resultId)&&Array.isArray(t.data)&&(0===t.data.length||"number"==typeof t.data[0])}}(he||(he={})),function(e){e.create=function(e,t){return{range:e,text:t}},e.is=function(e){const t=e;return null!=t&&c.is(t.range)&&Oe.string(t.text)}}(ge||(ge={})),function(e){e.create=function(e,t,n){return{range:e,variableName:t,caseSensitiveLookup:n}},e.is=function(e){const t=e;return null!=t&&c.is(t.range)&&Oe.boolean(t.caseSensitiveLookup)&&(Oe.string(t.variableName)||void 0===t.variableName)}}(pe||(pe={})),function(e){e.create=function(e,t){return{range:e,expression:t}},e.is=function(e){const t=e;return null!=t&&c.is(t.range)&&(Oe.string(t.expression)||void 0===t.expression)}}(me||(me={})),function(e){e.create=function(e,t){return{frameId:e,stoppedLocation:t}},e.is=function(e){const t=e;return Oe.defined(t)&&c.is(e.stoppedLocation)}}(fe||(fe={})),function(e){e.Type=1,e.Parameter=2,e.is=function(e){return 1===e||2===e}}(ve||(ve={})),function(e){e.create=function(e){return{value:e}},e.is=function(e){const t=e;return Oe.objectLiteral(t)&&(void 0===t.tooltip||Oe.string(t.tooltip)||N.is(t.tooltip))&&(void 0===t.location||u.is(t.location))&&(void 0===t.command||b.is(t.command))}}(ye||(ye={})),function(e){e.create=function(e,t,n){const i={position:e,label:t};return void 0!==n&&(i.kind=n),i},e.is=function(e){const t=e;return Oe.objectLiteral(t)&&a.is(t.position)&&(Oe.string(t.label)||Oe.typedArray(t.label,ye.is))&&(void 0===t.kind||ve.is(t.kind))&&void 0===t.textEdits||Oe.typedArray(t.textEdits,R.is)&&(void 0===t.tooltip||Oe.string(t.tooltip)||N.is(t.tooltip))&&(void 0===t.paddingLeft||Oe.boolean(t.paddingLeft))&&(void 0===t.paddingRight||Oe.boolean(t.paddingRight))}}(Ce||(Ce={})),function(e){e.createSnippet=function(e){return{kind:"snippet",value:e}}}(De||(De={})),function(e){e.create=function(e,t,n,i){return{insertText:e,filterText:t,range:n,command:i}}}(be||(be={})),function(e){e.create=function(e){return{items:e}}}(Re||(Re={})),function(e){e.Invoked=0,e.Automatic=1}(we||(we={})),function(e){e.create=function(e,t){return{range:e,text:t}}}(Se||(Se={})),function(e){e.create=function(e,t){return{triggerKind:e,selectedCompletionInfo:t}}}(Te||(Te={})),function(e){e.is=function(e){const t=e;return Oe.objectLiteral(t)&&o.is(t.uri)&&Oe.string(t.name)}}(_e||(_e={}));const qe=["\n","\r\n","\r"];var Fe,Oe;!function(e){function t(e,n){if(e.length<=1)return e;const i=e.length/2|0,o=e.slice(0,i),r=e.slice(i);t(o,n),t(r,n);let s=0,a=0,c=0;for(;s<o.length&&a<r.length;){let t=n(o[s],r[a]);e[c++]=t<=0?o[s++]:r[a++]}for(;s<o.length;)e[c++]=o[s++];for(;a<r.length;)e[c++]=r[a++];return e}e.create=function(e,t,n,i){return new Ee(e,t,n,i)},e.is=function(e){let t=e;return!!(Oe.defined(t)&&Oe.string(t.uri)&&(Oe.undefined(t.languageId)||Oe.string(t.languageId))&&Oe.uinteger(t.lineCount)&&Oe.func(t.getText)&&Oe.func(t.positionAt)&&Oe.func(t.offsetAt))},e.applyEdits=function(e,n){let i=e.getText(),o=t(n,((e,t)=>{let n=e.range.start.line-t.range.start.line;return 0===n?e.range.start.character-t.range.start.character:n})),r=i.length;for(let t=o.length-1;t>=0;t--){let n=o[t],s=e.offsetAt(n.range.start),a=e.offsetAt(n.range.end);if(!(a<=r))throw new Error("Overlapping edit");i=i.substring(0,s)+n.newText+i.substring(a,i.length),r=s}return i}}(Fe||(Fe={}));class Ee{constructor(e,t,n,i){this._uri=e,this._languageId=t,this._version=n,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content}update(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0}getLineOffsets(){if(void 0===this._lineOffsets){let e=[],t=this._content,n=!0;for(let i=0;i<t.length;i++){n&&(e.push(i),n=!1);let o=t.charAt(i);n="\r"===o||"\n"===o,"\r"===o&&i+1<t.length&&"\n"===t.charAt(i+1)&&i++}n&&t.length>0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),n=0,i=t.length;if(0===i)return a.create(0,e);for(;n<i;){let o=Math.floor((n+i)/2);t[o]>e?i=o:n=o+1}let o=n-1;return a.create(o,e-t[o])}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let n=t[e.line],i=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(n+e.character,i),n)}get lineCount(){return this.getLineOffsets().length}}!function(e){const t=Object.prototype.toString;e.defined=function(e){return void 0!==e},e.undefined=function(e){return void 0===e},e.boolean=function(e){return!0===e||!1===e},e.string=function(e){return"[object String]"===t.call(e)},e.number=function(e){return"[object Number]"===t.call(e)},e.numberRange=function(e,n,i){return"[object Number]"===t.call(e)&&n<=e&&e<=i},e.integer=function(e){return"[object Number]"===t.call(e)&&-2147483648<=e&&e<=2147483647},e.uinteger=function(e){return"[object Number]"===t.call(e)&&0<=e&&e<=2147483647},e.func=function(e){return"[object Function]"===t.call(e)},e.objectLiteral=function(e){return null!==e&&"object"==typeof e},e.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)}}(Oe||(Oe={}))}},t={};function n(i){var o=t[i];if(void 0!==o)return o.exports;var r=t[i]={exports:{}};return e[i].call(r.exports,r,r.exports,n),r.exports}n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};(()=>{"use strict";var e=i;Object.defineProperty(e,"__esModule",{value:!0}),e.activate=async function(e){const n=t.Uri.joinPath(e.extensionUri,"server/dist/browser/htmlServerMain.js");try{const i=new Worker(n.toString());i.postMessage({i10lLocation:t.l10n.uri?.toString(!1)??""});const a=(e,t,n)=>new r.LanguageClient(e,t,n,i),c={setTimeout(e,t,...n){const i=setTimeout(e,t,...n);return{dispose:()=>clearTimeout(i)}}};s=await(0,o.startClient)(e,a,{TextDecoder,timer:c})}catch(e){console.log(e)}},e.deactivate=async function(){s&&(await s.dispose(),s=void 0)};const t=n(9496),o=n(8890),r=n(4970);let s})();var o=exports;for(var r in i)o[r]=i[r];i.__esModule&&Object.defineProperty(o,"__esModule",{value:!0})})();
|
|
1
|
+
(()=>{var e={838:e=>{"use strict";function t(e,t,o){e instanceof RegExp&&(e=n(e,o)),t instanceof RegExp&&(t=n(t,o));var r=i(e,t,o);return r&&{start:r[0],end:r[1],pre:o.slice(0,r[0]),body:o.slice(r[0]+e.length,r[1]),post:o.slice(r[1]+t.length)}}function n(e,t){var n=t.match(e);return n?n[0]:null}function i(e,t,n){var i,o,r,s,a,c=n.indexOf(e),u=n.indexOf(t,c+1),l=c;if(c>=0&&u>0){for(i=[],r=n.length;l>=0&&!a;)l==c?(i.push(l),c=n.indexOf(e,l+1)):1==i.length?a=[i.pop(),u]:((o=i.pop())<r&&(r=o,s=u),u=n.indexOf(t,l+1)),l=c<u&&c>=0?c:u;i.length&&(a=[r,s])}return a}e.exports=t,t.range=i},5457:(e,t,n)=>{var i=n(838);e.exports=function(e){return e?("{}"===e.substr(0,2)&&(e="\\{\\}"+e.substr(2)),f(function(e){return e.split("\\\\").join(o).split("\\{").join(r).split("\\}").join(s).split("\\,").join(a).split("\\.").join(c)}(e),!0).map(l)):[]};var o="\0SLASH"+Math.random()+"\0",r="\0OPEN"+Math.random()+"\0",s="\0CLOSE"+Math.random()+"\0",a="\0COMMA"+Math.random()+"\0",c="\0PERIOD"+Math.random()+"\0";function u(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function l(e){return e.split(o).join("\\").split(r).join("{").split(s).join("}").split(a).join(",").split(c).join(".")}function d(e){if(!e)return[""];var t=[],n=i("{","}",e);if(!n)return e.split(",");var o=n.pre,r=n.body,s=n.post,a=o.split(",");a[a.length-1]+="{"+r+"}";var c=d(s);return s.length&&(a[a.length-1]+=c.shift(),a.push.apply(a,c)),t.push.apply(t,a),t}function h(e){return"{"+e+"}"}function g(e){return/^-?0\d/.test(e)}function p(e,t){return e<=t}function m(e,t){return e>=t}function f(e,t){var n=[],o=i("{","}",e);if(!o)return[e];var r=o.pre,a=o.post.length?f(o.post,!1):[""];if(/\$$/.test(o.pre))for(var c=0;c<a.length;c++){var l=r+"{"+o.body+"}"+a[c];n.push(l)}else{var v,y,C=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(o.body),D=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(o.body),b=C||D,R=o.body.indexOf(",")>=0;if(!b&&!R)return o.post.match(/,.*\}/)?f(e=o.pre+"{"+o.body+s+o.post):[e];if(b)v=o.body.split(/\.\./);else if(1===(v=d(o.body)).length&&1===(v=f(v[0],!1).map(h)).length)return a.map((function(e){return o.pre+v[0]+e}));if(b){var w=u(v[0]),S=u(v[1]),T=Math.max(v[0].length,v[1].length),_=3==v.length?Math.abs(u(v[2])):1,k=p;S<w&&(_*=-1,k=m);var P=v.some(g);y=[];for(var x=w;k(x,S);x+=_){var q;if(D)"\\"===(q=String.fromCharCode(x))&&(q="");else if(q=String(x),P){var F=T-q.length;if(F>0){var O=new Array(F+1).join("0");q=x<0?"-"+O+q.slice(1):O+q}}y.push(q)}}else{y=[];for(var E=0;E<v.length;E++)y.push.apply(y,f(v[E],!1))}for(E=0;E<y.length;E++)for(c=0;c<a.length;c++)l=r+y[E]+a[c],(!t||b||l)&&n.push(l)}return n}},9121:e=>{const t="object"==typeof process&&process&&!1;e.exports=t?{sep:"\\"}:{sep:"/"}},3707:(e,t,n)=>{const i=e.exports=(e,t,n={})=>(f(t),!(!n.nocomment&&"#"===t.charAt(0))&&new y(t,n).match(e));e.exports=i;const o=n(9121);i.sep=o.sep;const r=Symbol("globstar **");i.GLOBSTAR=r;const s=n(5457),a={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},c="[^/]",u="[^/]*?",l=e=>e.split("").reduce(((e,t)=>(e[t]=!0,e)),{}),d=l("().*{}+?[]^$\\!"),h=l("[.("),g=/\/+/;i.filter=(e,t={})=>(n,o,r)=>i(n,e,t);const p=(e,t={})=>{const n={};return Object.keys(e).forEach((t=>n[t]=e[t])),Object.keys(t).forEach((e=>n[e]=t[e])),n};i.defaults=e=>{if(!e||"object"!=typeof e||!Object.keys(e).length)return i;const t=i,n=(n,i,o)=>t(n,i,p(e,o));return(n.Minimatch=class extends t.Minimatch{constructor(t,n){super(t,p(e,n))}}).defaults=n=>t.defaults(p(e,n)).Minimatch,n.filter=(n,i)=>t.filter(n,p(e,i)),n.defaults=n=>t.defaults(p(e,n)),n.makeRe=(n,i)=>t.makeRe(n,p(e,i)),n.braceExpand=(n,i)=>t.braceExpand(n,p(e,i)),n.match=(n,i,o)=>t.match(n,i,p(e,o)),n},i.braceExpand=(e,t)=>m(e,t);const m=(e,t={})=>(f(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:s(e)),f=e=>{if("string"!=typeof e)throw new TypeError("invalid pattern");if(e.length>65536)throw new TypeError("pattern is too long")},v=Symbol("subparse");i.makeRe=(e,t)=>new y(e,t||{}).makeRe(),i.match=(e,t,n={})=>{const i=new y(t,n);return e=e.filter((e=>i.match(e))),i.options.nonull&&!e.length&&e.push(t),e};class y{constructor(e,t){f(e),t||(t={}),this.options=t,this.set=[],this.pattern=e,this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||!1===t.allowWindowsEscape,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.make()}debug(){}make(){const e=this.pattern,t=this.options;if(!t.nocomment&&"#"===e.charAt(0))return void(this.comment=!0);if(!e)return void(this.empty=!0);this.parseNegate();let n=this.globSet=this.braceExpand();t.debug&&(this.debug=(...e)=>console.error(...e)),this.debug(this.pattern,n),n=this.globParts=n.map((e=>e.split(g))),this.debug(this.pattern,n),n=n.map(((e,t,n)=>e.map(this.parse,this))),this.debug(this.pattern,n),n=n.filter((e=>-1===e.indexOf(!1))),this.debug(this.pattern,n),this.set=n}parseNegate(){if(this.options.nonegate)return;const e=this.pattern;let t=!1,n=0;for(let i=0;i<e.length&&"!"===e.charAt(i);i++)t=!t,n++;n&&(this.pattern=e.slice(n)),this.negate=t}matchOne(e,t,n){var i=this.options;this.debug("matchOne",{this:this,file:e,pattern:t}),this.debug("matchOne",e.length,t.length);for(var o=0,s=0,a=e.length,c=t.length;o<a&&s<c;o++,s++){this.debug("matchOne loop");var u,l=t[s],d=e[o];if(this.debug(t,l,d),!1===l)return!1;if(l===r){this.debug("GLOBSTAR",[t,l,d]);var h=o,g=s+1;if(g===c){for(this.debug("** at the end");o<a;o++)if("."===e[o]||".."===e[o]||!i.dot&&"."===e[o].charAt(0))return!1;return!0}for(;h<a;){var p=e[h];if(this.debug("\nglobstar while",e,h,t,g,p),this.matchOne(e.slice(h),t.slice(g),n))return this.debug("globstar found match!",h,a,p),!0;if("."===p||".."===p||!i.dot&&"."===p.charAt(0)){this.debug("dot detected!",e,h,t,g);break}this.debug("globstar swallow a segment, and continue"),h++}return!(!n||(this.debug("\n>>> no match, partial?",e,h,t,g),h!==a))}if("string"==typeof l?(u=d===l,this.debug("string match",l,d,u)):(u=d.match(l),this.debug("pattern match",l,d,u)),!u)return!1}if(o===a&&s===c)return!0;if(o===a)return n;if(s===c)return o===a-1&&""===e[o];throw new Error("wtf?")}braceExpand(){return m(this.pattern,this.options)}parse(e,t){f(e);const n=this.options;if("**"===e){if(!n.noglobstar)return r;e="*"}if(""===e)return"";let i="",o=!1,s=!1;const l=[],g=[];let p,m,y,C,D=!1,b=-1,R=-1,w="."===e.charAt(0),S=n.dot||w;const T=e=>"."===e.charAt(0)?"":n.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",_=()=>{if(p){switch(p){case"*":i+=u,o=!0;break;case"?":i+=c,o=!0;break;default:i+="\\"+p}this.debug("clearStateChar %j %j",p,i),p=!1}};for(let t,r=0;r<e.length&&(t=e.charAt(r));r++)if(this.debug("%s\t%s %s %j",e,r,i,t),s){if("/"===t)return!1;d[t]&&(i+="\\"),i+=t,s=!1}else switch(t){case"/":return!1;case"\\":if(D&&"-"===e.charAt(r+1)){i+=t;continue}_(),s=!0;continue;case"?":case"*":case"+":case"@":case"!":if(this.debug("%s\t%s %s %j <-- stateChar",e,r,i,t),D){this.debug(" in class"),"!"===t&&r===R+1&&(t="^"),i+=t;continue}this.debug("call clearStateChar %j",p),_(),p=t,n.noext&&_();continue;case"(":{if(D){i+="(";continue}if(!p){i+="\\(";continue}const t={type:p,start:r-1,reStart:i.length,open:a[p].open,close:a[p].close};this.debug(this.pattern,"\t",t),l.push(t),i+=t.open,0===t.start&&"!"!==t.type&&(w=!0,i+=T(e.slice(r+1))),this.debug("plType %j %j",p,i),p=!1;continue}case")":{const e=l[l.length-1];if(D||!e){i+="\\)";continue}l.pop(),_(),o=!0,y=e,i+=y.close,"!"===y.type&&g.push(Object.assign(y,{reEnd:i.length}));continue}case"|":{const t=l[l.length-1];if(D||!t){i+="\\|";continue}_(),i+="|",0===t.start&&"!"!==t.type&&(w=!0,i+=T(e.slice(r+1)));continue}case"[":if(_(),D){i+="\\"+t;continue}D=!0,R=r,b=i.length,i+=t;continue;case"]":if(r===R+1||!D){i+="\\"+t;continue}m=e.substring(R+1,r);try{RegExp("["+(m.replace(/\\([^-\]])/g,"$1").replace(/[[\]\\]/g,"\\$&")+"]")),i+=t}catch(e){i=i.substring(0,b)+"(?:$.)"}o=!0,D=!1;continue;default:_(),!d[t]||"^"===t&&D||(i+="\\"),i+=t}for(D&&(m=e.slice(R+1),C=this.parse(m,v),i=i.substring(0,b)+"\\["+C[0],o=o||C[1]),y=l.pop();y;y=l.pop()){let e;e=i.slice(y.reStart+y.open.length),this.debug("setting tail",i,y),e=e.replace(/((?:\\{2}){0,64})(\\?)\|/g,((e,t,n)=>(n||(n="\\"),t+t+n+"|"))),this.debug("tail=%j\n %s",e,e,y,i);const t="*"===y.type?u:"?"===y.type?c:"\\"+y.type;o=!0,i=i.slice(0,y.reStart)+t+"\\("+e}_(),s&&(i+="\\\\");const k=h[i.charAt(0)];for(let e=g.length-1;e>-1;e--){const n=g[e],o=i.slice(0,n.reStart),r=i.slice(n.reStart,n.reEnd-8);let s=i.slice(n.reEnd);const a=i.slice(n.reEnd-8,n.reEnd)+s,c=o.split(")").length,u=o.split("(").length-c;let l=s;for(let e=0;e<u;e++)l=l.replace(/\)[+*?]?/,"");s=l,i=o+r+s+(""===s&&t!==v?"(?:$|\\/)":"")+a}if(""!==i&&o&&(i="(?=.)"+i),k&&(i=(w?"":S?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)")+i),t===v)return[i,o];if(n.nocase&&!o&&(o=e.toUpperCase()!==e.toLowerCase()),!o)return(e=>e.replace(/\\(.)/g,"$1"))(e);const P=n.nocase?"i":"";try{return Object.assign(new RegExp("^"+i+"$",P),{_glob:e,_src:i})}catch(e){return new RegExp("$.")}}makeRe(){if(this.regexp||!1===this.regexp)return this.regexp;const e=this.set;if(!e.length)return this.regexp=!1,this.regexp;const t=this.options,n=t.noglobstar?u:t.dot?"(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?":"(?:(?!(?:\\/|^)\\.).)*?",i=t.nocase?"i":"";let o=e.map((e=>((e=e.map((e=>"string"==typeof e?e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):e===r?r:e._src)).reduce(((e,t)=>(e[e.length-1]===r&&t===r||e.push(t),e)),[])).forEach(((t,i)=>{t===r&&e[i-1]!==r&&(0===i?e.length>1?e[i+1]="(?:\\/|"+n+"\\/)?"+e[i+1]:e[i]=n:i===e.length-1?e[i-1]+="(?:\\/|"+n+")?":(e[i-1]+="(?:\\/|\\/"+n+"\\/)"+e[i+1],e[i+1]=r))})),e.filter((e=>e!==r)).join("/")))).join("|");o="^(?:"+o+")$",this.negate&&(o="^(?!"+o+").*$");try{this.regexp=new RegExp(o,i)}catch(e){this.regexp=!1}return this.regexp}match(e,t=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return""===e;if("/"===e&&t)return!0;const n=this.options;"/"!==o.sep&&(e=e.split(o.sep).join("/")),e=e.split(g),this.debug(this.pattern,"split",e);const i=this.set;let r;this.debug(this.pattern,"set",i);for(let t=e.length-1;t>=0&&(r=e[t],!r);t--);for(let o=0;o<i.length;o++){const s=i[o];let a=e;if(n.matchBase&&1===s.length&&(a=[r]),this.matchOne(a,s,t))return!!n.flipNegate||!this.negate}return!n.flipNegate&&this.negate}static defaults(e){return i.defaults(e).Minimatch}}i.Minimatch=y},9838:(e,t,n)=>{"use strict";e.exports=n(9406)},9406:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.createMessageConnection=t.BrowserMessageWriter=t.BrowserMessageReader=void 0,n(6028).default.install();const r=n(5748);o(n(5748),t);class s extends r.AbstractMessageReader{constructor(e){super(),this._onData=new r.Emitter,this._messageListener=e=>{this._onData.fire(e.data)},e.addEventListener("error",(e=>this.fireError(e))),e.onmessage=this._messageListener}listen(e){return this._onData.event(e)}}t.BrowserMessageReader=s;class a extends r.AbstractMessageWriter{constructor(e){super(),this.port=e,this.errorCount=0,e.addEventListener("error",(e=>this.fireError(e)))}write(e){try{return this.port.postMessage(e),Promise.resolve()}catch(t){return this.handleError(t,e),Promise.reject(t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){}}t.BrowserMessageWriter=a,t.createMessageConnection=function(e,t,n,i){return void 0===n&&(n=r.NullLogger),r.ConnectionStrategy.is(i)&&(i={connectionStrategy:i}),(0,r.createMessageConnection)(e,t,n,i)}},6028:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(5748);class o extends i.AbstractMessageBuffer{constructor(e="utf-8"){super(e),this.asciiDecoder=new TextDecoder("ascii")}emptyBuffer(){return o.emptyBuffer}fromString(e,t){return(new TextEncoder).encode(e)}toString(e,t){return"ascii"===t?this.asciiDecoder.decode(e):new TextDecoder(t).decode(e)}asNative(e,t){return void 0===t?e:e.slice(0,t)}allocNative(e){return new Uint8Array(e)}}o.emptyBuffer=new Uint8Array(0);class r{constructor(e){this.socket=e,this._onData=new i.Emitter,this._messageListener=e=>{e.data.arrayBuffer().then((e=>{this._onData.fire(new Uint8Array(e))}),(()=>{(0,i.RAL)().console.error("Converting blob to array buffer failed.")}))},this.socket.addEventListener("message",this._messageListener)}onClose(e){return this.socket.addEventListener("close",e),i.Disposable.create((()=>this.socket.removeEventListener("close",e)))}onError(e){return this.socket.addEventListener("error",e),i.Disposable.create((()=>this.socket.removeEventListener("error",e)))}onEnd(e){return this.socket.addEventListener("end",e),i.Disposable.create((()=>this.socket.removeEventListener("end",e)))}onData(e){return this._onData.event(e)}}class s{constructor(e){this.socket=e}onClose(e){return this.socket.addEventListener("close",e),i.Disposable.create((()=>this.socket.removeEventListener("close",e)))}onError(e){return this.socket.addEventListener("error",e),i.Disposable.create((()=>this.socket.removeEventListener("error",e)))}onEnd(e){return this.socket.addEventListener("end",e),i.Disposable.create((()=>this.socket.removeEventListener("end",e)))}write(e,t){if("string"==typeof e){if(void 0!==t&&"utf-8"!==t)throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${t}`);this.socket.send(e)}else this.socket.send(e);return Promise.resolve()}end(){this.socket.close()}}const a=new TextEncoder,c=Object.freeze({messageBuffer:Object.freeze({create:e=>new o(e)}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:(e,t)=>{if("utf-8"!==t.charset)throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${t.charset}`);return Promise.resolve(a.encode(JSON.stringify(e,void 0,0)))}}),decoder:Object.freeze({name:"application/json",decode:(e,t)=>{if(!(e instanceof Uint8Array))throw new Error("In a Browser environments only Uint8Arrays are supported.");return Promise.resolve(JSON.parse(new TextDecoder(t.charset).decode(e)))}})}),stream:Object.freeze({asReadableStream:e=>new r(e),asWritableStream:e=>new s(e)}),console,timer:Object.freeze({setTimeout(e,t,...n){const i=setTimeout(e,t,...n);return{dispose:()=>clearTimeout(i)}},setImmediate(e,...t){const n=setTimeout(e,0,...t);return{dispose:()=>clearTimeout(n)}},setInterval(e,t,...n){const i=setInterval(e,t,...n);return{dispose:()=>clearInterval(i)}}})});function u(){return c}!function(e){e.install=function(){i.RAL.install(c)}}(u||(u={})),t.default=u},5748:(e,t,n)=>{"use strict";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;const i=n(5285);Object.defineProperty(t,"Message",{enumerable:!0,get:function(){return i.Message}}),Object.defineProperty(t,"RequestType",{enumerable:!0,get:function(){return i.RequestType}}),Object.defineProperty(t,"RequestType0",{enumerable:!0,get:function(){return i.RequestType0}}),Object.defineProperty(t,"RequestType1",{enumerable:!0,get:function(){return i.RequestType1}}),Object.defineProperty(t,"RequestType2",{enumerable:!0,get:function(){return i.RequestType2}}),Object.defineProperty(t,"RequestType3",{enumerable:!0,get:function(){return i.RequestType3}}),Object.defineProperty(t,"RequestType4",{enumerable:!0,get:function(){return i.RequestType4}}),Object.defineProperty(t,"RequestType5",{enumerable:!0,get:function(){return i.RequestType5}}),Object.defineProperty(t,"RequestType6",{enumerable:!0,get:function(){return i.RequestType6}}),Object.defineProperty(t,"RequestType7",{enumerable:!0,get:function(){return i.RequestType7}}),Object.defineProperty(t,"RequestType8",{enumerable:!0,get:function(){return i.RequestType8}}),Object.defineProperty(t,"RequestType9",{enumerable:!0,get:function(){return i.RequestType9}}),Object.defineProperty(t,"ResponseError",{enumerable:!0,get:function(){return i.ResponseError}}),Object.defineProperty(t,"ErrorCodes",{enumerable:!0,get:function(){return i.ErrorCodes}}),Object.defineProperty(t,"NotificationType",{enumerable:!0,get:function(){return i.NotificationType}}),Object.defineProperty(t,"NotificationType0",{enumerable:!0,get:function(){return i.NotificationType0}}),Object.defineProperty(t,"NotificationType1",{enumerable:!0,get:function(){return i.NotificationType1}}),Object.defineProperty(t,"NotificationType2",{enumerable:!0,get:function(){return i.NotificationType2}}),Object.defineProperty(t,"NotificationType3",{enumerable:!0,get:function(){return i.NotificationType3}}),Object.defineProperty(t,"NotificationType4",{enumerable:!0,get:function(){return i.NotificationType4}}),Object.defineProperty(t,"NotificationType5",{enumerable:!0,get:function(){return i.NotificationType5}}),Object.defineProperty(t,"NotificationType6",{enumerable:!0,get:function(){return i.NotificationType6}}),Object.defineProperty(t,"NotificationType7",{enumerable:!0,get:function(){return i.NotificationType7}}),Object.defineProperty(t,"NotificationType8",{enumerable:!0,get:function(){return i.NotificationType8}}),Object.defineProperty(t,"NotificationType9",{enumerable:!0,get:function(){return i.NotificationType9}}),Object.defineProperty(t,"ParameterStructures",{enumerable:!0,get:function(){return i.ParameterStructures}});const o=n(5164);Object.defineProperty(t,"LinkedMap",{enumerable:!0,get:function(){return o.LinkedMap}}),Object.defineProperty(t,"LRUCache",{enumerable:!0,get:function(){return o.LRUCache}}),Object.defineProperty(t,"Touch",{enumerable:!0,get:function(){return o.Touch}});const r=n(8159);Object.defineProperty(t,"Disposable",{enumerable:!0,get:function(){return r.Disposable}});const s=n(345);Object.defineProperty(t,"Event",{enumerable:!0,get:function(){return s.Event}}),Object.defineProperty(t,"Emitter",{enumerable:!0,get:function(){return s.Emitter}});const a=n(7770);Object.defineProperty(t,"CancellationTokenSource",{enumerable:!0,get:function(){return a.CancellationTokenSource}}),Object.defineProperty(t,"CancellationToken",{enumerable:!0,get:function(){return a.CancellationToken}});const c=n(278);Object.defineProperty(t,"SharedArraySenderStrategy",{enumerable:!0,get:function(){return c.SharedArraySenderStrategy}}),Object.defineProperty(t,"SharedArrayReceiverStrategy",{enumerable:!0,get:function(){return c.SharedArrayReceiverStrategy}});const u=n(4806);Object.defineProperty(t,"MessageReader",{enumerable:!0,get:function(){return u.MessageReader}}),Object.defineProperty(t,"AbstractMessageReader",{enumerable:!0,get:function(){return u.AbstractMessageReader}}),Object.defineProperty(t,"ReadableStreamMessageReader",{enumerable:!0,get:function(){return u.ReadableStreamMessageReader}});const l=n(9248);Object.defineProperty(t,"MessageWriter",{enumerable:!0,get:function(){return l.MessageWriter}}),Object.defineProperty(t,"AbstractMessageWriter",{enumerable:!0,get:function(){return l.AbstractMessageWriter}}),Object.defineProperty(t,"WriteableStreamMessageWriter",{enumerable:!0,get:function(){return l.WriteableStreamMessageWriter}});const d=n(5506);Object.defineProperty(t,"AbstractMessageBuffer",{enumerable:!0,get:function(){return d.AbstractMessageBuffer}});const h=n(6336);Object.defineProperty(t,"ConnectionStrategy",{enumerable:!0,get:function(){return h.ConnectionStrategy}}),Object.defineProperty(t,"ConnectionOptions",{enumerable:!0,get:function(){return h.ConnectionOptions}}),Object.defineProperty(t,"NullLogger",{enumerable:!0,get:function(){return h.NullLogger}}),Object.defineProperty(t,"createMessageConnection",{enumerable:!0,get:function(){return h.createMessageConnection}}),Object.defineProperty(t,"ProgressToken",{enumerable:!0,get:function(){return h.ProgressToken}}),Object.defineProperty(t,"ProgressType",{enumerable:!0,get:function(){return h.ProgressType}}),Object.defineProperty(t,"Trace",{enumerable:!0,get:function(){return h.Trace}}),Object.defineProperty(t,"TraceValues",{enumerable:!0,get:function(){return h.TraceValues}}),Object.defineProperty(t,"TraceFormat",{enumerable:!0,get:function(){return h.TraceFormat}}),Object.defineProperty(t,"SetTraceNotification",{enumerable:!0,get:function(){return h.SetTraceNotification}}),Object.defineProperty(t,"LogTraceNotification",{enumerable:!0,get:function(){return h.LogTraceNotification}}),Object.defineProperty(t,"ConnectionErrors",{enumerable:!0,get:function(){return h.ConnectionErrors}}),Object.defineProperty(t,"ConnectionError",{enumerable:!0,get:function(){return h.ConnectionError}}),Object.defineProperty(t,"CancellationReceiverStrategy",{enumerable:!0,get:function(){return h.CancellationReceiverStrategy}}),Object.defineProperty(t,"CancellationSenderStrategy",{enumerable:!0,get:function(){return h.CancellationSenderStrategy}}),Object.defineProperty(t,"CancellationStrategy",{enumerable:!0,get:function(){return h.CancellationStrategy}}),Object.defineProperty(t,"MessageStrategy",{enumerable:!0,get:function(){return h.MessageStrategy}});const g=n(8094);t.RAL=g.default},7770:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CancellationTokenSource=t.CancellationToken=void 0;const i=n(8094),o=n(8472),r=n(345);var s;!function(e){e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:r.Event.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:r.Event.None}),e.is=function(t){const n=t;return n&&(n===e.None||n===e.Cancelled||o.boolean(n.isCancellationRequested)&&!!n.onCancellationRequested)}}(s||(t.CancellationToken=s={}));const a=Object.freeze((function(e,t){const n=(0,i.default)().timer.setTimeout(e.bind(t),0);return{dispose(){n.dispose()}}}));class c{constructor(){this._isCancelled=!1}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?a:(this._emitter||(this._emitter=new r.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}}t.CancellationTokenSource=class{get token(){return this._token||(this._token=new c),this._token}cancel(){this._token?this._token.cancel():this._token=s.Cancelled}dispose(){this._token?this._token instanceof c&&this._token.dispose():this._token=s.None}}},6336:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createMessageConnection=t.ConnectionOptions=t.MessageStrategy=t.CancellationStrategy=t.CancellationSenderStrategy=t.CancellationReceiverStrategy=t.RequestCancellationReceiverStrategy=t.IdCancellationReceiverStrategy=t.ConnectionStrategy=t.ConnectionError=t.ConnectionErrors=t.LogTraceNotification=t.SetTraceNotification=t.TraceFormat=t.TraceValues=t.Trace=t.NullLogger=t.ProgressType=t.ProgressToken=void 0;const i=n(8094),o=n(8472),r=n(5285),s=n(5164),a=n(345),c=n(7770);var u,l,d,h,g,p,m,f,v,y,C,D,b,R,w,S,T,_,k;!function(e){e.type=new r.NotificationType("$/cancelRequest")}(u||(u={})),function(e){e.is=function(e){return"string"==typeof e||"number"==typeof e}}(l||(t.ProgressToken=l={})),function(e){e.type=new r.NotificationType("$/progress")}(d||(d={})),t.ProgressType=class{constructor(){}},function(e){e.is=function(e){return o.func(e)}}(h||(h={})),t.NullLogger=Object.freeze({error:()=>{},warn:()=>{},info:()=>{},log:()=>{}}),function(e){e[e.Off=0]="Off",e[e.Messages=1]="Messages",e[e.Compact=2]="Compact",e[e.Verbose=3]="Verbose"}(g||(t.Trace=g={})),function(e){e.Off="off",e.Messages="messages",e.Compact="compact",e.Verbose="verbose"}(p||(t.TraceValues=p={})),function(e){e.fromString=function(t){if(!o.string(t))return e.Off;switch(t=t.toLowerCase()){case"off":return e.Off;case"messages":return e.Messages;case"compact":return e.Compact;case"verbose":return e.Verbose;default:return e.Off}},e.toString=function(t){switch(t){case e.Off:return"off";case e.Messages:return"messages";case e.Compact:return"compact";case e.Verbose:return"verbose";default:return"off"}}}(g||(t.Trace=g={})),function(e){e.Text="text",e.JSON="json"}(m||(t.TraceFormat=m={})),function(e){e.fromString=function(t){return o.string(t)&&"json"===(t=t.toLowerCase())?e.JSON:e.Text}}(m||(t.TraceFormat=m={})),function(e){e.type=new r.NotificationType("$/setTrace")}(f||(t.SetTraceNotification=f={})),function(e){e.type=new r.NotificationType("$/logTrace")}(v||(t.LogTraceNotification=v={})),function(e){e[e.Closed=1]="Closed",e[e.Disposed=2]="Disposed",e[e.AlreadyListening=3]="AlreadyListening"}(y||(t.ConnectionErrors=y={}));class P extends Error{constructor(e,t){super(t),this.code=e,Object.setPrototypeOf(this,P.prototype)}}t.ConnectionError=P,function(e){e.is=function(e){const t=e;return t&&o.func(t.cancelUndispatched)}}(C||(t.ConnectionStrategy=C={})),function(e){e.is=function(e){const t=e;return t&&(void 0===t.kind||"id"===t.kind)&&o.func(t.createCancellationTokenSource)&&(void 0===t.dispose||o.func(t.dispose))}}(D||(t.IdCancellationReceiverStrategy=D={})),function(e){e.is=function(e){const t=e;return t&&"request"===t.kind&&o.func(t.createCancellationTokenSource)&&(void 0===t.dispose||o.func(t.dispose))}}(b||(t.RequestCancellationReceiverStrategy=b={})),function(e){e.Message=Object.freeze({createCancellationTokenSource:e=>new c.CancellationTokenSource}),e.is=function(e){return D.is(e)||b.is(e)}}(R||(t.CancellationReceiverStrategy=R={})),function(e){e.Message=Object.freeze({sendCancellation:(e,t)=>e.sendNotification(u.type,{id:t}),cleanup(e){}}),e.is=function(e){const t=e;return t&&o.func(t.sendCancellation)&&o.func(t.cleanup)}}(w||(t.CancellationSenderStrategy=w={})),function(e){e.Message=Object.freeze({receiver:R.Message,sender:w.Message}),e.is=function(e){const t=e;return t&&R.is(t.receiver)&&w.is(t.sender)}}(S||(t.CancellationStrategy=S={})),function(e){e.is=function(e){const t=e;return t&&o.func(t.handleMessage)}}(T||(t.MessageStrategy=T={})),function(e){e.is=function(e){const t=e;return t&&(S.is(t.cancellationStrategy)||C.is(t.connectionStrategy)||T.is(t.messageStrategy))}}(_||(t.ConnectionOptions=_={})),function(e){e[e.New=1]="New",e[e.Listening=2]="Listening",e[e.Closed=3]="Closed",e[e.Disposed=4]="Disposed"}(k||(k={})),t.createMessageConnection=function(e,n,p,C){const b=void 0!==p?p:t.NullLogger;let R=0,w=0,_=0;const x="2.0";let q;const F=new Map;let O;const E=new Map,M=new Map;let I,N,L=new s.LinkedMap,A=new Map,j=new Set,H=new Map,K=g.Off,W=m.Text,U=k.New;const $=new a.Emitter,z=new a.Emitter,V=new a.Emitter,B=new a.Emitter,J=new a.Emitter,Q=C&&C.cancellationStrategy?C.cancellationStrategy:S.Message;function X(e){if(null===e)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+e.toString()}function G(e){}function Y(){return U===k.Listening}function Z(){return U===k.Closed}function ee(){return U===k.Disposed}function te(){U!==k.New&&U!==k.Listening||(U=k.Closed,z.fire(void 0))}function ne(){I||0===L.size||(I=(0,i.default)().timer.setImmediate((()=>{I=void 0,function(){if(0===L.size)return;const e=L.shift();try{const t=C?.messageStrategy;T.is(t)?t.handleMessage(e,ie):ie(e)}finally{ne()}}()})))}function ie(e){r.Message.isRequest(e)?function(e){if(ee())return;function t(t,i,o){const s={jsonrpc:x,id:e.id};t instanceof r.ResponseError?s.error=t.toJson():s.result=void 0===t?null:t,se(s,i,o),n.write(s).catch((()=>b.error("Sending response failed.")))}function i(t,i,o){const r={jsonrpc:x,id:e.id,error:t.toJson()};se(r,i,o),n.write(r).catch((()=>b.error("Sending response failed.")))}!function(e){if(K!==g.Off&&N)if(W===m.Text){let t;K!==g.Verbose&&K!==g.Compact||!e.params||(t=`Params: ${re(e.params)}\n\n`),N.log(`Received request '${e.method} - (${e.id})'.`,t)}else ce("receive-request",e)}(e);const s=F.get(e.method);let a,c;s&&(a=s.type,c=s.handler);const u=Date.now();if(c||q){const s=e.id??String(Date.now()),l=D.is(Q.receiver)?Q.receiver.createCancellationTokenSource(s):Q.receiver.createCancellationTokenSource(e);null!==e.id&&j.has(e.id)&&l.cancel(),null!==e.id&&H.set(s,l);try{let d;if(c)if(void 0===e.params){if(void 0!==a&&0!==a.numberOfParams)return void i(new r.ResponseError(r.ErrorCodes.InvalidParams,`Request ${e.method} defines ${a.numberOfParams} params but received none.`),e.method,u);d=c(l.token)}else if(Array.isArray(e.params)){if(void 0!==a&&a.parameterStructures===r.ParameterStructures.byName)return void i(new r.ResponseError(r.ErrorCodes.InvalidParams,`Request ${e.method} defines parameters by name but received parameters by position`),e.method,u);d=c(...e.params,l.token)}else{if(void 0!==a&&a.parameterStructures===r.ParameterStructures.byPosition)return void i(new r.ResponseError(r.ErrorCodes.InvalidParams,`Request ${e.method} defines parameters by position but received parameters by name`),e.method,u);d=c(e.params,l.token)}else q&&(d=q(e.method,e.params,l.token));const h=d;d?h.then?h.then((n=>{H.delete(s),t(n,e.method,u)}),(t=>{H.delete(s),t instanceof r.ResponseError?i(t,e.method,u):t&&o.string(t.message)?i(new r.ResponseError(r.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${t.message}`),e.method,u):i(new r.ResponseError(r.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,u)})):(H.delete(s),t(d,e.method,u)):(H.delete(s),function(t,i,o){void 0===t&&(t=null);const r={jsonrpc:x,id:e.id,result:t};se(r,i,o),n.write(r).catch((()=>b.error("Sending response failed.")))}(d,e.method,u))}catch(n){H.delete(s),n instanceof r.ResponseError?t(n,e.method,u):n&&o.string(n.message)?i(new r.ResponseError(r.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${n.message}`),e.method,u):i(new r.ResponseError(r.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,u)}}else i(new r.ResponseError(r.ErrorCodes.MethodNotFound,`Unhandled method ${e.method}`),e.method,u)}(e):r.Message.isNotification(e)?function(e){if(ee())return;let t,n;if(e.method===u.type.method){const t=e.params.id;return j.delete(t),void ae(e)}{const i=E.get(e.method);i&&(n=i.handler,t=i.type)}if(n||O)try{if(ae(e),n)if(void 0===e.params)void 0!==t&&0!==t.numberOfParams&&t.parameterStructures!==r.ParameterStructures.byName&&b.error(`Notification ${e.method} defines ${t.numberOfParams} params but received none.`),n();else if(Array.isArray(e.params)){const i=e.params;e.method===d.type.method&&2===i.length&&l.is(i[0])?n({token:i[0],value:i[1]}):(void 0!==t&&(t.parameterStructures===r.ParameterStructures.byName&&b.error(`Notification ${e.method} defines parameters by name but received parameters by position`),t.numberOfParams!==e.params.length&&b.error(`Notification ${e.method} defines ${t.numberOfParams} params but received ${i.length} arguments`)),n(...i))}else void 0!==t&&t.parameterStructures===r.ParameterStructures.byPosition&&b.error(`Notification ${e.method} defines parameters by position but received parameters by name`),n(e.params);else O&&O(e.method,e.params)}catch(t){t.message?b.error(`Notification handler '${e.method}' failed with message: ${t.message}`):b.error(`Notification handler '${e.method}' failed unexpectedly.`)}else V.fire(e)}(e):r.Message.isResponse(e)?function(e){if(!ee())if(null===e.id)e.error?b.error(`Received response message without id: Error is: \n${JSON.stringify(e.error,void 0,4)}`):b.error("Received response message without id. No further error information provided.");else{const t=e.id,n=A.get(t);if(function(e,t){if(K!==g.Off&&N)if(W===m.Text){let n;if(K!==g.Verbose&&K!==g.Compact||(e.error&&e.error.data?n=`Error data: ${re(e.error.data)}\n\n`:e.result?n=`Result: ${re(e.result)}\n\n`:void 0===e.error&&(n="No result returned.\n\n")),t){const i=e.error?` Request failed: ${e.error.message} (${e.error.code}).`:"";N.log(`Received response '${t.method} - (${e.id})' in ${Date.now()-t.timerStart}ms.${i}`,n)}else N.log(`Received response ${e.id} without active response promise.`,n)}else ce("receive-response",e)}(e,n),void 0!==n){A.delete(t);try{if(e.error){const t=e.error;n.reject(new r.ResponseError(t.code,t.message,t.data))}else{if(void 0===e.result)throw new Error("Should never happen.");n.resolve(e.result)}}catch(e){e.message?b.error(`Response handler '${n.method}' failed with message: ${e.message}`):b.error(`Response handler '${n.method}' failed unexpectedly.`)}}}}(e):function(e){if(!e)return void b.error("Received empty message.");b.error(`Received message which is neither a response nor a notification message:\n${JSON.stringify(e,null,4)}`);const t=e;if(o.string(t.id)||o.number(t.id)){const e=t.id,n=A.get(e);n&&n.reject(new Error("The received response has neither a result nor an error property."))}}(e)}e.onClose(te),e.onError((function(e){$.fire([e,void 0,void 0])})),n.onClose(te),n.onError((function(e){$.fire(e)}));const oe=e=>{try{if(r.Message.isNotification(e)&&e.method===u.type.method){const t=e.params.id,i=X(t),o=L.get(i);if(r.Message.isRequest(o)){const r=C?.connectionStrategy,s=r&&r.cancelUndispatched?r.cancelUndispatched(o,G):void 0;if(s&&(void 0!==s.error||void 0!==s.result))return L.delete(i),H.delete(t),s.id=o.id,se(s,e.method,Date.now()),void n.write(s).catch((()=>b.error("Sending response for canceled message failed.")))}const s=H.get(t);if(void 0!==s)return s.cancel(),void ae(e);j.add(t)}!function(e,t){var n;r.Message.isRequest(t)?e.set(X(t.id),t):r.Message.isResponse(t)?e.set(null===(n=t.id)?"res-unknown-"+(++_).toString():"res-"+n.toString(),t):e.set("not-"+(++w).toString(),t)}(L,e)}finally{ne()}};function re(e){if(null!=e)switch(K){case g.Verbose:return JSON.stringify(e,null,4);case g.Compact:return JSON.stringify(e);default:return}}function se(e,t,n){if(K!==g.Off&&N)if(W===m.Text){let i;K!==g.Verbose&&K!==g.Compact||(e.error&&e.error.data?i=`Error data: ${re(e.error.data)}\n\n`:e.result?i=`Result: ${re(e.result)}\n\n`:void 0===e.error&&(i="No result returned.\n\n")),N.log(`Sending response '${t} - (${e.id})'. Processing request took ${Date.now()-n}ms`,i)}else ce("send-response",e)}function ae(e){if(K!==g.Off&&N&&e.method!==v.type.method)if(W===m.Text){let t;K!==g.Verbose&&K!==g.Compact||(t=e.params?`Params: ${re(e.params)}\n\n`:"No parameters provided.\n\n"),N.log(`Received notification '${e.method}'.`,t)}else ce("receive-notification",e)}function ce(e,t){if(!N||K===g.Off)return;const n={isLSPMessage:!0,type:e,message:t,timestamp:Date.now()};N.log(n)}function ue(){if(Z())throw new P(y.Closed,"Connection is closed.");if(ee())throw new P(y.Disposed,"Connection is disposed.")}function le(e){return void 0===e?null:e}function de(e){return null===e?void 0:e}function he(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function ge(e,t){switch(e){case r.ParameterStructures.auto:return he(t)?de(t):[le(t)];case r.ParameterStructures.byName:if(!he(t))throw new Error("Received parameters by name but param is not an object literal.");return de(t);case r.ParameterStructures.byPosition:return[le(t)];default:throw new Error(`Unknown parameter structure ${e.toString()}`)}}function pe(e,t){let n;const i=e.numberOfParams;switch(i){case 0:n=void 0;break;case 1:n=ge(e.parameterStructures,t[0]);break;default:n=[];for(let e=0;e<t.length&&e<i;e++)n.push(le(t[e]));if(t.length<i)for(let e=t.length;e<i;e++)n.push(null)}return n}const me={sendNotification:(e,...t)=>{let i,s;if(ue(),o.string(e)){i=e;const n=t[0];let o=0,a=r.ParameterStructures.auto;r.ParameterStructures.is(n)&&(o=1,a=n);let c=t.length;const u=c-o;switch(u){case 0:s=void 0;break;case 1:s=ge(a,t[o]);break;default:if(a===r.ParameterStructures.byName)throw new Error(`Received ${u} parameters for 'by Name' notification parameter structure.`);s=t.slice(o,c).map((e=>le(e)))}}else{const n=t;i=e.method,s=pe(e,n)}const a={jsonrpc:x,method:i,params:s};return function(e){if(K!==g.Off&&N)if(W===m.Text){let t;K!==g.Verbose&&K!==g.Compact||(t=e.params?`Params: ${re(e.params)}\n\n`:"No parameters provided.\n\n"),N.log(`Sending notification '${e.method}'.`,t)}else ce("send-notification",e)}(a),n.write(a).catch((e=>{throw b.error("Sending notification failed."),e}))},onNotification:(e,t)=>{let n;return ue(),o.func(e)?O=e:t&&(o.string(e)?(n=e,E.set(e,{type:void 0,handler:t})):(n=e.method,E.set(e.method,{type:e,handler:t}))),{dispose:()=>{void 0!==n?E.delete(n):O=void 0}}},onProgress:(e,t,n)=>{if(M.has(t))throw new Error(`Progress handler for token ${t} already registered`);return M.set(t,n),{dispose:()=>{M.delete(t)}}},sendProgress:(e,t,n)=>me.sendNotification(d.type,{token:t,value:n}),onUnhandledProgress:B.event,sendRequest:(e,...t)=>{let i,s,a;if(ue(),function(){if(!Y())throw new Error("Call listen() first.")}(),o.string(e)){i=e;const n=t[0],o=t[t.length-1];let u=0,l=r.ParameterStructures.auto;r.ParameterStructures.is(n)&&(u=1,l=n);let d=t.length;c.CancellationToken.is(o)&&(d-=1,a=o);const h=d-u;switch(h){case 0:s=void 0;break;case 1:s=ge(l,t[u]);break;default:if(l===r.ParameterStructures.byName)throw new Error(`Received ${h} parameters for 'by Name' request parameter structure.`);s=t.slice(u,d).map((e=>le(e)))}}else{const n=t;i=e.method,s=pe(e,n);const o=e.numberOfParams;a=c.CancellationToken.is(n[o])?n[o]:void 0}const u=R++;let l;a&&(l=a.onCancellationRequested((()=>{const e=Q.sender.sendCancellation(me,u);return void 0===e?(b.log(`Received no promise from cancellation strategy when cancelling id ${u}`),Promise.resolve()):e.catch((()=>{b.log(`Sending cancellation messages for id ${u} failed`)}))})));const d={jsonrpc:x,id:u,method:i,params:s};return function(e){if(K!==g.Off&&N)if(W===m.Text){let t;K!==g.Verbose&&K!==g.Compact||!e.params||(t=`Params: ${re(e.params)}\n\n`),N.log(`Sending request '${e.method} - (${e.id})'.`,t)}else ce("send-request",e)}(d),"function"==typeof Q.sender.enableCancellation&&Q.sender.enableCancellation(d),new Promise((async(e,t)=>{const o={method:i,timerStart:Date.now(),resolve:t=>{e(t),Q.sender.cleanup(u),l?.dispose()},reject:e=>{t(e),Q.sender.cleanup(u),l?.dispose()}};try{await n.write(d),A.set(u,o)}catch(e){throw b.error("Sending request failed."),o.reject(new r.ResponseError(r.ErrorCodes.MessageWriteError,e.message?e.message:"Unknown reason")),e}}))},onRequest:(e,t)=>{ue();let n=null;return h.is(e)?(n=void 0,q=e):o.string(e)?(n=null,void 0!==t&&(n=e,F.set(e,{handler:t,type:void 0}))):void 0!==t&&(n=e.method,F.set(e.method,{type:e,handler:t})),{dispose:()=>{null!==n&&(void 0!==n?F.delete(n):q=void 0)}}},hasPendingResponse:()=>A.size>0,trace:async(e,t,n)=>{let i=!1,r=m.Text;void 0!==n&&(o.boolean(n)?i=n:(i=n.sendNotification||!1,r=n.traceFormat||m.Text)),K=e,W=r,N=K===g.Off?void 0:t,!i||Z()||ee()||await me.sendNotification(f.type,{value:g.toString(e)})},onError:$.event,onClose:z.event,onUnhandledNotification:V.event,onDispose:J.event,end:()=>{n.end()},dispose:()=>{if(ee())return;U=k.Disposed,J.fire(void 0);const t=new r.ResponseError(r.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(const e of A.values())e.reject(t);A=new Map,H=new Map,j=new Set,L=new s.LinkedMap,o.func(n.dispose)&&n.dispose(),o.func(e.dispose)&&e.dispose()},listen:()=>{ue(),function(){if(Y())throw new P(y.AlreadyListening,"Connection is already listening")}(),U=k.Listening,e.listen(oe)},inspect:()=>{(0,i.default)().console.log("inspect")}};return me.onNotification(v.type,(e=>{if(K===g.Off||!N)return;const t=K===g.Verbose||K===g.Compact;N.log(e.message,t?e.verbose:void 0)})),me.onNotification(d.type,(e=>{const t=M.get(e.token);t?t(e.value):B.fire(e)})),me}},8159:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Disposable=void 0,function(e){e.create=function(e){return{dispose:e}}}(n||(t.Disposable=n={}))},345:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Emitter=t.Event=void 0;const i=n(8094);var o;!function(e){const t={dispose(){}};e.None=function(){return t}}(o||(t.Event=o={}));class r{add(e,t=null,n){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(t),Array.isArray(n)&&n.push({dispose:()=>this.remove(e,t)})}remove(e,t=null){if(!this._callbacks)return;let n=!1;for(let i=0,o=this._callbacks.length;i<o;i++)if(this._callbacks[i]===e){if(this._contexts[i]===t)return this._callbacks.splice(i,1),void this._contexts.splice(i,1);n=!0}if(n)throw new Error("When adding a listener with a context, you should remove it with the same context")}invoke(...e){if(!this._callbacks)return[];const t=[],n=this._callbacks.slice(0),o=this._contexts.slice(0);for(let r=0,s=n.length;r<s;r++)try{t.push(n[r].apply(o[r],e))}catch(e){(0,i.default)().console.error(e)}return t}isEmpty(){return!this._callbacks||0===this._callbacks.length}dispose(){this._callbacks=void 0,this._contexts=void 0}}class s{constructor(e){this._options=e}get event(){return this._event||(this._event=(e,t,n)=>{this._callbacks||(this._callbacks=new r),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,t);const i={dispose:()=>{this._callbacks&&(this._callbacks.remove(e,t),i.dispose=s._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(n)&&n.push(i),i}),this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}}t.Emitter=s,s._noop=function(){}},8472:(e,t)=>{"use strict";function n(e){return"string"==typeof e||e instanceof String}function i(e){return Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.stringArray=t.array=t.func=t.error=t.number=t.string=t.boolean=void 0,t.boolean=function(e){return!0===e||!1===e},t.string=n,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=function(e){return"function"==typeof e},t.array=i,t.stringArray=function(e){return i(e)&&e.every((e=>n(e)))}},5164:(e,t)=>{"use strict";var n,i;Object.defineProperty(t,"__esModule",{value:!0}),t.LRUCache=t.LinkedMap=t.Touch=void 0,function(e){e.None=0,e.First=1,e.AsOld=e.First,e.Last=2,e.AsNew=e.Last}(i||(t.Touch=i={}));class o{constructor(){this[n]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(e){return this._map.has(e)}get(e,t=i.None){const n=this._map.get(e);if(n)return t!==i.None&&this.touch(n,t),n.value}set(e,t,n=i.None){let o=this._map.get(e);if(o)o.value=t,n!==i.None&&this.touch(o,n);else{switch(o={key:e,value:t,next:void 0,previous:void 0},n){case i.None:this.addItemLast(o);break;case i.First:this.addItemFirst(o);break;case i.Last:default:this.addItemLast(o)}this._map.set(e,o),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){const t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){const n=this._state;let i=this._head;for(;i;){if(t?e.bind(t)(i.value,i.key,this):e(i.value,i.key,this),this._state!==n)throw new Error("LinkedMap got modified during iteration.");i=i.next}}keys(){const e=this._state;let t=this._head;const n={[Symbol.iterator]:()=>n,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){const e={value:t.key,done:!1};return t=t.next,e}return{value:void 0,done:!0}}};return n}values(){const e=this._state;let t=this._head;const n={[Symbol.iterator]:()=>n,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){const e={value:t.value,done:!1};return t=t.next,e}return{value:void 0,done:!0}}};return n}entries(){const e=this._state;let t=this._head;const n={[Symbol.iterator]:()=>n,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){const e={value:[t.key,t.value],done:!1};return t=t.next,e}return{value:void 0,done:!0}}};return n}[(n=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(0===e)return void this.clear();let t=this._head,n=this.size;for(;t&&n>e;)this._map.delete(t.key),t=t.next,n--;this._head=t,this._size=n,t&&(t.previous=void 0),this._state++}addItemFirst(e){if(this._head||this._tail){if(!this._head)throw new Error("Invalid list");e.next=this._head,this._head.previous=e}else this._tail=e;this._head=e,this._state++}addItemLast(e){if(this._head||this._tail){if(!this._tail)throw new Error("Invalid list");e.previous=this._tail,this._tail.next=e}else this._head=e;this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{const t=e.next,n=e.previous;if(!t||!n)throw new Error("Invalid list");t.previous=n,n.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(t===i.First||t===i.Last)if(t===i.First){if(e===this._head)return;const t=e.next,n=e.previous;e===this._tail?(n.next=void 0,this._tail=n):(t.previous=n,n.next=t),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(t===i.Last){if(e===this._tail)return;const t=e.next,n=e.previous;e===this._head?(t.previous=void 0,this._head=t):(t.previous=n,n.next=t),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}toJSON(){const e=[];return this.forEach(((t,n)=>{e.push([n,t])})),e}fromJSON(e){this.clear();for(const[t,n]of e)this.set(t,n)}}t.LinkedMap=o,t.LRUCache=class extends o{constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get ratio(){return this._ratio}set ratio(e){this._ratio=Math.min(Math.max(0,e),1),this.checkTrim()}get(e,t=i.AsNew){return super.get(e,t)}peek(e){return super.get(e,i.None)}set(e,t){return super.set(e,t,i.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}},5506:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractMessageBuffer=void 0,t.AbstractMessageBuffer=class{constructor(e="utf-8"){this._encoding=e,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(e){const t="string"==typeof e?this.fromString(e,this._encoding):e;this._chunks.push(t),this._totalLength+=t.byteLength}tryReadHeaders(e=!1){if(0===this._chunks.length)return;let t=0,n=0,i=0,o=0;e:for(;n<this._chunks.length;){const e=this._chunks[n];for(i=0;i<e.length;){switch(e[i]){case 13:switch(t){case 0:t=1;break;case 2:t=3;break;default:t=0}break;case 10:switch(t){case 1:t=2;break;case 3:t=4,i++;break e;default:t=0}break;default:t=0}i++}o+=e.byteLength,n++}if(4!==t)return;const r=this._read(o+i),s=new Map,a=this.toString(r,"ascii").split("\r\n");if(a.length<2)return s;for(let t=0;t<a.length-2;t++){const n=a[t],i=n.indexOf(":");if(-1===i)throw new Error(`Message header must separate key and value using ':'\n${n}`);const o=n.substr(0,i),r=n.substr(i+1).trim();s.set(e?o.toLowerCase():o,r)}return s}tryReadBody(e){if(!(this._totalLength<e))return this._read(e)}get numberOfBytes(){return this._totalLength}_read(e){if(0===e)return this.emptyBuffer();if(e>this._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===e){const t=this._chunks[0];return this._chunks.shift(),this._totalLength-=e,this.asNative(t)}if(this._chunks[0].byteLength>e){const t=this._chunks[0],n=this.asNative(t,e);return this._chunks[0]=t.slice(e),this._totalLength-=e,n}const t=this.allocNative(e);let n=0;for(;e>0;){const i=this._chunks[0];if(i.byteLength>e){const o=i.slice(0,e);t.set(o,n),n+=e,this._chunks[0]=i.slice(e),this._totalLength-=e,e-=e}else t.set(i,n),n+=i.byteLength,this._chunks.shift(),this._totalLength-=i.byteLength,e-=i.byteLength}return t}}},4806:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ReadableStreamMessageReader=t.AbstractMessageReader=t.MessageReader=void 0;const i=n(8094),o=n(8472),r=n(345),s=n(6791);var a,c;!function(e){e.is=function(e){let t=e;return t&&o.func(t.listen)&&o.func(t.dispose)&&o.func(t.onError)&&o.func(t.onClose)&&o.func(t.onPartialMessage)}}(a||(t.MessageReader=a={}));class u{constructor(){this.errorEmitter=new r.Emitter,this.closeEmitter=new r.Emitter,this.partialMessageEmitter=new r.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e){this.errorEmitter.fire(this.asError(e))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(e){this.partialMessageEmitter.fire(e)}asError(e){return e instanceof Error?e:new Error(`Reader received error. Reason: ${o.string(e.message)?e.message:"unknown"}`)}}t.AbstractMessageReader=u,function(e){e.fromOptions=function(e){let t,n;const o=new Map;let r;const s=new Map;if(void 0===e||"string"==typeof e)t=e??"utf-8";else{if(t=e.charset??"utf-8",void 0!==e.contentDecoder&&(n=e.contentDecoder,o.set(n.name,n)),void 0!==e.contentDecoders)for(const t of e.contentDecoders)o.set(t.name,t);if(void 0!==e.contentTypeDecoder&&(r=e.contentTypeDecoder,s.set(r.name,r)),void 0!==e.contentTypeDecoders)for(const t of e.contentTypeDecoders)s.set(t.name,t)}return void 0===r&&(r=(0,i.default)().applicationJson.decoder,s.set(r.name,r)),{charset:t,contentDecoder:n,contentDecoders:o,contentTypeDecoder:r,contentTypeDecoders:s}}}(c||(c={})),t.ReadableStreamMessageReader=class extends u{constructor(e,t){super(),this.readable=e,this.options=c.fromOptions(t),this.buffer=(0,i.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new s.Semaphore(1)}set partialMessageTimeout(e){this._partialMessageTimeout=e}get partialMessageTimeout(){return this._partialMessageTimeout}listen(e){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=e;const t=this.readable.onData((e=>{this.onData(e)}));return this.readable.onError((e=>this.fireError(e))),this.readable.onClose((()=>this.fireClose())),t}onData(e){try{for(this.buffer.append(e);;){if(-1===this.nextMessageLength){const e=this.buffer.tryReadHeaders(!0);if(!e)return;const t=e.get("content-length");if(!t)return void this.fireError(new Error(`Header must provide a Content-Length property.\n${JSON.stringify(Object.fromEntries(e))}`));const n=parseInt(t);if(isNaN(n))return void this.fireError(new Error(`Content-Length value must be a number. Got ${t}`));this.nextMessageLength=n}const e=this.buffer.tryReadBody(this.nextMessageLength);if(void 0===e)return void this.setPartialMessageTimer();this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock((async()=>{const t=void 0!==this.options.contentDecoder?await this.options.contentDecoder.decode(e):e,n=await this.options.contentTypeDecoder.decode(t,this.options);this.callback(n)})).catch((e=>{this.fireError(e)}))}}catch(e){this.fireError(e)}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),this._partialMessageTimeout<=0||(this.partialMessageTimer=(0,i.default)().timer.setTimeout(((e,t)=>{this.partialMessageTimer=void 0,e===this.messageToken&&(this.firePartialMessage({messageToken:e,waitingTime:t}),this.setPartialMessageTimer())}),this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}}},9248:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WriteableStreamMessageWriter=t.AbstractMessageWriter=t.MessageWriter=void 0;const i=n(8094),o=n(8472),r=n(6791),s=n(345);var a,c;!function(e){e.is=function(e){let t=e;return t&&o.func(t.dispose)&&o.func(t.onClose)&&o.func(t.onError)&&o.func(t.write)}}(a||(t.MessageWriter=a={}));class u{constructor(){this.errorEmitter=new s.Emitter,this.closeEmitter=new s.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e,t,n){this.errorEmitter.fire([this.asError(e),t,n])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(e){return e instanceof Error?e:new Error(`Writer received error. Reason: ${o.string(e.message)?e.message:"unknown"}`)}}t.AbstractMessageWriter=u,function(e){e.fromOptions=function(e){return void 0===e||"string"==typeof e?{charset:e??"utf-8",contentTypeEncoder:(0,i.default)().applicationJson.encoder}:{charset:e.charset??"utf-8",contentEncoder:e.contentEncoder,contentTypeEncoder:e.contentTypeEncoder??(0,i.default)().applicationJson.encoder}}}(c||(c={})),t.WriteableStreamMessageWriter=class extends u{constructor(e,t){super(),this.writable=e,this.options=c.fromOptions(t),this.errorCount=0,this.writeSemaphore=new r.Semaphore(1),this.writable.onError((e=>this.fireError(e))),this.writable.onClose((()=>this.fireClose()))}async write(e){return this.writeSemaphore.lock((async()=>this.options.contentTypeEncoder.encode(e,this.options).then((e=>void 0!==this.options.contentEncoder?this.options.contentEncoder.encode(e):e)).then((t=>{const n=[];return n.push("Content-Length: ",t.byteLength.toString(),"\r\n"),n.push("\r\n"),this.doWrite(e,n,t)}),(e=>{throw this.fireError(e),e}))))}async doWrite(e,t,n){try{return await this.writable.write(t.join(""),"ascii"),this.writable.write(n)}catch(t){return this.handleError(t,e),Promise.reject(t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){this.writable.end()}}},5285:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Message=t.NotificationType9=t.NotificationType8=t.NotificationType7=t.NotificationType6=t.NotificationType5=t.NotificationType4=t.NotificationType3=t.NotificationType2=t.NotificationType1=t.NotificationType0=t.NotificationType=t.RequestType9=t.RequestType8=t.RequestType7=t.RequestType6=t.RequestType5=t.RequestType4=t.RequestType3=t.RequestType2=t.RequestType1=t.RequestType=t.RequestType0=t.AbstractMessageSignature=t.ParameterStructures=t.ResponseError=t.ErrorCodes=void 0;const i=n(8472);var o,r;!function(e){e.ParseError=-32700,e.InvalidRequest=-32600,e.MethodNotFound=-32601,e.InvalidParams=-32602,e.InternalError=-32603,e.jsonrpcReservedErrorRangeStart=-32099,e.serverErrorStart=-32099,e.MessageWriteError=-32099,e.MessageReadError=-32098,e.PendingResponseRejected=-32097,e.ConnectionInactive=-32096,e.ServerNotInitialized=-32002,e.UnknownErrorCode=-32001,e.jsonrpcReservedErrorRangeEnd=-32e3,e.serverErrorEnd=-32e3}(o||(t.ErrorCodes=o={}));class s extends Error{constructor(e,t,n){super(t),this.code=i.number(e)?e:o.UnknownErrorCode,this.data=n,Object.setPrototypeOf(this,s.prototype)}toJson(){const e={code:this.code,message:this.message};return void 0!==this.data&&(e.data=this.data),e}}t.ResponseError=s;class a{constructor(e){this.kind=e}static is(e){return e===a.auto||e===a.byName||e===a.byPosition}toString(){return this.kind}}t.ParameterStructures=a,a.auto=new a("auto"),a.byPosition=new a("byPosition"),a.byName=new a("byName");class c{constructor(e,t){this.method=e,this.numberOfParams=t}get parameterStructures(){return a.auto}}t.AbstractMessageSignature=c,t.RequestType0=class extends c{constructor(e){super(e,0)}},t.RequestType=class extends c{constructor(e,t=a.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.RequestType1=class extends c{constructor(e,t=a.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.RequestType2=class extends c{constructor(e){super(e,2)}},t.RequestType3=class extends c{constructor(e){super(e,3)}},t.RequestType4=class extends c{constructor(e){super(e,4)}},t.RequestType5=class extends c{constructor(e){super(e,5)}},t.RequestType6=class extends c{constructor(e){super(e,6)}},t.RequestType7=class extends c{constructor(e){super(e,7)}},t.RequestType8=class extends c{constructor(e){super(e,8)}},t.RequestType9=class extends c{constructor(e){super(e,9)}},t.NotificationType=class extends c{constructor(e,t=a.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.NotificationType0=class extends c{constructor(e){super(e,0)}},t.NotificationType1=class extends c{constructor(e,t=a.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.NotificationType2=class extends c{constructor(e){super(e,2)}},t.NotificationType3=class extends c{constructor(e){super(e,3)}},t.NotificationType4=class extends c{constructor(e){super(e,4)}},t.NotificationType5=class extends c{constructor(e){super(e,5)}},t.NotificationType6=class extends c{constructor(e){super(e,6)}},t.NotificationType7=class extends c{constructor(e){super(e,7)}},t.NotificationType8=class extends c{constructor(e){super(e,8)}},t.NotificationType9=class extends c{constructor(e){super(e,9)}},function(e){e.isRequest=function(e){const t=e;return t&&i.string(t.method)&&(i.string(t.id)||i.number(t.id))},e.isNotification=function(e){const t=e;return t&&i.string(t.method)&&void 0===e.id},e.isResponse=function(e){const t=e;return t&&(void 0!==t.result||!!t.error)&&(i.string(t.id)||i.number(t.id)||null===t.id)}}(r||(t.Message=r={}))},8094:(e,t)=>{"use strict";let n;function i(){if(void 0===n)throw new Error("No runtime abstraction layer installed");return n}Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.install=function(e){if(void 0===e)throw new Error("No runtime abstraction layer provided");n=e}}(i||(i={})),t.default=i},6791:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Semaphore=void 0;const i=n(8094);t.Semaphore=class{constructor(e=1){if(e<=0)throw new Error("Capacity must be greater than 0");this._capacity=e,this._active=0,this._waiting=[]}lock(e){return new Promise(((t,n)=>{this._waiting.push({thunk:e,resolve:t,reject:n}),this.runNext()}))}get active(){return this._active}runNext(){0!==this._waiting.length&&this._active!==this._capacity&&(0,i.default)().timer.setImmediate((()=>this.doRunNext()))}doRunNext(){if(0===this._waiting.length||this._active===this._capacity)return;const e=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("To many thunks active");try{const t=e.thunk();t instanceof Promise?t.then((t=>{this._active--,e.resolve(t),this.runNext()}),(t=>{this._active--,e.reject(t),this.runNext()})):(this._active--,e.resolve(t),this.runNext())}catch(t){this._active--,e.reject(t),this.runNext()}}}},278:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SharedArrayReceiverStrategy=t.SharedArraySenderStrategy=void 0;const i=n(7770);var o;!function(e){e.Continue=0,e.Cancelled=1}(o||(o={})),t.SharedArraySenderStrategy=class{constructor(){this.buffers=new Map}enableCancellation(e){if(null===e.id)return;const t=new SharedArrayBuffer(4);new Int32Array(t,0,1)[0]=o.Continue,this.buffers.set(e.id,t),e.$cancellationData=t}async sendCancellation(e,t){const n=this.buffers.get(t);if(void 0===n)return;const i=new Int32Array(n,0,1);Atomics.store(i,0,o.Cancelled)}cleanup(e){this.buffers.delete(e)}dispose(){this.buffers.clear()}};class r{constructor(e){this.data=new Int32Array(e,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===o.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}}class s{constructor(e){this.token=new r(e)}cancel(){}dispose(){}}t.SharedArrayReceiverStrategy=class{constructor(){this.kind="request"}createCancellationTokenSource(e){const t=e.$cancellationData;return void 0===t?new i.CancellationTokenSource:new s(t)}}},4970:(e,t,n)=>{"use strict";e.exports=n(7053)},7053:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.LanguageClient=void 0;const r=n(9562),s=n(9351);o(n(9351),t),o(n(9562),t);class a extends r.BaseLanguageClient{constructor(e,t,n,i){super(e,t,n),this.worker=i}createMessageTransports(e){const t=new s.BrowserMessageReader(this.worker),n=new s.BrowserMessageWriter(this.worker);return Promise.resolve({reader:t,writer:n})}}t.LanguageClient=a},9562:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.DiagnosticPullMode=t.vsdiag=void 0,o(n(5968),t),o(n(497),t);var r=n(7443);Object.defineProperty(t,"vsdiag",{enumerable:!0,get:function(){return r.vsdiag}}),Object.defineProperty(t,"DiagnosticPullMode",{enumerable:!0,get:function(){return r.DiagnosticPullMode}}),o(n(5760),t)},7973:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CallHierarchyFeature=void 0;const i=n(9496),o=n(5968),r=n(497);class s{constructor(e){this.client=e,this.middleware=e.middleware}prepareCallHierarchy(e,t,n){const i=this.client,r=this.middleware,s=(e,t,n)=>{const r=i.code2ProtocolConverter.asTextDocumentPositionParams(e,t);return i.sendRequest(o.CallHierarchyPrepareRequest.type,r,n).then((e=>n.isCancellationRequested?null:i.protocol2CodeConverter.asCallHierarchyItems(e,n)),(e=>i.handleFailedRequest(o.CallHierarchyPrepareRequest.type,n,e,null)))};return r.prepareCallHierarchy?r.prepareCallHierarchy(e,t,n,s):s(e,t,n)}provideCallHierarchyIncomingCalls(e,t){const n=this.client,i=this.middleware,r=(e,t)=>{const i={item:n.code2ProtocolConverter.asCallHierarchyItem(e)};return n.sendRequest(o.CallHierarchyIncomingCallsRequest.type,i,t).then((e=>t.isCancellationRequested?null:n.protocol2CodeConverter.asCallHierarchyIncomingCalls(e,t)),(e=>n.handleFailedRequest(o.CallHierarchyIncomingCallsRequest.type,t,e,null)))};return i.provideCallHierarchyIncomingCalls?i.provideCallHierarchyIncomingCalls(e,t,r):r(e,t)}provideCallHierarchyOutgoingCalls(e,t){const n=this.client,i=this.middleware,r=(e,t)=>{const i={item:n.code2ProtocolConverter.asCallHierarchyItem(e)};return n.sendRequest(o.CallHierarchyOutgoingCallsRequest.type,i,t).then((e=>t.isCancellationRequested?null:n.protocol2CodeConverter.asCallHierarchyOutgoingCalls(e,t)),(e=>n.handleFailedRequest(o.CallHierarchyOutgoingCallsRequest.type,t,e,null)))};return i.provideCallHierarchyOutgoingCalls?i.provideCallHierarchyOutgoingCalls(e,t,r):r(e,t)}}class a extends r.TextDocumentLanguageFeature{constructor(e){super(e,o.CallHierarchyPrepareRequest.type)}fillClientCapabilities(e){const t=e;(0,r.ensure)((0,r.ensure)(t,"textDocument"),"callHierarchy").dynamicRegistration=!0}initialize(e,t){const[n,i]=this.getRegistration(t,e.callHierarchyProvider);n&&i&&this.register({id:n,registerOptions:i})}registerLanguageProvider(e){const t=this._client,n=new s(t);return[i.languages.registerCallHierarchyProvider(this._client.protocol2CodeConverter.asDocumentSelector(e.documentSelector),n),n]}}t.CallHierarchyFeature=a},5760:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProposedFeatures=t.BaseLanguageClient=t.MessageTransports=t.SuspendMode=t.State=t.CloseAction=t.ErrorAction=t.RevealOutputChannelOn=void 0;const i=n(9496),o=n(5968),r=n(317),s=n(5356),a=n(2116),c=n(8005),u=n(7435),l=n(6181),d=n(497),h=n(7443),g=n(7172),p=n(4103),m=n(5610),f=n(491),v=n(9446),y=n(1258),C=n(1432),D=n(7317),b=n(1690),R=n(8447),w=n(9929),S=n(2155),T=n(4453),_=n(9368),k=n(2865),P=n(7272),x=n(3520),q=n(9190),F=n(7506),O=n(9764),E=n(7201),M=n(5828),I=n(807),N=n(9732),L=n(9314),A=n(4915),j=n(7973),H=n(1845),K=n(392),W=n(2550),U=n(4042),$=n(2275),z=n(863),V=n(2472);var B,J,Q,X,G,Y,Z,ee,te;!function(e){e[e.Debug=0]="Debug",e[e.Info=1]="Info",e[e.Warn=2]="Warn",e[e.Error=3]="Error",e[e.Never=4]="Never"}(B||(t.RevealOutputChannelOn=B={})),function(e){e[e.Continue=1]="Continue",e[e.Shutdown=2]="Shutdown"}(J||(t.ErrorAction=J={})),function(e){e[e.DoNotRestart=1]="DoNotRestart",e[e.Restart=2]="Restart"}(Q||(t.CloseAction=Q={})),function(e){e[e.Stopped=1]="Stopped",e[e.Starting=3]="Starting",e[e.Running=2]="Running"}(X||(t.State=X={})),function(e){e.off="off",e.on="on"}(G||(t.SuspendMode=G={})),function(e){e.sanitizeIsTrusted=function(e){return null!=e&&!!("boolean"==typeof e||"object"==typeof e&&null!==e&&a.stringArray(e.enabledCommands))&&e}}(Y||(Y={}));class ne{constructor(e,t){this.client=e,this.maxRestartCount=t,this.restarts=[]}error(e,t,n){return n&&n<=3?{action:J.Continue}:{action:J.Shutdown}}closed(){return this.restarts.push(Date.now()),this.restarts.length<=this.maxRestartCount?{action:Q.Restart}:this.restarts[this.restarts.length-1]-this.restarts[0]<=18e4?{action:Q.DoNotRestart,message:`The ${this.client.name} server crashed ${this.maxRestartCount+1} times in the last 3 minutes. The server will not be restarted. See the output for more information.`}:(this.restarts.shift(),{action:Q.Restart})}}!function(e){e.Initial="initial",e.Starting="starting",e.StartFailed="startFailed",e.Running="running",e.Stopping="stopping",e.Stopped="stopped"}(Z||(Z={})),function(e){e.is=function(e){return e&&o.MessageReader.is(e.reader)&&o.MessageWriter.is(e.writer)}}(ee||(t.MessageTransports=ee={}));class ie{constructor(e,t,n){this._traceFormat=o.TraceFormat.Text,this._diagnosticQueue=new Map,this._diagnosticQueueState={state:"idle"},this._features=[],this._dynamicFeatures=new Map,this.workspaceEditLock=new c.Semaphore(1),this._id=e,this._name=t;const i={isTrusted:!1,supportHtml:!1};void 0!==(n=n||{}).markdown&&(i.isTrusted=Y.sanitizeIsTrusted(n.markdown.isTrusted),i.supportHtml=!0===n.markdown.supportHtml),this._clientOptions={documentSelector:n.documentSelector??[],synchronize:n.synchronize??{},diagnosticCollectionName:n.diagnosticCollectionName,outputChannelName:n.outputChannelName??this._name,revealOutputChannelOn:n.revealOutputChannelOn??B.Error,stdioEncoding:n.stdioEncoding??"utf8",initializationOptions:n.initializationOptions,initializationFailedHandler:n.initializationFailedHandler,progressOnInitialization:!!n.progressOnInitialization,errorHandler:n.errorHandler??this.createDefaultErrorHandler(n.connectionOptions?.maxRestartCount),middleware:n.middleware??{},uriConverters:n.uriConverters,workspaceFolder:n.workspaceFolder,connectionOptions:n.connectionOptions,markdown:i,diagnosticPullOptions:n.diagnosticPullOptions??{onChange:!0,onSave:!1},notebookDocumentOptions:n.notebookDocumentOptions??{}},this._clientOptions.synchronize=this._clientOptions.synchronize||{},this._state=Z.Initial,this._ignoredRegistrations=new Set,this._listeners=[],this._notificationHandlers=new Map,this._pendingNotificationHandlers=new Map,this._notificationDisposables=new Map,this._requestHandlers=new Map,this._pendingRequestHandlers=new Map,this._requestDisposables=new Map,this._progressHandlers=new Map,this._pendingProgressHandlers=new Map,this._progressDisposables=new Map,this._connection=void 0,this._initializeResult=void 0,n.outputChannel?(this._outputChannel=n.outputChannel,this._disposeOutputChannel=!1):(this._outputChannel=void 0,this._disposeOutputChannel=!0),this._traceOutputChannel=n.traceOutputChannel,this._diagnostics=void 0,this._pendingOpenNotifications=new Set,this._pendingChangeSemaphore=new c.Semaphore(1),this._pendingChangeDelayer=new c.Delayer(250),this._fileEvents=[],this._fileEventDelayer=new c.Delayer(250),this._onStop=void 0,this._telemetryEmitter=new o.Emitter,this._stateChangeEmitter=new o.Emitter,this._trace=o.Trace.Off,this._tracer={log:(e,t)=>{a.string(e)?this.logTrace(e,t):this.logObjectTrace(e)}},this._c2p=r.createConverter(n.uriConverters?n.uriConverters.code2Protocol:void 0),this._p2c=s.createConverter(n.uriConverters?n.uriConverters.protocol2Code:void 0,this._clientOptions.markdown.isTrusted,this._clientOptions.markdown.supportHtml),this._syncedDocuments=new Map,this.registerBuiltinFeatures()}get name(){return this._name}get middleware(){return this._clientOptions.middleware??Object.create(null)}get clientOptions(){return this._clientOptions}get protocol2CodeConverter(){return this._p2c}get code2ProtocolConverter(){return this._c2p}get onTelemetry(){return this._telemetryEmitter.event}get onDidChangeState(){return this._stateChangeEmitter.event}get outputChannel(){return this._outputChannel||(this._outputChannel=i.window.createOutputChannel(this._clientOptions.outputChannelName?this._clientOptions.outputChannelName:this._name)),this._outputChannel}get traceOutputChannel(){return this._traceOutputChannel?this._traceOutputChannel:this.outputChannel}get diagnostics(){return this._diagnostics}get state(){return this.getPublicState()}get $state(){return this._state}set $state(e){let t=this.getPublicState();this._state=e;let n=this.getPublicState();n!==t&&this._stateChangeEmitter.fire({oldState:t,newState:n})}getPublicState(){switch(this.$state){case Z.Starting:return X.Starting;case Z.Running:return X.Running;default:return X.Stopped}}get initializeResult(){return this._initializeResult}async sendRequest(e,...t){if(this.$state===Z.StartFailed||this.$state===Z.Stopping||this.$state===Z.Stopped)return Promise.reject(new o.ResponseError(o.ErrorCodes.ConnectionInactive,"Client is not running"));const n=await this.$start();this._didChangeTextDocumentFeature.syncKind===o.TextDocumentSyncKind.Full&&await this.sendPendingFullTextDocumentChanges(n);const i=this._clientOptions.middleware?.sendRequest;if(void 0!==i){let r,s;return 1===t.length?o.CancellationToken.is(t[0])?s=t[0]:r=t[0]:2===t.length&&(r=t[0],s=t[1]),i(e,r,s,((e,t,i)=>{const o=[];return void 0!==t&&o.push(t),void 0!==i&&o.push(i),n.sendRequest(e,...o)}))}return n.sendRequest(e,...t)}onRequest(e,t){const n="string"==typeof e?e:e.method;this._requestHandlers.set(n,t);const i=this.activeConnection();let o;return void 0!==i?(this._requestDisposables.set(n,i.onRequest(e,t)),o={dispose:()=>{const e=this._requestDisposables.get(n);void 0!==e&&(e.dispose(),this._requestDisposables.delete(n))}}):(this._pendingRequestHandlers.set(n,t),o={dispose:()=>{this._pendingRequestHandlers.delete(n);const e=this._requestDisposables.get(n);void 0!==e&&(e.dispose(),this._requestDisposables.delete(n))}}),{dispose:()=>{this._requestHandlers.delete(n),o.dispose()}}}async sendNotification(e,t){if(this.$state===Z.StartFailed||this.$state===Z.Stopping||this.$state===Z.Stopped)return Promise.reject(new o.ResponseError(o.ErrorCodes.ConnectionInactive,"Client is not running"));const n=this._didChangeTextDocumentFeature.syncKind===o.TextDocumentSyncKind.Full;let i;n&&"string"!=typeof e&&e.method===o.DidOpenTextDocumentNotification.method&&(i=t?.textDocument.uri,this._pendingOpenNotifications.add(i));const r=await this.$start();n&&await this.sendPendingFullTextDocumentChanges(r),void 0!==i&&this._pendingOpenNotifications.delete(i);const s=this._clientOptions.middleware?.sendNotification;return s?s(e,r.sendNotification.bind(r),t):r.sendNotification(e,t)}onNotification(e,t){const n="string"==typeof e?e:e.method;this._notificationHandlers.set(n,t);const i=this.activeConnection();let o;return void 0!==i?(this._notificationDisposables.set(n,i.onNotification(e,t)),o={dispose:()=>{const e=this._notificationDisposables.get(n);void 0!==e&&(e.dispose(),this._notificationDisposables.delete(n))}}):(this._pendingNotificationHandlers.set(n,t),o={dispose:()=>{this._pendingNotificationHandlers.delete(n);const e=this._notificationDisposables.get(n);void 0!==e&&(e.dispose(),this._notificationDisposables.delete(n))}}),{dispose:()=>{this._notificationHandlers.delete(n),o.dispose()}}}async sendProgress(e,t,n){if(this.$state===Z.StartFailed||this.$state===Z.Stopping||this.$state===Z.Stopped)return Promise.reject(new o.ResponseError(o.ErrorCodes.ConnectionInactive,"Client is not running"));try{return(await this.$start()).sendProgress(e,t,n)}catch(e){throw this.error(`Sending progress for token ${t} failed.`,e),e}}onProgress(e,t,n){this._progressHandlers.set(t,{type:e,handler:n});const i=this.activeConnection();let r;const s=this._clientOptions.middleware?.handleWorkDoneProgress,a=o.WorkDoneProgress.is(e)&&void 0!==s?e=>{s(t,e,(()=>n(e)))}:n;return void 0!==i?(this._progressDisposables.set(t,i.onProgress(e,t,a)),r={dispose:()=>{const e=this._progressDisposables.get(t);void 0!==e&&(e.dispose(),this._progressDisposables.delete(t))}}):(this._pendingProgressHandlers.set(t,{type:e,handler:n}),r={dispose:()=>{this._pendingProgressHandlers.delete(t);const e=this._progressDisposables.get(t);void 0!==e&&(e.dispose(),this._progressDisposables.delete(t))}}),{dispose:()=>{this._progressHandlers.delete(t),r.dispose()}}}createDefaultErrorHandler(e){if(void 0!==e&&e<0)throw new Error(`Invalid maxRestartCount: ${e}`);return new ne(this,e??4)}async setTrace(e){this._trace=e;const t=this.activeConnection();void 0!==t&&await t.trace(this._trace,this._tracer,{sendNotification:!1,traceFormat:this._traceFormat})}data2String(e){if(e instanceof o.ResponseError){const t=e;return` Message: ${t.message}\n Code: ${t.code} ${t.data?"\n"+t.data.toString():""}`}return e instanceof Error?a.string(e.stack)?e.stack:e.message:a.string(e)?e:e.toString()}debug(e,t,n=!0){this.logOutputMessage(o.MessageType.Debug,B.Debug,"Debug",e,t,n)}info(e,t,n=!0){this.logOutputMessage(o.MessageType.Info,B.Info,"Info",e,t,n)}warn(e,t,n=!0){this.logOutputMessage(o.MessageType.Warning,B.Warn,"Warn",e,t,n)}error(e,t,n=!0){this.logOutputMessage(o.MessageType.Error,B.Error,"Error",e,t,n)}logOutputMessage(e,t,n,i,o,r){this.outputChannel.appendLine(`[${n.padEnd(5)} - ${(new Date).toLocaleTimeString()}] ${i}`),null!=o&&this.outputChannel.appendLine(this.data2String(o)),("force"===r||r&&this._clientOptions.revealOutputChannelOn<=t)&&this.showNotificationMessage(e,i)}showNotificationMessage(e,t){t=t??"A request has failed. See the output for more information.",(e===o.MessageType.Error?i.window.showErrorMessage:e===o.MessageType.Warning?i.window.showWarningMessage:i.window.showInformationMessage)(t,"Go to output").then((e=>{void 0!==e&&this.outputChannel.show(!0)}))}logTrace(e,t){this.traceOutputChannel.appendLine(`[Trace - ${(new Date).toLocaleTimeString()}] ${e}`),t&&this.traceOutputChannel.appendLine(this.data2String(t))}logObjectTrace(e){e.isLSPMessage&&e.type?this.traceOutputChannel.append(`[LSP - ${(new Date).toLocaleTimeString()}] `):this.traceOutputChannel.append(`[Trace - ${(new Date).toLocaleTimeString()}] `),e&&this.traceOutputChannel.appendLine(`${JSON.stringify(e)}`)}needsStart(){return this.$state===Z.Initial||this.$state===Z.Stopping||this.$state===Z.Stopped}needsStop(){return this.$state===Z.Starting||this.$state===Z.Running}activeConnection(){return this.$state===Z.Running&&void 0!==this._connection?this._connection:void 0}isRunning(){return this.$state===Z.Running}async start(){if("disposing"===this._disposed||"disposed"===this._disposed)throw new Error("Client got disposed and can't be restarted.");if(this.$state===Z.Stopping)throw new Error("Client is currently stopping. Can only restart a full stopped client");if(void 0!==this._onStart)return this._onStart;const[e,t,n]=this.createOnStartPromise();this._onStart=e,void 0===this._diagnostics&&(this._diagnostics=this._clientOptions.diagnosticCollectionName?i.languages.createDiagnosticCollection(this._clientOptions.diagnosticCollectionName):i.languages.createDiagnosticCollection());for(const[e,t]of this._notificationHandlers)this._pendingNotificationHandlers.has(e)||this._pendingNotificationHandlers.set(e,t);for(const[e,t]of this._requestHandlers)this._pendingRequestHandlers.has(e)||this._pendingRequestHandlers.set(e,t);for(const[e,t]of this._progressHandlers)this._pendingProgressHandlers.has(e)||this._pendingProgressHandlers.set(e,t);this.$state=Z.Starting;try{const e=await this.createConnection();e.onNotification(o.LogMessageNotification.type,(e=>{switch(e.type){case o.MessageType.Error:this.error(e.message,void 0,!1);break;case o.MessageType.Warning:this.warn(e.message,void 0,!1);break;case o.MessageType.Info:this.info(e.message,void 0,!1);break;case o.MessageType.Debug:this.debug(e.message,void 0,!1);break;default:this.outputChannel.appendLine(e.message)}})),e.onNotification(o.ShowMessageNotification.type,(e=>{switch(e.type){case o.MessageType.Error:i.window.showErrorMessage(e.message);break;case o.MessageType.Warning:i.window.showWarningMessage(e.message);break;case o.MessageType.Info:i.window.showInformationMessage(e.message);break;default:i.window.showInformationMessage(e.message)}})),e.onRequest(o.ShowMessageRequest.type,(e=>{let t;switch(e.type){case o.MessageType.Error:t=i.window.showErrorMessage;break;case o.MessageType.Warning:t=i.window.showWarningMessage;break;case o.MessageType.Info:t=i.window.showInformationMessage;break;default:t=i.window.showInformationMessage}let n=e.actions||[];return t(e.message,...n)})),e.onNotification(o.TelemetryEventNotification.type,(e=>{this._telemetryEmitter.fire(e)})),e.onRequest(o.ShowDocumentRequest.type,(async e=>{const t=async e=>{const t=this.protocol2CodeConverter.asUri(e.uri);try{if(!0===e.external)return{success:await i.env.openExternal(t)};{const n={};return void 0!==e.selection&&(n.selection=this.protocol2CodeConverter.asRange(e.selection)),void 0===e.takeFocus||!1===e.takeFocus?n.preserveFocus=!0:!0===e.takeFocus&&(n.preserveFocus=!1),await i.window.showTextDocument(t,n),{success:!0}}}catch(e){return{success:!1}}},n=this._clientOptions.middleware.window?.showDocument;return void 0!==n?n(e,t):t(e)})),e.listen(),await this.initialize(e),t()}catch(e){this.$state=Z.StartFailed,this.error(`${this._name} client: couldn't create connection to server.`,e,"force"),n(e)}return this._onStart}createOnStartPromise(){let e,t;return[new Promise(((n,i)=>{e=n,t=i})),e,t]}async initialize(e){this.refreshTrace(e,!1);const t=this._clientOptions.initializationOptions,[n,r]=void 0!==this._clientOptions.workspaceFolder?[this._clientOptions.workspaceFolder.uri.fsPath,[{uri:this._c2p.asUri(this._clientOptions.workspaceFolder.uri),name:this._clientOptions.workspaceFolder.name}]]:[this._clientGetRootPath(),null],s={processId:null,clientInfo:{name:i.env.appName,version:i.version},locale:this.getLocale(),rootPath:n||null,rootUri:n?this._c2p.asUri(i.Uri.file(n)):null,capabilities:this.computeClientCapabilities(),initializationOptions:a.func(t)?t():t,trace:o.Trace.toString(this._trace),workspaceFolders:r};if(this.fillInitializeParams(s),!this._clientOptions.progressOnInitialization)return this.doInitialize(e,s);{const t=u.generateUuid(),n=new l.ProgressPart(e,t);s.workDoneToken=t;try{const t=await this.doInitialize(e,s);return n.done(),t}catch(e){throw n.cancel(),e}}}async doInitialize(e,t){try{const n=await e.initialize(t);if(void 0!==n.capabilities.positionEncoding&&n.capabilities.positionEncoding!==o.PositionEncodingKind.UTF16)throw new Error(`Unsupported position encoding (${n.capabilities.positionEncoding}) received from server ${this.name}`);let i;this._initializeResult=n,this.$state=Z.Running,a.number(n.capabilities.textDocumentSync)?i=n.capabilities.textDocumentSync===o.TextDocumentSyncKind.None?{openClose:!1,change:o.TextDocumentSyncKind.None,save:void 0}:{openClose:!0,change:n.capabilities.textDocumentSync,save:{includeText:!1}}:void 0!==n.capabilities.textDocumentSync&&null!==n.capabilities.textDocumentSync&&(i=n.capabilities.textDocumentSync),this._capabilities=Object.assign({},n.capabilities,{resolvedTextDocumentSync:i}),e.onNotification(o.PublishDiagnosticsNotification.type,(e=>this.handleDiagnostics(e))),e.onRequest(o.RegistrationRequest.type,(e=>this.handleRegistrationRequest(e))),e.onRequest("client/registerFeature",(e=>this.handleRegistrationRequest(e))),e.onRequest(o.UnregistrationRequest.type,(e=>this.handleUnregistrationRequest(e))),e.onRequest("client/unregisterFeature",(e=>this.handleUnregistrationRequest(e))),e.onRequest(o.ApplyWorkspaceEditRequest.type,(e=>this.handleApplyWorkspaceEdit(e)));for(const[t,n]of this._pendingNotificationHandlers)this._notificationDisposables.set(t,e.onNotification(t,n));this._pendingNotificationHandlers.clear();for(const[t,n]of this._pendingRequestHandlers)this._requestDisposables.set(t,e.onRequest(t,n));this._pendingRequestHandlers.clear();for(const[t,n]of this._pendingProgressHandlers)this._progressDisposables.set(t,e.onProgress(n.type,t,n.handler));return this._pendingProgressHandlers.clear(),await e.sendNotification(o.InitializedNotification.type,{}),this.hookFileEvents(e),this.hookConfigurationChanged(e),this.initializeFeatures(e),n}catch(t){throw this._clientOptions.initializationFailedHandler?this._clientOptions.initializationFailedHandler(t)?this.initialize(e):this.stop():t instanceof o.ResponseError&&t.data&&t.data.retry?i.window.showErrorMessage(t.message,{title:"Retry",id:"retry"}).then((t=>{t&&"retry"===t.id?this.initialize(e):this.stop()})):(t&&t.message&&i.window.showErrorMessage(t.message),this.error("Server initialization failed.",t),this.stop()),t}}_clientGetRootPath(){let e=i.workspace.workspaceFolders;if(!e||0===e.length)return;let t=e[0];return"file"===t.uri.scheme?t.uri.fsPath:void 0}stop(e=2e3){return this.shutdown("stop",e)}dispose(e=2e3){try{return this._disposed="disposing",this.stop(e)}finally{this._disposed="disposed"}}async shutdown(e,t){if(this.$state===Z.Stopped||this.$state===Z.Initial)return;if(this.$state===Z.Stopping){if(void 0!==this._onStop)return this._onStop;throw new Error("Client is stopping but no stop promise available.")}const n=this.activeConnection();if(void 0===n||this.$state!==Z.Running)throw new Error(`Client is not running and can't be stopped. It's current state is: ${this.$state}`);this._initializeResult=void 0,this.$state=Z.Stopping,this.cleanUp(e);const i=new Promise((e=>{(0,o.RAL)().timer.setTimeout(e,t)})),r=(async e=>(await e.shutdown(),await e.exit(),e))(n);return this._onStop=Promise.race([i,r]).then((e=>{if(void 0===e)throw this.error("Stopping server timed out",void 0,!1),new Error("Stopping the server timed out");e.end(),e.dispose()}),(e=>{throw this.error("Stopping server failed",e,!1),e})).finally((()=>{this.$state=Z.Stopped,"stop"===e&&this.cleanUpChannel(),this._onStart=void 0,this._onStop=void 0,this._connection=void 0,this._ignoredRegistrations.clear()}))}cleanUp(e){this._fileEvents=[],this._fileEventDelayer.cancel();const t=this._listeners.splice(0,this._listeners.length);for(const e of t)e.dispose();this._syncedDocuments&&this._syncedDocuments.clear();for(const e of Array.from(this._features.entries()).map((e=>e[1])).reverse())e.clear();"stop"===e&&void 0!==this._diagnostics&&(this._diagnostics.dispose(),this._diagnostics=void 0),void 0!==this._idleInterval&&(this._idleInterval.dispose(),this._idleInterval=void 0)}cleanUpChannel(){void 0!==this._outputChannel&&this._disposeOutputChannel&&(this._outputChannel.dispose(),this._outputChannel=void 0)}notifyFileEvent(e){const t=this;async function n(e){return t._fileEvents.push(e),t._fileEventDelayer.trigger((async()=>{await t.sendNotification(o.DidChangeWatchedFilesNotification.type,{changes:t._fileEvents}),t._fileEvents=[]}))}const i=this.clientOptions.middleware?.workspace;(i?.didChangeWatchedFile?i.didChangeWatchedFile(e,n):n(e)).catch((e=>{t.error("Notify file events failed.",e)}))}async sendPendingFullTextDocumentChanges(e){return this._pendingChangeSemaphore.lock((async()=>{try{const t=this._didChangeTextDocumentFeature.getPendingDocumentChanges(this._pendingOpenNotifications);if(0===t.length)return;for(const n of t){const t=this.code2ProtocolConverter.asChangeTextDocumentParams(n);await e.sendNotification(o.DidChangeTextDocumentNotification.type,t),this._didChangeTextDocumentFeature.notificationSent(n,o.DidChangeTextDocumentNotification.type,t)}}catch(e){throw this.error("Sending pending changes failed",e,!1),e}}))}triggerPendingChangeDelivery(){this._pendingChangeDelayer.trigger((async()=>{const e=this.activeConnection();void 0!==e?await this.sendPendingFullTextDocumentChanges(e):this.triggerPendingChangeDelivery()})).catch((e=>this.error("Delivering pending changes failed",e,!1)))}handleDiagnostics(e){if(!this._diagnostics)return;const t=e.uri;"busy"===this._diagnosticQueueState.state&&this._diagnosticQueueState.document===t&&this._diagnosticQueueState.tokenSource.cancel(),this._diagnosticQueue.set(e.uri,e.diagnostics),this.triggerDiagnosticQueue()}triggerDiagnosticQueue(){(0,o.RAL)().timer.setImmediate((()=>{this.workDiagnosticQueue()}))}workDiagnosticQueue(){if("busy"===this._diagnosticQueueState.state)return;const e=this._diagnosticQueue.entries().next();if(!0===e.done)return;const[t,n]=e.value;this._diagnosticQueue.delete(t);const o=new i.CancellationTokenSource;this._diagnosticQueueState={state:"busy",document:t,tokenSource:o},this._p2c.asDiagnostics(n,o.token).then((e=>{if(!o.token.isCancellationRequested){const n=this._p2c.asUri(t),i=this.clientOptions.middleware;i.handleDiagnostics?i.handleDiagnostics(n,e,((e,t)=>this.setDiagnostics(e,t))):this.setDiagnostics(n,e)}})).finally((()=>{this._diagnosticQueueState={state:"idle"},this.triggerDiagnosticQueue()}))}setDiagnostics(e,t){this._diagnostics&&this._diagnostics.set(e,t)}getLocale(){return i.env.language}async $start(){if(this.$state===Z.StartFailed)throw new Error("Previous start failed. Can't restart server.");await this.start();const e=this.activeConnection();if(void 0===e)throw new Error("Starting server failed");return e}async createConnection(){const e=await this.createMessageTransports(this._clientOptions.stdioEncoding||"utf8");return this._connection=function(e,t,n,i,r){const s=new oe,c=(0,o.createProtocolConnection)(e,t,s,r);return c.onError((e=>{n(e[0],e[1],e[2])})),c.onClose(i),{listen:()=>c.listen(),sendRequest:c.sendRequest,onRequest:c.onRequest,hasPendingResponse:c.hasPendingResponse,sendNotification:c.sendNotification,onNotification:c.onNotification,onProgress:c.onProgress,sendProgress:c.sendProgress,trace:(e,t,n)=>{const i={sendNotification:!1,traceFormat:o.TraceFormat.Text};return void 0===n?c.trace(e,t,i):(a.boolean(n),c.trace(e,t,n))},initialize:e=>c.sendRequest(o.InitializeRequest.type,e),shutdown:()=>c.sendRequest(o.ShutdownRequest.type,void 0),exit:()=>c.sendNotification(o.ExitNotification.type),end:()=>c.end(),dispose:()=>c.dispose()}}(e.reader,e.writer,((e,t,n)=>{this.handleConnectionError(e,t,n).catch((e=>this.error("Handling connection error failed",e)))}),(()=>{this.handleConnectionClosed().catch((e=>this.error("Handling connection close failed",e)))}),this._clientOptions.connectionOptions),this._connection}async handleConnectionClosed(){if(this.$state===Z.Stopped)return;try{void 0!==this._connection&&this._connection.dispose()}catch(e){}let e={action:Q.DoNotRestart};if(this.$state!==Z.Stopping)try{e=await this._clientOptions.errorHandler.closed()}catch(e){}this._connection=void 0,e.action===Q.DoNotRestart?(this.error(e.message??"Connection to server got closed. Server will not be restarted.",void 0,!0!==e.handled&&"force"),this.cleanUp("stop"),this.$state===Z.Starting?this.$state=Z.StartFailed:this.$state=Z.Stopped,this._onStop=Promise.resolve(),this._onStart=void 0):e.action===Q.Restart&&(this.info(e.message??"Connection to server got closed. Server will restart.",!e.handled),this.cleanUp("restart"),this.$state=Z.Initial,this._onStop=Promise.resolve(),this._onStart=void 0,this.start().catch((e=>this.error("Restarting server failed",e,"force"))))}async handleConnectionError(e,t,n){const i=await this._clientOptions.errorHandler.error(e,t,n);i.action===J.Shutdown?(this.error(i.message??`Client ${this._name}: connection to server is erroring.\n${e.message}\nShutting down server.`,void 0,!0!==i.handled&&"force"),this.stop().catch((e=>{this.error("Stopping server failed",e,!1)}))):this.error(i.message??`Client ${this._name}: connection to server is erroring.\n${e.message}`,void 0,!0!==i.handled&&"force")}hookConfigurationChanged(e){this._listeners.push(i.workspace.onDidChangeConfiguration((()=>{this.refreshTrace(e,!0)})))}refreshTrace(e,t=!1){const n=i.workspace.getConfiguration(this._id);let r=o.Trace.Off,s=o.TraceFormat.Text;if(n){const e=n.get("trace.server","off");"string"==typeof e?r=o.Trace.fromString(e):(r=o.Trace.fromString(n.get("trace.server.verbosity","off")),s=o.TraceFormat.fromString(n.get("trace.server.format","text")))}this._trace=r,this._traceFormat=s,e.trace(this._trace,this._tracer,{sendNotification:t,traceFormat:this._traceFormat}).catch((e=>{this.error("Updating trace failed with error",e,!1)}))}hookFileEvents(e){let t,n=this._clientOptions.synchronize.fileEvents;n&&(t=a.array(n)?n:[n],t&&this._dynamicFeatures.get(o.DidChangeWatchedFilesNotification.type.method).registerRaw(u.generateUuid(),t))}registerFeatures(e){for(let t of e)this.registerFeature(t)}registerFeature(e){if(this._features.push(e),d.DynamicFeature.is(e)){const t=e.registrationType;this._dynamicFeatures.set(t.method,e)}}getFeature(e){return this._dynamicFeatures.get(e)}hasDedicatedTextSynchronizationFeature(e){const t=this.getFeature(o.NotebookDocumentSyncRegistrationType.method);return void 0!==t&&t instanceof g.NotebookDocumentSyncFeature&&t.handles(e)}registerBuiltinFeatures(){const e=new Map;this.registerFeature(new p.ConfigurationFeature(this)),this.registerFeature(new m.DidOpenTextDocumentFeature(this,this._syncedDocuments)),this._didChangeTextDocumentFeature=new m.DidChangeTextDocumentFeature(this,e),this._didChangeTextDocumentFeature.onPendingChangeAdded((()=>{this.triggerPendingChangeDelivery()})),this.registerFeature(this._didChangeTextDocumentFeature),this.registerFeature(new m.WillSaveFeature(this)),this.registerFeature(new m.WillSaveWaitUntilFeature(this)),this.registerFeature(new m.DidSaveTextDocumentFeature(this)),this.registerFeature(new m.DidCloseTextDocumentFeature(this,this._syncedDocuments,e)),this.registerFeature(new q.FileSystemWatcherFeature(this,(e=>this.notifyFileEvent(e)))),this.registerFeature(new f.CompletionItemFeature(this)),this.registerFeature(new v.HoverFeature(this)),this.registerFeature(new C.SignatureHelpFeature(this)),this.registerFeature(new y.DefinitionFeature(this)),this.registerFeature(new w.ReferencesFeature(this)),this.registerFeature(new D.DocumentHighlightFeature(this)),this.registerFeature(new b.DocumentSymbolFeature(this)),this.registerFeature(new R.WorkspaceSymbolFeature(this)),this.registerFeature(new S.CodeActionFeature(this)),this.registerFeature(new T.CodeLensFeature(this)),this.registerFeature(new _.DocumentFormattingFeature(this)),this.registerFeature(new _.DocumentRangeFormattingFeature(this)),this.registerFeature(new _.DocumentOnTypeFormattingFeature(this)),this.registerFeature(new k.RenameFeature(this)),this.registerFeature(new P.DocumentLinkFeature(this)),this.registerFeature(new x.ExecuteCommandFeature(this)),this.registerFeature(new p.SyncConfigurationFeature(this)),this.registerFeature(new E.TypeDefinitionFeature(this)),this.registerFeature(new O.ImplementationFeature(this)),this.registerFeature(new F.ColorProviderFeature(this)),void 0===this.clientOptions.workspaceFolder&&this.registerFeature(new M.WorkspaceFoldersFeature(this)),this.registerFeature(new I.FoldingRangeFeature(this)),this.registerFeature(new N.DeclarationFeature(this)),this.registerFeature(new L.SelectionRangeFeature(this)),this.registerFeature(new A.ProgressFeature(this)),this.registerFeature(new j.CallHierarchyFeature(this)),this.registerFeature(new H.SemanticTokensFeature(this)),this.registerFeature(new W.LinkedEditingFeature(this)),this.registerFeature(new K.DidCreateFilesFeature(this)),this.registerFeature(new K.DidRenameFilesFeature(this)),this.registerFeature(new K.DidDeleteFilesFeature(this)),this.registerFeature(new K.WillCreateFilesFeature(this)),this.registerFeature(new K.WillRenameFilesFeature(this)),this.registerFeature(new K.WillDeleteFilesFeature(this)),this.registerFeature(new U.TypeHierarchyFeature(this)),this.registerFeature(new $.InlineValueFeature(this)),this.registerFeature(new z.InlayHintsFeature(this)),this.registerFeature(new h.DiagnosticFeature(this)),this.registerFeature(new g.NotebookDocumentSyncFeature(this))}registerProposedFeatures(){this.registerFeatures(te.createAll(this))}fillInitializeParams(e){for(let t of this._features)a.func(t.fillInitializeParams)&&t.fillInitializeParams(e)}computeClientCapabilities(){const e={};(0,d.ensure)(e,"workspace").applyEdit=!0;const t=(0,d.ensure)((0,d.ensure)(e,"workspace"),"workspaceEdit");t.documentChanges=!0,t.resourceOperations=[o.ResourceOperationKind.Create,o.ResourceOperationKind.Rename,o.ResourceOperationKind.Delete],t.failureHandling=o.FailureHandlingKind.TextOnlyTransactional,t.normalizesLineEndings=!0,t.changeAnnotationSupport={groupsOnLabel:!0};const n=(0,d.ensure)((0,d.ensure)(e,"textDocument"),"publishDiagnostics");n.relatedInformation=!0,n.versionSupport=!1,n.tagSupport={valueSet:[o.DiagnosticTag.Unnecessary,o.DiagnosticTag.Deprecated]},n.codeDescriptionSupport=!0,n.dataSupport=!0;const i=(0,d.ensure)(e,"window");(0,d.ensure)(i,"showMessage").messageActionItem={additionalPropertiesSupport:!0},(0,d.ensure)(i,"showDocument").support=!0;const r=(0,d.ensure)(e,"general");r.staleRequestSupport={cancel:!0,retryOnContentModified:Array.from(ie.RequestsToCancelOnContentModified)},r.regularExpressions={engine:"ECMAScript",version:"ES2020"},r.markdown={parser:"marked",version:"1.1.0"},r.positionEncodings=["utf-16"],this._clientOptions.markdown.supportHtml&&(r.markdown.allowedTags=["ul","li","p","code","blockquote","ol","h1","h2","h3","h4","h5","h6","hr","em","pre","table","thead","tbody","tr","th","td","div","del","a","strong","br","img","span"]);for(let t of this._features)t.fillClientCapabilities(e);return e}initializeFeatures(e){const t=this._clientOptions.documentSelector;for(const e of this._features)a.func(e.preInitialize)&&e.preInitialize(this._capabilities,t);for(const e of this._features)e.initialize(this._capabilities,t)}async handleRegistrationRequest(e){const t=this.clientOptions.middleware?.handleRegisterCapability;return t?t(e,(e=>this.doRegisterCapability(e))):this.doRegisterCapability(e)}async doRegisterCapability(e){if(this.isRunning())for(const t of e.registrations){const e=this._dynamicFeatures.get(t.method);if(void 0===e)return Promise.reject(new Error(`No feature implementation for ${t.method} found. Registration failed.`));const n=t.registerOptions??{};n.documentSelector=n.documentSelector??this._clientOptions.documentSelector;const i={id:t.id,registerOptions:n};try{e.register(i)}catch(e){return Promise.reject(e)}}else for(const t of e.registrations)this._ignoredRegistrations.add(t.id)}async handleUnregistrationRequest(e){const t=this.clientOptions.middleware?.handleUnregisterCapability;return t?t(e,(e=>this.doUnregisterCapability(e))):this.doUnregisterCapability(e)}async doUnregisterCapability(e){for(const t of e.unregisterations){if(this._ignoredRegistrations.has(t.id))continue;const e=this._dynamicFeatures.get(t.method);if(!e)return Promise.reject(new Error(`No feature implementation for ${t.method} found. Unregistration failed.`));e.unregister(t.id)}}async handleApplyWorkspaceEdit(e){const t=e.edit,n=await this.workspaceEditLock.lock((()=>this._p2c.asWorkspaceEdit(t))),r=new Map;i.workspace.textDocuments.forEach((e=>r.set(e.uri.toString(),e)));let s=!1;if(t.documentChanges)for(const e of t.documentChanges)if(o.TextDocumentEdit.is(e)&&e.textDocument.version&&e.textDocument.version>=0){const t=this._p2c.asUri(e.textDocument.uri).toString(),n=r.get(t);if(n&&n.version!==e.textDocument.version){s=!0;break}}return s?Promise.resolve({applied:!1}):a.asPromise(i.workspace.applyEdit(n).then((e=>({applied:e}))))}handleFailedRequest(e,t,n,r,s=!0){if(n instanceof o.ResponseError){if(n.code===o.ErrorCodes.PendingResponseRejected||n.code===o.ErrorCodes.ConnectionInactive)return r;if(n.code===o.LSPErrorCodes.RequestCancelled||n.code===o.LSPErrorCodes.ServerCancelled){if(void 0!==t&&t.isCancellationRequested)return r;throw void 0!==n.data?new d.LSPCancellationError(n.data):new i.CancellationError}if(n.code===o.LSPErrorCodes.ContentModified){if(ie.RequestsToCancelOnContentModified.has(e.method)||ie.CancellableResolveCalls.has(e.method))throw new i.CancellationError;return r}}throw this.error(`Request ${e.method} failed.`,n,s),n}}t.BaseLanguageClient=ie,ie.RequestsToCancelOnContentModified=new Set([o.SemanticTokensRequest.method,o.SemanticTokensRangeRequest.method,o.SemanticTokensDeltaRequest.method]),ie.CancellableResolveCalls=new Set([o.CompletionResolveRequest.method,o.CodeLensResolveRequest.method,o.CodeActionResolveRequest.method,o.InlayHintResolveRequest.method,o.DocumentLinkResolveRequest.method,o.WorkspaceSymbolResolveRequest.method]);class oe{error(e){(0,o.RAL)().console.error(e)}warn(e){(0,o.RAL)().console.warn(e)}info(e){(0,o.RAL)().console.info(e)}log(e){(0,o.RAL)().console.log(e)}}!function(e){e.createAll=function(e){return[new V.InlineCompletionItemFeature(e)]}}(te||(t.ProposedFeatures=te={}))},2155:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeActionFeature=void 0;const i=n(9496),o=n(5968),r=n(7435),s=n(497);class a extends s.TextDocumentLanguageFeature{constructor(e){super(e,o.CodeActionRequest.type)}fillClientCapabilities(e){const t=(0,s.ensure)((0,s.ensure)(e,"textDocument"),"codeAction");t.dynamicRegistration=!0,t.isPreferredSupport=!0,t.disabledSupport=!0,t.dataSupport=!0,t.resolveSupport={properties:["edit"]},t.codeActionLiteralSupport={codeActionKind:{valueSet:[o.CodeActionKind.Empty,o.CodeActionKind.QuickFix,o.CodeActionKind.Refactor,o.CodeActionKind.RefactorExtract,o.CodeActionKind.RefactorInline,o.CodeActionKind.RefactorRewrite,o.CodeActionKind.Source,o.CodeActionKind.SourceOrganizeImports]}},t.honorsChangeAnnotations=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.codeActionProvider);n&&this.register({id:r.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t=e.documentSelector,n={provideCodeActions:(e,t,n,i)=>{const r=this._client,s=async(e,t,n,i)=>{const s={textDocument:r.code2ProtocolConverter.asTextDocumentIdentifier(e),range:r.code2ProtocolConverter.asRange(t),context:r.code2ProtocolConverter.asCodeActionContextSync(n)};return r.sendRequest(o.CodeActionRequest.type,s,i).then((e=>i.isCancellationRequested||null==e?null:r.protocol2CodeConverter.asCodeActionResult(e,i)),(e=>r.handleFailedRequest(o.CodeActionRequest.type,i,e,null)))},a=r.middleware;return a.provideCodeActions?a.provideCodeActions(e,t,n,i,s):s(e,t,n,i)},resolveCodeAction:e.resolveProvider?(e,t)=>{const n=this._client,i=this._client.middleware,r=async(e,t)=>n.sendRequest(o.CodeActionResolveRequest.type,n.code2ProtocolConverter.asCodeActionSync(e),t).then((i=>t.isCancellationRequested?e:n.protocol2CodeConverter.asCodeAction(i,t)),(i=>n.handleFailedRequest(o.CodeActionResolveRequest.type,t,i,e)));return i.resolveCodeAction?i.resolveCodeAction(e,t,r):r(e,t)}:void 0};return[i.languages.registerCodeActionsProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),n,e.codeActionKinds?{providedCodeActionKinds:this._client.protocol2CodeConverter.asCodeActionKinds(e.codeActionKinds)}:void 0),n]}}t.CodeActionFeature=a},317:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createConverter=void 0;const i=n(9496),o=n(5968),r=n(2116),s=n(8005),a=n(1143),c=n(225),u=n(8552),l=n(1219),d=n(6965),h=n(7400),g=n(9551),p=n(6832),m=n(134);var f;!function(e){e.is=function(e){const t=e;return t&&!!t.inserting&&!!t.replacing}}(f||(f={})),t.createConverter=function(e){const t=e||(e=>e.toString());function n(e){return t(e)}function v(e){return{uri:t(e.uri)}}function y(e){return{uri:t(e.uri),languageId:e.languageId,version:e.version,text:e.getText()}}function C(e){switch(e){case i.TextDocumentSaveReason.Manual:return o.TextDocumentSaveReason.Manual;case i.TextDocumentSaveReason.AfterDelay:return o.TextDocumentSaveReason.AfterDelay;case i.TextDocumentSaveReason.FocusOut:return o.TextDocumentSaveReason.FocusOut}return o.TextDocumentSaveReason.Manual}function D(e){switch(e){case i.CompletionTriggerKind.TriggerCharacter:return o.CompletionTriggerKind.TriggerCharacter;case i.CompletionTriggerKind.TriggerForIncompleteCompletions:return o.CompletionTriggerKind.TriggerForIncompleteCompletions;default:return o.CompletionTriggerKind.Invoked}}function b(e){switch(e){case i.SignatureHelpTriggerKind.Invoke:return o.SignatureHelpTriggerKind.Invoked;case i.SignatureHelpTriggerKind.TriggerCharacter:return o.SignatureHelpTriggerKind.TriggerCharacter;case i.SignatureHelpTriggerKind.ContentChange:return o.SignatureHelpTriggerKind.ContentChange}}function R(e){return{label:e.label}}function w(e){return{label:e.label,parameters:(t=e.parameters,t.map(R))};var t}function S(e){return{line:e.line,character:e.character}}function T(e){return null==e?e:{line:e.line>o.uinteger.MAX_VALUE?o.uinteger.MAX_VALUE:e.line,character:e.character>o.uinteger.MAX_VALUE?o.uinteger.MAX_VALUE:e.character}}function _(e){return null==e?e:{start:T(e.start),end:T(e.end)}}function k(e){return null==e?e:o.Location.create(n(e.uri),_(e.range))}function P(e){switch(e){case i.DiagnosticSeverity.Error:return o.DiagnosticSeverity.Error;case i.DiagnosticSeverity.Warning:return o.DiagnosticSeverity.Warning;case i.DiagnosticSeverity.Information:return o.DiagnosticSeverity.Information;case i.DiagnosticSeverity.Hint:return o.DiagnosticSeverity.Hint}}function x(e){switch(e){case i.DiagnosticTag.Unnecessary:return o.DiagnosticTag.Unnecessary;case i.DiagnosticTag.Deprecated:return o.DiagnosticTag.Deprecated;default:return}}function q(e){return{message:e.message,location:k(e.location)}}function F(e){const t=o.Diagnostic.create(_(e.range),e.message),i=e instanceof d.ProtocolDiagnostic?e:void 0;void 0!==i&&void 0!==i.data&&(t.data=i.data);const s=function(e){if(null!=e)return r.number(e)||r.string(e)?e:{value:e.value,target:n(e.target)}}(e.code);return d.DiagnosticCode.is(s)?void 0!==i&&i.hasDiagnosticCode?t.code=s:(t.code=s.value,t.codeDescription={href:s.target}):t.code=s,r.number(e.severity)&&(t.severity=P(e.severity)),Array.isArray(e.tags)&&(t.tags=function(e){if(!e)return;let t=[];for(let n of e){let e=x(n);void 0!==e&&t.push(e)}return t.length>0?t:void 0}(e.tags)),e.relatedInformation&&(t.relatedInformation=e.relatedInformation.map(q)),e.source&&(t.source=e.source),t}function O(e,t){return null==e?e:s.map(e,F,t)}function E(e){return null==e?e:e.map(F)}function M(e){switch(e){case i.CompletionItemTag.Deprecated:return o.CompletionItemTag.Deprecated}}function I(e){return{range:_(e.range),newText:e.newText}}function N(e){return null==e?e:e.map(I)}function L(e){return e<=i.SymbolKind.TypeParameter?e+1:o.SymbolKind.Property}function A(e){return e}function j(e){return e.map(A)}function H(e){switch(e){case i.CodeActionTriggerKind.Invoke:return o.CodeActionTriggerKind.Invoked;case i.CodeActionTriggerKind.Automatic:return o.CodeActionTriggerKind.Automatic;default:return}}function K(e){if(null!=e)return e.value}function W(e){let t=o.Command.create(e.title,e.command);return e.arguments&&(t.arguments=e.arguments),t}function U(e){const t=o.InlayHintLabelPart.create(e.value);return void 0!==e.location&&(t.location=k(e.location)),void 0!==e.command&&(t.command=W(e.command)),void 0!==e.tooltip&&(t.tooltip=$(e.tooltip)),t}function $(e){return"string"==typeof e?e:{kind:o.MarkupKind.Markdown,value:e.value}}return{asUri:n,asTextDocumentIdentifier:v,asTextDocumentItem:y,asVersionedTextDocumentIdentifier:function(e){return{uri:t(e.uri),version:e.version}},asOpenTextDocumentParams:function(e){return{textDocument:y(e)}},asChangeTextDocumentParams:function(e,n,i){if(function(e){const t=e;return!!t.uri&&!!t.version}(e))return{textDocument:{uri:t(e.uri),version:e.version},contentChanges:[{text:e.getText()}]};if(function(e){const t=e;return!!t.document&&!!t.contentChanges}(e)){const o=i;return{textDocument:{uri:t(n),version:o},contentChanges:e.contentChanges.map((e=>{const t=e.range;return{range:{start:{line:t.start.line,character:t.start.character},end:{line:t.end.line,character:t.end.character}},rangeLength:e.rangeLength,text:e.text}}))}}throw Error("Unsupported text document change parameter")},asCloseTextDocumentParams:function(e){return{textDocument:v(e)}},asSaveTextDocumentParams:function(e,t=!1){let n={textDocument:v(e)};return t&&(n.text=e.getText()),n},asWillSaveTextDocumentParams:function(e){return{textDocument:v(e.document),reason:C(e.reason)}},asDidCreateFilesParams:function(e){return{files:e.files.map((e=>({uri:t(e)})))}},asDidRenameFilesParams:function(e){return{files:e.files.map((e=>({oldUri:t(e.oldUri),newUri:t(e.newUri)})))}},asDidDeleteFilesParams:function(e){return{files:e.files.map((e=>({uri:t(e)})))}},asWillCreateFilesParams:function(e){return{files:e.files.map((e=>({uri:t(e)})))}},asWillRenameFilesParams:function(e){return{files:e.files.map((e=>({oldUri:t(e.oldUri),newUri:t(e.newUri)})))}},asWillDeleteFilesParams:function(e){return{files:e.files.map((e=>({uri:t(e)})))}},asTextDocumentPositionParams:function(e,t){return{textDocument:v(e),position:S(t)}},asCompletionParams:function(e,t,n){return{textDocument:v(e),position:S(t),context:{triggerKind:D(n.triggerKind),triggerCharacter:n.triggerCharacter}}},asSignatureHelpParams:function(e,t,n){return{textDocument:v(e),position:S(t),context:{isRetrigger:n.isRetrigger,triggerCharacter:n.triggerCharacter,triggerKind:b(n.triggerKind),activeSignatureHelp:(i=n.activeSignatureHelp,void 0===i?i:{signatures:(o=i.signatures,o.map(w)),activeSignature:i.activeSignature,activeParameter:i.activeParameter})}};var i,o},asWorkerPosition:S,asRange:_,asRanges:function(e){return e.map(_)},asPosition:T,asPositions:function(e,t){return s.map(e,T,t)},asPositionsSync:function(e){return e.map(T)},asLocation:k,asDiagnosticSeverity:P,asDiagnosticTag:x,asDiagnostic:F,asDiagnostics:O,asDiagnosticsSync:E,asCompletionItem:function(e,t=!1){let n,s;r.string(e.label)?n=e.label:(n=e.label.label,!t||void 0===e.label.detail&&void 0===e.label.description||(s={detail:e.label.detail,description:e.label.description}));let c={label:n};void 0!==s&&(c.labelDetails=s);let u=e instanceof a.default?e:void 0;var l,d;e.detail&&(c.detail=e.detail),e.documentation&&(u&&"$string"!==u.documentationFormat?c.documentation=function(e,t){switch(e){case"$string":return t;case o.MarkupKind.PlainText:return{kind:e,value:t};case o.MarkupKind.Markdown:return{kind:e,value:t.value};default:return`Unsupported Markup content received. Kind is: ${e}`}}(u.documentationFormat,e.documentation):c.documentation=e.documentation),e.filterText&&(c.filterText=e.filterText),function(e,t){let n,r,s=o.InsertTextFormat.PlainText;t.textEdit?(n=t.textEdit.newText,r=t.textEdit.range):t.insertText instanceof i.SnippetString?(s=o.InsertTextFormat.Snippet,n=t.insertText.value):n=t.insertText,t.range&&(r=t.range),e.insertTextFormat=s,t.fromEdit&&void 0!==n&&void 0!==r?e.textEdit=function(e,t){return f.is(t)?o.InsertReplaceEdit.create(e,_(t.inserting),_(t.replacing)):{newText:e,range:_(t)}}(n,r):e.insertText=n}(c,e),r.number(e.kind)&&(c.kind=(l=e.kind,void 0!==(d=u&&u.originalItemKind)?d:l+1)),e.sortText&&(c.sortText=e.sortText),e.additionalTextEdits&&(c.additionalTextEdits=N(e.additionalTextEdits)),e.commitCharacters&&(c.commitCharacters=e.commitCharacters.slice()),e.command&&(c.command=W(e.command)),!0!==e.preselect&&!1!==e.preselect||(c.preselect=e.preselect);const h=function(e){if(void 0===e)return e;const t=[];for(let n of e){const e=M(n);void 0!==e&&t.push(e)}return t}(e.tags);if(u){if(void 0!==u.data&&(c.data=u.data),!0===u.deprecated||!1===u.deprecated){if(!0===u.deprecated&&void 0!==h&&h.length>0){const e=h.indexOf(i.CompletionItemTag.Deprecated);-1!==e&&h.splice(e,1)}c.deprecated=u.deprecated}void 0!==u.insertTextMode&&(c.insertTextMode=u.insertTextMode)}return void 0!==h&&h.length>0&&(c.tags=h),void 0===c.insertTextMode&&!0===e.keepWhitespace&&(c.insertTextMode=o.InsertTextMode.adjustIndentation),c},asTextEdit:I,asSymbolKind:L,asSymbolTag:A,asSymbolTags:j,asReferenceParams:function(e,t,n){return{textDocument:v(e),position:S(t),context:{includeDeclaration:n.includeDeclaration}}},asCodeAction:async function(e,t){let n=o.CodeAction.create(e.title);if(e instanceof l.default&&void 0!==e.data&&(n.data=e.data),void 0!==e.kind&&(n.kind=K(e.kind)),void 0!==e.diagnostics&&(n.diagnostics=await O(e.diagnostics,t)),void 0!==e.edit)throw new Error("VS Code code actions can only be converted to a protocol code action without an edit.");return void 0!==e.command&&(n.command=W(e.command)),void 0!==e.isPreferred&&(n.isPreferred=e.isPreferred),void 0!==e.disabled&&(n.disabled={reason:e.disabled.reason}),n},asCodeActionSync:function(e){let t=o.CodeAction.create(e.title);if(e instanceof l.default&&void 0!==e.data&&(t.data=e.data),void 0!==e.kind&&(t.kind=K(e.kind)),void 0!==e.diagnostics&&(t.diagnostics=E(e.diagnostics)),void 0!==e.edit)throw new Error("VS Code code actions can only be converted to a protocol code action without an edit.");return void 0!==e.command&&(t.command=W(e.command)),void 0!==e.isPreferred&&(t.isPreferred=e.isPreferred),void 0!==e.disabled&&(t.disabled={reason:e.disabled.reason}),t},asCodeActionContext:async function(e,t){if(null==e)return e;let n;return e.only&&r.string(e.only.value)&&(n=[e.only.value]),o.CodeActionContext.create(await O(e.diagnostics,t),n,H(e.triggerKind))},asCodeActionContextSync:function(e){if(null==e)return e;let t;return e.only&&r.string(e.only.value)&&(t=[e.only.value]),o.CodeActionContext.create(E(e.diagnostics),t,H(e.triggerKind))},asInlineValueContext:function(e){return null==e?e:o.InlineValueContext.create(e.frameId,_(e.stoppedLocation))},asCommand:W,asCodeLens:function(e){let t=o.CodeLens.create(_(e.range));return e.command&&(t.command=W(e.command)),e instanceof c.default&&e.data&&(t.data=e.data),t},asFormattingOptions:function(e,t){const n={tabSize:e.tabSize,insertSpaces:e.insertSpaces};return t.trimTrailingWhitespace&&(n.trimTrailingWhitespace=!0),t.trimFinalNewlines&&(n.trimFinalNewlines=!0),t.insertFinalNewline&&(n.insertFinalNewline=!0),n},asDocumentSymbolParams:function(e){return{textDocument:v(e)}},asCodeLensParams:function(e){return{textDocument:v(e)}},asDocumentLink:function(e){let t=o.DocumentLink.create(_(e.range));e.target&&(t.target=n(e.target)),void 0!==e.tooltip&&(t.tooltip=e.tooltip);let i=e instanceof u.default?e:void 0;return i&&i.data&&(t.data=i.data),t},asDocumentLinkParams:function(e){return{textDocument:v(e)}},asCallHierarchyItem:function(e){const t={name:e.name,kind:L(e.kind),uri:n(e.uri),range:_(e.range),selectionRange:_(e.selectionRange)};return void 0!==e.detail&&e.detail.length>0&&(t.detail=e.detail),void 0!==e.tags&&(t.tags=j(e.tags)),e instanceof h.default&&void 0!==e.data&&(t.data=e.data),t},asTypeHierarchyItem:function(e){const t={name:e.name,kind:L(e.kind),uri:n(e.uri),range:_(e.range),selectionRange:_(e.selectionRange)};return void 0!==e.detail&&e.detail.length>0&&(t.detail=e.detail),void 0!==e.tags&&(t.tags=j(e.tags)),e instanceof g.default&&void 0!==e.data&&(t.data=e.data),t},asInlayHint:function(e){const t="string"==typeof e.label?e.label:e.label.map(U),n=o.InlayHint.create(T(e.position),t);return void 0!==e.kind&&(n.kind=e.kind),void 0!==e.textEdits&&(n.textEdits=N(e.textEdits)),void 0!==e.tooltip&&(n.tooltip=$(e.tooltip)),void 0!==e.paddingLeft&&(n.paddingLeft=e.paddingLeft),void 0!==e.paddingRight&&(n.paddingRight=e.paddingRight),e instanceof m.default&&void 0!==e.data&&(n.data=e.data),n},asWorkspaceSymbol:function(e){const n=e instanceof p.default?{name:e.name,kind:L(e.kind),location:e.hasRange?k(e.location):{uri:t(e.location.uri)},data:e.data}:{name:e.name,kind:L(e.kind),location:k(e.location)};return void 0!==e.tags&&(n.tags=j(e.tags)),""!==e.containerName&&(n.containerName=e.containerName),n},asInlineCompletionParams:function(e,t,n){return{context:o.InlineCompletionContext.create(n.triggerKind,n.selectedCompletionInfo),textDocument:v(e),position:T(t)}}}}},4453:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeLensFeature=void 0;const i=n(9496),o=n(5968),r=n(7435),s=n(497);class a extends s.TextDocumentLanguageFeature{constructor(e){super(e,o.CodeLensRequest.type)}fillClientCapabilities(e){(0,s.ensure)((0,s.ensure)(e,"textDocument"),"codeLens").dynamicRegistration=!0,(0,s.ensure)((0,s.ensure)(e,"workspace"),"codeLens").refreshSupport=!0}initialize(e,t){this._client.onRequest(o.CodeLensRefreshRequest.type,(async()=>{for(const e of this.getAllProviders())e.onDidChangeCodeLensEmitter.fire()}));const n=this.getRegistrationOptions(t,e.codeLensProvider);n&&this.register({id:r.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t=e.documentSelector,n=new i.EventEmitter,r={onDidChangeCodeLenses:n.event,provideCodeLenses:(e,t)=>{const n=this._client,i=(e,t)=>n.sendRequest(o.CodeLensRequest.type,n.code2ProtocolConverter.asCodeLensParams(e),t).then((e=>t.isCancellationRequested?null:n.protocol2CodeConverter.asCodeLenses(e,t)),(e=>n.handleFailedRequest(o.CodeLensRequest.type,t,e,null))),r=n.middleware;return r.provideCodeLenses?r.provideCodeLenses(e,t,i):i(e,t)},resolveCodeLens:e.resolveProvider?(e,t)=>{const n=this._client,i=(e,t)=>n.sendRequest(o.CodeLensResolveRequest.type,n.code2ProtocolConverter.asCodeLens(e),t).then((i=>t.isCancellationRequested?e:n.protocol2CodeConverter.asCodeLens(i)),(i=>n.handleFailedRequest(o.CodeLensResolveRequest.type,t,i,e))),r=n.middleware;return r.resolveCodeLens?r.resolveCodeLens(e,t,i):i(e,t)}:void 0};return[i.languages.registerCodeLensProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),r),{provider:r,onDidChangeCodeLensEmitter:n}]}}t.CodeLensFeature=a},7506:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColorProviderFeature=void 0;const i=n(9496),o=n(5968),r=n(497);class s extends r.TextDocumentLanguageFeature{constructor(e){super(e,o.DocumentColorRequest.type)}fillClientCapabilities(e){(0,r.ensure)((0,r.ensure)(e,"textDocument"),"colorProvider").dynamicRegistration=!0}initialize(e,t){let[n,i]=this.getRegistration(t,e.colorProvider);n&&i&&this.register({id:n,registerOptions:i})}registerLanguageProvider(e){const t=e.documentSelector,n={provideColorPresentations:(e,t,n)=>{const i=this._client,r=(e,t,n)=>{const r={color:e,textDocument:i.code2ProtocolConverter.asTextDocumentIdentifier(t.document),range:i.code2ProtocolConverter.asRange(t.range)};return i.sendRequest(o.ColorPresentationRequest.type,r,n).then((e=>n.isCancellationRequested?null:this._client.protocol2CodeConverter.asColorPresentations(e,n)),(e=>i.handleFailedRequest(o.ColorPresentationRequest.type,n,e,null)))},s=i.middleware;return s.provideColorPresentations?s.provideColorPresentations(e,t,n,r):r(e,t,n)},provideDocumentColors:(e,t)=>{const n=this._client,i=(e,t)=>{const i={textDocument:n.code2ProtocolConverter.asTextDocumentIdentifier(e)};return n.sendRequest(o.DocumentColorRequest.type,i,t).then((e=>t.isCancellationRequested?null:this._client.protocol2CodeConverter.asColorInformations(e,t)),(e=>n.handleFailedRequest(o.DocumentColorRequest.type,t,e,null)))},r=n.middleware;return r.provideDocumentColors?r.provideDocumentColors(e,t,i):i(e,t)}};return[i.languages.registerColorProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),n),n]}}t.ColorProviderFeature=s},491:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CompletionItemFeature=void 0;const i=n(9496),o=n(5968),r=n(497),s=n(7435),a=[o.CompletionItemKind.Text,o.CompletionItemKind.Method,o.CompletionItemKind.Function,o.CompletionItemKind.Constructor,o.CompletionItemKind.Field,o.CompletionItemKind.Variable,o.CompletionItemKind.Class,o.CompletionItemKind.Interface,o.CompletionItemKind.Module,o.CompletionItemKind.Property,o.CompletionItemKind.Unit,o.CompletionItemKind.Value,o.CompletionItemKind.Enum,o.CompletionItemKind.Keyword,o.CompletionItemKind.Snippet,o.CompletionItemKind.Color,o.CompletionItemKind.File,o.CompletionItemKind.Reference,o.CompletionItemKind.Folder,o.CompletionItemKind.EnumMember,o.CompletionItemKind.Constant,o.CompletionItemKind.Struct,o.CompletionItemKind.Event,o.CompletionItemKind.Operator,o.CompletionItemKind.TypeParameter];class c extends r.TextDocumentLanguageFeature{constructor(e){super(e,o.CompletionRequest.type),this.labelDetailsSupport=new Map}fillClientCapabilities(e){let t=(0,r.ensure)((0,r.ensure)(e,"textDocument"),"completion");t.dynamicRegistration=!0,t.contextSupport=!0,t.completionItem={snippetSupport:!0,commitCharactersSupport:!0,documentationFormat:[o.MarkupKind.Markdown,o.MarkupKind.PlainText],deprecatedSupport:!0,preselectSupport:!0,tagSupport:{valueSet:[o.CompletionItemTag.Deprecated]},insertReplaceSupport:!0,resolveSupport:{properties:["documentation","detail","additionalTextEdits"]},insertTextModeSupport:{valueSet:[o.InsertTextMode.asIs,o.InsertTextMode.adjustIndentation]},labelDetailsSupport:!0},t.insertTextMode=o.InsertTextMode.adjustIndentation,t.completionItemKind={valueSet:a},t.completionList={itemDefaults:["commitCharacters","editRange","insertTextFormat","insertTextMode","data"]}}initialize(e,t){const n=this.getRegistrationOptions(t,e.completionProvider);n&&this.register({id:s.generateUuid(),registerOptions:n})}registerLanguageProvider(e,t){this.labelDetailsSupport.set(t,!!e.completionItem?.labelDetailsSupport);const n=e.triggerCharacters??[],r=e.allCommitCharacters,s=e.documentSelector,a={provideCompletionItems:(e,t,n,i)=>{const s=this._client,a=this._client.middleware,c=(e,t,n,i)=>s.sendRequest(o.CompletionRequest.type,s.code2ProtocolConverter.asCompletionParams(e,t,n),i).then((e=>i.isCancellationRequested?null:s.protocol2CodeConverter.asCompletionResult(e,r,i)),(e=>s.handleFailedRequest(o.CompletionRequest.type,i,e,null)));return a.provideCompletionItem?a.provideCompletionItem(e,t,i,n,c):c(e,t,i,n)},resolveCompletionItem:e.resolveProvider?(e,n)=>{const i=this._client,r=this._client.middleware,s=(e,n)=>i.sendRequest(o.CompletionResolveRequest.type,i.code2ProtocolConverter.asCompletionItem(e,!!this.labelDetailsSupport.get(t)),n).then((e=>n.isCancellationRequested?null:i.protocol2CodeConverter.asCompletionItem(e)),(t=>i.handleFailedRequest(o.CompletionResolveRequest.type,n,t,e)));return r.resolveCompletionItem?r.resolveCompletionItem(e,n,s):s(e,n)}:void 0};return[i.languages.registerCompletionItemProvider(this._client.protocol2CodeConverter.asDocumentSelector(s),a,...n),a]}}t.CompletionItemFeature=c},4103:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SyncConfigurationFeature=t.toJSONObject=t.ConfigurationFeature=void 0;const i=n(9496),o=n(5968),r=n(2116),s=n(7435),a=n(497);function c(e){if(e){if(Array.isArray(e))return e.map(c);if("object"==typeof e){const t=Object.create(null);for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=c(e[n]));return t}}return e}t.ConfigurationFeature=class{constructor(e){this._client=e}getState(){return{kind:"static"}}fillClientCapabilities(e){e.workspace=e.workspace||{},e.workspace.configuration=!0}initialize(){let e=this._client;e.onRequest(o.ConfigurationRequest.type,((t,n)=>{let i=e=>{let t=[];for(let n of e.items){let e=void 0!==n.scopeUri&&null!==n.scopeUri?this._client.protocol2CodeConverter.asUri(n.scopeUri):void 0;t.push(this.getConfiguration(e,null!==n.section?n.section:void 0))}return t},o=e.middleware.workspace;return o&&o.configuration?o.configuration(t,n,i):i(t)}))}getConfiguration(e,t){let n=null;if(t){let o=t.lastIndexOf(".");if(-1===o)n=c(i.workspace.getConfiguration(void 0,e).get(t));else{let r=i.workspace.getConfiguration(t.substr(0,o),e);r&&(n=c(r.get(t.substr(o+1))))}}else{let t=i.workspace.getConfiguration(void 0,e);n={};for(let e of Object.keys(t))t.has(e)&&(n[e]=c(t.get(e)))}return void 0===n&&(n=null),n}clear(){}},t.toJSONObject=c,t.SyncConfigurationFeature=class{constructor(e){this._client=e,this.isCleared=!1,this._listeners=new Map}getState(){return{kind:"workspace",id:this.registrationType.method,registrations:this._listeners.size>0}}get registrationType(){return o.DidChangeConfigurationNotification.type}fillClientCapabilities(e){(0,a.ensure)((0,a.ensure)(e,"workspace"),"didChangeConfiguration").dynamicRegistration=!0}initialize(){this.isCleared=!1;let e=this._client.clientOptions.synchronize?.configurationSection;void 0!==e&&this.register({id:s.generateUuid(),registerOptions:{section:e}})}register(e){let t=i.workspace.onDidChangeConfiguration((t=>{this.onDidChangeConfiguration(e.registerOptions.section,t)}));this._listeners.set(e.id,t),void 0!==e.registerOptions.section&&this.onDidChangeConfiguration(e.registerOptions.section,void 0)}unregister(e){let t=this._listeners.get(e);t&&(this._listeners.delete(e),t.dispose())}clear(){for(const e of this._listeners.values())e.dispose();this._listeners.clear(),this.isCleared=!0}onDidChangeConfiguration(e,t){if(this.isCleared)return;let n;if(n=r.string(e)?[e]:e,void 0!==n&&void 0!==t&&!n.some((e=>t.affectsConfiguration(e))))return;const i=async e=>void 0===e?this._client.sendNotification(o.DidChangeConfigurationNotification.type,{settings:null}):this._client.sendNotification(o.DidChangeConfigurationNotification.type,{settings:this.extractSettingsInformation(e)});let s=this._client.middleware.workspace?.didChangeConfiguration;(s?s(n,i):i(n)).catch((e=>{this._client.error(`Sending notification ${o.DidChangeConfigurationNotification.type.method} failed`,e)}))}extractSettingsInformation(e){function t(e,t){let n=e;for(let e=0;e<t.length-1;e++){let i=n[t[e]];i||(i=Object.create(null),n[t[e]]=i),n=i}return n}let n=this._client.clientOptions.workspaceFolder?this._client.clientOptions.workspaceFolder.uri:void 0,o=Object.create(null);for(let r=0;r<e.length;r++){let s=e[r],a=s.indexOf("."),u=null;if(u=a>=0?i.workspace.getConfiguration(s.substr(0,a),n).get(s.substr(a+1)):i.workspace.getConfiguration(void 0,n).get(s),u){let n=e[r].split(".");t(o,n)[n[n.length-1]]=c(u)}}return o}}},9732:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DeclarationFeature=void 0;const i=n(9496),o=n(5968),r=n(497);class s extends r.TextDocumentLanguageFeature{constructor(e){super(e,o.DeclarationRequest.type)}fillClientCapabilities(e){const t=(0,r.ensure)((0,r.ensure)(e,"textDocument"),"declaration");t.dynamicRegistration=!0,t.linkSupport=!0}initialize(e,t){const[n,i]=this.getRegistration(t,e.declarationProvider);n&&i&&this.register({id:n,registerOptions:i})}registerLanguageProvider(e){const t=e.documentSelector,n={provideDeclaration:(e,t,n)=>{const i=this._client,r=(e,t,n)=>i.sendRequest(o.DeclarationRequest.type,i.code2ProtocolConverter.asTextDocumentPositionParams(e,t),n).then((e=>n.isCancellationRequested?null:i.protocol2CodeConverter.asDeclarationResult(e,n)),(e=>i.handleFailedRequest(o.DeclarationRequest.type,n,e,null))),s=i.middleware;return s.provideDeclaration?s.provideDeclaration(e,t,n,r):r(e,t,n)}};return[this.registerProvider(t,n),n]}registerProvider(e,t){return i.languages.registerDeclarationProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}}t.DeclarationFeature=s},1258:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DefinitionFeature=void 0;const i=n(9496),o=n(5968),r=n(497),s=n(7435);class a extends r.TextDocumentLanguageFeature{constructor(e){super(e,o.DefinitionRequest.type)}fillClientCapabilities(e){let t=(0,r.ensure)((0,r.ensure)(e,"textDocument"),"definition");t.dynamicRegistration=!0,t.linkSupport=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.definitionProvider);n&&this.register({id:s.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t=e.documentSelector,n={provideDefinition:(e,t,n)=>{const i=this._client,r=(e,t,n)=>i.sendRequest(o.DefinitionRequest.type,i.code2ProtocolConverter.asTextDocumentPositionParams(e,t),n).then((e=>n.isCancellationRequested?null:i.protocol2CodeConverter.asDefinitionResult(e,n)),(e=>i.handleFailedRequest(o.DefinitionRequest.type,n,e,null))),s=i.middleware;return s.provideDefinition?s.provideDefinition(e,t,n,r):r(e,t,n)}};return[this.registerProvider(t,n),n]}registerProvider(e,t){return i.languages.registerDefinitionProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}}t.DefinitionFeature=a},7443:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DiagnosticFeature=t.DiagnosticPullMode=t.vsdiag=void 0;const i=n(3707),o=n(9496),r=n(5968),s=n(7435),a=n(497);function c(e,t){return void 0===e[t]&&(e[t]={}),e[t]}var u,l,d,h,g;!function(e){let t;!function(e){e.full="full",e.unChanged="unChanged"}(t=e.DocumentDiagnosticReportKind||(e.DocumentDiagnosticReportKind={}))}(u||(t.vsdiag=u={})),function(e){e.onType="onType",e.onSave="onSave"}(l||(t.DiagnosticPullMode=l={})),function(e){e.active="open",e.reschedule="reschedule",e.outDated="drop"}(d||(d={}));class p{constructor(){this.open=new Set,this._onOpen=new o.EventEmitter,this._onClose=new o.EventEmitter,p.fillTabResources(this.open);void 0!==o.window.tabGroups.onDidChangeTabs?this.disposable=o.window.tabGroups.onDidChangeTabs((e=>{if(0===e.closed.length&&0===e.opened.length)return;const t=this.open,n=new Set;p.fillTabResources(n);const i=new Set,r=new Set(n);for(const e of t.values())n.has(e)?r.delete(e):i.add(e);if(this.open=n,i.size>0){const e=new Set;for(const t of i)e.add(o.Uri.parse(t));this._onClose.fire(e)}if(r.size>0){const e=new Set;for(const t of r)e.add(o.Uri.parse(t));this._onOpen.fire(e)}})):this.disposable={dispose:()=>{}}}get onClose(){return this._onClose.event}get onOpen(){return this._onOpen.event}dispose(){this.disposable.dispose()}isActive(e){return e instanceof o.Uri?o.window.activeTextEditor?.document.uri===e:o.window.activeTextEditor?.document===e}isVisible(e){const t=e instanceof o.Uri?e:e.uri;return this.open.has(t.toString())}getTabResources(){const e=new Set;return p.fillTabResources(new Set,e),e}static fillTabResources(e,t){const n=e??new Set;for(const e of o.window.tabGroups.all)for(const i of e.tabs){const e=i.input;let r;e instanceof o.TabInputText?r=e.uri:e instanceof o.TabInputTextDiff?r=e.modified:e instanceof o.TabInputCustom&&(r=e.uri),void 0===r||n.has(r.toString())||(n.add(r.toString()),void 0!==t&&t.add(r))}}}!function(e){e[e.document=1]="document",e[e.workspace=2]="workspace"}(h||(h={})),function(e){e.asKey=function(e){return e instanceof o.Uri?e.toString():e.uri.toString()}}(g||(g={}));class m{constructor(){this.documentPullStates=new Map,this.workspacePullStates=new Map}track(e,t,n){const i=e===h.document?this.documentPullStates:this.workspacePullStates,[r,s,a]=t instanceof o.Uri?[t.toString(),t,n]:[t.uri.toString(),t.uri,t.version];let c=i.get(r);return void 0===c&&(c={document:s,pulledVersion:a,resultId:void 0},i.set(r,c)),c}update(e,t,n,i){const r=e===h.document?this.documentPullStates:this.workspacePullStates,[s,a,c,u]=t instanceof o.Uri?[t.toString(),t,n,i]:[t.uri.toString(),t.uri,t.version,n];let l=r.get(s);void 0===l?(l={document:a,pulledVersion:c,resultId:u},r.set(s,l)):(l.pulledVersion=c,l.resultId=u)}unTrack(e,t){const n=g.asKey(t);(e===h.document?this.documentPullStates:this.workspacePullStates).delete(n)}tracks(e,t){const n=g.asKey(t);return(e===h.document?this.documentPullStates:this.workspacePullStates).has(n)}getResultId(e,t){const n=g.asKey(t);return(e===h.document?this.documentPullStates:this.workspacePullStates).get(n)?.resultId}getAllResultIds(){const e=[];for(let[t,n]of this.workspacePullStates)this.documentPullStates.has(t)&&(n=this.documentPullStates.get(t)),void 0!==n.resultId&&e.push({uri:t,value:n.resultId});return e}}class f{constructor(e,t,n){this.client=e,this.tabs=t,this.options=n,this.isDisposed=!1,this.onDidChangeDiagnosticsEmitter=new o.EventEmitter,this.provider=this.createProvider(),this.diagnostics=o.languages.createDiagnosticCollection(n.identifier),this.openRequests=new Map,this.documentStates=new m,this.workspaceErrorCounter=0}knows(e,t){const n=t instanceof o.Uri?t:t.uri;return this.documentStates.tracks(e,t)||this.openRequests.has(n.toString())}forget(e,t){this.documentStates.unTrack(e,t)}pull(e,t){if(this.isDisposed)return;const n=e instanceof o.Uri?e:e.uri;this.pullAsync(e).then((()=>{t&&t()}),(e=>{this.client.error(`Document pull failed for text document ${n.toString()}`,e,!1)}))}async pullAsync(e,t){if(this.isDisposed)return;const n=e instanceof o.Uri,i=n?e:e.uri,s=i.toString();t=n?t:e.version;const c=this.openRequests.get(s),l=n?this.documentStates.track(h.document,e,t):this.documentStates.track(h.document,e);if(void 0===c){const n=new o.CancellationTokenSource;let c,g;this.openRequests.set(s,{state:d.active,document:e,version:t,tokenSource:n});try{c=await this.provider.provideDiagnostics(e,l.resultId,n.token)??{kind:u.DocumentDiagnosticReportKind.full,items:[]}}catch(t){if(t instanceof a.LSPCancellationError&&r.DiagnosticServerCancellationData.is(t.data)&&!1===t.data.retriggerRequest&&(g={state:d.outDated,document:e}),!(void 0===g&&t instanceof o.CancellationError))throw t;g={state:d.reschedule,document:e}}if(g=g??this.openRequests.get(s),void 0===g)return this.client.error(`Lost request state in diagnostic pull model. Clearing diagnostics for ${s}`),void this.diagnostics.delete(i);if(this.openRequests.delete(s),!this.tabs.isVisible(e))return void this.documentStates.unTrack(h.document,e);if(g.state===d.outDated)return;void 0!==c&&(c.kind===u.DocumentDiagnosticReportKind.full&&this.diagnostics.set(i,c.items),l.pulledVersion=t,l.resultId=c.resultId),g.state===d.reschedule&&this.pull(e)}else c.state===d.active?(c.tokenSource.cancel(),this.openRequests.set(s,{state:d.reschedule,document:c.document})):c.state===d.outDated&&this.openRequests.set(s,{state:d.reschedule,document:c.document})}forgetDocument(e){const t=e instanceof o.Uri?e:e.uri,n=t.toString(),i=this.openRequests.get(n);this.options.workspaceDiagnostics?void 0!==i?this.openRequests.set(n,{state:d.reschedule,document:e}):this.pull(e,(()=>{this.forget(h.document,e)})):(void 0!==i&&(i.state===d.active&&i.tokenSource.cancel(),this.openRequests.set(n,{state:d.outDated,document:e})),this.diagnostics.delete(t),this.forget(h.document,e))}pullWorkspace(){this.isDisposed||this.pullWorkspaceAsync().then((()=>{this.workspaceTimeout=(0,r.RAL)().timer.setTimeout((()=>{this.pullWorkspace()}),2e3)}),(e=>{e instanceof a.LSPCancellationError||r.DiagnosticServerCancellationData.is(e.data)||(this.client.error("Workspace diagnostic pull failed.",e,!1),this.workspaceErrorCounter++),this.workspaceErrorCounter<=5&&(this.workspaceTimeout=(0,r.RAL)().timer.setTimeout((()=>{this.pullWorkspace()}),2e3))}))}async pullWorkspaceAsync(){if(!this.provider.provideWorkspaceDiagnostics||this.isDisposed)return;void 0!==this.workspaceCancellation&&(this.workspaceCancellation.cancel(),this.workspaceCancellation=void 0),this.workspaceCancellation=new o.CancellationTokenSource;const e=this.documentStates.getAllResultIds().map((e=>({uri:this.client.protocol2CodeConverter.asUri(e.uri),value:e.value})));await this.provider.provideWorkspaceDiagnostics(e,this.workspaceCancellation.token,(e=>{if(e&&!this.isDisposed)for(const t of e.items)t.kind===u.DocumentDiagnosticReportKind.full&&(this.documentStates.tracks(h.document,t.uri)||this.diagnostics.set(t.uri,t.items)),this.documentStates.update(h.workspace,t.uri,t.version??void 0,t.resultId)}))}createProvider(){const e={onDidChangeDiagnostics:this.onDidChangeDiagnosticsEmitter.event,provideDiagnostics:(e,t,n)=>{const i=(e,t,n)=>{const i={identifier:this.options.identifier,textDocument:{uri:this.client.code2ProtocolConverter.asUri(e instanceof o.Uri?e:e.uri)},previousResultId:t};return!0!==this.isDisposed&&this.client.isRunning()?this.client.sendRequest(r.DocumentDiagnosticRequest.type,i,n).then((async e=>null==e||this.isDisposed||n.isCancellationRequested?{kind:u.DocumentDiagnosticReportKind.full,items:[]}:e.kind===r.DocumentDiagnosticReportKind.Full?{kind:u.DocumentDiagnosticReportKind.full,resultId:e.resultId,items:await this.client.protocol2CodeConverter.asDiagnostics(e.items,n)}:{kind:u.DocumentDiagnosticReportKind.unChanged,resultId:e.resultId}),(e=>this.client.handleFailedRequest(r.DocumentDiagnosticRequest.type,n,e,{kind:u.DocumentDiagnosticReportKind.full,items:[]}))):{kind:u.DocumentDiagnosticReportKind.full,items:[]}},s=this.client.middleware;return s.provideDiagnostics?s.provideDiagnostics(e,t,n,i):i(e,t,n)}};return this.options.workspaceDiagnostics&&(e.provideWorkspaceDiagnostics=(e,t,n)=>{const i=async e=>e.kind===r.DocumentDiagnosticReportKind.Full?{kind:u.DocumentDiagnosticReportKind.full,uri:this.client.protocol2CodeConverter.asUri(e.uri),resultId:e.resultId,version:e.version,items:await this.client.protocol2CodeConverter.asDiagnostics(e.items,t)}:{kind:u.DocumentDiagnosticReportKind.unChanged,uri:this.client.protocol2CodeConverter.asUri(e.uri),resultId:e.resultId,version:e.version},o=e=>{const t=[];for(const n of e)t.push({uri:this.client.code2ProtocolConverter.asUri(n.uri),value:n.value});return t},a=(e,t)=>{const a=(0,s.generateUuid)(),c=this.client.onProgress(r.WorkspaceDiagnosticRequest.partialResult,a,(async e=>{if(null==e)return void n(null);const t={items:[]};for(const n of e.items)try{t.items.push(await i(n))}catch(e){this.client.error("Converting workspace diagnostics failed.",e)}n(t)})),u={identifier:this.options.identifier,previousResultIds:o(e),partialResultToken:a};return!0!==this.isDisposed&&this.client.isRunning()?this.client.sendRequest(r.WorkspaceDiagnosticRequest.type,u,t).then((async e=>{if(t.isCancellationRequested)return{items:[]};const o={items:[]};for(const t of e.items)o.items.push(await i(t));return c.dispose(),n(o),{items:[]}}),(e=>(c.dispose(),this.client.handleFailedRequest(r.DocumentDiagnosticRequest.type,t,e,{items:[]})))):{items:[]}},c=this.client.middleware;return c.provideWorkspaceDiagnostics?c.provideWorkspaceDiagnostics(e,t,n,a):a(e,t)}),e}dispose(){this.isDisposed=!0,this.workspaceCancellation?.cancel(),this.workspaceTimeout?.dispose();for(const[e,t]of this.openRequests)t.state===d.active&&t.tokenSource.cancel(),this.openRequests.set(e,{state:d.outDated,document:t.document});this.diagnostics.dispose()}}class v{constructor(e){this.diagnosticRequestor=e,this.documents=new r.LinkedMap,this.isDisposed=!1}add(e){if(!0===this.isDisposed)return;const t=g.asKey(e);this.documents.has(t)||(this.documents.set(t,e,r.Touch.Last),this.trigger())}remove(e){const t=g.asKey(e);this.documents.delete(t),0===this.documents.size?this.stop():t===this.endDocumentKey()&&(this.endDocument=this.documents.last)}trigger(){!0!==this.isDisposed&&(void 0===this.intervalHandle?(this.endDocument=this.documents.last,this.intervalHandle=(0,r.RAL)().timer.setInterval((()=>{const e=this.documents.first;if(void 0!==e){const t=g.asKey(e);this.diagnosticRequestor.pull(e),this.documents.set(t,e,r.Touch.Last),t===this.endDocumentKey()&&this.stop()}}),200)):this.endDocument=this.documents.last)}dispose(){this.isDisposed=!0,this.stop(),this.documents.clear()}stop(){this.intervalHandle?.dispose(),this.intervalHandle=void 0,this.endDocument=void 0}endDocumentKey(){return void 0!==this.endDocument?g.asKey(this.endDocument):void 0}}class y{constructor(e,t,n){const s=e.clientOptions.diagnosticPullOptions??{onChange:!0,onSave:!1},a=e.protocol2CodeConverter.asDocumentSelector(n.documentSelector),c=[],u=e=>e instanceof o.Uri?(e=>{const t=n.documentSelector;if(void 0!==s.match)return s.match(t,e);for(const n of t)if(r.TextDocumentFilter.is(n)){if("string"==typeof n)return!1;if(void 0!==n.language&&"*"!==n.language)return!1;if(void 0!==n.scheme&&"*"!==n.scheme&&n.scheme!==e.scheme)return!1;if(void 0!==n.pattern){const t=new i.Minimatch(n.pattern,{noext:!0});if(!t.makeRe())return!1;if(!t.match(e.fsPath))return!1}}return!0})(e):o.languages.match(a,e)>0&&t.isVisible(e),d=e=>e instanceof o.Uri?this.activeTextDocument?.uri.toString()===e.toString():this.activeTextDocument===e;this.diagnosticRequestor=new f(e,t,n),this.backgroundScheduler=new v(this.diagnosticRequestor);const g=e=>{u(e)&&n.interFileDependencies&&!d(e)&&this.backgroundScheduler.add(e)};this.activeTextDocument=o.window.activeTextEditor?.document,o.window.onDidChangeActiveTextEditor((e=>{const t=this.activeTextDocument;this.activeTextDocument=e?.document,void 0!==t&&g(t),void 0!==this.activeTextDocument&&this.backgroundScheduler.remove(this.activeTextDocument)}));const p=e.getFeature(r.DidOpenTextDocumentNotification.method);c.push(p.onNotificationSent((e=>{const t=e.textDocument;this.diagnosticRequestor.knows(h.document,t)||u(t)&&this.diagnosticRequestor.pull(t,(()=>{g(t)}))}))),c.push(t.onOpen((e=>{for(const t of e){if(this.diagnosticRequestor.knows(h.document,t))continue;const e=t.toString();let n;for(const t of o.workspace.textDocuments)if(e===t.uri.toString()){n=t;break}void 0!==n&&u(n)&&this.diagnosticRequestor.pull(n,(()=>{g(n)}))}})));const m=new Set;for(const e of o.workspace.textDocuments)u(e)&&(this.diagnosticRequestor.pull(e,(()=>{g(e)})),m.add(e.uri.toString()));if(!0===s.onTabs)for(const e of t.getTabResources())!m.has(e.toString())&&u(e)&&this.diagnosticRequestor.pull(e,(()=>{g(e)}));if(!0===s.onChange){const t=e.getFeature(r.DidChangeTextDocumentNotification.method);c.push(t.onNotificationSent((async e=>{const t=e.textDocument;void 0!==s.filter&&s.filter(t,l.onType)||!this.diagnosticRequestor.knows(h.document,t)||this.diagnosticRequestor.pull(t,(()=>{this.backgroundScheduler.trigger()}))})))}if(!0===s.onSave){const t=e.getFeature(r.DidSaveTextDocumentNotification.method);c.push(t.onNotificationSent((e=>{const t=e.textDocument;void 0!==s.filter&&s.filter(t,l.onSave)||!this.diagnosticRequestor.knows(h.document,t)||this.diagnosticRequestor.pull(e.textDocument,(()=>{this.backgroundScheduler.trigger()}))})))}const y=e.getFeature(r.DidCloseTextDocumentNotification.method);c.push(y.onNotificationSent((e=>{this.cleanUpDocument(e.textDocument)}))),t.onClose((e=>{for(const t of e)this.cleanUpDocument(t)})),this.diagnosticRequestor.onDidChangeDiagnosticsEmitter.event((()=>{for(const e of o.workspace.textDocuments)u(e)&&this.diagnosticRequestor.pull(e)})),!0===n.workspaceDiagnostics&&"da348dc5-c30a-4515-9d98-31ff3be38d14"!==n.identifier&&this.diagnosticRequestor.pullWorkspace(),this.disposable=o.Disposable.from(...c,this.backgroundScheduler,this.diagnosticRequestor)}get onDidChangeDiagnosticsEmitter(){return this.diagnosticRequestor.onDidChangeDiagnosticsEmitter}get diagnostics(){return this.diagnosticRequestor.provider}cleanUpDocument(e){this.diagnosticRequestor.knows(h.document,e)&&(this.diagnosticRequestor.forgetDocument(e),this.backgroundScheduler.remove(e))}}class C extends a.TextDocumentLanguageFeature{constructor(e){super(e,r.DocumentDiagnosticRequest.type)}fillClientCapabilities(e){let t=c(c(e,"textDocument"),"diagnostic");t.dynamicRegistration=!0,t.relatedDocumentSupport=!1,c(c(e,"workspace"),"diagnostics").refreshSupport=!0}initialize(e,t){this._client.onRequest(r.DiagnosticRefreshRequest.type,(async()=>{for(const e of this.getAllProviders())e.onDidChangeDiagnosticsEmitter.fire()}));let[n,i]=this.getRegistration(t,e.diagnosticProvider);n&&i&&this.register({id:n,registerOptions:i})}clear(){void 0!==this.tabs&&(this.tabs.dispose(),this.tabs=void 0),super.clear()}registerLanguageProvider(e){void 0===this.tabs&&(this.tabs=new p);const t=new y(this._client,this.tabs,e);return[t.disposable,t]}}t.DiagnosticFeature=C},7317:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentHighlightFeature=void 0;const i=n(9496),o=n(5968),r=n(497),s=n(7435);class a extends r.TextDocumentLanguageFeature{constructor(e){super(e,o.DocumentHighlightRequest.type)}fillClientCapabilities(e){(0,r.ensure)((0,r.ensure)(e,"textDocument"),"documentHighlight").dynamicRegistration=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.documentHighlightProvider);n&&this.register({id:s.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t=e.documentSelector,n={provideDocumentHighlights:(e,t,n)=>{const i=this._client,r=(e,t,n)=>i.sendRequest(o.DocumentHighlightRequest.type,i.code2ProtocolConverter.asTextDocumentPositionParams(e,t),n).then((e=>n.isCancellationRequested?null:i.protocol2CodeConverter.asDocumentHighlights(e,n)),(e=>i.handleFailedRequest(o.DocumentHighlightRequest.type,n,e,null))),s=i.middleware;return s.provideDocumentHighlights?s.provideDocumentHighlights(e,t,n,r):r(e,t,n)}};return[i.languages.registerDocumentHighlightProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),n),n]}}t.DocumentHighlightFeature=a},7272:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentLinkFeature=void 0;const i=n(9496),o=n(5968),r=n(497),s=n(7435);class a extends r.TextDocumentLanguageFeature{constructor(e){super(e,o.DocumentLinkRequest.type)}fillClientCapabilities(e){const t=(0,r.ensure)((0,r.ensure)(e,"textDocument"),"documentLink");t.dynamicRegistration=!0,t.tooltipSupport=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.documentLinkProvider);n&&this.register({id:s.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t=e.documentSelector,n={provideDocumentLinks:(e,t)=>{const n=this._client,i=(e,t)=>n.sendRequest(o.DocumentLinkRequest.type,n.code2ProtocolConverter.asDocumentLinkParams(e),t).then((e=>t.isCancellationRequested?null:n.protocol2CodeConverter.asDocumentLinks(e,t)),(e=>n.handleFailedRequest(o.DocumentLinkRequest.type,t,e,null))),r=n.middleware;return r.provideDocumentLinks?r.provideDocumentLinks(e,t,i):i(e,t)},resolveDocumentLink:e.resolveProvider?(e,t)=>{const n=this._client;let i=(e,t)=>n.sendRequest(o.DocumentLinkResolveRequest.type,n.code2ProtocolConverter.asDocumentLink(e),t).then((i=>t.isCancellationRequested?e:n.protocol2CodeConverter.asDocumentLink(i)),(i=>n.handleFailedRequest(o.DocumentLinkResolveRequest.type,t,i,e)));const r=n.middleware;return r.resolveDocumentLink?r.resolveDocumentLink(e,t,i):i(e,t)}:void 0};return[i.languages.registerDocumentLinkProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),n),n]}}t.DocumentLinkFeature=a},1690:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentSymbolFeature=t.SupportedSymbolTags=t.SupportedSymbolKinds=void 0;const i=n(9496),o=n(5968),r=n(497),s=n(7435);t.SupportedSymbolKinds=[o.SymbolKind.File,o.SymbolKind.Module,o.SymbolKind.Namespace,o.SymbolKind.Package,o.SymbolKind.Class,o.SymbolKind.Method,o.SymbolKind.Property,o.SymbolKind.Field,o.SymbolKind.Constructor,o.SymbolKind.Enum,o.SymbolKind.Interface,o.SymbolKind.Function,o.SymbolKind.Variable,o.SymbolKind.Constant,o.SymbolKind.String,o.SymbolKind.Number,o.SymbolKind.Boolean,o.SymbolKind.Array,o.SymbolKind.Object,o.SymbolKind.Key,o.SymbolKind.Null,o.SymbolKind.EnumMember,o.SymbolKind.Struct,o.SymbolKind.Event,o.SymbolKind.Operator,o.SymbolKind.TypeParameter],t.SupportedSymbolTags=[o.SymbolTag.Deprecated];class a extends r.TextDocumentLanguageFeature{constructor(e){super(e,o.DocumentSymbolRequest.type)}fillClientCapabilities(e){let n=(0,r.ensure)((0,r.ensure)(e,"textDocument"),"documentSymbol");n.dynamicRegistration=!0,n.symbolKind={valueSet:t.SupportedSymbolKinds},n.hierarchicalDocumentSymbolSupport=!0,n.tagSupport={valueSet:t.SupportedSymbolTags},n.labelSupport=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.documentSymbolProvider);n&&this.register({id:s.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t=e.documentSelector,n={provideDocumentSymbols:(e,t)=>{const n=this._client,i=async(e,t)=>{try{const i=await n.sendRequest(o.DocumentSymbolRequest.type,n.code2ProtocolConverter.asDocumentSymbolParams(e),t);if(t.isCancellationRequested||null==i)return null;if(0===i.length)return[];{const e=i[0];return o.DocumentSymbol.is(e)?await n.protocol2CodeConverter.asDocumentSymbols(i,t):await n.protocol2CodeConverter.asSymbolInformations(i,t)}}catch(e){return n.handleFailedRequest(o.DocumentSymbolRequest.type,t,e,null)}},r=n.middleware;return r.provideDocumentSymbols?r.provideDocumentSymbols(e,t,i):i(e,t)}},r=void 0!==e.label?{label:e.label}:void 0;return[i.languages.registerDocumentSymbolProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),n,r),n]}}t.DocumentSymbolFeature=a},3520:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExecuteCommandFeature=void 0;const i=n(9496),o=n(5968),r=n(7435),s=n(497);t.ExecuteCommandFeature=class{constructor(e){this._client=e,this._commands=new Map}getState(){return{kind:"workspace",id:this.registrationType.method,registrations:this._commands.size>0}}get registrationType(){return o.ExecuteCommandRequest.type}fillClientCapabilities(e){(0,s.ensure)((0,s.ensure)(e,"workspace"),"executeCommand").dynamicRegistration=!0}initialize(e){e.executeCommandProvider&&this.register({id:r.generateUuid(),registerOptions:Object.assign({},e.executeCommandProvider)})}register(e){const t=this._client,n=t.middleware,r=(e,n)=>{let i={command:e,arguments:n};return t.sendRequest(o.ExecuteCommandRequest.type,i).then(void 0,(e=>t.handleFailedRequest(o.ExecuteCommandRequest.type,void 0,e,void 0)))};if(e.registerOptions.commands){const t=[];for(const o of e.registerOptions.commands)t.push(i.commands.registerCommand(o,((...e)=>n.executeCommand?n.executeCommand(o,e,r):r(o,e))));this._commands.set(e.id,t)}}unregister(e){let t=this._commands.get(e);t&&t.forEach((e=>e.dispose()))}clear(){this._commands.forEach((e=>{e.forEach((e=>e.dispose()))})),this._commands.clear()}}},497:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceFeature=t.TextDocumentLanguageFeature=t.TextDocumentEventFeature=t.DynamicDocumentFeature=t.DynamicFeature=t.StaticFeature=t.ensure=t.LSPCancellationError=void 0;const i=n(9496),o=n(5968),r=n(2116),s=n(7435);class a extends i.CancellationError{constructor(e){super(),this.data=e}}var c,u;t.LSPCancellationError=a,t.ensure=function(e,t){return void 0===e[t]&&(e[t]={}),e[t]},function(e){e.is=function(e){const t=e;return null!=t&&r.func(t.fillClientCapabilities)&&r.func(t.initialize)&&r.func(t.getState)&&r.func(t.clear)&&(void 0===t.fillInitializeParams||r.func(t.fillInitializeParams))}}(c||(t.StaticFeature=c={})),function(e){e.is=function(e){const t=e;return null!=t&&r.func(t.fillClientCapabilities)&&r.func(t.initialize)&&r.func(t.getState)&&r.func(t.clear)&&(void 0===t.fillInitializeParams||r.func(t.fillInitializeParams))&&r.func(t.register)&&r.func(t.unregister)&&void 0!==t.registrationType}}(u||(t.DynamicFeature=u={}));class l{constructor(e){this._client=e}getState(){const e=this.getDocumentSelectors();let t=0;for(const n of e){t++;for(const e of i.workspace.textDocuments)if(i.languages.match(n,e)>0)return{kind:"document",id:this.registrationType.method,registrations:!0,matches:!0}}const n=t>0;return{kind:"document",id:this.registrationType.method,registrations:n,matches:!1}}}t.DynamicDocumentFeature=l,t.TextDocumentEventFeature=class extends l{static textDocumentFilter(e,t){for(const n of e)if(i.languages.match(n,t)>0)return!0;return!1}constructor(e,t,n,o,r,s,a){super(e),this._event=t,this._type=n,this._middleware=o,this._createParams=r,this._textDocument=s,this._selectorFilter=a,this._selectors=new Map,this._onNotificationSent=new i.EventEmitter}getStateInfo(){return[this._selectors.values(),!1]}getDocumentSelectors(){return this._selectors.values()}register(e){e.registerOptions.documentSelector&&(this._listener||(this._listener=this._event((e=>{this.callback(e).catch((e=>{this._client.error(`Sending document notification ${this._type.method} failed.`,e)}))}))),this._selectors.set(e.id,this._client.protocol2CodeConverter.asDocumentSelector(e.registerOptions.documentSelector)))}async callback(e){const t=async e=>{const t=this._createParams(e);await this._client.sendNotification(this._type,t),this.notificationSent(this.getTextDocument(e),this._type,t)};if(this.matches(e)){const n=this._middleware();return n?n(e,(e=>t(e))):t(e)}}matches(e){return!this._client.hasDedicatedTextSynchronizationFeature(this._textDocument(e))&&(!this._selectorFilter||this._selectorFilter(this._selectors.values(),e))}get onNotificationSent(){return this._onNotificationSent.event}notificationSent(e,t,n){this._onNotificationSent.fire({textDocument:e,type:t,params:n})}unregister(e){this._selectors.delete(e),0===this._selectors.size&&this._listener&&(this._listener.dispose(),this._listener=void 0)}clear(){this._selectors.clear(),this._onNotificationSent.dispose(),this._listener&&(this._listener.dispose(),this._listener=void 0)}getProvider(e){for(const t of this._selectors.values())if(i.languages.match(t,e)>0)return{send:e=>this.callback(e)}}},t.TextDocumentLanguageFeature=class extends l{constructor(e,t){super(e),this._registrationType=t,this._registrations=new Map}*getDocumentSelectors(){for(const e of this._registrations.values()){const t=e.data.registerOptions.documentSelector;null!==t&&(yield this._client.protocol2CodeConverter.asDocumentSelector(t))}}get registrationType(){return this._registrationType}register(e){if(!e.registerOptions.documentSelector)return;let t=this.registerLanguageProvider(e.registerOptions,e.id);this._registrations.set(e.id,{disposable:t[0],data:e,provider:t[1]})}unregister(e){let t=this._registrations.get(e);void 0!==t&&t.disposable.dispose()}clear(){this._registrations.forEach((e=>{e.disposable.dispose()})),this._registrations.clear()}getRegistration(e,t){if(!t)return[void 0,void 0];if(o.TextDocumentRegistrationOptions.is(t)){const n=o.StaticRegistrationOptions.hasId(t)?t.id:s.generateUuid(),i=t.documentSelector??e;if(i)return[n,Object.assign({},t,{documentSelector:i})]}else if(r.boolean(t)&&!0===t||o.WorkDoneProgressOptions.is(t)){if(!e)return[void 0,void 0];const n=r.boolean(t)&&!0===t?{documentSelector:e}:Object.assign({},t,{documentSelector:e});return[s.generateUuid(),n]}return[void 0,void 0]}getRegistrationOptions(e,t){if(e&&t)return r.boolean(t)&&!0===t?{documentSelector:e}:Object.assign({},t,{documentSelector:e})}getProvider(e){for(const t of this._registrations.values()){let n=t.data.registerOptions.documentSelector;if(null!==n&&i.languages.match(this._client.protocol2CodeConverter.asDocumentSelector(n),e)>0)return t.provider}}getAllProviders(){const e=[];for(const t of this._registrations.values())e.push(t.provider);return e}},t.WorkspaceFeature=class{constructor(e,t){this._client=e,this._registrationType=t,this._registrations=new Map}getState(){const e=this._registrations.size>0;return{kind:"workspace",id:this._registrationType.method,registrations:e}}get registrationType(){return this._registrationType}register(e){const t=this.registerLanguageProvider(e.registerOptions);this._registrations.set(e.id,{disposable:t[0],provider:t[1]})}unregister(e){let t=this._registrations.get(e);void 0!==t&&t.disposable.dispose()}clear(){this._registrations.forEach((e=>{e.disposable.dispose()})),this._registrations.clear()}getProviders(){const e=[];for(const t of this._registrations.values())e.push(t.provider);return e}}},392:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WillDeleteFilesFeature=t.WillRenameFilesFeature=t.WillCreateFilesFeature=t.DidDeleteFilesFeature=t.DidRenameFilesFeature=t.DidCreateFilesFeature=void 0;const i=n(9496),o=n(3707),r=n(5968),s=n(7435);function a(e,t){return void 0===e[t]&&(e[t]={}),e[t]}function c(e,t,n){e[t]=n}class u{constructor(e,t,n,i,o){this._client=e,this._event=t,this._registrationType=n,this._clientCapability=i,this._serverCapability=o,this._filters=new Map}getState(){return{kind:"workspace",id:this._registrationType.method,registrations:this._filters.size>0}}filterSize(){return this._filters.size}get registrationType(){return this._registrationType}fillClientCapabilities(e){const t=a(a(e,"workspace"),"fileOperations");c(t,"dynamicRegistration",!0),c(t,this._clientCapability,!0)}initialize(e){const t=e.workspace?.fileOperations,n=void 0!==t?t[this._serverCapability]:void 0;if(void 0!==n?.filters)try{this.register({id:s.generateUuid(),registerOptions:{filters:n.filters}})}catch(e){this._client.warn(`Ignoring invalid glob pattern for ${this._serverCapability} registration: ${e}`)}}register(e){this._listener||(this._listener=this._event(this.send,this));const t=e.registerOptions.filters.map((e=>{const t=new o.Minimatch(e.pattern.glob,u.asMinimatchOptions(e.pattern.options));if(!t.makeRe())throw new Error(`Invalid pattern ${e.pattern.glob}!`);return{scheme:e.scheme,matcher:t,kind:e.pattern.matches}}));this._filters.set(e.id,t)}unregister(e){this._filters.delete(e),0===this._filters.size&&this._listener&&(this._listener.dispose(),this._listener=void 0)}clear(){this._filters.clear(),this._listener&&(this._listener.dispose(),this._listener=void 0)}getFileType(e){return u.getFileType(e)}async filter(e,t){const n=await Promise.all(e.files.map((async e=>{const n=t(e),o=n.fsPath.replace(/\\/g,"/");for(const e of this._filters.values())for(const t of e)if(void 0===t.scheme||t.scheme===n.scheme)if(t.matcher.match(o)){if(void 0===t.kind)return!0;const e=await this.getFileType(n);if(void 0===e)return this._client.error(`Failed to determine file type for ${n.toString()}.`),!0;if(e===i.FileType.File&&t.kind===r.FileOperationPatternKind.file||e===i.FileType.Directory&&t.kind===r.FileOperationPatternKind.folder)return!0}else if(t.kind===r.FileOperationPatternKind.folder&&await u.getFileType(n)===i.FileType.Directory&&t.matcher.match(`${o}/`))return!0;return!1}))),o=e.files.filter(((e,t)=>n[t]));return{...e,files:o}}static async getFileType(e){try{return(await i.workspace.fs.stat(e)).type}catch(e){return}}static asMinimatchOptions(e){const t={dot:!0};return!0===e?.ignoreCase&&(t.nocase=!0),t}}class l extends u{constructor(e,t,n,i,o,r,s){super(e,t,n,i,o),this._notificationType=n,this._accessUri=r,this._createParams=s}async send(e){const t=await this.filter(e,this._accessUri);if(t.files.length){const e=async e=>this._client.sendNotification(this._notificationType,this._createParams(e));return this.doSend(t,e)}}}class d extends l{constructor(){super(...arguments),this._fsPathFileTypes=new Map}async getFileType(e){const t=e.fsPath;if(this._fsPathFileTypes.has(t))return this._fsPathFileTypes.get(t);const n=await u.getFileType(e);return n&&this._fsPathFileTypes.set(t,n),n}async cacheFileTypes(e,t){await this.filter(e,t)}clearFileTypeCache(){this._fsPathFileTypes.clear()}unregister(e){super.unregister(e),0===this.filterSize()&&this._willListener&&(this._willListener.dispose(),this._willListener=void 0)}clear(){super.clear(),this._willListener&&(this._willListener.dispose(),this._willListener=void 0)}}t.DidCreateFilesFeature=class extends l{constructor(e){super(e,i.workspace.onDidCreateFiles,r.DidCreateFilesNotification.type,"didCreate","didCreate",(e=>e),e.code2ProtocolConverter.asDidCreateFilesParams)}doSend(e,t){const n=this._client.middleware.workspace;return n?.didCreateFiles?n.didCreateFiles(e,t):t(e)}},t.DidRenameFilesFeature=class extends d{constructor(e){super(e,i.workspace.onDidRenameFiles,r.DidRenameFilesNotification.type,"didRename","didRename",(e=>e.oldUri),e.code2ProtocolConverter.asDidRenameFilesParams)}register(e){this._willListener||(this._willListener=i.workspace.onWillRenameFiles(this.willRename,this)),super.register(e)}willRename(e){e.waitUntil(this.cacheFileTypes(e,(e=>e.oldUri)))}doSend(e,t){this.clearFileTypeCache();const n=this._client.middleware.workspace;return n?.didRenameFiles?n.didRenameFiles(e,t):t(e)}},t.DidDeleteFilesFeature=class extends d{constructor(e){super(e,i.workspace.onDidDeleteFiles,r.DidDeleteFilesNotification.type,"didDelete","didDelete",(e=>e),e.code2ProtocolConverter.asDidDeleteFilesParams)}register(e){this._willListener||(this._willListener=i.workspace.onWillDeleteFiles(this.willDelete,this)),super.register(e)}willDelete(e){e.waitUntil(this.cacheFileTypes(e,(e=>e)))}doSend(e,t){this.clearFileTypeCache();const n=this._client.middleware.workspace;return n?.didDeleteFiles?n.didDeleteFiles(e,t):t(e)}};class h extends u{constructor(e,t,n,i,o,r,s){super(e,t,n,i,o),this._requestType=n,this._accessUri=r,this._createParams=s}async send(e){const t=this.waitUntil(e);e.waitUntil(t)}async waitUntil(e){const t=await this.filter(e,this._accessUri);if(t.files.length){const e=e=>this._client.sendRequest(this._requestType,this._createParams(e),e.token).then(this._client.protocol2CodeConverter.asWorkspaceEdit);return this.doSend(t,e)}}}t.WillCreateFilesFeature=class extends h{constructor(e){super(e,i.workspace.onWillCreateFiles,r.WillCreateFilesRequest.type,"willCreate","willCreate",(e=>e),e.code2ProtocolConverter.asWillCreateFilesParams)}doSend(e,t){const n=this._client.middleware.workspace;return n?.willCreateFiles?n.willCreateFiles(e,t):t(e)}},t.WillRenameFilesFeature=class extends h{constructor(e){super(e,i.workspace.onWillRenameFiles,r.WillRenameFilesRequest.type,"willRename","willRename",(e=>e.oldUri),e.code2ProtocolConverter.asWillRenameFilesParams)}doSend(e,t){const n=this._client.middleware.workspace;return n?.willRenameFiles?n.willRenameFiles(e,t):t(e)}},t.WillDeleteFilesFeature=class extends h{constructor(e){super(e,i.workspace.onWillDeleteFiles,r.WillDeleteFilesRequest.type,"willDelete","willDelete",(e=>e),e.code2ProtocolConverter.asWillDeleteFilesParams)}doSend(e,t){const n=this._client.middleware.workspace;return n?.willDeleteFiles?n.willDeleteFiles(e,t):t(e)}}},9190:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileSystemWatcherFeature=void 0;const i=n(9496),o=n(5968),r=n(497);t.FileSystemWatcherFeature=class{constructor(e,t){this._client=e,this._notifyFileEvent=t,this._watchers=new Map}getState(){return{kind:"workspace",id:this.registrationType.method,registrations:this._watchers.size>0}}get registrationType(){return o.DidChangeWatchedFilesNotification.type}fillClientCapabilities(e){(0,r.ensure)((0,r.ensure)(e,"workspace"),"didChangeWatchedFiles").dynamicRegistration=!0,(0,r.ensure)((0,r.ensure)(e,"workspace"),"didChangeWatchedFiles").relativePatternSupport=!0}initialize(e,t){}register(e){if(!Array.isArray(e.registerOptions.watchers))return;const t=[];for(const n of e.registerOptions.watchers){const e=this._client.protocol2CodeConverter.asGlobPattern(n.globPattern);if(void 0===e)continue;let r=!0,s=!0,a=!0;void 0!==n.kind&&null!==n.kind&&(r=0!=(n.kind&o.WatchKind.Create),s=0!=(n.kind&o.WatchKind.Change),a=0!=(n.kind&o.WatchKind.Delete));const c=i.workspace.createFileSystemWatcher(e,!r,!s,!a);this.hookListeners(c,r,s,a,t),t.push(c)}this._watchers.set(e.id,t)}registerRaw(e,t){let n=[];for(let e of t)this.hookListeners(e,!0,!0,!0,n);this._watchers.set(e,n)}hookListeners(e,t,n,i,r){t&&e.onDidCreate((e=>this._notifyFileEvent({uri:this._client.code2ProtocolConverter.asUri(e),type:o.FileChangeType.Created})),null,r),n&&e.onDidChange((e=>this._notifyFileEvent({uri:this._client.code2ProtocolConverter.asUri(e),type:o.FileChangeType.Changed})),null,r),i&&e.onDidDelete((e=>this._notifyFileEvent({uri:this._client.code2ProtocolConverter.asUri(e),type:o.FileChangeType.Deleted})),null,r)}unregister(e){let t=this._watchers.get(e);if(t)for(let e of t)e.dispose()}clear(){this._watchers.forEach((e=>{for(let t of e)t.dispose()})),this._watchers.clear()}}},807:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FoldingRangeFeature=void 0;const i=n(9496),o=n(5968),r=n(497);class s extends r.TextDocumentLanguageFeature{constructor(e){super(e,o.FoldingRangeRequest.type)}fillClientCapabilities(e){let t=(0,r.ensure)((0,r.ensure)(e,"textDocument"),"foldingRange");t.dynamicRegistration=!0,t.rangeLimit=5e3,t.lineFoldingOnly=!0,t.foldingRangeKind={valueSet:[o.FoldingRangeKind.Comment,o.FoldingRangeKind.Imports,o.FoldingRangeKind.Region]},t.foldingRange={collapsedText:!1},(0,r.ensure)((0,r.ensure)(e,"workspace"),"foldingRange").refreshSupport=!0}initialize(e,t){this._client.onRequest(o.FoldingRangeRefreshRequest.type,(async()=>{for(const e of this.getAllProviders())e.onDidChangeFoldingRange.fire()}));let[n,i]=this.getRegistration(t,e.foldingRangeProvider);n&&i&&this.register({id:n,registerOptions:i})}registerLanguageProvider(e){const t=e.documentSelector,n=new i.EventEmitter,r={onDidChangeFoldingRanges:n.event,provideFoldingRanges:(e,t,n)=>{const i=this._client,r=(e,t,n)=>{const r={textDocument:i.code2ProtocolConverter.asTextDocumentIdentifier(e)};return i.sendRequest(o.FoldingRangeRequest.type,r,n).then((e=>n.isCancellationRequested?null:i.protocol2CodeConverter.asFoldingRanges(e,n)),(e=>i.handleFailedRequest(o.FoldingRangeRequest.type,n,e,null)))},s=i.middleware;return s.provideFoldingRanges?s.provideFoldingRanges(e,t,n,r):r(e,0,n)}};return[i.languages.registerFoldingRangeProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),r),{provider:r,onDidChangeFoldingRange:n}]}}t.FoldingRangeFeature=s},9368:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentOnTypeFormattingFeature=t.DocumentRangeFormattingFeature=t.DocumentFormattingFeature=void 0;const i=n(9496),o=n(5968),r=n(7435),s=n(497);var a;!function(e){e.fromConfiguration=function(e){const t=i.workspace.getConfiguration("files",e);return{trimTrailingWhitespace:t.get("trimTrailingWhitespace"),trimFinalNewlines:t.get("trimFinalNewlines"),insertFinalNewline:t.get("insertFinalNewline")}}}(a||(a={}));class c extends s.TextDocumentLanguageFeature{constructor(e){super(e,o.DocumentFormattingRequest.type)}fillClientCapabilities(e){(0,s.ensure)((0,s.ensure)(e,"textDocument"),"formatting").dynamicRegistration=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.documentFormattingProvider);n&&this.register({id:r.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t=e.documentSelector,n={provideDocumentFormattingEdits:(e,t,n)=>{const i=this._client,r=(e,t,n)=>{const r={textDocument:i.code2ProtocolConverter.asTextDocumentIdentifier(e),options:i.code2ProtocolConverter.asFormattingOptions(t,a.fromConfiguration(e))};return i.sendRequest(o.DocumentFormattingRequest.type,r,n).then((e=>n.isCancellationRequested?null:i.protocol2CodeConverter.asTextEdits(e,n)),(e=>i.handleFailedRequest(o.DocumentFormattingRequest.type,n,e,null)))},s=i.middleware;return s.provideDocumentFormattingEdits?s.provideDocumentFormattingEdits(e,t,n,r):r(e,t,n)}};return[i.languages.registerDocumentFormattingEditProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),n),n]}}t.DocumentFormattingFeature=c;class u extends s.TextDocumentLanguageFeature{constructor(e){super(e,o.DocumentRangeFormattingRequest.type)}fillClientCapabilities(e){const t=(0,s.ensure)((0,s.ensure)(e,"textDocument"),"rangeFormatting");t.dynamicRegistration=!0,t.rangesSupport=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.documentRangeFormattingProvider);n&&this.register({id:r.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t=e.documentSelector,n={provideDocumentRangeFormattingEdits:(e,t,n,i)=>{const r=this._client,s=(e,t,n,i)=>{const s={textDocument:r.code2ProtocolConverter.asTextDocumentIdentifier(e),range:r.code2ProtocolConverter.asRange(t),options:r.code2ProtocolConverter.asFormattingOptions(n,a.fromConfiguration(e))};return r.sendRequest(o.DocumentRangeFormattingRequest.type,s,i).then((e=>i.isCancellationRequested?null:r.protocol2CodeConverter.asTextEdits(e,i)),(e=>r.handleFailedRequest(o.DocumentRangeFormattingRequest.type,i,e,null)))},c=r.middleware;return c.provideDocumentRangeFormattingEdits?c.provideDocumentRangeFormattingEdits(e,t,n,i,s):s(e,t,n,i)}};return e.rangesSupport&&(n.provideDocumentRangesFormattingEdits=(e,t,n,i)=>{const r=this._client,s=(e,t,n,i)=>{const s={textDocument:r.code2ProtocolConverter.asTextDocumentIdentifier(e),ranges:r.code2ProtocolConverter.asRanges(t),options:r.code2ProtocolConverter.asFormattingOptions(n,a.fromConfiguration(e))};return r.sendRequest(o.DocumentRangesFormattingRequest.type,s,i).then((e=>i.isCancellationRequested?null:r.protocol2CodeConverter.asTextEdits(e,i)),(e=>r.handleFailedRequest(o.DocumentRangesFormattingRequest.type,i,e,null)))},c=r.middleware;return c.provideDocumentRangesFormattingEdits?c.provideDocumentRangesFormattingEdits(e,t,n,i,s):s(e,t,n,i)}),[i.languages.registerDocumentRangeFormattingEditProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),n),n]}}t.DocumentRangeFormattingFeature=u;class l extends s.TextDocumentLanguageFeature{constructor(e){super(e,o.DocumentOnTypeFormattingRequest.type)}fillClientCapabilities(e){(0,s.ensure)((0,s.ensure)(e,"textDocument"),"onTypeFormatting").dynamicRegistration=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.documentOnTypeFormattingProvider);n&&this.register({id:r.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t=e.documentSelector,n={provideOnTypeFormattingEdits:(e,t,n,i,r)=>{const s=this._client,c=(e,t,n,i,r)=>{let c={textDocument:s.code2ProtocolConverter.asTextDocumentIdentifier(e),position:s.code2ProtocolConverter.asPosition(t),ch:n,options:s.code2ProtocolConverter.asFormattingOptions(i,a.fromConfiguration(e))};return s.sendRequest(o.DocumentOnTypeFormattingRequest.type,c,r).then((e=>r.isCancellationRequested?null:s.protocol2CodeConverter.asTextEdits(e,r)),(e=>s.handleFailedRequest(o.DocumentOnTypeFormattingRequest.type,r,e,null)))},u=s.middleware;return u.provideOnTypeFormattingEdits?u.provideOnTypeFormattingEdits(e,t,n,i,r,c):c(e,t,n,i,r)}},r=e.moreTriggerCharacter||[];return[i.languages.registerOnTypeFormattingEditProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),n,e.firstTriggerCharacter,...r),n]}}t.DocumentOnTypeFormattingFeature=l},9446:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HoverFeature=void 0;const i=n(9496),o=n(5968),r=n(497),s=n(7435);class a extends r.TextDocumentLanguageFeature{constructor(e){super(e,o.HoverRequest.type)}fillClientCapabilities(e){const t=(0,r.ensure)((0,r.ensure)(e,"textDocument"),"hover");t.dynamicRegistration=!0,t.contentFormat=[o.MarkupKind.Markdown,o.MarkupKind.PlainText]}initialize(e,t){const n=this.getRegistrationOptions(t,e.hoverProvider);n&&this.register({id:s.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t=e.documentSelector,n={provideHover:(e,t,n)=>{const i=this._client,r=(e,t,n)=>i.sendRequest(o.HoverRequest.type,i.code2ProtocolConverter.asTextDocumentPositionParams(e,t),n).then((e=>n.isCancellationRequested?null:i.protocol2CodeConverter.asHover(e)),(e=>i.handleFailedRequest(o.HoverRequest.type,n,e,null))),s=i.middleware;return s.provideHover?s.provideHover(e,t,n,r):r(e,t,n)}};return[this.registerProvider(t,n),n]}registerProvider(e,t){return i.languages.registerHoverProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}}t.HoverFeature=a},9764:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImplementationFeature=void 0;const i=n(9496),o=n(5968),r=n(497);class s extends r.TextDocumentLanguageFeature{constructor(e){super(e,o.ImplementationRequest.type)}fillClientCapabilities(e){let t=(0,r.ensure)((0,r.ensure)(e,"textDocument"),"implementation");t.dynamicRegistration=!0,t.linkSupport=!0}initialize(e,t){let[n,i]=this.getRegistration(t,e.implementationProvider);n&&i&&this.register({id:n,registerOptions:i})}registerLanguageProvider(e){const t=e.documentSelector,n={provideImplementation:(e,t,n)=>{const i=this._client,r=(e,t,n)=>i.sendRequest(o.ImplementationRequest.type,i.code2ProtocolConverter.asTextDocumentPositionParams(e,t),n).then((e=>n.isCancellationRequested?null:i.protocol2CodeConverter.asDefinitionResult(e,n)),(e=>i.handleFailedRequest(o.ImplementationRequest.type,n,e,null))),s=i.middleware;return s.provideImplementation?s.provideImplementation(e,t,n,r):r(e,t,n)}};return[this.registerProvider(t,n),n]}registerProvider(e,t){return i.languages.registerImplementationProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}}t.ImplementationFeature=s},863:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlayHintsFeature=void 0;const i=n(9496),o=n(5968),r=n(497);class s extends r.TextDocumentLanguageFeature{constructor(e){super(e,o.InlayHintRequest.type)}fillClientCapabilities(e){const t=(0,r.ensure)((0,r.ensure)(e,"textDocument"),"inlayHint");t.dynamicRegistration=!0,t.resolveSupport={properties:["tooltip","textEdits","label.tooltip","label.location","label.command"]},(0,r.ensure)((0,r.ensure)(e,"workspace"),"inlayHint").refreshSupport=!0}initialize(e,t){this._client.onRequest(o.InlayHintRefreshRequest.type,(async()=>{for(const e of this.getAllProviders())e.onDidChangeInlayHints.fire()}));const[n,i]=this.getRegistration(t,e.inlayHintProvider);n&&i&&this.register({id:n,registerOptions:i})}registerLanguageProvider(e){const t=e.documentSelector,n=new i.EventEmitter,r={onDidChangeInlayHints:n.event,provideInlayHints:(e,t,n)=>{const i=this._client,r=async(e,t,n)=>{const r={textDocument:i.code2ProtocolConverter.asTextDocumentIdentifier(e),range:i.code2ProtocolConverter.asRange(t)};try{const e=await i.sendRequest(o.InlayHintRequest.type,r,n);return n.isCancellationRequested?null:i.protocol2CodeConverter.asInlayHints(e,n)}catch(e){return i.handleFailedRequest(o.InlayHintRequest.type,n,e,null)}},s=i.middleware;return s.provideInlayHints?s.provideInlayHints(e,t,n,r):r(e,t,n)}};return r.resolveInlayHint=!0===e.resolveProvider?(e,t)=>{const n=this._client,i=async(e,t)=>{try{const i=await n.sendRequest(o.InlayHintResolveRequest.type,n.code2ProtocolConverter.asInlayHint(e),t);if(t.isCancellationRequested)return null;const r=n.protocol2CodeConverter.asInlayHint(i,t);return t.isCancellationRequested?null:r}catch(e){return n.handleFailedRequest(o.InlayHintResolveRequest.type,t,e,null)}},r=n.middleware;return r.resolveInlayHint?r.resolveInlayHint(e,t,i):i(e,t)}:void 0,[this.registerProvider(t,r),{provider:r,onDidChangeInlayHints:n}]}registerProvider(e,t){return i.languages.registerInlayHintsProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}}t.InlayHintsFeature=s},2472:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlineCompletionItemFeature=void 0;const i=n(9496),o=n(5968),r=n(497),s=n(7435);class a extends r.TextDocumentLanguageFeature{constructor(e){super(e,o.InlineCompletionRequest.type)}fillClientCapabilities(e){(0,r.ensure)((0,r.ensure)(e,"textDocument"),"inlineCompletion").dynamicRegistration=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.inlineCompletionProvider);n&&this.register({id:s.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t=e.documentSelector,n={provideInlineCompletionItems:(e,t,n,i)=>{const r=this._client,s=this._client.middleware,a=(e,t,n,i)=>r.sendRequest(o.InlineCompletionRequest.type,r.code2ProtocolConverter.asInlineCompletionParams(e,t,n),i).then((e=>i.isCancellationRequested?null:r.protocol2CodeConverter.asInlineCompletionResult(e,i)),(e=>r.handleFailedRequest(o.InlineCompletionRequest.type,i,e,null)));return s.provideInlineCompletionItems?s.provideInlineCompletionItems(e,t,n,i,a):a(e,t,n,i)}};return[i.languages.registerInlineCompletionItemProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),n),n]}}t.InlineCompletionItemFeature=a},2275:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlineValueFeature=void 0;const i=n(9496),o=n(5968),r=n(497);class s extends r.TextDocumentLanguageFeature{constructor(e){super(e,o.InlineValueRequest.type)}fillClientCapabilities(e){(0,r.ensure)((0,r.ensure)(e,"textDocument"),"inlineValue").dynamicRegistration=!0,(0,r.ensure)((0,r.ensure)(e,"workspace"),"inlineValue").refreshSupport=!0}initialize(e,t){this._client.onRequest(o.InlineValueRefreshRequest.type,(async()=>{for(const e of this.getAllProviders())e.onDidChangeInlineValues.fire()}));const[n,i]=this.getRegistration(t,e.inlineValueProvider);n&&i&&this.register({id:n,registerOptions:i})}registerLanguageProvider(e){const t=e.documentSelector,n=new i.EventEmitter,r={onDidChangeInlineValues:n.event,provideInlineValues:(e,t,n,i)=>{const r=this._client,s=(e,t,n,i)=>{const s={textDocument:r.code2ProtocolConverter.asTextDocumentIdentifier(e),range:r.code2ProtocolConverter.asRange(t),context:r.code2ProtocolConverter.asInlineValueContext(n)};return r.sendRequest(o.InlineValueRequest.type,s,i).then((e=>i.isCancellationRequested?null:r.protocol2CodeConverter.asInlineValues(e,i)),(e=>r.handleFailedRequest(o.InlineValueRequest.type,i,e,null)))},a=r.middleware;return a.provideInlineValues?a.provideInlineValues(e,t,n,i,s):s(e,t,n,i)}};return[this.registerProvider(t,r),{provider:r,onDidChangeInlineValues:n}]}registerProvider(e,t){return i.languages.registerInlineValuesProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}}t.InlineValueFeature=s},2550:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LinkedEditingFeature=void 0;const i=n(9496),o=n(5968),r=n(497);class s extends r.TextDocumentLanguageFeature{constructor(e){super(e,o.LinkedEditingRangeRequest.type)}fillClientCapabilities(e){(0,r.ensure)((0,r.ensure)(e,"textDocument"),"linkedEditingRange").dynamicRegistration=!0}initialize(e,t){let[n,i]=this.getRegistration(t,e.linkedEditingRangeProvider);n&&i&&this.register({id:n,registerOptions:i})}registerLanguageProvider(e){const t=e.documentSelector,n={provideLinkedEditingRanges:(e,t,n)=>{const i=this._client,r=(e,t,n)=>i.sendRequest(o.LinkedEditingRangeRequest.type,i.code2ProtocolConverter.asTextDocumentPositionParams(e,t),n).then((e=>n.isCancellationRequested?null:i.protocol2CodeConverter.asLinkedEditingRanges(e,n)),(e=>i.handleFailedRequest(o.LinkedEditingRangeRequest.type,n,e,null))),s=i.middleware;return s.provideLinkedEditingRange?s.provideLinkedEditingRange(e,t,n,r):r(e,t,n)}};return[this.registerProvider(t,n),n]}registerProvider(e,t){return i.languages.registerLinkedEditingRangeProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}}t.LinkedEditingFeature=s},7172:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NotebookDocumentSyncFeature=void 0;const i=n(9496),o=n(3707),r=n(5968),s=n(7435),a=n(2116);function c(e,t){return void 0===e[t]&&(e[t]={}),e[t]}var u,l,d,h,g;!function(e){let t;!function(t){function n(e,t){return e.map((e=>s(e,t)))}function o(e){return c(new Set,e)}function s(e,t){const n=r.NotebookCell.create(function(e){switch(e){case i.NotebookCellKind.Markup:return r.NotebookCellKind.Markup;case i.NotebookCellKind.Code:return r.NotebookCellKind.Code}}(e.kind),t.asUri(e.document.uri));return Object.keys(e.metadata).length>0&&(n.metadata=o(e.metadata)),void 0!==e.executionSummary&&a.number(e.executionSummary.executionOrder)&&a.boolean(e.executionSummary.success)&&(n.executionSummary={executionOrder:e.executionSummary.executionOrder,success:e.executionSummary.success}),n}function c(e,t){if(e.has(t))throw new Error("Can't deep copy cyclic structures.");if(Array.isArray(t)){const n=[];for(const i of t)if(null!==i&&"object"==typeof i||Array.isArray(i))n.push(c(e,i));else{if(i instanceof RegExp)throw new Error("Can't transfer regular expressions to the server");n.push(i)}return n}{const n=Object.keys(t),i=Object.create(null);for(const o of n){const n=t[o];if(null!==n&&"object"==typeof n||Array.isArray(n))i[o]=c(e,n);else{if(n instanceof RegExp)throw new Error("Can't transfer regular expressions to the server");i[o]=n}}return i}}t.asVersionedNotebookDocumentIdentifier=function(e,t){return{version:e.version,uri:t.asUri(e.uri)}},t.asNotebookDocument=function(e,t,i){const s=r.NotebookDocument.create(i.asUri(e.uri),e.notebookType,e.version,n(t,i));return Object.keys(e.metadata).length>0&&(s.metadata=o(e.metadata)),s},t.asNotebookCells=n,t.asMetadata=o,t.asNotebookCell=s,t.asTextContentChange=function(e,t){const n=t.asChangeTextDocumentParams(e,e.document.uri,e.document.version);return{document:n.textDocument,changes:n.contentChanges}},t.asNotebookDocumentChangeEvent=function(t,n){const i=Object.create(null);if(t.metadata&&(i.metadata=e.c2p.asMetadata(t.metadata)),void 0!==t.cells){const o=Object.create(null),r=t.cells;r.structure&&(o.structure={array:{start:r.structure.array.start,deleteCount:r.structure.array.deleteCount,cells:void 0!==r.structure.array.cells?r.structure.array.cells.map((t=>e.c2p.asNotebookCell(t,n))):void 0},didOpen:void 0!==r.structure.didOpen?r.structure.didOpen.map((e=>n.asOpenTextDocumentParams(e.document).textDocument)):void 0,didClose:void 0!==r.structure.didClose?r.structure.didClose.map((e=>n.asCloseTextDocumentParams(e.document).textDocument)):void 0}),void 0!==r.data&&(o.data=r.data.map((t=>e.c2p.asNotebookCell(t,n)))),void 0!==r.textContent&&(o.textContent=r.textContent.map((t=>e.c2p.asTextContentChange(t,n)))),Object.keys(o).length>0&&(i.cells=o)}return i}}(t=e.c2p||(e.c2p={}))}(u||(u={})),function(e){function t(e,t,i=!0){return!(e.kind!==t.kind||e.document.uri.toString()!==t.document.uri.toString()||e.document.languageId!==t.document.languageId||!function(e,t){return e===t||void 0!==e&&void 0!==t&&(e.executionOrder===t.executionOrder&&e.success===t.success&&function(e,t){return e===t||void 0!==e&&void 0!==t&&(e.startTime===t.startTime&&e.endTime===t.endTime)}(e.timing,t.timing))}(e.executionSummary,t.executionSummary))&&(!i||i&&n(e.metadata,t.metadata))}function n(e,t){if(e===t)return!0;if(null==e||null==t)return!1;if(typeof e!=typeof t)return!1;if("object"!=typeof e)return!1;const o=Array.isArray(e),r=Array.isArray(t);if(o!==r)return!1;if(o&&r){if(e.length!==t.length)return!1;for(let i=0;i<e.length;i++)if(!n(e[i],t[i]))return!1}if(i(e)&&i(t)){const i=Object.keys(e),o=Object.keys(t);if(i.length!==o.length)return!1;if(i.sort(),o.sort(),!n(i,o))return!1;for(let o=0;o<i.length;o++){const r=i[o];if(!n(e[r],t[r]))return!1}return!0}return!1}function i(e){return null!==e&&"object"==typeof e}e.computeDiff=function(e,n,i){const o=e.length,r=n.length;let s=0;for(;s<r&&s<o&&t(e[s],n[s],i);)s++;if(s<r&&s<o){let a=o-1,c=r-1;for(;a>=0&&c>=0&&t(e[a],n[c],i);)a--,c--;const u=a+1-s,l=s===c+1?void 0:n.slice(s,c+1);return void 0!==l?{start:s,deleteCount:u,cells:l}:{start:s,deleteCount:u}}return s<r?{start:s,deleteCount:0,cells:n.slice(s)}:s<o?{start:s,deleteCount:o-s}:void 0},e.isObjectLiteral=i}(l||(l={})),function(e){e.matchNotebook=function(e,t){if("string"==typeof e)return"*"===e||t.notebookType===e;if(void 0!==e.notebookType&&"*"!==e.notebookType&&t.notebookType!==e.notebookType)return!1;const n=t.uri;if(void 0!==e.scheme&&"*"!==e.scheme&&n.scheme!==e.scheme)return!1;if(void 0!==e.pattern){const t=new o.Minimatch(e.pattern,{noext:!0});if(!t.makeRe())return!1;if(!t.match(n.fsPath))return!1}return!0}}(d||(d={})),function(e){function t(e,t,n,i){return void 0===t&&void 0===n?{notebook:e,language:i}:{notebook:{notebookType:e,scheme:t,pattern:n},language:i}}e.asDocumentSelector=function(e){const n=e.notebookSelector,i=[];for(const e of n){const n=("string"==typeof e.notebook?e.notebook:e.notebook?.notebookType)??"*",o="string"==typeof e.notebook?void 0:e.notebook?.scheme,r="string"==typeof e.notebook?void 0:e.notebook?.pattern;if(void 0!==e.cells)for(const s of e.cells)i.push(t(n,o,r,s.language));else i.push(t(n,o,r,void 0))}return i}}(h||(h={})),function(e){e.create=function(e){return{cells:e,uris:new Set(e.map((e=>e.document.uri.toString())))}}}(g||(g={}));class p{constructor(e,t){this.client=e,this.options=t,this.notebookSyncInfo=new Map,this.notebookDidOpen=new Set,this.disposables=[],this.selector=e.protocol2CodeConverter.asDocumentSelector(h.asDocumentSelector(t)),i.workspace.onDidOpenNotebookDocument((e=>{this.notebookDidOpen.add(e.uri.toString()),this.didOpen(e)}),void 0,this.disposables);for(const e of i.workspace.notebookDocuments)this.notebookDidOpen.add(e.uri.toString()),this.didOpen(e);i.workspace.onDidChangeNotebookDocument((e=>this.didChangeNotebookDocument(e)),void 0,this.disposables),!0===this.options.save&&i.workspace.onDidSaveNotebookDocument((e=>this.didSave(e)),void 0,this.disposables),i.workspace.onDidCloseNotebookDocument((e=>{this.didClose(e),this.notebookDidOpen.delete(e.uri.toString())}),void 0,this.disposables)}getState(){for(const e of i.workspace.notebookDocuments)if(void 0!==this.getMatchingCells(e))return{kind:"document",id:"$internal",registrations:!0,matches:!0};return{kind:"document",id:"$internal",registrations:!0,matches:!1}}get mode(){return"notebook"}handles(e){return i.languages.match(this.selector,e)>0}didOpenNotebookCellTextDocument(e,t){if(0===i.languages.match(this.selector,t.document))return;if(!this.notebookDidOpen.has(e.uri.toString()))return;const n=this.notebookSyncInfo.get(e.uri.toString()),o=this.cellMatches(e,t);if(void 0!==n){const i=n.uris.has(t.document.uri.toString());if(o&&i||!o&&!i)return;if(o){const t=this.getMatchingCells(e);if(void 0!==t){const i=this.asNotebookDocumentChangeEvent(e,void 0,n,t);void 0!==i&&this.doSendChange(i,t).catch((()=>{}))}}}else o&&this.doSendOpen(e,[t]).catch((()=>{}))}didChangeNotebookCellTextDocument(e,t){0!==i.languages.match(this.selector,t.document)&&this.doSendChange({notebook:e,cells:{textContent:[t]}},void 0).catch((()=>{}))}didCloseNotebookCellTextDocument(e,t){const n=this.notebookSyncInfo.get(e.uri.toString());if(void 0===n)return;const i=t.document.uri,o=n.cells.findIndex((e=>e.document.uri.toString()===i.toString()));if(-1!==o)if(0===o&&1===n.cells.length)this.doSendClose(e,n.cells).catch((()=>{}));else{const t=n.cells.slice(),i=t.splice(o,1);this.doSendChange({notebook:e,cells:{structure:{array:{start:o,deleteCount:1},didClose:i}}},t).catch((()=>{}))}}dispose(){for(const e of this.disposables)e.dispose()}didOpen(e,t=this.getMatchingCells(e),n=this.notebookSyncInfo.get(e.uri.toString())){if(void 0!==n)if(void 0!==t){const i=this.asNotebookDocumentChangeEvent(e,void 0,n,t);void 0!==i&&this.doSendChange(i,t).catch((()=>{}))}else this.doSendClose(e,[]).catch((()=>{}));else{if(void 0===t)return;this.doSendOpen(e,t).catch((()=>{}))}}didChangeNotebookDocument(e){const t=e.notebook,n=this.notebookSyncInfo.get(t.uri.toString());if(void 0===n){if(0===e.contentChanges.length)return;const i=this.getMatchingCells(t);if(void 0===i)return;this.didOpen(t,i,n)}else{const i=this.getMatchingCells(t);if(void 0===i)return void this.didClose(t,n);const o=this.asNotebookDocumentChangeEvent(e.notebook,e,n,i);void 0!==o&&this.doSendChange(o,i).catch((()=>{}))}}didSave(e){void 0!==this.notebookSyncInfo.get(e.uri.toString())&&this.doSendSave(e).catch((()=>{}))}didClose(e,t=this.notebookSyncInfo.get(e.uri.toString())){if(void 0===t)return;const n=e.getCells().filter((e=>t.uris.has(e.document.uri.toString())));this.doSendClose(e,n).catch((()=>{}))}async sendDidOpenNotebookDocument(e){const t=this.getMatchingCells(e);if(void 0!==t)return this.doSendOpen(e,t)}async doSendOpen(e,t){const n=async(e,t)=>{const n=u.c2p.asNotebookDocument(e,t,this.client.code2ProtocolConverter),i=t.map((e=>this.client.code2ProtocolConverter.asTextDocumentItem(e.document)));try{await this.client.sendNotification(r.DidOpenNotebookDocumentNotification.type,{notebookDocument:n,cellTextDocuments:i})}catch(e){throw this.client.error("Sending DidOpenNotebookDocumentNotification failed",e),e}},i=this.client.middleware?.notebooks;return this.notebookSyncInfo.set(e.uri.toString(),g.create(t)),void 0!==i?.didOpen?i.didOpen(e,t,n):n(e,t)}async sendDidChangeNotebookDocument(e){return this.doSendChange(e,void 0)}async doSendChange(e,t=this.getMatchingCells(e.notebook)){const n=async e=>{try{await this.client.sendNotification(r.DidChangeNotebookDocumentNotification.type,{notebookDocument:u.c2p.asVersionedNotebookDocumentIdentifier(e.notebook,this.client.code2ProtocolConverter),change:u.c2p.asNotebookDocumentChangeEvent(e,this.client.code2ProtocolConverter)})}catch(e){throw this.client.error("Sending DidChangeNotebookDocumentNotification failed",e),e}},i=this.client.middleware?.notebooks;return void 0!==e.cells?.structure&&this.notebookSyncInfo.set(e.notebook.uri.toString(),g.create(t??[])),void 0!==i?.didChange?i?.didChange(e,n):n(e)}async sendDidSaveNotebookDocument(e){return this.doSendSave(e)}async doSendSave(e){const t=async e=>{try{await this.client.sendNotification(r.DidSaveNotebookDocumentNotification.type,{notebookDocument:{uri:this.client.code2ProtocolConverter.asUri(e.uri)}})}catch(e){throw this.client.error("Sending DidSaveNotebookDocumentNotification failed",e),e}},n=this.client.middleware?.notebooks;return void 0!==n?.didSave?n.didSave(e,t):t(e)}async sendDidCloseNotebookDocument(e){return this.doSendClose(e,this.getMatchingCells(e)??[])}async doSendClose(e,t){const n=async(e,t)=>{try{await this.client.sendNotification(r.DidCloseNotebookDocumentNotification.type,{notebookDocument:{uri:this.client.code2ProtocolConverter.asUri(e.uri)},cellTextDocuments:t.map((e=>this.client.code2ProtocolConverter.asTextDocumentIdentifier(e.document)))})}catch(e){throw this.client.error("Sending DidCloseNotebookDocumentNotification failed",e),e}},i=this.client.middleware?.notebooks;return this.notebookSyncInfo.delete(e.uri.toString()),void 0!==i?.didClose?i.didClose(e,t,n):n(e,t)}asNotebookDocumentChangeEvent(e,t,n,i){if(void 0!==t&&t.notebook!==e)throw new Error("Notebook must be identical");const o={notebook:e};let r;if(void 0!==t?.metadata&&(o.metadata=u.c2p.asMetadata(t.metadata)),void 0!==t?.cellChanges&&t.cellChanges.length>0){const e=[];r=new Set(i.map((e=>e.document.uri.toString())));for(const n of t.cellChanges)!r.has(n.cell.document.uri.toString())||void 0===n.executionSummary&&void 0===n.metadata||e.push(n.cell);e.length>0&&(o.cells=o.cells??{},o.cells.data=e)}if((void 0!==t?.contentChanges&&t.contentChanges.length>0||void 0===t)&&void 0!==n&&void 0!==i){const e=n.cells,t=i,r=l.computeDiff(e,t,!1);let s,a;if(void 0!==r){s=void 0===r.cells?new Map:new Map(r.cells.map((e=>[e.document.uri.toString(),e]))),a=0===r.deleteCount?new Map:new Map(e.slice(r.start,r.start+r.deleteCount).map((e=>[e.document.uri.toString(),e])));for(const e of Array.from(a.keys()))s.has(e)&&(a.delete(e),s.delete(e));o.cells=o.cells??{};const t=[],n=[];if(s.size>0||a.size>0){for(const e of s.values())t.push(e);for(const e of a.values())n.push(e)}o.cells.structure={array:r,didOpen:t,didClose:n}}}return Object.keys(o).length>1?o:void 0}getMatchingCells(e,t=e.getCells()){if(void 0!==this.options.notebookSelector)for(const n of this.options.notebookSelector)if(void 0===n.notebook||d.matchNotebook(n.notebook,e)){const i=this.filterCells(e,t,n.cells);return 0===i.length?void 0:i}}cellMatches(e,t){const n=this.getMatchingCells(e,[t]);return void 0!==n&&n[0]===t}filterCells(e,t,n){const i=void 0!==n?t.filter((e=>{const t=e.document.languageId;return n.some((e=>"*"===e.language||t===e.language))})):t;return"function"==typeof this.client.clientOptions.notebookDocumentOptions?.filterCells?this.client.clientOptions.notebookDocumentOptions.filterCells(e,i):i}}class m{constructor(e){this.client=e,this.registrations=new Map,this.registrationType=r.NotebookDocumentSyncRegistrationType.type,i.workspace.onDidOpenTextDocument((e=>{if(e.uri.scheme!==m.CellScheme)return;const[t,n]=this.findNotebookDocumentAndCell(e);if(void 0!==t&&void 0!==n)for(const e of this.registrations.values())e instanceof p&&e.didOpenNotebookCellTextDocument(t,n)})),i.workspace.onDidChangeTextDocument((e=>{if(0===e.contentChanges.length)return;const t=e.document;if(t.uri.scheme!==m.CellScheme)return;const[n]=this.findNotebookDocumentAndCell(t);if(void 0!==n)for(const t of this.registrations.values())t instanceof p&&t.didChangeNotebookCellTextDocument(n,e)})),i.workspace.onDidCloseTextDocument((e=>{if(e.uri.scheme!==m.CellScheme)return;const[t,n]=this.findNotebookDocumentAndCell(e);if(void 0!==t&&void 0!==n)for(const e of this.registrations.values())e instanceof p&&e.didCloseNotebookCellTextDocument(t,n)}))}getState(){if(0===this.registrations.size)return{kind:"document",id:this.registrationType.method,registrations:!1,matches:!1};for(const e of this.registrations.values()){const t=e.getState();if("document"===t.kind&&!0===t.registrations&&!0===t.matches)return{kind:"document",id:this.registrationType.method,registrations:!0,matches:!0}}return{kind:"document",id:this.registrationType.method,registrations:!0,matches:!1}}fillClientCapabilities(e){const t=c(c(e,"notebookDocument"),"synchronization");t.dynamicRegistration=!0,t.executionSummarySupport=!0}preInitialize(e){const t=e.notebookDocumentSync;void 0!==t&&(this.dedicatedChannel=this.client.protocol2CodeConverter.asDocumentSelector(h.asDocumentSelector(t)))}initialize(e){const t=e.notebookDocumentSync;if(void 0===t)return;const n=t.id??s.generateUuid();this.register({id:n,registerOptions:t})}register(e){const t=new p(this.client,e.registerOptions);this.registrations.set(e.id,t)}unregister(e){const t=this.registrations.get(e);t&&t.dispose()}clear(){for(const e of this.registrations.values())e.dispose();this.registrations.clear()}handles(e){if(e.uri.scheme!==m.CellScheme)return!1;if(void 0!==this.dedicatedChannel&&i.languages.match(this.dedicatedChannel,e)>0)return!0;for(const t of this.registrations.values())if(t.handles(e))return!0;return!1}getProvider(e){for(const t of this.registrations.values())if(t.handles(e.document))return t}findNotebookDocumentAndCell(e){const t=e.uri.toString();for(const e of i.workspace.notebookDocuments)for(const n of e.getCells())if(n.document.uri.toString()===t)return[e,n];return[void 0,void 0]}}t.NotebookDocumentSyncFeature=m,m.CellScheme="vscode-notebook-cell"},4915:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProgressFeature=void 0;const i=n(5968),o=n(6181);t.ProgressFeature=class{constructor(e){this._client=e,this.activeParts=new Set}getState(){return{kind:"window",id:i.WorkDoneProgressCreateRequest.method,registrations:this.activeParts.size>0}}fillClientCapabilities(e){var t,n;(t=e,n="window",void 0===t[n]&&(t[n]=Object.create(null)),t[n]).workDoneProgress=!0}initialize(){const e=this._client,t=e=>{this.activeParts.delete(e)};e.onRequest(i.WorkDoneProgressCreateRequest.type,(e=>{this.activeParts.add(new o.ProgressPart(this._client,e.token,t))}))}clear(){for(const e of this.activeParts)e.done();this.activeParts.clear()}}},6181:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProgressPart=void 0;const i=n(9496),o=n(5968),r=n(2116);t.ProgressPart=class{constructor(e,t,n){this._client=e,this._token=t,this._reported=0,this._infinite=!1,this._lspProgressDisposable=this._client.onProgress(o.WorkDoneProgress.type,this._token,(e=>{switch(e.kind){case"begin":this.begin(e);break;case"report":this.report(e);break;case"end":this.done(),n&&n(this)}}))}begin(e){this._infinite=void 0===e.percentage,void 0!==this._lspProgressDisposable&&i.window.withProgress({location:i.ProgressLocation.Window,cancellable:e.cancellable,title:e.title},(async(t,n)=>{if(void 0!==this._lspProgressDisposable)return this._progress=t,this._cancellationToken=n,this._tokenDisposable=this._cancellationToken.onCancellationRequested((()=>{this._client.sendNotification(o.WorkDoneProgressCancelNotification.type,{token:this._token})})),this.report(e),new Promise(((e,t)=>{this._resolve=e,this._reject=t}))}))}report(e){if(this._infinite&&r.string(e.message))void 0!==this._progress&&this._progress.report({message:e.message});else if(r.number(e.percentage)){const t=Math.max(0,Math.min(e.percentage,100)),n=Math.max(0,t-this._reported);this._reported+=n,void 0!==this._progress&&this._progress.report({message:e.message,increment:n})}}cancel(){this.cleanup(),void 0!==this._reject&&(this._reject(),this._resolve=void 0,this._reject=void 0)}done(){this.cleanup(),void 0!==this._resolve&&(this._resolve(),this._resolve=void 0,this._reject=void 0)}cleanup(){void 0!==this._lspProgressDisposable&&(this._lspProgressDisposable.dispose(),this._lspProgressDisposable=void 0),void 0!==this._tokenDisposable&&(this._tokenDisposable.dispose(),this._tokenDisposable=void 0),this._progress=void 0,this._cancellationToken=void 0}}},7400:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(9496);class o extends i.CallHierarchyItem{constructor(e,t,n,i,o,r,s){super(e,t,n,i,o,r),void 0!==s&&(this.data=s)}}t.default=o},1219:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(9496);class o extends i.CodeAction{constructor(e,t){super(e),this.data=t}}t.default=o},225:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(9496);class o extends i.CodeLens{constructor(e){super(e)}}t.default=o},1143:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(9496);class o extends i.CompletionItem{constructor(e){super(e)}}t.default=o},5356:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createConverter=void 0;const i=n(9496),o=n(5968),r=n(2116),s=n(8005),a=n(1143),c=n(225),u=n(8552),l=n(1219),d=n(6965),h=n(7400),g=n(9551),p=n(6832),m=n(134),f=n(5968);var v;!function(e){e.is=function(e){let t=e;return t&&r.string(t.language)&&r.string(t.value)}}(v||(v={})),t.createConverter=function(e,t,n){const y=e||(e=>i.Uri.parse(e));function C(e){return y(e)}function D(e){let t=new d.ProtocolDiagnostic(w(e.range),e.message,T(e.severity),e.data);if(void 0!==e.code)if("string"==typeof e.code||"number"==typeof e.code)o.CodeDescription.is(e.codeDescription)?t.code={value:e.code,target:C(e.codeDescription.href)}:t.code=e.code;else if(d.DiagnosticCode.is(e.code)){t.hasDiagnosticCode=!0;const n=e.code;t.code={value:n.value,target:C(n.target)}}return e.source&&(t.source=e.source),e.relatedInformation&&(t.relatedInformation=function(e){const t=new Array(e.length);for(let n=0;n<e.length;n++){const o=e[n];t[n]=new i.DiagnosticRelatedInformation(L(o.location),o.message)}return t}(e.relatedInformation)),Array.isArray(e.tags)&&(t.tags=function(e){if(!e)return;let t=[];for(let n of e){let e=b(n);void 0!==e&&t.push(e)}return t.length>0?t:void 0}(e.tags)),t}function b(e){switch(e){case o.DiagnosticTag.Unnecessary:return i.DiagnosticTag.Unnecessary;case o.DiagnosticTag.Deprecated:return i.DiagnosticTag.Deprecated;default:return}}function R(e){return e?new i.Position(e.line,e.character):void 0}function w(e){return e?new i.Range(e.start.line,e.start.character,e.end.line,e.end.character):void 0}async function S(e,t){return s.map(e,(e=>new i.Range(e.start.line,e.start.character,e.end.line,e.end.character)),t)}function T(e){if(null==e)return i.DiagnosticSeverity.Error;switch(e){case o.DiagnosticSeverity.Error:return i.DiagnosticSeverity.Error;case o.DiagnosticSeverity.Warning:return i.DiagnosticSeverity.Warning;case o.DiagnosticSeverity.Information:return i.DiagnosticSeverity.Information;case o.DiagnosticSeverity.Hint:return i.DiagnosticSeverity.Hint}return i.DiagnosticSeverity.Error}function _(e){if(r.string(e))return e;switch(e.kind){case o.MarkupKind.Markdown:return k(e.value);case o.MarkupKind.PlainText:return e.value;default:return`Unsupported Markup content received. Kind is: ${e.kind}`}}function k(e){let r;if(void 0===e||"string"==typeof e)r=new i.MarkdownString(e);else switch(e.kind){case o.MarkupKind.Markdown:r=new i.MarkdownString(e.value);break;case o.MarkupKind.PlainText:r=new i.MarkdownString,r.appendText(e.value);break;default:r=new i.MarkdownString,r.appendText(`Unsupported Markup content received. Kind is: ${e.kind}`)}return r.isTrusted=t,r.supportHtml=n,r}function P(e){switch(e){case o.CompletionItemTag.Deprecated:return i.CompletionItemTag.Deprecated}}function x(e,t,n,s,c,u){const l=function(e){if(null==e)return[];const t=[];for(const n of e){const e=P(n);void 0!==e&&t.push(e)}return t}(e.tags),d=function(e){return o.CompletionItemLabelDetails.is(e.labelDetails)?{label:e.label,detail:e.labelDetails.detail,description:e.labelDetails.description}:e.label}(e),h=new a.default(d);e.detail&&(h.detail=e.detail),e.documentation&&(h.documentation=_(e.documentation),h.documentationFormat=r.string(e.documentation)?"$string":e.documentation.kind),e.filterText&&(h.filterText=e.filterText);const g=function(e,t,n){const r=e.insertTextFormat??n;if(void 0!==e.textEdit||void 0!==t){const[n,a]=void 0!==e.textEdit?(s=e.textEdit,o.InsertReplaceEdit.is(s)?[{inserting:w(s.insert),replacing:w(s.replace)},s.newText]:[w(s.range),s.newText]):[t,e.textEditText??e.label];return r===o.InsertTextFormat.Snippet?{text:new i.SnippetString(a),range:n,fromEdit:!0}:{text:a,range:n,fromEdit:!0}}return e.insertText?r===o.InsertTextFormat.Snippet?{text:new i.SnippetString(e.insertText),fromEdit:!1}:{text:e.insertText,fromEdit:!1}:void 0;var s}(e,n,c);if(g&&(h.insertText=g.text,h.range=g.range,h.fromEdit=g.fromEdit),r.number(e.kind)){let[t,n]=(p=e.kind,o.CompletionItemKind.Text<=p&&p<=o.CompletionItemKind.TypeParameter?[p-1,void 0]:[i.CompletionItemKind.Text,p]);h.kind=t,n&&(h.originalItemKind=n)}var p;e.sortText&&(h.sortText=e.sortText),e.additionalTextEdits&&(h.additionalTextEdits=O(e.additionalTextEdits));const m=void 0!==e.commitCharacters?r.stringArray(e.commitCharacters)?e.commitCharacters:void 0:t;m&&(h.commitCharacters=m.slice()),e.command&&(h.command=J(e.command)),!0!==e.deprecated&&!1!==e.deprecated||(h.deprecated=e.deprecated,!0===e.deprecated&&l.push(i.CompletionItemTag.Deprecated)),!0!==e.preselect&&!1!==e.preselect||(h.preselect=e.preselect);const f=e.data??u;void 0!==f&&(h.data=f),l.length>0&&(h.tags=l);const v=e.insertTextMode??s;return void 0!==v&&(h.insertTextMode=v,v===o.InsertTextMode.asIs&&(h.keepWhitespace=!0)),h}function q(e){if(e)return new i.TextEdit(w(e.range),e.newText)}async function F(e,t){if(e)return s.map(e,q,t)}function O(e){if(!e)return;const t=new Array(e.length);for(let n=0;n<e.length;n++)t[n]=q(e[n]);return t}async function E(e,t){return s.mapAsync(e,M,t)}async function M(e,t){let n=new i.SignatureInformation(e.label);return void 0!==e.documentation&&(n.documentation=_(e.documentation)),void 0!==e.parameters&&(n.parameters=await I(e.parameters,t)),void 0!==e.activeParameter&&(n.activeParameter=e.activeParameter),n}function I(e,t){return s.map(e,N,t)}function N(e){let t=new i.ParameterInformation(e.label);return e.documentation&&(t.documentation=_(e.documentation)),t}function L(e){return e?new i.Location(y(e.uri),w(e.range)):void 0}function A(e){if(!e)return;let t={targetUri:y(e.targetUri),targetRange:w(e.targetRange),originSelectionRange:w(e.originSelectionRange),targetSelectionRange:w(e.targetSelectionRange)};if(!t.targetSelectionRange)throw new Error("targetSelectionRange must not be undefined or null");return t}async function j(e,t){if(e){if(r.array(e)){if(0===e.length)return[];if(o.LocationLink.is(e[0])){const n=e;return s.map(n,A,t)}{const n=e;return s.map(n,L,t)}}return o.LocationLink.is(e)?[A(e)]:L(e)}}function H(e){let t=new i.DocumentHighlight(w(e.range));return r.number(e.kind)&&(t.kind=K(e.kind)),t}function K(e){switch(e){case o.DocumentHighlightKind.Text:return i.DocumentHighlightKind.Text;case o.DocumentHighlightKind.Read:return i.DocumentHighlightKind.Read;case o.DocumentHighlightKind.Write:return i.DocumentHighlightKind.Write}return i.DocumentHighlightKind.Text}function W(e){return e<=o.SymbolKind.TypeParameter?e-1:i.SymbolKind.Property}function U(e){switch(e){case o.SymbolTag.Deprecated:return i.SymbolTag.Deprecated;default:return}}function $(e){if(null==e)return;const t=[];for(const n of e){const e=U(n);void 0!==e&&t.push(e)}return 0===t.length?void 0:t}function z(e){const t=e.data,n=e.location,o=void 0===n.range||void 0!==t?new p.default(e.name,W(e.kind),e.containerName??"",void 0===n.range?y(n.uri):new i.Location(y(e.location.uri),w(n.range)),t):new i.SymbolInformation(e.name,W(e.kind),e.containerName??"",new i.Location(y(e.location.uri),w(n.range)));return B(o,e),o}function V(e){let t=new i.DocumentSymbol(e.name,e.detail||"",W(e.kind),w(e.range),w(e.selectionRange));if(B(t,e),void 0!==e.children&&e.children.length>0){let n=[];for(let t of e.children)n.push(V(t));t.children=n}return t}function B(e,t){e.tags=$(t.tags),t.deprecated&&(e.tags?e.tags.includes(i.SymbolTag.Deprecated)||(e.tags=e.tags.concat(i.SymbolTag.Deprecated)):e.tags=[i.SymbolTag.Deprecated])}function J(e){let t={title:e.title,command:e.command};return e.arguments&&(t.arguments=e.arguments),t}const Q=new Map;function X(e){if(null==e)return;let t=Q.get(e);if(t)return t;let n=e.split(".");t=i.CodeActionKind.Empty;for(let e of n)t=t.append(e);return t}async function G(e,t){if(null==e)return;let n=new l.default(e.title,e.data);return void 0!==e.kind&&(n.kind=X(e.kind)),void 0!==e.diagnostics&&(n.diagnostics=function(e){const t=new Array(e.length);for(let n=0;n<e.length;n++)t[n]=D(e[n]);return t}(e.diagnostics)),void 0!==e.edit&&(n.edit=await Z(e.edit,t)),void 0!==e.command&&(n.command=J(e.command)),void 0!==e.isPreferred&&(n.isPreferred=e.isPreferred),void 0!==e.disabled&&(n.disabled={reason:e.disabled.reason}),n}function Y(e){if(!e)return;let t=new c.default(w(e.range));return e.command&&(t.command=J(e.command)),void 0!==e.data&&null!==e.data&&(t.data=e.data),t}async function Z(e,t){if(!e)return;const n=new Map;if(void 0!==e.changeAnnotations){const i=e.changeAnnotations;await s.forEach(Object.keys(i),(e=>{const t=function(e){if(void 0!==e)return{label:e.label,needsConfirmation:!!e.needsConfirmation,description:e.description}}(i[e]);n.set(e,t)}),t)}const r=e=>void 0===e?void 0:n.get(e),a=new i.WorkspaceEdit;if(e.documentChanges){const n=e.documentChanges;await s.forEach(n,(e=>{if(o.CreateFile.is(e))a.createFile(y(e.uri),e.options,r(e.annotationId));else if(o.RenameFile.is(e))a.renameFile(y(e.oldUri),y(e.newUri),e.options,r(e.annotationId));else if(o.DeleteFile.is(e))a.deleteFile(y(e.uri),e.options,r(e.annotationId));else{if(!o.TextDocumentEdit.is(e))throw new Error(`Unknown workspace edit change received:\n${JSON.stringify(e,void 0,4)}`);{const t=y(e.textDocument.uri);for(const n of e.edits)o.AnnotatedTextEdit.is(n)?a.replace(t,w(n.range),n.newText,r(n.annotationId)):a.replace(t,w(n.range),n.newText)}}}),t)}else if(e.changes){const n=e.changes;await s.forEach(Object.keys(n),(e=>{a.set(y(e),O(n[e]))}),t)}return a}function ee(e){let t=w(e.range),n=e.target?C(e.target):void 0,i=new u.default(t,n);return void 0!==e.tooltip&&(i.tooltip=e.tooltip),void 0!==e.data&&null!==e.data&&(i.data=e.data),i}function te(e){return new i.Color(e.red,e.green,e.blue,e.alpha)}function ne(e){return new i.ColorInformation(w(e.range),te(e.color))}function ie(e){let t=new i.ColorPresentation(e.label);return t.additionalTextEdits=O(e.additionalTextEdits),e.textEdit&&(t.textEdit=q(e.textEdit)),t}function oe(e){if(e)switch(e){case o.FoldingRangeKind.Comment:return i.FoldingRangeKind.Comment;case o.FoldingRangeKind.Imports:return i.FoldingRangeKind.Imports;case o.FoldingRangeKind.Region:return i.FoldingRangeKind.Region}}function re(e){return new i.FoldingRange(e.startLine,e.endLine,oe(e.kind))}function se(e){return new i.SelectionRange(w(e.range),e.parent?se(e.parent):void 0)}function ae(e){return o.InlineValueText.is(e)?new i.InlineValueText(w(e.range),e.text):o.InlineValueVariableLookup.is(e)?new i.InlineValueVariableLookup(w(e.range),e.variableName,e.caseSensitiveLookup):new i.InlineValueEvaluatableExpression(w(e.range),e.expression)}async function ce(e,t){const n="string"==typeof e.label?e.label:await s.map(e.label,ue,t),i=new m.default(R(e.position),n);return void 0!==e.kind&&(i.kind=e.kind),void 0!==e.textEdits&&(i.textEdits=await F(e.textEdits,t)),void 0!==e.tooltip&&(i.tooltip=le(e.tooltip)),void 0!==e.paddingLeft&&(i.paddingLeft=e.paddingLeft),void 0!==e.paddingRight&&(i.paddingRight=e.paddingRight),void 0!==e.data&&(i.data=e.data),i}function ue(e){const t=new i.InlayHintLabelPart(e.value);return void 0!==e.location&&(t.location=L(e.location)),void 0!==e.tooltip&&(t.tooltip=le(e.tooltip)),void 0!==e.command&&(t.command=J(e.command)),t}function le(e){return"string"==typeof e?e:k(e)}function de(e){if(null===e)return;const t=new h.default(W(e.kind),e.name,e.detail||"",C(e.uri),w(e.range),w(e.selectionRange),e.data);return void 0!==e.tags&&(t.tags=$(e.tags)),t}async function he(e,t){return new i.CallHierarchyIncomingCall(de(e.from),await S(e.fromRanges,t))}async function ge(e,t){return new i.CallHierarchyOutgoingCall(de(e.to),await S(e.fromRanges,t))}function pe(e){return new i.SemanticTokensEdit(e.start,e.deleteCount,void 0!==e.data?new Uint32Array(e.data):void 0)}function me(e){if(null===e)return;let t=new g.default(W(e.kind),e.name,e.detail||"",C(e.uri),w(e.range),w(e.selectionRange),e.data);return void 0!==e.tags&&(t.tags=$(e.tags)),t}function fe(e){let t,n;t="string"==typeof e.insertText?e.insertText:new i.SnippetString(e.insertText.value),e.command&&(n=J(e.command));const o=new i.InlineCompletionItem(t,w(e.range),n);return e.filterText&&(o.filterText=e.filterText),o}return Q.set(o.CodeActionKind.Empty,i.CodeActionKind.Empty),Q.set(o.CodeActionKind.QuickFix,i.CodeActionKind.QuickFix),Q.set(o.CodeActionKind.Refactor,i.CodeActionKind.Refactor),Q.set(o.CodeActionKind.RefactorExtract,i.CodeActionKind.RefactorExtract),Q.set(o.CodeActionKind.RefactorInline,i.CodeActionKind.RefactorInline),Q.set(o.CodeActionKind.RefactorRewrite,i.CodeActionKind.RefactorRewrite),Q.set(o.CodeActionKind.Source,i.CodeActionKind.Source),Q.set(o.CodeActionKind.SourceOrganizeImports,i.CodeActionKind.SourceOrganizeImports),{asUri:C,asDocumentSelector:function(e){const t=[];for(const n of e)if("string"==typeof n)t.push(n);else if(f.NotebookCellTextDocumentFilter.is(n))if("string"==typeof n.notebook)t.push({notebookType:n.notebook,language:n.language});else{const e=n.notebook.notebookType??"*";t.push({notebookType:e,scheme:n.notebook.scheme,pattern:n.notebook.pattern,language:n.language})}else f.TextDocumentFilter.is(n)&&t.push({language:n.language,scheme:n.scheme,pattern:n.pattern});return t},asDiagnostics:async function(e,t){return s.map(e,D,t)},asDiagnostic:D,asRange:w,asRanges:S,asPosition:R,asDiagnosticSeverity:T,asDiagnosticTag:b,asHover:function(e){if(e)return new i.Hover(function(e){if(r.string(e))return k(e);if(v.is(e))return k().appendCodeblock(e.value,e.language);if(Array.isArray(e)){let t=[];for(let n of e){let e=k();v.is(n)?e.appendCodeblock(n.value,n.language):e.appendMarkdown(n),t.push(e)}return t}return k(e)}(e.contents),w(e.range))},asCompletionResult:async function(e,t,n){if(!e)return;if(Array.isArray(e))return s.map(e,(e=>x(e,t)),n);const r=e,{defaultRange:a,commitCharacters:c}=function(e,t){const n=e.itemDefaults?.editRange,i=e.itemDefaults?.commitCharacters??t;return o.Range.is(n)?{defaultRange:w(n),commitCharacters:i}:void 0!==n?{defaultRange:{inserting:w(n.insert),replacing:w(n.replace)},commitCharacters:i}:{defaultRange:void 0,commitCharacters:i}}(r,t),u=await s.map(r.items,(e=>x(e,c,a,r.itemDefaults?.insertTextMode,r.itemDefaults?.insertTextFormat,r.itemDefaults?.data)),n);return new i.CompletionList(u,r.isIncomplete)},asCompletionItem:x,asTextEdit:q,asTextEdits:F,asSignatureHelp:async function(e,t){if(!e)return;let n=new i.SignatureHelp;return r.number(e.activeSignature)?n.activeSignature=e.activeSignature:n.activeSignature=0,r.number(e.activeParameter)?n.activeParameter=e.activeParameter:n.activeParameter=0,e.signatures&&(n.signatures=await E(e.signatures,t)),n},asSignatureInformations:E,asSignatureInformation:M,asParameterInformations:I,asParameterInformation:N,asDeclarationResult:async function(e,t){if(e)return j(e,t)},asDefinitionResult:async function(e,t){if(e)return j(e,t)},asLocation:L,asReferences:async function(e,t){if(e)return s.map(e,L,t)},asDocumentHighlights:async function(e,t){if(e)return s.map(e,H,t)},asDocumentHighlight:H,asDocumentHighlightKind:K,asSymbolKind:W,asSymbolTag:U,asSymbolTags:$,asSymbolInformations:async function(e,t){if(e)return s.map(e,z,t)},asSymbolInformation:z,asDocumentSymbols:async function(e,t){if(null!=e)return s.map(e,V,t)},asDocumentSymbol:V,asCommand:J,asCommands:async function(e,t){if(e)return s.map(e,J,t)},asCodeAction:G,asCodeActionKind:X,asCodeActionKinds:function(e){if(null!=e)return e.map((e=>X(e)))},asCodeActionResult:function(e,t){return s.mapAsync(e,(async e=>o.Command.is(e)?J(e):G(e,t)),t)},asCodeLens:Y,asCodeLenses:async function(e,t){if(e)return s.map(e,Y,t)},asWorkspaceEdit:Z,asDocumentLink:ee,asDocumentLinks:async function(e,t){if(e)return s.map(e,ee,t)},asFoldingRangeKind:oe,asFoldingRange:re,asFoldingRanges:async function(e,t){if(e)return s.map(e,re,t)},asColor:te,asColorInformation:ne,asColorInformations:async function(e,t){if(e)return s.map(e,ne,t)},asColorPresentation:ie,asColorPresentations:async function(e,t){if(e)return s.map(e,ie,t)},asSelectionRange:se,asSelectionRanges:async function(e,t){return Array.isArray(e)?s.map(e,se,t):[]},asInlineValue:ae,asInlineValues:async function(e,t){return Array.isArray(e)?s.map(e,ae,t):[]},asInlayHint:ce,asInlayHints:async function(e,t){if(Array.isArray(e))return s.mapAsync(e,ce,t)},asSemanticTokensLegend:function(e){return e},asSemanticTokens:async function(e,t){if(null!=e)return new i.SemanticTokens(new Uint32Array(e.data),e.resultId)},asSemanticTokensEdit:pe,asSemanticTokensEdits:async function(e,t){if(null!=e)return new i.SemanticTokensEdits(e.edits.map(pe),e.resultId)},asCallHierarchyItem:de,asCallHierarchyItems:async function(e,t){if(null!==e)return s.map(e,de,t)},asCallHierarchyIncomingCall:he,asCallHierarchyIncomingCalls:async function(e,t){if(null!==e)return s.mapAsync(e,he,t)},asCallHierarchyOutgoingCall:ge,asCallHierarchyOutgoingCalls:async function(e,t){if(null!==e)return s.mapAsync(e,ge,t)},asLinkedEditingRanges:async function(e,t){if(null!=e)return new i.LinkedEditingRanges(await S(e.ranges,t),function(e){if(null!=e)return new RegExp(e)}(e.wordPattern))},asTypeHierarchyItem:me,asTypeHierarchyItems:async function(e,t){if(null!==e)return s.map(e,me,t)},asGlobPattern:function(e){if(r.string(e))return e;if(o.RelativePattern.is(e)){if(o.URI.is(e.baseUri))return new i.RelativePattern(C(e.baseUri),e.pattern);if(o.WorkspaceFolder.is(e.baseUri)){const t=i.workspace.getWorkspaceFolder(C(e.baseUri.uri));return void 0!==t?new i.RelativePattern(t,e.pattern):void 0}}},asInlineCompletionResult:async function(e,t){if(!e)return;if(Array.isArray(e))return s.map(e,(e=>fe(e)),t);const n=e,o=await s.map(n.items,(e=>fe(e)),t);return new i.InlineCompletionList(o)},asInlineCompletionItem:fe}}},6965:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProtocolDiagnostic=t.DiagnosticCode=void 0;const i=n(9496),o=n(2116);var r;!function(e){e.is=function(e){const t=e;return null!=t&&(o.number(t.value)||o.string(t.value))&&o.string(t.target)}}(r||(t.DiagnosticCode=r={}));class s extends i.Diagnostic{constructor(e,t,n,i){super(e,t,n),this.data=i,this.hasDiagnosticCode=!1}}t.ProtocolDiagnostic=s},8552:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(9496);class o extends i.DocumentLink{constructor(e,t){super(e,t)}}t.default=o},134:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(9496);class o extends i.InlayHint{constructor(e,t,n){super(e,t,n)}}t.default=o},9551:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(9496);class o extends i.TypeHierarchyItem{constructor(e,t,n,i,o,r,s){super(e,t,n,i,o,r),void 0!==s&&(this.data=s)}}t.default=o},6832:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(9496);class o extends i.SymbolInformation{constructor(e,t,n,o,r){const s=!(o instanceof i.Uri);super(e,t,n,s?o:new i.Location(o,new i.Range(0,0,0,0))),this.hasRange=s,void 0!==r&&(this.data=r)}}t.default=o},9929:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ReferencesFeature=void 0;const i=n(9496),o=n(5968),r=n(497),s=n(7435);class a extends r.TextDocumentLanguageFeature{constructor(e){super(e,o.ReferencesRequest.type)}fillClientCapabilities(e){(0,r.ensure)((0,r.ensure)(e,"textDocument"),"references").dynamicRegistration=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.referencesProvider);n&&this.register({id:s.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t=e.documentSelector,n={provideReferences:(e,t,n,i)=>{const r=this._client,s=(e,t,n,i)=>r.sendRequest(o.ReferencesRequest.type,r.code2ProtocolConverter.asReferenceParams(e,t,n),i).then((e=>i.isCancellationRequested?null:r.protocol2CodeConverter.asReferences(e,i)),(e=>r.handleFailedRequest(o.ReferencesRequest.type,i,e,null))),a=r.middleware;return a.provideReferences?a.provideReferences(e,t,n,i,s):s(e,t,n,i)}};return[this.registerProvider(t,n),n]}registerProvider(e,t){return i.languages.registerReferenceProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}}t.ReferencesFeature=a},2865:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RenameFeature=void 0;const i=n(9496),o=n(5968),r=n(7435),s=n(2116),a=n(497);class c extends a.TextDocumentLanguageFeature{constructor(e){super(e,o.RenameRequest.type)}fillClientCapabilities(e){let t=(0,a.ensure)((0,a.ensure)(e,"textDocument"),"rename");t.dynamicRegistration=!0,t.prepareSupport=!0,t.prepareSupportDefaultBehavior=o.PrepareSupportDefaultBehavior.Identifier,t.honorsChangeAnnotations=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.renameProvider);n&&(s.boolean(e.renameProvider)&&(n.prepareProvider=!1),this.register({id:r.generateUuid(),registerOptions:n}))}registerLanguageProvider(e){const t=e.documentSelector,n={provideRenameEdits:(e,t,n,i)=>{const r=this._client,s=(e,t,n,i)=>{let s={textDocument:r.code2ProtocolConverter.asTextDocumentIdentifier(e),position:r.code2ProtocolConverter.asPosition(t),newName:n};return r.sendRequest(o.RenameRequest.type,s,i).then((e=>i.isCancellationRequested?null:r.protocol2CodeConverter.asWorkspaceEdit(e,i)),(e=>r.handleFailedRequest(o.RenameRequest.type,i,e,null,!1)))},a=r.middleware;return a.provideRenameEdits?a.provideRenameEdits(e,t,n,i,s):s(e,t,n,i)},prepareRename:e.prepareProvider?(e,t,n)=>{const i=this._client,r=(e,t,n)=>{let r={textDocument:i.code2ProtocolConverter.asTextDocumentIdentifier(e),position:i.code2ProtocolConverter.asPosition(t)};return i.sendRequest(o.PrepareRenameRequest.type,r,n).then((e=>n.isCancellationRequested?null:o.Range.is(e)?i.protocol2CodeConverter.asRange(e):this.isDefaultBehavior(e)?!0===e.defaultBehavior?null:Promise.reject(new Error("The element can't be renamed.")):e&&o.Range.is(e.range)?{range:i.protocol2CodeConverter.asRange(e.range),placeholder:e.placeholder}:Promise.reject(new Error("The element can't be renamed."))),(e=>{throw"string"==typeof e.message?new Error(e.message):new Error("The element can't be renamed.")}))},s=i.middleware;return s.prepareRename?s.prepareRename(e,t,n,r):r(e,t,n)}:void 0};return[this.registerProvider(t,n),n]}registerProvider(e,t){return i.languages.registerRenameProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}isDefaultBehavior(e){const t=e;return t&&s.boolean(t.defaultBehavior)}}t.RenameFeature=c},9314:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SelectionRangeFeature=void 0;const i=n(9496),o=n(5968),r=n(497);class s extends r.TextDocumentLanguageFeature{constructor(e){super(e,o.SelectionRangeRequest.type)}fillClientCapabilities(e){(0,r.ensure)((0,r.ensure)(e,"textDocument"),"selectionRange").dynamicRegistration=!0}initialize(e,t){const[n,i]=this.getRegistration(t,e.selectionRangeProvider);n&&i&&this.register({id:n,registerOptions:i})}registerLanguageProvider(e){const t=e.documentSelector,n={provideSelectionRanges:(e,t,n)=>{const i=this._client,r=async(e,t,n)=>{const r={textDocument:i.code2ProtocolConverter.asTextDocumentIdentifier(e),positions:i.code2ProtocolConverter.asPositionsSync(t,n)};return i.sendRequest(o.SelectionRangeRequest.type,r,n).then((e=>n.isCancellationRequested?null:i.protocol2CodeConverter.asSelectionRanges(e,n)),(e=>i.handleFailedRequest(o.SelectionRangeRequest.type,n,e,null)))},s=i.middleware;return s.provideSelectionRanges?s.provideSelectionRanges(e,t,n,r):r(e,t,n)}};return[this.registerProvider(t,n),n]}registerProvider(e,t){return i.languages.registerSelectionRangeProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}}t.SelectionRangeFeature=s},1845:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SemanticTokensFeature=void 0;const i=n(9496),o=n(5968),r=n(497),s=n(2116);class a extends r.TextDocumentLanguageFeature{constructor(e){super(e,o.SemanticTokensRegistrationType.type)}fillClientCapabilities(e){const t=(0,r.ensure)((0,r.ensure)(e,"textDocument"),"semanticTokens");t.dynamicRegistration=!0,t.tokenTypes=[o.SemanticTokenTypes.namespace,o.SemanticTokenTypes.type,o.SemanticTokenTypes.class,o.SemanticTokenTypes.enum,o.SemanticTokenTypes.interface,o.SemanticTokenTypes.struct,o.SemanticTokenTypes.typeParameter,o.SemanticTokenTypes.parameter,o.SemanticTokenTypes.variable,o.SemanticTokenTypes.property,o.SemanticTokenTypes.enumMember,o.SemanticTokenTypes.event,o.SemanticTokenTypes.function,o.SemanticTokenTypes.method,o.SemanticTokenTypes.macro,o.SemanticTokenTypes.keyword,o.SemanticTokenTypes.modifier,o.SemanticTokenTypes.comment,o.SemanticTokenTypes.string,o.SemanticTokenTypes.number,o.SemanticTokenTypes.regexp,o.SemanticTokenTypes.operator,o.SemanticTokenTypes.decorator],t.tokenModifiers=[o.SemanticTokenModifiers.declaration,o.SemanticTokenModifiers.definition,o.SemanticTokenModifiers.readonly,o.SemanticTokenModifiers.static,o.SemanticTokenModifiers.deprecated,o.SemanticTokenModifiers.abstract,o.SemanticTokenModifiers.async,o.SemanticTokenModifiers.modification,o.SemanticTokenModifiers.documentation,o.SemanticTokenModifiers.defaultLibrary],t.formats=[o.TokenFormat.Relative],t.requests={range:!0,full:{delta:!0}},t.multilineTokenSupport=!1,t.overlappingTokenSupport=!1,t.serverCancelSupport=!0,t.augmentsSyntaxTokens=!0,(0,r.ensure)((0,r.ensure)(e,"workspace"),"semanticTokens").refreshSupport=!0}initialize(e,t){this._client.onRequest(o.SemanticTokensRefreshRequest.type,(async()=>{for(const e of this.getAllProviders())e.onDidChangeSemanticTokensEmitter.fire()}));const[n,i]=this.getRegistration(t,e.semanticTokensProvider);n&&i&&this.register({id:n,registerOptions:i})}registerLanguageProvider(e){const t=e.documentSelector,n=s.boolean(e.full)?e.full:void 0!==e.full,r=void 0!==e.full&&"boolean"!=typeof e.full&&!0===e.full.delta,a=new i.EventEmitter,c=n?{onDidChangeSemanticTokens:a.event,provideDocumentSemanticTokens:(e,t)=>{const n=this._client,i=n.middleware,r=(e,t)=>{const i={textDocument:n.code2ProtocolConverter.asTextDocumentIdentifier(e)};return n.sendRequest(o.SemanticTokensRequest.type,i,t).then((e=>t.isCancellationRequested?null:n.protocol2CodeConverter.asSemanticTokens(e,t)),(e=>n.handleFailedRequest(o.SemanticTokensRequest.type,t,e,null)))};return i.provideDocumentSemanticTokens?i.provideDocumentSemanticTokens(e,t,r):r(e,t)},provideDocumentSemanticTokensEdits:r?(e,t,n)=>{const i=this._client,r=i.middleware,s=(e,t,n)=>{const r={textDocument:i.code2ProtocolConverter.asTextDocumentIdentifier(e),previousResultId:t};return i.sendRequest(o.SemanticTokensDeltaRequest.type,r,n).then((async e=>n.isCancellationRequested?null:o.SemanticTokens.is(e)?await i.protocol2CodeConverter.asSemanticTokens(e,n):await i.protocol2CodeConverter.asSemanticTokensEdits(e,n)),(e=>i.handleFailedRequest(o.SemanticTokensDeltaRequest.type,n,e,null)))};return r.provideDocumentSemanticTokensEdits?r.provideDocumentSemanticTokensEdits(e,t,n,s):s(e,t,n)}:void 0}:void 0,u=!0===e.range?{provideDocumentRangeSemanticTokens:(e,t,n)=>{const i=this._client,r=i.middleware,s=(e,t,n)=>{const r={textDocument:i.code2ProtocolConverter.asTextDocumentIdentifier(e),range:i.code2ProtocolConverter.asRange(t)};return i.sendRequest(o.SemanticTokensRangeRequest.type,r,n).then((e=>n.isCancellationRequested?null:i.protocol2CodeConverter.asSemanticTokens(e,n)),(e=>i.handleFailedRequest(o.SemanticTokensRangeRequest.type,n,e,null)))};return r.provideDocumentRangeSemanticTokens?r.provideDocumentRangeSemanticTokens(e,t,n,s):s(e,t,n)}}:void 0,l=[],d=this._client,h=d.protocol2CodeConverter.asSemanticTokensLegend(e.legend),g=d.protocol2CodeConverter.asDocumentSelector(t);return void 0!==c&&l.push(i.languages.registerDocumentSemanticTokensProvider(g,c,h)),void 0!==u&&l.push(i.languages.registerDocumentRangeSemanticTokensProvider(g,u,h)),[new i.Disposable((()=>l.forEach((e=>e.dispose())))),{range:u,full:c,onDidChangeSemanticTokensEmitter:a}]}}t.SemanticTokensFeature=a},1432:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SignatureHelpFeature=void 0;const i=n(9496),o=n(5968),r=n(497),s=n(7435);class a extends r.TextDocumentLanguageFeature{constructor(e){super(e,o.SignatureHelpRequest.type)}fillClientCapabilities(e){let t=(0,r.ensure)((0,r.ensure)(e,"textDocument"),"signatureHelp");t.dynamicRegistration=!0,t.signatureInformation={documentationFormat:[o.MarkupKind.Markdown,o.MarkupKind.PlainText]},t.signatureInformation.parameterInformation={labelOffsetSupport:!0},t.signatureInformation.activeParameterSupport=!0,t.contextSupport=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.signatureHelpProvider);n&&this.register({id:s.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t={provideSignatureHelp:(e,t,n,i)=>{const r=this._client,s=(e,t,n,i)=>r.sendRequest(o.SignatureHelpRequest.type,r.code2ProtocolConverter.asSignatureHelpParams(e,t,n),i).then((e=>i.isCancellationRequested?null:r.protocol2CodeConverter.asSignatureHelp(e,i)),(e=>r.handleFailedRequest(o.SignatureHelpRequest.type,i,e,null))),a=r.middleware;return a.provideSignatureHelp?a.provideSignatureHelp(e,t,i,n,s):s(e,t,i,n)}};return[this.registerProvider(e,t),t]}registerProvider(e,t){const n=this._client.protocol2CodeConverter.asDocumentSelector(e.documentSelector);if(void 0===e.retriggerCharacters){const o=e.triggerCharacters||[];return i.languages.registerSignatureHelpProvider(n,t,...o)}{const o={triggerCharacters:e.triggerCharacters||[],retriggerCharacters:e.retriggerCharacters||[]};return i.languages.registerSignatureHelpProvider(n,t,o)}}}t.SignatureHelpFeature=a},5610:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DidSaveTextDocumentFeature=t.WillSaveWaitUntilFeature=t.WillSaveFeature=t.DidChangeTextDocumentFeature=t.DidCloseTextDocumentFeature=t.DidOpenTextDocumentFeature=void 0;const i=n(9496),o=n(5968),r=n(497),s=n(7435);class a extends r.TextDocumentEventFeature{constructor(e,t){super(e,i.workspace.onDidOpenTextDocument,o.DidOpenTextDocumentNotification.type,(()=>e.middleware.didOpen),(t=>e.code2ProtocolConverter.asOpenTextDocumentParams(t)),(e=>e),r.TextDocumentEventFeature.textDocumentFilter),this._syncedDocuments=t}get openDocuments(){return this._syncedDocuments.values()}fillClientCapabilities(e){(0,r.ensure)((0,r.ensure)(e,"textDocument"),"synchronization").dynamicRegistration=!0}initialize(e,t){const n=e.resolvedTextDocumentSync;t&&n&&n.openClose&&this.register({id:s.generateUuid(),registerOptions:{documentSelector:t}})}get registrationType(){return o.DidOpenTextDocumentNotification.type}register(e){if(super.register(e),!e.registerOptions.documentSelector)return;const t=this._client.protocol2CodeConverter.asDocumentSelector(e.registerOptions.documentSelector);i.workspace.textDocuments.forEach((e=>{const n=e.uri.toString();if(!this._syncedDocuments.has(n)&&i.languages.match(t,e)>0&&!this._client.hasDedicatedTextSynchronizationFeature(e)){const t=this._client.middleware,i=e=>this._client.sendNotification(this._type,this._createParams(e));(t.didOpen?t.didOpen(e,i):i(e)).catch((e=>{this._client.error(`Sending document notification ${this._type.method} failed`,e)})),this._syncedDocuments.set(n,e)}}))}getTextDocument(e){return e}notificationSent(e,t,n){this._syncedDocuments.set(e.uri.toString(),e),super.notificationSent(e,t,n)}}t.DidOpenTextDocumentFeature=a;class c extends r.TextDocumentEventFeature{constructor(e,t,n){super(e,i.workspace.onDidCloseTextDocument,o.DidCloseTextDocumentNotification.type,(()=>e.middleware.didClose),(t=>e.code2ProtocolConverter.asCloseTextDocumentParams(t)),(e=>e),r.TextDocumentEventFeature.textDocumentFilter),this._syncedDocuments=t,this._pendingTextDocumentChanges=n}get registrationType(){return o.DidCloseTextDocumentNotification.type}fillClientCapabilities(e){(0,r.ensure)((0,r.ensure)(e,"textDocument"),"synchronization").dynamicRegistration=!0}initialize(e,t){let n=e.resolvedTextDocumentSync;t&&n&&n.openClose&&this.register({id:s.generateUuid(),registerOptions:{documentSelector:t}})}async callback(e){await super.callback(e),this._pendingTextDocumentChanges.delete(e.uri.toString())}getTextDocument(e){return e}notificationSent(e,t,n){this._syncedDocuments.delete(e.uri.toString()),super.notificationSent(e,t,n)}unregister(e){const t=this._selectors.get(e);super.unregister(e);const n=this._selectors.values();this._syncedDocuments.forEach((e=>{if(i.languages.match(t,e)>0&&!this._selectorFilter(n,e)&&!this._client.hasDedicatedTextSynchronizationFeature(e)){let t=this._client.middleware,n=e=>this._client.sendNotification(this._type,this._createParams(e));this._syncedDocuments.delete(e.uri.toString()),(t.didClose?t.didClose(e,n):n(e)).catch((e=>{this._client.error(`Sending document notification ${this._type.method} failed`,e)}))}}))}}t.DidCloseTextDocumentFeature=c;class u extends r.DynamicDocumentFeature{constructor(e,t){super(e),this._changeData=new Map,this._onNotificationSent=new i.EventEmitter,this._onPendingChangeAdded=new i.EventEmitter,this._pendingTextDocumentChanges=t,this._syncKind=o.TextDocumentSyncKind.None}get onNotificationSent(){return this._onNotificationSent.event}get onPendingChangeAdded(){return this._onPendingChangeAdded.event}get syncKind(){return this._syncKind}get registrationType(){return o.DidChangeTextDocumentNotification.type}fillClientCapabilities(e){(0,r.ensure)((0,r.ensure)(e,"textDocument"),"synchronization").dynamicRegistration=!0}initialize(e,t){let n=e.resolvedTextDocumentSync;t&&n&&void 0!==n.change&&n.change!==o.TextDocumentSyncKind.None&&this.register({id:s.generateUuid(),registerOptions:Object.assign({},{documentSelector:t},{syncKind:n.change})})}register(e){e.registerOptions.documentSelector&&(this._listener||(this._listener=i.workspace.onDidChangeTextDocument(this.callback,this)),this._changeData.set(e.id,{syncKind:e.registerOptions.syncKind,documentSelector:this._client.protocol2CodeConverter.asDocumentSelector(e.registerOptions.documentSelector)}),this.updateSyncKind(e.registerOptions.syncKind))}*getDocumentSelectors(){for(const e of this._changeData.values())yield e.documentSelector}async callback(e){if(0===e.contentChanges.length)return;const t=e.document.uri,n=e.document.version,r=[];for(const s of this._changeData.values())if(i.languages.match(s.documentSelector,e.document)>0&&!this._client.hasDedicatedTextSynchronizationFeature(e.document)){const i=this._client.middleware;if(s.syncKind===o.TextDocumentSyncKind.Incremental){const s=async e=>{const i=this._client.code2ProtocolConverter.asChangeTextDocumentParams(e,t,n);await this._client.sendNotification(o.DidChangeTextDocumentNotification.type,i),this.notificationSent(e.document,o.DidChangeTextDocumentNotification.type,i)};r.push(i.didChange?i.didChange(e,(e=>s(e))):s(e))}else if(s.syncKind===o.TextDocumentSyncKind.Full){const t=async e=>{const t=e.document.uri.toString();this._pendingTextDocumentChanges.set(t,e.document),this._onPendingChangeAdded.fire()};r.push(i.didChange?i.didChange(e,(e=>t(e))):t(e))}}return Promise.all(r).then(void 0,(e=>{throw this._client.error(`Sending document notification ${o.DidChangeTextDocumentNotification.type.method} failed`,e),e}))}notificationSent(e,t,n){this._onNotificationSent.fire({textDocument:e,type:t,params:n})}unregister(e){if(this._changeData.delete(e),0===this._changeData.size)this._listener&&(this._listener.dispose(),this._listener=void 0),this._syncKind=o.TextDocumentSyncKind.None;else{this._syncKind=o.TextDocumentSyncKind.None;for(const e of this._changeData.values())if(this.updateSyncKind(e.syncKind),this._syncKind===o.TextDocumentSyncKind.Full)break}}clear(){this._pendingTextDocumentChanges.clear(),this._changeData.clear(),this._syncKind=o.TextDocumentSyncKind.None,this._listener&&(this._listener.dispose(),this._listener=void 0)}getPendingDocumentChanges(e){if(0===this._pendingTextDocumentChanges.size)return[];let t;if(0===e.size)t=Array.from(this._pendingTextDocumentChanges.values()),this._pendingTextDocumentChanges.clear();else{t=[];for(const n of this._pendingTextDocumentChanges)e.has(n[0])||(t.push(n[1]),this._pendingTextDocumentChanges.delete(n[0]))}return t}getProvider(e){for(const t of this._changeData.values())if(i.languages.match(t.documentSelector,e)>0)return{send:e=>this.callback(e)}}updateSyncKind(e){if(this._syncKind!==o.TextDocumentSyncKind.Full)switch(e){case o.TextDocumentSyncKind.Full:this._syncKind=e;break;case o.TextDocumentSyncKind.Incremental:this._syncKind===o.TextDocumentSyncKind.None&&(this._syncKind=o.TextDocumentSyncKind.Incremental)}}}t.DidChangeTextDocumentFeature=u;class l extends r.TextDocumentEventFeature{constructor(e){super(e,i.workspace.onWillSaveTextDocument,o.WillSaveTextDocumentNotification.type,(()=>e.middleware.willSave),(t=>e.code2ProtocolConverter.asWillSaveTextDocumentParams(t)),(e=>e.document),((e,t)=>r.TextDocumentEventFeature.textDocumentFilter(e,t.document)))}get registrationType(){return o.WillSaveTextDocumentNotification.type}fillClientCapabilities(e){(0,r.ensure)((0,r.ensure)(e,"textDocument"),"synchronization").willSave=!0}initialize(e,t){let n=e.resolvedTextDocumentSync;t&&n&&n.willSave&&this.register({id:s.generateUuid(),registerOptions:{documentSelector:t}})}getTextDocument(e){return e.document}}t.WillSaveFeature=l;class d extends r.DynamicDocumentFeature{constructor(e){super(e),this._selectors=new Map}getDocumentSelectors(){return this._selectors.values()}get registrationType(){return o.WillSaveTextDocumentWaitUntilRequest.type}fillClientCapabilities(e){(0,r.ensure)((0,r.ensure)(e,"textDocument"),"synchronization").willSaveWaitUntil=!0}initialize(e,t){let n=e.resolvedTextDocumentSync;t&&n&&n.willSaveWaitUntil&&this.register({id:s.generateUuid(),registerOptions:{documentSelector:t}})}register(e){e.registerOptions.documentSelector&&(this._listener||(this._listener=i.workspace.onWillSaveTextDocument(this.callback,this)),this._selectors.set(e.id,this._client.protocol2CodeConverter.asDocumentSelector(e.registerOptions.documentSelector)))}callback(e){if(r.TextDocumentEventFeature.textDocumentFilter(this._selectors.values(),e.document)&&!this._client.hasDedicatedTextSynchronizationFeature(e.document)){let t=this._client.middleware,n=e=>this._client.sendRequest(o.WillSaveTextDocumentWaitUntilRequest.type,this._client.code2ProtocolConverter.asWillSaveTextDocumentParams(e)).then((async e=>{let t=await this._client.protocol2CodeConverter.asTextEdits(e);return void 0===t?[]:t}));e.waitUntil(t.willSaveWaitUntil?t.willSaveWaitUntil(e,n):n(e))}}unregister(e){this._selectors.delete(e),0===this._selectors.size&&this._listener&&(this._listener.dispose(),this._listener=void 0)}clear(){this._selectors.clear(),this._listener&&(this._listener.dispose(),this._listener=void 0)}}t.WillSaveWaitUntilFeature=d;class h extends r.TextDocumentEventFeature{constructor(e){super(e,i.workspace.onDidSaveTextDocument,o.DidSaveTextDocumentNotification.type,(()=>e.middleware.didSave),(t=>e.code2ProtocolConverter.asSaveTextDocumentParams(t,this._includeText)),(e=>e),r.TextDocumentEventFeature.textDocumentFilter),this._includeText=!1}get registrationType(){return o.DidSaveTextDocumentNotification.type}fillClientCapabilities(e){(0,r.ensure)((0,r.ensure)(e,"textDocument"),"synchronization").didSave=!0}initialize(e,t){const n=e.resolvedTextDocumentSync;if(t&&n&&n.save){const e="boolean"==typeof n.save?{includeText:!1}:{includeText:!!n.save.includeText};this.register({id:s.generateUuid(),registerOptions:Object.assign({},{documentSelector:t},e)})}}register(e){this._includeText=!!e.registerOptions.includeText,super.register(e)}getTextDocument(e){return e}}t.DidSaveTextDocumentFeature=h},7201:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeDefinitionFeature=void 0;const i=n(9496),o=n(5968),r=n(497);class s extends r.TextDocumentLanguageFeature{constructor(e){super(e,o.TypeDefinitionRequest.type)}fillClientCapabilities(e){(0,r.ensure)((0,r.ensure)(e,"textDocument"),"typeDefinition").dynamicRegistration=!0;let t=(0,r.ensure)((0,r.ensure)(e,"textDocument"),"typeDefinition");t.dynamicRegistration=!0,t.linkSupport=!0}initialize(e,t){let[n,i]=this.getRegistration(t,e.typeDefinitionProvider);n&&i&&this.register({id:n,registerOptions:i})}registerLanguageProvider(e){const t=e.documentSelector,n={provideTypeDefinition:(e,t,n)=>{const i=this._client,r=(e,t,n)=>i.sendRequest(o.TypeDefinitionRequest.type,i.code2ProtocolConverter.asTextDocumentPositionParams(e,t),n).then((e=>n.isCancellationRequested?null:i.protocol2CodeConverter.asDefinitionResult(e,n)),(e=>i.handleFailedRequest(o.TypeDefinitionRequest.type,n,e,null))),s=i.middleware;return s.provideTypeDefinition?s.provideTypeDefinition(e,t,n,r):r(e,t,n)}};return[this.registerProvider(t,n),n]}registerProvider(e,t){return i.languages.registerTypeDefinitionProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}}t.TypeDefinitionFeature=s},4042:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeHierarchyFeature=void 0;const i=n(9496),o=n(5968),r=n(497);class s{constructor(e){this.client=e,this.middleware=e.middleware}prepareTypeHierarchy(e,t,n){const i=this.client,r=this.middleware,s=(e,t,n)=>{const r=i.code2ProtocolConverter.asTextDocumentPositionParams(e,t);return i.sendRequest(o.TypeHierarchyPrepareRequest.type,r,n).then((e=>n.isCancellationRequested?null:i.protocol2CodeConverter.asTypeHierarchyItems(e,n)),(e=>i.handleFailedRequest(o.TypeHierarchyPrepareRequest.type,n,e,null)))};return r.prepareTypeHierarchy?r.prepareTypeHierarchy(e,t,n,s):s(e,t,n)}provideTypeHierarchySupertypes(e,t){const n=this.client,i=this.middleware,r=(e,t)=>{const i={item:n.code2ProtocolConverter.asTypeHierarchyItem(e)};return n.sendRequest(o.TypeHierarchySupertypesRequest.type,i,t).then((e=>t.isCancellationRequested?null:n.protocol2CodeConverter.asTypeHierarchyItems(e,t)),(e=>n.handleFailedRequest(o.TypeHierarchySupertypesRequest.type,t,e,null)))};return i.provideTypeHierarchySupertypes?i.provideTypeHierarchySupertypes(e,t,r):r(e,t)}provideTypeHierarchySubtypes(e,t){const n=this.client,i=this.middleware,r=(e,t)=>{const i={item:n.code2ProtocolConverter.asTypeHierarchyItem(e)};return n.sendRequest(o.TypeHierarchySubtypesRequest.type,i,t).then((e=>t.isCancellationRequested?null:n.protocol2CodeConverter.asTypeHierarchyItems(e,t)),(e=>n.handleFailedRequest(o.TypeHierarchySubtypesRequest.type,t,e,null)))};return i.provideTypeHierarchySubtypes?i.provideTypeHierarchySubtypes(e,t,r):r(e,t)}}class a extends r.TextDocumentLanguageFeature{constructor(e){super(e,o.TypeHierarchyPrepareRequest.type)}fillClientCapabilities(e){(0,r.ensure)((0,r.ensure)(e,"textDocument"),"typeHierarchy").dynamicRegistration=!0}initialize(e,t){const[n,i]=this.getRegistration(t,e.typeHierarchyProvider);n&&i&&this.register({id:n,registerOptions:i})}registerLanguageProvider(e){const t=this._client,n=new s(t);return[i.languages.registerTypeHierarchyProvider(t.protocol2CodeConverter.asDocumentSelector(e.documentSelector),n),n]}}t.TypeHierarchyFeature=a},8005:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.forEach=t.mapAsync=t.map=t.clearTestMode=t.setTestMode=t.Semaphore=t.Delayer=void 0;const i=n(5968);t.Delayer=class{constructor(e){this.defaultDelay=e,this.timeout=void 0,this.completionPromise=void 0,this.onSuccess=void 0,this.task=void 0}trigger(e,t=this.defaultDelay){return this.task=e,t>=0&&this.cancelTimeout(),this.completionPromise||(this.completionPromise=new Promise((e=>{this.onSuccess=e})).then((()=>{this.completionPromise=void 0,this.onSuccess=void 0;var e=this.task();return this.task=void 0,e}))),(t>=0||void 0===this.timeout)&&(this.timeout=(0,i.RAL)().timer.setTimeout((()=>{this.timeout=void 0,this.onSuccess(void 0)}),t>=0?t:this.defaultDelay)),this.completionPromise}forceDelivery(){if(!this.completionPromise)return;this.cancelTimeout();let e=this.task();return this.completionPromise=void 0,this.onSuccess=void 0,this.task=void 0,e}isTriggered(){return void 0!==this.timeout}cancel(){this.cancelTimeout(),this.completionPromise=void 0}cancelTimeout(){void 0!==this.timeout&&(this.timeout.dispose(),this.timeout=void 0)}},t.Semaphore=class{constructor(e=1){if(e<=0)throw new Error("Capacity must be greater than 0");this._capacity=e,this._active=0,this._waiting=[]}lock(e){return new Promise(((t,n)=>{this._waiting.push({thunk:e,resolve:t,reject:n}),this.runNext()}))}get active(){return this._active}runNext(){0!==this._waiting.length&&this._active!==this._capacity&&(0,i.RAL)().timer.setImmediate((()=>this.doRunNext()))}doRunNext(){if(0===this._waiting.length||this._active===this._capacity)return;const e=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("To many thunks active");try{const t=e.thunk();t instanceof Promise?t.then((t=>{this._active--,e.resolve(t),this.runNext()}),(t=>{this._active--,e.reject(t),this.runNext()})):(this._active--,e.resolve(t),this.runNext())}catch(t){this._active--,e.reject(t),this.runNext()}}};let o=!1;t.setTestMode=function(){o=!0},t.clearTestMode=function(){o=!1};class r{constructor(e=15){this.yieldAfter=!0===o?Math.max(e,2):Math.max(e,15),this.startTime=Date.now(),this.counter=0,this.total=0,this.counterInterval=1}start(){this.counter=0,this.total=0,this.counterInterval=1,this.startTime=Date.now()}shouldYield(){if(++this.counter>=this.counterInterval){const e=Date.now()-this.startTime,t=Math.max(0,this.yieldAfter-e);if(this.total+=this.counter,this.counter=0,e>=this.yieldAfter||t<=1)return this.counterInterval=1,this.total=0,!0;switch(e){case 0:case 1:this.counterInterval=2*this.total}}return!1}}t.map=async function(e,t,n,o){if(0===e.length)return[];const s=new Array(e.length),a=new r(o?.yieldAfter);function c(n){a.start();for(let i=n;i<e.length;i++)if(s[i]=t(e[i]),a.shouldYield())return o?.yieldCallback&&o.yieldCallback(),i+1;return-1}let u=c(0);for(;-1!==u&&(void 0===n||!n.isCancellationRequested);)u=await new Promise((e=>{(0,i.RAL)().timer.setImmediate((()=>{e(c(u))}))}));return s},t.mapAsync=async function(e,t,n,o){if(0===e.length)return[];const s=new Array(e.length),a=new r(o?.yieldAfter);async function c(i){a.start();for(let r=i;r<e.length;r++)if(s[r]=await t(e[r],n),a.shouldYield())return o?.yieldCallback&&o.yieldCallback(),r+1;return-1}let u=await c(0);for(;-1!==u&&(void 0===n||!n.isCancellationRequested);)u=await new Promise((e=>{(0,i.RAL)().timer.setImmediate((()=>{e(c(u))}))}));return s},t.forEach=async function(e,t,n,o){if(0===e.length)return;const s=new r(o?.yieldAfter);function a(n){s.start();for(let i=n;i<e.length;i++)if(t(e[i]),s.shouldYield())return o?.yieldCallback&&o.yieldCallback(),i+1;return-1}let c=a(0);for(;-1!==c&&(void 0===n||!n.isCancellationRequested);)c=await new Promise((e=>{(0,i.RAL)().timer.setImmediate((()=>{e(a(c))}))}))}},2116:(e,t)=>{"use strict";function n(e){return"string"==typeof e||e instanceof String}function i(e){return"function"==typeof e}function o(e){return Array.isArray(e)}function r(e){return e&&i(e.then)}Object.defineProperty(t,"__esModule",{value:!0}),t.asPromise=t.thenable=t.typedArray=t.stringArray=t.array=t.func=t.error=t.number=t.string=t.boolean=void 0,t.boolean=function(e){return!0===e||!1===e},t.string=n,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=i,t.array=o,t.stringArray=function(e){return o(e)&&e.every((e=>n(e)))},t.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)},t.thenable=r,t.asPromise=function(e){return e instanceof Promise?e:r(e)?new Promise(((t,n)=>{e.then((e=>t(e)),(e=>n(e)))})):Promise.resolve(e)}},7435:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateUuid=t.parse=t.isUUID=t.v4=t.empty=void 0;class n{constructor(e){this._value=e}asHex(){return this._value}equals(e){return this.asHex()===e.asHex()}}class i extends n{static _oneOf(e){return e[Math.floor(e.length*Math.random())]}static _randomHex(){return i._oneOf(i._chars)}constructor(){super([i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),"-",i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),"-","4",i._randomHex(),i._randomHex(),i._randomHex(),"-",i._oneOf(i._timeHighBits),i._randomHex(),i._randomHex(),i._randomHex(),"-",i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex()].join(""))}}function o(){return new i}i._chars=["0","1","2","3","4","5","6","6","7","8","9","a","b","c","d","e","f"],i._timeHighBits=["8","9","a","b"],t.empty=new n("00000000-0000-0000-0000-000000000000"),t.v4=o;const r=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function s(e){return r.test(e)}t.isUUID=s,t.parse=function(e){if(!s(e))throw new Error("invalid uuid");return new n(e)},t.generateUuid=function(){return o().asHex()}},5828:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceFoldersFeature=t.arrayDiff=void 0;const i=n(7435),o=n(9496),r=n(5968);function s(e,t){if(null!=e)return e[t]}function a(e,t){return e.filter((e=>t.indexOf(e)<0))}t.arrayDiff=a,t.WorkspaceFoldersFeature=class{constructor(e){this._client=e,this._listeners=new Map}getState(){return{kind:"workspace",id:this.registrationType.method,registrations:this._listeners.size>0}}get registrationType(){return r.DidChangeWorkspaceFoldersNotification.type}fillInitializeParams(e){const t=o.workspace.workspaceFolders;this.initializeWithFolders(t),e.workspaceFolders=void 0===t?null:t.map((e=>this.asProtocol(e)))}initializeWithFolders(e){this._initialFolders=e}fillClientCapabilities(e){e.workspace=e.workspace||{},e.workspace.workspaceFolders=!0}initialize(e){const t=this._client;t.onRequest(r.WorkspaceFoldersRequest.type,(e=>{const n=()=>{const e=o.workspace.workspaceFolders;return void 0===e?null:e.map((e=>this.asProtocol(e)))},i=t.middleware.workspace;return i&&i.workspaceFolders?i.workspaceFolders(e,n):n()}));const n=s(s(s(e,"workspace"),"workspaceFolders"),"changeNotifications");let a;"string"==typeof n?a=n:!0===n&&(a=i.generateUuid()),a&&this.register({id:a,registerOptions:void 0})}sendInitialEvent(e){let t;if(this._initialFolders&&e){const n=a(this._initialFolders,e),i=a(e,this._initialFolders);(i.length>0||n.length>0)&&(t=this.doSendEvent(i,n))}else this._initialFolders?t=this.doSendEvent([],this._initialFolders):e&&(t=this.doSendEvent(e,[]));void 0!==t&&t.catch((e=>{this._client.error(`Sending notification ${r.DidChangeWorkspaceFoldersNotification.type.method} failed`,e)}))}doSendEvent(e,t){let n={event:{added:e.map((e=>this.asProtocol(e))),removed:t.map((e=>this.asProtocol(e)))}};return this._client.sendNotification(r.DidChangeWorkspaceFoldersNotification.type,n)}register(e){let t=e.id,n=this._client,i=o.workspace.onDidChangeWorkspaceFolders((e=>{let t=e=>this.doSendEvent(e.added,e.removed),i=n.middleware.workspace;(i&&i.didChangeWorkspaceFolders?i.didChangeWorkspaceFolders(e,t):t(e)).catch((e=>{this._client.error(`Sending notification ${r.DidChangeWorkspaceFoldersNotification.type.method} failed`,e)}))}));this._listeners.set(t,i),this.sendInitialEvent(o.workspace.workspaceFolders)}unregister(e){let t=this._listeners.get(e);void 0!==t&&(this._listeners.delete(e),t.dispose())}clear(){for(let e of this._listeners.values())e.dispose();this._listeners.clear()}asProtocol(e){return void 0===e?null:{uri:this._client.code2ProtocolConverter.asUri(e.uri),name:e.name}}}},8447:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceSymbolFeature=void 0;const i=n(9496),o=n(5968),r=n(497),s=n(1690),a=n(7435);class c extends r.WorkspaceFeature{constructor(e){super(e,o.WorkspaceSymbolRequest.type)}fillClientCapabilities(e){let t=(0,r.ensure)((0,r.ensure)(e,"workspace"),"symbol");t.dynamicRegistration=!0,t.symbolKind={valueSet:s.SupportedSymbolKinds},t.tagSupport={valueSet:s.SupportedSymbolTags},t.resolveSupport={properties:["location.range"]}}initialize(e){e.workspaceSymbolProvider&&this.register({id:a.generateUuid(),registerOptions:!0===e.workspaceSymbolProvider?{workDoneProgress:!1}:e.workspaceSymbolProvider})}registerLanguageProvider(e){const t={provideWorkspaceSymbols:(e,t)=>{const n=this._client,i=(e,t)=>n.sendRequest(o.WorkspaceSymbolRequest.type,{query:e},t).then((e=>t.isCancellationRequested?null:n.protocol2CodeConverter.asSymbolInformations(e,t)),(e=>n.handleFailedRequest(o.WorkspaceSymbolRequest.type,t,e,null))),r=n.middleware;return r.provideWorkspaceSymbols?r.provideWorkspaceSymbols(e,t,i):i(e,t)},resolveWorkspaceSymbol:!0===e.resolveProvider?(e,t)=>{const n=this._client,i=(e,t)=>n.sendRequest(o.WorkspaceSymbolResolveRequest.type,n.code2ProtocolConverter.asWorkspaceSymbol(e),t).then((e=>t.isCancellationRequested?null:n.protocol2CodeConverter.asSymbolInformation(e)),(e=>n.handleFailedRequest(o.WorkspaceSymbolResolveRequest.type,t,e,null))),r=n.middleware;return r.resolveWorkspaceSymbol?r.resolveWorkspaceSymbol(e,t,i):i(e,t)}:void 0};return[i.languages.registerWorkspaceSymbolProvider(t),t]}}t.WorkspaceSymbolFeature=c},9351:(e,t,n)=>{"use strict";e.exports=n(5968)},5968:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.createProtocolConnection=void 0;const r=n(9838);o(n(9838),t),o(n(559),t),t.createProtocolConnection=function(e,t,n,i){return(0,r.createMessageConnection)(e,t,n,i)}},559:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.LSPErrorCodes=t.createProtocolConnection=void 0,o(n(9406),t),o(n(1516),t),o(n(4742),t),o(n(7304),t);var r,s=n(7558);Object.defineProperty(t,"createProtocolConnection",{enumerable:!0,get:function(){return s.createProtocolConnection}}),function(e){e.lspReservedErrorRangeStart=-32899,e.RequestFailed=-32803,e.ServerCancelled=-32802,e.ContentModified=-32801,e.RequestCancelled=-32800,e.lspReservedErrorRangeEnd=-32800}(r||(t.LSPErrorCodes=r={}))},7558:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createProtocolConnection=void 0;const i=n(9406);t.createProtocolConnection=function(e,t,n,o){return i.ConnectionStrategy.is(o)&&(o={connectionStrategy:o}),(0,i.createMessageConnection)(e,t,n,o)}},4742:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProtocolNotificationType=t.ProtocolNotificationType0=t.ProtocolRequestType=t.ProtocolRequestType0=t.RegistrationType=t.MessageDirection=void 0;const i=n(9406);var o;!function(e){e.clientToServer="clientToServer",e.serverToClient="serverToClient",e.both="both"}(o||(t.MessageDirection=o={})),t.RegistrationType=class{constructor(e){this.method=e}};class r extends i.RequestType0{constructor(e){super(e)}}t.ProtocolRequestType0=r;class s extends i.RequestType{constructor(e){super(e,i.ParameterStructures.byName)}}t.ProtocolRequestType=s;class a extends i.NotificationType0{constructor(e){super(e)}}t.ProtocolNotificationType0=a;class c extends i.NotificationType{constructor(e){super(e,i.ParameterStructures.byName)}}t.ProtocolNotificationType=c},2565:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CallHierarchyOutgoingCallsRequest=t.CallHierarchyIncomingCallsRequest=t.CallHierarchyPrepareRequest=void 0;const i=n(4742);var o,r,s;!function(e){e.method="textDocument/prepareCallHierarchy",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(o||(t.CallHierarchyPrepareRequest=o={})),function(e){e.method="callHierarchy/incomingCalls",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(r||(t.CallHierarchyIncomingCallsRequest=r={})),function(e){e.method="callHierarchy/outgoingCalls",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(s||(t.CallHierarchyOutgoingCallsRequest=s={}))},5509:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColorPresentationRequest=t.DocumentColorRequest=void 0;const i=n(4742);var o,r;!function(e){e.method="textDocument/documentColor",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(o||(t.DocumentColorRequest=o={})),function(e){e.method="textDocument/colorPresentation",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(r||(t.ColorPresentationRequest=r={}))},7296:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigurationRequest=void 0;const i=n(4742);var o;!function(e){e.method="workspace/configuration",e.messageDirection=i.MessageDirection.serverToClient,e.type=new i.ProtocolRequestType(e.method)}(o||(t.ConfigurationRequest=o={}))},9137:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DeclarationRequest=void 0;const i=n(4742);var o;!function(e){e.method="textDocument/declaration",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(o||(t.DeclarationRequest=o={}))},8338:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DiagnosticRefreshRequest=t.WorkspaceDiagnosticRequest=t.DocumentDiagnosticRequest=t.DocumentDiagnosticReportKind=t.DiagnosticServerCancellationData=void 0;const i=n(9406),o=n(9348),r=n(4742);var s,a,c,u,l;!function(e){e.is=function(e){const t=e;return t&&o.boolean(t.retriggerRequest)}}(s||(t.DiagnosticServerCancellationData=s={})),function(e){e.Full="full",e.Unchanged="unchanged"}(a||(t.DocumentDiagnosticReportKind=a={})),function(e){e.method="textDocument/diagnostic",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method),e.partialResult=new i.ProgressType}(c||(t.DocumentDiagnosticRequest=c={})),function(e){e.method="workspace/diagnostic",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method),e.partialResult=new i.ProgressType}(u||(t.WorkspaceDiagnosticRequest=u={})),function(e){e.method="workspace/diagnostic/refresh",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType0(e.method)}(l||(t.DiagnosticRefreshRequest=l={}))},2235:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WillDeleteFilesRequest=t.DidDeleteFilesNotification=t.DidRenameFilesNotification=t.WillRenameFilesRequest=t.DidCreateFilesNotification=t.WillCreateFilesRequest=t.FileOperationPatternKind=void 0;const i=n(4742);var o,r,s,a,c,u,l;!function(e){e.file="file",e.folder="folder"}(o||(t.FileOperationPatternKind=o={})),function(e){e.method="workspace/willCreateFiles",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(r||(t.WillCreateFilesRequest=r={})),function(e){e.method="workspace/didCreateFiles",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolNotificationType(e.method)}(s||(t.DidCreateFilesNotification=s={})),function(e){e.method="workspace/willRenameFiles",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(a||(t.WillRenameFilesRequest=a={})),function(e){e.method="workspace/didRenameFiles",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolNotificationType(e.method)}(c||(t.DidRenameFilesNotification=c={})),function(e){e.method="workspace/didDeleteFiles",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolNotificationType(e.method)}(u||(t.DidDeleteFilesNotification=u={})),function(e){e.method="workspace/willDeleteFiles",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(l||(t.WillDeleteFilesRequest=l={}))},5171:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FoldingRangeRefreshRequest=t.FoldingRangeRequest=void 0;const i=n(4742);var o,r;!function(e){e.method="textDocument/foldingRange",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(o||(t.FoldingRangeRequest=o={})),function(e){e.method="workspace/foldingRange/refresh",e.messageDirection=i.MessageDirection.serverToClient,e.type=new i.ProtocolRequestType0(e.method)}(r||(t.FoldingRangeRefreshRequest=r={}))},2441:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImplementationRequest=void 0;const i=n(4742);var o;!function(e){e.method="textDocument/implementation",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(o||(t.ImplementationRequest=o={}))},4248:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlayHintRefreshRequest=t.InlayHintResolveRequest=t.InlayHintRequest=void 0;const i=n(4742);var o,r,s;!function(e){e.method="textDocument/inlayHint",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(o||(t.InlayHintRequest=o={})),function(e){e.method="inlayHint/resolve",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(r||(t.InlayHintResolveRequest=r={})),function(e){e.method="workspace/inlayHint/refresh",e.messageDirection=i.MessageDirection.serverToClient,e.type=new i.ProtocolRequestType0(e.method)}(s||(t.InlayHintRefreshRequest=s={}))},9366:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlineCompletionRequest=void 0;const i=n(4742);var o;!function(e){e.method="textDocument/inlineCompletion",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(o||(t.InlineCompletionRequest=o={}))},1557:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlineValueRefreshRequest=t.InlineValueRequest=void 0;const i=n(4742);var o,r;!function(e){e.method="textDocument/inlineValue",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(o||(t.InlineValueRequest=o={})),function(e){e.method="workspace/inlineValue/refresh",e.messageDirection=i.MessageDirection.serverToClient,e.type=new i.ProtocolRequestType0(e.method)}(r||(t.InlineValueRefreshRequest=r={}))},7304:(e,t,n)=>{"use strict";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;const i=n(4742),o=n(1516),r=n(9348),s=n(2441);Object.defineProperty(t,"ImplementationRequest",{enumerable:!0,get:function(){return s.ImplementationRequest}});const a=n(8685);Object.defineProperty(t,"TypeDefinitionRequest",{enumerable:!0,get:function(){return a.TypeDefinitionRequest}});const c=n(6098);Object.defineProperty(t,"WorkspaceFoldersRequest",{enumerable:!0,get:function(){return c.WorkspaceFoldersRequest}}),Object.defineProperty(t,"DidChangeWorkspaceFoldersNotification",{enumerable:!0,get:function(){return c.DidChangeWorkspaceFoldersNotification}});const u=n(7296);Object.defineProperty(t,"ConfigurationRequest",{enumerable:!0,get:function(){return u.ConfigurationRequest}});const l=n(5509);Object.defineProperty(t,"DocumentColorRequest",{enumerable:!0,get:function(){return l.DocumentColorRequest}}),Object.defineProperty(t,"ColorPresentationRequest",{enumerable:!0,get:function(){return l.ColorPresentationRequest}});const d=n(5171);Object.defineProperty(t,"FoldingRangeRequest",{enumerable:!0,get:function(){return d.FoldingRangeRequest}}),Object.defineProperty(t,"FoldingRangeRefreshRequest",{enumerable:!0,get:function(){return d.FoldingRangeRefreshRequest}});const h=n(9137);Object.defineProperty(t,"DeclarationRequest",{enumerable:!0,get:function(){return h.DeclarationRequest}});const g=n(2964);Object.defineProperty(t,"SelectionRangeRequest",{enumerable:!0,get:function(){return g.SelectionRangeRequest}});const p=n(7450);Object.defineProperty(t,"WorkDoneProgress",{enumerable:!0,get:function(){return p.WorkDoneProgress}}),Object.defineProperty(t,"WorkDoneProgressCreateRequest",{enumerable:!0,get:function(){return p.WorkDoneProgressCreateRequest}}),Object.defineProperty(t,"WorkDoneProgressCancelNotification",{enumerable:!0,get:function(){return p.WorkDoneProgressCancelNotification}});const m=n(2565);Object.defineProperty(t,"CallHierarchyIncomingCallsRequest",{enumerable:!0,get:function(){return m.CallHierarchyIncomingCallsRequest}}),Object.defineProperty(t,"CallHierarchyOutgoingCallsRequest",{enumerable:!0,get:function(){return m.CallHierarchyOutgoingCallsRequest}}),Object.defineProperty(t,"CallHierarchyPrepareRequest",{enumerable:!0,get:function(){return m.CallHierarchyPrepareRequest}});const f=n(5402);Object.defineProperty(t,"TokenFormat",{enumerable:!0,get:function(){return f.TokenFormat}}),Object.defineProperty(t,"SemanticTokensRequest",{enumerable:!0,get:function(){return f.SemanticTokensRequest}}),Object.defineProperty(t,"SemanticTokensDeltaRequest",{enumerable:!0,get:function(){return f.SemanticTokensDeltaRequest}}),Object.defineProperty(t,"SemanticTokensRangeRequest",{enumerable:!0,get:function(){return f.SemanticTokensRangeRequest}}),Object.defineProperty(t,"SemanticTokensRefreshRequest",{enumerable:!0,get:function(){return f.SemanticTokensRefreshRequest}}),Object.defineProperty(t,"SemanticTokensRegistrationType",{enumerable:!0,get:function(){return f.SemanticTokensRegistrationType}});const v=n(903);Object.defineProperty(t,"ShowDocumentRequest",{enumerable:!0,get:function(){return v.ShowDocumentRequest}});const y=n(7323);Object.defineProperty(t,"LinkedEditingRangeRequest",{enumerable:!0,get:function(){return y.LinkedEditingRangeRequest}});const C=n(2235);Object.defineProperty(t,"FileOperationPatternKind",{enumerable:!0,get:function(){return C.FileOperationPatternKind}}),Object.defineProperty(t,"DidCreateFilesNotification",{enumerable:!0,get:function(){return C.DidCreateFilesNotification}}),Object.defineProperty(t,"WillCreateFilesRequest",{enumerable:!0,get:function(){return C.WillCreateFilesRequest}}),Object.defineProperty(t,"DidRenameFilesNotification",{enumerable:!0,get:function(){return C.DidRenameFilesNotification}}),Object.defineProperty(t,"WillRenameFilesRequest",{enumerable:!0,get:function(){return C.WillRenameFilesRequest}}),Object.defineProperty(t,"DidDeleteFilesNotification",{enumerable:!0,get:function(){return C.DidDeleteFilesNotification}}),Object.defineProperty(t,"WillDeleteFilesRequest",{enumerable:!0,get:function(){return C.WillDeleteFilesRequest}});const D=n(9219);Object.defineProperty(t,"UniquenessLevel",{enumerable:!0,get:function(){return D.UniquenessLevel}}),Object.defineProperty(t,"MonikerKind",{enumerable:!0,get:function(){return D.MonikerKind}}),Object.defineProperty(t,"MonikerRequest",{enumerable:!0,get:function(){return D.MonikerRequest}});const b=n(9970);Object.defineProperty(t,"TypeHierarchyPrepareRequest",{enumerable:!0,get:function(){return b.TypeHierarchyPrepareRequest}}),Object.defineProperty(t,"TypeHierarchySubtypesRequest",{enumerable:!0,get:function(){return b.TypeHierarchySubtypesRequest}}),Object.defineProperty(t,"TypeHierarchySupertypesRequest",{enumerable:!0,get:function(){return b.TypeHierarchySupertypesRequest}});const R=n(1557);Object.defineProperty(t,"InlineValueRequest",{enumerable:!0,get:function(){return R.InlineValueRequest}}),Object.defineProperty(t,"InlineValueRefreshRequest",{enumerable:!0,get:function(){return R.InlineValueRefreshRequest}});const w=n(4248);Object.defineProperty(t,"InlayHintRequest",{enumerable:!0,get:function(){return w.InlayHintRequest}}),Object.defineProperty(t,"InlayHintResolveRequest",{enumerable:!0,get:function(){return w.InlayHintResolveRequest}}),Object.defineProperty(t,"InlayHintRefreshRequest",{enumerable:!0,get:function(){return w.InlayHintRefreshRequest}});const S=n(8338);Object.defineProperty(t,"DiagnosticServerCancellationData",{enumerable:!0,get:function(){return S.DiagnosticServerCancellationData}}),Object.defineProperty(t,"DocumentDiagnosticReportKind",{enumerable:!0,get:function(){return S.DocumentDiagnosticReportKind}}),Object.defineProperty(t,"DocumentDiagnosticRequest",{enumerable:!0,get:function(){return S.DocumentDiagnosticRequest}}),Object.defineProperty(t,"WorkspaceDiagnosticRequest",{enumerable:!0,get:function(){return S.WorkspaceDiagnosticRequest}}),Object.defineProperty(t,"DiagnosticRefreshRequest",{enumerable:!0,get:function(){return S.DiagnosticRefreshRequest}});const T=n(5626);Object.defineProperty(t,"NotebookCellKind",{enumerable:!0,get:function(){return T.NotebookCellKind}}),Object.defineProperty(t,"ExecutionSummary",{enumerable:!0,get:function(){return T.ExecutionSummary}}),Object.defineProperty(t,"NotebookCell",{enumerable:!0,get:function(){return T.NotebookCell}}),Object.defineProperty(t,"NotebookDocument",{enumerable:!0,get:function(){return T.NotebookDocument}}),Object.defineProperty(t,"NotebookDocumentSyncRegistrationType",{enumerable:!0,get:function(){return T.NotebookDocumentSyncRegistrationType}}),Object.defineProperty(t,"DidOpenNotebookDocumentNotification",{enumerable:!0,get:function(){return T.DidOpenNotebookDocumentNotification}}),Object.defineProperty(t,"NotebookCellArrayChange",{enumerable:!0,get:function(){return T.NotebookCellArrayChange}}),Object.defineProperty(t,"DidChangeNotebookDocumentNotification",{enumerable:!0,get:function(){return T.DidChangeNotebookDocumentNotification}}),Object.defineProperty(t,"DidSaveNotebookDocumentNotification",{enumerable:!0,get:function(){return T.DidSaveNotebookDocumentNotification}}),Object.defineProperty(t,"DidCloseNotebookDocumentNotification",{enumerable:!0,get:function(){return T.DidCloseNotebookDocumentNotification}});const _=n(9366);var k,P,x,q,F,O,E,M,I,N,L,A,j,H,K,W,U,$,z,V,B,J,Q,X,G,Y,Z,ee,te,ne,ie,oe,re,se,ae,ce,ue,le,de,he,ge,pe,me,fe,ve,ye,Ce,De,be,Re,we,Se,Te,_e,ke,Pe,xe,qe,Fe,Oe,Ee,Me,Ie,Ne,Le;Object.defineProperty(t,"InlineCompletionRequest",{enumerable:!0,get:function(){return _.InlineCompletionRequest}}),function(e){e.is=function(e){const t=e;return r.string(t)||r.string(t.language)||r.string(t.scheme)||r.string(t.pattern)}}(k||(t.TextDocumentFilter=k={})),function(e){e.is=function(e){const t=e;return r.objectLiteral(t)&&(r.string(t.notebookType)||r.string(t.scheme)||r.string(t.pattern))}}(P||(t.NotebookDocumentFilter=P={})),function(e){e.is=function(e){const t=e;return r.objectLiteral(t)&&(r.string(t.notebook)||P.is(t.notebook))&&(void 0===t.language||r.string(t.language))}}(x||(t.NotebookCellTextDocumentFilter=x={})),function(e){e.is=function(e){if(!Array.isArray(e))return!1;for(let t of e)if(!r.string(t)&&!k.is(t)&&!x.is(t))return!1;return!0}}(q||(t.DocumentSelector=q={})),function(e){e.method="client/registerCapability",e.messageDirection=i.MessageDirection.serverToClient,e.type=new i.ProtocolRequestType(e.method)}(F||(t.RegistrationRequest=F={})),function(e){e.method="client/unregisterCapability",e.messageDirection=i.MessageDirection.serverToClient,e.type=new i.ProtocolRequestType(e.method)}(O||(t.UnregistrationRequest=O={})),function(e){e.Create="create",e.Rename="rename",e.Delete="delete"}(E||(t.ResourceOperationKind=E={})),function(e){e.Abort="abort",e.Transactional="transactional",e.TextOnlyTransactional="textOnlyTransactional",e.Undo="undo"}(M||(t.FailureHandlingKind=M={})),function(e){e.UTF8="utf-8",e.UTF16="utf-16",e.UTF32="utf-32"}(I||(t.PositionEncodingKind=I={})),function(e){e.hasId=function(e){const t=e;return t&&r.string(t.id)&&t.id.length>0}}(N||(t.StaticRegistrationOptions=N={})),function(e){e.is=function(e){const t=e;return t&&(null===t.documentSelector||q.is(t.documentSelector))}}(L||(t.TextDocumentRegistrationOptions=L={})),function(e){e.is=function(e){const t=e;return r.objectLiteral(t)&&(void 0===t.workDoneProgress||r.boolean(t.workDoneProgress))},e.hasWorkDoneProgress=function(e){const t=e;return t&&r.boolean(t.workDoneProgress)}}(A||(t.WorkDoneProgressOptions=A={})),function(e){e.method="initialize",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(j||(t.InitializeRequest=j={})),function(e){e.unknownProtocolVersion=1}(H||(t.InitializeErrorCodes=H={})),function(e){e.method="initialized",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolNotificationType(e.method)}(K||(t.InitializedNotification=K={})),function(e){e.method="shutdown",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType0(e.method)}(W||(t.ShutdownRequest=W={})),function(e){e.method="exit",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolNotificationType0(e.method)}(U||(t.ExitNotification=U={})),function(e){e.method="workspace/didChangeConfiguration",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolNotificationType(e.method)}($||(t.DidChangeConfigurationNotification=$={})),function(e){e.Error=1,e.Warning=2,e.Info=3,e.Log=4,e.Debug=5}(z||(t.MessageType=z={})),function(e){e.method="window/showMessage",e.messageDirection=i.MessageDirection.serverToClient,e.type=new i.ProtocolNotificationType(e.method)}(V||(t.ShowMessageNotification=V={})),function(e){e.method="window/showMessageRequest",e.messageDirection=i.MessageDirection.serverToClient,e.type=new i.ProtocolRequestType(e.method)}(B||(t.ShowMessageRequest=B={})),function(e){e.method="window/logMessage",e.messageDirection=i.MessageDirection.serverToClient,e.type=new i.ProtocolNotificationType(e.method)}(J||(t.LogMessageNotification=J={})),function(e){e.method="telemetry/event",e.messageDirection=i.MessageDirection.serverToClient,e.type=new i.ProtocolNotificationType(e.method)}(Q||(t.TelemetryEventNotification=Q={})),function(e){e.None=0,e.Full=1,e.Incremental=2}(X||(t.TextDocumentSyncKind=X={})),function(e){e.method="textDocument/didOpen",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolNotificationType(e.method)}(G||(t.DidOpenTextDocumentNotification=G={})),function(e){e.isIncremental=function(e){let t=e;return null!=t&&"string"==typeof t.text&&void 0!==t.range&&(void 0===t.rangeLength||"number"==typeof t.rangeLength)},e.isFull=function(e){let t=e;return null!=t&&"string"==typeof t.text&&void 0===t.range&&void 0===t.rangeLength}}(Y||(t.TextDocumentContentChangeEvent=Y={})),function(e){e.method="textDocument/didChange",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolNotificationType(e.method)}(Z||(t.DidChangeTextDocumentNotification=Z={})),function(e){e.method="textDocument/didClose",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolNotificationType(e.method)}(ee||(t.DidCloseTextDocumentNotification=ee={})),function(e){e.method="textDocument/didSave",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolNotificationType(e.method)}(te||(t.DidSaveTextDocumentNotification=te={})),function(e){e.Manual=1,e.AfterDelay=2,e.FocusOut=3}(ne||(t.TextDocumentSaveReason=ne={})),function(e){e.method="textDocument/willSave",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolNotificationType(e.method)}(ie||(t.WillSaveTextDocumentNotification=ie={})),function(e){e.method="textDocument/willSaveWaitUntil",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(oe||(t.WillSaveTextDocumentWaitUntilRequest=oe={})),function(e){e.method="workspace/didChangeWatchedFiles",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolNotificationType(e.method)}(re||(t.DidChangeWatchedFilesNotification=re={})),function(e){e.Created=1,e.Changed=2,e.Deleted=3}(se||(t.FileChangeType=se={})),function(e){e.is=function(e){const t=e;return r.objectLiteral(t)&&(o.URI.is(t.baseUri)||o.WorkspaceFolder.is(t.baseUri))&&r.string(t.pattern)}}(ae||(t.RelativePattern=ae={})),function(e){e.Create=1,e.Change=2,e.Delete=4}(ce||(t.WatchKind=ce={})),function(e){e.method="textDocument/publishDiagnostics",e.messageDirection=i.MessageDirection.serverToClient,e.type=new i.ProtocolNotificationType(e.method)}(ue||(t.PublishDiagnosticsNotification=ue={})),function(e){e.Invoked=1,e.TriggerCharacter=2,e.TriggerForIncompleteCompletions=3}(le||(t.CompletionTriggerKind=le={})),function(e){e.method="textDocument/completion",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(de||(t.CompletionRequest=de={})),function(e){e.method="completionItem/resolve",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(he||(t.CompletionResolveRequest=he={})),function(e){e.method="textDocument/hover",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(ge||(t.HoverRequest=ge={})),function(e){e.Invoked=1,e.TriggerCharacter=2,e.ContentChange=3}(pe||(t.SignatureHelpTriggerKind=pe={})),function(e){e.method="textDocument/signatureHelp",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(me||(t.SignatureHelpRequest=me={})),function(e){e.method="textDocument/definition",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(fe||(t.DefinitionRequest=fe={})),function(e){e.method="textDocument/references",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(ve||(t.ReferencesRequest=ve={})),function(e){e.method="textDocument/documentHighlight",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(ye||(t.DocumentHighlightRequest=ye={})),function(e){e.method="textDocument/documentSymbol",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(Ce||(t.DocumentSymbolRequest=Ce={})),function(e){e.method="textDocument/codeAction",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(De||(t.CodeActionRequest=De={})),function(e){e.method="codeAction/resolve",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(be||(t.CodeActionResolveRequest=be={})),function(e){e.method="workspace/symbol",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(Re||(t.WorkspaceSymbolRequest=Re={})),function(e){e.method="workspaceSymbol/resolve",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(we||(t.WorkspaceSymbolResolveRequest=we={})),function(e){e.method="textDocument/codeLens",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(Se||(t.CodeLensRequest=Se={})),function(e){e.method="codeLens/resolve",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(Te||(t.CodeLensResolveRequest=Te={})),function(e){e.method="workspace/codeLens/refresh",e.messageDirection=i.MessageDirection.serverToClient,e.type=new i.ProtocolRequestType0(e.method)}(_e||(t.CodeLensRefreshRequest=_e={})),function(e){e.method="textDocument/documentLink",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(ke||(t.DocumentLinkRequest=ke={})),function(e){e.method="documentLink/resolve",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(Pe||(t.DocumentLinkResolveRequest=Pe={})),function(e){e.method="textDocument/formatting",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(xe||(t.DocumentFormattingRequest=xe={})),function(e){e.method="textDocument/rangeFormatting",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(qe||(t.DocumentRangeFormattingRequest=qe={})),function(e){e.method="textDocument/rangesFormatting",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(Fe||(t.DocumentRangesFormattingRequest=Fe={})),function(e){e.method="textDocument/onTypeFormatting",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(Oe||(t.DocumentOnTypeFormattingRequest=Oe={})),function(e){e.Identifier=1}(Ee||(t.PrepareSupportDefaultBehavior=Ee={})),function(e){e.method="textDocument/rename",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(Me||(t.RenameRequest=Me={})),function(e){e.method="textDocument/prepareRename",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(Ie||(t.PrepareRenameRequest=Ie={})),function(e){e.method="workspace/executeCommand",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(Ne||(t.ExecuteCommandRequest=Ne={})),function(e){e.method="workspace/applyEdit",e.messageDirection=i.MessageDirection.serverToClient,e.type=new i.ProtocolRequestType("workspace/applyEdit")}(Le||(t.ApplyWorkspaceEditRequest=Le={}))},7323:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LinkedEditingRangeRequest=void 0;const i=n(4742);var o;!function(e){e.method="textDocument/linkedEditingRange",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(o||(t.LinkedEditingRangeRequest=o={}))},9219:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MonikerRequest=t.MonikerKind=t.UniquenessLevel=void 0;const i=n(4742);var o,r,s;!function(e){e.document="document",e.project="project",e.group="group",e.scheme="scheme",e.global="global"}(o||(t.UniquenessLevel=o={})),function(e){e.$import="import",e.$export="export",e.local="local"}(r||(t.MonikerKind=r={})),function(e){e.method="textDocument/moniker",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(s||(t.MonikerRequest=s={}))},5626:(e,t,n)=>{"use strict";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;const i=n(1516),o=n(9348),r=n(4742);var s,a,c,u,l,d,h,g,p,m;!function(e){e.Markup=1,e.Code=2,e.is=function(e){return 1===e||2===e}}(s||(t.NotebookCellKind=s={})),function(e){e.create=function(e,t){const n={executionOrder:e};return!0!==t&&!1!==t||(n.success=t),n},e.is=function(e){const t=e;return o.objectLiteral(t)&&i.uinteger.is(t.executionOrder)&&(void 0===t.success||o.boolean(t.success))},e.equals=function(e,t){return e===t||null!=e&&null!=t&&e.executionOrder===t.executionOrder&&e.success===t.success}}(a||(t.ExecutionSummary=a={})),function(e){function t(e,n){if(e===n)return!0;if(null==e||null==n)return!1;if(typeof e!=typeof n)return!1;if("object"!=typeof e)return!1;const i=Array.isArray(e),r=Array.isArray(n);if(i!==r)return!1;if(i&&r){if(e.length!==n.length)return!1;for(let i=0;i<e.length;i++)if(!t(e[i],n[i]))return!1}if(o.objectLiteral(e)&&o.objectLiteral(n)){const i=Object.keys(e),o=Object.keys(n);if(i.length!==o.length)return!1;if(i.sort(),o.sort(),!t(i,o))return!1;for(let o=0;o<i.length;o++){const r=i[o];if(!t(e[r],n[r]))return!1}}return!0}e.create=function(e,t){return{kind:e,document:t}},e.is=function(e){const t=e;return o.objectLiteral(t)&&s.is(t.kind)&&i.DocumentUri.is(t.document)&&(void 0===t.metadata||o.objectLiteral(t.metadata))},e.diff=function(e,n){const i=new Set;return e.document!==n.document&&i.add("document"),e.kind!==n.kind&&i.add("kind"),e.executionSummary!==n.executionSummary&&i.add("executionSummary"),void 0===e.metadata&&void 0===n.metadata||t(e.metadata,n.metadata)||i.add("metadata"),void 0===e.executionSummary&&void 0===n.executionSummary||a.equals(e.executionSummary,n.executionSummary)||i.add("executionSummary"),i}}(c||(t.NotebookCell=c={})),function(e){e.create=function(e,t,n,i){return{uri:e,notebookType:t,version:n,cells:i}},e.is=function(e){const t=e;return o.objectLiteral(t)&&o.string(t.uri)&&i.integer.is(t.version)&&o.typedArray(t.cells,c.is)}}(u||(t.NotebookDocument=u={})),function(e){e.method="notebookDocument/sync",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.RegistrationType(e.method)}(l||(t.NotebookDocumentSyncRegistrationType=l={})),function(e){e.method="notebookDocument/didOpen",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method),e.registrationMethod=l.method}(d||(t.DidOpenNotebookDocumentNotification=d={})),function(e){e.is=function(e){const t=e;return o.objectLiteral(t)&&i.uinteger.is(t.start)&&i.uinteger.is(t.deleteCount)&&(void 0===t.cells||o.typedArray(t.cells,c.is))},e.create=function(e,t,n){const i={start:e,deleteCount:t};return void 0!==n&&(i.cells=n),i}}(h||(t.NotebookCellArrayChange=h={})),function(e){e.method="notebookDocument/didChange",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method),e.registrationMethod=l.method}(g||(t.DidChangeNotebookDocumentNotification=g={})),function(e){e.method="notebookDocument/didSave",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method),e.registrationMethod=l.method}(p||(t.DidSaveNotebookDocumentNotification=p={})),function(e){e.method="notebookDocument/didClose",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method),e.registrationMethod=l.method}(m||(t.DidCloseNotebookDocumentNotification=m={}))},7450:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WorkDoneProgressCancelNotification=t.WorkDoneProgressCreateRequest=t.WorkDoneProgress=void 0;const i=n(9406),o=n(4742);var r,s,a;!function(e){e.type=new i.ProgressType,e.is=function(t){return t===e.type}}(r||(t.WorkDoneProgress=r={})),function(e){e.method="window/workDoneProgress/create",e.messageDirection=o.MessageDirection.serverToClient,e.type=new o.ProtocolRequestType(e.method)}(s||(t.WorkDoneProgressCreateRequest=s={})),function(e){e.method="window/workDoneProgress/cancel",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolNotificationType(e.method)}(a||(t.WorkDoneProgressCancelNotification=a={}))},2964:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SelectionRangeRequest=void 0;const i=n(4742);var o;!function(e){e.method="textDocument/selectionRange",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(o||(t.SelectionRangeRequest=o={}))},5402:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SemanticTokensRefreshRequest=t.SemanticTokensRangeRequest=t.SemanticTokensDeltaRequest=t.SemanticTokensRequest=t.SemanticTokensRegistrationType=t.TokenFormat=void 0;const i=n(4742);var o,r,s,a,c,u;!function(e){e.Relative="relative"}(o||(t.TokenFormat=o={})),function(e){e.method="textDocument/semanticTokens",e.type=new i.RegistrationType(e.method)}(r||(t.SemanticTokensRegistrationType=r={})),function(e){e.method="textDocument/semanticTokens/full",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method),e.registrationMethod=r.method}(s||(t.SemanticTokensRequest=s={})),function(e){e.method="textDocument/semanticTokens/full/delta",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method),e.registrationMethod=r.method}(a||(t.SemanticTokensDeltaRequest=a={})),function(e){e.method="textDocument/semanticTokens/range",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method),e.registrationMethod=r.method}(c||(t.SemanticTokensRangeRequest=c={})),function(e){e.method="workspace/semanticTokens/refresh",e.messageDirection=i.MessageDirection.serverToClient,e.type=new i.ProtocolRequestType0(e.method)}(u||(t.SemanticTokensRefreshRequest=u={}))},903:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ShowDocumentRequest=void 0;const i=n(4742);var o;!function(e){e.method="window/showDocument",e.messageDirection=i.MessageDirection.serverToClient,e.type=new i.ProtocolRequestType(e.method)}(o||(t.ShowDocumentRequest=o={}))},8685:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeDefinitionRequest=void 0;const i=n(4742);var o;!function(e){e.method="textDocument/typeDefinition",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(o||(t.TypeDefinitionRequest=o={}))},9970:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeHierarchySubtypesRequest=t.TypeHierarchySupertypesRequest=t.TypeHierarchyPrepareRequest=void 0;const i=n(4742);var o,r,s;!function(e){e.method="textDocument/prepareTypeHierarchy",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(o||(t.TypeHierarchyPrepareRequest=o={})),function(e){e.method="typeHierarchy/supertypes",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(r||(t.TypeHierarchySupertypesRequest=r={})),function(e){e.method="typeHierarchy/subtypes",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(s||(t.TypeHierarchySubtypesRequest=s={}))},6098:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DidChangeWorkspaceFoldersNotification=t.WorkspaceFoldersRequest=void 0;const i=n(4742);var o,r;!function(e){e.method="workspace/workspaceFolders",e.messageDirection=i.MessageDirection.serverToClient,e.type=new i.ProtocolRequestType0(e.method)}(o||(t.WorkspaceFoldersRequest=o={})),function(e){e.method="workspace/didChangeWorkspaceFolders",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolNotificationType(e.method)}(r||(t.DidChangeWorkspaceFoldersNotification=r={}))},9348:(e,t)=>{"use strict";function n(e){return"string"==typeof e||e instanceof String}function i(e){return Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.objectLiteral=t.typedArray=t.stringArray=t.array=t.func=t.error=t.number=t.string=t.boolean=void 0,t.boolean=function(e){return!0===e||!1===e},t.string=n,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=function(e){return"function"==typeof e},t.array=i,t.stringArray=function(e){return i(e)&&e.every((e=>n(e)))},t.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)},t.objectLiteral=function(e){return null!==e&&"object"==typeof e}},7237:function(e){var t;t=()=>(()=>{"use strict";var e={470:e=>{function t(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function n(e,t){for(var n,i="",o=0,r=-1,s=0,a=0;a<=e.length;++a){if(a<e.length)n=e.charCodeAt(a);else{if(47===n)break;n=47}if(47===n){if(r===a-1||1===s);else if(r!==a-1&&2===s){if(i.length<2||2!==o||46!==i.charCodeAt(i.length-1)||46!==i.charCodeAt(i.length-2))if(i.length>2){var c=i.lastIndexOf("/");if(c!==i.length-1){-1===c?(i="",o=0):o=(i=i.slice(0,c)).length-1-i.lastIndexOf("/"),r=a,s=0;continue}}else if(2===i.length||1===i.length){i="",o=0,r=a,s=0;continue}t&&(i.length>0?i+="/..":i="..",o=2)}else i.length>0?i+="/"+e.slice(r+1,a):i=e.slice(r+1,a),o=a-r-1;r=a,s=0}else 46===n&&-1!==s?++s:s=-1}return i}var i={resolve:function(){for(var e,i="",o=!1,r=arguments.length-1;r>=-1&&!o;r--){var s;r>=0?s=arguments[r]:(void 0===e&&(e=process.cwd()),s=e),t(s),0!==s.length&&(i=s+"/"+i,o=47===s.charCodeAt(0))}return i=n(i,!o),o?i.length>0?"/"+i:"/":i.length>0?i:"."},normalize:function(e){if(t(e),0===e.length)return".";var i=47===e.charCodeAt(0),o=47===e.charCodeAt(e.length-1);return 0!==(e=n(e,!i)).length||i||(e="."),e.length>0&&o&&(e+="/"),i?"/"+e:e},isAbsolute:function(e){return t(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,n=0;n<arguments.length;++n){var o=arguments[n];t(o),o.length>0&&(void 0===e?e=o:e+="/"+o)}return void 0===e?".":i.normalize(e)},relative:function(e,n){if(t(e),t(n),e===n)return"";if((e=i.resolve(e))===(n=i.resolve(n)))return"";for(var o=1;o<e.length&&47===e.charCodeAt(o);++o);for(var r=e.length,s=r-o,a=1;a<n.length&&47===n.charCodeAt(a);++a);for(var c=n.length-a,u=s<c?s:c,l=-1,d=0;d<=u;++d){if(d===u){if(c>u){if(47===n.charCodeAt(a+d))return n.slice(a+d+1);if(0===d)return n.slice(a+d)}else s>u&&(47===e.charCodeAt(o+d)?l=d:0===d&&(l=0));break}var h=e.charCodeAt(o+d);if(h!==n.charCodeAt(a+d))break;47===h&&(l=d)}var g="";for(d=o+l+1;d<=r;++d)d!==r&&47!==e.charCodeAt(d)||(0===g.length?g+="..":g+="/..");return g.length>0?g+n.slice(a+l):(a+=l,47===n.charCodeAt(a)&&++a,n.slice(a))},_makeLong:function(e){return e},dirname:function(e){if(t(e),0===e.length)return".";for(var n=e.charCodeAt(0),i=47===n,o=-1,r=!0,s=e.length-1;s>=1;--s)if(47===(n=e.charCodeAt(s))){if(!r){o=s;break}}else r=!1;return-1===o?i?"/":".":i&&1===o?"//":e.slice(0,o)},basename:function(e,n){if(void 0!==n&&"string"!=typeof n)throw new TypeError('"ext" argument must be a string');t(e);var i,o=0,r=-1,s=!0;if(void 0!==n&&n.length>0&&n.length<=e.length){if(n.length===e.length&&n===e)return"";var a=n.length-1,c=-1;for(i=e.length-1;i>=0;--i){var u=e.charCodeAt(i);if(47===u){if(!s){o=i+1;break}}else-1===c&&(s=!1,c=i+1),a>=0&&(u===n.charCodeAt(a)?-1==--a&&(r=i):(a=-1,r=c))}return o===r?r=c:-1===r&&(r=e.length),e.slice(o,r)}for(i=e.length-1;i>=0;--i)if(47===e.charCodeAt(i)){if(!s){o=i+1;break}}else-1===r&&(s=!1,r=i+1);return-1===r?"":e.slice(o,r)},extname:function(e){t(e);for(var n=-1,i=0,o=-1,r=!0,s=0,a=e.length-1;a>=0;--a){var c=e.charCodeAt(a);if(47!==c)-1===o&&(r=!1,o=a+1),46===c?-1===n?n=a:1!==s&&(s=1):-1!==n&&(s=-1);else if(!r){i=a+1;break}}return-1===n||-1===o||0===s||1===s&&n===o-1&&n===i+1?"":e.slice(n,o)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var n=t.dir||t.root,i=t.base||(t.name||"")+(t.ext||"");return n?n===t.root?n+i:n+"/"+i:i}(0,e)},parse:function(e){t(e);var n={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return n;var i,o=e.charCodeAt(0),r=47===o;r?(n.root="/",i=1):i=0;for(var s=-1,a=0,c=-1,u=!0,l=e.length-1,d=0;l>=i;--l)if(47!==(o=e.charCodeAt(l)))-1===c&&(u=!1,c=l+1),46===o?-1===s?s=l:1!==d&&(d=1):-1!==s&&(d=-1);else if(!u){a=l+1;break}return-1===s||-1===c||0===d||1===d&&s===c-1&&s===a+1?-1!==c&&(n.base=n.name=0===a&&r?e.slice(1,c):e.slice(a,c)):(0===a&&r?(n.name=e.slice(1,s),n.base=e.slice(1,c)):(n.name=e.slice(a,s),n.base=e.slice(a,c)),n.ext=e.slice(s,c)),a>0?n.dir=e.slice(0,a-1):r&&(n.dir="/"),n},sep:"/",delimiter:":",win32:null,posix:null};i.posix=i,e.exports=i},674:(e,t)=>{if(Object.defineProperty(t,"__esModule",{value:!0}),t.isWindows=void 0,"object"==typeof process)t.isWindows=!1;else if("object"==typeof navigator){let e=navigator.userAgent;t.isWindows=e.indexOf("Windows")>=0}},796:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.uriToFsPath=t.URI=void 0;const i=n(674),o=/^\w[\w\d+.-]*$/,r=/^\//,s=/^\/\//;function a(e,t){if(!e.scheme&&t)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!o.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!r.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(s.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}const c="",u="/",l=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class d{static isUri(e){return e instanceof d||!!e&&"string"==typeof e.authority&&"string"==typeof e.fragment&&"string"==typeof e.path&&"string"==typeof e.query&&"string"==typeof e.scheme&&"string"==typeof e.fsPath&&"function"==typeof e.with&&"function"==typeof e.toString}scheme;authority;path;query;fragment;constructor(e,t,n,i,o,r=!1){"object"==typeof e?(this.scheme=e.scheme||c,this.authority=e.authority||c,this.path=e.path||c,this.query=e.query||c,this.fragment=e.fragment||c):(this.scheme=function(e,t){return e||t?e:"file"}(e,r),this.authority=t||c,this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==u&&(t=u+t):t=u}return t}(this.scheme,n||c),this.query=i||c,this.fragment=o||c,a(this,r))}get fsPath(){return v(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:n,path:i,query:o,fragment:r}=e;return void 0===t?t=this.scheme:null===t&&(t=c),void 0===n?n=this.authority:null===n&&(n=c),void 0===i?i=this.path:null===i&&(i=c),void 0===o?o=this.query:null===o&&(o=c),void 0===r?r=this.fragment:null===r&&(r=c),t===this.scheme&&n===this.authority&&i===this.path&&o===this.query&&r===this.fragment?this:new g(t,n,i,o,r)}static parse(e,t=!1){const n=l.exec(e);return n?new g(n[2]||c,b(n[4]||c),b(n[5]||c),b(n[7]||c),b(n[9]||c),t):new g(c,c,c,c,c)}static file(e){let t=c;if(i.isWindows&&(e=e.replace(/\\/g,u)),e[0]===u&&e[1]===u){const n=e.indexOf(u,2);-1===n?(t=e.substring(2),e=u):(t=e.substring(2,n),e=e.substring(n)||u)}return new g("file",t,e,c,c)}static from(e){const t=new g(e.scheme,e.authority,e.path,e.query,e.fragment);return a(t,!0),t}toString(e=!1){return y(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof d)return e;{const t=new g(e);return t._formatted=e.external,t._fsPath=e._sep===h?e.fsPath:null,t}}return e}}t.URI=d;const h=i.isWindows?1:void 0;class g extends d{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=v(this,!1)),this._fsPath}toString(e=!1){return e?y(this,!0):(this._formatted||(this._formatted=y(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=h),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}}const p={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(e,t,n){let i,o=-1;for(let r=0;r<e.length;r++){const s=e.charCodeAt(r);if(s>=97&&s<=122||s>=65&&s<=90||s>=48&&s<=57||45===s||46===s||95===s||126===s||t&&47===s||n&&91===s||n&&93===s||n&&58===s)-1!==o&&(i+=encodeURIComponent(e.substring(o,r)),o=-1),void 0!==i&&(i+=e.charAt(r));else{void 0===i&&(i=e.substr(0,r));const t=p[s];void 0!==t?(-1!==o&&(i+=encodeURIComponent(e.substring(o,r)),o=-1),i+=t):-1===o&&(o=r)}}return-1!==o&&(i+=encodeURIComponent(e.substring(o))),void 0!==i?i:e}function f(e){let t;for(let n=0;n<e.length;n++){const i=e.charCodeAt(n);35===i||63===i?(void 0===t&&(t=e.substr(0,n)),t+=p[i]):void 0!==t&&(t+=e[n])}return void 0!==t?t:e}function v(e,t){let n;return n=e.authority&&e.path.length>1&&"file"===e.scheme?`//${e.authority}${e.path}`:47===e.path.charCodeAt(0)&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&58===e.path.charCodeAt(2)?t?e.path.substr(1):e.path[1].toLowerCase()+e.path.substr(2):e.path,i.isWindows&&(n=n.replace(/\//g,"\\")),n}function y(e,t){const n=t?f:m;let i="",{scheme:o,authority:r,path:s,query:a,fragment:c}=e;if(o&&(i+=o,i+=":"),(r||"file"===o)&&(i+=u,i+=u),r){let e=r.indexOf("@");if(-1!==e){const t=r.substr(0,e);r=r.substr(e+1),e=t.lastIndexOf(":"),-1===e?i+=n(t,!1,!1):(i+=n(t.substr(0,e),!1,!1),i+=":",i+=n(t.substr(e+1),!1,!0)),i+="@"}r=r.toLowerCase(),e=r.lastIndexOf(":"),-1===e?i+=n(r,!1,!0):(i+=n(r.substr(0,e),!1,!0),i+=r.substr(e))}if(s){if(s.length>=3&&47===s.charCodeAt(0)&&58===s.charCodeAt(2)){const e=s.charCodeAt(1);e>=65&&e<=90&&(s=`/${String.fromCharCode(e+32)}:${s.substr(3)}`)}else if(s.length>=2&&58===s.charCodeAt(1)){const e=s.charCodeAt(0);e>=65&&e<=90&&(s=`${String.fromCharCode(e+32)}:${s.substr(2)}`)}i+=n(s,!0,!1)}return a&&(i+="?",i+=n(a,!1,!1)),c&&(i+="#",i+=t?c:m(c,!1,!1)),i}function C(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+C(e.substr(3)):e}}t.uriToFsPath=v;const D=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function b(e){return e.match(D)?e.replace(D,(e=>C(e))):e}},679:function(e,t,n){var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Utils=void 0;const s=r(n(470)),a=s.posix||s,c="/";var u;!function(e){e.joinPath=function(e,...t){return e.with({path:a.join(e.path,...t)})},e.resolvePath=function(e,...t){let n=e.path,i=!1;n[0]!==c&&(n=c+n,i=!0);let o=a.resolve(n,...t);return i&&o[0]===c&&!e.authority&&(o=o.substring(1)),e.with({path:o})},e.dirname=function(e){if(0===e.path.length||e.path===c)return e;let t=a.dirname(e.path);return 1===t.length&&46===t.charCodeAt(0)&&(t=""),e.with({path:t})},e.basename=function(e){return a.basename(e.path)},e.extname=function(e){return a.extname(e.path)}}(u||(t.Utils=u={}))}},t={};function n(i){var o=t[i];if(void 0!==o)return o.exports;var r=t[i]={exports:{}};return e[i].call(r.exports,r,r.exports,n),r.exports}var i={};return(()=>{var e=i;Object.defineProperty(e,"__esModule",{value:!0}),e.Utils=e.URI=void 0;const t=n(796);Object.defineProperty(e,"URI",{enumerable:!0,get:function(){return t.URI}});const o=n(679);Object.defineProperty(e,"Utils",{enumerable:!0,get:function(){return o.Utils}})})(),i})(),e.exports=t()},6058:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.activateAutoInsertion=function(e,t,n){const o=[];i.workspace.onDidChangeTextDocument((function({document:e,contentChanges:t,reason:n}){if(!r||0===t.length||n===i.TextDocumentChangeReason.Undo||n===i.TextDocumentChangeReason.Redo)return;if(e!==(i.window.activeTextEditor&&i.window.activeTextEditor.document))return;a&&a.dispose();const o=t[t.length-1],c=o.text[o.text.length-1];s.autoQuote&&0===o.rangeLength&&"="===c?u("autoQuote",e,o):!s.autoClose||0!==o.rangeLength||">"!==c&&"/"!==c||u("autoClose",e,o)}),null,o);let r=!1;const s={autoQuote:!1,autoClose:!1};let a;function c(){r=!1;const e=i.window.activeTextEditor;if(!e)return;const n=e.document;if(!t.useAutoInsert(n.languageId))return;const o=i.workspace.getConfiguration(void 0,n.uri);s.autoQuote=o.get("html.autoCreateQuotes")??!1,s.autoClose=o.get("html.autoClosingTags")??!1,r=s.autoQuote||s.autoClose}function u(t,o,r){const c=r.range.start,u=o.version;a=n.timer.setTimeout((()=>{const n=new i.Position(c.line,c.character+r.text.length);e(t,o,n).then((e=>{if(e&&s[t]){const t=i.window.activeTextEditor;if(t){const r=t.document;if(o===r&&r.version===u){const o=t.selections;o.length&&o.some((e=>e.active.isEqual(n)))?t.insertSnippet(new i.SnippetString(e),o.map((e=>e.active))):t.insertSnippet(new i.SnippetString(e),n)}}}})),a=void 0}),100)}return c(),i.window.onDidChangeActiveTextEditor(c,null,o),o.push({dispose:()=>{a?.dispose()}}),i.Disposable.from(...o)};const i=n(9496)},1438:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getCustomDataSource=function(e,t){let n=new Set,o=new Set;const s=new Set;a(s),c(n,o);const u=new i.EventEmitter;return t.push(i.extensions.onDidChange((e=>{const t=new Set,i=new Set;c(t,i),(r(t,n)||r(i,o))&&(n=t,o=i,u.fire())}))),t.push(i.workspace.onDidChangeConfiguration((e=>{e.affectsConfiguration("html.customData")&&(s.clear(),a(s),u.fire())}))),t.push(i.workspace.onDidChangeTextDocument((e=>{const t=e.document.uri.toString();(o.has(t)||s.has(t))&&u.fire()}))),{get uris(){return[...n].concat([...o],[...s])},get onDidChange(){return u.event},getContent(t){const o=i.Uri.parse(t);return n.has(t)?i.workspace.fs.readFile(o).then((t=>(new e.TextDecoder).decode(t))):i.workspace.openTextDocument(o).then((e=>e.getText()))}}};const i=n(9496),o=n(7237);function r(e,t){if(e.size!==t.size)return!0;for(const n of e)if(!t.has(n))return!0;return!1}function s(e){return/^(?<scheme>\w[\w\d+.-]*):/.test(e)}function a(e){const t=i.workspace.workspaceFolders,n=new Set;if(!t)return n;const r=(t,n)=>{if(Array.isArray(t))for(const i of t)"string"==typeof i&&(s(i)?e.add(i):e.add(o.Utils.resolvePath(n,i).toString()))};for(let e=0;e<t.length;e++){const n=t[e].uri,o=i.workspace.getConfiguration("html",n).inspect("customData");o&&(r(o.workspaceFolderValue,n),0===e&&(i.workspace.workspaceFile&&r(o.workspaceValue,i.workspace.workspaceFile),r(o.globalValue,n)))}return n}function c(e,t){for(const n of i.extensions.allAcrossExtensionHosts){const o=n.packageJSON?.contributes?.html?.customData;if(Array.isArray(o))for(const r of o)s(r)?t.add(r):e.add(i.Uri.joinPath(n.extensionUri,r).toString())}}},8890:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.languageServerDescription=void 0,t.startClient=async function(e,n,o){const r=i.window.createOutputChannel(t.languageServerDescription),s=(0,c.getLanguageParticipants)();e.subscriptions.push(s);let a=await m(s,n,r,o);const u="html.promptForLinkedEditing";if(void 0!==i.extensions.getExtension("formulahendry.auto-rename-tag")&&!1!==e.globalState.get(u)){const t=i.workspace.getConfiguration("editor",{languageId:"html"});if(!t.get("linkedEditing")&&!t.get("renameOnType")){const t=i.window.onDidChangeActiveTextEditor((async n=>{if(n&&s.hasLanguage(n.document.languageId)){e.globalState.update(u,!1),t.dispose();const n=i.l10n.t("Configure");await i.window.showInformationMessage(i.l10n.t("VS Code now has built-in support for auto-renaming tags. Do you want to enable it?"),n)===n&&i.commands.executeCommand("workbench.action.openSettings",p.linkedEditing)}}));e.subscriptions.push(t)}}let l;return s.onDidChange((()=>{l&&l.dispose(),l=o.timer.setTimeout((async()=>{if(a){r.appendLine("Extensions have changed, restarting HTML server..."),r.appendLine("");const e=a;a=void 0,await e.dispose(),a=await m(s,n,r,o)}}),2e3)})),{dispose:async()=>{l?.dispose(),await(a?.dispose()),r.dispose()}}};const i=n(9496),o=n(7053),r=n(3582),s=n(1438),a=n(6058),c=n(4253);var u,l,d,h,g,p;async function m(e,n,c,m){const f=[],v=e.documentSelector;let y;const C={documentSelector:v,synchronize:{configurationSection:["html","css","javascript","js/ts"]},initializationOptions:{embeddedLanguages:{css:!0,javascript:!0},handledSchemas:["file"],provideFormatter:!1,customCapabilities:{rangeFormatting:{editLimit:1e4}}},middleware:{provideCompletionItem(e,t,n,o,r){function s(e){const n=e.range;n instanceof i.Range&&n.end.isAfter(t)&&n.start.isBeforeOrEqual(t)&&(e.range={inserting:new i.Range(n.start,t),replacing:n})}function a(e){return e&&(Array.isArray(e)?e:e.items).forEach(s),e}const c=r(e,t,n,o);return(u=c)&&u.then?c.then(a):a(c);var u}}};C.outputChannel=c;const D=n("html",t.languageServerDescription,C);D.registerProposedFeatures(),await D.start(),f.push((0,r.serveFileSystemRequests)(D,m));const b=(0,s.getCustomDataSource)(m,f);D.sendNotification(u.type,b.uris),b.onDidChange((()=>{D.sendNotification(u.type,b.uris)}),void 0,f),f.push(D.onRequest(l.type,b.getContent));const R=(0,a.activateAutoInsertion)(((e,t,n)=>{const i={kind:e,textDocument:D.code2ProtocolConverter.asTextDocumentIdentifier(t),position:D.code2ProtocolConverter.asPosition(n)};return D.sendRequest(d.type,i)}),e,m);f.push(R);const w=D.onTelemetry((e=>{m.telemetry?.sendTelemetryEvent(e.key,e.data)}));function S(){const e=i.workspace.getConfiguration().get(p.formatEnable);!e&&y?(y.dispose(),y=void 0):e&&!y&&(y=i.languages.registerDocumentRangeFormattingEditProvider(v,{provideDocumentRangeFormattingEdits(e,t,n,r){const s=i.workspace.getConfiguration("files",e),a={trimTrailingWhitespace:s.get("trimTrailingWhitespace"),trimFinalNewlines:s.get("trimFinalNewlines"),insertFinalNewline:s.get("insertFinalNewline")},c={textDocument:D.code2ProtocolConverter.asTextDocumentIdentifier(e),range:D.code2ProtocolConverter.asRange(t),options:D.code2ProtocolConverter.asFormattingOptions(n,a)};return D.sendRequest(o.DocumentRangeFormattingRequest.type,c,r).then(D.protocol2CodeConverter.asTextEdits,(e=>(D.handleFailedRequest(o.DocumentRangeFormattingRequest.type,void 0,e,[]),Promise.resolve([]))))}}))}f.push(w),S(),f.push({dispose:()=>y&&y.dispose()}),f.push(i.workspace.onDidChangeConfiguration((e=>e.affectsConfiguration(p.formatEnable)&&S()))),D.sendRequest(g.type).then((e=>{if(e){const t={provideDocumentSemanticTokens(e){const t={textDocument:D.code2ProtocolConverter.asTextDocumentIdentifier(e)};return D.sendRequest(h.type,t).then((e=>e&&new i.SemanticTokens(new Uint32Array(e))))},provideDocumentRangeSemanticTokens(e,t){const n={textDocument:D.code2ProtocolConverter.asTextDocumentIdentifier(e),ranges:[D.code2ProtocolConverter.asRange(t)]};return D.sendRequest(h.type,n).then((e=>e&&new i.SemanticTokens(new Uint32Array(e))))}};f.push(i.languages.registerDocumentSemanticTokensProvider(v,t,new i.SemanticTokensLegend(e.types,e.modifiers)))}}));const T=/^(\s*)(<(!(-(-\s*(#\w*)?)?)?)?)?$/,_=/^(\s*)(<(h(t(m(l)?)?)?)?)?$/;return f.push(i.languages.registerCompletionItemProvider(v,{provideCompletionItems(e,t){const n=[],o=e.getText(new i.Range(new i.Position(t.line,0),t)),r=o.match(T);if(r){const e=new i.Range(new i.Position(t.line,r[1].length),t),o=new i.CompletionItem("#region",i.CompletionItemKind.Snippet);o.range=e,o.insertText=new i.SnippetString("\x3c!-- #region $1--\x3e"),o.documentation=i.l10n.t("Folding Region Start"),o.filterText=r[2],o.sortText="za",n.push(o);const s=new i.CompletionItem("#endregion",i.CompletionItemKind.Snippet);s.range=e,s.insertText=new i.SnippetString("\x3c!-- #endregion --\x3e"),s.documentation=i.l10n.t("Folding Region End"),s.filterText=r[2],s.sortText="zb",n.push(s)}const s=o.match(_);if(s&&e.getText(new i.Range(new i.Position(0,0),t)).match(_)){const e=new i.Range(new i.Position(t.line,s[1].length),t),o=new i.CompletionItem("HTML sample",i.CompletionItemKind.Snippet);o.range=e;const r=["<!DOCTYPE html>","<html>","<head>","\t<meta charset='utf-8'>","\t<meta http-equiv='X-UA-Compatible' content='IE=edge'>","\t<title>${1:Page Title}</title>","\t<meta name='viewport' content='width=device-width, initial-scale=1'>","\t<link rel='stylesheet' type='text/css' media='screen' href='${2:main.css}'>","\t<script src='${3:main.js}'><\/script>","</head>","<body>","\t$0","</body>","</html>"].join("\n");o.insertText=new i.SnippetString(r),o.documentation=i.l10n.t("Simple HTML5 starting point"),o.filterText=s[2],o.sortText="za",n.push(o)}return n}})),{dispose:async()=>{await D.stop(),f.forEach((e=>e.dispose())),y?.dispose()}}}!function(e){e.type=new o.NotificationType("html/customDataChanged")}(u||(u={})),function(e){e.type=new o.RequestType("html/customDataContent")}(l||(l={})),function(e){e.type=new o.RequestType("html/autoInsert")}(d||(d={})),function(e){e.type=new o.RequestType("html/semanticTokens")}(h||(h={})),function(e){e.type=new o.RequestType0("html/semanticTokenLegend")}(g||(g={})),function(e){e.linkedEditing="editor.linkedEditing",e.formatEnable="html.format.enable"}(p||(p={})),t.languageServerDescription=i.l10n.t("HTML Language Server")},4253:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getLanguageParticipants=function(){const e=new i.EventEmitter;let t=new Set,n=new Set;function r(){const e=t,r=n;t=new Set,t.add("html"),n=new Set,n.add("html");for(const e of i.extensions.allAcrossExtensionHosts){const i=e.packageJSON?.contributes?.htmlLanguageParticipants;if(Array.isArray(i))for(const e of i){const i=e.languageId;"string"==typeof i&&(t.add(i),!1!==e.autoInsert&&n.add(i))}}return!o(t,e)||!o(n,r)}r();const s=i.extensions.onDidChange((t=>{r()&&e.fire()}));return{onDidChange:e.event,get documentSelector(){return Array.from(t)},hasLanguage:e=>t.has(e),useAutoInsert:e=>n.has(e),dispose:()=>s.dispose()}};const i=n(9496);function o(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}},3582:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileType=t.FsReadDirRequest=t.FsStatRequest=void 0,t.serveFileSystemRequests=function(e,t){const n=[];return n.push(e.onRequest(s.type,(e=>{const n=i.Uri.parse(e);return"file"===n.scheme&&t.fileFs?t.fileFs.readDirectory(e):i.workspace.fs.readDirectory(n)}))),n.push(e.onRequest(r.type,(e=>{const n=i.Uri.parse(e);return"file"===n.scheme&&t.fileFs?t.fileFs.stat(e):i.workspace.fs.stat(n)}))),i.Disposable.from(...n)};const i=n(9496),o=n(7053);var r,s,a;!function(e){e.type=new o.RequestType("fs/stat")}(r||(t.FsStatRequest=r={})),function(e){e.type=new o.RequestType("fs/readDir")}(s||(t.FsReadDirRequest=s={})),function(e){e[e.Unknown=0]="Unknown",e[e.File=1]="File",e[e.Directory=2]="Directory",e[e.SymbolicLink=64]="SymbolicLink"}(a||(t.FileType=a={}))},9496:e=>{"use strict";e.exports=require("vscode")},1516:(e,t,n)=>{"use strict";var i,o,r,s,a,c,u,l,d,h,g,p,m,f,v,y,C,D,b,R,w,S,T,_,k,P,x,q,F,O,E,M,I,N,L,A,j,H,K,W,U,$,z,V,B,J,Q,X,G,Y,Z,ee,te,ne,ie,oe,re,se,ae,ce,ue,le,de,he,ge,pe,me,fe,ve,ye,Ce,De,be,Re,we,Se,Te,_e;n.r(t),n.d(t,{AnnotatedTextEdit:()=>T,ChangeAnnotation:()=>w,ChangeAnnotationIdentifier:()=>S,CodeAction:()=>re,CodeActionContext:()=>oe,CodeActionKind:()=>ne,CodeActionTriggerKind:()=>ie,CodeDescription:()=>C,CodeLens:()=>se,Color:()=>d,ColorInformation:()=>h,ColorPresentation:()=>g,Command:()=>b,CompletionItem:()=>U,CompletionItemKind:()=>L,CompletionItemLabelDetails:()=>W,CompletionItemTag:()=>j,CompletionList:()=>$,CreateFile:()=>k,DeleteFile:()=>x,Diagnostic:()=>D,DiagnosticRelatedInformation:()=>f,DiagnosticSeverity:()=>v,DiagnosticTag:()=>y,DocumentHighlight:()=>X,DocumentHighlightKind:()=>Q,DocumentLink:()=>ce,DocumentSymbol:()=>te,DocumentUri:()=>i,EOL:()=>qe,FoldingRange:()=>m,FoldingRangeKind:()=>p,FormattingOptions:()=>ae,Hover:()=>V,InlayHint:()=>Ce,InlayHintKind:()=>ve,InlayHintLabelPart:()=>ye,InlineCompletionContext:()=>Te,InlineCompletionItem:()=>be,InlineCompletionList:()=>Re,InlineCompletionTriggerKind:()=>we,InlineValueContext:()=>fe,InlineValueEvaluatableExpression:()=>me,InlineValueText:()=>ge,InlineValueVariableLookup:()=>pe,InsertReplaceEdit:()=>H,InsertTextFormat:()=>A,InsertTextMode:()=>K,Location:()=>u,LocationLink:()=>l,MarkedString:()=>z,MarkupContent:()=>N,MarkupKind:()=>I,OptionalVersionedTextDocumentIdentifier:()=>E,ParameterInformation:()=>B,Position:()=>a,Range:()=>c,RenameFile:()=>P,SelectedCompletionInfo:()=>Se,SelectionRange:()=>ue,SemanticTokenModifiers:()=>de,SemanticTokenTypes:()=>le,SemanticTokens:()=>he,SignatureInformation:()=>J,StringValue:()=>De,SymbolInformation:()=>Z,SymbolKind:()=>G,SymbolTag:()=>Y,TextDocument:()=>Fe,TextDocumentEdit:()=>_,TextDocumentIdentifier:()=>F,TextDocumentItem:()=>M,TextEdit:()=>R,URI:()=>o,VersionedTextDocumentIdentifier:()=>O,WorkspaceChange:()=>xe,WorkspaceEdit:()=>q,WorkspaceFolder:()=>_e,WorkspaceSymbol:()=>ee,integer:()=>r,uinteger:()=>s}),function(e){e.is=function(e){return"string"==typeof e}}(i||(i={})),function(e){e.is=function(e){return"string"==typeof e}}(o||(o={})),function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647,e.is=function(t){return"number"==typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}}(r||(r={})),function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647,e.is=function(t){return"number"==typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}}(s||(s={})),function(e){e.create=function(e,t){return e===Number.MAX_VALUE&&(e=s.MAX_VALUE),t===Number.MAX_VALUE&&(t=s.MAX_VALUE),{line:e,character:t}},e.is=function(e){let t=e;return Oe.objectLiteral(t)&&Oe.uinteger(t.line)&&Oe.uinteger(t.character)}}(a||(a={})),function(e){e.create=function(e,t,n,i){if(Oe.uinteger(e)&&Oe.uinteger(t)&&Oe.uinteger(n)&&Oe.uinteger(i))return{start:a.create(e,t),end:a.create(n,i)};if(a.is(e)&&a.is(t))return{start:e,end:t};throw new Error(`Range#create called with invalid arguments[${e}, ${t}, ${n}, ${i}]`)},e.is=function(e){let t=e;return Oe.objectLiteral(t)&&a.is(t.start)&&a.is(t.end)}}(c||(c={})),function(e){e.create=function(e,t){return{uri:e,range:t}},e.is=function(e){let t=e;return Oe.objectLiteral(t)&&c.is(t.range)&&(Oe.string(t.uri)||Oe.undefined(t.uri))}}(u||(u={})),function(e){e.create=function(e,t,n,i){return{targetUri:e,targetRange:t,targetSelectionRange:n,originSelectionRange:i}},e.is=function(e){let t=e;return Oe.objectLiteral(t)&&c.is(t.targetRange)&&Oe.string(t.targetUri)&&c.is(t.targetSelectionRange)&&(c.is(t.originSelectionRange)||Oe.undefined(t.originSelectionRange))}}(l||(l={})),function(e){e.create=function(e,t,n,i){return{red:e,green:t,blue:n,alpha:i}},e.is=function(e){const t=e;return Oe.objectLiteral(t)&&Oe.numberRange(t.red,0,1)&&Oe.numberRange(t.green,0,1)&&Oe.numberRange(t.blue,0,1)&&Oe.numberRange(t.alpha,0,1)}}(d||(d={})),function(e){e.create=function(e,t){return{range:e,color:t}},e.is=function(e){const t=e;return Oe.objectLiteral(t)&&c.is(t.range)&&d.is(t.color)}}(h||(h={})),function(e){e.create=function(e,t,n){return{label:e,textEdit:t,additionalTextEdits:n}},e.is=function(e){const t=e;return Oe.objectLiteral(t)&&Oe.string(t.label)&&(Oe.undefined(t.textEdit)||R.is(t))&&(Oe.undefined(t.additionalTextEdits)||Oe.typedArray(t.additionalTextEdits,R.is))}}(g||(g={})),function(e){e.Comment="comment",e.Imports="imports",e.Region="region"}(p||(p={})),function(e){e.create=function(e,t,n,i,o,r){const s={startLine:e,endLine:t};return Oe.defined(n)&&(s.startCharacter=n),Oe.defined(i)&&(s.endCharacter=i),Oe.defined(o)&&(s.kind=o),Oe.defined(r)&&(s.collapsedText=r),s},e.is=function(e){const t=e;return Oe.objectLiteral(t)&&Oe.uinteger(t.startLine)&&Oe.uinteger(t.startLine)&&(Oe.undefined(t.startCharacter)||Oe.uinteger(t.startCharacter))&&(Oe.undefined(t.endCharacter)||Oe.uinteger(t.endCharacter))&&(Oe.undefined(t.kind)||Oe.string(t.kind))}}(m||(m={})),function(e){e.create=function(e,t){return{location:e,message:t}},e.is=function(e){let t=e;return Oe.defined(t)&&u.is(t.location)&&Oe.string(t.message)}}(f||(f={})),function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4}(v||(v={})),function(e){e.Unnecessary=1,e.Deprecated=2}(y||(y={})),function(e){e.is=function(e){const t=e;return Oe.objectLiteral(t)&&Oe.string(t.href)}}(C||(C={})),function(e){e.create=function(e,t,n,i,o,r){let s={range:e,message:t};return Oe.defined(n)&&(s.severity=n),Oe.defined(i)&&(s.code=i),Oe.defined(o)&&(s.source=o),Oe.defined(r)&&(s.relatedInformation=r),s},e.is=function(e){var t;let n=e;return Oe.defined(n)&&c.is(n.range)&&Oe.string(n.message)&&(Oe.number(n.severity)||Oe.undefined(n.severity))&&(Oe.integer(n.code)||Oe.string(n.code)||Oe.undefined(n.code))&&(Oe.undefined(n.codeDescription)||Oe.string(null===(t=n.codeDescription)||void 0===t?void 0:t.href))&&(Oe.string(n.source)||Oe.undefined(n.source))&&(Oe.undefined(n.relatedInformation)||Oe.typedArray(n.relatedInformation,f.is))}}(D||(D={})),function(e){e.create=function(e,t,...n){let i={title:e,command:t};return Oe.defined(n)&&n.length>0&&(i.arguments=n),i},e.is=function(e){let t=e;return Oe.defined(t)&&Oe.string(t.title)&&Oe.string(t.command)}}(b||(b={})),function(e){e.replace=function(e,t){return{range:e,newText:t}},e.insert=function(e,t){return{range:{start:e,end:e},newText:t}},e.del=function(e){return{range:e,newText:""}},e.is=function(e){const t=e;return Oe.objectLiteral(t)&&Oe.string(t.newText)&&c.is(t.range)}}(R||(R={})),function(e){e.create=function(e,t,n){const i={label:e};return void 0!==t&&(i.needsConfirmation=t),void 0!==n&&(i.description=n),i},e.is=function(e){const t=e;return Oe.objectLiteral(t)&&Oe.string(t.label)&&(Oe.boolean(t.needsConfirmation)||void 0===t.needsConfirmation)&&(Oe.string(t.description)||void 0===t.description)}}(w||(w={})),function(e){e.is=function(e){const t=e;return Oe.string(t)}}(S||(S={})),function(e){e.replace=function(e,t,n){return{range:e,newText:t,annotationId:n}},e.insert=function(e,t,n){return{range:{start:e,end:e},newText:t,annotationId:n}},e.del=function(e,t){return{range:e,newText:"",annotationId:t}},e.is=function(e){const t=e;return R.is(t)&&(w.is(t.annotationId)||S.is(t.annotationId))}}(T||(T={})),function(e){e.create=function(e,t){return{textDocument:e,edits:t}},e.is=function(e){let t=e;return Oe.defined(t)&&E.is(t.textDocument)&&Array.isArray(t.edits)}}(_||(_={})),function(e){e.create=function(e,t,n){let i={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(i.options=t),void 0!==n&&(i.annotationId=n),i},e.is=function(e){let t=e;return t&&"create"===t.kind&&Oe.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||Oe.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Oe.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||S.is(t.annotationId))}}(k||(k={})),function(e){e.create=function(e,t,n,i){let o={kind:"rename",oldUri:e,newUri:t};return void 0===n||void 0===n.overwrite&&void 0===n.ignoreIfExists||(o.options=n),void 0!==i&&(o.annotationId=i),o},e.is=function(e){let t=e;return t&&"rename"===t.kind&&Oe.string(t.oldUri)&&Oe.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||Oe.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Oe.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||S.is(t.annotationId))}}(P||(P={})),function(e){e.create=function(e,t,n){let i={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(i.options=t),void 0!==n&&(i.annotationId=n),i},e.is=function(e){let t=e;return t&&"delete"===t.kind&&Oe.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||Oe.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||Oe.boolean(t.options.ignoreIfNotExists)))&&(void 0===t.annotationId||S.is(t.annotationId))}}(x||(x={})),function(e){e.is=function(e){let t=e;return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every((e=>Oe.string(e.kind)?k.is(e)||P.is(e)||x.is(e):_.is(e))))}}(q||(q={}));class ke{constructor(e,t){this.edits=e,this.changeAnnotations=t}insert(e,t,n){let i,o;if(void 0===n?i=R.insert(e,t):S.is(n)?(o=n,i=T.insert(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),o=this.changeAnnotations.manage(n),i=T.insert(e,t,o)),this.edits.push(i),void 0!==o)return o}replace(e,t,n){let i,o;if(void 0===n?i=R.replace(e,t):S.is(n)?(o=n,i=T.replace(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),o=this.changeAnnotations.manage(n),i=T.replace(e,t,o)),this.edits.push(i),void 0!==o)return o}delete(e,t){let n,i;if(void 0===t?n=R.del(e):S.is(t)?(i=t,n=T.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(t),n=T.del(e,i)),this.edits.push(n),void 0!==i)return i}add(e){this.edits.push(e)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(e){if(void 0===e)throw new Error("Text edit change is not configured to manage change annotations.")}}class Pe{constructor(e){this._annotations=void 0===e?Object.create(null):e,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(e,t){let n;if(S.is(e)?n=e:(n=this.nextId(),t=e),void 0!==this._annotations[n])throw new Error(`Id ${n} is already in use.`);if(void 0===t)throw new Error(`No annotation provided for id ${n}`);return this._annotations[n]=t,this._size++,n}nextId(){return this._counter++,this._counter.toString()}}class xe{constructor(e){this._textEditChanges=Object.create(null),void 0!==e?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new Pe(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach((e=>{if(_.is(e)){const t=new ke(e.edits,this._changeAnnotations);this._textEditChanges[e.textDocument.uri]=t}}))):e.changes&&Object.keys(e.changes).forEach((t=>{const n=new ke(e.changes[t]);this._textEditChanges[t]=n}))):this._workspaceEdit={}}get edit(){return this.initDocumentChanges(),void 0!==this._changeAnnotations&&(0===this._changeAnnotations.size?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(e){if(E.is(e)){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");const t={uri:e.uri,version:e.version};let n=this._textEditChanges[t.uri];if(!n){const e=[],i={textDocument:t,edits:e};this._workspaceEdit.documentChanges.push(i),n=new ke(e,this._changeAnnotations),this._textEditChanges[t.uri]=n}return n}{if(this.initChanges(),void 0===this._workspaceEdit.changes)throw new Error("Workspace edit is not configured for normal text edit changes.");let t=this._textEditChanges[e];if(!t){let n=[];this._workspaceEdit.changes[e]=n,t=new ke(n),this._textEditChanges[e]=t}return t}}initDocumentChanges(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._changeAnnotations=new Pe,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._workspaceEdit.changes=Object.create(null))}createFile(e,t,n){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");let i,o,r;if(w.is(t)||S.is(t)?i=t:n=t,void 0===i?o=k.create(e,n):(r=S.is(i)?i:this._changeAnnotations.manage(i),o=k.create(e,n,r)),this._workspaceEdit.documentChanges.push(o),void 0!==r)return r}renameFile(e,t,n,i){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");let o,r,s;if(w.is(n)||S.is(n)?o=n:i=n,void 0===o?r=P.create(e,t,i):(s=S.is(o)?o:this._changeAnnotations.manage(o),r=P.create(e,t,i,s)),this._workspaceEdit.documentChanges.push(r),void 0!==s)return s}deleteFile(e,t,n){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");let i,o,r;if(w.is(t)||S.is(t)?i=t:n=t,void 0===i?o=x.create(e,n):(r=S.is(i)?i:this._changeAnnotations.manage(i),o=x.create(e,n,r)),this._workspaceEdit.documentChanges.push(o),void 0!==r)return r}}!function(e){e.create=function(e){return{uri:e}},e.is=function(e){let t=e;return Oe.defined(t)&&Oe.string(t.uri)}}(F||(F={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){let t=e;return Oe.defined(t)&&Oe.string(t.uri)&&Oe.integer(t.version)}}(O||(O={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){let t=e;return Oe.defined(t)&&Oe.string(t.uri)&&(null===t.version||Oe.integer(t.version))}}(E||(E={})),function(e){e.create=function(e,t,n,i){return{uri:e,languageId:t,version:n,text:i}},e.is=function(e){let t=e;return Oe.defined(t)&&Oe.string(t.uri)&&Oe.string(t.languageId)&&Oe.integer(t.version)&&Oe.string(t.text)}}(M||(M={})),function(e){e.PlainText="plaintext",e.Markdown="markdown",e.is=function(t){const n=t;return n===e.PlainText||n===e.Markdown}}(I||(I={})),function(e){e.is=function(e){const t=e;return Oe.objectLiteral(e)&&I.is(t.kind)&&Oe.string(t.value)}}(N||(N={})),function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25}(L||(L={})),function(e){e.PlainText=1,e.Snippet=2}(A||(A={})),function(e){e.Deprecated=1}(j||(j={})),function(e){e.create=function(e,t,n){return{newText:e,insert:t,replace:n}},e.is=function(e){const t=e;return t&&Oe.string(t.newText)&&c.is(t.insert)&&c.is(t.replace)}}(H||(H={})),function(e){e.asIs=1,e.adjustIndentation=2}(K||(K={})),function(e){e.is=function(e){const t=e;return t&&(Oe.string(t.detail)||void 0===t.detail)&&(Oe.string(t.description)||void 0===t.description)}}(W||(W={})),function(e){e.create=function(e){return{label:e}}}(U||(U={})),function(e){e.create=function(e,t){return{items:e||[],isIncomplete:!!t}}}($||($={})),function(e){e.fromPlainText=function(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")},e.is=function(e){const t=e;return Oe.string(t)||Oe.objectLiteral(t)&&Oe.string(t.language)&&Oe.string(t.value)}}(z||(z={})),function(e){e.is=function(e){let t=e;return!!t&&Oe.objectLiteral(t)&&(N.is(t.contents)||z.is(t.contents)||Oe.typedArray(t.contents,z.is))&&(void 0===e.range||c.is(e.range))}}(V||(V={})),function(e){e.create=function(e,t){return t?{label:e,documentation:t}:{label:e}}}(B||(B={})),function(e){e.create=function(e,t,...n){let i={label:e};return Oe.defined(t)&&(i.documentation=t),Oe.defined(n)?i.parameters=n:i.parameters=[],i}}(J||(J={})),function(e){e.Text=1,e.Read=2,e.Write=3}(Q||(Q={})),function(e){e.create=function(e,t){let n={range:e};return Oe.number(t)&&(n.kind=t),n}}(X||(X={})),function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26}(G||(G={})),function(e){e.Deprecated=1}(Y||(Y={})),function(e){e.create=function(e,t,n,i,o){let r={name:e,kind:t,location:{uri:i,range:n}};return o&&(r.containerName=o),r}}(Z||(Z={})),function(e){e.create=function(e,t,n,i){return void 0!==i?{name:e,kind:t,location:{uri:n,range:i}}:{name:e,kind:t,location:{uri:n}}}}(ee||(ee={})),function(e){e.create=function(e,t,n,i,o,r){let s={name:e,detail:t,kind:n,range:i,selectionRange:o};return void 0!==r&&(s.children=r),s},e.is=function(e){let t=e;return t&&Oe.string(t.name)&&Oe.number(t.kind)&&c.is(t.range)&&c.is(t.selectionRange)&&(void 0===t.detail||Oe.string(t.detail))&&(void 0===t.deprecated||Oe.boolean(t.deprecated))&&(void 0===t.children||Array.isArray(t.children))&&(void 0===t.tags||Array.isArray(t.tags))}}(te||(te={})),function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"}(ne||(ne={})),function(e){e.Invoked=1,e.Automatic=2}(ie||(ie={})),function(e){e.create=function(e,t,n){let i={diagnostics:e};return null!=t&&(i.only=t),null!=n&&(i.triggerKind=n),i},e.is=function(e){let t=e;return Oe.defined(t)&&Oe.typedArray(t.diagnostics,D.is)&&(void 0===t.only||Oe.typedArray(t.only,Oe.string))&&(void 0===t.triggerKind||t.triggerKind===ie.Invoked||t.triggerKind===ie.Automatic)}}(oe||(oe={})),function(e){e.create=function(e,t,n){let i={title:e},o=!0;return"string"==typeof t?(o=!1,i.kind=t):b.is(t)?i.command=t:i.edit=t,o&&void 0!==n&&(i.kind=n),i},e.is=function(e){let t=e;return t&&Oe.string(t.title)&&(void 0===t.diagnostics||Oe.typedArray(t.diagnostics,D.is))&&(void 0===t.kind||Oe.string(t.kind))&&(void 0!==t.edit||void 0!==t.command)&&(void 0===t.command||b.is(t.command))&&(void 0===t.isPreferred||Oe.boolean(t.isPreferred))&&(void 0===t.edit||q.is(t.edit))}}(re||(re={})),function(e){e.create=function(e,t){let n={range:e};return Oe.defined(t)&&(n.data=t),n},e.is=function(e){let t=e;return Oe.defined(t)&&c.is(t.range)&&(Oe.undefined(t.command)||b.is(t.command))}}(se||(se={})),function(e){e.create=function(e,t){return{tabSize:e,insertSpaces:t}},e.is=function(e){let t=e;return Oe.defined(t)&&Oe.uinteger(t.tabSize)&&Oe.boolean(t.insertSpaces)}}(ae||(ae={})),function(e){e.create=function(e,t,n){return{range:e,target:t,data:n}},e.is=function(e){let t=e;return Oe.defined(t)&&c.is(t.range)&&(Oe.undefined(t.target)||Oe.string(t.target))}}(ce||(ce={})),function(e){e.create=function(e,t){return{range:e,parent:t}},e.is=function(t){let n=t;return Oe.objectLiteral(n)&&c.is(n.range)&&(void 0===n.parent||e.is(n.parent))}}(ue||(ue={})),function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator"}(le||(le={})),function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"}(de||(de={})),function(e){e.is=function(e){const t=e;return Oe.objectLiteral(t)&&(void 0===t.resultId||"string"==typeof t.resultId)&&Array.isArray(t.data)&&(0===t.data.length||"number"==typeof t.data[0])}}(he||(he={})),function(e){e.create=function(e,t){return{range:e,text:t}},e.is=function(e){const t=e;return null!=t&&c.is(t.range)&&Oe.string(t.text)}}(ge||(ge={})),function(e){e.create=function(e,t,n){return{range:e,variableName:t,caseSensitiveLookup:n}},e.is=function(e){const t=e;return null!=t&&c.is(t.range)&&Oe.boolean(t.caseSensitiveLookup)&&(Oe.string(t.variableName)||void 0===t.variableName)}}(pe||(pe={})),function(e){e.create=function(e,t){return{range:e,expression:t}},e.is=function(e){const t=e;return null!=t&&c.is(t.range)&&(Oe.string(t.expression)||void 0===t.expression)}}(me||(me={})),function(e){e.create=function(e,t){return{frameId:e,stoppedLocation:t}},e.is=function(e){const t=e;return Oe.defined(t)&&c.is(e.stoppedLocation)}}(fe||(fe={})),function(e){e.Type=1,e.Parameter=2,e.is=function(e){return 1===e||2===e}}(ve||(ve={})),function(e){e.create=function(e){return{value:e}},e.is=function(e){const t=e;return Oe.objectLiteral(t)&&(void 0===t.tooltip||Oe.string(t.tooltip)||N.is(t.tooltip))&&(void 0===t.location||u.is(t.location))&&(void 0===t.command||b.is(t.command))}}(ye||(ye={})),function(e){e.create=function(e,t,n){const i={position:e,label:t};return void 0!==n&&(i.kind=n),i},e.is=function(e){const t=e;return Oe.objectLiteral(t)&&a.is(t.position)&&(Oe.string(t.label)||Oe.typedArray(t.label,ye.is))&&(void 0===t.kind||ve.is(t.kind))&&void 0===t.textEdits||Oe.typedArray(t.textEdits,R.is)&&(void 0===t.tooltip||Oe.string(t.tooltip)||N.is(t.tooltip))&&(void 0===t.paddingLeft||Oe.boolean(t.paddingLeft))&&(void 0===t.paddingRight||Oe.boolean(t.paddingRight))}}(Ce||(Ce={})),function(e){e.createSnippet=function(e){return{kind:"snippet",value:e}}}(De||(De={})),function(e){e.create=function(e,t,n,i){return{insertText:e,filterText:t,range:n,command:i}}}(be||(be={})),function(e){e.create=function(e){return{items:e}}}(Re||(Re={})),function(e){e.Invoked=0,e.Automatic=1}(we||(we={})),function(e){e.create=function(e,t){return{range:e,text:t}}}(Se||(Se={})),function(e){e.create=function(e,t){return{triggerKind:e,selectedCompletionInfo:t}}}(Te||(Te={})),function(e){e.is=function(e){const t=e;return Oe.objectLiteral(t)&&o.is(t.uri)&&Oe.string(t.name)}}(_e||(_e={}));const qe=["\n","\r\n","\r"];var Fe,Oe;!function(e){function t(e,n){if(e.length<=1)return e;const i=e.length/2|0,o=e.slice(0,i),r=e.slice(i);t(o,n),t(r,n);let s=0,a=0,c=0;for(;s<o.length&&a<r.length;){let t=n(o[s],r[a]);e[c++]=t<=0?o[s++]:r[a++]}for(;s<o.length;)e[c++]=o[s++];for(;a<r.length;)e[c++]=r[a++];return e}e.create=function(e,t,n,i){return new Ee(e,t,n,i)},e.is=function(e){let t=e;return!!(Oe.defined(t)&&Oe.string(t.uri)&&(Oe.undefined(t.languageId)||Oe.string(t.languageId))&&Oe.uinteger(t.lineCount)&&Oe.func(t.getText)&&Oe.func(t.positionAt)&&Oe.func(t.offsetAt))},e.applyEdits=function(e,n){let i=e.getText(),o=t(n,((e,t)=>{let n=e.range.start.line-t.range.start.line;return 0===n?e.range.start.character-t.range.start.character:n})),r=i.length;for(let t=o.length-1;t>=0;t--){let n=o[t],s=e.offsetAt(n.range.start),a=e.offsetAt(n.range.end);if(!(a<=r))throw new Error("Overlapping edit");i=i.substring(0,s)+n.newText+i.substring(a,i.length),r=s}return i}}(Fe||(Fe={}));class Ee{constructor(e,t,n,i){this._uri=e,this._languageId=t,this._version=n,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content}update(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0}getLineOffsets(){if(void 0===this._lineOffsets){let e=[],t=this._content,n=!0;for(let i=0;i<t.length;i++){n&&(e.push(i),n=!1);let o=t.charAt(i);n="\r"===o||"\n"===o,"\r"===o&&i+1<t.length&&"\n"===t.charAt(i+1)&&i++}n&&t.length>0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),n=0,i=t.length;if(0===i)return a.create(0,e);for(;n<i;){let o=Math.floor((n+i)/2);t[o]>e?i=o:n=o+1}let o=n-1;return a.create(o,e-t[o])}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let n=t[e.line],i=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(n+e.character,i),n)}get lineCount(){return this.getLineOffsets().length}}!function(e){const t=Object.prototype.toString;e.defined=function(e){return void 0!==e},e.undefined=function(e){return void 0===e},e.boolean=function(e){return!0===e||!1===e},e.string=function(e){return"[object String]"===t.call(e)},e.number=function(e){return"[object Number]"===t.call(e)},e.numberRange=function(e,n,i){return"[object Number]"===t.call(e)&&n<=e&&e<=i},e.integer=function(e){return"[object Number]"===t.call(e)&&-2147483648<=e&&e<=2147483647},e.uinteger=function(e){return"[object Number]"===t.call(e)&&0<=e&&e<=2147483647},e.func=function(e){return"[object Function]"===t.call(e)},e.objectLiteral=function(e){return null!==e&&"object"==typeof e},e.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)}}(Oe||(Oe={}))}},t={};function n(i){var o=t[i];if(void 0!==o)return o.exports;var r=t[i]={exports:{}};return e[i].call(r.exports,r,r.exports,n),r.exports}n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};(()=>{"use strict";var e=i;Object.defineProperty(e,"__esModule",{value:!0}),e.activate=async function(e){const n=t.Uri.joinPath(e.extensionUri,"server/dist/browser/htmlServerMain.js");try{const i=new Worker(n.toString());i.postMessage({i10lLocation:t.l10n.uri?.toString(!0)??""});const a=(e,t,n)=>new r.LanguageClient(e,t,n,i),c={setTimeout(e,t,...n){const i=setTimeout(e,t,...n);return{dispose:()=>clearTimeout(i)}}};s=await(0,o.startClient)(e,a,{TextDecoder,timer:c})}catch(e){console.log(e)}},e.deactivate=async function(){s&&(await s.dispose(),s=void 0)};const t=n(9496),o=n(8890),r=n(4970);let s})();var o=exports;for(var r in i)o[r]=i[r];i.__esModule&&Object.defineProperty(o,"__esModule",{value:!0})})();
|
|
2
2
|
//# sourceMappingURL=https://ticino.blob.core.windows.net/sourcemaps/undefined/extensions/html-language-features/client/dist/browser/htmlClientMain.js.map
|