@mcp-com-ai/hapi 1.0.1-beta.260912 → 1.0.2-beta.260914

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/dist/index.js CHANGED
@@ -1,220 +1,231 @@
1
1
  // @bun
2
- var O=($,q)=>()=>(q||$((q={exports:{}}).exports,q),q.exports);var X0=import.meta.require;var M=O((d2)=>{var g$=Symbol.for("yaml.alias"),L1=Symbol.for("yaml.document"),p0=Symbol.for("yaml.map"),Z1=Symbol.for("yaml.pair"),u$=Symbol.for("yaml.scalar"),d0=Symbol.for("yaml.seq"),x=Symbol.for("yaml.node.type"),y2=($)=>!!$&&typeof $==="object"&&$[x]===g$,h2=($)=>!!$&&typeof $==="object"&&$[x]===L1,x2=($)=>!!$&&typeof $==="object"&&$[x]===p0,k2=($)=>!!$&&typeof $==="object"&&$[x]===Z1,R1=($)=>!!$&&typeof $==="object"&&$[x]===u$,v2=($)=>!!$&&typeof $==="object"&&$[x]===d0;function G1($){if($&&typeof $==="object")switch($[x]){case p0:case d0:return!0}return!1}function m2($){if($&&typeof $==="object")switch($[x]){case g$:case p0:case u$:case d0:return!0}return!1}var p2=($)=>(R1($)||G1($))&&!!$.anchor;d2.ALIAS=g$;d2.DOC=L1;d2.MAP=p0;d2.NODE_TYPE=x;d2.PAIR=Z1;d2.SCALAR=u$;d2.SEQ=d0;d2.hasAnchor=p2;d2.isAlias=y2;d2.isCollection=G1;d2.isDocument=h2;d2.isMap=x2;d2.isNode=m2;d2.isPair=k2;d2.isScalar=R1;d2.isSeq=v2});var P0=O((LH)=>{var C=M(),j=Symbol("break visit"),J1=Symbol("skip children"),y=Symbol("remove node");function l0($,q){let U=I1(q);if(C.isDocument($)){if(L0(null,$.contents,U,Object.freeze([$]))===y)$.contents=null}else L0(null,$,U,Object.freeze([]))}l0.BREAK=j;l0.SKIP=J1;l0.REMOVE=y;function L0($,q,U,H){let z=Q1($,q,U,H);if(C.isNode(z)||C.isPair(z))return D1($,H,z),L0($,z,U,H);if(typeof z!=="symbol"){if(C.isCollection(q)){H=Object.freeze(H.concat(q));for(let X=0;X<q.items.length;++X){let L=L0(X,q.items[X],U,H);if(typeof L==="number")X=L-1;else if(L===j)return j;else if(L===y)q.items.splice(X,1),X-=1}}else if(C.isPair(q)){H=Object.freeze(H.concat(q));let X=L0("key",q.key,U,H);if(X===j)return j;else if(X===y)q.key=null;let L=L0("value",q.value,U,H);if(L===j)return j;else if(L===y)q.value=null}}return z}async function a0($,q){let U=I1(q);if(C.isDocument($)){if(await Z0(null,$.contents,U,Object.freeze([$]))===y)$.contents=null}else await Z0(null,$,U,Object.freeze([]))}a0.BREAK=j;a0.SKIP=J1;a0.REMOVE=y;async function Z0($,q,U,H){let z=await Q1($,q,U,H);if(C.isNode(z)||C.isPair(z))return D1($,H,z),Z0($,z,U,H);if(typeof z!=="symbol"){if(C.isCollection(q)){H=Object.freeze(H.concat(q));for(let X=0;X<q.items.length;++X){let L=await Z0(X,q.items[X],U,H);if(typeof L==="number")X=L-1;else if(L===j)return j;else if(L===y)q.items.splice(X,1),X-=1}}else if(C.isPair(q)){H=Object.freeze(H.concat(q));let X=await Z0("key",q.key,U,H);if(X===j)return j;else if(X===y)q.key=null;let L=await Z0("value",q.value,U,H);if(L===j)return j;else if(L===y)q.value=null}}return z}function I1($){if(typeof $==="object"&&($.Collection||$.Node||$.Value))return Object.assign({Alias:$.Node,Map:$.Node,Scalar:$.Node,Seq:$.Node},$.Value&&{Map:$.Value,Scalar:$.Value,Seq:$.Value},$.Collection&&{Map:$.Collection,Seq:$.Collection},$);return $}function Q1($,q,U,H){if(typeof U==="function")return U($,q,H);if(C.isMap(q))return U.Map?.($,q,H);if(C.isSeq(q))return U.Seq?.($,q,H);if(C.isPair(q))return U.Pair?.($,q,H);if(C.isScalar(q))return U.Scalar?.($,q,H);if(C.isAlias(q))return U.Alias?.($,q,H);return}function D1($,q,U){let H=q[q.length-1];if(C.isCollection(H))H.items[$]=U;else if(C.isPair(H))if($==="key")H.key=U;else H.value=U;else if(C.isDocument(H))H.contents=U;else{let z=C.isAlias(H)?"alias":"scalar";throw Error(`Cannot replace node with ${z} parent`)}}LH.visit=l0;LH.visitAsync=a0});var y$=O((QH)=>{var B1=M(),GH=P0(),JH={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},IH=($)=>$.replace(/[!,[\]{}]/g,(q)=>JH[q]);class f{constructor($,q){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},f.defaultYaml,$),this.tags=Object.assign({},f.defaultTags,q)}clone(){let $=new f(this.yaml,this.tags);return $.docStart=this.docStart,$}atDocument(){let $=new f(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:f.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},f.defaultTags);break}return $}add($,q){if(this.atNextDocument)this.yaml={explicit:f.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},f.defaultTags),this.atNextDocument=!1;let U=$.trim().split(/[ \t]+/),H=U.shift();switch(H){case"%TAG":{if(U.length!==2){if(q(0,"%TAG directive should contain exactly two parts"),U.length<2)return!1}let[z,X]=U;return this.tags[z]=X,!0}case"%YAML":{if(this.yaml.explicit=!0,U.length!==1)return q(0,"%YAML directive should contain exactly one part"),!1;let[z]=U;if(z==="1.1"||z==="1.2")return this.yaml.version=z,!0;else{let X=/^\d+\.\d+$/.test(z);return q(6,`Unsupported YAML version ${z}`,X),!1}}default:return q(0,`Unknown directive ${H}`,!0),!1}}tagName($,q){if($==="!")return"!";if($[0]!=="!")return q(`Not a valid tag: ${$}`),null;if($[1]==="<"){let X=$.slice(2,-1);if(X==="!"||X==="!!")return q(`Verbatim tags aren't resolved, so ${$} is invalid.`),null;if($[$.length-1]!==">")q("Verbatim tags must end with a >");return X}let[,U,H]=$.match(/^(.*!)([^!]*)$/s);if(!H)q(`The ${$} tag has no suffix`);let z=this.tags[U];if(z)try{return z+decodeURIComponent(H)}catch(X){return q(String(X)),null}if(U==="!")return $;return q(`Could not resolve tag: ${$}`),null}tagString($){for(let[q,U]of Object.entries(this.tags))if($.startsWith(U))return q+IH($.substring(U.length));return $[0]==="!"?$:`!<${$}>`}toString($){let q=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],U=Object.entries(this.tags),H;if($&&U.length>0&&B1.isNode($.contents)){let z={};GH.visit($.contents,(X,L)=>{if(B1.isNode(L)&&L.tag)z[L.tag]=!0}),H=Object.keys(z)}else H=[];for(let[z,X]of U){if(z==="!!"&&X==="tag:yaml.org,2002:")continue;if(!$||H.some((L)=>L.startsWith(X)))q.push(`%TAG ${z} ${X}`)}return q.join(`
3
- `)}}f.defaultYaml={explicit:!1,version:"1.2"};f.defaultTags={"!!":"tag:yaml.org,2002:"};QH.Directives=f});var s0=O((PH)=>{var T1=M(),BH=P0();function TH($){if(/[\x00-\x19\s,[\]{}]/.test($)){let U=`Anchor must not contain whitespace or control characters: ${JSON.stringify($)}`;throw Error(U)}return!0}function O1($){let q=new Set;return BH.visit($,{Value(U,H){if(H.anchor)q.add(H.anchor)}}),q}function P1($,q){for(let U=1;;++U){let H=`${$}${U}`;if(!q.has(H))return H}}function OH($,q){let U=[],H=new Map,z=null;return{onAnchor:(X)=>{U.push(X),z??(z=O1($));let L=P1(q,z);return z.add(L),L},setAnchors:()=>{for(let X of U){let L=H.get(X);if(typeof L==="object"&&L.anchor&&(T1.isScalar(L.node)||T1.isCollection(L.node)))L.node.anchor=L.anchor;else{let Z=Error("Failed to resolve repeated object (this should not happen)");throw Z.source=X,Z}}},sourceObjects:H}}PH.anchorIsValid=TH;PH.anchorNames=O1;PH.createNodeAnchors=OH;PH.findNewAnchor=P1});var h$=O((WH)=>{function Y0($,q,U,H){if(H&&typeof H==="object")if(Array.isArray(H))for(let z=0,X=H.length;z<X;++z){let L=H[z],Z=Y0($,H,String(z),L);if(Z===void 0)delete H[z];else if(Z!==L)H[z]=Z}else if(H instanceof Map)for(let z of Array.from(H.keys())){let X=H.get(z),L=Y0($,H,z,X);if(L===void 0)H.delete(z);else if(L!==X)H.set(z,L)}else if(H instanceof Set)for(let z of Array.from(H)){let X=Y0($,H,z,z);if(X===void 0)H.delete(z);else if(X!==z)H.delete(z),H.add(X)}else for(let[z,X]of Object.entries(H)){let L=Y0($,H,z,X);if(L===void 0)delete H[z];else if(L!==X)H[z]=L}return $.call(q,U,H)}WH.applyReviver=Y0});var m=O((MH)=>{var AH=M();function Y1($,q,U){if(Array.isArray($))return $.map((H,z)=>Y1(H,String(z),U));if($&&typeof $.toJSON==="function"){if(!U||!AH.hasAnchor($))return $.toJSON(q,U);let H={aliasCount:0,count:1,res:void 0};U.anchors.set($,H),U.onCreate=(X)=>{H.res=X,delete U.onCreate};let z=$.toJSON(q,U);if(U.onCreate)U.onCreate(z);return z}if(typeof $==="bigint"&&!U?.keep)return Number($);return $}MH.toJS=Y1});var i0=O((SH)=>{var bH=h$(),w1=M(),NH=m();class V1{constructor($){Object.defineProperty(this,w1.NODE_TYPE,{value:$})}clone(){let $=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));if(this.range)$.range=this.range.slice();return $}toJS($,{mapAsMap:q,maxAliasCount:U,onAnchor:H,reviver:z}={}){if(!w1.isDocument($))throw TypeError("A document argument is required");let X={anchors:new Map,doc:$,keep:!0,mapAsMap:q===!0,mapKeyWarned:!1,maxAliasCount:typeof U==="number"?U:100},L=NH.toJS(this,"",X);if(typeof H==="function")for(let{count:Z,res:R}of X.anchors.values())H(R,Z);return typeof z==="function"?bH.applyReviver(z,{"":L},"",L):L}}SH.NodeBase=V1});var w0=O((uH)=>{var jH=s0(),fH=P0(),R0=M(),EH=i0(),gH=m();class _1 extends EH.NodeBase{constructor($){super(R0.ALIAS);this.source=$,Object.defineProperty(this,"tag",{set(){throw Error("Alias nodes cannot have tags")}})}resolve($,q){if(q?.maxAliasCount===0)throw ReferenceError("Alias resolution is disabled");let U;if(q?.aliasResolveCache)U=q.aliasResolveCache;else if(U=[],fH.visit($,{Node:(z,X)=>{if(R0.isAlias(X)||R0.hasAnchor(X))U.push(X)}}),q)q.aliasResolveCache=U;let H=void 0;for(let z of U){if(z===this)break;if(z.anchor===this.source)H=z}return H}toJSON($,q){if(!q)return{source:this.source};let{anchors:U,doc:H,maxAliasCount:z}=q,X=this.resolve(H,q);if(!X){let Z=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw ReferenceError(Z)}let L=U.get(X);if(!L)gH.toJS(X,null,q),L=U.get(X);if(L?.res===void 0)throw ReferenceError("This should not happen: Alias anchor was not resolved?");if(z>=0){if(L.count+=1,L.aliasCount===0)L.aliasCount=c0(H,X,U);if(L.count*L.aliasCount>z)throw ReferenceError("Excessive alias count indicates a resource exhaustion attack")}return L.res}toString($,q,U){let H=`*${this.source}`;if($){if(jH.anchorIsValid(this.source),$.options.verifyAliasOrder&&!$.anchors.has(this.source)){let z=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw Error(z)}if($.implicitKey)return`${H} `}return H}}function c0($,q,U){if(R0.isAlias(q)){let H=q.resolve($),z=U&&H&&U.get(H);return z?z.count*z.aliasCount:0}else if(R0.isCollection(q)){let H=0;for(let z of q.items){let X=c0($,z,U);if(X>H)H=X}return H}else if(R0.isPair(q)){let H=c0($,q.key,U),z=c0($,q.value,U);return Math.max(H,z)}return 1}uH.Alias=_1});var b=O((mH)=>{var hH=M(),xH=i0(),kH=m(),vH=($)=>!$||typeof $!=="function"&&typeof $!=="object";class n extends xH.NodeBase{constructor($){super(hH.SCALAR);this.value=$}toJSON($,q){return q?.keep?this.value:kH.toJS(this.value,$,q)}toString(){return String(this.value)}}n.BLOCK_FOLDED="BLOCK_FOLDED";n.BLOCK_LITERAL="BLOCK_LITERAL";n.PLAIN="PLAIN";n.QUOTE_DOUBLE="QUOTE_DOUBLE";n.QUOTE_SINGLE="QUOTE_SINGLE";mH.Scalar=n;mH.isScalarValue=vH});var V0=O((cH)=>{var lH=w0(),o=M(),W1=b(),aH="tag:yaml.org,2002:";function sH($,q,U){if(q){let H=U.filter((X)=>X.tag===q),z=H.find((X)=>!X.format)??H[0];if(!z)throw Error(`Tag ${q} not found`);return z}return U.find((H)=>H.identify?.($)&&!H.format)}function iH($,q,U){if(o.isDocument($))$=$.contents;if(o.isNode($))return $;if(o.isPair($)){let J=U.schema[o.MAP].createNode?.(U.schema,null,U);return J.items.push($),J}if($ instanceof String||$ instanceof Number||$ instanceof Boolean||typeof BigInt<"u"&&$ instanceof BigInt)$=$.valueOf();let{aliasDuplicateObjects:H,onAnchor:z,onTagObj:X,schema:L,sourceObjects:Z}=U,R=void 0;if(H&&$&&typeof $==="object")if(R=Z.get($),R)return R.anchor??(R.anchor=z($)),new lH.Alias(R.anchor);else R={anchor:null,node:null},Z.set($,R);if(q?.startsWith("!!"))q=aH+q.slice(2);let G=sH($,q,L.tags);if(!G){if($&&typeof $.toJSON==="function")$=$.toJSON();if(!$||typeof $!=="object"){let J=new W1.Scalar($);if(R)R.node=J;return J}G=$ instanceof Map?L[o.MAP]:(Symbol.iterator in Object($))?L[o.SEQ]:L[o.MAP]}if(X)X(G),delete U.onTagObj;let I=G?.createNode?G.createNode(U.schema,$,U):typeof G?.nodeClass?.from==="function"?G.nodeClass.from(U.schema,$,U):new W1.Scalar($);if(q)I.tag=q;else if(!G.default)I.tag=G.tag;if(R)R.node=I;return I}cH.createNode=iH});var r0=O((tH)=>{var nH=V0(),h=M(),oH=i0();function x$($,q,U){let H=U;for(let z=q.length-1;z>=0;--z){let X=q[z];if(typeof X==="number"&&Number.isInteger(X)&&X>=0){let L=[];L[X]=H,H=L}else H=new Map([[X,H]])}return nH.createNode(H,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw Error("This should not happen, please report a bug.")},schema:$,sourceObjects:new Map})}var F1=($)=>$==null||typeof $==="object"&&!!$[Symbol.iterator]().next().done;class A1 extends oH.NodeBase{constructor($,q){super($);Object.defineProperty(this,"schema",{value:q,configurable:!0,enumerable:!1,writable:!0})}clone($){let q=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));if($)q.schema=$;if(q.items=q.items.map((U)=>h.isNode(U)||h.isPair(U)?U.clone($):U),this.range)q.range=this.range.slice();return q}addIn($,q){if(F1($))this.add(q);else{let[U,...H]=$,z=this.get(U,!0);if(h.isCollection(z))z.addIn(H,q);else if(z===void 0&&this.schema)this.set(U,x$(this.schema,H,q));else throw Error(`Expected YAML collection at ${U}. Remaining path: ${H}`)}}deleteIn($){let[q,...U]=$;if(U.length===0)return this.delete(q);let H=this.get(q,!0);if(h.isCollection(H))return H.deleteIn(U);else throw Error(`Expected YAML collection at ${q}. Remaining path: ${U}`)}getIn($,q){let[U,...H]=$,z=this.get(U,!0);if(H.length===0)return!q&&h.isScalar(z)?z.value:z;else return h.isCollection(z)?z.getIn(H,q):void 0}hasAllNullValues($){return this.items.every((q)=>{if(!h.isPair(q))return!1;let U=q.value;return U==null||$&&h.isScalar(U)&&U.value==null&&!U.commentBefore&&!U.comment&&!U.tag})}hasIn($){let[q,...U]=$;if(U.length===0)return this.has(q);let H=this.get(q,!0);return h.isCollection(H)?H.hasIn(U):!1}setIn($,q){let[U,...H]=$;if(H.length===0)this.set(U,q);else{let z=this.get(U,!0);if(h.isCollection(z))z.setIn(H,q);else if(z===void 0&&this.schema)this.set(U,x$(this.schema,H,q));else throw Error(`Expected YAML collection at ${U}. Remaining path: ${H}`)}}}tH.Collection=A1;tH.collectionFromPath=x$;tH.isEmptyPath=F1});var _0=O((z9)=>{var U9=($)=>$.replace(/^(?!$)(?: $)?/gm,"#");function k$($,q){if(/^\n+$/.test($))return $.substring(1);return q?$.replace(/^(?! *$)/gm,q):$}var H9=($,q,U)=>$.endsWith(`
4
- `)?k$(U,q):U.includes(`
2
+ var y=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Ue=import.meta.require;var A=y(function(So){var Kt=Symbol.for("yaml.alias"),An=Symbol.for("yaml.document"),ze=Symbol.for("yaml.map"),On=Symbol.for("yaml.pair"),Ft=Symbol.for("yaml.scalar"),We=Symbol.for("yaml.seq"),j=Symbol.for("yaml.node.type"),po=(e)=>!!e&&typeof e==="object"&&e[j]===Kt,ho=(e)=>!!e&&typeof e==="object"&&e[j]===An,mo=(e)=>!!e&&typeof e==="object"&&e[j]===ze,go=(e)=>!!e&&typeof e==="object"&&e[j]===On,Ln=(e)=>!!e&&typeof e==="object"&&e[j]===Ft,yo=(e)=>!!e&&typeof e==="object"&&e[j]===We;function Pn(e){if(e&&typeof e==="object")switch(e[j]){case ze:case We:return!0}return!1}function bo(e){if(e&&typeof e==="object")switch(e[j]){case Kt:case ze:case Ft:case We:return!0}return!1}var wo=(e)=>(Ln(e)||Pn(e))&&!!e.anchor;So.ALIAS=Kt;So.DOC=An;So.MAP=ze;So.NODE_TYPE=j;So.PAIR=On;So.SCALAR=Ft;So.SEQ=We;So.hasAnchor=wo;So.isAlias=po;So.isCollection=Pn;So.isDocument=ho;So.isMap=mo;So.isNode=bo;So.isPair=go;So.isScalar=Ln;So.isSeq=yo});var Se=y(function(Do){var q=A(),T=Symbol("break visit"),En=Symbol("skip children"),R=Symbol("remove node");function Ge(e,t){let s=qn(t);if(q.isDocument(e)){if(ae(null,e.contents,s,Object.freeze([e]))===R)e.contents=null}else ae(null,e,s,Object.freeze([]))}Ge.BREAK=T;Ge.SKIP=En;Ge.REMOVE=R;function ae(e,t,s,n){let i=In(e,t,s,n);if(q.isNode(i)||q.isPair(i))return Tn(e,n,i),ae(e,i,s,n);if(typeof i!=="symbol"){if(q.isCollection(t)){n=Object.freeze(n.concat(t));for(let r=0;r<t.items.length;++r){let o=ae(r,t.items[r],s,n);if(typeof o==="number")r=o-1;else if(o===T)return T;else if(o===R)t.items.splice(r,1),r-=1}}else if(q.isPair(t)){n=Object.freeze(n.concat(t));let r=ae("key",t.key,s,n);if(r===T)return T;else if(r===R)t.key=null;let o=ae("value",t.value,s,n);if(o===T)return T;else if(o===R)t.value=null}}return i}async function Qe(e,t){let s=qn(t);if(q.isDocument(e)){if(await le(null,e.contents,s,Object.freeze([e]))===R)e.contents=null}else await le(null,e,s,Object.freeze([]))}Qe.BREAK=T;Qe.SKIP=En;Qe.REMOVE=R;async function le(e,t,s,n){let i=await In(e,t,s,n);if(q.isNode(i)||q.isPair(i))return Tn(e,n,i),le(e,i,s,n);if(typeof i!=="symbol"){if(q.isCollection(t)){n=Object.freeze(n.concat(t));for(let r=0;r<t.items.length;++r){let o=await le(r,t.items[r],s,n);if(typeof o==="number")r=o-1;else if(o===T)return T;else if(o===R)t.items.splice(r,1),r-=1}}else if(q.isPair(t)){n=Object.freeze(n.concat(t));let r=await le("key",t.key,s,n);if(r===T)return T;else if(r===R)t.key=null;let o=await le("value",t.value,s,n);if(o===T)return T;else if(o===R)t.value=null}}return i}function qn(e){if(typeof e==="object"&&(e.Collection||e.Node||e.Value))return 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);return e}function In(e,t,s,n){if(typeof s==="function")return s(e,t,n);if(q.isMap(t))return s.Map?.(e,t,n);if(q.isSeq(t))return s.Seq?.(e,t,n);if(q.isPair(t))return s.Pair?.(e,t,n);if(q.isScalar(t))return s.Scalar?.(e,t,n);if(q.isAlias(t))return s.Alias?.(e,t,n);return}function Tn(e,t,s){let n=t[t.length-1];if(q.isCollection(n))n.items[e]=s;else if(q.isPair(n))if(e==="key")n.key=s;else n.value=s;else if(q.isDocument(n))n.contents=s;else{let i=q.isAlias(n)?"alias":"scalar";throw Error(`Cannot replace node with ${i} parent`)}}Do.visit=Ge;Do.visitAsync=Qe});var Ut=y(function(Uo){var $n=A(),jo=Se(),Ko={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},Fo=(e)=>e.replace(/[!,[\]{}]/g,(t)=>Ko[t]);class M{constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},M.defaultYaml,e),this.tags=Object.assign({},M.defaultTags,t)}clone(){let e=new M(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){let e=new M(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:M.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},M.defaultTags);break}return e}add(e,t){if(this.atNextDocument)this.yaml={explicit:M.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},M.defaultTags),this.atNextDocument=!1;let s=e.trim().split(/[ \t]+/),n=s.shift();switch(n){case"%TAG":{if(s.length!==2){if(t(0,"%TAG directive should contain exactly two parts"),s.length<2)return!1}let[i,r]=s;return this.tags[i]=r,!0}case"%YAML":{if(this.yaml.explicit=!0,s.length!==1)return t(0,"%YAML directive should contain exactly one part"),!1;let[i]=s;if(i==="1.1"||i==="1.2")return this.yaml.version=i,!0;else{let r=/^\d+\.\d+$/.test(i);return t(6,`Unsupported YAML version ${i}`,r),!1}}default:return t(0,`Unknown directive ${n}`,!0),!1}}tagName(e,t){if(e==="!")return"!";if(e[0]!=="!")return t(`Not a valid tag: ${e}`),null;if(e[1]==="<"){let r=e.slice(2,-1);if(r==="!"||r==="!!")return t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null;if(e[e.length-1]!==">")t("Verbatim tags must end with a >");return r}let[,s,n]=e.match(/^(.*!)([^!]*)$/s);if(!n)t(`The ${e} tag has no suffix`);let i=this.tags[s];if(i)try{return i+decodeURIComponent(n)}catch(r){return t(String(r)),null}if(s==="!")return e;return t(`Could not resolve tag: ${e}`),null}tagString(e){for(let[t,s]of Object.entries(this.tags))if(e.startsWith(s))return t+Fo(e.substring(s.length));return e[0]==="!"?e:`!<${e}>`}toString(e){let t=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],s=Object.entries(this.tags),n;if(e&&s.length>0&&$n.isNode(e.contents)){let i={};jo.visit(e.contents,(r,o)=>{if($n.isNode(o)&&o.tag)i[o.tag]=!0}),n=Object.keys(i)}else n=[];for(let[i,r]of s){if(i==="!!"&&r==="tag:yaml.org,2002:")continue;if(!e||n.some((o)=>o.startsWith(r)))t.push(`%TAG ${i} ${r}`)}return t.join(`
3
+ `)}}M.defaultYaml={explicit:!1,version:"1.2"};M.defaultTags={"!!":"tag:yaml.org,2002:"};Uo.Directives=M});var Xe=y(function(zo){var Mn=A(),Vo=Se();function Ho(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){let s=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw Error(s)}return!0}function xn(e){let t=new Set;return Vo.visit(e,{Value(s,n){if(n.anchor)t.add(n.anchor)}}),t}function _n(e,t){for(let s=1;;++s){let n=`${e}${s}`;if(!t.has(n))return n}}function Jo(e,t){let s=[],n=new Map,i=null;return{onAnchor:(r)=>{s.push(r),i??(i=xn(e));let o=_n(t,i);return i.add(o),o},setAnchors:()=>{for(let r of s){let o=n.get(r);if(typeof o==="object"&&o.anchor&&(Mn.isScalar(o.node)||Mn.isCollection(o.node)))o.node.anchor=o.anchor;else{let a=Error("Failed to resolve repeated object (this should not happen)");throw a.source=r,a}}},sourceObjects:n}}zo.anchorIsValid=Ho;zo.anchorNames=xn;zo.createNodeAnchors=Jo;zo.findNewAnchor=_n});var Yt=y(function(Zo){function ve(e,t,s,n){if(n&&typeof n==="object")if(Array.isArray(n))for(let i=0,r=n.length;i<r;++i){let o=n[i],a=ve(e,n,String(i),o);if(a===void 0)delete n[i];else if(a!==o)n[i]=a}else if(n instanceof Map)for(let i of Array.from(n.keys())){let r=n.get(i),o=ve(e,n,i,r);if(o===void 0)n.delete(i);else if(o!==r)n.set(i,o)}else if(n instanceof Set)for(let i of Array.from(n)){let r=ve(e,n,i,i);if(r===void 0)n.delete(i);else if(r!==i)n.delete(i),n.add(r)}else for(let[i,r]of Object.entries(n)){let o=ve(e,n,i,r);if(o===void 0)delete n[i];else if(o!==r)n[i]=o}return e.call(t,s,n)}Zo.applyReviver=ve});var U=y(function(sa){var ta=A();function Dn(e,t,s){if(Array.isArray(e))return e.map((n,i)=>Dn(n,String(i),s));if(e&&typeof e.toJSON==="function"){if(!s||!ta.hasAnchor(e))return e.toJSON(t,s);let n={aliasCount:0,count:1,res:void 0};s.anchors.set(e,n),s.onCreate=(r)=>{n.res=r,delete s.onCreate};let i=e.toJSON(t,s);if(s.onCreate)s.onCreate(i);return i}if(typeof e==="bigint"&&!s?.keep)return Number(e);return e}sa.toJS=Dn});var Ze=y(function(oa){var ia=Yt(),Rn=A(),ra=U();class Bn{constructor(e){Object.defineProperty(this,Rn.NODE_TYPE,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));if(this.range)e.range=this.range.slice();return e}toJS(e,{mapAsMap:t,maxAliasCount:s,onAnchor:n,reviver:i}={}){if(!Rn.isDocument(e))throw TypeError("A document argument is required");let r={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof s==="number"?s:100},o=ra.toJS(this,"",r);if(typeof n==="function")for(let{count:a,res:l}of r.anchors.values())n(l,a);return typeof i==="function"?ia.applyReviver(i,{"":o},"",o):o}}oa.NodeBase=Bn});var ke=y(function(da){var la=Xe(),ca=Se(),ce=A(),ua=Ze(),fa=U();class jn extends ua.NodeBase{constructor(e){super(ce.ALIAS);this.source=e,Object.defineProperty(this,"tag",{set(){throw Error("Alias nodes cannot have tags")}})}resolve(e,t){if(t?.maxAliasCount===0)throw ReferenceError("Alias resolution is disabled");let s;if(t?.aliasResolveCache)s=t.aliasResolveCache;else if(s=[],ca.visit(e,{Node:(i,r)=>{if(ce.isAlias(r)||ce.hasAnchor(r))s.push(r)}}),t)t.aliasResolveCache=s;let n=void 0;for(let i of s){if(i===this)break;if(i.anchor===this.source)n=i}return n}toJSON(e,t){if(!t)return{source:this.source};let{anchors:s,doc:n,maxAliasCount:i}=t,r=this.resolve(n,t);if(!r){let a=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw ReferenceError(a)}let o=s.get(r);if(!o)fa.toJS(r,null,t),o=s.get(r);if(o?.res===void 0)throw ReferenceError("This should not happen: Alias anchor was not resolved?");if(i>=0){if(o.count+=1,o.aliasCount===0)o.aliasCount=et(n,r,s);if(o.count*o.aliasCount>i)throw ReferenceError("Excessive alias count indicates a resource exhaustion attack")}return o.res}toString(e,t,s){let n=`*${this.source}`;if(e){if(la.anchorIsValid(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let i=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw Error(i)}if(e.implicitKey)return`${n} `}return n}}function et(e,t,s){if(ce.isAlias(t)){let n=t.resolve(e),i=s&&n&&s.get(n);return i?i.count*i.aliasCount:0}else if(ce.isCollection(t)){let n=0;for(let i of t.items){let r=et(e,i,s);if(r>n)n=r}return n}else if(ce.isPair(t)){let n=et(e,t.key,s),i=et(e,t.value,s);return Math.max(n,i)}return 1}da.Alias=jn});var L=y(function(ba){var ha=A(),ma=Ze(),ga=U(),ya=(e)=>!e||typeof e!=="function"&&typeof e!=="object";class X extends ma.NodeBase{constructor(e){super(ha.SCALAR);this.value=e}toJSON(e,t){return t?.keep?this.value:ga.toJS(this.value,e,t)}toString(){return String(this.value)}}X.BLOCK_FOLDED="BLOCK_FOLDED";X.BLOCK_LITERAL="BLOCK_LITERAL";X.PLAIN="PLAIN";X.QUOTE_DOUBLE="QUOTE_DOUBLE";X.QUOTE_SINGLE="QUOTE_SINGLE";ba.Scalar=X;ba.isScalarValue=ya});var Ce=y(function(Aa){var va=ke(),Z=A(),Kn=L(),ka="tag:yaml.org,2002:";function Ca(e,t,s){if(t){let n=s.filter((r)=>r.tag===t),i=n.find((r)=>!r.format)??n[0];if(!i)throw Error(`Tag ${t} not found`);return i}return s.find((n)=>n.identify?.(e)&&!n.format)}function Na(e,t,s){if(Z.isDocument(e))e=e.contents;if(Z.isNode(e))return e;if(Z.isPair(e)){let u=s.schema[Z.MAP].createNode?.(s.schema,null,s);return u.items.push(e),u}if(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<"u"&&e instanceof BigInt)e=e.valueOf();let{aliasDuplicateObjects:n,onAnchor:i,onTagObj:r,schema:o,sourceObjects:a}=s,l=void 0;if(n&&e&&typeof e==="object")if(l=a.get(e),l)return l.anchor??(l.anchor=i(e)),new va.Alias(l.anchor);else l={anchor:null,node:null},a.set(e,l);if(t?.startsWith("!!"))t=ka+t.slice(2);let c=Ca(e,t,o.tags);if(!c){if(e&&typeof e.toJSON==="function")e=e.toJSON();if(!e||typeof e!=="object"){let u=new Kn.Scalar(e);if(l)l.node=u;return u}c=e instanceof Map?o[Z.MAP]:(Symbol.iterator in Object(e))?o[Z.SEQ]:o[Z.MAP]}if(r)r(c),delete s.onTagObj;let d=c?.createNode?c.createNode(s.schema,e,s):typeof c?.nodeClass?.from==="function"?c.nodeClass.from(s.schema,e,s):new Kn.Scalar(e);if(t)d.tag=t;else if(!c.default)d.tag=c.tag;if(l)l.node=d;return d}Aa.createNode=Na});var tt=y(function(Ea){var La=Ce(),B=A(),Pa=Ze();function Vt(e,t,s){let n=s;for(let i=t.length-1;i>=0;--i){let r=t[i];if(typeof r==="number"&&Number.isInteger(r)&&r>=0){let o=[];o[r]=n,n=o}else n=new Map([[r,n]])}return La.createNode(n,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}var Fn=(e)=>e==null||typeof e==="object"&&!!e[Symbol.iterator]().next().done;class Un extends Pa.NodeBase{constructor(e,t){super(e);Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){let t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));if(e)t.schema=e;if(t.items=t.items.map((s)=>B.isNode(s)||B.isPair(s)?s.clone(e):s),this.range)t.range=this.range.slice();return t}addIn(e,t){if(Fn(e))this.add(t);else{let[s,...n]=e,i=this.get(s,!0);if(B.isCollection(i))i.addIn(n,t);else if(i===void 0&&this.schema)this.set(s,Vt(this.schema,n,t));else throw Error(`Expected YAML collection at ${s}. Remaining path: ${n}`)}}deleteIn(e){let[t,...s]=e;if(s.length===0)return this.delete(t);let n=this.get(t,!0);if(B.isCollection(n))return n.deleteIn(s);else throw Error(`Expected YAML collection at ${t}. Remaining path: ${s}`)}getIn(e,t){let[s,...n]=e,i=this.get(s,!0);if(n.length===0)return!t&&B.isScalar(i)?i.value:i;else return B.isCollection(i)?i.getIn(n,t):void 0}hasAllNullValues(e){return this.items.every((t)=>{if(!B.isPair(t))return!1;let s=t.value;return s==null||e&&B.isScalar(s)&&s.value==null&&!s.commentBefore&&!s.comment&&!s.tag})}hasIn(e){let[t,...s]=e;if(s.length===0)return this.has(t);let n=this.get(t,!0);return B.isCollection(n)?n.hasIn(s):!1}setIn(e,t){let[s,...n]=e;if(n.length===0)this.set(s,t);else{let i=this.get(s,!0);if(B.isCollection(i))i.setIn(n,t);else if(i===void 0&&this.schema)this.set(s,Vt(this.schema,n,t));else throw Error(`Expected YAML collection at ${s}. Remaining path: ${n}`)}}}Ea.Collection=Un;Ea.collectionFromPath=Vt;Ea.isEmptyPath=Fn});var Ne=y(function(xa){var $a=(e)=>e.replace(/^(?!$)(?: $)?/gm,"#");function Ht(e,t){if(/^\n+$/.test(e))return e.substring(1);return t?e.replace(/^(?! *$)/gm,t):e}var Ma=(e,t,s)=>e.endsWith(`
4
+ `)?Ht(s,t):s.includes(`
5
5
  `)?`
6
- `+k$(U,q):($.endsWith(" ")?"":" ")+U;z9.indentComment=k$;z9.lineComment=H9;z9.stringifyComment=U9});var K1=O((G9)=>{function R9($,q,U="flow",{indentAtStart:H,lineWidth:z=80,minContentWidth:X=20,onFold:L,onOverflow:Z}={}){if(!z||z<0)return $;if(z<X)X=0;let R=Math.max(1+X,1+z-q.length);if($.length<=R)return $;let G=[],I={},J=z-q.length;if(typeof H==="number")if(H>z-Math.max(2,X))G.push(0);else J=z-H;let Q=void 0,T=void 0,P=!1,D=-1,B=-1,w=-1;if(U==="block"){if(D=M1($,D,q.length),D!==-1)J=D+R}for(let _;_=$[D+=1];){if(U==="quoted"&&_==="\\"){switch(B=D,$[D+1]){case"x":D+=3;break;case"u":D+=5;break;case"U":D+=9;break;default:D+=1}w=D}if(_===`
7
- `){if(U==="block")D=M1($,D,q.length);J=D+q.length+R,Q=void 0}else{if(_===" "&&T&&T!==" "&&T!==`
8
- `&&T!=="\t"){let W=$[D+1];if(W&&W!==" "&&W!==`
9
- `&&W!=="\t")Q=D}if(D>=J)if(Q)G.push(Q),J=Q+R,Q=void 0;else if(U==="quoted"){while(T===" "||T==="\t")T=_,_=$[D+=1],P=!0;let W=D>w+1?D-2:B-1;if(I[W])return $;G.push(W),I[W]=!0,J=W+R,Q=void 0}else P=!0}T=_}if(P&&Z)Z();if(G.length===0)return $;if(L)L();let V=$.slice(0,G[0]);for(let _=0;_<G.length;++_){let W=G[_],F=G[_+1]||$.length;if(W===0)V=`
10
- ${q}${$.slice(0,F)}`;else{if(U==="quoted"&&I[W])V+=`${$[W]}\\`;V+=`
11
- ${q}${$.slice(W+1,F)}`}}return V}function M1($,q,U){let H=q,z=q+1,X=$[z];while(X===" "||X==="\t")if(q<z+U)X=$[++q];else{do X=$[++q];while(X&&X!==`
12
- `);H=q,z=q+1,X=$[z]}return H}G9.FOLD_BLOCK="block";G9.FOLD_FLOW="flow";G9.FOLD_QUOTED="quoted";G9.foldFlowLines=R9});var F0=O((P9)=>{var g=b(),p=K1(),o0=($,q)=>({indentAtStart:q?$.indent.length:$.indentAtStart,lineWidth:$.options.lineWidth,minContentWidth:$.options.minContentWidth}),t0=($)=>/^(%|---|\.\.\.)/m.test($);function B9($,q,U){if(!q||q<0)return!1;let H=q-U,z=$.length;if(z<=H)return!1;for(let X=0,L=0;X<z;++X)if($[X]===`
13
- `){if(X-L>H)return!0;if(L=X+1,z-L<=H)return!1}return!0}function W0($,q){let U=JSON.stringify($);if(q.options.doubleQuotedAsJSON)return U;let{implicitKey:H}=q,z=q.options.doubleQuotedMinMultiLineLength,X=q.indent||(t0($)?" ":""),L="",Z=0;for(let R=0,G=U[R];G;G=U[++R]){if(G===" "&&U[R+1]==="\\"&&U[R+2]==="n")L+=U.slice(Z,R)+"\\ ",R+=1,Z=R,G="\\";if(G==="\\")switch(U[R+1]){case"u":{L+=U.slice(Z,R);let I=U.substr(R+2,4);switch(I){case"0000":L+="\\0";break;case"0007":L+="\\a";break;case"000b":L+="\\v";break;case"001b":L+="\\e";break;case"0085":L+="\\N";break;case"00a0":L+="\\_";break;case"2028":L+="\\L";break;case"2029":L+="\\P";break;default:if(I.substr(0,2)==="00")L+="\\x"+I.substr(2);else L+=U.substr(R,6)}R+=5,Z=R+1}break;case"n":if(H||U[R+2]==='"'||U.length<z)R+=1;else{L+=U.slice(Z,R)+`
6
+ `+Ht(s,t):(e.endsWith(" ")?"":" ")+s;xa.indentComment=Ht;xa.lineComment=Ma;xa.stringifyComment=$a});var Vn=y(function(ja){function Ba(e,t,s="flow",{indentAtStart:n,lineWidth:i=80,minContentWidth:r=20,onFold:o,onOverflow:a}={}){if(!i||i<0)return e;if(i<r)r=0;let l=Math.max(1+r,1+i-t.length);if(e.length<=l)return e;let c=[],d={},u=i-t.length;if(typeof n==="number")if(n>i-Math.max(2,r))c.push(0);else u=i-n;let f=void 0,m=void 0,g=!1,p=-1,h=-1,w=-1;if(s==="block"){if(p=Yn(e,p,t.length),p!==-1)u=p+l}for(let v;v=e[p+=1];){if(s==="quoted"&&v==="\\"){switch(h=p,e[p+1]){case"x":p+=3;break;case"u":p+=5;break;case"U":p+=9;break;default:p+=1}w=p}if(v===`
7
+ `){if(s==="block")p=Yn(e,p,t.length);u=p+t.length+l,f=void 0}else{if(v===" "&&m&&m!==" "&&m!==`
8
+ `&&m!=="\t"){let k=e[p+1];if(k&&k!==" "&&k!==`
9
+ `&&k!=="\t")f=p}if(p>=u)if(f)c.push(f),u=f+l,f=void 0;else if(s==="quoted"){while(m===" "||m==="\t")m=v,v=e[p+=1],g=!0;let k=p>w+1?p-2:h-1;if(d[k])return e;c.push(k),d[k]=!0,u=k+l,f=void 0}else g=!0}m=v}if(g&&a)a();if(c.length===0)return e;if(o)o();let S=e.slice(0,c[0]);for(let v=0;v<c.length;++v){let k=c[v],C=c[v+1]||e.length;if(k===0)S=`
10
+ ${t}${e.slice(0,C)}`;else{if(s==="quoted"&&d[k])S+=`${e[k]}\\`;S+=`
11
+ ${t}${e.slice(k+1,C)}`}}return S}function Yn(e,t,s){let n=t,i=t+1,r=e[i];while(r===" "||r==="\t")if(t<i+s)r=e[++t];else{do r=e[++t];while(r&&r!==`
12
+ `);n=t,i=t+1,r=e[i]}return n}ja.FOLD_BLOCK="block";ja.FOLD_FLOW="flow";ja.FOLD_QUOTED="quoted";ja.foldFlowLines=Ba});var Oe=y(function(za){var _=L(),Y=Vn(),nt=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),it=(e)=>/^(%|---|\.\.\.)/m.test(e);function Va(e,t,s){if(!t||t<0)return!1;let n=t-s,i=e.length;if(i<=n)return!1;for(let r=0,o=0;r<i;++r)if(e[r]===`
13
+ `){if(r-o>n)return!0;if(o=r+1,i-o<=n)return!1}return!0}function Ae(e,t){let s=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return s;let{implicitKey:n}=t,i=t.options.doubleQuotedMinMultiLineLength,r=t.indent||(it(e)?" ":""),o="",a=0;for(let l=0,c=s[l];c;c=s[++l]){if(c===" "&&s[l+1]==="\\"&&s[l+2]==="n")o+=s.slice(a,l)+"\\ ",l+=1,a=l,c="\\";if(c==="\\")switch(s[l+1]){case"u":{o+=s.slice(a,l);let d=s.substr(l+2,4);switch(d){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:if(d.substr(0,2)==="00")o+="\\x"+d.substr(2);else o+=s.substr(l,6)}l+=5,a=l+1}break;case"n":if(n||s[l+2]==='"'||s.length<i)l+=1;else{o+=s.slice(a,l)+`
14
14
 
15
- `;while(U[R+2]==="\\"&&U[R+3]==="n"&&U[R+4]!=='"')L+=`
16
- `,R+=2;if(L+=X,U[R+2]===" ")L+="\\";R+=1,Z=R+1}break;default:R+=1}}return L=Z?L+U.slice(Z):U,H?L:p.foldFlowLines(L,X,p.FOLD_QUOTED,o0(q,!1))}function v$($,q){if(q.options.singleQuote===!1||q.implicitKey&&$.includes(`
17
- `)||/[ \t]\n|\n[ \t]/.test($))return W0($,q);let U=q.indent||(t0($)?" ":""),H="'"+$.replace(/'/g,"''").replace(/\n+/g,`$&
18
- ${U}`)+"'";return q.implicitKey?H:p.foldFlowLines(H,U,p.FOLD_FLOW,o0(q,!1))}function G0($,q){let{singleQuote:U}=q.options,H;if(U===!1)H=W0;else{let z=$.includes('"'),X=$.includes("'");if(z&&!X)H=v$;else if(X&&!z)H=W0;else H=U?v$:W0}return H($,q)}var m$;try{m$=new RegExp(`(^|(?<!
15
+ `;while(s[l+2]==="\\"&&s[l+3]==="n"&&s[l+4]!=='"')o+=`
16
+ `,l+=2;if(o+=r,s[l+2]===" ")o+="\\";l+=1,a=l+1}break;default:l+=1}}return o=a?o+s.slice(a):s,n?o:Y.foldFlowLines(o,r,Y.FOLD_QUOTED,nt(t,!1))}function Jt(e,t){if(t.options.singleQuote===!1||t.implicitKey&&e.includes(`
17
+ `)||/[ \t]\n|\n[ \t]/.test(e))return Ae(e,t);let s=t.indent||(it(e)?" ":""),n="'"+e.replace(/'/g,"''").replace(/\n+/g,`$&
18
+ ${s}`)+"'";return t.implicitKey?n:Y.foldFlowLines(n,s,Y.FOLD_FLOW,nt(t,!1))}function ue(e,t){let{singleQuote:s}=t.options,n;if(s===!1)n=Ae;else{let i=e.includes('"'),r=e.includes("'");if(i&&!r)n=Jt;else if(r&&!i)n=Ae;else n=s?Jt:Ae}return n(e,t)}var zt;try{zt=new RegExp(`(^|(?<!
19
19
  ))
20
20
  +(?!
21
- |$)`,"g")}catch{m$=/\n+(?!\n|$)/g}function n0({comment:$,type:q,value:U},H,z,X){let{blockQuote:L,commentString:Z,lineWidth:R}=H.options;if(!L||/\n[\t ]+$/.test(U))return G0(U,H);let G=H.indent||(H.forceBlockIndent||t0(U)?" ":""),I=L==="literal"?!0:L==="folded"||q===g.Scalar.BLOCK_FOLDED?!1:q===g.Scalar.BLOCK_LITERAL?!0:!B9(U,R,G.length);if(!U)return I?`|
21
+ |$)`,"g")}catch{zt=/\n+(?!\n|$)/g}function st({comment:e,type:t,value:s},n,i,r){let{blockQuote:o,commentString:a,lineWidth:l}=n.options;if(!o||/\n[\t ]+$/.test(s))return ue(s,n);let c=n.indent||(n.forceBlockIndent||it(s)?" ":""),d=o==="literal"?!0:o==="folded"||t===_.Scalar.BLOCK_FOLDED?!1:t===_.Scalar.BLOCK_LITERAL?!0:!Va(s,l,c.length);if(!s)return d?`|
22
22
  `:`>
23
- `;let J,Q;for(Q=U.length;Q>0;--Q){let F=U[Q-1];if(F!==`
24
- `&&F!=="\t"&&F!==" ")break}let T=U.substring(Q),P=T.indexOf(`
25
- `);if(P===-1)J="-";else if(U===T||P!==T.length-1){if(J="+",X)X()}else J="";if(T){if(U=U.slice(0,-T.length),T[T.length-1]===`
26
- `)T=T.slice(0,-1);T=T.replace(m$,`$&${G}`)}let D=!1,B,w=-1;for(B=0;B<U.length;++B){let F=U[B];if(F===" ")D=!0;else if(F===`
27
- `)w=B;else break}let V=U.substring(0,w<B?w+1:B);if(V)U=U.substring(V.length),V=V.replace(/\n+/g,`$&${G}`);let W=(D?G?"2":"1":"")+J;if($){if(W+=" "+Z($.replace(/ ?[\r\n]+/g," ")),z)z()}if(!I){let F=U.replace(/\n+/g,`
28
- $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${G}`),A=!1,K=o0(H,!0);if(L!=="folded"&&q!==g.Scalar.BLOCK_FOLDED)K.onOverflow=()=>{A=!0};let Y=p.foldFlowLines(`${V}${F}${T}`,G,p.FOLD_BLOCK,K);if(!A)return`>${W}
29
- ${G}${Y}`}return U=U.replace(/\n+/g,`$&${G}`),`|${W}
30
- ${G}${V}${U}${T}`}function T9($,q,U,H){let{type:z,value:X}=$,{actualString:L,implicitKey:Z,indent:R,indentStep:G,inFlow:I}=q;if(Z&&X.includes(`
31
- `)||I&&/[[\]{},]/.test(X))return G0(X,q);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(X))return Z||I||!X.includes(`
32
- `)?G0(X,q):n0($,q,U,H);if(!Z&&!I&&z!==g.Scalar.PLAIN&&X.includes(`
33
- `))return n0($,q,U,H);if(t0(X)){if(R==="")return q.forceBlockIndent=!0,n0($,q,U,H);else if(Z&&R===G)return G0(X,q)}let J=X.replace(/\n+/g,`$&
34
- ${R}`);if(L){let Q=(D)=>D.default&&D.tag!=="tag:yaml.org,2002:str"&&D.test?.test(J),{compat:T,tags:P}=q.doc.schema;if(P.some(Q)||T?.some(Q))return G0(X,q)}return Z?J:p.foldFlowLines(J,R,p.FOLD_FLOW,o0(q,!1))}function O9($,q,U,H){let{implicitKey:z,inFlow:X}=q,L=typeof $.value==="string"?$:Object.assign({},$,{value:String($.value)}),{type:Z}=$;if(Z!==g.Scalar.QUOTE_DOUBLE){if(/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(L.value))Z=g.Scalar.QUOTE_DOUBLE}let R=(I)=>{switch(I){case g.Scalar.BLOCK_FOLDED:case g.Scalar.BLOCK_LITERAL:return z||X?G0(L.value,q):n0(L,q,U,H);case g.Scalar.QUOTE_DOUBLE:return W0(L.value,q);case g.Scalar.QUOTE_SINGLE:return v$(L.value,q);case g.Scalar.PLAIN:return T9(L,q,U,H);default:return null}},G=R(Z);if(G===null){let{defaultKeyType:I,defaultStringType:J}=q.options,Q=z&&I||J;if(G=R(Q),G===null)throw Error(`Unsupported default string type ${Q}`)}return G}P9.stringifyString=O9});var A0=O((K9)=>{var w9=s0(),d=M(),V9=_0(),_9=F0();function W9($,q){let U=Object.assign({blockQuote:!0,commentString:V9.stringifyComment,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:"true",verifyAliasOrder:!0},$.schema.toStringOptions,q),H;switch(U.collectionStyle){case"block":H=!1;break;case"flow":H=!0;break;default:H=null}return{anchors:new Set,doc:$,flowCollectionPadding:U.flowCollectionPadding?" ":"",indent:"",indentStep:typeof U.indent==="number"?" ".repeat(U.indent):" ",inFlow:H,options:U}}function F9($,q){if(q.tag){let z=$.filter((X)=>X.tag===q.tag);if(z.length>0)return z.find((X)=>X.format===q.format)??z[0]}let U=void 0,H;if(d.isScalar(q)){H=q.value;let z=$.filter((X)=>X.identify?.(H));if(z.length>1){let X=z.filter((L)=>L.test);if(X.length>0)z=X}U=z.find((X)=>X.format===q.format)??z.find((X)=>!X.format)}else H=q,U=$.find((z)=>z.nodeClass&&H instanceof z.nodeClass);if(!U){let z=H?.constructor?.name??(H===null?"null":typeof H);throw Error(`Tag not resolved for ${z} value`)}return U}function A9($,q,{anchors:U,doc:H}){if(!H.directives)return"";let z=[],X=(d.isScalar($)||d.isCollection($))&&$.anchor;if(X&&w9.anchorIsValid(X))U.add(X),z.push(`&${X}`);let L=$.tag??(q.default?null:q.tag);if(L)z.push(H.directives.tagString(L));return z.join(" ")}function M9($,q,U,H){if(d.isPair($))return $.toString(q,U,H);if(d.isAlias($)){if(q.doc.directives)return $.toString(q);if(q.resolvedAliases?.has($))throw TypeError("Cannot stringify circular structure without alias nodes");else{if(q.resolvedAliases)q.resolvedAliases.add($);else q.resolvedAliases=new Set([$]);$=$.resolve(q.doc)}}let z=void 0,X=d.isNode($)?$:q.doc.createNode($,{onTagObj:(R)=>z=R});z??(z=F9(q.doc.schema.tags,X));let L=A9(X,z,q);if(L.length>0)q.indentAtStart=(q.indentAtStart??0)+L.length+1;let Z=typeof z.stringify==="function"?z.stringify(X,q,U,H):d.isScalar(X)?_9.stringifyString(X,q,U,H):X.toString(q,U,H);if(!L)return Z;return d.isScalar(X)||Z[0]==="{"||Z[0]==="["?`${L} ${Z}`:`${L}
35
- ${q.indent}${Z}`}K9.createStringifyContext=W9;K9.stringify=M9});var S1=O((C9)=>{var k=M(),b1=b(),N1=A0(),M0=_0();function S9({key:$,value:q},U,H,z){let{allNullValues:X,doc:L,indent:Z,indentStep:R,options:{commentString:G,indentSeq:I,simpleKeys:J}}=U,Q=k.isNode($)&&$.comment||null;if(J){if(Q)throw Error("With simple keys, key nodes cannot have comments");if(k.isCollection($)||!k.isNode($)&&typeof $==="object")throw Error("With simple keys, collection cannot be used as a key value")}let T=!J&&(!$||Q&&q==null&&!U.inFlow||k.isCollection($)||(k.isScalar($)?$.type===b1.Scalar.BLOCK_FOLDED||$.type===b1.Scalar.BLOCK_LITERAL:typeof $==="object"));U=Object.assign({},U,{allNullValues:!1,implicitKey:!T&&(J||!X),indent:Z+R});let P=!1,D=!1,B=N1.stringify($,U,()=>P=!0,()=>D=!0);if(!T&&!U.inFlow&&B.length>1024){if(J)throw Error("With simple keys, single line scalar must not span more than 1024 characters");T=!0}if(U.inFlow){if(X||q==null){if(P&&H)H();return B===""?"?":T?`? ${B}`:B}}else if(X&&!J||q==null&&T){if(B=`? ${B}`,Q&&!P)B+=M0.lineComment(B,U.indent,G(Q));else if(D&&z)z();return B}if(P)Q=null;if(T){if(Q)B+=M0.lineComment(B,U.indent,G(Q));B=`? ${B}
36
- ${Z}:`}else if(B=`${B}:`,Q)B+=M0.lineComment(B,U.indent,G(Q));let w,V,_;if(k.isNode(q))w=!!q.spaceBefore,V=q.commentBefore,_=q.comment;else if(w=!1,V=null,_=null,q&&typeof q==="object")q=L.createNode(q);if(U.implicitKey=!1,!T&&!Q&&k.isScalar(q))U.indentAtStart=B.length+1;if(D=!1,!I&&R.length>=2&&!U.inFlow&&!T&&k.isSeq(q)&&!q.flow&&!q.tag&&!q.anchor)U.indent=U.indent.substring(2);let W=!1,F=N1.stringify(q,U,()=>W=!0,()=>D=!0),A=" ";if(Q||w||V){if(A=w?`
37
- `:"",V){let K=G(V);A+=`
38
- ${M0.indentComment(K,U.indent)}`}if(F===""&&!U.inFlow){if(A===`
39
- `&&_)A=`
23
+ `;let u,f;for(f=s.length;f>0;--f){let C=s[f-1];if(C!==`
24
+ `&&C!=="\t"&&C!==" ")break}let m=s.substring(f),g=m.indexOf(`
25
+ `);if(g===-1)u="-";else if(s===m||g!==m.length-1){if(u="+",r)r()}else u="";if(m){if(s=s.slice(0,-m.length),m[m.length-1]===`
26
+ `)m=m.slice(0,-1);m=m.replace(zt,`$&${c}`)}let p=!1,h,w=-1;for(h=0;h<s.length;++h){let C=s[h];if(C===" ")p=!0;else if(C===`
27
+ `)w=h;else break}let S=s.substring(0,w<h?w+1:h);if(S)s=s.substring(S.length),S=S.replace(/\n+/g,`$&${c}`);let k=(p?c?"2":"1":"")+u;if(e){if(k+=" "+a(e.replace(/ ?[\r\n]+/g," ")),i)i()}if(!d){let C=s.replace(/\n+/g,`
28
+ $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${c}`),N=!1,O=nt(n,!0);if(o!=="folded"&&t!==_.Scalar.BLOCK_FOLDED)O.onOverflow=()=>{N=!0};let b=Y.foldFlowLines(`${S}${C}${m}`,c,Y.FOLD_BLOCK,O);if(!N)return`>${k}
29
+ ${c}${b}`}return s=s.replace(/\n+/g,`$&${c}`),`|${k}
30
+ ${c}${S}${s}${m}`}function Ha(e,t,s,n){let{type:i,value:r}=e,{actualString:o,implicitKey:a,indent:l,indentStep:c,inFlow:d}=t;if(a&&r.includes(`
31
+ `)||d&&/[[\]{},]/.test(r))return ue(r,t);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(r))return a||d||!r.includes(`
32
+ `)?ue(r,t):st(e,t,s,n);if(!a&&!d&&i!==_.Scalar.PLAIN&&r.includes(`
33
+ `))return st(e,t,s,n);if(it(r)){if(l==="")return t.forceBlockIndent=!0,st(e,t,s,n);else if(a&&l===c)return ue(r,t)}let u=r.replace(/\n+/g,`$&
34
+ ${l}`);if(o){let f=(p)=>p.default&&p.tag!=="tag:yaml.org,2002:str"&&p.test?.test(u),{compat:m,tags:g}=t.doc.schema;if(g.some(f)||m?.some(f))return ue(r,t)}return a?u:Y.foldFlowLines(u,l,Y.FOLD_FLOW,nt(t,!1))}function Ja(e,t,s,n){let{implicitKey:i,inFlow:r}=t,o=typeof e.value==="string"?e:Object.assign({},e,{value:String(e.value)}),{type:a}=e;if(a!==_.Scalar.QUOTE_DOUBLE){if(/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value))a=_.Scalar.QUOTE_DOUBLE}let l=(d)=>{switch(d){case _.Scalar.BLOCK_FOLDED:case _.Scalar.BLOCK_LITERAL:return i||r?ue(o.value,t):st(o,t,s,n);case _.Scalar.QUOTE_DOUBLE:return Ae(o.value,t);case _.Scalar.QUOTE_SINGLE:return Jt(o.value,t);case _.Scalar.PLAIN:return Ha(o,t,s,n);default:return null}},c=l(a);if(c===null){let{defaultKeyType:d,defaultStringType:u}=t.options,f=i&&d||u;if(c=l(f),c===null)throw Error(`Unsupported default string type ${f}`)}return c}za.stringifyString=Ja});var Le=y(function(nl){var Ga=Xe(),V=A(),Qa=Ne(),Xa=Oe();function Za(e,t){let s=Object.assign({blockQuote:!0,commentString:Qa.stringifyComment,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:"true",verifyAliasOrder:!0},e.schema.toStringOptions,t),n;switch(s.collectionStyle){case"block":n=!1;break;case"flow":n=!0;break;default:n=null}return{anchors:new Set,doc:e,flowCollectionPadding:s.flowCollectionPadding?" ":"",indent:"",indentStep:typeof s.indent==="number"?" ".repeat(s.indent):" ",inFlow:n,options:s}}function el(e,t){if(t.tag){let i=e.filter((r)=>r.tag===t.tag);if(i.length>0)return i.find((r)=>r.format===t.format)??i[0]}let s=void 0,n;if(V.isScalar(t)){n=t.value;let i=e.filter((r)=>r.identify?.(n));if(i.length>1){let r=i.filter((o)=>o.test);if(r.length>0)i=r}s=i.find((r)=>r.format===t.format)??i.find((r)=>!r.format)}else n=t,s=e.find((i)=>i.nodeClass&&n instanceof i.nodeClass);if(!s){let i=n?.constructor?.name??(n===null?"null":typeof n);throw Error(`Tag not resolved for ${i} value`)}return s}function tl(e,t,{anchors:s,doc:n}){if(!n.directives)return"";let i=[],r=(V.isScalar(e)||V.isCollection(e))&&e.anchor;if(r&&Ga.anchorIsValid(r))s.add(r),i.push(`&${r}`);let o=e.tag??(t.default?null:t.tag);if(o)i.push(n.directives.tagString(o));return i.join(" ")}function sl(e,t,s,n){if(V.isPair(e))return e.toString(t,s,n);if(V.isAlias(e)){if(t.doc.directives)return e.toString(t);if(t.resolvedAliases?.has(e))throw TypeError("Cannot stringify circular structure without alias nodes");else{if(t.resolvedAliases)t.resolvedAliases.add(e);else t.resolvedAliases=new Set([e]);e=e.resolve(t.doc)}}let i=void 0,r=V.isNode(e)?e:t.doc.createNode(e,{onTagObj:(l)=>i=l});i??(i=el(t.doc.schema.tags,r));let o=tl(r,i,t);if(o.length>0)t.indentAtStart=(t.indentAtStart??0)+o.length+1;let a=typeof i.stringify==="function"?i.stringify(r,t,s,n):V.isScalar(r)?Xa.stringifyString(r,t,s,n):r.toString(t,s,n);if(!o)return a;return V.isScalar(r)||a[0]==="{"||a[0]==="["?`${o} ${a}`:`${o}
35
+ ${t.indent}${a}`}nl.createStringifyContext=Za;nl.stringify=sl});var zn=y(function(al){var K=A(),Hn=L(),Jn=Le(),Pe=Ne();function ol({key:e,value:t},s,n,i){let{allNullValues:r,doc:o,indent:a,indentStep:l,options:{commentString:c,indentSeq:d,simpleKeys:u}}=s,f=K.isNode(e)&&e.comment||null;if(u){if(f)throw Error("With simple keys, key nodes cannot have comments");if(K.isCollection(e)||!K.isNode(e)&&typeof e==="object")throw Error("With simple keys, collection cannot be used as a key value")}let m=!u&&(!e||f&&t==null&&!s.inFlow||K.isCollection(e)||(K.isScalar(e)?e.type===Hn.Scalar.BLOCK_FOLDED||e.type===Hn.Scalar.BLOCK_LITERAL:typeof e==="object"));s=Object.assign({},s,{allNullValues:!1,implicitKey:!m&&(u||!r),indent:a+l});let g=!1,p=!1,h=Jn.stringify(e,s,()=>g=!0,()=>p=!0);if(!m&&!s.inFlow&&h.length>1024){if(u)throw Error("With simple keys, single line scalar must not span more than 1024 characters");m=!0}if(s.inFlow){if(r||t==null){if(g&&n)n();return h===""?"?":m?`? ${h}`:h}}else if(r&&!u||t==null&&m){if(h=`? ${h}`,f&&!g)h+=Pe.lineComment(h,s.indent,c(f));else if(p&&i)i();return h}if(g)f=null;if(m){if(f)h+=Pe.lineComment(h,s.indent,c(f));h=`? ${h}
36
+ ${a}:`}else if(h=`${h}:`,f)h+=Pe.lineComment(h,s.indent,c(f));let w,S,v;if(K.isNode(t))w=!!t.spaceBefore,S=t.commentBefore,v=t.comment;else if(w=!1,S=null,v=null,t&&typeof t==="object")t=o.createNode(t);if(s.implicitKey=!1,!m&&!f&&K.isScalar(t))s.indentAtStart=h.length+1;if(p=!1,!d&&l.length>=2&&!s.inFlow&&!m&&K.isSeq(t)&&!t.flow&&!t.tag&&!t.anchor)s.indent=s.indent.substring(2);let k=!1,C=Jn.stringify(t,s,()=>k=!0,()=>p=!0),N=" ";if(f||w||S){if(N=w?`
37
+ `:"",S){let O=c(S);N+=`
38
+ ${Pe.indentComment(O,s.indent)}`}if(C===""&&!s.inFlow){if(N===`
39
+ `&&v)N=`
40
40
 
41
- `}else A+=`
42
- ${U.indent}`}else if(!T&&k.isCollection(q)){let K=F[0],Y=F.indexOf(`
43
- `),N=Y!==-1,v=U.inFlow??q.flow??q.items.length===0;if(N||!v){let z0=!1;if(N&&(K==="&"||K==="!")){let S=F.indexOf(" ");if(K==="&"&&S!==-1&&S<Y&&F[S+1]==="!")S=F.indexOf(" ",S+1);if(S===-1||Y<S)z0=!0}if(!z0)A=`
44
- ${U.indent}`}}else if(F===""||F[0]===`
45
- `)A="";if(B+=A+F,U.inFlow){if(W&&H)H()}else if(_&&!W)B+=M0.lineComment(B,U.indent,G(_));else if(D&&z)z();return B}C9.stringifyPair=S9});var p$=O((g9)=>{var C1=X0("process");function f9($,...q){if($==="debug")console.log(...q)}function E9($,q){if($==="debug"||$==="warn")if(typeof C1.emitWarning==="function")C1.emitWarning(q);else console.warn(q)}g9.debug=f9;g9.warn=E9});var U$=O((x9)=>{var q$=M(),j1=b(),e0="<<",$$={identify:($)=>$===e0||typeof $==="symbol"&&$.description===e0,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new j1.Scalar(Symbol(e0)),{addToJSMap:f1}),stringify:()=>e0},h9=($,q)=>($$.identify(q)||q$.isScalar(q)&&(!q.type||q.type===j1.Scalar.PLAIN)&&$$.identify(q.value))&&$?.doc.schema.tags.some((U)=>U.tag===$$.tag&&U.default);function f1($,q,U){let H=E1($,U);if(q$.isSeq(H))for(let z of H.items)d$($,q,z);else if(Array.isArray(H))for(let z of H)d$($,q,z);else d$($,q,H)}function d$($,q,U){let H=E1($,U);if(!q$.isMap(H))throw Error("Merge sources must be maps or map aliases");let z=H.toJSON(null,$,Map);for(let[X,L]of z)if(q instanceof Map){if(!q.has(X))q.set(X,L)}else if(q instanceof Set)q.add(X);else if(!Object.prototype.hasOwnProperty.call(q,X))Object.defineProperty(q,X,{value:L,writable:!0,enumerable:!0,configurable:!0});return q}function E1($,q){return $&&q$.isAlias(q)?q.resolve($.doc,$):q}x9.addMergeToJSMap=f1;x9.isMergeKey=h9;x9.merge=$$});var a$=O((s9)=>{var p9=p$(),g1=U$(),d9=A0(),u1=M(),l$=m();function l9($,q,{key:U,value:H}){if(u1.isNode(U)&&U.addToJSMap)U.addToJSMap($,q,H);else if(g1.isMergeKey($,U))g1.addMergeToJSMap($,q,H);else{let z=l$.toJS(U,"",$);if(q instanceof Map)q.set(z,l$.toJS(H,z,$));else if(q instanceof Set)q.add(z);else{let X=a9(U,z,$),L=l$.toJS(H,X,$);if(X in q)Object.defineProperty(q,X,{value:L,writable:!0,enumerable:!0,configurable:!0});else q[X]=L}}return q}function a9($,q,U){if(q===null)return"";if(typeof q!=="object")return String(q);if(u1.isNode($)&&U?.doc){let H=d9.createStringifyContext(U.doc,{});H.anchors=new Set;for(let X of U.anchors.keys())H.anchors.add(X.anchor);H.inFlow=!0,H.inStringifyKey=!0;let z=$.toString(H);if(!U.mapKeyWarned){let X=JSON.stringify(z);if(X.length>40)X=X.substring(0,36)+'..."';p9.warn(U.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${X}. Set mapAsMap: true to use object keys.`),U.mapKeyWarned=!0}return z}return JSON.stringify(q)}s9.addPairToJSMap=l9});var l=O((o9)=>{var y1=V0(),c9=S1(),r9=a$(),H$=M();function n9($,q,U){let H=y1.createNode($,void 0,U),z=y1.createNode(q,void 0,U);return new z$(H,z)}class z${constructor($,q=null){Object.defineProperty(this,H$.NODE_TYPE,{value:H$.PAIR}),this.key=$,this.value=q}clone($){let{key:q,value:U}=this;if(H$.isNode(q))q=q.clone($);if(H$.isNode(U))U=U.clone($);return new z$(q,U)}toJSON($,q){let U=q?.mapAsMap?new Map:{};return r9.addPairToJSMap(q,U,this)}toString($,q,U){return $?.doc?c9.stringifyPair(this,$,q,U):JSON.stringify(this)}}o9.Pair=z$;o9.createPair=n9});var s$=O((H6)=>{var t=M(),h1=A0(),X$=_0();function $6($,q,U){return(q.inFlow??$.flow?U6:q6)($,q,U)}function q6({comment:$,items:q},U,{blockItemPrefix:H,flowChars:z,itemIndent:X,onChompKeep:L,onComment:Z}){let{indent:R,options:{commentString:G}}=U,I=Object.assign({},U,{indent:X,type:null}),J=!1,Q=[];for(let P=0;P<q.length;++P){let D=q[P],B=null;if(t.isNode(D)){if(!J&&D.spaceBefore)Q.push("");if(L$(U,Q,D.commentBefore,J),D.comment)B=D.comment}else if(t.isPair(D)){let V=t.isNode(D.key)?D.key:null;if(V){if(!J&&V.spaceBefore)Q.push("");L$(U,Q,V.commentBefore,J)}}J=!1;let w=h1.stringify(D,I,()=>B=null,()=>J=!0);if(B)w+=X$.lineComment(w,X,G(B));if(J&&B)J=!1;Q.push(H+w)}let T;if(Q.length===0)T=z.start+z.end;else{T=Q[0];for(let P=1;P<Q.length;++P){let D=Q[P];T+=D?`
46
- ${R}${D}`:`
47
- `}}if($){if(T+=`
48
- `+X$.indentComment(G($),R),Z)Z()}else if(J&&L)L();return T}function U6({items:$},q,{flowChars:U,itemIndent:H}){let{indent:z,indentStep:X,flowCollectionPadding:L,options:{commentString:Z}}=q;H+=X;let R=Object.assign({},q,{indent:H,inFlow:!0,type:null}),G=!1,I=0,J=[];for(let P=0;P<$.length;++P){let D=$[P],B=null;if(t.isNode(D)){if(D.spaceBefore)J.push("");if(L$(q,J,D.commentBefore,!1),D.comment)B=D.comment}else if(t.isPair(D)){let V=t.isNode(D.key)?D.key:null;if(V){if(V.spaceBefore)J.push("");if(L$(q,J,V.commentBefore,!1),V.comment)G=!0}let _=t.isNode(D.value)?D.value:null;if(_){if(_.comment)B=_.comment;if(_.commentBefore)G=!0}else if(D.value==null&&V?.comment)B=V.comment}if(B)G=!0;let w=h1.stringify(D,R,()=>B=null);if(G||(G=J.length>I||w.includes(`
49
- `)),P<$.length-1)w+=",";else if(q.options.trailingComma){if(q.options.lineWidth>0)G||(G=J.reduce((V,_)=>V+_.length+2,2)+(w.length+2)>q.options.lineWidth);if(G)w+=","}if(B)w+=X$.lineComment(w,H,Z(B));J.push(w),I=J.length}let{start:Q,end:T}=U;if(J.length===0)return Q+T;else{if(!G){let P=J.reduce((D,B)=>D+B.length+2,2);G=q.options.lineWidth>0&&P>q.options.lineWidth}if(G){let P=Q;for(let D of J)P+=D?`
50
- ${X}${z}${D}`:`
51
- `;return`${P}
52
- ${z}${T}`}else return`${Q}${L}${J.join(" ")}${L}${T}`}}function L$({indent:$,options:{commentString:q}},U,H,z){if(H&&z)H=H.replace(/^\n+/,"");if(H){let X=X$.indentComment(q(H),$);U.push(X.trimStart())}}H6.stringifyCollection=$6});var s=O((G6)=>{var X6=s$(),L6=a$(),Z6=r0(),a=M(),Z$=l(),R6=b();function K0($,q){let U=a.isScalar(q)?q.value:q;for(let H of $)if(a.isPair(H)){if(H.key===q||H.key===U)return H;if(a.isScalar(H.key)&&H.key.value===U)return H}return}class x1 extends Z6.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor($){super(a.MAP,$);this.items=[]}static from($,q,U){let{keepUndefined:H,replacer:z}=U,X=new this($),L=(Z,R)=>{if(typeof z==="function")R=z.call(q,Z,R);else if(Array.isArray(z)&&!z.includes(Z))return;if(R!==void 0||H)X.items.push(Z$.createPair(Z,R,U))};if(q instanceof Map)for(let[Z,R]of q)L(Z,R);else if(q&&typeof q==="object")for(let Z of Object.keys(q))L(Z,q[Z]);if(typeof $.sortMapEntries==="function")X.items.sort($.sortMapEntries);return X}add($,q){let U;if(a.isPair($))U=$;else if(!$||typeof $!=="object"||!("key"in $))U=new Z$.Pair($,$?.value);else U=new Z$.Pair($.key,$.value);let H=K0(this.items,U.key),z=this.schema?.sortMapEntries;if(H){if(!q)throw Error(`Key ${U.key} already set`);if(a.isScalar(H.value)&&R6.isScalarValue(U.value))H.value.value=U.value;else H.value=U.value}else if(z){let X=this.items.findIndex((L)=>z(U,L)<0);if(X===-1)this.items.push(U);else this.items.splice(X,0,U)}else this.items.push(U)}delete($){let q=K0(this.items,$);if(!q)return!1;return this.items.splice(this.items.indexOf(q),1).length>0}get($,q){let H=K0(this.items,$)?.value;return(!q&&a.isScalar(H)?H.value:H)??void 0}has($){return!!K0(this.items,$)}set($,q){this.add(new Z$.Pair($,q),!0)}toJSON($,q,U){let H=U?new U:q?.mapAsMap?new Map:{};if(q?.onCreate)q.onCreate(H);for(let z of this.items)L6.addPairToJSMap(q,H,z);return H}toString($,q,U){if(!$)return JSON.stringify(this);for(let H of this.items)if(!a.isPair(H))throw Error(`Map items must all be pairs; found ${JSON.stringify(H)} instead`);if(!$.allNullValues&&this.hasAllNullValues(!1))$=Object.assign({},$,{allNullValues:!0});return X6.stringifyCollection(this,$,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:$.indent||"",onChompKeep:U,onComment:q})}}G6.YAMLMap=x1;G6.findPair=K0});var J0=O((B6)=>{var Q6=M(),k1=s(),D6={collection:"map",default:!0,nodeClass:k1.YAMLMap,tag:"tag:yaml.org,2002:map",resolve($,q){if(!Q6.isMap($))q("Expected a mapping for this tag");return $},createNode:($,q,U)=>k1.YAMLMap.from($,q,U)};B6.map=D6});var i=O((_6)=>{var O6=V0(),P6=s$(),Y6=r0(),G$=M(),w6=b(),V6=m();class v1 extends Y6.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor($){super(G$.SEQ,$);this.items=[]}add($){this.items.push($)}delete($){let q=R$($);if(typeof q!=="number")return!1;return this.items.splice(q,1).length>0}get($,q){let U=R$($);if(typeof U!=="number")return;let H=this.items[U];return!q&&G$.isScalar(H)?H.value:H}has($){let q=R$($);return typeof q==="number"&&q<this.items.length}set($,q){let U=R$($);if(typeof U!=="number")throw Error(`Expected a valid index, not ${$}.`);let H=this.items[U];if(G$.isScalar(H)&&w6.isScalarValue(q))H.value=q;else this.items[U]=q}toJSON($,q){let U=[];if(q?.onCreate)q.onCreate(U);let H=0;for(let z of this.items)U.push(V6.toJS(z,String(H++),q));return U}toString($,q,U){if(!$)return JSON.stringify(this);return P6.stringifyCollection(this,$,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:($.indent||"")+" ",onChompKeep:U,onComment:q})}static from($,q,U){let{replacer:H}=U,z=new this($);if(q&&Symbol.iterator in Object(q)){let X=0;for(let L of q){if(typeof H==="function"){let Z=q instanceof Set?L:String(X++);L=H.call(q,Z,L)}z.items.push(O6.createNode(L,void 0,U))}}return z}}function R$($){let q=G$.isScalar($)?$.value:$;if(q&&typeof q==="string")q=Number(q);return typeof q==="number"&&Number.isInteger(q)&&q>=0?q:null}_6.YAMLSeq=v1});var I0=O((M6)=>{var F6=M(),m1=i(),A6={collection:"seq",default:!0,nodeClass:m1.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve($,q){if(!F6.isSeq($))q("Expected a sequence for this tag");return $},createNode:($,q,U)=>m1.YAMLSeq.from($,q,U)};M6.seq=A6});var b0=O((S6)=>{var b6=F0(),N6={identify:($)=>typeof $==="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:($)=>$,stringify($,q,U,H){return q=Object.assign({actualString:!0},q),b6.stringifyString($,q,U,H)}};S6.string=N6});var J$=O((j6)=>{var p1=b(),d1={identify:($)=>$==null,createNode:()=>new p1.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new p1.Scalar(null),stringify:({source:$},q)=>typeof $==="string"&&d1.test.test($)?$:q.options.nullStr};j6.nullTag=d1});var i$=O((g6)=>{var E6=b(),l1={identify:($)=>typeof $==="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:($)=>new E6.Scalar($[0]==="t"||$[0]==="T"),stringify({source:$,value:q},U){if($&&l1.test.test($)){let H=$[0]==="t"||$[0]==="T";if(q===H)return $}return q?U.options.trueStr:U.options.falseStr}};g6.boolTag=l1});var Q0=O((h6)=>{function y6({format:$,minFractionDigits:q,tag:U,value:H}){if(typeof H==="bigint")return String(H);let z=typeof H==="number"?H:Number(H);if(!isFinite(z))return isNaN(z)?".nan":z<0?"-.inf":".inf";let X=Object.is(H,-0)?"-0":JSON.stringify(H);if(!$&&q&&(!U||U==="tag:yaml.org,2002:float")&&/^-?\d/.test(X)&&!X.includes("e")){let L=X.indexOf(".");if(L<0)L=X.length,X+=".";let Z=q-(X.length-L-1);while(Z-- >0)X+="0"}return X}h6.stringifyNumber=y6});var r$=O((d6)=>{var k6=b(),c$=Q0(),v6={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:($)=>$.slice(-3).toLowerCase()==="nan"?NaN:$[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:c$.stringifyNumber},m6={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:($)=>parseFloat($),stringify($){let q=Number($.value);return isFinite(q)?q.toExponential():c$.stringifyNumber($)}},p6={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve($){let q=new k6.Scalar(parseFloat($)),U=$.indexOf(".");if(U!==-1&&$[$.length-1]==="0")q.minFractionDigits=$.length-U-1;return q},stringify:c$.stringifyNumber};d6.float=p6;d6.floatExp=m6;d6.floatNaN=v6});var o$=O((n6)=>{var a1=Q0(),I$=($)=>typeof $==="bigint"||Number.isInteger($),n$=($,q,U,{intAsBigInt:H})=>H?BigInt($):parseInt($.substring(q),U);function s1($,q,U){let{value:H}=$;if(I$(H)&&H>=0)return U+H.toString(q);return a1.stringifyNumber($)}var i6={identify:($)=>I$($)&&$>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:($,q,U)=>n$($,2,8,U),stringify:($)=>s1($,8,"0o")},c6={identify:I$,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:($,q,U)=>n$($,0,10,U),stringify:a1.stringifyNumber},r6={identify:($)=>I$($)&&$>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:($,q,U)=>n$($,2,16,U),stringify:($)=>s1($,16,"0x")};n6.int=c6;n6.intHex=r6;n6.intOct=i6});var i1=O((Lz)=>{var $z=J0(),qz=J$(),Uz=I0(),Hz=b0(),zz=i$(),t$=r$(),e$=o$(),Xz=[$z.map,Uz.seq,Hz.string,qz.nullTag,zz.boolTag,e$.intOct,e$.int,e$.intHex,t$.floatNaN,t$.floatExp,t$.float];Lz.schema=Xz});var r1=O((Bz)=>{var Rz=b(),Gz=J0(),Jz=I0();function c1($){return typeof $==="bigint"||Number.isInteger($)}var Q$=({value:$})=>JSON.stringify($),Iz=[{identify:($)=>typeof $==="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:($)=>$,stringify:Q$},{identify:($)=>$==null,createNode:()=>new Rz.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:Q$},{identify:($)=>typeof $==="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:($)=>$==="true",stringify:Q$},{identify:c1,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:($,q,{intAsBigInt:U})=>U?BigInt($):parseInt($,10),stringify:({value:$})=>c1($)?$.toString():JSON.stringify($)},{identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:($)=>parseFloat($),stringify:Q$}],Qz={default:!0,tag:"",test:/^/,resolve($,q){return q(`Unresolved plain scalar ${JSON.stringify($)}`),$}},Dz=[Gz.map,Jz.seq].concat(Iz,Qz);Bz.schema=Dz});var qq=O((Yz)=>{var N0=X0("buffer"),$q=b(),Oz=F0(),Pz={identify:($)=>$ instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve($,q){if(typeof N0.Buffer==="function")return N0.Buffer.from($,"base64");else if(typeof atob==="function"){let U=atob($.replace(/[\n\r]/g,"")),H=new Uint8Array(U.length);for(let z=0;z<U.length;++z)H[z]=U.charCodeAt(z);return H}else return q("This environment does not support reading binary tags; either Buffer or atob is required"),$},stringify({comment:$,type:q,value:U},H,z,X){if(!U)return"";let L=U,Z;if(typeof N0.Buffer==="function")Z=L instanceof N0.Buffer?L.toString("base64"):N0.Buffer.from(L.buffer).toString("base64");else if(typeof btoa==="function"){let R="";for(let G=0;G<L.length;++G)R+=String.fromCharCode(L[G]);Z=btoa(R)}else throw Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(q??(q=$q.Scalar.BLOCK_LITERAL),q!==$q.Scalar.QUOTE_DOUBLE){let R=Math.max(H.options.lineWidth-H.indent.length,H.options.minContentWidth),G=Math.ceil(Z.length/R),I=Array(G);for(let J=0,Q=0;J<G;++J,Q+=R)I[J]=Z.substr(Q,R);Z=I.join(q===$q.Scalar.BLOCK_LITERAL?`
53
- `:" ")}return Oz.stringifyString({comment:$,type:q,value:Z},H,z,X)}};Yz.binary=Pz});var B$=O((Fz)=>{var D$=M(),Uq=l(),Vz=b(),_z=i();function n1($,q){if(D$.isSeq($))for(let U=0;U<$.items.length;++U){let H=$.items[U];if(D$.isPair(H))continue;else if(D$.isMap(H)){if(H.items.length>1)q("Each pair must have its own sequence indicator");let z=H.items[0]||new Uq.Pair(new Vz.Scalar(null));if(H.commentBefore)z.key.commentBefore=z.key.commentBefore?`${H.commentBefore}
54
- ${z.key.commentBefore}`:H.commentBefore;if(H.comment){let X=z.value??z.key;X.comment=X.comment?`${H.comment}
55
- ${X.comment}`:H.comment}H=z}$.items[U]=D$.isPair(H)?H:new Uq.Pair(H)}else q("Expected a sequence for this tag");return $}function o1($,q,U){let{replacer:H}=U,z=new _z.YAMLSeq($);z.tag="tag:yaml.org,2002:pairs";let X=0;if(q&&Symbol.iterator in Object(q))for(let L of q){if(typeof H==="function")L=H.call(q,String(X++),L);let Z,R;if(Array.isArray(L))if(L.length===2)Z=L[0],R=L[1];else throw TypeError(`Expected [key, value] tuple: ${L}`);else if(L&&L instanceof Object){let G=Object.keys(L);if(G.length===1)Z=G[0],R=L[Z];else throw TypeError(`Expected tuple with one key, not ${G.length} keys`)}else Z=L;z.items.push(Uq.createPair(Z,R,U))}return z}var Wz={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:n1,createNode:o1};Fz.createPairs=o1;Fz.pairs=Wz;Fz.resolvePairs=n1});var zq=O((Sz)=>{var t1=M(),Hq=m(),S0=s(),bz=i(),e1=B$();class e extends bz.YAMLSeq{constructor(){super();this.add=S0.YAMLMap.prototype.add.bind(this),this.delete=S0.YAMLMap.prototype.delete.bind(this),this.get=S0.YAMLMap.prototype.get.bind(this),this.has=S0.YAMLMap.prototype.has.bind(this),this.set=S0.YAMLMap.prototype.set.bind(this),this.tag=e.tag}toJSON($,q){if(!q)return super.toJSON($);let U=new Map;if(q?.onCreate)q.onCreate(U);for(let H of this.items){let z,X;if(t1.isPair(H))z=Hq.toJS(H.key,"",q),X=Hq.toJS(H.value,z,q);else z=Hq.toJS(H,"",q);if(U.has(z))throw Error("Ordered maps must not include duplicate keys");U.set(z,X)}return U}static from($,q,U){let H=e1.createPairs($,q,U),z=new this;return z.items=H.items,z}}e.tag="tag:yaml.org,2002:omap";var Nz={collection:"seq",identify:($)=>$ instanceof Map,nodeClass:e,default:!1,tag:"tag:yaml.org,2002:omap",resolve($,q){let U=e1.resolvePairs($,q),H=[];for(let{key:z}of U.items)if(t1.isScalar(z))if(H.includes(z.value))q(`Ordered maps must not include duplicate keys: ${z.value}`);else H.push(z.value);return Object.assign(new e,U)},createNode:($,q,U)=>e.from($,q,U)};Sz.YAMLOMap=e;Sz.omap=Nz});var zU=O((fz)=>{var $U=b();function qU({value:$,source:q},U){if(q&&($?UU:HU).test.test(q))return q;return $?U.options.trueStr:U.options.falseStr}var UU={identify:($)=>$===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new $U.Scalar(!0),stringify:qU},HU={identify:($)=>$===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new $U.Scalar(!1),stringify:qU};fz.falseTag=HU;fz.trueTag=UU});var XU=O((kz)=>{var uz=b(),Xq=Q0(),yz={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:($)=>$.slice(-3).toLowerCase()==="nan"?NaN:$[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Xq.stringifyNumber},hz={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:($)=>parseFloat($.replace(/_/g,"")),stringify($){let q=Number($.value);return isFinite(q)?q.toExponential():Xq.stringifyNumber($)}},xz={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve($){let q=new uz.Scalar(parseFloat($.replace(/_/g,""))),U=$.indexOf(".");if(U!==-1){let H=$.substring(U+1).replace(/_/g,"");if(H[H.length-1]==="0")q.minFractionDigits=H.length}return q},stringify:Xq.stringifyNumber};kz.float=xz;kz.floatExp=hz;kz.floatNaN=yz});var ZU=O((iz)=>{var LU=Q0(),C0=($)=>typeof $==="bigint"||Number.isInteger($);function T$($,q,U,{intAsBigInt:H}){let z=$[0];if(z==="-"||z==="+")q+=1;if($=$.substring(q).replace(/_/g,""),H){switch(U){case 2:$=`0b${$}`;break;case 8:$=`0o${$}`;break;case 16:$=`0x${$}`;break}let L=BigInt($);return z==="-"?BigInt(-1)*L:L}let X=parseInt($,U);return z==="-"?-1*X:X}function Lq($,q,U){let{value:H}=$;if(C0(H)){let z=H.toString(q);return H<0?"-"+U+z.substr(1):U+z}return LU.stringifyNumber($)}var dz={identify:C0,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:($,q,U)=>T$($,2,2,U),stringify:($)=>Lq($,2,"0b")},lz={identify:C0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:($,q,U)=>T$($,1,8,U),stringify:($)=>Lq($,8,"0")},az={identify:C0,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:($,q,U)=>T$($,0,10,U),stringify:LU.stringifyNumber},sz={identify:C0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:($,q,U)=>T$($,2,16,U),stringify:($)=>Lq($,16,"0x")};iz.int=az;iz.intBin=dz;iz.intHex=sz;iz.intOct=lz});var Zq=O((ez)=>{var Y$=M(),O$=l(),P$=s();class $0 extends P$.YAMLMap{constructor($){super($);this.tag=$0.tag}add($){let q;if(Y$.isPair($))q=$;else if($&&typeof $==="object"&&"key"in $&&"value"in $&&$.value===null)q=new O$.Pair($.key,null);else q=new O$.Pair($,null);if(!P$.findPair(this.items,q.key))this.items.push(q)}get($,q){let U=P$.findPair(this.items,$);return!q&&Y$.isPair(U)?Y$.isScalar(U.key)?U.key.value:U.key:U}set($,q){if(typeof q!=="boolean")throw Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof q}`);let U=P$.findPair(this.items,$);if(U&&!q)this.items.splice(this.items.indexOf(U),1);else if(!U&&q)this.items.push(new O$.Pair($))}toJSON($,q){return super.toJSON($,q,Set)}toString($,q,U){if(!$)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},$,{allNullValues:!0}),q,U);else throw Error("Set items must all have null values")}static from($,q,U){let{replacer:H}=U,z=new this($);if(q&&Symbol.iterator in Object(q))for(let X of q){if(typeof H==="function")X=H.call(q,X,X);z.items.push(O$.createPair(X,null,U))}return z}}$0.tag="tag:yaml.org,2002:set";var tz={collection:"map",identify:($)=>$ instanceof Set,nodeClass:$0,default:!1,tag:"tag:yaml.org,2002:set",createNode:($,q,U)=>$0.from($,q,U),resolve($,q){if(Y$.isMap($))if($.hasAllNullValues(!0))return Object.assign(new $0,$);else q("Set items must all have null values");else q("Expected a mapping for this tag");return $}};ez.YAMLSet=$0;ez.set=tz});var Gq=O((X4)=>{var U4=Q0();function Rq($,q){let U=$[0],H=U==="-"||U==="+"?$.substring(1):$,z=(L)=>q?BigInt(L):Number(L),X=H.replace(/_/g,"").split(":").reduce((L,Z)=>L*z(60)+z(Z),z(0));return U==="-"?z(-1)*X:X}function RU($){let{value:q}=$,U=(L)=>L;if(typeof q==="bigint")U=(L)=>BigInt(L);else if(isNaN(q)||!isFinite(q))return U4.stringifyNumber($);let H="";if(q<0)H="-",q*=U(-1);let z=U(60),X=[q%z];if(q<60)X.unshift(0);else if(q=(q-X[0])/z,X.unshift(q%z),q>=60)q=(q-X[0])/z,X.unshift(q);return H+X.map((L)=>String(L).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}var H4={identify:($)=>typeof $==="bigint"||Number.isInteger($),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:($,q,{intAsBigInt:U})=>Rq($,U),stringify:RU},z4={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:($)=>Rq($,!1),stringify:RU},GU={identify:($)=>$ 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($){let q=$.match(GU.test);if(!q)throw Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,U,H,z,X,L,Z]=q.map(Number),R=q[7]?Number((q[7]+"00").substr(1,3)):0,G=Date.UTC(U,H-1,z,X||0,L||0,Z||0,R),I=q[8];if(I&&I!=="Z"){let J=Rq(I,!1);if(Math.abs(J)<30)J*=60;G-=60000*J}return new Date(G)},stringify:({value:$})=>$?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};X4.floatTime=z4;X4.intTime=H4;X4.timestamp=GU});var IU=O((w4)=>{var G4=J0(),J4=J$(),I4=I0(),Q4=b0(),D4=qq(),JU=zU(),Jq=XU(),w$=ZU(),B4=U$(),T4=zq(),O4=B$(),P4=Zq(),Iq=Gq(),Y4=[G4.map,I4.seq,Q4.string,J4.nullTag,JU.trueTag,JU.falseTag,w$.intBin,w$.intOct,w$.int,w$.intHex,Jq.floatNaN,Jq.floatExp,Jq.float,D4.binary,B4.merge,T4.omap,O4.pairs,P4.set,Iq.intTime,Iq.floatTime,Iq.timestamp];w4.schema=Y4});var _U=O((N4)=>{var TU=J0(),_4=J$(),OU=I0(),W4=b0(),F4=i$(),Qq=r$(),Dq=o$(),A4=i1(),M4=r1(),PU=qq(),j0=U$(),YU=zq(),wU=B$(),QU=IU(),VU=Zq(),V$=Gq(),DU=new Map([["core",A4.schema],["failsafe",[TU.map,OU.seq,W4.string]],["json",M4.schema],["yaml11",QU.schema],["yaml-1.1",QU.schema]]),BU={binary:PU.binary,bool:F4.boolTag,float:Qq.float,floatExp:Qq.floatExp,floatNaN:Qq.floatNaN,floatTime:V$.floatTime,int:Dq.int,intHex:Dq.intHex,intOct:Dq.intOct,intTime:V$.intTime,map:TU.map,merge:j0.merge,null:_4.nullTag,omap:YU.omap,pairs:wU.pairs,seq:OU.seq,set:VU.set,timestamp:V$.timestamp},K4={"tag:yaml.org,2002:binary":PU.binary,"tag:yaml.org,2002:merge":j0.merge,"tag:yaml.org,2002:omap":YU.omap,"tag:yaml.org,2002:pairs":wU.pairs,"tag:yaml.org,2002:set":VU.set,"tag:yaml.org,2002:timestamp":V$.timestamp};function b4($,q,U){let H=DU.get(q);if(H&&!$)return U&&!H.includes(j0.merge)?H.concat(j0.merge):H.slice();let z=H;if(!z)if(Array.isArray($))z=[];else{let X=Array.from(DU.keys()).filter((L)=>L!=="yaml11").map((L)=>JSON.stringify(L)).join(", ");throw Error(`Unknown schema "${q}"; use one of ${X} or define customTags array`)}if(Array.isArray($))for(let X of $)z=z.concat(X);else if(typeof $==="function")z=$(z.slice());if(U)z=z.concat(j0.merge);return z.reduce((X,L)=>{let Z=typeof L==="string"?BU[L]:L;if(!Z){let R=JSON.stringify(L),G=Object.keys(BU).map((I)=>JSON.stringify(I)).join(", ");throw Error(`Unknown custom tag ${R}; use one of ${G}`)}if(!X.includes(Z))X.push(Z);return X},[])}N4.coreKnownTags=K4;N4.getTags=b4});var Oq=O((u4)=>{var Bq=M(),j4=J0(),f4=I0(),E4=b0(),_$=_U(),g4=($,q)=>$.key<q.key?-1:$.key>q.key?1:0;class Tq{constructor({compat:$,customTags:q,merge:U,resolveKnownTags:H,schema:z,sortMapEntries:X,toStringDefaults:L}){this.compat=Array.isArray($)?_$.getTags($,"compat"):$?_$.getTags(null,$):null,this.name=typeof z==="string"&&z||"core",this.knownTags=H?_$.coreKnownTags:{},this.tags=_$.getTags(q,this.name,U),this.toStringOptions=L??null,Object.defineProperty(this,Bq.MAP,{value:j4.map}),Object.defineProperty(this,Bq.SCALAR,{value:E4.string}),Object.defineProperty(this,Bq.SEQ,{value:f4.seq}),this.sortMapEntries=typeof X==="function"?X:X===!0?g4:null}clone(){let $=Object.create(Tq.prototype,Object.getOwnPropertyDescriptors(this));return $.tags=this.tags.slice(),$}}u4.Schema=Tq});var WU=O((k4)=>{var h4=M(),Pq=A0(),f0=_0();function x4($,q){let U=[],H=q.directives===!0;if(q.directives!==!1&&$.directives){let R=$.directives.toString($);if(R)U.push(R),H=!0;else if($.directives.docStart)H=!0}if(H)U.push("---");let z=Pq.createStringifyContext($,q),{commentString:X}=z.options;if($.commentBefore){if(U.length!==1)U.unshift("");let R=X($.commentBefore);U.unshift(f0.indentComment(R,""))}let L=!1,Z=null;if($.contents){if(h4.isNode($.contents)){if($.contents.spaceBefore&&H)U.push("");if($.contents.commentBefore){let I=X($.contents.commentBefore);U.push(f0.indentComment(I,""))}z.forceBlockIndent=!!$.comment,Z=$.contents.comment}let R=Z?void 0:()=>L=!0,G=Pq.stringify($.contents,z,()=>Z=null,R);if(Z)G+=f0.lineComment(G,"",X(Z));if((G[0]==="|"||G[0]===">")&&U[U.length-1]==="---")U[U.length-1]=`--- ${G}`;else U.push(G)}else U.push(Pq.stringify($.contents,z));if($.directives?.docEnd)if($.comment){let R=X($.comment);if(R.includes(`
56
- `))U.push("..."),U.push(f0.indentComment(R,""));else U.push(`... ${R}`)}else U.push("...");else{let R=$.comment;if(R&&L)R=R.replace(/^\n+/,"");if(R){if((!L||Z)&&U[U.length-1]!=="")U.push("");U.push(f0.indentComment(X(R),""))}}return U.join(`
41
+ `}else N+=`
42
+ ${s.indent}`}else if(!m&&K.isCollection(t)){let O=C[0],b=C.indexOf(`
43
+ `),P=b!==-1,F=s.inFlow??t.flow??t.items.length===0;if(P||!F){let oe=!1;if(P&&(O==="&"||O==="!")){let E=C.indexOf(" ");if(O==="&"&&E!==-1&&E<b&&C[E+1]==="!")E=C.indexOf(" ",E+1);if(E===-1||b<E)oe=!0}if(!oe)N=`
44
+ ${s.indent}`}}else if(C===""||C[0]===`
45
+ `)N="";if(h+=N+C,s.inFlow){if(k&&n)n()}else if(v&&!k)h+=Pe.lineComment(h,s.indent,c(v));else if(p&&i)i();return h}al.stringifyPair=ol});var Wt=y(function(fl){var Wn=Ue("process");function cl(e,...t){if(e==="debug")console.log(...t)}function ul(e,t){if(e==="debug"||e==="warn")if(typeof Wn.emitWarning==="function")Wn.emitWarning(t);else console.warn(t)}fl.debug=cl;fl.warn=ul});var lt=y(function(ml){var at=A(),Gn=L(),rt="<<",ot={identify:(e)=>e===rt||typeof e==="symbol"&&e.description===rt,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new Gn.Scalar(Symbol(rt)),{addToJSMap:Qn}),stringify:()=>rt},hl=(e,t)=>(ot.identify(t)||at.isScalar(t)&&(!t.type||t.type===Gn.Scalar.PLAIN)&&ot.identify(t.value))&&e?.doc.schema.tags.some((s)=>s.tag===ot.tag&&s.default);function Qn(e,t,s){let n=Xn(e,s);if(at.isSeq(n))for(let i of n.items)Gt(e,t,i);else if(Array.isArray(n))for(let i of n)Gt(e,t,i);else Gt(e,t,n)}function Gt(e,t,s){let n=Xn(e,s);if(!at.isMap(n))throw Error("Merge sources must be maps or map aliases");let i=n.toJSON(null,e,Map);for(let[r,o]of i)if(t instanceof Map){if(!t.has(r))t.set(r,o)}else if(t instanceof Set)t.add(r);else if(!Object.prototype.hasOwnProperty.call(t,r))Object.defineProperty(t,r,{value:o,writable:!0,enumerable:!0,configurable:!0});return t}function Xn(e,t){return e&&at.isAlias(t)?t.resolve(e.doc,e):t}ml.addMergeToJSMap=Qn;ml.isMergeKey=hl;ml.merge=ot});var Xt=y(function(Cl){var wl=Wt(),Zn=lt(),Sl=Le(),ei=A(),Qt=U();function vl(e,t,{key:s,value:n}){if(ei.isNode(s)&&s.addToJSMap)s.addToJSMap(e,t,n);else if(Zn.isMergeKey(e,s))Zn.addMergeToJSMap(e,t,n);else{let i=Qt.toJS(s,"",e);if(t instanceof Map)t.set(i,Qt.toJS(n,i,e));else if(t instanceof Set)t.add(i);else{let r=kl(s,i,e),o=Qt.toJS(n,r,e);if(r in t)Object.defineProperty(t,r,{value:o,writable:!0,enumerable:!0,configurable:!0});else t[r]=o}}return t}function kl(e,t,s){if(t===null)return"";if(typeof t!=="object")return String(t);if(ei.isNode(e)&&s?.doc){let n=Sl.createStringifyContext(s.doc,{});n.anchors=new Set;for(let r of s.anchors.keys())n.anchors.add(r.anchor);n.inFlow=!0,n.inStringifyKey=!0;let i=e.toString(n);if(!s.mapKeyWarned){let r=JSON.stringify(i);if(r.length>40)r=r.substring(0,36)+'..."';wl.warn(s.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${r}. Set mapAsMap: true to use object keys.`),s.mapKeyWarned=!0}return i}return JSON.stringify(t)}Cl.addPairToJSMap=vl});var H=y(function(Pl){var ti=Ce(),Al=zn(),Ol=Xt(),ct=A();function Ll(e,t,s){let n=ti.createNode(e,void 0,s),i=ti.createNode(t,void 0,s);return new ut(n,i)}class ut{constructor(e,t=null){Object.defineProperty(this,ct.NODE_TYPE,{value:ct.PAIR}),this.key=e,this.value=t}clone(e){let{key:t,value:s}=this;if(ct.isNode(t))t=t.clone(e);if(ct.isNode(s))s=s.clone(e);return new ut(t,s)}toJSON(e,t){let s=t?.mapAsMap?new Map:{};return Ol.addPairToJSMap(t,s,this)}toString(e,t,s){return e?.doc?Al.stringifyPair(this,e,t,s):JSON.stringify(this)}}Pl.Pair=ut;Pl.createPair=Ll});var Zt=y(function(Ml){var ee=A(),si=Le(),ft=Ne();function Il(e,t,s){return(t.inFlow??e.flow?$l:Tl)(e,t,s)}function Tl({comment:e,items:t},s,{blockItemPrefix:n,flowChars:i,itemIndent:r,onChompKeep:o,onComment:a}){let{indent:l,options:{commentString:c}}=s,d=Object.assign({},s,{indent:r,type:null}),u=!1,f=[];for(let g=0;g<t.length;++g){let p=t[g],h=null;if(ee.isNode(p)){if(!u&&p.spaceBefore)f.push("");if(dt(s,f,p.commentBefore,u),p.comment)h=p.comment}else if(ee.isPair(p)){let S=ee.isNode(p.key)?p.key:null;if(S){if(!u&&S.spaceBefore)f.push("");dt(s,f,S.commentBefore,u)}}u=!1;let w=si.stringify(p,d,()=>h=null,()=>u=!0);if(h)w+=ft.lineComment(w,r,c(h));if(u&&h)u=!1;f.push(n+w)}let m;if(f.length===0)m=i.start+i.end;else{m=f[0];for(let g=1;g<f.length;++g){let p=f[g];m+=p?`
46
+ ${l}${p}`:`
47
+ `}}if(e){if(m+=`
48
+ `+ft.indentComment(c(e),l),a)a()}else if(u&&o)o();return m}function $l({items:e},t,{flowChars:s,itemIndent:n}){let{indent:i,indentStep:r,flowCollectionPadding:o,options:{commentString:a}}=t;n+=r;let l=Object.assign({},t,{indent:n,inFlow:!0,type:null}),c=!1,d=0,u=[];for(let g=0;g<e.length;++g){let p=e[g],h=null;if(ee.isNode(p)){if(p.spaceBefore)u.push("");if(dt(t,u,p.commentBefore,!1),p.comment)h=p.comment}else if(ee.isPair(p)){let S=ee.isNode(p.key)?p.key:null;if(S){if(S.spaceBefore)u.push("");if(dt(t,u,S.commentBefore,!1),S.comment)c=!0}let v=ee.isNode(p.value)?p.value:null;if(v){if(v.comment)h=v.comment;if(v.commentBefore)c=!0}else if(p.value==null&&S?.comment)h=S.comment}if(h)c=!0;let w=si.stringify(p,l,()=>h=null);if(c||(c=u.length>d||w.includes(`
49
+ `)),g<e.length-1)w+=",";else if(t.options.trailingComma){if(t.options.lineWidth>0)c||(c=u.reduce((S,v)=>S+v.length+2,2)+(w.length+2)>t.options.lineWidth);if(c)w+=","}if(h)w+=ft.lineComment(w,n,a(h));u.push(w),d=u.length}let{start:f,end:m}=s;if(u.length===0)return f+m;else{if(!c){let g=u.reduce((p,h)=>p+h.length+2,2);c=t.options.lineWidth>0&&g>t.options.lineWidth}if(c){let g=f;for(let p of u)g+=p?`
50
+ ${r}${i}${p}`:`
51
+ `;return`${g}
52
+ ${i}${m}`}else return`${f}${o}${u.join(" ")}${o}${m}`}}function dt({indent:e,options:{commentString:t}},s,n,i){if(n&&i)n=n.replace(/^\n+/,"");if(n){let r=ft.indentComment(t(n),e);s.push(r.trimStart())}}Ml.stringifyCollection=Il});var z=y(function(jl){var _l=Zt(),Dl=Xt(),Rl=tt(),J=A(),pt=H(),Bl=L();function Ee(e,t){let s=J.isScalar(t)?t.value:t;for(let n of e)if(J.isPair(n)){if(n.key===t||n.key===s)return n;if(J.isScalar(n.key)&&n.key.value===s)return n}return}class ni extends Rl.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(J.MAP,e);this.items=[]}static from(e,t,s){let{keepUndefined:n,replacer:i}=s,r=new this(e),o=(a,l)=>{if(typeof i==="function")l=i.call(t,a,l);else if(Array.isArray(i)&&!i.includes(a))return;if(l!==void 0||n)r.items.push(pt.createPair(a,l,s))};if(t instanceof Map)for(let[a,l]of t)o(a,l);else if(t&&typeof t==="object")for(let a of Object.keys(t))o(a,t[a]);if(typeof e.sortMapEntries==="function")r.items.sort(e.sortMapEntries);return r}add(e,t){let s;if(J.isPair(e))s=e;else if(!e||typeof e!=="object"||!("key"in e))s=new pt.Pair(e,e?.value);else s=new pt.Pair(e.key,e.value);let n=Ee(this.items,s.key),i=this.schema?.sortMapEntries;if(n){if(!t)throw Error(`Key ${s.key} already set`);if(J.isScalar(n.value)&&Bl.isScalarValue(s.value))n.value.value=s.value;else n.value=s.value}else if(i){let r=this.items.findIndex((o)=>i(s,o)<0);if(r===-1)this.items.push(s);else this.items.splice(r,0,s)}else this.items.push(s)}delete(e){let t=Ee(this.items,e);if(!t)return!1;return this.items.splice(this.items.indexOf(t),1).length>0}get(e,t){let n=Ee(this.items,e)?.value;return(!t&&J.isScalar(n)?n.value:n)??void 0}has(e){return!!Ee(this.items,e)}set(e,t){this.add(new pt.Pair(e,t),!0)}toJSON(e,t,s){let n=s?new s:t?.mapAsMap?new Map:{};if(t?.onCreate)t.onCreate(n);for(let i of this.items)Dl.addPairToJSMap(t,n,i);return n}toString(e,t,s){if(!e)return JSON.stringify(this);for(let n of this.items)if(!J.isPair(n))throw Error(`Map items must all be pairs; found ${JSON.stringify(n)} instead`);if(!e.allNullValues&&this.hasAllNullValues(!1))e=Object.assign({},e,{allNullValues:!0});return _l.stringifyCollection(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:s,onComment:t})}}jl.YAMLMap=ni;jl.findPair=Ee});var fe=y(function(Vl){var Ul=A(),ii=z(),Yl={collection:"map",default:!0,nodeClass:ii.YAMLMap,tag:"tag:yaml.org,2002:map",resolve(e,t){if(!Ul.isMap(e))t("Expected a mapping for this tag");return e},createNode:(e,t,s)=>ii.YAMLMap.from(e,t,s)};Vl.map=Yl});var W=y(function(Xl){var Jl=Ce(),zl=Zt(),Wl=tt(),mt=A(),Gl=L(),Ql=U();class ri extends Wl.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(mt.SEQ,e);this.items=[]}add(e){this.items.push(e)}delete(e){let t=ht(e);if(typeof t!=="number")return!1;return this.items.splice(t,1).length>0}get(e,t){let s=ht(e);if(typeof s!=="number")return;let n=this.items[s];return!t&&mt.isScalar(n)?n.value:n}has(e){let t=ht(e);return typeof t==="number"&&t<this.items.length}set(e,t){let s=ht(e);if(typeof s!=="number")throw Error(`Expected a valid index, not ${e}.`);let n=this.items[s];if(mt.isScalar(n)&&Gl.isScalarValue(t))n.value=t;else this.items[s]=t}toJSON(e,t){let s=[];if(t?.onCreate)t.onCreate(s);let n=0;for(let i of this.items)s.push(Ql.toJS(i,String(n++),t));return s}toString(e,t,s){if(!e)return JSON.stringify(this);return zl.stringifyCollection(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:s,onComment:t})}static from(e,t,s){let{replacer:n}=s,i=new this(e);if(t&&Symbol.iterator in Object(t)){let r=0;for(let o of t){if(typeof n==="function"){let a=t instanceof Set?o:String(r++);o=n.call(t,a,o)}i.items.push(Jl.createNode(o,void 0,s))}}return i}}function ht(e){let t=mt.isScalar(e)?e.value:e;if(t&&typeof t==="string")t=Number(t);return typeof t==="number"&&Number.isInteger(t)&&t>=0?t:null}Xl.YAMLSeq=ri});var de=y(function(sc){var ec=A(),oi=W(),tc={collection:"seq",default:!0,nodeClass:oi.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve(e,t){if(!ec.isSeq(e))t("Expected a sequence for this tag");return e},createNode:(e,t,s)=>oi.YAMLSeq.from(e,t,s)};sc.seq=tc});var qe=y(function(oc){var ic=Oe(),rc={identify:(e)=>typeof e==="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:(e)=>e,stringify(e,t,s,n){return t=Object.assign({actualString:!0},t),ic.stringifyString(e,t,s,n)}};oc.string=rc});var gt=y(function(lc){var ai=L(),li={identify:(e)=>e==null,createNode:()=>new ai.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new ai.Scalar(null),stringify:({source:e},t)=>typeof e==="string"&&li.test.test(e)?e:t.options.nullStr};lc.nullTag=li});var es=y(function(fc){var uc=L(),ci={identify:(e)=>typeof e==="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:(e)=>new uc.Scalar(e[0]==="t"||e[0]==="T"),stringify({source:e,value:t},s){if(e&&ci.test.test(e)){let n=e[0]==="t"||e[0]==="T";if(t===n)return e}return t?s.options.trueStr:s.options.falseStr}};fc.boolTag=ci});var pe=y(function(hc){function pc({format:e,minFractionDigits:t,tag:s,value:n}){if(typeof n==="bigint")return String(n);let i=typeof n==="number"?n:Number(n);if(!isFinite(i))return isNaN(i)?".nan":i<0?"-.inf":".inf";let r=Object.is(n,-0)?"-0":JSON.stringify(n);if(!e&&t&&(!s||s==="tag:yaml.org,2002:float")&&/^-?\d/.test(r)&&!r.includes("e")){let o=r.indexOf(".");if(o<0)o=r.length,r+=".";let a=t-(r.length-o-1);while(a-- >0)r+="0"}return r}hc.stringifyNumber=pc});var ss=y(function(Sc){var gc=L(),ts=pe(),yc={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:ts.stringifyNumber},bc={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){let t=Number(e.value);return isFinite(t)?t.toExponential():ts.stringifyNumber(e)}},wc={identify:(e)=>typeof e==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(e){let t=new gc.Scalar(parseFloat(e)),s=e.indexOf(".");if(s!==-1&&e[e.length-1]==="0")t.minFractionDigits=e.length-s-1;return t},stringify:ts.stringifyNumber};Sc.float=wc;Sc.floatExp=bc;Sc.floatNaN=yc});var is=y(function(Lc){var ui=pe(),yt=(e)=>typeof e==="bigint"||Number.isInteger(e),ns=(e,t,s,{intAsBigInt:n})=>n?BigInt(e):parseInt(e.substring(t),s);function fi(e,t,s){let{value:n}=e;if(yt(n)&&n>=0)return s+n.toString(t);return ui.stringifyNumber(e)}var Nc={identify:(e)=>yt(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,s)=>ns(e,2,8,s),stringify:(e)=>fi(e,8,"0o")},Ac={identify:yt,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,s)=>ns(e,0,10,s),stringify:ui.stringifyNumber},Oc={identify:(e)=>yt(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,s)=>ns(e,2,16,s),stringify:(e)=>fi(e,16,"0x")};Lc.int=Ac;Lc.intHex=Oc;Lc.intOct=Nc});var di=y(function(Dc){var Ic=fe(),Tc=gt(),$c=de(),Mc=qe(),xc=es(),rs=ss(),os=is(),_c=[Ic.map,$c.seq,Mc.string,Tc.nullTag,xc.boolTag,os.intOct,os.int,os.intHex,rs.floatNaN,rs.floatExp,rs.float];Dc.schema=_c});var hi=y(function(Vc){var Bc=L(),jc=fe(),Kc=de();function pi(e){return typeof e==="bigint"||Number.isInteger(e)}var bt=({value:e})=>JSON.stringify(e),Fc=[{identify:(e)=>typeof e==="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:(e)=>e,stringify:bt},{identify:(e)=>e==null,createNode:()=>new Bc.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:bt},{identify:(e)=>typeof e==="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:(e)=>e==="true",stringify:bt},{identify:pi,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:s})=>s?BigInt(e):parseInt(e,10),stringify:({value:e})=>pi(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:bt}],Uc={default:!0,tag:"",test:/^/,resolve(e,t){return t(`Unresolved plain scalar ${JSON.stringify(e)}`),e}},Yc=[jc.map,Kc.seq].concat(Fc,Uc);Vc.schema=Yc});var ls=y(function(Wc){var Ie=Ue("buffer"),as=L(),Jc=Oe(),zc={identify:(e)=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(e,t){if(typeof Ie.Buffer==="function")return Ie.Buffer.from(e,"base64");else if(typeof atob==="function"){let s=atob(e.replace(/[\n\r]/g,"")),n=new Uint8Array(s.length);for(let i=0;i<s.length;++i)n[i]=s.charCodeAt(i);return n}else return t("This environment does not support reading binary tags; either Buffer or atob is required"),e},stringify({comment:e,type:t,value:s},n,i,r){if(!s)return"";let o=s,a;if(typeof Ie.Buffer==="function")a=o instanceof Ie.Buffer?o.toString("base64"):Ie.Buffer.from(o.buffer).toString("base64");else if(typeof btoa==="function"){let l="";for(let c=0;c<o.length;++c)l+=String.fromCharCode(o[c]);a=btoa(l)}else throw Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(t??(t=as.Scalar.BLOCK_LITERAL),t!==as.Scalar.QUOTE_DOUBLE){let l=Math.max(n.options.lineWidth-n.indent.length,n.options.minContentWidth),c=Math.ceil(a.length/l),d=Array(c);for(let u=0,f=0;u<c;++u,f+=l)d[u]=a.substr(f,l);a=d.join(t===as.Scalar.BLOCK_LITERAL?`
53
+ `:" ")}return Jc.stringifyString({comment:e,type:t,value:a},n,i,r)}};Wc.binary=zc});var St=y(function(eu){var wt=A(),cs=H(),Qc=L(),Xc=W();function mi(e,t){if(wt.isSeq(e))for(let s=0;s<e.items.length;++s){let n=e.items[s];if(wt.isPair(n))continue;else if(wt.isMap(n)){if(n.items.length>1)t("Each pair must have its own sequence indicator");let i=n.items[0]||new cs.Pair(new Qc.Scalar(null));if(n.commentBefore)i.key.commentBefore=i.key.commentBefore?`${n.commentBefore}
54
+ ${i.key.commentBefore}`:n.commentBefore;if(n.comment){let r=i.value??i.key;r.comment=r.comment?`${n.comment}
55
+ ${r.comment}`:n.comment}n=i}e.items[s]=wt.isPair(n)?n:new cs.Pair(n)}else t("Expected a sequence for this tag");return e}function gi(e,t,s){let{replacer:n}=s,i=new Xc.YAMLSeq(e);i.tag="tag:yaml.org,2002:pairs";let r=0;if(t&&Symbol.iterator in Object(t))for(let o of t){if(typeof n==="function")o=n.call(t,String(r++),o);let a,l;if(Array.isArray(o))if(o.length===2)a=o[0],l=o[1];else throw TypeError(`Expected [key, value] tuple: ${o}`);else if(o&&o instanceof Object){let c=Object.keys(o);if(c.length===1)a=c[0],l=o[a];else throw TypeError(`Expected tuple with one key, not ${c.length} keys`)}else a=o;i.items.push(cs.createPair(a,l,s))}return i}var Zc={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:mi,createNode:gi};eu.createPairs=gi;eu.pairs=Zc;eu.resolvePairs=mi});var fs=y(function(ou){var yi=A(),us=U(),Te=z(),iu=W(),bi=St();class te extends iu.YAMLSeq{constructor(){super();this.add=Te.YAMLMap.prototype.add.bind(this),this.delete=Te.YAMLMap.prototype.delete.bind(this),this.get=Te.YAMLMap.prototype.get.bind(this),this.has=Te.YAMLMap.prototype.has.bind(this),this.set=Te.YAMLMap.prototype.set.bind(this),this.tag=te.tag}toJSON(e,t){if(!t)return super.toJSON(e);let s=new Map;if(t?.onCreate)t.onCreate(s);for(let n of this.items){let i,r;if(yi.isPair(n))i=us.toJS(n.key,"",t),r=us.toJS(n.value,i,t);else i=us.toJS(n,"",t);if(s.has(i))throw Error("Ordered maps must not include duplicate keys");s.set(i,r)}return s}static from(e,t,s){let n=bi.createPairs(e,t,s),i=new this;return i.items=n.items,i}}te.tag="tag:yaml.org,2002:omap";var ru={collection:"seq",identify:(e)=>e instanceof Map,nodeClass:te,default:!1,tag:"tag:yaml.org,2002:omap",resolve(e,t){let s=bi.resolvePairs(e,t),n=[];for(let{key:i}of s.items)if(yi.isScalar(i))if(n.includes(i.value))t(`Ordered maps must not include duplicate keys: ${i.value}`);else n.push(i.value);return Object.assign(new te,s)},createNode:(e,t,s)=>te.from(e,t,s)};ou.YAMLOMap=te;ou.omap=ru});var Ci=y(function(cu){var wi=L();function Si({value:e,source:t},s){if(t&&(e?vi:ki).test.test(t))return t;return e?s.options.trueStr:s.options.falseStr}var vi={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 wi.Scalar(!0),stringify:Si},ki={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 wi.Scalar(!1),stringify:Si};cu.falseTag=ki;cu.trueTag=vi});var Ni=y(function(gu){var du=L(),ds=pe(),pu={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:ds.stringifyNumber},hu={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){let t=Number(e.value);return isFinite(t)?t.toExponential():ds.stringifyNumber(e)}},mu={identify:(e)=>typeof e==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(e){let t=new du.Scalar(parseFloat(e.replace(/_/g,""))),s=e.indexOf(".");if(s!==-1){let n=e.substring(s+1).replace(/_/g,"");if(n[n.length-1]==="0")t.minFractionDigits=n.length}return t},stringify:ds.stringifyNumber};gu.float=mu;gu.floatExp=hu;gu.floatNaN=pu});var Oi=y(function(Nu){var Ai=pe(),$e=(e)=>typeof e==="bigint"||Number.isInteger(e);function vt(e,t,s,{intAsBigInt:n}){let i=e[0];if(i==="-"||i==="+")t+=1;if(e=e.substring(t).replace(/_/g,""),n){switch(s){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`;break}let o=BigInt(e);return i==="-"?BigInt(-1)*o:o}let r=parseInt(e,s);return i==="-"?-1*r:r}function ps(e,t,s){let{value:n}=e;if($e(n)){let i=n.toString(t);return n<0?"-"+s+i.substr(1):s+i}return Ai.stringifyNumber(e)}var Su={identify:$e,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,s)=>vt(e,2,2,s),stringify:(e)=>ps(e,2,"0b")},vu={identify:$e,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,s)=>vt(e,1,8,s),stringify:(e)=>ps(e,8,"0")},ku={identify:$e,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,s)=>vt(e,0,10,s),stringify:Ai.stringifyNumber},Cu={identify:$e,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,s)=>vt(e,2,16,s),stringify:(e)=>ps(e,16,"0x")};Nu.int=ku;Nu.intBin=Su;Nu.intHex=Cu;Nu.intOct=vu});var hs=y(function(qu){var Nt=A(),kt=H(),Ct=z();class se extends Ct.YAMLMap{constructor(e){super(e);this.tag=se.tag}add(e){let t;if(Nt.isPair(e))t=e;else if(e&&typeof e==="object"&&"key"in e&&"value"in e&&e.value===null)t=new kt.Pair(e.key,null);else t=new kt.Pair(e,null);if(!Ct.findPair(this.items,t.key))this.items.push(t)}get(e,t){let s=Ct.findPair(this.items,e);return!t&&Nt.isPair(s)?Nt.isScalar(s.key)?s.key.value:s.key:s}set(e,t){if(typeof t!=="boolean")throw Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);let s=Ct.findPair(this.items,e);if(s&&!t)this.items.splice(this.items.indexOf(s),1);else if(!s&&t)this.items.push(new kt.Pair(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,s){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,s);else throw Error("Set items must all have null values")}static from(e,t,s){let{replacer:n}=s,i=new this(e);if(t&&Symbol.iterator in Object(t))for(let r of t){if(typeof n==="function")r=n.call(t,r,r);i.items.push(kt.createPair(r,null,s))}return i}}se.tag="tag:yaml.org,2002:set";var Eu={collection:"map",identify:(e)=>e instanceof Set,nodeClass:se,default:!1,tag:"tag:yaml.org,2002:set",createNode:(e,t,s)=>se.from(e,t,s),resolve(e,t){if(Nt.isMap(e))if(e.hasAllNullValues(!0))return Object.assign(new se,e);else t("Set items must all have null values");else t("Expected a mapping for this tag");return e}};qu.YAMLSet=se;qu.set=Eu});var gs=y(function(_u){var $u=pe();function ms(e,t){let s=e[0],n=s==="-"||s==="+"?e.substring(1):e,i=(o)=>t?BigInt(o):Number(o),r=n.replace(/_/g,"").split(":").reduce((o,a)=>o*i(60)+i(a),i(0));return s==="-"?i(-1)*r:r}function Li(e){let{value:t}=e,s=(o)=>o;if(typeof t==="bigint")s=(o)=>BigInt(o);else if(isNaN(t)||!isFinite(t))return $u.stringifyNumber(e);let n="";if(t<0)n="-",t*=s(-1);let i=s(60),r=[t%i];if(t<60)r.unshift(0);else if(t=(t-r[0])/i,r.unshift(t%i),t>=60)t=(t-r[0])/i,r.unshift(t);return n+r.map((o)=>String(o).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}var Mu={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:s})=>ms(e,s),stringify:Li},xu={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)=>ms(e,!1),stringify:Li},Pi={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){let t=e.match(Pi.test);if(!t)throw Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,s,n,i,r,o,a]=t.map(Number),l=t[7]?Number((t[7]+"00").substr(1,3)):0,c=Date.UTC(s,n-1,i,r||0,o||0,a||0,l),d=t[8];if(d&&d!=="Z"){let u=ms(d,!1);if(Math.abs(u)<30)u*=60;c-=60000*u}return new Date(c)},stringify:({value:e})=>e?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};_u.floatTime=xu;_u.intTime=Mu;_u.timestamp=Pi});var qi=y(function(Gu){var ju=fe(),Ku=gt(),Fu=de(),Uu=qe(),Yu=ls(),Ei=Ci(),ys=Ni(),At=Oi(),Vu=lt(),Hu=fs(),Ju=St(),zu=hs(),bs=gs(),Wu=[ju.map,Fu.seq,Uu.string,Ku.nullTag,Ei.trueTag,Ei.falseTag,At.intBin,At.intOct,At.int,At.intHex,ys.floatNaN,ys.floatExp,ys.float,Yu.binary,Vu.merge,Hu.omap,Ju.pairs,zu.set,bs.intTime,bs.floatTime,bs.timestamp];Gu.schema=Wu});var ji=y(function(of){var Mi=fe(),Xu=gt(),xi=de(),Zu=qe(),ef=es(),ws=ss(),Ss=is(),tf=di(),sf=hi(),_i=ls(),Me=lt(),Di=fs(),Ri=St(),Ii=qi(),Bi=hs(),Ot=gs(),Ti=new Map([["core",tf.schema],["failsafe",[Mi.map,xi.seq,Zu.string]],["json",sf.schema],["yaml11",Ii.schema],["yaml-1.1",Ii.schema]]),$i={binary:_i.binary,bool:ef.boolTag,float:ws.float,floatExp:ws.floatExp,floatNaN:ws.floatNaN,floatTime:Ot.floatTime,int:Ss.int,intHex:Ss.intHex,intOct:Ss.intOct,intTime:Ot.intTime,map:Mi.map,merge:Me.merge,null:Xu.nullTag,omap:Di.omap,pairs:Ri.pairs,seq:xi.seq,set:Bi.set,timestamp:Ot.timestamp},nf={"tag:yaml.org,2002:binary":_i.binary,"tag:yaml.org,2002:merge":Me.merge,"tag:yaml.org,2002:omap":Di.omap,"tag:yaml.org,2002:pairs":Ri.pairs,"tag:yaml.org,2002:set":Bi.set,"tag:yaml.org,2002:timestamp":Ot.timestamp};function rf(e,t,s){let n=Ti.get(t);if(n&&!e)return s&&!n.includes(Me.merge)?n.concat(Me.merge):n.slice();let i=n;if(!i)if(Array.isArray(e))i=[];else{let r=Array.from(Ti.keys()).filter((o)=>o!=="yaml11").map((o)=>JSON.stringify(o)).join(", ");throw Error(`Unknown schema "${t}"; use one of ${r} or define customTags array`)}if(Array.isArray(e))for(let r of e)i=i.concat(r);else if(typeof e==="function")i=e(i.slice());if(s)i=i.concat(Me.merge);return i.reduce((r,o)=>{let a=typeof o==="string"?$i[o]:o;if(!a){let l=JSON.stringify(o),c=Object.keys($i).map((d)=>JSON.stringify(d)).join(", ");throw Error(`Unknown custom tag ${l}; use one of ${c}`)}if(!r.includes(a))r.push(a);return r},[])}of.coreKnownTags=nf;of.getTags=rf});var Cs=y(function(pf){var vs=A(),cf=fe(),uf=de(),ff=qe(),Lt=ji(),df=(e,t)=>e.key<t.key?-1:e.key>t.key?1:0;class ks{constructor({compat:e,customTags:t,merge:s,resolveKnownTags:n,schema:i,sortMapEntries:r,toStringDefaults:o}){this.compat=Array.isArray(e)?Lt.getTags(e,"compat"):e?Lt.getTags(null,e):null,this.name=typeof i==="string"&&i||"core",this.knownTags=n?Lt.coreKnownTags:{},this.tags=Lt.getTags(t,this.name,s),this.toStringOptions=o??null,Object.defineProperty(this,vs.MAP,{value:cf.map}),Object.defineProperty(this,vs.SCALAR,{value:ff.string}),Object.defineProperty(this,vs.SEQ,{value:uf.seq}),this.sortMapEntries=typeof r==="function"?r:r===!0?df:null}clone(){let e=Object.create(ks.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}}pf.Schema=ks});var Ki=y(function(yf){var mf=A(),Ns=Le(),xe=Ne();function gf(e,t){let s=[],n=t.directives===!0;if(t.directives!==!1&&e.directives){let l=e.directives.toString(e);if(l)s.push(l),n=!0;else if(e.directives.docStart)n=!0}if(n)s.push("---");let i=Ns.createStringifyContext(e,t),{commentString:r}=i.options;if(e.commentBefore){if(s.length!==1)s.unshift("");let l=r(e.commentBefore);s.unshift(xe.indentComment(l,""))}let o=!1,a=null;if(e.contents){if(mf.isNode(e.contents)){if(e.contents.spaceBefore&&n)s.push("");if(e.contents.commentBefore){let d=r(e.contents.commentBefore);s.push(xe.indentComment(d,""))}i.forceBlockIndent=!!e.comment,a=e.contents.comment}let l=a?void 0:()=>o=!0,c=Ns.stringify(e.contents,i,()=>a=null,l);if(a)c+=xe.lineComment(c,"",r(a));if((c[0]==="|"||c[0]===">")&&s[s.length-1]==="---")s[s.length-1]=`--- ${c}`;else s.push(c)}else s.push(Ns.stringify(e.contents,i));if(e.directives?.docEnd)if(e.comment){let l=r(e.comment);if(l.includes(`
56
+ `))s.push("..."),s.push(xe.indentComment(l,""));else s.push(`... ${l}`)}else s.push("...");else{let l=e.comment;if(l&&o)l=l.replace(/^\n+/,"");if(l){if((!o||a)&&s[s.length-1]!=="")s.push("");s.push(xe.indentComment(r(l),""))}}return s.join(`
57
57
  `)+`
58
- `}k4.stringifyDocument=x4});var E0=O((c4)=>{var m4=w0(),D0=r0(),E=M(),p4=l(),d4=m(),l4=Oq(),a4=WU(),Yq=s0(),s4=h$(),i4=V0(),wq=y$();class Vq{constructor($,q,U){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,E.NODE_TYPE,{value:E.DOC});let H=null;if(typeof q==="function"||Array.isArray(q))H=q;else if(U===void 0&&q)U=q,q=void 0;let z=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},U);this.options=z;let{version:X}=z;if(U?._directives){if(this.directives=U._directives.atDocument(),this.directives.yaml.explicit)X=this.directives.yaml.version}else this.directives=new wq.Directives({version:X});this.setSchema(X,U),this.contents=$===void 0?null:this.createNode($,H,U)}clone(){let $=Object.create(Vq.prototype,{[E.NODE_TYPE]:{value:E.DOC}});if($.commentBefore=this.commentBefore,$.comment=this.comment,$.errors=this.errors.slice(),$.warnings=this.warnings.slice(),$.options=Object.assign({},this.options),this.directives)$.directives=this.directives.clone();if($.schema=this.schema.clone(),$.contents=E.isNode(this.contents)?this.contents.clone($.schema):this.contents,this.range)$.range=this.range.slice();return $}add($){if(B0(this.contents))this.contents.add($)}addIn($,q){if(B0(this.contents))this.contents.addIn($,q)}createAlias($,q){if(!$.anchor){let U=Yq.anchorNames(this);$.anchor=!q||U.has(q)?Yq.findNewAnchor(q||"a",U):q}return new m4.Alias($.anchor)}createNode($,q,U){let H=void 0;if(typeof q==="function")$=q.call({"":$},"",$),H=q;else if(Array.isArray(q)){let D=(w)=>typeof w==="number"||w instanceof String||w instanceof Number,B=q.filter(D).map(String);if(B.length>0)q=q.concat(B);H=q}else if(U===void 0&&q)U=q,q=void 0;let{aliasDuplicateObjects:z,anchorPrefix:X,flow:L,keepUndefined:Z,onTagObj:R,tag:G}=U??{},{onAnchor:I,setAnchors:J,sourceObjects:Q}=Yq.createNodeAnchors(this,X||"a"),T={aliasDuplicateObjects:z??!0,keepUndefined:Z??!1,onAnchor:I,onTagObj:R,replacer:H,schema:this.schema,sourceObjects:Q},P=i4.createNode($,G,T);if(L&&E.isCollection(P))P.flow=!0;return J(),P}createPair($,q,U={}){let H=this.createNode($,null,U),z=this.createNode(q,null,U);return new p4.Pair(H,z)}delete($){return B0(this.contents)?this.contents.delete($):!1}deleteIn($){if(D0.isEmptyPath($)){if(this.contents==null)return!1;return this.contents=null,!0}return B0(this.contents)?this.contents.deleteIn($):!1}get($,q){return E.isCollection(this.contents)?this.contents.get($,q):void 0}getIn($,q){if(D0.isEmptyPath($))return!q&&E.isScalar(this.contents)?this.contents.value:this.contents;return E.isCollection(this.contents)?this.contents.getIn($,q):void 0}has($){return E.isCollection(this.contents)?this.contents.has($):!1}hasIn($){if(D0.isEmptyPath($))return this.contents!==void 0;return E.isCollection(this.contents)?this.contents.hasIn($):!1}set($,q){if(this.contents==null)this.contents=D0.collectionFromPath(this.schema,[$],q);else if(B0(this.contents))this.contents.set($,q)}setIn($,q){if(D0.isEmptyPath($))this.contents=q;else if(this.contents==null)this.contents=D0.collectionFromPath(this.schema,Array.from($),q);else if(B0(this.contents))this.contents.setIn($,q)}setSchema($,q={}){if(typeof $==="number")$=String($);let U;switch($){case"1.1":if(this.directives)this.directives.yaml.version="1.1";else this.directives=new wq.Directives({version:"1.1"});U={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":if(this.directives)this.directives.yaml.version=$;else this.directives=new wq.Directives({version:$});U={resolveKnownTags:!0,schema:"core"};break;case null:if(this.directives)delete this.directives;U=null;break;default:{let H=JSON.stringify($);throw Error(`Expected '1.1', '1.2' or null as first argument, but found: ${H}`)}}if(q.schema instanceof Object)this.schema=q.schema;else if(U)this.schema=new l4.Schema(Object.assign(U,q));else throw Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:$,jsonArg:q,mapAsMap:U,maxAliasCount:H,onAnchor:z,reviver:X}={}){let L={anchors:new Map,doc:this,keep:!$,mapAsMap:U===!0,mapKeyWarned:!1,maxAliasCount:typeof H==="number"?H:100},Z=d4.toJS(this.contents,q??"",L);if(typeof z==="function")for(let{count:R,res:G}of L.anchors.values())z(G,R);return typeof X==="function"?s4.applyReviver(X,{"":Z},"",Z):Z}toJSON($,q){return this.toJS({json:!0,jsonArg:$,mapAsMap:!1,onAnchor:q})}toString($={}){if(this.errors.length>0)throw Error("Document with errors cannot be stringified");if("indent"in $&&(!Number.isInteger($.indent)||Number($.indent)<=0)){let q=JSON.stringify($.indent);throw Error(`"indent" option must be a positive integer, not ${q}`)}return a4.stringifyDocument(this,$)}}function B0($){if(E.isCollection($))return!0;throw Error("Expected a YAML collection as document contents")}c4.Document=Vq});var g0=O((o4)=>{class W$ extends Error{constructor($,q,U,H){super();this.name=$,this.code=U,this.message=H,this.pos=q}}class FU extends W${constructor($,q,U){super("YAMLParseError",$,q,U)}}class AU extends W${constructor($,q,U){super("YAMLWarning",$,q,U)}}var n4=($,q)=>(U)=>{if(U.pos[0]===-1)return;U.linePos=U.pos.map((Z)=>q.linePos(Z));let{line:H,col:z}=U.linePos[0];U.message+=` at line ${H}, column ${z}`;let X=z-1,L=$.substring(q.lineStarts[H-1],q.lineStarts[H]).replace(/[\n\r]+$/,"");if(X>=60&&L.length>80){let Z=Math.min(X-39,L.length-79);L="\u2026"+L.substring(Z),X-=Z-1}if(L.length>80)L=L.substring(0,79)+"\u2026";if(H>1&&/^ *$/.test(L.substring(0,X))){let Z=$.substring(q.lineStarts[H-2],q.lineStarts[H-1]);if(Z.length>80)Z=Z.substring(0,79)+`\u2026
59
- `;L=Z+L}if(/[^ ]/.test(L)){let Z=1,R=U.linePos[1];if(R?.line===H&&R.col>z)Z=Math.max(1,Math.min(R.col-z,80-X));let G=" ".repeat(X)+"^".repeat(Z);U.message+=`:
58
+ `}yf.stringifyDocument=gf});var _e=y(function(Of){var wf=ke(),he=tt(),x=A(),Sf=H(),vf=U(),kf=Cs(),Cf=Ki(),As=Xe(),Nf=Yt(),Af=Ce(),Os=Ut();class Ls{constructor(e,t,s){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,x.NODE_TYPE,{value:x.DOC});let n=null;if(typeof t==="function"||Array.isArray(t))n=t;else if(s===void 0&&t)s=t,t=void 0;let i=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},s);this.options=i;let{version:r}=i;if(s?._directives){if(this.directives=s._directives.atDocument(),this.directives.yaml.explicit)r=this.directives.yaml.version}else this.directives=new Os.Directives({version:r});this.setSchema(r,s),this.contents=e===void 0?null:this.createNode(e,n,s)}clone(){let e=Object.create(Ls.prototype,{[x.NODE_TYPE]:{value:x.DOC}});if(e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives)e.directives=this.directives.clone();if(e.schema=this.schema.clone(),e.contents=x.isNode(this.contents)?this.contents.clone(e.schema):this.contents,this.range)e.range=this.range.slice();return e}add(e){if(me(this.contents))this.contents.add(e)}addIn(e,t){if(me(this.contents))this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){let s=As.anchorNames(this);e.anchor=!t||s.has(t)?As.findNewAnchor(t||"a",s):t}return new wf.Alias(e.anchor)}createNode(e,t,s){let n=void 0;if(typeof t==="function")e=t.call({"":e},"",e),n=t;else if(Array.isArray(t)){let p=(w)=>typeof w==="number"||w instanceof String||w instanceof Number,h=t.filter(p).map(String);if(h.length>0)t=t.concat(h);n=t}else if(s===void 0&&t)s=t,t=void 0;let{aliasDuplicateObjects:i,anchorPrefix:r,flow:o,keepUndefined:a,onTagObj:l,tag:c}=s??{},{onAnchor:d,setAnchors:u,sourceObjects:f}=As.createNodeAnchors(this,r||"a"),m={aliasDuplicateObjects:i??!0,keepUndefined:a??!1,onAnchor:d,onTagObj:l,replacer:n,schema:this.schema,sourceObjects:f},g=Af.createNode(e,c,m);if(o&&x.isCollection(g))g.flow=!0;return u(),g}createPair(e,t,s={}){let n=this.createNode(e,null,s),i=this.createNode(t,null,s);return new Sf.Pair(n,i)}delete(e){return me(this.contents)?this.contents.delete(e):!1}deleteIn(e){if(he.isEmptyPath(e)){if(this.contents==null)return!1;return this.contents=null,!0}return me(this.contents)?this.contents.deleteIn(e):!1}get(e,t){return x.isCollection(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){if(he.isEmptyPath(e))return!t&&x.isScalar(this.contents)?this.contents.value:this.contents;return x.isCollection(this.contents)?this.contents.getIn(e,t):void 0}has(e){return x.isCollection(this.contents)?this.contents.has(e):!1}hasIn(e){if(he.isEmptyPath(e))return this.contents!==void 0;return x.isCollection(this.contents)?this.contents.hasIn(e):!1}set(e,t){if(this.contents==null)this.contents=he.collectionFromPath(this.schema,[e],t);else if(me(this.contents))this.contents.set(e,t)}setIn(e,t){if(he.isEmptyPath(e))this.contents=t;else if(this.contents==null)this.contents=he.collectionFromPath(this.schema,Array.from(e),t);else if(me(this.contents))this.contents.setIn(e,t)}setSchema(e,t={}){if(typeof e==="number")e=String(e);let s;switch(e){case"1.1":if(this.directives)this.directives.yaml.version="1.1";else this.directives=new Os.Directives({version:"1.1"});s={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":if(this.directives)this.directives.yaml.version=e;else this.directives=new Os.Directives({version:e});s={resolveKnownTags:!0,schema:"core"};break;case null:if(this.directives)delete this.directives;s=null;break;default:{let n=JSON.stringify(e);throw Error(`Expected '1.1', '1.2' or null as first argument, but found: ${n}`)}}if(t.schema instanceof Object)this.schema=t.schema;else if(s)this.schema=new kf.Schema(Object.assign(s,t));else throw Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:t,mapAsMap:s,maxAliasCount:n,onAnchor:i,reviver:r}={}){let o={anchors:new Map,doc:this,keep:!e,mapAsMap:s===!0,mapKeyWarned:!1,maxAliasCount:typeof n==="number"?n:100},a=vf.toJS(this.contents,t??"",o);if(typeof i==="function")for(let{count:l,res:c}of o.anchors.values())i(c,l);return typeof r==="function"?Nf.applyReviver(r,{"":a},"",a):a}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){let t=JSON.stringify(e.indent);throw Error(`"indent" option must be a positive integer, not ${t}`)}return Cf.stringifyDocument(this,e)}}function me(e){if(x.isCollection(e))return!0;throw Error("Expected a YAML collection as document contents")}Of.Document=Ls});var De=y(function(Ef){class Pt extends Error{constructor(e,t,s,n){super();this.name=e,this.code=s,this.message=n,this.pos=t}}class Fi extends Pt{constructor(e,t,s){super("YAMLParseError",e,t,s)}}class Ui extends Pt{constructor(e,t,s){super("YAMLWarning",e,t,s)}}var Pf=(e,t)=>(s)=>{if(s.pos[0]===-1)return;s.linePos=s.pos.map((a)=>t.linePos(a));let{line:n,col:i}=s.linePos[0];s.message+=` at line ${n}, column ${i}`;let r=i-1,o=e.substring(t.lineStarts[n-1],t.lineStarts[n]).replace(/[\n\r]+$/,"");if(r>=60&&o.length>80){let a=Math.min(r-39,o.length-79);o="\u2026"+o.substring(a),r-=a-1}if(o.length>80)o=o.substring(0,79)+"\u2026";if(n>1&&/^ *$/.test(o.substring(0,r))){let a=e.substring(t.lineStarts[n-2],t.lineStarts[n-1]);if(a.length>80)a=a.substring(0,79)+`\u2026
59
+ `;o=a+o}if(/[^ ]/.test(o)){let a=1,l=s.linePos[1];if(l?.line===n&&l.col>i)a=Math.max(1,Math.min(l.col-i,80-r));let c=" ".repeat(r)+"^".repeat(a);s.message+=`:
60
60
 
61
- ${L}
62
- ${G}
63
- `}};o4.YAMLError=W$;o4.YAMLParseError=FU;o4.YAMLWarning=AU;o4.prettifyError=n4});var u0=O((H3)=>{function U3($,{flow:q,indicator:U,next:H,offset:z,onError:X,parentIndent:L,startOnNewline:Z}){let R=!1,G=Z,I=Z,J="",Q="",T=!1,P=!1,D=null,B=null,w=null,V=null,_=null,W=null,F=null;for(let Y of $){if(P){if(Y.type!=="space"&&Y.type!=="newline"&&Y.type!=="comma")X(Y.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space");P=!1}if(D){if(G&&Y.type!=="comment"&&Y.type!=="newline")X(D,"TAB_AS_INDENT","Tabs are not allowed as indentation");D=null}switch(Y.type){case"space":if(!q&&(U!=="doc-start"||H?.type!=="flow-collection")&&Y.source.includes("\t"))D=Y;I=!0;break;case"comment":{if(!I)X(Y,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let N=Y.source.substring(1)||" ";if(!J)J=N;else J+=Q+N;Q="",G=!1;break}case"newline":if(G){if(J)J+=Y.source;else if(!W||U!=="seq-item-ind")R=!0}else Q+=Y.source;if(G=!0,T=!0,B||w)V=Y;I=!0;break;case"anchor":if(B)X(Y,"MULTIPLE_ANCHORS","A node can have at most one anchor");if(Y.source.endsWith(":"))X(Y.offset+Y.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0);B=Y,F??(F=Y.offset),G=!1,I=!1,P=!0;break;case"tag":{if(w)X(Y,"MULTIPLE_TAGS","A node can have at most one tag");w=Y,F??(F=Y.offset),G=!1,I=!1,P=!0;break}case U:if(B||w)X(Y,"BAD_PROP_ORDER",`Anchors and tags must be after the ${Y.source} indicator`);if(W)X(Y,"UNEXPECTED_TOKEN",`Unexpected ${Y.source} in ${q??"collection"}`);W=Y,G=U==="seq-item-ind"||U==="explicit-key-ind",I=!1;break;case"comma":if(q){if(_)X(Y,"UNEXPECTED_TOKEN",`Unexpected , in ${q}`);_=Y,G=!1,I=!1;break}default:X(Y,"UNEXPECTED_TOKEN",`Unexpected ${Y.type} token`),G=!1,I=!1}}let A=$[$.length-1],K=A?A.offset+A.source.length:z;if(P&&H&&H.type!=="space"&&H.type!=="newline"&&H.type!=="comma"&&(H.type!=="scalar"||H.source!==""))X(H.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space");if(D&&(G&&D.indent<=L||H?.type==="block-map"||H?.type==="block-seq"))X(D,"TAB_AS_INDENT","Tabs are not allowed as indentation");return{comma:_,found:W,spaceBefore:R,comment:J,hasNewline:T,anchor:B,tag:w,newlineAfterProp:V,end:K,start:F??K}}H3.resolveProps=U3});var F$=O((X3)=>{function _q($){if(!$)return null;switch($.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if($.source.includes(`
64
- `))return!0;if($.end){for(let q of $.end)if(q.type==="newline")return!0}return!1;case"flow-collection":for(let q of $.items){for(let U of q.start)if(U.type==="newline")return!0;if(q.sep){for(let U of q.sep)if(U.type==="newline")return!0}if(_q(q.key)||_q(q.value))return!0}return!1;default:return!0}}X3.containsNewline=_q});var Wq=O((G3)=>{var Z3=F$();function R3($,q,U){if(q?.type==="flow-collection"){let H=q.end[0];if(H.indent===$&&(H.source==="]"||H.source==="}")&&Z3.containsNewline(q))U(H,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}G3.flowIndentCheck=R3});var Fq=O((Q3)=>{var MU=M();function I3($,q,U){let{uniqueKeys:H}=$.options;if(H===!1)return!1;let z=typeof H==="function"?H:(X,L)=>X===L||MU.isScalar(X)&&MU.isScalar(L)&&X.value===L.value;return q.some((X)=>z(X.key,U))}Q3.mapIncludes=I3});var CU=O((Y3)=>{var KU=l(),B3=s(),bU=u0(),T3=F$(),NU=Wq(),O3=Fq(),SU="All mapping items must start at the same column";function P3({composeNode:$,composeEmptyNode:q},U,H,z,X){let Z=new(X?.nodeClass??B3.YAMLMap)(U.schema);if(U.atRoot)U.atRoot=!1;let R=H.offset,G=null;for(let I of H.items){let{start:J,key:Q,sep:T,value:P}=I,D=bU.resolveProps(J,{indicator:"explicit-key-ind",next:Q??T?.[0],offset:R,onError:z,parentIndent:H.indent,startOnNewline:!0}),B=!D.found;if(B){if(Q){if(Q.type==="block-seq")z(R,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key");else if("indent"in Q&&Q.indent!==H.indent)z(R,"BAD_INDENT",SU)}if(!D.anchor&&!D.tag&&!T){if(G=D.end,D.comment)if(Z.comment)Z.comment+=`
65
- `+D.comment;else Z.comment=D.comment;continue}if(D.newlineAfterProp||T3.containsNewline(Q))z(Q??J[J.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else if(D.found?.indent!==H.indent)z(R,"BAD_INDENT",SU);U.atKey=!0;let w=D.end,V=Q?$(U,Q,D,z):q(U,w,J,null,D,z);if(U.schema.compat)NU.flowIndentCheck(H.indent,Q,z);if(U.atKey=!1,O3.mapIncludes(U,Z.items,V))z(w,"DUPLICATE_KEY","Map keys must be unique");let _=bU.resolveProps(T??[],{indicator:"map-value-ind",next:P,offset:V.range[2],onError:z,parentIndent:H.indent,startOnNewline:!Q||Q.type==="block-scalar"});if(R=_.end,_.found){if(B){if(P?.type==="block-map"&&!_.hasNewline)z(R,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings");if(U.options.strict&&D.start<_.found.offset-1024)z(V.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key")}let W=P?$(U,P,_,z):q(U,R,T,null,_,z);if(U.schema.compat)NU.flowIndentCheck(H.indent,P,z);R=W.range[2];let F=new KU.Pair(V,W);if(U.options.keepSourceTokens)F.srcToken=I;Z.items.push(F)}else{if(B)z(V.range,"MISSING_CHAR","Implicit map keys need to be followed by map values");if(_.comment)if(V.comment)V.comment+=`
66
- `+_.comment;else V.comment=_.comment;let W=new KU.Pair(V);if(U.options.keepSourceTokens)W.srcToken=I;Z.items.push(W)}}if(G&&G<R)z(G,"IMPOSSIBLE","Map comment with trailing content");return Z.range=[H.offset,R,G??R],Z}Y3.resolveBlockMap=P3});var jU=O((A3)=>{var V3=i(),_3=u0(),W3=Wq();function F3({composeNode:$,composeEmptyNode:q},U,H,z,X){let Z=new(X?.nodeClass??V3.YAMLSeq)(U.schema);if(U.atRoot)U.atRoot=!1;if(U.atKey)U.atKey=!1;let R=H.offset,G=null;for(let{start:I,value:J}of H.items){let Q=_3.resolveProps(I,{indicator:"seq-item-ind",next:J,offset:R,onError:z,parentIndent:H.indent,startOnNewline:!0});if(!Q.found)if(Q.anchor||Q.tag||J)if(J?.type==="block-seq")z(Q.end,"BAD_INDENT","All sequence items must start at the same column");else z(R,"MISSING_CHAR","Sequence item without - indicator");else{if(G=Q.end,Q.comment)Z.comment=Q.comment;continue}let T=J?$(U,J,Q,z):q(U,Q.end,I,null,Q,z);if(U.schema.compat)W3.flowIndentCheck(H.indent,J,z);R=T.range[2],Z.items.push(T)}return Z.range=[H.offset,R,G??R],Z}A3.resolveBlockSeq=F3});var T0=O((b3)=>{function K3($,q,U,H){let z="";if($){let X=!1,L="";for(let Z of $){let{source:R,type:G}=Z;switch(G){case"space":X=!0;break;case"comment":{if(U&&!X)H(Z,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let I=R.substring(1)||" ";if(!z)z=I;else z+=L+I;L="";break}case"newline":if(z)L+=R;X=!0;break;default:H(Z,"UNEXPECTED_TOKEN",`Unexpected ${G} at node end`)}q+=R.length}}return{comment:z,offset:q}}b3.resolveEnd=K3});var gU=O((y3)=>{var S3=M(),C3=l(),fU=s(),j3=i(),f3=T0(),EU=u0(),E3=F$(),g3=Fq(),Aq="Block collections are not allowed within flow collections",Mq=($)=>$&&($.type==="block-map"||$.type==="block-seq");function u3({composeNode:$,composeEmptyNode:q},U,H,z,X){let L=H.start.source==="{",Z=L?"flow map":"flow sequence",G=new(X?.nodeClass??(L?fU.YAMLMap:j3.YAMLSeq))(U.schema);G.flow=!0;let I=U.atRoot;if(I)U.atRoot=!1;if(U.atKey)U.atKey=!1;let J=H.offset+H.start.source.length;for(let B=0;B<H.items.length;++B){let w=H.items[B],{start:V,key:_,sep:W,value:F}=w,A=EU.resolveProps(V,{flow:Z,indicator:"explicit-key-ind",next:_??W?.[0],offset:J,onError:z,parentIndent:H.indent,startOnNewline:!1});if(!A.found){if(!A.anchor&&!A.tag&&!W&&!F){if(B===0&&A.comma)z(A.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${Z}`);else if(B<H.items.length-1)z(A.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${Z}`);if(A.comment)if(G.comment)G.comment+=`
67
- `+A.comment;else G.comment=A.comment;J=A.end;continue}if(!L&&U.options.strict&&E3.containsNewline(_))z(_,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(B===0){if(A.comma)z(A.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${Z}`)}else{if(!A.comma)z(A.start,"MISSING_CHAR",`Missing , between ${Z} items`);if(A.comment){let K="";$:for(let Y of V)switch(Y.type){case"comma":case"space":break;case"comment":K=Y.source.substring(1);break $;default:break $}if(K){let Y=G.items[G.items.length-1];if(S3.isPair(Y))Y=Y.value??Y.key;if(Y.comment)Y.comment+=`
68
- `+K;else Y.comment=K;A.comment=A.comment.substring(K.length+1)}}}if(!L&&!W&&!A.found){let K=F?$(U,F,A,z):q(U,A.end,W,null,A,z);if(G.items.push(K),J=K.range[2],Mq(F))z(K.range,"BLOCK_IN_FLOW",Aq)}else{U.atKey=!0;let K=A.end,Y=_?$(U,_,A,z):q(U,K,V,null,A,z);if(Mq(_))z(Y.range,"BLOCK_IN_FLOW",Aq);U.atKey=!1;let N=EU.resolveProps(W??[],{flow:Z,indicator:"map-value-ind",next:F,offset:Y.range[2],onError:z,parentIndent:H.indent,startOnNewline:!1});if(N.found){if(!L&&!A.found&&U.options.strict){if(W)for(let S of W){if(S===N.found)break;if(S.type==="newline"){z(S,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}if(A.start<N.found.offset-1024)z(N.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else if(F)if("source"in F&&F.source?.[0]===":")z(F,"MISSING_CHAR",`Missing space after : in ${Z}`);else z(N.start,"MISSING_CHAR",`Missing , or : between ${Z} items`);let v=F?$(U,F,N,z):N.found?q(U,N.end,W,null,N,z):null;if(v){if(Mq(F))z(v.range,"BLOCK_IN_FLOW",Aq)}else if(N.comment)if(Y.comment)Y.comment+=`
69
- `+N.comment;else Y.comment=N.comment;let z0=new C3.Pair(Y,v);if(U.options.keepSourceTokens)z0.srcToken=w;if(L){let S=G;if(g3.mapIncludes(U,S.items,Y))z(K,"DUPLICATE_KEY","Map keys must be unique");S.items.push(z0)}else{let S=new fU.YAMLMap(U.schema);S.flow=!0,S.items.push(z0);let iq=(v??Y).range;S.range=[Y.range[0],iq[1],iq[2]],G.items.push(S)}J=v?v.range[2]:N.end}}let Q=L?"}":"]",[T,...P]=H.end,D=J;if(T?.source===Q)D=T.offset+T.source.length;else{let B=Z[0].toUpperCase()+Z.substring(1),w=I?`${B} must end with a ${Q}`:`${B} in block collection must be sufficiently indented and end with a ${Q}`;if(z(J,I?"MISSING_CHAR":"BAD_INDENT",w),T&&T.source.length!==1)P.unshift(T)}if(P.length>0){let B=f3.resolveEnd(P,D,U.options.strict,z);if(B.comment)if(G.comment)G.comment+=`
70
- `+B.comment;else G.comment=B.comment;G.range=[H.offset,D,B.offset]}else G.range=[H.offset,D,D];return G}y3.resolveFlowCollection=u3});var uU=O((s3)=>{var x3=M(),k3=b(),v3=s(),m3=i(),p3=CU(),d3=jU(),l3=gU();function Kq($,q,U,H,z,X){let L=U.type==="block-map"?p3.resolveBlockMap($,q,U,H,X):U.type==="block-seq"?d3.resolveBlockSeq($,q,U,H,X):l3.resolveFlowCollection($,q,U,H,X),Z=L.constructor;if(z==="!"||z===Z.tagName)return L.tag=Z.tagName,L;if(z)L.tag=z;return L}function a3($,q,U,H,z){let X=H.tag,L=!X?null:q.directives.tagName(X.source,(Q)=>z(X,"TAG_RESOLVE_FAILED",Q));if(U.type==="block-seq"){let{anchor:Q,newlineAfterProp:T}=H,P=Q&&X?Q.offset>X.offset?Q:X:Q??X;if(P&&(!T||T.offset<P.offset))z(P,"MISSING_CHAR","Missing newline after block sequence props")}let Z=U.type==="block-map"?"map":U.type==="block-seq"?"seq":U.start.source==="{"?"map":"seq";if(!X||!L||L==="!"||L===v3.YAMLMap.tagName&&Z==="map"||L===m3.YAMLSeq.tagName&&Z==="seq")return Kq($,q,U,z,L);let R=q.schema.tags.find((Q)=>Q.tag===L&&Q.collection===Z);if(!R){let Q=q.schema.knownTags[L];if(Q?.collection===Z)q.schema.tags.push(Object.assign({},Q,{default:!1})),R=Q;else{if(Q)z(X,"BAD_COLLECTION_TYPE",`${Q.tag} used for ${Z} collection, but expects ${Q.collection??"scalar"}`,!0);else z(X,"TAG_RESOLVE_FAILED",`Unresolved tag: ${L}`,!0);return Kq($,q,U,z,L)}}let G=Kq($,q,U,z,L,R),I=R.resolve?.(G,(Q)=>z(X,"TAG_RESOLVE_FAILED",Q),q.options)??G,J=x3.isNode(I)?I:new k3.Scalar(I);if(J.range=G.range,J.tag=L,R?.format)J.format=R.format;return J}s3.composeCollection=a3});var Nq=O((o3)=>{var bq=b();function c3($,q,U){let H=q.offset,z=r3(q,$.options.strict,U);if(!z)return{value:"",type:null,comment:"",range:[H,H,H]};let X=z.mode===">"?bq.Scalar.BLOCK_FOLDED:bq.Scalar.BLOCK_LITERAL,L=q.source?n3(q.source):[],Z=L.length;for(let D=L.length-1;D>=0;--D){let B=L[D][1];if(B===""||B==="\r")Z=D;else break}if(Z===0){let D=z.chomp==="+"&&L.length>0?`
71
- `.repeat(Math.max(1,L.length-1)):"",B=H+z.length;if(q.source)B+=q.source.length;return{value:D,type:X,comment:z.comment,range:[H,B,B]}}let R=q.indent+z.indent,G=q.offset+z.length,I=0;for(let D=0;D<Z;++D){let[B,w]=L[D];if(w===""||w==="\r"){if(z.indent===0&&B.length>R)R=B.length}else{if(B.length<R)U(G+B.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator");if(z.indent===0)R=B.length;if(I=D,R===0&&!$.atRoot)U(G,"BAD_INDENT","Block scalar values in collections must be indented");break}G+=B.length+w.length+1}for(let D=L.length-1;D>=Z;--D)if(L[D][0].length>R)Z=D+1;let J="",Q="",T=!1;for(let D=0;D<I;++D)J+=L[D][0].slice(R)+`
72
- `;for(let D=I;D<Z;++D){let[B,w]=L[D];G+=B.length+w.length+1;let V=w[w.length-1]==="\r";if(V)w=w.slice(0,-1);if(w&&B.length<R){let W=`Block scalar lines must not be less indented than their ${z.indent?"explicit indentation indicator":"first line"}`;U(G-w.length-(V?2:1),"BAD_INDENT",W),B=""}if(X===bq.Scalar.BLOCK_LITERAL)J+=Q+B.slice(R)+w,Q=`
73
- `;else if(B.length>R||w[0]==="\t"){if(Q===" ")Q=`
74
- `;else if(!T&&Q===`
75
- `)Q=`
61
+ ${o}
62
+ ${c}
63
+ `}};Ef.YAMLError=Pt;Ef.YAMLParseError=Fi;Ef.YAMLWarning=Ui;Ef.prettifyError=Pf});var Re=y(function(xf){function Mf(e,{flow:t,indicator:s,next:n,offset:i,onError:r,parentIndent:o,startOnNewline:a}){let l=!1,c=a,d=a,u="",f="",m=!1,g=!1,p=null,h=null,w=null,S=null,v=null,k=null,C=null;for(let b of e){if(g){if(b.type!=="space"&&b.type!=="newline"&&b.type!=="comma")r(b.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space");g=!1}if(p){if(c&&b.type!=="comment"&&b.type!=="newline")r(p,"TAB_AS_INDENT","Tabs are not allowed as indentation");p=null}switch(b.type){case"space":if(!t&&(s!=="doc-start"||n?.type!=="flow-collection")&&b.source.includes("\t"))p=b;d=!0;break;case"comment":{if(!d)r(b,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let P=b.source.substring(1)||" ";if(!u)u=P;else u+=f+P;f="",c=!1;break}case"newline":if(c){if(u)u+=b.source;else if(!k||s!=="seq-item-ind")l=!0}else f+=b.source;if(c=!0,m=!0,h||w)S=b;d=!0;break;case"anchor":if(h)r(b,"MULTIPLE_ANCHORS","A node can have at most one anchor");if(b.source.endsWith(":"))r(b.offset+b.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0);h=b,C??(C=b.offset),c=!1,d=!1,g=!0;break;case"tag":{if(w)r(b,"MULTIPLE_TAGS","A node can have at most one tag");w=b,C??(C=b.offset),c=!1,d=!1,g=!0;break}case s:if(h||w)r(b,"BAD_PROP_ORDER",`Anchors and tags must be after the ${b.source} indicator`);if(k)r(b,"UNEXPECTED_TOKEN",`Unexpected ${b.source} in ${t??"collection"}`);k=b,c=s==="seq-item-ind"||s==="explicit-key-ind",d=!1;break;case"comma":if(t){if(v)r(b,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`);v=b,c=!1,d=!1;break}default:r(b,"UNEXPECTED_TOKEN",`Unexpected ${b.type} token`),c=!1,d=!1}}let N=e[e.length-1],O=N?N.offset+N.source.length:i;if(g&&n&&n.type!=="space"&&n.type!=="newline"&&n.type!=="comma"&&(n.type!=="scalar"||n.source!==""))r(n.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space");if(p&&(c&&p.indent<=o||n?.type==="block-map"||n?.type==="block-seq"))r(p,"TAB_AS_INDENT","Tabs are not allowed as indentation");return{comma:v,found:k,spaceBefore:l,comment:u,hasNewline:m,anchor:h,tag:w,newlineAfterProp:S,end:O,start:C??O}}xf.resolveProps=Mf});var Et=y(function(Df){function Ps(e){if(!e)return null;switch(e.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(e.source.includes(`
64
+ `))return!0;if(e.end){for(let t of e.end)if(t.type==="newline")return!0}return!1;case"flow-collection":for(let t of e.items){for(let s of t.start)if(s.type==="newline")return!0;if(t.sep){for(let s of t.sep)if(s.type==="newline")return!0}if(Ps(t.key)||Ps(t.value))return!0}return!1;default:return!0}}Df.containsNewline=Ps});var Es=y(function(Kf){var Bf=Et();function jf(e,t,s){if(t?.type==="flow-collection"){let n=t.end[0];if(n.indent===e&&(n.source==="]"||n.source==="}")&&Bf.containsNewline(t))s(n,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}Kf.flowIndentCheck=jf});var qs=y(function(Yf){var Yi=A();function Uf(e,t,s){let{uniqueKeys:n}=e.options;if(n===!1)return!1;let i=typeof n==="function"?n:(r,o)=>r===o||Yi.isScalar(r)&&Yi.isScalar(o)&&r.value===o.value;return t.some((r)=>i(r.key,s))}Yf.mapIncludes=Uf});var Wi=y(function(Gf){var Vi=H(),Hf=z(),Hi=Re(),Jf=Et(),Ji=Es(),zf=qs(),zi="All mapping items must start at the same column";function Wf({composeNode:e,composeEmptyNode:t},s,n,i,r){let a=new(r?.nodeClass??Hf.YAMLMap)(s.schema);if(s.atRoot)s.atRoot=!1;let l=n.offset,c=null;for(let d of n.items){let{start:u,key:f,sep:m,value:g}=d,p=Hi.resolveProps(u,{indicator:"explicit-key-ind",next:f??m?.[0],offset:l,onError:i,parentIndent:n.indent,startOnNewline:!0}),h=!p.found;if(h){if(f){if(f.type==="block-seq")i(l,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key");else if("indent"in f&&f.indent!==n.indent)i(l,"BAD_INDENT",zi)}if(!p.anchor&&!p.tag&&!m){if(c=p.end,p.comment)if(a.comment)a.comment+=`
65
+ `+p.comment;else a.comment=p.comment;continue}if(p.newlineAfterProp||Jf.containsNewline(f))i(f??u[u.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else if(p.found?.indent!==n.indent)i(l,"BAD_INDENT",zi);s.atKey=!0;let w=p.end,S=f?e(s,f,p,i):t(s,w,u,null,p,i);if(s.schema.compat)Ji.flowIndentCheck(n.indent,f,i);if(s.atKey=!1,zf.mapIncludes(s,a.items,S))i(w,"DUPLICATE_KEY","Map keys must be unique");let v=Hi.resolveProps(m??[],{indicator:"map-value-ind",next:g,offset:S.range[2],onError:i,parentIndent:n.indent,startOnNewline:!f||f.type==="block-scalar"});if(l=v.end,v.found){if(h){if(g?.type==="block-map"&&!v.hasNewline)i(l,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings");if(s.options.strict&&p.start<v.found.offset-1024)i(S.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key")}let k=g?e(s,g,v,i):t(s,l,m,null,v,i);if(s.schema.compat)Ji.flowIndentCheck(n.indent,g,i);l=k.range[2];let C=new Vi.Pair(S,k);if(s.options.keepSourceTokens)C.srcToken=d;a.items.push(C)}else{if(h)i(S.range,"MISSING_CHAR","Implicit map keys need to be followed by map values");if(v.comment)if(S.comment)S.comment+=`
66
+ `+v.comment;else S.comment=v.comment;let k=new Vi.Pair(S);if(s.options.keepSourceTokens)k.srcToken=d;a.items.push(k)}}if(c&&c<l)i(c,"IMPOSSIBLE","Map comment with trailing content");return a.range=[n.offset,l,c??l],a}Gf.resolveBlockMap=Wf});var Gi=y(function(sd){var Xf=W(),Zf=Re(),ed=Es();function td({composeNode:e,composeEmptyNode:t},s,n,i,r){let a=new(r?.nodeClass??Xf.YAMLSeq)(s.schema);if(s.atRoot)s.atRoot=!1;if(s.atKey)s.atKey=!1;let l=n.offset,c=null;for(let{start:d,value:u}of n.items){let f=Zf.resolveProps(d,{indicator:"seq-item-ind",next:u,offset:l,onError:i,parentIndent:n.indent,startOnNewline:!0});if(!f.found)if(f.anchor||f.tag||u)if(u?.type==="block-seq")i(f.end,"BAD_INDENT","All sequence items must start at the same column");else i(l,"MISSING_CHAR","Sequence item without - indicator");else{if(c=f.end,f.comment)a.comment=f.comment;continue}let m=u?e(s,u,f,i):t(s,f.end,d,null,f,i);if(s.schema.compat)ed.flowIndentCheck(n.indent,u,i);l=m.range[2],a.items.push(m)}return a.range=[n.offset,l,c??l],a}sd.resolveBlockSeq=td});var ge=y(function(rd){function id(e,t,s,n){let i="";if(e){let r=!1,o="";for(let a of e){let{source:l,type:c}=a;switch(c){case"space":r=!0;break;case"comment":{if(s&&!r)n(a,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let d=l.substring(1)||" ";if(!i)i=d;else i+=o+d;o="";break}case"newline":if(i)o+=l;r=!0;break;default:n(a,"UNEXPECTED_TOKEN",`Unexpected ${c} at node end`)}t+=l.length}}return{comment:i,offset:t}}rd.resolveEnd=id});var Zi=y(function(hd){var ad=A(),ld=H(),Qi=z(),cd=W(),ud=ge(),Xi=Re(),fd=Et(),dd=qs(),Is="Block collections are not allowed within flow collections",Ts=(e)=>e&&(e.type==="block-map"||e.type==="block-seq");function pd({composeNode:e,composeEmptyNode:t},s,n,i,r){let o=n.start.source==="{",a=o?"flow map":"flow sequence",c=new(r?.nodeClass??(o?Qi.YAMLMap:cd.YAMLSeq))(s.schema);c.flow=!0;let d=s.atRoot;if(d)s.atRoot=!1;if(s.atKey)s.atKey=!1;let u=n.offset+n.start.source.length;for(let h=0;h<n.items.length;++h){let w=n.items[h],{start:S,key:v,sep:k,value:C}=w,N=Xi.resolveProps(S,{flow:a,indicator:"explicit-key-ind",next:v??k?.[0],offset:u,onError:i,parentIndent:n.indent,startOnNewline:!1});if(!N.found){if(!N.anchor&&!N.tag&&!k&&!C){if(h===0&&N.comma)i(N.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`);else if(h<n.items.length-1)i(N.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${a}`);if(N.comment)if(c.comment)c.comment+=`
67
+ `+N.comment;else c.comment=N.comment;u=N.end;continue}if(!o&&s.options.strict&&fd.containsNewline(v))i(v,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(h===0){if(N.comma)i(N.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`)}else{if(!N.comma)i(N.start,"MISSING_CHAR",`Missing , between ${a} items`);if(N.comment){let O="";e:for(let b of S)switch(b.type){case"comma":case"space":break;case"comment":O=b.source.substring(1);break e;default:break e}if(O){let b=c.items[c.items.length-1];if(ad.isPair(b))b=b.value??b.key;if(b.comment)b.comment+=`
68
+ `+O;else b.comment=O;N.comment=N.comment.substring(O.length+1)}}}if(!o&&!k&&!N.found){let O=C?e(s,C,N,i):t(s,N.end,k,null,N,i);if(c.items.push(O),u=O.range[2],Ts(C))i(O.range,"BLOCK_IN_FLOW",Is)}else{s.atKey=!0;let O=N.end,b=v?e(s,v,N,i):t(s,O,S,null,N,i);if(Ts(v))i(b.range,"BLOCK_IN_FLOW",Is);s.atKey=!1;let P=Xi.resolveProps(k??[],{flow:a,indicator:"map-value-ind",next:C,offset:b.range[2],onError:i,parentIndent:n.indent,startOnNewline:!1});if(P.found){if(!o&&!N.found&&s.options.strict){if(k)for(let E of k){if(E===P.found)break;if(E.type==="newline"){i(E,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}if(N.start<P.found.offset-1024)i(P.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else if(C)if("source"in C&&C.source?.[0]===":")i(C,"MISSING_CHAR",`Missing space after : in ${a}`);else i(P.start,"MISSING_CHAR",`Missing , or : between ${a} items`);let F=C?e(s,C,P,i):P.found?t(s,P.end,k,null,P,i):null;if(F){if(Ts(C))i(F.range,"BLOCK_IN_FLOW",Is)}else if(P.comment)if(b.comment)b.comment+=`
69
+ `+P.comment;else b.comment=P.comment;let oe=new ld.Pair(b,F);if(s.options.keepSourceTokens)oe.srcToken=w;if(o){let E=c;if(dd.mapIncludes(s,E.items,b))i(O,"DUPLICATE_KEY","Map keys must be unique");E.items.push(oe)}else{let E=new Qi.YAMLMap(s.schema);E.flow=!0,E.items.push(oe);let en=(F??b).range;E.range=[b.range[0],en[1],en[2]],c.items.push(E)}u=F?F.range[2]:P.end}}let f=o?"}":"]",[m,...g]=n.end,p=u;if(m?.source===f)p=m.offset+m.source.length;else{let h=a[0].toUpperCase()+a.substring(1),w=d?`${h} must end with a ${f}`:`${h} in block collection must be sufficiently indented and end with a ${f}`;if(i(u,d?"MISSING_CHAR":"BAD_INDENT",w),m&&m.source.length!==1)g.unshift(m)}if(g.length>0){let h=ud.resolveEnd(g,p,s.options.strict,i);if(h.comment)if(c.comment)c.comment+=`
70
+ `+h.comment;else c.comment=h.comment;c.range=[n.offset,p,h.offset]}else c.range=[n.offset,p,p];return c}hd.resolveFlowCollection=pd});var er=y(function(Nd){var gd=A(),yd=L(),bd=z(),wd=W(),Sd=Wi(),vd=Gi(),kd=Zi();function $s(e,t,s,n,i,r){let o=s.type==="block-map"?Sd.resolveBlockMap(e,t,s,n,r):s.type==="block-seq"?vd.resolveBlockSeq(e,t,s,n,r):kd.resolveFlowCollection(e,t,s,n,r),a=o.constructor;if(i==="!"||i===a.tagName)return o.tag=a.tagName,o;if(i)o.tag=i;return o}function Cd(e,t,s,n,i){let r=n.tag,o=!r?null:t.directives.tagName(r.source,(f)=>i(r,"TAG_RESOLVE_FAILED",f));if(s.type==="block-seq"){let{anchor:f,newlineAfterProp:m}=n,g=f&&r?f.offset>r.offset?f:r:f??r;if(g&&(!m||m.offset<g.offset))i(g,"MISSING_CHAR","Missing newline after block sequence props")}let a=s.type==="block-map"?"map":s.type==="block-seq"?"seq":s.start.source==="{"?"map":"seq";if(!r||!o||o==="!"||o===bd.YAMLMap.tagName&&a==="map"||o===wd.YAMLSeq.tagName&&a==="seq")return $s(e,t,s,i,o);let l=t.schema.tags.find((f)=>f.tag===o&&f.collection===a);if(!l){let f=t.schema.knownTags[o];if(f?.collection===a)t.schema.tags.push(Object.assign({},f,{default:!1})),l=f;else{if(f)i(r,"BAD_COLLECTION_TYPE",`${f.tag} used for ${a} collection, but expects ${f.collection??"scalar"}`,!0);else i(r,"TAG_RESOLVE_FAILED",`Unresolved tag: ${o}`,!0);return $s(e,t,s,i,o)}}let c=$s(e,t,s,i,o,l),d=l.resolve?.(c,(f)=>i(r,"TAG_RESOLVE_FAILED",f),t.options)??c,u=gd.isNode(d)?d:new yd.Scalar(d);if(u.range=c.range,u.tag=o,l?.format)u.format=l.format;return u}Nd.composeCollection=Cd});var xs=y(function(Ed){var Ms=L();function Od(e,t,s){let n=t.offset,i=Ld(t,e.options.strict,s);if(!i)return{value:"",type:null,comment:"",range:[n,n,n]};let r=i.mode===">"?Ms.Scalar.BLOCK_FOLDED:Ms.Scalar.BLOCK_LITERAL,o=t.source?Pd(t.source):[],a=o.length;for(let p=o.length-1;p>=0;--p){let h=o[p][1];if(h===""||h==="\r")a=p;else break}if(a===0){let p=i.chomp==="+"&&o.length>0?`
71
+ `.repeat(Math.max(1,o.length-1)):"",h=n+i.length;if(t.source)h+=t.source.length;return{value:p,type:r,comment:i.comment,range:[n,h,h]}}let l=t.indent+i.indent,c=t.offset+i.length,d=0;for(let p=0;p<a;++p){let[h,w]=o[p];if(w===""||w==="\r"){if(i.indent===0&&h.length>l)l=h.length}else{if(h.length<l)s(c+h.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator");if(i.indent===0)l=h.length;if(d=p,l===0&&!e.atRoot)s(c,"BAD_INDENT","Block scalar values in collections must be indented");break}c+=h.length+w.length+1}for(let p=o.length-1;p>=a;--p)if(o[p][0].length>l)a=p+1;let u="",f="",m=!1;for(let p=0;p<d;++p)u+=o[p][0].slice(l)+`
72
+ `;for(let p=d;p<a;++p){let[h,w]=o[p];c+=h.length+w.length+1;let S=w[w.length-1]==="\r";if(S)w=w.slice(0,-1);if(w&&h.length<l){let k=`Block scalar lines must not be less indented than their ${i.indent?"explicit indentation indicator":"first line"}`;s(c-w.length-(S?2:1),"BAD_INDENT",k),h=""}if(r===Ms.Scalar.BLOCK_LITERAL)u+=f+h.slice(l)+w,f=`
73
+ `;else if(h.length>l||w[0]==="\t"){if(f===" ")f=`
74
+ `;else if(!m&&f===`
75
+ `)f=`
76
76
 
77
- `;J+=Q+B.slice(R)+w,Q=`
78
- `,T=!0}else if(w==="")if(Q===`
79
- `)J+=`
80
- `;else Q=`
81
- `;else J+=Q+w,Q=" ",T=!1}switch(z.chomp){case"-":break;case"+":for(let D=Z;D<L.length;++D)J+=`
82
- `+L[D][0].slice(R);if(J[J.length-1]!==`
83
- `)J+=`
84
- `;break;default:J+=`
85
- `}let P=H+z.length+q.source.length;return{value:J,type:X,comment:z.comment,range:[H,P,P]}}function r3({offset:$,props:q},U,H){if(q[0].type!=="block-scalar-header")return H(q[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:z}=q[0],X=z[0],L=0,Z="",R=-1;for(let Q=1;Q<z.length;++Q){let T=z[Q];if(!Z&&(T==="-"||T==="+"))Z=T;else{let P=Number(T);if(!L&&P)L=P;else if(R===-1)R=$+Q}}if(R!==-1)H(R,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${z}`);let G=!1,I="",J=z.length;for(let Q=1;Q<q.length;++Q){let T=q[Q];switch(T.type){case"space":G=!0;case"newline":J+=T.source.length;break;case"comment":if(U&&!G)H(T,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");J+=T.source.length,I=T.source.substring(1);break;case"error":H(T,"UNEXPECTED_TOKEN",T.message),J+=T.source.length;break;default:{let P=`Unexpected token in block scalar header: ${T.type}`;H(T,"UNEXPECTED_TOKEN",P);let D=T.source;if(D&&typeof D==="string")J+=D.length}}}return{mode:X,indent:L,chomp:Z,comment:I,length:J}}function n3($){let q=$.split(/\n( *)/),U=q[0],H=U.match(/^( *)/),X=[H?.[1]?[H[1],U.slice(H[1].length)]:["",U]];for(let L=1;L<q.length;L+=2)X.push([q[L],q[L+1]]);return X}o3.resolveBlockScalar=c3});var Cq=O((Z8)=>{var Sq=b(),e3=T0();function $8($,q,U){let{offset:H,type:z,source:X,end:L}=$,Z,R,G=(Q,T,P)=>U(H+Q,T,P);switch(z){case"scalar":Z=Sq.Scalar.PLAIN,R=q8(X,G);break;case"single-quoted-scalar":Z=Sq.Scalar.QUOTE_SINGLE,R=U8(X,G);break;case"double-quoted-scalar":Z=Sq.Scalar.QUOTE_DOUBLE,R=H8(X,G);break;default:return U($,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${z}`),{value:"",type:null,comment:"",range:[H,H+X.length,H+X.length]}}let I=H+X.length,J=e3.resolveEnd(L,I,q,U);return{value:R,type:Z,comment:J.comment,range:[H,I,J.offset]}}function q8($,q){let U="";switch($[0]){case"\t":U="a tab character";break;case",":U="flow indicator character ,";break;case"%":U="directive indicator character %";break;case"|":case">":{U=`block scalar indicator ${$[0]}`;break}case"@":case"`":{U=`reserved character ${$[0]}`;break}}if(U)q(0,"BAD_SCALAR_START",`Plain value cannot start with ${U}`);return yU($)}function U8($,q){if($[$.length-1]!=="'"||$.length===1)q($.length,"MISSING_CHAR","Missing closing 'quote");return yU($.slice(1,-1)).replace(/''/g,"'")}function yU($){let q,U;try{q=new RegExp(`(.*?)(?<![ ])[ ]*\r?
86
- `,"sy"),U=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
87
- `,"sy")}catch{q=/(.*?)[ \t]*\r?\n/sy,U=/[ \t]*(.*?)[ \t]*\r?\n/sy}let H=q.exec($);if(!H)return $;let z=H[1],X=" ",L=q.lastIndex;U.lastIndex=L;while(H=U.exec($)){if(H[1]==="")if(X===`
88
- `)z+=X;else X=`
89
- `;else z+=X+H[1],X=" ";L=U.lastIndex}let Z=/[ \t]*(.*)/sy;return Z.lastIndex=L,H=Z.exec($),z+X+(H?.[1]??"")}function H8($,q){let U="";for(let H=1;H<$.length-1;++H){let z=$[H];if(z==="\r"&&$[H+1]===`
90
- `)continue;if(z===`
91
- `){let{fold:X,offset:L}=z8($,H);U+=X,H=L}else if(z==="\\"){let X=$[++H],L=X8[X];if(L)U+=L;else if(X===`
92
- `){X=$[H+1];while(X===" "||X==="\t")X=$[++H+1]}else if(X==="\r"&&$[H+1]===`
93
- `){X=$[++H+1];while(X===" "||X==="\t")X=$[++H+1]}else if(X==="x"||X==="u"||X==="U"){let Z=X==="x"?2:X==="u"?4:8;U+=L8($,H+1,Z,q),H+=Z}else{let Z=$.substr(H-1,2);q(H-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${Z}`),U+=Z}}else if(z===" "||z==="\t"){let X=H,L=$[H+1];while(L===" "||L==="\t")L=$[++H+1];if(L!==`
94
- `&&!(L==="\r"&&$[H+2]===`
95
- `))U+=H>X?$.slice(X,H+1):z}else U+=z}if($[$.length-1]!=='"'||$.length===1)q($.length,"MISSING_CHAR",'Missing closing "quote');return U}function z8($,q){let U="",H=$[q+1];while(H===" "||H==="\t"||H===`
96
- `||H==="\r"){if(H==="\r"&&$[q+2]!==`
97
- `)break;if(H===`
98
- `)U+=`
99
- `;q+=1,H=$[q+1]}if(!U)U=" ";return{fold:U,offset:q}}var X8={"0":"\x00",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
100
- `,r:"\r",t:"\t",v:"\v",N:"\x85",_:"\xA0",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\","\t":"\t"};function L8($,q,U,H){let z=$.substr(q,U),L=z.length===U&&/^[0-9a-fA-F]+$/.test(z)?parseInt(z,16):NaN;try{return String.fromCodePoint(L)}catch{let Z=$.substr(q-2,U+2);return H(q-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${Z}`),Z}}Z8.resolveFlowScalar=$8});var xU=O((B8)=>{var q0=M(),hU=b(),G8=Nq(),J8=Cq();function I8($,q,U,H){let{value:z,type:X,comment:L,range:Z}=q.type==="block-scalar"?G8.resolveBlockScalar($,q,H):J8.resolveFlowScalar(q,$.options.strict,H),R=U?$.directives.tagName(U.source,(J)=>H(U,"TAG_RESOLVE_FAILED",J)):null,G;if($.options.stringKeys&&$.atKey)G=$.schema[q0.SCALAR];else if(R)G=Q8($.schema,z,R,U,H);else if(q.type==="scalar")G=D8($,z,q,H);else G=$.schema[q0.SCALAR];let I;try{let J=G.resolve(z,(Q)=>H(U??q,"TAG_RESOLVE_FAILED",Q),$.options);I=q0.isScalar(J)?J:new hU.Scalar(J)}catch(J){let Q=J instanceof Error?J.message:String(J);H(U??q,"TAG_RESOLVE_FAILED",Q),I=new hU.Scalar(z)}if(I.range=Z,I.source=z,X)I.type=X;if(R)I.tag=R;if(G.format)I.format=G.format;if(L)I.comment=L;return I}function Q8($,q,U,H,z){if(U==="!")return $[q0.SCALAR];let X=[];for(let Z of $.tags)if(!Z.collection&&Z.tag===U)if(Z.default&&Z.test)X.push(Z);else return Z;for(let Z of X)if(Z.test?.test(q))return Z;let L=$.knownTags[U];if(L&&!L.collection)return $.tags.push(Object.assign({},L,{default:!1,test:void 0})),L;return z(H,"TAG_RESOLVE_FAILED",`Unresolved tag: ${U}`,U!=="tag:yaml.org,2002:str"),$[q0.SCALAR]}function D8({atKey:$,directives:q,schema:U},H,z,X){let L=U.tags.find((Z)=>(Z.default===!0||$&&Z.default==="key")&&Z.test?.test(H))||U[q0.SCALAR];if(U.compat){let Z=U.compat.find((R)=>R.default&&R.test?.test(H))??U[q0.SCALAR];if(L.tag!==Z.tag){let R=q.tagString(L.tag),G=q.tagString(Z.tag),I=`Value may be parsed as either ${R} or ${G}`;X(z,"TAG_RESOLVE_FAILED",I,!0)}}return L}B8.composeScalar=I8});var kU=O((P8)=>{function O8($,q,U){if(q){U??(U=q.length);for(let H=U-1;H>=0;--H){let z=q[H];switch(z.type){case"space":case"comment":case"newline":$-=z.source.length;continue}z=q[++H];while(z?.type==="space")$+=z.source.length,z=q[++H];break}}return $}P8.emptyScalarPosition=O8});var pU=O((K8)=>{var w8=w0(),V8=M(),_8=uU(),vU=xU(),W8=T0(),F8=kU(),A8={composeNode:mU,composeEmptyNode:jq};function mU($,q,U,H){let z=$.atKey,{spaceBefore:X,comment:L,anchor:Z,tag:R}=U,G,I=!0;switch(q.type){case"alias":if(G=M8($,q,H),Z||R)H(q,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":if(G=vU.composeScalar($,q,R,H),Z)G.anchor=Z.source.substring(1);break;case"block-map":case"block-seq":case"flow-collection":try{if(G=_8.composeCollection(A8,$,q,U,H),Z)G.anchor=Z.source.substring(1)}catch(J){let Q=J instanceof Error?J.message:String(J);H(q,"RESOURCE_EXHAUSTION",Q)}break;default:{let J=q.type==="error"?q.message:`Unsupported token (type: ${q.type})`;H(q,"UNEXPECTED_TOKEN",J),I=!1}}if(G??(G=jq($,q.offset,void 0,null,U,H)),Z&&G.anchor==="")H(Z,"BAD_ALIAS","Anchor cannot be an empty string");if(z&&$.options.stringKeys&&(!V8.isScalar(G)||typeof G.value!=="string"||G.tag&&G.tag!=="tag:yaml.org,2002:str"))H(R??q,"NON_STRING_KEY","With stringKeys, all keys must be strings");if(X)G.spaceBefore=!0;if(L)if(q.type==="scalar"&&q.source==="")G.comment=L;else G.commentBefore=L;if($.options.keepSourceTokens&&I)G.srcToken=q;return G}function jq($,q,U,H,{spaceBefore:z,comment:X,anchor:L,tag:Z,end:R},G){let I={type:"scalar",offset:F8.emptyScalarPosition(q,U,H),indent:-1,source:""},J=vU.composeScalar($,I,Z,G);if(L){if(J.anchor=L.source.substring(1),J.anchor==="")G(L,"BAD_ALIAS","Anchor cannot be an empty string")}if(z)J.spaceBefore=!0;if(X)J.comment=X,J.range[2]=R;return J}function M8({options:$},{offset:q,source:U,end:H},z){let X=new w8.Alias(U.substring(1));if(X.source==="")z(q,"BAD_ALIAS","Alias cannot be an empty string");if(X.source.endsWith(":"))z(q+U.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let L=q+U.length,Z=W8.resolveEnd(H,L,$.strict,z);if(X.range=[q,L,Z.offset],Z.comment)X.comment=Z.comment;return X}K8.composeEmptyNode=jq;K8.composeNode=mU});var lU=O((E8)=>{var S8=E0(),dU=pU(),C8=T0(),j8=u0();function f8($,q,{offset:U,start:H,value:z,end:X},L){let Z=Object.assign({_directives:q},$),R=new S8.Document(void 0,Z),G={atKey:!1,atRoot:!0,directives:R.directives,options:R.options,schema:R.schema},I=j8.resolveProps(H,{indicator:"doc-start",next:z??X?.[0],offset:U,onError:L,parentIndent:0,startOnNewline:!0});if(I.found){if(R.directives.docStart=!0,z&&(z.type==="block-map"||z.type==="block-seq")&&!I.hasNewline)L(I.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")}R.contents=z?dU.composeNode(G,z,I,L):dU.composeEmptyNode(G,I.end,H,null,I,L);let J=R.contents.range[2],Q=C8.resolveEnd(X,J,!1,L);if(Q.comment)R.comment=Q.comment;return R.range=[U,J,Q.offset],R}E8.composeDoc=f8});var fq=O((v8)=>{var u8=X0("process"),y8=y$(),h8=E0(),y0=g0(),aU=M(),x8=lU(),k8=T0();function h0($){if(typeof $==="number")return[$,$+1];if(Array.isArray($))return $.length===2?$:[$[0],$[1]];let{offset:q,source:U}=$;return[q,q+(typeof U==="string"?U.length:1)]}function sU($){let q="",U=!1,H=!1;for(let z=0;z<$.length;++z){let X=$[z];switch(X[0]){case"#":q+=(q===""?"":H?`
77
+ `;u+=f+h.slice(l)+w,f=`
78
+ `,m=!0}else if(w==="")if(f===`
79
+ `)u+=`
80
+ `;else f=`
81
+ `;else u+=f+w,f=" ",m=!1}switch(i.chomp){case"-":break;case"+":for(let p=a;p<o.length;++p)u+=`
82
+ `+o[p][0].slice(l);if(u[u.length-1]!==`
83
+ `)u+=`
84
+ `;break;default:u+=`
85
+ `}let g=n+i.length+t.source.length;return{value:u,type:r,comment:i.comment,range:[n,g,g]}}function Ld({offset:e,props:t},s,n){if(t[0].type!=="block-scalar-header")return n(t[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:i}=t[0],r=i[0],o=0,a="",l=-1;for(let f=1;f<i.length;++f){let m=i[f];if(!a&&(m==="-"||m==="+"))a=m;else{let g=Number(m);if(!o&&g)o=g;else if(l===-1)l=e+f}}if(l!==-1)n(l,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${i}`);let c=!1,d="",u=i.length;for(let f=1;f<t.length;++f){let m=t[f];switch(m.type){case"space":c=!0;case"newline":u+=m.source.length;break;case"comment":if(s&&!c)n(m,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");u+=m.source.length,d=m.source.substring(1);break;case"error":n(m,"UNEXPECTED_TOKEN",m.message),u+=m.source.length;break;default:{let g=`Unexpected token in block scalar header: ${m.type}`;n(m,"UNEXPECTED_TOKEN",g);let p=m.source;if(p&&typeof p==="string")u+=p.length}}}return{mode:r,indent:o,chomp:a,comment:d,length:u}}function Pd(e){let t=e.split(/\n( *)/),s=t[0],n=s.match(/^( *)/),r=[n?.[1]?[n[1],s.slice(n[1].length)]:["",s]];for(let o=1;o<t.length;o+=2)r.push([t[o],t[o+1]]);return r}Ed.resolveBlockScalar=Od});var Ds=y(function(Bd){var _s=L(),Id=ge();function Td(e,t,s){let{offset:n,type:i,source:r,end:o}=e,a,l,c=(f,m,g)=>s(n+f,m,g);switch(i){case"scalar":a=_s.Scalar.PLAIN,l=$d(r,c);break;case"single-quoted-scalar":a=_s.Scalar.QUOTE_SINGLE,l=Md(r,c);break;case"double-quoted-scalar":a=_s.Scalar.QUOTE_DOUBLE,l=xd(r,c);break;default:return s(e,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${i}`),{value:"",type:null,comment:"",range:[n,n+r.length,n+r.length]}}let d=n+r.length,u=Id.resolveEnd(o,d,t,s);return{value:l,type:a,comment:u.comment,range:[n,d,u.offset]}}function $d(e,t){let s="";switch(e[0]){case"\t":s="a tab character";break;case",":s="flow indicator character ,";break;case"%":s="directive indicator character %";break;case"|":case">":{s=`block scalar indicator ${e[0]}`;break}case"@":case"`":{s=`reserved character ${e[0]}`;break}}if(s)t(0,"BAD_SCALAR_START",`Plain value cannot start with ${s}`);return tr(e)}function Md(e,t){if(e[e.length-1]!=="'"||e.length===1)t(e.length,"MISSING_CHAR","Missing closing 'quote");return tr(e.slice(1,-1)).replace(/''/g,"'")}function tr(e){let t,s;try{t=new RegExp(`(.*?)(?<![ ])[ ]*\r?
86
+ `,"sy"),s=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
87
+ `,"sy")}catch{t=/(.*?)[ \t]*\r?\n/sy,s=/[ \t]*(.*?)[ \t]*\r?\n/sy}let n=t.exec(e);if(!n)return e;let i=n[1],r=" ",o=t.lastIndex;s.lastIndex=o;while(n=s.exec(e)){if(n[1]==="")if(r===`
88
+ `)i+=r;else r=`
89
+ `;else i+=r+n[1],r=" ";o=s.lastIndex}let a=/[ \t]*(.*)/sy;return a.lastIndex=o,n=a.exec(e),i+r+(n?.[1]??"")}function xd(e,t){let s="";for(let n=1;n<e.length-1;++n){let i=e[n];if(i==="\r"&&e[n+1]===`
90
+ `)continue;if(i===`
91
+ `){let{fold:r,offset:o}=_d(e,n);s+=r,n=o}else if(i==="\\"){let r=e[++n],o=Dd[r];if(o)s+=o;else if(r===`
92
+ `){r=e[n+1];while(r===" "||r==="\t")r=e[++n+1]}else if(r==="\r"&&e[n+1]===`
93
+ `){r=e[++n+1];while(r===" "||r==="\t")r=e[++n+1]}else if(r==="x"||r==="u"||r==="U"){let a=r==="x"?2:r==="u"?4:8;s+=Rd(e,n+1,a,t),n+=a}else{let a=e.substr(n-1,2);t(n-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),s+=a}}else if(i===" "||i==="\t"){let r=n,o=e[n+1];while(o===" "||o==="\t")o=e[++n+1];if(o!==`
94
+ `&&!(o==="\r"&&e[n+2]===`
95
+ `))s+=n>r?e.slice(r,n+1):i}else s+=i}if(e[e.length-1]!=='"'||e.length===1)t(e.length,"MISSING_CHAR",'Missing closing "quote');return s}function _d(e,t){let s="",n=e[t+1];while(n===" "||n==="\t"||n===`
96
+ `||n==="\r"){if(n==="\r"&&e[t+2]!==`
97
+ `)break;if(n===`
98
+ `)s+=`
99
+ `;t+=1,n=e[t+1]}if(!s)s=" ";return{fold:s,offset:t}}var Dd={"0":"\x00",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
100
+ `,r:"\r",t:"\t",v:"\v",N:"\x85",_:"\xA0",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\","\t":"\t"};function Rd(e,t,s,n){let i=e.substr(t,s),o=i.length===s&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;try{return String.fromCodePoint(o)}catch{let a=e.substr(t-2,s+2);return n(t-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),a}}Bd.resolveFlowScalar=Td});var nr=y(function(Hd){var ne=A(),sr=L(),Kd=xs(),Fd=Ds();function Ud(e,t,s,n){let{value:i,type:r,comment:o,range:a}=t.type==="block-scalar"?Kd.resolveBlockScalar(e,t,n):Fd.resolveFlowScalar(t,e.options.strict,n),l=s?e.directives.tagName(s.source,(u)=>n(s,"TAG_RESOLVE_FAILED",u)):null,c;if(e.options.stringKeys&&e.atKey)c=e.schema[ne.SCALAR];else if(l)c=Yd(e.schema,i,l,s,n);else if(t.type==="scalar")c=Vd(e,i,t,n);else c=e.schema[ne.SCALAR];let d;try{let u=c.resolve(i,(f)=>n(s??t,"TAG_RESOLVE_FAILED",f),e.options);d=ne.isScalar(u)?u:new sr.Scalar(u)}catch(u){let f=u instanceof Error?u.message:String(u);n(s??t,"TAG_RESOLVE_FAILED",f),d=new sr.Scalar(i)}if(d.range=a,d.source=i,r)d.type=r;if(l)d.tag=l;if(c.format)d.format=c.format;if(o)d.comment=o;return d}function Yd(e,t,s,n,i){if(s==="!")return e[ne.SCALAR];let r=[];for(let a of e.tags)if(!a.collection&&a.tag===s)if(a.default&&a.test)r.push(a);else return a;for(let a of r)if(a.test?.test(t))return a;let o=e.knownTags[s];if(o&&!o.collection)return e.tags.push(Object.assign({},o,{default:!1,test:void 0})),o;return i(n,"TAG_RESOLVE_FAILED",`Unresolved tag: ${s}`,s!=="tag:yaml.org,2002:str"),e[ne.SCALAR]}function Vd({atKey:e,directives:t,schema:s},n,i,r){let o=s.tags.find((a)=>(a.default===!0||e&&a.default==="key")&&a.test?.test(n))||s[ne.SCALAR];if(s.compat){let a=s.compat.find((l)=>l.default&&l.test?.test(n))??s[ne.SCALAR];if(o.tag!==a.tag){let l=t.tagString(o.tag),c=t.tagString(a.tag),d=`Value may be parsed as either ${l} or ${c}`;r(i,"TAG_RESOLVE_FAILED",d,!0)}}return o}Hd.composeScalar=Ud});var ir=y(function(Wd){function zd(e,t,s){if(t){s??(s=t.length);for(let n=s-1;n>=0;--n){let i=t[n];switch(i.type){case"space":case"comment":case"newline":e-=i.source.length;continue}i=t[++n];while(i?.type==="space")e+=i.source.length,i=t[++n];break}}return e}Wd.emptyScalarPosition=zd});var ar=y(function(ip){var Qd=ke(),Xd=A(),Zd=er(),rr=nr(),ep=ge(),tp=ir(),sp={composeNode:or,composeEmptyNode:Rs};function or(e,t,s,n){let i=e.atKey,{spaceBefore:r,comment:o,anchor:a,tag:l}=s,c,d=!0;switch(t.type){case"alias":if(c=np(e,t,n),a||l)n(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":if(c=rr.composeScalar(e,t,l,n),a)c.anchor=a.source.substring(1);break;case"block-map":case"block-seq":case"flow-collection":try{if(c=Zd.composeCollection(sp,e,t,s,n),a)c.anchor=a.source.substring(1)}catch(u){let f=u instanceof Error?u.message:String(u);n(t,"RESOURCE_EXHAUSTION",f)}break;default:{let u=t.type==="error"?t.message:`Unsupported token (type: ${t.type})`;n(t,"UNEXPECTED_TOKEN",u),d=!1}}if(c??(c=Rs(e,t.offset,void 0,null,s,n)),a&&c.anchor==="")n(a,"BAD_ALIAS","Anchor cannot be an empty string");if(i&&e.options.stringKeys&&(!Xd.isScalar(c)||typeof c.value!=="string"||c.tag&&c.tag!=="tag:yaml.org,2002:str"))n(l??t,"NON_STRING_KEY","With stringKeys, all keys must be strings");if(r)c.spaceBefore=!0;if(o)if(t.type==="scalar"&&t.source==="")c.comment=o;else c.commentBefore=o;if(e.options.keepSourceTokens&&d)c.srcToken=t;return c}function Rs(e,t,s,n,{spaceBefore:i,comment:r,anchor:o,tag:a,end:l},c){let d={type:"scalar",offset:tp.emptyScalarPosition(t,s,n),indent:-1,source:""},u=rr.composeScalar(e,d,a,c);if(o){if(u.anchor=o.source.substring(1),u.anchor==="")c(o,"BAD_ALIAS","Anchor cannot be an empty string")}if(i)u.spaceBefore=!0;if(r)u.comment=r,u.range[2]=l;return u}function np({options:e},{offset:t,source:s,end:n},i){let r=new Qd.Alias(s.substring(1));if(r.source==="")i(t,"BAD_ALIAS","Alias cannot be an empty string");if(r.source.endsWith(":"))i(t+s.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let o=t+s.length,a=ep.resolveEnd(n,o,e.strict,i);if(r.range=[t,o,a.offset],a.comment)r.comment=a.comment;return r}ip.composeEmptyNode=Rs;ip.composeNode=or});var cr=y(function(fp){var ap=_e(),lr=ar(),lp=ge(),cp=Re();function up(e,t,{offset:s,start:n,value:i,end:r},o){let a=Object.assign({_directives:t},e),l=new ap.Document(void 0,a),c={atKey:!1,atRoot:!0,directives:l.directives,options:l.options,schema:l.schema},d=cp.resolveProps(n,{indicator:"doc-start",next:i??r?.[0],offset:s,onError:o,parentIndent:0,startOnNewline:!0});if(d.found){if(l.directives.docStart=!0,i&&(i.type==="block-map"||i.type==="block-seq")&&!d.hasNewline)o(d.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")}l.contents=i?lr.composeNode(c,i,d,o):lr.composeEmptyNode(c,d.end,n,null,d,o);let u=l.contents.range[2],f=lp.resolveEnd(r,u,!1,o);if(f.comment)l.comment=f.comment;return l.range=[s,u,f.offset],l}fp.composeDoc=up});var Bs=y(function(bp){var pp=Ue("process"),hp=Ut(),mp=_e(),Be=De(),ur=A(),gp=cr(),yp=ge();function je(e){if(typeof e==="number")return[e,e+1];if(Array.isArray(e))return e.length===2?e:[e[0],e[1]];let{offset:t,source:s}=e;return[t,t+(typeof s==="string"?s.length:1)]}function fr(e){let t="",s=!1,n=!1;for(let i=0;i<e.length;++i){let r=e[i];switch(r[0]){case"#":t+=(t===""?"":n?`
101
101
 
102
102
  `:`
103
- `)+(X.substring(1)||" "),U=!0,H=!1;break;case"%":if($[z+1]?.[0]!=="#")z+=1;U=!1;break;default:if(!U)H=!0;U=!1}}return{comment:q,afterEmptyLine:H}}class iU{constructor($={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(q,U,H,z)=>{let X=h0(q);if(z)this.warnings.push(new y0.YAMLWarning(X,U,H));else this.errors.push(new y0.YAMLParseError(X,U,H))},this.directives=new y8.Directives({version:$.version||"1.2"}),this.options=$}decorate($,q){let{comment:U,afterEmptyLine:H}=sU(this.prelude);if(U){let z=$.contents;if(q)$.comment=$.comment?`${$.comment}
104
- ${U}`:U;else if(H||$.directives.docStart||!z)$.commentBefore=U;else if(aU.isCollection(z)&&!z.flow&&z.items.length>0){let X=z.items[0];if(aU.isPair(X))X=X.key;let L=X.commentBefore;X.commentBefore=L?`${U}
105
- ${L}`:U}else{let X=z.commentBefore;z.commentBefore=X?`${U}
106
- ${X}`:U}}if(q){for(let z=0;z<this.errors.length;++z)$.errors.push(this.errors[z]);for(let z=0;z<this.warnings.length;++z)$.warnings.push(this.warnings[z])}else $.errors=this.errors,$.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:sU(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose($,q=!1,U=-1){for(let H of $)yield*this.next(H);yield*this.end(q,U)}*next($){if(u8.env.LOG_STREAM)console.dir($,{depth:null});switch($.type){case"directive":this.directives.add($.source,(q,U,H)=>{let z=h0($);z[0]+=q,this.onError(z,"BAD_DIRECTIVE",U,H)}),this.prelude.push($.source),this.atDirectives=!0;break;case"document":{let q=x8.composeDoc(this.options,this.directives,$,this.onError);if(this.atDirectives&&!q.directives.docStart)this.onError($,"MISSING_CHAR","Missing directives-end/doc-start indicator line");if(this.decorate(q,!1),this.doc)yield this.doc;this.doc=q,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push($.source);break;case"error":{let q=$.source?`${$.message}: ${JSON.stringify($.source)}`:$.message,U=new y0.YAMLParseError(h0($),"UNEXPECTED_TOKEN",q);if(this.atDirectives||!this.doc)this.errors.push(U);else this.doc.errors.push(U);break}case"doc-end":{if(!this.doc){this.errors.push(new y0.YAMLParseError(h0($),"UNEXPECTED_TOKEN","Unexpected doc-end without preceding document"));break}this.doc.directives.docEnd=!0;let q=k8.resolveEnd($.end,$.offset+$.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),q.comment){let U=this.doc.comment;this.doc.comment=U?`${U}
107
- ${q.comment}`:q.comment}this.doc.range[2]=q.offset;break}default:this.errors.push(new y0.YAMLParseError(h0($),"UNEXPECTED_TOKEN",`Unsupported token ${$.type}`))}}*end($=!1,q=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if($){let U=Object.assign({_directives:this.directives},this.options),H=new h8.Document(void 0,U);if(this.atDirectives)this.onError(q,"MISSING_CHAR","Missing directives-end indicator line");H.range=[0,q,q],this.decorate(H,!1),yield H}}}v8.Composer=iU});var nU=O((r8)=>{var p8=Nq(),d8=Cq(),l8=g0(),cU=F0();function a8($,q=!0,U){if($){let H=(z,X,L)=>{let Z=typeof z==="number"?z:Array.isArray(z)?z[0]:z.offset;if(U)U(Z,X,L);else throw new l8.YAMLParseError([Z,Z+1],X,L)};switch($.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return d8.resolveFlowScalar($,q,H);case"block-scalar":return p8.resolveBlockScalar({options:{strict:q}},$,H)}}return null}function s8($,q){let{implicitKey:U=!1,indent:H,inFlow:z=!1,offset:X=-1,type:L="PLAIN"}=q,Z=cU.stringifyString({type:L,value:$},{implicitKey:U,indent:H>0?" ".repeat(H):"",inFlow:z,options:{blockQuote:!0,lineWidth:-1}}),R=q.end??[{type:"newline",offset:-1,indent:H,source:`
108
- `}];switch(Z[0]){case"|":case">":{let G=Z.indexOf(`
109
- `),I=Z.substring(0,G),J=Z.substring(G+1)+`
110
- `,Q=[{type:"block-scalar-header",offset:X,indent:H,source:I}];if(!rU(Q,R))Q.push({type:"newline",offset:-1,indent:H,source:`
111
- `});return{type:"block-scalar",offset:X,indent:H,props:Q,source:J}}case'"':return{type:"double-quoted-scalar",offset:X,indent:H,source:Z,end:R};case"'":return{type:"single-quoted-scalar",offset:X,indent:H,source:Z,end:R};default:return{type:"scalar",offset:X,indent:H,source:Z,end:R}}}function i8($,q,U={}){let{afterKey:H=!1,implicitKey:z=!1,inFlow:X=!1,type:L}=U,Z="indent"in $?$.indent:null;if(H&&typeof Z==="number")Z+=2;if(!L)switch($.type){case"single-quoted-scalar":L="QUOTE_SINGLE";break;case"double-quoted-scalar":L="QUOTE_DOUBLE";break;case"block-scalar":{let G=$.props[0];if(G.type!=="block-scalar-header")throw Error("Invalid block scalar header");L=G.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:L="PLAIN"}let R=cU.stringifyString({type:L,value:q},{implicitKey:z||Z===null,indent:Z!==null&&Z>0?" ".repeat(Z):"",inFlow:X,options:{blockQuote:!0,lineWidth:-1}});switch(R[0]){case"|":case">":c8($,R);break;case'"':Eq($,R,"double-quoted-scalar");break;case"'":Eq($,R,"single-quoted-scalar");break;default:Eq($,R,"scalar")}}function c8($,q){let U=q.indexOf(`
112
- `),H=q.substring(0,U),z=q.substring(U+1)+`
113
- `;if($.type==="block-scalar"){let X=$.props[0];if(X.type!=="block-scalar-header")throw Error("Invalid block scalar header");X.source=H,$.source=z}else{let{offset:X}=$,L="indent"in $?$.indent:-1,Z=[{type:"block-scalar-header",offset:X,indent:L,source:H}];if(!rU(Z,"end"in $?$.end:void 0))Z.push({type:"newline",offset:-1,indent:L,source:`
114
- `});for(let R of Object.keys($))if(R!=="type"&&R!=="offset")delete $[R];Object.assign($,{type:"block-scalar",indent:L,props:Z,source:z})}}function rU($,q){if(q)for(let U of q)switch(U.type){case"space":case"comment":$.push(U);break;case"newline":return $.push(U),!0}return!1}function Eq($,q,U){switch($.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":$.type=U,$.source=q;break;case"block-scalar":{let H=$.props.slice(1),z=q.length;if($.props[0].type==="block-scalar-header")z-=$.props[0].source.length;for(let X of H)X.offset+=z;delete $.props,Object.assign($,{type:U,source:q,end:H});break}case"block-map":case"block-seq":{let z={type:"newline",offset:$.offset+q.length,indent:$.indent,source:`
115
- `};delete $.items,Object.assign($,{type:U,source:q,end:[z]});break}default:{let H="indent"in $?$.indent:-1,z="end"in $&&Array.isArray($.end)?$.end.filter((X)=>X.type==="space"||X.type==="comment"||X.type==="newline"):[];for(let X of Object.keys($))if(X!=="type"&&X!=="offset")delete $[X];Object.assign($,{type:U,indent:H,source:q,end:z})}}}r8.createScalarToken=s8;r8.resolveAsScalar=a8;r8.setScalarValue=i8});var oU=O(($X)=>{var e8=($)=>("type"in $)?M$($):A$($);function M$($){switch($.type){case"block-scalar":{let q="";for(let U of $.props)q+=M$(U);return q+$.source}case"block-map":case"block-seq":{let q="";for(let U of $.items)q+=A$(U);return q}case"flow-collection":{let q=$.start.source;for(let U of $.items)q+=A$(U);for(let U of $.end)q+=U.source;return q}case"document":{let q=A$($);if($.end)for(let U of $.end)q+=U.source;return q}default:{let q=$.source;if("end"in $&&$.end)for(let U of $.end)q+=U.source;return q}}}function A$({start:$,key:q,sep:U,value:H}){let z="";for(let X of $)z+=X.source;if(q)z+=M$(q);if(U)for(let X of U)z+=X.source;if(H)z+=M$(H);return z}$X.stringify=e8});var $2=O((HX)=>{var gq=Symbol("break visit"),UX=Symbol("skip children"),tU=Symbol("remove item");function U0($,q){if("type"in $&&$.type==="document")$={start:$.start,value:$.value};eU(Object.freeze([]),$,q)}U0.BREAK=gq;U0.SKIP=UX;U0.REMOVE=tU;U0.itemAtPath=($,q)=>{let U=$;for(let[H,z]of q){let X=U?.[H];if(X&&"items"in X)U=X.items[z];else return}return U};U0.parentCollection=($,q)=>{let U=U0.itemAtPath($,q.slice(0,-1)),H=q[q.length-1][0],z=U?.[H];if(z&&"items"in z)return z;throw Error("Parent collection not found")};function eU($,q,U){let H=U(q,$);if(typeof H==="symbol")return H;for(let z of["key","value"]){let X=q[z];if(X&&"items"in X){for(let L=0;L<X.items.length;++L){let Z=eU(Object.freeze($.concat([[z,L]])),X.items[L],U);if(typeof Z==="number")L=Z-1;else if(Z===gq)return gq;else if(Z===tU)X.items.splice(L,1),L-=1}if(typeof H==="function"&&z==="key")H=H(q,$)}}return typeof H==="function"?H(q,$):H}HX.visit=U0});var K$=O((IX)=>{var uq=nU(),XX=oU(),LX=$2(),yq="\uFEFF",hq="\x02",xq="\x18",kq="\x1F",ZX=($)=>!!$&&("items"in $),RX=($)=>!!$&&($.type==="scalar"||$.type==="single-quoted-scalar"||$.type==="double-quoted-scalar"||$.type==="block-scalar");function GX($){switch($){case yq:return"<BOM>";case hq:return"<DOC>";case xq:return"<FLOW_END>";case kq:return"<SCALAR>";default:return JSON.stringify($)}}function JX($){switch($){case yq:return"byte-order-mark";case hq:return"doc-mode";case xq:return"flow-error-end";case kq:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
103
+ `)+(r.substring(1)||" "),s=!0,n=!1;break;case"%":if(e[i+1]?.[0]!=="#")i+=1;s=!1;break;default:if(!s)n=!0;s=!1}}return{comment:t,afterEmptyLine:n}}class dr{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(t,s,n,i)=>{let r=je(t);if(i)this.warnings.push(new Be.YAMLWarning(r,s,n));else this.errors.push(new Be.YAMLParseError(r,s,n))},this.directives=new hp.Directives({version:e.version||"1.2"}),this.options=e}decorate(e,t){let{comment:s,afterEmptyLine:n}=fr(this.prelude);if(s){let i=e.contents;if(t)e.comment=e.comment?`${e.comment}
104
+ ${s}`:s;else if(n||e.directives.docStart||!i)e.commentBefore=s;else if(ur.isCollection(i)&&!i.flow&&i.items.length>0){let r=i.items[0];if(ur.isPair(r))r=r.key;let o=r.commentBefore;r.commentBefore=o?`${s}
105
+ ${o}`:s}else{let r=i.commentBefore;i.commentBefore=r?`${s}
106
+ ${r}`:s}}if(t){for(let i=0;i<this.errors.length;++i)e.errors.push(this.errors[i]);for(let i=0;i<this.warnings.length;++i)e.warnings.push(this.warnings[i])}else e.errors=this.errors,e.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:fr(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,s=-1){for(let n of e)yield*this.next(n);yield*this.end(t,s)}*next(e){if(pp.env.LOG_STREAM)console.dir(e,{depth:null});switch(e.type){case"directive":this.directives.add(e.source,(t,s,n)=>{let i=je(e);i[0]+=t,this.onError(i,"BAD_DIRECTIVE",s,n)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{let t=gp.composeDoc(this.options,this.directives,e,this.onError);if(this.atDirectives&&!t.directives.docStart)this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line");if(this.decorate(t,!1),this.doc)yield this.doc;this.doc=t,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{let t=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,s=new Be.YAMLParseError(je(e),"UNEXPECTED_TOKEN",t);if(this.atDirectives||!this.doc)this.errors.push(s);else this.doc.errors.push(s);break}case"doc-end":{if(!this.doc){this.errors.push(new Be.YAMLParseError(je(e),"UNEXPECTED_TOKEN","Unexpected doc-end without preceding document"));break}this.doc.directives.docEnd=!0;let t=yp.resolveEnd(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){let s=this.doc.comment;this.doc.comment=s?`${s}
107
+ ${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new Be.YAMLParseError(je(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){let s=Object.assign({_directives:this.directives},this.options),n=new mp.Document(void 0,s);if(this.atDirectives)this.onError(t,"MISSING_CHAR","Missing directives-end indicator line");n.range=[0,t,t],this.decorate(n,!1),yield n}}}bp.Composer=dr});var mr=y(function(Lp){var Sp=xs(),vp=Ds(),kp=De(),pr=Oe();function Cp(e,t=!0,s){if(e){let n=(i,r,o)=>{let a=typeof i==="number"?i:Array.isArray(i)?i[0]:i.offset;if(s)s(a,r,o);else throw new kp.YAMLParseError([a,a+1],r,o)};switch(e.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return vp.resolveFlowScalar(e,t,n);case"block-scalar":return Sp.resolveBlockScalar({options:{strict:t}},e,n)}}return null}function Np(e,t){let{implicitKey:s=!1,indent:n,inFlow:i=!1,offset:r=-1,type:o="PLAIN"}=t,a=pr.stringifyString({type:o,value:e},{implicitKey:s,indent:n>0?" ".repeat(n):"",inFlow:i,options:{blockQuote:!0,lineWidth:-1}}),l=t.end??[{type:"newline",offset:-1,indent:n,source:`
108
+ `}];switch(a[0]){case"|":case">":{let c=a.indexOf(`
109
+ `),d=a.substring(0,c),u=a.substring(c+1)+`
110
+ `,f=[{type:"block-scalar-header",offset:r,indent:n,source:d}];if(!hr(f,l))f.push({type:"newline",offset:-1,indent:n,source:`
111
+ `});return{type:"block-scalar",offset:r,indent:n,props:f,source:u}}case'"':return{type:"double-quoted-scalar",offset:r,indent:n,source:a,end:l};case"'":return{type:"single-quoted-scalar",offset:r,indent:n,source:a,end:l};default:return{type:"scalar",offset:r,indent:n,source:a,end:l}}}function Ap(e,t,s={}){let{afterKey:n=!1,implicitKey:i=!1,inFlow:r=!1,type:o}=s,a="indent"in e?e.indent:null;if(n&&typeof a==="number")a+=2;if(!o)switch(e.type){case"single-quoted-scalar":o="QUOTE_SINGLE";break;case"double-quoted-scalar":o="QUOTE_DOUBLE";break;case"block-scalar":{let c=e.props[0];if(c.type!=="block-scalar-header")throw Error("Invalid block scalar header");o=c.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:o="PLAIN"}let l=pr.stringifyString({type:o,value:t},{implicitKey:i||a===null,indent:a!==null&&a>0?" ".repeat(a):"",inFlow:r,options:{blockQuote:!0,lineWidth:-1}});switch(l[0]){case"|":case">":Op(e,l);break;case'"':js(e,l,"double-quoted-scalar");break;case"'":js(e,l,"single-quoted-scalar");break;default:js(e,l,"scalar")}}function Op(e,t){let s=t.indexOf(`
112
+ `),n=t.substring(0,s),i=t.substring(s+1)+`
113
+ `;if(e.type==="block-scalar"){let r=e.props[0];if(r.type!=="block-scalar-header")throw Error("Invalid block scalar header");r.source=n,e.source=i}else{let{offset:r}=e,o="indent"in e?e.indent:-1,a=[{type:"block-scalar-header",offset:r,indent:o,source:n}];if(!hr(a,"end"in e?e.end:void 0))a.push({type:"newline",offset:-1,indent:o,source:`
114
+ `});for(let l of Object.keys(e))if(l!=="type"&&l!=="offset")delete e[l];Object.assign(e,{type:"block-scalar",indent:o,props:a,source:i})}}function hr(e,t){if(t)for(let s of t)switch(s.type){case"space":case"comment":e.push(s);break;case"newline":return e.push(s),!0}return!1}function js(e,t,s){switch(e.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":e.type=s,e.source=t;break;case"block-scalar":{let n=e.props.slice(1),i=t.length;if(e.props[0].type==="block-scalar-header")i-=e.props[0].source.length;for(let r of n)r.offset+=i;delete e.props,Object.assign(e,{type:s,source:t,end:n});break}case"block-map":case"block-seq":{let i={type:"newline",offset:e.offset+t.length,indent:e.indent,source:`
115
+ `};delete e.items,Object.assign(e,{type:s,source:t,end:[i]});break}default:{let n="indent"in e?e.indent:-1,i="end"in e&&Array.isArray(e.end)?e.end.filter((r)=>r.type==="space"||r.type==="comment"||r.type==="newline"):[];for(let r of Object.keys(e))if(r!=="type"&&r!=="offset")delete e[r];Object.assign(e,{type:s,indent:n,source:t,end:i})}}}Lp.createScalarToken=Np;Lp.resolveAsScalar=Cp;Lp.setScalarValue=Ap});var gr=y(function(Tp){var Ip=(e)=>("type"in e)?It(e):qt(e);function It(e){switch(e.type){case"block-scalar":{let t="";for(let s of e.props)t+=It(s);return t+e.source}case"block-map":case"block-seq":{let t="";for(let s of e.items)t+=qt(s);return t}case"flow-collection":{let t=e.start.source;for(let s of e.items)t+=qt(s);for(let s of e.end)t+=s.source;return t}case"document":{let t=qt(e);if(e.end)for(let s of e.end)t+=s.source;return t}default:{let t=e.source;if("end"in e&&e.end)for(let s of e.end)t+=s.source;return t}}}function qt({start:e,key:t,sep:s,value:n}){let i="";for(let r of e)i+=r.source;if(t)i+=It(t);if(s)for(let r of s)i+=r.source;if(n)i+=It(n);return i}Tp.stringify=Ip});var wr=y(function(xp){var Ks=Symbol("break visit"),Mp=Symbol("skip children"),yr=Symbol("remove item");function ie(e,t){if("type"in e&&e.type==="document")e={start:e.start,value:e.value};br(Object.freeze([]),e,t)}ie.BREAK=Ks;ie.SKIP=Mp;ie.REMOVE=yr;ie.itemAtPath=(e,t)=>{let s=e;for(let[n,i]of t){let r=s?.[n];if(r&&"items"in r)s=r.items[i];else return}return s};ie.parentCollection=(e,t)=>{let s=ie.itemAtPath(e,t.slice(0,-1)),n=t[t.length-1][0],i=s?.[n];if(i&&"items"in i)return i;throw Error("Parent collection not found")};function br(e,t,s){let n=s(t,e);if(typeof n==="symbol")return n;for(let i of["key","value"]){let r=t[i];if(r&&"items"in r){for(let o=0;o<r.items.length;++o){let a=br(Object.freeze(e.concat([[i,o]])),r.items[o],s);if(typeof a==="number")o=a-1;else if(a===Ks)return Ks;else if(a===yr)r.items.splice(o,1),o-=1}if(typeof n==="function"&&i==="key")n=n(t,e)}}return typeof n==="function"?n(t,e):n}xp.visit=ie});var Tt=y(function(Up){var Fs=mr(),Dp=gr(),Rp=wr(),Us="\uFEFF",Ys="\x02",Vs="\x18",Hs="\x1F",Bp=(e)=>!!e&&("items"in e),jp=(e)=>!!e&&(e.type==="scalar"||e.type==="single-quoted-scalar"||e.type==="double-quoted-scalar"||e.type==="block-scalar");function Kp(e){switch(e){case Us:return"<BOM>";case Ys:return"<DOC>";case Vs:return"<FLOW_END>";case Hs:return"<SCALAR>";default:return JSON.stringify(e)}}function Fp(e){switch(e){case Us:return"byte-order-mark";case Ys:return"doc-mode";case Vs:return"flow-error-end";case Hs:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
116
116
  `:case`\r
117
- `: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($[0]){case" ":case"\t":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}IX.createScalarToken=uq.createScalarToken;IX.resolveAsScalar=uq.resolveAsScalar;IX.setScalarValue=uq.setScalarValue;IX.stringify=XX.stringify;IX.visit=LX.visit;IX.BOM=yq;IX.DOCUMENT=hq;IX.FLOW_END=xq;IX.SCALAR=kq;IX.isCollection=ZX;IX.isScalar=RX;IX.prettyToken=GX;IX.tokenType=JX});var mq=O((bX)=>{var x0=K$();function u($){switch($){case void 0:case" ":case`
118
- `:case"\r":case"\t":return!0;default:return!1}}var q2=new Set("0123456789ABCDEFabcdef"),MX=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),b$=new Set(",[]{}"),KX=new Set(` ,[]{}
119
- \r `),vq=($)=>!$||KX.has($);class U2{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($,q=!1){if($){if(typeof $!=="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+$:$,this.lineEndPos=null}this.atEnd=!q;let U=this.next??"stream";while(U&&(q||this.hasChars(1)))U=yield*this.parseNext(U)}atLineEnd(){let $=this.pos,q=this.buffer[$];while(q===" "||q==="\t")q=this.buffer[++$];if(!q||q==="#"||q===`
120
- `)return!0;if(q==="\r")return this.buffer[$+1]===`
121
- `;return!1}charAt($){return this.buffer[this.pos+$]}continueScalar($){let q=this.buffer[$];if(this.indentNext>0){let U=0;while(q===" ")q=this.buffer[++U+$];if(q==="\r"){let H=this.buffer[U+$+1];if(H===`
122
- `||!H&&!this.atEnd)return $+U+1}return q===`
123
- `||U>=this.indentNext||!q&&!this.atEnd?$+U:-1}if(q==="-"||q==="."){let U=this.buffer.substr($,3);if((U==="---"||U==="...")&&u(this.buffer[$+3]))return-1}return $}getLine(){let $=this.lineEndPos;if(typeof $!=="number"||$!==-1&&$<this.pos)$=this.buffer.indexOf(`
124
- `,this.pos),this.lineEndPos=$;if($===-1)return this.atEnd?this.buffer.substring(this.pos):null;if(this.buffer[$-1]==="\r")$-=1;return this.buffer.substring(this.pos,$)}hasChars($){return this.pos+$<=this.buffer.length}setNext($){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=$,null}peek($){return this.buffer.substr(this.pos,$)}*parseNext($){switch($){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 $=this.getLine();if($===null)return this.setNext("stream");if($[0]===x0.BOM)yield*this.pushCount(1),$=$.substring(1);if($[0]==="%"){let q=$.length,U=$.indexOf("#");while(U!==-1){let z=$[U-1];if(z===" "||z==="\t"){q=U-1;break}else U=$.indexOf("#",U+1)}while(!0){let z=$[q-1];if(z===" "||z==="\t")q-=1;else break}let H=(yield*this.pushCount(q))+(yield*this.pushSpaces(!0));return yield*this.pushCount($.length-H),this.pushNewline(),"stream"}if(this.atLineEnd()){let q=yield*this.pushSpaces(!0);return yield*this.pushCount($.length-q),yield*this.pushNewline(),"stream"}return yield x0.DOCUMENT,yield*this.parseLineStart()}*parseLineStart(){let $=this.charAt(0);if(!$&&!this.atEnd)return this.setNext("line-start");if($==="-"||$==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");let q=this.peek(3);if((q==="---"||q==="...")&&u(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,q==="---"?"doc":"stream"}if(this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!u(this.charAt(1)))this.indentNext=this.indentValue;return yield*this.parseBlockStart()}*parseBlockStart(){let[$,q]=this.peek(2);if(!q&&!this.atEnd)return this.setNext("block-start");if(($==="-"||$==="?"||$===":")&&u(q)){let U=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=U,"block-start"}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let $=this.getLine();if($===null)return this.setNext("doc");let q=yield*this.pushIndicators();switch($[q]){case"#":yield*this.pushCount($.length-q);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(vq),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return q+=yield*this.parseBlockScalarHeader(),q+=yield*this.pushSpaces(!0),yield*this.pushCount($.length-q),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let $,q,U=-1;do{if($=yield*this.pushNewline(),$>0)q=yield*this.pushSpaces(!1),this.indentValue=U=q;else q=0;q+=yield*this.pushSpaces(!0)}while($+q>0);let H=this.getLine();if(H===null)return this.setNext("flow");if(U!==-1&&U<this.indentNext&&H[0]!=="#"||U===0&&(H.startsWith("---")||H.startsWith("..."))&&u(H[3])){if(!(U===this.indentNext-1&&this.flowLevel===1&&(H[0]==="]"||H[0]==="}")))return this.flowLevel=0,yield x0.FLOW_END,yield*this.parseLineStart()}let z=0;while(H[z]===",")z+=yield*this.pushCount(1),z+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(z+=yield*this.pushIndicators(),H[z]){case void 0:return"flow";case"#":return yield*this.pushCount(H.length-z),"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(vq),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let X=this.charAt(1);if(this.flowKey||u(X)||X===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let $=this.charAt(0),q=this.buffer.indexOf($,this.pos+1);if($==="'")while(q!==-1&&this.buffer[q+1]==="'")q=this.buffer.indexOf("'",q+2);else while(q!==-1){let z=0;while(this.buffer[q-1-z]==="\\")z+=1;if(z%2===0)break;q=this.buffer.indexOf('"',q+1)}let U=this.buffer.substring(0,q),H=U.indexOf(`
125
- `,this.pos);if(H!==-1){while(H!==-1){let z=this.continueScalar(H+1);if(z===-1)break;H=U.indexOf(`
126
- `,z)}if(H!==-1)q=H-(U[H-1]==="\r"?2:1)}if(q===-1){if(!this.atEnd)return this.setNext("quoted-scalar");q=this.buffer.length}return yield*this.pushToIndex(q+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let $=this.pos;while(!0){let q=this.buffer[++$];if(q==="+")this.blockScalarKeep=!0;else if(q>"0"&&q<="9")this.blockScalarIndent=Number(q)-1;else if(q!=="-")break}return yield*this.pushUntil((q)=>u(q)||q==="#")}*parseBlockScalar(){let $=this.pos-1,q=0,U;$:for(let z=this.pos;U=this.buffer[z];++z)switch(U){case" ":q+=1;break;case`
127
- `:$=z,q=0;break;case"\r":{let X=this.buffer[z+1];if(!X&&!this.atEnd)return this.setNext("block-scalar");if(X===`
128
- `)break}default:break $}if(!U&&!this.atEnd)return this.setNext("block-scalar");if(q>=this.indentNext){if(this.blockScalarIndent===-1)this.indentNext=q;else this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{let z=this.continueScalar($+1);if(z===-1)break;$=this.buffer.indexOf(`
129
- `,z)}while($!==-1);if($===-1){if(!this.atEnd)return this.setNext("block-scalar");$=this.buffer.length}}let H=$+1;U=this.buffer[H];while(U===" ")U=this.buffer[++H];if(U==="\t"){while(U==="\t"||U===" "||U==="\r"||U===`
130
- `)U=this.buffer[++H];$=H-1}else if(!this.blockScalarKeep)do{let z=$-1,X=this.buffer[z];if(X==="\r")X=this.buffer[--z];let L=z;while(X===" ")X=this.buffer[--z];if(X===`
131
- `&&z>=this.pos&&z+1+q>L)$=z;else break}while(!0);return yield x0.SCALAR,yield*this.pushToIndex($+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let $=this.flowLevel>0,q=this.pos-1,U=this.pos-1,H;while(H=this.buffer[++U])if(H===":"){let z=this.buffer[U+1];if(u(z)||$&&b$.has(z))break;q=U}else if(u(H)){let z=this.buffer[U+1];if(H==="\r")if(z===`
132
- `)U+=1,H=`
133
- `,z=this.buffer[U+1];else q=U;if(z==="#"||$&&b$.has(z))break;if(H===`
134
- `){let X=this.continueScalar(U+1);if(X===-1)break;U=Math.max(U,X-2)}}else{if($&&b$.has(H))break;q=U}if(!H&&!this.atEnd)return this.setNext("plain-scalar");return yield x0.SCALAR,yield*this.pushToIndex(q+1,!0),$?"flow":"doc"}*pushCount($){if($>0)return yield this.buffer.substr(this.pos,$),this.pos+=$,$;return 0}*pushToIndex($,q){let U=this.buffer.slice(this.pos,$);if(U)return yield U,this.pos+=U.length,U.length;else if(q)yield"";return 0}*pushIndicators(){let $=0;$:while(!0){switch(this.charAt(0)){case"!":$+=yield*this.pushTag(),$+=yield*this.pushSpaces(!0);continue $;case"&":$+=yield*this.pushUntil(vq),$+=yield*this.pushSpaces(!0);continue $;case"-":case"?":case":":{let q=this.flowLevel>0,U=this.charAt(1);if(u(U)||q&&b$.has(U)){if(!q)this.indentNext=this.indentValue+1;else if(this.flowKey)this.flowKey=!1;$+=yield*this.pushCount(1),$+=yield*this.pushSpaces(!0);continue $}}}break $}return $}*pushTag(){if(this.charAt(1)==="<"){let $=this.pos+2,q=this.buffer[$];while(!u(q)&&q!==">")q=this.buffer[++$];return yield*this.pushToIndex(q===">"?$+1:$,!1)}else{let $=this.pos+1,q=this.buffer[$];while(q)if(MX.has(q))q=this.buffer[++$];else if(q==="%"&&q2.has(this.buffer[$+1])&&q2.has(this.buffer[$+2]))q=this.buffer[$+=3];else break;return yield*this.pushToIndex($,!1)}}*pushNewline(){let $=this.buffer[this.pos];if($===`
135
- `)return yield*this.pushCount(1);else if($==="\r"&&this.charAt(1)===`
136
- `)return yield*this.pushCount(2);else return 0}*pushSpaces($){let q=this.pos-1,U;do U=this.buffer[++q];while(U===" "||$&&U==="\t");let H=q-this.pos;if(H>0)yield this.buffer.substr(this.pos,H),this.pos=q;return H}*pushUntil($){let q=this.pos,U=this.buffer[q];while(!$(U))U=this.buffer[++q];return yield*this.pushToIndex(q,!1)}}bX.Lexer=U2});var pq=O((SX)=>{class H2{constructor(){this.lineStarts=[],this.addNewLine=($)=>this.lineStarts.push($),this.linePos=($)=>{let q=0,U=this.lineStarts.length;while(q<U){let z=q+U>>1;if(this.lineStarts[z]<$)q=z+1;else U=z}if(this.lineStarts[q]===$)return{line:q+1,col:1};if(q===0)return{line:0,col:$};let H=this.lineStarts[q-1];return{line:q,col:$-H+1}}}}SX.LineCounter=H2});var dq=O((EX)=>{var jX=X0("process"),z2=K$(),fX=mq();function c($,q){for(let U=0;U<$.length;++U)if($[U].type===q)return!0;return!1}function X2($){for(let q=0;q<$.length;++q)switch($[q].type){case"space":case"comment":case"newline":break;default:return q}return-1}function Z2($){switch($?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function N$($){switch($.type){case"document":return $.start;case"block-map":{let q=$.items[$.items.length-1];return q.sep??q.start}case"block-seq":return $.items[$.items.length-1].start;default:return[]}}function O0($){if($.length===0)return[];let q=$.length;$:while(--q>=0)switch($[q].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break $}while($[++q]?.type==="space");return $.splice(q,$.length)}function S$($,q){if(q.length<1e5)Array.prototype.push.apply($,q);else for(let U=0;U<q.length;++U)$.push(q[U])}function L2($){if($.start.type==="flow-seq-start"){for(let q of $.items)if(q.sep&&!q.value&&!c(q.start,"explicit-key-ind")&&!c(q.sep,"map-value-ind")){if(q.key)q.value=q.key;if(delete q.key,Z2(q.value))if(q.value.end)S$(q.value.end,q.sep);else q.value.end=q.sep;else S$(q.start,q.sep);delete q.sep}}}class R2{constructor($){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new fX.Lexer,this.onNewLine=$}*parse($,q=!1){if(this.onNewLine&&this.offset===0)this.onNewLine(0);for(let U of this.lexer.lex($,q))yield*this.next(U);if(!q)yield*this.end()}*next($){if(this.source=$,jX.env.LOG_TOKENS)console.log("|",z2.prettyToken($));if(this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=$.length;return}let q=z2.tokenType($);if(!q){let U=`Not a YAML token: ${$}`;yield*this.pop({type:"error",offset:this.offset,message:U,source:$}),this.offset+=$.length}else if(q==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=q,yield*this.step(),q){case"newline":if(this.atNewLine=!0,this.indent=0,this.onNewLine)this.onNewLine(this.offset+$.length);break;case"space":if(this.atNewLine&&$[0]===" ")this.indent+=$.length;break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":if(this.atNewLine)this.indent+=$.length;break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=$.length}}*end(){while(this.stack.length>0)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let $=this.peek(1);if(this.type==="doc-end"&&$?.type!=="doc-end"){while(this.stack.length>0)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!$)return yield*this.stream();switch($.type){case"document":return yield*this.document($);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar($);case"block-scalar":return yield*this.blockScalar($);case"block-map":return yield*this.blockMap($);case"block-seq":return yield*this.blockSequence($);case"flow-collection":return yield*this.flowCollection($);case"doc-end":return yield*this.documentEnd($)}yield*this.pop()}peek($){return this.stack[this.stack.length-$]}*pop($){let q=$??this.stack.pop();if(!q)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield q;else{let U=this.peek(1);if(q.type==="block-scalar")q.indent="indent"in U?U.indent:0;else if(q.type==="flow-collection"&&U.type==="document")q.indent=0;if(q.type==="flow-collection")L2(q);switch(U.type){case"document":U.value=q;break;case"block-scalar":U.props.push(q);break;case"block-map":{let H=U.items[U.items.length-1];if(H.value){U.items.push({start:[],key:q,sep:[]}),this.onKeyLine=!0;return}else if(H.sep)H.value=q;else{Object.assign(H,{key:q,sep:[]}),this.onKeyLine=!H.explicitKey;return}break}case"block-seq":{let H=U.items[U.items.length-1];if(H.value)U.items.push({start:[],value:q});else H.value=q;break}case"flow-collection":{let H=U.items[U.items.length-1];if(!H||H.value)U.items.push({start:[],key:q,sep:[]});else if(H.sep)H.value=q;else Object.assign(H,{key:q,sep:[]});return}default:yield*this.pop(),yield*this.pop(q)}if((U.type==="document"||U.type==="block-map"||U.type==="block-seq")&&(q.type==="block-map"||q.type==="block-seq")){let H=q.items[q.items.length-1];if(H&&!H.sep&&!H.value&&H.start.length>0&&X2(H.start)===-1&&(q.indent===0||H.start.every((z)=>z.type!=="comment"||z.indent<q.indent))){if(U.type==="document")U.end=H.start;else U.items.push({start:H.start});q.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":{let $={type:"document",offset:this.offset,start:[]};if(this.type==="doc-start")$.start.push(this.sourceToken);this.stack.push($);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document($){if($.value)return yield*this.lineEnd($);switch(this.type){case"doc-start":{if(X2($.start)!==-1)yield*this.pop(),yield*this.step();else $.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":$.start.push(this.sourceToken);return}let q=this.startBlockValue($);if(q)this.stack.push(q);else yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar($){if(this.type==="map-value-ind"){let q=N$(this.peek(2)),U=O0(q),H;if($.end)H=$.end,H.push(this.sourceToken),delete $.end;else H=[this.sourceToken];let z={type:"block-map",offset:$.offset,indent:$.indent,items:[{start:U,key:$,sep:H}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=z}else yield*this.lineEnd($)}*blockScalar($){switch(this.type){case"space":case"comment":case"newline":$.props.push(this.sourceToken);return;case"scalar":if($.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let q=this.source.indexOf(`
137
- `)+1;while(q!==0)this.onNewLine(this.offset+q),q=this.source.indexOf(`
138
- `,q)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap($){let q=$.items[$.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,q.value){let U="end"in q.value?q.value.end:void 0;if((Array.isArray(U)?U[U.length-1]:void 0)?.type==="comment")U?.push(this.sourceToken);else $.items.push({start:[this.sourceToken]})}else if(q.sep)q.sep.push(this.sourceToken);else q.start.push(this.sourceToken);return;case"space":case"comment":if(q.value)$.items.push({start:[this.sourceToken]});else if(q.sep)q.sep.push(this.sourceToken);else{if(this.atIndentedComment(q.start,$.indent)){let H=$.items[$.items.length-2]?.value?.end;if(Array.isArray(H)){S$(H,q.start),H.push(this.sourceToken),$.items.pop();return}}q.start.push(this.sourceToken)}return}if(this.indent>=$.indent){let U=!this.onKeyLine&&this.indent===$.indent,H=U&&(q.sep||q.explicitKey)&&this.type!=="seq-item-ind",z=[];if(H&&q.sep&&!q.value){let X=[];for(let L=0;L<q.sep.length;++L){let Z=q.sep[L];switch(Z.type){case"newline":X.push(L);break;case"space":break;case"comment":if(Z.indent>$.indent)X.length=0;break;default:X.length=0}}if(X.length>=2)z=q.sep.splice(X[1])}switch(this.type){case"anchor":case"tag":if(H||q.value)z.push(this.sourceToken),$.items.push({start:z}),this.onKeyLine=!0;else if(q.sep)q.sep.push(this.sourceToken);else q.start.push(this.sourceToken);return;case"explicit-key-ind":if(!q.sep&&!q.explicitKey)q.start.push(this.sourceToken),q.explicitKey=!0;else if(H||q.value)z.push(this.sourceToken),$.items.push({start:z,explicitKey:!0});else 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(q.explicitKey)if(!q.sep)if(c(q.start,"newline"))Object.assign(q,{key:null,sep:[this.sourceToken]});else{let X=O0(q.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:X,key:null,sep:[this.sourceToken]}]})}else if(q.value)$.items.push({start:[],key:null,sep:[this.sourceToken]});else if(c(q.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:z,key:null,sep:[this.sourceToken]}]});else if(Z2(q.key)&&!c(q.sep,"newline")){let X=O0(q.start),L=q.key,Z=q.sep;Z.push(this.sourceToken),delete q.key,delete q.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:X,key:L,sep:Z}]})}else if(z.length>0)q.sep=q.sep.concat(z,this.sourceToken);else q.sep.push(this.sourceToken);else if(!q.sep)Object.assign(q,{key:null,sep:[this.sourceToken]});else if(q.value||H)$.items.push({start:z,key:null,sep:[this.sourceToken]});else if(c(q.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]});else q.sep.push(this.sourceToken);this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let X=this.flowScalar(this.type);if(H||q.value)$.items.push({start:z,key:X,sep:[]}),this.onKeyLine=!0;else if(q.sep)this.stack.push(X);else Object.assign(q,{key:X,sep:[]}),this.onKeyLine=!0;return}default:{let X=this.startBlockValue($);if(X){if(X.type==="block-seq"){if(!q.explicitKey&&q.sep&&!c(q.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 if(U)$.items.push({start:z});this.stack.push(X);return}}}}yield*this.pop(),yield*this.step()}*blockSequence($){let q=$.items[$.items.length-1];switch(this.type){case"newline":if(q.value){let U="end"in q.value?q.value.end:void 0;if((Array.isArray(U)?U[U.length-1]:void 0)?.type==="comment")U?.push(this.sourceToken);else $.items.push({start:[this.sourceToken]})}else q.start.push(this.sourceToken);return;case"space":case"comment":if(q.value)$.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(q.start,$.indent)){let H=$.items[$.items.length-2]?.value?.end;if(Array.isArray(H)){S$(H,q.start),H.push(this.sourceToken),$.items.pop();return}}q.start.push(this.sourceToken)}return;case"anchor":case"tag":if(q.value||this.indent<=$.indent)break;q.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==$.indent)break;if(q.value||c(q.start,"seq-item-ind"))$.items.push({start:[this.sourceToken]});else q.start.push(this.sourceToken);return}if(this.indent>$.indent){let U=this.startBlockValue($);if(U){this.stack.push(U);return}}yield*this.pop(),yield*this.step()}*flowCollection($){let q=$.items[$.items.length-1];if(this.type==="flow-error-end"){let U;do yield*this.pop(),U=this.peek(1);while(U?.type==="flow-collection")}else if($.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":if(!q||q.sep)$.items.push({start:[this.sourceToken]});else q.start.push(this.sourceToken);return;case"map-value-ind":if(!q||q.value)$.items.push({start:[],key:null,sep:[this.sourceToken]});else if(q.sep)q.sep.push(this.sourceToken);else Object.assign(q,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":if(!q||q.value)$.items.push({start:[this.sourceToken]});else if(q.sep)q.sep.push(this.sourceToken);else q.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let H=this.flowScalar(this.type);if(!q||q.value)$.items.push({start:[],key:H,sep:[]});else if(q.sep)this.stack.push(H);else Object.assign(q,{key:H,sep:[]});return}case"flow-map-end":case"flow-seq-end":$.end.push(this.sourceToken);return}let U=this.startBlockValue($);if(U)this.stack.push(U);else yield*this.pop(),yield*this.step()}else{let U=this.peek(2);if(U.type==="block-map"&&(this.type==="map-value-ind"&&U.indent===$.indent||this.type==="newline"&&!U.items[U.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&U.type!=="flow-collection"){let H=N$(U),z=O0(H);L2($);let X=$.end.splice(1,$.end.length);X.push(this.sourceToken);let L={type:"block-map",offset:$.offset,indent:$.indent,items:[{start:z,key:$,sep:X}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=L}else yield*this.lineEnd($)}}flowScalar($){if(this.onNewLine){let q=this.source.indexOf(`
139
- `)+1;while(q!==0)this.onNewLine(this.offset+q),q=this.source.indexOf(`
140
- `,q)+1}return{type:$,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue($){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;let q=N$($),U=O0(q);return U.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:U,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let q=N$($),U=O0(q);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:U,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment($,q){if(this.type!=="comment")return!1;if(this.indent<=q)return!1;return $.every((U)=>U.type==="newline"||U.type==="space")}*documentEnd($){if(this.type!=="doc-mode"){if($.end)$.end.push(this.sourceToken);else $.end=[this.sourceToken];if(this.type==="newline")yield*this.pop()}}*lineEnd($){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:if($.end)$.end.push(this.sourceToken);else $.end=[this.sourceToken];if(this.type==="newline")yield*this.pop()}}}EX.Parser=R2});var D2=O((pX)=>{var G2=fq(),uX=E0(),k0=g0(),yX=p$(),hX=M(),xX=pq(),J2=dq();function I2($){let q=$.prettyErrors!==!1;return{lineCounter:$.lineCounter||q&&new xX.LineCounter||null,prettyErrors:q}}function kX($,q={}){let{lineCounter:U,prettyErrors:H}=I2(q),z=new J2.Parser(U?.addNewLine),X=new G2.Composer(q),L=Array.from(X.compose(z.parse($)));if(H&&U)for(let Z of L)Z.errors.forEach(k0.prettifyError($,U)),Z.warnings.forEach(k0.prettifyError($,U));if(L.length>0)return L;return Object.assign([],{empty:!0},X.streamInfo())}function Q2($,q={}){let{lineCounter:U,prettyErrors:H}=I2(q),z=new J2.Parser(U?.addNewLine),X=new G2.Composer(q),L=null;for(let Z of X.compose(z.parse($),!0,$.length))if(!L)L=Z;else if(L.options.logLevel!=="silent"){L.errors.push(new k0.YAMLParseError(Z.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}if(H&&U)L.errors.forEach(k0.prettifyError($,U)),L.warnings.forEach(k0.prettifyError($,U));return L}function vX($,q,U){let H=void 0;if(typeof q==="function")H=q;else if(U===void 0&&q&&typeof q==="object")U=q;let z=Q2($,U);if(!z)return null;if(z.warnings.forEach((X)=>yX.warn(z.options.logLevel,X)),z.errors.length>0)if(z.options.logLevel!=="silent")throw z.errors[0];else z.errors=[];return z.toJS(Object.assign({reviver:H},U))}function mX($,q,U){let H=null;if(typeof q==="function"||Array.isArray(q))H=q;else if(U===void 0&&q)U=q;if(typeof U==="string")U=U.length;if(typeof U==="number"){let z=Math.round(U);U=z<1?void 0:z>8?{indent:8}:{indent:z}}if($===void 0){let{keepUndefined:z}=U??q??{};if(!z)return}if(hX.isDocument($)&&!H)return $.toString(U);return new uX.Document($,H,U).toString(U)}pX.parse=vX;pX.parseAllDocuments=kX;pX.parseDocument=Q2;pX.stringify=mX});import{hapiHome as p5,loadGlobalConfig as d5,runtimeConsole as l5}from"@mcp-com-ai/shared-utils";function cq($,q,U={}){let H=U.warn??(()=>{}),z=new Map,X=(L,Z,R,G)=>{for(let I of[L.name,...L.aliases??[]]){if(z.has(I)){let J=z.get(I);H(`Command '${I}' already provided by ${J.source==="core"?"core":J.pluginName}; ignoring declaration from ${R??"core"}`);continue}z.set(I,{...L,source:Z,pluginName:R,packageName:G})}};for(let L of $)X(L,"core");for(let{plugin:L,packageName:Z}of q)for(let R of L.commands)X(R,"plugin",L.name,Z);return z}function s5($){let q=new Set;for(let[U,H]of $.entries())if(U===H.name)q.add(H);return Array.from(q).filter((U)=>!U.hidden).sort((U,H)=>U.name.localeCompare(H.name))}import{HAPI_CLI_API_VERSION as rq,satisfiesVersionRange as F2}from"@mcp-com-ai/plugin-sdk";var A2=["@mcp-com-ai/plugin-openapi","@mcp-com-ai/plugin-arazzo","@mcp-com-ai/plugin-cloudflare","@mcp-com-ai/enterprise-plugin-auth","@mcp-com-ai/plugin-otel"];async function nq($={}){let q=$.warn??(()=>{}),U=new Set($.blocklist??[]),H=[],z=new Set,X=[];for(let L of $.bundledPlugins??[])X.push({packageName:L.name,source:"bundled",plugin:L});for(let L of $.workspacePackages??[])X.push({packageName:L,source:"workspace"});for(let L of A2)X.push({packageName:L,source:"installed"});for(let L of $.configuredPackages??[])X.push({packageName:L,source:"installed"});for(let{packageName:L,source:Z,plugin:R}of X){if(z.has(L))continue;if(z.add(L),U.has(L))continue;try{let G=R?void 0:await import(L),I=R??(G?.plugin??G?.default);if(!I){q(`Plugin '${L}' loaded but did not export a plugin definition`);continue}if(I.compatibility?.cliApiVersion!==rq){q(`Plugin '${L}' declares cliApiVersion=${I.compatibility?.cliApiVersion}; CLI expects ${rq}. Skipping.`);continue}let J=I.compatibility.core;if(J&&!F2(J.version,J.range)){q(`Plugin '${L}' resolved core ${J.version}, which does not satisfy its declared range ${J.range}. Skipping.`);continue}H.push({plugin:I,packageName:L,source:Z})}catch(G){let I=G instanceof Error?G.message:String(G);if(!M2(G))q(`Plugin '${L}' failed to load: ${I}`)}}return H}function M2($){if(!$||typeof $!=="object")return!1;let q=$.code;if(q==="ERR_MODULE_NOT_FOUND"||q==="MODULE_NOT_FOUND")return!0;let U=$.message??"";return/Cannot find (module|package)/i.test(U)}import{parseArgs as K2,renderCommandHelp as f$}from"@mcp-com-ai/plugin-sdk";var v0=[{command:"cloudflare",packageName:"@mcp-com-ai/plugin-cloudflare",description:"Deploy HAPI MCP servers to Cloudflare Workers (deploy, login, status).",installHint:"bun add -g @mcp-com-ai/plugin-cloudflare"},{command:"openapi",packageName:"@mcp-com-ai/plugin-openapi",description:"OpenAPI-driven tooling (init, lint, list, serve).",installHint:"bun add -g @mcp-com-ai/plugin-openapi",documentRootField:"openapi"},{command:"arazzo",packageName:"@mcp-com-ai/plugin-arazzo",description:"Arazzo workflow validation, serving, and execution.",installHint:"bun add -g @mcp-com-ai/plugin-arazzo",documentRootField:"arazzo"},{command:"workflows",packageName:"@mcp-com-ai/plugin-arazzo",description:"Alias for the Arazzo workflow command group.",installHint:"bun add -g @mcp-com-ai/plugin-arazzo",documentRootField:"arazzo"},{command:"auth",packageName:"@mcp-com-ai/enterprise-plugin-auth",description:"OAuth/Security handler configuration for `hapi serve` (enterprise tier).",installHint:"Contact La Rebelion Labs for enterprise access."},{command:"otel",packageName:"@mcp-com-ai/plugin-otel",description:"OpenTelemetry / PostHog telemetry collection for HAPI commands.",installHint:"bun add -g @mcp-com-ai/plugin-otel"},{command:"license",packageName:"@mcp-com-ai/enterprise-plugin-licensing",description:"Enterprise licensing (activation, status, import). Part of the enterprise tier.",installHint:"Contact La Rebelion Labs for enterprise access."}];function oq($){return v0.find((q)=>q.command===$)}function tq($){return v0.find((q)=>q.documentRootField===$)}var b2=new Set(["--help","-h","help"]);async function eq($,q,U){if(q.length===0){let L=$.get("help");if(L?.run){let Z=await L.run({positionals:[],options:{},rest:[]},U);return typeof Z==="number"?Z:0}return U.stdout.write(`Usage: hapi <command> [subcommand] [options]
141
- `),0}let[H,...z]=q;if(!H)return 0;if(H==="--help"||H==="-h"){let L=$.get("help");if(L?.run){let Z=await L.run({positionals:[],options:{},rest:[]},U);return typeof Z==="number"?Z:0}}if(H==="--version"||H==="-v"){let L=$.get("version");if(L?.run){let Z=await L.run({positionals:[],options:{},rest:[]},U);return typeof Z==="number"?Z:0}}let X=$.get(H);if(!X)return N2(H,U);return E$($,X,z,U,[X.name])}async function E$($,q,U,H,z){if(U.length>0&&b2.has(U[0]))return f$(q,H,z.slice(0,-1)),0;let X=U[0];if(q.subcommands&&q.subcommands.length>0&&X&&!X.startsWith("-")){let Z=q.subcommands.find((R)=>R.name===X||R.aliases?.includes(X));if(Z)return E$($,Z,U.slice(1),H,[...z,Z.name]);if(!q.run)return H.stderr.write(`Unknown subcommand: ${z.join(" ")} ${X}
142
- `),f$(q,H,z.slice(0,-1)),1}if(!q.run)return f$(q,H,z.slice(0,-1)),0;if(q.name==="serve"&&z.length>1){let Z=$.get("serve");if(Z?.source==="core")return E$($,Z,U,H,[Z.name])}let L=K2(U,q.options??[]);try{let Z=await q.run(L,H);return typeof Z==="number"?Z:Number(process.exitCode??0)}catch(Z){let{printCliError:R}=await import("@mcp-com-ai/shared-utils");return R(`\u274C ${z.join(" ")} failed`,Z),1}}function N2($,q){let U=oq($);if(U)return q.stderr.write(`
143
- Command "${$}" is provided by ${U.packageName}, which is not installed.
144
- `),q.stderr.write(`
145
- ${U.description}
117
+ `: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"\t":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}Up.createScalarToken=Fs.createScalarToken;Up.resolveAsScalar=Fs.resolveAsScalar;Up.setScalarValue=Fs.setScalarValue;Up.stringify=Dp.stringify;Up.visit=Rp.visit;Up.BOM=Us;Up.DOCUMENT=Ys;Up.FLOW_END=Vs;Up.SCALAR=Hs;Up.isCollection=Bp;Up.isScalar=jp;Up.prettyToken=Kp;Up.tokenType=Fp});var zs=y(function(rh){var Ke=Tt();function D(e){switch(e){case void 0:case" ":case`
118
+ `:case"\r":case"\t":return!0;default:return!1}}var Sr=new Set("0123456789ABCDEFabcdef"),nh=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),$t=new Set(",[]{}"),ih=new Set(` ,[]{}
119
+ \r `),Js=(e)=>!e||ih.has(e);class vr{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,t=!1){if(e){if(typeof e!=="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!t;let s=this.next??"stream";while(s&&(t||this.hasChars(1)))s=yield*this.parseNext(s)}atLineEnd(){let e=this.pos,t=this.buffer[e];while(t===" "||t==="\t")t=this.buffer[++e];if(!t||t==="#"||t===`
120
+ `)return!0;if(t==="\r")return this.buffer[e+1]===`
121
+ `;return!1}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let t=this.buffer[e];if(this.indentNext>0){let s=0;while(t===" ")t=this.buffer[++s+e];if(t==="\r"){let n=this.buffer[s+e+1];if(n===`
122
+ `||!n&&!this.atEnd)return e+s+1}return t===`
123
+ `||s>=this.indentNext||!t&&!this.atEnd?e+s:-1}if(t==="-"||t==="."){let s=this.buffer.substr(e,3);if((s==="---"||s==="...")&&D(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;if(typeof e!=="number"||e!==-1&&e<this.pos)e=this.buffer.indexOf(`
124
+ `,this.pos),this.lineEndPos=e;if(e===-1)return this.atEnd?this.buffer.substring(this.pos):null;if(this.buffer[e-1]==="\r")e-=1;return this.buffer.substring(this.pos,e)}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){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 e=this.getLine();if(e===null)return this.setNext("stream");if(e[0]===Ke.BOM)yield*this.pushCount(1),e=e.substring(1);if(e[0]==="%"){let t=e.length,s=e.indexOf("#");while(s!==-1){let i=e[s-1];if(i===" "||i==="\t"){t=s-1;break}else s=e.indexOf("#",s+1)}while(!0){let i=e[t-1];if(i===" "||i==="\t")t-=1;else break}let n=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-n),this.pushNewline(),"stream"}if(this.atLineEnd()){let t=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-t),yield*this.pushNewline(),"stream"}return yield Ke.DOCUMENT,yield*this.parseLineStart()}*parseLineStart(){let e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext("line-start");if(e==="-"||e==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");let t=this.peek(3);if((t==="---"||t==="...")&&D(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,t==="---"?"doc":"stream"}if(this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!D(this.charAt(1)))this.indentNext=this.indentValue;return yield*this.parseBlockStart()}*parseBlockStart(){let[e,t]=this.peek(2);if(!t&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&D(t)){let s=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=s,"block-start"}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let e=this.getLine();if(e===null)return this.setNext("doc");let t=yield*this.pushIndicators();switch(e[t]){case"#":yield*this.pushCount(e.length-t);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(Js),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return t+=yield*this.parseBlockScalarHeader(),t+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-t),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,t,s=-1;do{if(e=yield*this.pushNewline(),e>0)t=yield*this.pushSpaces(!1),this.indentValue=s=t;else t=0;t+=yield*this.pushSpaces(!0)}while(e+t>0);let n=this.getLine();if(n===null)return this.setNext("flow");if(s!==-1&&s<this.indentNext&&n[0]!=="#"||s===0&&(n.startsWith("---")||n.startsWith("..."))&&D(n[3])){if(!(s===this.indentNext-1&&this.flowLevel===1&&(n[0]==="]"||n[0]==="}")))return this.flowLevel=0,yield Ke.FLOW_END,yield*this.parseLineStart()}let i=0;while(n[i]===",")i+=yield*this.pushCount(1),i+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(i+=yield*this.pushIndicators(),n[i]){case void 0:return"flow";case"#":return yield*this.pushCount(n.length-i),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(Js),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let r=this.charAt(1);if(this.flowKey||D(r)||r===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let e=this.charAt(0),t=this.buffer.indexOf(e,this.pos+1);if(e==="'")while(t!==-1&&this.buffer[t+1]==="'")t=this.buffer.indexOf("'",t+2);else while(t!==-1){let i=0;while(this.buffer[t-1-i]==="\\")i+=1;if(i%2===0)break;t=this.buffer.indexOf('"',t+1)}let s=this.buffer.substring(0,t),n=s.indexOf(`
125
+ `,this.pos);if(n!==-1){while(n!==-1){let i=this.continueScalar(n+1);if(i===-1)break;n=s.indexOf(`
126
+ `,i)}if(n!==-1)t=n-(s[n-1]==="\r"?2:1)}if(t===-1){if(!this.atEnd)return this.setNext("quoted-scalar");t=this.buffer.length}return yield*this.pushToIndex(t+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;while(!0){let t=this.buffer[++e];if(t==="+")this.blockScalarKeep=!0;else if(t>"0"&&t<="9")this.blockScalarIndent=Number(t)-1;else if(t!=="-")break}return yield*this.pushUntil((t)=>D(t)||t==="#")}*parseBlockScalar(){let e=this.pos-1,t=0,s;e:for(let i=this.pos;s=this.buffer[i];++i)switch(s){case" ":t+=1;break;case`
127
+ `:e=i,t=0;break;case"\r":{let r=this.buffer[i+1];if(!r&&!this.atEnd)return this.setNext("block-scalar");if(r===`
128
+ `)break}default:break e}if(!s&&!this.atEnd)return this.setNext("block-scalar");if(t>=this.indentNext){if(this.blockScalarIndent===-1)this.indentNext=t;else this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{let i=this.continueScalar(e+1);if(i===-1)break;e=this.buffer.indexOf(`
129
+ `,i)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext("block-scalar");e=this.buffer.length}}let n=e+1;s=this.buffer[n];while(s===" ")s=this.buffer[++n];if(s==="\t"){while(s==="\t"||s===" "||s==="\r"||s===`
130
+ `)s=this.buffer[++n];e=n-1}else if(!this.blockScalarKeep)do{let i=e-1,r=this.buffer[i];if(r==="\r")r=this.buffer[--i];let o=i;while(r===" ")r=this.buffer[--i];if(r===`
131
+ `&&i>=this.pos&&i+1+t>o)e=i;else break}while(!0);return yield Ke.SCALAR,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e=this.flowLevel>0,t=this.pos-1,s=this.pos-1,n;while(n=this.buffer[++s])if(n===":"){let i=this.buffer[s+1];if(D(i)||e&&$t.has(i))break;t=s}else if(D(n)){let i=this.buffer[s+1];if(n==="\r")if(i===`
132
+ `)s+=1,n=`
133
+ `,i=this.buffer[s+1];else t=s;if(i==="#"||e&&$t.has(i))break;if(n===`
134
+ `){let r=this.continueScalar(s+1);if(r===-1)break;s=Math.max(s,r-2)}}else{if(e&&$t.has(n))break;t=s}if(!n&&!this.atEnd)return this.setNext("plain-scalar");return yield Ke.SCALAR,yield*this.pushToIndex(t+1,!0),e?"flow":"doc"}*pushCount(e){if(e>0)return yield this.buffer.substr(this.pos,e),this.pos+=e,e;return 0}*pushToIndex(e,t){let s=this.buffer.slice(this.pos,e);if(s)return yield s,this.pos+=s.length,s.length;else if(t)yield"";return 0}*pushIndicators(){let e=0;e:while(!0){switch(this.charAt(0)){case"!":e+=yield*this.pushTag(),e+=yield*this.pushSpaces(!0);continue e;case"&":e+=yield*this.pushUntil(Js),e+=yield*this.pushSpaces(!0);continue e;case"-":case"?":case":":{let t=this.flowLevel>0,s=this.charAt(1);if(D(s)||t&&$t.has(s)){if(!t)this.indentNext=this.indentValue+1;else if(this.flowKey)this.flowKey=!1;e+=yield*this.pushCount(1),e+=yield*this.pushSpaces(!0);continue e}}}break e}return e}*pushTag(){if(this.charAt(1)==="<"){let e=this.pos+2,t=this.buffer[e];while(!D(t)&&t!==">")t=this.buffer[++e];return yield*this.pushToIndex(t===">"?e+1:e,!1)}else{let e=this.pos+1,t=this.buffer[e];while(t)if(nh.has(t))t=this.buffer[++e];else if(t==="%"&&Sr.has(this.buffer[e+1])&&Sr.has(this.buffer[e+2]))t=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){let e=this.buffer[this.pos];if(e===`
135
+ `)return yield*this.pushCount(1);else if(e==="\r"&&this.charAt(1)===`
136
+ `)return yield*this.pushCount(2);else return 0}*pushSpaces(e){let t=this.pos-1,s;do s=this.buffer[++t];while(s===" "||e&&s==="\t");let n=t-this.pos;if(n>0)yield this.buffer.substr(this.pos,n),this.pos=t;return n}*pushUntil(e){let t=this.pos,s=this.buffer[t];while(!e(s))s=this.buffer[++t];return yield*this.pushToIndex(t,!1)}}rh.Lexer=vr});var Ws=y(function(ah){class kr{constructor(){this.lineStarts=[],this.addNewLine=(e)=>this.lineStarts.push(e),this.linePos=(e)=>{let t=0,s=this.lineStarts.length;while(t<s){let i=t+s>>1;if(this.lineStarts[i]<e)t=i+1;else s=i}if(this.lineStarts[t]===e)return{line:t+1,col:1};if(t===0)return{line:0,col:e};let n=this.lineStarts[t-1];return{line:t,col:e-n+1}}}}ah.LineCounter=kr});var Gs=y(function(fh){var ch=Ue("process"),Cr=Tt(),uh=zs();function G(e,t){for(let s=0;s<e.length;++s)if(e[s].type===t)return!0;return!1}function Nr(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 Or(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 Mt(e){switch(e.type){case"document":return e.start;case"block-map":{let 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 ye(e){if(e.length===0)return[];let t=e.length;e:while(--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}while(e[++t]?.type==="space");return e.splice(t,e.length)}function xt(e,t){if(t.length<1e5)Array.prototype.push.apply(e,t);else for(let s=0;s<t.length;++s)e.push(t[s])}function Ar(e){if(e.start.type==="flow-seq-start"){for(let t of e.items)if(t.sep&&!t.value&&!G(t.start,"explicit-key-ind")&&!G(t.sep,"map-value-ind")){if(t.key)t.value=t.key;if(delete t.key,Or(t.value))if(t.value.end)xt(t.value.end,t.sep);else t.value.end=t.sep;else xt(t.start,t.sep);delete t.sep}}}class Lr{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new uh.Lexer,this.onNewLine=e}*parse(e,t=!1){if(this.onNewLine&&this.offset===0)this.onNewLine(0);for(let s of this.lexer.lex(e,t))yield*this.next(s);if(!t)yield*this.end()}*next(e){if(this.source=e,ch.env.LOG_TOKENS)console.log("|",Cr.prettyToken(e));if(this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}let t=Cr.tokenType(e);if(!t){let s=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:s,source:e}),this.offset+=e.length}else if(t==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=t,yield*this.step(),t){case"newline":if(this.atNewLine=!0,this.indent=0,this.onNewLine)this.onNewLine(this.offset+e.length);break;case"space":if(this.atNewLine&&e[0]===" ")this.indent+=e.length;break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":if(this.atNewLine)this.indent+=e.length;break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}}*end(){while(this.stack.length>0)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let e=this.peek(1);if(this.type==="doc-end"&&e?.type!=="doc-end"){while(this.stack.length>0)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){let t=e??this.stack.pop();if(!t)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield t;else{let s=this.peek(1);if(t.type==="block-scalar")t.indent="indent"in s?s.indent:0;else if(t.type==="flow-collection"&&s.type==="document")t.indent=0;if(t.type==="flow-collection")Ar(t);switch(s.type){case"document":s.value=t;break;case"block-scalar":s.props.push(t);break;case"block-map":{let n=s.items[s.items.length-1];if(n.value){s.items.push({start:[],key:t,sep:[]}),this.onKeyLine=!0;return}else if(n.sep)n.value=t;else{Object.assign(n,{key:t,sep:[]}),this.onKeyLine=!n.explicitKey;return}break}case"block-seq":{let n=s.items[s.items.length-1];if(n.value)s.items.push({start:[],value:t});else n.value=t;break}case"flow-collection":{let n=s.items[s.items.length-1];if(!n||n.value)s.items.push({start:[],key:t,sep:[]});else if(n.sep)n.value=t;else Object.assign(n,{key:t,sep:[]});return}default:yield*this.pop(),yield*this.pop(t)}if((s.type==="document"||s.type==="block-map"||s.type==="block-seq")&&(t.type==="block-map"||t.type==="block-seq")){let n=t.items[t.items.length-1];if(n&&!n.sep&&!n.value&&n.start.length>0&&Nr(n.start)===-1&&(t.indent===0||n.start.every((i)=>i.type!=="comment"||i.indent<t.indent))){if(s.type==="document")s.end=n.start;else s.items.push({start:n.start});t.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":{let e={type:"document",offset:this.offset,start:[]};if(this.type==="doc-start")e.start.push(this.sourceToken);this.stack.push(e);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(e){if(e.value)return yield*this.lineEnd(e);switch(this.type){case"doc-start":{if(Nr(e.start)!==-1)yield*this.pop(),yield*this.step();else e.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":e.start.push(this.sourceToken);return}let t=this.startBlockValue(e);if(t)this.stack.push(t);else yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(e){if(this.type==="map-value-ind"){let t=Mt(this.peek(2)),s=ye(t),n;if(e.end)n=e.end,n.push(this.sourceToken),delete e.end;else n=[this.sourceToken];let i={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:s,key:e,sep:n}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=i}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case"space":case"comment":case"newline":e.props.push(this.sourceToken);return;case"scalar":if(e.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let t=this.source.indexOf(`
137
+ `)+1;while(t!==0)this.onNewLine(this.offset+t),t=this.source.indexOf(`
138
+ `,t)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){let t=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,t.value){let s="end"in t.value?t.value.end:void 0;if((Array.isArray(s)?s[s.length-1]:void 0)?.type==="comment")s?.push(this.sourceToken);else e.items.push({start:[this.sourceToken]})}else if(t.sep)t.sep.push(this.sourceToken);else t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else{if(this.atIndentedComment(t.start,e.indent)){let n=e.items[e.items.length-2]?.value?.end;if(Array.isArray(n)){xt(n,t.start),n.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let s=!this.onKeyLine&&this.indent===e.indent,n=s&&(t.sep||t.explicitKey)&&this.type!=="seq-item-ind",i=[];if(n&&t.sep&&!t.value){let r=[];for(let o=0;o<t.sep.length;++o){let a=t.sep[o];switch(a.type){case"newline":r.push(o);break;case"space":break;case"comment":if(a.indent>e.indent)r.length=0;break;default:r.length=0}}if(r.length>=2)i=t.sep.splice(r[1])}switch(this.type){case"anchor":case"tag":if(n||t.value)i.push(this.sourceToken),e.items.push({start:i}),this.onKeyLine=!0;else if(t.sep)t.sep.push(this.sourceToken);else t.start.push(this.sourceToken);return;case"explicit-key-ind":if(!t.sep&&!t.explicitKey)t.start.push(this.sourceToken),t.explicitKey=!0;else if(n||t.value)i.push(this.sourceToken),e.items.push({start:i,explicitKey:!0});else 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(t.explicitKey)if(!t.sep)if(G(t.start,"newline"))Object.assign(t,{key:null,sep:[this.sourceToken]});else{let r=ye(t.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]})}else if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(G(t.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(Or(t.key)&&!G(t.sep,"newline")){let r=ye(t.start),{key:o,sep:a}=t;a.push(this.sourceToken),delete t.key,delete t.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:o,sep:a}]})}else if(i.length>0)t.sep=t.sep.concat(i,this.sourceToken);else t.sep.push(this.sourceToken);else if(!t.sep)Object.assign(t,{key:null,sep:[this.sourceToken]});else if(t.value||n)e.items.push({start:i,key:null,sep:[this.sourceToken]});else if(G(t.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]});else t.sep.push(this.sourceToken);this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let r=this.flowScalar(this.type);if(n||t.value)e.items.push({start:i,key:r,sep:[]}),this.onKeyLine=!0;else if(t.sep)this.stack.push(r);else Object.assign(t,{key:r,sep:[]}),this.onKeyLine=!0;return}default:{let r=this.startBlockValue(e);if(r){if(r.type==="block-seq"){if(!t.explicitKey&&t.sep&&!G(t.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 if(s)e.items.push({start:i});this.stack.push(r);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){let t=e.items[e.items.length-1];switch(this.type){case"newline":if(t.value){let s="end"in t.value?t.value.end:void 0;if((Array.isArray(s)?s[s.length-1]:void 0)?.type==="comment")s?.push(this.sourceToken);else e.items.push({start:[this.sourceToken]})}else t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(t.start,e.indent)){let n=e.items[e.items.length-2]?.value?.end;if(Array.isArray(n)){xt(n,t.start),n.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return;case"anchor":case"tag":if(t.value||this.indent<=e.indent)break;t.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;if(t.value||G(t.start,"seq-item-ind"))e.items.push({start:[this.sourceToken]});else t.start.push(this.sourceToken);return}if(this.indent>e.indent){let s=this.startBlockValue(e);if(s){this.stack.push(s);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){let t=e.items[e.items.length-1];if(this.type==="flow-error-end"){let s;do yield*this.pop(),s=this.peek(1);while(s?.type==="flow-collection")}else if(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":if(!t||t.sep)e.items.push({start:[this.sourceToken]});else t.start.push(this.sourceToken);return;case"map-value-ind":if(!t||t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else Object.assign(t,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":if(!t||t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else t.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let n=this.flowScalar(this.type);if(!t||t.value)e.items.push({start:[],key:n,sep:[]});else if(t.sep)this.stack.push(n);else Object.assign(t,{key:n,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}let s=this.startBlockValue(e);if(s)this.stack.push(s);else yield*this.pop(),yield*this.step()}else{let s=this.peek(2);if(s.type==="block-map"&&(this.type==="map-value-ind"&&s.indent===e.indent||this.type==="newline"&&!s.items[s.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&s.type!=="flow-collection"){let n=Mt(s),i=ye(n);Ar(e);let r=e.end.splice(1,e.end.length);r.push(this.sourceToken);let o={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:i,key:e,sep:r}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=o}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let t=this.source.indexOf(`
139
+ `)+1;while(t!==0)this.onNewLine(this.offset+t),t=this.source.indexOf(`
140
+ `,t)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let t=Mt(e),s=ye(t);return s.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let t=Mt(e),s=ye(t);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){if(this.type!=="comment")return!1;if(this.indent<=t)return!1;return e.every((s)=>s.type==="newline"||s.type==="space")}*documentEnd(e){if(this.type!=="doc-mode"){if(e.end)e.end.push(this.sourceToken);else e.end=[this.sourceToken];if(this.type==="newline")yield*this.pop()}}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:if(e.end)e.end.push(this.sourceToken);else e.end=[this.sourceToken];if(this.type==="newline")yield*this.pop()}}}fh.Parser=Lr});var Tr=y(function(Sh){var Pr=Bs(),ph=_e(),Fe=De(),hh=Wt(),mh=A(),gh=Ws(),Er=Gs();function qr(e){let t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new gh.LineCounter||null,prettyErrors:t}}function yh(e,t={}){let{lineCounter:s,prettyErrors:n}=qr(t),i=new Er.Parser(s?.addNewLine),r=new Pr.Composer(t),o=Array.from(r.compose(i.parse(e)));if(n&&s)for(let a of o)a.errors.forEach(Fe.prettifyError(e,s)),a.warnings.forEach(Fe.prettifyError(e,s));if(o.length>0)return o;return Object.assign([],{empty:!0},r.streamInfo())}function Ir(e,t={}){let{lineCounter:s,prettyErrors:n}=qr(t),i=new Er.Parser(s?.addNewLine),r=new Pr.Composer(t),o=null;for(let a of r.compose(i.parse(e),!0,e.length))if(!o)o=a;else if(o.options.logLevel!=="silent"){o.errors.push(new Fe.YAMLParseError(a.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}if(n&&s)o.errors.forEach(Fe.prettifyError(e,s)),o.warnings.forEach(Fe.prettifyError(e,s));return o}function bh(e,t,s){let n=void 0;if(typeof t==="function")n=t;else if(s===void 0&&t&&typeof t==="object")s=t;let i=Ir(e,s);if(!i)return null;if(i.warnings.forEach((r)=>hh.warn(i.options.logLevel,r)),i.errors.length>0)if(i.options.logLevel!=="silent")throw i.errors[0];else i.errors=[];return i.toJS(Object.assign({reviver:n},s))}function wh(e,t,s){let n=null;if(typeof t==="function"||Array.isArray(t))n=t;else if(s===void 0&&t)s=t;if(typeof s==="string")s=s.length;if(typeof s==="number"){let i=Math.round(s);s=i<1?void 0:i>8?{indent:8}:{indent:i}}if(e===void 0){let{keepUndefined:i}=s??t??{};if(!i)return}if(mh.isDocument(e)&&!n)return e.toString(s);return new ph.Document(e,n,s).toString(s)}Sh.parse=bh;Sh.parseAllDocuments=yh;Sh.parseDocument=Ir;Sh.stringify=wh});import{hapiHome as Sm,loadGlobalConfig as vm,runtimeConsole as km}from"@mcp-com-ai/shared-utils";function tn(e,t,s={}){let n=s.warn??(()=>{}),i=new Map,r=(o,a,l,c)=>{for(let d of[o.name,...o.aliases??[]]){if(i.has(d)){let u=i.get(d);n(`Command '${d}' already provided by ${u.source==="core"?"core":u.pluginName}; ignoring declaration from ${l??"core"}`);continue}i.set(d,{...o,source:a,pluginName:l,packageName:c})}};for(let o of e)r(o,"core");for(let{plugin:o,packageName:a}of t)for(let l of o.commands)r(l,"plugin",o.name,a);return i}function Nm(e){let t=new Set;for(let[s,n]of e.entries())if(s===n.name)t.add(n);return Array.from(t).filter((s)=>!s.hidden).sort((s,n)=>s.name.localeCompare(n.name))}import{HAPI_CLI_API_VERSION as fn,satisfiesVersionRange as Xr}from"@mcp-com-ai/plugin-sdk";import{mkdir as Fr,realpath as Rt,readFile as Ve,stat as Ur,writeFile as rn}from"fs/promises";import I from"path";import{pathToFileURL as Yr}from"url";import{hasFileSystemAccess as on,resolveHapiPaths as Vr}from"@mcp-com-ai/shared-utils";function we(){let e=I.join(Vr().home,"plugins");return{root:e,nodeModules:I.join(e,"node_modules"),manifest:I.join(e,"package.json")}}function be(e){return/^(?:@[a-z0-9][a-z0-9._-]*\/)?[a-z0-9][a-z0-9._-]*$/i.test(e)}async function an(e,t=we()){if(!on||!be(e))return;let s=I.join(t.nodeModules,...e.split("/"));try{let n=await Rt(s),i=await Rt(t.nodeModules);if(!nn(n,i))return;let r=JSON.parse(await Ve(I.join(n,"package.json"),"utf8"));if(r.name!==e)return;let o=Gr(r);if(!o||!Qr(o))return;let a=I.resolve(n,o),l=await Rt(a);if(!nn(l,n))return;return Yr(l).href}catch{return}}async function ln(e,t={}){if(!on)throw Error("Managed plugins are not available without filesystem access.");let s=t.store??we(),n=await zr(e),i=await Jr(e);if(i.length===0&&n.size===0)throw Error("Provide at least one plugin package, tarball, or release directory.");await Fr(s.root,{recursive:!0}),await Hr(s);let r=await sn(s.manifest),o=t.execute??un;if(n.size>0)await Wr(s.manifest,n),await o(process.execPath,["install","--production"],s.root);if(i.length>0)await o(process.execPath,["add","--production",...i],s.root);return{packageNames:(await sn(s.manifest)).filter((l)=>!r.includes(l)),store:s}}async function cn(e,t={}){if(!be(e))throw Error(`Invalid plugin package name: ${e}`);let s=t.store??we();await(t.execute??un)(process.execPath,["remove",e],s.root)}async function Hr(e){try{await Ve(e.manifest,"utf8")}catch{await rn(e.manifest,JSON.stringify({name:"hapi-managed-plugins",private:!0,type:"module"},null,2)+`
141
+ `)}}async function un(e,t,s){if(await Bun.spawn([e,...t],{cwd:s,stdout:"inherit",stderr:"inherit",env:{...process.env,BUN_BE_BUN:"1"}}).exited)throw Error(`Plugin package operation failed: ${t.join(" ")}`)}async function Jr(e){let t=[];for(let s of e){let n=I.resolve(s);try{if(!(await Ur(n)).isDirectory()){t.push(s);continue}let r=I.join(n,"manifest.json");if(await Bun.file(r).exists())continue;else t.push(n)}catch(i){if(i instanceof Error&&i.message.includes("Release manifest"))throw i;t.push(s)}}return t}async function zr(e){let t=new Map,s=new Set;for(let r of e){let o=I.resolve(r),a=I.join(o,"manifest.json");if(!await Bun.file(a).exists())continue;let l=await Bun.file(a).json();for(let c of l.packages??[]){if(!c.name||!c.file||!be(c.name))continue;t.set(c.name,{file:I.join(o,c.file),internalDependencies:c.internalDependencies??{}})}for(let c of l.managedPlugins??[])if(be(c))s.add(c);if(s.size===0)throw Error(`Release manifest does not declare managed plugins: ${o}`)}let n=new Map,i=[...s];while(i.length>0){let r=i.pop();if(!r||n.has(r))continue;let o=t.get(r);if(!o)throw Error(`Release manifest is missing required package ${r}.`);n.set(r,`file:${o.file}`),i.push(...Object.keys(o.internalDependencies))}return n}async function Wr(e,t){let s=JSON.parse(await Ve(e,"utf8")),n=Object.fromEntries(t);await rn(e,`${JSON.stringify({...s,dependencies:{...s.dependencies??{},...n},overrides:{...s.overrides??{},...n}},null,2)}
142
+ `)}async function sn(e){let t=JSON.parse(await Ve(e,"utf8"));return Object.keys(t.dependencies??{}).filter(be)}function Gr(e){let t=e.exports&&typeof e.exports==="object"&&!Array.isArray(e.exports)?e.exports["."]??e.exports:e.exports;return Ye(t)??e.module??e.main}function Ye(e){if(typeof e==="string")return e;if(!e||typeof e!=="object"||Array.isArray(e))return;let t=e;return Ye(t.bun)??Ye(t.import)??Ye(t.default)}function Qr(e){return/\.(?:c?m?js)$/i.test(e)&&!/(?:^|\/)src(?:\/|$)/.test(e)}function nn(e,t){let s=I.relative(t,e);return s===""||!s.startsWith(`..${I.sep}`)&&s!==".."&&!I.isAbsolute(s)}var Zr=["@mcp-com-ai/plugin-openapi","@mcp-com-ai/plugin-arazzo","@mcp-com-ai/plugin-cloudflare","@mcp-com-ai/enterprise-plugin-auth","@mcp-com-ai/enterprise-plugin-licensing","@mcp-com-ai/plugin-otel"];async function pn(e={}){let t=e.warn??(()=>{}),s=new Set(e.blocklist??[]),n=[],i=new Set,r=[];for(let o of e.bundledPlugins??[])r.push({packageName:o.name,source:"bundled",plugin:o});for(let o of e.workspacePackages??[])r.push({packageName:o,source:"workspace"});for(let o of Zr)r.push({packageName:o,source:"installed"});for(let o of e.configuredPackages??[])r.push({packageName:o,source:"installed"});for(let{packageName:o,source:a,plugin:l}of r){if(i.has(o))continue;if(i.add(o),s.has(o))continue;let c=!1;try{let d=a,u;if(!l)try{u=await import(o)}catch(g){if(!dn(g))throw g;let p=await(e.resolveManagedEntrypoint??an)(o);if(!p)throw g;c=!0,u=await import(p),d="managed"}let f=l??(u?.plugin??u?.default);if(!f){t(`Plugin '${o}' loaded but did not export a plugin definition`);continue}if(f.compatibility?.cliApiVersion!==fn){t(`Plugin '${o}' declares cliApiVersion=${f.compatibility?.cliApiVersion}; CLI expects ${fn}. Skipping.`);continue}let m=f.compatibility.core;if(m&&!Xr(m.version,m.range)){t(`Plugin '${o}' resolved core ${m.version}, which does not satisfy its declared range ${m.range}. Skipping.`);continue}n.push({plugin:f,packageName:o,source:d})}catch(d){let u=d instanceof Error?d.message:String(d);if(c||!dn(d))t(`Plugin '${o}' failed to load: ${u}`)}}return n}function dn(e){if(!e||typeof e!=="object")return!1;let t=e.code;if(t==="ERR_MODULE_NOT_FOUND"||t==="MODULE_NOT_FOUND")return!0;let s=e.message??"";return/Cannot find (module|package)/i.test(s)}import{parseArgs as eo,renderCommandHelp as Bt}from"@mcp-com-ai/plugin-sdk";var He=[{command:"cloudflare",packageName:"@mcp-com-ai/plugin-cloudflare",description:"Deploy HAPI MCP servers to Cloudflare Workers (deploy, login, status).",installHint:"bun add -g @mcp-com-ai/plugin-cloudflare"},{command:"openapi",packageName:"@mcp-com-ai/plugin-openapi",description:"OpenAPI-driven tooling (init, lint, list, serve).",installHint:"bun add -g @mcp-com-ai/plugin-openapi",documentRootField:"openapi"},{command:"arazzo",packageName:"@mcp-com-ai/plugin-arazzo",description:"Arazzo workflow validation, serving, and execution.",installHint:"bun add -g @mcp-com-ai/plugin-arazzo",documentRootField:"arazzo"},{command:"workflows",packageName:"@mcp-com-ai/plugin-arazzo",description:"Alias for the Arazzo workflow command group.",installHint:"bun add -g @mcp-com-ai/plugin-arazzo",documentRootField:"arazzo"},{command:"auth",packageName:"@mcp-com-ai/enterprise-plugin-auth",description:"OAuth/Security handler configuration for `hapi serve` (enterprise tier).",installHint:"Contact La Rebelion Labs for enterprise access."},{command:"otel",packageName:"@mcp-com-ai/plugin-otel",description:"OpenTelemetry / PostHog telemetry collection for HAPI commands.",installHint:"bun add -g @mcp-com-ai/plugin-otel"},{command:"license",packageName:"@mcp-com-ai/enterprise-plugin-licensing",description:"Enterprise licensing (activation, status, import). Part of the enterprise tier.",installHint:"Contact La Rebelion Labs for enterprise access, then run `hapi plugins install <private-release-or-package>`."}];function hn(e){return He.find((t)=>t.command===e)}function mn(e){return He.find((t)=>t.documentRootField===e)}var to=new Set(["--help","-h","help"]);async function gn(e,t,s){if(t.length===0){let o=e.get("help");if(o?.run){let a=await o.run({positionals:[],options:{},rest:[]},s);return typeof a==="number"?a:0}return s.stdout.write(`Usage: hapi <command> [subcommand] [options]
143
+ `),0}let[n,...i]=t;if(!n)return 0;if(n==="--help"||n==="-h"){let o=e.get("help");if(o?.run){let a=await o.run({positionals:[],options:{},rest:[]},s);return typeof a==="number"?a:0}}if(n==="--version"||n==="-v"){let o=e.get("version");if(o?.run){let a=await o.run({positionals:[],options:{},rest:[]},s);return typeof a==="number"?a:0}}let r=e.get(n);if(!r)return so(n,s);return jt(e,r,i,s,[r.name])}async function jt(e,t,s,n,i){if(s.length>0&&to.has(s[0]))return Bt(t,n,i.slice(0,-1)),0;let r=s[0];if(t.subcommands&&t.subcommands.length>0&&r&&!r.startsWith("-")){let a=t.subcommands.find((l)=>l.name===r||l.aliases?.includes(r));if(a)return jt(e,a,s.slice(1),n,[...i,a.name]);if(!t.run)return n.stderr.write(`Unknown subcommand: ${i.join(" ")} ${r}
144
+ `),Bt(t,n,i.slice(0,-1)),1}if(!t.run)return Bt(t,n,i.slice(0,-1)),0;if(t.name==="serve"&&i.length>1){let a=e.get("serve");if(a?.source==="core")return jt(e,a,s,n,[a.name])}let o=eo(s,t.options??[]);if(o.unknownOptions?.length)n.stderr.write(`\u26A0\uFE0F Unrecognized option(s): ${o.unknownOptions.map((a)=>`--${a}`).join(", ")} \u2014 not applied. Check for a typo (see --help for valid options).
145
+ `);try{let a=await t.run(o,n);return typeof a==="number"?a:Number(process.exitCode??0)}catch(a){let{printCliError:l}=await import("@mcp-com-ai/shared-utils");return l(`\u274C ${i.join(" ")} failed`,a),1}}function so(e,t){let s=hn(e);if(s)return t.stderr.write(`
146
+ Command "${e}" is provided by ${s.packageName}, which is not installed.
147
+ `),t.stderr.write(`
148
+ ${s.description}
146
149
 
147
- `),q.stderr.write(`Install it with:
148
- ${U.installHint??`bun add -g ${U.packageName}`}
150
+ `),t.stderr.write(`Install it with:
151
+ ${s.installHint??`bun add -g ${s.packageName}`}
149
152
 
150
- `),127;return q.stderr.write(`Unknown command: ${$}
151
- `),q.stderr.write(`Run "hapi help" to see available commands.
152
- `),127}function $1($){return{name:"help",description:"Show the top-level CLI help",aliases:["--help","-h"],async run(q,U){let H=$(),z=new Map;for(let[R,G]of H.entries())if(R===G.name)z.set(R,G);let X=(R)=>U.stdout.write(R);X(`
153
- `),X(`HAPI \u2014 turn your APIs into MCP tools.
154
- `),X(`
153
+ `),127;return t.stderr.write(`Unknown command: ${e}
154
+ `),t.stderr.write(`Run "hapi help" to see available commands.
155
+ `),127}function yn(e){return{name:"help",description:"Show the top-level CLI help",aliases:["--help","-h"],async run(t,s){let n=e(),i=new Map;for(let[l,c]of n.entries())if(l===c.name)i.set(l,c);let r=(l)=>s.stdout.write(l);r(`
156
+ `),r(`HAPI \u2014 turn your APIs into MCP tools.
157
+ `),r(`
155
158
  Usage:
156
159
  hapi <command> [subcommand] [options]
157
160
 
158
- `),X(`Core commands:
159
- `);let L=[],Z=[];for(let R of z.values()){if(R.hidden)continue;if(R.source==="core")L.push(R);else Z.push(R)}L.sort((R,G)=>R.name.localeCompare(G.name)),Z.sort((R,G)=>R.name.localeCompare(G.name));for(let R of L)X(` ${R.name.padEnd(14)} ${R.description}
160
- `);if(Z.length>0){X(`
161
+ `),r(`Core commands:
162
+ `);let o=[],a=[];for(let l of i.values()){if(l.hidden)continue;if(l.source==="core")o.push(l);else a.push(l)}o.sort((l,c)=>l.name.localeCompare(c.name)),a.sort((l,c)=>l.name.localeCompare(c.name));for(let l of o)r(` ${l.name.padEnd(14)} ${l.description}
163
+ `);if(a.length>0){r(`
161
164
  Plugin commands:
162
- `);for(let R of Z){let G=R.pluginName?` (${R.pluginName})`:"";X(` ${R.name.padEnd(14)} ${R.description}${G}
163
- `)}}return X(`
165
+ `);for(let l of a){let c=l.pluginName?` (${l.pluginName})`:"";r(` ${l.name.padEnd(14)} ${l.description}${c}
166
+ `)}}return r(`
164
167
  Examples:
165
- `),X(` hapi version
166
- `),X(` hapi plugins list
167
- `),X(` hapi openapi init petstore
168
- `),X(` hapi cloudflare deploy --openapi https://.../openapi.json
168
+ `),r(` hapi version
169
+ `),r(` hapi plugins list
170
+ `),r(` hapi openapi init petstore
171
+ `),r(` hapi cloudflare deploy --openapi https://.../openapi.json
169
172
 
170
- `),X(`Documentation: https://docs.mcp.com.ai
173
+ `),r(`Documentation: https://docs.mcp.com.ai
171
174
 
172
- `),X(`Is the HAPI CLI helpful?
175
+ `),r(`Is the HAPI CLI helpful?
173
176
  Don't forget to star the project on GitHub: https://github.com/mcp-com-ai/hapimcp
174
177
 
175
- `),0}}}import{HAPI_CLI_API_VERSION as C2}from"@mcp-com-ai/plugin-sdk";var q1="1.0.1-beta.260912";var m0=q1;var U1={name:"version",aliases:["--version","-v"],description:"Show the installed CLI version",run:async($,q)=>{return q.stdout.write(`hapi ${m0}
176
- `),q.stdout.write(`plugin-contract v${C2}
177
- `),0}};function H1($){return{name:"plugins",description:"List loaded plugins and discover installable ones",subcommands:[{name:"list",description:"List the plugins currently loaded by the CLI",async run(q,U){let H=$();if(H.length===0)return U.stdout.write("No plugins loaded. Run `hapi plugins available` to see what you can install.\n"),0;U.stdout.write(`
178
+ `),0}}}import{HAPI_CLI_API_VERSION as io}from"@mcp-com-ai/plugin-sdk";var bn="1.0.2-beta.260914";var Je=bn;var wn={name:"version",aliases:["--version","-v"],description:"Show the installed CLI version",run:async(e,t)=>(t.stdout.write(`hapi ${Je}
179
+ `),t.stdout.write(`plugin-contract v${io}
180
+ `),0)};import{hasFileSystemAccess as ro,loadGlobalConfig as Sn,saveGlobalConfig as vn}from"@mcp-com-ai/shared-utils";function kn(e){return{name:"plugins",description:"List loaded plugins and discover installable ones",subcommands:[{name:"list",description:"List the plugins currently loaded by the CLI",async run(t,s){let n=e();if(n.length===0)return s.stdout.write("No plugins loaded. Run `hapi plugins available` to see what you can install.\n"),0;s.stdout.write(`
178
181
  Loaded plugins:
179
- `);for(let z of H){let X=z.plugin.displayName??z.plugin.name;if(U.stdout.write(` ${X.padEnd(36)} ${z.plugin.version.padEnd(10)} [${z.source}]
180
- `),z.plugin.description)U.stdout.write(` ${z.plugin.description}
181
- `)}return U.stdout.write(`
182
- `),0}},{name:"available",description:"Show first-party plugins the CLI knows about",async run(q,U){let H=new Set($().map((z)=>z.packageName));U.stdout.write(`
182
+ `);for(let i of n){let r=i.plugin.displayName??i.plugin.name;if(s.stdout.write(` ${r.padEnd(36)} ${i.plugin.version.padEnd(10)} [${i.source}]
183
+ `),i.plugin.description)s.stdout.write(` ${i.plugin.description}
184
+ `)}return s.stdout.write(`
185
+ `),0}},{name:"install",description:"Install trusted plugin packages into the HAPI-managed extension store",arguments:[{name:"package",description:"Package specifier, .tgz file, or release directory",required:!0,variadic:!0}],async run(t,s){if(!ro)return s.stderr.write(`Managed plugin installation is unavailable in this runtime.
186
+ `),1;let n=await ln(t.positionals),i=n.packageNames.filter(oo);if(i.length>0){let r=await Sn({force:!0});await vn({...r,plugins:[...new Set([...r.plugins??[],...i])]})}if(s.stdout.write(`Installed ${n.packageNames.length} package(s) in ${n.store.root}.
187
+ `),i.length>0)s.stdout.write(`Enabled plugins: ${i.join(", ")}
188
+ `);return 0}},{name:"remove",aliases:["uninstall"],description:"Remove a plugin package from the HAPI-managed extension store",arguments:[{name:"package",description:"Installed plugin package name",required:!0}],async run(t,s){let n=t.positionals[0];if(!n)return s.stderr.write(`Usage: hapi plugins remove <package-name>
189
+ `),1;await cn(n);let i=await Sn({force:!0});return await vn({...i,plugins:(i.plugins??[]).filter((r)=>r!==n)}),s.stdout.write(`Removed ${n} from the managed plugin store.
190
+ `),0}},{name:"store",description:"Show the HAPI-managed extension store location",async run(t,s){let n=we();return s.stdout.write(`Managed plugin store: ${n.root}
191
+ `),s.stdout.write(`Packages: ${n.nodeModules}
192
+ `),0}},{name:"available",description:"Show first-party plugins the CLI knows about",async run(t,s){let n=new Set(e().map((i)=>i.packageName));s.stdout.write(`
183
193
  First-party HAPI plugins:
184
194
 
185
- `);for(let z of v0){let X=H.has(z.packageName)?"installed":"not installed";if(U.stdout.write(` ${z.command.padEnd(12)} ${z.packageName.padEnd(40)} [${X}]
186
- `),U.stdout.write(` ${z.description}
187
- `),z.installHint&&!H.has(z.packageName))U.stdout.write(` Install: ${z.installHint}
188
- `)}return U.stdout.write(`
189
- `),0}}]}}import{HAPI_CLI_API_VERSION as j2,satisfiesVersionRange as f2}from"@mcp-com-ai/plugin-sdk";import{getHapiPaths as E2,hasFileSystemAccess as z1,isBunRuntime as g2,isCloudflareRuntime as u2}from"@mcp-com-ai/shared-utils";function X1($){return{name:"doctor",description:"Check the local HAPI environment for common configuration issues",async run(q,U){let H=(R)=>U.stdout.write(R),z=(R)=>U.stderr.write(R),X=0;H(`
195
+ `);for(let i of He){let r=n.has(i.packageName)?"installed":"not installed";if(s.stdout.write(` ${i.command.padEnd(12)} ${i.packageName.padEnd(40)} [${r}]
196
+ `),s.stdout.write(` ${i.description}
197
+ `),i.installHint&&!n.has(i.packageName))s.stdout.write(` Install: ${i.installHint}
198
+ `)}return s.stdout.write(`
199
+ `),0}}]}}function oo(e){return e.includes("plugin-")&&!e.endsWith("/plugin-sdk")}import{HAPI_CLI_API_VERSION as ao,satisfiesVersionRange as lo}from"@mcp-com-ai/plugin-sdk";import{getHapiPaths as co,hasFileSystemAccess as Cn,isBunRuntime as uo,isCloudflareRuntime as fo}from"@mcp-com-ai/shared-utils";function Nn(e){return{name:"doctor",description:"Check the local HAPI environment for common configuration issues",async run(t,s){let n=(l)=>s.stdout.write(l),i=(l)=>s.stderr.write(l),r=0;n(`
190
200
  HAPI doctor
191
- `),H(`===========
201
+ `),n(`===========
192
202
 
193
- `),H(`CLI version: ${m0}
194
- `),H(`Plugin contract: v${j2}
195
- `),H(`Runtime: ${g2?"bun":u2?"cloudflare-workers":"node/other"}
196
- `),H(`File-system access: ${z1?"yes":"no"}
197
- `);let L=E2();if(H(`
198
- HAPI_HOME: ${L.home}
199
- `),H(` specs: ${L.specs}
200
- `),H(` config: ${L.config}
201
- `),H(` logs: ${L.logs}
202
- `),H(` certs: ${L.certs}
203
- `),z1){let R=await import("fs/promises");for(let[G,I]of Object.entries({home:L.home,config:L.config,specs:L.specs}))try{if(!(await R.stat(I)).isDirectory())z(` \u2717 ${G} exists but is not a directory: ${I}
204
- `),X++}catch{H(` \u2022 ${G} missing (will be created on first use): ${I}
205
- `)}}let Z=$();H(`
206
- Loaded plugins: ${Z.length}
207
- `);for(let R of Z){H(` \u2713 ${R.plugin.name}@${R.plugin.version} [${R.source}]
208
- `);let G=R.plugin.compatibility.core;if(G){let I=f2(G.version,G.range);if(H(` core: ${G.version} ${I?"satisfies":"does not satisfy"} ${G.range}
209
- `),!I)X++}}if(Z.length===0)H(` \u2022 no plugins loaded
210
- `);return H(`
211
- `),X===0?0:1}}}import{existsSync as T2}from"fs";import{resolve as sq}from"path";import{pathToFileURL as j5}from"url";var iX=fq(),cX=E0(),rX=Oq(),lq=g0(),nX=w0(),r=M(),oX=l(),tX=b(),eX=s(),$5=i(),CZ=K$(),q5=mq(),U5=pq(),H5=dq(),C$=D2(),B2=P0();var z5=iX.Composer,X5=cX.Document,L5=rX.Schema,Z5=lq.YAMLError,R5=lq.YAMLParseError,G5=lq.YAMLWarning,J5=nX.Alias,I5=r.isAlias,Q5=r.isCollection,D5=r.isDocument,B5=r.isMap,T5=r.isNode,O5=r.isPair,P5=r.isScalar,Y5=r.isSeq,w5=oX.Pair,V5=tX.Scalar,_5=eX.YAMLMap,W5=$5.YAMLSeq;var F5=q5.Lexer,A5=U5.LineCounter,M5=H5.Parser,aq=C$.parse,K5=C$.parseAllDocuments,b5=C$.parseDocument,N5=C$.stringify,S5=B2.visit,C5=B2.visitAsync;import{DEFAULT_DOCUMENT_SOURCE_POLICY as j$,assertRemoteDocumentUrl as f5,redactDocumentUrl as E5}from"@mcp-com-ai/plugin-sdk";async function O2($,q){let U=$.trim();if(!U)return;let H=x5(U);if(H?.protocol==="http:"||H?.protocol==="https:")return y5(U,H,q);if(H&&H.protocol!=="file:"&&H.protocol!=="path:")throw Error(`Unsupported document source scheme: ${H.protocol}`);let z=H?.protocol==="file:"?Bun.fileURLToPath(H):g5(H?.protocol==="path:"?k5(H):U,q);if(!z)return;return u5(U,z,q.maxBytes??j$.maxBytes)}function g5($,q){let U=sq(q.cwd,$);if(T2(U))return U;let H=sq(q.hapiHome,"specs");for(let z of["",".json",".yaml",".yml"]){let X=sq(H,`${$}${z}`);if(T2(X))return X}return}async function u5($,q,U){let H=Bun.file(q);if(H.size>U)throw Error(`Document source exceeds ${U} bytes: ${q}`);let z=await H.text();Y2(z,U,q);let X=j5(q).href;return w2({identifier:$,canonicalUri:X,baseUri:new URL(".",X).href,raw:z,document:P2(z,q),remote:!1})}async function y5($,q,U){let H=U.fetchImpl??fetch,z=U.maxBytes??j$.maxBytes,X=new AbortController,L=setTimeout(()=>X.abort(),U.timeoutMs??j$.timeoutMs),Z=q;try{for(let R=0;R<=j$.maxRedirects;R++){f5(Z);let G=await H(Z,{redirect:"manual",signal:X.signal});if(h5(G.status)){let Q=G.headers.get("location");if(!Q)throw Error(`Redirect from ${H0(Z)} has no Location header`);Z=new URL(Q,Z);continue}if(!G.ok)throw Error(`Unable to load ${H0(Z)}: HTTP ${G.status}`);let I=Number(G.headers.get("content-length"));if(Number.isFinite(I)&&I>z)throw Error(`Document source exceeds ${z} bytes: ${H0(Z)}`);let J=await G.text();return Y2(J,z,H0(Z)),w2({identifier:$,canonicalUri:Z.href,baseUri:new URL(".",Z).href,raw:J,document:P2(J,H0(Z)),remote:!0})}throw Error(`Too many redirects while loading ${H0(q)}`)}catch(R){if(X.signal.aborted)throw Error(`Timed out loading ${H0(Z)}`);throw R}finally{clearTimeout(L)}}function P2($,q){try{let U=aq($);if(!U||typeof U!=="object"||Array.isArray(U))throw Error("document root must be an object");return U}catch(U){throw Error(`Unable to parse ${q}: ${U instanceof Error?U.message:String(U)}`)}}function Y2($,q,U){if(new TextEncoder().encode($).byteLength>q)throw Error(`Document source exceeds ${q} bytes: ${U}`)}function w2($){return Object.freeze($)}function h5($){return[301,302,303,307,308].includes($)}function x5($){try{return new URL($)}catch{return}}function k5($){let q=decodeURIComponent($.pathname);return $.hostname?`${$.hostname}${q}`:q}function H0($){return E5($)}function _2($){let q=()=>$().flatMap((U)=>U.plugin.serveProviders??[]);return{name:"serve",description:"Serve an OpenAPI or Arazzo document with the matching installed plugin",arguments:[{name:"source",description:"Project name, local JSON/YAML file, or remote document URL",required:!1}],get options(){return m5(q())},async run(U,H){return v5(q(),U,H)}}}async function v5($,q,U){let H=typeof q.options.specs==="string"?q.options.specs:void 0,z=typeof q.options.openapi==="string"?q.options.openapi:void 0;if(H&&z)return U.stderr.write(`Use either --specs or --openapi, not both.
212
- `),1;let X=H??z??q.positionals[0]??"",L=await O2(X,{cwd:U.cwd,hapiHome:U.hapiHome});if(!L){let I=$.filter((J)=>J.legacyFallback);if(I.length!==1)return U.stderr.write(`Unable to resolve document source: ${X||"(missing)"}
213
- `),1;return V2(await I[0].serve({source:L,invocation:q},U))}let Z=L.document,R=$.filter((I)=>typeof Z[I.rootField]==="string");if(R.length>1)return U.stderr.write(`Ambiguous document ${L.identifier}: multiple root fields matched (${R.map((I)=>I.rootField).join(", ")})
214
- `),1;if(R.length===0){let I=Object.keys(Z).map((J)=>tq(J)).find(Boolean);if(I)return U.stderr.write(`Document type requires ${I.packageName}, which is not installed.
215
- `),U.stderr.write(`Install it with:
216
- ${I.installHint??`bun add -g ${I.packageName}`}
217
- `),127;return U.stderr.write(`Unknown document type: expected one root version field such as "openapi" or "arazzo".
218
- `),1}let G=R[0];if(z&&G.kind!=="openapi")return U.stderr.write(`Expected an OpenAPI document from --openapi, received ${G.kind}.
219
- `),1;return V2(await G.serve({source:L,invocation:q},U))}function m5($){let q=new Map;for(let U of $)for(let H of U.options??[]){let z=q.get(H.name);if(z&&(z.type!==H.type||z.alias!==H.alias))throw Error(`Incompatible --${H.name} declarations from serve providers`);if(!z)q.set(H.name,H)}return[...q.values()]}function V2($){return typeof $==="number"?$:Number(process.exitCode??0)}function W2($){return[$1($.getRegistry),U1,_2($.getLoaded),H1($.getLoaded),X1($.getLoaded)]}async function tZ($){let q=$.stdout??process.stdout,U=$.stderr??process.stderr,H=$.stdin??process.stdin,z=$.env??process.env,X=$.cwd??process.cwd(),L=$.silent??!1,Z=(D)=>{if(!L)U.write(`warn: ${D}
220
- `)},R=await d5().catch(()=>({plugins:void 0,pluginsDisabled:void 0})),G=await nq({bundledPlugins:$.bundledPlugins,workspacePackages:$.workspacePackages,configuredPackages:Array.isArray(R.plugins)?R.plugins:void 0,blocklist:Array.isArray(R.pluginsDisabled)?R.pluginsDisabled:void 0,warn:Z}),I=new Map,T=W2({getRegistry:()=>I,getLoaded:()=>G});I=cq(T,G,{warn:Z});let P={cwd:X,env:z,stdout:q,stderr:U,stdin:H,rawArgv:$.argv,hapiHome:p5,services:new Map};for(let{plugin:D}of G)if(typeof D.onLoad==="function")try{await D.onLoad(P)}catch(B){Z(`Plugin '${D.name}' onLoad failed: ${B instanceof Error?B.message:String(B)}`)}try{return await eq(I,$.argv,P)}catch(D){return l5.error(D),1}}export{eq as runCommand,tZ as runCli,nq as loadInstalledPlugins,cq as buildCommandRegistry};
203
+ `),n(`CLI version: ${Je}
204
+ `),n(`Plugin contract: v${ao}
205
+ `),n(`Runtime: ${uo?"bun":fo?"cloudflare-workers":"node/other"}
206
+ `),n(`File-system access: ${Cn?"yes":"no"}
207
+ `);let o=co();if(n(`
208
+ HAPI_HOME: ${o.home}
209
+ `),n(` specs: ${o.specs}
210
+ `),n(` config: ${o.config}
211
+ `),n(` logs: ${o.logs}
212
+ `),n(` certs: ${o.certs}
213
+ `),n(` plugins: ${o.plugins}
214
+ `),Cn){let l=await import("fs/promises");for(let[c,d]of Object.entries({home:o.home,config:o.config,specs:o.specs,plugins:o.plugins}))try{if(!(await l.stat(d)).isDirectory())i(` \u2717 ${c} exists but is not a directory: ${d}
215
+ `),r++}catch{n(` \u2022 ${c} missing (will be created on first use): ${d}
216
+ `)}}let a=e();n(`
217
+ Loaded plugins: ${a.length}
218
+ `);for(let l of a){n(` \u2713 ${l.plugin.name}@${l.plugin.version} [${l.source}]
219
+ `);let c=l.plugin.compatibility.core;if(c){let d=lo(c.version,c.range);if(n(` core: ${c.version} ${d?"satisfies":"does not satisfy"} ${c.range}
220
+ `),!d)r++}}if(a.length===0)n(` \u2022 no plugins loaded
221
+ `);return n(`
222
+ `),r===0?0:1}}}import{existsSync as Mr}from"fs";import{resolve as Zs}from"path";import{pathToFileURL as cm}from"url";var Ah=Bs(),Oh=_e(),Lh=Cs(),Qs=De(),Ph=ke(),Q=A(),Eh=H(),qh=L(),Ih=z(),Th=W(),gy=Tt(),$h=zs(),Mh=Ws(),xh=Gs(),_t=Tr(),$r=Se();var _h=Ah.Composer,Dh=Oh.Document,Rh=Lh.Schema,{YAMLError:Bh,YAMLParseError:jh,YAMLWarning:Kh}=Qs,Fh=Ph.Alias,{isAlias:Uh,isCollection:Yh,isDocument:Vh,isMap:Hh,isNode:Jh,isPair:zh,isScalar:Wh,isSeq:Gh}=Q,Qh=Eh.Pair,Xh=qh.Scalar,Zh=Ih.YAMLMap,em=Th.YAMLSeq;var tm=$h.Lexer,sm=Mh.LineCounter,nm=xh.Parser,{parse:Xs,parseAllDocuments:im,parseDocument:rm,stringify:om}=_t,{visit:am,visitAsync:lm}=$r;import{DEFAULT_DOCUMENT_SOURCE_POLICY as Dt,assertRemoteDocumentUrl as um,redactDocumentUrl as fm}from"@mcp-com-ai/plugin-sdk";async function xr(e,t){let s=e.trim();if(!s)return;let n=gm(s);if(n?.protocol==="http:"||n?.protocol==="https:")return hm(s,n,t);if(n&&n.protocol!=="file:"&&n.protocol!=="path:")throw Error(`Unsupported document source scheme: ${n.protocol}`);let i=n?.protocol==="file:"?Bun.fileURLToPath(n):dm(n?.protocol==="path:"?ym(n):s,t);if(!i)return;return pm(s,i,t.maxBytes??Dt.maxBytes)}function dm(e,t){let s=Zs(t.cwd,e);if(Mr(s))return s;let n=Zs(t.hapiHome,"specs");for(let i of["",".json",".yaml",".yml"]){let r=Zs(n,`${e}${i}`);if(Mr(r))return r}return}async function pm(e,t,s){let n=Bun.file(t);if(n.size>s)throw Error(`Document source exceeds ${s} bytes: ${t}`);let i=await n.text();Dr(i,s,t);let r=cm(t).href;return Rr({identifier:e,canonicalUri:r,baseUri:new URL(".",r).href,raw:i,document:_r(i,t),remote:!1})}async function hm(e,t,s){let n=s.fetchImpl??fetch,i=s.maxBytes??Dt.maxBytes,r=new AbortController,o=setTimeout(()=>r.abort(),s.timeoutMs??Dt.timeoutMs),a=t;try{for(let l=0;l<=Dt.maxRedirects;l++){um(a);let c=await n(a,{redirect:"manual",signal:r.signal});if(mm(c.status)){let f=c.headers.get("location");if(!f)throw Error(`Redirect from ${re(a)} has no Location header`);a=new URL(f,a);continue}if(!c.ok)throw Error(`Unable to load ${re(a)}: HTTP ${c.status}`);let d=Number(c.headers.get("content-length"));if(Number.isFinite(d)&&d>i)throw Error(`Document source exceeds ${i} bytes: ${re(a)}`);let u=await c.text();return Dr(u,i,re(a)),Rr({identifier:e,canonicalUri:a.href,baseUri:new URL(".",a).href,raw:u,document:_r(u,re(a)),remote:!0})}throw Error(`Too many redirects while loading ${re(t)}`)}catch(l){if(r.signal.aborted)throw Error(`Timed out loading ${re(a)}`);throw l}finally{clearTimeout(o)}}function _r(e,t){try{let s=Xs(e);if(!s||typeof s!=="object"||Array.isArray(s))throw Error("document root must be an object");return s}catch(s){throw Error(`Unable to parse ${t}: ${s instanceof Error?s.message:String(s)}`)}}function Dr(e,t,s){if(new TextEncoder().encode(e).byteLength>t)throw Error(`Document source exceeds ${t} bytes: ${s}`)}function Rr(e){return Object.freeze(e)}function mm(e){return[301,302,303,307,308].includes(e)}function gm(e){try{return new URL(e)}catch{return}}function ym(e){let t=decodeURIComponent(e.pathname);return e.hostname?`${e.hostname}${t}`:t}function re(e){return fm(e)}function jr(e){let t=()=>e().flatMap((s)=>s.plugin.serveProviders??[]);return{name:"serve",description:"Serve an OpenAPI or Arazzo document with the matching installed plugin",arguments:[{name:"source",description:"Project name, local JSON/YAML file, or remote document URL",required:!1}],get options(){return wm(t())},get longHelp(){return t().find((s)=>s.longHelp)?.longHelp},async run(s,n){return bm(t(),s,n)}}}async function bm(e,t,s){let n=typeof t.options.specs==="string"?t.options.specs:void 0,i=typeof t.options.openapi==="string"?t.options.openapi:void 0;if(n&&i)return s.stderr.write(`Use either --specs or --openapi, not both.
223
+ `),1;let r=n??i??t.positionals[0]??"",o=await xr(r,{cwd:s.cwd,hapiHome:s.hapiHome});if(!o){let d=e.filter((u)=>u.legacyFallback);if(d.length!==1)return s.stderr.write(`Unable to resolve document source: ${r||"(missing)"}
224
+ `),1;return Br(await d[0].serve({source:o,invocation:t},s))}let a=o.document,l=e.filter((d)=>typeof a[d.rootField]==="string");if(l.length>1)return s.stderr.write(`Ambiguous document ${o.identifier}: multiple root fields matched (${l.map((d)=>d.rootField).join(", ")})
225
+ `),1;if(l.length===0){let d=Object.keys(a).map((u)=>mn(u)).find(Boolean);if(d)return s.stderr.write(`Document type requires ${d.packageName}, which is not installed.
226
+ `),s.stderr.write(`Install it with:
227
+ ${d.installHint??`bun add -g ${d.packageName}`}
228
+ `),127;return s.stderr.write(`Unknown document type: expected one root version field such as "openapi" or "arazzo".
229
+ `),1}let c=l[0];if(i&&c.kind!=="openapi")return s.stderr.write(`Expected an OpenAPI document from --openapi, received ${c.kind}.
230
+ `),1;return Br(await c.serve({source:o,invocation:t},s))}function wm(e){let t=new Map;for(let s of e)for(let n of s.options??[]){let i=t.get(n.name);if(i&&(i.type!==n.type||i.alias!==n.alias))throw Error(`Incompatible --${n.name} declarations from serve providers`);if(!i)t.set(n.name,n)}return[...t.values()]}function Br(e){return typeof e==="number"?e:Number(process.exitCode??0)}function Kr(e){return[yn(e.getRegistry),wn,jr(e.getLoaded),kn(e.getLoaded),Nn(e.getLoaded)]}async function Ry(e){let t=e.stdout??process.stdout,s=e.stderr??process.stderr,n=e.stdin??process.stdin,i=e.env??process.env,r=e.cwd??process.cwd(),o=e.silent??!1,a=(p)=>{if(!o)s.write(`warn: ${p}
231
+ `)},l=await vm().catch(()=>({plugins:void 0,pluginsDisabled:void 0})),c=await pn({bundledPlugins:e.bundledPlugins,workspacePackages:e.workspacePackages,configuredPackages:Array.isArray(l.plugins)?l.plugins:void 0,blocklist:[...Array.isArray(l.pluginsDisabled)?l.pluginsDisabled:[],...e.pluginsDisabled??[]],warn:a}),d=new Map,m=Kr({getRegistry:()=>d,getLoaded:()=>c});d=tn(m,c,{warn:a});let g={cwd:r,env:i,stdout:t,stderr:s,stdin:n,rawArgv:e.argv,hapiHome:Sm,services:new Map};for(let{plugin:p}of c)if(typeof p.onLoad==="function")try{await p.onLoad(g)}catch(h){a(`Plugin '${p.name}' onLoad failed: ${h instanceof Error?h.message:String(h)}`)}try{return await gn(d,e.argv,g)}catch(p){return km.error(p),1}}export{tn as buildCommandRegistry,pn as loadInstalledPlugins,Ry as runCli,gn as runCommand};