diff --git a/MystEditor.js b/MystEditor.js index 8c02a89..8c8723a 100644 --- a/MystEditor.js +++ b/MystEditor.js @@ -58060,7 +58060,7 @@ function D1e() { } ze.meta; function k$t() { - return new Worker("" + new URL("assets/yamlLSPWorker.81aadfd5.js", import.meta.url).href); + return new Worker("" + new URL("assets/yamlLSPWorker.d296448a.js", import.meta.url).href); } var e4 = { exports: {} }, G1 = typeof Reflect == "object" ? Reflect : null, yZ = G1 && typeof G1.apply == "function" ? G1.apply : function(e, r, n) { return Function.prototype.apply.call(e, r, n); @@ -66882,6 +66882,18 @@ const Izt = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvM transform: translateX(-11px); } } + + .cm-tooltip-hover { + padding: 10px; + + & *:first-child { + margin-top: 0; + } + + & *:last-child { + margin-bottom: 0; + } + } `, Yzt = (t, e) => { t.dispatch({ changes: { diff --git a/assets/yamlLSPWorker.81aadfd5.js b/assets/yamlLSPWorker.d296448a.js similarity index 82% rename from assets/yamlLSPWorker.81aadfd5.js rename to assets/yamlLSPWorker.d296448a.js index 37e6cc0..97c5a8d 100644 --- a/assets/yamlLSPWorker.81aadfd5.js +++ b/assets/yamlLSPWorker.d296448a.js @@ -1,128 +1,128 @@ -var E9=Object.defineProperty;var S9=(Vt,ii,Uo)=>ii in Vt?E9(Vt,ii,{enumerable:!0,configurable:!0,writable:!0,value:Uo}):Vt[ii]=Uo;var ri=(Vt,ii,Uo)=>(S9(Vt,typeof ii!="symbol"?ii+"":ii,Uo),Uo);(function(){"use strict";var Vt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ii(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Uo(t){var e=t.default;if(typeof e=="function"){var n=function(){return e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var i=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return t[r]}})}),n}var si={exports:{}},Ln={},qp={exports:{}},Vo={},Wp={},sf={},tt={},Qn={};Object.defineProperty(Qn,"__esModule",{value:!0}),Qn.stringArray=Qn.array=Qn.func=Qn.error=Qn.number=Qn.string=Qn.boolean=void 0;function QT(t){return t===!0||t===!1}Qn.boolean=QT;function Ab(t){return typeof t=="string"||t instanceof String}Qn.string=Ab;function XT(t){return typeof t=="number"||t instanceof Number}Qn.number=XT;function ZT(t){return t instanceof Error}Qn.error=ZT;function ek(t){return typeof t=="function"}Qn.func=ek;function Cb(t){return Array.isArray(t)}Qn.array=Cb;function tk(t){return Cb(t)&&t.every(e=>Ab(e))}Qn.stringArray=tk,Object.defineProperty(tt,"__esModule",{value:!0}),tt.Message=tt.NotificationType9=tt.NotificationType8=tt.NotificationType7=tt.NotificationType6=tt.NotificationType5=tt.NotificationType4=tt.NotificationType3=tt.NotificationType2=tt.NotificationType1=tt.NotificationType0=tt.NotificationType=tt.RequestType9=tt.RequestType8=tt.RequestType7=tt.RequestType6=tt.RequestType5=tt.RequestType4=tt.RequestType3=tt.RequestType2=tt.RequestType1=tt.RequestType=tt.RequestType0=tt.AbstractMessageSignature=tt.ParameterStructures=tt.ResponseError=tt.ErrorCodes=void 0;const Ho=Qn;var Up;(function(t){t.ParseError=-32700,t.InvalidRequest=-32600,t.MethodNotFound=-32601,t.InvalidParams=-32602,t.InternalError=-32603,t.jsonrpcReservedErrorRangeStart=-32099,t.serverErrorStart=-32099,t.MessageWriteError=-32099,t.MessageReadError=-32098,t.PendingResponseRejected=-32097,t.ConnectionInactive=-32096,t.ServerNotInitialized=-32002,t.UnknownErrorCode=-32001,t.jsonrpcReservedErrorRangeEnd=-32e3,t.serverErrorEnd=-32e3})(Up||(tt.ErrorCodes=Up={}));class Vp extends Error{constructor(e,n,r){super(n),this.code=Ho.number(e)?e:Up.UnknownErrorCode,this.data=r,Object.setPrototypeOf(this,Vp.prototype)}toJson(){const e={code:this.code,message:this.message};return this.data!==void 0&&(e.data=this.data),e}}tt.ResponseError=Vp;class mr{constructor(e){this.kind=e}static is(e){return e===mr.auto||e===mr.byName||e===mr.byPosition}toString(){return this.kind}}tt.ParameterStructures=mr,mr.auto=new mr("auto"),mr.byPosition=new mr("byPosition"),mr.byName=new mr("byName");class En{constructor(e,n){this.method=e,this.numberOfParams=n}get parameterStructures(){return mr.auto}}tt.AbstractMessageSignature=En;class nk extends En{constructor(e){super(e,0)}}tt.RequestType0=nk;class rk extends En{constructor(e,n=mr.auto){super(e,1),this._parameterStructures=n}get parameterStructures(){return this._parameterStructures}}tt.RequestType=rk;class ik extends En{constructor(e,n=mr.auto){super(e,1),this._parameterStructures=n}get parameterStructures(){return this._parameterStructures}}tt.RequestType1=ik;class sk extends En{constructor(e){super(e,2)}}tt.RequestType2=sk;class ok extends En{constructor(e){super(e,3)}}tt.RequestType3=ok;class ak extends En{constructor(e){super(e,4)}}tt.RequestType4=ak;class uk extends En{constructor(e){super(e,5)}}tt.RequestType5=uk;class ck extends En{constructor(e){super(e,6)}}tt.RequestType6=ck;class lk extends En{constructor(e){super(e,7)}}tt.RequestType7=lk;class fk extends En{constructor(e){super(e,8)}}tt.RequestType8=fk;class dk extends En{constructor(e){super(e,9)}}tt.RequestType9=dk;class hk extends En{constructor(e,n=mr.auto){super(e,1),this._parameterStructures=n}get parameterStructures(){return this._parameterStructures}}tt.NotificationType=hk;class pk extends En{constructor(e){super(e,0)}}tt.NotificationType0=pk;class mk extends En{constructor(e,n=mr.auto){super(e,1),this._parameterStructures=n}get parameterStructures(){return this._parameterStructures}}tt.NotificationType1=mk;class gk extends En{constructor(e){super(e,2)}}tt.NotificationType2=gk;class yk extends En{constructor(e){super(e,3)}}tt.NotificationType3=yk;class vk extends En{constructor(e){super(e,4)}}tt.NotificationType4=vk;class bk extends En{constructor(e){super(e,5)}}tt.NotificationType5=bk;class Dk extends En{constructor(e){super(e,6)}}tt.NotificationType6=Dk;class wk extends En{constructor(e){super(e,7)}}tt.NotificationType7=wk;class _k extends En{constructor(e){super(e,8)}}tt.NotificationType8=_k;class $k extends En{constructor(e){super(e,9)}}tt.NotificationType9=$k;var Ob;(function(t){function e(i){const s=i;return s&&Ho.string(s.method)&&(Ho.string(s.id)||Ho.number(s.id))}t.isRequest=e;function n(i){const s=i;return s&&Ho.string(s.method)&&i.id===void 0}t.isNotification=n;function r(i){const s=i;return s&&(s.result!==void 0||!!s.error)&&(Ho.string(s.id)||Ho.number(s.id)||s.id===null)}t.isResponse=r})(Ob||(tt.Message=Ob={}));var ys={},Pb;Object.defineProperty(ys,"__esModule",{value:!0}),ys.LRUCache=ys.LinkedMap=ys.Touch=void 0;var gr;(function(t){t.None=0,t.First=1,t.AsOld=t.First,t.Last=2,t.AsNew=t.Last})(gr||(ys.Touch=gr={}));class Nb{constructor(){this[Pb]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){var e;return(e=this._head)==null?void 0:e.value}get last(){var e;return(e=this._tail)==null?void 0:e.value}has(e){return this._map.has(e)}get(e,n=gr.None){const r=this._map.get(e);if(!!r)return n!==gr.None&&this.touch(r,n),r.value}set(e,n,r=gr.None){let i=this._map.get(e);if(i)i.value=n,r!==gr.None&&this.touch(i,r);else{switch(i={key:e,value:n,next:void 0,previous:void 0},r){case gr.None:this.addItemLast(i);break;case gr.First:this.addItemFirst(i);break;case gr.Last:this.addItemLast(i);break;default:this.addItemLast(i);break}this._map.set(e,i),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){const n=this._map.get(e);if(!!n)return this._map.delete(e),this.removeItem(n),this._size--,n.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,n){const r=this._state;let i=this._head;for(;i;){if(n?e.bind(n)(i.value,i.key,this):e(i.value,i.key,this),this._state!==r)throw new Error("LinkedMap got modified during iteration.");i=i.next}}keys(){const e=this._state;let n=this._head;const r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(n){const i={value:n.key,done:!1};return n=n.next,i}else return{value:void 0,done:!0}}};return r}values(){const e=this._state;let n=this._head;const r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(n){const i={value:n.value,done:!1};return n=n.next,i}else return{value:void 0,done:!0}}};return r}entries(){const e=this._state;let n=this._head;const r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(n){const i={value:[n.key,n.value],done:!1};return n=n.next,i}else return{value:void 0,done:!0}}};return r}[(Pb=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(e===0){this.clear();return}let n=this._head,r=this.size;for(;n&&r>e;)this._map.delete(n.key),n=n.next,r--;this._head=n,this._size=r,n&&(n.previous=void 0),this._state++}addItemFirst(e){if(!this._head&&!this._tail)this._tail=e;else if(this._head)e.next=this._head,this._head.previous=e;else throw new Error("Invalid list");this._head=e,this._state++}addItemLast(e){if(!this._head&&!this._tail)this._head=e;else if(this._tail)e.previous=this._tail,this._tail.next=e;else throw new Error("Invalid list");this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{const n=e.next,r=e.previous;if(!n||!r)throw new Error("Invalid list");n.previous=r,r.next=n}e.next=void 0,e.previous=void 0,this._state++}touch(e,n){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(n!==gr.First&&n!==gr.Last)){if(n===gr.First){if(e===this._head)return;const r=e.next,i=e.previous;e===this._tail?(i.next=void 0,this._tail=i):(r.previous=i,i.next=r),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(n===gr.Last){if(e===this._tail)return;const r=e.next,i=e.previous;e===this._head?(r.previous=void 0,this._head=r):(r.previous=i,i.next=r),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}}toJSON(){const e=[];return this.forEach((n,r)=>{e.push([r,n])}),e}fromJSON(e){this.clear();for(const[n,r]of e)this.set(n,r)}}ys.LinkedMap=Nb;class Ek extends Nb{constructor(e,n=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,n),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get ratio(){return this._ratio}set ratio(e){this._ratio=Math.min(Math.max(0,e),1),this.checkTrim()}get(e,n=gr.AsNew){return super.get(e,n)}peek(e){return super.get(e,gr.None)}set(e,n){return super.set(e,n,gr.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}ys.LRUCache=Ek;var of={};Object.defineProperty(of,"__esModule",{value:!0}),of.Disposable=void 0;var Fb;(function(t){function e(n){return{dispose:n}}t.create=e})(Fb||(of.Disposable=Fb={}));var Yi={},vs={};Object.defineProperty(vs,"__esModule",{value:!0});let Hp;function Kp(){if(Hp===void 0)throw new Error("No runtime abstraction layer installed");return Hp}(function(t){function e(n){if(n===void 0)throw new Error("No runtime abstraction layer provided");Hp=n}t.install=e})(Kp||(Kp={})),vs.default=Kp,Object.defineProperty(Yi,"__esModule",{value:!0}),Yi.Emitter=Yi.Event=void 0;const Sk=vs;var Rb;(function(t){const e={dispose(){}};t.None=function(){return e}})(Rb||(Yi.Event=Rb={}));class Tk{add(e,n=null,r){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(n),Array.isArray(r)&&r.push({dispose:()=>this.remove(e,n)})}remove(e,n=null){if(!this._callbacks)return;let r=!1;for(let i=0,s=this._callbacks.length;i{this._callbacks||(this._callbacks=new Tk),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,n);const i={dispose:()=>{!this._callbacks||(this._callbacks.remove(e,n),i.dispose=af._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(r)&&r.push(i),i}),this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}}Yi.Emitter=af,af._noop=function(){};var Gs={};Object.defineProperty(Gs,"__esModule",{value:!0}),Gs.CancellationTokenSource=Gs.CancellationToken=void 0;const kk=vs,Ak=Qn,zp=Yi;var uf;(function(t){t.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:zp.Event.None}),t.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:zp.Event.None});function e(n){const r=n;return r&&(r===t.None||r===t.Cancelled||Ak.boolean(r.isCancellationRequested)&&!!r.onCancellationRequested)}t.is=e})(uf||(Gs.CancellationToken=uf={}));const Ck=Object.freeze(function(t,e){const n=(0,kk.default)().timer.setTimeout(t.bind(e),0);return{dispose(){n.dispose()}}});class Ib{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?Ck:(this._emitter||(this._emitter=new zp.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}}class Ok{get token(){return this._token||(this._token=new Ib),this._token}cancel(){this._token?this._token.cancel():this._token=uf.Cancelled}dispose(){this._token?this._token instanceof Ib&&this._token.dispose():this._token=uf.None}}Gs.CancellationTokenSource=Ok;var Ua={};Object.defineProperty(Ua,"__esModule",{value:!0}),Ua.SharedArrayReceiverStrategy=Ua.SharedArraySenderStrategy=void 0;const Pk=Gs;var bc;(function(t){t.Continue=0,t.Cancelled=1})(bc||(bc={}));class Nk{constructor(){this.buffers=new Map}enableCancellation(e){if(e.id===null)return;const n=new SharedArrayBuffer(4),r=new Int32Array(n,0,1);r[0]=bc.Continue,this.buffers.set(e.id,n),e.$cancellationData=n}async sendCancellation(e,n){const r=this.buffers.get(n);if(r===void 0)return;const i=new Int32Array(r,0,1);Atomics.store(i,0,bc.Cancelled)}cleanup(e){this.buffers.delete(e)}dispose(){this.buffers.clear()}}Ua.SharedArraySenderStrategy=Nk;class Fk{constructor(e){this.data=new Int32Array(e,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===bc.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}}class Rk{constructor(e){this.token=new Fk(e)}cancel(){}dispose(){}}class Ik{constructor(){this.kind="request"}createCancellationTokenSource(e){const n=e.$cancellationData;return n===void 0?new Pk.CancellationTokenSource:new Rk(n)}}Ua.SharedArrayReceiverStrategy=Ik;var Js={},Dc={};Object.defineProperty(Dc,"__esModule",{value:!0}),Dc.Semaphore=void 0;const Mk=vs;class Lk{constructor(e=1){if(e<=0)throw new Error("Capacity must be greater than 0");this._capacity=e,this._active=0,this._waiting=[]}lock(e){return new Promise((n,r)=>{this._waiting.push({thunk:e,resolve:n,reject:r}),this.runNext()})}get active(){return this._active}runNext(){this._waiting.length===0||this._active===this._capacity||(0,Mk.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;const e=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("To many thunks active");try{const n=e.thunk();n instanceof Promise?n.then(r=>{this._active--,e.resolve(r),this.runNext()},r=>{this._active--,e.reject(r),this.runNext()}):(this._active--,e.resolve(n),this.runNext())}catch(n){this._active--,e.reject(n),this.runNext()}}}Dc.Semaphore=Lk,Object.defineProperty(Js,"__esModule",{value:!0}),Js.ReadableStreamMessageReader=Js.AbstractMessageReader=Js.MessageReader=void 0;const Yp=vs,Va=Qn,Gp=Yi,jk=Dc;var Mb;(function(t){function e(n){let r=n;return r&&Va.func(r.listen)&&Va.func(r.dispose)&&Va.func(r.onError)&&Va.func(r.onClose)&&Va.func(r.onPartialMessage)}t.is=e})(Mb||(Js.MessageReader=Mb={}));class Lb{constructor(){this.errorEmitter=new Gp.Emitter,this.closeEmitter=new Gp.Emitter,this.partialMessageEmitter=new Gp.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e){this.errorEmitter.fire(this.asError(e))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(e){this.partialMessageEmitter.fire(e)}asError(e){return e instanceof Error?e:new Error(`Reader received error. Reason: ${Va.string(e.message)?e.message:"unknown"}`)}}Js.AbstractMessageReader=Lb;var Jp;(function(t){function e(n){var l;let r,i;const s=new Map;let a;const c=new Map;if(n===void 0||typeof n=="string")r=n!=null?n:"utf-8";else{if(r=(l=n.charset)!=null?l:"utf-8",n.contentDecoder!==void 0&&(i=n.contentDecoder,s.set(i.name,i)),n.contentDecoders!==void 0)for(const d of n.contentDecoders)s.set(d.name,d);if(n.contentTypeDecoder!==void 0&&(a=n.contentTypeDecoder,c.set(a.name,a)),n.contentTypeDecoders!==void 0)for(const d of n.contentTypeDecoders)c.set(d.name,d)}return a===void 0&&(a=(0,Yp.default)().applicationJson.decoder,c.set(a.name,a)),{charset:r,contentDecoder:i,contentDecoders:s,contentTypeDecoder:a,contentTypeDecoders:c}}t.fromOptions=e})(Jp||(Jp={}));class xk extends Lb{constructor(e,n){super(),this.readable=e,this.options=Jp.fromOptions(n),this.buffer=(0,Yp.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new jk.Semaphore(1)}set partialMessageTimeout(e){this._partialMessageTimeout=e}get partialMessageTimeout(){return this._partialMessageTimeout}listen(e){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=e;const n=this.readable.onData(r=>{this.onData(r)});return this.readable.onError(r=>this.fireError(r)),this.readable.onClose(()=>this.fireClose()),n}onData(e){try{for(this.buffer.append(e);;){if(this.nextMessageLength===-1){const r=this.buffer.tryReadHeaders(!0);if(!r)return;const i=r.get("content-length");if(!i){this.fireError(new Error(`Header must provide a Content-Length property. -${JSON.stringify(Object.fromEntries(r))}`));return}const s=parseInt(i);if(isNaN(s)){this.fireError(new Error(`Content-Length value must be a number. Got ${i}`));return}this.nextMessageLength=s}const n=this.buffer.tryReadBody(this.nextMessageLength);if(n===void 0){this.setPartialMessageTimer();return}this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{const r=this.options.contentDecoder!==void 0?await this.options.contentDecoder.decode(n):n,i=await this.options.contentTypeDecoder.decode(r,this.options);this.callback(i)}).catch(r=>{this.fireError(r)})}}catch(n){this.fireError(n)}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),!(this._partialMessageTimeout<=0)&&(this.partialMessageTimer=(0,Yp.default)().timer.setTimeout((e,n)=>{this.partialMessageTimer=void 0,e===this.messageToken&&(this.firePartialMessage({messageToken:e,waitingTime:n}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}}Js.ReadableStreamMessageReader=xk;var Qs={};Object.defineProperty(Qs,"__esModule",{value:!0}),Qs.WriteableStreamMessageWriter=Qs.AbstractMessageWriter=Qs.MessageWriter=void 0;const jb=vs,wc=Qn,Bk=Dc,xb=Yi,qk="Content-Length: ",Bb=`\r -`;var qb;(function(t){function e(n){let r=n;return r&&wc.func(r.dispose)&&wc.func(r.onClose)&&wc.func(r.onError)&&wc.func(r.write)}t.is=e})(qb||(Qs.MessageWriter=qb={}));class Wb{constructor(){this.errorEmitter=new xb.Emitter,this.closeEmitter=new xb.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e,n,r){this.errorEmitter.fire([this.asError(e),n,r])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(e){return e instanceof Error?e:new Error(`Writer received error. Reason: ${wc.string(e.message)?e.message:"unknown"}`)}}Qs.AbstractMessageWriter=Wb;var Qp;(function(t){function e(n){var r,i;return n===void 0||typeof n=="string"?{charset:n!=null?n:"utf-8",contentTypeEncoder:(0,jb.default)().applicationJson.encoder}:{charset:(r=n.charset)!=null?r:"utf-8",contentEncoder:n.contentEncoder,contentTypeEncoder:(i=n.contentTypeEncoder)!=null?i:(0,jb.default)().applicationJson.encoder}}t.fromOptions=e})(Qp||(Qp={}));class Wk extends Wb{constructor(e,n){super(),this.writable=e,this.options=Qp.fromOptions(n),this.errorCount=0,this.writeSemaphore=new Bk.Semaphore(1),this.writable.onError(r=>this.fireError(r)),this.writable.onClose(()=>this.fireClose())}async write(e){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(e,this.options).then(r=>this.options.contentEncoder!==void 0?this.options.contentEncoder.encode(r):r).then(r=>{const i=[];return i.push(qk,r.byteLength.toString(),Bb),i.push(Bb),this.doWrite(e,i,r)},r=>{throw this.fireError(r),r}))}async doWrite(e,n,r){try{return await this.writable.write(n.join(""),"ascii"),this.writable.write(r)}catch(i){return this.handleError(i,e),Promise.reject(i)}}handleError(e,n){this.errorCount++,this.fireError(e,n,this.errorCount)}end(){this.writable.end()}}Qs.WriteableStreamMessageWriter=Wk;var cf={};Object.defineProperty(cf,"__esModule",{value:!0}),cf.AbstractMessageBuffer=void 0;const Uk=13,Vk=10,Hk=`\r -`;class Kk{constructor(e="utf-8"){this._encoding=e,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(e){const n=typeof e=="string"?this.fromString(e,this._encoding):e;this._chunks.push(n),this._totalLength+=n.byteLength}tryReadHeaders(e=!1){if(this._chunks.length===0)return;let n=0,r=0,i=0,s=0;e:for(;rthis._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===e){const s=this._chunks[0];return this._chunks.shift(),this._totalLength-=e,this.asNative(s)}if(this._chunks[0].byteLength>e){const s=this._chunks[0],a=this.asNative(s,e);return this._chunks[0]=s.slice(e),this._totalLength-=e,a}const n=this.allocNative(e);let r=0,i=0;for(;e>0;){const s=this._chunks[i];if(s.byteLength>e){const a=s.slice(0,e);n.set(a,r),r+=e,this._chunks[i]=s.slice(e),this._totalLength-=e,e-=e}else n.set(s,r),r+=s.byteLength,this._chunks.shift(),this._totalLength-=s.byteLength,e-=s.byteLength}return n}}cf.AbstractMessageBuffer=Kk;var Ub={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.createMessageConnection=t.ConnectionOptions=t.MessageStrategy=t.CancellationStrategy=t.CancellationSenderStrategy=t.CancellationReceiverStrategy=t.RequestCancellationReceiverStrategy=t.IdCancellationReceiverStrategy=t.ConnectionStrategy=t.ConnectionError=t.ConnectionErrors=t.LogTraceNotification=t.SetTraceNotification=t.TraceFormat=t.TraceValues=t.Trace=t.NullLogger=t.ProgressType=t.ProgressToken=void 0;const e=vs,n=Qn,r=tt,i=ys,s=Yi,a=Gs;var c;(function(K){K.type=new r.NotificationType("$/cancelRequest")})(c||(c={}));var l;(function(K){function ne(ge){return typeof ge=="string"||typeof ge=="number"}K.is=ne})(l||(t.ProgressToken=l={}));var d;(function(K){K.type=new r.NotificationType("$/progress")})(d||(d={}));class h{constructor(){}}t.ProgressType=h;var m;(function(K){function ne(ge){return n.func(ge)}K.is=ne})(m||(m={})),t.NullLogger=Object.freeze({error:()=>{},warn:()=>{},info:()=>{},log:()=>{}});var E;(function(K){K[K.Off=0]="Off",K[K.Messages=1]="Messages",K[K.Compact=2]="Compact",K[K.Verbose=3]="Verbose"})(E||(t.Trace=E={}));var k;(function(K){K.Off="off",K.Messages="messages",K.Compact="compact",K.Verbose="verbose"})(k||(t.TraceValues=k={})),function(K){function ne(ye){if(!n.string(ye))return K.Off;switch(ye=ye.toLowerCase(),ye){case"off":return K.Off;case"messages":return K.Messages;case"compact":return K.Compact;case"verbose":return K.Verbose;default:return K.Off}}K.fromString=ne;function ge(ye){switch(ye){case K.Off:return"off";case K.Messages:return"messages";case K.Compact:return"compact";case K.Verbose:return"verbose";default:return"off"}}K.toString=ge}(E||(t.Trace=E={}));var R;(function(K){K.Text="text",K.JSON="json"})(R||(t.TraceFormat=R={})),function(K){function ne(ge){return n.string(ge)?(ge=ge.toLowerCase(),ge==="json"?K.JSON:K.Text):K.Text}K.fromString=ne}(R||(t.TraceFormat=R={}));var P;(function(K){K.type=new r.NotificationType("$/setTrace")})(P||(t.SetTraceNotification=P={}));var A;(function(K){K.type=new r.NotificationType("$/logTrace")})(A||(t.LogTraceNotification=A={}));var N;(function(K){K[K.Closed=1]="Closed",K[K.Disposed=2]="Disposed",K[K.AlreadyListening=3]="AlreadyListening"})(N||(t.ConnectionErrors=N={}));class S extends Error{constructor(ne,ge){super(ge),this.code=ne,Object.setPrototypeOf(this,S.prototype)}}t.ConnectionError=S;var y;(function(K){function ne(ge){const ye=ge;return ye&&n.func(ye.cancelUndispatched)}K.is=ne})(y||(t.ConnectionStrategy=y={}));var D;(function(K){function ne(ge){const ye=ge;return ye&&(ye.kind===void 0||ye.kind==="id")&&n.func(ye.createCancellationTokenSource)&&(ye.dispose===void 0||n.func(ye.dispose))}K.is=ne})(D||(t.IdCancellationReceiverStrategy=D={}));var v;(function(K){function ne(ge){const ye=ge;return ye&&ye.kind==="request"&&n.func(ye.createCancellationTokenSource)&&(ye.dispose===void 0||n.func(ye.dispose))}K.is=ne})(v||(t.RequestCancellationReceiverStrategy=v={}));var _;(function(K){K.Message=Object.freeze({createCancellationTokenSource(ge){return new a.CancellationTokenSource}});function ne(ge){return D.is(ge)||v.is(ge)}K.is=ne})(_||(t.CancellationReceiverStrategy=_={}));var $;(function(K){K.Message=Object.freeze({sendCancellation(ge,ye){return ge.sendNotification(c.type,{id:ye})},cleanup(ge){}});function ne(ge){const ye=ge;return ye&&n.func(ye.sendCancellation)&&n.func(ye.cleanup)}K.is=ne})($||(t.CancellationSenderStrategy=$={}));var q;(function(K){K.Message=Object.freeze({receiver:_.Message,sender:$.Message});function ne(ge){const ye=ge;return ye&&_.is(ye.receiver)&&$.is(ye.sender)}K.is=ne})(q||(t.CancellationStrategy=q={}));var F;(function(K){function ne(ge){const ye=ge;return ye&&n.func(ye.handleMessage)}K.is=ne})(F||(t.MessageStrategy=F={}));var M;(function(K){function ne(ge){const ye=ge;return ye&&(q.is(ye.cancellationStrategy)||y.is(ye.connectionStrategy)||F.is(ye.messageStrategy))}K.is=ne})(M||(t.ConnectionOptions=M={}));var I;(function(K){K[K.New=1]="New",K[K.Listening=2]="Listening",K[K.Closed=3]="Closed",K[K.Disposed=4]="Disposed"})(I||(I={}));function Y(K,ne,ge,ye){const De=ge!==void 0?ge:t.NullLogger;let Be=0,nt=0,Se=0;const H="2.0";let fe;const ae=new Map;let U;const Z=new Map,pe=new Map;let Me,Ie=new i.LinkedMap,qe=new Map,ze=new Set,Ge=new Map,rt=E.Off,_n=R.Text,at,un=I.New;const Sn=new s.Emitter,Mt=new s.Emitter,Tn=new s.Emitter,ur=new s.Emitter,kn=new s.Emitter,Lt=ye&&ye.cancellationStrategy?ye.cancellationStrategy:q.Message;function Vn(se){if(se===null)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+se.toString()}function Xn(se){return se===null?"res-unknown-"+(++Se).toString():"res-"+se.toString()}function Rn(){return"not-"+(++nt).toString()}function qt(se,ke){r.Message.isRequest(ke)?se.set(Vn(ke.id),ke):r.Message.isResponse(ke)?se.set(Xn(ke.id),ke):se.set(Rn(),ke)}function X(se){}function V(){return un===I.Listening}function ee(){return un===I.Closed}function ie(){return un===I.Disposed}function C(){(un===I.New||un===I.Listening)&&(un=I.Closed,Mt.fire(void 0))}function g(se){Sn.fire([se,void 0,void 0])}function w(se){Sn.fire(se)}K.onClose(C),K.onError(g),ne.onClose(C),ne.onError(w);function j(){Me||Ie.size===0||(Me=(0,e.default)().timer.setImmediate(()=>{Me=void 0,re()}))}function J(se){r.Message.isRequest(se)?Ne(se):r.Message.isNotification(se)?He(se):r.Message.isResponse(se)?Je(se):Xe(se)}function re(){if(Ie.size===0)return;const se=Ie.shift();try{const ke=ye==null?void 0:ye.messageStrategy;F.is(ke)?ke.handleMessage(se,J):J(se)}finally{j()}}const ce=se=>{try{if(r.Message.isNotification(se)&&se.method===c.type.method){const ke=se.params.id,Le=Vn(ke),Ye=Ie.get(Le);if(r.Message.isRequest(Ye)){const Gt=ye==null?void 0:ye.connectionStrategy,Jt=Gt&&Gt.cancelUndispatched?Gt.cancelUndispatched(Ye,X):void 0;if(Jt&&(Jt.error!==void 0||Jt.result!==void 0)){Ie.delete(Le),Ge.delete(ke),Jt.id=Ye.id,ht(Jt,se.method,Date.now()),ne.write(Jt).catch(()=>De.error("Sending response for canceled message failed."));return}}const tn=Ge.get(ke);if(tn!==void 0){tn.cancel(),wt(se);return}else ze.add(ke)}qt(Ie,se)}finally{j()}};function Ne(se){var Hn;if(ie())return;function ke(Ht,pn,Nt){const mn={jsonrpc:H,id:se.id};Ht instanceof r.ResponseError?mn.error=Ht.toJson():mn.result=Ht===void 0?null:Ht,ht(mn,pn,Nt),ne.write(mn).catch(()=>De.error("Sending response failed."))}function Le(Ht,pn,Nt){const mn={jsonrpc:H,id:se.id,error:Ht.toJson()};ht(mn,pn,Nt),ne.write(mn).catch(()=>De.error("Sending response failed."))}function Ye(Ht,pn,Nt){Ht===void 0&&(Ht=null);const mn={jsonrpc:H,id:se.id,result:Ht};ht(mn,pn,Nt),ne.write(mn).catch(()=>De.error("Sending response failed."))}Wt(se);const tn=ae.get(se.method);let Gt,Jt;tn&&(Gt=tn.type,Jt=tn.handler);const Dn=Date.now();if(Jt||fe){const Ht=(Hn=se.id)!=null?Hn:String(Date.now()),pn=D.is(Lt.receiver)?Lt.receiver.createCancellationTokenSource(Ht):Lt.receiver.createCancellationTokenSource(se);se.id!==null&&ze.has(se.id)&&pn.cancel(),se.id!==null&&Ge.set(Ht,pn);try{let Nt;if(Jt)if(se.params===void 0){if(Gt!==void 0&&Gt.numberOfParams!==0){Le(new r.ResponseError(r.ErrorCodes.InvalidParams,`Request ${se.method} defines ${Gt.numberOfParams} params but received none.`),se.method,Dn);return}Nt=Jt(pn.token)}else if(Array.isArray(se.params)){if(Gt!==void 0&&Gt.parameterStructures===r.ParameterStructures.byName){Le(new r.ResponseError(r.ErrorCodes.InvalidParams,`Request ${se.method} defines parameters by name but received parameters by position`),se.method,Dn);return}Nt=Jt(...se.params,pn.token)}else{if(Gt!==void 0&&Gt.parameterStructures===r.ParameterStructures.byPosition){Le(new r.ResponseError(r.ErrorCodes.InvalidParams,`Request ${se.method} defines parameters by position but received parameters by name`),se.method,Dn);return}Nt=Jt(se.params,pn.token)}else fe&&(Nt=fe(se.method,se.params,pn.token));const mn=Nt;Nt?mn.then?mn.then(wn=>{Ge.delete(Ht),ke(wn,se.method,Dn)},wn=>{Ge.delete(Ht),wn instanceof r.ResponseError?Le(wn,se.method,Dn):wn&&n.string(wn.message)?Le(new r.ResponseError(r.ErrorCodes.InternalError,`Request ${se.method} failed with message: ${wn.message}`),se.method,Dn):Le(new r.ResponseError(r.ErrorCodes.InternalError,`Request ${se.method} failed unexpectedly without providing any details.`),se.method,Dn)}):(Ge.delete(Ht),ke(Nt,se.method,Dn)):(Ge.delete(Ht),Ye(Nt,se.method,Dn))}catch(Nt){Ge.delete(Ht),Nt instanceof r.ResponseError?ke(Nt,se.method,Dn):Nt&&n.string(Nt.message)?Le(new r.ResponseError(r.ErrorCodes.InternalError,`Request ${se.method} failed with message: ${Nt.message}`),se.method,Dn):Le(new r.ResponseError(r.ErrorCodes.InternalError,`Request ${se.method} failed unexpectedly without providing any details.`),se.method,Dn)}}else Le(new r.ResponseError(r.ErrorCodes.MethodNotFound,`Unhandled method ${se.method}`),se.method,Dn)}function Je(se){if(!ie())if(se.id===null)se.error?De.error(`Received response message without id: Error is: -${JSON.stringify(se.error,void 0,4)}`):De.error("Received response message without id. No further error information provided.");else{const ke=se.id,Le=qe.get(ke);if($n(se,Le),Le!==void 0){qe.delete(ke);try{if(se.error){const Ye=se.error;Le.reject(new r.ResponseError(Ye.code,Ye.message,Ye.data))}else if(se.result!==void 0)Le.resolve(se.result);else throw new Error("Should never happen.")}catch(Ye){Ye.message?De.error(`Response handler '${Le.method}' failed with message: ${Ye.message}`):De.error(`Response handler '${Le.method}' failed unexpectedly.`)}}}}function He(se){if(ie())return;let ke,Le;if(se.method===c.type.method){const Ye=se.params.id;ze.delete(Ye),wt(se);return}else{const Ye=Z.get(se.method);Ye&&(Le=Ye.handler,ke=Ye.type)}if(Le||U)try{if(wt(se),Le)if(se.params===void 0)ke!==void 0&&ke.numberOfParams!==0&&ke.parameterStructures!==r.ParameterStructures.byName&&De.error(`Notification ${se.method} defines ${ke.numberOfParams} params but received none.`),Le();else if(Array.isArray(se.params)){const Ye=se.params;se.method===d.type.method&&Ye.length===2&&l.is(Ye[0])?Le({token:Ye[0],value:Ye[1]}):(ke!==void 0&&(ke.parameterStructures===r.ParameterStructures.byName&&De.error(`Notification ${se.method} defines parameters by name but received parameters by position`),ke.numberOfParams!==se.params.length&&De.error(`Notification ${se.method} defines ${ke.numberOfParams} params but received ${Ye.length} arguments`)),Le(...Ye))}else ke!==void 0&&ke.parameterStructures===r.ParameterStructures.byPosition&&De.error(`Notification ${se.method} defines parameters by position but received parameters by name`),Le(se.params);else U&&U(se.method,se.params)}catch(Ye){Ye.message?De.error(`Notification handler '${se.method}' failed with message: ${Ye.message}`):De.error(`Notification handler '${se.method}' failed unexpectedly.`)}else Tn.fire(se)}function Xe(se){if(!se){De.error("Received empty message.");return}De.error(`Received message which is neither a response nor a notification message: -${JSON.stringify(se,null,4)}`);const ke=se;if(n.string(ke.id)||n.number(ke.id)){const Le=ke.id,Ye=qe.get(Le);Ye&&Ye.reject(new Error("The received response has neither a result nor an error property."))}}function je(se){if(se!=null)switch(rt){case E.Verbose:return JSON.stringify(se,null,4);case E.Compact:return JSON.stringify(se);default:return}}function gt(se){if(!(rt===E.Off||!at))if(_n===R.Text){let ke;(rt===E.Verbose||rt===E.Compact)&&se.params&&(ke=`Params: ${je(se.params)} +var E9=Object.defineProperty;var S9=(Vt,ii,Uo)=>ii in Vt?E9(Vt,ii,{enumerable:!0,configurable:!0,writable:!0,value:Uo}):Vt[ii]=Uo;var ri=(Vt,ii,Uo)=>(S9(Vt,typeof ii!="symbol"?ii+"":ii,Uo),Uo);(function(){"use strict";var Vt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ii(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Uo(t){var e=t.default;if(typeof e=="function"){var n=function(){return e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var i=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return t[r]}})}),n}var si={exports:{}},Ln={},qp={exports:{}},Vo={},Wp={},of={},tt={},Qn={};Object.defineProperty(Qn,"__esModule",{value:!0}),Qn.stringArray=Qn.array=Qn.func=Qn.error=Qn.number=Qn.string=Qn.boolean=void 0;function Qk(t){return t===!0||t===!1}Qn.boolean=Qk;function Ab(t){return typeof t=="string"||t instanceof String}Qn.string=Ab;function Xk(t){return typeof t=="number"||t instanceof Number}Qn.number=Xk;function Zk(t){return t instanceof Error}Qn.error=Zk;function eT(t){return typeof t=="function"}Qn.func=eT;function Cb(t){return Array.isArray(t)}Qn.array=Cb;function tT(t){return Cb(t)&&t.every(e=>Ab(e))}Qn.stringArray=tT,Object.defineProperty(tt,"__esModule",{value:!0}),tt.Message=tt.NotificationType9=tt.NotificationType8=tt.NotificationType7=tt.NotificationType6=tt.NotificationType5=tt.NotificationType4=tt.NotificationType3=tt.NotificationType2=tt.NotificationType1=tt.NotificationType0=tt.NotificationType=tt.RequestType9=tt.RequestType8=tt.RequestType7=tt.RequestType6=tt.RequestType5=tt.RequestType4=tt.RequestType3=tt.RequestType2=tt.RequestType1=tt.RequestType=tt.RequestType0=tt.AbstractMessageSignature=tt.ParameterStructures=tt.ResponseError=tt.ErrorCodes=void 0;const Ho=Qn;var Up;(function(t){t.ParseError=-32700,t.InvalidRequest=-32600,t.MethodNotFound=-32601,t.InvalidParams=-32602,t.InternalError=-32603,t.jsonrpcReservedErrorRangeStart=-32099,t.serverErrorStart=-32099,t.MessageWriteError=-32099,t.MessageReadError=-32098,t.PendingResponseRejected=-32097,t.ConnectionInactive=-32096,t.ServerNotInitialized=-32002,t.UnknownErrorCode=-32001,t.jsonrpcReservedErrorRangeEnd=-32e3,t.serverErrorEnd=-32e3})(Up||(tt.ErrorCodes=Up={}));class Vp extends Error{constructor(e,n,r){super(n),this.code=Ho.number(e)?e:Up.UnknownErrorCode,this.data=r,Object.setPrototypeOf(this,Vp.prototype)}toJson(){const e={code:this.code,message:this.message};return this.data!==void 0&&(e.data=this.data),e}}tt.ResponseError=Vp;class mr{constructor(e){this.kind=e}static is(e){return e===mr.auto||e===mr.byName||e===mr.byPosition}toString(){return this.kind}}tt.ParameterStructures=mr,mr.auto=new mr("auto"),mr.byPosition=new mr("byPosition"),mr.byName=new mr("byName");class En{constructor(e,n){this.method=e,this.numberOfParams=n}get parameterStructures(){return mr.auto}}tt.AbstractMessageSignature=En;class nT extends En{constructor(e){super(e,0)}}tt.RequestType0=nT;class rT extends En{constructor(e,n=mr.auto){super(e,1),this._parameterStructures=n}get parameterStructures(){return this._parameterStructures}}tt.RequestType=rT;class iT extends En{constructor(e,n=mr.auto){super(e,1),this._parameterStructures=n}get parameterStructures(){return this._parameterStructures}}tt.RequestType1=iT;class sT extends En{constructor(e){super(e,2)}}tt.RequestType2=sT;class oT extends En{constructor(e){super(e,3)}}tt.RequestType3=oT;class aT extends En{constructor(e){super(e,4)}}tt.RequestType4=aT;class uT extends En{constructor(e){super(e,5)}}tt.RequestType5=uT;class cT extends En{constructor(e){super(e,6)}}tt.RequestType6=cT;class lT extends En{constructor(e){super(e,7)}}tt.RequestType7=lT;class fT extends En{constructor(e){super(e,8)}}tt.RequestType8=fT;class dT extends En{constructor(e){super(e,9)}}tt.RequestType9=dT;class hT extends En{constructor(e,n=mr.auto){super(e,1),this._parameterStructures=n}get parameterStructures(){return this._parameterStructures}}tt.NotificationType=hT;class pT extends En{constructor(e){super(e,0)}}tt.NotificationType0=pT;class mT extends En{constructor(e,n=mr.auto){super(e,1),this._parameterStructures=n}get parameterStructures(){return this._parameterStructures}}tt.NotificationType1=mT;class gT extends En{constructor(e){super(e,2)}}tt.NotificationType2=gT;class yT extends En{constructor(e){super(e,3)}}tt.NotificationType3=yT;class vT extends En{constructor(e){super(e,4)}}tt.NotificationType4=vT;class bT extends En{constructor(e){super(e,5)}}tt.NotificationType5=bT;class DT extends En{constructor(e){super(e,6)}}tt.NotificationType6=DT;class wT extends En{constructor(e){super(e,7)}}tt.NotificationType7=wT;class _T extends En{constructor(e){super(e,8)}}tt.NotificationType8=_T;class $T extends En{constructor(e){super(e,9)}}tt.NotificationType9=$T;var Ob;(function(t){function e(i){const s=i;return s&&Ho.string(s.method)&&(Ho.string(s.id)||Ho.number(s.id))}t.isRequest=e;function n(i){const s=i;return s&&Ho.string(s.method)&&i.id===void 0}t.isNotification=n;function r(i){const s=i;return s&&(s.result!==void 0||!!s.error)&&(Ho.string(s.id)||Ho.number(s.id)||s.id===null)}t.isResponse=r})(Ob||(tt.Message=Ob={}));var ys={},Pb;Object.defineProperty(ys,"__esModule",{value:!0}),ys.LRUCache=ys.LinkedMap=ys.Touch=void 0;var gr;(function(t){t.None=0,t.First=1,t.AsOld=t.First,t.Last=2,t.AsNew=t.Last})(gr||(ys.Touch=gr={}));class Nb{constructor(){this[Pb]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){var e;return(e=this._head)==null?void 0:e.value}get last(){var e;return(e=this._tail)==null?void 0:e.value}has(e){return this._map.has(e)}get(e,n=gr.None){const r=this._map.get(e);if(!!r)return n!==gr.None&&this.touch(r,n),r.value}set(e,n,r=gr.None){let i=this._map.get(e);if(i)i.value=n,r!==gr.None&&this.touch(i,r);else{switch(i={key:e,value:n,next:void 0,previous:void 0},r){case gr.None:this.addItemLast(i);break;case gr.First:this.addItemFirst(i);break;case gr.Last:this.addItemLast(i);break;default:this.addItemLast(i);break}this._map.set(e,i),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){const n=this._map.get(e);if(!!n)return this._map.delete(e),this.removeItem(n),this._size--,n.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,n){const r=this._state;let i=this._head;for(;i;){if(n?e.bind(n)(i.value,i.key,this):e(i.value,i.key,this),this._state!==r)throw new Error("LinkedMap got modified during iteration.");i=i.next}}keys(){const e=this._state;let n=this._head;const r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(n){const i={value:n.key,done:!1};return n=n.next,i}else return{value:void 0,done:!0}}};return r}values(){const e=this._state;let n=this._head;const r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(n){const i={value:n.value,done:!1};return n=n.next,i}else return{value:void 0,done:!0}}};return r}entries(){const e=this._state;let n=this._head;const r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(n){const i={value:[n.key,n.value],done:!1};return n=n.next,i}else return{value:void 0,done:!0}}};return r}[(Pb=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(e===0){this.clear();return}let n=this._head,r=this.size;for(;n&&r>e;)this._map.delete(n.key),n=n.next,r--;this._head=n,this._size=r,n&&(n.previous=void 0),this._state++}addItemFirst(e){if(!this._head&&!this._tail)this._tail=e;else if(this._head)e.next=this._head,this._head.previous=e;else throw new Error("Invalid list");this._head=e,this._state++}addItemLast(e){if(!this._head&&!this._tail)this._head=e;else if(this._tail)e.previous=this._tail,this._tail.next=e;else throw new Error("Invalid list");this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{const n=e.next,r=e.previous;if(!n||!r)throw new Error("Invalid list");n.previous=r,r.next=n}e.next=void 0,e.previous=void 0,this._state++}touch(e,n){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(n!==gr.First&&n!==gr.Last)){if(n===gr.First){if(e===this._head)return;const r=e.next,i=e.previous;e===this._tail?(i.next=void 0,this._tail=i):(r.previous=i,i.next=r),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(n===gr.Last){if(e===this._tail)return;const r=e.next,i=e.previous;e===this._head?(r.previous=void 0,this._head=r):(r.previous=i,i.next=r),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}}toJSON(){const e=[];return this.forEach((n,r)=>{e.push([r,n])}),e}fromJSON(e){this.clear();for(const[n,r]of e)this.set(n,r)}}ys.LinkedMap=Nb;class ET extends Nb{constructor(e,n=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,n),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get ratio(){return this._ratio}set ratio(e){this._ratio=Math.min(Math.max(0,e),1),this.checkTrim()}get(e,n=gr.AsNew){return super.get(e,n)}peek(e){return super.get(e,gr.None)}set(e,n){return super.set(e,n,gr.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}ys.LRUCache=ET;var af={};Object.defineProperty(af,"__esModule",{value:!0}),af.Disposable=void 0;var Fb;(function(t){function e(n){return{dispose:n}}t.create=e})(Fb||(af.Disposable=Fb={}));var Yi={},vs={};Object.defineProperty(vs,"__esModule",{value:!0});let Hp;function Kp(){if(Hp===void 0)throw new Error("No runtime abstraction layer installed");return Hp}(function(t){function e(n){if(n===void 0)throw new Error("No runtime abstraction layer provided");Hp=n}t.install=e})(Kp||(Kp={})),vs.default=Kp,Object.defineProperty(Yi,"__esModule",{value:!0}),Yi.Emitter=Yi.Event=void 0;const ST=vs;var Rb;(function(t){const e={dispose(){}};t.None=function(){return e}})(Rb||(Yi.Event=Rb={}));class kT{add(e,n=null,r){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(n),Array.isArray(r)&&r.push({dispose:()=>this.remove(e,n)})}remove(e,n=null){if(!this._callbacks)return;let r=!1;for(let i=0,s=this._callbacks.length;i{this._callbacks||(this._callbacks=new kT),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,n);const i={dispose:()=>{!this._callbacks||(this._callbacks.remove(e,n),i.dispose=uf._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(r)&&r.push(i),i}),this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}}Yi.Emitter=uf,uf._noop=function(){};var Gs={};Object.defineProperty(Gs,"__esModule",{value:!0}),Gs.CancellationTokenSource=Gs.CancellationToken=void 0;const TT=vs,AT=Qn,zp=Yi;var cf;(function(t){t.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:zp.Event.None}),t.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:zp.Event.None});function e(n){const r=n;return r&&(r===t.None||r===t.Cancelled||AT.boolean(r.isCancellationRequested)&&!!r.onCancellationRequested)}t.is=e})(cf||(Gs.CancellationToken=cf={}));const CT=Object.freeze(function(t,e){const n=(0,TT.default)().timer.setTimeout(t.bind(e),0);return{dispose(){n.dispose()}}});class Ib{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?CT:(this._emitter||(this._emitter=new zp.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}}class OT{get token(){return this._token||(this._token=new Ib),this._token}cancel(){this._token?this._token.cancel():this._token=cf.Cancelled}dispose(){this._token?this._token instanceof Ib&&this._token.dispose():this._token=cf.None}}Gs.CancellationTokenSource=OT;var Ua={};Object.defineProperty(Ua,"__esModule",{value:!0}),Ua.SharedArrayReceiverStrategy=Ua.SharedArraySenderStrategy=void 0;const PT=Gs;var bc;(function(t){t.Continue=0,t.Cancelled=1})(bc||(bc={}));class NT{constructor(){this.buffers=new Map}enableCancellation(e){if(e.id===null)return;const n=new SharedArrayBuffer(4),r=new Int32Array(n,0,1);r[0]=bc.Continue,this.buffers.set(e.id,n),e.$cancellationData=n}async sendCancellation(e,n){const r=this.buffers.get(n);if(r===void 0)return;const i=new Int32Array(r,0,1);Atomics.store(i,0,bc.Cancelled)}cleanup(e){this.buffers.delete(e)}dispose(){this.buffers.clear()}}Ua.SharedArraySenderStrategy=NT;class FT{constructor(e){this.data=new Int32Array(e,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===bc.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}}class RT{constructor(e){this.token=new FT(e)}cancel(){}dispose(){}}class IT{constructor(){this.kind="request"}createCancellationTokenSource(e){const n=e.$cancellationData;return n===void 0?new PT.CancellationTokenSource:new RT(n)}}Ua.SharedArrayReceiverStrategy=IT;var Js={},Dc={};Object.defineProperty(Dc,"__esModule",{value:!0}),Dc.Semaphore=void 0;const MT=vs;class LT{constructor(e=1){if(e<=0)throw new Error("Capacity must be greater than 0");this._capacity=e,this._active=0,this._waiting=[]}lock(e){return new Promise((n,r)=>{this._waiting.push({thunk:e,resolve:n,reject:r}),this.runNext()})}get active(){return this._active}runNext(){this._waiting.length===0||this._active===this._capacity||(0,MT.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;const e=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("To many thunks active");try{const n=e.thunk();n instanceof Promise?n.then(r=>{this._active--,e.resolve(r),this.runNext()},r=>{this._active--,e.reject(r),this.runNext()}):(this._active--,e.resolve(n),this.runNext())}catch(n){this._active--,e.reject(n),this.runNext()}}}Dc.Semaphore=LT,Object.defineProperty(Js,"__esModule",{value:!0}),Js.ReadableStreamMessageReader=Js.AbstractMessageReader=Js.MessageReader=void 0;const Yp=vs,Va=Qn,Gp=Yi,jT=Dc;var Mb;(function(t){function e(n){let r=n;return r&&Va.func(r.listen)&&Va.func(r.dispose)&&Va.func(r.onError)&&Va.func(r.onClose)&&Va.func(r.onPartialMessage)}t.is=e})(Mb||(Js.MessageReader=Mb={}));class Lb{constructor(){this.errorEmitter=new Gp.Emitter,this.closeEmitter=new Gp.Emitter,this.partialMessageEmitter=new Gp.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e){this.errorEmitter.fire(this.asError(e))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(e){this.partialMessageEmitter.fire(e)}asError(e){return e instanceof Error?e:new Error(`Reader received error. Reason: ${Va.string(e.message)?e.message:"unknown"}`)}}Js.AbstractMessageReader=Lb;var Jp;(function(t){function e(n){var l;let r,i;const s=new Map;let a;const c=new Map;if(n===void 0||typeof n=="string")r=n!=null?n:"utf-8";else{if(r=(l=n.charset)!=null?l:"utf-8",n.contentDecoder!==void 0&&(i=n.contentDecoder,s.set(i.name,i)),n.contentDecoders!==void 0)for(const d of n.contentDecoders)s.set(d.name,d);if(n.contentTypeDecoder!==void 0&&(a=n.contentTypeDecoder,c.set(a.name,a)),n.contentTypeDecoders!==void 0)for(const d of n.contentTypeDecoders)c.set(d.name,d)}return a===void 0&&(a=(0,Yp.default)().applicationJson.decoder,c.set(a.name,a)),{charset:r,contentDecoder:i,contentDecoders:s,contentTypeDecoder:a,contentTypeDecoders:c}}t.fromOptions=e})(Jp||(Jp={}));class xT extends Lb{constructor(e,n){super(),this.readable=e,this.options=Jp.fromOptions(n),this.buffer=(0,Yp.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new jT.Semaphore(1)}set partialMessageTimeout(e){this._partialMessageTimeout=e}get partialMessageTimeout(){return this._partialMessageTimeout}listen(e){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=e;const n=this.readable.onData(r=>{this.onData(r)});return this.readable.onError(r=>this.fireError(r)),this.readable.onClose(()=>this.fireClose()),n}onData(e){try{for(this.buffer.append(e);;){if(this.nextMessageLength===-1){const r=this.buffer.tryReadHeaders(!0);if(!r)return;const i=r.get("content-length");if(!i){this.fireError(new Error(`Header must provide a Content-Length property. +${JSON.stringify(Object.fromEntries(r))}`));return}const s=parseInt(i);if(isNaN(s)){this.fireError(new Error(`Content-Length value must be a number. Got ${i}`));return}this.nextMessageLength=s}const n=this.buffer.tryReadBody(this.nextMessageLength);if(n===void 0){this.setPartialMessageTimer();return}this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{const r=this.options.contentDecoder!==void 0?await this.options.contentDecoder.decode(n):n,i=await this.options.contentTypeDecoder.decode(r,this.options);this.callback(i)}).catch(r=>{this.fireError(r)})}}catch(n){this.fireError(n)}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),!(this._partialMessageTimeout<=0)&&(this.partialMessageTimer=(0,Yp.default)().timer.setTimeout((e,n)=>{this.partialMessageTimer=void 0,e===this.messageToken&&(this.firePartialMessage({messageToken:e,waitingTime:n}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}}Js.ReadableStreamMessageReader=xT;var Qs={};Object.defineProperty(Qs,"__esModule",{value:!0}),Qs.WriteableStreamMessageWriter=Qs.AbstractMessageWriter=Qs.MessageWriter=void 0;const jb=vs,wc=Qn,BT=Dc,xb=Yi,qT="Content-Length: ",Bb=`\r +`;var qb;(function(t){function e(n){let r=n;return r&&wc.func(r.dispose)&&wc.func(r.onClose)&&wc.func(r.onError)&&wc.func(r.write)}t.is=e})(qb||(Qs.MessageWriter=qb={}));class Wb{constructor(){this.errorEmitter=new xb.Emitter,this.closeEmitter=new xb.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e,n,r){this.errorEmitter.fire([this.asError(e),n,r])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(e){return e instanceof Error?e:new Error(`Writer received error. Reason: ${wc.string(e.message)?e.message:"unknown"}`)}}Qs.AbstractMessageWriter=Wb;var Qp;(function(t){function e(n){var r,i;return n===void 0||typeof n=="string"?{charset:n!=null?n:"utf-8",contentTypeEncoder:(0,jb.default)().applicationJson.encoder}:{charset:(r=n.charset)!=null?r:"utf-8",contentEncoder:n.contentEncoder,contentTypeEncoder:(i=n.contentTypeEncoder)!=null?i:(0,jb.default)().applicationJson.encoder}}t.fromOptions=e})(Qp||(Qp={}));class WT extends Wb{constructor(e,n){super(),this.writable=e,this.options=Qp.fromOptions(n),this.errorCount=0,this.writeSemaphore=new BT.Semaphore(1),this.writable.onError(r=>this.fireError(r)),this.writable.onClose(()=>this.fireClose())}async write(e){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(e,this.options).then(r=>this.options.contentEncoder!==void 0?this.options.contentEncoder.encode(r):r).then(r=>{const i=[];return i.push(qT,r.byteLength.toString(),Bb),i.push(Bb),this.doWrite(e,i,r)},r=>{throw this.fireError(r),r}))}async doWrite(e,n,r){try{return await this.writable.write(n.join(""),"ascii"),this.writable.write(r)}catch(i){return this.handleError(i,e),Promise.reject(i)}}handleError(e,n){this.errorCount++,this.fireError(e,n,this.errorCount)}end(){this.writable.end()}}Qs.WriteableStreamMessageWriter=WT;var lf={};Object.defineProperty(lf,"__esModule",{value:!0}),lf.AbstractMessageBuffer=void 0;const UT=13,VT=10,HT=`\r +`;class KT{constructor(e="utf-8"){this._encoding=e,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(e){const n=typeof e=="string"?this.fromString(e,this._encoding):e;this._chunks.push(n),this._totalLength+=n.byteLength}tryReadHeaders(e=!1){if(this._chunks.length===0)return;let n=0,r=0,i=0,s=0;e:for(;rthis._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===e){const s=this._chunks[0];return this._chunks.shift(),this._totalLength-=e,this.asNative(s)}if(this._chunks[0].byteLength>e){const s=this._chunks[0],a=this.asNative(s,e);return this._chunks[0]=s.slice(e),this._totalLength-=e,a}const n=this.allocNative(e);let r=0,i=0;for(;e>0;){const s=this._chunks[i];if(s.byteLength>e){const a=s.slice(0,e);n.set(a,r),r+=e,this._chunks[i]=s.slice(e),this._totalLength-=e,e-=e}else n.set(s,r),r+=s.byteLength,this._chunks.shift(),this._totalLength-=s.byteLength,e-=s.byteLength}return n}}lf.AbstractMessageBuffer=KT;var Ub={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.createMessageConnection=t.ConnectionOptions=t.MessageStrategy=t.CancellationStrategy=t.CancellationSenderStrategy=t.CancellationReceiverStrategy=t.RequestCancellationReceiverStrategy=t.IdCancellationReceiverStrategy=t.ConnectionStrategy=t.ConnectionError=t.ConnectionErrors=t.LogTraceNotification=t.SetTraceNotification=t.TraceFormat=t.TraceValues=t.Trace=t.NullLogger=t.ProgressType=t.ProgressToken=void 0;const e=vs,n=Qn,r=tt,i=ys,s=Yi,a=Gs;var c;(function(K){K.type=new r.NotificationType("$/cancelRequest")})(c||(c={}));var l;(function(K){function ne(ge){return typeof ge=="string"||typeof ge=="number"}K.is=ne})(l||(t.ProgressToken=l={}));var d;(function(K){K.type=new r.NotificationType("$/progress")})(d||(d={}));class h{constructor(){}}t.ProgressType=h;var m;(function(K){function ne(ge){return n.func(ge)}K.is=ne})(m||(m={})),t.NullLogger=Object.freeze({error:()=>{},warn:()=>{},info:()=>{},log:()=>{}});var E;(function(K){K[K.Off=0]="Off",K[K.Messages=1]="Messages",K[K.Compact=2]="Compact",K[K.Verbose=3]="Verbose"})(E||(t.Trace=E={}));var T;(function(K){K.Off="off",K.Messages="messages",K.Compact="compact",K.Verbose="verbose"})(T||(t.TraceValues=T={})),function(K){function ne(ye){if(!n.string(ye))return K.Off;switch(ye=ye.toLowerCase(),ye){case"off":return K.Off;case"messages":return K.Messages;case"compact":return K.Compact;case"verbose":return K.Verbose;default:return K.Off}}K.fromString=ne;function ge(ye){switch(ye){case K.Off:return"off";case K.Messages:return"messages";case K.Compact:return"compact";case K.Verbose:return"verbose";default:return"off"}}K.toString=ge}(E||(t.Trace=E={}));var R;(function(K){K.Text="text",K.JSON="json"})(R||(t.TraceFormat=R={})),function(K){function ne(ge){return n.string(ge)?(ge=ge.toLowerCase(),ge==="json"?K.JSON:K.Text):K.Text}K.fromString=ne}(R||(t.TraceFormat=R={}));var P;(function(K){K.type=new r.NotificationType("$/setTrace")})(P||(t.SetTraceNotification=P={}));var A;(function(K){K.type=new r.NotificationType("$/logTrace")})(A||(t.LogTraceNotification=A={}));var F;(function(K){K[K.Closed=1]="Closed",K[K.Disposed=2]="Disposed",K[K.AlreadyListening=3]="AlreadyListening"})(F||(t.ConnectionErrors=F={}));class S extends Error{constructor(ne,ge){super(ge),this.code=ne,Object.setPrototypeOf(this,S.prototype)}}t.ConnectionError=S;var y;(function(K){function ne(ge){const ye=ge;return ye&&n.func(ye.cancelUndispatched)}K.is=ne})(y||(t.ConnectionStrategy=y={}));var D;(function(K){function ne(ge){const ye=ge;return ye&&(ye.kind===void 0||ye.kind==="id")&&n.func(ye.createCancellationTokenSource)&&(ye.dispose===void 0||n.func(ye.dispose))}K.is=ne})(D||(t.IdCancellationReceiverStrategy=D={}));var v;(function(K){function ne(ge){const ye=ge;return ye&&ye.kind==="request"&&n.func(ye.createCancellationTokenSource)&&(ye.dispose===void 0||n.func(ye.dispose))}K.is=ne})(v||(t.RequestCancellationReceiverStrategy=v={}));var _;(function(K){K.Message=Object.freeze({createCancellationTokenSource(ge){return new a.CancellationTokenSource}});function ne(ge){return D.is(ge)||v.is(ge)}K.is=ne})(_||(t.CancellationReceiverStrategy=_={}));var $;(function(K){K.Message=Object.freeze({sendCancellation(ge,ye){return ge.sendNotification(c.type,{id:ye})},cleanup(ge){}});function ne(ge){const ye=ge;return ye&&n.func(ye.sendCancellation)&&n.func(ye.cleanup)}K.is=ne})($||(t.CancellationSenderStrategy=$={}));var q;(function(K){K.Message=Object.freeze({receiver:_.Message,sender:$.Message});function ne(ge){const ye=ge;return ye&&_.is(ye.receiver)&&$.is(ye.sender)}K.is=ne})(q||(t.CancellationStrategy=q={}));var N;(function(K){function ne(ge){const ye=ge;return ye&&n.func(ye.handleMessage)}K.is=ne})(N||(t.MessageStrategy=N={}));var M;(function(K){function ne(ge){const ye=ge;return ye&&(q.is(ye.cancellationStrategy)||y.is(ye.connectionStrategy)||N.is(ye.messageStrategy))}K.is=ne})(M||(t.ConnectionOptions=M={}));var I;(function(K){K[K.New=1]="New",K[K.Listening=2]="Listening",K[K.Closed=3]="Closed",K[K.Disposed=4]="Disposed"})(I||(I={}));function Y(K,ne,ge,ye){const De=ge!==void 0?ge:t.NullLogger;let Be=0,nt=0,Se=0;const H="2.0";let fe;const ae=new Map;let U;const Z=new Map,pe=new Map;let Me,Ie=new i.LinkedMap,qe=new Map,ze=new Set,Ge=new Map,rt=E.Off,_n=R.Text,at,un=I.New;const Sn=new s.Emitter,Mt=new s.Emitter,kn=new s.Emitter,ur=new s.Emitter,Tn=new s.Emitter,Lt=ye&&ye.cancellationStrategy?ye.cancellationStrategy:q.Message;function Vn(se){if(se===null)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+se.toString()}function Xn(se){return se===null?"res-unknown-"+(++Se).toString():"res-"+se.toString()}function Rn(){return"not-"+(++nt).toString()}function qt(se,Te){r.Message.isRequest(Te)?se.set(Vn(Te.id),Te):r.Message.isResponse(Te)?se.set(Xn(Te.id),Te):se.set(Rn(),Te)}function X(se){}function V(){return un===I.Listening}function ee(){return un===I.Closed}function ie(){return un===I.Disposed}function C(){(un===I.New||un===I.Listening)&&(un=I.Closed,Mt.fire(void 0))}function g(se){Sn.fire([se,void 0,void 0])}function w(se){Sn.fire(se)}K.onClose(C),K.onError(g),ne.onClose(C),ne.onError(w);function j(){Me||Ie.size===0||(Me=(0,e.default)().timer.setImmediate(()=>{Me=void 0,re()}))}function J(se){r.Message.isRequest(se)?Ne(se):r.Message.isNotification(se)?He(se):r.Message.isResponse(se)?Je(se):Xe(se)}function re(){if(Ie.size===0)return;const se=Ie.shift();try{const Te=ye==null?void 0:ye.messageStrategy;N.is(Te)?Te.handleMessage(se,J):J(se)}finally{j()}}const ce=se=>{try{if(r.Message.isNotification(se)&&se.method===c.type.method){const Te=se.params.id,Le=Vn(Te),Ye=Ie.get(Le);if(r.Message.isRequest(Ye)){const Gt=ye==null?void 0:ye.connectionStrategy,Jt=Gt&&Gt.cancelUndispatched?Gt.cancelUndispatched(Ye,X):void 0;if(Jt&&(Jt.error!==void 0||Jt.result!==void 0)){Ie.delete(Le),Ge.delete(Te),Jt.id=Ye.id,ht(Jt,se.method,Date.now()),ne.write(Jt).catch(()=>De.error("Sending response for canceled message failed."));return}}const tn=Ge.get(Te);if(tn!==void 0){tn.cancel(),wt(se);return}else ze.add(Te)}qt(Ie,se)}finally{j()}};function Ne(se){var Hn;if(ie())return;function Te(Ht,pn,Nt){const mn={jsonrpc:H,id:se.id};Ht instanceof r.ResponseError?mn.error=Ht.toJson():mn.result=Ht===void 0?null:Ht,ht(mn,pn,Nt),ne.write(mn).catch(()=>De.error("Sending response failed."))}function Le(Ht,pn,Nt){const mn={jsonrpc:H,id:se.id,error:Ht.toJson()};ht(mn,pn,Nt),ne.write(mn).catch(()=>De.error("Sending response failed."))}function Ye(Ht,pn,Nt){Ht===void 0&&(Ht=null);const mn={jsonrpc:H,id:se.id,result:Ht};ht(mn,pn,Nt),ne.write(mn).catch(()=>De.error("Sending response failed."))}Wt(se);const tn=ae.get(se.method);let Gt,Jt;tn&&(Gt=tn.type,Jt=tn.handler);const Dn=Date.now();if(Jt||fe){const Ht=(Hn=se.id)!=null?Hn:String(Date.now()),pn=D.is(Lt.receiver)?Lt.receiver.createCancellationTokenSource(Ht):Lt.receiver.createCancellationTokenSource(se);se.id!==null&&ze.has(se.id)&&pn.cancel(),se.id!==null&&Ge.set(Ht,pn);try{let Nt;if(Jt)if(se.params===void 0){if(Gt!==void 0&&Gt.numberOfParams!==0){Le(new r.ResponseError(r.ErrorCodes.InvalidParams,`Request ${se.method} defines ${Gt.numberOfParams} params but received none.`),se.method,Dn);return}Nt=Jt(pn.token)}else if(Array.isArray(se.params)){if(Gt!==void 0&&Gt.parameterStructures===r.ParameterStructures.byName){Le(new r.ResponseError(r.ErrorCodes.InvalidParams,`Request ${se.method} defines parameters by name but received parameters by position`),se.method,Dn);return}Nt=Jt(...se.params,pn.token)}else{if(Gt!==void 0&&Gt.parameterStructures===r.ParameterStructures.byPosition){Le(new r.ResponseError(r.ErrorCodes.InvalidParams,`Request ${se.method} defines parameters by position but received parameters by name`),se.method,Dn);return}Nt=Jt(se.params,pn.token)}else fe&&(Nt=fe(se.method,se.params,pn.token));const mn=Nt;Nt?mn.then?mn.then(wn=>{Ge.delete(Ht),Te(wn,se.method,Dn)},wn=>{Ge.delete(Ht),wn instanceof r.ResponseError?Le(wn,se.method,Dn):wn&&n.string(wn.message)?Le(new r.ResponseError(r.ErrorCodes.InternalError,`Request ${se.method} failed with message: ${wn.message}`),se.method,Dn):Le(new r.ResponseError(r.ErrorCodes.InternalError,`Request ${se.method} failed unexpectedly without providing any details.`),se.method,Dn)}):(Ge.delete(Ht),Te(Nt,se.method,Dn)):(Ge.delete(Ht),Ye(Nt,se.method,Dn))}catch(Nt){Ge.delete(Ht),Nt instanceof r.ResponseError?Te(Nt,se.method,Dn):Nt&&n.string(Nt.message)?Le(new r.ResponseError(r.ErrorCodes.InternalError,`Request ${se.method} failed with message: ${Nt.message}`),se.method,Dn):Le(new r.ResponseError(r.ErrorCodes.InternalError,`Request ${se.method} failed unexpectedly without providing any details.`),se.method,Dn)}}else Le(new r.ResponseError(r.ErrorCodes.MethodNotFound,`Unhandled method ${se.method}`),se.method,Dn)}function Je(se){if(!ie())if(se.id===null)se.error?De.error(`Received response message without id: Error is: +${JSON.stringify(se.error,void 0,4)}`):De.error("Received response message without id. No further error information provided.");else{const Te=se.id,Le=qe.get(Te);if($n(se,Le),Le!==void 0){qe.delete(Te);try{if(se.error){const Ye=se.error;Le.reject(new r.ResponseError(Ye.code,Ye.message,Ye.data))}else if(se.result!==void 0)Le.resolve(se.result);else throw new Error("Should never happen.")}catch(Ye){Ye.message?De.error(`Response handler '${Le.method}' failed with message: ${Ye.message}`):De.error(`Response handler '${Le.method}' failed unexpectedly.`)}}}}function He(se){if(ie())return;let Te,Le;if(se.method===c.type.method){const Ye=se.params.id;ze.delete(Ye),wt(se);return}else{const Ye=Z.get(se.method);Ye&&(Le=Ye.handler,Te=Ye.type)}if(Le||U)try{if(wt(se),Le)if(se.params===void 0)Te!==void 0&&Te.numberOfParams!==0&&Te.parameterStructures!==r.ParameterStructures.byName&&De.error(`Notification ${se.method} defines ${Te.numberOfParams} params but received none.`),Le();else if(Array.isArray(se.params)){const Ye=se.params;se.method===d.type.method&&Ye.length===2&&l.is(Ye[0])?Le({token:Ye[0],value:Ye[1]}):(Te!==void 0&&(Te.parameterStructures===r.ParameterStructures.byName&&De.error(`Notification ${se.method} defines parameters by name but received parameters by position`),Te.numberOfParams!==se.params.length&&De.error(`Notification ${se.method} defines ${Te.numberOfParams} params but received ${Ye.length} arguments`)),Le(...Ye))}else Te!==void 0&&Te.parameterStructures===r.ParameterStructures.byPosition&&De.error(`Notification ${se.method} defines parameters by position but received parameters by name`),Le(se.params);else U&&U(se.method,se.params)}catch(Ye){Ye.message?De.error(`Notification handler '${se.method}' failed with message: ${Ye.message}`):De.error(`Notification handler '${se.method}' failed unexpectedly.`)}else kn.fire(se)}function Xe(se){if(!se){De.error("Received empty message.");return}De.error(`Received message which is neither a response nor a notification message: +${JSON.stringify(se,null,4)}`);const Te=se;if(n.string(Te.id)||n.number(Te.id)){const Le=Te.id,Ye=qe.get(Le);Ye&&Ye.reject(new Error("The received response has neither a result nor an error property."))}}function je(se){if(se!=null)switch(rt){case E.Verbose:return JSON.stringify(se,null,4);case E.Compact:return JSON.stringify(se);default:return}}function gt(se){if(!(rt===E.Off||!at))if(_n===R.Text){let Te;(rt===E.Verbose||rt===E.Compact)&&se.params&&(Te=`Params: ${je(se.params)} -`),at.log(`Sending request '${se.method} - (${se.id})'.`,ke)}else An("send-request",se)}function cn(se){if(!(rt===E.Off||!at))if(_n===R.Text){let ke;(rt===E.Verbose||rt===E.Compact)&&(se.params?ke=`Params: ${je(se.params)} +`),at.log(`Sending request '${se.method} - (${se.id})'.`,Te)}else An("send-request",se)}function cn(se){if(!(rt===E.Off||!at))if(_n===R.Text){let Te;(rt===E.Verbose||rt===E.Compact)&&(se.params?Te=`Params: ${je(se.params)} -`:ke=`No parameters provided. +`:Te=`No parameters provided. -`),at.log(`Sending notification '${se.method}'.`,ke)}else An("send-notification",se)}function ht(se,ke,Le){if(!(rt===E.Off||!at))if(_n===R.Text){let Ye;(rt===E.Verbose||rt===E.Compact)&&(se.error&&se.error.data?Ye=`Error data: ${je(se.error.data)} +`),at.log(`Sending notification '${se.method}'.`,Te)}else An("send-notification",se)}function ht(se,Te,Le){if(!(rt===E.Off||!at))if(_n===R.Text){let Ye;(rt===E.Verbose||rt===E.Compact)&&(se.error&&se.error.data?Ye=`Error data: ${je(se.error.data)} `:se.result?Ye=`Result: ${je(se.result)} `:se.error===void 0&&(Ye=`No result returned. -`)),at.log(`Sending response '${ke} - (${se.id})'. Processing request took ${Date.now()-Le}ms`,Ye)}else An("send-response",se)}function Wt(se){if(!(rt===E.Off||!at))if(_n===R.Text){let ke;(rt===E.Verbose||rt===E.Compact)&&se.params&&(ke=`Params: ${je(se.params)} +`)),at.log(`Sending response '${Te} - (${se.id})'. Processing request took ${Date.now()-Le}ms`,Ye)}else An("send-response",se)}function Wt(se){if(!(rt===E.Off||!at))if(_n===R.Text){let Te;(rt===E.Verbose||rt===E.Compact)&&se.params&&(Te=`Params: ${je(se.params)} -`),at.log(`Received request '${se.method} - (${se.id})'.`,ke)}else An("receive-request",se)}function wt(se){if(!(rt===E.Off||!at||se.method===A.type.method))if(_n===R.Text){let ke;(rt===E.Verbose||rt===E.Compact)&&(se.params?ke=`Params: ${je(se.params)} +`),at.log(`Received request '${se.method} - (${se.id})'.`,Te)}else An("receive-request",se)}function wt(se){if(!(rt===E.Off||!at||se.method===A.type.method))if(_n===R.Text){let Te;(rt===E.Verbose||rt===E.Compact)&&(se.params?Te=`Params: ${je(se.params)} -`:ke=`No parameters provided. +`:Te=`No parameters provided. -`),at.log(`Received notification '${se.method}'.`,ke)}else An("receive-notification",se)}function $n(se,ke){if(!(rt===E.Off||!at))if(_n===R.Text){let Le;if((rt===E.Verbose||rt===E.Compact)&&(se.error&&se.error.data?Le=`Error data: ${je(se.error.data)} +`),at.log(`Received notification '${se.method}'.`,Te)}else An("receive-notification",se)}function $n(se,Te){if(!(rt===E.Off||!at))if(_n===R.Text){let Le;if((rt===E.Verbose||rt===E.Compact)&&(se.error&&se.error.data?Le=`Error data: ${je(se.error.data)} `:se.result?Le=`Result: ${je(se.result)} `:se.error===void 0&&(Le=`No result returned. -`)),ke){const Ye=se.error?` Request failed: ${se.error.message} (${se.error.code}).`:"";at.log(`Received response '${ke.method} - (${se.id})' in ${Date.now()-ke.timerStart}ms.${Ye}`,Le)}else at.log(`Received response ${se.id} without active response promise.`,Le)}else An("receive-response",se)}function An(se,ke){if(!at||rt===E.Off)return;const Le={isLSPMessage:!0,type:se,message:ke,timestamp:Date.now()};at.log(Le)}function bi(){if(ee())throw new S(N.Closed,"Connection is closed.");if(ie())throw new S(N.Disposed,"Connection is disposed.")}function Eo(){if(V())throw new S(N.AlreadyListening,"Connection is already listening")}function fn(){if(!V())throw new Error("Call listen() first.")}function Di(se){return se===void 0?null:se}function xi(se){if(se!==null)return se}function Q(se){return se!=null&&!Array.isArray(se)&&typeof se=="object"}function vn(se,ke){switch(se){case r.ParameterStructures.auto:return Q(ke)?xi(ke):[Di(ke)];case r.ParameterStructures.byName:if(!Q(ke))throw new Error("Received parameters by name but param is not an object literal.");return xi(ke);case r.ParameterStructures.byPosition:return[Di(ke)];default:throw new Error(`Unknown parameter structure ${se.toString()}`)}}function bn(se,ke){let Le;const Ye=se.numberOfParams;switch(Ye){case 0:Le=void 0;break;case 1:Le=vn(se.parameterStructures,ke[0]);break;default:Le=[];for(let tn=0;tn{bi();let Le,Ye;if(n.string(se)){Le=se;const Gt=ke[0];let Jt=0,Dn=r.ParameterStructures.auto;r.ParameterStructures.is(Gt)&&(Jt=1,Dn=Gt);let Hn=ke.length;const Ht=Hn-Jt;switch(Ht){case 0:Ye=void 0;break;case 1:Ye=vn(Dn,ke[Jt]);break;default:if(Dn===r.ParameterStructures.byName)throw new Error(`Received ${Ht} parameters for 'by Name' notification parameter structure.`);Ye=ke.slice(Jt,Hn).map(pn=>Di(pn));break}}else{const Gt=ke;Le=se.method,Ye=bn(se,Gt)}const tn={jsonrpc:H,method:Le,params:Ye};return cn(tn),ne.write(tn).catch(Gt=>{throw De.error("Sending notification failed."),Gt})},onNotification:(se,ke)=>{bi();let Le;return n.func(se)?U=se:ke&&(n.string(se)?(Le=se,Z.set(se,{type:void 0,handler:ke})):(Le=se.method,Z.set(se.method,{type:se,handler:ke}))),{dispose:()=>{Le!==void 0?Z.delete(Le):U=void 0}}},onProgress:(se,ke,Le)=>{if(pe.has(ke))throw new Error(`Progress handler for token ${ke} already registered`);return pe.set(ke,Le),{dispose:()=>{pe.delete(ke)}}},sendProgress:(se,ke,Le)=>it.sendNotification(d.type,{token:ke,value:Le}),onUnhandledProgress:ur.event,sendRequest:(se,...ke)=>{bi(),fn();let Le,Ye,tn;if(n.string(se)){Le=se;const Hn=ke[0],Ht=ke[ke.length-1];let pn=0,Nt=r.ParameterStructures.auto;r.ParameterStructures.is(Hn)&&(pn=1,Nt=Hn);let mn=ke.length;a.CancellationToken.is(Ht)&&(mn=mn-1,tn=Ht);const wn=mn-pn;switch(wn){case 0:Ye=void 0;break;case 1:Ye=vn(Nt,ke[pn]);break;default:if(Nt===r.ParameterStructures.byName)throw new Error(`Received ${wn} parameters for 'by Name' request parameter structure.`);Ye=ke.slice(pn,mn).map(vl=>Di(vl));break}}else{const Hn=ke;Le=se.method,Ye=bn(se,Hn);const Ht=se.numberOfParams;tn=a.CancellationToken.is(Hn[Ht])?Hn[Ht]:void 0}const Gt=Be++;let Jt;tn&&(Jt=tn.onCancellationRequested(()=>{const Hn=Lt.sender.sendCancellation(it,Gt);return Hn===void 0?(De.log(`Received no promise from cancellation strategy when cancelling id ${Gt}`),Promise.resolve()):Hn.catch(()=>{De.log(`Sending cancellation messages for id ${Gt} failed`)})}));const Dn={jsonrpc:H,id:Gt,method:Le,params:Ye};return gt(Dn),typeof Lt.sender.enableCancellation=="function"&&Lt.sender.enableCancellation(Dn),new Promise(async(Hn,Ht)=>{const pn=wn=>{Hn(wn),Lt.sender.cleanup(Gt),Jt==null||Jt.dispose()},Nt=wn=>{Ht(wn),Lt.sender.cleanup(Gt),Jt==null||Jt.dispose()},mn={method:Le,timerStart:Date.now(),resolve:pn,reject:Nt};try{await ne.write(Dn),qe.set(Gt,mn)}catch(wn){throw De.error("Sending request failed."),mn.reject(new r.ResponseError(r.ErrorCodes.MessageWriteError,wn.message?wn.message:"Unknown reason")),wn}})},onRequest:(se,ke)=>{bi();let Le=null;return m.is(se)?(Le=void 0,fe=se):n.string(se)?(Le=null,ke!==void 0&&(Le=se,ae.set(se,{handler:ke,type:void 0}))):ke!==void 0&&(Le=se.method,ae.set(se.method,{type:se,handler:ke})),{dispose:()=>{Le!==null&&(Le!==void 0?ae.delete(Le):fe=void 0)}}},hasPendingResponse:()=>qe.size>0,trace:async(se,ke,Le)=>{let Ye=!1,tn=R.Text;Le!==void 0&&(n.boolean(Le)?Ye=Le:(Ye=Le.sendNotification||!1,tn=Le.traceFormat||R.Text)),rt=se,_n=tn,rt===E.Off?at=void 0:at=ke,Ye&&!ee()&&!ie()&&await it.sendNotification(P.type,{value:E.toString(se)})},onError:Sn.event,onClose:Mt.event,onUnhandledNotification:Tn.event,onDispose:kn.event,end:()=>{ne.end()},dispose:()=>{if(ie())return;un=I.Disposed,kn.fire(void 0);const se=new r.ResponseError(r.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(const ke of qe.values())ke.reject(se);qe=new Map,Ge=new Map,ze=new Set,Ie=new i.LinkedMap,n.func(ne.dispose)&&ne.dispose(),n.func(K.dispose)&&K.dispose()},listen:()=>{bi(),Eo(),un=I.Listening,K.listen(ce)},inspect:()=>{(0,e.default)().console.log("inspect")}};return it.onNotification(A.type,se=>{if(rt===E.Off||!at)return;const ke=rt===E.Verbose||rt===E.Compact;at.log(se.message,ke?se.verbose:void 0)}),it.onNotification(d.type,se=>{const ke=pe.get(se.token);ke?ke(se.value):ur.fire(se)}),it}t.createMessageConnection=Y})(Ub),function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ProgressType=t.ProgressToken=t.createMessageConnection=t.NullLogger=t.ConnectionOptions=t.ConnectionStrategy=t.AbstractMessageBuffer=t.WriteableStreamMessageWriter=t.AbstractMessageWriter=t.MessageWriter=t.ReadableStreamMessageReader=t.AbstractMessageReader=t.MessageReader=t.SharedArrayReceiverStrategy=t.SharedArraySenderStrategy=t.CancellationToken=t.CancellationTokenSource=t.Emitter=t.Event=t.Disposable=t.LRUCache=t.Touch=t.LinkedMap=t.ParameterStructures=t.NotificationType9=t.NotificationType8=t.NotificationType7=t.NotificationType6=t.NotificationType5=t.NotificationType4=t.NotificationType3=t.NotificationType2=t.NotificationType1=t.NotificationType0=t.NotificationType=t.ErrorCodes=t.ResponseError=t.RequestType9=t.RequestType8=t.RequestType7=t.RequestType6=t.RequestType5=t.RequestType4=t.RequestType3=t.RequestType2=t.RequestType1=t.RequestType0=t.RequestType=t.Message=t.RAL=void 0,t.MessageStrategy=t.CancellationStrategy=t.CancellationSenderStrategy=t.CancellationReceiverStrategy=t.ConnectionError=t.ConnectionErrors=t.LogTraceNotification=t.SetTraceNotification=t.TraceFormat=t.TraceValues=t.Trace=void 0;const e=tt;Object.defineProperty(t,"Message",{enumerable:!0,get:function(){return e.Message}}),Object.defineProperty(t,"RequestType",{enumerable:!0,get:function(){return e.RequestType}}),Object.defineProperty(t,"RequestType0",{enumerable:!0,get:function(){return e.RequestType0}}),Object.defineProperty(t,"RequestType1",{enumerable:!0,get:function(){return e.RequestType1}}),Object.defineProperty(t,"RequestType2",{enumerable:!0,get:function(){return e.RequestType2}}),Object.defineProperty(t,"RequestType3",{enumerable:!0,get:function(){return e.RequestType3}}),Object.defineProperty(t,"RequestType4",{enumerable:!0,get:function(){return e.RequestType4}}),Object.defineProperty(t,"RequestType5",{enumerable:!0,get:function(){return e.RequestType5}}),Object.defineProperty(t,"RequestType6",{enumerable:!0,get:function(){return e.RequestType6}}),Object.defineProperty(t,"RequestType7",{enumerable:!0,get:function(){return e.RequestType7}}),Object.defineProperty(t,"RequestType8",{enumerable:!0,get:function(){return e.RequestType8}}),Object.defineProperty(t,"RequestType9",{enumerable:!0,get:function(){return e.RequestType9}}),Object.defineProperty(t,"ResponseError",{enumerable:!0,get:function(){return e.ResponseError}}),Object.defineProperty(t,"ErrorCodes",{enumerable:!0,get:function(){return e.ErrorCodes}}),Object.defineProperty(t,"NotificationType",{enumerable:!0,get:function(){return e.NotificationType}}),Object.defineProperty(t,"NotificationType0",{enumerable:!0,get:function(){return e.NotificationType0}}),Object.defineProperty(t,"NotificationType1",{enumerable:!0,get:function(){return e.NotificationType1}}),Object.defineProperty(t,"NotificationType2",{enumerable:!0,get:function(){return e.NotificationType2}}),Object.defineProperty(t,"NotificationType3",{enumerable:!0,get:function(){return e.NotificationType3}}),Object.defineProperty(t,"NotificationType4",{enumerable:!0,get:function(){return e.NotificationType4}}),Object.defineProperty(t,"NotificationType5",{enumerable:!0,get:function(){return e.NotificationType5}}),Object.defineProperty(t,"NotificationType6",{enumerable:!0,get:function(){return e.NotificationType6}}),Object.defineProperty(t,"NotificationType7",{enumerable:!0,get:function(){return e.NotificationType7}}),Object.defineProperty(t,"NotificationType8",{enumerable:!0,get:function(){return e.NotificationType8}}),Object.defineProperty(t,"NotificationType9",{enumerable:!0,get:function(){return e.NotificationType9}}),Object.defineProperty(t,"ParameterStructures",{enumerable:!0,get:function(){return e.ParameterStructures}});const n=ys;Object.defineProperty(t,"LinkedMap",{enumerable:!0,get:function(){return n.LinkedMap}}),Object.defineProperty(t,"LRUCache",{enumerable:!0,get:function(){return n.LRUCache}}),Object.defineProperty(t,"Touch",{enumerable:!0,get:function(){return n.Touch}});const r=of;Object.defineProperty(t,"Disposable",{enumerable:!0,get:function(){return r.Disposable}});const i=Yi;Object.defineProperty(t,"Event",{enumerable:!0,get:function(){return i.Event}}),Object.defineProperty(t,"Emitter",{enumerable:!0,get:function(){return i.Emitter}});const s=Gs;Object.defineProperty(t,"CancellationTokenSource",{enumerable:!0,get:function(){return s.CancellationTokenSource}}),Object.defineProperty(t,"CancellationToken",{enumerable:!0,get:function(){return s.CancellationToken}});const a=Ua;Object.defineProperty(t,"SharedArraySenderStrategy",{enumerable:!0,get:function(){return a.SharedArraySenderStrategy}}),Object.defineProperty(t,"SharedArrayReceiverStrategy",{enumerable:!0,get:function(){return a.SharedArrayReceiverStrategy}});const c=Js;Object.defineProperty(t,"MessageReader",{enumerable:!0,get:function(){return c.MessageReader}}),Object.defineProperty(t,"AbstractMessageReader",{enumerable:!0,get:function(){return c.AbstractMessageReader}}),Object.defineProperty(t,"ReadableStreamMessageReader",{enumerable:!0,get:function(){return c.ReadableStreamMessageReader}});const l=Qs;Object.defineProperty(t,"MessageWriter",{enumerable:!0,get:function(){return l.MessageWriter}}),Object.defineProperty(t,"AbstractMessageWriter",{enumerable:!0,get:function(){return l.AbstractMessageWriter}}),Object.defineProperty(t,"WriteableStreamMessageWriter",{enumerable:!0,get:function(){return l.WriteableStreamMessageWriter}});const d=cf;Object.defineProperty(t,"AbstractMessageBuffer",{enumerable:!0,get:function(){return d.AbstractMessageBuffer}});const h=Ub;Object.defineProperty(t,"ConnectionStrategy",{enumerable:!0,get:function(){return h.ConnectionStrategy}}),Object.defineProperty(t,"ConnectionOptions",{enumerable:!0,get:function(){return h.ConnectionOptions}}),Object.defineProperty(t,"NullLogger",{enumerable:!0,get:function(){return h.NullLogger}}),Object.defineProperty(t,"createMessageConnection",{enumerable:!0,get:function(){return h.createMessageConnection}}),Object.defineProperty(t,"ProgressToken",{enumerable:!0,get:function(){return h.ProgressToken}}),Object.defineProperty(t,"ProgressType",{enumerable:!0,get:function(){return h.ProgressType}}),Object.defineProperty(t,"Trace",{enumerable:!0,get:function(){return h.Trace}}),Object.defineProperty(t,"TraceValues",{enumerable:!0,get:function(){return h.TraceValues}}),Object.defineProperty(t,"TraceFormat",{enumerable:!0,get:function(){return h.TraceFormat}}),Object.defineProperty(t,"SetTraceNotification",{enumerable:!0,get:function(){return h.SetTraceNotification}}),Object.defineProperty(t,"LogTraceNotification",{enumerable:!0,get:function(){return h.LogTraceNotification}}),Object.defineProperty(t,"ConnectionErrors",{enumerable:!0,get:function(){return h.ConnectionErrors}}),Object.defineProperty(t,"ConnectionError",{enumerable:!0,get:function(){return h.ConnectionError}}),Object.defineProperty(t,"CancellationReceiverStrategy",{enumerable:!0,get:function(){return h.CancellationReceiverStrategy}}),Object.defineProperty(t,"CancellationSenderStrategy",{enumerable:!0,get:function(){return h.CancellationSenderStrategy}}),Object.defineProperty(t,"CancellationStrategy",{enumerable:!0,get:function(){return h.CancellationStrategy}}),Object.defineProperty(t,"MessageStrategy",{enumerable:!0,get:function(){return h.MessageStrategy}});const m=vs;t.RAL=m.default}(sf),Object.defineProperty(Wp,"__esModule",{value:!0});const Gi=sf;class lf extends Gi.AbstractMessageBuffer{constructor(e="utf-8"){super(e),this.asciiDecoder=new TextDecoder("ascii")}emptyBuffer(){return lf.emptyBuffer}fromString(e,n){return new TextEncoder().encode(e)}toString(e,n){return n==="ascii"?this.asciiDecoder.decode(e):new TextDecoder(n).decode(e)}asNative(e,n){return n===void 0?e:e.slice(0,n)}allocNative(e){return new Uint8Array(e)}}lf.emptyBuffer=new Uint8Array(0);class zk{constructor(e){this.socket=e,this._onData=new Gi.Emitter,this._messageListener=n=>{n.data.arrayBuffer().then(i=>{this._onData.fire(new Uint8Array(i))},()=>{(0,Gi.RAL)().console.error("Converting blob to array buffer failed.")})},this.socket.addEventListener("message",this._messageListener)}onClose(e){return this.socket.addEventListener("close",e),Gi.Disposable.create(()=>this.socket.removeEventListener("close",e))}onError(e){return this.socket.addEventListener("error",e),Gi.Disposable.create(()=>this.socket.removeEventListener("error",e))}onEnd(e){return this.socket.addEventListener("end",e),Gi.Disposable.create(()=>this.socket.removeEventListener("end",e))}onData(e){return this._onData.event(e)}}class Yk{constructor(e){this.socket=e}onClose(e){return this.socket.addEventListener("close",e),Gi.Disposable.create(()=>this.socket.removeEventListener("close",e))}onError(e){return this.socket.addEventListener("error",e),Gi.Disposable.create(()=>this.socket.removeEventListener("error",e))}onEnd(e){return this.socket.addEventListener("end",e),Gi.Disposable.create(()=>this.socket.removeEventListener("end",e))}write(e,n){if(typeof e=="string"){if(n!==void 0&&n!=="utf-8")throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${n}`);this.socket.send(e)}else this.socket.send(e);return Promise.resolve()}end(){this.socket.close()}}const Gk=new TextEncoder,Vb=Object.freeze({messageBuffer:Object.freeze({create:t=>new lf(t)}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:(t,e)=>{if(e.charset!=="utf-8")throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${e.charset}`);return Promise.resolve(Gk.encode(JSON.stringify(t,void 0,0)))}}),decoder:Object.freeze({name:"application/json",decode:(t,e)=>{if(!(t instanceof Uint8Array))throw new Error("In a Browser environments only Uint8Arrays are supported.");return Promise.resolve(JSON.parse(new TextDecoder(e.charset).decode(t)))}})}),stream:Object.freeze({asReadableStream:t=>new zk(t),asWritableStream:t=>new Yk(t)}),console,timer:Object.freeze({setTimeout(t,e,...n){const r=setTimeout(t,e,...n);return{dispose:()=>clearTimeout(r)}},setImmediate(t,...e){const n=setTimeout(t,0,...e);return{dispose:()=>clearTimeout(n)}},setInterval(t,e,...n){const r=setInterval(t,e,...n);return{dispose:()=>clearInterval(r)}}})});function Xp(){return Vb}(function(t){function e(){Gi.RAL.install(Vb)}t.install=e})(Xp||(Xp={})),Wp.default=Xp,function(t){var e=Vt&&Vt.__createBinding||(Object.create?function(l,d,h,m){m===void 0&&(m=h);var E=Object.getOwnPropertyDescriptor(d,h);(!E||("get"in E?!d.__esModule:E.writable||E.configurable))&&(E={enumerable:!0,get:function(){return d[h]}}),Object.defineProperty(l,m,E)}:function(l,d,h,m){m===void 0&&(m=h),l[m]=d[h]}),n=Vt&&Vt.__exportStar||function(l,d){for(var h in l)h!=="default"&&!Object.prototype.hasOwnProperty.call(d,h)&&e(d,l,h)};Object.defineProperty(t,"__esModule",{value:!0}),t.createMessageConnection=t.BrowserMessageWriter=t.BrowserMessageReader=void 0,Wp.default.install();const i=sf;n(sf,t);class s extends i.AbstractMessageReader{constructor(d){super(),this._onData=new i.Emitter,this._messageListener=h=>{this._onData.fire(h.data)},d.addEventListener("error",h=>this.fireError(h)),d.onmessage=this._messageListener}listen(d){return this._onData.event(d)}}t.BrowserMessageReader=s;class a extends i.AbstractMessageWriter{constructor(d){super(),this.port=d,this.errorCount=0,d.addEventListener("error",h=>this.fireError(h))}write(d){try{return this.port.postMessage(d),Promise.resolve()}catch(h){return this.handleError(h,d),Promise.reject(h)}}handleError(d,h){this.errorCount++,this.fireError(d,h,this.errorCount)}end(){}}t.BrowserMessageWriter=a;function c(l,d,h,m){return h===void 0&&(h=i.NullLogger),i.ConnectionStrategy.is(m)&&(m={connectionStrategy:m}),(0,i.createMessageConnection)(l,d,h,m)}t.createMessageConnection=c}(Vo),function(t){t.exports=Vo}(qp);var Hb={},Zp;(function(t){function e(n){return typeof n=="string"}t.is=e})(Zp||(Zp={}));var ff;(function(t){function e(n){return typeof n=="string"}t.is=e})(ff||(ff={}));var em;(function(t){t.MIN_VALUE=-2147483648,t.MAX_VALUE=2147483647;function e(n){return typeof n=="number"&&t.MIN_VALUE<=n&&n<=t.MAX_VALUE}t.is=e})(em||(em={}));var _c;(function(t){t.MIN_VALUE=0,t.MAX_VALUE=2147483647;function e(n){return typeof n=="number"&&t.MIN_VALUE<=n&&n<=t.MAX_VALUE}t.is=e})(_c||(_c={}));var Zn;(function(t){function e(r,i){return r===Number.MAX_VALUE&&(r=_c.MAX_VALUE),i===Number.MAX_VALUE&&(i=_c.MAX_VALUE),{line:r,character:i}}t.create=e;function n(r){let i=r;return ve.objectLiteral(i)&&ve.uinteger(i.line)&&ve.uinteger(i.character)}t.is=n})(Zn||(Zn={}));var ot;(function(t){function e(r,i,s,a){if(ve.uinteger(r)&&ve.uinteger(i)&&ve.uinteger(s)&&ve.uinteger(a))return{start:Zn.create(r,i),end:Zn.create(s,a)};if(Zn.is(r)&&Zn.is(i))return{start:r,end:i};throw new Error(`Range#create called with invalid arguments[${r}, ${i}, ${s}, ${a}]`)}t.create=e;function n(r){let i=r;return ve.objectLiteral(i)&&Zn.is(i.start)&&Zn.is(i.end)}t.is=n})(ot||(ot={}));var Ko;(function(t){function e(r,i){return{uri:r,range:i}}t.create=e;function n(r){let i=r;return ve.objectLiteral(i)&&ot.is(i.range)&&(ve.string(i.uri)||ve.undefined(i.uri))}t.is=n})(Ko||(Ko={}));var df;(function(t){function e(r,i,s,a){return{targetUri:r,targetRange:i,targetSelectionRange:s,originSelectionRange:a}}t.create=e;function n(r){let i=r;return ve.objectLiteral(i)&&ot.is(i.targetRange)&&ve.string(i.targetUri)&&ot.is(i.targetSelectionRange)&&(ot.is(i.originSelectionRange)||ve.undefined(i.originSelectionRange))}t.is=n})(df||(df={}));var hf;(function(t){function e(r,i,s,a){return{red:r,green:i,blue:s,alpha:a}}t.create=e;function n(r){const i=r;return ve.objectLiteral(i)&&ve.numberRange(i.red,0,1)&&ve.numberRange(i.green,0,1)&&ve.numberRange(i.blue,0,1)&&ve.numberRange(i.alpha,0,1)}t.is=n})(hf||(hf={}));var tm;(function(t){function e(r,i){return{range:r,color:i}}t.create=e;function n(r){const i=r;return ve.objectLiteral(i)&&ot.is(i.range)&&hf.is(i.color)}t.is=n})(tm||(tm={}));var nm;(function(t){function e(r,i,s){return{label:r,textEdit:i,additionalTextEdits:s}}t.create=e;function n(r){const i=r;return ve.objectLiteral(i)&&ve.string(i.label)&&(ve.undefined(i.textEdit)||an.is(i))&&(ve.undefined(i.additionalTextEdits)||ve.typedArray(i.additionalTextEdits,an.is))}t.is=n})(nm||(nm={}));var rm;(function(t){t.Comment="comment",t.Imports="imports",t.Region="region"})(rm||(rm={}));var pf;(function(t){function e(r,i,s,a,c,l){const d={startLine:r,endLine:i};return ve.defined(s)&&(d.startCharacter=s),ve.defined(a)&&(d.endCharacter=a),ve.defined(c)&&(d.kind=c),ve.defined(l)&&(d.collapsedText=l),d}t.create=e;function n(r){const i=r;return ve.objectLiteral(i)&&ve.uinteger(i.startLine)&&ve.uinteger(i.startLine)&&(ve.undefined(i.startCharacter)||ve.uinteger(i.startCharacter))&&(ve.undefined(i.endCharacter)||ve.uinteger(i.endCharacter))&&(ve.undefined(i.kind)||ve.string(i.kind))}t.is=n})(pf||(pf={}));var mf;(function(t){function e(r,i){return{location:r,message:i}}t.create=e;function n(r){let i=r;return ve.defined(i)&&Ko.is(i.location)&&ve.string(i.message)}t.is=n})(mf||(mf={}));var Dt;(function(t){t.Error=1,t.Warning=2,t.Information=3,t.Hint=4})(Dt||(Dt={}));var gf;(function(t){t.Unnecessary=1,t.Deprecated=2})(gf||(gf={}));var im;(function(t){function e(n){const r=n;return ve.objectLiteral(r)&&ve.string(r.href)}t.is=e})(im||(im={}));var Nr;(function(t){function e(r,i,s,a,c,l){let d={range:r,message:i};return ve.defined(s)&&(d.severity=s),ve.defined(a)&&(d.code=a),ve.defined(c)&&(d.source=c),ve.defined(l)&&(d.relatedInformation=l),d}t.create=e;function n(r){var i;let s=r;return ve.defined(s)&&ot.is(s.range)&&ve.string(s.message)&&(ve.number(s.severity)||ve.undefined(s.severity))&&(ve.integer(s.code)||ve.string(s.code)||ve.undefined(s.code))&&(ve.undefined(s.codeDescription)||ve.string((i=s.codeDescription)===null||i===void 0?void 0:i.href))&&(ve.string(s.source)||ve.undefined(s.source))&&(ve.undefined(s.relatedInformation)||ve.typedArray(s.relatedInformation,mf.is))}t.is=n})(Nr||(Nr={}));var Xs;(function(t){function e(r,i,...s){let a={title:r,command:i};return ve.defined(s)&&s.length>0&&(a.arguments=s),a}t.create=e;function n(r){let i=r;return ve.defined(i)&&ve.string(i.title)&&ve.string(i.command)}t.is=n})(Xs||(Xs={}));var an;(function(t){function e(s,a){return{range:s,newText:a}}t.replace=e;function n(s,a){return{range:{start:s,end:s},newText:a}}t.insert=n;function r(s){return{range:s,newText:""}}t.del=r;function i(s){const a=s;return ve.objectLiteral(a)&&ve.string(a.newText)&&ot.is(a.range)}t.is=i})(an||(an={}));var zo;(function(t){function e(r,i,s){const a={label:r};return i!==void 0&&(a.needsConfirmation=i),s!==void 0&&(a.description=s),a}t.create=e;function n(r){const i=r;return ve.objectLiteral(i)&&ve.string(i.label)&&(ve.boolean(i.needsConfirmation)||i.needsConfirmation===void 0)&&(ve.string(i.description)||i.description===void 0)}t.is=n})(zo||(zo={}));var lr;(function(t){function e(n){const r=n;return ve.string(r)}t.is=e})(lr||(lr={}));var bs;(function(t){function e(s,a,c){return{range:s,newText:a,annotationId:c}}t.replace=e;function n(s,a,c){return{range:{start:s,end:s},newText:a,annotationId:c}}t.insert=n;function r(s,a){return{range:s,newText:"",annotationId:a}}t.del=r;function i(s){const a=s;return an.is(a)&&(zo.is(a.annotationId)||lr.is(a.annotationId))}t.is=i})(bs||(bs={}));var $c;(function(t){function e(r,i){return{textDocument:r,edits:i}}t.create=e;function n(r){let i=r;return ve.defined(i)&&Ec.is(i.textDocument)&&Array.isArray(i.edits)}t.is=n})($c||($c={}));var Ha;(function(t){function e(r,i,s){let a={kind:"create",uri:r};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(a.options=i),s!==void 0&&(a.annotationId=s),a}t.create=e;function n(r){let i=r;return i&&i.kind==="create"&&ve.string(i.uri)&&(i.options===void 0||(i.options.overwrite===void 0||ve.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||ve.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||lr.is(i.annotationId))}t.is=n})(Ha||(Ha={}));var Ka;(function(t){function e(r,i,s,a){let c={kind:"rename",oldUri:r,newUri:i};return s!==void 0&&(s.overwrite!==void 0||s.ignoreIfExists!==void 0)&&(c.options=s),a!==void 0&&(c.annotationId=a),c}t.create=e;function n(r){let i=r;return i&&i.kind==="rename"&&ve.string(i.oldUri)&&ve.string(i.newUri)&&(i.options===void 0||(i.options.overwrite===void 0||ve.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||ve.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||lr.is(i.annotationId))}t.is=n})(Ka||(Ka={}));var za;(function(t){function e(r,i,s){let a={kind:"delete",uri:r};return i!==void 0&&(i.recursive!==void 0||i.ignoreIfNotExists!==void 0)&&(a.options=i),s!==void 0&&(a.annotationId=s),a}t.create=e;function n(r){let i=r;return i&&i.kind==="delete"&&ve.string(i.uri)&&(i.options===void 0||(i.options.recursive===void 0||ve.boolean(i.options.recursive))&&(i.options.ignoreIfNotExists===void 0||ve.boolean(i.options.ignoreIfNotExists)))&&(i.annotationId===void 0||lr.is(i.annotationId))}t.is=n})(za||(za={}));var yf;(function(t){function e(n){let r=n;return r&&(r.changes!==void 0||r.documentChanges!==void 0)&&(r.documentChanges===void 0||r.documentChanges.every(i=>ve.string(i.kind)?Ha.is(i)||Ka.is(i)||za.is(i):$c.is(i)))}t.is=e})(yf||(yf={}));class vf{constructor(e,n){this.edits=e,this.changeAnnotations=n}insert(e,n,r){let i,s;if(r===void 0?i=an.insert(e,n):lr.is(r)?(s=r,i=bs.insert(e,n,r)):(this.assertChangeAnnotations(this.changeAnnotations),s=this.changeAnnotations.manage(r),i=bs.insert(e,n,s)),this.edits.push(i),s!==void 0)return s}replace(e,n,r){let i,s;if(r===void 0?i=an.replace(e,n):lr.is(r)?(s=r,i=bs.replace(e,n,r)):(this.assertChangeAnnotations(this.changeAnnotations),s=this.changeAnnotations.manage(r),i=bs.replace(e,n,s)),this.edits.push(i),s!==void 0)return s}delete(e,n){let r,i;if(n===void 0?r=an.del(e):lr.is(n)?(i=n,r=bs.del(e,n)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(n),r=bs.del(e,i)),this.edits.push(r),i!==void 0)return i}add(e){this.edits.push(e)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(e){if(e===void 0)throw new Error("Text edit change is not configured to manage change annotations.")}}class Kb{constructor(e){this._annotations=e===void 0?Object.create(null):e,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(e,n){let r;if(lr.is(e)?r=e:(r=this.nextId(),n=e),this._annotations[r]!==void 0)throw new Error(`Id ${r} is already in use.`);if(n===void 0)throw new Error(`No annotation provided for id ${r}`);return this._annotations[r]=n,this._size++,r}nextId(){return this._counter++,this._counter.toString()}}class Jk{constructor(e){this._textEditChanges=Object.create(null),e!==void 0?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new Kb(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach(n=>{if($c.is(n)){const r=new vf(n.edits,this._changeAnnotations);this._textEditChanges[n.textDocument.uri]=r}})):e.changes&&Object.keys(e.changes).forEach(n=>{const r=new vf(e.changes[n]);this._textEditChanges[n]=r})):this._workspaceEdit={}}get edit(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(e){if(Ec.is(e)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");const n={uri:e.uri,version:e.version};let r=this._textEditChanges[n.uri];if(!r){const i=[],s={textDocument:n,edits:i};this._workspaceEdit.documentChanges.push(s),r=new vf(i,this._changeAnnotations),this._textEditChanges[n.uri]=r}return r}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");let n=this._textEditChanges[e];if(!n){let r=[];this._workspaceEdit.changes[e]=r,n=new vf(r),this._textEditChanges[e]=n}return n}}initDocumentChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new Kb,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))}createFile(e,n,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let i;zo.is(n)||lr.is(n)?i=n:r=n;let s,a;if(i===void 0?s=Ha.create(e,r):(a=lr.is(i)?i:this._changeAnnotations.manage(i),s=Ha.create(e,r,a)),this._workspaceEdit.documentChanges.push(s),a!==void 0)return a}renameFile(e,n,r,i){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let s;zo.is(r)||lr.is(r)?s=r:i=r;let a,c;if(s===void 0?a=Ka.create(e,n,i):(c=lr.is(s)?s:this._changeAnnotations.manage(s),a=Ka.create(e,n,i,c)),this._workspaceEdit.documentChanges.push(a),c!==void 0)return c}deleteFile(e,n,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let i;zo.is(n)||lr.is(n)?i=n:r=n;let s,a;if(i===void 0?s=za.create(e,r):(a=lr.is(i)?i:this._changeAnnotations.manage(i),s=za.create(e,r,a)),this._workspaceEdit.documentChanges.push(s),a!==void 0)return a}}var sm;(function(t){function e(r){return{uri:r}}t.create=e;function n(r){let i=r;return ve.defined(i)&&ve.string(i.uri)}t.is=n})(sm||(sm={}));var om;(function(t){function e(r,i){return{uri:r,version:i}}t.create=e;function n(r){let i=r;return ve.defined(i)&&ve.string(i.uri)&&ve.integer(i.version)}t.is=n})(om||(om={}));var Ec;(function(t){function e(r,i){return{uri:r,version:i}}t.create=e;function n(r){let i=r;return ve.defined(i)&&ve.string(i.uri)&&(i.version===null||ve.integer(i.version))}t.is=n})(Ec||(Ec={}));var am;(function(t){function e(r,i,s,a){return{uri:r,languageId:i,version:s,text:a}}t.create=e;function n(r){let i=r;return ve.defined(i)&&ve.string(i.uri)&&ve.string(i.languageId)&&ve.integer(i.version)&&ve.string(i.text)}t.is=n})(am||(am={}));var Ji;(function(t){t.PlainText="plaintext",t.Markdown="markdown";function e(n){const r=n;return r===t.PlainText||r===t.Markdown}t.is=e})(Ji||(Ji={}));var Ya;(function(t){function e(n){const r=n;return ve.objectLiteral(n)&&Ji.is(r.kind)&&ve.string(r.value)}t.is=e})(Ya||(Ya={}));var Fr;(function(t){t.Text=1,t.Method=2,t.Function=3,t.Constructor=4,t.Field=5,t.Variable=6,t.Class=7,t.Interface=8,t.Module=9,t.Property=10,t.Unit=11,t.Value=12,t.Enum=13,t.Keyword=14,t.Snippet=15,t.Color=16,t.File=17,t.Reference=18,t.Folder=19,t.EnumMember=20,t.Constant=21,t.Struct=22,t.Event=23,t.Operator=24,t.TypeParameter=25})(Fr||(Fr={}));var or;(function(t){t.PlainText=1,t.Snippet=2})(or||(or={}));var um;(function(t){t.Deprecated=1})(um||(um={}));var cm;(function(t){function e(r,i,s){return{newText:r,insert:i,replace:s}}t.create=e;function n(r){const i=r;return i&&ve.string(i.newText)&&ot.is(i.insert)&&ot.is(i.replace)}t.is=n})(cm||(cm={}));var bf;(function(t){t.asIs=1,t.adjustIndentation=2})(bf||(bf={}));var lm;(function(t){function e(n){const r=n;return r&&(ve.string(r.detail)||r.detail===void 0)&&(ve.string(r.description)||r.description===void 0)}t.is=e})(lm||(lm={}));var Df;(function(t){function e(n){return{label:n}}t.create=e})(Df||(Df={}));var wf;(function(t){function e(n,r){return{items:n||[],isIncomplete:!!r}}t.create=e})(wf||(wf={}));var Sc;(function(t){function e(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}t.fromPlainText=e;function n(r){const i=r;return ve.string(i)||ve.objectLiteral(i)&&ve.string(i.language)&&ve.string(i.value)}t.is=n})(Sc||(Sc={}));var fm;(function(t){function e(n){let r=n;return!!r&&ve.objectLiteral(r)&&(Ya.is(r.contents)||Sc.is(r.contents)||ve.typedArray(r.contents,Sc.is))&&(n.range===void 0||ot.is(n.range))}t.is=e})(fm||(fm={}));var dm;(function(t){function e(n,r){return r?{label:n,documentation:r}:{label:n}}t.create=e})(dm||(dm={}));var hm;(function(t){function e(n,r,...i){let s={label:n};return ve.defined(r)&&(s.documentation=r),ve.defined(i)?s.parameters=i:s.parameters=[],s}t.create=e})(hm||(hm={}));var pm;(function(t){t.Text=1,t.Read=2,t.Write=3})(pm||(pm={}));var mm;(function(t){function e(n,r){let i={range:n};return ve.number(r)&&(i.kind=r),i}t.create=e})(mm||(mm={}));var Ai;(function(t){t.File=1,t.Module=2,t.Namespace=3,t.Package=4,t.Class=5,t.Method=6,t.Property=7,t.Field=8,t.Constructor=9,t.Enum=10,t.Interface=11,t.Function=12,t.Variable=13,t.Constant=14,t.String=15,t.Number=16,t.Boolean=17,t.Array=18,t.Object=19,t.Key=20,t.Null=21,t.EnumMember=22,t.Struct=23,t.Event=24,t.Operator=25,t.TypeParameter=26})(Ai||(Ai={}));var gm;(function(t){t.Deprecated=1})(gm||(gm={}));var ym;(function(t){function e(n,r,i,s,a){let c={name:n,kind:r,location:{uri:s,range:i}};return a&&(c.containerName=a),c}t.create=e})(ym||(ym={}));var vm;(function(t){function e(n,r,i,s){return s!==void 0?{name:n,kind:r,location:{uri:i,range:s}}:{name:n,kind:r,location:{uri:i}}}t.create=e})(vm||(vm={}));var bm;(function(t){function e(r,i,s,a,c,l){let d={name:r,detail:i,kind:s,range:a,selectionRange:c};return l!==void 0&&(d.children=l),d}t.create=e;function n(r){let i=r;return i&&ve.string(i.name)&&ve.number(i.kind)&&ot.is(i.range)&&ot.is(i.selectionRange)&&(i.detail===void 0||ve.string(i.detail))&&(i.deprecated===void 0||ve.boolean(i.deprecated))&&(i.children===void 0||Array.isArray(i.children))&&(i.tags===void 0||Array.isArray(i.tags))}t.is=n})(bm||(bm={}));var Qi;(function(t){t.Empty="",t.QuickFix="quickfix",t.Refactor="refactor",t.RefactorExtract="refactor.extract",t.RefactorInline="refactor.inline",t.RefactorRewrite="refactor.rewrite",t.Source="source",t.SourceOrganizeImports="source.organizeImports",t.SourceFixAll="source.fixAll"})(Qi||(Qi={}));var Tc;(function(t){t.Invoked=1,t.Automatic=2})(Tc||(Tc={}));var Dm;(function(t){function e(r,i,s){let a={diagnostics:r};return i!=null&&(a.only=i),s!=null&&(a.triggerKind=s),a}t.create=e;function n(r){let i=r;return ve.defined(i)&&ve.typedArray(i.diagnostics,Nr.is)&&(i.only===void 0||ve.typedArray(i.only,ve.string))&&(i.triggerKind===void 0||i.triggerKind===Tc.Invoked||i.triggerKind===Tc.Automatic)}t.is=n})(Dm||(Dm={}));var Ci;(function(t){function e(r,i,s){let a={title:r},c=!0;return typeof i=="string"?(c=!1,a.kind=i):Xs.is(i)?a.command=i:a.edit=i,c&&s!==void 0&&(a.kind=s),a}t.create=e;function n(r){let i=r;return i&&ve.string(i.title)&&(i.diagnostics===void 0||ve.typedArray(i.diagnostics,Nr.is))&&(i.kind===void 0||ve.string(i.kind))&&(i.edit!==void 0||i.command!==void 0)&&(i.command===void 0||Xs.is(i.command))&&(i.isPreferred===void 0||ve.boolean(i.isPreferred))&&(i.edit===void 0||yf.is(i.edit))}t.is=n})(Ci||(Ci={}));var _f;(function(t){function e(r,i){let s={range:r};return ve.defined(i)&&(s.data=i),s}t.create=e;function n(r){let i=r;return ve.defined(i)&&ot.is(i.range)&&(ve.undefined(i.command)||Xs.is(i.command))}t.is=n})(_f||(_f={}));var wm;(function(t){function e(r,i){return{tabSize:r,insertSpaces:i}}t.create=e;function n(r){let i=r;return ve.defined(i)&&ve.uinteger(i.tabSize)&&ve.boolean(i.insertSpaces)}t.is=n})(wm||(wm={}));var _m;(function(t){function e(r,i,s){return{range:r,target:i,data:s}}t.create=e;function n(r){let i=r;return ve.defined(i)&&ot.is(i.range)&&(ve.undefined(i.target)||ve.string(i.target))}t.is=n})(_m||(_m={}));var kc;(function(t){function e(r,i){return{range:r,parent:i}}t.create=e;function n(r){let i=r;return ve.objectLiteral(i)&&ot.is(i.range)&&(i.parent===void 0||t.is(i.parent))}t.is=n})(kc||(kc={}));var $m;(function(t){t.namespace="namespace",t.type="type",t.class="class",t.enum="enum",t.interface="interface",t.struct="struct",t.typeParameter="typeParameter",t.parameter="parameter",t.variable="variable",t.property="property",t.enumMember="enumMember",t.event="event",t.function="function",t.method="method",t.macro="macro",t.keyword="keyword",t.modifier="modifier",t.comment="comment",t.string="string",t.number="number",t.regexp="regexp",t.operator="operator",t.decorator="decorator"})($m||($m={}));var Em;(function(t){t.declaration="declaration",t.definition="definition",t.readonly="readonly",t.static="static",t.deprecated="deprecated",t.abstract="abstract",t.async="async",t.modification="modification",t.documentation="documentation",t.defaultLibrary="defaultLibrary"})(Em||(Em={}));var Sm;(function(t){function e(n){const r=n;return ve.objectLiteral(r)&&(r.resultId===void 0||typeof r.resultId=="string")&&Array.isArray(r.data)&&(r.data.length===0||typeof r.data[0]=="number")}t.is=e})(Sm||(Sm={}));var Tm;(function(t){function e(r,i){return{range:r,text:i}}t.create=e;function n(r){const i=r;return i!=null&&ot.is(i.range)&&ve.string(i.text)}t.is=n})(Tm||(Tm={}));var km;(function(t){function e(r,i,s){return{range:r,variableName:i,caseSensitiveLookup:s}}t.create=e;function n(r){const i=r;return i!=null&&ot.is(i.range)&&ve.boolean(i.caseSensitiveLookup)&&(ve.string(i.variableName)||i.variableName===void 0)}t.is=n})(km||(km={}));var Am;(function(t){function e(r,i){return{range:r,expression:i}}t.create=e;function n(r){const i=r;return i!=null&&ot.is(i.range)&&(ve.string(i.expression)||i.expression===void 0)}t.is=n})(Am||(Am={}));var Cm;(function(t){function e(r,i){return{frameId:r,stoppedLocation:i}}t.create=e;function n(r){const i=r;return ve.defined(i)&&ot.is(r.stoppedLocation)}t.is=n})(Cm||(Cm={}));var $f;(function(t){t.Type=1,t.Parameter=2;function e(n){return n===1||n===2}t.is=e})($f||($f={}));var Ef;(function(t){function e(r){return{value:r}}t.create=e;function n(r){const i=r;return ve.objectLiteral(i)&&(i.tooltip===void 0||ve.string(i.tooltip)||Ya.is(i.tooltip))&&(i.location===void 0||Ko.is(i.location))&&(i.command===void 0||Xs.is(i.command))}t.is=n})(Ef||(Ef={}));var Om;(function(t){function e(r,i,s){const a={position:r,label:i};return s!==void 0&&(a.kind=s),a}t.create=e;function n(r){const i=r;return ve.objectLiteral(i)&&Zn.is(i.position)&&(ve.string(i.label)||ve.typedArray(i.label,Ef.is))&&(i.kind===void 0||$f.is(i.kind))&&i.textEdits===void 0||ve.typedArray(i.textEdits,an.is)&&(i.tooltip===void 0||ve.string(i.tooltip)||Ya.is(i.tooltip))&&(i.paddingLeft===void 0||ve.boolean(i.paddingLeft))&&(i.paddingRight===void 0||ve.boolean(i.paddingRight))}t.is=n})(Om||(Om={}));var Pm;(function(t){function e(n){return{kind:"snippet",value:n}}t.createSnippet=e})(Pm||(Pm={}));var Nm;(function(t){function e(n,r,i,s){return{insertText:n,filterText:r,range:i,command:s}}t.create=e})(Nm||(Nm={}));var Fm;(function(t){function e(n){return{items:n}}t.create=e})(Fm||(Fm={}));var Rm;(function(t){t.Invoked=0,t.Automatic=1})(Rm||(Rm={}));var Im;(function(t){function e(n,r){return{range:n,text:r}}t.create=e})(Im||(Im={}));var Mm;(function(t){function e(n,r){return{triggerKind:n,selectedCompletionInfo:r}}t.create=e})(Mm||(Mm={}));var Lm;(function(t){function e(n){const r=n;return ve.objectLiteral(r)&&ff.is(r.uri)&&ve.string(r.name)}t.is=e})(Lm||(Lm={}));const Qk=[` +`)),Te){const Ye=se.error?` Request failed: ${se.error.message} (${se.error.code}).`:"";at.log(`Received response '${Te.method} - (${se.id})' in ${Date.now()-Te.timerStart}ms.${Ye}`,Le)}else at.log(`Received response ${se.id} without active response promise.`,Le)}else An("receive-response",se)}function An(se,Te){if(!at||rt===E.Off)return;const Le={isLSPMessage:!0,type:se,message:Te,timestamp:Date.now()};at.log(Le)}function bi(){if(ee())throw new S(F.Closed,"Connection is closed.");if(ie())throw new S(F.Disposed,"Connection is disposed.")}function Eo(){if(V())throw new S(F.AlreadyListening,"Connection is already listening")}function fn(){if(!V())throw new Error("Call listen() first.")}function Di(se){return se===void 0?null:se}function xi(se){if(se!==null)return se}function Q(se){return se!=null&&!Array.isArray(se)&&typeof se=="object"}function vn(se,Te){switch(se){case r.ParameterStructures.auto:return Q(Te)?xi(Te):[Di(Te)];case r.ParameterStructures.byName:if(!Q(Te))throw new Error("Received parameters by name but param is not an object literal.");return xi(Te);case r.ParameterStructures.byPosition:return[Di(Te)];default:throw new Error(`Unknown parameter structure ${se.toString()}`)}}function bn(se,Te){let Le;const Ye=se.numberOfParams;switch(Ye){case 0:Le=void 0;break;case 1:Le=vn(se.parameterStructures,Te[0]);break;default:Le=[];for(let tn=0;tn{bi();let Le,Ye;if(n.string(se)){Le=se;const Gt=Te[0];let Jt=0,Dn=r.ParameterStructures.auto;r.ParameterStructures.is(Gt)&&(Jt=1,Dn=Gt);let Hn=Te.length;const Ht=Hn-Jt;switch(Ht){case 0:Ye=void 0;break;case 1:Ye=vn(Dn,Te[Jt]);break;default:if(Dn===r.ParameterStructures.byName)throw new Error(`Received ${Ht} parameters for 'by Name' notification parameter structure.`);Ye=Te.slice(Jt,Hn).map(pn=>Di(pn));break}}else{const Gt=Te;Le=se.method,Ye=bn(se,Gt)}const tn={jsonrpc:H,method:Le,params:Ye};return cn(tn),ne.write(tn).catch(Gt=>{throw De.error("Sending notification failed."),Gt})},onNotification:(se,Te)=>{bi();let Le;return n.func(se)?U=se:Te&&(n.string(se)?(Le=se,Z.set(se,{type:void 0,handler:Te})):(Le=se.method,Z.set(se.method,{type:se,handler:Te}))),{dispose:()=>{Le!==void 0?Z.delete(Le):U=void 0}}},onProgress:(se,Te,Le)=>{if(pe.has(Te))throw new Error(`Progress handler for token ${Te} already registered`);return pe.set(Te,Le),{dispose:()=>{pe.delete(Te)}}},sendProgress:(se,Te,Le)=>it.sendNotification(d.type,{token:Te,value:Le}),onUnhandledProgress:ur.event,sendRequest:(se,...Te)=>{bi(),fn();let Le,Ye,tn;if(n.string(se)){Le=se;const Hn=Te[0],Ht=Te[Te.length-1];let pn=0,Nt=r.ParameterStructures.auto;r.ParameterStructures.is(Hn)&&(pn=1,Nt=Hn);let mn=Te.length;a.CancellationToken.is(Ht)&&(mn=mn-1,tn=Ht);const wn=mn-pn;switch(wn){case 0:Ye=void 0;break;case 1:Ye=vn(Nt,Te[pn]);break;default:if(Nt===r.ParameterStructures.byName)throw new Error(`Received ${wn} parameters for 'by Name' request parameter structure.`);Ye=Te.slice(pn,mn).map(bl=>Di(bl));break}}else{const Hn=Te;Le=se.method,Ye=bn(se,Hn);const Ht=se.numberOfParams;tn=a.CancellationToken.is(Hn[Ht])?Hn[Ht]:void 0}const Gt=Be++;let Jt;tn&&(Jt=tn.onCancellationRequested(()=>{const Hn=Lt.sender.sendCancellation(it,Gt);return Hn===void 0?(De.log(`Received no promise from cancellation strategy when cancelling id ${Gt}`),Promise.resolve()):Hn.catch(()=>{De.log(`Sending cancellation messages for id ${Gt} failed`)})}));const Dn={jsonrpc:H,id:Gt,method:Le,params:Ye};return gt(Dn),typeof Lt.sender.enableCancellation=="function"&&Lt.sender.enableCancellation(Dn),new Promise(async(Hn,Ht)=>{const pn=wn=>{Hn(wn),Lt.sender.cleanup(Gt),Jt==null||Jt.dispose()},Nt=wn=>{Ht(wn),Lt.sender.cleanup(Gt),Jt==null||Jt.dispose()},mn={method:Le,timerStart:Date.now(),resolve:pn,reject:Nt};try{await ne.write(Dn),qe.set(Gt,mn)}catch(wn){throw De.error("Sending request failed."),mn.reject(new r.ResponseError(r.ErrorCodes.MessageWriteError,wn.message?wn.message:"Unknown reason")),wn}})},onRequest:(se,Te)=>{bi();let Le=null;return m.is(se)?(Le=void 0,fe=se):n.string(se)?(Le=null,Te!==void 0&&(Le=se,ae.set(se,{handler:Te,type:void 0}))):Te!==void 0&&(Le=se.method,ae.set(se.method,{type:se,handler:Te})),{dispose:()=>{Le!==null&&(Le!==void 0?ae.delete(Le):fe=void 0)}}},hasPendingResponse:()=>qe.size>0,trace:async(se,Te,Le)=>{let Ye=!1,tn=R.Text;Le!==void 0&&(n.boolean(Le)?Ye=Le:(Ye=Le.sendNotification||!1,tn=Le.traceFormat||R.Text)),rt=se,_n=tn,rt===E.Off?at=void 0:at=Te,Ye&&!ee()&&!ie()&&await it.sendNotification(P.type,{value:E.toString(se)})},onError:Sn.event,onClose:Mt.event,onUnhandledNotification:kn.event,onDispose:Tn.event,end:()=>{ne.end()},dispose:()=>{if(ie())return;un=I.Disposed,Tn.fire(void 0);const se=new r.ResponseError(r.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(const Te of qe.values())Te.reject(se);qe=new Map,Ge=new Map,ze=new Set,Ie=new i.LinkedMap,n.func(ne.dispose)&&ne.dispose(),n.func(K.dispose)&&K.dispose()},listen:()=>{bi(),Eo(),un=I.Listening,K.listen(ce)},inspect:()=>{(0,e.default)().console.log("inspect")}};return it.onNotification(A.type,se=>{if(rt===E.Off||!at)return;const Te=rt===E.Verbose||rt===E.Compact;at.log(se.message,Te?se.verbose:void 0)}),it.onNotification(d.type,se=>{const Te=pe.get(se.token);Te?Te(se.value):ur.fire(se)}),it}t.createMessageConnection=Y})(Ub),function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ProgressType=t.ProgressToken=t.createMessageConnection=t.NullLogger=t.ConnectionOptions=t.ConnectionStrategy=t.AbstractMessageBuffer=t.WriteableStreamMessageWriter=t.AbstractMessageWriter=t.MessageWriter=t.ReadableStreamMessageReader=t.AbstractMessageReader=t.MessageReader=t.SharedArrayReceiverStrategy=t.SharedArraySenderStrategy=t.CancellationToken=t.CancellationTokenSource=t.Emitter=t.Event=t.Disposable=t.LRUCache=t.Touch=t.LinkedMap=t.ParameterStructures=t.NotificationType9=t.NotificationType8=t.NotificationType7=t.NotificationType6=t.NotificationType5=t.NotificationType4=t.NotificationType3=t.NotificationType2=t.NotificationType1=t.NotificationType0=t.NotificationType=t.ErrorCodes=t.ResponseError=t.RequestType9=t.RequestType8=t.RequestType7=t.RequestType6=t.RequestType5=t.RequestType4=t.RequestType3=t.RequestType2=t.RequestType1=t.RequestType0=t.RequestType=t.Message=t.RAL=void 0,t.MessageStrategy=t.CancellationStrategy=t.CancellationSenderStrategy=t.CancellationReceiverStrategy=t.ConnectionError=t.ConnectionErrors=t.LogTraceNotification=t.SetTraceNotification=t.TraceFormat=t.TraceValues=t.Trace=void 0;const e=tt;Object.defineProperty(t,"Message",{enumerable:!0,get:function(){return e.Message}}),Object.defineProperty(t,"RequestType",{enumerable:!0,get:function(){return e.RequestType}}),Object.defineProperty(t,"RequestType0",{enumerable:!0,get:function(){return e.RequestType0}}),Object.defineProperty(t,"RequestType1",{enumerable:!0,get:function(){return e.RequestType1}}),Object.defineProperty(t,"RequestType2",{enumerable:!0,get:function(){return e.RequestType2}}),Object.defineProperty(t,"RequestType3",{enumerable:!0,get:function(){return e.RequestType3}}),Object.defineProperty(t,"RequestType4",{enumerable:!0,get:function(){return e.RequestType4}}),Object.defineProperty(t,"RequestType5",{enumerable:!0,get:function(){return e.RequestType5}}),Object.defineProperty(t,"RequestType6",{enumerable:!0,get:function(){return e.RequestType6}}),Object.defineProperty(t,"RequestType7",{enumerable:!0,get:function(){return e.RequestType7}}),Object.defineProperty(t,"RequestType8",{enumerable:!0,get:function(){return e.RequestType8}}),Object.defineProperty(t,"RequestType9",{enumerable:!0,get:function(){return e.RequestType9}}),Object.defineProperty(t,"ResponseError",{enumerable:!0,get:function(){return e.ResponseError}}),Object.defineProperty(t,"ErrorCodes",{enumerable:!0,get:function(){return e.ErrorCodes}}),Object.defineProperty(t,"NotificationType",{enumerable:!0,get:function(){return e.NotificationType}}),Object.defineProperty(t,"NotificationType0",{enumerable:!0,get:function(){return e.NotificationType0}}),Object.defineProperty(t,"NotificationType1",{enumerable:!0,get:function(){return e.NotificationType1}}),Object.defineProperty(t,"NotificationType2",{enumerable:!0,get:function(){return e.NotificationType2}}),Object.defineProperty(t,"NotificationType3",{enumerable:!0,get:function(){return e.NotificationType3}}),Object.defineProperty(t,"NotificationType4",{enumerable:!0,get:function(){return e.NotificationType4}}),Object.defineProperty(t,"NotificationType5",{enumerable:!0,get:function(){return e.NotificationType5}}),Object.defineProperty(t,"NotificationType6",{enumerable:!0,get:function(){return e.NotificationType6}}),Object.defineProperty(t,"NotificationType7",{enumerable:!0,get:function(){return e.NotificationType7}}),Object.defineProperty(t,"NotificationType8",{enumerable:!0,get:function(){return e.NotificationType8}}),Object.defineProperty(t,"NotificationType9",{enumerable:!0,get:function(){return e.NotificationType9}}),Object.defineProperty(t,"ParameterStructures",{enumerable:!0,get:function(){return e.ParameterStructures}});const n=ys;Object.defineProperty(t,"LinkedMap",{enumerable:!0,get:function(){return n.LinkedMap}}),Object.defineProperty(t,"LRUCache",{enumerable:!0,get:function(){return n.LRUCache}}),Object.defineProperty(t,"Touch",{enumerable:!0,get:function(){return n.Touch}});const r=af;Object.defineProperty(t,"Disposable",{enumerable:!0,get:function(){return r.Disposable}});const i=Yi;Object.defineProperty(t,"Event",{enumerable:!0,get:function(){return i.Event}}),Object.defineProperty(t,"Emitter",{enumerable:!0,get:function(){return i.Emitter}});const s=Gs;Object.defineProperty(t,"CancellationTokenSource",{enumerable:!0,get:function(){return s.CancellationTokenSource}}),Object.defineProperty(t,"CancellationToken",{enumerable:!0,get:function(){return s.CancellationToken}});const a=Ua;Object.defineProperty(t,"SharedArraySenderStrategy",{enumerable:!0,get:function(){return a.SharedArraySenderStrategy}}),Object.defineProperty(t,"SharedArrayReceiverStrategy",{enumerable:!0,get:function(){return a.SharedArrayReceiverStrategy}});const c=Js;Object.defineProperty(t,"MessageReader",{enumerable:!0,get:function(){return c.MessageReader}}),Object.defineProperty(t,"AbstractMessageReader",{enumerable:!0,get:function(){return c.AbstractMessageReader}}),Object.defineProperty(t,"ReadableStreamMessageReader",{enumerable:!0,get:function(){return c.ReadableStreamMessageReader}});const l=Qs;Object.defineProperty(t,"MessageWriter",{enumerable:!0,get:function(){return l.MessageWriter}}),Object.defineProperty(t,"AbstractMessageWriter",{enumerable:!0,get:function(){return l.AbstractMessageWriter}}),Object.defineProperty(t,"WriteableStreamMessageWriter",{enumerable:!0,get:function(){return l.WriteableStreamMessageWriter}});const d=lf;Object.defineProperty(t,"AbstractMessageBuffer",{enumerable:!0,get:function(){return d.AbstractMessageBuffer}});const h=Ub;Object.defineProperty(t,"ConnectionStrategy",{enumerable:!0,get:function(){return h.ConnectionStrategy}}),Object.defineProperty(t,"ConnectionOptions",{enumerable:!0,get:function(){return h.ConnectionOptions}}),Object.defineProperty(t,"NullLogger",{enumerable:!0,get:function(){return h.NullLogger}}),Object.defineProperty(t,"createMessageConnection",{enumerable:!0,get:function(){return h.createMessageConnection}}),Object.defineProperty(t,"ProgressToken",{enumerable:!0,get:function(){return h.ProgressToken}}),Object.defineProperty(t,"ProgressType",{enumerable:!0,get:function(){return h.ProgressType}}),Object.defineProperty(t,"Trace",{enumerable:!0,get:function(){return h.Trace}}),Object.defineProperty(t,"TraceValues",{enumerable:!0,get:function(){return h.TraceValues}}),Object.defineProperty(t,"TraceFormat",{enumerable:!0,get:function(){return h.TraceFormat}}),Object.defineProperty(t,"SetTraceNotification",{enumerable:!0,get:function(){return h.SetTraceNotification}}),Object.defineProperty(t,"LogTraceNotification",{enumerable:!0,get:function(){return h.LogTraceNotification}}),Object.defineProperty(t,"ConnectionErrors",{enumerable:!0,get:function(){return h.ConnectionErrors}}),Object.defineProperty(t,"ConnectionError",{enumerable:!0,get:function(){return h.ConnectionError}}),Object.defineProperty(t,"CancellationReceiverStrategy",{enumerable:!0,get:function(){return h.CancellationReceiverStrategy}}),Object.defineProperty(t,"CancellationSenderStrategy",{enumerable:!0,get:function(){return h.CancellationSenderStrategy}}),Object.defineProperty(t,"CancellationStrategy",{enumerable:!0,get:function(){return h.CancellationStrategy}}),Object.defineProperty(t,"MessageStrategy",{enumerable:!0,get:function(){return h.MessageStrategy}});const m=vs;t.RAL=m.default}(of),Object.defineProperty(Wp,"__esModule",{value:!0});const Gi=of;class ff extends Gi.AbstractMessageBuffer{constructor(e="utf-8"){super(e),this.asciiDecoder=new TextDecoder("ascii")}emptyBuffer(){return ff.emptyBuffer}fromString(e,n){return new TextEncoder().encode(e)}toString(e,n){return n==="ascii"?this.asciiDecoder.decode(e):new TextDecoder(n).decode(e)}asNative(e,n){return n===void 0?e:e.slice(0,n)}allocNative(e){return new Uint8Array(e)}}ff.emptyBuffer=new Uint8Array(0);class zT{constructor(e){this.socket=e,this._onData=new Gi.Emitter,this._messageListener=n=>{n.data.arrayBuffer().then(i=>{this._onData.fire(new Uint8Array(i))},()=>{(0,Gi.RAL)().console.error("Converting blob to array buffer failed.")})},this.socket.addEventListener("message",this._messageListener)}onClose(e){return this.socket.addEventListener("close",e),Gi.Disposable.create(()=>this.socket.removeEventListener("close",e))}onError(e){return this.socket.addEventListener("error",e),Gi.Disposable.create(()=>this.socket.removeEventListener("error",e))}onEnd(e){return this.socket.addEventListener("end",e),Gi.Disposable.create(()=>this.socket.removeEventListener("end",e))}onData(e){return this._onData.event(e)}}class YT{constructor(e){this.socket=e}onClose(e){return this.socket.addEventListener("close",e),Gi.Disposable.create(()=>this.socket.removeEventListener("close",e))}onError(e){return this.socket.addEventListener("error",e),Gi.Disposable.create(()=>this.socket.removeEventListener("error",e))}onEnd(e){return this.socket.addEventListener("end",e),Gi.Disposable.create(()=>this.socket.removeEventListener("end",e))}write(e,n){if(typeof e=="string"){if(n!==void 0&&n!=="utf-8")throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${n}`);this.socket.send(e)}else this.socket.send(e);return Promise.resolve()}end(){this.socket.close()}}const GT=new TextEncoder,Vb=Object.freeze({messageBuffer:Object.freeze({create:t=>new ff(t)}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:(t,e)=>{if(e.charset!=="utf-8")throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${e.charset}`);return Promise.resolve(GT.encode(JSON.stringify(t,void 0,0)))}}),decoder:Object.freeze({name:"application/json",decode:(t,e)=>{if(!(t instanceof Uint8Array))throw new Error("In a Browser environments only Uint8Arrays are supported.");return Promise.resolve(JSON.parse(new TextDecoder(e.charset).decode(t)))}})}),stream:Object.freeze({asReadableStream:t=>new zT(t),asWritableStream:t=>new YT(t)}),console,timer:Object.freeze({setTimeout(t,e,...n){const r=setTimeout(t,e,...n);return{dispose:()=>clearTimeout(r)}},setImmediate(t,...e){const n=setTimeout(t,0,...e);return{dispose:()=>clearTimeout(n)}},setInterval(t,e,...n){const r=setInterval(t,e,...n);return{dispose:()=>clearInterval(r)}}})});function Xp(){return Vb}(function(t){function e(){Gi.RAL.install(Vb)}t.install=e})(Xp||(Xp={})),Wp.default=Xp,function(t){var e=Vt&&Vt.__createBinding||(Object.create?function(l,d,h,m){m===void 0&&(m=h);var E=Object.getOwnPropertyDescriptor(d,h);(!E||("get"in E?!d.__esModule:E.writable||E.configurable))&&(E={enumerable:!0,get:function(){return d[h]}}),Object.defineProperty(l,m,E)}:function(l,d,h,m){m===void 0&&(m=h),l[m]=d[h]}),n=Vt&&Vt.__exportStar||function(l,d){for(var h in l)h!=="default"&&!Object.prototype.hasOwnProperty.call(d,h)&&e(d,l,h)};Object.defineProperty(t,"__esModule",{value:!0}),t.createMessageConnection=t.BrowserMessageWriter=t.BrowserMessageReader=void 0,Wp.default.install();const i=of;n(of,t);class s extends i.AbstractMessageReader{constructor(d){super(),this._onData=new i.Emitter,this._messageListener=h=>{this._onData.fire(h.data)},d.addEventListener("error",h=>this.fireError(h)),d.onmessage=this._messageListener}listen(d){return this._onData.event(d)}}t.BrowserMessageReader=s;class a extends i.AbstractMessageWriter{constructor(d){super(),this.port=d,this.errorCount=0,d.addEventListener("error",h=>this.fireError(h))}write(d){try{return this.port.postMessage(d),Promise.resolve()}catch(h){return this.handleError(h,d),Promise.reject(h)}}handleError(d,h){this.errorCount++,this.fireError(d,h,this.errorCount)}end(){}}t.BrowserMessageWriter=a;function c(l,d,h,m){return h===void 0&&(h=i.NullLogger),i.ConnectionStrategy.is(m)&&(m={connectionStrategy:m}),(0,i.createMessageConnection)(l,d,h,m)}t.createMessageConnection=c}(Vo),function(t){t.exports=Vo}(qp);var Hb={},Zp;(function(t){function e(n){return typeof n=="string"}t.is=e})(Zp||(Zp={}));var df;(function(t){function e(n){return typeof n=="string"}t.is=e})(df||(df={}));var em;(function(t){t.MIN_VALUE=-2147483648,t.MAX_VALUE=2147483647;function e(n){return typeof n=="number"&&t.MIN_VALUE<=n&&n<=t.MAX_VALUE}t.is=e})(em||(em={}));var _c;(function(t){t.MIN_VALUE=0,t.MAX_VALUE=2147483647;function e(n){return typeof n=="number"&&t.MIN_VALUE<=n&&n<=t.MAX_VALUE}t.is=e})(_c||(_c={}));var Zn;(function(t){function e(r,i){return r===Number.MAX_VALUE&&(r=_c.MAX_VALUE),i===Number.MAX_VALUE&&(i=_c.MAX_VALUE),{line:r,character:i}}t.create=e;function n(r){let i=r;return ve.objectLiteral(i)&&ve.uinteger(i.line)&&ve.uinteger(i.character)}t.is=n})(Zn||(Zn={}));var ot;(function(t){function e(r,i,s,a){if(ve.uinteger(r)&&ve.uinteger(i)&&ve.uinteger(s)&&ve.uinteger(a))return{start:Zn.create(r,i),end:Zn.create(s,a)};if(Zn.is(r)&&Zn.is(i))return{start:r,end:i};throw new Error(`Range#create called with invalid arguments[${r}, ${i}, ${s}, ${a}]`)}t.create=e;function n(r){let i=r;return ve.objectLiteral(i)&&Zn.is(i.start)&&Zn.is(i.end)}t.is=n})(ot||(ot={}));var Ko;(function(t){function e(r,i){return{uri:r,range:i}}t.create=e;function n(r){let i=r;return ve.objectLiteral(i)&&ot.is(i.range)&&(ve.string(i.uri)||ve.undefined(i.uri))}t.is=n})(Ko||(Ko={}));var hf;(function(t){function e(r,i,s,a){return{targetUri:r,targetRange:i,targetSelectionRange:s,originSelectionRange:a}}t.create=e;function n(r){let i=r;return ve.objectLiteral(i)&&ot.is(i.targetRange)&&ve.string(i.targetUri)&&ot.is(i.targetSelectionRange)&&(ot.is(i.originSelectionRange)||ve.undefined(i.originSelectionRange))}t.is=n})(hf||(hf={}));var pf;(function(t){function e(r,i,s,a){return{red:r,green:i,blue:s,alpha:a}}t.create=e;function n(r){const i=r;return ve.objectLiteral(i)&&ve.numberRange(i.red,0,1)&&ve.numberRange(i.green,0,1)&&ve.numberRange(i.blue,0,1)&&ve.numberRange(i.alpha,0,1)}t.is=n})(pf||(pf={}));var tm;(function(t){function e(r,i){return{range:r,color:i}}t.create=e;function n(r){const i=r;return ve.objectLiteral(i)&&ot.is(i.range)&&pf.is(i.color)}t.is=n})(tm||(tm={}));var nm;(function(t){function e(r,i,s){return{label:r,textEdit:i,additionalTextEdits:s}}t.create=e;function n(r){const i=r;return ve.objectLiteral(i)&&ve.string(i.label)&&(ve.undefined(i.textEdit)||an.is(i))&&(ve.undefined(i.additionalTextEdits)||ve.typedArray(i.additionalTextEdits,an.is))}t.is=n})(nm||(nm={}));var rm;(function(t){t.Comment="comment",t.Imports="imports",t.Region="region"})(rm||(rm={}));var mf;(function(t){function e(r,i,s,a,c,l){const d={startLine:r,endLine:i};return ve.defined(s)&&(d.startCharacter=s),ve.defined(a)&&(d.endCharacter=a),ve.defined(c)&&(d.kind=c),ve.defined(l)&&(d.collapsedText=l),d}t.create=e;function n(r){const i=r;return ve.objectLiteral(i)&&ve.uinteger(i.startLine)&&ve.uinteger(i.startLine)&&(ve.undefined(i.startCharacter)||ve.uinteger(i.startCharacter))&&(ve.undefined(i.endCharacter)||ve.uinteger(i.endCharacter))&&(ve.undefined(i.kind)||ve.string(i.kind))}t.is=n})(mf||(mf={}));var gf;(function(t){function e(r,i){return{location:r,message:i}}t.create=e;function n(r){let i=r;return ve.defined(i)&&Ko.is(i.location)&&ve.string(i.message)}t.is=n})(gf||(gf={}));var Dt;(function(t){t.Error=1,t.Warning=2,t.Information=3,t.Hint=4})(Dt||(Dt={}));var yf;(function(t){t.Unnecessary=1,t.Deprecated=2})(yf||(yf={}));var im;(function(t){function e(n){const r=n;return ve.objectLiteral(r)&&ve.string(r.href)}t.is=e})(im||(im={}));var Nr;(function(t){function e(r,i,s,a,c,l){let d={range:r,message:i};return ve.defined(s)&&(d.severity=s),ve.defined(a)&&(d.code=a),ve.defined(c)&&(d.source=c),ve.defined(l)&&(d.relatedInformation=l),d}t.create=e;function n(r){var i;let s=r;return ve.defined(s)&&ot.is(s.range)&&ve.string(s.message)&&(ve.number(s.severity)||ve.undefined(s.severity))&&(ve.integer(s.code)||ve.string(s.code)||ve.undefined(s.code))&&(ve.undefined(s.codeDescription)||ve.string((i=s.codeDescription)===null||i===void 0?void 0:i.href))&&(ve.string(s.source)||ve.undefined(s.source))&&(ve.undefined(s.relatedInformation)||ve.typedArray(s.relatedInformation,gf.is))}t.is=n})(Nr||(Nr={}));var Xs;(function(t){function e(r,i,...s){let a={title:r,command:i};return ve.defined(s)&&s.length>0&&(a.arguments=s),a}t.create=e;function n(r){let i=r;return ve.defined(i)&&ve.string(i.title)&&ve.string(i.command)}t.is=n})(Xs||(Xs={}));var an;(function(t){function e(s,a){return{range:s,newText:a}}t.replace=e;function n(s,a){return{range:{start:s,end:s},newText:a}}t.insert=n;function r(s){return{range:s,newText:""}}t.del=r;function i(s){const a=s;return ve.objectLiteral(a)&&ve.string(a.newText)&&ot.is(a.range)}t.is=i})(an||(an={}));var zo;(function(t){function e(r,i,s){const a={label:r};return i!==void 0&&(a.needsConfirmation=i),s!==void 0&&(a.description=s),a}t.create=e;function n(r){const i=r;return ve.objectLiteral(i)&&ve.string(i.label)&&(ve.boolean(i.needsConfirmation)||i.needsConfirmation===void 0)&&(ve.string(i.description)||i.description===void 0)}t.is=n})(zo||(zo={}));var lr;(function(t){function e(n){const r=n;return ve.string(r)}t.is=e})(lr||(lr={}));var bs;(function(t){function e(s,a,c){return{range:s,newText:a,annotationId:c}}t.replace=e;function n(s,a,c){return{range:{start:s,end:s},newText:a,annotationId:c}}t.insert=n;function r(s,a){return{range:s,newText:"",annotationId:a}}t.del=r;function i(s){const a=s;return an.is(a)&&(zo.is(a.annotationId)||lr.is(a.annotationId))}t.is=i})(bs||(bs={}));var $c;(function(t){function e(r,i){return{textDocument:r,edits:i}}t.create=e;function n(r){let i=r;return ve.defined(i)&&Ec.is(i.textDocument)&&Array.isArray(i.edits)}t.is=n})($c||($c={}));var Ha;(function(t){function e(r,i,s){let a={kind:"create",uri:r};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(a.options=i),s!==void 0&&(a.annotationId=s),a}t.create=e;function n(r){let i=r;return i&&i.kind==="create"&&ve.string(i.uri)&&(i.options===void 0||(i.options.overwrite===void 0||ve.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||ve.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||lr.is(i.annotationId))}t.is=n})(Ha||(Ha={}));var Ka;(function(t){function e(r,i,s,a){let c={kind:"rename",oldUri:r,newUri:i};return s!==void 0&&(s.overwrite!==void 0||s.ignoreIfExists!==void 0)&&(c.options=s),a!==void 0&&(c.annotationId=a),c}t.create=e;function n(r){let i=r;return i&&i.kind==="rename"&&ve.string(i.oldUri)&&ve.string(i.newUri)&&(i.options===void 0||(i.options.overwrite===void 0||ve.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||ve.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||lr.is(i.annotationId))}t.is=n})(Ka||(Ka={}));var za;(function(t){function e(r,i,s){let a={kind:"delete",uri:r};return i!==void 0&&(i.recursive!==void 0||i.ignoreIfNotExists!==void 0)&&(a.options=i),s!==void 0&&(a.annotationId=s),a}t.create=e;function n(r){let i=r;return i&&i.kind==="delete"&&ve.string(i.uri)&&(i.options===void 0||(i.options.recursive===void 0||ve.boolean(i.options.recursive))&&(i.options.ignoreIfNotExists===void 0||ve.boolean(i.options.ignoreIfNotExists)))&&(i.annotationId===void 0||lr.is(i.annotationId))}t.is=n})(za||(za={}));var vf;(function(t){function e(n){let r=n;return r&&(r.changes!==void 0||r.documentChanges!==void 0)&&(r.documentChanges===void 0||r.documentChanges.every(i=>ve.string(i.kind)?Ha.is(i)||Ka.is(i)||za.is(i):$c.is(i)))}t.is=e})(vf||(vf={}));class bf{constructor(e,n){this.edits=e,this.changeAnnotations=n}insert(e,n,r){let i,s;if(r===void 0?i=an.insert(e,n):lr.is(r)?(s=r,i=bs.insert(e,n,r)):(this.assertChangeAnnotations(this.changeAnnotations),s=this.changeAnnotations.manage(r),i=bs.insert(e,n,s)),this.edits.push(i),s!==void 0)return s}replace(e,n,r){let i,s;if(r===void 0?i=an.replace(e,n):lr.is(r)?(s=r,i=bs.replace(e,n,r)):(this.assertChangeAnnotations(this.changeAnnotations),s=this.changeAnnotations.manage(r),i=bs.replace(e,n,s)),this.edits.push(i),s!==void 0)return s}delete(e,n){let r,i;if(n===void 0?r=an.del(e):lr.is(n)?(i=n,r=bs.del(e,n)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(n),r=bs.del(e,i)),this.edits.push(r),i!==void 0)return i}add(e){this.edits.push(e)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(e){if(e===void 0)throw new Error("Text edit change is not configured to manage change annotations.")}}class Kb{constructor(e){this._annotations=e===void 0?Object.create(null):e,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(e,n){let r;if(lr.is(e)?r=e:(r=this.nextId(),n=e),this._annotations[r]!==void 0)throw new Error(`Id ${r} is already in use.`);if(n===void 0)throw new Error(`No annotation provided for id ${r}`);return this._annotations[r]=n,this._size++,r}nextId(){return this._counter++,this._counter.toString()}}class JT{constructor(e){this._textEditChanges=Object.create(null),e!==void 0?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new Kb(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach(n=>{if($c.is(n)){const r=new bf(n.edits,this._changeAnnotations);this._textEditChanges[n.textDocument.uri]=r}})):e.changes&&Object.keys(e.changes).forEach(n=>{const r=new bf(e.changes[n]);this._textEditChanges[n]=r})):this._workspaceEdit={}}get edit(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(e){if(Ec.is(e)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");const n={uri:e.uri,version:e.version};let r=this._textEditChanges[n.uri];if(!r){const i=[],s={textDocument:n,edits:i};this._workspaceEdit.documentChanges.push(s),r=new bf(i,this._changeAnnotations),this._textEditChanges[n.uri]=r}return r}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");let n=this._textEditChanges[e];if(!n){let r=[];this._workspaceEdit.changes[e]=r,n=new bf(r),this._textEditChanges[e]=n}return n}}initDocumentChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new Kb,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))}createFile(e,n,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let i;zo.is(n)||lr.is(n)?i=n:r=n;let s,a;if(i===void 0?s=Ha.create(e,r):(a=lr.is(i)?i:this._changeAnnotations.manage(i),s=Ha.create(e,r,a)),this._workspaceEdit.documentChanges.push(s),a!==void 0)return a}renameFile(e,n,r,i){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let s;zo.is(r)||lr.is(r)?s=r:i=r;let a,c;if(s===void 0?a=Ka.create(e,n,i):(c=lr.is(s)?s:this._changeAnnotations.manage(s),a=Ka.create(e,n,i,c)),this._workspaceEdit.documentChanges.push(a),c!==void 0)return c}deleteFile(e,n,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let i;zo.is(n)||lr.is(n)?i=n:r=n;let s,a;if(i===void 0?s=za.create(e,r):(a=lr.is(i)?i:this._changeAnnotations.manage(i),s=za.create(e,r,a)),this._workspaceEdit.documentChanges.push(s),a!==void 0)return a}}var sm;(function(t){function e(r){return{uri:r}}t.create=e;function n(r){let i=r;return ve.defined(i)&&ve.string(i.uri)}t.is=n})(sm||(sm={}));var om;(function(t){function e(r,i){return{uri:r,version:i}}t.create=e;function n(r){let i=r;return ve.defined(i)&&ve.string(i.uri)&&ve.integer(i.version)}t.is=n})(om||(om={}));var Ec;(function(t){function e(r,i){return{uri:r,version:i}}t.create=e;function n(r){let i=r;return ve.defined(i)&&ve.string(i.uri)&&(i.version===null||ve.integer(i.version))}t.is=n})(Ec||(Ec={}));var am;(function(t){function e(r,i,s,a){return{uri:r,languageId:i,version:s,text:a}}t.create=e;function n(r){let i=r;return ve.defined(i)&&ve.string(i.uri)&&ve.string(i.languageId)&&ve.integer(i.version)&&ve.string(i.text)}t.is=n})(am||(am={}));var Ji;(function(t){t.PlainText="plaintext",t.Markdown="markdown";function e(n){const r=n;return r===t.PlainText||r===t.Markdown}t.is=e})(Ji||(Ji={}));var Ya;(function(t){function e(n){const r=n;return ve.objectLiteral(n)&&Ji.is(r.kind)&&ve.string(r.value)}t.is=e})(Ya||(Ya={}));var Fr;(function(t){t.Text=1,t.Method=2,t.Function=3,t.Constructor=4,t.Field=5,t.Variable=6,t.Class=7,t.Interface=8,t.Module=9,t.Property=10,t.Unit=11,t.Value=12,t.Enum=13,t.Keyword=14,t.Snippet=15,t.Color=16,t.File=17,t.Reference=18,t.Folder=19,t.EnumMember=20,t.Constant=21,t.Struct=22,t.Event=23,t.Operator=24,t.TypeParameter=25})(Fr||(Fr={}));var or;(function(t){t.PlainText=1,t.Snippet=2})(or||(or={}));var um;(function(t){t.Deprecated=1})(um||(um={}));var cm;(function(t){function e(r,i,s){return{newText:r,insert:i,replace:s}}t.create=e;function n(r){const i=r;return i&&ve.string(i.newText)&&ot.is(i.insert)&&ot.is(i.replace)}t.is=n})(cm||(cm={}));var Df;(function(t){t.asIs=1,t.adjustIndentation=2})(Df||(Df={}));var lm;(function(t){function e(n){const r=n;return r&&(ve.string(r.detail)||r.detail===void 0)&&(ve.string(r.description)||r.description===void 0)}t.is=e})(lm||(lm={}));var wf;(function(t){function e(n){return{label:n}}t.create=e})(wf||(wf={}));var _f;(function(t){function e(n,r){return{items:n||[],isIncomplete:!!r}}t.create=e})(_f||(_f={}));var Sc;(function(t){function e(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}t.fromPlainText=e;function n(r){const i=r;return ve.string(i)||ve.objectLiteral(i)&&ve.string(i.language)&&ve.string(i.value)}t.is=n})(Sc||(Sc={}));var fm;(function(t){function e(n){let r=n;return!!r&&ve.objectLiteral(r)&&(Ya.is(r.contents)||Sc.is(r.contents)||ve.typedArray(r.contents,Sc.is))&&(n.range===void 0||ot.is(n.range))}t.is=e})(fm||(fm={}));var dm;(function(t){function e(n,r){return r?{label:n,documentation:r}:{label:n}}t.create=e})(dm||(dm={}));var hm;(function(t){function e(n,r,...i){let s={label:n};return ve.defined(r)&&(s.documentation=r),ve.defined(i)?s.parameters=i:s.parameters=[],s}t.create=e})(hm||(hm={}));var pm;(function(t){t.Text=1,t.Read=2,t.Write=3})(pm||(pm={}));var mm;(function(t){function e(n,r){let i={range:n};return ve.number(r)&&(i.kind=r),i}t.create=e})(mm||(mm={}));var Ai;(function(t){t.File=1,t.Module=2,t.Namespace=3,t.Package=4,t.Class=5,t.Method=6,t.Property=7,t.Field=8,t.Constructor=9,t.Enum=10,t.Interface=11,t.Function=12,t.Variable=13,t.Constant=14,t.String=15,t.Number=16,t.Boolean=17,t.Array=18,t.Object=19,t.Key=20,t.Null=21,t.EnumMember=22,t.Struct=23,t.Event=24,t.Operator=25,t.TypeParameter=26})(Ai||(Ai={}));var gm;(function(t){t.Deprecated=1})(gm||(gm={}));var ym;(function(t){function e(n,r,i,s,a){let c={name:n,kind:r,location:{uri:s,range:i}};return a&&(c.containerName=a),c}t.create=e})(ym||(ym={}));var vm;(function(t){function e(n,r,i,s){return s!==void 0?{name:n,kind:r,location:{uri:i,range:s}}:{name:n,kind:r,location:{uri:i}}}t.create=e})(vm||(vm={}));var bm;(function(t){function e(r,i,s,a,c,l){let d={name:r,detail:i,kind:s,range:a,selectionRange:c};return l!==void 0&&(d.children=l),d}t.create=e;function n(r){let i=r;return i&&ve.string(i.name)&&ve.number(i.kind)&&ot.is(i.range)&&ot.is(i.selectionRange)&&(i.detail===void 0||ve.string(i.detail))&&(i.deprecated===void 0||ve.boolean(i.deprecated))&&(i.children===void 0||Array.isArray(i.children))&&(i.tags===void 0||Array.isArray(i.tags))}t.is=n})(bm||(bm={}));var Qi;(function(t){t.Empty="",t.QuickFix="quickfix",t.Refactor="refactor",t.RefactorExtract="refactor.extract",t.RefactorInline="refactor.inline",t.RefactorRewrite="refactor.rewrite",t.Source="source",t.SourceOrganizeImports="source.organizeImports",t.SourceFixAll="source.fixAll"})(Qi||(Qi={}));var kc;(function(t){t.Invoked=1,t.Automatic=2})(kc||(kc={}));var Dm;(function(t){function e(r,i,s){let a={diagnostics:r};return i!=null&&(a.only=i),s!=null&&(a.triggerKind=s),a}t.create=e;function n(r){let i=r;return ve.defined(i)&&ve.typedArray(i.diagnostics,Nr.is)&&(i.only===void 0||ve.typedArray(i.only,ve.string))&&(i.triggerKind===void 0||i.triggerKind===kc.Invoked||i.triggerKind===kc.Automatic)}t.is=n})(Dm||(Dm={}));var Ci;(function(t){function e(r,i,s){let a={title:r},c=!0;return typeof i=="string"?(c=!1,a.kind=i):Xs.is(i)?a.command=i:a.edit=i,c&&s!==void 0&&(a.kind=s),a}t.create=e;function n(r){let i=r;return i&&ve.string(i.title)&&(i.diagnostics===void 0||ve.typedArray(i.diagnostics,Nr.is))&&(i.kind===void 0||ve.string(i.kind))&&(i.edit!==void 0||i.command!==void 0)&&(i.command===void 0||Xs.is(i.command))&&(i.isPreferred===void 0||ve.boolean(i.isPreferred))&&(i.edit===void 0||vf.is(i.edit))}t.is=n})(Ci||(Ci={}));var $f;(function(t){function e(r,i){let s={range:r};return ve.defined(i)&&(s.data=i),s}t.create=e;function n(r){let i=r;return ve.defined(i)&&ot.is(i.range)&&(ve.undefined(i.command)||Xs.is(i.command))}t.is=n})($f||($f={}));var wm;(function(t){function e(r,i){return{tabSize:r,insertSpaces:i}}t.create=e;function n(r){let i=r;return ve.defined(i)&&ve.uinteger(i.tabSize)&&ve.boolean(i.insertSpaces)}t.is=n})(wm||(wm={}));var _m;(function(t){function e(r,i,s){return{range:r,target:i,data:s}}t.create=e;function n(r){let i=r;return ve.defined(i)&&ot.is(i.range)&&(ve.undefined(i.target)||ve.string(i.target))}t.is=n})(_m||(_m={}));var Tc;(function(t){function e(r,i){return{range:r,parent:i}}t.create=e;function n(r){let i=r;return ve.objectLiteral(i)&&ot.is(i.range)&&(i.parent===void 0||t.is(i.parent))}t.is=n})(Tc||(Tc={}));var $m;(function(t){t.namespace="namespace",t.type="type",t.class="class",t.enum="enum",t.interface="interface",t.struct="struct",t.typeParameter="typeParameter",t.parameter="parameter",t.variable="variable",t.property="property",t.enumMember="enumMember",t.event="event",t.function="function",t.method="method",t.macro="macro",t.keyword="keyword",t.modifier="modifier",t.comment="comment",t.string="string",t.number="number",t.regexp="regexp",t.operator="operator",t.decorator="decorator"})($m||($m={}));var Em;(function(t){t.declaration="declaration",t.definition="definition",t.readonly="readonly",t.static="static",t.deprecated="deprecated",t.abstract="abstract",t.async="async",t.modification="modification",t.documentation="documentation",t.defaultLibrary="defaultLibrary"})(Em||(Em={}));var Sm;(function(t){function e(n){const r=n;return ve.objectLiteral(r)&&(r.resultId===void 0||typeof r.resultId=="string")&&Array.isArray(r.data)&&(r.data.length===0||typeof r.data[0]=="number")}t.is=e})(Sm||(Sm={}));var km;(function(t){function e(r,i){return{range:r,text:i}}t.create=e;function n(r){const i=r;return i!=null&&ot.is(i.range)&&ve.string(i.text)}t.is=n})(km||(km={}));var Tm;(function(t){function e(r,i,s){return{range:r,variableName:i,caseSensitiveLookup:s}}t.create=e;function n(r){const i=r;return i!=null&&ot.is(i.range)&&ve.boolean(i.caseSensitiveLookup)&&(ve.string(i.variableName)||i.variableName===void 0)}t.is=n})(Tm||(Tm={}));var Am;(function(t){function e(r,i){return{range:r,expression:i}}t.create=e;function n(r){const i=r;return i!=null&&ot.is(i.range)&&(ve.string(i.expression)||i.expression===void 0)}t.is=n})(Am||(Am={}));var Cm;(function(t){function e(r,i){return{frameId:r,stoppedLocation:i}}t.create=e;function n(r){const i=r;return ve.defined(i)&&ot.is(r.stoppedLocation)}t.is=n})(Cm||(Cm={}));var Ef;(function(t){t.Type=1,t.Parameter=2;function e(n){return n===1||n===2}t.is=e})(Ef||(Ef={}));var Sf;(function(t){function e(r){return{value:r}}t.create=e;function n(r){const i=r;return ve.objectLiteral(i)&&(i.tooltip===void 0||ve.string(i.tooltip)||Ya.is(i.tooltip))&&(i.location===void 0||Ko.is(i.location))&&(i.command===void 0||Xs.is(i.command))}t.is=n})(Sf||(Sf={}));var Om;(function(t){function e(r,i,s){const a={position:r,label:i};return s!==void 0&&(a.kind=s),a}t.create=e;function n(r){const i=r;return ve.objectLiteral(i)&&Zn.is(i.position)&&(ve.string(i.label)||ve.typedArray(i.label,Sf.is))&&(i.kind===void 0||Ef.is(i.kind))&&i.textEdits===void 0||ve.typedArray(i.textEdits,an.is)&&(i.tooltip===void 0||ve.string(i.tooltip)||Ya.is(i.tooltip))&&(i.paddingLeft===void 0||ve.boolean(i.paddingLeft))&&(i.paddingRight===void 0||ve.boolean(i.paddingRight))}t.is=n})(Om||(Om={}));var Pm;(function(t){function e(n){return{kind:"snippet",value:n}}t.createSnippet=e})(Pm||(Pm={}));var Nm;(function(t){function e(n,r,i,s){return{insertText:n,filterText:r,range:i,command:s}}t.create=e})(Nm||(Nm={}));var Fm;(function(t){function e(n){return{items:n}}t.create=e})(Fm||(Fm={}));var Rm;(function(t){t.Invoked=0,t.Automatic=1})(Rm||(Rm={}));var Im;(function(t){function e(n,r){return{range:n,text:r}}t.create=e})(Im||(Im={}));var Mm;(function(t){function e(n,r){return{triggerKind:n,selectedCompletionInfo:r}}t.create=e})(Mm||(Mm={}));var Lm;(function(t){function e(n){const r=n;return ve.objectLiteral(r)&&df.is(r.uri)&&ve.string(r.name)}t.is=e})(Lm||(Lm={}));const QT=[` `,`\r -`,"\r"];var jm;(function(t){function e(s,a,c,l){return new Xk(s,a,c,l)}t.create=e;function n(s){let a=s;return!!(ve.defined(a)&&ve.string(a.uri)&&(ve.undefined(a.languageId)||ve.string(a.languageId))&&ve.uinteger(a.lineCount)&&ve.func(a.getText)&&ve.func(a.positionAt)&&ve.func(a.offsetAt))}t.is=n;function r(s,a){let c=s.getText(),l=i(a,(h,m)=>{let E=h.range.start.line-m.range.start.line;return E===0?h.range.start.character-m.range.start.character:E}),d=c.length;for(let h=l.length-1;h>=0;h--){let m=l[h],E=s.offsetAt(m.range.start),k=s.offsetAt(m.range.end);if(k<=d)c=c.substring(0,E)+m.newText+c.substring(k,c.length);else throw new Error("Overlapping edit");d=E}return c}t.applyEdits=r;function i(s,a){if(s.length<=1)return s;const c=s.length/2|0,l=s.slice(0,c),d=s.slice(c);i(l,a),i(d,a);let h=0,m=0,E=0;for(;h{let E=h.range.start.line-m.range.start.line;return E===0?h.range.start.character-m.range.start.character:E}),d=c.length;for(let h=l.length-1;h>=0;h--){let m=l[h],E=s.offsetAt(m.range.start),T=s.offsetAt(m.range.end);if(T<=d)c=c.substring(0,E)+m.newText+c.substring(T,c.length);else throw new Error("Overlapping edit");d=E}return c}t.applyEdits=r;function i(s,a){if(s.length<=1)return s;const c=s.length/2|0,l=s.slice(0,c),d=s.slice(c);i(l,a),i(d,a);let h=0,m=0,E=0;for(;h0&&e.push(n.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let n=this.getLineOffsets(),r=0,i=n.length;if(i===0)return Zn.create(0,e);for(;re?i=a:r=a+1}let s=r-1;return Zn.create(s,e-n[s])}offsetAt(e){let n=this.getLineOffsets();if(e.line>=n.length)return this._content.length;if(e.line<0)return 0;let r=n[e.line],i=e.line+1"u"}t.undefined=r;function i(k){return k===!0||k===!1}t.boolean=i;function s(k){return e.call(k)==="[object String]"}t.string=s;function a(k){return e.call(k)==="[object Number]"}t.number=a;function c(k,R,P){return e.call(k)==="[object Number]"&&R<=k&&k<=P}t.numberRange=c;function l(k){return e.call(k)==="[object Number]"&&-2147483648<=k&&k<=2147483647}t.integer=l;function d(k){return e.call(k)==="[object Number]"&&0<=k&&k<=2147483647}t.uinteger=d;function h(k){return e.call(k)==="[object Function]"}t.func=h;function m(k){return k!==null&&typeof k=="object"}t.objectLiteral=m;function E(k,R){return Array.isArray(k)&&k.every(R)}t.typedArray=E})(ve||(ve={}));var Zk=Object.freeze({__proto__:null,get DocumentUri(){return Zp},get URI(){return ff},get integer(){return em},get uinteger(){return _c},get Position(){return Zn},get Range(){return ot},get Location(){return Ko},get LocationLink(){return df},get Color(){return hf},get ColorInformation(){return tm},get ColorPresentation(){return nm},get FoldingRangeKind(){return rm},get FoldingRange(){return pf},get DiagnosticRelatedInformation(){return mf},get DiagnosticSeverity(){return Dt},get DiagnosticTag(){return gf},get CodeDescription(){return im},get Diagnostic(){return Nr},get Command(){return Xs},get TextEdit(){return an},get ChangeAnnotation(){return zo},get ChangeAnnotationIdentifier(){return lr},get AnnotatedTextEdit(){return bs},get TextDocumentEdit(){return $c},get CreateFile(){return Ha},get RenameFile(){return Ka},get DeleteFile(){return za},get WorkspaceEdit(){return yf},WorkspaceChange:Jk,get TextDocumentIdentifier(){return sm},get VersionedTextDocumentIdentifier(){return om},get OptionalVersionedTextDocumentIdentifier(){return Ec},get TextDocumentItem(){return am},get MarkupKind(){return Ji},get MarkupContent(){return Ya},get CompletionItemKind(){return Fr},get InsertTextFormat(){return or},get CompletionItemTag(){return um},get InsertReplaceEdit(){return cm},get InsertTextMode(){return bf},get CompletionItemLabelDetails(){return lm},get CompletionItem(){return Df},get CompletionList(){return wf},get MarkedString(){return Sc},get Hover(){return fm},get ParameterInformation(){return dm},get SignatureInformation(){return hm},get DocumentHighlightKind(){return pm},get DocumentHighlight(){return mm},get SymbolKind(){return Ai},get SymbolTag(){return gm},get SymbolInformation(){return ym},get WorkspaceSymbol(){return vm},get DocumentSymbol(){return bm},get CodeActionKind(){return Qi},get CodeActionTriggerKind(){return Tc},get CodeActionContext(){return Dm},get CodeAction(){return Ci},get CodeLens(){return _f},get FormattingOptions(){return wm},get DocumentLink(){return _m},get SelectionRange(){return kc},get SemanticTokenTypes(){return $m},get SemanticTokenModifiers(){return Em},get SemanticTokens(){return Sm},get InlineValueText(){return Tm},get InlineValueVariableLookup(){return km},get InlineValueEvaluatableExpression(){return Am},get InlineValueContext(){return Cm},get InlayHintKind(){return $f},get InlayHintLabelPart(){return Ef},get InlayHint(){return Om},get StringValue(){return Pm},get InlineCompletionItem(){return Nm},get InlineCompletionList(){return Fm},get InlineCompletionTriggerKind(){return Rm},get SelectedCompletionInfo(){return Im},get InlineCompletionContext(){return Mm},get WorkspaceFolder(){return Lm},EOL:Qk,get TextDocument(){return jm}}),xm=Uo(Zk),Rt={};Object.defineProperty(Rt,"__esModule",{value:!0}),Rt.ProtocolNotificationType=Rt.ProtocolNotificationType0=Rt.ProtocolRequestType=Rt.ProtocolRequestType0=Rt.RegistrationType=Rt.MessageDirection=void 0;const Ga=Vo;var zb;(function(t){t.clientToServer="clientToServer",t.serverToClient="serverToClient",t.both="both"})(zb||(Rt.MessageDirection=zb={}));class eA{constructor(e){this.method=e}}Rt.RegistrationType=eA;class tA extends Ga.RequestType0{constructor(e){super(e)}}Rt.ProtocolRequestType0=tA;class nA extends Ga.RequestType{constructor(e){super(e,Ga.ParameterStructures.byName)}}Rt.ProtocolRequestType=nA;class rA extends Ga.NotificationType0{constructor(e){super(e)}}Rt.ProtocolNotificationType0=rA;class iA extends Ga.NotificationType{constructor(e){super(e,Ga.ParameterStructures.byName)}}Rt.ProtocolNotificationType=iA;var Yb={},On={};Object.defineProperty(On,"__esModule",{value:!0}),On.objectLiteral=On.typedArray=On.stringArray=On.array=On.func=On.error=On.number=On.string=On.boolean=void 0;function sA(t){return t===!0||t===!1}On.boolean=sA;function Gb(t){return typeof t=="string"||t instanceof String}On.string=Gb;function oA(t){return typeof t=="number"||t instanceof Number}On.number=oA;function aA(t){return t instanceof Error}On.error=aA;function uA(t){return typeof t=="function"}On.func=uA;function Jb(t){return Array.isArray(t)}On.array=Jb;function cA(t){return Jb(t)&&t.every(e=>Gb(e))}On.stringArray=cA;function lA(t,e){return Array.isArray(t)&&t.every(e)}On.typedArray=lA;function fA(t){return t!==null&&typeof t=="object"}On.objectLiteral=fA;var Sf={};Object.defineProperty(Sf,"__esModule",{value:!0}),Sf.ImplementationRequest=void 0;const Qb=Rt;var Xb;(function(t){t.method="textDocument/implementation",t.messageDirection=Qb.MessageDirection.clientToServer,t.type=new Qb.ProtocolRequestType(t.method)})(Xb||(Sf.ImplementationRequest=Xb={}));var Tf={};Object.defineProperty(Tf,"__esModule",{value:!0}),Tf.TypeDefinitionRequest=void 0;const Zb=Rt;var eD;(function(t){t.method="textDocument/typeDefinition",t.messageDirection=Zb.MessageDirection.clientToServer,t.type=new Zb.ProtocolRequestType(t.method)})(eD||(Tf.TypeDefinitionRequest=eD={}));var Ja={};Object.defineProperty(Ja,"__esModule",{value:!0}),Ja.DidChangeWorkspaceFoldersNotification=Ja.WorkspaceFoldersRequest=void 0;const kf=Rt;var tD;(function(t){t.method="workspace/workspaceFolders",t.messageDirection=kf.MessageDirection.serverToClient,t.type=new kf.ProtocolRequestType0(t.method)})(tD||(Ja.WorkspaceFoldersRequest=tD={}));var nD;(function(t){t.method="workspace/didChangeWorkspaceFolders",t.messageDirection=kf.MessageDirection.clientToServer,t.type=new kf.ProtocolNotificationType(t.method)})(nD||(Ja.DidChangeWorkspaceFoldersNotification=nD={}));var Af={};Object.defineProperty(Af,"__esModule",{value:!0}),Af.ConfigurationRequest=void 0;const rD=Rt;var iD;(function(t){t.method="workspace/configuration",t.messageDirection=rD.MessageDirection.serverToClient,t.type=new rD.ProtocolRequestType(t.method)})(iD||(Af.ConfigurationRequest=iD={}));var Qa={};Object.defineProperty(Qa,"__esModule",{value:!0}),Qa.ColorPresentationRequest=Qa.DocumentColorRequest=void 0;const Cf=Rt;var sD;(function(t){t.method="textDocument/documentColor",t.messageDirection=Cf.MessageDirection.clientToServer,t.type=new Cf.ProtocolRequestType(t.method)})(sD||(Qa.DocumentColorRequest=sD={}));var oD;(function(t){t.method="textDocument/colorPresentation",t.messageDirection=Cf.MessageDirection.clientToServer,t.type=new Cf.ProtocolRequestType(t.method)})(oD||(Qa.ColorPresentationRequest=oD={}));var Xa={};Object.defineProperty(Xa,"__esModule",{value:!0}),Xa.FoldingRangeRefreshRequest=Xa.FoldingRangeRequest=void 0;const Of=Rt;var aD;(function(t){t.method="textDocument/foldingRange",t.messageDirection=Of.MessageDirection.clientToServer,t.type=new Of.ProtocolRequestType(t.method)})(aD||(Xa.FoldingRangeRequest=aD={}));var uD;(function(t){t.method="workspace/foldingRange/refresh",t.messageDirection=Of.MessageDirection.serverToClient,t.type=new Of.ProtocolRequestType0(t.method)})(uD||(Xa.FoldingRangeRefreshRequest=uD={}));var Pf={};Object.defineProperty(Pf,"__esModule",{value:!0}),Pf.DeclarationRequest=void 0;const cD=Rt;var lD;(function(t){t.method="textDocument/declaration",t.messageDirection=cD.MessageDirection.clientToServer,t.type=new cD.ProtocolRequestType(t.method)})(lD||(Pf.DeclarationRequest=lD={}));var Nf={};Object.defineProperty(Nf,"__esModule",{value:!0}),Nf.SelectionRangeRequest=void 0;const fD=Rt;var dD;(function(t){t.method="textDocument/selectionRange",t.messageDirection=fD.MessageDirection.clientToServer,t.type=new fD.ProtocolRequestType(t.method)})(dD||(Nf.SelectionRangeRequest=dD={}));var Zs={};Object.defineProperty(Zs,"__esModule",{value:!0}),Zs.WorkDoneProgressCancelNotification=Zs.WorkDoneProgressCreateRequest=Zs.WorkDoneProgress=void 0;const dA=Vo,Ff=Rt;var hD;(function(t){t.type=new dA.ProgressType;function e(n){return n===t.type}t.is=e})(hD||(Zs.WorkDoneProgress=hD={}));var pD;(function(t){t.method="window/workDoneProgress/create",t.messageDirection=Ff.MessageDirection.serverToClient,t.type=new Ff.ProtocolRequestType(t.method)})(pD||(Zs.WorkDoneProgressCreateRequest=pD={}));var mD;(function(t){t.method="window/workDoneProgress/cancel",t.messageDirection=Ff.MessageDirection.clientToServer,t.type=new Ff.ProtocolNotificationType(t.method)})(mD||(Zs.WorkDoneProgressCancelNotification=mD={}));var eo={};Object.defineProperty(eo,"__esModule",{value:!0}),eo.CallHierarchyOutgoingCallsRequest=eo.CallHierarchyIncomingCallsRequest=eo.CallHierarchyPrepareRequest=void 0;const Za=Rt;var gD;(function(t){t.method="textDocument/prepareCallHierarchy",t.messageDirection=Za.MessageDirection.clientToServer,t.type=new Za.ProtocolRequestType(t.method)})(gD||(eo.CallHierarchyPrepareRequest=gD={}));var yD;(function(t){t.method="callHierarchy/incomingCalls",t.messageDirection=Za.MessageDirection.clientToServer,t.type=new Za.ProtocolRequestType(t.method)})(yD||(eo.CallHierarchyIncomingCallsRequest=yD={}));var vD;(function(t){t.method="callHierarchy/outgoingCalls",t.messageDirection=Za.MessageDirection.clientToServer,t.type=new Za.ProtocolRequestType(t.method)})(vD||(eo.CallHierarchyOutgoingCallsRequest=vD={}));var Rr={};Object.defineProperty(Rr,"__esModule",{value:!0}),Rr.SemanticTokensRefreshRequest=Rr.SemanticTokensRangeRequest=Rr.SemanticTokensDeltaRequest=Rr.SemanticTokensRequest=Rr.SemanticTokensRegistrationType=Rr.TokenFormat=void 0;const Ds=Rt;var bD;(function(t){t.Relative="relative"})(bD||(Rr.TokenFormat=bD={}));var Ac;(function(t){t.method="textDocument/semanticTokens",t.type=new Ds.RegistrationType(t.method)})(Ac||(Rr.SemanticTokensRegistrationType=Ac={}));var DD;(function(t){t.method="textDocument/semanticTokens/full",t.messageDirection=Ds.MessageDirection.clientToServer,t.type=new Ds.ProtocolRequestType(t.method),t.registrationMethod=Ac.method})(DD||(Rr.SemanticTokensRequest=DD={}));var wD;(function(t){t.method="textDocument/semanticTokens/full/delta",t.messageDirection=Ds.MessageDirection.clientToServer,t.type=new Ds.ProtocolRequestType(t.method),t.registrationMethod=Ac.method})(wD||(Rr.SemanticTokensDeltaRequest=wD={}));var _D;(function(t){t.method="textDocument/semanticTokens/range",t.messageDirection=Ds.MessageDirection.clientToServer,t.type=new Ds.ProtocolRequestType(t.method),t.registrationMethod=Ac.method})(_D||(Rr.SemanticTokensRangeRequest=_D={}));var $D;(function(t){t.method="workspace/semanticTokens/refresh",t.messageDirection=Ds.MessageDirection.serverToClient,t.type=new Ds.ProtocolRequestType0(t.method)})($D||(Rr.SemanticTokensRefreshRequest=$D={}));var Rf={};Object.defineProperty(Rf,"__esModule",{value:!0}),Rf.ShowDocumentRequest=void 0;const ED=Rt;var SD;(function(t){t.method="window/showDocument",t.messageDirection=ED.MessageDirection.serverToClient,t.type=new ED.ProtocolRequestType(t.method)})(SD||(Rf.ShowDocumentRequest=SD={}));var If={};Object.defineProperty(If,"__esModule",{value:!0}),If.LinkedEditingRangeRequest=void 0;const TD=Rt;var kD;(function(t){t.method="textDocument/linkedEditingRange",t.messageDirection=TD.MessageDirection.clientToServer,t.type=new TD.ProtocolRequestType(t.method)})(kD||(If.LinkedEditingRangeRequest=kD={}));var yr={};Object.defineProperty(yr,"__esModule",{value:!0}),yr.WillDeleteFilesRequest=yr.DidDeleteFilesNotification=yr.DidRenameFilesNotification=yr.WillRenameFilesRequest=yr.DidCreateFilesNotification=yr.WillCreateFilesRequest=yr.FileOperationPatternKind=void 0;const oi=Rt;var AD;(function(t){t.file="file",t.folder="folder"})(AD||(yr.FileOperationPatternKind=AD={}));var CD;(function(t){t.method="workspace/willCreateFiles",t.messageDirection=oi.MessageDirection.clientToServer,t.type=new oi.ProtocolRequestType(t.method)})(CD||(yr.WillCreateFilesRequest=CD={}));var OD;(function(t){t.method="workspace/didCreateFiles",t.messageDirection=oi.MessageDirection.clientToServer,t.type=new oi.ProtocolNotificationType(t.method)})(OD||(yr.DidCreateFilesNotification=OD={}));var PD;(function(t){t.method="workspace/willRenameFiles",t.messageDirection=oi.MessageDirection.clientToServer,t.type=new oi.ProtocolRequestType(t.method)})(PD||(yr.WillRenameFilesRequest=PD={}));var ND;(function(t){t.method="workspace/didRenameFiles",t.messageDirection=oi.MessageDirection.clientToServer,t.type=new oi.ProtocolNotificationType(t.method)})(ND||(yr.DidRenameFilesNotification=ND={}));var FD;(function(t){t.method="workspace/didDeleteFiles",t.messageDirection=oi.MessageDirection.clientToServer,t.type=new oi.ProtocolNotificationType(t.method)})(FD||(yr.DidDeleteFilesNotification=FD={}));var RD;(function(t){t.method="workspace/willDeleteFiles",t.messageDirection=oi.MessageDirection.clientToServer,t.type=new oi.ProtocolRequestType(t.method)})(RD||(yr.WillDeleteFilesRequest=RD={}));var to={};Object.defineProperty(to,"__esModule",{value:!0}),to.MonikerRequest=to.MonikerKind=to.UniquenessLevel=void 0;const ID=Rt;var MD;(function(t){t.document="document",t.project="project",t.group="group",t.scheme="scheme",t.global="global"})(MD||(to.UniquenessLevel=MD={}));var LD;(function(t){t.$import="import",t.$export="export",t.local="local"})(LD||(to.MonikerKind=LD={}));var jD;(function(t){t.method="textDocument/moniker",t.messageDirection=ID.MessageDirection.clientToServer,t.type=new ID.ProtocolRequestType(t.method)})(jD||(to.MonikerRequest=jD={}));var no={};Object.defineProperty(no,"__esModule",{value:!0}),no.TypeHierarchySubtypesRequest=no.TypeHierarchySupertypesRequest=no.TypeHierarchyPrepareRequest=void 0;const eu=Rt;var xD;(function(t){t.method="textDocument/prepareTypeHierarchy",t.messageDirection=eu.MessageDirection.clientToServer,t.type=new eu.ProtocolRequestType(t.method)})(xD||(no.TypeHierarchyPrepareRequest=xD={}));var BD;(function(t){t.method="typeHierarchy/supertypes",t.messageDirection=eu.MessageDirection.clientToServer,t.type=new eu.ProtocolRequestType(t.method)})(BD||(no.TypeHierarchySupertypesRequest=BD={}));var qD;(function(t){t.method="typeHierarchy/subtypes",t.messageDirection=eu.MessageDirection.clientToServer,t.type=new eu.ProtocolRequestType(t.method)})(qD||(no.TypeHierarchySubtypesRequest=qD={}));var tu={};Object.defineProperty(tu,"__esModule",{value:!0}),tu.InlineValueRefreshRequest=tu.InlineValueRequest=void 0;const Mf=Rt;var WD;(function(t){t.method="textDocument/inlineValue",t.messageDirection=Mf.MessageDirection.clientToServer,t.type=new Mf.ProtocolRequestType(t.method)})(WD||(tu.InlineValueRequest=WD={}));var UD;(function(t){t.method="workspace/inlineValue/refresh",t.messageDirection=Mf.MessageDirection.serverToClient,t.type=new Mf.ProtocolRequestType0(t.method)})(UD||(tu.InlineValueRefreshRequest=UD={}));var ro={};Object.defineProperty(ro,"__esModule",{value:!0}),ro.InlayHintRefreshRequest=ro.InlayHintResolveRequest=ro.InlayHintRequest=void 0;const nu=Rt;var VD;(function(t){t.method="textDocument/inlayHint",t.messageDirection=nu.MessageDirection.clientToServer,t.type=new nu.ProtocolRequestType(t.method)})(VD||(ro.InlayHintRequest=VD={}));var HD;(function(t){t.method="inlayHint/resolve",t.messageDirection=nu.MessageDirection.clientToServer,t.type=new nu.ProtocolRequestType(t.method)})(HD||(ro.InlayHintResolveRequest=HD={}));var KD;(function(t){t.method="workspace/inlayHint/refresh",t.messageDirection=nu.MessageDirection.serverToClient,t.type=new nu.ProtocolRequestType0(t.method)})(KD||(ro.InlayHintRefreshRequest=KD={}));var ai={};Object.defineProperty(ai,"__esModule",{value:!0}),ai.DiagnosticRefreshRequest=ai.WorkspaceDiagnosticRequest=ai.DocumentDiagnosticRequest=ai.DocumentDiagnosticReportKind=ai.DiagnosticServerCancellationData=void 0;const zD=Vo,hA=On,ru=Rt;var YD;(function(t){function e(n){const r=n;return r&&hA.boolean(r.retriggerRequest)}t.is=e})(YD||(ai.DiagnosticServerCancellationData=YD={}));var GD;(function(t){t.Full="full",t.Unchanged="unchanged"})(GD||(ai.DocumentDiagnosticReportKind=GD={}));var JD;(function(t){t.method="textDocument/diagnostic",t.messageDirection=ru.MessageDirection.clientToServer,t.type=new ru.ProtocolRequestType(t.method),t.partialResult=new zD.ProgressType})(JD||(ai.DocumentDiagnosticRequest=JD={}));var QD;(function(t){t.method="workspace/diagnostic",t.messageDirection=ru.MessageDirection.clientToServer,t.type=new ru.ProtocolRequestType(t.method),t.partialResult=new zD.ProgressType})(QD||(ai.WorkspaceDiagnosticRequest=QD={}));var XD;(function(t){t.method="workspace/diagnostic/refresh",t.messageDirection=ru.MessageDirection.serverToClient,t.type=new ru.ProtocolRequestType0(t.method)})(XD||(ai.DiagnosticRefreshRequest=XD={}));var Pn={};Object.defineProperty(Pn,"__esModule",{value:!0}),Pn.DidCloseNotebookDocumentNotification=Pn.DidSaveNotebookDocumentNotification=Pn.DidChangeNotebookDocumentNotification=Pn.NotebookCellArrayChange=Pn.DidOpenNotebookDocumentNotification=Pn.NotebookDocumentSyncRegistrationType=Pn.NotebookDocument=Pn.NotebookCell=Pn.ExecutionSummary=Pn.NotebookCellKind=void 0;const Cc=xm,Oi=On,Xi=Rt;var Bm;(function(t){t.Markup=1,t.Code=2;function e(n){return n===1||n===2}t.is=e})(Bm||(Pn.NotebookCellKind=Bm={}));var qm;(function(t){function e(i,s){const a={executionOrder:i};return(s===!0||s===!1)&&(a.success=s),a}t.create=e;function n(i){const s=i;return Oi.objectLiteral(s)&&Cc.uinteger.is(s.executionOrder)&&(s.success===void 0||Oi.boolean(s.success))}t.is=n;function r(i,s){return i===s?!0:i==null||s===null||s===void 0?!1:i.executionOrder===s.executionOrder&&i.success===s.success}t.equals=r})(qm||(Pn.ExecutionSummary=qm={}));var Lf;(function(t){function e(s,a){return{kind:s,document:a}}t.create=e;function n(s){const a=s;return Oi.objectLiteral(a)&&Bm.is(a.kind)&&Cc.DocumentUri.is(a.document)&&(a.metadata===void 0||Oi.objectLiteral(a.metadata))}t.is=n;function r(s,a){const c=new Set;return s.document!==a.document&&c.add("document"),s.kind!==a.kind&&c.add("kind"),s.executionSummary!==a.executionSummary&&c.add("executionSummary"),(s.metadata!==void 0||a.metadata!==void 0)&&!i(s.metadata,a.metadata)&&c.add("metadata"),(s.executionSummary!==void 0||a.executionSummary!==void 0)&&!qm.equals(s.executionSummary,a.executionSummary)&&c.add("executionSummary"),c}t.diff=r;function i(s,a){if(s===a)return!0;if(s==null||a===null||a===void 0||typeof s!=typeof a||typeof s!="object")return!1;const c=Array.isArray(s),l=Array.isArray(a);if(c!==l)return!1;if(c&&l){if(s.length!==a.length)return!1;for(let d=0;d0}Q.hasId=vn})(Be||(t.StaticRegistrationOptions=Be={}));var nt;(function(Q){function vn(bn){const it=bn;return it&&(it.documentSelector===null||Y.is(it.documentSelector))}Q.is=vn})(nt||(t.TextDocumentRegistrationOptions=nt={}));var Se;(function(Q){function vn(it){const se=it;return r.objectLiteral(se)&&(se.workDoneProgress===void 0||r.boolean(se.workDoneProgress))}Q.is=vn;function bn(it){const se=it;return se&&r.boolean(se.workDoneProgress)}Q.hasWorkDoneProgress=bn})(Se||(t.WorkDoneProgressOptions=Se={}));var H;(function(Q){Q.method="initialize",Q.messageDirection=e.MessageDirection.clientToServer,Q.type=new e.ProtocolRequestType(Q.method)})(H||(t.InitializeRequest=H={}));var fe;(function(Q){Q.unknownProtocolVersion=1})(fe||(t.InitializeErrorCodes=fe={}));var ae;(function(Q){Q.method="initialized",Q.messageDirection=e.MessageDirection.clientToServer,Q.type=new e.ProtocolNotificationType(Q.method)})(ae||(t.InitializedNotification=ae={}));var U;(function(Q){Q.method="shutdown",Q.messageDirection=e.MessageDirection.clientToServer,Q.type=new e.ProtocolRequestType0(Q.method)})(U||(t.ShutdownRequest=U={}));var Z;(function(Q){Q.method="exit",Q.messageDirection=e.MessageDirection.clientToServer,Q.type=new e.ProtocolNotificationType0(Q.method)})(Z||(t.ExitNotification=Z={}));var pe;(function(Q){Q.method="workspace/didChangeConfiguration",Q.messageDirection=e.MessageDirection.clientToServer,Q.type=new e.ProtocolNotificationType(Q.method)})(pe||(t.DidChangeConfigurationNotification=pe={}));var Me;(function(Q){Q.Error=1,Q.Warning=2,Q.Info=3,Q.Log=4,Q.Debug=5})(Me||(t.MessageType=Me={}));var Ie;(function(Q){Q.method="window/showMessage",Q.messageDirection=e.MessageDirection.serverToClient,Q.type=new e.ProtocolNotificationType(Q.method)})(Ie||(t.ShowMessageNotification=Ie={}));var qe;(function(Q){Q.method="window/showMessageRequest",Q.messageDirection=e.MessageDirection.serverToClient,Q.type=new e.ProtocolRequestType(Q.method)})(qe||(t.ShowMessageRequest=qe={}));var ze;(function(Q){Q.method="window/logMessage",Q.messageDirection=e.MessageDirection.serverToClient,Q.type=new e.ProtocolNotificationType(Q.method)})(ze||(t.LogMessageNotification=ze={}));var Ge;(function(Q){Q.method="telemetry/event",Q.messageDirection=e.MessageDirection.serverToClient,Q.type=new e.ProtocolNotificationType(Q.method)})(Ge||(t.TelemetryEventNotification=Ge={}));var rt;(function(Q){Q.None=0,Q.Full=1,Q.Incremental=2})(rt||(t.TextDocumentSyncKind=rt={}));var _n;(function(Q){Q.method="textDocument/didOpen",Q.messageDirection=e.MessageDirection.clientToServer,Q.type=new e.ProtocolNotificationType(Q.method)})(_n||(t.DidOpenTextDocumentNotification=_n={}));var at;(function(Q){function vn(it){let se=it;return se!=null&&typeof se.text=="string"&&se.range!==void 0&&(se.rangeLength===void 0||typeof se.rangeLength=="number")}Q.isIncremental=vn;function bn(it){let se=it;return se!=null&&typeof se.text=="string"&&se.range===void 0&&se.rangeLength===void 0}Q.isFull=bn})(at||(t.TextDocumentContentChangeEvent=at={}));var un;(function(Q){Q.method="textDocument/didChange",Q.messageDirection=e.MessageDirection.clientToServer,Q.type=new e.ProtocolNotificationType(Q.method)})(un||(t.DidChangeTextDocumentNotification=un={}));var Sn;(function(Q){Q.method="textDocument/didClose",Q.messageDirection=e.MessageDirection.clientToServer,Q.type=new e.ProtocolNotificationType(Q.method)})(Sn||(t.DidCloseTextDocumentNotification=Sn={}));var Mt;(function(Q){Q.method="textDocument/didSave",Q.messageDirection=e.MessageDirection.clientToServer,Q.type=new e.ProtocolNotificationType(Q.method)})(Mt||(t.DidSaveTextDocumentNotification=Mt={}));var Tn;(function(Q){Q.Manual=1,Q.AfterDelay=2,Q.FocusOut=3})(Tn||(t.TextDocumentSaveReason=Tn={}));var ur;(function(Q){Q.method="textDocument/willSave",Q.messageDirection=e.MessageDirection.clientToServer,Q.type=new e.ProtocolNotificationType(Q.method)})(ur||(t.WillSaveTextDocumentNotification=ur={}));var kn;(function(Q){Q.method="textDocument/willSaveWaitUntil",Q.messageDirection=e.MessageDirection.clientToServer,Q.type=new e.ProtocolRequestType(Q.method)})(kn||(t.WillSaveTextDocumentWaitUntilRequest=kn={}));var Lt;(function(Q){Q.method="workspace/didChangeWatchedFiles",Q.messageDirection=e.MessageDirection.clientToServer,Q.type=new e.ProtocolNotificationType(Q.method)})(Lt||(t.DidChangeWatchedFilesNotification=Lt={}));var Vn;(function(Q){Q.Created=1,Q.Changed=2,Q.Deleted=3})(Vn||(t.FileChangeType=Vn={}));var Xn;(function(Q){function vn(bn){const it=bn;return r.objectLiteral(it)&&(n.URI.is(it.baseUri)||n.WorkspaceFolder.is(it.baseUri))&&r.string(it.pattern)}Q.is=vn})(Xn||(t.RelativePattern=Xn={}));var Rn;(function(Q){Q.Create=1,Q.Change=2,Q.Delete=4})(Rn||(t.WatchKind=Rn={}));var qt;(function(Q){Q.method="textDocument/publishDiagnostics",Q.messageDirection=e.MessageDirection.serverToClient,Q.type=new e.ProtocolNotificationType(Q.method)})(qt||(t.PublishDiagnosticsNotification=qt={}));var X;(function(Q){Q.Invoked=1,Q.TriggerCharacter=2,Q.TriggerForIncompleteCompletions=3})(X||(t.CompletionTriggerKind=X={}));var V;(function(Q){Q.method="textDocument/completion",Q.messageDirection=e.MessageDirection.clientToServer,Q.type=new e.ProtocolRequestType(Q.method)})(V||(t.CompletionRequest=V={}));var ee;(function(Q){Q.method="completionItem/resolve",Q.messageDirection=e.MessageDirection.clientToServer,Q.type=new e.ProtocolRequestType(Q.method)})(ee||(t.CompletionResolveRequest=ee={}));var ie;(function(Q){Q.method="textDocument/hover",Q.messageDirection=e.MessageDirection.clientToServer,Q.type=new e.ProtocolRequestType(Q.method)})(ie||(t.HoverRequest=ie={}));var C;(function(Q){Q.Invoked=1,Q.TriggerCharacter=2,Q.ContentChange=3})(C||(t.SignatureHelpTriggerKind=C={}));var g;(function(Q){Q.method="textDocument/signatureHelp",Q.messageDirection=e.MessageDirection.clientToServer,Q.type=new e.ProtocolRequestType(Q.method)})(g||(t.SignatureHelpRequest=g={}));var w;(function(Q){Q.method="textDocument/definition",Q.messageDirection=e.MessageDirection.clientToServer,Q.type=new e.ProtocolRequestType(Q.method)})(w||(t.DefinitionRequest=w={}));var j;(function(Q){Q.method="textDocument/references",Q.messageDirection=e.MessageDirection.clientToServer,Q.type=new e.ProtocolRequestType(Q.method)})(j||(t.ReferencesRequest=j={}));var J;(function(Q){Q.method="textDocument/documentHighlight",Q.messageDirection=e.MessageDirection.clientToServer,Q.type=new e.ProtocolRequestType(Q.method)})(J||(t.DocumentHighlightRequest=J={}));var re;(function(Q){Q.method="textDocument/documentSymbol",Q.messageDirection=e.MessageDirection.clientToServer,Q.type=new e.ProtocolRequestType(Q.method)})(re||(t.DocumentSymbolRequest=re={}));var ce;(function(Q){Q.method="textDocument/codeAction",Q.messageDirection=e.MessageDirection.clientToServer,Q.type=new e.ProtocolRequestType(Q.method)})(ce||(t.CodeActionRequest=ce={}));var Ne;(function(Q){Q.method="codeAction/resolve",Q.messageDirection=e.MessageDirection.clientToServer,Q.type=new e.ProtocolRequestType(Q.method)})(Ne||(t.CodeActionResolveRequest=Ne={}));var Je;(function(Q){Q.method="workspace/symbol",Q.messageDirection=e.MessageDirection.clientToServer,Q.type=new e.ProtocolRequestType(Q.method)})(Je||(t.WorkspaceSymbolRequest=Je={}));var He;(function(Q){Q.method="workspaceSymbol/resolve",Q.messageDirection=e.MessageDirection.clientToServer,Q.type=new e.ProtocolRequestType(Q.method)})(He||(t.WorkspaceSymbolResolveRequest=He={}));var Xe;(function(Q){Q.method="textDocument/codeLens",Q.messageDirection=e.MessageDirection.clientToServer,Q.type=new e.ProtocolRequestType(Q.method)})(Xe||(t.CodeLensRequest=Xe={}));var je;(function(Q){Q.method="codeLens/resolve",Q.messageDirection=e.MessageDirection.clientToServer,Q.type=new e.ProtocolRequestType(Q.method)})(je||(t.CodeLensResolveRequest=je={}));var gt;(function(Q){Q.method="workspace/codeLens/refresh",Q.messageDirection=e.MessageDirection.serverToClient,Q.type=new e.ProtocolRequestType0(Q.method)})(gt||(t.CodeLensRefreshRequest=gt={}));var cn;(function(Q){Q.method="textDocument/documentLink",Q.messageDirection=e.MessageDirection.clientToServer,Q.type=new e.ProtocolRequestType(Q.method)})(cn||(t.DocumentLinkRequest=cn={}));var ht;(function(Q){Q.method="documentLink/resolve",Q.messageDirection=e.MessageDirection.clientToServer,Q.type=new e.ProtocolRequestType(Q.method)})(ht||(t.DocumentLinkResolveRequest=ht={}));var Wt;(function(Q){Q.method="textDocument/formatting",Q.messageDirection=e.MessageDirection.clientToServer,Q.type=new e.ProtocolRequestType(Q.method)})(Wt||(t.DocumentFormattingRequest=Wt={}));var wt;(function(Q){Q.method="textDocument/rangeFormatting",Q.messageDirection=e.MessageDirection.clientToServer,Q.type=new e.ProtocolRequestType(Q.method)})(wt||(t.DocumentRangeFormattingRequest=wt={}));var $n;(function(Q){Q.method="textDocument/rangesFormatting",Q.messageDirection=e.MessageDirection.clientToServer,Q.type=new e.ProtocolRequestType(Q.method)})($n||(t.DocumentRangesFormattingRequest=$n={}));var An;(function(Q){Q.method="textDocument/onTypeFormatting",Q.messageDirection=e.MessageDirection.clientToServer,Q.type=new e.ProtocolRequestType(Q.method)})(An||(t.DocumentOnTypeFormattingRequest=An={}));var bi;(function(Q){Q.Identifier=1})(bi||(t.PrepareSupportDefaultBehavior=bi={}));var Eo;(function(Q){Q.method="textDocument/rename",Q.messageDirection=e.MessageDirection.clientToServer,Q.type=new e.ProtocolRequestType(Q.method)})(Eo||(t.RenameRequest=Eo={}));var fn;(function(Q){Q.method="textDocument/prepareRename",Q.messageDirection=e.MessageDirection.clientToServer,Q.type=new e.ProtocolRequestType(Q.method)})(fn||(t.PrepareRenameRequest=fn={}));var Di;(function(Q){Q.method="workspace/executeCommand",Q.messageDirection=e.MessageDirection.clientToServer,Q.type=new e.ProtocolRequestType(Q.method)})(Di||(t.ExecuteCommandRequest=Di={}));var xi;(function(Q){Q.method="workspace/applyEdit",Q.messageDirection=e.MessageDirection.serverToClient,Q.type=new e.ProtocolRequestType("workspace/applyEdit")})(xi||(t.ApplyWorkspaceEditRequest=xi={}))}(Yb);var xf={};Object.defineProperty(xf,"__esModule",{value:!0}),xf.createProtocolConnection=void 0;const a1=Vo;function pA(t,e,n,r){return a1.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),(0,a1.createMessageConnection)(t,e,n,r)}xf.createProtocolConnection=pA,function(t){var e=Vt&&Vt.__createBinding||(Object.create?function(s,a,c,l){l===void 0&&(l=c);var d=Object.getOwnPropertyDescriptor(a,c);(!d||("get"in d?!a.__esModule:d.writable||d.configurable))&&(d={enumerable:!0,get:function(){return a[c]}}),Object.defineProperty(s,l,d)}:function(s,a,c,l){l===void 0&&(l=c),s[l]=a[c]}),n=Vt&&Vt.__exportStar||function(s,a){for(var c in s)c!=="default"&&!Object.prototype.hasOwnProperty.call(a,c)&&e(a,s,c)};Object.defineProperty(t,"__esModule",{value:!0}),t.LSPErrorCodes=t.createProtocolConnection=void 0,n(Vo,t),n(xm,t),n(Rt,t),n(Yb,t);var r=xf;Object.defineProperty(t,"createProtocolConnection",{enumerable:!0,get:function(){return r.createProtocolConnection}});var i;(function(s){s.lspReservedErrorRangeStart=-32899,s.RequestFailed=-32803,s.ServerCancelled=-32802,s.ContentModified=-32801,s.RequestCancelled=-32800,s.lspReservedErrorRangeEnd=-32800})(i||(t.LSPErrorCodes=i={}))}(Hb),function(t){var e=Vt&&Vt.__createBinding||(Object.create?function(s,a,c,l){l===void 0&&(l=c);var d=Object.getOwnPropertyDescriptor(a,c);(!d||("get"in d?!a.__esModule:d.writable||d.configurable))&&(d={enumerable:!0,get:function(){return a[c]}}),Object.defineProperty(s,l,d)}:function(s,a,c,l){l===void 0&&(l=c),s[l]=a[c]}),n=Vt&&Vt.__exportStar||function(s,a){for(var c in s)c!=="default"&&!Object.prototype.hasOwnProperty.call(a,c)&&e(a,s,c)};Object.defineProperty(t,"__esModule",{value:!0}),t.createProtocolConnection=void 0;const r=qp.exports;n(qp.exports,t),n(Hb,t);function i(s,a,c,l){return(0,r.createMessageConnection)(s,a,c,l)}t.createProtocolConnection=i}(Ln),function(t){t.exports=Ln}(si);function mA(t,e=!1){const n=t.length;let r=0,i="",s=0,a=16,c=0,l=0,d=0,h=0,m=0;function E(y,D){let v=0,_=0;for(;v=48&&$<=57)_=_*16+$-48;else if($>=65&&$<=70)_=_*16+$-65+10;else if($>=97&&$<=102)_=_*16+$-97+10;else break;r++,v++}return v=n){y+=t.substring(D,r),m=2;break}const v=t.charCodeAt(r);if(v===34){y+=t.substring(D,r),r++;break}if(v===92){if(y+=t.substring(D,r),r++,r>=n){m=2;break}switch(t.charCodeAt(r++)){case 34:y+='"';break;case 92:y+="\\";break;case 47:y+="/";break;case 98:y+="\b";break;case 102:y+="\f";break;case 110:y+=` +`&&i++}r&&n.length>0&&e.push(n.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let n=this.getLineOffsets(),r=0,i=n.length;if(i===0)return Zn.create(0,e);for(;re?i=a:r=a+1}let s=r-1;return Zn.create(s,e-n[s])}offsetAt(e){let n=this.getLineOffsets();if(e.line>=n.length)return this._content.length;if(e.line<0)return 0;let r=n[e.line],i=e.line+1"u"}t.undefined=r;function i(T){return T===!0||T===!1}t.boolean=i;function s(T){return e.call(T)==="[object String]"}t.string=s;function a(T){return e.call(T)==="[object Number]"}t.number=a;function c(T,R,P){return e.call(T)==="[object Number]"&&R<=T&&T<=P}t.numberRange=c;function l(T){return e.call(T)==="[object Number]"&&-2147483648<=T&&T<=2147483647}t.integer=l;function d(T){return e.call(T)==="[object Number]"&&0<=T&&T<=2147483647}t.uinteger=d;function h(T){return e.call(T)==="[object Function]"}t.func=h;function m(T){return T!==null&&typeof T=="object"}t.objectLiteral=m;function E(T,R){return Array.isArray(T)&&T.every(R)}t.typedArray=E})(ve||(ve={}));var ZT=Object.freeze({__proto__:null,get DocumentUri(){return Zp},get URI(){return df},get integer(){return em},get uinteger(){return _c},get Position(){return Zn},get Range(){return ot},get Location(){return Ko},get LocationLink(){return hf},get Color(){return pf},get ColorInformation(){return tm},get ColorPresentation(){return nm},get FoldingRangeKind(){return rm},get FoldingRange(){return mf},get DiagnosticRelatedInformation(){return gf},get DiagnosticSeverity(){return Dt},get DiagnosticTag(){return yf},get CodeDescription(){return im},get Diagnostic(){return Nr},get Command(){return Xs},get TextEdit(){return an},get ChangeAnnotation(){return zo},get ChangeAnnotationIdentifier(){return lr},get AnnotatedTextEdit(){return bs},get TextDocumentEdit(){return $c},get CreateFile(){return Ha},get RenameFile(){return Ka},get DeleteFile(){return za},get WorkspaceEdit(){return vf},WorkspaceChange:JT,get TextDocumentIdentifier(){return sm},get VersionedTextDocumentIdentifier(){return om},get OptionalVersionedTextDocumentIdentifier(){return Ec},get TextDocumentItem(){return am},get MarkupKind(){return Ji},get MarkupContent(){return Ya},get CompletionItemKind(){return Fr},get InsertTextFormat(){return or},get CompletionItemTag(){return um},get InsertReplaceEdit(){return cm},get InsertTextMode(){return Df},get CompletionItemLabelDetails(){return lm},get CompletionItem(){return wf},get CompletionList(){return _f},get MarkedString(){return Sc},get Hover(){return fm},get ParameterInformation(){return dm},get SignatureInformation(){return hm},get DocumentHighlightKind(){return pm},get DocumentHighlight(){return mm},get SymbolKind(){return Ai},get SymbolTag(){return gm},get SymbolInformation(){return ym},get WorkspaceSymbol(){return vm},get DocumentSymbol(){return bm},get CodeActionKind(){return Qi},get CodeActionTriggerKind(){return kc},get CodeActionContext(){return Dm},get CodeAction(){return Ci},get CodeLens(){return $f},get FormattingOptions(){return wm},get DocumentLink(){return _m},get SelectionRange(){return Tc},get SemanticTokenTypes(){return $m},get SemanticTokenModifiers(){return Em},get SemanticTokens(){return Sm},get InlineValueText(){return km},get InlineValueVariableLookup(){return Tm},get InlineValueEvaluatableExpression(){return Am},get InlineValueContext(){return Cm},get InlayHintKind(){return Ef},get InlayHintLabelPart(){return Sf},get InlayHint(){return Om},get StringValue(){return Pm},get InlineCompletionItem(){return Nm},get InlineCompletionList(){return Fm},get InlineCompletionTriggerKind(){return Rm},get SelectedCompletionInfo(){return Im},get InlineCompletionContext(){return Mm},get WorkspaceFolder(){return Lm},EOL:QT,get TextDocument(){return jm}}),xm=Uo(ZT),Rt={};Object.defineProperty(Rt,"__esModule",{value:!0}),Rt.ProtocolNotificationType=Rt.ProtocolNotificationType0=Rt.ProtocolRequestType=Rt.ProtocolRequestType0=Rt.RegistrationType=Rt.MessageDirection=void 0;const Ga=Vo;var zb;(function(t){t.clientToServer="clientToServer",t.serverToClient="serverToClient",t.both="both"})(zb||(Rt.MessageDirection=zb={}));class eA{constructor(e){this.method=e}}Rt.RegistrationType=eA;class tA extends Ga.RequestType0{constructor(e){super(e)}}Rt.ProtocolRequestType0=tA;class nA extends Ga.RequestType{constructor(e){super(e,Ga.ParameterStructures.byName)}}Rt.ProtocolRequestType=nA;class rA extends Ga.NotificationType0{constructor(e){super(e)}}Rt.ProtocolNotificationType0=rA;class iA extends Ga.NotificationType{constructor(e){super(e,Ga.ParameterStructures.byName)}}Rt.ProtocolNotificationType=iA;var Yb={},On={};Object.defineProperty(On,"__esModule",{value:!0}),On.objectLiteral=On.typedArray=On.stringArray=On.array=On.func=On.error=On.number=On.string=On.boolean=void 0;function sA(t){return t===!0||t===!1}On.boolean=sA;function Gb(t){return typeof t=="string"||t instanceof String}On.string=Gb;function oA(t){return typeof t=="number"||t instanceof Number}On.number=oA;function aA(t){return t instanceof Error}On.error=aA;function uA(t){return typeof t=="function"}On.func=uA;function Jb(t){return Array.isArray(t)}On.array=Jb;function cA(t){return Jb(t)&&t.every(e=>Gb(e))}On.stringArray=cA;function lA(t,e){return Array.isArray(t)&&t.every(e)}On.typedArray=lA;function fA(t){return t!==null&&typeof t=="object"}On.objectLiteral=fA;var kf={};Object.defineProperty(kf,"__esModule",{value:!0}),kf.ImplementationRequest=void 0;const Qb=Rt;var Xb;(function(t){t.method="textDocument/implementation",t.messageDirection=Qb.MessageDirection.clientToServer,t.type=new Qb.ProtocolRequestType(t.method)})(Xb||(kf.ImplementationRequest=Xb={}));var Tf={};Object.defineProperty(Tf,"__esModule",{value:!0}),Tf.TypeDefinitionRequest=void 0;const Zb=Rt;var eD;(function(t){t.method="textDocument/typeDefinition",t.messageDirection=Zb.MessageDirection.clientToServer,t.type=new Zb.ProtocolRequestType(t.method)})(eD||(Tf.TypeDefinitionRequest=eD={}));var Ja={};Object.defineProperty(Ja,"__esModule",{value:!0}),Ja.DidChangeWorkspaceFoldersNotification=Ja.WorkspaceFoldersRequest=void 0;const Af=Rt;var tD;(function(t){t.method="workspace/workspaceFolders",t.messageDirection=Af.MessageDirection.serverToClient,t.type=new Af.ProtocolRequestType0(t.method)})(tD||(Ja.WorkspaceFoldersRequest=tD={}));var nD;(function(t){t.method="workspace/didChangeWorkspaceFolders",t.messageDirection=Af.MessageDirection.clientToServer,t.type=new Af.ProtocolNotificationType(t.method)})(nD||(Ja.DidChangeWorkspaceFoldersNotification=nD={}));var Cf={};Object.defineProperty(Cf,"__esModule",{value:!0}),Cf.ConfigurationRequest=void 0;const rD=Rt;var iD;(function(t){t.method="workspace/configuration",t.messageDirection=rD.MessageDirection.serverToClient,t.type=new rD.ProtocolRequestType(t.method)})(iD||(Cf.ConfigurationRequest=iD={}));var Qa={};Object.defineProperty(Qa,"__esModule",{value:!0}),Qa.ColorPresentationRequest=Qa.DocumentColorRequest=void 0;const Of=Rt;var sD;(function(t){t.method="textDocument/documentColor",t.messageDirection=Of.MessageDirection.clientToServer,t.type=new Of.ProtocolRequestType(t.method)})(sD||(Qa.DocumentColorRequest=sD={}));var oD;(function(t){t.method="textDocument/colorPresentation",t.messageDirection=Of.MessageDirection.clientToServer,t.type=new Of.ProtocolRequestType(t.method)})(oD||(Qa.ColorPresentationRequest=oD={}));var Xa={};Object.defineProperty(Xa,"__esModule",{value:!0}),Xa.FoldingRangeRefreshRequest=Xa.FoldingRangeRequest=void 0;const Pf=Rt;var aD;(function(t){t.method="textDocument/foldingRange",t.messageDirection=Pf.MessageDirection.clientToServer,t.type=new Pf.ProtocolRequestType(t.method)})(aD||(Xa.FoldingRangeRequest=aD={}));var uD;(function(t){t.method="workspace/foldingRange/refresh",t.messageDirection=Pf.MessageDirection.serverToClient,t.type=new Pf.ProtocolRequestType0(t.method)})(uD||(Xa.FoldingRangeRefreshRequest=uD={}));var Nf={};Object.defineProperty(Nf,"__esModule",{value:!0}),Nf.DeclarationRequest=void 0;const cD=Rt;var lD;(function(t){t.method="textDocument/declaration",t.messageDirection=cD.MessageDirection.clientToServer,t.type=new cD.ProtocolRequestType(t.method)})(lD||(Nf.DeclarationRequest=lD={}));var Ff={};Object.defineProperty(Ff,"__esModule",{value:!0}),Ff.SelectionRangeRequest=void 0;const fD=Rt;var dD;(function(t){t.method="textDocument/selectionRange",t.messageDirection=fD.MessageDirection.clientToServer,t.type=new fD.ProtocolRequestType(t.method)})(dD||(Ff.SelectionRangeRequest=dD={}));var Zs={};Object.defineProperty(Zs,"__esModule",{value:!0}),Zs.WorkDoneProgressCancelNotification=Zs.WorkDoneProgressCreateRequest=Zs.WorkDoneProgress=void 0;const dA=Vo,Rf=Rt;var hD;(function(t){t.type=new dA.ProgressType;function e(n){return n===t.type}t.is=e})(hD||(Zs.WorkDoneProgress=hD={}));var pD;(function(t){t.method="window/workDoneProgress/create",t.messageDirection=Rf.MessageDirection.serverToClient,t.type=new Rf.ProtocolRequestType(t.method)})(pD||(Zs.WorkDoneProgressCreateRequest=pD={}));var mD;(function(t){t.method="window/workDoneProgress/cancel",t.messageDirection=Rf.MessageDirection.clientToServer,t.type=new Rf.ProtocolNotificationType(t.method)})(mD||(Zs.WorkDoneProgressCancelNotification=mD={}));var eo={};Object.defineProperty(eo,"__esModule",{value:!0}),eo.CallHierarchyOutgoingCallsRequest=eo.CallHierarchyIncomingCallsRequest=eo.CallHierarchyPrepareRequest=void 0;const Za=Rt;var gD;(function(t){t.method="textDocument/prepareCallHierarchy",t.messageDirection=Za.MessageDirection.clientToServer,t.type=new Za.ProtocolRequestType(t.method)})(gD||(eo.CallHierarchyPrepareRequest=gD={}));var yD;(function(t){t.method="callHierarchy/incomingCalls",t.messageDirection=Za.MessageDirection.clientToServer,t.type=new Za.ProtocolRequestType(t.method)})(yD||(eo.CallHierarchyIncomingCallsRequest=yD={}));var vD;(function(t){t.method="callHierarchy/outgoingCalls",t.messageDirection=Za.MessageDirection.clientToServer,t.type=new Za.ProtocolRequestType(t.method)})(vD||(eo.CallHierarchyOutgoingCallsRequest=vD={}));var Rr={};Object.defineProperty(Rr,"__esModule",{value:!0}),Rr.SemanticTokensRefreshRequest=Rr.SemanticTokensRangeRequest=Rr.SemanticTokensDeltaRequest=Rr.SemanticTokensRequest=Rr.SemanticTokensRegistrationType=Rr.TokenFormat=void 0;const Ds=Rt;var bD;(function(t){t.Relative="relative"})(bD||(Rr.TokenFormat=bD={}));var Ac;(function(t){t.method="textDocument/semanticTokens",t.type=new Ds.RegistrationType(t.method)})(Ac||(Rr.SemanticTokensRegistrationType=Ac={}));var DD;(function(t){t.method="textDocument/semanticTokens/full",t.messageDirection=Ds.MessageDirection.clientToServer,t.type=new Ds.ProtocolRequestType(t.method),t.registrationMethod=Ac.method})(DD||(Rr.SemanticTokensRequest=DD={}));var wD;(function(t){t.method="textDocument/semanticTokens/full/delta",t.messageDirection=Ds.MessageDirection.clientToServer,t.type=new Ds.ProtocolRequestType(t.method),t.registrationMethod=Ac.method})(wD||(Rr.SemanticTokensDeltaRequest=wD={}));var _D;(function(t){t.method="textDocument/semanticTokens/range",t.messageDirection=Ds.MessageDirection.clientToServer,t.type=new Ds.ProtocolRequestType(t.method),t.registrationMethod=Ac.method})(_D||(Rr.SemanticTokensRangeRequest=_D={}));var $D;(function(t){t.method="workspace/semanticTokens/refresh",t.messageDirection=Ds.MessageDirection.serverToClient,t.type=new Ds.ProtocolRequestType0(t.method)})($D||(Rr.SemanticTokensRefreshRequest=$D={}));var If={};Object.defineProperty(If,"__esModule",{value:!0}),If.ShowDocumentRequest=void 0;const ED=Rt;var SD;(function(t){t.method="window/showDocument",t.messageDirection=ED.MessageDirection.serverToClient,t.type=new ED.ProtocolRequestType(t.method)})(SD||(If.ShowDocumentRequest=SD={}));var Mf={};Object.defineProperty(Mf,"__esModule",{value:!0}),Mf.LinkedEditingRangeRequest=void 0;const kD=Rt;var TD;(function(t){t.method="textDocument/linkedEditingRange",t.messageDirection=kD.MessageDirection.clientToServer,t.type=new kD.ProtocolRequestType(t.method)})(TD||(Mf.LinkedEditingRangeRequest=TD={}));var yr={};Object.defineProperty(yr,"__esModule",{value:!0}),yr.WillDeleteFilesRequest=yr.DidDeleteFilesNotification=yr.DidRenameFilesNotification=yr.WillRenameFilesRequest=yr.DidCreateFilesNotification=yr.WillCreateFilesRequest=yr.FileOperationPatternKind=void 0;const oi=Rt;var AD;(function(t){t.file="file",t.folder="folder"})(AD||(yr.FileOperationPatternKind=AD={}));var CD;(function(t){t.method="workspace/willCreateFiles",t.messageDirection=oi.MessageDirection.clientToServer,t.type=new oi.ProtocolRequestType(t.method)})(CD||(yr.WillCreateFilesRequest=CD={}));var OD;(function(t){t.method="workspace/didCreateFiles",t.messageDirection=oi.MessageDirection.clientToServer,t.type=new oi.ProtocolNotificationType(t.method)})(OD||(yr.DidCreateFilesNotification=OD={}));var PD;(function(t){t.method="workspace/willRenameFiles",t.messageDirection=oi.MessageDirection.clientToServer,t.type=new oi.ProtocolRequestType(t.method)})(PD||(yr.WillRenameFilesRequest=PD={}));var ND;(function(t){t.method="workspace/didRenameFiles",t.messageDirection=oi.MessageDirection.clientToServer,t.type=new oi.ProtocolNotificationType(t.method)})(ND||(yr.DidRenameFilesNotification=ND={}));var FD;(function(t){t.method="workspace/didDeleteFiles",t.messageDirection=oi.MessageDirection.clientToServer,t.type=new oi.ProtocolNotificationType(t.method)})(FD||(yr.DidDeleteFilesNotification=FD={}));var RD;(function(t){t.method="workspace/willDeleteFiles",t.messageDirection=oi.MessageDirection.clientToServer,t.type=new oi.ProtocolRequestType(t.method)})(RD||(yr.WillDeleteFilesRequest=RD={}));var to={};Object.defineProperty(to,"__esModule",{value:!0}),to.MonikerRequest=to.MonikerKind=to.UniquenessLevel=void 0;const ID=Rt;var MD;(function(t){t.document="document",t.project="project",t.group="group",t.scheme="scheme",t.global="global"})(MD||(to.UniquenessLevel=MD={}));var LD;(function(t){t.$import="import",t.$export="export",t.local="local"})(LD||(to.MonikerKind=LD={}));var jD;(function(t){t.method="textDocument/moniker",t.messageDirection=ID.MessageDirection.clientToServer,t.type=new ID.ProtocolRequestType(t.method)})(jD||(to.MonikerRequest=jD={}));var no={};Object.defineProperty(no,"__esModule",{value:!0}),no.TypeHierarchySubtypesRequest=no.TypeHierarchySupertypesRequest=no.TypeHierarchyPrepareRequest=void 0;const eu=Rt;var xD;(function(t){t.method="textDocument/prepareTypeHierarchy",t.messageDirection=eu.MessageDirection.clientToServer,t.type=new eu.ProtocolRequestType(t.method)})(xD||(no.TypeHierarchyPrepareRequest=xD={}));var BD;(function(t){t.method="typeHierarchy/supertypes",t.messageDirection=eu.MessageDirection.clientToServer,t.type=new eu.ProtocolRequestType(t.method)})(BD||(no.TypeHierarchySupertypesRequest=BD={}));var qD;(function(t){t.method="typeHierarchy/subtypes",t.messageDirection=eu.MessageDirection.clientToServer,t.type=new eu.ProtocolRequestType(t.method)})(qD||(no.TypeHierarchySubtypesRequest=qD={}));var tu={};Object.defineProperty(tu,"__esModule",{value:!0}),tu.InlineValueRefreshRequest=tu.InlineValueRequest=void 0;const Lf=Rt;var WD;(function(t){t.method="textDocument/inlineValue",t.messageDirection=Lf.MessageDirection.clientToServer,t.type=new Lf.ProtocolRequestType(t.method)})(WD||(tu.InlineValueRequest=WD={}));var UD;(function(t){t.method="workspace/inlineValue/refresh",t.messageDirection=Lf.MessageDirection.serverToClient,t.type=new Lf.ProtocolRequestType0(t.method)})(UD||(tu.InlineValueRefreshRequest=UD={}));var ro={};Object.defineProperty(ro,"__esModule",{value:!0}),ro.InlayHintRefreshRequest=ro.InlayHintResolveRequest=ro.InlayHintRequest=void 0;const nu=Rt;var VD;(function(t){t.method="textDocument/inlayHint",t.messageDirection=nu.MessageDirection.clientToServer,t.type=new nu.ProtocolRequestType(t.method)})(VD||(ro.InlayHintRequest=VD={}));var HD;(function(t){t.method="inlayHint/resolve",t.messageDirection=nu.MessageDirection.clientToServer,t.type=new nu.ProtocolRequestType(t.method)})(HD||(ro.InlayHintResolveRequest=HD={}));var KD;(function(t){t.method="workspace/inlayHint/refresh",t.messageDirection=nu.MessageDirection.serverToClient,t.type=new nu.ProtocolRequestType0(t.method)})(KD||(ro.InlayHintRefreshRequest=KD={}));var ai={};Object.defineProperty(ai,"__esModule",{value:!0}),ai.DiagnosticRefreshRequest=ai.WorkspaceDiagnosticRequest=ai.DocumentDiagnosticRequest=ai.DocumentDiagnosticReportKind=ai.DiagnosticServerCancellationData=void 0;const zD=Vo,hA=On,ru=Rt;var YD;(function(t){function e(n){const r=n;return r&&hA.boolean(r.retriggerRequest)}t.is=e})(YD||(ai.DiagnosticServerCancellationData=YD={}));var GD;(function(t){t.Full="full",t.Unchanged="unchanged"})(GD||(ai.DocumentDiagnosticReportKind=GD={}));var JD;(function(t){t.method="textDocument/diagnostic",t.messageDirection=ru.MessageDirection.clientToServer,t.type=new ru.ProtocolRequestType(t.method),t.partialResult=new zD.ProgressType})(JD||(ai.DocumentDiagnosticRequest=JD={}));var QD;(function(t){t.method="workspace/diagnostic",t.messageDirection=ru.MessageDirection.clientToServer,t.type=new ru.ProtocolRequestType(t.method),t.partialResult=new zD.ProgressType})(QD||(ai.WorkspaceDiagnosticRequest=QD={}));var XD;(function(t){t.method="workspace/diagnostic/refresh",t.messageDirection=ru.MessageDirection.serverToClient,t.type=new ru.ProtocolRequestType0(t.method)})(XD||(ai.DiagnosticRefreshRequest=XD={}));var Pn={};Object.defineProperty(Pn,"__esModule",{value:!0}),Pn.DidCloseNotebookDocumentNotification=Pn.DidSaveNotebookDocumentNotification=Pn.DidChangeNotebookDocumentNotification=Pn.NotebookCellArrayChange=Pn.DidOpenNotebookDocumentNotification=Pn.NotebookDocumentSyncRegistrationType=Pn.NotebookDocument=Pn.NotebookCell=Pn.ExecutionSummary=Pn.NotebookCellKind=void 0;const Cc=xm,Oi=On,Xi=Rt;var Bm;(function(t){t.Markup=1,t.Code=2;function e(n){return n===1||n===2}t.is=e})(Bm||(Pn.NotebookCellKind=Bm={}));var qm;(function(t){function e(i,s){const a={executionOrder:i};return(s===!0||s===!1)&&(a.success=s),a}t.create=e;function n(i){const s=i;return Oi.objectLiteral(s)&&Cc.uinteger.is(s.executionOrder)&&(s.success===void 0||Oi.boolean(s.success))}t.is=n;function r(i,s){return i===s?!0:i==null||s===null||s===void 0?!1:i.executionOrder===s.executionOrder&&i.success===s.success}t.equals=r})(qm||(Pn.ExecutionSummary=qm={}));var jf;(function(t){function e(s,a){return{kind:s,document:a}}t.create=e;function n(s){const a=s;return Oi.objectLiteral(a)&&Bm.is(a.kind)&&Cc.DocumentUri.is(a.document)&&(a.metadata===void 0||Oi.objectLiteral(a.metadata))}t.is=n;function r(s,a){const c=new Set;return s.document!==a.document&&c.add("document"),s.kind!==a.kind&&c.add("kind"),s.executionSummary!==a.executionSummary&&c.add("executionSummary"),(s.metadata!==void 0||a.metadata!==void 0)&&!i(s.metadata,a.metadata)&&c.add("metadata"),(s.executionSummary!==void 0||a.executionSummary!==void 0)&&!qm.equals(s.executionSummary,a.executionSummary)&&c.add("executionSummary"),c}t.diff=r;function i(s,a){if(s===a)return!0;if(s==null||a===null||a===void 0||typeof s!=typeof a||typeof s!="object")return!1;const c=Array.isArray(s),l=Array.isArray(a);if(c!==l)return!1;if(c&&l){if(s.length!==a.length)return!1;for(let d=0;d0}Q.hasId=vn})(Be||(t.StaticRegistrationOptions=Be={}));var nt;(function(Q){function vn(bn){const it=bn;return it&&(it.documentSelector===null||Y.is(it.documentSelector))}Q.is=vn})(nt||(t.TextDocumentRegistrationOptions=nt={}));var Se;(function(Q){function vn(it){const se=it;return r.objectLiteral(se)&&(se.workDoneProgress===void 0||r.boolean(se.workDoneProgress))}Q.is=vn;function bn(it){const se=it;return se&&r.boolean(se.workDoneProgress)}Q.hasWorkDoneProgress=bn})(Se||(t.WorkDoneProgressOptions=Se={}));var H;(function(Q){Q.method="initialize",Q.messageDirection=e.MessageDirection.clientToServer,Q.type=new e.ProtocolRequestType(Q.method)})(H||(t.InitializeRequest=H={}));var fe;(function(Q){Q.unknownProtocolVersion=1})(fe||(t.InitializeErrorCodes=fe={}));var ae;(function(Q){Q.method="initialized",Q.messageDirection=e.MessageDirection.clientToServer,Q.type=new e.ProtocolNotificationType(Q.method)})(ae||(t.InitializedNotification=ae={}));var U;(function(Q){Q.method="shutdown",Q.messageDirection=e.MessageDirection.clientToServer,Q.type=new e.ProtocolRequestType0(Q.method)})(U||(t.ShutdownRequest=U={}));var Z;(function(Q){Q.method="exit",Q.messageDirection=e.MessageDirection.clientToServer,Q.type=new e.ProtocolNotificationType0(Q.method)})(Z||(t.ExitNotification=Z={}));var pe;(function(Q){Q.method="workspace/didChangeConfiguration",Q.messageDirection=e.MessageDirection.clientToServer,Q.type=new e.ProtocolNotificationType(Q.method)})(pe||(t.DidChangeConfigurationNotification=pe={}));var Me;(function(Q){Q.Error=1,Q.Warning=2,Q.Info=3,Q.Log=4,Q.Debug=5})(Me||(t.MessageType=Me={}));var Ie;(function(Q){Q.method="window/showMessage",Q.messageDirection=e.MessageDirection.serverToClient,Q.type=new e.ProtocolNotificationType(Q.method)})(Ie||(t.ShowMessageNotification=Ie={}));var qe;(function(Q){Q.method="window/showMessageRequest",Q.messageDirection=e.MessageDirection.serverToClient,Q.type=new e.ProtocolRequestType(Q.method)})(qe||(t.ShowMessageRequest=qe={}));var ze;(function(Q){Q.method="window/logMessage",Q.messageDirection=e.MessageDirection.serverToClient,Q.type=new e.ProtocolNotificationType(Q.method)})(ze||(t.LogMessageNotification=ze={}));var Ge;(function(Q){Q.method="telemetry/event",Q.messageDirection=e.MessageDirection.serverToClient,Q.type=new e.ProtocolNotificationType(Q.method)})(Ge||(t.TelemetryEventNotification=Ge={}));var rt;(function(Q){Q.None=0,Q.Full=1,Q.Incremental=2})(rt||(t.TextDocumentSyncKind=rt={}));var _n;(function(Q){Q.method="textDocument/didOpen",Q.messageDirection=e.MessageDirection.clientToServer,Q.type=new e.ProtocolNotificationType(Q.method)})(_n||(t.DidOpenTextDocumentNotification=_n={}));var at;(function(Q){function vn(it){let se=it;return se!=null&&typeof se.text=="string"&&se.range!==void 0&&(se.rangeLength===void 0||typeof se.rangeLength=="number")}Q.isIncremental=vn;function bn(it){let se=it;return se!=null&&typeof se.text=="string"&&se.range===void 0&&se.rangeLength===void 0}Q.isFull=bn})(at||(t.TextDocumentContentChangeEvent=at={}));var un;(function(Q){Q.method="textDocument/didChange",Q.messageDirection=e.MessageDirection.clientToServer,Q.type=new e.ProtocolNotificationType(Q.method)})(un||(t.DidChangeTextDocumentNotification=un={}));var Sn;(function(Q){Q.method="textDocument/didClose",Q.messageDirection=e.MessageDirection.clientToServer,Q.type=new e.ProtocolNotificationType(Q.method)})(Sn||(t.DidCloseTextDocumentNotification=Sn={}));var Mt;(function(Q){Q.method="textDocument/didSave",Q.messageDirection=e.MessageDirection.clientToServer,Q.type=new e.ProtocolNotificationType(Q.method)})(Mt||(t.DidSaveTextDocumentNotification=Mt={}));var kn;(function(Q){Q.Manual=1,Q.AfterDelay=2,Q.FocusOut=3})(kn||(t.TextDocumentSaveReason=kn={}));var ur;(function(Q){Q.method="textDocument/willSave",Q.messageDirection=e.MessageDirection.clientToServer,Q.type=new e.ProtocolNotificationType(Q.method)})(ur||(t.WillSaveTextDocumentNotification=ur={}));var Tn;(function(Q){Q.method="textDocument/willSaveWaitUntil",Q.messageDirection=e.MessageDirection.clientToServer,Q.type=new e.ProtocolRequestType(Q.method)})(Tn||(t.WillSaveTextDocumentWaitUntilRequest=Tn={}));var Lt;(function(Q){Q.method="workspace/didChangeWatchedFiles",Q.messageDirection=e.MessageDirection.clientToServer,Q.type=new e.ProtocolNotificationType(Q.method)})(Lt||(t.DidChangeWatchedFilesNotification=Lt={}));var Vn;(function(Q){Q.Created=1,Q.Changed=2,Q.Deleted=3})(Vn||(t.FileChangeType=Vn={}));var Xn;(function(Q){function vn(bn){const it=bn;return r.objectLiteral(it)&&(n.URI.is(it.baseUri)||n.WorkspaceFolder.is(it.baseUri))&&r.string(it.pattern)}Q.is=vn})(Xn||(t.RelativePattern=Xn={}));var Rn;(function(Q){Q.Create=1,Q.Change=2,Q.Delete=4})(Rn||(t.WatchKind=Rn={}));var qt;(function(Q){Q.method="textDocument/publishDiagnostics",Q.messageDirection=e.MessageDirection.serverToClient,Q.type=new e.ProtocolNotificationType(Q.method)})(qt||(t.PublishDiagnosticsNotification=qt={}));var X;(function(Q){Q.Invoked=1,Q.TriggerCharacter=2,Q.TriggerForIncompleteCompletions=3})(X||(t.CompletionTriggerKind=X={}));var V;(function(Q){Q.method="textDocument/completion",Q.messageDirection=e.MessageDirection.clientToServer,Q.type=new e.ProtocolRequestType(Q.method)})(V||(t.CompletionRequest=V={}));var ee;(function(Q){Q.method="completionItem/resolve",Q.messageDirection=e.MessageDirection.clientToServer,Q.type=new e.ProtocolRequestType(Q.method)})(ee||(t.CompletionResolveRequest=ee={}));var ie;(function(Q){Q.method="textDocument/hover",Q.messageDirection=e.MessageDirection.clientToServer,Q.type=new e.ProtocolRequestType(Q.method)})(ie||(t.HoverRequest=ie={}));var C;(function(Q){Q.Invoked=1,Q.TriggerCharacter=2,Q.ContentChange=3})(C||(t.SignatureHelpTriggerKind=C={}));var g;(function(Q){Q.method="textDocument/signatureHelp",Q.messageDirection=e.MessageDirection.clientToServer,Q.type=new e.ProtocolRequestType(Q.method)})(g||(t.SignatureHelpRequest=g={}));var w;(function(Q){Q.method="textDocument/definition",Q.messageDirection=e.MessageDirection.clientToServer,Q.type=new e.ProtocolRequestType(Q.method)})(w||(t.DefinitionRequest=w={}));var j;(function(Q){Q.method="textDocument/references",Q.messageDirection=e.MessageDirection.clientToServer,Q.type=new e.ProtocolRequestType(Q.method)})(j||(t.ReferencesRequest=j={}));var J;(function(Q){Q.method="textDocument/documentHighlight",Q.messageDirection=e.MessageDirection.clientToServer,Q.type=new e.ProtocolRequestType(Q.method)})(J||(t.DocumentHighlightRequest=J={}));var re;(function(Q){Q.method="textDocument/documentSymbol",Q.messageDirection=e.MessageDirection.clientToServer,Q.type=new e.ProtocolRequestType(Q.method)})(re||(t.DocumentSymbolRequest=re={}));var ce;(function(Q){Q.method="textDocument/codeAction",Q.messageDirection=e.MessageDirection.clientToServer,Q.type=new e.ProtocolRequestType(Q.method)})(ce||(t.CodeActionRequest=ce={}));var Ne;(function(Q){Q.method="codeAction/resolve",Q.messageDirection=e.MessageDirection.clientToServer,Q.type=new e.ProtocolRequestType(Q.method)})(Ne||(t.CodeActionResolveRequest=Ne={}));var Je;(function(Q){Q.method="workspace/symbol",Q.messageDirection=e.MessageDirection.clientToServer,Q.type=new e.ProtocolRequestType(Q.method)})(Je||(t.WorkspaceSymbolRequest=Je={}));var He;(function(Q){Q.method="workspaceSymbol/resolve",Q.messageDirection=e.MessageDirection.clientToServer,Q.type=new e.ProtocolRequestType(Q.method)})(He||(t.WorkspaceSymbolResolveRequest=He={}));var Xe;(function(Q){Q.method="textDocument/codeLens",Q.messageDirection=e.MessageDirection.clientToServer,Q.type=new e.ProtocolRequestType(Q.method)})(Xe||(t.CodeLensRequest=Xe={}));var je;(function(Q){Q.method="codeLens/resolve",Q.messageDirection=e.MessageDirection.clientToServer,Q.type=new e.ProtocolRequestType(Q.method)})(je||(t.CodeLensResolveRequest=je={}));var gt;(function(Q){Q.method="workspace/codeLens/refresh",Q.messageDirection=e.MessageDirection.serverToClient,Q.type=new e.ProtocolRequestType0(Q.method)})(gt||(t.CodeLensRefreshRequest=gt={}));var cn;(function(Q){Q.method="textDocument/documentLink",Q.messageDirection=e.MessageDirection.clientToServer,Q.type=new e.ProtocolRequestType(Q.method)})(cn||(t.DocumentLinkRequest=cn={}));var ht;(function(Q){Q.method="documentLink/resolve",Q.messageDirection=e.MessageDirection.clientToServer,Q.type=new e.ProtocolRequestType(Q.method)})(ht||(t.DocumentLinkResolveRequest=ht={}));var Wt;(function(Q){Q.method="textDocument/formatting",Q.messageDirection=e.MessageDirection.clientToServer,Q.type=new e.ProtocolRequestType(Q.method)})(Wt||(t.DocumentFormattingRequest=Wt={}));var wt;(function(Q){Q.method="textDocument/rangeFormatting",Q.messageDirection=e.MessageDirection.clientToServer,Q.type=new e.ProtocolRequestType(Q.method)})(wt||(t.DocumentRangeFormattingRequest=wt={}));var $n;(function(Q){Q.method="textDocument/rangesFormatting",Q.messageDirection=e.MessageDirection.clientToServer,Q.type=new e.ProtocolRequestType(Q.method)})($n||(t.DocumentRangesFormattingRequest=$n={}));var An;(function(Q){Q.method="textDocument/onTypeFormatting",Q.messageDirection=e.MessageDirection.clientToServer,Q.type=new e.ProtocolRequestType(Q.method)})(An||(t.DocumentOnTypeFormattingRequest=An={}));var bi;(function(Q){Q.Identifier=1})(bi||(t.PrepareSupportDefaultBehavior=bi={}));var Eo;(function(Q){Q.method="textDocument/rename",Q.messageDirection=e.MessageDirection.clientToServer,Q.type=new e.ProtocolRequestType(Q.method)})(Eo||(t.RenameRequest=Eo={}));var fn;(function(Q){Q.method="textDocument/prepareRename",Q.messageDirection=e.MessageDirection.clientToServer,Q.type=new e.ProtocolRequestType(Q.method)})(fn||(t.PrepareRenameRequest=fn={}));var Di;(function(Q){Q.method="workspace/executeCommand",Q.messageDirection=e.MessageDirection.clientToServer,Q.type=new e.ProtocolRequestType(Q.method)})(Di||(t.ExecuteCommandRequest=Di={}));var xi;(function(Q){Q.method="workspace/applyEdit",Q.messageDirection=e.MessageDirection.serverToClient,Q.type=new e.ProtocolRequestType("workspace/applyEdit")})(xi||(t.ApplyWorkspaceEditRequest=xi={}))}(Yb);var Bf={};Object.defineProperty(Bf,"__esModule",{value:!0}),Bf.createProtocolConnection=void 0;const a1=Vo;function pA(t,e,n,r){return a1.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),(0,a1.createMessageConnection)(t,e,n,r)}Bf.createProtocolConnection=pA,function(t){var e=Vt&&Vt.__createBinding||(Object.create?function(s,a,c,l){l===void 0&&(l=c);var d=Object.getOwnPropertyDescriptor(a,c);(!d||("get"in d?!a.__esModule:d.writable||d.configurable))&&(d={enumerable:!0,get:function(){return a[c]}}),Object.defineProperty(s,l,d)}:function(s,a,c,l){l===void 0&&(l=c),s[l]=a[c]}),n=Vt&&Vt.__exportStar||function(s,a){for(var c in s)c!=="default"&&!Object.prototype.hasOwnProperty.call(a,c)&&e(a,s,c)};Object.defineProperty(t,"__esModule",{value:!0}),t.LSPErrorCodes=t.createProtocolConnection=void 0,n(Vo,t),n(xm,t),n(Rt,t),n(Yb,t);var r=Bf;Object.defineProperty(t,"createProtocolConnection",{enumerable:!0,get:function(){return r.createProtocolConnection}});var i;(function(s){s.lspReservedErrorRangeStart=-32899,s.RequestFailed=-32803,s.ServerCancelled=-32802,s.ContentModified=-32801,s.RequestCancelled=-32800,s.lspReservedErrorRangeEnd=-32800})(i||(t.LSPErrorCodes=i={}))}(Hb),function(t){var e=Vt&&Vt.__createBinding||(Object.create?function(s,a,c,l){l===void 0&&(l=c);var d=Object.getOwnPropertyDescriptor(a,c);(!d||("get"in d?!a.__esModule:d.writable||d.configurable))&&(d={enumerable:!0,get:function(){return a[c]}}),Object.defineProperty(s,l,d)}:function(s,a,c,l){l===void 0&&(l=c),s[l]=a[c]}),n=Vt&&Vt.__exportStar||function(s,a){for(var c in s)c!=="default"&&!Object.prototype.hasOwnProperty.call(a,c)&&e(a,s,c)};Object.defineProperty(t,"__esModule",{value:!0}),t.createProtocolConnection=void 0;const r=qp.exports;n(qp.exports,t),n(Hb,t);function i(s,a,c,l){return(0,r.createMessageConnection)(s,a,c,l)}t.createProtocolConnection=i}(Ln),function(t){t.exports=Ln}(si);function mA(t,e=!1){const n=t.length;let r=0,i="",s=0,a=16,c=0,l=0,d=0,h=0,m=0;function E(y,D){let v=0,_=0;for(;v=48&&$<=57)_=_*16+$-48;else if($>=65&&$<=70)_=_*16+$-65+10;else if($>=97&&$<=102)_=_*16+$-97+10;else break;r++,v++}return v=n){y+=t.substring(D,r),m=2;break}const v=t.charCodeAt(r);if(v===34){y+=t.substring(D,r),r++;break}if(v===92){if(y+=t.substring(D,r),r++,r>=n){m=2;break}switch(t.charCodeAt(r++)){case 34:y+='"';break;case 92:y+="\\";break;case 47:y+="/";break;case 98:y+="\b";break;case 102:y+="\f";break;case 110:y+=` `;break;case 114:y+="\r";break;case 116:y+=" ";break;case 117:const $=E(4,!0);$>=0?y+=String.fromCharCode($):m=4;break;default:m=5}D=r;continue}if(v>=0&&v<=31)if(Oc(v)){y+=t.substring(D,r),m=2;break}else m=6;r++}return y}function A(){if(i="",m=0,s=r,l=c,h=d,r>=n)return s=n,a=17;let y=t.charCodeAt(r);if(Wm(y)){do r++,i+=String.fromCharCode(y),y=t.charCodeAt(r);while(Wm(y));return a=15}if(Oc(y))return r++,i+=String.fromCharCode(y),y===13&&t.charCodeAt(r)===10&&(r++,i+=` -`),c++,d=r,a=14;switch(y){case 123:return r++,a=1;case 125:return r++,a=2;case 91:return r++,a=3;case 93:return r++,a=4;case 58:return r++,a=6;case 44:return r++,a=5;case 34:return r++,i=P(),a=10;case 47:const D=r-1;if(t.charCodeAt(r+1)===47){for(r+=2;r=12&&y<=15);return y}return{setPosition:k,getPosition:()=>r,scan:e?S:A,getToken:()=>a,getTokenValue:()=>i,getTokenOffset:()=>s,getTokenLength:()=>r-s,getTokenStartLine:()=>l,getTokenStartCharacter:()=>s-h,getTokenError:()=>m}}function Wm(t){return t===32||t===9}function Oc(t){return t===10||t===13}function su(t){return t>=48&&t<=57}var u1;(function(t){t[t.lineFeed=10]="lineFeed",t[t.carriageReturn=13]="carriageReturn",t[t.space=32]="space",t[t._0=48]="_0",t[t._1=49]="_1",t[t._2=50]="_2",t[t._3=51]="_3",t[t._4=52]="_4",t[t._5=53]="_5",t[t._6=54]="_6",t[t._7=55]="_7",t[t._8=56]="_8",t[t._9=57]="_9",t[t.a=97]="a",t[t.b=98]="b",t[t.c=99]="c",t[t.d=100]="d",t[t.e=101]="e",t[t.f=102]="f",t[t.g=103]="g",t[t.h=104]="h",t[t.i=105]="i",t[t.j=106]="j",t[t.k=107]="k",t[t.l=108]="l",t[t.m=109]="m",t[t.n=110]="n",t[t.o=111]="o",t[t.p=112]="p",t[t.q=113]="q",t[t.r=114]="r",t[t.s=115]="s",t[t.t=116]="t",t[t.u=117]="u",t[t.v=118]="v",t[t.w=119]="w",t[t.x=120]="x",t[t.y=121]="y",t[t.z=122]="z",t[t.A=65]="A",t[t.B=66]="B",t[t.C=67]="C",t[t.D=68]="D",t[t.E=69]="E",t[t.F=70]="F",t[t.G=71]="G",t[t.H=72]="H",t[t.I=73]="I",t[t.J=74]="J",t[t.K=75]="K",t[t.L=76]="L",t[t.M=77]="M",t[t.N=78]="N",t[t.O=79]="O",t[t.P=80]="P",t[t.Q=81]="Q",t[t.R=82]="R",t[t.S=83]="S",t[t.T=84]="T",t[t.U=85]="U",t[t.V=86]="V",t[t.W=87]="W",t[t.X=88]="X",t[t.Y=89]="Y",t[t.Z=90]="Z",t[t.asterisk=42]="asterisk",t[t.backslash=92]="backslash",t[t.closeBrace=125]="closeBrace",t[t.closeBracket=93]="closeBracket",t[t.colon=58]="colon",t[t.comma=44]="comma",t[t.dot=46]="dot",t[t.doubleQuote=34]="doubleQuote",t[t.minus=45]="minus",t[t.openBrace=123]="openBrace",t[t.openBracket=91]="openBracket",t[t.plus=43]="plus",t[t.slash=47]="slash",t[t.formFeed=12]="formFeed",t[t.tab=9]="tab"})(u1||(u1={})),new Array(20).fill(0).map((t,e)=>" ".repeat(e));const ou=200;new Array(ou).fill(0).map((t,e)=>` +`),c++,d=r,a=14;switch(y){case 123:return r++,a=1;case 125:return r++,a=2;case 91:return r++,a=3;case 93:return r++,a=4;case 58:return r++,a=6;case 44:return r++,a=5;case 34:return r++,i=P(),a=10;case 47:const D=r-1;if(t.charCodeAt(r+1)===47){for(r+=2;r=12&&y<=15);return y}return{setPosition:T,getPosition:()=>r,scan:e?S:A,getToken:()=>a,getTokenValue:()=>i,getTokenOffset:()=>s,getTokenLength:()=>r-s,getTokenStartLine:()=>l,getTokenStartCharacter:()=>s-h,getTokenError:()=>m}}function Wm(t){return t===32||t===9}function Oc(t){return t===10||t===13}function su(t){return t>=48&&t<=57}var u1;(function(t){t[t.lineFeed=10]="lineFeed",t[t.carriageReturn=13]="carriageReturn",t[t.space=32]="space",t[t._0=48]="_0",t[t._1=49]="_1",t[t._2=50]="_2",t[t._3=51]="_3",t[t._4=52]="_4",t[t._5=53]="_5",t[t._6=54]="_6",t[t._7=55]="_7",t[t._8=56]="_8",t[t._9=57]="_9",t[t.a=97]="a",t[t.b=98]="b",t[t.c=99]="c",t[t.d=100]="d",t[t.e=101]="e",t[t.f=102]="f",t[t.g=103]="g",t[t.h=104]="h",t[t.i=105]="i",t[t.j=106]="j",t[t.k=107]="k",t[t.l=108]="l",t[t.m=109]="m",t[t.n=110]="n",t[t.o=111]="o",t[t.p=112]="p",t[t.q=113]="q",t[t.r=114]="r",t[t.s=115]="s",t[t.t=116]="t",t[t.u=117]="u",t[t.v=118]="v",t[t.w=119]="w",t[t.x=120]="x",t[t.y=121]="y",t[t.z=122]="z",t[t.A=65]="A",t[t.B=66]="B",t[t.C=67]="C",t[t.D=68]="D",t[t.E=69]="E",t[t.F=70]="F",t[t.G=71]="G",t[t.H=72]="H",t[t.I=73]="I",t[t.J=74]="J",t[t.K=75]="K",t[t.L=76]="L",t[t.M=77]="M",t[t.N=78]="N",t[t.O=79]="O",t[t.P=80]="P",t[t.Q=81]="Q",t[t.R=82]="R",t[t.S=83]="S",t[t.T=84]="T",t[t.U=85]="U",t[t.V=86]="V",t[t.W=87]="W",t[t.X=88]="X",t[t.Y=89]="Y",t[t.Z=90]="Z",t[t.asterisk=42]="asterisk",t[t.backslash=92]="backslash",t[t.closeBrace=125]="closeBrace",t[t.closeBracket=93]="closeBracket",t[t.colon=58]="colon",t[t.comma=44]="comma",t[t.dot=46]="dot",t[t.doubleQuote=34]="doubleQuote",t[t.minus=45]="minus",t[t.openBrace=123]="openBrace",t[t.openBracket=91]="openBracket",t[t.plus=43]="plus",t[t.slash=47]="slash",t[t.formFeed=12]="formFeed",t[t.tab=9]="tab"})(u1||(u1={})),new Array(20).fill(0).map((t,e)=>" ".repeat(e));const ou=200;new Array(ou).fill(0).map((t,e)=>` `+" ".repeat(e)),new Array(ou).fill(0).map((t,e)=>"\r"+" ".repeat(e)),new Array(ou).fill(0).map((t,e)=>`\r `+" ".repeat(e)),new Array(ou).fill(0).map((t,e)=>` `+" ".repeat(e)),new Array(ou).fill(0).map((t,e)=>"\r"+" ".repeat(e)),new Array(ou).fill(0).map((t,e)=>`\r -`+" ".repeat(e));var Bf;(function(t){t.DEFAULT={allowTrailingComma:!1}})(Bf||(Bf={}));function gA(t,e=[],n=Bf.DEFAULT){let r=null,i=[];const s=[];function a(l){Array.isArray(i)?i.push(l):r!==null&&(i[r]=l)}return yA(t,{onObjectBegin:()=>{const l={};a(l),s.push(i),i=l,r=null},onObjectProperty:l=>{r=l},onObjectEnd:()=>{i=s.pop()},onArrayBegin:()=>{const l=[];a(l),s.push(i),i=l,r=null},onArrayEnd:()=>{i=s.pop()},onLiteralValue:a,onError:(l,d,h)=>{e.push({error:l,offset:d,length:h})}},n),i[0]}function Um(t){switch(t.type){case"array":return t.children.map(Um);case"object":const e=Object.create(null);for(let n of t.children){const r=n.children[1];r&&(e[n.children[0].value]=Um(r))}return e;case"null":case"string":case"number":case"boolean":return t.value;default:return}}function yA(t,e,n=Bf.DEFAULT){const r=mA(t,!1),i=[];let s=0;function a(ne){return ne?()=>s===0&&ne(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}function c(ne){return ne?ge=>s===0&&ne(ge,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}function l(ne){return ne?ge=>s===0&&ne(ge,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),()=>i.slice()):()=>!0}function d(ne){return ne?()=>{s>0?s++:ne(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),()=>i.slice())===!1&&(s=1)}:()=>!0}function h(ne){return ne?()=>{s>0&&s--,s===0&&ne(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter())}:()=>!0}const m=d(e.onObjectBegin),E=l(e.onObjectProperty),k=h(e.onObjectEnd),R=d(e.onArrayBegin),P=h(e.onArrayEnd),A=l(e.onLiteralValue),N=c(e.onSeparator),S=a(e.onComment),y=c(e.onError),D=n&&n.disallowComments,v=n&&n.allowTrailingComma;function _(){for(;;){const ne=r.scan();switch(r.getTokenError()){case 4:$(14);break;case 5:$(15);break;case 3:$(13);break;case 1:D||$(11);break;case 2:$(12);break;case 6:$(16);break}switch(ne){case 12:case 13:D?$(10):S();break;case 16:$(1);break;case 15:case 14:break;default:return ne}}}function $(ne,ge=[],ye=[]){if(y(ne),ge.length+ye.length>0){let De=r.getToken();for(;De!==17;){if(ge.indexOf(De)!==-1){_();break}else if(ye.indexOf(De)!==-1)break;De=_()}}}function q(ne){const ge=r.getTokenValue();return ne?A(ge):(E(ge),i.push(ge)),_(),!0}function F(){switch(r.getToken()){case 11:const ne=r.getTokenValue();let ge=Number(ne);isNaN(ge)&&($(2),ge=0),A(ge);break;case 7:A(null);break;case 8:A(!0);break;case 9:A(!1);break;default:return!1}return _(),!0}function M(){return r.getToken()!==10?($(3,[],[2,5]),!1):(q(!1),r.getToken()===6?(N(":"),_(),K()||$(4,[],[2,5])):$(5,[],[2,5]),i.pop(),!0)}function I(){m(),_();let ne=!1;for(;r.getToken()!==2&&r.getToken()!==17;){if(r.getToken()===5){if(ne||$(4,[],[]),N(","),_(),r.getToken()===2&&v)break}else ne&&$(6,[],[]);M()||$(4,[],[2,5]),ne=!0}return k(),r.getToken()!==2?$(7,[2],[]):_(),!0}function Y(){R(),_();let ne=!0,ge=!1;for(;r.getToken()!==4&&r.getToken()!==17;){if(r.getToken()===5){if(ge||$(4,[],[]),N(","),_(),r.getToken()===4&&v)break}else ge&&$(6,[],[]);ne?(i.push(0),ne=!1):i[i.length-1]++,K()||$(4,[],[4,5]),ge=!0}return P(),ne||i.pop(),r.getToken()!==4?$(8,[4],[]):_(),!0}function K(){switch(r.getToken()){case 3:return Y();case 1:return I();case 10:return q(!0);default:return F()}}return _(),r.getToken()===17?n.allowEmptyContent?!0:($(4,[],[]),!1):K()?(r.getToken()!==17&&$(9,[],[]),!0):($(4,[],[]),!1)}var c1;(function(t){t[t.None=0]="None",t[t.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",t[t.UnexpectedEndOfString=2]="UnexpectedEndOfString",t[t.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",t[t.InvalidUnicode=4]="InvalidUnicode",t[t.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",t[t.InvalidCharacter=6]="InvalidCharacter"})(c1||(c1={}));var l1;(function(t){t[t.OpenBraceToken=1]="OpenBraceToken",t[t.CloseBraceToken=2]="CloseBraceToken",t[t.OpenBracketToken=3]="OpenBracketToken",t[t.CloseBracketToken=4]="CloseBracketToken",t[t.CommaToken=5]="CommaToken",t[t.ColonToken=6]="ColonToken",t[t.NullKeyword=7]="NullKeyword",t[t.TrueKeyword=8]="TrueKeyword",t[t.FalseKeyword=9]="FalseKeyword",t[t.StringLiteral=10]="StringLiteral",t[t.NumericLiteral=11]="NumericLiteral",t[t.LineCommentTrivia=12]="LineCommentTrivia",t[t.BlockCommentTrivia=13]="BlockCommentTrivia",t[t.LineBreakTrivia=14]="LineBreakTrivia",t[t.Trivia=15]="Trivia",t[t.Unknown=16]="Unknown",t[t.EOF=17]="EOF"})(l1||(l1={}));const vA=gA,bA=Um;var f1;(function(t){t[t.InvalidSymbol=1]="InvalidSymbol",t[t.InvalidNumberFormat=2]="InvalidNumberFormat",t[t.PropertyNameExpected=3]="PropertyNameExpected",t[t.ValueExpected=4]="ValueExpected",t[t.ColonExpected=5]="ColonExpected",t[t.CommaExpected=6]="CommaExpected",t[t.CloseBraceExpected=7]="CloseBraceExpected",t[t.CloseBracketExpected=8]="CloseBracketExpected",t[t.EndOfFileExpected=9]="EndOfFileExpected",t[t.InvalidCommentToken=10]="InvalidCommentToken",t[t.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",t[t.UnexpectedEndOfString=12]="UnexpectedEndOfString",t[t.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",t[t.InvalidUnicode=14]="InvalidUnicode",t[t.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",t[t.InvalidCharacter=16]="InvalidCharacter"})(f1||(f1={}));function DA(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var d1={exports:{}},jn=d1.exports={},Zi,es;function Vm(){throw new Error("setTimeout has not been defined")}function Hm(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?Zi=setTimeout:Zi=Vm}catch{Zi=Vm}try{typeof clearTimeout=="function"?es=clearTimeout:es=Hm}catch{es=Hm}})();function h1(t){if(Zi===setTimeout)return setTimeout(t,0);if((Zi===Vm||!Zi)&&setTimeout)return Zi=setTimeout,setTimeout(t,0);try{return Zi(t,0)}catch{try{return Zi.call(null,t,0)}catch{return Zi.call(this,t,0)}}}function wA(t){if(es===clearTimeout)return clearTimeout(t);if((es===Hm||!es)&&clearTimeout)return es=clearTimeout,clearTimeout(t);try{return es(t)}catch{try{return es.call(null,t)}catch{return es.call(this,t)}}}var ws=[],au=!1,Yo,qf=-1;function _A(){!au||!Yo||(au=!1,Yo.length?ws=Yo.concat(ws):qf=-1,ws.length&&p1())}function p1(){if(!au){var t=h1(_A);au=!0;for(var e=ws.length;e;){for(Yo=ws,ws=[];++qf1)for(var n=1;n{var t={470:i=>{function s(l){if(typeof l!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(l))}function a(l,d){for(var h,m="",E=0,k=-1,R=0,P=0;P<=l.length;++P){if(P2){var A=m.lastIndexOf("/");if(A!==m.length-1){A===-1?(m="",E=0):E=(m=m.slice(0,A)).length-1-m.lastIndexOf("/"),k=P,R=0;continue}}else if(m.length===2||m.length===1){m="",E=0,k=P,R=0;continue}}d&&(m.length>0?m+="/..":m="..",E=2)}else m.length>0?m+="/"+l.slice(k+1,P):m=l.slice(k+1,P),E=P-k-1;k=P,R=0}else h===46&&R!==-1?++R:R=-1}return m}var c={resolve:function(){for(var l,d="",h=!1,m=arguments.length-1;m>=-1&&!h;m--){var E;m>=0?E=arguments[m]:(l===void 0&&(l=Go.cwd()),E=l),s(E),E.length!==0&&(d=E+"/"+d,h=E.charCodeAt(0)===47)}return d=a(d,!h),h?d.length>0?"/"+d:"/":d.length>0?d:"."},normalize:function(l){if(s(l),l.length===0)return".";var d=l.charCodeAt(0)===47,h=l.charCodeAt(l.length-1)===47;return(l=a(l,!d)).length!==0||d||(l="."),l.length>0&&h&&(l+="/"),d?"/"+l:l},isAbsolute:function(l){return s(l),l.length>0&&l.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var l,d=0;d0&&(l===void 0?l=h:l+="/"+h)}return l===void 0?".":c.normalize(l)},relative:function(l,d){if(s(l),s(d),l===d||(l=c.resolve(l))===(d=c.resolve(d)))return"";for(var h=1;hP){if(d.charCodeAt(k+N)===47)return d.slice(k+N+1);if(N===0)return d.slice(k+N)}else E>P&&(l.charCodeAt(h+N)===47?A=N:N===0&&(A=0));break}var S=l.charCodeAt(h+N);if(S!==d.charCodeAt(k+N))break;S===47&&(A=N)}var y="";for(N=h+A+1;N<=m;++N)N!==m&&l.charCodeAt(N)!==47||(y.length===0?y+="..":y+="/..");return y.length>0?y+d.slice(k+A):(k+=A,d.charCodeAt(k)===47&&++k,d.slice(k))},_makeLong:function(l){return l},dirname:function(l){if(s(l),l.length===0)return".";for(var d=l.charCodeAt(0),h=d===47,m=-1,E=!0,k=l.length-1;k>=1;--k)if((d=l.charCodeAt(k))===47){if(!E){m=k;break}}else E=!1;return m===-1?h?"/":".":h&&m===1?"//":l.slice(0,m)},basename:function(l,d){if(d!==void 0&&typeof d!="string")throw new TypeError('"ext" argument must be a string');s(l);var h,m=0,E=-1,k=!0;if(d!==void 0&&d.length>0&&d.length<=l.length){if(d.length===l.length&&d===l)return"";var R=d.length-1,P=-1;for(h=l.length-1;h>=0;--h){var A=l.charCodeAt(h);if(A===47){if(!k){m=h+1;break}}else P===-1&&(k=!1,P=h+1),R>=0&&(A===d.charCodeAt(R)?--R==-1&&(E=h):(R=-1,E=P))}return m===E?E=P:E===-1&&(E=l.length),l.slice(m,E)}for(h=l.length-1;h>=0;--h)if(l.charCodeAt(h)===47){if(!k){m=h+1;break}}else E===-1&&(k=!1,E=h+1);return E===-1?"":l.slice(m,E)},extname:function(l){s(l);for(var d=-1,h=0,m=-1,E=!0,k=0,R=l.length-1;R>=0;--R){var P=l.charCodeAt(R);if(P!==47)m===-1&&(E=!1,m=R+1),P===46?d===-1?d=R:k!==1&&(k=1):d!==-1&&(k=-1);else if(!E){h=R+1;break}}return d===-1||m===-1||k===0||k===1&&d===m-1&&d===h+1?"":l.slice(d,m)},format:function(l){if(l===null||typeof l!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof l);return function(d,h){var m=h.dir||h.root,E=h.base||(h.name||"")+(h.ext||"");return m?m===h.root?m+E:m+"/"+E:E}(0,l)},parse:function(l){s(l);var d={root:"",dir:"",base:"",ext:"",name:""};if(l.length===0)return d;var h,m=l.charCodeAt(0),E=m===47;E?(d.root="/",h=1):h=0;for(var k=-1,R=0,P=-1,A=!0,N=l.length-1,S=0;N>=h;--N)if((m=l.charCodeAt(N))!==47)P===-1&&(A=!1,P=N+1),m===46?k===-1?k=N:S!==1&&(S=1):k!==-1&&(S=-1);else if(!A){R=N+1;break}return k===-1||P===-1||S===0||S===1&&k===P-1&&k===R+1?P!==-1&&(d.base=d.name=R===0&&E?l.slice(1,P):l.slice(R,P)):(R===0&&E?(d.name=l.slice(1,k),d.base=l.slice(1,P)):(d.name=l.slice(R,k),d.base=l.slice(R,P)),d.ext=l.slice(k,P)),R>0?d.dir=l.slice(0,R-1):E&&(d.dir="/"),d},sep:"/",delimiter:":",win32:null,posix:null};c.posix=c,i.exports=c}},e={};function n(i){var s=e[i];if(s!==void 0)return s.exports;var a=e[i]={exports:{}};return t[i](a,a.exports,n),a.exports}n.d=(i,s)=>{for(var a in s)n.o(s,a)&&!n.o(i,a)&&Object.defineProperty(i,a,{enumerable:!0,get:s[a]})},n.o=(i,s)=>Object.prototype.hasOwnProperty.call(i,s),n.r=i=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0})};var r={};(()=>{let i;n.r(r),n.d(r,{URI:()=>E,Utils:()=>M}),typeof Go=="object"?i=Go.platform==="win32":typeof navigator=="object"&&(i=navigator.userAgent.indexOf("Windows")>=0);const s=/^\w[\w\d+.-]*$/,a=/^\//,c=/^\/\//;function l(I,Y){if(!I.scheme&&Y)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${I.authority}", path: "${I.path}", query: "${I.query}", fragment: "${I.fragment}"}`);if(I.scheme&&!s.test(I.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(I.path){if(I.authority){if(!a.test(I.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(c.test(I.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}const d="",h="/",m=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class E{constructor(Y,K,ne,ge,ye,De=!1){ri(this,"scheme");ri(this,"authority");ri(this,"path");ri(this,"query");ri(this,"fragment");typeof Y=="object"?(this.scheme=Y.scheme||d,this.authority=Y.authority||d,this.path=Y.path||d,this.query=Y.query||d,this.fragment=Y.fragment||d):(this.scheme=function(Be,nt){return Be||nt?Be:"file"}(Y,De),this.authority=K||d,this.path=function(Be,nt){switch(Be){case"https":case"http":case"file":nt?nt[0]!==h&&(nt=h+nt):nt=h}return nt}(this.scheme,ne||d),this.query=ge||d,this.fragment=ye||d,l(this,De))}static isUri(Y){return Y instanceof E||!!Y&&typeof Y.authority=="string"&&typeof Y.fragment=="string"&&typeof Y.path=="string"&&typeof Y.query=="string"&&typeof Y.scheme=="string"&&typeof Y.fsPath=="string"&&typeof Y.with=="function"&&typeof Y.toString=="function"}get fsPath(){return S(this,!1)}with(Y){if(!Y)return this;let{scheme:K,authority:ne,path:ge,query:ye,fragment:De}=Y;return K===void 0?K=this.scheme:K===null&&(K=d),ne===void 0?ne=this.authority:ne===null&&(ne=d),ge===void 0?ge=this.path:ge===null&&(ge=d),ye===void 0?ye=this.query:ye===null&&(ye=d),De===void 0?De=this.fragment:De===null&&(De=d),K===this.scheme&&ne===this.authority&&ge===this.path&&ye===this.query&&De===this.fragment?this:new R(K,ne,ge,ye,De)}static parse(Y,K=!1){const ne=m.exec(Y);return ne?new R(ne[2]||d,_(ne[4]||d),_(ne[5]||d),_(ne[7]||d),_(ne[9]||d),K):new R(d,d,d,d,d)}static file(Y){let K=d;if(i&&(Y=Y.replace(/\\/g,h)),Y[0]===h&&Y[1]===h){const ne=Y.indexOf(h,2);ne===-1?(K=Y.substring(2),Y=h):(K=Y.substring(2,ne),Y=Y.substring(ne)||h)}return new R("file",K,Y,d,d)}static from(Y){const K=new R(Y.scheme,Y.authority,Y.path,Y.query,Y.fragment);return l(K,!0),K}toString(Y=!1){return y(this,Y)}toJSON(){return this}static revive(Y){if(Y){if(Y instanceof E)return Y;{const K=new R(Y);return K._formatted=Y.external,K._fsPath=Y._sep===k?Y.fsPath:null,K}}return Y}}const k=i?1:void 0;class R extends E{constructor(){super(...arguments);ri(this,"_formatted",null);ri(this,"_fsPath",null)}get fsPath(){return this._fsPath||(this._fsPath=S(this,!1)),this._fsPath}toString(K=!1){return K?y(this,!0):(this._formatted||(this._formatted=y(this,!1)),this._formatted)}toJSON(){const K={$mid:1};return this._fsPath&&(K.fsPath=this._fsPath,K._sep=k),this._formatted&&(K.external=this._formatted),this.path&&(K.path=this.path),this.scheme&&(K.scheme=this.scheme),this.authority&&(K.authority=this.authority),this.query&&(K.query=this.query),this.fragment&&(K.fragment=this.fragment),K}}const P={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function A(I,Y,K){let ne,ge=-1;for(let ye=0;ye=97&&De<=122||De>=65&&De<=90||De>=48&&De<=57||De===45||De===46||De===95||De===126||Y&&De===47||K&&De===91||K&&De===93||K&&De===58)ge!==-1&&(ne+=encodeURIComponent(I.substring(ge,ye)),ge=-1),ne!==void 0&&(ne+=I.charAt(ye));else{ne===void 0&&(ne=I.substr(0,ye));const Be=P[De];Be!==void 0?(ge!==-1&&(ne+=encodeURIComponent(I.substring(ge,ye)),ge=-1),ne+=Be):ge===-1&&(ge=ye)}}return ge!==-1&&(ne+=encodeURIComponent(I.substring(ge))),ne!==void 0?ne:I}function N(I){let Y;for(let K=0;K1&&I.scheme==="file"?`//${I.authority}${I.path}`:I.path.charCodeAt(0)===47&&(I.path.charCodeAt(1)>=65&&I.path.charCodeAt(1)<=90||I.path.charCodeAt(1)>=97&&I.path.charCodeAt(1)<=122)&&I.path.charCodeAt(2)===58?Y?I.path.substr(1):I.path[1].toLowerCase()+I.path.substr(2):I.path,i&&(K=K.replace(/\//g,"\\")),K}function y(I,Y){const K=Y?N:A;let ne="",{scheme:ge,authority:ye,path:De,query:Be,fragment:nt}=I;if(ge&&(ne+=ge,ne+=":"),(ye||ge==="file")&&(ne+=h,ne+=h),ye){let Se=ye.indexOf("@");if(Se!==-1){const H=ye.substr(0,Se);ye=ye.substr(Se+1),Se=H.lastIndexOf(":"),Se===-1?ne+=K(H,!1,!1):(ne+=K(H.substr(0,Se),!1,!1),ne+=":",ne+=K(H.substr(Se+1),!1,!0)),ne+="@"}ye=ye.toLowerCase(),Se=ye.lastIndexOf(":"),Se===-1?ne+=K(ye,!1,!0):(ne+=K(ye.substr(0,Se),!1,!0),ne+=ye.substr(Se))}if(De){if(De.length>=3&&De.charCodeAt(0)===47&&De.charCodeAt(2)===58){const Se=De.charCodeAt(1);Se>=65&&Se<=90&&(De=`/${String.fromCharCode(Se+32)}:${De.substr(3)}`)}else if(De.length>=2&&De.charCodeAt(1)===58){const Se=De.charCodeAt(0);Se>=65&&Se<=90&&(De=`${String.fromCharCode(Se+32)}:${De.substr(2)}`)}ne+=K(De,!0,!1)}return Be&&(ne+="?",ne+=K(Be,!1,!1)),nt&&(ne+="#",ne+=Y?nt:A(nt,!1,!1)),ne}function D(I){try{return decodeURIComponent(I)}catch{return I.length>3?I.substr(0,3)+D(I.substr(3)):I}}const v=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function _(I){return I.match(v)?I.replace(v,Y=>D(Y)):I}var $=n(470);const q=$.posix||$,F="/";var M;(function(I){I.joinPath=function(Y,...K){return Y.with({path:q.join(Y.path,...K)})},I.resolvePath=function(Y,...K){let ne=Y.path,ge=!1;ne[0]!==F&&(ne=F+ne,ge=!0);let ye=q.resolve(ne,...K);return ge&&ye[0]===F&&!Y.authority&&(ye=ye.substring(1)),Y.with({path:ye})},I.dirname=function(Y){if(Y.path.length===0||Y.path===F)return Y;let K=q.dirname(Y.path);return K.length===1&&K.charCodeAt(0)===46&&(K=""),Y.with({path:K})},I.basename=function(Y){return q.basename(Y.path)},I.extname=function(Y){return q.extname(Y.path)}})(M||(M={}))})(),g1=r})();const{URI:Yr,Utils:T9}=g1;function y1(t,e){if(t.length0?t.lastIndexOf(e)===n:n===0?t===e:!1}function EA(t){return y1(t,"(?i)")?new RegExp(t.substring(4),"i"):new RegExp(t)}function uu(t){return typeof t=="boolean"}class Pc{constructor(e,n,r,i){this._uri=e,this._languageId=n,this._version=r,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){const n=this.offsetAt(e.start),r=this.offsetAt(e.end);return this._content.substring(n,r)}return this._content}update(e,n){for(const r of e)if(Pc.isIncremental(r)){const i=D1(r.range),s=this.offsetAt(i.start),a=this.offsetAt(i.end);this._content=this._content.substring(0,s)+r.text+this._content.substring(a,this._content.length);const c=Math.max(i.start.line,0),l=Math.max(i.end.line,0);let d=this._lineOffsets;const h=v1(r.text,!1,s);if(l-c===h.length)for(let E=0,k=h.length;Ee?i=a:r=a+1}const s=r-1;return e=this.ensureBeforeEOL(e,n[s]),{line:s,character:e-n[s]}}offsetAt(e){const n=this.getLineOffsets();if(e.line>=n.length)return this._content.length;if(e.line<0)return 0;const r=n[e.line];if(e.character<=0)return r;const i=e.line+1n&&b1(this._content.charCodeAt(e-1));)e--;return e}get lineCount(){return this.getLineOffsets().length}static isIncremental(e){const n=e;return n!=null&&typeof n.text=="string"&&n.range!==void 0&&(n.rangeLength===void 0||typeof n.rangeLength=="number")}static isFull(e){const n=e;return n!=null&&typeof n.text=="string"&&n.range===void 0&&n.rangeLength===void 0}}var Wf;(function(t){function e(i,s,a,c){return new Pc(i,s,a,c)}t.create=e;function n(i,s,a){if(i instanceof Pc)return i.update(s,a),i;throw new Error("TextDocument.update: document must be created by TextDocument.create")}t.update=n;function r(i,s){const a=i.getText(),c=zm(s.map(SA),(h,m)=>{const E=h.range.start.line-m.range.start.line;return E===0?h.range.start.character-m.range.start.character:E});let l=0;const d=[];for(const h of c){const m=i.offsetAt(h.range.start);if(ml&&d.push(a.substring(l,m)),h.newText.length&&d.push(h.newText),l=i.offsetAt(h.range.end)}return d.push(a.substr(l)),d.join("")}t.applyEdits=r})(Wf||(Wf={}));function zm(t,e){if(t.length<=1)return t;const n=t.length/2|0,r=t.slice(0,n),i=t.slice(n);zm(r,e),zm(i,e);let s=0,a=0,c=0;for(;sn.line||e.line===n.line&&e.character>n.character?{start:n,end:e}:t}function SA(t){const e=D1(t.range);return e!==t.range?{newText:t.newText,range:e}:t}var Ir;(function(t){t[t.Undefined=0]="Undefined",t[t.EnumValueMismatch=1]="EnumValueMismatch",t[t.Deprecated=2]="Deprecated",t[t.UnexpectedEndOfComment=257]="UnexpectedEndOfComment",t[t.UnexpectedEndOfString=258]="UnexpectedEndOfString",t[t.UnexpectedEndOfNumber=259]="UnexpectedEndOfNumber",t[t.InvalidUnicode=260]="InvalidUnicode",t[t.InvalidEscapeCharacter=261]="InvalidEscapeCharacter",t[t.InvalidCharacter=262]="InvalidCharacter",t[t.PropertyExpected=513]="PropertyExpected",t[t.CommaExpected=514]="CommaExpected",t[t.ColonExpected=515]="ColonExpected",t[t.ValueExpected=516]="ValueExpected",t[t.CommaOrCloseBacketExpected=517]="CommaOrCloseBacketExpected",t[t.CommaOrCloseBraceExpected=518]="CommaOrCloseBraceExpected",t[t.TrailingComma=519]="TrailingComma",t[t.DuplicateKey=520]="DuplicateKey",t[t.CommentNotPermitted=521]="CommentNotPermitted",t[t.SchemaResolveError=768]="SchemaResolveError"})(Ir||(Ir={}));var w1;(function(t){t.LATEST={textDocument:{completion:{completionItem:{documentationFormat:[Ji.Markdown,Ji.PlainText],commitCharactersSupport:!0}}}}})(w1||(w1={}));var $s={},Uf={};Object.defineProperty(Uf,"__esModule",{value:!0});var Ym;function Gm(){if(Ym===void 0)throw new Error("No runtime abstraction layer installed");return Ym}(function(t){function e(n){if(n===void 0)throw new Error("No runtime abstraction layer provided");Ym=n}t.install=e})(Gm||(Gm={})),Uf.default=Gm;var Jm={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.config=t.loadMessageBundle=t.localize=t.format=t.setPseudo=t.isPseudo=t.isDefined=t.BundleFormat=t.MessageFormat=void 0;var e=Uf;(function(d){d.file="file",d.bundle="bundle",d.both="both"})(t.MessageFormat||(t.MessageFormat={})),function(d){d.standalone="standalone",d.languagePack="languagePack"}(t.BundleFormat||(t.BundleFormat={}));var n;(function(d){function h(m){var E=m;return E&&r(E.key)&&r(E.comment)}d.is=h})(n||(n={}));function r(d){return typeof d<"u"}t.isDefined=r,t.isPseudo=!1;function i(d){t.isPseudo=d}t.setPseudo=i;function s(d,h){var m;return t.isPseudo&&(d="\uFF3B"+d.replace(/[aouei]/g,"$&$&")+"\uFF3D"),h.length===0?m=d:m=d.replace(/\{(\d+)\}/g,function(E,k){var R=k[0],P=h[R],A=E;return typeof P=="string"?A=P:(typeof P=="number"||typeof P=="boolean"||P===void 0||P===null)&&(A=String(P)),A}),m}t.format=s;function a(d,h){for(var m=[],E=2;E1&&(m==="/"||m===void 0||m==="{"||m===",")&&(k==="/"||k===void 0||k===","||k==="}");R?(k==="/"?d++:m==="/"&&r.endsWith("\\/")&&(r=r.substr(0,r.length-2)),r+="((?:[^/]*(?:/|$))*)"):r+="([^/]*)"}break;default:r+=l}return(!c||!~c.indexOf("g"))&&(r="^"+r+"$"),new RegExp(r,c)}var io=$s.loadMessageBundle(),AA="!",CA="/",OA=function(){function t(e,n){this.globWrappers=[];try{for(var r=0,i=e;r0&&(s[0]===CA&&(s=s.substring(1)),this.globWrappers.push({regexp:kA("**/"+s,{extended:!0,globstar:!0}),include:a}))}this.uris=n}catch{this.globWrappers.length=0,this.uris=[]}}return t.prototype.matchesPattern=function(e){for(var n=!1,r=0,i=this.globWrappers;r0;)this.callOnDispose.pop()()},t.prototype.onResourceChange=function(e){var n=this;this.cachedSchemaForResource=void 0;var r=!1;e=so(e);for(var i=[e],s=Object.keys(this.schemasById).map(function(d){return n.schemasById[d]});i.length;)for(var a=i.pop(),c=0;c1&&(i=s[1]),Km(i,".")&&(i=i.substr(0,i.length-1)),new Pi({},[io("json.schema.nocontent","Unable to load schema from '{0}': {1}.",Hf(e),i)])})},t.prototype.resolveSchemaContent=function(e,n,r){var i=this,s=e.errors.slice(0),a=e.schema;if(a.$schema){var c=so(a.$schema);if(c==="http://json-schema.org/draft-03/schema")return this.promise.resolve(new Fc({},[io("json.schema.draft03.notsupported","Draft-03 schemas are not supported.")]));c==="https://json-schema.org/draft/2019-09/schema"&&s.push(io("json.schema.draft201909.notsupported","Draft 2019-09 schemas are not yet fully supported."))}var l=this.contextService,d=function(k,R){if(!R)return k;var P=k;return R[0]==="/"&&(R=R.substr(1)),R.split("/").some(function(A){return A=A.replace(/~1/g,"/").replace(/~0/g,"~"),P=P[A],!P}),P},h=function(k,R,P,A){var N=A?decodeURIComponent(A):void 0,S=d(R,N);if(S)for(var y in S)S.hasOwnProperty(y)&&!k.hasOwnProperty(y)&&(k[y]=S[y]);else s.push(io("json.schema.invalidref","$ref '{0}' in '{1}' can not be resolved.",N,P))},m=function(k,R,P,A,N){l&&!/^[A-Za-z][A-Za-z0-9+\-.+]*:\/\/.*/.test(R)&&(R=l.resolveRelativePath(R,A)),R=so(R);var S=i.getOrAddSchemaHandle(R);return S.getUnresolvedSchema().then(function(y){if(N[R]=!0,y.errors.length){var D=P?R+"#"+P:R;s.push(io("json.schema.problemloadingref","Problems loading reference '{0}': {1}",D,y.errors[0]))}return h(k,y.schema,R,P),E(k,y.schema,R,S.dependencies)})},E=function(k,R,P,A){if(!k||typeof k!="object")return Promise.resolve(null);for(var N=[k],S=[],y=[],D=function(){for(var F=[],M=0;M0){y.push(m(F,Y[0],Y[1],P,A));return}else M.indexOf(I)===-1&&(h(F,R,P,Y[1]),M.push(I))}D(F.items,F.additionalItems,F.additionalProperties,F.not,F.contains,F.propertyNames,F.if,F.then,F.else),v(F.definitions,F.properties,F.patternProperties,F.dependencies),_(F.anyOf,F.allOf,F.oneOf,F.items)};N.length;){var q=N.pop();S.indexOf(q)>=0||(S.push(q),$(q))}return i.promise.all(y)};return E(a,a,n,r).then(function(k){return new Fc(a,s)})},t.prototype.getSchemaForResource=function(e,n){if(n&&n.root&&n.root.type==="object"){var r=n.root.properties.filter(function(N){return N.keyNode.value==="$schema"&&N.valueNode&&N.valueNode.type==="string"});if(r.length>0){var i=r[0].valueNode;if(i&&i.type==="string"){var s=Vf(i);if(s&&y1(s,".")&&this.contextService&&(s=this.contextService.resolveRelativePath(s,e)),s){var a=so(s);return this.getOrAddSchemaHandle(a).getResolvedSchema()}}}}if(this.cachedSchemaForResource&&this.cachedSchemaForResource.resource===e)return this.cachedSchemaForResource.resolvedSchema;for(var c=Object.create(null),l=[],d=RA(e),h=0,m=this.filePatternAssociations;h0?this.createCombinedSchema(e,l).getResolvedSchema():this.promise.resolve(void 0);return this.cachedSchemaForResource={resource:e,resolvedSchema:A},A},t.prototype.createCombinedSchema=function(e,n){if(n.length===1)return this.getOrAddSchemaHandle(n[0]);var r="schemaservice://combinedSchema/"+encodeURIComponent(e),i={allOf:n.map(function(s){return{$ref:s}})};return this.addSchemaHandle(r,i)},t.prototype.getMatchingSchemas=function(e,n,r){if(r){var i=r.id||"schemaservice://untitled/matchingSchemas/"+FA++;return this.resolveSchemaContent(new Pi(r),i,{}).then(function(s){return n.getMatchingSchemas(s.schema).filter(function(a){return!a.inverted})})}return this.getSchemaForResource(e.uri,n).then(function(s){return s?n.getMatchingSchemas(s.schema).filter(function(a){return!a.inverted}):[]})},t}(),FA=0;function so(t){try{return Yr.parse(t).toString()}catch{return t}}function RA(t){try{return Yr.parse(t).with({fragment:null,query:null}).toString()}catch{return t}}function Hf(t){try{var e=Yr.parse(t);if(e.scheme==="file")return e.fsPath}catch{}return t}function IA(t){return t.replace(/[-\\{}+?|^$.,[\]()#\s]/g,"\\$&").replace(/[*]/g,".*")}function MA(t,e){if(t.length!!t&&typeof t=="object"&&t[ui]===Qm,Kf=t=>!!t&&typeof t=="object"&&t[ui]===Xm,Nn=t=>!!t&&typeof t=="object"&&t[ui]===oo,Xt=t=>!!t&&typeof t=="object"&&t[ui]===E1,yt=t=>!!t&&typeof t=="object"&&t[ui]===Es,xn=t=>!!t&&typeof t=="object"&&t[ui]===cu;function Fn(t){if(t&&typeof t=="object")switch(t[ui]){case oo:case cu:return!0}return!1}function on(t){if(t&&typeof t=="object")switch(t[ui]){case Qm:case oo:case Es:case cu:return!0}return!1}const jA=t=>(yt(t)||Fn(t))&&!!t.anchor;class Zm{constructor(e){Object.defineProperty(this,ui,{value:e})}clone(){const e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}}const Xo=Symbol("break visit"),xA=Symbol("skip children"),Rc=Symbol("remove node");function gn(t,e){const n=BA(e);Kf(t)?lu(null,t.contents,n,Object.freeze([t]))===Rc&&(t.contents=null):lu(null,t,n,Object.freeze([]))}gn.BREAK=Xo,gn.SKIP=xA,gn.REMOVE=Rc;function lu(t,e,n,r){const i=qA(t,e,n,r);if(on(i)||Xt(i))return WA(t,r,i),lu(t,i,n,r);if(typeof i!="symbol"){if(Fn(e)){r=Object.freeze(r.concat(e));for(let s=0;st.replace(/[!,[\]{}]/g,e=>UA[e]);class wr{constructor(e,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},wr.defaultYaml,e),this.tags=Object.assign({},wr.defaultTags,n)}clone(){const e=new wr(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){const e=new wr(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:wr.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},wr.defaultTags);break}return e}add(e,n){this.atNextDocument&&(this.yaml={explicit:wr.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},wr.defaultTags),this.atNextDocument=!1);const r=e.trim().split(/[ \t]+/),i=r.shift();switch(i){case"%TAG":{if(r.length!==2&&(n(0,"%TAG directive should contain exactly two parts"),r.length<2))return!1;const[s,a]=r;return this.tags[s]=a,!0}case"%YAML":{if(this.yaml.explicit=!0,r.length!==1)return n(0,"%YAML directive should contain exactly one part"),!1;const[s]=r;if(s==="1.1"||s==="1.2")return this.yaml.version=s,!0;{const a=/^\d+\.\d+$/.test(s);return n(6,`Unsupported YAML version ${s}`,a),!1}}default:return n(0,`Unknown directive ${i}`,!0),!1}}tagName(e,n){if(e==="!")return"!";if(e[0]!=="!")return n(`Not a valid tag: ${e}`),null;if(e[1]==="<"){const a=e.slice(2,-1);return a==="!"||a==="!!"?(n(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==">"&&n("Verbatim tags must end with a >"),a)}const[,r,i]=e.match(/^(.*!)([^!]*)$/);i||n(`The ${e} tag has no suffix`);const s=this.tags[r];return s?s+decodeURIComponent(i):r==="!"?e:(n(`Could not resolve tag: ${e}`),null)}tagString(e){for(const[n,r]of Object.entries(this.tags))if(e.startsWith(r))return n+VA(e.substring(r.length));return e[0]==="!"?e:`!<${e}>`}toString(e){const n=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],r=Object.entries(this.tags);let i;if(e&&r.length>0&&on(e.contents)){const s={};gn(e.contents,(a,c)=>{on(c)&&c.tag&&(s[c.tag]=!0)}),i=Object.keys(s)}else i=[];for(const[s,a]of r)s==="!!"&&a==="tag:yaml.org,2002:"||(!e||i.some(c=>c.startsWith(a)))&&n.push(`%TAG ${s} ${a}`);return n.join(` -`)}}wr.defaultYaml={explicit:!1,version:"1.2"},wr.defaultTags={"!!":"tag:yaml.org,2002:"};function S1(t){if(/[\x00-\x19\s,[\]{}]/.test(t)){const n=`Anchor must not contain whitespace or control characters: ${JSON.stringify(t)}`;throw new Error(n)}return!0}function T1(t){const e=new Set;return gn(t,{Value(n,r){r.anchor&&e.add(r.anchor)}}),e}function k1(t,e){for(let n=1;;++n){const r=`${t}${n}`;if(!e.has(r))return r}}function HA(t,e){const n=[],r=new Map;let i=null;return{onAnchor:s=>{n.push(s),i||(i=T1(t));const a=k1(e,i);return i.add(a),a},setAnchors:()=>{for(const s of n){const a=r.get(s);if(typeof a=="object"&&a.anchor&&(yt(a.node)||Fn(a.node)))a.node.anchor=a.anchor;else{const c=new Error("Failed to resolve repeated object (this should not happen)");throw c.source=s,c}}},sourceObjects:r}}class eg extends Zm{constructor(e){super(Qm),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e){let n;return gn(e,{Node:(r,i)=>{if(i===this)return gn.BREAK;i.anchor===this.source&&(n=i)}}),n}toJSON(e,n){if(!n)return{source:this.source};const{anchors:r,doc:i,maxAliasCount:s}=n,a=this.resolve(i);if(!a){const l=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(l)}const c=r.get(a);if(!c||c.res===void 0){const l="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(l)}if(s>=0&&(c.count+=1,c.aliasCount===0&&(c.aliasCount=zf(i,a,r)),c.count*c.aliasCount>s)){const l="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(l)}return c.res}toString(e,n,r){const i=`*${this.source}`;if(e){if(S1(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){const s=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(s)}if(e.implicitKey)return`${i} `}return i}}function zf(t,e,n){if(ts(e)){const r=e.resolve(t),i=n&&r&&n.get(r);return i?i.count*i.aliasCount:0}else if(Fn(e)){let r=0;for(const i of e.items){const s=zf(t,i,n);s>r&&(r=s)}return r}else if(Xt(e)){const r=zf(t,e.key,n),i=zf(t,e.value,n);return Math.max(r,i)}return 1}function ns(t,e,n){if(Array.isArray(t))return t.map((r,i)=>ns(r,String(i),n));if(t&&typeof t.toJSON=="function"){if(!n||!jA(t))return t.toJSON(e,n);const r={aliasCount:0,count:1,res:void 0};n.anchors.set(t,r),n.onCreate=s=>{r.res=s,delete n.onCreate};const i=t.toJSON(e,n);return n.onCreate&&n.onCreate(i),i}return typeof t=="bigint"&&!(n!=null&&n.keep)?Number(t):t}const A1=t=>!t||typeof t!="function"&&typeof t!="object";class Et extends Zm{constructor(e){super(Es),this.value=e}toJSON(e,n){return n!=null&&n.keep?this.value:ns(this.value,e,n)}toString(){return String(this.value)}}Et.BLOCK_FOLDED="BLOCK_FOLDED",Et.BLOCK_LITERAL="BLOCK_LITERAL",Et.PLAIN="PLAIN",Et.QUOTE_DOUBLE="QUOTE_DOUBLE",Et.QUOTE_SINGLE="QUOTE_SINGLE";const KA="tag:yaml.org,2002:";function zA(t,e,n){var r;if(e){const i=n.filter(a=>a.tag===e),s=(r=i.find(a=>!a.format))!=null?r:i[0];if(!s)throw new Error(`Tag ${e} not found`);return s}return n.find(i=>{var s;return((s=i.identify)==null?void 0:s.call(i,t))&&!i.format})}function Ic(t,e,n){var m,E;if(Kf(t)&&(t=t.contents),on(t))return t;if(Xt(t)){const k=(E=(m=n.schema[oo]).createNode)==null?void 0:E.call(m,n.schema,null,n);return k.items.push(t),k}(t instanceof String||t instanceof Number||t instanceof Boolean||typeof BigInt<"u"&&t instanceof BigInt)&&(t=t.valueOf());const{aliasDuplicateObjects:r,onAnchor:i,onTagObj:s,schema:a,sourceObjects:c}=n;let l;if(r&&t&&typeof t=="object"){if(l=c.get(t),l)return l.anchor||(l.anchor=i(t)),new eg(l.anchor);l={anchor:null,node:null},c.set(t,l)}e!=null&&e.startsWith("!!")&&(e=KA+e.slice(2));let d=zA(t,e,a.tags);if(!d){if(t&&typeof t.toJSON=="function"&&(t=t.toJSON()),!t||typeof t!="object"){const k=new Et(t);return l&&(l.node=k),k}d=t instanceof Map?a[oo]:Symbol.iterator in Object(t)?a[cu]:a[oo]}s&&(s(d),delete n.onTagObj);const h=d!=null&&d.createNode?d.createNode(n.schema,t,n):new Et(t);return e&&(h.tag=e),l&&(l.node=h),h}function Yf(t,e,n){let r=n;for(let i=e.length-1;i>=0;--i){const s=e[i];if(typeof s=="number"&&Number.isInteger(s)&&s>=0){const a=[];a[s]=r,r=a}else r=new Map([[s,r]])}return Ic(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:t,sourceObjects:new Map})}const Mc=t=>t==null||typeof t=="object"&&!!t[Symbol.iterator]().next().done;class Gf extends Zm{constructor(e,n){super(e),Object.defineProperty(this,"schema",{value:n,configurable:!0,enumerable:!1,writable:!0})}clone(e){const n=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(n.schema=e),n.items=n.items.map(r=>on(r)||Xt(r)?r.clone(e):r),this.range&&(n.range=this.range.slice()),n}addIn(e,n){if(Mc(e))this.add(n);else{const[r,...i]=e,s=this.get(r,!0);if(Fn(s))s.addIn(i,n);else if(s===void 0&&this.schema)this.set(r,Yf(this.schema,i,n));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${i}`)}}deleteIn(e){const[n,...r]=e;if(r.length===0)return this.delete(n);const i=this.get(n,!0);if(Fn(i))return i.deleteIn(r);throw new Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}getIn(e,n){const[r,...i]=e,s=this.get(r,!0);return i.length===0?!n&&yt(s)?s.value:s:Fn(s)?s.getIn(i,n):void 0}hasAllNullValues(e){return this.items.every(n=>{if(!Xt(n))return!1;const r=n.value;return r==null||e&&yt(r)&&r.value==null&&!r.commentBefore&&!r.comment&&!r.tag})}hasIn(e){const[n,...r]=e;if(r.length===0)return this.has(n);const i=this.get(n,!0);return Fn(i)?i.hasIn(r):!1}setIn(e,n){const[r,...i]=e;if(i.length===0)this.set(r,n);else{const s=this.get(r,!0);if(Fn(s))s.setIn(i,n);else if(s===void 0&&this.schema)this.set(r,Yf(this.schema,i,n));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${i}`)}}}Gf.maxFlowStringSingleLineLength=60;const YA=t=>t.replace(/^(?!$)(?: $)?/gm,"#");function Ss(t,e){return/^\n+$/.test(t)?t.substring(1):e?t.replace(/^(?! *$)/gm,e):t}const ao=(t,e,n)=>t.endsWith(` +`+" ".repeat(e));var qf;(function(t){t.DEFAULT={allowTrailingComma:!1}})(qf||(qf={}));function gA(t,e=[],n=qf.DEFAULT){let r=null,i=[];const s=[];function a(l){Array.isArray(i)?i.push(l):r!==null&&(i[r]=l)}return yA(t,{onObjectBegin:()=>{const l={};a(l),s.push(i),i=l,r=null},onObjectProperty:l=>{r=l},onObjectEnd:()=>{i=s.pop()},onArrayBegin:()=>{const l=[];a(l),s.push(i),i=l,r=null},onArrayEnd:()=>{i=s.pop()},onLiteralValue:a,onError:(l,d,h)=>{e.push({error:l,offset:d,length:h})}},n),i[0]}function Um(t){switch(t.type){case"array":return t.children.map(Um);case"object":const e=Object.create(null);for(let n of t.children){const r=n.children[1];r&&(e[n.children[0].value]=Um(r))}return e;case"null":case"string":case"number":case"boolean":return t.value;default:return}}function yA(t,e,n=qf.DEFAULT){const r=mA(t,!1),i=[];let s=0;function a(ne){return ne?()=>s===0&&ne(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}function c(ne){return ne?ge=>s===0&&ne(ge,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}function l(ne){return ne?ge=>s===0&&ne(ge,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),()=>i.slice()):()=>!0}function d(ne){return ne?()=>{s>0?s++:ne(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),()=>i.slice())===!1&&(s=1)}:()=>!0}function h(ne){return ne?()=>{s>0&&s--,s===0&&ne(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter())}:()=>!0}const m=d(e.onObjectBegin),E=l(e.onObjectProperty),T=h(e.onObjectEnd),R=d(e.onArrayBegin),P=h(e.onArrayEnd),A=l(e.onLiteralValue),F=c(e.onSeparator),S=a(e.onComment),y=c(e.onError),D=n&&n.disallowComments,v=n&&n.allowTrailingComma;function _(){for(;;){const ne=r.scan();switch(r.getTokenError()){case 4:$(14);break;case 5:$(15);break;case 3:$(13);break;case 1:D||$(11);break;case 2:$(12);break;case 6:$(16);break}switch(ne){case 12:case 13:D?$(10):S();break;case 16:$(1);break;case 15:case 14:break;default:return ne}}}function $(ne,ge=[],ye=[]){if(y(ne),ge.length+ye.length>0){let De=r.getToken();for(;De!==17;){if(ge.indexOf(De)!==-1){_();break}else if(ye.indexOf(De)!==-1)break;De=_()}}}function q(ne){const ge=r.getTokenValue();return ne?A(ge):(E(ge),i.push(ge)),_(),!0}function N(){switch(r.getToken()){case 11:const ne=r.getTokenValue();let ge=Number(ne);isNaN(ge)&&($(2),ge=0),A(ge);break;case 7:A(null);break;case 8:A(!0);break;case 9:A(!1);break;default:return!1}return _(),!0}function M(){return r.getToken()!==10?($(3,[],[2,5]),!1):(q(!1),r.getToken()===6?(F(":"),_(),K()||$(4,[],[2,5])):$(5,[],[2,5]),i.pop(),!0)}function I(){m(),_();let ne=!1;for(;r.getToken()!==2&&r.getToken()!==17;){if(r.getToken()===5){if(ne||$(4,[],[]),F(","),_(),r.getToken()===2&&v)break}else ne&&$(6,[],[]);M()||$(4,[],[2,5]),ne=!0}return T(),r.getToken()!==2?$(7,[2],[]):_(),!0}function Y(){R(),_();let ne=!0,ge=!1;for(;r.getToken()!==4&&r.getToken()!==17;){if(r.getToken()===5){if(ge||$(4,[],[]),F(","),_(),r.getToken()===4&&v)break}else ge&&$(6,[],[]);ne?(i.push(0),ne=!1):i[i.length-1]++,K()||$(4,[],[4,5]),ge=!0}return P(),ne||i.pop(),r.getToken()!==4?$(8,[4],[]):_(),!0}function K(){switch(r.getToken()){case 3:return Y();case 1:return I();case 10:return q(!0);default:return N()}}return _(),r.getToken()===17?n.allowEmptyContent?!0:($(4,[],[]),!1):K()?(r.getToken()!==17&&$(9,[],[]),!0):($(4,[],[]),!1)}var c1;(function(t){t[t.None=0]="None",t[t.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",t[t.UnexpectedEndOfString=2]="UnexpectedEndOfString",t[t.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",t[t.InvalidUnicode=4]="InvalidUnicode",t[t.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",t[t.InvalidCharacter=6]="InvalidCharacter"})(c1||(c1={}));var l1;(function(t){t[t.OpenBraceToken=1]="OpenBraceToken",t[t.CloseBraceToken=2]="CloseBraceToken",t[t.OpenBracketToken=3]="OpenBracketToken",t[t.CloseBracketToken=4]="CloseBracketToken",t[t.CommaToken=5]="CommaToken",t[t.ColonToken=6]="ColonToken",t[t.NullKeyword=7]="NullKeyword",t[t.TrueKeyword=8]="TrueKeyword",t[t.FalseKeyword=9]="FalseKeyword",t[t.StringLiteral=10]="StringLiteral",t[t.NumericLiteral=11]="NumericLiteral",t[t.LineCommentTrivia=12]="LineCommentTrivia",t[t.BlockCommentTrivia=13]="BlockCommentTrivia",t[t.LineBreakTrivia=14]="LineBreakTrivia",t[t.Trivia=15]="Trivia",t[t.Unknown=16]="Unknown",t[t.EOF=17]="EOF"})(l1||(l1={}));const vA=gA,bA=Um;var f1;(function(t){t[t.InvalidSymbol=1]="InvalidSymbol",t[t.InvalidNumberFormat=2]="InvalidNumberFormat",t[t.PropertyNameExpected=3]="PropertyNameExpected",t[t.ValueExpected=4]="ValueExpected",t[t.ColonExpected=5]="ColonExpected",t[t.CommaExpected=6]="CommaExpected",t[t.CloseBraceExpected=7]="CloseBraceExpected",t[t.CloseBracketExpected=8]="CloseBracketExpected",t[t.EndOfFileExpected=9]="EndOfFileExpected",t[t.InvalidCommentToken=10]="InvalidCommentToken",t[t.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",t[t.UnexpectedEndOfString=12]="UnexpectedEndOfString",t[t.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",t[t.InvalidUnicode=14]="InvalidUnicode",t[t.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",t[t.InvalidCharacter=16]="InvalidCharacter"})(f1||(f1={}));function DA(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var d1={exports:{}},jn=d1.exports={},Zi,es;function Vm(){throw new Error("setTimeout has not been defined")}function Hm(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?Zi=setTimeout:Zi=Vm}catch{Zi=Vm}try{typeof clearTimeout=="function"?es=clearTimeout:es=Hm}catch{es=Hm}})();function h1(t){if(Zi===setTimeout)return setTimeout(t,0);if((Zi===Vm||!Zi)&&setTimeout)return Zi=setTimeout,setTimeout(t,0);try{return Zi(t,0)}catch{try{return Zi.call(null,t,0)}catch{return Zi.call(this,t,0)}}}function wA(t){if(es===clearTimeout)return clearTimeout(t);if((es===Hm||!es)&&clearTimeout)return es=clearTimeout,clearTimeout(t);try{return es(t)}catch{try{return es.call(null,t)}catch{return es.call(this,t)}}}var ws=[],au=!1,Yo,Wf=-1;function _A(){!au||!Yo||(au=!1,Yo.length?ws=Yo.concat(ws):Wf=-1,ws.length&&p1())}function p1(){if(!au){var t=h1(_A);au=!0;for(var e=ws.length;e;){for(Yo=ws,ws=[];++Wf1)for(var n=1;n{var t={470:i=>{function s(l){if(typeof l!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(l))}function a(l,d){for(var h,m="",E=0,T=-1,R=0,P=0;P<=l.length;++P){if(P2){var A=m.lastIndexOf("/");if(A!==m.length-1){A===-1?(m="",E=0):E=(m=m.slice(0,A)).length-1-m.lastIndexOf("/"),T=P,R=0;continue}}else if(m.length===2||m.length===1){m="",E=0,T=P,R=0;continue}}d&&(m.length>0?m+="/..":m="..",E=2)}else m.length>0?m+="/"+l.slice(T+1,P):m=l.slice(T+1,P),E=P-T-1;T=P,R=0}else h===46&&R!==-1?++R:R=-1}return m}var c={resolve:function(){for(var l,d="",h=!1,m=arguments.length-1;m>=-1&&!h;m--){var E;m>=0?E=arguments[m]:(l===void 0&&(l=Go.cwd()),E=l),s(E),E.length!==0&&(d=E+"/"+d,h=E.charCodeAt(0)===47)}return d=a(d,!h),h?d.length>0?"/"+d:"/":d.length>0?d:"."},normalize:function(l){if(s(l),l.length===0)return".";var d=l.charCodeAt(0)===47,h=l.charCodeAt(l.length-1)===47;return(l=a(l,!d)).length!==0||d||(l="."),l.length>0&&h&&(l+="/"),d?"/"+l:l},isAbsolute:function(l){return s(l),l.length>0&&l.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var l,d=0;d0&&(l===void 0?l=h:l+="/"+h)}return l===void 0?".":c.normalize(l)},relative:function(l,d){if(s(l),s(d),l===d||(l=c.resolve(l))===(d=c.resolve(d)))return"";for(var h=1;hP){if(d.charCodeAt(T+F)===47)return d.slice(T+F+1);if(F===0)return d.slice(T+F)}else E>P&&(l.charCodeAt(h+F)===47?A=F:F===0&&(A=0));break}var S=l.charCodeAt(h+F);if(S!==d.charCodeAt(T+F))break;S===47&&(A=F)}var y="";for(F=h+A+1;F<=m;++F)F!==m&&l.charCodeAt(F)!==47||(y.length===0?y+="..":y+="/..");return y.length>0?y+d.slice(T+A):(T+=A,d.charCodeAt(T)===47&&++T,d.slice(T))},_makeLong:function(l){return l},dirname:function(l){if(s(l),l.length===0)return".";for(var d=l.charCodeAt(0),h=d===47,m=-1,E=!0,T=l.length-1;T>=1;--T)if((d=l.charCodeAt(T))===47){if(!E){m=T;break}}else E=!1;return m===-1?h?"/":".":h&&m===1?"//":l.slice(0,m)},basename:function(l,d){if(d!==void 0&&typeof d!="string")throw new TypeError('"ext" argument must be a string');s(l);var h,m=0,E=-1,T=!0;if(d!==void 0&&d.length>0&&d.length<=l.length){if(d.length===l.length&&d===l)return"";var R=d.length-1,P=-1;for(h=l.length-1;h>=0;--h){var A=l.charCodeAt(h);if(A===47){if(!T){m=h+1;break}}else P===-1&&(T=!1,P=h+1),R>=0&&(A===d.charCodeAt(R)?--R==-1&&(E=h):(R=-1,E=P))}return m===E?E=P:E===-1&&(E=l.length),l.slice(m,E)}for(h=l.length-1;h>=0;--h)if(l.charCodeAt(h)===47){if(!T){m=h+1;break}}else E===-1&&(T=!1,E=h+1);return E===-1?"":l.slice(m,E)},extname:function(l){s(l);for(var d=-1,h=0,m=-1,E=!0,T=0,R=l.length-1;R>=0;--R){var P=l.charCodeAt(R);if(P!==47)m===-1&&(E=!1,m=R+1),P===46?d===-1?d=R:T!==1&&(T=1):d!==-1&&(T=-1);else if(!E){h=R+1;break}}return d===-1||m===-1||T===0||T===1&&d===m-1&&d===h+1?"":l.slice(d,m)},format:function(l){if(l===null||typeof l!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof l);return function(d,h){var m=h.dir||h.root,E=h.base||(h.name||"")+(h.ext||"");return m?m===h.root?m+E:m+"/"+E:E}(0,l)},parse:function(l){s(l);var d={root:"",dir:"",base:"",ext:"",name:""};if(l.length===0)return d;var h,m=l.charCodeAt(0),E=m===47;E?(d.root="/",h=1):h=0;for(var T=-1,R=0,P=-1,A=!0,F=l.length-1,S=0;F>=h;--F)if((m=l.charCodeAt(F))!==47)P===-1&&(A=!1,P=F+1),m===46?T===-1?T=F:S!==1&&(S=1):T!==-1&&(S=-1);else if(!A){R=F+1;break}return T===-1||P===-1||S===0||S===1&&T===P-1&&T===R+1?P!==-1&&(d.base=d.name=R===0&&E?l.slice(1,P):l.slice(R,P)):(R===0&&E?(d.name=l.slice(1,T),d.base=l.slice(1,P)):(d.name=l.slice(R,T),d.base=l.slice(R,P)),d.ext=l.slice(T,P)),R>0?d.dir=l.slice(0,R-1):E&&(d.dir="/"),d},sep:"/",delimiter:":",win32:null,posix:null};c.posix=c,i.exports=c}},e={};function n(i){var s=e[i];if(s!==void 0)return s.exports;var a=e[i]={exports:{}};return t[i](a,a.exports,n),a.exports}n.d=(i,s)=>{for(var a in s)n.o(s,a)&&!n.o(i,a)&&Object.defineProperty(i,a,{enumerable:!0,get:s[a]})},n.o=(i,s)=>Object.prototype.hasOwnProperty.call(i,s),n.r=i=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0})};var r={};(()=>{let i;n.r(r),n.d(r,{URI:()=>E,Utils:()=>M}),typeof Go=="object"?i=Go.platform==="win32":typeof navigator=="object"&&(i=navigator.userAgent.indexOf("Windows")>=0);const s=/^\w[\w\d+.-]*$/,a=/^\//,c=/^\/\//;function l(I,Y){if(!I.scheme&&Y)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${I.authority}", path: "${I.path}", query: "${I.query}", fragment: "${I.fragment}"}`);if(I.scheme&&!s.test(I.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(I.path){if(I.authority){if(!a.test(I.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(c.test(I.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}const d="",h="/",m=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class E{constructor(Y,K,ne,ge,ye,De=!1){ri(this,"scheme");ri(this,"authority");ri(this,"path");ri(this,"query");ri(this,"fragment");typeof Y=="object"?(this.scheme=Y.scheme||d,this.authority=Y.authority||d,this.path=Y.path||d,this.query=Y.query||d,this.fragment=Y.fragment||d):(this.scheme=function(Be,nt){return Be||nt?Be:"file"}(Y,De),this.authority=K||d,this.path=function(Be,nt){switch(Be){case"https":case"http":case"file":nt?nt[0]!==h&&(nt=h+nt):nt=h}return nt}(this.scheme,ne||d),this.query=ge||d,this.fragment=ye||d,l(this,De))}static isUri(Y){return Y instanceof E||!!Y&&typeof Y.authority=="string"&&typeof Y.fragment=="string"&&typeof Y.path=="string"&&typeof Y.query=="string"&&typeof Y.scheme=="string"&&typeof Y.fsPath=="string"&&typeof Y.with=="function"&&typeof Y.toString=="function"}get fsPath(){return S(this,!1)}with(Y){if(!Y)return this;let{scheme:K,authority:ne,path:ge,query:ye,fragment:De}=Y;return K===void 0?K=this.scheme:K===null&&(K=d),ne===void 0?ne=this.authority:ne===null&&(ne=d),ge===void 0?ge=this.path:ge===null&&(ge=d),ye===void 0?ye=this.query:ye===null&&(ye=d),De===void 0?De=this.fragment:De===null&&(De=d),K===this.scheme&&ne===this.authority&&ge===this.path&&ye===this.query&&De===this.fragment?this:new R(K,ne,ge,ye,De)}static parse(Y,K=!1){const ne=m.exec(Y);return ne?new R(ne[2]||d,_(ne[4]||d),_(ne[5]||d),_(ne[7]||d),_(ne[9]||d),K):new R(d,d,d,d,d)}static file(Y){let K=d;if(i&&(Y=Y.replace(/\\/g,h)),Y[0]===h&&Y[1]===h){const ne=Y.indexOf(h,2);ne===-1?(K=Y.substring(2),Y=h):(K=Y.substring(2,ne),Y=Y.substring(ne)||h)}return new R("file",K,Y,d,d)}static from(Y){const K=new R(Y.scheme,Y.authority,Y.path,Y.query,Y.fragment);return l(K,!0),K}toString(Y=!1){return y(this,Y)}toJSON(){return this}static revive(Y){if(Y){if(Y instanceof E)return Y;{const K=new R(Y);return K._formatted=Y.external,K._fsPath=Y._sep===T?Y.fsPath:null,K}}return Y}}const T=i?1:void 0;class R extends E{constructor(){super(...arguments);ri(this,"_formatted",null);ri(this,"_fsPath",null)}get fsPath(){return this._fsPath||(this._fsPath=S(this,!1)),this._fsPath}toString(K=!1){return K?y(this,!0):(this._formatted||(this._formatted=y(this,!1)),this._formatted)}toJSON(){const K={$mid:1};return this._fsPath&&(K.fsPath=this._fsPath,K._sep=T),this._formatted&&(K.external=this._formatted),this.path&&(K.path=this.path),this.scheme&&(K.scheme=this.scheme),this.authority&&(K.authority=this.authority),this.query&&(K.query=this.query),this.fragment&&(K.fragment=this.fragment),K}}const P={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function A(I,Y,K){let ne,ge=-1;for(let ye=0;ye=97&&De<=122||De>=65&&De<=90||De>=48&&De<=57||De===45||De===46||De===95||De===126||Y&&De===47||K&&De===91||K&&De===93||K&&De===58)ge!==-1&&(ne+=encodeURIComponent(I.substring(ge,ye)),ge=-1),ne!==void 0&&(ne+=I.charAt(ye));else{ne===void 0&&(ne=I.substr(0,ye));const Be=P[De];Be!==void 0?(ge!==-1&&(ne+=encodeURIComponent(I.substring(ge,ye)),ge=-1),ne+=Be):ge===-1&&(ge=ye)}}return ge!==-1&&(ne+=encodeURIComponent(I.substring(ge))),ne!==void 0?ne:I}function F(I){let Y;for(let K=0;K1&&I.scheme==="file"?`//${I.authority}${I.path}`:I.path.charCodeAt(0)===47&&(I.path.charCodeAt(1)>=65&&I.path.charCodeAt(1)<=90||I.path.charCodeAt(1)>=97&&I.path.charCodeAt(1)<=122)&&I.path.charCodeAt(2)===58?Y?I.path.substr(1):I.path[1].toLowerCase()+I.path.substr(2):I.path,i&&(K=K.replace(/\//g,"\\")),K}function y(I,Y){const K=Y?F:A;let ne="",{scheme:ge,authority:ye,path:De,query:Be,fragment:nt}=I;if(ge&&(ne+=ge,ne+=":"),(ye||ge==="file")&&(ne+=h,ne+=h),ye){let Se=ye.indexOf("@");if(Se!==-1){const H=ye.substr(0,Se);ye=ye.substr(Se+1),Se=H.lastIndexOf(":"),Se===-1?ne+=K(H,!1,!1):(ne+=K(H.substr(0,Se),!1,!1),ne+=":",ne+=K(H.substr(Se+1),!1,!0)),ne+="@"}ye=ye.toLowerCase(),Se=ye.lastIndexOf(":"),Se===-1?ne+=K(ye,!1,!0):(ne+=K(ye.substr(0,Se),!1,!0),ne+=ye.substr(Se))}if(De){if(De.length>=3&&De.charCodeAt(0)===47&&De.charCodeAt(2)===58){const Se=De.charCodeAt(1);Se>=65&&Se<=90&&(De=`/${String.fromCharCode(Se+32)}:${De.substr(3)}`)}else if(De.length>=2&&De.charCodeAt(1)===58){const Se=De.charCodeAt(0);Se>=65&&Se<=90&&(De=`${String.fromCharCode(Se+32)}:${De.substr(2)}`)}ne+=K(De,!0,!1)}return Be&&(ne+="?",ne+=K(Be,!1,!1)),nt&&(ne+="#",ne+=Y?nt:A(nt,!1,!1)),ne}function D(I){try{return decodeURIComponent(I)}catch{return I.length>3?I.substr(0,3)+D(I.substr(3)):I}}const v=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function _(I){return I.match(v)?I.replace(v,Y=>D(Y)):I}var $=n(470);const q=$.posix||$,N="/";var M;(function(I){I.joinPath=function(Y,...K){return Y.with({path:q.join(Y.path,...K)})},I.resolvePath=function(Y,...K){let ne=Y.path,ge=!1;ne[0]!==N&&(ne=N+ne,ge=!0);let ye=q.resolve(ne,...K);return ge&&ye[0]===N&&!Y.authority&&(ye=ye.substring(1)),Y.with({path:ye})},I.dirname=function(Y){if(Y.path.length===0||Y.path===N)return Y;let K=q.dirname(Y.path);return K.length===1&&K.charCodeAt(0)===46&&(K=""),Y.with({path:K})},I.basename=function(Y){return q.basename(Y.path)},I.extname=function(Y){return q.extname(Y.path)}})(M||(M={}))})(),g1=r})();const{URI:Yr,Utils:k9}=g1;function y1(t,e){if(t.length0?t.lastIndexOf(e)===n:n===0?t===e:!1}function EA(t){return y1(t,"(?i)")?new RegExp(t.substring(4),"i"):new RegExp(t)}function uu(t){return typeof t=="boolean"}class Pc{constructor(e,n,r,i){this._uri=e,this._languageId=n,this._version=r,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){const n=this.offsetAt(e.start),r=this.offsetAt(e.end);return this._content.substring(n,r)}return this._content}update(e,n){for(const r of e)if(Pc.isIncremental(r)){const i=D1(r.range),s=this.offsetAt(i.start),a=this.offsetAt(i.end);this._content=this._content.substring(0,s)+r.text+this._content.substring(a,this._content.length);const c=Math.max(i.start.line,0),l=Math.max(i.end.line,0);let d=this._lineOffsets;const h=v1(r.text,!1,s);if(l-c===h.length)for(let E=0,T=h.length;Ee?i=a:r=a+1}const s=r-1;return e=this.ensureBeforeEOL(e,n[s]),{line:s,character:e-n[s]}}offsetAt(e){const n=this.getLineOffsets();if(e.line>=n.length)return this._content.length;if(e.line<0)return 0;const r=n[e.line];if(e.character<=0)return r;const i=e.line+1n&&b1(this._content.charCodeAt(e-1));)e--;return e}get lineCount(){return this.getLineOffsets().length}static isIncremental(e){const n=e;return n!=null&&typeof n.text=="string"&&n.range!==void 0&&(n.rangeLength===void 0||typeof n.rangeLength=="number")}static isFull(e){const n=e;return n!=null&&typeof n.text=="string"&&n.range===void 0&&n.rangeLength===void 0}}var Uf;(function(t){function e(i,s,a,c){return new Pc(i,s,a,c)}t.create=e;function n(i,s,a){if(i instanceof Pc)return i.update(s,a),i;throw new Error("TextDocument.update: document must be created by TextDocument.create")}t.update=n;function r(i,s){const a=i.getText(),c=zm(s.map(SA),(h,m)=>{const E=h.range.start.line-m.range.start.line;return E===0?h.range.start.character-m.range.start.character:E});let l=0;const d=[];for(const h of c){const m=i.offsetAt(h.range.start);if(ml&&d.push(a.substring(l,m)),h.newText.length&&d.push(h.newText),l=i.offsetAt(h.range.end)}return d.push(a.substr(l)),d.join("")}t.applyEdits=r})(Uf||(Uf={}));function zm(t,e){if(t.length<=1)return t;const n=t.length/2|0,r=t.slice(0,n),i=t.slice(n);zm(r,e),zm(i,e);let s=0,a=0,c=0;for(;sn.line||e.line===n.line&&e.character>n.character?{start:n,end:e}:t}function SA(t){const e=D1(t.range);return e!==t.range?{newText:t.newText,range:e}:t}var Ir;(function(t){t[t.Undefined=0]="Undefined",t[t.EnumValueMismatch=1]="EnumValueMismatch",t[t.Deprecated=2]="Deprecated",t[t.UnexpectedEndOfComment=257]="UnexpectedEndOfComment",t[t.UnexpectedEndOfString=258]="UnexpectedEndOfString",t[t.UnexpectedEndOfNumber=259]="UnexpectedEndOfNumber",t[t.InvalidUnicode=260]="InvalidUnicode",t[t.InvalidEscapeCharacter=261]="InvalidEscapeCharacter",t[t.InvalidCharacter=262]="InvalidCharacter",t[t.PropertyExpected=513]="PropertyExpected",t[t.CommaExpected=514]="CommaExpected",t[t.ColonExpected=515]="ColonExpected",t[t.ValueExpected=516]="ValueExpected",t[t.CommaOrCloseBacketExpected=517]="CommaOrCloseBacketExpected",t[t.CommaOrCloseBraceExpected=518]="CommaOrCloseBraceExpected",t[t.TrailingComma=519]="TrailingComma",t[t.DuplicateKey=520]="DuplicateKey",t[t.CommentNotPermitted=521]="CommentNotPermitted",t[t.SchemaResolveError=768]="SchemaResolveError"})(Ir||(Ir={}));var w1;(function(t){t.LATEST={textDocument:{completion:{completionItem:{documentationFormat:[Ji.Markdown,Ji.PlainText],commitCharactersSupport:!0}}}}})(w1||(w1={}));var $s={},Vf={};Object.defineProperty(Vf,"__esModule",{value:!0});var Ym;function Gm(){if(Ym===void 0)throw new Error("No runtime abstraction layer installed");return Ym}(function(t){function e(n){if(n===void 0)throw new Error("No runtime abstraction layer provided");Ym=n}t.install=e})(Gm||(Gm={})),Vf.default=Gm;var Jm={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.config=t.loadMessageBundle=t.localize=t.format=t.setPseudo=t.isPseudo=t.isDefined=t.BundleFormat=t.MessageFormat=void 0;var e=Vf;(function(d){d.file="file",d.bundle="bundle",d.both="both"})(t.MessageFormat||(t.MessageFormat={})),function(d){d.standalone="standalone",d.languagePack="languagePack"}(t.BundleFormat||(t.BundleFormat={}));var n;(function(d){function h(m){var E=m;return E&&r(E.key)&&r(E.comment)}d.is=h})(n||(n={}));function r(d){return typeof d<"u"}t.isDefined=r,t.isPseudo=!1;function i(d){t.isPseudo=d}t.setPseudo=i;function s(d,h){var m;return t.isPseudo&&(d="\uFF3B"+d.replace(/[aouei]/g,"$&$&")+"\uFF3D"),h.length===0?m=d:m=d.replace(/\{(\d+)\}/g,function(E,T){var R=T[0],P=h[R],A=E;return typeof P=="string"?A=P:(typeof P=="number"||typeof P=="boolean"||P===void 0||P===null)&&(A=String(P)),A}),m}t.format=s;function a(d,h){for(var m=[],E=2;E1&&(m==="/"||m===void 0||m==="{"||m===",")&&(T==="/"||T===void 0||T===","||T==="}");R?(T==="/"?d++:m==="/"&&r.endsWith("\\/")&&(r=r.substr(0,r.length-2)),r+="((?:[^/]*(?:/|$))*)"):r+="([^/]*)"}break;default:r+=l}return(!c||!~c.indexOf("g"))&&(r="^"+r+"$"),new RegExp(r,c)}var io=$s.loadMessageBundle(),AA="!",CA="/",OA=function(){function t(e,n){this.globWrappers=[];try{for(var r=0,i=e;r0&&(s[0]===CA&&(s=s.substring(1)),this.globWrappers.push({regexp:TA("**/"+s,{extended:!0,globstar:!0}),include:a}))}this.uris=n}catch{this.globWrappers.length=0,this.uris=[]}}return t.prototype.matchesPattern=function(e){for(var n=!1,r=0,i=this.globWrappers;r0;)this.callOnDispose.pop()()},t.prototype.onResourceChange=function(e){var n=this;this.cachedSchemaForResource=void 0;var r=!1;e=so(e);for(var i=[e],s=Object.keys(this.schemasById).map(function(d){return n.schemasById[d]});i.length;)for(var a=i.pop(),c=0;c1&&(i=s[1]),Km(i,".")&&(i=i.substr(0,i.length-1)),new Pi({},[io("json.schema.nocontent","Unable to load schema from '{0}': {1}.",Kf(e),i)])})},t.prototype.resolveSchemaContent=function(e,n,r){var i=this,s=e.errors.slice(0),a=e.schema;if(a.$schema){var c=so(a.$schema);if(c==="http://json-schema.org/draft-03/schema")return this.promise.resolve(new Fc({},[io("json.schema.draft03.notsupported","Draft-03 schemas are not supported.")]));c==="https://json-schema.org/draft/2019-09/schema"&&s.push(io("json.schema.draft201909.notsupported","Draft 2019-09 schemas are not yet fully supported."))}var l=this.contextService,d=function(T,R){if(!R)return T;var P=T;return R[0]==="/"&&(R=R.substr(1)),R.split("/").some(function(A){return A=A.replace(/~1/g,"/").replace(/~0/g,"~"),P=P[A],!P}),P},h=function(T,R,P,A){var F=A?decodeURIComponent(A):void 0,S=d(R,F);if(S)for(var y in S)S.hasOwnProperty(y)&&!T.hasOwnProperty(y)&&(T[y]=S[y]);else s.push(io("json.schema.invalidref","$ref '{0}' in '{1}' can not be resolved.",F,P))},m=function(T,R,P,A,F){l&&!/^[A-Za-z][A-Za-z0-9+\-.+]*:\/\/.*/.test(R)&&(R=l.resolveRelativePath(R,A)),R=so(R);var S=i.getOrAddSchemaHandle(R);return S.getUnresolvedSchema().then(function(y){if(F[R]=!0,y.errors.length){var D=P?R+"#"+P:R;s.push(io("json.schema.problemloadingref","Problems loading reference '{0}': {1}",D,y.errors[0]))}return h(T,y.schema,R,P),E(T,y.schema,R,S.dependencies)})},E=function(T,R,P,A){if(!T||typeof T!="object")return Promise.resolve(null);for(var F=[T],S=[],y=[],D=function(){for(var N=[],M=0;M0){y.push(m(N,Y[0],Y[1],P,A));return}else M.indexOf(I)===-1&&(h(N,R,P,Y[1]),M.push(I))}D(N.items,N.additionalItems,N.additionalProperties,N.not,N.contains,N.propertyNames,N.if,N.then,N.else),v(N.definitions,N.properties,N.patternProperties,N.dependencies),_(N.anyOf,N.allOf,N.oneOf,N.items)};F.length;){var q=F.pop();S.indexOf(q)>=0||(S.push(q),$(q))}return i.promise.all(y)};return E(a,a,n,r).then(function(T){return new Fc(a,s)})},t.prototype.getSchemaForResource=function(e,n){if(n&&n.root&&n.root.type==="object"){var r=n.root.properties.filter(function(F){return F.keyNode.value==="$schema"&&F.valueNode&&F.valueNode.type==="string"});if(r.length>0){var i=r[0].valueNode;if(i&&i.type==="string"){var s=Hf(i);if(s&&y1(s,".")&&this.contextService&&(s=this.contextService.resolveRelativePath(s,e)),s){var a=so(s);return this.getOrAddSchemaHandle(a).getResolvedSchema()}}}}if(this.cachedSchemaForResource&&this.cachedSchemaForResource.resource===e)return this.cachedSchemaForResource.resolvedSchema;for(var c=Object.create(null),l=[],d=RA(e),h=0,m=this.filePatternAssociations;h0?this.createCombinedSchema(e,l).getResolvedSchema():this.promise.resolve(void 0);return this.cachedSchemaForResource={resource:e,resolvedSchema:A},A},t.prototype.createCombinedSchema=function(e,n){if(n.length===1)return this.getOrAddSchemaHandle(n[0]);var r="schemaservice://combinedSchema/"+encodeURIComponent(e),i={allOf:n.map(function(s){return{$ref:s}})};return this.addSchemaHandle(r,i)},t.prototype.getMatchingSchemas=function(e,n,r){if(r){var i=r.id||"schemaservice://untitled/matchingSchemas/"+FA++;return this.resolveSchemaContent(new Pi(r),i,{}).then(function(s){return n.getMatchingSchemas(s.schema).filter(function(a){return!a.inverted})})}return this.getSchemaForResource(e.uri,n).then(function(s){return s?n.getMatchingSchemas(s.schema).filter(function(a){return!a.inverted}):[]})},t}(),FA=0;function so(t){try{return Yr.parse(t).toString()}catch{return t}}function RA(t){try{return Yr.parse(t).with({fragment:null,query:null}).toString()}catch{return t}}function Kf(t){try{var e=Yr.parse(t);if(e.scheme==="file")return e.fsPath}catch{}return t}function IA(t){return t.replace(/[-\\{}+?|^$.,[\]()#\s]/g,"\\$&").replace(/[*]/g,".*")}function MA(t,e){if(t.length!!t&&typeof t=="object"&&t[ui]===Qm,zf=t=>!!t&&typeof t=="object"&&t[ui]===Xm,Nn=t=>!!t&&typeof t=="object"&&t[ui]===oo,Xt=t=>!!t&&typeof t=="object"&&t[ui]===E1,yt=t=>!!t&&typeof t=="object"&&t[ui]===Es,xn=t=>!!t&&typeof t=="object"&&t[ui]===cu;function Fn(t){if(t&&typeof t=="object")switch(t[ui]){case oo:case cu:return!0}return!1}function on(t){if(t&&typeof t=="object")switch(t[ui]){case Qm:case oo:case Es:case cu:return!0}return!1}const jA=t=>(yt(t)||Fn(t))&&!!t.anchor;class Zm{constructor(e){Object.defineProperty(this,ui,{value:e})}clone(){const e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}}const Xo=Symbol("break visit"),xA=Symbol("skip children"),Rc=Symbol("remove node");function gn(t,e){const n=BA(e);zf(t)?lu(null,t.contents,n,Object.freeze([t]))===Rc&&(t.contents=null):lu(null,t,n,Object.freeze([]))}gn.BREAK=Xo,gn.SKIP=xA,gn.REMOVE=Rc;function lu(t,e,n,r){const i=qA(t,e,n,r);if(on(i)||Xt(i))return WA(t,r,i),lu(t,i,n,r);if(typeof i!="symbol"){if(Fn(e)){r=Object.freeze(r.concat(e));for(let s=0;st.replace(/[!,[\]{}]/g,e=>UA[e]);class wr{constructor(e,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},wr.defaultYaml,e),this.tags=Object.assign({},wr.defaultTags,n)}clone(){const e=new wr(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){const e=new wr(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:wr.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},wr.defaultTags);break}return e}add(e,n){this.atNextDocument&&(this.yaml={explicit:wr.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},wr.defaultTags),this.atNextDocument=!1);const r=e.trim().split(/[ \t]+/),i=r.shift();switch(i){case"%TAG":{if(r.length!==2&&(n(0,"%TAG directive should contain exactly two parts"),r.length<2))return!1;const[s,a]=r;return this.tags[s]=a,!0}case"%YAML":{if(this.yaml.explicit=!0,r.length!==1)return n(0,"%YAML directive should contain exactly one part"),!1;const[s]=r;if(s==="1.1"||s==="1.2")return this.yaml.version=s,!0;{const a=/^\d+\.\d+$/.test(s);return n(6,`Unsupported YAML version ${s}`,a),!1}}default:return n(0,`Unknown directive ${i}`,!0),!1}}tagName(e,n){if(e==="!")return"!";if(e[0]!=="!")return n(`Not a valid tag: ${e}`),null;if(e[1]==="<"){const a=e.slice(2,-1);return a==="!"||a==="!!"?(n(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==">"&&n("Verbatim tags must end with a >"),a)}const[,r,i]=e.match(/^(.*!)([^!]*)$/);i||n(`The ${e} tag has no suffix`);const s=this.tags[r];return s?s+decodeURIComponent(i):r==="!"?e:(n(`Could not resolve tag: ${e}`),null)}tagString(e){for(const[n,r]of Object.entries(this.tags))if(e.startsWith(r))return n+VA(e.substring(r.length));return e[0]==="!"?e:`!<${e}>`}toString(e){const n=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],r=Object.entries(this.tags);let i;if(e&&r.length>0&&on(e.contents)){const s={};gn(e.contents,(a,c)=>{on(c)&&c.tag&&(s[c.tag]=!0)}),i=Object.keys(s)}else i=[];for(const[s,a]of r)s==="!!"&&a==="tag:yaml.org,2002:"||(!e||i.some(c=>c.startsWith(a)))&&n.push(`%TAG ${s} ${a}`);return n.join(` +`)}}wr.defaultYaml={explicit:!1,version:"1.2"},wr.defaultTags={"!!":"tag:yaml.org,2002:"};function S1(t){if(/[\x00-\x19\s,[\]{}]/.test(t)){const n=`Anchor must not contain whitespace or control characters: ${JSON.stringify(t)}`;throw new Error(n)}return!0}function k1(t){const e=new Set;return gn(t,{Value(n,r){r.anchor&&e.add(r.anchor)}}),e}function T1(t,e){for(let n=1;;++n){const r=`${t}${n}`;if(!e.has(r))return r}}function HA(t,e){const n=[],r=new Map;let i=null;return{onAnchor:s=>{n.push(s),i||(i=k1(t));const a=T1(e,i);return i.add(a),a},setAnchors:()=>{for(const s of n){const a=r.get(s);if(typeof a=="object"&&a.anchor&&(yt(a.node)||Fn(a.node)))a.node.anchor=a.anchor;else{const c=new Error("Failed to resolve repeated object (this should not happen)");throw c.source=s,c}}},sourceObjects:r}}class eg extends Zm{constructor(e){super(Qm),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e){let n;return gn(e,{Node:(r,i)=>{if(i===this)return gn.BREAK;i.anchor===this.source&&(n=i)}}),n}toJSON(e,n){if(!n)return{source:this.source};const{anchors:r,doc:i,maxAliasCount:s}=n,a=this.resolve(i);if(!a){const l=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(l)}const c=r.get(a);if(!c||c.res===void 0){const l="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(l)}if(s>=0&&(c.count+=1,c.aliasCount===0&&(c.aliasCount=Yf(i,a,r)),c.count*c.aliasCount>s)){const l="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(l)}return c.res}toString(e,n,r){const i=`*${this.source}`;if(e){if(S1(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){const s=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(s)}if(e.implicitKey)return`${i} `}return i}}function Yf(t,e,n){if(ts(e)){const r=e.resolve(t),i=n&&r&&n.get(r);return i?i.count*i.aliasCount:0}else if(Fn(e)){let r=0;for(const i of e.items){const s=Yf(t,i,n);s>r&&(r=s)}return r}else if(Xt(e)){const r=Yf(t,e.key,n),i=Yf(t,e.value,n);return Math.max(r,i)}return 1}function ns(t,e,n){if(Array.isArray(t))return t.map((r,i)=>ns(r,String(i),n));if(t&&typeof t.toJSON=="function"){if(!n||!jA(t))return t.toJSON(e,n);const r={aliasCount:0,count:1,res:void 0};n.anchors.set(t,r),n.onCreate=s=>{r.res=s,delete n.onCreate};const i=t.toJSON(e,n);return n.onCreate&&n.onCreate(i),i}return typeof t=="bigint"&&!(n!=null&&n.keep)?Number(t):t}const A1=t=>!t||typeof t!="function"&&typeof t!="object";class Et extends Zm{constructor(e){super(Es),this.value=e}toJSON(e,n){return n!=null&&n.keep?this.value:ns(this.value,e,n)}toString(){return String(this.value)}}Et.BLOCK_FOLDED="BLOCK_FOLDED",Et.BLOCK_LITERAL="BLOCK_LITERAL",Et.PLAIN="PLAIN",Et.QUOTE_DOUBLE="QUOTE_DOUBLE",Et.QUOTE_SINGLE="QUOTE_SINGLE";const KA="tag:yaml.org,2002:";function zA(t,e,n){var r;if(e){const i=n.filter(a=>a.tag===e),s=(r=i.find(a=>!a.format))!=null?r:i[0];if(!s)throw new Error(`Tag ${e} not found`);return s}return n.find(i=>{var s;return((s=i.identify)==null?void 0:s.call(i,t))&&!i.format})}function Ic(t,e,n){var m,E;if(zf(t)&&(t=t.contents),on(t))return t;if(Xt(t)){const T=(E=(m=n.schema[oo]).createNode)==null?void 0:E.call(m,n.schema,null,n);return T.items.push(t),T}(t instanceof String||t instanceof Number||t instanceof Boolean||typeof BigInt<"u"&&t instanceof BigInt)&&(t=t.valueOf());const{aliasDuplicateObjects:r,onAnchor:i,onTagObj:s,schema:a,sourceObjects:c}=n;let l;if(r&&t&&typeof t=="object"){if(l=c.get(t),l)return l.anchor||(l.anchor=i(t)),new eg(l.anchor);l={anchor:null,node:null},c.set(t,l)}e!=null&&e.startsWith("!!")&&(e=KA+e.slice(2));let d=zA(t,e,a.tags);if(!d){if(t&&typeof t.toJSON=="function"&&(t=t.toJSON()),!t||typeof t!="object"){const T=new Et(t);return l&&(l.node=T),T}d=t instanceof Map?a[oo]:Symbol.iterator in Object(t)?a[cu]:a[oo]}s&&(s(d),delete n.onTagObj);const h=d!=null&&d.createNode?d.createNode(n.schema,t,n):new Et(t);return e&&(h.tag=e),l&&(l.node=h),h}function Gf(t,e,n){let r=n;for(let i=e.length-1;i>=0;--i){const s=e[i];if(typeof s=="number"&&Number.isInteger(s)&&s>=0){const a=[];a[s]=r,r=a}else r=new Map([[s,r]])}return Ic(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:t,sourceObjects:new Map})}const Mc=t=>t==null||typeof t=="object"&&!!t[Symbol.iterator]().next().done;class Jf extends Zm{constructor(e,n){super(e),Object.defineProperty(this,"schema",{value:n,configurable:!0,enumerable:!1,writable:!0})}clone(e){const n=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(n.schema=e),n.items=n.items.map(r=>on(r)||Xt(r)?r.clone(e):r),this.range&&(n.range=this.range.slice()),n}addIn(e,n){if(Mc(e))this.add(n);else{const[r,...i]=e,s=this.get(r,!0);if(Fn(s))s.addIn(i,n);else if(s===void 0&&this.schema)this.set(r,Gf(this.schema,i,n));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${i}`)}}deleteIn(e){const[n,...r]=e;if(r.length===0)return this.delete(n);const i=this.get(n,!0);if(Fn(i))return i.deleteIn(r);throw new Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}getIn(e,n){const[r,...i]=e,s=this.get(r,!0);return i.length===0?!n&&yt(s)?s.value:s:Fn(s)?s.getIn(i,n):void 0}hasAllNullValues(e){return this.items.every(n=>{if(!Xt(n))return!1;const r=n.value;return r==null||e&&yt(r)&&r.value==null&&!r.commentBefore&&!r.comment&&!r.tag})}hasIn(e){const[n,...r]=e;if(r.length===0)return this.has(n);const i=this.get(n,!0);return Fn(i)?i.hasIn(r):!1}setIn(e,n){const[r,...i]=e;if(i.length===0)this.set(r,n);else{const s=this.get(r,!0);if(Fn(s))s.setIn(i,n);else if(s===void 0&&this.schema)this.set(r,Gf(this.schema,i,n));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${i}`)}}}Jf.maxFlowStringSingleLineLength=60;const YA=t=>t.replace(/^(?!$)(?: $)?/gm,"#");function Ss(t,e){return/^\n+$/.test(t)?t.substring(1):e?t.replace(/^(?! *$)/gm,e):t}const ao=(t,e,n)=>t.endsWith(` `)?Ss(n,e):n.includes(` `)?` -`+Ss(n,e):(t.endsWith(" ")?"":" ")+n,C1="flow",tg="block",Jf="quoted";function Qf(t,e,n="flow",{indentAtStart:r,lineWidth:i=80,minContentWidth:s=20,onFold:a,onOverflow:c}={}){if(!i||i<0)return t;const l=Math.max(1+s,1+i-e.length);if(t.length<=l)return t;const d=[],h={};let m=i-e.length;typeof r=="number"&&(r>i-Math.max(2,s)?d.push(0):m=i-r);let E,k,R=!1,P=-1,A=-1,N=-1;n===tg&&(P=O1(t,P),P!==-1&&(m=P+l));for(let y;y=t[P+=1];){if(n===Jf&&y==="\\"){switch(A=P,t[P+1]){case"x":P+=3;break;case"u":P+=5;break;case"U":P+=9;break;default:P+=1}N=P}if(y===` -`)n===tg&&(P=O1(t,P)),m=P+l,E=void 0;else{if(y===" "&&k&&k!==" "&&k!==` -`&&k!==" "){const D=t[P+1];D&&D!==" "&&D!==` -`&&D!==" "&&(E=P)}if(P>=m)if(E)d.push(E),m=E+l,E=void 0;else if(n===Jf){for(;k===" "||k===" ";)k=y,y=t[P+=1],R=!0;const D=P>N+1?P-2:A-1;if(h[D])return t;d.push(D),h[D]=!0,m=D+l,E=void 0}else R=!0}k=y}if(R&&c&&c(),d.length===0)return t;a&&a();let S=t.slice(0,d[0]);for(let y=0;yi-Math.max(2,s)?d.push(0):m=i-r);let E,T,R=!1,P=-1,A=-1,F=-1;n===tg&&(P=O1(t,P),P!==-1&&(m=P+l));for(let y;y=t[P+=1];){if(n===Qf&&y==="\\"){switch(A=P,t[P+1]){case"x":P+=3;break;case"u":P+=5;break;case"U":P+=9;break;default:P+=1}F=P}if(y===` +`)n===tg&&(P=O1(t,P)),m=P+l,E=void 0;else{if(y===" "&&T&&T!==" "&&T!==` +`&&T!==" "){const D=t[P+1];D&&D!==" "&&D!==` +`&&D!==" "&&(E=P)}if(P>=m)if(E)d.push(E),m=E+l,E=void 0;else if(n===Qf){for(;T===" "||T===" ";)T=y,y=t[P+=1],R=!0;const D=P>F+1?P-2:A-1;if(h[D])return t;d.push(D),h[D]=!0,m=D+l,E=void 0}else R=!0}T=y}if(R&&c&&c(),d.length===0)return t;a&&a();let S=t.slice(0,d[0]);for(let y=0;y({indentAtStart:e?t.indent.length:t.indentAtStart,lineWidth:t.options.lineWidth,minContentWidth:t.options.minContentWidth}),Zf=t=>/^(%|---|\.\.\.)/m.test(t);function GA(t,e,n){if(!e||e<0)return!1;const r=e-n,i=t.length;if(i<=r)return!1;for(let s=0,a=0;sr)return!0;if(a=s+1,i-a<=r)return!1}return!0}function Lc(t,e){const n=JSON.stringify(t);if(e.options.doubleQuotedAsJSON)return n;const{implicitKey:r}=e,i=e.options.doubleQuotedMinMultiLineLength,s=e.indent||(Zf(t)?" ":"");let a="",c=0;for(let l=0,d=n[l];d;d=n[++l])if(d===" "&&n[l+1]==="\\"&&n[l+2]==="n"&&(a+=n.slice(c,l)+"\\ ",l+=1,c=l,d="\\"),d==="\\")switch(n[l+1]){case"u":{a+=n.slice(c,l);const h=n.substr(l+2,4);switch(h){case"0000":a+="\\0";break;case"0007":a+="\\a";break;case"000b":a+="\\v";break;case"001b":a+="\\e";break;case"0085":a+="\\N";break;case"00a0":a+="\\_";break;case"2028":a+="\\L";break;case"2029":a+="\\P";break;default:h.substr(0,2)==="00"?a+="\\x"+h.substr(2):a+=n.substr(l,6)}l+=5,c=l+1}break;case"n":if(r||n[l+2]==='"'||n.length({indentAtStart:e?t.indent.length:t.indentAtStart,lineWidth:t.options.lineWidth,minContentWidth:t.options.minContentWidth}),ed=t=>/^(%|---|\.\.\.)/m.test(t);function GA(t,e,n){if(!e||e<0)return!1;const r=e-n,i=t.length;if(i<=r)return!1;for(let s=0,a=0;sr)return!0;if(a=s+1,i-a<=r)return!1}return!0}function Lc(t,e){const n=JSON.stringify(t);if(e.options.doubleQuotedAsJSON)return n;const{implicitKey:r}=e,i=e.options.doubleQuotedMinMultiLineLength,s=e.indent||(ed(t)?" ":"");let a="",c=0;for(let l=0,d=n[l];d;d=n[++l])if(d===" "&&n[l+1]==="\\"&&n[l+2]==="n"&&(a+=n.slice(c,l)+"\\ ",l+=1,c=l,d="\\"),d==="\\")switch(n[l+1]){case"u":{a+=n.slice(c,l);const h=n.substr(l+2,4);switch(h){case"0000":a+="\\0";break;case"0007":a+="\\a";break;case"000b":a+="\\v";break;case"001b":a+="\\e";break;case"0085":a+="\\N";break;case"00a0":a+="\\_";break;case"2028":a+="\\L";break;case"2029":a+="\\P";break;default:h.substr(0,2)==="00"?a+="\\x"+h.substr(2):a+=n.substr(l,6)}l+=5,c=l+1}break;case"n":if(r||n[l+2]==='"'||n.length `;let m,E;for(E=n.length;E>0;--E){const _=n[E-1];if(_!==` -`&&_!==" "&&_!==" ")break}let k=n.substring(E);const R=k.indexOf(` -`);R===-1?m="-":n===k||R!==k.length-1?(m="+",s&&s()):m="",k&&(n=n.slice(0,-k.length),k[k.length-1]===` -`&&(k=k.slice(0,-1)),k=k.replace(/\n+(?!\n|$)/g,`$&${d}`));let P=!1,A,N=-1;for(A=0;A")+(P?d?"2":"1":"")+m;if(t&&(D+=" "+c(t.replace(/ ?[\r\n]+/g," ")),i&&i()),h)return n=n.replace(/\n+/g,`$&${d}`),`${D} -${d}${S}${n}${k}`;n=n.replace(/\n+/g,` -$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${d}`);const v=Qf(`${S}${n}${k}`,d,tg,Xf(r,!0));return`${D} +`&&_!==" "&&_!==" ")break}let T=n.substring(E);const R=T.indexOf(` +`);R===-1?m="-":n===T||R!==T.length-1?(m="+",s&&s()):m="",T&&(n=n.slice(0,-T.length),T[T.length-1]===` +`&&(T=T.slice(0,-1)),T=T.replace(/\n+(?!\n|$)/g,`$&${d}`));let P=!1,A,F=-1;for(A=0;A")+(P?d?"2":"1":"")+m;if(t&&(D+=" "+c(t.replace(/ ?[\r\n]+/g," ")),i&&i()),h)return n=n.replace(/\n+/g,`$&${d}`),`${D} +${d}${S}${n}${T}`;n=n.replace(/\n+/g,` +$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${d}`);const v=Xf(`${S}${n}${T}`,d,tg,Zf(r,!0));return`${D} ${d}${v}`}function JA(t,e,n,r){const{type:i,value:s}=t,{actualString:a,implicitKey:c,indent:l,indentStep:d,inFlow:h}=e;if(c&&/[\n[\]{},]/.test(s)||h&&/[[\]{},]/.test(s))return fu(s,e);if(!s||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(s))return c||h||!s.includes(` -`)?fu(s,e):ed(t,e,n,r);if(!c&&!h&&i!==Et.PLAIN&&s.includes(` -`))return ed(t,e,n,r);if(Zf(s)){if(l==="")return e.forceBlockIndent=!0,ed(t,e,n,r);if(c&&l===d)return fu(s,e)}const m=s.replace(/\n+/g,`$& -${l}`);if(a){const E=P=>{var A;return P.default&&P.tag!=="tag:yaml.org,2002:str"&&((A=P.test)==null?void 0:A.test(m))},{compat:k,tags:R}=e.doc.schema;if(R.some(E)||(k==null?void 0:k.some(E)))return fu(s,e)}return c?m:Qf(m,l,C1,Xf(e,!1))}function rg(t,e,n,r){const{implicitKey:i,inFlow:s}=e,a=typeof t.value=="string"?t:Object.assign({},t,{value:String(t.value)});let{type:c}=t;c!==Et.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(a.value)&&(c=Et.QUOTE_DOUBLE);const l=h=>{switch(h){case Et.BLOCK_FOLDED:case Et.BLOCK_LITERAL:return i||s?fu(a.value,e):ed(a,e,n,r);case Et.QUOTE_DOUBLE:return Lc(a.value,e);case Et.QUOTE_SINGLE:return ng(a.value,e);case Et.PLAIN:return JA(a,e,n,r);default:return null}};let d=l(c);if(d===null){const{defaultKeyType:h,defaultStringType:m}=e.options,E=i&&h||m;if(d=l(E),d===null)throw new Error(`Unsupported default string type ${E}`)}return d}function P1(t,e){const n=Object.assign({blockQuote:!0,commentString:YA,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trueStr:"true",verifyAliasOrder:!0},t.schema.toStringOptions,e);let r;switch(n.collectionStyle){case"block":r=!1;break;case"flow":r=!0;break;default:r=null}return{anchors:new Set,doc:t,flowCollectionPadding:n.flowCollectionPadding?" ":"",indent:"",indentStep:typeof n.indent=="number"?" ".repeat(n.indent):" ",inFlow:r,options:n}}function QA(t,e){var i,s,a,c;if(e.tag){const l=t.filter(d=>d.tag===e.tag);if(l.length>0)return(i=l.find(d=>d.format===e.format))!=null?i:l[0]}let n,r;if(yt(e)){r=e.value;const l=t.filter(d=>{var h;return(h=d.identify)==null?void 0:h.call(d,r)});n=(s=l.find(d=>d.format===e.format))!=null?s:l.find(d=>!d.format)}else r=e,n=t.find(l=>l.nodeClass&&r instanceof l.nodeClass);if(!n){const l=(c=(a=r==null?void 0:r.constructor)==null?void 0:a.name)!=null?c:typeof r;throw new Error(`Tag not resolved for ${l} value`)}return n}function XA(t,e,{anchors:n,doc:r}){if(!r.directives)return"";const i=[],s=(yt(t)||Fn(t))&&t.anchor;s&&S1(s)&&(n.add(s),i.push(`&${s}`));const a=t.tag?t.tag:e.default?null:e.tag;return a&&i.push(r.directives.tagString(a)),i.join(" ")}function Zo(t,e,n,r){var l,d;if(Xt(t))return t.toString(e,n,r);if(ts(t)){if(e.doc.directives)return t.toString(e);if((l=e.resolvedAliases)!=null&&l.has(t))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(t):e.resolvedAliases=new Set([t]),t=t.resolve(e.doc)}let i;const s=on(t)?t:e.doc.createNode(t,{onTagObj:h=>i=h});i||(i=QA(e.doc.schema.tags,s));const a=XA(s,i,e);a.length>0&&(e.indentAtStart=((d=e.indentAtStart)!=null?d:0)+a.length+1);const c=typeof i.stringify=="function"?i.stringify(s,e,n,r):yt(s)?rg(s,e,n,r):s.toString(e,n,r);return a?yt(s)||c[0]==="{"||c[0]==="["?`${a} ${c}`:`${a} -${e.indent}${c}`:c}function ZA({key:t,value:e},n,r,i){var $,q;const{allNullValues:s,doc:a,indent:c,indentStep:l,options:{commentString:d,indentSeq:h,simpleKeys:m}}=n;let E=on(t)&&t.comment||null;if(m){if(E)throw new Error("With simple keys, key nodes cannot have comments");if(Fn(t)){const F="With simple keys, collection cannot be used as a key value";throw new Error(F)}}let k=!m&&(!t||E&&e==null&&!n.inFlow||Fn(t)||(yt(t)?t.type===Et.BLOCK_FOLDED||t.type===Et.BLOCK_LITERAL:typeof t=="object"));n=Object.assign({},n,{allNullValues:!1,implicitKey:!k&&(m||!s),indent:c+l});let R=!1,P=!1,A=Zo(t,n,()=>R=!0,()=>P=!0);if(!k&&!n.inFlow&&A.length>1024){if(m)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");k=!0}if(n.inFlow){if(s||e==null)return R&&r&&r(),A===""?"?":k?`? ${A}`:A}else if(s&&!m||e==null&&k)return A=`? ${A}`,E&&!R?A+=ao(A,n.indent,d(E)):P&&i&&i(),A;R&&(E=null),k?(E&&(A+=ao(A,n.indent,d(E))),A=`? ${A} -${c}:`):(A=`${A}:`,E&&(A+=ao(A,n.indent,d(E))));let N,S,y;on(e)?(N=!!e.spaceBefore,S=e.commentBefore,y=e.comment):(N=!1,S=null,y=null,e&&typeof e=="object"&&(e=a.createNode(e))),n.implicitKey=!1,!k&&!E&&yt(e)&&(n.indentAtStart=A.length+1),P=!1,!h&&l.length>=2&&!n.inFlow&&!k&&xn(e)&&!e.flow&&!e.tag&&!e.anchor&&(n.indent=n.indent.substring(2));let D=!1;const v=Zo(e,n,()=>D=!0,()=>P=!0);let _=" ";if(E||N||S){if(_=N?` -`:"",S){const F=d(S);_+=` -${Ss(F,n.indent)}`}v===""&&!n.inFlow?_===` +`)?fu(s,e):td(t,e,n,r);if(!c&&!h&&i!==Et.PLAIN&&s.includes(` +`))return td(t,e,n,r);if(ed(s)){if(l==="")return e.forceBlockIndent=!0,td(t,e,n,r);if(c&&l===d)return fu(s,e)}const m=s.replace(/\n+/g,`$& +${l}`);if(a){const E=P=>{var A;return P.default&&P.tag!=="tag:yaml.org,2002:str"&&((A=P.test)==null?void 0:A.test(m))},{compat:T,tags:R}=e.doc.schema;if(R.some(E)||(T==null?void 0:T.some(E)))return fu(s,e)}return c?m:Xf(m,l,C1,Zf(e,!1))}function rg(t,e,n,r){const{implicitKey:i,inFlow:s}=e,a=typeof t.value=="string"?t:Object.assign({},t,{value:String(t.value)});let{type:c}=t;c!==Et.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(a.value)&&(c=Et.QUOTE_DOUBLE);const l=h=>{switch(h){case Et.BLOCK_FOLDED:case Et.BLOCK_LITERAL:return i||s?fu(a.value,e):td(a,e,n,r);case Et.QUOTE_DOUBLE:return Lc(a.value,e);case Et.QUOTE_SINGLE:return ng(a.value,e);case Et.PLAIN:return JA(a,e,n,r);default:return null}};let d=l(c);if(d===null){const{defaultKeyType:h,defaultStringType:m}=e.options,E=i&&h||m;if(d=l(E),d===null)throw new Error(`Unsupported default string type ${E}`)}return d}function P1(t,e){const n=Object.assign({blockQuote:!0,commentString:YA,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trueStr:"true",verifyAliasOrder:!0},t.schema.toStringOptions,e);let r;switch(n.collectionStyle){case"block":r=!1;break;case"flow":r=!0;break;default:r=null}return{anchors:new Set,doc:t,flowCollectionPadding:n.flowCollectionPadding?" ":"",indent:"",indentStep:typeof n.indent=="number"?" ".repeat(n.indent):" ",inFlow:r,options:n}}function QA(t,e){var i,s,a,c;if(e.tag){const l=t.filter(d=>d.tag===e.tag);if(l.length>0)return(i=l.find(d=>d.format===e.format))!=null?i:l[0]}let n,r;if(yt(e)){r=e.value;const l=t.filter(d=>{var h;return(h=d.identify)==null?void 0:h.call(d,r)});n=(s=l.find(d=>d.format===e.format))!=null?s:l.find(d=>!d.format)}else r=e,n=t.find(l=>l.nodeClass&&r instanceof l.nodeClass);if(!n){const l=(c=(a=r==null?void 0:r.constructor)==null?void 0:a.name)!=null?c:typeof r;throw new Error(`Tag not resolved for ${l} value`)}return n}function XA(t,e,{anchors:n,doc:r}){if(!r.directives)return"";const i=[],s=(yt(t)||Fn(t))&&t.anchor;s&&S1(s)&&(n.add(s),i.push(`&${s}`));const a=t.tag?t.tag:e.default?null:e.tag;return a&&i.push(r.directives.tagString(a)),i.join(" ")}function Zo(t,e,n,r){var l,d;if(Xt(t))return t.toString(e,n,r);if(ts(t)){if(e.doc.directives)return t.toString(e);if((l=e.resolvedAliases)!=null&&l.has(t))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(t):e.resolvedAliases=new Set([t]),t=t.resolve(e.doc)}let i;const s=on(t)?t:e.doc.createNode(t,{onTagObj:h=>i=h});i||(i=QA(e.doc.schema.tags,s));const a=XA(s,i,e);a.length>0&&(e.indentAtStart=((d=e.indentAtStart)!=null?d:0)+a.length+1);const c=typeof i.stringify=="function"?i.stringify(s,e,n,r):yt(s)?rg(s,e,n,r):s.toString(e,n,r);return a?yt(s)||c[0]==="{"||c[0]==="["?`${a} ${c}`:`${a} +${e.indent}${c}`:c}function ZA({key:t,value:e},n,r,i){var $,q;const{allNullValues:s,doc:a,indent:c,indentStep:l,options:{commentString:d,indentSeq:h,simpleKeys:m}}=n;let E=on(t)&&t.comment||null;if(m){if(E)throw new Error("With simple keys, key nodes cannot have comments");if(Fn(t)){const N="With simple keys, collection cannot be used as a key value";throw new Error(N)}}let T=!m&&(!t||E&&e==null&&!n.inFlow||Fn(t)||(yt(t)?t.type===Et.BLOCK_FOLDED||t.type===Et.BLOCK_LITERAL:typeof t=="object"));n=Object.assign({},n,{allNullValues:!1,implicitKey:!T&&(m||!s),indent:c+l});let R=!1,P=!1,A=Zo(t,n,()=>R=!0,()=>P=!0);if(!T&&!n.inFlow&&A.length>1024){if(m)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");T=!0}if(n.inFlow){if(s||e==null)return R&&r&&r(),A===""?"?":T?`? ${A}`:A}else if(s&&!m||e==null&&T)return A=`? ${A}`,E&&!R?A+=ao(A,n.indent,d(E)):P&&i&&i(),A;R&&(E=null),T?(E&&(A+=ao(A,n.indent,d(E))),A=`? ${A} +${c}:`):(A=`${A}:`,E&&(A+=ao(A,n.indent,d(E))));let F,S,y;on(e)?(F=!!e.spaceBefore,S=e.commentBefore,y=e.comment):(F=!1,S=null,y=null,e&&typeof e=="object"&&(e=a.createNode(e))),n.implicitKey=!1,!T&&!E&&yt(e)&&(n.indentAtStart=A.length+1),P=!1,!h&&l.length>=2&&!n.inFlow&&!T&&xn(e)&&!e.flow&&!e.tag&&!e.anchor&&(n.indent=n.indent.substring(2));let D=!1;const v=Zo(e,n,()=>D=!0,()=>P=!0);let _=" ";if(E||F||S){if(_=F?` +`:"",S){const N=d(S);_+=` +${Ss(N,n.indent)}`}v===""&&!n.inFlow?_===` `&&(_=` `):_+=` -${n.indent}`}else if(!k&&Fn(e)){const F=v[0],M=v.indexOf(` -`),I=M!==-1,Y=(q=($=n.inFlow)!=null?$:e.flow)!=null?q:e.items.length===0;if(I||!Y){let K=!1;if(I&&(F==="&"||F==="!")){let ne=v.indexOf(" ");F==="&"&&ne!==-1&&net===F1||yt(t)&&t.value===F1&&(!t.type||t.type===Et.PLAIN);function ig(t,e,n){const r=t&&ts(n)?n.resolve(t.doc):n;if(!Nn(r))throw new Error("Merge sources must be maps or map aliases");const i=r.toJSON(null,t,Map);for(const[s,a]of i)e instanceof Map?e.has(s)||e.set(s,a):e instanceof Set?e.add(s):Object.prototype.hasOwnProperty.call(e,s)||Object.defineProperty(e,s,{value:a,writable:!0,enumerable:!0,configurable:!0});return e}function tC(t,e,n){if(e===null)return"";if(typeof e!="object")return String(e);if(on(t)&&n&&n.doc){const r=P1(n.doc,{});r.anchors=new Set;for(const s of n.anchors.keys())r.anchors.add(s.anchor);r.inFlow=!0,r.inStringifyKey=!0;const i=t.toString(r);if(!n.mapKeyWarned){let s=JSON.stringify(i);s.length>40&&(s=s.substring(0,36)+'..."'),N1(n.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${s}. Set mapAsMap: true to use object keys.`),n.mapKeyWarned=!0}return i}return JSON.stringify(e)}function sg(t,e,n){const r=Ic(t,void 0,n),i=Ic(e,void 0,n);return new _r(r,i)}class _r{constructor(e,n=null){Object.defineProperty(this,ui,{value:E1}),this.key=e,this.value=n}clone(e){let{key:n,value:r}=this;return on(n)&&(n=n.clone(e)),on(r)&&(r=r.clone(e)),new _r(n,r)}toJSON(e,n){const r=n!=null&&n.mapAsMap?new Map:{};return R1(n,r,this)}toString(e,n,r){return e!=null&&e.doc?ZA(this,e,n,r):JSON.stringify(this)}}function I1(t,e,n){var s;return(((s=e.inFlow)!=null?s:t.flow)?rC:nC)(t,e,n)}function nC({comment:t,items:e},n,{blockItemPrefix:r,flowChars:i,itemIndent:s,onChompKeep:a,onComment:c}){const{indent:l,options:{commentString:d}}=n,h=Object.assign({},n,{indent:s,type:null});let m=!1;const E=[];for(let R=0;RA=null,()=>m=!0);A&&(N+=ao(N,s,d(A))),m&&A&&(m=!1),E.push(r+N)}let k;if(E.length===0)k=i.start+i.end;else{k=E[0];for(let R=1;Rt===F1||yt(t)&&t.value===F1&&(!t.type||t.type===Et.PLAIN);function ig(t,e,n){const r=t&&ts(n)?n.resolve(t.doc):n;if(!Nn(r))throw new Error("Merge sources must be maps or map aliases");const i=r.toJSON(null,t,Map);for(const[s,a]of i)e instanceof Map?e.has(s)||e.set(s,a):e instanceof Set?e.add(s):Object.prototype.hasOwnProperty.call(e,s)||Object.defineProperty(e,s,{value:a,writable:!0,enumerable:!0,configurable:!0});return e}function tC(t,e,n){if(e===null)return"";if(typeof e!="object")return String(e);if(on(t)&&n&&n.doc){const r=P1(n.doc,{});r.anchors=new Set;for(const s of n.anchors.keys())r.anchors.add(s.anchor);r.inFlow=!0,r.inStringifyKey=!0;const i=t.toString(r);if(!n.mapKeyWarned){let s=JSON.stringify(i);s.length>40&&(s=s.substring(0,36)+'..."'),N1(n.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${s}. Set mapAsMap: true to use object keys.`),n.mapKeyWarned=!0}return i}return JSON.stringify(e)}function sg(t,e,n){const r=Ic(t,void 0,n),i=Ic(e,void 0,n);return new _r(r,i)}class _r{constructor(e,n=null){Object.defineProperty(this,ui,{value:E1}),this.key=e,this.value=n}clone(e){let{key:n,value:r}=this;return on(n)&&(n=n.clone(e)),on(r)&&(r=r.clone(e)),new _r(n,r)}toJSON(e,n){const r=n!=null&&n.mapAsMap?new Map:{};return R1(n,r,this)}toString(e,n,r){return e!=null&&e.doc?ZA(this,e,n,r):JSON.stringify(this)}}function I1(t,e,n){var s;return(((s=e.inFlow)!=null?s:t.flow)?rC:nC)(t,e,n)}function nC({comment:t,items:e},n,{blockItemPrefix:r,flowChars:i,itemIndent:s,onChompKeep:a,onComment:c}){const{indent:l,options:{commentString:d}}=n,h=Object.assign({},n,{indent:s,type:null});let m=!1;const E=[];for(let R=0;RA=null,()=>m=!0);A&&(F+=ao(F,s,d(A))),m&&A&&(m=!1),E.push(r+F)}let T;if(E.length===0)T=i.start+i.end;else{T=E[0];for(let R=1;Ry=null);NE||D.includes(` -`))&&(m=!0),k.push(D),E=k.length}let R;const{start:P,end:A}=r;if(k.length===0)R=P+A;else if(m||(m=k.reduce((S,y)=>S+y.length+2,2)>Gf.maxFlowStringSingleLineLength),m){R=P;for(const N of k)R+=N?` -${c}${a}${N}`:` +`}}return t?(T+=` +`+Ss(d(t),l),c&&c()):m&&a&&a(),T}function rC({comment:t,items:e},n,{flowChars:r,itemIndent:i,onComment:s}){const{indent:a,indentStep:c,flowCollectionPadding:l,options:{commentString:d}}=n;i+=c;const h=Object.assign({},n,{indent:i,inFlow:!0,type:null});let m=!1,E=0;const T=[];for(let F=0;Fy=null);FE||D.includes(` +`))&&(m=!0),T.push(D),E=T.length}let R;const{start:P,end:A}=r;if(T.length===0)R=P+A;else if(m||(m=T.reduce((S,y)=>S+y.length+2,2)>Jf.maxFlowStringSingleLineLength),m){R=P;for(const F of T)R+=F?` +${c}${a}${F}`:` `;R+=` -${a}${A}`}else R=`${P}${l}${k.join(" ")}${l}${A}`;return t&&(R+=ao(R,a,d(t)),s&&s()),R}function td({indent:t,options:{commentString:e}},n,r,i){if(r&&i&&(r=r.replace(/^\n+/,"")),r){const s=Ss(e(r),t);n.push(s.trimStart())}}function ea(t,e){const n=yt(e)?e.value:e;for(const r of t)if(Xt(r)&&(r.key===e||r.key===n||yt(r.key)&&r.key.value===n))return r}class Ni extends Gf{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(oo,e),this.items=[]}add(e,n){var a;let r;Xt(e)?r=e:!e||typeof e!="object"||!("key"in e)?r=new _r(e,e==null?void 0:e.value):r=new _r(e.key,e.value);const i=ea(this.items,r.key),s=(a=this.schema)==null?void 0:a.sortMapEntries;if(i){if(!n)throw new Error(`Key ${r.key} already set`);yt(i.value)&&A1(r.value)?i.value.value=r.value:i.value=r.value}else if(s){const c=this.items.findIndex(l=>s(r,l)<0);c===-1?this.items.push(r):this.items.splice(c,0,r)}else this.items.push(r)}delete(e){const n=ea(this.items,e);return n?this.items.splice(this.items.indexOf(n),1).length>0:!1}get(e,n){var s;const r=ea(this.items,e),i=r==null?void 0:r.value;return(s=!n&&yt(i)?i.value:i)!=null?s:void 0}has(e){return!!ea(this.items,e)}set(e,n){this.add(new _r(e,n),!0)}toJSON(e,n,r){const i=r?new r:n!=null&&n.mapAsMap?new Map:{};n!=null&&n.onCreate&&n.onCreate(i);for(const s of this.items)R1(n,i,s);return i}toString(e,n,r){if(!e)return JSON.stringify(this);for(const i of this.items)if(!Xt(i))throw new Error(`Map items must all be pairs; found ${JSON.stringify(i)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),I1(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:r,onComment:n})}}function iC(t,e,n){const{keepUndefined:r,replacer:i}=n,s=new Ni(t),a=(c,l)=>{if(typeof i=="function")l=i.call(e,c,l);else if(Array.isArray(i)&&!i.includes(c))return;(l!==void 0||r)&&s.items.push(sg(c,l,n))};if(e instanceof Map)for(const[c,l]of e)a(c,l);else if(e&&typeof e=="object")for(const c of Object.keys(e))a(c,e[c]);return typeof t.sortMapEntries=="function"&&s.items.sort(t.sortMapEntries),s}const du={collection:"map",createNode:iC,default:!0,nodeClass:Ni,tag:"tag:yaml.org,2002:map",resolve(t,e){return Nn(t)||e("Expected a mapping for this tag"),t}};class hu extends Gf{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(cu,e),this.items=[]}add(e){this.items.push(e)}delete(e){const n=nd(e);return typeof n!="number"?!1:this.items.splice(n,1).length>0}get(e,n){const r=nd(e);if(typeof r!="number")return;const i=this.items[r];return!n&&yt(i)?i.value:i}has(e){const n=nd(e);return typeof n=="number"&&n=0?e:null}function sC(t,e,n){const{replacer:r}=n,i=new hu(t);if(e&&Symbol.iterator in Object(e)){let s=0;for(let a of e){if(typeof r=="function"){const c=e instanceof Set?a:String(s++);a=r.call(e,c,a)}i.items.push(Ic(a,void 0,n))}}return i}const pu={collection:"seq",createNode:sC,default:!0,nodeClass:hu,tag:"tag:yaml.org,2002:seq",resolve(t,e){return xn(t)||e("Expected a sequence for this tag"),t}},rd={identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify(t,e,n,r){return e=Object.assign({actualString:!0},e),rg(t,e,n,r)}},id={identify:t=>t==null,createNode:()=>new Et(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new Et(null),stringify:({source:t},e)=>typeof t=="string"&&id.test.test(t)?t:e.options.nullStr},og={identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:t=>new Et(t[0]==="t"||t[0]==="T"),stringify({source:t,value:e},n){if(t&&og.test.test(t)){const r=t[0]==="t"||t[0]==="T";if(e===r)return t}return e?n.options.trueStr:n.options.falseStr}};function Fi({format:t,minFractionDigits:e,tag:n,value:r}){if(typeof r=="bigint")return String(r);const i=typeof r=="number"?r:Number(r);if(!isFinite(i))return isNaN(i)?".nan":i<0?"-.inf":".inf";let s=JSON.stringify(r);if(!t&&e&&(!n||n==="tag:yaml.org,2002:float")&&/^\d/.test(s)){let a=s.indexOf(".");a<0&&(a=s.length,s+=".");let c=e-(s.length-a-1);for(;c-- >0;)s+="0"}return s}const M1={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF|nan|NaN|NAN))$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Fi},L1={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t),stringify(t){const e=Number(t.value);return isFinite(e)?e.toExponential():Fi(t)}},j1={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(t){const e=new Et(parseFloat(t)),n=t.indexOf(".");return n!==-1&&t[t.length-1]==="0"&&(e.minFractionDigits=t.length-n-1),e},stringify:Fi},sd=t=>typeof t=="bigint"||Number.isInteger(t),ag=(t,e,n,{intAsBigInt:r})=>r?BigInt(t):parseInt(t.substring(e),n);function x1(t,e,n){const{value:r}=t;return sd(r)&&r>=0?n+r.toString(e):Fi(t)}const B1={identify:t=>sd(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(t,e,n)=>ag(t,2,8,n),stringify:t=>x1(t,8,"0o")},q1={identify:sd,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(t,e,n)=>ag(t,0,10,n),stringify:Fi},W1={identify:t=>sd(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(t,e,n)=>ag(t,2,16,n),stringify:t=>x1(t,16,"0x")},oC=[du,pu,rd,id,og,B1,q1,W1,M1,L1,j1];function U1(t){return typeof t=="bigint"||Number.isInteger(t)}const od=({value:t})=>JSON.stringify(t),aC=[{identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify:od},{identify:t=>t==null,createNode:()=>new Et(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:od},{identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true|false$/,resolve:t=>t==="true",stringify:od},{identify:U1,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(t,e,{intAsBigInt:n})=>n?BigInt(t):parseInt(t,10),stringify:({value:t})=>U1(t)?t.toString():JSON.stringify(t)},{identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:t=>parseFloat(t),stringify:od}],uC={default:!0,tag:"",test:/^/,resolve(t,e){return e(`Unresolved plain scalar ${JSON.stringify(t)}`),t}},cC=[du,pu].concat(aC,uC);var er={},ad={};ad.byteLength=dC,ad.toByteArray=pC,ad.fromByteArray=yC;for(var rs=[],ci=[],lC=typeof Uint8Array<"u"?Uint8Array:Array,ug="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",mu=0,fC=ug.length;mu0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");n===-1&&(n=e);var r=n===e?0:4-n%4;return[n,r]}function dC(t){var e=V1(t),n=e[0],r=e[1];return(n+r)*3/4-r}function hC(t,e,n){return(e+n)*3/4-n}function pC(t){var e,n=V1(t),r=n[0],i=n[1],s=new lC(hC(t,r,i)),a=0,c=i>0?r-4:r,l;for(l=0;l>16&255,s[a++]=e>>8&255,s[a++]=e&255;return i===2&&(e=ci[t.charCodeAt(l)]<<2|ci[t.charCodeAt(l+1)]>>4,s[a++]=e&255),i===1&&(e=ci[t.charCodeAt(l)]<<10|ci[t.charCodeAt(l+1)]<<4|ci[t.charCodeAt(l+2)]>>2,s[a++]=e>>8&255,s[a++]=e&255),s}function mC(t){return rs[t>>18&63]+rs[t>>12&63]+rs[t>>6&63]+rs[t&63]}function gC(t,e,n){for(var r,i=[],s=e;sc?c:a+s));return r===1?(e=t[n-1],i.push(rs[e>>2]+rs[e<<4&63]+"==")):r===2&&(e=(t[n-2]<<8)+t[n-1],i.push(rs[e>>10]+rs[e>>4&63]+rs[e<<2&63]+"=")),i.join("")}var cg={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */cg.read=function(t,e,n,r,i){var s,a,c=i*8-r-1,l=(1<>1,h=-7,m=n?i-1:0,E=n?-1:1,k=t[e+m];for(m+=E,s=k&(1<<-h)-1,k>>=-h,h+=c;h>0;s=s*256+t[e+m],m+=E,h-=8);for(a=s&(1<<-h)-1,s>>=-h,h+=r;h>0;a=a*256+t[e+m],m+=E,h-=8);if(s===0)s=1-d;else{if(s===l)return a?NaN:(k?-1:1)*(1/0);a=a+Math.pow(2,r),s=s-d}return(k?-1:1)*a*Math.pow(2,s-r)},cg.write=function(t,e,n,r,i,s){var a,c,l,d=s*8-i-1,h=(1<>1,E=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,k=r?0:s-1,R=r?1:-1,P=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(c=isNaN(e)?1:0,a=h):(a=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-a))<1&&(a--,l*=2),a+m>=1?e+=E/l:e+=E*Math.pow(2,1-m),e*l>=2&&(a++,l/=2),a+m>=h?(c=0,a=h):a+m>=1?(c=(e*l-1)*Math.pow(2,i),a=a+m):(c=e*Math.pow(2,m-1)*Math.pow(2,i),a=0));i>=8;t[n+k]=c&255,k+=R,c/=256,i-=8);for(a=a<0;t[n+k]=a&255,k+=R,a/=256,d-=8);t[n+k-R]|=P*128};/*! +${a}${A}`}else R=`${P}${l}${T.join(" ")}${l}${A}`;return t&&(R+=ao(R,a,d(t)),s&&s()),R}function nd({indent:t,options:{commentString:e}},n,r,i){if(r&&i&&(r=r.replace(/^\n+/,"")),r){const s=Ss(e(r),t);n.push(s.trimStart())}}function ea(t,e){const n=yt(e)?e.value:e;for(const r of t)if(Xt(r)&&(r.key===e||r.key===n||yt(r.key)&&r.key.value===n))return r}class Ni extends Jf{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(oo,e),this.items=[]}add(e,n){var a;let r;Xt(e)?r=e:!e||typeof e!="object"||!("key"in e)?r=new _r(e,e==null?void 0:e.value):r=new _r(e.key,e.value);const i=ea(this.items,r.key),s=(a=this.schema)==null?void 0:a.sortMapEntries;if(i){if(!n)throw new Error(`Key ${r.key} already set`);yt(i.value)&&A1(r.value)?i.value.value=r.value:i.value=r.value}else if(s){const c=this.items.findIndex(l=>s(r,l)<0);c===-1?this.items.push(r):this.items.splice(c,0,r)}else this.items.push(r)}delete(e){const n=ea(this.items,e);return n?this.items.splice(this.items.indexOf(n),1).length>0:!1}get(e,n){var s;const r=ea(this.items,e),i=r==null?void 0:r.value;return(s=!n&&yt(i)?i.value:i)!=null?s:void 0}has(e){return!!ea(this.items,e)}set(e,n){this.add(new _r(e,n),!0)}toJSON(e,n,r){const i=r?new r:n!=null&&n.mapAsMap?new Map:{};n!=null&&n.onCreate&&n.onCreate(i);for(const s of this.items)R1(n,i,s);return i}toString(e,n,r){if(!e)return JSON.stringify(this);for(const i of this.items)if(!Xt(i))throw new Error(`Map items must all be pairs; found ${JSON.stringify(i)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),I1(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:r,onComment:n})}}function iC(t,e,n){const{keepUndefined:r,replacer:i}=n,s=new Ni(t),a=(c,l)=>{if(typeof i=="function")l=i.call(e,c,l);else if(Array.isArray(i)&&!i.includes(c))return;(l!==void 0||r)&&s.items.push(sg(c,l,n))};if(e instanceof Map)for(const[c,l]of e)a(c,l);else if(e&&typeof e=="object")for(const c of Object.keys(e))a(c,e[c]);return typeof t.sortMapEntries=="function"&&s.items.sort(t.sortMapEntries),s}const du={collection:"map",createNode:iC,default:!0,nodeClass:Ni,tag:"tag:yaml.org,2002:map",resolve(t,e){return Nn(t)||e("Expected a mapping for this tag"),t}};class hu extends Jf{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(cu,e),this.items=[]}add(e){this.items.push(e)}delete(e){const n=rd(e);return typeof n!="number"?!1:this.items.splice(n,1).length>0}get(e,n){const r=rd(e);if(typeof r!="number")return;const i=this.items[r];return!n&&yt(i)?i.value:i}has(e){const n=rd(e);return typeof n=="number"&&n=0?e:null}function sC(t,e,n){const{replacer:r}=n,i=new hu(t);if(e&&Symbol.iterator in Object(e)){let s=0;for(let a of e){if(typeof r=="function"){const c=e instanceof Set?a:String(s++);a=r.call(e,c,a)}i.items.push(Ic(a,void 0,n))}}return i}const pu={collection:"seq",createNode:sC,default:!0,nodeClass:hu,tag:"tag:yaml.org,2002:seq",resolve(t,e){return xn(t)||e("Expected a sequence for this tag"),t}},id={identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify(t,e,n,r){return e=Object.assign({actualString:!0},e),rg(t,e,n,r)}},sd={identify:t=>t==null,createNode:()=>new Et(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new Et(null),stringify:({source:t},e)=>typeof t=="string"&&sd.test.test(t)?t:e.options.nullStr},og={identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:t=>new Et(t[0]==="t"||t[0]==="T"),stringify({source:t,value:e},n){if(t&&og.test.test(t)){const r=t[0]==="t"||t[0]==="T";if(e===r)return t}return e?n.options.trueStr:n.options.falseStr}};function Fi({format:t,minFractionDigits:e,tag:n,value:r}){if(typeof r=="bigint")return String(r);const i=typeof r=="number"?r:Number(r);if(!isFinite(i))return isNaN(i)?".nan":i<0?"-.inf":".inf";let s=JSON.stringify(r);if(!t&&e&&(!n||n==="tag:yaml.org,2002:float")&&/^\d/.test(s)){let a=s.indexOf(".");a<0&&(a=s.length,s+=".");let c=e-(s.length-a-1);for(;c-- >0;)s+="0"}return s}const M1={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF|nan|NaN|NAN))$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Fi},L1={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t),stringify(t){const e=Number(t.value);return isFinite(e)?e.toExponential():Fi(t)}},j1={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(t){const e=new Et(parseFloat(t)),n=t.indexOf(".");return n!==-1&&t[t.length-1]==="0"&&(e.minFractionDigits=t.length-n-1),e},stringify:Fi},od=t=>typeof t=="bigint"||Number.isInteger(t),ag=(t,e,n,{intAsBigInt:r})=>r?BigInt(t):parseInt(t.substring(e),n);function x1(t,e,n){const{value:r}=t;return od(r)&&r>=0?n+r.toString(e):Fi(t)}const B1={identify:t=>od(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(t,e,n)=>ag(t,2,8,n),stringify:t=>x1(t,8,"0o")},q1={identify:od,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(t,e,n)=>ag(t,0,10,n),stringify:Fi},W1={identify:t=>od(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(t,e,n)=>ag(t,2,16,n),stringify:t=>x1(t,16,"0x")},oC=[du,pu,id,sd,og,B1,q1,W1,M1,L1,j1];function U1(t){return typeof t=="bigint"||Number.isInteger(t)}const ad=({value:t})=>JSON.stringify(t),aC=[{identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify:ad},{identify:t=>t==null,createNode:()=>new Et(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:ad},{identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true|false$/,resolve:t=>t==="true",stringify:ad},{identify:U1,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(t,e,{intAsBigInt:n})=>n?BigInt(t):parseInt(t,10),stringify:({value:t})=>U1(t)?t.toString():JSON.stringify(t)},{identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:t=>parseFloat(t),stringify:ad}],uC={default:!0,tag:"",test:/^/,resolve(t,e){return e(`Unresolved plain scalar ${JSON.stringify(t)}`),t}},cC=[du,pu].concat(aC,uC);var er={},ud={};ud.byteLength=dC,ud.toByteArray=pC,ud.fromByteArray=yC;for(var rs=[],ci=[],lC=typeof Uint8Array<"u"?Uint8Array:Array,ug="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",mu=0,fC=ug.length;mu0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");n===-1&&(n=e);var r=n===e?0:4-n%4;return[n,r]}function dC(t){var e=V1(t),n=e[0],r=e[1];return(n+r)*3/4-r}function hC(t,e,n){return(e+n)*3/4-n}function pC(t){var e,n=V1(t),r=n[0],i=n[1],s=new lC(hC(t,r,i)),a=0,c=i>0?r-4:r,l;for(l=0;l>16&255,s[a++]=e>>8&255,s[a++]=e&255;return i===2&&(e=ci[t.charCodeAt(l)]<<2|ci[t.charCodeAt(l+1)]>>4,s[a++]=e&255),i===1&&(e=ci[t.charCodeAt(l)]<<10|ci[t.charCodeAt(l+1)]<<4|ci[t.charCodeAt(l+2)]>>2,s[a++]=e>>8&255,s[a++]=e&255),s}function mC(t){return rs[t>>18&63]+rs[t>>12&63]+rs[t>>6&63]+rs[t&63]}function gC(t,e,n){for(var r,i=[],s=e;sc?c:a+s));return r===1?(e=t[n-1],i.push(rs[e>>2]+rs[e<<4&63]+"==")):r===2&&(e=(t[n-2]<<8)+t[n-1],i.push(rs[e>>10]+rs[e>>4&63]+rs[e<<2&63]+"=")),i.join("")}var cg={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */cg.read=function(t,e,n,r,i){var s,a,c=i*8-r-1,l=(1<>1,h=-7,m=n?i-1:0,E=n?-1:1,T=t[e+m];for(m+=E,s=T&(1<<-h)-1,T>>=-h,h+=c;h>0;s=s*256+t[e+m],m+=E,h-=8);for(a=s&(1<<-h)-1,s>>=-h,h+=r;h>0;a=a*256+t[e+m],m+=E,h-=8);if(s===0)s=1-d;else{if(s===l)return a?NaN:(T?-1:1)*(1/0);a=a+Math.pow(2,r),s=s-d}return(T?-1:1)*a*Math.pow(2,s-r)},cg.write=function(t,e,n,r,i,s){var a,c,l,d=s*8-i-1,h=(1<>1,E=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,T=r?0:s-1,R=r?1:-1,P=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(c=isNaN(e)?1:0,a=h):(a=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-a))<1&&(a--,l*=2),a+m>=1?e+=E/l:e+=E*Math.pow(2,1-m),e*l>=2&&(a++,l/=2),a+m>=h?(c=0,a=h):a+m>=1?(c=(e*l-1)*Math.pow(2,i),a=a+m):(c=e*Math.pow(2,m-1)*Math.pow(2,i),a=0));i>=8;t[n+T]=c&255,T+=R,c/=256,i-=8);for(a=a<0;t[n+T]=a&255,T+=R,a/=256,d-=8);t[n+T-R]|=P*128};/*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT - */(function(t){const e=ad,n=cg,r=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=h,t.SlowBuffer=v,t.INSPECT_MAX_BYTES=50;const i=2147483647;t.kMaxLength=i;const{Uint8Array:s,ArrayBuffer:a,SharedArrayBuffer:c}=globalThis;h.TYPED_ARRAY_SUPPORT=l(),!h.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function l(){try{const C=new s(1),g={foo:function(){return 42}};return Object.setPrototypeOf(g,s.prototype),Object.setPrototypeOf(C,g),C.foo()===42}catch{return!1}}Object.defineProperty(h.prototype,"parent",{enumerable:!0,get:function(){if(!!h.isBuffer(this))return this.buffer}}),Object.defineProperty(h.prototype,"offset",{enumerable:!0,get:function(){if(!!h.isBuffer(this))return this.byteOffset}});function d(C){if(C>i)throw new RangeError('The value "'+C+'" is invalid for option "size"');const g=new s(C);return Object.setPrototypeOf(g,h.prototype),g}function h(C,g,w){if(typeof C=="number"){if(typeof g=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return R(C)}return m(C,g,w)}h.poolSize=8192;function m(C,g,w){if(typeof C=="string")return P(C,g);if(a.isView(C))return N(C);if(C==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof C);if(qt(C,a)||C&&qt(C.buffer,a)||typeof c<"u"&&(qt(C,c)||C&&qt(C.buffer,c)))return S(C,g,w);if(typeof C=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const j=C.valueOf&&C.valueOf();if(j!=null&&j!==C)return h.from(j,g,w);const J=y(C);if(J)return J;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof C[Symbol.toPrimitive]=="function")return h.from(C[Symbol.toPrimitive]("string"),g,w);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof C)}h.from=function(C,g,w){return m(C,g,w)},Object.setPrototypeOf(h.prototype,s.prototype),Object.setPrototypeOf(h,s);function E(C){if(typeof C!="number")throw new TypeError('"size" argument must be of type number');if(C<0)throw new RangeError('The value "'+C+'" is invalid for option "size"')}function k(C,g,w){return E(C),C<=0?d(C):g!==void 0?typeof w=="string"?d(C).fill(g,w):d(C).fill(g):d(C)}h.alloc=function(C,g,w){return k(C,g,w)};function R(C){return E(C),d(C<0?0:D(C)|0)}h.allocUnsafe=function(C){return R(C)},h.allocUnsafeSlow=function(C){return R(C)};function P(C,g){if((typeof g!="string"||g==="")&&(g="utf8"),!h.isEncoding(g))throw new TypeError("Unknown encoding: "+g);const w=_(C,g)|0;let j=d(w);const J=j.write(C,g);return J!==w&&(j=j.slice(0,J)),j}function A(C){const g=C.length<0?0:D(C.length)|0,w=d(g);for(let j=0;j=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return C|0}function v(C){return+C!=C&&(C=0),h.alloc(+C)}h.isBuffer=function(g){return g!=null&&g._isBuffer===!0&&g!==h.prototype},h.compare=function(g,w){if(qt(g,s)&&(g=h.from(g,g.offset,g.byteLength)),qt(w,s)&&(w=h.from(w,w.offset,w.byteLength)),!h.isBuffer(g)||!h.isBuffer(w))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(g===w)return 0;let j=g.length,J=w.length;for(let re=0,ce=Math.min(j,J);reJ.length?(h.isBuffer(ce)||(ce=h.from(ce)),ce.copy(J,re)):s.prototype.set.call(J,ce,re);else if(h.isBuffer(ce))ce.copy(J,re);else throw new TypeError('"list" argument must be an Array of Buffers');re+=ce.length}return J};function _(C,g){if(h.isBuffer(C))return C.length;if(a.isView(C)||qt(C,a))return C.byteLength;if(typeof C!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof C);const w=C.length,j=arguments.length>2&&arguments[2]===!0;if(!j&&w===0)return 0;let J=!1;for(;;)switch(g){case"ascii":case"latin1":case"binary":return w;case"utf8":case"utf-8":return kn(C).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return w*2;case"hex":return w>>>1;case"base64":return Xn(C).length;default:if(J)return j?-1:kn(C).length;g=(""+g).toLowerCase(),J=!0}}h.byteLength=_;function $(C,g,w){let j=!1;if((g===void 0||g<0)&&(g=0),g>this.length||((w===void 0||w>this.length)&&(w=this.length),w<=0)||(w>>>=0,g>>>=0,w<=g))return"";for(C||(C="utf8");;)switch(C){case"hex":return fe(this,g,w);case"utf8":case"utf-8":return De(this,g,w);case"ascii":return Se(this,g,w);case"latin1":case"binary":return H(this,g,w);case"base64":return ye(this,g,w);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ae(this,g,w);default:if(j)throw new TypeError("Unknown encoding: "+C);C=(C+"").toLowerCase(),j=!0}}h.prototype._isBuffer=!0;function q(C,g,w){const j=C[g];C[g]=C[w],C[w]=j}h.prototype.swap16=function(){const g=this.length;if(g%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let w=0;ww&&(g+=" ... "),""},r&&(h.prototype[r]=h.prototype.inspect),h.prototype.compare=function(g,w,j,J,re){if(qt(g,s)&&(g=h.from(g,g.offset,g.byteLength)),!h.isBuffer(g))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof g);if(w===void 0&&(w=0),j===void 0&&(j=g?g.length:0),J===void 0&&(J=0),re===void 0&&(re=this.length),w<0||j>g.length||J<0||re>this.length)throw new RangeError("out of range index");if(J>=re&&w>=j)return 0;if(J>=re)return-1;if(w>=j)return 1;if(w>>>=0,j>>>=0,J>>>=0,re>>>=0,this===g)return 0;let ce=re-J,Ne=j-w;const Je=Math.min(ce,Ne),He=this.slice(J,re),Xe=g.slice(w,j);for(let je=0;je2147483647?w=2147483647:w<-2147483648&&(w=-2147483648),w=+w,X(w)&&(w=J?0:C.length-1),w<0&&(w=C.length+w),w>=C.length){if(J)return-1;w=C.length-1}else if(w<0)if(J)w=0;else return-1;if(typeof g=="string"&&(g=h.from(g,j)),h.isBuffer(g))return g.length===0?-1:M(C,g,w,j,J);if(typeof g=="number")return g=g&255,typeof s.prototype.indexOf=="function"?J?s.prototype.indexOf.call(C,g,w):s.prototype.lastIndexOf.call(C,g,w):M(C,[g],w,j,J);throw new TypeError("val must be string, number or Buffer")}function M(C,g,w,j,J){let re=1,ce=C.length,Ne=g.length;if(j!==void 0&&(j=String(j).toLowerCase(),j==="ucs2"||j==="ucs-2"||j==="utf16le"||j==="utf-16le")){if(C.length<2||g.length<2)return-1;re=2,ce/=2,Ne/=2,w/=2}function Je(Xe,je){return re===1?Xe[je]:Xe.readUInt16BE(je*re)}let He;if(J){let Xe=-1;for(He=w;Hece&&(w=ce-Ne),He=w;He>=0;He--){let Xe=!0;for(let je=0;jeJ&&(j=J)):j=J;const re=g.length;j>re/2&&(j=re/2);let ce;for(ce=0;ce>>0,isFinite(j)?(j=j>>>0,J===void 0&&(J="utf8")):(J=j,j=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const re=this.length-w;if((j===void 0||j>re)&&(j=re),g.length>0&&(j<0||w<0)||w>this.length)throw new RangeError("Attempt to write outside buffer bounds");J||(J="utf8");let ce=!1;for(;;)switch(J){case"hex":return I(this,g,w,j);case"utf8":case"utf-8":return Y(this,g,w,j);case"ascii":case"latin1":case"binary":return K(this,g,w,j);case"base64":return ne(this,g,w,j);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ge(this,g,w,j);default:if(ce)throw new TypeError("Unknown encoding: "+J);J=(""+J).toLowerCase(),ce=!0}},h.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function ye(C,g,w){return g===0&&w===C.length?e.fromByteArray(C):e.fromByteArray(C.slice(g,w))}function De(C,g,w){w=Math.min(C.length,w);const j=[];let J=g;for(;J239?4:re>223?3:re>191?2:1;if(J+Ne<=w){let Je,He,Xe,je;switch(Ne){case 1:re<128&&(ce=re);break;case 2:Je=C[J+1],(Je&192)===128&&(je=(re&31)<<6|Je&63,je>127&&(ce=je));break;case 3:Je=C[J+1],He=C[J+2],(Je&192)===128&&(He&192)===128&&(je=(re&15)<<12|(Je&63)<<6|He&63,je>2047&&(je<55296||je>57343)&&(ce=je));break;case 4:Je=C[J+1],He=C[J+2],Xe=C[J+3],(Je&192)===128&&(He&192)===128&&(Xe&192)===128&&(je=(re&15)<<18|(Je&63)<<12|(He&63)<<6|Xe&63,je>65535&&je<1114112&&(ce=je))}}ce===null?(ce=65533,Ne=1):ce>65535&&(ce-=65536,j.push(ce>>>10&1023|55296),ce=56320|ce&1023),j.push(ce),J+=Ne}return nt(j)}const Be=4096;function nt(C){const g=C.length;if(g<=Be)return String.fromCharCode.apply(String,C);let w="",j=0;for(;jj)&&(w=j);let J="";for(let re=g;rej&&(g=j),w<0?(w+=j,w<0&&(w=0)):w>j&&(w=j),ww)throw new RangeError("Trying to access beyond buffer length")}h.prototype.readUintLE=h.prototype.readUIntLE=function(g,w,j){g=g>>>0,w=w>>>0,j||U(g,w,this.length);let J=this[g],re=1,ce=0;for(;++ce>>0,w=w>>>0,j||U(g,w,this.length);let J=this[g+--w],re=1;for(;w>0&&(re*=256);)J+=this[g+--w]*re;return J},h.prototype.readUint8=h.prototype.readUInt8=function(g,w){return g=g>>>0,w||U(g,1,this.length),this[g]},h.prototype.readUint16LE=h.prototype.readUInt16LE=function(g,w){return g=g>>>0,w||U(g,2,this.length),this[g]|this[g+1]<<8},h.prototype.readUint16BE=h.prototype.readUInt16BE=function(g,w){return g=g>>>0,w||U(g,2,this.length),this[g]<<8|this[g+1]},h.prototype.readUint32LE=h.prototype.readUInt32LE=function(g,w){return g=g>>>0,w||U(g,4,this.length),(this[g]|this[g+1]<<8|this[g+2]<<16)+this[g+3]*16777216},h.prototype.readUint32BE=h.prototype.readUInt32BE=function(g,w){return g=g>>>0,w||U(g,4,this.length),this[g]*16777216+(this[g+1]<<16|this[g+2]<<8|this[g+3])},h.prototype.readBigUInt64LE=ee(function(g){g=g>>>0,Sn(g,"offset");const w=this[g],j=this[g+7];(w===void 0||j===void 0)&&Mt(g,this.length-8);const J=w+this[++g]*2**8+this[++g]*2**16+this[++g]*2**24,re=this[++g]+this[++g]*2**8+this[++g]*2**16+j*2**24;return BigInt(J)+(BigInt(re)<>>0,Sn(g,"offset");const w=this[g],j=this[g+7];(w===void 0||j===void 0)&&Mt(g,this.length-8);const J=w*2**24+this[++g]*2**16+this[++g]*2**8+this[++g],re=this[++g]*2**24+this[++g]*2**16+this[++g]*2**8+j;return(BigInt(J)<>>0,w=w>>>0,j||U(g,w,this.length);let J=this[g],re=1,ce=0;for(;++ce=re&&(J-=Math.pow(2,8*w)),J},h.prototype.readIntBE=function(g,w,j){g=g>>>0,w=w>>>0,j||U(g,w,this.length);let J=w,re=1,ce=this[g+--J];for(;J>0&&(re*=256);)ce+=this[g+--J]*re;return re*=128,ce>=re&&(ce-=Math.pow(2,8*w)),ce},h.prototype.readInt8=function(g,w){return g=g>>>0,w||U(g,1,this.length),this[g]&128?(255-this[g]+1)*-1:this[g]},h.prototype.readInt16LE=function(g,w){g=g>>>0,w||U(g,2,this.length);const j=this[g]|this[g+1]<<8;return j&32768?j|4294901760:j},h.prototype.readInt16BE=function(g,w){g=g>>>0,w||U(g,2,this.length);const j=this[g+1]|this[g]<<8;return j&32768?j|4294901760:j},h.prototype.readInt32LE=function(g,w){return g=g>>>0,w||U(g,4,this.length),this[g]|this[g+1]<<8|this[g+2]<<16|this[g+3]<<24},h.prototype.readInt32BE=function(g,w){return g=g>>>0,w||U(g,4,this.length),this[g]<<24|this[g+1]<<16|this[g+2]<<8|this[g+3]},h.prototype.readBigInt64LE=ee(function(g){g=g>>>0,Sn(g,"offset");const w=this[g],j=this[g+7];(w===void 0||j===void 0)&&Mt(g,this.length-8);const J=this[g+4]+this[g+5]*2**8+this[g+6]*2**16+(j<<24);return(BigInt(J)<>>0,Sn(g,"offset");const w=this[g],j=this[g+7];(w===void 0||j===void 0)&&Mt(g,this.length-8);const J=(w<<24)+this[++g]*2**16+this[++g]*2**8+this[++g];return(BigInt(J)<>>0,w||U(g,4,this.length),n.read(this,g,!0,23,4)},h.prototype.readFloatBE=function(g,w){return g=g>>>0,w||U(g,4,this.length),n.read(this,g,!1,23,4)},h.prototype.readDoubleLE=function(g,w){return g=g>>>0,w||U(g,8,this.length),n.read(this,g,!0,52,8)},h.prototype.readDoubleBE=function(g,w){return g=g>>>0,w||U(g,8,this.length),n.read(this,g,!1,52,8)};function Z(C,g,w,j,J,re){if(!h.isBuffer(C))throw new TypeError('"buffer" argument must be a Buffer instance');if(g>J||gC.length)throw new RangeError("Index out of range")}h.prototype.writeUintLE=h.prototype.writeUIntLE=function(g,w,j,J){if(g=+g,w=w>>>0,j=j>>>0,!J){const Ne=Math.pow(2,8*j)-1;Z(this,g,w,j,Ne,0)}let re=1,ce=0;for(this[w]=g&255;++ce>>0,j=j>>>0,!J){const Ne=Math.pow(2,8*j)-1;Z(this,g,w,j,Ne,0)}let re=j-1,ce=1;for(this[w+re]=g&255;--re>=0&&(ce*=256);)this[w+re]=g/ce&255;return w+j},h.prototype.writeUint8=h.prototype.writeUInt8=function(g,w,j){return g=+g,w=w>>>0,j||Z(this,g,w,1,255,0),this[w]=g&255,w+1},h.prototype.writeUint16LE=h.prototype.writeUInt16LE=function(g,w,j){return g=+g,w=w>>>0,j||Z(this,g,w,2,65535,0),this[w]=g&255,this[w+1]=g>>>8,w+2},h.prototype.writeUint16BE=h.prototype.writeUInt16BE=function(g,w,j){return g=+g,w=w>>>0,j||Z(this,g,w,2,65535,0),this[w]=g>>>8,this[w+1]=g&255,w+2},h.prototype.writeUint32LE=h.prototype.writeUInt32LE=function(g,w,j){return g=+g,w=w>>>0,j||Z(this,g,w,4,4294967295,0),this[w+3]=g>>>24,this[w+2]=g>>>16,this[w+1]=g>>>8,this[w]=g&255,w+4},h.prototype.writeUint32BE=h.prototype.writeUInt32BE=function(g,w,j){return g=+g,w=w>>>0,j||Z(this,g,w,4,4294967295,0),this[w]=g>>>24,this[w+1]=g>>>16,this[w+2]=g>>>8,this[w+3]=g&255,w+4};function pe(C,g,w,j,J){un(g,j,J,C,w,7);let re=Number(g&BigInt(4294967295));C[w++]=re,re=re>>8,C[w++]=re,re=re>>8,C[w++]=re,re=re>>8,C[w++]=re;let ce=Number(g>>BigInt(32)&BigInt(4294967295));return C[w++]=ce,ce=ce>>8,C[w++]=ce,ce=ce>>8,C[w++]=ce,ce=ce>>8,C[w++]=ce,w}function Me(C,g,w,j,J){un(g,j,J,C,w,7);let re=Number(g&BigInt(4294967295));C[w+7]=re,re=re>>8,C[w+6]=re,re=re>>8,C[w+5]=re,re=re>>8,C[w+4]=re;let ce=Number(g>>BigInt(32)&BigInt(4294967295));return C[w+3]=ce,ce=ce>>8,C[w+2]=ce,ce=ce>>8,C[w+1]=ce,ce=ce>>8,C[w]=ce,w+8}h.prototype.writeBigUInt64LE=ee(function(g,w=0){return pe(this,g,w,BigInt(0),BigInt("0xffffffffffffffff"))}),h.prototype.writeBigUInt64BE=ee(function(g,w=0){return Me(this,g,w,BigInt(0),BigInt("0xffffffffffffffff"))}),h.prototype.writeIntLE=function(g,w,j,J){if(g=+g,w=w>>>0,!J){const Je=Math.pow(2,8*j-1);Z(this,g,w,j,Je-1,-Je)}let re=0,ce=1,Ne=0;for(this[w]=g&255;++re>0)-Ne&255;return w+j},h.prototype.writeIntBE=function(g,w,j,J){if(g=+g,w=w>>>0,!J){const Je=Math.pow(2,8*j-1);Z(this,g,w,j,Je-1,-Je)}let re=j-1,ce=1,Ne=0;for(this[w+re]=g&255;--re>=0&&(ce*=256);)g<0&&Ne===0&&this[w+re+1]!==0&&(Ne=1),this[w+re]=(g/ce>>0)-Ne&255;return w+j},h.prototype.writeInt8=function(g,w,j){return g=+g,w=w>>>0,j||Z(this,g,w,1,127,-128),g<0&&(g=255+g+1),this[w]=g&255,w+1},h.prototype.writeInt16LE=function(g,w,j){return g=+g,w=w>>>0,j||Z(this,g,w,2,32767,-32768),this[w]=g&255,this[w+1]=g>>>8,w+2},h.prototype.writeInt16BE=function(g,w,j){return g=+g,w=w>>>0,j||Z(this,g,w,2,32767,-32768),this[w]=g>>>8,this[w+1]=g&255,w+2},h.prototype.writeInt32LE=function(g,w,j){return g=+g,w=w>>>0,j||Z(this,g,w,4,2147483647,-2147483648),this[w]=g&255,this[w+1]=g>>>8,this[w+2]=g>>>16,this[w+3]=g>>>24,w+4},h.prototype.writeInt32BE=function(g,w,j){return g=+g,w=w>>>0,j||Z(this,g,w,4,2147483647,-2147483648),g<0&&(g=4294967295+g+1),this[w]=g>>>24,this[w+1]=g>>>16,this[w+2]=g>>>8,this[w+3]=g&255,w+4},h.prototype.writeBigInt64LE=ee(function(g,w=0){return pe(this,g,w,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),h.prototype.writeBigInt64BE=ee(function(g,w=0){return Me(this,g,w,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Ie(C,g,w,j,J,re){if(w+j>C.length)throw new RangeError("Index out of range");if(w<0)throw new RangeError("Index out of range")}function qe(C,g,w,j,J){return g=+g,w=w>>>0,J||Ie(C,g,w,4),n.write(C,g,w,j,23,4),w+4}h.prototype.writeFloatLE=function(g,w,j){return qe(this,g,w,!0,j)},h.prototype.writeFloatBE=function(g,w,j){return qe(this,g,w,!1,j)};function ze(C,g,w,j,J){return g=+g,w=w>>>0,J||Ie(C,g,w,8),n.write(C,g,w,j,52,8),w+8}h.prototype.writeDoubleLE=function(g,w,j){return ze(this,g,w,!0,j)},h.prototype.writeDoubleBE=function(g,w,j){return ze(this,g,w,!1,j)},h.prototype.copy=function(g,w,j,J){if(!h.isBuffer(g))throw new TypeError("argument should be a Buffer");if(j||(j=0),!J&&J!==0&&(J=this.length),w>=g.length&&(w=g.length),w||(w=0),J>0&&J=this.length)throw new RangeError("Index out of range");if(J<0)throw new RangeError("sourceEnd out of bounds");J>this.length&&(J=this.length),g.length-w>>0,j=j===void 0?this.length:j>>>0,g||(g=0);let re;if(typeof g=="number")for(re=w;re2**32?J=_n(String(w)):typeof w=="bigint"&&(J=String(w),(w>BigInt(2)**BigInt(32)||w<-(BigInt(2)**BigInt(32)))&&(J=_n(J)),J+="n"),j+=` It must be ${g}. Received ${J}`,j},RangeError);function _n(C){let g="",w=C.length;const j=C[0]==="-"?1:0;for(;w>=j+4;w-=3)g=`_${C.slice(w-3,w)}${g}`;return`${C.slice(0,w)}${g}`}function at(C,g,w){Sn(g,"offset"),(C[g]===void 0||C[g+w]===void 0)&&Mt(g,C.length-(w+1))}function un(C,g,w,j,J,re){if(C>w||C3?g===0||g===BigInt(0)?Ne=`>= 0${ce} and < 2${ce} ** ${(re+1)*8}${ce}`:Ne=`>= -(2${ce} ** ${(re+1)*8-1}${ce}) and < 2 ** ${(re+1)*8-1}${ce}`:Ne=`>= ${g}${ce} and <= ${w}${ce}`,new Ge.ERR_OUT_OF_RANGE("value",Ne,C)}at(j,J,re)}function Sn(C,g){if(typeof C!="number")throw new Ge.ERR_INVALID_ARG_TYPE(g,"number",C)}function Mt(C,g,w){throw Math.floor(C)!==C?(Sn(C,w),new Ge.ERR_OUT_OF_RANGE(w||"offset","an integer",C)):g<0?new Ge.ERR_BUFFER_OUT_OF_BOUNDS:new Ge.ERR_OUT_OF_RANGE(w||"offset",`>= ${w?1:0} and <= ${g}`,C)}const Tn=/[^+/0-9A-Za-z-_]/g;function ur(C){if(C=C.split("=")[0],C=C.trim().replace(Tn,""),C.length<2)return"";for(;C.length%4!==0;)C=C+"=";return C}function kn(C,g){g=g||1/0;let w;const j=C.length;let J=null;const re=[];for(let ce=0;ce55295&&w<57344){if(!J){if(w>56319){(g-=3)>-1&&re.push(239,191,189);continue}else if(ce+1===j){(g-=3)>-1&&re.push(239,191,189);continue}J=w;continue}if(w<56320){(g-=3)>-1&&re.push(239,191,189),J=w;continue}w=(J-55296<<10|w-56320)+65536}else J&&(g-=3)>-1&&re.push(239,191,189);if(J=null,w<128){if((g-=1)<0)break;re.push(w)}else if(w<2048){if((g-=2)<0)break;re.push(w>>6|192,w&63|128)}else if(w<65536){if((g-=3)<0)break;re.push(w>>12|224,w>>6&63|128,w&63|128)}else if(w<1114112){if((g-=4)<0)break;re.push(w>>18|240,w>>12&63|128,w>>6&63|128,w&63|128)}else throw new Error("Invalid code point")}return re}function Lt(C){const g=[];for(let w=0;w>8,J=w%256,re.push(J),re.push(j);return re}function Xn(C){return e.toByteArray(ur(C))}function Rn(C,g,w,j){let J;for(J=0;J=g.length||J>=C.length);++J)g[J+w]=C[J];return J}function qt(C,g){return C instanceof g||C!=null&&C.constructor!=null&&C.constructor.name!=null&&C.constructor.name===g.name}function X(C){return C!==C}const V=function(){const C="0123456789abcdef",g=new Array(256);for(let w=0;w<16;++w){const j=w*16;for(let J=0;J<16;++J)g[j+J]=C[w]+C[J]}return g}();function ee(C){return typeof BigInt>"u"?ie:C}function ie(){throw new Error("BigInt not supported")}})(er);const is=er.Buffer;er.Blob,er.BlobOptions,er.Buffer,er.File,er.FileOptions,er.INSPECT_MAX_BYTES,er.SlowBuffer,er.TranscodeEncoding,er.atob,er.btoa,er.constants,er.isAscii,er.isUtf8,er.kMaxLength,er.kStringMaxLength,er.resolveObjectURL,er.transcode;const lg={identify:t=>t instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(t,e){if(typeof is=="function")return is.from(t,"base64");if(typeof atob=="function"){const n=atob(t.replace(/[\n\r]/g,"")),r=new Uint8Array(n.length);for(let i=0;ii)throw new RangeError('The value "'+C+'" is invalid for option "size"');const g=new s(C);return Object.setPrototypeOf(g,h.prototype),g}function h(C,g,w){if(typeof C=="number"){if(typeof g=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return R(C)}return m(C,g,w)}h.poolSize=8192;function m(C,g,w){if(typeof C=="string")return P(C,g);if(a.isView(C))return F(C);if(C==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof C);if(qt(C,a)||C&&qt(C.buffer,a)||typeof c<"u"&&(qt(C,c)||C&&qt(C.buffer,c)))return S(C,g,w);if(typeof C=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const j=C.valueOf&&C.valueOf();if(j!=null&&j!==C)return h.from(j,g,w);const J=y(C);if(J)return J;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof C[Symbol.toPrimitive]=="function")return h.from(C[Symbol.toPrimitive]("string"),g,w);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof C)}h.from=function(C,g,w){return m(C,g,w)},Object.setPrototypeOf(h.prototype,s.prototype),Object.setPrototypeOf(h,s);function E(C){if(typeof C!="number")throw new TypeError('"size" argument must be of type number');if(C<0)throw new RangeError('The value "'+C+'" is invalid for option "size"')}function T(C,g,w){return E(C),C<=0?d(C):g!==void 0?typeof w=="string"?d(C).fill(g,w):d(C).fill(g):d(C)}h.alloc=function(C,g,w){return T(C,g,w)};function R(C){return E(C),d(C<0?0:D(C)|0)}h.allocUnsafe=function(C){return R(C)},h.allocUnsafeSlow=function(C){return R(C)};function P(C,g){if((typeof g!="string"||g==="")&&(g="utf8"),!h.isEncoding(g))throw new TypeError("Unknown encoding: "+g);const w=_(C,g)|0;let j=d(w);const J=j.write(C,g);return J!==w&&(j=j.slice(0,J)),j}function A(C){const g=C.length<0?0:D(C.length)|0,w=d(g);for(let j=0;j=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return C|0}function v(C){return+C!=C&&(C=0),h.alloc(+C)}h.isBuffer=function(g){return g!=null&&g._isBuffer===!0&&g!==h.prototype},h.compare=function(g,w){if(qt(g,s)&&(g=h.from(g,g.offset,g.byteLength)),qt(w,s)&&(w=h.from(w,w.offset,w.byteLength)),!h.isBuffer(g)||!h.isBuffer(w))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(g===w)return 0;let j=g.length,J=w.length;for(let re=0,ce=Math.min(j,J);reJ.length?(h.isBuffer(ce)||(ce=h.from(ce)),ce.copy(J,re)):s.prototype.set.call(J,ce,re);else if(h.isBuffer(ce))ce.copy(J,re);else throw new TypeError('"list" argument must be an Array of Buffers');re+=ce.length}return J};function _(C,g){if(h.isBuffer(C))return C.length;if(a.isView(C)||qt(C,a))return C.byteLength;if(typeof C!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof C);const w=C.length,j=arguments.length>2&&arguments[2]===!0;if(!j&&w===0)return 0;let J=!1;for(;;)switch(g){case"ascii":case"latin1":case"binary":return w;case"utf8":case"utf-8":return Tn(C).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return w*2;case"hex":return w>>>1;case"base64":return Xn(C).length;default:if(J)return j?-1:Tn(C).length;g=(""+g).toLowerCase(),J=!0}}h.byteLength=_;function $(C,g,w){let j=!1;if((g===void 0||g<0)&&(g=0),g>this.length||((w===void 0||w>this.length)&&(w=this.length),w<=0)||(w>>>=0,g>>>=0,w<=g))return"";for(C||(C="utf8");;)switch(C){case"hex":return fe(this,g,w);case"utf8":case"utf-8":return De(this,g,w);case"ascii":return Se(this,g,w);case"latin1":case"binary":return H(this,g,w);case"base64":return ye(this,g,w);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ae(this,g,w);default:if(j)throw new TypeError("Unknown encoding: "+C);C=(C+"").toLowerCase(),j=!0}}h.prototype._isBuffer=!0;function q(C,g,w){const j=C[g];C[g]=C[w],C[w]=j}h.prototype.swap16=function(){const g=this.length;if(g%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let w=0;ww&&(g+=" ... "),""},r&&(h.prototype[r]=h.prototype.inspect),h.prototype.compare=function(g,w,j,J,re){if(qt(g,s)&&(g=h.from(g,g.offset,g.byteLength)),!h.isBuffer(g))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof g);if(w===void 0&&(w=0),j===void 0&&(j=g?g.length:0),J===void 0&&(J=0),re===void 0&&(re=this.length),w<0||j>g.length||J<0||re>this.length)throw new RangeError("out of range index");if(J>=re&&w>=j)return 0;if(J>=re)return-1;if(w>=j)return 1;if(w>>>=0,j>>>=0,J>>>=0,re>>>=0,this===g)return 0;let ce=re-J,Ne=j-w;const Je=Math.min(ce,Ne),He=this.slice(J,re),Xe=g.slice(w,j);for(let je=0;je2147483647?w=2147483647:w<-2147483648&&(w=-2147483648),w=+w,X(w)&&(w=J?0:C.length-1),w<0&&(w=C.length+w),w>=C.length){if(J)return-1;w=C.length-1}else if(w<0)if(J)w=0;else return-1;if(typeof g=="string"&&(g=h.from(g,j)),h.isBuffer(g))return g.length===0?-1:M(C,g,w,j,J);if(typeof g=="number")return g=g&255,typeof s.prototype.indexOf=="function"?J?s.prototype.indexOf.call(C,g,w):s.prototype.lastIndexOf.call(C,g,w):M(C,[g],w,j,J);throw new TypeError("val must be string, number or Buffer")}function M(C,g,w,j,J){let re=1,ce=C.length,Ne=g.length;if(j!==void 0&&(j=String(j).toLowerCase(),j==="ucs2"||j==="ucs-2"||j==="utf16le"||j==="utf-16le")){if(C.length<2||g.length<2)return-1;re=2,ce/=2,Ne/=2,w/=2}function Je(Xe,je){return re===1?Xe[je]:Xe.readUInt16BE(je*re)}let He;if(J){let Xe=-1;for(He=w;Hece&&(w=ce-Ne),He=w;He>=0;He--){let Xe=!0;for(let je=0;jeJ&&(j=J)):j=J;const re=g.length;j>re/2&&(j=re/2);let ce;for(ce=0;ce>>0,isFinite(j)?(j=j>>>0,J===void 0&&(J="utf8")):(J=j,j=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const re=this.length-w;if((j===void 0||j>re)&&(j=re),g.length>0&&(j<0||w<0)||w>this.length)throw new RangeError("Attempt to write outside buffer bounds");J||(J="utf8");let ce=!1;for(;;)switch(J){case"hex":return I(this,g,w,j);case"utf8":case"utf-8":return Y(this,g,w,j);case"ascii":case"latin1":case"binary":return K(this,g,w,j);case"base64":return ne(this,g,w,j);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ge(this,g,w,j);default:if(ce)throw new TypeError("Unknown encoding: "+J);J=(""+J).toLowerCase(),ce=!0}},h.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function ye(C,g,w){return g===0&&w===C.length?e.fromByteArray(C):e.fromByteArray(C.slice(g,w))}function De(C,g,w){w=Math.min(C.length,w);const j=[];let J=g;for(;J239?4:re>223?3:re>191?2:1;if(J+Ne<=w){let Je,He,Xe,je;switch(Ne){case 1:re<128&&(ce=re);break;case 2:Je=C[J+1],(Je&192)===128&&(je=(re&31)<<6|Je&63,je>127&&(ce=je));break;case 3:Je=C[J+1],He=C[J+2],(Je&192)===128&&(He&192)===128&&(je=(re&15)<<12|(Je&63)<<6|He&63,je>2047&&(je<55296||je>57343)&&(ce=je));break;case 4:Je=C[J+1],He=C[J+2],Xe=C[J+3],(Je&192)===128&&(He&192)===128&&(Xe&192)===128&&(je=(re&15)<<18|(Je&63)<<12|(He&63)<<6|Xe&63,je>65535&&je<1114112&&(ce=je))}}ce===null?(ce=65533,Ne=1):ce>65535&&(ce-=65536,j.push(ce>>>10&1023|55296),ce=56320|ce&1023),j.push(ce),J+=Ne}return nt(j)}const Be=4096;function nt(C){const g=C.length;if(g<=Be)return String.fromCharCode.apply(String,C);let w="",j=0;for(;jj)&&(w=j);let J="";for(let re=g;rej&&(g=j),w<0?(w+=j,w<0&&(w=0)):w>j&&(w=j),ww)throw new RangeError("Trying to access beyond buffer length")}h.prototype.readUintLE=h.prototype.readUIntLE=function(g,w,j){g=g>>>0,w=w>>>0,j||U(g,w,this.length);let J=this[g],re=1,ce=0;for(;++ce>>0,w=w>>>0,j||U(g,w,this.length);let J=this[g+--w],re=1;for(;w>0&&(re*=256);)J+=this[g+--w]*re;return J},h.prototype.readUint8=h.prototype.readUInt8=function(g,w){return g=g>>>0,w||U(g,1,this.length),this[g]},h.prototype.readUint16LE=h.prototype.readUInt16LE=function(g,w){return g=g>>>0,w||U(g,2,this.length),this[g]|this[g+1]<<8},h.prototype.readUint16BE=h.prototype.readUInt16BE=function(g,w){return g=g>>>0,w||U(g,2,this.length),this[g]<<8|this[g+1]},h.prototype.readUint32LE=h.prototype.readUInt32LE=function(g,w){return g=g>>>0,w||U(g,4,this.length),(this[g]|this[g+1]<<8|this[g+2]<<16)+this[g+3]*16777216},h.prototype.readUint32BE=h.prototype.readUInt32BE=function(g,w){return g=g>>>0,w||U(g,4,this.length),this[g]*16777216+(this[g+1]<<16|this[g+2]<<8|this[g+3])},h.prototype.readBigUInt64LE=ee(function(g){g=g>>>0,Sn(g,"offset");const w=this[g],j=this[g+7];(w===void 0||j===void 0)&&Mt(g,this.length-8);const J=w+this[++g]*2**8+this[++g]*2**16+this[++g]*2**24,re=this[++g]+this[++g]*2**8+this[++g]*2**16+j*2**24;return BigInt(J)+(BigInt(re)<>>0,Sn(g,"offset");const w=this[g],j=this[g+7];(w===void 0||j===void 0)&&Mt(g,this.length-8);const J=w*2**24+this[++g]*2**16+this[++g]*2**8+this[++g],re=this[++g]*2**24+this[++g]*2**16+this[++g]*2**8+j;return(BigInt(J)<>>0,w=w>>>0,j||U(g,w,this.length);let J=this[g],re=1,ce=0;for(;++ce=re&&(J-=Math.pow(2,8*w)),J},h.prototype.readIntBE=function(g,w,j){g=g>>>0,w=w>>>0,j||U(g,w,this.length);let J=w,re=1,ce=this[g+--J];for(;J>0&&(re*=256);)ce+=this[g+--J]*re;return re*=128,ce>=re&&(ce-=Math.pow(2,8*w)),ce},h.prototype.readInt8=function(g,w){return g=g>>>0,w||U(g,1,this.length),this[g]&128?(255-this[g]+1)*-1:this[g]},h.prototype.readInt16LE=function(g,w){g=g>>>0,w||U(g,2,this.length);const j=this[g]|this[g+1]<<8;return j&32768?j|4294901760:j},h.prototype.readInt16BE=function(g,w){g=g>>>0,w||U(g,2,this.length);const j=this[g+1]|this[g]<<8;return j&32768?j|4294901760:j},h.prototype.readInt32LE=function(g,w){return g=g>>>0,w||U(g,4,this.length),this[g]|this[g+1]<<8|this[g+2]<<16|this[g+3]<<24},h.prototype.readInt32BE=function(g,w){return g=g>>>0,w||U(g,4,this.length),this[g]<<24|this[g+1]<<16|this[g+2]<<8|this[g+3]},h.prototype.readBigInt64LE=ee(function(g){g=g>>>0,Sn(g,"offset");const w=this[g],j=this[g+7];(w===void 0||j===void 0)&&Mt(g,this.length-8);const J=this[g+4]+this[g+5]*2**8+this[g+6]*2**16+(j<<24);return(BigInt(J)<>>0,Sn(g,"offset");const w=this[g],j=this[g+7];(w===void 0||j===void 0)&&Mt(g,this.length-8);const J=(w<<24)+this[++g]*2**16+this[++g]*2**8+this[++g];return(BigInt(J)<>>0,w||U(g,4,this.length),n.read(this,g,!0,23,4)},h.prototype.readFloatBE=function(g,w){return g=g>>>0,w||U(g,4,this.length),n.read(this,g,!1,23,4)},h.prototype.readDoubleLE=function(g,w){return g=g>>>0,w||U(g,8,this.length),n.read(this,g,!0,52,8)},h.prototype.readDoubleBE=function(g,w){return g=g>>>0,w||U(g,8,this.length),n.read(this,g,!1,52,8)};function Z(C,g,w,j,J,re){if(!h.isBuffer(C))throw new TypeError('"buffer" argument must be a Buffer instance');if(g>J||gC.length)throw new RangeError("Index out of range")}h.prototype.writeUintLE=h.prototype.writeUIntLE=function(g,w,j,J){if(g=+g,w=w>>>0,j=j>>>0,!J){const Ne=Math.pow(2,8*j)-1;Z(this,g,w,j,Ne,0)}let re=1,ce=0;for(this[w]=g&255;++ce>>0,j=j>>>0,!J){const Ne=Math.pow(2,8*j)-1;Z(this,g,w,j,Ne,0)}let re=j-1,ce=1;for(this[w+re]=g&255;--re>=0&&(ce*=256);)this[w+re]=g/ce&255;return w+j},h.prototype.writeUint8=h.prototype.writeUInt8=function(g,w,j){return g=+g,w=w>>>0,j||Z(this,g,w,1,255,0),this[w]=g&255,w+1},h.prototype.writeUint16LE=h.prototype.writeUInt16LE=function(g,w,j){return g=+g,w=w>>>0,j||Z(this,g,w,2,65535,0),this[w]=g&255,this[w+1]=g>>>8,w+2},h.prototype.writeUint16BE=h.prototype.writeUInt16BE=function(g,w,j){return g=+g,w=w>>>0,j||Z(this,g,w,2,65535,0),this[w]=g>>>8,this[w+1]=g&255,w+2},h.prototype.writeUint32LE=h.prototype.writeUInt32LE=function(g,w,j){return g=+g,w=w>>>0,j||Z(this,g,w,4,4294967295,0),this[w+3]=g>>>24,this[w+2]=g>>>16,this[w+1]=g>>>8,this[w]=g&255,w+4},h.prototype.writeUint32BE=h.prototype.writeUInt32BE=function(g,w,j){return g=+g,w=w>>>0,j||Z(this,g,w,4,4294967295,0),this[w]=g>>>24,this[w+1]=g>>>16,this[w+2]=g>>>8,this[w+3]=g&255,w+4};function pe(C,g,w,j,J){un(g,j,J,C,w,7);let re=Number(g&BigInt(4294967295));C[w++]=re,re=re>>8,C[w++]=re,re=re>>8,C[w++]=re,re=re>>8,C[w++]=re;let ce=Number(g>>BigInt(32)&BigInt(4294967295));return C[w++]=ce,ce=ce>>8,C[w++]=ce,ce=ce>>8,C[w++]=ce,ce=ce>>8,C[w++]=ce,w}function Me(C,g,w,j,J){un(g,j,J,C,w,7);let re=Number(g&BigInt(4294967295));C[w+7]=re,re=re>>8,C[w+6]=re,re=re>>8,C[w+5]=re,re=re>>8,C[w+4]=re;let ce=Number(g>>BigInt(32)&BigInt(4294967295));return C[w+3]=ce,ce=ce>>8,C[w+2]=ce,ce=ce>>8,C[w+1]=ce,ce=ce>>8,C[w]=ce,w+8}h.prototype.writeBigUInt64LE=ee(function(g,w=0){return pe(this,g,w,BigInt(0),BigInt("0xffffffffffffffff"))}),h.prototype.writeBigUInt64BE=ee(function(g,w=0){return Me(this,g,w,BigInt(0),BigInt("0xffffffffffffffff"))}),h.prototype.writeIntLE=function(g,w,j,J){if(g=+g,w=w>>>0,!J){const Je=Math.pow(2,8*j-1);Z(this,g,w,j,Je-1,-Je)}let re=0,ce=1,Ne=0;for(this[w]=g&255;++re>0)-Ne&255;return w+j},h.prototype.writeIntBE=function(g,w,j,J){if(g=+g,w=w>>>0,!J){const Je=Math.pow(2,8*j-1);Z(this,g,w,j,Je-1,-Je)}let re=j-1,ce=1,Ne=0;for(this[w+re]=g&255;--re>=0&&(ce*=256);)g<0&&Ne===0&&this[w+re+1]!==0&&(Ne=1),this[w+re]=(g/ce>>0)-Ne&255;return w+j},h.prototype.writeInt8=function(g,w,j){return g=+g,w=w>>>0,j||Z(this,g,w,1,127,-128),g<0&&(g=255+g+1),this[w]=g&255,w+1},h.prototype.writeInt16LE=function(g,w,j){return g=+g,w=w>>>0,j||Z(this,g,w,2,32767,-32768),this[w]=g&255,this[w+1]=g>>>8,w+2},h.prototype.writeInt16BE=function(g,w,j){return g=+g,w=w>>>0,j||Z(this,g,w,2,32767,-32768),this[w]=g>>>8,this[w+1]=g&255,w+2},h.prototype.writeInt32LE=function(g,w,j){return g=+g,w=w>>>0,j||Z(this,g,w,4,2147483647,-2147483648),this[w]=g&255,this[w+1]=g>>>8,this[w+2]=g>>>16,this[w+3]=g>>>24,w+4},h.prototype.writeInt32BE=function(g,w,j){return g=+g,w=w>>>0,j||Z(this,g,w,4,2147483647,-2147483648),g<0&&(g=4294967295+g+1),this[w]=g>>>24,this[w+1]=g>>>16,this[w+2]=g>>>8,this[w+3]=g&255,w+4},h.prototype.writeBigInt64LE=ee(function(g,w=0){return pe(this,g,w,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),h.prototype.writeBigInt64BE=ee(function(g,w=0){return Me(this,g,w,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Ie(C,g,w,j,J,re){if(w+j>C.length)throw new RangeError("Index out of range");if(w<0)throw new RangeError("Index out of range")}function qe(C,g,w,j,J){return g=+g,w=w>>>0,J||Ie(C,g,w,4),n.write(C,g,w,j,23,4),w+4}h.prototype.writeFloatLE=function(g,w,j){return qe(this,g,w,!0,j)},h.prototype.writeFloatBE=function(g,w,j){return qe(this,g,w,!1,j)};function ze(C,g,w,j,J){return g=+g,w=w>>>0,J||Ie(C,g,w,8),n.write(C,g,w,j,52,8),w+8}h.prototype.writeDoubleLE=function(g,w,j){return ze(this,g,w,!0,j)},h.prototype.writeDoubleBE=function(g,w,j){return ze(this,g,w,!1,j)},h.prototype.copy=function(g,w,j,J){if(!h.isBuffer(g))throw new TypeError("argument should be a Buffer");if(j||(j=0),!J&&J!==0&&(J=this.length),w>=g.length&&(w=g.length),w||(w=0),J>0&&J=this.length)throw new RangeError("Index out of range");if(J<0)throw new RangeError("sourceEnd out of bounds");J>this.length&&(J=this.length),g.length-w>>0,j=j===void 0?this.length:j>>>0,g||(g=0);let re;if(typeof g=="number")for(re=w;re2**32?J=_n(String(w)):typeof w=="bigint"&&(J=String(w),(w>BigInt(2)**BigInt(32)||w<-(BigInt(2)**BigInt(32)))&&(J=_n(J)),J+="n"),j+=` It must be ${g}. Received ${J}`,j},RangeError);function _n(C){let g="",w=C.length;const j=C[0]==="-"?1:0;for(;w>=j+4;w-=3)g=`_${C.slice(w-3,w)}${g}`;return`${C.slice(0,w)}${g}`}function at(C,g,w){Sn(g,"offset"),(C[g]===void 0||C[g+w]===void 0)&&Mt(g,C.length-(w+1))}function un(C,g,w,j,J,re){if(C>w||C3?g===0||g===BigInt(0)?Ne=`>= 0${ce} and < 2${ce} ** ${(re+1)*8}${ce}`:Ne=`>= -(2${ce} ** ${(re+1)*8-1}${ce}) and < 2 ** ${(re+1)*8-1}${ce}`:Ne=`>= ${g}${ce} and <= ${w}${ce}`,new Ge.ERR_OUT_OF_RANGE("value",Ne,C)}at(j,J,re)}function Sn(C,g){if(typeof C!="number")throw new Ge.ERR_INVALID_ARG_TYPE(g,"number",C)}function Mt(C,g,w){throw Math.floor(C)!==C?(Sn(C,w),new Ge.ERR_OUT_OF_RANGE(w||"offset","an integer",C)):g<0?new Ge.ERR_BUFFER_OUT_OF_BOUNDS:new Ge.ERR_OUT_OF_RANGE(w||"offset",`>= ${w?1:0} and <= ${g}`,C)}const kn=/[^+/0-9A-Za-z-_]/g;function ur(C){if(C=C.split("=")[0],C=C.trim().replace(kn,""),C.length<2)return"";for(;C.length%4!==0;)C=C+"=";return C}function Tn(C,g){g=g||1/0;let w;const j=C.length;let J=null;const re=[];for(let ce=0;ce55295&&w<57344){if(!J){if(w>56319){(g-=3)>-1&&re.push(239,191,189);continue}else if(ce+1===j){(g-=3)>-1&&re.push(239,191,189);continue}J=w;continue}if(w<56320){(g-=3)>-1&&re.push(239,191,189),J=w;continue}w=(J-55296<<10|w-56320)+65536}else J&&(g-=3)>-1&&re.push(239,191,189);if(J=null,w<128){if((g-=1)<0)break;re.push(w)}else if(w<2048){if((g-=2)<0)break;re.push(w>>6|192,w&63|128)}else if(w<65536){if((g-=3)<0)break;re.push(w>>12|224,w>>6&63|128,w&63|128)}else if(w<1114112){if((g-=4)<0)break;re.push(w>>18|240,w>>12&63|128,w>>6&63|128,w&63|128)}else throw new Error("Invalid code point")}return re}function Lt(C){const g=[];for(let w=0;w>8,J=w%256,re.push(J),re.push(j);return re}function Xn(C){return e.toByteArray(ur(C))}function Rn(C,g,w,j){let J;for(J=0;J=g.length||J>=C.length);++J)g[J+w]=C[J];return J}function qt(C,g){return C instanceof g||C!=null&&C.constructor!=null&&C.constructor.name!=null&&C.constructor.name===g.name}function X(C){return C!==C}const V=function(){const C="0123456789abcdef",g=new Array(256);for(let w=0;w<16;++w){const j=w*16;for(let J=0;J<16;++J)g[j+J]=C[w]+C[J]}return g}();function ee(C){return typeof BigInt>"u"?ie:C}function ie(){throw new Error("BigInt not supported")}})(er);const is=er.Buffer;er.Blob,er.BlobOptions,er.Buffer,er.File,er.FileOptions,er.INSPECT_MAX_BYTES,er.SlowBuffer,er.TranscodeEncoding,er.atob,er.btoa,er.constants,er.isAscii,er.isUtf8,er.kMaxLength,er.kStringMaxLength,er.resolveObjectURL,er.transcode;const lg={identify:t=>t instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(t,e){if(typeof is=="function")return is.from(t,"base64");if(typeof atob=="function"){const n=atob(t.replace(/[\n\r]/g,"")),r=new Uint8Array(n.length);for(let i=0;i1&&e("Each pair must have its own sequence indicator");const s=i.items[0]||new _r(new Et(null));if(i.commentBefore&&(s.key.commentBefore=s.key.commentBefore?`${i.commentBefore} ${s.key.commentBefore}`:i.commentBefore),i.comment){const a=(n=s.value)!=null?n:s.key;a.comment=a.comment?`${i.comment} -${a.comment}`:i.comment}i=s}t.items[r]=Xt(i)?i:new _r(i)}}else e("Expected a sequence for this tag");return t}function K1(t,e,n){const{replacer:r}=n,i=new hu(t);i.tag="tag:yaml.org,2002:pairs";let s=0;if(e&&Symbol.iterator in Object(e))for(let a of e){typeof r=="function"&&(a=r.call(e,String(s++),a));let c,l;if(Array.isArray(a))if(a.length===2)c=a[0],l=a[1];else throw new TypeError(`Expected [key, value] tuple: ${a}`);else if(a&&a instanceof Object){const d=Object.keys(a);if(d.length===1)c=d[0],l=a[c];else throw new TypeError(`Expected { key: value } tuple: ${a}`)}else c=a;i.items.push(sg(c,l,n))}return i}const fg={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:H1,createNode:K1};class gu extends hu{constructor(){super(),this.add=Ni.prototype.add.bind(this),this.delete=Ni.prototype.delete.bind(this),this.get=Ni.prototype.get.bind(this),this.has=Ni.prototype.has.bind(this),this.set=Ni.prototype.set.bind(this),this.tag=gu.tag}toJSON(e,n){if(!n)return super.toJSON(e);const r=new Map;n!=null&&n.onCreate&&n.onCreate(r);for(const i of this.items){let s,a;if(Xt(i)?(s=ns(i.key,"",n),a=ns(i.value,s,n)):s=ns(i,"",n),r.has(s))throw new Error("Ordered maps must not include duplicate keys");r.set(s,a)}return r}}gu.tag="tag:yaml.org,2002:omap";const dg={collection:"seq",identify:t=>t instanceof Map,nodeClass:gu,default:!1,tag:"tag:yaml.org,2002:omap",resolve(t,e){const n=H1(t,e),r=[];for(const{key:i}of n.items)yt(i)&&(r.includes(i.value)?e(`Ordered maps must not include duplicate keys: ${i.value}`):r.push(i.value));return Object.assign(new gu,n)},createNode(t,e,n){const r=K1(t,e,n),i=new gu;return i.items=r.items,i}};function z1({value:t,source:e},n){return e&&(t?Y1:G1).test.test(e)?e:t?n.options.trueStr:n.options.falseStr}const Y1={identify:t=>t===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new Et(!0),stringify:z1},G1={identify:t=>t===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/i,resolve:()=>new Et(!1),stringify:z1},vC={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?\.(?:inf|Inf|INF|nan|NaN|NAN)$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Fi},bC={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t.replace(/_/g,"")),stringify(t){const e=Number(t.value);return isFinite(e)?e.toExponential():Fi(t)}},DC={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(t){const e=new Et(parseFloat(t.replace(/_/g,""))),n=t.indexOf(".");if(n!==-1){const r=t.substring(n+1).replace(/_/g,"");r[r.length-1]==="0"&&(e.minFractionDigits=r.length)}return e},stringify:Fi},jc=t=>typeof t=="bigint"||Number.isInteger(t);function ud(t,e,n,{intAsBigInt:r}){const i=t[0];if((i==="-"||i==="+")&&(e+=1),t=t.substring(e).replace(/_/g,""),r){switch(n){case 2:t=`0b${t}`;break;case 8:t=`0o${t}`;break;case 16:t=`0x${t}`;break}const a=BigInt(t);return i==="-"?BigInt(-1)*a:a}const s=parseInt(t,n);return i==="-"?-1*s:s}function hg(t,e,n){const{value:r}=t;if(jc(r)){const i=r.toString(e);return r<0?"-"+n+i.substr(1):n+i}return Fi(t)}const wC={identify:jc,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(t,e,n)=>ud(t,2,2,n),stringify:t=>hg(t,2,"0b")},_C={identify:jc,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(t,e,n)=>ud(t,1,8,n),stringify:t=>hg(t,8,"0")},$C={identify:jc,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(t,e,n)=>ud(t,0,10,n),stringify:Fi},EC={identify:jc,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(t,e,n)=>ud(t,2,16,n),stringify:t=>hg(t,16,"0x")};class yu extends Ni{constructor(e){super(e),this.tag=yu.tag}add(e){let n;Xt(e)?n=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?n=new _r(e.key,null):n=new _r(e,null),ea(this.items,n.key)||this.items.push(n)}get(e,n){const r=ea(this.items,e);return!n&&Xt(r)?yt(r.key)?r.key.value:r.key:r}set(e,n){if(typeof n!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof n}`);const r=ea(this.items,e);r&&!n?this.items.splice(this.items.indexOf(r),1):!r&&n&&this.items.push(new _r(e))}toJSON(e,n){return super.toJSON(e,n,Set)}toString(e,n,r){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),n,r);throw new Error("Set items must all have null values")}}yu.tag="tag:yaml.org,2002:set";const pg={collection:"map",identify:t=>t instanceof Set,nodeClass:yu,default:!1,tag:"tag:yaml.org,2002:set",resolve(t,e){if(Nn(t)){if(t.hasAllNullValues(!0))return Object.assign(new yu,t);e("Set items must all have null values")}else e("Expected a mapping for this tag");return t},createNode(t,e,n){const{replacer:r}=n,i=new yu(t);if(e&&Symbol.iterator in Object(e))for(let s of e)typeof r=="function"&&(s=r.call(e,s,s)),i.items.push(sg(s,null,n));return i}};function mg(t,e){const n=t[0],r=n==="-"||n==="+"?t.substring(1):t,i=a=>e?BigInt(a):Number(a),s=r.replace(/_/g,"").split(":").reduce((a,c)=>a*i(60)+i(c),i(0));return n==="-"?i(-1)*s:s}function J1(t){let{value:e}=t,n=a=>a;if(typeof e=="bigint")n=a=>BigInt(a);else if(isNaN(e)||!isFinite(e))return Fi(t);let r="";e<0&&(r="-",e*=n(-1));const i=n(60),s=[e%i];return e<60?s.unshift(0):(e=(e-s[0])/i,s.unshift(e%i),e>=60&&(e=(e-s[0])/i,s.unshift(e))),r+s.map(a=>a<10?"0"+String(a):String(a)).join(":").replace(/000000\d*$/,"")}const Q1={identify:t=>typeof t=="bigint"||Number.isInteger(t),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(t,e,{intAsBigInt:n})=>mg(t,n),stringify:J1},X1={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:t=>mg(t,!1),stringify:J1},cd={identify:t=>t instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(t){const e=t.match(cd.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,n,r,i,s,a,c]=e.map(Number),l=e[7]?Number((e[7]+"00").substr(1,3)):0;let d=Date.UTC(n,r-1,i,s||0,a||0,c||0,l);const h=e[8];if(h&&h!=="Z"){let m=mg(h,!1);Math.abs(m)<30&&(m*=60),d-=6e4*m}return new Date(d)},stringify:({value:t})=>t.toISOString().replace(/((T00:00)?:00)?\.000Z$/,"")},Z1=[du,pu,rd,id,Y1,G1,wC,_C,$C,EC,vC,bC,DC,lg,dg,fg,pg,Q1,X1,cd],ew=new Map([["core",oC],["failsafe",[du,pu,rd]],["json",cC],["yaml11",Z1],["yaml-1.1",Z1]]),tw={binary:lg,bool:og,float:j1,floatExp:L1,floatNaN:M1,floatTime:X1,int:q1,intHex:W1,intOct:B1,intTime:Q1,map:du,null:id,omap:dg,pairs:fg,seq:pu,set:pg,timestamp:cd},SC={"tag:yaml.org,2002:binary":lg,"tag:yaml.org,2002:omap":dg,"tag:yaml.org,2002:pairs":fg,"tag:yaml.org,2002:set":pg,"tag:yaml.org,2002:timestamp":cd};function gg(t,e){let n=ew.get(e);if(!n)if(Array.isArray(t))n=[];else{const r=Array.from(ew.keys()).filter(i=>i!=="yaml11").map(i=>JSON.stringify(i)).join(", ");throw new Error(`Unknown schema "${e}"; use one of ${r} or define customTags array`)}if(Array.isArray(t))for(const r of t)n=n.concat(r);else typeof t=="function"&&(n=t(n.slice()));return n.map(r=>{if(typeof r!="string")return r;const i=tw[r];if(i)return i;const s=Object.keys(tw).map(a=>JSON.stringify(a)).join(", ");throw new Error(`Unknown custom tag "${r}"; use one of ${s}`)})}const TC=(t,e)=>t.keye.key?1:0;class yg{constructor({compat:e,customTags:n,merge:r,resolveKnownTags:i,schema:s,sortMapEntries:a,toStringDefaults:c}){this.compat=Array.isArray(e)?gg(e,"compat"):e?gg(null,e):null,this.merge=!!r,this.name=typeof s=="string"&&s||"core",this.knownTags=i?SC:{},this.tags=gg(n,this.name),this.toStringOptions=c!=null?c:null,Object.defineProperty(this,oo,{value:du}),Object.defineProperty(this,Es,{value:rd}),Object.defineProperty(this,cu,{value:pu}),this.sortMapEntries=typeof a=="function"?a:a===!0?TC:null}clone(){const e=Object.create(yg.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}}function kC(t,e){var l;const n=[];let r=e.directives===!0;if(e.directives!==!1&&t.directives){const d=t.directives.toString(t);d?(n.push(d),r=!0):t.directives.docStart&&(r=!0)}r&&n.push("---");const i=P1(t,e),{commentString:s}=i.options;if(t.commentBefore){n.length!==1&&n.unshift("");const d=s(t.commentBefore);n.unshift(Ss(d,""))}let a=!1,c=null;if(t.contents){if(on(t.contents)){if(t.contents.spaceBefore&&r&&n.push(""),t.contents.commentBefore){const m=s(t.contents.commentBefore);n.push(Ss(m,""))}i.forceBlockIndent=!!t.comment,c=t.contents.comment}const d=c?void 0:()=>a=!0;let h=Zo(t.contents,i,()=>c=null,d);c&&(h+=ao(h,"",s(c))),(h[0]==="|"||h[0]===">")&&n[n.length-1]==="---"?n[n.length-1]=`--- ${h}`:n.push(h)}else n.push(Zo(t.contents,i));if((l=t.directives)!=null&&l.docEnd)if(t.comment){const d=s(t.comment);d.includes(` +${a.comment}`:i.comment}i=s}t.items[r]=Xt(i)?i:new _r(i)}}else e("Expected a sequence for this tag");return t}function K1(t,e,n){const{replacer:r}=n,i=new hu(t);i.tag="tag:yaml.org,2002:pairs";let s=0;if(e&&Symbol.iterator in Object(e))for(let a of e){typeof r=="function"&&(a=r.call(e,String(s++),a));let c,l;if(Array.isArray(a))if(a.length===2)c=a[0],l=a[1];else throw new TypeError(`Expected [key, value] tuple: ${a}`);else if(a&&a instanceof Object){const d=Object.keys(a);if(d.length===1)c=d[0],l=a[c];else throw new TypeError(`Expected { key: value } tuple: ${a}`)}else c=a;i.items.push(sg(c,l,n))}return i}const fg={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:H1,createNode:K1};class gu extends hu{constructor(){super(),this.add=Ni.prototype.add.bind(this),this.delete=Ni.prototype.delete.bind(this),this.get=Ni.prototype.get.bind(this),this.has=Ni.prototype.has.bind(this),this.set=Ni.prototype.set.bind(this),this.tag=gu.tag}toJSON(e,n){if(!n)return super.toJSON(e);const r=new Map;n!=null&&n.onCreate&&n.onCreate(r);for(const i of this.items){let s,a;if(Xt(i)?(s=ns(i.key,"",n),a=ns(i.value,s,n)):s=ns(i,"",n),r.has(s))throw new Error("Ordered maps must not include duplicate keys");r.set(s,a)}return r}}gu.tag="tag:yaml.org,2002:omap";const dg={collection:"seq",identify:t=>t instanceof Map,nodeClass:gu,default:!1,tag:"tag:yaml.org,2002:omap",resolve(t,e){const n=H1(t,e),r=[];for(const{key:i}of n.items)yt(i)&&(r.includes(i.value)?e(`Ordered maps must not include duplicate keys: ${i.value}`):r.push(i.value));return Object.assign(new gu,n)},createNode(t,e,n){const r=K1(t,e,n),i=new gu;return i.items=r.items,i}};function z1({value:t,source:e},n){return e&&(t?Y1:G1).test.test(e)?e:t?n.options.trueStr:n.options.falseStr}const Y1={identify:t=>t===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new Et(!0),stringify:z1},G1={identify:t=>t===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/i,resolve:()=>new Et(!1),stringify:z1},vC={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?\.(?:inf|Inf|INF|nan|NaN|NAN)$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Fi},bC={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t.replace(/_/g,"")),stringify(t){const e=Number(t.value);return isFinite(e)?e.toExponential():Fi(t)}},DC={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(t){const e=new Et(parseFloat(t.replace(/_/g,""))),n=t.indexOf(".");if(n!==-1){const r=t.substring(n+1).replace(/_/g,"");r[r.length-1]==="0"&&(e.minFractionDigits=r.length)}return e},stringify:Fi},jc=t=>typeof t=="bigint"||Number.isInteger(t);function cd(t,e,n,{intAsBigInt:r}){const i=t[0];if((i==="-"||i==="+")&&(e+=1),t=t.substring(e).replace(/_/g,""),r){switch(n){case 2:t=`0b${t}`;break;case 8:t=`0o${t}`;break;case 16:t=`0x${t}`;break}const a=BigInt(t);return i==="-"?BigInt(-1)*a:a}const s=parseInt(t,n);return i==="-"?-1*s:s}function hg(t,e,n){const{value:r}=t;if(jc(r)){const i=r.toString(e);return r<0?"-"+n+i.substr(1):n+i}return Fi(t)}const wC={identify:jc,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(t,e,n)=>cd(t,2,2,n),stringify:t=>hg(t,2,"0b")},_C={identify:jc,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(t,e,n)=>cd(t,1,8,n),stringify:t=>hg(t,8,"0")},$C={identify:jc,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(t,e,n)=>cd(t,0,10,n),stringify:Fi},EC={identify:jc,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(t,e,n)=>cd(t,2,16,n),stringify:t=>hg(t,16,"0x")};class yu extends Ni{constructor(e){super(e),this.tag=yu.tag}add(e){let n;Xt(e)?n=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?n=new _r(e.key,null):n=new _r(e,null),ea(this.items,n.key)||this.items.push(n)}get(e,n){const r=ea(this.items,e);return!n&&Xt(r)?yt(r.key)?r.key.value:r.key:r}set(e,n){if(typeof n!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof n}`);const r=ea(this.items,e);r&&!n?this.items.splice(this.items.indexOf(r),1):!r&&n&&this.items.push(new _r(e))}toJSON(e,n){return super.toJSON(e,n,Set)}toString(e,n,r){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),n,r);throw new Error("Set items must all have null values")}}yu.tag="tag:yaml.org,2002:set";const pg={collection:"map",identify:t=>t instanceof Set,nodeClass:yu,default:!1,tag:"tag:yaml.org,2002:set",resolve(t,e){if(Nn(t)){if(t.hasAllNullValues(!0))return Object.assign(new yu,t);e("Set items must all have null values")}else e("Expected a mapping for this tag");return t},createNode(t,e,n){const{replacer:r}=n,i=new yu(t);if(e&&Symbol.iterator in Object(e))for(let s of e)typeof r=="function"&&(s=r.call(e,s,s)),i.items.push(sg(s,null,n));return i}};function mg(t,e){const n=t[0],r=n==="-"||n==="+"?t.substring(1):t,i=a=>e?BigInt(a):Number(a),s=r.replace(/_/g,"").split(":").reduce((a,c)=>a*i(60)+i(c),i(0));return n==="-"?i(-1)*s:s}function J1(t){let{value:e}=t,n=a=>a;if(typeof e=="bigint")n=a=>BigInt(a);else if(isNaN(e)||!isFinite(e))return Fi(t);let r="";e<0&&(r="-",e*=n(-1));const i=n(60),s=[e%i];return e<60?s.unshift(0):(e=(e-s[0])/i,s.unshift(e%i),e>=60&&(e=(e-s[0])/i,s.unshift(e))),r+s.map(a=>a<10?"0"+String(a):String(a)).join(":").replace(/000000\d*$/,"")}const Q1={identify:t=>typeof t=="bigint"||Number.isInteger(t),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(t,e,{intAsBigInt:n})=>mg(t,n),stringify:J1},X1={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:t=>mg(t,!1),stringify:J1},ld={identify:t=>t instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(t){const e=t.match(ld.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,n,r,i,s,a,c]=e.map(Number),l=e[7]?Number((e[7]+"00").substr(1,3)):0;let d=Date.UTC(n,r-1,i,s||0,a||0,c||0,l);const h=e[8];if(h&&h!=="Z"){let m=mg(h,!1);Math.abs(m)<30&&(m*=60),d-=6e4*m}return new Date(d)},stringify:({value:t})=>t.toISOString().replace(/((T00:00)?:00)?\.000Z$/,"")},Z1=[du,pu,id,sd,Y1,G1,wC,_C,$C,EC,vC,bC,DC,lg,dg,fg,pg,Q1,X1,ld],ew=new Map([["core",oC],["failsafe",[du,pu,id]],["json",cC],["yaml11",Z1],["yaml-1.1",Z1]]),tw={binary:lg,bool:og,float:j1,floatExp:L1,floatNaN:M1,floatTime:X1,int:q1,intHex:W1,intOct:B1,intTime:Q1,map:du,null:sd,omap:dg,pairs:fg,seq:pu,set:pg,timestamp:ld},SC={"tag:yaml.org,2002:binary":lg,"tag:yaml.org,2002:omap":dg,"tag:yaml.org,2002:pairs":fg,"tag:yaml.org,2002:set":pg,"tag:yaml.org,2002:timestamp":ld};function gg(t,e){let n=ew.get(e);if(!n)if(Array.isArray(t))n=[];else{const r=Array.from(ew.keys()).filter(i=>i!=="yaml11").map(i=>JSON.stringify(i)).join(", ");throw new Error(`Unknown schema "${e}"; use one of ${r} or define customTags array`)}if(Array.isArray(t))for(const r of t)n=n.concat(r);else typeof t=="function"&&(n=t(n.slice()));return n.map(r=>{if(typeof r!="string")return r;const i=tw[r];if(i)return i;const s=Object.keys(tw).map(a=>JSON.stringify(a)).join(", ");throw new Error(`Unknown custom tag "${r}"; use one of ${s}`)})}const kC=(t,e)=>t.keye.key?1:0;class yg{constructor({compat:e,customTags:n,merge:r,resolveKnownTags:i,schema:s,sortMapEntries:a,toStringDefaults:c}){this.compat=Array.isArray(e)?gg(e,"compat"):e?gg(null,e):null,this.merge=!!r,this.name=typeof s=="string"&&s||"core",this.knownTags=i?SC:{},this.tags=gg(n,this.name),this.toStringOptions=c!=null?c:null,Object.defineProperty(this,oo,{value:du}),Object.defineProperty(this,Es,{value:id}),Object.defineProperty(this,cu,{value:pu}),this.sortMapEntries=typeof a=="function"?a:a===!0?kC:null}clone(){const e=Object.create(yg.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}}function TC(t,e){var l;const n=[];let r=e.directives===!0;if(e.directives!==!1&&t.directives){const d=t.directives.toString(t);d?(n.push(d),r=!0):t.directives.docStart&&(r=!0)}r&&n.push("---");const i=P1(t,e),{commentString:s}=i.options;if(t.commentBefore){n.length!==1&&n.unshift("");const d=s(t.commentBefore);n.unshift(Ss(d,""))}let a=!1,c=null;if(t.contents){if(on(t.contents)){if(t.contents.spaceBefore&&r&&n.push(""),t.contents.commentBefore){const m=s(t.contents.commentBefore);n.push(Ss(m,""))}i.forceBlockIndent=!!t.comment,c=t.contents.comment}const d=c?void 0:()=>a=!0;let h=Zo(t.contents,i,()=>c=null,d);c&&(h+=ao(h,"",s(c))),(h[0]==="|"||h[0]===">")&&n[n.length-1]==="---"?n[n.length-1]=`--- ${h}`:n.push(h)}else n.push(Zo(t.contents,i));if((l=t.directives)!=null&&l.docEnd)if(t.comment){const d=s(t.comment);d.includes(` `)?(n.push("..."),n.push(Ss(d,""))):n.push(`... ${d}`)}else n.push("...");else{let d=t.comment;d&&a&&(d=d.replace(/^\n+/,"")),d&&((!a||c)&&n[n.length-1]!==""&&n.push(""),n.push(Ss(s(d),"")))}return n.join(` `)+` -`}function xc(t,e,n,r){if(r&&typeof r=="object")if(Array.isArray(r))for(let i=0,s=r.length;itypeof S=="number"||S instanceof String||S instanceof Number,N=n.filter(A).map(String);N.length>0&&(n=n.concat(N)),i=n}else r===void 0&&n&&(r=n,n=void 0);const{aliasDuplicateObjects:s,anchorPrefix:a,flow:c,keepUndefined:l,onTagObj:d,tag:h}=r!=null?r:{},{onAnchor:m,setAnchors:E,sourceObjects:k}=HA(this,a||"a"),R={aliasDuplicateObjects:s!=null?s:!0,keepUndefined:l!=null?l:!1,onAnchor:m,onTagObj:d,replacer:i,schema:this.schema,sourceObjects:k},P=Ic(e,h,R);return c&&Fn(P)&&(P.flow=!0),E(),P}createPair(e,n,r={}){const i=this.createNode(e,null,r),s=this.createNode(n,null,r);return new _r(i,s)}delete(e){return vu(this.contents)?this.contents.delete(e):!1}deleteIn(e){return Mc(e)?this.contents==null?!1:(this.contents=null,!0):vu(this.contents)?this.contents.deleteIn(e):!1}get(e,n){return Fn(this.contents)?this.contents.get(e,n):void 0}getIn(e,n){return Mc(e)?!n&&yt(this.contents)?this.contents.value:this.contents:Fn(this.contents)?this.contents.getIn(e,n):void 0}has(e){return Fn(this.contents)?this.contents.has(e):!1}hasIn(e){return Mc(e)?this.contents!==void 0:Fn(this.contents)?this.contents.hasIn(e):!1}set(e,n){this.contents==null?this.contents=Yf(this.schema,[e],n):vu(this.contents)&&this.contents.set(e,n)}setIn(e,n){Mc(e)?this.contents=n:this.contents==null?this.contents=Yf(this.schema,Array.from(e),n):vu(this.contents)&&this.contents.setIn(e,n)}setSchema(e,n={}){typeof e=="number"&&(e=String(e));let r;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new wr({version:"1.1"}),r={merge:!0,resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new wr({version:e}),r={merge:!1,resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,r=null;break;default:{const i=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${i}`)}}if(n.schema instanceof Object)this.schema=n.schema;else if(r)this.schema=new yg(Object.assign(r,n));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:n,mapAsMap:r,maxAliasCount:i,onAnchor:s,reviver:a}={}){const c={anchors:new Map,doc:this,keep:!e,mapAsMap:r===!0,mapKeyWarned:!1,maxAliasCount:typeof i=="number"?i:100,stringify:Zo},l=ns(this.contents,n!=null?n:"",c);if(typeof s=="function")for(const{count:d,res:h}of c.anchors.values())s(h,d);return typeof a=="function"?xc(a,{"":l},"",l):l}toJSON(e,n){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:n})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){const n=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${n}`)}return kC(this,e)}}function vu(t){if(Fn(t))return!0;throw new Error("Expected a YAML collection as document contents")}class nw extends Error{constructor(e,n,r,i){super(),this.name=e,this.code=r,this.message=i,this.pos=n}}class qc extends nw{constructor(e,n,r){super("YAMLParseError",e,n,r)}}class AC extends nw{constructor(e,n,r){super("YAMLWarning",e,n,r)}}const rw=(t,e)=>n=>{if(n.pos[0]===-1)return;n.linePos=n.pos.map(c=>e.linePos(c));const{line:r,col:i}=n.linePos[0];n.message+=` at line ${r}, column ${i}`;let s=i-1,a=t.substring(e.lineStarts[r-1],e.lineStarts[r]).replace(/[\n\r]+$/,"");if(s>=60&&a.length>80){const c=Math.min(s-39,a.length-79);a="\u2026"+a.substring(c),s-=c-1}if(a.length>80&&(a=a.substring(0,79)+"\u2026"),r>1&&/^ *$/.test(a.substring(0,s))){let c=t.substring(e.lineStarts[r-2],e.lineStarts[r-1]);c.length>80&&(c=c.substring(0,79)+`\u2026 +`}function xc(t,e,n,r){if(r&&typeof r=="object")if(Array.isArray(r))for(let i=0,s=r.length;itypeof S=="number"||S instanceof String||S instanceof Number,F=n.filter(A).map(String);F.length>0&&(n=n.concat(F)),i=n}else r===void 0&&n&&(r=n,n=void 0);const{aliasDuplicateObjects:s,anchorPrefix:a,flow:c,keepUndefined:l,onTagObj:d,tag:h}=r!=null?r:{},{onAnchor:m,setAnchors:E,sourceObjects:T}=HA(this,a||"a"),R={aliasDuplicateObjects:s!=null?s:!0,keepUndefined:l!=null?l:!1,onAnchor:m,onTagObj:d,replacer:i,schema:this.schema,sourceObjects:T},P=Ic(e,h,R);return c&&Fn(P)&&(P.flow=!0),E(),P}createPair(e,n,r={}){const i=this.createNode(e,null,r),s=this.createNode(n,null,r);return new _r(i,s)}delete(e){return vu(this.contents)?this.contents.delete(e):!1}deleteIn(e){return Mc(e)?this.contents==null?!1:(this.contents=null,!0):vu(this.contents)?this.contents.deleteIn(e):!1}get(e,n){return Fn(this.contents)?this.contents.get(e,n):void 0}getIn(e,n){return Mc(e)?!n&&yt(this.contents)?this.contents.value:this.contents:Fn(this.contents)?this.contents.getIn(e,n):void 0}has(e){return Fn(this.contents)?this.contents.has(e):!1}hasIn(e){return Mc(e)?this.contents!==void 0:Fn(this.contents)?this.contents.hasIn(e):!1}set(e,n){this.contents==null?this.contents=Gf(this.schema,[e],n):vu(this.contents)&&this.contents.set(e,n)}setIn(e,n){Mc(e)?this.contents=n:this.contents==null?this.contents=Gf(this.schema,Array.from(e),n):vu(this.contents)&&this.contents.setIn(e,n)}setSchema(e,n={}){typeof e=="number"&&(e=String(e));let r;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new wr({version:"1.1"}),r={merge:!0,resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new wr({version:e}),r={merge:!1,resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,r=null;break;default:{const i=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${i}`)}}if(n.schema instanceof Object)this.schema=n.schema;else if(r)this.schema=new yg(Object.assign(r,n));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:n,mapAsMap:r,maxAliasCount:i,onAnchor:s,reviver:a}={}){const c={anchors:new Map,doc:this,keep:!e,mapAsMap:r===!0,mapKeyWarned:!1,maxAliasCount:typeof i=="number"?i:100,stringify:Zo},l=ns(this.contents,n!=null?n:"",c);if(typeof s=="function")for(const{count:d,res:h}of c.anchors.values())s(h,d);return typeof a=="function"?xc(a,{"":l},"",l):l}toJSON(e,n){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:n})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){const n=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${n}`)}return TC(this,e)}}function vu(t){if(Fn(t))return!0;throw new Error("Expected a YAML collection as document contents")}class nw extends Error{constructor(e,n,r,i){super(),this.name=e,this.code=r,this.message=i,this.pos=n}}class qc extends nw{constructor(e,n,r){super("YAMLParseError",e,n,r)}}class AC extends nw{constructor(e,n,r){super("YAMLWarning",e,n,r)}}const rw=(t,e)=>n=>{if(n.pos[0]===-1)return;n.linePos=n.pos.map(c=>e.linePos(c));const{line:r,col:i}=n.linePos[0];n.message+=` at line ${r}, column ${i}`;let s=i-1,a=t.substring(e.lineStarts[r-1],e.lineStarts[r]).replace(/[\n\r]+$/,"");if(s>=60&&a.length>80){const c=Math.min(s-39,a.length-79);a="\u2026"+a.substring(c),s-=c-1}if(a.length>80&&(a=a.substring(0,79)+"\u2026"),r>1&&/^ *$/.test(a.substring(0,s))){let c=t.substring(e.lineStarts[r-2],e.lineStarts[r-1]);c.length>80&&(c=c.substring(0,79)+`\u2026 `),a=c+a}if(/[^ ]/.test(a)){let c=1;const l=n.linePos[1];l&&l.line===r&&l.col>i&&(c=Math.max(1,Math.min(l.col-i,80-s)));const d=" ".repeat(s)+"^".repeat(c);n.message+=`: ${a} ${d} -`}};function bu(t,{flow:e,indicator:n,next:r,offset:i,onError:s,startOnNewline:a}){let c=!1,l=a,d=a,h="",m="",E=!1,k=!1,R=!1,P=null,A=null,N=null,S=null,y=null;for(const _ of t)switch(R&&(_.type!=="space"&&_.type!=="newline"&&_.type!=="comma"&&s(_.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),R=!1),_.type){case"space":!e&&l&&n!=="doc-start"&&_.source[0]===" "&&s(_,"TAB_AS_INDENT","Tabs are not allowed as indentation"),d=!0;break;case"comment":{d||s(_,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const $=_.source.substring(1)||" ";h?h+=m+$:h=$,m="",l=!1;break}case"newline":l?h?h+=_.source:c=!0:m+=_.source,l=!0,E=!0,(P||A)&&(k=!0),d=!0;break;case"anchor":P&&s(_,"MULTIPLE_ANCHORS","A node can have at most one anchor"),_.source.endsWith(":")&&s(_.offset+_.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),P=_,y===null&&(y=_.offset),l=!1,d=!1,R=!0;break;case"tag":{A&&s(_,"MULTIPLE_TAGS","A node can have at most one tag"),A=_,y===null&&(y=_.offset),l=!1,d=!1,R=!0;break}case n:(P||A)&&s(_,"BAD_PROP_ORDER",`Anchors and tags must be after the ${_.source} indicator`),S&&s(_,"UNEXPECTED_TOKEN",`Unexpected ${_.source} in ${e!=null?e:"collection"}`),S=_,l=!1,d=!1;break;case"comma":if(e){N&&s(_,"UNEXPECTED_TOKEN",`Unexpected , in ${e}`),N=_,l=!1,d=!1;break}default:s(_,"UNEXPECTED_TOKEN",`Unexpected ${_.type} token`),l=!1,d=!1}const D=t[t.length-1],v=D?D.offset+D.source.length:i;return R&&r&&r.type!=="space"&&r.type!=="newline"&&r.type!=="comma"&&(r.type!=="scalar"||r.source!=="")&&s(r.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),{comma:N,found:S,spaceBefore:c,comment:h,hasNewline:E,hasNewlineAfterProp:k,anchor:P,tag:A,end:v,start:y!=null?y:v}}function Wc(t){if(!t)return null;switch(t.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(t.source.includes(` -`))return!0;if(t.end){for(const e of t.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(const e of t.items){for(const n of e.start)if(n.type==="newline")return!0;if(e.sep){for(const n of e.sep)if(n.type==="newline")return!0}if(Wc(e.key)||Wc(e.value))return!0}return!1;default:return!0}}function vg(t,e,n){if((e==null?void 0:e.type)==="flow-collection"){const r=e.end[0];r.indent===t&&(r.source==="]"||r.source==="}")&&Wc(e)&&n(r,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function iw(t,e,n){const{uniqueKeys:r}=t.options;if(r===!1)return!1;const i=typeof r=="function"?r:(s,a)=>s===a||yt(s)&&yt(a)&&s.value===a.value&&!(s.value==="<<"&&t.schema.merge);return e.some(s=>i(s.key,n))}const sw="All mapping items must start at the same column";function CC({composeNode:t,composeEmptyNode:e},n,r,i){var l;const s=new Ni(n.schema);n.atRoot&&(n.atRoot=!1);let a=r.offset,c=null;for(const d of r.items){const{start:h,key:m,sep:E,value:k}=d,R=bu(h,{indicator:"explicit-key-ind",next:m!=null?m:E==null?void 0:E[0],offset:a,onError:i,startOnNewline:!0}),P=!R.found;if(P){if(m&&(m.type==="block-seq"?i(a,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in m&&m.indent!==r.indent&&i(a,"BAD_INDENT",sw)),!R.anchor&&!R.tag&&!E){c=R.end,R.comment&&(s.comment?s.comment+=` -`+R.comment:s.comment=R.comment);continue}(R.hasNewlineAfterProp||Wc(m))&&i(m!=null?m:h[h.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else((l=R.found)==null?void 0:l.indent)!==r.indent&&i(a,"BAD_INDENT",sw);const A=R.end,N=m?t(n,m,R,i):e(n,A,h,null,R,i);n.schema.compat&&vg(r.indent,m,i),iw(n,s.items,N)&&i(A,"DUPLICATE_KEY","Map keys must be unique");const S=bu(E!=null?E:[],{indicator:"map-value-ind",next:k,offset:N.range[2],onError:i,startOnNewline:!m||m.type==="block-scalar"});if(a=S.end,S.found){P&&((k==null?void 0:k.type)==="block-map"&&!S.hasNewline&&i(a,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),n.options.strict&&R.startt&&(t.type==="block-map"||t.type==="block-seq");function PC({composeNode:t,composeEmptyNode:e},n,r,i){var R;const s=r.start.source==="{",a=s?"flow map":"flow sequence",c=s?new Ni(n.schema):new hu(n.schema);c.flow=!0;const l=n.atRoot;l&&(n.atRoot=!1);let d=r.offset+r.start.source.length;for(let P=0;P0){const P=Uc(E,k,n.options.strict,i);P.comment&&(c.comment?c.comment+=` -`+P.comment:c.comment=P.comment),c.range=[r.offset,k,P.offset]}else c.range=[r.offset,k,k];return c}function NC(t,e,n,r,i){let s;switch(n.type){case"block-map":{s=CC(t,e,n,i);break}case"block-seq":{s=OC(t,e,n,i);break}case"flow-collection":{s=PC(t,e,n,i);break}}if(!r)return s;const a=e.directives.tagName(r.source,E=>i(r,"TAG_RESOLVE_FAILED",E));if(!a)return s;const c=s.constructor;if(a==="!"||a===c.tagName)return s.tag=c.tagName,s;const l=Nn(s)?"map":"seq";let d=e.schema.tags.find(E=>E.collection===l&&E.tag===a);if(!d){const E=e.schema.knownTags[a];if(E&&E.collection===l)e.schema.tags.push(Object.assign({},E,{default:!1})),d=E;else return i(r,"TAG_RESOLVE_FAILED",`Unresolved tag: ${a}`,!0),s.tag=a,s}const h=d.resolve(s,E=>i(r,"TAG_RESOLVE_FAILED",E),e.options),m=on(h)?h:new Et(h);return m.range=s.range,m.tag=a,d!=null&&d.format&&(m.format=d.format),m}function FC(t,e,n){const r=t.offset,i=RC(t,e,n);if(!i)return{value:"",type:null,comment:"",range:[r,r,r]};const s=i.mode===">"?Et.BLOCK_FOLDED:Et.BLOCK_LITERAL,a=t.source?IC(t.source):[];let c=a.length;for(let P=a.length-1;P>=0;--P){const A=a[P][1];if(A===""||A==="\r")c=P;else break}if(c===0){const P=i.chomp==="+"&&a.length>0?` -`.repeat(Math.max(1,a.length-1)):"";let A=r+i.length;return t.source&&(A+=t.source.length),{value:P,type:s,comment:i.comment,range:[r,A,A]}}let l=t.indent+i.indent,d=t.offset+i.length,h=0;for(let P=0;Pl&&(l=A.length);else{if(A.length=c;--P)a[P][0].length>l&&(c=P+1);let m="",E="",k=!1;for(let P=0;Pl||N[0]===" "?(E===" "?E=` -`:!k&&E===` +`}};function bu(t,{flow:e,indicator:n,next:r,offset:i,onError:s,startOnNewline:a}){let c=!1,l=a,d=a,h="",m="",E=!1,T=!1,R=!1,P=null,A=null,F=null,S=null,y=null;for(const _ of t)switch(R&&(_.type!=="space"&&_.type!=="newline"&&_.type!=="comma"&&s(_.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),R=!1),_.type){case"space":!e&&l&&n!=="doc-start"&&_.source[0]===" "&&s(_,"TAB_AS_INDENT","Tabs are not allowed as indentation"),d=!0;break;case"comment":{d||s(_,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const $=_.source.substring(1)||" ";h?h+=m+$:h=$,m="",l=!1;break}case"newline":l?h?h+=_.source:c=!0:m+=_.source,l=!0,E=!0,(P||A)&&(T=!0),d=!0;break;case"anchor":P&&s(_,"MULTIPLE_ANCHORS","A node can have at most one anchor"),_.source.endsWith(":")&&s(_.offset+_.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),P=_,y===null&&(y=_.offset),l=!1,d=!1,R=!0;break;case"tag":{A&&s(_,"MULTIPLE_TAGS","A node can have at most one tag"),A=_,y===null&&(y=_.offset),l=!1,d=!1,R=!0;break}case n:(P||A)&&s(_,"BAD_PROP_ORDER",`Anchors and tags must be after the ${_.source} indicator`),S&&s(_,"UNEXPECTED_TOKEN",`Unexpected ${_.source} in ${e!=null?e:"collection"}`),S=_,l=!1,d=!1;break;case"comma":if(e){F&&s(_,"UNEXPECTED_TOKEN",`Unexpected , in ${e}`),F=_,l=!1,d=!1;break}default:s(_,"UNEXPECTED_TOKEN",`Unexpected ${_.type} token`),l=!1,d=!1}const D=t[t.length-1],v=D?D.offset+D.source.length:i;return R&&r&&r.type!=="space"&&r.type!=="newline"&&r.type!=="comma"&&(r.type!=="scalar"||r.source!=="")&&s(r.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),{comma:F,found:S,spaceBefore:c,comment:h,hasNewline:E,hasNewlineAfterProp:T,anchor:P,tag:A,end:v,start:y!=null?y:v}}function Wc(t){if(!t)return null;switch(t.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(t.source.includes(` +`))return!0;if(t.end){for(const e of t.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(const e of t.items){for(const n of e.start)if(n.type==="newline")return!0;if(e.sep){for(const n of e.sep)if(n.type==="newline")return!0}if(Wc(e.key)||Wc(e.value))return!0}return!1;default:return!0}}function vg(t,e,n){if((e==null?void 0:e.type)==="flow-collection"){const r=e.end[0];r.indent===t&&(r.source==="]"||r.source==="}")&&Wc(e)&&n(r,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function iw(t,e,n){const{uniqueKeys:r}=t.options;if(r===!1)return!1;const i=typeof r=="function"?r:(s,a)=>s===a||yt(s)&&yt(a)&&s.value===a.value&&!(s.value==="<<"&&t.schema.merge);return e.some(s=>i(s.key,n))}const sw="All mapping items must start at the same column";function CC({composeNode:t,composeEmptyNode:e},n,r,i){var l;const s=new Ni(n.schema);n.atRoot&&(n.atRoot=!1);let a=r.offset,c=null;for(const d of r.items){const{start:h,key:m,sep:E,value:T}=d,R=bu(h,{indicator:"explicit-key-ind",next:m!=null?m:E==null?void 0:E[0],offset:a,onError:i,startOnNewline:!0}),P=!R.found;if(P){if(m&&(m.type==="block-seq"?i(a,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in m&&m.indent!==r.indent&&i(a,"BAD_INDENT",sw)),!R.anchor&&!R.tag&&!E){c=R.end,R.comment&&(s.comment?s.comment+=` +`+R.comment:s.comment=R.comment);continue}(R.hasNewlineAfterProp||Wc(m))&&i(m!=null?m:h[h.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else((l=R.found)==null?void 0:l.indent)!==r.indent&&i(a,"BAD_INDENT",sw);const A=R.end,F=m?t(n,m,R,i):e(n,A,h,null,R,i);n.schema.compat&&vg(r.indent,m,i),iw(n,s.items,F)&&i(A,"DUPLICATE_KEY","Map keys must be unique");const S=bu(E!=null?E:[],{indicator:"map-value-ind",next:T,offset:F.range[2],onError:i,startOnNewline:!m||m.type==="block-scalar"});if(a=S.end,S.found){P&&((T==null?void 0:T.type)==="block-map"&&!S.hasNewline&&i(a,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),n.options.strict&&R.startt&&(t.type==="block-map"||t.type==="block-seq");function PC({composeNode:t,composeEmptyNode:e},n,r,i){var R;const s=r.start.source==="{",a=s?"flow map":"flow sequence",c=s?new Ni(n.schema):new hu(n.schema);c.flow=!0;const l=n.atRoot;l&&(n.atRoot=!1);let d=r.offset+r.start.source.length;for(let P=0;P0){const P=Uc(E,T,n.options.strict,i);P.comment&&(c.comment?c.comment+=` +`+P.comment:c.comment=P.comment),c.range=[r.offset,T,P.offset]}else c.range=[r.offset,T,T];return c}function NC(t,e,n,r,i){let s;switch(n.type){case"block-map":{s=CC(t,e,n,i);break}case"block-seq":{s=OC(t,e,n,i);break}case"flow-collection":{s=PC(t,e,n,i);break}}if(!r)return s;const a=e.directives.tagName(r.source,E=>i(r,"TAG_RESOLVE_FAILED",E));if(!a)return s;const c=s.constructor;if(a==="!"||a===c.tagName)return s.tag=c.tagName,s;const l=Nn(s)?"map":"seq";let d=e.schema.tags.find(E=>E.collection===l&&E.tag===a);if(!d){const E=e.schema.knownTags[a];if(E&&E.collection===l)e.schema.tags.push(Object.assign({},E,{default:!1})),d=E;else return i(r,"TAG_RESOLVE_FAILED",`Unresolved tag: ${a}`,!0),s.tag=a,s}const h=d.resolve(s,E=>i(r,"TAG_RESOLVE_FAILED",E),e.options),m=on(h)?h:new Et(h);return m.range=s.range,m.tag=a,d!=null&&d.format&&(m.format=d.format),m}function FC(t,e,n){const r=t.offset,i=RC(t,e,n);if(!i)return{value:"",type:null,comment:"",range:[r,r,r]};const s=i.mode===">"?Et.BLOCK_FOLDED:Et.BLOCK_LITERAL,a=t.source?IC(t.source):[];let c=a.length;for(let P=a.length-1;P>=0;--P){const A=a[P][1];if(A===""||A==="\r")c=P;else break}if(c===0){const P=i.chomp==="+"&&a.length>0?` +`.repeat(Math.max(1,a.length-1)):"";let A=r+i.length;return t.source&&(A+=t.source.length),{value:P,type:s,comment:i.comment,range:[r,A,A]}}let l=t.indent+i.indent,d=t.offset+i.length,h=0;for(let P=0;Pl&&(l=A.length);else{if(A.length=c;--P)a[P][0].length>l&&(c=P+1);let m="",E="",T=!1;for(let P=0;Pl||F[0]===" "?(E===" "?E=` +`:!T&&E===` `&&(E=` -`),m+=E+A.slice(l)+N,E=` -`,k=!0):N===""?E===` +`),m+=E+A.slice(l)+F,E=` +`,T=!0):F===""?E===` `?m+=` `:E=` -`:(m+=E+N,E=" ",k=!1)}switch(i.chomp){case"-":break;case"+":for(let P=c;Pn(r+E,k,R);switch(i){case"scalar":c=Et.PLAIN,l=LC(s,d);break;case"single-quoted-scalar":c=Et.QUOTE_SINGLE,l=jC(s,d);break;case"double-quoted-scalar":c=Et.QUOTE_DOUBLE,l=xC(s,d);break;default:return n(t,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${i}`),{value:"",type:null,comment:"",range:[r,r+s.length,r+s.length]}}const h=r+s.length,m=Uc(a,h,e,n);return{value:l,type:c,comment:m.comment,range:[r,h,m.offset]}}function LC(t,e){let n="";switch(t[0]){case" ":n="a tab character";break;case",":n="flow indicator character ,";break;case"%":n="directive indicator character %";break;case"|":case">":{n=`block scalar indicator ${t[0]}`;break}case"@":case"`":{n=`reserved character ${t[0]}`;break}}return n&&e(0,"BAD_SCALAR_START",`Plain value cannot start with ${n}`),ow(t)}function jC(t,e){return(t[t.length-1]!=="'"||t.length===1)&&e(t.length,"MISSING_CHAR","Missing closing 'quote"),ow(t.slice(1,-1)).replace(/''/g,"'")}function ow(t){var l;let e,n;try{e=new RegExp(`(.*?)(?n(r+E,T,R);switch(i){case"scalar":c=Et.PLAIN,l=LC(s,d);break;case"single-quoted-scalar":c=Et.QUOTE_SINGLE,l=jC(s,d);break;case"double-quoted-scalar":c=Et.QUOTE_DOUBLE,l=xC(s,d);break;default:return n(t,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${i}`),{value:"",type:null,comment:"",range:[r,r+s.length,r+s.length]}}const h=r+s.length,m=Uc(a,h,e,n);return{value:l,type:c,comment:m.comment,range:[r,h,m.offset]}}function LC(t,e){let n="";switch(t[0]){case" ":n="a tab character";break;case",":n="flow indicator character ,";break;case"%":n="directive indicator character %";break;case"|":case">":{n=`block scalar indicator ${t[0]}`;break}case"@":case"`":{n=`reserved character ${t[0]}`;break}}return n&&e(0,"BAD_SCALAR_START",`Plain value cannot start with ${n}`),ow(t)}function jC(t,e){return(t[t.length-1]!=="'"||t.length===1)&&e(t.length,"MISSING_CHAR","Missing closing 'quote"),ow(t.slice(1,-1)).replace(/''/g,"'")}function ow(t){var l;let e,n;try{e=new RegExp(`(.*?)(?0){let a=s.items[0];Xt(a)&&(a=a.key);const c=a.commentBefore;a.commentBefore=c?`${r} ${c}`:r}else{const a=s.commentBefore;s.commentBefore=a?`${r} ${a}`:r}}n?(Array.prototype.push.apply(e.errors,this.errors),Array.prototype.push.apply(e.warnings,this.warnings)):(e.errors=this.errors,e.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:cw(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,n=!1,r=-1){for(const i of e)yield*this.next(i);yield*this.end(n,r)}*next(e){switch(e.type){case"directive":this.directives.add(e.source,(n,r,i)=>{const s=Vc(e);s[0]+=n,this.onError(s,"BAD_DIRECTIVE",r,i)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{const n=YC(this.options,this.directives,e,this.onError);this.atDirectives&&!n.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(n,!1),this.doc&&(yield this.doc),this.doc=n,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{const n=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,r=new qc(Vc(e),"UNEXPECTED_TOKEN",n);this.atDirectives||!this.doc?this.errors.push(r):this.doc.errors.push(r);break}case"doc-end":{if(!this.doc){const r="Unexpected doc-end without preceding document";this.errors.push(new qc(Vc(e),"UNEXPECTED_TOKEN",r));break}this.doc.directives.docEnd=!0;const n=Uc(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),n.comment){const r=this.doc.comment;this.doc.comment=r?`${r} -${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.push(new qc(Vc(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,n=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){const r=Object.assign({_directives:this.directives},this.options),i=new Bc(void 0,r);this.atDirectives&&this.onError(n,"MISSING_CHAR","Missing directives-end indicator line"),i.range=[0,n,n],this.decorate(i,!1),yield i}}}const fw=t=>"type"in t?ld(t):fd(t);function ld(t){switch(t.type){case"block-scalar":{let e="";for(const n of t.props)e+=ld(n);return e+t.source}case"block-map":case"block-seq":{let e="";for(const n of t.items)e+=fd(n);return e}case"flow-collection":{let e=t.start.source;for(const n of t.items)e+=fd(n);for(const n of t.end)e+=n.source;return e}case"document":{let e=fd(t);if(t.end)for(const n of t.end)e+=n.source;return e}default:{let e=t.source;if("end"in t&&t.end)for(const n of t.end)e+=n.source;return e}}}function fd({start:t,key:e,sep:n,value:r}){let i="";for(const s of t)i+=s.source;if(e&&(i+=ld(e)),n)for(const s of n)i+=s.source;return r&&(i+=ld(r)),i}const _g=Symbol("break visit"),GC=Symbol("skip children"),dw=Symbol("remove item");function ta(t,e){"type"in t&&t.type==="document"&&(t={start:t.start,value:t.value}),hw(Object.freeze([]),t,e)}ta.BREAK=_g,ta.SKIP=GC,ta.REMOVE=dw,ta.itemAtPath=(t,e)=>{let n=t;for(const[r,i]of e){const s=n==null?void 0:n[r];if(s&&"items"in s)n=s.items[i];else return}return n},ta.parentCollection=(t,e)=>{const n=ta.itemAtPath(t,e.slice(0,-1)),r=e[e.length-1][0],i=n==null?void 0:n[r];if(i&&"items"in i)return i;throw new Error("Parent collection not found")};function hw(t,e,n){let r=n(e,t);if(typeof r=="symbol")return r;for(const i of["key","value"]){const s=e[i];if(s&&"items"in s){for(let a=0;a!!t&&"items"in t,Eg=t=>!!t&&(t.type==="scalar"||t.type==="single-quoted-scalar"||t.type==="double-quoted-scalar"||t.type==="block-scalar");function QC(t){switch(t){case pw:return"byte-order-mark";case mw:return"doc-mode";case gw:return"flow-error-end";case $g:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case` +${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.push(new qc(Vc(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,n=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){const r=Object.assign({_directives:this.directives},this.options),i=new Bc(void 0,r);this.atDirectives&&this.onError(n,"MISSING_CHAR","Missing directives-end indicator line"),i.range=[0,n,n],this.decorate(i,!1),yield i}}}const fw=t=>"type"in t?fd(t):dd(t);function fd(t){switch(t.type){case"block-scalar":{let e="";for(const n of t.props)e+=fd(n);return e+t.source}case"block-map":case"block-seq":{let e="";for(const n of t.items)e+=dd(n);return e}case"flow-collection":{let e=t.start.source;for(const n of t.items)e+=dd(n);for(const n of t.end)e+=n.source;return e}case"document":{let e=dd(t);if(t.end)for(const n of t.end)e+=n.source;return e}default:{let e=t.source;if("end"in t&&t.end)for(const n of t.end)e+=n.source;return e}}}function dd({start:t,key:e,sep:n,value:r}){let i="";for(const s of t)i+=s.source;if(e&&(i+=fd(e)),n)for(const s of n)i+=s.source;return r&&(i+=fd(r)),i}const _g=Symbol("break visit"),GC=Symbol("skip children"),dw=Symbol("remove item");function ta(t,e){"type"in t&&t.type==="document"&&(t={start:t.start,value:t.value}),hw(Object.freeze([]),t,e)}ta.BREAK=_g,ta.SKIP=GC,ta.REMOVE=dw,ta.itemAtPath=(t,e)=>{let n=t;for(const[r,i]of e){const s=n==null?void 0:n[r];if(s&&"items"in s)n=s.items[i];else return}return n},ta.parentCollection=(t,e)=>{const n=ta.itemAtPath(t,e.slice(0,-1)),r=e[e.length-1][0],i=n==null?void 0:n[r];if(i&&"items"in i)return i;throw new Error("Parent collection not found")};function hw(t,e,n){let r=n(e,t);if(typeof r=="symbol")return r;for(const i of["key","value"]){const s=e[i];if(s&&"items"in s){for(let a=0;a!!t&&"items"in t,Eg=t=>!!t&&(t.type==="scalar"||t.type==="single-quoted-scalar"||t.type==="double-quoted-scalar"||t.type==="block-scalar");function QC(t){switch(t){case pw:return"byte-order-mark";case mw:return"doc-mode";case gw:return"flow-error-end";case $g:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case` `:case`\r `:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(t[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}function li(t){switch(t){case void 0:case" ":case` `:case"\r":case" ":return!0;default:return!1}}const yw="0123456789ABCDEFabcdef".split(""),XC="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()".split(""),Sg=",[]{}".split(""),ZC=` ,[]{} -\r `.split(""),Tg=t=>!t||ZC.includes(t);class eO{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,n=!1){var i;e&&(this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null),this.atEnd=!n;let r=(i=this.next)!=null?i:"stream";for(;r&&(n||this.hasChars(1));)r=yield*this.parseNext(r)}atLineEnd(){let e=this.pos,n=this.buffer[e];for(;n===" "||n===" ";)n=this.buffer[++e];return!n||n==="#"||n===` +\r `.split(""),kg=t=>!t||ZC.includes(t);class eO{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,n=!1){var i;e&&(this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null),this.atEnd=!n;let r=(i=this.next)!=null?i:"stream";for(;r&&(n||this.hasChars(1));)r=yield*this.parseNext(r)}atLineEnd(){let e=this.pos,n=this.buffer[e];for(;n===" "||n===" ";)n=this.buffer[++e];return!n||n==="#"||n===` `?!0:n==="\r"?this.buffer[e+1]===` `:!1}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let n=this.buffer[e];if(this.indentNext>0){let r=0;for(;n===" ";)n=this.buffer[++r+e];if(n==="\r"){const i=this.buffer[r+e+1];if(i===` `||!i&&!this.atEnd)return e+r+1}return n===` `||r>=this.indentNext||!n&&!this.atEnd?e+r:-1}if(n==="-"||n==="."){const r=this.buffer.substr(e,3);if((r==="---"||r==="...")&&li(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return(typeof e!="number"||e!==-1&&ethis.indentValue&&!li(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){const[e,n]=this.peek(2);if(!n&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&li(n)){const r=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=r,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);const e=this.getLine();if(e===null)return this.setNext("doc");let n=yield*this.pushIndicators();switch(e[n]){case"#":yield*this.pushCount(e.length-n);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(Tg),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return n+=yield*this.parseBlockScalarHeader(),n+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-n),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,n,r=-1;do e=yield*this.pushNewline(),e>0?(n=yield*this.pushSpaces(!1),this.indentValue=r=n):n=0,n+=yield*this.pushSpaces(!0);while(e+n>0);const i=this.getLine();if(i===null)return this.setNext("flow");if((r!==-1&&rthis.indentValue&&!li(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){const[e,n]=this.peek(2);if(!n&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&li(n)){const r=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=r,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);const e=this.getLine();if(e===null)return this.setNext("doc");let n=yield*this.pushIndicators();switch(e[n]){case"#":yield*this.pushCount(e.length-n);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(kg),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return n+=yield*this.parseBlockScalarHeader(),n+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-n),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,n,r=-1;do e=yield*this.pushNewline(),e>0?(n=yield*this.pushSpaces(!1),this.indentValue=r=n):n=0,n+=yield*this.pushSpaces(!0);while(e+n>0);const i=this.getLine();if(i===null)return this.setNext("flow");if((r!==-1&&r"0"&&n<="9")this.blockScalarIndent=Number(n)-1;else if(n!=="-")break}return yield*this.pushUntil(n=>li(n)||n==="#")}*parseBlockScalar(){let e=this.pos-1,n=0,r;e:for(let i=this.pos;r=this.buffer[i];++i)switch(r){case" ":n+=1;break;case` `:e=i,n=0;break;case"\r":{const s=this.buffer[i+1];if(!s&&!this.atEnd)return this.setNext("block-scalar");if(s===` @@ -162,41 +162,41 @@ ${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.pus `&&i>=this.pos&&i+1+n>a)e=i;else break}while(!0);return yield $g,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const e=this.flowLevel>0;let n=this.pos-1,r=this.pos-1,i;for(;i=this.buffer[++r];)if(i===":"){const s=this.buffer[r+1];if(li(s)||e&&s===",")break;n=r}else if(li(i)){let s=this.buffer[r+1];if(i==="\r"&&(s===` `?(r+=1,i=` `,s=this.buffer[r+1]):n=r),s==="#"||e&&Sg.includes(s))break;if(i===` -`){const a=this.continueScalar(r+1);if(a===-1)break;r=Math.max(r,a-2)}}else{if(e&&Sg.includes(i))break;n=r}return!i&&!this.atEnd?this.setNext("plain-scalar"):(yield $g,yield*this.pushToIndex(n+1,!0),e?"flow":"doc")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,n){const r=this.buffer.slice(this.pos,e);return r?(yield r,this.pos+=r.length,r.length):(n&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(Tg))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const e=this.flowLevel>0,n=this.charAt(1);if(li(n)||e&&Sg.includes(n))return e?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if(this.charAt(1)==="<"){let e=this.pos+2,n=this.buffer[e];for(;!li(n)&&n!==">";)n=this.buffer[++e];return yield*this.pushToIndex(n===">"?e+1:e,!1)}else{let e=this.pos+1,n=this.buffer[e];for(;n;)if(XC.includes(n))n=this.buffer[++e];else if(n==="%"&&yw.includes(this.buffer[e+1])&&yw.includes(this.buffer[e+2]))n=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){const e=this.buffer[this.pos];return e===` +`){const a=this.continueScalar(r+1);if(a===-1)break;r=Math.max(r,a-2)}}else{if(e&&Sg.includes(i))break;n=r}return!i&&!this.atEnd?this.setNext("plain-scalar"):(yield $g,yield*this.pushToIndex(n+1,!0),e?"flow":"doc")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,n){const r=this.buffer.slice(this.pos,e);return r?(yield r,this.pos+=r.length,r.length):(n&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(kg))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const e=this.flowLevel>0,n=this.charAt(1);if(li(n)||e&&Sg.includes(n))return e?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if(this.charAt(1)==="<"){let e=this.pos+2,n=this.buffer[e];for(;!li(n)&&n!==">";)n=this.buffer[++e];return yield*this.pushToIndex(n===">"?e+1:e,!1)}else{let e=this.pos+1,n=this.buffer[e];for(;n;)if(XC.includes(n))n=this.buffer[++e];else if(n==="%"&&yw.includes(this.buffer[e+1])&&yw.includes(this.buffer[e+2]))n=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){const e=this.buffer[this.pos];return e===` `?yield*this.pushCount(1):e==="\r"&&this.charAt(1)===` -`?yield*this.pushCount(2):0}*pushSpaces(e){let n=this.pos-1,r;do r=this.buffer[++n];while(r===" "||e&&r===" ");const i=n-this.pos;return i>0&&(yield this.buffer.substr(this.pos,i),this.pos=n),i}*pushUntil(e){let n=this.pos,r=this.buffer[n];for(;!e(r);)r=this.buffer[++n];return yield*this.pushToIndex(n,!1)}}class vw{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let n=0,r=this.lineStarts.length;for(;n>1;this.lineStarts[s]=0;)switch(t[e].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;((n=t[++e])==null?void 0:n.type)==="space";);return t.splice(e,t.length)}function ww(t){if(t.start.type==="flow-seq-start")for(const e of t.items)e.sep&&!e.value&&!Ri(e.start,"explicit-key-ind")&&!Ri(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,Dw(e.value)?e.value.end?Array.prototype.push.apply(e.value.end,e.sep):e.value.end=e.sep:Array.prototype.push.apply(e.start,e.sep),delete e.sep)}class kg{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new eO,this.onNewLine=e}*parse(e,n=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(const r of this.lexer.lex(e,n))yield*this.next(r);n||(yield*this.end())}*next(e){if(this.source=e,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}const n=QC(e);if(n)if(n==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=n,yield*this.step(),n){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case"space":this.atNewLine&&e[0]===" "&&(this.indent+=e.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=e.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}else{const r=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:r,source:e}),this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){const e=this.peek(1);if(this.type==="doc-end"&&(!e||e.type!=="doc-end")){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){const n=e!=null?e:this.stack.pop();if(n)if(this.stack.length===0)yield n;else{const r=this.peek(1);switch(n.type==="block-scalar"?n.indent="indent"in r?r.indent:0:n.type==="flow-collection"&&r.type==="document"&&(n.indent=0),n.type==="flow-collection"&&ww(n),r.type){case"document":r.value=n;break;case"block-scalar":r.props.push(n);break;case"block-map":{const i=r.items[r.items.length-1];if(i.value){r.items.push({start:[],key:n,sep:[]}),this.onKeyLine=!0;return}else if(i.sep)i.value=n;else{Object.assign(i,{key:n,sep:[]}),this.onKeyLine=!Ri(i.start,"explicit-key-ind");return}break}case"block-seq":{const i=r.items[r.items.length-1];i.value?r.items.push({start:[],value:n}):i.value=n;break}case"flow-collection":{const i=r.items[r.items.length-1];!i||i.value?r.items.push({start:[],key:n,sep:[]}):i.sep?i.value=n:Object.assign(i,{key:n,sep:[]});return}default:yield*this.pop(),yield*this.pop(n)}if((r.type==="document"||r.type==="block-map"||r.type==="block-seq")&&(n.type==="block-map"||n.type==="block-seq")){const i=n.items[n.items.length-1];i&&!i.sep&&!i.value&&i.start.length>0&&bw(i.start)===-1&&(n.indent===0||i.start.every(s=>s.type!=="comment"||s.indent0&&(yield this.buffer.substr(this.pos,i),this.pos=n),i}*pushUntil(e){let n=this.pos,r=this.buffer[n];for(;!e(r);)r=this.buffer[++n];return yield*this.pushToIndex(n,!1)}}class vw{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let n=0,r=this.lineStarts.length;for(;n>1;this.lineStarts[s]=0;)switch(t[e].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;((n=t[++e])==null?void 0:n.type)==="space";);return t.splice(e,t.length)}function ww(t){if(t.start.type==="flow-seq-start")for(const e of t.items)e.sep&&!e.value&&!Ri(e.start,"explicit-key-ind")&&!Ri(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,Dw(e.value)?e.value.end?Array.prototype.push.apply(e.value.end,e.sep):e.value.end=e.sep:Array.prototype.push.apply(e.start,e.sep),delete e.sep)}class Tg{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new eO,this.onNewLine=e}*parse(e,n=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(const r of this.lexer.lex(e,n))yield*this.next(r);n||(yield*this.end())}*next(e){if(this.source=e,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}const n=QC(e);if(n)if(n==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=n,yield*this.step(),n){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case"space":this.atNewLine&&e[0]===" "&&(this.indent+=e.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=e.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}else{const r=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:r,source:e}),this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){const e=this.peek(1);if(this.type==="doc-end"&&(!e||e.type!=="doc-end")){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){const n=e!=null?e:this.stack.pop();if(n)if(this.stack.length===0)yield n;else{const r=this.peek(1);switch(n.type==="block-scalar"?n.indent="indent"in r?r.indent:0:n.type==="flow-collection"&&r.type==="document"&&(n.indent=0),n.type==="flow-collection"&&ww(n),r.type){case"document":r.value=n;break;case"block-scalar":r.props.push(n);break;case"block-map":{const i=r.items[r.items.length-1];if(i.value){r.items.push({start:[],key:n,sep:[]}),this.onKeyLine=!0;return}else if(i.sep)i.value=n;else{Object.assign(i,{key:n,sep:[]}),this.onKeyLine=!Ri(i.start,"explicit-key-ind");return}break}case"block-seq":{const i=r.items[r.items.length-1];i.value?r.items.push({start:[],value:n}):i.value=n;break}case"flow-collection":{const i=r.items[r.items.length-1];!i||i.value?r.items.push({start:[],key:n,sep:[]}):i.sep?i.value=n:Object.assign(i,{key:n,sep:[]});return}default:yield*this.pop(),yield*this.pop(n)}if((r.type==="document"||r.type==="block-map"||r.type==="block-seq")&&(n.type==="block-map"||n.type==="block-seq")){const i=n.items[n.items.length-1];i&&!i.sep&&!i.value&&i.start.length>0&&bw(i.start)===-1&&(n.indent===0||i.start.every(s=>s.type!=="comment"||s.indent=e.indent){const i=!this.onKeyLine&&this.indent===e.indent&&n.sep;let s=[];if(i&&n.sep&&!n.value){const a=[];for(let c=0;ce.indent&&(a.length=0);break;default:a.length=0}}a.length>=2&&(s=n.sep.splice(a[1]))}switch(this.type){case"anchor":case"tag":i||n.value?(s.push(this.sourceToken),e.items.push({start:s}),this.onKeyLine=!0):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"explicit-key-ind":!n.sep&&!Ri(n.start,"explicit-key-ind")?n.start.push(this.sourceToken):i||n.value?(s.push(this.sourceToken),e.items.push({start:s})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]}),this.onKeyLine=!0;return;case"map-value-ind":if(Ri(n.start,"explicit-key-ind"))if(n.sep)if(n.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(Ri(n.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:null,sep:[this.sourceToken]}]});else if(Dw(n.key)&&!Ri(n.sep,"newline")){const a=Du(n.start),c=n.key,l=n.sep;l.push(this.sourceToken),delete n.key,delete n.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:a,key:c,sep:l}]})}else s.length>0?n.sep=n.sep.concat(s,this.sourceToken):n.sep.push(this.sourceToken);else if(Ri(n.start,"newline"))Object.assign(n,{key:null,sep:[this.sourceToken]});else{const a=Du(n.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:a,key:null,sep:[this.sourceToken]}]})}else n.sep?n.value||i?e.items.push({start:s,key:null,sep:[this.sourceToken]}):Ri(n.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const a=this.flowScalar(this.type);i||n.value?(e.items.push({start:s,key:a,sep:[]}),this.onKeyLine=!0):n.sep?this.stack.push(a):(Object.assign(n,{key:a,sep:[]}),this.onKeyLine=!0);return}default:{const a=this.startBlockValue(e);if(a){i&&a.type!=="block-seq"&&Ri(n.start,"explicit-key-ind")&&e.items.push({start:s}),this.stack.push(a);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){var r;const n=e.items[e.items.length-1];switch(this.type){case"newline":if(n.value){const i="end"in n.value?n.value.end:void 0,s=Array.isArray(i)?i[i.length-1]:void 0;(s==null?void 0:s.type)==="comment"?i==null||i.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(n.start,e.indent)){const i=e.items[e.items.length-2],s=(r=i==null?void 0:i.value)==null?void 0:r.end;if(Array.isArray(s)){Array.prototype.push.apply(s,n.start),s.push(this.sourceToken),e.items.pop();return}}n.start.push(this.sourceToken)}return;case"anchor":case"tag":if(n.value||this.indent<=e.indent)break;n.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;n.value||Ri(n.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return}if(this.indent>e.indent){const i=this.startBlockValue(e);if(i){this.stack.push(i);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){const n=e.items[e.items.length-1];if(this.type==="flow-error-end"){let r;do yield*this.pop(),r=this.peek(1);while(r&&r.type==="flow-collection")}else if(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!n||n.sep?e.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return;case"map-value-ind":!n||n.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!n||n.value?e.items.push({start:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const i=this.flowScalar(this.type);!n||n.value?e.items.push({start:[],key:i,sep:[]}):n.sep?this.stack.push(i):Object.assign(n,{key:i,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}const r=this.startBlockValue(e);r?this.stack.push(r):(yield*this.pop(),yield*this.step())}else{const r=this.peek(2);if(r.type==="block-map"&&(this.type==="map-value-ind"&&r.indent===e.indent||this.type==="newline"&&!r.items[r.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&r.type!=="flow-collection"){const i=dd(r),s=Du(i);ww(e);const a=e.end.splice(1,e.end.length);a.push(this.sourceToken);const c={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:s,key:e,sep:a}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=c}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let n=this.source.indexOf(` +`,n)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){var r;const n=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,n.value){const i="end"in n.value?n.value.end:void 0,s=Array.isArray(i)?i[i.length-1]:void 0;(s==null?void 0:s.type)==="comment"?i==null||i.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)e.items.push({start:[this.sourceToken]});else if(n.sep)n.sep.push(this.sourceToken);else{if(this.atIndentedComment(n.start,e.indent)){const i=e.items[e.items.length-2],s=(r=i==null?void 0:i.value)==null?void 0:r.end;if(Array.isArray(s)){Array.prototype.push.apply(s,n.start),s.push(this.sourceToken),e.items.pop();return}}n.start.push(this.sourceToken)}return}if(this.indent>=e.indent){const i=!this.onKeyLine&&this.indent===e.indent&&n.sep;let s=[];if(i&&n.sep&&!n.value){const a=[];for(let c=0;ce.indent&&(a.length=0);break;default:a.length=0}}a.length>=2&&(s=n.sep.splice(a[1]))}switch(this.type){case"anchor":case"tag":i||n.value?(s.push(this.sourceToken),e.items.push({start:s}),this.onKeyLine=!0):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"explicit-key-ind":!n.sep&&!Ri(n.start,"explicit-key-ind")?n.start.push(this.sourceToken):i||n.value?(s.push(this.sourceToken),e.items.push({start:s})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]}),this.onKeyLine=!0;return;case"map-value-ind":if(Ri(n.start,"explicit-key-ind"))if(n.sep)if(n.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(Ri(n.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:null,sep:[this.sourceToken]}]});else if(Dw(n.key)&&!Ri(n.sep,"newline")){const a=Du(n.start),c=n.key,l=n.sep;l.push(this.sourceToken),delete n.key,delete n.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:a,key:c,sep:l}]})}else s.length>0?n.sep=n.sep.concat(s,this.sourceToken):n.sep.push(this.sourceToken);else if(Ri(n.start,"newline"))Object.assign(n,{key:null,sep:[this.sourceToken]});else{const a=Du(n.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:a,key:null,sep:[this.sourceToken]}]})}else n.sep?n.value||i?e.items.push({start:s,key:null,sep:[this.sourceToken]}):Ri(n.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const a=this.flowScalar(this.type);i||n.value?(e.items.push({start:s,key:a,sep:[]}),this.onKeyLine=!0):n.sep?this.stack.push(a):(Object.assign(n,{key:a,sep:[]}),this.onKeyLine=!0);return}default:{const a=this.startBlockValue(e);if(a){i&&a.type!=="block-seq"&&Ri(n.start,"explicit-key-ind")&&e.items.push({start:s}),this.stack.push(a);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){var r;const n=e.items[e.items.length-1];switch(this.type){case"newline":if(n.value){const i="end"in n.value?n.value.end:void 0,s=Array.isArray(i)?i[i.length-1]:void 0;(s==null?void 0:s.type)==="comment"?i==null||i.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(n.start,e.indent)){const i=e.items[e.items.length-2],s=(r=i==null?void 0:i.value)==null?void 0:r.end;if(Array.isArray(s)){Array.prototype.push.apply(s,n.start),s.push(this.sourceToken),e.items.pop();return}}n.start.push(this.sourceToken)}return;case"anchor":case"tag":if(n.value||this.indent<=e.indent)break;n.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;n.value||Ri(n.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return}if(this.indent>e.indent){const i=this.startBlockValue(e);if(i){this.stack.push(i);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){const n=e.items[e.items.length-1];if(this.type==="flow-error-end"){let r;do yield*this.pop(),r=this.peek(1);while(r&&r.type==="flow-collection")}else if(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!n||n.sep?e.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return;case"map-value-ind":!n||n.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!n||n.value?e.items.push({start:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const i=this.flowScalar(this.type);!n||n.value?e.items.push({start:[],key:i,sep:[]}):n.sep?this.stack.push(i):Object.assign(n,{key:i,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}const r=this.startBlockValue(e);r?this.stack.push(r):(yield*this.pop(),yield*this.step())}else{const r=this.peek(2);if(r.type==="block-map"&&(this.type==="map-value-ind"&&r.indent===e.indent||this.type==="newline"&&!r.items[r.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&r.type!=="flow-collection"){const i=hd(r),s=Du(i);ww(e);const a=e.end.splice(1,e.end.length);a.push(this.sourceToken);const c={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:s,key:e,sep:a}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=c}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let n=this.source.indexOf(` `)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(` -`,n)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;const n=dd(e),r=Du(n);return r.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r}]}}case"map-value-ind":{this.onKeyLine=!0;const n=dd(e),r=Du(n);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,n){return this.type!=="comment"||this.indent<=n?!1:e.every(r=>r.type==="newline"||r.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}}function tO(t){const e=t.prettyErrors!==!1;return{lineCounter:t.lineCounter||e&&new vw||null,prettyErrors:e}}function nO(t,e={}){const{lineCounter:n,prettyErrors:r}=tO(e),i=new kg(n==null?void 0:n.addNewLine),s=new lw(e);let a=null;for(const c of s.compose(i.parse(t),!0,t.length))if(!a)a=c;else if(a.options.logLevel!=="silent"){a.errors.push(new qc(c.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return r&&n&&(a.errors.forEach(rw(t,n)),a.warnings.forEach(rw(t,n))),a}function rO(t,e,n){let r;typeof e=="function"?r=e:n===void 0&&e&&typeof e=="object"&&(n=e);const i=nO(t,n);if(!i)return null;if(i.warnings.forEach(s=>N1(i.options.logLevel,s)),i.errors.length>0){if(i.options.logLevel!=="silent")throw i.errors[0];i.errors=[]}return i.toJS(Object.assign({reviver:r},n))}function iO(t,e,n){var i;let r=null;if(typeof e=="function"||Array.isArray(e)?r=e:n===void 0&&e&&(n=e),typeof n=="string"&&(n=n.length),typeof n=="number"){const s=Math.round(n);n=s<1?void 0:s>8?{indent:8}:{indent:s}}if(t===void 0){const{keepUndefined:s}=(i=n!=null?n:e)!=null?i:{};if(!s)return}return new Bc(t,r,n).toString(n)}function ss(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}function _w(t,e){for(var n="",r=0,i=-1,s=0,a,c=0;c<=t.length;++c){if(c2){var l=n.lastIndexOf("/");if(l!==n.length-1){l===-1?(n="",r=0):(n=n.slice(0,l),r=n.length-1-n.lastIndexOf("/")),i=c,s=0;continue}}else if(n.length===2||n.length===1){n="",r=0,i=c,s=0;continue}}e&&(n.length>0?n+="/..":n="..",r=2)}else n.length>0?n+="/"+t.slice(i+1,c):n=t.slice(i+1,c),r=c-i-1;i=c,s=0}else a===46&&s!==-1?++s:s=-1}return n}function sO(t,e){var n=e.dir||e.root,r=e.base||(e.name||"")+(e.ext||"");return n?n===e.root?n+r:n+t+r:r}var wu={resolve:function(){for(var e="",n=!1,r,i=arguments.length-1;i>=-1&&!n;i--){var s;i>=0?s=arguments[i]:(r===void 0&&(r=Go.cwd()),s=r),ss(s),s.length!==0&&(e=s+"/"+e,n=s.charCodeAt(0)===47)}return e=_w(e,!n),n?e.length>0?"/"+e:"/":e.length>0?e:"."},normalize:function(e){if(ss(e),e.length===0)return".";var n=e.charCodeAt(0)===47,r=e.charCodeAt(e.length-1)===47;return e=_w(e,!n),e.length===0&&!n&&(e="."),e.length>0&&r&&(e+="/"),n?"/"+e:e},isAbsolute:function(e){return ss(e),e.length>0&&e.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var e,n=0;n0&&(e===void 0?e=r:e+="/"+r)}return e===void 0?".":wu.normalize(e)},relative:function(e,n){if(ss(e),ss(n),e===n||(e=wu.resolve(e),n=wu.resolve(n),e===n))return"";for(var r=1;rd){if(n.charCodeAt(a+m)===47)return n.slice(a+m+1);if(m===0)return n.slice(a+m)}else s>d&&(e.charCodeAt(r+m)===47?h=m:m===0&&(h=0));break}var E=e.charCodeAt(r+m),k=n.charCodeAt(a+m);if(E!==k)break;E===47&&(h=m)}var R="";for(m=r+h+1;m<=i;++m)(m===i||e.charCodeAt(m)===47)&&(R.length===0?R+="..":R+="/..");return R.length>0?R+n.slice(a+h):(a+=h,n.charCodeAt(a)===47&&++a,n.slice(a))},_makeLong:function(e){return e},dirname:function(e){if(ss(e),e.length===0)return".";for(var n=e.charCodeAt(0),r=n===47,i=-1,s=!0,a=e.length-1;a>=1;--a)if(n=e.charCodeAt(a),n===47){if(!s){i=a;break}}else s=!1;return i===-1?r?"/":".":r&&i===1?"//":e.slice(0,i)},basename:function(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');ss(e);var r=0,i=-1,s=!0,a;if(n!==void 0&&n.length>0&&n.length<=e.length){if(n.length===e.length&&n===e)return"";var c=n.length-1,l=-1;for(a=e.length-1;a>=0;--a){var d=e.charCodeAt(a);if(d===47){if(!s){r=a+1;break}}else l===-1&&(s=!1,l=a+1),c>=0&&(d===n.charCodeAt(c)?--c===-1&&(i=a):(c=-1,i=l))}return r===i?i=l:i===-1&&(i=e.length),e.slice(r,i)}else{for(a=e.length-1;a>=0;--a)if(e.charCodeAt(a)===47){if(!s){r=a+1;break}}else i===-1&&(s=!1,i=a+1);return i===-1?"":e.slice(r,i)}},extname:function(e){ss(e);for(var n=-1,r=0,i=-1,s=!0,a=0,c=e.length-1;c>=0;--c){var l=e.charCodeAt(c);if(l===47){if(!s){r=c+1;break}continue}i===-1&&(s=!1,i=c+1),l===46?n===-1?n=c:a!==1&&(a=1):n!==-1&&(a=-1)}return n===-1||i===-1||a===0||a===1&&n===i-1&&n===r+1?"":e.slice(n,i)},format:function(e){if(e===null||typeof e!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return sO("/",e)},parse:function(e){ss(e);var n={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return n;var r=e.charCodeAt(0),i=r===47,s;i?(n.root="/",s=1):s=0;for(var a=-1,c=0,l=-1,d=!0,h=e.length-1,m=0;h>=s;--h){if(r=e.charCodeAt(h),r===47){if(!d){c=h+1;break}continue}l===-1&&(d=!1,l=h+1),r===46?a===-1?a=h:m!==1&&(m=1):a!==-1&&(m=-1)}return a===-1||l===-1||m===0||m===1&&a===l-1&&a===c+1?l!==-1&&(c===0&&i?n.base=n.name=e.slice(1,l):n.base=n.name=e.slice(c,l)):(c===0&&i?(n.name=e.slice(1,a),n.base=e.slice(1,l)):(n.name=e.slice(c,a),n.base=e.slice(c,l)),n.ext=e.slice(a,l)),c>0?n.dir=e.slice(0,c-1):i&&(n.dir="/"),n},sep:"/",delimiter:":",win32:null,posix:null};wu.posix=wu;var na=wu;function Hc(t,e){if(t===e)return!0;if(t==null||e===null||e===void 0||typeof t!=typeof e||typeof t!="object"||Array.isArray(t)!==Array.isArray(e))return!1;let n,r;if(Array.isArray(t)){if(t.length!==e.length)return!1;for(n=0;n=pd&&t<=hO?t-pd+10:0)}function pO(t){if(t[0]==="#")switch(t.length){case 4:return{red:Bn(t.charCodeAt(1))*17/255,green:Bn(t.charCodeAt(2))*17/255,blue:Bn(t.charCodeAt(3))*17/255,alpha:1};case 5:return{red:Bn(t.charCodeAt(1))*17/255,green:Bn(t.charCodeAt(2))*17/255,blue:Bn(t.charCodeAt(3))*17/255,alpha:Bn(t.charCodeAt(4))*17/255};case 7:return{red:(Bn(t.charCodeAt(1))*16+Bn(t.charCodeAt(2)))/255,green:(Bn(t.charCodeAt(3))*16+Bn(t.charCodeAt(4)))/255,blue:(Bn(t.charCodeAt(5))*16+Bn(t.charCodeAt(6)))/255,alpha:1};case 9:return{red:(Bn(t.charCodeAt(1))*16+Bn(t.charCodeAt(2)))/255,green:(Bn(t.charCodeAt(3))*16+Bn(t.charCodeAt(4)))/255,blue:(Bn(t.charCodeAt(5))*16+Bn(t.charCodeAt(6)))/255,alpha:(Bn(t.charCodeAt(7))*16+Bn(t.charCodeAt(8)))/255}}}var mO=function(){function t(e){this.schemaService=e}return t.prototype.findDocumentSymbols=function(e,n,r){var i=this;r===void 0&&(r={resultLimit:Number.MAX_VALUE});var s=n.root;if(!s)return[];var a=r.resultLimit||Number.MAX_VALUE,c=e.uri;if((c==="vscode://defaultsettings/keybindings.json"||Km(c.toLowerCase(),"/user/keybindings.json"))&&s.type==="array"){for(var l=[],d=0,h=s.items;d0){a--;var M=Ko.create(e.uri,uo(e,q)),I=$?$+"."+q.keyNode.value:q.keyNode.value;y.push({name:i.getKeyLabel(q),kind:i.getSymbolKind(F.type),location:M,containerName:$}),A.push({node:F,containerName:I})}else S=!0})};N0){a--;var I=uo(e,F),Y=I,K=String(M),ne={name:K,kind:i.getSymbolKind(F.type),range:I,selectionRange:Y,children:[]};q.push(ne),S.push({result:ne.children,node:F})}else D=!0}):$.type==="object"&&$.properties.forEach(function(F){var M=F.valueNode;if(M)if(a>0){a--;var I=uo(e,F),Y=uo(e,F.keyNode),K=[],ne={name:i.getKeyLabel(F),kind:i.getSymbolKind(M.type),range:I,selectionRange:Y,children:K,detail:i.getDetail(M)};q.push(ne),S.push({result:K,node:M})}else D=!0})};y=t)return n;return e.documents.length===1?e.documents[0]:null}function Ow(t){const e=["mapping","scalar","sequence"];return t?t.filter(n=>{if(typeof n=="string"){const r=n.split(" "),i=r[1]&&r[1].toLowerCase()||"scalar";return i==="map"?!1:e.indexOf(i)!==-1}return!1}):[]}function Pw(t,e){if(!e||!t||e.length!==t.length)return!1;for(let n=t.length-1;n>=0;n--)if(t[n]!==e[n])return!1;return!0}const It=$s.loadMessageBundle(),Fg="Property {0} is not allowed.",$O={"color-hex":{errorMessage:It("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:It("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:It("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:It("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:It("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,}))$/},ipv4:{errorMessage:It("ipv4FormatWarning","String does not match IPv4 format."),pattern:/^((25[0-5]|(2[0-4]|1\d|[1-9]|)\d)\.?\b){4}$/},ipv6:{errorMessage:It("ipv6FormatWarning","String does not match IPv6 format."),pattern:/^([0-9a-f]|:){1,4}(:([0-9a-f]{0,4})*){1,7}$/i}},gd="YAML",Nw="yaml-schema: ";var $r;(function(t){t.missingRequiredPropWarning="missingRequiredPropWarning",t.typeMismatchWarning="typeMismatchWarning",t.constWarning="constWarning"})($r||($r={}));const EO={[$r.missingRequiredPropWarning]:'Missing property "{0}".',[$r.typeMismatchWarning]:'Incorrect type. Expected "{0}".',[$r.constWarning]:"Value must be {0}."};class ia{constructor(e,n,r,i){this.offset=r,this.length=i,this.parent=e,this.internalNode=n}getNodeFromOffsetEndInclusive(e){const n=[],r=c=>{if(e>=c.offset&&e<=c.offset+c.length){const l=c.children;for(let d=0;dJSON.stringify(r)).join(", ")))}}mergeWarningGeneric(e,n){var r,i,s;if((r=this.problems)!=null&&r.length)for(const a of n){const c=this.problems.filter(l=>l.problemType===a);for(const l of c){const d=(i=e.problems)==null?void 0:i.find(h=>h.problemType===a&&l.location.offset===h.location.offset&&(a!==$r.missingRequiredPropWarning||Pw(h.problemArgs,l.problemArgs)));d&&((s=d.problemArgs)!=null&&s.length&&(d.problemArgs.filter(h=>!l.problemArgs.includes(h)).forEach(h=>l.problemArgs.push(h)),l.message=vd(l.problemType,l.problemArgs)),this.mergeSources(d,l))}}}mergePropertyMatch(e){this.merge(e),this.propertiesMatches++,(e.enumValueMatch||!e.hasProblems()&&e.propertiesMatches)&&this.propertiesValueMatches++,e.enumValueMatch&&e.enumValues&&this.primaryValueMatches++}mergeSources(e,n){const r=e.source.replace(Nw,"");n.source.includes(r)||(n.source=n.source+" | "+r),n.schemaUri.includes(e.schemaUri[0])||(n.schemaUri=n.schemaUri.concat(e.schemaUri))}compareGeneric(e){const n=this.hasProblems();return n!==e.hasProblems()?n?-1:1:this.enumValueMatch!==e.enumValueMatch?e.enumValueMatch?-1:1:this.propertiesValueMatches!==e.propertiesValueMatches?this.propertiesValueMatches-e.propertiesValueMatches:this.primaryValueMatches!==e.primaryValueMatches?this.primaryValueMatches-e.primaryValueMatches:this.propertiesMatches-e.propertiesMatches}compareKubernetes(e){const n=this.hasProblems();return this.propertiesMatches!==e.propertiesMatches?this.propertiesMatches-e.propertiesMatches:this.enumValueMatch!==e.enumValueMatch?e.enumValueMatch?-1:1:this.primaryValueMatches!==e.primaryValueMatches?this.primaryValueMatches-e.primaryValueMatches:this.propertiesValueMatches!==e.propertiesValueMatches?this.propertiesValueMatches-e.propertiesValueMatches:n!==e.hasProblems()?n?-1:1:this.propertiesMatches-e.propertiesMatches}}function Yc(t){switch(t.type){case"array":return t.children.map(Yc);case"object":{const e=Object.create(null);for(let n=0,r=t.children;n=t.offset&&e<=t.offset+t.length||n&&e===t.offset+t.length}function Iw(t,e,n){if(n===void 0&&(n=!1),Rw(t,e,n)){const r=t.children;if(Array.isArray(r))for(let i=0;i{let i=e(r);const s=r.children;if(Array.isArray(s))for(let a=0;a{const s=ot.create(e.positionAt(i.location.offset),e.positionAt(i.location.offset+i.location.length)),a=Nr.create(s,i.message,i.severity,i.code?i.code:Ir.Undefined,i.source);return a.data={schemaUri:i.schemaUri,...i.data},a})}return null}getMatchingSchemas(e,n=-1,r=null,i){const s=new Rg(n,r);return this.root&&e&&ar(this.root,e,e,new Mr(this.isKubernetes),s,{isKubernetes:this.isKubernetes,disableAdditionalProperties:this.disableAdditionalProperties,uri:this.uri,callFromAutoComplete:i}),s.schemas}}function ar(t,e,n,r,i,s){const{isKubernetes:a,callFromAutoComplete:c}=s;if(!t||typeof e!="object")return;switch(e.url||(e.url=n.url),e.closestTitle=e.title||n.closestTitle,t.type){case"object":E(t,e,r,i);break;case"array":m(t,e,r,i);break;case"string":h(t,e,r);break;case"number":d(t,e,r);break;case"property":return ar(t.valueNode,e,e,r,i,s)}l(),i.add({node:t,schema:e});function l(){function P(v){return t.type===v||v==="integer"&&t.type==="number"&&t.isInteger}if(Array.isArray(e.type))e.type.some(P)||r.problems.push({location:{offset:t.offset,length:t.length},severity:Dt.Warning,message:e.errorMessage||It("typeArrayMismatchWarning","Incorrect type. Expected one of {0}.",e.type.join(", ")),source:Zt(e,n),schemaUri:en(e,n)});else if(e.type&&!P(e.type)){const v=e.type==="object"?Ag(e):e.type;r.problems.push({location:{offset:t.offset,length:t.length},severity:Dt.Warning,message:e.errorMessage||vd($r.typeMismatchWarning,[v]),source:Zt(e,n),schemaUri:en(e,n),problemType:$r.typeMismatchWarning,problemArgs:[v]})}if(Array.isArray(e.allOf))for(const v of e.allOf)ar(t,Er(v),e,r,i,s);const A=Er(e.not);if(A){const v=new Mr(a),_=i.newSub();ar(t,A,e,v,_,s),v.hasProblems()||r.problems.push({location:{offset:t.offset,length:t.length},severity:Dt.Warning,message:It("notSchemaWarning","Matches a schema that is not allowed."),source:Zt(e,n),schemaUri:en(e,n)});for(const $ of _.schemas)$.inverted=!$.inverted,i.add($)}const N=(v,_)=>{var I;const $=[],q=[],F=[];let M=null;for(const Y of v){const K={...Er(Y)},ne=new Mr(a),ge=i.newSub();ar(t,K,e,ne,ge,s),(!ne.hasProblems()||c)&&($.push(K),q.push(K),ne.propertiesMatches===0&&F.push(K),K.format&&q.pop()),M?a?M=k(ne,M,K,ge):M=R(t,_,ne,M,K,ge):M={schema:K,validationResult:ne,matchingSchemas:ge}}return q.length>1&&(q.length>1||F.length===0)&&_&&r.problems.push({location:{offset:t.offset,length:1},severity:Dt.Warning,message:It("oneOfWarning","Matches multiple schemas when only one must validate."),source:Zt(e,n),schemaUri:en(e,n)}),M!==null&&(r.merge(M.validationResult),r.propertiesMatches+=M.validationResult.propertiesMatches,r.propertiesValueMatches+=M.validationResult.propertiesValueMatches,r.enumValueMatch=r.enumValueMatch||M.validationResult.enumValueMatch,(I=M.validationResult.enumValues)!=null&&I.length&&(r.enumValues=(r.enumValues||[]).concat(M.validationResult.enumValues)),i.merge(M.matchingSchemas)),$.length};Array.isArray(e.anyOf)&&N(e.anyOf,!1),Array.isArray(e.oneOf)&&N(e.oneOf,!0);const S=(v,_)=>{const $=new Mr(a),q=i.newSub();ar(t,Er(v),_,$,q,s),r.merge($),r.propertiesMatches+=$.propertiesMatches,r.propertiesValueMatches+=$.propertiesValueMatches,i.merge(q)},y=(v,_,$,q)=>{const F=Er(v),M=new Mr(a),I=i.newSub();ar(t,F,_,M,I,s),i.merge(I);const{filePatternAssociation:Y}=F;Y&&(new GI(Y).matchesPattern(s.uri)||M.problems.push({location:{offset:t.offset,length:t.length},severity:Dt.Warning,message:It("ifFilePatternAssociation",`filePatternAssociation '${Y}' does not match with doc uri '${s.uri}'.`),source:Zt(e,_),schemaUri:en(e,_)})),M.hasProblems()?q&&S(q,_):$&&S($,_)},D=Er(e.if);if(D&&y(D,e,Er(e.then),Er(e.else)),Array.isArray(e.enum)){const v=Yc(t);let _=!1;for(const $ of e.enum)if(Hc(v,$)||c&&$u(v)&&$u($)&&v&&$.startsWith(v)){_=!0;break}r.enumValues=e.enum,r.enumValueMatch=_,_||r.problems.push({location:{offset:t.offset,length:t.length},severity:Dt.Warning,code:Ir.EnumValueMismatch,message:e.errorMessage||It("enumWarning","Value is not accepted. Valid values: {0}.",e.enum.map($=>JSON.stringify($)).join(", ")),source:Zt(e,n),schemaUri:en(e,n),data:{values:e.enum}})}if(ra(e.const)){const v=Yc(t);!Hc(v,e.const)&&!(c&&$u(v)&&$u(e.const)&&e.const.startsWith(v))?(r.problems.push({location:{offset:t.offset,length:t.length},severity:Dt.Warning,code:Ir.EnumValueMismatch,problemType:$r.constWarning,message:e.errorMessage||vd($r.constWarning,[JSON.stringify(e.const)]),source:Zt(e,n),schemaUri:en(e,n),problemArgs:[JSON.stringify(e.const)],data:{values:[e.const]}}),r.enumValueMatch=!1):r.enumValueMatch=!0,r.enumValues=[e.const]}e.deprecationMessage&&t.parent&&r.problems.push({location:{offset:t.parent.offset,length:t.parent.length},severity:Dt.Warning,message:e.deprecationMessage,source:Zt(e,n),schemaUri:en(e,n)})}function d(P,A,N){const S=P.value;fi(A.multipleOf)&&S%A.multipleOf!==0&&N.problems.push({location:{offset:P.offset,length:P.length},severity:Dt.Warning,message:It("multipleOfWarning","Value is not divisible by {0}.",A.multipleOf),source:Zt(A,n),schemaUri:en(A,n)});function y(F,M){if(fi(M))return M;if(_u(M)&&M)return F}function D(F,M){if(!_u(M)||!M)return F}const v=y(A.minimum,A.exclusiveMinimum);fi(v)&&S<=v&&N.problems.push({location:{offset:P.offset,length:P.length},severity:Dt.Warning,message:It("exclusiveMinimumWarning","Value is below the exclusive minimum of {0}.",v),source:Zt(A,n),schemaUri:en(A,n)});const _=y(A.maximum,A.exclusiveMaximum);fi(_)&&S>=_&&N.problems.push({location:{offset:P.offset,length:P.length},severity:Dt.Warning,message:It("exclusiveMaximumWarning","Value is above the exclusive maximum of {0}.",_),source:Zt(A,n),schemaUri:en(A,n)});const $=D(A.minimum,A.exclusiveMinimum);fi($)&&S<$&&N.problems.push({location:{offset:P.offset,length:P.length},severity:Dt.Warning,message:It("minimumWarning","Value is below the minimum of {0}.",$),source:Zt(A,n),schemaUri:en(A,n)});const q=D(A.maximum,A.exclusiveMaximum);fi(q)&&S>q&&N.problems.push({location:{offset:P.offset,length:P.length},severity:Dt.Warning,message:It("maximumWarning","Value is above the maximum of {0}.",q),source:Zt(A,n),schemaUri:en(A,n)})}function h(P,A,N){if(fi(A.minLength)&&P.value.lengthA.maxLength&&N.problems.push({location:{offset:P.offset,length:P.length},severity:Dt.Warning,message:It("maxLengthWarning","String is longer than the maximum length of {0}.",A.maxLength),source:Zt(A,n),schemaUri:en(A,n)}),$u(A.pattern)&&($1(A.pattern).test(P.value)||N.problems.push({location:{offset:P.offset,length:P.length},severity:Dt.Warning,message:A.patternErrorMessage||A.errorMessage||It("patternWarning",'String does not match the pattern of "{0}".',A.pattern),source:Zt(A,n),schemaUri:en(A,n)})),A.format)switch(A.format){case"uri":case"uri-reference":{let S;if(!P.value)S=It("uriEmpty","URI expected.");else try{!Yr.parse(P.value).scheme&&A.format==="uri"&&(S=It("uriSchemeMissing","URI with a scheme is expected."))}catch(y){S=y.message}S&&N.problems.push({location:{offset:P.offset,length:P.length},severity:Dt.Warning,message:A.patternErrorMessage||A.errorMessage||It("uriFormatWarning","String is not a URI: {0}",S),source:Zt(A,n),schemaUri:en(A,n)})}break;case"color-hex":case"date-time":case"date":case"time":case"email":case"ipv4":case"ipv6":{const S=$O[A.format];(!P.value||!S.pattern.test(P.value))&&N.problems.push({location:{offset:P.offset,length:P.length},severity:Dt.Warning,message:A.patternErrorMessage||A.errorMessage||S.errorMessage,source:Zt(A,n),schemaUri:en(A,n)})}break}}function m(P,A,N,S){if(Array.isArray(A.items)){const D=A.items;for(let v=0;v=D.length&&N.propertiesValueMatches++}if(P.items.length>D.length)if(typeof A.additionalItems=="object")for(let v=D.length;v{if(D.oneOf&&D.oneOf.length===1){const $=D.oneOf[0],q={...Er($)};q.title=A.title,q.closestTitle=A.closestTitle,ar(_,q,A,v,S,s),N.mergePropertyMatch(v),N.mergeEnumValues(v)}else ar(_,D,A,v,S,s),N.mergePropertyMatch(v),N.mergeEnumValues(v)})}}const y=Er(A.contains);if(y&&(P.items.some(v=>{const _=new Mr(a);return ar(v,y,A,_,zc.instance,s),!_.hasProblems()})||N.problems.push({location:{offset:P.offset,length:P.length},severity:Dt.Warning,message:A.errorMessage||It("requiredItemMissingWarning","Array does not contain required item."),source:Zt(A,n),schemaUri:en(A,n)})),fi(A.minItems)&&P.items.lengthA.maxItems&&N.problems.push({location:{offset:P.offset,length:P.length},severity:Dt.Warning,message:It("maxItemsWarning","Array has too many items. Expected {0} or fewer.",A.maxItems),source:Zt(A,n),schemaUri:en(A,n)}),A.uniqueItems===!0){const D=Yc(P);D.some((_,$)=>$!==D.lastIndexOf(_))&&N.problems.push({location:{offset:P.offset,length:P.length},severity:Dt.Warning,message:It("uniqueItemsWarning","Array has duplicate items."),source:Zt(A,n),schemaUri:en(A,n)})}}function E(P,A,N,S){var q;const y=Object.create(null),D=[],v=[...P.properties];for(;v.length>0;){const F=v.pop(),M=F.keyNode.value;if(M==="<<"&&F.valueNode)switch(F.valueNode.type){case"object":{v.push(...F.valueNode.properties);break}case"array":{F.valueNode.items.forEach(I=>{I&&oO(I.properties)&&v.push(...I.properties)});break}}else y[M]=F.valueNode,D.push(M)}if(Array.isArray(A.required)){for(const F of A.required)if(y[F]===void 0){const M=P.parent&&P.parent.type==="property"&&P.parent.keyNode,I=M?{offset:M.offset,length:M.length}:{offset:P.offset,length:1};N.problems.push({location:I,severity:Dt.Warning,message:vd($r.missingRequiredPropWarning,[F]),source:Zt(A,n),schemaUri:en(A,n),problemArgs:[F],problemType:$r.missingRequiredPropWarning})}}const _=F=>{let M=D.indexOf(F);for(;M>=0;)D.splice(M,1),M=D.indexOf(F)};if(A.properties)for(const F of Object.keys(A.properties)){_(F);const M=A.properties[F],I=y[F];if(I)if(_u(M))if(M)N.propertiesMatches++,N.propertiesValueMatches++;else{const Y=I.parent;N.problems.push({location:{offset:Y.keyNode.offset,length:Y.keyNode.length},severity:Dt.Warning,message:A.errorMessage||It("DisallowedExtraPropWarning",Fg,F),source:Zt(A,n),schemaUri:en(A,n)})}else{M.url=(q=A.url)!=null?q:n.url;const Y=new Mr(a);ar(I,M,A,Y,S,s),N.mergePropertyMatch(Y),N.mergeEnumValues(Y)}}if(A.patternProperties)for(const F of Object.keys(A.patternProperties)){const M=$1(F);for(const I of D.slice(0))if(M.test(I)){_(I);const Y=y[I];if(Y){const K=A.patternProperties[F];if(_u(K))if(K)N.propertiesMatches++,N.propertiesValueMatches++;else{const ne=Y.parent;N.problems.push({location:{offset:ne.keyNode.offset,length:ne.keyNode.length},severity:Dt.Warning,message:A.errorMessage||It("DisallowedExtraPropWarning",Fg,I),source:Zt(A,n),schemaUri:en(A,n)})}else{const ne=new Mr(a);ar(Y,K,A,ne,S,s),N.mergePropertyMatch(ne),N.mergeEnumValues(ne)}}}}if(typeof A.additionalProperties=="object")for(const F of D){const M=y[F];if(M){const I=new Mr(a);ar(M,A.additionalProperties,A,I,S,s),N.mergePropertyMatch(I),N.mergeEnumValues(I)}}else if((A.additionalProperties===!1||A.type==="object"&&A.additionalProperties===void 0&&s.disableAdditionalProperties===!0)&&D.length>0){const F=A.properties&&Object.keys(A.properties).filter(M=>!y[M]);for(const M of D){const I=y[M];if(I){let Y=null;I.type!=="property"?(Y=I.parent,Y.type==="object"&&(Y=Y.properties[0])):Y=I;const K={location:{offset:Y.keyNode.offset,length:Y.keyNode.length},severity:Dt.Warning,code:Ir.PropertyExpected,message:A.errorMessage||It("DisallowedExtraPropWarning",Fg,M),source:Zt(A,n),schemaUri:en(A,n)};F!=null&&F.length&&(K.data={properties:F}),N.problems.push(K)}}}if(fi(A.maxProperties)&&P.properties.length>A.maxProperties&&N.problems.push({location:{offset:P.offset,length:P.length},severity:Dt.Warning,message:It("MaxPropWarning","Object has more properties than limit of {0}.",A.maxProperties),source:Zt(A,n),schemaUri:en(A,n)}),fi(A.minProperties)&&P.properties.length0?A={schema:N,validationResult:P,matchingSchemas:S}:y===0&&(A.matchingSchemas.merge(S),A.validationResult.mergeEnumValues(P)),A}function R(P,A,N,S,y,D){if(!A&&!N.hasProblems()&&(!S.validationResult.hasProblems()||c))S.matchingSchemas.merge(D),S.validationResult.propertiesMatches+=N.propertiesMatches,S.validationResult.propertiesValueMatches+=N.propertiesValueMatches;else{const v=N.compareGeneric(S.validationResult);v>0||v===0&&A&&S.schema.type==="object"&&P.type!=="null"&&P.type!==S.schema.type?S={schema:y,validationResult:N,matchingSchemas:D}:v===0&&(S.matchingSchemas.merge(D),S.validationResult.mergeEnumValues(N),S.validationResult.mergeWarningGeneric(N,[$r.missingRequiredPropWarning,$r.typeMismatchWarning,$r.constWarning]))}return S}}function Zt(t,e){var n;if(t){let r;if(t.title)r=t.title;else if(t.closestTitle)r=t.closestTitle;else if(e.closestTitle)r=e.closestTitle;else{const i=(n=t.url)!=null?n:e.url;if(i){const s=Yr.parse(i);s.scheme==="file"&&(r=s.fsPath),r=s.toString()}}if(r)return`${Nw}${r}`}return gd}function en(t,e){var r;const n=(r=t.url)!=null?r:e.url;return n?[n]:[]}function vd(t,e){return It(t,EO[t],e.join(" | "))}const NO=1e3;let Ig=0;const Mg=new Set;function Eu(t,e,n,r){if(t||(Ig=0),!e)return null;if(Nn(e))return FO(e,t,n,r);if(Xt(e))return RO(e,t,n,r);if(xn(e))return IO(e,t,n,r);if(yt(e))return MO(e,t);if(ts(e)&&!Mg.has(e)&&Ig=n&&(n=r.value.range[2]));return[e,n,n]}function xO(t,e){let n;if(gn(t,(r,i,s)=>{if(i===e)return n=s[s.length-1],gn.BREAK}),!Kf(n))return n}function BO(t){if(t.items.length>1)return!1;const e=t.items[0];return yt(e.key)&&yt(e.value)&&e.key.value===""&&!e.value.value}function qO(t,e){for(const[n,r]of t.items.entries())if(e===r)return n}function WO(t,e){let n=!1;for(const r of t){if(r.type==="document")Lg([],r,i=>{var s;if(Lw(i)&&((s=i.value)==null?void 0:s.type)==="comment"){if(r.offset<=e&&i.value.source.length+i.value.offset>=e)return n=!0,gn.BREAK}else if(i.type==="comment"&&i.offset<=e&&i.offset+i.source.length>=e)return n=!0,gn.BREAK});else if(r.type==="comment"&&r.offset<=e&&r.source.length+r.offset>=e)return!0;if(n)break}return n}function Lw(t){return t.start!==void 0}function Lg(t,e,n){let r=n(e,t);if(typeof r=="symbol")return r;for(const s of["key","value"]){const a=e[s];if(a&&"items"in a){for(let c=0;cr.type==="newline"||r.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}}function tO(t){const e=t.prettyErrors!==!1;return{lineCounter:t.lineCounter||e&&new vw||null,prettyErrors:e}}function nO(t,e={}){const{lineCounter:n,prettyErrors:r}=tO(e),i=new Tg(n==null?void 0:n.addNewLine),s=new lw(e);let a=null;for(const c of s.compose(i.parse(t),!0,t.length))if(!a)a=c;else if(a.options.logLevel!=="silent"){a.errors.push(new qc(c.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return r&&n&&(a.errors.forEach(rw(t,n)),a.warnings.forEach(rw(t,n))),a}function rO(t,e,n){let r;typeof e=="function"?r=e:n===void 0&&e&&typeof e=="object"&&(n=e);const i=nO(t,n);if(!i)return null;if(i.warnings.forEach(s=>N1(i.options.logLevel,s)),i.errors.length>0){if(i.options.logLevel!=="silent")throw i.errors[0];i.errors=[]}return i.toJS(Object.assign({reviver:r},n))}function iO(t,e,n){var i;let r=null;if(typeof e=="function"||Array.isArray(e)?r=e:n===void 0&&e&&(n=e),typeof n=="string"&&(n=n.length),typeof n=="number"){const s=Math.round(n);n=s<1?void 0:s>8?{indent:8}:{indent:s}}if(t===void 0){const{keepUndefined:s}=(i=n!=null?n:e)!=null?i:{};if(!s)return}return new Bc(t,r,n).toString(n)}function ss(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}function _w(t,e){for(var n="",r=0,i=-1,s=0,a,c=0;c<=t.length;++c){if(c2){var l=n.lastIndexOf("/");if(l!==n.length-1){l===-1?(n="",r=0):(n=n.slice(0,l),r=n.length-1-n.lastIndexOf("/")),i=c,s=0;continue}}else if(n.length===2||n.length===1){n="",r=0,i=c,s=0;continue}}e&&(n.length>0?n+="/..":n="..",r=2)}else n.length>0?n+="/"+t.slice(i+1,c):n=t.slice(i+1,c),r=c-i-1;i=c,s=0}else a===46&&s!==-1?++s:s=-1}return n}function sO(t,e){var n=e.dir||e.root,r=e.base||(e.name||"")+(e.ext||"");return n?n===e.root?n+r:n+t+r:r}var wu={resolve:function(){for(var e="",n=!1,r,i=arguments.length-1;i>=-1&&!n;i--){var s;i>=0?s=arguments[i]:(r===void 0&&(r=Go.cwd()),s=r),ss(s),s.length!==0&&(e=s+"/"+e,n=s.charCodeAt(0)===47)}return e=_w(e,!n),n?e.length>0?"/"+e:"/":e.length>0?e:"."},normalize:function(e){if(ss(e),e.length===0)return".";var n=e.charCodeAt(0)===47,r=e.charCodeAt(e.length-1)===47;return e=_w(e,!n),e.length===0&&!n&&(e="."),e.length>0&&r&&(e+="/"),n?"/"+e:e},isAbsolute:function(e){return ss(e),e.length>0&&e.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var e,n=0;n0&&(e===void 0?e=r:e+="/"+r)}return e===void 0?".":wu.normalize(e)},relative:function(e,n){if(ss(e),ss(n),e===n||(e=wu.resolve(e),n=wu.resolve(n),e===n))return"";for(var r=1;rd){if(n.charCodeAt(a+m)===47)return n.slice(a+m+1);if(m===0)return n.slice(a+m)}else s>d&&(e.charCodeAt(r+m)===47?h=m:m===0&&(h=0));break}var E=e.charCodeAt(r+m),T=n.charCodeAt(a+m);if(E!==T)break;E===47&&(h=m)}var R="";for(m=r+h+1;m<=i;++m)(m===i||e.charCodeAt(m)===47)&&(R.length===0?R+="..":R+="/..");return R.length>0?R+n.slice(a+h):(a+=h,n.charCodeAt(a)===47&&++a,n.slice(a))},_makeLong:function(e){return e},dirname:function(e){if(ss(e),e.length===0)return".";for(var n=e.charCodeAt(0),r=n===47,i=-1,s=!0,a=e.length-1;a>=1;--a)if(n=e.charCodeAt(a),n===47){if(!s){i=a;break}}else s=!1;return i===-1?r?"/":".":r&&i===1?"//":e.slice(0,i)},basename:function(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');ss(e);var r=0,i=-1,s=!0,a;if(n!==void 0&&n.length>0&&n.length<=e.length){if(n.length===e.length&&n===e)return"";var c=n.length-1,l=-1;for(a=e.length-1;a>=0;--a){var d=e.charCodeAt(a);if(d===47){if(!s){r=a+1;break}}else l===-1&&(s=!1,l=a+1),c>=0&&(d===n.charCodeAt(c)?--c===-1&&(i=a):(c=-1,i=l))}return r===i?i=l:i===-1&&(i=e.length),e.slice(r,i)}else{for(a=e.length-1;a>=0;--a)if(e.charCodeAt(a)===47){if(!s){r=a+1;break}}else i===-1&&(s=!1,i=a+1);return i===-1?"":e.slice(r,i)}},extname:function(e){ss(e);for(var n=-1,r=0,i=-1,s=!0,a=0,c=e.length-1;c>=0;--c){var l=e.charCodeAt(c);if(l===47){if(!s){r=c+1;break}continue}i===-1&&(s=!1,i=c+1),l===46?n===-1?n=c:a!==1&&(a=1):n!==-1&&(a=-1)}return n===-1||i===-1||a===0||a===1&&n===i-1&&n===r+1?"":e.slice(n,i)},format:function(e){if(e===null||typeof e!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return sO("/",e)},parse:function(e){ss(e);var n={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return n;var r=e.charCodeAt(0),i=r===47,s;i?(n.root="/",s=1):s=0;for(var a=-1,c=0,l=-1,d=!0,h=e.length-1,m=0;h>=s;--h){if(r=e.charCodeAt(h),r===47){if(!d){c=h+1;break}continue}l===-1&&(d=!1,l=h+1),r===46?a===-1?a=h:m!==1&&(m=1):a!==-1&&(m=-1)}return a===-1||l===-1||m===0||m===1&&a===l-1&&a===c+1?l!==-1&&(c===0&&i?n.base=n.name=e.slice(1,l):n.base=n.name=e.slice(c,l)):(c===0&&i?(n.name=e.slice(1,a),n.base=e.slice(1,l)):(n.name=e.slice(c,a),n.base=e.slice(c,l)),n.ext=e.slice(a,l)),c>0?n.dir=e.slice(0,c-1):i&&(n.dir="/"),n},sep:"/",delimiter:":",win32:null,posix:null};wu.posix=wu;var na=wu;function Hc(t,e){if(t===e)return!0;if(t==null||e===null||e===void 0||typeof t!=typeof e||typeof t!="object"||Array.isArray(t)!==Array.isArray(e))return!1;let n,r;if(Array.isArray(t)){if(t.length!==e.length)return!1;for(n=0;n=md&&t<=hO?t-md+10:0)}function pO(t){if(t[0]==="#")switch(t.length){case 4:return{red:Bn(t.charCodeAt(1))*17/255,green:Bn(t.charCodeAt(2))*17/255,blue:Bn(t.charCodeAt(3))*17/255,alpha:1};case 5:return{red:Bn(t.charCodeAt(1))*17/255,green:Bn(t.charCodeAt(2))*17/255,blue:Bn(t.charCodeAt(3))*17/255,alpha:Bn(t.charCodeAt(4))*17/255};case 7:return{red:(Bn(t.charCodeAt(1))*16+Bn(t.charCodeAt(2)))/255,green:(Bn(t.charCodeAt(3))*16+Bn(t.charCodeAt(4)))/255,blue:(Bn(t.charCodeAt(5))*16+Bn(t.charCodeAt(6)))/255,alpha:1};case 9:return{red:(Bn(t.charCodeAt(1))*16+Bn(t.charCodeAt(2)))/255,green:(Bn(t.charCodeAt(3))*16+Bn(t.charCodeAt(4)))/255,blue:(Bn(t.charCodeAt(5))*16+Bn(t.charCodeAt(6)))/255,alpha:(Bn(t.charCodeAt(7))*16+Bn(t.charCodeAt(8)))/255}}}var mO=function(){function t(e){this.schemaService=e}return t.prototype.findDocumentSymbols=function(e,n,r){var i=this;r===void 0&&(r={resultLimit:Number.MAX_VALUE});var s=n.root;if(!s)return[];var a=r.resultLimit||Number.MAX_VALUE,c=e.uri;if((c==="vscode://defaultsettings/keybindings.json"||Km(c.toLowerCase(),"/user/keybindings.json"))&&s.type==="array"){for(var l=[],d=0,h=s.items;d0){a--;var M=Ko.create(e.uri,uo(e,q)),I=$?$+"."+q.keyNode.value:q.keyNode.value;y.push({name:i.getKeyLabel(q),kind:i.getSymbolKind(N.type),location:M,containerName:$}),A.push({node:N,containerName:I})}else S=!0})};F0){a--;var I=uo(e,N),Y=I,K=String(M),ne={name:K,kind:i.getSymbolKind(N.type),range:I,selectionRange:Y,children:[]};q.push(ne),S.push({result:ne.children,node:N})}else D=!0}):$.type==="object"&&$.properties.forEach(function(N){var M=N.valueNode;if(M)if(a>0){a--;var I=uo(e,N),Y=uo(e,N.keyNode),K=[],ne={name:i.getKeyLabel(N),kind:i.getSymbolKind(M.type),range:I,selectionRange:Y,children:K,detail:i.getDetail(M)};q.push(ne),S.push({result:K,node:M})}else D=!0})};y=t)return n;return e.documents.length===1?e.documents[0]:null}function Ow(t){const e=["mapping","scalar","sequence"];return t?t.filter(n=>{if(typeof n=="string"){const r=n.split(" "),i=r[1]&&r[1].toLowerCase()||"scalar";return i==="map"?!1:e.indexOf(i)!==-1}return!1}):[]}function Pw(t,e){if(!e||!t||e.length!==t.length)return!1;for(let n=t.length-1;n>=0;n--)if(t[n]!==e[n])return!1;return!0}const It=$s.loadMessageBundle(),Fg="Property {0} is not allowed.",$O={"color-hex":{errorMessage:It("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:It("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:It("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:It("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:It("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,}))$/},ipv4:{errorMessage:It("ipv4FormatWarning","String does not match IPv4 format."),pattern:/^((25[0-5]|(2[0-4]|1\d|[1-9]|)\d)\.?\b){4}$/},ipv6:{errorMessage:It("ipv6FormatWarning","String does not match IPv6 format."),pattern:/^([0-9a-f]|:){1,4}(:([0-9a-f]{0,4})*){1,7}$/i}},yd="YAML",Nw="yaml-schema: ";var $r;(function(t){t.missingRequiredPropWarning="missingRequiredPropWarning",t.typeMismatchWarning="typeMismatchWarning",t.constWarning="constWarning"})($r||($r={}));const EO={[$r.missingRequiredPropWarning]:'Missing property "{0}".',[$r.typeMismatchWarning]:'Incorrect type. Expected "{0}".',[$r.constWarning]:"Value must be {0}."};class ia{constructor(e,n,r,i){this.offset=r,this.length=i,this.parent=e,this.internalNode=n}getNodeFromOffsetEndInclusive(e){const n=[],r=c=>{if(e>=c.offset&&e<=c.offset+c.length){const l=c.children;for(let d=0;dJSON.stringify(r)).join(", ")))}}mergeWarningGeneric(e,n){var r,i,s;if((r=this.problems)!=null&&r.length)for(const a of n){const c=this.problems.filter(l=>l.problemType===a);for(const l of c){const d=(i=e.problems)==null?void 0:i.find(h=>h.problemType===a&&l.location.offset===h.location.offset&&(a!==$r.missingRequiredPropWarning||Pw(h.problemArgs,l.problemArgs)));d&&((s=d.problemArgs)!=null&&s.length&&(d.problemArgs.filter(h=>!l.problemArgs.includes(h)).forEach(h=>l.problemArgs.push(h)),l.message=bd(l.problemType,l.problemArgs)),this.mergeSources(d,l))}}}mergePropertyMatch(e){this.merge(e),this.propertiesMatches++,(e.enumValueMatch||!e.hasProblems()&&e.propertiesMatches)&&this.propertiesValueMatches++,e.enumValueMatch&&e.enumValues&&this.primaryValueMatches++}mergeSources(e,n){const r=e.source.replace(Nw,"");n.source.includes(r)||(n.source=n.source+" | "+r),n.schemaUri.includes(e.schemaUri[0])||(n.schemaUri=n.schemaUri.concat(e.schemaUri))}compareGeneric(e){const n=this.hasProblems();return n!==e.hasProblems()?n?-1:1:this.enumValueMatch!==e.enumValueMatch?e.enumValueMatch?-1:1:this.propertiesValueMatches!==e.propertiesValueMatches?this.propertiesValueMatches-e.propertiesValueMatches:this.primaryValueMatches!==e.primaryValueMatches?this.primaryValueMatches-e.primaryValueMatches:this.propertiesMatches-e.propertiesMatches}compareKubernetes(e){const n=this.hasProblems();return this.propertiesMatches!==e.propertiesMatches?this.propertiesMatches-e.propertiesMatches:this.enumValueMatch!==e.enumValueMatch?e.enumValueMatch?-1:1:this.primaryValueMatches!==e.primaryValueMatches?this.primaryValueMatches-e.primaryValueMatches:this.propertiesValueMatches!==e.propertiesValueMatches?this.propertiesValueMatches-e.propertiesValueMatches:n!==e.hasProblems()?n?-1:1:this.propertiesMatches-e.propertiesMatches}}function Yc(t){switch(t.type){case"array":return t.children.map(Yc);case"object":{const e=Object.create(null);for(let n=0,r=t.children;n=t.offset&&e<=t.offset+t.length||n&&e===t.offset+t.length}function Iw(t,e,n){if(n===void 0&&(n=!1),Rw(t,e,n)){const r=t.children;if(Array.isArray(r))for(let i=0;i{let i=e(r);const s=r.children;if(Array.isArray(s))for(let a=0;a{const s=ot.create(e.positionAt(i.location.offset),e.positionAt(i.location.offset+i.location.length)),a=Nr.create(s,i.message,i.severity,i.code?i.code:Ir.Undefined,i.source);return a.data={schemaUri:i.schemaUri,...i.data},a})}return null}getMatchingSchemas(e,n=-1,r=null,i){const s=new Rg(n,r);return this.root&&e&&ar(this.root,e,e,new Mr(this.isKubernetes),s,{isKubernetes:this.isKubernetes,disableAdditionalProperties:this.disableAdditionalProperties,uri:this.uri,callFromAutoComplete:i}),s.schemas}}function ar(t,e,n,r,i,s){const{isKubernetes:a,callFromAutoComplete:c}=s;if(!t||typeof e!="object")return;switch(e.url||(e.url=n.url),e.closestTitle=e.title||n.closestTitle,t.type){case"object":E(t,e,r,i);break;case"array":m(t,e,r,i);break;case"string":h(t,e,r);break;case"number":d(t,e,r);break;case"property":return ar(t.valueNode,e,e,r,i,s)}l(),i.add({node:t,schema:e});function l(){function P(v){return t.type===v||v==="integer"&&t.type==="number"&&t.isInteger}if(Array.isArray(e.type))e.type.some(P)||r.problems.push({location:{offset:t.offset,length:t.length},severity:Dt.Warning,message:e.errorMessage||It("typeArrayMismatchWarning","Incorrect type. Expected one of {0}.",e.type.join(", ")),source:Zt(e,n),schemaUri:en(e,n)});else if(e.type&&!P(e.type)){const v=e.type==="object"?Ag(e):e.type;r.problems.push({location:{offset:t.offset,length:t.length},severity:Dt.Warning,message:e.errorMessage||bd($r.typeMismatchWarning,[v]),source:Zt(e,n),schemaUri:en(e,n),problemType:$r.typeMismatchWarning,problemArgs:[v]})}if(Array.isArray(e.allOf))for(const v of e.allOf)ar(t,Er(v),e,r,i,s);const A=Er(e.not);if(A){const v=new Mr(a),_=i.newSub();ar(t,A,e,v,_,s),v.hasProblems()||r.problems.push({location:{offset:t.offset,length:t.length},severity:Dt.Warning,message:It("notSchemaWarning","Matches a schema that is not allowed."),source:Zt(e,n),schemaUri:en(e,n)});for(const $ of _.schemas)$.inverted=!$.inverted,i.add($)}const F=(v,_)=>{var I;const $=[],q=[],N=[];let M=null;for(const Y of v){const K={...Er(Y)},ne=new Mr(a),ge=i.newSub();ar(t,K,e,ne,ge,s),(!ne.hasProblems()||c)&&($.push(K),q.push(K),ne.propertiesMatches===0&&N.push(K),K.format&&q.pop()),M?a?M=T(ne,M,K,ge):M=R(t,_,ne,M,K,ge):M={schema:K,validationResult:ne,matchingSchemas:ge}}return q.length>1&&(q.length>1||N.length===0)&&_&&r.problems.push({location:{offset:t.offset,length:1},severity:Dt.Warning,message:It("oneOfWarning","Matches multiple schemas when only one must validate."),source:Zt(e,n),schemaUri:en(e,n)}),M!==null&&(r.merge(M.validationResult),r.propertiesMatches+=M.validationResult.propertiesMatches,r.propertiesValueMatches+=M.validationResult.propertiesValueMatches,r.enumValueMatch=r.enumValueMatch||M.validationResult.enumValueMatch,(I=M.validationResult.enumValues)!=null&&I.length&&(r.enumValues=(r.enumValues||[]).concat(M.validationResult.enumValues)),i.merge(M.matchingSchemas)),$.length};Array.isArray(e.anyOf)&&F(e.anyOf,!1),Array.isArray(e.oneOf)&&F(e.oneOf,!0);const S=(v,_)=>{const $=new Mr(a),q=i.newSub();ar(t,Er(v),_,$,q,s),r.merge($),r.propertiesMatches+=$.propertiesMatches,r.propertiesValueMatches+=$.propertiesValueMatches,i.merge(q)},y=(v,_,$,q)=>{const N=Er(v),M=new Mr(a),I=i.newSub();ar(t,N,_,M,I,s),i.merge(I);const{filePatternAssociation:Y}=N;Y&&(new GI(Y).matchesPattern(s.uri)||M.problems.push({location:{offset:t.offset,length:t.length},severity:Dt.Warning,message:It("ifFilePatternAssociation",`filePatternAssociation '${Y}' does not match with doc uri '${s.uri}'.`),source:Zt(e,_),schemaUri:en(e,_)})),M.hasProblems()?q&&S(q,_):$&&S($,_)},D=Er(e.if);if(D&&y(D,e,Er(e.then),Er(e.else)),Array.isArray(e.enum)){const v=Yc(t);let _=!1;for(const $ of e.enum)if(Hc(v,$)||c&&$u(v)&&$u($)&&v&&$.startsWith(v)){_=!0;break}r.enumValues=e.enum,r.enumValueMatch=_,_||r.problems.push({location:{offset:t.offset,length:t.length},severity:Dt.Warning,code:Ir.EnumValueMismatch,message:e.errorMessage||It("enumWarning","Value is not accepted. Valid values: {0}.",e.enum.map($=>JSON.stringify($)).join(", ")),source:Zt(e,n),schemaUri:en(e,n),data:{values:e.enum}})}if(ra(e.const)){const v=Yc(t);!Hc(v,e.const)&&!(c&&$u(v)&&$u(e.const)&&e.const.startsWith(v))?(r.problems.push({location:{offset:t.offset,length:t.length},severity:Dt.Warning,code:Ir.EnumValueMismatch,problemType:$r.constWarning,message:e.errorMessage||bd($r.constWarning,[JSON.stringify(e.const)]),source:Zt(e,n),schemaUri:en(e,n),problemArgs:[JSON.stringify(e.const)],data:{values:[e.const]}}),r.enumValueMatch=!1):r.enumValueMatch=!0,r.enumValues=[e.const]}e.deprecationMessage&&t.parent&&r.problems.push({location:{offset:t.parent.offset,length:t.parent.length},severity:Dt.Warning,message:e.deprecationMessage,source:Zt(e,n),schemaUri:en(e,n)})}function d(P,A,F){const S=P.value;fi(A.multipleOf)&&S%A.multipleOf!==0&&F.problems.push({location:{offset:P.offset,length:P.length},severity:Dt.Warning,message:It("multipleOfWarning","Value is not divisible by {0}.",A.multipleOf),source:Zt(A,n),schemaUri:en(A,n)});function y(N,M){if(fi(M))return M;if(_u(M)&&M)return N}function D(N,M){if(!_u(M)||!M)return N}const v=y(A.minimum,A.exclusiveMinimum);fi(v)&&S<=v&&F.problems.push({location:{offset:P.offset,length:P.length},severity:Dt.Warning,message:It("exclusiveMinimumWarning","Value is below the exclusive minimum of {0}.",v),source:Zt(A,n),schemaUri:en(A,n)});const _=y(A.maximum,A.exclusiveMaximum);fi(_)&&S>=_&&F.problems.push({location:{offset:P.offset,length:P.length},severity:Dt.Warning,message:It("exclusiveMaximumWarning","Value is above the exclusive maximum of {0}.",_),source:Zt(A,n),schemaUri:en(A,n)});const $=D(A.minimum,A.exclusiveMinimum);fi($)&&S<$&&F.problems.push({location:{offset:P.offset,length:P.length},severity:Dt.Warning,message:It("minimumWarning","Value is below the minimum of {0}.",$),source:Zt(A,n),schemaUri:en(A,n)});const q=D(A.maximum,A.exclusiveMaximum);fi(q)&&S>q&&F.problems.push({location:{offset:P.offset,length:P.length},severity:Dt.Warning,message:It("maximumWarning","Value is above the maximum of {0}.",q),source:Zt(A,n),schemaUri:en(A,n)})}function h(P,A,F){if(fi(A.minLength)&&P.value.lengthA.maxLength&&F.problems.push({location:{offset:P.offset,length:P.length},severity:Dt.Warning,message:It("maxLengthWarning","String is longer than the maximum length of {0}.",A.maxLength),source:Zt(A,n),schemaUri:en(A,n)}),$u(A.pattern)&&($1(A.pattern).test(P.value)||F.problems.push({location:{offset:P.offset,length:P.length},severity:Dt.Warning,message:A.patternErrorMessage||A.errorMessage||It("patternWarning",'String does not match the pattern of "{0}".',A.pattern),source:Zt(A,n),schemaUri:en(A,n)})),A.format)switch(A.format){case"uri":case"uri-reference":{let S;if(!P.value)S=It("uriEmpty","URI expected.");else try{!Yr.parse(P.value).scheme&&A.format==="uri"&&(S=It("uriSchemeMissing","URI with a scheme is expected."))}catch(y){S=y.message}S&&F.problems.push({location:{offset:P.offset,length:P.length},severity:Dt.Warning,message:A.patternErrorMessage||A.errorMessage||It("uriFormatWarning","String is not a URI: {0}",S),source:Zt(A,n),schemaUri:en(A,n)})}break;case"color-hex":case"date-time":case"date":case"time":case"email":case"ipv4":case"ipv6":{const S=$O[A.format];(!P.value||!S.pattern.test(P.value))&&F.problems.push({location:{offset:P.offset,length:P.length},severity:Dt.Warning,message:A.patternErrorMessage||A.errorMessage||S.errorMessage,source:Zt(A,n),schemaUri:en(A,n)})}break}}function m(P,A,F,S){if(Array.isArray(A.items)){const D=A.items;for(let v=0;v=D.length&&F.propertiesValueMatches++}if(P.items.length>D.length)if(typeof A.additionalItems=="object")for(let v=D.length;v{if(D.oneOf&&D.oneOf.length===1){const $=D.oneOf[0],q={...Er($)};q.title=A.title,q.closestTitle=A.closestTitle,ar(_,q,A,v,S,s),F.mergePropertyMatch(v),F.mergeEnumValues(v)}else ar(_,D,A,v,S,s),F.mergePropertyMatch(v),F.mergeEnumValues(v)})}}const y=Er(A.contains);if(y&&(P.items.some(v=>{const _=new Mr(a);return ar(v,y,A,_,zc.instance,s),!_.hasProblems()})||F.problems.push({location:{offset:P.offset,length:P.length},severity:Dt.Warning,message:A.errorMessage||It("requiredItemMissingWarning","Array does not contain required item."),source:Zt(A,n),schemaUri:en(A,n)})),fi(A.minItems)&&P.items.lengthA.maxItems&&F.problems.push({location:{offset:P.offset,length:P.length},severity:Dt.Warning,message:It("maxItemsWarning","Array has too many items. Expected {0} or fewer.",A.maxItems),source:Zt(A,n),schemaUri:en(A,n)}),A.uniqueItems===!0){const D=Yc(P);D.some((_,$)=>$!==D.lastIndexOf(_))&&F.problems.push({location:{offset:P.offset,length:P.length},severity:Dt.Warning,message:It("uniqueItemsWarning","Array has duplicate items."),source:Zt(A,n),schemaUri:en(A,n)})}}function E(P,A,F,S){var q;const y=Object.create(null),D=[],v=[...P.properties];for(;v.length>0;){const N=v.pop(),M=N.keyNode.value;if(M==="<<"&&N.valueNode)switch(N.valueNode.type){case"object":{v.push(...N.valueNode.properties);break}case"array":{N.valueNode.items.forEach(I=>{I&&oO(I.properties)&&v.push(...I.properties)});break}}else y[M]=N.valueNode,D.push(M)}if(Array.isArray(A.required)){for(const N of A.required)if(y[N]===void 0){const M=P.parent&&P.parent.type==="property"&&P.parent.keyNode,I=M?{offset:M.offset,length:M.length}:{offset:P.offset,length:1};F.problems.push({location:I,severity:Dt.Warning,message:bd($r.missingRequiredPropWarning,[N]),source:Zt(A,n),schemaUri:en(A,n),problemArgs:[N],problemType:$r.missingRequiredPropWarning})}}const _=N=>{let M=D.indexOf(N);for(;M>=0;)D.splice(M,1),M=D.indexOf(N)};if(A.properties)for(const N of Object.keys(A.properties)){_(N);const M=A.properties[N],I=y[N];if(I)if(_u(M))if(M)F.propertiesMatches++,F.propertiesValueMatches++;else{const Y=I.parent;F.problems.push({location:{offset:Y.keyNode.offset,length:Y.keyNode.length},severity:Dt.Warning,message:A.errorMessage||It("DisallowedExtraPropWarning",Fg,N),source:Zt(A,n),schemaUri:en(A,n)})}else{M.url=(q=A.url)!=null?q:n.url;const Y=new Mr(a);ar(I,M,A,Y,S,s),F.mergePropertyMatch(Y),F.mergeEnumValues(Y)}}if(A.patternProperties)for(const N of Object.keys(A.patternProperties)){const M=$1(N);for(const I of D.slice(0))if(M.test(I)){_(I);const Y=y[I];if(Y){const K=A.patternProperties[N];if(_u(K))if(K)F.propertiesMatches++,F.propertiesValueMatches++;else{const ne=Y.parent;F.problems.push({location:{offset:ne.keyNode.offset,length:ne.keyNode.length},severity:Dt.Warning,message:A.errorMessage||It("DisallowedExtraPropWarning",Fg,I),source:Zt(A,n),schemaUri:en(A,n)})}else{const ne=new Mr(a);ar(Y,K,A,ne,S,s),F.mergePropertyMatch(ne),F.mergeEnumValues(ne)}}}}if(typeof A.additionalProperties=="object")for(const N of D){const M=y[N];if(M){const I=new Mr(a);ar(M,A.additionalProperties,A,I,S,s),F.mergePropertyMatch(I),F.mergeEnumValues(I)}}else if((A.additionalProperties===!1||A.type==="object"&&A.additionalProperties===void 0&&s.disableAdditionalProperties===!0)&&D.length>0){const N=A.properties&&Object.keys(A.properties).filter(M=>!y[M]);for(const M of D){const I=y[M];if(I){let Y=null;I.type!=="property"?(Y=I.parent,Y.type==="object"&&(Y=Y.properties[0])):Y=I;const K={location:{offset:Y.keyNode.offset,length:Y.keyNode.length},severity:Dt.Warning,code:Ir.PropertyExpected,message:A.errorMessage||It("DisallowedExtraPropWarning",Fg,M),source:Zt(A,n),schemaUri:en(A,n)};N!=null&&N.length&&(K.data={properties:N}),F.problems.push(K)}}}if(fi(A.maxProperties)&&P.properties.length>A.maxProperties&&F.problems.push({location:{offset:P.offset,length:P.length},severity:Dt.Warning,message:It("MaxPropWarning","Object has more properties than limit of {0}.",A.maxProperties),source:Zt(A,n),schemaUri:en(A,n)}),fi(A.minProperties)&&P.properties.length0?A={schema:F,validationResult:P,matchingSchemas:S}:y===0&&(A.matchingSchemas.merge(S),A.validationResult.mergeEnumValues(P)),A}function R(P,A,F,S,y,D){if(!A&&!F.hasProblems()&&(!S.validationResult.hasProblems()||c))S.matchingSchemas.merge(D),S.validationResult.propertiesMatches+=F.propertiesMatches,S.validationResult.propertiesValueMatches+=F.propertiesValueMatches;else{const v=F.compareGeneric(S.validationResult);v>0||v===0&&A&&S.schema.type==="object"&&P.type!=="null"&&P.type!==S.schema.type?S={schema:y,validationResult:F,matchingSchemas:D}:v===0&&(S.matchingSchemas.merge(D),S.validationResult.mergeEnumValues(F),S.validationResult.mergeWarningGeneric(F,[$r.missingRequiredPropWarning,$r.typeMismatchWarning,$r.constWarning]))}return S}}function Zt(t,e){var n;if(t){let r;if(t.title)r=t.title;else if(t.closestTitle)r=t.closestTitle;else if(e.closestTitle)r=e.closestTitle;else{const i=(n=t.url)!=null?n:e.url;if(i){const s=Yr.parse(i);s.scheme==="file"&&(r=s.fsPath),r=s.toString()}}if(r)return`${Nw}${r}`}return yd}function en(t,e){var r;const n=(r=t.url)!=null?r:e.url;return n?[n]:[]}function bd(t,e){return It(t,EO[t],e.join(" | "))}const NO=1e3;let Ig=0;const Mg=new Set;function Eu(t,e,n,r){if(t||(Ig=0),!e)return null;if(Nn(e))return FO(e,t,n,r);if(Xt(e))return RO(e,t,n,r);if(xn(e))return IO(e,t,n,r);if(yt(e))return MO(e,t);if(ts(e)&&!Mg.has(e)&&Ig=n&&(n=r.value.range[2]));return[e,n,n]}function xO(t,e){let n;if(gn(t,(r,i,s)=>{if(i===e)return n=s[s.length-1],gn.BREAK}),!zf(n))return n}function BO(t){if(t.items.length>1)return!1;const e=t.items[0];return yt(e.key)&&yt(e.value)&&e.key.value===""&&!e.value.value}function qO(t,e){for(const[n,r]of t.items.entries())if(e===r)return n}function WO(t,e){let n=!1;for(const r of t){if(r.type==="document")Lg([],r,i=>{var s;if(Lw(i)&&((s=i.value)==null?void 0:s.type)==="comment"){if(r.offset<=e&&i.value.source.length+i.value.offset>=e)return n=!0,gn.BREAK}else if(i.type==="comment"&&i.offset<=e&&i.offset+i.source.length>=e)return n=!0,gn.BREAK});else if(r.type==="comment"&&r.offset<=e&&r.source.length+r.offset>=e)return!0;if(n)break}return n}function Lw(t){return t.start!==void 0}function Lg(t,e,n){let r=n(e,t);if(typeof r=="symbol")return r;for(const s of["key","value"]){const a=e[s];if(a&&"items"in a){for(let c=0;cthis._lineComments.push(`#${n}`)),gn(this.internalDocument,(e,n)=>{n!=null&&n.commentBefore&&(n==null?void 0:n.commentBefore.split(` -`)).forEach(i=>this._lineComments.push(`#${i}`)),n!=null&&n.comment&&this._lineComments.push(`#${n.comment}`)}),this._internalDocument.comment&&this._lineComments.push(`#${this._internalDocument.comment}`)}updateFromInternalDocument(){this.root=Eu(null,this._internalDocument.contents,this._internalDocument,this.lineCounter)}set internalDocument(e){this._internalDocument=e,this.updateFromInternalDocument()}get internalDocument(){return this._internalDocument}get lineComments(){return this._lineComments||this.collectLineComments(),this._lineComments}set lineComments(e){this._lineComments=e}get errors(){return this.internalDocument.errors.map(xw)}get warnings(){return this.internalDocument.warnings.map(xw)}getNodeFromPosition(e,n,r){const i=n.getPosition(e),s=n.getLineContent(i.line);if(s.trim().length===0)return[this.findClosestNode(e,n,r),!0];const c=s.substring(i.character).match(/^([ ]+)\n?$/),l=!!c,d=c==null?void 0:c[1].length;let h;return gn(this.internalDocument,(m,E)=>{if(!E)return;const k=E.range;if(!k)return;const R=()=>l&&e+d===k[2]&&yt(E)&&E.value===null;if(k[0]<=e&&k[1]>=e||R())h=E;else return gn.SKIP}),[h,!1]}findClosestNode(e,n,r){let i=this.internalDocument.range[2],s=this.internalDocument.range[0],a;gn(this.internalDocument,(h,m)=>{if(!m)return;const E=m.range;if(!E)return;const k=E[1]-e;s<=E[0]&&k<=0&&Math.abs(k)<=i&&(i=Math.abs(k),s=E[0],a=m)});const c=n.getPosition(e),l=n.getLineContent(c.line),d=MA(l,c.character);return yt(a)&&a.value===null||d===c.character&&(a=this.getProperParentByIndentation(d,a,n,"",r)),a}getProperParentByIndentation(e,n,r,i,s,a){if(!n)return this.internalDocument.contents;if(s=s||2,on(n)&&n.range){const c=r.getPosition(n.range[0]),l=r.getLineContent(c.line);if(i=i===""?l.trim():i,i.startsWith("-")&&e===s&&i===l.trim()&&(c.character+=e),c.character>e&&c.character>0){const d=this.getParent(n);if(d)return this.getProperParentByIndentation(e,d,r,i,s,a)}else if(c.character0&&e.trim())return e;n("!include without value")}}function KO(t){const e=[],n=Ow(t);for(const r of n){const i=r.split(" "),s=i[0],a=i[1]&&i[1].toLowerCase()||"scalar";e.push(new VO(s,a))}return e.push(new HO),e}class sa{constructor(e){this.doc=e}getLineCount(){return this.doc.lineCount}getLineLength(e){const n=this.doc.getLineOffsets();return e>=n.length?this.doc.getText().length:e<0?0:(e+1=n.length)return this.doc.getText();if(e<0)return"";const r=e+1YO(k,s));return new jw(m,d)}function YO(t,e){const n=new bd(e);return n.internalDocument=t,n}function GO(t){if(t instanceof bd){const e=t.lineComments.find(n=>jg(n));if(e!=null){const n=e.match(/\$schema=\S+/g);if(n!==null&&n.length>=1)return n.length>=2&&console.log("Several $schema attributes have been found on the yaml-language-server modeline. The first one will be picked."),n[0].substring(8)}}}function jg(t){const e=t.match(/^#\s+yaml-language-server\s*:/g);return e!==null&&e.length===1}var xg={exports:{}},lo={},Gr={},Su={},Gc={},mt={},Jc={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.regexpCode=t.getEsmExportName=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class e{}t._CodeOrName=e,t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class n extends e{constructor(S){if(super(),!t.IDENTIFIER.test(S))throw new Error("CodeGen: name must be a valid identifier");this.str=S}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}t.Name=n;class r extends e{constructor(S){super(),this._items=typeof S=="string"?[S]:S}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const S=this._items[0];return S===""||S==='""'}get str(){var S;return(S=this._str)!==null&&S!==void 0?S:this._str=this._items.reduce((y,D)=>`${y}${D}`,"")}get names(){var S;return(S=this._names)!==null&&S!==void 0?S:this._names=this._items.reduce((y,D)=>(D instanceof n&&(y[D.str]=(y[D.str]||0)+1),y),{})}}t._Code=r,t.nil=new r("");function i(N,...S){const y=[N[0]];let D=0;for(;D{if(m.scopePath===void 0)throw new Error(`CodeGen: name "${m}" has no value`);return(0,e._)`${d}${m.scopePath}`})}scopeCode(d=this._values,h,m){return this._reduceValues(d,E=>{if(E.value===void 0)throw new Error(`CodeGen: name "${E}" has no value`);return E.value.code},h,m)}_reduceValues(d,h,m={},E){let k=e.nil;for(const R in d){const P=d[R];if(!P)continue;const A=m[R]=m[R]||new Map;P.forEach(N=>{if(A.has(N))return;A.set(N,r.Started);let S=h(N);if(S){const y=this.opts.es5?t.varKinds.var:t.varKinds.const;k=(0,e._)`${k}${y} ${N} = ${S};${this.opts._n}`}else if(S=E==null?void 0:E(N))k=(0,e._)`${k}${S}${this.opts._n}`;else throw new n(N);A.set(N,r.Completed)})}return k}}t.ValueScope=c})(Bg),function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;const e=Jc,n=Bg;var r=Jc;Object.defineProperty(t,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return r.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return r.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return r.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return r.Name}});var i=Bg;Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return i.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return i.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return i.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return i.varKinds}}),t.operators={GT:new e._Code(">"),GTE:new e._Code(">="),LT:new e._Code("<"),LTE:new e._Code("<="),EQ:new e._Code("==="),NEQ:new e._Code("!=="),NOT:new e._Code("!"),OR:new e._Code("||"),AND:new e._Code("&&"),ADD:new e._Code("+")};class s{optimizeNodes(){return this}optimizeNames(U,Z){return this}}class a extends s{constructor(U,Z,pe){super(),this.varKind=U,this.name=Z,this.rhs=pe}render({es5:U,_n:Z}){const pe=U?n.varKinds.var:this.varKind,Me=this.rhs===void 0?"":` = ${this.rhs}`;return`${pe} ${this.name}${Me};`+Z}optimizeNames(U,Z){if(!!U[this.name.str])return this.rhs&&(this.rhs=ne(this.rhs,U,Z)),this}get names(){return this.rhs instanceof e._CodeOrName?this.rhs.names:{}}}class c extends s{constructor(U,Z,pe){super(),this.lhs=U,this.rhs=Z,this.sideEffects=pe}render({_n:U}){return`${this.lhs} = ${this.rhs};`+U}optimizeNames(U,Z){if(!(this.lhs instanceof e.Name&&!U[this.lhs.str]&&!this.sideEffects))return this.rhs=ne(this.rhs,U,Z),this}get names(){const U=this.lhs instanceof e.Name?{}:{...this.lhs.names};return K(U,this.rhs)}}class l extends c{constructor(U,Z,pe,Me){super(U,pe,Me),this.op=Z}render({_n:U}){return`${this.lhs} ${this.op}= ${this.rhs};`+U}}class d extends s{constructor(U){super(),this.label=U,this.names={}}render({_n:U}){return`${this.label}:`+U}}class h extends s{constructor(U){super(),this.label=U,this.names={}}render({_n:U}){return`break${this.label?` ${this.label}`:""};`+U}}class m extends s{constructor(U){super(),this.error=U}render({_n:U}){return`throw ${this.error};`+U}get names(){return this.error.names}}class E extends s{constructor(U){super(),this.code=U}render({_n:U}){return`${this.code};`+U}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(U,Z){return this.code=ne(this.code,U,Z),this}get names(){return this.code instanceof e._CodeOrName?this.code.names:{}}}class k extends s{constructor(U=[]){super(),this.nodes=U}render(U){return this.nodes.reduce((Z,pe)=>Z+pe.render(U),"")}optimizeNodes(){const{nodes:U}=this;let Z=U.length;for(;Z--;){const pe=U[Z].optimizeNodes();Array.isArray(pe)?U.splice(Z,1,...pe):pe?U[Z]=pe:U.splice(Z,1)}return U.length>0?this:void 0}optimizeNames(U,Z){const{nodes:pe}=this;let Me=pe.length;for(;Me--;){const Ie=pe[Me];Ie.optimizeNames(U,Z)||(ge(U,Ie.names),pe.splice(Me,1))}return pe.length>0?this:void 0}get names(){return this.nodes.reduce((U,Z)=>Y(U,Z.names),{})}}class R extends k{render(U){return"{"+U._n+super.render(U)+"}"+U._n}}class P extends k{}class A extends R{}A.kind="else";class N extends R{constructor(U,Z){super(Z),this.condition=U}render(U){let Z=`if(${this.condition})`+super.render(U);return this.else&&(Z+="else "+this.else.render(U)),Z}optimizeNodes(){super.optimizeNodes();const U=this.condition;if(U===!0)return this.nodes;let Z=this.else;if(Z){const pe=Z.optimizeNodes();Z=this.else=Array.isArray(pe)?new A(pe):pe}if(Z)return U===!1?Z instanceof N?Z:Z.nodes:this.nodes.length?this:new N(ye(U),Z instanceof N?[Z]:Z.nodes);if(!(U===!1||!this.nodes.length))return this}optimizeNames(U,Z){var pe;if(this.else=(pe=this.else)===null||pe===void 0?void 0:pe.optimizeNames(U,Z),!!(super.optimizeNames(U,Z)||this.else))return this.condition=ne(this.condition,U,Z),this}get names(){const U=super.names;return K(U,this.condition),this.else&&Y(U,this.else.names),U}}N.kind="if";class S extends R{}S.kind="for";class y extends S{constructor(U){super(),this.iteration=U}render(U){return`for(${this.iteration})`+super.render(U)}optimizeNames(U,Z){if(!!super.optimizeNames(U,Z))return this.iteration=ne(this.iteration,U,Z),this}get names(){return Y(super.names,this.iteration.names)}}class D extends S{constructor(U,Z,pe,Me){super(),this.varKind=U,this.name=Z,this.from=pe,this.to=Me}render(U){const Z=U.es5?n.varKinds.var:this.varKind,{name:pe,from:Me,to:Ie}=this;return`for(${Z} ${pe}=${Me}; ${pe}<${Ie}; ${pe}++)`+super.render(U)}get names(){const U=K(super.names,this.from);return K(U,this.to)}}class v extends S{constructor(U,Z,pe,Me){super(),this.loop=U,this.varKind=Z,this.name=pe,this.iterable=Me}render(U){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(U)}optimizeNames(U,Z){if(!!super.optimizeNames(U,Z))return this.iterable=ne(this.iterable,U,Z),this}get names(){return Y(super.names,this.iterable.names)}}class _ extends R{constructor(U,Z,pe){super(),this.name=U,this.args=Z,this.async=pe}render(U){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(U)}}_.kind="func";class $ extends k{render(U){return"return "+super.render(U)}}$.kind="return";class q extends R{render(U){let Z="try"+super.render(U);return this.catch&&(Z+=this.catch.render(U)),this.finally&&(Z+=this.finally.render(U)),Z}optimizeNodes(){var U,Z;return super.optimizeNodes(),(U=this.catch)===null||U===void 0||U.optimizeNodes(),(Z=this.finally)===null||Z===void 0||Z.optimizeNodes(),this}optimizeNames(U,Z){var pe,Me;return super.optimizeNames(U,Z),(pe=this.catch)===null||pe===void 0||pe.optimizeNames(U,Z),(Me=this.finally)===null||Me===void 0||Me.optimizeNames(U,Z),this}get names(){const U=super.names;return this.catch&&Y(U,this.catch.names),this.finally&&Y(U,this.finally.names),U}}class F extends R{constructor(U){super(),this.error=U}render(U){return`catch(${this.error})`+super.render(U)}}F.kind="catch";class M extends R{render(U){return"finally"+super.render(U)}}M.kind="finally";class I{constructor(U,Z={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...Z,_n:Z.lines?` -`:""},this._extScope=U,this._scope=new n.Scope({parent:U}),this._nodes=[new P]}toString(){return this._root.render(this.opts)}name(U){return this._scope.name(U)}scopeName(U){return this._extScope.name(U)}scopeValue(U,Z){const pe=this._extScope.value(U,Z);return(this._values[pe.prefix]||(this._values[pe.prefix]=new Set)).add(pe),pe}getScopeValue(U,Z){return this._extScope.getValue(U,Z)}scopeRefs(U){return this._extScope.scopeRefs(U,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(U,Z,pe,Me){const Ie=this._scope.toName(Z);return pe!==void 0&&Me&&(this._constants[Ie.str]=pe),this._leafNode(new a(U,Ie,pe)),Ie}const(U,Z,pe){return this._def(n.varKinds.const,U,Z,pe)}let(U,Z,pe){return this._def(n.varKinds.let,U,Z,pe)}var(U,Z,pe){return this._def(n.varKinds.var,U,Z,pe)}assign(U,Z,pe){return this._leafNode(new c(U,Z,pe))}add(U,Z){return this._leafNode(new l(U,t.operators.ADD,Z))}code(U){return typeof U=="function"?U():U!==e.nil&&this._leafNode(new E(U)),this}object(...U){const Z=["{"];for(const[pe,Me]of U)Z.length>1&&Z.push(","),Z.push(pe),(pe!==Me||this.opts.es5)&&(Z.push(":"),(0,e.addCodeArg)(Z,Me));return Z.push("}"),new e._Code(Z)}if(U,Z,pe){if(this._blockNode(new N(U)),Z&&pe)this.code(Z).else().code(pe).endIf();else if(Z)this.code(Z).endIf();else if(pe)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(U){return this._elseNode(new N(U))}else(){return this._elseNode(new A)}endIf(){return this._endBlockNode(N,A)}_for(U,Z){return this._blockNode(U),Z&&this.code(Z).endFor(),this}for(U,Z){return this._for(new y(U),Z)}forRange(U,Z,pe,Me,Ie=this.opts.es5?n.varKinds.var:n.varKinds.let){const qe=this._scope.toName(U);return this._for(new D(Ie,qe,Z,pe),()=>Me(qe))}forOf(U,Z,pe,Me=n.varKinds.const){const Ie=this._scope.toName(U);if(this.opts.es5){const qe=Z instanceof e.Name?Z:this.var("_arr",Z);return this.forRange("_i",0,(0,e._)`${qe}.length`,ze=>{this.var(Ie,(0,e._)`${qe}[${ze}]`),pe(Ie)})}return this._for(new v("of",Me,Ie,Z),()=>pe(Ie))}forIn(U,Z,pe,Me=this.opts.es5?n.varKinds.var:n.varKinds.const){if(this.opts.ownProperties)return this.forOf(U,(0,e._)`Object.keys(${Z})`,pe);const Ie=this._scope.toName(U);return this._for(new v("in",Me,Ie,Z),()=>pe(Ie))}endFor(){return this._endBlockNode(S)}label(U){return this._leafNode(new d(U))}break(U){return this._leafNode(new h(U))}return(U){const Z=new $;if(this._blockNode(Z),this.code(U),Z.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode($)}try(U,Z,pe){if(!Z&&!pe)throw new Error('CodeGen: "try" without "catch" and "finally"');const Me=new q;if(this._blockNode(Me),this.code(U),Z){const Ie=this.name("e");this._currNode=Me.catch=new F(Ie),Z(Ie)}return pe&&(this._currNode=Me.finally=new M,this.code(pe)),this._endBlockNode(F,M)}throw(U){return this._leafNode(new m(U))}block(U,Z){return this._blockStarts.push(this._nodes.length),U&&this.code(U).endBlock(Z),this}endBlock(U){const Z=this._blockStarts.pop();if(Z===void 0)throw new Error("CodeGen: not in self-balancing block");const pe=this._nodes.length-Z;if(pe<0||U!==void 0&&pe!==U)throw new Error(`CodeGen: wrong number of nodes: ${pe} vs ${U} expected`);return this._nodes.length=Z,this}func(U,Z=e.nil,pe,Me){return this._blockNode(new _(U,Z,pe)),Me&&this.code(Me).endFunc(),this}endFunc(){return this._endBlockNode(_)}optimize(U=1){for(;U-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(U){return this._currNode.nodes.push(U),this}_blockNode(U){this._currNode.nodes.push(U),this._nodes.push(U)}_endBlockNode(U,Z){const pe=this._currNode;if(pe instanceof U||Z&&pe instanceof Z)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${Z?`${U.kind}/${Z.kind}`:U.kind}"`)}_elseNode(U){const Z=this._currNode;if(!(Z instanceof N))throw new Error('CodeGen: "else" without "if"');return this._currNode=Z.else=U,this}get _root(){return this._nodes[0]}get _currNode(){const U=this._nodes;return U[U.length-1]}set _currNode(U){const Z=this._nodes;Z[Z.length-1]=U}}t.CodeGen=I;function Y(ae,U){for(const Z in U)ae[Z]=(ae[Z]||0)+(U[Z]||0);return ae}function K(ae,U){return U instanceof e._CodeOrName?Y(ae,U.names):ae}function ne(ae,U,Z){if(ae instanceof e.Name)return pe(ae);if(!Me(ae))return ae;return new e._Code(ae._items.reduce((Ie,qe)=>(qe instanceof e.Name&&(qe=pe(qe)),qe instanceof e._Code?Ie.push(...qe._items):Ie.push(qe),Ie),[]));function pe(Ie){const qe=Z[Ie.str];return qe===void 0||U[Ie.str]!==1?Ie:(delete U[Ie.str],qe)}function Me(Ie){return Ie instanceof e._Code&&Ie._items.some(qe=>qe instanceof e.Name&&U[qe.str]===1&&Z[qe.str]!==void 0)}}function ge(ae,U){for(const Z in U)ae[Z]=(ae[Z]||0)-(U[Z]||0)}function ye(ae){return typeof ae=="boolean"||typeof ae=="number"||ae===null?!ae:(0,e._)`!${fe(ae)}`}t.not=ye;const De=H(t.operators.AND);function Be(...ae){return ae.reduce(De)}t.and=Be;const nt=H(t.operators.OR);function Se(...ae){return ae.reduce(nt)}t.or=Se;function H(ae){return(U,Z)=>U===e.nil?Z:Z===e.nil?U:(0,e._)`${fe(U)} ${ae} ${fe(Z)}`}function fe(ae){return ae instanceof e.Name?ae:(0,e._)`(${ae})`}}(mt);var Ve={};Object.defineProperty(Ve,"__esModule",{value:!0}),Ve.checkStrictMode=Ve.getErrorPath=Ve.Type=Ve.useFunc=Ve.setEvaluated=Ve.evaluatedPropsToName=Ve.mergeEvaluated=Ve.eachItem=Ve.unescapeJsonPointer=Ve.escapeJsonPointer=Ve.escapeFragment=Ve.unescapeFragment=Ve.schemaRefOrVal=Ve.schemaHasRulesButRef=Ve.schemaHasRules=Ve.checkUnknownRules=Ve.alwaysValidSchema=Ve.toHash=void 0;const ln=mt,JO=Jc;function QO(t){const e={};for(const n of t)e[n]=!0;return e}Ve.toHash=QO;function XO(t,e){return typeof e=="boolean"?e:Object.keys(e).length===0?!0:(Bw(t,e),!qw(e,t.self.RULES.all))}Ve.alwaysValidSchema=XO;function Bw(t,e=t.schema){const{opts:n,self:r}=t;if(!n.strictSchema||typeof e=="boolean")return;const i=r.RULES.keywords;for(const s in e)i[s]||Kw(t,`unknown keyword: "${s}"`)}Ve.checkUnknownRules=Bw;function qw(t,e){if(typeof t=="boolean")return!t;for(const n in t)if(e[n])return!0;return!1}Ve.schemaHasRules=qw;function ZO(t,e){if(typeof t=="boolean")return!t;for(const n in t)if(n!=="$ref"&&e.all[n])return!0;return!1}Ve.schemaHasRulesButRef=ZO;function e2({topSchemaRef:t,schemaPath:e},n,r,i){if(!i){if(typeof n=="number"||typeof n=="boolean")return n;if(typeof n=="string")return(0,ln._)`${n}`}return(0,ln._)`${t}${e}${(0,ln.getProperty)(r)}`}Ve.schemaRefOrVal=e2;function t2(t){return Ww(decodeURIComponent(t))}Ve.unescapeFragment=t2;function n2(t){return encodeURIComponent(qg(t))}Ve.escapeFragment=n2;function qg(t){return typeof t=="number"?`${t}`:t.replace(/~/g,"~0").replace(/\//g,"~1")}Ve.escapeJsonPointer=qg;function Ww(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}Ve.unescapeJsonPointer=Ww;function r2(t,e){if(Array.isArray(t))for(const n of t)e(n);else e(t)}Ve.eachItem=r2;function Uw({mergeNames:t,mergeToName:e,mergeValues:n,resultToName:r}){return(i,s,a,c)=>{const l=a===void 0?s:a instanceof ln.Name?(s instanceof ln.Name?t(i,s,a):e(i,s,a),a):s instanceof ln.Name?(e(i,a,s),s):n(s,a);return c===ln.Name&&!(l instanceof ln.Name)?r(i,l):l}}Ve.mergeEvaluated={props:Uw({mergeNames:(t,e,n)=>t.if((0,ln._)`${n} !== true && ${e} !== undefined`,()=>{t.if((0,ln._)`${e} === true`,()=>t.assign(n,!0),()=>t.assign(n,(0,ln._)`${n} || {}`).code((0,ln._)`Object.assign(${n}, ${e})`))}),mergeToName:(t,e,n)=>t.if((0,ln._)`${n} !== true`,()=>{e===!0?t.assign(n,!0):(t.assign(n,(0,ln._)`${n} || {}`),Wg(t,n,e))}),mergeValues:(t,e)=>t===!0?!0:{...t,...e},resultToName:Vw}),items:Uw({mergeNames:(t,e,n)=>t.if((0,ln._)`${n} !== true && ${e} !== undefined`,()=>t.assign(n,(0,ln._)`${e} === true ? true : ${n} > ${e} ? ${n} : ${e}`)),mergeToName:(t,e,n)=>t.if((0,ln._)`${n} !== true`,()=>t.assign(n,e===!0?!0:(0,ln._)`${n} > ${e} ? ${n} : ${e}`)),mergeValues:(t,e)=>t===!0?!0:Math.max(t,e),resultToName:(t,e)=>t.var("items",e)})};function Vw(t,e){if(e===!0)return t.var("props",!0);const n=t.var("props",(0,ln._)`{}`);return e!==void 0&&Wg(t,n,e),n}Ve.evaluatedPropsToName=Vw;function Wg(t,e,n){Object.keys(n).forEach(r=>t.assign((0,ln._)`${e}${(0,ln.getProperty)(r)}`,!0))}Ve.setEvaluated=Wg;const Hw={};function i2(t,e){return t.scopeValue("func",{ref:e,code:Hw[e.code]||(Hw[e.code]=new JO._Code(e.code))})}Ve.useFunc=i2;var Ug;(function(t){t[t.Num=0]="Num",t[t.Str=1]="Str"})(Ug||(Ve.Type=Ug={}));function s2(t,e,n){if(t instanceof ln.Name){const r=e===Ug.Num;return n?r?(0,ln._)`"[" + ${t} + "]"`:(0,ln._)`"['" + ${t} + "']"`:r?(0,ln._)`"/" + ${t}`:(0,ln._)`"/" + ${t}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return n?(0,ln.getProperty)(t).toString():"/"+qg(t)}Ve.getErrorPath=s2;function Kw(t,e,n=t.opts.strictSchema){if(!!n){if(e=`strict mode: ${e}`,n===!0)throw new Error(e);t.self.logger.warn(e)}}Ve.checkStrictMode=Kw;var Jr={};Object.defineProperty(Jr,"__esModule",{value:!0});const vr=mt,o2={data:new vr.Name("data"),valCxt:new vr.Name("valCxt"),instancePath:new vr.Name("instancePath"),parentData:new vr.Name("parentData"),parentDataProperty:new vr.Name("parentDataProperty"),rootData:new vr.Name("rootData"),dynamicAnchors:new vr.Name("dynamicAnchors"),vErrors:new vr.Name("vErrors"),errors:new vr.Name("errors"),this:new vr.Name("this"),self:new vr.Name("self"),scope:new vr.Name("scope"),json:new vr.Name("json"),jsonPos:new vr.Name("jsonPos"),jsonLen:new vr.Name("jsonLen"),jsonPart:new vr.Name("jsonPart")};Jr.default=o2,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;const e=mt,n=Ve,r=Jr;t.keywordError={message:({keyword:A})=>(0,e.str)`must pass "${A}" keyword validation`},t.keyword$DataError={message:({keyword:A,schemaType:N})=>N?(0,e.str)`"${A}" keyword must be ${N} ($data)`:(0,e.str)`"${A}" keyword is invalid ($data)`};function i(A,N=t.keywordError,S,y){const{it:D}=A,{gen:v,compositeRule:_,allErrors:$}=D,q=m(A,N,S);(y!=null?y:_||$)?l(v,q):d(D,(0,e._)`[${q}]`)}t.reportError=i;function s(A,N=t.keywordError,S){const{it:y}=A,{gen:D,compositeRule:v,allErrors:_}=y,$=m(A,N,S);l(D,$),v||_||d(y,r.default.vErrors)}t.reportExtraError=s;function a(A,N){A.assign(r.default.errors,N),A.if((0,e._)`${r.default.vErrors} !== null`,()=>A.if(N,()=>A.assign((0,e._)`${r.default.vErrors}.length`,N),()=>A.assign(r.default.vErrors,null)))}t.resetErrorsCount=a;function c({gen:A,keyword:N,schemaValue:S,data:y,errsCount:D,it:v}){if(D===void 0)throw new Error("ajv implementation error");const _=A.name("err");A.forRange("i",D,r.default.errors,$=>{A.const(_,(0,e._)`${r.default.vErrors}[${$}]`),A.if((0,e._)`${_}.instancePath === undefined`,()=>A.assign((0,e._)`${_}.instancePath`,(0,e.strConcat)(r.default.instancePath,v.errorPath))),A.assign((0,e._)`${_}.schemaPath`,(0,e.str)`${v.errSchemaPath}/${N}`),v.opts.verbose&&(A.assign((0,e._)`${_}.schema`,S),A.assign((0,e._)`${_}.data`,y))})}t.extendErrors=c;function l(A,N){const S=A.const("err",N);A.if((0,e._)`${r.default.vErrors} === null`,()=>A.assign(r.default.vErrors,(0,e._)`[${S}]`),(0,e._)`${r.default.vErrors}.push(${S})`),A.code((0,e._)`${r.default.errors}++`)}function d(A,N){const{gen:S,validateName:y,schemaEnv:D}=A;D.$async?S.throw((0,e._)`new ${A.ValidationError}(${N})`):(S.assign((0,e._)`${y}.errors`,N),S.return(!1))}const h={keyword:new e.Name("keyword"),schemaPath:new e.Name("schemaPath"),params:new e.Name("params"),propertyName:new e.Name("propertyName"),message:new e.Name("message"),schema:new e.Name("schema"),parentSchema:new e.Name("parentSchema")};function m(A,N,S){const{createErrors:y}=A.it;return y===!1?(0,e._)`{}`:E(A,N,S)}function E(A,N,S={}){const{gen:y,it:D}=A,v=[k(D,S),R(A,S)];return P(A,N,v),y.object(...v)}function k({errorPath:A},{instancePath:N}){const S=N?(0,e.str)`${A}${(0,n.getErrorPath)(N,n.Type.Str)}`:A;return[r.default.instancePath,(0,e.strConcat)(r.default.instancePath,S)]}function R({keyword:A,it:{errSchemaPath:N}},{schemaPath:S,parentSchema:y}){let D=y?N:(0,e.str)`${N}/${A}`;return S&&(D=(0,e.str)`${D}${(0,n.getErrorPath)(S,n.Type.Str)}`),[h.schemaPath,D]}function P(A,{params:N,message:S},y){const{keyword:D,data:v,schemaValue:_,it:$}=A,{opts:q,propertyName:F,topSchemaRef:M,schemaPath:I}=$;y.push([h.keyword,D],[h.params,typeof N=="function"?N(A):N||(0,e._)`{}`]),q.messages&&y.push([h.message,typeof S=="function"?S(A):S]),q.verbose&&y.push([h.schema,_],[h.parentSchema,(0,e._)`${M}${I}`],[r.default.data,v]),F&&y.push([h.propertyName,F])}}(Gc),Object.defineProperty(Su,"__esModule",{value:!0}),Su.boolOrEmptySchema=Su.topBoolOrEmptySchema=void 0;const a2=Gc,u2=mt,c2=Jr,l2={message:"boolean schema is false"};function f2(t){const{gen:e,schema:n,validateName:r}=t;n===!1?zw(t,!1):typeof n=="object"&&n.$async===!0?e.return(c2.default.data):(e.assign((0,u2._)`${r}.errors`,null),e.return(!0))}Su.topBoolOrEmptySchema=f2;function d2(t,e){const{gen:n,schema:r}=t;r===!1?(n.var(e,!1),zw(t)):n.var(e,!0)}Su.boolOrEmptySchema=d2;function zw(t,e){const{gen:n,data:r}=t,i={gen:n,keyword:"false schema",data:r,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:t};(0,a2.reportError)(i,l2,void 0,e)}var tr={},oa={};Object.defineProperty(oa,"__esModule",{value:!0}),oa.getRules=oa.isJSONType=void 0;const h2=["string","number","integer","boolean","null","object","array"],p2=new Set(h2);function m2(t){return typeof t=="string"&&p2.has(t)}oa.isJSONType=m2;function g2(){const t={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...t,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},t.number,t.string,t.array,t.object],post:{rules:[]},all:{},keywords:{}}}oa.getRules=g2;var Ts={};Object.defineProperty(Ts,"__esModule",{value:!0}),Ts.shouldUseRule=Ts.shouldUseGroup=Ts.schemaHasRulesForType=void 0;function y2({schema:t,self:e},n){const r=e.RULES.types[n];return r&&r!==!0&&Yw(t,r)}Ts.schemaHasRulesForType=y2;function Yw(t,e){return e.rules.some(n=>Gw(t,n))}Ts.shouldUseGroup=Yw;function Gw(t,e){var n;return t[e.keyword]!==void 0||((n=e.definition.implements)===null||n===void 0?void 0:n.some(r=>t[r]!==void 0))}Ts.shouldUseRule=Gw,Object.defineProperty(tr,"__esModule",{value:!0}),tr.reportTypeError=tr.checkDataTypes=tr.checkDataType=tr.coerceAndCheckDataType=tr.getJSONTypes=tr.getSchemaTypes=tr.DataType=void 0;const v2=oa,b2=Ts,D2=Gc,St=mt,Jw=Ve;var Tu;(function(t){t[t.Correct=0]="Correct",t[t.Wrong=1]="Wrong"})(Tu||(tr.DataType=Tu={}));function w2(t){const e=Qw(t.type);if(e.includes("null")){if(t.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!e.length&&t.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');t.nullable===!0&&e.push("null")}return e}tr.getSchemaTypes=w2;function Qw(t){const e=Array.isArray(t)?t:t?[t]:[];if(e.every(v2.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}tr.getJSONTypes=Qw;function _2(t,e){const{gen:n,data:r,opts:i}=t,s=$2(e,i.coerceTypes),a=e.length>0&&!(s.length===0&&e.length===1&&(0,b2.schemaHasRulesForType)(t,e[0]));if(a){const c=Hg(e,r,i.strictNumbers,Tu.Wrong);n.if(c,()=>{s.length?E2(t,e,s):Kg(t)})}return a}tr.coerceAndCheckDataType=_2;const Xw=new Set(["string","number","integer","boolean","null"]);function $2(t,e){return e?t.filter(n=>Xw.has(n)||e==="array"&&n==="array"):[]}function E2(t,e,n){const{gen:r,data:i,opts:s}=t,a=r.let("dataType",(0,St._)`typeof ${i}`),c=r.let("coerced",(0,St._)`undefined`);s.coerceTypes==="array"&&r.if((0,St._)`${a} == 'object' && Array.isArray(${i}) && ${i}.length == 1`,()=>r.assign(i,(0,St._)`${i}[0]`).assign(a,(0,St._)`typeof ${i}`).if(Hg(e,i,s.strictNumbers),()=>r.assign(c,i))),r.if((0,St._)`${c} !== undefined`);for(const d of n)(Xw.has(d)||d==="array"&&s.coerceTypes==="array")&&l(d);r.else(),Kg(t),r.endIf(),r.if((0,St._)`${c} !== undefined`,()=>{r.assign(i,c),S2(t,c)});function l(d){switch(d){case"string":r.elseIf((0,St._)`${a} == "number" || ${a} == "boolean"`).assign(c,(0,St._)`"" + ${i}`).elseIf((0,St._)`${i} === null`).assign(c,(0,St._)`""`);return;case"number":r.elseIf((0,St._)`${a} == "boolean" || ${i} === null +`)).forEach(i=>this._lineComments.push(`#${i}`)),n!=null&&n.comment&&this._lineComments.push(`#${n.comment}`)}),this._internalDocument.comment&&this._lineComments.push(`#${this._internalDocument.comment}`)}updateFromInternalDocument(){this.root=Eu(null,this._internalDocument.contents,this._internalDocument,this.lineCounter)}set internalDocument(e){this._internalDocument=e,this.updateFromInternalDocument()}get internalDocument(){return this._internalDocument}get lineComments(){return this._lineComments||this.collectLineComments(),this._lineComments}set lineComments(e){this._lineComments=e}get errors(){return this.internalDocument.errors.map(xw)}get warnings(){return this.internalDocument.warnings.map(xw)}getNodeFromPosition(e,n,r){const i=n.getPosition(e),s=n.getLineContent(i.line);if(s.trim().length===0)return[this.findClosestNode(e,n,r),!0];const c=s.substring(i.character).match(/^([ ]+)\n?$/),l=!!c,d=c==null?void 0:c[1].length;let h;return gn(this.internalDocument,(m,E)=>{if(!E)return;const T=E.range;if(!T)return;const R=()=>l&&e+d===T[2]&&yt(E)&&E.value===null;if(T[0]<=e&&T[1]>=e||R())h=E;else return gn.SKIP}),[h,!1]}findClosestNode(e,n,r){let i=this.internalDocument.range[2],s=this.internalDocument.range[0],a;gn(this.internalDocument,(h,m)=>{if(!m)return;const E=m.range;if(!E)return;const T=E[1]-e;s<=E[0]&&T<=0&&Math.abs(T)<=i&&(i=Math.abs(T),s=E[0],a=m)});const c=n.getPosition(e),l=n.getLineContent(c.line),d=MA(l,c.character);return yt(a)&&a.value===null||d===c.character&&(a=this.getProperParentByIndentation(d,a,n,"",r)),a}getProperParentByIndentation(e,n,r,i,s,a){if(!n)return this.internalDocument.contents;if(s=s||2,on(n)&&n.range){const c=r.getPosition(n.range[0]),l=r.getLineContent(c.line);if(i=i===""?l.trim():i,i.startsWith("-")&&e===s&&i===l.trim()&&(c.character+=e),c.character>e&&c.character>0){const d=this.getParent(n);if(d)return this.getProperParentByIndentation(e,d,r,i,s,a)}else if(c.character0&&e.trim())return e;n("!include without value")}}function KO(t){const e=[],n=Ow(t);for(const r of n){const i=r.split(" "),s=i[0],a=i[1]&&i[1].toLowerCase()||"scalar";e.push(new VO(s,a))}return e.push(new HO),e}class sa{constructor(e){this.doc=e}getLineCount(){return this.doc.lineCount}getLineLength(e){const n=this.doc.getLineOffsets();return e>=n.length?this.doc.getText().length:e<0?0:(e+1=n.length)return this.doc.getText();if(e<0)return"";const r=e+1YO(T,s));return new jw(m,d)}function YO(t,e){const n=new Dd(e);return n.internalDocument=t,n}function GO(t){if(t instanceof Dd){const e=t.lineComments.find(n=>jg(n));if(e!=null){const n=e.match(/\$schema=\S+/g);if(n!==null&&n.length>=1)return n.length>=2&&console.log("Several $schema attributes have been found on the yaml-language-server modeline. The first one will be picked."),n[0].substring(8)}}}function jg(t){const e=t.match(/^#\s+yaml-language-server\s*:/g);return e!==null&&e.length===1}var xg={exports:{}},lo={},Gr={},Su={},Gc={},mt={},Jc={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.regexpCode=t.getEsmExportName=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class e{}t._CodeOrName=e,t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class n extends e{constructor(S){if(super(),!t.IDENTIFIER.test(S))throw new Error("CodeGen: name must be a valid identifier");this.str=S}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}t.Name=n;class r extends e{constructor(S){super(),this._items=typeof S=="string"?[S]:S}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const S=this._items[0];return S===""||S==='""'}get str(){var S;return(S=this._str)!==null&&S!==void 0?S:this._str=this._items.reduce((y,D)=>`${y}${D}`,"")}get names(){var S;return(S=this._names)!==null&&S!==void 0?S:this._names=this._items.reduce((y,D)=>(D instanceof n&&(y[D.str]=(y[D.str]||0)+1),y),{})}}t._Code=r,t.nil=new r("");function i(F,...S){const y=[F[0]];let D=0;for(;D{if(m.scopePath===void 0)throw new Error(`CodeGen: name "${m}" has no value`);return(0,e._)`${d}${m.scopePath}`})}scopeCode(d=this._values,h,m){return this._reduceValues(d,E=>{if(E.value===void 0)throw new Error(`CodeGen: name "${E}" has no value`);return E.value.code},h,m)}_reduceValues(d,h,m={},E){let T=e.nil;for(const R in d){const P=d[R];if(!P)continue;const A=m[R]=m[R]||new Map;P.forEach(F=>{if(A.has(F))return;A.set(F,r.Started);let S=h(F);if(S){const y=this.opts.es5?t.varKinds.var:t.varKinds.const;T=(0,e._)`${T}${y} ${F} = ${S};${this.opts._n}`}else if(S=E==null?void 0:E(F))T=(0,e._)`${T}${S}${this.opts._n}`;else throw new n(F);A.set(F,r.Completed)})}return T}}t.ValueScope=c})(Bg),function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;const e=Jc,n=Bg;var r=Jc;Object.defineProperty(t,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return r.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return r.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return r.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return r.Name}});var i=Bg;Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return i.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return i.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return i.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return i.varKinds}}),t.operators={GT:new e._Code(">"),GTE:new e._Code(">="),LT:new e._Code("<"),LTE:new e._Code("<="),EQ:new e._Code("==="),NEQ:new e._Code("!=="),NOT:new e._Code("!"),OR:new e._Code("||"),AND:new e._Code("&&"),ADD:new e._Code("+")};class s{optimizeNodes(){return this}optimizeNames(U,Z){return this}}class a extends s{constructor(U,Z,pe){super(),this.varKind=U,this.name=Z,this.rhs=pe}render({es5:U,_n:Z}){const pe=U?n.varKinds.var:this.varKind,Me=this.rhs===void 0?"":` = ${this.rhs}`;return`${pe} ${this.name}${Me};`+Z}optimizeNames(U,Z){if(!!U[this.name.str])return this.rhs&&(this.rhs=ne(this.rhs,U,Z)),this}get names(){return this.rhs instanceof e._CodeOrName?this.rhs.names:{}}}class c extends s{constructor(U,Z,pe){super(),this.lhs=U,this.rhs=Z,this.sideEffects=pe}render({_n:U}){return`${this.lhs} = ${this.rhs};`+U}optimizeNames(U,Z){if(!(this.lhs instanceof e.Name&&!U[this.lhs.str]&&!this.sideEffects))return this.rhs=ne(this.rhs,U,Z),this}get names(){const U=this.lhs instanceof e.Name?{}:{...this.lhs.names};return K(U,this.rhs)}}class l extends c{constructor(U,Z,pe,Me){super(U,pe,Me),this.op=Z}render({_n:U}){return`${this.lhs} ${this.op}= ${this.rhs};`+U}}class d extends s{constructor(U){super(),this.label=U,this.names={}}render({_n:U}){return`${this.label}:`+U}}class h extends s{constructor(U){super(),this.label=U,this.names={}}render({_n:U}){return`break${this.label?` ${this.label}`:""};`+U}}class m extends s{constructor(U){super(),this.error=U}render({_n:U}){return`throw ${this.error};`+U}get names(){return this.error.names}}class E extends s{constructor(U){super(),this.code=U}render({_n:U}){return`${this.code};`+U}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(U,Z){return this.code=ne(this.code,U,Z),this}get names(){return this.code instanceof e._CodeOrName?this.code.names:{}}}class T extends s{constructor(U=[]){super(),this.nodes=U}render(U){return this.nodes.reduce((Z,pe)=>Z+pe.render(U),"")}optimizeNodes(){const{nodes:U}=this;let Z=U.length;for(;Z--;){const pe=U[Z].optimizeNodes();Array.isArray(pe)?U.splice(Z,1,...pe):pe?U[Z]=pe:U.splice(Z,1)}return U.length>0?this:void 0}optimizeNames(U,Z){const{nodes:pe}=this;let Me=pe.length;for(;Me--;){const Ie=pe[Me];Ie.optimizeNames(U,Z)||(ge(U,Ie.names),pe.splice(Me,1))}return pe.length>0?this:void 0}get names(){return this.nodes.reduce((U,Z)=>Y(U,Z.names),{})}}class R extends T{render(U){return"{"+U._n+super.render(U)+"}"+U._n}}class P extends T{}class A extends R{}A.kind="else";class F extends R{constructor(U,Z){super(Z),this.condition=U}render(U){let Z=`if(${this.condition})`+super.render(U);return this.else&&(Z+="else "+this.else.render(U)),Z}optimizeNodes(){super.optimizeNodes();const U=this.condition;if(U===!0)return this.nodes;let Z=this.else;if(Z){const pe=Z.optimizeNodes();Z=this.else=Array.isArray(pe)?new A(pe):pe}if(Z)return U===!1?Z instanceof F?Z:Z.nodes:this.nodes.length?this:new F(ye(U),Z instanceof F?[Z]:Z.nodes);if(!(U===!1||!this.nodes.length))return this}optimizeNames(U,Z){var pe;if(this.else=(pe=this.else)===null||pe===void 0?void 0:pe.optimizeNames(U,Z),!!(super.optimizeNames(U,Z)||this.else))return this.condition=ne(this.condition,U,Z),this}get names(){const U=super.names;return K(U,this.condition),this.else&&Y(U,this.else.names),U}}F.kind="if";class S extends R{}S.kind="for";class y extends S{constructor(U){super(),this.iteration=U}render(U){return`for(${this.iteration})`+super.render(U)}optimizeNames(U,Z){if(!!super.optimizeNames(U,Z))return this.iteration=ne(this.iteration,U,Z),this}get names(){return Y(super.names,this.iteration.names)}}class D extends S{constructor(U,Z,pe,Me){super(),this.varKind=U,this.name=Z,this.from=pe,this.to=Me}render(U){const Z=U.es5?n.varKinds.var:this.varKind,{name:pe,from:Me,to:Ie}=this;return`for(${Z} ${pe}=${Me}; ${pe}<${Ie}; ${pe}++)`+super.render(U)}get names(){const U=K(super.names,this.from);return K(U,this.to)}}class v extends S{constructor(U,Z,pe,Me){super(),this.loop=U,this.varKind=Z,this.name=pe,this.iterable=Me}render(U){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(U)}optimizeNames(U,Z){if(!!super.optimizeNames(U,Z))return this.iterable=ne(this.iterable,U,Z),this}get names(){return Y(super.names,this.iterable.names)}}class _ extends R{constructor(U,Z,pe){super(),this.name=U,this.args=Z,this.async=pe}render(U){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(U)}}_.kind="func";class $ extends T{render(U){return"return "+super.render(U)}}$.kind="return";class q extends R{render(U){let Z="try"+super.render(U);return this.catch&&(Z+=this.catch.render(U)),this.finally&&(Z+=this.finally.render(U)),Z}optimizeNodes(){var U,Z;return super.optimizeNodes(),(U=this.catch)===null||U===void 0||U.optimizeNodes(),(Z=this.finally)===null||Z===void 0||Z.optimizeNodes(),this}optimizeNames(U,Z){var pe,Me;return super.optimizeNames(U,Z),(pe=this.catch)===null||pe===void 0||pe.optimizeNames(U,Z),(Me=this.finally)===null||Me===void 0||Me.optimizeNames(U,Z),this}get names(){const U=super.names;return this.catch&&Y(U,this.catch.names),this.finally&&Y(U,this.finally.names),U}}class N extends R{constructor(U){super(),this.error=U}render(U){return`catch(${this.error})`+super.render(U)}}N.kind="catch";class M extends R{render(U){return"finally"+super.render(U)}}M.kind="finally";class I{constructor(U,Z={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...Z,_n:Z.lines?` +`:""},this._extScope=U,this._scope=new n.Scope({parent:U}),this._nodes=[new P]}toString(){return this._root.render(this.opts)}name(U){return this._scope.name(U)}scopeName(U){return this._extScope.name(U)}scopeValue(U,Z){const pe=this._extScope.value(U,Z);return(this._values[pe.prefix]||(this._values[pe.prefix]=new Set)).add(pe),pe}getScopeValue(U,Z){return this._extScope.getValue(U,Z)}scopeRefs(U){return this._extScope.scopeRefs(U,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(U,Z,pe,Me){const Ie=this._scope.toName(Z);return pe!==void 0&&Me&&(this._constants[Ie.str]=pe),this._leafNode(new a(U,Ie,pe)),Ie}const(U,Z,pe){return this._def(n.varKinds.const,U,Z,pe)}let(U,Z,pe){return this._def(n.varKinds.let,U,Z,pe)}var(U,Z,pe){return this._def(n.varKinds.var,U,Z,pe)}assign(U,Z,pe){return this._leafNode(new c(U,Z,pe))}add(U,Z){return this._leafNode(new l(U,t.operators.ADD,Z))}code(U){return typeof U=="function"?U():U!==e.nil&&this._leafNode(new E(U)),this}object(...U){const Z=["{"];for(const[pe,Me]of U)Z.length>1&&Z.push(","),Z.push(pe),(pe!==Me||this.opts.es5)&&(Z.push(":"),(0,e.addCodeArg)(Z,Me));return Z.push("}"),new e._Code(Z)}if(U,Z,pe){if(this._blockNode(new F(U)),Z&&pe)this.code(Z).else().code(pe).endIf();else if(Z)this.code(Z).endIf();else if(pe)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(U){return this._elseNode(new F(U))}else(){return this._elseNode(new A)}endIf(){return this._endBlockNode(F,A)}_for(U,Z){return this._blockNode(U),Z&&this.code(Z).endFor(),this}for(U,Z){return this._for(new y(U),Z)}forRange(U,Z,pe,Me,Ie=this.opts.es5?n.varKinds.var:n.varKinds.let){const qe=this._scope.toName(U);return this._for(new D(Ie,qe,Z,pe),()=>Me(qe))}forOf(U,Z,pe,Me=n.varKinds.const){const Ie=this._scope.toName(U);if(this.opts.es5){const qe=Z instanceof e.Name?Z:this.var("_arr",Z);return this.forRange("_i",0,(0,e._)`${qe}.length`,ze=>{this.var(Ie,(0,e._)`${qe}[${ze}]`),pe(Ie)})}return this._for(new v("of",Me,Ie,Z),()=>pe(Ie))}forIn(U,Z,pe,Me=this.opts.es5?n.varKinds.var:n.varKinds.const){if(this.opts.ownProperties)return this.forOf(U,(0,e._)`Object.keys(${Z})`,pe);const Ie=this._scope.toName(U);return this._for(new v("in",Me,Ie,Z),()=>pe(Ie))}endFor(){return this._endBlockNode(S)}label(U){return this._leafNode(new d(U))}break(U){return this._leafNode(new h(U))}return(U){const Z=new $;if(this._blockNode(Z),this.code(U),Z.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode($)}try(U,Z,pe){if(!Z&&!pe)throw new Error('CodeGen: "try" without "catch" and "finally"');const Me=new q;if(this._blockNode(Me),this.code(U),Z){const Ie=this.name("e");this._currNode=Me.catch=new N(Ie),Z(Ie)}return pe&&(this._currNode=Me.finally=new M,this.code(pe)),this._endBlockNode(N,M)}throw(U){return this._leafNode(new m(U))}block(U,Z){return this._blockStarts.push(this._nodes.length),U&&this.code(U).endBlock(Z),this}endBlock(U){const Z=this._blockStarts.pop();if(Z===void 0)throw new Error("CodeGen: not in self-balancing block");const pe=this._nodes.length-Z;if(pe<0||U!==void 0&&pe!==U)throw new Error(`CodeGen: wrong number of nodes: ${pe} vs ${U} expected`);return this._nodes.length=Z,this}func(U,Z=e.nil,pe,Me){return this._blockNode(new _(U,Z,pe)),Me&&this.code(Me).endFunc(),this}endFunc(){return this._endBlockNode(_)}optimize(U=1){for(;U-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(U){return this._currNode.nodes.push(U),this}_blockNode(U){this._currNode.nodes.push(U),this._nodes.push(U)}_endBlockNode(U,Z){const pe=this._currNode;if(pe instanceof U||Z&&pe instanceof Z)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${Z?`${U.kind}/${Z.kind}`:U.kind}"`)}_elseNode(U){const Z=this._currNode;if(!(Z instanceof F))throw new Error('CodeGen: "else" without "if"');return this._currNode=Z.else=U,this}get _root(){return this._nodes[0]}get _currNode(){const U=this._nodes;return U[U.length-1]}set _currNode(U){const Z=this._nodes;Z[Z.length-1]=U}}t.CodeGen=I;function Y(ae,U){for(const Z in U)ae[Z]=(ae[Z]||0)+(U[Z]||0);return ae}function K(ae,U){return U instanceof e._CodeOrName?Y(ae,U.names):ae}function ne(ae,U,Z){if(ae instanceof e.Name)return pe(ae);if(!Me(ae))return ae;return new e._Code(ae._items.reduce((Ie,qe)=>(qe instanceof e.Name&&(qe=pe(qe)),qe instanceof e._Code?Ie.push(...qe._items):Ie.push(qe),Ie),[]));function pe(Ie){const qe=Z[Ie.str];return qe===void 0||U[Ie.str]!==1?Ie:(delete U[Ie.str],qe)}function Me(Ie){return Ie instanceof e._Code&&Ie._items.some(qe=>qe instanceof e.Name&&U[qe.str]===1&&Z[qe.str]!==void 0)}}function ge(ae,U){for(const Z in U)ae[Z]=(ae[Z]||0)-(U[Z]||0)}function ye(ae){return typeof ae=="boolean"||typeof ae=="number"||ae===null?!ae:(0,e._)`!${fe(ae)}`}t.not=ye;const De=H(t.operators.AND);function Be(...ae){return ae.reduce(De)}t.and=Be;const nt=H(t.operators.OR);function Se(...ae){return ae.reduce(nt)}t.or=Se;function H(ae){return(U,Z)=>U===e.nil?Z:Z===e.nil?U:(0,e._)`${fe(U)} ${ae} ${fe(Z)}`}function fe(ae){return ae instanceof e.Name?ae:(0,e._)`(${ae})`}}(mt);var Ve={};Object.defineProperty(Ve,"__esModule",{value:!0}),Ve.checkStrictMode=Ve.getErrorPath=Ve.Type=Ve.useFunc=Ve.setEvaluated=Ve.evaluatedPropsToName=Ve.mergeEvaluated=Ve.eachItem=Ve.unescapeJsonPointer=Ve.escapeJsonPointer=Ve.escapeFragment=Ve.unescapeFragment=Ve.schemaRefOrVal=Ve.schemaHasRulesButRef=Ve.schemaHasRules=Ve.checkUnknownRules=Ve.alwaysValidSchema=Ve.toHash=void 0;const ln=mt,JO=Jc;function QO(t){const e={};for(const n of t)e[n]=!0;return e}Ve.toHash=QO;function XO(t,e){return typeof e=="boolean"?e:Object.keys(e).length===0?!0:(Bw(t,e),!qw(e,t.self.RULES.all))}Ve.alwaysValidSchema=XO;function Bw(t,e=t.schema){const{opts:n,self:r}=t;if(!n.strictSchema||typeof e=="boolean")return;const i=r.RULES.keywords;for(const s in e)i[s]||Kw(t,`unknown keyword: "${s}"`)}Ve.checkUnknownRules=Bw;function qw(t,e){if(typeof t=="boolean")return!t;for(const n in t)if(e[n])return!0;return!1}Ve.schemaHasRules=qw;function ZO(t,e){if(typeof t=="boolean")return!t;for(const n in t)if(n!=="$ref"&&e.all[n])return!0;return!1}Ve.schemaHasRulesButRef=ZO;function e2({topSchemaRef:t,schemaPath:e},n,r,i){if(!i){if(typeof n=="number"||typeof n=="boolean")return n;if(typeof n=="string")return(0,ln._)`${n}`}return(0,ln._)`${t}${e}${(0,ln.getProperty)(r)}`}Ve.schemaRefOrVal=e2;function t2(t){return Ww(decodeURIComponent(t))}Ve.unescapeFragment=t2;function n2(t){return encodeURIComponent(qg(t))}Ve.escapeFragment=n2;function qg(t){return typeof t=="number"?`${t}`:t.replace(/~/g,"~0").replace(/\//g,"~1")}Ve.escapeJsonPointer=qg;function Ww(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}Ve.unescapeJsonPointer=Ww;function r2(t,e){if(Array.isArray(t))for(const n of t)e(n);else e(t)}Ve.eachItem=r2;function Uw({mergeNames:t,mergeToName:e,mergeValues:n,resultToName:r}){return(i,s,a,c)=>{const l=a===void 0?s:a instanceof ln.Name?(s instanceof ln.Name?t(i,s,a):e(i,s,a),a):s instanceof ln.Name?(e(i,a,s),s):n(s,a);return c===ln.Name&&!(l instanceof ln.Name)?r(i,l):l}}Ve.mergeEvaluated={props:Uw({mergeNames:(t,e,n)=>t.if((0,ln._)`${n} !== true && ${e} !== undefined`,()=>{t.if((0,ln._)`${e} === true`,()=>t.assign(n,!0),()=>t.assign(n,(0,ln._)`${n} || {}`).code((0,ln._)`Object.assign(${n}, ${e})`))}),mergeToName:(t,e,n)=>t.if((0,ln._)`${n} !== true`,()=>{e===!0?t.assign(n,!0):(t.assign(n,(0,ln._)`${n} || {}`),Wg(t,n,e))}),mergeValues:(t,e)=>t===!0?!0:{...t,...e},resultToName:Vw}),items:Uw({mergeNames:(t,e,n)=>t.if((0,ln._)`${n} !== true && ${e} !== undefined`,()=>t.assign(n,(0,ln._)`${e} === true ? true : ${n} > ${e} ? ${n} : ${e}`)),mergeToName:(t,e,n)=>t.if((0,ln._)`${n} !== true`,()=>t.assign(n,e===!0?!0:(0,ln._)`${n} > ${e} ? ${n} : ${e}`)),mergeValues:(t,e)=>t===!0?!0:Math.max(t,e),resultToName:(t,e)=>t.var("items",e)})};function Vw(t,e){if(e===!0)return t.var("props",!0);const n=t.var("props",(0,ln._)`{}`);return e!==void 0&&Wg(t,n,e),n}Ve.evaluatedPropsToName=Vw;function Wg(t,e,n){Object.keys(n).forEach(r=>t.assign((0,ln._)`${e}${(0,ln.getProperty)(r)}`,!0))}Ve.setEvaluated=Wg;const Hw={};function i2(t,e){return t.scopeValue("func",{ref:e,code:Hw[e.code]||(Hw[e.code]=new JO._Code(e.code))})}Ve.useFunc=i2;var Ug;(function(t){t[t.Num=0]="Num",t[t.Str=1]="Str"})(Ug||(Ve.Type=Ug={}));function s2(t,e,n){if(t instanceof ln.Name){const r=e===Ug.Num;return n?r?(0,ln._)`"[" + ${t} + "]"`:(0,ln._)`"['" + ${t} + "']"`:r?(0,ln._)`"/" + ${t}`:(0,ln._)`"/" + ${t}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return n?(0,ln.getProperty)(t).toString():"/"+qg(t)}Ve.getErrorPath=s2;function Kw(t,e,n=t.opts.strictSchema){if(!!n){if(e=`strict mode: ${e}`,n===!0)throw new Error(e);t.self.logger.warn(e)}}Ve.checkStrictMode=Kw;var Jr={};Object.defineProperty(Jr,"__esModule",{value:!0});const vr=mt,o2={data:new vr.Name("data"),valCxt:new vr.Name("valCxt"),instancePath:new vr.Name("instancePath"),parentData:new vr.Name("parentData"),parentDataProperty:new vr.Name("parentDataProperty"),rootData:new vr.Name("rootData"),dynamicAnchors:new vr.Name("dynamicAnchors"),vErrors:new vr.Name("vErrors"),errors:new vr.Name("errors"),this:new vr.Name("this"),self:new vr.Name("self"),scope:new vr.Name("scope"),json:new vr.Name("json"),jsonPos:new vr.Name("jsonPos"),jsonLen:new vr.Name("jsonLen"),jsonPart:new vr.Name("jsonPart")};Jr.default=o2,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;const e=mt,n=Ve,r=Jr;t.keywordError={message:({keyword:A})=>(0,e.str)`must pass "${A}" keyword validation`},t.keyword$DataError={message:({keyword:A,schemaType:F})=>F?(0,e.str)`"${A}" keyword must be ${F} ($data)`:(0,e.str)`"${A}" keyword is invalid ($data)`};function i(A,F=t.keywordError,S,y){const{it:D}=A,{gen:v,compositeRule:_,allErrors:$}=D,q=m(A,F,S);(y!=null?y:_||$)?l(v,q):d(D,(0,e._)`[${q}]`)}t.reportError=i;function s(A,F=t.keywordError,S){const{it:y}=A,{gen:D,compositeRule:v,allErrors:_}=y,$=m(A,F,S);l(D,$),v||_||d(y,r.default.vErrors)}t.reportExtraError=s;function a(A,F){A.assign(r.default.errors,F),A.if((0,e._)`${r.default.vErrors} !== null`,()=>A.if(F,()=>A.assign((0,e._)`${r.default.vErrors}.length`,F),()=>A.assign(r.default.vErrors,null)))}t.resetErrorsCount=a;function c({gen:A,keyword:F,schemaValue:S,data:y,errsCount:D,it:v}){if(D===void 0)throw new Error("ajv implementation error");const _=A.name("err");A.forRange("i",D,r.default.errors,$=>{A.const(_,(0,e._)`${r.default.vErrors}[${$}]`),A.if((0,e._)`${_}.instancePath === undefined`,()=>A.assign((0,e._)`${_}.instancePath`,(0,e.strConcat)(r.default.instancePath,v.errorPath))),A.assign((0,e._)`${_}.schemaPath`,(0,e.str)`${v.errSchemaPath}/${F}`),v.opts.verbose&&(A.assign((0,e._)`${_}.schema`,S),A.assign((0,e._)`${_}.data`,y))})}t.extendErrors=c;function l(A,F){const S=A.const("err",F);A.if((0,e._)`${r.default.vErrors} === null`,()=>A.assign(r.default.vErrors,(0,e._)`[${S}]`),(0,e._)`${r.default.vErrors}.push(${S})`),A.code((0,e._)`${r.default.errors}++`)}function d(A,F){const{gen:S,validateName:y,schemaEnv:D}=A;D.$async?S.throw((0,e._)`new ${A.ValidationError}(${F})`):(S.assign((0,e._)`${y}.errors`,F),S.return(!1))}const h={keyword:new e.Name("keyword"),schemaPath:new e.Name("schemaPath"),params:new e.Name("params"),propertyName:new e.Name("propertyName"),message:new e.Name("message"),schema:new e.Name("schema"),parentSchema:new e.Name("parentSchema")};function m(A,F,S){const{createErrors:y}=A.it;return y===!1?(0,e._)`{}`:E(A,F,S)}function E(A,F,S={}){const{gen:y,it:D}=A,v=[T(D,S),R(A,S)];return P(A,F,v),y.object(...v)}function T({errorPath:A},{instancePath:F}){const S=F?(0,e.str)`${A}${(0,n.getErrorPath)(F,n.Type.Str)}`:A;return[r.default.instancePath,(0,e.strConcat)(r.default.instancePath,S)]}function R({keyword:A,it:{errSchemaPath:F}},{schemaPath:S,parentSchema:y}){let D=y?F:(0,e.str)`${F}/${A}`;return S&&(D=(0,e.str)`${D}${(0,n.getErrorPath)(S,n.Type.Str)}`),[h.schemaPath,D]}function P(A,{params:F,message:S},y){const{keyword:D,data:v,schemaValue:_,it:$}=A,{opts:q,propertyName:N,topSchemaRef:M,schemaPath:I}=$;y.push([h.keyword,D],[h.params,typeof F=="function"?F(A):F||(0,e._)`{}`]),q.messages&&y.push([h.message,typeof S=="function"?S(A):S]),q.verbose&&y.push([h.schema,_],[h.parentSchema,(0,e._)`${M}${I}`],[r.default.data,v]),N&&y.push([h.propertyName,N])}}(Gc),Object.defineProperty(Su,"__esModule",{value:!0}),Su.boolOrEmptySchema=Su.topBoolOrEmptySchema=void 0;const a2=Gc,u2=mt,c2=Jr,l2={message:"boolean schema is false"};function f2(t){const{gen:e,schema:n,validateName:r}=t;n===!1?zw(t,!1):typeof n=="object"&&n.$async===!0?e.return(c2.default.data):(e.assign((0,u2._)`${r}.errors`,null),e.return(!0))}Su.topBoolOrEmptySchema=f2;function d2(t,e){const{gen:n,schema:r}=t;r===!1?(n.var(e,!1),zw(t)):n.var(e,!0)}Su.boolOrEmptySchema=d2;function zw(t,e){const{gen:n,data:r}=t,i={gen:n,keyword:"false schema",data:r,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:t};(0,a2.reportError)(i,l2,void 0,e)}var tr={},oa={};Object.defineProperty(oa,"__esModule",{value:!0}),oa.getRules=oa.isJSONType=void 0;const h2=["string","number","integer","boolean","null","object","array"],p2=new Set(h2);function m2(t){return typeof t=="string"&&p2.has(t)}oa.isJSONType=m2;function g2(){const t={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...t,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},t.number,t.string,t.array,t.object],post:{rules:[]},all:{},keywords:{}}}oa.getRules=g2;var ks={};Object.defineProperty(ks,"__esModule",{value:!0}),ks.shouldUseRule=ks.shouldUseGroup=ks.schemaHasRulesForType=void 0;function y2({schema:t,self:e},n){const r=e.RULES.types[n];return r&&r!==!0&&Yw(t,r)}ks.schemaHasRulesForType=y2;function Yw(t,e){return e.rules.some(n=>Gw(t,n))}ks.shouldUseGroup=Yw;function Gw(t,e){var n;return t[e.keyword]!==void 0||((n=e.definition.implements)===null||n===void 0?void 0:n.some(r=>t[r]!==void 0))}ks.shouldUseRule=Gw,Object.defineProperty(tr,"__esModule",{value:!0}),tr.reportTypeError=tr.checkDataTypes=tr.checkDataType=tr.coerceAndCheckDataType=tr.getJSONTypes=tr.getSchemaTypes=tr.DataType=void 0;const v2=oa,b2=ks,D2=Gc,St=mt,Jw=Ve;var ku;(function(t){t[t.Correct=0]="Correct",t[t.Wrong=1]="Wrong"})(ku||(tr.DataType=ku={}));function w2(t){const e=Qw(t.type);if(e.includes("null")){if(t.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!e.length&&t.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');t.nullable===!0&&e.push("null")}return e}tr.getSchemaTypes=w2;function Qw(t){const e=Array.isArray(t)?t:t?[t]:[];if(e.every(v2.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}tr.getJSONTypes=Qw;function _2(t,e){const{gen:n,data:r,opts:i}=t,s=$2(e,i.coerceTypes),a=e.length>0&&!(s.length===0&&e.length===1&&(0,b2.schemaHasRulesForType)(t,e[0]));if(a){const c=Hg(e,r,i.strictNumbers,ku.Wrong);n.if(c,()=>{s.length?E2(t,e,s):Kg(t)})}return a}tr.coerceAndCheckDataType=_2;const Xw=new Set(["string","number","integer","boolean","null"]);function $2(t,e){return e?t.filter(n=>Xw.has(n)||e==="array"&&n==="array"):[]}function E2(t,e,n){const{gen:r,data:i,opts:s}=t,a=r.let("dataType",(0,St._)`typeof ${i}`),c=r.let("coerced",(0,St._)`undefined`);s.coerceTypes==="array"&&r.if((0,St._)`${a} == 'object' && Array.isArray(${i}) && ${i}.length == 1`,()=>r.assign(i,(0,St._)`${i}[0]`).assign(a,(0,St._)`typeof ${i}`).if(Hg(e,i,s.strictNumbers),()=>r.assign(c,i))),r.if((0,St._)`${c} !== undefined`);for(const d of n)(Xw.has(d)||d==="array"&&s.coerceTypes==="array")&&l(d);r.else(),Kg(t),r.endIf(),r.if((0,St._)`${c} !== undefined`,()=>{r.assign(i,c),S2(t,c)});function l(d){switch(d){case"string":r.elseIf((0,St._)`${a} == "number" || ${a} == "boolean"`).assign(c,(0,St._)`"" + ${i}`).elseIf((0,St._)`${i} === null`).assign(c,(0,St._)`""`);return;case"number":r.elseIf((0,St._)`${a} == "boolean" || ${i} === null || (${a} == "string" && ${i} && ${i} == +${i})`).assign(c,(0,St._)`+${i}`);return;case"integer":r.elseIf((0,St._)`${a} === "boolean" || ${i} === null || (${a} === "string" && ${i} && ${i} == +${i} && !(${i} % 1))`).assign(c,(0,St._)`+${i}`);return;case"boolean":r.elseIf((0,St._)`${i} === "false" || ${i} === 0 || ${i} === null`).assign(c,!1).elseIf((0,St._)`${i} === "true" || ${i} === 1`).assign(c,!0);return;case"null":r.elseIf((0,St._)`${i} === "" || ${i} === 0 || ${i} === false`),r.assign(c,null);return;case"array":r.elseIf((0,St._)`${a} === "string" || ${a} === "number" - || ${a} === "boolean" || ${i} === null`).assign(c,(0,St._)`[${i}]`)}}}function S2({gen:t,parentData:e,parentDataProperty:n},r){t.if((0,St._)`${e} !== undefined`,()=>t.assign((0,St._)`${e}[${n}]`,r))}function Vg(t,e,n,r=Tu.Correct){const i=r===Tu.Correct?St.operators.EQ:St.operators.NEQ;let s;switch(t){case"null":return(0,St._)`${e} ${i} null`;case"array":s=(0,St._)`Array.isArray(${e})`;break;case"object":s=(0,St._)`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":s=a((0,St._)`!(${e} % 1) && !isNaN(${e})`);break;case"number":s=a();break;default:return(0,St._)`typeof ${e} ${i} ${t}`}return r===Tu.Correct?s:(0,St.not)(s);function a(c=St.nil){return(0,St.and)((0,St._)`typeof ${e} == "number"`,c,n?(0,St._)`isFinite(${e})`:St.nil)}}tr.checkDataType=Vg;function Hg(t,e,n,r){if(t.length===1)return Vg(t[0],e,n,r);let i;const s=(0,Jw.toHash)(t);if(s.array&&s.object){const a=(0,St._)`typeof ${e} != "object"`;i=s.null?a:(0,St._)`!${e} || ${a}`,delete s.null,delete s.array,delete s.object}else i=St.nil;s.number&&delete s.integer;for(const a in s)i=(0,St.and)(i,Vg(a,e,n,r));return i}tr.checkDataTypes=Hg;const T2={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:e})=>typeof t=="string"?(0,St._)`{type: ${t}}`:(0,St._)`{type: ${e}}`};function Kg(t){const e=k2(t);(0,D2.reportError)(e,T2)}tr.reportTypeError=Kg;function k2(t){const{gen:e,data:n,schema:r}=t,i=(0,Jw.schemaRefOrVal)(t,r,"type");return{gen:e,keyword:"type",data:n,schema:r.type,schemaCode:i,schemaValue:i,parentSchema:r,params:{},it:t}}var wd={};Object.defineProperty(wd,"__esModule",{value:!0}),wd.assignDefaults=void 0;const ku=mt,A2=Ve;function C2(t,e){const{properties:n,items:r}=t.schema;if(e==="object"&&n)for(const i in n)Zw(t,i,n[i].default);else e==="array"&&Array.isArray(r)&&r.forEach((i,s)=>Zw(t,s,i.default))}wd.assignDefaults=C2;function Zw(t,e,n){const{gen:r,compositeRule:i,data:s,opts:a}=t;if(n===void 0)return;const c=(0,ku._)`${s}${(0,ku.getProperty)(e)}`;if(i){(0,A2.checkStrictMode)(t,`default is ignored for: ${c}`);return}let l=(0,ku._)`${c} === undefined`;a.useDefaults==="empty"&&(l=(0,ku._)`${l} || ${c} === null || ${c} === ""`),r.if(l,(0,ku._)`${c} = ${(0,ku.stringify)(n)}`)}var os={},Ct={};Object.defineProperty(Ct,"__esModule",{value:!0}),Ct.validateUnion=Ct.validateArray=Ct.usePattern=Ct.callValidateCode=Ct.schemaProperties=Ct.allSchemaProperties=Ct.noPropertyInData=Ct.propertyInData=Ct.isOwnProperty=Ct.hasPropFunc=Ct.reportMissingProp=Ct.checkMissingProp=Ct.checkReportMissingProp=void 0;const yn=mt,zg=Ve,fo=Jr,O2=Ve;function P2(t,e){const{gen:n,data:r,it:i}=t;n.if(Gg(n,r,e,i.opts.ownProperties),()=>{t.setParams({missingProperty:(0,yn._)`${e}`},!0),t.error()})}Ct.checkReportMissingProp=P2;function N2({gen:t,data:e,it:{opts:n}},r,i){return(0,yn.or)(...r.map(s=>(0,yn.and)(Gg(t,e,s,n.ownProperties),(0,yn._)`${i} = ${s}`)))}Ct.checkMissingProp=N2;function F2(t,e){t.setParams({missingProperty:e},!0),t.error()}Ct.reportMissingProp=F2;function e_(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,yn._)`Object.prototype.hasOwnProperty`})}Ct.hasPropFunc=e_;function Yg(t,e,n){return(0,yn._)`${e_(t)}.call(${e}, ${n})`}Ct.isOwnProperty=Yg;function R2(t,e,n,r){const i=(0,yn._)`${e}${(0,yn.getProperty)(n)} !== undefined`;return r?(0,yn._)`${i} && ${Yg(t,e,n)}`:i}Ct.propertyInData=R2;function Gg(t,e,n,r){const i=(0,yn._)`${e}${(0,yn.getProperty)(n)} === undefined`;return r?(0,yn.or)(i,(0,yn.not)(Yg(t,e,n))):i}Ct.noPropertyInData=Gg;function t_(t){return t?Object.keys(t).filter(e=>e!=="__proto__"):[]}Ct.allSchemaProperties=t_;function I2(t,e){return t_(e).filter(n=>!(0,zg.alwaysValidSchema)(t,e[n]))}Ct.schemaProperties=I2;function M2({schemaCode:t,data:e,it:{gen:n,topSchemaRef:r,schemaPath:i,errorPath:s},it:a},c,l,d){const h=d?(0,yn._)`${t}, ${e}, ${r}${i}`:e,m=[[fo.default.instancePath,(0,yn.strConcat)(fo.default.instancePath,s)],[fo.default.parentData,a.parentData],[fo.default.parentDataProperty,a.parentDataProperty],[fo.default.rootData,fo.default.rootData]];a.opts.dynamicRef&&m.push([fo.default.dynamicAnchors,fo.default.dynamicAnchors]);const E=(0,yn._)`${h}, ${n.object(...m)}`;return l!==yn.nil?(0,yn._)`${c}.call(${l}, ${E})`:(0,yn._)`${c}(${E})`}Ct.callValidateCode=M2;const L2=(0,yn._)`new RegExp`;function j2({gen:t,it:{opts:e}},n){const r=e.unicodeRegExp?"u":"",{regExp:i}=e.code,s=i(n,r);return t.scopeValue("pattern",{key:s.toString(),ref:s,code:(0,yn._)`${i.code==="new RegExp"?L2:(0,O2.useFunc)(t,i)}(${n}, ${r})`})}Ct.usePattern=j2;function x2(t){const{gen:e,data:n,keyword:r,it:i}=t,s=e.name("valid");if(i.allErrors){const c=e.let("valid",!0);return a(()=>e.assign(c,!1)),c}return e.var(s,!0),a(()=>e.break()),s;function a(c){const l=e.const("len",(0,yn._)`${n}.length`);e.forRange("i",0,l,d=>{t.subschema({keyword:r,dataProp:d,dataPropType:zg.Type.Num},s),e.if((0,yn.not)(s),c)})}}Ct.validateArray=x2;function B2(t){const{gen:e,schema:n,keyword:r,it:i}=t;if(!Array.isArray(n))throw new Error("ajv implementation error");if(n.some(l=>(0,zg.alwaysValidSchema)(i,l))&&!i.opts.unevaluated)return;const a=e.let("valid",!1),c=e.name("_valid");e.block(()=>n.forEach((l,d)=>{const h=t.subschema({keyword:r,schemaProp:d,compositeRule:!0},c);e.assign(a,(0,yn._)`${a} || ${c}`),t.mergeValidEvaluated(h,c)||e.if((0,yn.not)(a))})),t.result(a,()=>t.reset(),()=>t.error(!0))}Ct.validateUnion=B2,Object.defineProperty(os,"__esModule",{value:!0}),os.validateKeywordUsage=os.validSchemaType=os.funcKeywordCode=os.macroKeywordCode=void 0;const Sr=mt,aa=Jr,q2=Ct,W2=Gc;function U2(t,e){const{gen:n,keyword:r,schema:i,parentSchema:s,it:a}=t,c=e.macro.call(a.self,i,s,a),l=r_(n,r,c);a.opts.validateSchema!==!1&&a.self.validateSchema(c,!0);const d=n.name("valid");t.subschema({schema:c,schemaPath:Sr.nil,errSchemaPath:`${a.errSchemaPath}/${r}`,topSchemaRef:l,compositeRule:!0},d),t.pass(d,()=>t.error(!0))}os.macroKeywordCode=U2;function V2(t,e){var n;const{gen:r,keyword:i,schema:s,parentSchema:a,$data:c,it:l}=t;K2(l,e);const d=!c&&e.compile?e.compile.call(l.self,s,a,l):e.validate,h=r_(r,i,d),m=r.let("valid");t.block$data(m,E),t.ok((n=e.valid)!==null&&n!==void 0?n:m);function E(){if(e.errors===!1)P(),e.modifying&&n_(t),A(()=>t.error());else{const N=e.async?k():R();e.modifying&&n_(t),A(()=>H2(t,N))}}function k(){const N=r.let("ruleErrs",null);return r.try(()=>P((0,Sr._)`await `),S=>r.assign(m,!1).if((0,Sr._)`${S} instanceof ${l.ValidationError}`,()=>r.assign(N,(0,Sr._)`${S}.errors`),()=>r.throw(S))),N}function R(){const N=(0,Sr._)`${h}.errors`;return r.assign(N,null),P(Sr.nil),N}function P(N=e.async?(0,Sr._)`await `:Sr.nil){const S=l.opts.passContext?aa.default.this:aa.default.self,y=!("compile"in e&&!c||e.schema===!1);r.assign(m,(0,Sr._)`${N}${(0,q2.callValidateCode)(t,h,S,y)}`,e.modifying)}function A(N){var S;r.if((0,Sr.not)((S=e.valid)!==null&&S!==void 0?S:m),N)}}os.funcKeywordCode=V2;function n_(t){const{gen:e,data:n,it:r}=t;e.if(r.parentData,()=>e.assign(n,(0,Sr._)`${r.parentData}[${r.parentDataProperty}]`))}function H2(t,e){const{gen:n}=t;n.if((0,Sr._)`Array.isArray(${e})`,()=>{n.assign(aa.default.vErrors,(0,Sr._)`${aa.default.vErrors} === null ? ${e} : ${aa.default.vErrors}.concat(${e})`).assign(aa.default.errors,(0,Sr._)`${aa.default.vErrors}.length`),(0,W2.extendErrors)(t)},()=>t.error())}function K2({schemaEnv:t},e){if(e.async&&!t.$async)throw new Error("async keyword in sync schema")}function r_(t,e,n){if(n===void 0)throw new Error(`keyword "${e}" failed to compile`);return t.scopeValue("keyword",typeof n=="function"?{ref:n}:{ref:n,code:(0,Sr.stringify)(n)})}function z2(t,e,n=!1){return!e.length||e.some(r=>r==="array"?Array.isArray(t):r==="object"?t&&typeof t=="object"&&!Array.isArray(t):typeof t==r||n&&typeof t>"u")}os.validSchemaType=z2;function Y2({schema:t,opts:e,self:n,errSchemaPath:r},i,s){if(Array.isArray(i.keyword)?!i.keyword.includes(s):i.keyword!==s)throw new Error("ajv implementation error");const a=i.dependencies;if(a!=null&&a.some(c=>!Object.prototype.hasOwnProperty.call(t,c)))throw new Error(`parent schema must have dependencies of ${s}: ${a.join(",")}`);if(i.validateSchema&&!i.validateSchema(t[s])){const l=`keyword "${s}" value is invalid at path "${r}": `+n.errorsText(i.validateSchema.errors);if(e.validateSchema==="log")n.logger.error(l);else throw new Error(l)}}os.validateKeywordUsage=Y2;var ho={};Object.defineProperty(ho,"__esModule",{value:!0}),ho.extendSubschemaMode=ho.extendSubschemaData=ho.getSubschema=void 0;const as=mt,i_=Ve;function G2(t,{keyword:e,schemaProp:n,schema:r,schemaPath:i,errSchemaPath:s,topSchemaRef:a}){if(e!==void 0&&r!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(e!==void 0){const c=t.schema[e];return n===void 0?{schema:c,schemaPath:(0,as._)`${t.schemaPath}${(0,as.getProperty)(e)}`,errSchemaPath:`${t.errSchemaPath}/${e}`}:{schema:c[n],schemaPath:(0,as._)`${t.schemaPath}${(0,as.getProperty)(e)}${(0,as.getProperty)(n)}`,errSchemaPath:`${t.errSchemaPath}/${e}/${(0,i_.escapeFragment)(n)}`}}if(r!==void 0){if(i===void 0||s===void 0||a===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:r,schemaPath:i,topSchemaRef:a,errSchemaPath:s}}throw new Error('either "keyword" or "schema" must be passed')}ho.getSubschema=G2;function J2(t,e,{dataProp:n,dataPropType:r,data:i,dataTypes:s,propertyName:a}){if(i!==void 0&&n!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:c}=e;if(n!==void 0){const{errorPath:d,dataPathArr:h,opts:m}=e,E=c.let("data",(0,as._)`${e.data}${(0,as.getProperty)(n)}`,!0);l(E),t.errorPath=(0,as.str)`${d}${(0,i_.getErrorPath)(n,r,m.jsPropertySyntax)}`,t.parentDataProperty=(0,as._)`${n}`,t.dataPathArr=[...h,t.parentDataProperty]}if(i!==void 0){const d=i instanceof as.Name?i:c.let("data",i,!0);l(d),a!==void 0&&(t.propertyName=a)}s&&(t.dataTypes=s);function l(d){t.data=d,t.dataLevel=e.dataLevel+1,t.dataTypes=[],e.definedProperties=new Set,t.parentData=e.data,t.dataNames=[...e.dataNames,d]}}ho.extendSubschemaData=J2;function Q2(t,{jtdDiscriminator:e,jtdMetadata:n,compositeRule:r,createErrors:i,allErrors:s}){r!==void 0&&(t.compositeRule=r),i!==void 0&&(t.createErrors=i),s!==void 0&&(t.allErrors=s),t.jtdDiscriminator=e,t.jtdMetadata=n}ho.extendSubschemaMode=Q2;var fr={},s_=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var r,i,s;if(Array.isArray(e)){if(r=e.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!t(e[i],n[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(s=Object.keys(e),r=s.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,s[i]))return!1;for(i=r;i--!==0;){var a=s[i];if(!t(e[a],n[a]))return!1}return!0}return e!==e&&n!==n},o_={exports:{}},po=o_.exports=function(t,e,n){typeof e=="function"&&(n=e,e={}),n=e.cb||n;var r=typeof n=="function"?n:n.pre||function(){},i=n.post||function(){};_d(e,r,i,t,"",t)};po.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},po.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},po.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},po.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function _d(t,e,n,r,i,s,a,c,l,d){if(r&&typeof r=="object"&&!Array.isArray(r)){e(r,i,s,a,c,l,d);for(var h in r){var m=r[h];if(Array.isArray(m)){if(h in po.arrayKeywords)for(var E=0;Ee+=a_(r)),e===1/0))return 1/0}return e}function u_(t,e="",n){n!==!1&&(e=Au(e));const r=t.parse(e);return c_(t,r)}fr.getFullPath=u_;function c_(t,e){return t.serialize(e).split("#")[0]+"#"}fr._getFullPath=c_;const sP=/#\/?$/;function Au(t){return t?t.replace(sP,""):""}fr.normalizeId=Au;function oP(t,e,n){return n=Au(n),t.resolve(e,n)}fr.resolveUrl=oP;const aP=/^[a-z_][-a-z0-9._]*$/i;function uP(t,e){if(typeof t=="boolean")return{};const{schemaId:n,uriResolver:r}=this.opts,i=Au(t[n]||e),s={"":i},a=u_(r,i,!1),c={},l=new Set;return tP(t,{allKeys:!0},(m,E,k,R)=>{if(R===void 0)return;const P=a+E;let A=s[R];typeof m[n]=="string"&&(A=N.call(this,m[n])),S.call(this,m.$anchor),S.call(this,m.$dynamicAnchor),s[E]=A;function N(y){const D=this.opts.uriResolver.resolve;if(y=Au(A?D(A,y):y),l.has(y))throw h(y);l.add(y);let v=this.refs[y];return typeof v=="string"&&(v=this.refs[v]),typeof v=="object"?d(m,v.schema,y):y!==Au(P)&&(y[0]==="#"?(d(m,c[y],y),c[y]=m):this.refs[y]=P),y}function S(y){if(typeof y=="string"){if(!aP.test(y))throw new Error(`invalid anchor "${y}"`);N.call(this,`#${y}`)}}}),c;function d(m,E,k){if(E!==void 0&&!eP(m,E))throw h(k)}function h(m){return new Error(`reference "${m}" resolves to more than one schema`)}}fr.getSchemaRefs=uP,Object.defineProperty(Gr,"__esModule",{value:!0}),Gr.getData=Gr.KeywordCxt=Gr.validateFunctionCode=void 0;const l_=Su,f_=tr,Qg=Ts,$d=tr,cP=wd,Qc=os,Xg=ho,Ze=mt,dt=Jr,lP=fr,ks=Ve,Xc=Gc;function fP(t){if(m_(t)&&(g_(t),p_(t))){pP(t);return}d_(t,()=>(0,l_.topBoolOrEmptySchema)(t))}Gr.validateFunctionCode=fP;function d_({gen:t,validateName:e,schema:n,schemaEnv:r,opts:i},s){i.code.es5?t.func(e,(0,Ze._)`${dt.default.data}, ${dt.default.valCxt}`,r.$async,()=>{t.code((0,Ze._)`"use strict"; ${h_(n,i)}`),hP(t,i),t.code(s)}):t.func(e,(0,Ze._)`${dt.default.data}, ${dP(i)}`,r.$async,()=>t.code(h_(n,i)).code(s))}function dP(t){return(0,Ze._)`{${dt.default.instancePath}="", ${dt.default.parentData}, ${dt.default.parentDataProperty}, ${dt.default.rootData}=${dt.default.data}${t.dynamicRef?(0,Ze._)`, ${dt.default.dynamicAnchors}={}`:Ze.nil}}={}`}function hP(t,e){t.if(dt.default.valCxt,()=>{t.var(dt.default.instancePath,(0,Ze._)`${dt.default.valCxt}.${dt.default.instancePath}`),t.var(dt.default.parentData,(0,Ze._)`${dt.default.valCxt}.${dt.default.parentData}`),t.var(dt.default.parentDataProperty,(0,Ze._)`${dt.default.valCxt}.${dt.default.parentDataProperty}`),t.var(dt.default.rootData,(0,Ze._)`${dt.default.valCxt}.${dt.default.rootData}`),e.dynamicRef&&t.var(dt.default.dynamicAnchors,(0,Ze._)`${dt.default.valCxt}.${dt.default.dynamicAnchors}`)},()=>{t.var(dt.default.instancePath,(0,Ze._)`""`),t.var(dt.default.parentData,(0,Ze._)`undefined`),t.var(dt.default.parentDataProperty,(0,Ze._)`undefined`),t.var(dt.default.rootData,dt.default.data),e.dynamicRef&&t.var(dt.default.dynamicAnchors,(0,Ze._)`{}`)})}function pP(t){const{schema:e,opts:n,gen:r}=t;d_(t,()=>{n.$comment&&e.$comment&&v_(t),bP(t),r.let(dt.default.vErrors,null),r.let(dt.default.errors,0),n.unevaluated&&mP(t),y_(t),_P(t)})}function mP(t){const{gen:e,validateName:n}=t;t.evaluated=e.const("evaluated",(0,Ze._)`${n}.evaluated`),e.if((0,Ze._)`${t.evaluated}.dynamicProps`,()=>e.assign((0,Ze._)`${t.evaluated}.props`,(0,Ze._)`undefined`)),e.if((0,Ze._)`${t.evaluated}.dynamicItems`,()=>e.assign((0,Ze._)`${t.evaluated}.items`,(0,Ze._)`undefined`))}function h_(t,e){const n=typeof t=="object"&&t[e.schemaId];return n&&(e.code.source||e.code.process)?(0,Ze._)`/*# sourceURL=${n} */`:Ze.nil}function gP(t,e){if(m_(t)&&(g_(t),p_(t))){yP(t,e);return}(0,l_.boolOrEmptySchema)(t,e)}function p_({schema:t,self:e}){if(typeof t=="boolean")return!t;for(const n in t)if(e.RULES.all[n])return!0;return!1}function m_(t){return typeof t.schema!="boolean"}function yP(t,e){const{schema:n,gen:r,opts:i}=t;i.$comment&&n.$comment&&v_(t),DP(t),wP(t);const s=r.const("_errs",dt.default.errors);y_(t,s),r.var(e,(0,Ze._)`${s} === ${dt.default.errors}`)}function g_(t){(0,ks.checkUnknownRules)(t),vP(t)}function y_(t,e){if(t.opts.jtd)return b_(t,[],!1,e);const n=(0,f_.getSchemaTypes)(t.schema),r=(0,f_.coerceAndCheckDataType)(t,n);b_(t,n,!r,e)}function vP(t){const{schema:e,errSchemaPath:n,opts:r,self:i}=t;e.$ref&&r.ignoreKeywordsWithRef&&(0,ks.schemaHasRulesButRef)(e,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${n}"`)}function bP(t){const{schema:e,opts:n}=t;e.default!==void 0&&n.useDefaults&&n.strictSchema&&(0,ks.checkStrictMode)(t,"default is ignored in the schema root")}function DP(t){const e=t.schema[t.opts.schemaId];e&&(t.baseId=(0,lP.resolveUrl)(t.opts.uriResolver,t.baseId,e))}function wP(t){if(t.schema.$async&&!t.schemaEnv.$async)throw new Error("async schema in sync schema")}function v_({gen:t,schemaEnv:e,schema:n,errSchemaPath:r,opts:i}){const s=n.$comment;if(i.$comment===!0)t.code((0,Ze._)`${dt.default.self}.logger.log(${s})`);else if(typeof i.$comment=="function"){const a=(0,Ze.str)`${r}/$comment`,c=t.scopeValue("root",{ref:e.root});t.code((0,Ze._)`${dt.default.self}.opts.$comment(${s}, ${a}, ${c}.schema)`)}}function _P(t){const{gen:e,schemaEnv:n,validateName:r,ValidationError:i,opts:s}=t;n.$async?e.if((0,Ze._)`${dt.default.errors} === 0`,()=>e.return(dt.default.data),()=>e.throw((0,Ze._)`new ${i}(${dt.default.vErrors})`)):(e.assign((0,Ze._)`${r}.errors`,dt.default.vErrors),s.unevaluated&&$P(t),e.return((0,Ze._)`${dt.default.errors} === 0`))}function $P({gen:t,evaluated:e,props:n,items:r}){n instanceof Ze.Name&&t.assign((0,Ze._)`${e}.props`,n),r instanceof Ze.Name&&t.assign((0,Ze._)`${e}.items`,r)}function b_(t,e,n,r){const{gen:i,schema:s,data:a,allErrors:c,opts:l,self:d}=t,{RULES:h}=d;if(s.$ref&&(l.ignoreKeywordsWithRef||!(0,ks.schemaHasRulesButRef)(s,h))){i.block(()=>$_(t,"$ref",h.all.$ref.definition));return}l.jtd||EP(t,e),i.block(()=>{for(const E of h.rules)m(E);m(h.post)});function m(E){!(0,Qg.shouldUseGroup)(s,E)||(E.type?(i.if((0,$d.checkDataType)(E.type,a,l.strictNumbers)),D_(t,E),e.length===1&&e[0]===E.type&&n&&(i.else(),(0,$d.reportTypeError)(t)),i.endIf()):D_(t,E),c||i.if((0,Ze._)`${dt.default.errors} === ${r||0}`))}}function D_(t,e){const{gen:n,schema:r,opts:{useDefaults:i}}=t;i&&(0,cP.assignDefaults)(t,e.type),n.block(()=>{for(const s of e.rules)(0,Qg.shouldUseRule)(r,s)&&$_(t,s.keyword,s.definition,e.type)})}function EP(t,e){t.schemaEnv.meta||!t.opts.strictTypes||(SP(t,e),t.opts.allowUnionTypes||TP(t,e),kP(t,t.dataTypes))}function SP(t,e){if(!!e.length){if(!t.dataTypes.length){t.dataTypes=e;return}e.forEach(n=>{w_(t.dataTypes,n)||Zg(t,`type "${n}" not allowed by context "${t.dataTypes.join(",")}"`)}),CP(t,e)}}function TP(t,e){e.length>1&&!(e.length===2&&e.includes("null"))&&Zg(t,"use allowUnionTypes to allow union type keyword")}function kP(t,e){const n=t.self.RULES.all;for(const r in n){const i=n[r];if(typeof i=="object"&&(0,Qg.shouldUseRule)(t.schema,i)){const{type:s}=i.definition;s.length&&!s.some(a=>AP(e,a))&&Zg(t,`missing type "${s.join(",")}" for keyword "${r}"`)}}}function AP(t,e){return t.includes(e)||e==="number"&&t.includes("integer")}function w_(t,e){return t.includes(e)||e==="integer"&&t.includes("number")}function CP(t,e){const n=[];for(const r of t.dataTypes)w_(e,r)?n.push(r):e.includes("integer")&&r==="number"&&n.push("integer");t.dataTypes=n}function Zg(t,e){const n=t.schemaEnv.baseId+t.errSchemaPath;e+=` at "${n}" (strictTypes)`,(0,ks.checkStrictMode)(t,e,t.opts.strictTypes)}class __{constructor(e,n,r){if((0,Qc.validateKeywordUsage)(e,n,r),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=r,this.data=e.data,this.schema=e.schema[r],this.$data=n.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,ks.schemaRefOrVal)(e,this.schema,r,this.$data),this.schemaType=n.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=n,this.$data)this.schemaCode=e.gen.const("vSchema",E_(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,Qc.validSchemaType)(this.schema,n.schemaType,n.allowUndefined))throw new Error(`${r} value must be ${JSON.stringify(n.schemaType)}`);("code"in n?n.trackErrors:n.errors!==!1)&&(this.errsCount=e.gen.const("_errs",dt.default.errors))}result(e,n,r){this.failResult((0,Ze.not)(e),n,r)}failResult(e,n,r){this.gen.if(e),r?r():this.error(),n?(this.gen.else(),n(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,n){this.failResult((0,Ze.not)(e),void 0,n)}fail(e){if(e===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);const{schemaCode:n}=this;this.fail((0,Ze._)`${n} !== undefined && (${(0,Ze.or)(this.invalid$data(),e)})`)}error(e,n,r){if(n){this.setParams(n),this._error(e,r),this.setParams({});return}this._error(e,r)}_error(e,n){(e?Xc.reportExtraError:Xc.reportError)(this,this.def.error,n)}$dataError(){(0,Xc.reportError)(this,this.def.$dataError||Xc.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,Xc.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,n){n?Object.assign(this.params,e):this.params=e}block$data(e,n,r=Ze.nil){this.gen.block(()=>{this.check$data(e,r),n()})}check$data(e=Ze.nil,n=Ze.nil){if(!this.$data)return;const{gen:r,schemaCode:i,schemaType:s,def:a}=this;r.if((0,Ze.or)((0,Ze._)`${i} === undefined`,n)),e!==Ze.nil&&r.assign(e,!0),(s.length||a.validateSchema)&&(r.elseIf(this.invalid$data()),this.$dataError(),e!==Ze.nil&&r.assign(e,!1)),r.else()}invalid$data(){const{gen:e,schemaCode:n,schemaType:r,def:i,it:s}=this;return(0,Ze.or)(a(),c());function a(){if(r.length){if(!(n instanceof Ze.Name))throw new Error("ajv implementation error");const l=Array.isArray(r)?r:[r];return(0,Ze._)`${(0,$d.checkDataTypes)(l,n,s.opts.strictNumbers,$d.DataType.Wrong)}`}return Ze.nil}function c(){if(i.validateSchema){const l=e.scopeValue("validate$data",{ref:i.validateSchema});return(0,Ze._)`!${l}(${n})`}return Ze.nil}}subschema(e,n){const r=(0,Xg.getSubschema)(this.it,e);(0,Xg.extendSubschemaData)(r,this.it,e),(0,Xg.extendSubschemaMode)(r,e);const i={...this.it,...r,items:void 0,props:void 0};return gP(i,n),i}mergeEvaluated(e,n){const{it:r,gen:i}=this;!r.opts.unevaluated||(r.props!==!0&&e.props!==void 0&&(r.props=ks.mergeEvaluated.props(i,e.props,r.props,n)),r.items!==!0&&e.items!==void 0&&(r.items=ks.mergeEvaluated.items(i,e.items,r.items,n)))}mergeValidEvaluated(e,n){const{it:r,gen:i}=this;if(r.opts.unevaluated&&(r.props!==!0||r.items!==!0))return i.if(n,()=>this.mergeEvaluated(e,Ze.Name)),!0}}Gr.KeywordCxt=__;function $_(t,e,n,r){const i=new __(t,n,e);"code"in n?n.code(i,r):i.$data&&n.validate?(0,Qc.funcKeywordCode)(i,n):"macro"in n?(0,Qc.macroKeywordCode)(i,n):(n.compile||n.validate)&&(0,Qc.funcKeywordCode)(i,n)}const OP=/^\/(?:[^~]|~0|~1)*$/,PP=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function E_(t,{dataLevel:e,dataNames:n,dataPathArr:r}){let i,s;if(t==="")return dt.default.rootData;if(t[0]==="/"){if(!OP.test(t))throw new Error(`Invalid JSON-pointer: ${t}`);i=t,s=dt.default.rootData}else{const d=PP.exec(t);if(!d)throw new Error(`Invalid JSON-pointer: ${t}`);const h=+d[1];if(i=d[2],i==="#"){if(h>=e)throw new Error(l("property/index",h));return r[e-h]}if(h>e)throw new Error(l("data",h));if(s=n[e-h],!i)return s}let a=s;const c=i.split("/");for(const d of c)d&&(s=(0,Ze._)`${s}${(0,Ze.getProperty)((0,ks.unescapeJsonPointer)(d))}`,a=(0,Ze._)`${a} && ${s}`);return a;function l(d,h){return`Cannot access ${d} ${h} levels up, current level is ${e}`}}Gr.getData=E_;var ua={};Object.defineProperty(ua,"__esModule",{value:!0});class NP extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}}ua.default=NP;var mo={};Object.defineProperty(mo,"__esModule",{value:!0});const ey=fr;class FP extends Error{constructor(e,n,r,i){super(i||`can't resolve reference ${r} from id ${n}`),this.missingRef=(0,ey.resolveUrl)(e,n,r),this.missingSchema=(0,ey.normalizeId)((0,ey.getFullPath)(e,this.missingRef))}}mo.default=FP;var Tr={};Object.defineProperty(Tr,"__esModule",{value:!0}),Tr.resolveSchema=Tr.getCompilingSchema=Tr.resolveRef=Tr.compileSchema=Tr.SchemaEnv=void 0;const Ii=mt,RP=ua,ca=Jr,Mi=fr,S_=Ve,IP=Gr;class Ed{constructor(e){var n;this.refs={},this.dynamicAnchors={};let r;typeof e.schema=="object"&&(r=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=(n=e.baseId)!==null&&n!==void 0?n:(0,Mi.normalizeId)(r==null?void 0:r[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=r==null?void 0:r.$async,this.refs={}}}Tr.SchemaEnv=Ed;function ty(t){const e=T_.call(this,t);if(e)return e;const n=(0,Mi.getFullPath)(this.opts.uriResolver,t.root.baseId),{es5:r,lines:i}=this.opts.code,{ownProperties:s}=this.opts,a=new Ii.CodeGen(this.scope,{es5:r,lines:i,ownProperties:s});let c;t.$async&&(c=a.scopeValue("Error",{ref:RP.default,code:(0,Ii._)`require("ajv/dist/runtime/validation_error").default`}));const l=a.scopeName("validate");t.validateName=l;const d={gen:a,allErrors:this.opts.allErrors,data:ca.default.data,parentData:ca.default.parentData,parentDataProperty:ca.default.parentDataProperty,dataNames:[ca.default.data],dataPathArr:[Ii.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:a.scopeValue("schema",this.opts.code.source===!0?{ref:t.schema,code:(0,Ii.stringify)(t.schema)}:{ref:t.schema}),validateName:l,ValidationError:c,schema:t.schema,schemaEnv:t,rootId:n,baseId:t.baseId||n,schemaPath:Ii.nil,errSchemaPath:t.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,Ii._)`""`,opts:this.opts,self:this};let h;try{this._compilations.add(t),(0,IP.validateFunctionCode)(d),a.optimize(this.opts.code.optimize);const m=a.toString();h=`${a.scopeRefs(ca.default.scope)}return ${m}`,this.opts.code.process&&(h=this.opts.code.process(h,t));const k=new Function(`${ca.default.self}`,`${ca.default.scope}`,h)(this,this.scope.get());if(this.scope.value(l,{ref:k}),k.errors=null,k.schema=t.schema,k.schemaEnv=t,t.$async&&(k.$async=!0),this.opts.code.source===!0&&(k.source={validateName:l,validateCode:m,scopeValues:a._values}),this.opts.unevaluated){const{props:R,items:P}=d;k.evaluated={props:R instanceof Ii.Name?void 0:R,items:P instanceof Ii.Name?void 0:P,dynamicProps:R instanceof Ii.Name,dynamicItems:P instanceof Ii.Name},k.source&&(k.source.evaluated=(0,Ii.stringify)(k.evaluated))}return t.validate=k,t}catch(m){throw delete t.validate,delete t.validateName,h&&this.logger.error("Error compiling schema, function code:",h),m}finally{this._compilations.delete(t)}}Tr.compileSchema=ty;function MP(t,e,n){var r;n=(0,Mi.resolveUrl)(this.opts.uriResolver,e,n);const i=t.refs[n];if(i)return i;let s=xP.call(this,t,n);if(s===void 0){const a=(r=t.localRefs)===null||r===void 0?void 0:r[n],{schemaId:c}=this.opts;a&&(s=new Ed({schema:a,schemaId:c,root:t,baseId:e}))}if(s!==void 0)return t.refs[n]=LP.call(this,s)}Tr.resolveRef=MP;function LP(t){return(0,Mi.inlineRef)(t.schema,this.opts.inlineRefs)?t.schema:t.validate?t:ty.call(this,t)}function T_(t){for(const e of this._compilations)if(jP(e,t))return e}Tr.getCompilingSchema=T_;function jP(t,e){return t.schema===e.schema&&t.root===e.root&&t.baseId===e.baseId}function xP(t,e){let n;for(;typeof(n=this.refs[e])=="string";)e=n;return n||this.schemas[e]||Sd.call(this,t,e)}function Sd(t,e){const n=this.opts.uriResolver.parse(e),r=(0,Mi._getFullPath)(this.opts.uriResolver,n);let i=(0,Mi.getFullPath)(this.opts.uriResolver,t.baseId,void 0);if(Object.keys(t.schema).length>0&&r===i)return ny.call(this,n,t);const s=(0,Mi.normalizeId)(r),a=this.refs[s]||this.schemas[s];if(typeof a=="string"){const c=Sd.call(this,t,a);return typeof(c==null?void 0:c.schema)!="object"?void 0:ny.call(this,n,c)}if(typeof(a==null?void 0:a.schema)=="object"){if(a.validate||ty.call(this,a),s===(0,Mi.normalizeId)(e)){const{schema:c}=a,{schemaId:l}=this.opts,d=c[l];return d&&(i=(0,Mi.resolveUrl)(this.opts.uriResolver,i,d)),new Ed({schema:c,schemaId:l,root:t,baseId:i})}return ny.call(this,n,a)}}Tr.resolveSchema=Sd;const BP=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function ny(t,{baseId:e,schema:n,root:r}){var i;if(((i=t.fragment)===null||i===void 0?void 0:i[0])!=="/")return;for(const c of t.fragment.slice(1).split("/")){if(typeof n=="boolean")return;const l=n[(0,S_.unescapeFragment)(c)];if(l===void 0)return;n=l;const d=typeof n=="object"&&n[this.opts.schemaId];!BP.has(c)&&d&&(e=(0,Mi.resolveUrl)(this.opts.uriResolver,e,d))}let s;if(typeof n!="boolean"&&n.$ref&&!(0,S_.schemaHasRulesButRef)(n,this.RULES)){const c=(0,Mi.resolveUrl)(this.opts.uriResolver,e,n.$ref);s=Sd.call(this,r,c)}const{schemaId:a}=this.opts;if(s=s||new Ed({schema:n,schemaId:a,root:r,baseId:e}),s.schema!==s.root.schema)return s}var qP={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1},ry={},Td={exports:{}},WP={HEX:{0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15}};const{HEX:UP}=WP,VP=/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u;function k_(t){if(C_(t,".")<3)return{host:t,isIPV4:!1};const e=t.match(VP)||[],[n]=e;return n?{host:KP(n,"."),isIPV4:!0}:{host:t,isIPV4:!1}}function iy(t,e=!1){let n="",r=!0;for(const i of t){if(UP[i]===void 0)return;i!=="0"&&r===!0&&(r=!1),r||(n+=i)}return e&&n.length===0&&(n="0"),n}function HP(t){let e=0;const n={error:!1,address:"",zone:""},r=[],i=[];let s=!1,a=!1,c=!1;function l(){if(i.length){if(s===!1){const d=iy(i);if(d!==void 0)r.push(d);else return n.error=!0,!1}i.length=0}return!0}for(let d=0;d7){n.error=!0;break}d-1>=0&&t[d-1]===":"&&(a=!0);continue}else if(h==="%"){if(!l())break;s=!0}else{i.push(h);continue}}return i.length&&(s?n.zone=i.join(""):c?r.push(i.join("")):r.push(iy(i))),n.address=r.join(""),n}function A_(t){if(C_(t,":")<2)return{host:t,isIPV6:!1};const e=HP(t);if(e.error)return{host:t,isIPV6:!1};{let n=e.address,r=e.address;return e.zone&&(n+="%"+e.zone,r+="%25"+e.zone),{host:n,escapedHost:r,isIPV6:!0}}}function KP(t,e){let n="",r=!0;const i=t.length;for(let s=0;s/[^!"$&'()*+,\-.;=_`a-z{}~]/u.test(String.fromCharCode(e)));function gN(t){let e=0;for(let n=0,r=t.length;n126||mN[e])return!0;return!1}const yN=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function As(t,e){const n=Object.assign({},e),r={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},i=t.indexOf("%")!==-1;let s=!1;n.reference==="suffix"&&(t=(n.scheme?n.scheme+":":"")+"//"+t);const a=t.match(yN);if(a){if(r.scheme=a[1],r.userinfo=a[3],r.host=a[4],r.port=parseInt(a[5],10),r.path=a[6]||"",r.query=a[7],r.fragment=a[8],isNaN(r.port)&&(r.port=a[5]),r.host){const l=lN(r.host);if(l.isIPV4===!1){const d=cN(l.host);r.host=d.host.toLowerCase(),s=d.isIPV6}else r.host=l.host,s=!0}r.scheme===void 0&&r.userinfo===void 0&&r.host===void 0&&r.port===void 0&&r.query===void 0&&!r.path?r.reference="same-document":r.scheme===void 0?r.reference="relative":r.fragment===void 0?r.reference="absolute":r.reference="uri",n.reference&&n.reference!=="suffix"&&n.reference!==r.reference&&(r.error=r.error||"URI is not a "+n.reference+" reference.");const c=oy[(n.scheme||r.scheme||"").toLowerCase()];if(!n.unicodeSupport&&(!c||!c.unicodeSupport)&&r.host&&(n.domainHost||c&&c.domainHost)&&s===!1&&gN(r.host))try{r.host=URL.domainToASCII(r.host.toLowerCase())}catch(l){r.error=r.error||"Host's domain name can not be converted to ASCII: "+l}(!c||c&&!c.skipNormalize)&&(i&&r.scheme!==void 0&&(r.scheme=unescape(r.scheme)),i&&r.host!==void 0&&(r.host=unescape(r.host)),r.path&&(r.path=escape(unescape(r.path))),r.fragment&&(r.fragment=encodeURI(decodeURIComponent(r.fragment)))),c&&c.parse&&c.parse(r,n)}else r.error=r.error||"URI can not be parsed.";return r}const ay={SCHEMES:oy,normalize:dN,resolve:hN,resolveComponents:L_,equal:pN,serialize:us,parse:As};Td.exports=ay,Td.exports.default=ay,Td.exports.fastUri=ay,Object.defineProperty(ry,"__esModule",{value:!0});const j_=Td.exports;j_.code='require("ajv/dist/runtime/uri").default',ry.default=j_,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var e=Gr;Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return e.KeywordCxt}});var n=mt;Object.defineProperty(t,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return n.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return n.CodeGen}});const r=ua,i=mo,s=oa,a=Tr,c=mt,l=fr,d=tr,h=Ve,m=qP,E=ry,k=(Se,H)=>new RegExp(Se,H);k.code="new RegExp";const R=["removeAdditional","useDefaults","coerceTypes"],P=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),A={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},N={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},S=200;function y(Se){var H,fe,ae,U,Z,pe,Me,Ie,qe,ze,Ge,rt,_n,at,un,Sn,Mt,Tn,ur,kn,Lt,Vn,Xn,Rn,qt;const X=Se.strict,V=(H=Se.code)===null||H===void 0?void 0:H.optimize,ee=V===!0||V===void 0?1:V||0,ie=(ae=(fe=Se.code)===null||fe===void 0?void 0:fe.regExp)!==null&&ae!==void 0?ae:k,C=(U=Se.uriResolver)!==null&&U!==void 0?U:E.default;return{strictSchema:(pe=(Z=Se.strictSchema)!==null&&Z!==void 0?Z:X)!==null&&pe!==void 0?pe:!0,strictNumbers:(Ie=(Me=Se.strictNumbers)!==null&&Me!==void 0?Me:X)!==null&&Ie!==void 0?Ie:!0,strictTypes:(ze=(qe=Se.strictTypes)!==null&&qe!==void 0?qe:X)!==null&&ze!==void 0?ze:"log",strictTuples:(rt=(Ge=Se.strictTuples)!==null&&Ge!==void 0?Ge:X)!==null&&rt!==void 0?rt:"log",strictRequired:(at=(_n=Se.strictRequired)!==null&&_n!==void 0?_n:X)!==null&&at!==void 0?at:!1,code:Se.code?{...Se.code,optimize:ee,regExp:ie}:{optimize:ee,regExp:ie},loopRequired:(un=Se.loopRequired)!==null&&un!==void 0?un:S,loopEnum:(Sn=Se.loopEnum)!==null&&Sn!==void 0?Sn:S,meta:(Mt=Se.meta)!==null&&Mt!==void 0?Mt:!0,messages:(Tn=Se.messages)!==null&&Tn!==void 0?Tn:!0,inlineRefs:(ur=Se.inlineRefs)!==null&&ur!==void 0?ur:!0,schemaId:(kn=Se.schemaId)!==null&&kn!==void 0?kn:"$id",addUsedSchema:(Lt=Se.addUsedSchema)!==null&&Lt!==void 0?Lt:!0,validateSchema:(Vn=Se.validateSchema)!==null&&Vn!==void 0?Vn:!0,validateFormats:(Xn=Se.validateFormats)!==null&&Xn!==void 0?Xn:!0,unicodeRegExp:(Rn=Se.unicodeRegExp)!==null&&Rn!==void 0?Rn:!0,int32range:(qt=Se.int32range)!==null&&qt!==void 0?qt:!0,uriResolver:C}}class D{constructor(H={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,H=this.opts={...H,...y(H)};const{es5:fe,lines:ae}=this.opts.code;this.scope=new c.ValueScope({scope:{},prefixes:P,es5:fe,lines:ae}),this.logger=Y(H.logger);const U=H.validateFormats;H.validateFormats=!1,this.RULES=(0,s.getRules)(),v.call(this,A,H,"NOT SUPPORTED"),v.call(this,N,H,"DEPRECATED","warn"),this._metaOpts=M.call(this),H.formats&&q.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),H.keywords&&F.call(this,H.keywords),typeof H.meta=="object"&&this.addMetaSchema(H.meta),$.call(this),H.validateFormats=U}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:H,meta:fe,schemaId:ae}=this.opts;let U=m;ae==="id"&&(U={...m},U.id=U.$id,delete U.$id),fe&&H&&this.addMetaSchema(U,U[ae],!1)}defaultMeta(){const{meta:H,schemaId:fe}=this.opts;return this.opts.defaultMeta=typeof H=="object"?H[fe]||H:void 0}validate(H,fe){let ae;if(typeof H=="string"){if(ae=this.getSchema(H),!ae)throw new Error(`no schema with key or ref "${H}"`)}else ae=this.compile(H);const U=ae(fe);return"$async"in ae||(this.errors=ae.errors),U}compile(H,fe){const ae=this._addSchema(H,fe);return ae.validate||this._compileSchemaEnv(ae)}compileAsync(H,fe){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:ae}=this.opts;return U.call(this,H,fe);async function U(ze,Ge){await Z.call(this,ze.$schema);const rt=this._addSchema(ze,Ge);return rt.validate||pe.call(this,rt)}async function Z(ze){ze&&!this.getSchema(ze)&&await U.call(this,{$ref:ze},!0)}async function pe(ze){try{return this._compileSchemaEnv(ze)}catch(Ge){if(!(Ge instanceof i.default))throw Ge;return Me.call(this,Ge),await Ie.call(this,Ge.missingSchema),pe.call(this,ze)}}function Me({missingSchema:ze,missingRef:Ge}){if(this.refs[ze])throw new Error(`AnySchema ${ze} is loaded but ${Ge} cannot be resolved`)}async function Ie(ze){const Ge=await qe.call(this,ze);this.refs[ze]||await Z.call(this,Ge.$schema),this.refs[ze]||this.addSchema(Ge,ze,fe)}async function qe(ze){const Ge=this._loading[ze];if(Ge)return Ge;try{return await(this._loading[ze]=ae(ze))}finally{delete this._loading[ze]}}}addSchema(H,fe,ae,U=this.opts.validateSchema){if(Array.isArray(H)){for(const pe of H)this.addSchema(pe,void 0,ae,U);return this}let Z;if(typeof H=="object"){const{schemaId:pe}=this.opts;if(Z=H[pe],Z!==void 0&&typeof Z!="string")throw new Error(`schema ${pe} must be string`)}return fe=(0,l.normalizeId)(fe||Z),this._checkUnique(fe),this.schemas[fe]=this._addSchema(H,ae,fe,U,!0),this}addMetaSchema(H,fe,ae=this.opts.validateSchema){return this.addSchema(H,fe,!0,ae),this}validateSchema(H,fe){if(typeof H=="boolean")return!0;let ae;if(ae=H.$schema,ae!==void 0&&typeof ae!="string")throw new Error("$schema must be a string");if(ae=ae||this.opts.defaultMeta||this.defaultMeta(),!ae)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const U=this.validate(ae,H);if(!U&&fe){const Z="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(Z);else throw new Error(Z)}return U}getSchema(H){let fe;for(;typeof(fe=_.call(this,H))=="string";)H=fe;if(fe===void 0){const{schemaId:ae}=this.opts,U=new a.SchemaEnv({schema:{},schemaId:ae});if(fe=a.resolveSchema.call(this,U,H),!fe)return;this.refs[H]=fe}return fe.validate||this._compileSchemaEnv(fe)}removeSchema(H){if(H instanceof RegExp)return this._removeAllSchemas(this.schemas,H),this._removeAllSchemas(this.refs,H),this;switch(typeof H){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const fe=_.call(this,H);return typeof fe=="object"&&this._cache.delete(fe.schema),delete this.schemas[H],delete this.refs[H],this}case"object":{const fe=H;this._cache.delete(fe);let ae=H[this.opts.schemaId];return ae&&(ae=(0,l.normalizeId)(ae),delete this.schemas[ae],delete this.refs[ae]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(H){for(const fe of H)this.addKeyword(fe);return this}addKeyword(H,fe){let ae;if(typeof H=="string")ae=H,typeof fe=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),fe.keyword=ae);else if(typeof H=="object"&&fe===void 0){if(fe=H,ae=fe.keyword,Array.isArray(ae)&&!ae.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(ne.call(this,ae,fe),!fe)return(0,h.eachItem)(ae,Z=>ge.call(this,Z)),this;De.call(this,fe);const U={...fe,type:(0,d.getJSONTypes)(fe.type),schemaType:(0,d.getJSONTypes)(fe.schemaType)};return(0,h.eachItem)(ae,U.type.length===0?Z=>ge.call(this,Z,U):Z=>U.type.forEach(pe=>ge.call(this,Z,U,pe))),this}getKeyword(H){const fe=this.RULES.all[H];return typeof fe=="object"?fe.definition:!!fe}removeKeyword(H){const{RULES:fe}=this;delete fe.keywords[H],delete fe.all[H];for(const ae of fe.rules){const U=ae.rules.findIndex(Z=>Z.keyword===H);U>=0&&ae.rules.splice(U,1)}return this}addFormat(H,fe){return typeof fe=="string"&&(fe=new RegExp(fe)),this.formats[H]=fe,this}errorsText(H=this.errors,{separator:fe=", ",dataVar:ae="data"}={}){return!H||H.length===0?"No errors":H.map(U=>`${ae}${U.instancePath} ${U.message}`).reduce((U,Z)=>U+fe+Z)}$dataMetaSchema(H,fe){const ae=this.RULES.all;H=JSON.parse(JSON.stringify(H));for(const U of fe){const Z=U.split("/").slice(1);let pe=H;for(const Me of Z)pe=pe[Me];for(const Me in ae){const Ie=ae[Me];if(typeof Ie!="object")continue;const{$data:qe}=Ie.definition,ze=pe[Me];qe&&ze&&(pe[Me]=nt(ze))}}return H}_removeAllSchemas(H,fe){for(const ae in H){const U=H[ae];(!fe||fe.test(ae))&&(typeof U=="string"?delete H[ae]:U&&!U.meta&&(this._cache.delete(U.schema),delete H[ae]))}}_addSchema(H,fe,ae,U=this.opts.validateSchema,Z=this.opts.addUsedSchema){let pe;const{schemaId:Me}=this.opts;if(typeof H=="object")pe=H[Me];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof H!="boolean")throw new Error("schema must be object or boolean")}let Ie=this._cache.get(H);if(Ie!==void 0)return Ie;ae=(0,l.normalizeId)(pe||ae);const qe=l.getSchemaRefs.call(this,H,ae);return Ie=new a.SchemaEnv({schema:H,schemaId:Me,meta:fe,baseId:ae,localRefs:qe}),this._cache.set(Ie.schema,Ie),Z&&!ae.startsWith("#")&&(ae&&this._checkUnique(ae),this.refs[ae]=Ie),U&&this.validateSchema(H,!0),Ie}_checkUnique(H){if(this.schemas[H]||this.refs[H])throw new Error(`schema with key or id "${H}" already exists`)}_compileSchemaEnv(H){if(H.meta?this._compileMetaSchema(H):a.compileSchema.call(this,H),!H.validate)throw new Error("ajv implementation error");return H.validate}_compileMetaSchema(H){const fe=this.opts;this.opts=this._metaOpts;try{a.compileSchema.call(this,H)}finally{this.opts=fe}}}D.ValidationError=r.default,D.MissingRefError=i.default,t.default=D;function v(Se,H,fe,ae="error"){for(const U in Se){const Z=U;Z in H&&this.logger[ae](`${fe}: option ${U}. ${Se[Z]}`)}}function _(Se){return Se=(0,l.normalizeId)(Se),this.schemas[Se]||this.refs[Se]}function $(){const Se=this.opts.schemas;if(!!Se)if(Array.isArray(Se))this.addSchema(Se);else for(const H in Se)this.addSchema(Se[H],H)}function q(){for(const Se in this.opts.formats){const H=this.opts.formats[Se];H&&this.addFormat(Se,H)}}function F(Se){if(Array.isArray(Se)){this.addVocabulary(Se);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const H in Se){const fe=Se[H];fe.keyword||(fe.keyword=H),this.addKeyword(fe)}}function M(){const Se={...this.opts};for(const H of R)delete Se[H];return Se}const I={log(){},warn(){},error(){}};function Y(Se){if(Se===!1)return I;if(Se===void 0)return console;if(Se.log&&Se.warn&&Se.error)return Se;throw new Error("logger must implement log, warn and error methods")}const K=/^[a-z_$][a-z0-9_$:-]*$/i;function ne(Se,H){const{RULES:fe}=this;if((0,h.eachItem)(Se,ae=>{if(fe.keywords[ae])throw new Error(`Keyword ${ae} is already defined`);if(!K.test(ae))throw new Error(`Keyword ${ae} has invalid name`)}),!!H&&H.$data&&!("code"in H||"validate"in H))throw new Error('$data keyword must have "code" or "validate" function')}function ge(Se,H,fe){var ae;const U=H==null?void 0:H.post;if(fe&&U)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:Z}=this;let pe=U?Z.post:Z.rules.find(({type:Ie})=>Ie===fe);if(pe||(pe={type:fe,rules:[]},Z.rules.push(pe)),Z.keywords[Se]=!0,!H)return;const Me={keyword:Se,definition:{...H,type:(0,d.getJSONTypes)(H.type),schemaType:(0,d.getJSONTypes)(H.schemaType)}};H.before?ye.call(this,pe,Me,H.before):pe.rules.push(Me),Z.all[Se]=Me,(ae=H.implements)===null||ae===void 0||ae.forEach(Ie=>this.addKeyword(Ie))}function ye(Se,H,fe){const ae=Se.rules.findIndex(U=>U.keyword===fe);ae>=0?Se.rules.splice(ae,0,H):(Se.rules.push(H),this.logger.warn(`rule ${fe} is not defined`))}function De(Se){let{metaSchema:H}=Se;H!==void 0&&(Se.$data&&this.opts.$data&&(H=nt(H)),Se.validateSchema=this.compile(H,!0))}const Be={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function nt(Se){return{anyOf:[Se,Be]}}}(lo);var Cd={},Od={},uy={};Object.defineProperty(uy,"__esModule",{value:!0});const vN={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};uy.default=vN;var cs={};Object.defineProperty(cs,"__esModule",{value:!0}),cs.callRef=cs.getValidate=void 0;const bN=mo,x_=Ct,Lr=mt,Cu=Jr,B_=Tr,Pd=Ve,DN={keyword:"$ref",schemaType:"string",code(t){const{gen:e,schema:n,it:r}=t,{baseId:i,schemaEnv:s,validateName:a,opts:c,self:l}=r,{root:d}=s;if((n==="#"||n==="#/")&&i===d.baseId)return m();const h=B_.resolveRef.call(l,d,i,n);if(h===void 0)throw new bN.default(r.opts.uriResolver,i,n);if(h instanceof B_.SchemaEnv)return E(h);return k(h);function m(){if(s===d)return Nd(t,a,s,s.$async);const R=e.scopeValue("root",{ref:d});return Nd(t,(0,Lr._)`${R}.validate`,d,d.$async)}function E(R){const P=q_(t,R);Nd(t,P,R,R.$async)}function k(R){const P=e.scopeValue("schema",c.code.source===!0?{ref:R,code:(0,Lr.stringify)(R)}:{ref:R}),A=e.name("valid"),N=t.subschema({schema:R,dataTypes:[],schemaPath:Lr.nil,topSchemaRef:P,errSchemaPath:n},A);t.mergeEvaluated(N),t.ok(A)}}};function q_(t,e){const{gen:n}=t;return e.validate?n.scopeValue("validate",{ref:e.validate}):(0,Lr._)`${n.scopeValue("wrapper",{ref:e})}.validate`}cs.getValidate=q_;function Nd(t,e,n,r){const{gen:i,it:s}=t,{allErrors:a,schemaEnv:c,opts:l}=s,d=l.passContext?Cu.default.this:Lr.nil;r?h():m();function h(){if(!c.$async)throw new Error("async schema referenced by sync schema");const R=i.let("valid");i.try(()=>{i.code((0,Lr._)`await ${(0,x_.callValidateCode)(t,e,d)}`),k(e),a||i.assign(R,!0)},P=>{i.if((0,Lr._)`!(${P} instanceof ${s.ValidationError})`,()=>i.throw(P)),E(P),a||i.assign(R,!1)}),t.ok(R)}function m(){t.result((0,x_.callValidateCode)(t,e,d),()=>k(e),()=>E(e))}function E(R){const P=(0,Lr._)`${R}.errors`;i.assign(Cu.default.vErrors,(0,Lr._)`${Cu.default.vErrors} === null ? ${P} : ${Cu.default.vErrors}.concat(${P})`),i.assign(Cu.default.errors,(0,Lr._)`${Cu.default.vErrors}.length`)}function k(R){var P;if(!s.opts.unevaluated)return;const A=(P=n==null?void 0:n.validate)===null||P===void 0?void 0:P.evaluated;if(s.props!==!0)if(A&&!A.dynamicProps)A.props!==void 0&&(s.props=Pd.mergeEvaluated.props(i,A.props,s.props));else{const N=i.var("props",(0,Lr._)`${R}.evaluated.props`);s.props=Pd.mergeEvaluated.props(i,N,s.props,Lr.Name)}if(s.items!==!0)if(A&&!A.dynamicItems)A.items!==void 0&&(s.items=Pd.mergeEvaluated.items(i,A.items,s.items));else{const N=i.var("items",(0,Lr._)`${R}.evaluated.items`);s.items=Pd.mergeEvaluated.items(i,N,s.items,Lr.Name)}}}cs.callRef=Nd,cs.default=DN,Object.defineProperty(Od,"__esModule",{value:!0});const wN=uy,_N=cs,$N=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",wN.default,_N.default];Od.default=$N;var Fd={},cy={};Object.defineProperty(cy,"__esModule",{value:!0});const Rd=mt,go=Rd.operators,Id={maximum:{okStr:"<=",ok:go.LTE,fail:go.GT},minimum:{okStr:">=",ok:go.GTE,fail:go.LT},exclusiveMaximum:{okStr:"<",ok:go.LT,fail:go.GTE},exclusiveMinimum:{okStr:">",ok:go.GT,fail:go.LTE}},EN={message:({keyword:t,schemaCode:e})=>(0,Rd.str)`must be ${Id[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>(0,Rd._)`{comparison: ${Id[t].okStr}, limit: ${e}}`},SN={keyword:Object.keys(Id),type:"number",schemaType:"number",$data:!0,error:EN,code(t){const{keyword:e,data:n,schemaCode:r}=t;t.fail$data((0,Rd._)`${n} ${Id[e].fail} ${r} || isNaN(${n})`)}};cy.default=SN;var Md={};Object.defineProperty(Md,"__esModule",{value:!0});const el=mt,TN={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:t})=>(0,el.str)`must be multiple of ${t}`,params:({schemaCode:t})=>(0,el._)`{multipleOf: ${t}}`},code(t){const{gen:e,data:n,schemaCode:r,it:i}=t,s=i.opts.multipleOfPrecision,a=e.let("res"),c=s?(0,el._)`Math.abs(Math.round(${a}) - ${a}) > 1e-${s}`:(0,el._)`${a} !== parseInt(${a})`;t.fail$data((0,el._)`(${r} === 0 || (${a} = ${n}/${r}, ${c}))`)}};Md.default=TN;var Ld={},ly={};Object.defineProperty(ly,"__esModule",{value:!0});function W_(t){const e=t.length;let n=0,r=0,i;for(;r=55296&&i<=56319&&r(0,la._)`{limit: ${t}}`},code(t){const{keyword:e,data:n,schemaCode:r,it:i}=t,s=e==="maxLength"?la.operators.GT:la.operators.LT,a=i.opts.unicode===!1?(0,la._)`${n}.length`:(0,la._)`${(0,kN.useFunc)(t.gen,AN.default)}(${n})`;t.fail$data((0,la._)`${a} ${s} ${r}`)}};Ld.default=CN;var jd={};Object.defineProperty(jd,"__esModule",{value:!0});const ON=Ct,xd=mt,PN={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:t})=>(0,xd.str)`must match pattern "${t}"`,params:({schemaCode:t})=>(0,xd._)`{pattern: ${t}}`},code(t){const{data:e,$data:n,schema:r,schemaCode:i,it:s}=t,a=s.opts.unicodeRegExp?"u":"",c=n?(0,xd._)`(new RegExp(${i}, ${a}))`:(0,ON.usePattern)(t,r);t.fail$data((0,xd._)`!${c}.test(${e})`)}};jd.default=PN;var Bd={};Object.defineProperty(Bd,"__esModule",{value:!0});const tl=mt,NN={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:t,schemaCode:e}){const n=t==="maxProperties"?"more":"fewer";return(0,tl.str)`must NOT have ${n} than ${e} properties`},params:({schemaCode:t})=>(0,tl._)`{limit: ${t}}`},code(t){const{keyword:e,data:n,schemaCode:r}=t,i=e==="maxProperties"?tl.operators.GT:tl.operators.LT;t.fail$data((0,tl._)`Object.keys(${n}).length ${i} ${r}`)}};Bd.default=NN;var qd={};Object.defineProperty(qd,"__esModule",{value:!0});const nl=Ct,rl=mt,FN=Ve,RN={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:t}})=>(0,rl.str)`must have required property '${t}'`,params:({params:{missingProperty:t}})=>(0,rl._)`{missingProperty: ${t}}`},code(t){const{gen:e,schema:n,schemaCode:r,data:i,$data:s,it:a}=t,{opts:c}=a;if(!s&&n.length===0)return;const l=n.length>=c.loopRequired;if(a.allErrors?d():h(),c.strictRequired){const k=t.parentSchema.properties,{definedProperties:R}=t.it;for(const P of n)if((k==null?void 0:k[P])===void 0&&!R.has(P)){const A=a.schemaEnv.baseId+a.errSchemaPath,N=`required property "${P}" is not defined at "${A}" (strictRequired)`;(0,FN.checkStrictMode)(a,N,a.opts.strictRequired)}}function d(){if(l||s)t.block$data(rl.nil,m);else for(const k of n)(0,nl.checkReportMissingProp)(t,k)}function h(){const k=e.let("missing");if(l||s){const R=e.let("valid",!0);t.block$data(R,()=>E(k,R)),t.ok(R)}else e.if((0,nl.checkMissingProp)(t,n,k)),(0,nl.reportMissingProp)(t,k),e.else()}function m(){e.forOf("prop",r,k=>{t.setParams({missingProperty:k}),e.if((0,nl.noPropertyInData)(e,i,k,c.ownProperties),()=>t.error())})}function E(k,R){t.setParams({missingProperty:k}),e.forOf(k,r,()=>{e.assign(R,(0,nl.propertyInData)(e,i,k,c.ownProperties)),e.if((0,rl.not)(R),()=>{t.error(),e.break()})},rl.nil)}}};qd.default=RN;var Wd={};Object.defineProperty(Wd,"__esModule",{value:!0});const il=mt,IN={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:t,schemaCode:e}){const n=t==="maxItems"?"more":"fewer";return(0,il.str)`must NOT have ${n} than ${e} items`},params:({schemaCode:t})=>(0,il._)`{limit: ${t}}`},code(t){const{keyword:e,data:n,schemaCode:r}=t,i=e==="maxItems"?il.operators.GT:il.operators.LT;t.fail$data((0,il._)`${n}.length ${i} ${r}`)}};Wd.default=IN;var Ud={},sl={};Object.defineProperty(sl,"__esModule",{value:!0});const U_=s_;U_.code='require("ajv/dist/runtime/equal").default',sl.default=U_,Object.defineProperty(Ud,"__esModule",{value:!0});const fy=tr,dr=mt,MN=Ve,LN=sl,jN={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:t,j:e}})=>(0,dr.str)`must NOT have duplicate items (items ## ${e} and ${t} are identical)`,params:({params:{i:t,j:e}})=>(0,dr._)`{i: ${t}, j: ${e}}`},code(t){const{gen:e,data:n,$data:r,schema:i,parentSchema:s,schemaCode:a,it:c}=t;if(!r&&!i)return;const l=e.let("valid"),d=s.items?(0,fy.getSchemaTypes)(s.items):[];t.block$data(l,h,(0,dr._)`${a} === false`),t.ok(l);function h(){const R=e.let("i",(0,dr._)`${n}.length`),P=e.let("j");t.setParams({i:R,j:P}),e.assign(l,!0),e.if((0,dr._)`${R} > 1`,()=>(m()?E:k)(R,P))}function m(){return d.length>0&&!d.some(R=>R==="object"||R==="array")}function E(R,P){const A=e.name("item"),N=(0,fy.checkDataTypes)(d,A,c.opts.strictNumbers,fy.DataType.Wrong),S=e.const("indices",(0,dr._)`{}`);e.for((0,dr._)`;${R}--;`,()=>{e.let(A,(0,dr._)`${n}[${R}]`),e.if(N,(0,dr._)`continue`),d.length>1&&e.if((0,dr._)`typeof ${A} == "string"`,(0,dr._)`${A} += "_"`),e.if((0,dr._)`typeof ${S}[${A}] == "number"`,()=>{e.assign(P,(0,dr._)`${S}[${A}]`),t.error(),e.assign(l,!1).break()}).code((0,dr._)`${S}[${A}] = ${R}`)})}function k(R,P){const A=(0,MN.useFunc)(e,LN.default),N=e.name("outer");e.label(N).for((0,dr._)`;${R}--;`,()=>e.for((0,dr._)`${P} = ${R}; ${P}--;`,()=>e.if((0,dr._)`${A}(${n}[${R}], ${n}[${P}])`,()=>{t.error(),e.assign(l,!1).break(N)})))}}};Ud.default=jN;var Vd={};Object.defineProperty(Vd,"__esModule",{value:!0});const dy=mt,xN=Ve,BN=sl,qN={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:t})=>(0,dy._)`{allowedValue: ${t}}`},code(t){const{gen:e,data:n,$data:r,schemaCode:i,schema:s}=t;r||s&&typeof s=="object"?t.fail$data((0,dy._)`!${(0,xN.useFunc)(e,BN.default)}(${n}, ${i})`):t.fail((0,dy._)`${s} !== ${n}`)}};Vd.default=qN;var Hd={};Object.defineProperty(Hd,"__esModule",{value:!0});const ol=mt,WN=Ve,UN=sl,VN={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:t})=>(0,ol._)`{allowedValues: ${t}}`},code(t){const{gen:e,data:n,$data:r,schema:i,schemaCode:s,it:a}=t;if(!r&&i.length===0)throw new Error("enum must have non-empty array");const c=i.length>=a.opts.loopEnum;let l;const d=()=>l!=null?l:l=(0,WN.useFunc)(e,UN.default);let h;if(c||r)h=e.let("valid"),t.block$data(h,m);else{if(!Array.isArray(i))throw new Error("ajv implementation error");const k=e.const("vSchema",s);h=(0,ol.or)(...i.map((R,P)=>E(k,P)))}t.pass(h);function m(){e.assign(h,!1),e.forOf("v",s,k=>e.if((0,ol._)`${d()}(${n}, ${k})`,()=>e.assign(h,!0).break()))}function E(k,R){const P=i[R];return typeof P=="object"&&P!==null?(0,ol._)`${d()}(${n}, ${k}[${R}])`:(0,ol._)`${n} === ${P}`}}};Hd.default=VN,Object.defineProperty(Fd,"__esModule",{value:!0});const HN=cy,KN=Md,zN=Ld,YN=jd,GN=Bd,JN=qd,QN=Wd,XN=Ud,ZN=Vd,eF=Hd,tF=[HN.default,KN.default,zN.default,YN.default,GN.default,JN.default,QN.default,XN.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},ZN.default,eF.default];Fd.default=tF;var al={},Ou={};Object.defineProperty(Ou,"__esModule",{value:!0}),Ou.validateAdditionalItems=void 0;const fa=mt,hy=Ve,nF={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:t}})=>(0,fa.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,fa._)`{limit: ${t}}`},code(t){const{parentSchema:e,it:n}=t,{items:r}=e;if(!Array.isArray(r)){(0,hy.checkStrictMode)(n,'"additionalItems" is ignored when "items" is not an array of schemas');return}V_(t,r)}};function V_(t,e){const{gen:n,schema:r,data:i,keyword:s,it:a}=t;a.items=!0;const c=n.const("len",(0,fa._)`${i}.length`);if(r===!1)t.setParams({len:e.length}),t.pass((0,fa._)`${c} <= ${e.length}`);else if(typeof r=="object"&&!(0,hy.alwaysValidSchema)(a,r)){const d=n.var("valid",(0,fa._)`${c} <= ${e.length}`);n.if((0,fa.not)(d),()=>l(d)),t.ok(d)}function l(d){n.forRange("i",e.length,c,h=>{t.subschema({keyword:s,dataProp:h,dataPropType:hy.Type.Num},d),a.allErrors||n.if((0,fa.not)(d),()=>n.break())})}}Ou.validateAdditionalItems=V_,Ou.default=nF;var py={},Pu={};Object.defineProperty(Pu,"__esModule",{value:!0}),Pu.validateTuple=void 0;const H_=mt,Kd=Ve,rF=Ct,iF={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(t){const{schema:e,it:n}=t;if(Array.isArray(e))return K_(t,"additionalItems",e);n.items=!0,!(0,Kd.alwaysValidSchema)(n,e)&&t.ok((0,rF.validateArray)(t))}};function K_(t,e,n=t.schema){const{gen:r,parentSchema:i,data:s,keyword:a,it:c}=t;h(i),c.opts.unevaluated&&n.length&&c.items!==!0&&(c.items=Kd.mergeEvaluated.items(r,n.length,c.items));const l=r.name("valid"),d=r.const("len",(0,H_._)`${s}.length`);n.forEach((m,E)=>{(0,Kd.alwaysValidSchema)(c,m)||(r.if((0,H_._)`${d} > ${E}`,()=>t.subschema({keyword:a,schemaProp:E,dataProp:E},l)),t.ok(l))});function h(m){const{opts:E,errSchemaPath:k}=c,R=n.length,P=R===m.minItems&&(R===m.maxItems||m[e]===!1);if(E.strictTuples&&!P){const A=`"${a}" is ${R}-tuple, but minItems or maxItems/${e} are not specified or different at path "${k}"`;(0,Kd.checkStrictMode)(c,A,E.strictTuples)}}}Pu.validateTuple=K_,Pu.default=iF,Object.defineProperty(py,"__esModule",{value:!0});const sF=Pu,oF={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:t=>(0,sF.validateTuple)(t,"items")};py.default=oF;var my={};Object.defineProperty(my,"__esModule",{value:!0});const z_=mt,aF=Ve,uF=Ct,cF=Ou,lF={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:t}})=>(0,z_.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,z_._)`{limit: ${t}}`},code(t){const{schema:e,parentSchema:n,it:r}=t,{prefixItems:i}=n;r.items=!0,!(0,aF.alwaysValidSchema)(r,e)&&(i?(0,cF.validateAdditionalItems)(t,i):t.ok((0,uF.validateArray)(t)))}};my.default=lF;var gy={};Object.defineProperty(gy,"__esModule",{value:!0});const hi=mt,zd=Ve,fF={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:t,max:e}})=>e===void 0?(0,hi.str)`must contain at least ${t} valid item(s)`:(0,hi.str)`must contain at least ${t} and no more than ${e} valid item(s)`,params:({params:{min:t,max:e}})=>e===void 0?(0,hi._)`{minContains: ${t}}`:(0,hi._)`{minContains: ${t}, maxContains: ${e}}`},code(t){const{gen:e,schema:n,parentSchema:r,data:i,it:s}=t;let a,c;const{minContains:l,maxContains:d}=r;s.opts.next?(a=l===void 0?1:l,c=d):a=1;const h=e.const("len",(0,hi._)`${i}.length`);if(t.setParams({min:a,max:c}),c===void 0&&a===0){(0,zd.checkStrictMode)(s,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(c!==void 0&&a>c){(0,zd.checkStrictMode)(s,'"minContains" > "maxContains" is always invalid'),t.fail();return}if((0,zd.alwaysValidSchema)(s,n)){let P=(0,hi._)`${h} >= ${a}`;c!==void 0&&(P=(0,hi._)`${P} && ${h} <= ${c}`),t.pass(P);return}s.items=!0;const m=e.name("valid");c===void 0&&a===1?k(m,()=>e.if(m,()=>e.break())):a===0?(e.let(m,!0),c!==void 0&&e.if((0,hi._)`${i}.length > 0`,E)):(e.let(m,!1),E()),t.result(m,()=>t.reset());function E(){const P=e.name("_valid"),A=e.let("count",0);k(P,()=>e.if(P,()=>R(A)))}function k(P,A){e.forRange("i",0,h,N=>{t.subschema({keyword:"contains",dataProp:N,dataPropType:zd.Type.Num,compositeRule:!0},P),A()})}function R(P){e.code((0,hi._)`${P}++`),c===void 0?e.if((0,hi._)`${P} >= ${a}`,()=>e.assign(m,!0).break()):(e.if((0,hi._)`${P} > ${c}`,()=>e.assign(m,!1).break()),a===1?e.assign(m,!0):e.if((0,hi._)`${P} >= ${a}`,()=>e.assign(m,!0)))}}};gy.default=fF;var Yd={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;const e=mt,n=Ve,r=Ct;t.error={message:({params:{property:l,depsCount:d,deps:h}})=>{const m=d===1?"property":"properties";return(0,e.str)`must have ${m} ${h} when property ${l} is present`},params:({params:{property:l,depsCount:d,deps:h,missingProperty:m}})=>(0,e._)`{property: ${l}, + || ${a} === "boolean" || ${i} === null`).assign(c,(0,St._)`[${i}]`)}}}function S2({gen:t,parentData:e,parentDataProperty:n},r){t.if((0,St._)`${e} !== undefined`,()=>t.assign((0,St._)`${e}[${n}]`,r))}function Vg(t,e,n,r=ku.Correct){const i=r===ku.Correct?St.operators.EQ:St.operators.NEQ;let s;switch(t){case"null":return(0,St._)`${e} ${i} null`;case"array":s=(0,St._)`Array.isArray(${e})`;break;case"object":s=(0,St._)`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":s=a((0,St._)`!(${e} % 1) && !isNaN(${e})`);break;case"number":s=a();break;default:return(0,St._)`typeof ${e} ${i} ${t}`}return r===ku.Correct?s:(0,St.not)(s);function a(c=St.nil){return(0,St.and)((0,St._)`typeof ${e} == "number"`,c,n?(0,St._)`isFinite(${e})`:St.nil)}}tr.checkDataType=Vg;function Hg(t,e,n,r){if(t.length===1)return Vg(t[0],e,n,r);let i;const s=(0,Jw.toHash)(t);if(s.array&&s.object){const a=(0,St._)`typeof ${e} != "object"`;i=s.null?a:(0,St._)`!${e} || ${a}`,delete s.null,delete s.array,delete s.object}else i=St.nil;s.number&&delete s.integer;for(const a in s)i=(0,St.and)(i,Vg(a,e,n,r));return i}tr.checkDataTypes=Hg;const k2={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:e})=>typeof t=="string"?(0,St._)`{type: ${t}}`:(0,St._)`{type: ${e}}`};function Kg(t){const e=T2(t);(0,D2.reportError)(e,k2)}tr.reportTypeError=Kg;function T2(t){const{gen:e,data:n,schema:r}=t,i=(0,Jw.schemaRefOrVal)(t,r,"type");return{gen:e,keyword:"type",data:n,schema:r.type,schemaCode:i,schemaValue:i,parentSchema:r,params:{},it:t}}var _d={};Object.defineProperty(_d,"__esModule",{value:!0}),_d.assignDefaults=void 0;const Tu=mt,A2=Ve;function C2(t,e){const{properties:n,items:r}=t.schema;if(e==="object"&&n)for(const i in n)Zw(t,i,n[i].default);else e==="array"&&Array.isArray(r)&&r.forEach((i,s)=>Zw(t,s,i.default))}_d.assignDefaults=C2;function Zw(t,e,n){const{gen:r,compositeRule:i,data:s,opts:a}=t;if(n===void 0)return;const c=(0,Tu._)`${s}${(0,Tu.getProperty)(e)}`;if(i){(0,A2.checkStrictMode)(t,`default is ignored for: ${c}`);return}let l=(0,Tu._)`${c} === undefined`;a.useDefaults==="empty"&&(l=(0,Tu._)`${l} || ${c} === null || ${c} === ""`),r.if(l,(0,Tu._)`${c} = ${(0,Tu.stringify)(n)}`)}var os={},Ct={};Object.defineProperty(Ct,"__esModule",{value:!0}),Ct.validateUnion=Ct.validateArray=Ct.usePattern=Ct.callValidateCode=Ct.schemaProperties=Ct.allSchemaProperties=Ct.noPropertyInData=Ct.propertyInData=Ct.isOwnProperty=Ct.hasPropFunc=Ct.reportMissingProp=Ct.checkMissingProp=Ct.checkReportMissingProp=void 0;const yn=mt,zg=Ve,fo=Jr,O2=Ve;function P2(t,e){const{gen:n,data:r,it:i}=t;n.if(Gg(n,r,e,i.opts.ownProperties),()=>{t.setParams({missingProperty:(0,yn._)`${e}`},!0),t.error()})}Ct.checkReportMissingProp=P2;function N2({gen:t,data:e,it:{opts:n}},r,i){return(0,yn.or)(...r.map(s=>(0,yn.and)(Gg(t,e,s,n.ownProperties),(0,yn._)`${i} = ${s}`)))}Ct.checkMissingProp=N2;function F2(t,e){t.setParams({missingProperty:e},!0),t.error()}Ct.reportMissingProp=F2;function e_(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,yn._)`Object.prototype.hasOwnProperty`})}Ct.hasPropFunc=e_;function Yg(t,e,n){return(0,yn._)`${e_(t)}.call(${e}, ${n})`}Ct.isOwnProperty=Yg;function R2(t,e,n,r){const i=(0,yn._)`${e}${(0,yn.getProperty)(n)} !== undefined`;return r?(0,yn._)`${i} && ${Yg(t,e,n)}`:i}Ct.propertyInData=R2;function Gg(t,e,n,r){const i=(0,yn._)`${e}${(0,yn.getProperty)(n)} === undefined`;return r?(0,yn.or)(i,(0,yn.not)(Yg(t,e,n))):i}Ct.noPropertyInData=Gg;function t_(t){return t?Object.keys(t).filter(e=>e!=="__proto__"):[]}Ct.allSchemaProperties=t_;function I2(t,e){return t_(e).filter(n=>!(0,zg.alwaysValidSchema)(t,e[n]))}Ct.schemaProperties=I2;function M2({schemaCode:t,data:e,it:{gen:n,topSchemaRef:r,schemaPath:i,errorPath:s},it:a},c,l,d){const h=d?(0,yn._)`${t}, ${e}, ${r}${i}`:e,m=[[fo.default.instancePath,(0,yn.strConcat)(fo.default.instancePath,s)],[fo.default.parentData,a.parentData],[fo.default.parentDataProperty,a.parentDataProperty],[fo.default.rootData,fo.default.rootData]];a.opts.dynamicRef&&m.push([fo.default.dynamicAnchors,fo.default.dynamicAnchors]);const E=(0,yn._)`${h}, ${n.object(...m)}`;return l!==yn.nil?(0,yn._)`${c}.call(${l}, ${E})`:(0,yn._)`${c}(${E})`}Ct.callValidateCode=M2;const L2=(0,yn._)`new RegExp`;function j2({gen:t,it:{opts:e}},n){const r=e.unicodeRegExp?"u":"",{regExp:i}=e.code,s=i(n,r);return t.scopeValue("pattern",{key:s.toString(),ref:s,code:(0,yn._)`${i.code==="new RegExp"?L2:(0,O2.useFunc)(t,i)}(${n}, ${r})`})}Ct.usePattern=j2;function x2(t){const{gen:e,data:n,keyword:r,it:i}=t,s=e.name("valid");if(i.allErrors){const c=e.let("valid",!0);return a(()=>e.assign(c,!1)),c}return e.var(s,!0),a(()=>e.break()),s;function a(c){const l=e.const("len",(0,yn._)`${n}.length`);e.forRange("i",0,l,d=>{t.subschema({keyword:r,dataProp:d,dataPropType:zg.Type.Num},s),e.if((0,yn.not)(s),c)})}}Ct.validateArray=x2;function B2(t){const{gen:e,schema:n,keyword:r,it:i}=t;if(!Array.isArray(n))throw new Error("ajv implementation error");if(n.some(l=>(0,zg.alwaysValidSchema)(i,l))&&!i.opts.unevaluated)return;const a=e.let("valid",!1),c=e.name("_valid");e.block(()=>n.forEach((l,d)=>{const h=t.subschema({keyword:r,schemaProp:d,compositeRule:!0},c);e.assign(a,(0,yn._)`${a} || ${c}`),t.mergeValidEvaluated(h,c)||e.if((0,yn.not)(a))})),t.result(a,()=>t.reset(),()=>t.error(!0))}Ct.validateUnion=B2,Object.defineProperty(os,"__esModule",{value:!0}),os.validateKeywordUsage=os.validSchemaType=os.funcKeywordCode=os.macroKeywordCode=void 0;const Sr=mt,aa=Jr,q2=Ct,W2=Gc;function U2(t,e){const{gen:n,keyword:r,schema:i,parentSchema:s,it:a}=t,c=e.macro.call(a.self,i,s,a),l=r_(n,r,c);a.opts.validateSchema!==!1&&a.self.validateSchema(c,!0);const d=n.name("valid");t.subschema({schema:c,schemaPath:Sr.nil,errSchemaPath:`${a.errSchemaPath}/${r}`,topSchemaRef:l,compositeRule:!0},d),t.pass(d,()=>t.error(!0))}os.macroKeywordCode=U2;function V2(t,e){var n;const{gen:r,keyword:i,schema:s,parentSchema:a,$data:c,it:l}=t;K2(l,e);const d=!c&&e.compile?e.compile.call(l.self,s,a,l):e.validate,h=r_(r,i,d),m=r.let("valid");t.block$data(m,E),t.ok((n=e.valid)!==null&&n!==void 0?n:m);function E(){if(e.errors===!1)P(),e.modifying&&n_(t),A(()=>t.error());else{const F=e.async?T():R();e.modifying&&n_(t),A(()=>H2(t,F))}}function T(){const F=r.let("ruleErrs",null);return r.try(()=>P((0,Sr._)`await `),S=>r.assign(m,!1).if((0,Sr._)`${S} instanceof ${l.ValidationError}`,()=>r.assign(F,(0,Sr._)`${S}.errors`),()=>r.throw(S))),F}function R(){const F=(0,Sr._)`${h}.errors`;return r.assign(F,null),P(Sr.nil),F}function P(F=e.async?(0,Sr._)`await `:Sr.nil){const S=l.opts.passContext?aa.default.this:aa.default.self,y=!("compile"in e&&!c||e.schema===!1);r.assign(m,(0,Sr._)`${F}${(0,q2.callValidateCode)(t,h,S,y)}`,e.modifying)}function A(F){var S;r.if((0,Sr.not)((S=e.valid)!==null&&S!==void 0?S:m),F)}}os.funcKeywordCode=V2;function n_(t){const{gen:e,data:n,it:r}=t;e.if(r.parentData,()=>e.assign(n,(0,Sr._)`${r.parentData}[${r.parentDataProperty}]`))}function H2(t,e){const{gen:n}=t;n.if((0,Sr._)`Array.isArray(${e})`,()=>{n.assign(aa.default.vErrors,(0,Sr._)`${aa.default.vErrors} === null ? ${e} : ${aa.default.vErrors}.concat(${e})`).assign(aa.default.errors,(0,Sr._)`${aa.default.vErrors}.length`),(0,W2.extendErrors)(t)},()=>t.error())}function K2({schemaEnv:t},e){if(e.async&&!t.$async)throw new Error("async keyword in sync schema")}function r_(t,e,n){if(n===void 0)throw new Error(`keyword "${e}" failed to compile`);return t.scopeValue("keyword",typeof n=="function"?{ref:n}:{ref:n,code:(0,Sr.stringify)(n)})}function z2(t,e,n=!1){return!e.length||e.some(r=>r==="array"?Array.isArray(t):r==="object"?t&&typeof t=="object"&&!Array.isArray(t):typeof t==r||n&&typeof t>"u")}os.validSchemaType=z2;function Y2({schema:t,opts:e,self:n,errSchemaPath:r},i,s){if(Array.isArray(i.keyword)?!i.keyword.includes(s):i.keyword!==s)throw new Error("ajv implementation error");const a=i.dependencies;if(a!=null&&a.some(c=>!Object.prototype.hasOwnProperty.call(t,c)))throw new Error(`parent schema must have dependencies of ${s}: ${a.join(",")}`);if(i.validateSchema&&!i.validateSchema(t[s])){const l=`keyword "${s}" value is invalid at path "${r}": `+n.errorsText(i.validateSchema.errors);if(e.validateSchema==="log")n.logger.error(l);else throw new Error(l)}}os.validateKeywordUsage=Y2;var ho={};Object.defineProperty(ho,"__esModule",{value:!0}),ho.extendSubschemaMode=ho.extendSubschemaData=ho.getSubschema=void 0;const as=mt,i_=Ve;function G2(t,{keyword:e,schemaProp:n,schema:r,schemaPath:i,errSchemaPath:s,topSchemaRef:a}){if(e!==void 0&&r!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(e!==void 0){const c=t.schema[e];return n===void 0?{schema:c,schemaPath:(0,as._)`${t.schemaPath}${(0,as.getProperty)(e)}`,errSchemaPath:`${t.errSchemaPath}/${e}`}:{schema:c[n],schemaPath:(0,as._)`${t.schemaPath}${(0,as.getProperty)(e)}${(0,as.getProperty)(n)}`,errSchemaPath:`${t.errSchemaPath}/${e}/${(0,i_.escapeFragment)(n)}`}}if(r!==void 0){if(i===void 0||s===void 0||a===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:r,schemaPath:i,topSchemaRef:a,errSchemaPath:s}}throw new Error('either "keyword" or "schema" must be passed')}ho.getSubschema=G2;function J2(t,e,{dataProp:n,dataPropType:r,data:i,dataTypes:s,propertyName:a}){if(i!==void 0&&n!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:c}=e;if(n!==void 0){const{errorPath:d,dataPathArr:h,opts:m}=e,E=c.let("data",(0,as._)`${e.data}${(0,as.getProperty)(n)}`,!0);l(E),t.errorPath=(0,as.str)`${d}${(0,i_.getErrorPath)(n,r,m.jsPropertySyntax)}`,t.parentDataProperty=(0,as._)`${n}`,t.dataPathArr=[...h,t.parentDataProperty]}if(i!==void 0){const d=i instanceof as.Name?i:c.let("data",i,!0);l(d),a!==void 0&&(t.propertyName=a)}s&&(t.dataTypes=s);function l(d){t.data=d,t.dataLevel=e.dataLevel+1,t.dataTypes=[],e.definedProperties=new Set,t.parentData=e.data,t.dataNames=[...e.dataNames,d]}}ho.extendSubschemaData=J2;function Q2(t,{jtdDiscriminator:e,jtdMetadata:n,compositeRule:r,createErrors:i,allErrors:s}){r!==void 0&&(t.compositeRule=r),i!==void 0&&(t.createErrors=i),s!==void 0&&(t.allErrors=s),t.jtdDiscriminator=e,t.jtdMetadata=n}ho.extendSubschemaMode=Q2;var fr={},s_=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var r,i,s;if(Array.isArray(e)){if(r=e.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!t(e[i],n[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(s=Object.keys(e),r=s.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,s[i]))return!1;for(i=r;i--!==0;){var a=s[i];if(!t(e[a],n[a]))return!1}return!0}return e!==e&&n!==n},o_={exports:{}},po=o_.exports=function(t,e,n){typeof e=="function"&&(n=e,e={}),n=e.cb||n;var r=typeof n=="function"?n:n.pre||function(){},i=n.post||function(){};$d(e,r,i,t,"",t)};po.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},po.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},po.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},po.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function $d(t,e,n,r,i,s,a,c,l,d){if(r&&typeof r=="object"&&!Array.isArray(r)){e(r,i,s,a,c,l,d);for(var h in r){var m=r[h];if(Array.isArray(m)){if(h in po.arrayKeywords)for(var E=0;Ee+=a_(r)),e===1/0))return 1/0}return e}function u_(t,e="",n){n!==!1&&(e=Au(e));const r=t.parse(e);return c_(t,r)}fr.getFullPath=u_;function c_(t,e){return t.serialize(e).split("#")[0]+"#"}fr._getFullPath=c_;const sP=/#\/?$/;function Au(t){return t?t.replace(sP,""):""}fr.normalizeId=Au;function oP(t,e,n){return n=Au(n),t.resolve(e,n)}fr.resolveUrl=oP;const aP=/^[a-z_][-a-z0-9._]*$/i;function uP(t,e){if(typeof t=="boolean")return{};const{schemaId:n,uriResolver:r}=this.opts,i=Au(t[n]||e),s={"":i},a=u_(r,i,!1),c={},l=new Set;return tP(t,{allKeys:!0},(m,E,T,R)=>{if(R===void 0)return;const P=a+E;let A=s[R];typeof m[n]=="string"&&(A=F.call(this,m[n])),S.call(this,m.$anchor),S.call(this,m.$dynamicAnchor),s[E]=A;function F(y){const D=this.opts.uriResolver.resolve;if(y=Au(A?D(A,y):y),l.has(y))throw h(y);l.add(y);let v=this.refs[y];return typeof v=="string"&&(v=this.refs[v]),typeof v=="object"?d(m,v.schema,y):y!==Au(P)&&(y[0]==="#"?(d(m,c[y],y),c[y]=m):this.refs[y]=P),y}function S(y){if(typeof y=="string"){if(!aP.test(y))throw new Error(`invalid anchor "${y}"`);F.call(this,`#${y}`)}}}),c;function d(m,E,T){if(E!==void 0&&!eP(m,E))throw h(T)}function h(m){return new Error(`reference "${m}" resolves to more than one schema`)}}fr.getSchemaRefs=uP,Object.defineProperty(Gr,"__esModule",{value:!0}),Gr.getData=Gr.KeywordCxt=Gr.validateFunctionCode=void 0;const l_=Su,f_=tr,Qg=ks,Ed=tr,cP=_d,Qc=os,Xg=ho,Ze=mt,dt=Jr,lP=fr,Ts=Ve,Xc=Gc;function fP(t){if(m_(t)&&(g_(t),p_(t))){pP(t);return}d_(t,()=>(0,l_.topBoolOrEmptySchema)(t))}Gr.validateFunctionCode=fP;function d_({gen:t,validateName:e,schema:n,schemaEnv:r,opts:i},s){i.code.es5?t.func(e,(0,Ze._)`${dt.default.data}, ${dt.default.valCxt}`,r.$async,()=>{t.code((0,Ze._)`"use strict"; ${h_(n,i)}`),hP(t,i),t.code(s)}):t.func(e,(0,Ze._)`${dt.default.data}, ${dP(i)}`,r.$async,()=>t.code(h_(n,i)).code(s))}function dP(t){return(0,Ze._)`{${dt.default.instancePath}="", ${dt.default.parentData}, ${dt.default.parentDataProperty}, ${dt.default.rootData}=${dt.default.data}${t.dynamicRef?(0,Ze._)`, ${dt.default.dynamicAnchors}={}`:Ze.nil}}={}`}function hP(t,e){t.if(dt.default.valCxt,()=>{t.var(dt.default.instancePath,(0,Ze._)`${dt.default.valCxt}.${dt.default.instancePath}`),t.var(dt.default.parentData,(0,Ze._)`${dt.default.valCxt}.${dt.default.parentData}`),t.var(dt.default.parentDataProperty,(0,Ze._)`${dt.default.valCxt}.${dt.default.parentDataProperty}`),t.var(dt.default.rootData,(0,Ze._)`${dt.default.valCxt}.${dt.default.rootData}`),e.dynamicRef&&t.var(dt.default.dynamicAnchors,(0,Ze._)`${dt.default.valCxt}.${dt.default.dynamicAnchors}`)},()=>{t.var(dt.default.instancePath,(0,Ze._)`""`),t.var(dt.default.parentData,(0,Ze._)`undefined`),t.var(dt.default.parentDataProperty,(0,Ze._)`undefined`),t.var(dt.default.rootData,dt.default.data),e.dynamicRef&&t.var(dt.default.dynamicAnchors,(0,Ze._)`{}`)})}function pP(t){const{schema:e,opts:n,gen:r}=t;d_(t,()=>{n.$comment&&e.$comment&&v_(t),bP(t),r.let(dt.default.vErrors,null),r.let(dt.default.errors,0),n.unevaluated&&mP(t),y_(t),_P(t)})}function mP(t){const{gen:e,validateName:n}=t;t.evaluated=e.const("evaluated",(0,Ze._)`${n}.evaluated`),e.if((0,Ze._)`${t.evaluated}.dynamicProps`,()=>e.assign((0,Ze._)`${t.evaluated}.props`,(0,Ze._)`undefined`)),e.if((0,Ze._)`${t.evaluated}.dynamicItems`,()=>e.assign((0,Ze._)`${t.evaluated}.items`,(0,Ze._)`undefined`))}function h_(t,e){const n=typeof t=="object"&&t[e.schemaId];return n&&(e.code.source||e.code.process)?(0,Ze._)`/*# sourceURL=${n} */`:Ze.nil}function gP(t,e){if(m_(t)&&(g_(t),p_(t))){yP(t,e);return}(0,l_.boolOrEmptySchema)(t,e)}function p_({schema:t,self:e}){if(typeof t=="boolean")return!t;for(const n in t)if(e.RULES.all[n])return!0;return!1}function m_(t){return typeof t.schema!="boolean"}function yP(t,e){const{schema:n,gen:r,opts:i}=t;i.$comment&&n.$comment&&v_(t),DP(t),wP(t);const s=r.const("_errs",dt.default.errors);y_(t,s),r.var(e,(0,Ze._)`${s} === ${dt.default.errors}`)}function g_(t){(0,Ts.checkUnknownRules)(t),vP(t)}function y_(t,e){if(t.opts.jtd)return b_(t,[],!1,e);const n=(0,f_.getSchemaTypes)(t.schema),r=(0,f_.coerceAndCheckDataType)(t,n);b_(t,n,!r,e)}function vP(t){const{schema:e,errSchemaPath:n,opts:r,self:i}=t;e.$ref&&r.ignoreKeywordsWithRef&&(0,Ts.schemaHasRulesButRef)(e,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${n}"`)}function bP(t){const{schema:e,opts:n}=t;e.default!==void 0&&n.useDefaults&&n.strictSchema&&(0,Ts.checkStrictMode)(t,"default is ignored in the schema root")}function DP(t){const e=t.schema[t.opts.schemaId];e&&(t.baseId=(0,lP.resolveUrl)(t.opts.uriResolver,t.baseId,e))}function wP(t){if(t.schema.$async&&!t.schemaEnv.$async)throw new Error("async schema in sync schema")}function v_({gen:t,schemaEnv:e,schema:n,errSchemaPath:r,opts:i}){const s=n.$comment;if(i.$comment===!0)t.code((0,Ze._)`${dt.default.self}.logger.log(${s})`);else if(typeof i.$comment=="function"){const a=(0,Ze.str)`${r}/$comment`,c=t.scopeValue("root",{ref:e.root});t.code((0,Ze._)`${dt.default.self}.opts.$comment(${s}, ${a}, ${c}.schema)`)}}function _P(t){const{gen:e,schemaEnv:n,validateName:r,ValidationError:i,opts:s}=t;n.$async?e.if((0,Ze._)`${dt.default.errors} === 0`,()=>e.return(dt.default.data),()=>e.throw((0,Ze._)`new ${i}(${dt.default.vErrors})`)):(e.assign((0,Ze._)`${r}.errors`,dt.default.vErrors),s.unevaluated&&$P(t),e.return((0,Ze._)`${dt.default.errors} === 0`))}function $P({gen:t,evaluated:e,props:n,items:r}){n instanceof Ze.Name&&t.assign((0,Ze._)`${e}.props`,n),r instanceof Ze.Name&&t.assign((0,Ze._)`${e}.items`,r)}function b_(t,e,n,r){const{gen:i,schema:s,data:a,allErrors:c,opts:l,self:d}=t,{RULES:h}=d;if(s.$ref&&(l.ignoreKeywordsWithRef||!(0,Ts.schemaHasRulesButRef)(s,h))){i.block(()=>$_(t,"$ref",h.all.$ref.definition));return}l.jtd||EP(t,e),i.block(()=>{for(const E of h.rules)m(E);m(h.post)});function m(E){!(0,Qg.shouldUseGroup)(s,E)||(E.type?(i.if((0,Ed.checkDataType)(E.type,a,l.strictNumbers)),D_(t,E),e.length===1&&e[0]===E.type&&n&&(i.else(),(0,Ed.reportTypeError)(t)),i.endIf()):D_(t,E),c||i.if((0,Ze._)`${dt.default.errors} === ${r||0}`))}}function D_(t,e){const{gen:n,schema:r,opts:{useDefaults:i}}=t;i&&(0,cP.assignDefaults)(t,e.type),n.block(()=>{for(const s of e.rules)(0,Qg.shouldUseRule)(r,s)&&$_(t,s.keyword,s.definition,e.type)})}function EP(t,e){t.schemaEnv.meta||!t.opts.strictTypes||(SP(t,e),t.opts.allowUnionTypes||kP(t,e),TP(t,t.dataTypes))}function SP(t,e){if(!!e.length){if(!t.dataTypes.length){t.dataTypes=e;return}e.forEach(n=>{w_(t.dataTypes,n)||Zg(t,`type "${n}" not allowed by context "${t.dataTypes.join(",")}"`)}),CP(t,e)}}function kP(t,e){e.length>1&&!(e.length===2&&e.includes("null"))&&Zg(t,"use allowUnionTypes to allow union type keyword")}function TP(t,e){const n=t.self.RULES.all;for(const r in n){const i=n[r];if(typeof i=="object"&&(0,Qg.shouldUseRule)(t.schema,i)){const{type:s}=i.definition;s.length&&!s.some(a=>AP(e,a))&&Zg(t,`missing type "${s.join(",")}" for keyword "${r}"`)}}}function AP(t,e){return t.includes(e)||e==="number"&&t.includes("integer")}function w_(t,e){return t.includes(e)||e==="integer"&&t.includes("number")}function CP(t,e){const n=[];for(const r of t.dataTypes)w_(e,r)?n.push(r):e.includes("integer")&&r==="number"&&n.push("integer");t.dataTypes=n}function Zg(t,e){const n=t.schemaEnv.baseId+t.errSchemaPath;e+=` at "${n}" (strictTypes)`,(0,Ts.checkStrictMode)(t,e,t.opts.strictTypes)}class __{constructor(e,n,r){if((0,Qc.validateKeywordUsage)(e,n,r),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=r,this.data=e.data,this.schema=e.schema[r],this.$data=n.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,Ts.schemaRefOrVal)(e,this.schema,r,this.$data),this.schemaType=n.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=n,this.$data)this.schemaCode=e.gen.const("vSchema",E_(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,Qc.validSchemaType)(this.schema,n.schemaType,n.allowUndefined))throw new Error(`${r} value must be ${JSON.stringify(n.schemaType)}`);("code"in n?n.trackErrors:n.errors!==!1)&&(this.errsCount=e.gen.const("_errs",dt.default.errors))}result(e,n,r){this.failResult((0,Ze.not)(e),n,r)}failResult(e,n,r){this.gen.if(e),r?r():this.error(),n?(this.gen.else(),n(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,n){this.failResult((0,Ze.not)(e),void 0,n)}fail(e){if(e===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);const{schemaCode:n}=this;this.fail((0,Ze._)`${n} !== undefined && (${(0,Ze.or)(this.invalid$data(),e)})`)}error(e,n,r){if(n){this.setParams(n),this._error(e,r),this.setParams({});return}this._error(e,r)}_error(e,n){(e?Xc.reportExtraError:Xc.reportError)(this,this.def.error,n)}$dataError(){(0,Xc.reportError)(this,this.def.$dataError||Xc.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,Xc.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,n){n?Object.assign(this.params,e):this.params=e}block$data(e,n,r=Ze.nil){this.gen.block(()=>{this.check$data(e,r),n()})}check$data(e=Ze.nil,n=Ze.nil){if(!this.$data)return;const{gen:r,schemaCode:i,schemaType:s,def:a}=this;r.if((0,Ze.or)((0,Ze._)`${i} === undefined`,n)),e!==Ze.nil&&r.assign(e,!0),(s.length||a.validateSchema)&&(r.elseIf(this.invalid$data()),this.$dataError(),e!==Ze.nil&&r.assign(e,!1)),r.else()}invalid$data(){const{gen:e,schemaCode:n,schemaType:r,def:i,it:s}=this;return(0,Ze.or)(a(),c());function a(){if(r.length){if(!(n instanceof Ze.Name))throw new Error("ajv implementation error");const l=Array.isArray(r)?r:[r];return(0,Ze._)`${(0,Ed.checkDataTypes)(l,n,s.opts.strictNumbers,Ed.DataType.Wrong)}`}return Ze.nil}function c(){if(i.validateSchema){const l=e.scopeValue("validate$data",{ref:i.validateSchema});return(0,Ze._)`!${l}(${n})`}return Ze.nil}}subschema(e,n){const r=(0,Xg.getSubschema)(this.it,e);(0,Xg.extendSubschemaData)(r,this.it,e),(0,Xg.extendSubschemaMode)(r,e);const i={...this.it,...r,items:void 0,props:void 0};return gP(i,n),i}mergeEvaluated(e,n){const{it:r,gen:i}=this;!r.opts.unevaluated||(r.props!==!0&&e.props!==void 0&&(r.props=Ts.mergeEvaluated.props(i,e.props,r.props,n)),r.items!==!0&&e.items!==void 0&&(r.items=Ts.mergeEvaluated.items(i,e.items,r.items,n)))}mergeValidEvaluated(e,n){const{it:r,gen:i}=this;if(r.opts.unevaluated&&(r.props!==!0||r.items!==!0))return i.if(n,()=>this.mergeEvaluated(e,Ze.Name)),!0}}Gr.KeywordCxt=__;function $_(t,e,n,r){const i=new __(t,n,e);"code"in n?n.code(i,r):i.$data&&n.validate?(0,Qc.funcKeywordCode)(i,n):"macro"in n?(0,Qc.macroKeywordCode)(i,n):(n.compile||n.validate)&&(0,Qc.funcKeywordCode)(i,n)}const OP=/^\/(?:[^~]|~0|~1)*$/,PP=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function E_(t,{dataLevel:e,dataNames:n,dataPathArr:r}){let i,s;if(t==="")return dt.default.rootData;if(t[0]==="/"){if(!OP.test(t))throw new Error(`Invalid JSON-pointer: ${t}`);i=t,s=dt.default.rootData}else{const d=PP.exec(t);if(!d)throw new Error(`Invalid JSON-pointer: ${t}`);const h=+d[1];if(i=d[2],i==="#"){if(h>=e)throw new Error(l("property/index",h));return r[e-h]}if(h>e)throw new Error(l("data",h));if(s=n[e-h],!i)return s}let a=s;const c=i.split("/");for(const d of c)d&&(s=(0,Ze._)`${s}${(0,Ze.getProperty)((0,Ts.unescapeJsonPointer)(d))}`,a=(0,Ze._)`${a} && ${s}`);return a;function l(d,h){return`Cannot access ${d} ${h} levels up, current level is ${e}`}}Gr.getData=E_;var ua={};Object.defineProperty(ua,"__esModule",{value:!0});class NP extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}}ua.default=NP;var mo={};Object.defineProperty(mo,"__esModule",{value:!0});const ey=fr;class FP extends Error{constructor(e,n,r,i){super(i||`can't resolve reference ${r} from id ${n}`),this.missingRef=(0,ey.resolveUrl)(e,n,r),this.missingSchema=(0,ey.normalizeId)((0,ey.getFullPath)(e,this.missingRef))}}mo.default=FP;var kr={};Object.defineProperty(kr,"__esModule",{value:!0}),kr.resolveSchema=kr.getCompilingSchema=kr.resolveRef=kr.compileSchema=kr.SchemaEnv=void 0;const Ii=mt,RP=ua,ca=Jr,Mi=fr,S_=Ve,IP=Gr;class Sd{constructor(e){var n;this.refs={},this.dynamicAnchors={};let r;typeof e.schema=="object"&&(r=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=(n=e.baseId)!==null&&n!==void 0?n:(0,Mi.normalizeId)(r==null?void 0:r[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=r==null?void 0:r.$async,this.refs={}}}kr.SchemaEnv=Sd;function ty(t){const e=k_.call(this,t);if(e)return e;const n=(0,Mi.getFullPath)(this.opts.uriResolver,t.root.baseId),{es5:r,lines:i}=this.opts.code,{ownProperties:s}=this.opts,a=new Ii.CodeGen(this.scope,{es5:r,lines:i,ownProperties:s});let c;t.$async&&(c=a.scopeValue("Error",{ref:RP.default,code:(0,Ii._)`require("ajv/dist/runtime/validation_error").default`}));const l=a.scopeName("validate");t.validateName=l;const d={gen:a,allErrors:this.opts.allErrors,data:ca.default.data,parentData:ca.default.parentData,parentDataProperty:ca.default.parentDataProperty,dataNames:[ca.default.data],dataPathArr:[Ii.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:a.scopeValue("schema",this.opts.code.source===!0?{ref:t.schema,code:(0,Ii.stringify)(t.schema)}:{ref:t.schema}),validateName:l,ValidationError:c,schema:t.schema,schemaEnv:t,rootId:n,baseId:t.baseId||n,schemaPath:Ii.nil,errSchemaPath:t.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,Ii._)`""`,opts:this.opts,self:this};let h;try{this._compilations.add(t),(0,IP.validateFunctionCode)(d),a.optimize(this.opts.code.optimize);const m=a.toString();h=`${a.scopeRefs(ca.default.scope)}return ${m}`,this.opts.code.process&&(h=this.opts.code.process(h,t));const T=new Function(`${ca.default.self}`,`${ca.default.scope}`,h)(this,this.scope.get());if(this.scope.value(l,{ref:T}),T.errors=null,T.schema=t.schema,T.schemaEnv=t,t.$async&&(T.$async=!0),this.opts.code.source===!0&&(T.source={validateName:l,validateCode:m,scopeValues:a._values}),this.opts.unevaluated){const{props:R,items:P}=d;T.evaluated={props:R instanceof Ii.Name?void 0:R,items:P instanceof Ii.Name?void 0:P,dynamicProps:R instanceof Ii.Name,dynamicItems:P instanceof Ii.Name},T.source&&(T.source.evaluated=(0,Ii.stringify)(T.evaluated))}return t.validate=T,t}catch(m){throw delete t.validate,delete t.validateName,h&&this.logger.error("Error compiling schema, function code:",h),m}finally{this._compilations.delete(t)}}kr.compileSchema=ty;function MP(t,e,n){var r;n=(0,Mi.resolveUrl)(this.opts.uriResolver,e,n);const i=t.refs[n];if(i)return i;let s=xP.call(this,t,n);if(s===void 0){const a=(r=t.localRefs)===null||r===void 0?void 0:r[n],{schemaId:c}=this.opts;a&&(s=new Sd({schema:a,schemaId:c,root:t,baseId:e}))}if(s!==void 0)return t.refs[n]=LP.call(this,s)}kr.resolveRef=MP;function LP(t){return(0,Mi.inlineRef)(t.schema,this.opts.inlineRefs)?t.schema:t.validate?t:ty.call(this,t)}function k_(t){for(const e of this._compilations)if(jP(e,t))return e}kr.getCompilingSchema=k_;function jP(t,e){return t.schema===e.schema&&t.root===e.root&&t.baseId===e.baseId}function xP(t,e){let n;for(;typeof(n=this.refs[e])=="string";)e=n;return n||this.schemas[e]||kd.call(this,t,e)}function kd(t,e){const n=this.opts.uriResolver.parse(e),r=(0,Mi._getFullPath)(this.opts.uriResolver,n);let i=(0,Mi.getFullPath)(this.opts.uriResolver,t.baseId,void 0);if(Object.keys(t.schema).length>0&&r===i)return ny.call(this,n,t);const s=(0,Mi.normalizeId)(r),a=this.refs[s]||this.schemas[s];if(typeof a=="string"){const c=kd.call(this,t,a);return typeof(c==null?void 0:c.schema)!="object"?void 0:ny.call(this,n,c)}if(typeof(a==null?void 0:a.schema)=="object"){if(a.validate||ty.call(this,a),s===(0,Mi.normalizeId)(e)){const{schema:c}=a,{schemaId:l}=this.opts,d=c[l];return d&&(i=(0,Mi.resolveUrl)(this.opts.uriResolver,i,d)),new Sd({schema:c,schemaId:l,root:t,baseId:i})}return ny.call(this,n,a)}}kr.resolveSchema=kd;const BP=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function ny(t,{baseId:e,schema:n,root:r}){var i;if(((i=t.fragment)===null||i===void 0?void 0:i[0])!=="/")return;for(const c of t.fragment.slice(1).split("/")){if(typeof n=="boolean")return;const l=n[(0,S_.unescapeFragment)(c)];if(l===void 0)return;n=l;const d=typeof n=="object"&&n[this.opts.schemaId];!BP.has(c)&&d&&(e=(0,Mi.resolveUrl)(this.opts.uriResolver,e,d))}let s;if(typeof n!="boolean"&&n.$ref&&!(0,S_.schemaHasRulesButRef)(n,this.RULES)){const c=(0,Mi.resolveUrl)(this.opts.uriResolver,e,n.$ref);s=kd.call(this,r,c)}const{schemaId:a}=this.opts;if(s=s||new Sd({schema:n,schemaId:a,root:r,baseId:e}),s.schema!==s.root.schema)return s}var qP={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1},ry={},Td={exports:{}},WP={HEX:{0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15}};const{HEX:UP}=WP,VP=/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u;function T_(t){if(C_(t,".")<3)return{host:t,isIPV4:!1};const e=t.match(VP)||[],[n]=e;return n?{host:KP(n,"."),isIPV4:!0}:{host:t,isIPV4:!1}}function iy(t,e=!1){let n="",r=!0;for(const i of t){if(UP[i]===void 0)return;i!=="0"&&r===!0&&(r=!1),r||(n+=i)}return e&&n.length===0&&(n="0"),n}function HP(t){let e=0;const n={error:!1,address:"",zone:""},r=[],i=[];let s=!1,a=!1,c=!1;function l(){if(i.length){if(s===!1){const d=iy(i);if(d!==void 0)r.push(d);else return n.error=!0,!1}i.length=0}return!0}for(let d=0;d7){n.error=!0;break}d-1>=0&&t[d-1]===":"&&(a=!0);continue}else if(h==="%"){if(!l())break;s=!0}else{i.push(h);continue}}return i.length&&(s?n.zone=i.join(""):c?r.push(i.join("")):r.push(iy(i))),n.address=r.join(""),n}function A_(t){if(C_(t,":")<2)return{host:t,isIPV6:!1};const e=HP(t);if(e.error)return{host:t,isIPV6:!1};{let n=e.address,r=e.address;return e.zone&&(n+="%"+e.zone,r+="%25"+e.zone),{host:n,escapedHost:r,isIPV6:!0}}}function KP(t,e){let n="",r=!0;const i=t.length;for(let s=0;s/[^!"$&'()*+,\-.;=_`a-z{}~]/u.test(String.fromCharCode(e)));function gN(t){let e=0;for(let n=0,r=t.length;n126||mN[e])return!0;return!1}const yN=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function As(t,e){const n=Object.assign({},e),r={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},i=t.indexOf("%")!==-1;let s=!1;n.reference==="suffix"&&(t=(n.scheme?n.scheme+":":"")+"//"+t);const a=t.match(yN);if(a){if(r.scheme=a[1],r.userinfo=a[3],r.host=a[4],r.port=parseInt(a[5],10),r.path=a[6]||"",r.query=a[7],r.fragment=a[8],isNaN(r.port)&&(r.port=a[5]),r.host){const l=lN(r.host);if(l.isIPV4===!1){const d=cN(l.host);r.host=d.host.toLowerCase(),s=d.isIPV6}else r.host=l.host,s=!0}r.scheme===void 0&&r.userinfo===void 0&&r.host===void 0&&r.port===void 0&&r.query===void 0&&!r.path?r.reference="same-document":r.scheme===void 0?r.reference="relative":r.fragment===void 0?r.reference="absolute":r.reference="uri",n.reference&&n.reference!=="suffix"&&n.reference!==r.reference&&(r.error=r.error||"URI is not a "+n.reference+" reference.");const c=oy[(n.scheme||r.scheme||"").toLowerCase()];if(!n.unicodeSupport&&(!c||!c.unicodeSupport)&&r.host&&(n.domainHost||c&&c.domainHost)&&s===!1&&gN(r.host))try{r.host=URL.domainToASCII(r.host.toLowerCase())}catch(l){r.error=r.error||"Host's domain name can not be converted to ASCII: "+l}(!c||c&&!c.skipNormalize)&&(i&&r.scheme!==void 0&&(r.scheme=unescape(r.scheme)),i&&r.host!==void 0&&(r.host=unescape(r.host)),r.path&&(r.path=escape(unescape(r.path))),r.fragment&&(r.fragment=encodeURI(decodeURIComponent(r.fragment)))),c&&c.parse&&c.parse(r,n)}else r.error=r.error||"URI can not be parsed.";return r}const ay={SCHEMES:oy,normalize:dN,resolve:hN,resolveComponents:L_,equal:pN,serialize:us,parse:As};Td.exports=ay,Td.exports.default=ay,Td.exports.fastUri=ay,Object.defineProperty(ry,"__esModule",{value:!0});const j_=Td.exports;j_.code='require("ajv/dist/runtime/uri").default',ry.default=j_,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var e=Gr;Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return e.KeywordCxt}});var n=mt;Object.defineProperty(t,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return n.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return n.CodeGen}});const r=ua,i=mo,s=oa,a=kr,c=mt,l=fr,d=tr,h=Ve,m=qP,E=ry,T=(Se,H)=>new RegExp(Se,H);T.code="new RegExp";const R=["removeAdditional","useDefaults","coerceTypes"],P=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),A={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},F={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},S=200;function y(Se){var H,fe,ae,U,Z,pe,Me,Ie,qe,ze,Ge,rt,_n,at,un,Sn,Mt,kn,ur,Tn,Lt,Vn,Xn,Rn,qt;const X=Se.strict,V=(H=Se.code)===null||H===void 0?void 0:H.optimize,ee=V===!0||V===void 0?1:V||0,ie=(ae=(fe=Se.code)===null||fe===void 0?void 0:fe.regExp)!==null&&ae!==void 0?ae:T,C=(U=Se.uriResolver)!==null&&U!==void 0?U:E.default;return{strictSchema:(pe=(Z=Se.strictSchema)!==null&&Z!==void 0?Z:X)!==null&&pe!==void 0?pe:!0,strictNumbers:(Ie=(Me=Se.strictNumbers)!==null&&Me!==void 0?Me:X)!==null&&Ie!==void 0?Ie:!0,strictTypes:(ze=(qe=Se.strictTypes)!==null&&qe!==void 0?qe:X)!==null&&ze!==void 0?ze:"log",strictTuples:(rt=(Ge=Se.strictTuples)!==null&&Ge!==void 0?Ge:X)!==null&&rt!==void 0?rt:"log",strictRequired:(at=(_n=Se.strictRequired)!==null&&_n!==void 0?_n:X)!==null&&at!==void 0?at:!1,code:Se.code?{...Se.code,optimize:ee,regExp:ie}:{optimize:ee,regExp:ie},loopRequired:(un=Se.loopRequired)!==null&&un!==void 0?un:S,loopEnum:(Sn=Se.loopEnum)!==null&&Sn!==void 0?Sn:S,meta:(Mt=Se.meta)!==null&&Mt!==void 0?Mt:!0,messages:(kn=Se.messages)!==null&&kn!==void 0?kn:!0,inlineRefs:(ur=Se.inlineRefs)!==null&&ur!==void 0?ur:!0,schemaId:(Tn=Se.schemaId)!==null&&Tn!==void 0?Tn:"$id",addUsedSchema:(Lt=Se.addUsedSchema)!==null&&Lt!==void 0?Lt:!0,validateSchema:(Vn=Se.validateSchema)!==null&&Vn!==void 0?Vn:!0,validateFormats:(Xn=Se.validateFormats)!==null&&Xn!==void 0?Xn:!0,unicodeRegExp:(Rn=Se.unicodeRegExp)!==null&&Rn!==void 0?Rn:!0,int32range:(qt=Se.int32range)!==null&&qt!==void 0?qt:!0,uriResolver:C}}class D{constructor(H={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,H=this.opts={...H,...y(H)};const{es5:fe,lines:ae}=this.opts.code;this.scope=new c.ValueScope({scope:{},prefixes:P,es5:fe,lines:ae}),this.logger=Y(H.logger);const U=H.validateFormats;H.validateFormats=!1,this.RULES=(0,s.getRules)(),v.call(this,A,H,"NOT SUPPORTED"),v.call(this,F,H,"DEPRECATED","warn"),this._metaOpts=M.call(this),H.formats&&q.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),H.keywords&&N.call(this,H.keywords),typeof H.meta=="object"&&this.addMetaSchema(H.meta),$.call(this),H.validateFormats=U}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:H,meta:fe,schemaId:ae}=this.opts;let U=m;ae==="id"&&(U={...m},U.id=U.$id,delete U.$id),fe&&H&&this.addMetaSchema(U,U[ae],!1)}defaultMeta(){const{meta:H,schemaId:fe}=this.opts;return this.opts.defaultMeta=typeof H=="object"?H[fe]||H:void 0}validate(H,fe){let ae;if(typeof H=="string"){if(ae=this.getSchema(H),!ae)throw new Error(`no schema with key or ref "${H}"`)}else ae=this.compile(H);const U=ae(fe);return"$async"in ae||(this.errors=ae.errors),U}compile(H,fe){const ae=this._addSchema(H,fe);return ae.validate||this._compileSchemaEnv(ae)}compileAsync(H,fe){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:ae}=this.opts;return U.call(this,H,fe);async function U(ze,Ge){await Z.call(this,ze.$schema);const rt=this._addSchema(ze,Ge);return rt.validate||pe.call(this,rt)}async function Z(ze){ze&&!this.getSchema(ze)&&await U.call(this,{$ref:ze},!0)}async function pe(ze){try{return this._compileSchemaEnv(ze)}catch(Ge){if(!(Ge instanceof i.default))throw Ge;return Me.call(this,Ge),await Ie.call(this,Ge.missingSchema),pe.call(this,ze)}}function Me({missingSchema:ze,missingRef:Ge}){if(this.refs[ze])throw new Error(`AnySchema ${ze} is loaded but ${Ge} cannot be resolved`)}async function Ie(ze){const Ge=await qe.call(this,ze);this.refs[ze]||await Z.call(this,Ge.$schema),this.refs[ze]||this.addSchema(Ge,ze,fe)}async function qe(ze){const Ge=this._loading[ze];if(Ge)return Ge;try{return await(this._loading[ze]=ae(ze))}finally{delete this._loading[ze]}}}addSchema(H,fe,ae,U=this.opts.validateSchema){if(Array.isArray(H)){for(const pe of H)this.addSchema(pe,void 0,ae,U);return this}let Z;if(typeof H=="object"){const{schemaId:pe}=this.opts;if(Z=H[pe],Z!==void 0&&typeof Z!="string")throw new Error(`schema ${pe} must be string`)}return fe=(0,l.normalizeId)(fe||Z),this._checkUnique(fe),this.schemas[fe]=this._addSchema(H,ae,fe,U,!0),this}addMetaSchema(H,fe,ae=this.opts.validateSchema){return this.addSchema(H,fe,!0,ae),this}validateSchema(H,fe){if(typeof H=="boolean")return!0;let ae;if(ae=H.$schema,ae!==void 0&&typeof ae!="string")throw new Error("$schema must be a string");if(ae=ae||this.opts.defaultMeta||this.defaultMeta(),!ae)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const U=this.validate(ae,H);if(!U&&fe){const Z="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(Z);else throw new Error(Z)}return U}getSchema(H){let fe;for(;typeof(fe=_.call(this,H))=="string";)H=fe;if(fe===void 0){const{schemaId:ae}=this.opts,U=new a.SchemaEnv({schema:{},schemaId:ae});if(fe=a.resolveSchema.call(this,U,H),!fe)return;this.refs[H]=fe}return fe.validate||this._compileSchemaEnv(fe)}removeSchema(H){if(H instanceof RegExp)return this._removeAllSchemas(this.schemas,H),this._removeAllSchemas(this.refs,H),this;switch(typeof H){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const fe=_.call(this,H);return typeof fe=="object"&&this._cache.delete(fe.schema),delete this.schemas[H],delete this.refs[H],this}case"object":{const fe=H;this._cache.delete(fe);let ae=H[this.opts.schemaId];return ae&&(ae=(0,l.normalizeId)(ae),delete this.schemas[ae],delete this.refs[ae]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(H){for(const fe of H)this.addKeyword(fe);return this}addKeyword(H,fe){let ae;if(typeof H=="string")ae=H,typeof fe=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),fe.keyword=ae);else if(typeof H=="object"&&fe===void 0){if(fe=H,ae=fe.keyword,Array.isArray(ae)&&!ae.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(ne.call(this,ae,fe),!fe)return(0,h.eachItem)(ae,Z=>ge.call(this,Z)),this;De.call(this,fe);const U={...fe,type:(0,d.getJSONTypes)(fe.type),schemaType:(0,d.getJSONTypes)(fe.schemaType)};return(0,h.eachItem)(ae,U.type.length===0?Z=>ge.call(this,Z,U):Z=>U.type.forEach(pe=>ge.call(this,Z,U,pe))),this}getKeyword(H){const fe=this.RULES.all[H];return typeof fe=="object"?fe.definition:!!fe}removeKeyword(H){const{RULES:fe}=this;delete fe.keywords[H],delete fe.all[H];for(const ae of fe.rules){const U=ae.rules.findIndex(Z=>Z.keyword===H);U>=0&&ae.rules.splice(U,1)}return this}addFormat(H,fe){return typeof fe=="string"&&(fe=new RegExp(fe)),this.formats[H]=fe,this}errorsText(H=this.errors,{separator:fe=", ",dataVar:ae="data"}={}){return!H||H.length===0?"No errors":H.map(U=>`${ae}${U.instancePath} ${U.message}`).reduce((U,Z)=>U+fe+Z)}$dataMetaSchema(H,fe){const ae=this.RULES.all;H=JSON.parse(JSON.stringify(H));for(const U of fe){const Z=U.split("/").slice(1);let pe=H;for(const Me of Z)pe=pe[Me];for(const Me in ae){const Ie=ae[Me];if(typeof Ie!="object")continue;const{$data:qe}=Ie.definition,ze=pe[Me];qe&&ze&&(pe[Me]=nt(ze))}}return H}_removeAllSchemas(H,fe){for(const ae in H){const U=H[ae];(!fe||fe.test(ae))&&(typeof U=="string"?delete H[ae]:U&&!U.meta&&(this._cache.delete(U.schema),delete H[ae]))}}_addSchema(H,fe,ae,U=this.opts.validateSchema,Z=this.opts.addUsedSchema){let pe;const{schemaId:Me}=this.opts;if(typeof H=="object")pe=H[Me];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof H!="boolean")throw new Error("schema must be object or boolean")}let Ie=this._cache.get(H);if(Ie!==void 0)return Ie;ae=(0,l.normalizeId)(pe||ae);const qe=l.getSchemaRefs.call(this,H,ae);return Ie=new a.SchemaEnv({schema:H,schemaId:Me,meta:fe,baseId:ae,localRefs:qe}),this._cache.set(Ie.schema,Ie),Z&&!ae.startsWith("#")&&(ae&&this._checkUnique(ae),this.refs[ae]=Ie),U&&this.validateSchema(H,!0),Ie}_checkUnique(H){if(this.schemas[H]||this.refs[H])throw new Error(`schema with key or id "${H}" already exists`)}_compileSchemaEnv(H){if(H.meta?this._compileMetaSchema(H):a.compileSchema.call(this,H),!H.validate)throw new Error("ajv implementation error");return H.validate}_compileMetaSchema(H){const fe=this.opts;this.opts=this._metaOpts;try{a.compileSchema.call(this,H)}finally{this.opts=fe}}}D.ValidationError=r.default,D.MissingRefError=i.default,t.default=D;function v(Se,H,fe,ae="error"){for(const U in Se){const Z=U;Z in H&&this.logger[ae](`${fe}: option ${U}. ${Se[Z]}`)}}function _(Se){return Se=(0,l.normalizeId)(Se),this.schemas[Se]||this.refs[Se]}function $(){const Se=this.opts.schemas;if(!!Se)if(Array.isArray(Se))this.addSchema(Se);else for(const H in Se)this.addSchema(Se[H],H)}function q(){for(const Se in this.opts.formats){const H=this.opts.formats[Se];H&&this.addFormat(Se,H)}}function N(Se){if(Array.isArray(Se)){this.addVocabulary(Se);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const H in Se){const fe=Se[H];fe.keyword||(fe.keyword=H),this.addKeyword(fe)}}function M(){const Se={...this.opts};for(const H of R)delete Se[H];return Se}const I={log(){},warn(){},error(){}};function Y(Se){if(Se===!1)return I;if(Se===void 0)return console;if(Se.log&&Se.warn&&Se.error)return Se;throw new Error("logger must implement log, warn and error methods")}const K=/^[a-z_$][a-z0-9_$:-]*$/i;function ne(Se,H){const{RULES:fe}=this;if((0,h.eachItem)(Se,ae=>{if(fe.keywords[ae])throw new Error(`Keyword ${ae} is already defined`);if(!K.test(ae))throw new Error(`Keyword ${ae} has invalid name`)}),!!H&&H.$data&&!("code"in H||"validate"in H))throw new Error('$data keyword must have "code" or "validate" function')}function ge(Se,H,fe){var ae;const U=H==null?void 0:H.post;if(fe&&U)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:Z}=this;let pe=U?Z.post:Z.rules.find(({type:Ie})=>Ie===fe);if(pe||(pe={type:fe,rules:[]},Z.rules.push(pe)),Z.keywords[Se]=!0,!H)return;const Me={keyword:Se,definition:{...H,type:(0,d.getJSONTypes)(H.type),schemaType:(0,d.getJSONTypes)(H.schemaType)}};H.before?ye.call(this,pe,Me,H.before):pe.rules.push(Me),Z.all[Se]=Me,(ae=H.implements)===null||ae===void 0||ae.forEach(Ie=>this.addKeyword(Ie))}function ye(Se,H,fe){const ae=Se.rules.findIndex(U=>U.keyword===fe);ae>=0?Se.rules.splice(ae,0,H):(Se.rules.push(H),this.logger.warn(`rule ${fe} is not defined`))}function De(Se){let{metaSchema:H}=Se;H!==void 0&&(Se.$data&&this.opts.$data&&(H=nt(H)),Se.validateSchema=this.compile(H,!0))}const Be={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function nt(Se){return{anyOf:[Se,Be]}}}(lo);var Od={},Pd={},uy={};Object.defineProperty(uy,"__esModule",{value:!0});const vN={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};uy.default=vN;var cs={};Object.defineProperty(cs,"__esModule",{value:!0}),cs.callRef=cs.getValidate=void 0;const bN=mo,x_=Ct,Lr=mt,Cu=Jr,B_=kr,Nd=Ve,DN={keyword:"$ref",schemaType:"string",code(t){const{gen:e,schema:n,it:r}=t,{baseId:i,schemaEnv:s,validateName:a,opts:c,self:l}=r,{root:d}=s;if((n==="#"||n==="#/")&&i===d.baseId)return m();const h=B_.resolveRef.call(l,d,i,n);if(h===void 0)throw new bN.default(r.opts.uriResolver,i,n);if(h instanceof B_.SchemaEnv)return E(h);return T(h);function m(){if(s===d)return Fd(t,a,s,s.$async);const R=e.scopeValue("root",{ref:d});return Fd(t,(0,Lr._)`${R}.validate`,d,d.$async)}function E(R){const P=q_(t,R);Fd(t,P,R,R.$async)}function T(R){const P=e.scopeValue("schema",c.code.source===!0?{ref:R,code:(0,Lr.stringify)(R)}:{ref:R}),A=e.name("valid"),F=t.subschema({schema:R,dataTypes:[],schemaPath:Lr.nil,topSchemaRef:P,errSchemaPath:n},A);t.mergeEvaluated(F),t.ok(A)}}};function q_(t,e){const{gen:n}=t;return e.validate?n.scopeValue("validate",{ref:e.validate}):(0,Lr._)`${n.scopeValue("wrapper",{ref:e})}.validate`}cs.getValidate=q_;function Fd(t,e,n,r){const{gen:i,it:s}=t,{allErrors:a,schemaEnv:c,opts:l}=s,d=l.passContext?Cu.default.this:Lr.nil;r?h():m();function h(){if(!c.$async)throw new Error("async schema referenced by sync schema");const R=i.let("valid");i.try(()=>{i.code((0,Lr._)`await ${(0,x_.callValidateCode)(t,e,d)}`),T(e),a||i.assign(R,!0)},P=>{i.if((0,Lr._)`!(${P} instanceof ${s.ValidationError})`,()=>i.throw(P)),E(P),a||i.assign(R,!1)}),t.ok(R)}function m(){t.result((0,x_.callValidateCode)(t,e,d),()=>T(e),()=>E(e))}function E(R){const P=(0,Lr._)`${R}.errors`;i.assign(Cu.default.vErrors,(0,Lr._)`${Cu.default.vErrors} === null ? ${P} : ${Cu.default.vErrors}.concat(${P})`),i.assign(Cu.default.errors,(0,Lr._)`${Cu.default.vErrors}.length`)}function T(R){var P;if(!s.opts.unevaluated)return;const A=(P=n==null?void 0:n.validate)===null||P===void 0?void 0:P.evaluated;if(s.props!==!0)if(A&&!A.dynamicProps)A.props!==void 0&&(s.props=Nd.mergeEvaluated.props(i,A.props,s.props));else{const F=i.var("props",(0,Lr._)`${R}.evaluated.props`);s.props=Nd.mergeEvaluated.props(i,F,s.props,Lr.Name)}if(s.items!==!0)if(A&&!A.dynamicItems)A.items!==void 0&&(s.items=Nd.mergeEvaluated.items(i,A.items,s.items));else{const F=i.var("items",(0,Lr._)`${R}.evaluated.items`);s.items=Nd.mergeEvaluated.items(i,F,s.items,Lr.Name)}}}cs.callRef=Fd,cs.default=DN,Object.defineProperty(Pd,"__esModule",{value:!0});const wN=uy,_N=cs,$N=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",wN.default,_N.default];Pd.default=$N;var Rd={},cy={};Object.defineProperty(cy,"__esModule",{value:!0});const Id=mt,go=Id.operators,Md={maximum:{okStr:"<=",ok:go.LTE,fail:go.GT},minimum:{okStr:">=",ok:go.GTE,fail:go.LT},exclusiveMaximum:{okStr:"<",ok:go.LT,fail:go.GTE},exclusiveMinimum:{okStr:">",ok:go.GT,fail:go.LTE}},EN={message:({keyword:t,schemaCode:e})=>(0,Id.str)`must be ${Md[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>(0,Id._)`{comparison: ${Md[t].okStr}, limit: ${e}}`},SN={keyword:Object.keys(Md),type:"number",schemaType:"number",$data:!0,error:EN,code(t){const{keyword:e,data:n,schemaCode:r}=t;t.fail$data((0,Id._)`${n} ${Md[e].fail} ${r} || isNaN(${n})`)}};cy.default=SN;var Ld={};Object.defineProperty(Ld,"__esModule",{value:!0});const el=mt,kN={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:t})=>(0,el.str)`must be multiple of ${t}`,params:({schemaCode:t})=>(0,el._)`{multipleOf: ${t}}`},code(t){const{gen:e,data:n,schemaCode:r,it:i}=t,s=i.opts.multipleOfPrecision,a=e.let("res"),c=s?(0,el._)`Math.abs(Math.round(${a}) - ${a}) > 1e-${s}`:(0,el._)`${a} !== parseInt(${a})`;t.fail$data((0,el._)`(${r} === 0 || (${a} = ${n}/${r}, ${c}))`)}};Ld.default=kN;var jd={},ly={};Object.defineProperty(ly,"__esModule",{value:!0});function W_(t){const e=t.length;let n=0,r=0,i;for(;r=55296&&i<=56319&&r(0,la._)`{limit: ${t}}`},code(t){const{keyword:e,data:n,schemaCode:r,it:i}=t,s=e==="maxLength"?la.operators.GT:la.operators.LT,a=i.opts.unicode===!1?(0,la._)`${n}.length`:(0,la._)`${(0,TN.useFunc)(t.gen,AN.default)}(${n})`;t.fail$data((0,la._)`${a} ${s} ${r}`)}};jd.default=CN;var xd={};Object.defineProperty(xd,"__esModule",{value:!0});const ON=Ct,Bd=mt,PN={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:t})=>(0,Bd.str)`must match pattern "${t}"`,params:({schemaCode:t})=>(0,Bd._)`{pattern: ${t}}`},code(t){const{data:e,$data:n,schema:r,schemaCode:i,it:s}=t,a=s.opts.unicodeRegExp?"u":"",c=n?(0,Bd._)`(new RegExp(${i}, ${a}))`:(0,ON.usePattern)(t,r);t.fail$data((0,Bd._)`!${c}.test(${e})`)}};xd.default=PN;var qd={};Object.defineProperty(qd,"__esModule",{value:!0});const tl=mt,NN={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:t,schemaCode:e}){const n=t==="maxProperties"?"more":"fewer";return(0,tl.str)`must NOT have ${n} than ${e} properties`},params:({schemaCode:t})=>(0,tl._)`{limit: ${t}}`},code(t){const{keyword:e,data:n,schemaCode:r}=t,i=e==="maxProperties"?tl.operators.GT:tl.operators.LT;t.fail$data((0,tl._)`Object.keys(${n}).length ${i} ${r}`)}};qd.default=NN;var Wd={};Object.defineProperty(Wd,"__esModule",{value:!0});const nl=Ct,rl=mt,FN=Ve,RN={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:t}})=>(0,rl.str)`must have required property '${t}'`,params:({params:{missingProperty:t}})=>(0,rl._)`{missingProperty: ${t}}`},code(t){const{gen:e,schema:n,schemaCode:r,data:i,$data:s,it:a}=t,{opts:c}=a;if(!s&&n.length===0)return;const l=n.length>=c.loopRequired;if(a.allErrors?d():h(),c.strictRequired){const T=t.parentSchema.properties,{definedProperties:R}=t.it;for(const P of n)if((T==null?void 0:T[P])===void 0&&!R.has(P)){const A=a.schemaEnv.baseId+a.errSchemaPath,F=`required property "${P}" is not defined at "${A}" (strictRequired)`;(0,FN.checkStrictMode)(a,F,a.opts.strictRequired)}}function d(){if(l||s)t.block$data(rl.nil,m);else for(const T of n)(0,nl.checkReportMissingProp)(t,T)}function h(){const T=e.let("missing");if(l||s){const R=e.let("valid",!0);t.block$data(R,()=>E(T,R)),t.ok(R)}else e.if((0,nl.checkMissingProp)(t,n,T)),(0,nl.reportMissingProp)(t,T),e.else()}function m(){e.forOf("prop",r,T=>{t.setParams({missingProperty:T}),e.if((0,nl.noPropertyInData)(e,i,T,c.ownProperties),()=>t.error())})}function E(T,R){t.setParams({missingProperty:T}),e.forOf(T,r,()=>{e.assign(R,(0,nl.propertyInData)(e,i,T,c.ownProperties)),e.if((0,rl.not)(R),()=>{t.error(),e.break()})},rl.nil)}}};Wd.default=RN;var Ud={};Object.defineProperty(Ud,"__esModule",{value:!0});const il=mt,IN={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:t,schemaCode:e}){const n=t==="maxItems"?"more":"fewer";return(0,il.str)`must NOT have ${n} than ${e} items`},params:({schemaCode:t})=>(0,il._)`{limit: ${t}}`},code(t){const{keyword:e,data:n,schemaCode:r}=t,i=e==="maxItems"?il.operators.GT:il.operators.LT;t.fail$data((0,il._)`${n}.length ${i} ${r}`)}};Ud.default=IN;var Vd={},sl={};Object.defineProperty(sl,"__esModule",{value:!0});const U_=s_;U_.code='require("ajv/dist/runtime/equal").default',sl.default=U_,Object.defineProperty(Vd,"__esModule",{value:!0});const fy=tr,dr=mt,MN=Ve,LN=sl,jN={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:t,j:e}})=>(0,dr.str)`must NOT have duplicate items (items ## ${e} and ${t} are identical)`,params:({params:{i:t,j:e}})=>(0,dr._)`{i: ${t}, j: ${e}}`},code(t){const{gen:e,data:n,$data:r,schema:i,parentSchema:s,schemaCode:a,it:c}=t;if(!r&&!i)return;const l=e.let("valid"),d=s.items?(0,fy.getSchemaTypes)(s.items):[];t.block$data(l,h,(0,dr._)`${a} === false`),t.ok(l);function h(){const R=e.let("i",(0,dr._)`${n}.length`),P=e.let("j");t.setParams({i:R,j:P}),e.assign(l,!0),e.if((0,dr._)`${R} > 1`,()=>(m()?E:T)(R,P))}function m(){return d.length>0&&!d.some(R=>R==="object"||R==="array")}function E(R,P){const A=e.name("item"),F=(0,fy.checkDataTypes)(d,A,c.opts.strictNumbers,fy.DataType.Wrong),S=e.const("indices",(0,dr._)`{}`);e.for((0,dr._)`;${R}--;`,()=>{e.let(A,(0,dr._)`${n}[${R}]`),e.if(F,(0,dr._)`continue`),d.length>1&&e.if((0,dr._)`typeof ${A} == "string"`,(0,dr._)`${A} += "_"`),e.if((0,dr._)`typeof ${S}[${A}] == "number"`,()=>{e.assign(P,(0,dr._)`${S}[${A}]`),t.error(),e.assign(l,!1).break()}).code((0,dr._)`${S}[${A}] = ${R}`)})}function T(R,P){const A=(0,MN.useFunc)(e,LN.default),F=e.name("outer");e.label(F).for((0,dr._)`;${R}--;`,()=>e.for((0,dr._)`${P} = ${R}; ${P}--;`,()=>e.if((0,dr._)`${A}(${n}[${R}], ${n}[${P}])`,()=>{t.error(),e.assign(l,!1).break(F)})))}}};Vd.default=jN;var Hd={};Object.defineProperty(Hd,"__esModule",{value:!0});const dy=mt,xN=Ve,BN=sl,qN={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:t})=>(0,dy._)`{allowedValue: ${t}}`},code(t){const{gen:e,data:n,$data:r,schemaCode:i,schema:s}=t;r||s&&typeof s=="object"?t.fail$data((0,dy._)`!${(0,xN.useFunc)(e,BN.default)}(${n}, ${i})`):t.fail((0,dy._)`${s} !== ${n}`)}};Hd.default=qN;var Kd={};Object.defineProperty(Kd,"__esModule",{value:!0});const ol=mt,WN=Ve,UN=sl,VN={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:t})=>(0,ol._)`{allowedValues: ${t}}`},code(t){const{gen:e,data:n,$data:r,schema:i,schemaCode:s,it:a}=t;if(!r&&i.length===0)throw new Error("enum must have non-empty array");const c=i.length>=a.opts.loopEnum;let l;const d=()=>l!=null?l:l=(0,WN.useFunc)(e,UN.default);let h;if(c||r)h=e.let("valid"),t.block$data(h,m);else{if(!Array.isArray(i))throw new Error("ajv implementation error");const T=e.const("vSchema",s);h=(0,ol.or)(...i.map((R,P)=>E(T,P)))}t.pass(h);function m(){e.assign(h,!1),e.forOf("v",s,T=>e.if((0,ol._)`${d()}(${n}, ${T})`,()=>e.assign(h,!0).break()))}function E(T,R){const P=i[R];return typeof P=="object"&&P!==null?(0,ol._)`${d()}(${n}, ${T}[${R}])`:(0,ol._)`${n} === ${P}`}}};Kd.default=VN,Object.defineProperty(Rd,"__esModule",{value:!0});const HN=cy,KN=Ld,zN=jd,YN=xd,GN=qd,JN=Wd,QN=Ud,XN=Vd,ZN=Hd,eF=Kd,tF=[HN.default,KN.default,zN.default,YN.default,GN.default,JN.default,QN.default,XN.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},ZN.default,eF.default];Rd.default=tF;var al={},Ou={};Object.defineProperty(Ou,"__esModule",{value:!0}),Ou.validateAdditionalItems=void 0;const fa=mt,hy=Ve,nF={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:t}})=>(0,fa.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,fa._)`{limit: ${t}}`},code(t){const{parentSchema:e,it:n}=t,{items:r}=e;if(!Array.isArray(r)){(0,hy.checkStrictMode)(n,'"additionalItems" is ignored when "items" is not an array of schemas');return}V_(t,r)}};function V_(t,e){const{gen:n,schema:r,data:i,keyword:s,it:a}=t;a.items=!0;const c=n.const("len",(0,fa._)`${i}.length`);if(r===!1)t.setParams({len:e.length}),t.pass((0,fa._)`${c} <= ${e.length}`);else if(typeof r=="object"&&!(0,hy.alwaysValidSchema)(a,r)){const d=n.var("valid",(0,fa._)`${c} <= ${e.length}`);n.if((0,fa.not)(d),()=>l(d)),t.ok(d)}function l(d){n.forRange("i",e.length,c,h=>{t.subschema({keyword:s,dataProp:h,dataPropType:hy.Type.Num},d),a.allErrors||n.if((0,fa.not)(d),()=>n.break())})}}Ou.validateAdditionalItems=V_,Ou.default=nF;var py={},Pu={};Object.defineProperty(Pu,"__esModule",{value:!0}),Pu.validateTuple=void 0;const H_=mt,zd=Ve,rF=Ct,iF={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(t){const{schema:e,it:n}=t;if(Array.isArray(e))return K_(t,"additionalItems",e);n.items=!0,!(0,zd.alwaysValidSchema)(n,e)&&t.ok((0,rF.validateArray)(t))}};function K_(t,e,n=t.schema){const{gen:r,parentSchema:i,data:s,keyword:a,it:c}=t;h(i),c.opts.unevaluated&&n.length&&c.items!==!0&&(c.items=zd.mergeEvaluated.items(r,n.length,c.items));const l=r.name("valid"),d=r.const("len",(0,H_._)`${s}.length`);n.forEach((m,E)=>{(0,zd.alwaysValidSchema)(c,m)||(r.if((0,H_._)`${d} > ${E}`,()=>t.subschema({keyword:a,schemaProp:E,dataProp:E},l)),t.ok(l))});function h(m){const{opts:E,errSchemaPath:T}=c,R=n.length,P=R===m.minItems&&(R===m.maxItems||m[e]===!1);if(E.strictTuples&&!P){const A=`"${a}" is ${R}-tuple, but minItems or maxItems/${e} are not specified or different at path "${T}"`;(0,zd.checkStrictMode)(c,A,E.strictTuples)}}}Pu.validateTuple=K_,Pu.default=iF,Object.defineProperty(py,"__esModule",{value:!0});const sF=Pu,oF={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:t=>(0,sF.validateTuple)(t,"items")};py.default=oF;var my={};Object.defineProperty(my,"__esModule",{value:!0});const z_=mt,aF=Ve,uF=Ct,cF=Ou,lF={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:t}})=>(0,z_.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,z_._)`{limit: ${t}}`},code(t){const{schema:e,parentSchema:n,it:r}=t,{prefixItems:i}=n;r.items=!0,!(0,aF.alwaysValidSchema)(r,e)&&(i?(0,cF.validateAdditionalItems)(t,i):t.ok((0,uF.validateArray)(t)))}};my.default=lF;var gy={};Object.defineProperty(gy,"__esModule",{value:!0});const hi=mt,Yd=Ve,fF={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:t,max:e}})=>e===void 0?(0,hi.str)`must contain at least ${t} valid item(s)`:(0,hi.str)`must contain at least ${t} and no more than ${e} valid item(s)`,params:({params:{min:t,max:e}})=>e===void 0?(0,hi._)`{minContains: ${t}}`:(0,hi._)`{minContains: ${t}, maxContains: ${e}}`},code(t){const{gen:e,schema:n,parentSchema:r,data:i,it:s}=t;let a,c;const{minContains:l,maxContains:d}=r;s.opts.next?(a=l===void 0?1:l,c=d):a=1;const h=e.const("len",(0,hi._)`${i}.length`);if(t.setParams({min:a,max:c}),c===void 0&&a===0){(0,Yd.checkStrictMode)(s,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(c!==void 0&&a>c){(0,Yd.checkStrictMode)(s,'"minContains" > "maxContains" is always invalid'),t.fail();return}if((0,Yd.alwaysValidSchema)(s,n)){let P=(0,hi._)`${h} >= ${a}`;c!==void 0&&(P=(0,hi._)`${P} && ${h} <= ${c}`),t.pass(P);return}s.items=!0;const m=e.name("valid");c===void 0&&a===1?T(m,()=>e.if(m,()=>e.break())):a===0?(e.let(m,!0),c!==void 0&&e.if((0,hi._)`${i}.length > 0`,E)):(e.let(m,!1),E()),t.result(m,()=>t.reset());function E(){const P=e.name("_valid"),A=e.let("count",0);T(P,()=>e.if(P,()=>R(A)))}function T(P,A){e.forRange("i",0,h,F=>{t.subschema({keyword:"contains",dataProp:F,dataPropType:Yd.Type.Num,compositeRule:!0},P),A()})}function R(P){e.code((0,hi._)`${P}++`),c===void 0?e.if((0,hi._)`${P} >= ${a}`,()=>e.assign(m,!0).break()):(e.if((0,hi._)`${P} > ${c}`,()=>e.assign(m,!1).break()),a===1?e.assign(m,!0):e.if((0,hi._)`${P} >= ${a}`,()=>e.assign(m,!0)))}}};gy.default=fF;var Gd={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;const e=mt,n=Ve,r=Ct;t.error={message:({params:{property:l,depsCount:d,deps:h}})=>{const m=d===1?"property":"properties";return(0,e.str)`must have ${m} ${h} when property ${l} is present`},params:({params:{property:l,depsCount:d,deps:h,missingProperty:m}})=>(0,e._)`{property: ${l}, missingProperty: ${m}, depsCount: ${d}, - deps: ${h}}`};const i={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(l){const[d,h]=s(l);a(l,d),c(l,h)}};function s({schema:l}){const d={},h={};for(const m in l){if(m==="__proto__")continue;const E=Array.isArray(l[m])?d:h;E[m]=l[m]}return[d,h]}function a(l,d=l.schema){const{gen:h,data:m,it:E}=l;if(Object.keys(d).length===0)return;const k=h.let("missing");for(const R in d){const P=d[R];if(P.length===0)continue;const A=(0,r.propertyInData)(h,m,R,E.opts.ownProperties);l.setParams({property:R,depsCount:P.length,deps:P.join(", ")}),E.allErrors?h.if(A,()=>{for(const N of P)(0,r.checkReportMissingProp)(l,N)}):(h.if((0,e._)`${A} && (${(0,r.checkMissingProp)(l,P,k)})`),(0,r.reportMissingProp)(l,k),h.else())}}t.validatePropertyDeps=a;function c(l,d=l.schema){const{gen:h,data:m,keyword:E,it:k}=l,R=h.name("valid");for(const P in d)(0,n.alwaysValidSchema)(k,d[P])||(h.if((0,r.propertyInData)(h,m,P,k.opts.ownProperties),()=>{const A=l.subschema({keyword:E,schemaProp:P},R);l.mergeValidEvaluated(A,R)},()=>h.var(R,!0)),l.ok(R))}t.validateSchemaDeps=c,t.default=i})(Yd);var yy={};Object.defineProperty(yy,"__esModule",{value:!0});const Y_=mt,dF=Ve,hF={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:t})=>(0,Y_._)`{propertyName: ${t.propertyName}}`},code(t){const{gen:e,schema:n,data:r,it:i}=t;if((0,dF.alwaysValidSchema)(i,n))return;const s=e.name("valid");e.forIn("key",r,a=>{t.setParams({propertyName:a}),t.subschema({keyword:"propertyNames",data:a,dataTypes:["string"],propertyName:a,compositeRule:!0},s),e.if((0,Y_.not)(s),()=>{t.error(!0),i.allErrors||e.break()})}),t.ok(s)}};yy.default=hF;var Gd={};Object.defineProperty(Gd,"__esModule",{value:!0});const Jd=Ct,Li=mt,pF=Jr,Qd=Ve,mF={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:t})=>(0,Li._)`{additionalProperty: ${t.additionalProperty}}`},code(t){const{gen:e,schema:n,parentSchema:r,data:i,errsCount:s,it:a}=t;if(!s)throw new Error("ajv implementation error");const{allErrors:c,opts:l}=a;if(a.props=!0,l.removeAdditional!=="all"&&(0,Qd.alwaysValidSchema)(a,n))return;const d=(0,Jd.allSchemaProperties)(r.properties),h=(0,Jd.allSchemaProperties)(r.patternProperties);m(),t.ok((0,Li._)`${s} === ${pF.default.errors}`);function m(){e.forIn("key",i,A=>{!d.length&&!h.length?R(A):e.if(E(A),()=>R(A))})}function E(A){let N;if(d.length>8){const S=(0,Qd.schemaRefOrVal)(a,r.properties,"properties");N=(0,Jd.isOwnProperty)(e,S,A)}else d.length?N=(0,Li.or)(...d.map(S=>(0,Li._)`${A} === ${S}`)):N=Li.nil;return h.length&&(N=(0,Li.or)(N,...h.map(S=>(0,Li._)`${(0,Jd.usePattern)(t,S)}.test(${A})`))),(0,Li.not)(N)}function k(A){e.code((0,Li._)`delete ${i}[${A}]`)}function R(A){if(l.removeAdditional==="all"||l.removeAdditional&&n===!1){k(A);return}if(n===!1){t.setParams({additionalProperty:A}),t.error(),c||e.break();return}if(typeof n=="object"&&!(0,Qd.alwaysValidSchema)(a,n)){const N=e.name("valid");l.removeAdditional==="failing"?(P(A,N,!1),e.if((0,Li.not)(N),()=>{t.reset(),k(A)})):(P(A,N),c||e.if((0,Li.not)(N),()=>e.break()))}}function P(A,N,S){const y={keyword:"additionalProperties",dataProp:A,dataPropType:Qd.Type.Str};S===!1&&Object.assign(y,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(y,N)}}};Gd.default=mF;var vy={};Object.defineProperty(vy,"__esModule",{value:!0});const gF=Gr,G_=Ct,by=Ve,J_=Gd,yF={keyword:"properties",type:"object",schemaType:"object",code(t){const{gen:e,schema:n,parentSchema:r,data:i,it:s}=t;s.opts.removeAdditional==="all"&&r.additionalProperties===void 0&&J_.default.code(new gF.KeywordCxt(s,J_.default,"additionalProperties"));const a=(0,G_.allSchemaProperties)(n);for(const m of a)s.definedProperties.add(m);s.opts.unevaluated&&a.length&&s.props!==!0&&(s.props=by.mergeEvaluated.props(e,(0,by.toHash)(a),s.props));const c=a.filter(m=>!(0,by.alwaysValidSchema)(s,n[m]));if(c.length===0)return;const l=e.name("valid");for(const m of c)d(m)?h(m):(e.if((0,G_.propertyInData)(e,i,m,s.opts.ownProperties)),h(m),s.allErrors||e.else().var(l,!0),e.endIf()),t.it.definedProperties.add(m),t.ok(l);function d(m){return s.opts.useDefaults&&!s.compositeRule&&n[m].default!==void 0}function h(m){t.subschema({keyword:"properties",schemaProp:m,dataProp:m},l)}}};vy.default=yF;var Dy={};Object.defineProperty(Dy,"__esModule",{value:!0});const Q_=Ct,Xd=mt,X_=Ve,Z_=Ve,vF={keyword:"patternProperties",type:"object",schemaType:"object",code(t){const{gen:e,schema:n,data:r,parentSchema:i,it:s}=t,{opts:a}=s,c=(0,Q_.allSchemaProperties)(n),l=c.filter(P=>(0,X_.alwaysValidSchema)(s,n[P]));if(c.length===0||l.length===c.length&&(!s.opts.unevaluated||s.props===!0))return;const d=a.strictSchema&&!a.allowMatchingProperties&&i.properties,h=e.name("valid");s.props!==!0&&!(s.props instanceof Xd.Name)&&(s.props=(0,Z_.evaluatedPropsToName)(e,s.props));const{props:m}=s;E();function E(){for(const P of c)d&&k(P),s.allErrors?R(P):(e.var(h,!0),R(P),e.if(h))}function k(P){for(const A in d)new RegExp(P).test(A)&&(0,X_.checkStrictMode)(s,`property ${A} matches pattern ${P} (use allowMatchingProperties)`)}function R(P){e.forIn("key",r,A=>{e.if((0,Xd._)`${(0,Q_.usePattern)(t,P)}.test(${A})`,()=>{const N=l.includes(P);N||t.subschema({keyword:"patternProperties",schemaProp:P,dataProp:A,dataPropType:Z_.Type.Str},h),s.opts.unevaluated&&m!==!0?e.assign((0,Xd._)`${m}[${A}]`,!0):!N&&!s.allErrors&&e.if((0,Xd.not)(h),()=>e.break())})})}}};Dy.default=vF;var wy={};Object.defineProperty(wy,"__esModule",{value:!0});const bF=Ve,DF={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(t){const{gen:e,schema:n,it:r}=t;if((0,bF.alwaysValidSchema)(r,n)){t.fail();return}const i=e.name("valid");t.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},i),t.failResult(i,()=>t.reset(),()=>t.error())},error:{message:"must NOT be valid"}};wy.default=DF;var _y={};Object.defineProperty(_y,"__esModule",{value:!0});const wF={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:Ct.validateUnion,error:{message:"must match a schema in anyOf"}};_y.default=wF;var $y={};Object.defineProperty($y,"__esModule",{value:!0});const Zd=mt,_F=Ve,$F={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:t})=>(0,Zd._)`{passingSchemas: ${t.passing}}`},code(t){const{gen:e,schema:n,parentSchema:r,it:i}=t;if(!Array.isArray(n))throw new Error("ajv implementation error");if(i.opts.discriminator&&r.discriminator)return;const s=n,a=e.let("valid",!1),c=e.let("passing",null),l=e.name("_valid");t.setParams({passing:c}),e.block(d),t.result(a,()=>t.reset(),()=>t.error(!0));function d(){s.forEach((h,m)=>{let E;(0,_F.alwaysValidSchema)(i,h)?e.var(l,!0):E=t.subschema({keyword:"oneOf",schemaProp:m,compositeRule:!0},l),m>0&&e.if((0,Zd._)`${l} && ${a}`).assign(a,!1).assign(c,(0,Zd._)`[${c}, ${m}]`).else(),e.if(l,()=>{e.assign(a,!0),e.assign(c,m),E&&t.mergeEvaluated(E,Zd.Name)})})}}};$y.default=$F;var Ey={};Object.defineProperty(Ey,"__esModule",{value:!0});const EF=Ve,SF={keyword:"allOf",schemaType:"array",code(t){const{gen:e,schema:n,it:r}=t;if(!Array.isArray(n))throw new Error("ajv implementation error");const i=e.name("valid");n.forEach((s,a)=>{if((0,EF.alwaysValidSchema)(r,s))return;const c=t.subschema({keyword:"allOf",schemaProp:a},i);t.ok(i),t.mergeEvaluated(c)})}};Ey.default=SF;var Sy={};Object.defineProperty(Sy,"__esModule",{value:!0});const eh=mt,e$=Ve,TF={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:t})=>(0,eh.str)`must match "${t.ifClause}" schema`,params:({params:t})=>(0,eh._)`{failingKeyword: ${t.ifClause}}`},code(t){const{gen:e,parentSchema:n,it:r}=t;n.then===void 0&&n.else===void 0&&(0,e$.checkStrictMode)(r,'"if" without "then" and "else" is ignored');const i=t$(r,"then"),s=t$(r,"else");if(!i&&!s)return;const a=e.let("valid",!0),c=e.name("_valid");if(l(),t.reset(),i&&s){const h=e.let("ifClause");t.setParams({ifClause:h}),e.if(c,d("then",h),d("else",h))}else i?e.if(c,d("then")):e.if((0,eh.not)(c),d("else"));t.pass(a,()=>t.error(!0));function l(){const h=t.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},c);t.mergeEvaluated(h)}function d(h,m){return()=>{const E=t.subschema({keyword:h},c);e.assign(a,c),t.mergeValidEvaluated(E,a),m?e.assign(m,(0,eh._)`${h}`):t.setParams({ifClause:h})}}}};function t$(t,e){const n=t.schema[e];return n!==void 0&&!(0,e$.alwaysValidSchema)(t,n)}Sy.default=TF;var Ty={};Object.defineProperty(Ty,"__esModule",{value:!0});const kF=Ve,AF={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:e,it:n}){e.if===void 0&&(0,kF.checkStrictMode)(n,`"${t}" without "if" is ignored`)}};Ty.default=AF,Object.defineProperty(al,"__esModule",{value:!0});const CF=Ou,OF=py,PF=Pu,NF=my,FF=gy,RF=Yd,IF=yy,MF=Gd,LF=vy,jF=Dy,xF=wy,BF=_y,qF=$y,WF=Ey,UF=Sy,VF=Ty;function HF(t=!1){const e=[xF.default,BF.default,qF.default,WF.default,UF.default,VF.default,IF.default,MF.default,RF.default,LF.default,jF.default];return t?e.push(OF.default,NF.default):e.push(CF.default,PF.default),e.push(FF.default),e}al.default=HF;var ul={},ky={};Object.defineProperty(ky,"__esModule",{value:!0});const qn=mt,KF={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:t})=>(0,qn.str)`must match format "${t}"`,params:({schemaCode:t})=>(0,qn._)`{format: ${t}}`},code(t,e){const{gen:n,data:r,$data:i,schema:s,schemaCode:a,it:c}=t,{opts:l,errSchemaPath:d,schemaEnv:h,self:m}=c;if(!l.validateFormats)return;i?E():k();function E(){const R=n.scopeValue("formats",{ref:m.formats,code:l.code.formats}),P=n.const("fDef",(0,qn._)`${R}[${a}]`),A=n.let("fType"),N=n.let("format");n.if((0,qn._)`typeof ${P} == "object" && !(${P} instanceof RegExp)`,()=>n.assign(A,(0,qn._)`${P}.type || "string"`).assign(N,(0,qn._)`${P}.validate`),()=>n.assign(A,(0,qn._)`"string"`).assign(N,P)),t.fail$data((0,qn.or)(S(),y()));function S(){return l.strictSchema===!1?qn.nil:(0,qn._)`${a} && !${N}`}function y(){const D=h.$async?(0,qn._)`(${P}.async ? await ${N}(${r}) : ${N}(${r}))`:(0,qn._)`${N}(${r})`,v=(0,qn._)`(typeof ${N} == "function" ? ${D} : ${N}.test(${r}))`;return(0,qn._)`${N} && ${N} !== true && ${A} === ${e} && !${v}`}}function k(){const R=m.formats[s];if(!R){S();return}if(R===!0)return;const[P,A,N]=y(R);P===e&&t.pass(D());function S(){if(l.strictSchema===!1){m.logger.warn(v());return}throw new Error(v());function v(){return`unknown format "${s}" ignored in schema at path "${d}"`}}function y(v){const _=v instanceof RegExp?(0,qn.regexpCode)(v):l.code.formats?(0,qn._)`${l.code.formats}${(0,qn.getProperty)(s)}`:void 0,$=n.scopeValue("formats",{key:s,ref:v,code:_});return typeof v=="object"&&!(v instanceof RegExp)?[v.type||"string",v.validate,(0,qn._)`${$}.validate`]:["string",v,$]}function D(){if(typeof R=="object"&&!(R instanceof RegExp)&&R.async){if(!h.$async)throw new Error("async format in sync schema");return(0,qn._)`await ${N}(${r})`}return typeof A=="function"?(0,qn._)`${N}(${r})`:(0,qn._)`${N}.test(${r})`}}}};ky.default=KF,Object.defineProperty(ul,"__esModule",{value:!0});const zF=[ky.default];ul.default=zF;var da={};Object.defineProperty(da,"__esModule",{value:!0}),da.contentVocabulary=da.metadataVocabulary=void 0,da.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],da.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"],Object.defineProperty(Cd,"__esModule",{value:!0});const YF=Od,GF=Fd,JF=al,QF=ul,n$=da,XF=[YF.default,GF.default,(0,JF.default)(),QF.default,n$.metadataVocabulary,n$.contentVocabulary];Cd.default=XF;var Nu={},th={};Object.defineProperty(th,"__esModule",{value:!0}),th.DiscrError=void 0;var r$;(function(t){t.Tag="tag",t.Mapping="mapping"})(r$||(th.DiscrError=r$={})),Object.defineProperty(Nu,"__esModule",{value:!0});const Fu=mt,Ay=th,i$=Tr,ZF=mo,eR=Ve,tR={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:t,tagName:e}})=>t===Ay.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,params:({params:{discrError:t,tag:e,tagName:n}})=>(0,Fu._)`{error: ${t}, tag: ${n}, tagValue: ${e}}`},code(t){const{gen:e,data:n,schema:r,parentSchema:i,it:s}=t,{oneOf:a}=i;if(!s.opts.discriminator)throw new Error("discriminator: requires discriminator option");const c=r.propertyName;if(typeof c!="string")throw new Error("discriminator: requires propertyName");if(r.mapping)throw new Error("discriminator: mapping is not supported");if(!a)throw new Error("discriminator: requires oneOf keyword");const l=e.let("valid",!1),d=e.const("tag",(0,Fu._)`${n}${(0,Fu.getProperty)(c)}`);e.if((0,Fu._)`typeof ${d} == "string"`,()=>h(),()=>t.error(!1,{discrError:Ay.DiscrError.Tag,tag:d,tagName:c})),t.ok(l);function h(){const k=E();e.if(!1);for(const R in k)e.elseIf((0,Fu._)`${d} === ${R}`),e.assign(l,m(k[R]));e.else(),t.error(!1,{discrError:Ay.DiscrError.Mapping,tag:d,tagName:c}),e.endIf()}function m(k){const R=e.name("valid"),P=t.subschema({keyword:"oneOf",schemaProp:k},R);return t.mergeEvaluated(P,Fu.Name),R}function E(){var k;const R={},P=N(i);let A=!0;for(let D=0;Dthis.addVocabulary(R)),this.opts.discriminator&&this.addKeyword(i.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const R=this.opts.$data?this.$dataMetaSchema(s,a):s;this.addMetaSchema(R,c,!1),this.refs["http://json-schema.org/schema"]=c}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(c)?c:void 0)}}e.Ajv=l,t.exports=e=l,t.exports.Ajv=l,Object.defineProperty(e,"__esModule",{value:!0}),e.default=l;var d=Gr;Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return d.KeywordCxt}});var h=mt;Object.defineProperty(e,"_",{enumerable:!0,get:function(){return h._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return h.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return h.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return h.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return h.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return h.CodeGen}});var m=ua;Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return m.default}});var E=mo;Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return E.default}})})(xg,xg.exports);var rR=ii(xg.exports),Cy={exports:{}},nh={},Ru={};Object.defineProperty(Ru,"__esModule",{value:!0}),Ru.dynamicAnchor=void 0;const Oy=mt,iR=Jr,s$=Tr,sR=cs,oR={keyword:"$dynamicAnchor",schemaType:"string",code:t=>o$(t,t.schema)};function o$(t,e){const{gen:n,it:r}=t;r.schemaEnv.root.dynamicAnchors[e]=!0;const i=(0,Oy._)`${iR.default.dynamicAnchors}${(0,Oy.getProperty)(e)}`,s=r.errSchemaPath==="#"?r.validateName:aR(t);n.if((0,Oy._)`!${i}`,()=>n.assign(i,s))}Ru.dynamicAnchor=o$;function aR(t){const{schemaEnv:e,schema:n,self:r}=t.it,{root:i,baseId:s,localRefs:a,meta:c}=e.root,{schemaId:l}=r.opts,d=new s$.SchemaEnv({schema:n,schemaId:l,root:i,baseId:s,localRefs:a,meta:c});return s$.compileSchema.call(r,d),(0,sR.getValidate)(t,d)}Ru.default=oR;var Iu={};Object.defineProperty(Iu,"__esModule",{value:!0}),Iu.dynamicRef=void 0;const a$=mt,uR=Jr,u$=cs,cR={keyword:"$dynamicRef",schemaType:"string",code:t=>c$(t,t.schema)};function c$(t,e){const{gen:n,keyword:r,it:i}=t;if(e[0]!=="#")throw new Error(`"${r}" only supports hash fragment reference`);const s=e.slice(1);if(i.allErrors)a();else{const l=n.let("valid",!1);a(l),t.ok(l)}function a(l){if(i.schemaEnv.root.dynamicAnchors[s]){const d=n.let("_v",(0,a$._)`${uR.default.dynamicAnchors}${(0,a$.getProperty)(s)}`);n.if(d,c(d,l),c(i.validateName,l))}else c(i.validateName,l)()}function c(l,d){return d?()=>n.block(()=>{(0,u$.callRef)(t,l),n.let(d,!0)}):()=>(0,u$.callRef)(t,l)}}Iu.dynamicRef=c$,Iu.default=cR;var Py={};Object.defineProperty(Py,"__esModule",{value:!0});const lR=Ru,fR=Ve,dR={keyword:"$recursiveAnchor",schemaType:"boolean",code(t){t.schema?(0,lR.dynamicAnchor)(t,""):(0,fR.checkStrictMode)(t.it,"$recursiveAnchor: false is ignored")}};Py.default=dR;var Ny={};Object.defineProperty(Ny,"__esModule",{value:!0});const hR=Iu,pR={keyword:"$recursiveRef",schemaType:"string",code:t=>(0,hR.dynamicRef)(t,t.schema)};Ny.default=pR,Object.defineProperty(nh,"__esModule",{value:!0});const mR=Ru,gR=Iu,yR=Py,vR=Ny,bR=[mR.default,gR.default,yR.default,vR.default];nh.default=bR;var rh={},Fy={};Object.defineProperty(Fy,"__esModule",{value:!0});const l$=Yd,DR={keyword:"dependentRequired",type:"object",schemaType:"object",error:l$.error,code:t=>(0,l$.validatePropertyDeps)(t)};Fy.default=DR;var Ry={};Object.defineProperty(Ry,"__esModule",{value:!0});const wR=Yd,_R={keyword:"dependentSchemas",type:"object",schemaType:"object",code:t=>(0,wR.validateSchemaDeps)(t)};Ry.default=_R;var Iy={};Object.defineProperty(Iy,"__esModule",{value:!0});const $R=Ve,ER={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:t,parentSchema:e,it:n}){e.contains===void 0&&(0,$R.checkStrictMode)(n,`"${t}" without "contains" is ignored`)}};Iy.default=ER,Object.defineProperty(rh,"__esModule",{value:!0});const SR=Fy,TR=Ry,kR=Iy,AR=[SR.default,TR.default,kR.default];rh.default=AR;var ih={},My={};Object.defineProperty(My,"__esModule",{value:!0});const yo=mt,f$=Ve,CR=Jr,OR={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:{message:"must NOT have unevaluated properties",params:({params:t})=>(0,yo._)`{unevaluatedProperty: ${t.unevaluatedProperty}}`},code(t){const{gen:e,schema:n,data:r,errsCount:i,it:s}=t;if(!i)throw new Error("ajv implementation error");const{allErrors:a,props:c}=s;c instanceof yo.Name?e.if((0,yo._)`${c} !== true`,()=>e.forIn("key",r,m=>e.if(d(c,m),()=>l(m)))):c!==!0&&e.forIn("key",r,m=>c===void 0?l(m):e.if(h(c,m),()=>l(m))),s.props=!0,t.ok((0,yo._)`${i} === ${CR.default.errors}`);function l(m){if(n===!1){t.setParams({unevaluatedProperty:m}),t.error(),a||e.break();return}if(!(0,f$.alwaysValidSchema)(s,n)){const E=e.name("valid");t.subschema({keyword:"unevaluatedProperties",dataProp:m,dataPropType:f$.Type.Str},E),a||e.if((0,yo.not)(E),()=>e.break())}}function d(m,E){return(0,yo._)`!${m} || !${m}[${E}]`}function h(m,E){const k=[];for(const R in m)m[R]===!0&&k.push((0,yo._)`${E} !== ${R}`);return(0,yo.and)(...k)}}};My.default=OR;var Ly={};Object.defineProperty(Ly,"__esModule",{value:!0});const ha=mt,d$=Ve,PR={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:{message:({params:{len:t}})=>(0,ha.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,ha._)`{limit: ${t}}`},code(t){const{gen:e,schema:n,data:r,it:i}=t,s=i.items||0;if(s===!0)return;const a=e.const("len",(0,ha._)`${r}.length`);if(n===!1)t.setParams({len:s}),t.fail((0,ha._)`${a} > ${s}`);else if(typeof n=="object"&&!(0,d$.alwaysValidSchema)(i,n)){const l=e.var("valid",(0,ha._)`${a} <= ${s}`);e.if((0,ha.not)(l),()=>c(l,s)),t.ok(l)}i.items=!0;function c(l,d){e.forRange("i",d,a,h=>{t.subschema({keyword:"unevaluatedItems",dataProp:h,dataPropType:d$.Type.Num},l),i.allErrors||e.if((0,ha.not)(l),()=>e.break())})}}};Ly.default=PR,Object.defineProperty(ih,"__esModule",{value:!0});const NR=My,FR=Ly,RR=[NR.default,FR.default];ih.default=RR;var jy={},IR={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/schema",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/core":!0,"https://json-schema.org/draft/2019-09/vocab/applicator":!0,"https://json-schema.org/draft/2019-09/vocab/validation":!0,"https://json-schema.org/draft/2019-09/vocab/meta-data":!0,"https://json-schema.org/draft/2019-09/vocab/format":!1,"https://json-schema.org/draft/2019-09/vocab/content":!0},$recursiveAnchor:!0,title:"Core and Validation specifications meta-schema",allOf:[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format"},{$ref:"meta/content"}],type:["object","boolean"],properties:{definitions:{$comment:"While no longer an official keyword as it is replaced by $defs, this keyword is retained in the meta-schema to prevent incompatible extensions as it remains in common use.",type:"object",additionalProperties:{$recursiveRef:"#"},default:{}},dependencies:{$comment:'"dependencies" is no longer a keyword, but schema authors should avoid redefining it to facilitate a smooth transition to "dependentSchemas" and "dependentRequired"',type:"object",additionalProperties:{anyOf:[{$recursiveRef:"#"},{$ref:"meta/validation#/$defs/stringArray"}]}}}},MR={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/applicator",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/applicator":!0},$recursiveAnchor:!0,title:"Applicator vocabulary meta-schema",type:["object","boolean"],properties:{additionalItems:{$recursiveRef:"#"},unevaluatedItems:{$recursiveRef:"#"},items:{anyOf:[{$recursiveRef:"#"},{$ref:"#/$defs/schemaArray"}]},contains:{$recursiveRef:"#"},additionalProperties:{$recursiveRef:"#"},unevaluatedProperties:{$recursiveRef:"#"},properties:{type:"object",additionalProperties:{$recursiveRef:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$recursiveRef:"#"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$recursiveRef:"#"}},propertyNames:{$recursiveRef:"#"},if:{$recursiveRef:"#"},then:{$recursiveRef:"#"},else:{$recursiveRef:"#"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$recursiveRef:"#"}},$defs:{schemaArray:{type:"array",minItems:1,items:{$recursiveRef:"#"}}}},LR={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/content",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/content":!0},$recursiveAnchor:!0,title:"Content vocabulary meta-schema",type:["object","boolean"],properties:{contentMediaType:{type:"string"},contentEncoding:{type:"string"},contentSchema:{$recursiveRef:"#"}}},jR={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/core",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/core":!0},$recursiveAnchor:!0,title:"Core vocabulary meta-schema",type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{type:"string",format:"uri"},$anchor:{type:"string",pattern:"^[A-Za-z][-A-Za-z0-9.:_]*$"},$ref:{type:"string",format:"uri-reference"},$recursiveRef:{type:"string",format:"uri-reference"},$recursiveAnchor:{type:"boolean",default:!1},$vocabulary:{type:"object",propertyNames:{type:"string",format:"uri"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$recursiveRef:"#"},default:{}}}},xR={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/format",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/format":!0},$recursiveAnchor:!0,title:"Format vocabulary meta-schema",type:["object","boolean"],properties:{format:{type:"string"}}},BR={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/meta-data",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/meta-data":!0},$recursiveAnchor:!0,title:"Meta-data vocabulary meta-schema",type:["object","boolean"],properties:{title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0}}},qR={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/validation",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/validation":!0},$recursiveAnchor:!0,title:"Validation vocabulary meta-schema",type:["object","boolean"],properties:{multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}},const:!0,enum:{type:"array",items:!0},type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]}},$defs:{nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}}};Object.defineProperty(jy,"__esModule",{value:!0});const WR=IR,UR=MR,VR=LR,HR=jR,KR=xR,zR=BR,YR=qR,GR=["/properties"];function JR(t){return[WR,UR,VR,HR,e(this,KR),zR,e(this,YR)].forEach(n=>this.addMetaSchema(n,void 0,!1)),this;function e(n,r){return t?n.$dataMetaSchema(r,GR):r}}jy.default=JR,function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv2019=void 0;const n=lo,r=Cd,i=nh,s=rh,a=ih,c=Nu,l=jy,d="https://json-schema.org/draft/2019-09/schema";class h extends n.default{constructor(A={}){super({...A,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),this.addVocabulary(i.default),r.default.forEach(A=>this.addVocabulary(A)),this.addVocabulary(s.default),this.addVocabulary(a.default),this.opts.discriminator&&this.addKeyword(c.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();const{$data:A,meta:N}=this.opts;!N||(l.default.call(this,A),this.refs["http://json-schema.org/schema"]=d)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(d)?d:void 0)}}e.Ajv2019=h,t.exports=e=h,t.exports.Ajv2019=h,Object.defineProperty(e,"__esModule",{value:!0}),e.default=h;var m=Gr;Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return m.KeywordCxt}});var E=mt;Object.defineProperty(e,"_",{enumerable:!0,get:function(){return E._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return E.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return E.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return E.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return E.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return E.CodeGen}});var k=ua;Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return k.default}});var R=mo;Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return R.default}})}(Cy,Cy.exports);var QR=ii(Cy.exports),xy={exports:{}},By={};Object.defineProperty(By,"__esModule",{value:!0});const XR=Od,ZR=Fd,eI=al,tI=nh,nI=rh,rI=ih,iI=ul,h$=da,sI=[tI.default,XR.default,ZR.default,(0,eI.default)(!0),iI.default,h$.metadataVocabulary,h$.contentVocabulary,nI.default,rI.default];By.default=sI;var qy={},oI={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/schema",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0,"https://json-schema.org/draft/2020-12/vocab/applicator":!0,"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0,"https://json-schema.org/draft/2020-12/vocab/validation":!0,"https://json-schema.org/draft/2020-12/vocab/meta-data":!0,"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0,"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Core and Validation specifications meta-schema",allOf:[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/unevaluated"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format-annotation"},{$ref:"meta/content"}],type:["object","boolean"],$comment:"This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",properties:{definitions:{$comment:'"definitions" has been replaced by "$defs".',type:"object",additionalProperties:{$dynamicRef:"#meta"},deprecated:!0,default:{}},dependencies:{$comment:'"dependencies" has been split and replaced by "dependentSchemas" and "dependentRequired" in order to serve their differing semantics.',type:"object",additionalProperties:{anyOf:[{$dynamicRef:"#meta"},{$ref:"meta/validation#/$defs/stringArray"}]},deprecated:!0,default:{}},$recursiveAnchor:{$comment:'"$recursiveAnchor" has been replaced by "$dynamicAnchor".',$ref:"meta/core#/$defs/anchorString",deprecated:!0},$recursiveRef:{$comment:'"$recursiveRef" has been replaced by "$dynamicRef".',$ref:"meta/core#/$defs/uriReferenceString",deprecated:!0}}},aI={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/applicator",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/applicator":!0},$dynamicAnchor:"meta",title:"Applicator vocabulary meta-schema",type:["object","boolean"],properties:{prefixItems:{$ref:"#/$defs/schemaArray"},items:{$dynamicRef:"#meta"},contains:{$dynamicRef:"#meta"},additionalProperties:{$dynamicRef:"#meta"},properties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},patternProperties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},propertyNames:{$dynamicRef:"#meta"},if:{$dynamicRef:"#meta"},then:{$dynamicRef:"#meta"},else:{$dynamicRef:"#meta"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$dynamicRef:"#meta"}},$defs:{schemaArray:{type:"array",minItems:1,items:{$dynamicRef:"#meta"}}}},uI={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/unevaluated",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0},$dynamicAnchor:"meta",title:"Unevaluated applicator vocabulary meta-schema",type:["object","boolean"],properties:{unevaluatedItems:{$dynamicRef:"#meta"},unevaluatedProperties:{$dynamicRef:"#meta"}}},cI={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/content",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Content vocabulary meta-schema",type:["object","boolean"],properties:{contentEncoding:{type:"string"},contentMediaType:{type:"string"},contentSchema:{$dynamicRef:"#meta"}}},lI={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/core",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0},$dynamicAnchor:"meta",title:"Core vocabulary meta-schema",type:["object","boolean"],properties:{$id:{$ref:"#/$defs/uriReferenceString",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{$ref:"#/$defs/uriString"},$ref:{$ref:"#/$defs/uriReferenceString"},$anchor:{$ref:"#/$defs/anchorString"},$dynamicRef:{$ref:"#/$defs/uriReferenceString"},$dynamicAnchor:{$ref:"#/$defs/anchorString"},$vocabulary:{type:"object",propertyNames:{$ref:"#/$defs/uriString"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$dynamicRef:"#meta"}}},$defs:{anchorString:{type:"string",pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},uriString:{type:"string",format:"uri"},uriReferenceString:{type:"string",format:"uri-reference"}}},fI={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/format-annotation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0},$dynamicAnchor:"meta",title:"Format vocabulary meta-schema for annotation results",type:["object","boolean"],properties:{format:{type:"string"}}},dI={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/meta-data",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/meta-data":!0},$dynamicAnchor:"meta",title:"Meta-data vocabulary meta-schema",type:["object","boolean"],properties:{title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0}}},hI={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/validation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/validation":!0},$dynamicAnchor:"meta",title:"Validation vocabulary meta-schema",type:["object","boolean"],properties:{type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]},const:!0,enum:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}}},$defs:{nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}}};Object.defineProperty(qy,"__esModule",{value:!0});const pI=oI,mI=aI,gI=uI,yI=cI,vI=lI,bI=fI,DI=dI,wI=hI,_I=["/properties"];function $I(t){return[pI,mI,gI,yI,vI,e(this,bI),DI,e(this,wI)].forEach(n=>this.addMetaSchema(n,void 0,!1)),this;function e(n,r){return t?n.$dataMetaSchema(r,_I):r}}qy.default=$I,function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv2020=void 0;const n=lo,r=By,i=Nu,s=qy,a="https://json-schema.org/draft/2020-12/schema";class c extends n.default{constructor(k={}){super({...k,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),r.default.forEach(k=>this.addVocabulary(k)),this.opts.discriminator&&this.addKeyword(i.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();const{$data:k,meta:R}=this.opts;!R||(s.default.call(this,k),this.refs["http://json-schema.org/schema"]=a)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(a)?a:void 0)}}e.Ajv2020=c,t.exports=e=c,t.exports.Ajv2020=c,Object.defineProperty(e,"__esModule",{value:!0}),e.default=c;var l=Gr;Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return l.KeywordCxt}});var d=mt;Object.defineProperty(e,"_",{enumerable:!0,get:function(){return d._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return d.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return d.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return d.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return d.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return d.CodeGen}});var h=ua;Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return h.default}});var m=mo;Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return m.default}})}(xy,xy.exports);var EI=ii(xy.exports),Wy={exports:{}},Uy={},Vy={};Object.defineProperty(Vy,"__esModule",{value:!0});const SI=["$schema","id","$defs",{keyword:"$comment"},"definitions",cs.default];Vy.default=SI;var Hy={},Ky={};Object.defineProperty(Ky,"__esModule",{value:!0});const zy=lo,vo=mt.operators,Yy={maximum:{exclusive:"exclusiveMaximum",ops:[{okStr:"<=",ok:vo.LTE,fail:vo.GT},{okStr:"<",ok:vo.LT,fail:vo.GTE}]},minimum:{exclusive:"exclusiveMinimum",ops:[{okStr:">=",ok:vo.GTE,fail:vo.LT},{okStr:">",ok:vo.GT,fail:vo.LTE}]}},TI={message:t=>zy.str`must be ${Gy(t).okStr} ${t.schemaCode}`,params:t=>zy._`{comparison: ${Gy(t).okStr}, limit: ${t.schemaCode}}`},kI={keyword:Object.keys(Yy),type:"number",schemaType:"number",$data:!0,error:TI,code(t){const{data:e,schemaCode:n}=t;t.fail$data(zy._`${e} ${Gy(t).fail} ${n} || isNaN(${e})`)}};function Gy(t){var e;const n=t.keyword,r=!((e=t.parentSchema)===null||e===void 0)&&e[Yy[n].exclusive]?1:0;return Yy[n].ops[r]}Ky.default=kI;var Jy={};Object.defineProperty(Jy,"__esModule",{value:!0});const p$={exclusiveMaximum:"maximum",exclusiveMinimum:"minimum"},AI={keyword:Object.keys(p$),type:"number",schemaType:"boolean",code({keyword:t,parentSchema:e}){const n=p$[t];if(e[n]===void 0)throw new Error(`${t} can only be used with ${n}`)}};Jy.default=AI,Object.defineProperty(Hy,"__esModule",{value:!0});const CI=Ky,OI=Jy,PI=Md,NI=Ld,FI=jd,RI=Bd,II=qd,MI=Wd,LI=Ud,jI=Vd,xI=Hd,BI=[CI.default,OI.default,PI.default,NI.default,FI.default,RI.default,II.default,MI.default,LI.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},jI.default,xI.default];Hy.default=BI,Object.defineProperty(Uy,"__esModule",{value:!0});const qI=Vy,WI=Hy,UI=al,VI=ul,HI=["title","description","default"],KI=[qI.default,WI.default,UI.default(),VI.default,HI];Uy.default=KI;var zI={id:"http://json-schema.org/draft-04/schema#",$schema:"http://json-schema.org/draft-04/schema#",description:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},positiveInteger:{type:"integer",minimum:0},positiveIntegerDefault0:{allOf:[{$ref:"#/definitions/positiveInteger"},{default:0}]},simpleTypes:{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:{$ref:"#/definitions/positiveInteger"},minLength:{$ref:"#/definitions/positiveIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:{}},maxItems:{$ref:"#/definitions/positiveInteger"},minItems:{$ref:"#/definitions/positiveIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxProperties:{$ref:"#/definitions/positiveInteger"},minProperties:{$ref:"#/definitions/positiveIntegerDefault0"},required:{$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}]},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},dependencies:{exclusiveMaximum:["maximum"],exclusiveMinimum:["minimum"]},default:{}};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;const n=lo,r=Uy,i=Nu,s=zI,a=["/properties"],c="http://json-schema.org/draft-04/schema";class l extends n.default{constructor(E={}){super({...E,schemaId:"id"})}_addVocabularies(){super._addVocabularies(),r.default.forEach(E=>this.addVocabulary(E)),this.opts.discriminator&&this.addKeyword(i.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const E=this.opts.$data?this.$dataMetaSchema(s,a):s;this.addMetaSchema(E,c,!1),this.refs["http://json-schema.org/schema"]=c}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(c)?c:void 0)}}t.exports=e=l,Object.defineProperty(e,"__esModule",{value:!0}),e.default=l;var d=lo;Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return d.KeywordCxt}});var h=lo;Object.defineProperty(e,"_",{enumerable:!0,get:function(){return h._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return h.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return h.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return h.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return h.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return h.CodeGen}})})(Wy,Wy.exports);var YI=ii(Wy.exports);const m$=new rR,Qy=new YI,Xy=new QR,Zy=new EI,sh=$s.loadMessageBundle();var g$;(function(t){t[t.delete=0]="delete",t[t.add=1]="add",t[t.deleteAll=2]="deleteAll"})(g$||(g$={}));class GI{constructor(e){try{this.patternRegExp=new RegExp(IA(e)+"$")}catch{this.patternRegExp=null}this.schemas=[]}addSchema(e){this.schemas.push(e)}matchesPattern(e){return this.patternRegExp&&this.patternRegExp.test(e)}getSchemas(){return this.schemas}}class JI extends NA{constructor(e,n,r){super(e,n,r),this.schemaUriToNameAndDescription=new Map,this.customSchemaProvider=void 0,this.requestService=e,this.schemaPriorityMapping=new Map}registerCustomSchemaProvider(e){this.customSchemaProvider=e}getAllSchemas(){const e=[],n=new Set;for(const r of this.filePatternAssociations){const i=r.uris[0];if(n.has(i))continue;n.add(i);const s={uri:i,fromStore:!1,usedForCurrentFile:!1};if(this.schemaUriToNameAndDescription.has(i)){const{name:a,description:c,versions:l}=this.schemaUriToNameAndDescription.get(i);s.name=a,s.description=c,s.fromStore=!0,s.versions=l}e.push(s)}return e}async resolveSchemaContent(e,n,r){const i=e.errors.slice(0);let s=e.schema;const a=this.contextService;let c=[];switch(this.normalizeId(s.$schema)){case Qy.defaultMeta():{Qy.validateSchema(s)||(c=c.concat(Qy.errors));break}case Xy.defaultMeta():{Xy.validateSchema(s)||(c=c.concat(Xy.errors));break}case Zy.defaultMeta():{Zy.validateSchema(s)||(c=c.concat(Zy.errors));break}default:m$.validateSchema(s)||(c=c.concat(m$.errors));break}if(c.length>0){const E=[];for(const k of c)E.push(`${k.instancePath} : ${k.message}`);i.push(`Schema '${Ew(e.schema,n)}' is not valid: + deps: ${h}}`};const i={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(l){const[d,h]=s(l);a(l,d),c(l,h)}};function s({schema:l}){const d={},h={};for(const m in l){if(m==="__proto__")continue;const E=Array.isArray(l[m])?d:h;E[m]=l[m]}return[d,h]}function a(l,d=l.schema){const{gen:h,data:m,it:E}=l;if(Object.keys(d).length===0)return;const T=h.let("missing");for(const R in d){const P=d[R];if(P.length===0)continue;const A=(0,r.propertyInData)(h,m,R,E.opts.ownProperties);l.setParams({property:R,depsCount:P.length,deps:P.join(", ")}),E.allErrors?h.if(A,()=>{for(const F of P)(0,r.checkReportMissingProp)(l,F)}):(h.if((0,e._)`${A} && (${(0,r.checkMissingProp)(l,P,T)})`),(0,r.reportMissingProp)(l,T),h.else())}}t.validatePropertyDeps=a;function c(l,d=l.schema){const{gen:h,data:m,keyword:E,it:T}=l,R=h.name("valid");for(const P in d)(0,n.alwaysValidSchema)(T,d[P])||(h.if((0,r.propertyInData)(h,m,P,T.opts.ownProperties),()=>{const A=l.subschema({keyword:E,schemaProp:P},R);l.mergeValidEvaluated(A,R)},()=>h.var(R,!0)),l.ok(R))}t.validateSchemaDeps=c,t.default=i})(Gd);var yy={};Object.defineProperty(yy,"__esModule",{value:!0});const Y_=mt,dF=Ve,hF={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:t})=>(0,Y_._)`{propertyName: ${t.propertyName}}`},code(t){const{gen:e,schema:n,data:r,it:i}=t;if((0,dF.alwaysValidSchema)(i,n))return;const s=e.name("valid");e.forIn("key",r,a=>{t.setParams({propertyName:a}),t.subschema({keyword:"propertyNames",data:a,dataTypes:["string"],propertyName:a,compositeRule:!0},s),e.if((0,Y_.not)(s),()=>{t.error(!0),i.allErrors||e.break()})}),t.ok(s)}};yy.default=hF;var Jd={};Object.defineProperty(Jd,"__esModule",{value:!0});const Qd=Ct,Li=mt,pF=Jr,Xd=Ve,mF={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:t})=>(0,Li._)`{additionalProperty: ${t.additionalProperty}}`},code(t){const{gen:e,schema:n,parentSchema:r,data:i,errsCount:s,it:a}=t;if(!s)throw new Error("ajv implementation error");const{allErrors:c,opts:l}=a;if(a.props=!0,l.removeAdditional!=="all"&&(0,Xd.alwaysValidSchema)(a,n))return;const d=(0,Qd.allSchemaProperties)(r.properties),h=(0,Qd.allSchemaProperties)(r.patternProperties);m(),t.ok((0,Li._)`${s} === ${pF.default.errors}`);function m(){e.forIn("key",i,A=>{!d.length&&!h.length?R(A):e.if(E(A),()=>R(A))})}function E(A){let F;if(d.length>8){const S=(0,Xd.schemaRefOrVal)(a,r.properties,"properties");F=(0,Qd.isOwnProperty)(e,S,A)}else d.length?F=(0,Li.or)(...d.map(S=>(0,Li._)`${A} === ${S}`)):F=Li.nil;return h.length&&(F=(0,Li.or)(F,...h.map(S=>(0,Li._)`${(0,Qd.usePattern)(t,S)}.test(${A})`))),(0,Li.not)(F)}function T(A){e.code((0,Li._)`delete ${i}[${A}]`)}function R(A){if(l.removeAdditional==="all"||l.removeAdditional&&n===!1){T(A);return}if(n===!1){t.setParams({additionalProperty:A}),t.error(),c||e.break();return}if(typeof n=="object"&&!(0,Xd.alwaysValidSchema)(a,n)){const F=e.name("valid");l.removeAdditional==="failing"?(P(A,F,!1),e.if((0,Li.not)(F),()=>{t.reset(),T(A)})):(P(A,F),c||e.if((0,Li.not)(F),()=>e.break()))}}function P(A,F,S){const y={keyword:"additionalProperties",dataProp:A,dataPropType:Xd.Type.Str};S===!1&&Object.assign(y,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(y,F)}}};Jd.default=mF;var vy={};Object.defineProperty(vy,"__esModule",{value:!0});const gF=Gr,G_=Ct,by=Ve,J_=Jd,yF={keyword:"properties",type:"object",schemaType:"object",code(t){const{gen:e,schema:n,parentSchema:r,data:i,it:s}=t;s.opts.removeAdditional==="all"&&r.additionalProperties===void 0&&J_.default.code(new gF.KeywordCxt(s,J_.default,"additionalProperties"));const a=(0,G_.allSchemaProperties)(n);for(const m of a)s.definedProperties.add(m);s.opts.unevaluated&&a.length&&s.props!==!0&&(s.props=by.mergeEvaluated.props(e,(0,by.toHash)(a),s.props));const c=a.filter(m=>!(0,by.alwaysValidSchema)(s,n[m]));if(c.length===0)return;const l=e.name("valid");for(const m of c)d(m)?h(m):(e.if((0,G_.propertyInData)(e,i,m,s.opts.ownProperties)),h(m),s.allErrors||e.else().var(l,!0),e.endIf()),t.it.definedProperties.add(m),t.ok(l);function d(m){return s.opts.useDefaults&&!s.compositeRule&&n[m].default!==void 0}function h(m){t.subschema({keyword:"properties",schemaProp:m,dataProp:m},l)}}};vy.default=yF;var Dy={};Object.defineProperty(Dy,"__esModule",{value:!0});const Q_=Ct,Zd=mt,X_=Ve,Z_=Ve,vF={keyword:"patternProperties",type:"object",schemaType:"object",code(t){const{gen:e,schema:n,data:r,parentSchema:i,it:s}=t,{opts:a}=s,c=(0,Q_.allSchemaProperties)(n),l=c.filter(P=>(0,X_.alwaysValidSchema)(s,n[P]));if(c.length===0||l.length===c.length&&(!s.opts.unevaluated||s.props===!0))return;const d=a.strictSchema&&!a.allowMatchingProperties&&i.properties,h=e.name("valid");s.props!==!0&&!(s.props instanceof Zd.Name)&&(s.props=(0,Z_.evaluatedPropsToName)(e,s.props));const{props:m}=s;E();function E(){for(const P of c)d&&T(P),s.allErrors?R(P):(e.var(h,!0),R(P),e.if(h))}function T(P){for(const A in d)new RegExp(P).test(A)&&(0,X_.checkStrictMode)(s,`property ${A} matches pattern ${P} (use allowMatchingProperties)`)}function R(P){e.forIn("key",r,A=>{e.if((0,Zd._)`${(0,Q_.usePattern)(t,P)}.test(${A})`,()=>{const F=l.includes(P);F||t.subschema({keyword:"patternProperties",schemaProp:P,dataProp:A,dataPropType:Z_.Type.Str},h),s.opts.unevaluated&&m!==!0?e.assign((0,Zd._)`${m}[${A}]`,!0):!F&&!s.allErrors&&e.if((0,Zd.not)(h),()=>e.break())})})}}};Dy.default=vF;var wy={};Object.defineProperty(wy,"__esModule",{value:!0});const bF=Ve,DF={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(t){const{gen:e,schema:n,it:r}=t;if((0,bF.alwaysValidSchema)(r,n)){t.fail();return}const i=e.name("valid");t.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},i),t.failResult(i,()=>t.reset(),()=>t.error())},error:{message:"must NOT be valid"}};wy.default=DF;var _y={};Object.defineProperty(_y,"__esModule",{value:!0});const wF={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:Ct.validateUnion,error:{message:"must match a schema in anyOf"}};_y.default=wF;var $y={};Object.defineProperty($y,"__esModule",{value:!0});const eh=mt,_F=Ve,$F={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:t})=>(0,eh._)`{passingSchemas: ${t.passing}}`},code(t){const{gen:e,schema:n,parentSchema:r,it:i}=t;if(!Array.isArray(n))throw new Error("ajv implementation error");if(i.opts.discriminator&&r.discriminator)return;const s=n,a=e.let("valid",!1),c=e.let("passing",null),l=e.name("_valid");t.setParams({passing:c}),e.block(d),t.result(a,()=>t.reset(),()=>t.error(!0));function d(){s.forEach((h,m)=>{let E;(0,_F.alwaysValidSchema)(i,h)?e.var(l,!0):E=t.subschema({keyword:"oneOf",schemaProp:m,compositeRule:!0},l),m>0&&e.if((0,eh._)`${l} && ${a}`).assign(a,!1).assign(c,(0,eh._)`[${c}, ${m}]`).else(),e.if(l,()=>{e.assign(a,!0),e.assign(c,m),E&&t.mergeEvaluated(E,eh.Name)})})}}};$y.default=$F;var Ey={};Object.defineProperty(Ey,"__esModule",{value:!0});const EF=Ve,SF={keyword:"allOf",schemaType:"array",code(t){const{gen:e,schema:n,it:r}=t;if(!Array.isArray(n))throw new Error("ajv implementation error");const i=e.name("valid");n.forEach((s,a)=>{if((0,EF.alwaysValidSchema)(r,s))return;const c=t.subschema({keyword:"allOf",schemaProp:a},i);t.ok(i),t.mergeEvaluated(c)})}};Ey.default=SF;var Sy={};Object.defineProperty(Sy,"__esModule",{value:!0});const th=mt,e$=Ve,kF={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:t})=>(0,th.str)`must match "${t.ifClause}" schema`,params:({params:t})=>(0,th._)`{failingKeyword: ${t.ifClause}}`},code(t){const{gen:e,parentSchema:n,it:r}=t;n.then===void 0&&n.else===void 0&&(0,e$.checkStrictMode)(r,'"if" without "then" and "else" is ignored');const i=t$(r,"then"),s=t$(r,"else");if(!i&&!s)return;const a=e.let("valid",!0),c=e.name("_valid");if(l(),t.reset(),i&&s){const h=e.let("ifClause");t.setParams({ifClause:h}),e.if(c,d("then",h),d("else",h))}else i?e.if(c,d("then")):e.if((0,th.not)(c),d("else"));t.pass(a,()=>t.error(!0));function l(){const h=t.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},c);t.mergeEvaluated(h)}function d(h,m){return()=>{const E=t.subschema({keyword:h},c);e.assign(a,c),t.mergeValidEvaluated(E,a),m?e.assign(m,(0,th._)`${h}`):t.setParams({ifClause:h})}}}};function t$(t,e){const n=t.schema[e];return n!==void 0&&!(0,e$.alwaysValidSchema)(t,n)}Sy.default=kF;var ky={};Object.defineProperty(ky,"__esModule",{value:!0});const TF=Ve,AF={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:e,it:n}){e.if===void 0&&(0,TF.checkStrictMode)(n,`"${t}" without "if" is ignored`)}};ky.default=AF,Object.defineProperty(al,"__esModule",{value:!0});const CF=Ou,OF=py,PF=Pu,NF=my,FF=gy,RF=Gd,IF=yy,MF=Jd,LF=vy,jF=Dy,xF=wy,BF=_y,qF=$y,WF=Ey,UF=Sy,VF=ky;function HF(t=!1){const e=[xF.default,BF.default,qF.default,WF.default,UF.default,VF.default,IF.default,MF.default,RF.default,LF.default,jF.default];return t?e.push(OF.default,NF.default):e.push(CF.default,PF.default),e.push(FF.default),e}al.default=HF;var ul={},Ty={};Object.defineProperty(Ty,"__esModule",{value:!0});const qn=mt,KF={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:t})=>(0,qn.str)`must match format "${t}"`,params:({schemaCode:t})=>(0,qn._)`{format: ${t}}`},code(t,e){const{gen:n,data:r,$data:i,schema:s,schemaCode:a,it:c}=t,{opts:l,errSchemaPath:d,schemaEnv:h,self:m}=c;if(!l.validateFormats)return;i?E():T();function E(){const R=n.scopeValue("formats",{ref:m.formats,code:l.code.formats}),P=n.const("fDef",(0,qn._)`${R}[${a}]`),A=n.let("fType"),F=n.let("format");n.if((0,qn._)`typeof ${P} == "object" && !(${P} instanceof RegExp)`,()=>n.assign(A,(0,qn._)`${P}.type || "string"`).assign(F,(0,qn._)`${P}.validate`),()=>n.assign(A,(0,qn._)`"string"`).assign(F,P)),t.fail$data((0,qn.or)(S(),y()));function S(){return l.strictSchema===!1?qn.nil:(0,qn._)`${a} && !${F}`}function y(){const D=h.$async?(0,qn._)`(${P}.async ? await ${F}(${r}) : ${F}(${r}))`:(0,qn._)`${F}(${r})`,v=(0,qn._)`(typeof ${F} == "function" ? ${D} : ${F}.test(${r}))`;return(0,qn._)`${F} && ${F} !== true && ${A} === ${e} && !${v}`}}function T(){const R=m.formats[s];if(!R){S();return}if(R===!0)return;const[P,A,F]=y(R);P===e&&t.pass(D());function S(){if(l.strictSchema===!1){m.logger.warn(v());return}throw new Error(v());function v(){return`unknown format "${s}" ignored in schema at path "${d}"`}}function y(v){const _=v instanceof RegExp?(0,qn.regexpCode)(v):l.code.formats?(0,qn._)`${l.code.formats}${(0,qn.getProperty)(s)}`:void 0,$=n.scopeValue("formats",{key:s,ref:v,code:_});return typeof v=="object"&&!(v instanceof RegExp)?[v.type||"string",v.validate,(0,qn._)`${$}.validate`]:["string",v,$]}function D(){if(typeof R=="object"&&!(R instanceof RegExp)&&R.async){if(!h.$async)throw new Error("async format in sync schema");return(0,qn._)`await ${F}(${r})`}return typeof A=="function"?(0,qn._)`${F}(${r})`:(0,qn._)`${F}.test(${r})`}}}};Ty.default=KF,Object.defineProperty(ul,"__esModule",{value:!0});const zF=[Ty.default];ul.default=zF;var da={};Object.defineProperty(da,"__esModule",{value:!0}),da.contentVocabulary=da.metadataVocabulary=void 0,da.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],da.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"],Object.defineProperty(Od,"__esModule",{value:!0});const YF=Pd,GF=Rd,JF=al,QF=ul,n$=da,XF=[YF.default,GF.default,(0,JF.default)(),QF.default,n$.metadataVocabulary,n$.contentVocabulary];Od.default=XF;var Nu={},nh={};Object.defineProperty(nh,"__esModule",{value:!0}),nh.DiscrError=void 0;var r$;(function(t){t.Tag="tag",t.Mapping="mapping"})(r$||(nh.DiscrError=r$={})),Object.defineProperty(Nu,"__esModule",{value:!0});const Fu=mt,Ay=nh,i$=kr,ZF=mo,eR=Ve,tR={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:t,tagName:e}})=>t===Ay.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,params:({params:{discrError:t,tag:e,tagName:n}})=>(0,Fu._)`{error: ${t}, tag: ${n}, tagValue: ${e}}`},code(t){const{gen:e,data:n,schema:r,parentSchema:i,it:s}=t,{oneOf:a}=i;if(!s.opts.discriminator)throw new Error("discriminator: requires discriminator option");const c=r.propertyName;if(typeof c!="string")throw new Error("discriminator: requires propertyName");if(r.mapping)throw new Error("discriminator: mapping is not supported");if(!a)throw new Error("discriminator: requires oneOf keyword");const l=e.let("valid",!1),d=e.const("tag",(0,Fu._)`${n}${(0,Fu.getProperty)(c)}`);e.if((0,Fu._)`typeof ${d} == "string"`,()=>h(),()=>t.error(!1,{discrError:Ay.DiscrError.Tag,tag:d,tagName:c})),t.ok(l);function h(){const T=E();e.if(!1);for(const R in T)e.elseIf((0,Fu._)`${d} === ${R}`),e.assign(l,m(T[R]));e.else(),t.error(!1,{discrError:Ay.DiscrError.Mapping,tag:d,tagName:c}),e.endIf()}function m(T){const R=e.name("valid"),P=t.subschema({keyword:"oneOf",schemaProp:T},R);return t.mergeEvaluated(P,Fu.Name),R}function E(){var T;const R={},P=F(i);let A=!0;for(let D=0;Dthis.addVocabulary(R)),this.opts.discriminator&&this.addKeyword(i.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const R=this.opts.$data?this.$dataMetaSchema(s,a):s;this.addMetaSchema(R,c,!1),this.refs["http://json-schema.org/schema"]=c}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(c)?c:void 0)}}e.Ajv=l,t.exports=e=l,t.exports.Ajv=l,Object.defineProperty(e,"__esModule",{value:!0}),e.default=l;var d=Gr;Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return d.KeywordCxt}});var h=mt;Object.defineProperty(e,"_",{enumerable:!0,get:function(){return h._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return h.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return h.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return h.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return h.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return h.CodeGen}});var m=ua;Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return m.default}});var E=mo;Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return E.default}})})(xg,xg.exports);var rR=ii(xg.exports),Cy={exports:{}},rh={},Ru={};Object.defineProperty(Ru,"__esModule",{value:!0}),Ru.dynamicAnchor=void 0;const Oy=mt,iR=Jr,s$=kr,sR=cs,oR={keyword:"$dynamicAnchor",schemaType:"string",code:t=>o$(t,t.schema)};function o$(t,e){const{gen:n,it:r}=t;r.schemaEnv.root.dynamicAnchors[e]=!0;const i=(0,Oy._)`${iR.default.dynamicAnchors}${(0,Oy.getProperty)(e)}`,s=r.errSchemaPath==="#"?r.validateName:aR(t);n.if((0,Oy._)`!${i}`,()=>n.assign(i,s))}Ru.dynamicAnchor=o$;function aR(t){const{schemaEnv:e,schema:n,self:r}=t.it,{root:i,baseId:s,localRefs:a,meta:c}=e.root,{schemaId:l}=r.opts,d=new s$.SchemaEnv({schema:n,schemaId:l,root:i,baseId:s,localRefs:a,meta:c});return s$.compileSchema.call(r,d),(0,sR.getValidate)(t,d)}Ru.default=oR;var Iu={};Object.defineProperty(Iu,"__esModule",{value:!0}),Iu.dynamicRef=void 0;const a$=mt,uR=Jr,u$=cs,cR={keyword:"$dynamicRef",schemaType:"string",code:t=>c$(t,t.schema)};function c$(t,e){const{gen:n,keyword:r,it:i}=t;if(e[0]!=="#")throw new Error(`"${r}" only supports hash fragment reference`);const s=e.slice(1);if(i.allErrors)a();else{const l=n.let("valid",!1);a(l),t.ok(l)}function a(l){if(i.schemaEnv.root.dynamicAnchors[s]){const d=n.let("_v",(0,a$._)`${uR.default.dynamicAnchors}${(0,a$.getProperty)(s)}`);n.if(d,c(d,l),c(i.validateName,l))}else c(i.validateName,l)()}function c(l,d){return d?()=>n.block(()=>{(0,u$.callRef)(t,l),n.let(d,!0)}):()=>(0,u$.callRef)(t,l)}}Iu.dynamicRef=c$,Iu.default=cR;var Py={};Object.defineProperty(Py,"__esModule",{value:!0});const lR=Ru,fR=Ve,dR={keyword:"$recursiveAnchor",schemaType:"boolean",code(t){t.schema?(0,lR.dynamicAnchor)(t,""):(0,fR.checkStrictMode)(t.it,"$recursiveAnchor: false is ignored")}};Py.default=dR;var Ny={};Object.defineProperty(Ny,"__esModule",{value:!0});const hR=Iu,pR={keyword:"$recursiveRef",schemaType:"string",code:t=>(0,hR.dynamicRef)(t,t.schema)};Ny.default=pR,Object.defineProperty(rh,"__esModule",{value:!0});const mR=Ru,gR=Iu,yR=Py,vR=Ny,bR=[mR.default,gR.default,yR.default,vR.default];rh.default=bR;var ih={},Fy={};Object.defineProperty(Fy,"__esModule",{value:!0});const l$=Gd,DR={keyword:"dependentRequired",type:"object",schemaType:"object",error:l$.error,code:t=>(0,l$.validatePropertyDeps)(t)};Fy.default=DR;var Ry={};Object.defineProperty(Ry,"__esModule",{value:!0});const wR=Gd,_R={keyword:"dependentSchemas",type:"object",schemaType:"object",code:t=>(0,wR.validateSchemaDeps)(t)};Ry.default=_R;var Iy={};Object.defineProperty(Iy,"__esModule",{value:!0});const $R=Ve,ER={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:t,parentSchema:e,it:n}){e.contains===void 0&&(0,$R.checkStrictMode)(n,`"${t}" without "contains" is ignored`)}};Iy.default=ER,Object.defineProperty(ih,"__esModule",{value:!0});const SR=Fy,kR=Ry,TR=Iy,AR=[SR.default,kR.default,TR.default];ih.default=AR;var sh={},My={};Object.defineProperty(My,"__esModule",{value:!0});const yo=mt,f$=Ve,CR=Jr,OR={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:{message:"must NOT have unevaluated properties",params:({params:t})=>(0,yo._)`{unevaluatedProperty: ${t.unevaluatedProperty}}`},code(t){const{gen:e,schema:n,data:r,errsCount:i,it:s}=t;if(!i)throw new Error("ajv implementation error");const{allErrors:a,props:c}=s;c instanceof yo.Name?e.if((0,yo._)`${c} !== true`,()=>e.forIn("key",r,m=>e.if(d(c,m),()=>l(m)))):c!==!0&&e.forIn("key",r,m=>c===void 0?l(m):e.if(h(c,m),()=>l(m))),s.props=!0,t.ok((0,yo._)`${i} === ${CR.default.errors}`);function l(m){if(n===!1){t.setParams({unevaluatedProperty:m}),t.error(),a||e.break();return}if(!(0,f$.alwaysValidSchema)(s,n)){const E=e.name("valid");t.subschema({keyword:"unevaluatedProperties",dataProp:m,dataPropType:f$.Type.Str},E),a||e.if((0,yo.not)(E),()=>e.break())}}function d(m,E){return(0,yo._)`!${m} || !${m}[${E}]`}function h(m,E){const T=[];for(const R in m)m[R]===!0&&T.push((0,yo._)`${E} !== ${R}`);return(0,yo.and)(...T)}}};My.default=OR;var Ly={};Object.defineProperty(Ly,"__esModule",{value:!0});const ha=mt,d$=Ve,PR={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:{message:({params:{len:t}})=>(0,ha.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,ha._)`{limit: ${t}}`},code(t){const{gen:e,schema:n,data:r,it:i}=t,s=i.items||0;if(s===!0)return;const a=e.const("len",(0,ha._)`${r}.length`);if(n===!1)t.setParams({len:s}),t.fail((0,ha._)`${a} > ${s}`);else if(typeof n=="object"&&!(0,d$.alwaysValidSchema)(i,n)){const l=e.var("valid",(0,ha._)`${a} <= ${s}`);e.if((0,ha.not)(l),()=>c(l,s)),t.ok(l)}i.items=!0;function c(l,d){e.forRange("i",d,a,h=>{t.subschema({keyword:"unevaluatedItems",dataProp:h,dataPropType:d$.Type.Num},l),i.allErrors||e.if((0,ha.not)(l),()=>e.break())})}}};Ly.default=PR,Object.defineProperty(sh,"__esModule",{value:!0});const NR=My,FR=Ly,RR=[NR.default,FR.default];sh.default=RR;var jy={},IR={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/schema",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/core":!0,"https://json-schema.org/draft/2019-09/vocab/applicator":!0,"https://json-schema.org/draft/2019-09/vocab/validation":!0,"https://json-schema.org/draft/2019-09/vocab/meta-data":!0,"https://json-schema.org/draft/2019-09/vocab/format":!1,"https://json-schema.org/draft/2019-09/vocab/content":!0},$recursiveAnchor:!0,title:"Core and Validation specifications meta-schema",allOf:[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format"},{$ref:"meta/content"}],type:["object","boolean"],properties:{definitions:{$comment:"While no longer an official keyword as it is replaced by $defs, this keyword is retained in the meta-schema to prevent incompatible extensions as it remains in common use.",type:"object",additionalProperties:{$recursiveRef:"#"},default:{}},dependencies:{$comment:'"dependencies" is no longer a keyword, but schema authors should avoid redefining it to facilitate a smooth transition to "dependentSchemas" and "dependentRequired"',type:"object",additionalProperties:{anyOf:[{$recursiveRef:"#"},{$ref:"meta/validation#/$defs/stringArray"}]}}}},MR={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/applicator",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/applicator":!0},$recursiveAnchor:!0,title:"Applicator vocabulary meta-schema",type:["object","boolean"],properties:{additionalItems:{$recursiveRef:"#"},unevaluatedItems:{$recursiveRef:"#"},items:{anyOf:[{$recursiveRef:"#"},{$ref:"#/$defs/schemaArray"}]},contains:{$recursiveRef:"#"},additionalProperties:{$recursiveRef:"#"},unevaluatedProperties:{$recursiveRef:"#"},properties:{type:"object",additionalProperties:{$recursiveRef:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$recursiveRef:"#"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$recursiveRef:"#"}},propertyNames:{$recursiveRef:"#"},if:{$recursiveRef:"#"},then:{$recursiveRef:"#"},else:{$recursiveRef:"#"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$recursiveRef:"#"}},$defs:{schemaArray:{type:"array",minItems:1,items:{$recursiveRef:"#"}}}},LR={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/content",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/content":!0},$recursiveAnchor:!0,title:"Content vocabulary meta-schema",type:["object","boolean"],properties:{contentMediaType:{type:"string"},contentEncoding:{type:"string"},contentSchema:{$recursiveRef:"#"}}},jR={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/core",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/core":!0},$recursiveAnchor:!0,title:"Core vocabulary meta-schema",type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{type:"string",format:"uri"},$anchor:{type:"string",pattern:"^[A-Za-z][-A-Za-z0-9.:_]*$"},$ref:{type:"string",format:"uri-reference"},$recursiveRef:{type:"string",format:"uri-reference"},$recursiveAnchor:{type:"boolean",default:!1},$vocabulary:{type:"object",propertyNames:{type:"string",format:"uri"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$recursiveRef:"#"},default:{}}}},xR={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/format",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/format":!0},$recursiveAnchor:!0,title:"Format vocabulary meta-schema",type:["object","boolean"],properties:{format:{type:"string"}}},BR={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/meta-data",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/meta-data":!0},$recursiveAnchor:!0,title:"Meta-data vocabulary meta-schema",type:["object","boolean"],properties:{title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0}}},qR={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/validation",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/validation":!0},$recursiveAnchor:!0,title:"Validation vocabulary meta-schema",type:["object","boolean"],properties:{multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}},const:!0,enum:{type:"array",items:!0},type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]}},$defs:{nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}}};Object.defineProperty(jy,"__esModule",{value:!0});const WR=IR,UR=MR,VR=LR,HR=jR,KR=xR,zR=BR,YR=qR,GR=["/properties"];function JR(t){return[WR,UR,VR,HR,e(this,KR),zR,e(this,YR)].forEach(n=>this.addMetaSchema(n,void 0,!1)),this;function e(n,r){return t?n.$dataMetaSchema(r,GR):r}}jy.default=JR,function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv2019=void 0;const n=lo,r=Od,i=rh,s=ih,a=sh,c=Nu,l=jy,d="https://json-schema.org/draft/2019-09/schema";class h extends n.default{constructor(A={}){super({...A,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),this.addVocabulary(i.default),r.default.forEach(A=>this.addVocabulary(A)),this.addVocabulary(s.default),this.addVocabulary(a.default),this.opts.discriminator&&this.addKeyword(c.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();const{$data:A,meta:F}=this.opts;!F||(l.default.call(this,A),this.refs["http://json-schema.org/schema"]=d)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(d)?d:void 0)}}e.Ajv2019=h,t.exports=e=h,t.exports.Ajv2019=h,Object.defineProperty(e,"__esModule",{value:!0}),e.default=h;var m=Gr;Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return m.KeywordCxt}});var E=mt;Object.defineProperty(e,"_",{enumerable:!0,get:function(){return E._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return E.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return E.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return E.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return E.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return E.CodeGen}});var T=ua;Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return T.default}});var R=mo;Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return R.default}})}(Cy,Cy.exports);var QR=ii(Cy.exports),xy={exports:{}},By={};Object.defineProperty(By,"__esModule",{value:!0});const XR=Pd,ZR=Rd,eI=al,tI=rh,nI=ih,rI=sh,iI=ul,h$=da,sI=[tI.default,XR.default,ZR.default,(0,eI.default)(!0),iI.default,h$.metadataVocabulary,h$.contentVocabulary,nI.default,rI.default];By.default=sI;var qy={},oI={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/schema",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0,"https://json-schema.org/draft/2020-12/vocab/applicator":!0,"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0,"https://json-schema.org/draft/2020-12/vocab/validation":!0,"https://json-schema.org/draft/2020-12/vocab/meta-data":!0,"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0,"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Core and Validation specifications meta-schema",allOf:[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/unevaluated"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format-annotation"},{$ref:"meta/content"}],type:["object","boolean"],$comment:"This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",properties:{definitions:{$comment:'"definitions" has been replaced by "$defs".',type:"object",additionalProperties:{$dynamicRef:"#meta"},deprecated:!0,default:{}},dependencies:{$comment:'"dependencies" has been split and replaced by "dependentSchemas" and "dependentRequired" in order to serve their differing semantics.',type:"object",additionalProperties:{anyOf:[{$dynamicRef:"#meta"},{$ref:"meta/validation#/$defs/stringArray"}]},deprecated:!0,default:{}},$recursiveAnchor:{$comment:'"$recursiveAnchor" has been replaced by "$dynamicAnchor".',$ref:"meta/core#/$defs/anchorString",deprecated:!0},$recursiveRef:{$comment:'"$recursiveRef" has been replaced by "$dynamicRef".',$ref:"meta/core#/$defs/uriReferenceString",deprecated:!0}}},aI={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/applicator",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/applicator":!0},$dynamicAnchor:"meta",title:"Applicator vocabulary meta-schema",type:["object","boolean"],properties:{prefixItems:{$ref:"#/$defs/schemaArray"},items:{$dynamicRef:"#meta"},contains:{$dynamicRef:"#meta"},additionalProperties:{$dynamicRef:"#meta"},properties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},patternProperties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},propertyNames:{$dynamicRef:"#meta"},if:{$dynamicRef:"#meta"},then:{$dynamicRef:"#meta"},else:{$dynamicRef:"#meta"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$dynamicRef:"#meta"}},$defs:{schemaArray:{type:"array",minItems:1,items:{$dynamicRef:"#meta"}}}},uI={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/unevaluated",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0},$dynamicAnchor:"meta",title:"Unevaluated applicator vocabulary meta-schema",type:["object","boolean"],properties:{unevaluatedItems:{$dynamicRef:"#meta"},unevaluatedProperties:{$dynamicRef:"#meta"}}},cI={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/content",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Content vocabulary meta-schema",type:["object","boolean"],properties:{contentEncoding:{type:"string"},contentMediaType:{type:"string"},contentSchema:{$dynamicRef:"#meta"}}},lI={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/core",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0},$dynamicAnchor:"meta",title:"Core vocabulary meta-schema",type:["object","boolean"],properties:{$id:{$ref:"#/$defs/uriReferenceString",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{$ref:"#/$defs/uriString"},$ref:{$ref:"#/$defs/uriReferenceString"},$anchor:{$ref:"#/$defs/anchorString"},$dynamicRef:{$ref:"#/$defs/uriReferenceString"},$dynamicAnchor:{$ref:"#/$defs/anchorString"},$vocabulary:{type:"object",propertyNames:{$ref:"#/$defs/uriString"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$dynamicRef:"#meta"}}},$defs:{anchorString:{type:"string",pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},uriString:{type:"string",format:"uri"},uriReferenceString:{type:"string",format:"uri-reference"}}},fI={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/format-annotation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0},$dynamicAnchor:"meta",title:"Format vocabulary meta-schema for annotation results",type:["object","boolean"],properties:{format:{type:"string"}}},dI={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/meta-data",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/meta-data":!0},$dynamicAnchor:"meta",title:"Meta-data vocabulary meta-schema",type:["object","boolean"],properties:{title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0}}},hI={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/validation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/validation":!0},$dynamicAnchor:"meta",title:"Validation vocabulary meta-schema",type:["object","boolean"],properties:{type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]},const:!0,enum:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}}},$defs:{nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}}};Object.defineProperty(qy,"__esModule",{value:!0});const pI=oI,mI=aI,gI=uI,yI=cI,vI=lI,bI=fI,DI=dI,wI=hI,_I=["/properties"];function $I(t){return[pI,mI,gI,yI,vI,e(this,bI),DI,e(this,wI)].forEach(n=>this.addMetaSchema(n,void 0,!1)),this;function e(n,r){return t?n.$dataMetaSchema(r,_I):r}}qy.default=$I,function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv2020=void 0;const n=lo,r=By,i=Nu,s=qy,a="https://json-schema.org/draft/2020-12/schema";class c extends n.default{constructor(T={}){super({...T,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),r.default.forEach(T=>this.addVocabulary(T)),this.opts.discriminator&&this.addKeyword(i.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();const{$data:T,meta:R}=this.opts;!R||(s.default.call(this,T),this.refs["http://json-schema.org/schema"]=a)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(a)?a:void 0)}}e.Ajv2020=c,t.exports=e=c,t.exports.Ajv2020=c,Object.defineProperty(e,"__esModule",{value:!0}),e.default=c;var l=Gr;Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return l.KeywordCxt}});var d=mt;Object.defineProperty(e,"_",{enumerable:!0,get:function(){return d._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return d.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return d.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return d.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return d.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return d.CodeGen}});var h=ua;Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return h.default}});var m=mo;Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return m.default}})}(xy,xy.exports);var EI=ii(xy.exports),Wy={exports:{}},Uy={},Vy={};Object.defineProperty(Vy,"__esModule",{value:!0});const SI=["$schema","id","$defs",{keyword:"$comment"},"definitions",cs.default];Vy.default=SI;var Hy={},Ky={};Object.defineProperty(Ky,"__esModule",{value:!0});const zy=lo,vo=mt.operators,Yy={maximum:{exclusive:"exclusiveMaximum",ops:[{okStr:"<=",ok:vo.LTE,fail:vo.GT},{okStr:"<",ok:vo.LT,fail:vo.GTE}]},minimum:{exclusive:"exclusiveMinimum",ops:[{okStr:">=",ok:vo.GTE,fail:vo.LT},{okStr:">",ok:vo.GT,fail:vo.LTE}]}},kI={message:t=>zy.str`must be ${Gy(t).okStr} ${t.schemaCode}`,params:t=>zy._`{comparison: ${Gy(t).okStr}, limit: ${t.schemaCode}}`},TI={keyword:Object.keys(Yy),type:"number",schemaType:"number",$data:!0,error:kI,code(t){const{data:e,schemaCode:n}=t;t.fail$data(zy._`${e} ${Gy(t).fail} ${n} || isNaN(${e})`)}};function Gy(t){var e;const n=t.keyword,r=!((e=t.parentSchema)===null||e===void 0)&&e[Yy[n].exclusive]?1:0;return Yy[n].ops[r]}Ky.default=TI;var Jy={};Object.defineProperty(Jy,"__esModule",{value:!0});const p$={exclusiveMaximum:"maximum",exclusiveMinimum:"minimum"},AI={keyword:Object.keys(p$),type:"number",schemaType:"boolean",code({keyword:t,parentSchema:e}){const n=p$[t];if(e[n]===void 0)throw new Error(`${t} can only be used with ${n}`)}};Jy.default=AI,Object.defineProperty(Hy,"__esModule",{value:!0});const CI=Ky,OI=Jy,PI=Ld,NI=jd,FI=xd,RI=qd,II=Wd,MI=Ud,LI=Vd,jI=Hd,xI=Kd,BI=[CI.default,OI.default,PI.default,NI.default,FI.default,RI.default,II.default,MI.default,LI.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},jI.default,xI.default];Hy.default=BI,Object.defineProperty(Uy,"__esModule",{value:!0});const qI=Vy,WI=Hy,UI=al,VI=ul,HI=["title","description","default"],KI=[qI.default,WI.default,UI.default(),VI.default,HI];Uy.default=KI;var zI={id:"http://json-schema.org/draft-04/schema#",$schema:"http://json-schema.org/draft-04/schema#",description:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},positiveInteger:{type:"integer",minimum:0},positiveIntegerDefault0:{allOf:[{$ref:"#/definitions/positiveInteger"},{default:0}]},simpleTypes:{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:{$ref:"#/definitions/positiveInteger"},minLength:{$ref:"#/definitions/positiveIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:{}},maxItems:{$ref:"#/definitions/positiveInteger"},minItems:{$ref:"#/definitions/positiveIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxProperties:{$ref:"#/definitions/positiveInteger"},minProperties:{$ref:"#/definitions/positiveIntegerDefault0"},required:{$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}]},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},dependencies:{exclusiveMaximum:["maximum"],exclusiveMinimum:["minimum"]},default:{}};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;const n=lo,r=Uy,i=Nu,s=zI,a=["/properties"],c="http://json-schema.org/draft-04/schema";class l extends n.default{constructor(E={}){super({...E,schemaId:"id"})}_addVocabularies(){super._addVocabularies(),r.default.forEach(E=>this.addVocabulary(E)),this.opts.discriminator&&this.addKeyword(i.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const E=this.opts.$data?this.$dataMetaSchema(s,a):s;this.addMetaSchema(E,c,!1),this.refs["http://json-schema.org/schema"]=c}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(c)?c:void 0)}}t.exports=e=l,Object.defineProperty(e,"__esModule",{value:!0}),e.default=l;var d=lo;Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return d.KeywordCxt}});var h=lo;Object.defineProperty(e,"_",{enumerable:!0,get:function(){return h._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return h.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return h.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return h.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return h.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return h.CodeGen}})})(Wy,Wy.exports);var YI=ii(Wy.exports);const m$=new rR,Qy=new YI,Xy=new QR,Zy=new EI,oh=$s.loadMessageBundle();var g$;(function(t){t[t.delete=0]="delete",t[t.add=1]="add",t[t.deleteAll=2]="deleteAll"})(g$||(g$={}));class GI{constructor(e){try{this.patternRegExp=new RegExp(IA(e)+"$")}catch{this.patternRegExp=null}this.schemas=[]}addSchema(e){this.schemas.push(e)}matchesPattern(e){return this.patternRegExp&&this.patternRegExp.test(e)}getSchemas(){return this.schemas}}class JI extends NA{constructor(e,n,r){super(e,n,r),this.schemaUriToNameAndDescription=new Map,this.customSchemaProvider=void 0,this.requestService=e,this.schemaPriorityMapping=new Map}registerCustomSchemaProvider(e){this.customSchemaProvider=e}getAllSchemas(){const e=[],n=new Set;for(const r of this.filePatternAssociations){const i=r.uris[0];if(n.has(i))continue;n.add(i);const s={uri:i,fromStore:!1,usedForCurrentFile:!1};if(this.schemaUriToNameAndDescription.has(i)){const{name:a,description:c,versions:l}=this.schemaUriToNameAndDescription.get(i);s.name=a,s.description=c,s.fromStore=!0,s.versions=l}e.push(s)}return e}async resolveSchemaContent(e,n,r){const i=e.errors.slice(0);let s=e.schema;const a=this.contextService;let c=[];switch(this.normalizeId(s.$schema)){case Qy.defaultMeta():{Qy.validateSchema(s)||(c=c.concat(Qy.errors));break}case Xy.defaultMeta():{Xy.validateSchema(s)||(c=c.concat(Xy.errors));break}case Zy.defaultMeta():{Zy.validateSchema(s)||(c=c.concat(Zy.errors));break}default:m$.validateSchema(s)||(c=c.concat(m$.errors));break}if(c.length>0){const E=[];for(const T of c)E.push(`${T.instancePath} : ${T.message}`);i.push(`Schema '${Ew(e.schema,n)}' is not valid: ${E.join(` -`)}`)}const l=(E,k)=>{if(!k)return E;let R=E;return k[0]==="/"&&(k=k.substr(1)),k.split("/").some(P=>(R=R[P],!R)),R},d=(E,k,R,P)=>{const A=l(k,P);if(A)for(const N in A)Object.prototype.hasOwnProperty.call(A,N)&&!Object.prototype.hasOwnProperty.call(E,N)&&(E[N]=A[N]);else i.push(sh("json.schema.invalidref","$ref '{0}' in '{1}' can not be resolved.",P,R))},h=(E,k,R,P,A)=>{a&&!/^\w+:\/\/.*/.test(k)&&(k=a.resolveRelativePath(k,P)),k=this.normalizeId(k);const N=this.getOrAddSchemaHandle(k);return N.getUnresolvedSchema().then(S=>{if(A[k]=!0,S.errors.length){const y=R?k+"#"+R:k;i.push(sh("json.schema.problemloadingref","Problems loading reference '{0}': {1}",y,S.errors[0]))}return d(E,S.schema,k,R),E.url=k,m(E,S.schema,k,N.dependencies)})},m=async(E,k,R,P)=>{if(!E||typeof E!="object")return null;const A=[E],N=new Set,S=[],y=(...$)=>{for(const q of $)typeof q=="object"&&A.push(q)},D=(...$)=>{for(const q of $)if(typeof q=="object")for(const F in q){const M=q[F];typeof M=="object"&&A.push(M)}},v=(...$)=>{for(const q of $)if(Array.isArray(q))for(const F of q)typeof F=="object"&&A.push(F)},_=$=>{const q=new Set;for(;$.$ref;){const F=$.$ref,M=F.split("#",2);if($._$ref=$.$ref,delete $.$ref,M[0].length>0){S.push(h($,M[0],M[1],R,P));return}else q.has(F)||(d($,k,R,M[1]),q.add(F))}y($.items,$.additionalItems,$.additionalProperties,$.not,$.contains,$.propertyNames,$.if,$.then,$.else),D($.definitions,$.properties,$.patternProperties,$.dependencies),v($.anyOf,$.allOf,$.oneOf,$.items,$.schemaSequence)};if(R.indexOf("#")>0){const $=R.split("#",2);if($[0].length>0&&$[1].length>0){const q={};await h(q,$[0],$[1],R,P);for(const F in s)F!=="required"&&Object.prototype.hasOwnProperty.call(s,F)&&!Object.prototype.hasOwnProperty.call(q,F)&&(q[F]=s[F]);s=q}}for(;A.length;){const $=A.pop();N.has($)||(N.add($),_($))}return Promise.all(S)};return await m(s,s,n,r),new Fc(s,i)}getSchemaForResource(e,n){const r=()=>{let c=GO(n);if(c!==void 0){if(!c.startsWith("file:")&&!c.startsWith("http")){let l="";if(c.indexOf("#")>0){const d=c.split("#",2);c=d[0],l=d[1]}if(na.isAbsolute(c))c=Yr.file(c).toString();else{const d=Yr.parse(e);c=Yr.file(na.resolve(na.parse(d.fsPath).dir,c)).toString()}l.length>0&&(c+="#"+l)}return c}},i=c=>{const l=super.createCombinedSchema(e,c);return l.getResolvedSchema().then(d=>(d.schema&&typeof d.schema=="object"&&(d.schema.url=l.url),d.schema&&d.schema.schemaSequence&&d.schema.schemaSequence[n.currentDocIndex]?new Fc(d.schema.schemaSequence[n.currentDocIndex]):d))},s=()=>{const c=Object.create(null),l=[];for(const d of this.filePatternAssociations)if(d.matchesPattern(e))for(const h of d.getURIs())c[h]||(l.push(h),c[h]=!0);if(l.length>0){const d=this.highestPrioritySchemas(l);return i(d)}return Promise.resolve(null)},a=r();return a?i([a]):this.customSchemaProvider?this.customSchemaProvider(e).then(c=>Array.isArray(c)?c.length===0?s():Promise.all(c.map(l=>this.resolveCustomSchema(l,n))).then(l=>({errors:[],schema:{allOf:l.map(d=>d.schema)}}),()=>s()):c?this.resolveCustomSchema(c,n):s()).then(c=>c,()=>s()):s()}addSchemaPriority(e,n){let r=this.schemaPriorityMapping.get(e);r?(r=r.add(n),this.schemaPriorityMapping.set(e,r)):this.schemaPriorityMapping.set(e,new Set().add(n))}highestPrioritySchemas(e){let n=0;const r=new Map;return e.forEach(i=>{(this.schemaPriorityMapping.get(i)||[0]).forEach(a=>{a>n&&(n=a);let c=r.get(a);c?(c=c.concat(i),r.set(a,c)):r.set(a,[i])})}),r.get(n)||[]}async resolveCustomSchema(e,n){const r=await this.loadSchema(e),i=await this.resolveSchemaContent(r,e,[]);return i.schema&&typeof i.schema=="object"&&(i.schema.url=e),i.schema&&i.schema.schemaSequence&&i.schema.schemaSequence[n.currentDocIndex]?new Fc(i.schema.schemaSequence[n.currentDocIndex],i.errors):i}async saveSchema(e,n){const r=this.normalizeId(e);return this.getOrAddSchemaHandle(r,n),this.schemaPriorityMapping.set(r,new Set().add(R0.Settings)),Promise.resolve(void 0)}async deleteSchemas(e){return e.schemas.forEach(n=>{this.deleteSchema(n)}),Promise.resolve(void 0)}async deleteSchema(e){const n=this.normalizeId(e);return this.schemasById[n]&&delete this.schemasById[n],this.schemaPriorityMapping.delete(n),Promise.resolve(void 0)}async addContent(e){const n=await this.getResolvedSchema(e.schema);if(n){const r=this.resolveJSONSchemaToSection(n.schema,e.path);typeof r=="object"&&(r[e.key]=e.content),await this.saveSchema(e.schema,n.schema)}}async deleteContent(e){const n=await this.getResolvedSchema(e.schema);if(n){const r=this.resolveJSONSchemaToSection(n.schema,e.path);typeof r=="object"&&delete r[e.key],await this.saveSchema(e.schema,n.schema)}}resolveJSONSchemaToSection(e,n){const r=n.split("/");let i=e;for(const s of r)s!==""&&(this.resolveNext(i,s),i=i[s]);return i}resolveNext(e,n){if(Array.isArray(e)&&isNaN(n))throw new Error("Expected a number after the array object");if(typeof e=="object"&&typeof n!="string")throw new Error("Expected a string after the object")}normalizeId(e){try{return Yr.parse(e).toString()}catch{return e}}getOrAddSchemaHandle(e,n){return super.getOrAddSchemaHandle(e,n)}loadSchema(e){const n=this.requestService;return super.loadSchema(e).then(r=>{if(r.errors&&r.schema===void 0)return n(e).then(i=>{if(!i){const s=sh("json.schema.nocontent","Unable to load schema from '{0}': No content. {1}",y$(e),r.errors);return new Pi({},[s])}try{const s=rO(i);return new Pi(s,[])}catch(s){const a=sh("json.schema.invalidFormat","Unable to parse content from '{0}': {1}.",y$(e),s);return new Pi({},[a])}},i=>{let s=i.toString();const a=i.toString().split("Error: ");return a.length>1&&(s=a[1]),new Pi({},[s])});if(r.uri=e,this.schemaUriToNameAndDescription.has(e)){const{name:i,description:s,versions:a}=this.schemaUriToNameAndDescription.get(e);r.schema.title=i!=null?i:r.schema.title,r.schema.description=s!=null?s:r.schema.description,r.schema.versions=a!=null?a:r.schema.versions}return r})}registerExternalSchema(e,n,r,i,s,a){return(i||s)&&this.schemaUriToNameAndDescription.set(e,{name:i,description:s,versions:a}),super.registerExternalSchema(e,n,r)}clearExternalSchemas(){super.clearExternalSchemas()}setSchemaContributions(e){super.setSchemaContributions(e)}getRegisteredSchemaIds(e){return super.getRegisteredSchemaIds(e)}getResolvedSchema(e){return super.getResolvedSchema(e)}onResourceChange(e){return super.onResourceChange(e)}}function y$(t){try{const e=Yr.parse(t);if(e.scheme==="file")return e.fsPath}catch{}return t}class QI{constructor(e,n){this.telemetry=n,this.jsonDocumentSymbols=new mO(e),this.jsonDocumentSymbols.getKeyLabel=r=>{const i=r.keyNode.internalNode;let s="";return Nn(i)?s="{}":xn(i)?s="[]":s=i.source,s}}findDocumentSymbols(e,n={resultLimit:Number.MAX_VALUE}){var i;let r=[];try{const s=di.getYamlDocument(e);if(!s||s.documents.length===0)return null;for(const a of s.documents)a.root&&(r=r.concat(this.jsonDocumentSymbols.findDocumentSymbols(e,a,n)))}catch(s){(i=this.telemetry)==null||i.sendError("yaml.documentSymbols.error",s)}return r}findHierarchicalDocumentSymbols(e,n={resultLimit:Number.MAX_VALUE}){var i;let r=[];try{const s=di.getYamlDocument(e);if(!s||s.documents.length===0)return null;for(const a of s.documents)a.root&&(r=r.concat(this.jsonDocumentSymbols.findDocumentSymbols2(e,a,n)))}catch(s){(i=this.telemetry)==null||i.sendError("yaml.hierarchicalDocumentSymbols.error",s)}return r}}function v$(t,e){for(const n of t)n.isKubernetes=e}class XI{constructor(e,n){this.telemetry=n,this.shouldHover=!0,this.schemaService=e}configure(e){e&&(this.shouldHover=e.hover,this.indentation=e.indentation)}doHover(e,n,r=!1){var i;try{if(!this.shouldHover||!e)return Promise.resolve(void 0);const s=di.getYamlDocument(e),a=e.offsetAt(n),c=md(a,s);if(c===null)return Promise.resolve(void 0);v$(s.documents,r);const l=s.documents.indexOf(c);return c.currentDocIndex=l,this.getHover(e,n,c)}catch(s){(i=this.telemetry)==null||i.sendError("yaml.hover.error",s)}}getHover(e,n,r){const i=e.offsetAt(n);let s=r.getNodeFromOffset(i);if(!s||(s.type==="object"||s.type==="array")&&i>s.offset+1&&i({contents:{kind:Ji.Markdown,value:h},range:c}),d=h=>h.replace(/\s\|\|\s*$/,"");return this.schemaService.getSchemaForResource(e.uri,r).then(h=>{if(h&&s&&!h.errors.length){const m=r.getMatchingSchemas(h.schema,s.offset);let E,k,R=[];const P=[],A=[];m.every(S=>((S.node===s||s.type==="property"&&s.valueNode===S.node)&&!S.inverted&&S.schema&&(E=E||S.schema.title||S.schema.closestTitle,k=k||S.schema.markdownDescription||this.toMarkdown(S.schema.description),S.schema.enum&&(S.schema.markdownEnumDescriptions?R=S.schema.markdownEnumDescriptions:S.schema.enumDescriptions?R=S.schema.enumDescriptions.map(this.toMarkdown,this):R=[],S.schema.enum.forEach((y,D)=>{typeof y!="string"&&(y=JSON.stringify(y)),A.push({value:y,description:R[D]})})),S.schema.anyOf&&eM(s,m,S.schema)&&(E="",k=S.schema.description?S.schema.description+` -`:"",S.schema.anyOf.forEach((y,D)=>{E+=y.title||S.schema.closestTitle||"",k+=y.markdownDescription||this.toMarkdown(y.description)||"",D!==S.schema.anyOf.length-1&&(E+=" || ",k+=" || ")}),E=d(E),k=d(k)),S.schema.examples&&S.schema.examples.forEach(y=>{P.push(iO(y,null,2))})),!0));let N="";return E&&(N="#### "+this.toMarkdown(E)),k&&(N=oh(N),N+=k),A.length!==0&&(N=oh(N),N+=`Allowed Values: +`)}`)}const l=(E,T)=>{if(!T)return E;let R=E;return T[0]==="/"&&(T=T.substr(1)),T.split("/").some(P=>(R=R[P],!R)),R},d=(E,T,R,P)=>{const A=l(T,P);if(A)for(const F in A)Object.prototype.hasOwnProperty.call(A,F)&&!Object.prototype.hasOwnProperty.call(E,F)&&(E[F]=A[F]);else i.push(oh("json.schema.invalidref","$ref '{0}' in '{1}' can not be resolved.",P,R))},h=(E,T,R,P,A)=>{a&&!/^\w+:\/\/.*/.test(T)&&(T=a.resolveRelativePath(T,P)),T=this.normalizeId(T);const F=this.getOrAddSchemaHandle(T);return F.getUnresolvedSchema().then(S=>{if(A[T]=!0,S.errors.length){const y=R?T+"#"+R:T;i.push(oh("json.schema.problemloadingref","Problems loading reference '{0}': {1}",y,S.errors[0]))}return d(E,S.schema,T,R),E.url=T,m(E,S.schema,T,F.dependencies)})},m=async(E,T,R,P)=>{if(!E||typeof E!="object")return null;const A=[E],F=new Set,S=[],y=(...$)=>{for(const q of $)typeof q=="object"&&A.push(q)},D=(...$)=>{for(const q of $)if(typeof q=="object")for(const N in q){const M=q[N];typeof M=="object"&&A.push(M)}},v=(...$)=>{for(const q of $)if(Array.isArray(q))for(const N of q)typeof N=="object"&&A.push(N)},_=$=>{const q=new Set;for(;$.$ref;){const N=$.$ref,M=N.split("#",2);if($._$ref=$.$ref,delete $.$ref,M[0].length>0){S.push(h($,M[0],M[1],R,P));return}else q.has(N)||(d($,T,R,M[1]),q.add(N))}y($.items,$.additionalItems,$.additionalProperties,$.not,$.contains,$.propertyNames,$.if,$.then,$.else),D($.definitions,$.properties,$.patternProperties,$.dependencies),v($.anyOf,$.allOf,$.oneOf,$.items,$.schemaSequence)};if(R.indexOf("#")>0){const $=R.split("#",2);if($[0].length>0&&$[1].length>0){const q={};await h(q,$[0],$[1],R,P);for(const N in s)N!=="required"&&Object.prototype.hasOwnProperty.call(s,N)&&!Object.prototype.hasOwnProperty.call(q,N)&&(q[N]=s[N]);s=q}}for(;A.length;){const $=A.pop();F.has($)||(F.add($),_($))}return Promise.all(S)};return await m(s,s,n,r),new Fc(s,i)}getSchemaForResource(e,n){const r=()=>{let c=GO(n);if(c!==void 0){if(!c.startsWith("file:")&&!c.startsWith("http")){let l="";if(c.indexOf("#")>0){const d=c.split("#",2);c=d[0],l=d[1]}if(na.isAbsolute(c))c=Yr.file(c).toString();else{const d=Yr.parse(e);c=Yr.file(na.resolve(na.parse(d.fsPath).dir,c)).toString()}l.length>0&&(c+="#"+l)}return c}},i=c=>{const l=super.createCombinedSchema(e,c);return l.getResolvedSchema().then(d=>(d.schema&&typeof d.schema=="object"&&(d.schema.url=l.url),d.schema&&d.schema.schemaSequence&&d.schema.schemaSequence[n.currentDocIndex]?new Fc(d.schema.schemaSequence[n.currentDocIndex]):d))},s=()=>{const c=Object.create(null),l=[];for(const d of this.filePatternAssociations)if(d.matchesPattern(e))for(const h of d.getURIs())c[h]||(l.push(h),c[h]=!0);if(l.length>0){const d=this.highestPrioritySchemas(l);return i(d)}return Promise.resolve(null)},a=r();return a?i([a]):this.customSchemaProvider?this.customSchemaProvider(e).then(c=>Array.isArray(c)?c.length===0?s():Promise.all(c.map(l=>this.resolveCustomSchema(l,n))).then(l=>({errors:[],schema:{allOf:l.map(d=>d.schema)}}),()=>s()):c?this.resolveCustomSchema(c,n):s()).then(c=>c,()=>s()):s()}addSchemaPriority(e,n){let r=this.schemaPriorityMapping.get(e);r?(r=r.add(n),this.schemaPriorityMapping.set(e,r)):this.schemaPriorityMapping.set(e,new Set().add(n))}highestPrioritySchemas(e){let n=0;const r=new Map;return e.forEach(i=>{(this.schemaPriorityMapping.get(i)||[0]).forEach(a=>{a>n&&(n=a);let c=r.get(a);c?(c=c.concat(i),r.set(a,c)):r.set(a,[i])})}),r.get(n)||[]}async resolveCustomSchema(e,n){const r=await this.loadSchema(e),i=await this.resolveSchemaContent(r,e,[]);return i.schema&&typeof i.schema=="object"&&(i.schema.url=e),i.schema&&i.schema.schemaSequence&&i.schema.schemaSequence[n.currentDocIndex]?new Fc(i.schema.schemaSequence[n.currentDocIndex],i.errors):i}async saveSchema(e,n){const r=this.normalizeId(e);return this.getOrAddSchemaHandle(r,n),this.schemaPriorityMapping.set(r,new Set().add(R0.Settings)),Promise.resolve(void 0)}async deleteSchemas(e){return e.schemas.forEach(n=>{this.deleteSchema(n)}),Promise.resolve(void 0)}async deleteSchema(e){const n=this.normalizeId(e);return this.schemasById[n]&&delete this.schemasById[n],this.schemaPriorityMapping.delete(n),Promise.resolve(void 0)}async addContent(e){const n=await this.getResolvedSchema(e.schema);if(n){const r=this.resolveJSONSchemaToSection(n.schema,e.path);typeof r=="object"&&(r[e.key]=e.content),await this.saveSchema(e.schema,n.schema)}}async deleteContent(e){const n=await this.getResolvedSchema(e.schema);if(n){const r=this.resolveJSONSchemaToSection(n.schema,e.path);typeof r=="object"&&delete r[e.key],await this.saveSchema(e.schema,n.schema)}}resolveJSONSchemaToSection(e,n){const r=n.split("/");let i=e;for(const s of r)s!==""&&(this.resolveNext(i,s),i=i[s]);return i}resolveNext(e,n){if(Array.isArray(e)&&isNaN(n))throw new Error("Expected a number after the array object");if(typeof e=="object"&&typeof n!="string")throw new Error("Expected a string after the object")}normalizeId(e){try{return Yr.parse(e).toString()}catch{return e}}getOrAddSchemaHandle(e,n){return super.getOrAddSchemaHandle(e,n)}loadSchema(e){const n=this.requestService;return super.loadSchema(e).then(r=>{if(r.errors&&r.schema===void 0)return n(e).then(i=>{if(!i){const s=oh("json.schema.nocontent","Unable to load schema from '{0}': No content. {1}",y$(e),r.errors);return new Pi({},[s])}try{const s=rO(i);return new Pi(s,[])}catch(s){const a=oh("json.schema.invalidFormat","Unable to parse content from '{0}': {1}.",y$(e),s);return new Pi({},[a])}},i=>{let s=i.toString();const a=i.toString().split("Error: ");return a.length>1&&(s=a[1]),new Pi({},[s])});if(r.uri=e,this.schemaUriToNameAndDescription.has(e)){const{name:i,description:s,versions:a}=this.schemaUriToNameAndDescription.get(e);r.schema.title=i!=null?i:r.schema.title,r.schema.description=s!=null?s:r.schema.description,r.schema.versions=a!=null?a:r.schema.versions}return r})}registerExternalSchema(e,n,r,i,s,a){return(i||s)&&this.schemaUriToNameAndDescription.set(e,{name:i,description:s,versions:a}),super.registerExternalSchema(e,n,r)}clearExternalSchemas(){super.clearExternalSchemas()}setSchemaContributions(e){super.setSchemaContributions(e)}getRegisteredSchemaIds(e){return super.getRegisteredSchemaIds(e)}getResolvedSchema(e){return super.getResolvedSchema(e)}onResourceChange(e){return super.onResourceChange(e)}}function y$(t){try{const e=Yr.parse(t);if(e.scheme==="file")return e.fsPath}catch{}return t}class QI{constructor(e,n){this.telemetry=n,this.jsonDocumentSymbols=new mO(e),this.jsonDocumentSymbols.getKeyLabel=r=>{const i=r.keyNode.internalNode;let s="";return Nn(i)?s="{}":xn(i)?s="[]":s=i.source,s}}findDocumentSymbols(e,n={resultLimit:Number.MAX_VALUE}){var i;let r=[];try{const s=di.getYamlDocument(e);if(!s||s.documents.length===0)return null;for(const a of s.documents)a.root&&(r=r.concat(this.jsonDocumentSymbols.findDocumentSymbols(e,a,n)))}catch(s){(i=this.telemetry)==null||i.sendError("yaml.documentSymbols.error",s)}return r}findHierarchicalDocumentSymbols(e,n={resultLimit:Number.MAX_VALUE}){var i;let r=[];try{const s=di.getYamlDocument(e);if(!s||s.documents.length===0)return null;for(const a of s.documents)a.root&&(r=r.concat(this.jsonDocumentSymbols.findDocumentSymbols2(e,a,n)))}catch(s){(i=this.telemetry)==null||i.sendError("yaml.hierarchicalDocumentSymbols.error",s)}return r}}function v$(t,e){for(const n of t)n.isKubernetes=e}class XI{constructor(e,n){this.telemetry=n,this.shouldHover=!0,this.schemaService=e}configure(e){e&&(this.shouldHover=e.hover,this.indentation=e.indentation)}doHover(e,n,r=!1){var i;try{if(!this.shouldHover||!e)return Promise.resolve(void 0);const s=di.getYamlDocument(e),a=e.offsetAt(n),c=gd(a,s);if(c===null)return Promise.resolve(void 0);v$(s.documents,r);const l=s.documents.indexOf(c);return c.currentDocIndex=l,this.getHover(e,n,c)}catch(s){(i=this.telemetry)==null||i.sendError("yaml.hover.error",s)}}getHover(e,n,r){const i=e.offsetAt(n);let s=r.getNodeFromOffset(i);if(!s||(s.type==="object"||s.type==="array")&&i>s.offset+1&&i({contents:{kind:Ji.Markdown,value:h},range:c}),d=h=>h.replace(/\s\|\|\s*$/,"");return this.schemaService.getSchemaForResource(e.uri,r).then(h=>{if(h&&s&&!h.errors.length){const m=r.getMatchingSchemas(h.schema,s.offset);let E,T,R=[],P;const A=[],F=[];m.every(y=>{var D,v,_;return(y.node===s||s.type==="property"&&s.valueNode===y.node)&&!y.inverted&&y.schema&&(((D=s.parent)==null?void 0:D.type)==="property"&&(E=s.parent.internalNode.key.source),T=T||y.schema.markdownDescription||this.toMarkdown(y.schema.description),y.schema.enum&&(y.schema.markdownEnumDescriptions?R=y.schema.markdownEnumDescriptions:y.schema.enumDescriptions?R=y.schema.enumDescriptions.map(this.toMarkdown,this):R=[],y.schema.enum.forEach(($,q)=>{typeof $!="string"&&($=JSON.stringify($)),F.push({value:$,description:R[q]})})),y.schema.anyOf&&eM(s,m,y.schema)&&(E="",T=y.schema.description?y.schema.description+` +`:"",y.schema.anyOf.forEach(($,q)=>{E+=$.title||y.schema.closestTitle||"",T+=$.markdownDescription||this.toMarkdown($.description)||"",q!==y.schema.anyOf.length-1&&(E+=" || ",T+=" || ")}),E=d(E),T=d(T)),y.schema.anyOf?P=y.schema.anyOf.map(({type:$})=>$).join(" || "):P=P!=null?P:(_=(v=y.schema.type)==null?void 0:v.toString)==null?void 0:_.call(v),y.schema.enum&&(P="enum"),y.schema.examples&&y.schema.examples.forEach($=>{A.push(iO($,null,2))})),!0});let S="";return E&&(S="#### "+this.toMarkdown(E)),T&&(S=cl(S),S+=T),P&&(S=cl(S),S+=`Type: ${P}`),F.length!==0&&(S=cl(S),S+=`Allowed Values: -`,A.forEach(S=>{S.description?N+=`* \`${b$(S.value)}\`: ${S.description} -`:N+=`* \`${b$(S.value)}\` -`})),P.length!==0&&P.forEach(S=>{N=oh(N),N+=`Example: +`,F.forEach(y=>{y.description?S+=`* \`${b$(y.value)}\`: ${y.description} +`:S+=`* \`${b$(y.value)}\` +`})),A.length!==0&&A.forEach(y=>{S=cl(S),S+=`Example: -`,N+=`\`\`\`yaml -${S}\`\`\` -`}),N.length>0&&h.schema.url&&(N=oh(N),N+=`Source: [${ZI(h.schema)}](${h.schema.url})`),l(N)}return null})}toMarkdown(e){if(e){let n=e.replace(/([^\n\r])(\r?\n)([^\n\r])/gm,`$1 +`,S+=`\`\`\`yaml +${y}\`\`\` +`}),S.length>0&&h.schema.url&&(S=cl(S),S+=`Source: [${ZI(h.schema)}](${h.schema.url})`),l(S)}return null})}toMarkdown(e){if(e){let n=e.replace(/([^\n\r])(\r?\n)([^\n\r])/gm,`$1 -$3`);if(n=n.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&"),this.indentation!==void 0){const r=new RegExp(` {${this.indentation.length}}`,"g");n=n.replace(r," ")}return n}}}function oh(t){return t.length===0?t:(t.endsWith(` +$3`);if(n=n.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&"),this.indentation!==void 0){const r=new RegExp(` {${this.indentation.length}}`,"g");n=n.replace(r," ")}return n}}}function cl(t){return t.length===0?t:(t.endsWith(` `)||(t+=` `),t+` -`)}function ZI(t){let e="JSON Schema";const n=t.url;if(n){const r=Yr.parse(n);e=na.basename(r.fsPath)}else t.title&&(e=t.title);return e}function b$(t){return t.indexOf("`")!==-1?"`` "+t+" ``":t}function eM(t,e,n){let r=0;for(const i of e)t===i.node&&i.schema!==n&&n.anyOf.forEach(s=>{i.schema.title===s.title&&i.schema.description===s.description&&i.schema.properties===s.properties&&r++});return r===n.anyOf.length}class tM{validate(e,n){const r=[],i=new Set,s=new Set,a=new Map;gn(n.internalDocument,(c,l,d)=>{!on(l)||((Fn(l)||yt(l))&&l.anchor&&(i.add(l),a.set(l,d[d.length-1])),ts(l)&&s.add(l.resolve(n.internalDocument)))});for(const c of i)if(!s.has(c)){const l=this.getAnchorNode(a.get(c),c);if(l){const d=ot.create(e.positionAt(l.offset),e.positionAt(l.offset+l.source.length)),h=Nr.create(d,`Unused anchor "${l.source}"`,Dt.Hint,0);h.tags=[gf.Unnecessary],r.push(h)}}return r}getAnchorNode(e,n){if(e&&e.srcToken){const r=e.srcToken;if(Lw(r))return D$(r);if(JC(r))for(const i of r.items){if(n.srcToken!==i.value)continue;const s=D$(i);if(s)return s}}}}function D$(t){for(const e of t.start)if(e.type==="anchor")return e;if(t.sep&&Array.isArray(t.sep)){for(const e of t.sep)if(e.type==="anchor")return e}}class nM{constructor(e){this.forbidMapping=e.flowMapping==="forbid",this.forbidSequence=e.flowSequence==="forbid"}validate(e,n){const r=[];return gn(n.internalDocument,(i,s)=>{var a,c;this.forbidMapping&&Nn(s)&&((a=s.srcToken)==null?void 0:a.type)==="flow-collection"&&r.push(Nr.create(this.getRangeOf(e,s.srcToken),"Flow style mapping is forbidden",Dt.Error,"flowMap")),this.forbidSequence&&xn(s)&&((c=s.srcToken)==null?void 0:c.type)==="flow-collection"&&r.push(Nr.create(this.getRangeOf(e,s.srcToken),"Flow style sequence is forbidden",Dt.Error,"flowSeq"))}),r}getRangeOf(e,n){return ot.create(e.positionAt(n.start.offset),e.positionAt(n.end.pop().offset))}}class rM{validate(e,n){const r=[];return gn(n.internalDocument,(i,s)=>{if(Nn(s)){for(let a=1;a0){const c=iM(e,s.items[a-1]);r.push(Nr.create(c,`Wrong ordering of key "${s.items[a-1].key}" in mapping`,Dt.Error,"mapKeyOrder"))}}}),r}}function iM(t,e){var i,s,a,c,l,d,h,m,E,k,R;const n=(d=(a=(i=e==null?void 0:e.srcToken.start[0])==null?void 0:i.offset)!=null?a:(s=e==null?void 0:e.srcToken)==null?void 0:s.key.offset)!=null?d:(l=(c=e==null?void 0:e.srcToken)==null?void 0:c.sep[0])==null?void 0:l.offset,r=((h=e==null?void 0:e.srcToken)==null?void 0:h.value.offset)||((E=(m=e==null?void 0:e.srcToken)==null?void 0:m.sep[0])==null?void 0:E.offset)||((k=e==null?void 0:e.srcToken)==null?void 0:k.key.offset)||((R=e==null?void 0:e.srcToken.start[e.srcToken.start.length-1])==null?void 0:R.offset);return ot.create(t.positionAt(n),t.positionAt(r))}function sM(t,e){const n=String(e.key);return String(t.key).localeCompare(n)}const oM=(t,e)=>{const n=e.positionAt(t.location.start),r={start:n,end:t.location.toLineEnd?Zn.create(n.line,new sa(e).getLineLength(n.line)):e.positionAt(t.location.end)};return Nr.create(r,t.message,t.severity,t.code,gd)};class aM{constructor(e,n){this.telemetry=n,this.validators=[],this.MATCHES_MULTIPLE="Matches multiple schemas when only one must validate.",this.validationEnabled=!0,this.jsonValidation=new cO(e,Promise)}configure(e){this.validators=[],e&&(this.validationEnabled=e.validate,this.customTags=e.customTags,this.disableAdditionalProperties=e.disableAdditionalProperties,this.yamlVersion=e.yamlVersion,(e.flowMapping==="forbid"||e.flowSequence==="forbid")&&this.validators.push(new nM(e)),e.keyOrdering&&this.validators.push(new rM)),this.validators.push(new tM)}async doValidation(e,n=!1){var c;if(!this.validationEnabled)return Promise.resolve([]);const r=[];try{const l=di.getYamlDocument(e,{customTags:this.customTags,yamlVersion:this.yamlVersion},!0);let d=0;for(const h of l.documents){h.isKubernetes=n,h.currentDocIndex=d,h.disableAdditionalProperties=this.disableAdditionalProperties,h.uri=e.uri;const m=await this.jsonValidation.doValidation(e,h),E=h;E.errors.length>0&&r.push(...E.errors),E.warnings.length>0&&r.push(...E.warnings),r.push(...m),r.push(...this.runAdditionalValidators(e,h)),d++}}catch(l){(c=this.telemetry)==null||c.sendError("yaml.validation.error",l)}let i;const s=new Set,a=[];for(let l of r){if(n&&l.message===this.MATCHES_MULTIPLE)continue;if(Object.prototype.hasOwnProperty.call(l,"location")&&(l=oM(l,e)),l.source||(l.source=gd),i&&i.message===l.message&&i.range.end.line===l.range.start.line&&Math.abs(i.range.end.character-l.range.end.character)>=1){i.range.end=l.range.end;continue}else i=l;const d=l.range.start.line+" "+l.range.start.character+" "+l.message;s.has(d)||(a.push(l),s.add(d))}return a}runAdditionalValidators(e,n){const r=[];for(const i of this.validators)r.push(...i.validate(e,n));return r}}var w$={exports:{}};(function(t,e){(function(n){function r(){var i=n();return i.default||i}t.exports=r()})(function(){var n=Object.create,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,a=Object.getPrototypeOf,c=Object.prototype.hasOwnProperty,l=(f,b)=>()=>(f&&(b=f(f=0)),b),d=(f,b)=>()=>(b||f((b={exports:{}}).exports,b),b.exports),h=(f,b)=>{for(var O in b)r(f,O,{get:b[O],enumerable:!0})},m=(f,b,O,L)=>{if(b&&typeof b=="object"||typeof b=="function")for(let x of s(b))!c.call(f,x)&&x!==O&&r(f,x,{get:()=>b[x],enumerable:!(L=i(b,x))||L.enumerable});return f},E=(f,b,O)=>(O=f!=null?n(a(f)):{},m(b||!f||!f.__esModule?r(O,"default",{value:f,enumerable:!0}):O,f)),k=f=>m(r({},"__esModule",{value:!0}),f),R=(f,b,O)=>{if(!b.has(f))throw TypeError("Cannot "+O)},P=(f,b,O)=>{if(b.has(f))throw TypeError("Cannot add the same private member more than once");b instanceof WeakSet?b.add(f):b.set(f,O)},A=(f,b,O)=>(R(f,b,"access private method"),O),N=d(f=>{Object.defineProperty(f,"__esModule",{value:!0}),f.default=b;function b(){}b.prototype={diff:function(x,W){var te=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},le=te.callback;typeof te=="function"&&(le=te,te={}),this.options=te;var de=this;function we(et){return le?(setTimeout(function(){le(void 0,et)},0),!0):et}x=this.castInput(x),W=this.castInput(W),x=this.removeEmpty(this.tokenize(x)),W=this.removeEmpty(this.tokenize(W));var be=W.length,Pe=x.length,Ee=1,$e=be+Pe;te.maxEditLength&&($e=Math.min($e,te.maxEditLength));var Ae=[{newPos:-1,components:[]}],Re=this.extractCommon(Ae[0],W,x,0);if(Ae[0].newPos+1>=be&&Re+1>=Pe)return we([{value:this.join(W),count:W.length}]);function We(){for(var et=-1*Ee;et<=Ee;et+=2){var bt=void 0,xt=Ae[et-1],_t=Ae[et+1],Yn=(_t?_t.newPos:0)-et;xt&&(Ae[et-1]=void 0);var dn=xt&&xt.newPos+1=be&&Yn+1>=Pe)return we(O(de,bt.components,W,x,de.useLongestToken));Ae[et]=bt}Ee++}if(le)(function et(){setTimeout(function(){if(Ee>$e)return le();We()||et()},0)})();else for(;Ee<=$e;){var pt=We();if(pt)return pt}},pushComponent:function(x,W,te){var le=x[x.length-1];le&&le.added===W&&le.removed===te?x[x.length-1]={count:le.count+1,added:W,removed:te}:x.push({count:1,added:W,removed:te})},extractCommon:function(x,W,te,le){for(var de=W.length,we=te.length,be=x.newPos,Pe=be-le,Ee=0;be+1pt.length?bt:pt}),$e.value=x.join(Re)}else $e.value=x.join(te.slice(Pe,Pe+$e.count));Pe+=$e.count,$e.added||(Ee+=$e.count)}}var We=W[be-1];return be>1&&typeof We.value=="string"&&(We.added||We.removed)&&x.equals("",We.value)&&(W[be-2].value+=We.value,W.pop()),W}function L(x){return{newPos:x.newPos,components:x.components.slice(0)}}}),S=d(f=>{Object.defineProperty(f,"__esModule",{value:!0}),f.diffArrays=x,f.arrayDiff=void 0;var b=O(N());function O(W){return W&&W.__esModule?W:{default:W}}var L=new b.default;f.arrayDiff=L,L.tokenize=function(W){return W.slice()},L.join=L.removeEmpty=function(W){return W};function x(W,te,le){return L.diff(W,te,le)}}),y=d((f,b)=>{var O=new Proxy(String,{get:()=>O});b.exports=O}),D={};h(D,{default:()=>_,shouldHighlight:()=>v});var v,_,$=l(()=>{v=()=>!1,_=String}),q=d(f=>{Object.defineProperty(f,"__esModule",{value:!0}),f.codeFrameColumns=Pe,f.default=Ee;var b=($(),k(D)),O=x(y(),!0);function L($e){if(typeof WeakMap!="function")return null;var Ae=new WeakMap,Re=new WeakMap;return(L=function(We){return We?Re:Ae})($e)}function x($e,Ae){if(!Ae&&$e&&$e.__esModule)return $e;if($e===null||typeof $e!="object"&&typeof $e!="function")return{default:$e};var Re=L(Ae);if(Re&&Re.has($e))return Re.get($e);var We={__proto__:null},pt=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var et in $e)if(et!=="default"&&Object.prototype.hasOwnProperty.call($e,et)){var bt=pt?Object.getOwnPropertyDescriptor($e,et):null;bt&&(bt.get||bt.set)?Object.defineProperty(We,et,bt):We[et]=$e[et]}return We.default=$e,Re&&Re.set($e,We),We}var W;function te($e){return $e?(W!=null||(W=new O.default.constructor({enabled:!0,level:1})),W):O.default}var le=!1;function de($e){return{gutter:$e.grey,marker:$e.red.bold,message:$e.red.bold}}var we=/\r\n|[\n\r\u2028\u2029]/;function be($e,Ae,Re){let We=Object.assign({column:0,line:-1},$e.start),pt=Object.assign({},We,$e.end),{linesAbove:et=2,linesBelow:bt=3}=Re||{},xt=We.line,_t=We.column,Yn=pt.line,dn=pt.column,hn=Math.max(xt-(et+1),0),qs=Math.min(Ae.length,Yn+bt);xt===-1&&(hn=0),Yn===-1&&(qs=Ae.length);let Hi=Yn-xt,rr={};if(Hi)for(let pr=0;pr<=Hi;pr++){let ir=pr+xt;if(!_t)rr[ir]=!0;else if(pr===0){let hs=Ae[ir-1].length;rr[ir]=[_t,hs-_t+1]}else if(pr===Hi)rr[ir]=[0,dn];else{let hs=Ae[ir-pr].length;rr[ir]=[0,hs]}}else _t===dn?_t?rr[xt]=[_t,0]:rr[xt]=!0:rr[xt]=[_t,dn-_t];return{start:hn,end:qs,markerLines:rr}}function Pe($e,Ae,Re={}){let We=(Re.highlightCode||Re.forceColor)&&(0,b.shouldHighlight)(Re),pt=te(Re.forceColor),et=de(pt),bt=(rr,pr)=>We?rr(pr):pr,xt=$e.split(we),{start:_t,end:Yn,markerLines:dn}=be(Ae,xt,Re),hn=Ae.start&&typeof Ae.start.column=="number",qs=String(Yn).length,Hi=(We?(0,b.default)($e,Re):$e).split(we,Yn).slice(_t,Yn).map((rr,pr)=>{let ir=_t+1+pr,hs=` ${` ${ir}`.slice(-qs)} |`,dc=dn[ir],hc=!dn[ir+1];if(dc){let Jl="";if(Array.isArray(dc)){let bp=rr.slice(0,Math.max(dc[0]-1,0)).replace(/[^\t]/g," "),sr=dc[1]||1;Jl=[` - `,bt(et.gutter,hs.replace(/\d/g," "))," ",bp,bt(et.marker,"^").repeat(sr)].join(""),hc&&Re.message&&(Jl+=" "+bt(et.message,Re.message))}return[bt(et.marker,">"),bt(et.gutter,hs),rr.length>0?` ${rr}`:"",Jl].join("")}else return` ${bt(et.gutter,hs)}${rr.length>0?` ${rr}`:""}`}).join(` +`)}function ZI(t){let e="JSON Schema";const n=t.url;if(n){const r=Yr.parse(n);e=na.basename(r.fsPath)}else t.title&&(e=t.title);return e}function b$(t){return t.indexOf("`")!==-1?"`` "+t+" ``":t}function eM(t,e,n){let r=0;for(const i of e)t===i.node&&i.schema!==n&&n.anyOf.forEach(s=>{i.schema.title===s.title&&i.schema.description===s.description&&i.schema.properties===s.properties&&r++});return r===n.anyOf.length}class tM{validate(e,n){const r=[],i=new Set,s=new Set,a=new Map;gn(n.internalDocument,(c,l,d)=>{!on(l)||((Fn(l)||yt(l))&&l.anchor&&(i.add(l),a.set(l,d[d.length-1])),ts(l)&&s.add(l.resolve(n.internalDocument)))});for(const c of i)if(!s.has(c)){const l=this.getAnchorNode(a.get(c),c);if(l){const d=ot.create(e.positionAt(l.offset),e.positionAt(l.offset+l.source.length)),h=Nr.create(d,`Unused anchor "${l.source}"`,Dt.Hint,0);h.tags=[yf.Unnecessary],r.push(h)}}return r}getAnchorNode(e,n){if(e&&e.srcToken){const r=e.srcToken;if(Lw(r))return D$(r);if(JC(r))for(const i of r.items){if(n.srcToken!==i.value)continue;const s=D$(i);if(s)return s}}}}function D$(t){for(const e of t.start)if(e.type==="anchor")return e;if(t.sep&&Array.isArray(t.sep)){for(const e of t.sep)if(e.type==="anchor")return e}}class nM{constructor(e){this.forbidMapping=e.flowMapping==="forbid",this.forbidSequence=e.flowSequence==="forbid"}validate(e,n){const r=[];return gn(n.internalDocument,(i,s)=>{var a,c;this.forbidMapping&&Nn(s)&&((a=s.srcToken)==null?void 0:a.type)==="flow-collection"&&r.push(Nr.create(this.getRangeOf(e,s.srcToken),"Flow style mapping is forbidden",Dt.Error,"flowMap")),this.forbidSequence&&xn(s)&&((c=s.srcToken)==null?void 0:c.type)==="flow-collection"&&r.push(Nr.create(this.getRangeOf(e,s.srcToken),"Flow style sequence is forbidden",Dt.Error,"flowSeq"))}),r}getRangeOf(e,n){return ot.create(e.positionAt(n.start.offset),e.positionAt(n.end.pop().offset))}}class rM{validate(e,n){const r=[];return gn(n.internalDocument,(i,s)=>{if(Nn(s)){for(let a=1;a0){const c=iM(e,s.items[a-1]);r.push(Nr.create(c,`Wrong ordering of key "${s.items[a-1].key}" in mapping`,Dt.Error,"mapKeyOrder"))}}}),r}}function iM(t,e){var i,s,a,c,l,d,h,m,E,T,R;const n=(d=(a=(i=e==null?void 0:e.srcToken.start[0])==null?void 0:i.offset)!=null?a:(s=e==null?void 0:e.srcToken)==null?void 0:s.key.offset)!=null?d:(l=(c=e==null?void 0:e.srcToken)==null?void 0:c.sep[0])==null?void 0:l.offset,r=((h=e==null?void 0:e.srcToken)==null?void 0:h.value.offset)||((E=(m=e==null?void 0:e.srcToken)==null?void 0:m.sep[0])==null?void 0:E.offset)||((T=e==null?void 0:e.srcToken)==null?void 0:T.key.offset)||((R=e==null?void 0:e.srcToken.start[e.srcToken.start.length-1])==null?void 0:R.offset);return ot.create(t.positionAt(n),t.positionAt(r))}function sM(t,e){const n=String(e.key);return String(t.key).localeCompare(n)}const oM=(t,e)=>{const n=e.positionAt(t.location.start),r={start:n,end:t.location.toLineEnd?Zn.create(n.line,new sa(e).getLineLength(n.line)):e.positionAt(t.location.end)};return Nr.create(r,t.message,t.severity,t.code,yd)};class aM{constructor(e,n){this.telemetry=n,this.validators=[],this.MATCHES_MULTIPLE="Matches multiple schemas when only one must validate.",this.validationEnabled=!0,this.jsonValidation=new cO(e,Promise)}configure(e){this.validators=[],e&&(this.validationEnabled=e.validate,this.customTags=e.customTags,this.disableAdditionalProperties=e.disableAdditionalProperties,this.yamlVersion=e.yamlVersion,(e.flowMapping==="forbid"||e.flowSequence==="forbid")&&this.validators.push(new nM(e)),e.keyOrdering&&this.validators.push(new rM)),this.validators.push(new tM)}async doValidation(e,n=!1){var c;if(!this.validationEnabled)return Promise.resolve([]);const r=[];try{const l=di.getYamlDocument(e,{customTags:this.customTags,yamlVersion:this.yamlVersion},!0);let d=0;for(const h of l.documents){h.isKubernetes=n,h.currentDocIndex=d,h.disableAdditionalProperties=this.disableAdditionalProperties,h.uri=e.uri;const m=await this.jsonValidation.doValidation(e,h),E=h;E.errors.length>0&&r.push(...E.errors),E.warnings.length>0&&r.push(...E.warnings),r.push(...m),r.push(...this.runAdditionalValidators(e,h)),d++}}catch(l){(c=this.telemetry)==null||c.sendError("yaml.validation.error",l)}let i;const s=new Set,a=[];for(let l of r){if(n&&l.message===this.MATCHES_MULTIPLE)continue;if(Object.prototype.hasOwnProperty.call(l,"location")&&(l=oM(l,e)),l.source||(l.source=yd),i&&i.message===l.message&&i.range.end.line===l.range.start.line&&Math.abs(i.range.end.character-l.range.end.character)>=1){i.range.end=l.range.end;continue}else i=l;const d=l.range.start.line+" "+l.range.start.character+" "+l.message;s.has(d)||(a.push(l),s.add(d))}return a}runAdditionalValidators(e,n){const r=[];for(const i of this.validators)r.push(...i.validate(e,n));return r}}var w$={exports:{}};(function(t,e){(function(n){function r(){var i=n();return i.default||i}t.exports=r()})(function(){var n=Object.create,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,a=Object.getPrototypeOf,c=Object.prototype.hasOwnProperty,l=(f,b)=>()=>(f&&(b=f(f=0)),b),d=(f,b)=>()=>(b||f((b={exports:{}}).exports,b),b.exports),h=(f,b)=>{for(var O in b)r(f,O,{get:b[O],enumerable:!0})},m=(f,b,O,L)=>{if(b&&typeof b=="object"||typeof b=="function")for(let x of s(b))!c.call(f,x)&&x!==O&&r(f,x,{get:()=>b[x],enumerable:!(L=i(b,x))||L.enumerable});return f},E=(f,b,O)=>(O=f!=null?n(a(f)):{},m(b||!f||!f.__esModule?r(O,"default",{value:f,enumerable:!0}):O,f)),T=f=>m(r({},"__esModule",{value:!0}),f),R=(f,b,O)=>{if(!b.has(f))throw TypeError("Cannot "+O)},P=(f,b,O)=>{if(b.has(f))throw TypeError("Cannot add the same private member more than once");b instanceof WeakSet?b.add(f):b.set(f,O)},A=(f,b,O)=>(R(f,b,"access private method"),O),F=d(f=>{Object.defineProperty(f,"__esModule",{value:!0}),f.default=b;function b(){}b.prototype={diff:function(x,W){var te=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},le=te.callback;typeof te=="function"&&(le=te,te={}),this.options=te;var de=this;function we(et){return le?(setTimeout(function(){le(void 0,et)},0),!0):et}x=this.castInput(x),W=this.castInput(W),x=this.removeEmpty(this.tokenize(x)),W=this.removeEmpty(this.tokenize(W));var be=W.length,Pe=x.length,Ee=1,$e=be+Pe;te.maxEditLength&&($e=Math.min($e,te.maxEditLength));var Ae=[{newPos:-1,components:[]}],Re=this.extractCommon(Ae[0],W,x,0);if(Ae[0].newPos+1>=be&&Re+1>=Pe)return we([{value:this.join(W),count:W.length}]);function We(){for(var et=-1*Ee;et<=Ee;et+=2){var bt=void 0,xt=Ae[et-1],_t=Ae[et+1],Yn=(_t?_t.newPos:0)-et;xt&&(Ae[et-1]=void 0);var dn=xt&&xt.newPos+1=be&&Yn+1>=Pe)return we(O(de,bt.components,W,x,de.useLongestToken));Ae[et]=bt}Ee++}if(le)(function et(){setTimeout(function(){if(Ee>$e)return le();We()||et()},0)})();else for(;Ee<=$e;){var pt=We();if(pt)return pt}},pushComponent:function(x,W,te){var le=x[x.length-1];le&&le.added===W&&le.removed===te?x[x.length-1]={count:le.count+1,added:W,removed:te}:x.push({count:1,added:W,removed:te})},extractCommon:function(x,W,te,le){for(var de=W.length,we=te.length,be=x.newPos,Pe=be-le,Ee=0;be+1pt.length?bt:pt}),$e.value=x.join(Re)}else $e.value=x.join(te.slice(Pe,Pe+$e.count));Pe+=$e.count,$e.added||(Ee+=$e.count)}}var We=W[be-1];return be>1&&typeof We.value=="string"&&(We.added||We.removed)&&x.equals("",We.value)&&(W[be-2].value+=We.value,W.pop()),W}function L(x){return{newPos:x.newPos,components:x.components.slice(0)}}}),S=d(f=>{Object.defineProperty(f,"__esModule",{value:!0}),f.diffArrays=x,f.arrayDiff=void 0;var b=O(F());function O(W){return W&&W.__esModule?W:{default:W}}var L=new b.default;f.arrayDiff=L,L.tokenize=function(W){return W.slice()},L.join=L.removeEmpty=function(W){return W};function x(W,te,le){return L.diff(W,te,le)}}),y=d((f,b)=>{var O=new Proxy(String,{get:()=>O});b.exports=O}),D={};h(D,{default:()=>_,shouldHighlight:()=>v});var v,_,$=l(()=>{v=()=>!1,_=String}),q=d(f=>{Object.defineProperty(f,"__esModule",{value:!0}),f.codeFrameColumns=Pe,f.default=Ee;var b=($(),T(D)),O=x(y(),!0);function L($e){if(typeof WeakMap!="function")return null;var Ae=new WeakMap,Re=new WeakMap;return(L=function(We){return We?Re:Ae})($e)}function x($e,Ae){if(!Ae&&$e&&$e.__esModule)return $e;if($e===null||typeof $e!="object"&&typeof $e!="function")return{default:$e};var Re=L(Ae);if(Re&&Re.has($e))return Re.get($e);var We={__proto__:null},pt=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var et in $e)if(et!=="default"&&Object.prototype.hasOwnProperty.call($e,et)){var bt=pt?Object.getOwnPropertyDescriptor($e,et):null;bt&&(bt.get||bt.set)?Object.defineProperty(We,et,bt):We[et]=$e[et]}return We.default=$e,Re&&Re.set($e,We),We}var W;function te($e){return $e?(W!=null||(W=new O.default.constructor({enabled:!0,level:1})),W):O.default}var le=!1;function de($e){return{gutter:$e.grey,marker:$e.red.bold,message:$e.red.bold}}var we=/\r\n|[\n\r\u2028\u2029]/;function be($e,Ae,Re){let We=Object.assign({column:0,line:-1},$e.start),pt=Object.assign({},We,$e.end),{linesAbove:et=2,linesBelow:bt=3}=Re||{},xt=We.line,_t=We.column,Yn=pt.line,dn=pt.column,hn=Math.max(xt-(et+1),0),qs=Math.min(Ae.length,Yn+bt);xt===-1&&(hn=0),Yn===-1&&(qs=Ae.length);let Hi=Yn-xt,rr={};if(Hi)for(let pr=0;pr<=Hi;pr++){let ir=pr+xt;if(!_t)rr[ir]=!0;else if(pr===0){let hs=Ae[ir-1].length;rr[ir]=[_t,hs-_t+1]}else if(pr===Hi)rr[ir]=[0,dn];else{let hs=Ae[ir-pr].length;rr[ir]=[0,hs]}}else _t===dn?_t?rr[xt]=[_t,0]:rr[xt]=!0:rr[xt]=[_t,dn-_t];return{start:hn,end:qs,markerLines:rr}}function Pe($e,Ae,Re={}){let We=(Re.highlightCode||Re.forceColor)&&(0,b.shouldHighlight)(Re),pt=te(Re.forceColor),et=de(pt),bt=(rr,pr)=>We?rr(pr):pr,xt=$e.split(we),{start:_t,end:Yn,markerLines:dn}=be(Ae,xt,Re),hn=Ae.start&&typeof Ae.start.column=="number",qs=String(Yn).length,Hi=(We?(0,b.default)($e,Re):$e).split(we,Yn).slice(_t,Yn).map((rr,pr)=>{let ir=_t+1+pr,hs=` ${` ${ir}`.slice(-qs)} |`,dc=dn[ir],hc=!dn[ir+1];if(dc){let Ql="";if(Array.isArray(dc)){let bp=rr.slice(0,Math.max(dc[0]-1,0)).replace(/[^\t]/g," "),sr=dc[1]||1;Ql=[` + `,bt(et.gutter,hs.replace(/\d/g," "))," ",bp,bt(et.marker,"^").repeat(sr)].join(""),hc&&Re.message&&(Ql+=" "+bt(et.message,Re.message))}return[bt(et.marker,">"),bt(et.gutter,hs),rr.length>0?` ${rr}`:"",Ql].join("")}else return` ${bt(et.gutter,hs)}${rr.length>0?` ${rr}`:""}`}).join(` `);return Re.message&&!hn&&(Hi=`${" ".repeat(qs+1)}${Re.message} -${Hi}`),We?pt.reset(Hi):Hi}function Ee($e,Ae,Re,We={}){if(!le){le=!0;let pt="Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.";{let et=new Error(pt);et.name="DeprecationWarning",console.warn(new Error(pt))}}return Re=Math.max(Re,0),Pe($e,{start:{column:Re,line:Ae}},We)}}),F={};h(F,{__debug:()=>Iv,check:()=>Fv,doc:()=>Io,format:()=>Ei,formatWithCursor:()=>vp,getSupportInfo:()=>Rv,util:()=>La,version:()=>Ma});var M=(f,b,O,L)=>{if(!(f&&b==null))return b.replaceAll?b.replaceAll(O,L):O.global?b.replace(O,L):b.split(O).join(L)},I=M,Y=E(S(),1);function K(f){let b=f.indexOf("\r");return b>=0?f.charAt(b+1)===` +${Hi}`),We?pt.reset(Hi):Hi}function Ee($e,Ae,Re,We={}){if(!le){le=!0;let pt="Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.";{let et=new Error(pt);et.name="DeprecationWarning",console.warn(new Error(pt))}}return Re=Math.max(Re,0),Pe($e,{start:{column:Re,line:Ae}},We)}}),N={};h(N,{__debug:()=>Iv,check:()=>Fv,doc:()=>Io,format:()=>Ei,formatWithCursor:()=>vp,getSupportInfo:()=>Rv,util:()=>La,version:()=>Ma});var M=(f,b,O,L)=>{if(!(f&&b==null))return b.replaceAll?b.replaceAll(O,L):O.global?b.replace(O,L):b.split(O).join(L)},I=M,Y=E(S(),1);function K(f){let b=f.indexOf("\r");return b>=0?f.charAt(b+1)===` `?"crlf":"cr":"lf"}function ne(f){switch(f){case"cr":return"\r";case"crlf":return`\r `;default:return` `}}function ge(f,b){let O;switch(b){case` @@ -204,82 +204,82 @@ ${Hi}`),We?pt.reset(Hi):Hi}function Ee($e,Ae,Re,We={}){if(!le){le=!0;let pt="Pas `:O=/\r\n/g;break;default:throw new Error(`Unexpected "eol" ${JSON.stringify(b)}.`)}let L=f.match(O);return L?L.length:0}function ye(f){return I(!1,f,/\r\n?/g,` `)}var De="string",Be="array",nt="cursor",Se="indent",H="align",fe="trim",ae="group",U="fill",Z="if-break",pe="indent-if-break",Me="line-suffix",Ie="line-suffix-boundary",qe="line",ze="label",Ge="break-parent",rt=new Set([nt,Se,H,fe,ae,U,Z,pe,Me,Ie,qe,ze,Ge]);function _n(f){if(typeof f=="string")return De;if(Array.isArray(f))return Be;if(!f)return;let{type:b}=f;if(rt.has(b))return b}var at=_n,un=f=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(f);function Sn(f){let b=f===null?"null":typeof f;if(b!=="string"&&b!=="object")return`Unexpected doc '${b}', Expected it to be 'string' or 'object'.`;if(at(f))throw new Error("doc is valid.");let O=Object.prototype.toString.call(f);if(O!=="[object Object]")return`Unexpected doc '${O}'.`;let L=un([...rt].map(x=>`'${x}'`));return`Unexpected doc.type '${f.type}'. -Expected it to be ${L}.`}var Mt=class extends Error{constructor(b){super(Sn(b));ri(this,"name","InvalidDocError");this.doc=b}},Tn=Mt,ur={};function kn(f,b,O,L){let x=[f];for(;x.length>0;){let W=x.pop();if(W===ur){O(x.pop());continue}O&&x.push(W,ur);let te=at(W);if(!te)throw new Tn(W);if((b==null?void 0:b(W))!==!1)switch(te){case Be:case U:{let le=te===Be?W:W.parts;for(let de=le.length,we=de-1;we>=0;--we)x.push(le[we]);break}case Z:x.push(W.flatContents,W.breakContents);break;case ae:if(L&&W.expandedStates)for(let le=W.expandedStates.length,de=le-1;de>=0;--de)x.push(W.expandedStates[de]);else x.push(W.contents);break;case H:case Se:case pe:case ze:case Me:x.push(W.contents);break;case De:case nt:case fe:case Ie:case qe:case Ge:break;default:throw new Tn(W)}}}var Lt=kn,Vn=()=>{},Xn=Vn;function Rn(f){return{type:Se,contents:f}}function qt(f,b){return{type:H,contents:b,n:f}}function X(f,b={}){return Xn(b.expandedStates),{type:ae,id:b.id,contents:f,break:!!b.shouldBreak,expandedStates:b.expandedStates}}function V(f){return qt(Number.NEGATIVE_INFINITY,f)}function ee(f){return qt({type:"root"},f)}function ie(f){return qt(-1,f)}function C(f,b){return X(f[0],{...b,expandedStates:f})}function g(f){return{type:U,parts:f}}function w(f,b="",O={}){return{type:Z,breakContents:f,flatContents:b,groupId:O.groupId}}function j(f,b){return{type:pe,contents:f,groupId:b.groupId,negate:b.negate}}function J(f){return{type:Me,contents:f}}var re={type:Ie},ce={type:Ge},Ne={type:fe},Je={type:qe,hard:!0},He={type:qe,hard:!0,literal:!0},Xe={type:qe},je={type:qe,soft:!0},gt=[Je,ce],cn=[He,ce],ht={type:nt};function Wt(f,b){let O=[];for(let L=0;L0){for(let x=0;x0?`, { ${be.join(", ")} }`:"";return`indentIfBreak(${L(W.contents)}${Pe})`}if(W.type===ae){let be=[];W.break&&W.break!=="propagated"&&be.push("shouldBreak: true"),W.id&&be.push(`id: ${x(W.id)}`);let Pe=be.length>0?`, { ${be.join(", ")} }`:"";return W.expandedStates?`conditionalGroup([${W.expandedStates.map(Ee=>L(Ee)).join(",")}]${Pe})`:`group(${L(W.contents)}${Pe})`}if(W.type===U)return`fill([${W.parts.map(be=>L(be)).join(", ")}])`;if(W.type===Me)return"lineSuffix("+L(W.contents)+")";if(W.type===Ie)return"lineSuffixBoundary";if(W.type===ze)return`label(${JSON.stringify(W.label)}, ${L(W.contents)})`;throw new Error("Unknown doc type "+W.type)}function x(W){if(typeof W!="symbol")return JSON.stringify(String(W));if(W in b)return b[W];let te=W.description||"symbol";for(let le=0;;le++){let de=te+(le>0?` #${le}`:"");if(!O.has(de))return O.add(de),b[W]=`Symbol.for(${JSON.stringify(de)})`}}}var Eo=(f,b,O)=>{if(!(f&&b==null))return Array.isArray(b)||typeof b=="string"?b[O<0?b.length+O:O]:b.at(O)},fn=Eo,Di=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC2\uDECE-\uDEDB\uDEE0-\uDEE8]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;function xi(f){return f===12288||f>=65281&&f<=65376||f>=65504&&f<=65510}function Q(f){return f>=4352&&f<=4447||f===8986||f===8987||f===9001||f===9002||f>=9193&&f<=9196||f===9200||f===9203||f===9725||f===9726||f===9748||f===9749||f>=9800&&f<=9811||f===9855||f===9875||f===9889||f===9898||f===9899||f===9917||f===9918||f===9924||f===9925||f===9934||f===9940||f===9962||f===9970||f===9971||f===9973||f===9978||f===9981||f===9989||f===9994||f===9995||f===10024||f===10060||f===10062||f>=10067&&f<=10069||f===10071||f>=10133&&f<=10135||f===10160||f===10175||f===11035||f===11036||f===11088||f===11093||f>=11904&&f<=11929||f>=11931&&f<=12019||f>=12032&&f<=12245||f>=12272&&f<=12287||f>=12289&&f<=12350||f>=12353&&f<=12438||f>=12441&&f<=12543||f>=12549&&f<=12591||f>=12593&&f<=12686||f>=12688&&f<=12771||f>=12783&&f<=12830||f>=12832&&f<=12871||f>=12880&&f<=19903||f>=19968&&f<=42124||f>=42128&&f<=42182||f>=43360&&f<=43388||f>=44032&&f<=55203||f>=63744&&f<=64255||f>=65040&&f<=65049||f>=65072&&f<=65106||f>=65108&&f<=65126||f>=65128&&f<=65131||f>=94176&&f<=94180||f===94192||f===94193||f>=94208&&f<=100343||f>=100352&&f<=101589||f>=101632&&f<=101640||f>=110576&&f<=110579||f>=110581&&f<=110587||f===110589||f===110590||f>=110592&&f<=110882||f===110898||f>=110928&&f<=110930||f===110933||f>=110948&&f<=110951||f>=110960&&f<=111355||f===126980||f===127183||f===127374||f>=127377&&f<=127386||f>=127488&&f<=127490||f>=127504&&f<=127547||f>=127552&&f<=127560||f===127568||f===127569||f>=127584&&f<=127589||f>=127744&&f<=127776||f>=127789&&f<=127797||f>=127799&&f<=127868||f>=127870&&f<=127891||f>=127904&&f<=127946||f>=127951&&f<=127955||f>=127968&&f<=127984||f===127988||f>=127992&&f<=128062||f===128064||f>=128066&&f<=128252||f>=128255&&f<=128317||f>=128331&&f<=128334||f>=128336&&f<=128359||f===128378||f===128405||f===128406||f===128420||f>=128507&&f<=128591||f>=128640&&f<=128709||f===128716||f>=128720&&f<=128722||f>=128725&&f<=128727||f>=128732&&f<=128735||f===128747||f===128748||f>=128756&&f<=128764||f>=128992&&f<=129003||f===129008||f>=129292&&f<=129338||f>=129340&&f<=129349||f>=129351&&f<=129535||f>=129648&&f<=129660||f>=129664&&f<=129672||f>=129680&&f<=129725||f>=129727&&f<=129733||f>=129742&&f<=129755||f>=129760&&f<=129768||f>=129776&&f<=129784||f>=131072&&f<=196605||f>=196608&&f<=262141}var vn=f=>!(xi(f)||Q(f)),bn=/[^\x20-\x7F]/;function it(f){if(!f)return 0;if(!bn.test(f))return f.length;f=f.replace(Di()," ");let b=0;for(let O of f){let L=O.codePointAt(0);L<=31||L>=127&&L<=159||L>=768&&L<=879||(b+=vn(L)?1:2)}return b}var se=it,ke=f=>{if(Array.isArray(f))return f;if(f.type!==U)throw new Error(`Expect doc to be 'array' or '${U}'.`);return f.parts};function Le(f,b){if(typeof f=="string")return b(f);let O=new Map;return L(f);function L(W){if(O.has(W))return O.get(W);let te=x(W);return O.set(W,te),te}function x(W){switch(at(W)){case Be:return b(W.map(L));case U:return b({...W,parts:W.parts.map(L)});case Z:return b({...W,breakContents:L(W.breakContents),flatContents:L(W.flatContents)});case ae:{let{expandedStates:te,contents:le}=W;return te?(te=te.map(L),le=te[0]):le=L(le),b({...W,contents:le,expandedStates:te})}case H:case Se:case pe:case ze:case Me:return b({...W,contents:L(W.contents)});case De:case nt:case fe:case Ie:case qe:case Ge:return b(W);default:throw new Tn(W)}}}function Ye(f,b,O){let L=O,x=!1;function W(te){if(x)return!1;let le=b(te);le!==void 0&&(x=!0,L=le)}return Lt(f,W),L}function tn(f){if(f.type===ae&&f.break||f.type===qe&&f.hard||f.type===Ge)return!0}function Gt(f){return Ye(f,tn,!1)}function Jt(f){if(f.length>0){let b=fn(!1,f,-1);!b.expandedStates&&!b.break&&(b.break="propagated")}return null}function Dn(f){let b=new Set,O=[];function L(W){if(W.type===Ge&&Jt(O),W.type===ae){if(O.push(W),b.has(W))return!1;b.add(W)}}function x(W){W.type===ae&&O.pop().break&&Jt(O)}Lt(f,L,x,!0)}function Hn(f){return f.type===qe&&!f.hard?f.soft?"":" ":f.type===Z?f.flatContents:f}function Ht(f){return Le(f,Hn)}function pn(f){for(f=[...f];f.length>=2&&fn(!1,f,-2).type===qe&&fn(!1,f,-1).type===Ge;)f.length-=2;if(f.length>0){let b=Nt(fn(!1,f,-1));f[f.length-1]=b}return f}function Nt(f){switch(at(f)){case H:case Se:case pe:case ae:case Me:case ze:{let b=Nt(f.contents);return{...f,contents:b}}case Z:return{...f,breakContents:Nt(f.breakContents),flatContents:Nt(f.flatContents)};case U:return{...f,parts:pn(f.parts)};case Be:return pn(f);case De:return f.replace(/[\n\r]*$/,"");case nt:case fe:case Ie:case qe:case Ge:break;default:throw new Tn(f)}return f}function mn(f){return Nt(vl(f))}function wn(f){switch(at(f)){case U:if(f.parts.every(b=>b===""))return"";break;case ae:if(!f.contents&&!f.id&&!f.break&&!f.expandedStates)return"";if(f.contents.type===ae&&f.contents.id===f.id&&f.contents.break===f.break&&f.contents.expandedStates===f.expandedStates)return f.contents;break;case H:case Se:case pe:case Me:if(!f.contents)return"";break;case Z:if(!f.flatContents&&!f.breakContents)return"";break;case Be:{let b=[];for(let O of f){if(!O)continue;let[L,...x]=Array.isArray(O)?O:[O];typeof L=="string"&&typeof fn(!1,b,-1)=="string"?b[b.length-1]+=L:b.push(L),b.push(...x)}return b.length===0?"":b.length===1?b[0]:b}case De:case nt:case fe:case Ie:case qe:case ze:case Ge:break;default:throw new Tn(f)}return f}function vl(f){return Le(f,b=>wn(b))}function M0(f,b=cn){return Le(f,O=>typeof O=="string"?Wt(b,O.split(` -`)):O)}function L0(f){if(f.type===qe)return!0}function Lh(f){return Ye(f,L0,!1)}function bl(f,b){return f.type===ze?{...f,contents:b(f.contents)}:b(f)}var hr=Symbol("MODE_BREAK"),wi=Symbol("MODE_FLAT"),_a=Symbol("cursor");function jh(){return{value:"",length:0,queue:[]}}function j0(f,b){return Uu(f,{type:"indent"},b)}function xh(f,b,O){return b===Number.NEGATIVE_INFINITY?f.root||jh():b<0?Uu(f,{type:"dedent"},O):b?b.type==="root"?{...f,root:f}:Uu(f,{type:typeof b=="string"?"stringAlign":"numberAlign",n:b},O):f}function Uu(f,b,O){let L=b.type==="dedent"?f.queue.slice(0,-1):[...f.queue,b],x="",W=0,te=0,le=0;for(let Ae of L)switch(Ae.type){case"indent":be(),O.useTabs?de(1):we(O.tabWidth);break;case"stringAlign":be(),x+=Ae.n,W+=Ae.n.length;break;case"numberAlign":te+=1,le+=Ae.n;break;default:throw new Error(`Unexpected type '${Ae.type}'`)}return Ee(),{...f,value:x,length:W,queue:L};function de(Ae){x+=" ".repeat(Ae),W+=O.tabWidth*Ae}function we(Ae){x+=" ".repeat(Ae),W+=Ae}function be(){O.useTabs?Pe():Ee()}function Pe(){te>0&&de(te),$e()}function Ee(){le>0&&we(le),$e()}function $e(){te=0,le=0}}function Vu(f){let b=0,O=0,L=f.length;e:for(;L--;){let x=f[L];if(x===_a){O++;continue}for(let W=x.length-1;W>=0;W--){let te=x[W];if(te===" "||te===" ")b++;else{f[L]=x.slice(0,W+1);break e}}}if(b>0||O>0)for(f.length=L+1;O-- >0;)f.push(_a);return b}function So(f,b,O,L,x,W){if(O===Number.POSITIVE_INFINITY)return!0;let te=b.length,le=[f],de=[];for(;O>=0;){if(le.length===0){if(te===0)return!0;le.push(b[--te]);continue}let{mode:we,doc:be}=le.pop();switch(at(be)){case De:de.push(be),O-=se(be);break;case Be:case U:{let Pe=ke(be);for(let Ee=Pe.length-1;Ee>=0;Ee--)le.push({mode:we,doc:Pe[Ee]});break}case Se:case H:case pe:case ze:le.push({mode:we,doc:be.contents});break;case fe:O+=Vu(de);break;case ae:{if(W&&be.break)return!1;let Pe=be.break?hr:we,Ee=be.expandedStates&&Pe===hr?fn(!1,be.expandedStates,-1):be.contents;le.push({mode:Pe,doc:Ee});break}case Z:{let Pe=(be.groupId?x[be.groupId]||wi:we)===hr?be.breakContents:be.flatContents;Pe&&le.push({mode:we,doc:Pe});break}case qe:if(we===hr||be.hard)return!0;be.soft||(de.push(" "),O--);break;case Me:L=!0;break;case Ie:if(L)return!1;break}}return!1}function Hu(f,b){let O={},L=b.printWidth,x=ne(b.endOfLine),W=0,te=[{ind:jh(),mode:hr,doc:f}],le=[],de=!1,we=[],be=0;for(Dn(f);te.length>0;){let{ind:Ee,mode:$e,doc:Ae}=te.pop();switch(at(Ae)){case De:{let Re=x!==` +Expected it to be ${L}.`}var Mt=class extends Error{constructor(b){super(Sn(b));ri(this,"name","InvalidDocError");this.doc=b}},kn=Mt,ur={};function Tn(f,b,O,L){let x=[f];for(;x.length>0;){let W=x.pop();if(W===ur){O(x.pop());continue}O&&x.push(W,ur);let te=at(W);if(!te)throw new kn(W);if((b==null?void 0:b(W))!==!1)switch(te){case Be:case U:{let le=te===Be?W:W.parts;for(let de=le.length,we=de-1;we>=0;--we)x.push(le[we]);break}case Z:x.push(W.flatContents,W.breakContents);break;case ae:if(L&&W.expandedStates)for(let le=W.expandedStates.length,de=le-1;de>=0;--de)x.push(W.expandedStates[de]);else x.push(W.contents);break;case H:case Se:case pe:case ze:case Me:x.push(W.contents);break;case De:case nt:case fe:case Ie:case qe:case Ge:break;default:throw new kn(W)}}}var Lt=Tn,Vn=()=>{},Xn=Vn;function Rn(f){return{type:Se,contents:f}}function qt(f,b){return{type:H,contents:b,n:f}}function X(f,b={}){return Xn(b.expandedStates),{type:ae,id:b.id,contents:f,break:!!b.shouldBreak,expandedStates:b.expandedStates}}function V(f){return qt(Number.NEGATIVE_INFINITY,f)}function ee(f){return qt({type:"root"},f)}function ie(f){return qt(-1,f)}function C(f,b){return X(f[0],{...b,expandedStates:f})}function g(f){return{type:U,parts:f}}function w(f,b="",O={}){return{type:Z,breakContents:f,flatContents:b,groupId:O.groupId}}function j(f,b){return{type:pe,contents:f,groupId:b.groupId,negate:b.negate}}function J(f){return{type:Me,contents:f}}var re={type:Ie},ce={type:Ge},Ne={type:fe},Je={type:qe,hard:!0},He={type:qe,hard:!0,literal:!0},Xe={type:qe},je={type:qe,soft:!0},gt=[Je,ce],cn=[He,ce],ht={type:nt};function Wt(f,b){let O=[];for(let L=0;L0){for(let x=0;x0?`, { ${be.join(", ")} }`:"";return`indentIfBreak(${L(W.contents)}${Pe})`}if(W.type===ae){let be=[];W.break&&W.break!=="propagated"&&be.push("shouldBreak: true"),W.id&&be.push(`id: ${x(W.id)}`);let Pe=be.length>0?`, { ${be.join(", ")} }`:"";return W.expandedStates?`conditionalGroup([${W.expandedStates.map(Ee=>L(Ee)).join(",")}]${Pe})`:`group(${L(W.contents)}${Pe})`}if(W.type===U)return`fill([${W.parts.map(be=>L(be)).join(", ")}])`;if(W.type===Me)return"lineSuffix("+L(W.contents)+")";if(W.type===Ie)return"lineSuffixBoundary";if(W.type===ze)return`label(${JSON.stringify(W.label)}, ${L(W.contents)})`;throw new Error("Unknown doc type "+W.type)}function x(W){if(typeof W!="symbol")return JSON.stringify(String(W));if(W in b)return b[W];let te=W.description||"symbol";for(let le=0;;le++){let de=te+(le>0?` #${le}`:"");if(!O.has(de))return O.add(de),b[W]=`Symbol.for(${JSON.stringify(de)})`}}}var Eo=(f,b,O)=>{if(!(f&&b==null))return Array.isArray(b)||typeof b=="string"?b[O<0?b.length+O:O]:b.at(O)},fn=Eo,Di=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC2\uDECE-\uDEDB\uDEE0-\uDEE8]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;function xi(f){return f===12288||f>=65281&&f<=65376||f>=65504&&f<=65510}function Q(f){return f>=4352&&f<=4447||f===8986||f===8987||f===9001||f===9002||f>=9193&&f<=9196||f===9200||f===9203||f===9725||f===9726||f===9748||f===9749||f>=9800&&f<=9811||f===9855||f===9875||f===9889||f===9898||f===9899||f===9917||f===9918||f===9924||f===9925||f===9934||f===9940||f===9962||f===9970||f===9971||f===9973||f===9978||f===9981||f===9989||f===9994||f===9995||f===10024||f===10060||f===10062||f>=10067&&f<=10069||f===10071||f>=10133&&f<=10135||f===10160||f===10175||f===11035||f===11036||f===11088||f===11093||f>=11904&&f<=11929||f>=11931&&f<=12019||f>=12032&&f<=12245||f>=12272&&f<=12287||f>=12289&&f<=12350||f>=12353&&f<=12438||f>=12441&&f<=12543||f>=12549&&f<=12591||f>=12593&&f<=12686||f>=12688&&f<=12771||f>=12783&&f<=12830||f>=12832&&f<=12871||f>=12880&&f<=19903||f>=19968&&f<=42124||f>=42128&&f<=42182||f>=43360&&f<=43388||f>=44032&&f<=55203||f>=63744&&f<=64255||f>=65040&&f<=65049||f>=65072&&f<=65106||f>=65108&&f<=65126||f>=65128&&f<=65131||f>=94176&&f<=94180||f===94192||f===94193||f>=94208&&f<=100343||f>=100352&&f<=101589||f>=101632&&f<=101640||f>=110576&&f<=110579||f>=110581&&f<=110587||f===110589||f===110590||f>=110592&&f<=110882||f===110898||f>=110928&&f<=110930||f===110933||f>=110948&&f<=110951||f>=110960&&f<=111355||f===126980||f===127183||f===127374||f>=127377&&f<=127386||f>=127488&&f<=127490||f>=127504&&f<=127547||f>=127552&&f<=127560||f===127568||f===127569||f>=127584&&f<=127589||f>=127744&&f<=127776||f>=127789&&f<=127797||f>=127799&&f<=127868||f>=127870&&f<=127891||f>=127904&&f<=127946||f>=127951&&f<=127955||f>=127968&&f<=127984||f===127988||f>=127992&&f<=128062||f===128064||f>=128066&&f<=128252||f>=128255&&f<=128317||f>=128331&&f<=128334||f>=128336&&f<=128359||f===128378||f===128405||f===128406||f===128420||f>=128507&&f<=128591||f>=128640&&f<=128709||f===128716||f>=128720&&f<=128722||f>=128725&&f<=128727||f>=128732&&f<=128735||f===128747||f===128748||f>=128756&&f<=128764||f>=128992&&f<=129003||f===129008||f>=129292&&f<=129338||f>=129340&&f<=129349||f>=129351&&f<=129535||f>=129648&&f<=129660||f>=129664&&f<=129672||f>=129680&&f<=129725||f>=129727&&f<=129733||f>=129742&&f<=129755||f>=129760&&f<=129768||f>=129776&&f<=129784||f>=131072&&f<=196605||f>=196608&&f<=262141}var vn=f=>!(xi(f)||Q(f)),bn=/[^\x20-\x7F]/;function it(f){if(!f)return 0;if(!bn.test(f))return f.length;f=f.replace(Di()," ");let b=0;for(let O of f){let L=O.codePointAt(0);L<=31||L>=127&&L<=159||L>=768&&L<=879||(b+=vn(L)?1:2)}return b}var se=it,Te=f=>{if(Array.isArray(f))return f;if(f.type!==U)throw new Error(`Expect doc to be 'array' or '${U}'.`);return f.parts};function Le(f,b){if(typeof f=="string")return b(f);let O=new Map;return L(f);function L(W){if(O.has(W))return O.get(W);let te=x(W);return O.set(W,te),te}function x(W){switch(at(W)){case Be:return b(W.map(L));case U:return b({...W,parts:W.parts.map(L)});case Z:return b({...W,breakContents:L(W.breakContents),flatContents:L(W.flatContents)});case ae:{let{expandedStates:te,contents:le}=W;return te?(te=te.map(L),le=te[0]):le=L(le),b({...W,contents:le,expandedStates:te})}case H:case Se:case pe:case ze:case Me:return b({...W,contents:L(W.contents)});case De:case nt:case fe:case Ie:case qe:case Ge:return b(W);default:throw new kn(W)}}}function Ye(f,b,O){let L=O,x=!1;function W(te){if(x)return!1;let le=b(te);le!==void 0&&(x=!0,L=le)}return Lt(f,W),L}function tn(f){if(f.type===ae&&f.break||f.type===qe&&f.hard||f.type===Ge)return!0}function Gt(f){return Ye(f,tn,!1)}function Jt(f){if(f.length>0){let b=fn(!1,f,-1);!b.expandedStates&&!b.break&&(b.break="propagated")}return null}function Dn(f){let b=new Set,O=[];function L(W){if(W.type===Ge&&Jt(O),W.type===ae){if(O.push(W),b.has(W))return!1;b.add(W)}}function x(W){W.type===ae&&O.pop().break&&Jt(O)}Lt(f,L,x,!0)}function Hn(f){return f.type===qe&&!f.hard?f.soft?"":" ":f.type===Z?f.flatContents:f}function Ht(f){return Le(f,Hn)}function pn(f){for(f=[...f];f.length>=2&&fn(!1,f,-2).type===qe&&fn(!1,f,-1).type===Ge;)f.length-=2;if(f.length>0){let b=Nt(fn(!1,f,-1));f[f.length-1]=b}return f}function Nt(f){switch(at(f)){case H:case Se:case pe:case ae:case Me:case ze:{let b=Nt(f.contents);return{...f,contents:b}}case Z:return{...f,breakContents:Nt(f.breakContents),flatContents:Nt(f.flatContents)};case U:return{...f,parts:pn(f.parts)};case Be:return pn(f);case De:return f.replace(/[\n\r]*$/,"");case nt:case fe:case Ie:case qe:case Ge:break;default:throw new kn(f)}return f}function mn(f){return Nt(bl(f))}function wn(f){switch(at(f)){case U:if(f.parts.every(b=>b===""))return"";break;case ae:if(!f.contents&&!f.id&&!f.break&&!f.expandedStates)return"";if(f.contents.type===ae&&f.contents.id===f.id&&f.contents.break===f.break&&f.contents.expandedStates===f.expandedStates)return f.contents;break;case H:case Se:case pe:case Me:if(!f.contents)return"";break;case Z:if(!f.flatContents&&!f.breakContents)return"";break;case Be:{let b=[];for(let O of f){if(!O)continue;let[L,...x]=Array.isArray(O)?O:[O];typeof L=="string"&&typeof fn(!1,b,-1)=="string"?b[b.length-1]+=L:b.push(L),b.push(...x)}return b.length===0?"":b.length===1?b[0]:b}case De:case nt:case fe:case Ie:case qe:case ze:case Ge:break;default:throw new kn(f)}return f}function bl(f){return Le(f,b=>wn(b))}function M0(f,b=cn){return Le(f,O=>typeof O=="string"?Wt(b,O.split(` +`)):O)}function L0(f){if(f.type===qe)return!0}function Lh(f){return Ye(f,L0,!1)}function Dl(f,b){return f.type===ze?{...f,contents:b(f.contents)}:b(f)}var hr=Symbol("MODE_BREAK"),wi=Symbol("MODE_FLAT"),_a=Symbol("cursor");function jh(){return{value:"",length:0,queue:[]}}function j0(f,b){return Uu(f,{type:"indent"},b)}function xh(f,b,O){return b===Number.NEGATIVE_INFINITY?f.root||jh():b<0?Uu(f,{type:"dedent"},O):b?b.type==="root"?{...f,root:f}:Uu(f,{type:typeof b=="string"?"stringAlign":"numberAlign",n:b},O):f}function Uu(f,b,O){let L=b.type==="dedent"?f.queue.slice(0,-1):[...f.queue,b],x="",W=0,te=0,le=0;for(let Ae of L)switch(Ae.type){case"indent":be(),O.useTabs?de(1):we(O.tabWidth);break;case"stringAlign":be(),x+=Ae.n,W+=Ae.n.length;break;case"numberAlign":te+=1,le+=Ae.n;break;default:throw new Error(`Unexpected type '${Ae.type}'`)}return Ee(),{...f,value:x,length:W,queue:L};function de(Ae){x+=" ".repeat(Ae),W+=O.tabWidth*Ae}function we(Ae){x+=" ".repeat(Ae),W+=Ae}function be(){O.useTabs?Pe():Ee()}function Pe(){te>0&&de(te),$e()}function Ee(){le>0&&we(le),$e()}function $e(){te=0,le=0}}function Vu(f){let b=0,O=0,L=f.length;e:for(;L--;){let x=f[L];if(x===_a){O++;continue}for(let W=x.length-1;W>=0;W--){let te=x[W];if(te===" "||te===" ")b++;else{f[L]=x.slice(0,W+1);break e}}}if(b>0||O>0)for(f.length=L+1;O-- >0;)f.push(_a);return b}function So(f,b,O,L,x,W){if(O===Number.POSITIVE_INFINITY)return!0;let te=b.length,le=[f],de=[];for(;O>=0;){if(le.length===0){if(te===0)return!0;le.push(b[--te]);continue}let{mode:we,doc:be}=le.pop();switch(at(be)){case De:de.push(be),O-=se(be);break;case Be:case U:{let Pe=Te(be);for(let Ee=Pe.length-1;Ee>=0;Ee--)le.push({mode:we,doc:Pe[Ee]});break}case Se:case H:case pe:case ze:le.push({mode:we,doc:be.contents});break;case fe:O+=Vu(de);break;case ae:{if(W&&be.break)return!1;let Pe=be.break?hr:we,Ee=be.expandedStates&&Pe===hr?fn(!1,be.expandedStates,-1):be.contents;le.push({mode:Pe,doc:Ee});break}case Z:{let Pe=(be.groupId?x[be.groupId]||wi:we)===hr?be.breakContents:be.flatContents;Pe&&le.push({mode:we,doc:Pe});break}case qe:if(we===hr||be.hard)return!0;be.soft||(de.push(" "),O--);break;case Me:L=!0;break;case Ie:if(L)return!1;break}}return!1}function Hu(f,b){let O={},L=b.printWidth,x=ne(b.endOfLine),W=0,te=[{ind:jh(),mode:hr,doc:f}],le=[],de=!1,we=[],be=0;for(Dn(f);te.length>0;){let{ind:Ee,mode:$e,doc:Ae}=te.pop();switch(at(Ae)){case De:{let Re=x!==` `?I(!1,Ae,` -`,x):Ae;le.push(Re),te.length>0&&(W+=se(Re));break}case Be:for(let Re=Ae.length-1;Re>=0;Re--)te.push({ind:Ee,mode:$e,doc:Ae[Re]});break;case nt:if(be>=2)throw new Error("There are too many 'cursor' in doc.");le.push(_a),be++;break;case Se:te.push({ind:j0(Ee,b),mode:$e,doc:Ae.contents});break;case H:te.push({ind:xh(Ee,Ae.n,b),mode:$e,doc:Ae.contents});break;case fe:W-=Vu(le);break;case ae:switch($e){case wi:if(!de){te.push({ind:Ee,mode:Ae.break?hr:wi,doc:Ae.contents});break}case hr:{de=!1;let Re={ind:Ee,mode:wi,doc:Ae.contents},We=L-W,pt=we.length>0;if(!Ae.break&&So(Re,te,We,pt,O))te.push(Re);else if(Ae.expandedStates){let et=fn(!1,Ae.expandedStates,-1);if(Ae.break){te.push({ind:Ee,mode:hr,doc:et});break}else for(let bt=1;bt=Ae.expandedStates.length){te.push({ind:Ee,mode:hr,doc:et});break}else{let xt=Ae.expandedStates[bt],_t={ind:Ee,mode:wi,doc:xt};if(So(_t,te,We,pt,O)){te.push(_t);break}}}else te.push({ind:Ee,mode:hr,doc:Ae.contents});break}}Ae.id&&(O[Ae.id]=fn(!1,te,-1).mode);break;case U:{let Re=L-W,{parts:We}=Ae;if(We.length===0)break;let[pt,et]=We,bt={ind:Ee,mode:wi,doc:pt},xt={ind:Ee,mode:hr,doc:pt},_t=So(bt,[],Re,we.length>0,O,!0);if(We.length===1){_t?te.push(bt):te.push(xt);break}let Yn={ind:Ee,mode:wi,doc:et},dn={ind:Ee,mode:hr,doc:et};if(We.length===2){_t?te.push(Yn,bt):te.push(dn,xt);break}We.splice(0,2);let hn={ind:Ee,mode:$e,doc:g(We)},qs=We[0];So({ind:Ee,mode:wi,doc:[pt,et,qs]},[],Re,we.length>0,O,!0)?te.push(hn,Yn,bt):_t?te.push(hn,dn,bt):te.push(hn,dn,xt);break}case Z:case pe:{let Re=Ae.groupId?O[Ae.groupId]:$e;if(Re===hr){let We=Ae.type===Z?Ae.breakContents:Ae.negate?Ae.contents:Rn(Ae.contents);We&&te.push({ind:Ee,mode:$e,doc:We})}if(Re===wi){let We=Ae.type===Z?Ae.flatContents:Ae.negate?Rn(Ae.contents):Ae.contents;We&&te.push({ind:Ee,mode:$e,doc:We})}break}case Me:we.push({ind:Ee,mode:$e,doc:Ae.contents});break;case Ie:we.length>0&&te.push({ind:Ee,mode:$e,doc:Je});break;case qe:switch($e){case wi:if(Ae.hard)de=!0;else{Ae.soft||(le.push(" "),W+=1);break}case hr:if(we.length>0){te.push({ind:Ee,mode:$e,doc:Ae},...we.reverse()),we.length=0;break}Ae.literal?Ee.root?(le.push(x,Ee.root.value),W=Ee.root.length):(le.push(x),W=0):(W-=Vu(le),le.push(x+Ee.value),W=Ee.length);break}break;case ze:te.push({ind:Ee,mode:$e,doc:Ae.contents});break;case Ge:break;default:throw new Tn(Ae)}te.length===0&&we.length>0&&(te.push(...we.reverse()),we.length=0)}let Pe=le.indexOf(_a);if(Pe!==-1){let Ee=le.indexOf(_a,Pe+1),$e=le.slice(0,Pe).join(""),Ae=le.slice(Pe+1,Ee).join(""),Re=le.slice(Ee+1).join("");return{formatted:$e+Ae+Re,cursorNodeStart:$e.length,cursorNodeText:Ae}}return{formatted:le.join("")}}function Bh(f,b,O=0){let L=0;for(let x=O;x1?fn(!1,f,-2):null}getValue(){return fn(!1,this.stack,-1)}getNode(f=0){let b=A(this,$a,Dl).call(this,f);return b===-1?null:this.stack[b]}getParentNode(f=0){return this.getNode(f+1)}call(f,...b){let{stack:O}=this,{length:L}=O,x=fn(!1,O,-1);for(let W of b)x=x[W],O.push(W,x);try{return f(this)}finally{O.length=L}}callParent(f,b=0){let O=A(this,$a,Dl).call(this,b+1),L=this.stack.splice(O+1);try{return f(this)}finally{this.stack.push(...L)}}each(f,...b){let{stack:O}=this,{length:L}=O,x=fn(!1,O,-1);for(let W of b)x=x[W],O.push(W,x);try{for(let W=0;W{O[x]=f(L,x,W)},...b),O}match(...f){let b=this.stack.length-1,O=null,L=this.stack[b--];for(let x of f){if(L===void 0)return!1;let W=null;if(typeof O=="number"&&(W=O,O=this.stack[b--],L=this.stack[b--]),x&&!x(L,O,W))return!1;O=this.stack[b--],L=this.stack[b--]}return!0}findAncestor(f){for(let b of A(this,ko,Ea).call(this))if(f(b))return b}hasAncestor(f){for(let b of A(this,ko,Ea).call(this))if(f(b))return!0;return!1}};$a=new WeakSet,Dl=function(f){let{stack:b}=this;for(let O=b.length-1;O>=0;O-=2)if(!Array.isArray(b[O])&&--f<0)return O;return-1},ko=new WeakSet,Ea=function*(){let{stack:f}=this;for(let b=f.length-3;b>=0;b-=2){let O=f[b];Array.isArray(O)||(yield O)}};var x0=wl,_l=new Proxy(()=>{},{get:()=>_l}),Sa=_l;function $l(f){return f!==null&&typeof f=="object"}var Ao=$l;function*El(f,b){let{getVisitorKeys:O,filter:L=()=>!0}=b,x=W=>Ao(W)&&L(W);for(let W of O(f)){let te=f[W];if(Array.isArray(te))for(let le of te)x(le)&&(yield le);else x(te)&&(yield te)}}function*qh(f,b){let O=[f];for(let L=0;L{let x=!!(L!=null&&L.backwards);if(O===!1)return!1;let{length:W}=b,te=O;for(;te>=0&&te0&&(W+=se(Re));break}case Be:for(let Re=Ae.length-1;Re>=0;Re--)te.push({ind:Ee,mode:$e,doc:Ae[Re]});break;case nt:if(be>=2)throw new Error("There are too many 'cursor' in doc.");le.push(_a),be++;break;case Se:te.push({ind:j0(Ee,b),mode:$e,doc:Ae.contents});break;case H:te.push({ind:xh(Ee,Ae.n,b),mode:$e,doc:Ae.contents});break;case fe:W-=Vu(le);break;case ae:switch($e){case wi:if(!de){te.push({ind:Ee,mode:Ae.break?hr:wi,doc:Ae.contents});break}case hr:{de=!1;let Re={ind:Ee,mode:wi,doc:Ae.contents},We=L-W,pt=we.length>0;if(!Ae.break&&So(Re,te,We,pt,O))te.push(Re);else if(Ae.expandedStates){let et=fn(!1,Ae.expandedStates,-1);if(Ae.break){te.push({ind:Ee,mode:hr,doc:et});break}else for(let bt=1;bt=Ae.expandedStates.length){te.push({ind:Ee,mode:hr,doc:et});break}else{let xt=Ae.expandedStates[bt],_t={ind:Ee,mode:wi,doc:xt};if(So(_t,te,We,pt,O)){te.push(_t);break}}}else te.push({ind:Ee,mode:hr,doc:Ae.contents});break}}Ae.id&&(O[Ae.id]=fn(!1,te,-1).mode);break;case U:{let Re=L-W,{parts:We}=Ae;if(We.length===0)break;let[pt,et]=We,bt={ind:Ee,mode:wi,doc:pt},xt={ind:Ee,mode:hr,doc:pt},_t=So(bt,[],Re,we.length>0,O,!0);if(We.length===1){_t?te.push(bt):te.push(xt);break}let Yn={ind:Ee,mode:wi,doc:et},dn={ind:Ee,mode:hr,doc:et};if(We.length===2){_t?te.push(Yn,bt):te.push(dn,xt);break}We.splice(0,2);let hn={ind:Ee,mode:$e,doc:g(We)},qs=We[0];So({ind:Ee,mode:wi,doc:[pt,et,qs]},[],Re,we.length>0,O,!0)?te.push(hn,Yn,bt):_t?te.push(hn,dn,bt):te.push(hn,dn,xt);break}case Z:case pe:{let Re=Ae.groupId?O[Ae.groupId]:$e;if(Re===hr){let We=Ae.type===Z?Ae.breakContents:Ae.negate?Ae.contents:Rn(Ae.contents);We&&te.push({ind:Ee,mode:$e,doc:We})}if(Re===wi){let We=Ae.type===Z?Ae.flatContents:Ae.negate?Rn(Ae.contents):Ae.contents;We&&te.push({ind:Ee,mode:$e,doc:We})}break}case Me:we.push({ind:Ee,mode:$e,doc:Ae.contents});break;case Ie:we.length>0&&te.push({ind:Ee,mode:$e,doc:Je});break;case qe:switch($e){case wi:if(Ae.hard)de=!0;else{Ae.soft||(le.push(" "),W+=1);break}case hr:if(we.length>0){te.push({ind:Ee,mode:$e,doc:Ae},...we.reverse()),we.length=0;break}Ae.literal?Ee.root?(le.push(x,Ee.root.value),W=Ee.root.length):(le.push(x),W=0):(W-=Vu(le),le.push(x+Ee.value),W=Ee.length);break}break;case ze:te.push({ind:Ee,mode:$e,doc:Ae.contents});break;case Ge:break;default:throw new kn(Ae)}te.length===0&&we.length>0&&(te.push(...we.reverse()),we.length=0)}let Pe=le.indexOf(_a);if(Pe!==-1){let Ee=le.indexOf(_a,Pe+1),$e=le.slice(0,Pe).join(""),Ae=le.slice(Pe+1,Ee).join(""),Re=le.slice(Ee+1).join("");return{formatted:$e+Ae+Re,cursorNodeStart:$e.length,cursorNodeText:Ae}}return{formatted:le.join("")}}function Bh(f,b,O=0){let L=0;for(let x=O;x1?fn(!1,f,-2):null}getValue(){return fn(!1,this.stack,-1)}getNode(f=0){let b=A(this,$a,wl).call(this,f);return b===-1?null:this.stack[b]}getParentNode(f=0){return this.getNode(f+1)}call(f,...b){let{stack:O}=this,{length:L}=O,x=fn(!1,O,-1);for(let W of b)x=x[W],O.push(W,x);try{return f(this)}finally{O.length=L}}callParent(f,b=0){let O=A(this,$a,wl).call(this,b+1),L=this.stack.splice(O+1);try{return f(this)}finally{this.stack.push(...L)}}each(f,...b){let{stack:O}=this,{length:L}=O,x=fn(!1,O,-1);for(let W of b)x=x[W],O.push(W,x);try{for(let W=0;W{O[x]=f(L,x,W)},...b),O}match(...f){let b=this.stack.length-1,O=null,L=this.stack[b--];for(let x of f){if(L===void 0)return!1;let W=null;if(typeof O=="number"&&(W=O,O=this.stack[b--],L=this.stack[b--]),x&&!x(L,O,W))return!1;O=this.stack[b--],L=this.stack[b--]}return!0}findAncestor(f){for(let b of A(this,To,Ea).call(this))if(f(b))return b}hasAncestor(f){for(let b of A(this,To,Ea).call(this))if(f(b))return!0;return!1}};$a=new WeakSet,wl=function(f){let{stack:b}=this;for(let O=b.length-1;O>=0;O-=2)if(!Array.isArray(b[O])&&--f<0)return O;return-1},To=new WeakSet,Ea=function*(){let{stack:f}=this;for(let b=f.length-3;b>=0;b-=2){let O=f[b];Array.isArray(O)||(yield O)}};var x0=_l,$l=new Proxy(()=>{},{get:()=>$l}),Sa=$l;function El(f){return f!==null&&typeof f=="object"}var Ao=El;function*Sl(f,b){let{getVisitorKeys:O,filter:L=()=>!0}=b,x=W=>Ao(W)&&L(W);for(let W of O(f)){let te=f[W];if(Array.isArray(te))for(let le of te)x(le)&&(yield le);else x(te)&&(yield te)}}function*qh(f,b){let O=[f];for(let L=0;L{let x=!!(L!=null&&L.backwards);if(O===!1)return!1;let{length:W}=b,te=O;for(;te>=0&&te0}var U0=W0,Uh=new Set(["tokens","comments","parent","enclosingNode","precedingNode","followingNode"]),V0=f=>Object.keys(f).filter(b=>!Uh.has(b));function kl(f){return f?b=>f(b,Uh):V0}var Ku=kl;function H0(f){let b=f.type||f.kind||"(unknown type)",O=String(f.name||f.id&&(typeof f.id=="object"?f.id.name:f.id)||f.key&&(typeof f.key=="object"?f.key.name:f.key)||f.value&&(typeof f.value=="object"?"":String(f.value))||f.operator||"");return O.length>20&&(O=O.slice(0,19)+"\u2026"),b+(O?" "+O:"")}function Al(f,b){var O;((O=f.comments)!=null?O:f.comments=[]).push(b),b.printed=!1,b.nodeDescription=H0(f)}function Co(f,b){b.leading=!0,b.trailing=!1,Al(f,b)}function Fs(f,b,O){b.leading=!1,b.trailing=!1,O&&(b.marker=O),Al(f,b)}function Yt(f,b){b.leading=!1,b.trailing=!0,Al(f,b)}var nn=new WeakMap;function Cl(f,b){var de;if(nn.has(f))return nn.get(f);let{printer:{getCommentChildNodes:O,canAttachComment:L,getVisitorKeys:x},locStart:W,locEnd:te}=b;if(!L)return[];let le=((de=O==null?void 0:O(f,b))!=null?de:[...El(f,{getVisitorKeys:Ku(x)})]).flatMap(we=>L(we)?[we]:Cl(we,b));return le.sort((we,be)=>W(we)-W(be)||te(we)-te(be)),nn.set(f,le),le}function Vh(f,b,O,L){let{locStart:x,locEnd:W}=O,te=x(b),le=W(b),de=Cl(f,O),we,be,Pe=0,Ee=de.length;for(;Pe>1,Ae=de[$e],Re=x(Ae),We=W(Ae);if(Re<=te&&le<=We)return Vh(Ae,b,O,Ae);if(We<=te){we=Ae,Pe=$e+1;continue}if(le<=Re){be=Ae,Ee=$e;continue}throw new Error("Comment location overlaps with node location")}if((L==null?void 0:L.type)==="TemplateLiteral"){let{quasis:$e}=L,Ae=Kn($e,b,O);we&&Kn($e,we,O)!==Ae&&(we=null),be&&Kn($e,be,O)!==Ae&&(be=null)}return{enclosingNode:L,precedingNode:we,followingNode:be}}var Ol=()=>!1;function K0(f,b){let{comments:O}=f;if(delete f.comments,!U0(O)||!b.printer.canAttachComment)return;let L=[],{locStart:x,locEnd:W,printer:{experimentalFeatures:{avoidAstMutation:te=!1}={},handleComments:le={}},originalText:de}=b,{ownLine:we=Ol,endOfLine:be=Ol,remaining:Pe=Ol}=le,Ee=O.map(($e,Ae)=>({...Vh(f,$e,b),comment:$e,text:de,options:b,ast:f,isLastComment:O.length-1===Ae}));for(let[$e,Ae]of Ee.entries()){let{comment:Re,precedingNode:We,enclosingNode:pt,followingNode:et,text:bt,options:xt,ast:_t,isLastComment:Yn}=Ae;if(xt.parser==="json"||xt.parser==="json5"||xt.parser==="jsonc"||xt.parser==="__js_expression"||xt.parser==="__ts_expression"||xt.parser==="__vue_expression"||xt.parser==="__vue_ts_expression"){if(x(Re)-x(_t)<=0){Co(_t,Re);continue}if(W(Re)-W(_t)>=0){Yt(_t,Re);continue}}let dn;if(te?dn=[Ae]:(Re.enclosingNode=pt,Re.precedingNode=We,Re.followingNode=et,dn=[Re,bt,xt,_t,Yn]),z0(bt,xt,Ee,$e))Re.placement="ownLine",we(...dn)||(et?Co(et,Re):We?Yt(We,Re):Fs(pt||_t,Re));else if(Kh(bt,xt,Ee,$e))Re.placement="endOfLine",be(...dn)||(We?Yt(We,Re):et?Co(et,Re):Fs(pt||_t,Re));else if(Re.placement="remaining",!Pe(...dn))if(We&&et){let hn=L.length;hn>0&&L[hn-1].followingNode!==et&&zh(L,xt),L.push(Ae)}else We?Yt(We,Re):et?Co(et,Re):Fs(pt||_t,Re)}if(zh(L,b),!te)for(let $e of O)delete $e.precedingNode,delete $e.enclosingNode,delete $e.followingNode}var Hh=f=>!/[\S\n\u2028\u2029]/.test(f);function z0(f,b,O,L){let{comment:x,precedingNode:W}=O[L],{locStart:te,locEnd:le}=b,de=te(x);if(W)for(let we=L-1;we>=0;we--){let{comment:be,precedingNode:Pe}=O[we];if(Pe!==W||!Hh(f.slice(le(be),de)))break;de=te(be)}return qi(f,de,{backwards:!0})}function Kh(f,b,O,L){let{comment:x,followingNode:W}=O[L],{locStart:te,locEnd:le}=b,de=le(x);if(W)for(let we=L+1;we0;--de){let{comment:be,precedingNode:Pe,followingNode:Ee}=f[de-1];Sa.strictEqual(Pe,W),Sa.strictEqual(Ee,te);let $e=b.originalText.slice(b.locEnd(be),le);if((we=(L=(O=b.printer).isGap)==null?void 0:L.call(O,$e,b))!=null?we:/^[\s(]*$/.test($e))le=b.locStart(be);else break}for(let[be,{comment:Pe}]of f.entries())be1&&be.comments.sort((Pe,Ee)=>b.locStart(Pe)-b.locStart(Ee));f.length=0}function Kn(f,b,O){let L=O.locStart(b)-1;for(let x=1;x!L.has(le)).length===0)return{leading:"",trailing:""};let x=[],W=[],te;return f.each(()=>{let le=f.node;if(L!=null&&L.has(le))return;let{leading:de,trailing:we}=le;de?x.push(Fl(f,b)):we&&(te=Br(f,b,te),W.push(te.doc))},"comments"),{leading:x,trailing:W}}function Gh(f,b,O){let{leading:L,trailing:x}=Yh(f,O);return!L&&!x?b:bl(b,W=>[L,W,x])}function Jh(f){let{[Symbol.for("comments")]:b,[Symbol.for("printedComments")]:O}=f;for(let L of b){if(!L.printed&&!O.has(L))throw new Error('Comment "'+L.value.trim()+'" was not printed. Please report this error!');delete L.printed}}var Rl=class extends Error{constructor(){super(...arguments);ri(this,"name","ConfigError")}},Il=class extends Error{constructor(){super(...arguments);ri(this,"name","UndefinedParserError")}},Qh={cursorOffset:{category:"Special",type:"int",default:-1,range:{start:-1,end:1/0,step:1},description:"Print (to stderr) where a cursor at the given position would move to after formatting.",cliCategory:"Editor"},endOfLine:{category:"Global",type:"choice",default:"lf",description:"Which end of line characters to apply.",choices:[{value:"lf",description:"Line Feed only (\\n), common on Linux and macOS as well as inside git repos"},{value:"crlf",description:"Carriage Return + Line Feed characters (\\r\\n), common on Windows"},{value:"cr",description:"Carriage Return character only (\\r), used very rarely"},{value:"auto",description:`Maintain existing +`||x==="\r"||x==="\u2028"||x==="\u2029")return b+1}return b}var Ns=B0;function q0(f,b,O={}){let L=Bi(f,O.backwards?b-1:b,O),x=Ns(f,L,O);return L!==x}var qi=q0;function W0(f){return Array.isArray(f)&&f.length>0}var U0=W0,Uh=new Set(["tokens","comments","parent","enclosingNode","precedingNode","followingNode"]),V0=f=>Object.keys(f).filter(b=>!Uh.has(b));function Al(f){return f?b=>f(b,Uh):V0}var Ku=Al;function H0(f){let b=f.type||f.kind||"(unknown type)",O=String(f.name||f.id&&(typeof f.id=="object"?f.id.name:f.id)||f.key&&(typeof f.key=="object"?f.key.name:f.key)||f.value&&(typeof f.value=="object"?"":String(f.value))||f.operator||"");return O.length>20&&(O=O.slice(0,19)+"\u2026"),b+(O?" "+O:"")}function Cl(f,b){var O;((O=f.comments)!=null?O:f.comments=[]).push(b),b.printed=!1,b.nodeDescription=H0(f)}function Co(f,b){b.leading=!0,b.trailing=!1,Cl(f,b)}function Fs(f,b,O){b.leading=!1,b.trailing=!1,O&&(b.marker=O),Cl(f,b)}function Yt(f,b){b.leading=!1,b.trailing=!0,Cl(f,b)}var nn=new WeakMap;function Ol(f,b){var de;if(nn.has(f))return nn.get(f);let{printer:{getCommentChildNodes:O,canAttachComment:L,getVisitorKeys:x},locStart:W,locEnd:te}=b;if(!L)return[];let le=((de=O==null?void 0:O(f,b))!=null?de:[...Sl(f,{getVisitorKeys:Ku(x)})]).flatMap(we=>L(we)?[we]:Ol(we,b));return le.sort((we,be)=>W(we)-W(be)||te(we)-te(be)),nn.set(f,le),le}function Vh(f,b,O,L){let{locStart:x,locEnd:W}=O,te=x(b),le=W(b),de=Ol(f,O),we,be,Pe=0,Ee=de.length;for(;Pe>1,Ae=de[$e],Re=x(Ae),We=W(Ae);if(Re<=te&&le<=We)return Vh(Ae,b,O,Ae);if(We<=te){we=Ae,Pe=$e+1;continue}if(le<=Re){be=Ae,Ee=$e;continue}throw new Error("Comment location overlaps with node location")}if((L==null?void 0:L.type)==="TemplateLiteral"){let{quasis:$e}=L,Ae=Kn($e,b,O);we&&Kn($e,we,O)!==Ae&&(we=null),be&&Kn($e,be,O)!==Ae&&(be=null)}return{enclosingNode:L,precedingNode:we,followingNode:be}}var Pl=()=>!1;function K0(f,b){let{comments:O}=f;if(delete f.comments,!U0(O)||!b.printer.canAttachComment)return;let L=[],{locStart:x,locEnd:W,printer:{experimentalFeatures:{avoidAstMutation:te=!1}={},handleComments:le={}},originalText:de}=b,{ownLine:we=Pl,endOfLine:be=Pl,remaining:Pe=Pl}=le,Ee=O.map(($e,Ae)=>({...Vh(f,$e,b),comment:$e,text:de,options:b,ast:f,isLastComment:O.length-1===Ae}));for(let[$e,Ae]of Ee.entries()){let{comment:Re,precedingNode:We,enclosingNode:pt,followingNode:et,text:bt,options:xt,ast:_t,isLastComment:Yn}=Ae;if(xt.parser==="json"||xt.parser==="json5"||xt.parser==="jsonc"||xt.parser==="__js_expression"||xt.parser==="__ts_expression"||xt.parser==="__vue_expression"||xt.parser==="__vue_ts_expression"){if(x(Re)-x(_t)<=0){Co(_t,Re);continue}if(W(Re)-W(_t)>=0){Yt(_t,Re);continue}}let dn;if(te?dn=[Ae]:(Re.enclosingNode=pt,Re.precedingNode=We,Re.followingNode=et,dn=[Re,bt,xt,_t,Yn]),z0(bt,xt,Ee,$e))Re.placement="ownLine",we(...dn)||(et?Co(et,Re):We?Yt(We,Re):Fs(pt||_t,Re));else if(Kh(bt,xt,Ee,$e))Re.placement="endOfLine",be(...dn)||(We?Yt(We,Re):et?Co(et,Re):Fs(pt||_t,Re));else if(Re.placement="remaining",!Pe(...dn))if(We&&et){let hn=L.length;hn>0&&L[hn-1].followingNode!==et&&zh(L,xt),L.push(Ae)}else We?Yt(We,Re):et?Co(et,Re):Fs(pt||_t,Re)}if(zh(L,b),!te)for(let $e of O)delete $e.precedingNode,delete $e.enclosingNode,delete $e.followingNode}var Hh=f=>!/[\S\n\u2028\u2029]/.test(f);function z0(f,b,O,L){let{comment:x,precedingNode:W}=O[L],{locStart:te,locEnd:le}=b,de=te(x);if(W)for(let we=L-1;we>=0;we--){let{comment:be,precedingNode:Pe}=O[we];if(Pe!==W||!Hh(f.slice(le(be),de)))break;de=te(be)}return qi(f,de,{backwards:!0})}function Kh(f,b,O,L){let{comment:x,followingNode:W}=O[L],{locStart:te,locEnd:le}=b,de=le(x);if(W)for(let we=L+1;we0;--de){let{comment:be,precedingNode:Pe,followingNode:Ee}=f[de-1];Sa.strictEqual(Pe,W),Sa.strictEqual(Ee,te);let $e=b.originalText.slice(b.locEnd(be),le);if((we=(L=(O=b.printer).isGap)==null?void 0:L.call(O,$e,b))!=null?we:/^[\s(]*$/.test($e))le=b.locStart(be);else break}for(let[be,{comment:Pe}]of f.entries())be1&&be.comments.sort((Pe,Ee)=>b.locStart(Pe)-b.locStart(Ee));f.length=0}function Kn(f,b,O){let L=O.locStart(b)-1;for(let x=1;x!L.has(le)).length===0)return{leading:"",trailing:""};let x=[],W=[],te;return f.each(()=>{let le=f.node;if(L!=null&&L.has(le))return;let{leading:de,trailing:we}=le;de?x.push(Rl(f,b)):we&&(te=Br(f,b,te),W.push(te.doc))},"comments"),{leading:x,trailing:W}}function Gh(f,b,O){let{leading:L,trailing:x}=Yh(f,O);return!L&&!x?b:Dl(b,W=>[L,W,x])}function Jh(f){let{[Symbol.for("comments")]:b,[Symbol.for("printedComments")]:O}=f;for(let L of b){if(!L.printed&&!O.has(L))throw new Error('Comment "'+L.value.trim()+'" was not printed. Please report this error!');delete L.printed}}var Il=class extends Error{constructor(){super(...arguments);ri(this,"name","ConfigError")}},Ml=class extends Error{constructor(){super(...arguments);ri(this,"name","UndefinedParserError")}},Qh={cursorOffset:{category:"Special",type:"int",default:-1,range:{start:-1,end:1/0,step:1},description:"Print (to stderr) where a cursor at the given position would move to after formatting.",cliCategory:"Editor"},endOfLine:{category:"Global",type:"choice",default:"lf",description:"Which end of line characters to apply.",choices:[{value:"lf",description:"Line Feed only (\\n), common on Linux and macOS as well as inside git repos"},{value:"crlf",description:"Carriage Return + Line Feed characters (\\r\\n), common on Windows"},{value:"cr",description:"Carriage Return character only (\\r), used very rarely"},{value:"auto",description:`Maintain existing (mixed values within one file are normalised by looking at what's used after the first line)`}]},filepath:{category:"Special",type:"path",description:"Specify the input filepath. This will be used to do parser inference.",cliName:"stdin-filepath",cliCategory:"Other",cliDescription:"Path to the file to pretend that stdin comes from."},insertPragma:{category:"Special",type:"boolean",default:!1,description:"Insert @format pragma into file's first docblock comment.",cliCategory:"Other"},parser:{category:"Global",type:"choice",default:void 0,description:"Which parser to use.",exception:f=>typeof f=="string"||typeof f=="function",choices:[{value:"flow",description:"Flow"},{value:"babel",description:"JavaScript"},{value:"babel-flow",description:"Flow"},{value:"babel-ts",description:"TypeScript"},{value:"typescript",description:"TypeScript"},{value:"acorn",description:"JavaScript"},{value:"espree",description:"JavaScript"},{value:"meriyah",description:"JavaScript"},{value:"css",description:"CSS"},{value:"less",description:"Less"},{value:"scss",description:"SCSS"},{value:"json",description:"JSON"},{value:"json5",description:"JSON5"},{value:"jsonc",description:"JSON with Comments"},{value:"json-stringify",description:"JSON.stringify"},{value:"graphql",description:"GraphQL"},{value:"markdown",description:"Markdown"},{value:"mdx",description:"MDX"},{value:"vue",description:"Vue"},{value:"yaml",description:"YAML"},{value:"glimmer",description:"Ember / Handlebars"},{value:"html",description:"HTML"},{value:"angular",description:"Angular"},{value:"lwc",description:"Lightning Web Components"}]},plugins:{type:"path",array:!0,default:[{value:[]}],category:"Global",description:"Add a plugin. Multiple plugins can be passed as separate `--plugin`s.",exception:f=>typeof f=="string"||typeof f=="object",cliName:"plugin",cliCategory:"Config"},printWidth:{category:"Global",type:"int",default:80,description:"The line length where Prettier will try wrap.",range:{start:0,end:1/0,step:1}},rangeEnd:{category:"Special",type:"int",default:1/0,range:{start:0,end:1/0,step:1},description:`Format code ending at a given character offset (exclusive). The range will extend forwards to the end of the selected statement.`,cliCategory:"Editor"},rangeStart:{category:"Special",type:"int",default:0,range:{start:0,end:1/0,step:1},description:`Format code starting at a given character offset. The range will extend backwards to the start of the first line containing the selected statement.`,cliCategory:"Editor"},requirePragma:{category:"Special",type:"boolean",default:!1,description:`Require either '@prettier' or '@format' to be present in the file's first docblock comment -in order for it to be formatted.`,cliCategory:"Other"},tabWidth:{type:"int",category:"Global",default:2,description:"Number of spaces per indentation level.",range:{start:0,end:1/0,step:1}},useTabs:{category:"Global",type:"boolean",default:!1,description:"Indent with tabs instead of spaces."},embeddedLanguageFormatting:{category:"Global",type:"choice",default:"auto",description:"Control how Prettier formats quoted code embedded in the file.",choices:[{value:"auto",description:"Format embedded code if Prettier can automatically identify it."},{value:"off",description:"Never automatically format embedded code."}]}};function br({plugins:f=[],showDeprecated:b=!1}={}){let O=f.flatMap(x=>{var W;return(W=x.languages)!=null?W:[]}),L=[];for(let x of qr(Object.assign({},...f.map(({options:W})=>W),Qh)))!b&&x.deprecated||(Array.isArray(x.choices)&&(b||(x.choices=x.choices.filter(W=>!W.deprecated)),x.name==="parser"&&(x.choices=[...x.choices,...Y0(x.choices,O,f)])),x.pluginDefaults=Object.fromEntries(f.filter(W=>{var te;return((te=W.defaultOptions)==null?void 0:te[x.name])!==void 0}).map(W=>[W.name,W.defaultOptions[x.name]])),L.push(x));return{languages:O,options:L}}function*Y0(f,b,O){let L=new Set(f.map(x=>x.value));for(let x of b)if(x.parsers){for(let W of x.parsers)if(!L.has(W)){L.add(W);let te=O.find(de=>de.parsers&&Object.prototype.hasOwnProperty.call(de.parsers,W)),le=x.name;te!=null&&te.name&&(le+=` (plugin: ${te.name})`),yield{value:W,description:le}}}}function qr(f){let b=[];for(let[O,L]of Object.entries(f)){let x={name:O,...L};Array.isArray(x.default)&&(x.default=fn(!1,x.default,-1).value),b.push(x)}return b}var G0=f=>String(f).split(/[/\\]/).pop();function Ml(f,b){var L;if(!b)return;let O=G0(b).toLowerCase();return(L=f.find(({filenames:x})=>x==null?void 0:x.some(W=>W.toLowerCase()===O)))!=null?L:f.find(({extensions:x})=>x==null?void 0:x.some(W=>O.endsWith(W)))}function fs(f,b){var O,L;if(b)return(L=(O=f.find(({name:x})=>x.toLowerCase()===b))!=null?O:f.find(({aliases:x})=>x==null?void 0:x.includes(b)))!=null?L:f.find(({extensions:x})=>x==null?void 0:x.includes(`.${b}`))}function zu(f,b){var x,W,te;let O=f.plugins.flatMap(le=>{var de;return(de=le.languages)!=null?de:[]}),L=(te=(W=(x=fs(O,b.language))!=null?x:Ml(O,b.physicalFile))!=null?W:Ml(O,b.file))!=null?te:(b.physicalFile,void 0);return L==null?void 0:L.parsers[0]}var Ll=zu,Qt={key:f=>/^[$_a-zA-Z][$_a-zA-Z0-9]*$/.test(f)?f:JSON.stringify(f),value(f){if(f===null||typeof f!="object")return JSON.stringify(f);if(Array.isArray(f))return`[${f.map(O=>Qt.value(O)).join(", ")}]`;let b=Object.keys(f);return b.length===0?"{}":`{ ${b.map(O=>`${Qt.key(O)}: ${Qt.value(f[O])}`).join(", ")} }`},pair:({key:f,value:b})=>Qt.value({[f]:b})},Ui=E(y(),1),jl=(f,b,{descriptor:O})=>{let L=[`${Ui.default.yellow(typeof f=="string"?O.key(f):O.pair(f))} is deprecated`];return b&&L.push(`we now treat it as ${Ui.default.blue(typeof b=="string"?O.key(b):O.pair(b))}`),L.join("; ")+"."},Oo=E(y(),1),Yu=Symbol.for("vnopts.VALUE_NOT_EXIST"),Gu=Symbol.for("vnopts.VALUE_UNCHANGED"),Xh=" ".repeat(2),J0=(f,b,O)=>{let{text:L,list:x}=O.normalizeExpectedResult(O.schemas[f].expected(O)),W=[];return L&&W.push(xl(f,b,L,O.descriptor)),x&&W.push([xl(f,b,x.title,O.descriptor)].concat(x.values.map(te=>ka(te,O.loggerPrintWidth))).join(` -`)),Rs(W,O.loggerPrintWidth)};function xl(f,b,O,L){return[`Invalid ${Oo.default.red(L.key(f))} value.`,`Expected ${Oo.default.blue(O)},`,`but received ${b===Yu?Oo.default.gray("nothing"):Oo.default.red(L.value(b))}.`].join(" ")}function ka({text:f,list:b},O){let L=[];return f&&L.push(`- ${Oo.default.blue(f)}`),b&&L.push([`- ${Oo.default.blue(b.title)}:`].concat(b.values.map(x=>ka(x,O-Xh.length).replace(/^|\n/g,`$&${Xh}`))).join(` +in order for it to be formatted.`,cliCategory:"Other"},tabWidth:{type:"int",category:"Global",default:2,description:"Number of spaces per indentation level.",range:{start:0,end:1/0,step:1}},useTabs:{category:"Global",type:"boolean",default:!1,description:"Indent with tabs instead of spaces."},embeddedLanguageFormatting:{category:"Global",type:"choice",default:"auto",description:"Control how Prettier formats quoted code embedded in the file.",choices:[{value:"auto",description:"Format embedded code if Prettier can automatically identify it."},{value:"off",description:"Never automatically format embedded code."}]}};function br({plugins:f=[],showDeprecated:b=!1}={}){let O=f.flatMap(x=>{var W;return(W=x.languages)!=null?W:[]}),L=[];for(let x of qr(Object.assign({},...f.map(({options:W})=>W),Qh)))!b&&x.deprecated||(Array.isArray(x.choices)&&(b||(x.choices=x.choices.filter(W=>!W.deprecated)),x.name==="parser"&&(x.choices=[...x.choices,...Y0(x.choices,O,f)])),x.pluginDefaults=Object.fromEntries(f.filter(W=>{var te;return((te=W.defaultOptions)==null?void 0:te[x.name])!==void 0}).map(W=>[W.name,W.defaultOptions[x.name]])),L.push(x));return{languages:O,options:L}}function*Y0(f,b,O){let L=new Set(f.map(x=>x.value));for(let x of b)if(x.parsers){for(let W of x.parsers)if(!L.has(W)){L.add(W);let te=O.find(de=>de.parsers&&Object.prototype.hasOwnProperty.call(de.parsers,W)),le=x.name;te!=null&&te.name&&(le+=` (plugin: ${te.name})`),yield{value:W,description:le}}}}function qr(f){let b=[];for(let[O,L]of Object.entries(f)){let x={name:O,...L};Array.isArray(x.default)&&(x.default=fn(!1,x.default,-1).value),b.push(x)}return b}var G0=f=>String(f).split(/[/\\]/).pop();function Ll(f,b){var L;if(!b)return;let O=G0(b).toLowerCase();return(L=f.find(({filenames:x})=>x==null?void 0:x.some(W=>W.toLowerCase()===O)))!=null?L:f.find(({extensions:x})=>x==null?void 0:x.some(W=>O.endsWith(W)))}function fs(f,b){var O,L;if(b)return(L=(O=f.find(({name:x})=>x.toLowerCase()===b))!=null?O:f.find(({aliases:x})=>x==null?void 0:x.includes(b)))!=null?L:f.find(({extensions:x})=>x==null?void 0:x.includes(`.${b}`))}function zu(f,b){var x,W,te;let O=f.plugins.flatMap(le=>{var de;return(de=le.languages)!=null?de:[]}),L=(te=(W=(x=fs(O,b.language))!=null?x:Ll(O,b.physicalFile))!=null?W:Ll(O,b.file))!=null?te:(b.physicalFile,void 0);return L==null?void 0:L.parsers[0]}var jl=zu,Qt={key:f=>/^[$_a-zA-Z][$_a-zA-Z0-9]*$/.test(f)?f:JSON.stringify(f),value(f){if(f===null||typeof f!="object")return JSON.stringify(f);if(Array.isArray(f))return`[${f.map(O=>Qt.value(O)).join(", ")}]`;let b=Object.keys(f);return b.length===0?"{}":`{ ${b.map(O=>`${Qt.key(O)}: ${Qt.value(f[O])}`).join(", ")} }`},pair:({key:f,value:b})=>Qt.value({[f]:b})},Ui=E(y(),1),xl=(f,b,{descriptor:O})=>{let L=[`${Ui.default.yellow(typeof f=="string"?O.key(f):O.pair(f))} is deprecated`];return b&&L.push(`we now treat it as ${Ui.default.blue(typeof b=="string"?O.key(b):O.pair(b))}`),L.join("; ")+"."},Oo=E(y(),1),Yu=Symbol.for("vnopts.VALUE_NOT_EXIST"),Gu=Symbol.for("vnopts.VALUE_UNCHANGED"),Xh=" ".repeat(2),J0=(f,b,O)=>{let{text:L,list:x}=O.normalizeExpectedResult(O.schemas[f].expected(O)),W=[];return L&&W.push(Bl(f,b,L,O.descriptor)),x&&W.push([Bl(f,b,x.title,O.descriptor)].concat(x.values.map(te=>Ta(te,O.loggerPrintWidth))).join(` +`)),Rs(W,O.loggerPrintWidth)};function Bl(f,b,O,L){return[`Invalid ${Oo.default.red(L.key(f))} value.`,`Expected ${Oo.default.blue(O)},`,`but received ${b===Yu?Oo.default.gray("nothing"):Oo.default.red(L.value(b))}.`].join(" ")}function Ta({text:f,list:b},O){let L=[];return f&&L.push(`- ${Oo.default.blue(f)}`),b&&L.push([`- ${Oo.default.blue(b.title)}:`].concat(b.values.map(x=>Ta(x,O-Xh.length).replace(/^|\n/g,`$&${Xh}`))).join(` `)),Rs(L,O)}function Rs(f,b){if(f.length===1)return f[0];let[O,L]=f,[x,W]=f.map(te=>te.split(` -`,1)[0].length);return x>b&&x>W?L:O}var Zh=E(y(),1),Ju=[],Bl=[];function ql(f,b){if(f===b)return 0;let O=f;f.length>b.length&&(f=b,b=O);let L=f.length,x=b.length;for(;L>0&&f.charCodeAt(~-L)===b.charCodeAt(~-x);)L--,x--;let W=0;for(;Wle?we>le?le+1:we:we>de?de+1:we;return le}var Qu=(f,b,{descriptor:O,logger:L,schemas:x})=>{let W=[`Ignored unknown option ${Zh.default.yellow(O.pair({key:f,value:b}))}.`],te=Object.keys(x).sort().find(le=>ql(f,le)<3);te&&W.push(`Did you mean ${Zh.default.blue(O.key(te))}?`),L.warn(W.join(" "))},ep=["default","expected","validate","deprecated","forward","redirect","overlap","preprocess","postprocess"];function Q0(f,b){let O=new f(b),L=Object.create(O);for(let x of ep)x in b&&(L[x]=Wl(b[x],O,_i.prototype[x].length));return L}var _i=class{static create(f){return Q0(this,f)}constructor(f){this.name=f.name}default(f){}expected(f){return"nothing"}validate(f,b){return!1}deprecated(f,b){return!1}forward(f,b){}redirect(f,b){}overlap(f,b,O){return f}preprocess(f,b){return f}postprocess(f,b){return Gu}};function Wl(f,b,O){return typeof f=="function"?(...L)=>f(...L.slice(0,O-1),b,...L.slice(O-1)):()=>f}var X0=class extends _i{constructor(f){super(f),this._sourceName=f.sourceName}expected(f){return f.schemas[this._sourceName].expected(f)}validate(f,b){return b.schemas[this._sourceName].validate(f,b)}redirect(f,b){return this._sourceName}},tp=class extends _i{expected(){return"anything"}validate(){return!0}},kr=class extends _i{constructor({valueSchema:f,name:b=f.name,...O}){super({...O,name:b}),this._valueSchema=f}expected(f){let{text:b,list:O}=f.normalizeExpectedResult(this._valueSchema.expected(f));return{text:b&&`an array of ${b}`,list:O&&{title:"an array of the following values",values:[{list:O}]}}}validate(f,b){if(!Array.isArray(f))return!1;let O=[];for(let L of f){let x=b.normalizeValidateResult(this._valueSchema.validate(L,b),L);x!==!0&&O.push(x.value)}return O.length===0?!0:{value:O}}deprecated(f,b){let O=[];for(let L of f){let x=b.normalizeDeprecatedResult(this._valueSchema.deprecated(L,b),L);x!==!1&&O.push(...x.map(({value:W})=>({value:[W]})))}return O}forward(f,b){let O=[];for(let L of f){let x=b.normalizeForwardResult(this._valueSchema.forward(L,b),L);O.push(...x.map(Xu))}return O}redirect(f,b){let O=[],L=[];for(let x of f){let W=b.normalizeRedirectResult(this._valueSchema.redirect(x,b),x);"remain"in W&&O.push(W.remain),L.push(...W.redirect.map(Xu))}return O.length===0?{redirect:L}:{redirect:L,remain:O}}overlap(f,b){return f.concat(b)}};function Xu({from:f,to:b}){return{from:[f],to:b}}var Aa=class extends _i{expected(){return"true or false"}validate(f){return typeof f=="boolean"}};function np(f,b){let O=Object.create(null);for(let L of f){let x=L[b];if(O[x])throw new Error(`Duplicate ${b} ${JSON.stringify(x)}`);O[x]=L}return O}function rp(f,b){let O=new Map;for(let L of f){let x=L[b];if(O.has(x))throw new Error(`Duplicate ${b} ${JSON.stringify(x)}`);O.set(x,L)}return O}function Z0(){let f=Object.create(null);return b=>{let O=JSON.stringify(b);return f[O]?!0:(f[O]=!0,!1)}}function ev(f,b){let O=[],L=[];for(let x of f)b(x)?O.push(x):L.push(x);return[O,L]}function tv(f){return f===Math.floor(f)}function nv(f,b){if(f===b)return 0;let O=typeof f,L=typeof b,x=["undefined","object","boolean","number","string"];return O!==L?x.indexOf(O)-x.indexOf(L):O!=="string"?Number(f)-Number(b):f.localeCompare(b)}function rv(f){return(...b)=>{let O=f(...b);return typeof O=="string"?new Error(O):O}}function Is(f){return f===void 0?{}:f}function ip(f){if(typeof f=="string")return{text:f};let{text:b,list:O}=f;return iv((b||O)!==void 0,"Unexpected `expected` result, there should be at least one field."),O?{text:b,list:{title:O.title,values:O.values.map(ip)}}:{text:b}}function sp(f,b){return f===!0?!0:f===!1?{value:b}:f}function Zu(f,b,O=!1){return f===!1?!1:f===!0?O?!0:[{value:b}]:"value"in f?[f]:f.length===0?!1:f}function Ul(f,b){return typeof f=="string"||"key"in f?{from:b,to:f}:"from"in f?{from:f.from,to:f.to}:{from:b,to:f.to}}function $i(f,b){return f===void 0?[]:Array.isArray(f)?f.map(O=>Ul(O,b)):[Ul(f,b)]}function Ca(f,b){let O=$i(typeof f=="object"&&"redirect"in f?f.redirect:f,b);return O.length===0?{remain:b,redirect:O}:typeof f=="object"&&"remain"in f?{remain:f.remain,redirect:O}:{redirect:O}}function iv(f,b){if(!f)throw new Error(b)}var sv=class extends _i{constructor(f){super(f),this._choices=rp(f.choices.map(b=>b&&typeof b=="object"?b:{value:b}),"value")}expected({descriptor:f}){let b=Array.from(this._choices.keys()).map(x=>this._choices.get(x)).filter(({hidden:x})=>!x).map(x=>x.value).sort(nv).map(f.value),O=b.slice(0,-2),L=b.slice(-2);return{text:O.concat(L.join(" or ")).join(", "),list:{title:"one of the following values",values:b}}}validate(f){return this._choices.has(f)}deprecated(f){let b=this._choices.get(f);return b&&b.deprecated?{value:f}:!1}forward(f){let b=this._choices.get(f);return b?b.forward:void 0}redirect(f){let b=this._choices.get(f);return b?b.redirect:void 0}},ov=class extends _i{expected(){return"a number"}validate(f,b){return typeof f=="number"}},Po=class extends ov{expected(){return"an integer"}validate(f,b){return b.normalizeValidateResult(super.validate(f,b),f)===!0&&tv(f)}},Wr=class extends _i{expected(){return"a string"}validate(f){return typeof f=="string"}},op=Qt,av=Qu,uv=J0,cv=jl,lv=class{constructor(f,b){let{logger:O=console,loggerPrintWidth:L=80,descriptor:x=op,unknown:W=av,invalid:te=uv,deprecated:le=cv,missing:de=()=>!1,required:we=()=>!1,preprocess:be=Ee=>Ee,postprocess:Pe=()=>Gu}=b||{};this._utils={descriptor:x,logger:O||{warn:()=>{}},loggerPrintWidth:L,schemas:np(f,"name"),normalizeDefaultResult:Is,normalizeExpectedResult:ip,normalizeDeprecatedResult:Zu,normalizeForwardResult:$i,normalizeRedirectResult:Ca,normalizeValidateResult:sp},this._unknownHandler=W,this._invalidHandler=rv(te),this._deprecatedHandler=le,this._identifyMissing=(Ee,$e)=>!(Ee in $e)||de(Ee,$e),this._identifyRequired=we,this._preprocess=be,this._postprocess=Pe,this.cleanHistory()}cleanHistory(){this._hasDeprecationWarned=Z0()}normalize(f){let b={},O=[this._preprocess(f,this._utils)],L=()=>{for(;O.length!==0;){let x=O.shift(),W=this._applyNormalization(x,b);O.push(...W)}};L();for(let x of Object.keys(this._utils.schemas)){let W=this._utils.schemas[x];if(!(x in b)){let te=Is(W.default(this._utils));"value"in te&&O.push({[x]:te.value})}}L();for(let x of Object.keys(this._utils.schemas)){if(!(x in b))continue;let W=this._utils.schemas[x],te=b[x],le=W.postprocess(te,this._utils);le!==Gu&&(this._applyValidation(le,x,W),b[x]=le)}return this._applyPostprocess(b),this._applyRequiredCheck(b),b}_applyNormalization(f,b){let O=[],{knownKeys:L,unknownKeys:x}=this._partitionOptionKeys(f);for(let W of L){let te=this._utils.schemas[W],le=te.preprocess(f[W],this._utils);this._applyValidation(le,W,te);let de=({from:Pe,to:Ee})=>{O.push(typeof Ee=="string"?{[Ee]:Pe}:{[Ee.key]:Ee.value})},we=({value:Pe,redirectTo:Ee})=>{let $e=Zu(te.deprecated(Pe,this._utils),le,!0);if($e!==!1)if($e===!0)this._hasDeprecationWarned(W)||this._utils.logger.warn(this._deprecatedHandler(W,Ee,this._utils));else for(let{value:Ae}of $e){let Re={key:W,value:Ae};if(!this._hasDeprecationWarned(Re)){let We=typeof Ee=="string"?{key:Ee,value:Ae}:Ee;this._utils.logger.warn(this._deprecatedHandler(Re,We,this._utils))}}};$i(te.forward(le,this._utils),le).forEach(de);let be=Ca(te.redirect(le,this._utils),le);if(be.redirect.forEach(de),"remain"in be){let Pe=be.remain;b[W]=W in b?te.overlap(b[W],Pe,this._utils):Pe,we({value:Pe})}for(let{from:Pe,to:Ee}of be.redirect)we({value:Pe,redirectTo:Ee})}for(let W of x){let te=f[W];this._applyUnknownHandler(W,te,b,(le,de)=>{O.push({[le]:de})})}return O}_applyRequiredCheck(f){for(let b of Object.keys(this._utils.schemas))if(this._identifyMissing(b,f)&&this._identifyRequired(b))throw this._invalidHandler(b,Yu,this._utils)}_partitionOptionKeys(f){let[b,O]=ev(Object.keys(f).filter(L=>!this._identifyMissing(L,f)),L=>L in this._utils.schemas);return{knownKeys:b,unknownKeys:O}}_applyValidation(f,b,O){let L=sp(O.validate(f,this._utils),f);if(L!==!0)throw this._invalidHandler(b,L.value,this._utils)}_applyUnknownHandler(f,b,O,L){let x=this._unknownHandler(f,b,this._utils);if(x)for(let W of Object.keys(x)){if(this._identifyMissing(W,x))continue;let te=x[W];W in this._utils.schemas?L(W,te):O[W]=te}}_applyPostprocess(f){let b=this._postprocess(f,this._utils);if(b!==Gu){if(b.delete)for(let O of b.delete)delete f[O];if(b.override){let{knownKeys:O,unknownKeys:L}=this._partitionOptionKeys(b.override);for(let x of O){let W=b.override[x];this._applyValidation(W,x,this._utils.schemas[x]),f[x]=W}for(let x of L){let W=b.override[x];this._applyUnknownHandler(x,W,f,(te,le)=>{let de=this._utils.schemas[te];this._applyValidation(le,te,de),f[te]=le})}}}}},Vl;function No(f,b,{logger:O=!1,isCLI:L=!1,passThrough:x=!1,FlagSchema:W,descriptor:te}={}){if(L){if(!W)throw new Error("'FlagSchema' option is required.");if(!te)throw new Error("'descriptor' option is required.")}else te=Qt;let le=x?Array.isArray(x)?(Ee,$e)=>x.includes(Ee)?{[Ee]:$e}:void 0:(Ee,$e)=>({[Ee]:$e}):(Ee,$e,Ae)=>{let{_:Re,...We}=Ae.schemas;return Qu(Ee,$e,{...Ae,schemas:We})},de=he(b,{isCLI:L,FlagSchema:W}),we=new lv(de,{logger:O,unknown:le,descriptor:te}),be=O!==!1;be&&Vl&&(we._hasDeprecationWarned=Vl);let Pe=we.normalize(f);return be&&(Vl=we._hasDeprecationWarned),Pe}function he(f,{isCLI:b,FlagSchema:O}){let L=[];b&&L.push(tp.create({name:"_"}));for(let x of f)L.push(Te(x,{isCLI:b,optionInfos:f,FlagSchema:O})),x.alias&&b&&L.push(X0.create({name:x.alias,sourceName:x.name}));return L}function Te(f,{isCLI:b,optionInfos:O,FlagSchema:L}){let{name:x}=f,W={name:x},te,le={};switch(f.type){case"int":te=Po,b&&(W.preprocess=Number);break;case"string":te=Wr;break;case"choice":te=sv,W.choices=f.choices.map(de=>de!=null&&de.redirect?{...de,redirect:{to:{key:f.name,value:de.redirect}}}:de);break;case"boolean":te=Aa;break;case"flag":te=L,W.flags=O.flatMap(de=>[de.alias,de.description&&de.name,de.oppositeDescription&&`no-${de.name}`].filter(Boolean));break;case"path":te=Wr;break;default:throw new Error(`Unexpected type ${f.type}`)}if(f.exception?W.validate=(de,we,be)=>f.exception(de)||we.validate(de,be):W.validate=(de,we,be)=>de===void 0||we.validate(de,be),f.redirect&&(le.redirect=de=>de?{to:{key:f.redirect.option,value:f.redirect.value}}:void 0),f.deprecated&&(le.deprecated=!0),b&&!f.array){let de=W.preprocess||(we=>we);W.preprocess=(we,be,Pe)=>be.preprocess(de(Array.isArray(we)?fn(!1,we,-1):we),Pe)}return f.array?kr.create({...b?{preprocess:de=>Array.isArray(de)?de:[de]}:{},...le,valueSchema:te.create(W)}):te.create({...W,...le})}var _e=No,Ke=(f,b,O)=>{if(!(f&&b==null)){if(b.findLast)return b.findLast(O);for(let L=b.length-1;L>=0;L--){let x=b[L];if(O(x,L,b))return x}}},lt=Ke;function Ut(f,b){if(!b)throw new Error("parserName is required.");let O=lt(!1,f,x=>x.parsers&&Object.prototype.hasOwnProperty.call(x.parsers,b));if(O)return O;let L=`Couldn't resolve parser "${b}".`;throw L+=" Plugins must be explicitly added to the standalone bundle.",new Rl(L)}function zn(f,b){if(!b)throw new Error("astFormat is required.");let O=lt(!1,f,x=>x.printers&&Object.prototype.hasOwnProperty.call(x.printers,b));if(O)return O;let L=`Couldn't find plugin for AST format "${b}".`;throw L+=" Plugins must be explicitly added to the standalone bundle.",new Rl(L)}function rn({plugins:f,parser:b}){let O=Ut(f,b);return ec(O,b)}function ec(f,b){let O=f.parsers[b];return typeof O=="function"?O():O}function fv(f,b){let O=f.printers[b];return typeof O=="function"?O():O}var Ar={astFormat:"estree",printer:{},originalText:void 0,locStart:null,locEnd:null};async function tc(f,b={}){var O;let L={...f};if(!L.parser)if(L.filepath){if(L.parser=Ll(L,{physicalFile:L.filepath}),!L.parser)throw new Il(`No parser could be inferred for file "${L.filepath}".`)}else throw new Il("No parser and no file path given, couldn't infer a parser.");let x=br({plugins:f.plugins,showDeprecated:!0}).options,W={...Ar,...Object.fromEntries(x.filter(Ee=>Ee.default!==void 0).map(Ee=>[Ee.name,Ee.default]))},te=Ut(L.plugins,L.parser),le=await ec(te,L.parser);L.astFormat=le.astFormat,L.locEnd=le.locEnd,L.locStart=le.locStart;let de=(O=te.printers)!=null&&O[le.astFormat]?te:zn(L.plugins,le.astFormat),we=await fv(de,le.astFormat);L.printer=we;let be=de.defaultOptions?Object.fromEntries(Object.entries(de.defaultOptions).filter(([,Ee])=>Ee!==void 0)):{},Pe={...W,...be};for(let[Ee,$e]of Object.entries(Pe))(L[Ee]===null||L[Ee]===void 0)&&(L[Ee]=$e);return L.parser==="json"&&(L.trailingComma="none"),_e(L,x,{passThrough:Object.keys(Ar),...b})}var Fo=tc,Ro=E(q(),1);async function nc(f,b){let O=await rn(b),L=O.preprocess?O.preprocess(f,b):f;b.originalText=L;let x;try{x=await O.parse(L,b,b)}catch(W){rc(W,f)}return{text:L,ast:x}}function rc(f,b){let{loc:O}=f;if(O){let L=(0,Ro.codeFrameColumns)(b,O,{highlightCode:!0});throw f.message+=` -`+L,f.codeFrame=L,f}throw f}var jt=nc;async function dv(f,b,O,L,x){var Ae;let{embeddedLanguageFormatting:W,printer:{embed:te,hasPrettierIgnore:le=()=>!1,getVisitorKeys:de}}=O;if(!te||W!=="auto")return;if(te.length>2)throw new Error("printer.embed has too many parameters. The API changed in Prettier v3. Please update your plugin. See https://prettier.io/docs/en/plugins.html#optional-embed");let we=Ku((Ae=te.getVisitorKeys)!=null?Ae:de),be=[];$e();let Pe=f.stack;for(let{print:Re,node:We,pathStack:pt}of be)try{f.stack=pt;let et=await Re(Ee,b,f,O);et&&x.set(We,et)}catch(et){if(globalThis.PRETTIER_DEBUG)throw et}f.stack=Pe;function Ee(Re,We){return ap(Re,We,O,L)}function $e(){let{node:Re}=f;if(Re===null||typeof Re!="object"||le(f))return;for(let pt of we(Re))Array.isArray(Re[pt])?f.each($e,pt):f.call($e,pt);let We=te(f,O);if(We){if(typeof We=="function"){be.push({print:We,node:Re,pathStack:[...f.stack]});return}x.set(Re,We)}}}async function ap(f,b,O,L){let x=await Fo({...O,...b,parentParser:O.parser,originalText:f},{passThrough:!0}),{ast:W}=await jt(f,x),te=await L(W,x);return mn(te)}function ic(f,b){let{originalText:O,[Symbol.for("comments")]:L,locStart:x,locEnd:W,[Symbol.for("printedComments")]:te}=b,{node:le}=f,de=x(le),we=W(le);for(let be of L)x(be)>=de&&W(be)<=we&&te.add(be);return O.slice(de,we)}var hv=ic;async function sc(f,b){({ast:f}=await Oa(f,b));let O=new Map,L=new x0(f),x=new Map;await dv(L,te,b,sc,x);let W=await up(L,b,te,void 0,x);return Jh(b),W;function te(de,we){return de===void 0||de===L?le(we):Array.isArray(de)?L.call(()=>le(we),...de):L.call(()=>le(we),de)}function le(de){let we=L.node;if(we==null)return"";let be=we&&typeof we=="object"&&de===void 0;if(be&&O.has(we))return O.get(we);let Pe=up(L,b,te,de,x);return be&&O.set(we,Pe),Pe}}function up(f,b,O,L,x){var W;let{node:te}=f,{printer:le}=b,de;return(W=le.hasPrettierIgnore)!=null&&W.call(le,f)?de=hv(f,b):x.has(te)?de=x.get(te):de=le.print(f,b,O,L),te===b.cursorNode&&(de=bl(de,we=>[ht,we,ht])),le.printComment&&(!le.willPrintOwnComments||!le.willPrintOwnComments(f,b))&&(de=Gh(f,de,b)),de}async function Oa(f,b){var x,W;let O=(x=f.comments)!=null?x:[];b[Symbol.for("comments")]=O,b[Symbol.for("tokens")]=(W=f.tokens)!=null?W:[],b[Symbol.for("printedComments")]=new Set,K0(f,b);let{printer:{preprocess:L}}=b;return f=L?await L(f,b):f,{ast:f,comments:O}}function ds(f,b){let{cursorOffset:O,locStart:L,locEnd:x}=b,W=Ku(b.printer.getVisitorKeys),te=de=>L(de)<=O&&x(de)>=O,le=f;for(let de of qh(f,{getVisitorKeys:W,filter:te}))le=de;return le}var oc=ds;function cp(f,b){var le;let{printer:{massageAstNode:O,getVisitorKeys:L}}=b;if(!O)return f;let x=Ku(L),W=(le=O.ignoredProperties)!=null?le:new Set;return te(f);function te(de,we){if(!(de!==null&&typeof de=="object"))return de;if(Array.isArray(de))return de.map($e=>te($e,we)).filter(Boolean);let be={},Pe=new Set(x(de));for(let $e in de)!Object.prototype.hasOwnProperty.call(de,$e)||W.has($e)||(Pe.has($e)?be[$e]=te(de[$e],de):be[$e]=de[$e]);let Ee=O(de,be,we);if(Ee!==null)return Ee!=null?Ee:be}}var ac=cp,lp=({parser:f})=>f==="json"||f==="json5"||f==="jsonc"||f==="json-stringify";function fp(f,b){let O=[f.node,...f.parentNodes],L=new Set([b.node,...b.parentNodes]);return O.find(x=>Na.has(x.type)&&L.has(x))}function Pa(f){let b=f.length-1;for(;;){let O=f[b];if((O==null?void 0:O.type)==="Program"||(O==null?void 0:O.type)==="File")b--;else break}return f.slice(0,b+1)}function dp(f,b,{locStart:O,locEnd:L}){let x=f.node,W=b.node;if(x===W)return{startNode:x,endNode:W};let te=O(f.node);for(let de of Pa(b.parentNodes))if(O(de)>=te)W=de;else break;let le=L(b.node);for(let de of Pa(f.parentNodes)){if(L(de)<=le)x=de;else break;if(x===W)break}return{startNode:x,endNode:W}}function Ms(f,b,O,L,x=[],W){let{locStart:te,locEnd:le}=O,de=te(f),we=le(f);if(!(b>we||bL);let le=f.slice(L,x).search(/\S/),de=le===-1;if(!de)for(L+=le;x>L&&!/\S/.test(f[x-1]);--x);let we=Ms(O,L,b,($e,Ae)=>hp(b,$e,Ae),[],"rangeStart"),be=de?we:Ms(O,x,b,$e=>hp(b,$e),[],"rangeEnd");if(!we||!be)return{rangeStart:0,rangeEnd:0};let Pe,Ee;if(lp(b)){let $e=fp(we,be);Pe=$e,Ee=$e}else({startNode:Pe,endNode:Ee}=dp(we,be,b));return{rangeStart:Math.min(W(Pe),W(Ee)),rangeEnd:Math.max(te(Pe),te(Ee))}}var Fa="\uFEFF",Ra=Symbol("cursor");async function uc(f,b,O=0){if(!f||f.trim().length===0)return{formatted:"",cursorOffset:-1,comments:[]};let{ast:L,text:x}=await jt(f,b);b.cursorOffset>=0&&(b.cursorNode=oc(L,b));let W=await sc(L,b);O>0&&(W=wt([gt,W],O,b.tabWidth));let te=Hu(W,b);if(O>0){let de=te.formatted.trim();te.cursorNodeStart!==void 0&&(te.cursorNodeStart-=te.formatted.indexOf(de)),te.formatted=de+ne(b.endOfLine)}let le=b[Symbol.for("comments")];if(b.cursorOffset>=0){let de,we,be,Pe,Ee;if(b.cursorNode&&te.cursorNodeText?(de=b.locStart(b.cursorNode),we=x.slice(de,b.locEnd(b.cursorNode)),be=b.cursorOffset-de,Pe=te.cursorNodeStart,Ee=te.cursorNodeText):(de=0,we=x,be=b.cursorOffset,Pe=0,Ee=te.formatted),we===Ee)return{formatted:te.formatted,cursorOffset:Pe+be,comments:le};let $e=we.split("");$e.splice(be,0,Ra);let Ae=Ee.split(""),Re=(0,Y.diffArrays)($e,Ae),We=Pe;for(let pt of Re)if(pt.removed){if(pt.value.includes(Ra))break}else We+=pt.count;return{formatted:te.formatted,cursorOffset:We,comments:le}}return{formatted:te.formatted,cursorOffset:-1,comments:le}}async function gv(f,b){let{ast:O,text:L}=await jt(f,b),{rangeStart:x,rangeEnd:W}=mv(L,b,O),te=L.slice(x,W),le=Math.min(x,L.lastIndexOf(` -`,x)+1),de=L.slice(le,x).match(/^\s*/)[0],we=To(de,b.tabWidth),be=await uc(te,{...b,rangeStart:0,rangeEnd:Number.POSITIVE_INFINITY,cursorOffset:b.cursorOffset>x&&b.cursorOffset<=W?b.cursorOffset-x:-1,endOfLine:"lf"},we),Pe=be.formatted.trimEnd(),{cursorOffset:Ee}=b;Ee>W?Ee+=Pe.length-te.length:be.cursorOffset>=0&&(Ee=be.cursorOffset+x);let $e=L.slice(0,x)+Pe+L.slice(W);if(b.endOfLine!=="lf"){let Ae=ne(b.endOfLine);Ee>=0&&Ae===`\r +`,1)[0].length);return x>b&&x>W?L:O}var Zh=E(y(),1),Ju=[],ql=[];function Wl(f,b){if(f===b)return 0;let O=f;f.length>b.length&&(f=b,b=O);let L=f.length,x=b.length;for(;L>0&&f.charCodeAt(~-L)===b.charCodeAt(~-x);)L--,x--;let W=0;for(;Wle?we>le?le+1:we:we>de?de+1:we;return le}var Qu=(f,b,{descriptor:O,logger:L,schemas:x})=>{let W=[`Ignored unknown option ${Zh.default.yellow(O.pair({key:f,value:b}))}.`],te=Object.keys(x).sort().find(le=>Wl(f,le)<3);te&&W.push(`Did you mean ${Zh.default.blue(O.key(te))}?`),L.warn(W.join(" "))},ep=["default","expected","validate","deprecated","forward","redirect","overlap","preprocess","postprocess"];function Q0(f,b){let O=new f(b),L=Object.create(O);for(let x of ep)x in b&&(L[x]=Ul(b[x],O,_i.prototype[x].length));return L}var _i=class{static create(f){return Q0(this,f)}constructor(f){this.name=f.name}default(f){}expected(f){return"nothing"}validate(f,b){return!1}deprecated(f,b){return!1}forward(f,b){}redirect(f,b){}overlap(f,b,O){return f}preprocess(f,b){return f}postprocess(f,b){return Gu}};function Ul(f,b,O){return typeof f=="function"?(...L)=>f(...L.slice(0,O-1),b,...L.slice(O-1)):()=>f}var X0=class extends _i{constructor(f){super(f),this._sourceName=f.sourceName}expected(f){return f.schemas[this._sourceName].expected(f)}validate(f,b){return b.schemas[this._sourceName].validate(f,b)}redirect(f,b){return this._sourceName}},tp=class extends _i{expected(){return"anything"}validate(){return!0}},Tr=class extends _i{constructor({valueSchema:f,name:b=f.name,...O}){super({...O,name:b}),this._valueSchema=f}expected(f){let{text:b,list:O}=f.normalizeExpectedResult(this._valueSchema.expected(f));return{text:b&&`an array of ${b}`,list:O&&{title:"an array of the following values",values:[{list:O}]}}}validate(f,b){if(!Array.isArray(f))return!1;let O=[];for(let L of f){let x=b.normalizeValidateResult(this._valueSchema.validate(L,b),L);x!==!0&&O.push(x.value)}return O.length===0?!0:{value:O}}deprecated(f,b){let O=[];for(let L of f){let x=b.normalizeDeprecatedResult(this._valueSchema.deprecated(L,b),L);x!==!1&&O.push(...x.map(({value:W})=>({value:[W]})))}return O}forward(f,b){let O=[];for(let L of f){let x=b.normalizeForwardResult(this._valueSchema.forward(L,b),L);O.push(...x.map(Xu))}return O}redirect(f,b){let O=[],L=[];for(let x of f){let W=b.normalizeRedirectResult(this._valueSchema.redirect(x,b),x);"remain"in W&&O.push(W.remain),L.push(...W.redirect.map(Xu))}return O.length===0?{redirect:L}:{redirect:L,remain:O}}overlap(f,b){return f.concat(b)}};function Xu({from:f,to:b}){return{from:[f],to:b}}var Aa=class extends _i{expected(){return"true or false"}validate(f){return typeof f=="boolean"}};function np(f,b){let O=Object.create(null);for(let L of f){let x=L[b];if(O[x])throw new Error(`Duplicate ${b} ${JSON.stringify(x)}`);O[x]=L}return O}function rp(f,b){let O=new Map;for(let L of f){let x=L[b];if(O.has(x))throw new Error(`Duplicate ${b} ${JSON.stringify(x)}`);O.set(x,L)}return O}function Z0(){let f=Object.create(null);return b=>{let O=JSON.stringify(b);return f[O]?!0:(f[O]=!0,!1)}}function ev(f,b){let O=[],L=[];for(let x of f)b(x)?O.push(x):L.push(x);return[O,L]}function tv(f){return f===Math.floor(f)}function nv(f,b){if(f===b)return 0;let O=typeof f,L=typeof b,x=["undefined","object","boolean","number","string"];return O!==L?x.indexOf(O)-x.indexOf(L):O!=="string"?Number(f)-Number(b):f.localeCompare(b)}function rv(f){return(...b)=>{let O=f(...b);return typeof O=="string"?new Error(O):O}}function Is(f){return f===void 0?{}:f}function ip(f){if(typeof f=="string")return{text:f};let{text:b,list:O}=f;return iv((b||O)!==void 0,"Unexpected `expected` result, there should be at least one field."),O?{text:b,list:{title:O.title,values:O.values.map(ip)}}:{text:b}}function sp(f,b){return f===!0?!0:f===!1?{value:b}:f}function Zu(f,b,O=!1){return f===!1?!1:f===!0?O?!0:[{value:b}]:"value"in f?[f]:f.length===0?!1:f}function Vl(f,b){return typeof f=="string"||"key"in f?{from:b,to:f}:"from"in f?{from:f.from,to:f.to}:{from:b,to:f.to}}function $i(f,b){return f===void 0?[]:Array.isArray(f)?f.map(O=>Vl(O,b)):[Vl(f,b)]}function Ca(f,b){let O=$i(typeof f=="object"&&"redirect"in f?f.redirect:f,b);return O.length===0?{remain:b,redirect:O}:typeof f=="object"&&"remain"in f?{remain:f.remain,redirect:O}:{redirect:O}}function iv(f,b){if(!f)throw new Error(b)}var sv=class extends _i{constructor(f){super(f),this._choices=rp(f.choices.map(b=>b&&typeof b=="object"?b:{value:b}),"value")}expected({descriptor:f}){let b=Array.from(this._choices.keys()).map(x=>this._choices.get(x)).filter(({hidden:x})=>!x).map(x=>x.value).sort(nv).map(f.value),O=b.slice(0,-2),L=b.slice(-2);return{text:O.concat(L.join(" or ")).join(", "),list:{title:"one of the following values",values:b}}}validate(f){return this._choices.has(f)}deprecated(f){let b=this._choices.get(f);return b&&b.deprecated?{value:f}:!1}forward(f){let b=this._choices.get(f);return b?b.forward:void 0}redirect(f){let b=this._choices.get(f);return b?b.redirect:void 0}},ov=class extends _i{expected(){return"a number"}validate(f,b){return typeof f=="number"}},Po=class extends ov{expected(){return"an integer"}validate(f,b){return b.normalizeValidateResult(super.validate(f,b),f)===!0&&tv(f)}},Wr=class extends _i{expected(){return"a string"}validate(f){return typeof f=="string"}},op=Qt,av=Qu,uv=J0,cv=xl,lv=class{constructor(f,b){let{logger:O=console,loggerPrintWidth:L=80,descriptor:x=op,unknown:W=av,invalid:te=uv,deprecated:le=cv,missing:de=()=>!1,required:we=()=>!1,preprocess:be=Ee=>Ee,postprocess:Pe=()=>Gu}=b||{};this._utils={descriptor:x,logger:O||{warn:()=>{}},loggerPrintWidth:L,schemas:np(f,"name"),normalizeDefaultResult:Is,normalizeExpectedResult:ip,normalizeDeprecatedResult:Zu,normalizeForwardResult:$i,normalizeRedirectResult:Ca,normalizeValidateResult:sp},this._unknownHandler=W,this._invalidHandler=rv(te),this._deprecatedHandler=le,this._identifyMissing=(Ee,$e)=>!(Ee in $e)||de(Ee,$e),this._identifyRequired=we,this._preprocess=be,this._postprocess=Pe,this.cleanHistory()}cleanHistory(){this._hasDeprecationWarned=Z0()}normalize(f){let b={},O=[this._preprocess(f,this._utils)],L=()=>{for(;O.length!==0;){let x=O.shift(),W=this._applyNormalization(x,b);O.push(...W)}};L();for(let x of Object.keys(this._utils.schemas)){let W=this._utils.schemas[x];if(!(x in b)){let te=Is(W.default(this._utils));"value"in te&&O.push({[x]:te.value})}}L();for(let x of Object.keys(this._utils.schemas)){if(!(x in b))continue;let W=this._utils.schemas[x],te=b[x],le=W.postprocess(te,this._utils);le!==Gu&&(this._applyValidation(le,x,W),b[x]=le)}return this._applyPostprocess(b),this._applyRequiredCheck(b),b}_applyNormalization(f,b){let O=[],{knownKeys:L,unknownKeys:x}=this._partitionOptionKeys(f);for(let W of L){let te=this._utils.schemas[W],le=te.preprocess(f[W],this._utils);this._applyValidation(le,W,te);let de=({from:Pe,to:Ee})=>{O.push(typeof Ee=="string"?{[Ee]:Pe}:{[Ee.key]:Ee.value})},we=({value:Pe,redirectTo:Ee})=>{let $e=Zu(te.deprecated(Pe,this._utils),le,!0);if($e!==!1)if($e===!0)this._hasDeprecationWarned(W)||this._utils.logger.warn(this._deprecatedHandler(W,Ee,this._utils));else for(let{value:Ae}of $e){let Re={key:W,value:Ae};if(!this._hasDeprecationWarned(Re)){let We=typeof Ee=="string"?{key:Ee,value:Ae}:Ee;this._utils.logger.warn(this._deprecatedHandler(Re,We,this._utils))}}};$i(te.forward(le,this._utils),le).forEach(de);let be=Ca(te.redirect(le,this._utils),le);if(be.redirect.forEach(de),"remain"in be){let Pe=be.remain;b[W]=W in b?te.overlap(b[W],Pe,this._utils):Pe,we({value:Pe})}for(let{from:Pe,to:Ee}of be.redirect)we({value:Pe,redirectTo:Ee})}for(let W of x){let te=f[W];this._applyUnknownHandler(W,te,b,(le,de)=>{O.push({[le]:de})})}return O}_applyRequiredCheck(f){for(let b of Object.keys(this._utils.schemas))if(this._identifyMissing(b,f)&&this._identifyRequired(b))throw this._invalidHandler(b,Yu,this._utils)}_partitionOptionKeys(f){let[b,O]=ev(Object.keys(f).filter(L=>!this._identifyMissing(L,f)),L=>L in this._utils.schemas);return{knownKeys:b,unknownKeys:O}}_applyValidation(f,b,O){let L=sp(O.validate(f,this._utils),f);if(L!==!0)throw this._invalidHandler(b,L.value,this._utils)}_applyUnknownHandler(f,b,O,L){let x=this._unknownHandler(f,b,this._utils);if(x)for(let W of Object.keys(x)){if(this._identifyMissing(W,x))continue;let te=x[W];W in this._utils.schemas?L(W,te):O[W]=te}}_applyPostprocess(f){let b=this._postprocess(f,this._utils);if(b!==Gu){if(b.delete)for(let O of b.delete)delete f[O];if(b.override){let{knownKeys:O,unknownKeys:L}=this._partitionOptionKeys(b.override);for(let x of O){let W=b.override[x];this._applyValidation(W,x,this._utils.schemas[x]),f[x]=W}for(let x of L){let W=b.override[x];this._applyUnknownHandler(x,W,f,(te,le)=>{let de=this._utils.schemas[te];this._applyValidation(le,te,de),f[te]=le})}}}}},Hl;function No(f,b,{logger:O=!1,isCLI:L=!1,passThrough:x=!1,FlagSchema:W,descriptor:te}={}){if(L){if(!W)throw new Error("'FlagSchema' option is required.");if(!te)throw new Error("'descriptor' option is required.")}else te=Qt;let le=x?Array.isArray(x)?(Ee,$e)=>x.includes(Ee)?{[Ee]:$e}:void 0:(Ee,$e)=>({[Ee]:$e}):(Ee,$e,Ae)=>{let{_:Re,...We}=Ae.schemas;return Qu(Ee,$e,{...Ae,schemas:We})},de=he(b,{isCLI:L,FlagSchema:W}),we=new lv(de,{logger:O,unknown:le,descriptor:te}),be=O!==!1;be&&Hl&&(we._hasDeprecationWarned=Hl);let Pe=we.normalize(f);return be&&(Hl=we._hasDeprecationWarned),Pe}function he(f,{isCLI:b,FlagSchema:O}){let L=[];b&&L.push(tp.create({name:"_"}));for(let x of f)L.push(ke(x,{isCLI:b,optionInfos:f,FlagSchema:O})),x.alias&&b&&L.push(X0.create({name:x.alias,sourceName:x.name}));return L}function ke(f,{isCLI:b,optionInfos:O,FlagSchema:L}){let{name:x}=f,W={name:x},te,le={};switch(f.type){case"int":te=Po,b&&(W.preprocess=Number);break;case"string":te=Wr;break;case"choice":te=sv,W.choices=f.choices.map(de=>de!=null&&de.redirect?{...de,redirect:{to:{key:f.name,value:de.redirect}}}:de);break;case"boolean":te=Aa;break;case"flag":te=L,W.flags=O.flatMap(de=>[de.alias,de.description&&de.name,de.oppositeDescription&&`no-${de.name}`].filter(Boolean));break;case"path":te=Wr;break;default:throw new Error(`Unexpected type ${f.type}`)}if(f.exception?W.validate=(de,we,be)=>f.exception(de)||we.validate(de,be):W.validate=(de,we,be)=>de===void 0||we.validate(de,be),f.redirect&&(le.redirect=de=>de?{to:{key:f.redirect.option,value:f.redirect.value}}:void 0),f.deprecated&&(le.deprecated=!0),b&&!f.array){let de=W.preprocess||(we=>we);W.preprocess=(we,be,Pe)=>be.preprocess(de(Array.isArray(we)?fn(!1,we,-1):we),Pe)}return f.array?Tr.create({...b?{preprocess:de=>Array.isArray(de)?de:[de]}:{},...le,valueSchema:te.create(W)}):te.create({...W,...le})}var _e=No,Ke=(f,b,O)=>{if(!(f&&b==null)){if(b.findLast)return b.findLast(O);for(let L=b.length-1;L>=0;L--){let x=b[L];if(O(x,L,b))return x}}},lt=Ke;function Ut(f,b){if(!b)throw new Error("parserName is required.");let O=lt(!1,f,x=>x.parsers&&Object.prototype.hasOwnProperty.call(x.parsers,b));if(O)return O;let L=`Couldn't resolve parser "${b}".`;throw L+=" Plugins must be explicitly added to the standalone bundle.",new Il(L)}function zn(f,b){if(!b)throw new Error("astFormat is required.");let O=lt(!1,f,x=>x.printers&&Object.prototype.hasOwnProperty.call(x.printers,b));if(O)return O;let L=`Couldn't find plugin for AST format "${b}".`;throw L+=" Plugins must be explicitly added to the standalone bundle.",new Il(L)}function rn({plugins:f,parser:b}){let O=Ut(f,b);return ec(O,b)}function ec(f,b){let O=f.parsers[b];return typeof O=="function"?O():O}function fv(f,b){let O=f.printers[b];return typeof O=="function"?O():O}var Ar={astFormat:"estree",printer:{},originalText:void 0,locStart:null,locEnd:null};async function tc(f,b={}){var O;let L={...f};if(!L.parser)if(L.filepath){if(L.parser=jl(L,{physicalFile:L.filepath}),!L.parser)throw new Ml(`No parser could be inferred for file "${L.filepath}".`)}else throw new Ml("No parser and no file path given, couldn't infer a parser.");let x=br({plugins:f.plugins,showDeprecated:!0}).options,W={...Ar,...Object.fromEntries(x.filter(Ee=>Ee.default!==void 0).map(Ee=>[Ee.name,Ee.default]))},te=Ut(L.plugins,L.parser),le=await ec(te,L.parser);L.astFormat=le.astFormat,L.locEnd=le.locEnd,L.locStart=le.locStart;let de=(O=te.printers)!=null&&O[le.astFormat]?te:zn(L.plugins,le.astFormat),we=await fv(de,le.astFormat);L.printer=we;let be=de.defaultOptions?Object.fromEntries(Object.entries(de.defaultOptions).filter(([,Ee])=>Ee!==void 0)):{},Pe={...W,...be};for(let[Ee,$e]of Object.entries(Pe))(L[Ee]===null||L[Ee]===void 0)&&(L[Ee]=$e);return L.parser==="json"&&(L.trailingComma="none"),_e(L,x,{passThrough:Object.keys(Ar),...b})}var Fo=tc,Ro=E(q(),1);async function nc(f,b){let O=await rn(b),L=O.preprocess?O.preprocess(f,b):f;b.originalText=L;let x;try{x=await O.parse(L,b,b)}catch(W){rc(W,f)}return{text:L,ast:x}}function rc(f,b){let{loc:O}=f;if(O){let L=(0,Ro.codeFrameColumns)(b,O,{highlightCode:!0});throw f.message+=` +`+L,f.codeFrame=L,f}throw f}var jt=nc;async function dv(f,b,O,L,x){var Ae;let{embeddedLanguageFormatting:W,printer:{embed:te,hasPrettierIgnore:le=()=>!1,getVisitorKeys:de}}=O;if(!te||W!=="auto")return;if(te.length>2)throw new Error("printer.embed has too many parameters. The API changed in Prettier v3. Please update your plugin. See https://prettier.io/docs/en/plugins.html#optional-embed");let we=Ku((Ae=te.getVisitorKeys)!=null?Ae:de),be=[];$e();let Pe=f.stack;for(let{print:Re,node:We,pathStack:pt}of be)try{f.stack=pt;let et=await Re(Ee,b,f,O);et&&x.set(We,et)}catch(et){if(globalThis.PRETTIER_DEBUG)throw et}f.stack=Pe;function Ee(Re,We){return ap(Re,We,O,L)}function $e(){let{node:Re}=f;if(Re===null||typeof Re!="object"||le(f))return;for(let pt of we(Re))Array.isArray(Re[pt])?f.each($e,pt):f.call($e,pt);let We=te(f,O);if(We){if(typeof We=="function"){be.push({print:We,node:Re,pathStack:[...f.stack]});return}x.set(Re,We)}}}async function ap(f,b,O,L){let x=await Fo({...O,...b,parentParser:O.parser,originalText:f},{passThrough:!0}),{ast:W}=await jt(f,x),te=await L(W,x);return mn(te)}function ic(f,b){let{originalText:O,[Symbol.for("comments")]:L,locStart:x,locEnd:W,[Symbol.for("printedComments")]:te}=b,{node:le}=f,de=x(le),we=W(le);for(let be of L)x(be)>=de&&W(be)<=we&&te.add(be);return O.slice(de,we)}var hv=ic;async function sc(f,b){({ast:f}=await Oa(f,b));let O=new Map,L=new x0(f),x=new Map;await dv(L,te,b,sc,x);let W=await up(L,b,te,void 0,x);return Jh(b),W;function te(de,we){return de===void 0||de===L?le(we):Array.isArray(de)?L.call(()=>le(we),...de):L.call(()=>le(we),de)}function le(de){let we=L.node;if(we==null)return"";let be=we&&typeof we=="object"&&de===void 0;if(be&&O.has(we))return O.get(we);let Pe=up(L,b,te,de,x);return be&&O.set(we,Pe),Pe}}function up(f,b,O,L,x){var W;let{node:te}=f,{printer:le}=b,de;return(W=le.hasPrettierIgnore)!=null&&W.call(le,f)?de=hv(f,b):x.has(te)?de=x.get(te):de=le.print(f,b,O,L),te===b.cursorNode&&(de=Dl(de,we=>[ht,we,ht])),le.printComment&&(!le.willPrintOwnComments||!le.willPrintOwnComments(f,b))&&(de=Gh(f,de,b)),de}async function Oa(f,b){var x,W;let O=(x=f.comments)!=null?x:[];b[Symbol.for("comments")]=O,b[Symbol.for("tokens")]=(W=f.tokens)!=null?W:[],b[Symbol.for("printedComments")]=new Set,K0(f,b);let{printer:{preprocess:L}}=b;return f=L?await L(f,b):f,{ast:f,comments:O}}function ds(f,b){let{cursorOffset:O,locStart:L,locEnd:x}=b,W=Ku(b.printer.getVisitorKeys),te=de=>L(de)<=O&&x(de)>=O,le=f;for(let de of qh(f,{getVisitorKeys:W,filter:te}))le=de;return le}var oc=ds;function cp(f,b){var le;let{printer:{massageAstNode:O,getVisitorKeys:L}}=b;if(!O)return f;let x=Ku(L),W=(le=O.ignoredProperties)!=null?le:new Set;return te(f);function te(de,we){if(!(de!==null&&typeof de=="object"))return de;if(Array.isArray(de))return de.map($e=>te($e,we)).filter(Boolean);let be={},Pe=new Set(x(de));for(let $e in de)!Object.prototype.hasOwnProperty.call(de,$e)||W.has($e)||(Pe.has($e)?be[$e]=te(de[$e],de):be[$e]=de[$e]);let Ee=O(de,be,we);if(Ee!==null)return Ee!=null?Ee:be}}var ac=cp,lp=({parser:f})=>f==="json"||f==="json5"||f==="jsonc"||f==="json-stringify";function fp(f,b){let O=[f.node,...f.parentNodes],L=new Set([b.node,...b.parentNodes]);return O.find(x=>Na.has(x.type)&&L.has(x))}function Pa(f){let b=f.length-1;for(;;){let O=f[b];if((O==null?void 0:O.type)==="Program"||(O==null?void 0:O.type)==="File")b--;else break}return f.slice(0,b+1)}function dp(f,b,{locStart:O,locEnd:L}){let x=f.node,W=b.node;if(x===W)return{startNode:x,endNode:W};let te=O(f.node);for(let de of Pa(b.parentNodes))if(O(de)>=te)W=de;else break;let le=L(b.node);for(let de of Pa(f.parentNodes)){if(L(de)<=le)x=de;else break;if(x===W)break}return{startNode:x,endNode:W}}function Ms(f,b,O,L,x=[],W){let{locStart:te,locEnd:le}=O,de=te(f),we=le(f);if(!(b>we||bL);let le=f.slice(L,x).search(/\S/),de=le===-1;if(!de)for(L+=le;x>L&&!/\S/.test(f[x-1]);--x);let we=Ms(O,L,b,($e,Ae)=>hp(b,$e,Ae),[],"rangeStart"),be=de?we:Ms(O,x,b,$e=>hp(b,$e),[],"rangeEnd");if(!we||!be)return{rangeStart:0,rangeEnd:0};let Pe,Ee;if(lp(b)){let $e=fp(we,be);Pe=$e,Ee=$e}else({startNode:Pe,endNode:Ee}=dp(we,be,b));return{rangeStart:Math.min(W(Pe),W(Ee)),rangeEnd:Math.max(te(Pe),te(Ee))}}var Fa="\uFEFF",Ra=Symbol("cursor");async function uc(f,b,O=0){if(!f||f.trim().length===0)return{formatted:"",cursorOffset:-1,comments:[]};let{ast:L,text:x}=await jt(f,b);b.cursorOffset>=0&&(b.cursorNode=oc(L,b));let W=await sc(L,b);O>0&&(W=wt([gt,W],O,b.tabWidth));let te=Hu(W,b);if(O>0){let de=te.formatted.trim();te.cursorNodeStart!==void 0&&(te.cursorNodeStart-=te.formatted.indexOf(de)),te.formatted=de+ne(b.endOfLine)}let le=b[Symbol.for("comments")];if(b.cursorOffset>=0){let de,we,be,Pe,Ee;if(b.cursorNode&&te.cursorNodeText?(de=b.locStart(b.cursorNode),we=x.slice(de,b.locEnd(b.cursorNode)),be=b.cursorOffset-de,Pe=te.cursorNodeStart,Ee=te.cursorNodeText):(de=0,we=x,be=b.cursorOffset,Pe=0,Ee=te.formatted),we===Ee)return{formatted:te.formatted,cursorOffset:Pe+be,comments:le};let $e=we.split("");$e.splice(be,0,Ra);let Ae=Ee.split(""),Re=(0,Y.diffArrays)($e,Ae),We=Pe;for(let pt of Re)if(pt.removed){if(pt.value.includes(Ra))break}else We+=pt.count;return{formatted:te.formatted,cursorOffset:We,comments:le}}return{formatted:te.formatted,cursorOffset:-1,comments:le}}async function gv(f,b){let{ast:O,text:L}=await jt(f,b),{rangeStart:x,rangeEnd:W}=mv(L,b,O),te=L.slice(x,W),le=Math.min(x,L.lastIndexOf(` +`,x)+1),de=L.slice(le,x).match(/^\s*/)[0],we=ko(de,b.tabWidth),be=await uc(te,{...b,rangeStart:0,rangeEnd:Number.POSITIVE_INFINITY,cursorOffset:b.cursorOffset>x&&b.cursorOffset<=W?b.cursorOffset-x:-1,endOfLine:"lf"},we),Pe=be.formatted.trimEnd(),{cursorOffset:Ee}=b;Ee>W?Ee+=Pe.length-te.length:be.cursorOffset>=0&&(Ee=be.cursorOffset+x);let $e=L.slice(0,x)+Pe+L.slice(W);if(b.endOfLine!=="lf"){let Ae=ne(b.endOfLine);Ee>=0&&Ae===`\r `&&(Ee+=ge($e.slice(0,Ee),` `)),$e=I(!1,$e,` `,Ae)}return{formatted:$e,cursorOffset:Ee,comments:be.comments}}function cc(f,b,O){return typeof b!="number"||Number.isNaN(b)||b<0||b>f.length?O:b}function pp(f,b){let{cursorOffset:O,rangeStart:L,rangeEnd:x}=b;return O=cc(f,O,-1),L=cc(f,L,0),x=cc(f,x,f.length),{...b,cursorOffset:O,rangeStart:L,rangeEnd:x}}function mp(f,b){let{cursorOffset:O,rangeStart:L,rangeEnd:x,endOfLine:W}=pp(f,b),te=f.charAt(0)===Fa;if(te&&(f=f.slice(1),O--,L--,x--),W==="auto"&&(W=K(f)),f.includes("\r")){let le=de=>ge(f.slice(0,Math.max(de,0)),`\r -`);O-=le(O),L-=le(L),x-=le(x),f=ye(f)}return{hasBOM:te,text:f,options:pp(f,{...b,cursorOffset:O,rangeStart:L,rangeEnd:x,endOfLine:W})}}async function In(f,b){let O=await rn(b);return!O.hasPragma||O.hasPragma(f)}async function nr(f,b){let{hasBOM:O,text:L,options:x}=mp(f,await Fo(b));if(x.rangeStart>=x.rangeEnd&&L!==""||x.requirePragma&&!await In(L,x))return{formatted:f,cursorOffset:b.cursorOffset,comments:[]};let W;return x.rangeStart>0||x.rangeEnd=0&&W.cursorOffset++),W}async function yv(f,b,O){let{text:L,options:x}=mp(f,await Fo(b)),W=await jt(L,x);return O&&(O.preprocessForPrint&&(W.ast=await Oa(W.ast,x)),O.massage&&(W.ast=ac(W.ast,x))),W}async function vv(f,b){b=await Fo(b);let O=await sc(f,b);return Hu(O,b)}async function gp(f,b){let O=bi(f),{formatted:L}=await nr(O,{...b,parser:"__js_expression"});return L}async function bv(f,b){b=await Fo(b);let{ast:O}=await jt(f,b);return sc(O,b)}async function Hl(f,b){return Hu(f,await Fo(b))}var Io={};h(Io,{builders:()=>Kl,printer:()=>Mo,utils:()=>Ia});var Kl={join:Wt,line:Xe,softline:je,hardline:gt,literalline:cn,group:X,conditionalGroup:C,fill:g,lineSuffix:J,lineSuffixBoundary:re,cursor:ht,breakParent:ce,ifBreak:w,trim:Ne,indent:Rn,indentIfBreak:j,align:qt,addAlignmentToDoc:wt,markAsRoot:ee,dedentToRoot:V,dedent:ie,hardlineWithoutBreakParent:Je,literallineWithoutBreakParent:He,label:$n,concat:f=>f},Mo={printDocToString:Hu},Ia={willBreak:Gt,traverseDoc:Lt,findInDoc:Ye,mapDoc:Le,removeLines:Ht,stripTrailingHardline:mn,replaceEndOfLine:M0,canBreak:Lh},Ma="3.2.5",La={};h(La,{addDanglingComment:()=>Fs,addLeadingComment:()=>Co,addTrailingComment:()=>Yt,getAlignmentSize:()=>To,getIndentSize:()=>z,getMaxContinuousCount:()=>Ur,getNextNonSpaceNonCommentCharacter:()=>_v,getNextNonSpaceNonCommentCharacterIndex:()=>Cv,getStringWidth:()=>se,hasNewline:()=>qi,hasNewlineInRange:()=>Ev,hasSpaces:()=>Sv,isNextLineEmpty:()=>Nv,isNextLineEmptyAfterIndex:()=>js,isPreviousLineEmpty:()=>Ov,makeString:()=>kv,skip:()=>Ta,skipEverythingButNewLine:()=>Tl,skipInlineComment:()=>zl,skipNewline:()=>Ns,skipSpaces:()=>Bi,skipToLineEnd:()=>Sl,skipTrailingComment:()=>Yl,skipWhitespace:()=>Wh});function Lo(f,b){if(b===!1)return!1;if(f.charAt(b)==="/"&&f.charAt(b+1)==="*"){for(let O=b+2;OMath.max(L,x.length/b.length),0)}var Ur=fc;function Pt(f,b){let O=Gl(f,b);return O===!1?"":f.charAt(O)}var _v=Pt;function $v(f,b,O){for(let L=b;Lte===L?te:le===b?"\\"+le:le||(O&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/.test(te)?te:"\\"+te));return b+x+b}var kv=Tv;function Av(f,b,O){return Gl(f,O(b))}function Cv(f,b){return arguments.length===2||typeof b=="number"?Gl(f,b):Av(...arguments)}function Vi(f,b,O){return Wi(f,O(b))}function Ov(f,b){return arguments.length===2||typeof b=="number"?Wi(f,b):Vi(...arguments)}function Pv(f,b,O){return js(f,O(b))}function Nv(f,b){return arguments.length===2||typeof b=="number"?js(f,b):Pv(...arguments)}function Bs(f,b=1){return async(...O)=>{var W,te;let L=(W=O[b])!=null?W:{},x=(te=L.plugins)!=null?te:[];return O[b]={...L,plugins:Array.isArray(x)?x:Object.values(x)},f(...O)}}var vp=Bs(nr);async function Ei(f,b){let{formatted:O}=await vp(f,{...b,cursorOffset:-1});return O}async function Fv(f,b){return await Ei(f,b)===f}var Rv=Bs(br,0),Iv={parse:Bs(yv),formatAST:Bs(vv),formatDoc:Bs(gp),printToDoc:Bs(bv),printDocToString:Bs(Hl)};return k(F)})})(w$);var uM=Object.create,e0=Object.defineProperty,cM=Object.getOwnPropertyDescriptor,lM=Object.getOwnPropertyNames,fM=Object.getPrototypeOf,dM=Object.prototype.hasOwnProperty,Cs=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),_$=(t,e)=>{for(var n in e)e0(t,n,{get:e[n],enumerable:!0})},hM=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of lM(e))!dM.call(t,i)&&i!==n&&e0(t,i,{get:()=>e[i],enumerable:!(r=cM(e,i))||r.enumerable});return t},$$=(t,e,n)=>(n=t!=null?uM(fM(t)):{},hM(e||!t||!t.__esModule?e0(n,"default",{value:t,enumerable:!0}):n,t)),pa=Cs(t=>{var e={ANCHOR:"&",COMMENT:"#",TAG:"!",DIRECTIVES_END:"-",DOCUMENT_END:"."},n={ALIAS:"ALIAS",BLANK_LINE:"BLANK_LINE",BLOCK_FOLDED:"BLOCK_FOLDED",BLOCK_LITERAL:"BLOCK_LITERAL",COMMENT:"COMMENT",DIRECTIVE:"DIRECTIVE",DOCUMENT:"DOCUMENT",FLOW_MAP:"FLOW_MAP",FLOW_SEQ:"FLOW_SEQ",MAP:"MAP",MAP_KEY:"MAP_KEY",MAP_VALUE:"MAP_VALUE",PLAIN:"PLAIN",QUOTE_DOUBLE:"QUOTE_DOUBLE",QUOTE_SINGLE:"QUOTE_SINGLE",SEQ:"SEQ",SEQ_ITEM:"SEQ_ITEM"},r="tag:yaml.org,2002:",i={MAP:"tag:yaml.org,2002:map",SEQ:"tag:yaml.org,2002:seq",STR:"tag:yaml.org,2002:str"};function s(y){let D=[0],v=y.indexOf(` +`);O-=le(O),L-=le(L),x-=le(x),f=ye(f)}return{hasBOM:te,text:f,options:pp(f,{...b,cursorOffset:O,rangeStart:L,rangeEnd:x,endOfLine:W})}}async function In(f,b){let O=await rn(b);return!O.hasPragma||O.hasPragma(f)}async function nr(f,b){let{hasBOM:O,text:L,options:x}=mp(f,await Fo(b));if(x.rangeStart>=x.rangeEnd&&L!==""||x.requirePragma&&!await In(L,x))return{formatted:f,cursorOffset:b.cursorOffset,comments:[]};let W;return x.rangeStart>0||x.rangeEnd=0&&W.cursorOffset++),W}async function yv(f,b,O){let{text:L,options:x}=mp(f,await Fo(b)),W=await jt(L,x);return O&&(O.preprocessForPrint&&(W.ast=await Oa(W.ast,x)),O.massage&&(W.ast=ac(W.ast,x))),W}async function vv(f,b){b=await Fo(b);let O=await sc(f,b);return Hu(O,b)}async function gp(f,b){let O=bi(f),{formatted:L}=await nr(O,{...b,parser:"__js_expression"});return L}async function bv(f,b){b=await Fo(b);let{ast:O}=await jt(f,b);return sc(O,b)}async function Kl(f,b){return Hu(f,await Fo(b))}var Io={};h(Io,{builders:()=>zl,printer:()=>Mo,utils:()=>Ia});var zl={join:Wt,line:Xe,softline:je,hardline:gt,literalline:cn,group:X,conditionalGroup:C,fill:g,lineSuffix:J,lineSuffixBoundary:re,cursor:ht,breakParent:ce,ifBreak:w,trim:Ne,indent:Rn,indentIfBreak:j,align:qt,addAlignmentToDoc:wt,markAsRoot:ee,dedentToRoot:V,dedent:ie,hardlineWithoutBreakParent:Je,literallineWithoutBreakParent:He,label:$n,concat:f=>f},Mo={printDocToString:Hu},Ia={willBreak:Gt,traverseDoc:Lt,findInDoc:Ye,mapDoc:Le,removeLines:Ht,stripTrailingHardline:mn,replaceEndOfLine:M0,canBreak:Lh},Ma="3.2.5",La={};h(La,{addDanglingComment:()=>Fs,addLeadingComment:()=>Co,addTrailingComment:()=>Yt,getAlignmentSize:()=>ko,getIndentSize:()=>z,getMaxContinuousCount:()=>Ur,getNextNonSpaceNonCommentCharacter:()=>_v,getNextNonSpaceNonCommentCharacterIndex:()=>Cv,getStringWidth:()=>se,hasNewline:()=>qi,hasNewlineInRange:()=>Ev,hasSpaces:()=>Sv,isNextLineEmpty:()=>Nv,isNextLineEmptyAfterIndex:()=>js,isPreviousLineEmpty:()=>Ov,makeString:()=>Tv,skip:()=>ka,skipEverythingButNewLine:()=>Tl,skipInlineComment:()=>Yl,skipNewline:()=>Ns,skipSpaces:()=>Bi,skipToLineEnd:()=>kl,skipTrailingComment:()=>Gl,skipWhitespace:()=>Wh});function Lo(f,b){if(b===!1)return!1;if(f.charAt(b)==="/"&&f.charAt(b+1)==="*"){for(let O=b+2;OMath.max(L,x.length/b.length),0)}var Ur=fc;function Pt(f,b){let O=Jl(f,b);return O===!1?"":f.charAt(O)}var _v=Pt;function $v(f,b,O){for(let L=b;Lte===L?te:le===b?"\\"+le:le||(O&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/.test(te)?te:"\\"+te));return b+x+b}var Tv=kv;function Av(f,b,O){return Jl(f,O(b))}function Cv(f,b){return arguments.length===2||typeof b=="number"?Jl(f,b):Av(...arguments)}function Vi(f,b,O){return Wi(f,O(b))}function Ov(f,b){return arguments.length===2||typeof b=="number"?Wi(f,b):Vi(...arguments)}function Pv(f,b,O){return js(f,O(b))}function Nv(f,b){return arguments.length===2||typeof b=="number"?js(f,b):Pv(...arguments)}function Bs(f,b=1){return async(...O)=>{var W,te;let L=(W=O[b])!=null?W:{},x=(te=L.plugins)!=null?te:[];return O[b]={...L,plugins:Array.isArray(x)?x:Object.values(x)},f(...O)}}var vp=Bs(nr);async function Ei(f,b){let{formatted:O}=await vp(f,{...b,cursorOffset:-1});return O}async function Fv(f,b){return await Ei(f,b)===f}var Rv=Bs(br,0),Iv={parse:Bs(yv),formatAST:Bs(vv),formatDoc:Bs(gp),printToDoc:Bs(bv),printDocToString:Bs(Kl)};return T(N)})})(w$);var uM=Object.create,e0=Object.defineProperty,cM=Object.getOwnPropertyDescriptor,lM=Object.getOwnPropertyNames,fM=Object.getPrototypeOf,dM=Object.prototype.hasOwnProperty,Cs=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),_$=(t,e)=>{for(var n in e)e0(t,n,{get:e[n],enumerable:!0})},hM=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of lM(e))!dM.call(t,i)&&i!==n&&e0(t,i,{get:()=>e[i],enumerable:!(r=cM(e,i))||r.enumerable});return t},$$=(t,e,n)=>(n=t!=null?uM(fM(t)):{},hM(e||!t||!t.__esModule?e0(n,"default",{value:t,enumerable:!0}):n,t)),pa=Cs(t=>{var e={ANCHOR:"&",COMMENT:"#",TAG:"!",DIRECTIVES_END:"-",DOCUMENT_END:"."},n={ALIAS:"ALIAS",BLANK_LINE:"BLANK_LINE",BLOCK_FOLDED:"BLOCK_FOLDED",BLOCK_LITERAL:"BLOCK_LITERAL",COMMENT:"COMMENT",DIRECTIVE:"DIRECTIVE",DOCUMENT:"DOCUMENT",FLOW_MAP:"FLOW_MAP",FLOW_SEQ:"FLOW_SEQ",MAP:"MAP",MAP_KEY:"MAP_KEY",MAP_VALUE:"MAP_VALUE",PLAIN:"PLAIN",QUOTE_DOUBLE:"QUOTE_DOUBLE",QUOTE_SINGLE:"QUOTE_SINGLE",SEQ:"SEQ",SEQ_ITEM:"SEQ_ITEM"},r="tag:yaml.org,2002:",i={MAP:"tag:yaml.org,2002:map",SEQ:"tag:yaml.org,2002:seq",STR:"tag:yaml.org,2002:str"};function s(y){let D=[0],v=y.indexOf(` `);for(;v!==-1;)v+=1,D.push(v),v=y.indexOf(` -`,v);return D}function a(y){let D,v;return typeof y=="string"?(D=s(y),v=y):(Array.isArray(y)&&(y=y[0]),y&&y.context&&(y.lineStarts||(y.lineStarts=s(y.context.src)),D=y.lineStarts,v=y.context.src)),{lineStarts:D,src:v}}function c(y,D){if(typeof y!="number"||y<0)return null;let{lineStarts:v,src:_}=a(D);if(!v||!_||y>_.length)return null;for(let q=0;q=1)||y>v.length)return null;let $=v[y-1],q=v[y];for(;q&&q>$&&_[q-1]===` -`;)--q;return _.slice($,q)}function d({start:y,end:D},v,_=80){let $=l(y.line,v);if(!$)return null;let{col:q}=y;if($.length>_)if(q<=_-10)$=$.substr(0,_-1)+"\u2026";else{let K=Math.round(_/2);$.length>q+K&&($=$.substr(0,q+K-1)+"\u2026"),q-=$.length-_,$="\u2026"+$.substr(1-_)}let F=1,M="";D&&(D.line===y.line&&q+(D.col-y.col)<=_+1?F=D.col-y.col:(F=Math.min($.length+1,_)-q,M="\u2026"));let I=q>1?" ".repeat(q-1):"",Y="^".repeat(F);return`${$} -${I}${Y}${M}`}var h=class WT{static copy(D){return new WT(D.start,D.end)}constructor(D,v){this.start=D,this.end=v||D}isEmpty(){return typeof this.start!="number"||!this.end||this.end<=this.start}setOrigRange(D,v){let{start:_,end:$}=this;if(D.length===0||$<=D[0])return this.origStart=_,this.origEnd=$,v;let q=v;for(;q_);)++q;this.origStart=_+q;let F=q;for(;q=$);)++q;return this.origEnd=$+q,F}},m=class Ys{static addStringTerminator(D,v,_){if(_[_.length-1]===` +`,v);return D}function a(y){let D,v;return typeof y=="string"?(D=s(y),v=y):(Array.isArray(y)&&(y=y[0]),y&&y.context&&(y.lineStarts||(y.lineStarts=s(y.context.src)),D=y.lineStarts,v=y.context.src)),{lineStarts:D,src:v}}function c(y,D){if(typeof y!="number"||y<0)return null;let{lineStarts:v,src:_}=a(D);if(!v||!_||y>_.length)return null;for(let q=0;q=1)||y>v.length)return null;let $=v[y-1],q=v[y];for(;q&&q>$&&_[q-1]===` +`;)--q;return _.slice($,q)}function d({start:y,end:D},v,_=80){let $=l(y.line,v);if(!$)return null;let{col:q}=y;if($.length>_)if(q<=_-10)$=$.substr(0,_-1)+"\u2026";else{let K=Math.round(_/2);$.length>q+K&&($=$.substr(0,q+K-1)+"\u2026"),q-=$.length-_,$="\u2026"+$.substr(1-_)}let N=1,M="";D&&(D.line===y.line&&q+(D.col-y.col)<=_+1?N=D.col-y.col:(N=Math.min($.length+1,_)-q,M="\u2026"));let I=q>1?" ".repeat(q-1):"",Y="^".repeat(N);return`${$} +${I}${Y}${M}`}var h=class Wk{static copy(D){return new Wk(D.start,D.end)}constructor(D,v){this.start=D,this.end=v||D}isEmpty(){return typeof this.start!="number"||!this.end||this.end<=this.start}setOrigRange(D,v){let{start:_,end:$}=this;if(D.length===0||$<=D[0])return this.origStart=_,this.origEnd=$,v;let q=v;for(;q_);)++q;this.origStart=_+q;let N=q;for(;q=$);)++q;return this.origEnd=$+q,N}},m=class Ys{static addStringTerminator(D,v,_){if(_[_.length-1]===` `)return _;let $=Ys.endOfWhiteSpace(D,v);return $>=D.length||D[$]===` `?_+` `:_}static atDocumentBoundary(D,v,_){let $=D[v];if(!$)return!0;let q=D[v-1];if(q&&q!==` -`)return!1;if(_){if($!==_)return!1}else if($!==e.DIRECTIVES_END&&$!==e.DOCUMENT_END)return!1;let F=D[v+1],M=D[v+2];if(F!==$||M!==$)return!1;let I=D[v+3];return!I||I===` +`)return!1;if(_){if($!==_)return!1}else if($!==e.DIRECTIVES_END&&$!==e.DOCUMENT_END)return!1;let N=D[v+1],M=D[v+2];if(N!==$||M!==$)return!1;let I=D[v+3];return!I||I===` `||I===" "||I===" "}static endOfIdentifier(D,v){let _=D[v],$=_==="<",q=$?[` `," "," ",">"]:[` `," "," ","[","]","{","}",","];for(;_&&q.indexOf(_)===-1;)_=D[v+=1];return $&&_===">"&&(v+=1),v}static endOfIndent(D,v){let _=D[v];for(;_===" ";)_=D[v+=1];return v}static endOfLine(D,v){let _=D[v];for(;_&&_!==` `;)_=D[v+=1];return v}static endOfWhiteSpace(D,v){let _=D[v];for(;_===" "||_===" ";)_=D[v+=1];return v}static startOfLine(D,v){let _=D[v-1];if(_===` `)return v;for(;_&&_!==` -`;)_=D[v-=1];return v+1}static endOfBlockIndent(D,v,_){let $=Ys.endOfIndent(D,_);if($>_+v)return $;{let q=Ys.endOfWhiteSpace(D,$),F=D[q];if(!F||F===` +`;)_=D[v-=1];return v+1}static endOfBlockIndent(D,v,_){let $=Ys.endOfIndent(D,_);if($>_+v)return $;{let q=Ys.endOfWhiteSpace(D,$),N=D[q];if(!N||N===` `)return q}return null}static atBlank(D,v,_){let $=D[v];return $===` `||$===" "||$===" "||_&&!$}static nextNodeIsIndented(D,v,_){return!D||v<0?!1:v>0?!0:_&&D==="-"}static normalizeOffset(D,v){let _=D[v];return _?_!==` `&&D[v-1]===` -`?v-1:Ys.endOfWhiteSpace(D,v):v}static foldNewline(D,v,_){let $=0,q=!1,F="",M=D[v+1];for(;M===" "||M===" "||M===` +`?v-1:Ys.endOfWhiteSpace(D,v):v}static foldNewline(D,v,_){let $=0,q=!1,N="",M=D[v+1];for(;M===" "||M===" "||M===` `;){switch(M){case` -`:$=0,v+=1,F+=` -`;break;case" ":$<=_&&(q=!0),v=Ys.endOfWhiteSpace(D,v+2)-1;break;case" ":$+=1,v+=1;break}M=D[v+1]}return F||(F=" "),M&&$<=_&&(q=!0),{fold:F,offset:v,error:q}}constructor(D,v,_){Object.defineProperty(this,"context",{value:_||null,writable:!0}),this.error=null,this.range=null,this.valueRange=null,this.props=v||[],this.type=D,this.value=null}getPropValue(D,v,_){if(!this.context)return null;let{src:$}=this.context,q=this.props[D];return q&&$[q.start]===v?$.slice(q.start+(_?1:0),q.end):null}get anchor(){for(let D=0;D0?D.join(` +`:$=0,v+=1,N+=` +`;break;case" ":$<=_&&(q=!0),v=Ys.endOfWhiteSpace(D,v+2)-1;break;case" ":$+=1,v+=1;break}M=D[v+1]}return N||(N=" "),M&&$<=_&&(q=!0),{fold:N,offset:v,error:q}}constructor(D,v,_){Object.defineProperty(this,"context",{value:_||null,writable:!0}),this.error=null,this.range=null,this.valueRange=null,this.props=v||[],this.type=D,this.value=null}getPropValue(D,v,_){if(!this.context)return null;let{src:$}=this.context,q=this.props[D];return q&&$[q.start]===v?$.slice(q.start+(_?1:0),q.end):null}get anchor(){for(let D=0;D0?D.join(` `):null}commentHasRequiredWhitespace(D){let{src:v}=this.context;if(this.header&&D===this.header.end||!this.valueRange)return!1;let{end:_}=this.valueRange;return D!==_||Ys.atBlank(v,_-1)}get hasComment(){if(this.context){let{src:D}=this.context;for(let v=0;v_.setOrigRange(D,v)),v}toString(){let{context:{src:D},range:v,value:_}=this;if(_!=null)return _;let $=D.slice(v.start,v.end);return Ys.addStringTerminator(D,v.end,$)}},E=class extends Error{constructor(y,D,v){if(!v||!(D instanceof m))throw new Error(`Invalid arguments for new ${y}`);super(),this.name=y,this.message=v,this.source=D}makePretty(){if(!this.source)return;this.nodeType=this.source.type;let y=this.source.context&&this.source.context.root;if(typeof this.offset=="number"){this.range=new h(this.offset,this.offset+1);let D=y&&c(this.offset,y);if(D){let v={line:D.line,col:D.col+1};this.linePos={start:D,end:v}}delete this.offset}else this.range=this.source.range,this.linePos=this.source.rangeAsLinePos;if(this.linePos){let{line:D,col:v}=this.linePos.start;this.message+=` at line ${D}, column ${v}`;let _=y&&d(this.linePos,y);_&&(this.message+=`: ${_} -`)}delete this.source}},k=class extends E{constructor(y,D){super("YAMLReferenceError",y,D)}},R=class extends E{constructor(y,D){super("YAMLSemanticError",y,D)}},P=class extends E{constructor(y,D){super("YAMLSyntaxError",y,D)}},A=class extends E{constructor(y,D){super("YAMLWarning",y,D)}};function N(y,D,v){return D in y?Object.defineProperty(y,D,{value:v,enumerable:!0,configurable:!0,writable:!0}):y[D]=v,y}var S=class Eb extends m{static endOfLine(D,v,_){let $=D[v],q=v;for(;$&&$!==` -`&&!(_&&($==="["||$==="]"||$==="{"||$==="}"||$===","));){let F=D[q+1];if($===":"&&(!F||F===` -`||F===" "||F===" "||_&&F===",")||($===" "||$===" ")&&F==="#")break;q+=1,$=F}return q}get strValue(){if(!this.valueRange||!this.context)return null;let{start:D,end:v}=this.valueRange,{src:_}=this.context,$=_[v-1];for(;DY?_.slice(Y,M+1):I)}else q+=I}let F=_[D];switch(F){case" ":{let M="Plain value cannot start with a tab character";return{errors:[new R(this,M)],str:q}}case"@":case"`":{let M=`Plain value cannot start with reserved character ${F}`;return{errors:[new R(this,M)],str:q}}default:return q}}parseBlockValue(D){let{indent:v,inFlow:_,src:$}=this.context,q=D,F=D;for(let M=$[q];M===` +`&&(q+=M>Y?_.slice(Y,M+1):I)}else q+=I}let N=_[D];switch(N){case" ":{let M="Plain value cannot start with a tab character";return{errors:[new R(this,M)],str:q}}case"@":case"`":{let M=`Plain value cannot start with reserved character ${N}`;return{errors:[new R(this,M)],str:q}}default:return q}}parseBlockValue(D){let{indent:v,inFlow:_,src:$}=this.context,q=D,N=D;for(let M=$[q];M===` `&&!m.atDocumentBoundary($,q+1);M=$[q]){let I=m.endOfBlockIndent($,v,q+1);if(I===null||$[I]==="#")break;$[I]===` -`?q=I:(F=Eb.endOfLine($,I,_),q=F)}return this.valueRange.isEmpty()&&(this.valueRange.start=D),this.valueRange.end=F,F}parse(D,v){this.context=D;let{inFlow:_,src:$}=D,q=v,F=$[q];return F&&F!=="#"&&F!==` -`&&(q=Eb.endOfLine($,v,_)),this.valueRange=new h(v,q),q=m.endOfWhiteSpace($,q),q=this.parseComment(q),(!this.hasComment||this.valueRange.isEmpty())&&(q=this.parseBlockValue(q)),q}};t.Char=e,t.Node=m,t.PlainValue=S,t.Range=h,t.Type=n,t.YAMLError=E,t.YAMLReferenceError=k,t.YAMLSemanticError=R,t.YAMLSyntaxError=P,t.YAMLWarning=A,t._defineProperty=N,t.defaultTagPrefix=r,t.defaultTags=i}),pM=Cs(t=>{var e=pa(),n=class extends e.Node{constructor(){super(e.Type.BLANK_LINE)}get includesTrailingLines(){return!0}parse(S,y){return this.context=S,this.range=new e.Range(y,y+1),y+1}},r=class extends e.Node{constructor(S,y){super(S,y),this.node=null}get includesTrailingLines(){return!!this.node&&this.node.includesTrailingLines}parse(S,y){this.context=S;let{parseNode:D,src:v}=S,{atLineStart:_,lineStart:$}=S;!_&&this.type===e.Type.SEQ_ITEM&&(this.error=new e.YAMLSemanticError(this,"Sequence items must not have preceding content on the same line"));let q=_?y-$:S.indent,F=e.Node.endOfWhiteSpace(v,y+1),M=v[F],I=M==="#",Y=[],K=null;for(;M===` -`||M==="#";){if(M==="#"){let ge=e.Node.endOfLine(v,F+1);Y.push(new e.Range(F,ge)),F=ge}else{_=!0,$=F+1;let ge=e.Node.endOfWhiteSpace(v,$);v[ge]===` -`&&Y.length===0&&(K=new n,$=K.parse({src:v},$)),F=e.Node.endOfIndent(v,$)}M=v[F]}if(e.Node.nextNodeIsIndented(M,F-($+q),this.type!==e.Type.SEQ_ITEM)?this.node=D({atLineStart:_,inCollection:!1,indent:q,lineStart:$,parent:this},F):M&&$>y+1&&(F=$-1),this.node){if(K){let ge=S.parent.items||S.parent.contents;ge&&ge.push(K)}Y.length&&Array.prototype.push.apply(this.props,Y),F=this.node.range.end}else if(I){let ge=Y[0];this.props.push(ge),F=ge.end}else F=e.Node.endOfLine(v,y+1);let ne=this.node?this.node.valueRange.end:F;return this.valueRange=new e.Range(y,ne),F}setOrigRanges(S,y){return y=super.setOrigRanges(S,y),this.node?this.node.setOrigRanges(S,y):y}toString(){let{context:{src:S},node:y,range:D,value:v}=this;if(v!=null)return v;let _=y?S.slice(D.start,y.range.start)+String(y):S.slice(D.start,D.end);return e.Node.addStringTerminator(S,D.end,_)}},i=class extends e.Node{constructor(){super(e.Type.COMMENT)}parse(S,y){this.context=S;let D=this.parseComment(y);return this.range=new e.Range(y,D),D}};function s(S){let y=S;for(;y instanceof r;)y=y.node;if(!(y instanceof a))return null;let D=y.items.length,v=-1;for(let q=D-1;q>=0;--q){let F=y.items[q];if(F.type===e.Type.COMMENT){let{indent:M,lineStart:I}=F.context;if(M>0&&F.range.start>=I+M)break;v=q}else if(F.type===e.Type.BLANK_LINE)v=q;else break}if(v===-1)return null;let _=y.items.splice(v,D-v),$=_[0].range.start;for(;y.range.end=$,y.valueRange&&y.valueRange.end>$&&(y.valueRange.end=$),y!==S;)y=y.context.parent;return _}var a=class Sb extends e.Node{static nextContentHasIndent(y,D,v){let _=e.Node.endOfLine(y,D)+1;D=e.Node.endOfWhiteSpace(y,_);let $=y[D];return $?D>=_+v?!0:$!=="#"&&$!==` -`?!1:Sb.nextContentHasIndent(y,D,v):!1}constructor(y){super(y.type===e.Type.SEQ_ITEM?e.Type.SEQ:e.Type.MAP);for(let v=y.props.length-1;v>=0;--v)if(y.props[v].start0}parse(y,D){this.context=y;let{parseNode:v,src:_}=y,$=e.Node.startOfLine(_,D),q=this.items[0];q.context.parent=this,this.valueRange=e.Range.copy(q.valueRange);let F=q.range.start-q.context.lineStart,M=D;M=e.Node.normalizeOffset(_,M);let I=_[M],Y=e.Node.endOfWhiteSpace(_,$)===M,K=!1;for(;I;){for(;I===` +`?q=I:(N=Eb.endOfLine($,I,_),q=N)}return this.valueRange.isEmpty()&&(this.valueRange.start=D),this.valueRange.end=N,N}parse(D,v){this.context=D;let{inFlow:_,src:$}=D,q=v,N=$[q];return N&&N!=="#"&&N!==` +`&&(q=Eb.endOfLine($,v,_)),this.valueRange=new h(v,q),q=m.endOfWhiteSpace($,q),q=this.parseComment(q),(!this.hasComment||this.valueRange.isEmpty())&&(q=this.parseBlockValue(q)),q}};t.Char=e,t.Node=m,t.PlainValue=S,t.Range=h,t.Type=n,t.YAMLError=E,t.YAMLReferenceError=T,t.YAMLSemanticError=R,t.YAMLSyntaxError=P,t.YAMLWarning=A,t._defineProperty=F,t.defaultTagPrefix=r,t.defaultTags=i}),pM=Cs(t=>{var e=pa(),n=class extends e.Node{constructor(){super(e.Type.BLANK_LINE)}get includesTrailingLines(){return!0}parse(S,y){return this.context=S,this.range=new e.Range(y,y+1),y+1}},r=class extends e.Node{constructor(S,y){super(S,y),this.node=null}get includesTrailingLines(){return!!this.node&&this.node.includesTrailingLines}parse(S,y){this.context=S;let{parseNode:D,src:v}=S,{atLineStart:_,lineStart:$}=S;!_&&this.type===e.Type.SEQ_ITEM&&(this.error=new e.YAMLSemanticError(this,"Sequence items must not have preceding content on the same line"));let q=_?y-$:S.indent,N=e.Node.endOfWhiteSpace(v,y+1),M=v[N],I=M==="#",Y=[],K=null;for(;M===` +`||M==="#";){if(M==="#"){let ge=e.Node.endOfLine(v,N+1);Y.push(new e.Range(N,ge)),N=ge}else{_=!0,$=N+1;let ge=e.Node.endOfWhiteSpace(v,$);v[ge]===` +`&&Y.length===0&&(K=new n,$=K.parse({src:v},$)),N=e.Node.endOfIndent(v,$)}M=v[N]}if(e.Node.nextNodeIsIndented(M,N-($+q),this.type!==e.Type.SEQ_ITEM)?this.node=D({atLineStart:_,inCollection:!1,indent:q,lineStart:$,parent:this},N):M&&$>y+1&&(N=$-1),this.node){if(K){let ge=S.parent.items||S.parent.contents;ge&&ge.push(K)}Y.length&&Array.prototype.push.apply(this.props,Y),N=this.node.range.end}else if(I){let ge=Y[0];this.props.push(ge),N=ge.end}else N=e.Node.endOfLine(v,y+1);let ne=this.node?this.node.valueRange.end:N;return this.valueRange=new e.Range(y,ne),N}setOrigRanges(S,y){return y=super.setOrigRanges(S,y),this.node?this.node.setOrigRanges(S,y):y}toString(){let{context:{src:S},node:y,range:D,value:v}=this;if(v!=null)return v;let _=y?S.slice(D.start,y.range.start)+String(y):S.slice(D.start,D.end);return e.Node.addStringTerminator(S,D.end,_)}},i=class extends e.Node{constructor(){super(e.Type.COMMENT)}parse(S,y){this.context=S;let D=this.parseComment(y);return this.range=new e.Range(y,D),D}};function s(S){let y=S;for(;y instanceof r;)y=y.node;if(!(y instanceof a))return null;let D=y.items.length,v=-1;for(let q=D-1;q>=0;--q){let N=y.items[q];if(N.type===e.Type.COMMENT){let{indent:M,lineStart:I}=N.context;if(M>0&&N.range.start>=I+M)break;v=q}else if(N.type===e.Type.BLANK_LINE)v=q;else break}if(v===-1)return null;let _=y.items.splice(v,D-v),$=_[0].range.start;for(;y.range.end=$,y.valueRange&&y.valueRange.end>$&&(y.valueRange.end=$),y!==S;)y=y.context.parent;return _}var a=class Sb extends e.Node{static nextContentHasIndent(y,D,v){let _=e.Node.endOfLine(y,D)+1;D=e.Node.endOfWhiteSpace(y,_);let $=y[D];return $?D>=_+v?!0:$!=="#"&&$!==` +`?!1:Sb.nextContentHasIndent(y,D,v):!1}constructor(y){super(y.type===e.Type.SEQ_ITEM?e.Type.SEQ:e.Type.MAP);for(let v=y.props.length-1;v>=0;--v)if(y.props[v].start0}parse(y,D){this.context=y;let{parseNode:v,src:_}=y,$=e.Node.startOfLine(_,D),q=this.items[0];q.context.parent=this,this.valueRange=e.Range.copy(q.valueRange);let N=q.range.start-q.context.lineStart,M=D;M=e.Node.normalizeOffset(_,M);let I=_[M],Y=e.Node.endOfWhiteSpace(_,$)===M,K=!1;for(;I;){for(;I===` `||I==="#";){if(Y&&I===` -`&&!K){let ye=new n;if(M=ye.parse({src:_},M),this.valueRange.end=M,M>=_.length){I=null;break}this.items.push(ye),M-=1}else if(I==="#"){if(M<$+F&&!Sb.nextContentHasIndent(_,M,F))return M;let ye=new i;if(M=ye.parse({indent:F,lineStart:$,src:_},M),this.items.push(ye),this.valueRange.end=M,M>=_.length){I=null;break}}if($=M+1,M=e.Node.endOfIndent(_,$),e.Node.atBlank(_,M)){let ye=e.Node.endOfWhiteSpace(_,M),De=_[ye];(!De||De===` -`||De==="#")&&(M=ye)}I=_[M],Y=!0}if(!I)break;if(M!==$+F&&(Y||I!==":")){if(M<$+F){$>D&&(M=$);break}else if(!this.error){let ye="All collection items must start at the same column";this.error=new e.YAMLSyntaxError(this,ye)}}if(q.type===e.Type.SEQ_ITEM){if(I!=="-"){$>D&&(M=$);break}}else if(I==="-"&&!this.error){let ye=_[M+1];if(!ye||ye===` -`||ye===" "||ye===" "){let De="A collection cannot be both a mapping and a sequence";this.error=new e.YAMLSyntaxError(this,De)}}let ne=v({atLineStart:Y,inCollection:!0,indent:F,lineStart:$,parent:this},M);if(!ne)return M;if(this.items.push(ne),this.valueRange.end=ne.valueRange.end,M=e.Node.normalizeOffset(_,ne.range.end),I=_[M],Y=!1,K=ne.includesTrailingLines,I){let ye=M-1,De=_[ye];for(;De===" "||De===" ";)De=_[--ye];De===` -`&&($=ye+1,Y=!0)}let ge=s(ne);ge&&Array.prototype.push.apply(this.items,ge)}return M}setOrigRanges(y,D){return D=super.setOrigRanges(y,D),this.items.forEach(v=>{D=v.setOrigRanges(y,D)}),D}toString(){let{context:{src:y},items:D,range:v,value:_}=this;if(_!=null)return _;let $=y.slice(v.start,D[0].range.start)+String(D[0]);for(let q=1;q=_.length){I=null;break}this.items.push(ye),M-=1}else if(I==="#"){if(M<$+N&&!Sb.nextContentHasIndent(_,M,N))return M;let ye=new i;if(M=ye.parse({indent:N,lineStart:$,src:_},M),this.items.push(ye),this.valueRange.end=M,M>=_.length){I=null;break}}if($=M+1,M=e.Node.endOfIndent(_,$),e.Node.atBlank(_,M)){let ye=e.Node.endOfWhiteSpace(_,M),De=_[ye];(!De||De===` +`||De==="#")&&(M=ye)}I=_[M],Y=!0}if(!I)break;if(M!==$+N&&(Y||I!==":")){if(M<$+N){$>D&&(M=$);break}else if(!this.error){let ye="All collection items must start at the same column";this.error=new e.YAMLSyntaxError(this,ye)}}if(q.type===e.Type.SEQ_ITEM){if(I!=="-"){$>D&&(M=$);break}}else if(I==="-"&&!this.error){let ye=_[M+1];if(!ye||ye===` +`||ye===" "||ye===" "){let De="A collection cannot be both a mapping and a sequence";this.error=new e.YAMLSyntaxError(this,De)}}let ne=v({atLineStart:Y,inCollection:!0,indent:N,lineStart:$,parent:this},M);if(!ne)return M;if(this.items.push(ne),this.valueRange.end=ne.valueRange.end,M=e.Node.normalizeOffset(_,ne.range.end),I=_[M],Y=!1,K=ne.includesTrailingLines,I){let ye=M-1,De=_[ye];for(;De===" "||De===" ";)De=_[--ye];De===` +`&&($=ye+1,Y=!0)}let ge=s(ne);ge&&Array.prototype.push.apply(this.items,ge)}return M}setOrigRanges(y,D){return D=super.setOrigRanges(y,D),this.items.forEach(v=>{D=v.setOrigRanges(y,D)}),D}toString(){let{context:{src:y},items:D,range:v,value:_}=this;if(_!=null)return _;let $=y.slice(v.start,D[0].range.start)+String(D[0]);for(let q=1;q0&&(this.contents=this.directives,this.directives=[]),$}return D[$]?(this.directivesEndMarker=new e.Range($,$+3),$+3):(_?this.error=new e.YAMLSemanticError(this,"Missing directives-end indicator line"):this.directives.length>0&&(this.contents=this.directives,this.directives=[]),$)}parseContents(y){let{parseNode:D,src:v}=this.context;this.contents||(this.contents=[]);let _=y;for(;v[_-1]==="-";)_-=1;let $=e.Node.endOfWhiteSpace(v,y),q=_===y;for(this.valueRange=new e.Range($);!e.Node.atDocumentBoundary(v,$,e.Char.DOCUMENT_END);){switch(v[$]){case` -`:if(q){let F=new n;$=F.parse({src:v},$),${D=v.setOrigRanges(y,D)}),this.directivesEndMarker&&(D=this.directivesEndMarker.setOrigRange(y,D)),this.contents.forEach(v=>{D=v.setOrigRanges(y,D)}),this.documentEndMarker&&(D=this.documentEndMarker.setOrigRange(y,D)),D}toString(){let{contents:y,directives:D,value:v}=this;if(v!=null)return v;let _=D.join("");return y.length>0&&((D.length>0||y[0].type===e.Type.COMMENT)&&(_+=`--- `),_+=y.join("")),_[_.length-1]!==` `&&(_+=` `),_}},d=class extends e.Node{parse(S,y){this.context=S;let{src:D}=S,v=e.Node.endOfIdentifier(D,y+1);return this.valueRange=new e.Range(y+1,v),v=e.Node.endOfWhiteSpace(D,v),v=this.parseComment(v),v}},h={CLIP:"CLIP",KEEP:"KEEP",STRIP:"STRIP"},m=class extends e.Node{constructor(S,y){super(S,y),this.blockIndent=null,this.chomping=h.CLIP,this.header=null}get includesTrailingLines(){return this.chomping===h.KEEP}get strValue(){if(!this.valueRange||!this.context)return null;let{start:S,end:y}=this.valueRange,{indent:D,src:v}=this.context;if(this.valueRange.isEmpty())return"";let _=null,$=v[y-1];for(;$===` `||$===" "||$===" ";){if(y-=1,y<=S){if(this.chomping===h.KEEP)break;return""}$===` -`&&(_=y),$=v[y-1]}let q=y+1;_&&(this.chomping===h.KEEP?(q=_,y=this.valueRange.end):y=_);let F=D+this.blockIndent,M=this.type===e.Type.BLOCK_FOLDED,I=!0,Y="",K="",ne=!1;for(let ge=S;geq&&(q=Y);D[M]===` -`?_=M:_=$=e.Node.endOfLine(D,M)}return this.chomping!==h.KEEP&&(_=D[$]?$+1:$),this.valueRange=new e.Range(S+1,_),_}parse(S,y){this.context=S;let{src:D}=S,v=this.parseBlockHeader(y);return v=e.Node.endOfWhiteSpace(D,v),v=this.parseComment(v),v=this.parseBlockValue(v),v}setOrigRanges(S,y){return y=super.setOrigRanges(S,y),this.header?this.header.setOrigRange(S,y):y}},E=class extends e.Node{constructor(S,y){super(S,y),this.items=null}prevNodeIsJsonLike(S=this.items.length){let y=this.items[S-1];return!!y&&(y.jsonLike||y.type===e.Type.COMMENT&&this.prevNodeIsJsonLike(S-1))}parse(S,y){this.context=S;let{parseNode:D,src:v}=S,{indent:_,lineStart:$}=S,q=v[y];this.items=[{char:q,offset:y}];let F=e.Node.endOfWhiteSpace(v,y+1);for(q=v[F];q&&q!=="]"&&q!=="}";){switch(q){case` -`:{$=F+1;let M=e.Node.endOfWhiteSpace(v,$);if(v[M]===` -`){let I=new n;$=I.parse({src:v},$),this.items.push(I)}if(F=e.Node.endOfIndent(v,$),F<=$+_&&(q=v[F],F<$+_||q!=="]"&&q!=="}")){let I="Insufficient indentation in flow collection";this.error=new e.YAMLSemanticError(this,I)}}break;case",":this.items.push({char:q,offset:F}),F+=1;break;case"#":{let M=new i;F=M.parse({src:v},F),this.items.push(M)}break;case"?":case":":{let M=v[F+1];if(M===` -`||M===" "||M===" "||M===","||q===":"&&this.prevNodeIsJsonLike()){this.items.push({char:q,offset:F}),F+=1;break}}default:{let M=D({atLineStart:!1,inCollection:!1,inFlow:!0,indent:-1,lineStart:$,parent:this},F);if(!M)return this.valueRange=new e.Range(y,F),F;this.items.push(M),F=e.Node.normalizeOffset(v,M.range.end)}}F=e.Node.endOfWhiteSpace(v,F),q=v[F]}return this.valueRange=new e.Range(y,F+1),q&&(this.items.push({char:q,offset:F}),F=e.Node.endOfWhiteSpace(v,F+1),F=this.parseComment(F)),F}setOrigRanges(S,y){return y=super.setOrigRanges(S,y),this.items.forEach(D=>{if(D instanceof e.Node)y=D.setOrigRanges(S,y);else if(S.length===0)D.origOffset=D.offset;else{let v=y;for(;vD.offset);)++v;D.origOffset=D.offset+v,y=v}}),y}toString(){let{context:{src:S},items:y,range:D,value:v}=this;if(v!=null)return v;let _=y.filter(F=>F instanceof e.Node),$="",q=D.start;return _.forEach(F=>{let M=S.slice(q,F.range.start);q=F.range.end,$+=M+String(F),$[$.length-1]===` +`?_=M:_=$=e.Node.endOfLine(D,M)}return this.chomping!==h.KEEP&&(_=D[$]?$+1:$),this.valueRange=new e.Range(S+1,_),_}parse(S,y){this.context=S;let{src:D}=S,v=this.parseBlockHeader(y);return v=e.Node.endOfWhiteSpace(D,v),v=this.parseComment(v),v=this.parseBlockValue(v),v}setOrigRanges(S,y){return y=super.setOrigRanges(S,y),this.header?this.header.setOrigRange(S,y):y}},E=class extends e.Node{constructor(S,y){super(S,y),this.items=null}prevNodeIsJsonLike(S=this.items.length){let y=this.items[S-1];return!!y&&(y.jsonLike||y.type===e.Type.COMMENT&&this.prevNodeIsJsonLike(S-1))}parse(S,y){this.context=S;let{parseNode:D,src:v}=S,{indent:_,lineStart:$}=S,q=v[y];this.items=[{char:q,offset:y}];let N=e.Node.endOfWhiteSpace(v,y+1);for(q=v[N];q&&q!=="]"&&q!=="}";){switch(q){case` +`:{$=N+1;let M=e.Node.endOfWhiteSpace(v,$);if(v[M]===` +`){let I=new n;$=I.parse({src:v},$),this.items.push(I)}if(N=e.Node.endOfIndent(v,$),N<=$+_&&(q=v[N],N<$+_||q!=="]"&&q!=="}")){let I="Insufficient indentation in flow collection";this.error=new e.YAMLSemanticError(this,I)}}break;case",":this.items.push({char:q,offset:N}),N+=1;break;case"#":{let M=new i;N=M.parse({src:v},N),this.items.push(M)}break;case"?":case":":{let M=v[N+1];if(M===` +`||M===" "||M===" "||M===","||q===":"&&this.prevNodeIsJsonLike()){this.items.push({char:q,offset:N}),N+=1;break}}default:{let M=D({atLineStart:!1,inCollection:!1,inFlow:!0,indent:-1,lineStart:$,parent:this},N);if(!M)return this.valueRange=new e.Range(y,N),N;this.items.push(M),N=e.Node.normalizeOffset(v,M.range.end)}}N=e.Node.endOfWhiteSpace(v,N),q=v[N]}return this.valueRange=new e.Range(y,N+1),q&&(this.items.push({char:q,offset:N}),N=e.Node.endOfWhiteSpace(v,N+1),N=this.parseComment(N)),N}setOrigRanges(S,y){return y=super.setOrigRanges(S,y),this.items.forEach(D=>{if(D instanceof e.Node)y=D.setOrigRanges(S,y);else if(S.length===0)D.origOffset=D.offset;else{let v=y;for(;vD.offset);)++v;D.origOffset=D.offset+v,y=v}}),y}toString(){let{context:{src:S},items:y,range:D,value:v}=this;if(v!=null)return v;let _=y.filter(N=>N instanceof e.Node),$="",q=D.start;return _.forEach(N=>{let M=S.slice(q,N.range.start);q=N.range.end,$+=M+String(N),$[$.length-1]===` `&&S[q-1]!==` `&&S[q]===` -`&&(q+=1)}),$+=S.slice(q,D.end),e.Node.addStringTerminator(S,D.end,$)}},k=class UT extends e.Node{static endOfQuote(y,D){let v=y[D];for(;v&&v!=='"';)D+=v==="\\"?2:1,v=y[D];return D+1}get strValue(){if(!this.valueRange||!this.context)return null;let y=[],{start:D,end:v}=this.valueRange,{indent:_,src:$}=this.context;$[v-1]!=='"'&&y.push(new e.YAMLSyntaxError(this,'Missing closing "quote'));let q="";for(let F=D+1;FI?$.slice(I,F+1):M)}else q+=M}return y.length>0?{errors:y,str:q}:q}parseCharCode(y,D,v){let{src:_}=this.context,$=_.substr(y,D),q=$.length===D&&/^[0-9a-fA-F]+$/.test($)?parseInt($,16):NaN;return isNaN(q)?(v.push(new e.YAMLSyntaxError(this,`Invalid escape sequence ${_.substr(y-2,D+2)}`)),_.substr(y-2,D+2)):String.fromCodePoint(q)}parse(y,D){this.context=y;let{src:v}=y,_=UT.endOfQuote(v,D+1);return this.valueRange=new e.Range(D,_),_=e.Node.endOfWhiteSpace(v,_),_=this.parseComment(_),_}},R=class VT extends e.Node{static endOfQuote(y,D){let v=y[D];for(;v;)if(v==="'"){if(y[D+1]!=="'")break;v=y[D+=2]}else v=y[D+=1];return D+1}get strValue(){if(!this.valueRange||!this.context)return null;let y=[],{start:D,end:v}=this.valueRange,{indent:_,src:$}=this.context;$[v-1]!=="'"&&y.push(new e.YAMLSyntaxError(this,"Missing closing 'quote"));let q="";for(let F=D+1;FI?$.slice(I,F+1):M)}else q+=M}return y.length>0?{errors:y,str:q}:q}parse(y,D){this.context=y;let{src:v}=y,_=VT.endOfQuote(v,D+1);return this.valueRange=new e.Range(D,_),_=e.Node.endOfWhiteSpace(v,_),_=this.parseComment(_),_}};function P(S,y){switch(S){case e.Type.ALIAS:return new d(S,y);case e.Type.BLOCK_FOLDED:case e.Type.BLOCK_LITERAL:return new m(S,y);case e.Type.FLOW_MAP:case e.Type.FLOW_SEQ:return new E(S,y);case e.Type.MAP_KEY:case e.Type.MAP_VALUE:case e.Type.SEQ_ITEM:return new r(S,y);case e.Type.COMMENT:case e.Type.PLAIN:return new e.PlainValue(S,y);case e.Type.QUOTE_DOUBLE:return new k(S,y);case e.Type.QUOTE_SINGLE:return new R(S,y);default:return null}}var A=class Bp{static parseType(y,D,v){switch(y[D]){case"*":return e.Type.ALIAS;case">":return e.Type.BLOCK_FOLDED;case"|":return e.Type.BLOCK_LITERAL;case"{":return e.Type.FLOW_MAP;case"[":return e.Type.FLOW_SEQ;case"?":return!v&&e.Node.atBlank(y,D+1,!0)?e.Type.MAP_KEY:e.Type.PLAIN;case":":return!v&&e.Node.atBlank(y,D+1,!0)?e.Type.MAP_VALUE:e.Type.PLAIN;case"-":return!v&&e.Node.atBlank(y,D+1,!0)?e.Type.SEQ_ITEM:e.Type.PLAIN;case'"':return e.Type.QUOTE_DOUBLE;case"'":return e.Type.QUOTE_SINGLE;default:return e.Type.PLAIN}}constructor(y={},{atLineStart:D,inCollection:v,inFlow:_,indent:$,lineStart:q,parent:F}={}){e._defineProperty(this,"parseNode",(M,I)=>{if(e.Node.atDocumentBoundary(this.src,I))return null;let Y=new Bp(this,M),{props:K,type:ne,valueStart:ge}=Y.parseProps(I),ye=P(ne,K),De=ye.parse(Y,ge);if(ye.range=new e.Range(I,De),De<=I&&(ye.error=new Error("Node#parse consumed no characters"),ye.error.parseEnd=De,ye.error.source=ye,ye.range.end=I+1),Y.nodeStartsCollection(ye)){!ye.error&&!Y.atLineStart&&Y.parent.type===e.Type.DOCUMENT&&(ye.error=new e.YAMLSyntaxError(ye,"Block collection must not have preceding content here (e.g. directives-end indicator)"));let Be=new a(ye);return De=Be.parse(new Bp(Y),De),Be.range=new e.Range(I,De),Be}return ye}),this.atLineStart=D!=null?D:y.atLineStart||!1,this.inCollection=v!=null?v:y.inCollection||!1,this.inFlow=_!=null?_:y.inFlow||!1,this.indent=$!=null?$:y.indent,this.lineStart=q!=null?q:y.lineStart,this.parent=F!=null?F:y.parent||{},this.root=y.root,this.src=y.src}nodeStartsCollection(y){let{inCollection:D,inFlow:v,src:_}=this;if(D||v)return!1;if(y instanceof r)return!0;let $=y.range.end;return _[$]===` +`&&(q+=1)}),$+=S.slice(q,D.end),e.Node.addStringTerminator(S,D.end,$)}},T=class Uk extends e.Node{static endOfQuote(y,D){let v=y[D];for(;v&&v!=='"';)D+=v==="\\"?2:1,v=y[D];return D+1}get strValue(){if(!this.valueRange||!this.context)return null;let y=[],{start:D,end:v}=this.valueRange,{indent:_,src:$}=this.context;$[v-1]!=='"'&&y.push(new e.YAMLSyntaxError(this,'Missing closing "quote'));let q="";for(let N=D+1;NI?$.slice(I,N+1):M)}else q+=M}return y.length>0?{errors:y,str:q}:q}parseCharCode(y,D,v){let{src:_}=this.context,$=_.substr(y,D),q=$.length===D&&/^[0-9a-fA-F]+$/.test($)?parseInt($,16):NaN;return isNaN(q)?(v.push(new e.YAMLSyntaxError(this,`Invalid escape sequence ${_.substr(y-2,D+2)}`)),_.substr(y-2,D+2)):String.fromCodePoint(q)}parse(y,D){this.context=y;let{src:v}=y,_=Uk.endOfQuote(v,D+1);return this.valueRange=new e.Range(D,_),_=e.Node.endOfWhiteSpace(v,_),_=this.parseComment(_),_}},R=class Vk extends e.Node{static endOfQuote(y,D){let v=y[D];for(;v;)if(v==="'"){if(y[D+1]!=="'")break;v=y[D+=2]}else v=y[D+=1];return D+1}get strValue(){if(!this.valueRange||!this.context)return null;let y=[],{start:D,end:v}=this.valueRange,{indent:_,src:$}=this.context;$[v-1]!=="'"&&y.push(new e.YAMLSyntaxError(this,"Missing closing 'quote"));let q="";for(let N=D+1;NI?$.slice(I,N+1):M)}else q+=M}return y.length>0?{errors:y,str:q}:q}parse(y,D){this.context=y;let{src:v}=y,_=Vk.endOfQuote(v,D+1);return this.valueRange=new e.Range(D,_),_=e.Node.endOfWhiteSpace(v,_),_=this.parseComment(_),_}};function P(S,y){switch(S){case e.Type.ALIAS:return new d(S,y);case e.Type.BLOCK_FOLDED:case e.Type.BLOCK_LITERAL:return new m(S,y);case e.Type.FLOW_MAP:case e.Type.FLOW_SEQ:return new E(S,y);case e.Type.MAP_KEY:case e.Type.MAP_VALUE:case e.Type.SEQ_ITEM:return new r(S,y);case e.Type.COMMENT:case e.Type.PLAIN:return new e.PlainValue(S,y);case e.Type.QUOTE_DOUBLE:return new T(S,y);case e.Type.QUOTE_SINGLE:return new R(S,y);default:return null}}var A=class Bp{static parseType(y,D,v){switch(y[D]){case"*":return e.Type.ALIAS;case">":return e.Type.BLOCK_FOLDED;case"|":return e.Type.BLOCK_LITERAL;case"{":return e.Type.FLOW_MAP;case"[":return e.Type.FLOW_SEQ;case"?":return!v&&e.Node.atBlank(y,D+1,!0)?e.Type.MAP_KEY:e.Type.PLAIN;case":":return!v&&e.Node.atBlank(y,D+1,!0)?e.Type.MAP_VALUE:e.Type.PLAIN;case"-":return!v&&e.Node.atBlank(y,D+1,!0)?e.Type.SEQ_ITEM:e.Type.PLAIN;case'"':return e.Type.QUOTE_DOUBLE;case"'":return e.Type.QUOTE_SINGLE;default:return e.Type.PLAIN}}constructor(y={},{atLineStart:D,inCollection:v,inFlow:_,indent:$,lineStart:q,parent:N}={}){e._defineProperty(this,"parseNode",(M,I)=>{if(e.Node.atDocumentBoundary(this.src,I))return null;let Y=new Bp(this,M),{props:K,type:ne,valueStart:ge}=Y.parseProps(I),ye=P(ne,K),De=ye.parse(Y,ge);if(ye.range=new e.Range(I,De),De<=I&&(ye.error=new Error("Node#parse consumed no characters"),ye.error.parseEnd=De,ye.error.source=ye,ye.range.end=I+1),Y.nodeStartsCollection(ye)){!ye.error&&!Y.atLineStart&&Y.parent.type===e.Type.DOCUMENT&&(ye.error=new e.YAMLSyntaxError(ye,"Block collection must not have preceding content here (e.g. directives-end indicator)"));let Be=new a(ye);return De=Be.parse(new Bp(Y),De),Be.range=new e.Range(I,De),Be}return ye}),this.atLineStart=D!=null?D:y.atLineStart||!1,this.inCollection=v!=null?v:y.inCollection||!1,this.inFlow=_!=null?_:y.inFlow||!1,this.indent=$!=null?$:y.indent,this.lineStart=q!=null?q:y.lineStart,this.parent=N!=null?N:y.parent||{},this.root=y.root,this.src=y.src}nodeStartsCollection(y){let{inCollection:D,inFlow:v,src:_}=this;if(D||v)return!1;if(y instanceof r)return!0;let $=y.range.end;return _[$]===` `||_[$-1]===` -`?!1:($=e.Node.endOfWhiteSpace(_,$),_[$]===":")}parseProps(y){let{inFlow:D,parent:v,src:_}=this,$=[],q=!1;y=this.atLineStart?e.Node.endOfIndent(_,y):e.Node.endOfWhiteSpace(_,y);let F=_[y];for(;F===e.Char.ANCHOR||F===e.Char.COMMENT||F===e.Char.TAG||F===` -`;){if(F===` +`?!1:($=e.Node.endOfWhiteSpace(_,$),_[$]===":")}parseProps(y){let{inFlow:D,parent:v,src:_}=this,$=[],q=!1;y=this.atLineStart?e.Node.endOfIndent(_,y):e.Node.endOfWhiteSpace(_,y);let N=_[y];for(;N===e.Char.ANCHOR||N===e.Char.COMMENT||N===e.Char.TAG||N===` +`;){if(N===` `){let I=y,Y;do Y=I+1,I=e.Node.endOfIndent(_,Y);while(_[I]===` -`);let K=I-(Y+this.indent),ne=v.type===e.Type.SEQ_ITEM&&v.context.atLineStart;if(_[I]!=="#"&&!e.Node.nextNodeIsIndented(_[I],K,!ne))break;this.atLineStart=!0,this.lineStart=Y,q=!1,y=I}else if(F===e.Char.COMMENT){let I=e.Node.endOfLine(_,y+1);$.push(new e.Range(y,I)),y=I}else{let I=e.Node.endOfIdentifier(_,y+1);F===e.Char.TAG&&_[I]===","&&/^[a-zA-Z0-9-]+\.[a-zA-Z0-9-]+,\d\d\d\d(-\d\d){0,2}\/\S/.test(_.slice(y+1,I+13))&&(I=e.Node.endOfIdentifier(_,I+5)),$.push(new e.Range(y,I)),q=!0,y=e.Node.endOfWhiteSpace(_,I)}F=_[y]}q&&F===":"&&e.Node.atBlank(_,y+1,!0)&&(y-=1);let M=Bp.parseType(_,y,D);return{props:$,type:M,valueStart:y}}};function N(S){let y=[];S.indexOf("\r")!==-1&&(S=S.replace(/\r\n?/g,(_,$)=>(_.length>1&&y.push($),` +`);let K=I-(Y+this.indent),ne=v.type===e.Type.SEQ_ITEM&&v.context.atLineStart;if(_[I]!=="#"&&!e.Node.nextNodeIsIndented(_[I],K,!ne))break;this.atLineStart=!0,this.lineStart=Y,q=!1,y=I}else if(N===e.Char.COMMENT){let I=e.Node.endOfLine(_,y+1);$.push(new e.Range(y,I)),y=I}else{let I=e.Node.endOfIdentifier(_,y+1);N===e.Char.TAG&&_[I]===","&&/^[a-zA-Z0-9-]+\.[a-zA-Z0-9-]+,\d\d\d\d(-\d\d){0,2}\/\S/.test(_.slice(y+1,I+13))&&(I=e.Node.endOfIdentifier(_,I+5)),$.push(new e.Range(y,I)),q=!0,y=e.Node.endOfWhiteSpace(_,I)}N=_[y]}q&&N===":"&&e.Node.atBlank(_,y+1,!0)&&(y-=1);let M=Bp.parseType(_,y,D);return{props:$,type:M,valueStart:y}}};function F(S){let y=[];S.indexOf("\r")!==-1&&(S=S.replace(/\r\n?/g,(_,$)=>(_.length>1&&y.push($),` `)));let D=[],v=0;do{let _=new l,$=new A({src:S});v=_.parse($,v),D.push(_)}while(v{if(y.length===0)return!1;for(let $=1;$D.join(`... -`),D}t.parse=N}),cl=Cs(t=>{var e=pa();function n(X,V,ee){return ee?`#${ee.replace(/[\s\S]^/gm,`$&${V}#`)} +`),D}t.parse=F}),ll=Cs(t=>{var e=pa();function n(X,V,ee){return ee?`#${ee.replace(/[\s\S]^/gm,`$&${V}#`)} ${V}${X}`:X}function r(X,V,ee){return ee?ee.indexOf(` `)===-1?`${X} #${ee}`:`${X} `+ee.replace(/^/gm,`${V||""}#`):X}var i=class{};function s(X,V,ee){if(Array.isArray(X))return X.map((ie,C)=>s(ie,String(C),ee));if(X&&typeof X.toJSON=="function"){let ie=ee&&ee.anchors&&ee.anchors.get(X);ie&&(ee.onCreate=g=>{ie.res=g,delete ee.onCreate});let C=X.toJSON(V,ee);return ie&&ee.onCreate&&ee.onCreate(C),C}return(!ee||!ee.keep)&&typeof X=="bigint"?Number(X):X}var a=class extends i{constructor(X){super(),this.value=X}toJSON(X,V){return V&&V.keep?this.value:s(this.value,X,V)}toString(){return String(this.value)}};function c(X,V,ee){let ie=ee;for(let C=V.length-1;C>=0;--C){let g=V[C];if(Number.isInteger(g)&&g>=0){let w=[];w[g]=ie,ie=w}else{let w={};Object.defineProperty(w,g,{value:ie,writable:!0,enumerable:!0,configurable:!0}),ie=w}}return X.createNode(ie,!1)}var l=X=>X==null||typeof X=="object"&&X[Symbol.iterator]().next().done,d=class Wa extends i{constructor(V){super(),e._defineProperty(this,"items",[]),this.schema=V}addIn(V,ee){if(l(V))this.add(ee);else{let[ie,...C]=V,g=this.get(ie,!0);if(g instanceof Wa)g.addIn(C,ee);else if(g===void 0&&this.schema)this.set(ie,c(this.schema,C,ee));else throw new Error(`Expected YAML collection at ${ie}. Remaining path: ${C}`)}}deleteIn([V,...ee]){if(ee.length===0)return this.delete(V);let ie=this.get(V,!0);if(ie instanceof Wa)return ie.deleteIn(ee);throw new Error(`Expected YAML collection at ${V}. Remaining path: ${ee}`)}getIn([V,...ee],ie){let C=this.get(V,!0);return ee.length===0?!ie&&C instanceof a?C.value:C:C instanceof Wa?C.getIn(ee,ie):void 0}hasAllNullValues(){return this.items.every(V=>{if(!V||V.type!=="PAIR")return!1;let ee=V.value;return ee==null||ee instanceof a&&ee.value==null&&!ee.commentBefore&&!ee.comment&&!ee.tag})}hasIn([V,...ee]){if(ee.length===0)return this.has(V);let ie=this.get(V,!0);return ie instanceof Wa?ie.hasIn(ee):!1}setIn([V,...ee],ie){if(ee.length===0)this.set(V,ie);else{let C=this.get(V,!0);if(C instanceof Wa)C.setIn(ee,ie);else if(C===void 0&&this.schema)this.set(V,c(this.schema,ee,ie));else throw new Error(`Expected YAML collection at ${V}. Remaining path: ${ee}`)}}toJSON(){return null}toString(V,{blockItem:ee,flowChars:ie,isMap:C,itemIndent:g},w,j){let{indent:J,indentStep:re,stringify:ce}=V,Ne=this.type===e.Type.FLOW_MAP||this.type===e.Type.FLOW_SEQ||V.inFlow;Ne&&(g+=re);let Je=C&&this.hasAllNullValues();V=Object.assign({},V,{allNullValues:Je,indent:g,inFlow:Ne,type:null});let He=!1,Xe=!1,je=this.items.reduce((cn,ht,Wt)=>{let wt;ht&&(!He&&ht.spaceBefore&&cn.push({type:"comment",str:""}),ht.commentBefore&&ht.commentBefore.match(/^.*$/gm).forEach(An=>{cn.push({type:"comment",str:`#${An}`})}),ht.comment&&(wt=ht.comment),Ne&&(!He&&ht.spaceBefore||ht.commentBefore||ht.comment||ht.key&&(ht.key.commentBefore||ht.key.comment)||ht.value&&(ht.value.commentBefore||ht.value.comment))&&(Xe=!0)),He=!1;let $n=ce(ht,V,()=>wt=null,()=>He=!0);return Ne&&!Xe&&$n.includes(` @@ -322,14 +322,14 @@ ${re}${J}${wt}`:` ${J}${ht}`}else gt=`${cn} ${Wt.join(" ")} ${ht}`}else{let cn=je.map(ee);gt=cn.shift();for(let ht of cn)gt+=ht?` ${J}${ht}`:` `}return this.comment?(gt+=` -`+this.comment.replace(/^/gm,`${J}#`),w&&w()):He&&j&&j(),gt}};e._defineProperty(d,"maxFlowStringSingleLineLength",60);function h(X){let V=X instanceof a?X.value:X;return V&&typeof V=="string"&&(V=Number(V)),Number.isInteger(V)&&V>=0?V:null}var m=class extends d{add(X){this.items.push(X)}delete(X){let V=h(X);return typeof V!="number"?!1:this.items.splice(V,1).length>0}get(X,V){let ee=h(X);if(typeof ee!="number")return;let ie=this.items[ee];return!V&&ie instanceof a?ie.value:ie}has(X){let V=h(X);return typeof V=="number"&&Vie.type==="comment"?ie.str:`- ${ie.str}`,flowChars:{start:"[",end:"]"},isMap:!1,itemIndent:(X.indent||"")+" "},V,ee):JSON.stringify(this)}},E=(X,V,ee)=>V===null?"":typeof V!="object"?String(V):X instanceof i&&ee&&ee.doc?X.toString({anchors:Object.create(null),doc:ee.doc,indent:"",indentStep:ee.indentStep,inFlow:!0,inStringifyKey:!0,stringify:ee.stringify}):JSON.stringify(V),k=class HT extends i{constructor(V,ee=null){super(),this.key=V,this.value=ee,this.type=HT.Type.PAIR}get commentBefore(){return this.key instanceof i?this.key.commentBefore:void 0}set commentBefore(V){if(this.key==null&&(this.key=new a(null)),this.key instanceof i)this.key.commentBefore=V;else{let ee="Pair.commentBefore is an alias for Pair.key.commentBefore. To set it, the key must be a Node.";throw new Error(ee)}}addToJSMap(V,ee){let ie=s(this.key,"",V);if(ee instanceof Map){let C=s(this.value,ie,V);ee.set(ie,C)}else if(ee instanceof Set)ee.add(ie);else{let C=E(this.key,ie,V),g=s(this.value,C,V);C in ee?Object.defineProperty(ee,C,{value:g,writable:!0,enumerable:!0,configurable:!0}):ee[C]=g}return ee}toJSON(V,ee){let ie=ee&&ee.mapAsMap?new Map:{};return this.addToJSMap(ee,ie)}toString(V,ee,ie){if(!V||!V.doc)return JSON.stringify(this);let{indent:C,indentSeq:g,simpleKeys:w}=V.doc.options,{key:j,value:J}=this,re=j instanceof i&&j.comment;if(w){if(re)throw new Error("With simple keys, key nodes cannot have comments");if(j instanceof d){let $n="With simple keys, collection cannot be used as a key value";throw new Error($n)}}let ce=!w&&(!j||re||(j instanceof i?j instanceof d||j.type===e.Type.BLOCK_FOLDED||j.type===e.Type.BLOCK_LITERAL:typeof j=="object")),{doc:Ne,indent:Je,indentStep:He,stringify:Xe}=V;V=Object.assign({},V,{implicitKey:!ce,indent:Je+He});let je=!1,gt=Xe(j,V,()=>re=null,()=>je=!0);if(gt=r(gt,V.indent,re),!ce&>.length>1024){if(w)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");ce=!0}if(V.allNullValues&&!w)return this.comment?(gt=r(gt,V.indent,this.comment),ee&&ee()):je&&!re&&ie&&ie(),V.inFlow&&!ce?gt:`? ${gt}`;gt=ce?`? ${gt} +`+this.comment.replace(/^/gm,`${J}#`),w&&w()):He&&j&&j(),gt}};e._defineProperty(d,"maxFlowStringSingleLineLength",60);function h(X){let V=X instanceof a?X.value:X;return V&&typeof V=="string"&&(V=Number(V)),Number.isInteger(V)&&V>=0?V:null}var m=class extends d{add(X){this.items.push(X)}delete(X){let V=h(X);return typeof V!="number"?!1:this.items.splice(V,1).length>0}get(X,V){let ee=h(X);if(typeof ee!="number")return;let ie=this.items[ee];return!V&&ie instanceof a?ie.value:ie}has(X){let V=h(X);return typeof V=="number"&&Vie.type==="comment"?ie.str:`- ${ie.str}`,flowChars:{start:"[",end:"]"},isMap:!1,itemIndent:(X.indent||"")+" "},V,ee):JSON.stringify(this)}},E=(X,V,ee)=>V===null?"":typeof V!="object"?String(V):X instanceof i&&ee&&ee.doc?X.toString({anchors:Object.create(null),doc:ee.doc,indent:"",indentStep:ee.indentStep,inFlow:!0,inStringifyKey:!0,stringify:ee.stringify}):JSON.stringify(V),T=class Hk extends i{constructor(V,ee=null){super(),this.key=V,this.value=ee,this.type=Hk.Type.PAIR}get commentBefore(){return this.key instanceof i?this.key.commentBefore:void 0}set commentBefore(V){if(this.key==null&&(this.key=new a(null)),this.key instanceof i)this.key.commentBefore=V;else{let ee="Pair.commentBefore is an alias for Pair.key.commentBefore. To set it, the key must be a Node.";throw new Error(ee)}}addToJSMap(V,ee){let ie=s(this.key,"",V);if(ee instanceof Map){let C=s(this.value,ie,V);ee.set(ie,C)}else if(ee instanceof Set)ee.add(ie);else{let C=E(this.key,ie,V),g=s(this.value,C,V);C in ee?Object.defineProperty(ee,C,{value:g,writable:!0,enumerable:!0,configurable:!0}):ee[C]=g}return ee}toJSON(V,ee){let ie=ee&&ee.mapAsMap?new Map:{};return this.addToJSMap(ee,ie)}toString(V,ee,ie){if(!V||!V.doc)return JSON.stringify(this);let{indent:C,indentSeq:g,simpleKeys:w}=V.doc.options,{key:j,value:J}=this,re=j instanceof i&&j.comment;if(w){if(re)throw new Error("With simple keys, key nodes cannot have comments");if(j instanceof d){let $n="With simple keys, collection cannot be used as a key value";throw new Error($n)}}let ce=!w&&(!j||re||(j instanceof i?j instanceof d||j.type===e.Type.BLOCK_FOLDED||j.type===e.Type.BLOCK_LITERAL:typeof j=="object")),{doc:Ne,indent:Je,indentStep:He,stringify:Xe}=V;V=Object.assign({},V,{implicitKey:!ce,indent:Je+He});let je=!1,gt=Xe(j,V,()=>re=null,()=>je=!0);if(gt=r(gt,V.indent,re),!ce&>.length>1024){if(w)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");ce=!0}if(V.allNullValues&&!w)return this.comment?(gt=r(gt,V.indent,this.comment),ee&&ee()):je&&!re&&ie&&ie(),V.inFlow&&!ce?gt:`? ${gt}`;gt=ce?`? ${gt} ${Je}:`:`${gt}:`,this.comment&&(gt=r(gt,V.indent,this.comment),ee&&ee());let cn="",ht=null;if(J instanceof i){if(J.spaceBefore&&(cn=` `),J.commentBefore){let $n=J.commentBefore.replace(/^/gm,`${V.indent}#`);cn+=` ${$n}`}ht=J.comment}else J&&typeof J=="object"&&(J=Ne.schema.createNode(J,!0));V.implicitKey=!1,!ce&&!this.comment&&J instanceof a&&(V.indentAtStart=gt.length+1),je=!1,!g&&C>=2&&!V.inFlow&&!ce&&J instanceof m&&J.type!==e.Type.FLOW_SEQ&&!J.tag&&!Ne.anchors.getName(J)&&(V.indent=V.indent.substr(2));let Wt=Xe(J,V,()=>ht=null,()=>je=!0),wt=" ";return cn||this.comment?wt=`${cn} ${V.indent}`:!ce&&J instanceof d?(!(Wt[0]==="["||Wt[0]==="{")||Wt.includes(` `))&&(wt=` ${V.indent}`):Wt[0]===` -`&&(wt=""),je&&!ht&&ie&&ie(),r(gt+wt+Wt,V.indent,ht)}};e._defineProperty(k,"Type",{PAIR:"PAIR",MERGE_PAIR:"MERGE_PAIR"});var R=(X,V)=>{if(X instanceof P){let ee=V.get(X.source);return ee.count*ee.aliasCount}else if(X instanceof d){let ee=0;for(let ie of X.items){let C=R(ie,V);C>ee&&(ee=C)}return ee}else if(X instanceof k){let ee=R(X.key,V),ie=R(X.value,V);return Math.max(ee,ie)}return 1},P=class KT extends i{static stringify({range:V,source:ee},{anchors:ie,doc:C,implicitKey:g,inStringifyKey:w}){let j=Object.keys(ie).find(re=>ie[re]===ee);if(!j&&w&&(j=C.anchors.getName(ee)||C.anchors.newName()),j)return`*${j}${g?" ":""}`;let J=C.anchors.getName(ee)?"Alias node must be after source node":"Source node not found for alias node";throw new Error(`${J} [${V}]`)}constructor(V){super(),this.source=V,this.type=e.Type.ALIAS}set tag(V){throw new Error("Alias nodes cannot have tags")}toJSON(V,ee){if(!ee)return s(this.source,V,ee);let{anchors:ie,maxAliasCount:C}=ee,g=ie.get(this.source);if(!g||g.res===void 0){let w="This should not happen: Alias anchor was not resolved?";throw this.cstNode?new e.YAMLReferenceError(this.cstNode,w):new ReferenceError(w)}if(C>=0&&(g.count+=1,g.aliasCount===0&&(g.aliasCount=R(this.source,ie)),g.count*g.aliasCount>C)){let w="Excessive alias count indicates a resource exhaustion attack";throw this.cstNode?new e.YAMLReferenceError(this.cstNode,w):new ReferenceError(w)}return g.res}toString(V){return KT.stringify(this,V)}};e._defineProperty(P,"default",!0);function A(X,V){let ee=V instanceof a?V.value:V;for(let ie of X)if(ie instanceof k&&(ie.key===V||ie.key===ee||ie.key&&ie.key.value===ee))return ie}var N=class extends d{add(X,V){X?X instanceof k||(X=new k(X.key||X,X.value)):X=new k(X);let ee=A(this.items,X.key),ie=this.schema&&this.schema.sortMapEntries;if(ee)if(V)ee.value=X.value;else throw new Error(`Key ${X.key} already set`);else if(ie){let C=this.items.findIndex(g=>ie(X,g)<0);C===-1?this.items.push(X):this.items.splice(C,0,X)}else this.items.push(X)}delete(X){let V=A(this.items,X);return V?this.items.splice(this.items.indexOf(V),1).length>0:!1}get(X,V){let ee=A(this.items,X),ie=ee&&ee.value;return!V&&ie instanceof a?ie.value:ie}has(X){return!!A(this.items,X)}set(X,V){this.add(new k(X,V),!0)}toJSON(X,V,ee){let ie=ee?new ee:V&&V.mapAsMap?new Map:{};V&&V.onCreate&&V.onCreate(ie);for(let C of this.items)C.addToJSMap(V,ie);return ie}toString(X,V,ee){if(!X)return JSON.stringify(this);for(let ie of this.items)if(!(ie instanceof k))throw new Error(`Map items must all be pairs; found ${JSON.stringify(ie)} instead`);return super.toString(X,{blockItem:ie=>ie.str,flowChars:{start:"{",end:"}"},isMap:!0,itemIndent:X.indent||""},V,ee)}},S="<<",y=class extends k{constructor(X){if(X instanceof k){let V=X.value;V instanceof m||(V=new m,V.items.push(X.value),V.range=X.value.range),super(X.key,V),this.range=X.range}else super(new a(S),new m);this.type=k.Type.MERGE_PAIR}addToJSMap(X,V){for(let{source:ee}of this.value.items){if(!(ee instanceof N))throw new Error("Merge sources must be maps");let ie=ee.toJSON(null,X,Map);for(let[C,g]of ie)V instanceof Map?V.has(C)||V.set(C,g):V instanceof Set?V.add(C):Object.prototype.hasOwnProperty.call(V,C)||Object.defineProperty(V,C,{value:g,writable:!0,enumerable:!0,configurable:!0})}return V}toString(X,V){let ee=this.value;if(ee.items.length>1)return super.toString(X,V);this.value=ee.items[0];let ie=super.toString(X,V);return this.value=ee,ie}},D={defaultType:e.Type.BLOCK_LITERAL,lineWidth:76},v={trueStr:"true",falseStr:"false"},_={asBigInt:!1},$={nullStr:"null"},q={defaultType:e.Type.PLAIN,doubleQuoted:{jsonEncoding:!1,minMultiLineLength:40},fold:{lineWidth:80,minContentWidth:20}};function F(X,V,ee){for(let{format:ie,test:C,resolve:g}of V)if(C){let w=X.match(C);if(w){let j=g.apply(null,w);return j instanceof a||(j=new a(j)),ie&&(j.format=ie),j}}return ee&&(X=ee(X)),new a(X)}var M="flow",I="block",Y="quoted",K=(X,V)=>{let ee=X[V+1];for(;ee===" "||ee===" ";){do ee=X[V+=1];while(ee&&ee!==` +`&&(wt=""),je&&!ht&&ie&&ie(),r(gt+wt+Wt,V.indent,ht)}};e._defineProperty(T,"Type",{PAIR:"PAIR",MERGE_PAIR:"MERGE_PAIR"});var R=(X,V)=>{if(X instanceof P){let ee=V.get(X.source);return ee.count*ee.aliasCount}else if(X instanceof d){let ee=0;for(let ie of X.items){let C=R(ie,V);C>ee&&(ee=C)}return ee}else if(X instanceof T){let ee=R(X.key,V),ie=R(X.value,V);return Math.max(ee,ie)}return 1},P=class Kk extends i{static stringify({range:V,source:ee},{anchors:ie,doc:C,implicitKey:g,inStringifyKey:w}){let j=Object.keys(ie).find(re=>ie[re]===ee);if(!j&&w&&(j=C.anchors.getName(ee)||C.anchors.newName()),j)return`*${j}${g?" ":""}`;let J=C.anchors.getName(ee)?"Alias node must be after source node":"Source node not found for alias node";throw new Error(`${J} [${V}]`)}constructor(V){super(),this.source=V,this.type=e.Type.ALIAS}set tag(V){throw new Error("Alias nodes cannot have tags")}toJSON(V,ee){if(!ee)return s(this.source,V,ee);let{anchors:ie,maxAliasCount:C}=ee,g=ie.get(this.source);if(!g||g.res===void 0){let w="This should not happen: Alias anchor was not resolved?";throw this.cstNode?new e.YAMLReferenceError(this.cstNode,w):new ReferenceError(w)}if(C>=0&&(g.count+=1,g.aliasCount===0&&(g.aliasCount=R(this.source,ie)),g.count*g.aliasCount>C)){let w="Excessive alias count indicates a resource exhaustion attack";throw this.cstNode?new e.YAMLReferenceError(this.cstNode,w):new ReferenceError(w)}return g.res}toString(V){return Kk.stringify(this,V)}};e._defineProperty(P,"default",!0);function A(X,V){let ee=V instanceof a?V.value:V;for(let ie of X)if(ie instanceof T&&(ie.key===V||ie.key===ee||ie.key&&ie.key.value===ee))return ie}var F=class extends d{add(X,V){X?X instanceof T||(X=new T(X.key||X,X.value)):X=new T(X);let ee=A(this.items,X.key),ie=this.schema&&this.schema.sortMapEntries;if(ee)if(V)ee.value=X.value;else throw new Error(`Key ${X.key} already set`);else if(ie){let C=this.items.findIndex(g=>ie(X,g)<0);C===-1?this.items.push(X):this.items.splice(C,0,X)}else this.items.push(X)}delete(X){let V=A(this.items,X);return V?this.items.splice(this.items.indexOf(V),1).length>0:!1}get(X,V){let ee=A(this.items,X),ie=ee&&ee.value;return!V&&ie instanceof a?ie.value:ie}has(X){return!!A(this.items,X)}set(X,V){this.add(new T(X,V),!0)}toJSON(X,V,ee){let ie=ee?new ee:V&&V.mapAsMap?new Map:{};V&&V.onCreate&&V.onCreate(ie);for(let C of this.items)C.addToJSMap(V,ie);return ie}toString(X,V,ee){if(!X)return JSON.stringify(this);for(let ie of this.items)if(!(ie instanceof T))throw new Error(`Map items must all be pairs; found ${JSON.stringify(ie)} instead`);return super.toString(X,{blockItem:ie=>ie.str,flowChars:{start:"{",end:"}"},isMap:!0,itemIndent:X.indent||""},V,ee)}},S="<<",y=class extends T{constructor(X){if(X instanceof T){let V=X.value;V instanceof m||(V=new m,V.items.push(X.value),V.range=X.value.range),super(X.key,V),this.range=X.range}else super(new a(S),new m);this.type=T.Type.MERGE_PAIR}addToJSMap(X,V){for(let{source:ee}of this.value.items){if(!(ee instanceof F))throw new Error("Merge sources must be maps");let ie=ee.toJSON(null,X,Map);for(let[C,g]of ie)V instanceof Map?V.has(C)||V.set(C,g):V instanceof Set?V.add(C):Object.prototype.hasOwnProperty.call(V,C)||Object.defineProperty(V,C,{value:g,writable:!0,enumerable:!0,configurable:!0})}return V}toString(X,V){let ee=this.value;if(ee.items.length>1)return super.toString(X,V);this.value=ee.items[0];let ie=super.toString(X,V);return this.value=ee,ie}},D={defaultType:e.Type.BLOCK_LITERAL,lineWidth:76},v={trueStr:"true",falseStr:"false"},_={asBigInt:!1},$={nullStr:"null"},q={defaultType:e.Type.PLAIN,doubleQuoted:{jsonEncoding:!1,minMultiLineLength:40},fold:{lineWidth:80,minContentWidth:20}};function N(X,V,ee){for(let{format:ie,test:C,resolve:g}of V)if(C){let w=X.match(C);if(w){let j=g.apply(null,w);return j instanceof a||(j=new a(j)),ie&&(j.format=ie),j}}return ee&&(X=ee(X)),new a(X)}var M="flow",I="block",Y="quoted",K=(X,V)=>{let ee=X[V+1];for(;ee===" "||ee===" ";){do ee=X[V+=1];while(ee&&ee!==` `);ee=X[V+1]}return V};function ne(X,V,ee,{indentAtStart:ie,lineWidth:C=80,minContentWidth:g=20,onFold:w,onOverflow:j}){if(!C||C<0)return X;let J=Math.max(1+g,1+C-V.length);if(X.length<=J)return X;let re=[],ce={},Ne=C-V.length;typeof ie=="number"&&(ie>C-Math.max(2,g)?re.push(0):Ne=C-ie);let Je,He,Xe=!1,je=-1,gt=-1,cn=-1;ee===I&&(je=K(X,je),je!==-1&&(Ne=je+J));for(let Wt;Wt=X[je+=1];){if(ee===Y&&Wt==="\\"){switch(gt=je,X[je+1]){case"x":je+=3;break;case"u":je+=5;break;case"U":je+=9;break;default:je+=1}cn=je}if(Wt===` `)ee===I&&(je=K(X,je)),Ne=je+J,Je=void 0;else{if(Wt===" "&&He&&He!==" "&&He!==` `&&He!==" "){let wt=X[je+1];wt&&wt!==" "&&wt!==` @@ -349,44 +349,44 @@ $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\ ${w}${Je}`}function H(X,V,ee,ie){let{comment:C,type:g,value:w}=X,{actualString:j,implicitKey:J,indent:re,inFlow:ce}=V;if(J&&/[\n[\]{},]/.test(w)||ce&&/[[\]{},]/.test(w))return Be(w,V);if(!w||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(w))return J||ce||w.indexOf(` `)===-1?w.indexOf('"')!==-1&&w.indexOf("'")===-1?nt(w,V):Be(w,V):Se(X,V,ee,ie);if(!J&&!ce&&g!==e.Type.PLAIN&&w.indexOf(` `)!==-1)return Se(X,V,ee,ie);if(re===""&&ye(w))return V.forceBlockIndent=!0,Se(X,V,ee,ie);let Ne=w.replace(/\n+/g,`$& -${re}`);if(j){let{tags:He}=V.doc.schema;if(typeof F(Ne,He,He.scalarFallback).value!="string")return Be(w,V)}let Je=J?Ne:ne(Ne,re,M,ge(V));return C&&!ce&&(Je.indexOf(` +${re}`);if(j){let{tags:He}=V.doc.schema;if(typeof N(Ne,He,He.scalarFallback).value!="string")return Be(w,V)}let Je=J?Ne:ne(Ne,re,M,ge(V));return C&&!ce&&(Je.indexOf(` `)!==-1||C.indexOf(` `)!==-1)?(ee&&ee(),n(Je,re,C)):Je}function fe(X,V,ee,ie){let{defaultType:C}=q,{implicitKey:g,inFlow:w}=V,{type:j,value:J}=X;typeof J!="string"&&(J=String(J),X=Object.assign({},X,{value:J}));let re=Ne=>{switch(Ne){case e.Type.BLOCK_FOLDED:case e.Type.BLOCK_LITERAL:return Se(X,V,ee,ie);case e.Type.QUOTE_DOUBLE:return Be(J,V);case e.Type.QUOTE_SINGLE:return nt(J,V);case e.Type.PLAIN:return H(X,V,ee,ie);default:return null}};(j!==e.Type.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f]/.test(J)||(g||w)&&(j===e.Type.BLOCK_FOLDED||j===e.Type.BLOCK_LITERAL))&&(j=e.Type.QUOTE_DOUBLE);let ce=re(j);if(ce===null&&(ce=re(C),ce===null))throw new Error(`Unsupported default string type ${C}`);return ce}function ae({format:X,minFractionDigits:V,tag:ee,value:ie}){if(typeof ie=="bigint")return String(ie);if(!isFinite(ie))return isNaN(ie)?".nan":ie<0?"-.inf":".inf";let C=JSON.stringify(ie);if(!X&&V&&(!ee||ee==="tag:yaml.org,2002:float")&&/^\d/.test(C)){let g=C.indexOf(".");g<0&&(g=C.length,C+=".");let w=V-(C.length-g-1);for(;w-- >0;)C+="0"}return C}function U(X,V){let ee,ie;switch(V.type){case e.Type.FLOW_MAP:ee="}",ie="flow map";break;case e.Type.FLOW_SEQ:ee="]",ie="flow sequence";break;default:X.push(new e.YAMLSemanticError(V,"Not a flow collection!?"));return}let C;for(let g=V.items.length-1;g>=0;--g){let w=V.items[g];if(!w||w.type!==e.Type.COMMENT){C=w;break}}if(C&&C.char!==ee){let g=`Expected ${ie} to end with ${ee}`,w;typeof C.offset=="number"?(w=new e.YAMLSemanticError(V,g),w.offset=C.offset+1):(w=new e.YAMLSemanticError(C,g),C.range&&C.range.end&&(w.offset=C.range.end-C.range.start)),X.push(w)}}function Z(X,V){let ee=V.context.src[V.range.start-1];if(ee!==` `&&ee!==" "&&ee!==" "){let ie="Comments must be separated from other tokens by white space characters";X.push(new e.YAMLSemanticError(V,ie))}}function pe(X,V){let ee=String(V),ie=ee.substr(0,8)+"..."+ee.substr(-8);return new e.YAMLSemanticError(X,`The "${ie}" key is too long`)}function Me(X,V){for(let{afterKey:ee,before:ie,comment:C}of V){let g=X.items[ie];g?(ee&&g.value&&(g=g.value),C===void 0?(ee||!g.commentBefore)&&(g.spaceBefore=!0):g.commentBefore?g.commentBefore+=` `+C:g.commentBefore=C):C!==void 0&&(X.comment?X.comment+=` -`+C:X.comment=C)}}function Ie(X,V){let ee=V.strValue;return ee?typeof ee=="string"?ee:(ee.errors.forEach(ie=>{ie.source||(ie.source=V),X.errors.push(ie)}),ee.str):""}function qe(X,V){let{handle:ee,suffix:ie}=V.tag,C=X.tagPrefixes.find(g=>g.handle===ee);if(!C){let g=X.getDefaults().tagPrefixes;if(g&&(C=g.find(w=>w.handle===ee)),!C)throw new e.YAMLSemanticError(V,`The ${ee} tag handle is non-default and was not declared.`)}if(!ie)throw new e.YAMLSemanticError(V,`The ${ee} tag has no suffix.`);if(ee==="!"&&(X.version||X.options.version)==="1.0"){if(ie[0]==="^")return X.warnings.push(new e.YAMLWarning(V,"YAML 1.0 ^ tag expansion is not supported")),ie;if(/[:/]/.test(ie)){let g=ie.match(/^([a-z0-9-]+)\/(.*)/i);return g?`tag:${g[1]}.yaml.org,2002:${g[2]}`:`tag:${ie}`}}return C.prefix+decodeURIComponent(ie)}function ze(X,V){let{tag:ee,type:ie}=V,C=!1;if(ee){let{handle:g,suffix:w,verbatim:j}=ee;if(j){if(j!=="!"&&j!=="!!")return j;let J=`Verbatim tags aren't resolved, so ${j} is invalid.`;X.errors.push(new e.YAMLSemanticError(V,J))}else if(g==="!"&&!w)C=!0;else try{return qe(X,V)}catch(J){X.errors.push(J)}}switch(ie){case e.Type.BLOCK_FOLDED:case e.Type.BLOCK_LITERAL:case e.Type.QUOTE_DOUBLE:case e.Type.QUOTE_SINGLE:return e.defaultTags.STR;case e.Type.FLOW_MAP:case e.Type.MAP:return e.defaultTags.MAP;case e.Type.FLOW_SEQ:case e.Type.SEQ:return e.defaultTags.SEQ;case e.Type.PLAIN:return C?e.defaultTags.STR:null;default:return null}}function Ge(X,V,ee){let{tags:ie}=X.schema,C=[];for(let w of ie)if(w.tag===ee)if(w.test)C.push(w);else{let j=w.resolve(X,V);return j instanceof d?j:new a(j)}let g=Ie(X,V);return typeof g=="string"&&C.length>0?F(g,C,ie.scalarFallback):null}function rt({type:X}){switch(X){case e.Type.FLOW_MAP:case e.Type.MAP:return e.defaultTags.MAP;case e.Type.FLOW_SEQ:case e.Type.SEQ:return e.defaultTags.SEQ;default:return e.defaultTags.STR}}function _n(X,V,ee){try{let ie=Ge(X,V,ee);if(ie)return ee&&V.tag&&(ie.tag=ee),ie}catch(ie){return ie.source||(ie.source=V),X.errors.push(ie),null}try{let ie=rt(V);if(!ie)throw new Error(`The tag ${ee} is unavailable`);let C=`The tag ${ee} is unavailable, falling back to ${ie}`;X.warnings.push(new e.YAMLWarning(V,C));let g=Ge(X,V,ie);return g.tag=ee,g}catch(ie){let C=new e.YAMLReferenceError(V,ie.message);return C.stack=ie.stack,X.errors.push(C),null}}var at=X=>{if(!X)return!1;let{type:V}=X;return V===e.Type.MAP_KEY||V===e.Type.MAP_VALUE||V===e.Type.SEQ_ITEM};function un(X,V){let ee={before:[],after:[]},ie=!1,C=!1,g=at(V.context.parent)?V.context.parent.props.concat(V.props):V.props;for(let{start:w,end:j}of g)switch(V.context.src[w]){case e.Char.COMMENT:{if(!V.commentHasRequiredWhitespace(w)){let ce="Comments must be separated from other tokens by white space characters";X.push(new e.YAMLSemanticError(V,ce))}let{header:J,valueRange:re}=V;(re&&(w>re.start||J&&w>J.start)?ee.after:ee.before).push(V.context.src.slice(w+1,j));break}case e.Char.ANCHOR:if(ie){let J="A node can have at most one anchor";X.push(new e.YAMLSemanticError(V,J))}ie=!0;break;case e.Char.TAG:if(C){let J="A node can have at most one tag";X.push(new e.YAMLSemanticError(V,J))}C=!0;break}return{comments:ee,hasAnchor:ie,hasTag:C}}function Sn(X,V){let{anchors:ee,errors:ie,schema:C}=X;if(V.type===e.Type.ALIAS){let w=V.rawValue,j=ee.getNode(w);if(!j){let re=`Aliased anchor not found: ${w}`;return ie.push(new e.YAMLReferenceError(V,re)),null}let J=new P(j);return ee._cstAliases.push(J),J}let g=ze(X,V);if(g)return _n(X,V,g);if(V.type!==e.Type.PLAIN){let w=`Failed to resolve ${V.type} node here`;return ie.push(new e.YAMLSyntaxError(V,w)),null}try{let w=Ie(X,V);return F(w,C.tags,C.tags.scalarFallback)}catch(w){return w.source||(w.source=V),ie.push(w),null}}function Mt(X,V){if(!V)return null;V.error&&X.errors.push(V.error);let{comments:ee,hasAnchor:ie,hasTag:C}=un(X.errors,V);if(ie){let{anchors:w}=X,j=V.anchor,J=w.getNode(j);J&&(w.map[w.newName(j)]=J),w.map[j]=V}if(V.type===e.Type.ALIAS&&(ie||C)){let w="An alias node must not specify any properties";X.errors.push(new e.YAMLSemanticError(V,w))}let g=Sn(X,V);if(g){g.range=[V.range.start,V.range.end],X.options.keepCstNodes&&(g.cstNode=V),X.options.keepNodeTypes&&(g.type=V.type);let w=ee.before.join(` +`+C:X.comment=C)}}function Ie(X,V){let ee=V.strValue;return ee?typeof ee=="string"?ee:(ee.errors.forEach(ie=>{ie.source||(ie.source=V),X.errors.push(ie)}),ee.str):""}function qe(X,V){let{handle:ee,suffix:ie}=V.tag,C=X.tagPrefixes.find(g=>g.handle===ee);if(!C){let g=X.getDefaults().tagPrefixes;if(g&&(C=g.find(w=>w.handle===ee)),!C)throw new e.YAMLSemanticError(V,`The ${ee} tag handle is non-default and was not declared.`)}if(!ie)throw new e.YAMLSemanticError(V,`The ${ee} tag has no suffix.`);if(ee==="!"&&(X.version||X.options.version)==="1.0"){if(ie[0]==="^")return X.warnings.push(new e.YAMLWarning(V,"YAML 1.0 ^ tag expansion is not supported")),ie;if(/[:/]/.test(ie)){let g=ie.match(/^([a-z0-9-]+)\/(.*)/i);return g?`tag:${g[1]}.yaml.org,2002:${g[2]}`:`tag:${ie}`}}return C.prefix+decodeURIComponent(ie)}function ze(X,V){let{tag:ee,type:ie}=V,C=!1;if(ee){let{handle:g,suffix:w,verbatim:j}=ee;if(j){if(j!=="!"&&j!=="!!")return j;let J=`Verbatim tags aren't resolved, so ${j} is invalid.`;X.errors.push(new e.YAMLSemanticError(V,J))}else if(g==="!"&&!w)C=!0;else try{return qe(X,V)}catch(J){X.errors.push(J)}}switch(ie){case e.Type.BLOCK_FOLDED:case e.Type.BLOCK_LITERAL:case e.Type.QUOTE_DOUBLE:case e.Type.QUOTE_SINGLE:return e.defaultTags.STR;case e.Type.FLOW_MAP:case e.Type.MAP:return e.defaultTags.MAP;case e.Type.FLOW_SEQ:case e.Type.SEQ:return e.defaultTags.SEQ;case e.Type.PLAIN:return C?e.defaultTags.STR:null;default:return null}}function Ge(X,V,ee){let{tags:ie}=X.schema,C=[];for(let w of ie)if(w.tag===ee)if(w.test)C.push(w);else{let j=w.resolve(X,V);return j instanceof d?j:new a(j)}let g=Ie(X,V);return typeof g=="string"&&C.length>0?N(g,C,ie.scalarFallback):null}function rt({type:X}){switch(X){case e.Type.FLOW_MAP:case e.Type.MAP:return e.defaultTags.MAP;case e.Type.FLOW_SEQ:case e.Type.SEQ:return e.defaultTags.SEQ;default:return e.defaultTags.STR}}function _n(X,V,ee){try{let ie=Ge(X,V,ee);if(ie)return ee&&V.tag&&(ie.tag=ee),ie}catch(ie){return ie.source||(ie.source=V),X.errors.push(ie),null}try{let ie=rt(V);if(!ie)throw new Error(`The tag ${ee} is unavailable`);let C=`The tag ${ee} is unavailable, falling back to ${ie}`;X.warnings.push(new e.YAMLWarning(V,C));let g=Ge(X,V,ie);return g.tag=ee,g}catch(ie){let C=new e.YAMLReferenceError(V,ie.message);return C.stack=ie.stack,X.errors.push(C),null}}var at=X=>{if(!X)return!1;let{type:V}=X;return V===e.Type.MAP_KEY||V===e.Type.MAP_VALUE||V===e.Type.SEQ_ITEM};function un(X,V){let ee={before:[],after:[]},ie=!1,C=!1,g=at(V.context.parent)?V.context.parent.props.concat(V.props):V.props;for(let{start:w,end:j}of g)switch(V.context.src[w]){case e.Char.COMMENT:{if(!V.commentHasRequiredWhitespace(w)){let ce="Comments must be separated from other tokens by white space characters";X.push(new e.YAMLSemanticError(V,ce))}let{header:J,valueRange:re}=V;(re&&(w>re.start||J&&w>J.start)?ee.after:ee.before).push(V.context.src.slice(w+1,j));break}case e.Char.ANCHOR:if(ie){let J="A node can have at most one anchor";X.push(new e.YAMLSemanticError(V,J))}ie=!0;break;case e.Char.TAG:if(C){let J="A node can have at most one tag";X.push(new e.YAMLSemanticError(V,J))}C=!0;break}return{comments:ee,hasAnchor:ie,hasTag:C}}function Sn(X,V){let{anchors:ee,errors:ie,schema:C}=X;if(V.type===e.Type.ALIAS){let w=V.rawValue,j=ee.getNode(w);if(!j){let re=`Aliased anchor not found: ${w}`;return ie.push(new e.YAMLReferenceError(V,re)),null}let J=new P(j);return ee._cstAliases.push(J),J}let g=ze(X,V);if(g)return _n(X,V,g);if(V.type!==e.Type.PLAIN){let w=`Failed to resolve ${V.type} node here`;return ie.push(new e.YAMLSyntaxError(V,w)),null}try{let w=Ie(X,V);return N(w,C.tags,C.tags.scalarFallback)}catch(w){return w.source||(w.source=V),ie.push(w),null}}function Mt(X,V){if(!V)return null;V.error&&X.errors.push(V.error);let{comments:ee,hasAnchor:ie,hasTag:C}=un(X.errors,V);if(ie){let{anchors:w}=X,j=V.anchor,J=w.getNode(j);J&&(w.map[w.newName(j)]=J),w.map[j]=V}if(V.type===e.Type.ALIAS&&(ie||C)){let w="An alias node must not specify any properties";X.errors.push(new e.YAMLSemanticError(V,w))}let g=Sn(X,V);if(g){g.range=[V.range.start,V.range.end],X.options.keepCstNodes&&(g.cstNode=V),X.options.keepNodeTypes&&(g.type=V.type);let w=ee.before.join(` `);w&&(g.commentBefore=g.commentBefore?`${g.commentBefore} ${w}`:w);let j=ee.after.join(` `);j&&(g.comment=g.comment?`${g.comment} -${j}`:j)}return V.resolved=g}function Tn(X,V){if(V.type!==e.Type.MAP&&V.type!==e.Type.FLOW_MAP){let w=`A ${V.type} node cannot be resolved as a mapping`;return X.errors.push(new e.YAMLSyntaxError(V,w)),null}let{comments:ee,items:ie}=V.type===e.Type.FLOW_MAP?Vn(X,V):Lt(X,V),C=new N;C.items=ie,Me(C,ee);let g=!1;for(let w=0;w{if(ce instanceof P){let{type:Ne}=ce.source;return Ne===e.Type.MAP||Ne===e.Type.FLOW_MAP?!1:re="Merge nodes aliases can only point to maps"}return re="Merge nodes can only have Alias nodes as values"}),re&&X.errors.push(new e.YAMLSemanticError(V,re))}else for(let J=w+1;J{if(ie.length===0)return!1;let{start:C}=ie[0];if(V&&C>V.valueRange.start||ee[C]!==e.Char.COMMENT)return!1;for(let g=X;g0){J=new e.PlainValue(e.Type.PLAIN,[]),J.context={parent:j,src:j.context.src};let ce=j.range.start+1;if(J.range={start:ce,end:ce},J.valueRange={start:ce,end:ce},typeof j.range.origStart=="number"){let Ne=j.range.origStart+1;J.range.origStart=J.range.origEnd=Ne,J.valueRange.origStart=J.valueRange.origEnd=Ne}}let re=new k(C,Mt(X,J));kn(j,re),ie.push(re),C&&typeof g=="number"&&j.range.start>g+1024&&X.errors.push(pe(V,C)),C=void 0,g=null}break;default:C!==void 0&&ie.push(new k(C)),C=Mt(X,j),g=j.range.start,j.error&&X.errors.push(j.error);e:for(let J=w+1;;++J){let re=V.items[J];switch(re&&re.type){case e.Type.BLANK_LINE:case e.Type.COMMENT:continue e;case e.Type.MAP_VALUE:break e;default:{let ce="Implicit map keys need to be followed by map values";X.errors.push(new e.YAMLSemanticError(j,ce));break e}}}if(j.valueRangeContainsNewline){let J="Implicit map keys need to be on a single line";X.errors.push(new e.YAMLSemanticError(j,J))}}}return C!==void 0&&ie.push(new k(C)),{comments:ee,items:ie}}function Vn(X,V){let ee=[],ie=[],C,g=!1,w="{";for(let j=0;jg instanceof k&&g.key instanceof d)){let g="Keys with collection values will be stringified as YAML due to JS Object restrictions. Use mapAsMap: true to avoid this.";X.warnings.push(new e.YAMLWarning(V,g))}return V.resolved=C,C}function Rn(X,V){let ee=[],ie=[];for(let C=0;Cw+1024&&X.errors.push(pe(V,g));let{src:Xe}=J.context;for(let je=w;je{var e=pa(),n=cl(),r={identify:F=>F instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve:(F,M)=>{let I=n.resolveString(F,M);if(typeof is=="function")return is.from(I,"base64");if(typeof atob=="function"){let Y=atob(I.replace(/[\n\r]/g,"")),K=new Uint8Array(Y.length);for(let ne=0;ne{let ge;if(typeof is=="function")ge=I instanceof is?I.toString("base64"):is.from(I.buffer).toString("base64");else if(typeof btoa=="function"){let ye="";for(let De=0;De1){let ge="Each pair must have its own sequence indicator";throw new e.YAMLSemanticError(M,ge)}let ne=K.items[0]||new n.Pair;K.commentBefore&&(ne.commentBefore=ne.commentBefore?`${K.commentBefore} +${j}`:j)}return V.resolved=g}function kn(X,V){if(V.type!==e.Type.MAP&&V.type!==e.Type.FLOW_MAP){let w=`A ${V.type} node cannot be resolved as a mapping`;return X.errors.push(new e.YAMLSyntaxError(V,w)),null}let{comments:ee,items:ie}=V.type===e.Type.FLOW_MAP?Vn(X,V):Lt(X,V),C=new F;C.items=ie,Me(C,ee);let g=!1;for(let w=0;w{if(ce instanceof P){let{type:Ne}=ce.source;return Ne===e.Type.MAP||Ne===e.Type.FLOW_MAP?!1:re="Merge nodes aliases can only point to maps"}return re="Merge nodes can only have Alias nodes as values"}),re&&X.errors.push(new e.YAMLSemanticError(V,re))}else for(let J=w+1;J{if(ie.length===0)return!1;let{start:C}=ie[0];if(V&&C>V.valueRange.start||ee[C]!==e.Char.COMMENT)return!1;for(let g=X;g0){J=new e.PlainValue(e.Type.PLAIN,[]),J.context={parent:j,src:j.context.src};let ce=j.range.start+1;if(J.range={start:ce,end:ce},J.valueRange={start:ce,end:ce},typeof j.range.origStart=="number"){let Ne=j.range.origStart+1;J.range.origStart=J.range.origEnd=Ne,J.valueRange.origStart=J.valueRange.origEnd=Ne}}let re=new T(C,Mt(X,J));Tn(j,re),ie.push(re),C&&typeof g=="number"&&j.range.start>g+1024&&X.errors.push(pe(V,C)),C=void 0,g=null}break;default:C!==void 0&&ie.push(new T(C)),C=Mt(X,j),g=j.range.start,j.error&&X.errors.push(j.error);e:for(let J=w+1;;++J){let re=V.items[J];switch(re&&re.type){case e.Type.BLANK_LINE:case e.Type.COMMENT:continue e;case e.Type.MAP_VALUE:break e;default:{let ce="Implicit map keys need to be followed by map values";X.errors.push(new e.YAMLSemanticError(j,ce));break e}}}if(j.valueRangeContainsNewline){let J="Implicit map keys need to be on a single line";X.errors.push(new e.YAMLSemanticError(j,J))}}}return C!==void 0&&ie.push(new T(C)),{comments:ee,items:ie}}function Vn(X,V){let ee=[],ie=[],C,g=!1,w="{";for(let j=0;jg instanceof T&&g.key instanceof d)){let g="Keys with collection values will be stringified as YAML due to JS Object restrictions. Use mapAsMap: true to avoid this.";X.warnings.push(new e.YAMLWarning(V,g))}return V.resolved=C,C}function Rn(X,V){let ee=[],ie=[];for(let C=0;Cw+1024&&X.errors.push(pe(V,g));let{src:Xe}=J.context;for(let je=w;je{var e=pa(),n=ll(),r={identify:N=>N instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve:(N,M)=>{let I=n.resolveString(N,M);if(typeof is=="function")return is.from(I,"base64");if(typeof atob=="function"){let Y=atob(I.replace(/[\n\r]/g,"")),K=new Uint8Array(Y.length);for(let ne=0;ne{let ge;if(typeof is=="function")ge=I instanceof is?I.toString("base64"):is.from(I.buffer).toString("base64");else if(typeof btoa=="function"){let ye="";for(let De=0;De1){let ge="Each pair must have its own sequence indicator";throw new e.YAMLSemanticError(M,ge)}let ne=K.items[0]||new n.Pair;K.commentBefore&&(ne.commentBefore=ne.commentBefore?`${K.commentBefore} ${ne.commentBefore}`:K.commentBefore),K.comment&&(ne.comment=ne.comment?`${K.comment} -${ne.comment}`:K.comment),K=ne}I.items[Y]=K instanceof n.Pair?K:new n.Pair(K)}}return I}function s(F,M,I){let Y=new n.YAMLSeq(F);Y.tag="tag:yaml.org,2002:pairs";for(let K of M){let ne,ge;if(Array.isArray(K))if(K.length===2)ne=K[0],ge=K[1];else throw new TypeError(`Expected [key, value] tuple: ${K}`);else if(K&&K instanceof Object){let De=Object.keys(K);if(De.length===1)ne=De[0],ge=K[ne];else throw new TypeError(`Expected { key: value } tuple: ${K}`)}else ne=K;let ye=F.createPair(ne,ge,I);Y.items.push(ye)}return Y}var a={default:!1,tag:"tag:yaml.org,2002:pairs",resolve:i,createNode:s},c=class zT extends n.YAMLSeq{constructor(){super(),e._defineProperty(this,"add",n.YAMLMap.prototype.add.bind(this)),e._defineProperty(this,"delete",n.YAMLMap.prototype.delete.bind(this)),e._defineProperty(this,"get",n.YAMLMap.prototype.get.bind(this)),e._defineProperty(this,"has",n.YAMLMap.prototype.has.bind(this)),e._defineProperty(this,"set",n.YAMLMap.prototype.set.bind(this)),this.tag=zT.tag}toJSON(M,I){let Y=new Map;I&&I.onCreate&&I.onCreate(Y);for(let K of this.items){let ne,ge;if(K instanceof n.Pair?(ne=n.toJSON(K.key,"",I),ge=n.toJSON(K.value,ne,I)):ne=n.toJSON(K,"",I),Y.has(ne))throw new Error("Ordered maps must not include duplicate keys");Y.set(ne,ge)}return Y}};e._defineProperty(c,"tag","tag:yaml.org,2002:omap");function l(F,M){let I=i(F,M),Y=[];for(let{key:K}of I.items)if(K instanceof n.Scalar)if(Y.includes(K.value)){let ne="Ordered maps must not include duplicate keys";throw new e.YAMLSemanticError(M,ne)}else Y.push(K.value);return Object.assign(new c,I)}function d(F,M,I){let Y=s(F,M,I),K=new c;return K.items=Y.items,K}var h={identify:F=>F instanceof Map,nodeClass:c,default:!1,tag:"tag:yaml.org,2002:omap",resolve:l,createNode:d},m=class YT extends n.YAMLMap{constructor(){super(),this.tag=YT.tag}add(M){let I=M instanceof n.Pair?M:new n.Pair(M);n.findPair(this.items,I.key)||this.items.push(I)}get(M,I){let Y=n.findPair(this.items,M);return!I&&Y instanceof n.Pair?Y.key instanceof n.Scalar?Y.key.value:Y.key:Y}set(M,I){if(typeof I!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof I}`);let Y=n.findPair(this.items,M);Y&&!I?this.items.splice(this.items.indexOf(Y),1):!Y&&I&&this.items.push(new n.Pair(M))}toJSON(M,I){return super.toJSON(M,I,Set)}toString(M,I,Y){if(!M)return JSON.stringify(this);if(this.hasAllNullValues())return super.toString(M,I,Y);throw new Error("Set items must all have null values")}};e._defineProperty(m,"tag","tag:yaml.org,2002:set");function E(F,M){let I=n.resolveMap(F,M);if(!I.hasAllNullValues())throw new e.YAMLSemanticError(M,"Set items must all have null values");return Object.assign(new m,I)}function k(F,M,I){let Y=new m;for(let K of M)Y.items.push(F.createPair(K,null,I));return Y}var R={identify:F=>F instanceof Set,nodeClass:m,default:!1,tag:"tag:yaml.org,2002:set",resolve:E,createNode:k},P=(F,M)=>{let I=M.split(":").reduce((Y,K)=>Y*60+Number(K),0);return F==="-"?-I:I},A=({value:F})=>{if(isNaN(F)||!isFinite(F))return n.stringifyNumber(F);let M="";F<0&&(M="-",F=Math.abs(F));let I=[F%60];return F<60?I.unshift(0):(F=Math.round((F-I[0])/60),I.unshift(F%60),F>=60&&(F=Math.round((F-I[0])/60),I.unshift(F))),M+I.map(Y=>Y<10?"0"+String(Y):String(Y)).join(":").replace(/000000\d*$/,"")},N={identify:F=>typeof F=="number",default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+)$/,resolve:(F,M,I)=>P(M,I.replace(/_/g,"")),stringify:A},S={identify:F=>typeof F=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*)$/,resolve:(F,M,I)=>P(M,I.replace(/_/g,"")),stringify:A},y={identify:F=>F instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^(?:([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?)$"),resolve:(F,M,I,Y,K,ne,ge,ye,De)=>{ye&&(ye=(ye+"00").substr(1,3));let Be=Date.UTC(M,I-1,Y,K||0,ne||0,ge||0,ye||0);if(De&&De!=="Z"){let nt=P(De[0],De.slice(1));Math.abs(nt)<30&&(nt*=60),Be-=6e4*nt}return new Date(Be)},stringify:({value:F})=>F.toISOString().replace(/((T00:00)?:00)?\.000Z$/,"")};function D(F){let M={};return F?typeof YAML_SILENCE_DEPRECATION_WARNINGS<"u"?!YAML_SILENCE_DEPRECATION_WARNINGS:!M.YAML_SILENCE_DEPRECATION_WARNINGS:typeof YAML_SILENCE_WARNINGS<"u"?!YAML_SILENCE_WARNINGS:!M.YAML_SILENCE_WARNINGS}function v(F,M){D(!1)&&console.warn(M?`${M}: ${F}`:F)}function _(F){if(D(!0)){let M=F.replace(/.*yaml[/\\]/i,"").replace(/\.js$/,"").replace(/\\/g,"/");v(`The endpoint 'yaml/${M}' will be removed in a future release.`,"DeprecationWarning")}}var $={};function q(F,M){if(!$[F]&&D(!0)){$[F]=!0;let I=`The option '${F}' will be removed in a future release`;I+=M?`, use '${M}' instead.`:".",v(I,"DeprecationWarning")}}t.binary=r,t.floatTime=S,t.intTime=N,t.omap=h,t.pairs=a,t.set=R,t.timestamp=y,t.warn=v,t.warnFileDeprecation=_,t.warnOptionDeprecation=q}),S$=Cs(t=>{var e=pa(),n=cl(),r=E$();function i(H,fe,ae){let U=new n.YAMLMap(H);if(fe instanceof Map)for(let[Z,pe]of fe)U.items.push(H.createPair(Z,pe,ae));else if(fe&&typeof fe=="object")for(let Z of Object.keys(fe))U.items.push(H.createPair(Z,fe[Z],ae));return typeof H.sortMapEntries=="function"&&U.items.sort(H.sortMapEntries),U}var s={createNode:i,default:!0,nodeClass:n.YAMLMap,tag:"tag:yaml.org,2002:map",resolve:n.resolveMap};function a(H,fe,ae){let U=new n.YAMLSeq(H);if(fe&&fe[Symbol.iterator])for(let Z of fe){let pe=H.createNode(Z,ae.wrapScalars,null,ae);U.items.push(pe)}return U}var c={createNode:a,default:!0,nodeClass:n.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve:n.resolveSeq},l={identify:H=>typeof H=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:n.resolveString,stringify(H,fe,ae,U){return fe=Object.assign({actualString:!0},fe),n.stringifyString(H,fe,ae,U)},options:n.strOptions},d=[s,c,l],h=H=>typeof H=="bigint"||Number.isInteger(H),m=(H,fe,ae)=>n.intOptions.asBigInt?BigInt(H):parseInt(fe,ae);function E(H,fe,ae){let{value:U}=H;return h(U)&&U>=0?ae+U.toString(fe):n.stringifyNumber(H)}var k={identify:H=>H==null,createNode:(H,fe,ae)=>ae.wrapScalars?new n.Scalar(null):null,default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>null,options:n.nullOptions,stringify:()=>n.nullOptions.nullStr},R={identify:H=>typeof H=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:H=>H[0]==="t"||H[0]==="T",options:n.boolOptions,stringify:({value:H})=>H?n.boolOptions.trueStr:n.boolOptions.falseStr},P={identify:H=>h(H)&&H>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o([0-7]+)$/,resolve:(H,fe)=>m(H,fe,8),options:n.intOptions,stringify:H=>E(H,8,"0o")},A={identify:h,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:H=>m(H,H,10),options:n.intOptions,stringify:n.stringifyNumber},N={identify:H=>h(H)&&H>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x([0-9a-fA-F]+)$/,resolve:(H,fe)=>m(H,fe,16),options:n.intOptions,stringify:H=>E(H,16,"0x")},S={identify:H=>typeof H=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.inf|(\.nan))$/i,resolve:(H,fe)=>fe?NaN:H[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:n.stringifyNumber},y={identify:H=>typeof H=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:H=>parseFloat(H),stringify:({value:H})=>Number(H).toExponential()},D={identify:H=>typeof H=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.([0-9]+)|[0-9]+\.([0-9]*))$/,resolve(H,fe,ae){let U=fe||ae,Z=new n.Scalar(parseFloat(H));return U&&U[U.length-1]==="0"&&(Z.minFractionDigits=U.length),Z},stringify:n.stringifyNumber},v=d.concat([k,R,P,A,N,S,y,D]),_=H=>typeof H=="bigint"||Number.isInteger(H),$=({value:H})=>JSON.stringify(H),q=[s,c,{identify:H=>typeof H=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:n.resolveString,stringify:$},{identify:H=>H==null,createNode:(H,fe,ae)=>ae.wrapScalars?new n.Scalar(null):null,default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:$},{identify:H=>typeof H=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true|false$/,resolve:H=>H==="true",stringify:$},{identify:_,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:H=>n.intOptions.asBigInt?BigInt(H):parseInt(H,10),stringify:({value:H})=>_(H)?H.toString():JSON.stringify(H)},{identify:H=>typeof H=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:H=>parseFloat(H),stringify:$}];q.scalarFallback=H=>{throw new SyntaxError(`Unresolved plain scalar ${JSON.stringify(H)}`)};var F=({value:H})=>H?n.boolOptions.trueStr:n.boolOptions.falseStr,M=H=>typeof H=="bigint"||Number.isInteger(H);function I(H,fe,ae){let U=fe.replace(/_/g,"");if(n.intOptions.asBigInt){switch(ae){case 2:U=`0b${U}`;break;case 8:U=`0o${U}`;break;case 16:U=`0x${U}`;break}let pe=BigInt(U);return H==="-"?BigInt(-1)*pe:pe}let Z=parseInt(U,ae);return H==="-"?-1*Z:Z}function Y(H,fe,ae){let{value:U}=H;if(M(U)){let Z=U.toString(fe);return U<0?"-"+ae+Z.substr(1):ae+Z}return n.stringifyNumber(H)}var K=d.concat([{identify:H=>H==null,createNode:(H,fe,ae)=>ae.wrapScalars?new n.Scalar(null):null,default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>null,options:n.nullOptions,stringify:()=>n.nullOptions.nullStr},{identify:H=>typeof H=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>!0,options:n.boolOptions,stringify:F},{identify:H=>typeof H=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/i,resolve:()=>!1,options:n.boolOptions,stringify:F},{identify:M,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^([-+]?)0b([0-1_]+)$/,resolve:(H,fe,ae)=>I(fe,ae,2),stringify:H=>Y(H,2,"0b")},{identify:M,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^([-+]?)0([0-7_]+)$/,resolve:(H,fe,ae)=>I(fe,ae,8),stringify:H=>Y(H,8,"0")},{identify:M,default:!0,tag:"tag:yaml.org,2002:int",test:/^([-+]?)([0-9][0-9_]*)$/,resolve:(H,fe,ae)=>I(fe,ae,10),stringify:n.stringifyNumber},{identify:M,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^([-+]?)0x([0-9a-fA-F_]+)$/,resolve:(H,fe,ae)=>I(fe,ae,16),stringify:H=>Y(H,16,"0x")},{identify:H=>typeof H=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.inf|(\.nan))$/i,resolve:(H,fe)=>fe?NaN:H[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:n.stringifyNumber},{identify:H=>typeof H=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?([0-9][0-9_]*)?(\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:H=>parseFloat(H.replace(/_/g,"")),stringify:({value:H})=>Number(H).toExponential()},{identify:H=>typeof H=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.([0-9_]*)$/,resolve(H,fe){let ae=new n.Scalar(parseFloat(H.replace(/_/g,"")));if(fe){let U=fe.replace(/_/g,"");U[U.length-1]==="0"&&(ae.minFractionDigits=U.length)}return ae},stringify:n.stringifyNumber}],r.binary,r.omap,r.pairs,r.set,r.intTime,r.floatTime,r.timestamp),ne={core:v,failsafe:d,json:q,yaml11:K},ge={binary:r.binary,bool:R,float:D,floatExp:y,floatNaN:S,floatTime:r.floatTime,int:A,intHex:N,intOct:P,intTime:r.intTime,map:s,null:k,omap:r.omap,pairs:r.pairs,seq:c,set:r.set,timestamp:r.timestamp};function ye(H,fe,ae){if(fe){let U=ae.filter(pe=>pe.tag===fe),Z=U.find(pe=>!pe.format)||U[0];if(!Z)throw new Error(`Tag ${fe} not found`);return Z}return ae.find(U=>(U.identify&&U.identify(H)||U.class&&H instanceof U.class)&&!U.format)}function De(H,fe,ae){if(H instanceof n.Node)return H;let{defaultPrefix:U,onTagObj:Z,prevObjects:pe,schema:Me,wrapScalars:Ie}=ae;fe&&fe.startsWith("!!")&&(fe=U+fe.slice(2));let qe=ye(H,fe,Me.tags);if(!qe){if(typeof H.toJSON=="function"&&(H=H.toJSON()),!H||typeof H!="object")return Ie?new n.Scalar(H):H;qe=H instanceof Map?s:H[Symbol.iterator]?c:s}Z&&(Z(qe),delete ae.onTagObj);let ze={value:void 0,node:void 0};if(H&&typeof H=="object"&&pe){let Ge=pe.get(H);if(Ge){let rt=new n.Alias(Ge);return ae.aliasNodes.push(rt),rt}ze.value=H,pe.set(H,ze)}return ze.node=qe.createNode?qe.createNode(ae.schema,H,ae):Ie?new n.Scalar(H):H,fe&&ze.node instanceof n.Node&&(ze.node.tag=fe),ze.node}function Be(H,fe,ae,U){let Z=H[U.replace(/\W/g,"")];if(!Z){let pe=Object.keys(H).map(Me=>JSON.stringify(Me)).join(", ");throw new Error(`Unknown schema "${U}"; use one of ${pe}`)}if(Array.isArray(ae))for(let pe of ae)Z=Z.concat(pe);else typeof ae=="function"&&(Z=ae(Z.slice()));for(let pe=0;peJSON.stringify(ze)).join(", ");throw new Error(`Unknown custom tag "${Me}"; use one of ${qe}`)}Z[pe]=Ie}}return Z}var nt=(H,fe)=>H.keyfe.key?1:0,Se=class GT{constructor({customTags:fe,merge:ae,schema:U,sortMapEntries:Z,tags:pe}){this.merge=!!ae,this.name=U,this.sortMapEntries=Z===!0?nt:Z||null,!fe&&pe&&r.warnOptionDeprecation("tags","customTags"),this.tags=Be(ne,ge,fe||pe,U)}createNode(fe,ae,U,Z){let pe={defaultPrefix:GT.defaultPrefix,schema:this,wrapScalars:ae},Me=Z?Object.assign(Z,pe):pe;return De(fe,U,Me)}createPair(fe,ae,U){U||(U={wrapScalars:!0});let Z=this.createNode(fe,U.wrapScalars,null,U),pe=this.createNode(ae,U.wrapScalars,null,U);return new n.Pair(Z,pe)}};e._defineProperty(Se,"defaultPrefix",e.defaultTagPrefix),e._defineProperty(Se,"defaultTags",e.defaultTags),t.Schema=Se}),mM=Cs(t=>{var e=pa(),n=cl(),r=S$(),i={anchorPrefix:"a",customTags:null,indent:2,indentSeq:!0,keepCstNodes:!1,keepNodeTypes:!0,keepBlobsInJSON:!0,mapAsMap:!1,maxAliasCount:100,prettyErrors:!1,simpleKeys:!1,version:"1.2"},s={get binary(){return n.binaryOptions},set binary(D){Object.assign(n.binaryOptions,D)},get bool(){return n.boolOptions},set bool(D){Object.assign(n.boolOptions,D)},get int(){return n.intOptions},set int(D){Object.assign(n.intOptions,D)},get null(){return n.nullOptions},set null(D){Object.assign(n.nullOptions,D)},get str(){return n.strOptions},set str(D){Object.assign(n.strOptions,D)}},a={"1.0":{schema:"yaml-1.1",merge:!0,tagPrefixes:[{handle:"!",prefix:e.defaultTagPrefix},{handle:"!!",prefix:"tag:private.yaml.org,2002:"}]},1.1:{schema:"yaml-1.1",merge:!0,tagPrefixes:[{handle:"!",prefix:"!"},{handle:"!!",prefix:e.defaultTagPrefix}]},1.2:{schema:"core",merge:!1,tagPrefixes:[{handle:"!",prefix:"!"},{handle:"!!",prefix:e.defaultTagPrefix}]}};function c(D,v){if((D.version||D.options.version)==="1.0"){let q=v.match(/^tag:private\.yaml\.org,2002:([^:/]+)$/);if(q)return"!"+q[1];let F=v.match(/^tag:([a-zA-Z0-9-]+)\.yaml\.org,2002:(.*)/);return F?`!${F[1]}/${F[2]}`:`!${v.replace(/^tag:/,"")}`}let _=D.tagPrefixes.find(q=>v.indexOf(q.prefix)===0);if(!_){let q=D.getDefaults().tagPrefixes;_=q&&q.find(F=>v.indexOf(F.prefix)===0)}if(!_)return v[0]==="!"?v:`!<${v}>`;let $=v.substr(_.prefix.length).replace(/[!,[\]{}]/g,q=>({"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"})[q]);return _.handle+$}function l(D,v){if(v instanceof n.Alias)return n.Alias;if(v.tag){let q=D.filter(F=>F.tag===v.tag);if(q.length>0)return q.find(F=>F.format===v.format)||q[0]}let _,$;if(v instanceof n.Scalar){$=v.value;let q=D.filter(F=>F.identify&&F.identify($)||F.class&&$ instanceof F.class);_=q.find(F=>F.format===v.format)||q.find(F=>!F.format)}else $=v,_=D.find(q=>q.nodeClass&&$ instanceof q.nodeClass);if(!_){let q=$&&$.constructor?$.constructor.name:typeof $;throw new Error(`Tag not resolved for ${q} value`)}return _}function d(D,v,{anchors:_,doc:$}){let q=[],F=$.anchors.getName(D);return F&&(_[F]=D,q.push(`&${F}`)),D.tag?q.push(c($,D.tag)):v.default||q.push(c($,v.tag)),q.join(" ")}function h(D,v,_,$){let{anchors:q,schema:F}=v.doc,M;if(!(D instanceof n.Node)){let K={aliasNodes:[],onTagObj:ne=>M=ne,prevObjects:new Map};D=F.createNode(D,!0,null,K);for(let ne of K.aliasNodes){ne.source=ne.source.node;let ge=q.getName(ne.source);ge||(ge=q.newName(),q.map[ge]=ne.source)}}if(D instanceof n.Pair)return D.toString(v,_,$);M||(M=l(F.tags,D));let I=d(D,M,v);I.length>0&&(v.indentAtStart=(v.indentAtStart||0)+I.length+1);let Y=typeof M.stringify=="function"?M.stringify(D,v,_,$):D instanceof n.Scalar?n.stringifyString(D,v,_,$):D.toString(v,_,$);return I?D instanceof n.Scalar||Y[0]==="{"||Y[0]==="["?`${I} ${Y}`:`${I} -${v.indent}${Y}`:Y}var m=class JT{static validAnchorNode(v){return v instanceof n.Scalar||v instanceof n.YAMLSeq||v instanceof n.YAMLMap}constructor(v){e._defineProperty(this,"map",Object.create(null)),this.prefix=v}createAlias(v,_){return this.setAnchor(v,_),new n.Alias(v)}createMergePair(...v){let _=new n.Merge;return _.value.items=v.map($=>{if($ instanceof n.Alias){if($.source instanceof n.YAMLMap)return $}else if($ instanceof n.YAMLMap)return this.createAlias($);throw new Error("Merge sources must be Map nodes or their Aliases")}),_}getName(v){let{map:_}=this;return Object.keys(_).find($=>_[$]===v)}getNames(){return Object.keys(this.map)}getNode(v){return this.map[v]}newName(v){v||(v=this.prefix);let _=Object.keys(this.map);for(let $=1;;++$){let q=`${v}${$}`;if(!_.includes(q))return q}}resolveNodes(){let{map:v,_cstAliases:_}=this;Object.keys(v).forEach($=>{v[$]=v[$].resolved}),_.forEach($=>{$.source=$.source.resolved}),delete this._cstAliases}setAnchor(v,_){if(v!=null&&!JT.validAnchorNode(v))throw new Error("Anchors may only be set for Scalar, Seq and Map nodes");if(_&&/[\x00-\x19\s,[\]{}]/.test(_))throw new Error("Anchor names must not contain whitespace or control characters");let{map:$}=this,q=v&&Object.keys($).find(F=>$[F]===v);if(q)if(_)q!==_&&(delete $[q],$[_]=v);else return q;else{if(!_){if(!v)return null;_=this.newName()}$[_]=v}return _}},E=(D,v)=>{if(D&&typeof D=="object"){let{tag:_}=D;D instanceof n.Collection?(_&&(v[_]=!0),D.items.forEach($=>E($,v))):D instanceof n.Pair?(E(D.key,v),E(D.value,v)):D instanceof n.Scalar&&_&&(v[_]=!0)}return v},k=D=>Object.keys(E(D,{}));function R(D,v){let _={before:[],after:[]},$,q=!1;for(let F of v)if(F.valueRange){if($!==void 0){let I="Document contains trailing content not separated by a ... or --- line";D.errors.push(new e.YAMLSyntaxError(F,I));break}let M=n.resolveNode(D,F);q&&(M.spaceBefore=!0,q=!1),$=M}else F.comment!==null?($===void 0?_.before:_.after).push(F.comment):F.type===e.Type.BLANK_LINE&&(q=!0,$===void 0&&_.before.length>0&&!D.commentBefore&&(D.commentBefore=_.before.join(` +${ne.comment}`:K.comment),K=ne}I.items[Y]=K instanceof n.Pair?K:new n.Pair(K)}}return I}function s(N,M,I){let Y=new n.YAMLSeq(N);Y.tag="tag:yaml.org,2002:pairs";for(let K of M){let ne,ge;if(Array.isArray(K))if(K.length===2)ne=K[0],ge=K[1];else throw new TypeError(`Expected [key, value] tuple: ${K}`);else if(K&&K instanceof Object){let De=Object.keys(K);if(De.length===1)ne=De[0],ge=K[ne];else throw new TypeError(`Expected { key: value } tuple: ${K}`)}else ne=K;let ye=N.createPair(ne,ge,I);Y.items.push(ye)}return Y}var a={default:!1,tag:"tag:yaml.org,2002:pairs",resolve:i,createNode:s},c=class zk extends n.YAMLSeq{constructor(){super(),e._defineProperty(this,"add",n.YAMLMap.prototype.add.bind(this)),e._defineProperty(this,"delete",n.YAMLMap.prototype.delete.bind(this)),e._defineProperty(this,"get",n.YAMLMap.prototype.get.bind(this)),e._defineProperty(this,"has",n.YAMLMap.prototype.has.bind(this)),e._defineProperty(this,"set",n.YAMLMap.prototype.set.bind(this)),this.tag=zk.tag}toJSON(M,I){let Y=new Map;I&&I.onCreate&&I.onCreate(Y);for(let K of this.items){let ne,ge;if(K instanceof n.Pair?(ne=n.toJSON(K.key,"",I),ge=n.toJSON(K.value,ne,I)):ne=n.toJSON(K,"",I),Y.has(ne))throw new Error("Ordered maps must not include duplicate keys");Y.set(ne,ge)}return Y}};e._defineProperty(c,"tag","tag:yaml.org,2002:omap");function l(N,M){let I=i(N,M),Y=[];for(let{key:K}of I.items)if(K instanceof n.Scalar)if(Y.includes(K.value)){let ne="Ordered maps must not include duplicate keys";throw new e.YAMLSemanticError(M,ne)}else Y.push(K.value);return Object.assign(new c,I)}function d(N,M,I){let Y=s(N,M,I),K=new c;return K.items=Y.items,K}var h={identify:N=>N instanceof Map,nodeClass:c,default:!1,tag:"tag:yaml.org,2002:omap",resolve:l,createNode:d},m=class Yk extends n.YAMLMap{constructor(){super(),this.tag=Yk.tag}add(M){let I=M instanceof n.Pair?M:new n.Pair(M);n.findPair(this.items,I.key)||this.items.push(I)}get(M,I){let Y=n.findPair(this.items,M);return!I&&Y instanceof n.Pair?Y.key instanceof n.Scalar?Y.key.value:Y.key:Y}set(M,I){if(typeof I!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof I}`);let Y=n.findPair(this.items,M);Y&&!I?this.items.splice(this.items.indexOf(Y),1):!Y&&I&&this.items.push(new n.Pair(M))}toJSON(M,I){return super.toJSON(M,I,Set)}toString(M,I,Y){if(!M)return JSON.stringify(this);if(this.hasAllNullValues())return super.toString(M,I,Y);throw new Error("Set items must all have null values")}};e._defineProperty(m,"tag","tag:yaml.org,2002:set");function E(N,M){let I=n.resolveMap(N,M);if(!I.hasAllNullValues())throw new e.YAMLSemanticError(M,"Set items must all have null values");return Object.assign(new m,I)}function T(N,M,I){let Y=new m;for(let K of M)Y.items.push(N.createPair(K,null,I));return Y}var R={identify:N=>N instanceof Set,nodeClass:m,default:!1,tag:"tag:yaml.org,2002:set",resolve:E,createNode:T},P=(N,M)=>{let I=M.split(":").reduce((Y,K)=>Y*60+Number(K),0);return N==="-"?-I:I},A=({value:N})=>{if(isNaN(N)||!isFinite(N))return n.stringifyNumber(N);let M="";N<0&&(M="-",N=Math.abs(N));let I=[N%60];return N<60?I.unshift(0):(N=Math.round((N-I[0])/60),I.unshift(N%60),N>=60&&(N=Math.round((N-I[0])/60),I.unshift(N))),M+I.map(Y=>Y<10?"0"+String(Y):String(Y)).join(":").replace(/000000\d*$/,"")},F={identify:N=>typeof N=="number",default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+)$/,resolve:(N,M,I)=>P(M,I.replace(/_/g,"")),stringify:A},S={identify:N=>typeof N=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*)$/,resolve:(N,M,I)=>P(M,I.replace(/_/g,"")),stringify:A},y={identify:N=>N instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^(?:([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?)$"),resolve:(N,M,I,Y,K,ne,ge,ye,De)=>{ye&&(ye=(ye+"00").substr(1,3));let Be=Date.UTC(M,I-1,Y,K||0,ne||0,ge||0,ye||0);if(De&&De!=="Z"){let nt=P(De[0],De.slice(1));Math.abs(nt)<30&&(nt*=60),Be-=6e4*nt}return new Date(Be)},stringify:({value:N})=>N.toISOString().replace(/((T00:00)?:00)?\.000Z$/,"")};function D(N){let M={};return N?typeof YAML_SILENCE_DEPRECATION_WARNINGS<"u"?!YAML_SILENCE_DEPRECATION_WARNINGS:!M.YAML_SILENCE_DEPRECATION_WARNINGS:typeof YAML_SILENCE_WARNINGS<"u"?!YAML_SILENCE_WARNINGS:!M.YAML_SILENCE_WARNINGS}function v(N,M){D(!1)&&console.warn(M?`${M}: ${N}`:N)}function _(N){if(D(!0)){let M=N.replace(/.*yaml[/\\]/i,"").replace(/\.js$/,"").replace(/\\/g,"/");v(`The endpoint 'yaml/${M}' will be removed in a future release.`,"DeprecationWarning")}}var $={};function q(N,M){if(!$[N]&&D(!0)){$[N]=!0;let I=`The option '${N}' will be removed in a future release`;I+=M?`, use '${M}' instead.`:".",v(I,"DeprecationWarning")}}t.binary=r,t.floatTime=S,t.intTime=F,t.omap=h,t.pairs=a,t.set=R,t.timestamp=y,t.warn=v,t.warnFileDeprecation=_,t.warnOptionDeprecation=q}),S$=Cs(t=>{var e=pa(),n=ll(),r=E$();function i(H,fe,ae){let U=new n.YAMLMap(H);if(fe instanceof Map)for(let[Z,pe]of fe)U.items.push(H.createPair(Z,pe,ae));else if(fe&&typeof fe=="object")for(let Z of Object.keys(fe))U.items.push(H.createPair(Z,fe[Z],ae));return typeof H.sortMapEntries=="function"&&U.items.sort(H.sortMapEntries),U}var s={createNode:i,default:!0,nodeClass:n.YAMLMap,tag:"tag:yaml.org,2002:map",resolve:n.resolveMap};function a(H,fe,ae){let U=new n.YAMLSeq(H);if(fe&&fe[Symbol.iterator])for(let Z of fe){let pe=H.createNode(Z,ae.wrapScalars,null,ae);U.items.push(pe)}return U}var c={createNode:a,default:!0,nodeClass:n.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve:n.resolveSeq},l={identify:H=>typeof H=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:n.resolveString,stringify(H,fe,ae,U){return fe=Object.assign({actualString:!0},fe),n.stringifyString(H,fe,ae,U)},options:n.strOptions},d=[s,c,l],h=H=>typeof H=="bigint"||Number.isInteger(H),m=(H,fe,ae)=>n.intOptions.asBigInt?BigInt(H):parseInt(fe,ae);function E(H,fe,ae){let{value:U}=H;return h(U)&&U>=0?ae+U.toString(fe):n.stringifyNumber(H)}var T={identify:H=>H==null,createNode:(H,fe,ae)=>ae.wrapScalars?new n.Scalar(null):null,default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>null,options:n.nullOptions,stringify:()=>n.nullOptions.nullStr},R={identify:H=>typeof H=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:H=>H[0]==="t"||H[0]==="T",options:n.boolOptions,stringify:({value:H})=>H?n.boolOptions.trueStr:n.boolOptions.falseStr},P={identify:H=>h(H)&&H>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o([0-7]+)$/,resolve:(H,fe)=>m(H,fe,8),options:n.intOptions,stringify:H=>E(H,8,"0o")},A={identify:h,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:H=>m(H,H,10),options:n.intOptions,stringify:n.stringifyNumber},F={identify:H=>h(H)&&H>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x([0-9a-fA-F]+)$/,resolve:(H,fe)=>m(H,fe,16),options:n.intOptions,stringify:H=>E(H,16,"0x")},S={identify:H=>typeof H=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.inf|(\.nan))$/i,resolve:(H,fe)=>fe?NaN:H[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:n.stringifyNumber},y={identify:H=>typeof H=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:H=>parseFloat(H),stringify:({value:H})=>Number(H).toExponential()},D={identify:H=>typeof H=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.([0-9]+)|[0-9]+\.([0-9]*))$/,resolve(H,fe,ae){let U=fe||ae,Z=new n.Scalar(parseFloat(H));return U&&U[U.length-1]==="0"&&(Z.minFractionDigits=U.length),Z},stringify:n.stringifyNumber},v=d.concat([T,R,P,A,F,S,y,D]),_=H=>typeof H=="bigint"||Number.isInteger(H),$=({value:H})=>JSON.stringify(H),q=[s,c,{identify:H=>typeof H=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:n.resolveString,stringify:$},{identify:H=>H==null,createNode:(H,fe,ae)=>ae.wrapScalars?new n.Scalar(null):null,default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:$},{identify:H=>typeof H=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true|false$/,resolve:H=>H==="true",stringify:$},{identify:_,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:H=>n.intOptions.asBigInt?BigInt(H):parseInt(H,10),stringify:({value:H})=>_(H)?H.toString():JSON.stringify(H)},{identify:H=>typeof H=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:H=>parseFloat(H),stringify:$}];q.scalarFallback=H=>{throw new SyntaxError(`Unresolved plain scalar ${JSON.stringify(H)}`)};var N=({value:H})=>H?n.boolOptions.trueStr:n.boolOptions.falseStr,M=H=>typeof H=="bigint"||Number.isInteger(H);function I(H,fe,ae){let U=fe.replace(/_/g,"");if(n.intOptions.asBigInt){switch(ae){case 2:U=`0b${U}`;break;case 8:U=`0o${U}`;break;case 16:U=`0x${U}`;break}let pe=BigInt(U);return H==="-"?BigInt(-1)*pe:pe}let Z=parseInt(U,ae);return H==="-"?-1*Z:Z}function Y(H,fe,ae){let{value:U}=H;if(M(U)){let Z=U.toString(fe);return U<0?"-"+ae+Z.substr(1):ae+Z}return n.stringifyNumber(H)}var K=d.concat([{identify:H=>H==null,createNode:(H,fe,ae)=>ae.wrapScalars?new n.Scalar(null):null,default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>null,options:n.nullOptions,stringify:()=>n.nullOptions.nullStr},{identify:H=>typeof H=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>!0,options:n.boolOptions,stringify:N},{identify:H=>typeof H=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/i,resolve:()=>!1,options:n.boolOptions,stringify:N},{identify:M,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^([-+]?)0b([0-1_]+)$/,resolve:(H,fe,ae)=>I(fe,ae,2),stringify:H=>Y(H,2,"0b")},{identify:M,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^([-+]?)0([0-7_]+)$/,resolve:(H,fe,ae)=>I(fe,ae,8),stringify:H=>Y(H,8,"0")},{identify:M,default:!0,tag:"tag:yaml.org,2002:int",test:/^([-+]?)([0-9][0-9_]*)$/,resolve:(H,fe,ae)=>I(fe,ae,10),stringify:n.stringifyNumber},{identify:M,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^([-+]?)0x([0-9a-fA-F_]+)$/,resolve:(H,fe,ae)=>I(fe,ae,16),stringify:H=>Y(H,16,"0x")},{identify:H=>typeof H=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.inf|(\.nan))$/i,resolve:(H,fe)=>fe?NaN:H[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:n.stringifyNumber},{identify:H=>typeof H=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?([0-9][0-9_]*)?(\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:H=>parseFloat(H.replace(/_/g,"")),stringify:({value:H})=>Number(H).toExponential()},{identify:H=>typeof H=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.([0-9_]*)$/,resolve(H,fe){let ae=new n.Scalar(parseFloat(H.replace(/_/g,"")));if(fe){let U=fe.replace(/_/g,"");U[U.length-1]==="0"&&(ae.minFractionDigits=U.length)}return ae},stringify:n.stringifyNumber}],r.binary,r.omap,r.pairs,r.set,r.intTime,r.floatTime,r.timestamp),ne={core:v,failsafe:d,json:q,yaml11:K},ge={binary:r.binary,bool:R,float:D,floatExp:y,floatNaN:S,floatTime:r.floatTime,int:A,intHex:F,intOct:P,intTime:r.intTime,map:s,null:T,omap:r.omap,pairs:r.pairs,seq:c,set:r.set,timestamp:r.timestamp};function ye(H,fe,ae){if(fe){let U=ae.filter(pe=>pe.tag===fe),Z=U.find(pe=>!pe.format)||U[0];if(!Z)throw new Error(`Tag ${fe} not found`);return Z}return ae.find(U=>(U.identify&&U.identify(H)||U.class&&H instanceof U.class)&&!U.format)}function De(H,fe,ae){if(H instanceof n.Node)return H;let{defaultPrefix:U,onTagObj:Z,prevObjects:pe,schema:Me,wrapScalars:Ie}=ae;fe&&fe.startsWith("!!")&&(fe=U+fe.slice(2));let qe=ye(H,fe,Me.tags);if(!qe){if(typeof H.toJSON=="function"&&(H=H.toJSON()),!H||typeof H!="object")return Ie?new n.Scalar(H):H;qe=H instanceof Map?s:H[Symbol.iterator]?c:s}Z&&(Z(qe),delete ae.onTagObj);let ze={value:void 0,node:void 0};if(H&&typeof H=="object"&&pe){let Ge=pe.get(H);if(Ge){let rt=new n.Alias(Ge);return ae.aliasNodes.push(rt),rt}ze.value=H,pe.set(H,ze)}return ze.node=qe.createNode?qe.createNode(ae.schema,H,ae):Ie?new n.Scalar(H):H,fe&&ze.node instanceof n.Node&&(ze.node.tag=fe),ze.node}function Be(H,fe,ae,U){let Z=H[U.replace(/\W/g,"")];if(!Z){let pe=Object.keys(H).map(Me=>JSON.stringify(Me)).join(", ");throw new Error(`Unknown schema "${U}"; use one of ${pe}`)}if(Array.isArray(ae))for(let pe of ae)Z=Z.concat(pe);else typeof ae=="function"&&(Z=ae(Z.slice()));for(let pe=0;peJSON.stringify(ze)).join(", ");throw new Error(`Unknown custom tag "${Me}"; use one of ${qe}`)}Z[pe]=Ie}}return Z}var nt=(H,fe)=>H.keyfe.key?1:0,Se=class Gk{constructor({customTags:fe,merge:ae,schema:U,sortMapEntries:Z,tags:pe}){this.merge=!!ae,this.name=U,this.sortMapEntries=Z===!0?nt:Z||null,!fe&&pe&&r.warnOptionDeprecation("tags","customTags"),this.tags=Be(ne,ge,fe||pe,U)}createNode(fe,ae,U,Z){let pe={defaultPrefix:Gk.defaultPrefix,schema:this,wrapScalars:ae},Me=Z?Object.assign(Z,pe):pe;return De(fe,U,Me)}createPair(fe,ae,U){U||(U={wrapScalars:!0});let Z=this.createNode(fe,U.wrapScalars,null,U),pe=this.createNode(ae,U.wrapScalars,null,U);return new n.Pair(Z,pe)}};e._defineProperty(Se,"defaultPrefix",e.defaultTagPrefix),e._defineProperty(Se,"defaultTags",e.defaultTags),t.Schema=Se}),mM=Cs(t=>{var e=pa(),n=ll(),r=S$(),i={anchorPrefix:"a",customTags:null,indent:2,indentSeq:!0,keepCstNodes:!1,keepNodeTypes:!0,keepBlobsInJSON:!0,mapAsMap:!1,maxAliasCount:100,prettyErrors:!1,simpleKeys:!1,version:"1.2"},s={get binary(){return n.binaryOptions},set binary(D){Object.assign(n.binaryOptions,D)},get bool(){return n.boolOptions},set bool(D){Object.assign(n.boolOptions,D)},get int(){return n.intOptions},set int(D){Object.assign(n.intOptions,D)},get null(){return n.nullOptions},set null(D){Object.assign(n.nullOptions,D)},get str(){return n.strOptions},set str(D){Object.assign(n.strOptions,D)}},a={"1.0":{schema:"yaml-1.1",merge:!0,tagPrefixes:[{handle:"!",prefix:e.defaultTagPrefix},{handle:"!!",prefix:"tag:private.yaml.org,2002:"}]},1.1:{schema:"yaml-1.1",merge:!0,tagPrefixes:[{handle:"!",prefix:"!"},{handle:"!!",prefix:e.defaultTagPrefix}]},1.2:{schema:"core",merge:!1,tagPrefixes:[{handle:"!",prefix:"!"},{handle:"!!",prefix:e.defaultTagPrefix}]}};function c(D,v){if((D.version||D.options.version)==="1.0"){let q=v.match(/^tag:private\.yaml\.org,2002:([^:/]+)$/);if(q)return"!"+q[1];let N=v.match(/^tag:([a-zA-Z0-9-]+)\.yaml\.org,2002:(.*)/);return N?`!${N[1]}/${N[2]}`:`!${v.replace(/^tag:/,"")}`}let _=D.tagPrefixes.find(q=>v.indexOf(q.prefix)===0);if(!_){let q=D.getDefaults().tagPrefixes;_=q&&q.find(N=>v.indexOf(N.prefix)===0)}if(!_)return v[0]==="!"?v:`!<${v}>`;let $=v.substr(_.prefix.length).replace(/[!,[\]{}]/g,q=>({"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"})[q]);return _.handle+$}function l(D,v){if(v instanceof n.Alias)return n.Alias;if(v.tag){let q=D.filter(N=>N.tag===v.tag);if(q.length>0)return q.find(N=>N.format===v.format)||q[0]}let _,$;if(v instanceof n.Scalar){$=v.value;let q=D.filter(N=>N.identify&&N.identify($)||N.class&&$ instanceof N.class);_=q.find(N=>N.format===v.format)||q.find(N=>!N.format)}else $=v,_=D.find(q=>q.nodeClass&&$ instanceof q.nodeClass);if(!_){let q=$&&$.constructor?$.constructor.name:typeof $;throw new Error(`Tag not resolved for ${q} value`)}return _}function d(D,v,{anchors:_,doc:$}){let q=[],N=$.anchors.getName(D);return N&&(_[N]=D,q.push(`&${N}`)),D.tag?q.push(c($,D.tag)):v.default||q.push(c($,v.tag)),q.join(" ")}function h(D,v,_,$){let{anchors:q,schema:N}=v.doc,M;if(!(D instanceof n.Node)){let K={aliasNodes:[],onTagObj:ne=>M=ne,prevObjects:new Map};D=N.createNode(D,!0,null,K);for(let ne of K.aliasNodes){ne.source=ne.source.node;let ge=q.getName(ne.source);ge||(ge=q.newName(),q.map[ge]=ne.source)}}if(D instanceof n.Pair)return D.toString(v,_,$);M||(M=l(N.tags,D));let I=d(D,M,v);I.length>0&&(v.indentAtStart=(v.indentAtStart||0)+I.length+1);let Y=typeof M.stringify=="function"?M.stringify(D,v,_,$):D instanceof n.Scalar?n.stringifyString(D,v,_,$):D.toString(v,_,$);return I?D instanceof n.Scalar||Y[0]==="{"||Y[0]==="["?`${I} ${Y}`:`${I} +${v.indent}${Y}`:Y}var m=class Jk{static validAnchorNode(v){return v instanceof n.Scalar||v instanceof n.YAMLSeq||v instanceof n.YAMLMap}constructor(v){e._defineProperty(this,"map",Object.create(null)),this.prefix=v}createAlias(v,_){return this.setAnchor(v,_),new n.Alias(v)}createMergePair(...v){let _=new n.Merge;return _.value.items=v.map($=>{if($ instanceof n.Alias){if($.source instanceof n.YAMLMap)return $}else if($ instanceof n.YAMLMap)return this.createAlias($);throw new Error("Merge sources must be Map nodes or their Aliases")}),_}getName(v){let{map:_}=this;return Object.keys(_).find($=>_[$]===v)}getNames(){return Object.keys(this.map)}getNode(v){return this.map[v]}newName(v){v||(v=this.prefix);let _=Object.keys(this.map);for(let $=1;;++$){let q=`${v}${$}`;if(!_.includes(q))return q}}resolveNodes(){let{map:v,_cstAliases:_}=this;Object.keys(v).forEach($=>{v[$]=v[$].resolved}),_.forEach($=>{$.source=$.source.resolved}),delete this._cstAliases}setAnchor(v,_){if(v!=null&&!Jk.validAnchorNode(v))throw new Error("Anchors may only be set for Scalar, Seq and Map nodes");if(_&&/[\x00-\x19\s,[\]{}]/.test(_))throw new Error("Anchor names must not contain whitespace or control characters");let{map:$}=this,q=v&&Object.keys($).find(N=>$[N]===v);if(q)if(_)q!==_&&(delete $[q],$[_]=v);else return q;else{if(!_){if(!v)return null;_=this.newName()}$[_]=v}return _}},E=(D,v)=>{if(D&&typeof D=="object"){let{tag:_}=D;D instanceof n.Collection?(_&&(v[_]=!0),D.items.forEach($=>E($,v))):D instanceof n.Pair?(E(D.key,v),E(D.value,v)):D instanceof n.Scalar&&_&&(v[_]=!0)}return v},T=D=>Object.keys(E(D,{}));function R(D,v){let _={before:[],after:[]},$,q=!1;for(let N of v)if(N.valueRange){if($!==void 0){let I="Document contains trailing content not separated by a ... or --- line";D.errors.push(new e.YAMLSyntaxError(N,I));break}let M=n.resolveNode(D,N);q&&(M.spaceBefore=!0,q=!1),$=M}else N.comment!==null?($===void 0?_.before:_.after).push(N.comment):N.type===e.Type.BLANK_LINE&&(q=!0,$===void 0&&_.before.length>0&&!D.commentBefore&&(D.commentBefore=_.before.join(` `),_.before=[]));if(D.contents=$||null,!$)D.comment=_.before.concat(_.after).join(` -`)||null;else{let F=_.before.join(` -`);if(F){let M=$ instanceof n.Collection&&$.items[0]?$.items[0]:$;M.commentBefore=M.commentBefore?`${F} -${M.commentBefore}`:F}D.comment=_.after.join(` -`)||null}}function P({tagPrefixes:D},v){let[_,$]=v.parameters;if(!_||!$){let q="Insufficient parameters given for %TAG directive";throw new e.YAMLSemanticError(v,q)}if(D.some(q=>q.handle===_)){let q="The %TAG directive must only be given at most once per handle in the same document.";throw new e.YAMLSemanticError(v,q)}return{handle:_,prefix:$}}function A(D,v){let[_]=v.parameters;if(v.name==="YAML:1.0"&&(_="1.0"),!_){let $="Insufficient parameters given for %YAML directive";throw new e.YAMLSemanticError(v,$)}if(!a[_]){let $=`Document will be parsed as YAML ${D.version||D.options.version} rather than YAML ${_}`;D.warnings.push(new e.YAMLWarning(v,$))}return _}function N(D,v,_){let $=[],q=!1;for(let F of v){let{comment:M,name:I}=F;switch(I){case"TAG":try{D.tagPrefixes.push(P(D,F))}catch(Y){D.errors.push(Y)}q=!0;break;case"YAML":case"YAML:1.0":if(D.version){let Y="The %YAML directive must only be given at most once per document.";D.errors.push(new e.YAMLSemanticError(F,Y))}try{D.version=A(D,F)}catch(Y){D.errors.push(Y)}q=!0;break;default:if(I){let Y=`YAML only supports %TAG and %YAML directives, and not %${I}`;D.warnings.push(new e.YAMLWarning(F,Y))}}M&&$.push(M)}if(_&&!q&&(D.version||_.version||D.options.version)==="1.1"){let F=({handle:M,prefix:I})=>({handle:M,prefix:I});D.tagPrefixes=_.tagPrefixes.map(F),D.version=_.version}D.commentBefore=$.join(` -`)||null}function S(D){if(D instanceof n.Collection)return!0;throw new Error("Expected a YAML collection as document contents")}var y=class kb{constructor(v){this.anchors=new m(v.anchorPrefix),this.commentBefore=null,this.comment=null,this.contents=null,this.directivesEndMarker=null,this.errors=[],this.options=v,this.schema=null,this.tagPrefixes=[],this.version=null,this.warnings=[]}add(v){return S(this.contents),this.contents.add(v)}addIn(v,_){S(this.contents),this.contents.addIn(v,_)}delete(v){return S(this.contents),this.contents.delete(v)}deleteIn(v){return n.isEmptyPath(v)?this.contents==null?!1:(this.contents=null,!0):(S(this.contents),this.contents.deleteIn(v))}getDefaults(){return kb.defaults[this.version]||kb.defaults[this.options.version]||{}}get(v,_){return this.contents instanceof n.Collection?this.contents.get(v,_):void 0}getIn(v,_){return n.isEmptyPath(v)?!_&&this.contents instanceof n.Scalar?this.contents.value:this.contents:this.contents instanceof n.Collection?this.contents.getIn(v,_):void 0}has(v){return this.contents instanceof n.Collection?this.contents.has(v):!1}hasIn(v){return n.isEmptyPath(v)?this.contents!==void 0:this.contents instanceof n.Collection?this.contents.hasIn(v):!1}set(v,_){S(this.contents),this.contents.set(v,_)}setIn(v,_){n.isEmptyPath(v)?this.contents=_:(S(this.contents),this.contents.setIn(v,_))}setSchema(v,_){if(!v&&!_&&this.schema)return;typeof v=="number"&&(v=v.toFixed(1)),v==="1.0"||v==="1.1"||v==="1.2"?(this.version?this.version=v:this.options.version=v,delete this.options.schema):v&&typeof v=="string"&&(this.options.schema=v),Array.isArray(_)&&(this.options.customTags=_);let $=Object.assign({},this.getDefaults(),this.options);this.schema=new r.Schema($)}parse(v,_){this.options.keepCstNodes&&(this.cstNode=v),this.options.keepNodeTypes&&(this.type="DOCUMENT");let{directives:$=[],contents:q=[],directivesEndMarker:F,error:M,valueRange:I}=v;if(M&&(M.source||(M.source=this),this.errors.push(M)),N(this,$,_),F&&(this.directivesEndMarker=!0),this.range=I?[I.start,I.end]:null,this.setSchema(),this.anchors._cstAliases=[],R(this,q),this.anchors.resolveNodes(),this.options.prettyErrors){for(let Y of this.errors)Y instanceof e.YAMLError&&Y.makePretty();for(let Y of this.warnings)Y instanceof e.YAMLError&&Y.makePretty()}return this}listNonDefaultTags(){return k(this.contents).filter(v=>v.indexOf(r.Schema.defaultPrefix)!==0)}setTagPrefix(v,_){if(v[0]!=="!"||v[v.length-1]!=="!")throw new Error("Handle must start and end with !");if(_){let $=this.tagPrefixes.find(q=>q.handle===v);$?$.prefix=_:this.tagPrefixes.push({handle:v,prefix:_})}else this.tagPrefixes=this.tagPrefixes.filter($=>$.handle!==v)}toJSON(v,_){let{keepBlobsInJSON:$,mapAsMap:q,maxAliasCount:F}=this.options,M=$&&(typeof v!="string"||!(this.contents instanceof n.Scalar)),I={doc:this,indentStep:" ",keep:M,mapAsMap:M&&!!q,maxAliasCount:F,stringify:h},Y=Object.keys(this.anchors.map);Y.length>0&&(I.anchors=new Map(Y.map(ne=>[this.anchors.map[ne],{alias:[],aliasCount:0,count:1}])));let K=n.toJSON(this.contents,v,I);if(typeof _=="function"&&I.anchors)for(let{count:ne,res:ge}of I.anchors.values())_(ge,ne);return K}toString(){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");let v=this.options.indent;if(!Number.isInteger(v)||v<=0){let Y=JSON.stringify(v);throw new Error(`"indent" option must be a positive integer, not ${Y}`)}this.setSchema();let _=[],$=!1;if(this.version){let Y="%YAML 1.2";this.schema.name==="yaml-1.1"&&(this.version==="1.0"?Y="%YAML:1.0":this.version==="1.1"&&(Y="%YAML 1.1")),_.push(Y),$=!0}let q=this.listNonDefaultTags();this.tagPrefixes.forEach(({handle:Y,prefix:K})=>{q.some(ne=>ne.indexOf(K)===0)&&(_.push(`%TAG ${Y} ${K}`),$=!0)}),($||this.directivesEndMarker)&&_.push("---"),this.commentBefore&&(($||!this.directivesEndMarker)&&_.unshift(""),_.unshift(this.commentBefore.replace(/^/gm,"#")));let F={anchors:Object.create(null),doc:this,indent:"",indentStep:" ".repeat(v),stringify:h},M=!1,I=null;if(this.contents){this.contents instanceof n.Node&&(this.contents.spaceBefore&&($||this.directivesEndMarker)&&_.push(""),this.contents.commentBefore&&_.push(this.contents.commentBefore.replace(/^/gm,"#")),F.forceBlockIndent=!!this.comment,I=this.contents.comment);let Y=I?null:()=>M=!0,K=h(this.contents,F,()=>I=null,Y);_.push(n.addComment(K,"",I))}else this.contents!==void 0&&_.push(h(this.contents,F));return this.comment&&((!M||I)&&_[_.length-1]!==""&&_.push(""),_.push(this.comment.replace(/^/gm,"#"))),_.join(` +`)||null;else{let N=_.before.join(` +`);if(N){let M=$ instanceof n.Collection&&$.items[0]?$.items[0]:$;M.commentBefore=M.commentBefore?`${N} +${M.commentBefore}`:N}D.comment=_.after.join(` +`)||null}}function P({tagPrefixes:D},v){let[_,$]=v.parameters;if(!_||!$){let q="Insufficient parameters given for %TAG directive";throw new e.YAMLSemanticError(v,q)}if(D.some(q=>q.handle===_)){let q="The %TAG directive must only be given at most once per handle in the same document.";throw new e.YAMLSemanticError(v,q)}return{handle:_,prefix:$}}function A(D,v){let[_]=v.parameters;if(v.name==="YAML:1.0"&&(_="1.0"),!_){let $="Insufficient parameters given for %YAML directive";throw new e.YAMLSemanticError(v,$)}if(!a[_]){let $=`Document will be parsed as YAML ${D.version||D.options.version} rather than YAML ${_}`;D.warnings.push(new e.YAMLWarning(v,$))}return _}function F(D,v,_){let $=[],q=!1;for(let N of v){let{comment:M,name:I}=N;switch(I){case"TAG":try{D.tagPrefixes.push(P(D,N))}catch(Y){D.errors.push(Y)}q=!0;break;case"YAML":case"YAML:1.0":if(D.version){let Y="The %YAML directive must only be given at most once per document.";D.errors.push(new e.YAMLSemanticError(N,Y))}try{D.version=A(D,N)}catch(Y){D.errors.push(Y)}q=!0;break;default:if(I){let Y=`YAML only supports %TAG and %YAML directives, and not %${I}`;D.warnings.push(new e.YAMLWarning(N,Y))}}M&&$.push(M)}if(_&&!q&&(D.version||_.version||D.options.version)==="1.1"){let N=({handle:M,prefix:I})=>({handle:M,prefix:I});D.tagPrefixes=_.tagPrefixes.map(N),D.version=_.version}D.commentBefore=$.join(` +`)||null}function S(D){if(D instanceof n.Collection)return!0;throw new Error("Expected a YAML collection as document contents")}var y=class Tb{constructor(v){this.anchors=new m(v.anchorPrefix),this.commentBefore=null,this.comment=null,this.contents=null,this.directivesEndMarker=null,this.errors=[],this.options=v,this.schema=null,this.tagPrefixes=[],this.version=null,this.warnings=[]}add(v){return S(this.contents),this.contents.add(v)}addIn(v,_){S(this.contents),this.contents.addIn(v,_)}delete(v){return S(this.contents),this.contents.delete(v)}deleteIn(v){return n.isEmptyPath(v)?this.contents==null?!1:(this.contents=null,!0):(S(this.contents),this.contents.deleteIn(v))}getDefaults(){return Tb.defaults[this.version]||Tb.defaults[this.options.version]||{}}get(v,_){return this.contents instanceof n.Collection?this.contents.get(v,_):void 0}getIn(v,_){return n.isEmptyPath(v)?!_&&this.contents instanceof n.Scalar?this.contents.value:this.contents:this.contents instanceof n.Collection?this.contents.getIn(v,_):void 0}has(v){return this.contents instanceof n.Collection?this.contents.has(v):!1}hasIn(v){return n.isEmptyPath(v)?this.contents!==void 0:this.contents instanceof n.Collection?this.contents.hasIn(v):!1}set(v,_){S(this.contents),this.contents.set(v,_)}setIn(v,_){n.isEmptyPath(v)?this.contents=_:(S(this.contents),this.contents.setIn(v,_))}setSchema(v,_){if(!v&&!_&&this.schema)return;typeof v=="number"&&(v=v.toFixed(1)),v==="1.0"||v==="1.1"||v==="1.2"?(this.version?this.version=v:this.options.version=v,delete this.options.schema):v&&typeof v=="string"&&(this.options.schema=v),Array.isArray(_)&&(this.options.customTags=_);let $=Object.assign({},this.getDefaults(),this.options);this.schema=new r.Schema($)}parse(v,_){this.options.keepCstNodes&&(this.cstNode=v),this.options.keepNodeTypes&&(this.type="DOCUMENT");let{directives:$=[],contents:q=[],directivesEndMarker:N,error:M,valueRange:I}=v;if(M&&(M.source||(M.source=this),this.errors.push(M)),F(this,$,_),N&&(this.directivesEndMarker=!0),this.range=I?[I.start,I.end]:null,this.setSchema(),this.anchors._cstAliases=[],R(this,q),this.anchors.resolveNodes(),this.options.prettyErrors){for(let Y of this.errors)Y instanceof e.YAMLError&&Y.makePretty();for(let Y of this.warnings)Y instanceof e.YAMLError&&Y.makePretty()}return this}listNonDefaultTags(){return T(this.contents).filter(v=>v.indexOf(r.Schema.defaultPrefix)!==0)}setTagPrefix(v,_){if(v[0]!=="!"||v[v.length-1]!=="!")throw new Error("Handle must start and end with !");if(_){let $=this.tagPrefixes.find(q=>q.handle===v);$?$.prefix=_:this.tagPrefixes.push({handle:v,prefix:_})}else this.tagPrefixes=this.tagPrefixes.filter($=>$.handle!==v)}toJSON(v,_){let{keepBlobsInJSON:$,mapAsMap:q,maxAliasCount:N}=this.options,M=$&&(typeof v!="string"||!(this.contents instanceof n.Scalar)),I={doc:this,indentStep:" ",keep:M,mapAsMap:M&&!!q,maxAliasCount:N,stringify:h},Y=Object.keys(this.anchors.map);Y.length>0&&(I.anchors=new Map(Y.map(ne=>[this.anchors.map[ne],{alias:[],aliasCount:0,count:1}])));let K=n.toJSON(this.contents,v,I);if(typeof _=="function"&&I.anchors)for(let{count:ne,res:ge}of I.anchors.values())_(ge,ne);return K}toString(){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");let v=this.options.indent;if(!Number.isInteger(v)||v<=0){let Y=JSON.stringify(v);throw new Error(`"indent" option must be a positive integer, not ${Y}`)}this.setSchema();let _=[],$=!1;if(this.version){let Y="%YAML 1.2";this.schema.name==="yaml-1.1"&&(this.version==="1.0"?Y="%YAML:1.0":this.version==="1.1"&&(Y="%YAML 1.1")),_.push(Y),$=!0}let q=this.listNonDefaultTags();this.tagPrefixes.forEach(({handle:Y,prefix:K})=>{q.some(ne=>ne.indexOf(K)===0)&&(_.push(`%TAG ${Y} ${K}`),$=!0)}),($||this.directivesEndMarker)&&_.push("---"),this.commentBefore&&(($||!this.directivesEndMarker)&&_.unshift(""),_.unshift(this.commentBefore.replace(/^/gm,"#")));let N={anchors:Object.create(null),doc:this,indent:"",indentStep:" ".repeat(v),stringify:h},M=!1,I=null;if(this.contents){this.contents instanceof n.Node&&(this.contents.spaceBefore&&($||this.directivesEndMarker)&&_.push(""),this.contents.commentBefore&&_.push(this.contents.commentBefore.replace(/^/gm,"#")),N.forceBlockIndent=!!this.comment,I=this.contents.comment);let Y=I?null:()=>M=!0,K=h(this.contents,N,()=>I=null,Y);_.push(n.addComment(K,"",I))}else this.contents!==void 0&&_.push(h(this.contents,N));return this.comment&&((!M||I)&&_[_.length-1]!==""&&_.push(""),_.push(this.comment.replace(/^/gm,"#"))),_.join(` `)+` -`}};e._defineProperty(y,"defaults",a),t.Document=y,t.defaultOptions=i,t.scalarOptions=s}),gM=Cs(t=>{var e=pM(),n=mM(),r=S$(),i=pa(),s=E$();cl();function a(k,R=!0,P){P===void 0&&typeof R=="string"&&(P=R,R=!0);let A=Object.assign({},n.Document.defaults[n.defaultOptions.version],n.defaultOptions);return new r.Schema(A).createNode(k,R,P)}var c=class extends n.Document{constructor(k){super(Object.assign({},n.defaultOptions,k))}};function l(k,R){let P=[],A;for(let N of e.parse(k)){let S=new c(R);S.parse(N,A),P.push(S),A=S}return P}function d(k,R){let P=e.parse(k),A=new c(R).parse(P[0]);if(P.length>1){let N="Source contains multiple documents; please use YAML.parseAllDocuments()";A.errors.unshift(new i.YAMLSemanticError(P[1],N))}return A}function h(k,R){let P=d(k,R);if(P.warnings.forEach(A=>s.warn(A)),P.errors.length>0)throw P.errors[0];return P.toJSON()}function m(k,R){let P=new c(R);return P.contents=k,String(P)}var E={createNode:a,defaultOptions:n.defaultOptions,Document:c,parse:h,parseAllDocuments:l,parseCST:e.parse,parseDocument:d,scalarOptions:n.scalarOptions,stringify:m};t.YAML=E}),yM=Cs((t,e)=>{e.exports=gM().YAML}),vM=Cs(t=>{var e=cl(),n=pa();t.findPair=e.findPair,t.parseMap=e.resolveMap,t.parseSeq=e.resolveSeq,t.stringifyNumber=e.stringifyNumber,t.stringifyString=e.stringifyString,t.toJSON=e.toJSON,t.Type=n.Type,t.YAMLError=n.YAMLError,t.YAMLReferenceError=n.YAMLReferenceError,t.YAMLSemanticError=n.YAMLSemanticError,t.YAMLSyntaxError=n.YAMLSyntaxError,t.YAMLWarning=n.YAMLWarning}),T$={};_$(T$,{languages:()=>Z$,options:()=>eE,parsers:()=>g0,printers:()=>bE});var bM=(t,e,n,r)=>{if(!(t&&e==null))return e.replaceAll?e.replaceAll(n,r):n.global?e.replace(n,r):e.split(n).join(r)},t0=bM,k$="string",A$="array",C$="cursor",O$="indent",n0="align",P$="trim",r0="group",i0="fill",s0="if-break",N$="indent-if-break",o0="line-suffix",F$="line-suffix-boundary",Mu="line",R$="label",a0="break-parent",I$=new Set([C$,O$,n0,P$,r0,i0,s0,N$,o0,F$,Mu,R$,a0]);function DM(t){if(typeof t=="string")return k$;if(Array.isArray(t))return A$;if(!t)return;let{type:e}=t;if(I$.has(e))return e}var M$=DM,wM=t=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(t);function _M(t){let e=t===null?"null":typeof t;if(e!=="string"&&e!=="object")return`Unexpected doc '${e}', +`}};e._defineProperty(y,"defaults",a),t.Document=y,t.defaultOptions=i,t.scalarOptions=s}),gM=Cs(t=>{var e=pM(),n=mM(),r=S$(),i=pa(),s=E$();ll();function a(T,R=!0,P){P===void 0&&typeof R=="string"&&(P=R,R=!0);let A=Object.assign({},n.Document.defaults[n.defaultOptions.version],n.defaultOptions);return new r.Schema(A).createNode(T,R,P)}var c=class extends n.Document{constructor(T){super(Object.assign({},n.defaultOptions,T))}};function l(T,R){let P=[],A;for(let F of e.parse(T)){let S=new c(R);S.parse(F,A),P.push(S),A=S}return P}function d(T,R){let P=e.parse(T),A=new c(R).parse(P[0]);if(P.length>1){let F="Source contains multiple documents; please use YAML.parseAllDocuments()";A.errors.unshift(new i.YAMLSemanticError(P[1],F))}return A}function h(T,R){let P=d(T,R);if(P.warnings.forEach(A=>s.warn(A)),P.errors.length>0)throw P.errors[0];return P.toJSON()}function m(T,R){let P=new c(R);return P.contents=T,String(P)}var E={createNode:a,defaultOptions:n.defaultOptions,Document:c,parse:h,parseAllDocuments:l,parseCST:e.parse,parseDocument:d,scalarOptions:n.scalarOptions,stringify:m};t.YAML=E}),yM=Cs((t,e)=>{e.exports=gM().YAML}),vM=Cs(t=>{var e=ll(),n=pa();t.findPair=e.findPair,t.parseMap=e.resolveMap,t.parseSeq=e.resolveSeq,t.stringifyNumber=e.stringifyNumber,t.stringifyString=e.stringifyString,t.toJSON=e.toJSON,t.Type=n.Type,t.YAMLError=n.YAMLError,t.YAMLReferenceError=n.YAMLReferenceError,t.YAMLSemanticError=n.YAMLSemanticError,t.YAMLSyntaxError=n.YAMLSyntaxError,t.YAMLWarning=n.YAMLWarning}),k$={};_$(k$,{languages:()=>Z$,options:()=>eE,parsers:()=>g0,printers:()=>bE});var bM=(t,e,n,r)=>{if(!(t&&e==null))return e.replaceAll?e.replaceAll(n,r):n.global?e.replace(n,r):e.split(n).join(r)},t0=bM,T$="string",A$="array",C$="cursor",O$="indent",n0="align",P$="trim",r0="group",i0="fill",s0="if-break",N$="indent-if-break",o0="line-suffix",F$="line-suffix-boundary",Mu="line",R$="label",a0="break-parent",I$=new Set([C$,O$,n0,P$,r0,i0,s0,N$,o0,F$,Mu,R$,a0]);function DM(t){if(typeof t=="string")return T$;if(Array.isArray(t))return A$;if(!t)return;let{type:e}=t;if(I$.has(e))return e}var M$=DM,wM=t=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(t);function _M(t){let e=t===null?"null":typeof t;if(e!=="string"&&e!=="object")return`Unexpected doc '${e}', Expected it to be 'string' or 'object'.`;if(M$(t))throw new Error("doc is valid.");let n=Object.prototype.toString.call(t);if(n!=="[object Object]")return`Unexpected doc '${n}'.`;let r=wM([...I$].map(i=>`'${i}'`));return`Unexpected doc.type '${t.type}'. -Expected it to be ${r}.`}var $M=class extends Error{constructor(e){super(_M(e));ri(this,"name","InvalidDocError");this.doc=e}},EM=$M,SM=()=>{},TM=SM;function ah(t,e){return{type:n0,contents:e,n:t}}function uh(t,e={}){return TM(e.expandedStates),{type:r0,id:e.id,contents:t,break:!!e.shouldBreak,expandedStates:e.expandedStates}}function L$(t){return ah(Number.NEGATIVE_INFINITY,t)}function kM(t){return ah({type:"root"},t)}function AM(t){return ah(-1,t)}function j$(t,e){return uh(t[0],{...e,expandedStates:t})}function x$(t){return{type:i0,parts:t}}function u0(t,e="",n={}){return{type:s0,breakContents:t,flatContents:e,groupId:n.groupId}}function CM(t){return{type:o0,contents:t}}var c0={type:a0},OM={type:Mu,hard:!0},PM={type:Mu,hard:!0,literal:!0},ll={type:Mu},B$={type:Mu,soft:!0},Kt=[OM,c0],l0=[PM,c0];function jr(t,e){let n=[];for(let r=0;r{if(!(t&&e==null))return Array.isArray(e)||typeof e=="string"?e[n<0?e.length+n:n]:e.at(n)},pi=NM;function FM(t,e){if(typeof t=="string")return e(t);let n=new Map;return r(t);function r(s){if(n.has(s))return n.get(s);let a=i(s);return n.set(s,a),a}function i(s){switch(M$(s)){case A$:return e(s.map(r));case i0:return e({...s,parts:s.parts.map(r)});case s0:return e({...s,breakContents:r(s.breakContents),flatContents:r(s.flatContents)});case r0:{let{expandedStates:a,contents:c}=s;return a?(a=a.map(r),c=a[0]):c=r(c),e({...s,contents:c,expandedStates:a})}case n0:case O$:case N$:case R$:case o0:return e({...s,contents:r(s.contents)});case k$:case C$:case P$:case F$:case Mu:case a0:return e(s);default:throw new EM(s)}}}function RM(t,e=l0){return FM(t,n=>typeof n=="string"?jr(e,n.split(` +Expected it to be ${r}.`}var $M=class extends Error{constructor(e){super(_M(e));ri(this,"name","InvalidDocError");this.doc=e}},EM=$M,SM=()=>{},kM=SM;function ah(t,e){return{type:n0,contents:e,n:t}}function uh(t,e={}){return kM(e.expandedStates),{type:r0,id:e.id,contents:t,break:!!e.shouldBreak,expandedStates:e.expandedStates}}function L$(t){return ah(Number.NEGATIVE_INFINITY,t)}function TM(t){return ah({type:"root"},t)}function AM(t){return ah(-1,t)}function j$(t,e){return uh(t[0],{...e,expandedStates:t})}function x$(t){return{type:i0,parts:t}}function u0(t,e="",n={}){return{type:s0,breakContents:t,flatContents:e,groupId:n.groupId}}function CM(t){return{type:o0,contents:t}}var c0={type:a0},OM={type:Mu,hard:!0},PM={type:Mu,hard:!0,literal:!0},fl={type:Mu},B$={type:Mu,soft:!0},Kt=[OM,c0],l0=[PM,c0];function jr(t,e){let n=[];for(let r=0;r{if(!(t&&e==null))return Array.isArray(e)||typeof e=="string"?e[n<0?e.length+n:n]:e.at(n)},pi=NM;function FM(t,e){if(typeof t=="string")return e(t);let n=new Map;return r(t);function r(s){if(n.has(s))return n.get(s);let a=i(s);return n.set(s,a),a}function i(s){switch(M$(s)){case A$:return e(s.map(r));case i0:return e({...s,parts:s.parts.map(r)});case s0:return e({...s,breakContents:r(s.breakContents),flatContents:r(s.flatContents)});case r0:{let{expandedStates:a,contents:c}=s;return a?(a=a.map(r),c=a[0]):c=r(c),e({...s,contents:c,expandedStates:a})}case n0:case O$:case N$:case R$:case o0:return e({...s,contents:r(s.contents)});case T$:case C$:case P$:case F$:case Mu:case a0:return e(s);default:throw new EM(s)}}}function RM(t,e=l0){return FM(t,n=>typeof n=="string"?jr(e,n.split(` `)):n)}function IM(t){return(e,n,r)=>{let i=!!(r!=null&&r.backwards);if(n===!1)return!1;let{length:s}=e,a=n;for(;a>=0&&a{let i=await r(e.originalText,{parser:"json"});return i?[i,Kt]:void 0}}U$.getVisitorKeys=()=>[];var qM=U$,fl=null;function dl(t){if(fl!==null&&typeof fl.property){let e=fl;return fl=dl.prototype=null,e}return fl=dl.prototype=t!=null?t:Object.create(null),new dl}var WM=10;for(let t=0;t<=WM;t++)dl();function UM(t){return dl(t)}function VM(t,e="type"){UM(t);function n(r){let i=r[e],s=t[i];if(!Array.isArray(s))throw Object.assign(new Error(`Missing visitor keys for '${i}'.`),{node:r});return s}return n}var HM=VM,KM=Object.fromEntries(Object.entries({root:["children"],document:["head","body","children"],documentHead:["children"],documentBody:["children"],directive:[],alias:[],blockLiteral:[],blockFolded:["children"],plain:["children"],quoteSingle:[],quoteDouble:[],mapping:["children"],mappingItem:["key","value","children"],mappingKey:["content","children"],mappingValue:["content","children"],sequence:["children"],sequenceItem:["content","children"],flowMapping:["children"],flowMappingItem:["key","value","children"],flowSequence:["children"],flowSequenceItem:["content","children"],comment:[],tag:[],anchor:[]}).map(([t,e])=>[t,[...e,"anchor","tag","indicatorComment","leadingComments","middleComments","trailingComment","endComments"]])),zM=KM,YM=HM(zM),GM=YM;function ch(t){return t.position.start.offset}function JM(t){return t.position.end.offset}function QM(t){return/^\s*@(?:prettier|format)\s*$/.test(t)}function XM(t){return/^\s*#[^\S\n]*@(?:prettier|format)\s*?(?:\n|$)/.test(t)}function ZM(t){return`# @format +`||i==="\r"||i==="\u2028"||i==="\u2029")return e+1}return e}var W$=MM;function LM(t,e){let n=e-1;n=q$(t,n,{backwards:!0}),n=W$(t,n,{backwards:!0}),n=q$(t,n,{backwards:!0});let r=W$(t,n,{backwards:!0});return n!==r}var jM=LM,xM=class extends Error{constructor(e,n,r="type"){super(`Unexpected ${n} node ${r}: ${JSON.stringify(e[r])}.`);ri(this,"name","UnexpectedNodeError");this.node=e}},BM=xM;function U$(t,e){let{node:n}=t;if(n.type==="root"&&e.filepath&&/(?:[/\\]|^)\.(?:prettier|stylelint|lintstaged)rc$/.test(e.filepath))return async r=>{let i=await r(e.originalText,{parser:"json"});return i?[i,Kt]:void 0}}U$.getVisitorKeys=()=>[];var qM=U$,dl=null;function hl(t){if(dl!==null&&typeof dl.property){let e=dl;return dl=hl.prototype=null,e}return dl=hl.prototype=t!=null?t:Object.create(null),new hl}var WM=10;for(let t=0;t<=WM;t++)hl();function UM(t){return hl(t)}function VM(t,e="type"){UM(t);function n(r){let i=r[e],s=t[i];if(!Array.isArray(s))throw Object.assign(new Error(`Missing visitor keys for '${i}'.`),{node:r});return s}return n}var HM=VM,KM=Object.fromEntries(Object.entries({root:["children"],document:["head","body","children"],documentHead:["children"],documentBody:["children"],directive:[],alias:[],blockLiteral:[],blockFolded:["children"],plain:["children"],quoteSingle:[],quoteDouble:[],mapping:["children"],mappingItem:["key","value","children"],mappingKey:["content","children"],mappingValue:["content","children"],sequence:["children"],sequenceItem:["content","children"],flowMapping:["children"],flowMappingItem:["key","value","children"],flowSequence:["children"],flowSequenceItem:["content","children"],comment:[],tag:[],anchor:[]}).map(([t,e])=>[t,[...e,"anchor","tag","indicatorComment","leadingComments","middleComments","trailingComment","endComments"]])),zM=KM,YM=HM(zM),GM=YM;function ch(t){return t.position.start.offset}function JM(t){return t.position.end.offset}function QM(t){return/^\s*@(?:prettier|format)\s*$/.test(t)}function XM(t){return/^\s*#[^\S\n]*@(?:prettier|format)\s*?(?:\n|$)/.test(t)}function ZM(t){return`# @format -${t}`}function eL(t){return Array.isArray(t)&&t.length>0}var hl=eL;function Os(t,e){return typeof(t==null?void 0:t.type)=="string"&&(!e||e.includes(t.type))}function V$(t,e,n){return e("children"in t?{...t,children:t.children.map(r=>V$(r,e,t))}:t,n)}function pl(t,e,n){Object.defineProperty(t,e,{get:n,enumerable:!1})}function tL(t,e){let n=0,r=e.length;for(let i=t.position.end.offset-1;i0}var pl=eL;function Os(t,e){return typeof(t==null?void 0:t.type)=="string"&&(!e||e.includes(t.type))}function V$(t,e,n){return e("children"in t?{...t,children:t.children.map(r=>V$(r,e,t))}:t,n)}function ml(t,e,n){Object.defineProperty(t,e,{get:n,enumerable:!1})}function tL(t,e){let n=0,r=e.length;for(let i=t.position.end.offset-1;is===0&&s===a.length-1?i:s!==0&&s!==a.length-1?i.trim():s===0?i.trimEnd():i.trimStart());return n.proseWrap==="preserve"?r.map(i=>i.length===0?[]:[i]):r.map(i=>i.length===0?[]:Y$(i)).reduce((i,s,a)=>a!==0&&r[a-1].length>0&&s.length>0&&!(t==="quoteDouble"&&pi(!1,pi(!1,i,-1),-1).endsWith("\\"))?[...i.slice(0,-1),[...pi(!1,i,-1),...s]]:[...i,s],[]).map(i=>n.proseWrap==="never"?[i.join(" ")]:i)}function sL(t,{parentIndent:e,isLastDescendant:n,options:r}){let i=t.position.start.line===t.position.end.line?"":r.originalText.slice(t.position.start.offset,t.position.end.offset).match(/^[^\n]*\n(.*)$/s)[1],s;if(t.indent===null){let l=i.match(/^(? *)[^\n\r ]/m);s=l?l.groups.leadingSpace.length:Number.POSITIVE_INFINITY}else s=t.indent-1+e;let a=i.split(` -`).map(l=>l.slice(s));if(r.proseWrap==="preserve"||t.type==="blockLiteral")return c(a.map(l=>l.length===0?[]:[l]));return c(a.map(l=>l.length===0?[]:Y$(l)).reduce((l,d,h)=>h!==0&&a[h-1].length>0&&d.length>0&&!/^\s/.test(d[0])&&!/^\s|\s$/.test(pi(!1,l,-1))?[...l.slice(0,-1),[...pi(!1,l,-1),...d]]:[...l,d],[]).map(l=>l.reduce((d,h)=>d.length>0&&/\s$/.test(pi(!1,d,-1))?[...d.slice(0,-1),pi(!1,d,-1)+" "+h]:[...d,h],[])).map(l=>r.proseWrap==="never"?[l.join(" ")]:l));function c(l){if(t.chomping==="keep")return pi(!1,l,-1).length===0?l.slice(0,-1):l;let d=0;for(let h=l.length-1;h>=0&&l[h].length===0;h--)d++;return d===0?l:d>=2&&!n?l.slice(0,-(d-1)):l.slice(0,-d)}}function d0(t){if(!t)return!0;switch(t.type){case"plain":case"quoteDouble":case"quoteSingle":case"alias":case"flowMapping":case"flowSequence":return!0;default:return!1}}var h0=new WeakMap;function G$(t,e){let{node:n,root:r}=t,i;return h0.has(r)?i=h0.get(r):(i=new Set,h0.set(r,i)),!i.has(n.position.end.line)&&(i.add(n.position.end.line),tL(n,e)&&!J$(t.parent))?B$:""}function J$(t){return ji(t)&&!Os(t,["documentHead","documentBody","flowMapping","flowSequence"])}function mi(t,e){return ah(" ".repeat(t),e)}function oL(t,e,n){let{node:r}=t,i=t.ancestors.filter(d=>d.type==="sequence"||d.type==="mapping").length,s=H$(t),a=[r.type==="blockFolded"?">":"|"];r.indent!==null&&a.push(r.indent.toString()),r.chomping!=="clip"&&a.push(r.chomping==="keep"?"+":"-"),z$(r)&&a.push(" ",e("indicatorComment"));let c=sL(r,{parentIndent:i,isLastDescendant:s,options:n}),l=[];for(let[d,h]of c.entries())d===0&&l.push(Kt),l.push(x$(jr(ll,h))),d!==c.length-1?l.push(h.length===0?Kt:kM(l0)):r.chomping==="keep"&&s&&l.push(L$(h.length===0?Kt:l0));return r.indent===null?a.push(AM(mi(n.tabWidth,l))):a.push(L$(mi(r.indent-1+i,l))),a}var aL=oL;function Q$(t,e,n){let{node:r}=t,i=r.type==="flowMapping",s=i?"{":"[",a=i?"}":"]",c=B$;i&&r.children.length>0&&n.bracketSpacing&&(c=ll);let l=pi(!1,r.children,-1),d=(l==null?void 0:l.type)==="flowMappingItem"&&lh(l.key)&&lh(l.value);return[s,mi(n.tabWidth,[c,uL(t,e,n),n.trailingComma==="none"?"":u0(","),ji(r)?[Kt,jr(Kt,t.map(e,"endComments"))]:""]),d?"":c,a]}function uL(t,e,n){return t.map(({isLast:r,node:i,next:s})=>[e(),r?"":[",",ll,i.position.start.line!==s.position.start.line?G$(t,n.originalText):""]],"children")}function cL(t,e,n){var r;let{node:i,parent:s}=t,{key:a,value:c}=i,l=lh(a),d=lh(c);if(l&&d)return": ";let h=e("key"),m=lL(i)?" ":"";if(d)return i.type==="flowMappingItem"&&s.type==="flowMapping"?h:i.type==="mappingItem"&&p0(a.content,n)&&!ls(a.content)&&((r=s.tag)==null?void 0:r.value)!=="tag:yaml.org,2002:set"?[h,m,":"]:["? ",mi(2,h)];let E=e("value");if(l)return[": ",mi(2,E)];if(bo(c)||!d0(a.content))return["? ",mi(2,h),Kt,...t.map(()=>[e(),Kt],"value","leadingComments"),": ",mi(2,E)];if(fL(a.content)&&!bo(a.content)&&!Lu(a.content)&&!ls(a.content)&&!ji(a)&&!bo(c.content)&&!Lu(c.content)&&!ji(c)&&p0(c.content,n))return[h,m,": ",E];let k=Symbol("mappingKey"),R=uh([u0("? "),uh(mi(2,h),{id:k})]),P=[Kt,": ",mi(2,E)],A=[m,":"];bo(c.content)||ji(c)&&c.content&&!Os(c.content,["mapping","sequence"])||s.type==="mapping"&&ls(a.content)&&d0(c.content)||Os(c.content,["mapping","sequence"])&&c.content.tag===null&&c.content.anchor===null?A.push(Kt):c.content&&A.push(ll),A.push(E);let N=mi(n.tabWidth,A);return p0(a.content,n)&&!bo(a.content)&&!Lu(a.content)&&!ji(a)?j$([[h,N]]):j$([[R,u0(P,N,{groupId:k})]])}function p0(t,e){if(!t)return!0;switch(t.type){case"plain":case"quoteSingle":case"quoteDouble":break;case"alias":return!0;default:return!1}if(e.proseWrap==="preserve")return t.position.start.line===t.position.end.line;if(/\\$/m.test(e.originalText.slice(t.position.start.offset,t.position.end.offset)))return!1;switch(e.proseWrap){case"never":return!t.value.includes(` -`);case"always":return!/[\n ]/.test(t.value);default:return!1}}function lL(t){var e;return((e=t.key.content)==null?void 0:e.type)==="alias"}function fL(t){if(!t)return!0;switch(t.type){case"plain":case"quoteDouble":case"quoteSingle":return t.position.start.line===t.position.end.line;case"alias":return!0;default:return!1}}var dL=cL;function hL(t){return V$(t,pL)}function pL(t){switch(t.type){case"document":pl(t,"head",()=>t.children[0]),pl(t,"body",()=>t.children[1]);break;case"documentBody":case"sequenceItem":case"flowSequenceItem":case"mappingKey":case"mappingValue":pl(t,"content",()=>t.children[0]);break;case"mappingItem":case"flowMappingItem":pl(t,"key",()=>t.children[0]),pl(t,"value",()=>t.children[1]);break}return t}var mL=hL;function gL(t,e,n){let{node:r}=t,i=[];r.type!=="mappingValue"&&bo(r)&&i.push([jr(Kt,t.map(n,"leadingComments")),Kt]);let{tag:s,anchor:a}=r;s&&i.push(n("tag")),s&&a&&i.push(" "),a&&i.push(n("anchor"));let c="";return Os(r,["mapping","sequence","comment","directive","mappingItem","sequenceItem"])&&!H$(t)&&(c=G$(t,e.originalText)),(s||a)&&(Os(r,["sequence","mapping"])&&!Lu(r)?i.push(Kt):i.push(" ")),Lu(r)&&i.push([r.middleComments.length===1?"":Kt,jr(Kt,t.map(n,"middleComments")),Kt]),nL(t)?i.push(RM(e.originalText.slice(r.position.start.offset,r.position.end.offset).trimEnd())):i.push(uh(yL(t,e,n))),ls(r)&&!Os(r,["document","documentHead"])&&i.push(CM([r.type==="mappingValue"&&!r.content?"":" ",t.parent.type==="mappingKey"&&t.getParentNode(2).type==="mapping"&&d0(r)?"":c0,n("trailingComment")])),J$(r)&&i.push(mi(r.type==="sequenceItem"?2:0,[Kt,jr(Kt,t.map(({node:l})=>[jM(e.originalText,ch(l))?Kt:"",n()],"endComments"))])),i.push(c),i}function yL(t,e,n){let{node:r}=t;switch(r.type){case"root":{let i=[];t.each(({node:a,next:c,isFirst:l})=>{l||i.push(Kt),i.push(n()),X$(a,c)?(i.push(Kt,"..."),ls(a)&&i.push(" ",n("trailingComment"))):c&&!ls(c.head)&&i.push(Kt,"---")},"children");let s=f0(r);return(!Os(s,["blockLiteral","blockFolded"])||s.chomping!=="keep")&&i.push(Kt),i}case"document":{let i=[];return bL(t,e)==="head"&&((r.head.children.length>0||r.head.endComments.length>0)&&i.push(n("head")),ls(r.head)?i.push(["---"," ",n(["head","trailingComment"])]):i.push("---")),vL(r)&&i.push(n("body")),jr(Kt,i)}case"documentHead":return jr(Kt,[...t.map(n,"children"),...t.map(n,"endComments")]);case"documentBody":{let{children:i,endComments:s}=r,a="";if(i.length>0&&s.length>0){let c=f0(r);Os(c,["blockFolded","blockLiteral"])?c.chomping!=="keep"&&(a=[Kt,Kt]):a=Kt}return[jr(Kt,t.map(n,"children")),a,jr(Kt,t.map(n,"endComments"))]}case"directive":return["%",jr(" ",[r.name,...r.parameters])];case"comment":return["#",r.value];case"alias":return["*",r.value];case"tag":return e.originalText.slice(r.position.start.offset,r.position.end.offset);case"anchor":return["&",r.value];case"plain":return ml(r.type,e.originalText.slice(r.position.start.offset,r.position.end.offset),e);case"quoteDouble":case"quoteSingle":{let i="'",s='"',a=e.originalText.slice(r.position.start.offset+1,r.position.end.offset-1);if(r.type==="quoteSingle"&&a.includes("\\")||r.type==="quoteDouble"&&/\\[^"]/.test(a)){let l=r.type==="quoteDouble"?s:i;return[l,ml(r.type,a,e),l]}if(a.includes(s))return[i,ml(r.type,r.type==="quoteDouble"?t0(!1,t0(!1,a,'\\"',s),"'",i.repeat(2)):a,e),i];if(a.includes(i))return[s,ml(r.type,r.type==="quoteSingle"?t0(!1,a,"''",i):a,e),s];let c=e.singleQuote?i:s;return[c,ml(r.type,a,e),c]}case"blockFolded":case"blockLiteral":return aL(t,n,e);case"mapping":case"sequence":return jr(Kt,t.map(n,"children"));case"sequenceItem":return["- ",mi(2,r.content?n("content"):"")];case"mappingKey":case"mappingValue":return r.content?n("content"):"";case"mappingItem":case"flowMappingItem":return dL(t,n,e);case"flowMapping":return Q$(t,n,e);case"flowSequence":return Q$(t,n,e);case"flowSequenceItem":return n("content");default:throw new BM(r,"YAML")}}function vL(t){return t.body.children.length>0||ji(t.body)}function X$(t,e){return ls(t)||e&&(e.head.children.length>0||ji(e.head))}function bL(t,e){let n=t.node;if(t.isFirst&&/---(?:\s|$)/.test(e.originalText.slice(ch(n),ch(n)+4))||n.head.children.length>0||ji(n.head)||ls(n.head))return"head";let r=t.next;return X$(n,r)?!1:r?"root":!1}function ml(t,e,n){let r=iL(t,e,n);return jr(Kt,r.map(i=>x$(jr(ll,i))))}function DL(t,e){if(Os(e))switch(delete e.position,e.type){case"comment":if(QM(e.value))return null;break;case"quoteDouble":case"quoteSingle":e.type="quote";break}}var wL={preprocess:mL,embed:qM,print:gL,massageAstNode:DL,insertPragma:ZM,getVisitorKeys:GM},_L=wL,Z$=[{linguistLanguageId:407,name:"YAML",type:"data",color:"#cb171e",tmScope:"source.yaml",aliases:["yml"],extensions:[".yml",".mir",".reek",".rviz",".sublime-syntax",".syntax",".yaml",".yaml-tmlanguage",".yaml.sed",".yml.mysql"],filenames:[".clang-format",".clang-tidy",".gemrc","CITATION.cff","glide.lock",".prettierrc",".stylelintrc",".lintstagedrc"],aceMode:"yaml",codemirrorMode:"yaml",codemirrorMimeType:"text/x-yaml",parsers:["yaml"],vscodeLanguageIds:["yaml","ansible","home-assistant"]}],m0={bracketSpacing:{category:"Common",type:"boolean",default:!0,description:"Print spaces between brackets.",oppositeDescription:"Do not print spaces between brackets."},singleQuote:{category:"Common",type:"boolean",default:!1,description:"Use single quotes instead of double quotes."},proseWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap prose.",choices:[{value:"always",description:"Wrap prose if it exceeds the print width."},{value:"never",description:"Do not wrap prose."},{value:"preserve",description:"Wrap prose as-is."}]},bracketSameLine:{category:"Common",type:"boolean",default:!1,description:"Put > of opening tags on the last line instead of on a new line."},singleAttributePerLine:{category:"Common",type:"boolean",default:!1,description:"Enforce single attribute per line in HTML, Vue and JSX."}},$L={bracketSpacing:m0.bracketSpacing,singleQuote:m0.singleQuote,proseWrap:m0.proseWrap},eE=$L,g0={};_$(g0,{yaml:()=>Wj});var fh=` -`,tE="\r",EL=function(){function t(e){this.length=e.length;for(var n=[0],r=0;rthis.length)return null;for(var n=0,r=this.offsets;r[n+1]<=e;)n++;var i=e-r[n];return{line:n,column:i}},t.prototype.indexForLocation=function(e){var n=e.line,r=e.column;return n<0||n>=this.offsets.length||r<0||r>this.lengthOfLine(n)?null:this.offsets[n]+r},t.prototype.lengthOfLine=function(e){var n=this.offsets[e],r=e===this.offsets.length-1?this.length:this.offsets[e+1];return r-n},t}();function Qr(t,e=null){"children"in t&&t.children.forEach(n=>Qr(n,t)),"anchor"in t&&t.anchor&&Qr(t.anchor,t),"tag"in t&&t.tag&&Qr(t.tag,t),"leadingComments"in t&&t.leadingComments.forEach(n=>Qr(n,t)),"middleComments"in t&&t.middleComments.forEach(n=>Qr(n,t)),"indicatorComment"in t&&t.indicatorComment&&Qr(t.indicatorComment,t),"trailingComment"in t&&t.trailingComment&&Qr(t.trailingComment,t),"endComments"in t&&t.endComments.forEach(n=>Qr(n,t)),Object.defineProperty(t,"_parent",{value:e,enumerable:!1})}function dh(t){return`${t.line}:${t.column}`}function SL(t){Qr(t);let e=TL(t),n=t.children.slice();t.comments.sort((r,i)=>r.position.start.offset-i.position.end.offset).filter(r=>!r._parent).forEach(r=>{for(;n.length>1&&r.position.start.line>n[0].position.end.line;)n.shift();kL(r,e,n[0])})}function TL(t){let e=Array.from(new Array(t.position.end.line),()=>({}));for(let n of t.comments)e[n.position.start.line-1].comment=n;return nE(e,t),e}function nE(t,e){if(e.position.start.offset!==e.position.end.offset){if("leadingComments"in e){let{start:n}=e.position,{leadingAttachableNode:r}=t[n.line-1];(!r||n.column1&&e.type!=="document"&&e.type!=="documentHead"){let{end:n}=e.position,{trailingAttachableNode:r}=t[n.line-1];(!r||n.column>=r.position.end.column)&&(t[n.line-1].trailingAttachableNode=e)}if(e.type!=="root"&&e.type!=="document"&&e.type!=="documentHead"&&e.type!=="documentBody"){let{start:n,end:r}=e.position,i=[r.line].concat(n.line===r.line?[]:n.line);for(let s of i){let a=t[s-1].trailingNode;(!a||r.column>=a.position.end.column)&&(t[s-1].trailingNode=e)}}"children"in e&&e.children.forEach(n=>{nE(t,n)})}}function kL(t,e,n){let r=t.position.start.line,{trailingAttachableNode:i}=e[r-1];if(i){if(i.trailingComment)throw new Error(`Unexpected multiple trailing comment at ${dh(t.position.start)}`);Qr(t,i),i.trailingComment=t;return}for(let a=r;a>=n.position.start.line;a--){let{trailingNode:c}=e[a-1],l;if(c)l=c;else if(a!==r&&e[a-1].comment)l=e[a-1].comment._parent;else continue;if((l.type==="sequence"||l.type==="mapping")&&(l=l.children[0]),l.type==="mappingItem"){let[d,h]=l.children;l=rE(d)?d:h}for(;;){if(AL(l,t)){Qr(t,l),l.endComments.push(t);return}if(!l._parent)break;l=l._parent}break}for(let a=r+1;a<=n.position.end.line;a++){let{leadingAttachableNode:c}=e[a-1];if(c){Qr(t,c),c.leadingComments.push(t);return}}let s=n.children[1];Qr(t,s),s.endComments.push(t)}function AL(t,e){if(t.position.start.offsete.position.end.offset)switch(t.type){case"flowMapping":case"flowSequence":return t.children.length===0||e.position.start.line>t.children[t.children.length-1].position.end.line}if(e.position.end.offsett.position.start.column;case"mappingKey":case"mappingValue":return e.position.start.column>t._parent.position.start.column&&(t.children.length===0||t.children.length===1&&t.children[0].type!=="blockFolded"&&t.children[0].type!=="blockLiteral")&&(t.type==="mappingValue"||rE(t));default:return!1}}function rE(t){return t.position.start!==t.position.end&&(t.children.length===0||t.position.start.offset!==t.children[0].position.start.offset)}function Wn(t,e){return{type:t,position:e}}function CL(t,e,n){return{...Wn("root",t),children:e,comments:n}}function hh(t){switch(t.type){case"DOCUMENT":for(let e=t.contents.length-1;e>=0;e--)t.contents[e].type==="BLANK_LINE"?t.contents.splice(e,1):hh(t.contents[e]);for(let e=t.directives.length-1;e>=0;e--)t.directives[e].type==="BLANK_LINE"&&t.directives.splice(e,1);break;case"FLOW_MAP":case"FLOW_SEQ":case"MAP":case"SEQ":for(let e=t.items.length-1;e>=0;e--){let n=t.items[e];"char"in n||(n.type==="BLANK_LINE"?t.items.splice(e,1):hh(n))}break;case"MAP_KEY":case"MAP_VALUE":case"SEQ_ITEM":t.node&&hh(t.node);break;case"ALIAS":case"BLANK_LINE":case"BLOCK_FOLDED":case"BLOCK_LITERAL":case"COMMENT":case"DIRECTIVE":case"PLAIN":case"QUOTE_DOUBLE":case"QUOTE_SINGLE":break;default:throw new Error(`Unexpected node type ${JSON.stringify(t.type)}`)}}function ju(){return{leadingComments:[]}}function ph(t=null){return{trailingComment:t}}function ma(){return{...ju(),...ph()}}function OL(t,e,n){return{...Wn("alias",t),...ma(),...e,value:n}}function PL(t,e){let n=t.cstNode;return OL(e.transformRange({origStart:n.valueRange.origStart-1,origEnd:n.valueRange.origEnd}),e.transformContent(t),n.rawValue)}function NL(t){return{...t,type:"blockFolded"}}function FL(t,e,n,r,i,s){return{...Wn("blockValue",t),...ju(),...e,chomping:n,indent:r,value:i,indicatorComment:s}}var xu;(function(t){t.Tag="!",t.Anchor="&",t.Comment="#"})(xu||(xu={}));function RL(t,e){return{...Wn("anchor",t),value:e}}function y0(t,e){return{...Wn("comment",t),value:e}}function IL(t,e,n){return{anchor:e,tag:t,middleComments:n}}function ML(t,e){return{...Wn("tag",t),value:e}}function iE(t,e,n=()=>!1){let r=t.cstNode,i=[],s=null,a=null,c=null;for(let l of r.props){let d=e.text[l.origStart];switch(d){case xu.Tag:s=s||l,a=ML(e.transformRange(l),t.tag);break;case xu.Anchor:s=s||l,c=RL(e.transformRange(l),r.anchor);break;case xu.Comment:{let h=y0(e.transformRange(l),e.text.slice(l.origStart+1,l.origEnd));e.comments.push(h),!n(h)&&s&&s.origEnd<=l.origStart&&l.origEnd<=r.valueRange.origStart&&i.push(h);break}default:throw new Error(`Unexpected leading character ${JSON.stringify(d)}`)}}return IL(a,c,i)}var v0;(function(t){t.CLIP="clip",t.STRIP="strip",t.KEEP="keep"})(v0||(v0={}));function sE(t,e){let n=t.cstNode,r=1,i=n.chomping==="CLIP"?0:1,s=n.header.origEnd-n.header.origStart-r-i!==0,a=e.transformRange({origStart:n.header.origStart,origEnd:n.valueRange.origEnd}),c=null,l=iE(t,e,d=>{if(!(a.start.offset=0;l--){let d=t.contents[l];if(d.type==="COMMENT"){let h=e.transformNode(d);n&&n.line===h.position.start.line?a.unshift(h):c?r.unshift(h):h.position.start.offset>=t.valueRange.origEnd?s.unshift(h):r.unshift(h)}else c=!0}if(s.length>1)throw new Error(`Unexpected multiple document trailing comments at ${dh(s[1].position.start)}`);if(a.length>1)throw new Error(`Unexpected multiple documentHead trailing comments at ${dh(a[1].position.start)}`);return{comments:r,endComments:i,documentTrailingComment:Do(s)||null,documentHeadTrailingComment:Do(a)||null}}function zL(t,e,n){let r=aE(n.text.slice(t.valueRange.origEnd),/^\.\.\./),i=r===-1?t.valueRange.origEnd:Math.max(0,t.valueRange.origEnd-1);n.text[i-1]==="\r"&&i--;let s=n.transformRange({origStart:e!==null?e.position.start.offset:i,origEnd:i}),a=r===-1?s.end:n.transformOffset(t.valueRange.origEnd+3);return{position:s,documentEndPoint:a}}function YL(t,e,n,r){return{...Wn("documentHead",t),...ya(n),...ph(r),children:e}}function GL(t,e){let n=t.cstNode,{directives:r,comments:i,endComments:s}=JL(n,e),{position:a,endMarkerPoint:c}=QL(n,r,e);return e.comments.push(...i,...s),{createDocumentHeadWithTrailingComment:l=>(l&&e.comments.push(l),YL(a,r,s,l)),documentHeadEndMarkerPoint:c}}function JL(t,e){let n=[],r=[],i=[],s=!1;for(let a=t.directives.length-1;a>=0;a--){let c=e.transformNode(t.directives[a]);c.type==="comment"?s?r.unshift(c):i.unshift(c):(s=!0,n.unshift(c))}return{directives:n,comments:r,endComments:i}}function QL(t,e,n){let r=aE(n.text.slice(0,t.valueRange.origStart),/---\s*$/);r>0&&!/[\r\n]/.test(n.text[r-1])&&(r=-1);let i=r===-1?{origStart:t.valueRange.origStart,origEnd:t.valueRange.origStart}:{origStart:r,origEnd:r+3};return e.length!==0&&(i.origStart=e[0].position.start.offset),{position:n.transformRange(i),endMarkerPoint:r===-1?null:n.transformOffset(r)}}function XL(t,e){let{createDocumentHeadWithTrailingComment:n,documentHeadEndMarkerPoint:r}=GL(t,e),{documentBody:i,documentEndPoint:s,documentTrailingComment:a,documentHeadTrailingComment:c}=HL(t,e,r),l=n(c);return a&&e.comments.push(a),UL(ga(l.position.start,s),l,i,a)}function uE(t,e,n){return{...Wn("flowCollection",t),...ma(),...ya(),...e,children:n}}function ZL(t,e,n){return{...uE(t,e,n),type:"flowMapping"}}function cE(t,e,n){return{...Wn("flowMappingItem",t),...ju(),children:[e,n]}}function mh(t,e){let n=[];for(let r of t)r&&"type"in r&&r.type==="COMMENT"?e.comments.push(e.transformNode(r)):n.push(r);return n}function lE(t){let[e,n]=["?",":"].map(r=>{let i=t.find(s=>"char"in s&&s.char===r);return i?{origStart:i.origOffset,origEnd:i.origOffset+1}:null});return{additionalKeyRange:e,additionalValueRange:n}}function fE(t,e){let n=e;return r=>t.slice(n,n=r)}function dE(t){let e=[],n=fE(t,1),r=!1;for(let i=1;i{let d=r[l],{additionalKeyRange:h,additionalValueRange:m}=lE(d);return D0(c,e,cE,h,m)}),s=n[0],a=Do(n);return ZL(e.transformRange({origStart:s.origOffset,origEnd:a.origOffset+1}),e.transformContent(t),i)}function tj(t,e,n){return{...uE(t,e,n),type:"flowSequence"}}function nj(t,e){return{...Wn("flowSequenceItem",t),children:[e]}}function rj(t,e){let n=mh(t.cstNode.items,e),r=dE(n),i=t.items.map((c,l)=>{if(c.type!=="PAIR"){let d=e.transformNode(c);return nj(ga(d.position.start,d.position.end),d)}else{let d=r[l],{additionalKeyRange:h,additionalValueRange:m}=lE(d);return D0(c,e,cE,h,m)}}),s=n[0],a=Do(n);return tj(e.transformRange({origStart:s.origOffset,origEnd:a.origOffset+1}),e.transformContent(t),i)}function ij(t,e,n){return{...Wn("mapping",t),...ju(),...e,children:n}}function sj(t,e,n){return{...Wn("mappingItem",t),...ju(),children:[e,n]}}function oj(t,e){let n=t.cstNode;n.items.filter(a=>a.type==="MAP_KEY"||a.type==="MAP_VALUE").forEach(a=>b0(a,e));let r=mh(n.items,e),i=aj(r),s=t.items.map((a,c)=>{let l=i[c],[d,h]=l[0].type==="MAP_VALUE"?[null,l[0].range]:[l[0].range,l.length===1?null:l[1].range];return D0(a,e,sj,d,h)});return ij(ga(s[0].position.start,Do(s).position.end),e.transformContent(t),s)}function aj(t){let e=[],n=fE(t,0),r=!1;for(let i=0;i=0;r--)if(n.test(t[r]))return r;return-1}function lj(t,e){let n=t.cstNode;return uj(e.transformRange({origStart:n.valueRange.origStart,origEnd:cj(e.text,n.valueRange.origEnd-1,/\S/)+1}),e.transformContent(t),n.strValue)}function fj(t){return{...t,type:"quoteDouble"}}function dj(t,e,n){return{...Wn("quoteValue",t),...e,...ma(),value:n}}function mE(t,e){let n=t.cstNode;return dj(e.transformRange(n.valueRange),e.transformContent(t),n.strValue)}function hj(t,e){return fj(mE(t,e))}function pj(t){return{...t,type:"quoteSingle"}}function mj(t,e){return pj(mE(t,e))}function gj(t,e,n){return{...Wn("sequence",t),...ju(),...ya(),...e,children:n}}function yj(t,e){return{...Wn("sequenceItem",t),...ma(),...ya(),children:e?[e]:[]}}function vj(t,e){let n=mh(t.cstNode.items,e).map((r,i)=>{b0(r,e);let s=e.transformNode(t.items[i]);return yj(ga(e.transformOffset(r.valueRange.origStart),s===null?e.transformOffset(r.valueRange.origStart+1):s.position.end),s)});return gj(ga(n[0].position.start,Do(n).position.end),e.transformContent(t),n)}function bj(t,e){if(t===null||t.type===void 0&&t.value===null)return null;switch(t.type){case"ALIAS":return PL(t,e);case"BLOCK_FOLDED":return LL(t,e);case"BLOCK_LITERAL":return xL(t,e);case"COMMENT":return BL(t,e);case"DIRECTIVE":return WL(t,e);case"DOCUMENT":return XL(t,e);case"FLOW_MAP":return ej(t,e);case"FLOW_SEQ":return rj(t,e);case"MAP":return oj(t,e);case"PLAIN":return lj(t,e);case"QUOTE_DOUBLE":return hj(t,e);case"QUOTE_SINGLE":return mj(t,e);case"SEQ":return vj(t,e);default:throw new Error(`Unexpected node type ${t.type}`)}}function Dj(t,e,n){let r=new SyntaxError(t);return r.name="YAMLSyntaxError",r.source=e,r.position=n,r}function wj(t,e){let n=t.source.range||t.source.valueRange;return Dj(t.message,e.text,e.transformRange(n))}function _j(t,e,n){return{offset:t,line:e,column:n}}function $j(t,e){t<0?t=0:t>e.text.length&&(t=e.text.length);let n=e.locator.locationForIndex(t);return _j(t,n.line+1,n.column+1)}function Ej(t,e){return ga(e.transformOffset(t.origStart),e.transformOffset(t.origEnd))}function Sj(t){if(!t.setOrigRanges()){let e=n=>{if(Tj(n))return n.origStart=n.start,n.origEnd=n.end,!0;if(kj(n))return n.origOffset=n.offset,!0};t.forEach(n=>w0(n,e))}}function w0(t,e){if(!(!t||typeof t!="object")&&e(t)!==!0)for(let n of Object.keys(t)){if(n==="context"||n==="error")continue;let r=t[n];Array.isArray(r)?r.forEach(i=>w0(i,e)):w0(r,e)}}function Tj(t){return typeof t.start=="number"}function kj(t){return typeof t.offset=="number"}function gE(t){if("children"in t){if(t.children.length===1){let e=t.children[0];if(e.type==="plain"&&e.tag===null&&e.anchor===null&&e.value==="")return t.children.splice(0,1),t}t.children.forEach(gE)}return t}function yE(t,e,n,r){let i=e(t);return s=>{r(i,s)&&n(t,i=s)}}function vE(t){if(t===null||!("children"in t))return;let e=t.children;if(e.forEach(vE),t.type==="document"){let[s,a]=t.children;s.position.start.offset===s.position.end.offset?s.position.start=s.position.end=a.position.start:a.position.start.offset===a.position.end.offset&&(a.position.start=a.position.end=s.position.end)}let n=yE(t.position,Aj,Cj,Nj),r=yE(t.position,Oj,Pj,Fj);"endComments"in t&&t.endComments.length!==0&&(n(t.endComments[0].position.start),r(Do(t.endComments).position.end));let i=e.filter(s=>s!==null);if(i.length!==0){let s=i[0],a=Do(i);n(s.position.start),r(a.position.end),"leadingComments"in s&&s.leadingComments.length!==0&&n(s.leadingComments[0].position.start),"tag"in s&&s.tag&&n(s.tag.position.start),"anchor"in s&&s.anchor&&n(s.anchor.position.start),"trailingComment"in a&&a.trailingComment&&r(a.trailingComment.position.end)}}function Aj(t){return t.start}function Cj(t,e){t.start=e}function Oj(t){return t.end}function Pj(t,e){t.end=e}function Nj(t,e){return e.offsett.offset}var Rj=$$(yM(),1),gi=$$(vM(),1);gi.default.findPair,gi.default.toJSON,gi.default.parseMap,gi.default.parseSeq,gi.default.stringifyNumber,gi.default.stringifyString,gi.default.Type,gi.default.YAMLError,gi.default.YAMLReferenceError;var Ij=gi.default.YAMLSemanticError;gi.default.YAMLSyntaxError,gi.default.YAMLWarning;var{Document:Mj,parseCST:Lj}=Rj.default;function jj(t){let e=Lj(t);Sj(e);let n=e.map(c=>new Mj({merge:!1,keepCstNodes:!0}).parse(c)),r=new EL(t),i=[],s={text:t,locator:r,comments:i,transformOffset:c=>$j(c,s),transformRange:c=>Ej(c,s),transformNode:c=>bj(c,s),transformContent:c=>iE(c,s)};for(let c of n)for(let l of c.errors)if(!(l instanceof Ij&&l.message==='Map keys must be unique; "<<" is repeated'))throw wj(l,s);n.forEach(c=>hh(c.cstNode));let a=CL(s.transformRange({origStart:0,origEnd:s.text.length}),n.map(s.transformNode),i);return SL(a),vE(a),gE(a),a}function xj(t,e){let n=new SyntaxError(t+" ("+e.loc.start.line+":"+e.loc.start.column+")");return Object.assign(n,e)}var Bj=xj;function qj(t){try{let e=jj(t);return delete e.comments,e}catch(e){throw e!=null&&e.position?Bj(e.message,{loc:e.position,cause:e}):e}}var Wj={astFormat:"yaml",parse:qj,hasPragma:XM,locStart:ch,locEnd:JM},bE={yaml:_L},Uj=T$,Vj=Object.freeze({__proto__:null,default:Uj,languages:Z$,options:eE,parsers:g0,printers:bE});class Hj{constructor(){this.formatterEnabled=!0}configure(e){e&&(this.formatterEnabled=e.format)}async format(e,n={}){if(!this.formatterEnabled)return[];try{const r=e.getText(),i={parser:"yaml",plugins:[Vj],tabWidth:n.tabWidth||n.tabSize,singleQuote:n.singleQuote,bracketSpacing:n.bracketSpacing,proseWrap:n.proseWrap==="always"?"always":n.proseWrap==="never"?"never":"preserve",printWidth:n.printWidth},s=await w$.exports.format(r,i);return[an.replace(ot.create(Zn.create(0,0),e.positionAt(r.length)),s)]}catch{return[]}}}class Kj{constructor(e){this.telemetry=e}findLinks(e){var n;try{const r=di.getYamlDocument(e),i=[];for(const s of r.documents)i.push(vO(e,s));return Promise.all(i).then(s=>[].concat(...s))}catch(r){(n=this.telemetry)==null||n.sendError("yaml.documentLink.error",r)}}}function zj(t,e){if(!t)return;const n=[],r=di.getYamlDocument(t);for(const s of r.documents)r.documents.length>1&&n.push(gh(t,s.root)),s.visit(a=>{var c;if(a.type==="object"&&((c=a.parent)==null?void 0:c.type)==="array"&&n.push(gh(t,a)),a.type==="property"&&a.valueNode)switch(a.valueNode.type){case"array":case"object":n.push(gh(t,a));break;case"string":{const l=t.positionAt(a.offset),d=t.positionAt(a.valueNode.offset+a.valueNode.length);l.line!==d.line&&n.push(gh(t,a));break}default:return!0}return!0});const i=e&&e.rangeLimit;return typeof i!="number"||n.length<=i?n:(e&&e.onRangeLimitExceeded&&e.onRangeLimitExceeded(t.uri),n.slice(0,e.rangeLimit))}function gh(t,e){const n=t.positionAt(e.offset);let r=t.positionAt(e.offset+e.length);const i=t.getText(ot.create(n,r)),s=i.length-i.trimRight().length;return s>0&&(r=t.positionAt(e.offset+e.length-s)),pf.create(n.line,r.line,n.character,r.character)}var yh;(function(t){t.JUMP_TO_SCHEMA="jumpToSchema"})(yh||(yh={}));class Yj{constructor(e){this.indentation=e}write(e){if(e.internalNode.srcToken.type!=="flow-collection")return null;const n=e.internalNode.srcToken,r=n.start.type==="flow-map-start"?"block-map":"block-seq",i=e.parent.type,s={type:r,offset:n.offset,indent:n.indent,items:[]};for(const a of n.items)ta(a,({key:c,sep:l,value:d})=>{if(r==="block-map"){const h=[{type:"space",indent:0,offset:c.offset,source:this.indentation}];i==="property"&&h.unshift({type:"newline",indent:0,offset:c.offset,source:` +`).map(l=>l.slice(s));if(r.proseWrap==="preserve"||t.type==="blockLiteral")return c(a.map(l=>l.length===0?[]:[l]));return c(a.map(l=>l.length===0?[]:Y$(l)).reduce((l,d,h)=>h!==0&&a[h-1].length>0&&d.length>0&&!/^\s/.test(d[0])&&!/^\s|\s$/.test(pi(!1,l,-1))?[...l.slice(0,-1),[...pi(!1,l,-1),...d]]:[...l,d],[]).map(l=>l.reduce((d,h)=>d.length>0&&/\s$/.test(pi(!1,d,-1))?[...d.slice(0,-1),pi(!1,d,-1)+" "+h]:[...d,h],[])).map(l=>r.proseWrap==="never"?[l.join(" ")]:l));function c(l){if(t.chomping==="keep")return pi(!1,l,-1).length===0?l.slice(0,-1):l;let d=0;for(let h=l.length-1;h>=0&&l[h].length===0;h--)d++;return d===0?l:d>=2&&!n?l.slice(0,-(d-1)):l.slice(0,-d)}}function d0(t){if(!t)return!0;switch(t.type){case"plain":case"quoteDouble":case"quoteSingle":case"alias":case"flowMapping":case"flowSequence":return!0;default:return!1}}var h0=new WeakMap;function G$(t,e){let{node:n,root:r}=t,i;return h0.has(r)?i=h0.get(r):(i=new Set,h0.set(r,i)),!i.has(n.position.end.line)&&(i.add(n.position.end.line),tL(n,e)&&!J$(t.parent))?B$:""}function J$(t){return ji(t)&&!Os(t,["documentHead","documentBody","flowMapping","flowSequence"])}function mi(t,e){return ah(" ".repeat(t),e)}function oL(t,e,n){let{node:r}=t,i=t.ancestors.filter(d=>d.type==="sequence"||d.type==="mapping").length,s=H$(t),a=[r.type==="blockFolded"?">":"|"];r.indent!==null&&a.push(r.indent.toString()),r.chomping!=="clip"&&a.push(r.chomping==="keep"?"+":"-"),z$(r)&&a.push(" ",e("indicatorComment"));let c=sL(r,{parentIndent:i,isLastDescendant:s,options:n}),l=[];for(let[d,h]of c.entries())d===0&&l.push(Kt),l.push(x$(jr(fl,h))),d!==c.length-1?l.push(h.length===0?Kt:TM(l0)):r.chomping==="keep"&&s&&l.push(L$(h.length===0?Kt:l0));return r.indent===null?a.push(AM(mi(n.tabWidth,l))):a.push(L$(mi(r.indent-1+i,l))),a}var aL=oL;function Q$(t,e,n){let{node:r}=t,i=r.type==="flowMapping",s=i?"{":"[",a=i?"}":"]",c=B$;i&&r.children.length>0&&n.bracketSpacing&&(c=fl);let l=pi(!1,r.children,-1),d=(l==null?void 0:l.type)==="flowMappingItem"&&lh(l.key)&&lh(l.value);return[s,mi(n.tabWidth,[c,uL(t,e,n),n.trailingComma==="none"?"":u0(","),ji(r)?[Kt,jr(Kt,t.map(e,"endComments"))]:""]),d?"":c,a]}function uL(t,e,n){return t.map(({isLast:r,node:i,next:s})=>[e(),r?"":[",",fl,i.position.start.line!==s.position.start.line?G$(t,n.originalText):""]],"children")}function cL(t,e,n){var r;let{node:i,parent:s}=t,{key:a,value:c}=i,l=lh(a),d=lh(c);if(l&&d)return": ";let h=e("key"),m=lL(i)?" ":"";if(d)return i.type==="flowMappingItem"&&s.type==="flowMapping"?h:i.type==="mappingItem"&&p0(a.content,n)&&!ls(a.content)&&((r=s.tag)==null?void 0:r.value)!=="tag:yaml.org,2002:set"?[h,m,":"]:["? ",mi(2,h)];let E=e("value");if(l)return[": ",mi(2,E)];if(bo(c)||!d0(a.content))return["? ",mi(2,h),Kt,...t.map(()=>[e(),Kt],"value","leadingComments"),": ",mi(2,E)];if(fL(a.content)&&!bo(a.content)&&!Lu(a.content)&&!ls(a.content)&&!ji(a)&&!bo(c.content)&&!Lu(c.content)&&!ji(c)&&p0(c.content,n))return[h,m,": ",E];let T=Symbol("mappingKey"),R=uh([u0("? "),uh(mi(2,h),{id:T})]),P=[Kt,": ",mi(2,E)],A=[m,":"];bo(c.content)||ji(c)&&c.content&&!Os(c.content,["mapping","sequence"])||s.type==="mapping"&&ls(a.content)&&d0(c.content)||Os(c.content,["mapping","sequence"])&&c.content.tag===null&&c.content.anchor===null?A.push(Kt):c.content&&A.push(fl),A.push(E);let F=mi(n.tabWidth,A);return p0(a.content,n)&&!bo(a.content)&&!Lu(a.content)&&!ji(a)?j$([[h,F]]):j$([[R,u0(P,F,{groupId:T})]])}function p0(t,e){if(!t)return!0;switch(t.type){case"plain":case"quoteSingle":case"quoteDouble":break;case"alias":return!0;default:return!1}if(e.proseWrap==="preserve")return t.position.start.line===t.position.end.line;if(/\\$/m.test(e.originalText.slice(t.position.start.offset,t.position.end.offset)))return!1;switch(e.proseWrap){case"never":return!t.value.includes(` +`);case"always":return!/[\n ]/.test(t.value);default:return!1}}function lL(t){var e;return((e=t.key.content)==null?void 0:e.type)==="alias"}function fL(t){if(!t)return!0;switch(t.type){case"plain":case"quoteDouble":case"quoteSingle":return t.position.start.line===t.position.end.line;case"alias":return!0;default:return!1}}var dL=cL;function hL(t){return V$(t,pL)}function pL(t){switch(t.type){case"document":ml(t,"head",()=>t.children[0]),ml(t,"body",()=>t.children[1]);break;case"documentBody":case"sequenceItem":case"flowSequenceItem":case"mappingKey":case"mappingValue":ml(t,"content",()=>t.children[0]);break;case"mappingItem":case"flowMappingItem":ml(t,"key",()=>t.children[0]),ml(t,"value",()=>t.children[1]);break}return t}var mL=hL;function gL(t,e,n){let{node:r}=t,i=[];r.type!=="mappingValue"&&bo(r)&&i.push([jr(Kt,t.map(n,"leadingComments")),Kt]);let{tag:s,anchor:a}=r;s&&i.push(n("tag")),s&&a&&i.push(" "),a&&i.push(n("anchor"));let c="";return Os(r,["mapping","sequence","comment","directive","mappingItem","sequenceItem"])&&!H$(t)&&(c=G$(t,e.originalText)),(s||a)&&(Os(r,["sequence","mapping"])&&!Lu(r)?i.push(Kt):i.push(" ")),Lu(r)&&i.push([r.middleComments.length===1?"":Kt,jr(Kt,t.map(n,"middleComments")),Kt]),nL(t)?i.push(RM(e.originalText.slice(r.position.start.offset,r.position.end.offset).trimEnd())):i.push(uh(yL(t,e,n))),ls(r)&&!Os(r,["document","documentHead"])&&i.push(CM([r.type==="mappingValue"&&!r.content?"":" ",t.parent.type==="mappingKey"&&t.getParentNode(2).type==="mapping"&&d0(r)?"":c0,n("trailingComment")])),J$(r)&&i.push(mi(r.type==="sequenceItem"?2:0,[Kt,jr(Kt,t.map(({node:l})=>[jM(e.originalText,ch(l))?Kt:"",n()],"endComments"))])),i.push(c),i}function yL(t,e,n){let{node:r}=t;switch(r.type){case"root":{let i=[];t.each(({node:a,next:c,isFirst:l})=>{l||i.push(Kt),i.push(n()),X$(a,c)?(i.push(Kt,"..."),ls(a)&&i.push(" ",n("trailingComment"))):c&&!ls(c.head)&&i.push(Kt,"---")},"children");let s=f0(r);return(!Os(s,["blockLiteral","blockFolded"])||s.chomping!=="keep")&&i.push(Kt),i}case"document":{let i=[];return bL(t,e)==="head"&&((r.head.children.length>0||r.head.endComments.length>0)&&i.push(n("head")),ls(r.head)?i.push(["---"," ",n(["head","trailingComment"])]):i.push("---")),vL(r)&&i.push(n("body")),jr(Kt,i)}case"documentHead":return jr(Kt,[...t.map(n,"children"),...t.map(n,"endComments")]);case"documentBody":{let{children:i,endComments:s}=r,a="";if(i.length>0&&s.length>0){let c=f0(r);Os(c,["blockFolded","blockLiteral"])?c.chomping!=="keep"&&(a=[Kt,Kt]):a=Kt}return[jr(Kt,t.map(n,"children")),a,jr(Kt,t.map(n,"endComments"))]}case"directive":return["%",jr(" ",[r.name,...r.parameters])];case"comment":return["#",r.value];case"alias":return["*",r.value];case"tag":return e.originalText.slice(r.position.start.offset,r.position.end.offset);case"anchor":return["&",r.value];case"plain":return gl(r.type,e.originalText.slice(r.position.start.offset,r.position.end.offset),e);case"quoteDouble":case"quoteSingle":{let i="'",s='"',a=e.originalText.slice(r.position.start.offset+1,r.position.end.offset-1);if(r.type==="quoteSingle"&&a.includes("\\")||r.type==="quoteDouble"&&/\\[^"]/.test(a)){let l=r.type==="quoteDouble"?s:i;return[l,gl(r.type,a,e),l]}if(a.includes(s))return[i,gl(r.type,r.type==="quoteDouble"?t0(!1,t0(!1,a,'\\"',s),"'",i.repeat(2)):a,e),i];if(a.includes(i))return[s,gl(r.type,r.type==="quoteSingle"?t0(!1,a,"''",i):a,e),s];let c=e.singleQuote?i:s;return[c,gl(r.type,a,e),c]}case"blockFolded":case"blockLiteral":return aL(t,n,e);case"mapping":case"sequence":return jr(Kt,t.map(n,"children"));case"sequenceItem":return["- ",mi(2,r.content?n("content"):"")];case"mappingKey":case"mappingValue":return r.content?n("content"):"";case"mappingItem":case"flowMappingItem":return dL(t,n,e);case"flowMapping":return Q$(t,n,e);case"flowSequence":return Q$(t,n,e);case"flowSequenceItem":return n("content");default:throw new BM(r,"YAML")}}function vL(t){return t.body.children.length>0||ji(t.body)}function X$(t,e){return ls(t)||e&&(e.head.children.length>0||ji(e.head))}function bL(t,e){let n=t.node;if(t.isFirst&&/---(?:\s|$)/.test(e.originalText.slice(ch(n),ch(n)+4))||n.head.children.length>0||ji(n.head)||ls(n.head))return"head";let r=t.next;return X$(n,r)?!1:r?"root":!1}function gl(t,e,n){let r=iL(t,e,n);return jr(Kt,r.map(i=>x$(jr(fl,i))))}function DL(t,e){if(Os(e))switch(delete e.position,e.type){case"comment":if(QM(e.value))return null;break;case"quoteDouble":case"quoteSingle":e.type="quote";break}}var wL={preprocess:mL,embed:qM,print:gL,massageAstNode:DL,insertPragma:ZM,getVisitorKeys:GM},_L=wL,Z$=[{linguistLanguageId:407,name:"YAML",type:"data",color:"#cb171e",tmScope:"source.yaml",aliases:["yml"],extensions:[".yml",".mir",".reek",".rviz",".sublime-syntax",".syntax",".yaml",".yaml-tmlanguage",".yaml.sed",".yml.mysql"],filenames:[".clang-format",".clang-tidy",".gemrc","CITATION.cff","glide.lock",".prettierrc",".stylelintrc",".lintstagedrc"],aceMode:"yaml",codemirrorMode:"yaml",codemirrorMimeType:"text/x-yaml",parsers:["yaml"],vscodeLanguageIds:["yaml","ansible","home-assistant"]}],m0={bracketSpacing:{category:"Common",type:"boolean",default:!0,description:"Print spaces between brackets.",oppositeDescription:"Do not print spaces between brackets."},singleQuote:{category:"Common",type:"boolean",default:!1,description:"Use single quotes instead of double quotes."},proseWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap prose.",choices:[{value:"always",description:"Wrap prose if it exceeds the print width."},{value:"never",description:"Do not wrap prose."},{value:"preserve",description:"Wrap prose as-is."}]},bracketSameLine:{category:"Common",type:"boolean",default:!1,description:"Put > of opening tags on the last line instead of on a new line."},singleAttributePerLine:{category:"Common",type:"boolean",default:!1,description:"Enforce single attribute per line in HTML, Vue and JSX."}},$L={bracketSpacing:m0.bracketSpacing,singleQuote:m0.singleQuote,proseWrap:m0.proseWrap},eE=$L,g0={};_$(g0,{yaml:()=>Wj});var fh=` +`,tE="\r",EL=function(){function t(e){this.length=e.length;for(var n=[0],r=0;rthis.length)return null;for(var n=0,r=this.offsets;r[n+1]<=e;)n++;var i=e-r[n];return{line:n,column:i}},t.prototype.indexForLocation=function(e){var n=e.line,r=e.column;return n<0||n>=this.offsets.length||r<0||r>this.lengthOfLine(n)?null:this.offsets[n]+r},t.prototype.lengthOfLine=function(e){var n=this.offsets[e],r=e===this.offsets.length-1?this.length:this.offsets[e+1];return r-n},t}();function Qr(t,e=null){"children"in t&&t.children.forEach(n=>Qr(n,t)),"anchor"in t&&t.anchor&&Qr(t.anchor,t),"tag"in t&&t.tag&&Qr(t.tag,t),"leadingComments"in t&&t.leadingComments.forEach(n=>Qr(n,t)),"middleComments"in t&&t.middleComments.forEach(n=>Qr(n,t)),"indicatorComment"in t&&t.indicatorComment&&Qr(t.indicatorComment,t),"trailingComment"in t&&t.trailingComment&&Qr(t.trailingComment,t),"endComments"in t&&t.endComments.forEach(n=>Qr(n,t)),Object.defineProperty(t,"_parent",{value:e,enumerable:!1})}function dh(t){return`${t.line}:${t.column}`}function SL(t){Qr(t);let e=kL(t),n=t.children.slice();t.comments.sort((r,i)=>r.position.start.offset-i.position.end.offset).filter(r=>!r._parent).forEach(r=>{for(;n.length>1&&r.position.start.line>n[0].position.end.line;)n.shift();TL(r,e,n[0])})}function kL(t){let e=Array.from(new Array(t.position.end.line),()=>({}));for(let n of t.comments)e[n.position.start.line-1].comment=n;return nE(e,t),e}function nE(t,e){if(e.position.start.offset!==e.position.end.offset){if("leadingComments"in e){let{start:n}=e.position,{leadingAttachableNode:r}=t[n.line-1];(!r||n.column1&&e.type!=="document"&&e.type!=="documentHead"){let{end:n}=e.position,{trailingAttachableNode:r}=t[n.line-1];(!r||n.column>=r.position.end.column)&&(t[n.line-1].trailingAttachableNode=e)}if(e.type!=="root"&&e.type!=="document"&&e.type!=="documentHead"&&e.type!=="documentBody"){let{start:n,end:r}=e.position,i=[r.line].concat(n.line===r.line?[]:n.line);for(let s of i){let a=t[s-1].trailingNode;(!a||r.column>=a.position.end.column)&&(t[s-1].trailingNode=e)}}"children"in e&&e.children.forEach(n=>{nE(t,n)})}}function TL(t,e,n){let r=t.position.start.line,{trailingAttachableNode:i}=e[r-1];if(i){if(i.trailingComment)throw new Error(`Unexpected multiple trailing comment at ${dh(t.position.start)}`);Qr(t,i),i.trailingComment=t;return}for(let a=r;a>=n.position.start.line;a--){let{trailingNode:c}=e[a-1],l;if(c)l=c;else if(a!==r&&e[a-1].comment)l=e[a-1].comment._parent;else continue;if((l.type==="sequence"||l.type==="mapping")&&(l=l.children[0]),l.type==="mappingItem"){let[d,h]=l.children;l=rE(d)?d:h}for(;;){if(AL(l,t)){Qr(t,l),l.endComments.push(t);return}if(!l._parent)break;l=l._parent}break}for(let a=r+1;a<=n.position.end.line;a++){let{leadingAttachableNode:c}=e[a-1];if(c){Qr(t,c),c.leadingComments.push(t);return}}let s=n.children[1];Qr(t,s),s.endComments.push(t)}function AL(t,e){if(t.position.start.offsete.position.end.offset)switch(t.type){case"flowMapping":case"flowSequence":return t.children.length===0||e.position.start.line>t.children[t.children.length-1].position.end.line}if(e.position.end.offsett.position.start.column;case"mappingKey":case"mappingValue":return e.position.start.column>t._parent.position.start.column&&(t.children.length===0||t.children.length===1&&t.children[0].type!=="blockFolded"&&t.children[0].type!=="blockLiteral")&&(t.type==="mappingValue"||rE(t));default:return!1}}function rE(t){return t.position.start!==t.position.end&&(t.children.length===0||t.position.start.offset!==t.children[0].position.start.offset)}function Wn(t,e){return{type:t,position:e}}function CL(t,e,n){return{...Wn("root",t),children:e,comments:n}}function hh(t){switch(t.type){case"DOCUMENT":for(let e=t.contents.length-1;e>=0;e--)t.contents[e].type==="BLANK_LINE"?t.contents.splice(e,1):hh(t.contents[e]);for(let e=t.directives.length-1;e>=0;e--)t.directives[e].type==="BLANK_LINE"&&t.directives.splice(e,1);break;case"FLOW_MAP":case"FLOW_SEQ":case"MAP":case"SEQ":for(let e=t.items.length-1;e>=0;e--){let n=t.items[e];"char"in n||(n.type==="BLANK_LINE"?t.items.splice(e,1):hh(n))}break;case"MAP_KEY":case"MAP_VALUE":case"SEQ_ITEM":t.node&&hh(t.node);break;case"ALIAS":case"BLANK_LINE":case"BLOCK_FOLDED":case"BLOCK_LITERAL":case"COMMENT":case"DIRECTIVE":case"PLAIN":case"QUOTE_DOUBLE":case"QUOTE_SINGLE":break;default:throw new Error(`Unexpected node type ${JSON.stringify(t.type)}`)}}function ju(){return{leadingComments:[]}}function ph(t=null){return{trailingComment:t}}function ma(){return{...ju(),...ph()}}function OL(t,e,n){return{...Wn("alias",t),...ma(),...e,value:n}}function PL(t,e){let n=t.cstNode;return OL(e.transformRange({origStart:n.valueRange.origStart-1,origEnd:n.valueRange.origEnd}),e.transformContent(t),n.rawValue)}function NL(t){return{...t,type:"blockFolded"}}function FL(t,e,n,r,i,s){return{...Wn("blockValue",t),...ju(),...e,chomping:n,indent:r,value:i,indicatorComment:s}}var xu;(function(t){t.Tag="!",t.Anchor="&",t.Comment="#"})(xu||(xu={}));function RL(t,e){return{...Wn("anchor",t),value:e}}function y0(t,e){return{...Wn("comment",t),value:e}}function IL(t,e,n){return{anchor:e,tag:t,middleComments:n}}function ML(t,e){return{...Wn("tag",t),value:e}}function iE(t,e,n=()=>!1){let r=t.cstNode,i=[],s=null,a=null,c=null;for(let l of r.props){let d=e.text[l.origStart];switch(d){case xu.Tag:s=s||l,a=ML(e.transformRange(l),t.tag);break;case xu.Anchor:s=s||l,c=RL(e.transformRange(l),r.anchor);break;case xu.Comment:{let h=y0(e.transformRange(l),e.text.slice(l.origStart+1,l.origEnd));e.comments.push(h),!n(h)&&s&&s.origEnd<=l.origStart&&l.origEnd<=r.valueRange.origStart&&i.push(h);break}default:throw new Error(`Unexpected leading character ${JSON.stringify(d)}`)}}return IL(a,c,i)}var v0;(function(t){t.CLIP="clip",t.STRIP="strip",t.KEEP="keep"})(v0||(v0={}));function sE(t,e){let n=t.cstNode,r=1,i=n.chomping==="CLIP"?0:1,s=n.header.origEnd-n.header.origStart-r-i!==0,a=e.transformRange({origStart:n.header.origStart,origEnd:n.valueRange.origEnd}),c=null,l=iE(t,e,d=>{if(!(a.start.offset=0;l--){let d=t.contents[l];if(d.type==="COMMENT"){let h=e.transformNode(d);n&&n.line===h.position.start.line?a.unshift(h):c?r.unshift(h):h.position.start.offset>=t.valueRange.origEnd?s.unshift(h):r.unshift(h)}else c=!0}if(s.length>1)throw new Error(`Unexpected multiple document trailing comments at ${dh(s[1].position.start)}`);if(a.length>1)throw new Error(`Unexpected multiple documentHead trailing comments at ${dh(a[1].position.start)}`);return{comments:r,endComments:i,documentTrailingComment:Do(s)||null,documentHeadTrailingComment:Do(a)||null}}function zL(t,e,n){let r=aE(n.text.slice(t.valueRange.origEnd),/^\.\.\./),i=r===-1?t.valueRange.origEnd:Math.max(0,t.valueRange.origEnd-1);n.text[i-1]==="\r"&&i--;let s=n.transformRange({origStart:e!==null?e.position.start.offset:i,origEnd:i}),a=r===-1?s.end:n.transformOffset(t.valueRange.origEnd+3);return{position:s,documentEndPoint:a}}function YL(t,e,n,r){return{...Wn("documentHead",t),...ya(n),...ph(r),children:e}}function GL(t,e){let n=t.cstNode,{directives:r,comments:i,endComments:s}=JL(n,e),{position:a,endMarkerPoint:c}=QL(n,r,e);return e.comments.push(...i,...s),{createDocumentHeadWithTrailingComment:l=>(l&&e.comments.push(l),YL(a,r,s,l)),documentHeadEndMarkerPoint:c}}function JL(t,e){let n=[],r=[],i=[],s=!1;for(let a=t.directives.length-1;a>=0;a--){let c=e.transformNode(t.directives[a]);c.type==="comment"?s?r.unshift(c):i.unshift(c):(s=!0,n.unshift(c))}return{directives:n,comments:r,endComments:i}}function QL(t,e,n){let r=aE(n.text.slice(0,t.valueRange.origStart),/---\s*$/);r>0&&!/[\r\n]/.test(n.text[r-1])&&(r=-1);let i=r===-1?{origStart:t.valueRange.origStart,origEnd:t.valueRange.origStart}:{origStart:r,origEnd:r+3};return e.length!==0&&(i.origStart=e[0].position.start.offset),{position:n.transformRange(i),endMarkerPoint:r===-1?null:n.transformOffset(r)}}function XL(t,e){let{createDocumentHeadWithTrailingComment:n,documentHeadEndMarkerPoint:r}=GL(t,e),{documentBody:i,documentEndPoint:s,documentTrailingComment:a,documentHeadTrailingComment:c}=HL(t,e,r),l=n(c);return a&&e.comments.push(a),UL(ga(l.position.start,s),l,i,a)}function uE(t,e,n){return{...Wn("flowCollection",t),...ma(),...ya(),...e,children:n}}function ZL(t,e,n){return{...uE(t,e,n),type:"flowMapping"}}function cE(t,e,n){return{...Wn("flowMappingItem",t),...ju(),children:[e,n]}}function mh(t,e){let n=[];for(let r of t)r&&"type"in r&&r.type==="COMMENT"?e.comments.push(e.transformNode(r)):n.push(r);return n}function lE(t){let[e,n]=["?",":"].map(r=>{let i=t.find(s=>"char"in s&&s.char===r);return i?{origStart:i.origOffset,origEnd:i.origOffset+1}:null});return{additionalKeyRange:e,additionalValueRange:n}}function fE(t,e){let n=e;return r=>t.slice(n,n=r)}function dE(t){let e=[],n=fE(t,1),r=!1;for(let i=1;i{let d=r[l],{additionalKeyRange:h,additionalValueRange:m}=lE(d);return D0(c,e,cE,h,m)}),s=n[0],a=Do(n);return ZL(e.transformRange({origStart:s.origOffset,origEnd:a.origOffset+1}),e.transformContent(t),i)}function tj(t,e,n){return{...uE(t,e,n),type:"flowSequence"}}function nj(t,e){return{...Wn("flowSequenceItem",t),children:[e]}}function rj(t,e){let n=mh(t.cstNode.items,e),r=dE(n),i=t.items.map((c,l)=>{if(c.type!=="PAIR"){let d=e.transformNode(c);return nj(ga(d.position.start,d.position.end),d)}else{let d=r[l],{additionalKeyRange:h,additionalValueRange:m}=lE(d);return D0(c,e,cE,h,m)}}),s=n[0],a=Do(n);return tj(e.transformRange({origStart:s.origOffset,origEnd:a.origOffset+1}),e.transformContent(t),i)}function ij(t,e,n){return{...Wn("mapping",t),...ju(),...e,children:n}}function sj(t,e,n){return{...Wn("mappingItem",t),...ju(),children:[e,n]}}function oj(t,e){let n=t.cstNode;n.items.filter(a=>a.type==="MAP_KEY"||a.type==="MAP_VALUE").forEach(a=>b0(a,e));let r=mh(n.items,e),i=aj(r),s=t.items.map((a,c)=>{let l=i[c],[d,h]=l[0].type==="MAP_VALUE"?[null,l[0].range]:[l[0].range,l.length===1?null:l[1].range];return D0(a,e,sj,d,h)});return ij(ga(s[0].position.start,Do(s).position.end),e.transformContent(t),s)}function aj(t){let e=[],n=fE(t,0),r=!1;for(let i=0;i=0;r--)if(n.test(t[r]))return r;return-1}function lj(t,e){let n=t.cstNode;return uj(e.transformRange({origStart:n.valueRange.origStart,origEnd:cj(e.text,n.valueRange.origEnd-1,/\S/)+1}),e.transformContent(t),n.strValue)}function fj(t){return{...t,type:"quoteDouble"}}function dj(t,e,n){return{...Wn("quoteValue",t),...e,...ma(),value:n}}function mE(t,e){let n=t.cstNode;return dj(e.transformRange(n.valueRange),e.transformContent(t),n.strValue)}function hj(t,e){return fj(mE(t,e))}function pj(t){return{...t,type:"quoteSingle"}}function mj(t,e){return pj(mE(t,e))}function gj(t,e,n){return{...Wn("sequence",t),...ju(),...ya(),...e,children:n}}function yj(t,e){return{...Wn("sequenceItem",t),...ma(),...ya(),children:e?[e]:[]}}function vj(t,e){let n=mh(t.cstNode.items,e).map((r,i)=>{b0(r,e);let s=e.transformNode(t.items[i]);return yj(ga(e.transformOffset(r.valueRange.origStart),s===null?e.transformOffset(r.valueRange.origStart+1):s.position.end),s)});return gj(ga(n[0].position.start,Do(n).position.end),e.transformContent(t),n)}function bj(t,e){if(t===null||t.type===void 0&&t.value===null)return null;switch(t.type){case"ALIAS":return PL(t,e);case"BLOCK_FOLDED":return LL(t,e);case"BLOCK_LITERAL":return xL(t,e);case"COMMENT":return BL(t,e);case"DIRECTIVE":return WL(t,e);case"DOCUMENT":return XL(t,e);case"FLOW_MAP":return ej(t,e);case"FLOW_SEQ":return rj(t,e);case"MAP":return oj(t,e);case"PLAIN":return lj(t,e);case"QUOTE_DOUBLE":return hj(t,e);case"QUOTE_SINGLE":return mj(t,e);case"SEQ":return vj(t,e);default:throw new Error(`Unexpected node type ${t.type}`)}}function Dj(t,e,n){let r=new SyntaxError(t);return r.name="YAMLSyntaxError",r.source=e,r.position=n,r}function wj(t,e){let n=t.source.range||t.source.valueRange;return Dj(t.message,e.text,e.transformRange(n))}function _j(t,e,n){return{offset:t,line:e,column:n}}function $j(t,e){t<0?t=0:t>e.text.length&&(t=e.text.length);let n=e.locator.locationForIndex(t);return _j(t,n.line+1,n.column+1)}function Ej(t,e){return ga(e.transformOffset(t.origStart),e.transformOffset(t.origEnd))}function Sj(t){if(!t.setOrigRanges()){let e=n=>{if(kj(n))return n.origStart=n.start,n.origEnd=n.end,!0;if(Tj(n))return n.origOffset=n.offset,!0};t.forEach(n=>w0(n,e))}}function w0(t,e){if(!(!t||typeof t!="object")&&e(t)!==!0)for(let n of Object.keys(t)){if(n==="context"||n==="error")continue;let r=t[n];Array.isArray(r)?r.forEach(i=>w0(i,e)):w0(r,e)}}function kj(t){return typeof t.start=="number"}function Tj(t){return typeof t.offset=="number"}function gE(t){if("children"in t){if(t.children.length===1){let e=t.children[0];if(e.type==="plain"&&e.tag===null&&e.anchor===null&&e.value==="")return t.children.splice(0,1),t}t.children.forEach(gE)}return t}function yE(t,e,n,r){let i=e(t);return s=>{r(i,s)&&n(t,i=s)}}function vE(t){if(t===null||!("children"in t))return;let e=t.children;if(e.forEach(vE),t.type==="document"){let[s,a]=t.children;s.position.start.offset===s.position.end.offset?s.position.start=s.position.end=a.position.start:a.position.start.offset===a.position.end.offset&&(a.position.start=a.position.end=s.position.end)}let n=yE(t.position,Aj,Cj,Nj),r=yE(t.position,Oj,Pj,Fj);"endComments"in t&&t.endComments.length!==0&&(n(t.endComments[0].position.start),r(Do(t.endComments).position.end));let i=e.filter(s=>s!==null);if(i.length!==0){let s=i[0],a=Do(i);n(s.position.start),r(a.position.end),"leadingComments"in s&&s.leadingComments.length!==0&&n(s.leadingComments[0].position.start),"tag"in s&&s.tag&&n(s.tag.position.start),"anchor"in s&&s.anchor&&n(s.anchor.position.start),"trailingComment"in a&&a.trailingComment&&r(a.trailingComment.position.end)}}function Aj(t){return t.start}function Cj(t,e){t.start=e}function Oj(t){return t.end}function Pj(t,e){t.end=e}function Nj(t,e){return e.offsett.offset}var Rj=$$(yM(),1),gi=$$(vM(),1);gi.default.findPair,gi.default.toJSON,gi.default.parseMap,gi.default.parseSeq,gi.default.stringifyNumber,gi.default.stringifyString,gi.default.Type,gi.default.YAMLError,gi.default.YAMLReferenceError;var Ij=gi.default.YAMLSemanticError;gi.default.YAMLSyntaxError,gi.default.YAMLWarning;var{Document:Mj,parseCST:Lj}=Rj.default;function jj(t){let e=Lj(t);Sj(e);let n=e.map(c=>new Mj({merge:!1,keepCstNodes:!0}).parse(c)),r=new EL(t),i=[],s={text:t,locator:r,comments:i,transformOffset:c=>$j(c,s),transformRange:c=>Ej(c,s),transformNode:c=>bj(c,s),transformContent:c=>iE(c,s)};for(let c of n)for(let l of c.errors)if(!(l instanceof Ij&&l.message==='Map keys must be unique; "<<" is repeated'))throw wj(l,s);n.forEach(c=>hh(c.cstNode));let a=CL(s.transformRange({origStart:0,origEnd:s.text.length}),n.map(s.transformNode),i);return SL(a),vE(a),gE(a),a}function xj(t,e){let n=new SyntaxError(t+" ("+e.loc.start.line+":"+e.loc.start.column+")");return Object.assign(n,e)}var Bj=xj;function qj(t){try{let e=jj(t);return delete e.comments,e}catch(e){throw e!=null&&e.position?Bj(e.message,{loc:e.position,cause:e}):e}}var Wj={astFormat:"yaml",parse:qj,hasPragma:XM,locStart:ch,locEnd:JM},bE={yaml:_L},Uj=k$,Vj=Object.freeze({__proto__:null,default:Uj,languages:Z$,options:eE,parsers:g0,printers:bE});class Hj{constructor(){this.formatterEnabled=!0}configure(e){e&&(this.formatterEnabled=e.format)}async format(e,n={}){if(!this.formatterEnabled)return[];try{const r=e.getText(),i={parser:"yaml",plugins:[Vj],tabWidth:n.tabWidth||n.tabSize,singleQuote:n.singleQuote,bracketSpacing:n.bracketSpacing,proseWrap:n.proseWrap==="always"?"always":n.proseWrap==="never"?"never":"preserve",printWidth:n.printWidth},s=await w$.exports.format(r,i);return[an.replace(ot.create(Zn.create(0,0),e.positionAt(r.length)),s)]}catch{return[]}}}class Kj{constructor(e){this.telemetry=e}findLinks(e){var n;try{const r=di.getYamlDocument(e),i=[];for(const s of r.documents)i.push(vO(e,s));return Promise.all(i).then(s=>[].concat(...s))}catch(r){(n=this.telemetry)==null||n.sendError("yaml.documentLink.error",r)}}}function zj(t,e){if(!t)return;const n=[],r=di.getYamlDocument(t);for(const s of r.documents)r.documents.length>1&&n.push(gh(t,s.root)),s.visit(a=>{var c;if(a.type==="object"&&((c=a.parent)==null?void 0:c.type)==="array"&&n.push(gh(t,a)),a.type==="property"&&a.valueNode)switch(a.valueNode.type){case"array":case"object":n.push(gh(t,a));break;case"string":{const l=t.positionAt(a.offset),d=t.positionAt(a.valueNode.offset+a.valueNode.length);l.line!==d.line&&n.push(gh(t,a));break}default:return!0}return!0});const i=e&&e.rangeLimit;return typeof i!="number"||n.length<=i?n:(e&&e.onRangeLimitExceeded&&e.onRangeLimitExceeded(t.uri),n.slice(0,e.rangeLimit))}function gh(t,e){const n=t.positionAt(e.offset);let r=t.positionAt(e.offset+e.length);const i=t.getText(ot.create(n,r)),s=i.length-i.trimRight().length;return s>0&&(r=t.positionAt(e.offset+e.length-s)),mf.create(n.line,r.line,n.character,r.character)}var yh;(function(t){t.JUMP_TO_SCHEMA="jumpToSchema"})(yh||(yh={}));class Yj{constructor(e){this.indentation=e}write(e){if(e.internalNode.srcToken.type!=="flow-collection")return null;const n=e.internalNode.srcToken,r=n.start.type==="flow-map-start"?"block-map":"block-seq",i=e.parent.type,s={type:r,offset:n.offset,indent:n.indent,items:[]};for(const a of n.items)ta(a,({key:c,sep:l,value:d})=>{if(r==="block-map"){const h=[{type:"space",indent:0,offset:c.offset,source:this.indentation}];i==="property"&&h.unshift({type:"newline",indent:0,offset:c.offset,source:` `}),s.items.push({start:h,key:c,sep:l,value:d})}else r==="block-seq"&&s.items.push({start:[{type:"newline",indent:0,offset:d.offset,source:` `},{type:"space",indent:0,offset:d.offset,source:this.indentation},{type:"seq-item-ind",indent:0,offset:d.offset,source:"-"},{type:"space",indent:0,offset:d.offset,source:" "}],value:d});if(d.type==="flow-collection")return gn.SKIP});return fw(s)}}var _0={exports:{}};/** * @license @@ -395,9 +395,9 @@ ${t}`}function eL(t){return Array.isArray(t)&&t.length>0}var hl=eL;function Os(t * Released under MIT license * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */(function(t,e){(function(){var n,r="4.17.21",i=200,s="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",c="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",d=500,h="__lodash_placeholder__",m=1,E=2,k=4,R=1,P=2,A=1,N=2,S=4,y=8,D=16,v=32,_=64,$=128,q=256,F=512,M=30,I="...",Y=800,K=16,ne=1,ge=2,ye=3,De=1/0,Be=9007199254740991,nt=17976931348623157e292,Se=0/0,H=4294967295,fe=H-1,ae=H>>>1,U=[["ary",$],["bind",A],["bindKey",N],["curry",y],["curryRight",D],["flip",F],["partial",v],["partialRight",_],["rearg",q]],Z="[object Arguments]",pe="[object Array]",Me="[object AsyncFunction]",Ie="[object Boolean]",qe="[object Date]",ze="[object DOMException]",Ge="[object Error]",rt="[object Function]",_n="[object GeneratorFunction]",at="[object Map]",un="[object Number]",Sn="[object Null]",Mt="[object Object]",Tn="[object Promise]",ur="[object Proxy]",kn="[object RegExp]",Lt="[object Set]",Vn="[object String]",Xn="[object Symbol]",Rn="[object Undefined]",qt="[object WeakMap]",X="[object WeakSet]",V="[object ArrayBuffer]",ee="[object DataView]",ie="[object Float32Array]",C="[object Float64Array]",g="[object Int8Array]",w="[object Int16Array]",j="[object Int32Array]",J="[object Uint8Array]",re="[object Uint8ClampedArray]",ce="[object Uint16Array]",Ne="[object Uint32Array]",Je=/\b__p \+= '';/g,He=/\b(__p \+=) '' \+/g,Xe=/(__e\(.*?\)|\b__t\)) \+\n'';/g,je=/&(?:amp|lt|gt|quot|#39);/g,gt=/[&<>"']/g,cn=RegExp(je.source),ht=RegExp(gt.source),Wt=/<%-([\s\S]+?)%>/g,wt=/<%([\s\S]+?)%>/g,$n=/<%=([\s\S]+?)%>/g,An=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,bi=/^\w*$/,Eo=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,fn=/[\\^$.*+?()[\]{}|]/g,Di=RegExp(fn.source),xi=/^\s+/,Q=/\s/,vn=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,bn=/\{\n\/\* \[wrapped with (.+)\] \*/,it=/,? & /,se=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ke=/[()=,{}\[\]\/\s]/,Le=/\\(\\)?/g,Ye=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,tn=/\w*$/,Gt=/^[-+]0x[0-9a-f]+$/i,Jt=/^0b[01]+$/i,Dn=/^\[object .+?Constructor\]$/,Hn=/^0o[0-7]+$/i,Ht=/^(?:0|[1-9]\d*)$/,pn=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Nt=/($^)/,mn=/['\n\r\u2028\u2029\\]/g,wn="\\ud800-\\udfff",vl="\\u0300-\\u036f",M0="\\ufe20-\\ufe2f",L0="\\u20d0-\\u20ff",Lh=vl+M0+L0,bl="\\u2700-\\u27bf",hr="a-z\\xdf-\\xf6\\xf8-\\xff",wi="\\xac\\xb1\\xd7\\xf7",_a="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",jh="\\u2000-\\u206f",j0=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",xh="A-Z\\xc0-\\xd6\\xd8-\\xde",Uu="\\ufe0e\\ufe0f",Vu=wi+_a+jh+j0,So="['\u2019]",Hu="["+wn+"]",Bh="["+Vu+"]",To="["+Lh+"]",$a="\\d+",Dl="["+bl+"]",ko="["+hr+"]",Ea="[^"+wn+Vu+$a+bl+hr+xh+"]",wl="\\ud83c[\\udffb-\\udfff]",x0="(?:"+To+"|"+wl+")",_l="[^"+wn+"]",Sa="(?:\\ud83c[\\udde6-\\uddff]){2}",$l="[\\ud800-\\udbff][\\udc00-\\udfff]",Ao="["+xh+"]",El="\\u200d",qh="(?:"+ko+"|"+Ea+")",Ta="(?:"+Ao+"|"+Ea+")",Wh="(?:"+So+"(?:d|ll|m|re|s|t|ve))?",Bi="(?:"+So+"(?:D|LL|M|RE|S|T|VE))?",Sl=x0+"?",Tl="["+Uu+"]?",B0="(?:"+El+"(?:"+[_l,Sa,$l].join("|")+")"+Tl+Sl+")*",Ns="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",q0="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",qi=Tl+Sl+B0,W0="(?:"+[Dl,Sa,$l].join("|")+")"+qi,U0="(?:"+[_l+To+"?",To,Sa,$l,Hu].join("|")+")",Uh=RegExp(So,"g"),V0=RegExp(To,"g"),kl=RegExp(wl+"(?="+wl+")|"+U0+qi,"g"),Ku=RegExp([Ao+"?"+ko+"+"+Wh+"(?="+[Bh,Ao,"$"].join("|")+")",Ta+"+"+Bi+"(?="+[Bh,Ao+qh,"$"].join("|")+")",Ao+"?"+qh+"+"+Wh,Ao+"+"+Bi,q0,Ns,$a,W0].join("|"),"g"),H0=RegExp("["+El+wn+Lh+Uu+"]"),Al=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Co=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Fs=-1,Yt={};Yt[ie]=Yt[C]=Yt[g]=Yt[w]=Yt[j]=Yt[J]=Yt[re]=Yt[ce]=Yt[Ne]=!0,Yt[Z]=Yt[pe]=Yt[V]=Yt[Ie]=Yt[ee]=Yt[qe]=Yt[Ge]=Yt[rt]=Yt[at]=Yt[un]=Yt[Mt]=Yt[kn]=Yt[Lt]=Yt[Vn]=Yt[qt]=!1;var nn={};nn[Z]=nn[pe]=nn[V]=nn[ee]=nn[Ie]=nn[qe]=nn[ie]=nn[C]=nn[g]=nn[w]=nn[j]=nn[at]=nn[un]=nn[Mt]=nn[kn]=nn[Lt]=nn[Vn]=nn[Xn]=nn[J]=nn[re]=nn[ce]=nn[Ne]=!0,nn[Ge]=nn[rt]=nn[qt]=!1;var Cl={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},Vh={"&":"&","<":"<",">":">",'"':""","'":"'"},Ol={"&":"&","<":"<",">":">",""":'"',"'":"'"},K0={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Hh=parseFloat,z0=parseInt,Kh=typeof Vt=="object"&&Vt&&Vt.Object===Object&&Vt,zh=typeof self=="object"&&self&&self.Object===Object&&self,Kn=Kh||zh||Function("return this")(),Pl=e&&!e.nodeType&&e,Wi=Pl&&!0&&t&&!t.nodeType&&t,Nl=Wi&&Wi.exports===Pl,Fl=Nl&&Kh.process,Br=function(){try{var he=Wi&&Wi.require&&Wi.require("util").types;return he||Fl&&Fl.binding&&Fl.binding("util")}catch{}}(),Yh=Br&&Br.isArrayBuffer,Gh=Br&&Br.isDate,Jh=Br&&Br.isMap,Rl=Br&&Br.isRegExp,Il=Br&&Br.isSet,Qh=Br&&Br.isTypedArray;function br(he,Te,_e){switch(_e.length){case 0:return he.call(Te);case 1:return he.call(Te,_e[0]);case 2:return he.call(Te,_e[0],_e[1]);case 3:return he.call(Te,_e[0],_e[1],_e[2])}return he.apply(Te,_e)}function Y0(he,Te,_e,Ke){for(var lt=-1,Ut=he==null?0:he.length;++lt-1}function Ll(he,Te,_e){for(var Ke=-1,lt=he==null?0:he.length;++Ke-1;);return _e}function rp(he,Te){for(var _e=he.length;_e--&&Rs(Te,he[_e],0)>-1;);return _e}function Z0(he,Te){for(var _e=he.length,Ke=0;_e--;)he[_e]===Te&&++Ke;return Ke}var ev=Qu(Cl),tv=Qu(Vh);function nv(he){return"\\"+K0[he]}function rv(he,Te){return he==null?n:he[Te]}function Is(he){return H0.test(he)}function ip(he){return Al.test(he)}function sp(he){for(var Te,_e=[];!(Te=he.next()).done;)_e.push(Te.value);return _e}function Zu(he){var Te=-1,_e=Array(he.size);return he.forEach(function(Ke,lt){_e[++Te]=[lt,Ke]}),_e}function Ul(he,Te){return function(_e){return he(Te(_e))}}function $i(he,Te){for(var _e=-1,Ke=he.length,lt=0,Ut=[];++_e-1}function vp(o,u){var p=this.__data__,T=pt(p,o);return T<0?(++this.size,p.push([o,u])):p[T][1]=u,this}Vi.prototype.clear=Ov,Vi.prototype.delete=Pv,Vi.prototype.get=Nv,Vi.prototype.has=Bs,Vi.prototype.set=vp;function Ei(o){var u=-1,p=o==null?0:o.length;for(this.clear();++u=u?o:u)),o}function hn(o,u,p,T,B,G){var oe,ue=u&m,me=u&E,Ce=u&k;if(p&&(oe=B?p(o,T,B,G):p(o)),oe!==n)return oe;if(!Cn(o))return o;var Oe=$t(o);if(Oe){if(oe=ZB(o),!ue)return Vr(o,oe)}else{var Fe=Dr(o),Ue=Fe==rt||Fe==_n;if(Wo(o))return FS(o,ue);if(Fe==Mt||Fe==Z||Ue&&!B){if(oe=me||Ue?{}:XS(o),!ue)return me?WB(o,xt(oe,o)):qB(o,bt(oe,o))}else{if(!nn[Fe])return B?o:{};oe=eq(o,Fe,ue)}}G||(G=new W);var Qe=G.get(o);if(Qe)return Qe;G.set(o,oe),kT(o)?o.forEach(function(ct){oe.add(hn(ct,u,p,ct,o,G))}):ST(o)&&o.forEach(function(ct,Ft){oe.set(Ft,hn(ct,u,p,Ft,o,G))});var ut=Ce?me?tb:eb:me?Kr:cr,kt=Oe?n:ut(o);return qr(kt||o,function(ct,Ft){kt&&(Ft=ct,ct=o[Ft]),We(oe,Ft,hn(ct,u,p,Ft,o,G))}),oe}function qs(o){var u=cr(o);return function(p){return Hi(p,o,u)}}function Hi(o,u,p){var T=p.length;if(o==null)return!T;for(o=rn(o);T--;){var B=p[T],G=u[B],oe=o[B];if(oe===n&&!(B in o)||!G(oe))return!1}return!0}function rr(o,u,p){if(typeof o!="function")throw new Ar(a);return nf(function(){o.apply(n,p)},u)}function pr(o,u,p,T){var B=-1,G=zu,oe=!0,ue=o.length,me=[],Ce=u.length;if(!ue)return me;p&&(u=Qt(u,kr(p))),T?(G=Ll,oe=!1):u.length>=i&&(G=Aa,oe=!1,u=new O(u));e:for(;++BB?0:B+p),T=T===n||T>B?B:Tt(T),T<0&&(T+=B),T=p>T?0:CT(T);p0&&p(ue)?u>1?sr(ue,u-1,p,T,B):Ui(B,ue):T||(B[B.length]=ue)}return B}var Mv=xS(),pS=xS(!0);function ps(o,u){return o&&Mv(o,u,cr)}function Lv(o,u){return o&&pS(o,u,cr)}function Dp(o,u){return fs(u,function(p){return Hs(o[p])})}function ja(o,u){u=Bo(u,o);for(var p=0,T=u.length;o!=null&&pu}function mB(o,u){return o!=null&&jt.call(o,u)}function gB(o,u){return o!=null&&u in rn(o)}function yB(o,u,p){return o>=nr(u,p)&&o=120&&Oe.length>=120)?new O(oe&&Oe):n}Oe=o[0];var Fe=-1,Ue=ue[0];e:for(;++Fe-1;)ue!==o&&Pa.call(ue,me,1),Pa.call(o,me,1);return o}function SS(o,u){for(var p=o?u.length:0,T=p-1;p--;){var B=u[p];if(p==T||B!==G){var G=B;Vs(B)?Pa.call(o,B,1):zv(o,B)}}return o}function Vv(o,u){return o+Ra(gp()*(u-o+1))}function OB(o,u,p,T){for(var B=-1,G=In(Fa((u-o)/(p||1)),0),oe=_e(G);G--;)oe[T?G:++B]=o,o+=p;return oe}function Hv(o,u){var p="";if(!o||u<1||u>Be)return p;do u%2&&(p+=o),u=Ra(u/2),u&&(o+=o);while(u);return p}function At(o,u){return ub(tT(o,u,zr),o+"")}function PB(o){return Ee(vc(o))}function NB(o,u){var p=vc(o);return Pp(p,dn(u,0,p.length))}function Zl(o,u,p,T){if(!Cn(o))return o;u=Bo(u,o);for(var B=-1,G=u.length,oe=G-1,ue=o;ue!=null&&++BB?0:B+u),p=p>B?B:p,p<0&&(p+=B),B=u>p?0:p-u>>>0,u>>>=0;for(var G=_e(B);++T>>1,oe=o[G];oe!==null&&!ei(oe)&&(p?oe<=u:oe=i){var Ce=u?null:KB(o);if(Ce)return Ca(Ce);oe=!1,B=Aa,me=new O}else me=u?[]:ue;e:for(;++T=T?o:Si(o,u,p)}var NS=pv||function(o){return Kn.clearTimeout(o)};function FS(o,u){if(u)return o.slice();var p=o.length,T=cp?cp(p):new o.constructor(p);return o.copy(T),T}function Qv(o){var u=new o.constructor(o.byteLength);return new oc(u).set(new oc(o)),u}function LB(o,u){var p=u?Qv(o.buffer):o.buffer;return new o.constructor(p,o.byteOffset,o.byteLength)}function jB(o){var u=new o.constructor(o.source,tn.exec(o));return u.lastIndex=o.lastIndex,u}function xB(o){return js?rn(js.call(o)):{}}function RS(o,u){var p=u?Qv(o.buffer):o.buffer;return new o.constructor(p,o.byteOffset,o.length)}function IS(o,u){if(o!==u){var p=o!==n,T=o===null,B=o===o,G=ei(o),oe=u!==n,ue=u===null,me=u===u,Ce=ei(u);if(!ue&&!Ce&&!G&&o>u||G&&oe&&me&&!ue&&!Ce||T&&oe&&me||!p&&me||!B)return 1;if(!T&&!G&&!Ce&&o=ue)return me;var Ce=p[T];return me*(Ce=="desc"?-1:1)}}return o.index-u.index}function MS(o,u,p,T){for(var B=-1,G=o.length,oe=p.length,ue=-1,me=u.length,Ce=In(G-oe,0),Oe=_e(me+Ce),Fe=!T;++ue1?p[B-1]:n,oe=B>2?p[2]:n;for(G=o.length>3&&typeof G=="function"?(B--,G):n,oe&&Or(p[0],p[1],oe)&&(G=B<3?n:G,B=1),u=rn(u);++T-1?B[G?u[oe]:oe]:n}}function WS(o){return Us(function(u){var p=u.length,T=p,B=Ur.prototype.thru;for(o&&u.reverse();T--;){var G=u[T];if(typeof G!="function")throw new Ar(a);if(B&&!oe&&Cp(G)=="wrapper")var oe=new Ur([],!0)}for(T=oe?T:p;++T1&&Bt.reverse(),Oe&&meue))return!1;var Ce=G.get(o),Oe=G.get(u);if(Ce&&Oe)return Ce==u&&Oe==o;var Fe=-1,Ue=!0,Qe=p&P?new O:n;for(G.set(o,u),G.set(u,o);++Fe1?"& ":"")+u[T],u=u.join(p>2?", ":" "),o.replace(vn,`{ + */(function(t,e){(function(){var n,r="4.17.21",i=200,s="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",c="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",d=500,h="__lodash_placeholder__",m=1,E=2,T=4,R=1,P=2,A=1,F=2,S=4,y=8,D=16,v=32,_=64,$=128,q=256,N=512,M=30,I="...",Y=800,K=16,ne=1,ge=2,ye=3,De=1/0,Be=9007199254740991,nt=17976931348623157e292,Se=0/0,H=4294967295,fe=H-1,ae=H>>>1,U=[["ary",$],["bind",A],["bindKey",F],["curry",y],["curryRight",D],["flip",N],["partial",v],["partialRight",_],["rearg",q]],Z="[object Arguments]",pe="[object Array]",Me="[object AsyncFunction]",Ie="[object Boolean]",qe="[object Date]",ze="[object DOMException]",Ge="[object Error]",rt="[object Function]",_n="[object GeneratorFunction]",at="[object Map]",un="[object Number]",Sn="[object Null]",Mt="[object Object]",kn="[object Promise]",ur="[object Proxy]",Tn="[object RegExp]",Lt="[object Set]",Vn="[object String]",Xn="[object Symbol]",Rn="[object Undefined]",qt="[object WeakMap]",X="[object WeakSet]",V="[object ArrayBuffer]",ee="[object DataView]",ie="[object Float32Array]",C="[object Float64Array]",g="[object Int8Array]",w="[object Int16Array]",j="[object Int32Array]",J="[object Uint8Array]",re="[object Uint8ClampedArray]",ce="[object Uint16Array]",Ne="[object Uint32Array]",Je=/\b__p \+= '';/g,He=/\b(__p \+=) '' \+/g,Xe=/(__e\(.*?\)|\b__t\)) \+\n'';/g,je=/&(?:amp|lt|gt|quot|#39);/g,gt=/[&<>"']/g,cn=RegExp(je.source),ht=RegExp(gt.source),Wt=/<%-([\s\S]+?)%>/g,wt=/<%([\s\S]+?)%>/g,$n=/<%=([\s\S]+?)%>/g,An=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,bi=/^\w*$/,Eo=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,fn=/[\\^$.*+?()[\]{}|]/g,Di=RegExp(fn.source),xi=/^\s+/,Q=/\s/,vn=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,bn=/\{\n\/\* \[wrapped with (.+)\] \*/,it=/,? & /,se=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Te=/[()=,{}\[\]\/\s]/,Le=/\\(\\)?/g,Ye=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,tn=/\w*$/,Gt=/^[-+]0x[0-9a-f]+$/i,Jt=/^0b[01]+$/i,Dn=/^\[object .+?Constructor\]$/,Hn=/^0o[0-7]+$/i,Ht=/^(?:0|[1-9]\d*)$/,pn=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Nt=/($^)/,mn=/['\n\r\u2028\u2029\\]/g,wn="\\ud800-\\udfff",bl="\\u0300-\\u036f",M0="\\ufe20-\\ufe2f",L0="\\u20d0-\\u20ff",Lh=bl+M0+L0,Dl="\\u2700-\\u27bf",hr="a-z\\xdf-\\xf6\\xf8-\\xff",wi="\\xac\\xb1\\xd7\\xf7",_a="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",jh="\\u2000-\\u206f",j0=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",xh="A-Z\\xc0-\\xd6\\xd8-\\xde",Uu="\\ufe0e\\ufe0f",Vu=wi+_a+jh+j0,So="['\u2019]",Hu="["+wn+"]",Bh="["+Vu+"]",ko="["+Lh+"]",$a="\\d+",wl="["+Dl+"]",To="["+hr+"]",Ea="[^"+wn+Vu+$a+Dl+hr+xh+"]",_l="\\ud83c[\\udffb-\\udfff]",x0="(?:"+ko+"|"+_l+")",$l="[^"+wn+"]",Sa="(?:\\ud83c[\\udde6-\\uddff]){2}",El="[\\ud800-\\udbff][\\udc00-\\udfff]",Ao="["+xh+"]",Sl="\\u200d",qh="(?:"+To+"|"+Ea+")",ka="(?:"+Ao+"|"+Ea+")",Wh="(?:"+So+"(?:d|ll|m|re|s|t|ve))?",Bi="(?:"+So+"(?:D|LL|M|RE|S|T|VE))?",kl=x0+"?",Tl="["+Uu+"]?",B0="(?:"+Sl+"(?:"+[$l,Sa,El].join("|")+")"+Tl+kl+")*",Ns="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",q0="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",qi=Tl+kl+B0,W0="(?:"+[wl,Sa,El].join("|")+")"+qi,U0="(?:"+[$l+ko+"?",ko,Sa,El,Hu].join("|")+")",Uh=RegExp(So,"g"),V0=RegExp(ko,"g"),Al=RegExp(_l+"(?="+_l+")|"+U0+qi,"g"),Ku=RegExp([Ao+"?"+To+"+"+Wh+"(?="+[Bh,Ao,"$"].join("|")+")",ka+"+"+Bi+"(?="+[Bh,Ao+qh,"$"].join("|")+")",Ao+"?"+qh+"+"+Wh,Ao+"+"+Bi,q0,Ns,$a,W0].join("|"),"g"),H0=RegExp("["+Sl+wn+Lh+Uu+"]"),Cl=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Co=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Fs=-1,Yt={};Yt[ie]=Yt[C]=Yt[g]=Yt[w]=Yt[j]=Yt[J]=Yt[re]=Yt[ce]=Yt[Ne]=!0,Yt[Z]=Yt[pe]=Yt[V]=Yt[Ie]=Yt[ee]=Yt[qe]=Yt[Ge]=Yt[rt]=Yt[at]=Yt[un]=Yt[Mt]=Yt[Tn]=Yt[Lt]=Yt[Vn]=Yt[qt]=!1;var nn={};nn[Z]=nn[pe]=nn[V]=nn[ee]=nn[Ie]=nn[qe]=nn[ie]=nn[C]=nn[g]=nn[w]=nn[j]=nn[at]=nn[un]=nn[Mt]=nn[Tn]=nn[Lt]=nn[Vn]=nn[Xn]=nn[J]=nn[re]=nn[ce]=nn[Ne]=!0,nn[Ge]=nn[rt]=nn[qt]=!1;var Ol={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},Vh={"&":"&","<":"<",">":">",'"':""","'":"'"},Pl={"&":"&","<":"<",">":">",""":'"',"'":"'"},K0={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Hh=parseFloat,z0=parseInt,Kh=typeof Vt=="object"&&Vt&&Vt.Object===Object&&Vt,zh=typeof self=="object"&&self&&self.Object===Object&&self,Kn=Kh||zh||Function("return this")(),Nl=e&&!e.nodeType&&e,Wi=Nl&&!0&&t&&!t.nodeType&&t,Fl=Wi&&Wi.exports===Nl,Rl=Fl&&Kh.process,Br=function(){try{var he=Wi&&Wi.require&&Wi.require("util").types;return he||Rl&&Rl.binding&&Rl.binding("util")}catch{}}(),Yh=Br&&Br.isArrayBuffer,Gh=Br&&Br.isDate,Jh=Br&&Br.isMap,Il=Br&&Br.isRegExp,Ml=Br&&Br.isSet,Qh=Br&&Br.isTypedArray;function br(he,ke,_e){switch(_e.length){case 0:return he.call(ke);case 1:return he.call(ke,_e[0]);case 2:return he.call(ke,_e[0],_e[1]);case 3:return he.call(ke,_e[0],_e[1],_e[2])}return he.apply(ke,_e)}function Y0(he,ke,_e,Ke){for(var lt=-1,Ut=he==null?0:he.length;++lt-1}function jl(he,ke,_e){for(var Ke=-1,lt=he==null?0:he.length;++Ke-1;);return _e}function rp(he,ke){for(var _e=he.length;_e--&&Rs(ke,he[_e],0)>-1;);return _e}function Z0(he,ke){for(var _e=he.length,Ke=0;_e--;)he[_e]===ke&&++Ke;return Ke}var ev=Qu(Ol),tv=Qu(Vh);function nv(he){return"\\"+K0[he]}function rv(he,ke){return he==null?n:he[ke]}function Is(he){return H0.test(he)}function ip(he){return Cl.test(he)}function sp(he){for(var ke,_e=[];!(ke=he.next()).done;)_e.push(ke.value);return _e}function Zu(he){var ke=-1,_e=Array(he.size);return he.forEach(function(Ke,lt){_e[++ke]=[lt,Ke]}),_e}function Vl(he,ke){return function(_e){return he(ke(_e))}}function $i(he,ke){for(var _e=-1,Ke=he.length,lt=0,Ut=[];++_e-1}function vp(o,u){var p=this.__data__,k=pt(p,o);return k<0?(++this.size,p.push([o,u])):p[k][1]=u,this}Vi.prototype.clear=Ov,Vi.prototype.delete=Pv,Vi.prototype.get=Nv,Vi.prototype.has=Bs,Vi.prototype.set=vp;function Ei(o){var u=-1,p=o==null?0:o.length;for(this.clear();++u=u?o:u)),o}function hn(o,u,p,k,B,G){var oe,ue=u&m,me=u&E,Ce=u&T;if(p&&(oe=B?p(o,k,B,G):p(o)),oe!==n)return oe;if(!Cn(o))return o;var Oe=$t(o);if(Oe){if(oe=ZB(o),!ue)return Vr(o,oe)}else{var Fe=Dr(o),Ue=Fe==rt||Fe==_n;if(Wo(o))return FS(o,ue);if(Fe==Mt||Fe==Z||Ue&&!B){if(oe=me||Ue?{}:XS(o),!ue)return me?WB(o,xt(oe,o)):qB(o,bt(oe,o))}else{if(!nn[Fe])return B?o:{};oe=eq(o,Fe,ue)}}G||(G=new W);var Qe=G.get(o);if(Qe)return Qe;G.set(o,oe),Tk(o)?o.forEach(function(ct){oe.add(hn(ct,u,p,ct,o,G))}):Sk(o)&&o.forEach(function(ct,Ft){oe.set(Ft,hn(ct,u,p,Ft,o,G))});var ut=Ce?me?tb:eb:me?Kr:cr,Tt=Oe?n:ut(o);return qr(Tt||o,function(ct,Ft){Tt&&(Ft=ct,ct=o[Ft]),We(oe,Ft,hn(ct,u,p,Ft,o,G))}),oe}function qs(o){var u=cr(o);return function(p){return Hi(p,o,u)}}function Hi(o,u,p){var k=p.length;if(o==null)return!k;for(o=rn(o);k--;){var B=p[k],G=u[B],oe=o[B];if(oe===n&&!(B in o)||!G(oe))return!1}return!0}function rr(o,u,p){if(typeof o!="function")throw new Ar(a);return rf(function(){o.apply(n,p)},u)}function pr(o,u,p,k){var B=-1,G=zu,oe=!0,ue=o.length,me=[],Ce=u.length;if(!ue)return me;p&&(u=Qt(u,Tr(p))),k?(G=jl,oe=!1):u.length>=i&&(G=Aa,oe=!1,u=new O(u));e:for(;++BB?0:B+p),k=k===n||k>B?B:kt(k),k<0&&(k+=B),k=p>k?0:Ck(k);p0&&p(ue)?u>1?sr(ue,u-1,p,k,B):Ui(B,ue):k||(B[B.length]=ue)}return B}var Mv=xS(),pS=xS(!0);function ps(o,u){return o&&Mv(o,u,cr)}function Lv(o,u){return o&&pS(o,u,cr)}function Dp(o,u){return fs(u,function(p){return Hs(o[p])})}function ja(o,u){u=Bo(u,o);for(var p=0,k=u.length;o!=null&&pu}function mB(o,u){return o!=null&&jt.call(o,u)}function gB(o,u){return o!=null&&u in rn(o)}function yB(o,u,p){return o>=nr(u,p)&&o=120&&Oe.length>=120)?new O(oe&&Oe):n}Oe=o[0];var Fe=-1,Ue=ue[0];e:for(;++Fe-1;)ue!==o&&Pa.call(ue,me,1),Pa.call(o,me,1);return o}function SS(o,u){for(var p=o?u.length:0,k=p-1;p--;){var B=u[p];if(p==k||B!==G){var G=B;Vs(B)?Pa.call(o,B,1):zv(o,B)}}return o}function Vv(o,u){return o+Ra(gp()*(u-o+1))}function OB(o,u,p,k){for(var B=-1,G=In(Fa((u-o)/(p||1)),0),oe=_e(G);G--;)oe[k?G:++B]=o,o+=p;return oe}function Hv(o,u){var p="";if(!o||u<1||u>Be)return p;do u%2&&(p+=o),u=Ra(u/2),u&&(o+=o);while(u);return p}function At(o,u){return ub(tk(o,u,zr),o+"")}function PB(o){return Ee(vc(o))}function NB(o,u){var p=vc(o);return Pp(p,dn(u,0,p.length))}function ef(o,u,p,k){if(!Cn(o))return o;u=Bo(u,o);for(var B=-1,G=u.length,oe=G-1,ue=o;ue!=null&&++BB?0:B+u),p=p>B?B:p,p<0&&(p+=B),B=u>p?0:p-u>>>0,u>>>=0;for(var G=_e(B);++k>>1,oe=o[G];oe!==null&&!ei(oe)&&(p?oe<=u:oe=i){var Ce=u?null:KB(o);if(Ce)return Ca(Ce);oe=!1,B=Aa,me=new O}else me=u?[]:ue;e:for(;++k=k?o:Si(o,u,p)}var NS=pv||function(o){return Kn.clearTimeout(o)};function FS(o,u){if(u)return o.slice();var p=o.length,k=cp?cp(p):new o.constructor(p);return o.copy(k),k}function Qv(o){var u=new o.constructor(o.byteLength);return new oc(u).set(new oc(o)),u}function LB(o,u){var p=u?Qv(o.buffer):o.buffer;return new o.constructor(p,o.byteOffset,o.byteLength)}function jB(o){var u=new o.constructor(o.source,tn.exec(o));return u.lastIndex=o.lastIndex,u}function xB(o){return js?rn(js.call(o)):{}}function RS(o,u){var p=u?Qv(o.buffer):o.buffer;return new o.constructor(p,o.byteOffset,o.length)}function IS(o,u){if(o!==u){var p=o!==n,k=o===null,B=o===o,G=ei(o),oe=u!==n,ue=u===null,me=u===u,Ce=ei(u);if(!ue&&!Ce&&!G&&o>u||G&&oe&&me&&!ue&&!Ce||k&&oe&&me||!p&&me||!B)return 1;if(!k&&!G&&!Ce&&o=ue)return me;var Ce=p[k];return me*(Ce=="desc"?-1:1)}}return o.index-u.index}function MS(o,u,p,k){for(var B=-1,G=o.length,oe=p.length,ue=-1,me=u.length,Ce=In(G-oe,0),Oe=_e(me+Ce),Fe=!k;++ue1?p[B-1]:n,oe=B>2?p[2]:n;for(G=o.length>3&&typeof G=="function"?(B--,G):n,oe&&Or(p[0],p[1],oe)&&(G=B<3?n:G,B=1),u=rn(u);++k-1?B[G?u[oe]:oe]:n}}function WS(o){return Us(function(u){var p=u.length,k=p,B=Ur.prototype.thru;for(o&&u.reverse();k--;){var G=u[k];if(typeof G!="function")throw new Ar(a);if(B&&!oe&&Cp(G)=="wrapper")var oe=new Ur([],!0)}for(k=oe?k:p;++k1&&Bt.reverse(),Oe&&meue))return!1;var Ce=G.get(o),Oe=G.get(u);if(Ce&&Oe)return Ce==u&&Oe==o;var Fe=-1,Ue=!0,Qe=p&P?new O:n;for(G.set(o,u),G.set(u,o);++Fe1?"& ":"")+u[k],u=u.join(p>2?", ":" "),o.replace(vn,`{ /* [wrapped with `+u+`] */ -`)}function nq(o){return $t(o)||qa(o)||!!(dp&&o&&o[dp])}function Vs(o,u){var p=typeof o;return u=u==null?Be:u,!!u&&(p=="number"||p!="symbol"&&Ht.test(o))&&o>-1&&o%1==0&&o0){if(++u>=Y)return arguments[0]}else u=0;return o.apply(n,arguments)}}function Pp(o,u){var p=-1,T=o.length,B=T-1;for(u=u===n?T:u;++p1?o[u-1]:n;return p=typeof p=="function"?(o.pop(),p):n,hT(o,p)});function pT(o){var u=z(o);return u.__chain__=!0,u}function h3(o,u){return u(o),o}function Np(o,u){return u(o)}var p3=Us(function(o){var u=o.length,p=u?o[0]:0,T=this.__wrapped__,B=function(G){return Yn(G,o)};return u>1||this.__actions__.length||!(T instanceof Pt)||!Vs(p)?this.thru(B):(T=T.slice(p,+p+(u?1:0)),T.__actions__.push({func:Np,args:[B],thisArg:n}),new Ur(T,this.__chain__).thru(function(G){return u&&!G.length&&G.push(n),G}))});function m3(){return pT(this)}function g3(){return new Ur(this.value(),this.__chain__)}function y3(){this.__values__===n&&(this.__values__=AT(this.value()));var o=this.__index__>=this.__values__.length,u=o?n:this.__values__[this.__index__++];return{done:o,value:u}}function v3(){return this}function b3(o){for(var u,p=this;p instanceof fc;){var T=aT(p);T.__index__=0,T.__values__=n,u?B.__wrapped__=T:u=T;var B=T;p=p.__wrapped__}return B.__wrapped__=o,u}function D3(){var o=this.__wrapped__;if(o instanceof Pt){var u=o;return this.__actions__.length&&(u=new Pt(this)),u=u.reverse(),u.__actions__.push({func:Np,args:[cb],thisArg:n}),new Ur(u,this.__chain__)}return this.thru(cb)}function w3(){return OS(this.__wrapped__,this.__actions__)}var _3=Ep(function(o,u,p){jt.call(o,p)?++o[p]:_t(o,p,1)});function $3(o,u,p){var T=$t(o)?Ml:dc;return p&&Or(o,u,p)&&(u=n),T(o,st(u,3))}function E3(o,u){var p=$t(o)?fs:bp;return p(o,st(u,3))}var S3=qS(uT),T3=qS(cT);function k3(o,u){return sr(Fp(o,u),1)}function A3(o,u){return sr(Fp(o,u),De)}function C3(o,u,p){return p=p===n?1:Tt(p),sr(Fp(o,u),p)}function mT(o,u){var p=$t(o)?qr:ir;return p(o,st(u,3))}function gT(o,u){var p=$t(o)?G0:hs;return p(o,st(u,3))}var O3=Ep(function(o,u,p){jt.call(o,p)?o[p].push(u):_t(o,p,[u])});function P3(o,u,p,T){o=Hr(o)?o:vc(o),p=p&&!T?Tt(p):0;var B=o.length;return p<0&&(p=In(B+p,0)),jp(o)?p<=B&&o.indexOf(u,p)>-1:!!B&&Rs(o,u,p)>-1}var N3=At(function(o,u,p){var T=-1,B=typeof u=="function",G=Hr(o)?_e(o.length):[];return ir(o,function(oe){G[++T]=B?br(u,oe,p):Ql(oe,u,p)}),G}),F3=Ep(function(o,u,p){_t(o,p,u)});function Fp(o,u){var p=$t(o)?Qt:bS;return p(o,st(u,3))}function R3(o,u,p,T){return o==null?[]:($t(u)||(u=u==null?[]:[u]),p=T?n:p,$t(p)||(p=p==null?[]:[p]),$S(o,u,p))}var I3=Ep(function(o,u,p){o[p?0:1].push(u)},function(){return[[],[]]});function M3(o,u,p){var T=$t(o)?jl:ep,B=arguments.length<3;return T(o,st(u,4),p,B,ir)}function L3(o,u,p){var T=$t(o)?Oo:ep,B=arguments.length<3;return T(o,st(u,4),p,B,hs)}function j3(o,u){var p=$t(o)?fs:bp;return p(o,Mp(st(u,3)))}function x3(o){var u=$t(o)?Ee:PB;return u(o)}function B3(o,u,p){(p?Or(o,u,p):u===n)?u=1:u=Tt(u);var T=$t(o)?$e:NB;return T(o,u)}function q3(o){var u=$t(o)?Ae:RB;return u(o)}function W3(o){if(o==null)return 0;if(Hr(o))return jp(o)?Po(o):o.length;var u=Dr(o);return u==at||u==Lt?o.size:qv(o).length}function U3(o,u,p){var T=$t(o)?Yu:IB;return p&&Or(o,u,p)&&(u=n),T(o,st(u,3))}var V3=At(function(o,u){if(o==null)return[];var p=u.length;return p>1&&Or(o,u[0],u[1])?u=[]:p>2&&Or(u[0],u[1],u[2])&&(u=[u[0]]),$S(o,sr(u,1),[])}),Rp=hp||function(){return Kn.Date.now()};function H3(o,u){if(typeof u!="function")throw new Ar(a);return o=Tt(o),function(){if(--o<1)return u.apply(this,arguments)}}function yT(o,u,p){return u=p?n:u,u=o&&u==null?o.length:u,Ws(o,$,n,n,n,n,u)}function vT(o,u){var p;if(typeof u!="function")throw new Ar(a);return o=Tt(o),function(){return--o>0&&(p=u.apply(this,arguments)),o<=1&&(u=n),p}}var fb=At(function(o,u,p){var T=A;if(p.length){var B=$i(p,gc(fb));T|=v}return Ws(o,T,u,p,B)}),bT=At(function(o,u,p){var T=A|N;if(p.length){var B=$i(p,gc(bT));T|=v}return Ws(u,T,o,p,B)});function DT(o,u,p){u=p?n:u;var T=Ws(o,y,n,n,n,n,n,u);return T.placeholder=DT.placeholder,T}function wT(o,u,p){u=p?n:u;var T=Ws(o,D,n,n,n,n,n,u);return T.placeholder=wT.placeholder,T}function _T(o,u,p){var T,B,G,oe,ue,me,Ce=0,Oe=!1,Fe=!1,Ue=!0;if(typeof o!="function")throw new Ar(a);u=ki(u)||0,Cn(p)&&(Oe=!!p.leading,Fe="maxWait"in p,G=Fe?In(ki(p.maxWait)||0,u):G,Ue="trailing"in p?!!p.trailing:Ue);function Qe(Jn){var zi=T,zs=B;return T=B=n,Ce=Jn,oe=o.apply(zs,zi),oe}function ut(Jn){return Ce=Jn,ue=nf(Ft,u),Oe?Qe(Jn):oe}function kt(Jn){var zi=Jn-me,zs=Jn-Ce,qT=u-zi;return Fe?nr(qT,G-zs):qT}function ct(Jn){var zi=Jn-me,zs=Jn-Ce;return me===n||zi>=u||zi<0||Fe&&zs>=G}function Ft(){var Jn=Rp();if(ct(Jn))return Bt(Jn);ue=nf(Ft,kt(Jn))}function Bt(Jn){return ue=n,Ue&&T?Qe(Jn):(T=B=n,oe)}function ti(){ue!==n&&NS(ue),Ce=0,T=me=B=ue=n}function Pr(){return ue===n?oe:Bt(Rp())}function ni(){var Jn=Rp(),zi=ct(Jn);if(T=arguments,B=this,me=Jn,zi){if(ue===n)return ut(me);if(Fe)return NS(ue),ue=nf(Ft,u),Qe(me)}return ue===n&&(ue=nf(Ft,u)),oe}return ni.cancel=ti,ni.flush=Pr,ni}var K3=At(function(o,u){return rr(o,1,u)}),z3=At(function(o,u,p){return rr(o,ki(u)||0,p)});function Y3(o){return Ws(o,F)}function Ip(o,u){if(typeof o!="function"||u!=null&&typeof u!="function")throw new Ar(a);var p=function(){var T=arguments,B=u?u.apply(this,T):T[0],G=p.cache;if(G.has(B))return G.get(B);var oe=o.apply(this,T);return p.cache=G.set(B,oe)||G,oe};return p.cache=new(Ip.Cache||Ei),p}Ip.Cache=Ei;function Mp(o){if(typeof o!="function")throw new Ar(a);return function(){var u=arguments;switch(u.length){case 0:return!o.call(this);case 1:return!o.call(this,u[0]);case 2:return!o.call(this,u[0],u[1]);case 3:return!o.call(this,u[0],u[1],u[2])}return!o.apply(this,u)}}function G3(o){return vT(2,o)}var J3=MB(function(o,u){u=u.length==1&&$t(u[0])?Qt(u[0],kr(st())):Qt(sr(u,1),kr(st()));var p=u.length;return At(function(T){for(var B=-1,G=nr(T.length,p);++B=u}),qa=gS(function(){return arguments}())?gS:function(o){return Mn(o)&&jt.call(o,"callee")&&!fp.call(o,"callee")},$t=_e.isArray,f8=Yh?kr(Yh):bB;function Hr(o){return o!=null&&Lp(o.length)&&!Hs(o)}function Gn(o){return Mn(o)&&Hr(o)}function d8(o){return o===!0||o===!1||Mn(o)&&Cr(o)==Ie}var Wo=gv||$b,h8=Gh?kr(Gh):DB;function p8(o){return Mn(o)&&o.nodeType===1&&!rf(o)}function m8(o){if(o==null)return!0;if(Hr(o)&&($t(o)||typeof o=="string"||typeof o.splice=="function"||Wo(o)||yc(o)||qa(o)))return!o.length;var u=Dr(o);if(u==at||u==Lt)return!o.size;if(tf(o))return!qv(o).length;for(var p in o)if(jt.call(o,p))return!1;return!0}function g8(o,u){return Xl(o,u)}function y8(o,u,p){p=typeof p=="function"?p:n;var T=p?p(o,u):n;return T===n?Xl(o,u,n,p):!!T}function hb(o){if(!Mn(o))return!1;var u=Cr(o);return u==Ge||u==ze||typeof o.message=="string"&&typeof o.name=="string"&&!rf(o)}function v8(o){return typeof o=="number"&&cc(o)}function Hs(o){if(!Cn(o))return!1;var u=Cr(o);return u==rt||u==_n||u==Me||u==ur}function ET(o){return typeof o=="number"&&o==Tt(o)}function Lp(o){return typeof o=="number"&&o>-1&&o%1==0&&o<=Be}function Cn(o){var u=typeof o;return o!=null&&(u=="object"||u=="function")}function Mn(o){return o!=null&&typeof o=="object"}var ST=Jh?kr(Jh):_B;function b8(o,u){return o===u||Bv(o,u,rb(u))}function D8(o,u,p){return p=typeof p=="function"?p:n,Bv(o,u,rb(u),p)}function w8(o){return TT(o)&&o!=+o}function _8(o){if(sq(o))throw new lt(s);return yS(o)}function $8(o){return o===null}function E8(o){return o==null}function TT(o){return typeof o=="number"||Mn(o)&&Cr(o)==un}function rf(o){if(!Mn(o)||Cr(o)!=Mt)return!1;var u=ac(o);if(u===null)return!0;var p=jt.call(u,"constructor")&&u.constructor;return typeof p=="function"&&p instanceof p&&rc.call(p)==hv}var pb=Rl?kr(Rl):$B;function S8(o){return ET(o)&&o>=-Be&&o<=Be}var kT=Il?kr(Il):EB;function jp(o){return typeof o=="string"||!$t(o)&&Mn(o)&&Cr(o)==Vn}function ei(o){return typeof o=="symbol"||Mn(o)&&Cr(o)==Xn}var yc=Qh?kr(Qh):SB;function T8(o){return o===n}function k8(o){return Mn(o)&&Dr(o)==qt}function A8(o){return Mn(o)&&Cr(o)==X}var C8=Ap(Wv),O8=Ap(function(o,u){return o<=u});function AT(o){if(!o)return[];if(Hr(o))return jp(o)?Wr(o):Vr(o);if(Ms&&o[Ms])return sp(o[Ms]());var u=Dr(o),p=u==at?Zu:u==Lt?Ca:vc;return p(o)}function Ks(o){if(!o)return o===0?o:0;if(o=ki(o),o===De||o===-De){var u=o<0?-1:1;return u*nt}return o===o?o:0}function Tt(o){var u=Ks(o),p=u%1;return u===u?p?u-p:u:0}function CT(o){return o?dn(Tt(o),0,H):0}function ki(o){if(typeof o=="number")return o;if(ei(o))return Se;if(Cn(o)){var u=typeof o.valueOf=="function"?o.valueOf():o;o=Cn(u)?u+"":u}if(typeof o!="string")return o===0?o:+o;o=tp(o);var p=Jt.test(o);return p||Hn.test(o)?z0(o.slice(2),p?2:8):Gt.test(o)?Se:+o}function OT(o){return ms(o,Kr(o))}function P8(o){return o?dn(Tt(o),-Be,Be):o===0?o:0}function sn(o){return o==null?"":Zr(o)}var N8=pc(function(o,u){if(tf(u)||Hr(u)){ms(u,cr(u),o);return}for(var p in u)jt.call(u,p)&&We(o,p,u[p])}),PT=pc(function(o,u){ms(u,Kr(u),o)}),xp=pc(function(o,u,p,T){ms(u,Kr(u),o,T)}),F8=pc(function(o,u,p,T){ms(u,cr(u),o,T)}),R8=Us(Yn);function I8(o,u){var p=jo(o);return u==null?p:bt(p,u)}var M8=At(function(o,u){o=rn(o);var p=-1,T=u.length,B=T>2?u[2]:n;for(B&&Or(u[0],u[1],B)&&(T=1);++p1),G}),ms(o,tb(o),p),T&&(p=hn(p,m|E|k,zB));for(var B=u.length;B--;)zv(p,u[B]);return p});function e6(o,u){return FT(o,Mp(st(u)))}var t6=Us(function(o,u){return o==null?{}:AB(o,u)});function FT(o,u){if(o==null)return{};var p=Qt(tb(o),function(T){return[T]});return u=st(u),ES(o,p,function(T,B){return u(T,B[0])})}function n6(o,u,p){u=Bo(u,o);var T=-1,B=u.length;for(B||(B=1,o=n);++Tu){var T=o;o=u,u=T}if(p||o%1||u%1){var B=gp();return nr(o+B*(u-o+Hh("1e-"+((B+"").length-1))),u)}return Vv(o,u)}var h6=mc(function(o,u,p){return u=u.toLowerCase(),o+(p?MT(u):u)});function MT(o){return yb(sn(o).toLowerCase())}function LT(o){return o=sn(o),o&&o.replace(pn,ev).replace(V0,"")}function p6(o,u,p){o=sn(o),u=Zr(u);var T=o.length;p=p===n?T:dn(Tt(p),0,T);var B=p;return p-=u.length,p>=0&&o.slice(p,B)==u}function m6(o){return o=sn(o),o&&ht.test(o)?o.replace(gt,tv):o}function g6(o){return o=sn(o),o&&Di.test(o)?o.replace(fn,"\\$&"):o}var y6=mc(function(o,u,p){return o+(p?"-":"")+u.toLowerCase()}),v6=mc(function(o,u,p){return o+(p?" ":"")+u.toLowerCase()}),b6=BS("toLowerCase");function D6(o,u,p){o=sn(o),u=Tt(u);var T=u?Po(o):0;if(!u||T>=u)return o;var B=(u-T)/2;return kp(Ra(B),p)+o+kp(Fa(B),p)}function w6(o,u,p){o=sn(o),u=Tt(u);var T=u?Po(o):0;return u&&T>>0,p?(o=sn(o),o&&(typeof u=="string"||u!=null&&!pb(u))&&(u=Zr(u),!u&&Is(o))?qo(Wr(o),0,p):o.split(u,p)):[]}var A6=mc(function(o,u,p){return o+(p?" ":"")+yb(u)});function C6(o,u,p){return o=sn(o),p=p==null?0:dn(Tt(p),0,o.length),u=Zr(u),o.slice(p,p+u.length)==u}function O6(o,u,p){var T=z.templateSettings;p&&Or(o,u,p)&&(u=n),o=sn(o),u=xp({},u,T,zS);var B=xp({},u.imports,T.imports,zS),G=cr(B),oe=Xu(B,G),ue,me,Ce=0,Oe=u.interpolate||Nt,Fe="__p += '",Ue=ec((u.escape||Nt).source+"|"+Oe.source+"|"+(Oe===$n?Ye:Nt).source+"|"+(u.evaluate||Nt).source+"|$","g"),Qe="//# sourceURL="+(jt.call(u,"sourceURL")?(u.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Fs+"]")+` +`)}function nq(o){return $t(o)||qa(o)||!!(dp&&o&&o[dp])}function Vs(o,u){var p=typeof o;return u=u==null?Be:u,!!u&&(p=="number"||p!="symbol"&&Ht.test(o))&&o>-1&&o%1==0&&o0){if(++u>=Y)return arguments[0]}else u=0;return o.apply(n,arguments)}}function Pp(o,u){var p=-1,k=o.length,B=k-1;for(u=u===n?k:u;++p1?o[u-1]:n;return p=typeof p=="function"?(o.pop(),p):n,hk(o,p)});function pk(o){var u=z(o);return u.__chain__=!0,u}function h3(o,u){return u(o),o}function Np(o,u){return u(o)}var p3=Us(function(o){var u=o.length,p=u?o[0]:0,k=this.__wrapped__,B=function(G){return Yn(G,o)};return u>1||this.__actions__.length||!(k instanceof Pt)||!Vs(p)?this.thru(B):(k=k.slice(p,+p+(u?1:0)),k.__actions__.push({func:Np,args:[B],thisArg:n}),new Ur(k,this.__chain__).thru(function(G){return u&&!G.length&&G.push(n),G}))});function m3(){return pk(this)}function g3(){return new Ur(this.value(),this.__chain__)}function y3(){this.__values__===n&&(this.__values__=Ak(this.value()));var o=this.__index__>=this.__values__.length,u=o?n:this.__values__[this.__index__++];return{done:o,value:u}}function v3(){return this}function b3(o){for(var u,p=this;p instanceof fc;){var k=ak(p);k.__index__=0,k.__values__=n,u?B.__wrapped__=k:u=k;var B=k;p=p.__wrapped__}return B.__wrapped__=o,u}function D3(){var o=this.__wrapped__;if(o instanceof Pt){var u=o;return this.__actions__.length&&(u=new Pt(this)),u=u.reverse(),u.__actions__.push({func:Np,args:[cb],thisArg:n}),new Ur(u,this.__chain__)}return this.thru(cb)}function w3(){return OS(this.__wrapped__,this.__actions__)}var _3=Ep(function(o,u,p){jt.call(o,p)?++o[p]:_t(o,p,1)});function $3(o,u,p){var k=$t(o)?Ll:dc;return p&&Or(o,u,p)&&(u=n),k(o,st(u,3))}function E3(o,u){var p=$t(o)?fs:bp;return p(o,st(u,3))}var S3=qS(uk),k3=qS(ck);function T3(o,u){return sr(Fp(o,u),1)}function A3(o,u){return sr(Fp(o,u),De)}function C3(o,u,p){return p=p===n?1:kt(p),sr(Fp(o,u),p)}function mk(o,u){var p=$t(o)?qr:ir;return p(o,st(u,3))}function gk(o,u){var p=$t(o)?G0:hs;return p(o,st(u,3))}var O3=Ep(function(o,u,p){jt.call(o,p)?o[p].push(u):_t(o,p,[u])});function P3(o,u,p,k){o=Hr(o)?o:vc(o),p=p&&!k?kt(p):0;var B=o.length;return p<0&&(p=In(B+p,0)),jp(o)?p<=B&&o.indexOf(u,p)>-1:!!B&&Rs(o,u,p)>-1}var N3=At(function(o,u,p){var k=-1,B=typeof u=="function",G=Hr(o)?_e(o.length):[];return ir(o,function(oe){G[++k]=B?br(u,oe,p):Xl(oe,u,p)}),G}),F3=Ep(function(o,u,p){_t(o,p,u)});function Fp(o,u){var p=$t(o)?Qt:bS;return p(o,st(u,3))}function R3(o,u,p,k){return o==null?[]:($t(u)||(u=u==null?[]:[u]),p=k?n:p,$t(p)||(p=p==null?[]:[p]),$S(o,u,p))}var I3=Ep(function(o,u,p){o[p?0:1].push(u)},function(){return[[],[]]});function M3(o,u,p){var k=$t(o)?xl:ep,B=arguments.length<3;return k(o,st(u,4),p,B,ir)}function L3(o,u,p){var k=$t(o)?Oo:ep,B=arguments.length<3;return k(o,st(u,4),p,B,hs)}function j3(o,u){var p=$t(o)?fs:bp;return p(o,Mp(st(u,3)))}function x3(o){var u=$t(o)?Ee:PB;return u(o)}function B3(o,u,p){(p?Or(o,u,p):u===n)?u=1:u=kt(u);var k=$t(o)?$e:NB;return k(o,u)}function q3(o){var u=$t(o)?Ae:RB;return u(o)}function W3(o){if(o==null)return 0;if(Hr(o))return jp(o)?Po(o):o.length;var u=Dr(o);return u==at||u==Lt?o.size:qv(o).length}function U3(o,u,p){var k=$t(o)?Yu:IB;return p&&Or(o,u,p)&&(u=n),k(o,st(u,3))}var V3=At(function(o,u){if(o==null)return[];var p=u.length;return p>1&&Or(o,u[0],u[1])?u=[]:p>2&&Or(u[0],u[1],u[2])&&(u=[u[0]]),$S(o,sr(u,1),[])}),Rp=hp||function(){return Kn.Date.now()};function H3(o,u){if(typeof u!="function")throw new Ar(a);return o=kt(o),function(){if(--o<1)return u.apply(this,arguments)}}function yk(o,u,p){return u=p?n:u,u=o&&u==null?o.length:u,Ws(o,$,n,n,n,n,u)}function vk(o,u){var p;if(typeof u!="function")throw new Ar(a);return o=kt(o),function(){return--o>0&&(p=u.apply(this,arguments)),o<=1&&(u=n),p}}var fb=At(function(o,u,p){var k=A;if(p.length){var B=$i(p,gc(fb));k|=v}return Ws(o,k,u,p,B)}),bk=At(function(o,u,p){var k=A|F;if(p.length){var B=$i(p,gc(bk));k|=v}return Ws(u,k,o,p,B)});function Dk(o,u,p){u=p?n:u;var k=Ws(o,y,n,n,n,n,n,u);return k.placeholder=Dk.placeholder,k}function wk(o,u,p){u=p?n:u;var k=Ws(o,D,n,n,n,n,n,u);return k.placeholder=wk.placeholder,k}function _k(o,u,p){var k,B,G,oe,ue,me,Ce=0,Oe=!1,Fe=!1,Ue=!0;if(typeof o!="function")throw new Ar(a);u=Ti(u)||0,Cn(p)&&(Oe=!!p.leading,Fe="maxWait"in p,G=Fe?In(Ti(p.maxWait)||0,u):G,Ue="trailing"in p?!!p.trailing:Ue);function Qe(Jn){var zi=k,zs=B;return k=B=n,Ce=Jn,oe=o.apply(zs,zi),oe}function ut(Jn){return Ce=Jn,ue=rf(Ft,u),Oe?Qe(Jn):oe}function Tt(Jn){var zi=Jn-me,zs=Jn-Ce,qk=u-zi;return Fe?nr(qk,G-zs):qk}function ct(Jn){var zi=Jn-me,zs=Jn-Ce;return me===n||zi>=u||zi<0||Fe&&zs>=G}function Ft(){var Jn=Rp();if(ct(Jn))return Bt(Jn);ue=rf(Ft,Tt(Jn))}function Bt(Jn){return ue=n,Ue&&k?Qe(Jn):(k=B=n,oe)}function ti(){ue!==n&&NS(ue),Ce=0,k=me=B=ue=n}function Pr(){return ue===n?oe:Bt(Rp())}function ni(){var Jn=Rp(),zi=ct(Jn);if(k=arguments,B=this,me=Jn,zi){if(ue===n)return ut(me);if(Fe)return NS(ue),ue=rf(Ft,u),Qe(me)}return ue===n&&(ue=rf(Ft,u)),oe}return ni.cancel=ti,ni.flush=Pr,ni}var K3=At(function(o,u){return rr(o,1,u)}),z3=At(function(o,u,p){return rr(o,Ti(u)||0,p)});function Y3(o){return Ws(o,N)}function Ip(o,u){if(typeof o!="function"||u!=null&&typeof u!="function")throw new Ar(a);var p=function(){var k=arguments,B=u?u.apply(this,k):k[0],G=p.cache;if(G.has(B))return G.get(B);var oe=o.apply(this,k);return p.cache=G.set(B,oe)||G,oe};return p.cache=new(Ip.Cache||Ei),p}Ip.Cache=Ei;function Mp(o){if(typeof o!="function")throw new Ar(a);return function(){var u=arguments;switch(u.length){case 0:return!o.call(this);case 1:return!o.call(this,u[0]);case 2:return!o.call(this,u[0],u[1]);case 3:return!o.call(this,u[0],u[1],u[2])}return!o.apply(this,u)}}function G3(o){return vk(2,o)}var J3=MB(function(o,u){u=u.length==1&&$t(u[0])?Qt(u[0],Tr(st())):Qt(sr(u,1),Tr(st()));var p=u.length;return At(function(k){for(var B=-1,G=nr(k.length,p);++B=u}),qa=gS(function(){return arguments}())?gS:function(o){return Mn(o)&&jt.call(o,"callee")&&!fp.call(o,"callee")},$t=_e.isArray,f8=Yh?Tr(Yh):bB;function Hr(o){return o!=null&&Lp(o.length)&&!Hs(o)}function Gn(o){return Mn(o)&&Hr(o)}function d8(o){return o===!0||o===!1||Mn(o)&&Cr(o)==Ie}var Wo=gv||$b,h8=Gh?Tr(Gh):DB;function p8(o){return Mn(o)&&o.nodeType===1&&!sf(o)}function m8(o){if(o==null)return!0;if(Hr(o)&&($t(o)||typeof o=="string"||typeof o.splice=="function"||Wo(o)||yc(o)||qa(o)))return!o.length;var u=Dr(o);if(u==at||u==Lt)return!o.size;if(nf(o))return!qv(o).length;for(var p in o)if(jt.call(o,p))return!1;return!0}function g8(o,u){return Zl(o,u)}function y8(o,u,p){p=typeof p=="function"?p:n;var k=p?p(o,u):n;return k===n?Zl(o,u,n,p):!!k}function hb(o){if(!Mn(o))return!1;var u=Cr(o);return u==Ge||u==ze||typeof o.message=="string"&&typeof o.name=="string"&&!sf(o)}function v8(o){return typeof o=="number"&&cc(o)}function Hs(o){if(!Cn(o))return!1;var u=Cr(o);return u==rt||u==_n||u==Me||u==ur}function Ek(o){return typeof o=="number"&&o==kt(o)}function Lp(o){return typeof o=="number"&&o>-1&&o%1==0&&o<=Be}function Cn(o){var u=typeof o;return o!=null&&(u=="object"||u=="function")}function Mn(o){return o!=null&&typeof o=="object"}var Sk=Jh?Tr(Jh):_B;function b8(o,u){return o===u||Bv(o,u,rb(u))}function D8(o,u,p){return p=typeof p=="function"?p:n,Bv(o,u,rb(u),p)}function w8(o){return kk(o)&&o!=+o}function _8(o){if(sq(o))throw new lt(s);return yS(o)}function $8(o){return o===null}function E8(o){return o==null}function kk(o){return typeof o=="number"||Mn(o)&&Cr(o)==un}function sf(o){if(!Mn(o)||Cr(o)!=Mt)return!1;var u=ac(o);if(u===null)return!0;var p=jt.call(u,"constructor")&&u.constructor;return typeof p=="function"&&p instanceof p&&rc.call(p)==hv}var pb=Il?Tr(Il):$B;function S8(o){return Ek(o)&&o>=-Be&&o<=Be}var Tk=Ml?Tr(Ml):EB;function jp(o){return typeof o=="string"||!$t(o)&&Mn(o)&&Cr(o)==Vn}function ei(o){return typeof o=="symbol"||Mn(o)&&Cr(o)==Xn}var yc=Qh?Tr(Qh):SB;function k8(o){return o===n}function T8(o){return Mn(o)&&Dr(o)==qt}function A8(o){return Mn(o)&&Cr(o)==X}var C8=Ap(Wv),O8=Ap(function(o,u){return o<=u});function Ak(o){if(!o)return[];if(Hr(o))return jp(o)?Wr(o):Vr(o);if(Ms&&o[Ms])return sp(o[Ms]());var u=Dr(o),p=u==at?Zu:u==Lt?Ca:vc;return p(o)}function Ks(o){if(!o)return o===0?o:0;if(o=Ti(o),o===De||o===-De){var u=o<0?-1:1;return u*nt}return o===o?o:0}function kt(o){var u=Ks(o),p=u%1;return u===u?p?u-p:u:0}function Ck(o){return o?dn(kt(o),0,H):0}function Ti(o){if(typeof o=="number")return o;if(ei(o))return Se;if(Cn(o)){var u=typeof o.valueOf=="function"?o.valueOf():o;o=Cn(u)?u+"":u}if(typeof o!="string")return o===0?o:+o;o=tp(o);var p=Jt.test(o);return p||Hn.test(o)?z0(o.slice(2),p?2:8):Gt.test(o)?Se:+o}function Ok(o){return ms(o,Kr(o))}function P8(o){return o?dn(kt(o),-Be,Be):o===0?o:0}function sn(o){return o==null?"":Zr(o)}var N8=pc(function(o,u){if(nf(u)||Hr(u)){ms(u,cr(u),o);return}for(var p in u)jt.call(u,p)&&We(o,p,u[p])}),Pk=pc(function(o,u){ms(u,Kr(u),o)}),xp=pc(function(o,u,p,k){ms(u,Kr(u),o,k)}),F8=pc(function(o,u,p,k){ms(u,cr(u),o,k)}),R8=Us(Yn);function I8(o,u){var p=jo(o);return u==null?p:bt(p,u)}var M8=At(function(o,u){o=rn(o);var p=-1,k=u.length,B=k>2?u[2]:n;for(B&&Or(u[0],u[1],B)&&(k=1);++p1),G}),ms(o,tb(o),p),k&&(p=hn(p,m|E|T,zB));for(var B=u.length;B--;)zv(p,u[B]);return p});function e6(o,u){return Fk(o,Mp(st(u)))}var t6=Us(function(o,u){return o==null?{}:AB(o,u)});function Fk(o,u){if(o==null)return{};var p=Qt(tb(o),function(k){return[k]});return u=st(u),ES(o,p,function(k,B){return u(k,B[0])})}function n6(o,u,p){u=Bo(u,o);var k=-1,B=u.length;for(B||(B=1,o=n);++ku){var k=o;o=u,u=k}if(p||o%1||u%1){var B=gp();return nr(o+B*(u-o+Hh("1e-"+((B+"").length-1))),u)}return Vv(o,u)}var h6=mc(function(o,u,p){return u=u.toLowerCase(),o+(p?Mk(u):u)});function Mk(o){return yb(sn(o).toLowerCase())}function Lk(o){return o=sn(o),o&&o.replace(pn,ev).replace(V0,"")}function p6(o,u,p){o=sn(o),u=Zr(u);var k=o.length;p=p===n?k:dn(kt(p),0,k);var B=p;return p-=u.length,p>=0&&o.slice(p,B)==u}function m6(o){return o=sn(o),o&&ht.test(o)?o.replace(gt,tv):o}function g6(o){return o=sn(o),o&&Di.test(o)?o.replace(fn,"\\$&"):o}var y6=mc(function(o,u,p){return o+(p?"-":"")+u.toLowerCase()}),v6=mc(function(o,u,p){return o+(p?" ":"")+u.toLowerCase()}),b6=BS("toLowerCase");function D6(o,u,p){o=sn(o),u=kt(u);var k=u?Po(o):0;if(!u||k>=u)return o;var B=(u-k)/2;return Tp(Ra(B),p)+o+Tp(Fa(B),p)}function w6(o,u,p){o=sn(o),u=kt(u);var k=u?Po(o):0;return u&&k>>0,p?(o=sn(o),o&&(typeof u=="string"||u!=null&&!pb(u))&&(u=Zr(u),!u&&Is(o))?qo(Wr(o),0,p):o.split(u,p)):[]}var A6=mc(function(o,u,p){return o+(p?" ":"")+yb(u)});function C6(o,u,p){return o=sn(o),p=p==null?0:dn(kt(p),0,o.length),u=Zr(u),o.slice(p,p+u.length)==u}function O6(o,u,p){var k=z.templateSettings;p&&Or(o,u,p)&&(u=n),o=sn(o),u=xp({},u,k,zS);var B=xp({},u.imports,k.imports,zS),G=cr(B),oe=Xu(B,G),ue,me,Ce=0,Oe=u.interpolate||Nt,Fe="__p += '",Ue=ec((u.escape||Nt).source+"|"+Oe.source+"|"+(Oe===$n?Ye:Nt).source+"|"+(u.evaluate||Nt).source+"|$","g"),Qe="//# sourceURL="+(jt.call(u,"sourceURL")?(u.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Fs+"]")+` `;o.replace(Ue,function(ct,Ft,Bt,ti,Pr,ni){return Bt||(Bt=ti),Fe+=o.slice(Ce,ni).replace(mn,nv),Ft&&(ue=!0,Fe+=`' + __e(`+Ft+`) + '`),Pr&&(me=!0,Fe+=`'; @@ -408,24 +408,24 @@ __p += '`),Bt&&(Fe+=`' + `;var ut=jt.call(u,"variable")&&u.variable;if(!ut)Fe=`with (obj) { `+Fe+` } -`;else if(ke.test(ut))throw new lt(c);Fe=(me?Fe.replace(Je,""):Fe).replace(He,"$1").replace(Xe,"$1;"),Fe="function("+(ut||"obj")+`) { +`;else if(Te.test(ut))throw new lt(c);Fe=(me?Fe.replace(Je,""):Fe).replace(He,"$1").replace(Xe,"$1;"),Fe="function("+(ut||"obj")+`) { `+(ut?"":`obj || (obj = {}); `)+"var __t, __p = ''"+(ue?", __e = _.escape":"")+(me?`, __j = Array.prototype.join; function print() { __p += __j.call(arguments, '') } `:`; `)+Fe+`return __p -}`;var kt=xT(function(){return Ut(G,Qe+"return "+Fe).apply(n,oe)});if(kt.source=Fe,hb(kt))throw kt;return kt}function P6(o){return sn(o).toLowerCase()}function N6(o){return sn(o).toUpperCase()}function F6(o,u,p){if(o=sn(o),o&&(p||u===n))return tp(o);if(!o||!(u=Zr(u)))return o;var T=Wr(o),B=Wr(u),G=np(T,B),oe=rp(T,B)+1;return qo(T,G,oe).join("")}function R6(o,u,p){if(o=sn(o),o&&(p||u===n))return o.slice(0,op(o)+1);if(!o||!(u=Zr(u)))return o;var T=Wr(o),B=rp(T,Wr(u))+1;return qo(T,0,B).join("")}function I6(o,u,p){if(o=sn(o),o&&(p||u===n))return o.replace(xi,"");if(!o||!(u=Zr(u)))return o;var T=Wr(o),B=np(T,Wr(u));return qo(T,B).join("")}function M6(o,u){var p=M,T=I;if(Cn(u)){var B="separator"in u?u.separator:B;p="length"in u?Tt(u.length):p,T="omission"in u?Zr(u.omission):T}o=sn(o);var G=o.length;if(Is(o)){var oe=Wr(o);G=oe.length}if(p>=G)return o;var ue=p-Po(T);if(ue<1)return T;var me=oe?qo(oe,0,ue).join(""):o.slice(0,ue);if(B===n)return me+T;if(oe&&(ue+=me.length-ue),pb(B)){if(o.slice(ue).search(B)){var Ce,Oe=me;for(B.global||(B=ec(B.source,sn(tn.exec(B))+"g")),B.lastIndex=0;Ce=B.exec(Oe);)var Fe=Ce.index;me=me.slice(0,Fe===n?ue:Fe)}}else if(o.indexOf(Zr(B),ue)!=ue){var Ue=me.lastIndexOf(B);Ue>-1&&(me=me.slice(0,Ue))}return me+T}function L6(o){return o=sn(o),o&&cn.test(o)?o.replace(je,av):o}var j6=mc(function(o,u,p){return o+(p?" ":"")+u.toUpperCase()}),yb=BS("toUpperCase");function jT(o,u,p){return o=sn(o),u=p?n:u,u===n?ip(o)?lv(o):J0(o):o.match(u)||[]}var xT=At(function(o,u){try{return br(o,n,u)}catch(p){return hb(p)?p:new lt(p)}}),x6=Us(function(o,u){return qr(u,function(p){p=gs(p),_t(o,p,fb(o[p],o))}),o});function B6(o){var u=o==null?0:o.length,p=st();return o=u?Qt(o,function(T){if(typeof T[1]!="function")throw new Ar(a);return[p(T[0]),T[1]]}):[],At(function(T){for(var B=-1;++BBe)return[];var p=H,T=nr(o,H);u=st(u),o-=H;for(var B=Wl(T,u);++p0||u<0)?new Pt(p):(o<0?p=p.takeRight(-o):o&&(p=p.drop(o)),u!==n&&(u=Tt(u),p=u<0?p.dropRight(-u):p.take(u-o)),p)},Pt.prototype.takeRightWhile=function(o){return this.reverse().takeWhile(o).reverse()},Pt.prototype.toArray=function(){return this.take(H)},ps(Pt.prototype,function(o,u){var p=/^(?:filter|find|map|reject)|While$/.test(u),T=/^(?:head|last)$/.test(u),B=z[T?"take"+(u=="last"?"Right":""):u],G=T||/^find/.test(u);!B||(z.prototype[u]=function(){var oe=this.__wrapped__,ue=T?[1]:arguments,me=oe instanceof Pt,Ce=ue[0],Oe=me||$t(oe),Fe=function(Ft){var Bt=B.apply(z,Ui([Ft],ue));return T&&Ue?Bt[0]:Bt};Oe&&p&&typeof Ce=="function"&&Ce.length!=1&&(me=Oe=!1);var Ue=this.__chain__,Qe=!!this.__actions__.length,ut=G&&!Ue,kt=me&&!Qe;if(!G&&Oe){oe=kt?oe:new Pt(this);var ct=o.apply(oe,ue);return ct.__actions__.push({func:Np,args:[Fe],thisArg:n}),new Ur(ct,Ue)}return ut&&kt?o.apply(this,ue):(ct=this.thru(Fe),ut?T?ct.value()[0]:ct.value():ct)})}),qr(["pop","push","shift","sort","splice","unshift"],function(o){var u=tc[o],p=/^(?:push|sort|unshift)$/.test(o)?"tap":"thru",T=/^(?:pop|shift)$/.test(o);z.prototype[o]=function(){var B=arguments;if(T&&!this.__chain__){var G=this.value();return u.apply($t(G)?G:[],B)}return this[p](function(oe){return u.apply($t(oe)?oe:[],B)})}}),ps(Pt.prototype,function(o,u){var p=z[u];if(p){var T=p.name+"";jt.call(Lo,T)||(Lo[T]=[]),Lo[T].push({name:u,func:p})}}),Lo[Sp(n,N).name]=[{name:"wrapper",func:n}],Pt.prototype.clone=_v,Pt.prototype.reverse=$v,Pt.prototype.value=Ev,z.prototype.at=p3,z.prototype.chain=m3,z.prototype.commit=g3,z.prototype.next=y3,z.prototype.plant=b3,z.prototype.reverse=D3,z.prototype.toJSON=z.prototype.valueOf=z.prototype.value=w3,z.prototype.first=z.prototype.head,Ms&&(z.prototype[Ms]=v3),z},No=Vl();Wi?((Wi.exports=No)._=No,Pl._=No):Kn._=No}).call(Vt)})(_0,_0.exports);class Gj{constructor(e){this.clientCapabilities=e,this.indentation=" "}configure(e){this.indentation=e.indentation}getCodeAction(e,n){if(!n.context.diagnostics)return;const r=[];return r.push(...this.getConvertToBooleanActions(n.context.diagnostics,e)),r.push(...this.getJumpToSchemaActions(n.context.diagnostics)),r.push(...this.getTabToSpaceConverting(n.context.diagnostics,e)),r.push(...this.getUnusedAnchorsDelete(n.context.diagnostics,e)),r.push(...this.getConvertToBlockStyleActions(n.context.diagnostics,e)),r.push(...this.getKeyOrderActions(n.context.diagnostics,e)),r.push(...this.getQuickFixForPropertyOrValueMismatch(n.context.diagnostics,e)),r}getJumpToSchemaActions(e){var s,a,c,l,d;if(!((l=(c=(a=(s=this.clientCapabilities)==null?void 0:s.window)==null?void 0:a.showDocument)==null?void 0:c.support)!=null?l:!1))return[];const r=new Map;for(const h of e){const m=((d=h.data)==null?void 0:d.schemaUri)||[];for(const E of m)E&&(r.has(E)||r.set(E,[]),r.get(E).push(h))}const i=[];for(const h of r.keys()){const m=Ci.create(`Jump to schema location (${na.basename(h)})`,Xs.create("JumpToSchema",yh.JUMP_TO_SCHEMA,h));m.diagnostics=r.get(h),i.push(m)}return i}getTabToSpaceConverting(e,n){const r=[],i=new sa(n),s=[];for(const a of e)if(a.message==="Using tabs can lead to unpredictable results"){if(s.includes(a.range.start.line))continue;const c=i.getLineContent(a.range.start.line);let l=0,d="";for(let m=a.range.start.character;m<=a.range.end.character&&c.charAt(m)===" ";m++)l++,d+=this.indentation;s.push(a.range.start.line);let h=a.range;l!==a.range.end.character-a.range.start.character&&(h=ot.create(a.range.start,Zn.create(a.range.end.line,a.range.start.character+l))),r.push(Ci.create("Convert Tab to Spaces",va(n.uri,[an.replace(h,d)]),Qi.QuickFix))}if(r.length!==0){const a=[];for(let c=0;c<=i.getLineCount();c++){const l=i.getLineContent(c);let d=0,h="";for(let m=0;m0&&r.push(Ci.create("Convert all Tabs to Spaces",va(n.uri,a),Qi.QuickFix))}return r}getUnusedAnchorsDelete(e,n){const r=[],i=new sa(n);for(const s of e)if(s.message.startsWith("Unused anchor")&&s.source===gd){const a=ot.create(s.range.start,s.range.end),c=i.getText(a),l=i.getLineContent(a.end.line),d=LA(l,a.end.character);a.end.character=d;const h=Ci.create(`Delete unused anchor: ${c}`,va(n.uri,[an.del(a)]),Qi.QuickFix);h.diagnostics=[s],r.push(h)}return r}getConvertToBooleanActions(e,n){const r=[];for(const i of e)if(i.message==='Incorrect type. Expected "boolean".'){const s=n.getText(i.range).toLocaleLowerCase();if(s==='"true"'||s==='"false"'||s==="'true'"||s==="'false'"){const a=s.includes("true")?"true":"false";r.push(Ci.create("Convert to boolean",va(n.uri,[an.replace(i.range,a)]),Qi.QuickFix))}}return r}getConvertToBlockStyleActions(e,n){const r=[];for(const i of e)if(i.code==="flowMap"||i.code==="flowSeq"){const s=DE(n,i);if(Nn(s.internalNode)||xn(s.internalNode)){const a=Nn(s.internalNode)?"map":"sequence",c=new Yj(this.indentation);r.push(Ci.create(`Convert to block style ${a}`,va(n.uri,[an.replace(i.range,c.write(s))]),Qi.QuickFix))}}return r}getKeyOrderActions(e,n){var i,s,a,c,l,d,h,m,E,k,R,P,A,N;const r=[];for(const S of e)if((S==null?void 0:S.code)==="mapKeyOrder"){let y=DE(n,S);for(;y&&y.type!=="object";)y=y.parent;if(y&&Nn(y.internalNode)){const D=_0.exports.cloneDeep(y.internalNode);if((D.srcToken.type==="block-map"||D.srcToken.type==="flow-collection")&&(y.internalNode.srcToken.type==="block-map"||y.internalNode.srcToken.type==="flow-collection")){D.srcToken.items.sort((_,$)=>{if(_.key&&$.key&&Eg(_.key)&&Eg($.key))return _.key.source.localeCompare($.key.source);if(!_.key&&$.key)return-1;if(_.key&&!$.key)return 1;if(!_.key&&!$.key)return 0});for(let _=0;_I.type==="newline"))!=null?h:-1;let M=null;((m=q.value)==null?void 0:m.type)==="block-scalar"?M=(k=(E=q.value)==null?void 0:E.props)==null?void 0:k.find(I=>I.type==="newline"):Eg(q.value)&&(M=(P=(R=q.value)==null?void 0:R.end)==null?void 0:P.find(I=>I.type==="newline")),M&&F<0&&($.value.end=(A=$.value.end)!=null?A:[],$.value.end.push(M)),!M&&F>-1&&$.value.end.splice(F,1)}else((N=$.value)==null?void 0:N.type)==="block-scalar"&&($.value.props.find(M=>M.type==="newline")||$.value.props.push({type:"newline",indent:0,offset:$.value.offset,source:` -`}))}}const v=ot.create(n.positionAt(y.offset),n.positionAt(y.offset+y.length));r.push(Ci.create("Fix key order for this map",va(n.uri,[an.replace(v,fw(D.srcToken))]),Qi.QuickFix))}}return r}getPossibleQuickFixValues(e){if(typeof e.data=="object"){if(e.code===Ir.EnumValueMismatch&&"values"in e.data&&Array.isArray(e.data.values))return e.data.values;if(e.code===Ir.PropertyExpected&&"properties"in e.data&&Array.isArray(e.data.properties))return e.data.properties}}getQuickFixForPropertyOrValueMismatch(e,n){const r=[];for(const i of e){const s=this.getPossibleQuickFixValues(i);if(!!(s!=null&&s.length))for(const a of s)r.push(Ci.create(a,va(n.uri,[an.replace(i.range,a)]),Qi.QuickFix))}return r}}function DE(t,e){const n=di.getYamlDocument(t),r=t.offsetAt(e.range.start);return md(r,n).getNodeFromOffset(r)}function va(t,e){const n={};return n[t]=e,{changes:n}}function Jj(t,e){const{position:n}=e,r=new sa(t);if(e.ch===` -`){const i=r.getLineContent(n.line-1);if(i.trimRight().endsWith(":")){const s=r.getLineContent(n.line),a=s.substring(n.character,s.length),c=i.indexOf(" - ")!==-1;if(a.trimRight().length===0){const l=n.character-(i.length-i.trimLeft().length);if(l===e.options.tabSize&&!c)return;const d=[];return s.length>0&&d.push(an.del(ot.create(n,Zn.create(n.line,s.length-1)))),d.push(an.insert(n," ".repeat(e.options.tabSize+(c?2-l:0)))),d}if(c)return[an.insert(n," ".repeat(e.options.tabSize))]}if(i.trimRight().endsWith("|"))return[an.insert(n," ".repeat(e.options.tabSize))];if(i.includes(" - ")&&!i.includes(": "))return[an.insert(n,"- ")];if(i.includes(" - ")&&i.includes(": "))return[an.insert(n," ")]}}function wE(t){const e=new Map;return t&&(t.url?t.url.startsWith("schemaservice://combinedSchema/")?_E(t,e):e.set(t.url,t):_E(t,e)),e}function _E(t,e){t.allOf&&$0(t.allOf,e),t.anyOf&&$0(t.anyOf,e),t.oneOf&&$0(t.oneOf,e)}function $0(t,e){for(const n of t)!_u(n)&&n.url&&!e.has(n.url)&&e.set(n.url,n)}class Qj{constructor(e,n){this.schemaService=e,this.telemetry=n}async getCodeLens(e){var r;const n=[];try{const i=di.getYamlDocument(e);let s=new Map;for(const a of i.documents){const c=await this.schemaService.getSchemaForResource(e.uri,a);c!=null&&c.schema&&(s=new Map([...wE(c==null?void 0:c.schema),...s]))}for(const a of s){const c=_f.create(ot.create(0,0,0,0));c.command={title:Ew(a[1],a[0]),command:yh.JUMP_TO_SCHEMA,arguments:[a[0]]},n.push(c)}}catch(i){(r=this.telemetry)==null||r.sendError("yaml.codeLens.error",i)}return n}resolveCodeLens(e){return e}}class Xj{constructor(){this.spacesDiff=0,this.looksLikeAlignment=!1}}function Zj(t,e,n,r,i){i.spacesDiff=0,i.looksLikeAlignment=!1;let s;for(s=0;s0&&c>0||l>0&&d>0)return;const h=Math.abs(c-d),m=Math.abs(a-l);if(h===0){i.spacesDiff=m,m>0&&0<=l-1&&l-10?i++:D>1&&s++,Zj(a,c,A,y,m),m.looksLikeAlignment&&!(n&&e===m.spacesDiff)))continue;const _=m.spacesDiff;_<=d&&h[_]++,a=A,c=y}let E=n;i!==s&&(E=i{const A=h[P];A>R&&(R=A,k=P)}),k===4&&h[4]>0&&h[2]>0&&h[2]>=h[4]/2&&(k=2)}return{insertSpaces:E,tabSize:k}}function vh(t,e,n,r,i=0,s=0){if(t!==null&&typeof t=="object"){const a=i===0&&r.shouldIndentWithTab||i>0?e+r.indentation:"";if(Array.isArray(t)){if(s+=1,t.length===0)return"";let c="";for(let l=0;l=G)return o;var ue=p-Po(k);if(ue<1)return k;var me=oe?qo(oe,0,ue).join(""):o.slice(0,ue);if(B===n)return me+k;if(oe&&(ue+=me.length-ue),pb(B)){if(o.slice(ue).search(B)){var Ce,Oe=me;for(B.global||(B=ec(B.source,sn(tn.exec(B))+"g")),B.lastIndex=0;Ce=B.exec(Oe);)var Fe=Ce.index;me=me.slice(0,Fe===n?ue:Fe)}}else if(o.indexOf(Zr(B),ue)!=ue){var Ue=me.lastIndexOf(B);Ue>-1&&(me=me.slice(0,Ue))}return me+k}function L6(o){return o=sn(o),o&&cn.test(o)?o.replace(je,av):o}var j6=mc(function(o,u,p){return o+(p?" ":"")+u.toUpperCase()}),yb=BS("toUpperCase");function jk(o,u,p){return o=sn(o),u=p?n:u,u===n?ip(o)?lv(o):J0(o):o.match(u)||[]}var xk=At(function(o,u){try{return br(o,n,u)}catch(p){return hb(p)?p:new lt(p)}}),x6=Us(function(o,u){return qr(u,function(p){p=gs(p),_t(o,p,fb(o[p],o))}),o});function B6(o){var u=o==null?0:o.length,p=st();return o=u?Qt(o,function(k){if(typeof k[1]!="function")throw new Ar(a);return[p(k[0]),k[1]]}):[],At(function(k){for(var B=-1;++BBe)return[];var p=H,k=nr(o,H);u=st(u),o-=H;for(var B=Ul(k,u);++p0||u<0)?new Pt(p):(o<0?p=p.takeRight(-o):o&&(p=p.drop(o)),u!==n&&(u=kt(u),p=u<0?p.dropRight(-u):p.take(u-o)),p)},Pt.prototype.takeRightWhile=function(o){return this.reverse().takeWhile(o).reverse()},Pt.prototype.toArray=function(){return this.take(H)},ps(Pt.prototype,function(o,u){var p=/^(?:filter|find|map|reject)|While$/.test(u),k=/^(?:head|last)$/.test(u),B=z[k?"take"+(u=="last"?"Right":""):u],G=k||/^find/.test(u);!B||(z.prototype[u]=function(){var oe=this.__wrapped__,ue=k?[1]:arguments,me=oe instanceof Pt,Ce=ue[0],Oe=me||$t(oe),Fe=function(Ft){var Bt=B.apply(z,Ui([Ft],ue));return k&&Ue?Bt[0]:Bt};Oe&&p&&typeof Ce=="function"&&Ce.length!=1&&(me=Oe=!1);var Ue=this.__chain__,Qe=!!this.__actions__.length,ut=G&&!Ue,Tt=me&&!Qe;if(!G&&Oe){oe=Tt?oe:new Pt(this);var ct=o.apply(oe,ue);return ct.__actions__.push({func:Np,args:[Fe],thisArg:n}),new Ur(ct,Ue)}return ut&&Tt?o.apply(this,ue):(ct=this.thru(Fe),ut?k?ct.value()[0]:ct.value():ct)})}),qr(["pop","push","shift","sort","splice","unshift"],function(o){var u=tc[o],p=/^(?:push|sort|unshift)$/.test(o)?"tap":"thru",k=/^(?:pop|shift)$/.test(o);z.prototype[o]=function(){var B=arguments;if(k&&!this.__chain__){var G=this.value();return u.apply($t(G)?G:[],B)}return this[p](function(oe){return u.apply($t(oe)?oe:[],B)})}}),ps(Pt.prototype,function(o,u){var p=z[u];if(p){var k=p.name+"";jt.call(Lo,k)||(Lo[k]=[]),Lo[k].push({name:u,func:p})}}),Lo[Sp(n,F).name]=[{name:"wrapper",func:n}],Pt.prototype.clone=_v,Pt.prototype.reverse=$v,Pt.prototype.value=Ev,z.prototype.at=p3,z.prototype.chain=m3,z.prototype.commit=g3,z.prototype.next=y3,z.prototype.plant=b3,z.prototype.reverse=D3,z.prototype.toJSON=z.prototype.valueOf=z.prototype.value=w3,z.prototype.first=z.prototype.head,Ms&&(z.prototype[Ms]=v3),z},No=Hl();Wi?((Wi.exports=No)._=No,Nl._=No):Kn._=No}).call(Vt)})(_0,_0.exports);class Gj{constructor(e){this.clientCapabilities=e,this.indentation=" "}configure(e){this.indentation=e.indentation}getCodeAction(e,n){if(!n.context.diagnostics)return;const r=[];return r.push(...this.getConvertToBooleanActions(n.context.diagnostics,e)),r.push(...this.getJumpToSchemaActions(n.context.diagnostics)),r.push(...this.getTabToSpaceConverting(n.context.diagnostics,e)),r.push(...this.getUnusedAnchorsDelete(n.context.diagnostics,e)),r.push(...this.getConvertToBlockStyleActions(n.context.diagnostics,e)),r.push(...this.getKeyOrderActions(n.context.diagnostics,e)),r.push(...this.getQuickFixForPropertyOrValueMismatch(n.context.diagnostics,e)),r}getJumpToSchemaActions(e){var s,a,c,l,d;if(!((l=(c=(a=(s=this.clientCapabilities)==null?void 0:s.window)==null?void 0:a.showDocument)==null?void 0:c.support)!=null?l:!1))return[];const r=new Map;for(const h of e){const m=((d=h.data)==null?void 0:d.schemaUri)||[];for(const E of m)E&&(r.has(E)||r.set(E,[]),r.get(E).push(h))}const i=[];for(const h of r.keys()){const m=Ci.create(`Jump to schema location (${na.basename(h)})`,Xs.create("JumpToSchema",yh.JUMP_TO_SCHEMA,h));m.diagnostics=r.get(h),i.push(m)}return i}getTabToSpaceConverting(e,n){const r=[],i=new sa(n),s=[];for(const a of e)if(a.message==="Using tabs can lead to unpredictable results"){if(s.includes(a.range.start.line))continue;const c=i.getLineContent(a.range.start.line);let l=0,d="";for(let m=a.range.start.character;m<=a.range.end.character&&c.charAt(m)===" ";m++)l++,d+=this.indentation;s.push(a.range.start.line);let h=a.range;l!==a.range.end.character-a.range.start.character&&(h=ot.create(a.range.start,Zn.create(a.range.end.line,a.range.start.character+l))),r.push(Ci.create("Convert Tab to Spaces",va(n.uri,[an.replace(h,d)]),Qi.QuickFix))}if(r.length!==0){const a=[];for(let c=0;c<=i.getLineCount();c++){const l=i.getLineContent(c);let d=0,h="";for(let m=0;m0&&r.push(Ci.create("Convert all Tabs to Spaces",va(n.uri,a),Qi.QuickFix))}return r}getUnusedAnchorsDelete(e,n){const r=[],i=new sa(n);for(const s of e)if(s.message.startsWith("Unused anchor")&&s.source===yd){const a=ot.create(s.range.start,s.range.end),c=i.getText(a),l=i.getLineContent(a.end.line),d=LA(l,a.end.character);a.end.character=d;const h=Ci.create(`Delete unused anchor: ${c}`,va(n.uri,[an.del(a)]),Qi.QuickFix);h.diagnostics=[s],r.push(h)}return r}getConvertToBooleanActions(e,n){const r=[];for(const i of e)if(i.message==='Incorrect type. Expected "boolean".'){const s=n.getText(i.range).toLocaleLowerCase();if(s==='"true"'||s==='"false"'||s==="'true'"||s==="'false'"){const a=s.includes("true")?"true":"false";r.push(Ci.create("Convert to boolean",va(n.uri,[an.replace(i.range,a)]),Qi.QuickFix))}}return r}getConvertToBlockStyleActions(e,n){const r=[];for(const i of e)if(i.code==="flowMap"||i.code==="flowSeq"){const s=DE(n,i);if(Nn(s.internalNode)||xn(s.internalNode)){const a=Nn(s.internalNode)?"map":"sequence",c=new Yj(this.indentation);r.push(Ci.create(`Convert to block style ${a}`,va(n.uri,[an.replace(i.range,c.write(s))]),Qi.QuickFix))}}return r}getKeyOrderActions(e,n){var i,s,a,c,l,d,h,m,E,T,R,P,A,F;const r=[];for(const S of e)if((S==null?void 0:S.code)==="mapKeyOrder"){let y=DE(n,S);for(;y&&y.type!=="object";)y=y.parent;if(y&&Nn(y.internalNode)){const D=_0.exports.cloneDeep(y.internalNode);if((D.srcToken.type==="block-map"||D.srcToken.type==="flow-collection")&&(y.internalNode.srcToken.type==="block-map"||y.internalNode.srcToken.type==="flow-collection")){D.srcToken.items.sort((_,$)=>{if(_.key&&$.key&&Eg(_.key)&&Eg($.key))return _.key.source.localeCompare($.key.source);if(!_.key&&$.key)return-1;if(_.key&&!$.key)return 1;if(!_.key&&!$.key)return 0});for(let _=0;_I.type==="newline"))!=null?h:-1;let M=null;((m=q.value)==null?void 0:m.type)==="block-scalar"?M=(T=(E=q.value)==null?void 0:E.props)==null?void 0:T.find(I=>I.type==="newline"):Eg(q.value)&&(M=(P=(R=q.value)==null?void 0:R.end)==null?void 0:P.find(I=>I.type==="newline")),M&&N<0&&($.value.end=(A=$.value.end)!=null?A:[],$.value.end.push(M)),!M&&N>-1&&$.value.end.splice(N,1)}else((F=$.value)==null?void 0:F.type)==="block-scalar"&&($.value.props.find(M=>M.type==="newline")||$.value.props.push({type:"newline",indent:0,offset:$.value.offset,source:` +`}))}}const v=ot.create(n.positionAt(y.offset),n.positionAt(y.offset+y.length));r.push(Ci.create("Fix key order for this map",va(n.uri,[an.replace(v,fw(D.srcToken))]),Qi.QuickFix))}}return r}getPossibleQuickFixValues(e){if(typeof e.data=="object"){if(e.code===Ir.EnumValueMismatch&&"values"in e.data&&Array.isArray(e.data.values))return e.data.values;if(e.code===Ir.PropertyExpected&&"properties"in e.data&&Array.isArray(e.data.properties))return e.data.properties}}getQuickFixForPropertyOrValueMismatch(e,n){const r=[];for(const i of e){const s=this.getPossibleQuickFixValues(i);if(!!(s!=null&&s.length))for(const a of s)r.push(Ci.create(a,va(n.uri,[an.replace(i.range,a)]),Qi.QuickFix))}return r}}function DE(t,e){const n=di.getYamlDocument(t),r=t.offsetAt(e.range.start);return gd(r,n).getNodeFromOffset(r)}function va(t,e){const n={};return n[t]=e,{changes:n}}function Jj(t,e){const{position:n}=e,r=new sa(t);if(e.ch===` +`){const i=r.getLineContent(n.line-1);if(i.trimRight().endsWith(":")){const s=r.getLineContent(n.line),a=s.substring(n.character,s.length),c=i.indexOf(" - ")!==-1;if(a.trimRight().length===0){const l=n.character-(i.length-i.trimLeft().length);if(l===e.options.tabSize&&!c)return;const d=[];return s.length>0&&d.push(an.del(ot.create(n,Zn.create(n.line,s.length-1)))),d.push(an.insert(n," ".repeat(e.options.tabSize+(c?2-l:0)))),d}if(c)return[an.insert(n," ".repeat(e.options.tabSize))]}if(i.trimRight().endsWith("|"))return[an.insert(n," ".repeat(e.options.tabSize))];if(i.includes(" - ")&&!i.includes(": "))return[an.insert(n,"- ")];if(i.includes(" - ")&&i.includes(": "))return[an.insert(n," ")]}}function wE(t){const e=new Map;return t&&(t.url?t.url.startsWith("schemaservice://combinedSchema/")?_E(t,e):e.set(t.url,t):_E(t,e)),e}function _E(t,e){t.allOf&&$0(t.allOf,e),t.anyOf&&$0(t.anyOf,e),t.oneOf&&$0(t.oneOf,e)}function $0(t,e){for(const n of t)!_u(n)&&n.url&&!e.has(n.url)&&e.set(n.url,n)}class Qj{constructor(e,n){this.schemaService=e,this.telemetry=n}async getCodeLens(e){var r;const n=[];try{const i=di.getYamlDocument(e);let s=new Map;for(const a of i.documents){const c=await this.schemaService.getSchemaForResource(e.uri,a);c!=null&&c.schema&&(s=new Map([...wE(c==null?void 0:c.schema),...s]))}for(const a of s){const c=$f.create(ot.create(0,0,0,0));c.command={title:Ew(a[1],a[0]),command:yh.JUMP_TO_SCHEMA,arguments:[a[0]]},n.push(c)}}catch(i){(r=this.telemetry)==null||r.sendError("yaml.codeLens.error",i)}return n}resolveCodeLens(e){return e}}class Xj{constructor(){this.spacesDiff=0,this.looksLikeAlignment=!1}}function Zj(t,e,n,r,i){i.spacesDiff=0,i.looksLikeAlignment=!1;let s;for(s=0;s0&&c>0||l>0&&d>0)return;const h=Math.abs(c-d),m=Math.abs(a-l);if(h===0){i.spacesDiff=m,m>0&&0<=l-1&&l-10?i++:D>1&&s++,Zj(a,c,A,y,m),m.looksLikeAlignment&&!(n&&e===m.spacesDiff)))continue;const _=m.spacesDiff;_<=d&&h[_]++,a=A,c=y}let E=n;i!==s&&(E=i{const A=h[P];A>R&&(R=A,T=P)}),T===4&&h[4]>0&&h[2]>0&&h[2]>=h[4]/2&&(T=2)}return{insertSpaces:E,tabSize:T}}function vh(t,e,n,r,i=0,s=0){if(t!==null&&typeof t=="object"){const a=i===0&&r.shouldIndentWithTab||i>0?e+r.indentation:"";if(Array.isArray(t)){if(s+=1,t.length===0)return"";let c="";for(let l=0;l0?` -`:"",d=!0;for(let h=0;h0&&d[_-1]==='"'&&_--,N=ot.create(e.positionAt(_),n)}const S={},y={add:(_,$)=>{const q=function(K){var nt;if(((nt=S[K.label])==null?void 0:nt.label)===bh)return;const ge=K.parent.schema,ye=Ag(ge),De=ge.markdownDescription||ge.description;let Be=s.items.find(Se=>{var H;return((H=Se.parent)==null?void 0:H.schema)===ge&&Se.kind===EE});Be&&Be.parent.insertTexts.includes(K.insertText)||(Be?Be.parent.insertTexts.push(K.insertText):(Be={...K,label:ye,documentation:De,sortText:"_"+ye,kind:EE},Be.label=Be.label||K.label,Be.parent.insertTexts=[K.insertText],s.items.push(Be)))},F=!!_.parent;let M=_.label;if(!M){console.warn(`Ignoring CompletionItem without label: ${JSON.stringify(_)}`);return}if($u(M)||(M=String(M)),M=M.replace(/[\n]/g,"\u21B5"),M.length>60){const K=M.substr(0,57).trim()+"...";S[K]||(M=K)}if(_.insertText.endsWith("$1")&&!F&&(_.insertText=_.insertText.substr(0,_.insertText.length-2)),N&&N.start.line===N.end.line&&(_.textEdit=an.replace(N,_.insertText)),_.label=M,F){q(_);return}this.arrayPrefixIndentation&&this.updateCompletionText(_,this.arrayPrefixIndentation+_.insertText);const I=S[M],Y=(I==null?void 0:I.label)!==bh&&(I==null?void 0:I.insertText)!==_.insertText;if(!I)S[M]=_,s.items.push(_);else if(Y){const K=this.mergeSimpleInsertTexts(M,I.insertText,_.insertText,$);K?this.updateCompletionText(I,K):(S[M]=_,s.items.push(_))}I&&!I.documentation&&_.documentation&&(I.documentation=_.documentation)},error:_=>{var $;($=this.telemetry)==null||$.sendError("yaml.completion.error",_)},log:_=>{console.log(_)},getNumberOfProposals:()=>s.items.length,result:s,proposed:S};this.customTags&&this.customTags.length>0&&this.getCustomTagValueCompletions(y),R.endsWith(` -`)&&(R=R.substr(0,R.length-1));try{const _=await this.schemaService.getSchemaForResource(e.uri,h);if((!_||_.errors.length)&&n.line===0&&n.character===0&&!jg(R)){const M={kind:Fr.Text,label:"Inline schema",insertText:"# yaml-language-server: $schema=",insertTextFormat:or.PlainText};s.items.push(M)}if(jg(R)||WO(a.tokens,l)){const M=R.indexOf("$schema=");return M!==-1&&M+8<=n.character&&this.schemaService.getAllSchemas().forEach(I=>{var K;const Y={kind:Fr.Constant,label:(K=I.name)!=null?K:I.uri,detail:I.description,insertText:I.uri,insertTextFormat:or.PlainText,insertTextMode:bf.asIs};s.items.push(Y)}),s}if(!_||_.errors.length)return s;let $=null;if(!m)if(!h.internalDocument.contents||yt(h.internalDocument.contents)){const M=h.internalDocument.createNode({});M.range=[l,l+1,l+1],h.internalDocument.contents=M,h.updateFromInternalDocument(),m=M}else m=h.findClosestNode(l,c),E=!0;const q=m;if(m)if(R.length===0)m=h.internalDocument.contents;else{const M=h.getParent(m);if(M){if(yt(m)){if(m.value){if(Xt(M)){if(M.value===m){if(R.trim().length>0&&R.indexOf(":")<0){const I=this.createTempObjNode(k,m,h),Y=h.getParent(M);if(xn(h.internalDocument.contents)){const K=qO(h.internalDocument.contents,M);typeof K=="number"&&(h.internalDocument.set(K,I),h.updateFromInternalDocument())}else Y&&(Nn(Y)||xn(Y))?(Y.set(M.key,I),h.updateFromInternalDocument()):(h.internalDocument.set(M.key,I),h.updateFromInternalDocument());$=I.items[0],m=I}else if(R.trim().length===0){const I=h.getParent(M);I&&(m=I)}}else if(M.key===m){const I=h.getParent(M);$=M,I&&(m=I)}}else if(xn(M))if(R.trim().length>0){const I=this.createTempObjNode(k,m,h);M.delete(m),M.add(I),h.updateFromInternalDocument(),m=I}else m=M}else if(m.value===null){if(Xt(M)){if(M.key===m)m=M;else if(on(M.key)&&M.key.range){const I=h.getParent(M);if(E&&I&&Nn(I)&&BO(I))m=I;else{const Y=e.positionAt(M.key.range[0]);if(n.character>Y.character&&n.line!==Y.line){const K=this.createTempObjNode(k,m,h);I&&(Nn(I)||xn(I))?(I.set(M.key,K),h.updateFromInternalDocument()):(h.internalDocument.set(M.key,K),h.updateFromInternalDocument()),$=K.items[0],m=K}else Y.character===n.character&&I&&(m=I)}}}else if(xn(M))if(R.charAt(n.character-1)!=="-"){const I=this.createTempObjNode(k,m,h);M.delete(m),M.add(I),h.updateFromInternalDocument(),m=I}else if(R.charAt(n.character-1)==="-"){const I=this.createTempObjNode("",m,h);M.delete(m),M.add(I),h.updateFromInternalDocument(),m=I}else m=M}}else if(Nn(m)&&!E&&R.trim().length===0&&xn(M)){const I=c.getLineContent(n.line+1);(c.getLineCount()===n.line+1||I.trim().length===0)&&(m=M)}}else if(yt(m)){const I=this.createTempObjNode(k,m,h);h.internalDocument.contents=I,h.updateFromInternalDocument(),$=I.items[0],m=I}else if(Nn(m))for(const I of m.items)on(I.value)&&I.value.range&&I.value.range[0]===l+1&&(m=I.value);else if(xn(m)&&R.charAt(n.character-1)!=="-"){const I=this.createTempObjNode(k,m,h);I.items=[],h.updateFromInternalDocument();for(const Y of m.items)Nn(Y)&&Y.items.forEach(K=>{I.items.push(K)});m=I}}if(m&&Nn(m)){const M=m.items;for(const I of M)(!$||$!==I)&&yt(I.key)&&(S[I.key.value+""]=Df.create(bh));this.addPropertyCompletions(_,h,m,q,"",y,c,N,i),!_&&k.length>0&&d.charAt(l-k.length-1)!=='"'&&y.add({kind:Fr.Property,label:k,insertText:this.getInsertTextForProperty(k,null,""),insertTextFormat:or.Snippet})}const F={};this.getValueCompletions(_,h,m,l,e,y,F,i)}catch(_){(v=this.telemetry)==null||v.sendError("yaml.completion.error",_)}this.finalizeParentCompletion(s);const D=s.items.filter((_,$,q)=>$===q.findIndex(F=>F.label===_.label&&F.insertText===_.insertText&&F.kind===_.kind));return(D==null?void 0:D.length)>0&&(s.items=D),s}updateCompletionText(e,n){e.insertText=n,e.textEdit&&(e.textEdit.newText=n)}mergeSimpleInsertTexts(e,n,r,i){const s=m=>m.includes(` +`:"",d=!0;for(let h=0;h0&&d[_-1]==='"'&&_--,F=ot.create(e.positionAt(_),n)}const S={},y={add:(_,$)=>{const q=function(K){var nt;if(((nt=S[K.label])==null?void 0:nt.label)===bh)return;const ge=K.parent.schema,ye=Ag(ge),De=ge.markdownDescription||ge.description;let Be=s.items.find(Se=>{var H;return((H=Se.parent)==null?void 0:H.schema)===ge&&Se.kind===EE});Be&&Be.parent.insertTexts.includes(K.insertText)||(Be?Be.parent.insertTexts.push(K.insertText):(Be={...K,label:ye,documentation:De,sortText:"_"+ye,kind:EE},Be.label=Be.label||K.label,Be.parent.insertTexts=[K.insertText],s.items.push(Be)))},N=!!_.parent;let M=_.label;if(!M){console.warn(`Ignoring CompletionItem without label: ${JSON.stringify(_)}`);return}if($u(M)||(M=String(M)),M=M.replace(/[\n]/g,"\u21B5"),M.length>60){const K=M.substr(0,57).trim()+"...";S[K]||(M=K)}if(_.insertText.endsWith("$1")&&!N&&(_.insertText=_.insertText.substr(0,_.insertText.length-2)),F&&F.start.line===F.end.line&&(_.textEdit=an.replace(F,_.insertText)),_.label=M,N){q(_);return}this.arrayPrefixIndentation&&this.updateCompletionText(_,this.arrayPrefixIndentation+_.insertText);const I=S[M],Y=(I==null?void 0:I.label)!==bh&&(I==null?void 0:I.insertText)!==_.insertText;if(!I)S[M]=_,s.items.push(_);else if(Y){const K=this.mergeSimpleInsertTexts(M,I.insertText,_.insertText,$);K?this.updateCompletionText(I,K):(S[M]=_,s.items.push(_))}I&&!I.documentation&&_.documentation&&(I.documentation=_.documentation)},error:_=>{var $;($=this.telemetry)==null||$.sendError("yaml.completion.error",_)},log:_=>{console.log(_)},getNumberOfProposals:()=>s.items.length,result:s,proposed:S};this.customTags&&this.customTags.length>0&&this.getCustomTagValueCompletions(y),R.endsWith(` +`)&&(R=R.substr(0,R.length-1));try{const _=await this.schemaService.getSchemaForResource(e.uri,h);if((!_||_.errors.length)&&n.line===0&&n.character===0&&!jg(R)){const M={kind:Fr.Text,label:"Inline schema",insertText:"# yaml-language-server: $schema=",insertTextFormat:or.PlainText};s.items.push(M)}if(jg(R)||WO(a.tokens,l)){const M=R.indexOf("$schema=");return M!==-1&&M+8<=n.character&&this.schemaService.getAllSchemas().forEach(I=>{var K;const Y={kind:Fr.Constant,label:(K=I.name)!=null?K:I.uri,detail:I.description,insertText:I.uri,insertTextFormat:or.PlainText,insertTextMode:Df.asIs};s.items.push(Y)}),s}if(!_||_.errors.length)return s;let $=null;if(!m)if(!h.internalDocument.contents||yt(h.internalDocument.contents)){const M=h.internalDocument.createNode({});M.range=[l,l+1,l+1],h.internalDocument.contents=M,h.updateFromInternalDocument(),m=M}else m=h.findClosestNode(l,c),E=!0;const q=m;if(m)if(R.length===0)m=h.internalDocument.contents;else{const M=h.getParent(m);if(M){if(yt(m)){if(m.value){if(Xt(M)){if(M.value===m){if(R.trim().length>0&&R.indexOf(":")<0){const I=this.createTempObjNode(T,m,h),Y=h.getParent(M);if(xn(h.internalDocument.contents)){const K=qO(h.internalDocument.contents,M);typeof K=="number"&&(h.internalDocument.set(K,I),h.updateFromInternalDocument())}else Y&&(Nn(Y)||xn(Y))?(Y.set(M.key,I),h.updateFromInternalDocument()):(h.internalDocument.set(M.key,I),h.updateFromInternalDocument());$=I.items[0],m=I}else if(R.trim().length===0){const I=h.getParent(M);I&&(m=I)}}else if(M.key===m){const I=h.getParent(M);$=M,I&&(m=I)}}else if(xn(M))if(R.trim().length>0){const I=this.createTempObjNode(T,m,h);M.delete(m),M.add(I),h.updateFromInternalDocument(),m=I}else m=M}else if(m.value===null){if(Xt(M)){if(M.key===m)m=M;else if(on(M.key)&&M.key.range){const I=h.getParent(M);if(E&&I&&Nn(I)&&BO(I))m=I;else{const Y=e.positionAt(M.key.range[0]);if(n.character>Y.character&&n.line!==Y.line){const K=this.createTempObjNode(T,m,h);I&&(Nn(I)||xn(I))?(I.set(M.key,K),h.updateFromInternalDocument()):(h.internalDocument.set(M.key,K),h.updateFromInternalDocument()),$=K.items[0],m=K}else Y.character===n.character&&I&&(m=I)}}}else if(xn(M))if(R.charAt(n.character-1)!=="-"){const I=this.createTempObjNode(T,m,h);M.delete(m),M.add(I),h.updateFromInternalDocument(),m=I}else if(R.charAt(n.character-1)==="-"){const I=this.createTempObjNode("",m,h);M.delete(m),M.add(I),h.updateFromInternalDocument(),m=I}else m=M}}else if(Nn(m)&&!E&&R.trim().length===0&&xn(M)){const I=c.getLineContent(n.line+1);(c.getLineCount()===n.line+1||I.trim().length===0)&&(m=M)}}else if(yt(m)){const I=this.createTempObjNode(T,m,h);h.internalDocument.contents=I,h.updateFromInternalDocument(),$=I.items[0],m=I}else if(Nn(m))for(const I of m.items)on(I.value)&&I.value.range&&I.value.range[0]===l+1&&(m=I.value);else if(xn(m)&&R.charAt(n.character-1)!=="-"){const I=this.createTempObjNode(T,m,h);I.items=[],h.updateFromInternalDocument();for(const Y of m.items)Nn(Y)&&Y.items.forEach(K=>{I.items.push(K)});m=I}}if(m&&Nn(m)){const M=m.items;for(const I of M)(!$||$!==I)&&yt(I.key)&&(S[I.key.value+""]=wf.create(bh));this.addPropertyCompletions(_,h,m,q,"",y,c,F,i),!_&&T.length>0&&d.charAt(l-T.length-1)!=='"'&&y.add({kind:Fr.Property,label:T,insertText:this.getInsertTextForProperty(T,null,""),insertTextFormat:or.Snippet})}const N={};this.getValueCompletions(_,h,m,l,e,y,N,i)}catch(_){(v=this.telemetry)==null||v.sendError("yaml.completion.error",_)}this.finalizeParentCompletion(s);const D=s.items.filter((_,$,q)=>$===q.findIndex(N=>N.label===_.label&&N.insertText===_.insertText&&N.kind===_.kind));return(D==null?void 0:D.length)>0&&(s.items=D),s}updateCompletionText(e,n){e.insertText=n,e.textEdit&&(e.textEdit.newText=n)}mergeSimpleInsertTexts(e,n,r,i){const s=m=>m.includes(` `),a=m=>m.startsWith(` `),c=m=>{const E=m.indexOf(` `);return E>0&&m.substring(E,m.length).trim().length===0};if(s(n)||s(r))return i&&c(n)&&!c(r)&&!a(r)?r:void 0;const l=this.getValuesFromInsertText(n),d=this.getValuesFromInsertText(r),h=Array.prototype.concat(l,d);if(h.length)return h.length===1?`${e}: \${1:${h[0]}}`:`${e}: \${1|${h.join(",")}|}`}getValuesFromInsertText(e){const n=e.substring(e.indexOf(":")+1).trim();if(!n)return[];const r=n.match(/^\${1[|:]([^|]*)+\|?}$/);return r?r[1].split(","):[n]}finalizeParentCompletion(e){const n=r=>{let i=0;return r.map(s=>{const a=s.match(/\$([0-9]+)|\${[0-9]+:/g);if(!a)return s;const c=a.map(d=>+d.replace(/\${([0-9]+)[:|]/g,"$1").replace("$","")).reduce((d,h)=>h>d?h:d,0),l=s.replace(/\$([0-9]+)/g,(d,h)=>"$"+(+h+i)).replace(/\${([0-9]+)[:|]/g,(d,h)=>"${"+(+h+i)+":");return i+=c,l})};e.items.forEach(r=>{if(ox(r)){const i=r.parent.indent||"";let a=n(r.parent.insertTexts).join(` ${i}`);a.endsWith("$1")&&(a=a.substring(0,a.length-2)),r.insertText=this.arrayPrefixIndentation+a,r.textEdit&&(r.textEdit.newText=r.insertText);const c=a.replace(/\${[0-9]+[:|](.*)}/g,(d,h)=>h).replace(/\$([0-9]+)/g,""),l=r.documentation?[r.documentation,"","----",""]:[];r.documentation={kind:Ji.Markdown,value:[...l,"```yaml",i+c,"```"].join(` -`)},delete r.parent}})}createTempObjNode(e,n,r){const i={};i[e]=null;const s=r.internalDocument.createNode(i);return s.range=n.range,s.items[0].key.range=n.range,s.items[0].value.range=n.range,s}addPropertyCompletions(e,n,r,i,s,a,c,l,d){var D,v,_;const h=n.getMatchingSchemas(e.schema,-1,null,d),m=c.getText(l),E=c.getLineContent(l.start.line),k=E.trim().length===0,R=E.indexOf(":")!==-1,P=E.trimLeft().indexOf("-")===0,A=n.getParent(r),N=h.find($=>$.node.internalNode===i&&$.schema.properties),S=h.filter($=>$.schema.oneOf).map($=>$.schema.oneOf)[0];let y=!1;(S==null?void 0:S.length){var F,M;!((F=h[q])!=null&&F.schema.oneOf)&&((M=h[q])==null?void 0:M.schema.properties)===$.properties&&(y=!0)}));for(const $ of h){if(($.node.internalNode===r&&!N||$.node.internalNode===i&&!R||((D=$.node.parent)==null?void 0:D.internalNode)===i&&!R)&&!$.inverted){this.collectDefaultSnippets($.schema,s,a,{newLineFirst:!1,indentFirstObject:!1,shouldIndentWithTab:P});const q=$.schema.properties;if(q){const F=$.schema.maxProperties;if(F===void 0||r.items===void 0||r.items.length=0){const nt=l.end.character-l.start.character;Y=" "+De.slice(Be+1,r.range[1]-nt)}}Y+=this.arrayPrefixIndentation;let K;I.type==="array"&&(K=r.items.find(De=>yt(De.key)&&De.key.range&&De.key.value===M&&yt(De.value)&&!De.value.value&&c.getPosition(De.key.range[2]).line===l.end.line-1))&&K&&(Array.isArray(I.items)?this.addSchemaValueCompletions(I.items[0],s,a,{},"property"):typeof I.items=="object"&&I.items.type==="object"&&this.addArrayItemValueCompletion(I.items,s,a));let ne=M;(!M.startsWith(m)||!R)&&(ne=this.getInsertTextForProperty(M,I,s,Y+this.indentation));const ge=yt(i)&&i.value===null||Nn(i)&&i.items.length===0,ye=((v=$.schema.required)==null?void 0:v.length)>0;(!this.parentSkeletonSelectedFirst||!ge||!ye)&&a.add({kind:Fr.Property,label:M,insertText:ne,insertTextFormat:or.Snippet,documentation:this.fromMarkup(I.markdownDescription)||I.description||""},y),(_=$.schema.required)!=null&&_.includes(M)&&a.add({label:M,insertText:this.getInsertTextForProperty(M,I,s,Y+this.indentation),insertTextFormat:or.Snippet,documentation:this.fromMarkup(I.markdownDescription)||I.description||"",parent:{schema:$.schema,indent:Y}})}}}}if(A&&xn(A)&&aO($.schema)&&this.addSchemaValueCompletions($.schema,s,a,{},"property",Array.isArray(A.items)),$.schema.propertyNames&&$.schema.additionalProperties&&$.schema.type==="object"){const F=Er($.schema.propertyNames),M=F.title||"property";a.add({kind:Fr.Property,label:M,insertText:`\${1:${M}}: `,insertTextFormat:or.Snippet,documentation:this.fromMarkup(F.markdownDescription)||F.description||""})}}A&&$.node.internalNode===A&&$.schema.defaultSnippets&&(r.items.length===1?this.collectDefaultSnippets($.schema,s,a,{newLineFirst:!1,indentFirstObject:!1,shouldIndentWithTab:!0},1):this.collectDefaultSnippets($.schema,s,a,{newLineFirst:!1,indentFirstObject:!0,shouldIndentWithTab:!1},1))}}getValueCompletions(e,n,r,i,s,a,c,l){let d=null;if(r&&yt(r)&&(r=n.getParent(r)),!r){this.addSchemaValueCompletions(e.schema,"",a,c,"value");return}if(Xt(r)){const h=r.value;if(h&&h.range&&i>h.range[0]+h.range[2])return;d=yt(r.key)?r.key.value+"":null,r=n.getParent(r)}if(r&&(d!==null||xn(r))){const h="",m=n.getMatchingSchemas(e.schema,-1,null,l);for(const E of m)if(E.node.internalNode===r&&!E.inverted&&E.schema){if(E.schema.items&&(this.collectDefaultSnippets(E.schema,h,a,{newLineFirst:!1,indentFirstObject:!1,shouldIndentWithTab:!1}),xn(r)&&r.items))if(Array.isArray(E.schema.items)){const k=this.findItemAtOffset(r,s,i);k$.node.internalNode===i&&$.schema.properties),S=h.filter($=>$.schema.oneOf).map($=>$.schema.oneOf)[0];let y=!1;(S==null?void 0:S.length){var N,M;!((N=h[q])!=null&&N.schema.oneOf)&&((M=h[q])==null?void 0:M.schema.properties)===$.properties&&(y=!0)}));for(const $ of h){if(($.node.internalNode===r&&!F||$.node.internalNode===i&&!R||((D=$.node.parent)==null?void 0:D.internalNode)===i&&!R)&&!$.inverted){this.collectDefaultSnippets($.schema,s,a,{newLineFirst:!1,indentFirstObject:!1,shouldIndentWithTab:P});const q=$.schema.properties;if(q){const N=$.schema.maxProperties;if(N===void 0||r.items===void 0||r.items.length=0){const nt=l.end.character-l.start.character;Y=" "+De.slice(Be+1,r.range[1]-nt)}}Y+=this.arrayPrefixIndentation;let K;I.type==="array"&&(K=r.items.find(De=>yt(De.key)&&De.key.range&&De.key.value===M&&yt(De.value)&&!De.value.value&&c.getPosition(De.key.range[2]).line===l.end.line-1))&&K&&(Array.isArray(I.items)?this.addSchemaValueCompletions(I.items[0],s,a,{},"property"):typeof I.items=="object"&&I.items.type==="object"&&this.addArrayItemValueCompletion(I.items,s,a));let ne=M;(!M.startsWith(m)||!R)&&(ne=this.getInsertTextForProperty(M,I,s,Y+this.indentation));const ge=yt(i)&&i.value===null||Nn(i)&&i.items.length===0,ye=((v=$.schema.required)==null?void 0:v.length)>0;(!this.parentSkeletonSelectedFirst||!ge||!ye)&&a.add({kind:Fr.Property,label:M,insertText:ne,insertTextFormat:or.Snippet,documentation:this.fromMarkup(I.markdownDescription)||I.description||""},y),(_=$.schema.required)!=null&&_.includes(M)&&a.add({label:M,insertText:this.getInsertTextForProperty(M,I,s,Y+this.indentation),insertTextFormat:or.Snippet,documentation:this.fromMarkup(I.markdownDescription)||I.description||"",parent:{schema:$.schema,indent:Y}})}}}}if(A&&xn(A)&&aO($.schema)&&this.addSchemaValueCompletions($.schema,s,a,{},"property",Array.isArray(A.items)),$.schema.propertyNames&&$.schema.additionalProperties&&$.schema.type==="object"){const N=Er($.schema.propertyNames),M=N.title||"property";a.add({kind:Fr.Property,label:M,insertText:`\${1:${M}}: `,insertTextFormat:or.Snippet,documentation:this.fromMarkup(N.markdownDescription)||N.description||""})}}A&&$.node.internalNode===A&&$.schema.defaultSnippets&&(r.items.length===1?this.collectDefaultSnippets($.schema,s,a,{newLineFirst:!1,indentFirstObject:!1,shouldIndentWithTab:!0},1):this.collectDefaultSnippets($.schema,s,a,{newLineFirst:!1,indentFirstObject:!0,shouldIndentWithTab:!1},1))}}getValueCompletions(e,n,r,i,s,a,c,l){let d=null;if(r&&yt(r)&&(r=n.getParent(r)),!r){this.addSchemaValueCompletions(e.schema,"",a,c,"value");return}if(Xt(r)){const h=r.value;if(h&&h.range&&i>h.range[0]+h.range[2])return;d=yt(r.key)?r.key.value+"":null,r=n.getParent(r)}if(r&&(d!==null||xn(r))){const h="",m=n.getMatchingSchemas(e.schema,-1,null,l);for(const E of m)if(E.node.internalNode===r&&!E.inverted&&E.schema){if(E.schema.items&&(this.collectDefaultSnippets(E.schema,h,a,{newLineFirst:!1,indentFirstObject:!1,shouldIndentWithTab:!1}),xn(r)&&r.items))if(Array.isArray(E.schema.items)){const T=this.findItemAtOffset(r,s,i);T1)&&(c=" $1"),a+c+r}getInsertTextForObject(e,n,r=this.indentation,i=1){let s="";return e.properties?(Object.keys(e.properties).forEach(a=>{const c=e.properties[a];let l=Array.isArray(c.type)?c.type[0]:c.type;if(l||(c.anyOf&&(l="anyOf"),c.properties&&(l="object"),c.items&&(l="array")),e.required&&e.required.indexOf(a)>-1)switch(l){case"boolean":case"string":case"number":case"integer":case"anyOf":{let d=c.default||c.const;d?(l==="string"&&(d=Dh(d)),s+=`${r}${a}: \${${i++}:${d}} `):s+=`${r}${a}: $${i++} `;break}case"array":{const d=this.getInsertTextForArray(c.items,n,i++,r),h=d.insertText.split(` -`);let m=d.insertText;if(h.length>1){for(let E=1;E1){for(let E=1;Ethis.addSchemaValueCompletions(c,n,r,i,s,a)),Array.isArray(e.anyOf)&&e.anyOf.forEach(c=>this.addSchemaValueCompletions(c,n,r,i,s,a)),Array.isArray(e.oneOf)&&e.oneOf.forEach(c=>this.addSchemaValueCompletions(c,n,r,i,s,a)))}collectTypes(e,n){if(Array.isArray(e.enum)||ra(e.const))return;const r=e.type;Array.isArray(r)?r.forEach(function(i){return n[i]=!0}):r&&(n[r]=!0)}addDefaultValueCompletions(e,n,r,i=0){let s=!1;if(ra(e.default)){let a=e.type,c=e.default;for(let d=i;d>0;d--)c=[c],a="array";let l;typeof c=="object"?l="Default value":l=c.toString().replace($E,'"'),r.add({kind:this.getSuggestionKind(a),label:l,insertText:this.getInsertTextForValue(c,n,a),insertTextFormat:or.Snippet,detail:nx("json.suggest.default","Default value")}),s=!0}Array.isArray(e.examples)&&e.examples.forEach(a=>{let c=e.type,l=a;for(let d=i;d>0;d--)l=[l],c="array";r.add({kind:this.getSuggestionKind(c),label:this.getLabelForValue(l),insertText:this.getInsertTextForValue(l,n,c),insertTextFormat:or.Snippet}),s=!0}),this.collectDefaultSnippets(e,n,r,{newLineFirst:!0,indentFirstObject:!0,shouldIndentWithTab:!0}),!s&&typeof e.items=="object"&&!Array.isArray(e.items)&&this.addDefaultValueCompletions(e.items,n,r,i+1)}addEnumValueCompletions(e,n,r,i){if(ra(e.const)&&!i&&r.add({kind:this.getSuggestionKind(e.type),label:this.getLabelForValue(e.const),insertText:this.getInsertTextForValue(e.const,n,e.type),insertTextFormat:or.Snippet,documentation:this.fromMarkup(e.markdownDescription)||e.description}),Array.isArray(e.enum))for(let s=0,a=e.enum.length;s{A===0&&!P.startsWith("-")?R[`- ${P}`]=l[P]:R[` ${P}`]=l[P]}),l=R}const k=Object.keys(r.proposed).filter(R=>r.proposed[R].label===bh);if(h=this.getInsertTextForSnippetValue(l,n,i,k),h===""&&l)continue;d=d||this.getLabelForSnippetValue(l)}else if(typeof a.bodyText=="string"){let E="",k="",R="";for(let P=s;P>0;P--)E=E+R+`[ -`,k=k+` +`,s+=`${l}`}return s}return this.getInsertTextForPlainText(e+i)}addSchemaValueCompletions(e,n,r,i,s,a){typeof e=="object"&&(this.addEnumValueCompletions(e,n,r,a),this.addDefaultValueCompletions(e,n,r),this.collectTypes(e,i),a&&s==="value"&&!Cg(e)&&this.addArrayItemValueCompletion(e,n,r),Array.isArray(e.allOf)&&e.allOf.forEach(c=>this.addSchemaValueCompletions(c,n,r,i,s,a)),Array.isArray(e.anyOf)&&e.anyOf.forEach(c=>this.addSchemaValueCompletions(c,n,r,i,s,a)),Array.isArray(e.oneOf)&&e.oneOf.forEach(c=>this.addSchemaValueCompletions(c,n,r,i,s,a)))}collectTypes(e,n){if(Array.isArray(e.enum)||ra(e.const))return;const r=e.type;Array.isArray(r)?r.forEach(function(i){return n[i]=!0}):r&&(n[r]=!0)}addDefaultValueCompletions(e,n,r,i=0){let s=!1;if(ra(e.default)){let a=e.type,c=e.default;for(let d=i;d>0;d--)c=[c],a="array";let l;typeof c=="object"?l="Default value":l=c.toString().replace($E,'"'),r.add({kind:this.getSuggestionKind(a),label:l,insertText:this.getInsertTextForValue(c,n,a),insertTextFormat:or.Snippet,detail:nx("json.suggest.default","Default value")}),s=!0}Array.isArray(e.examples)&&e.examples.forEach(a=>{let c=e.type,l=a;for(let d=i;d>0;d--)l=[l],c="array";r.add({kind:this.getSuggestionKind(c),label:this.getLabelForValue(l),insertText:this.getInsertTextForValue(l,n,c),insertTextFormat:or.Snippet}),s=!0}),this.collectDefaultSnippets(e,n,r,{newLineFirst:!0,indentFirstObject:!0,shouldIndentWithTab:!0}),!s&&typeof e.items=="object"&&!Array.isArray(e.items)&&this.addDefaultValueCompletions(e.items,n,r,i+1)}addEnumValueCompletions(e,n,r,i){if(ra(e.const)&&!i&&r.add({kind:this.getSuggestionKind(e.type),label:this.getLabelForValue(e.const),insertText:this.getInsertTextForValue(e.const,n,e.type),insertTextFormat:or.Snippet,documentation:this.fromMarkup(e.markdownDescription)||e.description}),Array.isArray(e.enum))for(let s=0,a=e.enum.length;s{A===0&&!P.startsWith("-")?R[`- ${P}`]=l[P]:R[` ${P}`]=l[P]}),l=R}const T=Object.keys(r.proposed).filter(R=>r.proposed[R].label===bh);if(h=this.getInsertTextForSnippetValue(l,n,i,T),h===""&&l)continue;d=d||this.getLabelForSnippetValue(l)}else if(typeof a.bodyText=="string"){let E="",T="",R="";for(let P=s;P>0;P--)E=E+R+`[ +`,T=T+` `+R+"]",R+=this.indentation,c="array";h=E+R+a.bodyText.split(` `).join(` -`+R)+k+n,d=d||h,m=h.replace(/[\n]/g,"")}r.add({kind:a.suggestionKind||this.getSuggestionKind(c),label:d,sortText:a.sortText||a.label,documentation:this.fromMarkup(a.markdownDescription)||a.description,insertText:h,insertTextFormat:or.Snippet,filterText:m})}}getInsertTextForSnippetValue(e,n,r,i,s){return vh(e,"",c=>{if(typeof c=="string"){if(c[0]==="^")return c.substr(1);if(c==="true"||c==="false")return`"${c}"`}return c},{...r,indentation:this.indentation,existingProps:i},s)+n}addBooleanValueCompletion(e,n,r){r.add({kind:this.getSuggestionKind("boolean"),label:e?"true":"false",insertText:this.getInsertTextForValue(e,n,"boolean"),insertTextFormat:or.Snippet,documentation:""})}addNullValueCompletion(e,n){n.add({kind:this.getSuggestionKind("null"),label:"null",insertText:"null"+e,insertTextFormat:or.Snippet,documentation:""})}getLabelForSnippetValue(e){return JSON.stringify(e).replace(/\$\{\d+:([^}]+)\}|\$\d+/g,"$1")}getCustomTagValueCompletions(e){Ow(this.customTags).forEach(r=>{const i=r.split(" ")[0];this.addCustomTagValueCompletion(e," ",i)})}addCustomTagValueCompletion(e,n,r){e.add({kind:this.getSuggestionKind("string"),label:r,insertText:r+n,insertTextFormat:or.Snippet,documentation:""})}getDocumentationWithMarkdownText(e,n){let r=e;return this.doesSupportMarkdown()&&(n=n.replace(/\${[0-9]+[:|](.*)}/g,(i,s)=>s).replace(/\$([0-9]+)/g,""),r=this.fromMarkup(`${e} +`+R)+T+n,d=d||h,m=h.replace(/[\n]/g,"")}r.add({kind:a.suggestionKind||this.getSuggestionKind(c),label:d,sortText:a.sortText||a.label,documentation:this.fromMarkup(a.markdownDescription)||a.description,insertText:h,insertTextFormat:or.Snippet,filterText:m})}}getInsertTextForSnippetValue(e,n,r,i,s){return vh(e,"",c=>{if(typeof c=="string"){if(c[0]==="^")return c.substr(1);if(c==="true"||c==="false")return`"${c}"`}return c},{...r,indentation:this.indentation,existingProps:i},s)+n}addBooleanValueCompletion(e,n,r){r.add({kind:this.getSuggestionKind("boolean"),label:e?"true":"false",insertText:this.getInsertTextForValue(e,n,"boolean"),insertTextFormat:or.Snippet,documentation:""})}addNullValueCompletion(e,n){n.add({kind:this.getSuggestionKind("null"),label:"null",insertText:"null"+e,insertTextFormat:or.Snippet,documentation:""})}getLabelForSnippetValue(e){return JSON.stringify(e).replace(/\$\{\d+:([^}]+)\}|\$\d+/g,"$1")}getCustomTagValueCompletions(e){Ow(this.customTags).forEach(r=>{const i=r.split(" ")[0];this.addCustomTagValueCompletion(e," ",i)})}addCustomTagValueCompletion(e,n,r){e.add({kind:this.getSuggestionKind("string"),label:r,insertText:r+n,insertTextFormat:or.Snippet,documentation:""})}getDocumentationWithMarkdownText(e,n){let r=e;return this.doesSupportMarkdown()&&(n=n.replace(/\${[0-9]+[:|](.*)}/g,(i,s)=>s).replace(/\$([0-9]+)/g,""),r=this.fromMarkup(`${e} \`\`\` ${n} \`\`\``)),r}getSuggestionKind(e){if(Array.isArray(e)){const n=e;e=n.length>0?n[0]:null}if(!e)return Fr.Value;switch(e){case"string":return Fr.Value;case"object":return Fr.Module;case"property":return Fr.Property;default:return Fr.Value}}getCurrentWord(e,n){let r=n-1;const i=e.getText();for(;r>=0&&` -\r\v":{[,]}`.indexOf(i.charAt(r))===-1;)r--;return i.substring(r+1,n)}fromMarkup(e){if(e&&this.doesSupportMarkdown())return{kind:Ji.Markdown,value:e}}doesSupportMarkdown(){if(this.supportsMarkdown===void 0){const e=this.clientCapabilities.textDocument&&this.clientCapabilities.textDocument.completion;this.supportsMarkdown=e&&e.completionItem&&Array.isArray(e.completionItem.documentationFormat)&&e.completionItem.documentationFormat.indexOf(Ji.Markdown)!==-1}return this.supportsMarkdown}findItemAtOffset(e,n,r){for(let i=e.items.length-1;i>=0;i--){const s=e.items[i];if(on(s)&&s.range){if(r>s.range[1])return i;if(r>=s.range[0])return i}}return 0}}const ix=/^\d+$/;function Dh(t){let e;if(typeof t=="string"?e=t:e=""+t,e.length===0)return e;if(e==="true"||e==="false"||e==="null"||ix.test(e))return`"${e}"`;e.indexOf('"')!==-1&&(e=e.replace($E,'"'));let n=!isNaN(parseInt(e))||e.charAt(0)==="@";if(!n){let r=e.indexOf(":",0);for(;r>0&&rclass extends t{get semanticTokens(){return{refresh:()=>this.connection.sendRequest(wh.SemanticTokensRefreshRequest.type),on:e=>{const n=wh.SemanticTokensRequest.type;return this.connection.onRequest(n,(r,i)=>e(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onDelta:e=>{const n=wh.SemanticTokensDeltaRequest.type;return this.connection.onRequest(n,(r,i)=>e(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onRange:e=>{const n=wh.SemanticTokensRangeRequest.type;return this.connection.onRequest(n,(r,i)=>e(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};Ps.SemanticTokensFeature=ax;class SE{constructor(e,n){this.originalSequence=e,this.modifiedSequence=n}computeDiff(){const e=this.originalSequence.length,n=this.modifiedSequence.length;let r=0;for(;r=r&&s>=r&&this.originalSequence[i]===this.modifiedSequence[s];)i--,s--;(i0&&(a-=this._prevLine,a===0&&(c-=this._prevChar)),this._data[this._dataLen++]=a,this._data[this._dataLen++]=c,this._data[this._dataLen++]=r,this._data[this._dataLen++]=i,this._data[this._dataLen++]=s,this._prevLine=e,this._prevChar=n}get id(){return this._id.toString()}previousResult(e){this.id===e&&(this._prevData=this._data),this.initialize()}build(){return this._prevData=void 0,{resultId:this.id,data:this._data}}canBuildEdits(){return this._prevData!==void 0}buildEdits(){return this._prevData!==void 0?{resultId:this.id,edits:new SE(this._prevData,this._data).computeDiff()}:this.build()}}Ps.SemanticTokensBuilder=ux;var _h={};Object.defineProperty(_h,"__esModule",{value:!0}),_h.InlineCompletionFeature=void 0;const cx=Ln,lx=t=>class extends t{get inlineCompletion(){return{on:e=>this.connection.onRequest(cx.InlineCompletionRequest.type,(n,r)=>e(n,r,this.attachWorkDoneProgress(n)))}}};_h.InlineCompletionFeature=lx;var gl={};Object.defineProperty(gl,"__esModule",{value:!0}),gl.TextDocuments=void 0;const ba=Ln;class fx{constructor(e){this._configuration=e,this._syncedDocuments=new Map,this._onDidChangeContent=new ba.Emitter,this._onDidOpen=new ba.Emitter,this._onDidClose=new ba.Emitter,this._onDidSave=new ba.Emitter,this._onWillSave=new ba.Emitter}get onDidOpen(){return this._onDidOpen.event}get onDidChangeContent(){return this._onDidChangeContent.event}get onWillSave(){return this._onWillSave.event}onWillSaveWaitUntil(e){this._willSaveWaitUntil=e}get onDidSave(){return this._onDidSave.event}get onDidClose(){return this._onDidClose.event}get(e){return this._syncedDocuments.get(e)}all(){return Array.from(this._syncedDocuments.values())}keys(){return Array.from(this._syncedDocuments.keys())}listen(e){e.__textDocumentSync=ba.TextDocumentSyncKind.Incremental;const n=[];return n.push(e.onDidOpenTextDocument(r=>{const i=r.textDocument,s=this._configuration.create(i.uri,i.languageId,i.version,i.text);this._syncedDocuments.set(i.uri,s);const a=Object.freeze({document:s});this._onDidOpen.fire(a),this._onDidChangeContent.fire(a)})),n.push(e.onDidChangeTextDocument(r=>{const i=r.textDocument,s=r.contentChanges;if(s.length===0)return;const{version:a}=i;if(a==null)throw new Error(`Received document change event for ${i.uri} without valid version identifier`);let c=this._syncedDocuments.get(i.uri);c!==void 0&&(c=this._configuration.update(c,s,a),this._syncedDocuments.set(i.uri,c),this._onDidChangeContent.fire(Object.freeze({document:c})))})),n.push(e.onDidCloseTextDocument(r=>{let i=this._syncedDocuments.get(r.textDocument.uri);i!==void 0&&(this._syncedDocuments.delete(r.textDocument.uri),this._onDidClose.fire(Object.freeze({document:i})))})),n.push(e.onWillSaveTextDocument(r=>{let i=this._syncedDocuments.get(r.textDocument.uri);i!==void 0&&this._onWillSave.fire(Object.freeze({document:i,reason:r.reason}))})),n.push(e.onWillSaveTextDocumentWaitUntil((r,i)=>{let s=this._syncedDocuments.get(r.textDocument.uri);return s!==void 0&&this._willSaveWaitUntil?this._willSaveWaitUntil(Object.freeze({document:s,reason:r.reason}),i):[]})),n.push(e.onDidSaveTextDocument(r=>{let i=this._syncedDocuments.get(r.textDocument.uri);i!==void 0&&this._onDidSave.fire(Object.freeze({document:i}))})),ba.Disposable.create(()=>{n.forEach(r=>r.dispose())})}}gl.TextDocuments=fx;var Da={};Object.defineProperty(Da,"__esModule",{value:!0}),Da.NotebookDocuments=Da.NotebookSyncFeature=void 0;const yi=Ln,TE=gl,dx=t=>class extends t{get synchronization(){return{onDidOpenNotebookDocument:e=>this.connection.onNotification(yi.DidOpenNotebookDocumentNotification.type,n=>{e(n)}),onDidChangeNotebookDocument:e=>this.connection.onNotification(yi.DidChangeNotebookDocumentNotification.type,n=>{e(n)}),onDidSaveNotebookDocument:e=>this.connection.onNotification(yi.DidSaveNotebookDocumentNotification.type,n=>{e(n)}),onDidCloseNotebookDocument:e=>this.connection.onNotification(yi.DidCloseNotebookDocumentNotification.type,n=>{e(n)})}}};Da.NotebookSyncFeature=dx;class Bu{onDidOpenTextDocument(e){return this.openHandler=e,yi.Disposable.create(()=>{this.openHandler=void 0})}openTextDocument(e){this.openHandler&&this.openHandler(e)}onDidChangeTextDocument(e){return this.changeHandler=e,yi.Disposable.create(()=>{this.changeHandler=e})}changeTextDocument(e){this.changeHandler&&this.changeHandler(e)}onDidCloseTextDocument(e){return this.closeHandler=e,yi.Disposable.create(()=>{this.closeHandler=void 0})}closeTextDocument(e){this.closeHandler&&this.closeHandler(e)}onWillSaveTextDocument(){return Bu.NULL_DISPOSE}onWillSaveTextDocumentWaitUntil(){return Bu.NULL_DISPOSE}onDidSaveTextDocument(){return Bu.NULL_DISPOSE}}Bu.NULL_DISPOSE=Object.freeze({dispose:()=>{}});class hx{constructor(e){e instanceof TE.TextDocuments?this._cellTextDocuments=e:this._cellTextDocuments=new TE.TextDocuments(e),this.notebookDocuments=new Map,this.notebookCellMap=new Map,this._onDidOpen=new yi.Emitter,this._onDidChange=new yi.Emitter,this._onDidSave=new yi.Emitter,this._onDidClose=new yi.Emitter}get cellTextDocuments(){return this._cellTextDocuments}getCellTextDocument(e){return this._cellTextDocuments.get(e.document)}getNotebookDocument(e){return this.notebookDocuments.get(e)}getNotebookCell(e){const n=this.notebookCellMap.get(e);return n&&n[0]}findNotebookDocumentForCell(e){const n=typeof e=="string"?e:e.document,r=this.notebookCellMap.get(n);return r&&r[1]}get onDidOpen(){return this._onDidOpen.event}get onDidSave(){return this._onDidSave.event}get onDidChange(){return this._onDidChange.event}get onDidClose(){return this._onDidClose.event}listen(e){const n=new Bu,r=[];return r.push(this.cellTextDocuments.listen(n)),r.push(e.notebooks.synchronization.onDidOpenNotebookDocument(i=>{this.notebookDocuments.set(i.notebookDocument.uri,i.notebookDocument);for(const s of i.cellTextDocuments)n.openTextDocument({textDocument:s});this.updateCellMap(i.notebookDocument),this._onDidOpen.fire(i.notebookDocument)})),r.push(e.notebooks.synchronization.onDidChangeNotebookDocument(i=>{const s=this.notebookDocuments.get(i.notebookDocument.uri);if(s===void 0)return;s.version=i.notebookDocument.version;const a=s.metadata;let c=!1;const l=i.change;l.metadata!==void 0&&(c=!0,s.metadata=l.metadata);const d=[],h=[],m=[],E=[];if(l.cells!==void 0){const N=l.cells;if(N.structure!==void 0){const S=N.structure.array;if(s.cells.splice(S.start,S.deleteCount,...S.cells!==void 0?S.cells:[]),N.structure.didOpen!==void 0)for(const y of N.structure.didOpen)n.openTextDocument({textDocument:y}),d.push(y.uri);if(N.structure.didClose)for(const y of N.structure.didClose)n.closeTextDocument({textDocument:y}),h.push(y.uri)}if(N.data!==void 0){const S=new Map(N.data.map(y=>[y.document,y]));for(let y=0;y<=s.cells.length;y++){const D=S.get(s.cells[y].document);if(D!==void 0){const v=s.cells.splice(y,1,D);if(m.push({old:v[0],new:D}),S.delete(D.document),S.size===0)break}}}if(N.textContent!==void 0)for(const S of N.textContent)n.changeTextDocument({textDocument:S.document,contentChanges:S.changes}),E.push(S.document.uri)}this.updateCellMap(s);const k={notebookDocument:s};c&&(k.metadata={old:a,new:s.metadata});const R=[];for(const N of d)R.push(this.getNotebookCell(N));const P=[];for(const N of h)P.push(this.getNotebookCell(N));const A=[];for(const N of E)A.push(this.getNotebookCell(N));(R.length>0||P.length>0||m.length>0||A.length>0)&&(k.cells={added:R,removed:P,changed:{data:m,textContent:A}}),(k.metadata!==void 0||k.cells!==void 0)&&this._onDidChange.fire(k)})),r.push(e.notebooks.synchronization.onDidSaveNotebookDocument(i=>{const s=this.notebookDocuments.get(i.notebookDocument.uri);s!==void 0&&this._onDidSave.fire(s)})),r.push(e.notebooks.synchronization.onDidCloseNotebookDocument(i=>{const s=this.notebookDocuments.get(i.notebookDocument.uri);if(s!==void 0){this._onDidClose.fire(s);for(const a of i.cellTextDocuments)n.closeTextDocument({textDocument:a});this.notebookDocuments.delete(i.notebookDocument.uri);for(const a of s.cells)this.notebookCellMap.delete(a.document)}})),yi.Disposable.create(()=>{r.forEach(i=>i.dispose())})}updateCellMap(e){for(const n of e.cells)this.notebookCellMap.set(n.document,[n,e])}}Da.NotebookDocuments=hx;var zt={},Un={};Object.defineProperty(Un,"__esModule",{value:!0}),Un.thenable=Un.typedArray=Un.stringArray=Un.array=Un.func=Un.error=Un.number=Un.string=Un.boolean=void 0;function px(t){return t===!0||t===!1}Un.boolean=px;function kE(t){return typeof t=="string"||t instanceof String}Un.string=kE;function mx(t){return typeof t=="number"||t instanceof Number}Un.number=mx;function gx(t){return t instanceof Error}Un.error=gx;function AE(t){return typeof t=="function"}Un.func=AE;function CE(t){return Array.isArray(t)}Un.array=CE;function yx(t){return CE(t)&&t.every(e=>kE(e))}Un.stringArray=yx;function vx(t,e){return Array.isArray(t)&&t.every(e)}Un.typedArray=vx;function bx(t){return t&&AE(t.then)}Un.thenable=bx;var Xr={};Object.defineProperty(Xr,"__esModule",{value:!0}),Xr.generateUuid=Xr.parse=Xr.isUUID=Xr.v4=Xr.empty=void 0;class S0{constructor(e){this._value=e}asHex(){return this._value}equals(e){return this.asHex()===e.asHex()}}class Ot extends S0{static _oneOf(e){return e[Math.floor(e.length*Math.random())]}static _randomHex(){return Ot._oneOf(Ot._chars)}constructor(){super([Ot._randomHex(),Ot._randomHex(),Ot._randomHex(),Ot._randomHex(),Ot._randomHex(),Ot._randomHex(),Ot._randomHex(),Ot._randomHex(),"-",Ot._randomHex(),Ot._randomHex(),Ot._randomHex(),Ot._randomHex(),"-","4",Ot._randomHex(),Ot._randomHex(),Ot._randomHex(),"-",Ot._oneOf(Ot._timeHighBits),Ot._randomHex(),Ot._randomHex(),Ot._randomHex(),"-",Ot._randomHex(),Ot._randomHex(),Ot._randomHex(),Ot._randomHex(),Ot._randomHex(),Ot._randomHex(),Ot._randomHex(),Ot._randomHex(),Ot._randomHex(),Ot._randomHex(),Ot._randomHex(),Ot._randomHex()].join(""))}}Ot._chars=["0","1","2","3","4","5","6","6","7","8","9","a","b","c","d","e","f"],Ot._timeHighBits=["8","9","a","b"],Xr.empty=new S0("00000000-0000-0000-0000-000000000000");function OE(){return new Ot}Xr.v4=OE;const Dx=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function PE(t){return Dx.test(t)}Xr.isUUID=PE;function wx(t){if(!PE(t))throw new Error("invalid uuid");return new S0(t)}Xr.parse=wx;function _x(){return OE().asHex()}Xr.generateUuid=_x;var wo={};Object.defineProperty(wo,"__esModule",{value:!0}),wo.attachPartialResult=wo.ProgressFeature=wo.attachWorkDone=void 0;const _o=Ln,$x=Xr;class $o{constructor(e,n){this._connection=e,this._token=n,$o.Instances.set(this._token,this)}begin(e,n,r,i){let s={kind:"begin",title:e,percentage:n,message:r,cancellable:i};this._connection.sendProgress(_o.WorkDoneProgress.type,this._token,s)}report(e,n){let r={kind:"report"};typeof e=="number"?(r.percentage=e,n!==void 0&&(r.message=n)):r.message=e,this._connection.sendProgress(_o.WorkDoneProgress.type,this._token,r)}done(){$o.Instances.delete(this._token),this._connection.sendProgress(_o.WorkDoneProgress.type,this._token,{kind:"end"})}}$o.Instances=new Map;class NE extends $o{constructor(e,n){super(e,n),this._source=new _o.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose(),super.done()}cancel(){this._source.cancel()}}class T0{constructor(){}begin(){}report(){}done(){}}class FE extends T0{constructor(){super(),this._source=new _o.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose()}cancel(){this._source.cancel()}}function Ex(t,e){if(e===void 0||e.workDoneToken===void 0)return new T0;const n=e.workDoneToken;return delete e.workDoneToken,new $o(t,n)}wo.attachWorkDone=Ex;const Sx=t=>class extends t{constructor(){super(),this._progressSupported=!1}initialize(e){var n;super.initialize(e),((n=e==null?void 0:e.window)==null?void 0:n.workDoneProgress)===!0&&(this._progressSupported=!0,this.connection.onNotification(_o.WorkDoneProgressCancelNotification.type,r=>{let i=$o.Instances.get(r.token);(i instanceof NE||i instanceof FE)&&i.cancel()}))}attachWorkDoneProgress(e){return e===void 0?new T0:new $o(this.connection,e)}createWorkDoneProgress(){if(this._progressSupported){const e=(0,$x.generateUuid)();return this.connection.sendRequest(_o.WorkDoneProgressCreateRequest.type,{token:e}).then(()=>new NE(this.connection,e))}else return Promise.resolve(new FE)}};wo.ProgressFeature=Sx;var k0;(function(t){t.type=new _o.ProgressType})(k0||(k0={}));class Tx{constructor(e,n){this._connection=e,this._token=n}report(e){this._connection.sendProgress(k0.type,this._token,e)}}function kx(t,e){if(e===void 0||e.partialResultToken===void 0)return;const n=e.partialResultToken;return delete e.partialResultToken,new Tx(t,n)}wo.attachPartialResult=kx;var $h={};Object.defineProperty($h,"__esModule",{value:!0}),$h.ConfigurationFeature=void 0;const Ax=Ln,Cx=Un,Ox=t=>class extends t{getConfiguration(e){return e?Cx.string(e)?this._getConfiguration({section:e}):this._getConfiguration(e):this._getConfiguration({})}_getConfiguration(e){let n={items:Array.isArray(e)?e:[e]};return this.connection.sendRequest(Ax.ConfigurationRequest.type,n).then(r=>Array.isArray(r)?Array.isArray(e)?r:r[0]:Array.isArray(e)?[]:null)}};$h.ConfigurationFeature=Ox;var Eh={};Object.defineProperty(Eh,"__esModule",{value:!0}),Eh.WorkspaceFoldersFeature=void 0;const Sh=Ln,Px=t=>class extends t{constructor(){super(),this._notificationIsAutoRegistered=!1}initialize(e){super.initialize(e);let n=e.workspace;n&&n.workspaceFolders&&(this._onDidChangeWorkspaceFolders=new Sh.Emitter,this.connection.onNotification(Sh.DidChangeWorkspaceFoldersNotification.type,r=>{this._onDidChangeWorkspaceFolders.fire(r.event)}))}fillServerCapabilities(e){var r,i;super.fillServerCapabilities(e);const n=(i=(r=e.workspace)==null?void 0:r.workspaceFolders)==null?void 0:i.changeNotifications;this._notificationIsAutoRegistered=n===!0||typeof n=="string"}getWorkspaceFolders(){return this.connection.sendRequest(Sh.WorkspaceFoldersRequest.type)}get onDidChangeWorkspaceFolders(){if(!this._onDidChangeWorkspaceFolders)throw new Error("Client doesn't support sending workspace folder change events.");return!this._notificationIsAutoRegistered&&!this._unregistration&&(this._unregistration=this.connection.client.register(Sh.DidChangeWorkspaceFoldersNotification.type)),this._onDidChangeWorkspaceFolders.event}};Eh.WorkspaceFoldersFeature=Px;var Th={};Object.defineProperty(Th,"__esModule",{value:!0}),Th.CallHierarchyFeature=void 0;const A0=Ln,Nx=t=>class extends t{get callHierarchy(){return{onPrepare:e=>this.connection.onRequest(A0.CallHierarchyPrepareRequest.type,(n,r)=>e(n,r,this.attachWorkDoneProgress(n),void 0)),onIncomingCalls:e=>{const n=A0.CallHierarchyIncomingCallsRequest.type;return this.connection.onRequest(n,(r,i)=>e(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onOutgoingCalls:e=>{const n=A0.CallHierarchyOutgoingCallsRequest.type;return this.connection.onRequest(n,(r,i)=>e(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};Th.CallHierarchyFeature=Nx;var kh={};Object.defineProperty(kh,"__esModule",{value:!0}),kh.ShowDocumentFeature=void 0;const Fx=Ln,Rx=t=>class extends t{showDocument(e){return this.connection.sendRequest(Fx.ShowDocumentRequest.type,e)}};kh.ShowDocumentFeature=Rx;var Ah={};Object.defineProperty(Ah,"__esModule",{value:!0}),Ah.FileOperationsFeature=void 0;const qu=Ln,Ix=t=>class extends t{onDidCreateFiles(e){return this.connection.onNotification(qu.DidCreateFilesNotification.type,n=>{e(n)})}onDidRenameFiles(e){return this.connection.onNotification(qu.DidRenameFilesNotification.type,n=>{e(n)})}onDidDeleteFiles(e){return this.connection.onNotification(qu.DidDeleteFilesNotification.type,n=>{e(n)})}onWillCreateFiles(e){return this.connection.onRequest(qu.WillCreateFilesRequest.type,(n,r)=>e(n,r))}onWillRenameFiles(e){return this.connection.onRequest(qu.WillRenameFilesRequest.type,(n,r)=>e(n,r))}onWillDeleteFiles(e){return this.connection.onRequest(qu.WillDeleteFilesRequest.type,(n,r)=>e(n,r))}};Ah.FileOperationsFeature=Ix;var Ch={};Object.defineProperty(Ch,"__esModule",{value:!0}),Ch.LinkedEditingRangeFeature=void 0;const Mx=Ln,Lx=t=>class extends t{onLinkedEditingRange(e){return this.connection.onRequest(Mx.LinkedEditingRangeRequest.type,(n,r)=>e(n,r,this.attachWorkDoneProgress(n),void 0))}};Ch.LinkedEditingRangeFeature=Lx;var Oh={};Object.defineProperty(Oh,"__esModule",{value:!0}),Oh.TypeHierarchyFeature=void 0;const C0=Ln,jx=t=>class extends t{get typeHierarchy(){return{onPrepare:e=>this.connection.onRequest(C0.TypeHierarchyPrepareRequest.type,(n,r)=>e(n,r,this.attachWorkDoneProgress(n),void 0)),onSupertypes:e=>{const n=C0.TypeHierarchySupertypesRequest.type;return this.connection.onRequest(n,(r,i)=>e(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onSubtypes:e=>{const n=C0.TypeHierarchySubtypesRequest.type;return this.connection.onRequest(n,(r,i)=>e(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};Oh.TypeHierarchyFeature=jx;var Ph={};Object.defineProperty(Ph,"__esModule",{value:!0}),Ph.InlineValueFeature=void 0;const RE=Ln,xx=t=>class extends t{get inlineValue(){return{refresh:()=>this.connection.sendRequest(RE.InlineValueRefreshRequest.type),on:e=>this.connection.onRequest(RE.InlineValueRequest.type,(n,r)=>e(n,r,this.attachWorkDoneProgress(n)))}}};Ph.InlineValueFeature=xx;var Nh={};Object.defineProperty(Nh,"__esModule",{value:!0}),Nh.FoldingRangeFeature=void 0;const IE=Ln,Bx=t=>class extends t{get foldingRange(){return{refresh:()=>this.connection.sendRequest(IE.FoldingRangeRefreshRequest.type),on:e=>{const n=IE.FoldingRangeRequest.type;return this.connection.onRequest(n,(r,i)=>e(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};Nh.FoldingRangeFeature=Bx;var Fh={};Object.defineProperty(Fh,"__esModule",{value:!0}),Fh.InlayHintFeature=void 0;const O0=Ln,qx=t=>class extends t{get inlayHint(){return{refresh:()=>this.connection.sendRequest(O0.InlayHintRefreshRequest.type),on:e=>this.connection.onRequest(O0.InlayHintRequest.type,(n,r)=>e(n,r,this.attachWorkDoneProgress(n))),resolve:e=>this.connection.onRequest(O0.InlayHintResolveRequest.type,(n,r)=>e(n,r))}}};Fh.InlayHintFeature=qx;var Rh={};Object.defineProperty(Rh,"__esModule",{value:!0}),Rh.DiagnosticFeature=void 0;const yl=Ln,Wx=t=>class extends t{get diagnostics(){return{refresh:()=>this.connection.sendRequest(yl.DiagnosticRefreshRequest.type),on:e=>this.connection.onRequest(yl.DocumentDiagnosticRequest.type,(n,r)=>e(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(yl.DocumentDiagnosticRequest.partialResult,n))),onWorkspace:e=>this.connection.onRequest(yl.WorkspaceDiagnosticRequest.type,(n,r)=>e(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(yl.WorkspaceDiagnosticRequest.partialResult,n)))}}};Rh.DiagnosticFeature=Wx;var Ih={};Object.defineProperty(Ih,"__esModule",{value:!0}),Ih.MonikerFeature=void 0;const Ux=Ln,Vx=t=>class extends t{get moniker(){return{on:e=>{const n=Ux.MonikerRequest.type;return this.connection.onRequest(n,(r,i)=>e(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};Ih.MonikerFeature=Vx,Object.defineProperty(zt,"__esModule",{value:!0}),zt.createConnection=zt.combineFeatures=zt.combineNotebooksFeatures=zt.combineLanguagesFeatures=zt.combineWorkspaceFeatures=zt.combineWindowFeatures=zt.combineClientFeatures=zt.combineTracerFeatures=zt.combineTelemetryFeatures=zt.combineConsoleFeatures=zt._NotebooksImpl=zt._LanguagesImpl=zt.BulkUnregistration=zt.BulkRegistration=zt.ErrorMessageTracker=void 0;const xe=Ln,vi=Un,P0=Xr,vt=wo,Hx=$h,Kx=Eh,zx=Th,Yx=Ps,Gx=kh,Jx=Ah,Qx=Ch,Xx=Oh,Zx=Ph,eB=Nh,tB=Fh,nB=Rh,rB=Da,iB=Ih;function N0(t){if(t!==null)return t}class sB{constructor(){this._messages=Object.create(null)}add(e){let n=this._messages[e];n||(n=0),n++,this._messages[e]=n}sendErrors(e){Object.keys(this._messages).forEach(n=>{e.window.showErrorMessage(n)})}}zt.ErrorMessageTracker=sB;class ME{constructor(){}rawAttach(e){this._rawConnection=e}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}fillServerCapabilities(e){}initialize(e){}error(e){this.send(xe.MessageType.Error,e)}warn(e){this.send(xe.MessageType.Warning,e)}info(e){this.send(xe.MessageType.Info,e)}log(e){this.send(xe.MessageType.Log,e)}debug(e){this.send(xe.MessageType.Debug,e)}send(e,n){this._rawConnection&&this._rawConnection.sendNotification(xe.LogMessageNotification.type,{type:e,message:n}).catch(()=>{(0,xe.RAL)().console.error("Sending log message failed")})}}class oB{constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}showErrorMessage(e,...n){let r={type:xe.MessageType.Error,message:e,actions:n};return this.connection.sendRequest(xe.ShowMessageRequest.type,r).then(N0)}showWarningMessage(e,...n){let r={type:xe.MessageType.Warning,message:e,actions:n};return this.connection.sendRequest(xe.ShowMessageRequest.type,r).then(N0)}showInformationMessage(e,...n){let r={type:xe.MessageType.Info,message:e,actions:n};return this.connection.sendRequest(xe.ShowMessageRequest.type,r).then(N0)}}const LE=(0,Gx.ShowDocumentFeature)((0,vt.ProgressFeature)(oB));var jE;(function(t){function e(){return new xE}t.create=e})(jE||(zt.BulkRegistration=jE={}));class xE{constructor(){this._registrations=[],this._registered=new Set}add(e,n){const r=vi.string(e)?e:e.method;if(this._registered.has(r))throw new Error(`${r} is already added to this registration`);const i=P0.generateUuid();this._registrations.push({id:i,method:r,registerOptions:n||{}}),this._registered.add(r)}asRegistrationParams(){return{registrations:this._registrations}}}var BE;(function(t){function e(){return new F0(void 0,[])}t.create=e})(BE||(zt.BulkUnregistration=BE={}));class F0{constructor(e,n){this._connection=e,this._unregistrations=new Map,n.forEach(r=>{this._unregistrations.set(r.method,r)})}get isAttached(){return!!this._connection}attach(e){this._connection=e}add(e){this._unregistrations.set(e.method,e)}dispose(){let e=[];for(let r of this._unregistrations.values())e.push(r);let n={unregisterations:e};this._connection.sendRequest(xe.UnregistrationRequest.type,n).catch(()=>{this._connection.console.info("Bulk unregistration failed.")})}disposeSingle(e){const n=vi.string(e)?e:e.method,r=this._unregistrations.get(n);if(!r)return!1;let i={unregisterations:[r]};return this._connection.sendRequest(xe.UnregistrationRequest.type,i).then(()=>{this._unregistrations.delete(n)},s=>{this._connection.console.info(`Un-registering request handler for ${r.id} failed.`)}),!0}}class qE{attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}register(e,n,r){return e instanceof xE?this.registerMany(e):e instanceof F0?this.registerSingle1(e,n,r):this.registerSingle2(e,n)}registerSingle1(e,n,r){const i=vi.string(n)?n:n.method,s=P0.generateUuid();let a={registrations:[{id:s,method:i,registerOptions:r||{}}]};return e.isAttached||e.attach(this.connection),this.connection.sendRequest(xe.RegistrationRequest.type,a).then(c=>(e.add({id:s,method:i}),e),c=>(this.connection.console.info(`Registering request handler for ${i} failed.`),Promise.reject(c)))}registerSingle2(e,n){const r=vi.string(e)?e:e.method,i=P0.generateUuid();let s={registrations:[{id:i,method:r,registerOptions:n||{}}]};return this.connection.sendRequest(xe.RegistrationRequest.type,s).then(a=>xe.Disposable.create(()=>{this.unregisterSingle(i,r).catch(()=>{this.connection.console.info(`Un-registering capability with id ${i} failed.`)})}),a=>(this.connection.console.info(`Registering request handler for ${r} failed.`),Promise.reject(a)))}unregisterSingle(e,n){let r={unregisterations:[{id:e,method:n}]};return this.connection.sendRequest(xe.UnregistrationRequest.type,r).catch(()=>{this.connection.console.info(`Un-registering request handler for ${e} failed.`)})}registerMany(e){let n=e.asRegistrationParams();return this.connection.sendRequest(xe.RegistrationRequest.type,n).then(()=>new F0(this._connection,n.registrations.map(r=>({id:r.id,method:r.method}))),r=>(this.connection.console.info("Bulk registration failed."),Promise.reject(r)))}}class aB{constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}applyEdit(e){function n(i){return i&&!!i.edit}let r=n(e)?e:{edit:e};return this.connection.sendRequest(xe.ApplyWorkspaceEditRequest.type,r)}}const WE=(0,Jx.FileOperationsFeature)((0,Kx.WorkspaceFoldersFeature)((0,Hx.ConfigurationFeature)(aB)));class UE{constructor(){this._trace=xe.Trace.Off}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}set trace(e){this._trace=e}log(e,n){this._trace!==xe.Trace.Off&&this.connection.sendNotification(xe.LogTraceNotification.type,{message:e,verbose:this._trace===xe.Trace.Verbose?n:void 0}).catch(()=>{})}}class VE{constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}logEvent(e){this.connection.sendNotification(xe.TelemetryEventNotification.type,e).catch(()=>{this.connection.console.log("Sending TelemetryEventNotification failed")})}}class HE{constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}attachWorkDoneProgress(e){return(0,vt.attachWorkDone)(this.connection,e)}attachPartialResultProgress(e,n){return(0,vt.attachPartialResult)(this.connection,n)}}zt._LanguagesImpl=HE;const KE=(0,eB.FoldingRangeFeature)((0,iB.MonikerFeature)((0,nB.DiagnosticFeature)((0,tB.InlayHintFeature)((0,Zx.InlineValueFeature)((0,Xx.TypeHierarchyFeature)((0,Qx.LinkedEditingRangeFeature)((0,Yx.SemanticTokensFeature)((0,zx.CallHierarchyFeature)(HE)))))))));class zE{constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}attachWorkDoneProgress(e){return(0,vt.attachWorkDone)(this.connection,e)}attachPartialResultProgress(e,n){return(0,vt.attachPartialResult)(this.connection,n)}}zt._NotebooksImpl=zE;const YE=(0,rB.NotebookSyncFeature)(zE);function GE(t,e){return function(n){return e(t(n))}}zt.combineConsoleFeatures=GE;function JE(t,e){return function(n){return e(t(n))}}zt.combineTelemetryFeatures=JE;function QE(t,e){return function(n){return e(t(n))}}zt.combineTracerFeatures=QE;function XE(t,e){return function(n){return e(t(n))}}zt.combineClientFeatures=XE;function ZE(t,e){return function(n){return e(t(n))}}zt.combineWindowFeatures=ZE;function eS(t,e){return function(n){return e(t(n))}}zt.combineWorkspaceFeatures=eS;function tS(t,e){return function(n){return e(t(n))}}zt.combineLanguagesFeatures=tS;function nS(t,e){return function(n){return e(t(n))}}zt.combineNotebooksFeatures=nS;function uB(t,e){function n(i,s,a){return i&&s?a(i,s):i||s}return{__brand:"features",console:n(t.console,e.console,GE),tracer:n(t.tracer,e.tracer,QE),telemetry:n(t.telemetry,e.telemetry,JE),client:n(t.client,e.client,XE),window:n(t.window,e.window,ZE),workspace:n(t.workspace,e.workspace,eS),languages:n(t.languages,e.languages,tS),notebooks:n(t.notebooks,e.notebooks,nS)}}zt.combineFeatures=uB;function cB(t,e,n){const r=n&&n.console?new(n.console(ME)):new ME,i=t(r);r.rawAttach(i);const s=n&&n.tracer?new(n.tracer(UE)):new UE,a=n&&n.telemetry?new(n.telemetry(VE)):new VE,c=n&&n.client?new(n.client(qE)):new qE,l=n&&n.window?new(n.window(LE)):new LE,d=n&&n.workspace?new(n.workspace(WE)):new WE,h=n&&n.languages?new(n.languages(KE)):new KE,m=n&&n.notebooks?new(n.notebooks(YE)):new YE,E=[r,s,a,c,l,d,h,m];function k(S){return S instanceof Promise?S:vi.thenable(S)?new Promise((y,D)=>{S.then(v=>y(v),v=>D(v))}):Promise.resolve(S)}let R,P,A,N={listen:()=>i.listen(),sendRequest:(S,...y)=>i.sendRequest(vi.string(S)?S:S.method,...y),onRequest:(S,y)=>i.onRequest(S,y),sendNotification:(S,y)=>{const D=vi.string(S)?S:S.method;return i.sendNotification(D,y)},onNotification:(S,y)=>i.onNotification(S,y),onProgress:i.onProgress,sendProgress:i.sendProgress,onInitialize:S=>(P=S,{dispose:()=>{P=void 0}}),onInitialized:S=>i.onNotification(xe.InitializedNotification.type,S),onShutdown:S=>(R=S,{dispose:()=>{R=void 0}}),onExit:S=>(A=S,{dispose:()=>{A=void 0}}),get console(){return r},get telemetry(){return a},get tracer(){return s},get client(){return c},get window(){return l},get workspace(){return d},get languages(){return h},get notebooks(){return m},onDidChangeConfiguration:S=>i.onNotification(xe.DidChangeConfigurationNotification.type,S),onDidChangeWatchedFiles:S=>i.onNotification(xe.DidChangeWatchedFilesNotification.type,S),__textDocumentSync:void 0,onDidOpenTextDocument:S=>i.onNotification(xe.DidOpenTextDocumentNotification.type,S),onDidChangeTextDocument:S=>i.onNotification(xe.DidChangeTextDocumentNotification.type,S),onDidCloseTextDocument:S=>i.onNotification(xe.DidCloseTextDocumentNotification.type,S),onWillSaveTextDocument:S=>i.onNotification(xe.WillSaveTextDocumentNotification.type,S),onWillSaveTextDocumentWaitUntil:S=>i.onRequest(xe.WillSaveTextDocumentWaitUntilRequest.type,S),onDidSaveTextDocument:S=>i.onNotification(xe.DidSaveTextDocumentNotification.type,S),sendDiagnostics:S=>i.sendNotification(xe.PublishDiagnosticsNotification.type,S),onHover:S=>i.onRequest(xe.HoverRequest.type,(y,D)=>S(y,D,(0,vt.attachWorkDone)(i,y),void 0)),onCompletion:S=>i.onRequest(xe.CompletionRequest.type,(y,D)=>S(y,D,(0,vt.attachWorkDone)(i,y),(0,vt.attachPartialResult)(i,y))),onCompletionResolve:S=>i.onRequest(xe.CompletionResolveRequest.type,S),onSignatureHelp:S=>i.onRequest(xe.SignatureHelpRequest.type,(y,D)=>S(y,D,(0,vt.attachWorkDone)(i,y),void 0)),onDeclaration:S=>i.onRequest(xe.DeclarationRequest.type,(y,D)=>S(y,D,(0,vt.attachWorkDone)(i,y),(0,vt.attachPartialResult)(i,y))),onDefinition:S=>i.onRequest(xe.DefinitionRequest.type,(y,D)=>S(y,D,(0,vt.attachWorkDone)(i,y),(0,vt.attachPartialResult)(i,y))),onTypeDefinition:S=>i.onRequest(xe.TypeDefinitionRequest.type,(y,D)=>S(y,D,(0,vt.attachWorkDone)(i,y),(0,vt.attachPartialResult)(i,y))),onImplementation:S=>i.onRequest(xe.ImplementationRequest.type,(y,D)=>S(y,D,(0,vt.attachWorkDone)(i,y),(0,vt.attachPartialResult)(i,y))),onReferences:S=>i.onRequest(xe.ReferencesRequest.type,(y,D)=>S(y,D,(0,vt.attachWorkDone)(i,y),(0,vt.attachPartialResult)(i,y))),onDocumentHighlight:S=>i.onRequest(xe.DocumentHighlightRequest.type,(y,D)=>S(y,D,(0,vt.attachWorkDone)(i,y),(0,vt.attachPartialResult)(i,y))),onDocumentSymbol:S=>i.onRequest(xe.DocumentSymbolRequest.type,(y,D)=>S(y,D,(0,vt.attachWorkDone)(i,y),(0,vt.attachPartialResult)(i,y))),onWorkspaceSymbol:S=>i.onRequest(xe.WorkspaceSymbolRequest.type,(y,D)=>S(y,D,(0,vt.attachWorkDone)(i,y),(0,vt.attachPartialResult)(i,y))),onWorkspaceSymbolResolve:S=>i.onRequest(xe.WorkspaceSymbolResolveRequest.type,S),onCodeAction:S=>i.onRequest(xe.CodeActionRequest.type,(y,D)=>S(y,D,(0,vt.attachWorkDone)(i,y),(0,vt.attachPartialResult)(i,y))),onCodeActionResolve:S=>i.onRequest(xe.CodeActionResolveRequest.type,(y,D)=>S(y,D)),onCodeLens:S=>i.onRequest(xe.CodeLensRequest.type,(y,D)=>S(y,D,(0,vt.attachWorkDone)(i,y),(0,vt.attachPartialResult)(i,y))),onCodeLensResolve:S=>i.onRequest(xe.CodeLensResolveRequest.type,(y,D)=>S(y,D)),onDocumentFormatting:S=>i.onRequest(xe.DocumentFormattingRequest.type,(y,D)=>S(y,D,(0,vt.attachWorkDone)(i,y),void 0)),onDocumentRangeFormatting:S=>i.onRequest(xe.DocumentRangeFormattingRequest.type,(y,D)=>S(y,D,(0,vt.attachWorkDone)(i,y),void 0)),onDocumentOnTypeFormatting:S=>i.onRequest(xe.DocumentOnTypeFormattingRequest.type,(y,D)=>S(y,D)),onRenameRequest:S=>i.onRequest(xe.RenameRequest.type,(y,D)=>S(y,D,(0,vt.attachWorkDone)(i,y),void 0)),onPrepareRename:S=>i.onRequest(xe.PrepareRenameRequest.type,(y,D)=>S(y,D)),onDocumentLinks:S=>i.onRequest(xe.DocumentLinkRequest.type,(y,D)=>S(y,D,(0,vt.attachWorkDone)(i,y),(0,vt.attachPartialResult)(i,y))),onDocumentLinkResolve:S=>i.onRequest(xe.DocumentLinkResolveRequest.type,(y,D)=>S(y,D)),onDocumentColor:S=>i.onRequest(xe.DocumentColorRequest.type,(y,D)=>S(y,D,(0,vt.attachWorkDone)(i,y),(0,vt.attachPartialResult)(i,y))),onColorPresentation:S=>i.onRequest(xe.ColorPresentationRequest.type,(y,D)=>S(y,D,(0,vt.attachWorkDone)(i,y),(0,vt.attachPartialResult)(i,y))),onFoldingRanges:S=>i.onRequest(xe.FoldingRangeRequest.type,(y,D)=>S(y,D,(0,vt.attachWorkDone)(i,y),(0,vt.attachPartialResult)(i,y))),onSelectionRanges:S=>i.onRequest(xe.SelectionRangeRequest.type,(y,D)=>S(y,D,(0,vt.attachWorkDone)(i,y),(0,vt.attachPartialResult)(i,y))),onExecuteCommand:S=>i.onRequest(xe.ExecuteCommandRequest.type,(y,D)=>S(y,D,(0,vt.attachWorkDone)(i,y),void 0)),dispose:()=>i.dispose()};for(let S of E)S.attach(N);return i.onRequest(xe.InitializeRequest.type,S=>{e.initialize(S),vi.string(S.trace)&&(s.trace=xe.Trace.fromString(S.trace));for(let y of E)y.initialize(S.capabilities);if(P){let y=P(S,new xe.CancellationTokenSource().token,(0,vt.attachWorkDone)(i,S),void 0);return k(y).then(D=>{if(D instanceof xe.ResponseError)return D;let v=D;v||(v={capabilities:{}});let _=v.capabilities;_||(_={},v.capabilities=_),_.textDocumentSync===void 0||_.textDocumentSync===null?_.textDocumentSync=vi.number(N.__textDocumentSync)?N.__textDocumentSync:xe.TextDocumentSyncKind.None:!vi.number(_.textDocumentSync)&&!vi.number(_.textDocumentSync.change)&&(_.textDocumentSync.change=vi.number(N.__textDocumentSync)?N.__textDocumentSync:xe.TextDocumentSyncKind.None);for(let $ of E)$.fillServerCapabilities(_);return v})}else{let y={capabilities:{textDocumentSync:xe.TextDocumentSyncKind.None}};for(let D of E)D.fillServerCapabilities(y.capabilities);return y}}),i.onRequest(xe.ShutdownRequest.type,()=>{if(e.shutdownReceived=!0,R)return R(new xe.CancellationTokenSource().token)}),i.onNotification(xe.ExitNotification.type,()=>{try{A&&A()}finally{e.shutdownReceived?e.exit(0):e.exit(1)}}),i.onNotification(xe.SetTraceNotification.type,S=>{s.trace=xe.Trace.fromString(S.value)}),N}zt.createConnection=cB,function(t){var e=Vt&&Vt.__createBinding||(Object.create?function(l,d,h,m){m===void 0&&(m=h);var E=Object.getOwnPropertyDescriptor(d,h);(!E||("get"in E?!d.__esModule:E.writable||E.configurable))&&(E={enumerable:!0,get:function(){return d[h]}}),Object.defineProperty(l,m,E)}:function(l,d,h,m){m===void 0&&(m=h),l[m]=d[h]}),n=Vt&&Vt.__exportStar||function(l,d){for(var h in l)h!=="default"&&!Object.prototype.hasOwnProperty.call(d,h)&&e(d,l,h)};Object.defineProperty(t,"__esModule",{value:!0}),t.ProposedFeatures=t.NotebookDocuments=t.TextDocuments=t.SemanticTokensBuilder=void 0;const r=Ps;Object.defineProperty(t,"SemanticTokensBuilder",{enumerable:!0,get:function(){return r.SemanticTokensBuilder}});const i=_h;n(Ln,t);const s=gl;Object.defineProperty(t,"TextDocuments",{enumerable:!0,get:function(){return s.TextDocuments}});const a=Da;Object.defineProperty(t,"NotebookDocuments",{enumerable:!0,get:function(){return a.NotebookDocuments}}),n(zt,t);var c;(function(l){l.all={__brand:"features",languages:i.InlineCompletionFeature}})(c||(t.ProposedFeatures=c={}))}(E0),function(t){var e=Vt&&Vt.__createBinding||(Object.create?function(c,l,d,h){h===void 0&&(h=d);var m=Object.getOwnPropertyDescriptor(l,d);(!m||("get"in m?!l.__esModule:m.writable||m.configurable))&&(m={enumerable:!0,get:function(){return l[d]}}),Object.defineProperty(c,h,m)}:function(c,l,d,h){h===void 0&&(h=d),c[h]=l[d]}),n=Vt&&Vt.__exportStar||function(c,l){for(var d in c)d!=="default"&&!Object.prototype.hasOwnProperty.call(l,d)&&e(l,c,d)};Object.defineProperty(t,"__esModule",{value:!0}),t.createConnection=void 0;const r=E0;n(si.exports,t),n(E0,t);let i=!1;const s={initialize:c=>{},get shutdownReceived(){return i},set shutdownReceived(c){i=c},exit:c=>{}};function a(c,l,d,h){let m,E,k,R;c!==void 0&&c.__brand==="features"&&(m=c,c=l,l=d,d=h),r.ConnectionStrategy.is(c)||r.ConnectionOptions.is(c)?R=c:(E=c,k=l,R=d);const P=A=>(0,r.createProtocolConnection)(E,k,A,R);return(0,r.createConnection)(P,s,m)}t.createConnection=a}(xr);var rS;(function(t){t.type=new xr.NotificationType("json/schemaAssociations")})(rS||(rS={}));var iS;(function(t){t.type=new xr.NotificationType("yaml/registerCustomSchemaRequest")})(iS||(iS={}));var sS;(function(t){t.type=new xr.NotificationType("yaml/registerContentRequest")})(sS||(sS={}));var oS;(function(t){t.type=new xr.NotificationType("yaml/resultLimitReached")})(oS||(oS={}));var aS;(function(t){t.type=new xr.RequestType("vscode/content")})(aS||(aS={}));var uS;(function(t){t.type=new xr.RequestType("custom/schema/content")})(uS||(uS={}));var cS;(function(t){t.type=new xr.RequestType("custom/schema/request")})(cS||(cS={}));var lS;(function(t){t.type=new xr.RequestType("json/colorSymbols")})(lS||(lS={}));var fS;(function(t){t.type=new xr.RequestType("json/schema/modify")})(fS||(fS={}));var Mh;(function(t){t.type=new xr.NotificationType("yaml/supportSchemaSelection"),t.getSchema=new xr.RequestType("yaml/get/jsonSchema"),t.getAllSchemas=new xr.RequestType("yaml/get/all/jsonSchemas"),t.schemaStoreInitialized=new xr.NotificationType("yaml/schema/store/initialized")})(Mh||(Mh={}));class lB{constructor(e,n,r){var i,s;this.schemaService=e,this.yamlSettings=n,this.connection=r,(i=this.connection)==null||i.onRequest(Mh.getSchema,a=>this.getSchemas(a)),(s=this.connection)==null||s.onRequest(Mh.getAllSchemas,a=>this.getAllSchemas(a))}async getSchemas(e){const n=await this.getSchemasForFile(e);return Array.from(n).map(r=>({name:r[1].title,uri:r[0],description:r[1].description,versions:r[1].versions}))}async getSchemasForFile(e){var s;const n=(s=this.yamlSettings)==null?void 0:s.documents.get(e),r=new Map;if(!n)return r;const i=di.getYamlDocument(n);for(const a of i.documents){const c=await this.schemaService.getSchemaForResource(n.uri,a);if(c!=null&&c.schema){const l=wE(c==null?void 0:c.schema);if(l.size===0)continue;for(const d of l)r.set(d[0],d[1])}}return r}async getAllSchemas(e){const n=await this.getSchemasForFile(e),r=Array.from(n.entries()).map(a=>({uri:a[0],fromStore:!1,usedForCurrentFile:!0,name:a[1].title,description:a[1].description,versions:a[1].versions})),i=[];let s=this.schemaService.getAllSchemas();return s=s.filter(a=>!n.has(a.uri)),i.push(...r),i.push(...s),i}}class fB{constructor(e){this.telemetry=e}getDefinition(e,n){var r;try{const i=di.getYamlDocument(e),s=e.offsetAt(n.position),a=md(s,i);if(a){const[c]=a.getNodeFromPosition(s,new sa(e));if(c&&ts(c)){const l=c.resolve(a.internalDocument);if(l&&l.range){const d=ot.create(e.positionAt(l.range[0]),e.positionAt(l.range[2])),h=ot.create(e.positionAt(l.range[0]),e.positionAt(l.range[1]));return[df.create(e.uri,d,h)]}}}}catch(i){(r=this.telemetry)==null||r.sendError("yaml.definition.error",i)}}}function dB(t,e){const n=di.getYamlDocument(t);return e.map(a=>{const c=r(a);let l;for(const d of c)l=kc.create(d,l);return l!=null?l:kc.create({start:a,end:a})});function r(a){const c=t.offsetAt(a),l=[];for(const d of n.documents){let h,m;for(d.visit(E=>{const k=E.offset+E.length;if(kc){const P=i(E,a);if(!P||P>c)return!0;R=P}return(!h||R>=h.offset)&&(h=E,m=R),!0});h;){const E=m!=null?m:h.offset,k=h.offset+h.length,R={start:t.positionAt(E),end:t.positionAt(k)},P=t.getText(R),A=hB(P),N=E+A.length;N>=c&&(R.end=t.positionAt(N));const S=(y,D)=>A.startsWith(y)&&A.endsWith(D||y);(h.type==="string"&&(S("'")||S('"'))||h.type==="object"&&S("{","}")||h.type==="array"&&S("[","]"))&&l.push({start:t.positionAt(E+1),end:t.positionAt(k-1)}),l.push(R),h=h.parent,m=void 0}if(l.length>0)break}return l.reverse()}function i(a,c){var d;const l=t.positionAt(a.offset);if(l.line===c.line){if(((d=a.parent)==null?void 0:d.type)==="array"&&s(a.offset-2,a.offset)==="- ")return a.offset-2;if(a.type==="array"||a.type==="object"){const h={line:l.line,character:0};if(t.getText({start:h,end:l}).trim().length===0)return t.offsetAt(h)}}}function s(a,c){return t.getText({start:t.positionAt(a),end:t.positionAt(c)})}}function hB(t){return t.endsWith(`\r +\r\v":{[,]}`.indexOf(i.charAt(r))===-1;)r--;return i.substring(r+1,n)}fromMarkup(e){if(e&&this.doesSupportMarkdown())return{kind:Ji.Markdown,value:e}}doesSupportMarkdown(){if(this.supportsMarkdown===void 0){const e=this.clientCapabilities.textDocument&&this.clientCapabilities.textDocument.completion;this.supportsMarkdown=e&&e.completionItem&&Array.isArray(e.completionItem.documentationFormat)&&e.completionItem.documentationFormat.indexOf(Ji.Markdown)!==-1}return this.supportsMarkdown}findItemAtOffset(e,n,r){for(let i=e.items.length-1;i>=0;i--){const s=e.items[i];if(on(s)&&s.range){if(r>s.range[1])return i;if(r>=s.range[0])return i}}return 0}}const ix=/^\d+$/;function Dh(t){let e;if(typeof t=="string"?e=t:e=""+t,e.length===0)return e;if(e==="true"||e==="false"||e==="null"||ix.test(e))return`"${e}"`;e.indexOf('"')!==-1&&(e=e.replace($E,'"'));let n=!isNaN(parseInt(e))||e.charAt(0)==="@";if(!n){let r=e.indexOf(":",0);for(;r>0&&rclass extends t{get semanticTokens(){return{refresh:()=>this.connection.sendRequest(wh.SemanticTokensRefreshRequest.type),on:e=>{const n=wh.SemanticTokensRequest.type;return this.connection.onRequest(n,(r,i)=>e(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onDelta:e=>{const n=wh.SemanticTokensDeltaRequest.type;return this.connection.onRequest(n,(r,i)=>e(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onRange:e=>{const n=wh.SemanticTokensRangeRequest.type;return this.connection.onRequest(n,(r,i)=>e(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};Ps.SemanticTokensFeature=ax;class SE{constructor(e,n){this.originalSequence=e,this.modifiedSequence=n}computeDiff(){const e=this.originalSequence.length,n=this.modifiedSequence.length;let r=0;for(;r=r&&s>=r&&this.originalSequence[i]===this.modifiedSequence[s];)i--,s--;(i0&&(a-=this._prevLine,a===0&&(c-=this._prevChar)),this._data[this._dataLen++]=a,this._data[this._dataLen++]=c,this._data[this._dataLen++]=r,this._data[this._dataLen++]=i,this._data[this._dataLen++]=s,this._prevLine=e,this._prevChar=n}get id(){return this._id.toString()}previousResult(e){this.id===e&&(this._prevData=this._data),this.initialize()}build(){return this._prevData=void 0,{resultId:this.id,data:this._data}}canBuildEdits(){return this._prevData!==void 0}buildEdits(){return this._prevData!==void 0?{resultId:this.id,edits:new SE(this._prevData,this._data).computeDiff()}:this.build()}}Ps.SemanticTokensBuilder=ux;var _h={};Object.defineProperty(_h,"__esModule",{value:!0}),_h.InlineCompletionFeature=void 0;const cx=Ln,lx=t=>class extends t{get inlineCompletion(){return{on:e=>this.connection.onRequest(cx.InlineCompletionRequest.type,(n,r)=>e(n,r,this.attachWorkDoneProgress(n)))}}};_h.InlineCompletionFeature=lx;var yl={};Object.defineProperty(yl,"__esModule",{value:!0}),yl.TextDocuments=void 0;const ba=Ln;class fx{constructor(e){this._configuration=e,this._syncedDocuments=new Map,this._onDidChangeContent=new ba.Emitter,this._onDidOpen=new ba.Emitter,this._onDidClose=new ba.Emitter,this._onDidSave=new ba.Emitter,this._onWillSave=new ba.Emitter}get onDidOpen(){return this._onDidOpen.event}get onDidChangeContent(){return this._onDidChangeContent.event}get onWillSave(){return this._onWillSave.event}onWillSaveWaitUntil(e){this._willSaveWaitUntil=e}get onDidSave(){return this._onDidSave.event}get onDidClose(){return this._onDidClose.event}get(e){return this._syncedDocuments.get(e)}all(){return Array.from(this._syncedDocuments.values())}keys(){return Array.from(this._syncedDocuments.keys())}listen(e){e.__textDocumentSync=ba.TextDocumentSyncKind.Incremental;const n=[];return n.push(e.onDidOpenTextDocument(r=>{const i=r.textDocument,s=this._configuration.create(i.uri,i.languageId,i.version,i.text);this._syncedDocuments.set(i.uri,s);const a=Object.freeze({document:s});this._onDidOpen.fire(a),this._onDidChangeContent.fire(a)})),n.push(e.onDidChangeTextDocument(r=>{const i=r.textDocument,s=r.contentChanges;if(s.length===0)return;const{version:a}=i;if(a==null)throw new Error(`Received document change event for ${i.uri} without valid version identifier`);let c=this._syncedDocuments.get(i.uri);c!==void 0&&(c=this._configuration.update(c,s,a),this._syncedDocuments.set(i.uri,c),this._onDidChangeContent.fire(Object.freeze({document:c})))})),n.push(e.onDidCloseTextDocument(r=>{let i=this._syncedDocuments.get(r.textDocument.uri);i!==void 0&&(this._syncedDocuments.delete(r.textDocument.uri),this._onDidClose.fire(Object.freeze({document:i})))})),n.push(e.onWillSaveTextDocument(r=>{let i=this._syncedDocuments.get(r.textDocument.uri);i!==void 0&&this._onWillSave.fire(Object.freeze({document:i,reason:r.reason}))})),n.push(e.onWillSaveTextDocumentWaitUntil((r,i)=>{let s=this._syncedDocuments.get(r.textDocument.uri);return s!==void 0&&this._willSaveWaitUntil?this._willSaveWaitUntil(Object.freeze({document:s,reason:r.reason}),i):[]})),n.push(e.onDidSaveTextDocument(r=>{let i=this._syncedDocuments.get(r.textDocument.uri);i!==void 0&&this._onDidSave.fire(Object.freeze({document:i}))})),ba.Disposable.create(()=>{n.forEach(r=>r.dispose())})}}yl.TextDocuments=fx;var Da={};Object.defineProperty(Da,"__esModule",{value:!0}),Da.NotebookDocuments=Da.NotebookSyncFeature=void 0;const yi=Ln,kE=yl,dx=t=>class extends t{get synchronization(){return{onDidOpenNotebookDocument:e=>this.connection.onNotification(yi.DidOpenNotebookDocumentNotification.type,n=>{e(n)}),onDidChangeNotebookDocument:e=>this.connection.onNotification(yi.DidChangeNotebookDocumentNotification.type,n=>{e(n)}),onDidSaveNotebookDocument:e=>this.connection.onNotification(yi.DidSaveNotebookDocumentNotification.type,n=>{e(n)}),onDidCloseNotebookDocument:e=>this.connection.onNotification(yi.DidCloseNotebookDocumentNotification.type,n=>{e(n)})}}};Da.NotebookSyncFeature=dx;class Bu{onDidOpenTextDocument(e){return this.openHandler=e,yi.Disposable.create(()=>{this.openHandler=void 0})}openTextDocument(e){this.openHandler&&this.openHandler(e)}onDidChangeTextDocument(e){return this.changeHandler=e,yi.Disposable.create(()=>{this.changeHandler=e})}changeTextDocument(e){this.changeHandler&&this.changeHandler(e)}onDidCloseTextDocument(e){return this.closeHandler=e,yi.Disposable.create(()=>{this.closeHandler=void 0})}closeTextDocument(e){this.closeHandler&&this.closeHandler(e)}onWillSaveTextDocument(){return Bu.NULL_DISPOSE}onWillSaveTextDocumentWaitUntil(){return Bu.NULL_DISPOSE}onDidSaveTextDocument(){return Bu.NULL_DISPOSE}}Bu.NULL_DISPOSE=Object.freeze({dispose:()=>{}});class hx{constructor(e){e instanceof kE.TextDocuments?this._cellTextDocuments=e:this._cellTextDocuments=new kE.TextDocuments(e),this.notebookDocuments=new Map,this.notebookCellMap=new Map,this._onDidOpen=new yi.Emitter,this._onDidChange=new yi.Emitter,this._onDidSave=new yi.Emitter,this._onDidClose=new yi.Emitter}get cellTextDocuments(){return this._cellTextDocuments}getCellTextDocument(e){return this._cellTextDocuments.get(e.document)}getNotebookDocument(e){return this.notebookDocuments.get(e)}getNotebookCell(e){const n=this.notebookCellMap.get(e);return n&&n[0]}findNotebookDocumentForCell(e){const n=typeof e=="string"?e:e.document,r=this.notebookCellMap.get(n);return r&&r[1]}get onDidOpen(){return this._onDidOpen.event}get onDidSave(){return this._onDidSave.event}get onDidChange(){return this._onDidChange.event}get onDidClose(){return this._onDidClose.event}listen(e){const n=new Bu,r=[];return r.push(this.cellTextDocuments.listen(n)),r.push(e.notebooks.synchronization.onDidOpenNotebookDocument(i=>{this.notebookDocuments.set(i.notebookDocument.uri,i.notebookDocument);for(const s of i.cellTextDocuments)n.openTextDocument({textDocument:s});this.updateCellMap(i.notebookDocument),this._onDidOpen.fire(i.notebookDocument)})),r.push(e.notebooks.synchronization.onDidChangeNotebookDocument(i=>{const s=this.notebookDocuments.get(i.notebookDocument.uri);if(s===void 0)return;s.version=i.notebookDocument.version;const a=s.metadata;let c=!1;const l=i.change;l.metadata!==void 0&&(c=!0,s.metadata=l.metadata);const d=[],h=[],m=[],E=[];if(l.cells!==void 0){const F=l.cells;if(F.structure!==void 0){const S=F.structure.array;if(s.cells.splice(S.start,S.deleteCount,...S.cells!==void 0?S.cells:[]),F.structure.didOpen!==void 0)for(const y of F.structure.didOpen)n.openTextDocument({textDocument:y}),d.push(y.uri);if(F.structure.didClose)for(const y of F.structure.didClose)n.closeTextDocument({textDocument:y}),h.push(y.uri)}if(F.data!==void 0){const S=new Map(F.data.map(y=>[y.document,y]));for(let y=0;y<=s.cells.length;y++){const D=S.get(s.cells[y].document);if(D!==void 0){const v=s.cells.splice(y,1,D);if(m.push({old:v[0],new:D}),S.delete(D.document),S.size===0)break}}}if(F.textContent!==void 0)for(const S of F.textContent)n.changeTextDocument({textDocument:S.document,contentChanges:S.changes}),E.push(S.document.uri)}this.updateCellMap(s);const T={notebookDocument:s};c&&(T.metadata={old:a,new:s.metadata});const R=[];for(const F of d)R.push(this.getNotebookCell(F));const P=[];for(const F of h)P.push(this.getNotebookCell(F));const A=[];for(const F of E)A.push(this.getNotebookCell(F));(R.length>0||P.length>0||m.length>0||A.length>0)&&(T.cells={added:R,removed:P,changed:{data:m,textContent:A}}),(T.metadata!==void 0||T.cells!==void 0)&&this._onDidChange.fire(T)})),r.push(e.notebooks.synchronization.onDidSaveNotebookDocument(i=>{const s=this.notebookDocuments.get(i.notebookDocument.uri);s!==void 0&&this._onDidSave.fire(s)})),r.push(e.notebooks.synchronization.onDidCloseNotebookDocument(i=>{const s=this.notebookDocuments.get(i.notebookDocument.uri);if(s!==void 0){this._onDidClose.fire(s);for(const a of i.cellTextDocuments)n.closeTextDocument({textDocument:a});this.notebookDocuments.delete(i.notebookDocument.uri);for(const a of s.cells)this.notebookCellMap.delete(a.document)}})),yi.Disposable.create(()=>{r.forEach(i=>i.dispose())})}updateCellMap(e){for(const n of e.cells)this.notebookCellMap.set(n.document,[n,e])}}Da.NotebookDocuments=hx;var zt={},Un={};Object.defineProperty(Un,"__esModule",{value:!0}),Un.thenable=Un.typedArray=Un.stringArray=Un.array=Un.func=Un.error=Un.number=Un.string=Un.boolean=void 0;function px(t){return t===!0||t===!1}Un.boolean=px;function TE(t){return typeof t=="string"||t instanceof String}Un.string=TE;function mx(t){return typeof t=="number"||t instanceof Number}Un.number=mx;function gx(t){return t instanceof Error}Un.error=gx;function AE(t){return typeof t=="function"}Un.func=AE;function CE(t){return Array.isArray(t)}Un.array=CE;function yx(t){return CE(t)&&t.every(e=>TE(e))}Un.stringArray=yx;function vx(t,e){return Array.isArray(t)&&t.every(e)}Un.typedArray=vx;function bx(t){return t&&AE(t.then)}Un.thenable=bx;var Xr={};Object.defineProperty(Xr,"__esModule",{value:!0}),Xr.generateUuid=Xr.parse=Xr.isUUID=Xr.v4=Xr.empty=void 0;class S0{constructor(e){this._value=e}asHex(){return this._value}equals(e){return this.asHex()===e.asHex()}}class Ot extends S0{static _oneOf(e){return e[Math.floor(e.length*Math.random())]}static _randomHex(){return Ot._oneOf(Ot._chars)}constructor(){super([Ot._randomHex(),Ot._randomHex(),Ot._randomHex(),Ot._randomHex(),Ot._randomHex(),Ot._randomHex(),Ot._randomHex(),Ot._randomHex(),"-",Ot._randomHex(),Ot._randomHex(),Ot._randomHex(),Ot._randomHex(),"-","4",Ot._randomHex(),Ot._randomHex(),Ot._randomHex(),"-",Ot._oneOf(Ot._timeHighBits),Ot._randomHex(),Ot._randomHex(),Ot._randomHex(),"-",Ot._randomHex(),Ot._randomHex(),Ot._randomHex(),Ot._randomHex(),Ot._randomHex(),Ot._randomHex(),Ot._randomHex(),Ot._randomHex(),Ot._randomHex(),Ot._randomHex(),Ot._randomHex(),Ot._randomHex()].join(""))}}Ot._chars=["0","1","2","3","4","5","6","6","7","8","9","a","b","c","d","e","f"],Ot._timeHighBits=["8","9","a","b"],Xr.empty=new S0("00000000-0000-0000-0000-000000000000");function OE(){return new Ot}Xr.v4=OE;const Dx=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function PE(t){return Dx.test(t)}Xr.isUUID=PE;function wx(t){if(!PE(t))throw new Error("invalid uuid");return new S0(t)}Xr.parse=wx;function _x(){return OE().asHex()}Xr.generateUuid=_x;var wo={};Object.defineProperty(wo,"__esModule",{value:!0}),wo.attachPartialResult=wo.ProgressFeature=wo.attachWorkDone=void 0;const _o=Ln,$x=Xr;class $o{constructor(e,n){this._connection=e,this._token=n,$o.Instances.set(this._token,this)}begin(e,n,r,i){let s={kind:"begin",title:e,percentage:n,message:r,cancellable:i};this._connection.sendProgress(_o.WorkDoneProgress.type,this._token,s)}report(e,n){let r={kind:"report"};typeof e=="number"?(r.percentage=e,n!==void 0&&(r.message=n)):r.message=e,this._connection.sendProgress(_o.WorkDoneProgress.type,this._token,r)}done(){$o.Instances.delete(this._token),this._connection.sendProgress(_o.WorkDoneProgress.type,this._token,{kind:"end"})}}$o.Instances=new Map;class NE extends $o{constructor(e,n){super(e,n),this._source=new _o.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose(),super.done()}cancel(){this._source.cancel()}}class k0{constructor(){}begin(){}report(){}done(){}}class FE extends k0{constructor(){super(),this._source=new _o.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose()}cancel(){this._source.cancel()}}function Ex(t,e){if(e===void 0||e.workDoneToken===void 0)return new k0;const n=e.workDoneToken;return delete e.workDoneToken,new $o(t,n)}wo.attachWorkDone=Ex;const Sx=t=>class extends t{constructor(){super(),this._progressSupported=!1}initialize(e){var n;super.initialize(e),((n=e==null?void 0:e.window)==null?void 0:n.workDoneProgress)===!0&&(this._progressSupported=!0,this.connection.onNotification(_o.WorkDoneProgressCancelNotification.type,r=>{let i=$o.Instances.get(r.token);(i instanceof NE||i instanceof FE)&&i.cancel()}))}attachWorkDoneProgress(e){return e===void 0?new k0:new $o(this.connection,e)}createWorkDoneProgress(){if(this._progressSupported){const e=(0,$x.generateUuid)();return this.connection.sendRequest(_o.WorkDoneProgressCreateRequest.type,{token:e}).then(()=>new NE(this.connection,e))}else return Promise.resolve(new FE)}};wo.ProgressFeature=Sx;var T0;(function(t){t.type=new _o.ProgressType})(T0||(T0={}));class kx{constructor(e,n){this._connection=e,this._token=n}report(e){this._connection.sendProgress(T0.type,this._token,e)}}function Tx(t,e){if(e===void 0||e.partialResultToken===void 0)return;const n=e.partialResultToken;return delete e.partialResultToken,new kx(t,n)}wo.attachPartialResult=Tx;var $h={};Object.defineProperty($h,"__esModule",{value:!0}),$h.ConfigurationFeature=void 0;const Ax=Ln,Cx=Un,Ox=t=>class extends t{getConfiguration(e){return e?Cx.string(e)?this._getConfiguration({section:e}):this._getConfiguration(e):this._getConfiguration({})}_getConfiguration(e){let n={items:Array.isArray(e)?e:[e]};return this.connection.sendRequest(Ax.ConfigurationRequest.type,n).then(r=>Array.isArray(r)?Array.isArray(e)?r:r[0]:Array.isArray(e)?[]:null)}};$h.ConfigurationFeature=Ox;var Eh={};Object.defineProperty(Eh,"__esModule",{value:!0}),Eh.WorkspaceFoldersFeature=void 0;const Sh=Ln,Px=t=>class extends t{constructor(){super(),this._notificationIsAutoRegistered=!1}initialize(e){super.initialize(e);let n=e.workspace;n&&n.workspaceFolders&&(this._onDidChangeWorkspaceFolders=new Sh.Emitter,this.connection.onNotification(Sh.DidChangeWorkspaceFoldersNotification.type,r=>{this._onDidChangeWorkspaceFolders.fire(r.event)}))}fillServerCapabilities(e){var r,i;super.fillServerCapabilities(e);const n=(i=(r=e.workspace)==null?void 0:r.workspaceFolders)==null?void 0:i.changeNotifications;this._notificationIsAutoRegistered=n===!0||typeof n=="string"}getWorkspaceFolders(){return this.connection.sendRequest(Sh.WorkspaceFoldersRequest.type)}get onDidChangeWorkspaceFolders(){if(!this._onDidChangeWorkspaceFolders)throw new Error("Client doesn't support sending workspace folder change events.");return!this._notificationIsAutoRegistered&&!this._unregistration&&(this._unregistration=this.connection.client.register(Sh.DidChangeWorkspaceFoldersNotification.type)),this._onDidChangeWorkspaceFolders.event}};Eh.WorkspaceFoldersFeature=Px;var kh={};Object.defineProperty(kh,"__esModule",{value:!0}),kh.CallHierarchyFeature=void 0;const A0=Ln,Nx=t=>class extends t{get callHierarchy(){return{onPrepare:e=>this.connection.onRequest(A0.CallHierarchyPrepareRequest.type,(n,r)=>e(n,r,this.attachWorkDoneProgress(n),void 0)),onIncomingCalls:e=>{const n=A0.CallHierarchyIncomingCallsRequest.type;return this.connection.onRequest(n,(r,i)=>e(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onOutgoingCalls:e=>{const n=A0.CallHierarchyOutgoingCallsRequest.type;return this.connection.onRequest(n,(r,i)=>e(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};kh.CallHierarchyFeature=Nx;var Th={};Object.defineProperty(Th,"__esModule",{value:!0}),Th.ShowDocumentFeature=void 0;const Fx=Ln,Rx=t=>class extends t{showDocument(e){return this.connection.sendRequest(Fx.ShowDocumentRequest.type,e)}};Th.ShowDocumentFeature=Rx;var Ah={};Object.defineProperty(Ah,"__esModule",{value:!0}),Ah.FileOperationsFeature=void 0;const qu=Ln,Ix=t=>class extends t{onDidCreateFiles(e){return this.connection.onNotification(qu.DidCreateFilesNotification.type,n=>{e(n)})}onDidRenameFiles(e){return this.connection.onNotification(qu.DidRenameFilesNotification.type,n=>{e(n)})}onDidDeleteFiles(e){return this.connection.onNotification(qu.DidDeleteFilesNotification.type,n=>{e(n)})}onWillCreateFiles(e){return this.connection.onRequest(qu.WillCreateFilesRequest.type,(n,r)=>e(n,r))}onWillRenameFiles(e){return this.connection.onRequest(qu.WillRenameFilesRequest.type,(n,r)=>e(n,r))}onWillDeleteFiles(e){return this.connection.onRequest(qu.WillDeleteFilesRequest.type,(n,r)=>e(n,r))}};Ah.FileOperationsFeature=Ix;var Ch={};Object.defineProperty(Ch,"__esModule",{value:!0}),Ch.LinkedEditingRangeFeature=void 0;const Mx=Ln,Lx=t=>class extends t{onLinkedEditingRange(e){return this.connection.onRequest(Mx.LinkedEditingRangeRequest.type,(n,r)=>e(n,r,this.attachWorkDoneProgress(n),void 0))}};Ch.LinkedEditingRangeFeature=Lx;var Oh={};Object.defineProperty(Oh,"__esModule",{value:!0}),Oh.TypeHierarchyFeature=void 0;const C0=Ln,jx=t=>class extends t{get typeHierarchy(){return{onPrepare:e=>this.connection.onRequest(C0.TypeHierarchyPrepareRequest.type,(n,r)=>e(n,r,this.attachWorkDoneProgress(n),void 0)),onSupertypes:e=>{const n=C0.TypeHierarchySupertypesRequest.type;return this.connection.onRequest(n,(r,i)=>e(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onSubtypes:e=>{const n=C0.TypeHierarchySubtypesRequest.type;return this.connection.onRequest(n,(r,i)=>e(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};Oh.TypeHierarchyFeature=jx;var Ph={};Object.defineProperty(Ph,"__esModule",{value:!0}),Ph.InlineValueFeature=void 0;const RE=Ln,xx=t=>class extends t{get inlineValue(){return{refresh:()=>this.connection.sendRequest(RE.InlineValueRefreshRequest.type),on:e=>this.connection.onRequest(RE.InlineValueRequest.type,(n,r)=>e(n,r,this.attachWorkDoneProgress(n)))}}};Ph.InlineValueFeature=xx;var Nh={};Object.defineProperty(Nh,"__esModule",{value:!0}),Nh.FoldingRangeFeature=void 0;const IE=Ln,Bx=t=>class extends t{get foldingRange(){return{refresh:()=>this.connection.sendRequest(IE.FoldingRangeRefreshRequest.type),on:e=>{const n=IE.FoldingRangeRequest.type;return this.connection.onRequest(n,(r,i)=>e(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};Nh.FoldingRangeFeature=Bx;var Fh={};Object.defineProperty(Fh,"__esModule",{value:!0}),Fh.InlayHintFeature=void 0;const O0=Ln,qx=t=>class extends t{get inlayHint(){return{refresh:()=>this.connection.sendRequest(O0.InlayHintRefreshRequest.type),on:e=>this.connection.onRequest(O0.InlayHintRequest.type,(n,r)=>e(n,r,this.attachWorkDoneProgress(n))),resolve:e=>this.connection.onRequest(O0.InlayHintResolveRequest.type,(n,r)=>e(n,r))}}};Fh.InlayHintFeature=qx;var Rh={};Object.defineProperty(Rh,"__esModule",{value:!0}),Rh.DiagnosticFeature=void 0;const vl=Ln,Wx=t=>class extends t{get diagnostics(){return{refresh:()=>this.connection.sendRequest(vl.DiagnosticRefreshRequest.type),on:e=>this.connection.onRequest(vl.DocumentDiagnosticRequest.type,(n,r)=>e(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(vl.DocumentDiagnosticRequest.partialResult,n))),onWorkspace:e=>this.connection.onRequest(vl.WorkspaceDiagnosticRequest.type,(n,r)=>e(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(vl.WorkspaceDiagnosticRequest.partialResult,n)))}}};Rh.DiagnosticFeature=Wx;var Ih={};Object.defineProperty(Ih,"__esModule",{value:!0}),Ih.MonikerFeature=void 0;const Ux=Ln,Vx=t=>class extends t{get moniker(){return{on:e=>{const n=Ux.MonikerRequest.type;return this.connection.onRequest(n,(r,i)=>e(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};Ih.MonikerFeature=Vx,Object.defineProperty(zt,"__esModule",{value:!0}),zt.createConnection=zt.combineFeatures=zt.combineNotebooksFeatures=zt.combineLanguagesFeatures=zt.combineWorkspaceFeatures=zt.combineWindowFeatures=zt.combineClientFeatures=zt.combineTracerFeatures=zt.combineTelemetryFeatures=zt.combineConsoleFeatures=zt._NotebooksImpl=zt._LanguagesImpl=zt.BulkUnregistration=zt.BulkRegistration=zt.ErrorMessageTracker=void 0;const xe=Ln,vi=Un,P0=Xr,vt=wo,Hx=$h,Kx=Eh,zx=kh,Yx=Ps,Gx=Th,Jx=Ah,Qx=Ch,Xx=Oh,Zx=Ph,eB=Nh,tB=Fh,nB=Rh,rB=Da,iB=Ih;function N0(t){if(t!==null)return t}class sB{constructor(){this._messages=Object.create(null)}add(e){let n=this._messages[e];n||(n=0),n++,this._messages[e]=n}sendErrors(e){Object.keys(this._messages).forEach(n=>{e.window.showErrorMessage(n)})}}zt.ErrorMessageTracker=sB;class ME{constructor(){}rawAttach(e){this._rawConnection=e}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}fillServerCapabilities(e){}initialize(e){}error(e){this.send(xe.MessageType.Error,e)}warn(e){this.send(xe.MessageType.Warning,e)}info(e){this.send(xe.MessageType.Info,e)}log(e){this.send(xe.MessageType.Log,e)}debug(e){this.send(xe.MessageType.Debug,e)}send(e,n){this._rawConnection&&this._rawConnection.sendNotification(xe.LogMessageNotification.type,{type:e,message:n}).catch(()=>{(0,xe.RAL)().console.error("Sending log message failed")})}}class oB{constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}showErrorMessage(e,...n){let r={type:xe.MessageType.Error,message:e,actions:n};return this.connection.sendRequest(xe.ShowMessageRequest.type,r).then(N0)}showWarningMessage(e,...n){let r={type:xe.MessageType.Warning,message:e,actions:n};return this.connection.sendRequest(xe.ShowMessageRequest.type,r).then(N0)}showInformationMessage(e,...n){let r={type:xe.MessageType.Info,message:e,actions:n};return this.connection.sendRequest(xe.ShowMessageRequest.type,r).then(N0)}}const LE=(0,Gx.ShowDocumentFeature)((0,vt.ProgressFeature)(oB));var jE;(function(t){function e(){return new xE}t.create=e})(jE||(zt.BulkRegistration=jE={}));class xE{constructor(){this._registrations=[],this._registered=new Set}add(e,n){const r=vi.string(e)?e:e.method;if(this._registered.has(r))throw new Error(`${r} is already added to this registration`);const i=P0.generateUuid();this._registrations.push({id:i,method:r,registerOptions:n||{}}),this._registered.add(r)}asRegistrationParams(){return{registrations:this._registrations}}}var BE;(function(t){function e(){return new F0(void 0,[])}t.create=e})(BE||(zt.BulkUnregistration=BE={}));class F0{constructor(e,n){this._connection=e,this._unregistrations=new Map,n.forEach(r=>{this._unregistrations.set(r.method,r)})}get isAttached(){return!!this._connection}attach(e){this._connection=e}add(e){this._unregistrations.set(e.method,e)}dispose(){let e=[];for(let r of this._unregistrations.values())e.push(r);let n={unregisterations:e};this._connection.sendRequest(xe.UnregistrationRequest.type,n).catch(()=>{this._connection.console.info("Bulk unregistration failed.")})}disposeSingle(e){const n=vi.string(e)?e:e.method,r=this._unregistrations.get(n);if(!r)return!1;let i={unregisterations:[r]};return this._connection.sendRequest(xe.UnregistrationRequest.type,i).then(()=>{this._unregistrations.delete(n)},s=>{this._connection.console.info(`Un-registering request handler for ${r.id} failed.`)}),!0}}class qE{attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}register(e,n,r){return e instanceof xE?this.registerMany(e):e instanceof F0?this.registerSingle1(e,n,r):this.registerSingle2(e,n)}registerSingle1(e,n,r){const i=vi.string(n)?n:n.method,s=P0.generateUuid();let a={registrations:[{id:s,method:i,registerOptions:r||{}}]};return e.isAttached||e.attach(this.connection),this.connection.sendRequest(xe.RegistrationRequest.type,a).then(c=>(e.add({id:s,method:i}),e),c=>(this.connection.console.info(`Registering request handler for ${i} failed.`),Promise.reject(c)))}registerSingle2(e,n){const r=vi.string(e)?e:e.method,i=P0.generateUuid();let s={registrations:[{id:i,method:r,registerOptions:n||{}}]};return this.connection.sendRequest(xe.RegistrationRequest.type,s).then(a=>xe.Disposable.create(()=>{this.unregisterSingle(i,r).catch(()=>{this.connection.console.info(`Un-registering capability with id ${i} failed.`)})}),a=>(this.connection.console.info(`Registering request handler for ${r} failed.`),Promise.reject(a)))}unregisterSingle(e,n){let r={unregisterations:[{id:e,method:n}]};return this.connection.sendRequest(xe.UnregistrationRequest.type,r).catch(()=>{this.connection.console.info(`Un-registering request handler for ${e} failed.`)})}registerMany(e){let n=e.asRegistrationParams();return this.connection.sendRequest(xe.RegistrationRequest.type,n).then(()=>new F0(this._connection,n.registrations.map(r=>({id:r.id,method:r.method}))),r=>(this.connection.console.info("Bulk registration failed."),Promise.reject(r)))}}class aB{constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}applyEdit(e){function n(i){return i&&!!i.edit}let r=n(e)?e:{edit:e};return this.connection.sendRequest(xe.ApplyWorkspaceEditRequest.type,r)}}const WE=(0,Jx.FileOperationsFeature)((0,Kx.WorkspaceFoldersFeature)((0,Hx.ConfigurationFeature)(aB)));class UE{constructor(){this._trace=xe.Trace.Off}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}set trace(e){this._trace=e}log(e,n){this._trace!==xe.Trace.Off&&this.connection.sendNotification(xe.LogTraceNotification.type,{message:e,verbose:this._trace===xe.Trace.Verbose?n:void 0}).catch(()=>{})}}class VE{constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}logEvent(e){this.connection.sendNotification(xe.TelemetryEventNotification.type,e).catch(()=>{this.connection.console.log("Sending TelemetryEventNotification failed")})}}class HE{constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}attachWorkDoneProgress(e){return(0,vt.attachWorkDone)(this.connection,e)}attachPartialResultProgress(e,n){return(0,vt.attachPartialResult)(this.connection,n)}}zt._LanguagesImpl=HE;const KE=(0,eB.FoldingRangeFeature)((0,iB.MonikerFeature)((0,nB.DiagnosticFeature)((0,tB.InlayHintFeature)((0,Zx.InlineValueFeature)((0,Xx.TypeHierarchyFeature)((0,Qx.LinkedEditingRangeFeature)((0,Yx.SemanticTokensFeature)((0,zx.CallHierarchyFeature)(HE)))))))));class zE{constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}attachWorkDoneProgress(e){return(0,vt.attachWorkDone)(this.connection,e)}attachPartialResultProgress(e,n){return(0,vt.attachPartialResult)(this.connection,n)}}zt._NotebooksImpl=zE;const YE=(0,rB.NotebookSyncFeature)(zE);function GE(t,e){return function(n){return e(t(n))}}zt.combineConsoleFeatures=GE;function JE(t,e){return function(n){return e(t(n))}}zt.combineTelemetryFeatures=JE;function QE(t,e){return function(n){return e(t(n))}}zt.combineTracerFeatures=QE;function XE(t,e){return function(n){return e(t(n))}}zt.combineClientFeatures=XE;function ZE(t,e){return function(n){return e(t(n))}}zt.combineWindowFeatures=ZE;function eS(t,e){return function(n){return e(t(n))}}zt.combineWorkspaceFeatures=eS;function tS(t,e){return function(n){return e(t(n))}}zt.combineLanguagesFeatures=tS;function nS(t,e){return function(n){return e(t(n))}}zt.combineNotebooksFeatures=nS;function uB(t,e){function n(i,s,a){return i&&s?a(i,s):i||s}return{__brand:"features",console:n(t.console,e.console,GE),tracer:n(t.tracer,e.tracer,QE),telemetry:n(t.telemetry,e.telemetry,JE),client:n(t.client,e.client,XE),window:n(t.window,e.window,ZE),workspace:n(t.workspace,e.workspace,eS),languages:n(t.languages,e.languages,tS),notebooks:n(t.notebooks,e.notebooks,nS)}}zt.combineFeatures=uB;function cB(t,e,n){const r=n&&n.console?new(n.console(ME)):new ME,i=t(r);r.rawAttach(i);const s=n&&n.tracer?new(n.tracer(UE)):new UE,a=n&&n.telemetry?new(n.telemetry(VE)):new VE,c=n&&n.client?new(n.client(qE)):new qE,l=n&&n.window?new(n.window(LE)):new LE,d=n&&n.workspace?new(n.workspace(WE)):new WE,h=n&&n.languages?new(n.languages(KE)):new KE,m=n&&n.notebooks?new(n.notebooks(YE)):new YE,E=[r,s,a,c,l,d,h,m];function T(S){return S instanceof Promise?S:vi.thenable(S)?new Promise((y,D)=>{S.then(v=>y(v),v=>D(v))}):Promise.resolve(S)}let R,P,A,F={listen:()=>i.listen(),sendRequest:(S,...y)=>i.sendRequest(vi.string(S)?S:S.method,...y),onRequest:(S,y)=>i.onRequest(S,y),sendNotification:(S,y)=>{const D=vi.string(S)?S:S.method;return i.sendNotification(D,y)},onNotification:(S,y)=>i.onNotification(S,y),onProgress:i.onProgress,sendProgress:i.sendProgress,onInitialize:S=>(P=S,{dispose:()=>{P=void 0}}),onInitialized:S=>i.onNotification(xe.InitializedNotification.type,S),onShutdown:S=>(R=S,{dispose:()=>{R=void 0}}),onExit:S=>(A=S,{dispose:()=>{A=void 0}}),get console(){return r},get telemetry(){return a},get tracer(){return s},get client(){return c},get window(){return l},get workspace(){return d},get languages(){return h},get notebooks(){return m},onDidChangeConfiguration:S=>i.onNotification(xe.DidChangeConfigurationNotification.type,S),onDidChangeWatchedFiles:S=>i.onNotification(xe.DidChangeWatchedFilesNotification.type,S),__textDocumentSync:void 0,onDidOpenTextDocument:S=>i.onNotification(xe.DidOpenTextDocumentNotification.type,S),onDidChangeTextDocument:S=>i.onNotification(xe.DidChangeTextDocumentNotification.type,S),onDidCloseTextDocument:S=>i.onNotification(xe.DidCloseTextDocumentNotification.type,S),onWillSaveTextDocument:S=>i.onNotification(xe.WillSaveTextDocumentNotification.type,S),onWillSaveTextDocumentWaitUntil:S=>i.onRequest(xe.WillSaveTextDocumentWaitUntilRequest.type,S),onDidSaveTextDocument:S=>i.onNotification(xe.DidSaveTextDocumentNotification.type,S),sendDiagnostics:S=>i.sendNotification(xe.PublishDiagnosticsNotification.type,S),onHover:S=>i.onRequest(xe.HoverRequest.type,(y,D)=>S(y,D,(0,vt.attachWorkDone)(i,y),void 0)),onCompletion:S=>i.onRequest(xe.CompletionRequest.type,(y,D)=>S(y,D,(0,vt.attachWorkDone)(i,y),(0,vt.attachPartialResult)(i,y))),onCompletionResolve:S=>i.onRequest(xe.CompletionResolveRequest.type,S),onSignatureHelp:S=>i.onRequest(xe.SignatureHelpRequest.type,(y,D)=>S(y,D,(0,vt.attachWorkDone)(i,y),void 0)),onDeclaration:S=>i.onRequest(xe.DeclarationRequest.type,(y,D)=>S(y,D,(0,vt.attachWorkDone)(i,y),(0,vt.attachPartialResult)(i,y))),onDefinition:S=>i.onRequest(xe.DefinitionRequest.type,(y,D)=>S(y,D,(0,vt.attachWorkDone)(i,y),(0,vt.attachPartialResult)(i,y))),onTypeDefinition:S=>i.onRequest(xe.TypeDefinitionRequest.type,(y,D)=>S(y,D,(0,vt.attachWorkDone)(i,y),(0,vt.attachPartialResult)(i,y))),onImplementation:S=>i.onRequest(xe.ImplementationRequest.type,(y,D)=>S(y,D,(0,vt.attachWorkDone)(i,y),(0,vt.attachPartialResult)(i,y))),onReferences:S=>i.onRequest(xe.ReferencesRequest.type,(y,D)=>S(y,D,(0,vt.attachWorkDone)(i,y),(0,vt.attachPartialResult)(i,y))),onDocumentHighlight:S=>i.onRequest(xe.DocumentHighlightRequest.type,(y,D)=>S(y,D,(0,vt.attachWorkDone)(i,y),(0,vt.attachPartialResult)(i,y))),onDocumentSymbol:S=>i.onRequest(xe.DocumentSymbolRequest.type,(y,D)=>S(y,D,(0,vt.attachWorkDone)(i,y),(0,vt.attachPartialResult)(i,y))),onWorkspaceSymbol:S=>i.onRequest(xe.WorkspaceSymbolRequest.type,(y,D)=>S(y,D,(0,vt.attachWorkDone)(i,y),(0,vt.attachPartialResult)(i,y))),onWorkspaceSymbolResolve:S=>i.onRequest(xe.WorkspaceSymbolResolveRequest.type,S),onCodeAction:S=>i.onRequest(xe.CodeActionRequest.type,(y,D)=>S(y,D,(0,vt.attachWorkDone)(i,y),(0,vt.attachPartialResult)(i,y))),onCodeActionResolve:S=>i.onRequest(xe.CodeActionResolveRequest.type,(y,D)=>S(y,D)),onCodeLens:S=>i.onRequest(xe.CodeLensRequest.type,(y,D)=>S(y,D,(0,vt.attachWorkDone)(i,y),(0,vt.attachPartialResult)(i,y))),onCodeLensResolve:S=>i.onRequest(xe.CodeLensResolveRequest.type,(y,D)=>S(y,D)),onDocumentFormatting:S=>i.onRequest(xe.DocumentFormattingRequest.type,(y,D)=>S(y,D,(0,vt.attachWorkDone)(i,y),void 0)),onDocumentRangeFormatting:S=>i.onRequest(xe.DocumentRangeFormattingRequest.type,(y,D)=>S(y,D,(0,vt.attachWorkDone)(i,y),void 0)),onDocumentOnTypeFormatting:S=>i.onRequest(xe.DocumentOnTypeFormattingRequest.type,(y,D)=>S(y,D)),onRenameRequest:S=>i.onRequest(xe.RenameRequest.type,(y,D)=>S(y,D,(0,vt.attachWorkDone)(i,y),void 0)),onPrepareRename:S=>i.onRequest(xe.PrepareRenameRequest.type,(y,D)=>S(y,D)),onDocumentLinks:S=>i.onRequest(xe.DocumentLinkRequest.type,(y,D)=>S(y,D,(0,vt.attachWorkDone)(i,y),(0,vt.attachPartialResult)(i,y))),onDocumentLinkResolve:S=>i.onRequest(xe.DocumentLinkResolveRequest.type,(y,D)=>S(y,D)),onDocumentColor:S=>i.onRequest(xe.DocumentColorRequest.type,(y,D)=>S(y,D,(0,vt.attachWorkDone)(i,y),(0,vt.attachPartialResult)(i,y))),onColorPresentation:S=>i.onRequest(xe.ColorPresentationRequest.type,(y,D)=>S(y,D,(0,vt.attachWorkDone)(i,y),(0,vt.attachPartialResult)(i,y))),onFoldingRanges:S=>i.onRequest(xe.FoldingRangeRequest.type,(y,D)=>S(y,D,(0,vt.attachWorkDone)(i,y),(0,vt.attachPartialResult)(i,y))),onSelectionRanges:S=>i.onRequest(xe.SelectionRangeRequest.type,(y,D)=>S(y,D,(0,vt.attachWorkDone)(i,y),(0,vt.attachPartialResult)(i,y))),onExecuteCommand:S=>i.onRequest(xe.ExecuteCommandRequest.type,(y,D)=>S(y,D,(0,vt.attachWorkDone)(i,y),void 0)),dispose:()=>i.dispose()};for(let S of E)S.attach(F);return i.onRequest(xe.InitializeRequest.type,S=>{e.initialize(S),vi.string(S.trace)&&(s.trace=xe.Trace.fromString(S.trace));for(let y of E)y.initialize(S.capabilities);if(P){let y=P(S,new xe.CancellationTokenSource().token,(0,vt.attachWorkDone)(i,S),void 0);return T(y).then(D=>{if(D instanceof xe.ResponseError)return D;let v=D;v||(v={capabilities:{}});let _=v.capabilities;_||(_={},v.capabilities=_),_.textDocumentSync===void 0||_.textDocumentSync===null?_.textDocumentSync=vi.number(F.__textDocumentSync)?F.__textDocumentSync:xe.TextDocumentSyncKind.None:!vi.number(_.textDocumentSync)&&!vi.number(_.textDocumentSync.change)&&(_.textDocumentSync.change=vi.number(F.__textDocumentSync)?F.__textDocumentSync:xe.TextDocumentSyncKind.None);for(let $ of E)$.fillServerCapabilities(_);return v})}else{let y={capabilities:{textDocumentSync:xe.TextDocumentSyncKind.None}};for(let D of E)D.fillServerCapabilities(y.capabilities);return y}}),i.onRequest(xe.ShutdownRequest.type,()=>{if(e.shutdownReceived=!0,R)return R(new xe.CancellationTokenSource().token)}),i.onNotification(xe.ExitNotification.type,()=>{try{A&&A()}finally{e.shutdownReceived?e.exit(0):e.exit(1)}}),i.onNotification(xe.SetTraceNotification.type,S=>{s.trace=xe.Trace.fromString(S.value)}),F}zt.createConnection=cB,function(t){var e=Vt&&Vt.__createBinding||(Object.create?function(l,d,h,m){m===void 0&&(m=h);var E=Object.getOwnPropertyDescriptor(d,h);(!E||("get"in E?!d.__esModule:E.writable||E.configurable))&&(E={enumerable:!0,get:function(){return d[h]}}),Object.defineProperty(l,m,E)}:function(l,d,h,m){m===void 0&&(m=h),l[m]=d[h]}),n=Vt&&Vt.__exportStar||function(l,d){for(var h in l)h!=="default"&&!Object.prototype.hasOwnProperty.call(d,h)&&e(d,l,h)};Object.defineProperty(t,"__esModule",{value:!0}),t.ProposedFeatures=t.NotebookDocuments=t.TextDocuments=t.SemanticTokensBuilder=void 0;const r=Ps;Object.defineProperty(t,"SemanticTokensBuilder",{enumerable:!0,get:function(){return r.SemanticTokensBuilder}});const i=_h;n(Ln,t);const s=yl;Object.defineProperty(t,"TextDocuments",{enumerable:!0,get:function(){return s.TextDocuments}});const a=Da;Object.defineProperty(t,"NotebookDocuments",{enumerable:!0,get:function(){return a.NotebookDocuments}}),n(zt,t);var c;(function(l){l.all={__brand:"features",languages:i.InlineCompletionFeature}})(c||(t.ProposedFeatures=c={}))}(E0),function(t){var e=Vt&&Vt.__createBinding||(Object.create?function(c,l,d,h){h===void 0&&(h=d);var m=Object.getOwnPropertyDescriptor(l,d);(!m||("get"in m?!l.__esModule:m.writable||m.configurable))&&(m={enumerable:!0,get:function(){return l[d]}}),Object.defineProperty(c,h,m)}:function(c,l,d,h){h===void 0&&(h=d),c[h]=l[d]}),n=Vt&&Vt.__exportStar||function(c,l){for(var d in c)d!=="default"&&!Object.prototype.hasOwnProperty.call(l,d)&&e(l,c,d)};Object.defineProperty(t,"__esModule",{value:!0}),t.createConnection=void 0;const r=E0;n(si.exports,t),n(E0,t);let i=!1;const s={initialize:c=>{},get shutdownReceived(){return i},set shutdownReceived(c){i=c},exit:c=>{}};function a(c,l,d,h){let m,E,T,R;c!==void 0&&c.__brand==="features"&&(m=c,c=l,l=d,d=h),r.ConnectionStrategy.is(c)||r.ConnectionOptions.is(c)?R=c:(E=c,T=l,R=d);const P=A=>(0,r.createProtocolConnection)(E,T,A,R);return(0,r.createConnection)(P,s,m)}t.createConnection=a}(xr);var rS;(function(t){t.type=new xr.NotificationType("json/schemaAssociations")})(rS||(rS={}));var iS;(function(t){t.type=new xr.NotificationType("yaml/registerCustomSchemaRequest")})(iS||(iS={}));var sS;(function(t){t.type=new xr.NotificationType("yaml/registerContentRequest")})(sS||(sS={}));var oS;(function(t){t.type=new xr.NotificationType("yaml/resultLimitReached")})(oS||(oS={}));var aS;(function(t){t.type=new xr.RequestType("vscode/content")})(aS||(aS={}));var uS;(function(t){t.type=new xr.RequestType("custom/schema/content")})(uS||(uS={}));var cS;(function(t){t.type=new xr.RequestType("custom/schema/request")})(cS||(cS={}));var lS;(function(t){t.type=new xr.RequestType("json/colorSymbols")})(lS||(lS={}));var fS;(function(t){t.type=new xr.RequestType("json/schema/modify")})(fS||(fS={}));var Mh;(function(t){t.type=new xr.NotificationType("yaml/supportSchemaSelection"),t.getSchema=new xr.RequestType("yaml/get/jsonSchema"),t.getAllSchemas=new xr.RequestType("yaml/get/all/jsonSchemas"),t.schemaStoreInitialized=new xr.NotificationType("yaml/schema/store/initialized")})(Mh||(Mh={}));class lB{constructor(e,n,r){var i,s;this.schemaService=e,this.yamlSettings=n,this.connection=r,(i=this.connection)==null||i.onRequest(Mh.getSchema,a=>this.getSchemas(a)),(s=this.connection)==null||s.onRequest(Mh.getAllSchemas,a=>this.getAllSchemas(a))}async getSchemas(e){const n=await this.getSchemasForFile(e);return Array.from(n).map(r=>({name:r[1].title,uri:r[0],description:r[1].description,versions:r[1].versions}))}async getSchemasForFile(e){var s;const n=(s=this.yamlSettings)==null?void 0:s.documents.get(e),r=new Map;if(!n)return r;const i=di.getYamlDocument(n);for(const a of i.documents){const c=await this.schemaService.getSchemaForResource(n.uri,a);if(c!=null&&c.schema){const l=wE(c==null?void 0:c.schema);if(l.size===0)continue;for(const d of l)r.set(d[0],d[1])}}return r}async getAllSchemas(e){const n=await this.getSchemasForFile(e),r=Array.from(n.entries()).map(a=>({uri:a[0],fromStore:!1,usedForCurrentFile:!0,name:a[1].title,description:a[1].description,versions:a[1].versions})),i=[];let s=this.schemaService.getAllSchemas();return s=s.filter(a=>!n.has(a.uri)),i.push(...r),i.push(...s),i}}class fB{constructor(e){this.telemetry=e}getDefinition(e,n){var r;try{const i=di.getYamlDocument(e),s=e.offsetAt(n.position),a=gd(s,i);if(a){const[c]=a.getNodeFromPosition(s,new sa(e));if(c&&ts(c)){const l=c.resolve(a.internalDocument);if(l&&l.range){const d=ot.create(e.positionAt(l.range[0]),e.positionAt(l.range[2])),h=ot.create(e.positionAt(l.range[0]),e.positionAt(l.range[1]));return[hf.create(e.uri,d,h)]}}}}catch(i){(r=this.telemetry)==null||r.sendError("yaml.definition.error",i)}}}function dB(t,e){const n=di.getYamlDocument(t);return e.map(a=>{const c=r(a);let l;for(const d of c)l=Tc.create(d,l);return l!=null?l:Tc.create({start:a,end:a})});function r(a){const c=t.offsetAt(a),l=[];for(const d of n.documents){let h,m;for(d.visit(E=>{const T=E.offset+E.length;if(Tc){const P=i(E,a);if(!P||P>c)return!0;R=P}return(!h||R>=h.offset)&&(h=E,m=R),!0});h;){const E=m!=null?m:h.offset,T=h.offset+h.length,R={start:t.positionAt(E),end:t.positionAt(T)},P=t.getText(R),A=hB(P),F=E+A.length;F>=c&&(R.end=t.positionAt(F));const S=(y,D)=>A.startsWith(y)&&A.endsWith(D||y);(h.type==="string"&&(S("'")||S('"'))||h.type==="object"&&S("{","}")||h.type==="array"&&S("[","]"))&&l.push({start:t.positionAt(E+1),end:t.positionAt(T-1)}),l.push(R),h=h.parent,m=void 0}if(l.length>0)break}return l.reverse()}function i(a,c){var d;const l=t.positionAt(a.offset);if(l.line===c.line){if(((d=a.parent)==null?void 0:d.type)==="array"&&s(a.offset-2,a.offset)==="- ")return a.offset-2;if(a.type==="array"||a.type==="object"){const h={line:l.line,character:0};if(t.getText({start:h,end:l}).trim().length===0)return t.offsetAt(h)}}}function s(a,c){return t.getText({start:t.positionAt(a),end:t.positionAt(c)})}}function hB(t){return t.endsWith(`\r `)?t.substring(0,t.length-2):t.endsWith(` -`)?t.substring(0,t.length-1):t}var R0;(function(t){t[t.SchemaStore=1]="SchemaStore",t[t.SchemaAssociation=2]="SchemaAssociation",t[t.Settings=3]="Settings"})(R0||(R0={}));function pB(t){const e=new JI(t.schemaRequestService,t.workspaceContext),n=new rx(e,t.clientCapabilities,di,t.telemetry),r=new XI(e,t.telemetry),i=new QI(e,t.telemetry),s=new aM(e,t.telemetry),a=new Hj,c=new Gj(t.clientCapabilities),l=new Qj(e,t.telemetry),d=new Kj(t.telemetry),h=new fB(t.telemetry);return new lB(e,t.yamlSettings,t.connection),{configure:m=>{e.clearExternalSchemas(),m.schemas&&(e.schemaPriorityMapping=new Map,m.schemas.forEach(E=>{const k=E.priority?E.priority:0;e.addSchemaPriority(E.uri,k),e.registerExternalSchema(E.uri,E.fileMatch,E.schema,E.name,E.description,E.versions)})),s.configure(m),r.configure(m),n.configure(m),a.configure(m),c.configure(m)},registerCustomSchemaProvider:m=>{e.registerCustomSchemaProvider(m)},findLinks:d.findLinks.bind(d),doComplete:n.doComplete.bind(n),doValidation:s.doValidation.bind(s),doHover:r.doHover.bind(r),findDocumentSymbols:i.findDocumentSymbols.bind(i),findDocumentSymbols2:i.findHierarchicalDocumentSymbols.bind(i),doDefinition:h.getDefinition.bind(h),resetSchema:m=>e.onResourceChange(m),doFormat:a.format.bind(a),doDocumentOnTypeFormatting:Jj,addSchema:(m,E)=>e.saveSchema(m,E),deleteSchema:m=>e.deleteSchema(m),modifySchemaContent:m=>e.addContent(m),deleteSchemaContent:m=>e.deleteContent(m),deleteSchemasWhole:m=>e.deleteSchemas(m),getFoldingRanges:zj,getSelectionRanges:dB,getCodeAction:(m,E)=>c.getCodeAction(m,E),getCodeLens:m=>l.getCodeLens(m),resolveCodeLens:m=>l.resolveCodeLens(m)}}const I0=pB({async schemaRequestService(t){return(await fetch(t)).text()}}),Wu={},dS=self,wa=si.exports.createProtocolConnection(new si.exports.BrowserMessageReader(dS),new si.exports.BrowserMessageWriter(dS));async function hS(t){const e=await I0.doValidation(Wu[t]);await wa.sendNotification(si.exports.PublishDiagnosticsNotification.type,{uri:t,diagnostics:e})}wa.onRequest(si.exports.InitializeRequest.type,()=>({capabilities:{textDocumentSync:si.exports.TextDocumentSyncKind.Incremental,completionProvider:!0,hoverProvider:!0}})),wa.onNotification(si.exports.DidOpenTextDocumentNotification.type,async({textDocument:{uri:t,languageId:e,version:n,text:r}})=>{Wu[t]=Wf.create(t,e,n,r),await hS(t)}),wa.onNotification(si.exports.DidChangeTextDocumentNotification.type,async({textDocument:t,contentChanges:e})=>{const n=Wu[t.uri];n&&(Wu[t.uri]=Wf.update(n,e,t.version||0),await hS(t.uri))}),wa.onRequest(si.exports.CompletionRequest.type,async({textDocument:t,position:e})=>{const n=Wu[t.uri];return n?I0.doComplete(n,e):null}),wa.onRequest(si.exports.HoverRequest.type,async({textDocument:t,position:e})=>{const n=Wu[t.uri];return n?I0.doHover(n,e):null}),wa.listen()})(); +`)?t.substring(0,t.length-1):t}var R0;(function(t){t[t.SchemaStore=1]="SchemaStore",t[t.SchemaAssociation=2]="SchemaAssociation",t[t.Settings=3]="Settings"})(R0||(R0={}));function pB(t){const e=new JI(t.schemaRequestService,t.workspaceContext),n=new rx(e,t.clientCapabilities,di,t.telemetry),r=new XI(e,t.telemetry),i=new QI(e,t.telemetry),s=new aM(e,t.telemetry),a=new Hj,c=new Gj(t.clientCapabilities),l=new Qj(e,t.telemetry),d=new Kj(t.telemetry),h=new fB(t.telemetry);return new lB(e,t.yamlSettings,t.connection),{configure:m=>{e.clearExternalSchemas(),m.schemas&&(e.schemaPriorityMapping=new Map,m.schemas.forEach(E=>{const T=E.priority?E.priority:0;e.addSchemaPriority(E.uri,T),e.registerExternalSchema(E.uri,E.fileMatch,E.schema,E.name,E.description,E.versions)})),s.configure(m),r.configure(m),n.configure(m),a.configure(m),c.configure(m)},registerCustomSchemaProvider:m=>{e.registerCustomSchemaProvider(m)},findLinks:d.findLinks.bind(d),doComplete:n.doComplete.bind(n),doValidation:s.doValidation.bind(s),doHover:r.doHover.bind(r),findDocumentSymbols:i.findDocumentSymbols.bind(i),findDocumentSymbols2:i.findHierarchicalDocumentSymbols.bind(i),doDefinition:h.getDefinition.bind(h),resetSchema:m=>e.onResourceChange(m),doFormat:a.format.bind(a),doDocumentOnTypeFormatting:Jj,addSchema:(m,E)=>e.saveSchema(m,E),deleteSchema:m=>e.deleteSchema(m),modifySchemaContent:m=>e.addContent(m),deleteSchemaContent:m=>e.deleteContent(m),deleteSchemasWhole:m=>e.deleteSchemas(m),getFoldingRanges:zj,getSelectionRanges:dB,getCodeAction:(m,E)=>c.getCodeAction(m,E),getCodeLens:m=>l.getCodeLens(m),resolveCodeLens:m=>l.resolveCodeLens(m)}}const I0=pB({async schemaRequestService(t){return(await fetch(t)).text()}}),Wu={},dS=self,wa=si.exports.createProtocolConnection(new si.exports.BrowserMessageReader(dS),new si.exports.BrowserMessageWriter(dS));async function hS(t){const e=await I0.doValidation(Wu[t]);await wa.sendNotification(si.exports.PublishDiagnosticsNotification.type,{uri:t,diagnostics:e})}wa.onRequest(si.exports.InitializeRequest.type,()=>({capabilities:{textDocumentSync:si.exports.TextDocumentSyncKind.Incremental,completionProvider:!0,hoverProvider:!0}})),wa.onNotification(si.exports.DidOpenTextDocumentNotification.type,async({textDocument:{uri:t,languageId:e,version:n,text:r}})=>{Wu[t]=Uf.create(t,e,n,r),await hS(t)}),wa.onNotification(si.exports.DidChangeTextDocumentNotification.type,async({textDocument:t,contentChanges:e})=>{const n=Wu[t.uri];n&&(Wu[t.uri]=Uf.update(n,e,t.version||0),await hS(t.uri))}),wa.onRequest(si.exports.CompletionRequest.type,async({textDocument:t,position:e})=>{const n=Wu[t.uri];return n?I0.doComplete(n,e):null}),wa.onRequest(si.exports.HoverRequest.type,async({textDocument:t,position:e})=>{const n=Wu[t.uri];return n?I0.doHover(n,e):null}),wa.listen()})(); diff --git a/docs/collaboration.html b/docs/collaboration.html index 2e5e312..d13f9ee 100644 --- a/docs/collaboration.html +++ b/docs/collaboration.html @@ -420,7 +420,7 @@

Other Collaborative FeaturesOther Collaborative Featuresce6bf60f + 3c6bcc66 @ main diff --git a/docs/comments.html b/docs/comments.html index eb02cf3..d1a230b 100644 --- a/docs/comments.html +++ b/docs/comments.html @@ -599,7 +599,7 @@

Suggestions Last update: - 2025-02-18 + 2025-02-19 @@ -652,7 +652,7 @@

Suggestions - ce6bf60f + 3c6bcc66 @ main diff --git a/docs/genindex.html b/docs/genindex.html index ef6571b..0987dd8 100644 --- a/docs/genindex.html +++ b/docs/genindex.html @@ -351,7 +351,7 @@ Last update: - 2025-02-18 + 2025-02-19 @@ -383,7 +383,7 @@ - ce6bf60f + 3c6bcc66 @ main diff --git a/docs/index.html b/docs/index.html index ec5175c..68d1204 100644 --- a/docs/index.html +++ b/docs/index.html @@ -393,7 +393,7 @@

MyST Editor - User Manual Last update: - 2025-02-18 + 2025-02-19 @@ -446,7 +446,7 @@

MyST Editor - User Manual - ce6bf60f + 3c6bcc66 @ main diff --git a/docs/introduction.html b/docs/introduction.html index 3187aeb..36f3884 100644 --- a/docs/introduction.html +++ b/docs/introduction.html @@ -374,7 +374,7 @@

Introduction Last update: - 2025-02-18 + 2025-02-19 @@ -442,7 +442,7 @@

Introduction - ce6bf60f + 3c6bcc66 @ main diff --git a/docs/mermaid.html b/docs/mermaid.html index d42f697..738666a 100644 --- a/docs/mermaid.html +++ b/docs/mermaid.html @@ -378,7 +378,7 @@

Mermaid DiagramsMermaid Diagramsce6bf60f + 3c6bcc66 @ main diff --git a/docs/rich-links.html b/docs/rich-links.html index b91e3e2..50ab819 100644 --- a/docs/rich-links.html +++ b/docs/rich-links.html @@ -454,7 +454,7 @@

List of available settingsList of available settingsce6bf60f + 3c6bcc66 @ main diff --git a/docs/topbar.html b/docs/topbar.html index 57c1fb7..ffdbf90 100644 --- a/docs/topbar.html +++ b/docs/topbar.html @@ -468,7 +468,7 @@

View Mode ButtonsView Mode Buttonsce6bf60f + 3c6bcc66 @ main