@hexabot-ai/api 3.2.3 → 3.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -3
- package/dist/static/assets/browser-ponyfill-DhVZxpvu.js +2 -0
- package/dist/static/assets/{css.worker-BvV5MPou.js → css.worker-B4z49cGk.js} +7 -7
- package/dist/static/assets/cssMode-B7czf8m_.js +1 -0
- package/dist/static/assets/editor.worker-DyuDvpVp.js +26 -0
- package/dist/static/assets/{freemarker2-QJMqt1-L.js → freemarker2-sX7CP09a.js} +1 -1
- package/dist/static/assets/{handlebars-D3-tp3q8.js → handlebars-BfeDEYiM.js} +1 -1
- package/dist/static/assets/{html-BIVSAe2M.js → html-BGT7kcoZ.js} +1 -1
- package/dist/static/assets/{html.worker-BLJhxQJQ.js → html.worker-DtiGdgqp.js} +28 -28
- package/dist/static/assets/htmlMode-BHRj50gQ.js +1 -0
- package/dist/static/assets/{index-Wtgr3A4p.js → index--ZHMc4gF.js} +2280 -2280
- package/dist/static/assets/{javascript-u87PO7ih.js → javascript-BHtELMeM.js} +1 -1
- package/dist/static/assets/json.worker-leyajbqV.js +58 -0
- package/dist/static/assets/{jsonMode-0Pf5oAfj.js → jsonMode-ZxEJDG58.js} +4 -4
- package/dist/static/assets/{liquid-CBQoZjUj.js → liquid-xDAkaqm1.js} +1 -1
- package/dist/static/assets/{lspLanguageFeatures-Bnt5qp-g.js → lspLanguageFeatures-COe6pbco.js} +1 -1
- package/dist/static/assets/{mdx-BOZSKWcy.js → mdx-EKSYt-p_.js} +1 -1
- package/dist/static/assets/{python-CLk42i5f.js → python-DBrUPvCj.js} +1 -1
- package/dist/static/assets/{razor-DDV6klIi.js → razor-InDPZAGk.js} +1 -1
- package/dist/static/assets/{ts.worker-DGHjMaqB.js → ts.worker-59MjiAqk.js} +63 -63
- package/dist/static/assets/{tsMode-Dgojz_8C.js → tsMode-BpkGYMwy.js} +1 -1
- package/dist/static/assets/{typescript-BAUzcnL_.js → typescript-CT3d2mAx.js} +1 -1
- package/dist/static/assets/{xml-D5KxV0OO.js → xml-D7VVWZHB.js} +1 -1
- package/dist/static/assets/{yaml-CSq3AYM9.js → yaml-BA_4AjHB.js} +1 -1
- package/dist/static/assets/yaml.worker.entry-CsihCPlC.js +419 -0
- package/dist/static/index.html +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +5 -5
- package/dist/static/assets/browser-ponyfill-CnklMg-0.js +0 -2
- package/dist/static/assets/cssMode-BFc1s9d3.js +0 -1
- package/dist/static/assets/editor.worker-CKy7Pnvo.js +0 -26
- package/dist/static/assets/htmlMode-D9c0cJUu.js +0 -1
- package/dist/static/assets/json.worker-usMZ-FED.js +0 -58
- package/dist/static/assets/yaml.worker.entry-BB81z30Q.js +0 -419
|
@@ -0,0 +1,419 @@
|
|
|
1
|
+
var O6=Object.defineProperty;var R6=(qn,tn,nn)=>tn in qn?O6(qn,tn,{enumerable:!0,configurable:!0,writable:!0,value:nn}):qn[tn]=nn;var vt=(qn,tn,nn)=>R6(qn,typeof tn!="symbol"?tn+"":tn,nn);(function(){"use strict";var lg,ug,cg,fg,nt,ye;class qn{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(t){setTimeout(()=>{throw t.stack?Er.isErrorNoTelemetry(t)?new Er(t.message+`
|
|
2
|
+
|
|
3
|
+
`+t.stack):new Error(t.message+`
|
|
4
|
+
|
|
5
|
+
`+t.stack):t},0)}}emit(t){this.listeners.forEach(n=>{n(t)})}onUnexpectedError(t){this.unexpectedErrorHandler(t),this.emit(t)}onUnexpectedExternalError(t){this.unexpectedErrorHandler(t)}}const tn=new qn;function nn(e){Eg(e)||tn.onUnexpectedError(e)}function Ja(e){if(e instanceof Error){const{name:t,message:n,cause:r}=e,s=e.stacktrace||e.stack;return{$isError:!0,name:t,message:n,stack:s,noTelemetry:Er.isErrorNoTelemetry(e),cause:r?Ja(r):void 0,code:e.code}}return e}const Qa="Canceled";function Eg(e){return e instanceof rc?!0:e instanceof Error&&e.name===Qa&&e.message===Qa}class rc extends Error{constructor(){super(Qa),this.name=this.message}}class Er extends Error{constructor(t){super(t),this.name="CodeExpectedError"}static fromError(t){if(t instanceof Er)return t;const n=new Er;return n.message=t.message,n.stack=t.stack,n}static isErrorNoTelemetry(t){return t.name==="CodeExpectedError"}}class Ge extends Error{constructor(t){super(t||"An unexpected bug occurred."),Object.setPrototypeOf(this,Ge.prototype)}}function Ag(e,t="Unreachable"){throw new Error(t)}function xg(e,t="unexpected state"){if(!e)throw typeof t=="string"?new Ge(`Assertion Failed: ${t}`):t}function hi(e){if(!e()){debugger;e(),nn(new Ge("Assertion Failed"))}}function sc(e,t){let n=0;for(;n<e.length-1;){const r=e[n],s=e[n+1];if(!t(r,s))return!1;n++}return!0}function Ng(e){return typeof e=="string"}function Lg(e){return!!e&&typeof e[Symbol.iterator]=="function"}var di;(function(e){function t(m){return!!m&&typeof m=="object"&&typeof m[Symbol.iterator]=="function"}e.is=t;const n=Object.freeze([]);function r(){return n}e.empty=r;function*s(m){yield m}e.single=s;function i(m){return t(m)?m:s(m)}e.wrap=i;function a(m){return m||n}e.from=a;function*o(m){for(let E=m.length-1;E>=0;E--)yield m[E]}e.reverse=o;function l(m){return!m||m[Symbol.iterator]().next().done===!0}e.isEmpty=l;function u(m){return m[Symbol.iterator]().next().value}e.first=u;function c(m,E){let v=0;for(const L of m)if(E(L,v++))return!0;return!1}e.some=c;function f(m,E){let v=0;for(const L of m)if(!E(L,v++))return!1;return!0}e.every=f;function d(m,E){for(const v of m)if(E(v))return v}e.find=d;function*y(m,E){for(const v of m)E(v)&&(yield v)}e.filter=y;function*D(m,E){let v=0;for(const L of m)yield E(L,v++)}e.map=D;function*S(m,E){let v=0;for(const L of m)yield*E(L,v++)}e.flatMap=S;function*N(...m){for(const E of m)Lg(E)?yield*E:yield E}e.concat=N;function x(m,E,v){let L=v;for(const C of m)L=E(L,C);return L}e.reduce=x;function k(m){let E=0;for(const v of m)E++;return E}e.length=k;function*b(m,E,v=m.length){for(E<-m.length&&(E=0),E<0&&(E+=m.length),v<0?v+=m.length:v>m.length&&(v=m.length);E<v;E++)yield m[E]}e.slice=b;function w(m,E=Number.POSITIVE_INFINITY){const v=[];if(E===0)return[v,m];const L=m[Symbol.iterator]();for(let C=0;C<E;C++){const A=L.next();if(A.done)return[v,e.empty()];v.push(A.value)}return[v,{[Symbol.iterator](){return L}}]}e.consume=w;async function h(m){const E=[];for await(const v of m)E.push(v);return E}e.asyncToArray=h;async function g(m){let E=[];for await(const v of m)E=E.concat(v);return E}e.asyncToArrayFlat=g})(di||(di={}));function P6(e,t){}function ic(e){if(di.is(e)){const t=[];for(const n of e)if(n)try{n.dispose()}catch(r){t.push(r)}if(t.length===1)throw t[0];if(t.length>1)throw new AggregateError(t,"Encountered errors while disposing of store");return Array.isArray(e)?[]:e}else if(e)return e.dispose(),e}function kg(...e){return mi(()=>ic(e))}class Cg{constructor(t){this._isDisposed=!1,this._fn=t}dispose(){if(!this._isDisposed){if(!this._fn)throw new Error("Unbound disposable context: Need to use an arrow function to preserve the value of this");this._isDisposed=!0,this._fn()}}}function mi(e){return new Cg(e)}const ja=class ja{constructor(){this._toDispose=new Set,this._isDisposed=!1}dispose(){this._isDisposed||(this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{ic(this._toDispose)}finally{this._toDispose.clear()}}add(t){if(!t||t===Wn.None)return t;if(t===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?ja.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(t),t}delete(t){if(t){if(t===this)throw new Error("Cannot dispose a disposable on itself!");this._toDispose.delete(t),t.dispose()}}};ja.DISABLE_DISPOSED_WARNING=!1;let vs=ja;const Qu=class Qu{constructor(){this._store=new vs,this._store}dispose(){this._store.dispose()}_register(t){if(t===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(t)}};Qu.None=Object.freeze({dispose(){}});let Wn=Qu;const ps=class ps{constructor(t){this.element=t,this.next=ps.Undefined,this.prev=ps.Undefined}};ps.Undefined=new ps(void 0);let Fe=ps;class Fg{constructor(){this._first=Fe.Undefined,this._last=Fe.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===Fe.Undefined}clear(){let t=this._first;for(;t!==Fe.Undefined;){const n=t.next;t.prev=Fe.Undefined,t.next=Fe.Undefined,t=n}this._first=Fe.Undefined,this._last=Fe.Undefined,this._size=0}unshift(t){return this._insert(t,!1)}push(t){return this._insert(t,!0)}_insert(t,n){const r=new Fe(t);if(this._first===Fe.Undefined)this._first=r,this._last=r;else if(n){const i=this._last;this._last=r,r.prev=i,i.next=r}else{const i=this._first;this._first=r,r.next=i,i.prev=r}this._size+=1;let s=!1;return()=>{s||(s=!0,this._remove(r))}}shift(){if(this._first!==Fe.Undefined){const t=this._first.element;return this._remove(this._first),t}}pop(){if(this._last!==Fe.Undefined){const t=this._last.element;return this._remove(this._last),t}}_remove(t){if(t.prev!==Fe.Undefined&&t.next!==Fe.Undefined){const n=t.prev;n.next=t.next,t.next.prev=n}else t.prev===Fe.Undefined&&t.next===Fe.Undefined?(this._first=Fe.Undefined,this._last=Fe.Undefined):t.next===Fe.Undefined?(this._last=this._last.prev,this._last.next=Fe.Undefined):t.prev===Fe.Undefined&&(this._first=this._first.next,this._first.prev=Fe.Undefined);this._size-=1}*[Symbol.iterator](){let t=this._first;for(;t!==Fe.Undefined;)yield t.element,t=t.next}}const _g=globalThis.performance.now.bind(globalThis.performance);class pi{static create(t){return new pi(t)}constructor(t){this._now=t===!1?Date.now:_g,this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}}var Ka;(function(e){e.None=()=>Wn.None;function t(A,F){return d(A,()=>{},0,void 0,!0,void 0,F)}e.defer=t;function n(A){return(F,M=null,T)=>{let P=!1,V;return V=A(H=>{if(!P)return V?V.dispose():P=!0,F.call(M,H)},null,T),P&&V.dispose(),V}}e.once=n;function r(A,F){return e.once(e.filter(A,F))}e.onceIf=r;function s(A,F,M){return c((T,P=null,V)=>A(H=>T.call(P,F(H)),null,V),M)}e.map=s;function i(A,F,M){return c((T,P=null,V)=>A(H=>{F(H),T.call(P,H)},null,V),M)}e.forEach=i;function a(A,F,M){return c((T,P=null,V)=>A(H=>F(H)&&T.call(P,H),null,V),M)}e.filter=a;function o(A){return A}e.signal=o;function l(...A){return(F,M=null,T)=>{const P=kg(...A.map(V=>V(H=>F.call(M,H))));return f(P,T)}}e.any=l;function u(A,F,M,T){let P=M;return s(A,V=>(P=F(P,V),P),T)}e.reduce=u;function c(A,F){let M;const T={onWillAddFirstListener(){M=A(P.fire,P)},onDidRemoveLastListener(){M==null||M.dispose()}},P=new Ut(T);return F==null||F.add(P),P.event}function f(A,F){return F instanceof Array?F.push(A):F&&F.add(A),A}function d(A,F,M=100,T=!1,P=!1,V,H){let K,J,$,z=0,Z;const X={leakWarningThreshold:V,onWillAddFirstListener(){K=A(fe=>{z++,J=F(J,fe),T&&!$&&(ne.fire(J),J=void 0),Z=()=>{const ft=J;J=void 0,$=void 0,(!T||z>1)&&ne.fire(ft),z=0},typeof M=="number"?($&&clearTimeout($),$=setTimeout(Z,M)):$===void 0&&($=null,queueMicrotask(Z))})},onWillRemoveListener(){P&&z>0&&(Z==null||Z())},onDidRemoveLastListener(){Z=void 0,K.dispose()}},ne=new Ut(X);return H==null||H.add(ne),ne.event}e.debounce=d;function y(A,F=0,M){return e.debounce(A,(T,P)=>T?(T.push(P),T):[P],F,void 0,!0,void 0,M)}e.accumulate=y;function D(A,F=(T,P)=>T===P,M){let T=!0,P;return a(A,V=>{const H=T||!F(V,P);return T=!1,P=V,H},M)}e.latch=D;function S(A,F,M){return[e.filter(A,F,M),e.filter(A,T=>!F(T),M)]}e.split=S;function N(A,F=!1,M=[],T){let P=M.slice(),V=A(J=>{P?P.push(J):K.fire(J)});T&&T.add(V);const H=()=>{P==null||P.forEach(J=>K.fire(J)),P=null},K=new Ut({onWillAddFirstListener(){V||(V=A(J=>K.fire(J)),T&&T.add(V))},onDidAddFirstListener(){P&&(F?setTimeout(H):H())},onDidRemoveLastListener(){V&&V.dispose(),V=null}});return T&&T.add(K),K.event}e.buffer=N;function x(A,F){return(T,P,V)=>{const H=F(new b);return A(function(K){const J=H.evaluate(K);J!==k&&T.call(P,J)},void 0,V)}}e.chain=x;const k=Symbol("HaltChainable");class b{constructor(){this.steps=[]}map(F){return this.steps.push(F),this}forEach(F){return this.steps.push(M=>(F(M),M)),this}filter(F){return this.steps.push(M=>F(M)?M:k),this}reduce(F,M){let T=M;return this.steps.push(P=>(T=F(T,P),T)),this}latch(F=(M,T)=>M===T){let M=!0,T;return this.steps.push(P=>{const V=M||!F(P,T);return M=!1,T=P,V?P:k}),this}evaluate(F){for(const M of this.steps)if(F=M(F),F===k)break;return F}}function w(A,F,M=T=>T){const T=(...K)=>H.fire(M(...K)),P=()=>A.on(F,T),V=()=>A.removeListener(F,T),H=new Ut({onWillAddFirstListener:P,onDidRemoveLastListener:V});return H.event}e.fromNodeEventEmitter=w;function h(A,F,M=T=>T){const T=(...K)=>H.fire(M(...K)),P=()=>A.addEventListener(F,T),V=()=>A.removeEventListener(F,T),H=new Ut({onWillAddFirstListener:P,onDidRemoveLastListener:V});return H.event}e.fromDOMEventEmitter=h;function g(A,F){let M;const T=new Promise((P,V)=>{const H=n(A)(P,null,F);M=()=>H.dispose()});return T.cancel=M,T}e.toPromise=g;function m(A,F){return A(M=>F.fire(M))}e.forward=m;function E(A,F,M){return F(M),A(T=>F(T))}e.runAndSubscribe=E;class v{constructor(F,M){this._observable=F,this._counter=0,this._hasChanged=!1;const T={onWillAddFirstListener:()=>{F.addObserver(this),this._observable.reportChanges()},onDidRemoveLastListener:()=>{F.removeObserver(this)}};this.emitter=new Ut(T),M&&M.add(this.emitter)}beginUpdate(F){this._counter++}handlePossibleChange(F){}handleChange(F,M){this._hasChanged=!0}endUpdate(F){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function L(A,F){return new v(A,F).emitter.event}e.fromObservable=L;function C(A){return(F,M,T)=>{let P=0,V=!1;const H={beginUpdate(){P++},endUpdate(){P--,P===0&&(A.reportChanges(),V&&(V=!1,F.call(M)))},handlePossibleChange(){},handleChange(){V=!0}};A.addObserver(H),A.reportChanges();const K={dispose(){A.removeObserver(H)}};return T instanceof vs?T.add(K):Array.isArray(T)&&T.push(K),K}}e.fromObservableLight=C})(Ka||(Ka={}));const gs=class gs{constructor(t){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${t}_${gs._idPool++}`,gs.all.add(this)}start(t){this._stopWatch=new pi,this.listenerCount=t}stop(){if(this._stopWatch){const t=this._stopWatch.elapsed();this.durations.push(t),this.elapsedOverall+=t,this.invocationCount+=1,this._stopWatch=void 0}}};gs.all=new Set,gs._idPool=0;let Xa=gs,Tg=-1;const Ua=class Ua{constructor(t,n,r=(Ua._idPool++).toString(16).padStart(3,"0")){this._errorHandler=t,this.threshold=n,this.name=r,this._warnCountdown=0}dispose(){var t;(t=this._stacks)==null||t.clear()}check(t,n){const r=this.threshold;if(r<=0||n<r)return;this._stacks||(this._stacks=new Map);const s=this._stacks.get(t.value)||0;if(this._stacks.set(t.value,s+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=r*.5;const[i,a]=this.getMostFrequentStack(),o=`[${this.name}] potential listener LEAK detected, having ${n} listeners already. MOST frequent listener (${a}):`;console.warn(o),console.warn(i);const l=new Mg(o,i);this._errorHandler(l)}return()=>{const i=this._stacks.get(t.value)||0;this._stacks.set(t.value,i-1)}}getMostFrequentStack(){if(!this._stacks)return;let t,n=0;for(const[r,s]of this._stacks)(!t||n<s)&&(t=[r,s],n=s);return t}};Ua._idPool=1;let Za=Ua;class eo{static create(){const t=new Error;return new eo(t.stack??"")}constructor(t){this.value=t}print(){console.warn(this.value.split(`
|
|
6
|
+
`).slice(2).join(`
|
|
7
|
+
`))}}class Mg extends Error{constructor(t,n){super(t),this.name="ListenerLeakError",this.stack=n}}class Og extends Error{constructor(t,n){super(t),this.name="ListenerRefusalError",this.stack=n}}class to{constructor(t){this.value=t}}const Rg=2;class Ut{constructor(t){var n,r,s,i;this._size=0,this._options=t,this._leakageMon=(n=this._options)!=null&&n.leakWarningThreshold?new Za((t==null?void 0:t.onListenerError)??nn,((r=this._options)==null?void 0:r.leakWarningThreshold)??Tg):void 0,this._perfMon=(s=this._options)!=null&&s._profName?new Xa(this._options._profName):void 0,this._deliveryQueue=(i=this._options)==null?void 0:i.deliveryQueue}dispose(){var t,n,r,s;this._disposed||(this._disposed=!0,((t=this._deliveryQueue)==null?void 0:t.current)===this&&this._deliveryQueue.reset(),this._listeners&&(this._listeners=void 0,this._size=0),(r=(n=this._options)==null?void 0:n.onDidRemoveLastListener)==null||r.call(n),(s=this._leakageMon)==null||s.dispose())}get event(){return this._event??(this._event=(t,n,r)=>{var o,l,u,c,f,d,y;if(this._leakageMon&&this._size>this._leakageMon.threshold**2){const D=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(D);const S=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],N=new Og(`${D}. HINT: Stack shows most frequent listener (${S[1]}-times)`,S[0]);return(((o=this._options)==null?void 0:o.onListenerError)||nn)(N),Wn.None}if(this._disposed)return Wn.None;n&&(t=t.bind(n));const s=new to(t);let i;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(s.stack=eo.create(),i=this._leakageMon.check(s.stack,this._size+1)),this._listeners?this._listeners instanceof to?(this._deliveryQueue??(this._deliveryQueue=new Pg),this._listeners=[this._listeners,s]):this._listeners.push(s):((u=(l=this._options)==null?void 0:l.onWillAddFirstListener)==null||u.call(l,this),this._listeners=s,(f=(c=this._options)==null?void 0:c.onDidAddFirstListener)==null||f.call(c,this)),(y=(d=this._options)==null?void 0:d.onDidAddListener)==null||y.call(d,this),this._size++;const a=mi(()=>{i==null||i(),this._removeListener(s)});return r instanceof vs?r.add(a):Array.isArray(r)&&r.push(a),a}),this._event}_removeListener(t){var i,a,o,l;if((a=(i=this._options)==null?void 0:i.onWillRemoveListener)==null||a.call(i,this),!this._listeners)return;if(this._size===1){this._listeners=void 0,(l=(o=this._options)==null?void 0:o.onDidRemoveLastListener)==null||l.call(o,this),this._size=0;return}const n=this._listeners,r=n.indexOf(t);if(r===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,n[r]=void 0;const s=this._deliveryQueue.current===this;if(this._size*Rg<=n.length){let u=0;for(let c=0;c<n.length;c++)n[c]?n[u++]=n[c]:s&&u<this._deliveryQueue.end&&(this._deliveryQueue.end--,u<this._deliveryQueue.i&&this._deliveryQueue.i--);n.length=u}}_deliver(t,n){var s;if(!t)return;const r=((s=this._options)==null?void 0:s.onListenerError)||nn;if(!r){t.value(n);return}try{t.value(n)}catch(i){r(i)}}_deliverQueue(t){const n=t.current._listeners;for(;t.i<t.end;)this._deliver(n[t.i++],t.value);t.reset()}fire(t){var n,r,s,i;if((n=this._deliveryQueue)!=null&&n.current&&(this._deliverQueue(this._deliveryQueue),(r=this._perfMon)==null||r.stop()),(s=this._perfMon)==null||s.start(this._size),this._listeners)if(this._listeners instanceof to)this._deliver(this._listeners,t);else{const a=this._deliveryQueue;a.enqueue(this,t,this._listeners.length),this._deliverQueue(a)}(i=this._perfMon)==null||i.stop()}hasListeners(){return this._size>0}}class Pg{constructor(){this.i=-1,this.end=0}enqueue(t,n,r){this.i=0,this.end=r,this.current=t,this.value=n}reset(){this.i=this.end,this.current=void 0,this.value=void 0}}function Ig(){return globalThis._VSCODE_NLS_MESSAGES}function ac(){return globalThis._VSCODE_NLS_LANGUAGE}const $g=ac()==="pseudo"||typeof document<"u"&&document.location&&typeof document.location.hash=="string"&&document.location.hash.indexOf("pseudo=true")>=0;function oc(e,t){let n;return t.length===0?n=e:n=e.replace(/\{(\d+)\}/g,(r,s)=>{const i=s[0],a=t[i];let o=r;return typeof a=="string"?o=a:(typeof a=="number"||typeof a=="boolean"||a===void 0||a===null)&&(o=String(a)),o}),$g&&(n="["+n.replace(/[aouei]/g,"$&$&")+"]"),n}function re(e,t,...n){return oc(typeof e=="number"?Bg(e,t):t,n)}function Bg(e,t){var r;const n=(r=Ig())==null?void 0:r[e];if(typeof n!="string"){if(typeof t=="string")return t;throw new Error(`!!! NLS MISSING: ${e} !!!`)}return n}const Ar="en";let no=!1,ro=!1,so=!1,gi,io=Ar,lc=Ar,Vg,Mt;const Hn=globalThis;let Ue;typeof Hn.vscode<"u"&&typeof Hn.vscode.process<"u"?Ue=Hn.vscode.process:typeof process<"u"&&typeof((lg=process==null?void 0:process.versions)==null?void 0:lg.node)=="string"&&(Ue=process);const jg=typeof((ug=Ue==null?void 0:Ue.versions)==null?void 0:ug.electron)=="string"&&(Ue==null?void 0:Ue.type)==="renderer";if(typeof Ue=="object"){no=Ue.platform==="win32",ro=Ue.platform==="darwin",so=Ue.platform==="linux",so&&Ue.env.SNAP&&Ue.env.SNAP_REVISION,Ue.env.CI||Ue.env.BUILD_ARTIFACTSTAGINGDIRECTORY||Ue.env.GITHUB_WORKSPACE,gi=Ar,io=Ar;const e=Ue.env.VSCODE_NLS_CONFIG;if(e)try{const t=JSON.parse(e);gi=t.userLocale,lc=t.osLocale,io=t.resolvedLanguage||Ar,Vg=(cg=t.languagePack)==null?void 0:cg.translationsConfigFile}catch{}}else typeof navigator=="object"&&!jg?(Mt=navigator.userAgent,no=Mt.indexOf("Windows")>=0,ro=Mt.indexOf("Macintosh")>=0,(Mt.indexOf("Macintosh")>=0||Mt.indexOf("iPad")>=0||Mt.indexOf("iPhone")>=0)&&navigator.maxTouchPoints&&navigator.maxTouchPoints>0,so=Mt.indexOf("Linux")>=0,(Mt==null?void 0:Mt.indexOf("Mobi"))>=0,io=ac()||Ar,gi=navigator.language.toLowerCase(),lc=gi):console.error("Unable to resolve platform.");const Ds=no,Ug=ro,qt=Mt,qg=typeof Hn.postMessage=="function"&&!Hn.importScripts;(()=>{if(qg){const e=[];Hn.addEventListener("message",n=>{if(n.data&&n.data.vscodeScheduleAsyncWork)for(let r=0,s=e.length;r<s;r++){const i=e[r];if(i.id===n.data.vscodeScheduleAsyncWork){e.splice(r,1),i.callback();return}}});let t=0;return n=>{const r=++t;e.push({id:r,callback:n}),Hn.postMessage({vscodeScheduleAsyncWork:r},"*")}}return e=>setTimeout(e)})();const Wg=!!(qt&&qt.indexOf("Chrome")>=0);qt&&qt.indexOf("Firefox")>=0,!Wg&&qt&&qt.indexOf("Safari")>=0,qt&&qt.indexOf("Edg/")>=0,qt&&qt.indexOf("Android")>=0;function Hg(e){return e}class Yg{constructor(t,n){this.lastCache=void 0,this.lastArgKey=void 0,typeof t=="function"?(this._fn=t,this._computeKey=Hg):(this._fn=n,this._computeKey=t.getCacheKey)}get(t){const n=this._computeKey(t);return this.lastArgKey!==n&&(this.lastArgKey=n,this.lastCache=this._fn(t)),this.lastCache}}var Yn;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Running=1]="Running",e[e.Completed=2]="Completed"})(Yn||(Yn={}));class ao{constructor(t){this.executor=t,this._state=Yn.Uninitialized}get value(){if(this._state===Yn.Uninitialized){this._state=Yn.Running;try{this._value=this.executor()}catch(t){this._error=t}finally{this._state=Yn.Completed}}else if(this._state===Yn.Running)throw new Error("Cannot read the value of a lazy that is being initialized");if(this._error)throw this._error;return this._value}get rawValue(){return this._value}}function zg(e){return e.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function Gg(e){return e.source==="^"||e.source==="^$"||e.source==="$"||e.source==="^\\s*$"?!1:!!(e.exec("")&&e.lastIndex===0)}function Jg(e){return e.split(/\r\n|\r|\n/)}function Qg(e){for(let t=0,n=e.length;t<n;t++){const r=e.charCodeAt(t);if(r!==32&&r!==9)return t}return-1}function Kg(e,t=e.length-1){for(let n=t;n>=0;n--){const r=e.charCodeAt(n);if(r!==32&&r!==9)return n}return-1}function uc(e){return e>=65&&e<=90}function Xg(e,t){const n=Math.min(e.length,t.length);let r;for(r=0;r<n;r++)if(e.charCodeAt(r)!==t.charCodeAt(r))return r;return n}function Zg(e,t){const n=Math.min(e.length,t.length);let r;const s=e.length-1,i=t.length-1;for(r=0;r<n;r++)if(e.charCodeAt(s-r)!==t.charCodeAt(i-r))return r;return n}function oo(e){return 55296<=e&&e<=56319}function e0(e){return 56320<=e&&e<=57343}function t0(e,t){return(e-55296<<10)+(t-56320)+65536}function n0(e,t,n){const r=e.charCodeAt(n);if(oo(r)&&n+1<t){const s=e.charCodeAt(n+1);if(e0(s))return t0(r,s)}return r}const r0=/^[\t\n\r\x20-\x7E]*$/;function s0(e){return r0.test(e)}const Zt=class Zt{static getInstance(t){return Zt.cache.get(Array.from(t))}static getLocales(){return Zt._locales.value}constructor(t){this.confusableDictionary=t}isAmbiguous(t){return this.confusableDictionary.has(t)}getPrimaryConfusable(t){return this.confusableDictionary.get(t)}getConfusableCodePoints(){return new Set(this.confusableDictionary.keys())}};Zt.ambiguousCharacterData=new ao(()=>JSON.parse('{"_common":[8232,32,8233,32,5760,32,8192,32,8193,32,8194,32,8195,32,8196,32,8197,32,8198,32,8200,32,8201,32,8202,32,8287,32,8199,32,8239,32,2042,95,65101,95,65102,95,65103,95,8208,45,8209,45,8210,45,65112,45,1748,45,8259,45,727,45,8722,45,10134,45,11450,45,1549,44,1643,44,184,44,42233,44,894,59,2307,58,2691,58,1417,58,1795,58,1796,58,5868,58,65072,58,6147,58,6153,58,8282,58,1475,58,760,58,42889,58,8758,58,720,58,42237,58,451,33,11601,33,660,63,577,63,2429,63,5038,63,42731,63,119149,46,8228,46,1793,46,1794,46,42510,46,68176,46,1632,46,1776,46,42232,46,1373,96,65287,96,8219,96,1523,96,8242,96,1370,96,8175,96,65344,96,900,96,8189,96,8125,96,8127,96,8190,96,697,96,884,96,712,96,714,96,715,96,756,96,699,96,701,96,700,96,702,96,42892,96,1497,96,2036,96,2037,96,5194,96,5836,96,94033,96,94034,96,65339,91,10088,40,10098,40,12308,40,64830,40,65341,93,10089,41,10099,41,12309,41,64831,41,10100,123,119060,123,10101,125,65342,94,8270,42,1645,42,8727,42,66335,42,5941,47,8257,47,8725,47,8260,47,9585,47,10187,47,10744,47,119354,47,12755,47,12339,47,11462,47,20031,47,12035,47,65340,92,65128,92,8726,92,10189,92,10741,92,10745,92,119311,92,119355,92,12756,92,20022,92,12034,92,42872,38,708,94,710,94,5869,43,10133,43,66203,43,8249,60,10094,60,706,60,119350,60,5176,60,5810,60,5120,61,11840,61,12448,61,42239,61,8250,62,10095,62,707,62,119351,62,5171,62,94015,62,8275,126,732,126,8128,126,8764,126,65372,124,65293,45,118002,50,120784,50,120794,50,120804,50,120814,50,120824,50,130034,50,42842,50,423,50,1000,50,42564,50,5311,50,42735,50,119302,51,118003,51,120785,51,120795,51,120805,51,120815,51,120825,51,130035,51,42923,51,540,51,439,51,42858,51,11468,51,1248,51,94011,51,71882,51,118004,52,120786,52,120796,52,120806,52,120816,52,120826,52,130036,52,5070,52,71855,52,118005,53,120787,53,120797,53,120807,53,120817,53,120827,53,130037,53,444,53,71867,53,118006,54,120788,54,120798,54,120808,54,120818,54,120828,54,130038,54,11474,54,5102,54,71893,54,119314,55,118007,55,120789,55,120799,55,120809,55,120819,55,120829,55,130039,55,66770,55,71878,55,2819,56,2538,56,2666,56,125131,56,118008,56,120790,56,120800,56,120810,56,120820,56,120830,56,130040,56,547,56,546,56,66330,56,2663,57,2920,57,2541,57,3437,57,118009,57,120791,57,120801,57,120811,57,120821,57,120831,57,130041,57,42862,57,11466,57,71884,57,71852,57,71894,57,9082,97,65345,97,119834,97,119886,97,119938,97,119990,97,120042,97,120094,97,120146,97,120198,97,120250,97,120302,97,120354,97,120406,97,120458,97,593,97,945,97,120514,97,120572,97,120630,97,120688,97,120746,97,65313,65,117974,65,119808,65,119860,65,119912,65,119964,65,120016,65,120068,65,120120,65,120172,65,120224,65,120276,65,120328,65,120380,65,120432,65,913,65,120488,65,120546,65,120604,65,120662,65,120720,65,5034,65,5573,65,42222,65,94016,65,66208,65,119835,98,119887,98,119939,98,119991,98,120043,98,120095,98,120147,98,120199,98,120251,98,120303,98,120355,98,120407,98,120459,98,388,98,5071,98,5234,98,5551,98,65314,66,8492,66,117975,66,119809,66,119861,66,119913,66,120017,66,120069,66,120121,66,120173,66,120225,66,120277,66,120329,66,120381,66,120433,66,42932,66,914,66,120489,66,120547,66,120605,66,120663,66,120721,66,5108,66,5623,66,42192,66,66178,66,66209,66,66305,66,65347,99,8573,99,119836,99,119888,99,119940,99,119992,99,120044,99,120096,99,120148,99,120200,99,120252,99,120304,99,120356,99,120408,99,120460,99,7428,99,1010,99,11429,99,43951,99,66621,99,128844,67,71913,67,71922,67,65315,67,8557,67,8450,67,8493,67,117976,67,119810,67,119862,67,119914,67,119966,67,120018,67,120174,67,120226,67,120278,67,120330,67,120382,67,120434,67,1017,67,11428,67,5087,67,42202,67,66210,67,66306,67,66581,67,66844,67,8574,100,8518,100,119837,100,119889,100,119941,100,119993,100,120045,100,120097,100,120149,100,120201,100,120253,100,120305,100,120357,100,120409,100,120461,100,1281,100,5095,100,5231,100,42194,100,8558,68,8517,68,117977,68,119811,68,119863,68,119915,68,119967,68,120019,68,120071,68,120123,68,120175,68,120227,68,120279,68,120331,68,120383,68,120435,68,5024,68,5598,68,5610,68,42195,68,8494,101,65349,101,8495,101,8519,101,119838,101,119890,101,119942,101,120046,101,120098,101,120150,101,120202,101,120254,101,120306,101,120358,101,120410,101,120462,101,43826,101,1213,101,8959,69,65317,69,8496,69,117978,69,119812,69,119864,69,119916,69,120020,69,120072,69,120124,69,120176,69,120228,69,120280,69,120332,69,120384,69,120436,69,917,69,120492,69,120550,69,120608,69,120666,69,120724,69,11577,69,5036,69,42224,69,71846,69,71854,69,66182,69,119839,102,119891,102,119943,102,119995,102,120047,102,120099,102,120151,102,120203,102,120255,102,120307,102,120359,102,120411,102,120463,102,43829,102,42905,102,383,102,7837,102,1412,102,119315,70,8497,70,117979,70,119813,70,119865,70,119917,70,120021,70,120073,70,120125,70,120177,70,120229,70,120281,70,120333,70,120385,70,120437,70,42904,70,988,70,120778,70,5556,70,42205,70,71874,70,71842,70,66183,70,66213,70,66853,70,65351,103,8458,103,119840,103,119892,103,119944,103,120048,103,120100,103,120152,103,120204,103,120256,103,120308,103,120360,103,120412,103,120464,103,609,103,7555,103,397,103,1409,103,117980,71,119814,71,119866,71,119918,71,119970,71,120022,71,120074,71,120126,71,120178,71,120230,71,120282,71,120334,71,120386,71,120438,71,1292,71,5056,71,5107,71,42198,71,65352,104,8462,104,119841,104,119945,104,119997,104,120049,104,120101,104,120153,104,120205,104,120257,104,120309,104,120361,104,120413,104,120465,104,1211,104,1392,104,5058,104,65320,72,8459,72,8460,72,8461,72,117981,72,119815,72,119867,72,119919,72,120023,72,120179,72,120231,72,120283,72,120335,72,120387,72,120439,72,919,72,120494,72,120552,72,120610,72,120668,72,120726,72,11406,72,5051,72,5500,72,42215,72,66255,72,731,105,9075,105,65353,105,8560,105,8505,105,8520,105,119842,105,119894,105,119946,105,119998,105,120050,105,120102,105,120154,105,120206,105,120258,105,120310,105,120362,105,120414,105,120466,105,120484,105,618,105,617,105,953,105,8126,105,890,105,120522,105,120580,105,120638,105,120696,105,120754,105,1110,105,42567,105,1231,105,43893,105,5029,105,71875,105,65354,106,8521,106,119843,106,119895,106,119947,106,119999,106,120051,106,120103,106,120155,106,120207,106,120259,106,120311,106,120363,106,120415,106,120467,106,1011,106,1112,106,65322,74,117983,74,119817,74,119869,74,119921,74,119973,74,120025,74,120077,74,120129,74,120181,74,120233,74,120285,74,120337,74,120389,74,120441,74,42930,74,895,74,1032,74,5035,74,5261,74,42201,74,119844,107,119896,107,119948,107,120000,107,120052,107,120104,107,120156,107,120208,107,120260,107,120312,107,120364,107,120416,107,120468,107,8490,75,65323,75,117984,75,119818,75,119870,75,119922,75,119974,75,120026,75,120078,75,120130,75,120182,75,120234,75,120286,75,120338,75,120390,75,120442,75,922,75,120497,75,120555,75,120613,75,120671,75,120729,75,11412,75,5094,75,5845,75,42199,75,66840,75,1472,108,8739,73,9213,73,65512,73,1633,108,1777,73,66336,108,125127,108,118001,108,120783,73,120793,73,120803,73,120813,73,120823,73,130033,73,65321,73,8544,73,8464,73,8465,73,117982,108,119816,73,119868,73,119920,73,120024,73,120128,73,120180,73,120232,73,120284,73,120336,73,120388,73,120440,73,65356,108,8572,73,8467,108,119845,108,119897,108,119949,108,120001,108,120053,108,120105,73,120157,73,120209,73,120261,73,120313,73,120365,73,120417,73,120469,73,448,73,120496,73,120554,73,120612,73,120670,73,120728,73,11410,73,1030,73,1216,73,1493,108,1503,108,1575,108,126464,108,126592,108,65166,108,65165,108,1994,108,11599,73,5825,73,42226,73,93992,73,66186,124,66313,124,119338,76,8556,76,8466,76,117985,76,119819,76,119871,76,119923,76,120027,76,120079,76,120131,76,120183,76,120235,76,120287,76,120339,76,120391,76,120443,76,11472,76,5086,76,5290,76,42209,76,93974,76,71843,76,71858,76,66587,76,66854,76,65325,77,8559,77,8499,77,117986,77,119820,77,119872,77,119924,77,120028,77,120080,77,120132,77,120184,77,120236,77,120288,77,120340,77,120392,77,120444,77,924,77,120499,77,120557,77,120615,77,120673,77,120731,77,1018,77,11416,77,5047,77,5616,77,5846,77,42207,77,66224,77,66321,77,119847,110,119899,110,119951,110,120003,110,120055,110,120107,110,120159,110,120211,110,120263,110,120315,110,120367,110,120419,110,120471,110,1400,110,1404,110,65326,78,8469,78,117987,78,119821,78,119873,78,119925,78,119977,78,120029,78,120081,78,120185,78,120237,78,120289,78,120341,78,120393,78,120445,78,925,78,120500,78,120558,78,120616,78,120674,78,120732,78,11418,78,42208,78,66835,78,3074,111,3202,111,3330,111,3458,111,2406,111,2662,111,2790,111,3046,111,3174,111,3302,111,3430,111,3664,111,3792,111,4160,111,1637,111,1781,111,65359,111,8500,111,119848,111,119900,111,119952,111,120056,111,120108,111,120160,111,120212,111,120264,111,120316,111,120368,111,120420,111,120472,111,7439,111,7441,111,43837,111,959,111,120528,111,120586,111,120644,111,120702,111,120760,111,963,111,120532,111,120590,111,120648,111,120706,111,120764,111,11423,111,4351,111,1413,111,1505,111,1607,111,126500,111,126564,111,126596,111,65259,111,65260,111,65258,111,65257,111,1726,111,64428,111,64429,111,64427,111,64426,111,1729,111,64424,111,64425,111,64423,111,64422,111,1749,111,3360,111,4125,111,66794,111,71880,111,71895,111,66604,111,1984,79,2534,79,2918,79,12295,79,70864,79,71904,79,118000,79,120782,79,120792,79,120802,79,120812,79,120822,79,130032,79,65327,79,117988,79,119822,79,119874,79,119926,79,119978,79,120030,79,120082,79,120134,79,120186,79,120238,79,120290,79,120342,79,120394,79,120446,79,927,79,120502,79,120560,79,120618,79,120676,79,120734,79,11422,79,1365,79,11604,79,4816,79,2848,79,66754,79,42227,79,71861,79,66194,79,66219,79,66564,79,66838,79,9076,112,65360,112,119849,112,119901,112,119953,112,120005,112,120057,112,120109,112,120161,112,120213,112,120265,112,120317,112,120369,112,120421,112,120473,112,961,112,120530,112,120544,112,120588,112,120602,112,120646,112,120660,112,120704,112,120718,112,120762,112,120776,112,11427,112,65328,80,8473,80,117989,80,119823,80,119875,80,119927,80,119979,80,120031,80,120083,80,120187,80,120239,80,120291,80,120343,80,120395,80,120447,80,929,80,120504,80,120562,80,120620,80,120678,80,120736,80,11426,80,5090,80,5229,80,42193,80,66197,80,119850,113,119902,113,119954,113,120006,113,120058,113,120110,113,120162,113,120214,113,120266,113,120318,113,120370,113,120422,113,120474,113,1307,113,1379,113,1382,113,8474,81,117990,81,119824,81,119876,81,119928,81,119980,81,120032,81,120084,81,120188,81,120240,81,120292,81,120344,81,120396,81,120448,81,11605,81,119851,114,119903,114,119955,114,120007,114,120059,114,120111,114,120163,114,120215,114,120267,114,120319,114,120371,114,120423,114,120475,114,43847,114,43848,114,7462,114,11397,114,43905,114,119318,82,8475,82,8476,82,8477,82,117991,82,119825,82,119877,82,119929,82,120033,82,120189,82,120241,82,120293,82,120345,82,120397,82,120449,82,422,82,5025,82,5074,82,66740,82,5511,82,42211,82,94005,82,65363,115,119852,115,119904,115,119956,115,120008,115,120060,115,120112,115,120164,115,120216,115,120268,115,120320,115,120372,115,120424,115,120476,115,42801,115,445,115,1109,115,43946,115,71873,115,66632,115,65331,83,117992,83,119826,83,119878,83,119930,83,119982,83,120034,83,120086,83,120138,83,120190,83,120242,83,120294,83,120346,83,120398,83,120450,83,1029,83,1359,83,5077,83,5082,83,42210,83,94010,83,66198,83,66592,83,119853,116,119905,116,119957,116,120009,116,120061,116,120113,116,120165,116,120217,116,120269,116,120321,116,120373,116,120425,116,120477,116,8868,84,10201,84,128872,84,65332,84,117993,84,119827,84,119879,84,119931,84,119983,84,120035,84,120087,84,120139,84,120191,84,120243,84,120295,84,120347,84,120399,84,120451,84,932,84,120507,84,120565,84,120623,84,120681,84,120739,84,11430,84,5026,84,42196,84,93962,84,71868,84,66199,84,66225,84,66325,84,119854,117,119906,117,119958,117,120010,117,120062,117,120114,117,120166,117,120218,117,120270,117,120322,117,120374,117,120426,117,120478,117,42911,117,7452,117,43854,117,43858,117,651,117,965,117,120534,117,120592,117,120650,117,120708,117,120766,117,1405,117,66806,117,71896,117,8746,85,8899,85,117994,85,119828,85,119880,85,119932,85,119984,85,120036,85,120088,85,120140,85,120192,85,120244,85,120296,85,120348,85,120400,85,120452,85,1357,85,4608,85,66766,85,5196,85,42228,85,94018,85,71864,85,8744,118,8897,118,65366,118,8564,118,119855,118,119907,118,119959,118,120011,118,120063,118,120115,118,120167,118,120219,118,120271,118,120323,118,120375,118,120427,118,120479,118,7456,118,957,118,120526,118,120584,118,120642,118,120700,118,120758,118,1141,118,1496,118,71430,118,43945,118,71872,118,119309,86,1639,86,1783,86,8548,86,117995,86,119829,86,119881,86,119933,86,119985,86,120037,86,120089,86,120141,86,120193,86,120245,86,120297,86,120349,86,120401,86,120453,86,1140,86,11576,86,5081,86,5167,86,42719,86,42214,86,93960,86,71840,86,66845,86,623,119,119856,119,119908,119,119960,119,120012,119,120064,119,120116,119,120168,119,120220,119,120272,119,120324,119,120376,119,120428,119,120480,119,7457,119,1121,119,1309,119,1377,119,71434,119,71438,119,71439,119,43907,119,71910,87,71919,87,117996,87,119830,87,119882,87,119934,87,119986,87,120038,87,120090,87,120142,87,120194,87,120246,87,120298,87,120350,87,120402,87,120454,87,1308,87,5043,87,5076,87,42218,87,5742,120,10539,120,10540,120,10799,120,65368,120,8569,120,119857,120,119909,120,119961,120,120013,120,120065,120,120117,120,120169,120,120221,120,120273,120,120325,120,120377,120,120429,120,120481,120,5441,120,5501,120,5741,88,9587,88,66338,88,71916,88,65336,88,8553,88,117997,88,119831,88,119883,88,119935,88,119987,88,120039,88,120091,88,120143,88,120195,88,120247,88,120299,88,120351,88,120403,88,120455,88,42931,88,935,88,120510,88,120568,88,120626,88,120684,88,120742,88,11436,88,11613,88,5815,88,42219,88,66192,88,66228,88,66327,88,66855,88,611,121,7564,121,65369,121,119858,121,119910,121,119962,121,120014,121,120066,121,120118,121,120170,121,120222,121,120274,121,120326,121,120378,121,120430,121,120482,121,655,121,7935,121,43866,121,947,121,8509,121,120516,121,120574,121,120632,121,120690,121,120748,121,1199,121,4327,121,71900,121,65337,89,117998,89,119832,89,119884,89,119936,89,119988,89,120040,89,120092,89,120144,89,120196,89,120248,89,120300,89,120352,89,120404,89,120456,89,933,89,978,89,120508,89,120566,89,120624,89,120682,89,120740,89,11432,89,1198,89,5033,89,5053,89,42220,89,94019,89,71844,89,66226,89,119859,122,119911,122,119963,122,120015,122,120067,122,120119,122,120171,122,120223,122,120275,122,120327,122,120379,122,120431,122,120483,122,7458,122,43923,122,71876,122,71909,90,66293,90,65338,90,8484,90,8488,90,117999,90,119833,90,119885,90,119937,90,119989,90,120041,90,120197,90,120249,90,120301,90,120353,90,120405,90,120457,90,918,90,120493,90,120551,90,120609,90,120667,90,120725,90,5059,90,42204,90,71849,90,65282,34,65283,35,65284,36,65285,37,65286,38,65290,42,65291,43,65294,46,65295,47,65296,48,65298,50,65299,51,65300,52,65301,53,65302,54,65303,55,65304,56,65305,57,65308,60,65309,61,65310,62,65312,64,65316,68,65318,70,65319,71,65324,76,65329,81,65330,82,65333,85,65334,86,65335,87,65343,95,65346,98,65348,100,65350,102,65355,107,65357,109,65358,110,65361,113,65362,114,65364,116,65365,117,65367,119,65370,122,65371,123,65373,125,119846,109],"_default":[160,32,8211,45,65374,126,8218,44,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"cs":[65374,126,8218,44,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"de":[65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"es":[8211,45,65374,126,8218,44,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"fr":[65374,126,8218,44,65306,58,65281,33,8216,96,8245,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"it":[160,32,8211,45,65374,126,8218,44,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"ja":[8211,45,8218,44,65281,33,8216,96,8245,96,180,96,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65292,44,65297,49,65307,59],"ko":[8211,45,65374,126,8218,44,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"pl":[65374,126,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"pt-BR":[65374,126,8218,44,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"qps-ploc":[160,32,8211,45,65374,126,8218,44,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"ru":[65374,126,8218,44,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,305,105,921,73,1009,112,215,120,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"tr":[160,32,8211,45,65374,126,8218,44,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"zh-hans":[160,32,65374,126,8218,44,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65297,49],"zh-hant":[8211,45,65374,126,8218,44,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89]}')),Zt.cache=new Yg({getCacheKey:JSON.stringify},t=>{function n(c){const f=new Map;for(let d=0;d<c.length;d+=2)f.set(c[d],c[d+1]);return f}function r(c,f){const d=new Map(c);for(const[y,D]of f)d.set(y,D);return d}function s(c,f){if(!c)return f;const d=new Map;for(const[y,D]of c)f.has(y)&&d.set(y,D);return d}const i=Zt.ambiguousCharacterData.value;let a=t.filter(c=>!c.startsWith("_")&&Object.hasOwn(i,c));a.length===0&&(a=["_default"]);let o;for(const c of a){const f=n(i[c]);o=s(o,f)}const l=n(i._common),u=r(l,o);return new Zt(u)}),Zt._locales=new ao(()=>Object.keys(Zt.ambiguousCharacterData.value).filter(t=>!t.startsWith("_")));let Ss=Zt;const ys=class ys{static getRawData(){return JSON.parse('{"_common":[11,12,13,127,847,1564,4447,4448,6068,6069,6155,6156,6157,6158,7355,7356,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8204,8205,8206,8207,8234,8235,8236,8237,8238,8239,8287,8288,8289,8290,8291,8292,8293,8294,8295,8296,8297,8298,8299,8300,8301,8302,8303,10240,12644,65024,65025,65026,65027,65028,65029,65030,65031,65032,65033,65034,65035,65036,65037,65038,65039,65279,65440,65520,65521,65522,65523,65524,65525,65526,65527,65528,65532,78844,119155,119156,119157,119158,119159,119160,119161,119162,917504,917505,917506,917507,917508,917509,917510,917511,917512,917513,917514,917515,917516,917517,917518,917519,917520,917521,917522,917523,917524,917525,917526,917527,917528,917529,917530,917531,917532,917533,917534,917535,917536,917537,917538,917539,917540,917541,917542,917543,917544,917545,917546,917547,917548,917549,917550,917551,917552,917553,917554,917555,917556,917557,917558,917559,917560,917561,917562,917563,917564,917565,917566,917567,917568,917569,917570,917571,917572,917573,917574,917575,917576,917577,917578,917579,917580,917581,917582,917583,917584,917585,917586,917587,917588,917589,917590,917591,917592,917593,917594,917595,917596,917597,917598,917599,917600,917601,917602,917603,917604,917605,917606,917607,917608,917609,917610,917611,917612,917613,917614,917615,917616,917617,917618,917619,917620,917621,917622,917623,917624,917625,917626,917627,917628,917629,917630,917631,917760,917761,917762,917763,917764,917765,917766,917767,917768,917769,917770,917771,917772,917773,917774,917775,917776,917777,917778,917779,917780,917781,917782,917783,917784,917785,917786,917787,917788,917789,917790,917791,917792,917793,917794,917795,917796,917797,917798,917799,917800,917801,917802,917803,917804,917805,917806,917807,917808,917809,917810,917811,917812,917813,917814,917815,917816,917817,917818,917819,917820,917821,917822,917823,917824,917825,917826,917827,917828,917829,917830,917831,917832,917833,917834,917835,917836,917837,917838,917839,917840,917841,917842,917843,917844,917845,917846,917847,917848,917849,917850,917851,917852,917853,917854,917855,917856,917857,917858,917859,917860,917861,917862,917863,917864,917865,917866,917867,917868,917869,917870,917871,917872,917873,917874,917875,917876,917877,917878,917879,917880,917881,917882,917883,917884,917885,917886,917887,917888,917889,917890,917891,917892,917893,917894,917895,917896,917897,917898,917899,917900,917901,917902,917903,917904,917905,917906,917907,917908,917909,917910,917911,917912,917913,917914,917915,917916,917917,917918,917919,917920,917921,917922,917923,917924,917925,917926,917927,917928,917929,917930,917931,917932,917933,917934,917935,917936,917937,917938,917939,917940,917941,917942,917943,917944,917945,917946,917947,917948,917949,917950,917951,917952,917953,917954,917955,917956,917957,917958,917959,917960,917961,917962,917963,917964,917965,917966,917967,917968,917969,917970,917971,917972,917973,917974,917975,917976,917977,917978,917979,917980,917981,917982,917983,917984,917985,917986,917987,917988,917989,917990,917991,917992,917993,917994,917995,917996,917997,917998,917999],"cs":[173,8203,12288],"de":[173,8203,12288],"es":[8203,12288],"fr":[173,8203,12288],"it":[160,173,12288],"ja":[173],"ko":[173,12288],"pl":[173,8203,12288],"pt-BR":[173,8203,12288],"qps-ploc":[160,173,8203,12288],"ru":[173,12288],"tr":[160,173,8203,12288],"zh-hans":[160,173,8203,12288],"zh-hant":[173,12288]}')}static getData(){return this._data||(this._data=new Set([...Object.values(ys.getRawData())].flat())),this._data}static isInvisibleCharacter(t){return ys.getData().has(t)}static get codePoints(){return ys.getData()}};ys._data=void 0;let Es=ys;const lo="default",i0="$initialize";class a0{constructor(t,n,r,s,i){this.vsWorker=t,this.req=n,this.channel=r,this.method=s,this.args=i,this.type=0}}class cc{constructor(t,n,r,s){this.vsWorker=t,this.seq=n,this.res=r,this.err=s,this.type=1}}class o0{constructor(t,n,r,s,i){this.vsWorker=t,this.req=n,this.channel=r,this.eventName=s,this.arg=i,this.type=2}}class l0{constructor(t,n,r){this.vsWorker=t,this.req=n,this.event=r,this.type=3}}class u0{constructor(t,n){this.vsWorker=t,this.req=n,this.type=4}}class c0{constructor(t){this._workerId=-1,this._handler=t,this._lastSentReq=0,this._pendingReplies=Object.create(null),this._pendingEmitters=new Map,this._pendingEvents=new Map}setWorkerId(t){this._workerId=t}async sendMessage(t,n,r){const s=String(++this._lastSentReq);return new Promise((i,a)=>{this._pendingReplies[s]={resolve:i,reject:a},this._send(new a0(this._workerId,s,t,n,r))})}listen(t,n,r){let s=null;const i=new Ut({onWillAddFirstListener:()=>{s=String(++this._lastSentReq),this._pendingEmitters.set(s,i),this._send(new o0(this._workerId,s,t,n,r))},onDidRemoveLastListener:()=>{this._pendingEmitters.delete(s),this._send(new u0(this._workerId,s)),s=null}});return i.event}handleMessage(t){!t||!t.vsWorker||this._workerId!==-1&&t.vsWorker!==this._workerId||this._handleMessage(t)}createProxyToRemoteChannel(t,n){const r={get:(s,i)=>(typeof i=="string"&&!s[i]&&(hc(i)?s[i]=a=>this.listen(t,i,a):fc(i)?s[i]=this.listen(t,i,void 0):i.charCodeAt(0)===36&&(s[i]=async(...a)=>(await(n==null?void 0:n()),this.sendMessage(t,i,a)))),s[i])};return new Proxy(Object.create(null),r)}_handleMessage(t){switch(t.type){case 1:return this._handleReplyMessage(t);case 0:return this._handleRequestMessage(t);case 2:return this._handleSubscribeEventMessage(t);case 3:return this._handleEventMessage(t);case 4:return this._handleUnsubscribeEventMessage(t)}}_handleReplyMessage(t){if(!this._pendingReplies[t.seq]){console.warn("Got reply to unknown seq");return}const n=this._pendingReplies[t.seq];if(delete this._pendingReplies[t.seq],t.err){let r=t.err;if(t.err.$isError){const s=new Error;s.name=t.err.name,s.message=t.err.message,s.stack=t.err.stack,r=s}n.reject(r);return}n.resolve(t.res)}_handleRequestMessage(t){const n=t.req;this._handler.handleMessage(t.channel,t.method,t.args).then(s=>{this._send(new cc(this._workerId,n,s,void 0))},s=>{s.detail instanceof Error&&(s.detail=Ja(s.detail)),this._send(new cc(this._workerId,n,void 0,Ja(s)))})}_handleSubscribeEventMessage(t){const n=t.req,r=this._handler.handleEvent(t.channel,t.eventName,t.arg)(s=>{this._send(new l0(this._workerId,n,s))});this._pendingEvents.set(n,r)}_handleEventMessage(t){if(!this._pendingEmitters.has(t.req)){console.warn("Got event for unknown req");return}this._pendingEmitters.get(t.req).fire(t.event)}_handleUnsubscribeEventMessage(t){if(!this._pendingEvents.has(t.req)){console.warn("Got unsubscribe for unknown req");return}this._pendingEvents.get(t.req).dispose(),this._pendingEvents.delete(t.req)}_send(t){const n=[];if(t.type===0)for(let r=0;r<t.args.length;r++){const s=t.args[r];s instanceof ArrayBuffer&&n.push(s)}else t.type===1&&t.res instanceof ArrayBuffer&&n.push(t.res);this._handler.sendMessage(t,n)}}function fc(e){return e[0]==="o"&&e[1]==="n"&&uc(e.charCodeAt(2))}function hc(e){return/^onDynamic/.test(e)&&uc(e.charCodeAt(9))}class f0{constructor(t,n){this._localChannels=new Map,this._remoteChannels=new Map,this._protocol=new c0({sendMessage:(r,s)=>{t(r,s)},handleMessage:(r,s,i)=>this._handleMessage(r,s,i),handleEvent:(r,s,i)=>this._handleEvent(r,s,i)}),this.requestHandler=n(this)}onmessage(t){this._protocol.handleMessage(t)}_handleMessage(t,n,r){if(t===lo&&n===i0)return this.initialize(r[0]);const s=t===lo?this.requestHandler:this._localChannels.get(t);if(!s)return Promise.reject(new Error(`Missing channel ${t} on worker thread`));const i=s[n];if(typeof i!="function")return Promise.reject(new Error(`Missing method ${n} on worker thread channel ${t}`));try{return Promise.resolve(i.apply(s,r))}catch(a){return Promise.reject(a)}}_handleEvent(t,n,r){const s=t===lo?this.requestHandler:this._localChannels.get(t);if(!s)throw new Error(`Missing channel ${t} on worker thread`);if(hc(n)){const i=s[n];if(typeof i!="function")throw new Error(`Missing dynamic event ${n} on request handler.`);const a=i.call(s,r);if(typeof a!="function")throw new Error(`Missing dynamic event ${n} on request handler.`);return a}if(fc(n)){const i=s[n];if(typeof i!="function")throw new Error(`Missing event ${n} on request handler.`);return i}throw new Error(`Malformed event name ${n}`)}getChannel(t){if(!this._remoteChannels.has(t)){const n=this._protocol.createProxyToRemoteChannel(t);this._remoteChannels.set(t,n)}return this._remoteChannels.get(t)}async initialize(t){this._protocol.setWorkerId(t)}}let dc=!1;function h0(e){if(dc)throw new Error("WebWorker already initialized!");dc=!0;const t=new f0(n=>globalThis.postMessage(n),n=>e(n));return globalThis.onmessage=n=>{t.onmessage(n.data)},t}class xn{constructor(t,n,r,s){this.originalStart=t,this.originalLength=n,this.modifiedStart=r,this.modifiedLength=s}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}}new ao(()=>new Uint8Array(256));function mc(e,t){return(t<<5)-t+e|0}function d0(e,t){t=mc(149417,t);for(let n=0,r=e.length;n<r;n++)t=mc(e.charCodeAt(n),t);return t}class pc{constructor(t){this.source=t}getElements(){const t=this.source,n=new Int32Array(t.length);for(let r=0,s=t.length;r<s;r++)n[r]=t.charCodeAt(r);return n}}function m0(e,t,n){return new Nn(new pc(e),new pc(t)).ComputeDiff(n).changes}class xr{static Assert(t,n){if(!t)throw new Error(n)}}class Nr{static Copy(t,n,r,s,i){for(let a=0;a<i;a++)r[s+a]=t[n+a]}static Copy2(t,n,r,s,i){for(let a=0;a<i;a++)r[s+a]=t[n+a]}}class gc{constructor(){this.m_changes=[],this.m_originalStart=1073741824,this.m_modifiedStart=1073741824,this.m_originalCount=0,this.m_modifiedCount=0}MarkNextChange(){(this.m_originalCount>0||this.m_modifiedCount>0)&&this.m_changes.push(new xn(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)),this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=1073741824,this.m_modifiedStart=1073741824}AddOriginalElement(t,n){this.m_originalStart=Math.min(this.m_originalStart,t),this.m_modifiedStart=Math.min(this.m_modifiedStart,n),this.m_originalCount++}AddModifiedElement(t,n){this.m_originalStart=Math.min(this.m_originalStart,t),this.m_modifiedStart=Math.min(this.m_modifiedStart,n),this.m_modifiedCount++}getChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes}getReverseChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes}}class Nn{constructor(t,n,r=null){this.ContinueProcessingPredicate=r,this._originalSequence=t,this._modifiedSequence=n;const[s,i,a]=Nn._getElements(t),[o,l,u]=Nn._getElements(n);this._hasStrings=a&&u,this._originalStringElements=s,this._originalElementsOrHash=i,this._modifiedStringElements=o,this._modifiedElementsOrHash=l,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(t){return t.length>0&&typeof t[0]=="string"}static _getElements(t){const n=t.getElements();if(Nn._isStringArray(n)){const r=new Int32Array(n.length);for(let s=0,i=n.length;s<i;s++)r[s]=d0(n[s],0);return[n,r,!0]}return n instanceof Int32Array?[[],n,!1]:[[],new Int32Array(n),!1]}ElementsAreEqual(t,n){return this._originalElementsOrHash[t]!==this._modifiedElementsOrHash[n]?!1:this._hasStrings?this._originalStringElements[t]===this._modifiedStringElements[n]:!0}ElementsAreStrictEqual(t,n){if(!this.ElementsAreEqual(t,n))return!1;const r=Nn._getStrictElement(this._originalSequence,t),s=Nn._getStrictElement(this._modifiedSequence,n);return r===s}static _getStrictElement(t,n){return typeof t.getStrictElement=="function"?t.getStrictElement(n):null}OriginalElementsAreEqual(t,n){return this._originalElementsOrHash[t]!==this._originalElementsOrHash[n]?!1:this._hasStrings?this._originalStringElements[t]===this._originalStringElements[n]:!0}ModifiedElementsAreEqual(t,n){return this._modifiedElementsOrHash[t]!==this._modifiedElementsOrHash[n]?!1:this._hasStrings?this._modifiedStringElements[t]===this._modifiedStringElements[n]:!0}ComputeDiff(t){return this._ComputeDiff(0,this._originalElementsOrHash.length-1,0,this._modifiedElementsOrHash.length-1,t)}_ComputeDiff(t,n,r,s,i){const a=[!1];let o=this.ComputeDiffRecursive(t,n,r,s,a);return i&&(o=this.PrettifyChanges(o)),{quitEarly:a[0],changes:o}}ComputeDiffRecursive(t,n,r,s,i){for(i[0]=!1;t<=n&&r<=s&&this.ElementsAreEqual(t,r);)t++,r++;for(;n>=t&&s>=r&&this.ElementsAreEqual(n,s);)n--,s--;if(t>n||r>s){let f;return r<=s?(xr.Assert(t===n+1,"originalStart should only be one more than originalEnd"),f=[new xn(t,0,r,s-r+1)]):t<=n?(xr.Assert(r===s+1,"modifiedStart should only be one more than modifiedEnd"),f=[new xn(t,n-t+1,r,0)]):(xr.Assert(t===n+1,"originalStart should only be one more than originalEnd"),xr.Assert(r===s+1,"modifiedStart should only be one more than modifiedEnd"),f=[]),f}const a=[0],o=[0],l=this.ComputeRecursionPoint(t,n,r,s,a,o,i),u=a[0],c=o[0];if(l!==null)return l;if(!i[0]){const f=this.ComputeDiffRecursive(t,u,r,c,i);let d=[];return i[0]?d=[new xn(u+1,n-(u+1)+1,c+1,s-(c+1)+1)]:d=this.ComputeDiffRecursive(u+1,n,c+1,s,i),this.ConcatenateChanges(f,d)}return[new xn(t,n-t+1,r,s-r+1)]}WALKTRACE(t,n,r,s,i,a,o,l,u,c,f,d,y,D,S,N,x,k){let b=null,w=null,h=new gc,g=n,m=r,E=y[0]-N[0]-s,v=-1073741824,L=this.m_forwardHistory.length-1;do{const C=E+t;C===g||C<m&&u[C-1]<u[C+1]?(f=u[C+1],D=f-E-s,f<v&&h.MarkNextChange(),v=f,h.AddModifiedElement(f+1,D),E=C+1-t):(f=u[C-1]+1,D=f-E-s,f<v&&h.MarkNextChange(),v=f-1,h.AddOriginalElement(f,D+1),E=C-1-t),L>=0&&(u=this.m_forwardHistory[L],t=u[0],g=1,m=u.length-1)}while(--L>=-1);if(b=h.getReverseChanges(),k[0]){let C=y[0]+1,A=N[0]+1;if(b!==null&&b.length>0){const F=b[b.length-1];C=Math.max(C,F.getOriginalEnd()),A=Math.max(A,F.getModifiedEnd())}w=[new xn(C,d-C+1,A,S-A+1)]}else{h=new gc,g=a,m=o,E=y[0]-N[0]-l,v=1073741824,L=x?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{const C=E+i;C===g||C<m&&c[C-1]>=c[C+1]?(f=c[C+1]-1,D=f-E-l,f>v&&h.MarkNextChange(),v=f+1,h.AddOriginalElement(f+1,D+1),E=C+1-i):(f=c[C-1],D=f-E-l,f>v&&h.MarkNextChange(),v=f,h.AddModifiedElement(f+1,D+1),E=C-1-i),L>=0&&(c=this.m_reverseHistory[L],i=c[0],g=1,m=c.length-1)}while(--L>=-1);w=h.getChanges()}return this.ConcatenateChanges(b,w)}ComputeRecursionPoint(t,n,r,s,i,a,o){let l=0,u=0,c=0,f=0,d=0,y=0;t--,r--,i[0]=0,a[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];const D=n-t+(s-r),S=D+1,N=new Int32Array(S),x=new Int32Array(S),k=s-r,b=n-t,w=t-r,h=n-s,m=(b-k)%2===0;N[k]=t,x[b]=n,o[0]=!1;for(let E=1;E<=D/2+1;E++){let v=0,L=0;c=this.ClipDiagonalBound(k-E,E,k,S),f=this.ClipDiagonalBound(k+E,E,k,S);for(let A=c;A<=f;A+=2){A===c||A<f&&N[A-1]<N[A+1]?l=N[A+1]:l=N[A-1]+1,u=l-(A-k)-w;const F=l;for(;l<n&&u<s&&this.ElementsAreEqual(l+1,u+1);)l++,u++;if(N[A]=l,l+u>v+L&&(v=l,L=u),!m&&Math.abs(A-b)<=E-1&&l>=x[A])return i[0]=l,a[0]=u,F<=x[A]&&E<=1448?this.WALKTRACE(k,c,f,w,b,d,y,h,N,x,l,n,i,u,s,a,m,o):null}const C=(v-t+(L-r)-E)/2;if(this.ContinueProcessingPredicate!==null&&!this.ContinueProcessingPredicate(v,C))return o[0]=!0,i[0]=v,a[0]=L,C>0&&E<=1448?this.WALKTRACE(k,c,f,w,b,d,y,h,N,x,l,n,i,u,s,a,m,o):(t++,r++,[new xn(t,n-t+1,r,s-r+1)]);d=this.ClipDiagonalBound(b-E,E,b,S),y=this.ClipDiagonalBound(b+E,E,b,S);for(let A=d;A<=y;A+=2){A===d||A<y&&x[A-1]>=x[A+1]?l=x[A+1]-1:l=x[A-1],u=l-(A-b)-h;const F=l;for(;l>t&&u>r&&this.ElementsAreEqual(l,u);)l--,u--;if(x[A]=l,m&&Math.abs(A-k)<=E&&l<=N[A])return i[0]=l,a[0]=u,F>=N[A]&&E<=1448?this.WALKTRACE(k,c,f,w,b,d,y,h,N,x,l,n,i,u,s,a,m,o):null}if(E<=1447){let A=new Int32Array(f-c+2);A[0]=k-c+1,Nr.Copy2(N,c,A,1,f-c+1),this.m_forwardHistory.push(A),A=new Int32Array(y-d+2),A[0]=b-d+1,Nr.Copy2(x,d,A,1,y-d+1),this.m_reverseHistory.push(A)}}return this.WALKTRACE(k,c,f,w,b,d,y,h,N,x,l,n,i,u,s,a,m,o)}PrettifyChanges(t){for(let n=0;n<t.length;n++){const r=t[n],s=n<t.length-1?t[n+1].originalStart:this._originalElementsOrHash.length,i=n<t.length-1?t[n+1].modifiedStart:this._modifiedElementsOrHash.length,a=r.originalLength>0,o=r.modifiedLength>0;for(;r.originalStart+r.originalLength<s&&r.modifiedStart+r.modifiedLength<i&&(!a||this.OriginalElementsAreEqual(r.originalStart,r.originalStart+r.originalLength))&&(!o||this.ModifiedElementsAreEqual(r.modifiedStart,r.modifiedStart+r.modifiedLength));){const u=this.ElementsAreStrictEqual(r.originalStart,r.modifiedStart);if(this.ElementsAreStrictEqual(r.originalStart+r.originalLength,r.modifiedStart+r.modifiedLength)&&!u)break;r.originalStart++,r.modifiedStart++}const l=[null];if(n<t.length-1&&this.ChangesOverlap(t[n],t[n+1],l)){t[n]=l[0],t.splice(n+1,1),n--;continue}}for(let n=t.length-1;n>=0;n--){const r=t[n];let s=0,i=0;if(n>0){const f=t[n-1];s=f.originalStart+f.originalLength,i=f.modifiedStart+f.modifiedLength}const a=r.originalLength>0,o=r.modifiedLength>0;let l=0,u=this._boundaryScore(r.originalStart,r.originalLength,r.modifiedStart,r.modifiedLength);for(let f=1;;f++){const d=r.originalStart-f,y=r.modifiedStart-f;if(d<s||y<i||a&&!this.OriginalElementsAreEqual(d,d+r.originalLength)||o&&!this.ModifiedElementsAreEqual(y,y+r.modifiedLength))break;const S=(d===s&&y===i?5:0)+this._boundaryScore(d,r.originalLength,y,r.modifiedLength);S>u&&(u=S,l=f)}r.originalStart-=l,r.modifiedStart-=l;const c=[null];if(n>0&&this.ChangesOverlap(t[n-1],t[n],c)){t[n-1]=c[0],t.splice(n,1),n++;continue}}if(this._hasStrings)for(let n=1,r=t.length;n<r;n++){const s=t[n-1],i=t[n],a=i.originalStart-s.originalStart-s.originalLength,o=s.originalStart,l=i.originalStart+i.originalLength,u=l-o,c=s.modifiedStart,f=i.modifiedStart+i.modifiedLength,d=f-c;if(a<5&&u<20&&d<20){const y=this._findBetterContiguousSequence(o,u,c,d,a);if(y){const[D,S]=y;(D!==s.originalStart+s.originalLength||S!==s.modifiedStart+s.modifiedLength)&&(s.originalLength=D-s.originalStart,s.modifiedLength=S-s.modifiedStart,i.originalStart=D+a,i.modifiedStart=S+a,i.originalLength=l-i.originalStart,i.modifiedLength=f-i.modifiedStart)}}}return t}_findBetterContiguousSequence(t,n,r,s,i){if(n<i||s<i)return null;const a=t+n-i+1,o=r+s-i+1;let l=0,u=0,c=0;for(let f=t;f<a;f++)for(let d=r;d<o;d++){const y=this._contiguousSequenceScore(f,d,i);y>0&&y>l&&(l=y,u=f,c=d)}return l>0?[u,c]:null}_contiguousSequenceScore(t,n,r){let s=0;for(let i=0;i<r;i++){if(!this.ElementsAreEqual(t+i,n+i))return 0;s+=this._originalStringElements[t+i].length}return s}_OriginalIsBoundary(t){return t<=0||t>=this._originalElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._originalStringElements[t])}_OriginalRegionIsBoundary(t,n){if(this._OriginalIsBoundary(t)||this._OriginalIsBoundary(t-1))return!0;if(n>0){const r=t+n;if(this._OriginalIsBoundary(r-1)||this._OriginalIsBoundary(r))return!0}return!1}_ModifiedIsBoundary(t){return t<=0||t>=this._modifiedElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[t])}_ModifiedRegionIsBoundary(t,n){if(this._ModifiedIsBoundary(t)||this._ModifiedIsBoundary(t-1))return!0;if(n>0){const r=t+n;if(this._ModifiedIsBoundary(r-1)||this._ModifiedIsBoundary(r))return!0}return!1}_boundaryScore(t,n,r,s){const i=this._OriginalRegionIsBoundary(t,n)?1:0,a=this._ModifiedRegionIsBoundary(r,s)?1:0;return i+a}ConcatenateChanges(t,n){const r=[];if(t.length===0||n.length===0)return n.length>0?n:t;if(this.ChangesOverlap(t[t.length-1],n[0],r)){const s=new Array(t.length+n.length-1);return Nr.Copy(t,0,s,0,t.length-1),s[t.length-1]=r[0],Nr.Copy(n,1,s,t.length,n.length-1),s}else{const s=new Array(t.length+n.length);return Nr.Copy(t,0,s,0,t.length),Nr.Copy(n,0,s,t.length,n.length),s}}ChangesOverlap(t,n,r){if(xr.Assert(t.originalStart<=n.originalStart,"Left change is not less than or equal to right change"),xr.Assert(t.modifiedStart<=n.modifiedStart,"Left change is not less than or equal to right change"),t.originalStart+t.originalLength>=n.originalStart||t.modifiedStart+t.modifiedLength>=n.modifiedStart){const s=t.originalStart;let i=t.originalLength;const a=t.modifiedStart;let o=t.modifiedLength;return t.originalStart+t.originalLength>=n.originalStart&&(i=n.originalStart+n.originalLength-t.originalStart),t.modifiedStart+t.modifiedLength>=n.modifiedStart&&(o=n.modifiedStart+n.modifiedLength-t.modifiedStart),r[0]=new xn(s,i,a,o),!0}else return r[0]=null,!1}ClipDiagonalBound(t,n,r,s){if(t>=0&&t<s)return t;const i=r,a=s-r-1,o=n%2===0;if(t<0){const l=i%2===0;return o===l?0:1}else{const l=a%2===0;return o===l?s-1:s-2}}}let Ne=class Dr{constructor(t,n){this.lineNumber=t,this.column=n}with(t=this.lineNumber,n=this.column){return t===this.lineNumber&&n===this.column?this:new Dr(t,n)}delta(t=0,n=0){return this.with(Math.max(1,this.lineNumber+t),Math.max(1,this.column+n))}equals(t){return Dr.equals(this,t)}static equals(t,n){return!t&&!n?!0:!!t&&!!n&&t.lineNumber===n.lineNumber&&t.column===n.column}isBefore(t){return Dr.isBefore(this,t)}static isBefore(t,n){return t.lineNumber<n.lineNumber?!0:n.lineNumber<t.lineNumber?!1:t.column<n.column}isBeforeOrEqual(t){return Dr.isBeforeOrEqual(this,t)}static isBeforeOrEqual(t,n){return t.lineNumber<n.lineNumber?!0:n.lineNumber<t.lineNumber?!1:t.column<=n.column}static compare(t,n){const r=t.lineNumber|0,s=n.lineNumber|0;if(r===s){const i=t.column|0,a=n.column|0;return i-a}return r-s}clone(){return new Dr(this.lineNumber,this.column)}toString(){return"("+this.lineNumber+","+this.column+")"}static lift(t){return new Dr(t.lineNumber,t.column)}static isIPosition(t){return!!t&&typeof t.lineNumber=="number"&&typeof t.column=="number"}toJSON(){return{lineNumber:this.lineNumber,column:this.column}}},le=class je{constructor(t,n,r,s){t>r||t===r&&n>s?(this.startLineNumber=r,this.startColumn=s,this.endLineNumber=t,this.endColumn=n):(this.startLineNumber=t,this.startColumn=n,this.endLineNumber=r,this.endColumn=s)}isEmpty(){return je.isEmpty(this)}static isEmpty(t){return t.startLineNumber===t.endLineNumber&&t.startColumn===t.endColumn}containsPosition(t){return je.containsPosition(this,t)}static containsPosition(t,n){return!(n.lineNumber<t.startLineNumber||n.lineNumber>t.endLineNumber||n.lineNumber===t.startLineNumber&&n.column<t.startColumn||n.lineNumber===t.endLineNumber&&n.column>t.endColumn)}static strictContainsPosition(t,n){return!(n.lineNumber<t.startLineNumber||n.lineNumber>t.endLineNumber||n.lineNumber===t.startLineNumber&&n.column<=t.startColumn||n.lineNumber===t.endLineNumber&&n.column>=t.endColumn)}containsRange(t){return je.containsRange(this,t)}static containsRange(t,n){return!(n.startLineNumber<t.startLineNumber||n.endLineNumber<t.startLineNumber||n.startLineNumber>t.endLineNumber||n.endLineNumber>t.endLineNumber||n.startLineNumber===t.startLineNumber&&n.startColumn<t.startColumn||n.endLineNumber===t.endLineNumber&&n.endColumn>t.endColumn)}strictContainsRange(t){return je.strictContainsRange(this,t)}static strictContainsRange(t,n){return!(n.startLineNumber<t.startLineNumber||n.endLineNumber<t.startLineNumber||n.startLineNumber>t.endLineNumber||n.endLineNumber>t.endLineNumber||n.startLineNumber===t.startLineNumber&&n.startColumn<=t.startColumn||n.endLineNumber===t.endLineNumber&&n.endColumn>=t.endColumn)}plusRange(t){return je.plusRange(this,t)}static plusRange(t,n){let r,s,i,a;return n.startLineNumber<t.startLineNumber?(r=n.startLineNumber,s=n.startColumn):n.startLineNumber===t.startLineNumber?(r=n.startLineNumber,s=Math.min(n.startColumn,t.startColumn)):(r=t.startLineNumber,s=t.startColumn),n.endLineNumber>t.endLineNumber?(i=n.endLineNumber,a=n.endColumn):n.endLineNumber===t.endLineNumber?(i=n.endLineNumber,a=Math.max(n.endColumn,t.endColumn)):(i=t.endLineNumber,a=t.endColumn),new je(r,s,i,a)}intersectRanges(t){return je.intersectRanges(this,t)}static intersectRanges(t,n){let r=t.startLineNumber,s=t.startColumn,i=t.endLineNumber,a=t.endColumn;const o=n.startLineNumber,l=n.startColumn,u=n.endLineNumber,c=n.endColumn;return r<o?(r=o,s=l):r===o&&(s=Math.max(s,l)),i>u?(i=u,a=c):i===u&&(a=Math.min(a,c)),r>i||r===i&&s>a?null:new je(r,s,i,a)}equalsRange(t){return je.equalsRange(this,t)}static equalsRange(t,n){return!t&&!n?!0:!!t&&!!n&&t.startLineNumber===n.startLineNumber&&t.startColumn===n.startColumn&&t.endLineNumber===n.endLineNumber&&t.endColumn===n.endColumn}getEndPosition(){return je.getEndPosition(this)}static getEndPosition(t){return new Ne(t.endLineNumber,t.endColumn)}getStartPosition(){return je.getStartPosition(this)}static getStartPosition(t){return new Ne(t.startLineNumber,t.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(t,n){return new je(this.startLineNumber,this.startColumn,t,n)}setStartPosition(t,n){return new je(t,n,this.endLineNumber,this.endColumn)}collapseToStart(){return je.collapseToStart(this)}static collapseToStart(t){return new je(t.startLineNumber,t.startColumn,t.startLineNumber,t.startColumn)}collapseToEnd(){return je.collapseToEnd(this)}static collapseToEnd(t){return new je(t.endLineNumber,t.endColumn,t.endLineNumber,t.endColumn)}delta(t){return new je(this.startLineNumber+t,this.startColumn,this.endLineNumber+t,this.endColumn)}isSingleLine(){return this.startLineNumber===this.endLineNumber}static fromPositions(t,n=t){return new je(t.lineNumber,t.column,n.lineNumber,n.column)}static lift(t){return t?new je(t.startLineNumber,t.startColumn,t.endLineNumber,t.endColumn):null}static isIRange(t){return!!t&&typeof t.startLineNumber=="number"&&typeof t.startColumn=="number"&&typeof t.endLineNumber=="number"&&typeof t.endColumn=="number"}static areIntersectingOrTouching(t,n){return!(t.endLineNumber<n.startLineNumber||t.endLineNumber===n.startLineNumber&&t.endColumn<n.startColumn||n.endLineNumber<t.startLineNumber||n.endLineNumber===t.startLineNumber&&n.endColumn<t.startColumn)}static areIntersecting(t,n){return!(t.endLineNumber<n.startLineNumber||t.endLineNumber===n.startLineNumber&&t.endColumn<=n.startColumn||n.endLineNumber<t.startLineNumber||n.endLineNumber===t.startLineNumber&&n.endColumn<=t.startColumn)}static areOnlyIntersecting(t,n){return!(t.endLineNumber<n.startLineNumber-1||t.endLineNumber===n.startLineNumber&&t.endColumn<n.startColumn-1||n.endLineNumber<t.startLineNumber-1||n.endLineNumber===t.startLineNumber&&n.endColumn<t.startColumn-1)}static compareRangesUsingStarts(t,n){if(t&&n){const i=t.startLineNumber|0,a=n.startLineNumber|0;if(i===a){const o=t.startColumn|0,l=n.startColumn|0;if(o===l){const u=t.endLineNumber|0,c=n.endLineNumber|0;if(u===c){const f=t.endColumn|0,d=n.endColumn|0;return f-d}return u-c}return o-l}return i-a}return(t?1:0)-(n?1:0)}static compareRangesUsingEnds(t,n){return t.endLineNumber===n.endLineNumber?t.endColumn===n.endColumn?t.startLineNumber===n.startLineNumber?t.startColumn-n.startColumn:t.startLineNumber-n.startLineNumber:t.endColumn-n.endColumn:t.endLineNumber-n.endLineNumber}static spansMultipleLines(t){return t.endLineNumber>t.startLineNumber}toJSON(){return this}};function yc(e){return e<0?0:e>255?255:e|0}function Lr(e){return e<0?0:e>4294967295?4294967295:e|0}class uo{constructor(t){const n=yc(t);this._defaultValue=n,this._asciiMap=uo._createAsciiMap(n),this._map=new Map}static _createAsciiMap(t){const n=new Uint8Array(256);return n.fill(t),n}set(t,n){const r=yc(n);t>=0&&t<256?this._asciiMap[t]=r:this._map.set(t,r)}get(t){return t>=0&&t<256?this._asciiMap[t]:this._map.get(t)||this._defaultValue}clear(){this._asciiMap.fill(this._defaultValue),this._map.clear()}}class p0{constructor(t,n,r){const s=new Uint8Array(t*n);for(let i=0,a=t*n;i<a;i++)s[i]=r;this._data=s,this.rows=t,this.cols=n}get(t,n){return this._data[t*this.cols+n]}set(t,n,r){this._data[t*this.cols+n]=r}}class g0{constructor(t){let n=0,r=0;for(let i=0,a=t.length;i<a;i++){const[o,l,u]=t[i];l>n&&(n=l),o>r&&(r=o),u>r&&(r=u)}n++,r++;const s=new p0(r,n,0);for(let i=0,a=t.length;i<a;i++){const[o,l,u]=t[i];s.set(o,l,u)}this._states=s,this._maxCharCode=n}nextState(t,n){return n<0||n>=this._maxCharCode?0:this._states.get(t,n)}}let co=null;function y0(){return co===null&&(co=new g0([[1,104,2],[1,72,2],[1,102,6],[1,70,6],[2,116,3],[2,84,3],[3,116,4],[3,84,4],[4,112,5],[4,80,5],[5,115,9],[5,83,9],[5,58,10],[6,105,7],[6,73,7],[7,108,8],[7,76,8],[8,101,9],[8,69,9],[9,58,10],[10,47,11],[11,47,12]])),co}let As=null;function b0(){if(As===null){As=new uo(0);const e=` <>'"、。。、,.:;‘〈「『〔([{「」}])〕』」〉’`~…|`;for(let n=0;n<e.length;n++)As.set(e.charCodeAt(n),1);const t=".,;:";for(let n=0;n<t.length;n++)As.set(t.charCodeAt(n),2)}return As}class yi{static _createLink(t,n,r,s,i){let a=i-1;do{const o=n.charCodeAt(a);if(t.get(o)!==2)break;a--}while(a>s);if(s>0){const o=n.charCodeAt(s-1),l=n.charCodeAt(a);(o===40&&l===41||o===91&&l===93||o===123&&l===125)&&a--}return{range:{startLineNumber:r,startColumn:s+1,endLineNumber:r,endColumn:a+2},url:n.substring(s,a+1)}}static computeLinks(t,n=y0()){const r=b0(),s=[];for(let i=1,a=t.getLineCount();i<=a;i++){const o=t.getLineContent(i),l=o.length;let u=0,c=0,f=0,d=1,y=!1,D=!1,S=!1,N=!1;for(;u<l;){let x=!1;const k=o.charCodeAt(u);if(d===13){let b;switch(k){case 40:y=!0,b=0;break;case 41:b=y?0:1;break;case 91:S=!0,D=!0,b=0;break;case 93:S=!1,b=D?0:1;break;case 123:N=!0,b=0;break;case 125:b=N?0:1;break;case 39:case 34:case 96:f===k?b=1:f===39||f===34||f===96?b=0:b=1;break;case 42:b=f===42?1:0;break;case 32:b=S?0:1;break;default:b=r.get(k)}b===1&&(s.push(yi._createLink(r,o,i,c,u)),x=!0)}else if(d===12){let b;k===91?(D=!0,b=0):b=r.get(k),b===1?x=!0:d=13}else d=n.nextState(d,k),d===0&&(x=!0);x&&(d=1,y=!1,D=!1,N=!1,c=u+1,f=k),u++}d===13&&s.push(yi._createLink(r,o,i,c,l))}return s}}function w0(e){return!e||typeof e.getLineCount!="function"||typeof e.getLineContent!="function"?[]:yi.computeLinks(e)}const qa=class qa{constructor(){this._defaultValueSet=[["true","false"],["True","False"],["Private","Public","Friend","ReadOnly","Partial","Protected","WriteOnly"],["public","protected","private"]]}navigateValueSet(t,n,r,s,i){if(t&&n){const a=this.doNavigateValueSet(n,i);if(a)return{range:t,value:a}}if(r&&s){const a=this.doNavigateValueSet(s,i);if(a)return{range:r,value:a}}return null}doNavigateValueSet(t,n){const r=this.numberReplace(t,n);return r!==null?r:this.textReplace(t,n)}numberReplace(t,n){const r=Math.pow(10,t.length-(t.lastIndexOf(".")+1));let s=Number(t);const i=parseFloat(t);return!isNaN(s)&&!isNaN(i)&&s===i?s===0&&!n?null:(s=Math.floor(s*r),s+=n?r:-r,String(s/r)):null}textReplace(t,n){return this.valueSetsReplace(this._defaultValueSet,t,n)}valueSetsReplace(t,n,r){let s=null;for(let i=0,a=t.length;s===null&&i<a;i++)s=this.valueSetReplace(t[i],n,r);return s}valueSetReplace(t,n,r){let s=t.indexOf(n);return s>=0?(s+=r?1:-1,s<0?s=t.length-1:s%=t.length,t[s]):null}};qa.INSTANCE=new qa;let fo=qa;const bc=Object.freeze(function(e,t){const n=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(n)}}});var bi;(function(e){function t(n){return n===e.None||n===e.Cancelled||n instanceof wi?!0:!n||typeof n!="object"?!1:typeof n.isCancellationRequested=="boolean"&&typeof n.onCancellationRequested=="function"}e.isCancellationToken=t,e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:Ka.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:bc})})(bi||(bi={}));class wi{constructor(){this._isCancelled=!1,this._emitter=null}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?bc:(this._emitter||(this._emitter=new Ut),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}class v0{constructor(t){this._token=void 0,this._parentListener=void 0,this._parentListener=t&&t.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new wi),this._token}cancel(){this._token?this._token instanceof wi&&this._token.cancel():this._token=bi.Cancelled}dispose(t=!1){var n;t&&this.cancel(),(n=this._parentListener)==null||n.dispose(),this._token?this._token instanceof wi&&this._token.dispose():this._token=bi.None}}class ho{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(t,n){this._keyCodeToStr[t]=n,this._strToKeyCode[n.toLowerCase()]=t}keyCodeToStr(t){return this._keyCodeToStr[t]}strToKeyCode(t){return this._strToKeyCode[t.toLowerCase()]||0}}const vi=new ho,mo=new ho,po=new ho,D0=new Array(230),S0=Object.create(null),E0=Object.create(null);(function(){const t=[[1,0,"None",0,"unknown",0,"VK_UNKNOWN","",""],[1,1,"Hyper",0,"",0,"","",""],[1,2,"Super",0,"",0,"","",""],[1,3,"Fn",0,"",0,"","",""],[1,4,"FnLock",0,"",0,"","",""],[1,5,"Suspend",0,"",0,"","",""],[1,6,"Resume",0,"",0,"","",""],[1,7,"Turbo",0,"",0,"","",""],[1,8,"Sleep",0,"",0,"VK_SLEEP","",""],[1,9,"WakeUp",0,"",0,"","",""],[0,10,"KeyA",31,"A",65,"VK_A","",""],[0,11,"KeyB",32,"B",66,"VK_B","",""],[0,12,"KeyC",33,"C",67,"VK_C","",""],[0,13,"KeyD",34,"D",68,"VK_D","",""],[0,14,"KeyE",35,"E",69,"VK_E","",""],[0,15,"KeyF",36,"F",70,"VK_F","",""],[0,16,"KeyG",37,"G",71,"VK_G","",""],[0,17,"KeyH",38,"H",72,"VK_H","",""],[0,18,"KeyI",39,"I",73,"VK_I","",""],[0,19,"KeyJ",40,"J",74,"VK_J","",""],[0,20,"KeyK",41,"K",75,"VK_K","",""],[0,21,"KeyL",42,"L",76,"VK_L","",""],[0,22,"KeyM",43,"M",77,"VK_M","",""],[0,23,"KeyN",44,"N",78,"VK_N","",""],[0,24,"KeyO",45,"O",79,"VK_O","",""],[0,25,"KeyP",46,"P",80,"VK_P","",""],[0,26,"KeyQ",47,"Q",81,"VK_Q","",""],[0,27,"KeyR",48,"R",82,"VK_R","",""],[0,28,"KeyS",49,"S",83,"VK_S","",""],[0,29,"KeyT",50,"T",84,"VK_T","",""],[0,30,"KeyU",51,"U",85,"VK_U","",""],[0,31,"KeyV",52,"V",86,"VK_V","",""],[0,32,"KeyW",53,"W",87,"VK_W","",""],[0,33,"KeyX",54,"X",88,"VK_X","",""],[0,34,"KeyY",55,"Y",89,"VK_Y","",""],[0,35,"KeyZ",56,"Z",90,"VK_Z","",""],[0,36,"Digit1",22,"1",49,"VK_1","",""],[0,37,"Digit2",23,"2",50,"VK_2","",""],[0,38,"Digit3",24,"3",51,"VK_3","",""],[0,39,"Digit4",25,"4",52,"VK_4","",""],[0,40,"Digit5",26,"5",53,"VK_5","",""],[0,41,"Digit6",27,"6",54,"VK_6","",""],[0,42,"Digit7",28,"7",55,"VK_7","",""],[0,43,"Digit8",29,"8",56,"VK_8","",""],[0,44,"Digit9",30,"9",57,"VK_9","",""],[0,45,"Digit0",21,"0",48,"VK_0","",""],[1,46,"Enter",3,"Enter",13,"VK_RETURN","",""],[1,47,"Escape",9,"Escape",27,"VK_ESCAPE","",""],[1,48,"Backspace",1,"Backspace",8,"VK_BACK","",""],[1,49,"Tab",2,"Tab",9,"VK_TAB","",""],[1,50,"Space",10,"Space",32,"VK_SPACE","",""],[0,51,"Minus",88,"-",189,"VK_OEM_MINUS","-","OEM_MINUS"],[0,52,"Equal",86,"=",187,"VK_OEM_PLUS","=","OEM_PLUS"],[0,53,"BracketLeft",92,"[",219,"VK_OEM_4","[","OEM_4"],[0,54,"BracketRight",94,"]",221,"VK_OEM_6","]","OEM_6"],[0,55,"Backslash",93,"\\",220,"VK_OEM_5","\\","OEM_5"],[0,56,"IntlHash",0,"",0,"","",""],[0,57,"Semicolon",85,";",186,"VK_OEM_1",";","OEM_1"],[0,58,"Quote",95,"'",222,"VK_OEM_7","'","OEM_7"],[0,59,"Backquote",91,"`",192,"VK_OEM_3","`","OEM_3"],[0,60,"Comma",87,",",188,"VK_OEM_COMMA",",","OEM_COMMA"],[0,61,"Period",89,".",190,"VK_OEM_PERIOD",".","OEM_PERIOD"],[0,62,"Slash",90,"/",191,"VK_OEM_2","/","OEM_2"],[1,63,"CapsLock",8,"CapsLock",20,"VK_CAPITAL","",""],[1,64,"F1",59,"F1",112,"VK_F1","",""],[1,65,"F2",60,"F2",113,"VK_F2","",""],[1,66,"F3",61,"F3",114,"VK_F3","",""],[1,67,"F4",62,"F4",115,"VK_F4","",""],[1,68,"F5",63,"F5",116,"VK_F5","",""],[1,69,"F6",64,"F6",117,"VK_F6","",""],[1,70,"F7",65,"F7",118,"VK_F7","",""],[1,71,"F8",66,"F8",119,"VK_F8","",""],[1,72,"F9",67,"F9",120,"VK_F9","",""],[1,73,"F10",68,"F10",121,"VK_F10","",""],[1,74,"F11",69,"F11",122,"VK_F11","",""],[1,75,"F12",70,"F12",123,"VK_F12","",""],[1,76,"PrintScreen",0,"",0,"","",""],[1,77,"ScrollLock",84,"ScrollLock",145,"VK_SCROLL","",""],[1,78,"Pause",7,"PauseBreak",19,"VK_PAUSE","",""],[1,79,"Insert",19,"Insert",45,"VK_INSERT","",""],[1,80,"Home",14,"Home",36,"VK_HOME","",""],[1,81,"PageUp",11,"PageUp",33,"VK_PRIOR","",""],[1,82,"Delete",20,"Delete",46,"VK_DELETE","",""],[1,83,"End",13,"End",35,"VK_END","",""],[1,84,"PageDown",12,"PageDown",34,"VK_NEXT","",""],[1,85,"ArrowRight",17,"RightArrow",39,"VK_RIGHT","Right",""],[1,86,"ArrowLeft",15,"LeftArrow",37,"VK_LEFT","Left",""],[1,87,"ArrowDown",18,"DownArrow",40,"VK_DOWN","Down",""],[1,88,"ArrowUp",16,"UpArrow",38,"VK_UP","Up",""],[1,89,"NumLock",83,"NumLock",144,"VK_NUMLOCK","",""],[1,90,"NumpadDivide",113,"NumPad_Divide",111,"VK_DIVIDE","",""],[1,91,"NumpadMultiply",108,"NumPad_Multiply",106,"VK_MULTIPLY","",""],[1,92,"NumpadSubtract",111,"NumPad_Subtract",109,"VK_SUBTRACT","",""],[1,93,"NumpadAdd",109,"NumPad_Add",107,"VK_ADD","",""],[1,94,"NumpadEnter",3,"",0,"","",""],[1,95,"Numpad1",99,"NumPad1",97,"VK_NUMPAD1","",""],[1,96,"Numpad2",100,"NumPad2",98,"VK_NUMPAD2","",""],[1,97,"Numpad3",101,"NumPad3",99,"VK_NUMPAD3","",""],[1,98,"Numpad4",102,"NumPad4",100,"VK_NUMPAD4","",""],[1,99,"Numpad5",103,"NumPad5",101,"VK_NUMPAD5","",""],[1,100,"Numpad6",104,"NumPad6",102,"VK_NUMPAD6","",""],[1,101,"Numpad7",105,"NumPad7",103,"VK_NUMPAD7","",""],[1,102,"Numpad8",106,"NumPad8",104,"VK_NUMPAD8","",""],[1,103,"Numpad9",107,"NumPad9",105,"VK_NUMPAD9","",""],[1,104,"Numpad0",98,"NumPad0",96,"VK_NUMPAD0","",""],[1,105,"NumpadDecimal",112,"NumPad_Decimal",110,"VK_DECIMAL","",""],[0,106,"IntlBackslash",97,"OEM_102",226,"VK_OEM_102","",""],[1,107,"ContextMenu",58,"ContextMenu",93,"","",""],[1,108,"Power",0,"",0,"","",""],[1,109,"NumpadEqual",0,"",0,"","",""],[1,110,"F13",71,"F13",124,"VK_F13","",""],[1,111,"F14",72,"F14",125,"VK_F14","",""],[1,112,"F15",73,"F15",126,"VK_F15","",""],[1,113,"F16",74,"F16",127,"VK_F16","",""],[1,114,"F17",75,"F17",128,"VK_F17","",""],[1,115,"F18",76,"F18",129,"VK_F18","",""],[1,116,"F19",77,"F19",130,"VK_F19","",""],[1,117,"F20",78,"F20",131,"VK_F20","",""],[1,118,"F21",79,"F21",132,"VK_F21","",""],[1,119,"F22",80,"F22",133,"VK_F22","",""],[1,120,"F23",81,"F23",134,"VK_F23","",""],[1,121,"F24",82,"F24",135,"VK_F24","",""],[1,122,"Open",0,"",0,"","",""],[1,123,"Help",0,"",0,"","",""],[1,124,"Select",0,"",0,"","",""],[1,125,"Again",0,"",0,"","",""],[1,126,"Undo",0,"",0,"","",""],[1,127,"Cut",0,"",0,"","",""],[1,128,"Copy",0,"",0,"","",""],[1,129,"Paste",0,"",0,"","",""],[1,130,"Find",0,"",0,"","",""],[1,131,"AudioVolumeMute",117,"AudioVolumeMute",173,"VK_VOLUME_MUTE","",""],[1,132,"AudioVolumeUp",118,"AudioVolumeUp",175,"VK_VOLUME_UP","",""],[1,133,"AudioVolumeDown",119,"AudioVolumeDown",174,"VK_VOLUME_DOWN","",""],[1,134,"NumpadComma",110,"NumPad_Separator",108,"VK_SEPARATOR","",""],[0,135,"IntlRo",115,"ABNT_C1",193,"VK_ABNT_C1","",""],[1,136,"KanaMode",0,"",0,"","",""],[0,137,"IntlYen",0,"",0,"","",""],[1,138,"Convert",0,"",0,"","",""],[1,139,"NonConvert",0,"",0,"","",""],[1,140,"Lang1",0,"",0,"","",""],[1,141,"Lang2",0,"",0,"","",""],[1,142,"Lang3",0,"",0,"","",""],[1,143,"Lang4",0,"",0,"","",""],[1,144,"Lang5",0,"",0,"","",""],[1,145,"Abort",0,"",0,"","",""],[1,146,"Props",0,"",0,"","",""],[1,147,"NumpadParenLeft",0,"",0,"","",""],[1,148,"NumpadParenRight",0,"",0,"","",""],[1,149,"NumpadBackspace",0,"",0,"","",""],[1,150,"NumpadMemoryStore",0,"",0,"","",""],[1,151,"NumpadMemoryRecall",0,"",0,"","",""],[1,152,"NumpadMemoryClear",0,"",0,"","",""],[1,153,"NumpadMemoryAdd",0,"",0,"","",""],[1,154,"NumpadMemorySubtract",0,"",0,"","",""],[1,155,"NumpadClear",131,"Clear",12,"VK_CLEAR","",""],[1,156,"NumpadClearEntry",0,"",0,"","",""],[1,0,"",5,"Ctrl",17,"VK_CONTROL","",""],[1,0,"",4,"Shift",16,"VK_SHIFT","",""],[1,0,"",6,"Alt",18,"VK_MENU","",""],[1,0,"",57,"Meta",91,"VK_COMMAND","",""],[1,157,"ControlLeft",5,"",0,"VK_LCONTROL","",""],[1,158,"ShiftLeft",4,"",0,"VK_LSHIFT","",""],[1,159,"AltLeft",6,"",0,"VK_LMENU","",""],[1,160,"MetaLeft",57,"",0,"VK_LWIN","",""],[1,161,"ControlRight",5,"",0,"VK_RCONTROL","",""],[1,162,"ShiftRight",4,"",0,"VK_RSHIFT","",""],[1,163,"AltRight",6,"",0,"VK_RMENU","",""],[1,164,"MetaRight",57,"",0,"VK_RWIN","",""],[1,165,"BrightnessUp",0,"",0,"","",""],[1,166,"BrightnessDown",0,"",0,"","",""],[1,167,"MediaPlay",0,"",0,"","",""],[1,168,"MediaRecord",0,"",0,"","",""],[1,169,"MediaFastForward",0,"",0,"","",""],[1,170,"MediaRewind",0,"",0,"","",""],[1,171,"MediaTrackNext",124,"MediaTrackNext",176,"VK_MEDIA_NEXT_TRACK","",""],[1,172,"MediaTrackPrevious",125,"MediaTrackPrevious",177,"VK_MEDIA_PREV_TRACK","",""],[1,173,"MediaStop",126,"MediaStop",178,"VK_MEDIA_STOP","",""],[1,174,"Eject",0,"",0,"","",""],[1,175,"MediaPlayPause",127,"MediaPlayPause",179,"VK_MEDIA_PLAY_PAUSE","",""],[1,176,"MediaSelect",128,"LaunchMediaPlayer",181,"VK_MEDIA_LAUNCH_MEDIA_SELECT","",""],[1,177,"LaunchMail",129,"LaunchMail",180,"VK_MEDIA_LAUNCH_MAIL","",""],[1,178,"LaunchApp2",130,"LaunchApp2",183,"VK_MEDIA_LAUNCH_APP2","",""],[1,179,"LaunchApp1",0,"",0,"VK_MEDIA_LAUNCH_APP1","",""],[1,180,"SelectTask",0,"",0,"","",""],[1,181,"LaunchScreenSaver",0,"",0,"","",""],[1,182,"BrowserSearch",120,"BrowserSearch",170,"VK_BROWSER_SEARCH","",""],[1,183,"BrowserHome",121,"BrowserHome",172,"VK_BROWSER_HOME","",""],[1,184,"BrowserBack",122,"BrowserBack",166,"VK_BROWSER_BACK","",""],[1,185,"BrowserForward",123,"BrowserForward",167,"VK_BROWSER_FORWARD","",""],[1,186,"BrowserStop",0,"",0,"VK_BROWSER_STOP","",""],[1,187,"BrowserRefresh",0,"",0,"VK_BROWSER_REFRESH","",""],[1,188,"BrowserFavorites",0,"",0,"VK_BROWSER_FAVORITES","",""],[1,189,"ZoomToggle",0,"",0,"","",""],[1,190,"MailReply",0,"",0,"","",""],[1,191,"MailForward",0,"",0,"","",""],[1,192,"MailSend",0,"",0,"","",""],[1,0,"",114,"KeyInComposition",229,"","",""],[1,0,"",116,"ABNT_C2",194,"VK_ABNT_C2","",""],[1,0,"",96,"OEM_8",223,"VK_OEM_8","",""],[1,0,"",0,"",0,"VK_KANA","",""],[1,0,"",0,"",0,"VK_HANGUL","",""],[1,0,"",0,"",0,"VK_JUNJA","",""],[1,0,"",0,"",0,"VK_FINAL","",""],[1,0,"",0,"",0,"VK_HANJA","",""],[1,0,"",0,"",0,"VK_KANJI","",""],[1,0,"",0,"",0,"VK_CONVERT","",""],[1,0,"",0,"",0,"VK_NONCONVERT","",""],[1,0,"",0,"",0,"VK_ACCEPT","",""],[1,0,"",0,"",0,"VK_MODECHANGE","",""],[1,0,"",0,"",0,"VK_SELECT","",""],[1,0,"",0,"",0,"VK_PRINT","",""],[1,0,"",0,"",0,"VK_EXECUTE","",""],[1,0,"",0,"",0,"VK_SNAPSHOT","",""],[1,0,"",0,"",0,"VK_HELP","",""],[1,0,"",0,"",0,"VK_APPS","",""],[1,0,"",0,"",0,"VK_PROCESSKEY","",""],[1,0,"",0,"",0,"VK_PACKET","",""],[1,0,"",0,"",0,"VK_DBE_SBCSCHAR","",""],[1,0,"",0,"",0,"VK_DBE_DBCSCHAR","",""],[1,0,"",0,"",0,"VK_ATTN","",""],[1,0,"",0,"",0,"VK_CRSEL","",""],[1,0,"",0,"",0,"VK_EXSEL","",""],[1,0,"",0,"",0,"VK_EREOF","",""],[1,0,"",0,"",0,"VK_PLAY","",""],[1,0,"",0,"",0,"VK_ZOOM","",""],[1,0,"",0,"",0,"VK_NONAME","",""],[1,0,"",0,"",0,"VK_PA1","",""],[1,0,"",0,"",0,"VK_OEM_CLEAR","",""]],n=[],r=[];for(const s of t){const[i,a,o,l,u,c,f,d,y]=s;if(r[a]||(r[a]=!0,S0[o]=a,E0[o.toLowerCase()]=a),!n[l]){if(n[l]=!0,!u)throw new Error(`String representation missing for key code ${l} around scan code ${o}`);vi.define(l,u),mo.define(l,d||u),po.define(l,y||d||u)}c&&(D0[c]=l)}})();var wc;(function(e){function t(o){return vi.keyCodeToStr(o)}e.toString=t;function n(o){return vi.strToKeyCode(o)}e.fromString=n;function r(o){return mo.keyCodeToStr(o)}e.toUserSettingsUS=r;function s(o){return po.keyCodeToStr(o)}e.toUserSettingsGeneral=s;function i(o){return mo.strToKeyCode(o)||po.strToKeyCode(o)}e.fromUserSettings=i;function a(o){if(o>=98&&o<=113)return null;switch(o){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return vi.keyCodeToStr(o)}e.toElectronAccelerator=a})(wc||(wc={}));function A0(e,t){const n=(t&65535)<<16>>>0;return(e|n)>>>0}var vc={};let kr;const go=globalThis.vscode;if(typeof go<"u"&&typeof go.process<"u"){const e=go.process;kr={get platform(){return e.platform},get arch(){return e.arch},get env(){return e.env},cwd(){return e.cwd()}}}else typeof process<"u"&&typeof((fg=process==null?void 0:process.versions)==null?void 0:fg.node)=="string"?kr={get platform(){return process.platform},get arch(){return process.arch},get env(){return vc},cwd(){return vc.VSCODE_CWD||process.cwd()}}:kr={get platform(){return Ds?"win32":Ug?"darwin":"linux"},get arch(){},get env(){return{}},cwd(){return"/"}};const Di=kr.cwd,x0=kr.env,N0=kr.platform,L0=65,k0=97,C0=90,F0=122,zn=46,qe=47,rt=92,rn=58,_0=63;class Dc extends Error{constructor(t,n,r){let s;typeof n=="string"&&n.indexOf("not ")===0?(s="must not be",n=n.replace(/^not /,"")):s="must be";const i=t.indexOf(".")!==-1?"property":"argument";let a=`The "${t}" ${i} ${s} of type ${n}`;a+=`. Received type ${typeof r}`,super(a),this.code="ERR_INVALID_ARG_TYPE"}}function T0(e,t){if(e===null||typeof e!="object")throw new Dc(t,"Object",e)}function Re(e,t){if(typeof e!="string")throw new Dc(t,"string",e)}const Ln=N0==="win32";function ue(e){return e===qe||e===rt}function yo(e){return e===qe}function sn(e){return e>=L0&&e<=C0||e>=k0&&e<=F0}function Si(e,t,n,r){let s="",i=0,a=-1,o=0,l=0;for(let u=0;u<=e.length;++u){if(u<e.length)l=e.charCodeAt(u);else{if(r(l))break;l=qe}if(r(l)){if(!(a===u-1||o===1))if(o===2){if(s.length<2||i!==2||s.charCodeAt(s.length-1)!==zn||s.charCodeAt(s.length-2)!==zn){if(s.length>2){const c=s.lastIndexOf(n);c===-1?(s="",i=0):(s=s.slice(0,c),i=s.length-1-s.lastIndexOf(n)),a=u,o=0;continue}else if(s.length!==0){s="",i=0,a=u,o=0;continue}}t&&(s+=s.length>0?`${n}..`:"..",i=2)}else s.length>0?s+=`${n}${e.slice(a+1,u)}`:s=e.slice(a+1,u),i=u-a-1;a=u,o=0}else l===zn&&o!==-1?++o:o=-1}return s}function M0(e){return e?`${e[0]==="."?"":"."}${e}`:""}function Sc(e,t){T0(t,"pathObject");const n=t.dir||t.root,r=t.base||`${t.name||""}${M0(t.ext)}`;return n?n===t.root?`${n}${r}`:`${n}${e}${r}`:r}const Ke={resolve(...e){let t="",n="",r=!1;for(let s=e.length-1;s>=-1;s--){let i;if(s>=0){if(i=e[s],Re(i,`paths[${s}]`),i.length===0)continue}else t.length===0?i=Di():(i=x0[`=${t}`]||Di(),(i===void 0||i.slice(0,2).toLowerCase()!==t.toLowerCase()&&i.charCodeAt(2)===rt)&&(i=`${t}\\`));const a=i.length;let o=0,l="",u=!1;const c=i.charCodeAt(0);if(a===1)ue(c)&&(o=1,u=!0);else if(ue(c))if(u=!0,ue(i.charCodeAt(1))){let f=2,d=f;for(;f<a&&!ue(i.charCodeAt(f));)f++;if(f<a&&f!==d){const y=i.slice(d,f);for(d=f;f<a&&ue(i.charCodeAt(f));)f++;if(f<a&&f!==d){for(d=f;f<a&&!ue(i.charCodeAt(f));)f++;(f===a||f!==d)&&(l=`\\\\${y}\\${i.slice(d,f)}`,o=f)}}}else o=1;else sn(c)&&i.charCodeAt(1)===rn&&(l=i.slice(0,2),o=2,a>2&&ue(i.charCodeAt(2))&&(u=!0,o=3));if(l.length>0)if(t.length>0){if(l.toLowerCase()!==t.toLowerCase())continue}else t=l;if(r){if(t.length>0)break}else if(n=`${i.slice(o)}\\${n}`,r=u,u&&t.length>0)break}return n=Si(n,!r,"\\",ue),r?`${t}\\${n}`:`${t}${n}`||"."},normalize(e){Re(e,"path");const t=e.length;if(t===0)return".";let n=0,r,s=!1;const i=e.charCodeAt(0);if(t===1)return yo(i)?"\\":e;if(ue(i))if(s=!0,ue(e.charCodeAt(1))){let o=2,l=o;for(;o<t&&!ue(e.charCodeAt(o));)o++;if(o<t&&o!==l){const u=e.slice(l,o);for(l=o;o<t&&ue(e.charCodeAt(o));)o++;if(o<t&&o!==l){for(l=o;o<t&&!ue(e.charCodeAt(o));)o++;if(o===t)return`\\\\${u}\\${e.slice(l)}\\`;o!==l&&(r=`\\\\${u}\\${e.slice(l,o)}`,n=o)}}}else n=1;else sn(i)&&e.charCodeAt(1)===rn&&(r=e.slice(0,2),n=2,t>2&&ue(e.charCodeAt(2))&&(s=!0,n=3));let a=n<t?Si(e.slice(n),!s,"\\",ue):"";if(a.length===0&&!s&&(a="."),a.length>0&&ue(e.charCodeAt(t-1))&&(a+="\\"),!s&&r===void 0&&e.includes(":")){if(a.length>=2&&sn(a.charCodeAt(0))&&a.charCodeAt(1)===rn)return`.\\${a}`;let o=e.indexOf(":");do if(o===t-1||ue(e.charCodeAt(o+1)))return`.\\${a}`;while((o=e.indexOf(":",o+1))!==-1)}return r===void 0?s?`\\${a}`:a:s?`${r}\\${a}`:`${r}${a}`},isAbsolute(e){Re(e,"path");const t=e.length;if(t===0)return!1;const n=e.charCodeAt(0);return ue(n)||t>2&&sn(n)&&e.charCodeAt(1)===rn&&ue(e.charCodeAt(2))},join(...e){if(e.length===0)return".";let t,n;for(let i=0;i<e.length;++i){const a=e[i];Re(a,"path"),a.length>0&&(t===void 0?t=n=a:t+=`\\${a}`)}if(t===void 0)return".";let r=!0,s=0;if(typeof n=="string"&&ue(n.charCodeAt(0))){++s;const i=n.length;i>1&&ue(n.charCodeAt(1))&&(++s,i>2&&(ue(n.charCodeAt(2))?++s:r=!1))}if(r){for(;s<t.length&&ue(t.charCodeAt(s));)s++;s>=2&&(t=`\\${t.slice(s)}`)}return Ke.normalize(t)},relative(e,t){if(Re(e,"from"),Re(t,"to"),e===t)return"";const n=Ke.resolve(e),r=Ke.resolve(t);if(n===r||(e=n.toLowerCase(),t=r.toLowerCase(),e===t))return"";if(n.length!==e.length||r.length!==t.length){const D=n.split("\\"),S=r.split("\\");D[D.length-1]===""&&D.pop(),S[S.length-1]===""&&S.pop();const N=D.length,x=S.length,k=N<x?N:x;let b;for(b=0;b<k&&D[b].toLowerCase()===S[b].toLowerCase();b++);return b===0?r:b===k?x>k?S.slice(b).join("\\"):N>k?"..\\".repeat(N-1-b)+"..":"":"..\\".repeat(N-b)+S.slice(b).join("\\")}let s=0;for(;s<e.length&&e.charCodeAt(s)===rt;)s++;let i=e.length;for(;i-1>s&&e.charCodeAt(i-1)===rt;)i--;const a=i-s;let o=0;for(;o<t.length&&t.charCodeAt(o)===rt;)o++;let l=t.length;for(;l-1>o&&t.charCodeAt(l-1)===rt;)l--;const u=l-o,c=a<u?a:u;let f=-1,d=0;for(;d<c;d++){const D=e.charCodeAt(s+d);if(D!==t.charCodeAt(o+d))break;D===rt&&(f=d)}if(d!==c){if(f===-1)return r}else{if(u>c){if(t.charCodeAt(o+d)===rt)return r.slice(o+d+1);if(d===2)return r.slice(o+d)}a>c&&(e.charCodeAt(s+d)===rt?f=d:d===2&&(f=3)),f===-1&&(f=0)}let y="";for(d=s+f+1;d<=i;++d)(d===i||e.charCodeAt(d)===rt)&&(y+=y.length===0?"..":"\\..");return o+=f,y.length>0?`${y}${r.slice(o,l)}`:(r.charCodeAt(o)===rt&&++o,r.slice(o,l))},toNamespacedPath(e){if(typeof e!="string"||e.length===0)return e;const t=Ke.resolve(e);if(t.length<=2)return e;if(t.charCodeAt(0)===rt){if(t.charCodeAt(1)===rt){const n=t.charCodeAt(2);if(n!==_0&&n!==zn)return`\\\\?\\UNC\\${t.slice(2)}`}}else if(sn(t.charCodeAt(0))&&t.charCodeAt(1)===rn&&t.charCodeAt(2)===rt)return`\\\\?\\${t}`;return t},dirname(e){Re(e,"path");const t=e.length;if(t===0)return".";let n=-1,r=0;const s=e.charCodeAt(0);if(t===1)return ue(s)?e:".";if(ue(s)){if(n=r=1,ue(e.charCodeAt(1))){let o=2,l=o;for(;o<t&&!ue(e.charCodeAt(o));)o++;if(o<t&&o!==l){for(l=o;o<t&&ue(e.charCodeAt(o));)o++;if(o<t&&o!==l){for(l=o;o<t&&!ue(e.charCodeAt(o));)o++;if(o===t)return e;o!==l&&(n=r=o+1)}}}}else sn(s)&&e.charCodeAt(1)===rn&&(n=t>2&&ue(e.charCodeAt(2))?3:2,r=n);let i=-1,a=!0;for(let o=t-1;o>=r;--o)if(ue(e.charCodeAt(o))){if(!a){i=o;break}}else a=!1;if(i===-1){if(n===-1)return".";i=n}return e.slice(0,i)},basename(e,t){t!==void 0&&Re(t,"suffix"),Re(e,"path");let n=0,r=-1,s=!0,i;if(e.length>=2&&sn(e.charCodeAt(0))&&e.charCodeAt(1)===rn&&(n=2),t!==void 0&&t.length>0&&t.length<=e.length){if(t===e)return"";let a=t.length-1,o=-1;for(i=e.length-1;i>=n;--i){const l=e.charCodeAt(i);if(ue(l)){if(!s){n=i+1;break}}else o===-1&&(s=!1,o=i+1),a>=0&&(l===t.charCodeAt(a)?--a===-1&&(r=i):(a=-1,r=o))}return n===r?r=o:r===-1&&(r=e.length),e.slice(n,r)}for(i=e.length-1;i>=n;--i)if(ue(e.charCodeAt(i))){if(!s){n=i+1;break}}else r===-1&&(s=!1,r=i+1);return r===-1?"":e.slice(n,r)},extname(e){Re(e,"path");let t=0,n=-1,r=0,s=-1,i=!0,a=0;e.length>=2&&e.charCodeAt(1)===rn&&sn(e.charCodeAt(0))&&(t=r=2);for(let o=e.length-1;o>=t;--o){const l=e.charCodeAt(o);if(ue(l)){if(!i){r=o+1;break}continue}s===-1&&(i=!1,s=o+1),l===zn?n===-1?n=o:a!==1&&(a=1):n!==-1&&(a=-1)}return n===-1||s===-1||a===0||a===1&&n===s-1&&n===r+1?"":e.slice(n,s)},format:Sc.bind(null,"\\"),parse(e){Re(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;const n=e.length;let r=0,s=e.charCodeAt(0);if(n===1)return ue(s)?(t.root=t.dir=e,t):(t.base=t.name=e,t);if(ue(s)){if(r=1,ue(e.charCodeAt(1))){let f=2,d=f;for(;f<n&&!ue(e.charCodeAt(f));)f++;if(f<n&&f!==d){for(d=f;f<n&&ue(e.charCodeAt(f));)f++;if(f<n&&f!==d){for(d=f;f<n&&!ue(e.charCodeAt(f));)f++;f===n?r=f:f!==d&&(r=f+1)}}}}else if(sn(s)&&e.charCodeAt(1)===rn){if(n<=2)return t.root=t.dir=e,t;if(r=2,ue(e.charCodeAt(2))){if(n===3)return t.root=t.dir=e,t;r=3}}r>0&&(t.root=e.slice(0,r));let i=-1,a=r,o=-1,l=!0,u=e.length-1,c=0;for(;u>=r;--u){if(s=e.charCodeAt(u),ue(s)){if(!l){a=u+1;break}continue}o===-1&&(l=!1,o=u+1),s===zn?i===-1?i=u:c!==1&&(c=1):i!==-1&&(c=-1)}return o!==-1&&(i===-1||c===0||c===1&&i===o-1&&i===a+1?t.base=t.name=e.slice(a,o):(t.name=e.slice(a,i),t.base=e.slice(a,o),t.ext=e.slice(i,o))),a>0&&a!==r?t.dir=e.slice(0,a-1):t.dir=t.root,t},sep:"\\",delimiter:";",win32:null,posix:null},O0=(()=>{if(Ln){const e=/\\/g;return()=>{const t=Di().replace(e,"/");return t.slice(t.indexOf("/"))}}return()=>Di()})(),st={resolve(...e){let t="",n=!1;for(let r=e.length-1;r>=0&&!n;r--){const s=e[r];Re(s,`paths[${r}]`),s.length!==0&&(t=`${s}/${t}`,n=s.charCodeAt(0)===qe)}if(!n){const r=O0();t=`${r}/${t}`,n=r.charCodeAt(0)===qe}return t=Si(t,!n,"/",yo),n?`/${t}`:t.length>0?t:"."},normalize(e){if(Re(e,"path"),e.length===0)return".";const t=e.charCodeAt(0)===qe,n=e.charCodeAt(e.length-1)===qe;return e=Si(e,!t,"/",yo),e.length===0?t?"/":n?"./":".":(n&&(e+="/"),t?`/${e}`:e)},isAbsolute(e){return Re(e,"path"),e.length>0&&e.charCodeAt(0)===qe},join(...e){if(e.length===0)return".";const t=[];for(let n=0;n<e.length;++n){const r=e[n];Re(r,"path"),r.length>0&&t.push(r)}return t.length===0?".":st.normalize(t.join("/"))},relative(e,t){if(Re(e,"from"),Re(t,"to"),e===t||(e=st.resolve(e),t=st.resolve(t),e===t))return"";const n=1,r=e.length,s=r-n,i=1,a=t.length-i,o=s<a?s:a;let l=-1,u=0;for(;u<o;u++){const f=e.charCodeAt(n+u);if(f!==t.charCodeAt(i+u))break;f===qe&&(l=u)}if(u===o)if(a>o){if(t.charCodeAt(i+u)===qe)return t.slice(i+u+1);if(u===0)return t.slice(i+u)}else s>o&&(e.charCodeAt(n+u)===qe?l=u:u===0&&(l=0));let c="";for(u=n+l+1;u<=r;++u)(u===r||e.charCodeAt(u)===qe)&&(c+=c.length===0?"..":"/..");return`${c}${t.slice(i+l)}`},toNamespacedPath(e){return e},dirname(e){if(Re(e,"path"),e.length===0)return".";const t=e.charCodeAt(0)===qe;let n=-1,r=!0;for(let s=e.length-1;s>=1;--s)if(e.charCodeAt(s)===qe){if(!r){n=s;break}}else r=!1;return n===-1?t?"/":".":t&&n===1?"//":e.slice(0,n)},basename(e,t){t!==void 0&&Re(t,"suffix"),Re(e,"path");let n=0,r=-1,s=!0,i;if(t!==void 0&&t.length>0&&t.length<=e.length){if(t===e)return"";let a=t.length-1,o=-1;for(i=e.length-1;i>=0;--i){const l=e.charCodeAt(i);if(l===qe){if(!s){n=i+1;break}}else o===-1&&(s=!1,o=i+1),a>=0&&(l===t.charCodeAt(a)?--a===-1&&(r=i):(a=-1,r=o))}return n===r?r=o:r===-1&&(r=e.length),e.slice(n,r)}for(i=e.length-1;i>=0;--i)if(e.charCodeAt(i)===qe){if(!s){n=i+1;break}}else r===-1&&(s=!1,r=i+1);return r===-1?"":e.slice(n,r)},extname(e){Re(e,"path");let t=-1,n=0,r=-1,s=!0,i=0;for(let a=e.length-1;a>=0;--a){const o=e[a];if(o==="/"){if(!s){n=a+1;break}continue}r===-1&&(s=!1,r=a+1),o==="."?t===-1?t=a:i!==1&&(i=1):t!==-1&&(i=-1)}return t===-1||r===-1||i===0||i===1&&t===r-1&&t===n+1?"":e.slice(t,r)},format:Sc.bind(null,"/"),parse(e){Re(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;const n=e.charCodeAt(0)===qe;let r;n?(t.root="/",r=1):r=0;let s=-1,i=0,a=-1,o=!0,l=e.length-1,u=0;for(;l>=r;--l){const c=e.charCodeAt(l);if(c===qe){if(!o){i=l+1;break}continue}a===-1&&(o=!1,a=l+1),c===zn?s===-1?s=l:u!==1&&(u=1):s!==-1&&(u=-1)}if(a!==-1){const c=i===0&&n?1:i;s===-1||u===0||u===1&&s===a-1&&s===i+1?t.base=t.name=e.slice(c,a):(t.name=e.slice(c,s),t.base=e.slice(c,a),t.ext=e.slice(s,a))}return i>0?t.dir=e.slice(0,i-1):n&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};st.win32=Ke.win32=Ke,st.posix=Ke.posix=st,Ln?Ke.normalize:st.normalize,Ln?Ke.resolve:st.resolve,Ln?Ke.relative:st.relative,Ln?Ke.dirname:st.dirname,Ln?Ke.basename:st.basename,Ln?Ke.extname:st.extname,Ln?Ke.sep:st.sep;const R0=/^\w[\w\d+.-]*$/,P0=/^\//,I0=/^\/\//;function $0(e,t){if(!e.scheme&&t)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!R0.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path){if(e.authority){if(!P0.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(I0.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}function B0(e,t){return!e&&!t?"file":e}function V0(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==Ot&&(t=Ot+t):t=Ot;break}return t}const Le="",Ot="/",j0=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;let bo=class za{static isUri(t){return t instanceof za?!0:!t||typeof t!="object"?!1:typeof t.authority=="string"&&typeof t.fragment=="string"&&typeof t.path=="string"&&typeof t.query=="string"&&typeof t.scheme=="string"&&typeof t.fsPath=="string"&&typeof t.with=="function"&&typeof t.toString=="function"}constructor(t,n,r,s,i,a=!1){typeof t=="object"?(this.scheme=t.scheme||Le,this.authority=t.authority||Le,this.path=t.path||Le,this.query=t.query||Le,this.fragment=t.fragment||Le):(this.scheme=B0(t,a),this.authority=n||Le,this.path=V0(this.scheme,r||Le),this.query=s||Le,this.fragment=i||Le,$0(this,a))}get fsPath(){return wo(this,!1)}with(t){if(!t)return this;let{scheme:n,authority:r,path:s,query:i,fragment:a}=t;return n===void 0?n=this.scheme:n===null&&(n=Le),r===void 0?r=this.authority:r===null&&(r=Le),s===void 0?s=this.path:s===null&&(s=Le),i===void 0?i=this.query:i===null&&(i=Le),a===void 0?a=this.fragment:a===null&&(a=Le),n===this.scheme&&r===this.authority&&s===this.path&&i===this.query&&a===this.fragment?this:new Cr(n,r,s,i,a)}static parse(t,n=!1){const r=j0.exec(t);return r?new Cr(r[2]||Le,Ei(r[4]||Le),Ei(r[5]||Le),Ei(r[7]||Le),Ei(r[9]||Le),n):new Cr(Le,Le,Le,Le,Le)}static file(t){let n=Le;if(Ds&&(t=t.replace(/\\/g,Ot)),t[0]===Ot&&t[1]===Ot){const r=t.indexOf(Ot,2);r===-1?(n=t.substring(2),t=Ot):(n=t.substring(2,r),t=t.substring(r)||Ot)}return new Cr("file",n,t,Le,Le)}static from(t,n){return new Cr(t.scheme,t.authority,t.path,t.query,t.fragment,n)}static joinPath(t,...n){if(!t.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let r;return Ds&&t.scheme==="file"?r=za.file(Ke.join(wo(t,!0),...n)).path:r=st.join(t.path,...n),t.with({path:r})}toString(t=!1){return vo(this,t)}toJSON(){return this}static revive(t){if(t){if(t instanceof za)return t;{const n=new Cr(t);return n._formatted=t.external??null,n._fsPath=t._sep===Ec?t.fsPath??null:null,n}}else return t}};const Ec=Ds?1:void 0;class Cr extends bo{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=wo(this,!1)),this._fsPath}toString(t=!1){return t?vo(this,!0):(this._formatted||(this._formatted=vo(this,!1)),this._formatted)}toJSON(){const t={$mid:1};return this._fsPath&&(t.fsPath=this._fsPath,t._sep=Ec),this._formatted&&(t.external=this._formatted),this.path&&(t.path=this.path),this.scheme&&(t.scheme=this.scheme),this.authority&&(t.authority=this.authority),this.query&&(t.query=this.query),this.fragment&&(t.fragment=this.fragment),t}}const Ac={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 xc(e,t,n){let r,s=-1;for(let i=0;i<e.length;i++){const a=e.charCodeAt(i);if(a>=97&&a<=122||a>=65&&a<=90||a>=48&&a<=57||a===45||a===46||a===95||a===126||t&&a===47||n&&a===91||n&&a===93||n&&a===58)s!==-1&&(r+=encodeURIComponent(e.substring(s,i)),s=-1),r!==void 0&&(r+=e.charAt(i));else{r===void 0&&(r=e.substr(0,i));const o=Ac[a];o!==void 0?(s!==-1&&(r+=encodeURIComponent(e.substring(s,i)),s=-1),r+=o):s===-1&&(s=i)}}return s!==-1&&(r+=encodeURIComponent(e.substring(s))),r!==void 0?r:e}function U0(e){let t;for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);r===35||r===63?(t===void 0&&(t=e.substr(0,n)),t+=Ac[r]):t!==void 0&&(t+=e[n])}return t!==void 0?t:e}function wo(e,t){let n;return e.authority&&e.path.length>1&&e.scheme==="file"?n=`//${e.authority}${e.path}`:e.path.charCodeAt(0)===47&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&e.path.charCodeAt(2)===58?t?n=e.path.substr(1):n=e.path[1].toLowerCase()+e.path.substr(2):n=e.path,Ds&&(n=n.replace(/\//g,"\\")),n}function vo(e,t){const n=t?U0:xc;let r="",{scheme:s,authority:i,path:a,query:o,fragment:l}=e;if(s&&(r+=s,r+=":"),(i||s==="file")&&(r+=Ot,r+=Ot),i){let u=i.indexOf("@");if(u!==-1){const c=i.substr(0,u);i=i.substr(u+1),u=c.lastIndexOf(":"),u===-1?r+=n(c,!1,!1):(r+=n(c.substr(0,u),!1,!1),r+=":",r+=n(c.substr(u+1),!1,!0)),r+="@"}i=i.toLowerCase(),u=i.lastIndexOf(":"),u===-1?r+=n(i,!1,!0):(r+=n(i.substr(0,u),!1,!0),r+=i.substr(u))}if(a){if(a.length>=3&&a.charCodeAt(0)===47&&a.charCodeAt(2)===58){const u=a.charCodeAt(1);u>=65&&u<=90&&(a=`/${String.fromCharCode(u+32)}:${a.substr(3)}`)}else if(a.length>=2&&a.charCodeAt(1)===58){const u=a.charCodeAt(0);u>=65&&u<=90&&(a=`${String.fromCharCode(u+32)}:${a.substr(2)}`)}r+=n(a,!0,!1)}return o&&(r+="?",r+=n(o,!1,!1)),l&&(r+="#",r+=t?l:xc(l,!1,!1)),r}function Nc(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+Nc(e.substr(3)):e}}const Lc=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function Ei(e){return e.match(Lc)?e.replace(Lc,t=>Nc(t)):e}class dt extends le{constructor(t,n,r,s){super(t,n,r,s),this.selectionStartLineNumber=t,this.selectionStartColumn=n,this.positionLineNumber=r,this.positionColumn=s}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(t){return dt.selectionsEqual(this,t)}static selectionsEqual(t,n){return t.selectionStartLineNumber===n.selectionStartLineNumber&&t.selectionStartColumn===n.selectionStartColumn&&t.positionLineNumber===n.positionLineNumber&&t.positionColumn===n.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(t,n){return this.getDirection()===0?new dt(this.startLineNumber,this.startColumn,t,n):new dt(t,n,this.startLineNumber,this.startColumn)}getPosition(){return new Ne(this.positionLineNumber,this.positionColumn)}getSelectionStart(){return new Ne(this.selectionStartLineNumber,this.selectionStartColumn)}setStartPosition(t,n){return this.getDirection()===0?new dt(t,n,this.endLineNumber,this.endColumn):new dt(this.endLineNumber,this.endColumn,t,n)}static fromPositions(t,n=t){return new dt(t.lineNumber,t.column,n.lineNumber,n.column)}static fromRange(t,n){return n===0?new dt(t.startLineNumber,t.startColumn,t.endLineNumber,t.endColumn):new dt(t.endLineNumber,t.endColumn,t.startLineNumber,t.startColumn)}static liftSelection(t){return new dt(t.selectionStartLineNumber,t.selectionStartColumn,t.positionLineNumber,t.positionColumn)}static selectionsArrEqual(t,n){if(t&&!n||!t&&n)return!1;if(!t&&!n)return!0;if(t.length!==n.length)return!1;for(let r=0,s=t.length;r<s;r++)if(!this.selectionsEqual(t[r],n[r]))return!1;return!0}static isISelection(t){return!!t&&typeof t.selectionStartLineNumber=="number"&&typeof t.selectionStartColumn=="number"&&typeof t.positionLineNumber=="number"&&typeof t.positionColumn=="number"}static createWithDirection(t,n,r,s,i){return i===0?new dt(t,n,r,s):new dt(r,s,t,n)}}const kc=Object.create(null);function p(e,t){if(Ng(t)){const n=kc[t];if(n===void 0)throw new Error(`${e} references an unknown codicon: ${t}`);t=n}return kc[e]=t,{id:e}}const q0={add:p("add",6e4),plus:p("plus",6e4),gistNew:p("gist-new",6e4),repoCreate:p("repo-create",6e4),lightbulb:p("lightbulb",60001),lightBulb:p("light-bulb",60001),repo:p("repo",60002),repoDelete:p("repo-delete",60002),gistFork:p("gist-fork",60003),repoForked:p("repo-forked",60003),gitPullRequest:p("git-pull-request",60004),gitPullRequestAbandoned:p("git-pull-request-abandoned",60004),recordKeys:p("record-keys",60005),keyboard:p("keyboard",60005),tag:p("tag",60006),gitPullRequestLabel:p("git-pull-request-label",60006),tagAdd:p("tag-add",60006),tagRemove:p("tag-remove",60006),person:p("person",60007),personFollow:p("person-follow",60007),personOutline:p("person-outline",60007),personFilled:p("person-filled",60007),sourceControl:p("source-control",60008),mirror:p("mirror",60009),mirrorPublic:p("mirror-public",60009),star:p("star",60010),starAdd:p("star-add",60010),starDelete:p("star-delete",60010),starEmpty:p("star-empty",60010),comment:p("comment",60011),commentAdd:p("comment-add",60011),alert:p("alert",60012),warning:p("warning",60012),search:p("search",60013),searchSave:p("search-save",60013),logOut:p("log-out",60014),signOut:p("sign-out",60014),logIn:p("log-in",60015),signIn:p("sign-in",60015),eye:p("eye",60016),eyeUnwatch:p("eye-unwatch",60016),eyeWatch:p("eye-watch",60016),circleFilled:p("circle-filled",60017),primitiveDot:p("primitive-dot",60017),closeDirty:p("close-dirty",60017),debugBreakpoint:p("debug-breakpoint",60017),debugBreakpointDisabled:p("debug-breakpoint-disabled",60017),debugHint:p("debug-hint",60017),terminalDecorationSuccess:p("terminal-decoration-success",60017),primitiveSquare:p("primitive-square",60018),edit:p("edit",60019),pencil:p("pencil",60019),info:p("info",60020),issueOpened:p("issue-opened",60020),gistPrivate:p("gist-private",60021),gitForkPrivate:p("git-fork-private",60021),lock:p("lock",60021),mirrorPrivate:p("mirror-private",60021),close:p("close",60022),removeClose:p("remove-close",60022),x:p("x",60022),repoSync:p("repo-sync",60023),sync:p("sync",60023),clone:p("clone",60024),desktopDownload:p("desktop-download",60024),beaker:p("beaker",60025),microscope:p("microscope",60025),vm:p("vm",60026),deviceDesktop:p("device-desktop",60026),file:p("file",60027),more:p("more",60028),ellipsis:p("ellipsis",60028),kebabHorizontal:p("kebab-horizontal",60028),mailReply:p("mail-reply",60029),reply:p("reply",60029),organization:p("organization",60030),organizationFilled:p("organization-filled",60030),organizationOutline:p("organization-outline",60030),newFile:p("new-file",60031),fileAdd:p("file-add",60031),newFolder:p("new-folder",60032),fileDirectoryCreate:p("file-directory-create",60032),trash:p("trash",60033),trashcan:p("trashcan",60033),history:p("history",60034),clock:p("clock",60034),folder:p("folder",60035),fileDirectory:p("file-directory",60035),symbolFolder:p("symbol-folder",60035),logoGithub:p("logo-github",60036),markGithub:p("mark-github",60036),github:p("github",60036),terminal:p("terminal",60037),console:p("console",60037),repl:p("repl",60037),zap:p("zap",60038),symbolEvent:p("symbol-event",60038),error:p("error",60039),stop:p("stop",60039),variable:p("variable",60040),symbolVariable:p("symbol-variable",60040),array:p("array",60042),symbolArray:p("symbol-array",60042),symbolModule:p("symbol-module",60043),symbolPackage:p("symbol-package",60043),symbolNamespace:p("symbol-namespace",60043),symbolObject:p("symbol-object",60043),symbolMethod:p("symbol-method",60044),symbolFunction:p("symbol-function",60044),symbolConstructor:p("symbol-constructor",60044),symbolBoolean:p("symbol-boolean",60047),symbolNull:p("symbol-null",60047),symbolNumeric:p("symbol-numeric",60048),symbolNumber:p("symbol-number",60048),symbolStructure:p("symbol-structure",60049),symbolStruct:p("symbol-struct",60049),symbolParameter:p("symbol-parameter",60050),symbolTypeParameter:p("symbol-type-parameter",60050),symbolKey:p("symbol-key",60051),symbolText:p("symbol-text",60051),symbolReference:p("symbol-reference",60052),goToFile:p("go-to-file",60052),symbolEnum:p("symbol-enum",60053),symbolValue:p("symbol-value",60053),symbolRuler:p("symbol-ruler",60054),symbolUnit:p("symbol-unit",60054),activateBreakpoints:p("activate-breakpoints",60055),archive:p("archive",60056),arrowBoth:p("arrow-both",60057),arrowDown:p("arrow-down",60058),arrowLeft:p("arrow-left",60059),arrowRight:p("arrow-right",60060),arrowSmallDown:p("arrow-small-down",60061),arrowSmallLeft:p("arrow-small-left",60062),arrowSmallRight:p("arrow-small-right",60063),arrowSmallUp:p("arrow-small-up",60064),arrowUp:p("arrow-up",60065),bell:p("bell",60066),bold:p("bold",60067),book:p("book",60068),bookmark:p("bookmark",60069),debugBreakpointConditionalUnverified:p("debug-breakpoint-conditional-unverified",60070),debugBreakpointConditional:p("debug-breakpoint-conditional",60071),debugBreakpointConditionalDisabled:p("debug-breakpoint-conditional-disabled",60071),debugBreakpointDataUnverified:p("debug-breakpoint-data-unverified",60072),debugBreakpointData:p("debug-breakpoint-data",60073),debugBreakpointDataDisabled:p("debug-breakpoint-data-disabled",60073),debugBreakpointLogUnverified:p("debug-breakpoint-log-unverified",60074),debugBreakpointLog:p("debug-breakpoint-log",60075),debugBreakpointLogDisabled:p("debug-breakpoint-log-disabled",60075),briefcase:p("briefcase",60076),broadcast:p("broadcast",60077),browser:p("browser",60078),bug:p("bug",60079),calendar:p("calendar",60080),caseSensitive:p("case-sensitive",60081),check:p("check",60082),checklist:p("checklist",60083),chevronDown:p("chevron-down",60084),chevronLeft:p("chevron-left",60085),chevronRight:p("chevron-right",60086),chevronUp:p("chevron-up",60087),chromeClose:p("chrome-close",60088),chromeMaximize:p("chrome-maximize",60089),chromeMinimize:p("chrome-minimize",60090),chromeRestore:p("chrome-restore",60091),circleOutline:p("circle-outline",60092),circle:p("circle",60092),debugBreakpointUnverified:p("debug-breakpoint-unverified",60092),terminalDecorationIncomplete:p("terminal-decoration-incomplete",60092),circleSlash:p("circle-slash",60093),circuitBoard:p("circuit-board",60094),clearAll:p("clear-all",60095),clippy:p("clippy",60096),closeAll:p("close-all",60097),cloudDownload:p("cloud-download",60098),cloudUpload:p("cloud-upload",60099),code:p("code",60100),collapseAll:p("collapse-all",60101),colorMode:p("color-mode",60102),commentDiscussion:p("comment-discussion",60103),creditCard:p("credit-card",60105),dash:p("dash",60108),dashboard:p("dashboard",60109),database:p("database",60110),debugContinue:p("debug-continue",60111),debugDisconnect:p("debug-disconnect",60112),debugPause:p("debug-pause",60113),debugRestart:p("debug-restart",60114),debugStart:p("debug-start",60115),debugStepInto:p("debug-step-into",60116),debugStepOut:p("debug-step-out",60117),debugStepOver:p("debug-step-over",60118),debugStop:p("debug-stop",60119),debug:p("debug",60120),deviceCameraVideo:p("device-camera-video",60121),deviceCamera:p("device-camera",60122),deviceMobile:p("device-mobile",60123),diffAdded:p("diff-added",60124),diffIgnored:p("diff-ignored",60125),diffModified:p("diff-modified",60126),diffRemoved:p("diff-removed",60127),diffRenamed:p("diff-renamed",60128),diff:p("diff",60129),diffSidebyside:p("diff-sidebyside",60129),discard:p("discard",60130),editorLayout:p("editor-layout",60131),emptyWindow:p("empty-window",60132),exclude:p("exclude",60133),extensions:p("extensions",60134),eyeClosed:p("eye-closed",60135),fileBinary:p("file-binary",60136),fileCode:p("file-code",60137),fileMedia:p("file-media",60138),filePdf:p("file-pdf",60139),fileSubmodule:p("file-submodule",60140),fileSymlinkDirectory:p("file-symlink-directory",60141),fileSymlinkFile:p("file-symlink-file",60142),fileZip:p("file-zip",60143),files:p("files",60144),filter:p("filter",60145),flame:p("flame",60146),foldDown:p("fold-down",60147),foldUp:p("fold-up",60148),fold:p("fold",60149),folderActive:p("folder-active",60150),folderOpened:p("folder-opened",60151),gear:p("gear",60152),gift:p("gift",60153),gistSecret:p("gist-secret",60154),gist:p("gist",60155),gitCommit:p("git-commit",60156),gitCompare:p("git-compare",60157),compareChanges:p("compare-changes",60157),gitMerge:p("git-merge",60158),githubAction:p("github-action",60159),githubAlt:p("github-alt",60160),globe:p("globe",60161),grabber:p("grabber",60162),graph:p("graph",60163),gripper:p("gripper",60164),heart:p("heart",60165),home:p("home",60166),horizontalRule:p("horizontal-rule",60167),hubot:p("hubot",60168),inbox:p("inbox",60169),issueReopened:p("issue-reopened",60171),issues:p("issues",60172),italic:p("italic",60173),jersey:p("jersey",60174),json:p("json",60175),kebabVertical:p("kebab-vertical",60176),key:p("key",60177),law:p("law",60178),lightbulbAutofix:p("lightbulb-autofix",60179),linkExternal:p("link-external",60180),link:p("link",60181),listOrdered:p("list-ordered",60182),listUnordered:p("list-unordered",60183),liveShare:p("live-share",60184),loading:p("loading",60185),location:p("location",60186),mailRead:p("mail-read",60187),mail:p("mail",60188),markdown:p("markdown",60189),megaphone:p("megaphone",60190),mention:p("mention",60191),milestone:p("milestone",60192),gitPullRequestMilestone:p("git-pull-request-milestone",60192),mortarBoard:p("mortar-board",60193),move:p("move",60194),multipleWindows:p("multiple-windows",60195),mute:p("mute",60196),noNewline:p("no-newline",60197),note:p("note",60198),octoface:p("octoface",60199),openPreview:p("open-preview",60200),package:p("package",60201),paintcan:p("paintcan",60202),pin:p("pin",60203),play:p("play",60204),run:p("run",60204),plug:p("plug",60205),preserveCase:p("preserve-case",60206),preview:p("preview",60207),project:p("project",60208),pulse:p("pulse",60209),question:p("question",60210),quote:p("quote",60211),radioTower:p("radio-tower",60212),reactions:p("reactions",60213),references:p("references",60214),refresh:p("refresh",60215),regex:p("regex",60216),remoteExplorer:p("remote-explorer",60217),remote:p("remote",60218),remove:p("remove",60219),replaceAll:p("replace-all",60220),replace:p("replace",60221),repoClone:p("repo-clone",60222),repoForcePush:p("repo-force-push",60223),repoPull:p("repo-pull",60224),repoPush:p("repo-push",60225),report:p("report",60226),requestChanges:p("request-changes",60227),rocket:p("rocket",60228),rootFolderOpened:p("root-folder-opened",60229),rootFolder:p("root-folder",60230),rss:p("rss",60231),ruby:p("ruby",60232),saveAll:p("save-all",60233),saveAs:p("save-as",60234),save:p("save",60235),screenFull:p("screen-full",60236),screenNormal:p("screen-normal",60237),searchStop:p("search-stop",60238),server:p("server",60240),settingsGear:p("settings-gear",60241),settings:p("settings",60242),shield:p("shield",60243),smiley:p("smiley",60244),sortPrecedence:p("sort-precedence",60245),splitHorizontal:p("split-horizontal",60246),splitVertical:p("split-vertical",60247),squirrel:p("squirrel",60248),starFull:p("star-full",60249),starHalf:p("star-half",60250),symbolClass:p("symbol-class",60251),symbolColor:p("symbol-color",60252),symbolConstant:p("symbol-constant",60253),symbolEnumMember:p("symbol-enum-member",60254),symbolField:p("symbol-field",60255),symbolFile:p("symbol-file",60256),symbolInterface:p("symbol-interface",60257),symbolKeyword:p("symbol-keyword",60258),symbolMisc:p("symbol-misc",60259),symbolOperator:p("symbol-operator",60260),symbolProperty:p("symbol-property",60261),wrench:p("wrench",60261),wrenchSubaction:p("wrench-subaction",60261),symbolSnippet:p("symbol-snippet",60262),tasklist:p("tasklist",60263),telescope:p("telescope",60264),textSize:p("text-size",60265),threeBars:p("three-bars",60266),thumbsdown:p("thumbsdown",60267),thumbsup:p("thumbsup",60268),tools:p("tools",60269),triangleDown:p("triangle-down",60270),triangleLeft:p("triangle-left",60271),triangleRight:p("triangle-right",60272),triangleUp:p("triangle-up",60273),twitter:p("twitter",60274),unfold:p("unfold",60275),unlock:p("unlock",60276),unmute:p("unmute",60277),unverified:p("unverified",60278),verified:p("verified",60279),versions:p("versions",60280),vmActive:p("vm-active",60281),vmOutline:p("vm-outline",60282),vmRunning:p("vm-running",60283),watch:p("watch",60284),whitespace:p("whitespace",60285),wholeWord:p("whole-word",60286),window:p("window",60287),wordWrap:p("word-wrap",60288),zoomIn:p("zoom-in",60289),zoomOut:p("zoom-out",60290),listFilter:p("list-filter",60291),listFlat:p("list-flat",60292),listSelection:p("list-selection",60293),selection:p("selection",60293),listTree:p("list-tree",60294),debugBreakpointFunctionUnverified:p("debug-breakpoint-function-unverified",60295),debugBreakpointFunction:p("debug-breakpoint-function",60296),debugBreakpointFunctionDisabled:p("debug-breakpoint-function-disabled",60296),debugStackframeActive:p("debug-stackframe-active",60297),circleSmallFilled:p("circle-small-filled",60298),debugStackframeDot:p("debug-stackframe-dot",60298),terminalDecorationMark:p("terminal-decoration-mark",60298),debugStackframe:p("debug-stackframe",60299),debugStackframeFocused:p("debug-stackframe-focused",60299),debugBreakpointUnsupported:p("debug-breakpoint-unsupported",60300),symbolString:p("symbol-string",60301),debugReverseContinue:p("debug-reverse-continue",60302),debugStepBack:p("debug-step-back",60303),debugRestartFrame:p("debug-restart-frame",60304),debugAlt:p("debug-alt",60305),callIncoming:p("call-incoming",60306),callOutgoing:p("call-outgoing",60307),menu:p("menu",60308),expandAll:p("expand-all",60309),feedback:p("feedback",60310),gitPullRequestReviewer:p("git-pull-request-reviewer",60310),groupByRefType:p("group-by-ref-type",60311),ungroupByRefType:p("ungroup-by-ref-type",60312),account:p("account",60313),gitPullRequestAssignee:p("git-pull-request-assignee",60313),bellDot:p("bell-dot",60314),debugConsole:p("debug-console",60315),library:p("library",60316),output:p("output",60317),runAll:p("run-all",60318),syncIgnored:p("sync-ignored",60319),pinned:p("pinned",60320),githubInverted:p("github-inverted",60321),serverProcess:p("server-process",60322),serverEnvironment:p("server-environment",60323),pass:p("pass",60324),issueClosed:p("issue-closed",60324),stopCircle:p("stop-circle",60325),playCircle:p("play-circle",60326),record:p("record",60327),debugAltSmall:p("debug-alt-small",60328),vmConnect:p("vm-connect",60329),cloud:p("cloud",60330),merge:p("merge",60331),export:p("export",60332),graphLeft:p("graph-left",60333),magnet:p("magnet",60334),notebook:p("notebook",60335),redo:p("redo",60336),checkAll:p("check-all",60337),pinnedDirty:p("pinned-dirty",60338),passFilled:p("pass-filled",60339),circleLargeFilled:p("circle-large-filled",60340),circleLarge:p("circle-large",60341),circleLargeOutline:p("circle-large-outline",60341),combine:p("combine",60342),gather:p("gather",60342),table:p("table",60343),variableGroup:p("variable-group",60344),typeHierarchy:p("type-hierarchy",60345),typeHierarchySub:p("type-hierarchy-sub",60346),typeHierarchySuper:p("type-hierarchy-super",60347),gitPullRequestCreate:p("git-pull-request-create",60348),runAbove:p("run-above",60349),runBelow:p("run-below",60350),notebookTemplate:p("notebook-template",60351),debugRerun:p("debug-rerun",60352),workspaceTrusted:p("workspace-trusted",60353),workspaceUntrusted:p("workspace-untrusted",60354),workspaceUnknown:p("workspace-unknown",60355),terminalCmd:p("terminal-cmd",60356),terminalDebian:p("terminal-debian",60357),terminalLinux:p("terminal-linux",60358),terminalPowershell:p("terminal-powershell",60359),terminalTmux:p("terminal-tmux",60360),terminalUbuntu:p("terminal-ubuntu",60361),terminalBash:p("terminal-bash",60362),arrowSwap:p("arrow-swap",60363),copy:p("copy",60364),personAdd:p("person-add",60365),filterFilled:p("filter-filled",60366),wand:p("wand",60367),debugLineByLine:p("debug-line-by-line",60368),inspect:p("inspect",60369),layers:p("layers",60370),layersDot:p("layers-dot",60371),layersActive:p("layers-active",60372),compass:p("compass",60373),compassDot:p("compass-dot",60374),compassActive:p("compass-active",60375),azure:p("azure",60376),issueDraft:p("issue-draft",60377),gitPullRequestClosed:p("git-pull-request-closed",60378),gitPullRequestDraft:p("git-pull-request-draft",60379),debugAll:p("debug-all",60380),debugCoverage:p("debug-coverage",60381),runErrors:p("run-errors",60382),folderLibrary:p("folder-library",60383),debugContinueSmall:p("debug-continue-small",60384),beakerStop:p("beaker-stop",60385),graphLine:p("graph-line",60386),graphScatter:p("graph-scatter",60387),pieChart:p("pie-chart",60388),bracket:p("bracket",60175),bracketDot:p("bracket-dot",60389),bracketError:p("bracket-error",60390),lockSmall:p("lock-small",60391),azureDevops:p("azure-devops",60392),verifiedFilled:p("verified-filled",60393),newline:p("newline",60394),layout:p("layout",60395),layoutActivitybarLeft:p("layout-activitybar-left",60396),layoutActivitybarRight:p("layout-activitybar-right",60397),layoutPanelLeft:p("layout-panel-left",60398),layoutPanelCenter:p("layout-panel-center",60399),layoutPanelJustify:p("layout-panel-justify",60400),layoutPanelRight:p("layout-panel-right",60401),layoutPanel:p("layout-panel",60402),layoutSidebarLeft:p("layout-sidebar-left",60403),layoutSidebarRight:p("layout-sidebar-right",60404),layoutStatusbar:p("layout-statusbar",60405),layoutMenubar:p("layout-menubar",60406),layoutCentered:p("layout-centered",60407),target:p("target",60408),indent:p("indent",60409),recordSmall:p("record-small",60410),errorSmall:p("error-small",60411),terminalDecorationError:p("terminal-decoration-error",60411),arrowCircleDown:p("arrow-circle-down",60412),arrowCircleLeft:p("arrow-circle-left",60413),arrowCircleRight:p("arrow-circle-right",60414),arrowCircleUp:p("arrow-circle-up",60415),layoutSidebarRightOff:p("layout-sidebar-right-off",60416),layoutPanelOff:p("layout-panel-off",60417),layoutSidebarLeftOff:p("layout-sidebar-left-off",60418),blank:p("blank",60419),heartFilled:p("heart-filled",60420),map:p("map",60421),mapHorizontal:p("map-horizontal",60421),foldHorizontal:p("fold-horizontal",60421),mapFilled:p("map-filled",60422),mapHorizontalFilled:p("map-horizontal-filled",60422),foldHorizontalFilled:p("fold-horizontal-filled",60422),circleSmall:p("circle-small",60423),bellSlash:p("bell-slash",60424),bellSlashDot:p("bell-slash-dot",60425),commentUnresolved:p("comment-unresolved",60426),gitPullRequestGoToChanges:p("git-pull-request-go-to-changes",60427),gitPullRequestNewChanges:p("git-pull-request-new-changes",60428),searchFuzzy:p("search-fuzzy",60429),commentDraft:p("comment-draft",60430),send:p("send",60431),sparkle:p("sparkle",60432),insert:p("insert",60433),mic:p("mic",60434),thumbsdownFilled:p("thumbsdown-filled",60435),thumbsupFilled:p("thumbsup-filled",60436),coffee:p("coffee",60437),snake:p("snake",60438),game:p("game",60439),vr:p("vr",60440),chip:p("chip",60441),piano:p("piano",60442),music:p("music",60443),micFilled:p("mic-filled",60444),repoFetch:p("repo-fetch",60445),copilot:p("copilot",60446),lightbulbSparkle:p("lightbulb-sparkle",60447),robot:p("robot",60448),sparkleFilled:p("sparkle-filled",60449),diffSingle:p("diff-single",60450),diffMultiple:p("diff-multiple",60451),surroundWith:p("surround-with",60452),share:p("share",60453),gitStash:p("git-stash",60454),gitStashApply:p("git-stash-apply",60455),gitStashPop:p("git-stash-pop",60456),vscode:p("vscode",60457),vscodeInsiders:p("vscode-insiders",60458),codeOss:p("code-oss",60459),runCoverage:p("run-coverage",60460),runAllCoverage:p("run-all-coverage",60461),coverage:p("coverage",60462),githubProject:p("github-project",60463),mapVertical:p("map-vertical",60464),foldVertical:p("fold-vertical",60464),mapVerticalFilled:p("map-vertical-filled",60465),foldVerticalFilled:p("fold-vertical-filled",60465),goToSearch:p("go-to-search",60466),percentage:p("percentage",60467),sortPercentage:p("sort-percentage",60467),attach:p("attach",60468),goToEditingSession:p("go-to-editing-session",60469),editSession:p("edit-session",60470),codeReview:p("code-review",60471),copilotWarning:p("copilot-warning",60472),python:p("python",60473),copilotLarge:p("copilot-large",60474),copilotWarningLarge:p("copilot-warning-large",60475),keyboardTab:p("keyboard-tab",60476),copilotBlocked:p("copilot-blocked",60477),copilotNotConnected:p("copilot-not-connected",60478),flag:p("flag",60479),lightbulbEmpty:p("lightbulb-empty",60480),symbolMethodArrow:p("symbol-method-arrow",60481),copilotUnavailable:p("copilot-unavailable",60482),repoPinned:p("repo-pinned",60483),keyboardTabAbove:p("keyboard-tab-above",60484),keyboardTabBelow:p("keyboard-tab-below",60485),gitPullRequestDone:p("git-pull-request-done",60486),mcp:p("mcp",60487),extensionsLarge:p("extensions-large",60488),layoutPanelDock:p("layout-panel-dock",60489),layoutSidebarLeftDock:p("layout-sidebar-left-dock",60490),layoutSidebarRightDock:p("layout-sidebar-right-dock",60491),copilotInProgress:p("copilot-in-progress",60492),copilotError:p("copilot-error",60493),copilotSuccess:p("copilot-success",60494),chatSparkle:p("chat-sparkle",60495),searchSparkle:p("search-sparkle",60496),editSparkle:p("edit-sparkle",60497),copilotSnooze:p("copilot-snooze",60498),sendToRemoteAgent:p("send-to-remote-agent",60499),commentDiscussionSparkle:p("comment-discussion-sparkle",60500),chatSparkleWarning:p("chat-sparkle-warning",60501),chatSparkleError:p("chat-sparkle-error",60502),collection:p("collection",60503),newCollection:p("new-collection",60504),thinking:p("thinking",60505),build:p("build",60506),commentDiscussionQuote:p("comment-discussion-quote",60507),cursor:p("cursor",60508),eraser:p("eraser",60509),fileText:p("file-text",60510),gitLens:p("git-lens",60511),quotes:p("quotes",60512),rename:p("rename",60513),runWithDeps:p("run-with-deps",60514),debugConnected:p("debug-connected",60515),strikethrough:p("strikethrough",60516),openInProduct:p("open-in-product",60517),indexZero:p("index-zero",60518),agent:p("agent",60519),editCode:p("edit-code",60520),repoSelected:p("repo-selected",60521),skip:p("skip",60522),mergeInto:p("merge-into",60523),gitBranchChanges:p("git-branch-changes",60524),gitBranchStagedChanges:p("git-branch-staged-changes",60525),gitBranchConflicts:p("git-branch-conflicts",60526),gitBranch:p("git-branch",60527),gitBranchCreate:p("git-branch-create",60527),gitBranchDelete:p("git-branch-delete",60527),searchLarge:p("search-large",60528),terminalGitBash:p("terminal-git-bash",60529)},W0={dialogError:p("dialog-error","error"),dialogWarning:p("dialog-warning","warning"),dialogInfo:p("dialog-info","info"),dialogClose:p("dialog-close","close"),treeItemExpanded:p("tree-item-expanded","chevron-down"),treeFilterOnTypeOn:p("tree-filter-on-type-on","list-filter"),treeFilterOnTypeOff:p("tree-filter-on-type-off","list-selection"),treeFilterClear:p("tree-filter-clear","close"),treeItemLoading:p("tree-item-loading","loading"),menuSelection:p("menu-selection","check"),menuSubmenu:p("menu-submenu","chevron-right"),menuBarMore:p("menubar-more","more"),scrollbarButtonLeft:p("scrollbar-button-left","triangle-left"),scrollbarButtonRight:p("scrollbar-button-right","triangle-right"),scrollbarButtonUp:p("scrollbar-button-up","triangle-up"),scrollbarButtonDown:p("scrollbar-button-down","triangle-down"),toolBarMore:p("toolbar-more","more"),quickInputBack:p("quick-input-back","arrow-left"),dropDownButton:p("drop-down-button",60084),symbolCustomColor:p("symbol-customcolor",60252),exportIcon:p("export",60332),workspaceUnspecified:p("workspace-unspecified",60355),newLine:p("newline",60394),thumbsDownFilled:p("thumbsdown-filled",60435),thumbsUpFilled:p("thumbsup-filled",60436),gitFetch:p("git-fetch",60445),lightbulbSparkleAutofix:p("lightbulb-sparkle-autofix",60447),debugBreakpointPending:p("debug-breakpoint-pending",60377)},te={...q0,...W0};class H0{constructor(){this._tokenizationSupports=new Map,this._factories=new Map,this._onDidChange=new Ut,this.onDidChange=this._onDidChange.event,this._colorMap=null}handleChange(t){this._onDidChange.fire({changedLanguages:t,changedColorMap:!1})}register(t,n){return this._tokenizationSupports.set(t,n),this.handleChange([t]),mi(()=>{this._tokenizationSupports.get(t)===n&&(this._tokenizationSupports.delete(t),this.handleChange([t]))})}get(t){return this._tokenizationSupports.get(t)||null}registerFactory(t,n){var s;(s=this._factories.get(t))==null||s.dispose();const r=new Y0(this,t,n);return this._factories.set(t,r),mi(()=>{const i=this._factories.get(t);!i||i!==r||(this._factories.delete(t),i.dispose())})}async getOrCreate(t){const n=this.get(t);if(n)return n;const r=this._factories.get(t);return!r||r.isResolved?null:(await r.resolve(),this.get(t))}isResolved(t){if(this.get(t))return!0;const r=this._factories.get(t);return!!(!r||r.isResolved)}setColorMap(t){this._colorMap=t,this._onDidChange.fire({changedLanguages:Array.from(this._tokenizationSupports.keys()),changedColorMap:!0})}getColorMap(){return this._colorMap}getDefaultBackground(){return this._colorMap&&this._colorMap.length>2?this._colorMap[2]:null}}class Y0 extends Wn{get isResolved(){return this._isResolved}constructor(t,n,r){super(),this._registry=t,this._languageId=n,this._factory=r,this._isDisposed=!1,this._resolvePromise=null,this._isResolved=!1}dispose(){this._isDisposed=!0,super.dispose()}async resolve(){return this._resolvePromise||(this._resolvePromise=this._create()),this._resolvePromise}async _create(){const t=await this._factory.tokenizationSupport;this._isResolved=!0,t&&!this._isDisposed&&this._register(this._registry.register(this._languageId,t))}}class z0{constructor(t,n,r){this.offset=t,this.type=n,this.language=r,this._tokenBrand=void 0}toString(){return"("+this.offset+", "+this.type+")"}}var Cc;(function(e){e[e.Increase=0]="Increase",e[e.Decrease=1]="Decrease"})(Cc||(Cc={}));var Fc;(function(e){const t=new Map;t.set(0,te.symbolMethod),t.set(1,te.symbolFunction),t.set(2,te.symbolConstructor),t.set(3,te.symbolField),t.set(4,te.symbolVariable),t.set(5,te.symbolClass),t.set(6,te.symbolStruct),t.set(7,te.symbolInterface),t.set(8,te.symbolModule),t.set(9,te.symbolProperty),t.set(10,te.symbolEvent),t.set(11,te.symbolOperator),t.set(12,te.symbolUnit),t.set(13,te.symbolValue),t.set(15,te.symbolEnum),t.set(14,te.symbolConstant),t.set(15,te.symbolEnum),t.set(16,te.symbolEnumMember),t.set(17,te.symbolKeyword),t.set(28,te.symbolSnippet),t.set(18,te.symbolText),t.set(19,te.symbolColor),t.set(20,te.symbolFile),t.set(21,te.symbolReference),t.set(22,te.symbolCustomColor),t.set(23,te.symbolFolder),t.set(24,te.symbolTypeParameter),t.set(25,te.account),t.set(26,te.issues),t.set(27,te.tools);function n(a){let o=t.get(a);return o||(console.info("No codicon found for CompletionItemKind "+a),o=te.symbolProperty),o}e.toIcon=n;function r(a){switch(a){case 0:return re(728,"Method");case 1:return re(729,"Function");case 2:return re(730,"Constructor");case 3:return re(731,"Field");case 4:return re(732,"Variable");case 5:return re(733,"Class");case 6:return re(734,"Struct");case 7:return re(735,"Interface");case 8:return re(736,"Module");case 9:return re(737,"Property");case 10:return re(738,"Event");case 11:return re(739,"Operator");case 12:return re(740,"Unit");case 13:return re(741,"Value");case 14:return re(742,"Constant");case 15:return re(743,"Enum");case 16:return re(744,"Enum Member");case 17:return re(745,"Keyword");case 18:return re(746,"Text");case 19:return re(747,"Color");case 20:return re(748,"File");case 21:return re(749,"Reference");case 22:return re(750,"Custom Color");case 23:return re(751,"Folder");case 24:return re(752,"Type Parameter");case 25:return re(753,"User");case 26:return re(754,"Issue");case 27:return re(755,"Tool");case 28:return re(756,"Snippet");default:return""}}e.toLabel=r;const s=new Map;s.set("method",0),s.set("function",1),s.set("constructor",2),s.set("field",3),s.set("variable",4),s.set("class",5),s.set("struct",6),s.set("interface",7),s.set("module",8),s.set("property",9),s.set("event",10),s.set("operator",11),s.set("unit",12),s.set("value",13),s.set("constant",14),s.set("enum",15),s.set("enum-member",16),s.set("enumMember",16),s.set("keyword",17),s.set("snippet",28),s.set("text",18),s.set("color",19),s.set("file",20),s.set("reference",21),s.set("customcolor",22),s.set("folder",23),s.set("type-parameter",24),s.set("typeParameter",24),s.set("account",25),s.set("issue",26),s.set("tool",27);function i(a,o){let l=s.get(a);return typeof l>"u"&&!o&&(l=9),l}e.fromString=i})(Fc||(Fc={}));var _c;(function(e){e[e.Automatic=0]="Automatic",e[e.Explicit=1]="Explicit"})(_c||(_c={}));var Tc;(function(e){e[e.Code=1]="Code",e[e.Label=2]="Label"})(Tc||(Tc={}));var Mc;(function(e){e[e.Accepted=0]="Accepted",e[e.Rejected=1]="Rejected",e[e.Ignored=2]="Ignored"})(Mc||(Mc={}));var Oc;(function(e){e[e.Automatic=0]="Automatic",e[e.PasteAs=1]="PasteAs"})(Oc||(Oc={}));var Rc;(function(e){e[e.Invoke=1]="Invoke",e[e.TriggerCharacter=2]="TriggerCharacter",e[e.ContentChange=3]="ContentChange"})(Rc||(Rc={}));var Pc;(function(e){e[e.Text=0]="Text",e[e.Read=1]="Read",e[e.Write=2]="Write"})(Pc||(Pc={})),re(757,"array"),re(758,"boolean"),re(759,"class"),re(760,"constant"),re(761,"constructor"),re(762,"enumeration"),re(763,"enumeration member"),re(764,"event"),re(765,"field"),re(766,"file"),re(767,"function"),re(768,"interface"),re(769,"key"),re(770,"method"),re(771,"module"),re(772,"namespace"),re(773,"null"),re(774,"number"),re(775,"object"),re(776,"operator"),re(777,"package"),re(778,"property"),re(779,"string"),re(780,"struct"),re(781,"type parameter"),re(782,"variable");var Ic;(function(e){const t=new Map;t.set(0,te.symbolFile),t.set(1,te.symbolModule),t.set(2,te.symbolNamespace),t.set(3,te.symbolPackage),t.set(4,te.symbolClass),t.set(5,te.symbolMethod),t.set(6,te.symbolProperty),t.set(7,te.symbolField),t.set(8,te.symbolConstructor),t.set(9,te.symbolEnum),t.set(10,te.symbolInterface),t.set(11,te.symbolFunction),t.set(12,te.symbolVariable),t.set(13,te.symbolConstant),t.set(14,te.symbolString),t.set(15,te.symbolNumber),t.set(16,te.symbolBoolean),t.set(17,te.symbolArray),t.set(18,te.symbolObject),t.set(19,te.symbolKey),t.set(20,te.symbolNull),t.set(21,te.symbolEnumMember),t.set(22,te.symbolStruct),t.set(23,te.symbolEvent),t.set(24,te.symbolOperator),t.set(25,te.symbolTypeParameter);function n(i){let a=t.get(i);return a||(console.info("No codicon found for SymbolKind "+i),a=te.symbolProperty),a}e.toIcon=n;const r=new Map;r.set(0,20),r.set(1,8),r.set(2,8),r.set(3,8),r.set(4,5),r.set(5,0),r.set(6,9),r.set(7,3),r.set(8,2),r.set(9,15),r.set(10,7),r.set(11,1),r.set(12,4),r.set(13,14),r.set(14,18),r.set(15,13),r.set(16,13),r.set(17,13),r.set(18,13),r.set(19,17),r.set(20,13),r.set(21,16),r.set(22,6),r.set(23,10),r.set(24,11),r.set(25,24);function s(i){let a=r.get(i);return a===void 0&&(console.info("No completion kind found for SymbolKind "+i),a=20),a}e.toCompletionKind=s})(Ic||(Ic={}));let $6=(nt=class{static fromValue(t){switch(t){case"comment":return nt.Comment;case"imports":return nt.Imports;case"region":return nt.Region}return new nt(t)}constructor(t){this.value=t}},nt.Comment=new nt("comment"),nt.Imports=new nt("imports"),nt.Region=new nt("region"),nt);var $c;(function(e){e[e.AIGenerated=1]="AIGenerated"})($c||($c={}));var Bc;(function(e){e[e.Invoke=0]="Invoke",e[e.Automatic=1]="Automatic"})(Bc||(Bc={}));var Vc;(function(e){function t(n){return!n||typeof n!="object"?!1:typeof n.id=="string"&&typeof n.title=="string"}e.is=t})(Vc||(Vc={}));var jc;(function(e){e[e.Type=1]="Type",e[e.Parameter=2]="Parameter"})(jc||(jc={})),new H0;var Uc;(function(e){e[e.Unknown=0]="Unknown",e[e.Disabled=1]="Disabled",e[e.Enabled=2]="Enabled"})(Uc||(Uc={}));var qc;(function(e){e[e.Invoke=1]="Invoke",e[e.Auto=2]="Auto"})(qc||(qc={}));var Wc;(function(e){e[e.None=0]="None",e[e.KeepWhitespace=1]="KeepWhitespace",e[e.InsertAsSnippet=4]="InsertAsSnippet"})(Wc||(Wc={}));var Hc;(function(e){e[e.Method=0]="Method",e[e.Function=1]="Function",e[e.Constructor=2]="Constructor",e[e.Field=3]="Field",e[e.Variable=4]="Variable",e[e.Class=5]="Class",e[e.Struct=6]="Struct",e[e.Interface=7]="Interface",e[e.Module=8]="Module",e[e.Property=9]="Property",e[e.Event=10]="Event",e[e.Operator=11]="Operator",e[e.Unit=12]="Unit",e[e.Value=13]="Value",e[e.Constant=14]="Constant",e[e.Enum=15]="Enum",e[e.EnumMember=16]="EnumMember",e[e.Keyword=17]="Keyword",e[e.Text=18]="Text",e[e.Color=19]="Color",e[e.File=20]="File",e[e.Reference=21]="Reference",e[e.Customcolor=22]="Customcolor",e[e.Folder=23]="Folder",e[e.TypeParameter=24]="TypeParameter",e[e.User=25]="User",e[e.Issue=26]="Issue",e[e.Tool=27]="Tool",e[e.Snippet=28]="Snippet"})(Hc||(Hc={}));var Yc;(function(e){e[e.Deprecated=1]="Deprecated"})(Yc||(Yc={}));var zc;(function(e){e[e.Invoke=0]="Invoke",e[e.TriggerCharacter=1]="TriggerCharacter",e[e.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"})(zc||(zc={}));var Gc;(function(e){e[e.EXACT=0]="EXACT",e[e.ABOVE=1]="ABOVE",e[e.BELOW=2]="BELOW"})(Gc||(Gc={}));var Jc;(function(e){e[e.NotSet=0]="NotSet",e[e.ContentFlush=1]="ContentFlush",e[e.RecoverFromMarkers=2]="RecoverFromMarkers",e[e.Explicit=3]="Explicit",e[e.Paste=4]="Paste",e[e.Undo=5]="Undo",e[e.Redo=6]="Redo"})(Jc||(Jc={}));var Qc;(function(e){e[e.LF=1]="LF",e[e.CRLF=2]="CRLF"})(Qc||(Qc={}));var Kc;(function(e){e[e.Text=0]="Text",e[e.Read=1]="Read",e[e.Write=2]="Write"})(Kc||(Kc={}));var Xc;(function(e){e[e.None=0]="None",e[e.Keep=1]="Keep",e[e.Brackets=2]="Brackets",e[e.Advanced=3]="Advanced",e[e.Full=4]="Full"})(Xc||(Xc={}));var Zc;(function(e){e[e.acceptSuggestionOnCommitCharacter=0]="acceptSuggestionOnCommitCharacter",e[e.acceptSuggestionOnEnter=1]="acceptSuggestionOnEnter",e[e.accessibilitySupport=2]="accessibilitySupport",e[e.accessibilityPageSize=3]="accessibilityPageSize",e[e.allowOverflow=4]="allowOverflow",e[e.allowVariableLineHeights=5]="allowVariableLineHeights",e[e.allowVariableFonts=6]="allowVariableFonts",e[e.allowVariableFontsInAccessibilityMode=7]="allowVariableFontsInAccessibilityMode",e[e.ariaLabel=8]="ariaLabel",e[e.ariaRequired=9]="ariaRequired",e[e.autoClosingBrackets=10]="autoClosingBrackets",e[e.autoClosingComments=11]="autoClosingComments",e[e.screenReaderAnnounceInlineSuggestion=12]="screenReaderAnnounceInlineSuggestion",e[e.autoClosingDelete=13]="autoClosingDelete",e[e.autoClosingOvertype=14]="autoClosingOvertype",e[e.autoClosingQuotes=15]="autoClosingQuotes",e[e.autoIndent=16]="autoIndent",e[e.autoIndentOnPaste=17]="autoIndentOnPaste",e[e.autoIndentOnPasteWithinString=18]="autoIndentOnPasteWithinString",e[e.automaticLayout=19]="automaticLayout",e[e.autoSurround=20]="autoSurround",e[e.bracketPairColorization=21]="bracketPairColorization",e[e.guides=22]="guides",e[e.codeLens=23]="codeLens",e[e.codeLensFontFamily=24]="codeLensFontFamily",e[e.codeLensFontSize=25]="codeLensFontSize",e[e.colorDecorators=26]="colorDecorators",e[e.colorDecoratorsLimit=27]="colorDecoratorsLimit",e[e.columnSelection=28]="columnSelection",e[e.comments=29]="comments",e[e.contextmenu=30]="contextmenu",e[e.copyWithSyntaxHighlighting=31]="copyWithSyntaxHighlighting",e[e.cursorBlinking=32]="cursorBlinking",e[e.cursorSmoothCaretAnimation=33]="cursorSmoothCaretAnimation",e[e.cursorStyle=34]="cursorStyle",e[e.cursorSurroundingLines=35]="cursorSurroundingLines",e[e.cursorSurroundingLinesStyle=36]="cursorSurroundingLinesStyle",e[e.cursorWidth=37]="cursorWidth",e[e.cursorHeight=38]="cursorHeight",e[e.disableLayerHinting=39]="disableLayerHinting",e[e.disableMonospaceOptimizations=40]="disableMonospaceOptimizations",e[e.domReadOnly=41]="domReadOnly",e[e.dragAndDrop=42]="dragAndDrop",e[e.dropIntoEditor=43]="dropIntoEditor",e[e.editContext=44]="editContext",e[e.emptySelectionClipboard=45]="emptySelectionClipboard",e[e.experimentalGpuAcceleration=46]="experimentalGpuAcceleration",e[e.experimentalWhitespaceRendering=47]="experimentalWhitespaceRendering",e[e.extraEditorClassName=48]="extraEditorClassName",e[e.fastScrollSensitivity=49]="fastScrollSensitivity",e[e.find=50]="find",e[e.fixedOverflowWidgets=51]="fixedOverflowWidgets",e[e.folding=52]="folding",e[e.foldingStrategy=53]="foldingStrategy",e[e.foldingHighlight=54]="foldingHighlight",e[e.foldingImportsByDefault=55]="foldingImportsByDefault",e[e.foldingMaximumRegions=56]="foldingMaximumRegions",e[e.unfoldOnClickAfterEndOfLine=57]="unfoldOnClickAfterEndOfLine",e[e.fontFamily=58]="fontFamily",e[e.fontInfo=59]="fontInfo",e[e.fontLigatures=60]="fontLigatures",e[e.fontSize=61]="fontSize",e[e.fontWeight=62]="fontWeight",e[e.fontVariations=63]="fontVariations",e[e.formatOnPaste=64]="formatOnPaste",e[e.formatOnType=65]="formatOnType",e[e.glyphMargin=66]="glyphMargin",e[e.gotoLocation=67]="gotoLocation",e[e.hideCursorInOverviewRuler=68]="hideCursorInOverviewRuler",e[e.hover=69]="hover",e[e.inDiffEditor=70]="inDiffEditor",e[e.inlineSuggest=71]="inlineSuggest",e[e.letterSpacing=72]="letterSpacing",e[e.lightbulb=73]="lightbulb",e[e.lineDecorationsWidth=74]="lineDecorationsWidth",e[e.lineHeight=75]="lineHeight",e[e.lineNumbers=76]="lineNumbers",e[e.lineNumbersMinChars=77]="lineNumbersMinChars",e[e.linkedEditing=78]="linkedEditing",e[e.links=79]="links",e[e.matchBrackets=80]="matchBrackets",e[e.minimap=81]="minimap",e[e.mouseStyle=82]="mouseStyle",e[e.mouseWheelScrollSensitivity=83]="mouseWheelScrollSensitivity",e[e.mouseWheelZoom=84]="mouseWheelZoom",e[e.multiCursorMergeOverlapping=85]="multiCursorMergeOverlapping",e[e.multiCursorModifier=86]="multiCursorModifier",e[e.mouseMiddleClickAction=87]="mouseMiddleClickAction",e[e.multiCursorPaste=88]="multiCursorPaste",e[e.multiCursorLimit=89]="multiCursorLimit",e[e.occurrencesHighlight=90]="occurrencesHighlight",e[e.occurrencesHighlightDelay=91]="occurrencesHighlightDelay",e[e.overtypeCursorStyle=92]="overtypeCursorStyle",e[e.overtypeOnPaste=93]="overtypeOnPaste",e[e.overviewRulerBorder=94]="overviewRulerBorder",e[e.overviewRulerLanes=95]="overviewRulerLanes",e[e.padding=96]="padding",e[e.pasteAs=97]="pasteAs",e[e.parameterHints=98]="parameterHints",e[e.peekWidgetDefaultFocus=99]="peekWidgetDefaultFocus",e[e.placeholder=100]="placeholder",e[e.definitionLinkOpensInPeek=101]="definitionLinkOpensInPeek",e[e.quickSuggestions=102]="quickSuggestions",e[e.quickSuggestionsDelay=103]="quickSuggestionsDelay",e[e.readOnly=104]="readOnly",e[e.readOnlyMessage=105]="readOnlyMessage",e[e.renameOnType=106]="renameOnType",e[e.renderRichScreenReaderContent=107]="renderRichScreenReaderContent",e[e.renderControlCharacters=108]="renderControlCharacters",e[e.renderFinalNewline=109]="renderFinalNewline",e[e.renderLineHighlight=110]="renderLineHighlight",e[e.renderLineHighlightOnlyWhenFocus=111]="renderLineHighlightOnlyWhenFocus",e[e.renderValidationDecorations=112]="renderValidationDecorations",e[e.renderWhitespace=113]="renderWhitespace",e[e.revealHorizontalRightPadding=114]="revealHorizontalRightPadding",e[e.roundedSelection=115]="roundedSelection",e[e.rulers=116]="rulers",e[e.scrollbar=117]="scrollbar",e[e.scrollBeyondLastColumn=118]="scrollBeyondLastColumn",e[e.scrollBeyondLastLine=119]="scrollBeyondLastLine",e[e.scrollPredominantAxis=120]="scrollPredominantAxis",e[e.selectionClipboard=121]="selectionClipboard",e[e.selectionHighlight=122]="selectionHighlight",e[e.selectionHighlightMaxLength=123]="selectionHighlightMaxLength",e[e.selectionHighlightMultiline=124]="selectionHighlightMultiline",e[e.selectOnLineNumbers=125]="selectOnLineNumbers",e[e.showFoldingControls=126]="showFoldingControls",e[e.showUnused=127]="showUnused",e[e.snippetSuggestions=128]="snippetSuggestions",e[e.smartSelect=129]="smartSelect",e[e.smoothScrolling=130]="smoothScrolling",e[e.stickyScroll=131]="stickyScroll",e[e.stickyTabStops=132]="stickyTabStops",e[e.stopRenderingLineAfter=133]="stopRenderingLineAfter",e[e.suggest=134]="suggest",e[e.suggestFontSize=135]="suggestFontSize",e[e.suggestLineHeight=136]="suggestLineHeight",e[e.suggestOnTriggerCharacters=137]="suggestOnTriggerCharacters",e[e.suggestSelection=138]="suggestSelection",e[e.tabCompletion=139]="tabCompletion",e[e.tabIndex=140]="tabIndex",e[e.trimWhitespaceOnDelete=141]="trimWhitespaceOnDelete",e[e.unicodeHighlighting=142]="unicodeHighlighting",e[e.unusualLineTerminators=143]="unusualLineTerminators",e[e.useShadowDOM=144]="useShadowDOM",e[e.useTabStops=145]="useTabStops",e[e.wordBreak=146]="wordBreak",e[e.wordSegmenterLocales=147]="wordSegmenterLocales",e[e.wordSeparators=148]="wordSeparators",e[e.wordWrap=149]="wordWrap",e[e.wordWrapBreakAfterCharacters=150]="wordWrapBreakAfterCharacters",e[e.wordWrapBreakBeforeCharacters=151]="wordWrapBreakBeforeCharacters",e[e.wordWrapColumn=152]="wordWrapColumn",e[e.wordWrapOverride1=153]="wordWrapOverride1",e[e.wordWrapOverride2=154]="wordWrapOverride2",e[e.wrappingIndent=155]="wrappingIndent",e[e.wrappingStrategy=156]="wrappingStrategy",e[e.showDeprecated=157]="showDeprecated",e[e.inertialScroll=158]="inertialScroll",e[e.inlayHints=159]="inlayHints",e[e.wrapOnEscapedLineFeeds=160]="wrapOnEscapedLineFeeds",e[e.effectiveCursorStyle=161]="effectiveCursorStyle",e[e.editorClassName=162]="editorClassName",e[e.pixelRatio=163]="pixelRatio",e[e.tabFocusMode=164]="tabFocusMode",e[e.layoutInfo=165]="layoutInfo",e[e.wrappingInfo=166]="wrappingInfo",e[e.defaultColorDecorators=167]="defaultColorDecorators",e[e.colorDecoratorsActivatedOn=168]="colorDecoratorsActivatedOn",e[e.inlineCompletionsAccessibilityVerbose=169]="inlineCompletionsAccessibilityVerbose",e[e.effectiveEditContext=170]="effectiveEditContext",e[e.scrollOnMiddleClick=171]="scrollOnMiddleClick",e[e.effectiveAllowVariableFonts=172]="effectiveAllowVariableFonts"})(Zc||(Zc={}));var ef;(function(e){e[e.TextDefined=0]="TextDefined",e[e.LF=1]="LF",e[e.CRLF=2]="CRLF"})(ef||(ef={}));var tf;(function(e){e[e.LF=0]="LF",e[e.CRLF=1]="CRLF"})(tf||(tf={}));var nf;(function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=3]="Right"})(nf||(nf={}));var rf;(function(e){e[e.Increase=0]="Increase",e[e.Decrease=1]="Decrease"})(rf||(rf={}));var sf;(function(e){e[e.None=0]="None",e[e.Indent=1]="Indent",e[e.IndentOutdent=2]="IndentOutdent",e[e.Outdent=3]="Outdent"})(sf||(sf={}));var af;(function(e){e[e.Both=0]="Both",e[e.Right=1]="Right",e[e.Left=2]="Left",e[e.None=3]="None"})(af||(af={}));var of;(function(e){e[e.Type=1]="Type",e[e.Parameter=2]="Parameter"})(of||(of={}));var lf;(function(e){e[e.Accepted=0]="Accepted",e[e.Rejected=1]="Rejected",e[e.Ignored=2]="Ignored"})(lf||(lf={}));var uf;(function(e){e[e.Code=1]="Code",e[e.Label=2]="Label"})(uf||(uf={}));var cf;(function(e){e[e.Automatic=0]="Automatic",e[e.Explicit=1]="Explicit"})(cf||(cf={}));var Do;(function(e){e[e.DependsOnKbLayout=-1]="DependsOnKbLayout",e[e.Unknown=0]="Unknown",e[e.Backspace=1]="Backspace",e[e.Tab=2]="Tab",e[e.Enter=3]="Enter",e[e.Shift=4]="Shift",e[e.Ctrl=5]="Ctrl",e[e.Alt=6]="Alt",e[e.PauseBreak=7]="PauseBreak",e[e.CapsLock=8]="CapsLock",e[e.Escape=9]="Escape",e[e.Space=10]="Space",e[e.PageUp=11]="PageUp",e[e.PageDown=12]="PageDown",e[e.End=13]="End",e[e.Home=14]="Home",e[e.LeftArrow=15]="LeftArrow",e[e.UpArrow=16]="UpArrow",e[e.RightArrow=17]="RightArrow",e[e.DownArrow=18]="DownArrow",e[e.Insert=19]="Insert",e[e.Delete=20]="Delete",e[e.Digit0=21]="Digit0",e[e.Digit1=22]="Digit1",e[e.Digit2=23]="Digit2",e[e.Digit3=24]="Digit3",e[e.Digit4=25]="Digit4",e[e.Digit5=26]="Digit5",e[e.Digit6=27]="Digit6",e[e.Digit7=28]="Digit7",e[e.Digit8=29]="Digit8",e[e.Digit9=30]="Digit9",e[e.KeyA=31]="KeyA",e[e.KeyB=32]="KeyB",e[e.KeyC=33]="KeyC",e[e.KeyD=34]="KeyD",e[e.KeyE=35]="KeyE",e[e.KeyF=36]="KeyF",e[e.KeyG=37]="KeyG",e[e.KeyH=38]="KeyH",e[e.KeyI=39]="KeyI",e[e.KeyJ=40]="KeyJ",e[e.KeyK=41]="KeyK",e[e.KeyL=42]="KeyL",e[e.KeyM=43]="KeyM",e[e.KeyN=44]="KeyN",e[e.KeyO=45]="KeyO",e[e.KeyP=46]="KeyP",e[e.KeyQ=47]="KeyQ",e[e.KeyR=48]="KeyR",e[e.KeyS=49]="KeyS",e[e.KeyT=50]="KeyT",e[e.KeyU=51]="KeyU",e[e.KeyV=52]="KeyV",e[e.KeyW=53]="KeyW",e[e.KeyX=54]="KeyX",e[e.KeyY=55]="KeyY",e[e.KeyZ=56]="KeyZ",e[e.Meta=57]="Meta",e[e.ContextMenu=58]="ContextMenu",e[e.F1=59]="F1",e[e.F2=60]="F2",e[e.F3=61]="F3",e[e.F4=62]="F4",e[e.F5=63]="F5",e[e.F6=64]="F6",e[e.F7=65]="F7",e[e.F8=66]="F8",e[e.F9=67]="F9",e[e.F10=68]="F10",e[e.F11=69]="F11",e[e.F12=70]="F12",e[e.F13=71]="F13",e[e.F14=72]="F14",e[e.F15=73]="F15",e[e.F16=74]="F16",e[e.F17=75]="F17",e[e.F18=76]="F18",e[e.F19=77]="F19",e[e.F20=78]="F20",e[e.F21=79]="F21",e[e.F22=80]="F22",e[e.F23=81]="F23",e[e.F24=82]="F24",e[e.NumLock=83]="NumLock",e[e.ScrollLock=84]="ScrollLock",e[e.Semicolon=85]="Semicolon",e[e.Equal=86]="Equal",e[e.Comma=87]="Comma",e[e.Minus=88]="Minus",e[e.Period=89]="Period",e[e.Slash=90]="Slash",e[e.Backquote=91]="Backquote",e[e.BracketLeft=92]="BracketLeft",e[e.Backslash=93]="Backslash",e[e.BracketRight=94]="BracketRight",e[e.Quote=95]="Quote",e[e.OEM_8=96]="OEM_8",e[e.IntlBackslash=97]="IntlBackslash",e[e.Numpad0=98]="Numpad0",e[e.Numpad1=99]="Numpad1",e[e.Numpad2=100]="Numpad2",e[e.Numpad3=101]="Numpad3",e[e.Numpad4=102]="Numpad4",e[e.Numpad5=103]="Numpad5",e[e.Numpad6=104]="Numpad6",e[e.Numpad7=105]="Numpad7",e[e.Numpad8=106]="Numpad8",e[e.Numpad9=107]="Numpad9",e[e.NumpadMultiply=108]="NumpadMultiply",e[e.NumpadAdd=109]="NumpadAdd",e[e.NUMPAD_SEPARATOR=110]="NUMPAD_SEPARATOR",e[e.NumpadSubtract=111]="NumpadSubtract",e[e.NumpadDecimal=112]="NumpadDecimal",e[e.NumpadDivide=113]="NumpadDivide",e[e.KEY_IN_COMPOSITION=114]="KEY_IN_COMPOSITION",e[e.ABNT_C1=115]="ABNT_C1",e[e.ABNT_C2=116]="ABNT_C2",e[e.AudioVolumeMute=117]="AudioVolumeMute",e[e.AudioVolumeUp=118]="AudioVolumeUp",e[e.AudioVolumeDown=119]="AudioVolumeDown",e[e.BrowserSearch=120]="BrowserSearch",e[e.BrowserHome=121]="BrowserHome",e[e.BrowserBack=122]="BrowserBack",e[e.BrowserForward=123]="BrowserForward",e[e.MediaTrackNext=124]="MediaTrackNext",e[e.MediaTrackPrevious=125]="MediaTrackPrevious",e[e.MediaStop=126]="MediaStop",e[e.MediaPlayPause=127]="MediaPlayPause",e[e.LaunchMediaPlayer=128]="LaunchMediaPlayer",e[e.LaunchMail=129]="LaunchMail",e[e.LaunchApp2=130]="LaunchApp2",e[e.Clear=131]="Clear",e[e.MAX_VALUE=132]="MAX_VALUE"})(Do||(Do={}));var So;(function(e){e[e.Hint=1]="Hint",e[e.Info=2]="Info",e[e.Warning=4]="Warning",e[e.Error=8]="Error"})(So||(So={}));var Eo;(function(e){e[e.Unnecessary=1]="Unnecessary",e[e.Deprecated=2]="Deprecated"})(Eo||(Eo={}));var ff;(function(e){e[e.Inline=1]="Inline",e[e.Gutter=2]="Gutter"})(ff||(ff={}));var hf;(function(e){e[e.Normal=1]="Normal",e[e.Underlined=2]="Underlined"})(hf||(hf={}));var df;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.TEXTAREA=1]="TEXTAREA",e[e.GUTTER_GLYPH_MARGIN=2]="GUTTER_GLYPH_MARGIN",e[e.GUTTER_LINE_NUMBERS=3]="GUTTER_LINE_NUMBERS",e[e.GUTTER_LINE_DECORATIONS=4]="GUTTER_LINE_DECORATIONS",e[e.GUTTER_VIEW_ZONE=5]="GUTTER_VIEW_ZONE",e[e.CONTENT_TEXT=6]="CONTENT_TEXT",e[e.CONTENT_EMPTY=7]="CONTENT_EMPTY",e[e.CONTENT_VIEW_ZONE=8]="CONTENT_VIEW_ZONE",e[e.CONTENT_WIDGET=9]="CONTENT_WIDGET",e[e.OVERVIEW_RULER=10]="OVERVIEW_RULER",e[e.SCROLLBAR=11]="SCROLLBAR",e[e.OVERLAY_WIDGET=12]="OVERLAY_WIDGET",e[e.OUTSIDE_EDITOR=13]="OUTSIDE_EDITOR"})(df||(df={}));var mf;(function(e){e[e.AIGenerated=1]="AIGenerated"})(mf||(mf={}));var pf;(function(e){e[e.Invoke=0]="Invoke",e[e.Automatic=1]="Automatic"})(pf||(pf={}));var gf;(function(e){e[e.TOP_RIGHT_CORNER=0]="TOP_RIGHT_CORNER",e[e.BOTTOM_RIGHT_CORNER=1]="BOTTOM_RIGHT_CORNER",e[e.TOP_CENTER=2]="TOP_CENTER"})(gf||(gf={}));var yf;(function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=4]="Right",e[e.Full=7]="Full"})(yf||(yf={}));var bf;(function(e){e[e.Word=0]="Word",e[e.Line=1]="Line",e[e.Suggest=2]="Suggest"})(bf||(bf={}));var wf;(function(e){e[e.Left=0]="Left",e[e.Right=1]="Right",e[e.None=2]="None",e[e.LeftOfInjectedText=3]="LeftOfInjectedText",e[e.RightOfInjectedText=4]="RightOfInjectedText"})(wf||(wf={}));var vf;(function(e){e[e.Off=0]="Off",e[e.On=1]="On",e[e.Relative=2]="Relative",e[e.Interval=3]="Interval",e[e.Custom=4]="Custom"})(vf||(vf={}));var Df;(function(e){e[e.None=0]="None",e[e.Text=1]="Text",e[e.Blocks=2]="Blocks"})(Df||(Df={}));var Sf;(function(e){e[e.Smooth=0]="Smooth",e[e.Immediate=1]="Immediate"})(Sf||(Sf={}));var Ef;(function(e){e[e.Auto=1]="Auto",e[e.Hidden=2]="Hidden",e[e.Visible=3]="Visible"})(Ef||(Ef={}));var Ao;(function(e){e[e.LTR=0]="LTR",e[e.RTL=1]="RTL"})(Ao||(Ao={}));var Af;(function(e){e.Off="off",e.OnCode="onCode",e.On="on"})(Af||(Af={}));var xf;(function(e){e[e.Invoke=1]="Invoke",e[e.TriggerCharacter=2]="TriggerCharacter",e[e.ContentChange=3]="ContentChange"})(xf||(xf={}));var Nf;(function(e){e[e.File=0]="File",e[e.Module=1]="Module",e[e.Namespace=2]="Namespace",e[e.Package=3]="Package",e[e.Class=4]="Class",e[e.Method=5]="Method",e[e.Property=6]="Property",e[e.Field=7]="Field",e[e.Constructor=8]="Constructor",e[e.Enum=9]="Enum",e[e.Interface=10]="Interface",e[e.Function=11]="Function",e[e.Variable=12]="Variable",e[e.Constant=13]="Constant",e[e.String=14]="String",e[e.Number=15]="Number",e[e.Boolean=16]="Boolean",e[e.Array=17]="Array",e[e.Object=18]="Object",e[e.Key=19]="Key",e[e.Null=20]="Null",e[e.EnumMember=21]="EnumMember",e[e.Struct=22]="Struct",e[e.Event=23]="Event",e[e.Operator=24]="Operator",e[e.TypeParameter=25]="TypeParameter"})(Nf||(Nf={}));var Lf;(function(e){e[e.Deprecated=1]="Deprecated"})(Lf||(Lf={}));var kf;(function(e){e[e.LTR=0]="LTR",e[e.RTL=1]="RTL"})(kf||(kf={}));var Cf;(function(e){e[e.Hidden=0]="Hidden",e[e.Blink=1]="Blink",e[e.Smooth=2]="Smooth",e[e.Phase=3]="Phase",e[e.Expand=4]="Expand",e[e.Solid=5]="Solid"})(Cf||(Cf={}));var Ff;(function(e){e[e.Line=1]="Line",e[e.Block=2]="Block",e[e.Underline=3]="Underline",e[e.LineThin=4]="LineThin",e[e.BlockOutline=5]="BlockOutline",e[e.UnderlineThin=6]="UnderlineThin"})(Ff||(Ff={}));var _f;(function(e){e[e.AlwaysGrowsWhenTypingAtEdges=0]="AlwaysGrowsWhenTypingAtEdges",e[e.NeverGrowsWhenTypingAtEdges=1]="NeverGrowsWhenTypingAtEdges",e[e.GrowsOnlyWhenTypingBefore=2]="GrowsOnlyWhenTypingBefore",e[e.GrowsOnlyWhenTypingAfter=3]="GrowsOnlyWhenTypingAfter"})(_f||(_f={}));var Tf;(function(e){e[e.None=0]="None",e[e.Same=1]="Same",e[e.Indent=2]="Indent",e[e.DeepIndent=3]="DeepIndent"})(Tf||(Tf={}));const bs=class bs{static chord(t,n){return A0(t,n)}};bs.CtrlCmd=2048,bs.Shift=1024,bs.Alt=512,bs.WinCtrl=256;let xo=bs;function G0(){return{editor:void 0,languages:void 0,CancellationTokenSource:v0,Emitter:Ut,KeyCode:Do,KeyMod:xo,Position:Ne,Range:le,Selection:dt,SelectionDirection:Ao,MarkerSeverity:So,MarkerTag:Eo,Uri:bo,Token:z0}}var Mf;class J0{constructor(){this[Mf]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){var t;return(t=this._head)==null?void 0:t.value}get last(){var t;return(t=this._tail)==null?void 0:t.value}has(t){return this._map.has(t)}get(t,n=0){const r=this._map.get(t);if(r)return n!==0&&this.touch(r,n),r.value}set(t,n,r=0){let s=this._map.get(t);if(s)s.value=n,r!==0&&this.touch(s,r);else{switch(s={key:t,value:n,next:void 0,previous:void 0},r){case 0:this.addItemLast(s);break;case 1:this.addItemFirst(s);break;case 2:this.addItemLast(s);break;default:this.addItemLast(s);break}this._map.set(t,s),this._size++}return this}delete(t){return!!this.remove(t)}remove(t){const n=this._map.get(t);if(n)return this._map.delete(t),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 t=this._head;return this._map.delete(t.key),this.removeItem(t),this._size--,t.value}forEach(t,n){const r=this._state;let s=this._head;for(;s;){if(n?t.bind(n)(s.value,s.key,this):t(s.value,s.key,this),this._state!==r)throw new Error("LinkedMap got modified during iteration.");s=s.next}}keys(){const t=this,n=this._state;let r=this._head;const s={[Symbol.iterator](){return s},next(){if(t._state!==n)throw new Error("LinkedMap got modified during iteration.");if(r){const i={value:r.key,done:!1};return r=r.next,i}else return{value:void 0,done:!0}}};return s}values(){const t=this,n=this._state;let r=this._head;const s={[Symbol.iterator](){return s},next(){if(t._state!==n)throw new Error("LinkedMap got modified during iteration.");if(r){const i={value:r.value,done:!1};return r=r.next,i}else return{value:void 0,done:!0}}};return s}entries(){const t=this,n=this._state;let r=this._head;const s={[Symbol.iterator](){return s},next(){if(t._state!==n)throw new Error("LinkedMap got modified during iteration.");if(r){const i={value:[r.key,r.value],done:!1};return r=r.next,i}else return{value:void 0,done:!0}}};return s}[(Mf=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(t){if(t>=this.size)return;if(t===0){this.clear();return}let n=this._head,r=this.size;for(;n&&r>t;)this._map.delete(n.key),n=n.next,r--;this._head=n,this._size=r,n&&(n.previous=void 0),this._state++}trimNew(t){if(t>=this.size)return;if(t===0){this.clear();return}let n=this._tail,r=this.size;for(;n&&r>t;)this._map.delete(n.key),n=n.previous,r--;this._tail=n,this._size=r,n&&(n.next=void 0),this._state++}addItemFirst(t){if(!this._head&&!this._tail)this._tail=t;else if(this._head)t.next=this._head,this._head.previous=t;else throw new Error("Invalid list");this._head=t,this._state++}addItemLast(t){if(!this._head&&!this._tail)this._head=t;else if(this._tail)t.previous=this._tail,this._tail.next=t;else throw new Error("Invalid list");this._tail=t,this._state++}removeItem(t){if(t===this._head&&t===this._tail)this._head=void 0,this._tail=void 0;else if(t===this._head){if(!t.next)throw new Error("Invalid list");t.next.previous=void 0,this._head=t.next}else if(t===this._tail){if(!t.previous)throw new Error("Invalid list");t.previous.next=void 0,this._tail=t.previous}else{const n=t.next,r=t.previous;if(!n||!r)throw new Error("Invalid list");n.previous=r,r.next=n}t.next=void 0,t.previous=void 0,this._state++}touch(t,n){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(n!==1&&n!==2)){if(n===1){if(t===this._head)return;const r=t.next,s=t.previous;t===this._tail?(s.next=void 0,this._tail=s):(r.previous=s,s.next=r),t.previous=void 0,t.next=this._head,this._head.previous=t,this._head=t,this._state++}else if(n===2){if(t===this._tail)return;const r=t.next,s=t.previous;t===this._head?(r.previous=void 0,this._head=r):(r.previous=s,s.next=r),t.next=void 0,t.previous=this._tail,this._tail.next=t,this._tail=t,this._state++}}}toJSON(){const t=[];return this.forEach((n,r)=>{t.push([r,n])}),t}fromJSON(t){this.clear();for(const[n,r]of t)this.set(n,r)}}class Q0 extends J0{constructor(t,n=1){super(),this._limit=t,this._ratio=Math.min(Math.max(0,n),1)}get limit(){return this._limit}set limit(t){this._limit=t,this.checkTrim()}get(t,n=2){return super.get(t,n)}peek(t){return super.get(t,0)}set(t,n){return super.set(t,n,2),this}checkTrim(){this.size>this._limit&&this.trim(Math.round(this._limit*this._ratio))}}class K0 extends Q0{constructor(t,n=1){super(t,n)}trim(t){this.trimOld(t)}set(t,n){return super.set(t,n),this.checkTrim(),this}}class X0{constructor(){this.map=new Map}add(t,n){let r=this.map.get(t);r||(r=new Set,this.map.set(t,r)),r.add(n)}delete(t,n){const r=this.map.get(t);r&&(r.delete(n),r.size===0&&this.map.delete(t))}forEach(t,n){const r=this.map.get(t);r&&r.forEach(n)}}new K0(10);var Of;(function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=4]="Right",e[e.Full=7]="Full"})(Of||(Of={}));var Rf;(function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=3]="Right"})(Rf||(Rf={}));var Pf;(function(e){e[e.LTR=0]="LTR",e[e.RTL=1]="RTL"})(Pf||(Pf={}));var If;(function(e){e[e.Both=0]="Both",e[e.Right=1]="Right",e[e.Left=2]="Left",e[e.None=3]="None"})(If||(If={}));function Z0(e){if(!e||e.length===0)return!1;for(let t=0,n=e.length;t<n;t++){const r=e.charCodeAt(t);if(r===10)return!0;if(r===92){if(t++,t>=n)break;const s=e.charCodeAt(t);if(s===110||s===114||s===87)return!0}}return!1}function ey(e,t,n,r,s){if(r===0)return!0;const i=t.charCodeAt(r-1);if(e.get(i)!==0||i===13||i===10)return!0;if(s>0){const a=t.charCodeAt(r);if(e.get(a)!==0)return!0}return!1}function ty(e,t,n,r,s){if(r+s===n)return!0;const i=t.charCodeAt(r+s);if(e.get(i)!==0||i===13||i===10)return!0;if(s>0){const a=t.charCodeAt(r+s-1);if(e.get(a)!==0)return!0}return!1}function ny(e,t,n,r,s){return ey(e,t,n,r,s)&&ty(e,t,n,r,s)}class ry{constructor(t,n){this._wordSeparators=t,this._searchRegex=n,this._prevMatchStartIndex=-1,this._prevMatchLength=0}reset(t){this._searchRegex.lastIndex=t,this._prevMatchStartIndex=-1,this._prevMatchLength=0}next(t){const n=t.length;let r;do{if(this._prevMatchStartIndex+this._prevMatchLength===n||(r=this._searchRegex.exec(t),!r))return null;const s=r.index,i=r[0].length;if(s===this._prevMatchStartIndex&&i===this._prevMatchLength){if(i===0){n0(t,n,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}return null}if(this._prevMatchStartIndex=s,this._prevMatchLength=i,!this._wordSeparators||ny(this._wordSeparators,t,n,s,i))return r}while(r);return null}}const sy="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";function iy(e=""){let t="(-?\\d*\\.\\d\\w*)|([^";for(const n of sy)e.indexOf(n)>=0||(t+="\\"+n);return t+="\\s]+)",new RegExp(t,"g")}const $f=iy();function Bf(e){let t=$f;if(e&&e instanceof RegExp)if(e.global)t=e;else{let n="g";e.ignoreCase&&(n+="i"),e.multiline&&(n+="m"),e.unicode&&(n+="u"),t=new RegExp(e.source,n)}return t.lastIndex=0,t}const Vf=new Fg;Vf.unshift({maxLen:1e3,windowSize:15,timeBudget:150});function No(e,t,n,r,s){if(t=Bf(t),s||(s=di.first(Vf)),n.length>s.maxLen){let u=e-s.maxLen/2;return u<0?u=0:r+=u,n=n.substring(u,e+s.maxLen/2),No(e,t,n,r,s)}const i=Date.now(),a=e-1-r;let o=-1,l=null;for(let u=1;!(Date.now()-i>=s.timeBudget);u++){const c=a-s.windowSize*u;t.lastIndex=Math.max(0,c);const f=ay(t,n,a,o);if(!f&&l||(l=f,c<=0))break;o=c}if(l){const u={word:l[0],startColumn:r+1+l.index,endColumn:r+1+l.index+l[0].length};return t.lastIndex=0,u}return null}function ay(e,t,n,r){let s;for(;s=e.exec(t);){const i=s.index||0;if(i<=n&&e.lastIndex>=n)return s;if(r>0&&i>r)return null}return null}class oy{static computeUnicodeHighlights(t,n,r){const s=r?r.startLineNumber:1,i=r?r.endLineNumber:t.getLineCount(),a=new jf(n),o=a.getCandidateCodePoints();let l;o==="allNonBasicAscii"?l=new RegExp("[^\\t\\n\\r\\x20-\\x7E]","g"):l=new RegExp(`${ly(Array.from(o))}`,"g");const u=new ry(null,l),c=[];let f=!1,d,y=0,D=0,S=0;e:for(let N=s,x=i;N<=x;N++){const k=t.getLineContent(N),b=k.length;u.reset(0);do if(d=u.next(k),d){let w=d.index,h=d.index+d[0].length;if(w>0){const v=k.charCodeAt(w-1);oo(v)&&w--}if(h+1<b){const v=k.charCodeAt(h-1);oo(v)&&h++}const g=k.substring(w,h);let m=No(w+1,$f,k,0);m&&m.endColumn<=w+1&&(m=null);const E=a.shouldHighlightNonBasicASCII(g,m?m.word:null);if(E!==0){if(E===3?y++:E===2?D++:E===1?S++:Ag(),c.length>=1e3){f=!0;break e}c.push(new le(N,w+1,N,h+1))}}while(d)}return{ranges:c,hasMore:f,ambiguousCharacterCount:y,invisibleCharacterCount:D,nonBasicAsciiCharacterCount:S}}static computeUnicodeHighlightReason(t,n){const r=new jf(n);switch(r.shouldHighlightNonBasicASCII(t,null)){case 0:return null;case 2:return{kind:1};case 3:{const i=t.codePointAt(0),a=r.ambiguousCharacters.getPrimaryConfusable(i),o=Ss.getLocales().filter(l=>!Ss.getInstance(new Set([...n.allowedLocales,l])).isAmbiguous(i));return{kind:0,confusableWith:String.fromCodePoint(a),notAmbiguousInLocales:o}}case 1:return{kind:2}}}}function ly(e,t){return`[${zg(e.map(r=>String.fromCodePoint(r)).join(""))}]`}class jf{constructor(t){this.options=t,this.allowedCodePoints=new Set(t.allowedCodePoints),this.ambiguousCharacters=Ss.getInstance(new Set(t.allowedLocales))}getCandidateCodePoints(){if(this.options.nonBasicASCII)return"allNonBasicAscii";const t=new Set;if(this.options.invisibleCharacters)for(const n of Es.codePoints)Uf(String.fromCodePoint(n))||t.add(n);if(this.options.ambiguousCharacters)for(const n of this.ambiguousCharacters.getConfusableCodePoints())t.add(n);for(const n of this.allowedCodePoints)t.delete(n);return t}shouldHighlightNonBasicASCII(t,n){const r=t.codePointAt(0);if(this.allowedCodePoints.has(r))return 0;if(this.options.nonBasicASCII)return 1;let s=!1,i=!1;if(n)for(const a of n){const o=a.codePointAt(0),l=s0(a);s=s||l,!l&&!this.ambiguousCharacters.isAmbiguous(o)&&!Es.isInvisibleCharacter(o)&&(i=!0)}return!s&&i?0:this.options.invisibleCharacters&&!Uf(t)&&Es.isInvisibleCharacter(r)?2:this.options.ambiguousCharacters&&this.ambiguousCharacters.isAmbiguous(r)?3:0}}function Uf(e){return e===" "||e===`
|
|
8
|
+
`||e===" "}class Ai{constructor(t,n,r){this.changes=t,this.moves=n,this.hitTimeout=r}}class uy{constructor(t,n){this.lineRangeMapping=t,this.changes=n}}function cy(e,t,n=(r,s)=>r===s){if(e===t)return!0;if(!e||!t||e.length!==t.length)return!1;for(let r=0,s=e.length;r<s;r++)if(!n(e[r],t[r]))return!1;return!0}function*fy(e,t){let n,r;for(const s of e)r!==void 0&&t(r,s)?n.push(s):(n&&(yield n),n=[s]),r=s;n&&(yield n)}function hy(e,t){for(let n=0;n<=e.length;n++)t(n===0?void 0:e[n-1],n===e.length?void 0:e[n])}function dy(e,t){for(let n=0;n<e.length;n++)t(n===0?void 0:e[n-1],e[n],n+1===e.length?void 0:e[n+1])}function my(e,t){for(const n of t)e.push(n)}var Lo;(function(e){function t(i){return i<0}e.isLessThan=t;function n(i){return i<=0}e.isLessThanOrEqual=n;function r(i){return i>0}e.isGreaterThan=r;function s(i){return i===0}e.isNeitherLessOrGreaterThan=s,e.greaterThan=1,e.lessThan=-1,e.neitherLessOrGreaterThan=0})(Lo||(Lo={}));function xs(e,t){return(n,r)=>t(e(n),e(r))}const Ns=(e,t)=>e-t;function py(e){return(t,n)=>-e(t,n)}const ws=class ws{constructor(t){this.iterate=t}toArray(){const t=[];return this.iterate(n=>(t.push(n),!0)),t}filter(t){return new ws(n=>this.iterate(r=>t(r)?n(r):!0))}map(t){return new ws(n=>this.iterate(r=>n(t(r))))}findLast(t){let n;return this.iterate(r=>(t(r)&&(n=r),!0)),n}findLastMaxBy(t){let n,r=!0;return this.iterate(s=>((r||Lo.isGreaterThan(t(s,n)))&&(r=!1,n=s),!0)),n}};ws.empty=new ws(t=>{});let qf=ws;class he{static fromTo(t,n){return new he(t,n)}static addRange(t,n){let r=0;for(;r<n.length&&n[r].endExclusive<t.start;)r++;let s=r;for(;s<n.length&&n[s].start<=t.endExclusive;)s++;if(r===s)n.splice(r,0,t);else{const i=Math.min(t.start,n[r].start),a=Math.max(t.endExclusive,n[s-1].endExclusive);n.splice(r,s-r,new he(i,a))}}static tryCreate(t,n){if(!(t>n))return new he(t,n)}static ofLength(t){return new he(0,t)}static ofStartAndLength(t,n){return new he(t,t+n)}static emptyAt(t){return new he(t,t)}constructor(t,n){if(this.start=t,this.endExclusive=n,t>n)throw new Ge(`Invalid range: ${this.toString()}`)}get isEmpty(){return this.start===this.endExclusive}delta(t){return new he(this.start+t,this.endExclusive+t)}deltaStart(t){return new he(this.start+t,this.endExclusive)}deltaEnd(t){return new he(this.start,this.endExclusive+t)}get length(){return this.endExclusive-this.start}toString(){return`[${this.start}, ${this.endExclusive})`}equals(t){return this.start===t.start&&this.endExclusive===t.endExclusive}contains(t){return this.start<=t&&t<this.endExclusive}join(t){return new he(Math.min(this.start,t.start),Math.max(this.endExclusive,t.endExclusive))}intersect(t){const n=Math.max(this.start,t.start),r=Math.min(this.endExclusive,t.endExclusive);if(n<=r)return new he(n,r)}intersectionLength(t){const n=Math.max(this.start,t.start),r=Math.min(this.endExclusive,t.endExclusive);return Math.max(0,r-n)}intersects(t){const n=Math.max(this.start,t.start),r=Math.min(this.endExclusive,t.endExclusive);return n<r}intersectsOrTouches(t){const n=Math.max(this.start,t.start),r=Math.min(this.endExclusive,t.endExclusive);return n<=r}isBefore(t){return this.endExclusive<=t.start}isAfter(t){return this.start>=t.endExclusive}slice(t){return t.slice(this.start,this.endExclusive)}substring(t){return t.substring(this.start,this.endExclusive)}clip(t){if(this.isEmpty)throw new Ge(`Invalid clipping range: ${this.toString()}`);return Math.max(this.start,Math.min(this.endExclusive-1,t))}clipCyclic(t){if(this.isEmpty)throw new Ge(`Invalid clipping range: ${this.toString()}`);return t<this.start?this.endExclusive-(this.start-t)%this.length:t>=this.endExclusive?this.start+(t-this.start)%this.length:t}forEach(t){for(let n=this.start;n<this.endExclusive;n++)t(n)}joinRightTouching(t){if(this.endExclusive!==t.start)throw new Ge(`Invalid join: ${this.toString()} and ${t.toString()}`);return new he(this.start,t.endExclusive)}}function Fr(e,t){const n=_r(e,t);return n===-1?void 0:e[n]}function _r(e,t,n=0,r=e.length){let s=n,i=r;for(;s<i;){const a=Math.floor((s+i)/2);t(e[a])?s=a+1:i=a}return s-1}function gy(e,t){const n=ko(e,t);return n===e.length?void 0:e[n]}function ko(e,t,n=0,r=e.length){let s=n,i=r;for(;s<i;){const a=Math.floor((s+i)/2);t(e[a])?i=a:s=a+1}return s}const Wa=class Wa{constructor(t){this._array=t,this._findLastMonotonousLastIdx=0}findLastMonotonous(t){if(Wa.assertInvariants){if(this._prevFindLastPredicate){for(const r of this._array)if(this._prevFindLastPredicate(r)&&!t(r))throw new Error("MonotonousArray: current predicate must be weaker than (or equal to) the previous predicate.")}this._prevFindLastPredicate=t}const n=_r(this._array,t,this._findLastMonotonousLastIdx);return this._findLastMonotonousLastIdx=n+1,n===-1?void 0:this._array[n]}};Wa.assertInvariants=!1;let xi=Wa;const wt=class wt{static ofLength(t,n){return new wt(t,t+n)}static fromRange(t){return new wt(t.startLineNumber,t.endLineNumber)}static fromRangeInclusive(t){return new wt(t.startLineNumber,t.endLineNumber+1)}static joinMany(t){if(t.length===0)return[];let n=new Wt(t[0].slice());for(let r=1;r<t.length;r++)n=n.getUnion(new Wt(t[r].slice()));return n.ranges}static join(t){if(t.length===0)throw new Ge("lineRanges cannot be empty");let n=t[0].startLineNumber,r=t[0].endLineNumberExclusive;for(let s=1;s<t.length;s++)n=Math.min(n,t[s].startLineNumber),r=Math.max(r,t[s].endLineNumberExclusive);return new wt(n,r)}static deserialize(t){return new wt(t[0],t[1])}constructor(t,n){if(t>n)throw new Ge(`startLineNumber ${t} cannot be after endLineNumberExclusive ${n}`);this.startLineNumber=t,this.endLineNumberExclusive=n}contains(t){return this.startLineNumber<=t&&t<this.endLineNumberExclusive}get isEmpty(){return this.startLineNumber===this.endLineNumberExclusive}delta(t){return new wt(this.startLineNumber+t,this.endLineNumberExclusive+t)}deltaLength(t){return new wt(this.startLineNumber,this.endLineNumberExclusive+t)}get length(){return this.endLineNumberExclusive-this.startLineNumber}join(t){return new wt(Math.min(this.startLineNumber,t.startLineNumber),Math.max(this.endLineNumberExclusive,t.endLineNumberExclusive))}toString(){return`[${this.startLineNumber},${this.endLineNumberExclusive})`}intersect(t){const n=Math.max(this.startLineNumber,t.startLineNumber),r=Math.min(this.endLineNumberExclusive,t.endLineNumberExclusive);if(n<=r)return new wt(n,r)}intersectsStrict(t){return this.startLineNumber<t.endLineNumberExclusive&&t.startLineNumber<this.endLineNumberExclusive}intersectsOrTouches(t){return this.startLineNumber<=t.endLineNumberExclusive&&t.startLineNumber<=this.endLineNumberExclusive}equals(t){return this.startLineNumber===t.startLineNumber&&this.endLineNumberExclusive===t.endLineNumberExclusive}toInclusiveRange(){return this.isEmpty?null:new le(this.startLineNumber,1,this.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER)}toExclusiveRange(){return new le(this.startLineNumber,1,this.endLineNumberExclusive,1)}mapToLineArray(t){const n=[];for(let r=this.startLineNumber;r<this.endLineNumberExclusive;r++)n.push(t(r));return n}forEach(t){for(let n=this.startLineNumber;n<this.endLineNumberExclusive;n++)t(n)}serialize(){return[this.startLineNumber,this.endLineNumberExclusive]}toOffsetRange(){return new he(this.startLineNumber-1,this.endLineNumberExclusive-1)}addMargin(t,n){return new wt(this.startLineNumber-t,this.endLineNumberExclusive+n)}};wt.compareByStart=xs(t=>t.startLineNumber,Ns);let me=wt;class Wt{constructor(t=[]){this._normalizedRanges=t}get ranges(){return this._normalizedRanges}addRange(t){if(t.length===0)return;const n=ko(this._normalizedRanges,s=>s.endLineNumberExclusive>=t.startLineNumber),r=_r(this._normalizedRanges,s=>s.startLineNumber<=t.endLineNumberExclusive)+1;if(n===r)this._normalizedRanges.splice(n,0,t);else if(n===r-1){const s=this._normalizedRanges[n];this._normalizedRanges[n]=s.join(t)}else{const s=this._normalizedRanges[n].join(this._normalizedRanges[r-1]).join(t);this._normalizedRanges.splice(n,r-n,s)}}contains(t){const n=Fr(this._normalizedRanges,r=>r.startLineNumber<=t);return!!n&&n.endLineNumberExclusive>t}intersects(t){const n=Fr(this._normalizedRanges,r=>r.startLineNumber<t.endLineNumberExclusive);return!!n&&n.endLineNumberExclusive>t.startLineNumber}getUnion(t){if(this._normalizedRanges.length===0)return t;if(t._normalizedRanges.length===0)return this;const n=[];let r=0,s=0,i=null;for(;r<this._normalizedRanges.length||s<t._normalizedRanges.length;){let a=null;if(r<this._normalizedRanges.length&&s<t._normalizedRanges.length){const o=this._normalizedRanges[r],l=t._normalizedRanges[s];o.startLineNumber<l.startLineNumber?(a=o,r++):(a=l,s++)}else r<this._normalizedRanges.length?(a=this._normalizedRanges[r],r++):(a=t._normalizedRanges[s],s++);i===null?i=a:i.endLineNumberExclusive>=a.startLineNumber?i=new me(i.startLineNumber,Math.max(i.endLineNumberExclusive,a.endLineNumberExclusive)):(n.push(i),i=a)}return i!==null&&n.push(i),new Wt(n)}subtractFrom(t){const n=ko(this._normalizedRanges,a=>a.endLineNumberExclusive>=t.startLineNumber),r=_r(this._normalizedRanges,a=>a.startLineNumber<=t.endLineNumberExclusive)+1;if(n===r)return new Wt([t]);const s=[];let i=t.startLineNumber;for(let a=n;a<r;a++){const o=this._normalizedRanges[a];o.startLineNumber>i&&s.push(new me(i,o.startLineNumber)),i=o.endLineNumberExclusive}return i<t.endLineNumberExclusive&&s.push(new me(i,t.endLineNumberExclusive)),new Wt(s)}toString(){return this._normalizedRanges.map(t=>t.toString()).join(", ")}getIntersection(t){const n=[];let r=0,s=0;for(;r<this._normalizedRanges.length&&s<t._normalizedRanges.length;){const i=this._normalizedRanges[r],a=t._normalizedRanges[s],o=i.intersect(a);o&&!o.isEmpty&&n.push(o),i.endLineNumberExclusive<a.endLineNumberExclusive?r++:s++}return new Wt(n)}getWithDelta(t){return new Wt(this._normalizedRanges.map(n=>n.delta(t)))}}const jt=class jt{static betweenPositions(t,n){return t.lineNumber===n.lineNumber?new jt(0,n.column-t.column):new jt(n.lineNumber-t.lineNumber,n.column-1)}static fromPosition(t){return new jt(t.lineNumber-1,t.column-1)}static ofRange(t){return jt.betweenPositions(t.getStartPosition(),t.getEndPosition())}static ofText(t){let n=0,r=0;for(const s of t)s===`
|
|
9
|
+
`?(n++,r=0):r++;return new jt(n,r)}constructor(t,n){this.lineCount=t,this.columnCount=n}isGreaterThanOrEqualTo(t){return this.lineCount!==t.lineCount?this.lineCount>t.lineCount:this.columnCount>=t.columnCount}add(t){return t.lineCount===0?new jt(this.lineCount,this.columnCount+t.columnCount):new jt(this.lineCount+t.lineCount,t.columnCount)}createRange(t){return this.lineCount===0?new le(t.lineNumber,t.column,t.lineNumber,t.column+this.columnCount):new le(t.lineNumber,t.column,t.lineNumber+this.lineCount,this.columnCount+1)}toRange(){return new le(1,1,this.lineCount+1,this.columnCount+1)}toLineRange(){return me.ofLength(1,this.lineCount+1)}addToPosition(t){return this.lineCount===0?new Ne(t.lineNumber,t.column+this.columnCount):new Ne(t.lineNumber+this.lineCount,this.columnCount+1)}toString(){return`${this.lineCount},${this.columnCount}`}};jt.zero=new jt(0,0);let Ls=jt;class yy{getOffsetRange(t){return new he(this.getOffset(t.getStartPosition()),this.getOffset(t.getEndPosition()))}getRange(t){return le.fromPositions(this.getPosition(t.start),this.getPosition(t.endExclusive))}getStringReplacement(t){return new Tr.deps.StringReplacement(this.getOffsetRange(t.range),t.text)}getTextReplacement(t){return new Tr.deps.TextReplacement(this.getRange(t.replaceRange),t.newText)}getTextEdit(t){const n=t.replacements.map(r=>this.getTextReplacement(r));return new Tr.deps.TextEdit(n)}}const Ku=class Ku{static get deps(){if(!this._deps)throw new Error("Dependencies not set. Call _setDependencies first.");return this._deps}};Ku._deps=void 0;let Tr=Ku;class by extends yy{constructor(t){super(),this.text=t,this.lineStartOffsetByLineIdx=[],this.lineEndOffsetByLineIdx=[],this.lineStartOffsetByLineIdx.push(0);for(let n=0;n<t.length;n++)t.charAt(n)===`
|
|
10
|
+
`&&(this.lineStartOffsetByLineIdx.push(n+1),n>0&&t.charAt(n-1)==="\r"?this.lineEndOffsetByLineIdx.push(n-1):this.lineEndOffsetByLineIdx.push(n));this.lineEndOffsetByLineIdx.push(t.length)}getOffset(t){const n=this._validatePosition(t);return this.lineStartOffsetByLineIdx[n.lineNumber-1]+n.column-1}_validatePosition(t){if(t.lineNumber<1)return new Ne(1,1);const n=this.textLength.lineCount+1;if(t.lineNumber>n){const s=this.getLineLength(n);return new Ne(n,s+1)}if(t.column<1)return new Ne(t.lineNumber,1);const r=this.getLineLength(t.lineNumber);return t.column-1>r?new Ne(t.lineNumber,r+1):t}getPosition(t){const n=_r(this.lineStartOffsetByLineIdx,i=>i<=t),r=n+1,s=t-this.lineStartOffsetByLineIdx[n]+1;return new Ne(r,s)}get textLength(){const t=this.lineStartOffsetByLineIdx.length-1;return new Tr.deps.TextLength(t,this.text.length-this.lineStartOffsetByLineIdx[t])}getLineLength(t){return this.lineEndOffsetByLineIdx[t-1]-this.lineStartOffsetByLineIdx[t-1]}}class wy{constructor(){this._transformer=void 0}get endPositionExclusive(){return this.length.addToPosition(new Ne(1,1))}get lineRange(){return this.length.toLineRange()}getValue(){return this.getValueOfRange(this.length.toRange())}getValueOfOffsetRange(t){return this.getValueOfRange(this.getTransformer().getRange(t))}getLineLength(t){return this.getValueOfRange(new le(t,1,t,Number.MAX_SAFE_INTEGER)).length}getTransformer(){return this._transformer||(this._transformer=new by(this.getValue())),this._transformer}getLineAt(t){return this.getValueOfRange(new le(t,1,t,Number.MAX_SAFE_INTEGER))}}class vy extends wy{constructor(t,n){xg(n>=1),super(),this._getLineContent=t,this._lineCount=n}getValueOfRange(t){if(t.startLineNumber===t.endLineNumber)return this._getLineContent(t.startLineNumber).substring(t.startColumn-1,t.endColumn-1);let n=this._getLineContent(t.startLineNumber).substring(t.startColumn-1);for(let r=t.startLineNumber+1;r<t.endLineNumber;r++)n+=`
|
|
11
|
+
`+this._getLineContent(r);return n+=`
|
|
12
|
+
`+this._getLineContent(t.endLineNumber).substring(0,t.endColumn-1),n}getLineLength(t){return this._getLineContent(t).length}get length(){const t=this._getLineContent(this._lineCount);return new Ls(this._lineCount-1,t.length)}}class Ni extends vy{constructor(t){super(n=>t[n-1],t.length)}}class kn{static joinReplacements(t,n){if(t.length===0)throw new Ge;if(t.length===1)return t[0];const r=t[0].range.getStartPosition(),s=t[t.length-1].range.getEndPosition();let i="";for(let a=0;a<t.length;a++){const o=t[a];if(i+=o.text,a<t.length-1){const l=t[a+1],u=le.fromPositions(o.range.getEndPosition(),l.range.getStartPosition()),c=n.getValueOfRange(u);i+=c}}return new kn(le.fromPositions(r,s),i)}static fromStringReplacement(t,n){return new kn(n.getTransformer().getRange(t.replaceRange),t.newText)}static delete(t){return new kn(t,"")}constructor(t,n){this.range=t,this.text=n}get isEmpty(){return this.range.isEmpty()&&this.text.length===0}static equals(t,n){return t.range.equalsRange(n.range)&&t.text===n.text}equals(t){return kn.equals(this,t)}removeCommonPrefixAndSuffix(t){return this.removeCommonPrefix(t).removeCommonSuffix(t)}removeCommonPrefix(t){const n=t.getValueOfRange(this.range).replaceAll(`\r
|
|
13
|
+
`,`
|
|
14
|
+
`),r=this.text.replaceAll(`\r
|
|
15
|
+
`,`
|
|
16
|
+
`),s=Xg(n,r),i=Ls.ofText(n.substring(0,s)).addToPosition(this.range.getStartPosition()),a=r.substring(s),o=le.fromPositions(i,this.range.getEndPosition());return new kn(o,a)}removeCommonSuffix(t){const n=t.getValueOfRange(this.range).replaceAll(`\r
|
|
17
|
+
`,`
|
|
18
|
+
`),r=this.text.replaceAll(`\r
|
|
19
|
+
`,`
|
|
20
|
+
`),s=Zg(n,r),i=Ls.ofText(n.substring(0,n.length-s)).addToPosition(this.range.getStartPosition()),a=r.substring(0,r.length-s),o=le.fromPositions(this.range.getStartPosition(),i);return new kn(o,a)}toString(){const t=this.range.getStartPosition(),n=this.range.getEndPosition();return`(${t.lineNumber},${t.column} -> ${n.lineNumber},${n.column}): "${this.text}"`}}class Dt{static inverse(t,n,r){const s=[];let i=1,a=1;for(const l of t){const u=new Dt(new me(i,l.original.startLineNumber),new me(a,l.modified.startLineNumber));u.modified.isEmpty||s.push(u),i=l.original.endLineNumberExclusive,a=l.modified.endLineNumberExclusive}const o=new Dt(new me(i,n+1),new me(a,r+1));return o.modified.isEmpty||s.push(o),s}static clip(t,n,r){const s=[];for(const i of t){const a=i.original.intersect(n),o=i.modified.intersect(r);a&&!a.isEmpty&&o&&!o.isEmpty&&s.push(new Dt(a,o))}return s}constructor(t,n){this.original=t,this.modified=n}toString(){return`{${this.original.toString()}->${this.modified.toString()}}`}flip(){return new Dt(this.modified,this.original)}join(t){return new Dt(this.original.join(t.original),this.modified.join(t.modified))}toRangeMapping(){const t=this.original.toInclusiveRange(),n=this.modified.toInclusiveRange();if(t&&n)return new St(t,n);if(this.original.startLineNumber===1||this.modified.startLineNumber===1){if(!(this.modified.startLineNumber===1&&this.original.startLineNumber===1))throw new Ge("not a valid diff");return new St(new le(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new le(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1))}else return new St(new le(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),new le(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER))}toRangeMapping2(t,n){if(Wf(this.original.endLineNumberExclusive,t)&&Wf(this.modified.endLineNumberExclusive,n))return new St(new le(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new le(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1));if(!this.original.isEmpty&&!this.modified.isEmpty)return new St(le.fromPositions(new Ne(this.original.startLineNumber,1),Mr(new Ne(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),t)),le.fromPositions(new Ne(this.modified.startLineNumber,1),Mr(new Ne(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),n)));if(this.original.startLineNumber>1&&this.modified.startLineNumber>1)return new St(le.fromPositions(Mr(new Ne(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER),t),Mr(new Ne(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),t)),le.fromPositions(Mr(new Ne(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER),n),Mr(new Ne(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),n)));throw new Ge}}function Mr(e,t){if(e.lineNumber<1)return new Ne(1,1);if(e.lineNumber>t.length)return new Ne(t.length,t[t.length-1].length+1);const n=t[e.lineNumber-1];return e.column>n.length+1?new Ne(e.lineNumber,n.length+1):e}function Wf(e,t){return e>=1&&e<=t.length}class an extends Dt{static fromRangeMappings(t){const n=me.join(t.map(s=>me.fromRangeInclusive(s.originalRange))),r=me.join(t.map(s=>me.fromRangeInclusive(s.modifiedRange)));return new an(n,r,t)}constructor(t,n,r){super(t,n),this.innerChanges=r}flip(){var t;return new an(this.modified,this.original,(t=this.innerChanges)==null?void 0:t.map(n=>n.flip()))}withInnerChangesFromLineRanges(){return new an(this.original,this.modified,[this.toRangeMapping()])}}class St{static fromEdit(t){const n=t.getNewRanges();return t.replacements.map((s,i)=>new St(s.range,n[i]))}static assertSorted(t){for(let n=1;n<t.length;n++){const r=t[n-1],s=t[n];if(!(r.originalRange.getEndPosition().isBeforeOrEqual(s.originalRange.getStartPosition())&&r.modifiedRange.getEndPosition().isBeforeOrEqual(s.modifiedRange.getStartPosition())))throw new Ge("Range mappings must be sorted")}}constructor(t,n){this.originalRange=t,this.modifiedRange=n}toString(){return`{${this.originalRange.toString()}->${this.modifiedRange.toString()}}`}flip(){return new St(this.modifiedRange,this.originalRange)}toTextEdit(t){const n=t.getValueOfRange(this.modifiedRange);return new kn(this.originalRange,n)}}function Hf(e,t,n,r=!1){const s=[];for(const i of fy(e.map(a=>Dy(a,t,n)),(a,o)=>a.original.intersectsOrTouches(o.original)||a.modified.intersectsOrTouches(o.modified))){const a=i[0],o=i[i.length-1];s.push(new an(a.original.join(o.original),a.modified.join(o.modified),i.map(l=>l.innerChanges[0])))}return hi(()=>!r&&s.length>0&&(s[0].modified.startLineNumber!==s[0].original.startLineNumber||n.length.lineCount-s[s.length-1].modified.endLineNumberExclusive!==t.length.lineCount-s[s.length-1].original.endLineNumberExclusive)?!1:sc(s,(i,a)=>a.original.startLineNumber-i.original.endLineNumberExclusive===a.modified.startLineNumber-i.modified.endLineNumberExclusive&&i.original.endLineNumberExclusive<a.original.startLineNumber&&i.modified.endLineNumberExclusive<a.modified.startLineNumber)),s}function Dy(e,t,n){let r=0,s=0;e.modifiedRange.endColumn===1&&e.originalRange.endColumn===1&&e.originalRange.startLineNumber+r<=e.originalRange.endLineNumber&&e.modifiedRange.startLineNumber+r<=e.modifiedRange.endLineNumber&&(s=-1),e.modifiedRange.startColumn-1>=n.getLineLength(e.modifiedRange.startLineNumber)&&e.originalRange.startColumn-1>=t.getLineLength(e.originalRange.startLineNumber)&&e.originalRange.startLineNumber<=e.originalRange.endLineNumber+s&&e.modifiedRange.startLineNumber<=e.modifiedRange.endLineNumber+s&&(r=1);const i=new me(e.originalRange.startLineNumber+r,e.originalRange.endLineNumber+1+s),a=new me(e.modifiedRange.startLineNumber+r,e.modifiedRange.endLineNumber+1+s);return new an(i,a,[e])}const Sy=3;class Ey{computeDiff(t,n,r){var l;const i=new Ny(t,n,{maxComputationTime:r.maxComputationTimeMs,shouldIgnoreTrimWhitespace:r.ignoreTrimWhitespace,shouldComputeCharChanges:!0,shouldMakePrettyDiff:!0,shouldPostProcessCharChanges:!0}).computeDiff(),a=[];let o=null;for(const u of i.changes){let c;u.originalEndLineNumber===0?c=new me(u.originalStartLineNumber+1,u.originalStartLineNumber+1):c=new me(u.originalStartLineNumber,u.originalEndLineNumber+1);let f;u.modifiedEndLineNumber===0?f=new me(u.modifiedStartLineNumber+1,u.modifiedStartLineNumber+1):f=new me(u.modifiedStartLineNumber,u.modifiedEndLineNumber+1);let d=new an(c,f,(l=u.charChanges)==null?void 0:l.map(y=>new St(new le(y.originalStartLineNumber,y.originalStartColumn,y.originalEndLineNumber,y.originalEndColumn),new le(y.modifiedStartLineNumber,y.modifiedStartColumn,y.modifiedEndLineNumber,y.modifiedEndColumn))));o&&(o.modified.endLineNumberExclusive===d.modified.startLineNumber||o.original.endLineNumberExclusive===d.original.startLineNumber)&&(d=new an(o.original.join(d.original),o.modified.join(d.modified),o.innerChanges&&d.innerChanges?o.innerChanges.concat(d.innerChanges):void 0),a.pop()),a.push(d),o=d}return hi(()=>sc(a,(u,c)=>c.original.startLineNumber-u.original.endLineNumberExclusive===c.modified.startLineNumber-u.modified.endLineNumberExclusive&&u.original.endLineNumberExclusive<c.original.startLineNumber&&u.modified.endLineNumberExclusive<c.modified.startLineNumber)),new Ai(a,[],i.quitEarly)}}function Yf(e,t,n,r){return new Nn(e,t,n).ComputeDiff(r)}let zf=class{constructor(t){const n=[],r=[];for(let s=0,i=t.length;s<i;s++)n[s]=Co(t[s],1),r[s]=Fo(t[s],1);this.lines=t,this._startColumns=n,this._endColumns=r}getElements(){const t=[];for(let n=0,r=this.lines.length;n<r;n++)t[n]=this.lines[n].substring(this._startColumns[n]-1,this._endColumns[n]-1);return t}getStrictElement(t){return this.lines[t]}getStartLineNumber(t){return t+1}getEndLineNumber(t){return t+1}createCharSequence(t,n,r){const s=[],i=[],a=[];let o=0;for(let l=n;l<=r;l++){const u=this.lines[l],c=t?this._startColumns[l]:1,f=t?this._endColumns[l]:u.length+1;for(let d=c;d<f;d++)s[o]=u.charCodeAt(d-1),i[o]=l+1,a[o]=d,o++;!t&&l<r&&(s[o]=10,i[o]=l+1,a[o]=u.length+1,o++)}return new Ay(s,i,a)}};class Ay{constructor(t,n,r){this._charCodes=t,this._lineNumbers=n,this._columns=r}toString(){return"["+this._charCodes.map((t,n)=>(t===10?"\\n":String.fromCharCode(t))+`-(${this._lineNumbers[n]},${this._columns[n]})`).join(", ")+"]"}_assertIndex(t,n){if(t<0||t>=n.length)throw new Error("Illegal index")}getElements(){return this._charCodes}getStartLineNumber(t){return t>0&&t===this._lineNumbers.length?this.getEndLineNumber(t-1):(this._assertIndex(t,this._lineNumbers),this._lineNumbers[t])}getEndLineNumber(t){return t===-1?this.getStartLineNumber(t+1):(this._assertIndex(t,this._lineNumbers),this._charCodes[t]===10?this._lineNumbers[t]+1:this._lineNumbers[t])}getStartColumn(t){return t>0&&t===this._columns.length?this.getEndColumn(t-1):(this._assertIndex(t,this._columns),this._columns[t])}getEndColumn(t){return t===-1?this.getStartColumn(t+1):(this._assertIndex(t,this._columns),this._charCodes[t]===10?1:this._columns[t]+1)}}class Or{constructor(t,n,r,s,i,a,o,l){this.originalStartLineNumber=t,this.originalStartColumn=n,this.originalEndLineNumber=r,this.originalEndColumn=s,this.modifiedStartLineNumber=i,this.modifiedStartColumn=a,this.modifiedEndLineNumber=o,this.modifiedEndColumn=l}static createFromDiffChange(t,n,r){const s=n.getStartLineNumber(t.originalStart),i=n.getStartColumn(t.originalStart),a=n.getEndLineNumber(t.originalStart+t.originalLength-1),o=n.getEndColumn(t.originalStart+t.originalLength-1),l=r.getStartLineNumber(t.modifiedStart),u=r.getStartColumn(t.modifiedStart),c=r.getEndLineNumber(t.modifiedStart+t.modifiedLength-1),f=r.getEndColumn(t.modifiedStart+t.modifiedLength-1);return new Or(s,i,a,o,l,u,c,f)}}function xy(e){if(e.length<=1)return e;const t=[e[0]];let n=t[0];for(let r=1,s=e.length;r<s;r++){const i=e[r],a=i.originalStart-(n.originalStart+n.originalLength),o=i.modifiedStart-(n.modifiedStart+n.modifiedLength);Math.min(a,o)<Sy?(n.originalLength=i.originalStart+i.originalLength-n.originalStart,n.modifiedLength=i.modifiedStart+i.modifiedLength-n.modifiedStart):(t.push(i),n=i)}return t}class ks{constructor(t,n,r,s,i){this.originalStartLineNumber=t,this.originalEndLineNumber=n,this.modifiedStartLineNumber=r,this.modifiedEndLineNumber=s,this.charChanges=i}static createFromDiffResult(t,n,r,s,i,a,o){let l,u,c,f,d;if(n.originalLength===0?(l=r.getStartLineNumber(n.originalStart)-1,u=0):(l=r.getStartLineNumber(n.originalStart),u=r.getEndLineNumber(n.originalStart+n.originalLength-1)),n.modifiedLength===0?(c=s.getStartLineNumber(n.modifiedStart)-1,f=0):(c=s.getStartLineNumber(n.modifiedStart),f=s.getEndLineNumber(n.modifiedStart+n.modifiedLength-1)),a&&n.originalLength>0&&n.originalLength<20&&n.modifiedLength>0&&n.modifiedLength<20&&i()){const y=r.createCharSequence(t,n.originalStart,n.originalStart+n.originalLength-1),D=s.createCharSequence(t,n.modifiedStart,n.modifiedStart+n.modifiedLength-1);if(y.getElements().length>0&&D.getElements().length>0){let S=Yf(y,D,i,!0).changes;o&&(S=xy(S)),d=[];for(let N=0,x=S.length;N<x;N++)d.push(Or.createFromDiffChange(S[N],y,D))}}return new ks(l,u,c,f,d)}}class Ny{constructor(t,n,r){this.shouldComputeCharChanges=r.shouldComputeCharChanges,this.shouldPostProcessCharChanges=r.shouldPostProcessCharChanges,this.shouldIgnoreTrimWhitespace=r.shouldIgnoreTrimWhitespace,this.shouldMakePrettyDiff=r.shouldMakePrettyDiff,this.originalLines=t,this.modifiedLines=n,this.original=new zf(t),this.modified=new zf(n),this.continueLineDiff=Gf(r.maxComputationTime),this.continueCharDiff=Gf(r.maxComputationTime===0?0:Math.min(r.maxComputationTime,5e3))}computeDiff(){if(this.original.lines.length===1&&this.original.lines[0].length===0)return this.modified.lines.length===1&&this.modified.lines[0].length===0?{quitEarly:!1,changes:[]}:{quitEarly:!1,changes:[{originalStartLineNumber:1,originalEndLineNumber:1,modifiedStartLineNumber:1,modifiedEndLineNumber:this.modified.lines.length,charChanges:void 0}]};if(this.modified.lines.length===1&&this.modified.lines[0].length===0)return{quitEarly:!1,changes:[{originalStartLineNumber:1,originalEndLineNumber:this.original.lines.length,modifiedStartLineNumber:1,modifiedEndLineNumber:1,charChanges:void 0}]};const t=Yf(this.original,this.modified,this.continueLineDiff,this.shouldMakePrettyDiff),n=t.changes,r=t.quitEarly;if(this.shouldIgnoreTrimWhitespace){const o=[];for(let l=0,u=n.length;l<u;l++)o.push(ks.createFromDiffResult(this.shouldIgnoreTrimWhitespace,n[l],this.original,this.modified,this.continueCharDiff,this.shouldComputeCharChanges,this.shouldPostProcessCharChanges));return{quitEarly:r,changes:o}}const s=[];let i=0,a=0;for(let o=-1,l=n.length;o<l;o++){const u=o+1<l?n[o+1]:null,c=u?u.originalStart:this.originalLines.length,f=u?u.modifiedStart:this.modifiedLines.length;for(;i<c&&a<f;){const d=this.originalLines[i],y=this.modifiedLines[a];if(d!==y){{let D=Co(d,1),S=Co(y,1);for(;D>1&&S>1;){const N=d.charCodeAt(D-2),x=y.charCodeAt(S-2);if(N!==x)break;D--,S--}(D>1||S>1)&&this._pushTrimWhitespaceCharChange(s,i+1,1,D,a+1,1,S)}{let D=Fo(d,1),S=Fo(y,1);const N=d.length+1,x=y.length+1;for(;D<N&&S<x;){const k=d.charCodeAt(D-1),b=d.charCodeAt(S-1);if(k!==b)break;D++,S++}(D<N||S<x)&&this._pushTrimWhitespaceCharChange(s,i+1,D,N,a+1,S,x)}}i++,a++}u&&(s.push(ks.createFromDiffResult(this.shouldIgnoreTrimWhitespace,u,this.original,this.modified,this.continueCharDiff,this.shouldComputeCharChanges,this.shouldPostProcessCharChanges)),i+=u.originalLength,a+=u.modifiedLength)}return{quitEarly:r,changes:s}}_pushTrimWhitespaceCharChange(t,n,r,s,i,a,o){if(this._mergeTrimWhitespaceCharChange(t,n,r,s,i,a,o))return;let l;this.shouldComputeCharChanges&&(l=[new Or(n,r,n,s,i,a,i,o)]),t.push(new ks(n,n,i,i,l))}_mergeTrimWhitespaceCharChange(t,n,r,s,i,a,o){const l=t.length;if(l===0)return!1;const u=t[l-1];return u.originalEndLineNumber===0||u.modifiedEndLineNumber===0?!1:u.originalEndLineNumber===n&&u.modifiedEndLineNumber===i?(this.shouldComputeCharChanges&&u.charChanges&&u.charChanges.push(new Or(n,r,n,s,i,a,i,o)),!0):u.originalEndLineNumber+1===n&&u.modifiedEndLineNumber+1===i?(u.originalEndLineNumber=n,u.modifiedEndLineNumber=i,this.shouldComputeCharChanges&&u.charChanges&&u.charChanges.push(new Or(n,r,n,s,i,a,i,o)),!0):!1}}function Co(e,t){const n=Qg(e);return n===-1?t:n+1}function Fo(e,t){const n=Kg(e);return n===-1?t:n+2}function Gf(e){if(e===0)return()=>!0;const t=Date.now();return()=>Date.now()-t<e}class on{static trivial(t,n){return new on([new Oe(he.ofLength(t.length),he.ofLength(n.length))],!1)}static trivialTimedOut(t,n){return new on([new Oe(he.ofLength(t.length),he.ofLength(n.length))],!0)}constructor(t,n){this.diffs=t,this.hitTimeout=n}}class Oe{static invert(t,n){const r=[];return hy(t,(s,i)=>{r.push(Oe.fromOffsetPairs(s?s.getEndExclusives():ln.zero,i?i.getStarts():new ln(n,(s?s.seq2Range.endExclusive-s.seq1Range.endExclusive:0)+n)))}),r}static fromOffsetPairs(t,n){return new Oe(new he(t.offset1,n.offset1),new he(t.offset2,n.offset2))}static assertSorted(t){let n;for(const r of t){if(n&&!(n.seq1Range.endExclusive<=r.seq1Range.start&&n.seq2Range.endExclusive<=r.seq2Range.start))throw new Ge("Sequence diffs must be sorted");n=r}}constructor(t,n){this.seq1Range=t,this.seq2Range=n}swap(){return new Oe(this.seq2Range,this.seq1Range)}toString(){return`${this.seq1Range} <-> ${this.seq2Range}`}join(t){return new Oe(this.seq1Range.join(t.seq1Range),this.seq2Range.join(t.seq2Range))}delta(t){return t===0?this:new Oe(this.seq1Range.delta(t),this.seq2Range.delta(t))}deltaStart(t){return t===0?this:new Oe(this.seq1Range.deltaStart(t),this.seq2Range.deltaStart(t))}deltaEnd(t){return t===0?this:new Oe(this.seq1Range.deltaEnd(t),this.seq2Range.deltaEnd(t))}intersect(t){const n=this.seq1Range.intersect(t.seq1Range),r=this.seq2Range.intersect(t.seq2Range);if(!(!n||!r))return new Oe(n,r)}getStarts(){return new ln(this.seq1Range.start,this.seq2Range.start)}getEndExclusives(){return new ln(this.seq1Range.endExclusive,this.seq2Range.endExclusive)}}const wr=class wr{constructor(t,n){this.offset1=t,this.offset2=n}toString(){return`${this.offset1} <-> ${this.offset2}`}delta(t){return t===0?this:new wr(this.offset1+t,this.offset2+t)}equals(t){return this.offset1===t.offset1&&this.offset2===t.offset2}};wr.zero=new wr(0,0),wr.max=new wr(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER);let ln=wr;const Ha=class Ha{isValid(){return!0}};Ha.instance=new Ha;let Cs=Ha;class Ly{constructor(t){if(this.timeout=t,this.startTime=Date.now(),this.valid=!0,t<=0)throw new Ge("timeout must be positive")}isValid(){return!(Date.now()-this.startTime<this.timeout)&&this.valid&&(this.valid=!1),this.valid}}class _o{constructor(t,n){this.width=t,this.height=n,this.array=[],this.array=new Array(t*n)}get(t,n){return this.array[t+n*this.width]}set(t,n,r){this.array[t+n*this.width]=r}}function To(e){return e===32||e===9}const ui=class ui{static getKey(t){let n=this.chrKeys.get(t);return n===void 0&&(n=this.chrKeys.size,this.chrKeys.set(t,n)),n}constructor(t,n,r){this.range=t,this.lines=n,this.source=r,this.histogram=[];let s=0;for(let i=t.startLineNumber-1;i<t.endLineNumberExclusive-1;i++){const a=n[i];for(let l=0;l<a.length;l++){s++;const u=a[l],c=ui.getKey(u);this.histogram[c]=(this.histogram[c]||0)+1}s++;const o=ui.getKey(`
|
|
21
|
+
`);this.histogram[o]=(this.histogram[o]||0)+1}this.totalCount=s}computeSimilarity(t){let n=0;const r=Math.max(this.histogram.length,t.histogram.length);for(let s=0;s<r;s++)n+=Math.abs((this.histogram[s]??0)-(t.histogram[s]??0));return 1-n/(this.totalCount+t.totalCount)}};ui.chrKeys=new Map;let Li=ui;class ky{compute(t,n,r=Cs.instance,s){if(t.length===0||n.length===0)return on.trivial(t,n);const i=new _o(t.length,n.length),a=new _o(t.length,n.length),o=new _o(t.length,n.length);for(let D=0;D<t.length;D++)for(let S=0;S<n.length;S++){if(!r.isValid())return on.trivialTimedOut(t,n);const N=D===0?0:i.get(D-1,S),x=S===0?0:i.get(D,S-1);let k;t.getElement(D)===n.getElement(S)?(D===0||S===0?k=0:k=i.get(D-1,S-1),D>0&&S>0&&a.get(D-1,S-1)===3&&(k+=o.get(D-1,S-1)),k+=s?s(D,S):1):k=-1;const b=Math.max(N,x,k);if(b===k){const w=D>0&&S>0?o.get(D-1,S-1):0;o.set(D,S,w+1),a.set(D,S,3)}else b===N?(o.set(D,S,0),a.set(D,S,1)):b===x&&(o.set(D,S,0),a.set(D,S,2));i.set(D,S,b)}const l=[];let u=t.length,c=n.length;function f(D,S){(D+1!==u||S+1!==c)&&l.push(new Oe(new he(D+1,u),new he(S+1,c))),u=D,c=S}let d=t.length-1,y=n.length-1;for(;d>=0&&y>=0;)a.get(d,y)===3?(f(d,y),d--,y--):a.get(d,y)===1?d--:y--;return f(-1,-1),l.reverse(),new on(l,!1)}}class Jf{compute(t,n,r=Cs.instance){if(t.length===0||n.length===0)return on.trivial(t,n);const s=t,i=n;function a(S,N){for(;S<s.length&&N<i.length&&s.getElement(S)===i.getElement(N);)S++,N++;return S}let o=0;const l=new Cy;l.set(0,a(0,0));const u=new Fy;u.set(0,l.get(0)===0?null:new Qf(null,0,0,l.get(0)));let c=0;e:for(;;){if(o++,!r.isValid())return on.trivialTimedOut(s,i);const S=-Math.min(o,i.length+o%2),N=Math.min(o,s.length+o%2);for(c=S;c<=N;c+=2){const x=c===N?-1:l.get(c+1),k=c===S?-1:l.get(c-1)+1,b=Math.min(Math.max(x,k),s.length),w=b-c;if(b>s.length||w>i.length)continue;const h=a(b,w);l.set(c,h);const g=b===x?u.get(c+1):u.get(c-1);if(u.set(c,h!==b?new Qf(g,b,w,h-b):g),l.get(c)===s.length&&l.get(c)-c===i.length)break e}}let f=u.get(c);const d=[];let y=s.length,D=i.length;for(;;){const S=f?f.x+f.length:0,N=f?f.y+f.length:0;if((S!==y||N!==D)&&d.push(new Oe(new he(S,y),new he(N,D))),!f)break;y=f.x,D=f.y,f=f.prev}return d.reverse(),new on(d,!1)}}class Qf{constructor(t,n,r,s){this.prev=t,this.x=n,this.y=r,this.length=s}}class Cy{constructor(){this.positiveArr=new Int32Array(10),this.negativeArr=new Int32Array(10)}get(t){return t<0?(t=-t-1,this.negativeArr[t]):this.positiveArr[t]}set(t,n){if(t<0){if(t=-t-1,t>=this.negativeArr.length){const r=this.negativeArr;this.negativeArr=new Int32Array(r.length*2),this.negativeArr.set(r)}this.negativeArr[t]=n}else{if(t>=this.positiveArr.length){const r=this.positiveArr;this.positiveArr=new Int32Array(r.length*2),this.positiveArr.set(r)}this.positiveArr[t]=n}}}class Fy{constructor(){this.positiveArr=[],this.negativeArr=[]}get(t){return t<0?(t=-t-1,this.negativeArr[t]):this.positiveArr[t]}set(t,n){t<0?(t=-t-1,this.negativeArr[t]=n):this.positiveArr[t]=n}}class ki{constructor(t,n,r){this.lines=t,this.range=n,this.considerWhitespaceChanges=r,this.elements=[],this.firstElementOffsetByLineIdx=[],this.lineStartOffsets=[],this.trimmedWsLengthsByLineIdx=[],this.firstElementOffsetByLineIdx.push(0);for(let s=this.range.startLineNumber;s<=this.range.endLineNumber;s++){let i=t[s-1],a=0;s===this.range.startLineNumber&&this.range.startColumn>1&&(a=this.range.startColumn-1,i=i.substring(a)),this.lineStartOffsets.push(a);let o=0;if(!r){const u=i.trimStart();o=i.length-u.length,i=u.trimEnd()}this.trimmedWsLengthsByLineIdx.push(o);const l=s===this.range.endLineNumber?Math.min(this.range.endColumn-1-a-o,i.length):i.length;for(let u=0;u<l;u++)this.elements.push(i.charCodeAt(u));s<this.range.endLineNumber&&(this.elements.push(10),this.firstElementOffsetByLineIdx.push(this.elements.length))}}toString(){return`Slice: "${this.text}"`}get text(){return this.getText(new he(0,this.length))}getText(t){return this.elements.slice(t.start,t.endExclusive).map(n=>String.fromCharCode(n)).join("")}getElement(t){return this.elements[t]}get length(){return this.elements.length}getBoundaryScore(t){const n=Zf(t>0?this.elements[t-1]:-1),r=Zf(t<this.elements.length?this.elements[t]:-1);if(n===7&&r===8)return 0;if(n===8)return 150;let s=0;return n!==r&&(s+=10,n===0&&r===1&&(s+=1)),s+=Xf(n),s+=Xf(r),s}translateOffset(t,n="right"){const r=_r(this.firstElementOffsetByLineIdx,i=>i<=t),s=t-this.firstElementOffsetByLineIdx[r];return new Ne(this.range.startLineNumber+r,1+this.lineStartOffsets[r]+s+(s===0&&n==="left"?0:this.trimmedWsLengthsByLineIdx[r]))}translateRange(t){const n=this.translateOffset(t.start,"right"),r=this.translateOffset(t.endExclusive,"left");return r.isBefore(n)?le.fromPositions(r,r):le.fromPositions(n,r)}findWordContaining(t){if(t<0||t>=this.elements.length||!Rr(this.elements[t]))return;let n=t;for(;n>0&&Rr(this.elements[n-1]);)n--;let r=t;for(;r<this.elements.length&&Rr(this.elements[r]);)r++;return new he(n,r)}findSubWordContaining(t){if(t<0||t>=this.elements.length||!Rr(this.elements[t]))return;let n=t;for(;n>0&&Rr(this.elements[n-1])&&!Kf(this.elements[n]);)n--;let r=t;for(;r<this.elements.length&&Rr(this.elements[r])&&!Kf(this.elements[r]);)r++;return new he(n,r)}countLinesIn(t){return this.translateOffset(t.endExclusive).lineNumber-this.translateOffset(t.start).lineNumber}isStronglyEqual(t,n){return this.elements[t]===this.elements[n]}extendToFullLines(t){const n=Fr(this.firstElementOffsetByLineIdx,s=>s<=t.start)??0,r=gy(this.firstElementOffsetByLineIdx,s=>t.endExclusive<=s)??this.elements.length;return new he(n,r)}}function Rr(e){return e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57}function Kf(e){return e>=65&&e<=90}const _y={0:0,1:0,2:0,3:10,4:2,5:30,6:3,7:10,8:10};function Xf(e){return _y[e]}function Zf(e){return e===10?8:e===13?7:To(e)?6:e>=97&&e<=122?0:e>=65&&e<=90?1:e>=48&&e<=57?2:e===-1?3:e===44||e===59?5:4}function Ty(e,t,n,r,s,i){let{moves:a,excludedChanges:o}=Oy(e,t,n,i);if(!i.isValid())return[];const l=e.filter(c=>!o.has(c)),u=Ry(l,r,s,t,n,i);return my(a,u),a=Py(a),a=a.filter(c=>{const f=c.original.toOffsetRange().slice(t).map(y=>y.trim());return f.join(`
|
|
22
|
+
`).length>=15&&My(f,y=>y.length>=2)>=2}),a=Iy(e,a),a}function My(e,t){let n=0;for(const r of e)t(r)&&n++;return n}function Oy(e,t,n,r){const s=[],i=e.filter(l=>l.modified.isEmpty&&l.original.length>=3).map(l=>new Li(l.original,t,l)),a=new Set(e.filter(l=>l.original.isEmpty&&l.modified.length>=3).map(l=>new Li(l.modified,n,l))),o=new Set;for(const l of i){let u=-1,c;for(const f of a){const d=l.computeSimilarity(f);d>u&&(u=d,c=f)}if(u>.9&&c&&(a.delete(c),s.push(new Dt(l.range,c.range)),o.add(l.source),o.add(c.source)),!r.isValid())return{moves:s,excludedChanges:o}}return{moves:s,excludedChanges:o}}function Ry(e,t,n,r,s,i){const a=[],o=new X0;for(const d of e)for(let y=d.original.startLineNumber;y<d.original.endLineNumberExclusive-2;y++){const D=`${t[y-1]}:${t[y+1-1]}:${t[y+2-1]}`;o.add(D,{range:new me(y,y+3)})}const l=[];e.sort(xs(d=>d.modified.startLineNumber,Ns));for(const d of e){let y=[];for(let D=d.modified.startLineNumber;D<d.modified.endLineNumberExclusive-2;D++){const S=`${n[D-1]}:${n[D+1-1]}:${n[D+2-1]}`,N=new me(D,D+3),x=[];o.forEach(S,({range:k})=>{for(const w of y)if(w.originalLineRange.endLineNumberExclusive+1===k.endLineNumberExclusive&&w.modifiedLineRange.endLineNumberExclusive+1===N.endLineNumberExclusive){w.originalLineRange=new me(w.originalLineRange.startLineNumber,k.endLineNumberExclusive),w.modifiedLineRange=new me(w.modifiedLineRange.startLineNumber,N.endLineNumberExclusive),x.push(w);return}const b={modifiedLineRange:N,originalLineRange:k};l.push(b),x.push(b)}),y=x}if(!i.isValid())return[]}l.sort(py(xs(d=>d.modifiedLineRange.length,Ns)));const u=new Wt,c=new Wt;for(const d of l){const y=d.modifiedLineRange.startLineNumber-d.originalLineRange.startLineNumber,D=u.subtractFrom(d.modifiedLineRange),S=c.subtractFrom(d.originalLineRange).getWithDelta(y),N=D.getIntersection(S);for(const x of N.ranges){if(x.length<3)continue;const k=x,b=x.delta(-y);a.push(new Dt(b,k)),u.addRange(k),c.addRange(b)}}a.sort(xs(d=>d.original.startLineNumber,Ns));const f=new xi(e);for(let d=0;d<a.length;d++){const y=a[d],D=f.findLastMonotonous(g=>g.original.startLineNumber<=y.original.startLineNumber),S=Fr(e,g=>g.modified.startLineNumber<=y.modified.startLineNumber),N=Math.max(y.original.startLineNumber-D.original.startLineNumber,y.modified.startLineNumber-S.modified.startLineNumber),x=f.findLastMonotonous(g=>g.original.startLineNumber<y.original.endLineNumberExclusive),k=Fr(e,g=>g.modified.startLineNumber<y.modified.endLineNumberExclusive),b=Math.max(x.original.endLineNumberExclusive-y.original.endLineNumberExclusive,k.modified.endLineNumberExclusive-y.modified.endLineNumberExclusive);let w;for(w=0;w<N;w++){const g=y.original.startLineNumber-w-1,m=y.modified.startLineNumber-w-1;if(g>r.length||m>s.length||u.contains(m)||c.contains(g)||!eh(r[g-1],s[m-1],i))break}w>0&&(c.addRange(new me(y.original.startLineNumber-w,y.original.startLineNumber)),u.addRange(new me(y.modified.startLineNumber-w,y.modified.startLineNumber)));let h;for(h=0;h<b;h++){const g=y.original.endLineNumberExclusive+h,m=y.modified.endLineNumberExclusive+h;if(g>r.length||m>s.length||u.contains(m)||c.contains(g)||!eh(r[g-1],s[m-1],i))break}h>0&&(c.addRange(new me(y.original.endLineNumberExclusive,y.original.endLineNumberExclusive+h)),u.addRange(new me(y.modified.endLineNumberExclusive,y.modified.endLineNumberExclusive+h))),(w>0||h>0)&&(a[d]=new Dt(new me(y.original.startLineNumber-w,y.original.endLineNumberExclusive+h),new me(y.modified.startLineNumber-w,y.modified.endLineNumberExclusive+h)))}return a}function eh(e,t,n){if(e.trim()===t.trim())return!0;if(e.length>300&&t.length>300)return!1;const s=new Jf().compute(new ki([e],new le(1,1,1,e.length),!1),new ki([t],new le(1,1,1,t.length),!1),n);let i=0;const a=Oe.invert(s.diffs,e.length);for(const c of a)c.seq1Range.forEach(f=>{To(e.charCodeAt(f))||i++});function o(c){let f=0;for(let d=0;d<e.length;d++)To(c.charCodeAt(d))||f++;return f}const l=o(e.length>t.length?e:t);return i/l>.6&&l>10}function Py(e){if(e.length===0)return e;e.sort(xs(n=>n.original.startLineNumber,Ns));const t=[e[0]];for(let n=1;n<e.length;n++){const r=t[t.length-1],s=e[n],i=s.original.startLineNumber-r.original.endLineNumberExclusive,a=s.modified.startLineNumber-r.modified.endLineNumberExclusive;if(i>=0&&a>=0&&i+a<=2){t[t.length-1]=r.join(s);continue}t.push(s)}return t}function Iy(e,t){const n=new xi(e);return t=t.filter(r=>{const s=n.findLastMonotonous(o=>o.original.startLineNumber<r.original.endLineNumberExclusive)||new Dt(new me(1,1),new me(1,1)),i=Fr(e,o=>o.modified.startLineNumber<r.modified.endLineNumberExclusive);return s!==i}),t}function th(e,t,n){let r=n;return r=nh(e,t,r),r=nh(e,t,r),r=$y(e,t,r),r}function nh(e,t,n){if(n.length===0)return n;const r=[];r.push(n[0]);for(let i=1;i<n.length;i++){const a=r[r.length-1];let o=n[i];if(o.seq1Range.isEmpty||o.seq2Range.isEmpty){const l=o.seq1Range.start-a.seq1Range.endExclusive;let u;for(u=1;u<=l&&!(e.getElement(o.seq1Range.start-u)!==e.getElement(o.seq1Range.endExclusive-u)||t.getElement(o.seq2Range.start-u)!==t.getElement(o.seq2Range.endExclusive-u));u++);if(u--,u===l){r[r.length-1]=new Oe(new he(a.seq1Range.start,o.seq1Range.endExclusive-l),new he(a.seq2Range.start,o.seq2Range.endExclusive-l));continue}o=o.delta(-u)}r.push(o)}const s=[];for(let i=0;i<r.length-1;i++){const a=r[i+1];let o=r[i];if(o.seq1Range.isEmpty||o.seq2Range.isEmpty){const l=a.seq1Range.start-o.seq1Range.endExclusive;let u;for(u=0;u<l&&!(!e.isStronglyEqual(o.seq1Range.start+u,o.seq1Range.endExclusive+u)||!t.isStronglyEqual(o.seq2Range.start+u,o.seq2Range.endExclusive+u));u++);if(u===l){r[i+1]=new Oe(new he(o.seq1Range.start+l,a.seq1Range.endExclusive),new he(o.seq2Range.start+l,a.seq2Range.endExclusive));continue}u>0&&(o=o.delta(u))}s.push(o)}return r.length>0&&s.push(r[r.length-1]),s}function $y(e,t,n){if(!e.getBoundaryScore||!t.getBoundaryScore)return n;for(let r=0;r<n.length;r++){const s=r>0?n[r-1]:void 0,i=n[r],a=r+1<n.length?n[r+1]:void 0,o=new he(s?s.seq1Range.endExclusive+1:0,a?a.seq1Range.start-1:e.length),l=new he(s?s.seq2Range.endExclusive+1:0,a?a.seq2Range.start-1:t.length);i.seq1Range.isEmpty?n[r]=rh(i,e,t,o,l):i.seq2Range.isEmpty&&(n[r]=rh(i.swap(),t,e,l,o).swap())}return n}function rh(e,t,n,r,s){let a=1;for(;e.seq1Range.start-a>=r.start&&e.seq2Range.start-a>=s.start&&n.isStronglyEqual(e.seq2Range.start-a,e.seq2Range.endExclusive-a)&&a<100;)a++;a--;let o=0;for(;e.seq1Range.start+o<r.endExclusive&&e.seq2Range.endExclusive+o<s.endExclusive&&n.isStronglyEqual(e.seq2Range.start+o,e.seq2Range.endExclusive+o)&&o<100;)o++;if(a===0&&o===0)return e;let l=0,u=-1;for(let c=-a;c<=o;c++){const f=e.seq2Range.start+c,d=e.seq2Range.endExclusive+c,y=e.seq1Range.start+c,D=t.getBoundaryScore(y)+n.getBoundaryScore(f)+n.getBoundaryScore(d);D>u&&(u=D,l=c)}return e.delta(l)}function By(e,t,n){const r=[];for(const s of n){const i=r[r.length-1];if(!i){r.push(s);continue}s.seq1Range.start-i.seq1Range.endExclusive<=2||s.seq2Range.start-i.seq2Range.endExclusive<=2?r[r.length-1]=new Oe(i.seq1Range.join(s.seq1Range),i.seq2Range.join(s.seq2Range)):r.push(s)}return r}function sh(e,t,n,r,s=!1){const i=Oe.invert(n,e.length),a=[];let o=new ln(0,0);function l(c,f){if(c.offset1<o.offset1||c.offset2<o.offset2)return;const d=r(e,c.offset1),y=r(t,c.offset2);if(!d||!y)return;let D=new Oe(d,y);const S=D.intersect(f);let N=S.seq1Range.length,x=S.seq2Range.length;for(;i.length>0;){const k=i[0];if(!(k.seq1Range.intersects(D.seq1Range)||k.seq2Range.intersects(D.seq2Range)))break;const w=r(e,k.seq1Range.start),h=r(t,k.seq2Range.start),g=new Oe(w,h),m=g.intersect(k);if(N+=m.seq1Range.length,x+=m.seq2Range.length,D=D.join(g),D.seq1Range.endExclusive>=k.seq1Range.endExclusive)i.shift();else break}(s&&N+x<D.seq1Range.length+D.seq2Range.length||N+x<(D.seq1Range.length+D.seq2Range.length)*2/3)&&a.push(D),o=D.getEndExclusives()}for(;i.length>0;){const c=i.shift();c.seq1Range.isEmpty||(l(c.getStarts(),c),l(c.getEndExclusives().delta(-1),c))}return Vy(n,a)}function Vy(e,t){const n=[];for(;e.length>0||t.length>0;){const r=e[0],s=t[0];let i;r&&(!s||r.seq1Range.start<s.seq1Range.start)?i=e.shift():i=t.shift(),n.length>0&&n[n.length-1].seq1Range.endExclusive>=i.seq1Range.start?n[n.length-1]=n[n.length-1].join(i):n.push(i)}return n}function jy(e,t,n){let r=n;if(r.length===0)return r;let s=0,i;do{i=!1;const a=[r[0]];for(let o=1;o<r.length;o++){let c=function(d,y){const D=new he(u.seq1Range.endExclusive,l.seq1Range.start);return e.getText(D).replace(/\s/g,"").length<=4&&(d.seq1Range.length+d.seq2Range.length>5||y.seq1Range.length+y.seq2Range.length>5)};const l=r[o],u=a[a.length-1];c(u,l)?(i=!0,a[a.length-1]=a[a.length-1].join(l)):a.push(l)}r=a}while(s++<10&&i);return r}function Uy(e,t,n){let r=n;if(r.length===0)return r;let s=0,i;do{i=!1;const o=[r[0]];for(let l=1;l<r.length;l++){let f=function(y,D){const S=new he(c.seq1Range.endExclusive,u.seq1Range.start);if(e.countLinesIn(S)>5||S.length>500)return!1;const x=e.getText(S).trim();if(x.length>20||x.split(/\r\n|\r|\n/).length>1)return!1;const k=e.countLinesIn(y.seq1Range),b=y.seq1Range.length,w=t.countLinesIn(y.seq2Range),h=y.seq2Range.length,g=e.countLinesIn(D.seq1Range),m=D.seq1Range.length,E=t.countLinesIn(D.seq2Range),v=D.seq2Range.length,L=130;function C(A){return Math.min(A,L)}return Math.pow(Math.pow(C(k*40+b),1.5)+Math.pow(C(w*40+h),1.5),1.5)+Math.pow(Math.pow(C(g*40+m),1.5)+Math.pow(C(E*40+v),1.5),1.5)>(L**1.5)**1.5*1.3};const u=r[l],c=o[o.length-1];f(c,u)?(i=!0,o[o.length-1]=o[o.length-1].join(u)):o.push(u)}r=o}while(s++<10&&i);const a=[];return dy(r,(o,l,u)=>{let c=l;function f(x){return x.length>0&&x.trim().length<=3&&l.seq1Range.length+l.seq2Range.length>100}const d=e.extendToFullLines(l.seq1Range),y=e.getText(new he(d.start,l.seq1Range.start));f(y)&&(c=c.deltaStart(-y.length));const D=e.getText(new he(l.seq1Range.endExclusive,d.endExclusive));f(D)&&(c=c.deltaEnd(D.length));const S=Oe.fromOffsetPairs(o?o.getEndExclusives():ln.zero,u?u.getStarts():ln.max),N=c.intersect(S);a.length>0&&N.getStarts().equals(a[a.length-1].getEndExclusives())?a[a.length-1]=a[a.length-1].join(N):a.push(N)}),a}class ih{constructor(t,n){this.trimmedHash=t,this.lines=n}getElement(t){return this.trimmedHash[t]}get length(){return this.trimmedHash.length}getBoundaryScore(t){const n=t===0?0:ah(this.lines[t-1]),r=t===this.lines.length?0:ah(this.lines[t]);return 1e3-(n+r)}getText(t){return this.lines.slice(t.start,t.endExclusive).join(`
|
|
23
|
+
`)}isStronglyEqual(t,n){return this.lines[t]===this.lines[n]}}function ah(e){let t=0;for(;t<e.length&&(e.charCodeAt(t)===32||e.charCodeAt(t)===9);)t++;return t}class qy{constructor(){this.dynamicProgrammingDiffing=new ky,this.myersDiffingAlgorithm=new Jf}computeDiff(t,n,r){if(t.length<=1&&cy(t,n,(m,E)=>m===E))return new Ai([],[],!1);if(t.length===1&&t[0].length===0||n.length===1&&n[0].length===0)return new Ai([new an(new me(1,t.length+1),new me(1,n.length+1),[new St(new le(1,1,t.length,t[t.length-1].length+1),new le(1,1,n.length,n[n.length-1].length+1))])],[],!1);const s=r.maxComputationTimeMs===0?Cs.instance:new Ly(r.maxComputationTimeMs),i=!r.ignoreTrimWhitespace,a=new Map;function o(m){let E=a.get(m);return E===void 0&&(E=a.size,a.set(m,E)),E}const l=t.map(m=>o(m.trim())),u=n.map(m=>o(m.trim())),c=new ih(l,t),f=new ih(u,n),d=c.length+f.length<1700?this.dynamicProgrammingDiffing.compute(c,f,s,(m,E)=>t[m]===n[E]?n[E].length===0?.1:1+Math.log(1+n[E].length):.99):this.myersDiffingAlgorithm.compute(c,f,s);let y=d.diffs,D=d.hitTimeout;y=th(c,f,y),y=jy(c,f,y);const S=[],N=m=>{if(i)for(let E=0;E<m;E++){const v=x+E,L=k+E;if(t[v]!==n[L]){const C=this.refineDiff(t,n,new Oe(new he(v,v+1),new he(L,L+1)),s,i,r);for(const A of C.mappings)S.push(A);C.hitTimeout&&(D=!0)}}};let x=0,k=0;for(const m of y){hi(()=>m.seq1Range.start-x===m.seq2Range.start-k);const E=m.seq1Range.start-x;N(E),x=m.seq1Range.endExclusive,k=m.seq2Range.endExclusive;const v=this.refineDiff(t,n,m,s,i,r);v.hitTimeout&&(D=!0);for(const L of v.mappings)S.push(L)}N(t.length-x);const b=new Ni(t),w=new Ni(n),h=Hf(S,b,w);let g=[];return r.computeMoves&&(g=this.computeMoves(h,t,n,l,u,s,i,r)),hi(()=>{function m(v,L){if(v.lineNumber<1||v.lineNumber>L.length)return!1;const C=L[v.lineNumber-1];return!(v.column<1||v.column>C.length+1)}function E(v,L){return!(v.startLineNumber<1||v.startLineNumber>L.length+1||v.endLineNumberExclusive<1||v.endLineNumberExclusive>L.length+1)}for(const v of h){if(!v.innerChanges)return!1;for(const L of v.innerChanges)if(!(m(L.modifiedRange.getStartPosition(),n)&&m(L.modifiedRange.getEndPosition(),n)&&m(L.originalRange.getStartPosition(),t)&&m(L.originalRange.getEndPosition(),t)))return!1;if(!E(v.modified,n)||!E(v.original,t))return!1}return!0}),new Ai(h,g,D)}computeMoves(t,n,r,s,i,a,o,l){return Ty(t,n,r,s,i,a).map(f=>{const d=this.refineDiff(n,r,new Oe(f.original.toOffsetRange(),f.modified.toOffsetRange()),a,o,l),y=Hf(d.mappings,new Ni(n),new Ni(r),!0);return new uy(f,y)})}refineDiff(t,n,r,s,i,a){const l=Wy(r).toRangeMapping2(t,n),u=new ki(t,l.originalRange,i),c=new ki(n,l.modifiedRange,i),f=u.length+c.length<500?this.dynamicProgrammingDiffing.compute(u,c,s):this.myersDiffingAlgorithm.compute(u,c,s);let d=f.diffs;return d=th(u,c,d),d=sh(u,c,d,(D,S)=>D.findWordContaining(S)),a.extendToSubwords&&(d=sh(u,c,d,(D,S)=>D.findSubWordContaining(S),!0)),d=By(u,c,d),d=Uy(u,c,d),{mappings:d.map(D=>new St(u.translateRange(D.seq1Range),c.translateRange(D.seq2Range))),hitTimeout:f.hitTimeout}}}function Wy(e){return new Dt(new me(e.seq1Range.start+1,e.seq1Range.endExclusive+1),new me(e.seq2Range.start+1,e.seq2Range.endExclusive+1))}const oh={getLegacy:()=>new Ey,getDefault:()=>new qy};function Cn(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}class U{constructor(t,n,r,s=1){this._rgbaBrand=void 0,this.r=Math.min(255,Math.max(0,t))|0,this.g=Math.min(255,Math.max(0,n))|0,this.b=Math.min(255,Math.max(0,r))|0,this.a=Cn(Math.max(Math.min(1,s),0),3)}static equals(t,n){return t.r===n.r&&t.g===n.g&&t.b===n.b&&t.a===n.a}}class Et{constructor(t,n,r,s){this._hslaBrand=void 0,this.h=Math.max(Math.min(360,t),0)|0,this.s=Cn(Math.max(Math.min(1,n),0),3),this.l=Cn(Math.max(Math.min(1,r),0),3),this.a=Cn(Math.max(Math.min(1,s),0),3)}static equals(t,n){return t.h===n.h&&t.s===n.s&&t.l===n.l&&t.a===n.a}static fromRGBA(t){const n=t.r/255,r=t.g/255,s=t.b/255,i=t.a,a=Math.max(n,r,s),o=Math.min(n,r,s);let l=0,u=0;const c=(o+a)/2,f=a-o;if(f>0){switch(u=Math.min(c<=.5?f/(2*c):f/(2-2*c),1),a){case n:l=(r-s)/f+(r<s?6:0);break;case r:l=(s-n)/f+2;break;case s:l=(n-r)/f+4;break}l*=60,l=Math.round(l)}return new Et(l,u,c,i)}static _hue2rgb(t,n,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+(n-t)*6*r:r<1/2?n:r<2/3?t+(n-t)*(2/3-r)*6:t}static toRGBA(t){const n=t.h/360,{s:r,l:s,a:i}=t;let a,o,l;if(r===0)a=o=l=s;else{const u=s<.5?s*(1+r):s+r-s*r,c=2*s-u;a=Et._hue2rgb(c,u,n+1/3),o=Et._hue2rgb(c,u,n),l=Et._hue2rgb(c,u,n-1/3)}return new U(Math.round(a*255),Math.round(o*255),Math.round(l*255),i)}}class Pr{constructor(t,n,r,s){this._hsvaBrand=void 0,this.h=Math.max(Math.min(360,t),0)|0,this.s=Cn(Math.max(Math.min(1,n),0),3),this.v=Cn(Math.max(Math.min(1,r),0),3),this.a=Cn(Math.max(Math.min(1,s),0),3)}static equals(t,n){return t.h===n.h&&t.s===n.s&&t.v===n.v&&t.a===n.a}static fromRGBA(t){const n=t.r/255,r=t.g/255,s=t.b/255,i=Math.max(n,r,s),a=Math.min(n,r,s),o=i-a,l=i===0?0:o/i;let u;return o===0?u=0:i===n?u=((r-s)/o%6+6)%6:i===r?u=(s-n)/o+2:u=(n-r)/o+4,new Pr(Math.round(u*60),l,i,t.a)}static toRGBA(t){const{h:n,s:r,v:s,a:i}=t,a=s*r,o=a*(1-Math.abs(n/60%2-1)),l=s-a;let[u,c,f]=[0,0,0];return n<60?(u=a,c=o):n<120?(u=o,c=a):n<180?(c=a,f=o):n<240?(c=o,f=a):n<300?(u=o,f=a):n<=360&&(u=a,f=o),u=Math.round((u+l)*255),c=Math.round((c+l)*255),f=Math.round((f+l)*255),new U(u,c,f,i)}}let Ci=(ye=class{static fromHex(t){return ye.Format.CSS.parseHex(t)||ye.red}static equals(t,n){return!t&&!n?!0:!t||!n?!1:t.equals(n)}get hsla(){return this._hsla?this._hsla:Et.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:Pr.fromRGBA(this.rgba)}constructor(t){if(t)if(t instanceof U)this.rgba=t;else if(t instanceof Et)this._hsla=t,this.rgba=Et.toRGBA(t);else if(t instanceof Pr)this._hsva=t,this.rgba=Pr.toRGBA(t);else throw new Error("Invalid color ctor argument");else throw new Error("Color needs a value")}equals(t){return!!t&&U.equals(this.rgba,t.rgba)&&Et.equals(this.hsla,t.hsla)&&Pr.equals(this.hsva,t.hsva)}getRelativeLuminance(){const t=ye._relativeLuminanceForComponent(this.rgba.r),n=ye._relativeLuminanceForComponent(this.rgba.g),r=ye._relativeLuminanceForComponent(this.rgba.b),s=.2126*t+.7152*n+.0722*r;return Cn(s,4)}static _relativeLuminanceForComponent(t){const n=t/255;return n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4)}isLighter(){return(this.rgba.r*299+this.rgba.g*587+this.rgba.b*114)/1e3>=128}isLighterThan(t){const n=this.getRelativeLuminance(),r=t.getRelativeLuminance();return n>r}isDarkerThan(t){const n=this.getRelativeLuminance(),r=t.getRelativeLuminance();return n<r}lighten(t){return new ye(new Et(this.hsla.h,this.hsla.s,this.hsla.l+this.hsla.l*t,this.hsla.a))}darken(t){return new ye(new Et(this.hsla.h,this.hsla.s,this.hsla.l-this.hsla.l*t,this.hsla.a))}transparent(t){const{r:n,g:r,b:s,a:i}=this.rgba;return new ye(new U(n,r,s,i*t))}isTransparent(){return this.rgba.a===0}isOpaque(){return this.rgba.a===1}opposite(){return new ye(new U(255-this.rgba.r,255-this.rgba.g,255-this.rgba.b,this.rgba.a))}mix(t,n=.5){const r=Math.min(Math.max(n,0),1),s=this.rgba,i=t.rgba,a=s.r+(i.r-s.r)*r,o=s.g+(i.g-s.g)*r,l=s.b+(i.b-s.b)*r,u=s.a+(i.a-s.a)*r;return new ye(new U(a,o,l,u))}makeOpaque(t){if(this.isOpaque()||t.rgba.a!==1)return this;const{r:n,g:r,b:s,a:i}=this.rgba;return new ye(new U(t.rgba.r-i*(t.rgba.r-n),t.rgba.g-i*(t.rgba.g-r),t.rgba.b-i*(t.rgba.b-s),1))}toString(){return this._toString||(this._toString=ye.Format.CSS.format(this)),this._toString}toNumber32Bit(){return this._toNumber32Bit||(this._toNumber32Bit=(this.rgba.r<<24|this.rgba.g<<16|this.rgba.b<<8|this.rgba.a*255<<0)>>>0),this._toNumber32Bit}static getLighterColor(t,n,r){if(t.isLighterThan(n))return t;r=r||.5;const s=t.getRelativeLuminance(),i=n.getRelativeLuminance();return r=r*(i-s)/i,t.lighten(r)}static getDarkerColor(t,n,r){if(t.isDarkerThan(n))return t;r=r||.5;const s=t.getRelativeLuminance(),i=n.getRelativeLuminance();return r=r*(s-i)/s,t.darken(r)}},ye.white=new ye(new U(255,255,255,1)),ye.black=new ye(new U(0,0,0,1)),ye.red=new ye(new U(255,0,0,1)),ye.blue=new ye(new U(0,0,255,1)),ye.green=new ye(new U(0,255,0,1)),ye.cyan=new ye(new U(0,255,255,1)),ye.lightgrey=new ye(new U(211,211,211,1)),ye.transparent=new ye(new U(0,0,0,0)),ye);(function(e){(function(t){(function(n){function r(S){return S.rgba.a===1?`rgb(${S.rgba.r}, ${S.rgba.g}, ${S.rgba.b})`:e.Format.CSS.formatRGBA(S)}n.formatRGB=r;function s(S){return`rgba(${S.rgba.r}, ${S.rgba.g}, ${S.rgba.b}, ${+S.rgba.a.toFixed(2)})`}n.formatRGBA=s;function i(S){return S.hsla.a===1?`hsl(${S.hsla.h}, ${Math.round(S.hsla.s*100)}%, ${Math.round(S.hsla.l*100)}%)`:e.Format.CSS.formatHSLA(S)}n.formatHSL=i;function a(S){return`hsla(${S.hsla.h}, ${Math.round(S.hsla.s*100)}%, ${Math.round(S.hsla.l*100)}%, ${S.hsla.a.toFixed(2)})`}n.formatHSLA=a;function o(S){const N=S.toString(16);return N.length!==2?"0"+N:N}function l(S){return`#${o(S.rgba.r)}${o(S.rgba.g)}${o(S.rgba.b)}`}n.formatHex=l;function u(S,N=!1){return N&&S.rgba.a===1?e.Format.CSS.formatHex(S):`#${o(S.rgba.r)}${o(S.rgba.g)}${o(S.rgba.b)}${o(Math.round(S.rgba.a*255))}`}n.formatHexA=u;function c(S){return S.isOpaque()?e.Format.CSS.formatHex(S):e.Format.CSS.formatRGBA(S)}n.format=c;function f(S){var N,x,k,b,w,h,g;if(S==="transparent")return e.transparent;if(S.startsWith("#"))return y(S);if(S.startsWith("rgba(")){const m=S.match(/rgba\((?<r>(?:\+|-)?\d+), *(?<g>(?:\+|-)?\d+), *(?<b>(?:\+|-)?\d+), *(?<a>(?:\+|-)?\d+(\.\d+)?)\)/);if(!m)throw new Error("Invalid color format "+S);const E=parseInt(((N=m.groups)==null?void 0:N.r)??"0"),v=parseInt(((x=m.groups)==null?void 0:x.g)??"0"),L=parseInt(((k=m.groups)==null?void 0:k.b)??"0"),C=parseFloat(((b=m.groups)==null?void 0:b.a)??"0");return new e(new U(E,v,L,C))}if(S.startsWith("rgb(")){const m=S.match(/rgb\((?<r>(?:\+|-)?\d+), *(?<g>(?:\+|-)?\d+), *(?<b>(?:\+|-)?\d+)\)/);if(!m)throw new Error("Invalid color format "+S);const E=parseInt(((w=m.groups)==null?void 0:w.r)??"0"),v=parseInt(((h=m.groups)==null?void 0:h.g)??"0"),L=parseInt(((g=m.groups)==null?void 0:g.b)??"0");return new e(new U(E,v,L))}return d(S)}n.parse=f;function d(S){switch(S){case"aliceblue":return new e(new U(240,248,255,1));case"antiquewhite":return new e(new U(250,235,215,1));case"aqua":return new e(new U(0,255,255,1));case"aquamarine":return new e(new U(127,255,212,1));case"azure":return new e(new U(240,255,255,1));case"beige":return new e(new U(245,245,220,1));case"bisque":return new e(new U(255,228,196,1));case"black":return new e(new U(0,0,0,1));case"blanchedalmond":return new e(new U(255,235,205,1));case"blue":return new e(new U(0,0,255,1));case"blueviolet":return new e(new U(138,43,226,1));case"brown":return new e(new U(165,42,42,1));case"burlywood":return new e(new U(222,184,135,1));case"cadetblue":return new e(new U(95,158,160,1));case"chartreuse":return new e(new U(127,255,0,1));case"chocolate":return new e(new U(210,105,30,1));case"coral":return new e(new U(255,127,80,1));case"cornflowerblue":return new e(new U(100,149,237,1));case"cornsilk":return new e(new U(255,248,220,1));case"crimson":return new e(new U(220,20,60,1));case"cyan":return new e(new U(0,255,255,1));case"darkblue":return new e(new U(0,0,139,1));case"darkcyan":return new e(new U(0,139,139,1));case"darkgoldenrod":return new e(new U(184,134,11,1));case"darkgray":return new e(new U(169,169,169,1));case"darkgreen":return new e(new U(0,100,0,1));case"darkgrey":return new e(new U(169,169,169,1));case"darkkhaki":return new e(new U(189,183,107,1));case"darkmagenta":return new e(new U(139,0,139,1));case"darkolivegreen":return new e(new U(85,107,47,1));case"darkorange":return new e(new U(255,140,0,1));case"darkorchid":return new e(new U(153,50,204,1));case"darkred":return new e(new U(139,0,0,1));case"darksalmon":return new e(new U(233,150,122,1));case"darkseagreen":return new e(new U(143,188,143,1));case"darkslateblue":return new e(new U(72,61,139,1));case"darkslategray":return new e(new U(47,79,79,1));case"darkslategrey":return new e(new U(47,79,79,1));case"darkturquoise":return new e(new U(0,206,209,1));case"darkviolet":return new e(new U(148,0,211,1));case"deeppink":return new e(new U(255,20,147,1));case"deepskyblue":return new e(new U(0,191,255,1));case"dimgray":return new e(new U(105,105,105,1));case"dimgrey":return new e(new U(105,105,105,1));case"dodgerblue":return new e(new U(30,144,255,1));case"firebrick":return new e(new U(178,34,34,1));case"floralwhite":return new e(new U(255,250,240,1));case"forestgreen":return new e(new U(34,139,34,1));case"fuchsia":return new e(new U(255,0,255,1));case"gainsboro":return new e(new U(220,220,220,1));case"ghostwhite":return new e(new U(248,248,255,1));case"gold":return new e(new U(255,215,0,1));case"goldenrod":return new e(new U(218,165,32,1));case"gray":return new e(new U(128,128,128,1));case"green":return new e(new U(0,128,0,1));case"greenyellow":return new e(new U(173,255,47,1));case"grey":return new e(new U(128,128,128,1));case"honeydew":return new e(new U(240,255,240,1));case"hotpink":return new e(new U(255,105,180,1));case"indianred":return new e(new U(205,92,92,1));case"indigo":return new e(new U(75,0,130,1));case"ivory":return new e(new U(255,255,240,1));case"khaki":return new e(new U(240,230,140,1));case"lavender":return new e(new U(230,230,250,1));case"lavenderblush":return new e(new U(255,240,245,1));case"lawngreen":return new e(new U(124,252,0,1));case"lemonchiffon":return new e(new U(255,250,205,1));case"lightblue":return new e(new U(173,216,230,1));case"lightcoral":return new e(new U(240,128,128,1));case"lightcyan":return new e(new U(224,255,255,1));case"lightgoldenrodyellow":return new e(new U(250,250,210,1));case"lightgray":return new e(new U(211,211,211,1));case"lightgreen":return new e(new U(144,238,144,1));case"lightgrey":return new e(new U(211,211,211,1));case"lightpink":return new e(new U(255,182,193,1));case"lightsalmon":return new e(new U(255,160,122,1));case"lightseagreen":return new e(new U(32,178,170,1));case"lightskyblue":return new e(new U(135,206,250,1));case"lightslategray":return new e(new U(119,136,153,1));case"lightslategrey":return new e(new U(119,136,153,1));case"lightsteelblue":return new e(new U(176,196,222,1));case"lightyellow":return new e(new U(255,255,224,1));case"lime":return new e(new U(0,255,0,1));case"limegreen":return new e(new U(50,205,50,1));case"linen":return new e(new U(250,240,230,1));case"magenta":return new e(new U(255,0,255,1));case"maroon":return new e(new U(128,0,0,1));case"mediumaquamarine":return new e(new U(102,205,170,1));case"mediumblue":return new e(new U(0,0,205,1));case"mediumorchid":return new e(new U(186,85,211,1));case"mediumpurple":return new e(new U(147,112,219,1));case"mediumseagreen":return new e(new U(60,179,113,1));case"mediumslateblue":return new e(new U(123,104,238,1));case"mediumspringgreen":return new e(new U(0,250,154,1));case"mediumturquoise":return new e(new U(72,209,204,1));case"mediumvioletred":return new e(new U(199,21,133,1));case"midnightblue":return new e(new U(25,25,112,1));case"mintcream":return new e(new U(245,255,250,1));case"mistyrose":return new e(new U(255,228,225,1));case"moccasin":return new e(new U(255,228,181,1));case"navajowhite":return new e(new U(255,222,173,1));case"navy":return new e(new U(0,0,128,1));case"oldlace":return new e(new U(253,245,230,1));case"olive":return new e(new U(128,128,0,1));case"olivedrab":return new e(new U(107,142,35,1));case"orange":return new e(new U(255,165,0,1));case"orangered":return new e(new U(255,69,0,1));case"orchid":return new e(new U(218,112,214,1));case"palegoldenrod":return new e(new U(238,232,170,1));case"palegreen":return new e(new U(152,251,152,1));case"paleturquoise":return new e(new U(175,238,238,1));case"palevioletred":return new e(new U(219,112,147,1));case"papayawhip":return new e(new U(255,239,213,1));case"peachpuff":return new e(new U(255,218,185,1));case"peru":return new e(new U(205,133,63,1));case"pink":return new e(new U(255,192,203,1));case"plum":return new e(new U(221,160,221,1));case"powderblue":return new e(new U(176,224,230,1));case"purple":return new e(new U(128,0,128,1));case"rebeccapurple":return new e(new U(102,51,153,1));case"red":return new e(new U(255,0,0,1));case"rosybrown":return new e(new U(188,143,143,1));case"royalblue":return new e(new U(65,105,225,1));case"saddlebrown":return new e(new U(139,69,19,1));case"salmon":return new e(new U(250,128,114,1));case"sandybrown":return new e(new U(244,164,96,1));case"seagreen":return new e(new U(46,139,87,1));case"seashell":return new e(new U(255,245,238,1));case"sienna":return new e(new U(160,82,45,1));case"silver":return new e(new U(192,192,192,1));case"skyblue":return new e(new U(135,206,235,1));case"slateblue":return new e(new U(106,90,205,1));case"slategray":return new e(new U(112,128,144,1));case"slategrey":return new e(new U(112,128,144,1));case"snow":return new e(new U(255,250,250,1));case"springgreen":return new e(new U(0,255,127,1));case"steelblue":return new e(new U(70,130,180,1));case"tan":return new e(new U(210,180,140,1));case"teal":return new e(new U(0,128,128,1));case"thistle":return new e(new U(216,191,216,1));case"tomato":return new e(new U(255,99,71,1));case"turquoise":return new e(new U(64,224,208,1));case"violet":return new e(new U(238,130,238,1));case"wheat":return new e(new U(245,222,179,1));case"white":return new e(new U(255,255,255,1));case"whitesmoke":return new e(new U(245,245,245,1));case"yellow":return new e(new U(255,255,0,1));case"yellowgreen":return new e(new U(154,205,50,1));default:return null}}function y(S){const N=S.length;if(N===0||S.charCodeAt(0)!==35)return null;if(N===7){const x=16*D(S.charCodeAt(1))+D(S.charCodeAt(2)),k=16*D(S.charCodeAt(3))+D(S.charCodeAt(4)),b=16*D(S.charCodeAt(5))+D(S.charCodeAt(6));return new e(new U(x,k,b,1))}if(N===9){const x=16*D(S.charCodeAt(1))+D(S.charCodeAt(2)),k=16*D(S.charCodeAt(3))+D(S.charCodeAt(4)),b=16*D(S.charCodeAt(5))+D(S.charCodeAt(6)),w=16*D(S.charCodeAt(7))+D(S.charCodeAt(8));return new e(new U(x,k,b,w/255))}if(N===4){const x=D(S.charCodeAt(1)),k=D(S.charCodeAt(2)),b=D(S.charCodeAt(3));return new e(new U(16*x+x,16*k+k,16*b+b))}if(N===5){const x=D(S.charCodeAt(1)),k=D(S.charCodeAt(2)),b=D(S.charCodeAt(3)),w=D(S.charCodeAt(4));return new e(new U(16*x+x,16*k+k,16*b+b,(16*w+w)/255))}return null}n.parseHex=y;function D(S){switch(S){case 48:return 0;case 49:return 1;case 50:return 2;case 51:return 3;case 52:return 4;case 53:return 5;case 54:return 6;case 55:return 7;case 56:return 8;case 57:return 9;case 97:return 10;case 65:return 10;case 98:return 11;case 66:return 11;case 99:return 12;case 67:return 12;case 100:return 13;case 68:return 13;case 101:return 14;case 69:return 14;case 102:return 15;case 70:return 15}return 0}})(t.CSS||(t.CSS={}))})(e.Format||(e.Format={}))})(Ci||(Ci={}));function lh(e){const t=[];for(const n of e){const r=Number(n);(r||r===0&&n.replace(/\s/g,"")!=="")&&t.push(r)}return t}function Mo(e,t,n,r){return{red:e/255,blue:n/255,green:t/255,alpha:r}}function Fs(e,t){const n=t.index,r=t[0].length;if(n===void 0)return;const s=e.positionAt(n);return{startLineNumber:s.lineNumber,startColumn:s.column,endLineNumber:s.lineNumber,endColumn:s.column+r}}function Hy(e,t){if(!e)return;const n=Ci.Format.CSS.parseHex(t);if(n)return{range:e,color:Mo(n.rgba.r,n.rgba.g,n.rgba.b,n.rgba.a)}}function uh(e,t,n){if(!e||t.length!==1)return;const s=t[0].values(),i=lh(s);return{range:e,color:Mo(i[0],i[1],i[2],n?i[3]:1)}}function ch(e,t,n){if(!e||t.length!==1)return;const s=t[0].values(),i=lh(s),a=new Ci(new Et(i[0],i[1]/100,i[2]/100,n?i[3]:1));return{range:e,color:Mo(a.rgba.r,a.rgba.g,a.rgba.b,a.rgba.a)}}function _s(e,t){return typeof e=="string"?[...e.matchAll(t)]:e.findMatches(t)}function Yy(e){const t=[],n=new RegExp(`\\b(rgb|rgba|hsl|hsla)(\\([0-9\\s,.\\%]*\\))|^(#)([A-Fa-f0-9]{3})\\b|^(#)([A-Fa-f0-9]{4})\\b|^(#)([A-Fa-f0-9]{6})\\b|^(#)([A-Fa-f0-9]{8})\\b|(?<=['"\\s])(#)([A-Fa-f0-9]{3})\\b|(?<=['"\\s])(#)([A-Fa-f0-9]{4})\\b|(?<=['"\\s])(#)([A-Fa-f0-9]{6})\\b|(?<=['"\\s])(#)([A-Fa-f0-9]{8})\\b`,"gm"),r=_s(e,n);if(r.length>0)for(const s of r){const i=s.filter(u=>u!==void 0),a=i[1],o=i[2];if(!o)continue;let l;if(a==="rgb"){const u=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*\)$/gm;l=uh(Fs(e,s),_s(o,u),!1)}else if(a==="rgba"){const u=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;l=uh(Fs(e,s),_s(o,u),!0)}else if(a==="hsl"){const u=/^\(\s*((?:360(?:\.0+)?|(?:36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])(?:\.\d+)?))\s*[\s,]\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*[\s,]\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*\)$/gm;l=ch(Fs(e,s),_s(o,u),!1)}else if(a==="hsla"){const u=/^\(\s*((?:360(?:\.0+)?|(?:36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])(?:\.\d+)?))\s*[\s,]\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*[\s,]\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*[\s,]\s*(0[.][0-9]+|[.][0-9]+|[01][.]0*|[01])\s*\)$/gm;l=ch(Fs(e,s),_s(o,u),!0)}else a==="#"&&(l=Hy(Fs(e,s),a+o));l&&t.push(l)}return t}function zy(e){return!e||typeof e.getValue!="function"||typeof e.positionAt!="function"?[]:Yy(e)}const Gy=/^-+|-+$/g,fh=100,Jy=5;function Qy(e,t){var r;let n=[];if(t.findRegionSectionHeaders&&((r=t.foldingRules)!=null&&r.markers)){const s=Ky(e,t);n=n.concat(s)}if(t.findMarkSectionHeaders){const s=Xy(e,t);n=n.concat(s)}return n}function Ky(e,t){const n=[],r=e.getLineCount();for(let s=1;s<=r;s++){const i=e.getLineContent(s),a=i.match(t.foldingRules.markers.start);if(a){const o={startLineNumber:s,startColumn:a[0].length+1,endLineNumber:s,endColumn:i.length+1};if(o.endColumn>o.startColumn){const l={range:o,...Zy(i.substring(a[0].length)),shouldBeInComments:!1};(l.text||l.hasSeparatorLine)&&n.push(l)}}}return n}function Xy(e,t){const n=[],r=e.getLineCount();if(!t.markSectionHeaderRegex||t.markSectionHeaderRegex.trim()==="")return n;const s=Z0(t.markSectionHeaderRegex),i=new RegExp(t.markSectionHeaderRegex,`gdm${s?"s":""}`);if(Gg(i))return n;for(let a=1;a<=r;a+=fh-Jy){const o=Math.min(a+fh-1,r),l=[];for(let f=a;f<=o;f++)l.push(e.getLineContent(f));const u=l.join(`
|
|
24
|
+
`);i.lastIndex=0;let c;for(;(c=i.exec(u))!==null;){const f=u.substring(0,c.index),d=(f.match(/\n/g)||[]).length,y=a+d,D=c[0].split(`
|
|
25
|
+
`),S=D.length,N=y+S-1,x=f.lastIndexOf(`
|
|
26
|
+
`)+1,k=c.index-x+1,b=D[D.length-1],w=S===1?k+c[0].length:b.length+1,h={startLineNumber:y,startColumn:k,endLineNumber:N,endColumn:w},g=(c.groups??{}).label??"",m=((c.groups??{}).separator??"")!=="",E={range:h,text:g,hasSeparatorLine:m,shouldBeInComments:!0};(E.text||E.hasSeparatorLine)&&(n.length===0||n[n.length-1].range.endLineNumber<E.range.startLineNumber)&&n.push(E),i.lastIndex=c.index+c[0].length}}return n}function Zy(e){e=e.trim();const t=e.startsWith("-");return e=e.replace(Gy,""),{text:e,hasSeparatorLine:t}}class e2{get isRejected(){var t;return((t=this.outcome)==null?void 0:t.outcome)===1}get isSettled(){return!!this.outcome}constructor(){this.p=new Promise((t,n)=>{this.completeCallback=t,this.errorCallback=n})}complete(t){return this.isSettled?Promise.resolve():new Promise(n=>{this.completeCallback(t),this.outcome={outcome:0,value:t},n()})}error(t){return this.isSettled?Promise.resolve():new Promise(n=>{this.errorCallback(t),this.outcome={outcome:1,value:t},n()})}cancel(){return this.error(new rc)}}var hh;(function(e){async function t(r){let s;const i=await Promise.all(r.map(a=>a.then(o=>o,o=>{s||(s=o)})));if(typeof s<"u")throw s;return i}e.settled=t;function n(r){return new Promise(async(s,i)=>{try{await r(s,i)}catch(a){i(a)}})}e.withAsyncBody=n})(hh||(hh={}));class t2{constructor(){this._unsatisfiedConsumers=[],this._unconsumedValues=[]}get hasFinalValue(){return!!this._finalValue}produce(t){if(this._ensureNoFinalValue(),this._unsatisfiedConsumers.length>0){const n=this._unsatisfiedConsumers.shift();this._resolveOrRejectDeferred(n,t)}else this._unconsumedValues.push(t)}produceFinal(t){this._ensureNoFinalValue(),this._finalValue=t;for(const n of this._unsatisfiedConsumers)this._resolveOrRejectDeferred(n,t);this._unsatisfiedConsumers.length=0}_ensureNoFinalValue(){if(this._finalValue)throw new Ge("ProducerConsumer: cannot produce after final value has been set")}_resolveOrRejectDeferred(t,n){n.ok?t.complete(n.value):t.error(n.error)}consume(){if(this._unconsumedValues.length>0||this._finalValue){const t=this._unconsumedValues.length>0?this._unconsumedValues.shift():this._finalValue;return t.ok?Promise.resolve(t.value):Promise.reject(t.error)}else{const t=new e2;return this._unsatisfiedConsumers.push(t),t.p}}}const ct=class ct{constructor(t,n){this._onReturn=n,this._producerConsumer=new t2,this._iterator={next:()=>this._producerConsumer.consume(),return:()=>{var r;return(r=this._onReturn)==null||r.call(this),Promise.resolve({done:!0,value:void 0})},throw:async r=>(this._finishError(r),{done:!0,value:void 0})},queueMicrotask(async()=>{const r=t({emitOne:s=>this._producerConsumer.produce({ok:!0,value:{done:!1,value:s}}),emitMany:s=>{for(const i of s)this._producerConsumer.produce({ok:!0,value:{done:!1,value:i}})},reject:s=>this._finishError(s)});if(!this._producerConsumer.hasFinalValue)try{await r,this._finishOk()}catch(s){this._finishError(s)}})}static fromArray(t){return new ct(n=>{n.emitMany(t)})}static fromPromise(t){return new ct(async n=>{n.emitMany(await t)})}static fromPromisesResolveOrder(t){return new ct(async n=>{await Promise.all(t.map(async r=>n.emitOne(await r)))})}static merge(t){return new ct(async n=>{await Promise.all(t.map(async r=>{for await(const s of r)n.emitOne(s)}))})}static map(t,n){return new ct(async r=>{for await(const s of t)r.emitOne(n(s))})}map(t){return ct.map(this,t)}static coalesce(t){return ct.filter(t,n=>!!n)}coalesce(){return ct.coalesce(this)}static filter(t,n){return new ct(async r=>{for await(const s of t)n(s)&&r.emitOne(s)})}filter(t){return ct.filter(this,t)}_finishOk(){this._producerConsumer.hasFinalValue||this._producerConsumer.produceFinal({ok:!0,value:{done:!0,value:void 0}})}_finishError(t){this._producerConsumer.hasFinalValue||this._producerConsumer.produceFinal({ok:!1,error:t})}[Symbol.asyncIterator](){return this._iterator}};ct.EMPTY=ct.fromArray([]);let dh=ct;class n2{constructor(t){this.values=t,this.prefixSum=new Uint32Array(t.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(t,n){t=Lr(t);const r=this.values,s=this.prefixSum,i=n.length;return i===0?!1:(this.values=new Uint32Array(r.length+i),this.values.set(r.subarray(0,t),0),this.values.set(r.subarray(t),t+i),this.values.set(n,t),t-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=t-1),this.prefixSum=new Uint32Array(this.values.length),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(s.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}setValue(t,n){return t=Lr(t),n=Lr(n),this.values[t]===n?!1:(this.values[t]=n,t-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=t-1),!0)}removeValues(t,n){t=Lr(t),n=Lr(n);const r=this.values,s=this.prefixSum;if(t>=r.length)return!1;const i=r.length-t;return n>=i&&(n=i),n===0?!1:(this.values=new Uint32Array(r.length-n),this.values.set(r.subarray(0,t),0),this.values.set(r.subarray(t+n),t),this.prefixSum=new Uint32Array(this.values.length),t-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=t-1),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(s.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalSum(){return this.values.length===0?0:this._getPrefixSum(this.values.length-1)}getPrefixSum(t){return t<0?0:(t=Lr(t),this._getPrefixSum(t))}_getPrefixSum(t){if(t<=this.prefixSumValidIndex[0])return this.prefixSum[t];let n=this.prefixSumValidIndex[0]+1;n===0&&(this.prefixSum[0]=this.values[0],n++),t>=this.values.length&&(t=this.values.length-1);for(let r=n;r<=t;r++)this.prefixSum[r]=this.prefixSum[r-1]+this.values[r];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],t),this.prefixSum[t]}getIndexOf(t){t=Math.floor(t),this.getTotalSum();let n=0,r=this.values.length-1,s=0,i=0,a=0;for(;n<=r;)if(s=n+(r-n)/2|0,i=this.prefixSum[s],a=i-this.values[s],t<a)r=s-1;else if(t>=i)n=s+1;else break;return new r2(s,t-a)}}class r2{constructor(t,n){this.index=t,this.remainder=n,this._prefixSumIndexOfResultBrand=void 0,this.index=t,this.remainder=n}}class s2{constructor(t,n,r,s){this._uri=t,this._lines=n,this._eol=r,this._versionId=s,this._lineStarts=null,this._cachedTextValue=null}dispose(){this._lines.length=0}get version(){return this._versionId}getText(){return this._cachedTextValue===null&&(this._cachedTextValue=this._lines.join(this._eol)),this._cachedTextValue}onEvents(t){t.eol&&t.eol!==this._eol&&(this._eol=t.eol,this._lineStarts=null);const n=t.changes;for(const r of n)this._acceptDeleteRange(r.range),this._acceptInsertText(new Ne(r.range.startLineNumber,r.range.startColumn),r.text);this._versionId=t.versionId,this._cachedTextValue=null}_ensureLineStarts(){if(!this._lineStarts){const t=this._eol.length,n=this._lines.length,r=new Uint32Array(n);for(let s=0;s<n;s++)r[s]=this._lines[s].length+t;this._lineStarts=new n2(r)}}_setLineText(t,n){this._lines[t]=n,this._lineStarts&&this._lineStarts.setValue(t,this._lines[t].length+this._eol.length)}_acceptDeleteRange(t){if(t.startLineNumber===t.endLineNumber){if(t.startColumn===t.endColumn)return;this._setLineText(t.startLineNumber-1,this._lines[t.startLineNumber-1].substring(0,t.startColumn-1)+this._lines[t.startLineNumber-1].substring(t.endColumn-1));return}this._setLineText(t.startLineNumber-1,this._lines[t.startLineNumber-1].substring(0,t.startColumn-1)+this._lines[t.endLineNumber-1].substring(t.endColumn-1)),this._lines.splice(t.startLineNumber,t.endLineNumber-t.startLineNumber),this._lineStarts&&this._lineStarts.removeValues(t.startLineNumber,t.endLineNumber-t.startLineNumber)}_acceptInsertText(t,n){if(n.length===0)return;const r=Jg(n);if(r.length===1){this._setLineText(t.lineNumber-1,this._lines[t.lineNumber-1].substring(0,t.column-1)+r[0]+this._lines[t.lineNumber-1].substring(t.column-1));return}r[r.length-1]+=this._lines[t.lineNumber-1].substring(t.column-1),this._setLineText(t.lineNumber-1,this._lines[t.lineNumber-1].substring(0,t.column-1)+r[0]);const s=new Uint32Array(r.length-1);for(let i=1;i<r.length;i++)this._lines.splice(t.lineNumber+i-1,0,r[i]),s[i-1]=r[i].length+this._eol.length;this._lineStarts&&this._lineStarts.insertValues(t.lineNumber,s)}}class i2{constructor(){this._models=Object.create(null)}getModel(t){return this._models[t]}getModels(){const t=[];return Object.keys(this._models).forEach(n=>t.push(this._models[n])),t}$acceptNewModel(t){this._models[t.url]=new a2(bo.parse(t.url),t.lines,t.EOL,t.versionId)}$acceptModelChanged(t,n){if(!this._models[t])return;this._models[t].onEvents(n)}$acceptRemovedModel(t){this._models[t]&&delete this._models[t]}}class a2 extends s2{get uri(){return this._uri}get eol(){return this._eol}getValue(){return this.getText()}findMatches(t){const n=[];for(let r=0;r<this._lines.length;r++){const s=this._lines[r],i=this.offsetAt(new Ne(r+1,1)),a=s.matchAll(t);for(const o of a)(o.index||o.index===0)&&(o.index=o.index+i),n.push(o)}return n}getLinesContent(){return this._lines.slice(0)}getLineCount(){return this._lines.length}getLineContent(t){return this._lines[t-1]}getWordAtPosition(t,n){const r=No(t.column,Bf(n),this._lines[t.lineNumber-1],0);return r?new le(t.lineNumber,r.startColumn,t.lineNumber,r.endColumn):null}words(t){const n=this._lines,r=this._wordenize.bind(this);let s=0,i="",a=0,o=[];return{*[Symbol.iterator](){for(;;)if(a<o.length){const l=i.substring(o[a].start,o[a].end);a+=1,yield l}else if(s<n.length)i=n[s],o=r(i,t),a=0,s+=1;else break}}}getLineWords(t,n){const r=this._lines[t-1],s=this._wordenize(r,n),i=[];for(const a of s)i.push({word:r.substring(a.start,a.end),startColumn:a.start+1,endColumn:a.end+1});return i}_wordenize(t,n){const r=[];let s;for(n.lastIndex=0;(s=n.exec(t))&&s[0].length!==0;)r.push({start:s.index,end:s.index+s[0].length});return r}getValueInRange(t){if(t=this._validateRange(t),t.startLineNumber===t.endLineNumber)return this._lines[t.startLineNumber-1].substring(t.startColumn-1,t.endColumn-1);const n=this._eol,r=t.startLineNumber-1,s=t.endLineNumber-1,i=[];i.push(this._lines[r].substring(t.startColumn-1));for(let a=r+1;a<s;a++)i.push(this._lines[a]);return i.push(this._lines[s].substring(0,t.endColumn-1)),i.join(n)}offsetAt(t){return t=this._validatePosition(t),this._ensureLineStarts(),this._lineStarts.getPrefixSum(t.lineNumber-2)+(t.column-1)}positionAt(t){t=Math.floor(t),t=Math.max(0,t),this._ensureLineStarts();const n=this._lineStarts.getIndexOf(t),r=this._lines[n.index].length;return{lineNumber:1+n.index,column:1+Math.min(n.remainder,r)}}_validateRange(t){const n=this._validatePosition({lineNumber:t.startLineNumber,column:t.startColumn}),r=this._validatePosition({lineNumber:t.endLineNumber,column:t.endColumn});return n.lineNumber!==t.startLineNumber||n.column!==t.startColumn||r.lineNumber!==t.endLineNumber||r.column!==t.endColumn?{startLineNumber:n.lineNumber,startColumn:n.column,endLineNumber:r.lineNumber,endColumn:r.column}:t}_validatePosition(t){if(!Ne.isIPosition(t))throw new Error("bad position");let{lineNumber:n,column:r}=t,s=!1;if(n<1)n=1,r=1,s=!0;else if(n>this._lines.length)n=this._lines.length,r=this._lines[n-1].length+1,s=!0;else{const i=this._lines[n-1].length+1;r<1?(r=1,s=!0):r>i&&(r=i,s=!0)}return s?{lineNumber:n,column:r}:t}}const vr=class vr{constructor(t=null){this._foreignModule=t,this._requestHandlerBrand=void 0,this._workerTextModelSyncServer=new i2}dispose(){}async $ping(){return"pong"}_getModel(t){return this._workerTextModelSyncServer.getModel(t)}getModels(){return this._workerTextModelSyncServer.getModels()}$acceptNewModel(t){this._workerTextModelSyncServer.$acceptNewModel(t)}$acceptModelChanged(t,n){this._workerTextModelSyncServer.$acceptModelChanged(t,n)}$acceptRemovedModel(t){this._workerTextModelSyncServer.$acceptRemovedModel(t)}async $computeUnicodeHighlights(t,n,r){const s=this._getModel(t);return s?oy.computeUnicodeHighlights(s,n,r):{ranges:[],hasMore:!1,ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0}}async $findSectionHeaders(t,n){const r=this._getModel(t);return r?Qy(r,n):[]}async $computeDiff(t,n,r,s){const i=this._getModel(t),a=this._getModel(n);return!i||!a?null:vr.computeDiff(i,a,r,s)}static computeDiff(t,n,r,s){const i=s==="advanced"?oh.getDefault():oh.getLegacy(),a=t.getLinesContent(),o=n.getLinesContent(),l=i.computeDiff(a,o,r),u=l.changes.length>0?!1:this._modelsAreIdentical(t,n);function c(f){return f.map(d=>{var y;return[d.original.startLineNumber,d.original.endLineNumberExclusive,d.modified.startLineNumber,d.modified.endLineNumberExclusive,(y=d.innerChanges)==null?void 0:y.map(D=>[D.originalRange.startLineNumber,D.originalRange.startColumn,D.originalRange.endLineNumber,D.originalRange.endColumn,D.modifiedRange.startLineNumber,D.modifiedRange.startColumn,D.modifiedRange.endLineNumber,D.modifiedRange.endColumn])]})}return{identical:u,quitEarly:l.hitTimeout,changes:c(l.changes),moves:l.moves.map(f=>[f.lineRangeMapping.original.startLineNumber,f.lineRangeMapping.original.endLineNumberExclusive,f.lineRangeMapping.modified.startLineNumber,f.lineRangeMapping.modified.endLineNumberExclusive,c(f.changes)])}}static _modelsAreIdentical(t,n){const r=t.getLineCount(),s=n.getLineCount();if(r!==s)return!1;for(let i=1;i<=r;i++){const a=t.getLineContent(i),o=n.getLineContent(i);if(a!==o)return!1}return!0}async $computeMoreMinimalEdits(t,n,r){const s=this._getModel(t);if(!s)return n;const i=[];let a;n=n.slice(0).sort((l,u)=>{if(l.range&&u.range)return le.compareRangesUsingStarts(l.range,u.range);const c=l.range?0:1,f=u.range?0:1;return c-f});let o=0;for(let l=1;l<n.length;l++)le.getEndPosition(n[o].range).equals(le.getStartPosition(n[l].range))?(n[o].range=le.fromPositions(le.getStartPosition(n[o].range),le.getEndPosition(n[l].range)),n[o].text+=n[l].text):(o++,n[o]=n[l]);n.length=o+1;for(let{range:l,text:u,eol:c}of n){if(typeof c=="number"&&(a=c),le.isEmpty(l)&&!u)continue;const f=s.getValueInRange(l);if(u=u.replace(/\r\n|\n|\r/g,s.eol),f===u)continue;if(Math.max(u.length,f.length)>vr._diffLimit){i.push({range:l,text:u});continue}const d=m0(f,u,r),y=s.offsetAt(le.lift(l).getStartPosition());for(const D of d){const S=s.positionAt(y+D.originalStart),N=s.positionAt(y+D.originalStart+D.originalLength),x={text:u.substr(D.modifiedStart,D.modifiedLength),range:{startLineNumber:S.lineNumber,startColumn:S.column,endLineNumber:N.lineNumber,endColumn:N.column}};s.getValueInRange(x.range)!==x.text&&i.push(x)}}return typeof a=="number"&&i.push({eol:a,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),i}async $computeLinks(t){const n=this._getModel(t);return n?w0(n):null}async $computeDefaultDocumentColors(t){const n=this._getModel(t);return n?zy(n):null}async $textualSuggest(t,n,r,s){const i=new pi,a=new RegExp(r,s),o=new Set;e:for(const l of t){const u=this._getModel(l);if(u){for(const c of u.words(a))if(!(c===n||!isNaN(Number(c)))&&(o.add(c),o.size>vr._suggestionsLimit))break e}}return{words:Array.from(o),duration:i.elapsed()}}async $computeWordRanges(t,n,r,s){const i=this._getModel(t);if(!i)return Object.create(null);const a=new RegExp(r,s),o=Object.create(null);for(let l=n.startLineNumber;l<n.endLineNumber;l++){const u=i.getLineWords(l,a);for(const c of u){if(!isNaN(Number(c.word)))continue;let f=o[c.word];f||(f=[],o[c.word]=f),f.push({startLineNumber:l,startColumn:c.startColumn,endLineNumber:l,endColumn:c.endColumn})}}return o}async $navigateValueSet(t,n,r,s,i){const a=this._getModel(t);if(!a)return null;const o=new RegExp(s,i);n.startColumn===n.endColumn&&(n={startLineNumber:n.startLineNumber,startColumn:n.startColumn,endLineNumber:n.endLineNumber,endColumn:n.endColumn+1});const l=a.getValueInRange(n),u=a.getWordAtPosition({lineNumber:n.startLineNumber,column:n.startColumn},o);if(!u)return null;const c=a.getValueInRange(u);return fo.INSTANCE.navigateValueSet(n,l,u,c,r)}$fmr(t,n){if(!this._foreignModule||typeof this._foreignModule[t]!="function")return Promise.reject(new Error("Missing requestHandler or method: "+t));try{return Promise.resolve(this._foreignModule[t].apply(this._foreignModule,n))}catch(r){return Promise.reject(r)}}};vr._diffLimit=1e5,vr._suggestionsLimit=1e4;let Oo=vr;typeof importScripts=="function"&&(globalThis.monaco=G0());const ci=class ci{static getChannel(t){return t.getChannel(ci.CHANNEL_NAME)}static setChannel(t,n){t.setChannel(ci.CHANNEL_NAME,n)}};ci.CHANNEL_NAME="editorWorkerHost";let Ro=ci;function mh(e){let t;const n=h0(r=>{const s=Ro.getChannel(r),a={host:new Proxy({},{get(o,l,u){if(l!=="then"){if(typeof l!="string")throw new Error("Not supported");return(...c)=>s.$fhr(l,c)}}}),getMirrorModels:()=>n.requestHandler.getModels()};return t=e(a),new Oo(t)});return t}let ph=!1;function o2(){return ph}function l2(e){ph=!0,self.onmessage=t=>{mh(n=>e(n,t.data))}}self.onmessage=()=>{o2()||mh(()=>({}))};function u2(e){self.onmessage=()=>{l2((t,n)=>Object.create(e(t,n)))}}let gh=class Xu{constructor(t,n,r,s){this._uri=t,this._languageId=n,this._version=r,this._content=s,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(t){if(t){const n=this.offsetAt(t.start),r=this.offsetAt(t.end);return this._content.substring(n,r)}return this._content}update(t,n){for(const r of t)if(Xu.isIncremental(r)){const s=wh(r.range),i=this.offsetAt(s.start),a=this.offsetAt(s.end);this._content=this._content.substring(0,i)+r.text+this._content.substring(a,this._content.length);const o=Math.max(s.start.line,0),l=Math.max(s.end.line,0);let u=this._lineOffsets;const c=yh(r.text,!1,i);if(l-o===c.length)for(let d=0,y=c.length;d<y;d++)u[d+o+1]=c[d];else c.length<1e4?u.splice(o+1,l-o,...c):this._lineOffsets=u=u.slice(0,o+1).concat(c,u.slice(l+1));const f=r.text.length-(a-i);if(f!==0)for(let d=o+1+c.length,y=u.length;d<y;d++)u[d]=u[d]+f}else if(Xu.isFull(r))this._content=r.text,this._lineOffsets=void 0;else throw new Error("Unknown change event received");this._version=n}getLineOffsets(){return this._lineOffsets===void 0&&(this._lineOffsets=yh(this._content,!0)),this._lineOffsets}positionAt(t){t=Math.max(Math.min(t,this._content.length),0);const n=this.getLineOffsets();let r=0,s=n.length;if(s===0)return{line:0,character:t};for(;r<s;){const a=Math.floor((r+s)/2);n[a]>t?s=a:r=a+1}const i=r-1;return t=this.ensureBeforeEOL(t,n[i]),{line:i,character:t-n[i]}}offsetAt(t){const n=this.getLineOffsets();if(t.line>=n.length)return this._content.length;if(t.line<0)return 0;const r=n[t.line];if(t.character<=0)return r;const s=t.line+1<n.length?n[t.line+1]:this._content.length,i=Math.min(r+t.character,s);return this.ensureBeforeEOL(i,r)}ensureBeforeEOL(t,n){for(;t>n&&bh(this._content.charCodeAt(t-1));)t--;return t}get lineCount(){return this.getLineOffsets().length}static isIncremental(t){const n=t;return n!=null&&typeof n.text=="string"&&n.range!==void 0&&(n.rangeLength===void 0||typeof n.rangeLength=="number")}static isFull(t){const n=t;return n!=null&&typeof n.text=="string"&&n.range===void 0&&n.rangeLength===void 0}};var Po;(function(e){function t(s,i,a,o){return new gh(s,i,a,o)}e.create=t;function n(s,i,a){if(s instanceof gh)return s.update(i,a),s;throw new Error("TextDocument.update: document must be created by TextDocument.create")}e.update=n;function r(s,i){const a=s.getText(),o=Io(i.map(c2),(c,f)=>{const d=c.range.start.line-f.range.start.line;return d===0?c.range.start.character-f.range.start.character:d});let l=0;const u=[];for(const c of o){const f=s.offsetAt(c.range.start);if(f<l)throw new Error("Overlapping edit");f>l&&u.push(a.substring(l,f)),c.newText.length&&u.push(c.newText),l=s.offsetAt(c.range.end)}return u.push(a.substr(l)),u.join("")}e.applyEdits=r})(Po||(Po={}));function Io(e,t){if(e.length<=1)return e;const n=e.length/2|0,r=e.slice(0,n),s=e.slice(n);Io(r,t),Io(s,t);let i=0,a=0,o=0;for(;i<r.length&&a<s.length;)t(r[i],s[a])<=0?e[o++]=r[i++]:e[o++]=s[a++];for(;i<r.length;)e[o++]=r[i++];for(;a<s.length;)e[o++]=s[a++];return e}function yh(e,t,n=0){const r=t?[n]:[];for(let s=0;s<e.length;s++){const i=e.charCodeAt(s);bh(i)&&(i===13&&s+1<e.length&&e.charCodeAt(s+1)===10&&s++,r.push(n+s+1))}return r}function bh(e){return e===13||e===10}function wh(e){const t=e.start,n=e.end;return t.line>n.line||t.line===n.line&&t.character>n.character?{start:n,end:t}:e}function c2(e){const t=wh(e.range);return t!==e.range?{newText:e.newText,range:t}:e}function f2(e,t=!1){const n=e.length;let r=0,s="",i=0,a=16,o=0,l=0,u=0,c=0,f=0;function d(b,w){let h=0,g=0;for(;h<b;){let m=e.charCodeAt(r);if(m>=48&&m<=57)g=g*16+m-48;else if(m>=65&&m<=70)g=g*16+m-65+10;else if(m>=97&&m<=102)g=g*16+m-97+10;else break;r++,h++}return h<b&&(g=-1),g}function y(b){r=b,s="",i=0,a=16,f=0}function D(){let b=r;if(e.charCodeAt(r)===48)r++;else for(r++;r<e.length&&Ir(e.charCodeAt(r));)r++;if(r<e.length&&e.charCodeAt(r)===46)if(r++,r<e.length&&Ir(e.charCodeAt(r)))for(r++;r<e.length&&Ir(e.charCodeAt(r));)r++;else return f=3,e.substring(b,r);let w=r;if(r<e.length&&(e.charCodeAt(r)===69||e.charCodeAt(r)===101))if(r++,(r<e.length&&e.charCodeAt(r)===43||e.charCodeAt(r)===45)&&r++,r<e.length&&Ir(e.charCodeAt(r))){for(r++;r<e.length&&Ir(e.charCodeAt(r));)r++;w=r}else f=3;return e.substring(b,w)}function S(){let b="",w=r;for(;;){if(r>=n){b+=e.substring(w,r),f=2;break}const h=e.charCodeAt(r);if(h===34){b+=e.substring(w,r),r++;break}if(h===92){if(b+=e.substring(w,r),r++,r>=n){f=2;break}switch(e.charCodeAt(r++)){case 34:b+='"';break;case 92:b+="\\";break;case 47:b+="/";break;case 98:b+="\b";break;case 102:b+="\f";break;case 110:b+=`
|
|
27
|
+
`;break;case 114:b+="\r";break;case 116:b+=" ";break;case 117:const m=d(4);m>=0?b+=String.fromCharCode(m):f=4;break;default:f=5}w=r;continue}if(h>=0&&h<=31)if(Ts(h)){b+=e.substring(w,r),f=2;break}else f=6;r++}return b}function N(){if(s="",f=0,i=r,l=o,c=u,r>=n)return i=n,a=17;let b=e.charCodeAt(r);if($o(b)){do r++,s+=String.fromCharCode(b),b=e.charCodeAt(r);while($o(b));return a=15}if(Ts(b))return r++,s+=String.fromCharCode(b),b===13&&e.charCodeAt(r)===10&&(r++,s+=`
|
|
28
|
+
`),o++,u=r,a=14;switch(b){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++,s=S(),a=10;case 47:const w=r-1;if(e.charCodeAt(r+1)===47){for(r+=2;r<n&&!Ts(e.charCodeAt(r));)r++;return s=e.substring(w,r),a=12}if(e.charCodeAt(r+1)===42){r+=2;const h=n-1;let g=!1;for(;r<h;){const m=e.charCodeAt(r);if(m===42&&e.charCodeAt(r+1)===47){r+=2,g=!0;break}r++,Ts(m)&&(m===13&&e.charCodeAt(r)===10&&r++,o++,u=r)}return g||(r++,f=1),s=e.substring(w,r),a=13}return s+=String.fromCharCode(b),r++,a=16;case 45:if(s+=String.fromCharCode(b),r++,r===n||!Ir(e.charCodeAt(r)))return a=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return s+=D(),a=11;default:for(;r<n&&x(b);)r++,b=e.charCodeAt(r);if(i!==r){switch(s=e.substring(i,r),s){case"true":return a=8;case"false":return a=9;case"null":return a=7}return a=16}return s+=String.fromCharCode(b),r++,a=16}}function x(b){if($o(b)||Ts(b))return!1;switch(b){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}function k(){let b;do b=N();while(b>=12&&b<=15);return b}return{setPosition:y,getPosition:()=>r,scan:t?k:N,getToken:()=>a,getTokenValue:()=>s,getTokenOffset:()=>i,getTokenLength:()=>r-i,getTokenStartLine:()=>l,getTokenStartCharacter:()=>i-c,getTokenError:()=>f}}function $o(e){return e===32||e===9}function Ts(e){return e===10||e===13}function Ir(e){return e>=48&&e<=57}var vh;(function(e){e[e.lineFeed=10]="lineFeed",e[e.carriageReturn=13]="carriageReturn",e[e.space=32]="space",e[e._0=48]="_0",e[e._1=49]="_1",e[e._2=50]="_2",e[e._3=51]="_3",e[e._4=52]="_4",e[e._5=53]="_5",e[e._6=54]="_6",e[e._7=55]="_7",e[e._8=56]="_8",e[e._9=57]="_9",e[e.a=97]="a",e[e.b=98]="b",e[e.c=99]="c",e[e.d=100]="d",e[e.e=101]="e",e[e.f=102]="f",e[e.g=103]="g",e[e.h=104]="h",e[e.i=105]="i",e[e.j=106]="j",e[e.k=107]="k",e[e.l=108]="l",e[e.m=109]="m",e[e.n=110]="n",e[e.o=111]="o",e[e.p=112]="p",e[e.q=113]="q",e[e.r=114]="r",e[e.s=115]="s",e[e.t=116]="t",e[e.u=117]="u",e[e.v=118]="v",e[e.w=119]="w",e[e.x=120]="x",e[e.y=121]="y",e[e.z=122]="z",e[e.A=65]="A",e[e.B=66]="B",e[e.C=67]="C",e[e.D=68]="D",e[e.E=69]="E",e[e.F=70]="F",e[e.G=71]="G",e[e.H=72]="H",e[e.I=73]="I",e[e.J=74]="J",e[e.K=75]="K",e[e.L=76]="L",e[e.M=77]="M",e[e.N=78]="N",e[e.O=79]="O",e[e.P=80]="P",e[e.Q=81]="Q",e[e.R=82]="R",e[e.S=83]="S",e[e.T=84]="T",e[e.U=85]="U",e[e.V=86]="V",e[e.W=87]="W",e[e.X=88]="X",e[e.Y=89]="Y",e[e.Z=90]="Z",e[e.asterisk=42]="asterisk",e[e.backslash=92]="backslash",e[e.closeBrace=125]="closeBrace",e[e.closeBracket=93]="closeBracket",e[e.colon=58]="colon",e[e.comma=44]="comma",e[e.dot=46]="dot",e[e.doubleQuote=34]="doubleQuote",e[e.minus=45]="minus",e[e.openBrace=123]="openBrace",e[e.openBracket=91]="openBracket",e[e.plus=43]="plus",e[e.slash=47]="slash",e[e.formFeed=12]="formFeed",e[e.tab=9]="tab"})(vh||(vh={})),new Array(20).fill(0).map((e,t)=>" ".repeat(t));const $r=200;new Array($r).fill(0).map((e,t)=>`
|
|
29
|
+
`+" ".repeat(t)),new Array($r).fill(0).map((e,t)=>"\r"+" ".repeat(t)),new Array($r).fill(0).map((e,t)=>`\r
|
|
30
|
+
`+" ".repeat(t)),new Array($r).fill(0).map((e,t)=>`
|
|
31
|
+
`+" ".repeat(t)),new Array($r).fill(0).map((e,t)=>"\r"+" ".repeat(t)),new Array($r).fill(0).map((e,t)=>`\r
|
|
32
|
+
`+" ".repeat(t));var Fi;(function(e){e.DEFAULT={allowTrailingComma:!1}})(Fi||(Fi={}));function h2(e,t=[],n=Fi.DEFAULT){let r=null,s=[];const i=[];function a(l){Array.isArray(s)?s.push(l):r!==null&&(s[r]=l)}return d2(e,{onObjectBegin:()=>{const l={};a(l),i.push(s),s=l,r=null},onObjectProperty:l=>{r=l},onObjectEnd:()=>{s=i.pop()},onArrayBegin:()=>{const l=[];a(l),i.push(s),s=l,r=null},onArrayEnd:()=>{s=i.pop()},onLiteralValue:a,onError:(l,u,c)=>{t.push({error:l,offset:u,length:c})}},n),s[0]}function Bo(e){switch(e.type){case"array":return e.children.map(Bo);case"object":const t=Object.create(null);for(let n of e.children){const r=n.children[1];r&&(t[n.children[0].value]=Bo(r))}return t;case"null":case"string":case"number":case"boolean":return e.value;default:return}}function d2(e,t,n=Fi.DEFAULT){const r=f2(e,!1),s=[];let i=0;function a(M){return M?()=>i===0&&M(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}function o(M){return M?T=>i===0&&M(T,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}function l(M){return M?T=>i===0&&M(T,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),()=>s.slice()):()=>!0}function u(M){return M?()=>{i>0?i++:M(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),()=>s.slice())===!1&&(i=1)}:()=>!0}function c(M){return M?()=>{i>0&&i--,i===0&&M(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter())}:()=>!0}const f=u(t.onObjectBegin),d=l(t.onObjectProperty),y=c(t.onObjectEnd),D=u(t.onArrayBegin),S=c(t.onArrayEnd),N=l(t.onLiteralValue),x=o(t.onSeparator),k=a(t.onComment),b=o(t.onError),w=n&&n.disallowComments,h=n&&n.allowTrailingComma;function g(){for(;;){const M=r.scan();switch(r.getTokenError()){case 4:m(14);break;case 5:m(15);break;case 3:m(13);break;case 1:w||m(11);break;case 2:m(12);break;case 6:m(16);break}switch(M){case 12:case 13:w?m(10):k();break;case 16:m(1);break;case 15:case 14:break;default:return M}}}function m(M,T=[],P=[]){if(b(M),T.length+P.length>0){let V=r.getToken();for(;V!==17;){if(T.indexOf(V)!==-1){g();break}else if(P.indexOf(V)!==-1)break;V=g()}}}function E(M){const T=r.getTokenValue();return M?N(T):(d(T),s.push(T)),g(),!0}function v(){switch(r.getToken()){case 11:const M=r.getTokenValue();let T=Number(M);isNaN(T)&&(m(2),T=0),N(T);break;case 7:N(null);break;case 8:N(!0);break;case 9:N(!1);break;default:return!1}return g(),!0}function L(){return r.getToken()!==10?(m(3,[],[2,5]),!1):(E(!1),r.getToken()===6?(x(":"),g(),F()||m(4,[],[2,5])):m(5,[],[2,5]),s.pop(),!0)}function C(){f(),g();let M=!1;for(;r.getToken()!==2&&r.getToken()!==17;){if(r.getToken()===5){if(M||m(4,[],[]),x(","),g(),r.getToken()===2&&h)break}else M&&m(6,[],[]);L()||m(4,[],[2,5]),M=!0}return y(),r.getToken()!==2?m(7,[2],[]):g(),!0}function A(){D(),g();let M=!0,T=!1;for(;r.getToken()!==4&&r.getToken()!==17;){if(r.getToken()===5){if(T||m(4,[],[]),x(","),g(),r.getToken()===4&&h)break}else T&&m(6,[],[]);M?(s.push(0),M=!1):s[s.length-1]++,F()||m(4,[],[4,5]),T=!0}return S(),M||s.pop(),r.getToken()!==4?m(8,[4],[]):g(),!0}function F(){switch(r.getToken()){case 3:return A();case 1:return C();case 10:return E(!0);default:return v()}}return g(),r.getToken()===17?n.allowEmptyContent?!0:(m(4,[],[]),!1):F()?(r.getToken()!==17&&m(9,[],[]),!0):(m(4,[],[]),!1)}var Dh;(function(e){e[e.None=0]="None",e[e.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=2]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",e[e.InvalidUnicode=4]="InvalidUnicode",e[e.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",e[e.InvalidCharacter=6]="InvalidCharacter"})(Dh||(Dh={}));var Sh;(function(e){e[e.OpenBraceToken=1]="OpenBraceToken",e[e.CloseBraceToken=2]="CloseBraceToken",e[e.OpenBracketToken=3]="OpenBracketToken",e[e.CloseBracketToken=4]="CloseBracketToken",e[e.CommaToken=5]="CommaToken",e[e.ColonToken=6]="ColonToken",e[e.NullKeyword=7]="NullKeyword",e[e.TrueKeyword=8]="TrueKeyword",e[e.FalseKeyword=9]="FalseKeyword",e[e.StringLiteral=10]="StringLiteral",e[e.NumericLiteral=11]="NumericLiteral",e[e.LineCommentTrivia=12]="LineCommentTrivia",e[e.BlockCommentTrivia=13]="BlockCommentTrivia",e[e.LineBreakTrivia=14]="LineBreakTrivia",e[e.Trivia=15]="Trivia",e[e.Unknown=16]="Unknown",e[e.EOF=17]="EOF"})(Sh||(Sh={}));const m2=h2,p2=Bo;var Eh;(function(e){e[e.InvalidSymbol=1]="InvalidSymbol",e[e.InvalidNumberFormat=2]="InvalidNumberFormat",e[e.PropertyNameExpected=3]="PropertyNameExpected",e[e.ValueExpected=4]="ValueExpected",e[e.ColonExpected=5]="ColonExpected",e[e.CommaExpected=6]="CommaExpected",e[e.CloseBraceExpected=7]="CloseBraceExpected",e[e.CloseBracketExpected=8]="CloseBracketExpected",e[e.EndOfFileExpected=9]="EndOfFileExpected",e[e.InvalidCommentToken=10]="InvalidCommentToken",e[e.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=12]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",e[e.InvalidUnicode=14]="InvalidUnicode",e[e.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",e[e.InvalidCharacter=16]="InvalidCharacter"})(Eh||(Eh={}));var Ah;(()=>{var e={975:C=>{function A(T){if(typeof T!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(T))}function F(T,P){for(var V,H="",K=0,J=-1,$=0,z=0;z<=T.length;++z){if(z<T.length)V=T.charCodeAt(z);else{if(V===47)break;V=47}if(V===47){if(!(J===z-1||$===1))if(J!==z-1&&$===2){if(H.length<2||K!==2||H.charCodeAt(H.length-1)!==46||H.charCodeAt(H.length-2)!==46){if(H.length>2){var Z=H.lastIndexOf("/");if(Z!==H.length-1){Z===-1?(H="",K=0):K=(H=H.slice(0,Z)).length-1-H.lastIndexOf("/"),J=z,$=0;continue}}else if(H.length===2||H.length===1){H="",K=0,J=z,$=0;continue}}P&&(H.length>0?H+="/..":H="..",K=2)}else H.length>0?H+="/"+T.slice(J+1,z):H=T.slice(J+1,z),K=z-J-1;J=z,$=0}else V===46&&$!==-1?++$:$=-1}return H}var M={resolve:function(){for(var T,P="",V=!1,H=arguments.length-1;H>=-1&&!V;H--){var K;H>=0?K=arguments[H]:(T===void 0&&(T=process.cwd()),K=T),A(K),K.length!==0&&(P=K+"/"+P,V=K.charCodeAt(0)===47)}return P=F(P,!V),V?P.length>0?"/"+P:"/":P.length>0?P:"."},normalize:function(T){if(A(T),T.length===0)return".";var P=T.charCodeAt(0)===47,V=T.charCodeAt(T.length-1)===47;return(T=F(T,!P)).length!==0||P||(T="."),T.length>0&&V&&(T+="/"),P?"/"+T:T},isAbsolute:function(T){return A(T),T.length>0&&T.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var T,P=0;P<arguments.length;++P){var V=arguments[P];A(V),V.length>0&&(T===void 0?T=V:T+="/"+V)}return T===void 0?".":M.normalize(T)},relative:function(T,P){if(A(T),A(P),T===P||(T=M.resolve(T))===(P=M.resolve(P)))return"";for(var V=1;V<T.length&&T.charCodeAt(V)===47;++V);for(var H=T.length,K=H-V,J=1;J<P.length&&P.charCodeAt(J)===47;++J);for(var $=P.length-J,z=K<$?K:$,Z=-1,X=0;X<=z;++X){if(X===z){if($>z){if(P.charCodeAt(J+X)===47)return P.slice(J+X+1);if(X===0)return P.slice(J+X)}else K>z&&(T.charCodeAt(V+X)===47?Z=X:X===0&&(Z=0));break}var ne=T.charCodeAt(V+X);if(ne!==P.charCodeAt(J+X))break;ne===47&&(Z=X)}var fe="";for(X=V+Z+1;X<=H;++X)X!==H&&T.charCodeAt(X)!==47||(fe.length===0?fe+="..":fe+="/..");return fe.length>0?fe+P.slice(J+Z):(J+=Z,P.charCodeAt(J)===47&&++J,P.slice(J))},_makeLong:function(T){return T},dirname:function(T){if(A(T),T.length===0)return".";for(var P=T.charCodeAt(0),V=P===47,H=-1,K=!0,J=T.length-1;J>=1;--J)if((P=T.charCodeAt(J))===47){if(!K){H=J;break}}else K=!1;return H===-1?V?"/":".":V&&H===1?"//":T.slice(0,H)},basename:function(T,P){if(P!==void 0&&typeof P!="string")throw new TypeError('"ext" argument must be a string');A(T);var V,H=0,K=-1,J=!0;if(P!==void 0&&P.length>0&&P.length<=T.length){if(P.length===T.length&&P===T)return"";var $=P.length-1,z=-1;for(V=T.length-1;V>=0;--V){var Z=T.charCodeAt(V);if(Z===47){if(!J){H=V+1;break}}else z===-1&&(J=!1,z=V+1),$>=0&&(Z===P.charCodeAt($)?--$==-1&&(K=V):($=-1,K=z))}return H===K?K=z:K===-1&&(K=T.length),T.slice(H,K)}for(V=T.length-1;V>=0;--V)if(T.charCodeAt(V)===47){if(!J){H=V+1;break}}else K===-1&&(J=!1,K=V+1);return K===-1?"":T.slice(H,K)},extname:function(T){A(T);for(var P=-1,V=0,H=-1,K=!0,J=0,$=T.length-1;$>=0;--$){var z=T.charCodeAt($);if(z!==47)H===-1&&(K=!1,H=$+1),z===46?P===-1?P=$:J!==1&&(J=1):P!==-1&&(J=-1);else if(!K){V=$+1;break}}return P===-1||H===-1||J===0||J===1&&P===H-1&&P===V+1?"":T.slice(P,H)},format:function(T){if(T===null||typeof T!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof T);return(function(P,V){var H=V.dir||V.root,K=V.base||(V.name||"")+(V.ext||"");return H?H===V.root?H+K:H+"/"+K:K})(0,T)},parse:function(T){A(T);var P={root:"",dir:"",base:"",ext:"",name:""};if(T.length===0)return P;var V,H=T.charCodeAt(0),K=H===47;K?(P.root="/",V=1):V=0;for(var J=-1,$=0,z=-1,Z=!0,X=T.length-1,ne=0;X>=V;--X)if((H=T.charCodeAt(X))!==47)z===-1&&(Z=!1,z=X+1),H===46?J===-1?J=X:ne!==1&&(ne=1):J!==-1&&(ne=-1);else if(!Z){$=X+1;break}return J===-1||z===-1||ne===0||ne===1&&J===z-1&&J===$+1?z!==-1&&(P.base=P.name=$===0&&K?T.slice(1,z):T.slice($,z)):($===0&&K?(P.name=T.slice(1,J),P.base=T.slice(1,z)):(P.name=T.slice($,J),P.base=T.slice($,z)),P.ext=T.slice(J,z)),$>0?P.dir=T.slice(0,$-1):K&&(P.dir="/"),P},sep:"/",delimiter:":",win32:null,posix:null};M.posix=M,C.exports=M}},t={};function n(C){var A=t[C];if(A!==void 0)return A.exports;var F=t[C]={exports:{}};return e[C](F,F.exports,n),F.exports}n.d=(C,A)=>{for(var F in A)n.o(A,F)&&!n.o(C,F)&&Object.defineProperty(C,F,{enumerable:!0,get:A[F]})},n.o=(C,A)=>Object.prototype.hasOwnProperty.call(C,A),n.r=C=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(C,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(C,"__esModule",{value:!0})};var r={};let s;n.r(r),n.d(r,{URI:()=>d,Utils:()=>L}),typeof process=="object"?s=process.platform==="win32":typeof navigator=="object"&&(s=navigator.userAgent.indexOf("Windows")>=0);const i=/^\w[\w\d+.-]*$/,a=/^\//,o=/^\/\//;function l(C,A){if(!C.scheme&&A)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${C.authority}", path: "${C.path}", query: "${C.query}", fragment: "${C.fragment}"}`);if(C.scheme&&!i.test(C.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(C.path){if(C.authority){if(!a.test(C.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(o.test(C.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}const u="",c="/",f=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class d{constructor(A,F,M,T,P,V=!1){vt(this,"scheme");vt(this,"authority");vt(this,"path");vt(this,"query");vt(this,"fragment");typeof A=="object"?(this.scheme=A.scheme||u,this.authority=A.authority||u,this.path=A.path||u,this.query=A.query||u,this.fragment=A.fragment||u):(this.scheme=(function(H,K){return H||K?H:"file"})(A,V),this.authority=F||u,this.path=(function(H,K){switch(H){case"https":case"http":case"file":K?K[0]!==c&&(K=c+K):K=c}return K})(this.scheme,M||u),this.query=T||u,this.fragment=P||u,l(this,V))}static isUri(A){return A instanceof d||!!A&&typeof A.authority=="string"&&typeof A.fragment=="string"&&typeof A.path=="string"&&typeof A.query=="string"&&typeof A.scheme=="string"&&typeof A.fsPath=="string"&&typeof A.with=="function"&&typeof A.toString=="function"}get fsPath(){return k(this)}with(A){if(!A)return this;let{scheme:F,authority:M,path:T,query:P,fragment:V}=A;return F===void 0?F=this.scheme:F===null&&(F=u),M===void 0?M=this.authority:M===null&&(M=u),T===void 0?T=this.path:T===null&&(T=u),P===void 0?P=this.query:P===null&&(P=u),V===void 0?V=this.fragment:V===null&&(V=u),F===this.scheme&&M===this.authority&&T===this.path&&P===this.query&&V===this.fragment?this:new D(F,M,T,P,V)}static parse(A,F=!1){const M=f.exec(A);return M?new D(M[2]||u,g(M[4]||u),g(M[5]||u),g(M[7]||u),g(M[9]||u),F):new D(u,u,u,u,u)}static file(A){let F=u;if(s&&(A=A.replace(/\\/g,c)),A[0]===c&&A[1]===c){const M=A.indexOf(c,2);M===-1?(F=A.substring(2),A=c):(F=A.substring(2,M),A=A.substring(M)||c)}return new D("file",F,A,u,u)}static from(A){const F=new D(A.scheme,A.authority,A.path,A.query,A.fragment);return l(F,!0),F}toString(A=!1){return b(this,A)}toJSON(){return this}static revive(A){if(A){if(A instanceof d)return A;{const F=new D(A);return F._formatted=A.external,F._fsPath=A._sep===y?A.fsPath:null,F}}return A}}const y=s?1:void 0;class D extends d{constructor(){super(...arguments);vt(this,"_formatted",null);vt(this,"_fsPath",null)}get fsPath(){return this._fsPath||(this._fsPath=k(this)),this._fsPath}toString(F=!1){return F?b(this,!0):(this._formatted||(this._formatted=b(this,!1)),this._formatted)}toJSON(){const F={$mid:1};return this._fsPath&&(F.fsPath=this._fsPath,F._sep=y),this._formatted&&(F.external=this._formatted),this.path&&(F.path=this.path),this.scheme&&(F.scheme=this.scheme),this.authority&&(F.authority=this.authority),this.query&&(F.query=this.query),this.fragment&&(F.fragment=this.fragment),F}}const S={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 N(C,A,F){let M,T=-1;for(let P=0;P<C.length;P++){const V=C.charCodeAt(P);if(V>=97&&V<=122||V>=65&&V<=90||V>=48&&V<=57||V===45||V===46||V===95||V===126||A&&V===47||F&&V===91||F&&V===93||F&&V===58)T!==-1&&(M+=encodeURIComponent(C.substring(T,P)),T=-1),M!==void 0&&(M+=C.charAt(P));else{M===void 0&&(M=C.substr(0,P));const H=S[V];H!==void 0?(T!==-1&&(M+=encodeURIComponent(C.substring(T,P)),T=-1),M+=H):T===-1&&(T=P)}}return T!==-1&&(M+=encodeURIComponent(C.substring(T))),M!==void 0?M:C}function x(C){let A;for(let F=0;F<C.length;F++){const M=C.charCodeAt(F);M===35||M===63?(A===void 0&&(A=C.substr(0,F)),A+=S[M]):A!==void 0&&(A+=C[F])}return A!==void 0?A:C}function k(C,A){let F;return F=C.authority&&C.path.length>1&&C.scheme==="file"?`//${C.authority}${C.path}`:C.path.charCodeAt(0)===47&&(C.path.charCodeAt(1)>=65&&C.path.charCodeAt(1)<=90||C.path.charCodeAt(1)>=97&&C.path.charCodeAt(1)<=122)&&C.path.charCodeAt(2)===58?C.path[1].toLowerCase()+C.path.substr(2):C.path,s&&(F=F.replace(/\//g,"\\")),F}function b(C,A){const F=A?x:N;let M="",{scheme:T,authority:P,path:V,query:H,fragment:K}=C;if(T&&(M+=T,M+=":"),(P||T==="file")&&(M+=c,M+=c),P){let J=P.indexOf("@");if(J!==-1){const $=P.substr(0,J);P=P.substr(J+1),J=$.lastIndexOf(":"),J===-1?M+=F($,!1,!1):(M+=F($.substr(0,J),!1,!1),M+=":",M+=F($.substr(J+1),!1,!0)),M+="@"}P=P.toLowerCase(),J=P.lastIndexOf(":"),J===-1?M+=F(P,!1,!0):(M+=F(P.substr(0,J),!1,!0),M+=P.substr(J))}if(V){if(V.length>=3&&V.charCodeAt(0)===47&&V.charCodeAt(2)===58){const J=V.charCodeAt(1);J>=65&&J<=90&&(V=`/${String.fromCharCode(J+32)}:${V.substr(3)}`)}else if(V.length>=2&&V.charCodeAt(1)===58){const J=V.charCodeAt(0);J>=65&&J<=90&&(V=`${String.fromCharCode(J+32)}:${V.substr(2)}`)}M+=F(V,!0,!1)}return H&&(M+="?",M+=F(H,!1,!1)),K&&(M+="#",M+=A?K:N(K,!1,!1)),M}function w(C){try{return decodeURIComponent(C)}catch{return C.length>3?C.substr(0,3)+w(C.substr(3)):C}}const h=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function g(C){return C.match(h)?C.replace(h,(A=>w(A))):C}var m=n(975);const E=m.posix||m,v="/";var L;(function(C){C.joinPath=function(A,...F){return A.with({path:E.join(A.path,...F)})},C.resolvePath=function(A,...F){let M=A.path,T=!1;M[0]!==v&&(M=v+M,T=!0);let P=E.resolve(M,...F);return T&&P[0]===v&&!A.authority&&(P=P.substring(1)),A.with({path:P})},C.dirname=function(A){if(A.path.length===0||A.path===v)return A;let F=E.dirname(A.path);return F.length===1&&F.charCodeAt(0)===46&&(F=""),A.with({path:F})},C.basename=function(A){return E.basename(A.path)},C.extname=function(A){return E.extname(A.path)}})(L||(L={})),Ah=r})();const{URI:mt,Utils:B6}=Ah;var xh;(function(e){function t(n){return typeof n=="string"}e.is=t})(xh||(xh={}));var Vo;(function(e){function t(n){return typeof n=="string"}e.is=t})(Vo||(Vo={}));var Nh;(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function t(n){return typeof n=="number"&&e.MIN_VALUE<=n&&n<=e.MAX_VALUE}e.is=t})(Nh||(Nh={}));var _i;(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function t(n){return typeof n=="number"&&e.MIN_VALUE<=n&&n<=e.MAX_VALUE}e.is=t})(_i||(_i={}));var We;(function(e){function t(r,s){return r===Number.MAX_VALUE&&(r=_i.MAX_VALUE),s===Number.MAX_VALUE&&(s=_i.MAX_VALUE),{line:r,character:s}}e.create=t;function n(r){let s=r;return q.objectLiteral(s)&&q.uinteger(s.line)&&q.uinteger(s.character)}e.is=n})(We||(We={}));var ie;(function(e){function t(r,s,i,a){if(q.uinteger(r)&&q.uinteger(s)&&q.uinteger(i)&&q.uinteger(a))return{start:We.create(r,s),end:We.create(i,a)};if(We.is(r)&&We.is(s))return{start:r,end:s};throw new Error(`Range#create called with invalid arguments[${r}, ${s}, ${i}, ${a}]`)}e.create=t;function n(r){let s=r;return q.objectLiteral(s)&&We.is(s.start)&&We.is(s.end)}e.is=n})(ie||(ie={}));var Br;(function(e){function t(r,s){return{uri:r,range:s}}e.create=t;function n(r){let s=r;return q.objectLiteral(s)&&ie.is(s.range)&&(q.string(s.uri)||q.undefined(s.uri))}e.is=n})(Br||(Br={}));var jo;(function(e){function t(r,s,i,a){return{targetUri:r,targetRange:s,targetSelectionRange:i,originSelectionRange:a}}e.create=t;function n(r){let s=r;return q.objectLiteral(s)&&ie.is(s.targetRange)&&q.string(s.targetUri)&&ie.is(s.targetSelectionRange)&&(ie.is(s.originSelectionRange)||q.undefined(s.originSelectionRange))}e.is=n})(jo||(jo={}));var Uo;(function(e){function t(r,s,i,a){return{red:r,green:s,blue:i,alpha:a}}e.create=t;function n(r){const s=r;return q.objectLiteral(s)&&q.numberRange(s.red,0,1)&&q.numberRange(s.green,0,1)&&q.numberRange(s.blue,0,1)&&q.numberRange(s.alpha,0,1)}e.is=n})(Uo||(Uo={}));var Lh;(function(e){function t(r,s){return{range:r,color:s}}e.create=t;function n(r){const s=r;return q.objectLiteral(s)&&ie.is(s.range)&&Uo.is(s.color)}e.is=n})(Lh||(Lh={}));var kh;(function(e){function t(r,s,i){return{label:r,textEdit:s,additionalTextEdits:i}}e.create=t;function n(r){const s=r;return q.objectLiteral(s)&&q.string(s.label)&&(q.undefined(s.textEdit)||_e.is(s))&&(q.undefined(s.additionalTextEdits)||q.typedArray(s.additionalTextEdits,_e.is))}e.is=n})(kh||(kh={}));var Ch;(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(Ch||(Ch={}));var qo;(function(e){function t(r,s,i,a,o,l){const u={startLine:r,endLine:s};return q.defined(i)&&(u.startCharacter=i),q.defined(a)&&(u.endCharacter=a),q.defined(o)&&(u.kind=o),q.defined(l)&&(u.collapsedText=l),u}e.create=t;function n(r){const s=r;return q.objectLiteral(s)&&q.uinteger(s.startLine)&&q.uinteger(s.startLine)&&(q.undefined(s.startCharacter)||q.uinteger(s.startCharacter))&&(q.undefined(s.endCharacter)||q.uinteger(s.endCharacter))&&(q.undefined(s.kind)||q.string(s.kind))}e.is=n})(qo||(qo={}));var Wo;(function(e){function t(r,s){return{location:r,message:s}}e.create=t;function n(r){let s=r;return q.defined(s)&&Br.is(s.location)&&q.string(s.message)}e.is=n})(Wo||(Wo={}));var ce;(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(ce||(ce={}));var Ho;(function(e){e.Unnecessary=1,e.Deprecated=2})(Ho||(Ho={}));var Fh;(function(e){function t(n){const r=n;return q.objectLiteral(r)&&q.string(r.href)}e.is=t})(Fh||(Fh={}));var pt;(function(e){function t(r,s,i,a,o,l){let u={range:r,message:s};return q.defined(i)&&(u.severity=i),q.defined(a)&&(u.code=a),q.defined(o)&&(u.source=o),q.defined(l)&&(u.relatedInformation=l),u}e.create=t;function n(r){var s;let i=r;return q.defined(i)&&ie.is(i.range)&&q.string(i.message)&&(q.number(i.severity)||q.undefined(i.severity))&&(q.integer(i.code)||q.string(i.code)||q.undefined(i.code))&&(q.undefined(i.codeDescription)||q.string((s=i.codeDescription)===null||s===void 0?void 0:s.href))&&(q.string(i.source)||q.undefined(i.source))&&(q.undefined(i.relatedInformation)||q.typedArray(i.relatedInformation,Wo.is))}e.is=n})(pt||(pt={}));var Gn;(function(e){function t(r,s,...i){let a={title:r,command:s};return q.defined(i)&&i.length>0&&(a.arguments=i),a}e.create=t;function n(r){let s=r;return q.defined(s)&&q.string(s.title)&&q.string(s.command)}e.is=n})(Gn||(Gn={}));var _e;(function(e){function t(i,a){return{range:i,newText:a}}e.replace=t;function n(i,a){return{range:{start:i,end:i},newText:a}}e.insert=n;function r(i){return{range:i,newText:""}}e.del=r;function s(i){const a=i;return q.objectLiteral(a)&&q.string(a.newText)&&ie.is(a.range)}e.is=s})(_e||(_e={}));var Yo;(function(e){function t(r,s,i){const a={label:r};return s!==void 0&&(a.needsConfirmation=s),i!==void 0&&(a.description=i),a}e.create=t;function n(r){const s=r;return q.objectLiteral(s)&&q.string(s.label)&&(q.boolean(s.needsConfirmation)||s.needsConfirmation===void 0)&&(q.string(s.description)||s.description===void 0)}e.is=n})(Yo||(Yo={}));var Vr;(function(e){function t(n){const r=n;return q.string(r)}e.is=t})(Vr||(Vr={}));var _h;(function(e){function t(i,a,o){return{range:i,newText:a,annotationId:o}}e.replace=t;function n(i,a,o){return{range:{start:i,end:i},newText:a,annotationId:o}}e.insert=n;function r(i,a){return{range:i,newText:"",annotationId:a}}e.del=r;function s(i){const a=i;return _e.is(a)&&(Yo.is(a.annotationId)||Vr.is(a.annotationId))}e.is=s})(_h||(_h={}));var zo;(function(e){function t(r,s){return{textDocument:r,edits:s}}e.create=t;function n(r){let s=r;return q.defined(s)&&Xo.is(s.textDocument)&&Array.isArray(s.edits)}e.is=n})(zo||(zo={}));var Go;(function(e){function t(r,s,i){let a={kind:"create",uri:r};return s!==void 0&&(s.overwrite!==void 0||s.ignoreIfExists!==void 0)&&(a.options=s),i!==void 0&&(a.annotationId=i),a}e.create=t;function n(r){let s=r;return s&&s.kind==="create"&&q.string(s.uri)&&(s.options===void 0||(s.options.overwrite===void 0||q.boolean(s.options.overwrite))&&(s.options.ignoreIfExists===void 0||q.boolean(s.options.ignoreIfExists)))&&(s.annotationId===void 0||Vr.is(s.annotationId))}e.is=n})(Go||(Go={}));var Jo;(function(e){function t(r,s,i,a){let o={kind:"rename",oldUri:r,newUri:s};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(o.options=i),a!==void 0&&(o.annotationId=a),o}e.create=t;function n(r){let s=r;return s&&s.kind==="rename"&&q.string(s.oldUri)&&q.string(s.newUri)&&(s.options===void 0||(s.options.overwrite===void 0||q.boolean(s.options.overwrite))&&(s.options.ignoreIfExists===void 0||q.boolean(s.options.ignoreIfExists)))&&(s.annotationId===void 0||Vr.is(s.annotationId))}e.is=n})(Jo||(Jo={}));var Qo;(function(e){function t(r,s,i){let a={kind:"delete",uri:r};return s!==void 0&&(s.recursive!==void 0||s.ignoreIfNotExists!==void 0)&&(a.options=s),i!==void 0&&(a.annotationId=i),a}e.create=t;function n(r){let s=r;return s&&s.kind==="delete"&&q.string(s.uri)&&(s.options===void 0||(s.options.recursive===void 0||q.boolean(s.options.recursive))&&(s.options.ignoreIfNotExists===void 0||q.boolean(s.options.ignoreIfNotExists)))&&(s.annotationId===void 0||Vr.is(s.annotationId))}e.is=n})(Qo||(Qo={}));var Ko;(function(e){function t(n){let r=n;return r&&(r.changes!==void 0||r.documentChanges!==void 0)&&(r.documentChanges===void 0||r.documentChanges.every(s=>q.string(s.kind)?Go.is(s)||Jo.is(s)||Qo.is(s):zo.is(s)))}e.is=t})(Ko||(Ko={}));var Th;(function(e){function t(r){return{uri:r}}e.create=t;function n(r){let s=r;return q.defined(s)&&q.string(s.uri)}e.is=n})(Th||(Th={}));var Mh;(function(e){function t(r,s){return{uri:r,version:s}}e.create=t;function n(r){let s=r;return q.defined(s)&&q.string(s.uri)&&q.integer(s.version)}e.is=n})(Mh||(Mh={}));var Xo;(function(e){function t(r,s){return{uri:r,version:s}}e.create=t;function n(r){let s=r;return q.defined(s)&&q.string(s.uri)&&(s.version===null||q.integer(s.version))}e.is=n})(Xo||(Xo={}));var Oh;(function(e){function t(r,s,i,a){return{uri:r,languageId:s,version:i,text:a}}e.create=t;function n(r){let s=r;return q.defined(s)&&q.string(s.uri)&&q.string(s.languageId)&&q.integer(s.version)&&q.string(s.text)}e.is=n})(Oh||(Oh={}));var un;(function(e){e.PlainText="plaintext",e.Markdown="markdown";function t(n){const r=n;return r===e.PlainText||r===e.Markdown}e.is=t})(un||(un={}));var Ms;(function(e){function t(n){const r=n;return q.objectLiteral(n)&&un.is(r.kind)&&q.string(r.value)}e.is=t})(Ms||(Ms={}));var gt;(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(gt||(gt={}));var Je;(function(e){e.PlainText=1,e.Snippet=2})(Je||(Je={}));var Rh;(function(e){e.Deprecated=1})(Rh||(Rh={}));var Ph;(function(e){function t(r,s,i){return{newText:r,insert:s,replace:i}}e.create=t;function n(r){const s=r;return s&&q.string(s.newText)&&ie.is(s.insert)&&ie.is(s.replace)}e.is=n})(Ph||(Ph={}));var Zo;(function(e){e.asIs=1,e.adjustIndentation=2})(Zo||(Zo={}));var Ih;(function(e){function t(n){const r=n;return r&&(q.string(r.detail)||r.detail===void 0)&&(q.string(r.description)||r.description===void 0)}e.is=t})(Ih||(Ih={}));var el;(function(e){function t(n){return{label:n}}e.create=t})(el||(el={}));var tl;(function(e){function t(n,r){return{items:n||[],isIncomplete:!!r}}e.create=t})(tl||(tl={}));var Ti;(function(e){function t(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}e.fromPlainText=t;function n(r){const s=r;return q.string(s)||q.objectLiteral(s)&&q.string(s.language)&&q.string(s.value)}e.is=n})(Ti||(Ti={}));var $h;(function(e){function t(n){let r=n;return!!r&&q.objectLiteral(r)&&(Ms.is(r.contents)||Ti.is(r.contents)||q.typedArray(r.contents,Ti.is))&&(n.range===void 0||ie.is(n.range))}e.is=t})($h||($h={}));var Bh;(function(e){function t(n,r){return r?{label:n,documentation:r}:{label:n}}e.create=t})(Bh||(Bh={}));var Vh;(function(e){function t(n,r,...s){let i={label:n};return q.defined(r)&&(i.documentation=r),q.defined(s)?i.parameters=s:i.parameters=[],i}e.create=t})(Vh||(Vh={}));var jh;(function(e){e.Text=1,e.Read=2,e.Write=3})(jh||(jh={}));var Uh;(function(e){function t(n,r){let s={range:n};return q.number(r)&&(s.kind=r),s}e.create=t})(Uh||(Uh={}));var Ht;(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(Ht||(Ht={}));var qh;(function(e){e.Deprecated=1})(qh||(qh={}));var Wh;(function(e){function t(n,r,s,i,a){let o={name:n,kind:r,location:{uri:i,range:s}};return a&&(o.containerName=a),o}e.create=t})(Wh||(Wh={}));var Hh;(function(e){function t(n,r,s,i){return i!==void 0?{name:n,kind:r,location:{uri:s,range:i}}:{name:n,kind:r,location:{uri:s}}}e.create=t})(Hh||(Hh={}));var Yh;(function(e){function t(r,s,i,a,o,l){let u={name:r,detail:s,kind:i,range:a,selectionRange:o};return l!==void 0&&(u.children=l),u}e.create=t;function n(r){let s=r;return s&&q.string(s.name)&&q.number(s.kind)&&ie.is(s.range)&&ie.is(s.selectionRange)&&(s.detail===void 0||q.string(s.detail))&&(s.deprecated===void 0||q.boolean(s.deprecated))&&(s.children===void 0||Array.isArray(s.children))&&(s.tags===void 0||Array.isArray(s.tags))}e.is=n})(Yh||(Yh={}));var cn;(function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"})(cn||(cn={}));var Mi;(function(e){e.Invoked=1,e.Automatic=2})(Mi||(Mi={}));var zh;(function(e){function t(r,s,i){let a={diagnostics:r};return s!=null&&(a.only=s),i!=null&&(a.triggerKind=i),a}e.create=t;function n(r){let s=r;return q.defined(s)&&q.typedArray(s.diagnostics,pt.is)&&(s.only===void 0||q.typedArray(s.only,q.string))&&(s.triggerKind===void 0||s.triggerKind===Mi.Invoked||s.triggerKind===Mi.Automatic)}e.is=n})(zh||(zh={}));var Yt;(function(e){function t(r,s,i){let a={title:r},o=!0;return typeof s=="string"?(o=!1,a.kind=s):Gn.is(s)?a.command=s:a.edit=s,o&&i!==void 0&&(a.kind=i),a}e.create=t;function n(r){let s=r;return s&&q.string(s.title)&&(s.diagnostics===void 0||q.typedArray(s.diagnostics,pt.is))&&(s.kind===void 0||q.string(s.kind))&&(s.edit!==void 0||s.command!==void 0)&&(s.command===void 0||Gn.is(s.command))&&(s.isPreferred===void 0||q.boolean(s.isPreferred))&&(s.edit===void 0||Ko.is(s.edit))}e.is=n})(Yt||(Yt={}));var nl;(function(e){function t(r,s){let i={range:r};return q.defined(s)&&(i.data=s),i}e.create=t;function n(r){let s=r;return q.defined(s)&&ie.is(s.range)&&(q.undefined(s.command)||Gn.is(s.command))}e.is=n})(nl||(nl={}));var Gh;(function(e){function t(r,s){return{tabSize:r,insertSpaces:s}}e.create=t;function n(r){let s=r;return q.defined(s)&&q.uinteger(s.tabSize)&&q.boolean(s.insertSpaces)}e.is=n})(Gh||(Gh={}));var Jh;(function(e){function t(r,s,i){return{range:r,target:s,data:i}}e.create=t;function n(r){let s=r;return q.defined(s)&&ie.is(s.range)&&(q.undefined(s.target)||q.string(s.target))}e.is=n})(Jh||(Jh={}));var Oi;(function(e){function t(r,s){return{range:r,parent:s}}e.create=t;function n(r){let s=r;return q.objectLiteral(s)&&ie.is(s.range)&&(s.parent===void 0||e.is(s.parent))}e.is=n})(Oi||(Oi={}));var Qh;(function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator"})(Qh||(Qh={}));var Kh;(function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"})(Kh||(Kh={}));var Xh;(function(e){function t(n){const r=n;return q.objectLiteral(r)&&(r.resultId===void 0||typeof r.resultId=="string")&&Array.isArray(r.data)&&(r.data.length===0||typeof r.data[0]=="number")}e.is=t})(Xh||(Xh={}));var Zh;(function(e){function t(r,s){return{range:r,text:s}}e.create=t;function n(r){const s=r;return s!=null&&ie.is(s.range)&&q.string(s.text)}e.is=n})(Zh||(Zh={}));var ed;(function(e){function t(r,s,i){return{range:r,variableName:s,caseSensitiveLookup:i}}e.create=t;function n(r){const s=r;return s!=null&&ie.is(s.range)&&q.boolean(s.caseSensitiveLookup)&&(q.string(s.variableName)||s.variableName===void 0)}e.is=n})(ed||(ed={}));var td;(function(e){function t(r,s){return{range:r,expression:s}}e.create=t;function n(r){const s=r;return s!=null&&ie.is(s.range)&&(q.string(s.expression)||s.expression===void 0)}e.is=n})(td||(td={}));var nd;(function(e){function t(r,s){return{frameId:r,stoppedLocation:s}}e.create=t;function n(r){const s=r;return q.defined(s)&&ie.is(r.stoppedLocation)}e.is=n})(nd||(nd={}));var rl;(function(e){e.Type=1,e.Parameter=2;function t(n){return n===1||n===2}e.is=t})(rl||(rl={}));var sl;(function(e){function t(r){return{value:r}}e.create=t;function n(r){const s=r;return q.objectLiteral(s)&&(s.tooltip===void 0||q.string(s.tooltip)||Ms.is(s.tooltip))&&(s.location===void 0||Br.is(s.location))&&(s.command===void 0||Gn.is(s.command))}e.is=n})(sl||(sl={}));var rd;(function(e){function t(r,s,i){const a={position:r,label:s};return i!==void 0&&(a.kind=i),a}e.create=t;function n(r){const s=r;return q.objectLiteral(s)&&We.is(s.position)&&(q.string(s.label)||q.typedArray(s.label,sl.is))&&(s.kind===void 0||rl.is(s.kind))&&s.textEdits===void 0||q.typedArray(s.textEdits,_e.is)&&(s.tooltip===void 0||q.string(s.tooltip)||Ms.is(s.tooltip))&&(s.paddingLeft===void 0||q.boolean(s.paddingLeft))&&(s.paddingRight===void 0||q.boolean(s.paddingRight))}e.is=n})(rd||(rd={}));var sd;(function(e){function t(n){return{kind:"snippet",value:n}}e.createSnippet=t})(sd||(sd={}));var id;(function(e){function t(n,r,s,i){return{insertText:n,filterText:r,range:s,command:i}}e.create=t})(id||(id={}));var ad;(function(e){function t(n){return{items:n}}e.create=t})(ad||(ad={}));var od;(function(e){e.Invoked=0,e.Automatic=1})(od||(od={}));var ld;(function(e){function t(n,r){return{range:n,text:r}}e.create=t})(ld||(ld={}));var ud;(function(e){function t(n,r){return{triggerKind:n,selectedCompletionInfo:r}}e.create=t})(ud||(ud={}));var cd;(function(e){function t(n){const r=n;return q.objectLiteral(r)&&Vo.is(r.uri)&&q.string(r.name)}e.is=t})(cd||(cd={}));var fd;(function(e){function t(i,a,o,l){return new g2(i,a,o,l)}e.create=t;function n(i){let a=i;return!!(q.defined(a)&&q.string(a.uri)&&(q.undefined(a.languageId)||q.string(a.languageId))&&q.uinteger(a.lineCount)&&q.func(a.getText)&&q.func(a.positionAt)&&q.func(a.offsetAt))}e.is=n;function r(i,a){let o=i.getText(),l=s(a,(c,f)=>{let d=c.range.start.line-f.range.start.line;return d===0?c.range.start.character-f.range.start.character:d}),u=o.length;for(let c=l.length-1;c>=0;c--){let f=l[c],d=i.offsetAt(f.range.start),y=i.offsetAt(f.range.end);if(y<=u)o=o.substring(0,d)+f.newText+o.substring(y,o.length);else throw new Error("Overlapping edit");u=d}return o}e.applyEdits=r;function s(i,a){if(i.length<=1)return i;const o=i.length/2|0,l=i.slice(0,o),u=i.slice(o);s(l,a),s(u,a);let c=0,f=0,d=0;for(;c<l.length&&f<u.length;)a(l[c],u[f])<=0?i[d++]=l[c++]:i[d++]=u[f++];for(;c<l.length;)i[d++]=l[c++];for(;f<u.length;)i[d++]=u[f++];return i}})(fd||(fd={}));class g2{constructor(t,n,r,s){this._uri=t,this._languageId=n,this._version=r,this._content=s,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(t){if(t){let n=this.offsetAt(t.start),r=this.offsetAt(t.end);return this._content.substring(n,r)}return this._content}update(t,n){this._content=t.text,this._version=n,this._lineOffsets=void 0}getLineOffsets(){if(this._lineOffsets===void 0){let t=[],n=this._content,r=!0;for(let s=0;s<n.length;s++){r&&(t.push(s),r=!1);let i=n.charAt(s);r=i==="\r"||i===`
|
|
33
|
+
`,i==="\r"&&s+1<n.length&&n.charAt(s+1)===`
|
|
34
|
+
`&&s++}r&&n.length>0&&t.push(n.length),this._lineOffsets=t}return this._lineOffsets}positionAt(t){t=Math.max(Math.min(t,this._content.length),0);let n=this.getLineOffsets(),r=0,s=n.length;if(s===0)return We.create(0,t);for(;r<s;){let a=Math.floor((r+s)/2);n[a]>t?s=a:r=a+1}let i=r-1;return We.create(i,t-n[i])}offsetAt(t){let n=this.getLineOffsets();if(t.line>=n.length)return this._content.length;if(t.line<0)return 0;let r=n[t.line],s=t.line+1<n.length?n[t.line+1]:this._content.length;return Math.max(Math.min(r+t.character,s),r)}get lineCount(){return this.getLineOffsets().length}}var q;(function(e){const t=Object.prototype.toString;function n(y){return typeof y<"u"}e.defined=n;function r(y){return typeof y>"u"}e.undefined=r;function s(y){return y===!0||y===!1}e.boolean=s;function i(y){return t.call(y)==="[object String]"}e.string=i;function a(y){return t.call(y)==="[object Number]"}e.number=a;function o(y,D,S){return t.call(y)==="[object Number]"&&D<=y&&y<=S}e.numberRange=o;function l(y){return t.call(y)==="[object Number]"&&-2147483648<=y&&y<=2147483647}e.integer=l;function u(y){return t.call(y)==="[object Number]"&&0<=y&&y<=2147483647}e.uinteger=u;function c(y){return t.call(y)==="[object Function]"}e.func=c;function f(y){return y!==null&&typeof y=="object"}e.objectLiteral=f;function d(y,D){return Array.isArray(y)&&y.every(D)}e.typedArray=d})(q||(q={}));const il=Symbol.for("yaml.alias"),al=Symbol.for("yaml.document"),Fn=Symbol.for("yaml.map"),hd=Symbol.for("yaml.pair"),zt=Symbol.for("yaml.scalar"),jr=Symbol.for("yaml.seq"),At=Symbol.for("yaml.node.type"),Rt=e=>!!e&&typeof e=="object"&&e[At]===il,Ur=e=>!!e&&typeof e=="object"&&e[At]===al,Ie=e=>!!e&&typeof e=="object"&&e[At]===Fn,Se=e=>!!e&&typeof e=="object"&&e[At]===hd,ae=e=>!!e&&typeof e=="object"&&e[At]===zt,$e=e=>!!e&&typeof e=="object"&&e[At]===jr;function Pe(e){if(e&&typeof e=="object")switch(e[At]){case Fn:case jr:return!0}return!1}function ve(e){if(e&&typeof e=="object")switch(e[At]){case il:case Fn:case zt:case jr:return!0}return!1}const dd=e=>(ae(e)||Pe(e))&&!!e.anchor,Jn=Symbol("break visit"),y2=Symbol("skip children"),Os=Symbol("remove node");function Te(e,t){const n=b2(t);Ur(e)?qr(null,e.contents,n,Object.freeze([e]))===Os&&(e.contents=null):qr(null,e,n,Object.freeze([]))}Te.BREAK=Jn,Te.SKIP=y2,Te.REMOVE=Os;function qr(e,t,n,r){const s=w2(e,t,n,r);if(ve(s)||Se(s))return v2(e,r,s),qr(e,s,n,r);if(typeof s!="symbol"){if(Pe(t)){r=Object.freeze(r.concat(t));for(let i=0;i<t.items.length;++i){const a=qr(i,t.items[i],n,r);if(typeof a=="number")i=a-1;else{if(a===Jn)return Jn;a===Os&&(t.items.splice(i,1),i-=1)}}}else if(Se(t)){r=Object.freeze(r.concat(t));const i=qr("key",t.key,n,r);if(i===Jn)return Jn;i===Os&&(t.key=null);const a=qr("value",t.value,n,r);if(a===Jn)return Jn;a===Os&&(t.value=null)}}return s}function b2(e){return typeof e=="object"&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function w2(e,t,n,r){var s,i,a,o,l;if(typeof n=="function")return n(e,t,r);if(Ie(t))return(s=n.Map)==null?void 0:s.call(n,e,t,r);if($e(t))return(i=n.Seq)==null?void 0:i.call(n,e,t,r);if(Se(t))return(a=n.Pair)==null?void 0:a.call(n,e,t,r);if(ae(t))return(o=n.Scalar)==null?void 0:o.call(n,e,t,r);if(Rt(t))return(l=n.Alias)==null?void 0:l.call(n,e,t,r)}function v2(e,t,n){const r=t[t.length-1];if(Pe(r))r.items[e]=n;else if(Se(r))e==="key"?r.key=n:r.value=n;else if(Ur(r))r.contents=n;else{const s=Rt(r)?"alias":"scalar";throw new Error(`Cannot replace node with ${s} parent`)}}const D2={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},S2=e=>e.replace(/[!,[\]{}]/g,t=>D2[t]);class Xe{constructor(t,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},Xe.defaultYaml,t),this.tags=Object.assign({},Xe.defaultTags,n)}clone(){const t=new Xe(this.yaml,this.tags);return t.docStart=this.docStart,t}atDocument(){const t=new Xe(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:Xe.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},Xe.defaultTags);break}return t}add(t,n){this.atNextDocument&&(this.yaml={explicit:Xe.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},Xe.defaultTags),this.atNextDocument=!1);const r=t.trim().split(/[ \t]+/),s=r.shift();switch(s){case"%TAG":{if(r.length!==2&&(n(0,"%TAG directive should contain exactly two parts"),r.length<2))return!1;const[i,a]=r;return this.tags[i]=a,!0}case"%YAML":{if(this.yaml.explicit=!0,r.length!==1)return n(0,"%YAML directive should contain exactly one part"),!1;const[i]=r;if(i==="1.1"||i==="1.2")return this.yaml.version=i,!0;{const a=/^\d+\.\d+$/.test(i);return n(6,`Unsupported YAML version ${i}`,a),!1}}default:return n(0,`Unknown directive ${s}`,!0),!1}}tagName(t,n){if(t==="!")return"!";if(t[0]!=="!")return n(`Not a valid tag: ${t}`),null;if(t[1]==="<"){const a=t.slice(2,-1);return a==="!"||a==="!!"?(n(`Verbatim tags aren't resolved, so ${t} is invalid.`),null):(t[t.length-1]!==">"&&n("Verbatim tags must end with a >"),a)}const[,r,s]=t.match(/^(.*!)([^!]*)$/s);s||n(`The ${t} tag has no suffix`);const i=this.tags[r];if(i)try{return i+decodeURIComponent(s)}catch(a){return n(String(a)),null}return r==="!"?t:(n(`Could not resolve tag: ${t}`),null)}tagString(t){for(const[n,r]of Object.entries(this.tags))if(t.startsWith(r))return n+S2(t.substring(r.length));return t[0]==="!"?t:`!<${t}>`}toString(t){const n=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],r=Object.entries(this.tags);let s;if(t&&r.length>0&&ve(t.contents)){const i={};Te(t.contents,(a,o)=>{ve(o)&&o.tag&&(i[o.tag]=!0)}),s=Object.keys(i)}else s=[];for(const[i,a]of r)i==="!!"&&a==="tag:yaml.org,2002:"||(!t||s.some(o=>o.startsWith(a)))&&n.push(`%TAG ${i} ${a}`);return n.join(`
|
|
35
|
+
`)}}Xe.defaultYaml={explicit:!1,version:"1.2"},Xe.defaultTags={"!!":"tag:yaml.org,2002:"};function md(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){const n=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw new Error(n)}return!0}function pd(e){const t=new Set;return Te(e,{Value(n,r){r.anchor&&t.add(r.anchor)}}),t}function gd(e,t){for(let n=1;;++n){const r=`${e}${n}`;if(!t.has(r))return r}}function E2(e,t){const n=[],r=new Map;let s=null;return{onAnchor:i=>{n.push(i),s??(s=pd(e));const a=gd(t,s);return s.add(a),a},setAnchors:()=>{for(const i of n){const a=r.get(i);if(typeof a=="object"&&a.anchor&&(ae(a.node)||Pe(a.node)))a.node.anchor=a.anchor;else{const o=new Error("Failed to resolve repeated object (this should not happen)");throw o.source=i,o}}},sourceObjects:r}}function Wr(e,t,n,r){if(r&&typeof r=="object")if(Array.isArray(r))for(let s=0,i=r.length;s<i;++s){const a=r[s],o=Wr(e,r,String(s),a);o===void 0?delete r[s]:o!==a&&(r[s]=o)}else if(r instanceof Map)for(const s of Array.from(r.keys())){const i=r.get(s),a=Wr(e,r,s,i);a===void 0?r.delete(s):a!==i&&r.set(s,a)}else if(r instanceof Set)for(const s of Array.from(r)){const i=Wr(e,r,s,s);i===void 0?r.delete(s):i!==s&&(r.delete(s),r.add(i))}else for(const[s,i]of Object.entries(r)){const a=Wr(e,r,s,i);a===void 0?delete r[s]:a!==i&&(r[s]=a)}return e.call(t,n,r)}function xt(e,t,n){if(Array.isArray(e))return e.map((r,s)=>xt(r,String(s),n));if(e&&typeof e.toJSON=="function"){if(!n||!dd(e))return e.toJSON(t,n);const r={aliasCount:0,count:1,res:void 0};n.anchors.set(e,r),n.onCreate=i=>{r.res=i,delete n.onCreate};const s=e.toJSON(t,n);return n.onCreate&&n.onCreate(s),s}return typeof e=="bigint"&&!(n!=null&&n.keep)?Number(e):e}class ol{constructor(t){Object.defineProperty(this,At,{value:t})}clone(){const t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(t.range=this.range.slice()),t}toJS(t,{mapAsMap:n,maxAliasCount:r,onAnchor:s,reviver:i}={}){if(!Ur(t))throw new TypeError("A document argument is required");const a={anchors:new Map,doc:t,keep:!0,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof r=="number"?r:100},o=xt(this,"",a);if(typeof s=="function")for(const{count:l,res:u}of a.anchors.values())s(u,l);return typeof i=="function"?Wr(i,{"":o},"",o):o}}class ll extends ol{constructor(t){super(il),this.source=t,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(t,n){let r;n!=null&&n.aliasResolveCache?r=n.aliasResolveCache:(r=[],Te(t,{Node:(i,a)=>{(Rt(a)||dd(a))&&r.push(a)}}),n&&(n.aliasResolveCache=r));let s;for(const i of r){if(i===this)break;i.anchor===this.source&&(s=i)}return s}toJSON(t,n){if(!n)return{source:this.source};const{anchors:r,doc:s,maxAliasCount:i}=n,a=this.resolve(s,n);if(!a){const l=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(l)}let o=r.get(a);if(o||(xt(a,null,n),o=r.get(a)),(o==null?void 0:o.res)===void 0){const l="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(l)}if(i>=0&&(o.count+=1,o.aliasCount===0&&(o.aliasCount=Ri(s,a,r)),o.count*o.aliasCount>i)){const l="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(l)}return o.res}toString(t,n,r){const s=`*${this.source}`;if(t){if(md(this.source),t.options.verifyAliasOrder&&!t.anchors.has(this.source)){const i=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(i)}if(t.implicitKey)return`${s} `}return s}}function Ri(e,t,n){if(Rt(t)){const r=t.resolve(e),s=n&&r&&n.get(r);return s?s.count*s.aliasCount:0}else if(Pe(t)){let r=0;for(const s of t.items){const i=Ri(e,s,n);i>r&&(r=i)}return r}else if(Se(t)){const r=Ri(e,t.key,n),s=Ri(e,t.value,n);return Math.max(r,s)}return 1}const yd=e=>!e||typeof e!="function"&&typeof e!="object";class oe extends ol{constructor(t){super(zt),this.value=t}toJSON(t,n){return n!=null&&n.keep?this.value:xt(this.value,t,n)}toString(){return String(this.value)}}oe.BLOCK_FOLDED="BLOCK_FOLDED",oe.BLOCK_LITERAL="BLOCK_LITERAL",oe.PLAIN="PLAIN",oe.QUOTE_DOUBLE="QUOTE_DOUBLE",oe.QUOTE_SINGLE="QUOTE_SINGLE";const A2="tag:yaml.org,2002:";function x2(e,t,n){if(t){const r=n.filter(i=>i.tag===t),s=r.find(i=>!i.format)??r[0];if(!s)throw new Error(`Tag ${t} not found`);return s}return n.find(r=>{var s;return((s=r.identify)==null?void 0:s.call(r,e))&&!r.format})}function Rs(e,t,n){var f,d,y;if(Ur(e)&&(e=e.contents),ve(e))return e;if(Se(e)){const D=(d=(f=n.schema[Fn]).createNode)==null?void 0:d.call(f,n.schema,null,n);return D.items.push(e),D}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<"u"&&e instanceof BigInt)&&(e=e.valueOf());const{aliasDuplicateObjects:r,onAnchor:s,onTagObj:i,schema:a,sourceObjects:o}=n;let l;if(r&&e&&typeof e=="object"){if(l=o.get(e),l)return l.anchor??(l.anchor=s(e)),new ll(l.anchor);l={anchor:null,node:null},o.set(e,l)}t!=null&&t.startsWith("!!")&&(t=A2+t.slice(2));let u=x2(e,t,a.tags);if(!u){if(e&&typeof e.toJSON=="function"&&(e=e.toJSON()),!e||typeof e!="object"){const D=new oe(e);return l&&(l.node=D),D}u=e instanceof Map?a[Fn]:Symbol.iterator in Object(e)?a[jr]:a[Fn]}i&&(i(u),delete n.onTagObj);const c=u!=null&&u.createNode?u.createNode(n.schema,e,n):typeof((y=u==null?void 0:u.nodeClass)==null?void 0:y.from)=="function"?u.nodeClass.from(n.schema,e,n):new oe(e);return t?c.tag=t:u.default||(c.tag=u.tag),l&&(l.node=c),c}function Pi(e,t,n){let r=n;for(let s=t.length-1;s>=0;--s){const i=t[s];if(typeof i=="number"&&Number.isInteger(i)&&i>=0){const a=[];a[i]=r,r=a}else r=new Map([[i,r]])}return Rs(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}const Ps=e=>e==null||typeof e=="object"&&!!e[Symbol.iterator]().next().done;class bd extends ol{constructor(t,n){super(t),Object.defineProperty(this,"schema",{value:n,configurable:!0,enumerable:!1,writable:!0})}clone(t){const n=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return t&&(n.schema=t),n.items=n.items.map(r=>ve(r)||Se(r)?r.clone(t):r),this.range&&(n.range=this.range.slice()),n}addIn(t,n){if(Ps(t))this.add(n);else{const[r,...s]=t,i=this.get(r,!0);if(Pe(i))i.addIn(s,n);else if(i===void 0&&this.schema)this.set(r,Pi(this.schema,s,n));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${s}`)}}deleteIn(t){const[n,...r]=t;if(r.length===0)return this.delete(n);const s=this.get(n,!0);if(Pe(s))return s.deleteIn(r);throw new Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}getIn(t,n){const[r,...s]=t,i=this.get(r,!0);return s.length===0?!n&&ae(i)?i.value:i:Pe(i)?i.getIn(s,n):void 0}hasAllNullValues(t){return this.items.every(n=>{if(!Se(n))return!1;const r=n.value;return r==null||t&&ae(r)&&r.value==null&&!r.commentBefore&&!r.comment&&!r.tag})}hasIn(t){const[n,...r]=t;if(r.length===0)return this.has(n);const s=this.get(n,!0);return Pe(s)?s.hasIn(r):!1}setIn(t,n){const[r,...s]=t;if(s.length===0)this.set(r,n);else{const i=this.get(r,!0);if(Pe(i))i.setIn(s,n);else if(i===void 0&&this.schema)this.set(r,Pi(this.schema,s,n));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${s}`)}}}const N2=e=>e.replace(/^(?!$)(?: $)?/gm,"#");function fn(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}const Qn=(e,t,n)=>e.endsWith(`
|
|
36
|
+
`)?fn(n,t):n.includes(`
|
|
37
|
+
`)?`
|
|
38
|
+
`+fn(n,t):(e.endsWith(" ")?"":" ")+n,wd="flow",ul="block",Ii="quoted";function $i(e,t,n="flow",{indentAtStart:r,lineWidth:s=80,minContentWidth:i=20,onFold:a,onOverflow:o}={}){if(!s||s<0)return e;s<i&&(i=0);const l=Math.max(1+i,1+s-t.length);if(e.length<=l)return e;const u=[],c={};let f=s-t.length;typeof r=="number"&&(r>s-Math.max(2,i)?u.push(0):f=s-r);let d,y,D=!1,S=-1,N=-1,x=-1;n===ul&&(S=vd(e,S,t.length),S!==-1&&(f=S+l));for(let b;b=e[S+=1];){if(n===Ii&&b==="\\"){switch(N=S,e[S+1]){case"x":S+=3;break;case"u":S+=5;break;case"U":S+=9;break;default:S+=1}x=S}if(b===`
|
|
39
|
+
`)n===ul&&(S=vd(e,S,t.length)),f=S+t.length+l,d=void 0;else{if(b===" "&&y&&y!==" "&&y!==`
|
|
40
|
+
`&&y!==" "){const w=e[S+1];w&&w!==" "&&w!==`
|
|
41
|
+
`&&w!==" "&&(d=S)}if(S>=f)if(d)u.push(d),f=d+l,d=void 0;else if(n===Ii){for(;y===" "||y===" ";)y=b,b=e[S+=1],D=!0;const w=S>x+1?S-2:N-1;if(c[w])return e;u.push(w),c[w]=!0,f=w+l,d=void 0}else D=!0}y=b}if(D&&o&&o(),u.length===0)return e;a&&a();let k=e.slice(0,u[0]);for(let b=0;b<u.length;++b){const w=u[b],h=u[b+1]||e.length;w===0?k=`
|
|
42
|
+
${t}${e.slice(0,h)}`:(n===Ii&&c[w]&&(k+=`${e[w]}\\`),k+=`
|
|
43
|
+
${t}${e.slice(w+1,h)}`)}return k}function vd(e,t,n){let r=t,s=t+1,i=e[s];for(;i===" "||i===" ";)if(t<s+n)i=e[++t];else{do i=e[++t];while(i&&i!==`
|
|
44
|
+
`);r=t,s=t+1,i=e[s]}return r}const Bi=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),Vi=e=>/^(%|---|\.\.\.)/m.test(e);function L2(e,t,n){if(!t||t<0)return!1;const r=t-n,s=e.length;if(s<=r)return!1;for(let i=0,a=0;i<s;++i)if(e[i]===`
|
|
45
|
+
`){if(i-a>r)return!0;if(a=i+1,s-a<=r)return!1}return!0}function Is(e,t){const n=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return n;const{implicitKey:r}=t,s=t.options.doubleQuotedMinMultiLineLength,i=t.indent||(Vi(e)?" ":"");let a="",o=0;for(let l=0,u=n[l];u;u=n[++l])if(u===" "&&n[l+1]==="\\"&&n[l+2]==="n"&&(a+=n.slice(o,l)+"\\ ",l+=1,o=l,u="\\"),u==="\\")switch(n[l+1]){case"u":{a+=n.slice(o,l);const c=n.substr(l+2,4);switch(c){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:c.substr(0,2)==="00"?a+="\\x"+c.substr(2):a+=n.substr(l,6)}l+=5,o=l+1}break;case"n":if(r||n[l+2]==='"'||n.length<s)l+=1;else{for(a+=n.slice(o,l)+`
|
|
46
|
+
|
|
47
|
+
`;n[l+2]==="\\"&&n[l+3]==="n"&&n[l+4]!=='"';)a+=`
|
|
48
|
+
`,l+=2;a+=i,n[l+2]===" "&&(a+="\\"),l+=1,o=l+1}break;default:l+=1}return a=o?a+n.slice(o):n,r?a:$i(a,i,Ii,Bi(t,!1))}function cl(e,t){if(t.options.singleQuote===!1||t.implicitKey&&e.includes(`
|
|
49
|
+
`)||/[ \t]\n|\n[ \t]/.test(e))return Is(e,t);const n=t.indent||(Vi(e)?" ":""),r="'"+e.replace(/'/g,"''").replace(/\n+/g,`$&
|
|
50
|
+
${n}`)+"'";return t.implicitKey?r:$i(r,n,wd,Bi(t,!1))}function Hr(e,t){const{singleQuote:n}=t.options;let r;if(n===!1)r=Is;else{const s=e.includes('"'),i=e.includes("'");s&&!i?r=cl:i&&!s?r=Is:r=n?cl:Is}return r(e,t)}let fl;try{fl=new RegExp(`(^|(?<!
|
|
51
|
+
))
|
|
52
|
+
+(?!
|
|
53
|
+
|$)`,"g")}catch{fl=/\n+(?!\n|$)/g}function ji({comment:e,type:t,value:n},r,s,i){const{blockQuote:a,commentString:o,lineWidth:l}=r.options;if(!a||/\n[\t ]+$/.test(n))return Hr(n,r);const u=r.indent||(r.forceBlockIndent||Vi(n)?" ":""),c=a==="literal"?!0:a==="folded"||t===oe.BLOCK_FOLDED?!1:t===oe.BLOCK_LITERAL?!0:!L2(n,l,u.length);if(!n)return c?`|
|
|
54
|
+
`:`>
|
|
55
|
+
`;let f,d;for(d=n.length;d>0;--d){const h=n[d-1];if(h!==`
|
|
56
|
+
`&&h!==" "&&h!==" ")break}let y=n.substring(d);const D=y.indexOf(`
|
|
57
|
+
`);D===-1?f="-":n===y||D!==y.length-1?(f="+",i&&i()):f="",y&&(n=n.slice(0,-y.length),y[y.length-1]===`
|
|
58
|
+
`&&(y=y.slice(0,-1)),y=y.replace(fl,`$&${u}`));let S=!1,N,x=-1;for(N=0;N<n.length;++N){const h=n[N];if(h===" ")S=!0;else if(h===`
|
|
59
|
+
`)x=N;else break}let k=n.substring(0,x<N?x+1:N);k&&(n=n.substring(k.length),k=k.replace(/\n+/g,`$&${u}`));let w=(S?u?"2":"1":"")+f;if(e&&(w+=" "+o(e.replace(/ ?[\r\n]+/g," ")),s&&s()),!c){const h=n.replace(/\n+/g,`
|
|
60
|
+
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${u}`);let g=!1;const m=Bi(r,!0);a!=="folded"&&t!==oe.BLOCK_FOLDED&&(m.onOverflow=()=>{g=!0});const E=$i(`${k}${h}${y}`,u,ul,m);if(!g)return`>${w}
|
|
61
|
+
${u}${E}`}return n=n.replace(/\n+/g,`$&${u}`),`|${w}
|
|
62
|
+
${u}${k}${n}${y}`}function k2(e,t,n,r){const{type:s,value:i}=e,{actualString:a,implicitKey:o,indent:l,indentStep:u,inFlow:c}=t;if(o&&i.includes(`
|
|
63
|
+
`)||c&&/[[\]{},]/.test(i))return Hr(i,t);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(i))return o||c||!i.includes(`
|
|
64
|
+
`)?Hr(i,t):ji(e,t,n,r);if(!o&&!c&&s!==oe.PLAIN&&i.includes(`
|
|
65
|
+
`))return ji(e,t,n,r);if(Vi(i)){if(l==="")return t.forceBlockIndent=!0,ji(e,t,n,r);if(o&&l===u)return Hr(i,t)}const f=i.replace(/\n+/g,`$&
|
|
66
|
+
${l}`);if(a){const d=S=>{var N;return S.default&&S.tag!=="tag:yaml.org,2002:str"&&((N=S.test)==null?void 0:N.test(f))},{compat:y,tags:D}=t.doc.schema;if(D.some(d)||y!=null&&y.some(d))return Hr(i,t)}return o?f:$i(f,l,wd,Bi(t,!1))}function hl(e,t,n,r){const{implicitKey:s,inFlow:i}=t,a=typeof e.value=="string"?e:Object.assign({},e,{value:String(e.value)});let{type:o}=e;o!==oe.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(a.value)&&(o=oe.QUOTE_DOUBLE);const l=c=>{switch(c){case oe.BLOCK_FOLDED:case oe.BLOCK_LITERAL:return s||i?Hr(a.value,t):ji(a,t,n,r);case oe.QUOTE_DOUBLE:return Is(a.value,t);case oe.QUOTE_SINGLE:return cl(a.value,t);case oe.PLAIN:return k2(a,t,n,r);default:return null}};let u=l(o);if(u===null){const{defaultKeyType:c,defaultStringType:f}=t.options,d=s&&c||f;if(u=l(d),u===null)throw new Error(`Unsupported default string type ${d}`)}return u}function Dd(e,t){const n=Object.assign({blockQuote:!0,commentString:N2,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,trailingComma:!1,trueStr:"true",verifyAliasOrder:!0},e.schema.toStringOptions,t);let r;switch(n.collectionStyle){case"block":r=!1;break;case"flow":r=!0;break;default:r=null}return{anchors:new Set,doc:e,flowCollectionPadding:n.flowCollectionPadding?" ":"",indent:"",indentStep:typeof n.indent=="number"?" ".repeat(n.indent):" ",inFlow:r,options:n}}function C2(e,t){var s;if(t.tag){const i=e.filter(a=>a.tag===t.tag);if(i.length>0)return i.find(a=>a.format===t.format)??i[0]}let n,r;if(ae(t)){r=t.value;let i=e.filter(a=>{var o;return(o=a.identify)==null?void 0:o.call(a,r)});if(i.length>1){const a=i.filter(o=>o.test);a.length>0&&(i=a)}n=i.find(a=>a.format===t.format)??i.find(a=>!a.format)}else r=t,n=e.find(i=>i.nodeClass&&r instanceof i.nodeClass);if(!n){const i=((s=r==null?void 0:r.constructor)==null?void 0:s.name)??(r===null?"null":typeof r);throw new Error(`Tag not resolved for ${i} value`)}return n}function F2(e,t,{anchors:n,doc:r}){if(!r.directives)return"";const s=[],i=(ae(e)||Pe(e))&&e.anchor;i&&md(i)&&(n.add(i),s.push(`&${i}`));const a=e.tag??(t.default?null:t.tag);return a&&s.push(r.directives.tagString(a)),s.join(" ")}function Yr(e,t,n,r){var l;if(Se(e))return e.toString(t,n,r);if(Rt(e)){if(t.doc.directives)return e.toString(t);if((l=t.resolvedAliases)!=null&&l.has(e))throw new TypeError("Cannot stringify circular structure without alias nodes");t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let s;const i=ve(e)?e:t.doc.createNode(e,{onTagObj:u=>s=u});s??(s=C2(t.doc.schema.tags,i));const a=F2(i,s,t);a.length>0&&(t.indentAtStart=(t.indentAtStart??0)+a.length+1);const o=typeof s.stringify=="function"?s.stringify(i,t,n,r):ae(i)?hl(i,t,n,r):i.toString(t,n,r);return a?ae(i)||o[0]==="{"||o[0]==="["?`${a} ${o}`:`${a}
|
|
67
|
+
${t.indent}${o}`:o}function _2({key:e,value:t},n,r,s){const{allNullValues:i,doc:a,indent:o,indentStep:l,options:{commentString:u,indentSeq:c,simpleKeys:f}}=n;let d=ve(e)&&e.comment||null;if(f){if(d)throw new Error("With simple keys, key nodes cannot have comments");if(Pe(e)||!ve(e)&&typeof e=="object"){const m="With simple keys, collection cannot be used as a key value";throw new Error(m)}}let y=!f&&(!e||d&&t==null&&!n.inFlow||Pe(e)||(ae(e)?e.type===oe.BLOCK_FOLDED||e.type===oe.BLOCK_LITERAL:typeof e=="object"));n=Object.assign({},n,{allNullValues:!1,implicitKey:!y&&(f||!i),indent:o+l});let D=!1,S=!1,N=Yr(e,n,()=>D=!0,()=>S=!0);if(!y&&!n.inFlow&&N.length>1024){if(f)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");y=!0}if(n.inFlow){if(i||t==null)return D&&r&&r(),N===""?"?":y?`? ${N}`:N}else if(i&&!f||t==null&&y)return N=`? ${N}`,d&&!D?N+=Qn(N,n.indent,u(d)):S&&s&&s(),N;D&&(d=null),y?(d&&(N+=Qn(N,n.indent,u(d))),N=`? ${N}
|
|
68
|
+
${o}:`):(N=`${N}:`,d&&(N+=Qn(N,n.indent,u(d))));let x,k,b;ve(t)?(x=!!t.spaceBefore,k=t.commentBefore,b=t.comment):(x=!1,k=null,b=null,t&&typeof t=="object"&&(t=a.createNode(t))),n.implicitKey=!1,!y&&!d&&ae(t)&&(n.indentAtStart=N.length+1),S=!1,!c&&l.length>=2&&!n.inFlow&&!y&&$e(t)&&!t.flow&&!t.tag&&!t.anchor&&(n.indent=n.indent.substring(2));let w=!1;const h=Yr(t,n,()=>w=!0,()=>S=!0);let g=" ";if(d||x||k){if(g=x?`
|
|
69
|
+
`:"",k){const m=u(k);g+=`
|
|
70
|
+
${fn(m,n.indent)}`}h===""&&!n.inFlow?g===`
|
|
71
|
+
`&&b&&(g=`
|
|
72
|
+
|
|
73
|
+
`):g+=`
|
|
74
|
+
${n.indent}`}else if(!y&&Pe(t)){const m=h[0],E=h.indexOf(`
|
|
75
|
+
`),v=E!==-1,L=n.inFlow??t.flow??t.items.length===0;if(v||!L){let C=!1;if(v&&(m==="&"||m==="!")){let A=h.indexOf(" ");m==="&"&&A!==-1&&A<E&&h[A+1]==="!"&&(A=h.indexOf(" ",A+1)),(A===-1||E<A)&&(C=!0)}C||(g=`
|
|
76
|
+
${n.indent}`)}}else(h===""||h[0]===`
|
|
77
|
+
`)&&(g="");return N+=g+h,n.inFlow?w&&r&&r():b&&!w?N+=Qn(N,n.indent,u(b)):S&&s&&s(),N}function Sd(e,t){(e==="debug"||e==="warn")&&console.warn(t)}const Ui="<<",hn={identify:e=>e===Ui||typeof e=="symbol"&&e.description===Ui,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new oe(Symbol(Ui)),{addToJSMap:Ed}),stringify:()=>Ui},T2=(e,t)=>(hn.identify(t)||ae(t)&&(!t.type||t.type===oe.PLAIN)&&hn.identify(t.value))&&(e==null?void 0:e.doc.schema.tags.some(n=>n.tag===hn.tag&&n.default));function Ed(e,t,n){if(n=e&&Rt(n)?n.resolve(e.doc):n,$e(n))for(const r of n.items)dl(e,t,r);else if(Array.isArray(n))for(const r of n)dl(e,t,r);else dl(e,t,n)}function dl(e,t,n){const r=e&&Rt(n)?n.resolve(e.doc):n;if(!Ie(r))throw new Error("Merge sources must be maps or map aliases");const s=r.toJSON(null,e,Map);for(const[i,a]of s)t instanceof Map?t.has(i)||t.set(i,a):t instanceof Set?t.add(i):Object.prototype.hasOwnProperty.call(t,i)||Object.defineProperty(t,i,{value:a,writable:!0,enumerable:!0,configurable:!0});return t}function Ad(e,t,{key:n,value:r}){if(ve(n)&&n.addToJSMap)n.addToJSMap(e,t,r);else if(T2(e,n))Ed(e,t,r);else{const s=xt(n,"",e);if(t instanceof Map)t.set(s,xt(r,s,e));else if(t instanceof Set)t.add(s);else{const i=M2(n,s,e),a=xt(r,i,e);i in t?Object.defineProperty(t,i,{value:a,writable:!0,enumerable:!0,configurable:!0}):t[i]=a}}return t}function M2(e,t,n){if(t===null)return"";if(typeof t!="object")return String(t);if(ve(e)&&(n!=null&&n.doc)){const r=Dd(n.doc,{});r.anchors=new Set;for(const i of n.anchors.keys())r.anchors.add(i.anchor);r.inFlow=!0,r.inStringifyKey=!0;const s=e.toString(r);if(!n.mapKeyWarned){let i=JSON.stringify(s);i.length>40&&(i=i.substring(0,36)+'..."'),Sd(n.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${i}. Set mapAsMap: true to use object keys.`),n.mapKeyWarned=!0}return s}return JSON.stringify(t)}function ml(e,t,n){const r=Rs(e,void 0,n),s=Rs(t,void 0,n);return new Ze(r,s)}class Ze{constructor(t,n=null){Object.defineProperty(this,At,{value:hd}),this.key=t,this.value=n}clone(t){let{key:n,value:r}=this;return ve(n)&&(n=n.clone(t)),ve(r)&&(r=r.clone(t)),new Ze(n,r)}toJSON(t,n){const r=n!=null&&n.mapAsMap?new Map:{};return Ad(n,r,this)}toString(t,n,r){return t!=null&&t.doc?_2(this,t,n,r):JSON.stringify(this)}}function xd(e,t,n){return(t.inFlow??e.flow?R2:O2)(e,t,n)}function O2({comment:e,items:t},n,{blockItemPrefix:r,flowChars:s,itemIndent:i,onChompKeep:a,onComment:o}){const{indent:l,options:{commentString:u}}=n,c=Object.assign({},n,{indent:i,type:null});let f=!1;const d=[];for(let D=0;D<t.length;++D){const S=t[D];let N=null;if(ve(S))!f&&S.spaceBefore&&d.push(""),qi(n,d,S.commentBefore,f),S.comment&&(N=S.comment);else if(Se(S)){const k=ve(S.key)?S.key:null;k&&(!f&&k.spaceBefore&&d.push(""),qi(n,d,k.commentBefore,f))}f=!1;let x=Yr(S,c,()=>N=null,()=>f=!0);N&&(x+=Qn(x,i,u(N))),f&&N&&(f=!1),d.push(r+x)}let y;if(d.length===0)y=s.start+s.end;else{y=d[0];for(let D=1;D<d.length;++D){const S=d[D];y+=S?`
|
|
78
|
+
${l}${S}`:`
|
|
79
|
+
`}}return e?(y+=`
|
|
80
|
+
`+fn(u(e),l),o&&o()):f&&a&&a(),y}function R2({items:e},t,{flowChars:n,itemIndent:r}){const{indent:s,indentStep:i,flowCollectionPadding:a,options:{commentString:o}}=t;r+=i;const l=Object.assign({},t,{indent:r,inFlow:!0,type:null});let u=!1,c=0;const f=[];for(let D=0;D<e.length;++D){const S=e[D];let N=null;if(ve(S))S.spaceBefore&&f.push(""),qi(t,f,S.commentBefore,!1),S.comment&&(N=S.comment);else if(Se(S)){const k=ve(S.key)?S.key:null;k&&(k.spaceBefore&&f.push(""),qi(t,f,k.commentBefore,!1),k.comment&&(u=!0));const b=ve(S.value)?S.value:null;b?(b.comment&&(N=b.comment),b.commentBefore&&(u=!0)):S.value==null&&(k!=null&&k.comment)&&(N=k.comment)}N&&(u=!0);let x=Yr(S,l,()=>N=null);u||(u=f.length>c||x.includes(`
|
|
81
|
+
`)),D<e.length-1?x+=",":t.options.trailingComma&&(t.options.lineWidth>0&&(u||(u=f.reduce((k,b)=>k+b.length+2,2)+(x.length+2)>t.options.lineWidth)),u&&(x+=",")),N&&(x+=Qn(x,r,o(N))),f.push(x),c=f.length}const{start:d,end:y}=n;if(f.length===0)return d+y;if(!u){const D=f.reduce((S,N)=>S+N.length+2,2);u=t.options.lineWidth>0&&D>t.options.lineWidth}if(u){let D=d;for(const S of f)D+=S?`
|
|
82
|
+
${i}${s}${S}`:`
|
|
83
|
+
`;return`${D}
|
|
84
|
+
${s}${y}`}else return`${d}${a}${f.join(" ")}${a}${y}`}function qi({indent:e,options:{commentString:t}},n,r,s){if(r&&s&&(r=r.replace(/^\n+/,"")),r){const i=fn(t(r),e);n.push(i.trimStart())}}function Kn(e,t){const n=ae(t)?t.value:t;for(const r of e)if(Se(r)&&(r.key===t||r.key===n||ae(r.key)&&r.key.value===n))return r}class Nt extends bd{static get tagName(){return"tag:yaml.org,2002:map"}constructor(t){super(Fn,t),this.items=[]}static from(t,n,r){const{keepUndefined:s,replacer:i}=r,a=new this(t),o=(l,u)=>{if(typeof i=="function")u=i.call(n,l,u);else if(Array.isArray(i)&&!i.includes(l))return;(u!==void 0||s)&&a.items.push(ml(l,u,r))};if(n instanceof Map)for(const[l,u]of n)o(l,u);else if(n&&typeof n=="object")for(const l of Object.keys(n))o(l,n[l]);return typeof t.sortMapEntries=="function"&&a.items.sort(t.sortMapEntries),a}add(t,n){var a;let r;Se(t)?r=t:!t||typeof t!="object"||!("key"in t)?r=new Ze(t,t==null?void 0:t.value):r=new Ze(t.key,t.value);const s=Kn(this.items,r.key),i=(a=this.schema)==null?void 0:a.sortMapEntries;if(s){if(!n)throw new Error(`Key ${r.key} already set`);ae(s.value)&&yd(r.value)?s.value.value=r.value:s.value=r.value}else if(i){const o=this.items.findIndex(l=>i(r,l)<0);o===-1?this.items.push(r):this.items.splice(o,0,r)}else this.items.push(r)}delete(t){const n=Kn(this.items,t);return n?this.items.splice(this.items.indexOf(n),1).length>0:!1}get(t,n){const r=Kn(this.items,t),s=r==null?void 0:r.value;return(!n&&ae(s)?s.value:s)??void 0}has(t){return!!Kn(this.items,t)}set(t,n){this.add(new Ze(t,n),!0)}toJSON(t,n,r){const s=r?new r:n!=null&&n.mapAsMap?new Map:{};n!=null&&n.onCreate&&n.onCreate(s);for(const i of this.items)Ad(n,s,i);return s}toString(t,n,r){if(!t)return JSON.stringify(this);for(const s of this.items)if(!Se(s))throw new Error(`Map items must all be pairs; found ${JSON.stringify(s)} instead`);return!t.allNullValues&&this.hasAllNullValues(!1)&&(t=Object.assign({},t,{allNullValues:!0})),xd(this,t,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:t.indent||"",onChompKeep:r,onComment:n})}}const zr={collection:"map",default:!0,nodeClass:Nt,tag:"tag:yaml.org,2002:map",resolve(e,t){return Ie(e)||t("Expected a mapping for this tag"),e},createNode:(e,t,n)=>Nt.from(e,t,n)};class Xn extends bd{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(t){super(jr,t),this.items=[]}add(t){this.items.push(t)}delete(t){const n=Wi(t);return typeof n!="number"?!1:this.items.splice(n,1).length>0}get(t,n){const r=Wi(t);if(typeof r!="number")return;const s=this.items[r];return!n&&ae(s)?s.value:s}has(t){const n=Wi(t);return typeof n=="number"&&n<this.items.length}set(t,n){const r=Wi(t);if(typeof r!="number")throw new Error(`Expected a valid index, not ${t}.`);const s=this.items[r];ae(s)&&yd(n)?s.value=n:this.items[r]=n}toJSON(t,n){const r=[];n!=null&&n.onCreate&&n.onCreate(r);let s=0;for(const i of this.items)r.push(xt(i,String(s++),n));return r}toString(t,n,r){return t?xd(this,t,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(t.indent||"")+" ",onChompKeep:r,onComment:n}):JSON.stringify(this)}static from(t,n,r){const{replacer:s}=r,i=new this(t);if(n&&Symbol.iterator in Object(n)){let a=0;for(let o of n){if(typeof s=="function"){const l=n instanceof Set?o:String(a++);o=s.call(n,l,o)}i.items.push(Rs(o,void 0,r))}}return i}}function Wi(e){let t=ae(e)?e.value:e;return t&&typeof t=="string"&&(t=Number(t)),typeof t=="number"&&Number.isInteger(t)&&t>=0?t:null}const Gr={collection:"seq",default:!0,nodeClass:Xn,tag:"tag:yaml.org,2002:seq",resolve(e,t){return $e(e)||t("Expected a sequence for this tag"),e},createNode:(e,t,n)=>Xn.from(e,t,n)},Hi={identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify(e,t,n,r){return t=Object.assign({actualString:!0},t),hl(e,t,n,r)}},Yi={identify:e=>e==null,createNode:()=>new oe(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new oe(null),stringify:({source:e},t)=>typeof e=="string"&&Yi.test.test(e)?e:t.options.nullStr},pl={identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new oe(e[0]==="t"||e[0]==="T"),stringify({source:e,value:t},n){if(e&&pl.test.test(e)){const r=e[0]==="t"||e[0]==="T";if(t===r)return e}return t?n.options.trueStr:n.options.falseStr}};function Pt({format:e,minFractionDigits:t,tag:n,value:r}){if(typeof r=="bigint")return String(r);const s=typeof r=="number"?r:Number(r);if(!isFinite(s))return isNaN(s)?".nan":s<0?"-.inf":".inf";let i=Object.is(r,-0)?"-0":JSON.stringify(r);if(!e&&t&&(!n||n==="tag:yaml.org,2002:float")&&/^\d/.test(i)){let a=i.indexOf(".");a<0&&(a=i.length,i+=".");let o=t-(i.length-a-1);for(;o-- >0;)i+="0"}return i}const Nd={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()==="nan"?NaN:e[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Pt},Ld={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),stringify(e){const t=Number(e.value);return isFinite(t)?t.toExponential():Pt(e)}},kd={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(e){const t=new oe(parseFloat(e)),n=e.indexOf(".");return n!==-1&&e[e.length-1]==="0"&&(t.minFractionDigits=e.length-n-1),t},stringify:Pt},zi=e=>typeof e=="bigint"||Number.isInteger(e),gl=(e,t,n,{intAsBigInt:r})=>r?BigInt(e):parseInt(e.substring(t),n);function Cd(e,t,n){const{value:r}=e;return zi(r)&&r>=0?n+r.toString(t):Pt(e)}const Fd={identify:e=>zi(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,n)=>gl(e,2,8,n),stringify:e=>Cd(e,8,"0o")},_d={identify:zi,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,n)=>gl(e,0,10,n),stringify:Pt},Td={identify:e=>zi(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,n)=>gl(e,2,16,n),stringify:e=>Cd(e,16,"0x")},P2=[zr,Gr,Hi,Yi,pl,Fd,_d,Td,Nd,Ld,kd];function Md(e){return typeof e=="bigint"||Number.isInteger(e)}const Gi=({value:e})=>JSON.stringify(e),I2=[{identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:Gi},{identify:e=>e==null,createNode:()=>new oe(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:Gi},{identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:e=>e==="true",stringify:Gi},{identify:Md,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:n})=>n?BigInt(e):parseInt(e,10),stringify:({value:e})=>Md(e)?e.toString():JSON.stringify(e)},{identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:Gi}],$2={default:!0,tag:"",test:/^/,resolve(e,t){return t(`Unresolved plain scalar ${JSON.stringify(e)}`),e}},B2=[zr,Gr].concat(I2,$2),yl={identify:e=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(e,t){if(typeof atob=="function"){const n=atob(e.replace(/[\n\r]/g,"")),r=new Uint8Array(n.length);for(let s=0;s<n.length;++s)r[s]=n.charCodeAt(s);return r}else return t("This environment does not support reading binary tags; either Buffer or atob is required"),e},stringify({comment:e,type:t,value:n},r,s,i){if(!n)return"";const a=n;let o;if(typeof btoa=="function"){let l="";for(let u=0;u<a.length;++u)l+=String.fromCharCode(a[u]);o=btoa(l)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(t??(t=oe.BLOCK_LITERAL),t!==oe.QUOTE_DOUBLE){const l=Math.max(r.options.lineWidth-r.indent.length,r.options.minContentWidth),u=Math.ceil(o.length/l),c=new Array(u);for(let f=0,d=0;f<u;++f,d+=l)c[f]=o.substr(d,l);o=c.join(t===oe.BLOCK_LITERAL?`
|
|
85
|
+
`:" ")}return hl({comment:e,type:t,value:o},r,s,i)}};function Od(e,t){if($e(e))for(let n=0;n<e.items.length;++n){let r=e.items[n];if(!Se(r)){if(Ie(r)){r.items.length>1&&t("Each pair must have its own sequence indicator");const s=r.items[0]||new Ze(new oe(null));if(r.commentBefore&&(s.key.commentBefore=s.key.commentBefore?`${r.commentBefore}
|
|
86
|
+
${s.key.commentBefore}`:r.commentBefore),r.comment){const i=s.value??s.key;i.comment=i.comment?`${r.comment}
|
|
87
|
+
${i.comment}`:r.comment}r=s}e.items[n]=Se(r)?r:new Ze(r)}}else t("Expected a sequence for this tag");return e}function Rd(e,t,n){const{replacer:r}=n,s=new Xn(e);s.tag="tag:yaml.org,2002:pairs";let i=0;if(t&&Symbol.iterator in Object(t))for(let a of t){typeof r=="function"&&(a=r.call(t,String(i++),a));let o,l;if(Array.isArray(a))if(a.length===2)o=a[0],l=a[1];else throw new TypeError(`Expected [key, value] tuple: ${a}`);else if(a&&a instanceof Object){const u=Object.keys(a);if(u.length===1)o=u[0],l=a[o];else throw new TypeError(`Expected tuple with one key, not ${u.length} keys`)}else o=a;s.items.push(ml(o,l,n))}return s}const bl={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:Od,createNode:Rd};class Jr extends Xn{constructor(){super(),this.add=Nt.prototype.add.bind(this),this.delete=Nt.prototype.delete.bind(this),this.get=Nt.prototype.get.bind(this),this.has=Nt.prototype.has.bind(this),this.set=Nt.prototype.set.bind(this),this.tag=Jr.tag}toJSON(t,n){if(!n)return super.toJSON(t);const r=new Map;n!=null&&n.onCreate&&n.onCreate(r);for(const s of this.items){let i,a;if(Se(s)?(i=xt(s.key,"",n),a=xt(s.value,i,n)):i=xt(s,"",n),r.has(i))throw new Error("Ordered maps must not include duplicate keys");r.set(i,a)}return r}static from(t,n,r){const s=Rd(t,n,r),i=new this;return i.items=s.items,i}}Jr.tag="tag:yaml.org,2002:omap";const wl={collection:"seq",identify:e=>e instanceof Map,nodeClass:Jr,default:!1,tag:"tag:yaml.org,2002:omap",resolve(e,t){const n=Od(e,t),r=[];for(const{key:s}of n.items)ae(s)&&(r.includes(s.value)?t(`Ordered maps must not include duplicate keys: ${s.value}`):r.push(s.value));return Object.assign(new Jr,n)},createNode:(e,t,n)=>Jr.from(e,t,n)};function Pd({value:e,source:t},n){return t&&(e?Id:$d).test.test(t)?t:e?n.options.trueStr:n.options.falseStr}const Id={identify:e=>e===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new oe(!0),stringify:Pd},$d={identify:e=>e===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new oe(!1),stringify:Pd},V2={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()==="nan"?NaN:e[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Pt},j2={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,"")),stringify(e){const t=Number(e.value);return isFinite(t)?t.toExponential():Pt(e)}},U2={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(e){const t=new oe(parseFloat(e.replace(/_/g,""))),n=e.indexOf(".");if(n!==-1){const r=e.substring(n+1).replace(/_/g,"");r[r.length-1]==="0"&&(t.minFractionDigits=r.length)}return t},stringify:Pt},$s=e=>typeof e=="bigint"||Number.isInteger(e);function Ji(e,t,n,{intAsBigInt:r}){const s=e[0];if((s==="-"||s==="+")&&(t+=1),e=e.substring(t).replace(/_/g,""),r){switch(n){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`;break}const a=BigInt(e);return s==="-"?BigInt(-1)*a:a}const i=parseInt(e,n);return s==="-"?-1*i:i}function vl(e,t,n){const{value:r}=e;if($s(r)){const s=r.toString(t);return r<0?"-"+n+s.substr(1):n+s}return Pt(e)}const q2={identify:$s,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,n)=>Ji(e,2,2,n),stringify:e=>vl(e,2,"0b")},W2={identify:$s,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,n)=>Ji(e,1,8,n),stringify:e=>vl(e,8,"0")},H2={identify:$s,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,n)=>Ji(e,0,10,n),stringify:Pt},Y2={identify:$s,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,n)=>Ji(e,2,16,n),stringify:e=>vl(e,16,"0x")};class Qr extends Nt{constructor(t){super(t),this.tag=Qr.tag}add(t){let n;Se(t)?n=t:t&&typeof t=="object"&&"key"in t&&"value"in t&&t.value===null?n=new Ze(t.key,null):n=new Ze(t,null),Kn(this.items,n.key)||this.items.push(n)}get(t,n){const r=Kn(this.items,t);return!n&&Se(r)?ae(r.key)?r.key.value:r.key:r}set(t,n){if(typeof n!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof n}`);const r=Kn(this.items,t);r&&!n?this.items.splice(this.items.indexOf(r),1):!r&&n&&this.items.push(new Ze(t))}toJSON(t,n){return super.toJSON(t,n,Set)}toString(t,n,r){if(!t)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},t,{allNullValues:!0}),n,r);throw new Error("Set items must all have null values")}static from(t,n,r){const{replacer:s}=r,i=new this(t);if(n&&Symbol.iterator in Object(n))for(let a of n)typeof s=="function"&&(a=s.call(n,a,a)),i.items.push(ml(a,null,r));return i}}Qr.tag="tag:yaml.org,2002:set";const Dl={collection:"map",identify:e=>e instanceof Set,nodeClass:Qr,default:!1,tag:"tag:yaml.org,2002:set",createNode:(e,t,n)=>Qr.from(e,t,n),resolve(e,t){if(Ie(e)){if(e.hasAllNullValues(!0))return Object.assign(new Qr,e);t("Set items must all have null values")}else t("Expected a mapping for this tag");return e}};function Sl(e,t){const n=e[0],r=n==="-"||n==="+"?e.substring(1):e,s=a=>t?BigInt(a):Number(a),i=r.replace(/_/g,"").split(":").reduce((a,o)=>a*s(60)+s(o),s(0));return n==="-"?s(-1)*i:i}function Bd(e){let{value:t}=e,n=a=>a;if(typeof t=="bigint")n=a=>BigInt(a);else if(isNaN(t)||!isFinite(t))return Pt(e);let r="";t<0&&(r="-",t*=n(-1));const s=n(60),i=[t%s];return t<60?i.unshift(0):(t=(t-i[0])/s,i.unshift(t%s),t>=60&&(t=(t-i[0])/s,i.unshift(t))),r+i.map(a=>String(a).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const Vd={identify:e=>typeof e=="bigint"||Number.isInteger(e),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(e,t,{intAsBigInt:n})=>Sl(e,n),stringify:Bd},jd={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:e=>Sl(e,!1),stringify:Bd},Qi={identify:e=>e 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(e){const t=e.match(Qi.test);if(!t)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,n,r,s,i,a,o]=t.map(Number),l=t[7]?Number((t[7]+"00").substr(1,3)):0;let u=Date.UTC(n,r-1,s,i||0,a||0,o||0,l);const c=t[8];if(c&&c!=="Z"){let f=Sl(c,!1);Math.abs(f)<30&&(f*=60),u-=6e4*f}return new Date(u)},stringify:({value:e})=>(e==null?void 0:e.toISOString().replace(/(T00:00:00)?\.000Z$/,""))??""},Ud=[zr,Gr,Hi,Yi,Id,$d,q2,W2,H2,Y2,V2,j2,U2,yl,hn,wl,bl,Dl,Vd,jd,Qi],qd=new Map([["core",P2],["failsafe",[zr,Gr,Hi]],["json",B2],["yaml11",Ud],["yaml-1.1",Ud]]),Wd={binary:yl,bool:pl,float:kd,floatExp:Ld,floatNaN:Nd,floatTime:jd,int:_d,intHex:Td,intOct:Fd,intTime:Vd,map:zr,merge:hn,null:Yi,omap:wl,pairs:bl,seq:Gr,set:Dl,timestamp:Qi},z2={"tag:yaml.org,2002:binary":yl,"tag:yaml.org,2002:merge":hn,"tag:yaml.org,2002:omap":wl,"tag:yaml.org,2002:pairs":bl,"tag:yaml.org,2002:set":Dl,"tag:yaml.org,2002:timestamp":Qi};function El(e,t,n){const r=qd.get(t);if(r&&!e)return n&&!r.includes(hn)?r.concat(hn):r.slice();let s=r;if(!s)if(Array.isArray(e))s=[];else{const i=Array.from(qd.keys()).filter(a=>a!=="yaml11").map(a=>JSON.stringify(a)).join(", ");throw new Error(`Unknown schema "${t}"; use one of ${i} or define customTags array`)}if(Array.isArray(e))for(const i of e)s=s.concat(i);else typeof e=="function"&&(s=e(s.slice()));return n&&(s=s.concat(hn)),s.reduce((i,a)=>{const o=typeof a=="string"?Wd[a]:a;if(!o){const l=JSON.stringify(a),u=Object.keys(Wd).map(c=>JSON.stringify(c)).join(", ");throw new Error(`Unknown custom tag ${l}; use one of ${u}`)}return i.includes(o)||i.push(o),i},[])}const G2=(e,t)=>e.key<t.key?-1:e.key>t.key?1:0;class Al{constructor({compat:t,customTags:n,merge:r,resolveKnownTags:s,schema:i,sortMapEntries:a,toStringDefaults:o}){this.compat=Array.isArray(t)?El(t,"compat"):t?El(null,t):null,this.name=typeof i=="string"&&i||"core",this.knownTags=s?z2:{},this.tags=El(n,this.name,r),this.toStringOptions=o??null,Object.defineProperty(this,Fn,{value:zr}),Object.defineProperty(this,zt,{value:Hi}),Object.defineProperty(this,jr,{value:Gr}),this.sortMapEntries=typeof a=="function"?a:a===!0?G2:null}clone(){const t=Object.create(Al.prototype,Object.getOwnPropertyDescriptors(this));return t.tags=this.tags.slice(),t}}function J2(e,t){var l;const n=[];let r=t.directives===!0;if(t.directives!==!1&&e.directives){const u=e.directives.toString(e);u?(n.push(u),r=!0):e.directives.docStart&&(r=!0)}r&&n.push("---");const s=Dd(e,t),{commentString:i}=s.options;if(e.commentBefore){n.length!==1&&n.unshift("");const u=i(e.commentBefore);n.unshift(fn(u,""))}let a=!1,o=null;if(e.contents){if(ve(e.contents)){if(e.contents.spaceBefore&&r&&n.push(""),e.contents.commentBefore){const f=i(e.contents.commentBefore);n.push(fn(f,""))}s.forceBlockIndent=!!e.comment,o=e.contents.comment}const u=o?void 0:()=>a=!0;let c=Yr(e.contents,s,()=>o=null,u);o&&(c+=Qn(c,"",i(o))),(c[0]==="|"||c[0]===">")&&n[n.length-1]==="---"?n[n.length-1]=`--- ${c}`:n.push(c)}else n.push(Yr(e.contents,s));if((l=e.directives)!=null&&l.docEnd)if(e.comment){const u=i(e.comment);u.includes(`
|
|
88
|
+
`)?(n.push("..."),n.push(fn(u,""))):n.push(`... ${u}`)}else n.push("...");else{let u=e.comment;u&&a&&(u=u.replace(/^\n+/,"")),u&&((!a||o)&&n[n.length-1]!==""&&n.push(""),n.push(fn(i(u),"")))}return n.join(`
|
|
89
|
+
`)+`
|
|
90
|
+
`}class Bs{constructor(t,n,r){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,At,{value:al});let s=null;typeof n=="function"||Array.isArray(n)?s=n:r===void 0&&n&&(r=n,n=void 0);const i=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},r);this.options=i;let{version:a}=i;r!=null&&r._directives?(this.directives=r._directives.atDocument(),this.directives.yaml.explicit&&(a=this.directives.yaml.version)):this.directives=new Xe({version:a}),this.setSchema(a,r),this.contents=t===void 0?null:this.createNode(t,s,r)}clone(){const t=Object.create(Bs.prototype,{[At]:{value:al}});return t.commentBefore=this.commentBefore,t.comment=this.comment,t.errors=this.errors.slice(),t.warnings=this.warnings.slice(),t.options=Object.assign({},this.options),this.directives&&(t.directives=this.directives.clone()),t.schema=this.schema.clone(),t.contents=ve(this.contents)?this.contents.clone(t.schema):this.contents,this.range&&(t.range=this.range.slice()),t}add(t){Kr(this.contents)&&this.contents.add(t)}addIn(t,n){Kr(this.contents)&&this.contents.addIn(t,n)}createAlias(t,n){if(!t.anchor){const r=pd(this);t.anchor=!n||r.has(n)?gd(n||"a",r):n}return new ll(t.anchor)}createNode(t,n,r){let s;if(typeof n=="function")t=n.call({"":t},"",t),s=n;else if(Array.isArray(n)){const N=k=>typeof k=="number"||k instanceof String||k instanceof Number,x=n.filter(N).map(String);x.length>0&&(n=n.concat(x)),s=n}else r===void 0&&n&&(r=n,n=void 0);const{aliasDuplicateObjects:i,anchorPrefix:a,flow:o,keepUndefined:l,onTagObj:u,tag:c}=r??{},{onAnchor:f,setAnchors:d,sourceObjects:y}=E2(this,a||"a"),D={aliasDuplicateObjects:i??!0,keepUndefined:l??!1,onAnchor:f,onTagObj:u,replacer:s,schema:this.schema,sourceObjects:y},S=Rs(t,c,D);return o&&Pe(S)&&(S.flow=!0),d(),S}createPair(t,n,r={}){const s=this.createNode(t,null,r),i=this.createNode(n,null,r);return new Ze(s,i)}delete(t){return Kr(this.contents)?this.contents.delete(t):!1}deleteIn(t){return Ps(t)?this.contents==null?!1:(this.contents=null,!0):Kr(this.contents)?this.contents.deleteIn(t):!1}get(t,n){return Pe(this.contents)?this.contents.get(t,n):void 0}getIn(t,n){return Ps(t)?!n&&ae(this.contents)?this.contents.value:this.contents:Pe(this.contents)?this.contents.getIn(t,n):void 0}has(t){return Pe(this.contents)?this.contents.has(t):!1}hasIn(t){return Ps(t)?this.contents!==void 0:Pe(this.contents)?this.contents.hasIn(t):!1}set(t,n){this.contents==null?this.contents=Pi(this.schema,[t],n):Kr(this.contents)&&this.contents.set(t,n)}setIn(t,n){Ps(t)?this.contents=n:this.contents==null?this.contents=Pi(this.schema,Array.from(t),n):Kr(this.contents)&&this.contents.setIn(t,n)}setSchema(t,n={}){typeof t=="number"&&(t=String(t));let r;switch(t){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new Xe({version:"1.1"}),r={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=t:this.directives=new Xe({version:t}),r={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,r=null;break;default:{const s=JSON.stringify(t);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${s}`)}}if(n.schema instanceof Object)this.schema=n.schema;else if(r)this.schema=new Al(Object.assign(r,n));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:t,jsonArg:n,mapAsMap:r,maxAliasCount:s,onAnchor:i,reviver:a}={}){const o={anchors:new Map,doc:this,keep:!t,mapAsMap:r===!0,mapKeyWarned:!1,maxAliasCount:typeof s=="number"?s:100},l=xt(this.contents,n??"",o);if(typeof i=="function")for(const{count:u,res:c}of o.anchors.values())i(c,u);return typeof a=="function"?Wr(a,{"":l},"",l):l}toJSON(t,n){return this.toJS({json:!0,jsonArg:t,mapAsMap:!1,onAnchor:n})}toString(t={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in t&&(!Number.isInteger(t.indent)||Number(t.indent)<=0)){const n=JSON.stringify(t.indent);throw new Error(`"indent" option must be a positive integer, not ${n}`)}return J2(this,t)}}function Kr(e){if(Pe(e))return!0;throw new Error("Expected a YAML collection as document contents")}class Hd extends Error{constructor(t,n,r,s){super(),this.name=t,this.code=r,this.message=s,this.pos=n}}class Vs extends Hd{constructor(t,n,r){super("YAMLParseError",t,n,r)}}class Q2 extends Hd{constructor(t,n,r){super("YAMLWarning",t,n,r)}}const Yd=(e,t)=>n=>{if(n.pos[0]===-1)return;n.linePos=n.pos.map(o=>t.linePos(o));const{line:r,col:s}=n.linePos[0];n.message+=` at line ${r}, column ${s}`;let i=s-1,a=e.substring(t.lineStarts[r-1],t.lineStarts[r]).replace(/[\n\r]+$/,"");if(i>=60&&a.length>80){const o=Math.min(i-39,a.length-79);a="…"+a.substring(o),i-=o-1}if(a.length>80&&(a=a.substring(0,79)+"…"),r>1&&/^ *$/.test(a.substring(0,i))){let o=e.substring(t.lineStarts[r-2],t.lineStarts[r-1]);o.length>80&&(o=o.substring(0,79)+`…
|
|
91
|
+
`),a=o+a}if(/[^ ]/.test(a)){let o=1;const l=n.linePos[1];(l==null?void 0:l.line)===r&&l.col>s&&(o=Math.max(1,Math.min(l.col-s,80-i)));const u=" ".repeat(i)+"^".repeat(o);n.message+=`:
|
|
92
|
+
|
|
93
|
+
${a}
|
|
94
|
+
${u}
|
|
95
|
+
`}};function Xr(e,{flow:t,indicator:n,next:r,offset:s,onError:i,parentIndent:a,startOnNewline:o}){let l=!1,u=o,c=o,f="",d="",y=!1,D=!1,S=null,N=null,x=null,k=null,b=null,w=null,h=null;for(const E of e)switch(D&&(E.type!=="space"&&E.type!=="newline"&&E.type!=="comma"&&i(E.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),D=!1),S&&(u&&E.type!=="comment"&&E.type!=="newline"&&i(S,"TAB_AS_INDENT","Tabs are not allowed as indentation"),S=null),E.type){case"space":!t&&(n!=="doc-start"||(r==null?void 0:r.type)!=="flow-collection")&&E.source.includes(" ")&&(S=E),c=!0;break;case"comment":{c||i(E,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const v=E.source.substring(1)||" ";f?f+=d+v:f=v,d="",u=!1;break}case"newline":u?f?f+=E.source:(!w||n!=="seq-item-ind")&&(l=!0):d+=E.source,u=!0,y=!0,(N||x)&&(k=E),c=!0;break;case"anchor":N&&i(E,"MULTIPLE_ANCHORS","A node can have at most one anchor"),E.source.endsWith(":")&&i(E.offset+E.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),N=E,h??(h=E.offset),u=!1,c=!1,D=!0;break;case"tag":{x&&i(E,"MULTIPLE_TAGS","A node can have at most one tag"),x=E,h??(h=E.offset),u=!1,c=!1,D=!0;break}case n:(N||x)&&i(E,"BAD_PROP_ORDER",`Anchors and tags must be after the ${E.source} indicator`),w&&i(E,"UNEXPECTED_TOKEN",`Unexpected ${E.source} in ${t??"collection"}`),w=E,u=n==="seq-item-ind"||n==="explicit-key-ind",c=!1;break;case"comma":if(t){b&&i(E,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`),b=E,u=!1,c=!1;break}default:i(E,"UNEXPECTED_TOKEN",`Unexpected ${E.type} token`),u=!1,c=!1}const g=e[e.length-1],m=g?g.offset+g.source.length:s;return D&&r&&r.type!=="space"&&r.type!=="newline"&&r.type!=="comma"&&(r.type!=="scalar"||r.source!=="")&&i(r.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),S&&(u&&S.indent<=a||(r==null?void 0:r.type)==="block-map"||(r==null?void 0:r.type)==="block-seq")&&i(S,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:b,found:w,spaceBefore:l,comment:f,hasNewline:y,anchor:N,tag:x,newlineAfterProp:k,end:m,start:h??m}}function js(e){if(!e)return null;switch(e.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(e.source.includes(`
|
|
96
|
+
`))return!0;if(e.end){for(const t of e.end)if(t.type==="newline")return!0}return!1;case"flow-collection":for(const t of e.items){for(const n of t.start)if(n.type==="newline")return!0;if(t.sep){for(const n of t.sep)if(n.type==="newline")return!0}if(js(t.key)||js(t.value))return!0}return!1;default:return!0}}function xl(e,t,n){if((t==null?void 0:t.type)==="flow-collection"){const r=t.end[0];r.indent===e&&(r.source==="]"||r.source==="}")&&js(t)&&n(r,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function zd(e,t,n){const{uniqueKeys:r}=e.options;if(r===!1)return!1;const s=typeof r=="function"?r:(i,a)=>i===a||ae(i)&&ae(a)&&i.value===a.value;return t.some(i=>s(i.key,n))}const Gd="All mapping items must start at the same column";function K2({composeNode:e,composeEmptyNode:t},n,r,s,i){var c;const a=(i==null?void 0:i.nodeClass)??Nt,o=new a(n.schema);n.atRoot&&(n.atRoot=!1);let l=r.offset,u=null;for(const f of r.items){const{start:d,key:y,sep:D,value:S}=f,N=Xr(d,{indicator:"explicit-key-ind",next:y??(D==null?void 0:D[0]),offset:l,onError:s,parentIndent:r.indent,startOnNewline:!0}),x=!N.found;if(x){if(y&&(y.type==="block-seq"?s(l,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in y&&y.indent!==r.indent&&s(l,"BAD_INDENT",Gd)),!N.anchor&&!N.tag&&!D){u=N.end,N.comment&&(o.comment?o.comment+=`
|
|
97
|
+
`+N.comment:o.comment=N.comment);continue}(N.newlineAfterProp||js(y))&&s(y??d[d.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else((c=N.found)==null?void 0:c.indent)!==r.indent&&s(l,"BAD_INDENT",Gd);n.atKey=!0;const k=N.end,b=y?e(n,y,N,s):t(n,k,d,null,N,s);n.schema.compat&&xl(r.indent,y,s),n.atKey=!1,zd(n,o.items,b)&&s(k,"DUPLICATE_KEY","Map keys must be unique");const w=Xr(D??[],{indicator:"map-value-ind",next:S,offset:b.range[2],onError:s,parentIndent:r.indent,startOnNewline:!y||y.type==="block-scalar"});if(l=w.end,w.found){x&&((S==null?void 0:S.type)==="block-map"&&!w.hasNewline&&s(l,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),n.options.strict&&N.start<w.found.offset-1024&&s(b.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const h=S?e(n,S,w,s):t(n,l,D,null,w,s);n.schema.compat&&xl(r.indent,S,s),l=h.range[2];const g=new Ze(b,h);n.options.keepSourceTokens&&(g.srcToken=f),o.items.push(g)}else{x&&s(b.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),w.comment&&(b.comment?b.comment+=`
|
|
98
|
+
`+w.comment:b.comment=w.comment);const h=new Ze(b);n.options.keepSourceTokens&&(h.srcToken=f),o.items.push(h)}}return u&&u<l&&s(u,"IMPOSSIBLE","Map comment with trailing content"),o.range=[r.offset,l,u??l],o}function X2({composeNode:e,composeEmptyNode:t},n,r,s,i){const a=(i==null?void 0:i.nodeClass)??Xn,o=new a(n.schema);n.atRoot&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let l=r.offset,u=null;for(const{start:c,value:f}of r.items){const d=Xr(c,{indicator:"seq-item-ind",next:f,offset:l,onError:s,parentIndent:r.indent,startOnNewline:!0});if(!d.found)if(d.anchor||d.tag||f)(f==null?void 0:f.type)==="block-seq"?s(d.end,"BAD_INDENT","All sequence items must start at the same column"):s(l,"MISSING_CHAR","Sequence item without - indicator");else{u=d.end,d.comment&&(o.comment=d.comment);continue}const y=f?e(n,f,d,s):t(n,d.end,c,null,d,s);n.schema.compat&&xl(r.indent,f,s),l=y.range[2],o.items.push(y)}return o.range=[r.offset,l,u??l],o}function Us(e,t,n,r){let s="";if(e){let i=!1,a="";for(const o of e){const{source:l,type:u}=o;switch(u){case"space":i=!0;break;case"comment":{n&&!i&&r(o,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const c=l.substring(1)||" ";s?s+=a+c:s=c,a="";break}case"newline":s&&(a+=l),i=!0;break;default:r(o,"UNEXPECTED_TOKEN",`Unexpected ${u} at node end`)}t+=l.length}}return{comment:s,offset:t}}const Nl="Block collections are not allowed within flow collections",Ll=e=>e&&(e.type==="block-map"||e.type==="block-seq");function Z2({composeNode:e,composeEmptyNode:t},n,r,s,i){var N;const a=r.start.source==="{",o=a?"flow map":"flow sequence",l=(i==null?void 0:i.nodeClass)??(a?Nt:Xn),u=new l(n.schema);u.flow=!0;const c=n.atRoot;c&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let f=r.offset+r.start.source.length;for(let x=0;x<r.items.length;++x){const k=r.items[x],{start:b,key:w,sep:h,value:g}=k,m=Xr(b,{flow:o,indicator:"explicit-key-ind",next:w??(h==null?void 0:h[0]),offset:f,onError:s,parentIndent:r.indent,startOnNewline:!1});if(!m.found){if(!m.anchor&&!m.tag&&!h&&!g){x===0&&m.comma?s(m.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${o}`):x<r.items.length-1&&s(m.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${o}`),m.comment&&(u.comment?u.comment+=`
|
|
99
|
+
`+m.comment:u.comment=m.comment),f=m.end;continue}!a&&n.options.strict&&js(w)&&s(w,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(x===0)m.comma&&s(m.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${o}`);else if(m.comma||s(m.start,"MISSING_CHAR",`Missing , between ${o} items`),m.comment){let E="";e:for(const v of b)switch(v.type){case"comma":case"space":break;case"comment":E=v.source.substring(1);break e;default:break e}if(E){let v=u.items[u.items.length-1];Se(v)&&(v=v.value??v.key),v.comment?v.comment+=`
|
|
100
|
+
`+E:v.comment=E,m.comment=m.comment.substring(E.length+1)}}if(!a&&!h&&!m.found){const E=g?e(n,g,m,s):t(n,m.end,h,null,m,s);u.items.push(E),f=E.range[2],Ll(g)&&s(E.range,"BLOCK_IN_FLOW",Nl)}else{n.atKey=!0;const E=m.end,v=w?e(n,w,m,s):t(n,E,b,null,m,s);Ll(w)&&s(v.range,"BLOCK_IN_FLOW",Nl),n.atKey=!1;const L=Xr(h??[],{flow:o,indicator:"map-value-ind",next:g,offset:v.range[2],onError:s,parentIndent:r.indent,startOnNewline:!1});if(L.found){if(!a&&!m.found&&n.options.strict){if(h)for(const F of h){if(F===L.found)break;if(F.type==="newline"){s(F,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}m.start<L.found.offset-1024&&s(L.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else g&&("source"in g&&((N=g.source)==null?void 0:N[0])===":"?s(g,"MISSING_CHAR",`Missing space after : in ${o}`):s(L.start,"MISSING_CHAR",`Missing , or : between ${o} items`));const C=g?e(n,g,L,s):L.found?t(n,L.end,h,null,L,s):null;C?Ll(g)&&s(C.range,"BLOCK_IN_FLOW",Nl):L.comment&&(v.comment?v.comment+=`
|
|
101
|
+
`+L.comment:v.comment=L.comment);const A=new Ze(v,C);if(n.options.keepSourceTokens&&(A.srcToken=k),a){const F=u;zd(n,F.items,v)&&s(E,"DUPLICATE_KEY","Map keys must be unique"),F.items.push(A)}else{const F=new Nt(n.schema);F.flow=!0,F.items.push(A);const M=(C??v).range;F.range=[v.range[0],M[1],M[2]],u.items.push(F)}f=C?C.range[2]:L.end}}const d=a?"}":"]",[y,...D]=r.end;let S=f;if((y==null?void 0:y.source)===d)S=y.offset+y.source.length;else{const x=o[0].toUpperCase()+o.substring(1),k=c?`${x} must end with a ${d}`:`${x} in block collection must be sufficiently indented and end with a ${d}`;s(f,c?"MISSING_CHAR":"BAD_INDENT",k),y&&y.source.length!==1&&D.unshift(y)}if(D.length>0){const x=Us(D,S,n.options.strict,s);x.comment&&(u.comment?u.comment+=`
|
|
102
|
+
`+x.comment:u.comment=x.comment),u.range=[r.offset,S,x.offset]}else u.range=[r.offset,S,S];return u}function kl(e,t,n,r,s,i){const a=n.type==="block-map"?K2(e,t,n,r,i):n.type==="block-seq"?X2(e,t,n,r,i):Z2(e,t,n,r,i),o=a.constructor;return s==="!"||s===o.tagName?(a.tag=o.tagName,a):(s&&(a.tag=s),a)}function eb(e,t,n,r,s){var d;const i=r.tag,a=i?t.directives.tagName(i.source,y=>s(i,"TAG_RESOLVE_FAILED",y)):null;if(n.type==="block-seq"){const{anchor:y,newlineAfterProp:D}=r,S=y&&i?y.offset>i.offset?y:i:y??i;S&&(!D||D.offset<S.offset)&&s(S,"MISSING_CHAR","Missing newline after block sequence props")}const o=n.type==="block-map"?"map":n.type==="block-seq"?"seq":n.start.source==="{"?"map":"seq";if(!i||!a||a==="!"||a===Nt.tagName&&o==="map"||a===Xn.tagName&&o==="seq")return kl(e,t,n,s,a);let l=t.schema.tags.find(y=>y.tag===a&&y.collection===o);if(!l){const y=t.schema.knownTags[a];if((y==null?void 0:y.collection)===o)t.schema.tags.push(Object.assign({},y,{default:!1})),l=y;else return y?s(i,"BAD_COLLECTION_TYPE",`${y.tag} used for ${o} collection, but expects ${y.collection??"scalar"}`,!0):s(i,"TAG_RESOLVE_FAILED",`Unresolved tag: ${a}`,!0),kl(e,t,n,s,a)}const u=kl(e,t,n,s,a,l),c=((d=l.resolve)==null?void 0:d.call(l,u,y=>s(i,"TAG_RESOLVE_FAILED",y),t.options))??u,f=ve(c)?c:new oe(c);return f.range=u.range,f.tag=a,l!=null&&l.format&&(f.format=l.format),f}function tb(e,t,n){const r=t.offset,s=nb(t,e.options.strict,n);if(!s)return{value:"",type:null,comment:"",range:[r,r,r]};const i=s.mode===">"?oe.BLOCK_FOLDED:oe.BLOCK_LITERAL,a=t.source?rb(t.source):[];let o=a.length;for(let S=a.length-1;S>=0;--S){const N=a[S][1];if(N===""||N==="\r")o=S;else break}if(o===0){const S=s.chomp==="+"&&a.length>0?`
|
|
103
|
+
`.repeat(Math.max(1,a.length-1)):"";let N=r+s.length;return t.source&&(N+=t.source.length),{value:S,type:i,comment:s.comment,range:[r,N,N]}}let l=t.indent+s.indent,u=t.offset+s.length,c=0;for(let S=0;S<o;++S){const[N,x]=a[S];if(x===""||x==="\r")s.indent===0&&N.length>l&&(l=N.length);else{N.length<l&&n(u+N.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),s.indent===0&&(l=N.length),c=S,l===0&&!e.atRoot&&n(u,"BAD_INDENT","Block scalar values in collections must be indented");break}u+=N.length+x.length+1}for(let S=a.length-1;S>=o;--S)a[S][0].length>l&&(o=S+1);let f="",d="",y=!1;for(let S=0;S<c;++S)f+=a[S][0].slice(l)+`
|
|
104
|
+
`;for(let S=c;S<o;++S){let[N,x]=a[S];u+=N.length+x.length+1;const k=x[x.length-1]==="\r";if(k&&(x=x.slice(0,-1)),x&&N.length<l){const w=`Block scalar lines must not be less indented than their ${s.indent?"explicit indentation indicator":"first line"}`;n(u-x.length-(k?2:1),"BAD_INDENT",w),N=""}i===oe.BLOCK_LITERAL?(f+=d+N.slice(l)+x,d=`
|
|
105
|
+
`):N.length>l||x[0]===" "?(d===" "?d=`
|
|
106
|
+
`:!y&&d===`
|
|
107
|
+
`&&(d=`
|
|
108
|
+
|
|
109
|
+
`),f+=d+N.slice(l)+x,d=`
|
|
110
|
+
`,y=!0):x===""?d===`
|
|
111
|
+
`?f+=`
|
|
112
|
+
`:d=`
|
|
113
|
+
`:(f+=d+x,d=" ",y=!1)}switch(s.chomp){case"-":break;case"+":for(let S=o;S<a.length;++S)f+=`
|
|
114
|
+
`+a[S][0].slice(l);f[f.length-1]!==`
|
|
115
|
+
`&&(f+=`
|
|
116
|
+
`);break;default:f+=`
|
|
117
|
+
`}const D=r+s.length+t.source.length;return{value:f,type:i,comment:s.comment,range:[r,D,D]}}function nb({offset:e,props:t},n,r){if(t[0].type!=="block-scalar-header")return r(t[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:s}=t[0],i=s[0];let a=0,o="",l=-1;for(let d=1;d<s.length;++d){const y=s[d];if(!o&&(y==="-"||y==="+"))o=y;else{const D=Number(y);!a&&D?a=D:l===-1&&(l=e+d)}}l!==-1&&r(l,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${s}`);let u=!1,c="",f=s.length;for(let d=1;d<t.length;++d){const y=t[d];switch(y.type){case"space":u=!0;case"newline":f+=y.source.length;break;case"comment":n&&!u&&r(y,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),f+=y.source.length,c=y.source.substring(1);break;case"error":r(y,"UNEXPECTED_TOKEN",y.message),f+=y.source.length;break;default:{const D=`Unexpected token in block scalar header: ${y.type}`;r(y,"UNEXPECTED_TOKEN",D);const S=y.source;S&&typeof S=="string"&&(f+=S.length)}}}return{mode:i,indent:a,chomp:o,comment:c,length:f}}function rb(e){const t=e.split(/\n( *)/),n=t[0],r=n.match(/^( *)/),i=[r!=null&&r[1]?[r[1],n.slice(r[1].length)]:["",n]];for(let a=1;a<t.length;a+=2)i.push([t[a],t[a+1]]);return i}function sb(e,t,n){const{offset:r,type:s,source:i,end:a}=e;let o,l;const u=(d,y,D)=>n(r+d,y,D);switch(s){case"scalar":o=oe.PLAIN,l=ib(i,u);break;case"single-quoted-scalar":o=oe.QUOTE_SINGLE,l=ab(i,u);break;case"double-quoted-scalar":o=oe.QUOTE_DOUBLE,l=ob(i,u);break;default:return n(e,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${s}`),{value:"",type:null,comment:"",range:[r,r+i.length,r+i.length]}}const c=r+i.length,f=Us(a,c,t,n);return{value:l,type:o,comment:f.comment,range:[r,c,f.offset]}}function ib(e,t){let n="";switch(e[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 ${e[0]}`;break}case"@":case"`":{n=`reserved character ${e[0]}`;break}}return n&&t(0,"BAD_SCALAR_START",`Plain value cannot start with ${n}`),Jd(e)}function ab(e,t){return(e[e.length-1]!=="'"||e.length===1)&&t(e.length,"MISSING_CHAR","Missing closing 'quote"),Jd(e.slice(1,-1)).replace(/''/g,"'")}function Jd(e){let t,n;try{t=new RegExp(`(.*?)(?<![ ])[ ]*\r?
|
|
118
|
+
`,"sy"),n=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
|
|
119
|
+
`,"sy")}catch{t=/(.*?)[ \t]*\r?\n/sy,n=/[ \t]*(.*?)[ \t]*\r?\n/sy}let r=t.exec(e);if(!r)return e;let s=r[1],i=" ",a=t.lastIndex;for(n.lastIndex=a;r=n.exec(e);)r[1]===""?i===`
|
|
120
|
+
`?s+=i:i=`
|
|
121
|
+
`:(s+=i+r[1],i=" "),a=n.lastIndex;const o=/[ \t]*(.*)/sy;return o.lastIndex=a,r=o.exec(e),s+i+((r==null?void 0:r[1])??"")}function ob(e,t){let n="";for(let r=1;r<e.length-1;++r){const s=e[r];if(!(s==="\r"&&e[r+1]===`
|
|
122
|
+
`))if(s===`
|
|
123
|
+
`){const{fold:i,offset:a}=lb(e,r);n+=i,r=a}else if(s==="\\"){let i=e[++r];const a=ub[i];if(a)n+=a;else if(i===`
|
|
124
|
+
`)for(i=e[r+1];i===" "||i===" ";)i=e[++r+1];else if(i==="\r"&&e[r+1]===`
|
|
125
|
+
`)for(i=e[++r+1];i===" "||i===" ";)i=e[++r+1];else if(i==="x"||i==="u"||i==="U"){const o={x:2,u:4,U:8}[i];n+=cb(e,r+1,o,t),r+=o}else{const o=e.substr(r-1,2);t(r-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${o}`),n+=o}}else if(s===" "||s===" "){const i=r;let a=e[r+1];for(;a===" "||a===" ";)a=e[++r+1];a!==`
|
|
126
|
+
`&&!(a==="\r"&&e[r+2]===`
|
|
127
|
+
`)&&(n+=r>i?e.slice(i,r+1):s)}else n+=s}return(e[e.length-1]!=='"'||e.length===1)&&t(e.length,"MISSING_CHAR",'Missing closing "quote'),n}function lb(e,t){let n="",r=e[t+1];for(;(r===" "||r===" "||r===`
|
|
128
|
+
`||r==="\r")&&!(r==="\r"&&e[t+2]!==`
|
|
129
|
+
`);)r===`
|
|
130
|
+
`&&(n+=`
|
|
131
|
+
`),t+=1,r=e[t+1];return n||(n=" "),{fold:n,offset:t}}const ub={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
|
|
132
|
+
`,r:"\r",t:" ",v:"\v",N:"
",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function cb(e,t,n,r){const s=e.substr(t,n),a=s.length===n&&/^[0-9a-fA-F]+$/.test(s)?parseInt(s,16):NaN;if(isNaN(a)){const o=e.substr(t-2,n+2);return r(t-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${o}`),o}return String.fromCodePoint(a)}function Qd(e,t,n,r){const{value:s,type:i,comment:a,range:o}=t.type==="block-scalar"?tb(e,t,r):sb(t,e.options.strict,r),l=n?e.directives.tagName(n.source,f=>r(n,"TAG_RESOLVE_FAILED",f)):null;let u;e.options.stringKeys&&e.atKey?u=e.schema[zt]:l?u=fb(e.schema,s,l,n,r):t.type==="scalar"?u=hb(e,s,t,r):u=e.schema[zt];let c;try{const f=u.resolve(s,d=>r(n??t,"TAG_RESOLVE_FAILED",d),e.options);c=ae(f)?f:new oe(f)}catch(f){const d=f instanceof Error?f.message:String(f);r(n??t,"TAG_RESOLVE_FAILED",d),c=new oe(s)}return c.range=o,c.source=s,i&&(c.type=i),l&&(c.tag=l),u.format&&(c.format=u.format),a&&(c.comment=a),c}function fb(e,t,n,r,s){var o;if(n==="!")return e[zt];const i=[];for(const l of e.tags)if(!l.collection&&l.tag===n)if(l.default&&l.test)i.push(l);else return l;for(const l of i)if((o=l.test)!=null&&o.test(t))return l;const a=e.knownTags[n];return a&&!a.collection?(e.tags.push(Object.assign({},a,{default:!1,test:void 0})),a):(s(r,"TAG_RESOLVE_FAILED",`Unresolved tag: ${n}`,n!=="tag:yaml.org,2002:str"),e[zt])}function hb({atKey:e,directives:t,schema:n},r,s,i){const a=n.tags.find(o=>{var l;return(o.default===!0||e&&o.default==="key")&&((l=o.test)==null?void 0:l.test(r))})||n[zt];if(n.compat){const o=n.compat.find(l=>{var u;return l.default&&((u=l.test)==null?void 0:u.test(r))})??n[zt];if(a.tag!==o.tag){const l=t.tagString(a.tag),u=t.tagString(o.tag),c=`Value may be parsed as either ${l} or ${u}`;i(s,"TAG_RESOLVE_FAILED",c,!0)}}return a}function db(e,t,n){if(t){n??(n=t.length);for(let r=n-1;r>=0;--r){let s=t[r];switch(s.type){case"space":case"comment":case"newline":e-=s.source.length;continue}for(s=t[++r];(s==null?void 0:s.type)==="space";)e+=s.source.length,s=t[++r];break}}return e}const mb={composeNode:Kd,composeEmptyNode:Cl};function Kd(e,t,n,r){const s=e.atKey,{spaceBefore:i,comment:a,anchor:o,tag:l}=n;let u,c=!0;switch(t.type){case"alias":u=pb(e,t,r),(o||l)&&r(t,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":u=Qd(e,t,l,r),o&&(u.anchor=o.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{u=eb(mb,e,t,n,r),o&&(u.anchor=o.source.substring(1))}catch(f){const d=f instanceof Error?f.message:String(f);r(t,"RESOURCE_EXHAUSTION",d)}break;default:{const f=t.type==="error"?t.message:`Unsupported token (type: ${t.type})`;r(t,"UNEXPECTED_TOKEN",f),c=!1}}return u??(u=Cl(e,t.offset,void 0,null,n,r)),o&&u.anchor===""&&r(o,"BAD_ALIAS","Anchor cannot be an empty string"),s&&e.options.stringKeys&&(!ae(u)||typeof u.value!="string"||u.tag&&u.tag!=="tag:yaml.org,2002:str")&&r(l??t,"NON_STRING_KEY","With stringKeys, all keys must be strings"),i&&(u.spaceBefore=!0),a&&(t.type==="scalar"&&t.source===""?u.comment=a:u.commentBefore=a),e.options.keepSourceTokens&&c&&(u.srcToken=t),u}function Cl(e,t,n,r,{spaceBefore:s,comment:i,anchor:a,tag:o,end:l},u){const c={type:"scalar",offset:db(t,n,r),indent:-1,source:""},f=Qd(e,c,o,u);return a&&(f.anchor=a.source.substring(1),f.anchor===""&&u(a,"BAD_ALIAS","Anchor cannot be an empty string")),s&&(f.spaceBefore=!0),i&&(f.comment=i,f.range[2]=l),f}function pb({options:e},{offset:t,source:n,end:r},s){const i=new ll(n.substring(1));i.source===""&&s(t,"BAD_ALIAS","Alias cannot be an empty string"),i.source.endsWith(":")&&s(t+n.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const a=t+n.length,o=Us(r,a,e.strict,s);return i.range=[t,a,o.offset],o.comment&&(i.comment=o.comment),i}function gb(e,t,{offset:n,start:r,value:s,end:i},a){const o=Object.assign({_directives:t},e),l=new Bs(void 0,o),u={atKey:!1,atRoot:!0,directives:l.directives,options:l.options,schema:l.schema},c=Xr(r,{indicator:"doc-start",next:s??(i==null?void 0:i[0]),offset:n,onError:a,parentIndent:0,startOnNewline:!0});c.found&&(l.directives.docStart=!0,s&&(s.type==="block-map"||s.type==="block-seq")&&!c.hasNewline&&a(c.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),l.contents=s?Kd(u,s,c,a):Cl(u,c.end,r,null,c,a);const f=l.contents.range[2],d=Us(i,f,!1,a);return d.comment&&(l.comment=d.comment),l.range=[n,f,d.offset],l}function qs(e){if(typeof e=="number")return[e,e+1];if(Array.isArray(e))return e.length===2?e:[e[0],e[1]];const{offset:t,source:n}=e;return[t,t+(typeof n=="string"?n.length:1)]}function Xd(e){var s;let t="",n=!1,r=!1;for(let i=0;i<e.length;++i){const a=e[i];switch(a[0]){case"#":t+=(t===""?"":r?`
|
|
133
|
+
|
|
134
|
+
`:`
|
|
135
|
+
`)+(a.substring(1)||" "),n=!0,r=!1;break;case"%":((s=e[i+1])==null?void 0:s[0])!=="#"&&(i+=1),n=!1;break;default:n||(r=!0),n=!1}}return{comment:t,afterEmptyLine:r}}class Zd{constructor(t={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(n,r,s,i)=>{const a=qs(n);i?this.warnings.push(new Q2(a,r,s)):this.errors.push(new Vs(a,r,s))},this.directives=new Xe({version:t.version||"1.2"}),this.options=t}decorate(t,n){const{comment:r,afterEmptyLine:s}=Xd(this.prelude);if(r){const i=t.contents;if(n)t.comment=t.comment?`${t.comment}
|
|
136
|
+
${r}`:r;else if(s||t.directives.docStart||!i)t.commentBefore=r;else if(Pe(i)&&!i.flow&&i.items.length>0){let a=i.items[0];Se(a)&&(a=a.key);const o=a.commentBefore;a.commentBefore=o?`${r}
|
|
137
|
+
${o}`:r}else{const a=i.commentBefore;i.commentBefore=a?`${r}
|
|
138
|
+
${a}`:r}}n?(Array.prototype.push.apply(t.errors,this.errors),Array.prototype.push.apply(t.warnings,this.warnings)):(t.errors=this.errors,t.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:Xd(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(t,n=!1,r=-1){for(const s of t)yield*this.next(s);yield*this.end(n,r)}*next(t){switch(t.type){case"directive":this.directives.add(t.source,(n,r,s)=>{const i=qs(t);i[0]+=n,this.onError(i,"BAD_DIRECTIVE",r,s)}),this.prelude.push(t.source),this.atDirectives=!0;break;case"document":{const n=gb(this.options,this.directives,t,this.onError);this.atDirectives&&!n.directives.docStart&&this.onError(t,"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(t.source);break;case"error":{const n=t.source?`${t.message}: ${JSON.stringify(t.source)}`:t.message,r=new Vs(qs(t),"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 Vs(qs(t),"UNEXPECTED_TOKEN",r));break}this.doc.directives.docEnd=!0;const n=Us(t.end,t.offset+t.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}
|
|
139
|
+
${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.push(new Vs(qs(t),"UNEXPECTED_TOKEN",`Unsupported token ${t.type}`))}}*end(t=!1,n=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(t){const r=Object.assign({_directives:this.directives},this.options),s=new Bs(void 0,r);this.atDirectives&&this.onError(n,"MISSING_CHAR","Missing directives-end indicator line"),s.range=[0,n,n],this.decorate(s,!1),yield s}}}const e1=e=>"type"in e?Ki(e):Xi(e);function Ki(e){switch(e.type){case"block-scalar":{let t="";for(const n of e.props)t+=Ki(n);return t+e.source}case"block-map":case"block-seq":{let t="";for(const n of e.items)t+=Xi(n);return t}case"flow-collection":{let t=e.start.source;for(const n of e.items)t+=Xi(n);for(const n of e.end)t+=n.source;return t}case"document":{let t=Xi(e);if(e.end)for(const n of e.end)t+=n.source;return t}default:{let t=e.source;if("end"in e&&e.end)for(const n of e.end)t+=n.source;return t}}}function Xi({start:e,key:t,sep:n,value:r}){let s="";for(const i of e)s+=i.source;if(t&&(s+=Ki(t)),n)for(const i of n)s+=i.source;return r&&(s+=Ki(r)),s}const Fl=Symbol("break visit"),yb=Symbol("skip children"),t1=Symbol("remove item");function Zn(e,t){"type"in e&&e.type==="document"&&(e={start:e.start,value:e.value}),n1(Object.freeze([]),e,t)}Zn.BREAK=Fl,Zn.SKIP=yb,Zn.REMOVE=t1,Zn.itemAtPath=(e,t)=>{let n=e;for(const[r,s]of t){const i=n==null?void 0:n[r];if(i&&"items"in i)n=i.items[s];else return}return n},Zn.parentCollection=(e,t)=>{const n=Zn.itemAtPath(e,t.slice(0,-1)),r=t[t.length-1][0],s=n==null?void 0:n[r];if(s&&"items"in s)return s;throw new Error("Parent collection not found")};function n1(e,t,n){let r=n(t,e);if(typeof r=="symbol")return r;for(const s of["key","value"]){const i=t[s];if(i&&"items"in i){for(let a=0;a<i.items.length;++a){const o=n1(Object.freeze(e.concat([[s,a]])),i.items[a],n);if(typeof o=="number")a=o-1;else{if(o===Fl)return Fl;o===t1&&(i.items.splice(a,1),a-=1)}}typeof r=="function"&&s==="key"&&(r=r(t,e))}}return typeof r=="function"?r(t,e):r}const r1="\uFEFF",s1="",i1="",_l="",bb=e=>!!e&&"items"in e,Tl=e=>!!e&&(e.type==="scalar"||e.type==="single-quoted-scalar"||e.type==="double-quoted-scalar"||e.type==="block-scalar");function wb(e){switch(e){case r1:return"byte-order-mark";case s1:return"doc-mode";case i1:return"flow-error-end";case _l:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
|
|
140
|
+
`:case`\r
|
|
141
|
+
`: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(e[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 It(e){switch(e){case void 0:case" ":case`
|
|
142
|
+
`:case"\r":case" ":return!0;default:return!1}}const a1=new Set("0123456789ABCDEFabcdef"),vb=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),Zi=new Set(",[]{}"),Db=new Set(` ,[]{}
|
|
143
|
+
\r `),Ml=e=>!e||Db.has(e);class Sb{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(t,n=!1){if(t){if(typeof t!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+t:t,this.lineEndPos=null}this.atEnd=!n;let r=this.next??"stream";for(;r&&(n||this.hasChars(1));)r=yield*this.parseNext(r)}atLineEnd(){let t=this.pos,n=this.buffer[t];for(;n===" "||n===" ";)n=this.buffer[++t];return!n||n==="#"||n===`
|
|
144
|
+
`?!0:n==="\r"?this.buffer[t+1]===`
|
|
145
|
+
`:!1}charAt(t){return this.buffer[this.pos+t]}continueScalar(t){let n=this.buffer[t];if(this.indentNext>0){let r=0;for(;n===" ";)n=this.buffer[++r+t];if(n==="\r"){const s=this.buffer[r+t+1];if(s===`
|
|
146
|
+
`||!s&&!this.atEnd)return t+r+1}return n===`
|
|
147
|
+
`||r>=this.indentNext||!n&&!this.atEnd?t+r:-1}if(n==="-"||n==="."){const r=this.buffer.substr(t,3);if((r==="---"||r==="...")&&It(this.buffer[t+3]))return-1}return t}getLine(){let t=this.lineEndPos;return(typeof t!="number"||t!==-1&&t<this.pos)&&(t=this.buffer.indexOf(`
|
|
148
|
+
`,this.pos),this.lineEndPos=t),t===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[t-1]==="\r"&&(t-=1),this.buffer.substring(this.pos,t))}hasChars(t){return this.pos+t<=this.buffer.length}setNext(t){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=t,null}peek(t){return this.buffer.substr(this.pos,t)}*parseNext(t){switch(t){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let t=this.getLine();if(t===null)return this.setNext("stream");if(t[0]===r1&&(yield*this.pushCount(1),t=t.substring(1)),t[0]==="%"){let n=t.length,r=t.indexOf("#");for(;r!==-1;){const i=t[r-1];if(i===" "||i===" "){n=r-1;break}else r=t.indexOf("#",r+1)}for(;;){const i=t[n-1];if(i===" "||i===" ")n-=1;else break}const s=(yield*this.pushCount(n))+(yield*this.pushSpaces(!0));return yield*this.pushCount(t.length-s),this.pushNewline(),"stream"}if(this.atLineEnd()){const n=yield*this.pushSpaces(!0);return yield*this.pushCount(t.length-n),yield*this.pushNewline(),"stream"}return yield s1,yield*this.parseLineStart()}*parseLineStart(){const t=this.charAt(0);if(!t&&!this.atEnd)return this.setNext("line-start");if(t==="-"||t==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");const n=this.peek(3);if((n==="---"||n==="...")&&It(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,n==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!It(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){const[t,n]=this.peek(2);if(!n&&!this.atEnd)return this.setNext("block-start");if((t==="-"||t==="?"||t===":")&&It(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 t=this.getLine();if(t===null)return this.setNext("doc");let n=yield*this.pushIndicators();switch(t[n]){case"#":yield*this.pushCount(t.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(Ml),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return n+=yield*this.parseBlockScalarHeader(),n+=yield*this.pushSpaces(!0),yield*this.pushCount(t.length-n),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let t,n,r=-1;do t=yield*this.pushNewline(),t>0?(n=yield*this.pushSpaces(!1),this.indentValue=r=n):n=0,n+=yield*this.pushSpaces(!0);while(t+n>0);const s=this.getLine();if(s===null)return this.setNext("flow");if((r!==-1&&r<this.indentNext&&s[0]!=="#"||r===0&&(s.startsWith("---")||s.startsWith("..."))&&It(s[3]))&&!(r===this.indentNext-1&&this.flowLevel===1&&(s[0]==="]"||s[0]==="}")))return this.flowLevel=0,yield i1,yield*this.parseLineStart();let i=0;for(;s[i]===",";)i+=yield*this.pushCount(1),i+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(i+=yield*this.pushIndicators(),s[i]){case void 0:return"flow";case"#":return yield*this.pushCount(s.length-i),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(Ml),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{const a=this.charAt(1);if(this.flowKey||It(a)||a===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){const t=this.charAt(0);let n=this.buffer.indexOf(t,this.pos+1);if(t==="'")for(;n!==-1&&this.buffer[n+1]==="'";)n=this.buffer.indexOf("'",n+2);else for(;n!==-1;){let i=0;for(;this.buffer[n-1-i]==="\\";)i+=1;if(i%2===0)break;n=this.buffer.indexOf('"',n+1)}const r=this.buffer.substring(0,n);let s=r.indexOf(`
|
|
149
|
+
`,this.pos);if(s!==-1){for(;s!==-1;){const i=this.continueScalar(s+1);if(i===-1)break;s=r.indexOf(`
|
|
150
|
+
`,i)}s!==-1&&(n=s-(r[s-1]==="\r"?2:1))}if(n===-1){if(!this.atEnd)return this.setNext("quoted-scalar");n=this.buffer.length}return yield*this.pushToIndex(n+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let t=this.pos;for(;;){const n=this.buffer[++t];if(n==="+")this.blockScalarKeep=!0;else if(n>"0"&&n<="9")this.blockScalarIndent=Number(n)-1;else if(n!=="-")break}return yield*this.pushUntil(n=>It(n)||n==="#")}*parseBlockScalar(){let t=this.pos-1,n=0,r;e:for(let i=this.pos;r=this.buffer[i];++i)switch(r){case" ":n+=1;break;case`
|
|
151
|
+
`:t=i,n=0;break;case"\r":{const a=this.buffer[i+1];if(!a&&!this.atEnd)return this.setNext("block-scalar");if(a===`
|
|
152
|
+
`)break}default:break e}if(!r&&!this.atEnd)return this.setNext("block-scalar");if(n>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=n:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{const i=this.continueScalar(t+1);if(i===-1)break;t=this.buffer.indexOf(`
|
|
153
|
+
`,i)}while(t!==-1);if(t===-1){if(!this.atEnd)return this.setNext("block-scalar");t=this.buffer.length}}let s=t+1;for(r=this.buffer[s];r===" ";)r=this.buffer[++s];if(r===" "){for(;r===" "||r===" "||r==="\r"||r===`
|
|
154
|
+
`;)r=this.buffer[++s];t=s-1}else if(!this.blockScalarKeep)do{let i=t-1,a=this.buffer[i];a==="\r"&&(a=this.buffer[--i]);const o=i;for(;a===" ";)a=this.buffer[--i];if(a===`
|
|
155
|
+
`&&i>=this.pos&&i+1+n>o)t=i;else break}while(!0);return yield _l,yield*this.pushToIndex(t+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const t=this.flowLevel>0;let n=this.pos-1,r=this.pos-1,s;for(;s=this.buffer[++r];)if(s===":"){const i=this.buffer[r+1];if(It(i)||t&&Zi.has(i))break;n=r}else if(It(s)){let i=this.buffer[r+1];if(s==="\r"&&(i===`
|
|
156
|
+
`?(r+=1,s=`
|
|
157
|
+
`,i=this.buffer[r+1]):n=r),i==="#"||t&&Zi.has(i))break;if(s===`
|
|
158
|
+
`){const a=this.continueScalar(r+1);if(a===-1)break;r=Math.max(r,a-2)}}else{if(t&&Zi.has(s))break;n=r}return!s&&!this.atEnd?this.setNext("plain-scalar"):(yield _l,yield*this.pushToIndex(n+1,!0),t?"flow":"doc")}*pushCount(t){return t>0?(yield this.buffer.substr(this.pos,t),this.pos+=t,t):0}*pushToIndex(t,n){const r=this.buffer.slice(this.pos,t);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(Ml))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const t=this.flowLevel>0,n=this.charAt(1);if(It(n)||t&&Zi.has(n))return t?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 t=this.pos+2,n=this.buffer[t];for(;!It(n)&&n!==">";)n=this.buffer[++t];return yield*this.pushToIndex(n===">"?t+1:t,!1)}else{let t=this.pos+1,n=this.buffer[t];for(;n;)if(vb.has(n))n=this.buffer[++t];else if(n==="%"&&a1.has(this.buffer[t+1])&&a1.has(this.buffer[t+2]))n=this.buffer[t+=3];else break;return yield*this.pushToIndex(t,!1)}}*pushNewline(){const t=this.buffer[this.pos];return t===`
|
|
159
|
+
`?yield*this.pushCount(1):t==="\r"&&this.charAt(1)===`
|
|
160
|
+
`?yield*this.pushCount(2):0}*pushSpaces(t){let n=this.pos-1,r;do r=this.buffer[++n];while(r===" "||t&&r===" ");const s=n-this.pos;return s>0&&(yield this.buffer.substr(this.pos,s),this.pos=n),s}*pushUntil(t){let n=this.pos,r=this.buffer[n];for(;!t(r);)r=this.buffer[++n];return yield*this.pushToIndex(n,!1)}}class o1{constructor(){this.lineStarts=[],this.addNewLine=t=>this.lineStarts.push(t),this.linePos=t=>{let n=0,r=this.lineStarts.length;for(;n<r;){const i=n+r>>1;this.lineStarts[i]<t?n=i+1:r=i}if(this.lineStarts[n]===t)return{line:n+1,col:1};if(n===0)return{line:0,col:t};const s=this.lineStarts[n-1];return{line:n,col:t-s+1}}}}function _n(e,t){for(let n=0;n<e.length;++n)if(e[n].type===t)return!0;return!1}function l1(e){for(let t=0;t<e.length;++t)switch(e[t].type){case"space":case"comment":case"newline":break;default:return t}return-1}function u1(e){switch(e==null?void 0:e.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function ea(e){switch(e.type){case"document":return e.start;case"block-map":{const t=e.items[e.items.length-1];return t.sep??t.start}case"block-seq":return e.items[e.items.length-1].start;default:return[]}}function Zr(e){var n;if(e.length===0)return[];let t=e.length;e:for(;--t>=0;)switch(e[t].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;((n=e[++t])==null?void 0:n.type)==="space";);return e.splice(t,e.length)}function c1(e){if(e.start.type==="flow-seq-start")for(const t of e.items)t.sep&&!t.value&&!_n(t.start,"explicit-key-ind")&&!_n(t.sep,"map-value-ind")&&(t.key&&(t.value=t.key),delete t.key,u1(t.value)?t.value.end?Array.prototype.push.apply(t.value.end,t.sep):t.value.end=t.sep:Array.prototype.push.apply(t.start,t.sep),delete t.sep)}class Ol{constructor(t){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new Sb,this.onNewLine=t}*parse(t,n=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(const r of this.lexer.lex(t,n))yield*this.next(r);n||(yield*this.end())}*next(t){if(this.source=t,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=t.length;return}const n=wb(t);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+t.length);break;case"space":this.atNewLine&&t[0]===" "&&(this.indent+=t.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=t.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=t.length}else{const r=`Not a YAML token: ${t}`;yield*this.pop({type:"error",offset:this.offset,message:r,source:t}),this.offset+=t.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 t=this.peek(1);if(this.type==="doc-end"&&(t==null?void 0:t.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(!t)return yield*this.stream();switch(t.type){case"document":return yield*this.document(t);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(t);case"block-scalar":return yield*this.blockScalar(t);case"block-map":return yield*this.blockMap(t);case"block-seq":return yield*this.blockSequence(t);case"flow-collection":return yield*this.flowCollection(t);case"doc-end":return yield*this.documentEnd(t)}yield*this.pop()}peek(t){return this.stack[this.stack.length-t]}*pop(t){const n=t??this.stack.pop();if(!n)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else 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"&&c1(n),r.type){case"document":r.value=n;break;case"block-scalar":r.props.push(n);break;case"block-map":{const s=r.items[r.items.length-1];if(s.value){r.items.push({start:[],key:n,sep:[]}),this.onKeyLine=!0;return}else if(s.sep)s.value=n;else{Object.assign(s,{key:n,sep:[]}),this.onKeyLine=!s.explicitKey;return}break}case"block-seq":{const s=r.items[r.items.length-1];s.value?r.items.push({start:[],value:n}):s.value=n;break}case"flow-collection":{const s=r.items[r.items.length-1];!s||s.value?r.items.push({start:[],key:n,sep:[]}):s.sep?s.value=n:Object.assign(s,{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 s=n.items[n.items.length-1];s&&!s.sep&&!s.value&&s.start.length>0&&l1(s.start)===-1&&(n.indent===0||s.start.every(i=>i.type!=="comment"||i.indent<n.indent))&&(r.type==="document"?r.end=s.start:r.items.push({start:s.start}),n.items.splice(-1,1))}}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{const t={type:"document",offset:this.offset,start:[]};this.type==="doc-start"&&t.start.push(this.sourceToken),this.stack.push(t);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(t){if(t.value)return yield*this.lineEnd(t);switch(this.type){case"doc-start":{l1(t.start)!==-1?(yield*this.pop(),yield*this.step()):t.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":t.start.push(this.sourceToken);return}const n=this.startBlockValue(t);n?this.stack.push(n):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(t){if(this.type==="map-value-ind"){const n=ea(this.peek(2)),r=Zr(n);let s;t.end?(s=t.end,s.push(this.sourceToken),delete t.end):s=[this.sourceToken];const i={type:"block-map",offset:t.offset,indent:t.indent,items:[{start:r,key:t,sep:s}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=i}else yield*this.lineEnd(t)}*blockScalar(t){switch(this.type){case"space":case"comment":case"newline":t.props.push(this.sourceToken);return;case"scalar":if(t.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let n=this.source.indexOf(`
|
|
161
|
+
`)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
|
|
162
|
+
`,n)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(t){var r;const n=t.items[t.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,n.value){const s="end"in n.value?n.value.end:void 0,i=Array.isArray(s)?s[s.length-1]:void 0;(i==null?void 0:i.type)==="comment"?s==null||s.push(this.sourceToken):t.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)t.items.push({start:[this.sourceToken]});else if(n.sep)n.sep.push(this.sourceToken);else{if(this.atIndentedComment(n.start,t.indent)){const s=t.items[t.items.length-2],i=(r=s==null?void 0:s.value)==null?void 0:r.end;if(Array.isArray(i)){Array.prototype.push.apply(i,n.start),i.push(this.sourceToken),t.items.pop();return}}n.start.push(this.sourceToken)}return}if(this.indent>=t.indent){const s=!this.onKeyLine&&this.indent===t.indent,i=s&&(n.sep||n.explicitKey)&&this.type!=="seq-item-ind";let a=[];if(i&&n.sep&&!n.value){const o=[];for(let l=0;l<n.sep.length;++l){const u=n.sep[l];switch(u.type){case"newline":o.push(l);break;case"space":break;case"comment":u.indent>t.indent&&(o.length=0);break;default:o.length=0}}o.length>=2&&(a=n.sep.splice(o[1]))}switch(this.type){case"anchor":case"tag":i||n.value?(a.push(this.sourceToken),t.items.push({start:a}),this.onKeyLine=!0):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"explicit-key-ind":!n.sep&&!n.explicitKey?(n.start.push(this.sourceToken),n.explicitKey=!0):i||n.value?(a.push(this.sourceToken),t.items.push({start:a,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(n.explicitKey)if(n.sep)if(n.value)t.items.push({start:[],key:null,sep:[this.sourceToken]});else if(_n(n.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:a,key:null,sep:[this.sourceToken]}]});else if(u1(n.key)&&!_n(n.sep,"newline")){const o=Zr(n.start),l=n.key,u=n.sep;u.push(this.sourceToken),delete n.key,delete n.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:l,sep:u}]})}else a.length>0?n.sep=n.sep.concat(a,this.sourceToken):n.sep.push(this.sourceToken);else if(_n(n.start,"newline"))Object.assign(n,{key:null,sep:[this.sourceToken]});else{const o=Zr(n.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:null,sep:[this.sourceToken]}]})}else n.sep?n.value||i?t.items.push({start:a,key:null,sep:[this.sourceToken]}):_n(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 o=this.flowScalar(this.type);i||n.value?(t.items.push({start:a,key:o,sep:[]}),this.onKeyLine=!0):n.sep?this.stack.push(o):(Object.assign(n,{key:o,sep:[]}),this.onKeyLine=!0);return}default:{const o=this.startBlockValue(t);if(o){if(o.type==="block-seq"){if(!n.explicitKey&&n.sep&&!_n(n.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else s&&t.items.push({start:a});this.stack.push(o);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(t){var r;const n=t.items[t.items.length-1];switch(this.type){case"newline":if(n.value){const s="end"in n.value?n.value.end:void 0,i=Array.isArray(s)?s[s.length-1]:void 0;(i==null?void 0:i.type)==="comment"?s==null||s.push(this.sourceToken):t.items.push({start:[this.sourceToken]})}else n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)t.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(n.start,t.indent)){const s=t.items[t.items.length-2],i=(r=s==null?void 0:s.value)==null?void 0:r.end;if(Array.isArray(i)){Array.prototype.push.apply(i,n.start),i.push(this.sourceToken),t.items.pop();return}}n.start.push(this.sourceToken)}return;case"anchor":case"tag":if(n.value||this.indent<=t.indent)break;n.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==t.indent)break;n.value||_n(n.start,"seq-item-ind")?t.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return}if(this.indent>t.indent){const s=this.startBlockValue(t);if(s){this.stack.push(s);return}}yield*this.pop(),yield*this.step()}*flowCollection(t){const n=t.items[t.items.length-1];if(this.type==="flow-error-end"){let r;do yield*this.pop(),r=this.peek(1);while((r==null?void 0:r.type)==="flow-collection")}else if(t.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!n||n.sep?t.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return;case"map-value-ind":!n||n.value?t.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?t.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 s=this.flowScalar(this.type);!n||n.value?t.items.push({start:[],key:s,sep:[]}):n.sep?this.stack.push(s):Object.assign(n,{key:s,sep:[]});return}case"flow-map-end":case"flow-seq-end":t.end.push(this.sourceToken);return}const r=this.startBlockValue(t);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===t.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 s=ea(r),i=Zr(s);c1(t);const a=t.end.splice(1,t.end.length);a.push(this.sourceToken);const o={type:"block-map",offset:t.offset,indent:t.indent,items:[{start:i,key:t,sep:a}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=o}else yield*this.lineEnd(t)}}flowScalar(t){if(this.onNewLine){let n=this.source.indexOf(`
|
|
163
|
+
`)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
|
|
164
|
+
`,n)+1}return{type:t,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(t){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=ea(t),r=Zr(n);return r.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const n=ea(t),r=Zr(n);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(t,n){return this.type!=="comment"||this.indent<=n?!1:t.every(r=>r.type==="newline"||r.type==="space")}*documentEnd(t){this.type!=="doc-mode"&&(t.end?t.end.push(this.sourceToken):t.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(t){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:t.end?t.end.push(this.sourceToken):t.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}}function Eb(e){const t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new o1||null,prettyErrors:t}}function Ab(e,t={}){const{lineCounter:n,prettyErrors:r}=Eb(t),s=new Ol(n==null?void 0:n.addNewLine),i=new Zd(t);let a=null;for(const o of i.compose(s.parse(e),!0,e.length))if(!a)a=o;else if(a.options.logLevel!=="silent"){a.errors.push(new Vs(o.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return r&&n&&(a.errors.forEach(Yd(e,n)),a.warnings.forEach(Yd(e,n))),a}function xb(e,t,n){let r;const s=Ab(e,n);if(!s)return null;if(s.warnings.forEach(i=>Sd(s.options.logLevel,i)),s.errors.length>0){if(s.options.logLevel!=="silent")throw s.errors[0];s.errors=[]}return s.toJS(Object.assign({reviver:r},n))}function Nb(e,t,n){let r=null;if(Array.isArray(t)?r=t:n===void 0&&t&&(n=t),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(e===void 0){const{keepUndefined:s}=n??t??{};if(!s)return}return Ur(e)&&!r?e.toString(n):new Bs(e,r,n).toString(n)}var Rl,f1;function Lb(){if(f1)return Rl;f1=1;function e(s){if(typeof s!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(s))}function t(s,i){for(var a="",o=0,l=-1,u=0,c,f=0;f<=s.length;++f){if(f<s.length)c=s.charCodeAt(f);else{if(c===47)break;c=47}if(c===47){if(!(l===f-1||u===1))if(l!==f-1&&u===2){if(a.length<2||o!==2||a.charCodeAt(a.length-1)!==46||a.charCodeAt(a.length-2)!==46){if(a.length>2){var d=a.lastIndexOf("/");if(d!==a.length-1){d===-1?(a="",o=0):(a=a.slice(0,d),o=a.length-1-a.lastIndexOf("/")),l=f,u=0;continue}}else if(a.length===2||a.length===1){a="",o=0,l=f,u=0;continue}}i&&(a.length>0?a+="/..":a="..",o=2)}else a.length>0?a+="/"+s.slice(l+1,f):a=s.slice(l+1,f),o=f-l-1;l=f,u=0}else c===46&&u!==-1?++u:u=-1}return a}function n(s,i){var a=i.dir||i.root,o=i.base||(i.name||"")+(i.ext||"");return a?a===i.root?a+o:a+s+o:o}var r={resolve:function(){for(var i="",a=!1,o,l=arguments.length-1;l>=-1&&!a;l--){var u;l>=0?u=arguments[l]:(o===void 0&&(o=process.cwd()),u=o),e(u),u.length!==0&&(i=u+"/"+i,a=u.charCodeAt(0)===47)}return i=t(i,!a),a?i.length>0?"/"+i:"/":i.length>0?i:"."},normalize:function(i){if(e(i),i.length===0)return".";var a=i.charCodeAt(0)===47,o=i.charCodeAt(i.length-1)===47;return i=t(i,!a),i.length===0&&!a&&(i="."),i.length>0&&o&&(i+="/"),a?"/"+i:i},isAbsolute:function(i){return e(i),i.length>0&&i.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var i,a=0;a<arguments.length;++a){var o=arguments[a];e(o),o.length>0&&(i===void 0?i=o:i+="/"+o)}return i===void 0?".":r.normalize(i)},relative:function(i,a){if(e(i),e(a),i===a||(i=r.resolve(i),a=r.resolve(a),i===a))return"";for(var o=1;o<i.length&&i.charCodeAt(o)===47;++o);for(var l=i.length,u=l-o,c=1;c<a.length&&a.charCodeAt(c)===47;++c);for(var f=a.length,d=f-c,y=u<d?u:d,D=-1,S=0;S<=y;++S){if(S===y){if(d>y){if(a.charCodeAt(c+S)===47)return a.slice(c+S+1);if(S===0)return a.slice(c+S)}else u>y&&(i.charCodeAt(o+S)===47?D=S:S===0&&(D=0));break}var N=i.charCodeAt(o+S),x=a.charCodeAt(c+S);if(N!==x)break;N===47&&(D=S)}var k="";for(S=o+D+1;S<=l;++S)(S===l||i.charCodeAt(S)===47)&&(k.length===0?k+="..":k+="/..");return k.length>0?k+a.slice(c+D):(c+=D,a.charCodeAt(c)===47&&++c,a.slice(c))},_makeLong:function(i){return i},dirname:function(i){if(e(i),i.length===0)return".";for(var a=i.charCodeAt(0),o=a===47,l=-1,u=!0,c=i.length-1;c>=1;--c)if(a=i.charCodeAt(c),a===47){if(!u){l=c;break}}else u=!1;return l===-1?o?"/":".":o&&l===1?"//":i.slice(0,l)},basename:function(i,a){if(a!==void 0&&typeof a!="string")throw new TypeError('"ext" argument must be a string');e(i);var o=0,l=-1,u=!0,c;if(a!==void 0&&a.length>0&&a.length<=i.length){if(a.length===i.length&&a===i)return"";var f=a.length-1,d=-1;for(c=i.length-1;c>=0;--c){var y=i.charCodeAt(c);if(y===47){if(!u){o=c+1;break}}else d===-1&&(u=!1,d=c+1),f>=0&&(y===a.charCodeAt(f)?--f===-1&&(l=c):(f=-1,l=d))}return o===l?l=d:l===-1&&(l=i.length),i.slice(o,l)}else{for(c=i.length-1;c>=0;--c)if(i.charCodeAt(c)===47){if(!u){o=c+1;break}}else l===-1&&(u=!1,l=c+1);return l===-1?"":i.slice(o,l)}},extname:function(i){e(i);for(var a=-1,o=0,l=-1,u=!0,c=0,f=i.length-1;f>=0;--f){var d=i.charCodeAt(f);if(d===47){if(!u){o=f+1;break}continue}l===-1&&(u=!1,l=f+1),d===46?a===-1?a=f:c!==1&&(c=1):a!==-1&&(c=-1)}return a===-1||l===-1||c===0||c===1&&a===l-1&&a===o+1?"":i.slice(a,l)},format:function(i){if(i===null||typeof i!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof i);return n("/",i)},parse:function(i){e(i);var a={root:"",dir:"",base:"",ext:"",name:""};if(i.length===0)return a;var o=i.charCodeAt(0),l=o===47,u;l?(a.root="/",u=1):u=0;for(var c=-1,f=0,d=-1,y=!0,D=i.length-1,S=0;D>=u;--D){if(o=i.charCodeAt(D),o===47){if(!y){f=D+1;break}continue}d===-1&&(y=!1,d=D+1),o===46?c===-1?c=D:S!==1&&(S=1):c!==-1&&(S=-1)}return c===-1||d===-1||S===0||S===1&&c===d-1&&c===f+1?d!==-1&&(f===0&&l?a.base=a.name=i.slice(1,d):a.base=a.name=i.slice(f,d)):(f===0&&l?(a.name=i.slice(1,c),a.base=i.slice(1,d)):(a.name=i.slice(f,c),a.base=i.slice(f,d)),a.ext=i.slice(c,d)),f>0?a.dir=i.slice(0,f-1):l&&(a.dir="/"),a},sep:"/",delimiter:":",win32:null,posix:null};return r.posix=r,Rl=r,Rl}var er=Lb(),kb=Object.create,ta=Object.defineProperty,Cb=Object.getOwnPropertyDescriptor,Fb=Object.getOwnPropertyNames,_b=Object.getPrototypeOf,Tb=Object.prototype.hasOwnProperty,h1=e=>{throw TypeError(e)},Mb=(e,t,n)=>t in e?ta(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,dn=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),d1=(e,t)=>{for(var n in t)ta(e,n,{get:t[n],enumerable:!0})},Ob=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Fb(t))!Tb.call(e,s)&&s!==n&&ta(e,s,{get:()=>t[s],enumerable:!(r=Cb(t,s))||r.enumerable});return e},Pl=(e,t,n)=>(n=e!=null?kb(_b(e)):{},Ob(ta(n,"default",{value:e,enumerable:!0}),e)),m1=(e,t,n)=>Mb(e,typeof t!="symbol"?t+"":t,n),Il=(e,t,n)=>t.has(e)||h1("Cannot "+n),Ws=(e,t,n)=>(Il(e,t,"read from private field"),n?n.call(e):t.get(e)),$l=(e,t,n)=>t.has(e)?h1("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),p1=(e,t,n,r)=>(Il(e,t,"write to private field"),t.set(e,n),n),na=(e,t,n)=>(Il(e,t,"access private method"),n),tr=dn(e=>{var t={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:",s={MAP:"tag:yaml.org,2002:map",SEQ:"tag:yaml.org,2002:seq",STR:"tag:yaml.org,2002:str"};function i(b){let w=[0],h=b.indexOf(`
|
|
165
|
+
`);for(;h!==-1;)h+=1,w.push(h),h=b.indexOf(`
|
|
166
|
+
`,h);return w}function a(b){let w,h;return typeof b=="string"?(w=i(b),h=b):(Array.isArray(b)&&(b=b[0]),b&&b.context&&(b.lineStarts||(b.lineStarts=i(b.context.src)),w=b.lineStarts,h=b.context.src)),{lineStarts:w,src:h}}function o(b,w){if(typeof b!="number"||b<0)return null;let{lineStarts:h,src:g}=a(w);if(!h||!g||b>g.length)return null;for(let E=0;E<h.length;++E){let v=h[E];if(b<v)return{line:E,col:b-h[E-1]+1};if(b===v)return{line:E+1,col:1}}let m=h.length;return{line:m,col:b-h[m-1]+1}}function l(b,w){let{lineStarts:h,src:g}=a(w);if(!h||!(b>=1)||b>h.length)return null;let m=h[b-1],E=h[b];for(;E&&E>m&&g[E-1]===`
|
|
167
|
+
`;)--E;return g.slice(m,E)}function u({start:b,end:w},h,g=80){let m=l(b.line,h);if(!m)return null;let{col:E}=b;if(m.length>g)if(E<=g-10)m=m.substr(0,g-1)+"…";else{let F=Math.round(g/2);m.length>E+F&&(m=m.substr(0,E+F-1)+"…"),E-=m.length-g,m="…"+m.substr(1-g)}let v=1,L="";w&&(w.line===b.line&&E+(w.col-b.col)<=g+1?v=w.col-b.col:(v=Math.min(m.length+1,g)-E,L="…"));let C=E>1?" ".repeat(E-1):"",A="^".repeat(v);return`${m}
|
|
168
|
+
${C}${A}${L}`}var c=class hg{static copy(w){return new hg(w.start,w.end)}constructor(w,h){this.start=w,this.end=h||w}isEmpty(){return typeof this.start!="number"||!this.end||this.end<=this.start}setOrigRange(w,h){let{start:g,end:m}=this;if(w.length===0||m<=w[0])return this.origStart=g,this.origEnd=m,h;let E=h;for(;E<w.length&&!(w[E]>g);)++E;this.origStart=g+E;let v=E;for(;E<w.length&&!(w[E]>=m);)++E;return this.origEnd=m+E,v}},f=class An{static addStringTerminator(w,h,g){if(g[g.length-1]===`
|
|
169
|
+
`)return g;let m=An.endOfWhiteSpace(w,h);return m>=w.length||w[m]===`
|
|
170
|
+
`?g+`
|
|
171
|
+
`:g}static atDocumentBoundary(w,h,g){let m=w[h];if(!m)return!0;let E=w[h-1];if(E&&E!==`
|
|
172
|
+
`)return!1;if(g){if(m!==g)return!1}else if(m!==t.DIRECTIVES_END&&m!==t.DOCUMENT_END)return!1;let v=w[h+1],L=w[h+2];if(v!==m||L!==m)return!1;let C=w[h+3];return!C||C===`
|
|
173
|
+
`||C===" "||C===" "}static endOfIdentifier(w,h){let g=w[h],m=g==="<",E=m?[`
|
|
174
|
+
`," "," ",">"]:[`
|
|
175
|
+
`," "," ","[","]","{","}",","];for(;g&&E.indexOf(g)===-1;)g=w[h+=1];return m&&g===">"&&(h+=1),h}static endOfIndent(w,h){let g=w[h];for(;g===" ";)g=w[h+=1];return h}static endOfLine(w,h){let g=w[h];for(;g&&g!==`
|
|
176
|
+
`;)g=w[h+=1];return h}static endOfWhiteSpace(w,h){let g=w[h];for(;g===" "||g===" ";)g=w[h+=1];return h}static startOfLine(w,h){let g=w[h-1];if(g===`
|
|
177
|
+
`)return h;for(;g&&g!==`
|
|
178
|
+
`;)g=w[h-=1];return h+1}static endOfBlockIndent(w,h,g){let m=An.endOfIndent(w,g);if(m>g+h)return m;{let E=An.endOfWhiteSpace(w,m),v=w[E];if(!v||v===`
|
|
179
|
+
`)return E}return null}static atBlank(w,h,g){let m=w[h];return m===`
|
|
180
|
+
`||m===" "||m===" "||g&&!m}static nextNodeIsIndented(w,h,g){return!w||h<0?!1:h>0?!0:g&&w==="-"}static normalizeOffset(w,h){let g=w[h];return g?g!==`
|
|
181
|
+
`&&w[h-1]===`
|
|
182
|
+
`?h-1:An.endOfWhiteSpace(w,h):h}static foldNewline(w,h,g){let m=0,E=!1,v="",L=w[h+1];for(;L===" "||L===" "||L===`
|
|
183
|
+
`;){switch(L){case`
|
|
184
|
+
`:m=0,h+=1,v+=`
|
|
185
|
+
`;break;case" ":m<=g&&(E=!0),h=An.endOfWhiteSpace(w,h+2)-1;break;case" ":m+=1,h+=1;break}L=w[h+1]}return v||(v=" "),L&&m<=g&&(E=!0),{fold:v,offset:h,error:E}}constructor(w,h,g){Object.defineProperty(this,"context",{value:g||null,writable:!0}),this.error=null,this.range=null,this.valueRange=null,this.props=h||[],this.type=w,this.value=null}getPropValue(w,h,g){if(!this.context)return null;let{src:m}=this.context,E=this.props[w];return E&&m[E.start]===h?m.slice(E.start+(g?1:0),E.end):null}get anchor(){for(let w=0;w<this.props.length;++w){let h=this.getPropValue(w,t.ANCHOR,!0);if(h!=null)return h}return null}get comment(){let w=[];for(let h=0;h<this.props.length;++h){let g=this.getPropValue(h,t.COMMENT,!0);g!=null&&w.push(g)}return w.length>0?w.join(`
|
|
186
|
+
`):null}commentHasRequiredWhitespace(w){let{src:h}=this.context;if(this.header&&w===this.header.end||!this.valueRange)return!1;let{end:g}=this.valueRange;return w!==g||An.atBlank(h,g-1)}get hasComment(){if(this.context){let{src:w}=this.context;for(let h=0;h<this.props.length;++h)if(w[this.props[h].start]===t.COMMENT)return!0}return!1}get hasProps(){if(this.context){let{src:w}=this.context;for(let h=0;h<this.props.length;++h)if(w[this.props[h].start]!==t.COMMENT)return!0}return!1}get includesTrailingLines(){return!1}get jsonLike(){return[n.FLOW_MAP,n.FLOW_SEQ,n.QUOTE_DOUBLE,n.QUOTE_SINGLE].indexOf(this.type)!==-1}get rangeAsLinePos(){if(!this.range||!this.context)return;let w=o(this.range.start,this.context.root);if(!w)return;let h=o(this.range.end,this.context.root);return{start:w,end:h}}get rawValue(){if(!this.valueRange||!this.context)return null;let{start:w,end:h}=this.valueRange;return this.context.src.slice(w,h)}get tag(){for(let w=0;w<this.props.length;++w){let h=this.getPropValue(w,t.TAG,!1);if(h!=null){if(h[1]==="<")return{verbatim:h.slice(2,-1)};{let[g,m,E]=h.match(/^(.*!)([^!]*)$/);return{handle:m,suffix:E}}}}return null}get valueRangeContainsNewline(){if(!this.valueRange||!this.context)return!1;let{start:w,end:h}=this.valueRange,{src:g}=this.context;for(let m=w;m<h;++m)if(g[m]===`
|
|
187
|
+
`)return!0;return!1}parseComment(w){let{src:h}=this.context;if(h[w]===t.COMMENT){let g=An.endOfLine(h,w+1),m=new c(w,g);return this.props.push(m),g}return w}setOrigRanges(w,h){return this.range&&(h=this.range.setOrigRange(w,h)),this.valueRange&&this.valueRange.setOrigRange(w,h),this.props.forEach(g=>g.setOrigRange(w,h)),h}toString(){let{context:{src:w},range:h,value:g}=this;if(g!=null)return g;let m=w.slice(h.start,h.end);return An.addStringTerminator(w,h.end,m)}},d=class extends Error{constructor(b,w,h){if(!h||!(w instanceof f))throw new Error(`Invalid arguments for new ${b}`);super(),this.name=b,this.message=h,this.source=w}makePretty(){if(!this.source)return;this.nodeType=this.source.type;let b=this.source.context&&this.source.context.root;if(typeof this.offset=="number"){this.range=new c(this.offset,this.offset+1);let w=b&&o(this.offset,b);if(w){let h={line:w.line,col:w.col+1};this.linePos={start:w,end:h}}delete this.offset}else this.range=this.source.range,this.linePos=this.source.rangeAsLinePos;if(this.linePos){let{line:w,col:h}=this.linePos.start;this.message+=` at line ${w}, column ${h}`;let g=b&&u(this.linePos,b);g&&(this.message+=`:
|
|
188
|
+
|
|
189
|
+
${g}
|
|
190
|
+
`)}delete this.source}},y=class extends d{constructor(b,w){super("YAMLReferenceError",b,w)}},D=class extends d{constructor(b,w){super("YAMLSemanticError",b,w)}},S=class extends d{constructor(b,w){super("YAMLSyntaxError",b,w)}},N=class extends d{constructor(b,w){super("YAMLWarning",b,w)}};function x(b,w,h){return w in b?Object.defineProperty(b,w,{value:h,enumerable:!0,configurable:!0,writable:!0}):b[w]=h,b}var k=class Zu extends f{static endOfLine(w,h,g){let m=w[h],E=h;for(;m&&m!==`
|
|
191
|
+
`&&!(g&&(m==="["||m==="]"||m==="{"||m==="}"||m===","));){let v=w[E+1];if(m===":"&&(!v||v===`
|
|
192
|
+
`||v===" "||v===" "||g&&v===",")||(m===" "||m===" ")&&v==="#")break;E+=1,m=v}return E}get strValue(){if(!this.valueRange||!this.context)return null;let{start:w,end:h}=this.valueRange,{src:g}=this.context,m=g[h-1];for(;w<h&&(m===`
|
|
193
|
+
`||m===" "||m===" ");)m=g[--h-1];let E="";for(let L=w;L<h;++L){let C=g[L];if(C===`
|
|
194
|
+
`){let{fold:A,offset:F}=f.foldNewline(g,L,-1);E+=A,L=F}else if(C===" "||C===" "){let A=L,F=g[L+1];for(;L<h&&(F===" "||F===" ");)L+=1,F=g[L+1];F!==`
|
|
195
|
+
`&&(E+=L>A?g.slice(A,L+1):C)}else E+=C}let v=g[w];switch(v){case" ":{let L="Plain value cannot start with a tab character";return{errors:[new D(this,L)],str:E}}case"@":case"`":{let L=`Plain value cannot start with reserved character ${v}`;return{errors:[new D(this,L)],str:E}}default:return E}}parseBlockValue(w){let{indent:h,inFlow:g,src:m}=this.context,E=w,v=w;for(let L=m[E];L===`
|
|
196
|
+
`&&!f.atDocumentBoundary(m,E+1);L=m[E]){let C=f.endOfBlockIndent(m,h,E+1);if(C===null||m[C]==="#")break;m[C]===`
|
|
197
|
+
`?E=C:(v=Zu.endOfLine(m,C,g),E=v)}return this.valueRange.isEmpty()&&(this.valueRange.start=w),this.valueRange.end=v,v}parse(w,h){this.context=w;let{inFlow:g,src:m}=w,E=h,v=m[E];return v&&v!=="#"&&v!==`
|
|
198
|
+
`&&(E=Zu.endOfLine(m,h,g)),this.valueRange=new c(h,E),E=f.endOfWhiteSpace(m,E),E=this.parseComment(E),(!this.hasComment||this.valueRange.isEmpty())&&(E=this.parseBlockValue(E)),E}};e.Char=t,e.Node=f,e.PlainValue=k,e.Range=c,e.Type=n,e.YAMLError=d,e.YAMLReferenceError=y,e.YAMLSemanticError=D,e.YAMLSyntaxError=S,e.YAMLWarning=N,e._defineProperty=x,e.defaultTagPrefix=r,e.defaultTags=s}),Rb=dn(e=>{var t=tr(),n=class extends t.Node{constructor(){super(t.Type.BLANK_LINE)}get includesTrailingLines(){return!0}parse(k,b){return this.context=k,this.range=new t.Range(b,b+1),b+1}},r=class extends t.Node{constructor(k,b){super(k,b),this.node=null}get includesTrailingLines(){return!!this.node&&this.node.includesTrailingLines}parse(k,b){this.context=k;let{parseNode:w,src:h}=k,{atLineStart:g,lineStart:m}=k;!g&&this.type===t.Type.SEQ_ITEM&&(this.error=new t.YAMLSemanticError(this,"Sequence items must not have preceding content on the same line"));let E=g?b-m:k.indent,v=t.Node.endOfWhiteSpace(h,b+1),L=h[v],C=L==="#",A=[],F=null;for(;L===`
|
|
199
|
+
`||L==="#";){if(L==="#"){let T=t.Node.endOfLine(h,v+1);A.push(new t.Range(v,T)),v=T}else{g=!0,m=v+1;let T=t.Node.endOfWhiteSpace(h,m);h[T]===`
|
|
200
|
+
`&&A.length===0&&(F=new n,m=F.parse({src:h},m)),v=t.Node.endOfIndent(h,m)}L=h[v]}if(t.Node.nextNodeIsIndented(L,v-(m+E),this.type!==t.Type.SEQ_ITEM)?this.node=w({atLineStart:g,inCollection:!1,indent:E,lineStart:m,parent:this},v):L&&m>b+1&&(v=m-1),this.node){if(F){let T=k.parent.items||k.parent.contents;T&&T.push(F)}A.length&&Array.prototype.push.apply(this.props,A),v=this.node.range.end}else if(C){let T=A[0];this.props.push(T),v=T.end}else v=t.Node.endOfLine(h,b+1);let M=this.node?this.node.valueRange.end:v;return this.valueRange=new t.Range(b,M),v}setOrigRanges(k,b){return b=super.setOrigRanges(k,b),this.node?this.node.setOrigRanges(k,b):b}toString(){let{context:{src:k},node:b,range:w,value:h}=this;if(h!=null)return h;let g=b?k.slice(w.start,b.range.start)+String(b):k.slice(w.start,w.end);return t.Node.addStringTerminator(k,w.end,g)}},s=class extends t.Node{constructor(){super(t.Type.COMMENT)}parse(k,b){this.context=k;let w=this.parseComment(b);return this.range=new t.Range(b,w),w}};function i(k){let b=k;for(;b instanceof r;)b=b.node;if(!(b instanceof a))return null;let w=b.items.length,h=-1;for(let E=w-1;E>=0;--E){let v=b.items[E];if(v.type===t.Type.COMMENT){let{indent:L,lineStart:C}=v.context;if(L>0&&v.range.start>=C+L)break;h=E}else if(v.type===t.Type.BLANK_LINE)h=E;else break}if(h===-1)return null;let g=b.items.splice(h,w-h),m=g[0].range.start;for(;b.range.end=m,b.valueRange&&b.valueRange.end>m&&(b.valueRange.end=m),b!==k;)b=b.context.parent;return g}var a=class ec extends t.Node{static nextContentHasIndent(b,w,h){let g=t.Node.endOfLine(b,w)+1;w=t.Node.endOfWhiteSpace(b,g);let m=b[w];return m?w>=g+h?!0:m!=="#"&&m!==`
|
|
201
|
+
`?!1:ec.nextContentHasIndent(b,w,h):!1}constructor(b){super(b.type===t.Type.SEQ_ITEM?t.Type.SEQ:t.Type.MAP);for(let h=b.props.length-1;h>=0;--h)if(b.props[h].start<b.context.lineStart){this.props=b.props.slice(0,h+1),b.props=b.props.slice(h+1);let g=b.props[0]||b.valueRange;b.range.start=g.start;break}this.items=[b];let w=i(b);w&&Array.prototype.push.apply(this.items,w)}get includesTrailingLines(){return this.items.length>0}parse(b,w){this.context=b;let{parseNode:h,src:g}=b,m=t.Node.startOfLine(g,w),E=this.items[0];E.context.parent=this,this.valueRange=t.Range.copy(E.valueRange);let v=E.range.start-E.context.lineStart,L=w;L=t.Node.normalizeOffset(g,L);let C=g[L],A=t.Node.endOfWhiteSpace(g,m)===L,F=!1;for(;C;){for(;C===`
|
|
202
|
+
`||C==="#";){if(A&&C===`
|
|
203
|
+
`&&!F){let P=new n;if(L=P.parse({src:g},L),this.valueRange.end=L,L>=g.length){C=null;break}this.items.push(P),L-=1}else if(C==="#"){if(L<m+v&&!ec.nextContentHasIndent(g,L,v))return L;let P=new s;if(L=P.parse({indent:v,lineStart:m,src:g},L),this.items.push(P),this.valueRange.end=L,L>=g.length){C=null;break}}if(m=L+1,L=t.Node.endOfIndent(g,m),t.Node.atBlank(g,L)){let P=t.Node.endOfWhiteSpace(g,L),V=g[P];(!V||V===`
|
|
204
|
+
`||V==="#")&&(L=P)}C=g[L],A=!0}if(!C)break;if(L!==m+v&&(A||C!==":")){if(L<m+v){m>w&&(L=m);break}else if(!this.error){let P="All collection items must start at the same column";this.error=new t.YAMLSyntaxError(this,P)}}if(E.type===t.Type.SEQ_ITEM){if(C!=="-"){m>w&&(L=m);break}}else if(C==="-"&&!this.error){let P=g[L+1];if(!P||P===`
|
|
205
|
+
`||P===" "||P===" "){let V="A collection cannot be both a mapping and a sequence";this.error=new t.YAMLSyntaxError(this,V)}}let M=h({atLineStart:A,inCollection:!0,indent:v,lineStart:m,parent:this},L);if(!M)return L;if(this.items.push(M),this.valueRange.end=M.valueRange.end,L=t.Node.normalizeOffset(g,M.range.end),C=g[L],A=!1,F=M.includesTrailingLines,C){let P=L-1,V=g[P];for(;V===" "||V===" ";)V=g[--P];V===`
|
|
206
|
+
`&&(m=P+1,A=!0)}let T=i(M);T&&Array.prototype.push.apply(this.items,T)}return L}setOrigRanges(b,w){return w=super.setOrigRanges(b,w),this.items.forEach(h=>{w=h.setOrigRanges(b,w)}),w}toString(){let{context:{src:b},items:w,range:h,value:g}=this;if(g!=null)return g;let m=b.slice(h.start,w[0].range.start)+String(w[0]);for(let E=1;E<w.length;++E){let v=w[E],{atLineStart:L,indent:C}=v.context;if(L)for(let A=0;A<C;++A)m+=" ";m+=String(v)}return t.Node.addStringTerminator(b,h.end,m)}},o=class extends t.Node{constructor(){super(t.Type.DIRECTIVE),this.name=null}get parameters(){let k=this.rawValue;return k?k.trim().split(/[ \t]+/):[]}parseName(k){let{src:b}=this.context,w=k,h=b[w];for(;h&&h!==`
|
|
207
|
+
`&&h!==" "&&h!==" ";)h=b[w+=1];return this.name=b.slice(k,w),w}parseParameters(k){let{src:b}=this.context,w=k,h=b[w];for(;h&&h!==`
|
|
208
|
+
`&&h!=="#";)h=b[w+=1];return this.valueRange=new t.Range(k,w),w}parse(k,b){this.context=k;let w=this.parseName(b+1);return w=this.parseParameters(w),w=this.parseComment(w),this.range=new t.Range(b,w),w}},l=class tc extends t.Node{static startCommentOrEndBlankLine(b,w){let h=t.Node.endOfWhiteSpace(b,w),g=b[h];return g==="#"||g===`
|
|
209
|
+
`?h:w}constructor(){super(t.Type.DOCUMENT),this.directives=null,this.contents=null,this.directivesEndMarker=null,this.documentEndMarker=null}parseDirectives(b){let{src:w}=this.context;this.directives=[];let h=!0,g=!1,m=b;for(;!t.Node.atDocumentBoundary(w,m,t.Char.DIRECTIVES_END);)switch(m=tc.startCommentOrEndBlankLine(w,m),w[m]){case`
|
|
210
|
+
`:if(h){let E=new n;m=E.parse({src:w},m),m<w.length&&this.directives.push(E)}else m+=1,h=!0;break;case"#":{let E=new s;m=E.parse({src:w},m),this.directives.push(E),h=!1}break;case"%":{let E=new o;m=E.parse({parent:this,src:w},m),this.directives.push(E),g=!0,h=!1}break;default:return g?this.error=new t.YAMLSemanticError(this,"Missing directives-end indicator line"):this.directives.length>0&&(this.contents=this.directives,this.directives=[]),m}return w[m]?(this.directivesEndMarker=new t.Range(m,m+3),m+3):(g?this.error=new t.YAMLSemanticError(this,"Missing directives-end indicator line"):this.directives.length>0&&(this.contents=this.directives,this.directives=[]),m)}parseContents(b){let{parseNode:w,src:h}=this.context;this.contents||(this.contents=[]);let g=b;for(;h[g-1]==="-";)g-=1;let m=t.Node.endOfWhiteSpace(h,b),E=g===b;for(this.valueRange=new t.Range(m);!t.Node.atDocumentBoundary(h,m,t.Char.DOCUMENT_END);){switch(h[m]){case`
|
|
211
|
+
`:if(E){let v=new n;m=v.parse({src:h},m),m<h.length&&this.contents.push(v)}else m+=1,E=!0;g=m;break;case"#":{let v=new s;m=v.parse({src:h},m),this.contents.push(v),E=!1}break;default:{let v=t.Node.endOfIndent(h,m),L=w({atLineStart:E,indent:-1,inFlow:!1,inCollection:!1,lineStart:g,parent:this},v);if(!L)return this.valueRange.end=v;this.contents.push(L),m=L.range.end,E=!1;let C=i(L);C&&Array.prototype.push.apply(this.contents,C)}}m=tc.startCommentOrEndBlankLine(h,m)}if(this.valueRange.end=m,h[m]&&(this.documentEndMarker=new t.Range(m,m+3),m+=3,h[m])){if(m=t.Node.endOfWhiteSpace(h,m),h[m]==="#"){let v=new s;m=v.parse({src:h},m),this.contents.push(v)}switch(h[m]){case`
|
|
212
|
+
`:m+=1;break;case void 0:break;default:this.error=new t.YAMLSyntaxError(this,"Document end marker line cannot have a non-comment suffix")}}return m}parse(b,w){b.root=this,this.context=b;let{src:h}=b,g=h.charCodeAt(w)===65279?w+1:w;return g=this.parseDirectives(g),g=this.parseContents(g),g}setOrigRanges(b,w){return w=super.setOrigRanges(b,w),this.directives.forEach(h=>{w=h.setOrigRanges(b,w)}),this.directivesEndMarker&&(w=this.directivesEndMarker.setOrigRange(b,w)),this.contents.forEach(h=>{w=h.setOrigRanges(b,w)}),this.documentEndMarker&&(w=this.documentEndMarker.setOrigRange(b,w)),w}toString(){let{contents:b,directives:w,value:h}=this;if(h!=null)return h;let g=w.join("");return b.length>0&&((w.length>0||b[0].type===t.Type.COMMENT)&&(g+=`---
|
|
213
|
+
`),g+=b.join("")),g[g.length-1]!==`
|
|
214
|
+
`&&(g+=`
|
|
215
|
+
`),g}},u=class extends t.Node{parse(k,b){this.context=k;let{src:w}=k,h=t.Node.endOfIdentifier(w,b+1);return this.valueRange=new t.Range(b+1,h),h=t.Node.endOfWhiteSpace(w,h),h=this.parseComment(h),h}},c={CLIP:"CLIP",KEEP:"KEEP",STRIP:"STRIP"},f=class extends t.Node{constructor(k,b){super(k,b),this.blockIndent=null,this.chomping=c.CLIP,this.header=null}get includesTrailingLines(){return this.chomping===c.KEEP}get strValue(){if(!this.valueRange||!this.context)return null;let{start:k,end:b}=this.valueRange,{indent:w,src:h}=this.context;if(this.valueRange.isEmpty())return"";let g=null,m=h[b-1];for(;m===`
|
|
216
|
+
`||m===" "||m===" ";){if(b-=1,b<=k){if(this.chomping===c.KEEP)break;return""}m===`
|
|
217
|
+
`&&(g=b),m=h[b-1]}let E=b+1;g&&(this.chomping===c.KEEP?(E=g,b=this.valueRange.end):b=g);let v=w+this.blockIndent,L=this.type===t.Type.BLOCK_FOLDED,C=!0,A="",F="",M=!1;for(let T=k;T<b;++T){for(let V=0;V<v&&h[T]===" ";++V)T+=1;let P=h[T];if(P===`
|
|
218
|
+
`)F===`
|
|
219
|
+
`?A+=`
|
|
220
|
+
`:F=`
|
|
221
|
+
`;else{let V=t.Node.endOfLine(h,T),H=h.slice(T,V);T=V,L&&(P===" "||P===" ")&&T<E?(F===" "?F=`
|
|
222
|
+
`:!M&&!C&&F===`
|
|
223
|
+
`&&(F=`
|
|
224
|
+
|
|
225
|
+
`),A+=F+H,F=V<b&&h[V]||"",M=!0):(A+=F+H,F=L&&T<E?" ":`
|
|
226
|
+
`,M=!1),C&&H!==""&&(C=!1)}}return this.chomping===c.STRIP?A:A+`
|
|
227
|
+
`}parseBlockHeader(k){let{src:b}=this.context,w=k+1,h="";for(;;){let g=b[w];switch(g){case"-":this.chomping=c.STRIP;break;case"+":this.chomping=c.KEEP;break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":h+=g;break;default:return this.blockIndent=Number(h)||null,this.header=new t.Range(k,w),w}w+=1}}parseBlockValue(k){let{indent:b,src:w}=this.context,h=!!this.blockIndent,g=k,m=k,E=1;for(let v=w[g];v===`
|
|
228
|
+
`&&(g+=1,!t.Node.atDocumentBoundary(w,g));v=w[g]){let L=t.Node.endOfBlockIndent(w,b,g);if(L===null)break;let C=w[L],A=L-(g+b);if(this.blockIndent){if(C&&C!==`
|
|
229
|
+
`&&A<this.blockIndent){if(w[L]==="#")break;if(!this.error){let F=`Block scalars must not be less indented than their ${h?"explicit indentation indicator":"first line"}`;this.error=new t.YAMLSemanticError(this,F)}}}else if(w[L]!==`
|
|
230
|
+
`){if(A<E){let F="Block scalars with more-indented leading empty lines must use an explicit indentation indicator";this.error=new t.YAMLSemanticError(this,F)}this.blockIndent=A}else A>E&&(E=A);w[L]===`
|
|
231
|
+
`?g=L:g=m=t.Node.endOfLine(w,L)}return this.chomping!==c.KEEP&&(g=w[m]?m+1:m),this.valueRange=new t.Range(k+1,g),g}parse(k,b){this.context=k;let{src:w}=k,h=this.parseBlockHeader(b);return h=t.Node.endOfWhiteSpace(w,h),h=this.parseComment(h),h=this.parseBlockValue(h),h}setOrigRanges(k,b){return b=super.setOrigRanges(k,b),this.header?this.header.setOrigRange(k,b):b}},d=class extends t.Node{constructor(k,b){super(k,b),this.items=null}prevNodeIsJsonLike(k=this.items.length){let b=this.items[k-1];return!!b&&(b.jsonLike||b.type===t.Type.COMMENT&&this.prevNodeIsJsonLike(k-1))}parse(k,b){this.context=k;let{parseNode:w,src:h}=k,{indent:g,lineStart:m}=k,E=h[b];this.items=[{char:E,offset:b}];let v=t.Node.endOfWhiteSpace(h,b+1);for(E=h[v];E&&E!=="]"&&E!=="}";){switch(E){case`
|
|
232
|
+
`:{m=v+1;let L=t.Node.endOfWhiteSpace(h,m);if(h[L]===`
|
|
233
|
+
`){let C=new n;m=C.parse({src:h},m),this.items.push(C)}if(v=t.Node.endOfIndent(h,m),v<=m+g&&(E=h[v],v<m+g||E!=="]"&&E!=="}")){let C="Insufficient indentation in flow collection";this.error=new t.YAMLSemanticError(this,C)}}break;case",":this.items.push({char:E,offset:v}),v+=1;break;case"#":{let L=new s;v=L.parse({src:h},v),this.items.push(L)}break;case"?":case":":{let L=h[v+1];if(L===`
|
|
234
|
+
`||L===" "||L===" "||L===","||E===":"&&this.prevNodeIsJsonLike()){this.items.push({char:E,offset:v}),v+=1;break}}default:{let L=w({atLineStart:!1,inCollection:!1,inFlow:!0,indent:-1,lineStart:m,parent:this},v);if(!L)return this.valueRange=new t.Range(b,v),v;this.items.push(L),v=t.Node.normalizeOffset(h,L.range.end)}}v=t.Node.endOfWhiteSpace(h,v),E=h[v]}return this.valueRange=new t.Range(b,v+1),E&&(this.items.push({char:E,offset:v}),v=t.Node.endOfWhiteSpace(h,v+1),v=this.parseComment(v)),v}setOrigRanges(k,b){return b=super.setOrigRanges(k,b),this.items.forEach(w=>{if(w instanceof t.Node)b=w.setOrigRanges(k,b);else if(k.length===0)w.origOffset=w.offset;else{let h=b;for(;h<k.length&&!(k[h]>w.offset);)++h;w.origOffset=w.offset+h,b=h}}),b}toString(){let{context:{src:k},items:b,range:w,value:h}=this;if(h!=null)return h;let g=b.filter(v=>v instanceof t.Node),m="",E=w.start;return g.forEach(v=>{let L=k.slice(E,v.range.start);E=v.range.end,m+=L+String(v),m[m.length-1]===`
|
|
235
|
+
`&&k[E-1]!==`
|
|
236
|
+
`&&k[E]===`
|
|
237
|
+
`&&(E+=1)}),m+=k.slice(E,w.end),t.Node.addStringTerminator(k,w.end,m)}},y=class dg extends t.Node{static endOfQuote(b,w){let h=b[w];for(;h&&h!=='"';)w+=h==="\\"?2:1,h=b[w];return w+1}get strValue(){if(!this.valueRange||!this.context)return null;let b=[],{start:w,end:h}=this.valueRange,{indent:g,src:m}=this.context;m[h-1]!=='"'&&b.push(new t.YAMLSyntaxError(this,'Missing closing "quote'));let E="";for(let v=w+1;v<h-1;++v){let L=m[v];if(L===`
|
|
238
|
+
`){t.Node.atDocumentBoundary(m,v+1)&&b.push(new t.YAMLSemanticError(this,"Document boundary indicators are not allowed within string values"));let{fold:C,offset:A,error:F}=t.Node.foldNewline(m,v,g);E+=C,v=A,F&&b.push(new t.YAMLSemanticError(this,"Multi-line double-quoted string needs to be sufficiently indented"))}else if(L==="\\")switch(v+=1,m[v]){case"0":E+="\0";break;case"a":E+="\x07";break;case"b":E+="\b";break;case"e":E+="\x1B";break;case"f":E+="\f";break;case"n":E+=`
|
|
239
|
+
`;break;case"r":E+="\r";break;case"t":E+=" ";break;case"v":E+="\v";break;case"N":E+="
";break;case"_":E+=" ";break;case"L":E+="\u2028";break;case"P":E+="\u2029";break;case" ":E+=" ";break;case'"':E+='"';break;case"/":E+="/";break;case"\\":E+="\\";break;case" ":E+=" ";break;case"x":E+=this.parseCharCode(v+1,2,b),v+=2;break;case"u":E+=this.parseCharCode(v+1,4,b),v+=4;break;case"U":E+=this.parseCharCode(v+1,8,b),v+=8;break;case`
|
|
240
|
+
`:for(;m[v+1]===" "||m[v+1]===" ";)v+=1;break;default:b.push(new t.YAMLSyntaxError(this,`Invalid escape sequence ${m.substr(v-1,2)}`)),E+="\\"+m[v]}else if(L===" "||L===" "){let C=v,A=m[v+1];for(;A===" "||A===" ";)v+=1,A=m[v+1];A!==`
|
|
241
|
+
`&&(E+=v>C?m.slice(C,v+1):L)}else E+=L}return b.length>0?{errors:b,str:E}:E}parseCharCode(b,w,h){let{src:g}=this.context,m=g.substr(b,w),E=m.length===w&&/^[0-9a-fA-F]+$/.test(m)?parseInt(m,16):NaN;return isNaN(E)?(h.push(new t.YAMLSyntaxError(this,`Invalid escape sequence ${g.substr(b-2,w+2)}`)),g.substr(b-2,w+2)):String.fromCodePoint(E)}parse(b,w){this.context=b;let{src:h}=b,g=dg.endOfQuote(h,w+1);return this.valueRange=new t.Range(w,g),g=t.Node.endOfWhiteSpace(h,g),g=this.parseComment(g),g}},D=class mg extends t.Node{static endOfQuote(b,w){let h=b[w];for(;h;)if(h==="'"){if(b[w+1]!=="'")break;h=b[w+=2]}else h=b[w+=1];return w+1}get strValue(){if(!this.valueRange||!this.context)return null;let b=[],{start:w,end:h}=this.valueRange,{indent:g,src:m}=this.context;m[h-1]!=="'"&&b.push(new t.YAMLSyntaxError(this,"Missing closing 'quote"));let E="";for(let v=w+1;v<h-1;++v){let L=m[v];if(L===`
|
|
242
|
+
`){t.Node.atDocumentBoundary(m,v+1)&&b.push(new t.YAMLSemanticError(this,"Document boundary indicators are not allowed within string values"));let{fold:C,offset:A,error:F}=t.Node.foldNewline(m,v,g);E+=C,v=A,F&&b.push(new t.YAMLSemanticError(this,"Multi-line single-quoted string needs to be sufficiently indented"))}else if(L==="'")E+=L,v+=1,m[v]!=="'"&&b.push(new t.YAMLSyntaxError(this,"Unescaped single quote? This should not happen."));else if(L===" "||L===" "){let C=v,A=m[v+1];for(;A===" "||A===" ";)v+=1,A=m[v+1];A!==`
|
|
243
|
+
`&&(E+=v>C?m.slice(C,v+1):L)}else E+=L}return b.length>0?{errors:b,str:E}:E}parse(b,w){this.context=b;let{src:h}=b,g=mg.endOfQuote(h,w+1);return this.valueRange=new t.Range(w,g),g=t.Node.endOfWhiteSpace(h,g),g=this.parseComment(g),g}};function S(k,b){switch(k){case t.Type.ALIAS:return new u(k,b);case t.Type.BLOCK_FOLDED:case t.Type.BLOCK_LITERAL:return new f(k,b);case t.Type.FLOW_MAP:case t.Type.FLOW_SEQ:return new d(k,b);case t.Type.MAP_KEY:case t.Type.MAP_VALUE:case t.Type.SEQ_ITEM:return new r(k,b);case t.Type.COMMENT:case t.Type.PLAIN:return new t.PlainValue(k,b);case t.Type.QUOTE_DOUBLE:return new y(k,b);case t.Type.QUOTE_SINGLE:return new D(k,b);default:return null}}var N=class Ga{static parseType(b,w,h){switch(b[w]){case"*":return t.Type.ALIAS;case">":return t.Type.BLOCK_FOLDED;case"|":return t.Type.BLOCK_LITERAL;case"{":return t.Type.FLOW_MAP;case"[":return t.Type.FLOW_SEQ;case"?":return!h&&t.Node.atBlank(b,w+1,!0)?t.Type.MAP_KEY:t.Type.PLAIN;case":":return!h&&t.Node.atBlank(b,w+1,!0)?t.Type.MAP_VALUE:t.Type.PLAIN;case"-":return!h&&t.Node.atBlank(b,w+1,!0)?t.Type.SEQ_ITEM:t.Type.PLAIN;case'"':return t.Type.QUOTE_DOUBLE;case"'":return t.Type.QUOTE_SINGLE;default:return t.Type.PLAIN}}constructor(b={},{atLineStart:w,inCollection:h,inFlow:g,indent:m,lineStart:E,parent:v}={}){t._defineProperty(this,"parseNode",(L,C)=>{if(t.Node.atDocumentBoundary(this.src,C))return null;let A=new Ga(this,L),{props:F,type:M,valueStart:T}=A.parseProps(C),P=S(M,F),V=P.parse(A,T);if(P.range=new t.Range(C,V),V<=C&&(P.error=new Error("Node#parse consumed no characters"),P.error.parseEnd=V,P.error.source=P,P.range.end=C+1),A.nodeStartsCollection(P)){!P.error&&!A.atLineStart&&A.parent.type===t.Type.DOCUMENT&&(P.error=new t.YAMLSyntaxError(P,"Block collection must not have preceding content here (e.g. directives-end indicator)"));let H=new a(P);return V=H.parse(new Ga(A),V),H.range=new t.Range(C,V),H}return P}),this.atLineStart=w??(b.atLineStart||!1),this.inCollection=h??(b.inCollection||!1),this.inFlow=g??(b.inFlow||!1),this.indent=m??b.indent,this.lineStart=E??b.lineStart,this.parent=v??(b.parent||{}),this.root=b.root,this.src=b.src}nodeStartsCollection(b){let{inCollection:w,inFlow:h,src:g}=this;if(w||h)return!1;if(b instanceof r)return!0;let m=b.range.end;return g[m]===`
|
|
244
|
+
`||g[m-1]===`
|
|
245
|
+
`?!1:(m=t.Node.endOfWhiteSpace(g,m),g[m]===":")}parseProps(b){let{inFlow:w,parent:h,src:g}=this,m=[],E=!1;b=this.atLineStart?t.Node.endOfIndent(g,b):t.Node.endOfWhiteSpace(g,b);let v=g[b];for(;v===t.Char.ANCHOR||v===t.Char.COMMENT||v===t.Char.TAG||v===`
|
|
246
|
+
`;){if(v===`
|
|
247
|
+
`){let C=b,A;do A=C+1,C=t.Node.endOfIndent(g,A);while(g[C]===`
|
|
248
|
+
`);let F=C-(A+this.indent),M=h.type===t.Type.SEQ_ITEM&&h.context.atLineStart;if(g[C]!=="#"&&!t.Node.nextNodeIsIndented(g[C],F,!M))break;this.atLineStart=!0,this.lineStart=A,E=!1,b=C}else if(v===t.Char.COMMENT){let C=t.Node.endOfLine(g,b+1);m.push(new t.Range(b,C)),b=C}else{let C=t.Node.endOfIdentifier(g,b+1);v===t.Char.TAG&&g[C]===","&&/^[a-zA-Z0-9-]+\.[a-zA-Z0-9-]+,\d\d\d\d(-\d\d){0,2}\/\S/.test(g.slice(b+1,C+13))&&(C=t.Node.endOfIdentifier(g,C+5)),m.push(new t.Range(b,C)),E=!0,b=t.Node.endOfWhiteSpace(g,C)}v=g[b]}E&&v===":"&&t.Node.atBlank(g,b+1,!0)&&(b-=1);let L=Ga.parseType(g,b,w);return{props:m,type:L,valueStart:b}}};function x(k){let b=[];k.indexOf("\r")!==-1&&(k=k.replace(/\r\n?/g,(g,m)=>(g.length>1&&b.push(m),`
|
|
249
|
+
`)));let w=[],h=0;do{let g=new l,m=new N({src:k});h=g.parse(m,h),w.push(g)}while(h<k.length);return w.setOrigRanges=()=>{if(b.length===0)return!1;for(let m=1;m<b.length;++m)b[m]-=m;let g=0;for(let m=0;m<w.length;++m)g=w[m].setOrigRanges(b,g);return b.splice(0,b.length),!0},w.toString=()=>w.join(`...
|
|
250
|
+
`),w}e.parse=x}),Hs=dn(e=>{var t=tr();function n(O,_,R){return R?`#${R.replace(/[\s\S]^/gm,`$&${_}#`)}
|
|
251
|
+
${_}${O}`:O}function r(O,_,R){return R?R.indexOf(`
|
|
252
|
+
`)===-1?`${O} #${R}`:`${O}
|
|
253
|
+
`+R.replace(/^/gm,`${_||""}#`):O}var s=class{};function i(O,_,R){if(Array.isArray(O))return O.map((I,B)=>i(I,String(B),R));if(O&&typeof O.toJSON=="function"){let I=R&&R.anchors&&R.anchors.get(O);I&&(R.onCreate=j=>{I.res=j,delete R.onCreate});let B=O.toJSON(_,R);return I&&R.onCreate&&R.onCreate(B),B}return(!R||!R.keep)&&typeof O=="bigint"?Number(O):O}var a=class extends s{constructor(O){super(),this.value=O}toJSON(O,_){return _&&_.keep?this.value:i(this.value,O,_)}toString(){return String(this.value)}};function o(O,_,R){let I=R;for(let B=_.length-1;B>=0;--B){let j=_[B];if(Number.isInteger(j)&&j>=0){let W=[];W[j]=I,I=W}else{let W={};Object.defineProperty(W,j,{value:I,writable:!0,enumerable:!0,configurable:!0}),I=W}}return O.createNode(I,!1)}var l=O=>O==null||typeof O=="object"&&O[Symbol.iterator]().next().done,u=class Sr extends s{constructor(_){super(),t._defineProperty(this,"items",[]),this.schema=_}addIn(_,R){if(l(_))this.add(R);else{let[I,...B]=_,j=this.get(I,!0);if(j instanceof Sr)j.addIn(B,R);else if(j===void 0&&this.schema)this.set(I,o(this.schema,B,R));else throw new Error(`Expected YAML collection at ${I}. Remaining path: ${B}`)}}deleteIn([_,...R]){if(R.length===0)return this.delete(_);let I=this.get(_,!0);if(I instanceof Sr)return I.deleteIn(R);throw new Error(`Expected YAML collection at ${_}. Remaining path: ${R}`)}getIn([_,...R],I){let B=this.get(_,!0);return R.length===0?!I&&B instanceof a?B.value:B:B instanceof Sr?B.getIn(R,I):void 0}hasAllNullValues(){return this.items.every(_=>{if(!_||_.type!=="PAIR")return!1;let R=_.value;return R==null||R instanceof a&&R.value==null&&!R.commentBefore&&!R.comment&&!R.tag})}hasIn([_,...R]){if(R.length===0)return this.has(_);let I=this.get(_,!0);return I instanceof Sr?I.hasIn(R):!1}setIn([_,...R],I){if(R.length===0)this.set(_,I);else{let B=this.get(_,!0);if(B instanceof Sr)B.setIn(R,I);else if(B===void 0&&this.schema)this.set(_,o(this.schema,R,I));else throw new Error(`Expected YAML collection at ${_}. Remaining path: ${R}`)}}toJSON(){return null}toString(_,{blockItem:R,flowChars:I,isMap:B,itemIndent:j},W,Y){let{indent:G,indentStep:Q,stringify:ee}=_,se=this.type===t.Type.FLOW_MAP||this.type===t.Type.FLOW_SEQ||_.inFlow;se&&(j+=Q);let ke=B&&this.hasAllNullValues();_=Object.assign({},_,{allNullValues:ke,indent:j,inFlow:se,type:null});let de=!1,Ce=!1,ge=this.items.reduce((ze,we,Me)=>{let De;we&&(!de&&we.spaceBefore&&ze.push({type:"comment",str:""}),we.commentBefore&&we.commentBefore.match(/^.*$/gm).forEach(M6=>{ze.push({type:"comment",str:`#${M6}`})}),we.comment&&(De=we.comment),se&&(!de&&we.spaceBefore||we.commentBefore||we.comment||we.key&&(we.key.commentBefore||we.key.comment)||we.value&&(we.value.commentBefore||we.value.comment))&&(Ce=!0)),de=!1;let ht=ee(we,_,()=>De=null,()=>de=!0);return se&&!Ce&&ht.includes(`
|
|
254
|
+
`)&&(Ce=!0),se&&Me<this.items.length-1&&(ht+=","),ht=r(ht,j,De),de&&(De||se)&&(de=!1),ze.push({type:"item",str:ht}),ze},[]),xe;if(ge.length===0)xe=I.start+I.end;else if(se){let{start:ze,end:we}=I,Me=ge.map(De=>De.str);if(Ce||Me.reduce((De,ht)=>De+ht.length+2,2)>Sr.maxFlowStringSingleLineLength){xe=ze;for(let De of Me)xe+=De?`
|
|
255
|
+
${Q}${G}${De}`:`
|
|
256
|
+
`;xe+=`
|
|
257
|
+
${G}${we}`}else xe=`${ze} ${Me.join(" ")} ${we}`}else{let ze=ge.map(R);xe=ze.shift();for(let we of ze)xe+=we?`
|
|
258
|
+
${G}${we}`:`
|
|
259
|
+
`}return this.comment?(xe+=`
|
|
260
|
+
`+this.comment.replace(/^/gm,`${G}#`),W&&W()):de&&Y&&Y(),xe}};t._defineProperty(u,"maxFlowStringSingleLineLength",60);function c(O){let _=O instanceof a?O.value:O;return _&&typeof _=="string"&&(_=Number(_)),Number.isInteger(_)&&_>=0?_:null}var f=class extends u{add(O){this.items.push(O)}delete(O){let _=c(O);return typeof _!="number"?!1:this.items.splice(_,1).length>0}get(O,_){let R=c(O);if(typeof R!="number")return;let I=this.items[R];return!_&&I instanceof a?I.value:I}has(O){let _=c(O);return typeof _=="number"&&_<this.items.length}set(O,_){let R=c(O);if(typeof R!="number")throw new Error(`Expected a valid index, not ${O}.`);this.items[R]=_}toJSON(O,_){let R=[];_&&_.onCreate&&_.onCreate(R);let I=0;for(let B of this.items)R.push(i(B,String(I++),_));return R}toString(O,_,R){return O?super.toString(O,{blockItem:I=>I.type==="comment"?I.str:`- ${I.str}`,flowChars:{start:"[",end:"]"},isMap:!1,itemIndent:(O.indent||"")+" "},_,R):JSON.stringify(this)}},d=(O,_,R)=>_===null?"":typeof _!="object"?String(_):O instanceof s&&R&&R.doc?O.toString({anchors:Object.create(null),doc:R.doc,indent:"",indentStep:R.indentStep,inFlow:!0,inStringifyKey:!0,stringify:R.stringify}):JSON.stringify(_),y=class pg extends s{constructor(_,R=null){super(),this.key=_,this.value=R,this.type=pg.Type.PAIR}get commentBefore(){return this.key instanceof s?this.key.commentBefore:void 0}set commentBefore(_){if(this.key==null&&(this.key=new a(null)),this.key instanceof s)this.key.commentBefore=_;else{let R="Pair.commentBefore is an alias for Pair.key.commentBefore. To set it, the key must be a Node.";throw new Error(R)}}addToJSMap(_,R){let I=i(this.key,"",_);if(R instanceof Map){let B=i(this.value,I,_);R.set(I,B)}else if(R instanceof Set)R.add(I);else{let B=d(this.key,I,_),j=i(this.value,B,_);B in R?Object.defineProperty(R,B,{value:j,writable:!0,enumerable:!0,configurable:!0}):R[B]=j}return R}toJSON(_,R){let I=R&&R.mapAsMap?new Map:{};return this.addToJSMap(R,I)}toString(_,R,I){if(!_||!_.doc)return JSON.stringify(this);let{indent:B,indentSeq:j,simpleKeys:W}=_.doc.options,{key:Y,value:G}=this,Q=Y instanceof s&&Y.comment;if(W){if(Q)throw new Error("With simple keys, key nodes cannot have comments");if(Y instanceof u){let ht="With simple keys, collection cannot be used as a key value";throw new Error(ht)}}let ee=!W&&(!Y||Q||(Y instanceof s?Y instanceof u||Y.type===t.Type.BLOCK_FOLDED||Y.type===t.Type.BLOCK_LITERAL:typeof Y=="object")),{doc:se,indent:ke,indentStep:de,stringify:Ce}=_;_=Object.assign({},_,{implicitKey:!ee,indent:ke+de});let ge=!1,xe=Ce(Y,_,()=>Q=null,()=>ge=!0);if(xe=r(xe,_.indent,Q),!ee&&xe.length>1024){if(W)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");ee=!0}if(_.allNullValues&&!W)return this.comment?(xe=r(xe,_.indent,this.comment),R&&R()):ge&&!Q&&I&&I(),_.inFlow&&!ee?xe:`? ${xe}`;xe=ee?`? ${xe}
|
|
261
|
+
${ke}:`:`${xe}:`,this.comment&&(xe=r(xe,_.indent,this.comment),R&&R());let ze="",we=null;if(G instanceof s){if(G.spaceBefore&&(ze=`
|
|
262
|
+
`),G.commentBefore){let ht=G.commentBefore.replace(/^/gm,`${_.indent}#`);ze+=`
|
|
263
|
+
${ht}`}we=G.comment}else G&&typeof G=="object"&&(G=se.schema.createNode(G,!0));_.implicitKey=!1,!ee&&!this.comment&&G instanceof a&&(_.indentAtStart=xe.length+1),ge=!1,!j&&B>=2&&!_.inFlow&&!ee&&G instanceof f&&G.type!==t.Type.FLOW_SEQ&&!G.tag&&!se.anchors.getName(G)&&(_.indent=_.indent.substr(2));let Me=Ce(G,_,()=>we=null,()=>ge=!0),De=" ";return ze||this.comment?De=`${ze}
|
|
264
|
+
${_.indent}`:!ee&&G instanceof u?(!(Me[0]==="["||Me[0]==="{")||Me.includes(`
|
|
265
|
+
`))&&(De=`
|
|
266
|
+
${_.indent}`):Me[0]===`
|
|
267
|
+
`&&(De=""),ge&&!we&&I&&I(),r(xe+De+Me,_.indent,we)}};t._defineProperty(y,"Type",{PAIR:"PAIR",MERGE_PAIR:"MERGE_PAIR"});var D=(O,_)=>{if(O instanceof S){let R=_.get(O.source);return R.count*R.aliasCount}else if(O instanceof u){let R=0;for(let I of O.items){let B=D(I,_);B>R&&(R=B)}return R}else if(O instanceof y){let R=D(O.key,_),I=D(O.value,_);return Math.max(R,I)}return 1},S=class gg extends s{static stringify({range:_,source:R},{anchors:I,doc:B,implicitKey:j,inStringifyKey:W}){let Y=Object.keys(I).find(Q=>I[Q]===R);if(!Y&&W&&(Y=B.anchors.getName(R)||B.anchors.newName()),Y)return`*${Y}${j?" ":""}`;let G=B.anchors.getName(R)?"Alias node must be after source node":"Source node not found for alias node";throw new Error(`${G} [${_}]`)}constructor(_){super(),this.source=_,this.type=t.Type.ALIAS}set tag(_){throw new Error("Alias nodes cannot have tags")}toJSON(_,R){if(!R)return i(this.source,_,R);let{anchors:I,maxAliasCount:B}=R,j=I.get(this.source);if(!j||j.res===void 0){let W="This should not happen: Alias anchor was not resolved?";throw this.cstNode?new t.YAMLReferenceError(this.cstNode,W):new ReferenceError(W)}if(B>=0&&(j.count+=1,j.aliasCount===0&&(j.aliasCount=D(this.source,I)),j.count*j.aliasCount>B)){let W="Excessive alias count indicates a resource exhaustion attack";throw this.cstNode?new t.YAMLReferenceError(this.cstNode,W):new ReferenceError(W)}return j.res}toString(_){return gg.stringify(this,_)}};t._defineProperty(S,"default",!0);function N(O,_){let R=_ instanceof a?_.value:_;for(let I of O)if(I instanceof y&&(I.key===_||I.key===R||I.key&&I.key.value===R))return I}var x=class extends u{add(O,_){O?O instanceof y||(O=new y(O.key||O,O.value)):O=new y(O);let R=N(this.items,O.key),I=this.schema&&this.schema.sortMapEntries;if(R)if(_)R.value=O.value;else throw new Error(`Key ${O.key} already set`);else if(I){let B=this.items.findIndex(j=>I(O,j)<0);B===-1?this.items.push(O):this.items.splice(B,0,O)}else this.items.push(O)}delete(O){let _=N(this.items,O);return _?this.items.splice(this.items.indexOf(_),1).length>0:!1}get(O,_){let R=N(this.items,O),I=R&&R.value;return!_&&I instanceof a?I.value:I}has(O){return!!N(this.items,O)}set(O,_){this.add(new y(O,_),!0)}toJSON(O,_,R){let I=R?new R:_&&_.mapAsMap?new Map:{};_&&_.onCreate&&_.onCreate(I);for(let B of this.items)B.addToJSMap(_,I);return I}toString(O,_,R){if(!O)return JSON.stringify(this);for(let I of this.items)if(!(I instanceof y))throw new Error(`Map items must all be pairs; found ${JSON.stringify(I)} instead`);return super.toString(O,{blockItem:I=>I.str,flowChars:{start:"{",end:"}"},isMap:!0,itemIndent:O.indent||""},_,R)}},k="<<",b=class extends y{constructor(O){if(O instanceof y){let _=O.value;_ instanceof f||(_=new f,_.items.push(O.value),_.range=O.value.range),super(O.key,_),this.range=O.range}else super(new a(k),new f);this.type=y.Type.MERGE_PAIR}addToJSMap(O,_){for(let{source:R}of this.value.items){if(!(R instanceof x))throw new Error("Merge sources must be maps");let I=R.toJSON(null,O,Map);for(let[B,j]of I)_ instanceof Map?_.has(B)||_.set(B,j):_ instanceof Set?_.add(B):Object.prototype.hasOwnProperty.call(_,B)||Object.defineProperty(_,B,{value:j,writable:!0,enumerable:!0,configurable:!0})}return _}toString(O,_){let R=this.value;if(R.items.length>1)return super.toString(O,_);this.value=R.items[0];let I=super.toString(O,_);return this.value=R,I}},w={defaultType:t.Type.BLOCK_LITERAL,lineWidth:76},h={trueStr:"true",falseStr:"false"},g={asBigInt:!1},m={nullStr:"null"},E={defaultType:t.Type.PLAIN,doubleQuoted:{jsonEncoding:!1,minMultiLineLength:40},fold:{lineWidth:80,minContentWidth:20}};function v(O,_,R){for(let{format:I,test:B,resolve:j}of _)if(B){let W=O.match(B);if(W){let Y=j.apply(null,W);return Y instanceof a||(Y=new a(Y)),I&&(Y.format=I),Y}}return R&&(O=R(O)),new a(O)}var L="flow",C="block",A="quoted",F=(O,_)=>{let R=O[_+1];for(;R===" "||R===" ";){do R=O[_+=1];while(R&&R!==`
|
|
268
|
+
`);R=O[_+1]}return _};function M(O,_,R,{indentAtStart:I,lineWidth:B=80,minContentWidth:j=20,onFold:W,onOverflow:Y}){if(!B||B<0)return O;let G=Math.max(1+j,1+B-_.length);if(O.length<=G)return O;let Q=[],ee={},se=B-_.length;typeof I=="number"&&(I>B-Math.max(2,j)?Q.push(0):se=B-I);let ke,de,Ce=!1,ge=-1,xe=-1,ze=-1;R===C&&(ge=F(O,ge),ge!==-1&&(se=ge+G));for(let Me;Me=O[ge+=1];){if(R===A&&Me==="\\"){switch(xe=ge,O[ge+1]){case"x":ge+=3;break;case"u":ge+=5;break;case"U":ge+=9;break;default:ge+=1}ze=ge}if(Me===`
|
|
269
|
+
`)R===C&&(ge=F(O,ge)),se=ge+G,ke=void 0;else{if(Me===" "&&de&&de!==" "&&de!==`
|
|
270
|
+
`&&de!==" "){let De=O[ge+1];De&&De!==" "&&De!==`
|
|
271
|
+
`&&De!==" "&&(ke=ge)}if(ge>=se)if(ke)Q.push(ke),se=ke+G,ke=void 0;else if(R===A){for(;de===" "||de===" ";)de=Me,Me=O[ge+=1],Ce=!0;let De=ge>ze+1?ge-2:xe-1;if(ee[De])return O;Q.push(De),ee[De]=!0,se=De+G,ke=void 0}else Ce=!0}de=Me}if(Ce&&Y&&Y(),Q.length===0)return O;W&&W();let we=O.slice(0,Q[0]);for(let Me=0;Me<Q.length;++Me){let De=Q[Me],ht=Q[Me+1]||O.length;De===0?we=`
|
|
272
|
+
${_}${O.slice(0,ht)}`:(R===A&&ee[De]&&(we+=`${O[De]}\\`),we+=`
|
|
273
|
+
${_}${O.slice(De+1,ht)}`)}return we}var T=({indentAtStart:O})=>O?Object.assign({indentAtStart:O},E.fold):E.fold,P=O=>/^(%|---|\.\.\.)/m.test(O);function V(O,_,R){if(!_||_<0)return!1;let I=_-R,B=O.length;if(B<=I)return!1;for(let j=0,W=0;j<B;++j)if(O[j]===`
|
|
274
|
+
`){if(j-W>I)return!0;if(W=j+1,B-W<=I)return!1}return!0}function H(O,_){let{implicitKey:R}=_,{jsonEncoding:I,minMultiLineLength:B}=E.doubleQuoted,j=JSON.stringify(O);if(I)return j;let W=_.indent||(P(O)?" ":""),Y="",G=0;for(let Q=0,ee=j[Q];ee;ee=j[++Q])if(ee===" "&&j[Q+1]==="\\"&&j[Q+2]==="n"&&(Y+=j.slice(G,Q)+"\\ ",Q+=1,G=Q,ee="\\"),ee==="\\")switch(j[Q+1]){case"u":{Y+=j.slice(G,Q);let se=j.substr(Q+2,4);switch(se){case"0000":Y+="\\0";break;case"0007":Y+="\\a";break;case"000b":Y+="\\v";break;case"001b":Y+="\\e";break;case"0085":Y+="\\N";break;case"00a0":Y+="\\_";break;case"2028":Y+="\\L";break;case"2029":Y+="\\P";break;default:se.substr(0,2)==="00"?Y+="\\x"+se.substr(2):Y+=j.substr(Q,6)}Q+=5,G=Q+1}break;case"n":if(R||j[Q+2]==='"'||j.length<B)Q+=1;else{for(Y+=j.slice(G,Q)+`
|
|
275
|
+
|
|
276
|
+
`;j[Q+2]==="\\"&&j[Q+3]==="n"&&j[Q+4]!=='"';)Y+=`
|
|
277
|
+
`,Q+=2;Y+=W,j[Q+2]===" "&&(Y+="\\"),Q+=1,G=Q+1}break;default:Q+=1}return Y=G?Y+j.slice(G):j,R?Y:M(Y,W,A,T(_))}function K(O,_){if(_.implicitKey){if(/\n/.test(O))return H(O,_)}else if(/[ \t]\n|\n[ \t]/.test(O))return H(O,_);let R=_.indent||(P(O)?" ":""),I="'"+O.replace(/'/g,"''").replace(/\n+/g,`$&
|
|
278
|
+
${R}`)+"'";return _.implicitKey?I:M(I,R,L,T(_))}function J({comment:O,type:_,value:R},I,B,j){if(/\n[\t ]+$/.test(R)||/^\s*$/.test(R))return H(R,I);let W=I.indent||(I.forceBlockIndent||P(R)?" ":""),Y=W?"2":"1",G=_===t.Type.BLOCK_FOLDED?!1:_===t.Type.BLOCK_LITERAL?!0:!V(R,E.fold.lineWidth,W.length),Q=G?"|":">";if(!R)return Q+`
|
|
279
|
+
`;let ee="",se="";if(R=R.replace(/[\n\t ]*$/,de=>{let Ce=de.indexOf(`
|
|
280
|
+
`);return Ce===-1?Q+="-":(R===de||Ce!==de.length-1)&&(Q+="+",j&&j()),se=de.replace(/\n$/,""),""}).replace(/^[\n ]*/,de=>{de.indexOf(" ")!==-1&&(Q+=Y);let Ce=de.match(/ +$/);return Ce?(ee=de.slice(0,-Ce[0].length),Ce[0]):(ee=de,"")}),se&&(se=se.replace(/\n+(?!\n|$)/g,`$&${W}`)),ee&&(ee=ee.replace(/\n+/g,`$&${W}`)),O&&(Q+=" #"+O.replace(/ ?[\r\n]+/g," "),B&&B()),!R)return`${Q}${Y}
|
|
281
|
+
${W}${se}`;if(G)return R=R.replace(/\n+/g,`$&${W}`),`${Q}
|
|
282
|
+
${W}${ee}${R}${se}`;R=R.replace(/\n+/g,`
|
|
283
|
+
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${W}`);let ke=M(`${ee}${R}${se}`,W,C,E.fold);return`${Q}
|
|
284
|
+
${W}${ke}`}function $(O,_,R,I){let{comment:B,type:j,value:W}=O,{actualString:Y,implicitKey:G,indent:Q,inFlow:ee}=_;if(G&&/[\n[\]{},]/.test(W)||ee&&/[[\]{},]/.test(W))return H(W,_);if(!W||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(W))return G||ee||W.indexOf(`
|
|
285
|
+
`)===-1?W.indexOf('"')!==-1&&W.indexOf("'")===-1?K(W,_):H(W,_):J(O,_,R,I);if(!G&&!ee&&j!==t.Type.PLAIN&&W.indexOf(`
|
|
286
|
+
`)!==-1)return J(O,_,R,I);if(Q===""&&P(W))return _.forceBlockIndent=!0,J(O,_,R,I);let se=W.replace(/\n+/g,`$&
|
|
287
|
+
${Q}`);if(Y){let{tags:de}=_.doc.schema;if(typeof v(se,de,de.scalarFallback).value!="string")return H(W,_)}let ke=G?se:M(se,Q,L,T(_));return B&&!ee&&(ke.indexOf(`
|
|
288
|
+
`)!==-1||B.indexOf(`
|
|
289
|
+
`)!==-1)?(R&&R(),n(ke,Q,B)):ke}function z(O,_,R,I){let{defaultType:B}=E,{implicitKey:j,inFlow:W}=_,{type:Y,value:G}=O;typeof G!="string"&&(G=String(G),O=Object.assign({},O,{value:G}));let Q=se=>{switch(se){case t.Type.BLOCK_FOLDED:case t.Type.BLOCK_LITERAL:return J(O,_,R,I);case t.Type.QUOTE_DOUBLE:return H(G,_);case t.Type.QUOTE_SINGLE:return K(G,_);case t.Type.PLAIN:return $(O,_,R,I);default:return null}};(Y!==t.Type.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f]/.test(G)||(j||W)&&(Y===t.Type.BLOCK_FOLDED||Y===t.Type.BLOCK_LITERAL))&&(Y=t.Type.QUOTE_DOUBLE);let ee=Q(Y);if(ee===null&&(ee=Q(B),ee===null))throw new Error(`Unsupported default string type ${B}`);return ee}function Z({format:O,minFractionDigits:_,tag:R,value:I}){if(typeof I=="bigint")return String(I);if(!isFinite(I))return isNaN(I)?".nan":I<0?"-.inf":".inf";let B=JSON.stringify(I);if(!O&&_&&(!R||R==="tag:yaml.org,2002:float")&&/^\d/.test(B)){let j=B.indexOf(".");j<0&&(j=B.length,B+=".");let W=_-(B.length-j-1);for(;W-- >0;)B+="0"}return B}function X(O,_){let R,I;switch(_.type){case t.Type.FLOW_MAP:R="}",I="flow map";break;case t.Type.FLOW_SEQ:R="]",I="flow sequence";break;default:O.push(new t.YAMLSemanticError(_,"Not a flow collection!?"));return}let B;for(let j=_.items.length-1;j>=0;--j){let W=_.items[j];if(!W||W.type!==t.Type.COMMENT){B=W;break}}if(B&&B.char!==R){let j=`Expected ${I} to end with ${R}`,W;typeof B.offset=="number"?(W=new t.YAMLSemanticError(_,j),W.offset=B.offset+1):(W=new t.YAMLSemanticError(B,j),B.range&&B.range.end&&(W.offset=B.range.end-B.range.start)),O.push(W)}}function ne(O,_){let R=_.context.src[_.range.start-1];if(R!==`
|
|
290
|
+
`&&R!==" "&&R!==" "){let I="Comments must be separated from other tokens by white space characters";O.push(new t.YAMLSemanticError(_,I))}}function fe(O,_){let R=String(_),I=R.substr(0,8)+"..."+R.substr(-8);return new t.YAMLSemanticError(O,`The "${I}" key is too long`)}function ft(O,_){for(let{afterKey:R,before:I,comment:B}of _){let j=O.items[I];j?(R&&j.value&&(j=j.value),B===void 0?(R||!j.commentBefore)&&(j.spaceBefore=!0):j.commentBefore?j.commentBefore+=`
|
|
291
|
+
`+B:j.commentBefore=B):B!==void 0&&(O.comment?O.comment+=`
|
|
292
|
+
`+B:O.comment=B)}}function Sn(O,_){let R=_.strValue;return R?typeof R=="string"?R:(R.errors.forEach(I=>{I.source||(I.source=_),O.errors.push(I)}),R.str):""}function En(O,_){let{handle:R,suffix:I}=_.tag,B=O.tagPrefixes.find(j=>j.handle===R);if(!B){let j=O.getDefaults().tagPrefixes;if(j&&(B=j.find(W=>W.handle===R)),!B)throw new t.YAMLSemanticError(_,`The ${R} tag handle is non-default and was not declared.`)}if(!I)throw new t.YAMLSemanticError(_,`The ${R} tag has no suffix.`);if(R==="!"&&(O.version||O.options.version)==="1.0"){if(I[0]==="^")return O.warnings.push(new t.YAMLWarning(_,"YAML 1.0 ^ tag expansion is not supported")),I;if(/[:/]/.test(I)){let j=I.match(/^([a-z0-9-]+)\/(.*)/i);return j?`tag:${j[1]}.yaml.org,2002:${j[2]}`:`tag:${I}`}}return B.prefix+decodeURIComponent(I)}function en(O,_){let{tag:R,type:I}=_,B=!1;if(R){let{handle:j,suffix:W,verbatim:Y}=R;if(Y){if(Y!=="!"&&Y!=="!!")return Y;let G=`Verbatim tags aren't resolved, so ${Y} is invalid.`;O.errors.push(new t.YAMLSemanticError(_,G))}else if(j==="!"&&!W)B=!0;else try{return En(O,_)}catch(G){O.errors.push(G)}}switch(I){case t.Type.BLOCK_FOLDED:case t.Type.BLOCK_LITERAL:case t.Type.QUOTE_DOUBLE:case t.Type.QUOTE_SINGLE:return t.defaultTags.STR;case t.Type.FLOW_MAP:case t.Type.MAP:return t.defaultTags.MAP;case t.Type.FLOW_SEQ:case t.Type.SEQ:return t.defaultTags.SEQ;case t.Type.PLAIN:return B?t.defaultTags.STR:null;default:return null}}function fi(O,_,R){let{tags:I}=O.schema,B=[];for(let W of I)if(W.tag===R)if(W.test)B.push(W);else{let Y=W.resolve(O,_);return Y instanceof u?Y:new a(Y)}let j=Sn(O,_);return typeof j=="string"&&B.length>0?v(j,B,I.scalarFallback):null}function Ya({type:O}){switch(O){case t.Type.FLOW_MAP:case t.Type.MAP:return t.defaultTags.MAP;case t.Type.FLOW_SEQ:case t.Type.SEQ:return t.defaultTags.SEQ;default:return t.defaultTags.STR}}function D6(O,_,R){try{let I=fi(O,_,R);if(I)return R&&_.tag&&(I.tag=R),I}catch(I){return I.source||(I.source=_),O.errors.push(I),null}try{let I=Ya(_);if(!I)throw new Error(`The tag ${R} is unavailable`);let B=`The tag ${R} is unavailable, falling back to ${I}`;O.warnings.push(new t.YAMLWarning(_,B));let j=fi(O,_,I);return j.tag=R,j}catch(I){let B=new t.YAMLReferenceError(_,I.message);return B.stack=I.stack,O.errors.push(B),null}}var S6=O=>{if(!O)return!1;let{type:_}=O;return _===t.Type.MAP_KEY||_===t.Type.MAP_VALUE||_===t.Type.SEQ_ITEM};function E6(O,_){let R={before:[],after:[]},I=!1,B=!1,j=S6(_.context.parent)?_.context.parent.props.concat(_.props):_.props;for(let{start:W,end:Y}of j)switch(_.context.src[W]){case t.Char.COMMENT:{if(!_.commentHasRequiredWhitespace(W)){let ee="Comments must be separated from other tokens by white space characters";O.push(new t.YAMLSemanticError(_,ee))}let{header:G,valueRange:Q}=_;(Q&&(W>Q.start||G&&W>G.start)?R.after:R.before).push(_.context.src.slice(W+1,Y));break}case t.Char.ANCHOR:if(I){let G="A node can have at most one anchor";O.push(new t.YAMLSemanticError(_,G))}I=!0;break;case t.Char.TAG:if(B){let G="A node can have at most one tag";O.push(new t.YAMLSemanticError(_,G))}B=!0;break}return{comments:R,hasAnchor:I,hasTag:B}}function A6(O,_){let{anchors:R,errors:I,schema:B}=O;if(_.type===t.Type.ALIAS){let W=_.rawValue,Y=R.getNode(W);if(!Y){let Q=`Aliased anchor not found: ${W}`;return I.push(new t.YAMLReferenceError(_,Q)),null}let G=new S(Y);return R._cstAliases.push(G),G}let j=en(O,_);if(j)return D6(O,_,j);if(_.type!==t.Type.PLAIN){let W=`Failed to resolve ${_.type} node here`;return I.push(new t.YAMLSyntaxError(_,W)),null}try{let W=Sn(O,_);return v(W,B.tags,B.tags.scalarFallback)}catch(W){return W.source||(W.source=_),I.push(W),null}}function Un(O,_){if(!_)return null;_.error&&O.errors.push(_.error);let{comments:R,hasAnchor:I,hasTag:B}=E6(O.errors,_);if(I){let{anchors:W}=O,Y=_.anchor,G=W.getNode(Y);G&&(W.map[W.newName(Y)]=G),W.map[Y]=_}if(_.type===t.Type.ALIAS&&(I||B)){let W="An alias node must not specify any properties";O.errors.push(new t.YAMLSemanticError(_,W))}let j=A6(O,_);if(j){j.range=[_.range.start,_.range.end],O.options.keepCstNodes&&(j.cstNode=_),O.options.keepNodeTypes&&(j.type=_.type);let W=R.before.join(`
|
|
293
|
+
`);W&&(j.commentBefore=j.commentBefore?`${j.commentBefore}
|
|
294
|
+
${W}`:W);let Y=R.after.join(`
|
|
295
|
+
`);Y&&(j.comment=j.comment?`${j.comment}
|
|
296
|
+
${Y}`:Y)}return _.resolved=j}function x6(O,_){if(_.type!==t.Type.MAP&&_.type!==t.Type.FLOW_MAP){let W=`A ${_.type} node cannot be resolved as a mapping`;return O.errors.push(new t.YAMLSyntaxError(_,W)),null}let{comments:R,items:I}=_.type===t.Type.FLOW_MAP?C6(O,_):k6(O,_),B=new x;B.items=I,ft(B,R);let j=!1;for(let W=0;W<I.length;++W){let{key:Y}=I[W];if(Y instanceof u&&(j=!0),O.schema.merge&&Y&&Y.value===k){I[W]=new b(I[W]);let G=I[W].value.items,Q=null;G.some(ee=>{if(ee instanceof S){let{type:se}=ee.source;return se===t.Type.MAP||se===t.Type.FLOW_MAP?!1:Q="Merge nodes aliases can only point to maps"}return Q="Merge nodes can only have Alias nodes as values"}),Q&&O.errors.push(new t.YAMLSemanticError(_,Q))}else for(let G=W+1;G<I.length;++G){let{key:Q}=I[G];if(Y===Q||Y&&Q&&Object.prototype.hasOwnProperty.call(Y,"value")&&Y.value===Q.value){let ee=`Map keys must be unique; "${Y}" is repeated`;O.errors.push(new t.YAMLSemanticError(_,ee));break}}}if(j&&!O.options.mapAsMap){let W="Keys with collection values will be stringified as YAML due to JS Object restrictions. Use mapAsMap: true to avoid this.";O.warnings.push(new t.YAMLWarning(_,W))}return _.resolved=B,B}var N6=({context:{lineStart:O,node:_,src:R},props:I})=>{if(I.length===0)return!1;let{start:B}=I[0];if(_&&B>_.valueRange.start||R[B]!==t.Char.COMMENT)return!1;for(let j=O;j<B;++j)if(R[j]===`
|
|
297
|
+
`)return!1;return!0};function L6(O,_){if(!N6(O))return;let R=O.getPropValue(0,t.Char.COMMENT,!0),I=!1,B=_.value.commentBefore;if(B&&B.startsWith(R))_.value.commentBefore=B.substr(R.length+1),I=!0;else{let j=_.value.comment;!O.node&&j&&j.startsWith(R)&&(_.value.comment=j.substr(R.length+1),I=!0)}I&&(_.comment=R)}function k6(O,_){let R=[],I=[],B,j=null;for(let W=0;W<_.items.length;++W){let Y=_.items[W];switch(Y.type){case t.Type.BLANK_LINE:R.push({afterKey:!!B,before:I.length});break;case t.Type.COMMENT:R.push({afterKey:!!B,before:I.length,comment:Y.comment});break;case t.Type.MAP_KEY:B!==void 0&&I.push(new y(B)),Y.error&&O.errors.push(Y.error),B=Un(O,Y.node),j=null;break;case t.Type.MAP_VALUE:{if(B===void 0&&(B=null),Y.error&&O.errors.push(Y.error),!Y.context.atLineStart&&Y.node&&Y.node.type===t.Type.MAP&&!Y.node.context.atLineStart){let ee="Nested mappings are not allowed in compact mappings";O.errors.push(new t.YAMLSemanticError(Y.node,ee))}let G=Y.node;if(!G&&Y.props.length>0){G=new t.PlainValue(t.Type.PLAIN,[]),G.context={parent:Y,src:Y.context.src};let ee=Y.range.start+1;if(G.range={start:ee,end:ee},G.valueRange={start:ee,end:ee},typeof Y.range.origStart=="number"){let se=Y.range.origStart+1;G.range.origStart=G.range.origEnd=se,G.valueRange.origStart=G.valueRange.origEnd=se}}let Q=new y(B,Un(O,G));L6(Y,Q),I.push(Q),B&&typeof j=="number"&&Y.range.start>j+1024&&O.errors.push(fe(_,B)),B=void 0,j=null}break;default:B!==void 0&&I.push(new y(B)),B=Un(O,Y),j=Y.range.start,Y.error&&O.errors.push(Y.error);e:for(let G=W+1;;++G){let Q=_.items[G];switch(Q&&Q.type){case t.Type.BLANK_LINE:case t.Type.COMMENT:continue e;case t.Type.MAP_VALUE:break e;default:{let ee="Implicit map keys need to be followed by map values";O.errors.push(new t.YAMLSemanticError(Y,ee));break e}}}if(Y.valueRangeContainsNewline){let G="Implicit map keys need to be on a single line";O.errors.push(new t.YAMLSemanticError(Y,G))}}}return B!==void 0&&I.push(new y(B)),{comments:R,items:I}}function C6(O,_){let R=[],I=[],B,j=!1,W="{";for(let Y=0;Y<_.items.length;++Y){let G=_.items[Y];if(typeof G.char=="string"){let{char:Q,offset:ee}=G;if(Q==="?"&&B===void 0&&!j){j=!0,W=":";continue}if(Q===":"){if(B===void 0&&(B=null),W===":"){W=",";continue}}else if(j&&(B===void 0&&Q!==","&&(B=null),j=!1),B!==void 0&&(I.push(new y(B)),B=void 0,Q===",")){W=":";continue}if(Q==="}"){if(Y===_.items.length-1)continue}else if(Q===W){W=":";continue}let se=`Flow map contains an unexpected ${Q}`,ke=new t.YAMLSyntaxError(_,se);ke.offset=ee,O.errors.push(ke)}else G.type===t.Type.BLANK_LINE?R.push({afterKey:!!B,before:I.length}):G.type===t.Type.COMMENT?(ne(O.errors,G),R.push({afterKey:!!B,before:I.length,comment:G.comment})):B===void 0?(W===","&&O.errors.push(new t.YAMLSemanticError(G,"Separator , missing in flow map")),B=Un(O,G)):(W!==","&&O.errors.push(new t.YAMLSemanticError(G,"Indicator : missing in flow map entry")),I.push(new y(B,Un(O,G))),B=void 0,j=!1)}return X(O.errors,_),B!==void 0&&I.push(new y(B)),{comments:R,items:I}}function F6(O,_){if(_.type!==t.Type.SEQ&&_.type!==t.Type.FLOW_SEQ){let j=`A ${_.type} node cannot be resolved as a sequence`;return O.errors.push(new t.YAMLSyntaxError(_,j)),null}let{comments:R,items:I}=_.type===t.Type.FLOW_SEQ?T6(O,_):_6(O,_),B=new f;if(B.items=I,ft(B,R),!O.options.mapAsMap&&I.some(j=>j instanceof y&&j.key instanceof u)){let j="Keys with collection values will be stringified as YAML due to JS Object restrictions. Use mapAsMap: true to avoid this.";O.warnings.push(new t.YAMLWarning(_,j))}return _.resolved=B,B}function _6(O,_){let R=[],I=[];for(let B=0;B<_.items.length;++B){let j=_.items[B];switch(j.type){case t.Type.BLANK_LINE:R.push({before:I.length});break;case t.Type.COMMENT:R.push({comment:j.comment,before:I.length});break;case t.Type.SEQ_ITEM:if(j.error&&O.errors.push(j.error),I.push(Un(O,j.node)),j.hasProps){let W="Sequence items cannot have tags or anchors before the - indicator";O.errors.push(new t.YAMLSemanticError(j,W))}break;default:j.error&&O.errors.push(j.error),O.errors.push(new t.YAMLSyntaxError(j,`Unexpected ${j.type} node in sequence`))}}return{comments:R,items:I}}function T6(O,_){let R=[],I=[],B=!1,j,W=null,Y="[",G=null;for(let Q=0;Q<_.items.length;++Q){let ee=_.items[Q];if(typeof ee.char=="string"){let{char:se,offset:ke}=ee;if(se!==":"&&(B||j!==void 0)&&(B&&j===void 0&&(j=Y?I.pop():null),I.push(new y(j)),B=!1,j=void 0,W=null),se===Y)Y=null;else if(!Y&&se==="?")B=!0;else if(Y!=="["&&se===":"&&j===void 0){if(Y===","){if(j=I.pop(),j instanceof y){let de="Chaining flow sequence pairs is invalid",Ce=new t.YAMLSemanticError(_,de);Ce.offset=ke,O.errors.push(Ce)}if(!B&&typeof W=="number"){let de=ee.range?ee.range.start:ee.offset;de>W+1024&&O.errors.push(fe(_,j));let{src:Ce}=G.context;for(let ge=W;ge<de;++ge)if(Ce[ge]===`
|
|
298
|
+
`){let xe="Implicit keys of flow sequence pairs need to be on a single line";O.errors.push(new t.YAMLSemanticError(G,xe));break}}}else j=null;W=null,B=!1,Y=null}else if(Y==="["||se!=="]"||Q<_.items.length-1){let de=`Flow sequence contains an unexpected ${se}`,Ce=new t.YAMLSyntaxError(_,de);Ce.offset=ke,O.errors.push(Ce)}}else if(ee.type===t.Type.BLANK_LINE)R.push({before:I.length});else if(ee.type===t.Type.COMMENT)ne(O.errors,ee),R.push({comment:ee.comment,before:I.length});else{if(Y){let ke=`Expected a ${Y} in flow sequence`;O.errors.push(new t.YAMLSemanticError(ee,ke))}let se=Un(O,ee);j===void 0?(I.push(se),G=ee):(I.push(new y(j,se)),j=void 0),W=ee.range.start,Y=","}}return X(O.errors,_),j!==void 0&&I.push(new y(j)),{comments:R,items:I}}e.Alias=S,e.Collection=u,e.Merge=b,e.Node=s,e.Pair=y,e.Scalar=a,e.YAMLMap=x,e.YAMLSeq=f,e.addComment=r,e.binaryOptions=w,e.boolOptions=h,e.findPair=N,e.intOptions=g,e.isEmptyPath=l,e.nullOptions=m,e.resolveMap=x6,e.resolveNode=Un,e.resolveSeq=F6,e.resolveString=Sn,e.strOptions=E,e.stringifyNumber=Z,e.stringifyString=z,e.toJSON=i}),g1=dn(e=>{var t=tr(),n=Hs(),r={identify:v=>v instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve:(v,L)=>{let C=n.resolveString(v,L);if(typeof Buffer=="function")return Buffer.from(C,"base64");if(typeof atob=="function"){let A=atob(C.replace(/[\n\r]/g,"")),F=new Uint8Array(A.length);for(let M=0;M<A.length;++M)F[M]=A.charCodeAt(M);return F}else{let A="This environment does not support reading binary tags; either Buffer or atob is required";return v.errors.push(new t.YAMLReferenceError(L,A)),null}},options:n.binaryOptions,stringify:({comment:v,type:L,value:C},A,F,M)=>{let T;if(typeof Buffer=="function")T=C instanceof Buffer?C.toString("base64"):Buffer.from(C.buffer).toString("base64");else if(typeof btoa=="function"){let P="";for(let V=0;V<C.length;++V)P+=String.fromCharCode(C[V]);T=btoa(P)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(L||(L=n.binaryOptions.defaultType),L===t.Type.QUOTE_DOUBLE)C=T;else{let{lineWidth:P}=n.binaryOptions,V=Math.ceil(T.length/P),H=new Array(V);for(let K=0,J=0;K<V;++K,J+=P)H[K]=T.substr(J,P);C=H.join(L===t.Type.BLOCK_LITERAL?`
|
|
299
|
+
`:" ")}return n.stringifyString({comment:v,type:L,value:C},A,F,M)}};function s(v,L){let C=n.resolveSeq(v,L);for(let A=0;A<C.items.length;++A){let F=C.items[A];if(!(F instanceof n.Pair)){if(F instanceof n.YAMLMap){if(F.items.length>1){let T="Each pair must have its own sequence indicator";throw new t.YAMLSemanticError(L,T)}let M=F.items[0]||new n.Pair;F.commentBefore&&(M.commentBefore=M.commentBefore?`${F.commentBefore}
|
|
300
|
+
${M.commentBefore}`:F.commentBefore),F.comment&&(M.comment=M.comment?`${F.comment}
|
|
301
|
+
${M.comment}`:F.comment),F=M}C.items[A]=F instanceof n.Pair?F:new n.Pair(F)}}return C}function i(v,L,C){let A=new n.YAMLSeq(v);A.tag="tag:yaml.org,2002:pairs";for(let F of L){let M,T;if(Array.isArray(F))if(F.length===2)M=F[0],T=F[1];else throw new TypeError(`Expected [key, value] tuple: ${F}`);else if(F&&F instanceof Object){let V=Object.keys(F);if(V.length===1)M=V[0],T=F[M];else throw new TypeError(`Expected { key: value } tuple: ${F}`)}else M=F;let P=v.createPair(M,T,C);A.items.push(P)}return A}var a={default:!1,tag:"tag:yaml.org,2002:pairs",resolve:s,createNode:i},o=class yg extends n.YAMLSeq{constructor(){super(),t._defineProperty(this,"add",n.YAMLMap.prototype.add.bind(this)),t._defineProperty(this,"delete",n.YAMLMap.prototype.delete.bind(this)),t._defineProperty(this,"get",n.YAMLMap.prototype.get.bind(this)),t._defineProperty(this,"has",n.YAMLMap.prototype.has.bind(this)),t._defineProperty(this,"set",n.YAMLMap.prototype.set.bind(this)),this.tag=yg.tag}toJSON(L,C){let A=new Map;C&&C.onCreate&&C.onCreate(A);for(let F of this.items){let M,T;if(F instanceof n.Pair?(M=n.toJSON(F.key,"",C),T=n.toJSON(F.value,M,C)):M=n.toJSON(F,"",C),A.has(M))throw new Error("Ordered maps must not include duplicate keys");A.set(M,T)}return A}};t._defineProperty(o,"tag","tag:yaml.org,2002:omap");function l(v,L){let C=s(v,L),A=[];for(let{key:F}of C.items)if(F instanceof n.Scalar)if(A.includes(F.value)){let M="Ordered maps must not include duplicate keys";throw new t.YAMLSemanticError(L,M)}else A.push(F.value);return Object.assign(new o,C)}function u(v,L,C){let A=i(v,L,C),F=new o;return F.items=A.items,F}var c={identify:v=>v instanceof Map,nodeClass:o,default:!1,tag:"tag:yaml.org,2002:omap",resolve:l,createNode:u},f=class bg extends n.YAMLMap{constructor(){super(),this.tag=bg.tag}add(L){let C=L instanceof n.Pair?L:new n.Pair(L);n.findPair(this.items,C.key)||this.items.push(C)}get(L,C){let A=n.findPair(this.items,L);return!C&&A instanceof n.Pair?A.key instanceof n.Scalar?A.key.value:A.key:A}set(L,C){if(typeof C!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof C}`);let A=n.findPair(this.items,L);A&&!C?this.items.splice(this.items.indexOf(A),1):!A&&C&&this.items.push(new n.Pair(L))}toJSON(L,C){return super.toJSON(L,C,Set)}toString(L,C,A){if(!L)return JSON.stringify(this);if(this.hasAllNullValues())return super.toString(L,C,A);throw new Error("Set items must all have null values")}};t._defineProperty(f,"tag","tag:yaml.org,2002:set");function d(v,L){let C=n.resolveMap(v,L);if(!C.hasAllNullValues())throw new t.YAMLSemanticError(L,"Set items must all have null values");return Object.assign(new f,C)}function y(v,L,C){let A=new f;for(let F of L)A.items.push(v.createPair(F,null,C));return A}var D={identify:v=>v instanceof Set,nodeClass:f,default:!1,tag:"tag:yaml.org,2002:set",resolve:d,createNode:y},S=(v,L)=>{let C=L.split(":").reduce((A,F)=>A*60+Number(F),0);return v==="-"?-C:C},N=({value:v})=>{if(isNaN(v)||!isFinite(v))return n.stringifyNumber(v);let L="";v<0&&(L="-",v=Math.abs(v));let C=[v%60];return v<60?C.unshift(0):(v=Math.round((v-C[0])/60),C.unshift(v%60),v>=60&&(v=Math.round((v-C[0])/60),C.unshift(v))),L+C.map(A=>A<10?"0"+String(A):String(A)).join(":").replace(/000000\d*$/,"")},x={identify:v=>typeof v=="number",default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+)$/,resolve:(v,L,C)=>S(L,C.replace(/_/g,"")),stringify:N},k={identify:v=>typeof v=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*)$/,resolve:(v,L,C)=>S(L,C.replace(/_/g,"")),stringify:N},b={identify:v=>v 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:(v,L,C,A,F,M,T,P,V)=>{P&&(P=(P+"00").substr(1,3));let H=Date.UTC(L,C-1,A,F||0,M||0,T||0,P||0);if(V&&V!=="Z"){let K=S(V[0],V.slice(1));Math.abs(K)<30&&(K*=60),H-=6e4*K}return new Date(H)},stringify:({value:v})=>v.toISOString().replace(/((T00:00)?:00)?\.000Z$/,"")};function w(v){let L={};return v?typeof YAML_SILENCE_DEPRECATION_WARNINGS<"u"?!YAML_SILENCE_DEPRECATION_WARNINGS:!L.YAML_SILENCE_DEPRECATION_WARNINGS:typeof YAML_SILENCE_WARNINGS<"u"?!YAML_SILENCE_WARNINGS:!L.YAML_SILENCE_WARNINGS}function h(v,L){w(!1)&&console.warn(L?`${L}: ${v}`:v)}function g(v){if(w(!0)){let L=v.replace(/.*yaml[/\\]/i,"").replace(/\.js$/,"").replace(/\\/g,"/");h(`The endpoint 'yaml/${L}' will be removed in a future release.`,"DeprecationWarning")}}var m={};function E(v,L){if(!m[v]&&w(!0)){m[v]=!0;let C=`The option '${v}' will be removed in a future release`;C+=L?`, use '${L}' instead.`:".",h(C,"DeprecationWarning")}}e.binary=r,e.floatTime=k,e.intTime=x,e.omap=c,e.pairs=a,e.set=D,e.timestamp=b,e.warn=h,e.warnFileDeprecation=g,e.warnOptionDeprecation=E}),y1=dn(e=>{var t=tr(),n=Hs(),r=g1();function s($,z,Z){let X=new n.YAMLMap($);if(z instanceof Map)for(let[ne,fe]of z)X.items.push($.createPair(ne,fe,Z));else if(z&&typeof z=="object")for(let ne of Object.keys(z))X.items.push($.createPair(ne,z[ne],Z));return typeof $.sortMapEntries=="function"&&X.items.sort($.sortMapEntries),X}var i={createNode:s,default:!0,nodeClass:n.YAMLMap,tag:"tag:yaml.org,2002:map",resolve:n.resolveMap};function a($,z,Z){let X=new n.YAMLSeq($);if(z&&z[Symbol.iterator])for(let ne of z){let fe=$.createNode(ne,Z.wrapScalars,null,Z);X.items.push(fe)}return X}var o={createNode:a,default:!0,nodeClass:n.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve:n.resolveSeq},l={identify:$=>typeof $=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:n.resolveString,stringify($,z,Z,X){return z=Object.assign({actualString:!0},z),n.stringifyString($,z,Z,X)},options:n.strOptions},u=[i,o,l],c=$=>typeof $=="bigint"||Number.isInteger($),f=($,z,Z)=>n.intOptions.asBigInt?BigInt($):parseInt(z,Z);function d($,z,Z){let{value:X}=$;return c(X)&&X>=0?Z+X.toString(z):n.stringifyNumber($)}var y={identify:$=>$==null,createNode:($,z,Z)=>Z.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},D={identify:$=>typeof $=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:$=>$[0]==="t"||$[0]==="T",options:n.boolOptions,stringify:({value:$})=>$?n.boolOptions.trueStr:n.boolOptions.falseStr},S={identify:$=>c($)&&$>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o([0-7]+)$/,resolve:($,z)=>f($,z,8),options:n.intOptions,stringify:$=>d($,8,"0o")},N={identify:c,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:$=>f($,$,10),options:n.intOptions,stringify:n.stringifyNumber},x={identify:$=>c($)&&$>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x([0-9a-fA-F]+)$/,resolve:($,z)=>f($,z,16),options:n.intOptions,stringify:$=>d($,16,"0x")},k={identify:$=>typeof $=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.inf|(\.nan))$/i,resolve:($,z)=>z?NaN:$[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:n.stringifyNumber},b={identify:$=>typeof $=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:$=>parseFloat($),stringify:({value:$})=>Number($).toExponential()},w={identify:$=>typeof $=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.([0-9]+)|[0-9]+\.([0-9]*))$/,resolve($,z,Z){let X=z||Z,ne=new n.Scalar(parseFloat($));return X&&X[X.length-1]==="0"&&(ne.minFractionDigits=X.length),ne},stringify:n.stringifyNumber},h=u.concat([y,D,S,N,x,k,b,w]),g=$=>typeof $=="bigint"||Number.isInteger($),m=({value:$})=>JSON.stringify($),E=[i,o,{identify:$=>typeof $=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:n.resolveString,stringify:m},{identify:$=>$==null,createNode:($,z,Z)=>Z.wrapScalars?new n.Scalar(null):null,default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:m},{identify:$=>typeof $=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true|false$/,resolve:$=>$==="true",stringify:m},{identify:g,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:$=>n.intOptions.asBigInt?BigInt($):parseInt($,10),stringify:({value:$})=>g($)?$.toString():JSON.stringify($)},{identify:$=>typeof $=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:$=>parseFloat($),stringify:m}];E.scalarFallback=$=>{throw new SyntaxError(`Unresolved plain scalar ${JSON.stringify($)}`)};var v=({value:$})=>$?n.boolOptions.trueStr:n.boolOptions.falseStr,L=$=>typeof $=="bigint"||Number.isInteger($);function C($,z,Z){let X=z.replace(/_/g,"");if(n.intOptions.asBigInt){switch(Z){case 2:X=`0b${X}`;break;case 8:X=`0o${X}`;break;case 16:X=`0x${X}`;break}let fe=BigInt(X);return $==="-"?BigInt(-1)*fe:fe}let ne=parseInt(X,Z);return $==="-"?-1*ne:ne}function A($,z,Z){let{value:X}=$;if(L(X)){let ne=X.toString(z);return X<0?"-"+Z+ne.substr(1):Z+ne}return n.stringifyNumber($)}var F=u.concat([{identify:$=>$==null,createNode:($,z,Z)=>Z.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:$=>typeof $=="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:v},{identify:$=>typeof $=="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:v},{identify:L,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^([-+]?)0b([0-1_]+)$/,resolve:($,z,Z)=>C(z,Z,2),stringify:$=>A($,2,"0b")},{identify:L,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^([-+]?)0([0-7_]+)$/,resolve:($,z,Z)=>C(z,Z,8),stringify:$=>A($,8,"0")},{identify:L,default:!0,tag:"tag:yaml.org,2002:int",test:/^([-+]?)([0-9][0-9_]*)$/,resolve:($,z,Z)=>C(z,Z,10),stringify:n.stringifyNumber},{identify:L,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^([-+]?)0x([0-9a-fA-F_]+)$/,resolve:($,z,Z)=>C(z,Z,16),stringify:$=>A($,16,"0x")},{identify:$=>typeof $=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.inf|(\.nan))$/i,resolve:($,z)=>z?NaN:$[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:n.stringifyNumber},{identify:$=>typeof $=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?([0-9][0-9_]*)?(\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:$=>parseFloat($.replace(/_/g,"")),stringify:({value:$})=>Number($).toExponential()},{identify:$=>typeof $=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.([0-9_]*)$/,resolve($,z){let Z=new n.Scalar(parseFloat($.replace(/_/g,"")));if(z){let X=z.replace(/_/g,"");X[X.length-1]==="0"&&(Z.minFractionDigits=X.length)}return Z},stringify:n.stringifyNumber}],r.binary,r.omap,r.pairs,r.set,r.intTime,r.floatTime,r.timestamp),M={core:h,failsafe:u,json:E,yaml11:F},T={binary:r.binary,bool:D,float:w,floatExp:b,floatNaN:k,floatTime:r.floatTime,int:N,intHex:x,intOct:S,intTime:r.intTime,map:i,null:y,omap:r.omap,pairs:r.pairs,seq:o,set:r.set,timestamp:r.timestamp};function P($,z,Z){if(z){let X=Z.filter(fe=>fe.tag===z),ne=X.find(fe=>!fe.format)||X[0];if(!ne)throw new Error(`Tag ${z} not found`);return ne}return Z.find(X=>(X.identify&&X.identify($)||X.class&&$ instanceof X.class)&&!X.format)}function V($,z,Z){if($ instanceof n.Node)return $;let{defaultPrefix:X,onTagObj:ne,prevObjects:fe,schema:ft,wrapScalars:Sn}=Z;z&&z.startsWith("!!")&&(z=X+z.slice(2));let En=P($,z,ft.tags);if(!En){if(typeof $.toJSON=="function"&&($=$.toJSON()),!$||typeof $!="object")return Sn?new n.Scalar($):$;En=$ instanceof Map?i:$[Symbol.iterator]?o:i}ne&&(ne(En),delete Z.onTagObj);let en={value:void 0,node:void 0};if($&&typeof $=="object"&&fe){let fi=fe.get($);if(fi){let Ya=new n.Alias(fi);return Z.aliasNodes.push(Ya),Ya}en.value=$,fe.set($,en)}return en.node=En.createNode?En.createNode(Z.schema,$,Z):Sn?new n.Scalar($):$,z&&en.node instanceof n.Node&&(en.node.tag=z),en.node}function H($,z,Z,X){let ne=$[X.replace(/\W/g,"")];if(!ne){let fe=Object.keys($).map(ft=>JSON.stringify(ft)).join(", ");throw new Error(`Unknown schema "${X}"; use one of ${fe}`)}if(Array.isArray(Z))for(let fe of Z)ne=ne.concat(fe);else typeof Z=="function"&&(ne=Z(ne.slice()));for(let fe=0;fe<ne.length;++fe){let ft=ne[fe];if(typeof ft=="string"){let Sn=z[ft];if(!Sn){let En=Object.keys(z).map(en=>JSON.stringify(en)).join(", ");throw new Error(`Unknown custom tag "${ft}"; use one of ${En}`)}ne[fe]=Sn}}return ne}var K=($,z)=>$.key<z.key?-1:$.key>z.key?1:0,J=class wg{constructor({customTags:z,merge:Z,schema:X,sortMapEntries:ne,tags:fe}){this.merge=!!Z,this.name=X,this.sortMapEntries=ne===!0?K:ne||null,!z&&fe&&r.warnOptionDeprecation("tags","customTags"),this.tags=H(M,T,z||fe,X)}createNode(z,Z,X,ne){let fe={defaultPrefix:wg.defaultPrefix,schema:this,wrapScalars:Z},ft=ne?Object.assign(ne,fe):fe;return V(z,X,ft)}createPair(z,Z,X){X||(X={wrapScalars:!0});let ne=this.createNode(z,X.wrapScalars,null,X),fe=this.createNode(Z,X.wrapScalars,null,X);return new n.Pair(ne,fe)}};t._defineProperty(J,"defaultPrefix",t.defaultTagPrefix),t._defineProperty(J,"defaultTags",t.defaultTags),e.Schema=J}),Pb=dn(e=>{var t=tr(),n=Hs(),r=y1(),s={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"},i={get binary(){return n.binaryOptions},set binary(w){Object.assign(n.binaryOptions,w)},get bool(){return n.boolOptions},set bool(w){Object.assign(n.boolOptions,w)},get int(){return n.intOptions},set int(w){Object.assign(n.intOptions,w)},get null(){return n.nullOptions},set null(w){Object.assign(n.nullOptions,w)},get str(){return n.strOptions},set str(w){Object.assign(n.strOptions,w)}},a={"1.0":{schema:"yaml-1.1",merge:!0,tagPrefixes:[{handle:"!",prefix:t.defaultTagPrefix},{handle:"!!",prefix:"tag:private.yaml.org,2002:"}]},1.1:{schema:"yaml-1.1",merge:!0,tagPrefixes:[{handle:"!",prefix:"!"},{handle:"!!",prefix:t.defaultTagPrefix}]},1.2:{schema:"core",merge:!1,tagPrefixes:[{handle:"!",prefix:"!"},{handle:"!!",prefix:t.defaultTagPrefix}]}};function o(w,h){if((w.version||w.options.version)==="1.0"){let E=h.match(/^tag:private\.yaml\.org,2002:([^:/]+)$/);if(E)return"!"+E[1];let v=h.match(/^tag:([a-zA-Z0-9-]+)\.yaml\.org,2002:(.*)/);return v?`!${v[1]}/${v[2]}`:`!${h.replace(/^tag:/,"")}`}let g=w.tagPrefixes.find(E=>h.indexOf(E.prefix)===0);if(!g){let E=w.getDefaults().tagPrefixes;g=E&&E.find(v=>h.indexOf(v.prefix)===0)}if(!g)return h[0]==="!"?h:`!<${h}>`;let m=h.substr(g.prefix.length).replace(/[!,[\]{}]/g,E=>({"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"})[E]);return g.handle+m}function l(w,h){if(h instanceof n.Alias)return n.Alias;if(h.tag){let E=w.filter(v=>v.tag===h.tag);if(E.length>0)return E.find(v=>v.format===h.format)||E[0]}let g,m;if(h instanceof n.Scalar){m=h.value;let E=w.filter(v=>v.identify&&v.identify(m)||v.class&&m instanceof v.class);g=E.find(v=>v.format===h.format)||E.find(v=>!v.format)}else m=h,g=w.find(E=>E.nodeClass&&m instanceof E.nodeClass);if(!g){let E=m&&m.constructor?m.constructor.name:typeof m;throw new Error(`Tag not resolved for ${E} value`)}return g}function u(w,h,{anchors:g,doc:m}){let E=[],v=m.anchors.getName(w);return v&&(g[v]=w,E.push(`&${v}`)),w.tag?E.push(o(m,w.tag)):h.default||E.push(o(m,h.tag)),E.join(" ")}function c(w,h,g,m){let{anchors:E,schema:v}=h.doc,L;if(!(w instanceof n.Node)){let F={aliasNodes:[],onTagObj:M=>L=M,prevObjects:new Map};w=v.createNode(w,!0,null,F);for(let M of F.aliasNodes){M.source=M.source.node;let T=E.getName(M.source);T||(T=E.newName(),E.map[T]=M.source)}}if(w instanceof n.Pair)return w.toString(h,g,m);L||(L=l(v.tags,w));let C=u(w,L,h);C.length>0&&(h.indentAtStart=(h.indentAtStart||0)+C.length+1);let A=typeof L.stringify=="function"?L.stringify(w,h,g,m):w instanceof n.Scalar?n.stringifyString(w,h,g,m):w.toString(h,g,m);return C?w instanceof n.Scalar||A[0]==="{"||A[0]==="["?`${C} ${A}`:`${C}
|
|
302
|
+
${h.indent}${A}`:A}var f=class vg{static validAnchorNode(h){return h instanceof n.Scalar||h instanceof n.YAMLSeq||h instanceof n.YAMLMap}constructor(h){t._defineProperty(this,"map",Object.create(null)),this.prefix=h}createAlias(h,g){return this.setAnchor(h,g),new n.Alias(h)}createMergePair(...h){let g=new n.Merge;return g.value.items=h.map(m=>{if(m instanceof n.Alias){if(m.source instanceof n.YAMLMap)return m}else if(m instanceof n.YAMLMap)return this.createAlias(m);throw new Error("Merge sources must be Map nodes or their Aliases")}),g}getName(h){let{map:g}=this;return Object.keys(g).find(m=>g[m]===h)}getNames(){return Object.keys(this.map)}getNode(h){return this.map[h]}newName(h){h||(h=this.prefix);let g=Object.keys(this.map);for(let m=1;;++m){let E=`${h}${m}`;if(!g.includes(E))return E}}resolveNodes(){let{map:h,_cstAliases:g}=this;Object.keys(h).forEach(m=>{h[m]=h[m].resolved}),g.forEach(m=>{m.source=m.source.resolved}),delete this._cstAliases}setAnchor(h,g){if(h!=null&&!vg.validAnchorNode(h))throw new Error("Anchors may only be set for Scalar, Seq and Map nodes");if(g&&/[\x00-\x19\s,[\]{}]/.test(g))throw new Error("Anchor names must not contain whitespace or control characters");let{map:m}=this,E=h&&Object.keys(m).find(v=>m[v]===h);if(E)if(g)E!==g&&(delete m[E],m[g]=h);else return E;else{if(!g){if(!h)return null;g=this.newName()}m[g]=h}return g}},d=(w,h)=>{if(w&&typeof w=="object"){let{tag:g}=w;w instanceof n.Collection?(g&&(h[g]=!0),w.items.forEach(m=>d(m,h))):w instanceof n.Pair?(d(w.key,h),d(w.value,h)):w instanceof n.Scalar&&g&&(h[g]=!0)}return h},y=w=>Object.keys(d(w,{}));function D(w,h){let g={before:[],after:[]},m,E=!1;for(let v of h)if(v.valueRange){if(m!==void 0){let C="Document contains trailing content not separated by a ... or --- line";w.errors.push(new t.YAMLSyntaxError(v,C));break}let L=n.resolveNode(w,v);E&&(L.spaceBefore=!0,E=!1),m=L}else v.comment!==null?(m===void 0?g.before:g.after).push(v.comment):v.type===t.Type.BLANK_LINE&&(E=!0,m===void 0&&g.before.length>0&&!w.commentBefore&&(w.commentBefore=g.before.join(`
|
|
303
|
+
`),g.before=[]));if(w.contents=m||null,!m)w.comment=g.before.concat(g.after).join(`
|
|
304
|
+
`)||null;else{let v=g.before.join(`
|
|
305
|
+
`);if(v){let L=m instanceof n.Collection&&m.items[0]?m.items[0]:m;L.commentBefore=L.commentBefore?`${v}
|
|
306
|
+
${L.commentBefore}`:v}w.comment=g.after.join(`
|
|
307
|
+
`)||null}}function S({tagPrefixes:w},h){let[g,m]=h.parameters;if(!g||!m){let E="Insufficient parameters given for %TAG directive";throw new t.YAMLSemanticError(h,E)}if(w.some(E=>E.handle===g)){let E="The %TAG directive must only be given at most once per handle in the same document.";throw new t.YAMLSemanticError(h,E)}return{handle:g,prefix:m}}function N(w,h){let[g]=h.parameters;if(h.name==="YAML:1.0"&&(g="1.0"),!g){let m="Insufficient parameters given for %YAML directive";throw new t.YAMLSemanticError(h,m)}if(!a[g]){let m=`Document will be parsed as YAML ${w.version||w.options.version} rather than YAML ${g}`;w.warnings.push(new t.YAMLWarning(h,m))}return g}function x(w,h,g){let m=[],E=!1;for(let v of h){let{comment:L,name:C}=v;switch(C){case"TAG":try{w.tagPrefixes.push(S(w,v))}catch(A){w.errors.push(A)}E=!0;break;case"YAML":case"YAML:1.0":if(w.version){let A="The %YAML directive must only be given at most once per document.";w.errors.push(new t.YAMLSemanticError(v,A))}try{w.version=N(w,v)}catch(A){w.errors.push(A)}E=!0;break;default:if(C){let A=`YAML only supports %TAG and %YAML directives, and not %${C}`;w.warnings.push(new t.YAMLWarning(v,A))}}L&&m.push(L)}if(g&&!E&&(w.version||g.version||w.options.version)==="1.1"){let v=({handle:L,prefix:C})=>({handle:L,prefix:C});w.tagPrefixes=g.tagPrefixes.map(v),w.version=g.version}w.commentBefore=m.join(`
|
|
308
|
+
`)||null}function k(w){if(w instanceof n.Collection)return!0;throw new Error("Expected a YAML collection as document contents")}var b=class nc{constructor(h){this.anchors=new f(h.anchorPrefix),this.commentBefore=null,this.comment=null,this.contents=null,this.directivesEndMarker=null,this.errors=[],this.options=h,this.schema=null,this.tagPrefixes=[],this.version=null,this.warnings=[]}add(h){return k(this.contents),this.contents.add(h)}addIn(h,g){k(this.contents),this.contents.addIn(h,g)}delete(h){return k(this.contents),this.contents.delete(h)}deleteIn(h){return n.isEmptyPath(h)?this.contents==null?!1:(this.contents=null,!0):(k(this.contents),this.contents.deleteIn(h))}getDefaults(){return nc.defaults[this.version]||nc.defaults[this.options.version]||{}}get(h,g){return this.contents instanceof n.Collection?this.contents.get(h,g):void 0}getIn(h,g){return n.isEmptyPath(h)?!g&&this.contents instanceof n.Scalar?this.contents.value:this.contents:this.contents instanceof n.Collection?this.contents.getIn(h,g):void 0}has(h){return this.contents instanceof n.Collection?this.contents.has(h):!1}hasIn(h){return n.isEmptyPath(h)?this.contents!==void 0:this.contents instanceof n.Collection?this.contents.hasIn(h):!1}set(h,g){k(this.contents),this.contents.set(h,g)}setIn(h,g){n.isEmptyPath(h)?this.contents=g:(k(this.contents),this.contents.setIn(h,g))}setSchema(h,g){if(!h&&!g&&this.schema)return;typeof h=="number"&&(h=h.toFixed(1)),h==="1.0"||h==="1.1"||h==="1.2"?(this.version?this.version=h:this.options.version=h,delete this.options.schema):h&&typeof h=="string"&&(this.options.schema=h),Array.isArray(g)&&(this.options.customTags=g);let m=Object.assign({},this.getDefaults(),this.options);this.schema=new r.Schema(m)}parse(h,g){this.options.keepCstNodes&&(this.cstNode=h),this.options.keepNodeTypes&&(this.type="DOCUMENT");let{directives:m=[],contents:E=[],directivesEndMarker:v,error:L,valueRange:C}=h;if(L&&(L.source||(L.source=this),this.errors.push(L)),x(this,m,g),v&&(this.directivesEndMarker=!0),this.range=C?[C.start,C.end]:null,this.setSchema(),this.anchors._cstAliases=[],D(this,E),this.anchors.resolveNodes(),this.options.prettyErrors){for(let A of this.errors)A instanceof t.YAMLError&&A.makePretty();for(let A of this.warnings)A instanceof t.YAMLError&&A.makePretty()}return this}listNonDefaultTags(){return y(this.contents).filter(h=>h.indexOf(r.Schema.defaultPrefix)!==0)}setTagPrefix(h,g){if(h[0]!=="!"||h[h.length-1]!=="!")throw new Error("Handle must start and end with !");if(g){let m=this.tagPrefixes.find(E=>E.handle===h);m?m.prefix=g:this.tagPrefixes.push({handle:h,prefix:g})}else this.tagPrefixes=this.tagPrefixes.filter(m=>m.handle!==h)}toJSON(h,g){let{keepBlobsInJSON:m,mapAsMap:E,maxAliasCount:v}=this.options,L=m&&(typeof h!="string"||!(this.contents instanceof n.Scalar)),C={doc:this,indentStep:" ",keep:L,mapAsMap:L&&!!E,maxAliasCount:v,stringify:c},A=Object.keys(this.anchors.map);A.length>0&&(C.anchors=new Map(A.map(M=>[this.anchors.map[M],{alias:[],aliasCount:0,count:1}])));let F=n.toJSON(this.contents,h,C);if(typeof g=="function"&&C.anchors)for(let{count:M,res:T}of C.anchors.values())g(T,M);return F}toString(){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");let h=this.options.indent;if(!Number.isInteger(h)||h<=0){let A=JSON.stringify(h);throw new Error(`"indent" option must be a positive integer, not ${A}`)}this.setSchema();let g=[],m=!1;if(this.version){let A="%YAML 1.2";this.schema.name==="yaml-1.1"&&(this.version==="1.0"?A="%YAML:1.0":this.version==="1.1"&&(A="%YAML 1.1")),g.push(A),m=!0}let E=this.listNonDefaultTags();this.tagPrefixes.forEach(({handle:A,prefix:F})=>{E.some(M=>M.indexOf(F)===0)&&(g.push(`%TAG ${A} ${F}`),m=!0)}),(m||this.directivesEndMarker)&&g.push("---"),this.commentBefore&&((m||!this.directivesEndMarker)&&g.unshift(""),g.unshift(this.commentBefore.replace(/^/gm,"#")));let v={anchors:Object.create(null),doc:this,indent:"",indentStep:" ".repeat(h),stringify:c},L=!1,C=null;if(this.contents){this.contents instanceof n.Node&&(this.contents.spaceBefore&&(m||this.directivesEndMarker)&&g.push(""),this.contents.commentBefore&&g.push(this.contents.commentBefore.replace(/^/gm,"#")),v.forceBlockIndent=!!this.comment,C=this.contents.comment);let A=C?null:()=>L=!0,F=c(this.contents,v,()=>C=null,A);g.push(n.addComment(F,"",C))}else this.contents!==void 0&&g.push(c(this.contents,v));return this.comment&&((!L||C)&&g[g.length-1]!==""&&g.push(""),g.push(this.comment.replace(/^/gm,"#"))),g.join(`
|
|
309
|
+
`)+`
|
|
310
|
+
`}};t._defineProperty(b,"defaults",a),e.Document=b,e.defaultOptions=s,e.scalarOptions=i}),Ib=dn(e=>{var t=Rb(),n=Pb(),r=y1(),s=tr(),i=g1();Hs();function a(y,D=!0,S){S===void 0&&typeof D=="string"&&(S=D,D=!0);let N=Object.assign({},n.Document.defaults[n.defaultOptions.version],n.defaultOptions);return new r.Schema(N).createNode(y,D,S)}var o=class extends n.Document{constructor(y){super(Object.assign({},n.defaultOptions,y))}};function l(y,D){let S=[],N;for(let x of t.parse(y)){let k=new o(D);k.parse(x,N),S.push(k),N=k}return S}function u(y,D){let S=t.parse(y),N=new o(D).parse(S[0]);if(S.length>1){let x="Source contains multiple documents; please use YAML.parseAllDocuments()";N.errors.unshift(new s.YAMLSemanticError(S[1],x))}return N}function c(y,D){let S=u(y,D);if(S.warnings.forEach(N=>i.warn(N)),S.errors.length>0)throw S.errors[0];return S.toJSON()}function f(y,D){let S=new o(D);return S.contents=y,String(S)}var d={createNode:a,defaultOptions:n.defaultOptions,Document:o,parse:c,parseAllDocuments:l,parseCST:t.parse,parseDocument:u,scalarOptions:n.scalarOptions,stringify:f};e.YAML=d}),b1=dn((e,t)=>{t.exports=Ib().YAML}),$b=dn(e=>{var t=Hs(),n=tr();e.findPair=t.findPair,e.parseMap=t.resolveMap,e.parseSeq=t.resolveSeq,e.stringifyNumber=t.stringifyNumber,e.stringifyString=t.stringifyString,e.toJSON=t.toJSON,e.Type=n.Type,e.YAMLError=n.YAMLError,e.YAMLReferenceError=n.YAMLReferenceError,e.YAMLSemanticError=n.YAMLSemanticError,e.YAMLSyntaxError=n.YAMLSyntaxError,e.YAMLWarning=n.YAMLWarning}),w1={};d1(w1,{__parsePrettierYamlConfig:()=>mm,languages:()=>z1,options:()=>G1,parsers:()=>eu,printers:()=>dm});var Bb=(e,t,n,r)=>{if(!(e&&t==null))return t.replaceAll?t.replaceAll(n,r):n.global?t.replace(n,r):t.split(n).join(r)},Bl=Bb,v1="string",D1="array",S1="cursor",E1="indent",Vl="align",A1="trim",jl="group",Ul="fill",ql="if-break",x1="indent-if-break",Wl="line-suffix",N1="line-suffix-boundary",es="line",L1="label",Hl="break-parent",k1=new Set([S1,E1,Vl,A1,jl,Ul,ql,x1,Wl,N1,es,L1,Hl]),Vb=(e,t,n)=>{if(!(e&&t==null))return Array.isArray(t)||typeof t=="string"?t[n<0?t.length+n:n]:t.at(n)},Lt=Vb;function jb(e){if(typeof e=="string")return v1;if(Array.isArray(e))return D1;if(!e)return;let{type:t}=e;if(k1.has(t))return t}var C1=jb,Ub=e=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(e);function qb(e){let t=e===null?"null":typeof e;if(t!=="string"&&t!=="object")return`Unexpected doc '${t}',
|
|
311
|
+
Expected it to be 'string' or 'object'.`;if(C1(e))throw new Error("doc is valid.");let n=Object.prototype.toString.call(e);if(n!=="[object Object]")return`Unexpected doc '${n}'.`;let r=Ub([...k1].map(s=>`'${s}'`));return`Unexpected doc.type '${e.type}'.
|
|
312
|
+
Expected it to be ${r}.`}var Wb=class extends Error{constructor(n){super(qb(n));vt(this,"name","InvalidDocError");this.doc=n}},Hb=Wb;function Yb(e,t){if(typeof e=="string")return t(e);let n=new Map;return r(e);function r(i){if(n.has(i))return n.get(i);let a=s(i);return n.set(i,a),a}function s(i){switch(C1(i)){case D1:return t(i.map(r));case Ul:return t({...i,parts:i.parts.map(r)});case ql:return t({...i,breakContents:r(i.breakContents),flatContents:r(i.flatContents)});case jl:{let{expandedStates:a,contents:o}=i;return a?(a=a.map(r),o=a[0]):o=r(o),t({...i,contents:o,expandedStates:a})}case Vl:case E1:case x1:case L1:case Wl:return t({...i,contents:r(i.contents)});case v1:case S1:case A1:case N1:case es:case Hl:return t(i);default:throw new Hb(i)}}}function zb(e,t=Gl){return Yb(e,n=>typeof n=="string"?it(t,n.split(`
|
|
313
|
+
`)):n)}var Gb=()=>{},Jb=Gb;function ra(e,t){return{type:Vl,contents:t,n:e}}function sa(e,t={}){return Jb(t.expandedStates),{type:jl,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function F1(e){return ra(Number.NEGATIVE_INFINITY,e)}function Qb(e){return ra({type:"root"},e)}function Kb(e){return ra(-1,e)}function _1(e,t){return sa(e[0],{...t,expandedStates:e})}function T1(e){return{type:Ul,parts:e}}function Yl(e,t="",n={}){return{type:ql,breakContents:e,flatContents:t,groupId:n.groupId}}function Xb(e){return{type:Wl,contents:e}}var zl={type:Hl},Zb={type:es,hard:!0},ew={type:es,hard:!0,literal:!0},Ys={type:es},M1={type:es,soft:!0},be=[Zb,zl],Gl=[ew,zl];function it(e,t){let n=[];for(let r=0;r<t.length;r++)r!==0&&n.push(e),n.push(t[r]);return n}function tw(e){return(t,n,r)=>{let s=!!(r!=null&&r.backwards);if(n===!1)return!1;let{length:i}=t,a=n;for(;a>=0&&a<i;){let o=t.charAt(a);if(e instanceof RegExp){if(!e.test(o))return a}else if(!e.includes(o))return a;s?a--:a++}return a===-1||a===i?a:!1}}var O1=tw(" ");function nw(e,t,n){let r=!!(n!=null&&n.backwards);if(t===!1)return!1;let s=e.charAt(t);if(r){if(e.charAt(t-1)==="\r"&&s===`
|
|
314
|
+
`)return t-2;if(s===`
|
|
315
|
+
`||s==="\r"||s==="\u2028"||s==="\u2029")return t-1}else{if(s==="\r"&&e.charAt(t+1)===`
|
|
316
|
+
`)return t+2;if(s===`
|
|
317
|
+
`||s==="\r"||s==="\u2028"||s==="\u2029")return t+1}return t}var R1=nw;function rw(e,t){let n=t-1;n=O1(e,n,{backwards:!0}),n=R1(e,n,{backwards:!0}),n=O1(e,n,{backwards:!0});let r=R1(e,n,{backwards:!0});return n!==r}var sw=rw,iw=class extends Error{constructor(n,r,s="type"){super(`Unexpected ${r} node ${s}: ${JSON.stringify(n[s])}.`);vt(this,"name","UnexpectedNodeError");this.node=n}},aw=iw;function P1(e,t){let{node:n}=e;if(n.type==="root"&&t.filepath&&/(?:[/\\]|^)\.(?:prettier|stylelint|lintstaged)rc$/u.test(t.filepath))return async r=>{let s=await r(t.originalText,{parser:"json"});return s?[s,be]:void 0}}P1.getVisitorKeys=()=>[];var ow=P1,zs=null;function Gs(e){if(zs!==null&&typeof zs.property){let t=zs;return zs=Gs.prototype=null,t}return zs=Gs.prototype=e??Object.create(null),new Gs}var lw=10;for(let e=0;e<=lw;e++)Gs();function uw(e){return Gs(e)}function cw(e,t="type"){uw(e);function n(r){let s=r[t],i=e[s];if(!Array.isArray(i))throw Object.assign(new Error(`Missing visitor keys for '${s}'.`),{node:r});return i}return n}var fw=cw,hw=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(([e,t])=>[e,[...t,"anchor","tag","indicatorComment","leadingComments","middleComments","trailingComment","endComments"]])),dw=hw,mw=fw(dw),pw=mw;function ia(e){return e.position.start.offset}function gw(e){return e.position.end.offset}var yw="format",bw=/^\s*#[^\S\n]*@(?:noformat|noprettier)\s*?(?:\n|$)/u,ww=/^\s*#[^\S\n]*@(?:format|prettier)\s*?(?:\n|$)/u,vw=/^\s*@(?:format|prettier)\s*$/u;function Dw(e){return vw.test(e)}function Sw(e){return ww.test(e)}function Ew(e){return bw.test(e)}function Aw(e){return`# @${yw}
|
|
318
|
+
|
|
319
|
+
${e}`}function xw(e){return Array.isArray(e)&&e.length>0}var Js=xw;function Gt(e,t){return typeof(e==null?void 0:e.type)=="string"&&(!t||t.includes(e.type))}function I1(e,t,n){return t("children"in e?{...e,children:e.children.map(r=>I1(r,t,e))}:e,n)}function Qs(e,t,n){Object.defineProperty(e,t,{get:n,enumerable:!1})}function Nw(e,t){let n=0,r=t.length;for(let s=e.position.end.offset-1;s<r;s++){let i=t[s];if(i===`
|
|
320
|
+
`&&n++,n===1&&/\S/u.test(i))return!1;if(n===2)return!0}return!1}function $1(e){let{node:t}=e;switch(t.type){case"tag":case"anchor":case"comment":return!1}let n=e.stack.length;for(let r=1;r<n;r++){let s=e.stack[r],i=e.stack[r-1];if(Array.isArray(i)&&typeof s=="number"&&s!==i.length-1)return!1}return!0}function Jl(e){return Js(e.children)?Jl(Lt(!1,e.children,-1)):e}function B1(e){return e.value.trim()==="prettier-ignore"}function Lw(e){let{node:t}=e;if(t.type==="documentBody"){let n=e.parent.head;return kt(n)&&B1(Lt(!1,n.endComments,-1))}return Tn(t)&&B1(Lt(!1,t.leadingComments,-1))}function aa(e){return!Js(e.children)&&!kw(e)}function kw(e){return Tn(e)||ts(e)||V1(e)||$t(e)||kt(e)}function Tn(e){return Js(e==null?void 0:e.leadingComments)}function ts(e){return Js(e==null?void 0:e.middleComments)}function V1(e){return e==null?void 0:e.indicatorComment}function $t(e){return e==null?void 0:e.trailingComment}function kt(e){return Js(e==null?void 0:e.endComments)}function j1(e){let t=[],n;for(let r of e.split(/( +)/u))r!==" "?n===" "?t.push(r):t.push((t.pop()||"")+r):n===void 0&&t.unshift(""),n=r;return n===" "&&t.push((t.pop()||"")+" "),t[0]===""&&(t.shift(),t.unshift(" "+(t.shift()||""))),t}function Cw(e,t,n){let r=t.split(`
|
|
321
|
+
`).map((s,i,a)=>i===0&&i===a.length-1?s:i!==0&&i!==a.length-1?s.trim():i===0?s.trimEnd():s.trimStart());return n.proseWrap==="preserve"?r.map(s=>s.length===0?[]:[s]):r.map(s=>s.length===0?[]:j1(s)).reduce((s,i,a)=>a!==0&&r[a-1].length>0&&i.length>0&&!(e==="quoteDouble"&&Lt(!1,Lt(!1,s,-1),-1).endsWith("\\"))?[...s.slice(0,-1),[...Lt(!1,s,-1),...i]]:[...s,i],[]).map(s=>n.proseWrap==="never"?[s.join(" ")]:s)}function Fw(e,{parentIndent:t,isLastDescendant:n,options:r}){let s=e.position.start.line===e.position.end.line?"":r.originalText.slice(e.position.start.offset,e.position.end.offset).match(/^[^\n]*\n(.*)$/su)[1],i;if(e.indent===null){let l=s.match(/^(?<leadingSpace> *)[^\n\r ]/mu);i=l?l.groups.leadingSpace.length:Number.POSITIVE_INFINITY}else i=e.indent-1+t;let a=s.split(`
|
|
322
|
+
`).map(l=>l.slice(i));if(r.proseWrap==="preserve"||e.type==="blockLiteral")return o(a.map(l=>l.length===0?[]:[l]));return o(a.map(l=>l.length===0?[]:j1(l)).reduce((l,u,c)=>c!==0&&a[c-1].length>0&&u.length>0&&!/^\s/u.test(u[0])&&!/^\s|\s$/u.test(Lt(!1,l,-1))?[...l.slice(0,-1),[...Lt(!1,l,-1),...u]]:[...l,u],[]).map(l=>l.reduce((u,c)=>u.length>0&&/\s$/u.test(Lt(!1,u,-1))?[...u.slice(0,-1),Lt(!1,u,-1)+" "+c]:[...u,c],[])).map(l=>r.proseWrap==="never"?[l.join(" ")]:l));function o(l){if(e.chomping==="keep")return Lt(!1,l,-1).length===0?l.slice(0,-1):l;let u=0;for(let c=l.length-1;c>=0&&l[c].length===0;c--)u++;return u===0?l:u>=2&&!n?l.slice(0,-(u-1)):l.slice(0,-u)}}function Ql(e){if(!e)return!0;switch(e.type){case"plain":case"quoteDouble":case"quoteSingle":case"alias":case"flowMapping":case"flowSequence":return!0;default:return!1}}var Kl=new WeakMap;function U1(e,t){let{node:n,root:r}=e,s;return Kl.has(r)?s=Kl.get(r):(s=new Set,Kl.set(r,s)),!s.has(n.position.end.line)&&(s.add(n.position.end.line),Nw(n,t)&&!q1(e.parent))?M1:""}function q1(e){return kt(e)&&!Gt(e,["documentHead","documentBody","flowMapping","flowSequence"])}function Ct(e,t){return ra(" ".repeat(e),t)}function _w(e,t,n){let{node:r}=e,s=e.ancestors.filter(u=>u.type==="sequence"||u.type==="mapping").length,i=$1(e),a=[r.type==="blockFolded"?">":"|"];r.indent!==null&&a.push(r.indent.toString()),r.chomping!=="clip"&&a.push(r.chomping==="keep"?"+":"-"),V1(r)&&a.push(" ",n("indicatorComment"));let o=Fw(r,{parentIndent:s,isLastDescendant:i,options:t}),l=[];for(let[u,c]of o.entries())u===0&&l.push(be),l.push(T1(it(Ys,c))),u!==o.length-1?l.push(c.length===0?be:Qb(Gl)):r.chomping==="keep"&&i&&l.push(F1(c.length===0?be:Gl));return r.indent===null?a.push(Kb(Ct(t.tabWidth,l))):a.push(F1(Ct(r.indent-1+s,l))),a}var Tw=_w;function W1(e,t,n){let{node:r}=e,s=r.type==="flowMapping",i=s?"{":"[",a=s?"}":"]",o=M1;s&&r.children.length>0&&t.bracketSpacing&&(o=Ys);let l=Lt(!1,r.children,-1),u=(l==null?void 0:l.type)==="flowMappingItem"&&aa(l.key)&&aa(l.value);return[i,Ct(t.tabWidth,[o,Mw(e,t,n),t.trailingComma==="none"?"":Yl(","),kt(r)?[be,it(be,e.map(n,"endComments"))]:""]),u?"":o,a]}function Mw(e,t,n){return e.map(({isLast:r,node:s,next:i})=>[n(),r?"":[",",Ys,s.position.start.line!==i.position.start.line?U1(e,t.originalText):""]],"children")}function Ow(e,t,n){var r;let{node:s,parent:i}=e,{key:a,value:o}=s,l=aa(a),u=aa(o);if(l&&u)return": ";let c=n("key"),f=Rw(s)?" ":"";if(u)return s.type==="flowMappingItem"&&i.type==="flowMapping"?c:s.type==="mappingItem"&&Xl(a.content,t)&&!$t(a.content)&&((r=i.tag)==null?void 0:r.value)!=="tag:yaml.org,2002:set"?[c,f,":"]:["? ",Ct(2,c)];let d=n("value");if(l)return[": ",Ct(2,d)];if(Tn(o)||!Ql(a.content))return["? ",Ct(2,c),be,...e.map(()=>[n(),be],"value","leadingComments"),": ",Ct(2,d)];if(Pw(a.content)&&!Tn(a.content)&&!ts(a.content)&&!$t(a.content)&&!kt(a)&&!Tn(o.content)&&!ts(o.content)&&!kt(o)&&Xl(o.content,t))return[c,f,": ",d];let y=Symbol("mappingKey"),D=sa([Yl("? "),sa(Ct(2,c),{id:y})]),S=[be,": ",Ct(2,d)],N=[f,":"];kt(o)&&o.content&&Gt(o.content,["flowMapping","flowSequence"])&&o.content.children.length===0?N.push(" "):Tn(o.content)||kt(o)&&o.content&&!Gt(o.content,["mapping","sequence"])||i.type==="mapping"&&$t(a.content)&&Ql(o.content)||Gt(o.content,["mapping","sequence"])&&o.content.tag===null&&o.content.anchor===null?N.push(be):o.content?N.push(Ys):$t(o)&&N.push(" "),N.push(d);let x=Ct(t.tabWidth,N);return Xl(a.content,t)&&!Tn(a.content)&&!ts(a.content)&&!kt(a)?_1([[c,x]]):_1([[D,Yl(S,x,{groupId:y})]])}function Xl(e,t){if(!e)return!0;switch(e.type){case"plain":case"quoteSingle":case"quoteDouble":break;case"alias":return!0;default:return!1}if(t.proseWrap==="preserve")return e.position.start.line===e.position.end.line;if(/\\$/mu.test(t.originalText.slice(e.position.start.offset,e.position.end.offset)))return!1;switch(t.proseWrap){case"never":return!e.value.includes(`
|
|
323
|
+
`);case"always":return!/[\n ]/u.test(e.value);default:return!1}}function Rw(e){var t;return((t=e.key.content)==null?void 0:t.type)==="alias"}function Pw(e){if(!e)return!0;switch(e.type){case"plain":case"quoteDouble":case"quoteSingle":return e.position.start.line===e.position.end.line;case"alias":return!0;default:return!1}}var Iw=Ow;function $w(e){return I1(e,Bw)}function Bw(e){switch(e.type){case"document":Qs(e,"head",()=>e.children[0]),Qs(e,"body",()=>e.children[1]);break;case"documentBody":case"sequenceItem":case"flowSequenceItem":case"mappingKey":case"mappingValue":Qs(e,"content",()=>e.children[0]);break;case"mappingItem":case"flowMappingItem":Qs(e,"key",()=>e.children[0]),Qs(e,"value",()=>e.children[1]);break}return e}var Vw=$w;function jw(e,t,n){let{node:r}=e,s=[];r.type!=="mappingValue"&&Tn(r)&&s.push([it(be,e.map(n,"leadingComments")),be]);let{tag:i,anchor:a}=r;i&&s.push(n("tag")),i&&a&&s.push(" "),a&&s.push(n("anchor"));let o="";return Gt(r,["mapping","sequence","comment","directive","mappingItem","sequenceItem"])&&!$1(e)&&(o=U1(e,t.originalText)),(i||a)&&(Gt(r,["sequence","mapping"])&&!ts(r)?s.push(be):s.push(" ")),ts(r)&&s.push([r.middleComments.length===1?"":be,it(be,e.map(n,"middleComments")),be]),Lw(e)?s.push(zb(t.originalText.slice(r.position.start.offset,r.position.end.offset).trimEnd())):s.push(sa(Uw(e,t,n))),$t(r)&&!Gt(r,["document","documentHead"])&&s.push(Xb([r.type==="mappingValue"&&!r.content?"":" ",e.parent.type==="mappingKey"&&e.getParentNode(2).type==="mapping"&&Ql(r)?"":zl,n("trailingComment")])),q1(r)&&s.push(Ct(r.type==="sequenceItem"?2:0,[be,it(be,e.map(({node:l})=>[sw(t.originalText,ia(l))?be:"",n()],"endComments"))])),s.push(o),s}function Uw(e,t,n){let{node:r}=e;switch(r.type){case"root":{let s=[];e.each(({node:a,next:o,isFirst:l})=>{l||s.push(be),s.push(n()),H1(a,o)?(s.push(be,"..."),$t(a)&&s.push(" ",n("trailingComment"))):o&&!$t(o.head)&&s.push(be,"---")},"children");let i=Jl(r);return(!Gt(i,["blockLiteral","blockFolded"])||i.chomping!=="keep")&&s.push(be),s}case"document":{let s=[];return Ww(e,t)==="head"&&((r.head.children.length>0||r.head.endComments.length>0)&&s.push(n("head")),$t(r.head)?s.push(["---"," ",n(["head","trailingComment"])]):s.push("---")),qw(r)&&s.push(n("body")),it(be,s)}case"documentHead":return it(be,[...e.map(n,"children"),...e.map(n,"endComments")]);case"documentBody":{let{children:s,endComments:i}=r,a="";if(s.length>0&&i.length>0){let o=Jl(r);Gt(o,["blockFolded","blockLiteral"])?o.chomping!=="keep"&&(a=[be,be]):a=be}return[it(be,e.map(n,"children")),a,it(be,e.map(n,"endComments"))]}case"directive":return["%",it(" ",[r.name,...r.parameters])];case"comment":return["#",r.value];case"alias":return["*",r.value];case"tag":return t.originalText.slice(r.position.start.offset,r.position.end.offset);case"anchor":return["&",r.value];case"plain":return Ks(r.type,t.originalText.slice(r.position.start.offset,r.position.end.offset),t);case"quoteDouble":case"quoteSingle":{let s="'",i='"',a=t.originalText.slice(r.position.start.offset+1,r.position.end.offset-1);if(r.type==="quoteSingle"&&a.includes("\\")||r.type==="quoteDouble"&&/\\[^"]/u.test(a)){let l=r.type==="quoteDouble"?i:s;return[l,Ks(r.type,a,t),l]}if(a.includes(i))return[s,Ks(r.type,r.type==="quoteDouble"?Bl(!1,Bl(!1,a,String.raw`\"`,i),"'",s.repeat(2)):a,t),s];if(a.includes(s))return[i,Ks(r.type,r.type==="quoteSingle"?Bl(!1,a,"''",s):a,t),i];let o=t.singleQuote?s:i;return[o,Ks(r.type,a,t),o]}case"blockFolded":case"blockLiteral":return Tw(e,t,n);case"mapping":case"sequence":return it(be,e.map(n,"children"));case"sequenceItem":return["- ",Ct(2,r.content?n("content"):"")];case"mappingKey":case"mappingValue":return r.content?n("content"):"";case"mappingItem":case"flowMappingItem":return Iw(e,t,n);case"flowMapping":return W1(e,t,n);case"flowSequence":return W1(e,t,n);case"flowSequenceItem":return n("content");default:throw new aw(r,"YAML")}}function qw(e){return e.body.children.length>0||kt(e.body)}function H1(e,t){return $t(e)||t&&(t.head.children.length>0||kt(t.head))}function Ww(e,t){let n=e.node;if(e.isFirst&&/---(?:\s|$)/u.test(t.originalText.slice(ia(n),ia(n)+4))||n.head.children.length>0||kt(n.head)||$t(n.head))return"head";let r=e.next;return H1(n,r)?!1:r?"root":!1}function Ks(e,t,n){let r=Cw(e,t,n);return it(be,r.map(s=>T1(it(Ys,s))))}function Y1(e,t){if(Gt(e))switch(e.type){case"comment":if(Dw(e.value))return null;break;case"quoteDouble":case"quoteSingle":t.type="quote";break}}Y1.ignoredProperties=new Set(["position"]);var Hw={preprocess:Vw,embed:ow,print:jw,massageAstNode:Y1,insertPragma:Aw,getVisitorKeys:pw},Yw=Hw,z1=[{name:"YAML",type:"data",extensions:[".yml",".mir",".reek",".rviz",".sublime-syntax",".syntax",".yaml",".yaml-tmlanguage",".yaml.sed",".yml.mysql"],tmScope:"source.yaml",aceMode:"yaml",aliases:["yml"],codemirrorMode:"yaml",codemirrorMimeType:"text/x-yaml",filenames:[".clang-format",".clang-tidy",".clangd",".gemrc","CITATION.cff","glide.lock","pixi.lock",".prettierrc",".stylelintrc",".lintstagedrc"],parsers:["yaml"],vscodeLanguageIds:["yaml","ansible","dockercompose","github-actions-workflow","home-assistant"],linguistLanguageId:407}],Zl={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."}]}},zw={bracketSpacing:Zl.bracketSpacing,singleQuote:Zl.singleQuote,proseWrap:Zl.proseWrap},G1=zw,eu={};d1(eu,{yaml:()=>sD});var J1=Pl(b1()),Ft=Pl($b());Ft.default.findPair,Ft.default.toJSON,Ft.default.parseMap,Ft.default.parseSeq,Ft.default.stringifyNumber,Ft.default.stringifyString,Ft.default.Type,Ft.default.YAMLError,Ft.default.YAMLReferenceError;var Gw=Ft.default.YAMLSemanticError;Ft.default.YAMLSyntaxError,Ft.default.YAMLWarning;function yt(e,t=null){"children"in e&&e.children.forEach(n=>yt(n,e)),"anchor"in e&&e.anchor&&yt(e.anchor,e),"tag"in e&&e.tag&&yt(e.tag,e),"leadingComments"in e&&e.leadingComments.forEach(n=>yt(n,e)),"middleComments"in e&&e.middleComments.forEach(n=>yt(n,e)),"indicatorComment"in e&&e.indicatorComment&&yt(e.indicatorComment,e),"trailingComment"in e&&e.trailingComment&&yt(e.trailingComment,e),"endComments"in e&&e.endComments.forEach(n=>yt(n,e)),Object.defineProperty(e,"_parent",{value:t,enumerable:!1})}function oa(e){return`${e.line}:${e.column}`}function Jw(e){yt(e);let t=Qw(e),n=e.children.slice();e.comments.sort((r,s)=>r.position.start.offset-s.position.end.offset).filter(r=>!r._parent).forEach(r=>{for(;n.length>1&&r.position.start.line>n[0].position.end.line;)n.shift();Kw(r,t,n[0])})}function Qw(e){let t=Array.from(new Array(e.position.end.line),()=>({}));for(let n of e.comments)t[n.position.start.line-1].comment=n;return Q1(t,e),t}function Q1(e,t){if(t.position.start.offset!==t.position.end.offset){if("leadingComments"in t){let{start:n}=t.position,{leadingAttachableNode:r}=e[n.line-1];(!r||n.column<r.position.start.column)&&(e[n.line-1].leadingAttachableNode=t)}if("trailingComment"in t&&t.position.end.column>1&&t.type!=="document"&&t.type!=="documentHead"){let{end:n}=t.position,{trailingAttachableNode:r}=e[n.line-1];(!r||n.column>=r.position.end.column)&&(e[n.line-1].trailingAttachableNode=t)}if(t.type!=="root"&&t.type!=="document"&&t.type!=="documentHead"&&t.type!=="documentBody"){let{start:n,end:r}=t.position,s=[r.line].concat(n.line===r.line?[]:n.line);for(let i of s){let a=e[i-1].trailingNode;(!a||r.column>=a.position.end.column)&&(e[i-1].trailingNode=t)}}"children"in t&&t.children.forEach(n=>{Q1(e,n)})}}function Kw(e,t,n){let r=e.position.start.line,{trailingAttachableNode:s}=t[r-1];if(s){if(s.trailingComment)throw new Error(`Unexpected multiple trailing comment at ${oa(e.position.start)}`);yt(e,s),s.trailingComment=e;return}for(let a=r;a>=n.position.start.line;a--){let{trailingNode:o}=t[a-1],l;if(o)l=o;else if(a!==r&&t[a-1].comment)l=t[a-1].comment._parent;else continue;if((l.type==="sequence"||l.type==="mapping")&&(l=l.children[0]),l.type==="mappingItem"){let[u,c]=l.children;l=K1(u)?u:c}for(;;){if(Xw(l,e)){yt(e,l),l.endComments.push(e);return}if(!l._parent)break;l=l._parent}break}for(let a=r+1;a<=n.position.end.line;a++){let{leadingAttachableNode:o}=t[a-1];if(o){yt(e,o),o.leadingComments.push(e);return}}let i=n.children[1];yt(e,i),i.endComments.push(e)}function Xw(e,t){if(e.position.start.offset<t.position.start.offset&&e.position.end.offset>t.position.end.offset)switch(e.type){case"flowMapping":case"flowSequence":return e.children.length===0||t.position.start.line>e.children[e.children.length-1].position.end.line}if(t.position.end.offset<e.position.end.offset)return!1;switch(e.type){case"sequenceItem":return t.position.start.column>e.position.start.column;case"mappingKey":case"mappingValue":return t.position.start.column>e._parent.position.start.column&&(e.children.length===0||e.children.length===1&&e.children[0].type!=="blockFolded"&&e.children[0].type!=="blockLiteral")&&(e.type==="mappingValue"||K1(e));default:return!1}}function K1(e){return e.position.start!==e.position.end&&(e.children.length===0||e.position.start.offset!==e.children[0].position.start.offset)}function Be(e,t){return{type:e,position:t}}function Zw(e,t,n){return{...Be("root",e),children:t,comments:n}}function la(e){switch(e.type){case"DOCUMENT":for(let t=e.contents.length-1;t>=0;t--)e.contents[t].type==="BLANK_LINE"?e.contents.splice(t,1):la(e.contents[t]);for(let t=e.directives.length-1;t>=0;t--)e.directives[t].type==="BLANK_LINE"&&e.directives.splice(t,1);break;case"FLOW_MAP":case"FLOW_SEQ":case"MAP":case"SEQ":for(let t=e.items.length-1;t>=0;t--){let n=e.items[t];"char"in n||(n.type==="BLANK_LINE"?e.items.splice(t,1):la(n))}break;case"MAP_KEY":case"MAP_VALUE":case"SEQ_ITEM":e.node&&la(e.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(e.type)}`)}}function nr(e,t){return{start:e,end:t}}function X1(e){return{start:e,end:e}}var ns;(function(e){e.Tag="!",e.Anchor="&",e.Comment="#"})(ns||(ns={}));function ev(e,t){return{...Be("anchor",e),value:t}}function tu(e,t){return{...Be("comment",e),value:t}}function tv(e,t,n){return{anchor:t,tag:e,middleComments:n}}function nv(e,t){return{...Be("tag",e),value:t}}function Z1(e,t,n=()=>!1){let r=e.cstNode,s=[],i=null,a=null,o=null;for(let l of r.props){let u=t.text[l.origStart];switch(u){case ns.Tag:i=i||l,a=nv(t.transformRange(l),e.tag);break;case ns.Anchor:i=i||l,o=ev(t.transformRange(l),r.anchor);break;case ns.Comment:{let c=tu(t.transformRange(l),t.text.slice(l.origStart+1,l.origEnd));t.comments.push(c),!n(c)&&i&&i.origEnd<=l.origStart&&l.origEnd<=r.valueRange.origStart&&s.push(c);break}default:throw new Error(`Unexpected leading character ${JSON.stringify(u)}`)}}return tv(a,o,s)}function rs(){return{leadingComments:[]}}function ua(e=null){return{trailingComment:e}}function rr(){return{...rs(),...ua()}}function rv(e,t,n){return{...Be("alias",e),...rr(),...t,value:n}}function sv(e,t){let n=e.cstNode;return rv(t.transformRange({origStart:n.valueRange.origStart-1,origEnd:n.valueRange.origEnd}),t.transformContent(e),n.rawValue)}function iv(e){return{...e,type:"blockFolded"}}function av(e,t,n,r,s,i){return{...Be("blockValue",e),...rs(),...t,chomping:n,indent:r,value:s,indicatorComment:i}}var nu;(function(e){e.CLIP="clip",e.STRIP="strip",e.KEEP="keep"})(nu||(nu={}));function em(e,t){let n=e.cstNode,r=1,s=n.chomping==="CLIP"?0:1,i=n.header.origEnd-n.header.origStart-r-s!==0,a=t.transformRange({origStart:n.header.origStart,origEnd:n.valueRange.origEnd}),o=null,l=Z1(e,t,u=>{if(!(a.start.offset<u.position.start.offset&&u.position.end.offset<a.end.offset))return!1;if(o)throw new Error(`Unexpected multiple indicator comments at ${oa(u.position.start)}`);return o=u,!0});return av(a,l,nu[n.chomping],i?n.blockIndent:null,n.strValue,o)}function ov(e,t){return iv(em(e,t))}function lv(e){return{...e,type:"blockLiteral"}}function uv(e,t){return lv(em(e,t))}function cv(e,t){return tu(t.transformRange(e.range),e.comment)}function fv(e,t,n){return{...Be("directive",e),...rr(),name:t,parameters:n}}function ru(e,t){for(let n of e.props){let r=t.text[n.origStart];switch(r){case ns.Comment:t.comments.push(tu(t.transformRange(n),t.text.slice(n.origStart+1,n.origEnd)));break;default:throw new Error(`Unexpected leading character ${JSON.stringify(r)}`)}}}function hv(e,t){return ru(e,t),fv(t.transformRange(e.range),e.name,e.parameters)}function dv(e,t,n,r){return{...Be("document",e),...ua(r),children:[t,n]}}function sr(e=[]){return{endComments:e}}function mv(e,t,n){return{...Be("documentBody",e),...sr(n),children:t?[t]:[]}}function Mn(e){return e[e.length-1]}function tm(e,t){let n=e.match(t);return n?n.index:-1}function pv(e,t,n){let r=e.cstNode,{comments:s,endComments:i,documentTrailingComment:a,documentHeadTrailingComment:o}=gv(r,t,n),l=t.transformNode(e.contents),{position:u,documentEndPoint:c}=yv(r,l,t);return t.comments.push(...s,...i),{documentBody:mv(u,l,i),documentEndPoint:c,documentTrailingComment:a,documentHeadTrailingComment:o}}function gv(e,t,n){let r=[],s=[],i=[],a=[],o=!1;for(let l=e.contents.length-1;l>=0;l--){let u=e.contents[l];if(u.type==="COMMENT"){let c=t.transformNode(u);n&&n.line===c.position.start.line?a.unshift(c):o?r.unshift(c):c.position.start.offset>=e.valueRange.origEnd?i.unshift(c):r.unshift(c)}else o=!0}if(i.length>1)throw new Error(`Unexpected multiple document trailing comments at ${oa(i[1].position.start)}`);if(a.length>1)throw new Error(`Unexpected multiple documentHead trailing comments at ${oa(a[1].position.start)}`);return{comments:r,endComments:s,documentTrailingComment:Mn(i)||null,documentHeadTrailingComment:Mn(a)||null}}function yv(e,t,n){let r=tm(n.text.slice(e.valueRange.origEnd),/^\.\.\./),s=r===-1?e.valueRange.origEnd:Math.max(0,e.valueRange.origEnd-1);n.text[s-1]==="\r"&&s--;let i=n.transformRange({origStart:t!==null?t.position.start.offset:s,origEnd:s}),a=r===-1?i.end:n.transformOffset(e.valueRange.origEnd+3);return{position:i,documentEndPoint:a}}function bv(e,t,n,r){return{...Be("documentHead",e),...sr(n),...ua(r),children:t}}function wv(e,t){let n=e.cstNode,{directives:r,comments:s,endComments:i}=vv(n,t),{position:a,endMarkerPoint:o}=Dv(n,r,t);return t.comments.push(...s,...i),{createDocumentHeadWithTrailingComment:l=>(l&&t.comments.push(l),bv(a,r,i,l)),documentHeadEndMarkerPoint:o}}function vv(e,t){let n=[],r=[],s=[],i=!1;for(let a=e.directives.length-1;a>=0;a--){let o=t.transformNode(e.directives[a]);o.type==="comment"?i?r.unshift(o):s.unshift(o):(i=!0,n.unshift(o))}return{directives:n,comments:r,endComments:s}}function Dv(e,t,n){let r=tm(n.text.slice(0,e.valueRange.origStart),/---\s*$/);r>0&&!/[\r\n]/.test(n.text[r-1])&&(r=-1);let s=r===-1?{origStart:e.valueRange.origStart,origEnd:e.valueRange.origStart}:{origStart:r,origEnd:r+3};return t.length!==0&&(s.origStart=t[0].position.start.offset),{position:n.transformRange(s),endMarkerPoint:r===-1?null:n.transformOffset(r)}}function Sv(e,t){let{createDocumentHeadWithTrailingComment:n,documentHeadEndMarkerPoint:r}=wv(e,t),{documentBody:s,documentEndPoint:i,documentTrailingComment:a,documentHeadTrailingComment:o}=pv(e,t,r),l=n(o);return a&&t.comments.push(a),dv(nr(l.position.start,i),l,s,a)}function nm(e,t,n){return{...Be("flowCollection",e),...rr(),...sr(),...t,children:n}}function Ev(e,t,n){return{...nm(e,t,n),type:"flowMapping"}}function rm(e,t,n){return{...Be("flowMappingItem",e),...rs(),children:[t,n]}}function ca(e,t){let n=[];for(let r of e)r&&"type"in r&&r.type==="COMMENT"?t.comments.push(t.transformNode(r)):n.push(r);return n}function sm(e){let[t,n]=["?",":"].map(r=>{let s=e.find(i=>"char"in i&&i.char===r);return s?{origStart:s.origOffset,origEnd:s.origOffset+1}:null});return{additionalKeyRange:t,additionalValueRange:n}}function im(e,t){let n=t;return r=>e.slice(n,n=r)}function am(e){let t=[],n=im(e,1),r=!1;for(let s=1;s<e.length-1;s++){let i=e[s];if("char"in i&&i.char===","){t.push(n(s)),n(s+1),r=!1;continue}r=!0}return r&&t.push(n(e.length-1)),t}function om(e,t){return{...Be("mappingKey",e),...ua(),...sr(),children:t?[t]:[]}}function lm(e,t){return{...Be("mappingValue",e),...rr(),...sr(),children:t?[t]:[]}}function su(e,t,n,r,s){let i=t.transformNode(e.key),a=t.transformNode(e.value),o=i||r?om(t.transformRange({origStart:r?r.origStart:i.position.start.offset,origEnd:i?i.position.end.offset:r.origStart+1}),i):null,l=a||s?lm(t.transformRange({origStart:s?s.origStart:a.position.start.offset,origEnd:a?a.position.end.offset:s.origStart+1}),a):null;return n(nr(o?o.position.start:l.position.start,l?l.position.end:o.position.end),o||om(X1(l.position.start),null),l||lm(X1(o.position.end),null))}function Av(e,t){let n=ca(e.cstNode.items,t),r=am(n),s=e.items.map((o,l)=>{let u=r[l],{additionalKeyRange:c,additionalValueRange:f}=sm(u);return su(o,t,rm,c,f)}),i=n[0],a=Mn(n);return Ev(t.transformRange({origStart:i.origOffset,origEnd:a.origOffset+1}),t.transformContent(e),s)}function xv(e,t,n){return{...nm(e,t,n),type:"flowSequence"}}function Nv(e,t){return{...Be("flowSequenceItem",e),children:[t]}}function Lv(e,t){let n=ca(e.cstNode.items,t),r=am(n),s=e.items.map((o,l)=>{if(o.type!=="PAIR"){let u=t.transformNode(o);return Nv(nr(u.position.start,u.position.end),u)}else{let u=r[l],{additionalKeyRange:c,additionalValueRange:f}=sm(u);return su(o,t,rm,c,f)}}),i=n[0],a=Mn(n);return xv(t.transformRange({origStart:i.origOffset,origEnd:a.origOffset+1}),t.transformContent(e),s)}function kv(e,t,n){return{...Be("mapping",e),...rs(),...t,children:n}}function Cv(e,t,n){return{...Be("mappingItem",e),...rs(),children:[t,n]}}function Fv(e,t){let n=e.cstNode;n.items.filter(a=>a.type==="MAP_KEY"||a.type==="MAP_VALUE").forEach(a=>ru(a,t));let r=ca(n.items,t),s=_v(r),i=e.items.map((a,o)=>{let l=s[o],[u,c]=l[0].type==="MAP_VALUE"?[null,l[0].range]:[l[0].range,l.length===1?null:l[1].range];return su(a,t,Cv,u,c)});return kv(nr(i[0].position.start,Mn(i).position.end),t.transformContent(e),i)}function _v(e){let t=[],n=im(e,0),r=!1;for(let s=0;s<e.length;s++){if(e[s].type==="MAP_VALUE"){t.push(n(s+1)),r=!1;continue}r&&t.push(n(s)),r=!0}return r&&t.push(n(1/0)),t}function Tv(e,t,n){return{...Be("plain",e),...rr(),...t,value:n}}function Mv(e,t,n){for(let r=t;r>=0;r--)if(n.test(e[r]))return r;return-1}function Ov(e,t){let n=e.cstNode;return Tv(t.transformRange({origStart:n.valueRange.origStart,origEnd:Mv(t.text,n.valueRange.origEnd-1,/\S/)+1}),t.transformContent(e),n.strValue)}function Rv(e){return{...e,type:"quoteDouble"}}function Pv(e,t,n){return{...Be("quoteValue",e),...t,...rr(),value:n}}function um(e,t){let n=e.cstNode;return Pv(t.transformRange(n.valueRange),t.transformContent(e),n.strValue)}function Iv(e,t){return Rv(um(e,t))}function $v(e){return{...e,type:"quoteSingle"}}function Bv(e,t){return $v(um(e,t))}function Vv(e,t,n){return{...Be("sequence",e),...rs(),...sr(),...t,children:n}}function jv(e,t){return{...Be("sequenceItem",e),...rr(),...sr(),children:t?[t]:[]}}function Uv(e,t){let n=ca(e.cstNode.items,t).map((r,s)=>{ru(r,t);let i=t.transformNode(e.items[s]);return jv(nr(t.transformOffset(r.valueRange.origStart),i===null?t.transformOffset(r.valueRange.origStart+1):i.position.end),i)});return Vv(nr(n[0].position.start,Mn(n).position.end),t.transformContent(e),n)}function qv(e,t){if(e===null||e.type===void 0&&e.value===null)return null;switch(e.type){case"ALIAS":return sv(e,t);case"BLOCK_FOLDED":return ov(e,t);case"BLOCK_LITERAL":return uv(e,t);case"COMMENT":return cv(e,t);case"DIRECTIVE":return hv(e,t);case"DOCUMENT":return Sv(e,t);case"FLOW_MAP":return Av(e,t);case"FLOW_SEQ":return Lv(e,t);case"MAP":return Fv(e,t);case"PLAIN":return Ov(e,t);case"QUOTE_DOUBLE":return Iv(e,t);case"QUOTE_SINGLE":return Bv(e,t);case"SEQ":return Uv(e,t);default:throw new Error(`Unexpected node type ${e.type}`)}}var iu,ss,Xs,is,au,ou,Wv=class{constructor(t,n){$l(this,is),m1(this,"text"),m1(this,"comments",[]),$l(this,ss),$l(this,Xs),this.text=n,p1(this,ss,t)}setOrigRanges(){if(!Ws(this,ss).setOrigRanges())for(let t of Ws(this,ss))t.setOrigRanges([],0)}transformOffset(t){return na(this,is,au).call(this,{origStart:t,origEnd:t}).start}transformRange(t){let{start:n,end:r}=na(this,is,au).call(this,t);return nr(n,r)}transformNode(t){return qv(t,this)}transformContent(t){return Z1(t,this)}};ss=new WeakMap,Xs=new WeakMap,is=new WeakSet,au=function(e){if(!iu){let[i]=Ws(this,ss),a=Object.getPrototypeOf(Object.getPrototypeOf(i));iu=Object.getOwnPropertyDescriptor(a,"rangeAsLinePos").get}Ws(this,Xs)??p1(this,Xs,{root:{context:{src:this.text}}});let{start:{line:t,col:n},end:{line:r,col:s}}=iu.call({range:{start:na(this,is,ou).call(this,e.origStart),end:na(this,is,ou).call(this,e.origEnd)},context:Ws(this,Xs)});return{start:{offset:e.origStart,line:t,column:n},end:{offset:e.origEnd,line:r,column:s}}},ou=function(e){return e<0?0:e>this.text.length?this.text.length:e};var Hv=Wv;function Yv(e,t,n){let r=new SyntaxError(e);return r.name="YAMLSyntaxError",r.source=t,r.position=n,r}function zv(e,t){let n=e.source.range||e.source.valueRange;return Yv(e.message,t.text,t.transformRange(n))}function cm(e){if("children"in e){if(e.children.length===1){let t=e.children[0];if(t.type==="plain"&&t.tag===null&&t.anchor===null&&t.value==="")return e.children.splice(0,1),e}e.children.forEach(cm)}return e}function fm(e,t,n,r){let s=t(e);return i=>{r(s,i)&&n(e,s=i)}}function hm(e){if(e===null||!("children"in e))return;let t=e.children;if(t.forEach(hm),e.type==="document"){let[i,a]=e.children;i.position.start.offset===i.position.end.offset?i.position.start=i.position.end=a.position.start:a.position.start.offset===a.position.end.offset&&(a.position.start=a.position.end=i.position.end)}let n=fm(e.position,Gv,Jv,Xv),r=fm(e.position,Qv,Kv,Zv);"endComments"in e&&e.endComments.length!==0&&(n(e.endComments[0].position.start),r(Mn(e.endComments).position.end));let s=t.filter(i=>i!==null);if(s.length!==0){let i=s[0],a=Mn(s);n(i.position.start),r(a.position.end),"leadingComments"in i&&i.leadingComments.length!==0&&n(i.leadingComments[0].position.start),"tag"in i&&i.tag&&n(i.tag.position.start),"anchor"in i&&i.anchor&&n(i.anchor.position.start),"trailingComment"in a&&a.trailingComment&&r(a.trailingComment.position.end)}}function Gv(e){return e.start}function Jv(e,t){e.start=t}function Qv(e){return e.end}function Kv(e,t){e.end=t}function Xv(e,t){return t.offset<e.offset}function Zv(e,t){return t.offset>e.offset}function eD(e){let t=J1.default.parseCST(e),n=new Hv(t,e);n.setOrigRanges();let r=t.map(i=>new J1.default.Document({merge:!1,keepCstNodes:!0}).parse(i));for(let i of r)for(let a of i.errors)if(!(a instanceof Gw&&a.message==='Map keys must be unique; "<<" is repeated'))throw zv(a,n);r.forEach(i=>la(i.cstNode));let s=Zw(n.transformRange({origStart:0,origEnd:e.length}),r.map(i=>n.transformNode(i)),n.comments);return Jw(s),hm(s),cm(s),s}function tD(e,t){let n=new SyntaxError(e+" ("+t.loc.start.line+":"+t.loc.start.column+")");return Object.assign(n,t)}var nD=tD;function rD(e){try{let t=eD(e);return delete t.comments,t}catch(t){throw t!=null&&t.position?nD(t.message,{loc:t.position,cause:t}):t}}var sD={astFormat:"yaml",parse:rD,hasPragma:Sw,hasIgnorePragma:Ew,locStart:ia,locEnd:gw},dm={yaml:Yw},iD=Pl(b1()),mm=iD.default.parse,aD=w1,oD=Object.freeze({__proto__:null,__parsePrettierYamlConfig:mm,default:aD,languages:z1,options:G1,parsers:eu,printers:dm}),lD=Object.create,lu=Object.defineProperty,uD=Object.getOwnPropertyDescriptor,cD=Object.getOwnPropertyNames,fD=Object.getPrototypeOf,hD=Object.prototype.hasOwnProperty,pm=e=>{throw TypeError(e)},dD=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),uu=(e,t)=>{for(var n in t)lu(e,n,{get:t[n],enumerable:!0})},mD=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of cD(t))!hD.call(e,s)&&s!==n&&lu(e,s,{get:()=>t[s],enumerable:!(r=uD(t,s))||r.enumerable});return e},pD=(e,t,n)=>(n=e!=null?lD(fD(e)):{},mD(lu(n,"default",{value:e,enumerable:!0}),e)),gD=(e,t,n)=>t.has(e)||pm("Cannot "+n),yD=(e,t,n)=>t.has(e)?pm("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Zs=(e,t,n)=>(gD(e,t,"access private method"),n),bD=dD(e=>{Object.defineProperty(e,"__esModule",{value:!0});function t(){return new Proxy({},{get:()=>i=>i})}var n=/\r\n|[\n\r\u2028\u2029]/;function r(i,a,o){let l=Object.assign({column:0,line:-1},i.start),u=Object.assign({},l,i.end),{linesAbove:c=2,linesBelow:f=3}=o||{},d=l.line,y=l.column,D=u.line,S=u.column,N=Math.max(d-(c+1),0),x=Math.min(a.length,D+f);d===-1&&(N=0),D===-1&&(x=a.length);let k=D-d,b={};if(k)for(let w=0;w<=k;w++){let h=w+d;if(!y)b[h]=!0;else if(w===0){let g=a[h-1].length;b[h]=[y,g-y+1]}else if(w===k)b[h]=[0,S];else{let g=a[h-w].length;b[h]=[0,g]}}else y===S?y?b[d]=[y,0]:b[d]=!0:b[d]=[y,S-y];return{start:N,end:x,markerLines:b}}function s(i,a,o={}){let l=t(),u=i.split(n),{start:c,end:f,markerLines:d}=r(a,u,o),y=a.start&&typeof a.start.column=="number",D=String(f).length,S=i.split(n,f).slice(c,f).map((N,x)=>{let k=c+1+x,b=` ${` ${k}`.slice(-D)} |`,w=d[k],h=!d[k+1];if(w){let g="";if(Array.isArray(w)){let m=N.slice(0,Math.max(w[0]-1,0)).replace(/[^\t]/g," "),E=w[1]||1;g=[`
|
|
324
|
+
`,l.gutter(b.replace(/\d/g," "))," ",m,l.marker("^").repeat(E)].join(""),h&&o.message&&(g+=" "+l.message(o.message))}return[l.marker(">"),l.gutter(b),N.length>0?` ${N}`:"",g].join("")}else return` ${l.gutter(b)}${N.length>0?` ${N}`:""}`}).join(`
|
|
325
|
+
`);return o.message&&!y&&(S=`${" ".repeat(D+1)}${o.message}
|
|
326
|
+
${S}`),S}e.codeFrameColumns=s}),wD={};uu(wD,{__debug:()=>T8,check:()=>F8,doc:()=>Lp,format:()=>$u,formatWithCursor:()=>Fp,getSupportInfo:()=>_8,util:()=>kp,version:()=>s8});var vD=(e,t,n,r)=>{if(!(e&&t==null))return t.replaceAll?t.replaceAll(n,r):n.global?t.replace(n,r):t.split(n).join(r)},fa=vD,DD=class{diff(e,t,n={}){let r;typeof n=="function"?(r=n,n={}):"callback"in n&&(r=n.callback);let s=this.castInput(e,n),i=this.castInput(t,n),a=this.removeEmpty(this.tokenize(s,n)),o=this.removeEmpty(this.tokenize(i,n));return this.diffWithOptionsObj(a,o,n,r)}diffWithOptionsObj(e,t,n,r){var s;let i=x=>{if(x=this.postProcess(x,n),r){setTimeout(function(){r(x)},0);return}else return x},a=t.length,o=e.length,l=1,u=a+o;n.maxEditLength!=null&&(u=Math.min(u,n.maxEditLength));let c=(s=n.timeout)!==null&&s!==void 0?s:1/0,f=Date.now()+c,d=[{oldPos:-1,lastComponent:void 0}],y=this.extractCommon(d[0],t,e,0,n);if(d[0].oldPos+1>=o&&y+1>=a)return i(this.buildValues(d[0].lastComponent,t,e));let D=-1/0,S=1/0,N=()=>{for(let x=Math.max(D,-l);x<=Math.min(S,l);x+=2){let k,b=d[x-1],w=d[x+1];b&&(d[x-1]=void 0);let h=!1;if(w){let m=w.oldPos-x;h=w&&0<=m&&m<a}let g=b&&b.oldPos+1<o;if(!h&&!g){d[x]=void 0;continue}if(!g||h&&b.oldPos<w.oldPos?k=this.addToPath(w,!0,!1,0,n):k=this.addToPath(b,!1,!0,1,n),y=this.extractCommon(k,t,e,x,n),k.oldPos+1>=o&&y+1>=a)return i(this.buildValues(k.lastComponent,t,e))||!0;d[x]=k,k.oldPos+1>=o&&(S=Math.min(S,x-1)),y+1>=a&&(D=Math.max(D,x+1))}l++};if(r)(function x(){setTimeout(function(){if(l>u||Date.now()>f)return r(void 0);N()||x()},0)})();else for(;l<=u&&Date.now()<=f;){let x=N();if(x)return x}}addToPath(e,t,n,r,s){let i=e.lastComponent;return i&&!s.oneChangePerToken&&i.added===t&&i.removed===n?{oldPos:e.oldPos+r,lastComponent:{count:i.count+1,added:t,removed:n,previousComponent:i.previousComponent}}:{oldPos:e.oldPos+r,lastComponent:{count:1,added:t,removed:n,previousComponent:i}}}extractCommon(e,t,n,r,s){let i=t.length,a=n.length,o=e.oldPos,l=o-r,u=0;for(;l+1<i&&o+1<a&&this.equals(n[o+1],t[l+1],s);)l++,o++,u++,s.oneChangePerToken&&(e.lastComponent={count:1,previousComponent:e.lastComponent,added:!1,removed:!1});return u&&!s.oneChangePerToken&&(e.lastComponent={count:u,previousComponent:e.lastComponent,added:!1,removed:!1}),e.oldPos=o,l}equals(e,t,n){return n.comparator?n.comparator(e,t):e===t||!!n.ignoreCase&&e.toLowerCase()===t.toLowerCase()}removeEmpty(e){let t=[];for(let n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t}castInput(e,t){return e}tokenize(e,t){return Array.from(e)}join(e){return e.join("")}postProcess(e,t){return e}get useLongestToken(){return!1}buildValues(e,t,n){let r=[],s;for(;e;)r.push(e),s=e.previousComponent,delete e.previousComponent,e=s;r.reverse();let i=r.length,a=0,o=0,l=0;for(;a<i;a++){let u=r[a];if(u.removed)u.value=this.join(n.slice(l,l+u.count)),l+=u.count;else{if(!u.added&&this.useLongestToken){let c=t.slice(o,o+u.count);c=c.map(function(f,d){let y=n[l+d];return y.length>f.length?y:f}),u.value=this.join(c)}else u.value=this.join(t.slice(o,o+u.count));o+=u.count,u.added||(l+=u.count)}}return r}},SD=class extends DD{tokenize(e){return e.slice()}join(e){return e}removeEmpty(e){return e}},ED=new SD;function AD(e,t,n){return ED.diff(e,t,n)}function xD(e){let t=e.indexOf("\r");return t!==-1?e.charAt(t+1)===`
|
|
327
|
+
`?"crlf":"cr":"lf"}function cu(e){switch(e){case"cr":return"\r";case"crlf":return`\r
|
|
328
|
+
`;default:return`
|
|
329
|
+
`}}function gm(e,t){let n;switch(t){case`
|
|
330
|
+
`:n=/\n/gu;break;case"\r":n=/\r/gu;break;case`\r
|
|
331
|
+
`:n=/\r\n/gu;break;default:throw new Error(`Unexpected "eol" ${JSON.stringify(t)}.`)}let r=e.match(n);return r?r.length:0}function ND(e){return fa(!1,e,/\r\n?/gu,`
|
|
332
|
+
`)}var ir="string",mn="array",On="cursor",pn="indent",gn="align",yn="trim",at="group",Jt="fill",bt="if-break",bn="indent-if-break",wn="line-suffix",vn="line-suffix-boundary",Qe="line",Qt="label",_t="break-parent",ym=new Set([On,pn,gn,yn,at,Jt,bt,bn,wn,vn,Qe,Qt,_t]),LD=(e,t,n)=>{if(!(e&&t==null))return Array.isArray(t)||typeof t=="string"?t[n<0?t.length+n:n]:t.at(n)},He=LD;function kD(e){let t=e.length;for(;t>0&&(e[t-1]==="\r"||e[t-1]===`
|
|
333
|
+
`);)t--;return t<e.length?e.slice(0,t):e}function CD(e){if(typeof e=="string")return ir;if(Array.isArray(e))return mn;if(!e)return;let{type:t}=e;if(ym.has(t))return t}var ar=CD,FD=e=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(e);function _D(e){let t=e===null?"null":typeof e;if(t!=="string"&&t!=="object")return`Unexpected doc '${t}',
|
|
334
|
+
Expected it to be 'string' or 'object'.`;if(ar(e))throw new Error("doc is valid.");let n=Object.prototype.toString.call(e);if(n!=="[object Object]")return`Unexpected doc '${n}'.`;let r=FD([...ym].map(s=>`'${s}'`));return`Unexpected doc.type '${e.type}'.
|
|
335
|
+
Expected it to be ${r}.`}var TD=class extends Error{constructor(t){super(_D(t));vt(this,"name","InvalidDocError");this.doc=t}},as=TD,bm={};function MD(e,t,n,r){let s=[e];for(;s.length>0;){let i=s.pop();if(i===bm){n(s.pop());continue}n&&s.push(i,bm);let a=ar(i);if(!a)throw new as(i);if((t==null?void 0:t(i))!==!1)switch(a){case mn:case Jt:{let o=a===mn?i:i.parts;for(let l=o.length,u=l-1;u>=0;--u)s.push(o[u]);break}case bt:s.push(i.flatContents,i.breakContents);break;case at:if(r&&i.expandedStates)for(let o=i.expandedStates.length,l=o-1;l>=0;--l)s.push(i.expandedStates[l]);else s.push(i.contents);break;case gn:case pn:case bn:case Qt:case wn:s.push(i.contents);break;case ir:case On:case yn:case vn:case Qe:case _t:break;default:throw new as(i)}}}var fu=MD;function ha(e,t){if(typeof e=="string")return t(e);let n=new Map;return r(e);function r(i){if(n.has(i))return n.get(i);let a=s(i);return n.set(i,a),a}function s(i){switch(ar(i)){case mn:return t(i.map(r));case Jt:return t({...i,parts:i.parts.map(r)});case bt:return t({...i,breakContents:r(i.breakContents),flatContents:r(i.flatContents)});case at:{let{expandedStates:a,contents:o}=i;return a?(a=a.map(r),o=a[0]):o=r(o),t({...i,contents:o,expandedStates:a})}case gn:case pn:case bn:case Qt:case wn:return t({...i,contents:r(i.contents)});case ir:case On:case yn:case vn:case Qe:case _t:return t(i);default:throw new as(i)}}}function hu(e,t,n){let r=n,s=!1;function i(a){if(s)return!1;let o=t(a);o!==void 0&&(s=!0,r=o)}return fu(e,i),r}function OD(e){if(e.type===at&&e.break||e.type===Qe&&e.hard||e.type===_t)return!0}function RD(e){return hu(e,OD,!1)}function wm(e){if(e.length>0){let t=He(!1,e,-1);!t.expandedStates&&!t.break&&(t.break="propagated")}return null}function PD(e){let t=new Set,n=[];function r(i){if(i.type===_t&&wm(n),i.type===at){if(n.push(i),t.has(i))return!1;t.add(i)}}function s(i){i.type===at&&n.pop().break&&wm(n)}fu(e,r,s,!0)}function ID(e){return e.type===Qe&&!e.hard?e.soft?"":" ":e.type===bt?e.flatContents:e}function $D(e){return ha(e,ID)}function vm(e){for(e=[...e];e.length>=2&&He(!1,e,-2).type===Qe&&He(!1,e,-1).type===_t;)e.length-=2;if(e.length>0){let t=ei(He(!1,e,-1));e[e.length-1]=t}return e}function ei(e){switch(ar(e)){case pn:case bn:case at:case wn:case Qt:{let t=ei(e.contents);return{...e,contents:t}}case bt:return{...e,breakContents:ei(e.breakContents),flatContents:ei(e.flatContents)};case Jt:return{...e,parts:vm(e.parts)};case mn:return vm(e);case ir:return kD(e);case gn:case On:case yn:case vn:case Qe:case _t:break;default:throw new as(e)}return e}function Dm(e){return ei(VD(e))}function BD(e){switch(ar(e)){case Jt:if(e.parts.every(t=>t===""))return"";break;case at:if(!e.contents&&!e.id&&!e.break&&!e.expandedStates)return"";if(e.contents.type===at&&e.contents.id===e.id&&e.contents.break===e.break&&e.contents.expandedStates===e.expandedStates)return e.contents;break;case gn:case pn:case bn:case wn:if(!e.contents)return"";break;case bt:if(!e.flatContents&&!e.breakContents)return"";break;case mn:{let t=[];for(let n of e){if(!n)continue;let[r,...s]=Array.isArray(n)?n:[n];typeof r=="string"&&typeof He(!1,t,-1)=="string"?t[t.length-1]+=r:t.push(r),t.push(...s)}return t.length===0?"":t.length===1?t[0]:t}case ir:case On:case yn:case vn:case Qe:case Qt:case _t:break;default:throw new as(e)}return e}function VD(e){return ha(e,t=>BD(t))}function jD(e,t=xm){return ha(e,n=>typeof n=="string"?Nm(t,n.split(`
|
|
336
|
+
`)):n)}function UD(e){if(e.type===Qe)return!0}function qD(e){return hu(e,UD,!1)}function da(e,t){return e.type===Qt?{...e,contents:t(e.contents)}:t(e)}var WD=()=>{},HD=WD;function ma(e){return{type:pn,contents:e}}function os(e,t){return{type:gn,contents:t,n:e}}function Sm(e,t={}){return HD(t.expandedStates),{type:at,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function YD(e){return os(Number.NEGATIVE_INFINITY,e)}function zD(e){return os({type:"root"},e)}function GD(e){return os(-1,e)}function JD(e,t){return Sm(e[0],{...t,expandedStates:e})}function QD(e){return{type:Jt,parts:e}}function KD(e,t="",n={}){return{type:bt,breakContents:e,flatContents:t,groupId:n.groupId}}function XD(e,t){return{type:bn,contents:e,groupId:t.groupId,negate:t.negate}}function du(e){return{type:wn,contents:e}}var ZD={type:vn},pa={type:_t},e9={type:yn},mu={type:Qe,hard:!0},Em={type:Qe,hard:!0,literal:!0},Am={type:Qe},t9={type:Qe,soft:!0},or=[mu,pa],xm=[Em,pa],lr={type:On};function Nm(e,t){let n=[];for(let r=0;r<t.length;r++)r!==0&&n.push(e),n.push(t[r]);return n}function Lm(e,t,n){let r=e;if(t>0){for(let s=0;s<Math.floor(t/n);++s)r=ma(r);r=os(t%n,r),r=os(Number.NEGATIVE_INFINITY,r)}return r}function n9(e,t){return e?{type:Qt,label:e,contents:t}:t}function Dn(e){var t;if(!e)return"";if(Array.isArray(e)){let n=[];for(let r of e)if(Array.isArray(r))n.push(...Dn(r));else{let s=Dn(r);s!==""&&n.push(s)}return n}return e.type===bt?{...e,breakContents:Dn(e.breakContents),flatContents:Dn(e.flatContents)}:e.type===at?{...e,contents:Dn(e.contents),expandedStates:(t=e.expandedStates)==null?void 0:t.map(Dn)}:e.type===Jt?{type:"fill",parts:e.parts.map(Dn)}:e.contents?{...e,contents:Dn(e.contents)}:e}function r9(e){let t=Object.create(null),n=new Set;return r(Dn(e));function r(i,a,o){var l,u;if(typeof i=="string")return JSON.stringify(i);if(Array.isArray(i)){let c=i.map(r).filter(Boolean);return c.length===1?c[0]:`[${c.join(", ")}]`}if(i.type===Qe){let c=((l=o==null?void 0:o[a+1])==null?void 0:l.type)===_t;return i.literal?c?"literalline":"literallineWithoutBreakParent":i.hard?c?"hardline":"hardlineWithoutBreakParent":i.soft?"softline":"line"}if(i.type===_t)return((u=o==null?void 0:o[a-1])==null?void 0:u.type)===Qe&&o[a-1].hard?void 0:"breakParent";if(i.type===yn)return"trim";if(i.type===pn)return"indent("+r(i.contents)+")";if(i.type===gn)return i.n===Number.NEGATIVE_INFINITY?"dedentToRoot("+r(i.contents)+")":i.n<0?"dedent("+r(i.contents)+")":i.n.type==="root"?"markAsRoot("+r(i.contents)+")":"align("+JSON.stringify(i.n)+", "+r(i.contents)+")";if(i.type===bt)return"ifBreak("+r(i.breakContents)+(i.flatContents?", "+r(i.flatContents):"")+(i.groupId?(i.flatContents?"":', ""')+`, { groupId: ${s(i.groupId)} }`:"")+")";if(i.type===bn){let c=[];i.negate&&c.push("negate: true"),i.groupId&&c.push(`groupId: ${s(i.groupId)}`);let f=c.length>0?`, { ${c.join(", ")} }`:"";return`indentIfBreak(${r(i.contents)}${f})`}if(i.type===at){let c=[];i.break&&i.break!=="propagated"&&c.push("shouldBreak: true"),i.id&&c.push(`id: ${s(i.id)}`);let f=c.length>0?`, { ${c.join(", ")} }`:"";return i.expandedStates?`conditionalGroup([${i.expandedStates.map(d=>r(d)).join(",")}]${f})`:`group(${r(i.contents)}${f})`}if(i.type===Jt)return`fill([${i.parts.map(c=>r(c)).join(", ")}])`;if(i.type===wn)return"lineSuffix("+r(i.contents)+")";if(i.type===vn)return"lineSuffixBoundary";if(i.type===Qt)return`label(${JSON.stringify(i.label)}, ${r(i.contents)})`;if(i.type===On)return"cursor";throw new Error("Unknown doc type "+i.type)}function s(i){if(typeof i!="symbol")return JSON.stringify(String(i));if(i in t)return t[i];let a=i.description||"symbol";for(let o=0;;o++){let l=a+(o>0?` #${o}`:"");if(!n.has(l))return n.add(l),t[i]=`Symbol.for(${JSON.stringify(l)})`}}}var s9=()=>/[#*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](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\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(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\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](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\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-\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](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\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(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\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-\uDE89\uDE8F-\uDEC2\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9]|\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 i9(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}function a9(e){return e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9776&&e<=9783||e>=9800&&e<=9811||e===9855||e>=9866&&e<=9871||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12773||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e===94192||e===94193||e>=94208&&e<=100343||e>=100352&&e<=101589||e>=101631&&e<=101640||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e>=119552&&e<=119638||e>=119648&&e<=119670||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128727||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129673||e>=129679&&e<=129734||e>=129742&&e<=129756||e>=129759&&e<=129769||e>=129776&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141}var o9=e=>!(i9(e)||a9(e)),l9=/[^\x20-\x7F]/u;function u9(e){if(!e)return 0;if(!l9.test(e))return e.length;e=e.replace(s9()," ");let t=0;for(let n of e){let r=n.codePointAt(0);r<=31||r>=127&&r<=159||r>=768&&r<=879||(t+=o9(r)?1:2)}return t}var pu=u9,ot=Symbol("MODE_BREAK"),Kt=Symbol("MODE_FLAT"),ls=Symbol("cursor"),gu=Symbol("DOC_FILL_PRINTED_LENGTH");function km(){return{value:"",length:0,queue:[]}}function c9(e,t){return yu(e,{type:"indent"},t)}function f9(e,t,n){return t===Number.NEGATIVE_INFINITY?e.root||km():t<0?yu(e,{type:"dedent"},n):t?t.type==="root"?{...e,root:e}:yu(e,{type:typeof t=="string"?"stringAlign":"numberAlign",n:t},n):e}function yu(e,t,n){let r=t.type==="dedent"?e.queue.slice(0,-1):[...e.queue,t],s="",i=0,a=0,o=0;for(let D of r)switch(D.type){case"indent":c(),n.useTabs?l(1):u(n.tabWidth);break;case"stringAlign":c(),s+=D.n,i+=D.n.length;break;case"numberAlign":a+=1,o+=D.n;break;default:throw new Error(`Unexpected type '${D.type}'`)}return d(),{...e,value:s,length:i,queue:r};function l(D){s+=" ".repeat(D),i+=n.tabWidth*D}function u(D){s+=" ".repeat(D),i+=D}function c(){n.useTabs?f():d()}function f(){a>0&&l(a),y()}function d(){o>0&&u(o),y()}function y(){a=0,o=0}}function bu(e){let t=0,n=0,r=e.length;e:for(;r--;){let s=e[r];if(s===ls){n++;continue}for(let i=s.length-1;i>=0;i--){let a=s[i];if(a===" "||a===" ")t++;else{e[r]=s.slice(0,i+1);break e}}}if(t>0||n>0)for(e.length=r+1;n-- >0;)e.push(ls);return t}function ga(e,t,n,r,s,i){if(n===Number.POSITIVE_INFINITY)return!0;let a=t.length,o=[e],l=[];for(;n>=0;){if(o.length===0){if(a===0)return!0;o.push(t[--a]);continue}let{mode:u,doc:c}=o.pop(),f=ar(c);switch(f){case ir:l.push(c),n-=pu(c);break;case mn:case Jt:{let d=f===mn?c:c.parts,y=c[gu]??0;for(let D=d.length-1;D>=y;D--)o.push({mode:u,doc:d[D]});break}case pn:case gn:case bn:case Qt:o.push({mode:u,doc:c.contents});break;case yn:n+=bu(l);break;case at:{if(i&&c.break)return!1;let d=c.break?ot:u,y=c.expandedStates&&d===ot?He(!1,c.expandedStates,-1):c.contents;o.push({mode:d,doc:y});break}case bt:{let d=(c.groupId?s[c.groupId]||Kt:u)===ot?c.breakContents:c.flatContents;d&&o.push({mode:u,doc:d});break}case Qe:if(u===ot||c.hard)return!0;c.soft||(l.push(" "),n--);break;case wn:r=!0;break;case vn:if(r)return!1;break}}return!1}function ya(e,t){let n={},r=t.printWidth,s=cu(t.endOfLine),i=0,a=[{ind:km(),mode:ot,doc:e}],o=[],l=!1,u=[],c=0;for(PD(e);a.length>0;){let{ind:d,mode:y,doc:D}=a.pop();switch(ar(D)){case ir:{let S=s!==`
|
|
337
|
+
`?fa(!1,D,`
|
|
338
|
+
`,s):D;o.push(S),a.length>0&&(i+=pu(S));break}case mn:for(let S=D.length-1;S>=0;S--)a.push({ind:d,mode:y,doc:D[S]});break;case On:if(c>=2)throw new Error("There are too many 'cursor' in doc.");o.push(ls),c++;break;case pn:a.push({ind:c9(d,t),mode:y,doc:D.contents});break;case gn:a.push({ind:f9(d,D.n,t),mode:y,doc:D.contents});break;case yn:i-=bu(o);break;case at:switch(y){case Kt:if(!l){a.push({ind:d,mode:D.break?ot:Kt,doc:D.contents});break}case ot:{l=!1;let S={ind:d,mode:Kt,doc:D.contents},N=r-i,x=u.length>0;if(!D.break&&ga(S,a,N,x,n))a.push(S);else if(D.expandedStates){let k=He(!1,D.expandedStates,-1);if(D.break){a.push({ind:d,mode:ot,doc:k});break}else for(let b=1;b<D.expandedStates.length+1;b++)if(b>=D.expandedStates.length){a.push({ind:d,mode:ot,doc:k});break}else{let w=D.expandedStates[b],h={ind:d,mode:Kt,doc:w};if(ga(h,a,N,x,n)){a.push(h);break}}}else a.push({ind:d,mode:ot,doc:D.contents});break}}D.id&&(n[D.id]=He(!1,a,-1).mode);break;case Jt:{let S=r-i,N=D[gu]??0,{parts:x}=D,k=x.length-N;if(k===0)break;let b=x[N+0],w=x[N+1],h={ind:d,mode:Kt,doc:b},g={ind:d,mode:ot,doc:b},m=ga(h,[],S,u.length>0,n,!0);if(k===1){m?a.push(h):a.push(g);break}let E={ind:d,mode:Kt,doc:w},v={ind:d,mode:ot,doc:w};if(k===2){m?a.push(E,h):a.push(v,g);break}let L=x[N+2],C={ind:d,mode:y,doc:{...D,[gu]:N+2}};ga({ind:d,mode:Kt,doc:[b,w,L]},[],S,u.length>0,n,!0)?a.push(C,E,h):m?a.push(C,v,h):a.push(C,v,g);break}case bt:case bn:{let S=D.groupId?n[D.groupId]:y;if(S===ot){let N=D.type===bt?D.breakContents:D.negate?D.contents:ma(D.contents);N&&a.push({ind:d,mode:y,doc:N})}if(S===Kt){let N=D.type===bt?D.flatContents:D.negate?ma(D.contents):D.contents;N&&a.push({ind:d,mode:y,doc:N})}break}case wn:u.push({ind:d,mode:y,doc:D.contents});break;case vn:u.length>0&&a.push({ind:d,mode:y,doc:mu});break;case Qe:switch(y){case Kt:if(D.hard)l=!0;else{D.soft||(o.push(" "),i+=1);break}case ot:if(u.length>0){a.push({ind:d,mode:y,doc:D},...u.reverse()),u.length=0;break}D.literal?d.root?(o.push(s,d.root.value),i=d.root.length):(o.push(s),i=0):(i-=bu(o),o.push(s+d.value),i=d.length);break}break;case Qt:a.push({ind:d,mode:y,doc:D.contents});break;case _t:break;default:throw new as(D)}a.length===0&&u.length>0&&(a.push(...u.reverse()),u.length=0)}let f=o.indexOf(ls);if(f!==-1){let d=o.indexOf(ls,f+1);if(d===-1)return{formatted:o.filter(N=>N!==ls).join("")};let y=o.slice(0,f).join(""),D=o.slice(f+1,d).join(""),S=o.slice(d+1).join("");return{formatted:y+D+S,cursorNodeStart:y.length,cursorNodeText:D}}return{formatted:o.join("")}}function h9(e,t,n=0){let r=0;for(let s=n;s<e.length;++s)e[s]===" "?r=r+t-r%t:r++;return r}var wu=h9,ur,vu,ba,d9=class{constructor(e){yD(this,ur),this.stack=[e]}get key(){let{stack:e,siblings:t}=this;return He(!1,e,t===null?-2:-4)??null}get index(){return this.siblings===null?null:He(!1,this.stack,-2)}get node(){return He(!1,this.stack,-1)}get parent(){return this.getNode(1)}get grandparent(){return this.getNode(2)}get isInArray(){return this.siblings!==null}get siblings(){let{stack:e}=this,t=He(!1,e,-3);return Array.isArray(t)?t:null}get next(){let{siblings:e}=this;return e===null?null:e[this.index+1]}get previous(){let{siblings:e}=this;return e===null?null:e[this.index-1]}get isFirst(){return this.index===0}get isLast(){let{siblings:e,index:t}=this;return e!==null&&t===e.length-1}get isRoot(){return this.stack.length===1}get root(){return this.stack[0]}get ancestors(){return[...Zs(this,ur,ba).call(this)]}getName(){let{stack:e}=this,{length:t}=e;return t>1?He(!1,e,-2):null}getValue(){return He(!1,this.stack,-1)}getNode(e=0){let t=Zs(this,ur,vu).call(this,e);return t===-1?null:this.stack[t]}getParentNode(e=0){return this.getNode(e+1)}call(e,...t){let{stack:n}=this,{length:r}=n,s=He(!1,n,-1);for(let i of t)s=s[i],n.push(i,s);try{return e(this)}finally{n.length=r}}callParent(e,t=0){let n=Zs(this,ur,vu).call(this,t+1),r=this.stack.splice(n+1);try{return e(this)}finally{this.stack.push(...r)}}each(e,...t){let{stack:n}=this,{length:r}=n,s=He(!1,n,-1);for(let i of t)s=s[i],n.push(i,s);try{for(let i=0;i<s.length;++i)n.push(i,s[i]),e(this,i,s),n.length-=2}finally{n.length=r}}map(e,...t){let n=[];return this.each((r,s,i)=>{n[s]=e(r,s,i)},...t),n}match(...e){let t=this.stack.length-1,n=null,r=this.stack[t--];for(let s of e){if(r===void 0)return!1;let i=null;if(typeof n=="number"&&(i=n,n=this.stack[t--],r=this.stack[t--]),s&&!s(r,n,i))return!1;n=this.stack[t--],r=this.stack[t--]}return!0}findAncestor(e){for(let t of Zs(this,ur,ba).call(this))if(e(t))return t}hasAncestor(e){for(let t of Zs(this,ur,ba).call(this))if(e(t))return!0;return!1}};ur=new WeakSet,vu=function(e){let{stack:t}=this;for(let n=t.length-1;n>=0;n-=2)if(!Array.isArray(t[n])&&--e<0)return n;return-1},ba=function*(){let{stack:e}=this;for(let t=e.length-3;t>=0;t-=2){let n=e[t];Array.isArray(n)||(yield n)}};var m9=d9,Cm=new Proxy(()=>{},{get:()=>Cm}),Du=Cm;function p9(e){return e!==null&&typeof e=="object"}var g9=p9;function*wa(e,t){let{getVisitorKeys:n,filter:r=()=>!0}=t,s=i=>g9(i)&&r(i);for(let i of n(e)){let a=e[i];if(Array.isArray(a))for(let o of a)s(o)&&(yield o);else s(a)&&(yield a)}}function*y9(e,t){let n=[e];for(let r=0;r<n.length;r++){let s=n[r];for(let i of wa(s,t))yield i,n.push(i)}}function b9(e,t){return wa(e,t).next().done}function ti(e){return(t,n,r)=>{let s=!!(r!=null&&r.backwards);if(n===!1)return!1;let{length:i}=t,a=n;for(;a>=0&&a<i;){let o=t.charAt(a);if(e instanceof RegExp){if(!e.test(o))return a}else if(!e.includes(o))return a;s?a--:a++}return a===-1||a===i?a:!1}}var w9=ti(/\s/u),Rn=ti(" "),Fm=ti(",; "),_m=ti(/[^\n\r]/u);function v9(e,t,n){let r=!!(n!=null&&n.backwards);if(t===!1)return!1;let s=e.charAt(t);if(r){if(e.charAt(t-1)==="\r"&&s===`
|
|
339
|
+
`)return t-2;if(s===`
|
|
340
|
+
`||s==="\r"||s==="\u2028"||s==="\u2029")return t-1}else{if(s==="\r"&&e.charAt(t+1)===`
|
|
341
|
+
`)return t+2;if(s===`
|
|
342
|
+
`||s==="\r"||s==="\u2028"||s==="\u2029")return t+1}return t}var cr=v9;function D9(e,t,n={}){let r=Rn(e,n.backwards?t-1:t,n),s=cr(e,r,n);return r!==s}var Pn=D9;function S9(e){return Array.isArray(e)&&e.length>0}var E9=S9,Tm=new Set(["tokens","comments","parent","enclosingNode","precedingNode","followingNode"]),A9=e=>Object.keys(e).filter(t=>!Tm.has(t));function x9(e){return e?t=>e(t,Tm):A9}var va=x9;function N9(e){let t=e.type||e.kind||"(unknown type)",n=String(e.name||e.id&&(typeof e.id=="object"?e.id.name:e.id)||e.key&&(typeof e.key=="object"?e.key.name:e.key)||e.value&&(typeof e.value=="object"?"":String(e.value))||e.operator||"");return n.length>20&&(n=n.slice(0,19)+"…"),t+(n?" "+n:"")}function Su(e,t){(e.comments??(e.comments=[])).push(t),t.printed=!1,t.nodeDescription=N9(e)}function ni(e,t){t.leading=!0,t.trailing=!1,Su(e,t)}function fr(e,t,n){t.leading=!1,t.trailing=!1,n&&(t.marker=n),Su(e,t)}function ri(e,t){t.leading=!1,t.trailing=!0,Su(e,t)}var Eu=new WeakMap;function Au(e,t){if(Eu.has(e))return Eu.get(e);let{printer:{getCommentChildNodes:n,canAttachComment:r,getVisitorKeys:s},locStart:i,locEnd:a}=t;if(!r)return[];let o=((n==null?void 0:n(e,t))??[...wa(e,{getVisitorKeys:va(s)})]).flatMap(l=>r(l)?[l]:Au(l,t));return o.sort((l,u)=>i(l)-i(u)||a(l)-a(u)),Eu.set(e,o),o}function Mm(e,t,n,r){let{locStart:s,locEnd:i}=n,a=s(t),o=i(t),l=Au(e,n),u,c,f=0,d=l.length;for(;f<d;){let y=f+d>>1,D=l[y],S=s(D),N=i(D);if(S<=a&&o<=N)return Mm(D,t,n,D);if(N<=a){u=D,f=y+1;continue}if(o<=S){c=D,d=y;continue}throw new Error("Comment location overlaps with node location")}if((r==null?void 0:r.type)==="TemplateLiteral"){let{quasis:y}=r,D=Nu(y,t,n);u&&Nu(y,u,n)!==D&&(u=null),c&&Nu(y,c,n)!==D&&(c=null)}return{enclosingNode:r,precedingNode:u,followingNode:c}}var xu=()=>!1;function L9(e,t){let{comments:n}=e;if(delete e.comments,!E9(n)||!t.printer.canAttachComment)return;let r=[],{printer:{experimentalFeatures:{avoidAstMutation:s=!1}={},handleComments:i={}},originalText:a}=t,{ownLine:o=xu,endOfLine:l=xu,remaining:u=xu}=i,c=n.map((f,d)=>({...Mm(e,f,t),comment:f,text:a,options:t,ast:e,isLastComment:n.length-1===d}));for(let[f,d]of c.entries()){let{comment:y,precedingNode:D,enclosingNode:S,followingNode:N,text:x,options:k,ast:b,isLastComment:w}=d,h;if(s?h=[d]:(y.enclosingNode=S,y.precedingNode=D,y.followingNode=N,h=[y,x,k,b,w]),k9(x,k,c,f))y.placement="ownLine",o(...h)||(N?ni(N,y):D?ri(D,y):fr(S||b,y));else if(C9(x,k,c,f))y.placement="endOfLine",l(...h)||(D?ri(D,y):N?ni(N,y):fr(S||b,y));else if(y.placement="remaining",!u(...h))if(D&&N){let g=r.length;g>0&&r[g-1].followingNode!==N&&Rm(r,k),r.push(d)}else D?ri(D,y):N?ni(N,y):fr(S||b,y)}if(Rm(r,t),!s)for(let f of n)delete f.precedingNode,delete f.enclosingNode,delete f.followingNode}var Om=e=>!/[\S\n\u2028\u2029]/u.test(e);function k9(e,t,n,r){let{comment:s,precedingNode:i}=n[r],{locStart:a,locEnd:o}=t,l=a(s);if(i)for(let u=r-1;u>=0;u--){let{comment:c,precedingNode:f}=n[u];if(f!==i||!Om(e.slice(o(c),l)))break;l=a(c)}return Pn(e,l,{backwards:!0})}function C9(e,t,n,r){let{comment:s,followingNode:i}=n[r],{locStart:a,locEnd:o}=t,l=o(s);if(i)for(let u=r+1;u<n.length;u++){let{comment:c,followingNode:f}=n[u];if(f!==i||!Om(e.slice(l,a(c))))break;l=o(c)}return Pn(e,l)}function Rm(e,t){var n,r;let s=e.length;if(s===0)return;let{precedingNode:i,followingNode:a}=e[0],o=t.locStart(a),l;for(l=s;l>0;--l){let{comment:u,precedingNode:c,followingNode:f}=e[l-1];Du.strictEqual(c,i),Du.strictEqual(f,a);let d=t.originalText.slice(t.locEnd(u),o);if(((r=(n=t.printer).isGap)==null?void 0:r.call(n,d,t))??/^[\s(]*$/u.test(d))o=t.locStart(u);else break}for(let[u,{comment:c}]of e.entries())u<l?ri(i,c):ni(a,c);for(let u of[i,a])u.comments&&u.comments.length>1&&u.comments.sort((c,f)=>t.locStart(c)-t.locStart(f));e.length=0}function Nu(e,t,n){let r=n.locStart(t)-1;for(let s=1;s<e.length;++s)if(r<n.locStart(e[s]))return s-1;return 0}function F9(e,t){let n=t-1;n=Rn(e,n,{backwards:!0}),n=cr(e,n,{backwards:!0}),n=Rn(e,n,{backwards:!0});let r=cr(e,n,{backwards:!0});return n!==r}var Lu=F9;function Pm(e,t){let n=e.node;return n.printed=!0,t.printer.printComment(e,t)}function _9(e,t){var n;let r=e.node,s=[Pm(e,t)],{printer:i,originalText:a,locStart:o,locEnd:l}=t;if((n=i.isBlockComment)!=null&&n.call(i,r)){let c=Pn(a,l(r))?Pn(a,o(r),{backwards:!0})?or:Am:" ";s.push(c)}else s.push(or);let u=cr(a,Rn(a,l(r)));return u!==!1&&Pn(a,u)&&s.push(or),s}function T9(e,t,n){var r;let s=e.node,i=Pm(e,t),{printer:a,originalText:o,locStart:l}=t,u=(r=a.isBlockComment)==null?void 0:r.call(a,s);if(n!=null&&n.hasLineSuffix&&!(n!=null&&n.isBlock)||Pn(o,l(s),{backwards:!0})){let c=Lu(o,l(s));return{doc:du([or,c?or:"",i]),isBlock:u,hasLineSuffix:!0}}return!u||n!=null&&n.hasLineSuffix?{doc:[du([" ",i]),pa],isBlock:u,hasLineSuffix:!0}:{doc:[" ",i],isBlock:u,hasLineSuffix:!1}}function M9(e,t){let n=e.node;if(!n)return{};let r=t[Symbol.for("printedComments")];if((n.comments||[]).filter(o=>!r.has(o)).length===0)return{leading:"",trailing:""};let s=[],i=[],a;return e.each(()=>{let o=e.node;if(r!=null&&r.has(o))return;let{leading:l,trailing:u}=o;l?s.push(_9(e,t)):u&&(a=T9(e,t,a),i.push(a.doc))},"comments"),{leading:s,trailing:i}}function O9(e,t,n){let{leading:r,trailing:s}=M9(e,n);return!r&&!s?t:da(t,i=>[r,i,s])}function R9(e){let{[Symbol.for("comments")]:t,[Symbol.for("printedComments")]:n}=e;for(let r of t){if(!r.printed&&!n.has(r))throw new Error('Comment "'+r.value.trim()+'" was not printed. Please report this error!');delete r.printed}}var Im=class extends Error{constructor(){super(...arguments);vt(this,"name","ConfigError")}},$m=class extends Error{constructor(){super(...arguments);vt(this,"name","UndefinedParserError")}},P9={checkIgnorePragma:{category:"Special",type:"boolean",default:!1,description:"Check whether the file's first docblock comment contains '@noprettier' or '@noformat' to determine if it should be formatted.",cliCategory:"Other"},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
|
|
343
|
+
(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:e=>typeof e=="string"||typeof e=="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"},{value:"mjml",description:"MJML"}]},plugins:{type:"path",array:!0,default:[{value:[]}],category:"Global",description:"Add a plugin. Multiple plugins can be passed as separate `--plugin`s.",exception:e=>typeof e=="string"||typeof e=="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).
|
|
344
|
+
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.
|
|
345
|
+
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 Bm({plugins:e=[],showDeprecated:t=!1}={}){let n=e.flatMap(s=>s.languages??[]),r=[];for(let s of $9(Object.assign({},...e.map(({options:i})=>i),P9)))!t&&s.deprecated||(Array.isArray(s.choices)&&(t||(s.choices=s.choices.filter(i=>!i.deprecated)),s.name==="parser"&&(s.choices=[...s.choices,...I9(s.choices,n,e)])),s.pluginDefaults=Object.fromEntries(e.filter(i=>{var a;return((a=i.defaultOptions)==null?void 0:a[s.name])!==void 0}).map(i=>[i.name,i.defaultOptions[s.name]])),r.push(s));return{languages:n,options:r}}function*I9(e,t,n){let r=new Set(e.map(s=>s.value));for(let s of t)if(s.parsers){for(let i of s.parsers)if(!r.has(i)){r.add(i);let a=n.find(l=>l.parsers&&Object.prototype.hasOwnProperty.call(l.parsers,i)),o=s.name;a!=null&&a.name&&(o+=` (plugin: ${a.name})`),yield{value:i,description:o}}}}function $9(e){let t=[];for(let[n,r]of Object.entries(e)){let s={name:n,...r};Array.isArray(s.default)&&(s.default=He(!1,s.default,-1).value),t.push(s)}return t}var B9=(e,t)=>{if(!(e&&t==null))return t.toReversed||!Array.isArray(t)?t.toReversed():[...t].reverse()},V9=B9,Vm,jm,Um,qm,Wm,j9=((Vm=globalThis.Deno)==null?void 0:Vm.build.os)==="windows"||((Um=(jm=globalThis.navigator)==null?void 0:jm.platform)==null?void 0:Um.startsWith("Win"))||((Wm=(qm=globalThis.process)==null?void 0:qm.platform)==null?void 0:Wm.startsWith("win"))||!1;function Hm(e){if(e=e instanceof URL?e:new URL(e),e.protocol!=="file:")throw new TypeError(`URL must be a file URL: received "${e.protocol}"`);return e}function U9(e){return e=Hm(e),decodeURIComponent(e.pathname.replace(/%(?![0-9A-Fa-f]{2})/g,"%25"))}function q9(e){e=Hm(e);let t=decodeURIComponent(e.pathname.replace(/\//g,"\\").replace(/%(?![0-9A-Fa-f]{2})/g,"%25")).replace(/^\\*([A-Za-z]:)(\\|$)/,"$1\\");return e.hostname!==""&&(t=`\\\\${e.hostname}${t}`),t}function W9(e){return j9?q9(e):U9(e)}var H9=W9,Y9=e=>String(e).split(/[/\\]/u).pop();function Ym(e,t){if(!t)return;let n=Y9(t).toLowerCase();return e.find(({filenames:r})=>r==null?void 0:r.some(s=>s.toLowerCase()===n))??e.find(({extensions:r})=>r==null?void 0:r.some(s=>n.endsWith(s)))}function z9(e,t){if(t)return e.find(({name:n})=>n.toLowerCase()===t)??e.find(({aliases:n})=>n==null?void 0:n.includes(t))??e.find(({extensions:n})=>n==null?void 0:n.includes(`.${t}`))}function zm(e,t){if(t){if(String(t).startsWith("file:"))try{t=H9(t)}catch{return}if(typeof t=="string")return e.find(({isSupported:n})=>n==null?void 0:n({filepath:t}))}}function G9(e,t){let n=V9(!1,e.plugins).flatMap(s=>s.languages??[]),r=z9(n,t.language)??Ym(n,t.physicalFile)??Ym(n,t.file)??zm(n,t.physicalFile)??zm(n,t.file)??(t.physicalFile,void 0);return r==null?void 0:r.parsers[0]}var J9=G9,us={key:e=>/^[$_a-zA-Z][$_a-zA-Z0-9]*$/.test(e)?e:JSON.stringify(e),value(e){if(e===null||typeof e!="object")return JSON.stringify(e);if(Array.isArray(e))return`[${e.map(n=>us.value(n)).join(", ")}]`;let t=Object.keys(e);return t.length===0?"{}":`{ ${t.map(n=>`${us.key(n)}: ${us.value(e[n])}`).join(", ")} }`},pair:({key:e,value:t})=>us.value({[e]:t})},Gm=new Proxy(String,{get:()=>Gm}),Xt=Gm,Q9=(e,t,{descriptor:n})=>{let r=[`${Xt.yellow(typeof e=="string"?n.key(e):n.pair(e))} is deprecated`];return t&&r.push(`we now treat it as ${Xt.blue(typeof t=="string"?n.key(t):n.pair(t))}`),r.join("; ")+"."},Jm=Symbol.for("vnopts.VALUE_NOT_EXIST"),Da=Symbol.for("vnopts.VALUE_UNCHANGED"),Qm=" ".repeat(2),K9=(e,t,n)=>{let{text:r,list:s}=n.normalizeExpectedResult(n.schemas[e].expected(n)),i=[];return r&&i.push(Km(e,t,r,n.descriptor)),s&&i.push([Km(e,t,s.title,n.descriptor)].concat(s.values.map(a=>Xm(a,n.loggerPrintWidth))).join(`
|
|
346
|
+
`)),Zm(i,n.loggerPrintWidth)};function Km(e,t,n,r){return[`Invalid ${Xt.red(r.key(e))} value.`,`Expected ${Xt.blue(n)},`,`but received ${t===Jm?Xt.gray("nothing"):Xt.red(r.value(t))}.`].join(" ")}function Xm({text:e,list:t},n){let r=[];return e&&r.push(`- ${Xt.blue(e)}`),t&&r.push([`- ${Xt.blue(t.title)}:`].concat(t.values.map(s=>Xm(s,n-Qm.length).replace(/^|\n/g,`$&${Qm}`))).join(`
|
|
347
|
+
`)),Zm(r,n)}function Zm(e,t){if(e.length===1)return e[0];let[n,r]=e,[s,i]=e.map(a=>a.split(`
|
|
348
|
+
`,1)[0].length);return s>t&&s>i?r:n}var ku=[],ep=[];function X9(e,t){if(e===t)return 0;let n=e;e.length>t.length&&(e=t,t=n);let r=e.length,s=t.length;for(;r>0&&e.charCodeAt(~-r)===t.charCodeAt(~-s);)r--,s--;let i=0;for(;i<r&&e.charCodeAt(i)===t.charCodeAt(i);)i++;if(r-=i,s-=i,r===0)return s;let a,o,l,u,c=0,f=0;for(;c<r;)ep[c]=e.charCodeAt(i+c),ku[c]=++c;for(;f<s;)for(a=t.charCodeAt(i+f),l=f++,o=f,c=0;c<r;c++)u=a===ep[c]?l:l+1,l=ku[c],o=ku[c]=l>o?u>o?o+1:u:u>l?l+1:u;return o}var tp=(e,t,{descriptor:n,logger:r,schemas:s})=>{let i=[`Ignored unknown option ${Xt.yellow(n.pair({key:e,value:t}))}.`],a=Object.keys(s).sort().find(o=>X9(e,o)<3);a&&i.push(`Did you mean ${Xt.blue(n.key(a))}?`),r.warn(i.join(" "))},Z9=["default","expected","validate","deprecated","forward","redirect","overlap","preprocess","postprocess"];function e7(e,t){let n=new e(t),r=Object.create(n);for(let s of Z9)s in t&&(r[s]=t7(t[s],n,In.prototype[s].length));return r}var In=class{static create(e){return e7(this,e)}constructor(e){this.name=e.name}default(e){}expected(e){return"nothing"}validate(e,t){return!1}deprecated(e,t){return!1}forward(e,t){}redirect(e,t){}overlap(e,t,n){return e}preprocess(e,t){return e}postprocess(e,t){return Da}};function t7(e,t,n){return typeof e=="function"?(...r)=>e(...r.slice(0,n-1),t,...r.slice(n-1)):()=>e}var n7=class extends In{constructor(e){super(e),this._sourceName=e.sourceName}expected(e){return e.schemas[this._sourceName].expected(e)}validate(e,t){return t.schemas[this._sourceName].validate(e,t)}redirect(e,t){return this._sourceName}},r7=class extends In{expected(){return"anything"}validate(){return!0}},s7=class extends In{constructor({valueSchema:e,name:t=e.name,...n}){super({...n,name:t}),this._valueSchema=e}expected(e){let{text:t,list:n}=e.normalizeExpectedResult(this._valueSchema.expected(e));return{text:t&&`an array of ${t}`,list:n&&{title:"an array of the following values",values:[{list:n}]}}}validate(e,t){if(!Array.isArray(e))return!1;let n=[];for(let r of e){let s=t.normalizeValidateResult(this._valueSchema.validate(r,t),r);s!==!0&&n.push(s.value)}return n.length===0?!0:{value:n}}deprecated(e,t){let n=[];for(let r of e){let s=t.normalizeDeprecatedResult(this._valueSchema.deprecated(r,t),r);s!==!1&&n.push(...s.map(({value:i})=>({value:[i]})))}return n}forward(e,t){let n=[];for(let r of e){let s=t.normalizeForwardResult(this._valueSchema.forward(r,t),r);n.push(...s.map(np))}return n}redirect(e,t){let n=[],r=[];for(let s of e){let i=t.normalizeRedirectResult(this._valueSchema.redirect(s,t),s);"remain"in i&&n.push(i.remain),r.push(...i.redirect.map(np))}return n.length===0?{redirect:r}:{redirect:r,remain:n}}overlap(e,t){return e.concat(t)}};function np({from:e,to:t}){return{from:[e],to:t}}var i7=class extends In{expected(){return"true or false"}validate(e){return typeof e=="boolean"}};function a7(e,t){let n=Object.create(null);for(let r of e){let s=r[t];if(n[s])throw new Error(`Duplicate ${t} ${JSON.stringify(s)}`);n[s]=r}return n}function o7(e,t){let n=new Map;for(let r of e){let s=r[t];if(n.has(s))throw new Error(`Duplicate ${t} ${JSON.stringify(s)}`);n.set(s,r)}return n}function l7(){let e=Object.create(null);return t=>{let n=JSON.stringify(t);return e[n]?!0:(e[n]=!0,!1)}}function u7(e,t){let n=[],r=[];for(let s of e)t(s)?n.push(s):r.push(s);return[n,r]}function c7(e){return e===Math.floor(e)}function f7(e,t){if(e===t)return 0;let n=typeof e,r=typeof t,s=["undefined","object","boolean","number","string"];return n!==r?s.indexOf(n)-s.indexOf(r):n!=="string"?Number(e)-Number(t):e.localeCompare(t)}function h7(e){return(...t)=>{let n=e(...t);return typeof n=="string"?new Error(n):n}}function rp(e){return e===void 0?{}:e}function sp(e){if(typeof e=="string")return{text:e};let{text:t,list:n}=e;return d7((t||n)!==void 0,"Unexpected `expected` result, there should be at least one field."),n?{text:t,list:{title:n.title,values:n.values.map(sp)}}:{text:t}}function ip(e,t){return e===!0?!0:e===!1?{value:t}:e}function ap(e,t,n=!1){return e===!1?!1:e===!0?n?!0:[{value:t}]:"value"in e?[e]:e.length===0?!1:e}function op(e,t){return typeof e=="string"||"key"in e?{from:t,to:e}:"from"in e?{from:e.from,to:e.to}:{from:t,to:e.to}}function Cu(e,t){return e===void 0?[]:Array.isArray(e)?e.map(n=>op(n,t)):[op(e,t)]}function lp(e,t){let n=Cu(typeof e=="object"&&"redirect"in e?e.redirect:e,t);return n.length===0?{remain:t,redirect:n}:typeof e=="object"&&"remain"in e?{remain:e.remain,redirect:n}:{redirect:n}}function d7(e,t){if(!e)throw new Error(t)}var m7=class extends In{constructor(e){super(e),this._choices=o7(e.choices.map(t=>t&&typeof t=="object"?t:{value:t}),"value")}expected({descriptor:e}){let t=Array.from(this._choices.keys()).map(s=>this._choices.get(s)).filter(({hidden:s})=>!s).map(s=>s.value).sort(f7).map(e.value),n=t.slice(0,-2),r=t.slice(-2);return{text:n.concat(r.join(" or ")).join(", "),list:{title:"one of the following values",values:t}}}validate(e){return this._choices.has(e)}deprecated(e){let t=this._choices.get(e);return t&&t.deprecated?{value:e}:!1}forward(e){let t=this._choices.get(e);return t?t.forward:void 0}redirect(e){let t=this._choices.get(e);return t?t.redirect:void 0}},p7=class extends In{expected(){return"a number"}validate(e,t){return typeof e=="number"}},g7=class extends p7{expected(){return"an integer"}validate(e,t){return t.normalizeValidateResult(super.validate(e,t),e)===!0&&c7(e)}},up=class extends In{expected(){return"a string"}validate(e){return typeof e=="string"}},y7=us,b7=tp,w7=K9,v7=Q9,D7=class{constructor(e,t){let{logger:n=console,loggerPrintWidth:r=80,descriptor:s=y7,unknown:i=b7,invalid:a=w7,deprecated:o=v7,missing:l=()=>!1,required:u=()=>!1,preprocess:c=d=>d,postprocess:f=()=>Da}=t||{};this._utils={descriptor:s,logger:n||{warn:()=>{}},loggerPrintWidth:r,schemas:a7(e,"name"),normalizeDefaultResult:rp,normalizeExpectedResult:sp,normalizeDeprecatedResult:ap,normalizeForwardResult:Cu,normalizeRedirectResult:lp,normalizeValidateResult:ip},this._unknownHandler=i,this._invalidHandler=h7(a),this._deprecatedHandler=o,this._identifyMissing=(d,y)=>!(d in y)||l(d,y),this._identifyRequired=u,this._preprocess=c,this._postprocess=f,this.cleanHistory()}cleanHistory(){this._hasDeprecationWarned=l7()}normalize(e){let t={},n=[this._preprocess(e,this._utils)],r=()=>{for(;n.length!==0;){let s=n.shift(),i=this._applyNormalization(s,t);n.push(...i)}};r();for(let s of Object.keys(this._utils.schemas)){let i=this._utils.schemas[s];if(!(s in t)){let a=rp(i.default(this._utils));"value"in a&&n.push({[s]:a.value})}}r();for(let s of Object.keys(this._utils.schemas)){if(!(s in t))continue;let i=this._utils.schemas[s],a=t[s],o=i.postprocess(a,this._utils);o!==Da&&(this._applyValidation(o,s,i),t[s]=o)}return this._applyPostprocess(t),this._applyRequiredCheck(t),t}_applyNormalization(e,t){let n=[],{knownKeys:r,unknownKeys:s}=this._partitionOptionKeys(e);for(let i of r){let a=this._utils.schemas[i],o=a.preprocess(e[i],this._utils);this._applyValidation(o,i,a);let l=({from:f,to:d})=>{n.push(typeof d=="string"?{[d]:f}:{[d.key]:d.value})},u=({value:f,redirectTo:d})=>{let y=ap(a.deprecated(f,this._utils),o,!0);if(y!==!1)if(y===!0)this._hasDeprecationWarned(i)||this._utils.logger.warn(this._deprecatedHandler(i,d,this._utils));else for(let{value:D}of y){let S={key:i,value:D};if(!this._hasDeprecationWarned(S)){let N=typeof d=="string"?{key:d,value:D}:d;this._utils.logger.warn(this._deprecatedHandler(S,N,this._utils))}}};Cu(a.forward(o,this._utils),o).forEach(l);let c=lp(a.redirect(o,this._utils),o);if(c.redirect.forEach(l),"remain"in c){let f=c.remain;t[i]=i in t?a.overlap(t[i],f,this._utils):f,u({value:f})}for(let{from:f,to:d}of c.redirect)u({value:f,redirectTo:d})}for(let i of s){let a=e[i];this._applyUnknownHandler(i,a,t,(o,l)=>{n.push({[o]:l})})}return n}_applyRequiredCheck(e){for(let t of Object.keys(this._utils.schemas))if(this._identifyMissing(t,e)&&this._identifyRequired(t))throw this._invalidHandler(t,Jm,this._utils)}_partitionOptionKeys(e){let[t,n]=u7(Object.keys(e).filter(r=>!this._identifyMissing(r,e)),r=>r in this._utils.schemas);return{knownKeys:t,unknownKeys:n}}_applyValidation(e,t,n){let r=ip(n.validate(e,this._utils),e);if(r!==!0)throw this._invalidHandler(t,r.value,this._utils)}_applyUnknownHandler(e,t,n,r){let s=this._unknownHandler(e,t,this._utils);if(s)for(let i of Object.keys(s)){if(this._identifyMissing(i,s))continue;let a=s[i];i in this._utils.schemas?r(i,a):n[i]=a}}_applyPostprocess(e){let t=this._postprocess(e,this._utils);if(t!==Da){if(t.delete)for(let n of t.delete)delete e[n];if(t.override){let{knownKeys:n,unknownKeys:r}=this._partitionOptionKeys(t.override);for(let s of n){let i=t.override[s];this._applyValidation(i,s,this._utils.schemas[s]),e[s]=i}for(let s of r){let i=t.override[s];this._applyUnknownHandler(s,i,e,(a,o)=>{let l=this._utils.schemas[a];this._applyValidation(o,a,l),e[a]=o})}}}}},Fu;function S7(e,t,{logger:n=!1,isCLI:r=!1,passThrough:s=!1,FlagSchema:i,descriptor:a}={}){if(r){if(!i)throw new Error("'FlagSchema' option is required.");if(!a)throw new Error("'descriptor' option is required.")}else a=us;let o=s?Array.isArray(s)?(d,y)=>s.includes(d)?{[d]:y}:void 0:(d,y)=>({[d]:y}):(d,y,D)=>{let{_:S,...N}=D.schemas;return tp(d,y,{...D,schemas:N})},l=E7(t,{isCLI:r,FlagSchema:i}),u=new D7(l,{logger:n,unknown:o,descriptor:a}),c=n!==!1;c&&Fu&&(u._hasDeprecationWarned=Fu);let f=u.normalize(e);return c&&(Fu=u._hasDeprecationWarned),f}function E7(e,{isCLI:t,FlagSchema:n}){let r=[];t&&r.push(r7.create({name:"_"}));for(let s of e)r.push(A7(s,{isCLI:t,optionInfos:e,FlagSchema:n})),s.alias&&t&&r.push(n7.create({name:s.alias,sourceName:s.name}));return r}function A7(e,{isCLI:t,optionInfos:n,FlagSchema:r}){let{name:s}=e,i={name:s},a,o={};switch(e.type){case"int":a=g7,t&&(i.preprocess=Number);break;case"string":a=up;break;case"choice":a=m7,i.choices=e.choices.map(l=>l!=null&&l.redirect?{...l,redirect:{to:{key:e.name,value:l.redirect}}}:l);break;case"boolean":a=i7;break;case"flag":a=r,i.flags=n.flatMap(l=>[l.alias,l.description&&l.name,l.oppositeDescription&&`no-${l.name}`].filter(Boolean));break;case"path":a=up;break;default:throw new Error(`Unexpected type ${e.type}`)}if(e.exception?i.validate=(l,u,c)=>e.exception(l)||u.validate(l,c):i.validate=(l,u,c)=>l===void 0||u.validate(l,c),e.redirect&&(o.redirect=l=>l?{to:typeof e.redirect=="string"?e.redirect:{key:e.redirect.option,value:e.redirect.value}}:void 0),e.deprecated&&(o.deprecated=!0),t&&!e.array){let l=i.preprocess||(u=>u);i.preprocess=(u,c,f)=>c.preprocess(l(Array.isArray(u)?He(!1,u,-1):u),f)}return e.array?s7.create({...t?{preprocess:l=>Array.isArray(l)?l:[l]}:{},...o,valueSchema:a.create(i)}):a.create({...i,...o})}var x7=S7,N7=(e,t,n)=>{if(!(e&&t==null)){if(t.findLast)return t.findLast(n);for(let r=t.length-1;r>=0;r--){let s=t[r];if(n(s,r,t))return s}}},cp=N7;function fp(e,t){if(!t)throw new Error("parserName is required.");let n=cp(!1,e,s=>s.parsers&&Object.prototype.hasOwnProperty.call(s.parsers,t));if(n)return n;let r=`Couldn't resolve parser "${t}".`;throw r+=" Plugins must be explicitly added to the standalone bundle.",new Im(r)}function L7(e,t){if(!t)throw new Error("astFormat is required.");let n=cp(!1,e,s=>s.printers&&Object.prototype.hasOwnProperty.call(s.printers,t));if(n)return n;let r=`Couldn't find plugin for AST format "${t}".`;throw r+=" Plugins must be explicitly added to the standalone bundle.",new Im(r)}function _u({plugins:e,parser:t}){let n=fp(e,t);return hp(n,t)}function hp(e,t){let n=e.parsers[t];return typeof n=="function"?n():n}function k7(e,t){let n=e.printers[t];return typeof n=="function"?n():n}var dp={astFormat:"estree",printer:{},originalText:void 0,locStart:null,locEnd:null};async function C7(e,t={}){var n;let r={...e};if(!r.parser)if(r.filepath){if(r.parser=J9(r,{physicalFile:r.filepath}),!r.parser)throw new $m(`No parser could be inferred for file "${r.filepath}".`)}else throw new $m("No parser and no file path given, couldn't infer a parser.");let s=Bm({plugins:e.plugins,showDeprecated:!0}).options,i={...dp,...Object.fromEntries(s.filter(d=>d.default!==void 0).map(d=>[d.name,d.default]))},a=fp(r.plugins,r.parser),o=await hp(a,r.parser);r.astFormat=o.astFormat,r.locEnd=o.locEnd,r.locStart=o.locStart;let l=(n=a.printers)!=null&&n[o.astFormat]?a:L7(r.plugins,o.astFormat),u=await k7(l,o.astFormat);r.printer=u;let c=l.defaultOptions?Object.fromEntries(Object.entries(l.defaultOptions).filter(([,d])=>d!==void 0)):{},f={...i,...c};for(let[d,y]of Object.entries(f))(r[d]===null||r[d]===void 0)&&(r[d]=y);return r.parser==="json"&&(r.trailingComma="none"),x7(r,s,{passThrough:Object.keys(dp),...t})}var cs=C7,F7=pD(bD());async function _7(e,t){let n=await _u(t),r=n.preprocess?n.preprocess(e,t):e;t.originalText=r;let s;try{s=await n.parse(r,t,t)}catch(i){T7(i,e)}return{text:r,ast:s}}function T7(e,t){let{loc:n}=e;if(n){let r=(0,F7.codeFrameColumns)(t,n,{highlightCode:!0});throw e.message+=`
|
|
349
|
+
`+r,e.codeFrame=r,e}throw e}var si=_7;async function M7(e,t,n,r,s){let{embeddedLanguageFormatting:i,printer:{embed:a,hasPrettierIgnore:o=()=>!1,getVisitorKeys:l}}=n;if(!a||i!=="auto")return;if(a.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/plugins#optional-embed");let u=va(a.getVisitorKeys??l),c=[];y();let f=e.stack;for(let{print:D,node:S,pathStack:N}of c)try{e.stack=N;let x=await D(d,t,e,n);x&&s.set(S,x)}catch(x){if(globalThis.PRETTIER_DEBUG)throw x}e.stack=f;function d(D,S){return O7(D,S,n,r)}function y(){let{node:D}=e;if(D===null||typeof D!="object"||o(e))return;for(let N of u(D))Array.isArray(D[N])?e.each(y,N):e.call(y,N);let S=a(e,n);if(S){if(typeof S=="function"){c.push({print:S,node:D,pathStack:[...e.stack]});return}s.set(D,S)}}}async function O7(e,t,n,r){let s=await cs({...n,...t,parentParser:n.parser,originalText:e,cursorOffset:void 0,rangeStart:void 0,rangeEnd:void 0},{passThrough:!0}),{ast:i}=await si(e,s),a=await r(i,s);return Dm(a)}function R7(e,t){let{originalText:n,[Symbol.for("comments")]:r,locStart:s,locEnd:i,[Symbol.for("printedComments")]:a}=t,{node:o}=e,l=s(o),u=i(o);for(let c of r)s(c)>=l&&i(c)<=u&&a.add(c);return n.slice(l,u)}var P7=R7;async function Sa(e,t){({ast:e}=await pp(e,t));let n=new Map,r=new m9(e),s=new Map;await M7(r,a,t,Sa,s);let i=await mp(r,t,a,void 0,s);if(R9(t),t.cursorOffset>=0){if(t.nodeAfterCursor&&!t.nodeBeforeCursor)return[lr,i];if(t.nodeBeforeCursor&&!t.nodeAfterCursor)return[i,lr]}return i;function a(l,u){return l===void 0||l===r?o(u):Array.isArray(l)?r.call(()=>o(u),...l):r.call(()=>o(u),l)}function o(l){let u=r.node;if(u==null)return"";let c=u&&typeof u=="object"&&l===void 0;if(c&&n.has(u))return n.get(u);let f=mp(r,t,a,l,s);return c&&n.set(u,f),f}}function mp(e,t,n,r,s){var i;let{node:a}=e,{printer:o}=t,l;switch((i=o.hasPrettierIgnore)!=null&&i.call(o,e)?l=P7(e,t):s.has(a)?l=s.get(a):l=o.print(e,t,n,r),a){case t.cursorNode:l=da(l,u=>[lr,u,lr]);break;case t.nodeBeforeCursor:l=da(l,u=>[u,lr]);break;case t.nodeAfterCursor:l=da(l,u=>[lr,u]);break}return o.printComment&&(!o.willPrintOwnComments||!o.willPrintOwnComments(e,t))&&(l=O9(e,l,t)),l}async function pp(e,t){let n=e.comments??[];t[Symbol.for("comments")]=n,t[Symbol.for("printedComments")]=new Set,L9(e,t);let{printer:{preprocess:r}}=t;return e=r?await r(e,t):e,{ast:e,comments:n}}function I7(e,t){let{cursorOffset:n,locStart:r,locEnd:s}=t,i=va(t.printer.getVisitorKeys),a=y=>r(y)<=n&&s(y)>=n,o=e,l=[e];for(let y of y9(e,{getVisitorKeys:i,filter:a}))l.push(y),o=y;if(b9(o,{getVisitorKeys:i}))return{cursorNode:o};let u,c,f=-1,d=Number.POSITIVE_INFINITY;for(;l.length>0&&(u===void 0||c===void 0);){o=l.pop();let y=u!==void 0,D=c!==void 0;for(let S of wa(o,{getVisitorKeys:i})){if(!y){let N=s(S);N<=n&&N>f&&(u=S,f=N)}if(!D){let N=r(S);N>=n&&N<d&&(c=S,d=N)}}}return{nodeBeforeCursor:u,nodeAfterCursor:c}}var gp=I7;function $7(e,t){let{printer:{massageAstNode:n,getVisitorKeys:r}}=t;if(!n)return e;let s=va(r),i=n.ignoredProperties??new Set;return a(e);function a(o,l){if(!(o!==null&&typeof o=="object"))return o;if(Array.isArray(o))return o.map(d=>a(d,l)).filter(Boolean);let u={},c=new Set(s(o));for(let d in o)!Object.prototype.hasOwnProperty.call(o,d)||i.has(d)||(c.has(d)?u[d]=a(o[d],o):u[d]=o[d]);let f=n(o,u,l);if(f!==null)return f??u}}var B7=$7,V7=(e,t,n)=>{if(!(e&&t==null)){if(t.findLastIndex)return t.findLastIndex(n);for(let r=t.length-1;r>=0;r--){let s=t[r];if(n(s,r,t))return r}return-1}},j7=V7,U7=({parser:e})=>e==="json"||e==="json5"||e==="jsonc"||e==="json-stringify";function q7(e,t){let n=[e.node,...e.parentNodes],r=new Set([t.node,...t.parentNodes]);return n.find(s=>bp.has(s.type)&&r.has(s))}function yp(e){let t=j7(!1,e,n=>n.type!=="Program"&&n.type!=="File");return t===-1?e:e.slice(0,t+1)}function W7(e,t,{locStart:n,locEnd:r}){let s=e.node,i=t.node;if(s===i)return{startNode:s,endNode:i};let a=n(e.node);for(let l of yp(t.parentNodes))if(n(l)>=a)i=l;else break;let o=r(t.node);for(let l of yp(e.parentNodes)){if(r(l)<=o)s=l;else break;if(s===i)break}return{startNode:s,endNode:i}}function Tu(e,t,n,r,s=[],i){let{locStart:a,locEnd:o}=n,l=a(e),u=o(e);if(!(t>u||t<l||i==="rangeEnd"&&t===l||i==="rangeStart"&&t===u)){for(let c of Au(e,n)){let f=Tu(c,t,n,r,[e,...s],i);if(f)return f}if(!r||r(e,s[0]))return{node:e,parentNodes:s}}}function H7(e,t){return t!=="DeclareExportDeclaration"&&e!=="TypeParameterDeclaration"&&(e==="Directive"||e==="TypeAlias"||e==="TSExportAssignment"||e.startsWith("Declare")||e.startsWith("TSDeclare")||e.endsWith("Statement")||e.endsWith("Declaration"))}var bp=new Set(["JsonRoot","ObjectExpression","ArrayExpression","StringLiteral","NumericLiteral","BooleanLiteral","NullLiteral","UnaryExpression","TemplateLiteral"]),Y7=new Set(["OperationDefinition","FragmentDefinition","VariableDefinition","TypeExtensionDefinition","ObjectTypeDefinition","FieldDefinition","DirectiveDefinition","EnumTypeDefinition","EnumValueDefinition","InputValueDefinition","InputObjectTypeDefinition","SchemaDefinition","OperationTypeDefinition","InterfaceTypeDefinition","UnionTypeDefinition","ScalarTypeDefinition"]);function wp(e,t,n){if(!t)return!1;switch(e.parser){case"flow":case"hermes":case"babel":case"babel-flow":case"babel-ts":case"typescript":case"acorn":case"espree":case"meriyah":case"oxc":case"oxc-ts":case"__babel_estree":return H7(t.type,n==null?void 0:n.type);case"json":case"json5":case"jsonc":case"json-stringify":return bp.has(t.type);case"graphql":return Y7.has(t.kind);case"vue":return t.tag!=="root"}return!1}function z7(e,t,n){let{rangeStart:r,rangeEnd:s,locStart:i,locEnd:a}=t;Du.ok(s>r);let o=e.slice(r,s).search(/\S/u),l=o===-1;if(!l)for(r+=o;s>r&&!/\S/u.test(e[s-1]);--s);let u=Tu(n,r,t,(y,D)=>wp(t,y,D),[],"rangeStart"),c=l?u:Tu(n,s,t,y=>wp(t,y),[],"rangeEnd");if(!u||!c)return{rangeStart:0,rangeEnd:0};let f,d;if(U7(t)){let y=q7(u,c);f=y,d=y}else({startNode:f,endNode:d}=W7(u,c,t));return{rangeStart:Math.min(i(f),i(d)),rangeEnd:Math.max(a(f),a(d))}}var vp="\uFEFF",Dp=Symbol("cursor");async function Sp(e,t,n=0){if(!e||e.trim().length===0)return{formatted:"",cursorOffset:-1,comments:[]};let{ast:r,text:s}=await si(e,t);t.cursorOffset>=0&&(t={...t,...gp(r,t)});let i=await Sa(r,t);n>0&&(i=Lm([or,i],n,t.tabWidth));let a=ya(i,t);if(n>0){let l=a.formatted.trim();a.cursorNodeStart!==void 0&&(a.cursorNodeStart-=a.formatted.indexOf(l),a.cursorNodeStart<0&&(a.cursorNodeStart=0,a.cursorNodeText=a.cursorNodeText.trimStart()),a.cursorNodeStart+a.cursorNodeText.length>l.length&&(a.cursorNodeText=a.cursorNodeText.trimEnd())),a.formatted=l+cu(t.endOfLine)}let o=t[Symbol.for("comments")];if(t.cursorOffset>=0){let l,u,c,f;if((t.cursorNode||t.nodeBeforeCursor||t.nodeAfterCursor)&&a.cursorNodeText)if(c=a.cursorNodeStart,f=a.cursorNodeText,t.cursorNode)l=t.locStart(t.cursorNode),u=s.slice(l,t.locEnd(t.cursorNode));else{if(!t.nodeBeforeCursor&&!t.nodeAfterCursor)throw new Error("Cursor location must contain at least one of cursorNode, nodeBeforeCursor, nodeAfterCursor");l=t.nodeBeforeCursor?t.locEnd(t.nodeBeforeCursor):0;let x=t.nodeAfterCursor?t.locStart(t.nodeAfterCursor):s.length;u=s.slice(l,x)}else l=0,u=s,c=0,f=a.formatted;let d=t.cursorOffset-l;if(u===f)return{formatted:a.formatted,cursorOffset:c+d,comments:o};let y=u.split("");y.splice(d,0,Dp);let D=f.split(""),S=AD(y,D),N=c;for(let x of S)if(x.removed){if(x.value.includes(Dp))break}else N+=x.count;return{formatted:a.formatted,cursorOffset:N,comments:o}}return{formatted:a.formatted,cursorOffset:-1,comments:o}}async function G7(e,t){let{ast:n,text:r}=await si(e,t),{rangeStart:s,rangeEnd:i}=z7(r,t,n),a=r.slice(s,i),o=Math.min(s,r.lastIndexOf(`
|
|
350
|
+
`,s)+1),l=r.slice(o,s).match(/^\s*/u)[0],u=wu(l,t.tabWidth),c=await Sp(a,{...t,rangeStart:0,rangeEnd:Number.POSITIVE_INFINITY,cursorOffset:t.cursorOffset>s&&t.cursorOffset<=i?t.cursorOffset-s:-1,endOfLine:"lf"},u),f=c.formatted.trimEnd(),{cursorOffset:d}=t;d>i?d+=f.length-a.length:c.cursorOffset>=0&&(d=c.cursorOffset+s);let y=r.slice(0,s)+f+r.slice(i);if(t.endOfLine!=="lf"){let D=cu(t.endOfLine);d>=0&&D===`\r
|
|
351
|
+
`&&(d+=gm(y.slice(0,d),`
|
|
352
|
+
`)),y=fa(!1,y,`
|
|
353
|
+
`,D)}return{formatted:y,cursorOffset:d,comments:c.comments}}function Mu(e,t,n){return typeof t!="number"||Number.isNaN(t)||t<0||t>e.length?n:t}function Ep(e,t){let{cursorOffset:n,rangeStart:r,rangeEnd:s}=t;return n=Mu(e,n,-1),r=Mu(e,r,0),s=Mu(e,s,e.length),{...t,cursorOffset:n,rangeStart:r,rangeEnd:s}}function Ap(e,t){let{cursorOffset:n,rangeStart:r,rangeEnd:s,endOfLine:i}=Ep(e,t),a=e.charAt(0)===vp;if(a&&(e=e.slice(1),n--,r--,s--),i==="auto"&&(i=xD(e)),e.includes("\r")){let o=l=>gm(e.slice(0,Math.max(l,0)),`\r
|
|
354
|
+
`);n-=o(n),r-=o(r),s-=o(s),e=ND(e)}return{hasBOM:a,text:e,options:Ep(e,{...t,cursorOffset:n,rangeStart:r,rangeEnd:s,endOfLine:i})}}async function xp(e,t){let n=await _u(t);return!n.hasPragma||n.hasPragma(e)}async function J7(e,t){var n;let r=await _u(t);return(n=r.hasIgnorePragma)==null?void 0:n.call(r,e)}async function Np(e,t){let{hasBOM:n,text:r,options:s}=Ap(e,await cs(t));if(s.rangeStart>=s.rangeEnd&&r!==""||s.requirePragma&&!await xp(r,s)||s.checkIgnorePragma&&await J7(r,s))return{formatted:e,cursorOffset:t.cursorOffset,comments:[]};let i;return s.rangeStart>0||s.rangeEnd<r.length?i=await G7(r,s):(!s.requirePragma&&s.insertPragma&&s.printer.insertPragma&&!await xp(r,s)&&(r=s.printer.insertPragma(r)),i=await Sp(r,s)),n&&(i.formatted=vp+i.formatted,i.cursorOffset>=0&&i.cursorOffset++),i}async function Q7(e,t,n){let{text:r,options:s}=Ap(e,await cs(t)),i=await si(r,s);return n&&(n.preprocessForPrint&&(i.ast=await pp(i.ast,s)),n.massage&&(i.ast=B7(i.ast,s))),i}async function K7(e,t){t=await cs(t);let n=await Sa(e,t);return ya(n,t)}async function X7(e,t){let n=r9(e),{formatted:r}=await Np(n,{...t,parser:"__js_expression"});return r}async function Z7(e,t){t=await cs(t);let{ast:n}=await si(e,t);return t.cursorOffset>=0&&(t={...t,...gp(n,t)}),Sa(n,t)}async function e8(e,t){return ya(e,await cs(t))}var Lp={};uu(Lp,{builders:()=>t8,printer:()=>n8,utils:()=>r8});var t8={join:Nm,line:Am,softline:t9,hardline:or,literalline:xm,group:Sm,conditionalGroup:JD,fill:QD,lineSuffix:du,lineSuffixBoundary:ZD,cursor:lr,breakParent:pa,ifBreak:KD,trim:e9,indent:ma,indentIfBreak:XD,align:os,addAlignmentToDoc:Lm,markAsRoot:zD,dedentToRoot:YD,dedent:GD,hardlineWithoutBreakParent:mu,literallineWithoutBreakParent:Em,label:n9,concat:e=>e},n8={printDocToString:ya},r8={willBreak:RD,traverseDoc:fu,findInDoc:hu,mapDoc:ha,removeLines:$D,stripTrailingHardline:Dm,replaceEndOfLine:jD,canBreak:qD},s8="3.6.2",kp={};uu(kp,{addDanglingComment:()=>fr,addLeadingComment:()=>ni,addTrailingComment:()=>ri,getAlignmentSize:()=>wu,getIndentSize:()=>c8,getMaxContinuousCount:()=>d8,getNextNonSpaceNonCommentCharacter:()=>p8,getNextNonSpaceNonCommentCharacterIndex:()=>x8,getPreferredQuote:()=>y8,getStringWidth:()=>pu,hasNewline:()=>Pn,hasNewlineInRange:()=>w8,hasSpaces:()=>D8,isNextLineEmpty:()=>C8,isNextLineEmptyAfterIndex:()=>Iu,isPreviousLineEmpty:()=>L8,makeString:()=>E8,skip:()=>ti,skipEverythingButNewLine:()=>_m,skipInlineComment:()=>Ou,skipNewline:()=>cr,skipSpaces:()=>Rn,skipToLineEnd:()=>Fm,skipTrailingComment:()=>Ru,skipWhitespace:()=>w9});function i8(e,t){if(t===!1)return!1;if(e.charAt(t)==="/"&&e.charAt(t+1)==="*"){for(let n=t+2;n<e.length;++n)if(e.charAt(n)==="*"&&e.charAt(n+1)==="/")return n+2}return t}var Ou=i8;function a8(e,t){return t===!1?!1:e.charAt(t)==="/"&&e.charAt(t+1)==="/"?_m(e,t):t}var Ru=a8;function o8(e,t){let n=null,r=t;for(;r!==n;)n=r,r=Rn(e,r),r=Ou(e,r),r=Ru(e,r),r=cr(e,r);return r}var Pu=o8;function l8(e,t){let n=null,r=t;for(;r!==n;)n=r,r=Fm(e,r),r=Ou(e,r),r=Rn(e,r);return r=Ru(e,r),r=cr(e,r),r!==!1&&Pn(e,r)}var Iu=l8;function u8(e,t){let n=e.lastIndexOf(`
|
|
355
|
+
`);return n===-1?0:wu(e.slice(n+1).match(/^[\t ]*/u)[0],t)}var c8=u8;function f8(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function h8(e,t){let n=e.match(new RegExp(`(${f8(t)})+`,"gu"));return n===null?0:n.reduce((r,s)=>Math.max(r,s.length/t.length),0)}var d8=h8;function m8(e,t){let n=Pu(e,t);return n===!1?"":e.charAt(n)}var p8=m8,Ea="'",Cp='"';function g8(e,t){let n=t===!0||t===Ea?Ea:Cp,r=n===Ea?Cp:Ea,s=0,i=0;for(let a of e)a===n?s++:a===r&&i++;return s>i?r:n}var y8=g8;function b8(e,t,n){for(let r=t;r<n;++r)if(e.charAt(r)===`
|
|
356
|
+
`)return!0;return!1}var w8=b8;function v8(e,t,n={}){return Rn(e,n.backwards?t-1:t,n)!==t}var D8=v8;function S8(e,t,n){let r=t==='"'?"'":'"',s=fa(!1,e,/\\(.)|(["'])/gsu,(i,a,o)=>a===r?a:o===t?"\\"+o:o||(n&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/u.test(a)?a:"\\"+a));return t+s+t}var E8=S8;function A8(e,t,n){return Pu(e,n(t))}function x8(e,t){return arguments.length===2||typeof t=="number"?Pu(e,t):A8(...arguments)}function N8(e,t,n){return Lu(e,n(t))}function L8(e,t){return arguments.length===2||typeof t=="number"?Lu(e,t):N8(...arguments)}function k8(e,t,n){return Iu(e,n(t))}function C8(e,t){return arguments.length===2||typeof t=="number"?Iu(e,t):k8(...arguments)}function hr(e,t=1){return async(...n)=>{let r=n[t]??{},s=r.plugins??[];return n[t]={...r,plugins:Array.isArray(s)?s:Object.values(s)},e(...n)}}var Fp=hr(Np);async function $u(e,t){let{formatted:n}=await Fp(e,{...t,cursorOffset:-1});return n}async function F8(e,t){return await $u(e,t)===e}var _8=hr(Bm,0),T8={parse:hr(Q7),formatAST:hr(K7),formatDoc:hr(X7),printToDoc:hr(Z7),printDocToString:hr(e8)};function _p(e,t){if(e.length<t.length)return!1;for(var n=0;n<t.length;n++)if(e[n]!==t[n])return!1;return!0}function Bu(e,t){var n=e.length-t.length;return n>0?e.lastIndexOf(t)===n:n===0?e===t:!1}function M8(e){return _p(e,"(?i)")?new RegExp(e.substring(4),"i"):new RegExp(e)}function fs(e){return typeof e=="boolean"}var lt;(function(e){e[e.Undefined=0]="Undefined",e[e.EnumValueMismatch=1]="EnumValueMismatch",e[e.Deprecated=2]="Deprecated",e[e.UnexpectedEndOfComment=257]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=258]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=259]="UnexpectedEndOfNumber",e[e.InvalidUnicode=260]="InvalidUnicode",e[e.InvalidEscapeCharacter=261]="InvalidEscapeCharacter",e[e.InvalidCharacter=262]="InvalidCharacter",e[e.PropertyExpected=513]="PropertyExpected",e[e.CommaExpected=514]="CommaExpected",e[e.ColonExpected=515]="ColonExpected",e[e.ValueExpected=516]="ValueExpected",e[e.CommaOrCloseBacketExpected=517]="CommaOrCloseBacketExpected",e[e.CommaOrCloseBraceExpected=518]="CommaOrCloseBraceExpected",e[e.TrailingComma=519]="TrailingComma",e[e.DuplicateKey=520]="DuplicateKey",e[e.CommentNotPermitted=521]="CommentNotPermitted",e[e.SchemaResolveError=768]="SchemaResolveError"})(lt||(lt={}));var Tp;(function(e){e.LATEST={textDocument:{completion:{completionItem:{documentationFormat:[un.Markdown,un.PlainText],commitCharactersSupport:!0}}}}})(Tp||(Tp={}));var O8=(e,t,...n)=>n.length===0?t:t.replaceAll(/{(\d+)}/g,(r,[s])=>s in n?String(n[s]):r);function hs(){return O8}var dr=(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,s){r.__proto__=s}||function(r,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(r[i]=s[i])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),ii=hs();ii("colorHexFormatWarning","Invalid color format. Use #RGB, #RGBA, #RRGGBB or #RRGGBBAA."),ii("dateTimeFormatWarning","String is not a RFC3339 date-time."),ii("dateFormatWarning","String is not a RFC3339 date."),ii("timeFormatWarning","String is not a RFC3339 time."),ii("emailFormatWarning","String is not an e-mail address.");var mr=(function(){function e(t,n,r){r===void 0&&(r=0),this.offset=n,this.length=r,this.parent=t}return Object.defineProperty(e.prototype,"children",{get:function(){return[]},enumerable:!1,configurable:!0}),e.prototype.toString=function(){return"type: "+this.type+" ("+this.offset+"/"+this.length+")"+(this.parent?" parent: {"+this.parent.toString()+"}":"")},e})();(function(e){dr(t,e);function t(n,r){var s=e.call(this,n,r)||this;return s.type="null",s.value=null,s}return t})(mr),(function(e){dr(t,e);function t(n,r,s){var i=e.call(this,n,s)||this;return i.type="boolean",i.value=r,i}return t})(mr),(function(e){dr(t,e);function t(n,r){var s=e.call(this,n,r)||this;return s.type="array",s.items=[],s}return Object.defineProperty(t.prototype,"children",{get:function(){return this.items},enumerable:!1,configurable:!0}),t})(mr),(function(e){dr(t,e);function t(n,r){var s=e.call(this,n,r)||this;return s.type="number",s.isInteger=!0,s.value=Number.NaN,s}return t})(mr),(function(e){dr(t,e);function t(n,r,s){var i=e.call(this,n,r,s)||this;return i.type="string",i.value="",i}return t})(mr),(function(e){dr(t,e);function t(n,r,s){var i=e.call(this,n,r)||this;return i.type="property",i.colonOffset=-1,i.keyNode=s,i}return Object.defineProperty(t.prototype,"children",{get:function(){return this.valueNode?[this.keyNode,this.valueNode]:[this.keyNode]},enumerable:!1,configurable:!0}),t})(mr),(function(e){dr(t,e);function t(n,r){var s=e.call(this,n,r)||this;return s.type="object",s.properties=[],s}return Object.defineProperty(t.prototype,"children",{get:function(){return this.properties},enumerable:!1,configurable:!0}),t})(mr);function R8(e){return fs(e)?e?{}:{not:{}}:e}var Mp;(function(e){e[e.Key=0]="Key",e[e.Enum=1]="Enum"})(Mp||(Mp={})),(function(){function e(){}return Object.defineProperty(e.prototype,"schemas",{get:function(){return[]},enumerable:!1,configurable:!0}),e.prototype.add=function(t){},e.prototype.merge=function(t){},e.prototype.include=function(t){return!0},e.prototype.newSub=function(){return this},e.instance=new e,e})();function Aa(e){return p2(e)}function P8(e,t){if(typeof e!="string")throw new TypeError("Expected a string");for(var n=String(e),r="",s=!!t,i=!!t,a=!1,o=t&&typeof t.flags=="string"?t.flags:"",l,u=0,c=n.length;u<c;u++)switch(l=n[u],l){case"/":case"$":case"^":case"+":case".":case"(":case")":case"=":case"!":case"|":r+="\\"+l;break;case"?":if(s){r+=".";break}case"[":case"]":if(s){r+=l;break}case"{":if(s){a=!0,r+="(";break}case"}":if(s){a=!1,r+=")";break}case",":if(a){r+="|";break}r+="\\"+l;break;case"*":for(var f=n[u-1],d=1;n[u+1]==="*";)d++,u++;var y=n[u+1];if(!i)r+=".*";else{var D=d>1&&(f==="/"||f===void 0||f==="{"||f===",")&&(y==="/"||y===void 0||y===","||y==="}");D?(y==="/"?u++:f==="/"&&r.endsWith("\\/")&&(r=r.substr(0,r.length-2)),r+="((?:[^/]*(?:/|$))*)"):r+="([^/]*)"}break;default:r+=l}return(!o||!~o.indexOf("g"))&&(r="^"+r+"$"),new RegExp(r,o)}var $n=hs(),I8="!",$8="/",B8=(function(){function e(t,n){this.globWrappers=[];try{for(var r=0,s=t;r<s.length;r++){var i=s[r],a=i[0]!==I8;a||(i=i.substring(1)),i.length>0&&(i[0]===$8&&(i=i.substring(1)),this.globWrappers.push({regexp:P8("**/"+i,{extended:!0,globstar:!0}),include:a}))}this.uris=n}catch{this.globWrappers.length=0,this.uris=[]}}return e.prototype.matchesPattern=function(t){for(var n=!1,r=0,s=this.globWrappers;r<s.length;r++){var i=s[r],a=i.regexp,o=i.include;a.test(t)&&(n=o)}return n},e.prototype.getURIs=function(){return this.uris},e})(),V8=(function(){function e(t,n,r){this.service=t,this.url=n,this.dependencies={},r&&(this.unresolvedSchema=this.service.promise.resolve(new Bt(r)))}return e.prototype.getUnresolvedSchema=function(){return this.unresolvedSchema||(this.unresolvedSchema=this.service.loadSchema(this.url)),this.unresolvedSchema},e.prototype.getResolvedSchema=function(){var t=this;return this.resolvedSchema||(this.resolvedSchema=this.getUnresolvedSchema().then(function(n){return t.service.resolveSchemaContent(n,t.url,t.dependencies)})),this.resolvedSchema},e.prototype.clearSchema=function(){this.resolvedSchema=void 0,this.unresolvedSchema=void 0,this.dependencies={}},e})(),Bt=(function(){function e(t,n){n===void 0&&(n=[]),this.schema=t,this.errors=n}return e})(),ai=(function(){function e(t,n){n===void 0&&(n=[]),this.schema=t,this.errors=n}return e.prototype.getSection=function(t){var n=this.getSectionRecursive(t,this.schema);if(n)return R8(n)},e.prototype.getSectionRecursive=function(t,n){if(!n||typeof n=="boolean"||t.length===0)return n;var r=t.shift();if(n.properties&&typeof n.properties[r])return this.getSectionRecursive(t,n.properties[r]);if(n.patternProperties)for(var s=0,i=Object.keys(n.patternProperties);s<i.length;s++){var a=i[s],o=M8(a);if(o.test(r))return this.getSectionRecursive(t,n.patternProperties[a])}else{if(typeof n.additionalProperties=="object")return this.getSectionRecursive(t,n.additionalProperties);if(r.match("[0-9]+")){if(Array.isArray(n.items)){var l=parseInt(r,10);if(!isNaN(l)&&n.items[l])return this.getSectionRecursive(t,n.items[l])}else if(n.items)return this.getSectionRecursive(t,n.items)}}},e})(),j8=(function(){function e(t,n,r){this.contextService=n,this.requestService=t,this.promiseConstructor=r||Promise,this.callOnDispose=[],this.contributionSchemas={},this.contributionAssociations=[],this.schemasById={},this.filePatternAssociations=[],this.registeredSchemasIds={}}return e.prototype.getRegisteredSchemaIds=function(t){return Object.keys(this.registeredSchemasIds).filter(function(n){var r=mt.parse(n).scheme;return r!=="schemaservice"&&(!t||t(r))})},Object.defineProperty(e.prototype,"promise",{get:function(){return this.promiseConstructor},enumerable:!1,configurable:!0}),e.prototype.dispose=function(){for(;this.callOnDispose.length>0;)this.callOnDispose.pop()()},e.prototype.onResourceChange=function(t){var n=this;this.cachedSchemaForResource=void 0;var r=!1;t=Bn(t);for(var s=[t],i=Object.keys(this.schemasById).map(function(u){return n.schemasById[u]});s.length;)for(var a=s.pop(),o=0;o<i.length;o++){var l=i[o];l&&(l.url===a||l.dependencies[a])&&(l.url!==a&&s.push(l.url),l.clearSchema(),i[o]=void 0,r=!0)}return r},e.prototype.setSchemaContributions=function(t){if(t.schemas){var n=t.schemas;for(var r in n){var s=Bn(r);this.contributionSchemas[s]=this.addSchemaHandle(s,n[r])}}if(Array.isArray(t.schemaAssociations))for(var i=t.schemaAssociations,a=0,o=i;a<o.length;a++){var l=o[a],u=l.uris.map(Bn),c=this.addFilePatternAssociation(l.pattern,u);this.contributionAssociations.push(c)}},e.prototype.addSchemaHandle=function(t,n){var r=new V8(this,t,n);return this.schemasById[t]=r,r},e.prototype.getOrAddSchemaHandle=function(t,n){return this.schemasById[t]||this.addSchemaHandle(t,n)},e.prototype.addFilePatternAssociation=function(t,n){var r=new B8(t,n);return this.filePatternAssociations.push(r),r},e.prototype.registerExternalSchema=function(t,n,r){var s=Bn(t);return this.registeredSchemasIds[s]=!0,this.cachedSchemaForResource=void 0,n&&this.addFilePatternAssociation(n,[t]),r?this.addSchemaHandle(s,r):this.getOrAddSchemaHandle(s)},e.prototype.clearExternalSchemas=function(){this.schemasById={},this.filePatternAssociations=[],this.registeredSchemasIds={},this.cachedSchemaForResource=void 0;for(var t in this.contributionSchemas)this.schemasById[t]=this.contributionSchemas[t],this.registeredSchemasIds[t]=!0;for(var n=0,r=this.contributionAssociations;n<r.length;n++){var s=r[n];this.filePatternAssociations.push(s)}},e.prototype.getResolvedSchema=function(t){var n=Bn(t),r=this.schemasById[n];return r?r.getResolvedSchema():this.promise.resolve(void 0)},e.prototype.loadSchema=function(t){if(!this.requestService){var n=$n("json.schema.norequestservice","Unable to load schema from '{0}'. No schema request service available",xa(t));return this.promise.resolve(new Bt({},[n]))}return this.requestService(t).then(function(r){if(!r){var s=$n("json.schema.nocontent","Unable to load schema from '{0}': No content.",xa(t));return new Bt({},[s])}var i={},a=[];i=m2(r,a);var o=a.length?[$n("json.schema.invalidFormat","Unable to parse content from '{0}': Parse error at offset {1}.",xa(t),a[0].offset)]:[];return new Bt(i,o)},function(r){var s=r.toString(),i=r.toString().split("Error: ");return i.length>1&&(s=i[1]),Bu(s,".")&&(s=s.substr(0,s.length-1)),new Bt({},[$n("json.schema.nocontent","Unable to load schema from '{0}': {1}.",xa(t),s)])})},e.prototype.resolveSchemaContent=function(t,n,r){var s=this,i=t.errors.slice(0),a=t.schema;if(a.$schema){var o=Bn(a.$schema);if(o==="http://json-schema.org/draft-03/schema")return this.promise.resolve(new ai({},[$n("json.schema.draft03.notsupported","Draft-03 schemas are not supported.")]));o==="https://json-schema.org/draft/2019-09/schema"&&i.push($n("json.schema.draft201909.notsupported","Draft 2019-09 schemas are not yet fully supported."))}var l=this.contextService,u=function(y,D){if(!D)return y;var S=y;return D[0]==="/"&&(D=D.substr(1)),D.split("/").some(function(N){return N=N.replace(/~1/g,"/").replace(/~0/g,"~"),S=S[N],!S}),S},c=function(y,D,S,N){var x=N?decodeURIComponent(N):void 0,k=u(D,x);if(k)for(var b in k)k.hasOwnProperty(b)&&!y.hasOwnProperty(b)&&(y[b]=k[b]);else i.push($n("json.schema.invalidref","$ref '{0}' in '{1}' can not be resolved.",x,S))},f=function(y,D,S,N,x){l&&!/^[A-Za-z][A-Za-z0-9+\-.+]*:\/\/.*/.test(D)&&(D=l.resolveRelativePath(D,N)),D=Bn(D);var k=s.getOrAddSchemaHandle(D);return k.getUnresolvedSchema().then(function(b){if(x[D]=!0,b.errors.length){var w=S?D+"#"+S:D;i.push($n("json.schema.problemloadingref","Problems loading reference '{0}': {1}",w,b.errors[0]))}return c(y,b.schema,D,S),d(y,b.schema,D,k.dependencies)})},d=function(y,D,S,N){if(!y||typeof y!="object")return Promise.resolve(null);for(var x=[y],k=[],b=[],w=function(){for(var v=[],L=0;L<arguments.length;L++)v[L]=arguments[L];for(var C=0,A=v;C<A.length;C++){var F=A[C];typeof F=="object"&&x.push(F)}},h=function(){for(var v=[],L=0;L<arguments.length;L++)v[L]=arguments[L];for(var C=0,A=v;C<A.length;C++){var F=A[C];if(typeof F=="object")for(var M in F){var T=M,P=F[T];typeof P=="object"&&x.push(P)}}},g=function(){for(var v=[],L=0;L<arguments.length;L++)v[L]=arguments[L];for(var C=0,A=v;C<A.length;C++){var F=A[C];if(Array.isArray(F))for(var M=0,T=F;M<T.length;M++){var P=T[M];typeof P=="object"&&x.push(P)}}},m=function(v){for(var L=[];v.$ref;){var C=v.$ref,A=C.split("#",2);if(delete v.$ref,A[0].length>0){b.push(f(v,A[0],A[1],S,N));return}else L.indexOf(C)===-1&&(c(v,D,S,A[1]),L.push(C))}w(v.items,v.additionalItems,v.additionalProperties,v.not,v.contains,v.propertyNames,v.if,v.then,v.else),h(v.definitions,v.properties,v.patternProperties,v.dependencies),g(v.anyOf,v.allOf,v.oneOf,v.items)};x.length;){var E=x.pop();k.indexOf(E)>=0||(k.push(E),m(E))}return s.promise.all(b)};return d(a,a,n,r).then(function(y){return new ai(a,i)})},e.prototype.getSchemaForResource=function(t,n){if(n&&n.root&&n.root.type==="object"){var r=n.root.properties.filter(function(x){return x.keyNode.value==="$schema"&&x.valueNode&&x.valueNode.type==="string"});if(r.length>0){var s=r[0].valueNode;if(s&&s.type==="string"){var i=Aa(s);if(i&&_p(i,".")&&this.contextService&&(i=this.contextService.resolveRelativePath(i,t)),i){var a=Bn(i);return this.getOrAddSchemaHandle(a).getResolvedSchema()}}}}if(this.cachedSchemaForResource&&this.cachedSchemaForResource.resource===t)return this.cachedSchemaForResource.resolvedSchema;for(var o=Object.create(null),l=[],u=q8(t),c=0,f=this.filePatternAssociations;c<f.length;c++){var d=f[c];if(d.matchesPattern(u))for(var y=0,D=d.getURIs();y<D.length;y++){var S=D[y];o[S]||(l.push(S),o[S]=!0)}}var N=l.length>0?this.createCombinedSchema(t,l).getResolvedSchema():this.promise.resolve(void 0);return this.cachedSchemaForResource={resource:t,resolvedSchema:N},N},e.prototype.createCombinedSchema=function(t,n){if(n.length===1)return this.getOrAddSchemaHandle(n[0]);var r="schemaservice://combinedSchema/"+encodeURIComponent(t),s={allOf:n.map(function(i){return{$ref:i}})};return this.addSchemaHandle(r,s)},e.prototype.getMatchingSchemas=function(t,n,r){if(r){var s=r.id||"schemaservice://untitled/matchingSchemas/"+U8++;return this.resolveSchemaContent(new Bt(r),s,{}).then(function(i){return n.getMatchingSchemas(i.schema).filter(function(a){return!a.inverted})})}return this.getSchemaForResource(t.uri,n).then(function(i){return i?n.getMatchingSchemas(i.schema).filter(function(a){return!a.inverted}):[]})},e})(),U8=0;function Bn(e){try{return mt.parse(e).toString()}catch{return e}}function q8(e){try{return mt.parse(e).with({fragment:null,query:null}).toString()}catch{return e}}function xa(e){try{var t=mt.parse(e);if(t.scheme==="file")return t.fsPath}catch{}return e}function W8(e){return e.replace(/[-\\{}+?|^$.,[\]()#\s]/g,"\\$&").replace(/[*]/g,".*")}function H8(e,t){if(e.length<t)return 0;for(let n=0;n<t;n++){const r=e.charCodeAt(n);if(r!==32&&r!==9)return n}return t}function Op(e){try{return new RegExp(e,"u")}catch{return new RegExp(e)}}function Y8(e,t){t++;for(let n=t;n<e.length;n++){const r=e.charAt(n);if(r===" "||r===" ")t++;else return t}return t}function Na(e,t){if(e===t)return!0;if(e==null||t===null||t===void 0||typeof e!=typeof t||typeof e!="object"||Array.isArray(e)!==Array.isArray(t))return!1;let n,r;if(Array.isArray(e)){if(e.length!==t.length)return!1;for(n=0;n<e.length;n++)if(!Na(e[n],t[n]))return!1}else{const s=[];for(r in e)s.push(r);s.sort();const i=[];for(r in t)i.push(r);if(i.sort(),!Na(s,i))return!1;for(n=0;n<s.length;n++)if(!Na(e[s[n]],t[s[n]]))return!1}return!0}function Tt(e){return typeof e=="number"}function pr(e){return typeof e<"u"}function ds(e){return typeof e=="boolean"}function La(e){return typeof e=="string"}function z8(e){return Symbol.iterator in Object(e)}function Vu(e){const t=e.type&&e.closestTitle;return e.title?e.title:e.$id?Rp(e.$id):e.$ref||e._$ref?Rp(e.$ref||e._$ref):Array.isArray(e.type)?e.type.join(" | "):t?e.type.concat("(",e.closestTitle,")"):e.type||e.closestTitle}function Rp(e){const t=e.match(/^(?:.*\/)?(.*?)(?:\.schema\.json)?$/);let n=!!t&&t[1];return n||(n="typeNotFound",console.error(`$ref (${e}) not parsed properly`)),n}function Pp(e,t){const n=mt.parse(t);let r=er.basename(n.fsPath);return er.extname(n.fsPath)||(r+=".json"),Object.getOwnPropertyDescriptor(e,"name")?Object.getOwnPropertyDescriptor(e,"name").value+` (${r})`:e.title?e.description?e.title+" - "+e.description+` (${r})`:e.title+` (${r})`:r}function G8(e){return e.type!=="object"&&!ju(e)}function ju(e){return!!(e.anyOf||e.allOf||e.oneOf)}var J8=hs(),Q8=(function(){function e(t,n){this.jsonSchemaService=t,this.promise=n,this.validationEnabled=!0}return e.prototype.configure=function(t){t&&(this.validationEnabled=t.validate!==!1,this.commentSeverity=t.allowComments?void 0:ce.Error)},e.prototype.doValidation=function(t,n,r,s){var i=this;if(!this.validationEnabled)return this.promise.resolve([]);var a=[],o={},l=function(f){var d=f.range.start.line+" "+f.range.start.character+" "+f.message;o[d]||(o[d]=!0,a.push(f))},u=function(f){var d=r!=null&&r.trailingCommas?ka(r.trailingCommas):ce.Error,y=r!=null&&r.comments?ka(r.comments):i.commentSeverity,D=r!=null&&r.schemaValidation?ka(r.schemaValidation):ce.Warning,S=r!=null&&r.schemaRequest?ka(r.schemaRequest):ce.Warning;if(f){if(f.errors.length&&n.root&&S){var N=n.root,x=N.type==="object"?N.properties[0]:void 0;if(x&&x.keyNode.value==="$schema"){var k=x.valueNode||x,b=ie.create(t.positionAt(k.offset),t.positionAt(k.offset+k.length));l(pt.create(b,f.errors[0],S,lt.SchemaResolveError))}else{var b=ie.create(t.positionAt(N.offset),t.positionAt(N.offset+1));l(pt.create(b,f.errors[0],S,lt.SchemaResolveError))}}else if(D){var w=n.validate(t,f.schema,D);w&&w.forEach(l)}Ip(f.schema)&&(y=void 0),$p(f.schema)&&(d=void 0)}for(var h=0,g=n.syntaxErrors;h<g.length;h++){var m=g[h];if(m.code===lt.TrailingComma){if(typeof d!="number")continue;m.severity=d}l(m)}if(typeof y=="number"){var E=J8("InvalidCommentToken","Comments are not permitted in JSON.");n.comments.forEach(function(v){l(pt.create(v,E,y,lt.CommentNotPermitted))})}return a};if(s){var c=s.id||"schemaservice://untitled/"+K8++;return this.jsonSchemaService.resolveSchemaContent(new Bt(s),c,{}).then(function(f){return u(f)})}return this.jsonSchemaService.getSchemaForResource(t.uri,n).then(function(f){return u(f)})},e})(),K8=0;function Ip(e){if(e&&typeof e=="object"){if(fs(e.allowComments))return e.allowComments;if(e.allOf)for(var t=0,n=e.allOf;t<n.length;t++){var r=n[t],s=Ip(r);if(fs(s))return s}}}function $p(e){if(e&&typeof e=="object"){if(fs(e.allowTrailingCommas))return e.allowTrailingCommas;var t=e;if(fs(t.allowsTrailingCommas))return t.allowsTrailingCommas;if(e.allOf)for(var n=0,r=e.allOf;n<r.length;n++){var s=r[n],i=$p(s);if(fs(i))return i}}}function ka(e){switch(e){case"error":return ce.Error;case"warning":return ce.Warning;case"ignore":return}}var Bp=48,X8=57,Z8=65,Ca=97,e5=102;function Ve(e){return e<Bp?0:e<=X8?e-Bp:(e<Ca&&(e+=Ca-Z8),e>=Ca&&e<=e5?e-Ca+10:0)}function t5(e){if(e[0]==="#")switch(e.length){case 4:return{red:Ve(e.charCodeAt(1))*17/255,green:Ve(e.charCodeAt(2))*17/255,blue:Ve(e.charCodeAt(3))*17/255,alpha:1};case 5:return{red:Ve(e.charCodeAt(1))*17/255,green:Ve(e.charCodeAt(2))*17/255,blue:Ve(e.charCodeAt(3))*17/255,alpha:Ve(e.charCodeAt(4))*17/255};case 7:return{red:(Ve(e.charCodeAt(1))*16+Ve(e.charCodeAt(2)))/255,green:(Ve(e.charCodeAt(3))*16+Ve(e.charCodeAt(4)))/255,blue:(Ve(e.charCodeAt(5))*16+Ve(e.charCodeAt(6)))/255,alpha:1};case 9:return{red:(Ve(e.charCodeAt(1))*16+Ve(e.charCodeAt(2)))/255,green:(Ve(e.charCodeAt(3))*16+Ve(e.charCodeAt(4)))/255,blue:(Ve(e.charCodeAt(5))*16+Ve(e.charCodeAt(6)))/255,alpha:(Ve(e.charCodeAt(7))*16+Ve(e.charCodeAt(8)))/255}}}var n5=(function(){function e(t){this.schemaService=t}return e.prototype.findDocumentSymbols=function(t,n,r){var s=this;r===void 0&&(r={resultLimit:Number.MAX_VALUE});var i=n.root;if(!i)return[];var a=r.resultLimit||Number.MAX_VALUE,o=t.uri;if((o==="vscode://defaultsettings/keybindings.json"||Bu(o.toLowerCase(),"/user/keybindings.json"))&&i.type==="array"){for(var l=[],u=0,c=i.items;u<c.length;u++){var f=c[u];if(f.type==="object")for(var d=0,y=f.properties;d<y.length;d++){var D=y[d];if(D.keyNode.value==="key"&&D.valueNode){var S=Br.create(t.uri,Vn(t,f));if(l.push({name:Aa(D.valueNode),kind:Ht.Function,location:S}),a--,a<=0)return r&&r.onResultLimitExceeded&&r.onResultLimitExceeded(o),l}}}return l}for(var N=[{node:i,containerName:""}],x=0,k=!1,b=[],w=function(g,m){g.type==="array"?g.items.forEach(function(E){E&&N.push({node:E,containerName:m})}):g.type==="object"&&g.properties.forEach(function(E){var v=E.valueNode;if(v)if(a>0){a--;var L=Br.create(t.uri,Vn(t,E)),C=m?m+"."+E.keyNode.value:E.keyNode.value;b.push({name:s.getKeyLabel(E),kind:s.getSymbolKind(v.type),location:L,containerName:m}),N.push({node:v,containerName:C})}else k=!0})};x<N.length;){var h=N[x++];w(h.node,h.containerName)}return k&&r&&r.onResultLimitExceeded&&r.onResultLimitExceeded(o),b},e.prototype.findDocumentSymbols2=function(t,n,r){var s=this;r===void 0&&(r={resultLimit:Number.MAX_VALUE});var i=n.root;if(!i)return[];var a=r.resultLimit||Number.MAX_VALUE,o=t.uri;if((o==="vscode://defaultsettings/keybindings.json"||Bu(o.toLowerCase(),"/user/keybindings.json"))&&i.type==="array"){for(var l=[],u=0,c=i.items;u<c.length;u++){var f=c[u];if(f.type==="object")for(var d=0,y=f.properties;d<y.length;d++){var D=y[d];if(D.keyNode.value==="key"&&D.valueNode){var S=Vn(t,f),N=Vn(t,D.keyNode);if(l.push({name:Aa(D.valueNode),kind:Ht.Function,range:S,selectionRange:N}),a--,a<=0)return r&&r.onResultLimitExceeded&&r.onResultLimitExceeded(o),l}}}return l}for(var x=[],k=[{node:i,result:x}],b=0,w=!1,h=function(m,E){m.type==="array"?m.items.forEach(function(v,L){if(v)if(a>0){a--;var C=Vn(t,v),A=C,F=String(L),M={name:F,kind:s.getSymbolKind(v.type),range:C,selectionRange:A,children:[]};E.push(M),k.push({result:M.children,node:v})}else w=!0}):m.type==="object"&&m.properties.forEach(function(v){var L=v.valueNode;if(L)if(a>0){a--;var C=Vn(t,v),A=Vn(t,v.keyNode),F=[],M={name:s.getKeyLabel(v),kind:s.getSymbolKind(L.type),range:C,selectionRange:A,children:F,detail:s.getDetail(L)};E.push(M),k.push({result:F,node:L})}else w=!0})};b<k.length;){var g=k[b++];h(g.node,g.result)}return w&&r&&r.onResultLimitExceeded&&r.onResultLimitExceeded(o),x},e.prototype.getSymbolKind=function(t){switch(t){case"object":return Ht.Module;case"string":return Ht.String;case"number":return Ht.Number;case"array":return Ht.Array;case"boolean":return Ht.Boolean;default:return Ht.Variable}},e.prototype.getKeyLabel=function(t){var n=t.keyNode.value;return n&&(n=n.replace(/[\n]/g,"↵")),n&&n.trim()?n:'"'+n+'"'},e.prototype.getDetail=function(t){if(t){if(t.type==="boolean"||t.type==="number"||t.type==="null"||t.type==="string")return String(t.value);if(t.type==="array")return t.children.length?void 0:"[]";if(t.type==="object")return t.children.length?void 0:"{}"}},e.prototype.findDocumentColors=function(t,n,r){return this.schemaService.getSchemaForResource(t.uri,n).then(function(s){var i=[];if(s)for(var a=r&&typeof r.resultLimit=="number"?r.resultLimit:Number.MAX_VALUE,o=n.getMatchingSchemas(s.schema),l={},u=0,c=o;u<c.length;u++){var f=c[u];if(!f.inverted&&f.schema&&(f.schema.format==="color"||f.schema.format==="color-hex")&&f.node&&f.node.type==="string"){var d=String(f.node.offset);if(!l[d]){var y=t5(Aa(f.node));if(y){var D=Vn(t,f.node);i.push({color:y,range:D})}if(l[d]=!0,a--,a<=0)return r&&r.onResultLimitExceeded&&r.onResultLimitExceeded(t.uri),i}}}return i})},e.prototype.getColorPresentations=function(t,n,r,s){var i=[],a=Math.round(r.red*255),o=Math.round(r.green*255),l=Math.round(r.blue*255);function u(f){var d=f.toString(16);return d.length!==2?"0"+d:d}var c;return r.alpha===1?c="#"+u(a)+u(o)+u(l):c="#"+u(a)+u(o)+u(l)+u(Math.round(r.alpha*255)),i.push({label:c,textEdit:_e.replace(s,JSON.stringify(c))}),i},e})();function Vn(e,t){return ie.create(e.positionAt(t.offset),e.positionAt(t.offset+t.length))}function r5(e,t){var n=[];return t.visit(function(r){var s;if(r.type==="property"&&r.keyNode.value==="$ref"&&((s=r.valueNode)===null||s===void 0?void 0:s.type)==="string"){var i=r.valueNode.value,a=i5(t,i);if(a){var o=e.positionAt(a.offset);n.push({target:e.uri+"#"+(o.line+1)+","+(o.character+1),range:s5(e,r.valueNode)})}}return!0}),Promise.resolve(n)}function s5(e,t){return ie.create(e.positionAt(t.offset+1),e.positionAt(t.offset+t.length-1))}function i5(e,t){var n=a5(t);return n?Uu(n,e.root):null}function Uu(e,t){if(!t)return null;if(e.length===0)return t;var n=e.shift();if(t&&t.type==="object"){var r=t.properties.find(function(a){return a.keyNode.value===n});return r?Uu(e,r.valueNode):null}else if(t&&t.type==="array"&&n.match(/^(0|[1-9][0-9]*)$/)){var s=Number.parseInt(n),i=t.items[s];return i?Uu(e,i):null}return null}function a5(e){return e==="#"?[]:e[0]!=="#"||e[1]!=="/"?null:e.substring(2).split(/\//).map(o5)}function o5(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function Fa(e,t){for(const n of t.documents)if(n.internalDocument&&n.internalDocument.range[0]<=e&&n.internalDocument.range[2]>=e)return n;return t.documents.length===1?t.documents[0]:null}function Vp(e){const t=["mapping","scalar","sequence"];return e?e.filter(n=>{if(typeof n=="string"){const r=n.split(" "),s=r[1]&&r[1].toLowerCase()||"scalar";return s==="map"?!1:t.indexOf(s)!==-1}return!1}):[]}function jp(e,t){if(!t||!e||t.length!==e.length)return!1;for(let n=e.length-1;n>=0;n--)if(e[n]!==t[n])return!1;return!0}function l5(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,s=Math.max(n,r),i=parseInt(e.toFixed(s).replace(".","")),a=parseInt(t.toFixed(s).replace(".",""));return i%a/Math.pow(10,s)}var pe=hs(),qu="Property {0} is not allowed.",u5={"color-hex":{errorMessage:pe("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:pe("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:pe("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:pe("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:pe("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:pe("ipv4FormatWarning","String does not match IPv4 format."),pattern:/^((25[0-5]|(2[0-4]|1\d|[1-9]|)\d)\.?\b){4}$/},ipv6:{errorMessage:pe("ipv6FormatWarning","String does not match IPv6 format."),pattern:/^([0-9a-f]|:){1,4}(:([0-9a-f]{0,4})*){1,7}$/i}},_a="YAML",Up="yaml-schema: ",et;(function(e){e.missingRequiredPropWarning="missingRequiredPropWarning",e.typeMismatchWarning="typeMismatchWarning",e.constWarning="constWarning"})(et||(et={}));var c5={[et.missingRequiredPropWarning]:'Missing property "{0}".',[et.typeMismatchWarning]:'Incorrect type. Expected "{0}".',[et.constWarning]:"Value must be {0}."},gr=class{constructor(e,t,n,r){this.offset=n,this.length=r,this.parent=e,this.internalNode=t}getNodeFromOffsetEndInclusive(e){const t=[],n=a=>{if(e>=a.offset&&e<=a.offset+a.length){const o=a.children;for(let l=0;l<o.length&&o[l].offset<=e;l++){const u=n(o[l]);u&&t.push(u)}return a}return null},r=n(this);let s=Number.MAX_VALUE,i=null;for(const a of t){const o=a.length+a.offset-e+(e-a.offset);o<s&&(i=a,s=o)}return i||r}get children(){return[]}toString(){return"type: "+this.type+" ("+this.offset+"/"+this.length+")"+(this.parent?" parent: {"+this.parent.toString()+"}":"")}},f5=class extends gr{constructor(e,t,n,r){super(e,t,n,r),this.type="null",this.value=null}},h5=class extends gr{constructor(e,t,n,r,s,i){super(e,t,s,i),this.type="boolean",this.value=n,this.source=r}},d5=class extends gr{constructor(e,t,n,r){super(e,t,n,r),this.type="array",this.items=[]}get children(){return this.items}},m5=class extends gr{constructor(e,t,n,r){super(e,t,n,r),this.type="number",this.isInteger=!0,this.value=Number.NaN}},Ta=class extends gr{constructor(e,t,n,r){super(e,t,n,r),this.type="string",this.value=""}},p5=class extends gr{constructor(e,t,n,r){super(e,t,n,r),this.type="property",this.colonOffset=-1}get children(){return this.valueNode?[this.keyNode,this.valueNode]:[this.keyNode]}},g5=class extends gr{constructor(e,t,n,r){super(e,t,n,r),this.type="object",this.properties=[]}get children(){return this.properties}};function tt(e){if(e!==void 0)return ds(e)?e?{}:{not:{}}:(typeof e!="object"&&(console.warn(`Wrong schema: ${JSON.stringify(e)}, it MUST be an Object or Boolean`),e={type:e}),e)}var qp;(function(e){e[e.Key=0]="Key",e[e.Enum=1]="Enum"})(qp||(qp={}));var y5=class Dg{constructor(t=-1,n=null){this.focusOffset=t,this.exclude=n,this.schemas=[]}add(t){this.schemas.push(t)}merge(t){this.schemas.push(...t.schemas)}include(t){return(this.focusOffset===-1||Wp(t,this.focusOffset))&&t!==this.exclude}newSub(){return new Dg(-1,this.exclude)}},oi=class{constructor(){}get schemas(){return[]}add(e){}merge(e){}include(e){return!0}newSub(){return this}};oi.instance=new oi;var ut=class{constructor(e){this.problems=[],this.propertiesMatches=0,this.propertiesValueMatches=0,this.primaryValueMatches=0,this.enumValueMatch=!1,e?this.enumValues=[]:this.enumValues=null}hasProblems(){return!!this.problems.length}mergeAll(e){for(const t of e)this.merge(t)}merge(e){this.problems=this.problems.concat(e.problems)}mergeEnumValues(e){if(!this.enumValueMatch&&!e.enumValueMatch&&this.enumValues&&e.enumValues){this.enumValues=this.enumValues.concat(e.enumValues);for(const t of this.problems)t.code===lt.EnumValueMismatch&&(t.message=pe("enumWarning","Value is not accepted. Valid values: {0}.",[...new Set(this.enumValues)].map(n=>JSON.stringify(n)).join(", ")))}}mergeWarningGeneric(e,t){var n,r,s;if((n=this.problems)!=null&&n.length)for(const i of t){const a=this.problems.filter(o=>o.problemType===i);for(const o of a){const l=(r=e.problems)==null?void 0:r.find(u=>u.problemType===i&&o.location.offset===u.location.offset&&(i!==et.missingRequiredPropWarning||jp(u.problemArgs,o.problemArgs)));l&&((s=l.problemArgs)!=null&&s.length&&(l.problemArgs.filter(u=>!o.problemArgs.includes(u)).forEach(u=>o.problemArgs.push(u)),o.message=Ma(o.problemType,o.problemArgs)),this.mergeSources(l,o))}}}mergePropertyMatch(e){this.merge(e),this.propertiesMatches++,(e.enumValueMatch||!e.hasProblems()&&e.propertiesMatches)&&this.propertiesValueMatches++,e.enumValueMatch&&e.enumValues&&this.primaryValueMatches++}mergeSources(e,t){const n=e.source.replace(Up,"");t.source.includes(n)||(t.source=t.source+" | "+n),t.schemaUri.includes(e.schemaUri[0])||(t.schemaUri=t.schemaUri.concat(e.schemaUri))}compareGeneric(e){const t=this.hasProblems();return t!==e.hasProblems()?t?-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 t=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:t!==e.hasProblems()?t?-1:1:this.propertiesMatches-e.propertiesMatches}};function li(e){switch(e.type){case"array":return e.children.map(li);case"object":{const t=Object.create(null);for(let n=0,r=e.children;n<r.length;n++){const s=r[n],i=s.children[1];i&&(t[s.children[0].value]=li(i))}return t}case"null":case"string":case"number":return e.value;case"boolean":return e.source;default:return}}function Wp(e,t,n=!1){return t>=e.offset&&t<=e.offset+e.length||n&&t===e.offset+e.length}function Hp(e,t,n){if(n===void 0&&(n=!1),Wp(e,t,n)){const r=e.children;if(Array.isArray(r))for(let s=0;s<r.length&&r[s].offset<=t;s++){const i=Hp(r[s],t,n);if(i)return i}return e}}var b5=class{constructor(e,t=[],n=[]){this.root=e,this.syntaxErrors=t,this.comments=n}getNodeFromOffset(e,t=!1){if(this.root)return Hp(this.root,e,t)}getNodeFromOffsetEndInclusive(e){return this.root&&this.root.getNodeFromOffsetEndInclusive(e)}visit(e){if(this.root){const t=n=>{let r=e(n);const s=n.children;if(Array.isArray(s))for(let i=0;i<s.length&&r;i++)r=t(s[i]);return r};t(this.root)}}validate(e,t){if(this.root&&t){const n=new ut(this.isKubernetes);return Ye(this.root,t,t,n,oi.instance,{isKubernetes:this.isKubernetes,disableAdditionalProperties:this.disableAdditionalProperties,uri:this.uri}),n.problems.map(r=>{const s=ie.create(e.positionAt(r.location.offset),e.positionAt(r.location.offset+r.location.length)),i=pt.create(s,r.message,r.severity,r.code?r.code:lt.Undefined,r.source);return i.data={schemaUri:r.schemaUri,...r.data},i})}return null}getMatchingSchemas(e,t=-1,n=null,r){const s=new y5(t,n);return this.root&&e&&Ye(this.root,e,e,new ut(this.isKubernetes),s,{isKubernetes:this.isKubernetes,disableAdditionalProperties:this.disableAdditionalProperties,uri:this.uri,callFromAutoComplete:r}),s.schemas}};function Ye(e,t,n,r,s,i){const{isKubernetes:a,callFromAutoComplete:o}=i;if(!e||typeof t!="object")return;switch(t.url||(t.url=n.url),t.closestTitle=t.title||n.closestTitle,e.type){case"object":d(e,t,r,s);break;case"array":f(e,t,r,s);break;case"string":c(e,t,r);break;case"number":u(e,t,r);break;case"property":return Ye(e.valueNode,t,t,r,s,i)}l(),s.add({node:e,schema:t});function l(){function N(g){return e.type===g||g==="integer"&&e.type==="number"&&e.isInteger}if(Array.isArray(t.type))t.type.some(N)||r.problems.push({location:{offset:e.offset,length:e.length},severity:ce.Warning,message:t.errorMessage||pe("typeArrayMismatchWarning","Incorrect type. Expected one of {0}.",t.type.join(", ")),source:Ee(t,n),schemaUri:Ae(t,n)});else if(t.type&&!N(t.type)){const g=t.type==="object"?Vu(t):t.type;r.problems.push({location:{offset:e.offset,length:e.length},severity:ce.Warning,message:t.errorMessage||Ma(et.typeMismatchWarning,[g]),source:Ee(t,n),schemaUri:Ae(t,n),problemType:et.typeMismatchWarning,problemArgs:[g]})}if(Array.isArray(t.allOf))for(const g of t.allOf)Ye(e,tt(g),t,r,s,i);const x=tt(t.not);if(x){const g=new ut(a),m=s.newSub();Ye(e,x,t,g,m,i),g.hasProblems()||r.problems.push({location:{offset:e.offset,length:e.length},severity:ce.Warning,message:pe("notSchemaWarning","Matches a schema that is not allowed."),source:Ee(t,n),schemaUri:Ae(t,n)});for(const E of m.schemas)E.inverted=!E.inverted,s.add(E)}const k=(g,m)=>{var E;const v=[],L=[],C=[];let A=null;for(const F of g){const M={...tt(F)},T=new ut(a),P=s.newSub();Ye(e,M,t,T,P,i),(!T.hasProblems()||o)&&(v.push(M),L.push(M),T.propertiesMatches===0&&C.push(M),M.format&&L.pop()),A?a?A=y(T,A,M,P):A=D(e,m,T,A,M,P):A={schema:M,validationResult:T,matchingSchemas:P}}return L.length>1&&(L.length>1||C.length===0)&&m&&r.problems.push({location:{offset:e.offset,length:1},severity:ce.Warning,message:pe("oneOfWarning","Matches multiple schemas when only one must validate."),source:Ee(t,n),schemaUri:Ae(t,n)}),A!==null&&(r.merge(A.validationResult),r.propertiesMatches+=A.validationResult.propertiesMatches,r.propertiesValueMatches+=A.validationResult.propertiesValueMatches,r.enumValueMatch=r.enumValueMatch||A.validationResult.enumValueMatch,(E=A.validationResult.enumValues)!=null&&E.length&&(r.enumValues=(r.enumValues||[]).concat(A.validationResult.enumValues)),s.merge(A.matchingSchemas)),v.length};Array.isArray(t.anyOf)&&k(t.anyOf,!1),Array.isArray(t.oneOf)&&k(t.oneOf,!0);const b=(g,m)=>{const E=new ut(a),v=s.newSub();Ye(e,tt(g),m,E,v,i),r.merge(E),r.propertiesMatches+=E.propertiesMatches,r.propertiesValueMatches+=E.propertiesValueMatches,s.merge(v)},w=(g,m,E,v)=>{const L=tt(g),C=new ut(a),A=s.newSub();Ye(e,L,m,C,A,i),s.merge(A);const{filePatternAssociation:F}=L;F&&(new V5(F).matchesPattern(i.uri)||C.problems.push({location:{offset:e.offset,length:e.length},severity:ce.Warning,message:pe("ifFilePatternAssociation",`filePatternAssociation '${F}' does not match with doc uri '${i.uri}'.`),source:Ee(t,m),schemaUri:Ae(t,m)})),C.hasProblems()?v&&b(v,m):E&&b(E,m)},h=tt(t.if);if(h&&w(h,t,tt(t.then),tt(t.else)),Array.isArray(t.enum)){const g=li(e);let m=!1;for(const E of t.enum)if(g===E||Yp(o,e,g,E)){m=!0;break}r.enumValues=t.enum,r.enumValueMatch=m,m||r.problems.push({location:{offset:e.offset,length:e.length},severity:ce.Warning,code:lt.EnumValueMismatch,message:t.errorMessage||pe("enumWarning","Value is not accepted. Valid values: {0}.",t.enum.map(E=>JSON.stringify(E)).join(", ")),source:Ee(t,n),schemaUri:Ae(t,n),data:{values:t.enum}})}if(pr(t.const)){const g=li(e);!Na(g,t.const)&&!Yp(o,e,g,t.const)?(r.problems.push({location:{offset:e.offset,length:e.length},severity:ce.Warning,code:lt.EnumValueMismatch,problemType:et.constWarning,message:t.errorMessage||Ma(et.constWarning,[JSON.stringify(t.const)]),source:Ee(t,n),schemaUri:Ae(t,n),problemArgs:[JSON.stringify(t.const)],data:{values:[t.const]}}),r.enumValueMatch=!1):r.enumValueMatch=!0,r.enumValues=[t.const]}t.deprecationMessage&&e.parent&&r.problems.push({location:{offset:e.parent.offset,length:e.parent.length},severity:ce.Warning,message:t.deprecationMessage,source:Ee(t,n),schemaUri:Ae(t,n)})}function u(N,x,k){const b=N.value;Tt(x.multipleOf)&&l5(b,x.multipleOf)!==0&&k.problems.push({location:{offset:N.offset,length:N.length},severity:ce.Warning,message:pe("multipleOfWarning","Value is not divisible by {0}.",x.multipleOf),source:Ee(x,n),schemaUri:Ae(x,n)});function w(L,C){if(Tt(C))return C;if(ds(C)&&C)return L}function h(L,C){if(!ds(C)||!C)return L}const g=w(x.minimum,x.exclusiveMinimum);Tt(g)&&b<=g&&k.problems.push({location:{offset:N.offset,length:N.length},severity:ce.Warning,message:pe("exclusiveMinimumWarning","Value is below the exclusive minimum of {0}.",g),source:Ee(x,n),schemaUri:Ae(x,n)});const m=w(x.maximum,x.exclusiveMaximum);Tt(m)&&b>=m&&k.problems.push({location:{offset:N.offset,length:N.length},severity:ce.Warning,message:pe("exclusiveMaximumWarning","Value is above the exclusive maximum of {0}.",m),source:Ee(x,n),schemaUri:Ae(x,n)});const E=h(x.minimum,x.exclusiveMinimum);Tt(E)&&b<E&&k.problems.push({location:{offset:N.offset,length:N.length},severity:ce.Warning,message:pe("minimumWarning","Value is below the minimum of {0}.",E),source:Ee(x,n),schemaUri:Ae(x,n)});const v=h(x.maximum,x.exclusiveMaximum);Tt(v)&&b>v&&k.problems.push({location:{offset:N.offset,length:N.length},severity:ce.Warning,message:pe("maximumWarning","Value is above the maximum of {0}.",v),source:Ee(x,n),schemaUri:Ae(x,n)})}function c(N,x,k){if(Tt(x.minLength)&&N.value.length<x.minLength&&k.problems.push({location:{offset:N.offset,length:N.length},severity:ce.Warning,message:pe("minLengthWarning","String is shorter than the minimum length of {0}.",x.minLength),source:Ee(x,n),schemaUri:Ae(x,n)}),Tt(x.maxLength)&&N.value.length>x.maxLength&&k.problems.push({location:{offset:N.offset,length:N.length},severity:ce.Warning,message:pe("maxLengthWarning","String is longer than the maximum length of {0}.",x.maxLength),source:Ee(x,n),schemaUri:Ae(x,n)}),La(x.pattern)&&(Op(x.pattern).test(N.value)||k.problems.push({location:{offset:N.offset,length:N.length},severity:ce.Warning,message:x.patternErrorMessage||x.errorMessage||pe("patternWarning",'String does not match the pattern of "{0}".',x.pattern),source:Ee(x,n),schemaUri:Ae(x,n)})),x.format)switch(x.format){case"uri":case"uri-reference":{let b;if(!N.value)b=pe("uriEmpty","URI expected.");else try{!mt.parse(N.value).scheme&&x.format==="uri"&&(b=pe("uriSchemeMissing","URI with a scheme is expected."))}catch(w){b=w.message}b&&k.problems.push({location:{offset:N.offset,length:N.length},severity:ce.Warning,message:x.patternErrorMessage||x.errorMessage||pe("uriFormatWarning","String is not a URI: {0}",b),source:Ee(x,n),schemaUri:Ae(x,n)})}break;case"color-hex":case"date-time":case"date":case"time":case"email":case"ipv4":case"ipv6":{const b=u5[x.format];(!N.value||!b.pattern.test(N.value))&&k.problems.push({location:{offset:N.offset,length:N.length},severity:ce.Warning,message:x.patternErrorMessage||x.errorMessage||b.errorMessage,source:Ee(x,n),schemaUri:Ae(x,n)})}break}}function f(N,x,k,b){if(Array.isArray(x.items)){const h=x.items;for(let g=0;g<h.length;g++){const m=h[g],E=tt(m),v=new ut(a),L=N.items[g];L?(Ye(L,E,x,v,b,i),k.mergePropertyMatch(v),k.mergeEnumValues(v)):N.items.length>=h.length&&k.propertiesValueMatches++}if(N.items.length>h.length)if(typeof x.additionalItems=="object")for(let g=h.length;g<N.items.length;g++){const m=new ut(a);Ye(N.items[g],x.additionalItems,x,m,b,i),k.mergePropertyMatch(m),k.mergeEnumValues(m)}else x.additionalItems===!1&&k.problems.push({location:{offset:N.offset,length:N.length},severity:ce.Warning,message:pe("additionalItemsWarning","Array has too many items according to schema. Expected {0} or fewer.",h.length),source:Ee(x,n),schemaUri:Ae(x,n)})}else{const h=tt(x.items);if(h){const g=new ut(a);N.items.forEach(m=>{if(h.oneOf&&h.oneOf.length===1){const E=h.oneOf[0],v={...tt(E)};v.title=x.title,v.closestTitle=x.closestTitle,Ye(m,v,x,g,b,i),k.mergePropertyMatch(g),k.mergeEnumValues(g)}else Ye(m,h,x,g,b,i),k.mergePropertyMatch(g),k.mergeEnumValues(g)})}}const w=tt(x.contains);if(w&&(N.items.some(g=>{const m=new ut(a);return Ye(g,w,x,m,oi.instance,i),!m.hasProblems()})||k.problems.push({location:{offset:N.offset,length:N.length},severity:ce.Warning,message:x.errorMessage||pe("requiredItemMissingWarning","Array does not contain required item."),source:Ee(x,n),schemaUri:Ae(x,n)})),Tt(x.minItems)&&N.items.length<x.minItems&&k.problems.push({location:{offset:N.offset,length:N.length},severity:ce.Warning,message:pe("minItemsWarning","Array has too few items. Expected {0} or more.",x.minItems),source:Ee(x,n),schemaUri:Ae(x,n)}),Tt(x.maxItems)&&N.items.length>x.maxItems&&k.problems.push({location:{offset:N.offset,length:N.length},severity:ce.Warning,message:pe("maxItemsWarning","Array has too many items. Expected {0} or fewer.",x.maxItems),source:Ee(x,n),schemaUri:Ae(x,n)}),x.uniqueItems===!0){const h=li(N);h.some((m,E)=>E!==h.lastIndexOf(m))&&k.problems.push({location:{offset:N.offset,length:N.length},severity:ce.Warning,message:pe("uniqueItemsWarning","Array has duplicate items."),source:Ee(x,n),schemaUri:Ae(x,n)})}}function d(N,x,k,b){var w;const h=Object.create(null),g=[],m=[...N.properties];for(;m.length>0;){const L=m.pop(),C=L.keyNode.value;if(C==="<<"&&L.valueNode)switch(L.valueNode.type){case"object":{m.push(...L.valueNode.properties);break}case"array":{L.valueNode.items.forEach(A=>{A&&z8(A.properties)&&m.push(...A.properties)});break}}else h[C]=L.valueNode,g.push(C)}if(Array.isArray(x.required)){for(const L of x.required)if(h[L]===void 0){const C=N.parent&&N.parent.type==="property"&&N.parent.keyNode,A=C?{offset:C.offset,length:C.length}:{offset:N.offset,length:1};k.problems.push({location:A,severity:ce.Warning,message:Ma(et.missingRequiredPropWarning,[L]),source:Ee(x,n),schemaUri:Ae(x,n),problemArgs:[L],problemType:et.missingRequiredPropWarning})}}const E=L=>{let C=g.indexOf(L);for(;C>=0;)g.splice(C,1),C=g.indexOf(L)};if(x.properties)for(const L of Object.keys(x.properties)){E(L);const C=x.properties[L],A=h[L];if(A)if(ds(C))if(C)k.propertiesMatches++,k.propertiesValueMatches++;else{const F=A.parent;k.problems.push({location:{offset:F.keyNode.offset,length:F.keyNode.length},severity:ce.Warning,message:x.errorMessage||pe("DisallowedExtraPropWarning",qu,L),source:Ee(x,n),schemaUri:Ae(x,n)})}else{C.url=(w=x.url)!=null?w:n.url;const F=new ut(a);Ye(A,C,x,F,b,i),k.mergePropertyMatch(F),k.mergeEnumValues(F)}}if(x.patternProperties)for(const L of Object.keys(x.patternProperties)){const C=Op(L);for(const A of g.slice(0))if(C.test(A)){E(A);const F=h[A];if(F){const M=x.patternProperties[L];if(ds(M))if(M)k.propertiesMatches++,k.propertiesValueMatches++;else{const T=F.parent;k.problems.push({location:{offset:T.keyNode.offset,length:T.keyNode.length},severity:ce.Warning,message:x.errorMessage||pe("DisallowedExtraPropWarning",qu,A),source:Ee(x,n),schemaUri:Ae(x,n)})}else{const T=new ut(a);Ye(F,M,x,T,b,i),k.mergePropertyMatch(T),k.mergeEnumValues(T)}}}}if(typeof x.additionalProperties=="object")for(const L of g){const C=h[L];if(C){const A=new ut(a);Ye(C,x.additionalProperties,x,A,b,i),k.mergePropertyMatch(A),k.mergeEnumValues(A)}}else if((x.additionalProperties===!1||x.type==="object"&&x.additionalProperties===void 0&&i.disableAdditionalProperties===!0)&&g.length>0){const L=x.properties&&Object.entries(x.properties).filter(([C,A])=>!(h[C]||A&&typeof A=="object"&&(A.doNotSuggest||A.deprecationMessage))).map(([C])=>C);for(const C of g){const A=h[C];if(A){let F=null;A.type!=="property"?(F=A.parent,F.type==="object"&&(F=F.properties[0])):F=A;const M={location:{offset:F.keyNode.offset,length:F.keyNode.length},severity:ce.Warning,code:lt.PropertyExpected,message:x.errorMessage||pe("DisallowedExtraPropWarning",qu,C),source:Ee(x,n),schemaUri:Ae(x,n)};L!=null&&L.length&&(M.data={properties:L}),k.problems.push(M)}}}if(Tt(x.maxProperties)&&N.properties.length>x.maxProperties&&k.problems.push({location:{offset:N.offset,length:N.length},severity:ce.Warning,message:pe("MaxPropWarning","Object has more properties than limit of {0}.",x.maxProperties),source:Ee(x,n),schemaUri:Ae(x,n)}),Tt(x.minProperties)&&N.properties.length<x.minProperties&&k.problems.push({location:{offset:N.offset,length:N.length},severity:ce.Warning,message:pe("MinPropWarning","Object has fewer properties than the required number of {0}",x.minProperties),source:Ee(x,n),schemaUri:Ae(x,n)}),x.dependencies){for(const L of Object.keys(x.dependencies))if(h[L]){const A=x.dependencies[L];if(Array.isArray(A))for(const F of A)h[F]?k.propertiesValueMatches++:k.problems.push({location:{offset:N.offset,length:N.length},severity:ce.Warning,message:pe("RequiredDependentPropWarning","Object is missing property {0} required by property {1}.",F,L),source:Ee(x,n),schemaUri:Ae(x,n)});else{const F=tt(A);if(F){const M=new ut(a);Ye(N,F,x,M,b,i),k.mergePropertyMatch(M),k.mergeEnumValues(M)}}}}const v=tt(x.propertyNames);if(v)for(const L of N.properties){const C=L.keyNode;C&&Ye(C,v,x,k,oi.instance,i)}}function y(N,x,k,b){const w=N.compareKubernetes(x.validationResult);return w>0?x={schema:k,validationResult:N,matchingSchemas:b}:w===0&&(x.matchingSchemas.merge(b),x.validationResult.mergeEnumValues(N)),x}function D(N,x,k,b,w,h){if(!x&&!k.hasProblems()&&!b.validationResult.hasProblems())b.matchingSchemas.merge(h),b.validationResult.propertiesMatches+=k.propertiesMatches,b.validationResult.propertiesValueMatches+=k.propertiesValueMatches;else{const g=k.compareGeneric(b.validationResult);g>0||g===0&&x&&b.schema.type==="object"&&N.type!=="null"&&N.type!==b.schema.type?b={schema:w,validationResult:k,matchingSchemas:h}:(g===0||(N.value===null||N.type==="null")&&N.length===0)&&S(b,h,k)}return b}function S(N,x,k){N.matchingSchemas.merge(x),N.validationResult.mergeEnumValues(k),N.validationResult.mergeWarningGeneric(k,[et.missingRequiredPropWarning,et.typeMismatchWarning,et.constWarning])}}function Ee(e,t){var n;if(e){let r;if(e.title)r=e.title;else if(e.closestTitle)r=e.closestTitle;else if(t.closestTitle)r=t.closestTitle;else{const s=(n=e.url)!=null?n:t.url;if(s){const i=mt.parse(s);i.scheme==="file"&&(r=i.fsPath),r=i.toString()}}if(r)return`${Up}${r}`}return _a}function Ae(e,t){var n;const r=(n=e.url)!=null?n:t.url;return r?[r]:[]}function Ma(e,t){return pe(e,c5[e],t.join(" | "))}function Yp(e,t,n,r){return e?n===null&&t.length===0?!0:La(n)&&La(r)&&r.startsWith(n):!1}var w5=1e3,Wu=0,Hu=new Set;function ms(e,t,n,r){if(e||(Wu=0),!t)return null;if(Ie(t))return v5(t,e,n,r);if(Se(t))return D5(t,e,n,r);if($e(t))return S5(t,e,n,r);if(ae(t))return E5(t,e);if(Rt(t)&&!Hu.has(t)&&Wu<w5){Hu.add(t);const s=A5(t,e,n,r);return Hu.delete(t),s}else return}function v5(e,t,n,r){let s;e.flow&&!e.range?s=x5(e):s=e.range;const i=new g5(t,e,...zp(s,r));for(const a of e.items)Se(a)&&i.properties.push(ms(i,a,n,r));return i}function D5(e,t,n,r){const s=e.key,i=e.value,a=s.range[0];let o=s.range[1],l=s.range[2];i&&(o=i.range[1],l=i.range[2]);const u=new p5(t,e,...zp([a,o,l],r));if(Rt(s)){const c=new Ta(t,s,...jn(s.range));c.value=s.source,u.keyNode=c}else u.keyNode=ms(u,s,n,r);return u.valueNode=ms(u,i,n,r),u}function S5(e,t,n,r){const s=new d5(t,e,...jn(e.range));for(const i of e.items)if(ve(i)){const a=ms(s,i,n,r);a&&s.children.push(a)}return s}function E5(e,t){if(e.value===null)return new f5(t,e,...jn(e.range));switch(typeof e.value){case"string":{const n=new Ta(t,e,...jn(e.range));return n.value=e.value,n}case"boolean":return new h5(t,e,e.value,e.source,...jn(e.range));case"number":{const n=new m5(t,e,...jn(e.range));return n.value=e.value,n.isInteger=Number.isInteger(n.value),n}default:{const n=new Ta(t,e,...jn(e.range));return n.value=e.source,n}}}function A5(e,t,n,r){Wu++;const s=e.resolve(n);if(s)return ms(t,s,n,r);{const i=new Ta(t,e,...jn(e.range));return i.value=e.source,i}}function jn(e){return[e[0],e[1]-e[0]]}function zp(e,t){const n=t.linePos(e[0]),r=t.linePos(e[1]),s=[e[0],e[1]-e[0]];return n.line!==r.line&&(t.lineStarts.length!==r.line||r.col===1)&&s[1]--,s}function x5(e){let t=Number.MAX_SAFE_INTEGER,n=0;for(const r of e.items)Se(r)&&(ve(r.key)&&r.key.range&&r.key.range[0]<=t&&(t=r.key.range[0]),ve(r.value)&&r.value.range&&r.value.range[2]>=n&&(n=r.value.range[2]));return[t,n,n]}function N5(e,t){let n;if(Te(e,(r,s,i)=>{if(s===t)return n=i[i.length-1],Te.BREAK}),!Ur(n))return n}function L5(e){if(e.items.length>1)return!1;const t=e.items[0];return ae(t.key)&&ae(t.value)&&t.key.value===""&&!t.value.value}function k5(e,t){for(const[n,r]of e.items.entries())if(t===r)return n}function C5(e,t){let n=!1;for(const r of e){if(r.type==="document")Yu([],r,s=>{var i;if(Gp(s)&&((i=s.value)==null?void 0:i.type)==="comment"){if(r.offset<=t&&s.value.source.length+s.value.offset>=t)return n=!0,Te.BREAK}else if(s.type==="comment"&&s.offset<=t&&s.offset+s.source.length>=t)return n=!0,Te.BREAK});else if(r.type==="comment"&&r.offset<=t&&r.source.length+r.offset>=t)return!0;if(n)break}return n}function Gp(e){return e.start!==void 0}function Yu(e,t,n){let r=n(t,e);if(typeof r=="symbol")return r;for(const i of["key","value"]){const a=t[i];if(a&&"items"in a){for(let o=0;o<a.items.length;++o){const l=Yu(Object.freeze(e.concat([[i,o]])),a.items[o],n);if(typeof l=="number")o=l-1;else{if(l===Te.BREAK)return Te.BREAK;l===Te.REMOVE&&(a.items.splice(o,1),o-=1)}}typeof r=="function"&&i==="key"&&(r=r(t,e))}}const s=t.sep;if(s)for(let i=0;i<s.length;++i){const a=Yu(Object.freeze(e),s[i],n);if(typeof a=="number")i=a-1;else{if(a===Te.BREAK)return Te.BREAK;a===Te.REMOVE&&(s.items.splice(i,1),i-=1)}}return typeof r=="function"?r(t,e):r}var Jp=class Sg extends b5{constructor(t){super(null,[]),this.lineCounter=t}clone(){const t=new Sg(this.lineCounter);return t.isKubernetes=this.isKubernetes,t.disableAdditionalProperties=this.disableAdditionalProperties,t.uri=this.uri,t.currentDocIndex=this.currentDocIndex,t._lineComments=this.lineComments.slice(),t.internalDocument=this._internalDocument.clone(),t}collectLineComments(){this._lineComments=[],this._internalDocument.commentBefore&&this._internalDocument.commentBefore.split(`
|
|
357
|
+
`).forEach(n=>this._lineComments.push(`#${n}`)),Te(this.internalDocument,(t,n)=>{n!=null&&n.commentBefore&&(n==null?void 0:n.commentBefore.split(`
|
|
358
|
+
`)).forEach(s=>this._lineComments.push(`#${s}`)),n!=null&&n.comment&&this._lineComments.push(`#${n.comment}`)}),this._internalDocument.comment&&this._lineComments.push(`#${this._internalDocument.comment}`)}updateFromInternalDocument(){this.root=ms(null,this._internalDocument.contents,this._internalDocument,this.lineCounter)}set internalDocument(t){this._internalDocument=t,this.updateFromInternalDocument()}get internalDocument(){return this._internalDocument}get lineComments(){return this._lineComments||this.collectLineComments(),this._lineComments}set lineComments(t){this._lineComments=t}get errors(){return this.internalDocument.errors.map(Kp)}get warnings(){return this.internalDocument.warnings.map(Kp)}getNodeFromPosition(t,n,r){const s=n.getPosition(t),i=n.getLineContent(s.line);if(i.trim().length===0)return[this.findClosestNode(t,n,r),!0];const o=i.substring(s.character).match(/^([ ]+)\n?$/),l=!!o,u=o==null?void 0:o[1].length;let c;return Te(this.internalDocument,(f,d)=>{if(!d)return;const y=d.range;if(!y)return;const D=()=>l&&t+u===y[2]&&ae(d)&&d.value===null;if(y[0]<=t&&y[1]>=t||D())c=d;else return Te.SKIP}),[c,!1]}findClosestNode(t,n,r){let s=this.internalDocument.range[2],i=this.internalDocument.range[0],a;Te(this.internalDocument,(c,f)=>{if(!f)return;const d=f.range;if(!d)return;const y=d[1]-t;i<=d[0]&&y<=0&&Math.abs(y)<=s&&(s=Math.abs(y),i=d[0],a=f)});const o=n.getPosition(t),l=n.getLineContent(o.line),u=H8(l,o.character);return ae(a)&&a.value===null||u===o.character&&(a=this.getProperParentByIndentation(u,a,n,"",r)),a}getProperParentByIndentation(t,n,r,s,i,a){if(!n)return this.internalDocument.contents;if(i=i||2,ve(n)&&n.range){const o=r.getPosition(n.range[0]),l=r.getLineContent(o.line);if(s=s===""?l.trim():s,s.startsWith("-")&&t===i&&s===l.trim()&&(o.character+=t),o.character>t&&o.character>0){const u=this.getParent(n);if(u)return this.getProperParentByIndentation(t,u,r,s,i,a)}else if(o.character<t){const u=this.getParent(n);if(Se(u)&&ve(u.value))return u.value;if(Se(a)&&ve(a.value))return a.value}else return n}else if(Se(n)){a=n;const o=this.getParent(n);return this.getProperParentByIndentation(t,o,r,s,i,a)}return n}getParent(t){return N5(this.internalDocument,t)}},Qp=class{constructor(e,t){this.documents=e,this.tokens=t,this.errors=[],this.warnings=[]}},F5=class{constructor(){this.cache=new Map}getYamlDocument(e,t,n=!1){return this.ensureCache(e,t??Oa,n),this.cache.get(e.uri).document}clear(){this.cache.clear()}ensureCache(e,t,n){const r=e.uri;this.cache.has(r)||this.cache.set(r,{version:-1,document:new Qp([],[]),parserOptions:Oa});const s=this.cache.get(r);if(s.version!==e.version||t.customTags&&!jp(s.parserOptions.customTags,t.customTags)){let i=e.getText();n&&!/\S/.test(i)&&(i=`{${i}}`);const a=O5(i,t,e);s.document=a,s.version=e.version,s.parserOptions=t}}},Vt=new F5;function Kp(e){return{message:e.message,location:{start:e.pos[0],end:e.pos[1],toLineEnd:!0},severity:1,code:lt.Undefined}}var _5=class{constructor(e,t){this.tag=e,this.type=t}get collection(){if(this.type==="mapping")return"map";if(this.type==="sequence")return"seq"}resolve(e){if(Ie(e)&&this.type==="mapping"||$e(e)&&this.type==="sequence"||typeof e=="string"&&this.type==="scalar")return e}},T5=class{constructor(){this.tag="!include",this.type="scalar"}resolve(e,t){if(e&&e.length>0&&e.trim())return e;t("!include without value")}};function M5(e){const t=[],n=Vp(e);for(const r of n){const s=r.split(" "),i=s[0],a=s[1]&&s[1].toLowerCase()||"scalar";t.push(new _5(i,a))}return t.push(new T5),t}var yr=class{constructor(e){this.doc=e}getLineCount(){return this.doc.lineCount}getLineLength(e){const t=this.doc.getLineOffsets();return e>=t.length?this.doc.getText().length:e<0?0:(e+1<t.length?t[e+1]:this.doc.getText().length)-t[e]}getLineContent(e){const t=this.doc.getLineOffsets();if(e>=t.length)return this.doc.getText();if(e<0)return"";const n=e+1<t.length?t[e+1]:this.doc.getText().length;return this.doc.getText().substring(t[e],n)}getLineCharCode(e,t){return this.doc.getText(ie.create(e-1,t,e-1,t+1)).charCodeAt(0)}getText(e){return this.doc.getText(e)}getPosition(e){return this.doc.positionAt(e)}},Oa={customTags:[],yamlVersion:"1.2"};function O5(e,t=Oa,n){var r;const s={strict:!1,customTags:M5(t.customTags),version:(r=t.yamlVersion)!=null?r:Oa.yamlVersion,keepSourceTokens:!0},i=new Zd(s),a=new o1;let o=!1;if(n){const y=new yr(n),D=y.getPosition(e.length);o=y.getLineContent(D.line).trim().length===0}const u=(o?new Ol:new Ol(a.addNewLine)).parse(e),c=Array.from(u),f=i.compose(c,!0,e.length),d=Array.from(f,y=>R5(y,a));return new Qp(d,c)}function R5(e,t){const n=new Jp(t);return n.internalDocument=e,n}function P5(e){if(e instanceof Jp){const t=e.lineComments.find(n=>zu(n));if(t!=null){const n=t.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 zu(e){const t=e.match(/^#\s+yaml-language-server\s*:/g);return t!==null&&t.length===1}var I5=class{compile(){return()=>!0}},$5=new I5,Ra=hs(),B5=void 0,Xp=$5.compile(B5),Zp;(function(e){e[e.delete=0]="delete",e[e.add=1]="add",e[e.deleteAll=2]="deleteAll"})(Zp||(Zp={}));var V5=class{constructor(e){try{this.patternRegExp=new RegExp(W8(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}},j5=class extends j8{constructor(e,t,n){super(e,t,n),this.schemaUriToNameAndDescription=new Map,this.customSchemaProvider=void 0,this.requestService=e,this.schemaPriorityMapping=new Map}registerCustomSchemaProvider(e){this.customSchemaProvider=e}getAllSchemas(){const e=[],t=new Set;for(const n of this.filePatternAssociations){const r=n.uris[0];if(t.has(r))continue;t.add(r);const s={uri:r,fromStore:!1,usedForCurrentFile:!1};if(this.schemaUriToNameAndDescription.has(r)){const{name:i,description:a,versions:o}=this.schemaUriToNameAndDescription.get(r);s.name=i,s.description=a,s.fromStore=!0,s.versions=o}e.push(s)}return e}async resolveSchemaContent(e,t,n){const r=e.errors.slice(0);let s=e.schema;const i=this.contextService;if(!Xp(s)){const c=[];for(const f of Xp.errors)c.push(`${f.instancePath} : ${f.message}`);r.push(`Schema '${Pp(e.schema,t)}' is not valid:
|
|
359
|
+
${c.join(`
|
|
360
|
+
`)}`)}const a=(c,f)=>{if(!f)return c;let d=c;return f[0]==="/"&&(f=f.substr(1)),f.split("/").some(y=>(d=d[y],!d)),d},o=(c,f,d,y)=>{const D=a(f,y);if(D)for(const S in D)Object.prototype.hasOwnProperty.call(D,S)&&!Object.prototype.hasOwnProperty.call(c,S)&&(c[S]=D[S]);else r.push(Ra("json.schema.invalidref","$ref '{0}' in '{1}' can not be resolved.",y,d))},l=(c,f,d,y,D)=>{i&&!/^\w+:\/\/.*/.test(f)&&(f=i.resolveRelativePath(f,y)),f=this.normalizeId(f);const S=this.getOrAddSchemaHandle(f);return S.getUnresolvedSchema().then(N=>{if(D[f]=!0,N.errors.length){const x=d?f+"#"+d:f;r.push(Ra("json.schema.problemloadingref","Problems loading reference '{0}': {1}",x,N.errors[0]))}return o(c,N.schema,f,d),c.url=f,u(c,N.schema,f,S.dependencies)})},u=async(c,f,d,y)=>{if(!c||typeof c!="object")return null;const D=[c],S=new Set,N=[],x=(...h)=>{for(const g of h)typeof g=="object"&&D.push(g)},k=(...h)=>{for(const g of h)if(typeof g=="object")for(const m in g){const E=g[m];typeof E=="object"&&D.push(E)}},b=(...h)=>{for(const g of h)if(Array.isArray(g))for(const m of g)typeof m=="object"&&D.push(m)},w=h=>{const g=new Set;for(;h.$ref;){const m=decodeURIComponent(h.$ref),E=m.split("#",2);if(h._$ref=h.$ref,delete h.$ref,E[0].length>0){N.push(l(h,E[0],E[1],d,y));return}else g.has(m)||(o(h,f,d,E[1]),g.add(m))}x(h.items,h.additionalItems,h.additionalProperties,h.not,h.contains,h.propertyNames,h.if,h.then,h.else),k(h.definitions,h.properties,h.patternProperties,h.dependencies),b(h.anyOf,h.allOf,h.oneOf,h.items,h.schemaSequence)};if(d.indexOf("#")>0){const h=d.split("#",2);if(h[0].length>0&&h[1].length>0){const g={};await l(g,h[0],h[1],d,y);for(const m in s)m!=="required"&&Object.prototype.hasOwnProperty.call(s,m)&&!Object.prototype.hasOwnProperty.call(g,m)&&(g[m]=s[m]);s=g}}for(;D.length;){const h=D.pop();S.has(h)||(S.add(h),w(h))}return Promise.all(N)};return await u(s,s,t,n),new ai(s,r)}getSchemaForResource(e,t){const n=()=>{let a=P5(t);if(a!==void 0){if(!a.startsWith("file:")&&!a.startsWith("http")){let o="";if(a.indexOf("#")>0){const l=a.split("#",2);a=l[0],o=l[1]}if(er.isAbsolute(a))a=mt.file(a).toString();else{const l=mt.parse(e);a=mt.file(er.resolve(er.parse(l.fsPath).dir,a)).toString()}o.length>0&&(a+="#"+o)}return a}},r=a=>{const o=super.createCombinedSchema(e,a);return o.getResolvedSchema().then(l=>(l.schema&&typeof l.schema=="object"&&(l.schema.url=o.url),l.schema&&l.schema.schemaSequence&&l.schema.schemaSequence[t.currentDocIndex]?new ai(l.schema.schemaSequence[t.currentDocIndex]):l))},s=()=>{const a=Object.create(null),o=[];for(const l of this.filePatternAssociations)if(l.matchesPattern(e))for(const u of l.getURIs())a[u]||(o.push(u),a[u]=!0);if(o.length>0){const l=this.highestPrioritySchemas(o);return r(l)}return Promise.resolve(null)},i=n();return i?r([i]):this.customSchemaProvider?this.customSchemaProvider(e).then(a=>Array.isArray(a)?a.length===0?s():Promise.all(a.map(o=>this.resolveCustomSchema(o,t))).then(o=>({errors:[],schema:{allOf:o.map(l=>l.schema)}}),()=>s()):a?this.resolveCustomSchema(a,t):s()).then(a=>a,()=>s()):s()}addSchemaPriority(e,t){let n=this.schemaPriorityMapping.get(e);n?(n=n.add(t),this.schemaPriorityMapping.set(e,n)):this.schemaPriorityMapping.set(e,new Set().add(t))}highestPrioritySchemas(e){let t=0;const n=new Map;return e.forEach(r=>{(this.schemaPriorityMapping.get(r)||[0]).forEach(i=>{i>t&&(t=i);let a=n.get(i);a?(a=a.concat(r),n.set(i,a)):n.set(i,[r])})}),n.get(t)||[]}async resolveCustomSchema(e,t){const n=await this.loadSchema(e),r=await this.resolveSchemaContent(n,e,[]);return r.schema&&typeof r.schema=="object"&&(r.schema.url=e),r.schema&&r.schema.schemaSequence&&r.schema.schemaSequence[t.currentDocIndex]?new ai(r.schema.schemaSequence[t.currentDocIndex],r.errors):r}async saveSchema(e,t){const n=this.normalizeId(e);return this.getOrAddSchemaHandle(n,t),this.schemaPriorityMapping.set(n,new Set().add(Ju.Settings)),Promise.resolve(void 0)}async deleteSchemas(e){return e.schemas.forEach(t=>{this.deleteSchema(t)}),Promise.resolve(void 0)}async deleteSchema(e){const t=this.normalizeId(e);return this.schemasById[t]&&delete this.schemasById[t],this.schemaPriorityMapping.delete(t),Promise.resolve(void 0)}async addContent(e){const t=await this.getResolvedSchema(e.schema);if(t){const n=this.resolveJSONSchemaToSection(t.schema,e.path);typeof n=="object"&&(n[e.key]=e.content),await this.saveSchema(e.schema,t.schema)}}async deleteContent(e){const t=await this.getResolvedSchema(e.schema);if(t){const n=this.resolveJSONSchemaToSection(t.schema,e.path);typeof n=="object"&&delete n[e.key],await this.saveSchema(e.schema,t.schema)}}resolveJSONSchemaToSection(e,t){const n=t.split("/");let r=e;for(const s of n)s!==""&&(this.resolveNext(r,s),r=r[s]);return r}resolveNext(e,t){if(Array.isArray(e)&&isNaN(t))throw new Error("Expected a number after the array object");if(typeof e=="object"&&typeof t!="string")throw new Error("Expected a string after the object")}normalizeId(e){try{return mt.parse(e).toString()}catch{return e}}getOrAddSchemaHandle(e,t){return super.getOrAddSchemaHandle(e,t)}loadSchema(e){const t=this.requestService;return super.loadSchema(e).then(n=>{if(n.errors&&n.schema===void 0)return t(e).then(r=>{if(!r){const s=Ra("json.schema.nocontent","Unable to load schema from '{0}': No content. {1}",eg(e),n.errors);return new Bt({},[s])}try{const s=xb(r);return new Bt(s,[])}catch(s){const i=Ra("json.schema.invalidFormat","Unable to parse content from '{0}': {1}.",eg(e),s);return new Bt({},[i])}},r=>{let s=r.toString();const i=r.toString().split("Error: ");return i.length>1&&(s=i[1]),new Bt({},[s])});if(n.uri=e,this.schemaUriToNameAndDescription.has(e)){const{name:r,description:s,versions:i}=this.schemaUriToNameAndDescription.get(e);n.schema.title=r??n.schema.title,n.schema.description=s??n.schema.description,n.schema.versions=i??n.schema.versions}return n})}registerExternalSchema(e,t,n,r,s,i){return(r||s)&&this.schemaUriToNameAndDescription.set(e,{name:r,description:s,versions:i}),super.registerExternalSchema(e,t,n)}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 eg(e){try{const t=mt.parse(e);if(t.scheme==="file")return t.fsPath}catch{}return e}var U5=class{constructor(e,t){this.telemetry=t,this.jsonDocumentSymbols=new n5(e),this.jsonDocumentSymbols.getKeyLabel=n=>{const r=n.keyNode.internalNode;let s="";return Ie(r)?s="{}":$e(r)?s="[]":s=r.source,s}}findDocumentSymbols(e,t={resultLimit:Number.MAX_VALUE}){var n;let r=[];try{const s=Vt.getYamlDocument(e);if(!s||s.documents.length===0)return null;for(const i of s.documents)i.root&&(r=r.concat(this.jsonDocumentSymbols.findDocumentSymbols(e,i,t)))}catch(s){(n=this.telemetry)==null||n.sendError("yaml.documentSymbols.error",s)}return r}findHierarchicalDocumentSymbols(e,t={resultLimit:Number.MAX_VALUE}){var n;let r=[];try{const s=Vt.getYamlDocument(e);if(!s||s.documents.length===0)return null;for(const i of s.documents)i.root&&(r=r.concat(this.jsonDocumentSymbols.findDocumentSymbols2(e,i,t)))}catch(s){(n=this.telemetry)==null||n.sendError("yaml.hierarchicalDocumentSymbols.error",s)}return r}};function tg(e,t){for(const n of e)n.isKubernetes=t}var q5=class{constructor(e,t){this.telemetry=t,this.shouldHover=!0,this.schemaService=e}configure(e){e&&(this.shouldHover=e.hover,this.indentation=e.indentation)}doHover(e,t,n=!1){var r;try{if(!this.shouldHover||!e)return Promise.resolve(void 0);const s=Vt.getYamlDocument(e),i=e.offsetAt(t),a=Fa(i,s);if(a===null)return Promise.resolve(void 0);tg(s.documents,n);const o=s.documents.indexOf(a);return a.currentDocIndex=o,this.getHover(e,t,a)}catch(s){(r=this.telemetry)==null||r.sendError("yaml.hover.error",s)}}getHover(e,t,n){const r=e.offsetAt(t);let s=n.getNodeFromOffset(r);if(!s||(s.type==="object"||s.type==="array")&&r>s.offset+1&&r<s.offset+s.length-1)return Promise.resolve(null);const i=s;if(s.type==="string"){const u=s.parent;if(u&&u.type==="property"&&u.keyNode===s&&(s=u.valueNode,!s))return Promise.resolve(null)}const a=ie.create(e.positionAt(i.offset),e.positionAt(i.offset+i.length)),o=u=>({contents:{kind:un.Markdown,value:u},range:a}),l=u=>u.replace(/\s\|\|\s*$/,"");return this.schemaService.getSchemaForResource(e.uri,n).then(u=>{if(u&&s&&!u.errors.length){const c=n.getMatchingSchemas(u.schema,s.offset);let f,d,y=[];const D=[],S=[];c.every(x=>((x.node===s||s.type==="property"&&s.valueNode===x.node)&&!x.inverted&&x.schema&&(f=f||x.schema.title||x.schema.closestTitle,d=d||x.schema.markdownDescription||this.toMarkdown(x.schema.description),x.schema.enum&&(x.schema.markdownEnumDescriptions?y=x.schema.markdownEnumDescriptions:x.schema.enumDescriptions?y=x.schema.enumDescriptions.map(this.toMarkdown,this):y=[],x.schema.enum.forEach((k,b)=>{typeof k!="string"&&(k=JSON.stringify(k)),S.some(w=>w.value===k)||S.push({value:k,description:y[b]})})),x.schema.anyOf&&H5(s,c,x.schema)&&(f="",d=x.schema.description?x.schema.description+`
|
|
361
|
+
`:"",x.schema.anyOf.forEach((k,b)=>{f+=k.title||x.schema.closestTitle||"",d+=k.markdownDescription||this.toMarkdown(k.description)||"",b!==x.schema.anyOf.length-1&&(f+=" || ",d+=" || ")}),f=l(f),d=l(d)),x.schema.examples&&x.schema.examples.forEach(k=>{D.push(Nb(k,null,2))})),!0));let N="";return f&&(N="#### "+this.toMarkdown(f)),d&&(N=Pa(N),N+=d),S.length!==0&&(N=Pa(N),N+=`Allowed Values:
|
|
362
|
+
|
|
363
|
+
`,S.forEach(x=>{x.description?N+=`* \`${ng(x.value)}\`: ${x.description}
|
|
364
|
+
`:N+=`* \`${ng(x.value)}\`
|
|
365
|
+
`})),D.length!==0&&D.forEach(x=>{N=Pa(N),N+=`Example:
|
|
366
|
+
|
|
367
|
+
`,N+=`\`\`\`yaml
|
|
368
|
+
${x}\`\`\`
|
|
369
|
+
`}),N.length>0&&u.schema.url&&(N=Pa(N),N+=`Source: [${W5(u.schema)}](${u.schema.url})`),o(N)}return null})}toMarkdown(e){if(e){let t=e.replace(/([^\n\r])(\r?\n)([^\n\r])/gm,`$1
|
|
370
|
+
|
|
371
|
+
$3`);if(t=t.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&"),this.indentation!==void 0){const n=new RegExp(` {${this.indentation.length}}`,"g");t=t.replace(n," ")}return t}}};function Pa(e){return e.length===0?e:(e.endsWith(`
|
|
372
|
+
`)||(e+=`
|
|
373
|
+
`),e+`
|
|
374
|
+
`)}function W5(e){let t="JSON Schema";const n=e.url;if(n){const r=mt.parse(n);t=er.basename(r.fsPath)}else e.title&&(t=e.title);return t}function ng(e){return e.indexOf("`")!==-1?"`` "+e+" ``":e}function H5(e,t,n){let r=0;for(const s of t)e===s.node&&s.schema!==n&&n.anyOf.forEach(i=>{s.schema.title===i.title&&s.schema.description===i.description&&s.schema.properties===i.properties&&r++});return r===n.anyOf.length}var Y5=class{validate(e,t){const n=[],r=new Set,s=new Set,i=new Map;Te(t.internalDocument,(a,o,l)=>{ve(o)&&((Pe(o)||ae(o))&&o.anchor&&(r.add(o),i.set(o,l[l.length-1])),Rt(o)&&s.add(o.resolve(t.internalDocument)))});for(const a of r)if(!s.has(a)){const o=this.getAnchorNode(i.get(a),a);if(o){const l=ie.create(e.positionAt(o.offset),e.positionAt(o.offset+o.source.length)),u=pt.create(l,`Unused anchor "${o.source}"`,ce.Hint,0);u.tags=[Ho.Unnecessary],n.push(u)}}return n}getAnchorNode(e,t){if(e&&e.srcToken){const n=e.srcToken;if(Gp(n))return rg(n);if(bb(n))for(const r of n.items){if(t.srcToken!==r.value)continue;const s=rg(r);if(s)return s}}}};function rg(e){for(const t of e.start)if(t.type==="anchor")return t;if(e.sep&&Array.isArray(e.sep)){for(const t of e.sep)if(t.type==="anchor")return t}}var z5=class{constructor(e){this.forbidMapping=e.flowMapping==="forbid",this.forbidSequence=e.flowSequence==="forbid"}validate(e,t){const n=[];return Te(t.internalDocument,(r,s)=>{var i,a;this.forbidMapping&&Ie(s)&&((i=s.srcToken)==null?void 0:i.type)==="flow-collection"&&n.push(pt.create(this.getRangeOf(e,s.srcToken),"Flow style mapping is forbidden",ce.Error,"flowMap")),this.forbidSequence&&$e(s)&&((a=s.srcToken)==null?void 0:a.type)==="flow-collection"&&n.push(pt.create(this.getRangeOf(e,s.srcToken),"Flow style sequence is forbidden",ce.Error,"flowSeq"))}),n}getRangeOf(e,t){return ie.create(e.positionAt(t.start.offset),e.positionAt(t.end.pop().offset))}},G5=class{validate(e,t){const n=[];return Te(t.internalDocument,(r,s)=>{if(Ie(s)){for(let i=1;i<s.items.length;i++)if(Q5(s.items[i-1],s.items[i])>0){const a=J5(e,s.items[i-1]);n.push(pt.create(a,`Wrong ordering of key "${s.items[i-1].key}" in mapping`,ce.Error,"mapKeyOrder"))}}}),n}};function J5(e,t){var n,r,s,i,a,o,l,u,c,f,d;const y=(o=(s=(n=t==null?void 0:t.srcToken.start[0])==null?void 0:n.offset)!=null?s:(r=t==null?void 0:t.srcToken)==null?void 0:r.key.offset)!=null?o:(a=(i=t==null?void 0:t.srcToken)==null?void 0:i.sep[0])==null?void 0:a.offset,D=((l=t==null?void 0:t.srcToken)==null?void 0:l.value.offset)||((c=(u=t==null?void 0:t.srcToken)==null?void 0:u.sep[0])==null?void 0:c.offset)||((f=t==null?void 0:t.srcToken)==null?void 0:f.key.offset)||((d=t==null?void 0:t.srcToken.start[t.srcToken.start.length-1])==null?void 0:d.offset);return ie.create(e.positionAt(y),e.positionAt(D))}function Q5(e,t){const n=String(t.key);return String(e.key).localeCompare(n)}var K5=(e,t)=>{const n=t.positionAt(e.location.start),r={start:n,end:e.location.toLineEnd?We.create(n.line,new yr(t).getLineLength(n.line)):t.positionAt(e.location.end)};return pt.create(r,e.message,e.severity,e.code,_a)},X5=class{constructor(e,t){this.telemetry=t,this.validators=[],this.MATCHES_MULTIPLE="Matches multiple schemas when only one must validate.",this.validationEnabled=!0,this.jsonValidation=new Q8(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 z5(e)),e.keyOrdering&&this.validators.push(new G5)),this.validators.push(new Y5)}async doValidation(e,t=!1){var n;if(!this.validationEnabled)return Promise.resolve([]);const r=[];try{const o=Vt.getYamlDocument(e,{customTags:this.customTags,yamlVersion:this.yamlVersion},!0);let l=0;for(const u of o.documents){u.isKubernetes=t,u.currentDocIndex=l,u.disableAdditionalProperties=this.disableAdditionalProperties,u.uri=e.uri;const c=await this.jsonValidation.doValidation(e,u),f=u;f.errors.length>0&&r.push(...f.errors),f.warnings.length>0&&r.push(...f.warnings),r.push(...c),r.push(...this.runAdditionalValidators(e,u)),l++}}catch(o){(n=this.telemetry)==null||n.sendError("yaml.validation.error",o)}let s;const i=new Set,a=[];for(let o of r){if(t&&o.message===this.MATCHES_MULTIPLE)continue;if(Object.prototype.hasOwnProperty.call(o,"location")&&(o=K5(o,e)),o.source||(o.source=_a),s&&s.message===o.message&&s.range.end.line===o.range.start.line&&Math.abs(s.range.end.character-o.range.end.character)>=1){s.range.end=o.range.end;continue}else s=o;const l=o.range.start.line+" "+o.range.start.character+" "+o.message;i.has(l)||(a.push(o),i.add(l))}return a}runAdditionalValidators(e,t){const n=[];for(const r of this.validators)n.push(...r.validate(e,t));return n}},Z5=class{constructor(){this.formatterEnabled=!0}configure(e){e&&(this.formatterEnabled=e.format)}async format(e,t={}){if(!this.formatterEnabled)return[];try{const n=e.getText(),r={parser:"yaml",plugins:[oD],tabWidth:t.tabWidth||t.tabSize,singleQuote:t.singleQuote,bracketSpacing:t.bracketSpacing,proseWrap:t.proseWrap==="always"?"always":t.proseWrap==="never"?"never":"preserve",printWidth:t.printWidth},s=await $u(n,r);return[_e.replace(ie.create(We.create(0,0),e.positionAt(n.length)),s)]}catch{return[]}}},e6=class{constructor(e){this.telemetry=e}findLinks(e){var t;try{const n=Vt.getYamlDocument(e),r=[];for(const s of n.documents)r.push(r5(e,s));return Promise.all(r).then(s=>[].concat(...s))}catch(n){(t=this.telemetry)==null||t.sendError("yaml.documentLink.error",n)}}};function t6(e,t){if(!e)return;const n=[],r=Vt.getYamlDocument(e);for(const i of r.documents)r.documents.length>1&&n.push(Ia(e,i.root)),i.visit(a=>{var o;if(a.type==="object"&&((o=a.parent)==null?void 0:o.type)==="array"&&n.push(Ia(e,a)),a.type==="property"&&a.valueNode)switch(a.valueNode.type){case"array":case"object":n.push(Ia(e,a));break;case"string":{const l=e.positionAt(a.offset),u=e.positionAt(a.valueNode.offset+a.valueNode.length);l.line!==u.line&&n.push(Ia(e,a));break}default:return!0}return!0});const s=t&&t.rangeLimit;return typeof s!="number"||n.length<=s?n:(t&&t.onRangeLimitExceeded&&t.onRangeLimitExceeded(e.uri),n.slice(0,t.rangeLimit))}function Ia(e,t){const n=e.positionAt(t.offset);let r=e.positionAt(t.offset+t.length);const s=e.getText(ie.create(n,r)),i=s.length-s.trimRight().length;return i>0&&(r=e.positionAt(t.offset+t.length-i)),qo.create(n.line,r.line,n.character,r.character)}var $a;(function(e){e.JUMP_TO_SCHEMA="jumpToSchema"})($a||($a={}));var n6=class{constructor(e){this.indentation=e}write(e){if(e.internalNode.srcToken.type!=="flow-collection")return null;const t=e.internalNode.srcToken,n=t.start.type==="flow-map-start"?"block-map":"block-seq",r=e.parent.type,s={type:n,offset:t.offset,indent:t.indent,items:[]};for(const i of t.items)Zn(i,({key:a,sep:o,value:l})=>{if(n==="block-map"){const u=[{type:"space",indent:0,offset:a.offset,source:this.indentation}];r==="property"&&u.unshift({type:"newline",indent:0,offset:a.offset,source:`
|
|
375
|
+
`}),s.items.push({start:u,key:a,sep:o,value:l})}else n==="block-seq"&&s.items.push({start:[{type:"newline",indent:0,offset:l.offset,source:`
|
|
376
|
+
`},{type:"space",indent:0,offset:l.offset,source:this.indentation},{type:"seq-item-ind",indent:0,offset:l.offset,source:"-"},{type:"space",indent:0,offset:l.offset,source:" "}],value:l});if(l.type==="flow-collection")return Te.SKIP});return e1(s)}},r6=structuredClone,s6=class{constructor(e){this.clientCapabilities=e,this.indentation=" "}configure(e){this.indentation=e.indentation}getCodeAction(e,t){if(!t.context.diagnostics)return;const n=[];return n.push(...this.getConvertToBooleanActions(t.context.diagnostics,e)),n.push(...this.getJumpToSchemaActions(t.context.diagnostics)),n.push(...this.getTabToSpaceConverting(t.context.diagnostics,e)),n.push(...this.getUnusedAnchorsDelete(t.context.diagnostics,e)),n.push(...this.getConvertToBlockStyleActions(t.context.diagnostics,e)),n.push(...this.getKeyOrderActions(t.context.diagnostics,e)),n.push(...this.getQuickFixForPropertyOrValueMismatch(t.context.diagnostics,e)),n}getJumpToSchemaActions(e){var t,n,r,s,i;if(!((s=(r=(n=(t=this.clientCapabilities)==null?void 0:t.window)==null?void 0:n.showDocument)==null?void 0:r.support)!=null?s:!1))return[];const o=new Map;for(const u of e){const c=((i=u.data)==null?void 0:i.schemaUri)||[];for(const f of c)f&&(o.has(f)||o.set(f,[]),o.get(f).push(u))}const l=[];for(const u of o.keys()){const c=Yt.create(`Jump to schema location (${er.basename(u)})`,Gn.create("JumpToSchema",$a.JUMP_TO_SCHEMA,u));c.diagnostics=o.get(u),l.push(c)}return l}getTabToSpaceConverting(e,t){const n=[],r=new yr(t),s=[];for(const i of e)if(i.message==="Using tabs can lead to unpredictable results"){if(s.includes(i.range.start.line))continue;const a=r.getLineContent(i.range.start.line);let o=0,l="";for(let c=i.range.start.character;c<=i.range.end.character&&a.charAt(c)===" ";c++)o++,l+=this.indentation;s.push(i.range.start.line);let u=i.range;o!==i.range.end.character-i.range.start.character&&(u=ie.create(i.range.start,We.create(i.range.end.line,i.range.start.character+o))),n.push(Yt.create("Convert Tab to Spaces",br(t.uri,[_e.replace(u,l)]),cn.QuickFix))}if(n.length!==0){const i=[];for(let a=0;a<=r.getLineCount();a++){const o=r.getLineContent(a);let l=0,u="";for(let c=0;c<o.length;c++){const f=o.charAt(c);if(f!==" "&&f!==" "){l!==0&&(i.push(_e.replace(ie.create(a,c-l,a,c),u)),l=0,u="");break}if(f===" "&&l!==0){i.push(_e.replace(ie.create(a,c-l,a,c),u)),l=0,u="";continue}f===" "&&(u+=this.indentation,l++)}l!==0&&i.push(_e.replace(ie.create(a,0,a,r.getLineLength(a)),u))}i.length>0&&n.push(Yt.create("Convert all Tabs to Spaces",br(t.uri,i),cn.QuickFix))}return n}getUnusedAnchorsDelete(e,t){const n=[],r=new yr(t);for(const s of e)if(s.message.startsWith("Unused anchor")&&s.source===_a){const i=ie.create(s.range.start,s.range.end),a=r.getText(i),o=r.getLineContent(i.end.line),l=Y8(o,i.end.character);i.end.character=l;const u=Yt.create(`Delete unused anchor: ${a}`,br(t.uri,[_e.del(i)]),cn.QuickFix);u.diagnostics=[s],n.push(u)}return n}getConvertToBooleanActions(e,t){const n=[];for(const r of e)if(r.message==='Incorrect type. Expected "boolean".'){const s=t.getText(r.range).toLocaleLowerCase();if(s==='"true"'||s==='"false"'||s==="'true'"||s==="'false'"){const i=s.includes("true")?"true":"false";n.push(Yt.create("Convert to boolean",br(t.uri,[_e.replace(r.range,i)]),cn.QuickFix))}}return n}getConvertToBlockStyleActions(e,t){const n=[];for(const r of e)if(r.code==="flowMap"||r.code==="flowSeq"){const s=sg(t,r);if(Ie(s.internalNode)||$e(s.internalNode)){const i=Ie(s.internalNode)?"map":"sequence",a=new n6(this.indentation);n.push(Yt.create(`Convert to block style ${i}`,br(t.uri,[_e.replace(r.range,a.write(s))]),cn.QuickFix))}}return n}getKeyOrderActions(e,t){var n,r,s,i,a,o,l,u,c,f,d,y,D,S;const N=[];for(const x of e)if((x==null?void 0:x.code)==="mapKeyOrder"){let k=sg(t,x);for(;k&&k.type!=="object";)k=k.parent;if(k&&Ie(k.internalNode)){const b=r6(k.internalNode);if((b.srcToken.type==="block-map"||b.srcToken.type==="flow-collection")&&(k.internalNode.srcToken.type==="block-map"||k.internalNode.srcToken.type==="flow-collection")){b.srcToken.items.sort((h,g)=>{if(h.key&&g.key&&Tl(h.key)&&Tl(g.key))return h.key.source.localeCompare(g.key.source);if(!h.key&&g.key)return-1;if(h.key&&!g.key)return 1;if(!h.key&&!g.key)return 0});for(let h=0;h<b.srcToken.items.length;h++){const g=b.srcToken.items[h],m=k.internalNode.srcToken.items[h];if(g.start=m.start,((n=g.value)==null?void 0:n.type)==="alias"||((r=g.value)==null?void 0:r.type)==="scalar"||((s=g.value)==null?void 0:s.type)==="single-quoted-scalar"||((i=g.value)==null?void 0:i.type)==="double-quoted-scalar"){const E=(l=(o=(a=g.value)==null?void 0:a.end)==null?void 0:o.findIndex(L=>L.type==="newline"))!=null?l:-1;let v=null;((u=m.value)==null?void 0:u.type)==="block-scalar"?v=(f=(c=m.value)==null?void 0:c.props)==null?void 0:f.find(L=>L.type==="newline"):Tl(m.value)&&(v=(y=(d=m.value)==null?void 0:d.end)==null?void 0:y.find(L=>L.type==="newline")),v&&E<0&&(g.value.end=(D=g.value.end)!=null?D:[],g.value.end.push(v)),!v&&E>-1&&g.value.end.splice(E,1)}else((S=g.value)==null?void 0:S.type)==="block-scalar"&&(g.value.props.find(v=>v.type==="newline")||g.value.props.push({type:"newline",indent:0,offset:g.value.offset,source:`
|
|
377
|
+
`}))}}const w=ie.create(t.positionAt(k.offset),t.positionAt(k.offset+k.length));N.push(Yt.create("Fix key order for this map",br(t.uri,[_e.replace(w,e1(b.srcToken))]),cn.QuickFix))}}return N}getPossibleQuickFixValues(e){if(typeof e.data=="object"){if(e.code===lt.EnumValueMismatch&&"values"in e.data&&Array.isArray(e.data.values))return e.data.values;if(e.code===lt.PropertyExpected&&"properties"in e.data&&Array.isArray(e.data.properties))return e.data.properties}}getQuickFixForPropertyOrValueMismatch(e,t){const n=[];for(const r of e){const s=this.getPossibleQuickFixValues(r);if(s!=null&&s.length)for(const i of s)n.push(Yt.create(i,br(t.uri,[_e.replace(r.range,i)]),cn.QuickFix))}return n}};function sg(e,t){const n=Vt.getYamlDocument(e),r=e.offsetAt(t.range.start);return Fa(r,n).getNodeFromOffset(r)}function br(e,t){const n={};return n[e]=t,{changes:n}}function i6(e,t){const{position:n}=t,r=new yr(e);if(t.ch===`
|
|
378
|
+
`){const s=r.getLineContent(n.line-1);if(s.trimRight().endsWith(":")){const i=r.getLineContent(n.line),a=i.substring(n.character,i.length),o=s.indexOf(" - ")!==-1;if(a.trimRight().length===0){const l=n.character-(s.length-s.trimLeft().length);if(l===t.options.tabSize&&!o)return;const u=[];return i.length>0&&u.push(_e.del(ie.create(n,We.create(n.line,i.length-1)))),u.push(_e.insert(n," ".repeat(t.options.tabSize+(o?2-l:0)))),u}if(o)return[_e.insert(n," ".repeat(t.options.tabSize))]}if(s.trimRight().endsWith("|"))return[_e.insert(n," ".repeat(t.options.tabSize))];if(s.includes(" - ")&&!s.includes(": "))return[_e.insert(n,"- ")];if(s.includes(" - ")&&s.includes(": "))return[_e.insert(n," ")]}}function a6(e){const t=new Map;return e&&(e.url?e.url.startsWith("schemaservice://combinedSchema/")?ig(e,t):t.set(e.url,e):ig(e,t)),t}function ig(e,t){e.allOf&&Gu(e.allOf,t),e.anyOf&&Gu(e.anyOf,t),e.oneOf&&Gu(e.oneOf,t)}function Gu(e,t){for(const n of e)!ds(n)&&n.url&&!t.has(n.url)&&t.set(n.url,n)}var o6=class{constructor(e,t){this.schemaService=e,this.telemetry=t}async getCodeLens(e){var t;const n=[];try{const r=Vt.getYamlDocument(e);let s=new Map;for(const i of r.documents){const a=await this.schemaService.getSchemaForResource(e.uri,i);a!=null&&a.schema&&(s=new Map([...a6(a==null?void 0:a.schema),...s]))}for(const i of s){const a=nl.create(ie.create(0,0,0,0));a.command={title:Pp(i[1],i[0]),command:$a.JUMP_TO_SCHEMA,arguments:[i[0]]},n.push(a)}}catch(r){(t=this.telemetry)==null||t.sendError("yaml.codeLens.error",r)}return n}resolveCodeLens(e){return e}},l6=class{constructor(){this.spacesDiff=0,this.looksLikeAlignment=!1}};function u6(e,t,n,r,s){s.spacesDiff=0,s.looksLikeAlignment=!1;let i;for(i=0;i<t&&i<r;i++){const d=e.charCodeAt(i),y=n.charCodeAt(i);if(d!==y)break}let a=0,o=0;for(let d=i;d<t;d++)e.charCodeAt(d)===32?a++:o++;let l=0,u=0;for(let d=i;d<r;d++)n.charCodeAt(d)===32?l++:u++;if(a>0&&o>0||l>0&&u>0)return;const c=Math.abs(o-u),f=Math.abs(a-l);if(c===0){s.spacesDiff=f,f>0&&0<=l-1&&l-1<e.length&&l<n.length&&n.charCodeAt(l)!==32&&e.charCodeAt(l-1)===32&&e.charCodeAt(e.length-1)===44&&(s.looksLikeAlignment=!0);return}f%c===0&&(s.spacesDiff=f/c)}function c6(e,t,n){const r=Math.min(e.getLineCount(),1e4);let s=0,i=0,a="",o=0;const l=[2,4,6,8,3,5,7],u=8,c=[0,0,0,0,0,0,0,0,0],f=new l6;for(let D=1;D<=r;D++){const S=e.getLineLength(D),N=e.getLineContent(D),x=S<=65536;let k=!1,b=0,w=0,h=0;for(let m=0,E=S;m<E;m++){const v=x?N.charCodeAt(m):e.getLineCharCode(D,m);if(v===9)h++;else if(v===32)w++;else{k=!0,b=m;break}}if(!k||(h>0?s++:w>1&&i++,u6(a,o,N,b,f),f.looksLikeAlignment&&t!==f.spacesDiff))continue;const g=f.spacesDiff;g<=u&&c[g]++,a=N,o=b}let d=n;s!==i&&(d=s<i);let y=t;if(d){let D=d?0:.1*r;l.forEach(S=>{const N=c[S];N>D&&(D=N,y=S)}),y===4&&c[4]>0&&c[2]>0&&c[2]>=c[4]/2&&(y=2)}return{insertSpaces:d,tabSize:y}}function Ba(e,t,n,r,s=0,i=0){if(e!==null&&typeof e=="object"){const a=s===0&&r.shouldIndentWithTab||s>0?t+r.indentation:"";if(Array.isArray(e)){if(i+=1,e.length===0)return"";let o="";for(let l=0;l<e.length;l++){let u=e[l];if(typeof e[l]!="object"){o+=`
|
|
379
|
+
`+a+"- "+n(e[l]);continue}Array.isArray(e[l])||(u=f6(e[l],i)),o+=Ba(u,t,n,r,s+=1,i)}return o}else{const o=Object.keys(e);if(o.length===0)return"";let l=s===0&&r.newLineFirst||s>0?`
|
|
380
|
+
`:"",u=!0;for(let c=0;c<o.length;c++){const f=o[c];if(s===0&&r.existingProps.includes(f))continue;const d=typeof e[f]=="object",y=d?":":": ",D=d&&/^\s|-/.test(f)?r.indentation:"",S=a+D,N=u?"":`
|
|
381
|
+
`;if(s===0&&u&&!r.indentFirstObject){const x=Ba(e[f],S,n,r,s+1,0);l+=N+t+f+y+x}else{const x=Ba(e[f],S,n,r,s+1,0);l+=N+a+f+y+x}u=!1}return l}}return n(e)}function f6(e,t){const n={};for(let r=0;r<Object.keys(e).length;r++){const s=Object.keys(e)[r];r===0?n["- ".repeat(t)+s]=e[s]:n[" ".repeat(t)+s]=e[s]}return n}var h6=hs(),ag=/[\\]+"/g,og=gt.Class,Va="__",d6=class{constructor(e,t={},n,r){this.schemaService=e,this.clientCapabilities=t,this.yamlDocument=n,this.telemetry=r,this.completionEnabled=!0,this.arrayPrefixIndentation="",this.isNumberExp=/^\d+$/}configure(e,t){var n;e&&(this.completionEnabled=e.completion),this.customTags=e.customTags,this.yamlVersion=e.yamlVersion,this.isSingleQuote=((n=t==null?void 0:t.yamlFormatterSettings)==null?void 0:n.singleQuote)||!1,this.configuredIndentation=e.indentation,this.disableDefaultProperties=e.disableDefaultProperties,this.parentSkeletonSelectedFirst=e.parentSkeletonSelectedFirst}async doComplete(e,t,n=!1,r=!0){var s;const i=tl.create([],!1);if(!this.completionEnabled)return i;const a=this.yamlDocument.getYamlDocument(e,{customTags:this.customTags,yamlVersion:this.yamlVersion},!0),o=new yr(e);if(this.configuredIndentation)this.indentation=this.configuredIndentation;else{const h=c6(o,2,!0);this.indentation=h.insertSpaces?" ".repeat(h.tabSize):" "}tg(a.documents,n);for(const h of a.documents)h.uri=e.uri;const l=e.offsetAt(t),u=e.getText();if(u.charAt(l-1)===":")return Promise.resolve(i);let c=Fa(l,a);if(c===null)return Promise.resolve(i);c=c.clone();let[f,d]=c.getNodeFromPosition(l,o,this.indentation.length);const y=this.getCurrentWord(e,l);let D=o.getLineContent(t.line);const S=D.substring(t.character),N=/^[ ]+\n?$/.test(S);this.arrayPrefixIndentation="";let x=null;if(N){x=ie.create(t,We.create(t.line,D.length));const h=D.trim().length===0,g=D.match(/^\s*(-)\s*$/);if(f&&ae(f)&&!h&&!g){const m=D.substring(0,t.character),E=m.match(/^[\s-]*([^:]+)?$/)||m.match(/:[ \t]((?!:[ \t]).*)$/);E!=null&&E[1]&&(x=ie.create(We.create(t.line,t.character-E[1].length),We.create(t.line,D.length)))}}else if(f&&ae(f)&&f.value==="null"){const h=e.positionAt(f.range[0]);h.character+=1;const g=e.positionAt(f.range[2]);g.character+=1,x=ie.create(h,g)}else if(f&&ae(f)&&f.value){const h=e.positionAt(f.range[0]);x=ie.create(h,e.positionAt(f.range[1]))}else if(f&&ae(f)&&f.value===null&&y==="-")x=ie.create(t,t),this.arrayPrefixIndentation=" ";else{let h=l-y.length;h>0&&u[h-1]==='"'&&h--,x=ie.create(e.positionAt(h),t)}const k={},b={add:(h,g)=>{const m=function(A){var F;if(((F=k[A.label])==null?void 0:F.label)===Va)return;const T=A.parent.schema,P=Vu(T),V=T.markdownDescription||T.description;let H=i.items.find(K=>{var J;return((J=K.parent)==null?void 0:J.schema)===T&&K.kind===og});H&&H.parent.insertTexts.includes(A.insertText)||(H?H.parent.insertTexts.push(A.insertText):(H={...A,label:P,documentation:V,sortText:"_"+P,kind:og},H.label=H.label||A.label,H.parent.insertTexts=[A.insertText],i.items.push(H)))},E=!!h.parent;let v=h.label;if(!v){console.warn(`Ignoring CompletionItem without label: ${JSON.stringify(h)}`);return}if(La(v)||(v=String(v)),v=v.replace(/[\n]/g,"↵"),v.length>60){const A=v.substr(0,57).trim()+"...";k[A]||(v=A)}if(h.label.toLowerCase()==="regular expression"){const F=h.documentation.value.split(":");v=F.length>0?`${this.getQuote()}\\${JSON.parse(F[1])}${this.getQuote()}`:h.label,h.insertText=v,h.textEdit=_e.replace(x,v)}else{let A=h.insertText.replace(/\${[0-9]+[:|](.*)}/g,(T,P)=>P).replace(/\$([0-9]+)/g,"");const F=A.split(":");let M=F.length>1?F[1].trim():A;M&&/^(['\\"\\])$/.test(M)&&(M=`${this.getQuote()}\\${M}${this.getQuote()}`,A=F.length>1?F[0]+": "+M:M,h.insertText=A),h.insertText.endsWith("$1")&&!E&&(h.insertText=h.insertText.substr(0,h.insertText.length-2)),x&&x.start.line===x.end.line&&(h.textEdit=_e.replace(x,h.insertText))}if(h.label=v,E){m(h);return}this.arrayPrefixIndentation&&this.updateCompletionText(h,this.arrayPrefixIndentation+h.insertText);const L=k[v],C=(L==null?void 0:L.label)!==Va&&(L==null?void 0:L.insertText)!==h.insertText;if(!L)k[v]=h,i.items.push(h);else if(C){const A=this.mergeSimpleInsertTexts(v,L.insertText,h.insertText,g);A?this.updateCompletionText(L,A):(k[v]=h,i.items.push(h))}L&&!L.documentation&&h.documentation&&(L.documentation=h.documentation)},error:h=>{var g;(g=this.telemetry)==null||g.sendError("yaml.completion.error",h)},log:h=>{console.log(h)},getNumberOfProposals:()=>i.items.length,result:i,proposed:k};this.customTags&&this.customTags.length>0&&this.getCustomTagValueCompletions(b),D.endsWith(`
|
|
382
|
+
`)&&(D=D.substr(0,D.length-1));try{const h=await this.schemaService.getSchemaForResource(e.uri,c);if((!h||h.errors.length)&&t.line===0&&t.character===0&&!zu(D)){const v={kind:gt.Text,label:"Inline schema",insertText:"# yaml-language-server: $schema=",insertTextFormat:Je.PlainText};i.items.push(v)}if(zu(D)||C5(a.tokens,l)){const v=D.indexOf("$schema=");return v!==-1&&v+8<=t.character&&this.schemaService.getAllSchemas().forEach(L=>{var C;const A={kind:gt.Constant,label:(C=L.name)!=null?C:L.uri,detail:L.description,insertText:L.uri,insertTextFormat:Je.PlainText,insertTextMode:Zo.asIs};i.items.push(A)}),i}if(!h||h.errors.length)return i;let g=null;if(!f)if(!c.internalDocument.contents||ae(c.internalDocument.contents)){const v=c.internalDocument.createNode({});v.range=[l,l+1,l+1],c.internalDocument.contents=v,c.updateFromInternalDocument(),f=v}else f=c.findClosestNode(l,o),d=!0;const m=f;if(f)if(D.length===0)f=c.internalDocument.contents;else{const v=c.getParent(f);if(v){if(ae(f)){if(f.value){if(Se(v)){if(v.value===f){if(D.trim().length>0&&D.indexOf(":")<0){const L=this.createTempObjNode(y,f,c),C=c.getParent(v);if($e(c.internalDocument.contents)){const A=k5(c.internalDocument.contents,v);typeof A=="number"&&(c.internalDocument.set(A,L),c.updateFromInternalDocument())}else C&&(Ie(C)||$e(C))?(C.set(v.key,L),c.updateFromInternalDocument()):(c.internalDocument.set(v.key,L),c.updateFromInternalDocument());g=L.items[0],f=L}else if(D.trim().length===0){const L=c.getParent(v);L&&(f=L)}}else if(v.key===f){const L=c.getParent(v);g=v,L&&(f=L)}}else if($e(v))if(D.trim().length>0){const L=this.createTempObjNode(y,f,c);v.delete(f),v.add(L),c.updateFromInternalDocument(),f=L}else f=v}else if(f.value===null){if(Se(v)){if(v.key===f)f=v;else if(ve(v.key)&&v.key.range){const L=c.getParent(v);if(d&&L&&Ie(L)&&L5(L))f=L;else{const C=e.positionAt(v.key.range[0]);if(t.character>C.character&&t.line!==C.line){const A=this.createTempObjNode(y,f,c);L&&(Ie(L)||$e(L))?(L.set(v.key,A),c.updateFromInternalDocument()):(c.internalDocument.set(v.key,A),c.updateFromInternalDocument()),g=A.items[0],f=A}else C.character===t.character&&L&&(f=L)}}}else if($e(v))if(D.charAt(t.character-1)!=="-"){const L=this.createTempObjNode(y,f,c);v.delete(f),v.add(L),c.updateFromInternalDocument(),f=L}else if(D.charAt(t.character-1)==="-"){const L=this.createTempObjNode("",f,c);v.delete(f),v.add(L),c.updateFromInternalDocument(),f=L}else f=v}}else if(Ie(f)&&!d&&D.trim().length===0&&$e(v)){const L=o.getLineContent(t.line+1);(o.getLineCount()===t.line+1||L.trim().length===0)&&(f=v)}}else if(ae(f)){const L=this.createTempObjNode(y,f,c);c.internalDocument.contents=L,c.updateFromInternalDocument(),g=L.items[0],f=L}else if(Ie(f))for(const L of f.items)ve(L.value)&&L.value.range&&L.value.range[0]===l+1&&(f=L.value);else if($e(f)&&D.charAt(t.character-1)!=="-"){const L=this.createTempObjNode(y,f,c);L.items=[],c.updateFromInternalDocument();for(const C of f.items)Ie(C)&&C.items.forEach(A=>{L.items.push(A)});f=L}}if(f&&Ie(f)){const v=f.items;for(const L of v)(!g||g!==L)&&ae(L.key)&&(k[L.key.value+""]=el.create(Va));this.addPropertyCompletions(h,c,f,m,"",b,o,x,r),!h&&y.length>0&&u.charAt(l-y.length-1)!=='"'&&b.add({kind:gt.Property,label:y,insertText:this.getInsertTextForProperty(y,null,""),insertTextFormat:Je.Snippet})}const E={};this.getValueCompletions(h,c,f,l,e,b,E,r)}catch(h){(s=this.telemetry)==null||s.sendError("yaml.completion.error",h)}this.finalizeParentCompletion(i);const w=i.items.filter((h,g,m)=>g===m.findIndex(E=>E.label===h.label&&E.insertText===h.insertText&&E.kind===h.kind));return(w==null?void 0:w.length)>0&&(i.items=w),i}updateCompletionText(e,t){e.insertText=t,e.textEdit&&(e.textEdit.newText=t)}mergeSimpleInsertTexts(e,t,n,r){const s=c=>c.includes(`
|
|
383
|
+
`),i=c=>c.startsWith(`
|
|
384
|
+
`),a=c=>{const f=c.indexOf(`
|
|
385
|
+
`);return f>0&&c.substring(f,c.length).trim().length===0};if(s(t)||s(n))return r&&a(t)&&!a(n)&&!i(n)?n:void 0;const o=this.getValuesFromInsertText(t),l=this.getValuesFromInsertText(n),u=Array.prototype.concat(o,l);if(u.length)return u.length===1?`${e}: \${1:${u[0]}}`:`${e}: \${1|${u.join(",")}|}`}getValuesFromInsertText(e){const t=e.substring(e.indexOf(":")+1).trim();if(!t)return[];const n=t.match(/^\${1[|:]([^|]*)+\|?}$/);return n?n[1].split(","):[t]}finalizeParentCompletion(e){const t=n=>{let r=0;return n.map(s=>{const i=s.match(/\$([0-9]+)|\${[0-9]+:/g);if(!i)return s;const a=i.map(l=>+l.replace(/\${([0-9]+)[:|]/g,"$1").replace("$","")).reduce((l,u)=>u>l?u:l,0),o=s.replace(/\$([0-9]+)/g,(l,u)=>"$"+(+u+r)).replace(/\${([0-9]+)[:|]/g,(l,u)=>"${"+(+u+r)+":");return r+=a,o})};e.items.forEach(n=>{if(this.isParentCompletionItem(n)){const r=n.parent.indent||"";let i=t(n.parent.insertTexts).join(`
|
|
386
|
+
${r}`);i.endsWith("$1")&&(i=i.substring(0,i.length-2)),n.insertText=this.arrayPrefixIndentation+i,n.textEdit&&(n.textEdit.newText=n.insertText);const a=i.replace(/\${[0-9]+[:|](.*)}/g,(l,u)=>u).replace(/\$([0-9]+)/g,""),o=n.documentation?[n.documentation,"","----",""]:[];n.documentation={kind:un.Markdown,value:[...o,"```yaml",r+a,"```"].join(`
|
|
387
|
+
`)},delete n.parent}})}createTempObjNode(e,t,n){const r={};r[e]=null;const s=n.internalDocument.createNode(r);return s.range=t.range,s.items[0].key.range=t.range,s.items[0].value.range=t.range,s}addPropertyCompletions(e,t,n,r,s,i,a,o,l){var u,c,f;const d=t.getMatchingSchemas(e.schema,-1,null,l),y=a.getText(o),D=a.getLineContent(o.start.line),S=D.trim().length===0,N=D.indexOf(":")!==-1,x=D.trimLeft().indexOf("-")===0,k=t.getParent(n),b=d.find(g=>g.node.internalNode===r&&g.schema.properties),w=d.filter(g=>g.schema.oneOf).map(g=>g.schema.oneOf)[0];let h=!1;(w==null?void 0:w.length)<d.length&&(w==null||w.forEach((g,m)=>{var E,v;!((E=d[m])!=null&&E.schema.oneOf)&&((v=d[m])==null?void 0:v.schema.properties)===g.properties&&(h=!0)}));for(const g of d){if((g.node.internalNode===n&&!b||g.node.internalNode===r&&!N||((u=g.node.parent)==null?void 0:u.internalNode)===r&&!N)&&!g.inverted){this.collectDefaultSnippets(g.schema,s,i,{newLineFirst:!1,indentFirstObject:!1,shouldIndentWithTab:x});const m=g.schema.properties;if(m){const E=g.schema.maxProperties;if(E===void 0||n.items===void 0||n.items.length<E||n.items.length===E&&!S){for(const v in m)if(Object.prototype.hasOwnProperty.call(m,v)){const L=m[v];if(typeof L=="object"&&!L.deprecationMessage&&!L.doNotSuggest){let C="";if(k&&$e(k)&&n.items.length<=1&&!S){const P=a.getText(),V=P.lastIndexOf("-",n.range[0]-1);if(V>=0){const H=o.end.character-o.start.character;C=" "+P.slice(V+1,n.range[1]-H)}}C+=this.arrayPrefixIndentation;let A;L.type==="array"&&(A=n.items.find(P=>ae(P.key)&&P.key.range&&P.key.value===v&&ae(P.value)&&!P.value.value&&a.getPosition(P.key.range[2]).line===o.end.line-1))&&A&&(Array.isArray(L.items)?this.addSchemaValueCompletions(L.items[0],s,i,{},"property"):typeof L.items=="object"&&L.items.type==="object"&&this.addArrayItemValueCompletion(L.items,s,i));let F=v;(!v.startsWith(y)||!N)&&(F=this.getInsertTextForProperty(v,L,s,C+this.indentation));const M=ae(r)&&r.value===null||Ie(r)&&r.items.length===0,T=((c=g.schema.required)==null?void 0:c.length)>0;(!this.parentSkeletonSelectedFirst||!M||!T)&&i.add({kind:gt.Property,label:v,insertText:F,insertTextFormat:Je.Snippet,documentation:this.fromMarkup(L.markdownDescription)||L.description||""},h),(f=g.schema.required)!=null&&f.includes(v)&&i.add({label:v,insertText:this.getInsertTextForProperty(v,L,s,C+this.indentation),insertTextFormat:Je.Snippet,documentation:this.fromMarkup(L.markdownDescription)||L.description||"",parent:{schema:g.schema,indent:C}})}}}}if(k&&$e(k)&&G8(g.schema)&&this.addSchemaValueCompletions(g.schema,s,i,{},"property",Array.isArray(k.items)),g.schema.propertyNames&&g.schema.additionalProperties&&g.schema.type==="object"){const E=tt(g.schema.propertyNames);if(!E.deprecationMessage&&!E.doNotSuggest){const v=E.title||"property";i.add({kind:gt.Property,label:v,insertText:`\${1:${v}}: `,insertTextFormat:Je.Snippet,documentation:this.fromMarkup(E.markdownDescription)||E.description||""})}}}k&&g.node.internalNode===k&&g.schema.defaultSnippets&&(n.items.length===1?this.collectDefaultSnippets(g.schema,s,i,{newLineFirst:!1,indentFirstObject:!1,shouldIndentWithTab:!0},1):this.collectDefaultSnippets(g.schema,s,i,{newLineFirst:!1,indentFirstObject:!0,shouldIndentWithTab:!1},1))}}getValueCompletions(e,t,n,r,s,i,a,o){let l=null;if(n&&ae(n)&&(n=t.getParent(n)),!n){this.addSchemaValueCompletions(e.schema,"",i,a,"value");return}if(Se(n)){const u=n.value;if(u&&u.range&&r>u.range[0]+u.range[2])return;l=ae(n.key)?n.key.value+"":null,n=t.getParent(n)}if(n&&(l!==null||$e(n))){const c=t.getMatchingSchemas(e.schema,-1,null,o);for(const f of c)if(f.node.internalNode===n&&!f.inverted&&f.schema){if(f.schema.items&&(this.collectDefaultSnippets(f.schema,"",i,{newLineFirst:!1,indentFirstObject:!1,shouldIndentWithTab:!1}),$e(n)&&n.items))if(Array.isArray(f.schema.items)){const d=this.findItemAtOffset(n,s,r);d<f.schema.items.length&&this.addSchemaValueCompletions(f.schema.items[d],"",i,a,"value")}else typeof f.schema.items=="object"&&(f.schema.items.type==="object"||ju(f.schema.items))?this.addSchemaValueCompletions(f.schema.items,"",i,a,"value",!0):this.addSchemaValueCompletions(f.schema.items,"",i,a,"value");if(f.schema.properties){const d=f.schema.properties[l];d&&this.addSchemaValueCompletions(d,"",i,a,"value")}f.schema.additionalProperties&&this.addSchemaValueCompletions(f.schema.additionalProperties,"",i,a,"value")}a.boolean&&(this.addBooleanValueCompletion(!0,"",i),this.addBooleanValueCompletion(!1,"",i)),a.null&&this.addNullValueCompletion("",i)}}addArrayItemValueCompletion(e,t,n,r){const s=Vu(e),i=`- ${this.getInsertTextForObject(e,t).insertText.trimLeft()}`,a=s?" type `"+s+"`":"",o=e.description?" ("+e.description+")":"",l=this.getDocumentationWithMarkdownText(`Create an item of an array${a}${o}`,i);n.add({kind:this.getSuggestionKind(e.type),label:"- (array item) "+(s||r),documentation:l,insertText:i,insertTextFormat:Je.Snippet})}getInsertTextForProperty(e,t,n,r=this.indentation){const s=this.getInsertTextForValue(e,"","string"),i=s+":";let a,o=0;if(t){let l=Array.isArray(t.type)?t.type[0]:t.type;if(l||(t.properties?l="object":t.items?l="array":t.anyOf&&(l="anyOf")),Array.isArray(t.defaultSnippets)){if(t.defaultSnippets.length===1){const u=t.defaultSnippets[0].body;pr(u)&&(a=this.getInsertTextForSnippetValue(u,"",{newLineFirst:!0,indentFirstObject:!1,shouldIndentWithTab:!1},[],1),!a.startsWith(" ")&&!a.startsWith(`
|
|
388
|
+
`)&&(a=" "+a))}o+=t.defaultSnippets.length}if(t.enum&&(!a&&t.enum.length===1&&(a=" "+this.getInsertTextForGuessedValue(t.enum[0],"",l)),o+=t.enum.length),t.const&&(a||(a=this.getInsertTextForGuessedValue(t.const,"",l),a=this.evaluateTab1Symbol(a),a=" "+a),o++),pr(t.default)&&(a||(a=" "+this.getInsertTextForGuessedValue(t.default,"",l)),o++),Array.isArray(t.examples)&&t.examples.length&&(a||(a=" "+this.getInsertTextForGuessedValue(t.examples[0],"",l)),o+=t.examples.length),t.properties)return`${i}
|
|
389
|
+
${this.getInsertTextForObject(t,n,r).insertText}`;if(t.items)return`${i}
|
|
390
|
+
${r}- ${this.getInsertTextForArray(t.items,n,1,r).insertText}`;if(o===0)switch(l){case"boolean":a=" $1";break;case"string":a=" $1";break;case"object":a=`
|
|
391
|
+
${r}`;break;case"array":a=`
|
|
392
|
+
${r}- `;break;case"number":case"integer":a=" ${1:0}";break;case"null":a=" ${1:null}";break;case"anyOf":a=" $1";break;default:return s}}return(!a||o>1)&&(a=" $1"),i+a+n}getInsertTextForObject(e,t,n=this.indentation,r=1){let s="";return e.properties?(Object.keys(e.properties).forEach(i=>{const a=e.properties[i];let o=Array.isArray(a.type)?a.type[0]:a.type;if(o||(a.anyOf&&(o="anyOf"),a.properties&&(o="object"),a.items&&(o="array")),e.required&&e.required.indexOf(i)>-1)switch(o){case"boolean":case"string":case"number":case"integer":case"anyOf":{let l=a.default||a.const;l?(o==="string"&&(l=this.convertToStringValue(l)),s+=`${n}${i}: \${${r++}:${l}}
|
|
393
|
+
`):s+=`${n}${i}: $${r++}
|
|
394
|
+
`;break}case"array":{const l=this.getInsertTextForArray(a.items,t,r++,n),u=l.insertText.split(`
|
|
395
|
+
`);let c=l.insertText;if(u.length>1){for(let f=1;f<u.length;f++){const d=u[f];u[f]=` ${d}`}c=u.join(`
|
|
396
|
+
`)}r=l.insertIndex,s+=`${n}${i}:
|
|
397
|
+
${n}${this.indentation}- ${c}
|
|
398
|
+
`}break;case"object":{const l=this.getInsertTextForObject(a,t,`${n}${this.indentation}`,r++);r=l.insertIndex,s+=`${n}${i}:
|
|
399
|
+
${l.insertText}
|
|
400
|
+
`}break}else if(!this.disableDefaultProperties&&a.default!==void 0)switch(o){case"boolean":case"number":case"integer":s+=`${n}${i==="null"?this.getInsertTextForValue(i,"","string"):i}: \${${r++}:${a.default}}
|
|
401
|
+
`;break;case"string":s+=`${n}${i}: \${${r++}:${this.convertToStringValue(a.default)}}
|
|
402
|
+
`;break}}),s.trim().length===0&&(s=`${n}$${r++}
|
|
403
|
+
`),s=s.trimRight()+t,{insertText:s,insertIndex:r}):(s=`${n}$${r++}
|
|
404
|
+
`,{insertText:s,insertIndex:r})}getInsertTextForArray(e,t,n=1,r=this.indentation){let s="";if(!e)return s=`$${n++}`,{insertText:s,insertIndex:n};let i=Array.isArray(e.type)?e.type[0]:e.type;switch(i||(e.properties&&(i="object"),e.items&&(i="array")),e.type){case"boolean":s=`\${${n++}:false}`;break;case"number":case"integer":s=`\${${n++}:0}`;break;case"string":s=`\${${n++}}`;break;case"object":{const a=this.getInsertTextForObject(e,t,`${r} `,n++);s=a.insertText.trimLeft(),n=a.insertIndex}break}return{insertText:s,insertIndex:n}}getInsertTextForGuessedValue(e,t,n){switch(typeof e){case"object":return e===null?"${1:null}"+t:this.getInsertTextForValue(e,t,n);case"string":{let r=JSON.stringify(e);return r=r.substr(1,r.length-2),r=this.getInsertTextForPlainText(r),n==="string"&&(r=this.convertToStringValue(r)),"${1:"+r+"}"+t}case"number":case"boolean":return"${1:"+e+"}"+t}return this.getInsertTextForValue(e,t,n)}getInsertTextForPlainText(e){return e.replace(/[\\$}]/g,"\\$&")}getInsertTextForValue(e,t,n){if(e===null)return"null";switch(typeof e){case"object":{const r=this.indentation;return this.getInsertTemplateForValue(e,r,{index:1},t)}case"number":case"boolean":return this.getInsertTextForPlainText(e+t)}return n=Array.isArray(n)?n[0]:n,n==="string"&&(e=this.convertToStringValue(e)),this.getInsertTextForPlainText(e+t)}getInsertTemplateForValue(e,t,n,r){if(Array.isArray(e)){let s=`
|
|
405
|
+
`;for(const i of e)s+=`${t}- \${${n.index++}:${i}}
|
|
406
|
+
`;return s}else if(typeof e=="object"){let s=`
|
|
407
|
+
`;for(const i in e)if(Object.prototype.hasOwnProperty.call(e,i)){const a=e[i];s+=`${t}\${${n.index++}:${i}}:`;let o;typeof a=="object"?o=`${this.getInsertTemplateForValue(a,t+this.indentation,n,r)}`:o=` \${${n.index++}:${this.getInsertTextForPlainText(a+r)}}
|
|
408
|
+
`,s+=`${o}`}return s}return this.getInsertTextForPlainText(e+r)}addSchemaValueCompletions(e,t,n,r,s,i){typeof e=="object"&&(this.addEnumValueCompletions(e,t,n,i),this.addDefaultValueCompletions(e,t,n),this.collectTypes(e,r),i&&s==="value"&&!ju(e)&&this.addArrayItemValueCompletion(e,t,n),Array.isArray(e.allOf)&&e.allOf.forEach(a=>this.addSchemaValueCompletions(a,t,n,r,s,i)),Array.isArray(e.anyOf)&&e.anyOf.forEach(a=>this.addSchemaValueCompletions(a,t,n,r,s,i)),Array.isArray(e.oneOf)&&e.oneOf.forEach(a=>this.addSchemaValueCompletions(a,t,n,r,s,i)))}collectTypes(e,t){if(Array.isArray(e.enum)||pr(e.const))return;const n=e.type;Array.isArray(n)?n.forEach(function(r){return t[r]=!0}):n&&(t[n]=!0)}addDefaultValueCompletions(e,t,n,r=0){let s=!1;if(pr(e.default)){let i=e.type,a=e.default;for(let l=r;l>0;l--)a=[a],i="array";let o;typeof a=="object"?o="Default value":o=a.toString().replace(ag,'"'),n.add({kind:this.getSuggestionKind(i),label:o,insertText:this.getInsertTextForValue(a,t,i),insertTextFormat:Je.Snippet,detail:h6("json.suggest.default","Default value")}),s=!0}Array.isArray(e.examples)&&e.examples.forEach(i=>{let a=e.type,o=i;for(let l=r;l>0;l--)o=[o],a="array";n.add({kind:this.getSuggestionKind(a),label:this.getLabelForValue(o),insertText:this.getInsertTextForValue(o,t,a),insertTextFormat:Je.Snippet}),s=!0}),this.collectDefaultSnippets(e,t,n,{newLineFirst:!0,indentFirstObject:!0,shouldIndentWithTab:!0}),!s&&typeof e.items=="object"&&!Array.isArray(e.items)&&this.addDefaultValueCompletions(e.items,t,n,r+1)}addEnumValueCompletions(e,t,n,r){if(pr(e.const)&&!r&&n.add({kind:this.getSuggestionKind(e.type),label:this.getLabelForValue(e.const),insertText:this.getInsertTextForValue(e.const,t,e.type),insertTextFormat:Je.Snippet,documentation:this.fromMarkup(e.markdownDescription)||e.description}),Array.isArray(e.enum))for(let s=0,i=e.enum.length;s<i;s++){const a=e.enum[s];let o=this.fromMarkup(e.markdownDescription)||e.description;e.markdownEnumDescriptions&&s<e.markdownEnumDescriptions.length&&this.doesSupportMarkdown()?o=this.fromMarkup(e.markdownEnumDescriptions[s]):e.enumDescriptions&&s<e.enumDescriptions.length&&(o=e.enumDescriptions[s]),n.add({kind:this.getSuggestionKind(e.type),label:this.getLabelForValue(a),insertText:this.getInsertTextForValue(a,t,e.type),insertTextFormat:Je.Snippet,documentation:o})}}getLabelForValue(e){return e===null?"null":Array.isArray(e)?JSON.stringify(e):""+e}collectDefaultSnippets(e,t,n,r,s=0){if(Array.isArray(e.defaultSnippets))for(const i of e.defaultSnippets){let a=e.type,o=i.body,l=i.label,u,c;if(pr(o)){const f=i.type||e.type;if(s===0&&f==="array"){const y={};Object.keys(o).forEach((D,S)=>{S===0&&!D.startsWith("-")?y[`- ${D}`]=o[D]:y[` ${D}`]=o[D]}),o=y}const d=Object.keys(n.proposed).filter(y=>n.proposed[y].label===Va);if(u=this.getInsertTextForSnippetValue(o,t,r,d),u===""&&o)continue;l=l||this.getLabelForSnippetValue(o)}else if(typeof i.bodyText=="string"){let f="",d="",y="";for(let D=s;D>0;D--)f=f+y+`[
|
|
409
|
+
`,d=d+`
|
|
410
|
+
`+y+"]",y+=this.indentation,a="array";u=f+y+i.bodyText.split(`
|
|
411
|
+
`).join(`
|
|
412
|
+
`+y)+d+t,l=l||u,c=u.replace(/[\n]/g,"")}n.add({kind:i.suggestionKind||this.getSuggestionKind(a),label:l,sortText:i.sortText||i.label,documentation:this.fromMarkup(i.markdownDescription)||i.description,insertText:u,insertTextFormat:Je.Snippet,filterText:c})}}getInsertTextForSnippetValue(e,t,n,r,s){return Ba(e,"",a=>{if(typeof a=="string"){if(a[0]==="^")return a.substr(1);if(a==="true"||a==="false")return`"${a}"`}return a},{...n,indentation:this.indentation,existingProps:r},s)+t}addBooleanValueCompletion(e,t,n){n.add({kind:this.getSuggestionKind("boolean"),label:e?"true":"false",insertText:this.getInsertTextForValue(e,t,"boolean"),insertTextFormat:Je.Snippet,documentation:""})}addNullValueCompletion(e,t){t.add({kind:this.getSuggestionKind("null"),label:"null",insertText:"null"+e,insertTextFormat:Je.Snippet,documentation:""})}getLabelForSnippetValue(e){return JSON.stringify(e).replace(/\$\{\d+:([^}]+)\}|\$\d+/g,"$1")}getCustomTagValueCompletions(e){Vp(this.customTags).forEach(n=>{const r=n.split(" ")[0];this.addCustomTagValueCompletion(e," ",r)})}addCustomTagValueCompletion(e,t,n){e.add({kind:this.getSuggestionKind("string"),label:n,insertText:n+t,insertTextFormat:Je.Snippet,documentation:""})}getDocumentationWithMarkdownText(e,t){let n=e;return this.doesSupportMarkdown()&&(t=t.replace(/\${[0-9]+[:|](.*)}/g,(r,s)=>s).replace(/\$([0-9]+)/g,""),n=this.fromMarkup(`${e}
|
|
413
|
+
\`\`\`
|
|
414
|
+
${t}
|
|
415
|
+
\`\`\``)),n}getSuggestionKind(e){if(Array.isArray(e)){const t=e;e=t.length>0?t[0]:null}if(!e)return gt.Value;switch(e){case"string":return gt.Value;case"object":return gt.Module;case"property":return gt.Property;default:return gt.Value}}getCurrentWord(e,t){let n=t-1;const r=e.getText();for(;n>=0&&`
|
|
416
|
+
\r\v":{[,]}`.indexOf(r.charAt(n))===-1;)n--;return r.substring(n+1,t)}fromMarkup(e){if(e&&this.doesSupportMarkdown())return{kind:un.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(un.Markdown)!==-1}return this.supportsMarkdown}findItemAtOffset(e,t,n){for(let r=e.items.length-1;r>=0;r--){const s=e.items[r];if(ve(s)&&s.range){if(n>s.range[1])return r;if(n>=s.range[0])return r}}return 0}convertToStringValue(e){let t;if(typeof e=="string"?t=["on","off","true","false","yes","no"].includes(e.toLowerCase())?`${this.getQuote()}${e}${this.getQuote()}`:e:t=""+e,t.length===0)return t;if(t==="true"||t==="false"||t==="null"||this.isNumberExp.test(t))return`"${t}"`;t.indexOf('"')!==-1&&(t=t.replace(ag,'"'));let n=!isNaN(parseInt(t))||t.charAt(0)==="@";if(!n){let r=t.indexOf(":",0);for(;r>0&&r<t.length;r=t.indexOf(":",r+1)){if(r===t.length-1){n=!0;break}const s=t.charAt(r+1);if(s===" "||s===" "){n=!0;break}}}return n&&(t=`"${t}"`),t}getQuote(){return this.isSingleQuote?"'":'"'}evaluateTab1Symbol(e){return e.replace(/\$\{1:(.*)\}/,"$1")}isParentCompletionItem(e){return"parent"in e}},m6=class{constructor(e){this.telemetry=e}getDefinition(e,t){var n;try{const r=Vt.getYamlDocument(e),s=e.offsetAt(t.position),i=Fa(s,r);if(i){const[a]=i.getNodeFromPosition(s,new yr(e));if(a&&Rt(a)){const o=a.resolve(i.internalDocument);if(o&&o.range){const l=ie.create(e.positionAt(o.range[0]),e.positionAt(o.range[2])),u=ie.create(e.positionAt(o.range[0]),e.positionAt(o.range[1]));return[jo.create(e.uri,l,u)]}}}}catch(r){(n=this.telemetry)==null||n.sendError("yaml.definition.error",r)}}};function p6(e,t){const n=Vt.getYamlDocument(e);return t.map(a=>{const o=r(a);let l;for(const u of o)l=Oi.create(u,l);return l??Oi.create({start:a,end:a})});function r(a){const o=e.offsetAt(a),l=[];for(const u of n.documents){let c,f;for(u.visit(d=>{const y=d.offset+d.length;if(y<o||i(y-1,y)===`
|
|
417
|
+
`&&y-1<o)return!0;let D=d.offset;if(D>o){const S=s(d,a);if(!S||S>o)return!0;D=S}return(!c||D>=c.offset)&&(c=d,f=D),!0});c;){const d=f??c.offset,y=c.offset+c.length,D={start:e.positionAt(d),end:e.positionAt(y)},S=e.getText(D),N=g6(S),x=d+N.length;x>=o&&(D.end=e.positionAt(x));const k=(b,w)=>N.startsWith(b)&&N.endsWith(w||b);(c.type==="string"&&(k("'")||k('"'))||c.type==="object"&&k("{","}")||c.type==="array"&&k("[","]"))&&l.push({start:e.positionAt(d+1),end:e.positionAt(y-1)}),l.push(D),c=c.parent,f=void 0}if(l.length>0)break}return l.reverse()}function s(a,o){var l;const u=e.positionAt(a.offset);if(u.line===o.line){if(((l=a.parent)==null?void 0:l.type)==="array"&&i(a.offset-2,a.offset)==="- ")return a.offset-2;if(a.type==="array"||a.type==="object"){const c={line:u.line,character:0};if(e.getText({start:c,end:u}).trim().length===0)return e.offsetAt(c)}}}function i(a,o){return e.getText({start:e.positionAt(a),end:e.positionAt(o)})}}function g6(e){return e.endsWith(`\r
|
|
418
|
+
`)?e.substring(0,e.length-2):e.endsWith(`
|
|
419
|
+
`)?e.substring(0,e.length-1):e}var Ju;(function(e){e[e.SchemaStore=1]="SchemaStore",e[e.SchemaAssociation=2]="SchemaAssociation",e[e.Settings=3]="Settings"})(Ju||(Ju={}));function y6(e){const t=new j5(e.schemaRequestService,e.workspaceContext),n=new d6(t,e.clientCapabilities,Vt,e.telemetry),r=new q5(t,e.telemetry),s=new U5(t,e.telemetry),i=new X5(t,e.telemetry),a=new Z5,o=new s6(e.clientCapabilities),l=new o6(t,e.telemetry),u=new e6(e.telemetry),c=new m6(e.telemetry);return{configure:f=>{t.clearExternalSchemas(),f.schemas&&(t.schemaPriorityMapping=new Map,f.schemas.forEach(d=>{const y=d.priority?d.priority:0;t.addSchemaPriority(d.uri,y),t.registerExternalSchema(d.uri,d.fileMatch,d.schema,d.name,d.description,d.versions)})),i.configure(f),r.configure(f),n.configure(f,e.yamlSettings),a.configure(f),o.configure(f)},registerCustomSchemaProvider:f=>{t.registerCustomSchemaProvider(f)},findLinks:u.findLinks.bind(u),doComplete:n.doComplete.bind(n),doValidation:i.doValidation.bind(i),doHover:r.doHover.bind(r),findDocumentSymbols:s.findDocumentSymbols.bind(s),findDocumentSymbols2:s.findHierarchicalDocumentSymbols.bind(s),doDefinition:c.getDefinition.bind(c),resetSchema:f=>t.onResourceChange(f),doFormat:a.format.bind(a),doDocumentOnTypeFormatting:i6,addSchema:(f,d)=>t.saveSchema(f,d),deleteSchema:f=>t.deleteSchema(f),modifySchemaContent:f=>t.addContent(f),deleteSchemaContent:f=>t.deleteContent(f),deleteSchemasWhole:f=>t.deleteSchemas(f),getFoldingRanges:t6,getSelectionRanges:p6,getCodeAction:(f,d)=>o.getCodeAction(f,d),getCodeLens:f=>l.getCodeLens(f),resolveCodeLens:f=>l.resolveCodeLens(f)}}async function b6(e){const t=await fetch(e);if(t.ok)return t.text();throw new Error(`Schema request failed for ${e}`)}var w6={send(){},sendError(e,t){console.error("monaco-yaml",e,t)},sendTrack(){}},v6={resolveRelativePath(e,t){return String(new URL(e,t))}};u2((e,{enableSchemaRequest:t,...n})=>{const r=y6({schemaRequestService:t?b6:null,telemetry:w6,workspaceContext:v6,clientCapabilities:{textDocument:{completion:{completionItem:{commitCharactersSupport:!0,documentationFormat:["markdown","plaintext"]}},moniker:{}}}}),s=i=>(a,...o)=>{const l=e.getMirrorModels();for(const u of l)if(String(u.uri)===a)return i(Po.create(a,"yaml",u.version,u.getValue()),...o)};return r.configure(n),{doValidation:s(i=>r.doValidation(i,!!n.isKubernetes)),doComplete:s((i,a)=>r.doComplete(i,a,!!n.isKubernetes)),doDefinition:s((i,a)=>r.doDefinition(i,{position:a,textDocument:i})),doDocumentOnTypeFormatting:s((i,a,o,l)=>r.doDocumentOnTypeFormatting(i,{ch:o,options:l,position:a,textDocument:i})),doHover:s(r.doHover),format:s(r.doFormat),resetSchema:r.resetSchema,findDocumentSymbols:s(r.findDocumentSymbols2),findLinks:s(r.findLinks),getCodeAction:s((i,a,o)=>r.getCodeAction(i,{range:a,textDocument:i,context:o})),getFoldingRanges:s(i=>r.getFoldingRanges(i,{lineFoldingOnly:!0})),getSelectionRanges:s(r.getSelectionRanges)}})})();
|