services/resources/index.868de8fa.js

181 lines
178 KiB
JavaScript
Raw Normal View History

2023-07-30 14:45:34 +00:00
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))s(i);new MutationObserver(i=>{for(const r of i)if(r.type==="childList")for(const o of r.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&s(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const r={};return i.integrity&&(r.integrity=i.integrity),i.referrerpolicy&&(r.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?r.credentials="include":i.crossorigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function s(i){if(i.ep)return;i.ep=!0;const r=n(i);fetch(i.href,r)}})();function Ri(e,t){const n=Object.create(null),s=e.split(",");for(let i=0;i<s.length;i++)n[s[i]]=!0;return t?i=>!!n[i.toLowerCase()]:i=>!!n[i]}const ec="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",tc=Ri(ec);function ko(e){return!!e||e===""}function Es(e){if(q(e)){const t={};for(let n=0;n<e.length;n++){const s=e[n],i=ve(s)?ic(s):Es(s);if(i)for(const r in i)t[r]=i[r]}return t}else{if(ve(e))return e;if(de(e))return e}}const nc=/;(?![^(]*\))/g,sc=/:(.+)/;function ic(e){const t={};return e.split(nc).forEach(n=>{if(n){const s=n.split(sc);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function ge(e){let t="";if(ve(e))t=e;else if(q(e))for(let n=0;n<e.length;n++){const s=ge(e[n]);s&&(t+=s+" ")}else if(de(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const xe=e=>ve(e)?e:e==null?"":q(e)||de(e)&&(e.toString===Ao||!H(e.toString))?JSON.stringify(e,Oo,2):String(e),Oo=(e,t)=>t&&t.__v_isRef?Oo(e,t.value):rn(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,i])=>(n[`${s} =>`]=i,n),{})}:Eo(t)?{[`Set(${t.size})`]:[...t.values()]}:de(t)&&!q(t)&&!Io(t)?String(t):t,oe={},sn=[],Ge=()=>{},rc=()=>!1,oc=/^on[^a-z]/,Ts=e=>oc.test(e),Bi=e=>e.startsWith("onUpdate:"),Me=Object.assign,Fi=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},lc=Object.prototype.hasOwnProperty,z=(e,t)=>lc.call(e,t),q=Array.isArray,rn=e=>As(e)==="[object Map]",Eo=e=>As(e)==="[object Set]",H=e=>typeof e=="function",ve=e=>typeof e=="string",xi=e=>typeof e=="symbol",de=e=>e!==null&&typeof e=="object",To=e=>de(e)&&H(e.then)&&H(e.catch),Ao=Object.prototype.toString,As=e=>Ao.call(e),ac=e=>As(e).slice(8,-1),Io=e=>As(e)==="[object Object]",Ki=e=>ve(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,hs=Ri(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Is=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},cc=/-(\w)/g,ot=Is(e=>e.replace(cc,(t,n)=>n?n.toUpperCase():"")),fc=/\B([A-Z])/g,Jt=Is(e=>e.replace(fc,"-$1").toLowerCase()),Ns=Is(e=>e.charAt(0).toUpperCase()+e.slice(1)),si=Is(e=>e?`on${Ns(e)}`:""),Fn=(e,t)=>!Object.is(e,t),ii=(e,t)=>{for(let n=0;n<e.length;n++)e[n](t)},ys=(e,t,n)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},uc=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let Pr;const hc=()=>Pr||(Pr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});let tt;class dc{constructor(t=!1){this.detached=t,this.active=!0,this.effects=[],this.cleanups=[],this.parent=tt,!t&&tt&&(this.index=(tt.scopes||(tt.scopes=[])).push(this)-1)}run(t){if(this.active){const n=tt;try{return tt=this,t()}finally{tt=n}}}on(){tt=this}off(){tt=this.parent}stop(t){if(this.active){let n,s;for(n=0,s=this.effects.length;n<s;n++)this.effects[n].stop();for(n=0,s=this.cleanups.length;n<s;n++)this.cleanups[n]();if(this.scopes)for(n=0,s=this.scopes.length;n<s;n++)this.scopes[n].stop(!0);if(!this.detached&&this.parent&&!t){const i=this.parent.scopes.pop();i&&i!==this&&(this.parent.scopes[this.index]=i,i.index=this.index)}this.parent=void 0,this.active=!1}}}function pc(e,t=tt){t&&t.active&&t.effects.push(e)}const Ui=e=>{const t=new Set(e);return t.w=0,t.n=0,t},No=e=>(e.w&It)>0,$o=e=>(e.n&It)>0,mc=({deps:e})=>{if(e.length)for(let t=0;t<e.length;t++)e[t].w|=It},gc=e=>{const{deps:t}=e;if(t.length){let n=0;for(let s
`)}}Le.defaultYaml={explicit:!1,version:"1.2"};Le.defaultTags={"!!":"tag:yaml.org,2002:"};function yl(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 bl(e){const t=new Set;return Ht(e,{Value(n,s){s.anchor&&t.add(s.anchor)}}),t}function _l(e,t){for(let n=1;;++n){const s=`${e}${n}`;if(!t.has(s))return s}}function ju(e,t){const n=[],s=new Map;let i=null;return{onAnchor:r=>{n.push(r),i||(i=bl(e));const o=_l(t,i);return i.add(o),o},setAnchors:()=>{for(const r of n){const o=s.get(r);if(typeof o=="object"&&o.anchor&&(ae(o.node)||ye(o.node)))o.node.anchor=o.anchor;else{const l=new Error("Failed to resolve repeated object (this should not happen)");throw l.source=r,l}}},sourceObjects:s}}class ar extends lr{constructor(t){super(rr),this.source=t,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(t){let n;return Ht(t,{Node:(s,i)=>{if(i===this)return Ht.BREAK;i.anchor===this.source&&(n=i)}}),n}toJSON(t,n){if(!n)return{source:this.source};const{anchors:s,doc:i,maxAliasCount:r}=n,o=this.resolve(i);if(!o){const a=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(a)}const l=s.get(o);if(!l||l.res===void 0){const a="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(a)}if(r>=0&&(l.count+=1,l.aliasCount===0&&(l.aliasCount=ps(i,o,s)),l.count*l.aliasCount>r)){const a="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(a)}return l.res}toString(t,n,s){const i=`*${this.source}`;if(t){if(yl(this.source),t.options.verifyAliasOrder&&!t.anchors.has(this.source)){const r=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(r)}if(t.implicitKey)return`${i} `}return i}}function ps(e,t,n){if(bn(t)){const s=t.resolve(e),i=n&&s&&n.get(s);return i?i.count*i.aliasCount:0}else if(ye(t)){let s=0;for(const i of t.items){const r=ps(e,i,n);r>s&&(s=r)}return s}else if(be(t)){const s=ps(e,t.key,n),i=ps(e,t.value,n);return Math.max(s,i)}return 1}function rt(e,t,n){if(Array.isArray(e))return e.map((s,i)=>rt(s,String(i),n));if(e&&typeof e.toJSON=="function"){if(!n||!Nu(e))return e.toJSON(t,n);const s={aliasCount:0,count:1,res:void 0};n.anchors.set(e,s),n.onCreate=r=>{s.res=r,delete n.onCreate};const i=e.toJSON(t,n);return n.onCreate&&n.onCreate(i),i}return typeof e=="bigint"&&!(n!=null&&n.keep)?Number(e):e}const wl=e=>!e||typeof e!="function"&&typeof e!="object";class V extends lr{constructor(t){super(gt),this.value=t}toJSON(t,n){return n!=null&&n.keep?this.value:rt(this.value,t,n)}toString(){return String(this.value)}}V.BLOCK_FOLDED="BLOCK_FOLDED";V.BLOCK_LITERAL="BLOCK_LITERAL";V.PLAIN="PLAIN";V.QUOTE_DOUBLE="QUOTE_DOUBLE";V.QUOTE_SINGLE="QUOTE_SINGLE";const Ru="tag:yaml.org,2002:";function Bu(e,t,n){var s;if(t){const i=n.filter(o=>o.tag===t),r=(s=i.find(o=>!o.format))!=null?s:i[0];if(!r)throw new Error(`Tag ${t} not found`);return r}return n.find(i=>{var r;return((r=i.identify)==null?void 0:r.call(i,e))&&!i.format})}function Vn(e,t,n){var d,y;if(or(e)&&(e=e.contents),we(e))return e;if(be(e)){const b=(y=(d=n.schema[At]).createNode)==null?void 0:y.call(d,n.schema,null,n);return b.items.push(e),b}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<"u"&&e instanceof BigInt)&&(e=e.valueOf());const{aliasDuplicateObjects:s,onAnchor:i,onTagObj:r,schema:o,sourceObjects:l}=n;let a;if(s&&e&&typeof e=="object"){if(a=l.get(e),a)return a.anchor||(a.anchor=i(e)),new ar(a.anchor);a={anchor:null,node:null},l.set(e,a)}t!=null&&t.startsWith("!!")&&(t=Ru+t.slice(2));let c=Bu(e,t,o.tags);if(!c){if(e&&typeof e.toJSON=="function"&&(e=e.toJSON()),!e||typeof e!="object"){const b=new V(e);return a&&(a.node=b),b}c=e instanceof Map?o[At]:Symbol.iterator in Object(e)?o[yn]:o[At]}r&&(r(c),delete n.onTagObj);const h=c!=null&&c.createNode?c.createNode(n.schema,e,n):new V(e);return t&&(h.tag=t),a&&(a.node=h),h}function ks(e,t,n){let s=n;for(let i=t.lengt
`)?pt(n,t):n.includes(`
`)?`
`+pt(n,t):(e.endsWith(" ")?"":" ")+n,vl="flow",Li="block",ms="quoted";function Rs(e,t,n="flow",{indentAtStart:s,lineWidth:i=80,minContentWidth:r=20,onFold:o,onOverflow:l}={}){if(!i||i<0)return e;const a=Math.max(1+r,1+i-t.length);if(e.length<=a)return e;const c=[],h={};let d=i-t.length;typeof s=="number"&&(s>i-Math.max(2,r)?c.push(0):d=i-s);let y,b,S=!1,m=-1,w=-1,k=-1;n===Li&&(m=ao(e,m),m!==-1&&(d=m+a));for(let C;C=e[m+=1];){if(n===ms&&C==="\\"){switch(w=m,e[m+1]){case"x":m+=3;break;case"u":m+=5;break;case"U":m+=9;break;default:m+=1}k=m}if(C===`
`)n===Li&&(m=ao(e,m)),d=m+a,y=void 0;else{if(C===" "&&b&&b!==" "&&b!==`
`&&b!==" "){const M=e[m+1];M&&M!==" "&&M!==`
`&&M!==" "&&(y=m)}if(m>=d)if(y)c.push(y),d=y+a,y=void 0;else if(n===ms){for(;b===" "||b===" ";)b=C,C=e[m+=1],S=!0;const M=m>k+1?m-2:w-1;if(h[M])return e;c.push(M),h[M]=!0,d=M+a,y=void 0}else S=!0}b=C}if(S&&l&&l(),c.length===0)return e;o&&o();let A=e.slice(0,c[0]);for(let C=0;C<c.length;++C){const M=c[C],R=c[C+1]||e.length;M===0?A=`
${t}${e.slice(0,R)}`:(n===ms&&h[M]&&(A+=`${e[M]}\\`),A+=`
${t}${e.slice(M+1,R)}`)}return A}function ao(e,t){let n=e[t+1];for(;n===" "||n===" ";){do n=e[t+=1];while(n&&n!==`
`);n=e[t+1]}return t}const Bs=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),Fs=e=>/^(%|---|\.\.\.)/m.test(e);function xu(e,t,n){if(!t||t<0)return!1;const s=t-n,i=e.length;if(i<=s)return!1;for(let r=0,o=0;r<i;++r)if(e[r]===`
`){if(r-o>s)return!0;if(o=r+1,i-o<=s)return!1}return!0}function Bn(e,t){const n=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return n;const{implicitKey:s}=t,i=t.options.doubleQuotedMinMultiLineLength,r=t.indent||(Fs(e)?" ":"");let o="",l=0;for(let a=0,c=n[a];c;c=n[++a])if(c===" "&&n[a+1]==="\\"&&n[a+2]==="n"&&(o+=n.slice(l,a)+"\\ ",a+=1,l=a,c="\\"),c==="\\")switch(n[a+1]){case"u":{o+=n.slice(l,a);const h=n.substr(a+2,4);switch(h){case"0000":o+="\\0";break;case"0007":o+="\\a";break;case"000b":o+="\\v";break;case"001b":o+="\\e";break;case"0085":o+="\\N";break;case"00a0":o+="\\_";break;case"2028":o+="\\L";break;case"2029":o+="\\P";break;default:h.substr(0,2)==="00"?o+="\\x"+h.substr(2):o+=n.substr(a,6)}a+=5,l=a+1}break;case"n":if(s||n[a+2]==='"'||n.length<i)a+=1;else{for(o+=n.slice(l,a)+`
`;n[a+2]==="\\"&&n[a+3]==="n"&&n[a+4]!=='"';)o+=`
`,a+=2;o+=r,n[a+2]===" "&&(o+="\\"),a+=1,l=a+1}break;default:a+=1}return o=l?o+n.slice(l):n,s?o:Rs(o,r,ms,Bs(t,!1))}function Pi(e,t){if(t.options.singleQuote===!1||t.implicitKey&&e.includes(`
`)||/[ \t]\n|\n[ \t]/.test(e))return Bn(e,t);const n=t.indent||(Fs(e)?" ":""),s="'"+e.replace(/'/g,"''").replace(/\n+/g,`$&
${n}`)+"'";return t.implicitKey?s:Rs(s,n,vl,Bs(t,!1))}function nn(e,t){const{singleQuote:n}=t.options;let s;if(n===!1)s=Bn;else{const i=e.includes('"'),r=e.includes("'");i&&!r?s=Pi:r&&!i?s=Bn:s=n?Pi:Bn}return s(e,t)}function gs({comment:e,type:t,value:n},s,i,r){const{blockQuote:o,commentString:l,lineWidth:a}=s.options;if(!o||/\n[\t ]+$/.test(n)||/^\s*$/.test(n))return nn(n,s);const c=s.indent||(s.forceBlockIndent||Fs(n)?" ":""),h=o==="literal"?!0:o==="folded"||t===V.BLOCK_FOLDED?!1:t===V.BLOCK_LITERAL?!0:!xu(n,a,c.length);if(!n)return h?`|
`:`>
`;let d,y;for(y=n.length;y>0;--y){const D=n[y-1];if(D!==`
`&&D!==" "&&D!==" ")break}let b=n.substring(y);const S=b.indexOf(`
`);S===-1?d="-":n===b||S!==b.length-1?(d="+",r&&r()):d="",b&&(n=n.slice(0,-b.length),b[b.length-1]===`
`&&(b=b.slice(0,-1)),b=b.replace(/\n+(?!\n|$)/g,`$&${c}`));let m=!1,w,k=-1;for(w=0;w<n.length;++w){const D=n[w];if(D===" ")m=!0;else if(D===`
`)k=w;else break}let A=n.substring(0,k<w?k+1:w);A&&(n=n.substring(A.length),A=A.replace(/\n+/g,`$&${c}`));let M=(h?"|":">")+(m?c?"2":"1":"")+d;if(e&&(M+=" "+l(e.replace(/ ?[\r\n]+/g," ")),i&&i()),h)return n=n.replace(/\n+/g,`$&${c}`),`${M}
${c}${A}${n}${b}`;n=n.replace(/\n+/g,`
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${c}`);const R=Rs(`${A}${n}${b}`,c,Li,Bs(s,!0));return`${M}
${c}${R}`}function Ku(e,t,n,s){const{type:i,value:r}=e,{actualString:o,implicitKey:l,indent:a,indentStep:c,inFlow:h}=t;if(l&&/[\n[\]{},]/.test(r)||h&&/[[\]{},]/.test(r))return nn(r,t);if(!r||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(r))return l||h||!r.includes(`
`)?nn(r,t):gs(e,t,n,s);if(!l&&!h&&i!==V.PLAIN&&r.includes(`
`))return gs(e,t,n,s);if(Fs(r)){if(a==="")return t.forceBlockIndent=!0,gs(e,t,n,s);if(l&&a===c)return nn(r,t)}const d=r.replace(/\n+/g,`$&
${a}`);if(o){const y=m=>{var w;return m.default&&m.tag!=="tag:yaml.org,2002:str"&&((w=m.test)==null?void 0:w.test(d))},{compat:b,tags:S}=t.doc.schema;if(S.some(y)||(b==null?void 0:b.some(y)))return nn(r,t)}return l?d:Rs(d,a,vl,Bs(t,!1))}function cr(e,t,n,s){const{implicitKey:i,inFlow:r}=t,o=typeof e.value=="string"?e:Object.assign({},e,{value:String(e.value)});let{type:l}=e;l!==V.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value)&&(l=V.QUOTE_DOUBLE);const a=h=>{switch(h){case V.BLOCK_FOLDED:case V.BLOCK_LITERAL:return i||r?nn(o.value,t):gs(o,t,n,s);case V.QUOTE_DOUBLE:return Bn(o.value,t);case V.QUOTE_SINGLE:return Pi(o.value,t);case V.PLAIN:return Ku(o,t,n,s);default:return null}};let c=a(l);if(c===null){const{defaultKeyType:h,defaultStringType:d}=t.options,y=i&&h||d;if(c=a(y),c===null)throw new Error(`Unsupported default string type ${y}`)}return c}function Sl(e,t){const n=Object.assign({blockQuote:!0,commentString:Fu,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trueStr:"true",verifyAliasOrder:!0},e.schema.toStringOptions,t);let s;switch(n.collectionStyle){case"block":s=!1;break;case"flow":s=!0;break;default:s=null}return{anchors:new Set,doc:e,flowCollectionPadding:n.flowCollectionPadding?" ":"",indent:"",indentStep:typeof n.indent=="number"?" ".repeat(n.indent):" ",inFlow:s,options:n}}function Uu(e,t){var i,r,o,l;if(t.tag){const a=e.filter(c=>c.tag===t.tag);if(a.length>0)return(i=a.find(c=>c.format===t.format))!=null?i:a[0]}let n,s;if(ae(t)){s=t.value;const a=e.filter(c=>{var h;return(h=c.identify)==null?void 0:h.call(c,s)});n=(r=a.find(c=>c.format===t.format))!=null?r:a.find(c=>!c.format)}else s=t,n=e.find(a=>a.nodeClass&&s instanceof a.nodeClass);if(!n){const a=(l=(o=s==null?void 0:s.constructor)==null?void 0:o.name)!=null?l:typeof s;throw new Error(`Tag not resolved for ${a} value`)}return n}function qu(e,t,{anchors:n,doc:s}){if(!s.directives)return"";const i=[],r=(ae(e)||ye(e))&&e.anchor;r&&yl(r)&&(n.add(r),i.push(`&${r}`));const o=e.tag?e.tag:t.default?null:t.tag;return o&&i.push(s.directives.tagString(o)),i.join(" ")}function Wt(e,t,n,s){var a,c;if(be(e))return e.toString(t,n,s);if(bn(e)){if(t.doc.directives)return e.toString(t);if((a=t.resolvedAliases)!=null&&a.has(e))throw new TypeError("Cannot stringify circular structure without alias nodes");t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let i;const r=we(e)?e:t.doc.createNode(e,{onTagObj:h=>i=h});i||(i=Uu(t.doc.schema.tags,r));const o=qu(r,i,t);o.length>0&&(t.indentAtStart=((c=t.indentAtStart)!=null?c:0)+o.length+1);const l=typeof i.stringify=="function"?i.stringify(r,t,n,s):ae(r)?cr(r,t,n,s):r.toString(t,n,s);return o?ae(r)||l[0]==="{"||l[0]==="["?`${o} ${l}`:`${o}
${t.indent}${l}`:l}function Vu({key:e,value:t},n,s,i){var X,re;const{allNullValues:r,doc:o,indent:l,indentStep:a,options:{commentString:c,indentSeq:h,simpleKeys:d}}=n;let y=we(e)&&e.comment||null;if(d){if(y)throw new Error("With simple keys, key nodes cannot have comments");if(ye(e)){const _e="With simple keys, collection cannot be used as a key value";throw new Error(_e)}}let b=!d&&(!e||y&&t==null&&!n.inFlow||ye(e)||(ae(e)?e.type===V.BLOCK_FOLDED||e.type===V.BLOCK_LITERAL:typeof e=="object"));n=Object.assign({},n,{allNullValues:!1,implicitKey:!b&&(d||!r),indent:l+a});let S=!1,m=!1,w=Wt(e,n,()=>S=!0,()=>m=!0);if(!b&&!n.inFlow&&w.length>1024){if(d)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");b=!0}if(n.inFlow){if(r||t==null)return S&&s&&s(),w===""?"?":b?`? ${w}`:w}else if(r&&!d||t==null&&b)return w=`? ${w}`,y&&!S?w+=Ot(w,n.indent,c(y)):m&&i&&i(),w;S&&(y=null),b?(y&&(w+=Ot(w,n.indent,c(y))),w=`? ${w}
${l}:`):(w=`${w}:`,y&&(w+=Ot(w,n.indent,c(y))));let k,A,C;we(t)?(k=!!t.spaceBefore,A=t.commentBefore,C=t.comment):(k=!1,A=null,C=null,t&&typeof t=="object"&&(t=o.createNode(t))),n.implicitKey=!1,!b&&!y&&ae(t)&&(n.indentAtStart=w.length+1),m=!1,!h&&a.length>=2&&!n.inFlow&&!b&&Jn(t)&&!t.flow&&!t.tag&&!t.anchor&&(n.indent=n.indent.substring(2));let M=!1;const R=Wt(t,n,()=>M=!0,()=>m=!0);let D=" ";if(y||k||A){if(D=k?`
`:"",A){const _e=c(A);D+=`
${pt(_e,n.indent)}`}R===""&&!n.inFlow?D===`
`&&(D=`
`):D+=`
${n.indent}`}else if(!b&&ye(t)){const _e=R[0],Oe=R.indexOf(`
`),me=Oe!==-1,bt=(re=(X=n.inFlow)!=null?X:t.flow)!=null?re:t.items.length===0;if(me||!bt){let lt=!1;if(me&&(_e==="&"||_e==="!")){let Be=R.indexOf(" ");_e==="&"&&Be!==-1&&Be<Oe&&R[Be+1]==="!"&&(Be=R.indexOf(" ",Be+1)),(Be===-1||Oe<Be)&&(lt=!0)}lt||(D=`
${n.indent}`)}}else(R===""||R[0]===`
`)&&(D="");return w+=D+R,n.inFlow?M&&s&&s():C&&!M?w+=Ot(w,n.indent,c(C)):m&&i&&i(),w}function kl(e,t){(e==="debug"||e==="warn")&&(typeof process<"u"&&process.emitWarning?process.emitWarning(t):console.warn(t))}const co="<<";function Ol(e,t,{key:n,value:s}){if((e==null?void 0:e.doc.schema.merge)&&Hu(n))if(s=bn(s)?s.resolve(e.doc):s,Jn(s))for(const i of s.items)di(e,t,i);else if(Array.isArray(s))for(const i of s)di(e,t,i);else di(e,t,s);else{const i=rt(n,"",e);if(t instanceof Map)t.set(i,rt(s,i,e));else if(t instanceof Set)t.add(i);else{const r=Wu(n,i,e),o=rt(s,r,e);r in t?Object.defineProperty(t,r,{value:o,writable:!0,enumerable:!0,configurable:!0}):t[r]=o}}return t}const Hu=e=>e===co||ae(e)&&e.value===co&&(!e.type||e.type===V.PLAIN);function di(e,t,n){const s=e&&bn(n)?n.resolve(e.doc):n;if(!_n(s))throw new Error("Merge sources must be maps or map aliases");const i=s.toJSON(null,e,Map);for(const[r,o]of i)t instanceof Map?t.has(r)||t.set(r,o):t instanceof Set?t.add(r):Object.prototype.hasOwnProperty.call(t,r)||Object.defineProperty(t,r,{value:o,writable:!0,enumerable:!0,configurable:!0});return t}function Wu(e,t,n){if(t===null)return"";if(typeof t!="object")return String(t);if(we(e)&&n&&n.doc){const s=Sl(n.doc,{});s.anchors=new Set;for(const r of n.anchors.keys())s.anchors.add(r.anchor);s.inFlow=!0,s.inStringifyKey=!0;const i=e.toString(s);if(!n.mapKeyWarned){let r=JSON.stringify(i);r.length>40&&(r=r.substring(0,36)+'..."'),kl(n.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${r}. Set mapAsMap: true to use object keys.`),n.mapKeyWarned=!0}return i}return JSON.stringify(t)}function fr(e,t,n){const s=Vn(e,void 0,n),i=Vn(t,void 0,n);return new Pe(s,i)}class Pe{constructor(t,n=null){Object.defineProperty(this,He,{value:gl}),this.key=t,this.value=n}clone(t){let{key:n,value:s}=this;return we(n)&&(n=n.clone(t)),we(s)&&(s=s.clone(t)),new Pe(n,s)}toJSON(t,n){const s=n!=null&&n.mapAsMap?new Map:{};return Ol(n,s,this)}toString(t,n,s){return t!=null&&t.doc?Vu(this,t,n,s):JSON.stringify(this)}}function El(e,t,n){var r;return(((r=t.inFlow)!=null?r:e.flow)?Yu:Ju)(e,t,n)}function Ju({comment:e,items:t},n,{blockItemPrefix:s,flowChars:i,itemIndent:r,onChompKeep:o,onComment:l}){const{indent:a,options:{commentString:c}}=n,h=Object.assign({},n,{indent:r,type:null});let d=!1;const y=[];for(let S=0;S<t.length;++S){const m=t[S];let w=null;if(we(m))!d&&m.spaceBefore&&y.push(""),Os(n,y,m.commentBefore,d),m.comment&&(w=m.comment);else if(be(m)){const A=we(m.key)?m.key:null;A&&(!d&&A.spaceBefore&&y.push(""),Os(n,y,A.commentBefore,d))}d=!1;let k=Wt(m,h,()=>w=null,()=>d=!0);w&&(k+=Ot(k,r,c(w))),d&&w&&(d=!1),y.push(s+k)}let b;if(y.length===0)b=i.start+i.end;else{b=y[0];for(let S=1;S<y.length;++S){const m=y[S];b+=m?`
${a}${m}`:`
`}}return e?(b+=`
`+pt(c(e),a),l&&l()):d&&o&&o(),b}function Yu({comment:e,items:t},n,{flowChars:s,itemIndent:i,onComment:r}){const{indent:o,indentStep:l,flowCollectionPadding:a,options:{commentString:c}}=n;i+=l;const h=Object.assign({},n,{indent:i,inFlow:!0,type:null});let d=!1,y=0;const b=[];for(let k=0;k<t.length;++k){const A=t[k];let C=null;if(we(A))A.spaceBefore&&b.push(""),Os(n,b,A.commentBefore,!1),A.comment&&(C=A.comment);else if(be(A)){const R=we(A.key)?A.key:null;R&&(R.spaceBefore&&b.push(""),Os(n,b,R.commentBefore,!1),R.comment&&(d=!0));const D=we(A.value)?A.value:null;D?(D.comment&&(C=D.comment),D.commentBefore&&(d=!0)):A.value==null&&R&&R.comment&&(C=R.comment)}C&&(d=!0);let M=Wt(A,h,()=>C=null);k<t.length-1&&(M+=","),C&&(M+=Ot(M,i,c(C))),!d&&(b.length>y||M.includes(`
`))&&(d=!0),b.push(M),y=b.length}let S;const{start:m,end:w}=s;if(b.length===0)S=m+w;else if(d||(d=b.reduce((A,C)=>A+C.length+2,2)>js.maxFlowStringSingleLineLength),d){S=m;for(const k of b)S+=k?`
${l}${o}${k}`:`
`;S+=`
${o}${w}`}else S=`${m}${a}${b.join(" ")}${a}${w}`;return e&&(S+=Ot(S,o,c(e)),r&&r()),S}function Os({indent:e,options:{commentString:t}},n,s,i){if(s&&i&&(s=s.replace(/^\n+/,"")),s){const r=pt(t(s),e);n.push(r.trimStart())}}function Kt(e,t){const n=ae(t)?t.value:t;for(const s of e)if(be(s)&&(s.key===t||s.key===n||ae(s.key)&&s.key.value===n))return s}class Ye extends js{static get tagName(){return"tag:yaml.org,2002:map"}constructor(t){super(At,t),this.items=[]}add(t,n){var o;let s;be(t)?s=t:!t||typeof t!="object"||!("key"in t)?s=new Pe(t,t==null?void 0:t.value):s=new Pe(t.key,t.value);const i=Kt(this.items,s.key),r=(o=this.schema)==null?void 0:o.sortMapEntries;if(i){if(!n)throw new Error(`Key ${s.key} already set`);ae(i.value)&&wl(s.value)?i.value.value=s.value:i.value=s.value}else if(r){const l=this.items.findIndex(a=>r(s,a)<0);l===-1?this.items.push(s):this.items.splice(l,0,s)}else this.items.push(s)}delete(t){const n=Kt(this.items,t);return n?this.items.splice(this.items.indexOf(n),1).length>0:!1}get(t,n){var r;const s=Kt(this.items,t),i=s==null?void 0:s.value;return(r=!n&&ae(i)?i.value:i)!=null?r:void 0}has(t){return!!Kt(this.items,t)}set(t,n){this.add(new Pe(t,n),!0)}toJSON(t,n,s){const i=s?new s:n!=null&&n.mapAsMap?new Map:{};n!=null&&n.onCreate&&n.onCreate(i);for(const r of this.items)Ol(n,i,r);return i}toString(t,n,s){if(!t)return JSON.stringify(this);for(const i of this.items)if(!be(i))throw new Error(`Map items must all be pairs; found ${JSON.stringify(i)} instead`);return!t.allNullValues&&this.hasAllNullValues(!1)&&(t=Object.assign({},t,{allNullValues:!0})),El(this,t,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:t.indent||"",onChompKeep:s,onComment:n})}}function zu(e,t,n){const{keepUndefined:s,replacer:i}=n,r=new Ye(e),o=(l,a)=>{if(typeof i=="function")a=i.call(t,l,a);else if(Array.isArray(i)&&!i.includes(l))return;(a!==void 0||s)&&r.items.push(fr(l,a,n))};if(t instanceof Map)for(const[l,a]of t)o(l,a);else if(t&&typeof t=="object")for(const l of Object.keys(t))o(l,t[l]);return typeof e.sortMapEntries=="function"&&r.items.sort(e.sortMapEntries),r}const wn={collection:"map",createNode:zu,default:!0,nodeClass:Ye,tag:"tag:yaml.org,2002:map",resolve(e,t){return _n(e)||t("Expected a mapping for this tag"),e}};class vn extends js{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(t){super(yn,t),this.items=[]}add(t){this.items.push(t)}delete(t){const n=as(t);return typeof n!="number"?!1:this.items.splice(n,1).length>0}get(t,n){const s=as(t);if(typeof s!="number")return;const i=this.items[s];return!n&&ae(i)?i.value:i}has(t){const n=as(t);return typeof n=="number"&&n<this.items.length}set(t,n){const s=as(t);if(typeof s!="number")throw new Error(`Expected a valid index, not ${t}.`);const i=this.items[s];ae(i)&&wl(n)?i.value=n:this.items[s]=n}toJSON(t,n){const s=[];n!=null&&n.onCreate&&n.onCreate(s);let i=0;for(const r of this.items)s.push(rt(r,String(i++),n));return s}toString(t,n,s){return t?El(this,t,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(t.indent||"")+" ",onChompKeep:s,onComment:n}):JSON.stringify(this)}}function as(e){let t=ae(e)?e.value:e;return t&&typeof t=="string"&&(t=Number(t)),typeof t=="number"&&Number.isInteger(t)&&t>=0?t:null}function Gu(e,t,n){const{replacer:s}=n,i=new vn(e);if(t&&Symbol.iterator in Object(t)){let r=0;for(let o of t){if(typeof s=="function"){const l=t instanceof Set?o:String(r++);o=s.call(t,l,o)}i.items.push(Vn(o,void 0,n))}}return i}const Sn={collection:"seq",createNode:Gu,default:!0,nodeClass:vn,tag:"tag:yaml.org,2002:seq",resolve(e,t){return Jn(e)||t("Expected a sequence for this tag"),e}},xs={identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify(e,t,n,s){return t=Object.assign({actualString:!0},t),cr(e,t,n,s)}},Ks={identify:e=>e==null,createNode:()=>new V(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new V(null),stringify:({source:e},t)=>typeof e=="string"&&Ks.test.test(e)?e:t.options.nullStr},ur={identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,
`:" ")}return cr({comment:e,type:t,value:l},s,i,r)}};function Pl(e,t){var n;if(Jn(e))for(let s=0;s<e.items.length;++s){let i=e.items[s];if(!be(i)){if(_n(i)){i.items.length>1&&t("Each pair must have its own sequence indicator");const r=i.items[0]||new Pe(new V(null));if(i.commentBefore&&(r.key.commentBefore=r.key.commentBefore?`${i.commentBefore}
${r.key.commentBefore}`:i.commentBefore),i.comment){const o=(n=r.value)!=null?n:r.key;o.comment=o.comment?`${i.comment}
${o.comment}`:i.comment}i=r}e.items[s]=be(i)?i:new Pe(i)}}else t("Expected a sequence for this tag");return e}function Ml(e,t,n){const{replacer:s}=n,i=new vn(e);i.tag="tag:yaml.org,2002:pairs";let r=0;if(t&&Symbol.iterator in Object(t))for(let o of t){typeof s=="function"&&(o=s.call(t,String(r++),o));let l,a;if(Array.isArray(o))if(o.length===2)l=o[0],a=o[1];else throw new TypeError(`Expected [key, value] tuple: ${o}`);else if(o&&o instanceof Object){const c=Object.keys(o);if(c.length===1)l=c[0],a=o[l];else throw new TypeError(`Expected { key: value } tuple: ${o}`)}else l=o;i.items.push(fr(l,a,n))}return i}const pr={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:Pl,createNode:Ml};class an extends vn{constructor(){super(),this.add=Ye.prototype.add.bind(this),this.delete=Ye.prototype.delete.bind(this),this.get=Ye.prototype.get.bind(this),this.has=Ye.prototype.has.bind(this),this.set=Ye.prototype.set.bind(this),this.tag=an.tag}toJSON(t,n){if(!n)return super.toJSON(t);const s=new Map;n!=null&&n.onCreate&&n.onCreate(s);for(const i of this.items){let r,o;if(be(i)?(r=rt(i.key,"",n),o=rt(i.value,r,n)):r=rt(i,"",n),s.has(r))throw new Error("Ordered maps must not include duplicate keys");s.set(r,o)}return s}}an.tag="tag:yaml.org,2002:omap";const mr={collection:"seq",identify:e=>e instanceof Map,nodeClass:an,default:!1,tag:"tag:yaml.org,2002:omap",resolve(e,t){const n=Pl(e,t),s=[];for(const{key:i}of n.items)ae(i)&&(s.includes(i.value)?t(`Ordered maps must not include duplicate keys: ${i.value}`):s.push(i.value));return Object.assign(new an,n)},createNode(e,t,n){const s=Ml(e,t,n),i=new an;return i.items=s.items,i}};function Dl({value:e,source:t},n){return t&&(e?jl:Rl).test.test(t)?t:e?n.options.trueStr:n.options.falseStr}const jl={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 V(!0),stringify:Dl},Rl={identify:e=>e===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/i,resolve:()=>new V(!1),stringify:Dl},th={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:Xe},nh={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():Xe(e)}},sh={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 V(parseFloat(e.replace(/_/g,""))),n=e.indexOf(".");if(n!==-1){const s=e.substring(n+1).replace(/_/g,"");s[s.length-1]==="0"&&(t.minFractionDigits=s.length)}return t},stringify:Xe},Yn=e=>typeof e=="bigint"||Number.isInteger(e);function qs(e,t,n,{intAsBigInt:s}){const i=e[0];if((i==="-"||i==="+")&&(t+=1),e=e.substring(t).replace(/_/g,""),s){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 i==="-"?BigInt(-1)*o:o}const r=parseInt(e,n);return i==="-"?-1*r:r}function gr(e,t,n){const{value:s}=e;if(Yn(s)){const i=s.toString(t);return s<0?"-"+n+i.substr(1):n+i}return Xe(e)}const ih={identify:Yn,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,n)=>qs(e,2,2,n),stringify:e=>gr(e,2,"0b")},rh={identify:Yn,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,n)=>qs(e,1,8,n),stringify:e=>gr(e,8,"0")},oh={identify:Yn,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,n)=>qs(e,0,10,n),stringify:Xe},lh={identify:Yn,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,n)=>qs(e,2,16,n),stringify:e=>gr(e,16,"0x")};class cn extends Ye{constructor(t){super(t),this.tag=cn.tag}add(t){let n;be(t)?n=t:t&&typeof t=="object"&&"key"in t&&"value"in t&&t.value===null?n=new Pe(t.key,n
`)?(n.push("..."),n.push(pt(c,""))):n.push(`... ${c}`)}else n.push("...");else{let c=e.comment;c&&o&&(c=c.replace(/^\n+/,"")),c&&((!o||l)&&n[n.length-1]!==""&&n.push(""),n.push(pt(r(c),"")))}return n.join(`
`)+`
`}function Ln(e,t,n,s){if(s&&typeof s=="object")if(Array.isArray(s))for(let i=0,r=s.length;i<r;++i){const o=s[i],l=Ln(e,s,String(i),o);l===void 0?delete s[i]:l!==o&&(s[i]=l)}else if(s instanceof Map)for(const i of Array.from(s.keys())){const r=s.get(i),o=Ln(e,s,i,r);o===void 0?s.delete(i):o!==r&&s.set(i,o)}else if(s instanceof Set)for(const i of Array.from(s)){const r=Ln(e,s,i,i);r===void 0?s.delete(i):r!==i&&(s.delete(i),s.add(r))}else for(const[i,r]of Object.entries(s)){const o=Ln(e,s,i,r);o===void 0?delete s[i]:o!==r&&(s[i]=o)}return e.call(t,n,s)}class Hs{constructor(t,n,s){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,He,{value:Ci});let i=null;typeof n=="function"||Array.isArray(n)?i=n:s===void 0&&n&&(s=n,n=void 0);const r=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,uniqueKeys:!0,version:"1.2"},s);this.options=r;let{version:o}=r;s!=null&&s._directives?(this.directives=s._directives.atDocument(),this.directives.yaml.explicit&&(o=this.directives.yaml.version)):this.directives=new Le({version:o}),this.setSchema(o,s),t===void 0?this.contents=null:this.contents=this.createNode(t,i,s)}clone(){const t=Object.create(Hs.prototype,{[He]:{value:Ci}});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=we(this.contents)?this.contents.clone(t.schema):this.contents,this.range&&(t.range=this.range.slice()),t}add(t){Xt(this.contents)&&this.contents.add(t)}addIn(t,n){Xt(this.contents)&&this.contents.addIn(t,n)}createAlias(t,n){if(!t.anchor){const s=bl(this);t.anchor=!n||s.has(n)?_l(n||"a",s):n}return new ar(t.anchor)}createNode(t,n,s){let i;if(typeof n=="function")t=n.call({"":t},"",t),i=n;else if(Array.isArray(n)){const w=A=>typeof A=="number"||A instanceof String||A instanceof Number,k=n.filter(w).map(String);k.length>0&&(n=n.concat(k)),i=n}else s===void 0&&n&&(s=n,n=void 0);const{aliasDuplicateObjects:r,anchorPrefix:o,flow:l,keepUndefined:a,onTagObj:c,tag:h}=s!=null?s:{},{onAnchor:d,setAnchors:y,sourceObjects:b}=ju(this,o||"a"),S={aliasDuplicateObjects:r!=null?r:!0,keepUndefined:a!=null?a:!1,onAnchor:d,onTagObj:c,replacer:i,schema:this.schema,sourceObjects:b},m=Vn(t,h,S);return l&&ye(m)&&(m.flow=!0),y(),m}createPair(t,n,s={}){const i=this.createNode(t,null,s),r=this.createNode(n,null,s);return new Pe(i,r)}delete(t){return Xt(this.contents)?this.contents.delete(t):!1}deleteIn(t){return Cn(t)?this.contents==null?!1:(this.contents=null,!0):Xt(this.contents)?this.contents.deleteIn(t):!1}get(t,n){return ye(this.contents)?this.contents.get(t,n):void 0}getIn(t,n){return Cn(t)?!n&&ae(this.contents)?this.contents.value:this.contents:ye(this.contents)?this.contents.getIn(t,n):void 0}has(t){return ye(this.contents)?this.contents.has(t):!1}hasIn(t){return Cn(t)?this.contents!==void 0:ye(this.contents)?this.contents.hasIn(t):!1}set(t,n){this.contents==null?this.contents=ks(this.schema,[t],n):Xt(this.contents)&&this.contents.set(t,n)}setIn(t,n){Cn(t)?this.contents=n:this.contents==null?this.contents=ks(this.schema,Array.from(t),n):Xt(this.contents)&&this.contents.setIn(t,n)}setSchema(t,n={}){typeof t=="number"&&(t=String(t));let s;switch(t){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new Le({version:"1.1"}),s={merge:!0,resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=t:this.directives=new Le({version:t}),s={merge:!1,resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,s=null;break;default:{const i=JSON.stringify(t);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${i}`)}}if(n.schema instanceof Object)this.schema=n.schema;else if(s)this.schema=new _r(Object.assign(s,n));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:t,jso
`),o=l+o}if(/[^ ]/.test(o)){let l=1;const a=n.linePos[1];a&&a.line===s&&a.col>i&&(l=Math.max(1,Math.min(a.col-i,80-r)));const c=" ".repeat(r)+"^".repeat(l);n.message+=`:
${o}
${c}
`}};function pn(e,{flow:t,indicator:n,next:s,offset:i,onError:r,startOnNewline:o}){let l=!1,a=o,c=o,h="",d="",y=!1,b=!1,S=!1,m=null,w=null,k=null,A=null,C=null;for(const D of e)switch(S&&(D.type!=="space"&&D.type!=="newline"&&D.type!=="comma"&&r(D.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),S=!1),D.type){case"space":!t&&a&&n!=="doc-start"&&D.source[0]===" "&&r(D,"TAB_AS_INDENT","Tabs are not allowed as indentation"),c=!0;break;case"comment":{c||r(D,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const X=D.source.substring(1)||" ";h?h+=d+X:h=X,d="",a=!1;break}case"newline":a?h?h+=D.source:l=!0:d+=D.source,a=!0,y=!0,(m||w)&&(b=!0),c=!0;break;case"anchor":m&&r(D,"MULTIPLE_ANCHORS","A node can have at most one anchor"),D.source.endsWith(":")&&r(D.offset+D.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),m=D,C===null&&(C=D.offset),a=!1,c=!1,S=!0;break;case"tag":{w&&r(D,"MULTIPLE_TAGS","A node can have at most one tag"),w=D,C===null&&(C=D.offset),a=!1,c=!1,S=!0;break}case n:(m||w)&&r(D,"BAD_PROP_ORDER",`Anchors and tags must be after the ${D.source} indicator`),A&&r(D,"UNEXPECTED_TOKEN",`Unexpected ${D.source} in ${t!=null?t:"collection"}`),A=D,a=!1,c=!1;break;case"comma":if(t){k&&r(D,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`),k=D,a=!1,c=!1;break}default:r(D,"UNEXPECTED_TOKEN",`Unexpected ${D.type} token`),a=!1,c=!1}const M=e[e.length-1],R=M?M.offset+M.source.length:i;return S&&s&&s.type!=="space"&&s.type!=="newline"&&s.type!=="comma"&&(s.type!=="scalar"||s.source!=="")&&r(s.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),{comma:k,found:A,spaceBefore:l,comment:h,hasNewline:y,hasNewlineAfterProp:b,anchor:m,tag:w,end:R,start:C!=null?C:R}}function Hn(e){if(!e)return null;switch(e.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(e.source.includes(`
`))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(Hn(t.key)||Hn(t.value))return!0}return!1;default:return!0}}function Mi(e,t,n){if((t==null?void 0:t.type)==="flow-collection"){const s=t.end[0];s.indent===e&&(s.source==="]"||s.source==="}")&&Hn(t)&&n(s,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function Ul(e,t,n){const{uniqueKeys:s}=e.options;if(s===!1)return!1;const i=typeof s=="function"?s:(r,o)=>r===o||ae(r)&&ae(o)&&r.value===o.value&&!(r.value==="<<"&&e.schema.merge);return t.some(r=>i(r.key,n))}const go="All mapping items must start at the same column";function hh({composeNode:e,composeEmptyNode:t},n,s,i){var a;const r=new Ye(n.schema);n.atRoot&&(n.atRoot=!1);let o=s.offset,l=null;for(const c of s.items){const{start:h,key:d,sep:y,value:b}=c,S=pn(h,{indicator:"explicit-key-ind",next:d!=null?d:y==null?void 0:y[0],offset:o,onError:i,startOnNewline:!0}),m=!S.found;if(m){if(d&&(d.type==="block-seq"?i(o,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in d&&d.indent!==s.indent&&i(o,"BAD_INDENT",go)),!S.anchor&&!S.tag&&!y){l=S.end,S.comment&&(r.comment?r.comment+=`
`+S.comment:r.comment=S.comment);continue}(S.hasNewlineAfterProp||Hn(d))&&i(d!=null?d:h[h.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else((a=S.found)==null?void 0:a.indent)!==s.indent&&i(o,"BAD_INDENT",go);const w=S.end,k=d?e(n,d,S,i):t(n,w,h,null,S,i);n.schema.compat&&Mi(s.indent,d,i),Ul(n,r.items,k)&&i(w,"DUPLICATE_KEY","Map keys must be unique");const A=pn(y!=null?y:[],{indicator:"map-value-ind",next:b,offset:k.range[2],onError:i,startOnNewline:!d||d.type==="block-scalar"});if(o=A.end,A.found){m&&((b==null?void 0:b.type)==="block-map"&&!A.hasNewline&&i(o,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),n.options.strict&&S.start<A.found.offset-1024&&i(k.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const C=b?e(n,b,A,i):t(n,o,y,null,A,i);n.schema.compat&&Mi(s.indent,b,i),o=C.range[2];const M=new Pe(k,C);n.options.keepSourceTokens&&(M.srcToken=c),r.items.push(M)}else{m&&i(k.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),A.comment&&(k.comment?k.comment+=`
`+A.comment:k.comment=A.comment);const C=new Pe(k);n.options.keepSourceTokens&&(C.srcToken=c),r.items.push(C)}}return l&&l<o&&i(l,"IMPOSSIBLE","Map comment with trailing content"),r.range=[s.offset,o,l!=null?l:o],r}function dh({composeNode:e,composeEmptyNode:t},n,s,i){const r=new vn(n.schema);n.atRoot&&(n.atRoot=!1);let o=s.offset,l=null;for(const{start:a,value:c}of s.items){const h=pn(a,{indicator:"seq-item-ind",next:c,offset:o,onError:i,startOnNewline:!0});if(!h.found)if(h.anchor||h.tag||c)c&&c.type==="block-seq"?i(h.end,"BAD_INDENT","All sequence items must start at the same column"):i(o,"MISSING_CHAR","Sequence item without - indicator");else{l=h.end,h.comment&&(r.comment=h.comment);continue}const d=c?e(n,c,h,i):t(n,h.end,a,null,h,i);n.schema.compat&&Mi(s.indent,c,i),o=d.range[2],r.items.push(d)}return r.range=[s.offset,o,l!=null?l:o],r}function zn(e,t,n,s){let i="";if(e){let r=!1,o="";for(const l of e){const{source:a,type:c}=l;switch(c){case"space":r=!0;break;case"comment":{n&&!r&&s(l,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const h=a.substring(1)||" ";i?i+=o+h:i=h,o="";break}case"newline":i&&(o+=a),r=!0;break;default:s(l,"UNEXPECTED_TOKEN",`Unexpected ${c} at node end`)}t+=a.length}}return{comment:i,offset:t}}const mi="Block collections are not allowed within flow collections",gi=e=>e&&(e.type==="block-map"||e.type==="block-seq");function ph({composeNode:e,composeEmptyNode:t},n,s,i){var S;const r=s.start.source==="{",o=r?"flow map":"flow sequence",l=r?new Ye(n.schema):new vn(n.schema);l.flow=!0;const a=n.atRoot;a&&(n.atRoot=!1);let c=s.offset+s.start.source.length;for(let m=0;m<s.items.length;++m){const w=s.items[m],{start:k,key:A,sep:C,value:M}=w,R=pn(k,{flow:o,indicator:"explicit-key-ind",next:A!=null?A:C==null?void 0:C[0],offset:c,onError:i,startOnNewline:!1});if(!R.found){if(!R.anchor&&!R.tag&&!C&&!M){m===0&&R.comma?i(R.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${o}`):m<s.items.length-1&&i(R.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${o}`),R.comment&&(l.comment?l.comment+=`
`+R.comment:l.comment=R.comment),c=R.end;continue}!r&&n.options.strict&&Hn(A)&&i(A,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(m===0)R.comma&&i(R.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${o}`);else if(R.comma||i(R.start,"MISSING_CHAR",`Missing , between ${o} items`),R.comment){let D="";e:for(const X of k)switch(X.type){case"comma":case"space":break;case"comment":D=X.source.substring(1);break e;default:break e}if(D){let X=l.items[l.items.length-1];be(X)&&(X=(S=X.value)!=null?S:X.key),X.comment?X.comment+=`
`+D:X.comment=D,R.comment=R.comment.substring(D.length+1)}}if(!r&&!C&&!R.found){const D=M?e(n,M,R,i):t(n,R.end,C,null,R,i);l.items.push(D),c=D.range[2],gi(M)&&i(D.range,"BLOCK_IN_FLOW",mi)}else{const D=R.end,X=A?e(n,A,R,i):t(n,D,k,null,R,i);gi(A)&&i(X.range,"BLOCK_IN_FLOW",mi);const re=pn(C!=null?C:[],{flow:o,indicator:"map-value-ind",next:M,offset:X.range[2],onError:i,startOnNewline:!1});if(re.found){if(!r&&!R.found&&n.options.strict){if(C)for(const me of C){if(me===re.found)break;if(me.type==="newline"){i(me,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}R.start<re.found.offset-1024&&i(re.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else M&&("source"in M&&M.source&&M.source[0]===":"?i(M,"MISSING_CHAR",`Missing space after : in ${o}`):i(re.start,"MISSING_CHAR",`Missing , or : between ${o} items`));const _e=M?e(n,M,re,i):re.found?t(n,re.end,C,null,re,i):null;_e?gi(M)&&i(_e.range,"BLOCK_IN_FLOW",mi):re.comment&&(X.comment?X.comment+=`
`+re.comment:X.comment=re.comment);const Oe=new Pe(X,_e);if(n.options.keepSourceTokens&&(Oe.srcToken=w),r){const me=l;Ul(n,me.items,X)&&i(D,"DUPLICATE_KEY","Map keys must be unique"),me.items.push(Oe)}else{const me=new Ye(n.schema);me.flow=!0,me.items.push(Oe),l.items.push(me)}c=_e?_e.range[2]:re.end}}const h=r?"}":"]",[d,...y]=s.end;let b=c;if(d&&d.source===h)b=d.offset+d.source.length;else{const m=o[0].toUpperCase()+o.substring(1),w=a?`${m} must end with a ${h}`:`${m} in block collection must be sufficiently indented and end with a ${h}`;i(c,a?"MISSING_CHAR":"BAD_INDENT",w),d&&d.source.length!==1&&y.unshift(d)}if(y.length>0){const m=zn(y,b,n.options.strict,i);m.comment&&(l.comment?l.comment+=`
`+m.comment:l.comment=m.comment),l.range=[s.offset,b,m.offset]}else l.range=[s.offset,b,b];return l}function mh(e,t,n,s,i){let r;switch(n.type){case"block-map":{r=hh(e,t,n,i);break}case"block-seq":{r=dh(e,t,n,i);break}case"flow-collection":{r=ph(e,t,n,i);break}}if(!s)return r;const o=t.directives.tagName(s.source,y=>i(s,"TAG_RESOLVE_FAILED",y));if(!o)return r;const l=r.constructor;if(o==="!"||o===l.tagName)return r.tag=l.tagName,r;const a=_n(r)?"map":"seq";let c=t.schema.tags.find(y=>y.collection===a&&y.tag===o);if(!c){const y=t.schema.knownTags[o];if(y&&y.collection===a)t.schema.tags.push(Object.assign({},y,{default:!1})),c=y;else return i(s,"TAG_RESOLVE_FAILED",`Unresolved tag: ${o}`,!0),r.tag=o,r}const h=c.resolve(r,y=>i(s,"TAG_RESOLVE_FAILED",y),t.options),d=we(h)?h:new V(h);return d.range=r.range,d.tag=o,c!=null&&c.format&&(d.format=c.format),d}function gh(e,t,n){const s=e.offset,i=yh(e,t,n);if(!i)return{value:"",type:null,comment:"",range:[s,s,s]};const r=i.mode===">"?V.BLOCK_FOLDED:V.BLOCK_LITERAL,o=e.source?bh(e.source):[];let l=o.length;for(let m=o.length-1;m>=0;--m){const w=o[m][1];if(w===""||w==="\r")l=m;else break}if(l===0){const m=i.chomp==="+"&&o.length>0?`
`.repeat(Math.max(1,o.length-1)):"";let w=s+i.length;return e.source&&(w+=e.source.length),{value:m,type:r,comment:i.comment,range:[s,w,w]}}let a=e.indent+i.indent,c=e.offset+i.length,h=0;for(let m=0;m<l;++m){const[w,k]=o[m];if(k===""||k==="\r")i.indent===0&&w.length>a&&(a=w.length);else{if(w.length<a){const A="Block scalars with more-indented leading empty lines must use an explicit indentation indicator";n(c+w.length,"MISSING_CHAR",A)}i.indent===0&&(a=w.length),h=m;break}c+=w.length+k.length+1}for(let m=o.length-1;m>=l;--m)o[m][0].length>a&&(l=m+1);let d="",y="",b=!1;for(let m=0;m<h;++m)d+=o[m][0].slice(a)+`
`;for(let m=h;m<l;++m){let[w,k]=o[m];c+=w.length+k.length+1;const A=k[k.length-1]==="\r";if(A&&(k=k.slice(0,-1)),k&&w.length<a){const M=`Block scalar lines must not be less indented than their ${i.indent?"explicit indentation indicator":"first line"}`;n(c-k.length-(A?2:1),"BAD_INDENT",M),w=""}r===V.BLOCK_LITERAL?(d+=y+w.slice(a)+k,y=`
`):w.length>a||k[0]===" "?(y===" "?y=`
`:!b&&y===`
`&&(y=`
`),d+=y+w.slice(a)+k,y=`
`,b=!0):k===""?y===`
`?d+=`
`:y=`
`:(d+=y+k,y=" ",b=!1)}switch(i.chomp){case"-":break;case"+":for(let m=l;m<o.length;++m)d+=`
`+o[m][0].slice(a);d[d.length-1]!==`
`&&(d+=`
`);break;default:d+=`
`}const S=s+i.length+e.source.length;return{value:d,type:r,comment:i.comment,range:[s,S,S]}}function yh({offset:e,props:t},n,s){if(t[0].type!=="block-scalar-header")return s(t[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:i}=t[0],r=i[0];let o=0,l="",a=-1;for(let y=1;y<i.length;++y){const b=i[y];if(!l&&(b==="-"||b==="+"))l=b;else{const S=Number(b);!o&&S?o=S:a===-1&&(a=e+y)}}a!==-1&&s(a,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${i}`);let c=!1,h="",d=i.length;for(let y=1;y<t.length;++y){const b=t[y];switch(b.type){case"space":c=!0;case"newline":d+=b.source.length;break;case"comment":n&&!c&&s(b,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),d+=b.source.length,h=b.source.substring(1);break;case"error":s(b,"UNEXPECTED_TOKEN",b.message),d+=b.source.length;break;default:{const S=`Unexpected token in block scalar header: ${b.type}`;s(b,"UNEXPECTED_TOKEN",S);const m=b.source;m&&typeof m=="string"&&(d+=m.length)}}}return{mode:r,indent:o,chomp:l,comment:h,length:d}}function bh(e){const t=e.split(/\n( *)/),n=t[0],s=n.match(/^( *)/),r=[s!=null&&s[1]?[s[1],n.slice(s[1].length)]:["",n]];for(let o=1;o<t.length;o+=2)r.push([t[o],t[o+1]]);return r}function _h(e,t,n){const{offset:s,type:i,source:r,end:o}=e;let l,a;const c=(y,b,S)=>n(s+y,b,S);switch(i){case"scalar":l=V.PLAIN,a=wh(r,c);break;case"single-quoted-scalar":l=V.QUOTE_SINGLE,a=vh(r,c);break;case"double-quoted-scalar":l=V.QUOTE_DOUBLE,a=Sh(r,c);break;default:return n(e,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${i}`),{value:"",type:null,comment:"",range:[s,s+r.length,s+r.length]}}const h=s+r.length,d=zn(o,h,t,n);return{value:a,type:l,comment:d.comment,range:[s,h,d.offset]}}function wh(e,t){let n="";switch(e[0]){case" ":n="a tab character";break;case",":n="flow indicator character ,";break;case"%":n="directive indicator character %";break;case"|":case">":{n=`block scalar indicator ${e[0]}`;break}case"@":case"`":{n=`reserved character ${e[0]}`;break}}return n&&t(0,"BAD_SCALAR_START",`Plain value cannot start with ${n}`),ql(e)}function vh(e,t){return(e[e.length-1]!=="'"||e.length===1)&&t(e.length,"MISSING_CHAR","Missing closing 'quote"),ql(e.slice(1,-1)).replace(/''/g,"'")}function ql(e){var a;let t,n;try{t=new RegExp(`(.*?)(?<![ ])[ ]*\r?
`,"sy"),n=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
`,"sy")}catch{t=/(.*?)[ \t]*\r?\n/sy,n=/[ \t]*(.*?)[ \t]*\r?\n/sy}let s=t.exec(e);if(!s)return e;let i=s[1],r=" ",o=t.lastIndex;for(n.lastIndex=o;s=n.exec(e);)s[1]===""?r===`
`?i+=r:r=`
`:(i+=r+s[1],r=" "),o=n.lastIndex;const l=/[ \t]*(.*)/sy;return l.lastIndex=o,s=l.exec(e),i+r+((a=s==null?void 0:s[1])!=null?a:"")}function Sh(e,t){let n="";for(let s=1;s<e.length-1;++s){const i=e[s];if(!(i==="\r"&&e[s+1]===`
`))if(i===`
`){const{fold:r,offset:o}=kh(e,s);n+=r,s=o}else if(i==="\\"){let r=e[++s];const o=Oh[r];if(o)n+=o;else if(r===`
`)for(r=e[s+1];r===" "||r===" ";)r=e[++s+1];else if(r==="\r"&&e[s+1]===`
`)for(r=e[++s+1];r===" "||r===" ";)r=e[++s+1];else if(r==="x"||r==="u"||r==="U"){const l={x:2,u:4,U:8}[r];n+=Eh(e,s+1,l,t),s+=l}else{const l=e.substr(s-1,2);t(s-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${l}`),n+=l}}else if(i===" "||i===" "){const r=s;let o=e[s+1];for(;o===" "||o===" ";)o=e[++s+1];o!==`
`&&!(o==="\r"&&e[s+2]===`
`)&&(n+=s>r?e.slice(r,s+1):i)}else n+=i}return(e[e.length-1]!=='"'||e.length===1)&&t(e.length,"MISSING_CHAR",'Missing closing "quote'),n}function kh(e,t){let n="",s=e[t+1];for(;(s===" "||s===" "||s===`
`||s==="\r")&&!(s==="\r"&&e[t+2]!==`
`);)s===`
`&&(n+=`
`),t+=1,s=e[t+1];return n||(n=" "),{fold:n,offset:t}}const Oh={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
`,r:"\r",t:" ",v:"\v",N:"\x85",_:"\xA0",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function Eh(e,t,n,s){const i=e.substr(t,n),o=i.length===n&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;if(isNaN(o)){const l=e.substr(t-2,n+2);return s(t-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${l}`),l}return String.fromCodePoint(o)}function Vl(e,t,n,s){const{value:i,type:r,comment:o,range:l}=t.type==="block-scalar"?gh(t,e.options.strict,s):_h(t,e.options.strict,s),a=n?e.directives.tagName(n.source,d=>s(n,"TAG_RESOLVE_FAILED",d)):null,c=n&&a?Th(e.schema,i,a,n,s):t.type==="scalar"?Ah(e,i,t,s):e.schema[gt];let h;try{const d=c.resolve(i,y=>s(n!=null?n:t,"TAG_RESOLVE_FAILED",y),e.options);h=ae(d)?d:new V(d)}catch(d){const y=d instanceof Error?d.message:String(d);s(n!=null?n:t,"TAG_RESOLVE_FAILED",y),h=new V(i)}return h.range=l,h.source=i,r&&(h.type=r),a&&(h.tag=a),c.format&&(h.format=c.format),o&&(h.comment=o),h}function Th(e,t,n,s,i){var l;if(n==="!")return e[gt];const r=[];for(const a of e.tags)if(!a.collection&&a.tag===n)if(a.default&&a.test)r.push(a);else return a;for(const a of r)if((l=a.test)!=null&&l.test(t))return a;const o=e.knownTags[n];return o&&!o.collection?(e.tags.push(Object.assign({},o,{default:!1,test:void 0})),o):(i(s,"TAG_RESOLVE_FAILED",`Unresolved tag: ${n}`,n!=="tag:yaml.org,2002:str"),e[gt])}function Ah({directives:e,schema:t},n,s,i){var o;const r=t.tags.find(l=>{var a;return l.default&&((a=l.test)==null?void 0:a.test(n))})||t[gt];if(t.compat){const l=(o=t.compat.find(a=>{var c;return a.default&&((c=a.test)==null?void 0:c.test(n))}))!=null?o:t[gt];if(r.tag!==l.tag){const a=e.tagString(r.tag),c=e.tagString(l.tag),h=`Value may be parsed as either ${a} or ${c}`;i(s,"TAG_RESOLVE_FAILED",h,!0)}}return r}function Ih(e,t,n){if(t){n===null&&(n=t.length);for(let s=n-1;s>=0;--s){let i=t[s];switch(i.type){case"space":case"comment":case"newline":e-=i.source.length;continue}for(i=t[++s];(i==null?void 0:i.type)==="space";)e+=i.source.length,i=t[++s];break}}return e}const Nh={composeNode:Hl,composeEmptyNode:wr};function Hl(e,t,n,s){const{spaceBefore:i,comment:r,anchor:o,tag:l}=n;let a,c=!0;switch(t.type){case"alias":a=$h(e,t,s),(o||l)&&s(t,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":a=Vl(e,t,l,s),o&&(a.anchor=o.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":a=mh(Nh,e,t,l,s),o&&(a.anchor=o.source.substring(1));break;default:{const h=t.type==="error"?t.message:`Unsupported token (type: ${t.type})`;s(t,"UNEXPECTED_TOKEN",h),a=wr(e,t.offset,void 0,null,n,s),c=!1}}return o&&a.anchor===""&&s(o,"BAD_ALIAS","Anchor cannot be an empty string"),i&&(a.spaceBefore=!0),r&&(t.type==="scalar"&&t.source===""?a.comment=r:a.commentBefore=r),e.options.keepSourceTokens&&c&&(a.srcToken=t),a}function wr(e,t,n,s,{spaceBefore:i,comment:r,anchor:o,tag:l,end:a},c){const h={type:"scalar",offset:Ih(t,n,s),indent:-1,source:""},d=Vl(e,h,l,c);return o&&(d.anchor=o.source.substring(1),d.anchor===""&&c(o,"BAD_ALIAS","Anchor cannot be an empty string")),i&&(d.spaceBefore=!0),r&&(d.comment=r,d.range[2]=a),d}function $h({options:e},{offset:t,source:n,end:s},i){const r=new ar(n.substring(1));r.source===""&&i(t,"BAD_ALIAS","Alias cannot be an empty string"),r.source.endsWith(":")&&i(t+n.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const o=t+n.length,l=zn(s,o,e.strict,i);return r.range=[t,o,l.offset],l.comment&&(r.comment=l.comment),r}function Ch(e,t,{offset:n,start:s,value:i,end:r},o){const l=Object.assign({_directives:t},e),a=new Hs(void 0,l),c={atRoot:!0,directives:a.directives,options:a.options,schema:a.schema},h=pn(s,{indicator:"doc-start",next:i!=null?i:r==null?void 0:r[0],offset:n,onError:o,startOnNewline:!0});h.found&&(a.directives.docStart=!0,i&&(i.type==="block-map"||i.type==="block-seq")&&!h.hasNewline&&o(h.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),a.contents=i?Hl(c,i,h,o):wr(c,h.end,s,null,h,o);const d=a.contents.range[2],y=zn(r,d,
`:`
`)+(o.substring(1)||" "),n=!0,s=!1;break;case"%":((i=e[r+1])==null?void 0:i[0])!=="#"&&(r+=1),n=!1;break;default:n||(s=!0),n=!1}}return{comment:t,afterEmptyLine:s}}class Lh{constructor(t={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(n,s,i,r)=>{const o=In(n);r?this.warnings.push(new uh(o,s,i)):this.errors.push(new Pn(o,s,i))},this.directives=new Le({version:t.version||"1.2"}),this.options=t}decorate(t,n){const{comment:s,afterEmptyLine:i}=yo(this.prelude);if(s){const r=t.contents;if(n)t.comment=t.comment?`${t.comment}
${s}`:s;else if(i||t.directives.docStart||!r)t.commentBefore=s;else if(ye(r)&&!r.flow&&r.items.length>0){let o=r.items[0];be(o)&&(o=o.key);const l=o.commentBefore;o.commentBefore=l?`${s}
${l}`:s}else{const o=r.commentBefore;r.commentBefore=o?`${s}
${o}`:s}}n?(Array.prototype.push.apply(t.errors,this.errors),Array.prototype.push.apply(t.warnings,this.warnings)):(t.errors=this.errors,t.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:yo(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(t,n=!1,s=-1){for(const i of t)yield*this.next(i);yield*this.end(n,s)}*next(t){switch(t.type){case"directive":this.directives.add(t.source,(n,s,i)=>{const r=In(t);r[0]+=n,this.onError(r,"BAD_DIRECTIVE",s,i)}),this.prelude.push(t.source),this.atDirectives=!0;break;case"document":{const n=Ch(this.options,this.directives,t,this.onError);this.atDirectives&&!n.directives.docStart&&this.onError(t,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(n,!1),this.doc&&(yield this.doc),this.doc=n,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(t.source);break;case"error":{const n=t.source?`${t.message}: ${JSON.stringify(t.source)}`:t.message,s=new Pn(In(t),"UNEXPECTED_TOKEN",n);this.atDirectives||!this.doc?this.errors.push(s):this.doc.errors.push(s);break}case"doc-end":{if(!this.doc){const s="Unexpected doc-end without preceding document";this.errors.push(new Pn(In(t),"UNEXPECTED_TOKEN",s));break}this.doc.directives.docEnd=!0;const n=zn(t.end,t.offset+t.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),n.comment){const s=this.doc.comment;this.doc.comment=s?`${s}
${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.push(new Pn(In(t),"UNEXPECTED_TOKEN",`Unsupported token ${t.type}`))}}*end(t=!1,n=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(t){const s=Object.assign({_directives:this.directives},this.options),i=new Hs(void 0,s);this.atDirectives&&this.onError(n,"MISSING_CHAR","Missing directives-end indicator line"),i.range=[0,n,n],this.decorate(i,!1),yield i}}}const Wl="\uFEFF",Jl="",Yl="",Di="";function Ph(e){switch(e){case Wl:return"byte-order-mark";case Jl:return"doc-mode";case Yl:return"flow-error-end";case Di:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
`:case`\r
`:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(e[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}function Ve(e){switch(e){case void 0:case" ":case`
`:case"\r":case" ":return!0;default:return!1}}const bo="0123456789ABCDEFabcdef".split(""),Mh="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()".split(""),yi=",[]{}".split(""),Dh=` ,[]{}
\r `.split(""),bi=e=>!e||Dh.includes(e);class jh{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(t,n=!1){var i;t&&(this.buffer=this.buffer?this.buffer+t:t,this.lineEndPos=null),this.atEnd=!n;let s=(i=this.next)!=null?i:"stream";for(;s&&(n||this.hasChars(1));)s=yield*this.parseNext(s)}atLineEnd(){let t=this.pos,n=this.buffer[t];for(;n===" "||n===" ";)n=this.buffer[++t];return!n||n==="#"||n===`
`?!0:n==="\r"?this.buffer[t+1]===`
`:!1}charAt(t){return this.buffer[this.pos+t]}continueScalar(t){let n=this.buffer[t];if(this.indentNext>0){let s=0;for(;n===" ";)n=this.buffer[++s+t];if(n==="\r"){const i=this.buffer[s+t+1];if(i===`
`||!i&&!this.atEnd)return t+s+1}return n===`
`||s>=this.indentNext||!n&&!this.atEnd?t+s:-1}if(n==="-"||n==="."){const s=this.buffer.substr(t,3);if((s==="---"||s==="...")&&Ve(this.buffer[t+3]))return-1}return t}getLine(){let t=this.lineEndPos;return(typeof t!="number"||t!==-1&&t<this.pos)&&(t=this.buffer.indexOf(`
`,this.pos),this.lineEndPos=t),t===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[t-1]==="\r"&&(t-=1),this.buffer.substring(this.pos,t))}hasChars(t){return this.pos+t<=this.buffer.length}setNext(t){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=t,null}peek(t){return this.buffer.substr(this.pos,t)}*parseNext(t){switch(t){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let t=this.getLine();if(t===null)return this.setNext("stream");if(t[0]===Wl&&(yield*this.pushCount(1),t=t.substring(1)),t[0]==="%"){let n=t.length;const s=t.indexOf("#");if(s!==-1){const r=t[s-1];(r===" "||r===" ")&&(n=s-1)}for(;;){const r=t[n-1];if(r===" "||r===" ")n-=1;else break}const i=(yield*this.pushCount(n))+(yield*this.pushSpaces(!0));return yield*this.pushCount(t.length-i),this.pushNewline(),"stream"}if(this.atLineEnd()){const n=yield*this.pushSpaces(!0);return yield*this.pushCount(t.length-n),yield*this.pushNewline(),"stream"}return yield Jl,yield*this.parseLineStart()}*parseLineStart(){const t=this.charAt(0);if(!t&&!this.atEnd)return this.setNext("line-start");if(t==="-"||t==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");const n=this.peek(3);if(n==="---"&&Ve(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,"doc";if(n==="..."&&Ve(this.charAt(3)))return yield*this.pushCount(3),"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!Ve(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){const[t,n]=this.peek(2);if(!n&&!this.atEnd)return this.setNext("block-start");if((t==="-"||t==="?"||t===":")&&Ve(n)){const s=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=s,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);const t=this.getLine();if(t===null)return this.setNext("doc");let n=yield*this.pushIndicators();switch(t[n]){case"#":yield*this.pushCount(t.length-n);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(bi),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return n+=yield*this.parseBlockScalarHeader(),n+=yield*this.pushSpaces(!0),yield*this.pushCount(t.length-n),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let t,n,s=-1;do t=yield*this.pushNewline(),t>0?(n=yield*this.pushSpaces(!1),this.indentValue=s=n):n=0,n+=yield*this.pushSpaces(!0);while(t+n>0);const i=this.getLine();if(i===null)return this.setNext("flow");if((s!==-1&&s<this.indentNext&&i[0]!=="#"||s===0&&(i.startsWith("---")||i.startsWith("..."))&&Ve(i[3]))&&!(s===this.indentNext-1&&this.flowLevel===1&&(i[0]==="]"||i[0]==="}")))return this.flowLevel=0,yield Yl,yield*this.parseLineStart();let r=0;for(;i[r]===",";)r+=yield*this.pushCount(1),r+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(r+=yield*this.pushIndicators(),i[r]){case void 0:return"flow";case"#":return yield*this.pushCount(i.length-r),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(bi),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{const o=this.charAt(1);if(this.flowKey||Ve(o)||o===",")return this.flowKey=!1,yield*this.pushCoun
`,this.pos);if(i!==-1){for(;i!==-1;){const r=this.continueScalar(i+1);if(r===-1)break;i=s.indexOf(`
`,r)}i!==-1&&(n=i-(s[i-1]==="\r"?2:1))}if(n===-1){if(!this.atEnd)return this.setNext("quoted-scalar");n=this.buffer.length}return yield*this.pushToIndex(n+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let t=this.pos;for(;;){const n=this.buffer[++t];if(n==="+")this.blockScalarKeep=!0;else if(n>"0"&&n<="9")this.blockScalarIndent=Number(n)-1;else if(n!=="-")break}return yield*this.pushUntil(n=>Ve(n)||n==="#")}*parseBlockScalar(){let t=this.pos-1,n=0,s;e:for(let i=this.pos;s=this.buffer[i];++i)switch(s){case" ":n+=1;break;case`
`:t=i,n=0;break;case"\r":{const r=this.buffer[i+1];if(!r&&!this.atEnd)return this.setNext("block-scalar");if(r===`
`)break}default:break e}if(!s&&!this.atEnd)return this.setNext("block-scalar");if(n>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=n:this.indentNext+=this.blockScalarIndent;do{const i=this.continueScalar(t+1);if(i===-1)break;t=this.buffer.indexOf(`
`,i)}while(t!==-1);if(t===-1){if(!this.atEnd)return this.setNext("block-scalar");t=this.buffer.length}}if(!this.blockScalarKeep)do{let i=t-1,r=this.buffer[i];r==="\r"&&(r=this.buffer[--i]);const o=i;for(;r===" "||r===" ";)r=this.buffer[--i];if(r===`
`&&i>=this.pos&&i+1+n>o)t=i;else break}while(!0);return yield Di,yield*this.pushToIndex(t+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const t=this.flowLevel>0;let n=this.pos-1,s=this.pos-1,i;for(;i=this.buffer[++s];)if(i===":"){const r=this.buffer[s+1];if(Ve(r)||t&&r===",")break;n=s}else if(Ve(i)){let r=this.buffer[s+1];if(i==="\r"&&(r===`
`?(s+=1,i=`
`,r=this.buffer[s+1]):n=s),r==="#"||t&&yi.includes(r))break;if(i===`
`){const o=this.continueScalar(s+1);if(o===-1)break;s=Math.max(s,o-2)}}else{if(t&&yi.includes(i))break;n=s}return!i&&!this.atEnd?this.setNext("plain-scalar"):(yield Di,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 s=this.buffer.slice(this.pos,t);return s?(yield s,this.pos+=s.length,s.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(bi))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const t=this.flowLevel>0,n=this.charAt(1);if(Ve(n)||t&&yi.includes(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(;!Ve(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(Mh.includes(n))n=this.buffer[++t];else if(n==="%"&&bo.includes(this.buffer[t+1])&&bo.includes(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===`
`?yield*this.pushCount(1):t==="\r"&&this.charAt(1)===`
`?yield*this.pushCount(2):0}*pushSpaces(t){let n=this.pos-1,s;do s=this.buffer[++n];while(s===" "||t&&s===" ");const i=n-this.pos;return i>0&&(yield this.buffer.substr(this.pos,i),this.pos=n),i}*pushUntil(t){let n=this.pos,s=this.buffer[n];for(;!t(s);)s=this.buffer[++n];return yield*this.pushToIndex(n,!1)}}class Rh{constructor(){this.lineStarts=[],this.addNewLine=t=>this.lineStarts.push(t),this.linePos=t=>{let n=0,s=this.lineStarts.length;for(;n<s;){const r=n+s>>1;this.lineStarts[r]<t?n=r+1:s=r}if(this.lineStarts[n]===t)return{line:n+1,col:1};if(n===0)return{line:0,col:t};const i=this.lineStarts[n-1];return{line:n,col:t-i+1}}}}function We(e,t){for(let n=0;n<e.length;++n)if(e[n].type===t)return!0;return!1}function _o(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 zl(e){switch(e==null?void 0:e.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function fs(e){var t;switch(e.type){case"document":return e.start;case"block-map":{const n=e.items[e.items.length-1];return(t=n.sep)!=null?t:n.start}case"block-seq":return e.items[e.items.length-1].start;default:return[]}}function Zt(e){var n;if(e.length===0)return[];let t=e.length;e:for(;--t>=0;)switch(e[t].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;((n=e[++t])==null?void 0:n.type)==="space";);return e.splice(t,e.length)}function wo(e){if(e.start.type==="flow-seq-start")for(const t of e.items)t.sep&&!t.value&&!We(t.start,"explicit-key-ind")&&!We(t.sep,"map-value-ind")&&(t.key&&(t.value=t.key),delete t.key,zl(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 Bh{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 jh,this.onNewLine=t}*parse(t,n=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(const s of this.lexer.lex(t,n))yield*this.next(s);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=Ph(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 s=`Not a YAML token: ${t}`;yield*this.pop({type:"error",offset:this.offset,message:s,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||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!=null?t:this.stack.pop();if(n)if(this.stack.length===0)yield n;else{const s=this.peek(1);switch(n.type==="block-scalar"?n.indent="indent"in s?s.indent:0:n.type==="flow-collection"&&s.type==="document"&&(n.indent=0),n.type==="flow-collection"&&wo(n),s.type){case"document":s.value=n;break;case"blo
`)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
`,n)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(t){var s;const n=t.items[t.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,n.value){const i="end"in n.value?n.value.end:void 0,r=Array.isArray(i)?i[i.length-1]:void 0;(r==null?void 0:r.type)==="comment"?i==null||i.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 i=t.items[t.items.length-2],r=(s=i==null?void 0:i.value)==null?void 0:s.end;if(Array.isArray(r)){Array.prototype.push.apply(r,n.start),r.push(this.sourceToken),t.items.pop();return}}n.start.push(this.sourceToken)}return}if(this.indent>=t.indent){const i=!this.onKeyLine&&this.indent===t.indent&&n.sep;let r=[];if(i&&n.sep&&!n.value){const o=[];for(let l=0;l<n.sep.length;++l){const a=n.sep[l];switch(a.type){case"newline":o.push(l);break;case"space":break;case"comment":a.indent>t.indent&&(o.length=0);break;default:o.length=0}}o.length>=2&&(r=n.sep.splice(o[1]))}switch(this.type){case"anchor":case"tag":i||n.value?(r.push(this.sourceToken),t.items.push({start:r}),this.onKeyLine=!0):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"explicit-key-ind":!n.sep&&!We(n.start,"explicit-key-ind")?n.start.push(this.sourceToken):i||n.value?(r.push(this.sourceToken),t.items.push({start:r})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]}),this.onKeyLine=!0;return;case"map-value-ind":if(We(n.start,"explicit-key-ind"))if(n.sep)if(n.value)t.items.push({start:[],key:null,sep:[this.sourceToken]});else if(We(n.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]});else if(zl(n.key)&&!We(n.sep,"newline")){const o=Zt(n.start),l=n.key,a=n.sep;a.push(this.sourceToken),delete n.key,delete n.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:l,sep:a}]})}else r.length>0?n.sep=n.sep.concat(r,this.sourceToken):n.sep.push(this.sourceToken);else if(We(n.start,"newline"))Object.assign(n,{key:null,sep:[this.sourceToken]});else{const o=Zt(n.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:null,sep:[this.sourceToken]}]})}else n.sep?n.value||i?t.items.push({start:r,key:null,sep:[this.sourceToken]}):We(n.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const o=this.flowScalar(this.type);i||n.value?(t.items.push({start:r,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){i&&o.type!=="block-seq"&&We(n.start,"explicit-key-ind")&&t.items.push({start:r}),this.stack.push(o);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(t){var s;const n=t.items[t.items.length-1];switch(this.type){case"newline":if(n.value){const i="end"in n.value?n.value.end:void 0,r=Array.isArray(i)?i[i.length-1]:void 0;(r==null?void 0:r.type)==="comment"?i==null||i.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 i=t.items[t.items.length-2],r=(s=i==null?void 0:i.value)==null?void 0:s.end;if(Array.isArray(r)){Array.prototype.push.apply(r,n.start),r.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.sourceT
`)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
`,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=fs(t),s=Zt(n);return s.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s}]}}case"map-value-ind":{this.onKeyLine=!0;const n=fs(t),s=Zt(n);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(t,n){return this.type!=="comment"||this.indent<=n?!1:t.every(s=>s.type==="newline"||s.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 Fh(e){const t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new Rh||null,prettyErrors:t}}function xh(e,t={}){const{lineCounter:n,prettyErrors:s}=Fh(t),i=new Bh(n==null?void 0:n.addNewLine),r=new Lh(t);let o=null;for(const l of r.compose(i.parse(e),!0,e.length))if(!o)o=l;else if(o.options.logLevel!=="silent"){o.errors.push(new Pn(l.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return s&&n&&(o.errors.forEach(mo(e,n)),o.warnings.forEach(mo(e,n))),o}function vo(e,t,n){let s;typeof t=="function"?s=t:n===void 0&&t&&typeof t=="object"&&(n=t);const i=xh(e,n);if(!i)return null;if(i.warnings.forEach(r=>kl(i.options.logLevel,r)),i.errors.length>0){if(i.options.logLevel!=="silent")throw i.errors[0];i.errors=[]}return i.toJS(Object.assign({reviver:s},n))}var us=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},ji={exports:{}};(function(e,t){var n=200,s="__lodash_hash_undefined__",i=800,r=16,o=9007199254740991,l="[object Arguments]",a="[object Array]",c="[object AsyncFunction]",h="[object Boolean]",d="[object Date]",y="[object Error]",b="[object Function]",S="[object GeneratorFunction]",m="[object Map]",w="[object Number]",k="[object Null]",A="[object Object]",C="[object Proxy]",M="[object RegExp]",R="[object Set]",D="[object String]",X="[object Undefined]",re="[object WeakMap]",_e="[object ArrayBuffer]",Oe="[object DataView]",me="[object Float32Array]",bt="[object Float64Array]",lt="[object Int8Array]",Be="[object Int16Array]",Gn="[object Int32Array]",Ee="[object Uint8Array]",ce="[object Uint8ClampedArray]",ee="[object Uint16Array]",at="[object Uint32Array]",Yt=/[\\^$.*+?()[\]{}|]/g,ct=/^\[object .+?Constructor\]$/,Ue=/^(?:0|[1-9]\d*)$/,te={};te[me]=te[bt]=te[lt]=te[Be]=te[Gn]=te[Ee]=te[ce]=te[ee]=te[at]=!0,te[l]=te[a]=te[_e]=te[h]=te[Oe]=te[d]=te[y]=te[b]=te[m]=te[w]=te[A]=te[M]=te[R]=te[D]=te[re]=!1;var Qn=typeof us=="object"&&us&&us.Object===Object&&us,Ws=typeof self=="object"&&self&&self.Object===Object&&self,Ne=Qn||Ws||Function("return this")(),$t=t&&!t.nodeType&&t,_t=$t&&!0&&e&&!e.nodeType&&e,ft=_t&&_t.exports===$t,Ct=ft&&Qn.process,zt=function(){try{var f=_t&&_t.require&&_t.require("util").types;return f||Ct&&Ct.binding&&Ct.binding("util")}catch{}}(),u=zt&&zt.isTypedArray;function g(f,p,_){switch(_.length){case 0:return f.call(p);case 1:return f.call(p,_[0]);case 2:return f.call(p,_[0],_[1]);case 3:return f.call(p,_[0],_[1],_[2
# Default configuration
title: "Dashboard"
subtitle: "Homer"
header: true
footer: '<p>Created with <span class="has-text-danger">\u2764\uFE0F</span> with <a href="https://bulma.io/">bulma</a>, <a href="https://vuejs.org/">vuejs</a> & <a href="https://fontawesome.com/">font awesome</a> // Fork me on <a href="https://github.com/bastienwirtz/homer"><i class="fab fa-github-alt"></i></a></p>' # set false if you want to hide it.
columns: 3
connectivityCheck: true
defaults:
# columns, list
layout: columns
# auto, light, dark
colorTheme: auto
theme: default
colors:
light:
highlight-primary: "#3367d6"
highlight-secondary: "#4285f4"
highlight-hover: "#5a95f5"
background: "#f5f5f5"
card-background: "#ffffff"
text: "#363636"
text-header: "#ffffff"
text-title: "#303030"
text-subtitle: "#424242"
card-shadow: rgba(0, 0, 0, 0.1)
link: "#3273dc"
link-hover: "#363636"
background-image: ""
dark:
highlight-primary: "#3367d6"
highlight-secondary: "#4285f4"
highlight-hover: "#5a95f5"
background: "#131313"
card-background: "#2b2b2b"
text: "#eaeaea"
text-header: "#ffffff"
text-title: "#fafafa"
text-subtitle: "#f5f5f5"
card-shadow: rgba(0, 0, 0, 0.4)
link: "#3273dc"
link-hover: "#ffdd57"
background-image: ""
message: ~
links: []
services: []
proxy: ~`,sp={name:"App",components:{Navbar:td,GetStarted:ld,ConnectivityChecker:pd,Service:Md,Message:Fd,SearchInput:Hd,SettingToggle:Yd,DarkMode:Xd,DynamicTheme:tp},data:function(){return{loaded:!1,currentPage:null,configNotFound:!1,config:null,services:null,offline:!1,filter:"",vlayout:!0,isDark:null,showMenu:!1}},computed:{configurationNeeded:function(){return this.loaded&&!this.services||this.configNotFound}},created:async function(){this.buildDashboard(),window.onhashchange=this.buildDashboard,this.loaded=!0},methods:{searchHotkey(){if(this.config.hotkey&&this.config.hotkey.search)return this.config.hotkey.search},buildDashboard:async function(){const e=vo(np);let t;try{if(t=await this.getConfig(),this.currentPage=window.location.hash.substring(1)||"default",this.currentPage!=="default"){let n=await this.getConfig(`assets/${this.currentPage}.yml`);t=Object.assign(t,n)}}catch(n){console.log(n),t=this.handleErrors("\u26A0\uFE0F Error loading configuration",n)}if(this.config=Kh(e,t),this.services=this.config.services,document.title=this.config.documentTitle||`${this.config.title} | ${this.config.subtitle}`,this.config.stylesheet){let n="";for(const s of this.config.stylesheet)n+=`@import "${s}";`;this.createStylesheet(n)}},getConfig:function(e="assets/config.yml"){return fetch(e).then(t=>{if(t.status==404||t.redirected)return this.configNotFound=!0,{};if(!t.ok)throw Error(`${t.statusText}: ${t.body}`);const n=this;return t.text().then(s=>vo(s)).then(function(s){return s.externalConfig?n.getConfig(s.externalConfig):s})})},matchesFilter:function(e){var n;const t=(n=this.filter)==null?void 0:n.toLowerCase();return e.name.toLowerCase().includes(t)||e.subtitle&&e.subtitle.toLowerCase().includes(t)||e.tag&&e.tag.toLowerCase().includes(t)||e.keywords&&e.keywords.toLowerCase().includes(t)},navigateToFirstService:function(e){try{const t=this.services[0].items[0];window.open(t.url,e||t.target||"_self")}catch{console.warning("fail to open service")}},filterServices:function(e){if(console.log(e),this.filter=e,!e){this.services=this.config.services;return}const t=[];for(const n of this.config.services)for(const s of n.items)this.matchesFilter(s)&&t.push(s);this.services=[{name:e,icon:"fas fa-search",items:t}]},handleErrors:function(e,t){return{message:{title:e,style:"is-danger",content:t}}},createStylesheet:function(e){let t=document.createElement("style");t.appendChild(document.createTextNode(e)),document.head.appendChild(t)}}},ip={id:"bighead"},rp={key:0,class:"first-line"},op={class:"container"},lp={class:"logo"},ap={href:"#"},cp=["src"],fp={class:"headline"},up={id:"main-section",class:"section"},hp={class:"container"},dp={key:2},pp={key:0,class:"columns is-multiline"},mp={key:1,class:"group-logo media-left"},gp={class:"image is-48x48"},yp=["src","alt"],bp={key:1,class:"columns is-multiline layout-vertical"},_p={key:0,class:"group-title"},wp={key:1,class:"group-logo media-left"},vp={class:"image is-48x48"},Sp=["src","alt"],kp={class:"footer"},Op={class:"container"},Ep=["innerHTML"];function Tp(e,t,n,s,i,r){const o=nt("DynamicTheme"),l=nt("DarkMode"),a=nt("SettingToggle"),c=nt("SearchInput"),h=nt("Navbar"),d=nt("ConnectivityChecker"),y=nt("GetStarted"),b=nt("Message"),S=nt("Service");return e.config?(U(),J("div",{key:0,id:"app",class:ge([`theme-${e.config.theme}`,`page-${e.currentPage}`,e.isDark?"is-dark":"is-light",e.config.footer?"":"no-footer"])},[he(o,{themes:e.config.colors},null,8,["themes"]),x("div",ip,[e.config.header?(U(),J("section",rp,[x("div",op,[x("div",lp,[x("a",ap,[e.config.logo?(U(),J("img",{key:0,src:e.config.logo,alt:"dashboard logo"},null,8,cp)):le("",!0)]),e.config.icon?(U(),J("i",{key:0,class:ge(e.config.icon)},null,2)):le("",!0)]),x("div",{class:ge(["dashboard-title",{"no-logo":!e.config.icon||!e.config.logo}])},[x("span",fp,xe(e.config.subtitle),1),x("h1",null,xe(e.config.title),1)],2)])])):le("",!0),he(h,{open:e.showMenu,links:e.config.links,onNavbarToggle:t[6]||(t[6]=m=>e.showMenu=!e.showMenu)},{default:Qi(()=>[he(l,{onUpdated:t[0]||(t[0]=m=>e.isDark=m),defaultValue:this.config.defaults.colorTheme},nul