var df=Object.create,vn=Object.defineProperty,hf=Object.getPrototypeOf,pf=Object.prototype.hasOwnProperty,gf=Object.getOwnPropertyNames,mf=Object.getOwnPropertyDescriptor;var Ys=e=>vn(e,"__esModule",{value:!0});var W=(e,t)=>()=>(t||(t={exports:{}},e(t.exports,t)),t.exports),vf=(e,t)=>{Ys(e);for(var r in t)vn(e,r,{get:t[r],enumerable:!0})},yf=(e,t,r)=>{if(Ys(e),t&&typeof t=="object"||typeof t=="function")for(let n of gf(t))!pf.call(e,n)&&n!=="default"&&vn(e,n,{get:()=>t[n],enumerable:!(r=mf(t,n))||r.enumerable});return e},Ke=e=>e&&e.__esModule?e:yf(vn(e!=null?df(hf(e)):{},"default",{value:e,enumerable:!0}),e);var yn=W(et=>{"use strict";Object.defineProperty(et,"__esModule",{value:!0});function bf(e){return e===!0||e===!1}et.boolean=bf;function Zs(e){return typeof e=="string"||e instanceof String}et.string=Zs;function wf(e){return typeof e=="number"||e instanceof Number}et.number=wf;function Cf(e){return e instanceof Error}et.error=Cf;function Qs(e){return typeof e=="function"}et.func=Qs;function Ks(e){return Array.isArray(e)}et.array=Ks;function xf(e){return Ks(e)&&e.every(t=>Zs(t))}et.stringArray=xf;function Sf(e,t){return Array.isArray(e)&&e.every(t)}et.typedArray=Sf;function Tf(e){return e&&Qs(e.then)}et.thenable=Tf});var vt=W(bi=>{"use strict";Object.defineProperty(bi,"__esModule",{value:!0});var wi;function Ci(){if(wi===void 0)throw new Error("No runtime abstraction layer installed");return wi}(function(e){function t(r){if(r===void 0)throw new Error("No runtime abstraction layer provided");wi=r}e.install=t})(Ci||(Ci={}));bi.default=Ci});var xi=W(bn=>{"use strict";Object.defineProperty(bn,"__esModule",{value:!0});var kf;(function(e){function t(r){return{dispose:r}}e.create=t})(kf=bn.Disposable||(bn.Disposable={}))});var sa=W(Si=>{"use strict";Object.defineProperty(Si,"__esModule",{value:!0});var _f=vt(),zt=xi(),Pf=require("util"),Ti=8192,ea=Buffer.from("\r","ascii")[0],ta=Buffer.from(` `,"ascii")[0],Rf=`\r `,ra=class{constructor(t="utf-8"){this._encoding=t,this.index=0,this.buffer=Buffer.allocUnsafe(Ti)}get encoding(){return this._encoding}append(t){let r;if(typeof t=="string"?r=Buffer.from(t,this._encoding):r=t,this.buffer.length-this.index>=r.length)this.buffer.set(r,this.index);else{var n=(Math.ceil((this.index+r.length)/Ti)+1)*Ti;this.index===0?(this.buffer=Buffer.allocUnsafe(n),this.buffer.set(r)):this.buffer=Buffer.concat([this.buffer.slice(0,this.index),r],n)}this.index+=r.length}tryReadHeaders(){let t=0;for(;t+3=this.index)return;let r=new Map;this.buffer.toString("ascii",0,t).split(Rf).forEach(o=>{let s=o.indexOf(":");if(s===-1)throw new Error("Message header must separate key and value using :");let u=o.substr(0,s),l=o.substr(s+1).trim();r.set(u,l)});let i=t+4;return this.buffer=this.buffer.slice(i),this.index=this.index-i,r}tryReadBody(t){if(this.indexthis.stream.off("close",t))}onError(t){return this.stream.on("error",t),zt.Disposable.create(()=>this.stream.off("error",t))}onEnd(t){return this.stream.on("end",t),zt.Disposable.create(()=>this.stream.off("end",t))}onData(t){return this.stream.on("data",t),zt.Disposable.create(()=>this.stream.off("data",t))}},ia=class{constructor(t){this.stream=t}onClose(t){return this.stream.on("close",t),zt.Disposable.create(()=>this.stream.off("close",t))}onError(t){return this.stream.on("error",t),zt.Disposable.create(()=>this.stream.off("error",t))}onEnd(t){return this.stream.on("end",t),zt.Disposable.create(()=>this.stream.off("end",t))}write(t,r){return new Promise((n,i)=>{let o=s=>{s==null?n():i(s)};typeof t=="string"?this.stream.write(t,r,o):this.stream.write(t,o)})}end(){this.stream.end()}},oa=Object.freeze({messageBuffer:Object.freeze({create:e=>new ra(e)}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:(e,t)=>Promise.resolve(Buffer.from(JSON.stringify(e,void 0,0),t.charset))}),decoder:Object.freeze({name:"application/json",decode:(e,t)=>e instanceof Buffer?Promise.resolve(JSON.parse(e.toString(t.charset))):Promise.resolve(JSON.parse(new Pf.TextDecoder(t.charset).decode(e)))})}),stream:Object.freeze({asReadableStream:e=>new na(e),asWritableStream:e=>new ia(e)}),console,timer:Object.freeze({setTimeout(e,t,...r){return setTimeout(e,t,...r)},clearTimeout(e){clearTimeout(e)},setImmediate(e,...t){return setImmediate(e,...t)},clearImmediate(e){clearImmediate(e)}})});function ki(){return oa}(function(e){function t(){_f.default.install(oa)}e.install=t})(ki||(ki={}));Si.default=ki});var ar=W(yt=>{"use strict";Object.defineProperty(yt,"__esModule",{value:!0});function Ef(e){return e===!0||e===!1}yt.boolean=Ef;function aa(e){return typeof e=="string"||e instanceof String}yt.string=aa;function Of(e){return typeof e=="number"||e instanceof Number}yt.number=Of;function Nf(e){return e instanceof Error}yt.error=Nf;function Ff(e){return typeof e=="function"}yt.func=Ff;function ua(e){return Array.isArray(e)}yt.array=ua;function qf(e){return ua(e)&&e.every(t=>aa(t))}yt.stringArray=qf});var _i=W(te=>{"use strict";Object.defineProperty(te,"__esModule",{value:!0});var Bt=ar(),ca;(function(e){e.ParseError=-32700,e.InvalidRequest=-32600,e.MethodNotFound=-32601,e.InvalidParams=-32602,e.InternalError=-32603,e.serverErrorStart=-32099,e.serverErrorEnd=-32e3,e.ServerNotInitialized=-32002,e.UnknownErrorCode=-32001,e.RequestCancelled=-32800,e.ContentModified=-32801,e.MessageWriteError=1,e.MessageReadError=2})(ca=te.ErrorCodes||(te.ErrorCodes={}));var wn=class extends Error{constructor(t,r,n){super(r);this.code=Bt.number(t)?t:ca.UnknownErrorCode,this.data=n,Object.setPrototypeOf(this,wn.prototype)}toJson(){return{code:this.code,message:this.message,data:this.data}}};te.ResponseError=wn;var ae=class{constructor(t,r){this._method=t,this._numberOfParams=r}get method(){return this._method}get numberOfParams(){return this._numberOfParams}};te.AbstractMessageSignature=ae;var la=class extends ae{constructor(t){super(t,0)}};te.RequestType0=la;var fa=class extends ae{constructor(t){super(t,1)}};te.RequestType=fa;var da=class extends ae{constructor(t){super(t,1)}};te.RequestType1=da;var ha=class extends ae{constructor(t){super(t,2)}};te.RequestType2=ha;var pa=class extends ae{constructor(t){super(t,3)}};te.RequestType3=pa;var ga=class extends ae{constructor(t){super(t,4)}};te.RequestType4=ga;var ma=class extends ae{constructor(t){super(t,5)}};te.RequestType5=ma;var va=class extends ae{constructor(t){super(t,6)}};te.RequestType6=va;var ya=class extends ae{constructor(t){super(t,7)}};te.RequestType7=ya;var ba=class extends ae{constructor(t){super(t,8)}};te.RequestType8=ba;var wa=class extends ae{constructor(t){super(t,9)}};te.RequestType9=wa;var Ca=class extends ae{constructor(t){super(t,1);this._=void 0}};te.NotificationType=Ca;var xa=class extends ae{constructor(t){super(t,0)}};te.NotificationType0=xa;var Sa=class extends ae{constructor(t){super(t,1)}};te.NotificationType1=Sa;var Ta=class extends ae{constructor(t){super(t,2)}};te.NotificationType2=Ta;var ka=class extends ae{constructor(t){super(t,3)}};te.NotificationType3=ka;var _a=class extends ae{constructor(t){super(t,4)}};te.NotificationType4=_a;var Pa=class extends ae{constructor(t){super(t,5)}};te.NotificationType5=Pa;var Ra=class extends ae{constructor(t){super(t,6)}};te.NotificationType6=Ra;var Ea=class extends ae{constructor(t){super(t,7)}};te.NotificationType7=Ea;var Oa=class extends ae{constructor(t){super(t,8)}};te.NotificationType8=Oa;var Na=class extends ae{constructor(t){super(t,9)}};te.NotificationType9=Na;function Af(e){let t=e;return t&&Bt.string(t.method)&&(Bt.string(t.id)||Bt.number(t.id))}te.isRequestMessage=Af;function jf(e){let t=e;return t&&Bt.string(t.method)&&e.id===void 0}te.isNotificationMessage=jf;function Df(e){let t=e;return t&&(t.result!==void 0||!!t.error)&&(Bt.string(t.id)||Bt.number(t.id)||t.id===null)}te.isResponseMessage=Df});var ur=W(Wr=>{"use strict";Object.defineProperty(Wr,"__esModule",{value:!0});var Mf=vt(),If;(function(e){let t={dispose(){}};e.None=function(){return t}})(If=Wr.Event||(Wr.Event={}));var Fa=class{add(t,r=null,n){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(t),this._contexts.push(r),Array.isArray(n)&&n.push({dispose:()=>this.remove(t,r)})}remove(t,r=null){if(!this._callbacks)return;let n=!1;for(let i=0,o=this._callbacks.length;i{this._callbacks||(this._callbacks=new Fa),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(t,r);let i={dispose:()=>{!this._callbacks||(this._callbacks.remove(t,r),i.dispose=$r._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(n)&&n.push(i),i}),this._event}fire(t){this._callbacks&&this._callbacks.invoke.call(this._callbacks,t)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}};Wr.Emitter=$r;$r._noop=function(){}});var Oi=W(Vr=>{"use strict";Object.defineProperty(Vr,"__esModule",{value:!0});var qa=vt(),Lf=ar(),Pi=ur(),Ri;(function(e){e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:Pi.Event.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:Pi.Event.None});function t(r){let n=r;return n&&(n===e.None||n===e.Cancelled||Lf.boolean(n.isCancellationRequested)&&!!n.onCancellationRequested)}e.is=t})(Ri=Vr.CancellationToken||(Vr.CancellationToken={}));var Wf=Object.freeze(function(e,t){let r=qa.default().timer.setTimeout(e.bind(t),0);return{dispose(){qa.default().timer.clearTimeout(r)}}}),Ei=class{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?Wf:(this._emitter||(this._emitter=new Pi.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}},Aa=class{get token(){return this._token||(this._token=new Ei),this._token}cancel(){this._token?this._token.cancel():this._token=Ri.Cancelled}dispose(){this._token?this._token instanceof Ei&&this._token.dispose():this._token=Ri.None}};Vr.CancellationTokenSource=Aa});var Da=W(cr=>{"use strict";Object.defineProperty(cr,"__esModule",{value:!0});var Cn=vt(),lr=ar(),Ni=ur(),$f;(function(e){function t(r){let n=r;return n&&lr.func(n.listen)&&lr.func(n.dispose)&&lr.func(n.onError)&&lr.func(n.onClose)&&lr.func(n.onPartialMessage)}e.is=t})($f=cr.MessageReader||(cr.MessageReader={}));var Fi=class{constructor(){this.errorEmitter=new Ni.Emitter,this.closeEmitter=new Ni.Emitter,this.partialMessageEmitter=new Ni.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(t){this.errorEmitter.fire(this.asError(t))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(t){this.partialMessageEmitter.fire(t)}asError(t){return t instanceof Error?t:new Error(`Reader received error. Reason: ${lr.string(t.message)?t.message:"unknown"}`)}};cr.AbstractMessageReader=Fi;var qi;(function(e){function t(r){var n;let i,o,s,u=new Map,l,f=new Map;if(r===void 0||typeof r=="string")i=r!=null?r:"utf-8";else{if(i=(n=r.charset)!==null&&n!==void 0?n:"utf-8",r.contentDecoder!==void 0&&(s=r.contentDecoder,u.set(s.name,s)),r.contentDecoders!==void 0)for(let a of r.contentDecoders)u.set(a.name,a);if(r.contentTypeDecoder!==void 0&&(l=r.contentTypeDecoder,f.set(l.name,l)),r.contentTypeDecoders!==void 0)for(let a of r.contentTypeDecoders)f.set(a.name,a)}return l===void 0&&(l=Cn.default().applicationJson.decoder,f.set(l.name,l)),{charset:i,contentDecoder:s,contentDecoders:u,contentTypeDecoder:l,contentTypeDecoders:f}}e.fromOptions=t})(qi||(qi={}));var ja=class extends Fi{constructor(t,r){super();this.readable=t,this.options=qi.fromOptions(r),this.buffer=Cn.default().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0}set partialMessageTimeout(t){this._partialMessageTimeout=t}get partialMessageTimeout(){return this._partialMessageTimeout}listen(t){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=t;let r=this.readable.onData(n=>{this.onData(n)});return this.readable.onError(n=>this.fireError(n)),this.readable.onClose(()=>this.fireClose()),r}onData(t){for(this.buffer.append(t);;){if(this.nextMessageLength===-1){let i=this.buffer.tryReadHeaders();if(!i)return;let o=i.get("Content-Length");if(!o)throw new Error("Header must provide a Content-Length property.");let s=parseInt(o);if(isNaN(s))throw new Error("Content-Length value must be a number.");this.nextMessageLength=s}let r=this.buffer.tryReadBody(this.nextMessageLength);if(r===void 0){this.setPartialMessageTimer();return}this.clearPartialMessageTimer(),this.nextMessageLength=-1;let n;this.options.contentDecoder!==void 0?n=this.options.contentDecoder.decode(r):n=Promise.resolve(r),n.then(i=>{this.options.contentTypeDecoder.decode(i,this.options).then(o=>{this.callback(o)},o=>{this.fireError(o)})},i=>{this.fireError(i)})}}clearPartialMessageTimer(){this.partialMessageTimer&&(Cn.default().timer.clearTimeout(this.partialMessageTimer),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),!(this._partialMessageTimeout<=0)&&(this.partialMessageTimer=Cn.default().timer.setTimeout((t,r)=>{this.partialMessageTimer=void 0,t===this.messageToken&&(this.firePartialMessage({messageToken:t,waitingTime:r}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}};cr.ReadableStreamMessageReader=ja});var Ia=W(Ai=>{"use strict";Object.defineProperty(Ai,"__esModule",{value:!0});var Vf=vt(),Ma=class{constructor(t=1){if(t<=0)throw new Error("Capacity must be greater than 0");this._capacity=t,this._active=0,this._waiting=[]}lock(t){return new Promise((r,n)=>{this._waiting.push({thunk:t,resolve:r,reject:n}),this.runNext()})}get active(){return this._active}runNext(){this._waiting.length===0||this._active===this._capacity||Vf.default().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;let t=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("To many thunks active");try{let r=t.thunk();r instanceof Promise?r.then(n=>{this._active--,t.resolve(n),this.runNext()},n=>{this._active--,t.reject(n),this.runNext()}):(this._active--,t.resolve(r),this.runNext())}catch(r){this._active--,t.reject(r),this.runNext()}}};Ai.Semaphore=Ma});var Ha=W(fr=>{"use strict";Object.defineProperty(fr,"__esModule",{value:!0});var La=vt(),Hr=ar(),Hf=Ia(),Wa=ur(),zf="Content-Length: ",$a=`\r `,Bf;(function(e){function t(r){let n=r;return n&&Hr.func(n.dispose)&&Hr.func(n.onClose)&&Hr.func(n.onError)&&Hr.func(n.write)}e.is=t})(Bf=fr.MessageWriter||(fr.MessageWriter={}));var ji=class{constructor(){this.errorEmitter=new Wa.Emitter,this.closeEmitter=new Wa.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(t,r,n){this.errorEmitter.fire([this.asError(t),r,n])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(t){return t instanceof Error?t:new Error(`Writer received error. Reason: ${Hr.string(t.message)?t.message:"unknown"}`)}};fr.AbstractMessageWriter=ji;var Di;(function(e){function t(r){var n,i;return r===void 0||typeof r=="string"?{charset:r!=null?r:"utf-8",contentTypeEncoder:La.default().applicationJson.encoder}:{charset:(n=r.charset)!==null&&n!==void 0?n:"utf-8",contentEncoder:r.contentEncoder,contentTypeEncoder:(i=r.contentTypeEncoder)!==null&&i!==void 0?i:La.default().applicationJson.encoder}}e.fromOptions=t})(Di||(Di={}));var Va=class extends ji{constructor(t,r){super();this.writable=t,this.options=Di.fromOptions(r),this.errorCount=0,this.writeSemaphore=new Hf.Semaphore(1),this.writable.onError(n=>this.fireError(n)),this.writable.onClose(()=>this.fireClose())}async write(t){return this.options.contentTypeEncoder.encode(t,this.options).then(n=>this.options.contentEncoder!==void 0?this.options.contentEncoder.encode(n):n).then(n=>{let i=[];return i.push(zf,n.byteLength.toString(),$a),i.push($a),this.doWrite(t,i,n)},n=>{throw this.fireError(n),n})}doWrite(t,r,n){return this.writeSemaphore.lock(async()=>{try{return await this.writable.write(r.join(""),"ascii"),this.writable.write(n)}catch(i){this.handleError(i,t)}})}handleError(t,r){this.errorCount++,this.fireError(t,r,this.errorCount)}};fr.WriteableStreamMessageWriter=Va});var Ba=W(dr=>{"use strict";Object.defineProperty(dr,"__esModule",{value:!0});var qe;(function(e){e.None=0,e.First=1,e.AsOld=e.First,e.Last=2,e.AsNew=e.Last})(qe=dr.Touch||(dr.Touch={}));var Mi=class{constructor(){this[Symbol.toStringTag]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){var t;return(t=this._head)===null||t===void 0?void 0:t.value}get last(){var t;return(t=this._tail)===null||t===void 0?void 0:t.value}has(t){return this._map.has(t)}get(t,r=qe.None){let n=this._map.get(t);if(!!n)return r!==qe.None&&this.touch(n,r),n.value}set(t,r,n=qe.None){let i=this._map.get(t);if(i)i.value=r,n!==qe.None&&this.touch(i,n);else{switch(i={key:t,value:r,next:void 0,previous:void 0},n){case qe.None:this.addItemLast(i);break;case qe.First:this.addItemFirst(i);break;case qe.Last:this.addItemLast(i);break;default:this.addItemLast(i);break}this._map.set(t,i),this._size++}return this}delete(t){return!!this.remove(t)}remove(t){let r=this._map.get(t);if(!!r)return this._map.delete(t),this.removeItem(r),this._size--,r.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");let t=this._head;return this._map.delete(t.key),this.removeItem(t),this._size--,t.value}forEach(t,r){let n=this._state,i=this._head;for(;i;){if(r?t.bind(r)(i.value,i.key,this):t(i.value,i.key,this),this._state!==n)throw new Error("LinkedMap got modified during iteration.");i=i.next}}keys(){let t=this,r=this._state,n=this._head,i={[Symbol.iterator](){return i},next(){if(t._state!==r)throw new Error("LinkedMap got modified during iteration.");if(n){let o={value:n.key,done:!1};return n=n.next,o}else return{value:void 0,done:!0}}};return i}values(){let t=this,r=this._state,n=this._head,i={[Symbol.iterator](){return i},next(){if(t._state!==r)throw new Error("LinkedMap got modified during iteration.");if(n){let o={value:n.value,done:!1};return n=n.next,o}else return{value:void 0,done:!0}}};return i}entries(){let t=this,r=this._state,n=this._head,i={[Symbol.iterator](){return i},next(){if(t._state!==r)throw new Error("LinkedMap got modified during iteration.");if(n){let o={value:[n.key,n.value],done:!1};return n=n.next,o}else return{value:void 0,done:!0}}};return i}[Symbol.iterator](){return this.entries()}trimOld(t){if(t>=this.size)return;if(t===0){this.clear();return}let r=this._head,n=this.size;for(;r&&n>t;)this._map.delete(r.key),r=r.next,n--;this._head=r,this._size=n,r&&(r.previous=void 0),this._state++}addItemFirst(t){if(!this._head&&!this._tail)this._tail=t;else if(this._head)t.next=this._head,this._head.previous=t;else throw new Error("Invalid list");this._head=t,this._state++}addItemLast(t){if(!this._head&&!this._tail)this._head=t;else if(this._tail)t.previous=this._tail,this._tail.next=t;else throw new Error("Invalid list");this._tail=t,this._state++}removeItem(t){if(t===this._head&&t===this._tail)this._head=void 0,this._tail=void 0;else if(t===this._head){if(!t.next)throw new Error("Invalid list");t.next.previous=void 0,this._head=t.next}else if(t===this._tail){if(!t.previous)throw new Error("Invalid list");t.previous.next=void 0,this._tail=t.previous}else{let r=t.next,n=t.previous;if(!r||!n)throw new Error("Invalid list");r.previous=n,n.next=r}t.next=void 0,t.previous=void 0,this._state++}touch(t,r){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(r!==qe.First&&r!==qe.Last)){if(r===qe.First){if(t===this._head)return;let n=t.next,i=t.previous;t===this._tail?(i.next=void 0,this._tail=i):(n.previous=i,i.next=n),t.previous=void 0,t.next=this._head,this._head.previous=t,this._head=t,this._state++}else if(r===qe.Last){if(t===this._tail)return;let n=t.next,i=t.previous;t===this._head?(n.previous=void 0,this._head=n):(n.previous=i,i.next=n),t.next=void 0,t.previous=this._tail,this._tail.next=t,this._tail=t,this._state++}}}toJSON(){let t=[];return this.forEach((r,n)=>{t.push([n,r])}),t}fromJSON(t){this.clear();for(let[r,n]of t)this.set(r,n)}};dr.LinkedMap=Mi;var za=class extends Mi{constructor(t,r=1){super();this._limit=t,this._ratio=Math.min(Math.max(0,r),1)}get limit(){return this._limit}set limit(t){this._limit=t,this.checkTrim()}get ratio(){return this._ratio}set ratio(t){this._ratio=Math.min(Math.max(0,t),1),this.checkTrim()}get(t,r=qe.AsNew){return super.get(t,r)}peek(t){return super.get(t,qe.None)}set(t,r){return super.set(t,r,qe.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}};dr.LRUCache=za});var Za=W(re=>{"use strict";Object.defineProperty(re,"__esModule",{value:!0});var Ja=vt(),ve=ar(),ie=_i(),Ua=Ba(),zr=ur(),xn=Oi(),Br;(function(e){e.type=new ie.NotificationType("$/cancelRequest")})(Br||(Br={}));var Sn;(function(e){e.type=new ie.NotificationType("$/progress")})(Sn||(Sn={}));var Ga=class{constructor(){}};re.ProgressType=Ga;re.NullLogger=Object.freeze({error:()=>{},warn:()=>{},info:()=>{},log:()=>{}});var ye;(function(e){e[e.Off=0]="Off",e[e.Messages=1]="Messages",e[e.Verbose=2]="Verbose"})(ye=re.Trace||(re.Trace={}));(function(e){function t(n){if(!ve.string(n))return e.Off;switch(n=n.toLowerCase(),n){case"off":return e.Off;case"messages":return e.Messages;case"verbose":return e.Verbose;default:return e.Off}}e.fromString=t;function r(n){switch(n){case e.Off:return"off";case e.Messages:return"messages";case e.Verbose:return"verbose";default:return"off"}}e.toString=r})(ye=re.Trace||(re.Trace={}));var tt;(function(e){e.Text="text",e.JSON="json"})(tt=re.TraceFormat||(re.TraceFormat={}));(function(e){function t(r){return r=r.toLowerCase(),r==="json"?e.JSON:e.Text}e.fromString=t})(tt=re.TraceFormat||(re.TraceFormat={}));var Xa;(function(e){e.type=new ie.NotificationType("$/setTraceNotification")})(Xa=re.SetTraceNotification||(re.SetTraceNotification={}));var Ii;(function(e){e.type=new ie.NotificationType("$/logTraceNotification")})(Ii=re.LogTraceNotification||(re.LogTraceNotification={}));var Tn;(function(e){e[e.Closed=1]="Closed",e[e.Disposed=2]="Disposed",e[e.AlreadyListening=3]="AlreadyListening"})(Tn=re.ConnectionErrors||(re.ConnectionErrors={}));var Jt=class extends Error{constructor(t,r){super(r);this.code=t,Object.setPrototypeOf(this,Jt.prototype)}};re.ConnectionError=Jt;var Ya;(function(e){function t(r){let n=r;return n&&ve.func(n.cancelUndispatched)}e.is=t})(Ya=re.ConnectionStrategy||(re.ConnectionStrategy={}));var Li;(function(e){e.Message=Object.freeze({createCancellationTokenSource(r){return new xn.CancellationTokenSource}});function t(r){let n=r;return n&&ve.func(n.createCancellationTokenSource)}e.is=t})(Li=re.CancellationReceiverStrategy||(re.CancellationReceiverStrategy={}));var Wi;(function(e){e.Message=Object.freeze({sendCancellation(r,n){r.sendNotification(Br.type,{id:n})},cleanup(r){}});function t(r){let n=r;return n&&ve.func(n.sendCancellation)&&ve.func(n.cleanup)}e.is=t})(Wi=re.CancellationSenderStrategy||(re.CancellationSenderStrategy={}));var $i;(function(e){e.Message=Object.freeze({receiver:Li.Message,sender:Wi.Message});function t(r){let n=r;return n&&Li.is(n.receiver)&&Wi.is(n.sender)}e.is=t})($i=re.CancellationStrategy||(re.CancellationStrategy={}));var Jf;(function(e){function t(r){let n=r;return n&&($i.is(n.cancellationStrategy)||Ya.is(n.connectionStrategy))}e.is=t})(Jf=re.ConnectionOptions||(re.ConnectionOptions={}));var rt;(function(e){e[e.New=1]="New",e[e.Listening=2]="Listening",e[e.Closed=3]="Closed",e[e.Disposed=4]="Disposed"})(rt||(rt={}));function Uf(e,t,r,n){let i=r!==void 0?r:re.NullLogger,o=0,s=0,u=0,l="2.0",f,a=Object.create(null),c,m=Object.create(null),y=new Map,x,T=new Ua.LinkedMap,C=Object.create(null),p=Object.create(null),h=ye.Off,g=tt.Text,O,q=rt.New,D=new zr.Emitter,_=new zr.Emitter,b=new zr.Emitter,v=new zr.Emitter,w=new zr.Emitter,R=n&&n.cancellationStrategy?n.cancellationStrategy:$i.Message;function F(d){return"req-"+d.toString()}function L(d){return d===null?"res-unknown-"+(++u).toString():"res-"+d.toString()}function $(){return"not-"+(++s).toString()}function ne(d,S){ie.isRequestMessage(S)?d.set(F(S.id),S):ie.isResponseMessage(S)?d.set(L(S.id),S):d.set($(),S)}function K(d){}function Pe(){return q===rt.Listening}function Me(){return q===rt.Closed}function Se(){return q===rt.Disposed}function we(){(q===rt.New||q===rt.Listening)&&(q=rt.Closed,_.fire(void 0))}function se(d){D.fire([d,void 0,void 0])}function Be(d){D.fire(d)}e.onClose(we),e.onError(se),t.onClose(we),t.onError(Be);function Ce(){x||T.size===0||(x=Ja.default().timer.setImmediate(()=>{x=void 0,me()}))}function me(){if(T.size===0)return;let d=T.shift();try{ie.isRequestMessage(d)?_t(d):ie.isNotificationMessage(d)?$t(d):ie.isResponseMessage(d)?nr(d):Pt(d)}finally{Ce()}}let pt=d=>{try{if(ie.isNotificationMessage(d)&&d.method===Br.type.method){let S=F(d.params.id),A=T.get(S);if(ie.isRequestMessage(A)){let j=n==null?void 0:n.connectionStrategy,z=j&&j.cancelUndispatched?j.cancelUndispatched(A,K):K(A);if(z&&(z.error!==void 0||z.result!==void 0)){T.delete(S),z.id=A.id,gt(z,d.method,Date.now()),t.write(z);return}}}ne(T,d)}finally{Ce()}};function _t(d){if(Se())return;function S(ee,xe,le){let Fe={jsonrpc:l,id:d.id};ee instanceof ie.ResponseError?Fe.error=ee.toJson():Fe.result=ee===void 0?null:ee,gt(Fe,xe,le),t.write(Fe)}function A(ee,xe,le){let Fe={jsonrpc:l,id:d.id,error:ee.toJson()};gt(Fe,xe,le),t.write(Fe)}function j(ee,xe,le){ee===void 0&&(ee=null);let Fe={jsonrpc:l,id:d.id,result:ee};gt(Fe,xe,le),t.write(Fe)}Ht(d);let z=a[d.method],de,he;z&&(de=z.type,he=z.handler);let Ne=Date.now();if(he||f){let ee=String(d.id),xe=R.receiver.createCancellationTokenSource(ee);p[ee]=xe;try{let le;d.params===void 0||de!==void 0&&de.numberOfParams===0?le=he?he(xe.token):f(d.method,xe.token):ve.array(d.params)&&(de===void 0||de.numberOfParams>1)?le=he?he(...d.params,xe.token):f(d.method,...d.params,xe.token):le=he?he(d.params,xe.token):f(d.method,d.params,xe.token);let Fe=le;le?Fe.then?Fe.then(mt=>{delete p[ee],S(mt,d.method,Ne)},mt=>{delete p[ee],mt instanceof ie.ResponseError?A(mt,d.method,Ne):mt&&ve.string(mt.message)?A(new ie.ResponseError(ie.ErrorCodes.InternalError,`Request ${d.method} failed with message: ${mt.message}`),d.method,Ne):A(new ie.ResponseError(ie.ErrorCodes.InternalError,`Request ${d.method} failed unexpectedly without providing any details.`),d.method,Ne)}):(delete p[ee],S(le,d.method,Ne)):(delete p[ee],j(le,d.method,Ne))}catch(le){delete p[ee],le instanceof ie.ResponseError?S(le,d.method,Ne):le&&ve.string(le.message)?A(new ie.ResponseError(ie.ErrorCodes.InternalError,`Request ${d.method} failed with message: ${le.message}`),d.method,Ne):A(new ie.ResponseError(ie.ErrorCodes.InternalError,`Request ${d.method} failed unexpectedly without providing any details.`),d.method,Ne)}}else A(new ie.ResponseError(ie.ErrorCodes.MethodNotFound,`Unhandled method ${d.method}`),d.method,Ne)}function nr(d){if(!Se())if(d.id===null)d.error?i.error(`Received response message without id: Error is: ${JSON.stringify(d.error,void 0,4)}`):i.error("Received response message without id. No further error information provided.");else{let S=String(d.id),A=C[S];if(Lr(d,A),A){delete C[S];try{if(d.error){let j=d.error;A.reject(new ie.ResponseError(j.code,j.message,j.data))}else if(d.result!==void 0)A.resolve(d.result);else throw new Error("Should never happen.")}catch(j){j.message?i.error(`Response handler '${A.method}' failed with message: ${j.message}`):i.error(`Response handler '${A.method}' failed unexpectedly.`)}}}}function $t(d){if(Se())return;let S,A;if(d.method===Br.type.method)A=j=>{let z=j.id,de=p[String(z)];de&&de.cancel()};else{let j=m[d.method];j&&(A=j.handler,S=j.type)}if(A||c)try{or(d),d.params===void 0||S!==void 0&&S.numberOfParams===0?A?A():c(d.method):ve.array(d.params)&&(S===void 0||S.numberOfParams>1)?A?A(...d.params):c(d.method,...d.params):A?A(d.params):c(d.method,d.params)}catch(j){j.message?i.error(`Notification handler '${d.method}' failed with message: ${j.message}`):i.error(`Notification handler '${d.method}' failed unexpectedly.`)}else b.fire(d)}function Pt(d){if(!d){i.error("Received empty message.");return}i.error(`Received message which is neither a response nor a notification message: ${JSON.stringify(d,null,4)}`);let S=d;if(ve.string(S.id)||ve.number(S.id)){let A=String(S.id),j=C[A];j&&j.reject(new Error("The received response has neither a result nor an error property."))}}function ir(d){if(!(h===ye.Off||!O))if(g===tt.Text){let S;h===ye.Verbose&&d.params&&(S=`Params: ${JSON.stringify(d.params,null,4)} `),O.log(`Sending request '${d.method} - (${d.id})'.`,S)}else Ze("send-request",d)}function Vt(d){if(!(h===ye.Off||!O))if(g===tt.Text){let S;h===ye.Verbose&&(d.params?S=`Params: ${JSON.stringify(d.params,null,4)} `:S=`No parameters provided. `),O.log(`Sending notification '${d.method}'.`,S)}else Ze("send-notification",d)}function gt(d,S,A){if(!(h===ye.Off||!O))if(g===tt.Text){let j;h===ye.Verbose&&(d.error&&d.error.data?j=`Error data: ${JSON.stringify(d.error.data,null,4)} `:d.result?j=`Result: ${JSON.stringify(d.result,null,4)} `:d.error===void 0&&(j=`No result returned. `)),O.log(`Sending response '${S} - (${d.id})'. Processing request took ${Date.now()-A}ms`,j)}else Ze("send-response",d)}function Ht(d){if(!(h===ye.Off||!O))if(g===tt.Text){let S;h===ye.Verbose&&d.params&&(S=`Params: ${JSON.stringify(d.params,null,4)} `),O.log(`Received request '${d.method} - (${d.id})'.`,S)}else Ze("receive-request",d)}function or(d){if(!(h===ye.Off||!O||d.method===Ii.type.method))if(g===tt.Text){let S;h===ye.Verbose&&(d.params?S=`Params: ${JSON.stringify(d.params,null,4)} `:S=`No parameters provided. `),O.log(`Received notification '${d.method}'.`,S)}else Ze("receive-notification",d)}function Lr(d,S){if(!(h===ye.Off||!O))if(g===tt.Text){let A;if(h===ye.Verbose&&(d.error&&d.error.data?A=`Error data: ${JSON.stringify(d.error.data,null,4)} `:d.result?A=`Result: ${JSON.stringify(d.result,null,4)} `:d.error===void 0&&(A=`No result returned. `)),S){let j=d.error?` Request failed: ${d.error.message} (${d.error.code}).`:"";O.log(`Received response '${S.method} - (${d.id})' in ${Date.now()-S.timerStart}ms.${j}`,A)}else O.log(`Received response ${d.id} without active response promise.`,A)}else Ze("receive-response",d)}function Ze(d,S){if(!O||h===ye.Off)return;let A={isLSPMessage:!0,type:d,message:S,timestamp:Date.now()};O.log(A)}function Qe(){if(Me())throw new Jt(Tn.Closed,"Connection is closed.");if(Se())throw new Jt(Tn.Disposed,"Connection is disposed.")}function yi(){if(Pe())throw new Jt(Tn.AlreadyListening,"Connection is already listening")}function Re(){if(!Pe())throw new Error("Call listen() first.")}function Rt(d){return d===void 0?null:d}function N(d,S){let A,j=d.numberOfParams;switch(j){case 0:A=null;break;case 1:A=Rt(S[0]);break;default:A=[];for(let z=0;z{Qe();let A,j;if(ve.string(d))switch(A=d,S.length){case 0:j=null;break;case 1:j=S[0];break;default:j=S;break}else A=d.method,j=N(d,S);let z={jsonrpc:l,method:A,params:j};Vt(z),t.write(z)},onNotification:(d,S)=>{Qe(),ve.func(d)?c=d:S&&(ve.string(d)?m[d]={type:void 0,handler:S}:m[d.method]={type:d,handler:S})},onProgress:(d,S,A)=>{if(y.has(S))throw new Error(`Progress handler for token ${S} already registered`);return y.set(S,A),{dispose:()=>{y.delete(S)}}},sendProgress:(d,S,A)=>{M.sendNotification(Sn.type,{token:S,value:A})},onUnhandledProgress:v.event,sendRequest:(d,...S)=>{Qe(),Re();let A,j,z;if(ve.string(d))switch(A=d,S.length){case 0:j=null;break;case 1:xn.CancellationToken.is(S[0])?(j=null,z=S[0]):j=Rt(S[0]);break;default:let ee=S.length-1;xn.CancellationToken.is(S[ee])?(z=S[ee],S.length===2?j=Rt(S[0]):j=S.slice(0,ee).map(xe=>Rt(xe))):j=S.map(xe=>Rt(xe));break}else{A=d.method,j=N(d,S);let ee=d.numberOfParams;z=xn.CancellationToken.is(S[ee])?S[ee]:void 0}let de=o++,he;return z&&(he=z.onCancellationRequested(()=>{R.sender.sendCancellation(M,de)})),new Promise((ee,xe)=>{let le={jsonrpc:l,id:de,method:A,params:j},Fe=sr=>{ee(sr),R.sender.cleanup(de),he==null||he.dispose()},mt=sr=>{xe(sr),R.sender.cleanup(de),he==null||he.dispose()},mn={method:A,timerStart:Date.now(),resolve:Fe,reject:mt};ir(le);try{t.write(le)}catch(sr){mn.reject(new ie.ResponseError(ie.ErrorCodes.MessageWriteError,sr.message?sr.message:"Unknown reason")),mn=null}mn&&(C[String(de)]=mn)})},onRequest:(d,S)=>{Qe(),ve.func(d)?f=d:S&&(ve.string(d)?a[d]={type:void 0,handler:S}:a[d.method]={type:d,handler:S})},trace:(d,S,A)=>{let j=!1,z=tt.Text;A!==void 0&&(ve.boolean(A)?j=A:(j=A.sendNotification||!1,z=A.traceFormat||tt.Text)),h=d,g=z,h===ye.Off?O=void 0:O=S,j&&!Me()&&!Se()&&M.sendNotification(Xa.type,{value:ye.toString(d)})},onError:D.event,onClose:_.event,onUnhandledNotification:b.event,onDispose:w.event,dispose:()=>{if(Se())return;q=rt.Disposed,w.fire(void 0);let d=new Error("Connection got disposed.");Object.keys(C).forEach(S=>{C[S].reject(d)}),C=Object.create(null),p=Object.create(null),T=new Ua.LinkedMap,ve.func(t.dispose)&&t.dispose(),ve.func(e.dispose)&&e.dispose()},listen:()=>{Qe(),yi(),q=rt.Listening,e.listen(pt)},inspect:()=>{Ja.default().console.log("inspect")}};return M.onNotification(Ii.type,d=>{h===ye.Off||!O||O.log(d.message,h===ye.Verbose?d.verbose:void 0)}),M.onNotification(Sn.type,d=>{let S=y.get(d.token);S?S(d.value):v.fire(d)}),M}re.createMessageConnection=Uf});var zi=W(H=>{"use strict";Object.defineProperty(H,"__esModule",{value:!0});var ue=_i();H.RequestType=ue.RequestType;H.RequestType0=ue.RequestType0;H.RequestType1=ue.RequestType1;H.RequestType2=ue.RequestType2;H.RequestType3=ue.RequestType3;H.RequestType4=ue.RequestType4;H.RequestType5=ue.RequestType5;H.RequestType6=ue.RequestType6;H.RequestType7=ue.RequestType7;H.RequestType8=ue.RequestType8;H.RequestType9=ue.RequestType9;H.ResponseError=ue.ResponseError;H.ErrorCodes=ue.ErrorCodes;H.NotificationType=ue.NotificationType;H.NotificationType0=ue.NotificationType0;H.NotificationType1=ue.NotificationType1;H.NotificationType2=ue.NotificationType2;H.NotificationType3=ue.NotificationType3;H.NotificationType4=ue.NotificationType4;H.NotificationType5=ue.NotificationType5;H.NotificationType6=ue.NotificationType6;H.NotificationType7=ue.NotificationType7;H.NotificationType8=ue.NotificationType8;H.NotificationType9=ue.NotificationType9;var Gf=xi();H.Disposable=Gf.Disposable;var Qa=ur();H.Event=Qa.Event;H.Emitter=Qa.Emitter;var Ka=Oi();H.CancellationTokenSource=Ka.CancellationTokenSource;H.CancellationToken=Ka.CancellationToken;var Vi=Da();H.MessageReader=Vi.MessageReader;H.AbstractMessageReader=Vi.AbstractMessageReader;H.ReadableStreamMessageReader=Vi.ReadableStreamMessageReader;var Hi=Ha();H.MessageWriter=Hi.MessageWriter;H.AbstractMessageWriter=Hi.AbstractMessageWriter;H.WriteableStreamMessageWriter=Hi.WriteableStreamMessageWriter;var Ie=Za();H.ConnectionStrategy=Ie.ConnectionStrategy;H.ConnectionOptions=Ie.ConnectionOptions;H.NullLogger=Ie.NullLogger;H.createMessageConnection=Ie.createMessageConnection;H.ProgressType=Ie.ProgressType;H.Trace=Ie.Trace;H.TraceFormat=Ie.TraceFormat;H.SetTraceNotification=Ie.SetTraceNotification;H.LogTraceNotification=Ie.LogTraceNotification;H.ConnectionErrors=Ie.ConnectionErrors;H.ConnectionError=Ie.ConnectionError;H.CancellationReceiverStrategy=Ie.CancellationReceiverStrategy;H.CancellationSenderStrategy=Ie.CancellationSenderStrategy;H.CancellationStrategy=Ie.CancellationStrategy;var Xf=vt();H.RAL=Xf.default});var ze=W(Ee=>{"use strict";function Yf(e){for(var t in e)Ee.hasOwnProperty(t)||(Ee[t]=e[t])}Object.defineProperty(Ee,"__esModule",{value:!0});var Jr=sa();Jr.default.install();var dt=zi(),Zf=require("path"),Qf=require("os"),Kf=require("crypto"),kn=require("net");Yf(zi());var eu=class extends dt.AbstractMessageReader{constructor(t){super();this.process=t;let r=this.process;r.on("error",n=>this.fireError(n)),r.on("close",()=>this.fireClose())}listen(t){return this.process.on("message",t),dt.Disposable.create(()=>this.process.off("message",t))}};Ee.IPCMessageReader=eu;var tu=class extends dt.AbstractMessageWriter{constructor(t){super();this.process=t,this.errorCount=0;let r=this.process;r.on("error",n=>this.fireError(n)),r.on("close",()=>this.fireClose)}write(t){try{return typeof this.process.send=="function"&&this.process.send(t,void 0,void 0,r=>{r?(this.errorCount++,this.handleError(r,t)):this.errorCount=0}),Promise.resolve()}catch(r){return this.handleError(r,t),Promise.reject(r)}}handleError(t,r){this.errorCount++,this.fireError(t,r,this.errorCount)}};Ee.IPCMessageWriter=tu;var hr=class extends dt.ReadableStreamMessageReader{constructor(t,r="utf-8"){super(Jr.default().stream.asReadableStream(t),r)}};Ee.SocketMessageReader=hr;var pr=class extends dt.WriteableStreamMessageWriter{constructor(t,r){super(Jr.default().stream.asWritableStream(t),r);this.socket=t}dispose(){super.dispose(),this.socket.destroy()}};Ee.SocketMessageWriter=pr;var Bi=class extends dt.ReadableStreamMessageReader{constructor(t,r){super(Jr.default().stream.asReadableStream(t),r)}};Ee.StreamMessageReader=Bi;var Ji=class extends dt.WriteableStreamMessageWriter{constructor(t,r){super(Jr.default().stream.asWritableStream(t),r)}};Ee.StreamMessageWriter=Ji;function ed(){let e=Kf.randomBytes(21).toString("hex");return process.platform==="win32"?`\\\\.\\pipe\\vscode-jsonrpc-${e}-sock`:Zf.join(Qf.tmpdir(),`vscode-${e}.sock`)}Ee.generateRandomPipeName=ed;function td(e,t="utf-8"){let r,n=new Promise((i,o)=>{r=i});return new Promise((i,o)=>{let s=kn.createServer(u=>{s.close(),r([new hr(u,t),new pr(u,t)])});s.on("error",o),s.listen(e,()=>{s.removeListener("error",o),i({onConnected:()=>n})})})}Ee.createClientPipeTransport=td;function rd(e,t="utf-8"){let r=kn.createConnection(e);return[new hr(r,t),new pr(r,t)]}Ee.createServerPipeTransport=rd;function nd(e,t="utf-8"){let r,n=new Promise((i,o)=>{r=i});return new Promise((i,o)=>{let s=kn.createServer(u=>{s.close(),r([new hr(u,t),new pr(u,t)])});s.on("error",o),s.listen(e,"127.0.0.1",()=>{s.removeListener("error",o),i({onConnected:()=>n})})})}Ee.createClientSocketTransport=nd;function id(e,t="utf-8"){let r=kn.createConnection(e,"127.0.0.1");return[new hr(r,t),new pr(r,t)]}Ee.createServerSocketTransport=id;function od(e){return e.listen!==void 0&&e.read===void 0}function sd(e){return e.write!==void 0&&e.end===void 0}function ad(e,t,r,n){r||(r=dt.NullLogger);let i=od(e)?e:new Bi(e),o=sd(t)?t:new Ji(t);return dt.ConnectionStrategy.is(n)&&(n={connectionStrategy:n}),dt.createMessageConnection(i,o,r,n)}Ee.createMessageConnection=ad});var Ui=W((qv,ru)=>{"use strict";ru.exports=ze()});var Ro=W(ud=>{vf(ud,{CodeAction:()=>xo,CodeActionContext:()=>Co,CodeActionKind:()=>wo,CodeLens:()=>So,Color:()=>Pn,ColorInformation:()=>Xi,ColorPresentation:()=>Yi,Command:()=>gr,CompletionItem:()=>uo,CompletionItemKind:()=>io,CompletionItemTag:()=>so,CompletionList:()=>co,CreateFile:()=>Yr,DeleteFile:()=>Qr,Diagnostic:()=>Ur,DiagnosticCode:()=>to,DiagnosticRelatedInformation:()=>Rn,DiagnosticSeverity:()=>Ki,DiagnosticTag:()=>eo,DocumentHighlight:()=>go,DocumentHighlightKind:()=>po,DocumentLink:()=>ko,DocumentSymbol:()=>bo,EOL:()=>ld,FoldingRange:()=>Qi,FoldingRangeKind:()=>Zi,FormattingOptions:()=>To,Hover:()=>lo,InsertReplaceEdit:()=>ao,InsertTextFormat:()=>oo,Location:()=>_n,LocationLink:()=>Gi,MarkedString:()=>Kr,MarkupContent:()=>Nn,MarkupKind:()=>mr,ParameterInformation:()=>fo,Position:()=>nt,Range:()=>Te,RenameFile:()=>Zr,SelectionRange:()=>_o,SignatureInformation:()=>ho,SymbolInformation:()=>yo,SymbolKind:()=>mo,SymbolTag:()=>vo,TextDocument:()=>Po,TextDocumentEdit:()=>Gr,TextDocumentIdentifier:()=>ro,TextDocumentItem:()=>no,TextEdit:()=>Et,VersionedTextDocumentIdentifier:()=>Xr,WorkspaceChange:()=>cd,WorkspaceEdit:()=>En});"use strict";var nt;(function(e){function t(n,i){return{line:n,character:i}}e.create=t;function r(n){var i=n;return E.objectLiteral(i)&&E.number(i.line)&&E.number(i.character)}e.is=r})(nt||(nt={}));var Te;(function(e){function t(n,i,o,s){if(E.number(n)&&E.number(i)&&E.number(o)&&E.number(s))return{start:nt.create(n,i),end:nt.create(o,s)};if(nt.is(n)&&nt.is(i))return{start:n,end:i};throw new Error("Range#create called with invalid arguments["+n+", "+i+", "+o+", "+s+"]")}e.create=t;function r(n){var i=n;return E.objectLiteral(i)&&nt.is(i.start)&&nt.is(i.end)}e.is=r})(Te||(Te={}));var _n;(function(e){function t(n,i){return{uri:n,range:i}}e.create=t;function r(n){var i=n;return E.defined(i)&&Te.is(i.range)&&(E.string(i.uri)||E.undefined(i.uri))}e.is=r})(_n||(_n={}));var Gi;(function(e){function t(n,i,o,s){return{targetUri:n,targetRange:i,targetSelectionRange:o,originSelectionRange:s}}e.create=t;function r(n){var i=n;return E.defined(i)&&Te.is(i.targetRange)&&E.string(i.targetUri)&&(Te.is(i.targetSelectionRange)||E.undefined(i.targetSelectionRange))&&(Te.is(i.originSelectionRange)||E.undefined(i.originSelectionRange))}e.is=r})(Gi||(Gi={}));var Pn;(function(e){function t(n,i,o,s){return{red:n,green:i,blue:o,alpha:s}}e.create=t;function r(n){var i=n;return E.number(i.red)&&E.number(i.green)&&E.number(i.blue)&&E.number(i.alpha)}e.is=r})(Pn||(Pn={}));var Xi;(function(e){function t(n,i){return{range:n,color:i}}e.create=t;function r(n){var i=n;return Te.is(i.range)&&Pn.is(i.color)}e.is=r})(Xi||(Xi={}));var Yi;(function(e){function t(n,i,o){return{label:n,textEdit:i,additionalTextEdits:o}}e.create=t;function r(n){var i=n;return E.string(i.label)&&(E.undefined(i.textEdit)||Et.is(i))&&(E.undefined(i.additionalTextEdits)||E.typedArray(i.additionalTextEdits,Et.is))}e.is=r})(Yi||(Yi={}));var Zi;(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(Zi||(Zi={}));var Qi;(function(e){function t(n,i,o,s,u){var l={startLine:n,endLine:i};return E.defined(o)&&(l.startCharacter=o),E.defined(s)&&(l.endCharacter=s),E.defined(u)&&(l.kind=u),l}e.create=t;function r(n){var i=n;return E.number(i.startLine)&&E.number(i.startLine)&&(E.undefined(i.startCharacter)||E.number(i.startCharacter))&&(E.undefined(i.endCharacter)||E.number(i.endCharacter))&&(E.undefined(i.kind)||E.string(i.kind))}e.is=r})(Qi||(Qi={}));var Rn;(function(e){function t(n,i){return{location:n,message:i}}e.create=t;function r(n){var i=n;return E.defined(i)&&_n.is(i.location)&&E.string(i.message)}e.is=r})(Rn||(Rn={}));var Ki;(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(Ki||(Ki={}));var eo;(function(e){e.Unnecessary=1,e.Deprecated=2})(eo||(eo={}));var to;(function(e){function t(r){var n=r;return n!=null&&(E.number(n.value)||E.string(n.value))&&E.string(n.target)}e.is=t})(to||(to={}));var Ur;(function(e){function t(n,i,o,s,u,l){var f={range:n,message:i};return E.defined(o)&&(f.severity=o),E.defined(s)&&(f.code=s),E.defined(u)&&(f.source=u),E.defined(l)&&(f.relatedInformation=l),f}e.create=t;function r(n){var i=n;return E.defined(i)&&Te.is(i.range)&&E.string(i.message)&&(E.number(i.severity)||E.undefined(i.severity))&&(E.number(i.code)||E.string(i.code)||E.undefined(i.code))&&(E.string(i.source)||E.undefined(i.source))&&(E.undefined(i.relatedInformation)||E.typedArray(i.relatedInformation,Rn.is))}e.is=r})(Ur||(Ur={}));var gr;(function(e){function t(n,i){for(var o=[],s=2;s0&&(u.arguments=o),u}e.create=t;function r(n){var i=n;return E.defined(i)&&E.string(i.title)&&E.string(i.command)}e.is=r})(gr||(gr={}));var Et;(function(e){function t(o,s){return{range:o,newText:s}}e.replace=t;function r(o,s){return{range:{start:o,end:o},newText:s}}e.insert=r;function n(o){return{range:o,newText:""}}e.del=n;function i(o){var s=o;return E.objectLiteral(s)&&E.string(s.newText)&&Te.is(s.range)}e.is=i})(Et||(Et={}));var Gr;(function(e){function t(n,i){return{textDocument:n,edits:i}}e.create=t;function r(n){var i=n;return E.defined(i)&&Xr.is(i.textDocument)&&Array.isArray(i.edits)}e.is=r})(Gr||(Gr={}));var Yr;(function(e){function t(n,i){var o={kind:"create",uri:n};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(o.options=i),o}e.create=t;function r(n){var i=n;return i&&i.kind==="create"&&E.string(i.uri)&&(i.options===void 0||(i.options.overwrite===void 0||E.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||E.boolean(i.options.ignoreIfExists)))}e.is=r})(Yr||(Yr={}));var Zr;(function(e){function t(n,i,o){var s={kind:"rename",oldUri:n,newUri:i};return o!==void 0&&(o.overwrite!==void 0||o.ignoreIfExists!==void 0)&&(s.options=o),s}e.create=t;function r(n){var i=n;return i&&i.kind==="rename"&&E.string(i.oldUri)&&E.string(i.newUri)&&(i.options===void 0||(i.options.overwrite===void 0||E.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||E.boolean(i.options.ignoreIfExists)))}e.is=r})(Zr||(Zr={}));var Qr;(function(e){function t(n,i){var o={kind:"delete",uri:n};return i!==void 0&&(i.recursive!==void 0||i.ignoreIfNotExists!==void 0)&&(o.options=i),o}e.create=t;function r(n){var i=n;return i&&i.kind==="delete"&&E.string(i.uri)&&(i.options===void 0||(i.options.recursive===void 0||E.boolean(i.options.recursive))&&(i.options.ignoreIfNotExists===void 0||E.boolean(i.options.ignoreIfNotExists)))}e.is=r})(Qr||(Qr={}));var En;(function(e){function t(r){var n=r;return n&&(n.changes!==void 0||n.documentChanges!==void 0)&&(n.documentChanges===void 0||n.documentChanges.every(function(i){return E.string(i.kind)?Yr.is(i)||Zr.is(i)||Qr.is(i):Gr.is(i)}))}e.is=t})(En||(En={}));var On=function(){function e(t){this.edits=t}return e.prototype.insert=function(t,r){this.edits.push(Et.insert(t,r))},e.prototype.replace=function(t,r){this.edits.push(Et.replace(t,r))},e.prototype.delete=function(t){this.edits.push(Et.del(t))},e.prototype.add=function(t){this.edits.push(t)},e.prototype.all=function(){return this.edits},e.prototype.clear=function(){this.edits.splice(0,this.edits.length)},e}(),cd=function(){function e(t){var r=this;this._textEditChanges=Object.create(null),t&&(this._workspaceEdit=t,t.documentChanges?t.documentChanges.forEach(function(n){if(Gr.is(n)){var i=new On(n.edits);r._textEditChanges[n.textDocument.uri]=i}}):t.changes&&Object.keys(t.changes).forEach(function(n){var i=new On(t.changes[n]);r._textEditChanges[n]=i}))}return Object.defineProperty(e.prototype,"edit",{get:function(){return this._workspaceEdit===void 0?{documentChanges:[]}:this._workspaceEdit},enumerable:!0,configurable:!0}),e.prototype.getTextEditChange=function(t){if(Xr.is(t)){if(this._workspaceEdit||(this._workspaceEdit={documentChanges:[]}),!this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var r=t,n=this._textEditChanges[r.uri];if(!n){var i=[],o={textDocument:r,edits:i};this._workspaceEdit.documentChanges.push(o),n=new On(i),this._textEditChanges[r.uri]=n}return n}else{if(this._workspaceEdit||(this._workspaceEdit={changes:Object.create(null)}),!this._workspaceEdit.changes)throw new Error("Workspace edit is not configured for normal text edit changes.");var n=this._textEditChanges[t];if(!n){var i=[];this._workspaceEdit.changes[t]=i,n=new On(i),this._textEditChanges[t]=n}return n}},e.prototype.createFile=function(t,r){this.checkDocumentChanges(),this._workspaceEdit.documentChanges.push(Yr.create(t,r))},e.prototype.renameFile=function(t,r,n){this.checkDocumentChanges(),this._workspaceEdit.documentChanges.push(Zr.create(t,r,n))},e.prototype.deleteFile=function(t,r){this.checkDocumentChanges(),this._workspaceEdit.documentChanges.push(Qr.create(t,r))},e.prototype.checkDocumentChanges=function(){if(!this._workspaceEdit||!this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.")},e}(),ro;(function(e){function t(n){return{uri:n}}e.create=t;function r(n){var i=n;return E.defined(i)&&E.string(i.uri)}e.is=r})(ro||(ro={}));var Xr;(function(e){function t(n,i){return{uri:n,version:i}}e.create=t;function r(n){var i=n;return E.defined(i)&&E.string(i.uri)&&(i.version===null||E.number(i.version))}e.is=r})(Xr||(Xr={}));var no;(function(e){function t(n,i,o,s){return{uri:n,languageId:i,version:o,text:s}}e.create=t;function r(n){var i=n;return E.defined(i)&&E.string(i.uri)&&E.string(i.languageId)&&E.number(i.version)&&E.string(i.text)}e.is=r})(no||(no={}));var mr;(function(e){e.PlainText="plaintext",e.Markdown="markdown"})(mr||(mr={}));(function(e){function t(r){var n=r;return n===e.PlainText||n===e.Markdown}e.is=t})(mr||(mr={}));var Nn;(function(e){function t(r){var n=r;return E.objectLiteral(r)&&mr.is(n.kind)&&E.string(n.value)}e.is=t})(Nn||(Nn={}));var io;(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})(io||(io={}));var oo;(function(e){e.PlainText=1,e.Snippet=2})(oo||(oo={}));var so;(function(e){e.Deprecated=1})(so||(so={}));var ao;(function(e){function t(n,i,o){return{newText:n,insert:i,replace:o}}e.create=t;function r(n){var i=n;return i&&E.string(i.newText)&&Te.is(i.insert)&&Te.is(i.replace)}e.is=r})(ao||(ao={}));var uo;(function(e){function t(r){return{label:r}}e.create=t})(uo||(uo={}));var co;(function(e){function t(r,n){return{items:r||[],isIncomplete:!!n}}e.create=t})(co||(co={}));var Kr;(function(e){function t(n){return n.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}e.fromPlainText=t;function r(n){var i=n;return E.string(i)||E.objectLiteral(i)&&E.string(i.language)&&E.string(i.value)}e.is=r})(Kr||(Kr={}));var lo;(function(e){function t(r){var n=r;return!!n&&E.objectLiteral(n)&&(Nn.is(n.contents)||Kr.is(n.contents)||E.typedArray(n.contents,Kr.is))&&(r.range===void 0||Te.is(r.range))}e.is=t})(lo||(lo={}));var fo;(function(e){function t(r,n){return n?{label:r,documentation:n}:{label:r}}e.create=t})(fo||(fo={}));var ho;(function(e){function t(r,n){for(var i=[],o=2;o=0;a--){var c=l[a],m=o.offsetAt(c.range.start),y=o.offsetAt(c.range.end);if(y<=f)u=u.substring(0,m)+c.newText+u.substring(y,u.length);else throw new Error("Overlapping edit");f=m}return u}e.applyEdits=n;function i(o,s){if(o.length<=1)return o;var u=o.length/2|0,l=o.slice(0,u),f=o.slice(u);i(l,s),i(f,s);for(var a=0,c=0,m=0;a0&&t.push(r.length),this._lineOffsets=t}return this._lineOffsets},e.prototype.positionAt=function(t){t=Math.max(Math.min(t,this._content.length),0);var r=this.getLineOffsets(),n=0,i=r.length;if(i===0)return nt.create(0,t);for(;nt?i=o:n=o+1}var s=n-1;return nt.create(s,t-r[s])},e.prototype.offsetAt=function(t){var r=this.getLineOffsets();if(t.line>=r.length)return this._content.length;if(t.line<0)return 0;var n=r[t.line],i=t.line+1{"use strict";Object.defineProperty(vr,"__esModule",{value:!0});var Fn=ze(),nu=class extends Fn.RequestType0{constructor(t){super(t)}};vr.ProtocolRequestType0=nu;var iu=class extends Fn.RequestType{constructor(t){super(t)}};vr.ProtocolRequestType=iu;var ou=class extends Fn.NotificationType{constructor(t){super(t)}};vr.ProtocolNotificationType=ou;var su=class extends Fn.NotificationType0{constructor(t){super(t)}};vr.ProtocolNotificationType0=su});var cu=W(it=>{"use strict";Object.defineProperty(it,"__esModule",{value:!0});function dd(e){return e===!0||e===!1}it.boolean=dd;function au(e){return typeof e=="string"||e instanceof String}it.string=au;function hd(e){return typeof e=="number"||e instanceof Number}it.number=hd;function pd(e){return e instanceof Error}it.error=pd;function gd(e){return typeof e=="function"}it.func=gd;function uu(e){return Array.isArray(e)}it.array=uu;function md(e){return uu(e)&&e.every(t=>au(t))}it.stringArray=md;function vd(e,t){return Array.isArray(e)&&e.every(t)}it.typedArray=vd;function yd(e){return e!==null&&typeof e=="object"}it.objectLiteral=yd});var lu=W(qn=>{"use strict";Object.defineProperty(qn,"__esModule",{value:!0});var bd=ze(),wd=Le(),Cd;(function(e){e.method="textDocument/implementation",e.type=new wd.ProtocolRequestType(e.method),e.resultType=new bd.ProgressType})(Cd=qn.ImplementationRequest||(qn.ImplementationRequest={}))});var fu=W(An=>{"use strict";Object.defineProperty(An,"__esModule",{value:!0});var xd=ze(),Sd=Le(),Td;(function(e){e.method="textDocument/typeDefinition",e.type=new Sd.ProtocolRequestType(e.method),e.resultType=new xd.ProgressType})(Td=An.TypeDefinitionRequest||(An.TypeDefinitionRequest={}))});var hu=W(yr=>{"use strict";Object.defineProperty(yr,"__esModule",{value:!0});var du=Le(),kd;(function(e){e.type=new du.ProtocolRequestType0("workspace/workspaceFolders")})(kd=yr.WorkspaceFoldersRequest||(yr.WorkspaceFoldersRequest={}));var _d;(function(e){e.type=new du.ProtocolNotificationType("workspace/didChangeWorkspaceFolders")})(_d=yr.DidChangeWorkspaceFoldersNotification||(yr.DidChangeWorkspaceFoldersNotification={}))});var pu=W(jn=>{"use strict";Object.defineProperty(jn,"__esModule",{value:!0});var Pd=Le(),Rd;(function(e){e.type=new Pd.ProtocolRequestType("workspace/configuration")})(Rd=jn.ConfigurationRequest||(jn.ConfigurationRequest={}))});var mu=W(br=>{"use strict";Object.defineProperty(br,"__esModule",{value:!0});var Ed=ze(),gu=Le(),Od;(function(e){e.method="textDocument/documentColor",e.type=new gu.ProtocolRequestType(e.method),e.resultType=new Ed.ProgressType})(Od=br.DocumentColorRequest||(br.DocumentColorRequest={}));var Nd;(function(e){e.type=new gu.ProtocolRequestType("textDocument/colorPresentation")})(Nd=br.ColorPresentationRequest||(br.ColorPresentationRequest={}))});var vu=W(wr=>{"use strict";Object.defineProperty(wr,"__esModule",{value:!0});var Fd=ze(),qd=Le(),Ad;(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(Ad=wr.FoldingRangeKind||(wr.FoldingRangeKind={}));var jd;(function(e){e.method="textDocument/foldingRange",e.type=new qd.ProtocolRequestType(e.method),e.resultType=new Fd.ProgressType})(jd=wr.FoldingRangeRequest||(wr.FoldingRangeRequest={}))});var yu=W(Dn=>{"use strict";Object.defineProperty(Dn,"__esModule",{value:!0});var Dd=ze(),Md=Le(),Id;(function(e){e.method="textDocument/declaration",e.type=new Md.ProtocolRequestType(e.method),e.resultType=new Dd.ProgressType})(Id=Dn.DeclarationRequest||(Dn.DeclarationRequest={}))});var bu=W(Mn=>{"use strict";Object.defineProperty(Mn,"__esModule",{value:!0});var Ld=ze(),Wd=Le(),$d;(function(e){e.method="textDocument/selectionRange",e.type=new Wd.ProtocolRequestType(e.method),e.resultType=new Ld.ProgressType})($d=Mn.SelectionRangeRequest||(Mn.SelectionRangeRequest={}))});var Cu=W(Ot=>{"use strict";Object.defineProperty(Ot,"__esModule",{value:!0});var Vd=ze(),wu=Le(),Hd;(function(e){e.type=new Vd.ProgressType})(Hd=Ot.WorkDoneProgress||(Ot.WorkDoneProgress={}));var zd;(function(e){e.type=new wu.ProtocolRequestType("window/workDoneProgress/create")})(zd=Ot.WorkDoneProgressCreateRequest||(Ot.WorkDoneProgressCreateRequest={}));var Bd;(function(e){e.type=new wu.ProtocolNotificationType("window/workDoneProgress/cancel")})(Bd=Ot.WorkDoneProgressCancelNotification||(Ot.WorkDoneProgressCancelNotification={}))});var xu=W(Nt=>{"use strict";Object.defineProperty(Nt,"__esModule",{value:!0});var Eo=Le(),Jd;(function(e){e.method="textDocument/prepareCallHierarchy",e.type=new Eo.ProtocolRequestType(e.method)})(Jd=Nt.CallHierarchyPrepareRequest||(Nt.CallHierarchyPrepareRequest={}));var Ud;(function(e){e.method="callHierarchy/incomingCalls",e.type=new Eo.ProtocolRequestType(e.method)})(Ud=Nt.CallHierarchyIncomingCallsRequest||(Nt.CallHierarchyIncomingCallsRequest={}));var Gd;(function(e){e.method="callHierarchy/outgoingCalls",e.type=new Eo.ProtocolRequestType(e.method)})(Gd=Nt.CallHierarchyOutgoingCallsRequest||(Nt.CallHierarchyOutgoingCallsRequest={}))});var Pu=W(P=>{"use strict";Object.defineProperty(P,"__esModule",{value:!0});var Ft=cu(),bt=ze(),U=Le(),Xd=lu();P.ImplementationRequest=Xd.ImplementationRequest;var Yd=fu();P.TypeDefinitionRequest=Yd.TypeDefinitionRequest;var Su=hu();P.WorkspaceFoldersRequest=Su.WorkspaceFoldersRequest;P.DidChangeWorkspaceFoldersNotification=Su.DidChangeWorkspaceFoldersNotification;var Zd=pu();P.ConfigurationRequest=Zd.ConfigurationRequest;var Tu=mu();P.DocumentColorRequest=Tu.DocumentColorRequest;P.ColorPresentationRequest=Tu.ColorPresentationRequest;var Qd=vu();P.FoldingRangeRequest=Qd.FoldingRangeRequest;var Kd=yu();P.DeclarationRequest=Kd.DeclarationRequest;var eh=bu();P.SelectionRangeRequest=eh.SelectionRangeRequest;var Oo=Cu();P.WorkDoneProgress=Oo.WorkDoneProgress;P.WorkDoneProgressCreateRequest=Oo.WorkDoneProgressCreateRequest;P.WorkDoneProgressCancelNotification=Oo.WorkDoneProgressCancelNotification;var No=xu();P.CallHierarchyIncomingCallsRequest=No.CallHierarchyIncomingCallsRequest;P.CallHierarchyOutgoingCallsRequest=No.CallHierarchyOutgoingCallsRequest;P.CallHierarchyPrepareRequest=No.CallHierarchyPrepareRequest;var ku;(function(e){function t(r){let n=r;return Ft.string(n.language)||Ft.string(n.scheme)||Ft.string(n.pattern)}e.is=t})(ku=P.DocumentFilter||(P.DocumentFilter={}));var _u;(function(e){function t(r){if(!Array.isArray(r))return!1;for(let n of r)if(!Ft.string(n)&&!ku.is(n))return!1;return!0}e.is=t})(_u=P.DocumentSelector||(P.DocumentSelector={}));var th;(function(e){e.type=new U.ProtocolRequestType("client/registerCapability")})(th=P.RegistrationRequest||(P.RegistrationRequest={}));var rh;(function(e){e.type=new U.ProtocolRequestType("client/unregisterCapability")})(rh=P.UnregistrationRequest||(P.UnregistrationRequest={}));var nh;(function(e){e.Create="create",e.Rename="rename",e.Delete="delete"})(nh=P.ResourceOperationKind||(P.ResourceOperationKind={}));var ih;(function(e){e.Abort="abort",e.Transactional="transactional",e.TextOnlyTransactional="textOnlyTransactional",e.Undo="undo"})(ih=P.FailureHandlingKind||(P.FailureHandlingKind={}));var oh;(function(e){function t(r){let n=r;return n&&Ft.string(n.id)&&n.id.length>0}e.hasId=t})(oh=P.StaticRegistrationOptions||(P.StaticRegistrationOptions={}));var sh;(function(e){function t(r){let n=r;return n&&(n.documentSelector===null||_u.is(n.documentSelector))}e.is=t})(sh=P.TextDocumentRegistrationOptions||(P.TextDocumentRegistrationOptions={}));var ah;(function(e){function t(n){let i=n;return Ft.objectLiteral(i)&&(i.workDoneProgress===void 0||Ft.boolean(i.workDoneProgress))}e.is=t;function r(n){let i=n;return i&&Ft.boolean(i.workDoneProgress)}e.hasWorkDoneProgress=r})(ah=P.WorkDoneProgressOptions||(P.WorkDoneProgressOptions={}));var uh;(function(e){e.type=new U.ProtocolRequestType("initialize")})(uh=P.InitializeRequest||(P.InitializeRequest={}));var ch;(function(e){e.unknownProtocolVersion=1})(ch=P.InitializeError||(P.InitializeError={}));var lh;(function(e){e.type=new U.ProtocolNotificationType("initialized")})(lh=P.InitializedNotification||(P.InitializedNotification={}));var fh;(function(e){e.type=new U.ProtocolRequestType0("shutdown")})(fh=P.ShutdownRequest||(P.ShutdownRequest={}));var dh;(function(e){e.type=new U.ProtocolNotificationType0("exit")})(dh=P.ExitNotification||(P.ExitNotification={}));var hh;(function(e){e.type=new U.ProtocolNotificationType("workspace/didChangeConfiguration")})(hh=P.DidChangeConfigurationNotification||(P.DidChangeConfigurationNotification={}));var ph;(function(e){e.Error=1,e.Warning=2,e.Info=3,e.Log=4})(ph=P.MessageType||(P.MessageType={}));var gh;(function(e){e.type=new U.ProtocolNotificationType("window/showMessage")})(gh=P.ShowMessageNotification||(P.ShowMessageNotification={}));var mh;(function(e){e.type=new U.ProtocolRequestType("window/showMessageRequest")})(mh=P.ShowMessageRequest||(P.ShowMessageRequest={}));var vh;(function(e){e.type=new U.ProtocolNotificationType("window/logMessage")})(vh=P.LogMessageNotification||(P.LogMessageNotification={}));var yh;(function(e){e.type=new U.ProtocolNotificationType("telemetry/event")})(yh=P.TelemetryEventNotification||(P.TelemetryEventNotification={}));var bh;(function(e){e.None=0,e.Full=1,e.Incremental=2})(bh=P.TextDocumentSyncKind||(P.TextDocumentSyncKind={}));var wh;(function(e){e.method="textDocument/didOpen",e.type=new U.ProtocolNotificationType(e.method)})(wh=P.DidOpenTextDocumentNotification||(P.DidOpenTextDocumentNotification={}));var Ch;(function(e){e.method="textDocument/didChange",e.type=new U.ProtocolNotificationType(e.method)})(Ch=P.DidChangeTextDocumentNotification||(P.DidChangeTextDocumentNotification={}));var xh;(function(e){e.method="textDocument/didClose",e.type=new U.ProtocolNotificationType(e.method)})(xh=P.DidCloseTextDocumentNotification||(P.DidCloseTextDocumentNotification={}));var Sh;(function(e){e.method="textDocument/didSave",e.type=new U.ProtocolNotificationType(e.method)})(Sh=P.DidSaveTextDocumentNotification||(P.DidSaveTextDocumentNotification={}));var Th;(function(e){e.Manual=1,e.AfterDelay=2,e.FocusOut=3})(Th=P.TextDocumentSaveReason||(P.TextDocumentSaveReason={}));var kh;(function(e){e.method="textDocument/willSave",e.type=new U.ProtocolNotificationType(e.method)})(kh=P.WillSaveTextDocumentNotification||(P.WillSaveTextDocumentNotification={}));var _h;(function(e){e.method="textDocument/willSaveWaitUntil",e.type=new U.ProtocolRequestType(e.method)})(_h=P.WillSaveTextDocumentWaitUntilRequest||(P.WillSaveTextDocumentWaitUntilRequest={}));var Ph;(function(e){e.type=new U.ProtocolNotificationType("workspace/didChangeWatchedFiles")})(Ph=P.DidChangeWatchedFilesNotification||(P.DidChangeWatchedFilesNotification={}));var Rh;(function(e){e.Created=1,e.Changed=2,e.Deleted=3})(Rh=P.FileChangeType||(P.FileChangeType={}));var Eh;(function(e){e.Create=1,e.Change=2,e.Delete=4})(Eh=P.WatchKind||(P.WatchKind={}));var Oh;(function(e){e.type=new U.ProtocolNotificationType("textDocument/publishDiagnostics")})(Oh=P.PublishDiagnosticsNotification||(P.PublishDiagnosticsNotification={}));var Nh;(function(e){e.Invoked=1,e.TriggerCharacter=2,e.TriggerForIncompleteCompletions=3})(Nh=P.CompletionTriggerKind||(P.CompletionTriggerKind={}));var Fh;(function(e){e.method="textDocument/completion",e.type=new U.ProtocolRequestType(e.method),e.resultType=new bt.ProgressType})(Fh=P.CompletionRequest||(P.CompletionRequest={}));var qh;(function(e){e.method="completionItem/resolve",e.type=new U.ProtocolRequestType(e.method)})(qh=P.CompletionResolveRequest||(P.CompletionResolveRequest={}));var Ah;(function(e){e.method="textDocument/hover",e.type=new U.ProtocolRequestType(e.method)})(Ah=P.HoverRequest||(P.HoverRequest={}));var jh;(function(e){e.Invoked=1,e.TriggerCharacter=2,e.ContentChange=3})(jh=P.SignatureHelpTriggerKind||(P.SignatureHelpTriggerKind={}));var Dh;(function(e){e.method="textDocument/signatureHelp",e.type=new U.ProtocolRequestType(e.method)})(Dh=P.SignatureHelpRequest||(P.SignatureHelpRequest={}));var Mh;(function(e){e.method="textDocument/definition",e.type=new U.ProtocolRequestType(e.method),e.resultType=new bt.ProgressType})(Mh=P.DefinitionRequest||(P.DefinitionRequest={}));var Ih;(function(e){e.method="textDocument/references",e.type=new U.ProtocolRequestType(e.method),e.resultType=new bt.ProgressType})(Ih=P.ReferencesRequest||(P.ReferencesRequest={}));var Lh;(function(e){e.method="textDocument/documentHighlight",e.type=new U.ProtocolRequestType(e.method),e.resultType=new bt.ProgressType})(Lh=P.DocumentHighlightRequest||(P.DocumentHighlightRequest={}));var Wh;(function(e){e.method="textDocument/documentSymbol",e.type=new U.ProtocolRequestType(e.method),e.resultType=new bt.ProgressType})(Wh=P.DocumentSymbolRequest||(P.DocumentSymbolRequest={}));var $h;(function(e){e.method="textDocument/codeAction",e.type=new U.ProtocolRequestType(e.method),e.resultType=new bt.ProgressType})($h=P.CodeActionRequest||(P.CodeActionRequest={}));var Vh;(function(e){e.method="workspace/symbol",e.type=new U.ProtocolRequestType(e.method),e.resultType=new bt.ProgressType})(Vh=P.WorkspaceSymbolRequest||(P.WorkspaceSymbolRequest={}));var Hh;(function(e){e.type=new U.ProtocolRequestType("textDocument/codeLens"),e.resultType=new bt.ProgressType})(Hh=P.CodeLensRequest||(P.CodeLensRequest={}));var zh;(function(e){e.type=new U.ProtocolRequestType("codeLens/resolve")})(zh=P.CodeLensResolveRequest||(P.CodeLensResolveRequest={}));var Bh;(function(e){e.method="textDocument/documentLink",e.type=new U.ProtocolRequestType(e.method),e.resultType=new bt.ProgressType})(Bh=P.DocumentLinkRequest||(P.DocumentLinkRequest={}));var Jh;(function(e){e.type=new U.ProtocolRequestType("documentLink/resolve")})(Jh=P.DocumentLinkResolveRequest||(P.DocumentLinkResolveRequest={}));var Uh;(function(e){e.method="textDocument/formatting",e.type=new U.ProtocolRequestType(e.method)})(Uh=P.DocumentFormattingRequest||(P.DocumentFormattingRequest={}));var Gh;(function(e){e.method="textDocument/rangeFormatting",e.type=new U.ProtocolRequestType(e.method)})(Gh=P.DocumentRangeFormattingRequest||(P.DocumentRangeFormattingRequest={}));var Xh;(function(e){e.method="textDocument/onTypeFormatting",e.type=new U.ProtocolRequestType(e.method)})(Xh=P.DocumentOnTypeFormattingRequest||(P.DocumentOnTypeFormattingRequest={}));var Yh;(function(e){e.method="textDocument/rename",e.type=new U.ProtocolRequestType(e.method)})(Yh=P.RenameRequest||(P.RenameRequest={}));var Zh;(function(e){e.method="textDocument/prepareRename",e.type=new U.ProtocolRequestType(e.method)})(Zh=P.PrepareRenameRequest||(P.PrepareRenameRequest={}));var Qh;(function(e){e.type=new U.ProtocolRequestType("workspace/executeCommand")})(Qh=P.ExecuteCommandRequest||(P.ExecuteCommandRequest={}));var Kh;(function(e){e.type=new U.ProtocolRequestType("workspace/applyEdit")})(Kh=P.ApplyWorkspaceEditRequest||(P.ApplyWorkspaceEditRequest={}))});var Eu=W(Fo=>{"use strict";Object.defineProperty(Fo,"__esModule",{value:!0});var Ru=ze();function ep(e,t,r,n){return Ru.ConnectionStrategy.is(n)&&(n={connectionStrategy:n}),Ru.createMessageConnection(e,t,r,n)}Fo.createProtocolConnection=ep});var Ou=W(We=>{"use strict";Object.defineProperty(We,"__esModule",{value:!0});var qo=Le(),tp;(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.member="member",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator"})(tp=We.SemanticTokenTypes||(We.SemanticTokenTypes={}));var rp;(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"})(rp=We.SemanticTokenModifiers||(We.SemanticTokenModifiers={}));var np;(function(e){function t(r){let n=r;return n!==void 0&&(n.resultId===void 0||typeof n.resultId=="string")&&Array.isArray(n.data)&&(n.data.length===0||typeof n.data[0]=="number")}e.is=t})(np=We.SemanticTokens||(We.SemanticTokens={}));var ip;(function(e){e.method="textDocument/semanticTokens",e.type=new qo.ProtocolRequestType(e.method)})(ip=We.SemanticTokensRequest||(We.SemanticTokensRequest={}));var op;(function(e){e.method="textDocument/semanticTokens/edits",e.type=new qo.ProtocolRequestType(e.method)})(op=We.SemanticTokensEditsRequest||(We.SemanticTokensEditsRequest={}));var sp;(function(e){e.method="textDocument/semanticTokens/range",e.type=new qo.ProtocolRequestType(e.method)})(sp=We.SemanticTokensRangeRequest||(We.SemanticTokensRangeRequest={}))});var Nu=W(Ut=>{"use strict";function In(e){for(var t in e)Ut.hasOwnProperty(t)||(Ut[t]=e[t])}Object.defineProperty(Ut,"__esModule",{value:!0});In(ze());In(Ro());In(Le());In(Pu());var ap=Eu();Ut.createProtocolConnection=ap.createProtocolConnection;var wt=Ou(),up;(function(e){e.SemanticTokenTypes=wt.SemanticTokenTypes,e.SemanticTokenModifiers=wt.SemanticTokenModifiers,e.SemanticTokens=wt.SemanticTokens;let t;(function(i){i.method=wt.SemanticTokensRequest.method,i.type=wt.SemanticTokensRequest.type})(t=e.SemanticTokensRequest||(e.SemanticTokensRequest={}));let r;(function(i){i.method=wt.SemanticTokensEditsRequest.method,i.type=wt.SemanticTokensEditsRequest.type})(r=e.SemanticTokensEditsRequest||(e.SemanticTokensEditsRequest={}));let n;(function(i){i.method=wt.SemanticTokensRangeRequest.method,i.type=wt.SemanticTokensRangeRequest.type})(n=e.SemanticTokensRangeRequest||(e.SemanticTokensRangeRequest={}))})(up=Ut.Proposed||(Ut.Proposed={}))});var Ct=W(en=>{"use strict";function Fu(e){for(var t in e)en.hasOwnProperty(t)||(en[t]=e[t])}Object.defineProperty(en,"__esModule",{value:!0});var cp=Ui();Fu(Ui());Fu(Nu());function lp(e,t,r,n){return cp.createMessageConnection(e,t,r,n)}en.createProtocolConnection=lp});var Ao=W(Gt=>{"use strict";Object.defineProperty(Gt,"__esModule",{value:!0});var Ln=class{constructor(t){this._value=t}asHex(){return this._value}equals(t){return this.asHex()===t.asHex()}},G=class extends Ln{constructor(){super([G._randomHex(),G._randomHex(),G._randomHex(),G._randomHex(),G._randomHex(),G._randomHex(),G._randomHex(),G._randomHex(),"-",G._randomHex(),G._randomHex(),G._randomHex(),G._randomHex(),"-","4",G._randomHex(),G._randomHex(),G._randomHex(),"-",G._oneOf(G._timeHighBits),G._randomHex(),G._randomHex(),G._randomHex(),"-",G._randomHex(),G._randomHex(),G._randomHex(),G._randomHex(),G._randomHex(),G._randomHex(),G._randomHex(),G._randomHex(),G._randomHex(),G._randomHex(),G._randomHex(),G._randomHex()].join(""))}static _oneOf(t){return t[Math.floor(t.length*Math.random())]}static _randomHex(){return G._oneOf(G._chars)}};G._chars=["0","1","2","3","4","5","6","6","7","8","9","a","b","c","d","e","f"];G._timeHighBits=["8","9","a","b"];Gt.empty=new Ln("00000000-0000-0000-0000-000000000000");function qu(){return new G}Gt.v4=qu;var fp=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function Au(e){return fp.test(e)}Gt.isUUID=Au;function dp(e){if(!Au(e))throw new Error("invalid uuid");return new Ln(e)}Gt.parse=dp;function hp(){return qu().asHex()}Gt.generateUuid=hp});var Du=W(tn=>{"use strict";Object.defineProperty(tn,"__esModule",{value:!0});var qt=Ct(),pp=Ao(),xt=class{constructor(t,r){this._connection=t,this._token=r,xt.Instances.set(this._token,this)}begin(t,r,n,i){let o={kind:"begin",title:t,percentage:r,message:n,cancellable:i};this._connection.sendProgress(qt.WorkDoneProgress.type,this._token,o)}report(t,r){let n={kind:"report"};typeof t=="number"?(n.percentage=t,r!==void 0&&(n.message=r)):n.message=t,this._connection.sendProgress(qt.WorkDoneProgress.type,this._token,n)}done(){xt.Instances.delete(this._token),this._connection.sendProgress(qt.WorkDoneProgress.type,this._token,{kind:"end"})}};xt.Instances=new Map;var jo=class extends xt{constructor(t,r){super(t,r);this._source=new qt.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose(),super.done()}cancel(){this._source.cancel()}},Wn=class{constructor(){}begin(){}report(){}done(){}},Do=class extends Wn{constructor(){super();this._source=new qt.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose()}cancel(){this._source.cancel()}};function gp(e,t){if(t===void 0||t.workDoneToken===void 0)return new Wn;let r=t.workDoneToken;return delete t.workDoneToken,new xt(e,r)}tn.attachWorkDone=gp;tn.ProgressFeature=e=>class extends e{constructor(){super();this._progressSupported=!1}initialize(t){var r;((r=t==null?void 0:t.window)===null||r===void 0?void 0:r.workDoneProgress)===!0&&(this._progressSupported=!0,this.connection.onNotification(qt.WorkDoneProgressCancelNotification.type,n=>{let i=xt.Instances.get(n.token);(i instanceof jo||i instanceof Do)&&i.cancel()}))}attachWorkDoneProgress(t){return t===void 0?new Wn:new xt(this.connection,t)}createWorkDoneProgress(){if(this._progressSupported){let t=pp.generateUuid();return this.connection.sendRequest(qt.WorkDoneProgressCreateRequest.type,{token:t}).then(()=>new jo(this.connection,t))}else return Promise.resolve(new Do)}};var Mo;(function(e){e.type=new qt.ProgressType})(Mo||(Mo={}));var ju=class{constructor(t,r){this._connection=t,this._token=r}report(t){this._connection.sendProgress(Mo.type,this._token,t)}};function mp(e,t){if(t===void 0||t.partialResultToken===void 0)return;let r=t.partialResultToken;return delete t.partialResultToken,new ju(e,r)}tn.attachPartialResult=mp});var Mu=W(Io=>{"use strict";Object.defineProperty(Io,"__esModule",{value:!0});var vp=Ct(),yp=yn();Io.ConfigurationFeature=e=>class extends e{getConfiguration(t){return t?yp.string(t)?this._getConfiguration({section:t}):this._getConfiguration(t):this._getConfiguration({})}_getConfiguration(t){let r={items:Array.isArray(t)?t:[t]};return this.connection.sendRequest(vp.ConfigurationRequest.type,r).then(n=>Array.isArray(t)?n:n[0])}}});var Iu=W(Lo=>{"use strict";Object.defineProperty(Lo,"__esModule",{value:!0});var $n=Ct();Lo.WorkspaceFoldersFeature=e=>class extends e{initialize(t){let r=t.workspace;r&&r.workspaceFolders&&(this._onDidChangeWorkspaceFolders=new $n.Emitter,this.connection.onNotification($n.DidChangeWorkspaceFoldersNotification.type,n=>{this._onDidChangeWorkspaceFolders.fire(n.event)}))}getWorkspaceFolders(){return this.connection.sendRequest($n.WorkspaceFoldersRequest.type)}get onDidChangeWorkspaceFolders(){if(!this._onDidChangeWorkspaceFolders)throw new Error("Client doesn't support sending workspace folder change events.");return this._unregistration||(this._unregistration=this.connection.client.register($n.DidChangeWorkspaceFoldersNotification.type)),this._onDidChangeWorkspaceFolders.event}}});var Lu=W(Wo=>{"use strict";Object.defineProperty(Wo,"__esModule",{value:!0});var $o=Ct();Wo.CallHierarchyFeature=e=>class extends e{get callHierarchy(){return{onPrepare:t=>{this.connection.onRequest($o.CallHierarchyPrepareRequest.type,(r,n)=>t(r,n,this.attachWorkDoneProgress(r),void 0))},onIncomingCalls:t=>{let r=$o.CallHierarchyIncomingCallsRequest.type;this.connection.onRequest(r,(n,i)=>t(n,i,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(r,n)))},onOutgoingCalls:t=>{let r=$o.CallHierarchyOutgoingCallsRequest.type;this.connection.onRequest(r,(n,i)=>t(n,i,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(r,n)))}}}}});var Yo=W(ke=>{"use strict";Object.defineProperty(ke,"__esModule",{value:!0});var I=Ct(),Je=yn(),Vo=Ao(),J=Du(),bp=Mu(),wp=Iu(),Cp=Lu();function Ho(e){if(e!==null)return e}var Wu=class{constructor(t){this._documents=Object.create(null),this._configuration=t,this._onDidChangeContent=new I.Emitter,this._onDidOpen=new I.Emitter,this._onDidClose=new I.Emitter,this._onDidSave=new I.Emitter,this._onWillSave=new I.Emitter}get onDidChangeContent(){return this._onDidChangeContent.event}get onDidOpen(){return this._onDidOpen.event}get onWillSave(){return this._onWillSave.event}onWillSaveWaitUntil(t){this._willSaveWaitUntil=t}get onDidSave(){return this._onDidSave.event}get onDidClose(){return this._onDidClose.event}get(t){return this._documents[t]}all(){return Object.keys(this._documents).map(t=>this._documents[t])}keys(){return Object.keys(this._documents)}listen(t){t.__textDocumentSync=I.TextDocumentSyncKind.Full,t.onDidOpenTextDocument(r=>{let n=r.textDocument,i=this._configuration.create(n.uri,n.languageId,n.version,n.text);this._documents[n.uri]=i;let o=Object.freeze({document:i});this._onDidOpen.fire(o),this._onDidChangeContent.fire(o)}),t.onDidChangeTextDocument(r=>{let n=r.textDocument,i=r.contentChanges;if(i.length===0)return;let o=this._documents[n.uri],{version:s}=n;if(s==null)throw new Error(`Received document change event for ${n.uri} without valid version identifier`);o=this._configuration.update(o,i,s),this._documents[n.uri]=o,this._onDidChangeContent.fire(Object.freeze({document:o}))}),t.onDidCloseTextDocument(r=>{let n=this._documents[r.textDocument.uri];n&&(delete this._documents[r.textDocument.uri],this._onDidClose.fire(Object.freeze({document:n})))}),t.onWillSaveTextDocument(r=>{let n=this._documents[r.textDocument.uri];n&&this._onWillSave.fire(Object.freeze({document:n,reason:r.reason}))}),t.onWillSaveTextDocumentWaitUntil((r,n)=>{let i=this._documents[r.textDocument.uri];return i&&this._willSaveWaitUntil?this._willSaveWaitUntil(Object.freeze({document:i,reason:r.reason}),n):[]}),t.onDidSaveTextDocument(r=>{let n=this._documents[r.textDocument.uri];n&&this._onDidSave.fire(Object.freeze({document:n}))})}};ke.TextDocuments=Wu;var $u=class{constructor(){this._messages=Object.create(null)}add(t){let r=this._messages[t];r||(r=0),r++,this._messages[t]=r}sendErrors(t){Object.keys(this._messages).forEach(r=>{t.window.showErrorMessage(r)})}};ke.ErrorMessageTracker=$u;var zo=class{constructor(){}rawAttach(t){this._rawConnection=t}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}fillServerCapabilities(t){}initialize(t){}error(t){this.send(I.MessageType.Error,t)}warn(t){this.send(I.MessageType.Warning,t)}info(t){this.send(I.MessageType.Info,t)}log(t){this.send(I.MessageType.Log,t)}send(t,r){this._rawConnection&&this._rawConnection.sendNotification(I.LogMessageNotification.type,{type:t,message:r})}},Vu=class{constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}showErrorMessage(t,...r){let n={type:I.MessageType.Error,message:t,actions:r};return this.connection.sendRequest(I.ShowMessageRequest.type,n).then(Ho)}showWarningMessage(t,...r){let n={type:I.MessageType.Warning,message:t,actions:r};return this.connection.sendRequest(I.ShowMessageRequest.type,n).then(Ho)}showInformationMessage(t,...r){let n={type:I.MessageType.Info,message:t,actions:r};return this.connection.sendRequest(I.ShowMessageRequest.type,n).then(Ho)}},Hu=J.ProgressFeature(Vu),xp;(function(e){function t(){return new Bo}e.create=t})(xp=ke.BulkRegistration||(ke.BulkRegistration={}));var Bo=class{constructor(){this._registrations=[],this._registered=new Set}add(t,r){let n=Je.string(t)?t:t.method;if(this._registered.has(n))throw new Error(`${n} is already added to this registration`);let i=Vo.generateUuid();this._registrations.push({id:i,method:n,registerOptions:r||{}}),this._registered.add(n)}asRegistrationParams(){return{registrations:this._registrations}}},Sp;(function(e){function t(){return new Vn(void 0,[])}e.create=t})(Sp=ke.BulkUnregistration||(ke.BulkUnregistration={}));var Vn=class{constructor(t,r){this._connection=t,this._unregistrations=new Map,r.forEach(n=>{this._unregistrations.set(n.method,n)})}get isAttached(){return!!this._connection}attach(t){this._connection=t}add(t){this._unregistrations.set(t.method,t)}dispose(){let t=[];for(let n of this._unregistrations.values())t.push(n);let r={unregisterations:t};this._connection.sendRequest(I.UnregistrationRequest.type,r).then(void 0,n=>{this._connection.console.info("Bulk unregistration failed.")})}disposeSingle(t){let r=Je.string(t)?t:t.method,n=this._unregistrations.get(r);if(!n)return!1;let i={unregisterations:[n]};return this._connection.sendRequest(I.UnregistrationRequest.type,i).then(()=>{this._unregistrations.delete(r)},o=>{this._connection.console.info(`Unregistering request handler for ${n.id} failed.`)}),!0}},Jo=class{attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}register(t,r,n){return t instanceof Bo?this.registerMany(t):t instanceof Vn?this.registerSingle1(t,r,n):this.registerSingle2(t,r)}registerSingle1(t,r,n){let i=Je.string(r)?r:r.method,o=Vo.generateUuid(),s={registrations:[{id:o,method:i,registerOptions:n||{}}]};return t.isAttached||t.attach(this.connection),this.connection.sendRequest(I.RegistrationRequest.type,s).then(u=>(t.add({id:o,method:i}),t),u=>(this.connection.console.info(`Registering request handler for ${i} failed.`),Promise.reject(u)))}registerSingle2(t,r){let n=Je.string(t)?t:t.method,i=Vo.generateUuid(),o={registrations:[{id:i,method:n,registerOptions:r||{}}]};return this.connection.sendRequest(I.RegistrationRequest.type,o).then(s=>I.Disposable.create(()=>{this.unregisterSingle(i,n)}),s=>(this.connection.console.info(`Registering request handler for ${n} failed.`),Promise.reject(s)))}unregisterSingle(t,r){let n={unregisterations:[{id:t,method:r}]};return this.connection.sendRequest(I.UnregistrationRequest.type,n).then(void 0,i=>{this.connection.console.info(`Unregistering request handler for ${t} failed.`)})}registerMany(t){let r=t.asRegistrationParams();return this.connection.sendRequest(I.RegistrationRequest.type,r).then(()=>new Vn(this._connection,r.registrations.map(n=>({id:n.id,method:n.method}))),n=>(this.connection.console.info("Bulk registration failed."),Promise.reject(n)))}},zu=class{constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}applyEdit(t){function r(i){return i&&!!i.edit}let n=r(t)?t:{edit:t};return this.connection.sendRequest(I.ApplyWorkspaceEditRequest.type,n)}},Bu=wp.WorkspaceFoldersFeature(bp.ConfigurationFeature(zu)),Uo=class{constructor(){this._trace=I.Trace.Off}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}set trace(t){this._trace=t}log(t,r){this._trace!==I.Trace.Off&&this.connection.sendNotification(I.LogTraceNotification.type,{message:t,verbose:this._trace===I.Trace.Verbose?r:void 0})}},Go=class{constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}logEvent(t){this.connection.sendNotification(I.TelemetryEventNotification.type,t)}},Xo=class{constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}attachWorkDoneProgress(t){return J.attachWorkDone(this.connection,t)}attachPartialResultProgress(t,r){return J.attachPartialResult(this.connection,r)}};ke._LanguagesImpl=Xo;var Ju=Cp.CallHierarchyFeature(Xo);function Uu(e,t){return function(r){return t(e(r))}}ke.combineConsoleFeatures=Uu;function Gu(e,t){return function(r){return t(e(r))}}ke.combineTelemetryFeatures=Gu;function Xu(e,t){return function(r){return t(e(r))}}ke.combineTracerFeatures=Xu;function Yu(e,t){return function(r){return t(e(r))}}ke.combineClientFeatures=Yu;function Zu(e,t){return function(r){return t(e(r))}}ke.combineWindowFeatures=Zu;function Qu(e,t){return function(r){return t(e(r))}}ke.combineWorkspaceFeatures=Qu;function Tp(e,t){return function(r){return t(e(r))}}ke.combineLanguagesFeatures=Tp;function kp(e,t){function r(i,o,s){return i&&o?s(i,o):i||o}return{__brand:"features",console:r(e.console,t.console,Uu),tracer:r(e.tracer,t.tracer,Xu),telemetry:r(e.telemetry,t.telemetry,Gu),client:r(e.client,t.client,Yu),window:r(e.window,t.window,Zu),workspace:r(e.workspace,t.workspace,Qu)}}ke.combineFeatures=kp;function _p(e,t,r){let n=r&&r.console?new(r.console(zo)):new zo,i=e(n);n.rawAttach(i);let o=r&&r.tracer?new(r.tracer(Uo)):new Uo,s=r&&r.telemetry?new(r.telemetry(Go)):new Go,u=r&&r.client?new(r.client(Jo)):new Jo,l=r&&r.window?new(r.window(Hu)):new Hu,f=r&&r.workspace?new(r.workspace(Bu)):new Bu,a=r&&r.languages?new(r.languages(Ju)):new Ju,c=[n,o,s,u,l,f,a];function m(p){return p instanceof Promise?p:Je.thenable(p)?new Promise((h,g)=>{p.then(O=>h(O),O=>g(O))}):Promise.resolve(p)}let y,x,T,C={listen:()=>i.listen(),sendRequest:(p,...h)=>i.sendRequest(Je.string(p)?p:p.method,...h),onRequest:(p,h)=>i.onRequest(p,h),sendNotification:(p,h)=>{let g=Je.string(p)?p:p.method;arguments.length===1?i.sendNotification(g):i.sendNotification(g,h)},onNotification:(p,h)=>i.onNotification(p,h),onProgress:i.onProgress,sendProgress:i.sendProgress,onInitialize:p=>x=p,onInitialized:p=>i.onNotification(I.InitializedNotification.type,p),onShutdown:p=>y=p,onExit:p=>T=p,get console(){return n},get telemetry(){return s},get tracer(){return o},get client(){return u},get window(){return l},get workspace(){return f},get languages(){return a},onDidChangeConfiguration:p=>i.onNotification(I.DidChangeConfigurationNotification.type,p),onDidChangeWatchedFiles:p=>i.onNotification(I.DidChangeWatchedFilesNotification.type,p),__textDocumentSync:void 0,onDidOpenTextDocument:p=>i.onNotification(I.DidOpenTextDocumentNotification.type,p),onDidChangeTextDocument:p=>i.onNotification(I.DidChangeTextDocumentNotification.type,p),onDidCloseTextDocument:p=>i.onNotification(I.DidCloseTextDocumentNotification.type,p),onWillSaveTextDocument:p=>i.onNotification(I.WillSaveTextDocumentNotification.type,p),onWillSaveTextDocumentWaitUntil:p=>i.onRequest(I.WillSaveTextDocumentWaitUntilRequest.type,p),onDidSaveTextDocument:p=>i.onNotification(I.DidSaveTextDocumentNotification.type,p),sendDiagnostics:p=>i.sendNotification(I.PublishDiagnosticsNotification.type,p),onHover:p=>i.onRequest(I.HoverRequest.type,(h,g)=>p(h,g,J.attachWorkDone(i,h),void 0)),onCompletion:p=>i.onRequest(I.CompletionRequest.type,(h,g)=>p(h,g,J.attachWorkDone(i,h),J.attachPartialResult(i,h))),onCompletionResolve:p=>i.onRequest(I.CompletionResolveRequest.type,p),onSignatureHelp:p=>i.onRequest(I.SignatureHelpRequest.type,(h,g)=>p(h,g,J.attachWorkDone(i,h),void 0)),onDeclaration:p=>i.onRequest(I.DeclarationRequest.type,(h,g)=>p(h,g,J.attachWorkDone(i,h),J.attachPartialResult(i,h))),onDefinition:p=>i.onRequest(I.DefinitionRequest.type,(h,g)=>p(h,g,J.attachWorkDone(i,h),J.attachPartialResult(i,h))),onTypeDefinition:p=>i.onRequest(I.TypeDefinitionRequest.type,(h,g)=>p(h,g,J.attachWorkDone(i,h),J.attachPartialResult(i,h))),onImplementation:p=>i.onRequest(I.ImplementationRequest.type,(h,g)=>p(h,g,J.attachWorkDone(i,h),J.attachPartialResult(i,h))),onReferences:p=>i.onRequest(I.ReferencesRequest.type,(h,g)=>p(h,g,J.attachWorkDone(i,h),J.attachPartialResult(i,h))),onDocumentHighlight:p=>i.onRequest(I.DocumentHighlightRequest.type,(h,g)=>p(h,g,J.attachWorkDone(i,h),J.attachPartialResult(i,h))),onDocumentSymbol:p=>i.onRequest(I.DocumentSymbolRequest.type,(h,g)=>p(h,g,J.attachWorkDone(i,h),J.attachPartialResult(i,h))),onWorkspaceSymbol:p=>i.onRequest(I.WorkspaceSymbolRequest.type,(h,g)=>p(h,g,J.attachWorkDone(i,h),J.attachPartialResult(i,h))),onCodeAction:p=>i.onRequest(I.CodeActionRequest.type,(h,g)=>p(h,g,J.attachWorkDone(i,h),J.attachPartialResult(i,h))),onCodeLens:p=>i.onRequest(I.CodeLensRequest.type,(h,g)=>p(h,g,J.attachWorkDone(i,h),J.attachPartialResult(i,h))),onCodeLensResolve:p=>i.onRequest(I.CodeLensResolveRequest.type,(h,g)=>p(h,g)),onDocumentFormatting:p=>i.onRequest(I.DocumentFormattingRequest.type,(h,g)=>p(h,g,J.attachWorkDone(i,h),void 0)),onDocumentRangeFormatting:p=>i.onRequest(I.DocumentRangeFormattingRequest.type,(h,g)=>p(h,g,J.attachWorkDone(i,h),void 0)),onDocumentOnTypeFormatting:p=>i.onRequest(I.DocumentOnTypeFormattingRequest.type,(h,g)=>p(h,g)),onRenameRequest:p=>i.onRequest(I.RenameRequest.type,(h,g)=>p(h,g,J.attachWorkDone(i,h),void 0)),onPrepareRename:p=>i.onRequest(I.PrepareRenameRequest.type,(h,g)=>p(h,g)),onDocumentLinks:p=>i.onRequest(I.DocumentLinkRequest.type,(h,g)=>p(h,g,J.attachWorkDone(i,h),J.attachPartialResult(i,h))),onDocumentLinkResolve:p=>i.onRequest(I.DocumentLinkResolveRequest.type,(h,g)=>p(h,g)),onDocumentColor:p=>i.onRequest(I.DocumentColorRequest.type,(h,g)=>p(h,g,J.attachWorkDone(i,h),J.attachPartialResult(i,h))),onColorPresentation:p=>i.onRequest(I.ColorPresentationRequest.type,(h,g)=>p(h,g,J.attachWorkDone(i,h),J.attachPartialResult(i,h))),onFoldingRanges:p=>i.onRequest(I.FoldingRangeRequest.type,(h,g)=>p(h,g,J.attachWorkDone(i,h),J.attachPartialResult(i,h))),onSelectionRanges:p=>i.onRequest(I.SelectionRangeRequest.type,(h,g)=>p(h,g,J.attachWorkDone(i,h),J.attachPartialResult(i,h))),onExecuteCommand:p=>i.onRequest(I.ExecuteCommandRequest.type,(h,g)=>p(h,g,J.attachWorkDone(i,h),void 0)),dispose:()=>i.dispose()};for(let p of c)p.attach(C);return i.onRequest(I.InitializeRequest.type,p=>{t.initialize(p),Je.string(p.trace)&&(o.trace=I.Trace.fromString(p.trace));for(let h of c)h.initialize(p.capabilities);if(x){let h=x(p,new I.CancellationTokenSource().token,J.attachWorkDone(i,p),void 0);return m(h).then(g=>{if(g instanceof I.ResponseError)return g;let O=g;O||(O={capabilities:{}});let q=O.capabilities;q||(q={},O.capabilities=q),q.textDocumentSync===void 0||q.textDocumentSync===null?q.textDocumentSync=Je.number(C.__textDocumentSync)?C.__textDocumentSync:I.TextDocumentSyncKind.None:!Je.number(q.textDocumentSync)&&!Je.number(q.textDocumentSync.change)&&(q.textDocumentSync.change=Je.number(C.__textDocumentSync)?C.__textDocumentSync:I.TextDocumentSyncKind.None);for(let D of c)D.fillServerCapabilities(q);return O})}else{let h={capabilities:{textDocumentSync:I.TextDocumentSyncKind.None}};for(let g of c)g.fillServerCapabilities(h.capabilities);return h}}),i.onRequest(I.ShutdownRequest.type,()=>{if(t.shutdownReceived=!0,y)return y(new I.CancellationTokenSource().token)}),i.onNotification(I.ExitNotification.type,()=>{try{T&&T()}finally{t.shutdownReceived?t.exit(0):t.exit(1)}}),i.onNotification(I.SetTraceNotification.type,p=>{o.trace=I.Trace.fromString(p.value)}),C}ke.createConnection=_p});var ec=W(St=>{"use strict";Object.defineProperty(St,"__esModule",{value:!0});var Pp=require("url"),ot=require("path"),Zo=require("fs"),Qo=require("child_process");function Rp(e){let t=Pp.parse(e);if(t.protocol!=="file:"||!t.path)return;let r=t.path.split("/");for(var n=0,i=r.length;n1){let o=r[0],s=r[1];o.length===0&&s.length>1&&s[1]===":"&&r.shift()}return ot.normalize(r.join("/"))}St.uriToFilePath=Rp;function Ko(){return process.platform==="win32"}function Hn(e,t,r,n){let i="NODE_PATH",o=["var p = process;","p.on('message',function(m){","if(m.c==='e'){","p.exit(0);","}","else if(m.c==='rs'){","try{","var r=require.resolve(m.a);","p.send({c:'r',s:true,r:r});","}","catch(err){","p.send({c:'r',s:false});","}","}","});"].join("");return new Promise((s,u)=>{let l=process.env,f=Object.create(null);Object.keys(l).forEach(a=>f[a]=l[a]),t&&Zo.existsSync(t)&&(f[i]?f[i]=t+ot.delimiter+f[i]:f[i]=t,n&&n(`NODE_PATH value is: ${f[i]}`)),f.ELECTRON_RUN_AS_NODE="1";try{let a=Qo.fork("",[],{cwd:r,env:f,execArgv:["-e",o]});if(a.pid===void 0){u(new Error(`Starting process to resolve node module ${e} failed`));return}a.on("error",m=>{u(m)}),a.on("message",m=>{m.c==="r"&&(a.send({c:"e"}),m.s?s(m.r):u(new Error(`Failed to resolve module: ${e}`)))});let c={c:"rs",a:e};a.send(c)}catch(a){u(a)}})}St.resolve=Hn;function es(e){let t="npm",r=Object.create(null);Object.keys(process.env).forEach(o=>r[o]=process.env[o]),r.NO_UPDATE_NOTIFIER="true";let n={encoding:"utf8",env:r};Ko()&&(t="npm.cmd",n.shell=!0);let i=()=>{};try{process.on("SIGPIPE",i);let o=Qo.spawnSync(t,["config","get","prefix"],n).stdout;if(!o){e&&e("'npm config get prefix' didn't return a value.");return}let s=o.trim();return e&&e(`'npm config get prefix' value is: ${s}`),s.length>0?Ko()?ot.join(s,"node_modules"):ot.join(s,"lib","node_modules"):void 0}catch(o){return}finally{process.removeListener("SIGPIPE",i)}}St.resolveGlobalNodePath=es;function Ep(e){let t="yarn",r={encoding:"utf8"};Ko()&&(t="yarn.cmd",r.shell=!0);let n=()=>{};try{process.on("SIGPIPE",n);let i=Qo.spawnSync(t,["global","dir","--json"],r),o=i.stdout;if(!o){e&&(e("'yarn global dir' didn't return a value."),i.stderr&&e(i.stderr));return}let s=o.trim().split(/\r?\n/);for(let u of s)try{let l=JSON.parse(u);if(l.type==="log")return ot.join(l.data,"node_modules")}catch(l){}return}catch(i){return}finally{process.removeListener("SIGPIPE",n)}}St.resolveGlobalYarnPath=Ep;var Ku;(function(e){let t;function r(){return t!==void 0||(process.platform==="win32"?t=!1:t=!Zo.existsSync(__filename.toUpperCase())||!Zo.existsSync(__filename.toLowerCase())),t}e.isCaseSensitive=r;function n(i,o){return r()?ot.normalize(o).indexOf(ot.normalize(i))===0:ot.normalize(o).toLowerCase().indexOf(ot.normalize(i).toLowerCase())===0}e.isParent=n})(Ku=St.FileSystem||(St.FileSystem={}));function Op(e,t,r,n){return r?(ot.isAbsolute(r)||(r=ot.join(e,r)),Hn(t,r,r,n).then(i=>Ku.isParent(r,i)?i:Promise.reject(new Error(`Failed to load ${t} from node path location.`))).then(void 0,i=>Hn(t,es(n),e,n))):Hn(t,es(n),e,n)}St.resolveModulePath=Op});var rc=W((oy,tc)=>{"use strict";tc.exports=Ct()});var ic=W(zn=>{"use strict";Object.defineProperty(zn,"__esModule",{value:!0});var ts=Ct();zn.SemanticTokensFeature=e=>class extends e{get semanticTokens(){return{on:t=>{let r=ts.Proposed.SemanticTokensRequest.type;this.connection.onRequest(r,(n,i)=>t(n,i,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(r,n)))},onEdits:t=>{let r=ts.Proposed.SemanticTokensEditsRequest.type;this.connection.onRequest(r,(n,i)=>t(n,i,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(r,n)))},onRange:t=>{let r=ts.Proposed.SemanticTokensRangeRequest.type;this.connection.onRequest(r,(n,i)=>t(n,i,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(r,n)))}}}};var nc=class{constructor(){this._prevData=void 0,this.initialize()}initialize(){this._id=Date.now(),this._prevLine=0,this._prevChar=0,this._data=[],this._dataLen=0}push(t,r,n,i,o){let s=t,u=r;this._dataLen>0&&(s-=this._prevLine,s===0&&(u-=this._prevChar)),this._data[this._dataLen++]=s,this._data[this._dataLen++]=u,this._data[this._dataLen++]=n,this._data[this._dataLen++]=i,this._data[this._dataLen++]=o,this._prevLine=t,this._prevChar=r}get id(){return this._id.toString()}previousResult(t){this.id===t&&(this._prevData=this._data),this.initialize()}build(){return this._prevData=void 0,{resultId:this.id,data:this._data}}canBuildEdits(){return this._prevData!==void 0}buildEdits(){if(this._prevData!==void 0){let t=this._prevData.length,r=this._data.length,n=0;for(;n{"use strict";function oc(e){for(var t in e)Cr.hasOwnProperty(t)||(Cr[t]=e[t])}Object.defineProperty(Cr,"__esModule",{value:!0});var sc=ic();oc(Ct());oc(Yo());var Np;(function(e){e.all={__brand:"features",languages:sc.SemanticTokensFeature},e.SemanticTokensBuilder=sc.SemanticTokensBuilder})(Np=Cr.ProposedFeatures||(Cr.ProposedFeatures={}))});var Bn=W(Xt=>{"use strict";function Fp(e){for(var t in e)Xt.hasOwnProperty(t)||(Xt[t]=e[t])}Object.defineProperty(Xt,"__esModule",{value:!0});var rs=yn(),qp=Yo(),rn=ec(),Yt=rc();Fp(ac());var Ap;(function(e){e.uriToFilePath=rn.uriToFilePath,e.resolveGlobalNodePath=rn.resolveGlobalNodePath,e.resolveGlobalYarnPath=rn.resolveGlobalYarnPath,e.resolve=rn.resolve,e.resolveModulePath=rn.resolveModulePath})(Ap=Xt.Files||(Xt.Files={}));var xr=!1,uc;function jp(){let e="--clientProcessId";function t(r){try{let n=parseInt(r);isNaN(n)||(uc=setInterval(()=>{try{process.kill(n,0)}catch(i){process.exit(xr?0:1)}},3e3))}catch(n){}}for(let r=2;r{let t=e.processId;rs.number(t)&&uc===void 0&&setInterval(()=>{try{process.kill(t,0)}catch(r){process.exit(xr?0:1)}},3e3)},get shutdownReceived(){return xr},set shutdownReceived(e){xr=e},exit:e=>{process.exit(e)}};function Ip(e,t,r,n){let i,o,s,u;return e!==void 0&&e.__brand==="features"&&(i=e,e=t,t=r,r=n),Yt.ConnectionStrategy.is(e)||Yt.ConnectionOptions.is(e)?u=e:(o=e,s=t,u=r),Mp(o,s,u,i)}Xt.createConnection=Ip;function Mp(e,t,r,n){if(!e&&!t&&process.argv.length>2){let u,l,f=process.argv.slice(2);for(let a=0;a{process.exit(xr?0:1)}),u.on("close",()=>{process.exit(xr?0:1)})}let s=u=>Yt.createProtocolConnection(e,t,u,r);return qp.createConnection(s,Dp,n)}});var lc=W((cy,cc)=>{"use strict";cc.exports=Bn()});var hs=W(ls=>{"use strict";Object.defineProperty(ls,"__esModule",{value:!0});var fs;function ds(){if(fs===void 0)throw new Error("No runtime abstraction layer installed");return fs}(function(e){function t(r){if(r===void 0)throw new Error("No runtime abstraction layer provided");fs=r}e.install=t})(ds||(ds={}));ls.default=ds});var gs=W(ce=>{"use strict";Object.defineProperty(ce,"__esModule",{value:!0});ce.config=ce.loadMessageBundle=ce.localize=ce.format=ce.setPseudo=ce.isPseudo=ce.isDefined=ce.BundleFormat=ce.MessageFormat=void 0;var xc=hs(),Bp;(function(e){e.file="file",e.bundle="bundle",e.both="both"})(Bp=ce.MessageFormat||(ce.MessageFormat={}));var Jp;(function(e){e.standalone="standalone",e.languagePack="languagePack"})(Jp=ce.BundleFormat||(ce.BundleFormat={}));var Sc;(function(e){function t(r){var n=r;return n&&ps(n.key)&&ps(n.comment)}e.is=t})(Sc||(Sc={}));function ps(e){return typeof e!="undefined"}ce.isDefined=ps;ce.isPseudo=!1;function Up(e){ce.isPseudo=e}ce.setPseudo=Up;function Tc(e,t){var r;return ce.isPseudo&&(e="\uFF3B"+e.replace(/[aouei]/g,"$&$&")+"\uFF3D"),t.length===0?r=e:r=e.replace(/\{(\d+)\}/g,function(n,i){var o=i[0],s=t[o],u=n;return typeof s=="string"?u=s:(typeof s=="number"||typeof s=="boolean"||s===void 0||s===null)&&(u=String(s)),u}),r}ce.format=Tc;function Gp(e,t){for(var r=[],n=2;n{"use strict";Object.defineProperty(At,"__esModule",{value:!0});At.config=At.loadMessageBundle=void 0;var at=require("path"),Ge=require("fs"),Zp=hs(),Ve=gs(),kc=gs();Object.defineProperty(At,"MessageFormat",{enumerable:!0,get:function(){return kc.MessageFormat}});Object.defineProperty(At,"BundleFormat",{enumerable:!0,get:function(){return kc.BundleFormat}});var _c=Object.prototype.toString;function Qp(e){return _c.call(e)==="[object Number]"}function Tt(e){return _c.call(e)==="[object String]"}function Kp(e){return e===!0||e===!1}function Er(e){return JSON.parse(Ge.readFileSync(e,"utf8"))}var Zn,Z;function eg(){if(Z={locale:void 0,language:void 0,languagePackSupport:!1,cacheLanguageResolution:!0,messageFormat:Ve.MessageFormat.bundle},Tt(process.env.VSCODE_NLS_CONFIG))try{var e=JSON.parse(process.env.VSCODE_NLS_CONFIG),t=void 0;if(e.availableLanguages){var r=e.availableLanguages["*"];Tt(r)&&(t=r)}if(Tt(e.locale)&&(Z.locale=e.locale.toLowerCase()),t===void 0?Z.language=Z.locale:t!=="en"&&(Z.language=t),Kp(e._languagePackSupport)&&(Z.languagePackSupport=e._languagePackSupport),Tt(e._cacheRoot)&&(Z.cacheRoot=e._cacheRoot),Tt(e._languagePackId)&&(Z.languagePackId=e._languagePackId),Tt(e._translationsConfigFile)){Z.translationsConfigFile=e._translationsConfigFile;try{Z.translationsConfig=Er(Z.translationsConfigFile)}catch(i){if(e._corruptedFile){var n=at.dirname(e._corruptedFile);Ge.exists(n,function(o){o&&Ge.writeFile(e._corruptedFile,"corrupted","utf8",function(s){console.error(s)})})}}}}catch(i){}Ve.setPseudo(Z.locale==="pseudo"),Zn=Object.create(null)}eg();function tg(){return Z.languagePackSupport===!0&&Z.cacheRoot!==void 0&&Z.languagePackId!==void 0&&Z.translationsConfigFile!==void 0&&Z.translationsConfig!==void 0}function ms(e){return function(t,r){for(var n=[],i=2;i=e.length){console.error(`Broken localize call found. Index out of bounds. Stacktrace is : `+new Error("").stack);return}return Ve.format(e[t],n)}else{if(Tt(r))return console.warn("Message "+r+" didn't get externalized correctly."),Ve.format(r,n);console.error(`Broken localize call found. Stacktrace is : `+new Error("").stack)}}}function rg(e){var t;if(Z.cacheLanguageResolution&&t)t=t;else{if(Ve.isPseudo||!Z.language)t=".nls.json";else for(var r=Z.language;r;){var n=".nls."+r+".json";if(Ge.existsSync(e+n)){t=n;break}else{var i=r.lastIndexOf("-");i>0?r=r.substring(0,i):(t=".nls.json",r=null)}}Z.cacheLanguageResolution&&(t=t)}return e+t}function ng(e){for(var t=Z.language;t;){var r=at.join(e,"nls.bundle."+t+".json");if(Ge.existsSync(r))return r;var n=t.lastIndexOf("-");n>0?t=t.substring(0,n):t=void 0}if(t===void 0){var r=at.join(e,"nls.bundle.json");if(Ge.existsSync(r))return r}}function ig(e){var t=Er(at.join(e,"nls.metadata.json")),r=Object.create(null);for(var n in t){var i=t[n];r[n]=i.messages}return r}function og(e,t){var r=Z.translationsConfig[e.id];if(!!r){var n=Er(r).contents,i=Er(at.join(t,"nls.metadata.json")),o=Object.create(null);for(var s in i){var u=i[s],l=n[e.outDir+"/"+s];if(l){for(var f=[],a=0;a{"use strict";var hl=require("url"),Kt=require("https"),pl="__agent_base_https_request_patched__";Kt.request[pl]||(Kt.request=function(e){return function(t,r){let n;return typeof t=="string"?n=hl.parse(t):n=Object.assign({},t),n.port==null&&(n.port=443),n.secureEndpoint=!0,e.call(Kt,n,r)}}(Kt.request),Kt.request[pl]=!0);Kt.get=function(e,t,r){let n;typeof e=="string"&&t&&typeof t!="function"?n=Object.assign({},hl.parse(e),t):!t&&!r?n=e:r||(n=e,r=t);let i=Kt.request(n,r);return i.end(),i}});var ml=W((As,js)=>{(function(e,t){typeof As=="object"&&typeof js!="undefined"?js.exports=t():typeof define=="function"&&define.amd?define(t):e.ES6Promise=t()})(As,function(){"use strict";function e(N){var M=typeof N;return N!==null&&(M==="object"||M==="function")}function t(N){return typeof N=="function"}var r=void 0;Array.isArray?r=Array.isArray:r=function(N){return Object.prototype.toString.call(N)==="[object Array]"};var n=r,i=0,o=void 0,s=void 0,u=function(M,d){O[i]=M,O[i+1]=d,i+=2,i===2&&(s?s(q):_())};function l(N){s=N}function f(N){u=N}var a=typeof window!="undefined"?window:void 0,c=a||{},m=c.MutationObserver||c.WebKitMutationObserver,y=typeof self=="undefined"&&typeof process!="undefined"&&{}.toString.call(process)==="[object process]",x=typeof Uint8ClampedArray!="undefined"&&typeof importScripts!="undefined"&&typeof MessageChannel!="undefined";function T(){return function(){return process.nextTick(q)}}function C(){return typeof o!="undefined"?function(){o(q)}:g()}function p(){var N=0,M=new m(q),d=document.createTextNode("");return M.observe(d,{characterData:!0}),function(){d.data=N=++N%2}}function h(){var N=new MessageChannel;return N.port1.onmessage=q,function(){return N.port2.postMessage(0)}}function g(){var N=setTimeout;return function(){return N(q,1)}}var O=new Array(1e3);function q(){for(var N=0;N{"use strict";vl.exports=function(){"use strict";var e=void 0;function t(n){return typeof n=="function"}global!==void 0?e=global:window!==void 0&&window.document?e=window:e=self;var r=function(){if(!e.hasOwnProperty("Promise"))return!1;var n=e.Promise;return!n.hasOwnProperty("resolve")||!n.hasOwnProperty("reject")||!n.hasOwnProperty("all")||!n.hasOwnProperty("race")?!1:function(){var i=void 0,o=new e.Promise(function(s){i=s});return o?t(i):!1}()}();return r?e.Promise:ml().Promise}()});var wl=W((o0,bl)=>{"use strict";bl.exports=function(){"use strict";var e=yl();function t(r){return r&&typeof r.then=="function"&&typeof r.catch=="function"}return function(n,i){return function(){for(var o=arguments.length,s=Array(o),u=0;u1?T-1:0),p=1;p{"use strict";gl();var Ug=require("util").inherits,Gg=wl(),xl=require("events").EventEmitter;Cl.exports=er;function Xg(e){return e&&typeof e.addRequest=="function"}function er(e,t){if(!(this instanceof er))return new er(e,t);xl.call(this),this._promisifiedCallback=!1;let r=t;typeof e=="function"?this.callback=e:e&&(r=e),this.timeout=r&&r.timeout||null,this.options=r}Ug(er,xl);er.prototype.callback=function(t,r){throw new Error('"agent-base" has no default implementation, you must subclass and override `callback()`')};er.prototype.addRequest=function(t,r){let n=Object.assign({},r);n.host==null&&(n.host="localhost"),n.port==null&&(n.port=n.secureEndpoint?443:80);let i=Object.assign({},this.options,n);i.host&&i.path&&delete i.path,delete i.agent,delete i.hostname,delete i._defaultAgent,delete i.defaultPort,delete i.createConnection,t._last=!0,t.shouldKeepAlive=!1;let o,s=!1,u=this.timeout,l=this.freeSocket;function f(y){t._hadError||(t.emit("error",y),t._hadError=!0)}function a(){o=null,s=!0;let y=new Error('A "socket" was not created for HTTP request before '+u+"ms");y.code="ETIMEOUT",f(y)}function c(y){s||(o!=null&&(clearTimeout(o),o=null),f(y))}function m(y){if(!s)if(o!=null&&(clearTimeout(o),o=null),Xg(y))y.addRequest(t,i);else if(y){function x(){l(y,i)}y.on("free",x),t.onSocket(y)}else{let T=new Error("no Duplex stream was returned to agent-base for `"+t.method+" "+t.path+"`");f(T)}}!this._promisifiedCallback&&this.callback.length>=3&&(this.callback=Gg(this.callback,this),this._promisifiedCallback=!0),u>0&&(o=setTimeout(a,u));try{Promise.resolve(this.callback(t,i)).then(m,c)}catch(y){Promise.reject(y).catch(c)}};er.prototype.freeSocket=function(t,r){t.destroy()}});var Tl=W((a0,Sl)=>{var cn=1e3,ln=cn*60,fn=ln*60,dn=fn*24,Yg=dn*365.25;Sl.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return Zg(e);if(r==="number"&&isNaN(e)===!1)return t.long?Kg(e):Qg(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function Zg(e){if(e=String(e),!(e.length>100)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(!!t){var r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*Yg;case"days":case"day":case"d":return r*dn;case"hours":case"hour":case"hrs":case"hr":case"h":return r*fn;case"minutes":case"minute":case"mins":case"min":case"m":return r*ln;case"seconds":case"second":case"secs":case"sec":case"s":return r*cn;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function Qg(e){return e>=dn?Math.round(e/dn)+"d":e>=fn?Math.round(e/fn)+"h":e>=ln?Math.round(e/ln)+"m":e>=cn?Math.round(e/cn)+"s":e+"ms"}function Kg(e){return si(e,dn,"day")||si(e,fn,"hour")||si(e,ln,"minute")||si(e,cn,"second")||e+" ms"}function si(e,t,r){if(!(e{Y=kl.exports=Ms.debug=Ms.default=Ms;Y.coerce=em;Y.disable=tm;Y.enable=rm;Y.enabled=nm;Y.humanize=Tl();Y.instances=[];Y.names=[];Y.skips=[];Y.formatters={};function im(e){var t=0,r;for(r in e)t=(t<<5)-t+e.charCodeAt(r),t|=0;return Y.colors[Math.abs(t)%Y.colors.length]}function Ms(e){var t;function r(){if(!!r.enabled){var n=r,i=+new Date,o=i-(t||i);n.diff=o,n.prev=t,n.curr=i,t=i;for(var s=new Array(arguments.length),u=0;u{De=_l.exports=Is();De.log=sm;De.formatArgs=am;De.save=um;De.load=Pl;De.useColors=cm;De.storage=typeof chrome!="undefined"&&typeof chrome.storage!="undefined"?chrome.storage.local:lm();De.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function cm(){return typeof window!="undefined"&&window.process&&window.process.type==="renderer"?!0:typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document!="undefined"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!="undefined"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}De.formatters.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}};function am(e){var t=this.useColors;if(e[0]=(t?"%c":"")+this.namespace+(t?" %c":" ")+e[0]+(t?"%c ":" ")+"+"+De.humanize(this.diff),!!t){var r="color: "+this.color;e.splice(1,0,r,"color: inherit");var n=0,i=0;e[0].replace(/%[a-zA-Z%]/g,function(o){o!=="%%"&&(n++,o==="%c"&&(i=n))}),e.splice(i,0,r)}}function sm(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function um(e){try{e==null?De.storage.removeItem("debug"):De.storage.debug=e}catch(t){}}function Pl(){var e;try{e=De.storage.debug}catch(t){}return!e&&typeof process!="undefined"&&"env"in process&&(e=process.env.DEBUG),e}De.enable(Pl());function lm(){try{return window.localStorage}catch(e){}}});var Nl=W((be,El)=>{var fm=require("tty"),ai=require("util");be=El.exports=Is();be.init=dm;be.log=hm;be.formatArgs=pm;be.save=gm;be.load=Ol;be.useColors=mm;be.colors=[6,2,3,4,5,1];try{Ls=require("supports-color"),Ls&&Ls.level>=2&&(be.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(e){}var Ls;be.inspectOpts=Object.keys(process.env).filter(function(e){return/^debug_/i.test(e)}).reduce(function(e,t){var r=t.substring(6).toLowerCase().replace(/_([a-z])/g,function(i,o){return o.toUpperCase()}),n=process.env[t];return/^(yes|on|true|enabled)$/i.test(n)?n=!0:/^(no|off|false|disabled)$/i.test(n)?n=!1:n==="null"?n=null:n=Number(n),e[r]=n,e},{});function mm(){return"colors"in be.inspectOpts?Boolean(be.inspectOpts.colors):fm.isatty(process.stderr.fd)}be.formatters.o=function(e){return this.inspectOpts.colors=this.useColors,ai.inspect(e,this.inspectOpts).split(` `).map(function(t){return t.trim()}).join(" ")};be.formatters.O=function(e){return this.inspectOpts.colors=this.useColors,ai.inspect(e,this.inspectOpts)};function pm(e){var t=this.namespace,r=this.useColors;if(r){var n=this.color,i="[3"+(n<8?n:"8;5;"+n),o=" "+i+";1m"+t+" ";e[0]=o+e[0].split(` `).join(` `+o),e.push(i+"m+"+be.humanize(this.diff)+"")}else e[0]=vm()+t+" "+e[0]}function vm(){return be.inspectOpts.hideDate?"":new Date().toISOString()+" "}function hm(){return process.stderr.write(ai.format.apply(ai,arguments)+` `)}function gm(e){e==null?delete process.env.DEBUG:process.env.DEBUG=e}function Ol(){return process.env.DEBUG}function dm(e){e.inspectOpts={};for(var t=Object.keys(be.inspectOpts),r=0;r{typeof process=="undefined"||process.type==="renderer"?Ws.exports=Rl():Ws.exports=Nl()});var jl=W((c0,ql)=>{var ym=require("net"),bm=require("tls"),$s=require("url"),Al=Ds(),wm=require("util").inherits,ui=Fl()("http-proxy-agent");ql.exports=hn;function hn(e){if(!(this instanceof hn))return new hn(e);if(typeof e=="string"&&(e=$s.parse(e)),!e)throw new Error("an HTTP(S) proxy server `host` and `port` must be specified!");ui("creating new HttpProxyAgent instance: %o",e),Al.call(this,e);var t=Object.assign({},e);this.secureProxy=t.protocol?/^https:?$/i.test(t.protocol):!1,t.host=t.hostname||t.host,t.port=+t.port||(this.secureProxy?443:80),t.host&&t.path&&(delete t.path,delete t.pathname),this.proxy=t}wm(hn,Al);hn.prototype.callback=function(t,r,n){var i=this.proxy,o=$s.parse(t.path);o.protocol==null&&(o.protocol="http:"),o.hostname==null&&(o.hostname=r.hostname||r.host),o.port==null&&(o.port=r.port),o.port==80&&delete o.port;var s=$s.format(o);t.path=s,i.auth&&t.setHeader("Proxy-Authorization","Basic "+Buffer.from(i.auth).toString("base64"));var u;if(this.secureProxy?u=bm.connect(i):u=ym.connect(i),t._header&&(ui("regenerating stored HTTP header string for request"),t._header=null,t._implicitHeader(),t.output&&t.output.length>0)){ui("patching connection write() output buffer with updated header");var l=t.output[0],f=l.indexOf(`\r \r `)+4;t.output[0]=t._header+l.substring(f),ui("output buffer: %o",t.output)}n(null,u)}});var Ml=W((l0,Dl)=>{var Fr=1e3,qr=Fr*60,Ar=qr*60,tr=Ar*24,Cm=tr*7,xm=tr*365.25;Dl.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return Sm(e);if(r==="number"&&isFinite(e))return t.long?km(e):Tm(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function Sm(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!!t){var r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*xm;case"weeks":case"week":case"w":return r*Cm;case"days":case"day":case"d":return r*tr;case"hours":case"hour":case"hrs":case"hr":case"h":return r*Ar;case"minutes":case"minute":case"mins":case"min":case"m":return r*qr;case"seconds":case"second":case"secs":case"sec":case"s":return r*Fr;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function Tm(e){var t=Math.abs(e);return t>=tr?Math.round(e/tr)+"d":t>=Ar?Math.round(e/Ar)+"h":t>=qr?Math.round(e/qr)+"m":t>=Fr?Math.round(e/Fr)+"s":e+"ms"}function km(e){var t=Math.abs(e);return t>=tr?ci(e,t,tr,"day"):t>=Ar?ci(e,t,Ar,"hour"):t>=qr?ci(e,t,qr,"minute"):t>=Fr?ci(e,t,Fr,"second"):e+" ms"}function ci(e,t,r,n){var i=t>=r*1.5;return Math.round(e/r)+" "+n+(i?"s":"")}});var Vs=W((f0,Il)=>{"use strict";function _m(e){r.debug=r,r.default=r,r.coerce=l,r.disable=s,r.enable=o,r.enabled=u,r.humanize=Ml(),Object.keys(e).forEach(function(f){r[f]=e[f]}),r.instances=[],r.names=[],r.skips=[],r.formatters={};function t(f){for(var a=0,c=0;c{"use strict";function fi(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?fi=function(r){return typeof r}:fi=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},fi(e)}Xe.log=Pm;Xe.formatArgs=Rm;Xe.save=Em;Xe.load=Om;Xe.useColors=Nm;Xe.storage=Fm();Xe.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function Nm(){return typeof window!="undefined"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document!="undefined"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!="undefined"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function Rm(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+li.exports.humanize(this.diff),!!this.useColors){var t="color: "+this.color;e.splice(1,0,t,"color: inherit");var r=0,n=0;e[0].replace(/%[a-zA-Z%]/g,function(i){i!=="%%"&&(r++,i==="%c"&&(n=r))}),e.splice(n,0,t)}}function Pm(){var e;return(typeof console=="undefined"?"undefined":fi(console))==="object"&&console.log&&(e=console).log.apply(e,arguments)}function Em(e){try{e?Xe.storage.setItem("debug",e):Xe.storage.removeItem("debug")}catch(t){}}function Om(){var e;try{e=Xe.storage.getItem("debug")}catch(t){}return!e&&typeof process!="undefined"&&"env"in process&&(e=process.env.DEBUG),e}function Fm(){try{return localStorage}catch(e){}}li.exports=Vs()(Xe);var qm=li.exports.formatters;qm.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var $l=W((Oe,di)=>{"use strict";var Am=require("tty"),hi=require("util");Oe.init=jm;Oe.log=Dm;Oe.formatArgs=Mm;Oe.save=Im;Oe.load=Lm;Oe.useColors=Wm;Oe.colors=[6,2,3,4,5,1];try{pi=require("supports-color"),pi&&(pi.stderr||pi).level>=2&&(Oe.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(e){}var pi;Oe.inspectOpts=Object.keys(process.env).filter(function(e){return/^debug_/i.test(e)}).reduce(function(e,t){var r=t.substring(6).toLowerCase().replace(/_([a-z])/g,function(i,o){return o.toUpperCase()}),n=process.env[t];return/^(yes|on|true|enabled)$/i.test(n)?n=!0:/^(no|off|false|disabled)$/i.test(n)?n=!1:n==="null"?n=null:n=Number(n),e[r]=n,e},{});function Wm(){return"colors"in Oe.inspectOpts?Boolean(Oe.inspectOpts.colors):Am.isatty(process.stderr.fd)}function Mm(e){var t=this.namespace,r=this.useColors;if(r){var n=this.color,i="[3"+(n<8?n:"8;5;"+n),o=" ".concat(i,";1m").concat(t," ");e[0]=o+e[0].split(` `).join(` `+o),e.push(i+"m+"+di.exports.humanize(this.diff)+"")}else e[0]=$m()+t+" "+e[0]}function $m(){return Oe.inspectOpts.hideDate?"":new Date().toISOString()+" "}function Dm(){return process.stderr.write(hi.format.apply(hi,arguments)+` `)}function Im(e){e?process.env.DEBUG=e:delete process.env.DEBUG}function Lm(){return process.env.DEBUG}function jm(e){e.inspectOpts={};for(var t=Object.keys(Oe.inspectOpts),r=0;r{"use strict";typeof process=="undefined"||process.type==="renderer"||process.browser===!0||process.__nwjs?Hs.exports=Ll():Hs.exports=$l()});var Ul=W((h0,Hl)=>{var zl=require("net"),Bl=require("tls"),Vm=require("url"),Hm=require("assert"),Jl=Ds(),zm=require("util").inherits,rr=Vl()("https-proxy-agent");Hl.exports=pn;function pn(e){if(!(this instanceof pn))return new pn(e);if(typeof e=="string"&&(e=Vm.parse(e)),!e)throw new Error("an HTTP(S) proxy server `host` and `port` must be specified!");rr("creating new HttpsProxyAgent instance: %o",e),Jl.call(this,e);var t=Object.assign({},e);this.secureProxy=t.protocol?/^https:?$/i.test(t.protocol):!1,t.host=t.hostname||t.host,t.port=+t.port||(this.secureProxy?443:80),this.secureProxy&&!("ALPNProtocols"in t)&&(t.ALPNProtocols=["http 1.1"]),t.host&&t.path&&(delete t.path,delete t.pathname),this.proxy=t,this.defaultPort=443}zm(pn,Jl);pn.prototype.callback=function(t,r,n){var i=this.proxy,o;this.secureProxy?o=Bl.connect(i):o=zl.connect(i);var s=[],u=0;function l(){var g=o.read();g?y(g):o.once("readable",l)}function f(){o.removeListener("end",c),o.removeListener("error",m),o.removeListener("close",a),o.removeListener("readable",l)}function a(g){rr("onclose had error %o",g)}function c(){rr("onend")}function m(g){f(),n(g)}function y(g){s.push(g),u+=g.length;var O=Buffer.concat(s,u),q=O.toString("ascii");if(!~q.indexOf(`\r \r `)){rr("have not received end of HTTP headers yet..."),l();return}var D=q.substring(0,q.indexOf(`\r `)),_=+D.split(" ")[1];if(rr("got proxy server response: %o",D),_==200){var b=o;s=O=null,r.secureEndpoint&&(rr("upgrading proxy-connected socket to TLS connection: %o",r.host),r.socket=o,r.servername=r.servername||r.host,r.host=null,r.hostname=null,r.port=null,b=Bl.connect(r)),f(),t.once("socket",Bm),n(null,b)}else f(),o.destroy(),o=new zl.Socket,o.readable=!0,s=O,t.once("socket",x),n(null,o)}function x(g){rr("replaying proxy buffer for failed request"),Hm(g.listenerCount("data")>0),g.push(s),s=null}o.on("error",m),o.on("close",a),o.on("end",c),l();var T=r.host+":"+r.port,C="CONNECT "+T+` HTTP/1.1\r `,p=Object.assign({},i.headers);i.auth&&(p["Proxy-Authorization"]="Basic "+Buffer.from(i.auth).toString("base64"));var h=r.host;Jm(r.port,r.secureEndpoint)||(h+=":"+r.port),p.Host=h,p.Connection="close",Object.keys(p).forEach(function(g){C+=g+": "+p[g]+`\r `}),o.write(C+`\r `)};function Bm(e){e.resume()}function Jm(e,t){return Boolean(!t&&e===80||t&&e===443)}});var ef=W(Wt=>{"use strict";Object.defineProperty(Wt,"__esModule",{value:!0});var ft=require("path"),Ye=require("fs"),Gl=Object.prototype.toString;function gi(e){return typeof e!="undefined"}function Um(e){return Gl.call(e)==="[object Number]"}function kt(e){return Gl.call(e)==="[object String]"}function Gm(e){return e===!0||e===!1}function jr(e){return JSON.parse(Ye.readFileSync(e,"utf8"))}var Dr;(function(e){e.file="file",e.bundle="bundle",e.both="both"})(Dr=Wt.MessageFormat||(Wt.MessageFormat={}));var Xl;(function(e){e.standalone="standalone",e.languagePack="languagePack"})(Xl=Wt.BundleFormat||(Wt.BundleFormat={}));var Yl;(function(e){function t(r){var n=r;return n&&gi(n.key)&&gi(n.comment)}e.is=t})(Yl||(Yl={}));var Zl,mi,Q,vi;function Xm(){if(Q={locale:void 0,language:void 0,languagePackSupport:!1,cacheLanguageResolution:!0,messageFormat:Dr.bundle},kt(process.env.VSCODE_NLS_CONFIG))try{var e=JSON.parse(process.env.VSCODE_NLS_CONFIG),t=void 0,r=void 0;if(e.availableLanguages){var n=e.availableLanguages["*"];kt(n)&&(t=n)}if(kt(e.locale)&&(Q.locale=e.locale.toLowerCase()),t===void 0?Q.language=Q.locale:t!=="en"&&(Q.language=t),Gm(e._languagePackSupport)&&(Q.languagePackSupport=e._languagePackSupport),kt(e._cacheRoot)&&(Q.cacheRoot=e._cacheRoot),kt(e._languagePackId)&&(Q.languagePackId=e._languagePackId),kt(e._translationsConfigFile)){Q.translationsConfigFile=e._translationsConfigFile;try{Q.translationsConfig=jr(Q.translationsConfigFile)}catch(o){if(e._corruptedFile){var i=ft.dirname(e._corruptedFile);Ye.exists(i,function(s){s&&Ye.writeFile(e._corruptedFile,"corrupted","utf8",function(u){console.error(u)})})}}}}catch(o){}vi=Q.locale==="pseudo",Zl=void 0,mi=Object.create(null)}Xm();function Ym(){return Q.languagePackSupport===!0&&Q.cacheRoot!==void 0&&Q.languagePackId!==void 0&&Q.translationsConfigFile!==void 0&&Q.translationsConfig!==void 0}function zs(e,t){var r;return vi&&(e="\uFF3B"+e.replace(/[aouei]/g,"$&$&")+"\uFF3D"),t.length===0?r=e:r=e.replace(/\{(\d+)\}/g,function(n,i){var o=i[0],s=t[o],u=n;return typeof s=="string"?u=s:(typeof s=="number"||typeof s=="boolean"||s===void 0||s===null)&&(u=String(s)),u}),r}function Bs(e){return function(t,r){for(var n=[],i=2;i=e.length){console.error(`Broken localize call found. Index out of bounds. Stacktrace is : `+new Error("").stack);return}return zs(e[t],n)}else{if(kt(r))return console.warn("Message "+r+" didn't get externalized correctly."),zs(r,n);console.error(`Broken localize call found. Stacktrace is : `+new Error("").stack)}}}function Zm(e,t){for(var r=[],n=2;n0?r=r.substring(0,i):(t=".nls.json",r=null)}}Q.cacheLanguageResolution&&(t=t)}return e+t}function Km(e){for(var t=Q.language;t;){var r=ft.join(e,"nls.bundle."+t+".json");if(Ye.existsSync(r))return r;var n=t.lastIndexOf("-");n>0?t=t.substring(0,n):t=void 0}if(t===void 0){var r=ft.join(e,"nls.bundle.json");if(Ye.existsSync(r))return r}}function ev(e){var t=jr(ft.join(e,"nls.metadata.json")),r=Object.create(null);for(var n in t){var i=t[n];r[n]=i.messages}return r}function tv(e,t){var r=Q.translationsConfig[e.id];if(!!r){var n=jr(r).contents,i=jr(ft.join(t,"nls.metadata.json")),o=Object.create(null);for(var s in i){var u=i[s],l=n[e.outDir+"/"+s];if(l){for(var f=[],a=0;a{"use strict";Object.defineProperty(gn,"__esModule",{value:!0});var Us=require("url"),av=require("https"),uv=require("http"),cv=jl(),lv=Ul(),tf=require("zlib"),rf=ef();process.env.VSCODE_NLS_CONFIG&&(nf=process.env.VSCODE_NLS_CONFIG,rf.config(JSON.parse(nf)));var nf,fe=rf.loadMessageBundle(),of=null,Gs=!0;function fv(e,t){of=e,Gs=t}gn.configure=fv;function sf(e){var t=dv(e.url,{proxyUrl:of,strictSSL:Gs});return e=Xs({},e),e=Xs(e,{agent:t,strictSSL:Gs}),typeof e.followRedirects!="number"&&(e.followRedirects=5),af(e).then(function(r){return new Promise(function(n,i){var o=r.res,s=o,u=o.headers&&o.headers["content-encoding"],l=!1;if(u==="gzip"){var f=tf.createGunzip();o.pipe(f),s=f}else if(u==="deflate"){var a=tf.createInflate();o.pipe(a),s=a}var c=[];s.on("data",function(m){return c.push(m)}),s.on("end",function(){if(!l){if(l=!0,e.followRedirects>0&&(o.statusCode>=300&&o.statusCode<=303||o.statusCode===307)){var m=o.headers.location;if(m){var y={type:e.type,url:m,user:e.user,password:e.password,responseType:e.responseType,headers:e.headers,timeout:e.timeout,followRedirects:e.followRedirects-1,data:e.data};sf(y).then(n,i);return}}var x={responseText:c.join(""),status:o.statusCode,headers:o.headers||{}};o.statusCode>=200&&o.statusCode<300||o.statusCode===1223?n(x):i(x)}}),s.on("error",function(m){var y={responseText:fe("error","Unable to access {0}. Error: {1}",e.url,m.message),status:500,headers:void 0};l=!0,i(y)})})},function(r){var n;return t?n=fe("error.cannot.connect.proxy","Unable to connect to {0} through a proxy . Error: {1}",e.url,r.message):n=fe("error.cannot.connect","Unable to connect to {0}. Error: {1}",e.url,r.message),Promise.reject({responseText:n,status:404})})}gn.xhr=sf;function Xs(e){for(var t=[],r=1;r=300&&u.statusCode<400&&e.followRedirects&&e.followRedirects>0&&u.headers.location?r(af(Xs({},e,{url:u.headers.location,followRedirects:e.followRedirects-1}))):r({req:t,res:u})};i.protocol==="https:"?t=av.request(o,s):t=uv.request(o,s),t.on("error",n),e.timeout&&t.setTimeout(e.timeout),e.data&&t.write(e.data),t.end()})}function hv(e){if(!(e<400))switch(e){case 400:return fe("status.400","Bad request. The request cannot be fulfilled due to bad syntax.");case 401:return fe("status.401","Unauthorized. The server is refusing to respond.");case 403:return fe("status.403","Forbidden. The server is refusing to respond.");case 404:return fe("status.404","Not Found. The requested location could not be found.");case 405:return fe("status.405","Method not allowed. A request was made using a request method not supported by that location.");case 406:return fe("status.406","Not Acceptable. The server can only generate a response that is not accepted by the client.");case 407:return fe("status.407","Proxy Authentication Required. The client must first authenticate itself with the proxy.");case 408:return fe("status.408","Request Timeout. The server timed out waiting for the request.");case 409:return fe("status.409","Conflict. The request could not be completed because of a conflict in the request.");case 410:return fe("status.410","Gone. The requested page is no longer available.");case 411:return fe("status.411",'Length Required. The "Content-Length" is not defined.');case 412:return fe("status.412","Precondition Failed. The precondition given in the request evaluated to false by the server.");case 413:return fe("status.413","Request Entity Too Large. The server will not accept the request, because the request entity is too large.");case 414:return fe("status.414","Request-URI Too Long. The server will not accept the request, because the URL is too long.");case 415:return fe("status.415","Unsupported Media Type. The server will not accept the request, because the media type is not supported.");case 500:return fe("status.500","Internal Server Error.");case 501:return fe("status.501","Not Implemented. The server either does not recognize the request method, or it lacks the ability to fulfill the request.");case 503:return fe("status.503","Service Unavailable. The server is currently unavailable (overloaded or down).");default:return fe("status.416","HTTP status code {0}",e)}}gn.getErrorStatusDescription=hv;function pv(e){return e.protocol==="http:"?process.env.HTTP_PROXY||process.env.http_proxy||null:e.protocol==="https:"&&(process.env.HTTPS_PROXY||process.env.https_proxy||process.env.HTTP_PROXY||process.env.http_proxy)||null}function dv(e,t){t===void 0&&(t={});var r=Us.parse(e),n=t.proxyUrl||pv(r);if(!n)return null;var i=Us.parse(n);if(!/^https?:$/.test(i.protocol))return null;var o={host:i.hostname,port:Number(i.port),auth:i.auth,rejectUnauthorized:typeof t.strictSSL=="boolean"?t.strictSSL:!0};return r.protocol==="http:"?new cv(o):new lv(o)}});var ff=W(()=>{var cf=Ke(lc()),Mr=Ke(uf()),lf=Ke(require("fs")),Ir=cf.createConnection();console.log=Ir.console.log.bind(Ir.console);console.error=Ir.console.error.bind(Ir.console);process.on("unhandledRejection",e=>{Ir.console.error(Sr("Unhandled exception",e))});function gv(){return{getContent(e,t){return Mr.xhr({url:e,followRedirects:5,headers:{"Accept-Encoding":"gzip, deflate"}}).then(n=>n.responseText,n=>Promise.reject(n.responseText||Mr.getErrorStatusDescription(n.status)||n.toString()))}}}function mv(){return{getContent(e,t){return new Promise((r,n)=>{let i=lt.parse(e);lf.readFile(i.fsPath,t,(o,s)=>{if(o)return n(o);r(s.toString())})})}}}dl(Ir,{file:mv(),http:gv(),configureHttpRequests:Mr.configure})});var Jn=Ke(Bn());function Sr(e,t){if(t instanceof Error){let r=t;return`${e}: ${r.message} ${r.stack}`}else{if(typeof t=="string")return`${e}: ${t}`;if(t)return`${e}: ${t.toString()}`}return e}function nn(e,t,r,n){return new Promise(i=>{setImmediate(()=>(n.isCancellationRequested&&i(Un()),e().then(o=>{if(n.isCancellationRequested){i(Un());return}else i(o)},o=>{console.error(Sr(r,o)),i(t)})))})}function Tr(e,t,r,n){return new Promise(i=>{setImmediate(()=>{if(n.isCancellationRequested)i(Un());else try{let o=e();if(n.isCancellationRequested){i(Un());return}else i(o)}catch(o){console.error(Sr(r,o)),i(t)}})})}function Un(){return console.log("cancelled"),new Jn.ResponseError(Jn.ErrorCodes.RequestCancelled,"Request cancelled")}var je=Ke(Bn());"use strict";function _r(e,t){t===void 0&&(t=!1);var r=e.length,n=0,i="",o=0,s=16,u=0,l=0,f=0,a=0,c=0;function m(g,O){for(var q=0,D=0;q=48&&_<=57)D=D*16+_-48;else if(_>=65&&_<=70)D=D*16+_-65+10;else if(_>=97&&_<=102)D=D*16+_-97+10;else break;n++,q++}return q=r){g+=e.substring(O,n),c=2;break}var q=e.charCodeAt(n);if(q===34){g+=e.substring(O,n),n++;break}if(q===92){if(g+=e.substring(O,n),n++,n>=r){c=2;break}var D=e.charCodeAt(n++);switch(D){case 34:g+='"';break;case 92:g+="\\";break;case 47:g+="/";break;case 98:g+="\b";break;case 102:g+="\f";break;case 110:g+=` `;break;case 114:g+="\r";break;case 116:g+=" ";break;case 117:var _=m(4,!0);_>=0?g+=String.fromCharCode(_):c=4;break;default:c=5}O=n;continue}if(q>=0&&q<=31)if(on(q)){g+=e.substring(O,n),c=2;break}else c=6;n++}return g}function C(){if(i="",c=0,o=n,l=u,a=f,n>=r)return o=r,s=17;var g=e.charCodeAt(n);if(ns(g)){do n++,i+=String.fromCharCode(g),g=e.charCodeAt(n);while(ns(g));return s=15}if(on(g))return n++,i+=String.fromCharCode(g),g===13&&e.charCodeAt(n)===10&&(n++,i+=` `),u++,f=n,s=14;switch(g){case 123:return n++,s=1;case 125:return n++,s=2;case 91:return n++,s=3;case 93:return n++,s=4;case 58:return n++,s=6;case 44:return n++,s=5;case 34:return n++,i=T(),s=10;case 47:var O=n-1;if(e.charCodeAt(n+1)===47){for(n+=2;n=12&&g<=15);return g}return{setPosition:y,getPosition:function(){return n},scan:t?h:C,getToken:function(){return s},getTokenValue:function(){return i},getTokenOffset:function(){return o},getTokenLength:function(){return n-o},getTokenStartLine:function(){return l},getTokenStartCharacter:function(){return o-a},getTokenError:function(){return c}}}function ns(e){return e===32||e===9||e===11||e===12||e===160||e===5760||e>=8192&&e<=8203||e===8239||e===8287||e===12288||e===65279}function on(e){return e===10||e===13||e===8232||e===8233}function kr(e){return e>=48&&e<=57}"use strict";function ss(e,t,r){var n,i,o,s,u;if(t){for(s=t.offset,u=s+t.length,o=s;o>0&&!os(e,o-1);)o--;for(var l=u;ls)&&e.substring(L,$)!==F&&p.push({offset:L,length:$-L,content:F})}var g=C();if(g!==17){var O=y.getTokenOffset()+o,q=is(m,n);h(q,o,O)}for(;g!==17;){for(var D=y.getTokenOffset()+y.getTokenLength()+o,_=C(),b="",v=!1;!a&&(_===12||_===13);){var w=y.getTokenOffset()+o;h(" ",D,w),D=y.getTokenOffset()+y.getTokenLength()+o,v=_===12,b=v?T():"",_=C()}if(_===2)g!==1&&(c--,b=T());else if(_===4)g!==3&&(c--,b=T());else{switch(g){case 3:case 1:c++,b=T();break;case 5:case 12:b=T();break;case 13:a?b=T():v||(b=" ");break;case 6:v||(b=" ");break;case 10:if(_===6){v||(b="");break}case 7:case 8:case 9:case 11:case 2:case 4:_===12||_===13?v||(b=" "):_!==5&&_!==17&&(x=!0);break;case 16:x=!0;break}a&&(_===12||_===13)&&(b=T())}_===17&&(b=r.insertFinalNewline?f:"");var R=y.getTokenOffset()+o;h(b,D,R),g=_}return p}function is(e,t){for(var r="",n=0;n=e.offset&&t0)for(var F=n.getToken();F!==17;){if(w.indexOf(F)!==-1){p();break}else if(R.indexOf(F)!==-1)break;F=p()}}function g(v){var w=n.getTokenValue();return v?c(w):u(w),p(),!0}function O(){switch(n.getToken()){case 11:var v=n.getTokenValue(),w=Number(v);isNaN(w)&&(h(2),w=0),c(w);break;case 7:c(null);break;case 8:c(!0);break;case 9:c(!1);break;default:return!1}return p(),!0}function q(){return n.getToken()!==10?(h(3,[],[2,5]),!1):(g(!1),n.getToken()===6?(m(":"),p(),b()||h(4,[],[2,5])):h(5,[],[2,5]),!0)}function D(){s(),p();for(var v=!1;n.getToken()!==2&&n.getToken()!==17;){if(n.getToken()===5){if(v||h(4,[],[]),m(","),p(),n.getToken()===2&&C)break}else v&&h(6,[],[]);q()||h(4,[],[2,5]),v=!0}return l(),n.getToken()!==2?h(7,[2],[]):p(),!0}function _(){f(),p();for(var v=!1;n.getToken()!==4&&n.getToken()!==17;){if(n.getToken()===5){if(v||h(4,[],[]),m(","),p(),n.getToken()===4&&C)break}else v&&h(6,[],[]);b()||h(4,[],[4,5]),v=!0}return a(),n.getToken()!==4?h(8,[4],[]):p(),!0}function b(){switch(n.getToken()){case 3:return _();case 1:return D();case 10:return g(!0);default:return O()}}return p(),n.getToken()===17?r.allowEmptyContent?!0:(h(4,[],[]),!1):b()?(n.getToken()!==17&&h(9,[],[]),!0):(h(4,[],[]),!1)}"use strict";"use strict";var ht=_r;var hc=dc;var pc=us,gc=as,mc=Xn;function vc(e,t,r){return ss(e,t,r)}function Pr(e,t){if(e===t)return!0;if(e==null||t===null||t===void 0||typeof e!=typeof t||typeof e!="object"||Array.isArray(e)!==Array.isArray(t))return!1;var r,n;if(Array.isArray(e)){if(e.length!==t.length)return!1;for(r=0;rt?i=o:n=o+1}var s=n-1;return{line:s,character:t-r[s]}},e.prototype.offsetAt=function(t){var r=this.getLineOffsets();if(t.line>=r.length)return this._content.length;if(t.line<0)return 0;var n=r[t.line],i=t.line+1l&&f.push(s.substring(l,y)),m.newText.length&&f.push(m.newText),l=i.offsetAt(m.range.end)}return f.push(s.substr(l)),f.join("")}e.applyEdits=n})(Rr||(Rr={}));function cs(e,t){if(e.length<=1)return e;var r=e.length/2|0,n=e.slice(0,r),i=e.slice(r);cs(n,t),cs(i,t);for(var o=0,s=0,u=0;or.line||t.line===r.line&&t.character>r.character?{start:r,end:t}:e}function zp(e){var t=wc(e.range);return t!==e.range?{newText:e.newText,range:t}:e}var X;(function(e){e[e.Undefined=0]="Undefined",e[e.EnumValueMismatch=1]="EnumValueMismatch",e[e.Deprecated=2]="Deprecated",e[e.UnexpectedEndOfComment=257]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=258]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=259]="UnexpectedEndOfNumber",e[e.InvalidUnicode=260]="InvalidUnicode",e[e.InvalidEscapeCharacter=261]="InvalidEscapeCharacter",e[e.InvalidCharacter=262]="InvalidCharacter",e[e.PropertyExpected=513]="PropertyExpected",e[e.CommaExpected=514]="CommaExpected",e[e.ColonExpected=515]="ColonExpected",e[e.ValueExpected=516]="ValueExpected",e[e.CommaOrCloseBacketExpected=517]="CommaOrCloseBacketExpected",e[e.CommaOrCloseBraceExpected=518]="CommaOrCloseBraceExpected",e[e.TrailingComma=519]="TrailingComma",e[e.DuplicateKey=520]="DuplicateKey",e[e.CommentNotPermitted=521]="CommentNotPermitted",e[e.SchemaResolveError=768]="SchemaResolveError"})(X||(X={}));var Yn;(function(e){e.LATEST={textDocument:{completion:{completionItem:{documentationFormat:[k.MarkupKind.Markdown,k.MarkupKind.PlainText],commitCharactersSupport:!0}}}}})(Yn||(Yn={}));var Ec=Ke(Or()),Zt=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},e(t,r)};return function(t,r){e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),V=Ec.loadMessageBundle(),lg={"color-hex":{errorMessage:V("colorHexFormatWarning","Invalid color format. Use #RGB, #RGBA, #RRGGBB or #RRGGBBAA."),pattern:/^#([0-9A-Fa-f]{3,4}|([0-9A-Fa-f]{2}){3,4})$/},"date-time":{errorMessage:V("dateTimeFormatWarning","String is not a RFC3339 date-time."),pattern:/^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i},date:{errorMessage:V("dateFormatWarning","String is not a RFC3339 date."),pattern:/^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/i},time:{errorMessage:V("timeFormatWarning","String is not a RFC3339 time."),pattern:/^([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i},email:{errorMessage:V("emailFormatWarning","String is not an e-mail address."),pattern:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/}},Qt=function(){function e(t,r,n){n===void 0&&(n=0),this.offset=r,this.length=n,this.parent=t}return Object.defineProperty(e.prototype,"children",{get:function(){return[]},enumerable:!1,configurable:!0}),e.prototype.toString=function(){return"type: "+this.type+" ("+this.offset+"/"+this.length+")"+(this.parent?" parent: {"+this.parent.toString()+"}":"")},e}();var fg=function(e){Zt(t,e);function t(r,n){var i=e.call(this,r,n)||this;return i.type="null",i.value=null,i}return t}(Qt);var Oc=function(e){Zt(t,e);function t(r,n,i){var o=e.call(this,r,i)||this;return o.type="boolean",o.value=n,o}return t}(Qt);var dg=function(e){Zt(t,e);function t(r,n){var i=e.call(this,r,n)||this;return i.type="array",i.items=[],i}return Object.defineProperty(t.prototype,"children",{get:function(){return this.items},enumerable:!1,configurable:!0}),t}(Qt);var hg=function(e){Zt(t,e);function t(r,n){var i=e.call(this,r,n)||this;return i.type="number",i.isInteger=!0,i.value=Number.NaN,i}return t}(Qt);var bs=function(e){Zt(t,e);function t(r,n,i){var o=e.call(this,r,n,i)||this;return o.type="string",o.value="",o}return t}(Qt);var pg=function(e){Zt(t,e);function t(r,n,i){var o=e.call(this,r,n)||this;return o.type="property",o.colonOffset=-1,o.keyNode=i,o}return Object.defineProperty(t.prototype,"children",{get:function(){return this.valueNode?[this.keyNode,this.valueNode]:[this.keyNode]},enumerable:!1,configurable:!0}),t}(Qt);var gg=function(e){Zt(t,e);function t(r,n){var i=e.call(this,r,n)||this;return i.type="object",i.properties=[],i}return Object.defineProperty(t.prototype,"children",{get:function(){return this.properties},enumerable:!1,configurable:!0}),t}(Qt);function Ae(e){return Ue(e)?e?{}:{not:{}}:e}var Nc;(function(e){e[e.Key=0]="Key",e[e.Enum=1]="Enum"})(Nc||(Nc={}));var mg=function(){function e(t,r){t===void 0&&(t=-1),this.focusOffset=t,this.exclude=r,this.schemas=[]}return e.prototype.add=function(t){this.schemas.push(t)},e.prototype.merge=function(t){Array.prototype.push.apply(this.schemas,t.schemas)},e.prototype.include=function(t){return(this.focusOffset===-1||ws(t,this.focusOffset))&&t!==this.exclude},e.prototype.newSub=function(){return new e(-1,this.exclude)},e}(),Cs=function(){function e(){}return Object.defineProperty(e.prototype,"schemas",{get:function(){return[]},enumerable:!1,configurable:!0}),e.prototype.add=function(t){},e.prototype.merge=function(t){},e.prototype.include=function(t){return!0},e.prototype.newSub=function(){return this},e.instance=new e,e}(),He=function(){function e(){this.problems=[],this.propertiesMatches=0,this.propertiesValueMatches=0,this.primaryValueMatches=0,this.enumValueMatch=!1,this.enumValues=void 0}return e.prototype.hasProblems=function(){return!!this.problems.length},e.prototype.mergeAll=function(t){for(var r=0,n=t;r=e.offset&&t0?K={schema:we,validationResult:se,matchingSchemas:Be}:Ce===0&&(K.matchingSchemas.merge(Be),K.validationResult.mergeEnumValues(se))}}return ne.length>1&&$&&r.problems.push({location:{offset:i.offset,length:1},message:V("oneOfWarning","Matches multiple schemas when only one must validate.")}),K&&(r.merge(K.validationResult),r.propertiesMatches+=K.validationResult.propertiesMatches,r.propertiesValueMatches+=K.validationResult.propertiesValueMatches,n.merge(K.matchingSchemas)),ne.length};Array.isArray(t.anyOf)&&O(t.anyOf,!1),Array.isArray(t.oneOf)&&O(t.oneOf,!0);var q=function(L){var $=new He,ne=n.newSub();_e(i,Ae(L),$,ne),r.merge($),r.propertiesMatches+=$.propertiesMatches,r.propertiesValueMatches+=$.propertiesValueMatches,n.merge(ne)},D=function(L,$,ne){var K=Ae(L),Pe=new He,Me=n.newSub();_e(i,K,Pe,Me),n.merge(Me),Pe.hasProblems()?ne&&q(ne):$&&q($)},_=Ae(t.if);if(_&&D(_,Ae(t.then),Ae(t.else)),Array.isArray(t.enum)){for(var b=ut(i),v=!1,w=0,R=t.enum;w=_&&m.problems.push({location:{offset:a.offset,length:a.length},message:V("exclusiveMaximumWarning","Value is above the exclusive maximum of {0}.",_)});var b=q(c.minimum,c.exclusiveMinimum);$e(b)&&xv&&m.problems.push({location:{offset:a.offset,length:a.length},message:V("maximumWarning","Value is above the maximum of {0}.",v)})}function u(a,c,m,y){if($e(c.minLength)&&a.value.lengthc.maxLength&&m.problems.push({location:{offset:a.offset,length:a.length},message:V("maxLengthWarning","String is longer than the maximum length of {0}.",c.maxLength)}),yc(c.pattern)){var x=new RegExp(c.pattern);x.test(a.value)||m.problems.push({location:{offset:a.offset,length:a.length},message:c.patternErrorMessage||c.errorMessage||V("patternWarning",'String does not match the pattern of "{0}".',c.pattern)})}if(c.format)switch(c.format){case"uri":case"uri-reference":{var T=void 0;if(!a.value)T=V("uriEmpty","URI expected.");else{var C=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/.exec(a.value);C?!C[2]&&c.format==="uri"&&(T=V("uriSchemeMissing","URI with a scheme is expected.")):T=V("uriMissing","URI is expected.")}T&&m.problems.push({location:{offset:a.offset,length:a.length},message:c.patternErrorMessage||c.errorMessage||V("uriFormatWarning","String is not a URI: {0}",T)})}break;case"color-hex":case"date-time":case"date":case"time":case"email":var p=lg[c.format];(!a.value||!p.pattern.exec(a.value))&&m.problems.push({location:{offset:a.offset,length:a.length},message:c.patternErrorMessage||c.errorMessage||p.errorMessage});default:}}function l(a,c,m,y){if(Array.isArray(c.items)){for(var x=c.items,T=0;T=x.length&&m.propertiesValueMatches++}if(a.items.length>x.length)if(typeof c.additionalItems=="object")for(var O=x.length;Oc.maxItems&&m.problems.push({location:{offset:a.offset,length:a.length},message:V("maxItemsWarning","Array has too many items. Expected {0} or fewer.",c.maxItems)}),c.uniqueItems===!0){var w=ut(a),R=w.some(function(F,L){return L!==w.lastIndexOf(F)});R&&m.problems.push({location:{offset:a.offset,length:a.length},message:V("uniqueItemsWarning","Array has duplicate items.")})}}function f(a,c,m,y){for(var x=Object.create(null),T=[],C=0,p=a.properties;C=0;)T.splice(Qe,1),Qe=T.indexOf(Ze)};if(c.properties)for(var w=0,R=Object.keys(c.properties);w0)for(var Ce=0,me=T;Cec.maxProperties&&m.problems.push({location:{offset:a.offset,length:a.length},message:V("MaxPropWarning","Object has more properties than limit of {0}.",c.maxProperties)}),$e(c.minProperties)&&a.properties.length0){for(F--;F>0&&/\s/.test(i.charAt(F));)F--;L=F+1}if(f(_,b,F,L),v&&m(v,!1),w.length+R.length>0)for(var $=o.getToken();$!==17;){if(w.indexOf($)!==-1){u();break}else if(R.indexOf($)!==-1)break;$=u()}return v}function c(){switch(o.getTokenError()){case 4:return a(V("InvalidUnicode","Invalid unicode sequence in string."),X.InvalidUnicode),!0;case 5:return a(V("InvalidEscapeCharacter","Invalid escape character in string."),X.InvalidEscapeCharacter),!0;case 3:return a(V("UnexpectedEndOfNumber","Unexpected end of number."),X.UnexpectedEndOfNumber),!0;case 1:return a(V("UnexpectedEndOfComment","Unexpected end of comment."),X.UnexpectedEndOfComment),!0;case 2:return a(V("UnexpectedEndOfString","Unexpected end of string."),X.UnexpectedEndOfString),!0;case 6:return a(V("InvalidCharacter","Invalid characters in string. Control characters must be escaped."),X.InvalidCharacter),!0}return!1}function m(_,b){return _.length=o.getTokenOffset()+o.getTokenLength()-_.offset,b&&u(),_}function y(_){if(o.getToken()===3){var b=new dg(_,o.getTokenOffset());u();for(var v=0,w=!1;o.getToken()!==4&&o.getToken()!==17;){if(o.getToken()===5){w||a(V("ValueExpected","Value expected"),X.ValueExpected);var R=o.getTokenOffset();if(u(),o.getToken()===4){w&&f(V("TrailingComma","Trailing comma"),X.TrailingComma,R,R+1);continue}}else w&&a(V("ExpectedComma","Expected comma"),X.CommaExpected);var F=O(b);F?b.items.push(F):a(V("PropertyExpected","Value expected"),X.ValueExpected,void 0,[],[4,5]),w=!0}return o.getToken()!==4?a(V("ExpectedCloseBracket","Expected comma or closing bracket"),X.CommaOrCloseBacketExpected,b):m(b,!0)}}var x=new bs(void 0,0,0);function T(_,b){var v=new pg(_,o.getTokenOffset(),x),w=p(v);if(!w)if(o.getToken()===16){a(V("DoubleQuotesExpected","Property keys must be doublequoted"),X.Undefined);var R=new bs(v,o.getTokenOffset(),o.getTokenLength());R.value=o.getTokenValue(),w=R,u()}else return;v.keyNode=w;var F=b[w.value];if(F?(f(V("DuplicateKeyWarning","Duplicate object key"),X.DuplicateKey,v.keyNode.offset,v.keyNode.offset+v.keyNode.length,k.DiagnosticSeverity.Warning),typeof F=="object"&&f(V("DuplicateKeyWarning","Duplicate object key"),X.DuplicateKey,F.keyNode.offset,F.keyNode.offset+F.keyNode.length,k.DiagnosticSeverity.Warning),b[w.value]=!0):b[w.value]=v,o.getToken()===6)v.colonOffset=o.getTokenOffset(),u();else if(a(V("ColonExpected","Colon expected"),X.ColonExpected),o.getToken()===10&&e.positionAt(w.offset+w.length).line0?e.lastIndexOf(t)===r:r===0?e===t:!1}function Dc(e){return e.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}var Mc=Ke(Or()),xs=Mc.loadMessageBundle(),vg=[",","}","]"],yg=[":"],Ic=function(){function e(t,r,n,i){r===void 0&&(r=[]),n===void 0&&(n=Promise),i===void 0&&(i={}),this.schemaService=t,this.contributions=r,this.promiseConstructor=n,this.clientCapabilities=i}return e.prototype.doResolve=function(t){for(var r=this.contributions.length-1;r>=0;r--){var n=this.contributions[r].resolveCompletion;if(n){var i=n(t);if(i)return i}}return this.promiseConstructor.resolve(t)},e.prototype.doComplete=function(t,r,n){var i=this,o={items:[],isIncomplete:!1},s=t.getText(),u=t.offsetAt(r),l=n.getNodeFromOffset(u,!0);if(this.isInComment(t,l?l.offset:0,u))return Promise.resolve(o);if(l&&u===l.offset+l.length&&u>0){var f=s[u-1];(l.type==="object"&&f==="}"||l.type==="array"&&f==="]")&&(l=l.parent)}var a=this.getCurrentWord(t,u),c;if(l&&(l.type==="string"||l.type==="number"||l.type==="boolean"||l.type==="null"))c=k.Range.create(t.positionAt(l.offset),t.positionAt(l.offset+l.length));else{var m=u-a.length;m>0&&s[m-1]==='"'&&m--,c=k.Range.create(t.positionAt(m),r)}var y=!1,x={},T={add:function(C){var p=C.label,h=x[p];if(h)h.documentation||(h.documentation=C.documentation),h.detail||(h.detail=C.detail);else{if(p=p.replace(/[\n]/g,"\u21B5"),p.length>60){var g=p.substr(0,57).trim()+"...";x[g]||(p=g)}c&&C.insertText!==void 0&&(C.textEdit=k.TextEdit.replace(c,C.insertText)),y&&(C.commitCharacters=C.kind===k.CompletionItemKind.Property?yg:vg),C.label=p,x[p]=C,o.items.push(C)}},setAsIncomplete:function(){o.isIncomplete=!0},error:function(C){console.error(C)},log:function(C){console.log(C)},getNumberOfProposals:function(){return o.items.length}};return this.schemaService.getSchemaForResource(t.uri,n).then(function(C){var p=[],h=!0,g="",O=void 0;if(l&&l.type==="string"){var q=l.parent;q&&q.type==="property"&&q.keyNode===l&&(h=!q.valueNode,O=q,g=s.substr(l.offset+1,l.length-2),q&&(l=q.parent))}if(l&&l.type==="object"){if(l.offset===u)return o;var D=l.properties;D.forEach(function(w){(!O||O!==w)&&(x[w.keyNode.value]=k.CompletionItem.create("__"))});var _="";h&&(_=i.evaluateSeparatorAfter(t,t.offsetAt(c.end))),C?i.getPropertyCompletions(C,n,l,h,_,T):i.getSchemaLessPropertyCompletions(n,l,g,T);var b=sn(l);i.contributions.forEach(function(w){var R=w.collectPropertyCompletions(t.uri,b,a,h,_==="",T);R&&p.push(R)}),!C&&a.length>0&&s.charAt(u-a.length-1)!=='"'&&(T.add({kind:k.CompletionItemKind.Property,label:i.getLabelForValue(a),insertText:i.getInsertTextForProperty(a,void 0,!1,_),insertTextFormat:k.InsertTextFormat.Snippet,documentation:""}),T.setAsIncomplete())}var v={};return C?i.getValueCompletions(C,n,l,u,t,T,v):i.getSchemaLessValueCompletions(n,l,u,t,T),i.contributions.length>0&&i.getContributedValueCompletions(n,l,u,t,T,p),i.promiseConstructor.all(p).then(function(){if(T.getNumberOfProposals()===0){var w=u;l&&(l.type==="string"||l.type==="number"||l.type==="boolean"||l.type==="null")&&(w=l.offset+l.length);var R=i.evaluateSeparatorAfter(t,w);i.addFillerValueCompletions(v,R,T)}return o})})},e.prototype.getPropertyCompletions=function(t,r,n,i,o,s){var u=this,l=r.getMatchingSchemas(t.schema,n.offset);l.forEach(function(f){if(f.node===n&&!f.inverted){var a=f.schema.properties;a&&Object.keys(a).forEach(function(T){var C=a[T];if(typeof C=="object"&&!C.deprecationMessage&&!C.doNotSuggest){var p={kind:k.CompletionItemKind.Property,label:T,insertText:u.getInsertTextForProperty(T,C,i,o),insertTextFormat:k.InsertTextFormat.Snippet,filterText:u.getFilterTextForValue(T),documentation:u.fromMarkup(C.markdownDescription)||C.description||""};C.suggestSortText!==void 0&&(p.sortText=C.suggestSortText),p.insertText&&jt(p.insertText,"$1"+o)&&(p.command={title:"Suggest",command:"editor.action.triggerSuggest"}),s.add(p)}});var c=f.schema.propertyNames;if(typeof c=="object"&&!c.deprecationMessage&&!c.doNotSuggest){var m=function(T,C){C===void 0&&(C=void 0);var p={kind:k.CompletionItemKind.Property,label:T,insertText:u.getInsertTextForProperty(T,void 0,i,o),insertTextFormat:k.InsertTextFormat.Snippet,filterText:u.getFilterTextForValue(T),documentation:C||u.fromMarkup(c.markdownDescription)||c.description||""};c.suggestSortText!==void 0&&(p.sortText=c.suggestSortText),p.insertText&&jt(p.insertText,"$1"+o)&&(p.command={title:"Suggest",command:"editor.action.triggerSuggest"}),s.add(p)};if(c.enum)for(var y=0;y(r.colonOffset||0)){var a=r.valueNode;if(a&&(n>a.offset+a.length||a.type==="object"||a.type==="array"))return;var c=r.keyNode.value;t.visit(function(y){return y.type==="property"&&y.keyNode.value===c&&y.valueNode&&f(y.valueNode),!0}),c==="$schema"&&r.parent&&!r.parent.parent&&this.addDollarSchemaCompletions(l,o)}if(r.type==="array")if(r.parent&&r.parent.type==="property"){var m=r.parent.keyNode.value;t.visit(function(y){return y.type==="property"&&y.keyNode.value===m&&y.valueNode&&y.valueNode.type==="array"&&y.valueNode.items.forEach(f),!0})}else r.items.forEach(f)},e.prototype.getValueCompletions=function(t,r,n,i,o,s,u){var l=i,f=void 0,a=void 0;if(n&&(n.type==="string"||n.type==="number"||n.type==="boolean"||n.type==="null")&&(l=n.offset+n.length,a=n,n=n.parent),!n){this.addSchemaValueCompletions(t.schema,"",s,u);return}if(n.type==="property"&&i>(n.colonOffset||0)){var c=n.valueNode;if(c&&i>c.offset+c.length)return;f=n.keyNode.value,n=n.parent}if(n&&(f!==void 0||n.type==="array")){for(var m=this.evaluateSeparatorAfter(o,l),y=r.getMatchingSchemas(t.schema,n.offset,a),x=0,T=y;x(r.colonOffset||0)){var u=r.keyNode.value,l=r.valueNode;if((!l||n<=l.offset+l.length)&&r.parent){var f=sn(r.parent);this.contributions.forEach(function(a){var c=a.collectValueCompletions(i.uri,f,u,o);c&&s.push(c)})}}},e.prototype.addSchemaValueCompletions=function(t,r,n,i){var o=this;typeof t=="object"&&(this.addEnumValueCompletions(t,r,n),this.addDefaultValueCompletions(t,r,n),this.collectTypes(t,i),Array.isArray(t.allOf)&&t.allOf.forEach(function(s){return o.addSchemaValueCompletions(s,r,n,i)}),Array.isArray(t.anyOf)&&t.anyOf.forEach(function(s){return o.addSchemaValueCompletions(s,r,n,i)}),Array.isArray(t.oneOf)&&t.oneOf.forEach(function(s){return o.addSchemaValueCompletions(s,r,n,i)}))},e.prototype.addDefaultValueCompletions=function(t,r,n,i){var o=this;i===void 0&&(i=0);var s=!1;if(st(t.default)){for(var u=t.type,l=t.default,f=i;f>0;f--)l=[l],u="array";n.add({kind:this.getSuggestionKind(u),label:this.getLabelForValue(l),insertText:this.getInsertTextForValue(l,r),insertTextFormat:k.InsertTextFormat.Snippet,detail:xs("json.suggest.default","Default value")}),s=!0}Array.isArray(t.examples)&&t.examples.forEach(function(a){for(var c=t.type,m=a,y=i;y>0;y--)m=[m],c="array";n.add({kind:o.getSuggestionKind(c),label:o.getLabelForValue(m),insertText:o.getInsertTextForValue(m,r),insertTextFormat:k.InsertTextFormat.Snippet}),s=!0}),Array.isArray(t.defaultSnippets)&&t.defaultSnippets.forEach(function(a){var c=t.type,m=a.body,y=a.label,x,T;if(st(m)){for(var C=t.type,p=i;p>0;p--)m=[m],C="array";x=o.getInsertTextForSnippetValue(m,r),T=o.getFilterTextForSnippetValue(m),y=y||o.getLabelForSnippetValue(m)}else if(typeof a.bodyText=="string"){for(var h="",g="",O="",p=i;p>0;p--)h=h+O+`[ `,g=g+` `+O+"]",O+=" ",c="array";x=h+O+a.bodyText.split(` `).join(` `+O)+g+r,y=y||x,T=x.replace(/[\n]/g,"")}else return;n.add({kind:o.getSuggestionKind(c),label:y,documentation:o.fromMarkup(a.markdownDescription)||a.description,insertText:x,insertTextFormat:k.InsertTextFormat.Snippet,filterText:T}),s=!0}),!s&&typeof t.items=="object"&&!Array.isArray(t.items)&&i<5&&this.addDefaultValueCompletions(t.items,r,n,i+1)},e.prototype.addEnumValueCompletions=function(t,r,n){if(st(t.const)&&n.add({kind:this.getSuggestionKind(t.type),label:this.getLabelForValue(t.const),insertText:this.getInsertTextForValue(t.const,r),insertTextFormat:k.InsertTextFormat.Snippet,documentation:this.fromMarkup(t.markdownDescription)||t.description}),Array.isArray(t.enum))for(var i=0,o=t.enum.length;i0?r[0]:void 0}if(!t)return k.CompletionItemKind.Value;switch(t){case"string":return k.CompletionItemKind.Value;case"object":return k.CompletionItemKind.Module;case"property":return k.CompletionItemKind.Property;default:return k.CompletionItemKind.Value}},e.prototype.getLabelTextForMatchingNode=function(t,r){switch(t.type){case"array":return"[]";case"object":return"{}";default:var n=r.getText().substr(t.offset,t.length);return n}},e.prototype.getInsertTextForMatchingNode=function(t,r,n){switch(t.type){case"array":return this.getInsertTextForValue([],n);case"object":return this.getInsertTextForValue({},n);default:var i=r.getText().substr(t.offset,t.length)+n;return this.getInsertTextForPlainText(i)}},e.prototype.getInsertTextForProperty=function(t,r,n,i){var o=this.getInsertTextForValue(t,"");if(!n)return o;var s=o+": ",u,l=0;if(r){if(Array.isArray(r.defaultSnippets)){if(r.defaultSnippets.length===1){var f=r.defaultSnippets[0].body;st(f)&&(u=this.getInsertTextForSnippetValue(f,""))}l+=r.defaultSnippets.length}if(r.enum&&(!u&&r.enum.length===1&&(u=this.getInsertTextForGuessedValue(r.enum[0],"")),l+=r.enum.length),st(r.default)&&(u||(u=this.getInsertTextForGuessedValue(r.default,"")),l++),Array.isArray(r.examples)&&r.examples.length&&(u||(u=this.getInsertTextForGuessedValue(r.examples[0],"")),l+=r.examples.length),l===0){var a=Array.isArray(r.type)?r.type[0]:r.type;switch(a||(r.properties?a="object":r.items&&(a="array")),a){case"boolean":u="$1";break;case"string":u='"$1"';break;case"object":u="{$1}";break;case"array":u="[$1]";break;case"number":case"integer":u="${1:0}";break;case"null":u="${1:null}";break;default:return o}}}return(!u||l>1)&&(u="$1"),s+u+i},e.prototype.getCurrentWord=function(t,r){for(var n=r-1,i=t.getText();n>=0&&` \r\v":{[,]}`.indexOf(i.charAt(n))===-1;)n--;return i.substring(n+1,r)},e.prototype.evaluateSeparatorAfter=function(t,r){var n=ht(t.getText(),!0);n.setPosition(r);var i=n.scan();switch(i){case 5:case 2:case 4:case 17:return"";default:return","}},e.prototype.findItemAtOffset=function(t,r,n){for(var i=ht(r.getText(),!0),o=t.items,s=o.length-1;s>=0;s--){var u=o[s];if(n>u.offset+u.length){i.setPosition(u.offset+u.length);var l=i.scan();return l===5&&n>=i.getTokenOffset()+i.getTokenLength()?s+1:s}else if(n>=u.offset)return s}return 0},e.prototype.isInComment=function(t,r,n){var i=ht(t.getText(),!1);i.setPosition(r);for(var o=i.scan();o!==17&&i.getTokenOffset()+i.getTokenLength()o.offset+1&&i=0;c--){var m=this.contributions[c],y=m.getInfoContribution(t.uri,a);if(y)return y.then(function(x){return f(x)})}return this.schemaService.getSchemaForResource(t.uri,n).then(function(x){if(x&&o){var T=n.getMatchingSchemas(x.schema,o.offset),C=void 0,p=void 0,h=void 0,g=void 0;T.every(function(q){if(q.node===o&&!q.inverted&&q.schema&&(C=C||q.schema.title,p=p||q.schema.markdownDescription||Ss(q.schema.description),q.schema.enum)){var D=q.schema.enum.indexOf(ut(o));q.schema.markdownEnumDescriptions?h=q.schema.markdownEnumDescriptions[D]:q.schema.enumDescriptions&&(h=Ss(q.schema.enumDescriptions[D])),h&&(g=q.schema.enum[D],typeof g!="string"&&(g=JSON.stringify(g)))}return!0});var O="";return C&&(O=Ss(C)),p&&(O.length>0&&(O+=` `),O+=p),h&&(O.length>0&&(O+=` `),O+="`"+bg(g)+"`: "+h),f([O])}return null})},e}();function Ss(e){if(e){var t=e.replace(/([^\n\r])(\r?\n)([^\n\r])/gm,`$1 $3`);return t.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}}function bg(e){return e.indexOf("`")!==-1?"`` "+e+" ``":e}"use strict";var wg=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)i.hasOwnProperty(o)&&(n[o]=i[o])},e(t,r)};return function(t,r){e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),pe,an;typeof process=="object"?an=process.platform==="win32":typeof navigator=="object"&&(Wc=navigator.userAgent,an=Wc.indexOf("Windows")>=0);var Wc;var Cg=/^\w[\w\d+.-]*$/,xg=/^\//,Sg=/^\/\//;function Tg(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&&!Cg.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path){if(e.authority){if(!xg.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(Sg.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 ("//")')}}function kg(e,t){return!e&&!t?"file":e}function _g(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==ct&&(t=ct+t):t=ct;break}return t}var oe="",ct="/",Pg=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,lt=function(){function e(t,r,n,i,o,s){s===void 0&&(s=!1),typeof t=="object"?(this.scheme=t.scheme||oe,this.authority=t.authority||oe,this.path=t.path||oe,this.query=t.query||oe,this.fragment=t.fragment||oe):(this.scheme=kg(t,s),this.authority=r||oe,this.path=_g(this.scheme,n||oe),this.query=i||oe,this.fragment=o||oe,Tg(this,s))}return e.isUri=function(t){return t instanceof e?!0:t?typeof t.authority=="string"&&typeof t.fragment=="string"&&typeof t.path=="string"&&typeof t.query=="string"&&typeof t.scheme=="string"&&typeof t.fsPath=="function"&&typeof t.with=="function"&&typeof t.toString=="function":!1},Object.defineProperty(e.prototype,"fsPath",{get:function(){return Vc(this,!1)},enumerable:!0,configurable:!0}),e.prototype.with=function(t){if(!t)return this;var r=t.scheme,n=t.authority,i=t.path,o=t.query,s=t.fragment;return r===void 0?r=this.scheme:r===null&&(r=oe),n===void 0?n=this.authority:n===null&&(n=oe),i===void 0?i=this.path:i===null&&(i=oe),o===void 0?o=this.query:o===null&&(o=oe),s===void 0?s=this.fragment:s===null&&(s=oe),r===this.scheme&&n===this.authority&&i===this.path&&o===this.query&&s===this.fragment?this:new Nr(r,n,i,o,s)},e.parse=function(t,r){r===void 0&&(r=!1);var n=Pg.exec(t);return n?new Nr(n[2]||oe,Kn(n[4]||oe),Kn(n[5]||oe),Kn(n[7]||oe),Kn(n[9]||oe),r):new Nr(oe,oe,oe,oe,oe)},e.file=function(t){var r=oe;if(an&&(t=t.replace(/\\/g,ct)),t[0]===ct&&t[1]===ct){var n=t.indexOf(ct,2);n===-1?(r=t.substring(2),t=ct):(r=t.substring(2,n),t=t.substring(n)||ct)}return new Nr("file",r,t,oe,oe)},e.from=function(t){return new Nr(t.scheme,t.authority,t.path,t.query,t.fragment)},e.prototype.toString=function(t){return t===void 0&&(t=!1),Ts(this,t)},e.prototype.toJSON=function(){return this},e.revive=function(t){if(t){if(t instanceof e)return t;var r=new Nr(t);return r._formatted=t.external,r._fsPath=t._sep===$c?t.fsPath:null,r}else return t},e}();var $c=an?1:void 0,Nr=function(e){wg(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r._formatted=null,r._fsPath=null,r}return Object.defineProperty(t.prototype,"fsPath",{get:function(){return this._fsPath||(this._fsPath=Vc(this,!1)),this._fsPath},enumerable:!0,configurable:!0}),t.prototype.toString=function(r){return r===void 0&&(r=!1),r?Ts(this,!0):(this._formatted||(this._formatted=Ts(this,!1)),this._formatted)},t.prototype.toJSON=function(){var r={$mid:1};return this._fsPath&&(r.fsPath=this._fsPath,r._sep=$c),this._formatted&&(r.external=this._formatted),this.path&&(r.path=this.path),this.scheme&&(r.scheme=this.scheme),this.authority&&(r.authority=this.authority),this.query&&(r.query=this.query),this.fragment&&(r.fragment=this.fragment),r},t}(lt),Hc=(pe={},pe[58]="%3A",pe[47]="%2F",pe[63]="%3F",pe[35]="%23",pe[91]="%5B",pe[93]="%5D",pe[64]="%40",pe[33]="%21",pe[36]="%24",pe[38]="%26",pe[39]="%27",pe[40]="%28",pe[41]="%29",pe[42]="%2A",pe[43]="%2B",pe[44]="%2C",pe[59]="%3B",pe[61]="%3D",pe[32]="%20",pe);function zc(e,t){for(var r=void 0,n=-1,i=0;i=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||o===45||o===46||o===95||o===126||t&&o===47)n!==-1&&(r+=encodeURIComponent(e.substring(n,i)),n=-1),r!==void 0&&(r+=e.charAt(i));else{r===void 0&&(r=e.substr(0,i));var s=Hc[o];s!==void 0?(n!==-1&&(r+=encodeURIComponent(e.substring(n,i)),n=-1),r+=s):n===-1&&(n=i)}}return n!==-1&&(r+=encodeURIComponent(e.substring(n))),r!==void 0?r:e}function Rg(e){for(var t=void 0,r=0;r1&&e.scheme==="file"?r="//"+e.authority+e.path:e.path.charCodeAt(0)===47&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&e.path.charCodeAt(2)===58?t?r=e.path.substr(1):r=e.path[1].toLowerCase()+e.path.substr(2):r=e.path,an&&(r=r.replace(/\//g,"\\")),r}function Ts(e,t){var r=t?Rg:zc,n="",i=e.scheme,o=e.authority,s=e.path,u=e.query,l=e.fragment;if(i&&(n+=i,n+=":"),(o||i==="file")&&(n+=ct,n+=ct),o){var f=o.indexOf("@");if(f!==-1){var a=o.substr(0,f);o=o.substr(f+1),f=a.indexOf(":"),f===-1?n+=r(a,!1):(n+=r(a.substr(0,f),!1),n+=":",n+=r(a.substr(f+1),!1)),n+="@"}o=o.toLowerCase(),f=o.indexOf(":"),f===-1?n+=r(o,!1):(n+=r(o.substr(0,f),!1),n+=o.substr(f))}if(s){if(s.length>=3&&s.charCodeAt(0)===47&&s.charCodeAt(2)===58){var c=s.charCodeAt(1);c>=65&&c<=90&&(s="/"+String.fromCharCode(c+32)+":"+s.substr(3))}else if(s.length>=2&&s.charCodeAt(1)===58){var c=s.charCodeAt(0);c>=65&&c<=90&&(s=String.fromCharCode(c+32)+":"+s.substr(2))}n+=r(s,!0)}return u&&(n+="?",n+=r(u,!1)),l&&(n+="#",n+=t?l:zc(l,!1)),n}function Bc(e){try{return decodeURIComponent(e)}catch(t){return e.length>3?e.substr(0,3)+Bc(e.substr(3)):e}}var Jc=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function Kn(e){return e.match(Jc)?e.replace(Jc,function(t){return Bc(t)}):e}var Uc=Ke(Or()),Dt=Uc.loadMessageBundle(),Eg=function(){function e(t,r){this.patternRegExps=[],this.isInclude=[];try{for(var n=0,i=t;n0;)this.callOnDispose.pop()()},e.prototype.onResourceChange=function(t){var r=this,n=!1;t=It(t);for(var i=[t],o=Object.keys(this.schemasById).map(function(f){return r.schemasById[f]});i.length;)for(var s=i.pop(),u=0;u1&&(i=o[1]),jt(i,".")&&(i=i.substr(0,i.length-1)),new Mt({},[Dt("json.schema.nocontent","Unable to load schema from '{0}': {1}.",ei(t),i)])})},e.prototype.resolveSchemaContent=function(t,r,n){var i=this,o=t.errors.slice(0),s=t.schema;if(s.$schema){var u=It(s.$schema);if(u==="http://json-schema.org/draft-03/schema")return this.promise.resolve(new Gc({},[Dt("json.schema.draft03.notsupported","Draft-03 schemas are not supported.")]));u==="https://json-schema.org/draft/2019-09/schema"&&o.push(Dt("json.schema.draft201909.notsupported","Draft 2019-09 schemas are not yet fully supported."))}var l=this.contextService,f=function(y,x){if(!x)return y;var T=y;return x[0]==="/"&&(x=x.substr(1)),x.split("/").some(function(C){return T=T[C],!T}),T},a=function(y,x,T,C){var p=C?decodeURIComponent(C):void 0,h=f(x,p);if(h)for(var g in h)h.hasOwnProperty(g)&&!y.hasOwnProperty(g)&&(y[g]=h[g]);else o.push(Dt("json.schema.invalidref","$ref '{0}' in '{1}' can not be resolved.",p,T))},c=function(y,x,T,C,p){l&&!/^\w+:\/\/.*/.test(x)&&(x=l.resolveRelativePath(x,C)),x=It(x);var h=i.getOrAddSchemaHandle(x);return h.getUnresolvedSchema().then(function(g){if(p[x]=!0,g.errors.length){var O=T?x+"#"+T:x;o.push(Dt("json.schema.problemloadingref","Problems loading reference '{0}': {1}",O,g.errors[0]))}return delete y.$ref,a(y,g.schema,x,T),m(y,g.schema,x,h.dependencies)})},m=function(y,x,T,C){if(!y||typeof y!="object")return Promise.resolve(null);for(var p=[y],h=[],g=[],O=function(){for(var v=[],w=0;w0){g.push(c(v,F[0],F[1],T,C));return}else delete v.$ref,w.indexOf(R)===-1&&(a(v,x,T,F[1]),w.push(R))}O(v.items,v.additionalItems,v.additionalProperties,v.not,v.contains,v.propertyNames,v.if,v.then,v.else),q(v.definitions,v.properties,v.patternProperties,v.dependencies),D(v.anyOf,v.allOf,v.oneOf,v.items)};p.length;){var b=p.pop();h.indexOf(b)>=0||(h.push(b),_(b))}return i.promise.all(g)};return m(s,s,r,n).then(function(y){return new Gc(s,o)})},e.prototype.getSchemaForResource=function(t,r){if(r&&r.root&&r.root.type==="object"){var n=r.root.properties.filter(function(p){return p.keyNode.value==="$schema"&&p.valueNode&&p.valueNode.type==="string"});if(n.length>0){var i=n[0].valueNode;if(i&&i.type==="string"){var o=ut(i);if(o&&jc(o,".")&&this.contextService&&(o=this.contextService.resolveRelativePath(o,t)),o){var s=It(o);return this.getOrAddSchemaHandle(s).getResolvedSchema()}}}}if(this.cachedSchemaForResource&&this.cachedSchemaForResource.resource===t)return this.cachedSchemaForResource.resolvedSchema;for(var u=Object.create(null),l=[],f=Fg(t),a=0,c=this.filePatternAssociations;a0?this.createCombinedSchema(t,l).getResolvedSchema():this.promise.resolve(void 0);return this.cachedSchemaForResource={resource:t,resolvedSchema:C},C},e.prototype.createCombinedSchema=function(t,r){if(r.length===1)return this.getOrAddSchemaHandle(r[0]);var n="schemaservice://combinedSchema/"+encodeURIComponent(t),i={allOf:r.map(function(o){return{$ref:o}})};return this.addSchemaHandle(n,i)},e.prototype.getMatchingSchemas=function(t,r,n){if(n){var i=n.id||"schemaservice://untitled/matchingSchemas/"+Ng++;return this.resolveSchemaContent(new Mt(n),i,{}).then(function(o){return r.getMatchingSchemas(o.schema).filter(function(s){return!s.inverted})})}return this.getSchemaForResource(t.uri,r).then(function(o){return o?r.getMatchingSchemas(o.schema).filter(function(s){return!s.inverted}):[]})},e}();var Ng=0;function It(e){try{return lt.parse(e).toString()}catch(t){return e}}function Fg(e){try{return lt.parse(e).with({fragment:null,query:null}).toString()}catch(t){return e}}function ei(e){try{var t=lt.parse(e);if(t.scheme==="file")return t.fsPath}catch(r){}return e}var Yc=Ke(Or());var qg=Yc.loadMessageBundle(),Kc=function(){function e(t,r){this.jsonSchemaService=t,this.promise=r,this.validationEnabled=!0}return e.prototype.configure=function(t){t&&(this.validationEnabled=t.validate!==!1,this.commentSeverity=t.allowComments?void 0:k.DiagnosticSeverity.Error)},e.prototype.doValidation=function(t,r,n,i){var o=this;if(!this.validationEnabled)return this.promise.resolve([]);var s=[],u={},l=function(c){var m=c.range.start.line+" "+c.range.start.character+" "+c.message;u[m]||(u[m]=!0,s.push(c))},f=function(c){var m=n?ti(n.trailingCommas):k.DiagnosticSeverity.Error,y=n?ti(n.comments):o.commentSeverity,x=(n==null?void 0:n.schemaValidation)?ti(n.schemaValidation):k.DiagnosticSeverity.Warning,T=(n==null?void 0:n.schemaRequest)?ti(n.schemaRequest):k.DiagnosticSeverity.Warning;if(c){if(c.errors.length&&r.root&&T){var C=r.root,p=C.type==="object"?C.properties[0]:void 0;if(p&&p.keyNode.value==="$schema"){var h=p.valueNode||p,g=k.Range.create(t.positionAt(h.offset),t.positionAt(h.offset+h.length));l(k.Diagnostic.create(g,c.errors[0],T,X.SchemaResolveError))}else{var g=k.Range.create(t.positionAt(C.offset),t.positionAt(C.offset+1));l(k.Diagnostic.create(g,c.errors[0],T,X.SchemaResolveError))}}else if(x){var O=r.validate(t,c.schema,x);O&&O.forEach(l)}Zc(c.schema)&&(y=void 0),Qc(c.schema)&&(m=void 0)}for(var q=0,D=r.syntaxErrors;q=ri&&e<=Mg?e-ri+10:0)}function tl(e){if(e[0]==="#")switch(e.length){case 4:return{red:ge(e.charCodeAt(1))*17/255,green:ge(e.charCodeAt(2))*17/255,blue:ge(e.charCodeAt(3))*17/255,alpha:1};case 5:return{red:ge(e.charCodeAt(1))*17/255,green:ge(e.charCodeAt(2))*17/255,blue:ge(e.charCodeAt(3))*17/255,alpha:ge(e.charCodeAt(4))*17/255};case 7:return{red:(ge(e.charCodeAt(1))*16+ge(e.charCodeAt(2)))/255,green:(ge(e.charCodeAt(3))*16+ge(e.charCodeAt(4)))/255,blue:(ge(e.charCodeAt(5))*16+ge(e.charCodeAt(6)))/255,alpha:1};case 9:return{red:(ge(e.charCodeAt(1))*16+ge(e.charCodeAt(2)))/255,green:(ge(e.charCodeAt(3))*16+ge(e.charCodeAt(4)))/255,blue:(ge(e.charCodeAt(5))*16+ge(e.charCodeAt(6)))/255,alpha:(ge(e.charCodeAt(7))*16+ge(e.charCodeAt(8)))/255}}}var rl=function(){function e(t){this.schemaService=t}return e.prototype.findDocumentSymbols=function(t,r,n){var i=this;n===void 0&&(n={resultLimit:Number.MAX_VALUE});var o=r.root;if(!o)return[];var s=n.resultLimit||Number.MAX_VALUE,u=t.uri;if((u==="vscode://defaultsettings/keybindings.json"||jt(u.toLowerCase(),"/user/keybindings.json"))&&o.type==="array"){for(var l=[],f=0,a=o.items;f0){s--;var w=k.Location.create(t.uri,Lt(t,b)),R=_?_+"."+b.keyNode.value:b.keyNode.value;g.push({name:i.getKeyLabel(b),kind:i.getSymbolKind(v.type),location:w,containerName:_}),C.push({node:v,containerName:R})}else h=!0})};p0){s--;var R=Lt(t,v),F=R,L=String(w),$={name:L,kind:i.getSymbolKind(v.type),range:R,selectionRange:F,children:[]};b.push($),h.push({result:$.children,node:v})}else O=!0}):_.type==="object"&&_.properties.forEach(function(v){var w=v.valueNode;if(w)if(s>0){s--;var R=Lt(t,v),F=Lt(t,v.keyNode),L=[],$={name:i.getKeyLabel(v),kind:i.getSymbolKind(w.type),range:R,selectionRange:F,children:L,detail:i.getDetail(w)};b.push($),h.push({result:L,node:w})}else O=!0})};g0&&i[i.length-1].kind===c){var a=i.pop(),m=e.positionAt(s.getTokenOffset()).line;a&&m>a.startLine+1&&o!==a.startLine&&(a.endLine=m-1,l(a),o=a.startLine)}break}case 13:{var f=e.positionAt(s.getTokenOffset()).line,y=e.positionAt(s.getTokenOffset()+s.getTokenLength()).line;s.getTokenError()===1&&f+1=0&&i[C].kind!==k.FoldingRangeKind.Region;)C--;if(C>=0){var a=i[C];i.length=C,m>a.startLine&&o!==a.startLine&&(a.endLine=m,l(a),o=a.startLine)}}}break}}u=s.scan()}var p=t&&t.rangeLimit;if(typeof p!="number"||r.length<=p)return r;t&&t.onRangeLimitExceeded&&t.onRangeLimitExceeded(e.uri);for(var h=[],g=0,O=n;gp){_=C;break}D+=b}}for(var v=[],C=0;C=c&&l<=m&&a.push(i(c,m)),a.push(i(f.offset,f.offset+f.length));break;case"number":case"boolean":case"null":case"property":a.push(i(f.offset,f.offset+f.length));break}if(f.type==="property"||f.parent&&f.parent.type==="array"){var y=s(f.offset+f.length,5);y!==-1&&a.push(i(f.offset,y))}f=f.parent}for(var x=void 0,T=a.length-1;T>=0;T--)x=k.SelectionRange.create(a[T],x);return x||(x=k.SelectionRange.create(k.Range.create(u,u))),x}function i(u,l){return k.Range.create(e.positionAt(u),e.positionAt(l))}var o=ht(e.getText(),!0);function s(u,l){o.setPosition(u);var f=o.scan();return f===l?o.getTokenOffset()+o.getTokenLength():-1}return t.map(n)}function sl(e,t){var r=[];return t.visit(function(n){var i;if(n.type==="property"&&n.keyNode.value==="$ref"&&((i=n.valueNode)===null||i===void 0?void 0:i.type)==="string"){var o=n.valueNode.value,s=$g(t,o);if(s){var u=e.positionAt(s.offset);r.push({target:e.uri+"#"+(u.line+1)+","+(u.character+1),range:Wg(e,n.valueNode)})}}return!0}),Promise.resolve(r)}function Wg(e,t){return k.Range.create(e.positionAt(t.offset+1),e.positionAt(t.offset+t.length-1))}function $g(e,t){var r=Vg(t);return r?_s(r,e.root):null}function _s(e,t){if(!t)return null;if(e.length===0)return t;var r=e.shift();if(t&&t.type==="object"){var n=t.properties.find(function(s){return s.keyNode.value===r});return n?_s(e,n.valueNode):null}else if(t&&t.type==="array"&&r.match(/^(0|[1-9][0-9]*)$/)){var i=Number.parseInt(r),o=t.items[i];return o?_s(e,o):null}return null}function Vg(e){return e==="#"?[]:e[0]!=="#"||e[1]!=="/"?null:e.substring(2).split(/\//).map(Hg)}function Hg(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function Ps(e){var t=e.promiseConstructor||Promise,r=new Xc(e.schemaRequestService,e.workspaceContext,t);r.setSchemaContributions(ni);var n=new Ic(r,e.contributions,t,e.clientCapabilities),i=new Lc(r,e.contributions,t),o=new rl(r),s=new Kc(r,t);return{configure:function(u){r.clearExternalSchemas(),u.schemas&&u.schemas.forEach(function(l){r.registerExternalSchema(l.uri,l.fileMatch,l.schema)}),s.configure(u)},resetSchema:function(u){return r.onResourceChange(u)},doValidation:s.doValidation.bind(s),parseJSONDocument:function(u){return Ac(u,{collectComments:!0})},newJSONDocument:function(u,l){return qc(u,l)},getMatchingSchemas:r.getMatchingSchemas.bind(r),doResolve:n.doResolve.bind(n),doComplete:n.doComplete.bind(n),findDocumentSymbols:o.findDocumentSymbols.bind(o),findDocumentSymbols2:o.findDocumentSymbols2.bind(o),findColorSymbols:function(u,l){return o.findDocumentColors(u,l).then(function(f){return f.map(function(a){return a.range})})},findDocumentColors:o.findDocumentColors.bind(o),getColorPresentations:o.getColorPresentations.bind(o),doHover:i.doHover.bind(i),getFoldingRanges:il,getSelectionRanges:ol,findDefinition:function(){return Promise.resolve([])},findLinks:sl,format:function(u,l,f){var a=void 0;if(l){var c=u.offsetAt(l.start),m=u.offsetAt(l.end)-c;a={offset:c,length:m}}var y={tabSize:f?f.tabSize:4,insertSpaces:(f==null?void 0:f.insertSpaces)===!0,insertFinalNewline:(f==null?void 0:f.insertFinalNewline)===!0,eol:` `};return vc(u.getText(),a,y).map(function(x){return k.TextEdit.replace(k.Range.create(u.positionAt(x.offset),u.positionAt(x.offset+x.length)),x.content)})}}}function al(e,t,r){let n={},i=0,o;return t>0&&(o=setInterval(()=>{let s=Date.now()-t*1e3,u=Object.keys(n);for(let l of u)n[l].cTime1&&e[e.length-1].length===0&&t.push("");let r=t.join("/");return e[0].length===0&&(r="/"+r),r}function Jg(e,...t){let r=lt.parse(e),n=r.path.split("/");for(let i of t)n.push(...i.split("/"));return r.with({path:cl(n)}).toString()}var Es;(function(t){t.type=new je.NotificationType("json/schemaAssociations")})(Es||(Es={}));var Os;(function(t){t.type=new je.RequestType("vscode/content")})(Os||(Os={}));var Ns;(function(t){t.type=new je.NotificationType("json/schemaContent")})(Ns||(Ns={}));var Fs;(function(t){t.type=new je.NotificationType("json/resultLimitReached")})(Fs||(Fs={}));var qs;(function(t){t.type=new je.RequestType("json/validate")})(qs||(qs={}));var fl={resolveRelativePath:(e,t)=>{let r=t.substr(0,t.lastIndexOf("/")+1);return ll(r,e)}};function dl(e,t){function r(b=["https","http","file"]){let v={};for(let w of b)w==="file"?v[w]=t.file:(w==="http"||w==="https")&&(v[w]=t.http);return w=>{let R=w.substr(0,w.indexOf(":")),F=v[R];return F?F.getContent(w):e.sendRequest(Os.type,w).then(L=>L,L=>Promise.reject(L.message))}}let n=Ps({workspaceContext:fl,contributions:[],clientCapabilities:Yn.LATEST}),i=new je.TextDocuments(Rr);i.listen(e);let o=!1,s=!1,u=!1,l=Number.MAX_VALUE,f=Number.MAX_VALUE,a=Number.MAX_VALUE,c=Number.MAX_VALUE;e.onInitialize(b=>{var F,L,$,ne,K;let v=(F=b.initializationOptions)==null?void 0:F.handledSchemaProtocols;n=Ps({schemaRequestService:r(v),workspaceContext:fl,contributions:[],clientCapabilities:b.capabilities});function w(Pe,Me){let Se=Pe.split("."),we=b.capabilities;for(let se=0;we&&se{let F=b[v];if(F){if(!F.timeout)return;F.features[R]=R,F.timeout.refresh()}else F={features:{[R]:R}},F.timeout=setTimeout(()=>{e.sendNotification(Fs.type,`${ul(v)}: For performance reasons, ${Object.keys(F.features).join(" and ")} have been limited to ${w} items.`),F.timeout=void 0},2e3),b[v]=F}}}}(),y,x,T=null;e.onDidChangeConfiguration(b=>{let v=b.settings;t.configureHttpRequests&&t.configureHttpRequests(v.http&&v.http.proxy,v.http&&v.http.proxyStrictSSL),y=v.json&&v.json.schemas,C(),f=Math.trunc(Math.max(v.json&&v.json.resultLimit||l,0)),a=Math.trunc(Math.max(v.json&&v.json.resultLimit||Number.MAX_VALUE,0)),s&&(v&&v.json&&v.json.format&&v.json.format.enable?T||(T=e.client.register(je.DocumentRangeFormattingRequest.type,{documentSelector:[{language:"json"},{language:"jsonc"}]})):T&&(T.then(R=>R.dispose()),T=null))}),e.onNotification(Es.type,b=>{x=b,C()}),e.onNotification(Ns.type,b=>{n.resetSchema(b)}),e.onRequest(qs.type,b=>new Promise(v=>{let w=i.get(b);w?(C(),q(w,R=>{v(R)})):v([])}));function C(){let b={validate:!0,allowComments:!0,schemas:new Array};if(x)if(Array.isArray(x))Array.prototype.push.apply(b.schemas,x);else for(let v in x){let w=x[v];Array.isArray(w)&&w.forEach(R=>{b.schemas.push({uri:R,fileMatch:[v]})})}y&&y.forEach((v,w)=>{let R=v.url;!R&&v.schema&&(R=v.schema.id||`vscode://schemas/custom/${w}`),R&&b.schemas.push({uri:R,fileMatch:v.fileMatch,schema:v.schema})}),n.configure(b),i.all().forEach(O)}i.onDidChangeContent(b=>{m.cancel(b.document.uri),O(b.document)}),i.onDidClose(b=>{m.cancel(b.document.uri),g(b.document),e.sendDiagnostics({uri:b.document.uri,diagnostics:[]})});let p={},h=300;function g(b){let v=p[b.uri];v&&(clearTimeout(v),delete p[b.uri])}function O(b){g(b),p[b.uri]=setTimeout(()=>{delete p[b.uri],q(b)},h)}function q(b,v){let w=$=>{e.sendDiagnostics({uri:b.uri,diagnostics:$}),v&&v($)};if(b.getText().length===0){w([]);return}let R=_(b),F=b.version,L=b.languageId==="jsonc"?{comments:"ignore",trailingCommas:"warning"}:{comments:"error",trailingCommas:"error"};n.doValidation(b,R,L).then($=>{setImmediate(()=>{let ne=i.get(b.uri);ne&&ne.version===F&&w($)})},$=>{e.console.error(Sr(`Error while validating ${b.uri}`,$))})}e.onDidChangeWatchedFiles(b=>{let v=!1;b.changes.forEach(w=>{n.resetSchema(w.uri)&&(v=!0)}),v&&i.all().forEach(O)});let D=al(10,60,b=>n.parseJSONDocument(b));i.onDidClose(b=>{D.onDocumentRemoved(b.document)}),e.onShutdown(()=>{D.dispose()});function _(b){return D.get(b)}e.onCompletion((b,v)=>nn(async()=>{let w=i.get(b.textDocument.uri);if(w){let R=_(w);return n.doComplete(w,b.position,R)}return null},null,`Error while computing completions for ${b.textDocument.uri}`,v)),e.onHover((b,v)=>nn(async()=>{let w=i.get(b.textDocument.uri);if(w){let R=_(w);return n.doHover(w,b.position,R)}return null},null,`Error while computing hover for ${b.textDocument.uri}`,v)),e.onDocumentSymbol((b,v)=>Tr(()=>{let w=i.get(b.textDocument.uri);if(w){let R=_(w),F=m.onResultLimitExceeded(w.uri,a,"document symbols");return u?n.findDocumentSymbols2(w,R,{resultLimit:a,onResultLimitExceeded:F}):n.findDocumentSymbols(w,R,{resultLimit:a,onResultLimitExceeded:F})}return[]},[],`Error while computing document symbols for ${b.textDocument.uri}`,v)),e.onDocumentRangeFormatting((b,v)=>Tr(()=>{let w=i.get(b.textDocument.uri);if(w){let R=n.format(w,b.range,b.options);if(R.length>c){let F=Rr.applyEdits(w,R);return[je.TextEdit.replace(k.Range.create(k.Position.create(0,0),w.positionAt(w.getText().length)),F)]}return R}return[]},[],`Error while formatting range for ${b.textDocument.uri}`,v)),e.onDocumentColor((b,v)=>nn(async()=>{let w=i.get(b.textDocument.uri);if(w){let R=m.onResultLimitExceeded(w.uri,a,"document colors"),F=_(w);return n.findDocumentColors(w,F,{resultLimit:a,onResultLimitExceeded:R})}return[]},[],`Error while computing document colors for ${b.textDocument.uri}`,v)),e.onColorPresentation((b,v)=>Tr(()=>{let w=i.get(b.textDocument.uri);if(w){let R=_(w);return n.getColorPresentations(w,R,b.color,b.range)}return[]},[],`Error while computing color presentations for ${b.textDocument.uri}`,v)),e.onFoldingRanges((b,v)=>Tr(()=>{let w=i.get(b.textDocument.uri);if(w){let R=m.onResultLimitExceeded(w.uri,f,"folding ranges");return n.getFoldingRanges(w,{rangeLimit:f,onRangeLimitExceeded:R})}return null},null,`Error while computing folding ranges for ${b.textDocument.uri}`,v)),e.onSelectionRanges((b,v)=>Tr(()=>{let w=i.get(b.textDocument.uri);if(w){let R=_(w);return n.getSelectionRanges(w,b.positions,R)}return[]},[],`Error while computing selection ranges for ${b.textDocument.uri}`,v)),e.onDefinition((b,v)=>nn(async()=>{let w=i.get(b.textDocument.uri);if(w){let R=_(w);return n.findDefinition(w,b.position,R)}return[]},[],`Error while computing definitions for ${b.textDocument.uri}`,v)),e.listen()}ff(); /*! * @overview es6-promise - a tiny implementation of Promises/A+. * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald) * @license Licensed under MIT license * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE * @version v4.2.8+1e68dce6 */ //# sourceMappingURL=server.js.map