@highstate/designer 0.15.0 → 0.17.0
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/.output/nitro.json +1 -1
- package/.output/public/_nuxt/{xiAiC-VY.js → -oaD50UK.js} +1 -1
- package/.output/public/_nuxt/{CodzMKzx.js → 0ekw3e2V.js} +1 -1
- package/.output/public/_nuxt/{CM0USXxa.js → 1f5tAgHw.js} +1 -1
- package/.output/public/_nuxt/{DTEvwfme.js → 54_UD3a3.js} +1 -1
- package/.output/public/_nuxt/{8hNo2oxe.js → 5ggY4uig.js} +1 -1
- package/.output/public/_nuxt/{htyOXo2B.js → 6EZimURw.js} +1 -1
- package/.output/public/_nuxt/{Be3bUPYU.js → BFNM2w_f.js} +1 -1
- package/.output/public/_nuxt/{BBhg39jC.js → BGLu70Yq.js} +1 -1
- package/.output/public/_nuxt/{8KpM6cBw.js → BIuj43Wh.js} +1 -1
- package/.output/public/_nuxt/BNGfscqk.js +1 -0
- package/.output/public/_nuxt/{C1OzDFAd.js → BUXOnL59.js} +1 -1
- package/.output/public/_nuxt/{BYmHaUHG.js → Bbwybh3N.js} +1 -1
- package/.output/public/_nuxt/{DaZa-Z5n.js → BczD6j-v.js} +1 -1
- package/.output/public/_nuxt/{B13CirDR.js → Bh0qehhp.js} +1 -1
- package/.output/public/_nuxt/{rtii14lI.js → BmDdxTjo.js} +1 -1
- package/.output/public/_nuxt/{DdSZEM1_.js → BqeRdtD4.js} +2 -2
- package/.output/public/_nuxt/{B3_RfxPY.js → BxZD33h1.js} +1 -1
- package/.output/public/_nuxt/{C-Sr9OUA.js → CCd08HS_.js} +1 -1
- package/.output/public/_nuxt/{DIo7DiTh.js → CJ6lOLXp.js} +1 -1
- package/.output/public/_nuxt/CN9dMhDM.js +1 -0
- package/.output/public/_nuxt/{HXyjJC-p.js → CQ4fj8p0.js} +1 -1
- package/.output/public/_nuxt/{CXHtlxuP.js → CXxzV4dz.js} +1 -1
- package/.output/public/_nuxt/{BktRuikR.js → CatV_12G.js} +1 -1
- package/.output/public/_nuxt/{bgIcLC22.js → CeMkeBDb.js} +1 -1
- package/.output/public/_nuxt/{CBZUZSSS.js → CelvVQyk.js} +1 -1
- package/.output/public/_nuxt/{CnrObePb.js → CfV455SO.js} +1 -1
- package/.output/public/_nuxt/{D9ayVCRO.js → CfqrF6sE.js} +1 -1
- package/.output/public/_nuxt/{Bi--9362.js → Cfs9EX91.js} +1 -1
- package/.output/public/_nuxt/{LXHlNQaX.js → ChM1GEGa.js} +1 -1
- package/.output/public/_nuxt/CimE6O20.js +280 -0
- package/.output/public/_nuxt/CtwNW5xN.js +1 -0
- package/.output/public/_nuxt/{D9yrQeKB.js → Cu8OsqJL.js} +1 -1
- package/.output/public/_nuxt/{BCAAo2Xs.js → CusJppg0.js} +1 -1
- package/.output/public/_nuxt/{DZALWWcz.js → CvELRi2k.js} +1 -1
- package/.output/public/_nuxt/{c7cuww2j.js → Cw6nGM9K.js} +1 -1
- package/.output/public/_nuxt/{DfRNGSx_.js → CwUT5n6w.js} +1 -1
- package/.output/public/_nuxt/{DazHGnQt.js → D-AHKB2i.js} +1 -1
- package/.output/public/_nuxt/{BQe-EN0e.js → D-kcn2fr.js} +1 -1
- package/.output/public/_nuxt/{gPpeS_SO.js → D1ibY74j.js} +1 -1
- package/.output/public/_nuxt/D34EmFco.js +1 -0
- package/.output/public/_nuxt/{BQKBEqPh.js → D4OhWExI.js} +1 -1
- package/.output/public/_nuxt/{WyI18QTo.js → DDHikT5j.js} +1 -1
- package/.output/public/_nuxt/{CDPBuKr5.js → DDTT3lYc.js} +1 -1
- package/.output/public/_nuxt/DFsBSlE_.js +1 -0
- package/.output/public/_nuxt/{B7HXz7Pj.js → DHLkt8Yr.js} +1 -1
- package/.output/public/_nuxt/{B0CZVjFF.js → DHuTDtaT.js} +1 -1
- package/.output/public/_nuxt/{CYdh-fCb.js → DRzH1pOL.js} +1 -1
- package/.output/public/_nuxt/DSUF3NDE.js +1 -0
- package/.output/public/_nuxt/{Bu-pZzEo.js → DWmtspXK.js} +1 -1
- package/.output/public/_nuxt/DXh9HyqW.js +1 -0
- package/.output/public/_nuxt/DXtl0MQI.js +1 -0
- package/.output/public/_nuxt/{BxDN7GvZ.js → D_zCY0Xl.js} +1 -1
- package/.output/public/_nuxt/{DwgroK_o.js → DaZJpzOl.js} +1 -1
- package/.output/public/_nuxt/{BC4bzN3h.js → DcmvOc98.js} +1 -1
- package/.output/public/_nuxt/DhQfdAdO.js +1 -0
- package/.output/public/_nuxt/{C492izQx.js → Dm4QKadl.js} +8 -8
- package/.output/public/_nuxt/{BaNZZ_dQ.js → DmCK90gL.js} +1 -1
- package/.output/public/_nuxt/DqRHBxBn.js +1 -0
- package/.output/public/_nuxt/{Clpw7Yi1.js → DtFoCuZo.js} +1 -1
- package/.output/public/_nuxt/{CBhhCAGJ.js → DxuitVdg.js} +1 -1
- package/.output/public/_nuxt/{yQo4vWqK.js → GAB5JH5K.js} +1 -1
- package/.output/public/_nuxt/{Doe3qPsx.js → LUl67wzp.js} +1 -1
- package/.output/public/_nuxt/{CuLjlXlo.js → M2rHlmBj.js} +1 -1
- package/.output/public/_nuxt/{CAWn6QGE.js → U3pqMjXV.js} +1 -1
- package/.output/public/_nuxt/XrMy4kkt.js +1 -0
- package/.output/public/_nuxt/{CiW4qRt5.js → YB_1Ta41.js} +1 -1
- package/.output/public/_nuxt/{Xt7jYYu7.js → YXI84j39.js} +1 -1
- package/.output/public/_nuxt/{DAbczt3Y.js → ZZ6g6dXy.js} +1 -1
- package/.output/public/_nuxt/builds/latest.json +1 -1
- package/.output/public/_nuxt/builds/meta/5447597b-48ec-41ad-8928-729a28784f20.json +1 -0
- package/.output/public/_nuxt/{edge-router-qFL00oIW.js → edge-router-yEORMNQw.js} +1 -1
- package/.output/public/_nuxt/{entry.CvsoFAPr.css → entry.BAsn-2au.css} +1 -1
- package/.output/public/_nuxt/error-404.h4BWQQPs.css +1 -0
- package/.output/public/_nuxt/error-500.B72O9eXJ.css +1 -0
- package/.output/public/_nuxt/{AlZVL3pR.js → ga9TZ2z5.js} +1 -1
- package/.output/public/_nuxt/graph-resolver-Cs66Hj63.js +166 -0
- package/.output/public/_nuxt/ih8zLb53.js +14 -0
- package/.output/public/_nuxt/{B0MclPaN.js → ov4D99rA.js} +1 -1
- package/.output/public/_nuxt/{BcIhEyqj.js → qYU5Tabh.js} +1 -1
- package/.output/public/_nuxt/{vuetify.DF63EsYl.css → vuetify.BrkCt9t5.css} +1 -1
- package/.output/public/_nuxt/{yaml.worker-B7qHIEmf.js → yaml.worker-CQ6dFw39.js} +10 -10
- package/.output/server/index.mjs +1527 -1527
- package/.output/server/index.mjs.map +1 -1
- package/.output/server/package.json +1 -1
- package/package.json +4 -4
- package/.output/public/_nuxt/3xoHIewA.js +0 -283
- package/.output/public/_nuxt/6pS6ZuG3.js +0 -1
- package/.output/public/_nuxt/B8cfqe27.js +0 -16
- package/.output/public/_nuxt/BJeaBD25.js +0 -1
- package/.output/public/_nuxt/CZeOmOJM.js +0 -1
- package/.output/public/_nuxt/CgmzNBdw.js +0 -1
- package/.output/public/_nuxt/CqbFpzKO.js +0 -1
- package/.output/public/_nuxt/DA8LIUWa.js +0 -1
- package/.output/public/_nuxt/DbcOKM93.js +0 -1
- package/.output/public/_nuxt/DeyR_GFX.js +0 -1
- package/.output/public/_nuxt/MBzYIBwY.js +0 -1
- package/.output/public/_nuxt/SucuqcV1.js +0 -1
- package/.output/public/_nuxt/builds/meta/40fca5d2-f9f2-4e82-849f-81a42733e9df.json +0 -1
- package/.output/public/_nuxt/error-404.CtwfpkiA.css +0 -1
- package/.output/public/_nuxt/error-500.OXvA_D27.css +0 -1
- package/.output/public/_nuxt/graph-resolver-CizqVag8.js +0 -169
- package/.output/public/_nuxt/luRfMbTH.js +0 -1
|
@@ -18,7 +18,7 @@ class ig{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(t)
|
|
|
18
18
|
`+" ".repeat(t));var Hi;(function(e){e.DEFAULT={allowTrailingComma:!1}})(Hi||(Hi={}));function Qy(e,t=[],n=Hi.DEFAULT){let r=null,s=[];const i=[];function o(l){Array.isArray(s)?s.push(l):r!==null&&(s[r]=l)}return Ky(e,{onObjectBegin:()=>{const l={};o(l),i.push(s),s=l,r=null},onObjectProperty:l=>{r=l},onObjectEnd:()=>{s=i.pop()},onArrayBegin:()=>{const l=[];o(l),i.push(s),s=l,r=null},onArrayEnd:()=>{s=i.pop()},onLiteralValue:o,onError:(l,u,f)=>{t.push({error:l,offset:u,length:f})}},n),s[0]}function Oa(e){switch(e.type){case"array":return e.children.map(Oa);case"object":const t=Object.create(null);for(let n of e.children){const r=n.children[1];r&&(t[n.children[0].value]=Oa(r))}return t;case"null":case"string":case"number":case"boolean":return e.value;default:return}}function Ky(e,t,n=Hi.DEFAULT){const r=Jy(e,!1),s=[];let i=0;function o(T){return T?()=>i===0&&T(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}function a(T){return T?M=>i===0&&T(M,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}function l(T){return T?M=>i===0&&T(M,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),()=>s.slice()):()=>!0}function u(T){return T?()=>{i>0?i++:T(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),()=>s.slice())===!1&&(i=1)}:()=>!0}function f(T){return T?()=>{i>0&&i--,i===0&&T(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter())}:()=>!0}const c=u(t.onObjectBegin),d=l(t.onObjectProperty),g=f(t.onObjectEnd),w=u(t.onArrayBegin),A=f(t.onArrayEnd),E=l(t.onLiteralValue),N=a(t.onSeparator),C=o(t.onComment),y=a(t.onError),p=n&&n.disallowComments,h=n&&n.allowTrailingComma;function m(){for(;;){const T=r.scan();switch(r.getTokenError()){case 4:v(14);break;case 5:v(15);break;case 3:v(13);break;case 1:p||v(11);break;case 2:v(12);break;case 6:v(16);break}switch(T){case 12:case 13:p?v(10):C();break;case 16:v(1);break;case 15:case 14:break;default:return T}}}function v(T,M=[],P=[]){if(y(T),M.length+P.length>0){let B=r.getToken();for(;B!==17;){if(M.indexOf(B)!==-1){m();break}else if(P.indexOf(B)!==-1)break;B=m()}}}function S(T){const M=r.getTokenValue();return T?E(M):(d(M),s.push(M)),m(),!0}function D(){switch(r.getToken()){case 11:const T=r.getTokenValue();let M=Number(T);isNaN(M)&&(v(2),M=0),E(M);break;case 7:E(null);break;case 8:E(!0);break;case 9:E(!1);break;default:return!1}return m(),!0}function L(){return r.getToken()!==10?(v(3,[],[2,5]),!1):(S(!1),r.getToken()===6?(N(":"),m(),_()||v(4,[],[2,5])):v(5,[],[2,5]),s.pop(),!0)}function k(){c(),m();let T=!1;for(;r.getToken()!==2&&r.getToken()!==17;){if(r.getToken()===5){if(T||v(4,[],[]),N(","),m(),r.getToken()===2&&h)break}else T&&v(6,[],[]);L()||v(4,[],[2,5]),T=!0}return g(),r.getToken()!==2?v(7,[2],[]):m(),!0}function x(){w(),m();let T=!0,M=!1;for(;r.getToken()!==4&&r.getToken()!==17;){if(r.getToken()===5){if(M||v(4,[],[]),N(","),m(),r.getToken()===4&&h)break}else M&&v(6,[],[]);T?(s.push(0),T=!1):s[s.length-1]++,_()||v(4,[],[4,5]),M=!0}return A(),T||s.pop(),r.getToken()!==4?v(8,[4],[]):m(),!0}function _(){switch(r.getToken()){case 3:return x();case 1:return k();case 10:return S(!0);default:return D()}}return m(),r.getToken()===17?n.allowEmptyContent?!0:(v(4,[],[]),!1):_()?(r.getToken()!==17&&v(9,[],[]),!0):(v(4,[],[]),!1)}var Ef;(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"})(Ef||(Ef={}));var Af;(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"})(Af||(Af={}));const Xy=Qy,Zy=Oa;var Nf;(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"})(Nf||(Nf={}));var t1;(()=>{var e={975:k=>{function x(M){if(typeof M!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(M))}function _(M,P){for(var B,W="",G=0,J=-1,$=0,Y=0;Y<=M.length;++Y){if(Y<M.length)B=M.charCodeAt(Y);else{if(B===47)break;B=47}if(B===47){if(!(J===Y-1||$===1))if(J!==Y-1&&$===2){if(W.length<2||G!==2||W.charCodeAt(W.length-1)!==46||W.charCodeAt(W.length-2)!==46){if(W.length>2){var X=W.lastIndexOf("/");if(X!==W.length-1){X===-1?(W="",G=0):G=(W=W.slice(0,X)).length-1-W.lastIndexOf("/"),J=Y,$=0;continue}}else if(W.length===2||W.length===1){W="",G=0,J=Y,$=0;continue}}P&&(W.length>0?W+="/..":W="..",G=2)}else W.length>0?W+="/"+M.slice(J+1,Y):W=M.slice(J+1,Y),G=Y-J-1;J=Y,$=0}else B===46&&$!==-1?++$:$=-1}return W}var T={resolve:function(){for(var M,P="",B=!1,W=arguments.length-1;W>=-1&&!B;W--){var G;W>=0?G=arguments[W]:(M===void 0&&(M=process.cwd()),G=M),x(G),G.length!==0&&(P=G+"/"+P,B=G.charCodeAt(0)===47)}return P=_(P,!B),B?P.length>0?"/"+P:"/":P.length>0?P:"."},normalize:function(M){if(x(M),M.length===0)return".";var P=M.charCodeAt(0)===47,B=M.charCodeAt(M.length-1)===47;return(M=_(M,!P)).length!==0||P||(M="."),M.length>0&&B&&(M+="/"),P?"/"+M:M},isAbsolute:function(M){return x(M),M.length>0&&M.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var M,P=0;P<arguments.length;++P){var B=arguments[P];x(B),B.length>0&&(M===void 0?M=B:M+="/"+B)}return M===void 0?".":T.normalize(M)},relative:function(M,P){if(x(M),x(P),M===P||(M=T.resolve(M))===(P=T.resolve(P)))return"";for(var B=1;B<M.length&&M.charCodeAt(B)===47;++B);for(var W=M.length,G=W-B,J=1;J<P.length&&P.charCodeAt(J)===47;++J);for(var $=P.length-J,Y=G<$?G:$,X=-1,Q=0;Q<=Y;++Q){if(Q===Y){if($>Y){if(P.charCodeAt(J+Q)===47)return P.slice(J+Q+1);if(Q===0)return P.slice(J+Q)}else G>Y&&(M.charCodeAt(B+Q)===47?X=Q:Q===0&&(X=0));break}var te=M.charCodeAt(B+Q);if(te!==P.charCodeAt(J+Q))break;te===47&&(X=Q)}var se="";for(Q=B+X+1;Q<=W;++Q)Q!==W&&M.charCodeAt(Q)!==47||(se.length===0?se+="..":se+="/..");return se.length>0?se+P.slice(J+X):(J+=X,P.charCodeAt(J)===47&&++J,P.slice(J))},_makeLong:function(M){return M},dirname:function(M){if(x(M),M.length===0)return".";for(var P=M.charCodeAt(0),B=P===47,W=-1,G=!0,J=M.length-1;J>=1;--J)if((P=M.charCodeAt(J))===47){if(!G){W=J;break}}else G=!1;return W===-1?B?"/":".":B&&W===1?"//":M.slice(0,W)},basename:function(M,P){if(P!==void 0&&typeof P!="string")throw new TypeError('"ext" argument must be a string');x(M);var B,W=0,G=-1,J=!0;if(P!==void 0&&P.length>0&&P.length<=M.length){if(P.length===M.length&&P===M)return"";var $=P.length-1,Y=-1;for(B=M.length-1;B>=0;--B){var X=M.charCodeAt(B);if(X===47){if(!J){W=B+1;break}}else Y===-1&&(J=!1,Y=B+1),$>=0&&(X===P.charCodeAt($)?--$==-1&&(G=B):($=-1,G=Y))}return W===G?G=Y:G===-1&&(G=M.length),M.slice(W,G)}for(B=M.length-1;B>=0;--B)if(M.charCodeAt(B)===47){if(!J){W=B+1;break}}else G===-1&&(J=!1,G=B+1);return G===-1?"":M.slice(W,G)},extname:function(M){x(M);for(var P=-1,B=0,W=-1,G=!0,J=0,$=M.length-1;$>=0;--$){var Y=M.charCodeAt($);if(Y!==47)W===-1&&(G=!1,W=$+1),Y===46?P===-1?P=$:J!==1&&(J=1):P!==-1&&(J=-1);else if(!G){B=$+1;break}}return P===-1||W===-1||J===0||J===1&&P===W-1&&P===B+1?"":M.slice(P,W)},format:function(M){if(M===null||typeof M!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof M);return(function(P,B){var W=B.dir||B.root,G=B.base||(B.name||"")+(B.ext||"");return W?W===B.root?W+G:W+"/"+G:G})(0,M)},parse:function(M){x(M);var P={root:"",dir:"",base:"",ext:"",name:""};if(M.length===0)return P;var B,W=M.charCodeAt(0),G=W===47;G?(P.root="/",B=1):B=0;for(var J=-1,$=0,Y=-1,X=!0,Q=M.length-1,te=0;Q>=B;--Q)if((W=M.charCodeAt(Q))!==47)Y===-1&&(X=!1,Y=Q+1),W===46?J===-1?J=Q:te!==1&&(te=1):J!==-1&&(te=-1);else if(!X){$=Q+1;break}return J===-1||Y===-1||te===0||te===1&&J===Y-1&&J===$+1?Y!==-1&&(P.base=P.name=$===0&&G?M.slice(1,Y):M.slice($,Y)):($===0&&G?(P.name=M.slice(1,J),P.base=M.slice(1,Y)):(P.name=M.slice($,J),P.base=M.slice($,Y)),P.ext=M.slice(J,Y)),$>0?P.dir=M.slice(0,$-1):G&&(P.dir="/"),P},sep:"/",delimiter:":",win32:null,posix:null};T.posix=T,k.exports=T}},t={};function n(k){var x=t[k];if(x!==void 0)return x.exports;var _=t[k]={exports:{}};return e[k](_,_.exports,n),_.exports}n.d=(k,x)=>{for(var _ in x)n.o(x,_)&&!n.o(k,_)&&Object.defineProperty(k,_,{enumerable:!0,get:x[_]})},n.o=(k,x)=>Object.prototype.hasOwnProperty.call(k,x),n.r=k=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(k,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(k,"__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+.-]*$/,o=/^\//,a=/^\/\//;function l(k,x){if(!k.scheme&&x)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${k.authority}", path: "${k.path}", query: "${k.query}", fragment: "${k.fragment}"}`);if(k.scheme&&!i.test(k.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(k.path){if(k.authority){if(!o.test(k.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(a.test(k.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="",f="/",c=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class d{static isUri(x){return x instanceof d||!!x&&typeof x.authority=="string"&&typeof x.fragment=="string"&&typeof x.path=="string"&&typeof x.query=="string"&&typeof x.scheme=="string"&&typeof x.fsPath=="string"&&typeof x.with=="function"&&typeof x.toString=="function"}scheme;authority;path;query;fragment;constructor(x,_,T,M,P,B=!1){typeof x=="object"?(this.scheme=x.scheme||u,this.authority=x.authority||u,this.path=x.path||u,this.query=x.query||u,this.fragment=x.fragment||u):(this.scheme=(function(W,G){return W||G?W:"file"})(x,B),this.authority=_||u,this.path=(function(W,G){switch(W){case"https":case"http":case"file":G?G[0]!==f&&(G=f+G):G=f}return G})(this.scheme,T||u),this.query=M||u,this.fragment=P||u,l(this,B))}get fsPath(){return C(this)}with(x){if(!x)return this;let{scheme:_,authority:T,path:M,query:P,fragment:B}=x;return _===void 0?_=this.scheme:_===null&&(_=u),T===void 0?T=this.authority:T===null&&(T=u),M===void 0?M=this.path:M===null&&(M=u),P===void 0?P=this.query:P===null&&(P=u),B===void 0?B=this.fragment:B===null&&(B=u),_===this.scheme&&T===this.authority&&M===this.path&&P===this.query&&B===this.fragment?this:new w(_,T,M,P,B)}static parse(x,_=!1){const T=c.exec(x);return T?new w(T[2]||u,m(T[4]||u),m(T[5]||u),m(T[7]||u),m(T[9]||u),_):new w(u,u,u,u,u)}static file(x){let _=u;if(s&&(x=x.replace(/\\/g,f)),x[0]===f&&x[1]===f){const T=x.indexOf(f,2);T===-1?(_=x.substring(2),x=f):(_=x.substring(2,T),x=x.substring(T)||f)}return new w("file",_,x,u,u)}static from(x){const _=new w(x.scheme,x.authority,x.path,x.query,x.fragment);return l(_,!0),_}toString(x=!1){return y(this,x)}toJSON(){return this}static revive(x){if(x){if(x instanceof d)return x;{const _=new w(x);return _._formatted=x.external,_._fsPath=x._sep===g?x.fsPath:null,_}}return x}}const g=s?1:void 0;class w extends d{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=C(this)),this._fsPath}toString(x=!1){return x?y(this,!0):(this._formatted||(this._formatted=y(this,!1)),this._formatted)}toJSON(){const x={$mid:1};return this._fsPath&&(x.fsPath=this._fsPath,x._sep=g),this._formatted&&(x.external=this._formatted),this.path&&(x.path=this.path),this.scheme&&(x.scheme=this.scheme),this.authority&&(x.authority=this.authority),this.query&&(x.query=this.query),this.fragment&&(x.fragment=this.fragment),x}}const A={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 E(k,x,_){let T,M=-1;for(let P=0;P<k.length;P++){const B=k.charCodeAt(P);if(B>=97&&B<=122||B>=65&&B<=90||B>=48&&B<=57||B===45||B===46||B===95||B===126||x&&B===47||_&&B===91||_&&B===93||_&&B===58)M!==-1&&(T+=encodeURIComponent(k.substring(M,P)),M=-1),T!==void 0&&(T+=k.charAt(P));else{T===void 0&&(T=k.substr(0,P));const W=A[B];W!==void 0?(M!==-1&&(T+=encodeURIComponent(k.substring(M,P)),M=-1),T+=W):M===-1&&(M=P)}}return M!==-1&&(T+=encodeURIComponent(k.substring(M))),T!==void 0?T:k}function N(k){let x;for(let _=0;_<k.length;_++){const T=k.charCodeAt(_);T===35||T===63?(x===void 0&&(x=k.substr(0,_)),x+=A[T]):x!==void 0&&(x+=k[_])}return x!==void 0?x:k}function C(k,x){let _;return _=k.authority&&k.path.length>1&&k.scheme==="file"?`//${k.authority}${k.path}`:k.path.charCodeAt(0)===47&&(k.path.charCodeAt(1)>=65&&k.path.charCodeAt(1)<=90||k.path.charCodeAt(1)>=97&&k.path.charCodeAt(1)<=122)&&k.path.charCodeAt(2)===58?k.path[1].toLowerCase()+k.path.substr(2):k.path,s&&(_=_.replace(/\//g,"\\")),_}function y(k,x){const _=x?N:E;let T="",{scheme:M,authority:P,path:B,query:W,fragment:G}=k;if(M&&(T+=M,T+=":"),(P||M==="file")&&(T+=f,T+=f),P){let J=P.indexOf("@");if(J!==-1){const $=P.substr(0,J);P=P.substr(J+1),J=$.lastIndexOf(":"),J===-1?T+=_($,!1,!1):(T+=_($.substr(0,J),!1,!1),T+=":",T+=_($.substr(J+1),!1,!0)),T+="@"}P=P.toLowerCase(),J=P.lastIndexOf(":"),J===-1?T+=_(P,!1,!0):(T+=_(P.substr(0,J),!1,!0),T+=P.substr(J))}if(B){if(B.length>=3&&B.charCodeAt(0)===47&&B.charCodeAt(2)===58){const J=B.charCodeAt(1);J>=65&&J<=90&&(B=`/${String.fromCharCode(J+32)}:${B.substr(3)}`)}else if(B.length>=2&&B.charCodeAt(1)===58){const J=B.charCodeAt(0);J>=65&&J<=90&&(B=`${String.fromCharCode(J+32)}:${B.substr(2)}`)}T+=_(B,!0,!1)}return W&&(T+="?",T+=_(W,!1,!1)),G&&(T+="#",T+=x?G:E(G,!1,!1)),T}function p(k){try{return decodeURIComponent(k)}catch{return k.length>3?k.substr(0,3)+p(k.substr(3)):k}}const h=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function m(k){return k.match(h)?k.replace(h,(x=>p(x))):k}var v=n(975);const S=v.posix||v,D="/";var L;(function(k){k.joinPath=function(x,..._){return x.with({path:S.join(x.path,..._)})},k.resolvePath=function(x,..._){let T=x.path,M=!1;T[0]!==D&&(T=D+T,M=!0);let P=S.resolve(T,..._);return M&&P[0]===D&&!x.authority&&(P=P.substring(1)),x.with({path:P})},k.dirname=function(x){if(x.path.length===0||x.path===D)return x;let _=S.dirname(x.path);return _.length===1&&_.charCodeAt(0)===46&&(_=""),x.with({path:_})},k.basename=function(x){return S.basename(x.path)},k.extname=function(x){return S.extname(x.path)}})(L||(L={})),t1=r})();const{URI:mt,Utils:a6}=t1;var xf;(function(e){function t(n){return typeof n=="string"}e.is=t})(xf||(xf={}));var Ra;(function(e){function t(n){return typeof n=="string"}e.is=t})(Ra||(Ra={}));var Lf;(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})(Lf||(Lf={}));var Yi;(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})(Yi||(Yi={}));var Ye;(function(e){function t(r,s){return r===Number.MAX_VALUE&&(r=Yi.MAX_VALUE),s===Number.MAX_VALUE&&(s=Yi.MAX_VALUE),{line:r,character:s}}e.create=t;function n(r){let s=r;return U.objectLiteral(s)&&U.uinteger(s.line)&&U.uinteger(s.character)}e.is=n})(Ye||(Ye={}));var re;(function(e){function t(r,s,i,o){if(U.uinteger(r)&&U.uinteger(s)&&U.uinteger(i)&&U.uinteger(o))return{start:Ye.create(r,s),end:Ye.create(i,o)};if(Ye.is(r)&&Ye.is(s))return{start:r,end:s};throw new Error(`Range#create called with invalid arguments[${r}, ${s}, ${i}, ${o}]`)}e.create=t;function n(r){let s=r;return U.objectLiteral(s)&&Ye.is(s.start)&&Ye.is(s.end)}e.is=n})(re||(re={}));var Wr;(function(e){function t(r,s){return{uri:r,range:s}}e.create=t;function n(r){let s=r;return U.objectLiteral(s)&&re.is(s.range)&&(U.string(s.uri)||U.undefined(s.uri))}e.is=n})(Wr||(Wr={}));var Pa;(function(e){function t(r,s,i,o){return{targetUri:r,targetRange:s,targetSelectionRange:i,originSelectionRange:o}}e.create=t;function n(r){let s=r;return U.objectLiteral(s)&&re.is(s.targetRange)&&U.string(s.targetUri)&&re.is(s.targetSelectionRange)&&(re.is(s.originSelectionRange)||U.undefined(s.originSelectionRange))}e.is=n})(Pa||(Pa={}));var Ia;(function(e){function t(r,s,i,o){return{red:r,green:s,blue:i,alpha:o}}e.create=t;function n(r){const s=r;return U.objectLiteral(s)&&U.numberRange(s.red,0,1)&&U.numberRange(s.green,0,1)&&U.numberRange(s.blue,0,1)&&U.numberRange(s.alpha,0,1)}e.is=n})(Ia||(Ia={}));var Cf;(function(e){function t(r,s){return{range:r,color:s}}e.create=t;function n(r){const s=r;return U.objectLiteral(s)&&re.is(s.range)&&Ia.is(s.color)}e.is=n})(Cf||(Cf={}));var kf;(function(e){function t(r,s,i){return{label:r,textEdit:s,additionalTextEdits:i}}e.create=t;function n(r){const s=r;return U.objectLiteral(s)&&U.string(s.label)&&(U.undefined(s.textEdit)||Ce.is(s))&&(U.undefined(s.additionalTextEdits)||U.typedArray(s.additionalTextEdits,Ce.is))}e.is=n})(kf||(kf={}));var Ff;(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(Ff||(Ff={}));var $a;(function(e){function t(r,s,i,o,a,l){const u={startLine:r,endLine:s};return U.defined(i)&&(u.startCharacter=i),U.defined(o)&&(u.endCharacter=o),U.defined(a)&&(u.kind=a),U.defined(l)&&(u.collapsedText=l),u}e.create=t;function n(r){const s=r;return U.objectLiteral(s)&&U.uinteger(s.startLine)&&U.uinteger(s.startLine)&&(U.undefined(s.startCharacter)||U.uinteger(s.startCharacter))&&(U.undefined(s.endCharacter)||U.uinteger(s.endCharacter))&&(U.undefined(s.kind)||U.string(s.kind))}e.is=n})($a||($a={}));var Ba;(function(e){function t(r,s){return{location:r,message:s}}e.create=t;function n(r){let s=r;return U.defined(s)&&Wr.is(s.location)&&U.string(s.message)}e.is=n})(Ba||(Ba={}));var ae;(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(ae||(ae={}));var Va;(function(e){e.Unnecessary=1,e.Deprecated=2})(Va||(Va={}));var _f;(function(e){function t(n){const r=n;return U.objectLiteral(r)&&U.string(r.href)}e.is=t})(_f||(_f={}));var gt;(function(e){function t(r,s,i,o,a,l){let u={range:r,message:s};return U.defined(i)&&(u.severity=i),U.defined(o)&&(u.code=o),U.defined(a)&&(u.source=a),U.defined(l)&&(u.relatedInformation=l),u}e.create=t;function n(r){var s;let i=r;return U.defined(i)&&re.is(i.range)&&U.string(i.message)&&(U.number(i.severity)||U.undefined(i.severity))&&(U.integer(i.code)||U.string(i.code)||U.undefined(i.code))&&(U.undefined(i.codeDescription)||U.string((s=i.codeDescription)===null||s===void 0?void 0:s.href))&&(U.string(i.source)||U.undefined(i.source))&&(U.undefined(i.relatedInformation)||U.typedArray(i.relatedInformation,Ba.is))}e.is=n})(gt||(gt={}));var tr;(function(e){function t(r,s,...i){let o={title:r,command:s};return U.defined(i)&&i.length>0&&(o.arguments=i),o}e.create=t;function n(r){let s=r;return U.defined(s)&&U.string(s.title)&&U.string(s.command)}e.is=n})(tr||(tr={}));var Ce;(function(e){function t(i,o){return{range:i,newText:o}}e.replace=t;function n(i,o){return{range:{start:i,end:i},newText:o}}e.insert=n;function r(i){return{range:i,newText:""}}e.del=r;function s(i){const o=i;return U.objectLiteral(o)&&U.string(o.newText)&&re.is(o.range)}e.is=s})(Ce||(Ce={}));var ja;(function(e){function t(r,s,i){const o={label:r};return s!==void 0&&(o.needsConfirmation=s),i!==void 0&&(o.description=i),o}e.create=t;function n(r){const s=r;return U.objectLiteral(s)&&U.string(s.label)&&(U.boolean(s.needsConfirmation)||s.needsConfirmation===void 0)&&(U.string(s.description)||s.description===void 0)}e.is=n})(ja||(ja={}));var Hr;(function(e){function t(n){const r=n;return U.string(r)}e.is=t})(Hr||(Hr={}));var Tf;(function(e){function t(i,o,a){return{range:i,newText:o,annotationId:a}}e.replace=t;function n(i,o,a){return{range:{start:i,end:i},newText:o,annotationId:a}}e.insert=n;function r(i,o){return{range:i,newText:"",annotationId:o}}e.del=r;function s(i){const o=i;return Ce.is(o)&&(ja.is(o.annotationId)||Hr.is(o.annotationId))}e.is=s})(Tf||(Tf={}));var Ua;(function(e){function t(r,s){return{textDocument:r,edits:s}}e.create=t;function n(r){let s=r;return U.defined(s)&&za.is(s.textDocument)&&Array.isArray(s.edits)}e.is=n})(Ua||(Ua={}));var qa;(function(e){function t(r,s,i){let o={kind:"create",uri:r};return s!==void 0&&(s.overwrite!==void 0||s.ignoreIfExists!==void 0)&&(o.options=s),i!==void 0&&(o.annotationId=i),o}e.create=t;function n(r){let s=r;return s&&s.kind==="create"&&U.string(s.uri)&&(s.options===void 0||(s.options.overwrite===void 0||U.boolean(s.options.overwrite))&&(s.options.ignoreIfExists===void 0||U.boolean(s.options.ignoreIfExists)))&&(s.annotationId===void 0||Hr.is(s.annotationId))}e.is=n})(qa||(qa={}));var Wa;(function(e){function t(r,s,i,o){let a={kind:"rename",oldUri:r,newUri:s};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(a.options=i),o!==void 0&&(a.annotationId=o),a}e.create=t;function n(r){let s=r;return s&&s.kind==="rename"&&U.string(s.oldUri)&&U.string(s.newUri)&&(s.options===void 0||(s.options.overwrite===void 0||U.boolean(s.options.overwrite))&&(s.options.ignoreIfExists===void 0||U.boolean(s.options.ignoreIfExists)))&&(s.annotationId===void 0||Hr.is(s.annotationId))}e.is=n})(Wa||(Wa={}));var Ha;(function(e){function t(r,s,i){let o={kind:"delete",uri:r};return s!==void 0&&(s.recursive!==void 0||s.ignoreIfNotExists!==void 0)&&(o.options=s),i!==void 0&&(o.annotationId=i),o}e.create=t;function n(r){let s=r;return s&&s.kind==="delete"&&U.string(s.uri)&&(s.options===void 0||(s.options.recursive===void 0||U.boolean(s.options.recursive))&&(s.options.ignoreIfNotExists===void 0||U.boolean(s.options.ignoreIfNotExists)))&&(s.annotationId===void 0||Hr.is(s.annotationId))}e.is=n})(Ha||(Ha={}));var Ya;(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=>U.string(s.kind)?qa.is(s)||Wa.is(s)||Ha.is(s):Ua.is(s)))}e.is=t})(Ya||(Ya={}));var Mf;(function(e){function t(r){return{uri:r}}e.create=t;function n(r){let s=r;return U.defined(s)&&U.string(s.uri)}e.is=n})(Mf||(Mf={}));var Of;(function(e){function t(r,s){return{uri:r,version:s}}e.create=t;function n(r){let s=r;return U.defined(s)&&U.string(s.uri)&&U.integer(s.version)}e.is=n})(Of||(Of={}));var za;(function(e){function t(r,s){return{uri:r,version:s}}e.create=t;function n(r){let s=r;return U.defined(s)&&U.string(s.uri)&&(s.version===null||U.integer(s.version))}e.is=n})(za||(za={}));var Rf;(function(e){function t(r,s,i,o){return{uri:r,languageId:s,version:i,text:o}}e.create=t;function n(r){let s=r;return U.defined(s)&&U.string(s.uri)&&U.string(s.languageId)&&U.integer(s.version)&&U.string(s.text)}e.is=n})(Rf||(Rf={}));var ln;(function(e){e.PlainText="plaintext",e.Markdown="markdown";function t(n){const r=n;return r===e.PlainText||r===e.Markdown}e.is=t})(ln||(ln={}));var Ms;(function(e){function t(n){const r=n;return U.objectLiteral(n)&&ln.is(r.kind)&&U.string(r.value)}e.is=t})(Ms||(Ms={}));var ft;(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})(ft||(ft={}));var ze;(function(e){e.PlainText=1,e.Snippet=2})(ze||(ze={}));var Pf;(function(e){e.Deprecated=1})(Pf||(Pf={}));var If;(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&&U.string(s.newText)&&re.is(s.insert)&&re.is(s.replace)}e.is=n})(If||(If={}));var Ga;(function(e){e.asIs=1,e.adjustIndentation=2})(Ga||(Ga={}));var $f;(function(e){function t(n){const r=n;return r&&(U.string(r.detail)||r.detail===void 0)&&(U.string(r.description)||r.description===void 0)}e.is=t})($f||($f={}));var Ja;(function(e){function t(n){return{label:n}}e.create=t})(Ja||(Ja={}));var Qa;(function(e){function t(n,r){return{items:n||[],isIncomplete:!!r}}e.create=t})(Qa||(Qa={}));var zi;(function(e){function t(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}e.fromPlainText=t;function n(r){const s=r;return U.string(s)||U.objectLiteral(s)&&U.string(s.language)&&U.string(s.value)}e.is=n})(zi||(zi={}));var Bf;(function(e){function t(n){let r=n;return!!r&&U.objectLiteral(r)&&(Ms.is(r.contents)||zi.is(r.contents)||U.typedArray(r.contents,zi.is))&&(n.range===void 0||re.is(n.range))}e.is=t})(Bf||(Bf={}));var Vf;(function(e){function t(n,r){return r?{label:n,documentation:r}:{label:n}}e.create=t})(Vf||(Vf={}));var jf;(function(e){function t(n,r,...s){let i={label:n};return U.defined(r)&&(i.documentation=r),U.defined(s)?i.parameters=s:i.parameters=[],i}e.create=t})(jf||(jf={}));var Uf;(function(e){e.Text=1,e.Read=2,e.Write=3})(Uf||(Uf={}));var qf;(function(e){function t(n,r){let s={range:n};return U.number(r)&&(s.kind=r),s}e.create=t})(qf||(qf={}));var Ut;(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})(Ut||(Ut={}));var Wf;(function(e){e.Deprecated=1})(Wf||(Wf={}));var Hf;(function(e){function t(n,r,s,i,o){let a={name:n,kind:r,location:{uri:i,range:s}};return o&&(a.containerName=o),a}e.create=t})(Hf||(Hf={}));var Yf;(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})(Yf||(Yf={}));var zf;(function(e){function t(r,s,i,o,a,l){let u={name:r,detail:s,kind:i,range:o,selectionRange:a};return l!==void 0&&(u.children=l),u}e.create=t;function n(r){let s=r;return s&&U.string(s.name)&&U.number(s.kind)&&re.is(s.range)&&re.is(s.selectionRange)&&(s.detail===void 0||U.string(s.detail))&&(s.deprecated===void 0||U.boolean(s.deprecated))&&(s.children===void 0||Array.isArray(s.children))&&(s.tags===void 0||Array.isArray(s.tags))}e.is=n})(zf||(zf={}));var nn;(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"})(nn||(nn={}));var Gi;(function(e){e.Invoked=1,e.Automatic=2})(Gi||(Gi={}));var Gf;(function(e){function t(r,s,i){let o={diagnostics:r};return s!=null&&(o.only=s),i!=null&&(o.triggerKind=i),o}e.create=t;function n(r){let s=r;return U.defined(s)&&U.typedArray(s.diagnostics,gt.is)&&(s.only===void 0||U.typedArray(s.only,U.string))&&(s.triggerKind===void 0||s.triggerKind===Gi.Invoked||s.triggerKind===Gi.Automatic)}e.is=n})(Gf||(Gf={}));var qt;(function(e){function t(r,s,i){let o={title:r},a=!0;return typeof s=="string"?(a=!1,o.kind=s):tr.is(s)?o.command=s:o.edit=s,a&&i!==void 0&&(o.kind=i),o}e.create=t;function n(r){let s=r;return s&&U.string(s.title)&&(s.diagnostics===void 0||U.typedArray(s.diagnostics,gt.is))&&(s.kind===void 0||U.string(s.kind))&&(s.edit!==void 0||s.command!==void 0)&&(s.command===void 0||tr.is(s.command))&&(s.isPreferred===void 0||U.boolean(s.isPreferred))&&(s.edit===void 0||Ya.is(s.edit))}e.is=n})(qt||(qt={}));var Ka;(function(e){function t(r,s){let i={range:r};return U.defined(s)&&(i.data=s),i}e.create=t;function n(r){let s=r;return U.defined(s)&&re.is(s.range)&&(U.undefined(s.command)||tr.is(s.command))}e.is=n})(Ka||(Ka={}));var Jf;(function(e){function t(r,s){return{tabSize:r,insertSpaces:s}}e.create=t;function n(r){let s=r;return U.defined(s)&&U.uinteger(s.tabSize)&&U.boolean(s.insertSpaces)}e.is=n})(Jf||(Jf={}));var Qf;(function(e){function t(r,s,i){return{range:r,target:s,data:i}}e.create=t;function n(r){let s=r;return U.defined(s)&&re.is(s.range)&&(U.undefined(s.target)||U.string(s.target))}e.is=n})(Qf||(Qf={}));var Ji;(function(e){function t(r,s){return{range:r,parent:s}}e.create=t;function n(r){let s=r;return U.objectLiteral(s)&&re.is(s.range)&&(s.parent===void 0||e.is(s.parent))}e.is=n})(Ji||(Ji={}));var Kf;(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"})(Kf||(Kf={}));var Xf;(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"})(Xf||(Xf={}));var Zf;(function(e){function t(n){const r=n;return U.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})(Zf||(Zf={}));var eh;(function(e){function t(r,s){return{range:r,text:s}}e.create=t;function n(r){const s=r;return s!=null&&re.is(s.range)&&U.string(s.text)}e.is=n})(eh||(eh={}));var th;(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&&re.is(s.range)&&U.boolean(s.caseSensitiveLookup)&&(U.string(s.variableName)||s.variableName===void 0)}e.is=n})(th||(th={}));var nh;(function(e){function t(r,s){return{range:r,expression:s}}e.create=t;function n(r){const s=r;return s!=null&&re.is(s.range)&&(U.string(s.expression)||s.expression===void 0)}e.is=n})(nh||(nh={}));var rh;(function(e){function t(r,s){return{frameId:r,stoppedLocation:s}}e.create=t;function n(r){const s=r;return U.defined(s)&&re.is(r.stoppedLocation)}e.is=n})(rh||(rh={}));var Xa;(function(e){e.Type=1,e.Parameter=2;function t(n){return n===1||n===2}e.is=t})(Xa||(Xa={}));var Za;(function(e){function t(r){return{value:r}}e.create=t;function n(r){const s=r;return U.objectLiteral(s)&&(s.tooltip===void 0||U.string(s.tooltip)||Ms.is(s.tooltip))&&(s.location===void 0||Wr.is(s.location))&&(s.command===void 0||tr.is(s.command))}e.is=n})(Za||(Za={}));var sh;(function(e){function t(r,s,i){const o={position:r,label:s};return i!==void 0&&(o.kind=i),o}e.create=t;function n(r){const s=r;return U.objectLiteral(s)&&Ye.is(s.position)&&(U.string(s.label)||U.typedArray(s.label,Za.is))&&(s.kind===void 0||Xa.is(s.kind))&&s.textEdits===void 0||U.typedArray(s.textEdits,Ce.is)&&(s.tooltip===void 0||U.string(s.tooltip)||Ms.is(s.tooltip))&&(s.paddingLeft===void 0||U.boolean(s.paddingLeft))&&(s.paddingRight===void 0||U.boolean(s.paddingRight))}e.is=n})(sh||(sh={}));var ih;(function(e){function t(n){return{kind:"snippet",value:n}}e.createSnippet=t})(ih||(ih={}));var oh;(function(e){function t(n,r,s,i){return{insertText:n,filterText:r,range:s,command:i}}e.create=t})(oh||(oh={}));var ah;(function(e){function t(n){return{items:n}}e.create=t})(ah||(ah={}));var lh;(function(e){e.Invoked=0,e.Automatic=1})(lh||(lh={}));var uh;(function(e){function t(n,r){return{range:n,text:r}}e.create=t})(uh||(uh={}));var ch;(function(e){function t(n,r){return{triggerKind:n,selectedCompletionInfo:r}}e.create=t})(ch||(ch={}));var fh;(function(e){function t(n){const r=n;return U.objectLiteral(r)&&Ra.is(r.uri)&&U.string(r.name)}e.is=t})(fh||(fh={}));var hh;(function(e){function t(i,o,a,l){return new eb(i,o,a,l)}e.create=t;function n(i){let o=i;return!!(U.defined(o)&&U.string(o.uri)&&(U.undefined(o.languageId)||U.string(o.languageId))&&U.uinteger(o.lineCount)&&U.func(o.getText)&&U.func(o.positionAt)&&U.func(o.offsetAt))}e.is=n;function r(i,o){let a=i.getText(),l=s(o,(f,c)=>{let d=f.range.start.line-c.range.start.line;return d===0?f.range.start.character-c.range.start.character:d}),u=a.length;for(let f=l.length-1;f>=0;f--){let c=l[f],d=i.offsetAt(c.range.start),g=i.offsetAt(c.range.end);if(g<=u)a=a.substring(0,d)+c.newText+a.substring(g,a.length);else throw new Error("Overlapping edit");u=d}return a}e.applyEdits=r;function s(i,o){if(i.length<=1)return i;const a=i.length/2|0,l=i.slice(0,a),u=i.slice(a);s(l,o),s(u,o);let f=0,c=0,d=0;for(;f<l.length&&c<u.length;)o(l[f],u[c])<=0?i[d++]=l[f++]:i[d++]=u[c++];for(;f<l.length;)i[d++]=l[f++];for(;c<u.length;)i[d++]=u[c++];return i}})(hh||(hh={}));class eb{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===`
|
|
19
19
|
`,i==="\r"&&s+1<n.length&&n.charAt(s+1)===`
|
|
20
20
|
`&&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 Ye.create(0,t);for(;r<s;){let o=Math.floor((r+s)/2);n[o]>t?s=o:r=o+1}let i=r-1;return Ye.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 U;(function(e){const t=Object.prototype.toString;function n(g){return typeof g<"u"}e.defined=n;function r(g){return typeof g>"u"}e.undefined=r;function s(g){return g===!0||g===!1}e.boolean=s;function i(g){return t.call(g)==="[object String]"}e.string=i;function o(g){return t.call(g)==="[object Number]"}e.number=o;function a(g,w,A){return t.call(g)==="[object Number]"&&w<=g&&g<=A}e.numberRange=a;function l(g){return t.call(g)==="[object Number]"&&-2147483648<=g&&g<=2147483647}e.integer=l;function u(g){return t.call(g)==="[object Number]"&&0<=g&&g<=2147483647}e.uinteger=u;function f(g){return t.call(g)==="[object Function]"}e.func=f;function c(g){return g!==null&&typeof g=="object"}e.objectLiteral=c;function d(g,w){return Array.isArray(g)&&g.every(w)}e.typedArray=d})(U||(U={}));const Ul=Symbol.for("yaml.alias"),el=Symbol.for("yaml.document"),Rn=Symbol.for("yaml.map"),n1=Symbol.for("yaml.pair"),Jt=Symbol.for("yaml.scalar"),Kr=Symbol.for("yaml.seq"),Lt=Symbol.for("yaml.node.type"),$t=e=>!!e&&typeof e=="object"&&e[Lt]===Ul,Xr=e=>!!e&&typeof e=="object"&&e[Lt]===el,$e=e=>!!e&&typeof e=="object"&&e[Lt]===Rn,we=e=>!!e&&typeof e=="object"&&e[Lt]===n1,ie=e=>!!e&&typeof e=="object"&&e[Lt]===Jt,Ie=e=>!!e&&typeof e=="object"&&e[Lt]===Kr;function Oe(e){if(e&&typeof e=="object")switch(e[Lt]){case Rn:case Kr:return!0}return!1}function be(e){if(e&&typeof e=="object")switch(e[Lt]){case Ul:case Rn:case Jt:case Kr:return!0}return!1}const r1=e=>(ie(e)||Oe(e))&&!!e.anchor,qn=Symbol("break visit"),tb=Symbol("skip children"),ws=Symbol("remove node");function Fe(e,t){const n=nb(t);Xr(e)?Lr(null,e.contents,n,Object.freeze([e]))===ws&&(e.contents=null):Lr(null,e,n,Object.freeze([]))}Fe.BREAK=qn;Fe.SKIP=tb;Fe.REMOVE=ws;function Lr(e,t,n,r){const s=rb(e,t,n,r);if(be(s)||we(s))return sb(e,r,s),Lr(e,s,n,r);if(typeof s!="symbol"){if(Oe(t)){r=Object.freeze(r.concat(t));for(let i=0;i<t.items.length;++i){const o=Lr(i,t.items[i],n,r);if(typeof o=="number")i=o-1;else{if(o===qn)return qn;o===ws&&(t.items.splice(i,1),i-=1)}}}else if(we(t)){r=Object.freeze(r.concat(t));const i=Lr("key",t.key,n,r);if(i===qn)return qn;i===ws&&(t.key=null);const o=Lr("value",t.value,n,r);if(o===qn)return qn;o===ws&&(t.value=null)}}return s}function nb(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 rb(e,t,n,r){if(typeof n=="function")return n(e,t,r);if($e(t))return n.Map?.(e,t,r);if(Ie(t))return n.Seq?.(e,t,r);if(we(t))return n.Pair?.(e,t,r);if(ie(t))return n.Scalar?.(e,t,r);if($t(t))return n.Alias?.(e,t,r)}function sb(e,t,n){const r=t[t.length-1];if(Oe(r))r.items[e]=n;else if(we(r))e==="key"?r.key=n:r.value=n;else if(Xr(r))r.contents=n;else{const s=$t(r)?"alias":"scalar";throw new Error(`Cannot replace node with ${s} parent`)}}const ib={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},ob=e=>e.replace(/[!,[\]{}]/g,t=>ib[t]);class Ze{constructor(t,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},Ze.defaultYaml,t),this.tags=Object.assign({},Ze.defaultTags,n)}clone(){const t=new Ze(this.yaml,this.tags);return t.docStart=this.docStart,t}atDocument(){const t=new Ze(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:Ze.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},Ze.defaultTags);break}return t}add(t,n){this.atNextDocument&&(this.yaml={explicit:Ze.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},Ze.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,o]=r;return this.tags[i]=o,!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 o=/^\d+\.\d+$/.test(i);return n(6,`Unsupported YAML version ${i}`,o),!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 o=t.slice(2,-1);return o==="!"||o==="!!"?(n(`Verbatim tags aren't resolved, so ${t} is invalid.`),null):(t[t.length-1]!==">"&&n("Verbatim tags must end with a >"),o)}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(o){return n(String(o)),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+ob(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&&be(t.contents)){const i={};Fe(t.contents,(o,a)=>{be(a)&&a.tag&&(i[a.tag]=!0)}),s=Object.keys(i)}else s=[];for(const[i,o]of r)i==="!!"&&o==="tag:yaml.org,2002:"||(!t||s.some(a=>a.startsWith(o)))&&n.push(`%TAG ${i} ${o}`);return n.join(`
|
|
21
|
-
`)}}Ze.defaultYaml={explicit:!1,version:"1.2"};Ze.defaultTags={"!!":"tag:yaml.org,2002:"};function s1(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 i1(e){const t=new Set;return Fe(e,{Value(n,r){r.anchor&&t.add(r.anchor)}}),t}function o1(e,t){for(let n=1;;++n){const r=`${e}${n}`;if(!t.has(r))return r}}function ab(e,t){const n=[],r=new Map;let s=null;return{onAnchor:i=>{n.push(i),s??(s=i1(e));const o=o1(t,s);return s.add(o),o},setAnchors:()=>{for(const i of n){const o=r.get(i);if(typeof o=="object"&&o.anchor&&(ie(o.node)||Oe(o.node)))o.node.anchor=o.anchor;else{const a=new Error("Failed to resolve repeated object (this should not happen)");throw a.source=i,a}}},sourceObjects:r}}function Cr(e,t,n,r){if(r&&typeof r=="object")if(Array.isArray(r))for(let s=0,i=r.length;s<i;++s){const o=r[s],a=Cr(e,r,String(s),o);a===void 0?delete r[s]:a!==o&&(r[s]=a)}else if(r instanceof Map)for(const s of Array.from(r.keys())){const i=r.get(s),o=Cr(e,r,s,i);o===void 0?r.delete(s):o!==i&&r.set(s,o)}else if(r instanceof Set)for(const s of Array.from(r)){const i=Cr(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 o=Cr(e,r,s,i);o===void 0?delete r[s]:o!==i&&(r[s]=o)}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||!r1(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?.keep?Number(e):e}class ql{constructor(t){Object.defineProperty(this,Lt,{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(!Xr(t))throw new TypeError("A document argument is required");const o={anchors:new Map,doc:t,keep:!0,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof r=="number"?r:100},a=xt(this,"",o);if(typeof s=="function")for(const{count:l,res:u}of o.anchors.values())s(u,l);return typeof i=="function"?Cr(i,{"":a},"",a):a}}class Wl extends ql{constructor(t){super(Ul),this.source=t,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(t,n){let r;n?.aliasResolveCache?r=n.aliasResolveCache:(r=[],Fe(t,{Node:(i,o)=>{($t(o)||r1(o))&&r.push(o)}}),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,o=this.resolve(s,n);if(!o){const l=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(l)}let a=r.get(o);if(a||(xt(o,null,n),a=r.get(o))
|
|
21
|
+
`)}}Ze.defaultYaml={explicit:!1,version:"1.2"};Ze.defaultTags={"!!":"tag:yaml.org,2002:"};function s1(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 i1(e){const t=new Set;return Fe(e,{Value(n,r){r.anchor&&t.add(r.anchor)}}),t}function o1(e,t){for(let n=1;;++n){const r=`${e}${n}`;if(!t.has(r))return r}}function ab(e,t){const n=[],r=new Map;let s=null;return{onAnchor:i=>{n.push(i),s??(s=i1(e));const o=o1(t,s);return s.add(o),o},setAnchors:()=>{for(const i of n){const o=r.get(i);if(typeof o=="object"&&o.anchor&&(ie(o.node)||Oe(o.node)))o.node.anchor=o.anchor;else{const a=new Error("Failed to resolve repeated object (this should not happen)");throw a.source=i,a}}},sourceObjects:r}}function Cr(e,t,n,r){if(r&&typeof r=="object")if(Array.isArray(r))for(let s=0,i=r.length;s<i;++s){const o=r[s],a=Cr(e,r,String(s),o);a===void 0?delete r[s]:a!==o&&(r[s]=a)}else if(r instanceof Map)for(const s of Array.from(r.keys())){const i=r.get(s),o=Cr(e,r,s,i);o===void 0?r.delete(s):o!==i&&r.set(s,o)}else if(r instanceof Set)for(const s of Array.from(r)){const i=Cr(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 o=Cr(e,r,s,i);o===void 0?delete r[s]:o!==i&&(r[s]=o)}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||!r1(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?.keep?Number(e):e}class ql{constructor(t){Object.defineProperty(this,Lt,{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(!Xr(t))throw new TypeError("A document argument is required");const o={anchors:new Map,doc:t,keep:!0,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof r=="number"?r:100},a=xt(this,"",o);if(typeof s=="function")for(const{count:l,res:u}of o.anchors.values())s(u,l);return typeof i=="function"?Cr(i,{"":a},"",a):a}}class Wl extends ql{constructor(t){super(Ul),this.source=t,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(t,n){let r;n?.aliasResolveCache?r=n.aliasResolveCache:(r=[],Fe(t,{Node:(i,o)=>{($t(o)||r1(o))&&r.push(o)}}),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,o=this.resolve(s,n);if(!o){const l=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(l)}let a=r.get(o);if(a||(xt(o,null,n),a=r.get(o)),a?.res===void 0){const l="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(l)}if(i>=0&&(a.count+=1,a.aliasCount===0&&(a.aliasCount=bi(s,o,r)),a.count*a.aliasCount>i)){const l="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(l)}return a.res}toString(t,n,r){const s=`*${this.source}`;if(t){if(s1(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 bi(e,t,n){if($t(t)){const r=t.resolve(e),s=n&&r&&n.get(r);return s?s.count*s.aliasCount:0}else if(Oe(t)){let r=0;for(const s of t.items){const i=bi(e,s,n);i>r&&(r=i)}return r}else if(we(t)){const r=bi(e,t.key,n),s=bi(e,t.value,n);return Math.max(r,s)}return 1}const a1=e=>!e||typeof e!="function"&&typeof e!="object";class oe extends ql{constructor(t){super(Jt),this.value=t}toJSON(t,n){return 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 lb="tag:yaml.org,2002:";function ub(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=>r.identify?.(e)&&!r.format)}function Os(e,t,n){if(Xr(e)&&(e=e.contents),be(e))return e;if(we(e)){const c=n.schema[Rn].createNode?.(n.schema,null,n);return c.items.push(e),c}(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:o,sourceObjects:a}=n;let l;if(r&&e&&typeof e=="object"){if(l=a.get(e),l)return l.anchor??(l.anchor=s(e)),new Wl(l.anchor);l={anchor:null,node:null},a.set(e,l)}t?.startsWith("!!")&&(t=lb+t.slice(2));let u=ub(e,t,o.tags);if(!u){if(e&&typeof e.toJSON=="function"&&(e=e.toJSON()),!e||typeof e!="object"){const c=new oe(e);return l&&(l.node=c),c}u=e instanceof Map?o[Rn]:Symbol.iterator in Object(e)?o[Kr]:o[Rn]}i&&(i(u),delete n.onTagObj);const f=u?.createNode?u.createNode(n.schema,e,n):typeof u?.nodeClass?.from=="function"?u.nodeClass.from(n.schema,e,n):new oe(e);return t?f.tag=t:u.default||(f.tag=u.tag),l&&(l.node=f),f}function Qi(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 o=[];o[i]=r,r=o}else r=new Map([[i,r]])}return Os(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 gs=e=>e==null||typeof e=="object"&&!!e[Symbol.iterator]().next().done;class l1 extends ql{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=>be(r)||we(r)?r.clone(t):r),this.range&&(n.range=this.range.slice()),n}addIn(t,n){if(gs(t))this.add(n);else{const[r,...s]=t,i=this.get(r,!0);if(Oe(i))i.addIn(s,n);else if(i===void 0&&this.schema)this.set(r,Qi(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(Oe(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&&ie(i)?i.value:i:Oe(i)?i.getIn(s,n):void 0}hasAllNullValues(t){return this.items.every(n=>{if(!we(n))return!1;const r=n.value;return r==null||t&&ie(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 Oe(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(Oe(i))i.setIn(s,n);else if(i===void 0&&this.schema)this.set(r,Qi(this.schema,s,n));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${s}`)}}}const cb=e=>e.replace(/^(?!$)(?: $)?/gm,"#");function rn(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}const Jn=(e,t,n)=>e.endsWith(`
|
|
22
22
|
`)?rn(n,t):n.includes(`
|
|
23
23
|
`)?`
|
|
24
24
|
`+rn(n,t):(e.endsWith(" ")?"":" ")+n,u1="flow",tl="block",vi="quoted";function fo(e,t,n="flow",{indentAtStart:r,lineWidth:s=80,minContentWidth:i=20,onFold:o,onOverflow:a}={}){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=[],f={};let c=s-t.length;typeof r=="number"&&(r>s-Math.max(2,i)?u.push(0):c=s-r);let d,g,w=!1,A=-1,E=-1,N=-1;n===tl&&(A=dh(e,A,t.length),A!==-1&&(c=A+l));for(let y;y=e[A+=1];){if(n===vi&&y==="\\"){switch(E=A,e[A+1]){case"x":A+=3;break;case"u":A+=5;break;case"U":A+=9;break;default:A+=1}N=A}if(y===`
|
|
@@ -54,7 +54,7 @@ ${t.indent}${a}`:a}function pb({key:e,value:t},n,r,s){const{allNullValues:i,doc:
|
|
|
54
54
|
${a}:`):(E=`${E}:`,d&&(E+=Jn(E,n.indent,u(d))));let N,C,y;be(t)?(N=!!t.spaceBefore,C=t.commentBefore,y=t.comment):(N=!1,C=null,y=null,t&&typeof t=="object"&&(t=o.createNode(t))),n.implicitKey=!1,!g&&!d&&ie(t)&&(n.indentAtStart=E.length+1),A=!1,!f&&l.length>=2&&!n.inFlow&&!g&&Ie(t)&&!t.flow&&!t.tag&&!t.anchor&&(n.indent=n.indent.substring(2));let p=!1;const h=Yr(t,n,()=>p=!0,()=>A=!0);let m=" ";if(d||N||C){if(m=N?`
|
|
55
55
|
`:"",C){const v=u(C);m+=`
|
|
56
56
|
${rn(v,n.indent)}`}h===""&&!n.inFlow?m===`
|
|
57
|
-
`&&(m=`
|
|
57
|
+
`&&y&&(m=`
|
|
58
58
|
|
|
59
59
|
`):m+=`
|
|
60
60
|
${n.indent}`}else if(!g&&Oe(t)){const v=h[0],S=h.indexOf(`
|
|
@@ -67,25 +67,25 @@ ${l}${A}`:`
|
|
|
67
67
|
`))&&(u=!0),c.push(N),f=c.length}const{start:d,end:g}=n;if(c.length===0)return d+g;if(!u){const w=c.reduce((A,E)=>A+E.length+2,2);u=t.options.lineWidth>0&&w>t.options.lineWidth}if(u){let w=d;for(const A of c)w+=A?`
|
|
68
68
|
${i}${s}${A}`:`
|
|
69
69
|
`;return`${w}
|
|
70
|
-
${s}${g}`}else return`${d}${o}${c.join(" ")}${o}${g}`}function Ki({indent:e,options:{commentString:t}},n,r,s){if(r&&s&&(r=r.replace(/^\n+/,"")),r){const i=rn(t(r),e);n.push(i.trimStart())}}function Qn(e,t){const n=ie(t)?t.value:t;for(const r of e)if(we(r)&&(r.key===t||r.key===n||ie(r.key)&&r.key.value===n))return r}class Et extends l1{static get tagName(){return"tag:yaml.org,2002:map"}constructor(t){super(Rn,t),this.items=[]}static from(t,n,r){const{keepUndefined:s,replacer:i}=r,o=new this(t),a=(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)&&o.items.push(Yl(l,u,r))};if(n instanceof Map)for(const[l,u]of n)a(l,u);else if(n&&typeof n=="object")for(const l of Object.keys(n))a(l,n[l]);return typeof t.sortMapEntries=="function"&&o.items.sort(t.sortMapEntries),o}add(t,n){let r;we(t)?r=t:!t||typeof t!="object"||!("key"in t)?r=new et(t,t?.value):r=new et(t.key,t.value);const s=Qn(this.items,r.key),i=this.schema?.sortMapEntries;if(s){if(!n)throw new Error(`Key ${r.key} already set`);ie(s.value)&&a1(r.value)?s.value.value=r.value:s.value=r.value}else if(i){const o=this.items.findIndex(a=>i(r,a)<0);o===-1?this.items.push(r):this.items.splice(o,0,r)}else this.items.push(r)}delete(t){const n=Qn(this.items,t);return n?this.items.splice(this.items.indexOf(n),1).length>0:!1}get(t,n){const s=Qn(this.items,t)?.value;return(!n&&ie(s)?s.value:s)??void 0}has(t){return!!Qn(this.items,t)}set(t,n){this.add(new et(t,n),!0)}toJSON(t,n,r){const s=r?new r:n?.mapAsMap?new Map:{};n?.onCreate&&n.onCreate(s);for(const i of this.items)d1(n,s,i);return s}toString(t,n,r){if(!t)return JSON.stringify(this);for(const s of this.items)if(!we(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})),m1(this,t,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:t.indent||"",onChompKeep:r,onComment:n})}}const Zr={collection:"map",default:!0,nodeClass:Et,tag:"tag:yaml.org,2002:map",resolve(e,t){return $e(e)||t("Expected a mapping for this tag"),e},createNode:(e,t,n)=>Et.from(e,t,n)};class nr extends l1{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(t){super(Kr,t),this.items=[]}add(t){this.items.push(t)}delete(t){const n=Ks(t);return typeof n!="number"?!1:this.items.splice(n,1).length>0}get(t,n){const r=Ks(t);if(typeof r!="number")return;const s=this.items[r];return!n&&ie(s)?s.value:s}has(t){const n=Ks(t);return typeof n=="number"&&n<this.items.length}set(t,n){const r=Ks(t);if(typeof r!="number")throw new Error(`Expected a valid index, not ${t}.`);const s=this.items[r];ie(s)&&a1(n)?s.value=n:this.items[r]=n}toJSON(t,n){const r=[];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?m1(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 o=0;for(let a of n){if(typeof s=="function"){const l=n instanceof Set?a:String(o++);a=s.call(n,l,a)}i.items.push(Os(a,void 0,r))}}return i}}function Ks(e){let t=ie(e)?e.value:e;return t&&typeof t=="string"&&(t=Number(t)),typeof t=="number"&&Number.isInteger(t)&&t>=0?t:null}const es={collection:"seq",default:!0,nodeClass:nr,tag:"tag:yaml.org,2002:seq",resolve(e,t){return Ie(e)||t("Expected a sequence for this tag"),e},createNode:(e,t,n)=>nr.from(e,t,n)},po={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)}},go={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"&&go.test.test(e)?e:t.options.nullStr},zl={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&&zl.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 Bt({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=JSON.stringify(r);if(!e&&t&&(!n||n==="tag:yaml.org,2002:float")&&/^\d/.test(i)){let o=i.indexOf(".");o<0&&(o=i.length,i+=".");let a=t-(i.length-o-1);for(;a-- >0;)i+="0"}return i}const p1={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:Bt},g1={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():Bt(e)}},y1={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:Bt},yo=e=>typeof e=="bigint"||Number.isInteger(e),Gl=(e,t,n,{intAsBigInt:r})=>r?BigInt(e):parseInt(e.substring(t),n);function b1(e,t,n){const{value:r}=e;return yo(r)&&r>=0?n+r.toString(t):Bt(e)}const v1={identify:e=>yo(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=>b1(e,8,"0o")},D1={identify:yo,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,n)=>Gl(e,0,10,n),stringify:Bt},w1={identify:e=>yo(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=>b1(e,16,"0x")},Db=[Zr,es,po,go,zl,v1,D1,w1,p1,g1,y1];function mh(e){return typeof e=="bigint"||Number.isInteger(e)}const Xs=({value:e})=>JSON.stringify(e),wb=[{identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:Xs},{identify:e=>e==null,createNode:()=>new oe(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:Xs},{identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:e=>e==="true",stringify:Xs},{identify:mh,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})=>mh(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:Xs}],Sb={default:!0,tag:"",test:/^/,resolve(e,t){return t(`Unresolved plain scalar ${JSON.stringify(e)}`),e}},Eb=[Zr,es].concat(wb,Sb),Jl={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 o=n;let a;if(typeof btoa=="function"){let l="";for(let u=0;u<o.length;++u)l+=String.fromCharCode(o[u]);a=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(a.length/l),f=new Array(u);for(let c=0,d=0;c<u;++c,d+=l)f[c]=a.substr(d,l);a=f.join(t===oe.BLOCK_LITERAL?`
|
|
70
|
+
${s}${g}`}else return`${d}${o}${c.join(" ")}${o}${g}`}function Ki({indent:e,options:{commentString:t}},n,r,s){if(r&&s&&(r=r.replace(/^\n+/,"")),r){const i=rn(t(r),e);n.push(i.trimStart())}}function Qn(e,t){const n=ie(t)?t.value:t;for(const r of e)if(we(r)&&(r.key===t||r.key===n||ie(r.key)&&r.key.value===n))return r}class Et extends l1{static get tagName(){return"tag:yaml.org,2002:map"}constructor(t){super(Rn,t),this.items=[]}static from(t,n,r){const{keepUndefined:s,replacer:i}=r,o=new this(t),a=(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)&&o.items.push(Yl(l,u,r))};if(n instanceof Map)for(const[l,u]of n)a(l,u);else if(n&&typeof n=="object")for(const l of Object.keys(n))a(l,n[l]);return typeof t.sortMapEntries=="function"&&o.items.sort(t.sortMapEntries),o}add(t,n){let r;we(t)?r=t:!t||typeof t!="object"||!("key"in t)?r=new et(t,t?.value):r=new et(t.key,t.value);const s=Qn(this.items,r.key),i=this.schema?.sortMapEntries;if(s){if(!n)throw new Error(`Key ${r.key} already set`);ie(s.value)&&a1(r.value)?s.value.value=r.value:s.value=r.value}else if(i){const o=this.items.findIndex(a=>i(r,a)<0);o===-1?this.items.push(r):this.items.splice(o,0,r)}else this.items.push(r)}delete(t){const n=Qn(this.items,t);return n?this.items.splice(this.items.indexOf(n),1).length>0:!1}get(t,n){const s=Qn(this.items,t)?.value;return(!n&&ie(s)?s.value:s)??void 0}has(t){return!!Qn(this.items,t)}set(t,n){this.add(new et(t,n),!0)}toJSON(t,n,r){const s=r?new r:n?.mapAsMap?new Map:{};n?.onCreate&&n.onCreate(s);for(const i of this.items)d1(n,s,i);return s}toString(t,n,r){if(!t)return JSON.stringify(this);for(const s of this.items)if(!we(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})),m1(this,t,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:t.indent||"",onChompKeep:r,onComment:n})}}const Zr={collection:"map",default:!0,nodeClass:Et,tag:"tag:yaml.org,2002:map",resolve(e,t){return $e(e)||t("Expected a mapping for this tag"),e},createNode:(e,t,n)=>Et.from(e,t,n)};class nr extends l1{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(t){super(Kr,t),this.items=[]}add(t){this.items.push(t)}delete(t){const n=Ks(t);return typeof n!="number"?!1:this.items.splice(n,1).length>0}get(t,n){const r=Ks(t);if(typeof r!="number")return;const s=this.items[r];return!n&&ie(s)?s.value:s}has(t){const n=Ks(t);return typeof n=="number"&&n<this.items.length}set(t,n){const r=Ks(t);if(typeof r!="number")throw new Error(`Expected a valid index, not ${t}.`);const s=this.items[r];ie(s)&&a1(n)?s.value=n:this.items[r]=n}toJSON(t,n){const r=[];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?m1(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 o=0;for(let a of n){if(typeof s=="function"){const l=n instanceof Set?a:String(o++);a=s.call(n,l,a)}i.items.push(Os(a,void 0,r))}}return i}}function Ks(e){let t=ie(e)?e.value:e;return t&&typeof t=="string"&&(t=Number(t)),typeof t=="number"&&Number.isInteger(t)&&t>=0?t:null}const es={collection:"seq",default:!0,nodeClass:nr,tag:"tag:yaml.org,2002:seq",resolve(e,t){return Ie(e)||t("Expected a sequence for this tag"),e},createNode:(e,t,n)=>nr.from(e,t,n)},po={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)}},go={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"&&go.test.test(e)?e:t.options.nullStr},zl={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&&zl.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 Bt({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 o=i.indexOf(".");o<0&&(o=i.length,i+=".");let a=t-(i.length-o-1);for(;a-- >0;)i+="0"}return i}const p1={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:Bt},g1={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():Bt(e)}},y1={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:Bt},yo=e=>typeof e=="bigint"||Number.isInteger(e),Gl=(e,t,n,{intAsBigInt:r})=>r?BigInt(e):parseInt(e.substring(t),n);function b1(e,t,n){const{value:r}=e;return yo(r)&&r>=0?n+r.toString(t):Bt(e)}const v1={identify:e=>yo(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=>b1(e,8,"0o")},D1={identify:yo,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,n)=>Gl(e,0,10,n),stringify:Bt},w1={identify:e=>yo(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=>b1(e,16,"0x")},Db=[Zr,es,po,go,zl,v1,D1,w1,p1,g1,y1];function mh(e){return typeof e=="bigint"||Number.isInteger(e)}const Xs=({value:e})=>JSON.stringify(e),wb=[{identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:Xs},{identify:e=>e==null,createNode:()=>new oe(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:Xs},{identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:e=>e==="true",stringify:Xs},{identify:mh,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})=>mh(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:Xs}],Sb={default:!0,tag:"",test:/^/,resolve(e,t){return t(`Unresolved plain scalar ${JSON.stringify(e)}`),e}},Eb=[Zr,es].concat(wb,Sb),Jl={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 o=n;let a;if(typeof btoa=="function"){let l="";for(let u=0;u<o.length;++u)l+=String.fromCharCode(o[u]);a=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(a.length/l),f=new Array(u);for(let c=0,d=0;c<u;++c,d+=l)f[c]=a.substr(d,l);a=f.join(t===oe.BLOCK_LITERAL?`
|
|
71
71
|
`:" ")}return Hl({comment:e,type:t,value:a},r,s,i)}};function S1(e,t){if(Ie(e))for(let n=0;n<e.items.length;++n){let r=e.items[n];if(!we(r)){if($e(r)){r.items.length>1&&t("Each pair must have its own sequence indicator");const s=r.items[0]||new et(new oe(null));if(r.commentBefore&&(s.key.commentBefore=s.key.commentBefore?`${r.commentBefore}
|
|
72
72
|
${s.key.commentBefore}`:r.commentBefore),r.comment){const i=s.value??s.key;i.comment=i.comment?`${r.comment}
|
|
73
73
|
${i.comment}`:r.comment}r=s}e.items[n]=we(r)?r:new et(r)}}else t("Expected a sequence for this tag");return e}function E1(e,t,n){const{replacer:r}=n,s=new nr(e);s.tag="tag:yaml.org,2002:pairs";let i=0;if(t&&Symbol.iterator in Object(t))for(let o of t){typeof r=="function"&&(o=r.call(t,String(i++),o));let a,l;if(Array.isArray(o))if(o.length===2)a=o[0],l=o[1];else throw new TypeError(`Expected [key, value] tuple: ${o}`);else if(o&&o instanceof Object){const u=Object.keys(o);if(u.length===1)a=u[0],l=o[a];else throw new TypeError(`Expected tuple with one key, not ${u.length} keys`)}else a=o;s.items.push(Yl(a,l,n))}return s}const Ql={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:S1,createNode:E1};class Pr extends nr{constructor(){super(),this.add=Et.prototype.add.bind(this),this.delete=Et.prototype.delete.bind(this),this.get=Et.prototype.get.bind(this),this.has=Et.prototype.has.bind(this),this.set=Et.prototype.set.bind(this),this.tag=Pr.tag}toJSON(t,n){if(!n)return super.toJSON(t);const r=new Map;n?.onCreate&&n.onCreate(r);for(const s of this.items){let i,o;if(we(s)?(i=xt(s.key,"",n),o=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,o)}return r}static from(t,n,r){const s=E1(t,n,r),i=new this;return i.items=s.items,i}}Pr.tag="tag:yaml.org,2002:omap";const Kl={collection:"seq",identify:e=>e instanceof Map,nodeClass:Pr,default:!1,tag:"tag:yaml.org,2002:omap",resolve(e,t){const n=S1(e,t),r=[];for(const{key:s}of n.items)ie(s)&&(r.includes(s.value)?t(`Ordered maps must not include duplicate keys: ${s.value}`):r.push(s.value));return Object.assign(new Pr,n)},createNode:(e,t,n)=>Pr.from(e,t,n)};function A1({value:e,source:t},n){return t&&(e?N1:x1).test.test(t)?t:e?n.options.trueStr:n.options.falseStr}const N1={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:A1},x1={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:A1},Ab={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:Bt},Nb={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():Bt(e)}},xb={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:Bt},Bs=e=>typeof e=="bigint"||Number.isInteger(e);function bo(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 o=BigInt(e);return s==="-"?BigInt(-1)*o:o}const i=parseInt(e,n);return s==="-"?-1*i:i}function Xl(e,t,n){const{value:r}=e;if(Bs(r)){const s=r.toString(t);return r<0?"-"+n+s.substr(1):n+s}return Bt(e)}const Lb={identify:Bs,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,n)=>bo(e,2,2,n),stringify:e=>Xl(e,2,"0b")},Cb={identify:Bs,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,n)=>bo(e,1,8,n),stringify:e=>Xl(e,8,"0")},kb={identify:Bs,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,n)=>bo(e,0,10,n),stringify:Bt},Fb={identify:Bs,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,n)=>bo(e,2,16,n),stringify:e=>Xl(e,16,"0x")};class Ir extends Et{constructor(t){super(t),this.tag=Ir.tag}add(t){let n;we(t)?n=t:t&&typeof t=="object"&&"key"in t&&"value"in t&&t.value===null?n=new et(t.key,null):n=new et(t,null),Qn(this.items,n.key)||this.items.push(n)}get(t,n){const r=Qn(this.items,t);return!n&&we(r)?ie(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=Qn(this.items,t);r&&!n?this.items.splice(this.items.indexOf(r),1):!r&&n&&this.items.push(new et(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 o of n)typeof s=="function"&&(o=s.call(n,o,o)),i.items.push(Yl(o,null,r));return i}}Ir.tag="tag:yaml.org,2002:set";const Zl={collection:"map",identify:e=>e instanceof Set,nodeClass:Ir,default:!1,tag:"tag:yaml.org,2002:set",createNode:(e,t,n)=>Ir.from(e,t,n),resolve(e,t){if($e(e)){if(e.hasAllNullValues(!0))return Object.assign(new Ir,e);t("Set items must all have null values")}else t("Expected a mapping for this tag");return e}};function eu(e,t){const n=e[0],r=n==="-"||n==="+"?e.substring(1):e,s=o=>t?BigInt(o):Number(o),i=r.replace(/_/g,"").split(":").reduce((o,a)=>o*s(60)+s(a),s(0));return n==="-"?s(-1)*i:i}function L1(e){let{value:t}=e,n=o=>o;if(typeof t=="bigint")n=o=>BigInt(o);else if(isNaN(t)||!isFinite(t))return Bt(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(o=>String(o).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const C1={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})=>eu(e,n),stringify:L1},k1={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=>eu(e,!1),stringify:L1},vo={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(vo.test);if(!t)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,n,r,s,i,o,a]=t.map(Number),l=t[7]?Number((t[7]+"00").substr(1,3)):0;let u=Date.UTC(n,r-1,s,i||0,o||0,a||0,l);const f=t[8];if(f&&f!=="Z"){let c=eu(f,!1);Math.abs(c)<30&&(c*=60),u-=6e4*c}return new Date(u)},stringify:({value:e})=>e?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""},ph=[Zr,es,po,go,N1,x1,Lb,Cb,kb,Fb,Ab,Nb,xb,Jl,un,Kl,Ql,Zl,C1,k1,vo],gh=new Map([["core",Db],["failsafe",[Zr,es,po]],["json",Eb],["yaml11",ph],["yaml-1.1",ph]]),yh={binary:Jl,bool:zl,float:y1,floatExp:g1,floatNaN:p1,floatTime:k1,int:D1,intHex:w1,intOct:v1,intTime:C1,map:Zr,merge:un,null:go,omap:Kl,pairs:Ql,seq:es,set:Zl,timestamp:vo},_b={"tag:yaml.org,2002:binary":Jl,"tag:yaml.org,2002:merge":un,"tag:yaml.org,2002:omap":Kl,"tag:yaml.org,2002:pairs":Ql,"tag:yaml.org,2002:set":Zl,"tag:yaml.org,2002:timestamp":vo};function qo(e,t,n){const r=gh.get(t);if(r&&!e)return n&&!r.includes(un)?r.concat(un):r.slice();let s=r;if(!s)if(Array.isArray(e))s=[];else{const i=Array.from(gh.keys()).filter(o=>o!=="yaml11").map(o=>JSON.stringify(o)).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(un)),s.reduce((i,o)=>{const a=typeof o=="string"?yh[o]:o;if(!a){const l=JSON.stringify(o),u=Object.keys(yh).map(f=>JSON.stringify(f)).join(", ");throw new Error(`Unknown custom tag ${l}; use one of ${u}`)}return i.includes(a)||i.push(a),i},[])}const Tb=(e,t)=>e.key<t.key?-1:e.key>t.key?1:0;class tu{constructor({compat:t,customTags:n,merge:r,resolveKnownTags:s,schema:i,sortMapEntries:o,toStringDefaults:a}){this.compat=Array.isArray(t)?qo(t,"compat"):t?qo(null,t):null,this.name=typeof i=="string"&&i||"core",this.knownTags=s?_b:{},this.tags=qo(n,this.name,r),this.toStringOptions=a??null,Object.defineProperty(this,Rn,{value:Zr}),Object.defineProperty(this,Jt,{value:po}),Object.defineProperty(this,Kr,{value:es}),this.sortMapEntries=typeof o=="function"?o:o===!0?Tb:null}clone(){const t=Object.create(tu.prototype,Object.getOwnPropertyDescriptors(this));return t.tags=this.tags.slice(),t}}function Mb(e,t){const n=[];let r=t.directives===!0;if(t.directives!==!1&&e.directives){const l=e.directives.toString(e);l?(n.push(l),r=!0):e.directives.docStart&&(r=!0)}r&&n.push("---");const s=c1(e,t),{commentString:i}=s.options;if(e.commentBefore){n.length!==1&&n.unshift("");const l=i(e.commentBefore);n.unshift(rn(l,""))}let o=!1,a=null;if(e.contents){if(be(e.contents)){if(e.contents.spaceBefore&&r&&n.push(""),e.contents.commentBefore){const f=i(e.contents.commentBefore);n.push(rn(f,""))}s.forceBlockIndent=!!e.comment,a=e.contents.comment}const l=a?void 0:()=>o=!0;let u=Yr(e.contents,s,()=>a=null,l);a&&(u+=Jn(u,"",i(a))),(u[0]==="|"||u[0]===">")&&n[n.length-1]==="---"?n[n.length-1]=`--- ${u}`:n.push(u)}else n.push(Yr(e.contents,s));if(e.directives?.docEnd)if(e.comment){const l=i(e.comment);l.includes(`
|
|
74
74
|
`)?(n.push("..."),n.push(rn(l,""))):n.push(`... ${l}`)}else n.push("...");else{let l=e.comment;l&&o&&(l=l.replace(/^\n+/,"")),l&&((!o||a)&&n[n.length-1]!==""&&n.push(""),n.push(rn(i(l),"")))}return n.join(`
|
|
75
75
|
`)+`
|
|
76
76
|
`}class Vs{constructor(t,n,r){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,Lt,{value:el});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:o}=i;r?._directives?(this.directives=r._directives.atDocument(),this.directives.yaml.explicit&&(o=this.directives.yaml.version)):this.directives=new Ze({version:o}),this.setSchema(o,r),this.contents=t===void 0?null:this.createNode(t,s,r)}clone(){const t=Object.create(Vs.prototype,{[Lt]:{value:el}});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=be(this.contents)?this.contents.clone(t.schema):this.contents,this.range&&(t.range=this.range.slice()),t}add(t){Sr(this.contents)&&this.contents.add(t)}addIn(t,n){Sr(this.contents)&&this.contents.addIn(t,n)}createAlias(t,n){if(!t.anchor){const r=i1(this);t.anchor=!n||r.has(n)?o1(n||"a",r):n}return new Wl(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 E=C=>typeof C=="number"||C instanceof String||C instanceof Number,N=n.filter(E).map(String);N.length>0&&(n=n.concat(N)),s=n}else r===void 0&&n&&(r=n,n=void 0);const{aliasDuplicateObjects:i,anchorPrefix:o,flow:a,keepUndefined:l,onTagObj:u,tag:f}=r??{},{onAnchor:c,setAnchors:d,sourceObjects:g}=ab(this,o||"a"),w={aliasDuplicateObjects:i??!0,keepUndefined:l??!1,onAnchor:c,onTagObj:u,replacer:s,schema:this.schema,sourceObjects:g},A=Os(t,f,w);return a&&Oe(A)&&(A.flow=!0),d(),A}createPair(t,n,r={}){const s=this.createNode(t,null,r),i=this.createNode(n,null,r);return new et(s,i)}delete(t){return Sr(this.contents)?this.contents.delete(t):!1}deleteIn(t){return gs(t)?this.contents==null?!1:(this.contents=null,!0):Sr(this.contents)?this.contents.deleteIn(t):!1}get(t,n){return Oe(this.contents)?this.contents.get(t,n):void 0}getIn(t,n){return gs(t)?!n&&ie(this.contents)?this.contents.value:this.contents:Oe(this.contents)?this.contents.getIn(t,n):void 0}has(t){return Oe(this.contents)?this.contents.has(t):!1}hasIn(t){return gs(t)?this.contents!==void 0:Oe(this.contents)?this.contents.hasIn(t):!1}set(t,n){this.contents==null?this.contents=Qi(this.schema,[t],n):Sr(this.contents)&&this.contents.set(t,n)}setIn(t,n){gs(t)?this.contents=n:this.contents==null?this.contents=Qi(this.schema,Array.from(t),n):Sr(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 Ze({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 Ze({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 tu(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:o}={}){const a={anchors:new Map,doc:this,keep:!t,mapAsMap:r===!0,mapKeyWarned:!1,maxAliasCount:typeof s=="number"?s:100},l=xt(this.contents,n??"",a);if(typeof i=="function")for(const{count:u,res:f}of a.anchors.values())i(f,u);return typeof o=="function"?Cr(o,{"":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 Mb(this,t)}}function Sr(e){if(Oe(e))return!0;throw new Error("Expected a YAML collection as document contents")}class F1 extends Error{constructor(t,n,r,s){super(),this.name=t,this.code=r,this.message=s,this.pos=n}}class ys extends F1{constructor(t,n,r){super("YAMLParseError",t,n,r)}}class Ob extends F1{constructor(t,n,r){super("YAMLWarning",t,n,r)}}const bh=(e,t)=>n=>{if(n.pos[0]===-1)return;n.linePos=n.pos.map(a=>t.linePos(a));const{line:r,col:s}=n.linePos[0];n.message+=` at line ${r}, column ${s}`;let i=s-1,o=e.substring(t.lineStarts[r-1],t.lineStarts[r]).replace(/[\n\r]+$/,"");if(i>=60&&o.length>80){const a=Math.min(i-39,o.length-79);o="…"+o.substring(a),i-=a-1}if(o.length>80&&(o=o.substring(0,79)+"…"),r>1&&/^ *$/.test(o.substring(0,i))){let a=e.substring(t.lineStarts[r-2],t.lineStarts[r-1]);a.length>80&&(a=a.substring(0,79)+`…
|
|
77
|
-
`),o=a+o}if(/[^ ]/.test(o)){let a=1;const l=n.linePos[1];l
|
|
77
|
+
`),o=a+o}if(/[^ ]/.test(o)){let a=1;const l=n.linePos[1];l?.line===r&&l.col>s&&(a=Math.max(1,Math.min(l.col-s,80-i)));const u=" ".repeat(i)+"^".repeat(a);n.message+=`:
|
|
78
78
|
|
|
79
79
|
${o}
|
|
80
80
|
${u}
|
|
81
81
|
`}};function zr(e,{flow:t,indicator:n,next:r,offset:s,onError:i,parentIndent:o,startOnNewline:a}){let l=!1,u=a,f=a,c="",d="",g=!1,w=!1,A=null,E=null,N=null,C=null,y=null,p=null,h=null;for(const S of e)switch(w&&(S.type!=="space"&&S.type!=="newline"&&S.type!=="comma"&&i(S.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),w=!1),A&&(u&&S.type!=="comment"&&S.type!=="newline"&&i(A,"TAB_AS_INDENT","Tabs are not allowed as indentation"),A=null),S.type){case"space":!t&&(n!=="doc-start"||r?.type!=="flow-collection")&&S.source.includes(" ")&&(A=S),f=!0;break;case"comment":{f||i(S,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const D=S.source.substring(1)||" ";c?c+=d+D:c=D,d="",u=!1;break}case"newline":u?c?c+=S.source:(!p||n!=="seq-item-ind")&&(l=!0):d+=S.source,u=!0,g=!0,(E||N)&&(C=S),f=!0;break;case"anchor":E&&i(S,"MULTIPLE_ANCHORS","A node can have at most one anchor"),S.source.endsWith(":")&&i(S.offset+S.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),E=S,h??(h=S.offset),u=!1,f=!1,w=!0;break;case"tag":{N&&i(S,"MULTIPLE_TAGS","A node can have at most one tag"),N=S,h??(h=S.offset),u=!1,f=!1,w=!0;break}case n:(E||N)&&i(S,"BAD_PROP_ORDER",`Anchors and tags must be after the ${S.source} indicator`),p&&i(S,"UNEXPECTED_TOKEN",`Unexpected ${S.source} in ${t??"collection"}`),p=S,u=n==="seq-item-ind"||n==="explicit-key-ind",f=!1;break;case"comma":if(t){y&&i(S,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`),y=S,u=!1,f=!1;break}default:i(S,"UNEXPECTED_TOKEN",`Unexpected ${S.type} token`),u=!1,f=!1}const m=e[e.length-1],v=m?m.offset+m.source.length:s;return w&&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"),A&&(u&&A.indent<=o||r?.type==="block-map"||r?.type==="block-seq")&&i(A,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:y,found:p,spaceBefore:l,comment:c,hasNewline:g,anchor:E,tag:N,newlineAfterProp:C,end:v,start:h??v}}function Rs(e){if(!e)return null;switch(e.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(e.source.includes(`
|
|
82
82
|
`))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(Rs(t.key)||Rs(t.value))return!0}return!1;default:return!0}}function sl(e,t,n){if(t?.type==="flow-collection"){const r=t.end[0];r.indent===e&&(r.source==="]"||r.source==="}")&&Rs(t)&&n(r,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function _1(e,t,n){const{uniqueKeys:r}=e.options;if(r===!1)return!1;const s=typeof r=="function"?r:(i,o)=>i===o||ie(i)&&ie(o)&&i.value===o.value;return t.some(i=>s(i.key,n))}const vh="All mapping items must start at the same column";function Rb({composeNode:e,composeEmptyNode:t},n,r,s,i){const o=i?.nodeClass??Et,a=new o(n.schema);n.atRoot&&(n.atRoot=!1);let l=r.offset,u=null;for(const f of r.items){const{start:c,key:d,sep:g,value:w}=f,A=zr(c,{indicator:"explicit-key-ind",next:d??g?.[0],offset:l,onError:s,parentIndent:r.indent,startOnNewline:!0}),E=!A.found;if(E){if(d&&(d.type==="block-seq"?s(l,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in d&&d.indent!==r.indent&&s(l,"BAD_INDENT",vh)),!A.anchor&&!A.tag&&!g){u=A.end,A.comment&&(a.comment?a.comment+=`
|
|
83
83
|
`+A.comment:a.comment=A.comment);continue}(A.newlineAfterProp||Rs(d))&&s(d??c[c.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else A.found?.indent!==r.indent&&s(l,"BAD_INDENT",vh);n.atKey=!0;const N=A.end,C=d?e(n,d,A,s):t(n,N,c,null,A,s);n.schema.compat&&sl(r.indent,d,s),n.atKey=!1,_1(n,a.items,C)&&s(N,"DUPLICATE_KEY","Map keys must be unique");const y=zr(g??[],{indicator:"map-value-ind",next:w,offset:C.range[2],onError:s,parentIndent:r.indent,startOnNewline:!d||d.type==="block-scalar"});if(l=y.end,y.found){E&&(w?.type==="block-map"&&!y.hasNewline&&s(l,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),n.options.strict&&A.start<y.found.offset-1024&&s(C.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const p=w?e(n,w,y,s):t(n,l,g,null,y,s);n.schema.compat&&sl(r.indent,w,s),l=p.range[2];const h=new et(C,p);n.options.keepSourceTokens&&(h.srcToken=f),a.items.push(h)}else{E&&s(C.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),y.comment&&(C.comment?C.comment+=`
|
|
84
|
-
`+y.comment:C.comment=y.comment);const p=new et(C);n.options.keepSourceTokens&&(p.srcToken=f),a.items.push(p)}}return u&&u<l&&s(u,"IMPOSSIBLE","Map comment with trailing content"),a.range=[r.offset,l,u??l],a}function Pb({composeNode:e,composeEmptyNode:t},n,r,s,i){const o=i?.nodeClass??nr,a=new o(n.schema);n.atRoot&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let l=r.offset,u=null;for(const{start:f,value:c}of r.items){const d=zr(f,{indicator:"seq-item-ind",next:c,offset:l,onError:s,parentIndent:r.indent,startOnNewline:!0});if(!d.found)if(d.anchor||d.tag||c)c
|
|
84
|
+
`+y.comment:C.comment=y.comment);const p=new et(C);n.options.keepSourceTokens&&(p.srcToken=f),a.items.push(p)}}return u&&u<l&&s(u,"IMPOSSIBLE","Map comment with trailing content"),a.range=[r.offset,l,u??l],a}function Pb({composeNode:e,composeEmptyNode:t},n,r,s,i){const o=i?.nodeClass??nr,a=new o(n.schema);n.atRoot&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let l=r.offset,u=null;for(const{start:f,value:c}of r.items){const d=zr(f,{indicator:"seq-item-ind",next:c,offset:l,onError:s,parentIndent:r.indent,startOnNewline:!0});if(!d.found)if(d.anchor||d.tag||c)c?.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&&(a.comment=d.comment);continue}const g=c?e(n,c,d,s):t(n,d.end,f,null,d,s);n.schema.compat&&sl(r.indent,c,s),l=g.range[2],a.items.push(g)}return a.range=[r.offset,l,u??l],a}function js(e,t,n,r){let s="";if(e){let i=!1,o="";for(const a of e){const{source:l,type:u}=a;switch(u){case"space":i=!0;break;case"comment":{n&&!i&&r(a,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const f=l.substring(1)||" ";s?s+=o+f:s=f,o="";break}case"newline":s&&(o+=l),i=!0;break;default:r(a,"UNEXPECTED_TOKEN",`Unexpected ${u} at node end`)}t+=l.length}}return{comment:s,offset:t}}const Wo="Block collections are not allowed within flow collections",Ho=e=>e&&(e.type==="block-map"||e.type==="block-seq");function Ib({composeNode:e,composeEmptyNode:t},n,r,s,i){const o=r.start.source==="{",a=o?"flow map":"flow sequence",l=i?.nodeClass??(o?Et:nr),u=new l(n.schema);u.flow=!0;const f=n.atRoot;f&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let c=r.offset+r.start.source.length;for(let E=0;E<r.items.length;++E){const N=r.items[E],{start:C,key:y,sep:p,value:h}=N,m=zr(C,{flow:a,indicator:"explicit-key-ind",next:y??p?.[0],offset:c,onError:s,parentIndent:r.indent,startOnNewline:!1});if(!m.found){if(!m.anchor&&!m.tag&&!p&&!h){E===0&&m.comma?s(m.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`):E<r.items.length-1&&s(m.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${a}`),m.comment&&(u.comment?u.comment+=`
|
|
85
85
|
`+m.comment:u.comment=m.comment),c=m.end;continue}!o&&n.options.strict&&Rs(y)&&s(y,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(E===0)m.comma&&s(m.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`);else if(m.comma||s(m.start,"MISSING_CHAR",`Missing , between ${a} items`),m.comment){let v="";e:for(const S of C)switch(S.type){case"comma":case"space":break;case"comment":v=S.source.substring(1);break e;default:break e}if(v){let S=u.items[u.items.length-1];we(S)&&(S=S.value??S.key),S.comment?S.comment+=`
|
|
86
|
-
`+v:S.comment=v,m.comment=m.comment.substring(v.length+1)}}if(!o&&!p&&!m.found){const v=h?e(n,h,m,s):t(n,m.end,p,null,m,s);u.items.push(v),c=v.range[2],Ho(h)&&s(v.range,"BLOCK_IN_FLOW",Wo)}else{n.atKey=!0;const v=m.end,S=y?e(n,y,m,s):t(n,v,C,null,m,s);Ho(y)&&s(S.range,"BLOCK_IN_FLOW",Wo),n.atKey=!1;const D=zr(p??[],{flow:a,indicator:"map-value-ind",next:h,offset:S.range[2],onError:s,parentIndent:r.indent,startOnNewline:!1});if(D.found){if(!o&&!m.found&&n.options.strict){if(p)for(const x of p){if(x===D.found)break;if(x.type==="newline"){s(x,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}m.start<D.found.offset-1024&&s(D.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else h&&("source"in h&&h.source
|
|
87
|
-
`+D.comment:S.comment=D.comment);const k=new et(S,L);if(n.options.keepSourceTokens&&(k.srcToken=N),o){const x=u;_1(n,x.items,S)&&s(v,"DUPLICATE_KEY","Map keys must be unique"),x.items.push(k)}else{const x=new Et(n.schema);x.flow=!0,x.items.push(k);const _=(L??S).range;x.range=[S.range[0],_[1],_[2]],u.items.push(x)}c=L?L.range[2]:D.end}}const d=o?"}":"]",[g,...w]=r.end;let A=c;if(g
|
|
88
|
-
`+E.comment:u.comment=E.comment),u.range=[r.offset,A,E.offset]}else u.range=[r.offset,A,A];return u}function Yo(e,t,n,r,s,i){const o=n.type==="block-map"?Rb(e,t,n,r,i):n.type==="block-seq"?Pb(e,t,n,r,i):Ib(e,t,n,r,i),a=o.constructor;return s==="!"||s===a.tagName?(o.tag=a.tagName,o):(s&&(o.tag=s),o)}function $b(e,t,n,r,s){const i=r.tag,o=i?t.directives.tagName(i.source,d=>s(i,"TAG_RESOLVE_FAILED",d)):null;if(n.type==="block-seq"){const{anchor:d,newlineAfterProp:g}=r,w=d&&i?d.offset>i.offset?d:i:d??i;w&&(!g||g.offset<w.offset)&&s(w,"MISSING_CHAR","Missing newline after block sequence props")}const a=n.type==="block-map"?"map":n.type==="block-seq"?"seq":n.start.source==="{"?"map":"seq";if(!i||!o||o==="!"||o===Et.tagName&&a==="map"||o===nr.tagName&&a==="seq")return Yo(e,t,n,s,o);let l=t.schema.tags.find(d=>d.tag===o&&d.collection===a);if(!l){const d=t.schema.knownTags[o];if(d
|
|
86
|
+
`+v:S.comment=v,m.comment=m.comment.substring(v.length+1)}}if(!o&&!p&&!m.found){const v=h?e(n,h,m,s):t(n,m.end,p,null,m,s);u.items.push(v),c=v.range[2],Ho(h)&&s(v.range,"BLOCK_IN_FLOW",Wo)}else{n.atKey=!0;const v=m.end,S=y?e(n,y,m,s):t(n,v,C,null,m,s);Ho(y)&&s(S.range,"BLOCK_IN_FLOW",Wo),n.atKey=!1;const D=zr(p??[],{flow:a,indicator:"map-value-ind",next:h,offset:S.range[2],onError:s,parentIndent:r.indent,startOnNewline:!1});if(D.found){if(!o&&!m.found&&n.options.strict){if(p)for(const x of p){if(x===D.found)break;if(x.type==="newline"){s(x,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}m.start<D.found.offset-1024&&s(D.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else h&&("source"in h&&h.source?.[0]===":"?s(h,"MISSING_CHAR",`Missing space after : in ${a}`):s(D.start,"MISSING_CHAR",`Missing , or : between ${a} items`));const L=h?e(n,h,D,s):D.found?t(n,D.end,p,null,D,s):null;L?Ho(h)&&s(L.range,"BLOCK_IN_FLOW",Wo):D.comment&&(S.comment?S.comment+=`
|
|
87
|
+
`+D.comment:S.comment=D.comment);const k=new et(S,L);if(n.options.keepSourceTokens&&(k.srcToken=N),o){const x=u;_1(n,x.items,S)&&s(v,"DUPLICATE_KEY","Map keys must be unique"),x.items.push(k)}else{const x=new Et(n.schema);x.flow=!0,x.items.push(k);const _=(L??S).range;x.range=[S.range[0],_[1],_[2]],u.items.push(x)}c=L?L.range[2]:D.end}}const d=o?"}":"]",[g,...w]=r.end;let A=c;if(g?.source===d)A=g.offset+g.source.length;else{const E=a[0].toUpperCase()+a.substring(1),N=f?`${E} must end with a ${d}`:`${E} in block collection must be sufficiently indented and end with a ${d}`;s(c,f?"MISSING_CHAR":"BAD_INDENT",N),g&&g.source.length!==1&&w.unshift(g)}if(w.length>0){const E=js(w,A,n.options.strict,s);E.comment&&(u.comment?u.comment+=`
|
|
88
|
+
`+E.comment:u.comment=E.comment),u.range=[r.offset,A,E.offset]}else u.range=[r.offset,A,A];return u}function Yo(e,t,n,r,s,i){const o=n.type==="block-map"?Rb(e,t,n,r,i):n.type==="block-seq"?Pb(e,t,n,r,i):Ib(e,t,n,r,i),a=o.constructor;return s==="!"||s===a.tagName?(o.tag=a.tagName,o):(s&&(o.tag=s),o)}function $b(e,t,n,r,s){const i=r.tag,o=i?t.directives.tagName(i.source,d=>s(i,"TAG_RESOLVE_FAILED",d)):null;if(n.type==="block-seq"){const{anchor:d,newlineAfterProp:g}=r,w=d&&i?d.offset>i.offset?d:i:d??i;w&&(!g||g.offset<w.offset)&&s(w,"MISSING_CHAR","Missing newline after block sequence props")}const a=n.type==="block-map"?"map":n.type==="block-seq"?"seq":n.start.source==="{"?"map":"seq";if(!i||!o||o==="!"||o===Et.tagName&&a==="map"||o===nr.tagName&&a==="seq")return Yo(e,t,n,s,o);let l=t.schema.tags.find(d=>d.tag===o&&d.collection===a);if(!l){const d=t.schema.knownTags[o];if(d?.collection===a)t.schema.tags.push(Object.assign({},d,{default:!1})),l=d;else return d?s(i,"BAD_COLLECTION_TYPE",`${d.tag} used for ${a} collection, but expects ${d.collection??"scalar"}`,!0):s(i,"TAG_RESOLVE_FAILED",`Unresolved tag: ${o}`,!0),Yo(e,t,n,s,o)}const u=Yo(e,t,n,s,o,l),f=l.resolve?.(u,d=>s(i,"TAG_RESOLVE_FAILED",d),t.options)??u,c=be(f)?f:new oe(f);return c.range=u.range,c.tag=o,l?.format&&(c.format=l.format),c}function Bb(e,t,n){const r=t.offset,s=Vb(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,o=t.source?jb(t.source):[];let a=o.length;for(let A=o.length-1;A>=0;--A){const E=o[A][1];if(E===""||E==="\r")a=A;else break}if(a===0){const A=s.chomp==="+"&&o.length>0?`
|
|
89
89
|
`.repeat(Math.max(1,o.length-1)):"";let E=r+s.length;return t.source&&(E+=t.source.length),{value:A,type:i,comment:s.comment,range:[r,E,E]}}let l=t.indent+s.indent,u=t.offset+s.length,f=0;for(let A=0;A<a;++A){const[E,N]=o[A];if(N===""||N==="\r")s.indent===0&&E.length>l&&(l=E.length);else{E.length<l&&n(u+E.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),s.indent===0&&(l=E.length),f=A,l===0&&!e.atRoot&&n(u,"BAD_INDENT","Block scalar values in collections must be indented");break}u+=E.length+N.length+1}for(let A=o.length-1;A>=a;--A)o[A][0].length>l&&(a=A+1);let c="",d="",g=!1;for(let A=0;A<f;++A)c+=o[A][0].slice(l)+`
|
|
90
90
|
`;for(let A=f;A<a;++A){let[E,N]=o[A];u+=E.length+N.length+1;const C=N[N.length-1]==="\r";if(C&&(N=N.slice(0,-1)),N&&E.length<l){const p=`Block scalar lines must not be less indented than their ${s.indent?"explicit indentation indicator":"first line"}`;n(u-N.length-(C?2:1),"BAD_INDENT",p),E=""}i===oe.BLOCK_LITERAL?(c+=d+E.slice(l)+N,d=`
|
|
91
91
|
`):E.length>l||N[0]===" "?(d===" "?d=`
|
|
@@ -143,9 +143,9 @@ ${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.pus
|
|
|
143
143
|
`,i=this.buffer[r+1]):n=r),i==="#"||t&&Zs.has(i))break;if(s===`
|
|
144
144
|
`){const o=this.continueScalar(r+1);if(o===-1)break;r=Math.max(r,o-2)}}else{if(t&&Zs.has(s))break;n=r}return!s&&!this.atEnd?this.setNext("plain-scalar"):(yield ol,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(Go))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const t=this.flowLevel>0,n=this.charAt(1);if(_t(n)||t&&Zs.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(;!_t(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(s2.has(n))n=this.buffer[++t];else if(n==="%"&&wh.has(this.buffer[t+1])&&wh.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===`
|
|
145
145
|
`?yield*this.pushCount(1):t==="\r"&&this.charAt(1)===`
|
|
146
|
-
`?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 U1{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 Ln(e,t){for(let n=0;n<e.length;++n)if(e[n].type===t)return!0;return!1}function Sh(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 q1(e){switch(e?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function ei(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 Er(e){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(;e[++t]?.type==="space";);return e.splice(t,e.length)}function Eh(e){if(e.start.type==="flow-seq-start")for(const t of e.items)t.sep&&!t.value&&!Ln(t.start,"explicit-key-ind")&&!Ln(t.sep,"map-value-ind")&&(t.key&&(t.value=t.key),delete t.key,q1(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 al{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 o2,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=r2(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"&&
|
|
146
|
+
`?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 U1{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 Ln(e,t){for(let n=0;n<e.length;++n)if(e[n].type===t)return!0;return!1}function Sh(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 q1(e){switch(e?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function ei(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 Er(e){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(;e[++t]?.type==="space";);return e.splice(t,e.length)}function Eh(e){if(e.start.type==="flow-seq-start")for(const t of e.items)t.sep&&!t.value&&!Ln(t.start,"explicit-key-ind")&&!Ln(t.sep,"map-value-ind")&&(t.key&&(t.value=t.key),delete t.key,q1(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 al{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 o2,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=r2(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?.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"&&Eh(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&&Sh(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":{Sh(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=ei(this.peek(2)),r=Er(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(`
|
|
147
147
|
`)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
|
|
148
|
-
`,n)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(t){const n=t.items[t.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,n.value){const r="end"in n.value?n.value.end:void 0;(Array.isArray(r)?r[r.length-1]:void 0)?.type==="comment"?r?.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]?.value?.end;if(Array.isArray(s)){Array.prototype.push.apply(s,n.start),s.push(this.sourceToken),t.items.pop();return}}n.start.push(this.sourceToken)}return}if(this.indent>=t.indent){const r=!this.onKeyLine&&this.indent===t.indent,s=r&&(n.sep||n.explicitKey)&&this.type!=="seq-item-ind";let i=[];if(s&&n.sep&&!n.value){const o=[];for(let a=0;a<n.sep.length;++a){const l=n.sep[a];switch(l.type){case"newline":o.push(a);break;case"space":break;case"comment":l.indent>t.indent&&(o.length=0);break;default:o.length=0}}o.length>=2&&(i=n.sep.splice(o[1]))}switch(this.type){case"anchor":case"tag":s||n.value?(i.push(this.sourceToken),t.items.push({start:i}),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):s||n.value?(i.push(this.sourceToken),t.items.push({start:i,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(Ln(n.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,key:null,sep:[this.sourceToken]}]});else if(q1(n.key)&&!Ln(n.sep,"newline")){const o=Er(n.start),a=n.key,l=n.sep;l.push(this.sourceToken),delete n.key,delete n.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:a,sep:l}]})}else i.length>0?n.sep=n.sep.concat(i,this.sourceToken):n.sep.push(this.sourceToken);else if(Ln(n.start,"newline"))Object.assign(n,{key:null,sep:[this.sourceToken]});else{const o=Er(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||s?t.items.push({start:i,key:null,sep:[this.sourceToken]}):Ln(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);s||n.value?(t.items.push({start:i,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&&!Ln(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 r&&t.items.push({start:i});this.stack.push(o);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(t){const n=t.items[t.items.length-1];switch(this.type){case"newline":if(n.value){const r="end"in n.value?n.value.end:void 0;(Array.isArray(r)?r[r.length-1]:void 0)?.type==="comment"?r?.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]?.value?.end;if(Array.isArray(s)){Array.prototype.push.apply(s,n.start),s.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||Ln(n.start,"seq-item-ind")?t.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return}if(this.indent>t.indent){const r=this.startBlockValue(t);if(r){this.stack.push(r);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
|
|
148
|
+
`,n)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(t){const n=t.items[t.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,n.value){const r="end"in n.value?n.value.end:void 0;(Array.isArray(r)?r[r.length-1]:void 0)?.type==="comment"?r?.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]?.value?.end;if(Array.isArray(s)){Array.prototype.push.apply(s,n.start),s.push(this.sourceToken),t.items.pop();return}}n.start.push(this.sourceToken)}return}if(this.indent>=t.indent){const r=!this.onKeyLine&&this.indent===t.indent,s=r&&(n.sep||n.explicitKey)&&this.type!=="seq-item-ind";let i=[];if(s&&n.sep&&!n.value){const o=[];for(let a=0;a<n.sep.length;++a){const l=n.sep[a];switch(l.type){case"newline":o.push(a);break;case"space":break;case"comment":l.indent>t.indent&&(o.length=0);break;default:o.length=0}}o.length>=2&&(i=n.sep.splice(o[1]))}switch(this.type){case"anchor":case"tag":s||n.value?(i.push(this.sourceToken),t.items.push({start:i}),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):s||n.value?(i.push(this.sourceToken),t.items.push({start:i,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(Ln(n.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,key:null,sep:[this.sourceToken]}]});else if(q1(n.key)&&!Ln(n.sep,"newline")){const o=Er(n.start),a=n.key,l=n.sep;l.push(this.sourceToken),delete n.key,delete n.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:a,sep:l}]})}else i.length>0?n.sep=n.sep.concat(i,this.sourceToken):n.sep.push(this.sourceToken);else if(Ln(n.start,"newline"))Object.assign(n,{key:null,sep:[this.sourceToken]});else{const o=Er(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||s?t.items.push({start:i,key:null,sep:[this.sourceToken]}):Ln(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);s||n.value?(t.items.push({start:i,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&&!Ln(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 r&&t.items.push({start:i});this.stack.push(o);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(t){const n=t.items[t.items.length-1];switch(this.type){case"newline":if(n.value){const r="end"in n.value?n.value.end:void 0;(Array.isArray(r)?r[r.length-1]:void 0)?.type==="comment"?r?.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]?.value?.end;if(Array.isArray(s)){Array.prototype.push.apply(s,n.start),s.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||Ln(n.start,"seq-item-ind")?t.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return}if(this.indent>t.indent){const r=this.startBlockValue(t);if(r){this.stack.push(r);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?.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=ei(r),i=Er(s);Eh(t);const o=t.end.splice(1,t.end.length);o.push(this.sourceToken);const a={type:"block-map",offset:t.offset,indent:t.indent,items:[{start:i,key:t,sep:o}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=a}else yield*this.lineEnd(t)}}flowScalar(t){if(this.onNewLine){let n=this.source.indexOf(`
|
|
149
149
|
`)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
|
|
150
150
|
`,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=ei(t),r=Er(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=ei(t),r=Er(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 a2(e){const t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new U1||null,prettyErrors:t}}function l2(e,t={}){const{lineCounter:n,prettyErrors:r}=a2(t),s=new al(n?.addNewLine),i=new R1(t);let o=null;for(const a of i.compose(s.parse(e),!0,e.length))if(!o)o=a;else if(o.options.logLevel!=="silent"){o.errors.push(new ys(a.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return r&&n&&(o.errors.forEach(bh(e,n)),o.warnings.forEach(bh(e,n))),o}function u2(e,t,n){let r;const s=l2(e,n);if(!s)return null;if(s.warnings.forEach(i=>f1(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 c2(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 Xr(e)&&!r?e.toString(n):new Vs(e,r,n).toString(n)}var Jo,Ah;function f2(){if(Ah)return Jo;Ah=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 o="",a=0,l=-1,u=0,f,c=0;c<=s.length;++c){if(c<s.length)f=s.charCodeAt(c);else{if(f===47)break;f=47}if(f===47){if(!(l===c-1||u===1))if(l!==c-1&&u===2){if(o.length<2||a!==2||o.charCodeAt(o.length-1)!==46||o.charCodeAt(o.length-2)!==46){if(o.length>2){var d=o.lastIndexOf("/");if(d!==o.length-1){d===-1?(o="",a=0):(o=o.slice(0,d),a=o.length-1-o.lastIndexOf("/")),l=c,u=0;continue}}else if(o.length===2||o.length===1){o="",a=0,l=c,u=0;continue}}i&&(o.length>0?o+="/..":o="..",a=2)}else o.length>0?o+="/"+s.slice(l+1,c):o=s.slice(l+1,c),a=c-l-1;l=c,u=0}else f===46&&u!==-1?++u:u=-1}return o}function n(s,i){var o=i.dir||i.root,a=i.base||(i.name||"")+(i.ext||"");return o?o===i.root?o+a:o+s+a:a}var r={resolve:function(){for(var i="",o=!1,a,l=arguments.length-1;l>=-1&&!o;l--){var u;l>=0?u=arguments[l]:(a===void 0&&(a=process.cwd()),u=a),e(u),u.length!==0&&(i=u+"/"+i,o=u.charCodeAt(0)===47)}return i=t(i,!o),o?i.length>0?"/"+i:"/":i.length>0?i:"."},normalize:function(i){if(e(i),i.length===0)return".";var o=i.charCodeAt(0)===47,a=i.charCodeAt(i.length-1)===47;return i=t(i,!o),i.length===0&&!o&&(i="."),i.length>0&&a&&(i+="/"),o?"/"+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,o=0;o<arguments.length;++o){var a=arguments[o];e(a),a.length>0&&(i===void 0?i=a:i+="/"+a)}return i===void 0?".":r.normalize(i)},relative:function(i,o){if(e(i),e(o),i===o||(i=r.resolve(i),o=r.resolve(o),i===o))return"";for(var a=1;a<i.length&&i.charCodeAt(a)===47;++a);for(var l=i.length,u=l-a,f=1;f<o.length&&o.charCodeAt(f)===47;++f);for(var c=o.length,d=c-f,g=u<d?u:d,w=-1,A=0;A<=g;++A){if(A===g){if(d>g){if(o.charCodeAt(f+A)===47)return o.slice(f+A+1);if(A===0)return o.slice(f+A)}else u>g&&(i.charCodeAt(a+A)===47?w=A:A===0&&(w=0));break}var E=i.charCodeAt(a+A),N=o.charCodeAt(f+A);if(E!==N)break;E===47&&(w=A)}var C="";for(A=a+w+1;A<=l;++A)(A===l||i.charCodeAt(A)===47)&&(C.length===0?C+="..":C+="/..");return C.length>0?C+o.slice(f+w):(f+=w,o.charCodeAt(f)===47&&++f,o.slice(f))},_makeLong:function(i){return i},dirname:function(i){if(e(i),i.length===0)return".";for(var o=i.charCodeAt(0),a=o===47,l=-1,u=!0,f=i.length-1;f>=1;--f)if(o=i.charCodeAt(f),o===47){if(!u){l=f;break}}else u=!1;return l===-1?a?"/":".":a&&l===1?"//":i.slice(0,l)},basename:function(i,o){if(o!==void 0&&typeof o!="string")throw new TypeError('"ext" argument must be a string');e(i);var a=0,l=-1,u=!0,f;if(o!==void 0&&o.length>0&&o.length<=i.length){if(o.length===i.length&&o===i)return"";var c=o.length-1,d=-1;for(f=i.length-1;f>=0;--f){var g=i.charCodeAt(f);if(g===47){if(!u){a=f+1;break}}else d===-1&&(u=!1,d=f+1),c>=0&&(g===o.charCodeAt(c)?--c===-1&&(l=f):(c=-1,l=d))}return a===l?l=d:l===-1&&(l=i.length),i.slice(a,l)}else{for(f=i.length-1;f>=0;--f)if(i.charCodeAt(f)===47){if(!u){a=f+1;break}}else l===-1&&(u=!1,l=f+1);return l===-1?"":i.slice(a,l)}},extname:function(i){e(i);for(var o=-1,a=0,l=-1,u=!0,f=0,c=i.length-1;c>=0;--c){var d=i.charCodeAt(c);if(d===47){if(!u){a=c+1;break}continue}l===-1&&(u=!1,l=c+1),d===46?o===-1?o=c:f!==1&&(f=1):o!==-1&&(f=-1)}return o===-1||l===-1||f===0||f===1&&o===l-1&&o===a+1?"":i.slice(o,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 o={root:"",dir:"",base:"",ext:"",name:""};if(i.length===0)return o;var a=i.charCodeAt(0),l=a===47,u;l?(o.root="/",u=1):u=0;for(var f=-1,c=0,d=-1,g=!0,w=i.length-1,A=0;w>=u;--w){if(a=i.charCodeAt(w),a===47){if(!g){c=w+1;break}continue}d===-1&&(g=!1,d=w+1),a===46?f===-1?f=w:A!==1&&(A=1):f!==-1&&(A=-1)}return f===-1||d===-1||A===0||A===1&&f===d-1&&f===c+1?d!==-1&&(c===0&&l?o.base=o.name=i.slice(1,d):o.base=o.name=i.slice(c,d)):(c===0&&l?(o.name=i.slice(1,f),o.base=i.slice(1,d)):(o.name=i.slice(c,f),o.base=i.slice(c,d)),o.ext=i.slice(f,d)),c>0?o.dir=i.slice(0,c-1):l&&(o.dir="/"),o},sep:"/",delimiter:":",win32:null,posix:null};return r.posix=r,Jo=r,Jo}var Zn=f2(),h2=Object.create,Do=Object.defineProperty,d2=Object.getOwnPropertyDescriptor,m2=Object.getOwnPropertyNames,p2=Object.getPrototypeOf,g2=Object.prototype.hasOwnProperty,W1=e=>{throw TypeError(e)},y2=(e,t,n)=>t in e?Do(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,hn=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),H1=(e,t)=>{for(var n in t)Do(e,n,{get:t[n],enumerable:!0})},b2=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of m2(t))!g2.call(e,s)&&s!==n&&Do(e,s,{get:()=>t[s],enumerable:!(r=d2(t,s))||r.enumerable});return e},ru=(e,t,n)=>(n=e!=null?h2(p2(e)):{},b2(Do(n,"default",{value:e,enumerable:!0}),e)),Nh=(e,t,n)=>y2(e,typeof t!="symbol"?t+"":t,n),su=(e,t,n)=>t.has(e)||W1("Cannot "+n),Es=(e,t,n)=>(su(e,t,"read from private field"),n?n.call(e):t.get(e)),Qo=(e,t,n)=>t.has(e)?W1("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Y1=(e,t,n,r)=>(su(e,t,"write to private field"),t.set(e,n),n),Zi=(e,t,n)=>(su(e,t,"access private method"),n),ar=hn(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(y){let p=[0],h=y.indexOf(`
|
|
151
151
|
`);for(;h!==-1;)h+=1,p.push(h),h=y.indexOf(`
|