nvim/coc/extensions/node_modules/coc-json/lib/server.js

87 lines
254 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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&&(this.buffer[t]!==ea||this.buffer[t+1]!==ta||this.buffer[t+2]!==ea||this.buffer[t+3]!==ta);)t++;if(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.index<t)return;let r=Buffer.alloc(t);this.buffer.copy(r,0,0,t);let n=t;return this.buffer.copy(this.buffer,0,n),this.index=this.index-n,r}get numberOfBytes(){return this.index}},na=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))}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<o;i++)if(this._callbacks[i]===t)if(this._contexts[i]===r){this._callbacks.splice(i,1),this._contexts.splice(i,1);return}else n=!0;if(n)throw new Error("When adding a listener with a context, you should remove it with the same context")}invoke(...t){if(!this._callbacks)return[];let r=[],n=this._callbacks.slice(0),i=this._contexts.slice(0);for(let o=0,s=n.length;o<s;o++)try{r.push(n[o].apply(i[o],t))}catch(u){Mf.default().console.error(u)}return r}isEmpty(){return!this._callbacks||this._callbacks.length===0}dispose(){this._callbacks=void 0,this._contexts=void 0}},$r=class{constructor(t){this._options=t}get event(){return this._event||(this._event=(t,r,n)=>{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<S.length&&z<j;z++)A.push(Rt(S[z]));if(S.length<j)for(let z=S.length;z<j;z++)A.push(null);break}return A}let M={sendNotification:(d,...S)=>{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;s<arguments.length;s++)o[s-2]=arguments[s];var u={title:n,command:i};return E.defined(o)&&o.length>0&&(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<arguments.length;o++)i[o-2]=arguments[o];var s={label:r};return E.defined(n)&&(s.documentation=n),E.defined(i)?s.parameters=i:s.parameters=[],s}e.create=t})(ho||(ho={}));var po;(function(e){e.Text=1,e.Read=2,e.Write=3})(po||(po={}));var go;(function(e){function t(r,n){var i={range:r};return E.number(n)&&(i.kind=n),i}e.create=t})(go||(go={}));var mo;(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(mo||(mo={}));var vo;(function(e){e.Deprecated=1})(vo||(vo={}));var yo;(function(e){function t(r,n,i,o,s){var u={name:r,kind:n,location:{uri:o,range:i}};return s&&(u.containerName=s),u}e.create=t})(yo||(yo={}));var bo;(function(e){function t(n,i,o,s,u,l){var f={name:n,detail:i,kind:o,range:s,selectionRange:u};return l!==void 0&&(f.children=l),f}e.create=t;function r(n){var i=n;return i&&E.string(i.name)&&E.number(i.kind)&&Te.is(i.range)&&Te.is(i.selectionRange)&&(i.detail===void 0||E.string(i.detail))&&(i.deprecated===void 0||E.boolean(i.deprecated))&&(i.children===void 0||Array.isArray(i.children))&&(i.tags===void 0||Array.isArray(i.tags))}e.is=r})(bo||(bo={}));var wo;(function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"})(wo||(wo={}));var Co;(function(e){function t(n,i){var o={diagnostics:n};return i!=null&&(o.only=i),o}e.create=t;function r(n){var i=n;return E.defined(i)&&E.typedArray(i.diagnostics,Ur.is)&&(i.only===void 0||E.typedArray(i.only,E.string))}e.is=r})(Co||(Co={}));var xo;(function(e){function t(n,i,o){var s={title:n};return gr.is(i)?s.command=i:s.edit=i,o!==void 0&&(s.kind=o),s}e.create=t;function r(n){var i=n;return i&&E.string(i.title)&&(i.diagnostics===void 0||E.typedArray(i.diagnostics,Ur.is))&&(i.kind===void 0||E.string(i.kind))&&(i.edit!==void 0||i.command!==void 0)&&(i.command===void 0||gr.is(i.command))&&(i.isPreferred===void 0||E.boolean(i.isPreferred))&&(i.edit===void 0||En.is(i.edit))}e.is=r})(xo||(xo={}));var So;(function(e){function t(n,i){var o={range:n};return E.defined(i)&&(o.data=i),o}e.create=t;function r(n){var i=n;return E.defined(i)&&Te.is(i.range)&&(E.undefined(i.command)||gr.is(i.command))}e.is=r})(So||(So={}));var To;(function(e){function t(n,i){return{tabSize:n,insertSpaces:i}}e.create=t;function r(n){var i=n;return E.defined(i)&&E.number(i.tabSize)&&E.boolean(i.insertSpaces)}e.is=r})(To||(To={}));var ko;(function(e){function t(n,i,o){return{range:n,target:i,data:o}}e.create=t;function r(n){var i=n;return E.defined(i)&&Te.is(i.range)&&(E.undefined(i.target)||E.string(i.target))}e.is=r})(ko||(ko={}));var _o;(function(e){function t(n,i){return{range:n,parent:i}}e.create=t;function r(n){var i=n;return i!==void 0&&Te.is(i.range)&&(i.parent===void 0||e.is(i.parent))}e.is=r})(_o||(_o={}));var ld=[`
`,`\r
`,"\r"],Po;(function(e){function t(o,s,u,l){return new fd(o,s,u,l)}e.create=t;function r(o){var s=o;return!!(E.defined(s)&&E.string(s.uri)&&(E.undefined(s.languageId)||E.string(s.languageId))&&E.number(s.lineCount)&&E.func(s.getText)&&E.func(s.positionAt)&&E.func(s.offsetAt))}e.is=r;function n(o,s){for(var u=o.getText(),l=i(s,function(x,T){var C=x.range.start.line-T.range.start.line;return C===0?x.range.start.character-T.range.start.character:C}),f=u.length,a=l.length-1;a>=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;a<l.length&&c<f.length;){var y=s(l[a],f[c]);y<=0?o[m++]=l[a++]:o[m++]=f[c++]}for(;a<l.length;)o[m++]=l[a++];for(;c<f.length;)o[m++]=f[c++];return o}})(Po||(Po={}));var fd=function(){function e(t,r,n,i){this._uri=t,this._languageId=r,this._version=n,this._content=i,this._lineOffsets=void 0}return Object.defineProperty(e.prototype,"uri",{get:function(){return this._uri},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"languageId",{get:function(){return this._languageId},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"version",{get:function(){return this._version},enumerable:!0,configurable:!0}),e.prototype.getText=function(t){if(t){var r=this.offsetAt(t.start),n=this.offsetAt(t.end);return this._content.substring(r,n)}return this._content},e.prototype.update=function(t,r){this._content=t.text,this._version=r,this._lineOffsets=void 0},e.prototype.getLineOffsets=function(){if(this._lineOffsets===void 0){for(var t=[],r=this._content,n=!0,i=0;i<r.length;i++){n&&(t.push(i),n=!1);var o=r.charAt(i);n=o==="\r"||o===`
`,o==="\r"&&i+1<r.length&&r.charAt(i+1)===`
`&&i++}n&&r.length>0&&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(;n<i;){var o=Math.floor((n+i)/2);r[o]>t?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<r.length?r[t.line+1]:this._content.length;return Math.max(Math.min(n+t.character,i),n)},Object.defineProperty(e.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!0,configurable:!0}),e}(),E;(function(e){var t=Object.prototype.toString;function r(a){return typeof a!="undefined"}e.defined=r;function n(a){return typeof a=="undefined"}e.undefined=n;function i(a){return a===!0||a===!1}e.boolean=i;function o(a){return t.call(a)==="[object String]"}e.string=o;function s(a){return t.call(a)==="[object Number]"}e.number=s;function u(a){return t.call(a)==="[object Function]"}e.func=u;function l(a){return a!==null&&typeof a=="object"}e.objectLiteral=l;function f(a,c){return Array.isArray(a)&&a.every(c)}e.typedArray=f})(E||(E={}))});var Le=W(vr=>{"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;n<i;n++)r[n]=decodeURIComponent(r[n]);if(process.platform==="win32"&&r.length>1){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<r&&n<t&&this._prevData[n]===this._data[n];)n++;if(n<r&&n<t){let i=0;for(;i<r&&i<t&&this._prevData[t-1-i]===this._data[r-1-i];)i++;let o=this._data.slice(n,r-i);return{resultId:this.id,edits:[{start:n,deleteCount:t-i-n,data:o}]}}else return n<r?{resultId:this.id,edits:[{start:n,deleteCount:0,data:this._data.slice(n)}]}:n<t?{resultId:this.id,edits:[{start:n,deleteCount:t-n}]}:{resultId:this.id,edits:[]}}else return this.build()}};zn.SemanticTokensBuilder=nc});var ac=W(Cr=>{"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<process.argv.length;r++){let n=process.argv[r];if(n===e&&r+1<process.argv.length){t(process.argv[r+1]);return}else{let i=n.split("=");i[0]===e&&t(i[1])}}}jp();var Dp={initialize:e=>{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<f.length;a++){let c=f[a];if(c==="--node-ipc"){e=new Yt.IPCMessageReader(process),t=new Yt.IPCMessageWriter(process);break}else if(c==="--stdio"){e=process.stdin,t=process.stdout;break}else if(c==="--socket"){u=parseInt(f[a+1]);break}else if(c==="--pipe"){l=f[a+1];break}else{var i=c.split("=");if(i[0]==="--socket"){u=parseInt(i[1]);break}else if(i[0]==="--pipe"){l=i[1];break}}}if(u){let a=Yt.createServerSocketTransport(u);e=a[0],t=a[1]}else if(l){let a=Yt.createServerPipeTransport(l);e=a[0],t=a[1]}}var o="Use arguments of createConnection or set command line parameters: '--node-ipc', '--stdio' or '--socket={number}'";if(!e)throw new Error("Connection input stream is not set. "+o);if(!t)throw new Error("Connection output stream is not set. "+o);if(rs.func(e.read)&&rs.func(e.on)){let u=e;u.on("end",()=>{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<arguments.length;n++)r[n-2]=arguments[n];return Tc(t,r)}ce.localize=Gp;function Xp(e){return xc.default().loadMessageBundle(e)}ce.loadMessageBundle=Xp;function Yp(e){return xc.default().config(e)}ce.config=Yp});var Or=W(At=>{"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<arguments.length;i++)n[i-2]=arguments[i];if(Qp(t)){if(t>=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<u.keys.length;a++){var c=u.keys[a],m=Tt(c)?c:c.key,y=l[m];y===void 0&&(y=u.messages[a]),f.push(y)}o[s]=f}else o[s]=u.messages}return o}}function sg(e){var t=new Date;Ge.utimes(e,t,t,function(){})}function vs(e,t){return Zn[e]=t,t}function ag(e,t){var r,n=at.join(Z.cacheRoot,e.id+"-"+e.hash+".json"),i=!1,o=!1;try{return r=JSON.parse(Ge.readFileSync(n,{encoding:"utf8",flag:"r"})),sg(n),r}catch(s){if(s.code==="ENOENT")o=!0;else if(s instanceof SyntaxError)console.log("Syntax error parsing message bundle: "+s.message+"."),Ge.unlink(n,function(u){u&&console.error("Deleting corrupted bundle "+n+" failed.")}),i=!0;else throw s}if(r=og(e,t),!r||i)return r;if(o)try{Ge.writeFileSync(n,JSON.stringify(r),{encoding:"utf8",flag:"wx"})}catch(s){if(s.code==="EEXIST")return r;throw s}return r}function Pc(e){try{return ig(e)}catch(t){console.log("Generating default bundle from meta data failed.",t);return}}function ug(e,t){var r;if(tg())try{r=ag(e,t)}catch(i){console.log("Load or create bundle failed ",i)}if(!r){if(Z.languagePackSupport)return Pc(t);var n=ng(t);if(n)try{return Er(n)}catch(i){console.log("Loading in the box message bundle failed.",i)}r=Pc(t)}return r}function cg(e){for(var t,r=at.dirname(e);t=at.join(r,"nls.metadata.header.json"),!Ge.existsSync(t);){var n=at.dirname(r);if(n===r){t=void 0;break}else r=n}return t}function ys(e){if(!e)return Ve.localize;var t=at.extname(e);if(t&&(e=e.substr(0,e.length-t.length)),Z.messageFormat===Ve.MessageFormat.both||Z.messageFormat===Ve.MessageFormat.bundle){var r=cg(e);if(r){var n=at.dirname(r),i=Zn[n];if(i===void 0)try{var o=JSON.parse(Ge.readFileSync(r,"utf8"));try{var s=ug(o,n);i=vs(n,s?{header:o,nlsBundle:s}:null)}catch(a){console.error("Failed to load nls bundle",a),i=vs(n,null)}}catch(a){console.error("Failed to read header file",a),i=vs(n,null)}if(i){var u=e.substr(n.length+1).replace(/\\/g,"/"),l=i.nlsBundle[u];return l===void 0?(console.error("Messages for file "+e+" not found. See console for details."),function(){return"Messages not found."}):ms(l)}}}if(Z.messageFormat===Ve.MessageFormat.both||Z.messageFormat===Ve.MessageFormat.file)try{var f=Er(rg(e));return Array.isArray(f)?ms(f):Ve.isDefined(f.messages)&&Ve.isDefined(f.keys)?ms(f.messages):(console.error("String bundle '"+e+"' uses an unsupported format."),function(){return"File bundle has unsupported format. See console for details"})}catch(a){a.code!=="ENOENT"&&console.error("Failed to load single file bundle",a)}return console.error("Failed to load message bundle for file "+e),function(){return"Failed to load message bundle. See console for details."}}At.loadMessageBundle=ys;function Rc(e){return e&&(Tt(e.locale)&&(Z.locale=e.locale.toLowerCase(),Z.language=Z.locale,Zn=Object.create(null)),e.messageFormat!==void 0&&(Z.messageFormat=e.messageFormat),e.bundleFormat===Ve.BundleFormat.standalone&&Z.languagePackSupport===!0&&(Z.languagePackSupport=!1)),Ve.setPseudo(Z.locale==="pseudo"),ys}At.config=Rc;Zp.default.install(Object.freeze({loadMessageBundle:ys,config:Rc}))});var gl=W(()=>{"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<i;N+=2){var M=O[N],d=O[N+1];M(d),O[N]=void 0,O[N+1]=void 0}i=0}function D(){try{var N=Function("return this")().require("vertx");return o=N.runOnLoop||N.runOnContext,C()}catch(M){return g()}}var _=void 0;y?_=T():m?_=p():x?_=h():a===void 0&&!0?_=D():_=g();function b(N,M){var d=this,S=new this.constructor(R);S[w]===void 0&&Vt(S);var A=d._state;if(A){var j=arguments[A-1];u(function(){return nr(A,S,j,d._result)})}else pt(d,S,N,M);return S}function v(N){var M=this;if(N&&typeof N=="object"&&N.constructor===M)return N;var d=new M(R);return se(d,N),d}var w=Math.random().toString(36).substring(2);function R(){}var F=void 0,L=1,$=2;function ne(){return new TypeError("You cannot resolve a promise with itself")}function K(){return new TypeError("A promises callback cannot return that same promise.")}function Pe(N,M,d,S){try{N.call(M,d,S)}catch(A){return A}}function Me(N,M,d){u(function(S){var A=!1,j=Pe(d,M,function(z){A||(A=!0,M!==z?se(S,z):Ce(S,z))},function(z){A||(A=!0,me(S,z))},"Settle: "+(S._label||" unknown promise"));!A&&j&&(A=!0,me(S,j))},N)}function Se(N,M){M._state===L?Ce(N,M._result):M._state===$?me(N,M._result):pt(M,void 0,function(d){return se(N,d)},function(d){return me(N,d)})}function we(N,M,d){M.constructor===N.constructor&&d===b&&M.constructor.resolve===v?Se(N,M):d===void 0?Ce(N,M):t(d)?Me(N,M,d):Ce(N,M)}function se(N,M){if(N===M)me(N,ne());else if(e(M)){var d=void 0;try{d=M.then}catch(S){me(N,S);return}we(N,M,d)}else Ce(N,M)}function Be(N){N._onerror&&N._onerror(N._result),_t(N)}function Ce(N,M){N._state===F&&(N._result=M,N._state=L,N._subscribers.length!==0&&u(_t,N))}function me(N,M){N._state===F&&(N._state=$,N._result=M,u(Be,N))}function pt(N,M,d,S){var A=N._subscribers,j=A.length;N._onerror=null,A[j]=M,A[j+L]=d,A[j+$]=S,j===0&&N._state&&u(_t,N)}function _t(N){var M=N._subscribers,d=N._state;if(M.length!==0){for(var S=void 0,A=void 0,j=N._result,z=0;z<M.length;z+=3)S=M[z],A=M[z+d],S?nr(d,S,A,j):A(j);N._subscribers.length=0}}function nr(N,M,d,S){var A=t(d),j=void 0,z=void 0,de=!0;if(A){try{j=d(S)}catch(he){de=!1,z=he}if(M===j){me(M,K());return}}else j=S;M._state!==F||(A&&de?se(M,j):de===!1?me(M,z):N===L?Ce(M,j):N===$&&me(M,j))}function $t(N,M){try{M(function(S){se(N,S)},function(S){me(N,S)})}catch(d){me(N,d)}}var Pt=0;function ir(){return Pt++}function Vt(N){N[w]=Pt++,N._state=void 0,N._result=void 0,N._subscribers=[]}function gt(){return new Error("Array Methods must be provided an Array")}var Ht=function(){function N(M,d){this._instanceConstructor=M,this.promise=new M(R),this.promise[w]||Vt(this.promise),n(d)?(this.length=d.length,this._remaining=d.length,this._result=new Array(this.length),this.length===0?Ce(this.promise,this._result):(this.length=this.length||0,this._enumerate(d),this._remaining===0&&Ce(this.promise,this._result))):me(this.promise,gt())}return N.prototype._enumerate=function(d){for(var S=0;this._state===F&&S<d.length;S++)this._eachEntry(d[S],S)},N.prototype._eachEntry=function(d,S){var A=this._instanceConstructor,j=A.resolve;if(j===v){var z=void 0,de=void 0,he=!1;try{z=d.then}catch(ee){he=!0,de=ee}if(z===b&&d._state!==F)this._settledAt(d._state,S,d._result);else if(typeof z!="function")this._remaining--,this._result[S]=d;else if(A===Re){var Ne=new A(R);he?me(Ne,de):we(Ne,d,z),this._willSettleAt(Ne,S)}else this._willSettleAt(new A(function(ee){return ee(d)}),S)}else this._willSettleAt(j(d),S)},N.prototype._settledAt=function(d,S,A){var j=this.promise;j._state===F&&(this._remaining--,d===$?me(j,A):this._result[S]=A),this._remaining===0&&Ce(j,this._result)},N.prototype._willSettleAt=function(d,S){var A=this;pt(d,void 0,function(j){return A._settledAt(L,S,j)},function(j){return A._settledAt($,S,j)})},N}();function or(N){return new Ht(this,N).promise}function Lr(N){var M=this;return n(N)?new M(function(d,S){for(var A=N.length,j=0;j<A;j++)M.resolve(N[j]).then(d,S)}):new M(function(d,S){return S(new TypeError("You must pass an array to race."))})}function Ze(N){var M=this,d=new M(R);return me(d,N),d}function Qe(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function yi(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}var Re=function(){function N(M){this[w]=ir(),this._result=this._state=void 0,this._subscribers=[],R!==M&&(typeof M!="function"&&Qe(),this instanceof N?$t(this,M):yi())}return N.prototype.catch=function(d){return this.then(null,d)},N.prototype.finally=function(d){var S=this,A=S.constructor;return t(d)?S.then(function(j){return A.resolve(d()).then(function(){return j})},function(j){return A.resolve(d()).then(function(){throw j})}):S.then(d,d)},N}();Re.prototype.then=b,Re.all=or,Re.race=Lr,Re.resolve=v,Re.reject=Ze,Re._setScheduler=l,Re._setAsap=f,Re._asap=u;function Rt(){var N=void 0;if(typeof global!="undefined")N=global;else if(typeof self!="undefined")N=self;else try{N=Function("return this")()}catch(S){throw new Error("polyfill failed because global object is unavailable in this environment")}var M=N.Promise;if(M){var d=null;try{d=Object.prototype.toString.call(M.resolve())}catch(S){}if(d==="[object Promise]"&&!M.cast)return}N.Promise=Re}return Re.polyfill=Rt,Re.Promise=Re,Re})});var yl=W((i0,vl)=>{"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;u<o;u++)s[u]=arguments[u];var l=i&&i.multiArgs,f=void 0;return i&&i.thisArg?f=i.thisArg:i&&(f=i),new e(function(a,c){s.push(function(x){if(x)return c(x);for(var T=arguments.length,C=Array(T>1?T-1:0),p=1;p<T;p++)C[p-1]=arguments[p];if(!l)return a(C[0]);a(C)});var m=n.apply(f,s);t(m)&&a(m)})}}}()});var Ds=W((s0,Cl)=>{"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<t))return e<t*1.5?Math.floor(e/t)+" "+r:Math.ceil(e/t)+" "+r+"s"}});var Is=W((Y,kl)=>{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<s.length;u++)s[u]=arguments[u];s[0]=Y.coerce(s[0]),typeof s[0]!="string"&&s.unshift("%O");var l=0;s[0]=s[0].replace(/%([a-zA-Z%])/g,function(a,c){if(a==="%%")return a;l++;var m=Y.formatters[c];if(typeof m=="function"){var y=s[l];a=m.call(n,y),s.splice(l,1),l--}return a}),Y.formatArgs.call(n,s);var f=r.log||Y.log||console.log.bind(console);f.apply(n,s)}}return r.namespace=e,r.enabled=Y.enabled(e),r.useColors=Y.useColors(),r.color=im(e),r.destroy=om,typeof Y.init=="function"&&Y.init(r),Y.instances.push(r),r}function om(){var e=Y.instances.indexOf(this);return e!==-1?(Y.instances.splice(e,1),!0):!1}function rm(e){Y.save(e),Y.names=[],Y.skips=[];var t,r=(typeof e=="string"?e:"").split(/[\s,]+/),n=r.length;for(t=0;t<n;t++)!r[t]||(e=r[t].replace(/\*/g,".*?"),e[0]==="-"?Y.skips.push(new RegExp("^"+e.substr(1)+"$")):Y.names.push(new RegExp("^"+e+"$")));for(t=0;t<Y.instances.length;t++){var i=Y.instances[t];i.enabled=Y.enabled(i.namespace)}}function tm(){Y.enable("")}function nm(e){if(e[e.length-1]==="*")return!0;var t,r;for(t=0,r=Y.skips.length;t<r;t++)if(Y.skips[t].test(e))return!1;for(t=0,r=Y.names.length;t<r;t++)if(Y.names[t].test(e))return!0;return!1}function em(e){return e instanceof Error?e.stack||e.message:e}});var Rl=W((De,_l)=>{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<t.length;r++)e.inspectOpts[t[r]]=be.inspectOpts[t[r]]}be.enable(Ol())});var Fl=W((u0,Ws)=>{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<f.length;c++)a=(a<<5)-a+f.charCodeAt(c),a|=0;return r.colors[Math.abs(a)%r.colors.length]}r.selectColor=t;function r(f){var a;function c(){if(!!c.enabled){for(var m=arguments.length,y=new Array(m),x=0;x<m;x++)y[x]=arguments[x];var T=c,C=Number(new Date),p=C-(a||C);T.diff=p,T.prev=a,T.curr=C,a=C,y[0]=r.coerce(y[0]),typeof y[0]!="string"&&y.unshift("%O");var h=0;y[0]=y[0].replace(/%([a-zA-Z%])/g,function(O,q){if(O==="%%")return O;h++;var D=r.formatters[q];if(typeof D=="function"){var _=y[h];O=D.call(T,_),y.splice(h,1),h--}return O}),r.formatArgs.call(T,y);var g=T.log||r.log;g.apply(T,y)}}return c.namespace=f,c.enabled=r.enabled(f),c.useColors=r.useColors(),c.color=t(f),c.destroy=n,c.extend=i,typeof r.init=="function"&&r.init(c),r.instances.push(c),c}function n(){var f=r.instances.indexOf(this);return f!==-1?(r.instances.splice(f,1),!0):!1}function i(f,a){return r(this.namespace+(typeof a=="undefined"?":":a)+f)}function o(f){r.save(f),r.names=[],r.skips=[];var a,c=(typeof f=="string"?f:"").split(/[\s,]+/),m=c.length;for(a=0;a<m;a++)!c[a]||(f=c[a].replace(/\*/g,".*?"),f[0]==="-"?r.skips.push(new RegExp("^"+f.substr(1)+"$")):r.names.push(new RegExp("^"+f+"$")));for(a=0;a<r.instances.length;a++){var y=r.instances[a];y.enabled=r.enabled(y.namespace)}}function s(){r.enable("")}function u(f){if(f[f.length-1]==="*")return!0;var a,c;for(a=0,c=r.skips.length;a<c;a++)if(r.skips[a].test(f))return!1;for(a=0,c=r.names.length;a<c;a++)if(r.names[a].test(f))return!0;return!1}function l(f){return f instanceof Error?f.stack||f.message:f}return r.enable(r.load()),r}Il.exports=_m});var Ll=W((Xe,li)=>{"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<t.length;r++)e.inspectOpts[t[r]]=Oe.inspectOpts[t[r]]}di.exports=Vs()(Oe);var Wl=di.exports.formatters;Wl.o=function(e){return this.inspectOpts.colors=this.useColors,hi.inspect(e,this.inspectOpts).split(`
`).map(function(t){return t.trim()}).join(" ")};Wl.O=function(e){return this.inspectOpts.colors=this.useColors,hi.inspect(e,this.inspectOpts)}});var Vl=W((d0,Hs)=>{"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<arguments.length;i++)n[i-2]=arguments[i];if(Um(t)){if(t>=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;n<arguments.length;n++)r[n-2]=arguments[n];return zs(t,r)}function Qm(e){var t;if(Q.cacheLanguageResolution&&t)t=t;else{if(vi||!Q.language)t=".nls.json";else for(var r=Q.language;r;){var n=".nls."+r+".json";if(Ye.existsSync(e+n)){t=n;break}else{var i=r.lastIndexOf("-");i>0?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<u.keys.length;a++){var c=u.keys[a],m=kt(c)?c:c.key,y=l[m];y===void 0&&(y=u.messages[a]),f.push(y)}o[s]=f}else o[s]=u.messages}return o}}function rv(e){var t=new Date;Ye.utimes(e,t,t,function(){})}function Js(e,t){return mi[e]=t,t}function nv(e,t){var r,n=ft.join(Q.cacheRoot,e.id+"-"+e.hash+".json"),i=!1,o=!1;try{return r=JSON.parse(Ye.readFileSync(n,{encoding:"utf8",flag:"r"})),rv(n),r}catch(s){if(s.code==="ENOENT")o=!0;else if(s instanceof SyntaxError)console.log("Syntax error parsing message bundle: "+s.message+"."),Ye.unlink(n,function(u){u&&console.error("Deleting corrupted bundle "+n+" failed.")}),i=!0;else throw s}if(r=tv(e,t),!r||i)return r;if(o)try{Ye.writeFileSync(n,JSON.stringify(r),{encoding:"utf8",flag:"wx"})}catch(s){if(s.code==="EEXIST")return r;throw s}return r}function Ql(e){try{return ev(e)}catch(t){console.log("Generating default bundle from meta data failed.",t);return}}function iv(e,t){var r;if(Ym())try{r=nv(e,t)}catch(i){console.log("Load or create bundle failed ",i)}if(!r){if(Q.languagePackSupport)return Ql(t);var n=Km(t);if(n)try{return jr(n)}catch(i){console.log("Loading in the box message bundle failed.",i)}r=Ql(t)}return r}function ov(e){for(var t,r=ft.dirname(e);t=ft.join(r,"nls.metadata.header.json"),!Ye.existsSync(t);){var n=ft.dirname(r);if(n===r){t=void 0;break}else r=n}return t}function Kl(e){if(!e)return Zm;var t=ft.extname(e);if(t&&(e=e.substr(0,e.length-t.length)),Q.messageFormat===Dr.both||Q.messageFormat===Dr.bundle){var r=ov(e);if(r){var n=ft.dirname(r),i=mi[n];if(i===void 0)try{var o=JSON.parse(Ye.readFileSync(r,"utf8"));try{var s=iv(o,n);i=Js(n,s?{header:o,nlsBundle:s}:null)}catch(a){console.error("Failed to load nls bundle",a),i=Js(n,null)}}catch(a){console.error("Failed to read header file",a),i=Js(n,null)}if(i){var u=e.substr(n.length+1).replace(/\\/g,"/"),l=i.nlsBundle[u];return l===void 0?(console.error("Messages for file "+e+" not found. See console for details."),function(){return"Messages not found."}):Bs(l)}}}if(Q.messageFormat===Dr.both||Q.messageFormat===Dr.file)try{var f=jr(Qm(e));return Array.isArray(f)?Bs(f):gi(f.messages)&&gi(f.keys)?Bs(f.messages):(console.error("String bundle '"+e+"' uses an unsupported format."),function(){return"File bundle has unsupported format. See console for details"})}catch(a){a.code!=="ENOENT"&&console.error("Failed to load single file bundle",a)}return console.error("Failed to load message bundle for file "+e),function(){return"Failed to load message bundle. See console for details."}}Wt.loadMessageBundle=Kl;function sv(e){return e&&(kt(e.locale)&&(Q.locale=e.locale.toLowerCase(),Q.language=Q.locale,Zl=void 0,mi=Object.create(null)),e.messageFormat!==void 0&&(Q.messageFormat=e.messageFormat),e.bundleFormat===Xl.standalone&&Q.languagePackSupport===!0&&(Q.languagePackSupport=!1)),vi=Q.locale==="pseudo",Kl}Wt.config=sv});var uf=W(gn=>{"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<arguments.length;r++)t[r-1]=arguments[r];return t.forEach(function(n){return Object.keys(n).forEach(function(i){return e[i]=n[i]})}),e}function af(e){var t;return new Promise(function(r,n){var i=Us.parse(e.url),o={hostname:i.hostname,port:i.port?parseInt(i.port):i.protocol==="https:"?443:80,path:i.path,method:e.type||"GET",headers:e.headers,agent:e.agent,rejectUnauthorized:typeof e.strictSSL=="boolean"?e.strictSSL:!0};e.user&&e.password&&(o.auth=e.user+":"+e.password);var s=function(u){u.statusCode>=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<g||!O;){var _=e.charCodeAt(n);if(_>=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<g&&(D=-1),D}function y(g){n=g,i="",o=0,s=16,c=0}function x(){var g=n;if(e.charCodeAt(n)===48)n++;else for(n++;n<e.length&&kr(e.charCodeAt(n));)n++;if(n<e.length&&e.charCodeAt(n)===46)if(n++,n<e.length&&kr(e.charCodeAt(n)))for(n++;n<e.length&&kr(e.charCodeAt(n));)n++;else return c=3,e.substring(g,n);var O=n;if(n<e.length&&(e.charCodeAt(n)===69||e.charCodeAt(n)===101))if(n++,(n<e.length&&e.charCodeAt(n)===43||e.charCodeAt(n)===45)&&n++,n<e.length&&kr(e.charCodeAt(n))){for(n++;n<e.length&&kr(e.charCodeAt(n));)n++;O=n}else c=3;return e.substring(g,O)}function T(){for(var g="",O=n;;){if(n>=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<r&&!on(e.charCodeAt(n));)n++;return i=e.substring(O,n),s=12}if(e.charCodeAt(n+1)===42){n+=2;for(var q=r-1,D=!1;n<q;){var _=e.charCodeAt(n);if(_===42&&e.charCodeAt(n+1)===47){n+=2,D=!0;break}n++,on(_)&&(_===13&&e.charCodeAt(n)===10&&n++,u++,f=n)}return D||(n++,c=1),i=e.substring(O,n),s=13}return i+=String.fromCharCode(g),n++,s=16;case 45:if(i+=String.fromCharCode(g),n++,n===r||!kr(e.charCodeAt(n)))return s=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return i+=x(),s=11;default:for(;n<r&&p(g);)n++,g=e.charCodeAt(n);if(o!==n){switch(i=e.substring(o,n),i){case"true":return s=8;case"false":return s=9;case"null":return s=7}return s=16}return i+=String.fromCharCode(g),n++,s=16}}function p(g){if(ns(g)||on(g))return!1;switch(g){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}function h(){var g;do g=C();while(g>=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;l<e.length&&!os(e,l);)l++;i=e.substring(o,l),n=Lp(i,r)}else i=e,n=0,o=0,s=0,u=e.length;var f=Wp(r,e),a=!1,c=0,m;r.insertSpaces?m=is(" ",r.tabSize||4):m=" ";var y=_r(i,!1),x=!1;function T(){return f+is(m,n+c)}function C(){var F=y.scan();for(a=!1;F===15||F===14;)a=a||F===14,F=y.scan();return x=F===16||y.getTokenError()!==0,F}var p=[];function h(F,L,$){!x&&(!t||L<u&&$>s)&&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<t;n++)r+=e;return r}function Lp(e,t){for(var r=0,n=0,i=t.tabSize||4;r<e.length;){var o=e.charAt(r);if(o===" ")n++;else if(o===" ")n+=i;else break;r++}return Math.floor(n/i)}function Wp(e,t){for(var r=0;r<t.length;r++){var n=t.charAt(r);if(n==="\r")return r+1<t.length&&t.charAt(r+1)===`
`?`\r
`:"\r";if(n===`
`)return`
`}return e&&e.eol||`
`}function os(e,t){return`\r
`.indexOf(e.charAt(t))!==-1}"use strict";var Gn;(function(e){e.DEFAULT={allowTrailingComma:!1}})(Gn||(Gn={}));function dc(e,t,r){t===void 0&&(t=[]),r===void 0&&(r=Gn.DEFAULT);var n=null,i=[],o=[];function s(l){Array.isArray(i)?i.push(l):n!==null&&(i[n]=l)}var u={onObjectBegin:function(){var l={};s(l),o.push(i),i=l,n=null},onObjectProperty:function(l){n=l},onObjectEnd:function(){i=o.pop()},onArrayBegin:function(){var l=[];s(l),o.push(i),i=l,n=null},onArrayEnd:function(){i=o.pop()},onLiteralValue:s,onError:function(l,f,a){t.push({error:l,offset:f,length:a})}};return fc(e,u,r),i[0]}function as(e){if(!e.parent||!e.parent.children)return[];var t=as(e.parent);if(e.parent.type==="property"){var r=e.parent.children[0].value;t.push(r)}else if(e.parent.type==="array"){var n=e.parent.children.indexOf(e);n!==-1&&t.push(n)}return t}function Xn(e){switch(e.type){case"array":return e.children.map(Xn);case"object":for(var t=Object.create(null),r=0,n=e.children;r<n.length;r++){var i=n[r],o=i.children[1];o&&(t[i.children[0].value]=Xn(o))}return t;case"null":case"string":case"number":case"boolean":return e.value;default:return}}function $p(e,t,r){return r===void 0&&(r=!1),t>=e.offset&&t<e.offset+e.length||r&&t===e.offset+e.length}function us(e,t,r){if(r===void 0&&(r=!1),$p(e,t,r)){var n=e.children;if(Array.isArray(n))for(var i=0;i<n.length&&n[i].offset<=t;i++){var o=us(n[i],t,r);if(o)return o}return e}}function fc(e,t,r){r===void 0&&(r=Gn.DEFAULT);var n=_r(e,!1);function i(v){return v?function(){return v(n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter())}:function(){return!0}}function o(v){return v?function(w){return v(w,n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter())}:function(){return!0}}var s=i(t.onObjectBegin),u=o(t.onObjectProperty),l=i(t.onObjectEnd),f=i(t.onArrayBegin),a=i(t.onArrayEnd),c=o(t.onLiteralValue),m=o(t.onSeparator),y=i(t.onComment),x=o(t.onError),T=r&&r.disallowComments,C=r&&r.allowTrailingComma;function p(){for(;;){var v=n.scan();switch(n.getTokenError()){case 4:h(14);break;case 5:h(15);break;case 3:h(13);break;case 1:T||h(11);break;case 2:h(12);break;case 6:h(16);break}switch(v){case 12:case 13:T?h(10):y();break;case 16:h(1);break;case 15:case 14:break;default:return v}}}function h(v,w,R){if(w===void 0&&(w=[]),R===void 0&&(R=[]),x(v),w.length+R.length>0)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;r<e.length;r++)if(!Pr(e[r],t[r]))return!1}else{var i=[];for(n in e)i.push(n);i.sort();var o=[];for(n in t)o.push(n);if(o.sort(),!Pr(i,o))return!1;for(r=0;r<i.length;r++)if(!Pr(e[i[r]],t[i[r]]))return!1}return!0}function $e(e){return typeof e=="number"}function st(e){return typeof e!="undefined"}function Ue(e){return typeof e=="boolean"}function yc(e){return typeof e=="string"}var k=Ke(Ro());"use strict";var Cc=function(){function e(t,r,n,i){this._uri=t,this._languageId=r,this._version=n,this._content=i,this._lineOffsets=void 0}return Object.defineProperty(e.prototype,"uri",{get:function(){return this._uri},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"languageId",{get:function(){return this._languageId},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"version",{get:function(){return this._version},enumerable:!0,configurable:!0}),e.prototype.getText=function(t){if(t){var r=this.offsetAt(t.start),n=this.offsetAt(t.end);return this._content.substring(r,n)}return this._content},e.prototype.update=function(t,r){for(var n=0,i=t;n<i.length;n++){var o=i[n];if(e.isIncremental(o)){var s=wc(o.range),u=this.offsetAt(s.start),l=this.offsetAt(s.end);this._content=this._content.substring(0,u)+o.text+this._content.substring(l,this._content.length);var f=Math.max(s.start.line,0),a=Math.max(s.end.line,0),c=this._lineOffsets,m=bc(o.text,!1,u);if(a-f===m.length)for(var y=0,x=m.length;y<x;y++)c[y+f+1]=m[y];else m.length<1e4?c.splice.apply(c,[f+1,a-f].concat(m)):this._lineOffsets=c=c.slice(0,f+1).concat(m,c.slice(a+1));var T=o.text.length-(l-u);if(T!==0)for(var y=f+1+m.length,x=c.length;y<x;y++)c[y]=c[y]+T}else if(e.isFull(o))this._content=o.text,this._lineOffsets=void 0;else throw new Error("Unknown change event received")}this._version=r},e.prototype.getLineOffsets=function(){return this._lineOffsets===void 0&&(this._lineOffsets=bc(this._content,!0)),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{line:0,character:t};for(;n<i;){var o=Math.floor((n+i)/2);r[o]>t?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+1<r.length?r[t.line+1]:this._content.length;return Math.max(Math.min(n+t.character,i),n)},Object.defineProperty(e.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!0,configurable:!0}),e.isIncremental=function(t){var r=t;return r!=null&&typeof r.text=="string"&&r.range!==void 0&&(r.rangeLength===void 0||typeof r.rangeLength=="number")},e.isFull=function(t){var r=t;return r!=null&&typeof r.text=="string"&&r.range===void 0&&r.rangeLength===void 0},e}(),Rr;(function(e){function t(i,o,s,u){return new Cc(i,o,s,u)}e.create=t;function r(i,o,s){if(i instanceof Cc)return i.update(o,s),i;throw new Error("TextDocument.update: document must be created by TextDocument.create")}e.update=r;function n(i,o){for(var s=i.getText(),u=cs(o.map(zp),function(x,T){var C=x.range.start.line-T.range.start.line;return C===0?x.range.start.character-T.range.start.character:C}),l=0,f=[],a=0,c=u;a<c.length;a++){var m=c[a],y=i.offsetAt(m.range.start);if(y<l)throw new Error("Overlapping edit");y>l&&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;o<n.length&&s<i.length;){var l=t(n[o],i[s]);l<=0?e[u++]=n[o++]:e[u++]=i[s++]}for(;o<n.length;)e[u++]=n[o++];for(;s<i.length;)e[u++]=i[s++];return e}function bc(e,t,r){r===void 0&&(r=0);for(var n=t?[r]:[],i=0;i<e.length;i++){var o=e.charCodeAt(i);(o===13||o===10)&&(o===13&&i+1<e.length&&e.charCodeAt(i+1)===10&&i++,n.push(r+i+1))}return n}function wc(e){var t=e.start,r=e.end;return t.line>r.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<n.length;r++){var i=n[r];this.merge(i)}},e.prototype.merge=function(t){this.problems=this.problems.concat(t.problems)},e.prototype.mergeEnumValues=function(t){if(!this.enumValueMatch&&!t.enumValueMatch&&this.enumValues&&t.enumValues){this.enumValues=this.enumValues.concat(t.enumValues);for(var r=0,n=this.problems;r<n.length;r++){var i=n[r];i.code===X.EnumValueMismatch&&(i.message=V("enumWarning","Value is not accepted. Valid values: {0}.",this.enumValues.map(function(o){return JSON.stringify(o)}).join(", ")))}}},e.prototype.mergePropertyMatch=function(t){this.merge(t),this.propertiesMatches++,(t.enumValueMatch||!t.hasProblems()&&t.propertiesMatches)&&this.propertiesValueMatches++,t.enumValueMatch&&t.enumValues&&t.enumValues.length===1&&this.primaryValueMatches++},e.prototype.compare=function(t){var r=this.hasProblems();return r!==t.hasProblems()?r?-1:1:this.enumValueMatch!==t.enumValueMatch?t.enumValueMatch?-1:1:this.primaryValueMatches!==t.primaryValueMatches?this.primaryValueMatches-t.primaryValueMatches:this.propertiesValueMatches!==t.propertiesValueMatches?this.propertiesValueMatches-t.propertiesValueMatches:this.propertiesMatches-t.propertiesMatches},e}();function qc(e,t){return t===void 0&&(t=[]),new Fc(e,t,[])}function ut(e){return mc(e)}function sn(e){return gc(e)}function ws(e,t,r){return r===void 0&&(r=!1),t>=e.offset&&t<e.offset+e.length||r&&t===e.offset+e.length}var Fc=function(){function e(t,r,n){r===void 0&&(r=[]),n===void 0&&(n=[]),this.root=t,this.syntaxErrors=r,this.comments=n}return e.prototype.getNodeFromOffset=function(t,r){if(r===void 0&&(r=!1),this.root)return pc(this.root,t,r)},e.prototype.visit=function(t){if(this.root){var r=function(n){var i=t(n),o=n.children;if(Array.isArray(o))for(var s=0;s<o.length&&i;s++)i=r(o[s]);return i};r(this.root)}},e.prototype.validate=function(t,r,n){if(n===void 0&&(n=k.DiagnosticSeverity.Warning),this.root&&r){var i=new He;return _e(this.root,r,i,Cs.instance),i.problems.map(function(o){var s,u=k.Range.create(t.positionAt(o.location.offset),t.positionAt(o.location.offset+o.location.length));return k.Diagnostic.create(u,o.message,(s=o.severity)!==null&&s!==void 0?s:n,o.code)})}},e.prototype.getMatchingSchemas=function(t,r,n){r===void 0&&(r=-1);var i=new mg(r,n);return this.root&&t&&_e(this.root,t,new He,i),i.schemas},e}();function _e(e,t,r,n){if(!e||!n.include(e))return;var i=e;switch(i.type){case"object":f(i,t,r,n);break;case"array":l(i,t,r,n);break;case"string":u(i,t,r,n);break;case"number":s(i,t,r,n);break;case"property":return _e(i.valueNode,t,r,n)}o(),n.add({node:i,schema:t});function o(){function a(L){return i.type===L||L==="integer"&&i.type==="number"&&i.isInteger}if(Array.isArray(t.type)?t.type.some(a)||r.problems.push({location:{offset:i.offset,length:i.length},message:t.errorMessage||V("typeArrayMismatchWarning","Incorrect type. Expected one of {0}.",t.type.join(", "))}):t.type&&(a(t.type)||r.problems.push({location:{offset:i.offset,length:i.length},message:t.errorMessage||V("typeMismatchWarning",'Incorrect type. Expected "{0}".',t.type)})),Array.isArray(t.allOf))for(var c=0,m=t.allOf;c<m.length;c++){var y=m[c];_e(i,Ae(y),r,n)}var x=Ae(t.not);if(x){var T=new He,C=n.newSub();_e(i,x,T,C),T.hasProblems()||r.problems.push({location:{offset:i.offset,length:i.length},message:V("notSchemaWarning","Matches a schema that is not allowed.")});for(var p=0,h=C.schemas;p<h.length;p++){var g=h[p];g.inverted=!g.inverted,n.add(g)}}var O=function(L,$){for(var ne=[],K=void 0,Pe=0,Me=L;Pe<Me.length;Pe++){var Se=Me[Pe],we=Ae(Se),se=new He,Be=n.newSub();if(_e(i,we,se,Be),se.hasProblems()||ne.push(we),!K)K={schema:we,validationResult:se,matchingSchemas:Be};else if(!$&&!se.hasProblems()&&!K.validationResult.hasProblems())K.matchingSchemas.merge(Be),K.validationResult.propertiesMatches+=se.propertiesMatches,K.validationResult.propertiesValueMatches+=se.propertiesValueMatches;else{var Ce=se.compare(K.validationResult);Ce>0?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<R.length;w++){var F=R[w];if(Pr(b,F)){v=!0;break}}r.enumValues=t.enum,r.enumValueMatch=v,v||r.problems.push({location:{offset:i.offset,length:i.length},code:X.EnumValueMismatch,message:t.errorMessage||V("enumWarning","Value is not accepted. Valid values: {0}.",t.enum.map(function(L){return JSON.stringify(L)}).join(", "))})}if(st(t.const)){var b=ut(i);Pr(b,t.const)?r.enumValueMatch=!0:(r.problems.push({location:{offset:i.offset,length:i.length},code:X.EnumValueMismatch,message:t.errorMessage||V("constWarning","Value must be {0}.",JSON.stringify(t.const))}),r.enumValueMatch=!1),r.enumValues=[t.const]}t.deprecationMessage&&i.parent&&r.problems.push({location:{offset:i.parent.offset,length:i.parent.length},severity:k.DiagnosticSeverity.Warning,message:t.deprecationMessage,code:X.Deprecated})}function s(a,c,m,y){var x=a.value;function T(w){var R,F=/^(-?\d+)(?:\.(\d+))?(?:e([-+]\d+))?$/.exec(w.toString());return F&&{value:Number(F[1]+(F[2]||"")),multiplier:(((R=F[2])===null||R===void 0?void 0:R.length)||0)-(parseInt(F[3])||0)}}if($e(c.multipleOf)){var C=-1;if(Number.isInteger(c.multipleOf))C=x%c.multipleOf;else{var p=T(c.multipleOf),h=T(x);if(p&&h){var g=Math.pow(10,Math.abs(h.multiplier-p.multiplier));h.multiplier<p.multiplier?h.value*=g:p.value*=g,C=h.value%p.value}}C!==0&&m.problems.push({location:{offset:a.offset,length:a.length},message:V("multipleOfWarning","Value is not divisible by {0}.",c.multipleOf)})}function O(w,R){if($e(R))return R;if(Ue(R)&&R)return w}function q(w,R){if(!Ue(R)||!R)return w}var D=O(c.minimum,c.exclusiveMinimum);$e(D)&&x<=D&&m.problems.push({location:{offset:a.offset,length:a.length},message:V("exclusiveMinimumWarning","Value is below the exclusive minimum of {0}.",D)});var _=O(c.maximum,c.exclusiveMaximum);$e(_)&&x>=_&&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)&&x<b&&m.problems.push({location:{offset:a.offset,length:a.length},message:V("minimumWarning","Value is below the minimum of {0}.",b)});var v=q(c.maximum,c.exclusiveMaximum);$e(v)&&x>v&&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.length<c.minLength&&m.problems.push({location:{offset:a.offset,length:a.length},message:V("minLengthWarning","String is shorter than the minimum length of {0}.",c.minLength)}),$e(c.maxLength)&&a.value.length>c.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;T++){var C=x[T],p=Ae(C),h=new He,g=a.items[T];g?(_e(g,p,h,y),m.mergePropertyMatch(h)):a.items.length>=x.length&&m.propertiesValueMatches++}if(a.items.length>x.length)if(typeof c.additionalItems=="object")for(var O=x.length;O<a.items.length;O++){var h=new He;_e(a.items[O],c.additionalItems,h,y),m.mergePropertyMatch(h)}else c.additionalItems===!1&&m.problems.push({location:{offset:a.offset,length:a.length},message:V("additionalItemsWarning","Array has too many items according to schema. Expected {0} or fewer.",x.length)})}else{var q=Ae(c.items);if(q)for(var D=0,_=a.items;D<_.length;D++){var g=_[D],h=new He;_e(g,q,h,y),m.mergePropertyMatch(h)}}var b=Ae(c.contains);if(b){var v=a.items.some(function(F){var L=new He;return _e(F,b,L,Cs.instance),!L.hasProblems()});v||m.problems.push({location:{offset:a.offset,length:a.length},message:c.errorMessage||V("requiredItemMissingWarning","Array does not contain required item.")})}if($e(c.minItems)&&a.items.length<c.minItems&&m.problems.push({location:{offset:a.offset,length:a.length},message:V("minItemsWarning","Array has too few items. Expected {0} or more.",c.minItems)}),$e(c.maxItems)&&a.items.length>c.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<p.length;C++){var h=p[C],g=h.keyNode.value;x[g]=h.valueNode,T.push(g)}if(Array.isArray(c.required))for(var O=0,q=c.required;O<q.length;O++){var D=q[O];if(!x[D]){var _=a.parent&&a.parent.type==="property"&&a.parent.keyNode,b=_?{offset:_.offset,length:_.length}:{offset:a.offset,length:1};m.problems.push({location:b,message:V("MissingRequiredPropWarning",'Missing property "{0}".',D)})}}var v=function(Ze){for(var Qe=T.indexOf(Ze);Qe>=0;)T.splice(Qe,1),Qe=T.indexOf(Ze)};if(c.properties)for(var w=0,R=Object.keys(c.properties);w<R.length;w++){var D=R[w];v(D);var F=c.properties[D],L=x[D];if(L)if(Ue(F))if(F)m.propertiesMatches++,m.propertiesValueMatches++;else{var h=L.parent;m.problems.push({location:{offset:h.keyNode.offset,length:h.keyNode.length},message:c.errorMessage||V("DisallowedExtraPropWarning","Property {0} is not allowed.",D)})}else{var $=new He;_e(L,F,$,y),m.mergePropertyMatch($)}}if(c.patternProperties)for(var ne=0,K=Object.keys(c.patternProperties);ne<K.length;ne++)for(var Pe=K[ne],Me=new RegExp(Pe),Se=0,we=T.slice(0);Se<we.length;Se++){var D=we[Se];if(Me.test(D)){v(D);var L=x[D];if(L){var F=c.patternProperties[Pe];if(Ue(F))if(F)m.propertiesMatches++,m.propertiesValueMatches++;else{var h=L.parent;m.problems.push({location:{offset:h.keyNode.offset,length:h.keyNode.length},message:c.errorMessage||V("DisallowedExtraPropWarning","Property {0} is not allowed.",D)})}else{var $=new He;_e(L,F,$,y),m.mergePropertyMatch($)}}}}if(typeof c.additionalProperties=="object")for(var se=0,Be=T;se<Be.length;se++){var D=Be[se],L=x[D];if(L){var $=new He;_e(L,c.additionalProperties,$,y),m.mergePropertyMatch($)}}else if(c.additionalProperties===!1&&T.length>0)for(var Ce=0,me=T;Ce<me.length;Ce++){var D=me[Ce],L=x[D];if(L){var h=L.parent;m.problems.push({location:{offset:h.keyNode.offset,length:h.keyNode.length},message:c.errorMessage||V("DisallowedExtraPropWarning","Property {0} is not allowed.",D)})}}if($e(c.maxProperties)&&a.properties.length>c.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.length<c.minProperties&&m.problems.push({location:{offset:a.offset,length:a.length},message:V("MinPropWarning","Object has fewer properties than the required number of {0}",c.minProperties)}),c.dependencies)for(var pt=0,_t=Object.keys(c.dependencies);pt<_t.length;pt++){var g=_t[pt],nr=x[g];if(nr){var $t=c.dependencies[g];if(Array.isArray($t))for(var Pt=0,ir=$t;Pt<ir.length;Pt++){var Vt=ir[Pt];x[Vt]?m.propertiesValueMatches++:m.problems.push({location:{offset:a.offset,length:a.length},message:V("RequiredDependentPropWarning","Object is missing property {0} required by property {1}.",Vt,g)})}else{var F=Ae($t);if(F){var $=new He;_e(a,F,$,y),m.mergePropertyMatch($)}}}}var gt=Ae(c.propertyNames);if(gt)for(var Ht=0,or=a.properties;Ht<or.length;Ht++){var Lr=or[Ht],g=Lr.keyNode;g&&_e(g,gt,m,Cs.instance)}}}function Ac(e,t){var r=[],n=-1,i=e.getText(),o=ht(i,!1),s=t&&t.collectComments?[]:void 0;function u(){for(;;){var _=o.scan();switch(c(),_){case 12:case 13:Array.isArray(s)&&s.push(k.Range.create(e.positionAt(o.getTokenOffset()),e.positionAt(o.getTokenOffset()+o.getTokenLength())));break;case 15:case 14:break;default:return _}}}function l(_){return o.getToken()===_?(u(),!0):!1}function f(_,b,v,w,R){if(R===void 0&&(R=k.DiagnosticSeverity.Error),r.length===0||v!==n){var F=k.Range.create(e.positionAt(v),e.positionAt(w));r.push(k.Diagnostic.create(F,_,R,b,e.languageId)),n=v}}function a(_,b,v,w,R){v===void 0&&(v=void 0),w===void 0&&(w=[]),R===void 0&&(R=[]);var F=o.getTokenOffset(),L=o.getTokenOffset()+o.getTokenLength();if(F===L&&F>0){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).line<e.positionAt(o.getTokenOffset()).line)return v.length=w.length,v;var L=O(v);return L?(v.valueNode=L,v.length=L.offset+L.length-v.offset,v):a(V("ValueExpected","Value expected"),X.ValueExpected,v,[],[2,5])}function C(_){if(o.getToken()===1){var b=new gg(_,o.getTokenOffset()),v=Object.create(null);u();for(var w=!1;o.getToken()!==2&&o.getToken()!==17;){if(o.getToken()===5){w||a(V("PropertyExpected","Property expected"),X.PropertyExpected);var R=o.getTokenOffset();if(u(),o.getToken()===2){w&&f(V("TrailingComma","Trailing comma"),X.TrailingComma,R,R+1);continue}}else w&&a(V("ExpectedComma","Expected comma"),X.CommaExpected);var F=T(b,v);F?b.properties.push(F):a(V("PropertyExpected","Property expected"),X.PropertyExpected,void 0,[],[2,5]),w=!0}return o.getToken()!==2?a(V("ExpectedCloseBrace","Expected comma or closing brace"),X.CommaOrCloseBraceExpected,b):m(b,!0)}}function p(_){if(o.getToken()===10){var b=new bs(_,o.getTokenOffset());return b.value=o.getTokenValue(),m(b,!0)}}function h(_){if(o.getToken()===11){var b=new hg(_,o.getTokenOffset());if(o.getTokenError()===0){var v=o.getTokenValue();try{var w=JSON.parse(v);if(!$e(w))return a(V("InvalidNumberFormat","Invalid number format."),X.Undefined,b);b.value=w}catch(R){return a(V("InvalidNumberFormat","Invalid number format."),X.Undefined,b)}b.isInteger=v.indexOf(".")===-1}return m(b,!0)}}function g(_){var b;switch(o.getToken()){case 7:return m(new fg(_,o.getTokenOffset()),!0);case 8:return m(new Oc(_,!0,o.getTokenOffset()),!0);case 9:return m(new Oc(_,!1,o.getTokenOffset()),!0);default:return}}function O(_){return y(_)||C(_)||p(_)||h(_)||g(_)}var q=void 0,D=u();return D!==17&&(q=O(q),q?o.getToken()!==17&&a(V("End of file expected","End of file expected."),X.Undefined):a(V("Invalid symbol","Expected a JSON object, array or literal."),X.Undefined)),new Fc(q,r,s)}function Qn(e,t,r){if(e!==null&&typeof e=="object"){var n=t+" ";if(Array.isArray(e)){if(e.length===0)return"[]";for(var i=`[
`,o=0;o<e.length;o++)i+=n+Qn(e[o],n,r),o<e.length-1&&(i+=","),i+=`
`;return i+=t+"]",i}else{var s=Object.keys(e);if(s.length===0)return"{}";for(var i=`{
`,o=0;o<s.length;o++){var u=s[o];i+=n+JSON.stringify(u)+": "+Qn(e[u],n,r),o<s.length-1&&(i+=","),i+=`
`}return i+=t+"}",i}}return r(e)}function jc(e,t){if(e.length<t.length)return!1;for(var r=0;r<t.length;r++)if(e[r]!==t[r])return!1;return!0}function jt(e,t){var r=e.length-t.length;return r>0?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<c.enum.length;y++){var x=void 0;c.markdownEnumDescriptions&&y<c.markdownEnumDescriptions.length?x=u.fromMarkup(c.markdownEnumDescriptions[y]):c.enumDescriptions&&y<c.enumDescriptions.length&&(x=c.enumDescriptions[y]),m(c.enum[y],x)}c.const&&m(c.const)}}})},e.prototype.getSchemaLessPropertyCompletions=function(t,r,n,i){var o=this,s=function(l){l.properties.forEach(function(f){var a=f.keyNode.value;i.add({kind:k.CompletionItemKind.Property,label:a,insertText:o.getInsertTextForValue(a,""),insertTextFormat:k.InsertTextFormat.Snippet,filterText:o.getFilterTextForValue(a),documentation:""})})};if(r.parent)if(r.parent.type==="property"){var u=r.parent.keyNode.value;t.visit(function(l){return l.type==="property"&&l!==r.parent&&l.keyNode.value===u&&l.valueNode&&l.valueNode.type==="object"&&s(l.valueNode),!0})}else r.parent.type==="array"&&r.parent.items.forEach(function(l){l.type==="object"&&l!==r&&s(l)});else r.type==="object"&&i.add({kind:k.CompletionItemKind.Property,label:"$schema",insertText:this.getInsertTextForProperty("$schema",void 0,!0,""),insertTextFormat:k.InsertTextFormat.Snippet,documentation:"",filterText:this.getFilterTextForValue("$schema")})},e.prototype.getSchemaLessValueCompletions=function(t,r,n,i,o){var s=this,u=n;if(r&&(r.type==="string"||r.type==="number"||r.type==="boolean"||r.type==="null")&&(u=r.offset+r.length,r=r.parent),!r){o.add({kind:this.getSuggestionKind("object"),label:"Empty object",insertText:this.getInsertTextForValue({},""),insertTextFormat:k.InsertTextFormat.Snippet,documentation:""}),o.add({kind:this.getSuggestionKind("array"),label:"Empty array",insertText:this.getInsertTextForValue([],""),insertTextFormat:k.InsertTextFormat.Snippet,documentation:""});return}var l=this.evaluateSeparatorAfter(i,u),f=function(y){y.parent&&!ws(y.parent,n,!0)&&o.add({kind:s.getSuggestionKind(y.type),label:s.getLabelTextForMatchingNode(y,i),insertText:s.getInsertTextForMatchingNode(y,i,l),insertTextFormat:k.InsertTextFormat.Snippet,documentation:""}),y.type==="boolean"&&s.addBooleanValueCompletion(!y.value,l,o)};if(r.type==="property"&&n>(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<T.length;x++){var C=T[x];if(C.node===n&&!C.inverted&&C.schema){if(n.type==="array"&&C.schema.items)if(Array.isArray(C.schema.items)){var p=this.findItemAtOffset(n,o,i);p<C.schema.items.length&&this.addSchemaValueCompletions(C.schema.items[p],m,s,u)}else this.addSchemaValueCompletions(C.schema.items,m,s,u);if(f!==void 0){var h=!1;if(C.schema.properties){var g=C.schema.properties[f];g&&(h=!0,this.addSchemaValueCompletions(g,m,s,u))}if(C.schema.patternProperties&&!h)for(var O=0,q=Object.keys(C.schema.patternProperties);O<q.length;O++){var D=q[O],_=new RegExp(D);if(_.test(f)){h=!0;var g=C.schema.patternProperties[D];this.addSchemaValueCompletions(g,m,s,u)}}if(C.schema.additionalProperties&&!h){var g=C.schema.additionalProperties;this.addSchemaValueCompletions(g,m,s,u)}}}}f==="$schema"&&!n.parent&&this.addDollarSchemaCompletions(m,s),u.boolean&&(this.addBooleanValueCompletion(!0,m,s),this.addBooleanValueCompletion(!1,m,s)),u.null&&this.addNullValueCompletion(m,s)}},e.prototype.getContributedValueCompletions=function(t,r,n,i,o,s){if(!r)this.contributions.forEach(function(a){var c=a.collectDefaultCompletions(i.uri,o);c&&s.push(c)});else if((r.type==="string"||r.type==="number"||r.type==="boolean"||r.type==="null")&&(r=r.parent),r&&r.type==="property"&&n>(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;i<o;i++){var s=t.enum[i],u=this.fromMarkup(t.markdownDescription)||t.description;t.markdownEnumDescriptions&&i<t.markdownEnumDescriptions.length&&this.doesSupportMarkdown()?u=this.fromMarkup(t.markdownEnumDescriptions[i]):t.enumDescriptions&&i<t.enumDescriptions.length&&(u=t.enumDescriptions[i]),n.add({kind:this.getSuggestionKind(t.type),label:this.getLabelForValue(s),insertText:this.getInsertTextForValue(s,r),insertTextFormat:k.InsertTextFormat.Snippet,documentation:u})}},e.prototype.collectTypes=function(t,r){if(!(Array.isArray(t.enum)||st(t.const))){var n=t.type;Array.isArray(n)?n.forEach(function(i){return r[i]=!0}):n&&(r[n]=!0)}},e.prototype.addFillerValueCompletions=function(t,r,n){t.object&&n.add({kind:this.getSuggestionKind("object"),label:"{}",insertText:this.getInsertTextForGuessedValue({},r),insertTextFormat:k.InsertTextFormat.Snippet,detail:xs("defaults.object","New object"),documentation:""}),t.array&&n.add({kind:this.getSuggestionKind("array"),label:"[]",insertText:this.getInsertTextForGuessedValue([],r),insertTextFormat:k.InsertTextFormat.Snippet,detail:xs("defaults.array","New array"),documentation:""})},e.prototype.addBooleanValueCompletion=function(t,r,n){n.add({kind:this.getSuggestionKind("boolean"),label:t?"true":"false",insertText:this.getInsertTextForValue(t,r),insertTextFormat:k.InsertTextFormat.Snippet,documentation:""})},e.prototype.addNullValueCompletion=function(t,r){r.add({kind:this.getSuggestionKind("null"),label:"null",insertText:"null"+t,insertTextFormat:k.InsertTextFormat.Snippet,documentation:""})},e.prototype.addDollarSchemaCompletions=function(t,r){var n=this,i=this.schemaService.getRegisteredSchemaIds(function(o){return o==="http"||o==="https"});i.forEach(function(o){return r.add({kind:k.CompletionItemKind.Module,label:n.getLabelForValue(o),filterText:n.getFilterTextForValue(o),insertText:n.getInsertTextForValue(o,t),insertTextFormat:k.InsertTextFormat.Snippet,documentation:""})})},e.prototype.getLabelForValue=function(t){return JSON.stringify(t)},e.prototype.getFilterTextForValue=function(t){return JSON.stringify(t)},e.prototype.getFilterTextForSnippetValue=function(t){return JSON.stringify(t).replace(/\$\{\d+:([^}]+)\}|\$\d+/g,"$1")},e.prototype.getLabelForSnippetValue=function(t){var r=JSON.stringify(t);return r.replace(/\$\{\d+:([^}]+)\}|\$\d+/g,"$1")},e.prototype.getInsertTextForPlainText=function(t){return t.replace(/[\\\$\}]/g,"\\$&")},e.prototype.getInsertTextForValue=function(t,r){var n=JSON.stringify(t,null," ");return n==="{}"?"{$1}"+r:n==="[]"?"[$1]"+r:this.getInsertTextForPlainText(n+r)},e.prototype.getInsertTextForSnippetValue=function(t,r){var n=function(i){return typeof i=="string"&&i[0]==="^"?i.substr(1):JSON.stringify(i)};return Qn(t,"",n)+r},e.prototype.getInsertTextForGuessedValue=function(t,r){switch(typeof t){case"object":return t===null?"${1:null}"+r:this.getInsertTextForValue(t,r);case"string":var n=JSON.stringify(t);return n=n.substr(1,n.length-2),n=this.getInsertTextForPlainText(n),'"${1:'+n+'}"'+r;case"number":case"boolean":return"${1:"+JSON.stringify(t)+"}"+r}return this.getInsertTextForValue(t,r)},e.prototype.getSuggestionKind=function(t){if(Array.isArray(t)){var r=t;t=r.length>0?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()<n;)o=i.scan();return(o===12||o===13)&&i.getTokenOffset()<=n},e.prototype.fromMarkup=function(t){if(t&&this.doesSupportMarkdown())return{kind:k.MarkupKind.Markdown,value:t}},e.prototype.doesSupportMarkdown=function(){if(!st(this.supportsMarkdown)){var t=this.clientCapabilities.textDocument&&this.clientCapabilities.textDocument.completion;this.supportsMarkdown=t&&t.completionItem&&Array.isArray(t.completionItem.documentationFormat)&&t.completionItem.documentationFormat.indexOf(k.MarkupKind.Markdown)!==-1}return this.supportsMarkdown},e.prototype.doesSupportsCommitCharacters=function(){if(!st(this.supportsCommitCharacters)){var t=this.clientCapabilities.textDocument&&this.clientCapabilities.textDocument.completion;this.supportsCommitCharacters=t&&t.completionItem&&!!t.completionItem.commitCharactersSupport}return this.supportsCommitCharacters},e}();var Lc=function(){function e(t,r,n){r===void 0&&(r=[]),this.schemaService=t,this.contributions=r,this.promise=n||Promise}return e.prototype.doHover=function(t,r,n){var i=t.offsetAt(r),o=n.getNodeFromOffset(i);if(!o||(o.type==="object"||o.type==="array")&&i>o.offset+1&&i<o.offset+o.length-1)return this.promise.resolve(null);var s=o;if(o.type==="string"){var u=o.parent;if(u&&u.type==="property"&&u.keyNode===o&&(o=u.valueNode,!o))return this.promise.resolve(null)}for(var l=k.Range.create(t.positionAt(s.offset),t.positionAt(s.offset+s.length)),f=function(x){var T={contents:x,range:l};return T},a=sn(o),c=this.contributions.length-1;c>=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<e.length;i++){var o=e.charCodeAt(i);if(o>=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;r<e.length;r++){var n=e.charCodeAt(r);n===35||n===63?(t===void 0&&(t=e.substr(0,r)),t+=Hc[n]):t!==void 0&&(t+=e[r])}return t!==void 0?t:e}function Vc(e,t){var r;return e.authority&&e.path.length>1&&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;n<i.length;n++){var o=i[n],s=o[0]!=="!";s||(o=o.substring(1)),this.patternRegExps.push(new RegExp(Dc(o)+"$")),this.isInclude.push(s)}this.uris=r}catch(u){this.patternRegExps.length=0,this.isInclude.length=0,this.uris=[]}}return e.prototype.matchesPattern=function(t){for(var r=!1,n=0;n<this.patternRegExps.length;n++){var i=this.patternRegExps[n];i.test(t)&&(r=this.isInclude[n])}return r},e.prototype.getURIs=function(){return this.uris},e}(),Og=function(){function e(t,r,n){this.service=t,this.url=r,this.dependencies={},n&&(this.unresolvedSchema=this.service.promise.resolve(new Mt(n)))}return e.prototype.getUnresolvedSchema=function(){return this.unresolvedSchema||(this.unresolvedSchema=this.service.loadSchema(this.url)),this.unresolvedSchema},e.prototype.getResolvedSchema=function(){var t=this;return this.resolvedSchema||(this.resolvedSchema=this.getUnresolvedSchema().then(function(r){return t.service.resolveSchemaContent(r,t.url,t.dependencies)})),this.resolvedSchema},e.prototype.clearSchema=function(){this.resolvedSchema=void 0,this.unresolvedSchema=void 0,this.dependencies={}},e}(),Mt=function(){function e(t,r){r===void 0&&(r=[]),this.schema=t,this.errors=r}return e}();var Gc=function(){function e(t,r){r===void 0&&(r=[]),this.schema=t,this.errors=r}return e.prototype.getSection=function(t){var r=this.getSectionRecursive(t,this.schema);if(r)return Ae(r)},e.prototype.getSectionRecursive=function(t,r){if(!r||typeof r=="boolean"||t.length===0)return r;var n=t.shift();if(r.properties&&typeof r.properties[n])return this.getSectionRecursive(t,r.properties[n]);if(r.patternProperties)for(var i=0,o=Object.keys(r.patternProperties);i<o.length;i++){var s=o[i],u=new RegExp(s);if(u.test(n))return this.getSectionRecursive(t,r.patternProperties[s])}else{if(typeof r.additionalProperties=="object")return this.getSectionRecursive(t,r.additionalProperties);if(n.match("[0-9]+")){if(Array.isArray(r.items)){var l=parseInt(n,10);if(!isNaN(l)&&r.items[l])return this.getSectionRecursive(t,r.items[l])}else if(r.items)return this.getSectionRecursive(t,r.items)}}},e}();var Xc=function(){function e(t,r,n){this.contextService=r,this.requestService=t,this.promiseConstructor=n||Promise,this.callOnDispose=[],this.contributionSchemas={},this.contributionAssociations=[],this.schemasById={},this.filePatternAssociations=[],this.registeredSchemasIds={}}return e.prototype.getRegisteredSchemaIds=function(t){return Object.keys(this.registeredSchemasIds).filter(function(r){var n=lt.parse(r).scheme;return n!=="schemaservice"&&(!t||t(n))})},Object.defineProperty(e.prototype,"promise",{get:function(){return this.promiseConstructor},enumerable:!1,configurable:!0}),e.prototype.dispose=function(){for(;this.callOnDispose.length>0;)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;u<o.length;u++){var l=o[u];l&&(l.url===s||l.dependencies[s])&&(l.url!==s&&i.push(l.url),l.clearSchema(),o[u]=void 0,n=!0)}return n},e.prototype.setSchemaContributions=function(t){if(t.schemas){var r=t.schemas;for(var n in r){var i=It(n);this.contributionSchemas[i]=this.addSchemaHandle(i,r[n])}}if(Array.isArray(t.schemaAssociations))for(var o=t.schemaAssociations,s=0,u=o;s<u.length;s++){var l=u[s],f=l.uris.map(It),a=this.addFilePatternAssociation(l.pattern,f);this.contributionAssociations.push(a)}},e.prototype.addSchemaHandle=function(t,r){var n=new Og(this,t,r);return this.schemasById[t]=n,n},e.prototype.getOrAddSchemaHandle=function(t,r){return this.schemasById[t]||this.addSchemaHandle(t,r)},e.prototype.addFilePatternAssociation=function(t,r){var n=new Eg(t,r);return this.filePatternAssociations.push(n),n},e.prototype.registerExternalSchema=function(t,r,n){var i=It(t);return this.registeredSchemasIds[i]=!0,this.cachedSchemaForResource=void 0,r&&this.addFilePatternAssociation(r,[t]),n?this.addSchemaHandle(i,n):this.getOrAddSchemaHandle(i)},e.prototype.clearExternalSchemas=function(){this.schemasById={},this.filePatternAssociations=[],this.registeredSchemasIds={},this.cachedSchemaForResource=void 0;for(var t in this.contributionSchemas)this.schemasById[t]=this.contributionSchemas[t],this.registeredSchemasIds[t]=!0;for(var r=0,n=this.contributionAssociations;r<n.length;r++){var i=n[r];this.filePatternAssociations.push(i)}},e.prototype.getResolvedSchema=function(t){var r=It(t),n=this.schemasById[r];return n?n.getResolvedSchema():this.promise.resolve(void 0)},e.prototype.loadSchema=function(t){if(!this.requestService){var r=Dt("json.schema.norequestservice","Unable to load schema from '{0}'. No schema request service available",ei(t));return this.promise.resolve(new Mt({},[r]))}return this.requestService(t).then(function(n){if(!n){var i=Dt("json.schema.nocontent","Unable to load schema from '{0}': No content.",ei(t));return new Mt({},[i])}var o={},s=[];o=hc(n,s);var u=s.length?[Dt("json.schema.invalidFormat","Unable to parse content from '{0}': Parse error at offset {1}.",ei(t),s[0].offset)]:[];return new Mt(o,u)},function(n){var i=n.toString(),o=n.toString().split("Error: ");return o.length>1&&(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;w<arguments.length;w++)v[w]=arguments[w];for(var R=0,F=v;R<F.length;R++){var L=F[R];typeof L=="object"&&p.push(L)}},q=function(){for(var v=[],w=0;w<arguments.length;w++)v[w]=arguments[w];for(var R=0,F=v;R<F.length;R++){var L=F[R];if(typeof L=="object")for(var $ in L){var ne=$,K=L[ne];typeof K=="object"&&p.push(K)}}},D=function(){for(var v=[],w=0;w<arguments.length;w++)v[w]=arguments[w];for(var R=0,F=v;R<F.length;R++){var L=F[R];if(Array.isArray(L))for(var $=0,ne=L;$<ne.length;$++){var K=ne[$];typeof K=="object"&&p.push(K)}}},_=function(v){for(var w=[];v.$ref;){var R=v.$ref,F=R.split("#",2);if(F[0].length>0){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;a<c.length;a++){var m=c[a];if(m.matchesPattern(f))for(var y=0,x=m.getURIs();y<x.length;y++){var T=x[y];u[T]||(l.push(T),u[T]=!0)}}var C=l.length>0?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<D.length;q++){var _=D[q];if(_.code===X.TrailingComma){if(typeof m!="number")continue;_.severity=m}l(_)}if(typeof y=="number"){var b=qg("InvalidCommentToken","Comments are not permitted in JSON.");r.comments.forEach(function(v){l(k.Diagnostic.create(v,b,y,X.CommentNotPermitted))})}return s};if(i){var a=i.id||"schemaservice://untitled/"+Ag++;return this.jsonSchemaService.resolveSchemaContent(new Mt(i),a,{}).then(function(c){return f(c)})}return this.jsonSchemaService.getSchemaForResource(t.uri,r).then(function(c){return f(c)})},e}();var Ag=0;function Zc(e){if(e&&typeof e=="object"){if(Ue(e.allowComments))return e.allowComments;if(e.allOf)for(var t=0,r=e.allOf;t<r.length;t++){var n=r[t],i=Zc(n);if(Ue(i))return i}}}function Qc(e){if(e&&typeof e=="object"){if(Ue(e.allowTrailingCommas))return e.allowTrailingCommas;var t=e;if(Ue(t.allowsTrailingCommas))return t.allowsTrailingCommas;if(e.allOf)for(var r=0,n=e.allOf;r<n.length;r++){var i=n[r],o=Qc(i);if(Ue(o))return o}}}function ti(e){switch(e){case"error":return k.DiagnosticSeverity.Error;case"warning":return k.DiagnosticSeverity.Warning;case"ignore":return}}var el=48,jg=57,Dg=65,ri=97,Mg=102;function ge(e){return e<el?0:e<=jg?e-el:(e<ri&&(e+=ri-Dg),e>=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;f<a.length;f++){var c=a[f];if(c.type==="object")for(var m=0,y=c.properties;m<y.length;m++){var x=y[m];if(x.keyNode.value==="key"&&x.valueNode){var T=k.Location.create(t.uri,Lt(t,c));if(l.push({name:ut(x.valueNode),kind:k.SymbolKind.Function,location:T}),s--,s<=0)return n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(u),l}}}return l}for(var C=[{node:o,containerName:""}],p=0,h=!1,g=[],O=function(D,_){D.type==="array"?D.items.forEach(function(b){b&&C.push({node:b,containerName:_})}):D.type==="object"&&D.properties.forEach(function(b){var v=b.valueNode;if(v)if(s>0){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})};p<C.length;){var q=C[p++];O(q.node,q.containerName)}return h&&n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(u),g},e.prototype.findDocumentSymbols2=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;f<a.length;f++){var c=a[f];if(c.type==="object")for(var m=0,y=c.properties;m<y.length;m++){var x=y[m];if(x.keyNode.value==="key"&&x.valueNode){var T=Lt(t,c),C=Lt(t,x.keyNode);if(l.push({name:ut(x.valueNode),kind:k.SymbolKind.Function,range:T,selectionRange:C}),s--,s<=0)return n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(u),l}}}return l}for(var p=[],h=[{node:o,result:p}],g=0,O=!1,q=function(_,b){_.type==="array"?_.items.forEach(function(v,w){if(v)if(s>0){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})};g<h.length;){var D=h[g++];q(D.node,D.result)}return O&&n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(u),p},e.prototype.getSymbolKind=function(t){switch(t){case"object":return k.SymbolKind.Module;case"string":return k.SymbolKind.String;case"number":return k.SymbolKind.Number;case"array":return k.SymbolKind.Array;case"boolean":return k.SymbolKind.Boolean;default:return k.SymbolKind.Variable}},e.prototype.getKeyLabel=function(t){var r=t.keyNode.value;return r&&(r=r.replace(/[\n]/g,"\u21B5")),r&&r.trim()?r:'"'+r+'"'},e.prototype.getDetail=function(t){if(!!t){if(t.type==="boolean"||t.type==="number"||t.type==="null"||t.type==="string")return String(t.value);if(t.type==="array")return t.children.length?void 0:"[]";if(t.type==="object")return t.children.length?void 0:"{}"}},e.prototype.findDocumentColors=function(t,r,n){return this.schemaService.getSchemaForResource(t.uri,r).then(function(i){var o=[];if(i)for(var s=n&&typeof n.resultLimit=="number"?n.resultLimit:Number.MAX_VALUE,u=r.getMatchingSchemas(i.schema),l={},f=0,a=u;f<a.length;f++){var c=a[f];if(!c.inverted&&c.schema&&(c.schema.format==="color"||c.schema.format==="color-hex")&&c.node&&c.node.type==="string"){var m=String(c.node.offset);if(!l[m]){var y=tl(ut(c.node));if(y){var x=Lt(t,c.node);o.push({color:y,range:x})}if(l[m]=!0,s--,s<=0)return n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(t.uri),o}}}return o})},e.prototype.getColorPresentations=function(t,r,n,i){var o=[],s=Math.round(n.red*255),u=Math.round(n.green*255),l=Math.round(n.blue*255);function f(c){var m=c.toString(16);return m.length!==2?"0"+m:m}var a;return n.alpha===1?a="#"+f(s)+f(u)+f(l):a="#"+f(s)+f(u)+f(l)+f(Math.round(n.alpha*255)),o.push({label:a,textEdit:k.TextEdit.replace(i,JSON.stringify(a))}),o},e}();function Lt(e,t){return k.Range.create(e.positionAt(t.offset),e.positionAt(t.offset+t.length))}var nl=Ke(Or()),B=nl.loadMessageBundle(),ni={schemaAssociations:[],schemas:{"http://json-schema.org/schema#":{$ref:"http://json-schema.org/draft-07/schema#"},"http://json-schema.org/draft-04/schema#":{title:B("schema.json","Describes a JSON file using a schema. See json-schema.org for more info."),$schema:"http://json-schema.org/draft-04/schema#",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},positiveInteger:{type:"integer",minimum:0},positiveIntegerDefault0:{allOf:[{$ref:"#/definitions/positiveInteger"},{default:0}]},simpleTypes:{type:"string",enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0}},type:"object",properties:{id:{type:"string",format:"uri"},$schema:{type:"string",format:"uri"},title:{type:"string"},description:{type:"string"},default:{},multipleOf:{type:"number",minimum:0,exclusiveMinimum:!0},maximum:{type:"number"},exclusiveMaximum:{type:"boolean",default:!1},minimum:{type:"number"},exclusiveMinimum:{type:"boolean",default:!1},maxLength:{allOf:[{$ref:"#/definitions/positiveInteger"}]},minLength:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}]},pattern:{type:"string",format:"regex"},additionalItems:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:{}},maxItems:{allOf:[{$ref:"#/definitions/positiveInteger"}]},minItems:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}]},uniqueItems:{type:"boolean",default:!1},maxProperties:{allOf:[{$ref:"#/definitions/positiveInteger"}]},minProperties:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}]},required:{allOf:[{$ref:"#/definitions/stringArray"}]},additionalProperties:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},enum:{type:"array",minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{anyOf:[{type:"string",enum:["date-time","uri","email","hostname","ipv4","ipv6","regex"]},{type:"string"}]},allOf:{allOf:[{$ref:"#/definitions/schemaArray"}]},anyOf:{allOf:[{$ref:"#/definitions/schemaArray"}]},oneOf:{allOf:[{$ref:"#/definitions/schemaArray"}]},not:{allOf:[{$ref:"#"}]}},dependencies:{exclusiveMaximum:["maximum"],exclusiveMinimum:["minimum"]},default:{}},"http://json-schema.org/draft-07/schema#":{title:B("schema.json","Describes a JSON file using a schema. See json-schema.org for more info."),definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}}},Ig={id:B("schema.json.id","A unique identifier for the schema."),$schema:B("schema.json.$schema","The schema to verify this document against."),title:B("schema.json.title","A descriptive title of the element."),description:B("schema.json.description","A long description of the element. Used in hover menus and suggestions."),default:B("schema.json.default","A default value. Used by suggestions."),multipleOf:B("schema.json.multipleOf","A number that should cleanly divide the current value (i.e. have no remainder)."),maximum:B("schema.json.maximum","The maximum numerical value, inclusive by default."),exclusiveMaximum:B("schema.json.exclusiveMaximum","Makes the maximum property exclusive."),minimum:B("schema.json.minimum","The minimum numerical value, inclusive by default."),exclusiveMinimum:B("schema.json.exclusiveMininum","Makes the minimum property exclusive."),maxLength:B("schema.json.maxLength","The maximum length of a string."),minLength:B("schema.json.minLength","The minimum length of a string."),pattern:B("schema.json.pattern","A regular expression to match the string against. It is not implicitly anchored."),additionalItems:B("schema.json.additionalItems","For arrays, only when items is set as an array. If it is a schema, then this schema validates items after the ones specified by the items array. If it is false, then additional items will cause validation to fail."),items:B("schema.json.items","For arrays. Can either be a schema to validate every element against or an array of schemas to validate each item against in order (the first schema will validate the first element, the second schema will validate the second element, and so on."),maxItems:B("schema.json.maxItems","The maximum number of items that can be inside an array. Inclusive."),minItems:B("schema.json.minItems","The minimum number of items that can be inside an array. Inclusive."),uniqueItems:B("schema.json.uniqueItems","If all of the items in the array must be unique. Defaults to false."),maxProperties:B("schema.json.maxProperties","The maximum number of properties an object can have. Inclusive."),minProperties:B("schema.json.minProperties","The minimum number of properties an object can have. Inclusive."),required:B("schema.json.required","An array of strings that lists the names of all properties required on this object."),additionalProperties:B("schema.json.additionalProperties","Either a schema or a boolean. If a schema, then used to validate all properties not matched by 'properties' or 'patternProperties'. If false, then any properties not matched by either will cause this schema to fail."),definitions:B("schema.json.definitions","Not used for validation. Place subschemas here that you wish to reference inline with $ref."),properties:B("schema.json.properties","A map of property names to schemas for each property."),patternProperties:B("schema.json.patternProperties","A map of regular expressions on property names to schemas for matching properties."),dependencies:B("schema.json.dependencies","A map of property names to either an array of property names or a schema. An array of property names means the property named in the key depends on the properties in the array being present in the object in order to be valid. If the value is a schema, then the schema is only applied to the object if the property in the key exists on the object."),enum:B("schema.json.enum","The set of literal values that are valid."),type:B("schema.json.type","Either a string of one of the basic schema types (number, integer, null, array, object, boolean, string) or an array of strings specifying a subset of those types."),format:B("schema.json.format","Describes the format expected for the value."),allOf:B("schema.json.allOf","An array of schemas, all of which must match."),anyOf:B("schema.json.anyOf","An array of schemas, where at least one must match."),oneOf:B("schema.json.oneOf","An array of schemas, exactly one of which must match."),not:B("schema.json.not","A schema which must not match."),$id:B("schema.json.$id","A unique identifier for the schema."),$ref:B("schema.json.$ref","Reference a definition hosted on any location."),$comment:B("schema.json.$comment","Comments from schema authors to readers or maintainers of the schema."),readOnly:B("schema.json.readOnly","Indicates that the value of the instance is managed exclusively by the owning authority."),examples:B("schema.json.examples","Sample JSON values associated with a particular schema, for the purpose of illustrating usage."),contains:B("schema.json.contains",'An array instance is valid against "contains" if at least one of its elements is valid against the given schema.'),propertyNames:B("schema.json.propertyNames","If the instance is an object, this keyword validates if every property name in the instance validates against the provided schema."),const:B("schema.json.const","An instance validates successfully against this keyword if its value is equal to the value of the keyword."),contentMediaType:B("schema.json.contentMediaType","Describes the media type of a string property."),contentEncoding:B("schema.json.contentEncoding","Describes the content encoding of a string property."),if:B("schema.json.if",'The validation outcome of the "if" subschema controls which of the "then" or "else" keywords are evaluated.'),then:B("schema.json.then",'The "if" subschema is used for validation when the "if" subschema succeeds.'),else:B("schema.json.else",'The "else" subschema is used for validation when the "if" subschema fails.')};for(var Lg in ni.schemas){ii=ni.schemas[Lg];for(var un in ii.properties)oi=ii.properties[un],typeof oi=="boolean"&&(oi=ii.properties[un]={}),ks=Ig[un],ks?oi.description=ks:console.log(un+": localize('schema.json."+un+`', "")`)}var ii,oi,ks;function il(e,t){var r=[],n=[],i=[],o=-1,s=ht(e.getText(),!1),u=s.scan();function l(w){r.push(w),n.push(i.length)}for(;u!==17;){switch(u){case 1:case 3:{var f=e.positionAt(s.getTokenOffset()).line,a={startLine:f,endLine:f,kind:u===1?"object":"array"};i.push(a);break}case 2:case 4:{var c=u===2?"object":"array";if(i.length>0&&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<e.lineCount?s.setPosition(e.offsetAt(k.Position.create(f+1,0))):f<y&&(l({startLine:f,endLine:y,kind:k.FoldingRangeKind.Comment}),o=f);break}case 12:{var x=e.getText().substr(s.getTokenOffset(),s.getTokenLength()),T=x.match(/^\/\/\s*#(region\b)|(endregion\b)/);if(T){var m=e.positionAt(s.getTokenOffset()).line;if(T[1]){var a={startLine:m,endLine:m,kind:k.FoldingRangeKind.Region};i.push(a)}else{for(var C=i.length-1;C>=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;g<O.length;g++){var q=O[g];q<30&&(h[q]=(h[q]||0)+1)}for(var D=0,_=0,C=0;C<h.length;C++){var b=h[C];if(b){if(b+D>p){_=C;break}D+=b}}for(var v=[],C=0;C<r.length;C++){var q=n[C];typeof q=="number"&&(q<_||q===_&&D++<p)&&v.push(r[C])}return v}function ol(e,t,r){function n(u){for(var l=e.offsetAt(u),f=r.getNodeFromOffset(l,!0),a=[];f;){switch(f.type){case"string":case"object":case"array":var c=f.offset+1,m=f.offset+f.length-1;c<m&&l>=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].cTime<s&&(delete n[l],i--)},t*1e3)),{get(s){let u=s.version,l=s.languageId,f=n[s.uri];if(f&&f.version===u&&f.languageId===l)return f.cTime=Date.now(),f.languageModel;let a=r(s);if(n[s.uri]={languageModel:a,version:u,languageId:l,cTime:Date.now()},f||i++,i===e){let c=Number.MAX_VALUE,m=null;for(let y in n){let x=n[y];x.cTime<c&&(m=y,c=x.cTime)}m&&(delete n[m],i--)}return a},onDocumentRemoved(s){let u=s.uri;n[u]&&(delete n[u],i--)},dispose(){typeof o!="undefined"&&(clearInterval(o),o=void 0,n={},i=0)}}}function ul(e){let t=e.lastIndexOf("/");return e.substr(t+1)}var zg="/".charCodeAt(0),Rs=".".charCodeAt(0);function Bg(e){return e.charCodeAt(0)===zg}function ll(e,t){if(Bg(t)){let r=lt.parse(e),n=t.split("/");return r.with({path:cl(n)}).toString()}return Jg(e,t)}function cl(e){let t=[];for(let n of e)n.length===0||n.length===1&&n.charCodeAt(0)===Rs||(n.length===2&&n.charCodeAt(0)===Rs&&n.charCodeAt(1)===Rs?t.pop():t.push(n));e.length>1&&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<Se.length;se++){if(!we.hasOwnProperty(Se[se]))return Me;we=we[Se[se]]}return we}return o=w("textDocument.completion.completionItem.snippetSupport",!1),s=w("textDocument.rangeFormatting.dynamicRegistration",!1)&&typeof((L=b.initializationOptions)==null?void 0:L.provideFormatter)!="boolean",l=w("textDocument.foldingRange.rangeLimit",Number.MAX_VALUE),u=w("textDocument.documentSymbol.hierarchicalDocumentSymbolSupport",!1),c=((K=(ne=($=b.initializationOptions)==null?void 0:$.customCapabilities)==null?void 0:ne.rangeFormatting)==null?void 0:K.editLimit)||Number.MAX_VALUE,{capabilities:{textDocumentSync:je.TextDocumentSyncKind.Incremental,completionProvider:o?{resolveProvider:!1,triggerCharacters:['"',":"]}:void 0,hoverProvider:!0,documentSymbolProvider:!0,documentRangeFormattingProvider:b.initializationOptions.provideFormatter===!0,colorProvider:{},foldingRangeProvider:!0,selectionRangeProvider:!0,definitionProvider:!0}}});let m=function(){let b={};return{cancel(v){let w=b[v];w&&w.timeout&&(clearTimeout(w.timeout),delete b[v])},onResultLimitExceeded(v,w,R){return()=>{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