@uibot/skills 0.20.0 → 0.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,73 +1,73 @@
1
1
  // @bun
2
- var Ul=Object.create;var{getPrototypeOf:Kl,defineProperty:ci,getOwnPropertyNames:Hl}=Object;var ui=Object.prototype.hasOwnProperty;function Yl(e){return this[e]}var Gl,zl,Wl=(e,t,r)=>{var n=e!=null&&typeof e==="object";if(n){var i=t?Gl??=new WeakMap:zl??=new WeakMap,o=i.get(e);if(o)return o}r=e!=null?Ul(Kl(e)):{};let s=t||!e||!e.__esModule||!ui.call(e,"default")?ci(r,"default",{value:e,enumerable:!0}):r;if(e&&typeof e==="object"||typeof e==="function"){for(let a of Hl(e))if(!ui.call(s,a))ci(s,a,{get:Yl.bind(e,a),enumerable:!0})}if(n)i.set(e,s);return s};var m=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var mt=import.meta.require;var P=m(function(lc){var Or=Symbol.for("yaml.alias"),di=Symbol.for("yaml.document"),ht=Symbol.for("yaml.map"),pi=Symbol.for("yaml.pair"),Dr=Symbol.for("yaml.scalar"),yt=Symbol.for("yaml.seq"),Z=Symbol.for("yaml.node.type"),tc=(e)=>!!e&&typeof e==="object"&&e[Z]===Or,rc=(e)=>!!e&&typeof e==="object"&&e[Z]===di,nc=(e)=>!!e&&typeof e==="object"&&e[Z]===ht,ic=(e)=>!!e&&typeof e==="object"&&e[Z]===pi,fi=(e)=>!!e&&typeof e==="object"&&e[Z]===Dr,oc=(e)=>!!e&&typeof e==="object"&&e[Z]===yt;function gi(e){if(e&&typeof e==="object")switch(e[Z]){case ht:case yt:return!0}return!1}function sc(e){if(e&&typeof e==="object")switch(e[Z]){case Or:case ht:case Dr:case yt:return!0}return!1}var ac=(e)=>(fi(e)||gi(e))&&!!e.anchor;lc.ALIAS=Or;lc.DOC=di;lc.MAP=ht;lc.NODE_TYPE=Z;lc.PAIR=pi;lc.SCALAR=Dr;lc.SEQ=yt;lc.hasAnchor=ac;lc.isAlias=tc;lc.isCollection=gi;lc.isDocument=rc;lc.isMap=nc;lc.isNode=sc;lc.isPair=ic;lc.isScalar=fi;lc.isSeq=oc});var Fe=m(function(Rc){var q=P(),j=Symbol("break visit"),mi=Symbol("skip children"),W=Symbol("remove node");function bt(e,t){let r=hi(t);if(q.isDocument(e)){if(we(null,e.contents,r,Object.freeze([e]))===W)e.contents=null}else we(null,e,r,Object.freeze([]))}bt.BREAK=j;bt.SKIP=mi;bt.REMOVE=W;function we(e,t,r,n){let i=yi(e,t,r,n);if(q.isNode(i)||q.isPair(i))return bi(e,n,i),we(e,i,r,n);if(typeof i!=="symbol"){if(q.isCollection(t)){n=Object.freeze(n.concat(t));for(let o=0;o<t.items.length;++o){let s=we(o,t.items[o],r,n);if(typeof s==="number")o=s-1;else if(s===j)return j;else if(s===W)t.items.splice(o,1),o-=1}}else if(q.isPair(t)){n=Object.freeze(n.concat(t));let o=we("key",t.key,r,n);if(o===j)return j;else if(o===W)t.key=null;let s=we("value",t.value,r,n);if(s===j)return j;else if(s===W)t.value=null}}return i}async function Ct(e,t){let r=hi(t);if(q.isDocument(e)){if(await xe(null,e.contents,r,Object.freeze([e]))===W)e.contents=null}else await xe(null,e,r,Object.freeze([]))}Ct.BREAK=j;Ct.SKIP=mi;Ct.REMOVE=W;async function xe(e,t,r,n){let i=await yi(e,t,r,n);if(q.isNode(i)||q.isPair(i))return bi(e,n,i),xe(e,i,r,n);if(typeof i!=="symbol"){if(q.isCollection(t)){n=Object.freeze(n.concat(t));for(let o=0;o<t.items.length;++o){let s=await xe(o,t.items[o],r,n);if(typeof s==="number")o=s-1;else if(s===j)return j;else if(s===W)t.items.splice(o,1),o-=1}}else if(q.isPair(t)){n=Object.freeze(n.concat(t));let o=await xe("key",t.key,r,n);if(o===j)return j;else if(o===W)t.key=null;let s=await xe("value",t.value,r,n);if(s===j)return j;else if(s===W)t.value=null}}return i}function hi(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 yi(e,t,r,n){if(typeof r==="function")return r(e,t,n);if(q.isMap(t))return r.Map?.(e,t,n);if(q.isSeq(t))return r.Seq?.(e,t,n);if(q.isPair(t))return r.Pair?.(e,t,n);if(q.isScalar(t))return r.Scalar?.(e,t,n);if(q.isAlias(t))return r.Alias?.(e,t,n);return}function bi(e,t,r){let n=t[t.length-1];if(q.isCollection(n))n.items[e]=r;else if(q.isPair(n))if(e==="key")n.key=r;else n.value=r;else if(q.isDocument(n))n.contents=r;else{let i=q.isAlias(n)?"alias":"scalar";throw Error(`Cannot replace node with ${i} parent`)}}Rc.visit=bt;Rc.visitAsync=Ct});var Lr=m(function(Tc){var Ci=P(),Pc=Fe(),Ec={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},Nc=(e)=>e.replace(/[!,[\]{}]/g,(t)=>Ec[t]);class V{constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},V.defaultYaml,e),this.tags=Object.assign({},V.defaultTags,t)}clone(){let e=new V(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){let e=new V(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:V.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},V.defaultTags);break}return e}add(e,t){if(this.atNextDocument)this.yaml={explicit:V.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},V.defaultTags),this.atNextDocument=!1;let r=e.trim().split(/[ \t]+/),n=r.shift();switch(n){case"%TAG":{if(r.length!==2){if(t(0,"%TAG directive should contain exactly two parts"),r.length<2)return!1}let[i,o]=r;return this.tags[i]=o,!0}case"%YAML":{if(this.yaml.explicit=!0,r.length!==1)return t(0,"%YAML directive should contain exactly one part"),!1;let[i]=r;if(i==="1.1"||i==="1.2")return this.yaml.version=i,!0;else{let o=/^\d+\.\d+$/.test(i);return t(6,`Unsupported YAML version ${i}`,o),!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 o=e.slice(2,-1);if(o==="!"||o==="!!")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 o}let[,r,n]=e.match(/^(.*!)([^!]*)$/s);if(!n)t(`The ${e} tag has no suffix`);let i=this.tags[r];if(i)try{return i+decodeURIComponent(n)}catch(o){return t(String(o)),null}if(r==="!")return e;return t(`Could not resolve tag: ${e}`),null}tagString(e){for(let[t,r]of Object.entries(this.tags))if(e.startsWith(r))return t+Nc(e.substring(r.length));return e[0]==="!"?e:`!<${e}>`}toString(e){let t=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],r=Object.entries(this.tags),n;if(e&&r.length>0&&Ci.isNode(e.contents)){let i={};Pc.visit(e.contents,(o,s)=>{if(Ci.isNode(s)&&s.tag)i[s.tag]=!0}),n=Object.keys(i)}else n=[];for(let[i,o]of r){if(i==="!!"&&o==="tag:yaml.org,2002:")continue;if(!e||n.some((s)=>s.startsWith(o)))t.push(`%TAG ${i} ${o}`)}return t.join(`
3
- `)}}V.defaultYaml={explicit:!1,version:"1.2"};V.defaultTags={"!!":"tag:yaml.org,2002:"};Tc.Directives=V});var St=m(function(_c){var Si=P(),Dc=Fe();function Lc(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){let r=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw Error(r)}return!0}function ki(e){let t=new Set;return Dc.visit(e,{Value(r,n){if(n.anchor)t.add(n.anchor)}}),t}function wi(e,t){for(let r=1;;++r){let n=`${e}${r}`;if(!t.has(n))return n}}function qc(e,t){let r=[],n=new Map,i=null;return{onAnchor:(o)=>{r.push(o),i??(i=ki(e));let s=wi(t,i);return i.add(s),s},setAnchors:()=>{for(let o of r){let s=n.get(o);if(typeof s==="object"&&s.anchor&&(Si.isScalar(s.node)||Si.isCollection(s.node)))s.node.anchor=s.anchor;else{let a=Error("Failed to resolve repeated object (this should not happen)");throw a.source=o,a}}},sourceObjects:n}}_c.anchorIsValid=Lc;_c.anchorNames=ki;_c.createNodeAnchors=qc;_c.findNewAnchor=wi});var qr=m(function(jc){function Me(e,t,r,n){if(n&&typeof n==="object")if(Array.isArray(n))for(let i=0,o=n.length;i<o;++i){let s=n[i],a=Me(e,n,String(i),s);if(a===void 0)delete n[i];else if(a!==s)n[i]=a}else if(n instanceof Map)for(let i of Array.from(n.keys())){let o=n.get(i),s=Me(e,n,i,o);if(s===void 0)n.delete(i);else if(s!==o)n.set(i,s)}else if(n instanceof Set)for(let i of Array.from(n)){let o=Me(e,n,i,i);if(o===void 0)n.delete(i);else if(o!==i)n.delete(i),n.add(o)}else for(let[i,o]of Object.entries(n)){let s=Me(e,n,i,o);if(s===void 0)delete n[i];else if(s!==o)n[i]=s}return e.call(t,r,n)}jc.applyReviver=Me});var ie=m(function(Kc){var Uc=P();function xi(e,t,r){if(Array.isArray(e))return e.map((n,i)=>xi(n,String(i),r));if(e&&typeof e.toJSON==="function"){if(!r||!Uc.hasAnchor(e))return e.toJSON(t,r);let n={aliasCount:0,count:1,res:void 0};r.anchors.set(e,n),r.onCreate=(o)=>{n.res=o,delete r.onCreate};let i=e.toJSON(t,r);if(r.onCreate)r.onCreate(i);return i}if(typeof e==="bigint"&&!r?.keep)return Number(e);return e}Kc.toJS=xi});var kt=m(function(zc){var Yc=qr(),Ii=P(),Gc=ie();class Ri{constructor(e){Object.defineProperty(this,Ii.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:r,onAnchor:n,reviver:i}={}){if(!Ii.isDocument(e))throw TypeError("A document argument is required");let o={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof r==="number"?r:100},s=Gc.toJS(this,"",o);if(typeof n==="function")for(let{count:a,res:l}of o.anchors.values())n(l,a);return typeof i==="function"?Yc.applyReviver(i,{"":s},"",s):s}}zc.NodeBase=Ri});var $e=m(function(eu){var Jc=St(),Xc=Fe(),Ie=P(),Qc=kt(),Zc=ie();class Ai extends Qc.NodeBase{constructor(e){super(Ie.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 r;if(t?.aliasResolveCache)r=t.aliasResolveCache;else if(r=[],Xc.visit(e,{Node:(i,o)=>{if(Ie.isAlias(o)||Ie.hasAnchor(o))r.push(o)}}),t)t.aliasResolveCache=r;let n=void 0;for(let i of r){if(i===this)break;if(i.anchor===this.source)n=i}if(n&&t){let{anchors:i,doc:o,maxAliasCount:s}=t,a=i.get(n);if(!a)Zc.toJS(n,null,t),a=i.get(n);if(a?.res===void 0)throw ReferenceError("This should not happen: Alias anchor was not resolved?");if(s>=0){if(a.count+=1,a.aliasCount===0)a.aliasCount=wt(o,n,i);if(a.count*a.aliasCount>s)throw ReferenceError("Excessive alias count indicates a resource exhaustion attack")}}return n}toJSON(e,t){if(!t)return{source:this.source};let r=this.resolve(t.doc,t);if(!r){let n=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw ReferenceError(n)}return t.anchors.get(r).res}toString(e,t,r){let n=`*${this.source}`;if(e){if(Jc.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 wt(e,t,r){if(Ie.isAlias(t)){let n=t.resolve(e),i=r&&n&&r.get(n);return i?i.count*i.aliasCount:0}else if(Ie.isCollection(t)){let n=0;for(let i of t.items){let o=wt(e,i,r);if(o>n)n=o}return n}else if(Ie.isPair(t)){let n=wt(e,t.key,r),i=wt(e,t.value,r);return Math.max(n,i)}return 1}eu.Alias=Ai});var O=m(function(su){var ru=P(),nu=kt(),iu=ie(),ou=(e)=>!e||typeof e!=="function"&&typeof e!=="object";class ge extends nu.NodeBase{constructor(e){super(ru.SCALAR);this.value=e}toJSON(e,t){return t?.keep?this.value:iu.toJS(this.value,e,t)}toString(){return String(this.value)}}ge.BLOCK_FOLDED="BLOCK_FOLDED";ge.BLOCK_LITERAL="BLOCK_LITERAL";ge.PLAIN="PLAIN";ge.QUOTE_DOUBLE="QUOTE_DOUBLE";ge.QUOTE_SINGLE="QUOTE_SINGLE";su.Scalar=ge;su.isScalarValue=ou});var Be=m(function(fu){var cu=$e(),me=P(),vi=O(),uu="tag:yaml.org,2002:";function du(e,t,r){if(t){let n=r.filter((o)=>o.tag===t),i=n.find((o)=>!o.format)??n[0];if(!i)throw Error(`Tag ${t} not found`);return i}return r.find((n)=>n.identify?.(e)&&!n.format)}function pu(e,t,r){if(me.isDocument(e))e=e.contents;if(me.isNode(e))return e;if(me.isPair(e)){let u=r.schema[me.MAP].createNode?.(r.schema,null,r);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:o,schema:s,sourceObjects:a}=r,l=void 0;if(n&&e&&typeof e==="object")if(l=a.get(e),l)return l.anchor??(l.anchor=i(e)),new cu.Alias(l.anchor);else l={anchor:null,node:null},a.set(e,l);if(t?.startsWith("!!"))t=uu+t.slice(2);let c=du(e,t,s.tags);if(!c){if(e&&typeof e.toJSON==="function")e=e.toJSON();if(!e||typeof e!=="object"){let u=new vi.Scalar(e);if(l)l.node=u;return u}c=e instanceof Map?s[me.MAP]:(Symbol.iterator in Object(e))?s[me.SEQ]:s[me.MAP]}if(o)o(c),delete r.onTagObj;let d=c?.createNode?c.createNode(r.schema,e,r):typeof c?.nodeClass?.from==="function"?c.nodeClass.from(r.schema,e,r):new vi.Scalar(e);if(t)d.tag=t;else if(!c.default)d.tag=c.tag;if(l)l.node=d;return d}fu.createNode=pu});var xt=m(function(yu){var mu=Be(),J=P(),hu=kt();function _r(e,t,r){let n=r;for(let i=t.length-1;i>=0;--i){let o=t[i];if(typeof o==="number"&&Number.isInteger(o)&&o>=0){let s=[];s[o]=n,n=s}else n=new Map([[o,n]])}return mu.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 Pi=(e)=>e==null||typeof e==="object"&&!!e[Symbol.iterator]().next().done;class Ei extends hu.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((r)=>J.isNode(r)||J.isPair(r)?r.clone(e):r),this.range)t.range=this.range.slice();return t}addIn(e,t){if(Pi(e))this.add(t);else{let[r,...n]=e,i=this.get(r,!0);if(J.isCollection(i))i.addIn(n,t);else if(i===void 0&&this.schema)this.set(r,_r(this.schema,n,t));else throw Error(`Expected YAML collection at ${r}. Remaining path: ${n}`)}}deleteIn(e){let[t,...r]=e;if(r.length===0)return this.delete(t);let n=this.get(t,!0);if(J.isCollection(n))return n.deleteIn(r);else throw Error(`Expected YAML collection at ${t}. Remaining path: ${r}`)}getIn(e,t){let[r,...n]=e,i=this.get(r,!0);if(n.length===0)return!t&&J.isScalar(i)?i.value:i;else return J.isCollection(i)?i.getIn(n,t):void 0}hasAllNullValues(e){return this.items.every((t)=>{if(!J.isPair(t))return!1;let r=t.value;return r==null||e&&J.isScalar(r)&&r.value==null&&!r.commentBefore&&!r.comment&&!r.tag})}hasIn(e){let[t,...r]=e;if(r.length===0)return this.has(t);let n=this.get(t,!0);return J.isCollection(n)?n.hasIn(r):!1}setIn(e,t){let[r,...n]=e;if(n.length===0)this.set(r,t);else{let i=this.get(r,!0);if(J.isCollection(i))i.setIn(n,t);else if(i===void 0&&this.schema)this.set(r,_r(this.schema,n,t));else throw Error(`Expected YAML collection at ${r}. Remaining path: ${n}`)}}}yu.Collection=Ei;yu.collectionFromPath=_r;yu.isEmptyPath=Pi});var je=m(function(xu){var ku=(e)=>e.replace(/^(?!$)(?: $)?/gm,"#");function Fr(e,t){if(/^\n+$/.test(e))return e.substring(1);return t?e.replace(/^(?! *$)/gm,t):e}var wu=(e,t,r)=>e.endsWith(`
2
+ var Kl=Object.create;var{getPrototypeOf:Hl,defineProperty:ci,getOwnPropertyNames:zl}=Object;var ui=Object.prototype.hasOwnProperty;function Gl(e){return this[e]}var Yl,Wl,Jl=(e,t,r)=>{var n=e!=null&&typeof e==="object";if(n){var i=t?Yl??=new WeakMap:Wl??=new WeakMap,o=i.get(e);if(o)return o}r=e!=null?Kl(Hl(e)):{};let s=t||!e||!e.__esModule||!ui.call(e,"default")?ci(r,"default",{value:e,enumerable:!0}):r;if(e&&typeof e==="object"||typeof e==="function"){for(let a of zl(e))if(!ui.call(s,a))ci(s,a,{get:Gl.bind(e,a),enumerable:!0})}if(n)i.set(e,s);return s};var m=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var mt=import.meta.require;var P=m(function(cc){var Nr=Symbol.for("yaml.alias"),pi=Symbol.for("yaml.document"),ht=Symbol.for("yaml.map"),fi=Symbol.for("yaml.pair"),Dr=Symbol.for("yaml.scalar"),yt=Symbol.for("yaml.seq"),Z=Symbol.for("yaml.node.type"),rc=(e)=>!!e&&typeof e==="object"&&e[Z]===Nr,nc=(e)=>!!e&&typeof e==="object"&&e[Z]===pi,ic=(e)=>!!e&&typeof e==="object"&&e[Z]===ht,oc=(e)=>!!e&&typeof e==="object"&&e[Z]===fi,gi=(e)=>!!e&&typeof e==="object"&&e[Z]===Dr,sc=(e)=>!!e&&typeof e==="object"&&e[Z]===yt;function mi(e){if(e&&typeof e==="object")switch(e[Z]){case ht:case yt:return!0}return!1}function ac(e){if(e&&typeof e==="object")switch(e[Z]){case Nr:case ht:case Dr:case yt:return!0}return!1}var lc=(e)=>(gi(e)||mi(e))&&!!e.anchor;cc.ALIAS=Nr;cc.DOC=pi;cc.MAP=ht;cc.NODE_TYPE=Z;cc.PAIR=fi;cc.SCALAR=Dr;cc.SEQ=yt;cc.hasAnchor=lc;cc.isAlias=rc;cc.isCollection=mi;cc.isDocument=nc;cc.isMap=ic;cc.isNode=ac;cc.isPair=oc;cc.isScalar=gi;cc.isSeq=sc});var Fe=m(function(Ac){var q=P(),j=Symbol("break visit"),hi=Symbol("skip children"),W=Symbol("remove node");function bt(e,t){let r=yi(t);if(q.isDocument(e)){if(we(null,e.contents,r,Object.freeze([e]))===W)e.contents=null}else we(null,e,r,Object.freeze([]))}bt.BREAK=j;bt.SKIP=hi;bt.REMOVE=W;function we(e,t,r,n){let i=bi(e,t,r,n);if(q.isNode(i)||q.isPair(i))return Si(e,n,i),we(e,i,r,n);if(typeof i!=="symbol"){if(q.isCollection(t)){n=Object.freeze(n.concat(t));for(let o=0;o<t.items.length;++o){let s=we(o,t.items[o],r,n);if(typeof s==="number")o=s-1;else if(s===j)return j;else if(s===W)t.items.splice(o,1),o-=1}}else if(q.isPair(t)){n=Object.freeze(n.concat(t));let o=we("key",t.key,r,n);if(o===j)return j;else if(o===W)t.key=null;let s=we("value",t.value,r,n);if(s===j)return j;else if(s===W)t.value=null}}return i}async function St(e,t){let r=yi(t);if(q.isDocument(e)){if(await xe(null,e.contents,r,Object.freeze([e]))===W)e.contents=null}else await xe(null,e,r,Object.freeze([]))}St.BREAK=j;St.SKIP=hi;St.REMOVE=W;async function xe(e,t,r,n){let i=await bi(e,t,r,n);if(q.isNode(i)||q.isPair(i))return Si(e,n,i),xe(e,i,r,n);if(typeof i!=="symbol"){if(q.isCollection(t)){n=Object.freeze(n.concat(t));for(let o=0;o<t.items.length;++o){let s=await xe(o,t.items[o],r,n);if(typeof s==="number")o=s-1;else if(s===j)return j;else if(s===W)t.items.splice(o,1),o-=1}}else if(q.isPair(t)){n=Object.freeze(n.concat(t));let o=await xe("key",t.key,r,n);if(o===j)return j;else if(o===W)t.key=null;let s=await xe("value",t.value,r,n);if(s===j)return j;else if(s===W)t.value=null}}return i}function yi(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 bi(e,t,r,n){if(typeof r==="function")return r(e,t,n);if(q.isMap(t))return r.Map?.(e,t,n);if(q.isSeq(t))return r.Seq?.(e,t,n);if(q.isPair(t))return r.Pair?.(e,t,n);if(q.isScalar(t))return r.Scalar?.(e,t,n);if(q.isAlias(t))return r.Alias?.(e,t,n);return}function Si(e,t,r){let n=t[t.length-1];if(q.isCollection(n))n.items[e]=r;else if(q.isPair(n))if(e==="key")n.key=r;else n.value=r;else if(q.isDocument(n))n.contents=r;else{let i=q.isAlias(n)?"alias":"scalar";throw Error(`Cannot replace node with ${i} parent`)}}Ac.visit=bt;Ac.visitAsync=St});var Lr=m(function(Nc){var Ci=P(),Ec=Fe(),Oc={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},Tc=(e)=>e.replace(/[!,[\]{}]/g,(t)=>Oc[t]);class V{constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},V.defaultYaml,e),this.tags=Object.assign({},V.defaultTags,t)}clone(){let e=new V(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){let e=new V(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:V.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},V.defaultTags);break}return e}add(e,t){if(this.atNextDocument)this.yaml={explicit:V.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},V.defaultTags),this.atNextDocument=!1;let r=e.trim().split(/[ \t]+/),n=r.shift();switch(n){case"%TAG":{if(r.length!==2){if(t(0,"%TAG directive should contain exactly two parts"),r.length<2)return!1}let[i,o]=r;return this.tags[i]=o,!0}case"%YAML":{if(this.yaml.explicit=!0,r.length!==1)return t(0,"%YAML directive should contain exactly one part"),!1;let[i]=r;if(i==="1.1"||i==="1.2")return this.yaml.version=i,!0;else{let o=/^\d+\.\d+$/.test(i);return t(6,`Unsupported YAML version ${i}`,o),!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 o=e.slice(2,-1);if(o==="!"||o==="!!")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 o}let[,r,n]=e.match(/^(.*!)([^!]*)$/s);if(!n)t(`The ${e} tag has no suffix`);let i=this.tags[r];if(i)try{return i+decodeURIComponent(n)}catch(o){return t(String(o)),null}if(r==="!")return e;return t(`Could not resolve tag: ${e}`),null}tagString(e){for(let[t,r]of Object.entries(this.tags))if(e.startsWith(r))return t+Tc(e.substring(r.length));return e[0]==="!"?e:`!<${e}>`}toString(e){let t=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],r=Object.entries(this.tags),n;if(e&&r.length>0&&Ci.isNode(e.contents)){let i={};Ec.visit(e.contents,(o,s)=>{if(Ci.isNode(s)&&s.tag)i[s.tag]=!0}),n=Object.keys(i)}else n=[];for(let[i,o]of r){if(i==="!!"&&o==="tag:yaml.org,2002:")continue;if(!e||n.some((s)=>s.startsWith(o)))t.push(`%TAG ${i} ${o}`)}return t.join(`
3
+ `)}}V.defaultYaml={explicit:!1,version:"1.2"};V.defaultTags={"!!":"tag:yaml.org,2002:"};Nc.Directives=V});var Ct=m(function(Fc){var ki=P(),Lc=Fe();function qc(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){let r=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw Error(r)}return!0}function wi(e){let t=new Set;return Lc.visit(e,{Value(r,n){if(n.anchor)t.add(n.anchor)}}),t}function xi(e,t){for(let r=1;;++r){let n=`${e}${r}`;if(!t.has(n))return n}}function _c(e,t){let r=[],n=new Map,i=null;return{onAnchor:(o)=>{r.push(o),i??(i=wi(e));let s=xi(t,i);return i.add(s),s},setAnchors:()=>{for(let o of r){let s=n.get(o);if(typeof s==="object"&&s.anchor&&(ki.isScalar(s.node)||ki.isCollection(s.node)))s.node.anchor=s.anchor;else{let a=Error("Failed to resolve repeated object (this should not happen)");throw a.source=o,a}}},sourceObjects:n}}Fc.anchorIsValid=qc;Fc.anchorNames=wi;Fc.createNodeAnchors=_c;Fc.findNewAnchor=xi});var qr=m(function(Vc){function Me(e,t,r,n){if(n&&typeof n==="object")if(Array.isArray(n))for(let i=0,o=n.length;i<o;++i){let s=n[i],a=Me(e,n,String(i),s);if(a===void 0)delete n[i];else if(a!==s)n[i]=a}else if(n instanceof Map)for(let i of Array.from(n.keys())){let o=n.get(i),s=Me(e,n,i,o);if(s===void 0)n.delete(i);else if(s!==o)n.set(i,s)}else if(n instanceof Set)for(let i of Array.from(n)){let o=Me(e,n,i,i);if(o===void 0)n.delete(i);else if(o!==i)n.delete(i),n.add(o)}else for(let[i,o]of Object.entries(n)){let s=Me(e,n,i,o);if(s===void 0)delete n[i];else if(s!==o)n[i]=s}return e.call(t,r,n)}Vc.applyReviver=Me});var ie=m(function(Hc){var Kc=P();function Ii(e,t,r){if(Array.isArray(e))return e.map((n,i)=>Ii(n,String(i),r));if(e&&typeof e.toJSON==="function"){if(!r||!Kc.hasAnchor(e))return e.toJSON(t,r);let n={aliasCount:0,count:1,res:void 0};r.anchors.set(e,n),r.onCreate=(o)=>{n.res=o,delete r.onCreate};let i=e.toJSON(t,r);if(r.onCreate)r.onCreate(i);return i}if(typeof e==="bigint"&&!r?.keep)return Number(e);return e}Hc.toJS=Ii});var kt=m(function(Wc){var Gc=qr(),vi=P(),Yc=ie();class Ai{constructor(e){Object.defineProperty(this,vi.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:r,onAnchor:n,reviver:i}={}){if(!vi.isDocument(e))throw TypeError("A document argument is required");let o={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof r==="number"?r:100},s=Yc.toJS(this,"",o);if(typeof n==="function")for(let{count:a,res:l}of o.anchors.values())n(l,a);return typeof i==="function"?Gc.applyReviver(i,{"":s},"",s):s}}Wc.NodeBase=Ai});var Be=m(function(tu){var Xc=Ct(),Qc=Fe(),Ie=P(),Zc=kt(),eu=ie();class Ri extends Zc.NodeBase{constructor(e){super(Ie.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 r;if(t?.aliasResolveCache)r=t.aliasResolveCache;else if(r=[],Qc.visit(e,{Node:(i,o)=>{if(Ie.isAlias(o)||Ie.hasAnchor(o))r.push(o)}}),t)t.aliasResolveCache=r;let n=void 0;for(let i of r){if(i===this)break;if(i.anchor===this.source)n=i}if(n&&t){let{anchors:i,doc:o,maxAliasCount:s}=t,a=i.get(n);if(!a)eu.toJS(n,null,t),a=i.get(n);if(a?.res===void 0)throw ReferenceError("This should not happen: Alias anchor was not resolved?");if(s>=0){if(a.count+=1,a.aliasCount===0)a.aliasCount=wt(o,n,i);if(a.count*a.aliasCount>s)throw ReferenceError("Excessive alias count indicates a resource exhaustion attack")}}return n}toJSON(e,t){if(!t)return{source:this.source};let r=this.resolve(t.doc,t);if(!r){let n=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw ReferenceError(n)}return t.anchors.get(r).res}toString(e,t,r){let n=`*${this.source}`;if(e){if(Xc.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 wt(e,t,r){if(Ie.isAlias(t)){let n=t.resolve(e),i=r&&n&&r.get(n);return i?i.count*i.aliasCount:0}else if(Ie.isCollection(t)){let n=0;for(let i of t.items){let o=wt(e,i,r);if(o>n)n=o}return n}else if(Ie.isPair(t)){let n=wt(e,t.key,r),i=wt(e,t.value,r);return Math.max(n,i)}return 1}tu.Alias=Ri});var N=m(function(au){var nu=P(),iu=kt(),ou=ie(),su=(e)=>!e||typeof e!=="function"&&typeof e!=="object";class ge extends iu.NodeBase{constructor(e){super(nu.SCALAR);this.value=e}toJSON(e,t){return t?.keep?this.value:ou.toJS(this.value,e,t)}toString(){return String(this.value)}}ge.BLOCK_FOLDED="BLOCK_FOLDED";ge.BLOCK_LITERAL="BLOCK_LITERAL";ge.PLAIN="PLAIN";ge.QUOTE_DOUBLE="QUOTE_DOUBLE";ge.QUOTE_SINGLE="QUOTE_SINGLE";au.Scalar=ge;au.isScalarValue=su});var $e=m(function(gu){var uu=Be(),me=P(),Pi=N(),du="tag:yaml.org,2002:";function pu(e,t,r){if(t){let n=r.filter((o)=>o.tag===t),i=n.find((o)=>!o.format)??n[0];if(!i)throw Error(`Tag ${t} not found`);return i}return r.find((n)=>n.identify?.(e)&&!n.format)}function fu(e,t,r){if(me.isDocument(e))e=e.contents;if(me.isNode(e))return e;if(me.isPair(e)){let u=r.schema[me.MAP].createNode?.(r.schema,null,r);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:o,schema:s,sourceObjects:a}=r,l=void 0;if(n&&e&&typeof e==="object")if(l=a.get(e),l)return l.anchor??(l.anchor=i(e)),new uu.Alias(l.anchor);else l={anchor:null,node:null},a.set(e,l);if(t?.startsWith("!!"))t=du+t.slice(2);let c=pu(e,t,s.tags);if(!c){if(e&&typeof e.toJSON==="function")e=e.toJSON();if(!e||typeof e!=="object"){let u=new Pi.Scalar(e);if(l)l.node=u;return u}c=e instanceof Map?s[me.MAP]:(Symbol.iterator in Object(e))?s[me.SEQ]:s[me.MAP]}if(o)o(c),delete r.onTagObj;let d=c?.createNode?c.createNode(r.schema,e,r):typeof c?.nodeClass?.from==="function"?c.nodeClass.from(r.schema,e,r):new Pi.Scalar(e);if(t)d.tag=t;else if(!c.default)d.tag=c.tag;if(l)l.node=d;return d}gu.createNode=fu});var xt=m(function(bu){var hu=$e(),J=P(),yu=kt();function _r(e,t,r){let n=r;for(let i=t.length-1;i>=0;--i){let o=t[i];if(typeof o==="number"&&Number.isInteger(o)&&o>=0){let s=[];s[o]=n,n=s}else n=new Map([[o,n]])}return hu.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 Ei=(e)=>e==null||typeof e==="object"&&!!e[Symbol.iterator]().next().done;class Oi extends yu.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((r)=>J.isNode(r)||J.isPair(r)?r.clone(e):r),this.range)t.range=this.range.slice();return t}addIn(e,t){if(Ei(e))this.add(t);else{let[r,...n]=e,i=this.get(r,!0);if(J.isCollection(i))i.addIn(n,t);else if(i===void 0&&this.schema)this.set(r,_r(this.schema,n,t));else throw Error(`Expected YAML collection at ${r}. Remaining path: ${n}`)}}deleteIn(e){let[t,...r]=e;if(r.length===0)return this.delete(t);let n=this.get(t,!0);if(J.isCollection(n))return n.deleteIn(r);else throw Error(`Expected YAML collection at ${t}. Remaining path: ${r}`)}getIn(e,t){let[r,...n]=e,i=this.get(r,!0);if(n.length===0)return!t&&J.isScalar(i)?i.value:i;else return J.isCollection(i)?i.getIn(n,t):void 0}hasAllNullValues(e){return this.items.every((t)=>{if(!J.isPair(t))return!1;let r=t.value;return r==null||e&&J.isScalar(r)&&r.value==null&&!r.commentBefore&&!r.comment&&!r.tag})}hasIn(e){let[t,...r]=e;if(r.length===0)return this.has(t);let n=this.get(t,!0);return J.isCollection(n)?n.hasIn(r):!1}setIn(e,t){let[r,...n]=e;if(n.length===0)this.set(r,t);else{let i=this.get(r,!0);if(J.isCollection(i))i.setIn(n,t);else if(i===void 0&&this.schema)this.set(r,_r(this.schema,n,t));else throw Error(`Expected YAML collection at ${r}. Remaining path: ${n}`)}}}bu.Collection=Oi;bu.collectionFromPath=_r;bu.isEmptyPath=Ei});var je=m(function(Iu){var wu=(e)=>e.replace(/^(?!$)(?: $)?/gm,"#");function Fr(e,t){if(/^\n+$/.test(e))return e.substring(1);return t?e.replace(/^(?! *$)/gm,t):e}var xu=(e,t,r)=>e.endsWith(`
4
4
  `)?Fr(r,t):r.includes(`
5
5
  `)?`
6
- `+Fr(r,t):(e.endsWith(" ")?"":" ")+r;xu.indentComment=Fr;xu.lineComment=wu;xu.stringifyComment=ku});var Ti=m(function(Pu){function vu(e,t,r="flow",{indentAtStart:n,lineWidth:i=80,minContentWidth:o=20,onFold:s,onOverflow:a}={}){if(!i||i<0)return e;if(i<o)o=0;let l=Math.max(1+o,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,o))c.push(0);else u=i-n;let p=void 0,f=void 0,y=!1,g=-1,h=-1,b=-1;if(r==="block"){if(g=Ni(e,g,t.length),g!==-1)u=g+l}for(let w;w=e[g+=1];){if(r==="quoted"&&w==="\\"){switch(h=g,e[g+1]){case"x":g+=3;break;case"u":g+=5;break;case"U":g+=9;break;default:g+=1}b=g}if(w===`
7
- `){if(r==="block")g=Ni(e,g,t.length);u=g+t.length+l,p=void 0}else{if(w===" "&&f&&f!==" "&&f!==`
6
+ `+Fr(r,t):(e.endsWith(" ")?"":" ")+r;Iu.indentComment=Fr;Iu.lineComment=xu;Iu.stringifyComment=wu});var Ni=m(function(Eu){function Pu(e,t,r="flow",{indentAtStart:n,lineWidth:i=80,minContentWidth:o=20,onFold:s,onOverflow:a}={}){if(!i||i<0)return e;if(i<o)o=0;let l=Math.max(1+o,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,o))c.push(0);else u=i-n;let p=void 0,f=void 0,y=!1,g=-1,h=-1,b=-1;if(r==="block"){if(g=Ti(e,g,t.length),g!==-1)u=g+l}for(let w;w=e[g+=1];){if(r==="quoted"&&w==="\\"){switch(h=g,e[g+1]){case"x":g+=3;break;case"u":g+=5;break;case"U":g+=9;break;default:g+=1}b=g}if(w===`
7
+ `){if(r==="block")g=Ti(e,g,t.length);u=g+t.length+l,p=void 0}else{if(w===" "&&f&&f!==" "&&f!==`
8
8
  `&&f!=="\t"){let I=e[g+1];if(I&&I!==" "&&I!==`
9
9
  `&&I!=="\t")p=g}if(g>=u)if(p)c.push(p),u=p+l,p=void 0;else if(r==="quoted"){while(f===" "||f==="\t")f=w,w=e[g+=1],y=!0;let I=g>b+1?g-2:h-1;if(d[I])return e;c.push(I),d[I]=!0,u=I+l,p=void 0}else y=!0}f=w}if(y&&a)a();if(c.length===0)return e;if(s)s();let k=e.slice(0,c[0]);for(let w=0;w<c.length;++w){let I=c[w],A=c[w+1]||e.length;if(I===0)k=`
10
10
  ${t}${e.slice(0,A)}`;else{if(r==="quoted"&&d[I])k+=`${e[I]}\\`;k+=`
11
- ${t}${e.slice(I+1,A)}`}}return k}function Ni(e,t,r){let n=t,i=t+1,o=e[i];while(o===" "||o==="\t")if(t<i+r)o=e[++t];else{do o=e[++t];while(o&&o!==`
12
- `);n=t,i=t+1,o=e[i]}return n}Pu.FOLD_BLOCK="block";Pu.FOLD_FLOW="flow";Pu.FOLD_QUOTED="quoted";Pu.foldFlowLines=vu});var Ue=m(function(_u){var Y=O(),oe=Ti(),Rt=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),At=(e)=>/^(%|---|\.\.\.)/m.test(e);function Du(e,t,r){if(!t||t<0)return!1;let n=t-r,i=e.length;if(i<=n)return!1;for(let o=0,s=0;o<i;++o)if(e[o]===`
11
+ ${t}${e.slice(I+1,A)}`}}return k}function Ti(e,t,r){let n=t,i=t+1,o=e[i];while(o===" "||o==="\t")if(t<i+r)o=e[++t];else{do o=e[++t];while(o&&o!==`
12
+ `);n=t,i=t+1,o=e[i]}return n}Eu.FOLD_BLOCK="block";Eu.FOLD_FLOW="flow";Eu.FOLD_QUOTED="quoted";Eu.foldFlowLines=Pu});var Ue=m(function(Fu){var z=N(),oe=Ni(),vt=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),At=(e)=>/^(%|---|\.\.\.)/m.test(e);function Lu(e,t,r){if(!t||t<0)return!1;let n=t-r,i=e.length;if(i<=n)return!1;for(let o=0,s=0;o<i;++o)if(e[o]===`
13
13
  `){if(o-s>n)return!0;if(s=o+1,i-s<=n)return!1}return!0}function Ve(e,t){let r=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return r;let{implicitKey:n}=t,i=t.options.doubleQuotedMinMultiLineLength,o=t.indent||(At(e)?" ":""),s="",a=0;for(let l=0,c=r[l];c;c=r[++l]){if(c===" "&&r[l+1]==="\\"&&r[l+2]==="n")s+=r.slice(a,l)+"\\ ",l+=1,a=l,c="\\";if(c==="\\")switch(r[l+1]){case"u":{s+=r.slice(a,l);let d=r.substr(l+2,4);switch(d){case"0000":s+="\\0";break;case"0007":s+="\\a";break;case"000b":s+="\\v";break;case"001b":s+="\\e";break;case"0085":s+="\\N";break;case"00a0":s+="\\_";break;case"2028":s+="\\L";break;case"2029":s+="\\P";break;default:if(d.substr(0,2)==="00")s+="\\x"+d.substr(2);else s+=r.substr(l,6)}l+=5,a=l+1}break;case"n":if(n||r[l+2]==='"'||r.length<i)l+=1;else{s+=r.slice(a,l)+`
14
14
 
15
15
  `;while(r[l+2]==="\\"&&r[l+3]==="n"&&r[l+4]!=='"')s+=`
16
- `,l+=2;if(s+=o,r[l+2]===" ")s+="\\";l+=1,a=l+1}break;default:l+=1}}return s=a?s+r.slice(a):r,n?s:oe.foldFlowLines(s,o,oe.FOLD_QUOTED,Rt(t,!1))}function Mr(e,t){if(t.options.singleQuote===!1||t.implicitKey&&e.includes(`
16
+ `,l+=2;if(s+=o,r[l+2]===" ")s+="\\";l+=1,a=l+1}break;default:l+=1}}return s=a?s+r.slice(a):r,n?s:oe.foldFlowLines(s,o,oe.FOLD_QUOTED,vt(t,!1))}function Mr(e,t){if(t.options.singleQuote===!1||t.implicitKey&&e.includes(`
17
17
  `)||/[ \t]\n|\n[ \t]/.test(e))return Ve(e,t);let r=t.indent||(At(e)?" ":""),n="'"+e.replace(/'/g,"''").replace(/\n+/g,`$&
18
- ${r}`)+"'";return t.implicitKey?n:oe.foldFlowLines(n,r,oe.FOLD_FLOW,Rt(t,!1))}function Re(e,t){let{singleQuote:r}=t.options,n;if(r===!1)n=Ve;else{let i=e.includes('"'),o=e.includes("'");if(i&&!o)n=Mr;else if(o&&!i)n=Ve;else n=r?Mr:Ve}return n(e,t)}var $r;try{$r=new RegExp(`(^|(?<!
18
+ ${r}`)+"'";return t.implicitKey?n:oe.foldFlowLines(n,r,oe.FOLD_FLOW,vt(t,!1))}function ve(e,t){let{singleQuote:r}=t.options,n;if(r===!1)n=Ve;else{let i=e.includes('"'),o=e.includes("'");if(i&&!o)n=Mr;else if(o&&!i)n=Ve;else n=r?Mr:Ve}return n(e,t)}var Br;try{Br=new RegExp(`(^|(?<!
19
19
  ))
20
20
  +(?!
21
- |$)`,"g")}catch{$r=/\n+(?!\n|$)/g}function It({comment:e,type:t,value:r},n,i,o){let{blockQuote:s,commentString:a,lineWidth:l}=n.options;if(!s||/\n[\t ]+$/.test(r))return Re(r,n);let c=n.indent||(n.forceBlockIndent||At(r)?" ":""),d=s==="literal"?!0:s==="folded"||t===Y.Scalar.BLOCK_FOLDED?!1:t===Y.Scalar.BLOCK_LITERAL?!0:!Du(r,l,c.length);if(!r)return d?`|
21
+ |$)`,"g")}catch{Br=/\n+(?!\n|$)/g}function It({comment:e,type:t,value:r},n,i,o){let{blockQuote:s,commentString:a,lineWidth:l}=n.options;if(!s||/\n[\t ]+$/.test(r))return ve(r,n);let c=n.indent||(n.forceBlockIndent||At(r)?" ":""),d=s==="literal"?!0:s==="folded"||t===z.Scalar.BLOCK_FOLDED?!1:t===z.Scalar.BLOCK_LITERAL?!0:!Lu(r,l,c.length);if(!r)return d?`|
22
22
  `:`>
23
23
  `;let u,p;for(p=r.length;p>0;--p){let A=r[p-1];if(A!==`
24
24
  `&&A!=="\t"&&A!==" ")break}let f=r.substring(p),y=f.indexOf(`
25
25
  `);if(y===-1)u="-";else if(r===f||y!==f.length-1){if(u="+",o)o()}else u="";if(f){if(r=r.slice(0,-f.length),f[f.length-1]===`
26
- `)f=f.slice(0,-1);f=f.replace($r,`$&${c}`)}let g=!1,h,b=-1;for(h=0;h<r.length;++h){let A=r[h];if(A===" ")g=!0;else if(A===`
26
+ `)f=f.slice(0,-1);f=f.replace(Br,`$&${c}`)}let g=!1,h,b=-1;for(h=0;h<r.length;++h){let A=r[h];if(A===" ")g=!0;else if(A===`
27
27
  `)b=h;else break}let k=r.substring(0,b<h?b+1:h);if(k)r=r.substring(k.length),k=k.replace(/\n+/g,`$&${c}`);let I=(g?c?"2":"1":"")+u;if(e){if(I+=" "+a(e.replace(/ ?[\r\n]+/g," ")),i)i()}if(!d){let A=r.replace(/\n+/g,`
28
- $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${c}`),R=!1,E=Rt(n,!0);if(s!=="folded"&&t!==Y.Scalar.BLOCK_FOLDED)E.onOverflow=()=>{R=!0};let x=oe.foldFlowLines(`${k}${A}${f}`,c,oe.FOLD_BLOCK,E);if(!R)return`>${I}
28
+ $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${c}`),v=!1,E=vt(n,!0);if(s!=="folded"&&t!==z.Scalar.BLOCK_FOLDED)E.onOverflow=()=>{v=!0};let x=oe.foldFlowLines(`${k}${A}${f}`,c,oe.FOLD_BLOCK,E);if(!v)return`>${I}
29
29
  ${c}${x}`}return r=r.replace(/\n+/g,`$&${c}`),`|${I}
30
- ${c}${k}${r}${f}`}function Lu(e,t,r,n){let{type:i,value:o}=e,{actualString:s,implicitKey:a,indent:l,indentStep:c,inFlow:d}=t;if(a&&o.includes(`
31
- `)||d&&/[[\]{},]/.test(o))return Re(o,t);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(o))return a||d||!o.includes(`
32
- `)?Re(o,t):It(e,t,r,n);if(!a&&!d&&i!==Y.Scalar.PLAIN&&o.includes(`
33
- `))return It(e,t,r,n);if(At(o)){if(l==="")return t.forceBlockIndent=!0,It(e,t,r,n);else if(a&&l===c)return Re(o,t)}let u=o.replace(/\n+/g,`$&
34
- ${l}`);if(s){let p=(g)=>g.default&&g.tag!=="tag:yaml.org,2002:str"&&g.test?.test(u),{compat:f,tags:y}=t.doc.schema;if(y.some(p)||f?.some(p))return Re(o,t)}return a?u:oe.foldFlowLines(u,l,oe.FOLD_FLOW,Rt(t,!1))}function qu(e,t,r,n){let{implicitKey:i,inFlow:o}=t,s=typeof e.value==="string"?e:Object.assign({},e,{value:String(e.value)}),{type:a}=e;if(a!==Y.Scalar.QUOTE_DOUBLE){if(/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(s.value))a=Y.Scalar.QUOTE_DOUBLE}let l=(d)=>{switch(d){case Y.Scalar.BLOCK_FOLDED:case Y.Scalar.BLOCK_LITERAL:return i||o?Re(s.value,t):It(s,t,r,n);case Y.Scalar.QUOTE_DOUBLE:return Ve(s.value,t);case Y.Scalar.QUOTE_SINGLE:return Mr(s.value,t);case Y.Scalar.PLAIN:return Lu(s,t,r,n);default:return null}},c=l(a);if(c===null){let{defaultKeyType:d,defaultStringType:u}=t.options,p=i&&d||u;if(c=l(p),c===null)throw Error(`Unsupported default string type ${p}`)}return c}_u.stringifyString=qu});var Ke=m(function(Hu){var Mu=St(),se=P(),$u=je(),Bu=Ue();function ju(e,t){let r=Object.assign({blockQuote:!0,commentString:$u.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(r.collectionStyle){case"block":n=!1;break;case"flow":n=!0;break;default:n=null}return{anchors:new Set,doc:e,flowCollectionPadding:r.flowCollectionPadding?" ":"",indent:"",indentStep:typeof r.indent==="number"?" ".repeat(r.indent):" ",inFlow:n,options:r}}function Vu(e,t){if(t.tag){let i=e.filter((o)=>o.tag===t.tag);if(i.length>0)return i.find((o)=>o.format===t.format)??i[0]}let r=void 0,n;if(se.isScalar(t)){n=t.value;let i=e.filter((o)=>o.identify?.(n));if(i.length>1){let o=i.filter((s)=>s.test);if(o.length>0)i=o}r=i.find((o)=>o.format===t.format)??i.find((o)=>!o.format)}else n=t,r=e.find((i)=>i.nodeClass&&n instanceof i.nodeClass);if(!r){let i=n?.constructor?.name??(n===null?"null":typeof n);throw Error(`Tag not resolved for ${i} value`)}return r}function Uu(e,t,{anchors:r,doc:n}){if(!n.directives)return"";let i=[],o=(se.isScalar(e)||se.isCollection(e))&&e.anchor;if(o&&Mu.anchorIsValid(o))r.add(o),i.push(`&${o}`);let s=e.tag??(t.default?null:t.tag);if(s)i.push(n.directives.tagString(s));return i.join(" ")}function Ku(e,t,r,n){if(se.isPair(e))return e.toString(t,r,n);if(se.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,o=se.isNode(e)?e:t.doc.createNode(e,{onTagObj:(l)=>i=l});i??(i=Vu(t.doc.schema.tags,o));let s=Uu(o,i,t);if(s.length>0)t.indentAtStart=(t.indentAtStart??0)+s.length+1;let a=typeof i.stringify==="function"?i.stringify(o,t,r,n):se.isScalar(o)?Bu.stringifyString(o,t,r,n):o.toString(t,r,n);if(!s)return a;return se.isScalar(o)||a[0]==="{"||a[0]==="["?`${s} ${a}`:`${s}
35
- ${t.indent}${a}`}Hu.createStringifyContext=ju;Hu.stringify=Ku});var Li=m(function(Wu){var ee=P(),Oi=O(),Di=Ke(),He=je();function zu({key:e,value:t},r,n,i){let{allNullValues:o,doc:s,indent:a,indentStep:l,options:{commentString:c,indentSeq:d,simpleKeys:u}}=r,p=ee.isNode(e)&&e.comment||null;if(u){if(p)throw Error("With simple keys, key nodes cannot have comments");if(ee.isCollection(e)||!ee.isNode(e)&&typeof e==="object")throw Error("With simple keys, collection cannot be used as a key value")}let f=!u&&(!e||p&&t==null&&!r.inFlow||ee.isCollection(e)||(ee.isScalar(e)?e.type===Oi.Scalar.BLOCK_FOLDED||e.type===Oi.Scalar.BLOCK_LITERAL:typeof e==="object"));r=Object.assign({},r,{allNullValues:!1,implicitKey:!f&&(u||!o),indent:a+l});let y=!1,g=!1,h=Di.stringify(e,r,()=>y=!0,()=>g=!0);if(!f&&!r.inFlow&&h.length>1024){if(u)throw Error("With simple keys, single line scalar must not span more than 1024 characters");f=!0}if(r.inFlow){if(o||t==null){if(y&&n)n();return h===""?"?":f?`? ${h}`:h}}else if(o&&!u||t==null&&f){if(h=`? ${h}`,p&&!y)h+=He.lineComment(h,r.indent,c(p));else if(g&&i)i();return h}if(y)p=null;if(f){if(p)h+=He.lineComment(h,r.indent,c(p));h=`? ${h}
36
- ${a}:`}else if(h=`${h}:`,p)h+=He.lineComment(h,r.indent,c(p));let b,k,w;if(ee.isNode(t))b=!!t.spaceBefore,k=t.commentBefore,w=t.comment;else if(b=!1,k=null,w=null,t&&typeof t==="object")t=s.createNode(t);if(r.implicitKey=!1,!f&&!p&&ee.isScalar(t))r.indentAtStart=h.length+1;if(g=!1,!d&&l.length>=2&&!r.inFlow&&!f&&ee.isSeq(t)&&!t.flow&&!t.tag&&!t.anchor)r.indent=r.indent.substring(2);let I=!1,A=Di.stringify(t,r,()=>I=!0,()=>g=!0),R=" ";if(p||b||k){if(R=b?`
37
- `:"",k){let E=c(k);R+=`
38
- ${He.indentComment(E,r.indent)}`}if(A===""&&!r.inFlow){if(R===`
39
- `&&w)R=`
30
+ ${c}${k}${r}${f}`}function qu(e,t,r,n){let{type:i,value:o}=e,{actualString:s,implicitKey:a,indent:l,indentStep:c,inFlow:d}=t;if(a&&o.includes(`
31
+ `)||d&&/[[\]{},]/.test(o))return ve(o,t);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(o))return a||d||!o.includes(`
32
+ `)?ve(o,t):It(e,t,r,n);if(!a&&!d&&i!==z.Scalar.PLAIN&&o.includes(`
33
+ `))return It(e,t,r,n);if(At(o)){if(l==="")return t.forceBlockIndent=!0,It(e,t,r,n);else if(a&&l===c)return ve(o,t)}let u=o.replace(/\n+/g,`$&
34
+ ${l}`);if(s){let p=(g)=>g.default&&g.tag!=="tag:yaml.org,2002:str"&&g.test?.test(u),{compat:f,tags:y}=t.doc.schema;if(y.some(p)||f?.some(p))return ve(o,t)}return a?u:oe.foldFlowLines(u,l,oe.FOLD_FLOW,vt(t,!1))}function _u(e,t,r,n){let{implicitKey:i,inFlow:o}=t,s=typeof e.value==="string"?e:Object.assign({},e,{value:String(e.value)}),{type:a}=e;if(a!==z.Scalar.QUOTE_DOUBLE){if(/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(s.value))a=z.Scalar.QUOTE_DOUBLE}let l=(d)=>{switch(d){case z.Scalar.BLOCK_FOLDED:case z.Scalar.BLOCK_LITERAL:return i||o?ve(s.value,t):It(s,t,r,n);case z.Scalar.QUOTE_DOUBLE:return Ve(s.value,t);case z.Scalar.QUOTE_SINGLE:return Mr(s.value,t);case z.Scalar.PLAIN:return qu(s,t,r,n);default:return null}},c=l(a);if(c===null){let{defaultKeyType:d,defaultStringType:u}=t.options,p=i&&d||u;if(c=l(p),c===null)throw Error(`Unsupported default string type ${p}`)}return c}Fu.stringifyString=_u});var Ke=m(function(zu){var Bu=Ct(),se=P(),$u=je(),ju=Ue();function Vu(e,t){let r=Object.assign({blockQuote:!0,commentString:$u.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(r.collectionStyle){case"block":n=!1;break;case"flow":n=!0;break;default:n=null}return{anchors:new Set,doc:e,flowCollectionPadding:r.flowCollectionPadding?" ":"",indent:"",indentStep:typeof r.indent==="number"?" ".repeat(r.indent):" ",inFlow:n,options:r}}function Uu(e,t){if(t.tag){let i=e.filter((o)=>o.tag===t.tag);if(i.length>0)return i.find((o)=>o.format===t.format)??i[0]}let r=void 0,n;if(se.isScalar(t)){n=t.value;let i=e.filter((o)=>o.identify?.(n));if(i.length>1){let o=i.filter((s)=>s.test);if(o.length>0)i=o}r=i.find((o)=>o.format===t.format)??i.find((o)=>!o.format)}else n=t,r=e.find((i)=>i.nodeClass&&n instanceof i.nodeClass);if(!r){let i=n?.constructor?.name??(n===null?"null":typeof n);throw Error(`Tag not resolved for ${i} value`)}return r}function Ku(e,t,{anchors:r,doc:n}){if(!n.directives)return"";let i=[],o=(se.isScalar(e)||se.isCollection(e))&&e.anchor;if(o&&Bu.anchorIsValid(o))r.add(o),i.push(`&${o}`);let s=e.tag??(t.default?null:t.tag);if(s)i.push(n.directives.tagString(s));return i.join(" ")}function Hu(e,t,r,n){if(se.isPair(e))return e.toString(t,r,n);if(se.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,o=se.isNode(e)?e:t.doc.createNode(e,{onTagObj:(l)=>i=l});i??(i=Uu(t.doc.schema.tags,o));let s=Ku(o,i,t);if(s.length>0)t.indentAtStart=(t.indentAtStart??0)+s.length+1;let a=typeof i.stringify==="function"?i.stringify(o,t,r,n):se.isScalar(o)?ju.stringifyString(o,t,r,n):o.toString(t,r,n);if(!s)return a;return se.isScalar(o)||a[0]==="{"||a[0]==="["?`${s} ${a}`:`${s}
35
+ ${t.indent}${a}`}zu.createStringifyContext=Vu;zu.stringify=Hu});var qi=m(function(Ju){var ee=P(),Di=N(),Li=Ke(),He=je();function Wu({key:e,value:t},r,n,i){let{allNullValues:o,doc:s,indent:a,indentStep:l,options:{commentString:c,indentSeq:d,simpleKeys:u}}=r,p=ee.isNode(e)&&e.comment||null;if(u){if(p)throw Error("With simple keys, key nodes cannot have comments");if(ee.isCollection(e)||!ee.isNode(e)&&typeof e==="object")throw Error("With simple keys, collection cannot be used as a key value")}let f=!u&&(!e||p&&t==null&&!r.inFlow||ee.isCollection(e)||(ee.isScalar(e)?e.type===Di.Scalar.BLOCK_FOLDED||e.type===Di.Scalar.BLOCK_LITERAL:typeof e==="object"));r=Object.assign({},r,{allNullValues:!1,implicitKey:!f&&(u||!o),indent:a+l});let y=!1,g=!1,h=Li.stringify(e,r,()=>y=!0,()=>g=!0);if(!f&&!r.inFlow&&h.length>1024){if(u)throw Error("With simple keys, single line scalar must not span more than 1024 characters");f=!0}if(r.inFlow){if(o||t==null){if(y&&n)n();return h===""?"?":f?`? ${h}`:h}}else if(o&&!u||t==null&&f){if(h=`? ${h}`,p&&!y)h+=He.lineComment(h,r.indent,c(p));else if(g&&i)i();return h}if(y)p=null;if(f){if(p)h+=He.lineComment(h,r.indent,c(p));h=`? ${h}
36
+ ${a}:`}else if(h=`${h}:`,p)h+=He.lineComment(h,r.indent,c(p));let b,k,w;if(ee.isNode(t))b=!!t.spaceBefore,k=t.commentBefore,w=t.comment;else if(b=!1,k=null,w=null,t&&typeof t==="object")t=s.createNode(t);if(r.implicitKey=!1,!f&&!p&&ee.isScalar(t))r.indentAtStart=h.length+1;if(g=!1,!d&&l.length>=2&&!r.inFlow&&!f&&ee.isSeq(t)&&!t.flow&&!t.tag&&!t.anchor)r.indent=r.indent.substring(2);let I=!1,A=Li.stringify(t,r,()=>I=!0,()=>g=!0),v=" ";if(p||b||k){if(v=b?`
37
+ `:"",k){let E=c(k);v+=`
38
+ ${He.indentComment(E,r.indent)}`}if(A===""&&!r.inFlow){if(v===`
39
+ `&&w)v=`
40
40
 
41
- `}else R+=`
41
+ `}else v+=`
42
42
  ${r.indent}`}else if(!f&&ee.isCollection(t)){let E=A[0],x=A.indexOf(`
43
- `),D=x!==-1,ne=r.inFlow??t.flow??t.items.length===0;if(D||!ne){let ke=!1;if(D&&(E==="&"||E==="!")){let L=A.indexOf(" ");if(E==="&"&&L!==-1&&L<x&&A[L+1]==="!")L=A.indexOf(" ",L+1);if(L===-1||x<L)ke=!0}if(!ke)R=`
43
+ `),D=x!==-1,ne=r.inFlow??t.flow??t.items.length===0;if(D||!ne){let ke=!1;if(D&&(E==="&"||E==="!")){let L=A.indexOf(" ");if(E==="&"&&L!==-1&&L<x&&A[L+1]==="!")L=A.indexOf(" ",L+1);if(L===-1||x<L)ke=!0}if(!ke)v=`
44
44
  ${r.indent}`}}else if(A===""||A[0]===`
45
- `)R="";if(h+=R+A,r.inFlow){if(I&&n)n()}else if(w&&!I)h+=He.lineComment(h,r.indent,c(w));else if(g&&i)i();return h}Wu.stringifyPair=zu});var Br=m(function(Zu){var qi=mt("process");function Xu(e,...t){if(e==="debug")console.log(...t)}function Qu(e,t){if(e==="debug"||e==="warn")if(typeof qi.emitWarning==="function")qi.emitWarning(t);else console.warn(t)}Zu.debug=Xu;Zu.warn=Qu});var Nt=m(function(nd){var Et=P(),_i=O(),vt="<<",Pt={identify:(e)=>e===vt||typeof e==="symbol"&&e.description===vt,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new _i.Scalar(Symbol(vt)),{addToJSMap:Fi}),stringify:()=>vt},rd=(e,t)=>(Pt.identify(t)||Et.isScalar(t)&&(!t.type||t.type===_i.Scalar.PLAIN)&&Pt.identify(t.value))&&e?.doc.schema.tags.some((r)=>r.tag===Pt.tag&&r.default);function Fi(e,t,r){let n=Mi(e,r);if(Et.isSeq(n))for(let i of n.items)jr(e,t,i);else if(Array.isArray(n))for(let i of n)jr(e,t,i);else jr(e,t,n)}function jr(e,t,r){let n=Mi(e,r);if(!Et.isMap(n))throw Error("Merge sources must be maps or map aliases");let i=n.toJSON(null,e,Map);for(let[o,s]of i)if(t instanceof Map){if(!t.has(o))t.set(o,s)}else if(t instanceof Set)t.add(o);else if(!Object.prototype.hasOwnProperty.call(t,o))Object.defineProperty(t,o,{value:s,writable:!0,enumerable:!0,configurable:!0});return t}function Mi(e,t){return e&&Et.isAlias(t)?t.resolve(e.doc,e):t}nd.addMergeToJSMap=Fi;nd.isMergeKey=rd;nd.merge=Pt});var Ur=m(function(dd){var ad=Br(),$i=Nt(),ld=Ke(),Bi=P(),Vr=ie();function cd(e,t,{key:r,value:n}){if(Bi.isNode(r)&&r.addToJSMap)r.addToJSMap(e,t,n);else if($i.isMergeKey(e,r))$i.addMergeToJSMap(e,t,n);else{let i=Vr.toJS(r,"",e);if(t instanceof Map)t.set(i,Vr.toJS(n,i,e));else if(t instanceof Set)t.add(i);else{let o=ud(r,i,e),s=Vr.toJS(n,o,e);if(o in t)Object.defineProperty(t,o,{value:s,writable:!0,enumerable:!0,configurable:!0});else t[o]=s}}return t}function ud(e,t,r){if(t===null)return"";if(typeof t!=="object")return String(t);if(Bi.isNode(e)&&r?.doc){let n=ld.createStringifyContext(r.doc,{});n.anchors=new Set;for(let o of r.anchors.keys())n.anchors.add(o.anchor);n.inFlow=!0,n.inStringifyKey=!0;let i=e.toString(n);if(!r.mapKeyWarned){let o=JSON.stringify(i);if(o.length>40)o=o.substring(0,36)+'..."';ad.warn(r.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${o}. Set mapAsMap: true to use object keys.`),r.mapKeyWarned=!0}return i}return JSON.stringify(t)}dd.addPairToJSMap=cd});var ae=m(function(hd){var ji=Be(),fd=Li(),gd=Ur(),Tt=P();function md(e,t,r){let n=ji.createNode(e,void 0,r),i=ji.createNode(t,void 0,r);return new Ot(n,i)}class Ot{constructor(e,t=null){Object.defineProperty(this,Tt.NODE_TYPE,{value:Tt.PAIR}),this.key=e,this.value=t}clone(e){let{key:t,value:r}=this;if(Tt.isNode(t))t=t.clone(e);if(Tt.isNode(r))r=r.clone(e);return new Ot(t,r)}toJSON(e,t){let r=t?.mapAsMap?new Map:{};return gd.addPairToJSMap(t,r,this)}toString(e,t,r){return e?.doc?fd.stringifyPair(this,e,t,r):JSON.stringify(this)}}hd.Pair=Ot;hd.createPair=md});var Kr=m(function(wd){var he=P(),Vi=Ke(),Dt=je();function Cd(e,t,r){return(t.inFlow??e.flow?kd:Sd)(e,t,r)}function Sd({comment:e,items:t},r,{blockItemPrefix:n,flowChars:i,itemIndent:o,onChompKeep:s,onComment:a}){let{indent:l,options:{commentString:c}}=r,d=Object.assign({},r,{indent:o,type:null}),u=!1,p=[];for(let y=0;y<t.length;++y){let g=t[y],h=null;if(he.isNode(g)){if(!u&&g.spaceBefore)p.push("");if(Lt(r,p,g.commentBefore,u),g.comment)h=g.comment}else if(he.isPair(g)){let k=he.isNode(g.key)?g.key:null;if(k){if(!u&&k.spaceBefore)p.push("");Lt(r,p,k.commentBefore,u)}}u=!1;let b=Vi.stringify(g,d,()=>h=null,()=>u=!0);if(h)b+=Dt.lineComment(b,o,c(h));if(u&&h)u=!1;p.push(n+b)}let f;if(p.length===0)f=i.start+i.end;else{f=p[0];for(let y=1;y<p.length;++y){let g=p[y];f+=g?`
45
+ `)v="";if(h+=v+A,r.inFlow){if(I&&n)n()}else if(w&&!I)h+=He.lineComment(h,r.indent,c(w));else if(g&&i)i();return h}Ju.stringifyPair=Wu});var $r=m(function(ed){var _i=mt("process");function Qu(e,...t){if(e==="debug")console.log(...t)}function Zu(e,t){if(e==="debug"||e==="warn")if(typeof _i.emitWarning==="function")_i.emitWarning(t);else console.warn(t)}ed.debug=Qu;ed.warn=Zu});var Ot=m(function(id){var Et=P(),Fi=N(),Rt="<<",Pt={identify:(e)=>e===Rt||typeof e==="symbol"&&e.description===Rt,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new Fi.Scalar(Symbol(Rt)),{addToJSMap:Mi}),stringify:()=>Rt},nd=(e,t)=>(Pt.identify(t)||Et.isScalar(t)&&(!t.type||t.type===Fi.Scalar.PLAIN)&&Pt.identify(t.value))&&e?.doc.schema.tags.some((r)=>r.tag===Pt.tag&&r.default);function Mi(e,t,r){let n=Bi(e,r);if(Et.isSeq(n))for(let i of n.items)jr(e,t,i);else if(Array.isArray(n))for(let i of n)jr(e,t,i);else jr(e,t,n)}function jr(e,t,r){let n=Bi(e,r);if(!Et.isMap(n))throw Error("Merge sources must be maps or map aliases");let i=n.toJSON(null,e,Map);for(let[o,s]of i)if(t instanceof Map){if(!t.has(o))t.set(o,s)}else if(t instanceof Set)t.add(o);else if(!Object.prototype.hasOwnProperty.call(t,o))Object.defineProperty(t,o,{value:s,writable:!0,enumerable:!0,configurable:!0});return t}function Bi(e,t){return e&&Et.isAlias(t)?t.resolve(e.doc,e):t}id.addMergeToJSMap=Mi;id.isMergeKey=nd;id.merge=Pt});var Ur=m(function(pd){var ld=$r(),$i=Ot(),cd=Ke(),ji=P(),Vr=ie();function ud(e,t,{key:r,value:n}){if(ji.isNode(r)&&r.addToJSMap)r.addToJSMap(e,t,n);else if($i.isMergeKey(e,r))$i.addMergeToJSMap(e,t,n);else{let i=Vr.toJS(r,"",e);if(t instanceof Map)t.set(i,Vr.toJS(n,i,e));else if(t instanceof Set)t.add(i);else{let o=dd(r,i,e),s=Vr.toJS(n,o,e);if(o in t)Object.defineProperty(t,o,{value:s,writable:!0,enumerable:!0,configurable:!0});else t[o]=s}}return t}function dd(e,t,r){if(t===null)return"";if(typeof t!=="object")return String(t);if(ji.isNode(e)&&r?.doc){let n=cd.createStringifyContext(r.doc,{});n.anchors=new Set;for(let o of r.anchors.keys())n.anchors.add(o.anchor);n.inFlow=!0,n.inStringifyKey=!0;let i=e.toString(n);if(!r.mapKeyWarned){let o=JSON.stringify(i);if(o.length>40)o=o.substring(0,36)+'..."';ld.warn(r.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${o}. Set mapAsMap: true to use object keys.`),r.mapKeyWarned=!0}return i}return JSON.stringify(t)}pd.addPairToJSMap=ud});var ae=m(function(yd){var Vi=$e(),gd=qi(),md=Ur(),Tt=P();function hd(e,t,r){let n=Vi.createNode(e,void 0,r),i=Vi.createNode(t,void 0,r);return new Nt(n,i)}class Nt{constructor(e,t=null){Object.defineProperty(this,Tt.NODE_TYPE,{value:Tt.PAIR}),this.key=e,this.value=t}clone(e){let{key:t,value:r}=this;if(Tt.isNode(t))t=t.clone(e);if(Tt.isNode(r))r=r.clone(e);return new Nt(t,r)}toJSON(e,t){let r=t?.mapAsMap?new Map:{};return md.addPairToJSMap(t,r,this)}toString(e,t,r){return e?.doc?gd.stringifyPair(this,e,t,r):JSON.stringify(this)}}yd.Pair=Nt;yd.createPair=hd});var Kr=m(function(xd){var he=P(),Ui=Ke(),Dt=je();function Cd(e,t,r){return(t.inFlow??e.flow?wd:kd)(e,t,r)}function kd({comment:e,items:t},r,{blockItemPrefix:n,flowChars:i,itemIndent:o,onChompKeep:s,onComment:a}){let{indent:l,options:{commentString:c}}=r,d=Object.assign({},r,{indent:o,type:null}),u=!1,p=[];for(let y=0;y<t.length;++y){let g=t[y],h=null;if(he.isNode(g)){if(!u&&g.spaceBefore)p.push("");if(Lt(r,p,g.commentBefore,u),g.comment)h=g.comment}else if(he.isPair(g)){let k=he.isNode(g.key)?g.key:null;if(k){if(!u&&k.spaceBefore)p.push("");Lt(r,p,k.commentBefore,u)}}u=!1;let b=Ui.stringify(g,d,()=>h=null,()=>u=!0);if(h)b+=Dt.lineComment(b,o,c(h));if(u&&h)u=!1;p.push(n+b)}let f;if(p.length===0)f=i.start+i.end;else{f=p[0];for(let y=1;y<p.length;++y){let g=p[y];f+=g?`
46
46
  ${l}${g}`:`
47
47
  `}}if(e){if(f+=`
48
- `+Dt.indentComment(c(e),l),a)a()}else if(u&&s)s();return f}function kd({items:e},t,{flowChars:r,itemIndent:n}){let{indent:i,indentStep:o,flowCollectionPadding:s,options:{commentString:a}}=t;n+=o;let l=Object.assign({},t,{indent:n,inFlow:!0,type:null}),c=!1,d=0,u=[];for(let y=0;y<e.length;++y){let g=e[y],h=null;if(he.isNode(g)){if(g.spaceBefore)u.push("");if(Lt(t,u,g.commentBefore,!1),g.comment)h=g.comment}else if(he.isPair(g)){let k=he.isNode(g.key)?g.key:null;if(k){if(k.spaceBefore)u.push("");if(Lt(t,u,k.commentBefore,!1),k.comment)c=!0}let w=he.isNode(g.value)?g.value:null;if(w){if(w.comment)h=w.comment;if(w.commentBefore)c=!0}else if(g.value==null&&k?.comment)h=k.comment}if(h)c=!0;let b=Vi.stringify(g,l,()=>h=null);if(c||(c=u.length>d||b.includes(`
48
+ `+Dt.indentComment(c(e),l),a)a()}else if(u&&s)s();return f}function wd({items:e},t,{flowChars:r,itemIndent:n}){let{indent:i,indentStep:o,flowCollectionPadding:s,options:{commentString:a}}=t;n+=o;let l=Object.assign({},t,{indent:n,inFlow:!0,type:null}),c=!1,d=0,u=[];for(let y=0;y<e.length;++y){let g=e[y],h=null;if(he.isNode(g)){if(g.spaceBefore)u.push("");if(Lt(t,u,g.commentBefore,!1),g.comment)h=g.comment}else if(he.isPair(g)){let k=he.isNode(g.key)?g.key:null;if(k){if(k.spaceBefore)u.push("");if(Lt(t,u,k.commentBefore,!1),k.comment)c=!0}let w=he.isNode(g.value)?g.value:null;if(w){if(w.comment)h=w.comment;if(w.commentBefore)c=!0}else if(g.value==null&&k?.comment)h=k.comment}if(h)c=!0;let b=Ui.stringify(g,l,()=>h=null);if(c||(c=u.length>d||b.includes(`
49
49
  `)),y<e.length-1)b+=",";else if(t.options.trailingComma){if(t.options.lineWidth>0)c||(c=u.reduce((k,w)=>k+w.length+2,2)+(b.length+2)>t.options.lineWidth);if(c)b+=","}if(h)b+=Dt.lineComment(b,n,a(h));u.push(b),d=u.length}let{start:p,end:f}=r;if(u.length===0)return p+f;else{if(!c){let y=u.reduce((g,h)=>g+h.length+2,2);c=t.options.lineWidth>0&&y>t.options.lineWidth}if(c){let y=p;for(let g of u)y+=g?`
50
50
  ${o}${i}${g}`:`
51
51
  `;return`${y}
52
- ${i}${f}`}else return`${p}${s}${u.join(" ")}${s}${f}`}}function Lt({indent:e,options:{commentString:t}},r,n,i){if(n&&i)n=n.replace(/^\n+/,"");if(n){let o=Dt.indentComment(t(n),e);r.push(o.trimStart())}}wd.stringifyCollection=Cd});var ce=m(function(Pd){var Id=Kr(),Rd=Ur(),Ad=xt(),le=P(),qt=ae(),vd=O();function Ye(e,t){let r=le.isScalar(t)?t.value:t;for(let n of e)if(le.isPair(n)){if(n.key===t||n.key===r)return n;if(le.isScalar(n.key)&&n.key.value===r)return n}return}class Ui extends Ad.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(le.MAP,e);this.items=[]}static from(e,t,r){let{keepUndefined:n,replacer:i}=r,o=new this(e),s=(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)o.items.push(qt.createPair(a,l,r))};if(t instanceof Map)for(let[a,l]of t)s(a,l);else if(t&&typeof t==="object")for(let a of Object.keys(t))s(a,t[a]);if(typeof e.sortMapEntries==="function")o.items.sort(e.sortMapEntries);return o}add(e,t){let r;if(le.isPair(e))r=e;else if(!e||typeof e!=="object"||!("key"in e))r=new qt.Pair(e,e?.value);else r=new qt.Pair(e.key,e.value);let n=Ye(this.items,r.key),i=this.schema?.sortMapEntries;if(n){if(!t)throw Error(`Key ${r.key} already set`);if(le.isScalar(n.value)&&vd.isScalarValue(r.value))n.value.value=r.value;else n.value=r.value}else if(i){let o=this.items.findIndex((s)=>i(r,s)<0);if(o===-1)this.items.push(r);else this.items.splice(o,0,r)}else this.items.push(r)}delete(e){let t=Ye(this.items,e);if(!t)return!1;return this.items.splice(this.items.indexOf(t),1).length>0}get(e,t){let n=Ye(this.items,e)?.value;return(!t&&le.isScalar(n)?n.value:n)??void 0}has(e){return!!Ye(this.items,e)}set(e,t){this.add(new qt.Pair(e,t),!0)}toJSON(e,t,r){let n=r?new r:t?.mapAsMap?new Map:{};if(t?.onCreate)t.onCreate(n);for(let i of this.items)Rd.addPairToJSMap(t,n,i);return n}toString(e,t,r){if(!e)return JSON.stringify(this);for(let n of this.items)if(!le.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 Id.stringifyCollection(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:r,onComment:t})}}Pd.YAMLMap=Ui;Pd.findPair=Ye});var Ae=m(function(Dd){var Td=P(),Ki=ce(),Od={collection:"map",default:!0,nodeClass:Ki.YAMLMap,tag:"tag:yaml.org,2002:map",resolve(e,t){if(!Td.isMap(e))t("Expected a mapping for this tag");return e},createNode:(e,t,r)=>Ki.YAMLMap.from(e,t,r)};Dd.map=Od});var ue=m(function(Bd){var qd=Be(),_d=Kr(),Fd=xt(),Ft=P(),Md=O(),$d=ie();class Hi extends Fd.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(Ft.SEQ,e);this.items=[]}add(e){this.items.push(e)}delete(e){let t=_t(e);if(typeof t!=="number")return!1;return this.items.splice(t,1).length>0}get(e,t){let r=_t(e);if(typeof r!=="number")return;let n=this.items[r];return!t&&Ft.isScalar(n)?n.value:n}has(e){let t=_t(e);return typeof t==="number"&&t<this.items.length}set(e,t){let r=_t(e);if(typeof r!=="number")throw Error(`Expected a valid index, not ${e}.`);let n=this.items[r];if(Ft.isScalar(n)&&Md.isScalarValue(t))n.value=t;else this.items[r]=t}toJSON(e,t){let r=[];if(t?.onCreate)t.onCreate(r);let n=0;for(let i of this.items)r.push($d.toJS(i,String(n++),t));return r}toString(e,t,r){if(!e)return JSON.stringify(this);return _d.stringifyCollection(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:r,onComment:t})}static from(e,t,r){let{replacer:n}=r,i=new this(e);if(t&&Symbol.iterator in Object(t)){let o=0;for(let s of t){if(typeof n==="function"){let a=t instanceof Set?s:String(o++);s=n.call(t,a,s)}i.items.push(qd.createNode(s,void 0,r))}}return i}}function _t(e){let t=Ft.isScalar(e)?e.value:e;if(t&&typeof t==="string")t=Number(t);return typeof t==="number"&&Number.isInteger(t)&&t>=0?t:null}Bd.YAMLSeq=Hi});var ve=m(function(Kd){var Vd=P(),Yi=ue(),Ud={collection:"seq",default:!0,nodeClass:Yi.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve(e,t){if(!Vd.isSeq(e))t("Expected a sequence for this tag");return e},createNode:(e,t,r)=>Yi.YAMLSeq.from(e,t,r)};Kd.seq=Ud});var Ge=m(function(zd){var Yd=Ue(),Gd={identify:(e)=>typeof e==="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:(e)=>e,stringify(e,t,r,n){return t=Object.assign({actualString:!0},t),Yd.stringifyString(e,t,r,n)}};zd.string=Gd});var Mt=m(function(Jd){var Gi=O(),zi={identify:(e)=>e==null,createNode:()=>new Gi.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new Gi.Scalar(null),stringify:({source:e},t)=>typeof e==="string"&&zi.test.test(e)?e:t.options.nullStr};Jd.nullTag=zi});var Hr=m(function(Zd){var Qd=O(),Wi={identify:(e)=>typeof e==="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:(e)=>new Qd.Scalar(e[0]==="t"||e[0]==="T"),stringify({source:e,value:t},r){if(e&&Wi.test.test(e)){let n=e[0]==="t"||e[0]==="T";if(t===n)return e}return t?r.options.trueStr:r.options.falseStr}};Zd.boolTag=Wi});var Pe=m(function(rp){function tp({format:e,minFractionDigits:t,tag:r,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 o=Object.is(n,-0)?"-0":JSON.stringify(n);if(!e&&t&&(!r||r==="tag:yaml.org,2002:float")&&/^-?\d/.test(o)&&!o.includes("e")){let s=o.indexOf(".");if(s<0)s=o.length,o+=".";let a=t-(o.length-s-1);while(a-- >0)o+="0"}return o}rp.stringifyNumber=tp});var Gr=m(function(lp){var ip=O(),Yr=Pe(),op={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:Yr.stringifyNumber},sp={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():Yr.stringifyNumber(e)}},ap={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 ip.Scalar(parseFloat(e)),r=e.indexOf(".");if(r!==-1&&e[e.length-1]==="0")t.minFractionDigits=e.length-r-1;return t},stringify:Yr.stringifyNumber};lp.float=ap;lp.floatExp=sp;lp.floatNaN=op});var Wr=m(function(mp){var Ji=Pe(),$t=(e)=>typeof e==="bigint"||Number.isInteger(e),zr=(e,t,r,{intAsBigInt:n})=>n?BigInt(e):parseInt(e.substring(t),r);function Xi(e,t,r){let{value:n}=e;if($t(n)&&n>=0)return r+n.toString(t);return Ji.stringifyNumber(e)}var pp={identify:(e)=>$t(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,r)=>zr(e,2,8,r),stringify:(e)=>Xi(e,8,"0o")},fp={identify:$t,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,r)=>zr(e,0,10,r),stringify:Ji.stringifyNumber},gp={identify:(e)=>$t(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,r)=>zr(e,2,16,r),stringify:(e)=>Xi(e,16,"0x")};mp.int=fp;mp.intHex=gp;mp.intOct=pp});var Qi=m(function(Rp){var Cp=Ae(),Sp=Mt(),kp=ve(),wp=Ge(),xp=Hr(),Jr=Gr(),Xr=Wr(),Ip=[Cp.map,kp.seq,wp.string,Sp.nullTag,xp.boolTag,Xr.intOct,Xr.int,Xr.intHex,Jr.floatNaN,Jr.floatExp,Jr.float];Rp.schema=Ip});var eo=m(function(Dp){var vp=O(),Pp=Ae(),Ep=ve();function Zi(e){return typeof e==="bigint"||Number.isInteger(e)}var Bt=({value:e})=>JSON.stringify(e),Np=[{identify:(e)=>typeof e==="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:(e)=>e,stringify:Bt},{identify:(e)=>e==null,createNode:()=>new vp.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:Zi,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:r})=>r?BigInt(e):parseInt(e,10),stringify:({value:e})=>Zi(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}],Tp={default:!0,tag:"",test:/^/,resolve(e,t){return t(`Unresolved plain scalar ${JSON.stringify(e)}`),e}},Op=[Pp.map,Ep.seq].concat(Np,Tp);Dp.schema=Op});var Zr=m(function(Fp){var ze=mt("buffer"),Qr=O(),qp=Ue(),_p={identify:(e)=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(e,t){if(typeof ze.Buffer==="function")return ze.Buffer.from(e,"base64");else if(typeof atob==="function"){let r=atob(e.replace(/[\n\r]/g,"")),n=new Uint8Array(r.length);for(let i=0;i<r.length;++i)n[i]=r.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:r},n,i,o){if(!r)return"";let s=r,a;if(typeof ze.Buffer==="function")a=s instanceof ze.Buffer?s.toString("base64"):ze.Buffer.from(s.buffer).toString("base64");else if(typeof btoa==="function"){let l="";for(let c=0;c<s.length;++c)l+=String.fromCharCode(s[c]);a=btoa(l)}else throw Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(t??(t=Qr.Scalar.BLOCK_LITERAL),t!==Qr.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,p=0;u<c;++u,p+=l)d[u]=a.substr(p,l);a=d.join(t===Qr.Scalar.BLOCK_LITERAL?`
53
- `:" ")}return qp.stringifyString({comment:e,type:t,value:a},n,i,o)}};Fp.binary=_p});var Vt=m(function(Vp){var jt=P(),en=ae(),$p=O(),Bp=ue();function to(e,t){if(jt.isSeq(e))for(let r=0;r<e.items.length;++r){let n=e.items[r];if(jt.isPair(n))continue;else if(jt.isMap(n)){if(n.items.length>1)t("Each pair must have its own sequence indicator");let i=n.items[0]||new en.Pair(new $p.Scalar(null));if(n.commentBefore)i.key.commentBefore=i.key.commentBefore?`${n.commentBefore}
52
+ ${i}${f}`}else return`${p}${s}${u.join(" ")}${s}${f}`}}function Lt({indent:e,options:{commentString:t}},r,n,i){if(n&&i)n=n.replace(/^\n+/,"");if(n){let o=Dt.indentComment(t(n),e);r.push(o.trimStart())}}xd.stringifyCollection=Cd});var ce=m(function(Ed){var vd=Kr(),Ad=Ur(),Rd=xt(),le=P(),qt=ae(),Pd=N();function ze(e,t){let r=le.isScalar(t)?t.value:t;for(let n of e)if(le.isPair(n)){if(n.key===t||n.key===r)return n;if(le.isScalar(n.key)&&n.key.value===r)return n}return}class Ki extends Rd.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(le.MAP,e);this.items=[]}static from(e,t,r){let{keepUndefined:n,replacer:i}=r,o=new this(e),s=(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)o.items.push(qt.createPair(a,l,r))};if(t instanceof Map)for(let[a,l]of t)s(a,l);else if(t&&typeof t==="object")for(let a of Object.keys(t))s(a,t[a]);if(typeof e.sortMapEntries==="function")o.items.sort(e.sortMapEntries);return o}add(e,t){let r;if(le.isPair(e))r=e;else if(!e||typeof e!=="object"||!("key"in e))r=new qt.Pair(e,e?.value);else r=new qt.Pair(e.key,e.value);let n=ze(this.items,r.key),i=this.schema?.sortMapEntries;if(n){if(!t)throw Error(`Key ${r.key} already set`);if(le.isScalar(n.value)&&Pd.isScalarValue(r.value))n.value.value=r.value;else n.value=r.value}else if(i){let o=this.items.findIndex((s)=>i(r,s)<0);if(o===-1)this.items.push(r);else this.items.splice(o,0,r)}else this.items.push(r)}delete(e){let t=ze(this.items,e);if(!t)return!1;return this.items.splice(this.items.indexOf(t),1).length>0}get(e,t){let n=ze(this.items,e)?.value;return(!t&&le.isScalar(n)?n.value:n)??void 0}has(e){return!!ze(this.items,e)}set(e,t){this.add(new qt.Pair(e,t),!0)}toJSON(e,t,r){let n=r?new r:t?.mapAsMap?new Map:{};if(t?.onCreate)t.onCreate(n);for(let i of this.items)Ad.addPairToJSMap(t,n,i);return n}toString(e,t,r){if(!e)return JSON.stringify(this);for(let n of this.items)if(!le.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 vd.stringifyCollection(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:r,onComment:t})}}Ed.YAMLMap=Ki;Ed.findPair=ze});var Ae=m(function(Ld){var Nd=P(),Hi=ce(),Dd={collection:"map",default:!0,nodeClass:Hi.YAMLMap,tag:"tag:yaml.org,2002:map",resolve(e,t){if(!Nd.isMap(e))t("Expected a mapping for this tag");return e},createNode:(e,t,r)=>Hi.YAMLMap.from(e,t,r)};Ld.map=Dd});var ue=m(function(jd){var _d=$e(),Fd=Kr(),Md=xt(),Ft=P(),Bd=N(),$d=ie();class zi extends Md.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(Ft.SEQ,e);this.items=[]}add(e){this.items.push(e)}delete(e){let t=_t(e);if(typeof t!=="number")return!1;return this.items.splice(t,1).length>0}get(e,t){let r=_t(e);if(typeof r!=="number")return;let n=this.items[r];return!t&&Ft.isScalar(n)?n.value:n}has(e){let t=_t(e);return typeof t==="number"&&t<this.items.length}set(e,t){let r=_t(e);if(typeof r!=="number")throw Error(`Expected a valid index, not ${e}.`);let n=this.items[r];if(Ft.isScalar(n)&&Bd.isScalarValue(t))n.value=t;else this.items[r]=t}toJSON(e,t){let r=[];if(t?.onCreate)t.onCreate(r);let n=0;for(let i of this.items)r.push($d.toJS(i,String(n++),t));return r}toString(e,t,r){if(!e)return JSON.stringify(this);return Fd.stringifyCollection(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:r,onComment:t})}static from(e,t,r){let{replacer:n}=r,i=new this(e);if(t&&Symbol.iterator in Object(t)){let o=0;for(let s of t){if(typeof n==="function"){let a=t instanceof Set?s:String(o++);s=n.call(t,a,s)}i.items.push(_d.createNode(s,void 0,r))}}return i}}function _t(e){let t=Ft.isScalar(e)?e.value:e;if(t&&typeof t==="string")t=Number(t);return typeof t==="number"&&Number.isInteger(t)&&t>=0?t:null}jd.YAMLSeq=zi});var Re=m(function(Hd){var Ud=P(),Gi=ue(),Kd={collection:"seq",default:!0,nodeClass:Gi.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve(e,t){if(!Ud.isSeq(e))t("Expected a sequence for this tag");return e},createNode:(e,t,r)=>Gi.YAMLSeq.from(e,t,r)};Hd.seq=Kd});var Ge=m(function(Wd){var Gd=Ue(),Yd={identify:(e)=>typeof e==="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:(e)=>e,stringify(e,t,r,n){return t=Object.assign({actualString:!0},t),Gd.stringifyString(e,t,r,n)}};Wd.string=Yd});var Mt=m(function(Xd){var Yi=N(),Wi={identify:(e)=>e==null,createNode:()=>new Yi.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new Yi.Scalar(null),stringify:({source:e},t)=>typeof e==="string"&&Wi.test.test(e)?e:t.options.nullStr};Xd.nullTag=Wi});var Hr=m(function(ep){var Zd=N(),Ji={identify:(e)=>typeof e==="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:(e)=>new Zd.Scalar(e[0]==="t"||e[0]==="T"),stringify({source:e,value:t},r){if(e&&Ji.test.test(e)){let n=e[0]==="t"||e[0]==="T";if(t===n)return e}return t?r.options.trueStr:r.options.falseStr}};ep.boolTag=Ji});var Pe=m(function(np){function rp({format:e,minFractionDigits:t,tag:r,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 o=Object.is(n,-0)?"-0":JSON.stringify(n);if(!e&&t&&(!r||r==="tag:yaml.org,2002:float")&&/^-?\d/.test(o)&&!o.includes("e")){let s=o.indexOf(".");if(s<0)s=o.length,o+=".";let a=t-(o.length-s-1);while(a-- >0)o+="0"}return o}np.stringifyNumber=rp});var Gr=m(function(cp){var op=N(),zr=Pe(),sp={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:zr.stringifyNumber},ap={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():zr.stringifyNumber(e)}},lp={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 op.Scalar(parseFloat(e)),r=e.indexOf(".");if(r!==-1&&e[e.length-1]==="0")t.minFractionDigits=e.length-r-1;return t},stringify:zr.stringifyNumber};cp.float=lp;cp.floatExp=ap;cp.floatNaN=sp});var Wr=m(function(hp){var Xi=Pe(),Bt=(e)=>typeof e==="bigint"||Number.isInteger(e),Yr=(e,t,r,{intAsBigInt:n})=>n?BigInt(e):parseInt(e.substring(t),r);function Qi(e,t,r){let{value:n}=e;if(Bt(n)&&n>=0)return r+n.toString(t);return Xi.stringifyNumber(e)}var fp={identify:(e)=>Bt(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,r)=>Yr(e,2,8,r),stringify:(e)=>Qi(e,8,"0o")},gp={identify:Bt,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,r)=>Yr(e,0,10,r),stringify:Xi.stringifyNumber},mp={identify:(e)=>Bt(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,r)=>Yr(e,2,16,r),stringify:(e)=>Qi(e,16,"0x")};hp.int=gp;hp.intHex=mp;hp.intOct=fp});var Zi=m(function(Ap){var Cp=Ae(),kp=Mt(),wp=Re(),xp=Ge(),Ip=Hr(),Jr=Gr(),Xr=Wr(),vp=[Cp.map,wp.seq,xp.string,kp.nullTag,Ip.boolTag,Xr.intOct,Xr.int,Xr.intHex,Jr.floatNaN,Jr.floatExp,Jr.float];Ap.schema=vp});var to=m(function(Lp){var Pp=N(),Ep=Ae(),Op=Re();function eo(e){return typeof e==="bigint"||Number.isInteger(e)}var $t=({value:e})=>JSON.stringify(e),Tp=[{identify:(e)=>typeof e==="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:(e)=>e,stringify:$t},{identify:(e)=>e==null,createNode:()=>new Pp.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:$t},{identify:(e)=>typeof e==="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:(e)=>e==="true",stringify:$t},{identify:eo,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:r})=>r?BigInt(e):parseInt(e,10),stringify:({value:e})=>eo(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:$t}],Np={default:!0,tag:"",test:/^/,resolve(e,t){return t(`Unresolved plain scalar ${JSON.stringify(e)}`),e}},Dp=[Ep.map,Op.seq].concat(Tp,Np);Lp.schema=Dp});var Zr=m(function(Mp){var Ye=mt("buffer"),Qr=N(),_p=Ue(),Fp={identify:(e)=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(e,t){if(typeof Ye.Buffer==="function")return Ye.Buffer.from(e,"base64");else if(typeof atob==="function"){let r=atob(e.replace(/[\n\r]/g,"")),n=new Uint8Array(r.length);for(let i=0;i<r.length;++i)n[i]=r.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:r},n,i,o){if(!r)return"";let s=r,a;if(typeof Ye.Buffer==="function")a=s instanceof Ye.Buffer?s.toString("base64"):Ye.Buffer.from(s.buffer).toString("base64");else if(typeof btoa==="function"){let l="";for(let c=0;c<s.length;++c)l+=String.fromCharCode(s[c]);a=btoa(l)}else throw Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(t??(t=Qr.Scalar.BLOCK_LITERAL),t!==Qr.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,p=0;u<c;++u,p+=l)d[u]=a.substr(p,l);a=d.join(t===Qr.Scalar.BLOCK_LITERAL?`
53
+ `:" ")}return _p.stringifyString({comment:e,type:t,value:a},n,i,o)}};Mp.binary=Fp});var Vt=m(function(Up){var jt=P(),en=ae(),$p=N(),jp=ue();function ro(e,t){if(jt.isSeq(e))for(let r=0;r<e.items.length;++r){let n=e.items[r];if(jt.isPair(n))continue;else if(jt.isMap(n)){if(n.items.length>1)t("Each pair must have its own sequence indicator");let i=n.items[0]||new en.Pair(new $p.Scalar(null));if(n.commentBefore)i.key.commentBefore=i.key.commentBefore?`${n.commentBefore}
54
54
  ${i.key.commentBefore}`:n.commentBefore;if(n.comment){let o=i.value??i.key;o.comment=o.comment?`${n.comment}
55
- ${o.comment}`:n.comment}n=i}e.items[r]=jt.isPair(n)?n:new en.Pair(n)}else t("Expected a sequence for this tag");return e}function ro(e,t,r){let{replacer:n}=r,i=new Bp.YAMLSeq(e);i.tag="tag:yaml.org,2002:pairs";let o=0;if(t&&Symbol.iterator in Object(t))for(let s of t){if(typeof n==="function")s=n.call(t,String(o++),s);let a,l;if(Array.isArray(s))if(s.length===2)a=s[0],l=s[1];else throw TypeError(`Expected [key, value] tuple: ${s}`);else if(s&&s instanceof Object){let c=Object.keys(s);if(c.length===1)a=c[0],l=s[a];else throw TypeError(`Expected tuple with one key, not ${c.length} keys`)}else a=s;i.items.push(en.createPair(a,l,r))}return i}var jp={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:to,createNode:ro};Vp.createPairs=ro;Vp.pairs=jp;Vp.resolvePairs=to});var rn=m(function(zp){var no=P(),tn=ie(),We=ce(),Yp=ue(),io=Vt();class ye extends Yp.YAMLSeq{constructor(){super();this.add=We.YAMLMap.prototype.add.bind(this),this.delete=We.YAMLMap.prototype.delete.bind(this),this.get=We.YAMLMap.prototype.get.bind(this),this.has=We.YAMLMap.prototype.has.bind(this),this.set=We.YAMLMap.prototype.set.bind(this),this.tag=ye.tag}toJSON(e,t){if(!t)return super.toJSON(e);let r=new Map;if(t?.onCreate)t.onCreate(r);for(let n of this.items){let i,o;if(no.isPair(n))i=tn.toJS(n.key,"",t),o=tn.toJS(n.value,i,t);else i=tn.toJS(n,"",t);if(r.has(i))throw Error("Ordered maps must not include duplicate keys");r.set(i,o)}return r}static from(e,t,r){let n=io.createPairs(e,t,r),i=new this;return i.items=n.items,i}}ye.tag="tag:yaml.org,2002:omap";var Gp={collection:"seq",identify:(e)=>e instanceof Map,nodeClass:ye,default:!1,tag:"tag:yaml.org,2002:omap",resolve(e,t){let r=io.resolvePairs(e,t),n=[];for(let{key:i}of r.items)if(no.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 ye,r)},createNode:(e,t,r)=>ye.from(e,t,r)};zp.YAMLOMap=ye;zp.omap=Gp});var co=m(function(Xp){var oo=O();function so({value:e,source:t},r){if(t&&(e?ao:lo).test.test(t))return t;return e?r.options.trueStr:r.options.falseStr}var ao={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 oo.Scalar(!0),stringify:so},lo={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 oo.Scalar(!1),stringify:so};Xp.falseTag=lo;Xp.trueTag=ao});var uo=m(function(of){var ef=O(),nn=Pe(),tf={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:nn.stringifyNumber},rf={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():nn.stringifyNumber(e)}},nf={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 ef.Scalar(parseFloat(e.replace(/_/g,""))),r=e.indexOf(".");if(r!==-1){let n=e.substring(r+1).replace(/_/g,"");if(n[n.length-1]==="0")t.minFractionDigits=n.length}return t},stringify:nn.stringifyNumber};of.float=nf;of.floatExp=rf;of.floatNaN=tf});var fo=m(function(ff){var po=Pe(),Je=(e)=>typeof e==="bigint"||Number.isInteger(e);function Ut(e,t,r,{intAsBigInt:n}){let i=e[0];if(i==="-"||i==="+")t+=1;if(e=e.substring(t).replace(/_/g,""),n){switch(r){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`;break}let s=BigInt(e);return i==="-"?BigInt(-1)*s:s}let o=parseInt(e,r);return i==="-"?-1*o:o}function on(e,t,r){let{value:n}=e;if(Je(n)){let i=n.toString(t);return n<0?"-"+r+i.substr(1):r+i}return po.stringifyNumber(e)}var cf={identify:Je,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,r)=>Ut(e,2,2,r),stringify:(e)=>on(e,2,"0b")},uf={identify:Je,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,r)=>Ut(e,1,8,r),stringify:(e)=>on(e,8,"0")},df={identify:Je,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,r)=>Ut(e,0,10,r),stringify:po.stringifyNumber},pf={identify:Je,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,r)=>Ut(e,2,16,r),stringify:(e)=>on(e,16,"0x")};ff.int=df;ff.intBin=cf;ff.intHex=pf;ff.intOct=uf});var sn=m(function(Cf){var Yt=P(),Kt=ae(),Ht=ce();class be extends Ht.YAMLMap{constructor(e){super(e);this.tag=be.tag}add(e){let t;if(Yt.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(!Ht.findPair(this.items,t.key))this.items.push(t)}get(e,t){let r=Ht.findPair(this.items,e);return!t&&Yt.isPair(r)?Yt.isScalar(r.key)?r.key.value:r.key:r}set(e,t){if(typeof t!=="boolean")throw Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);let r=Ht.findPair(this.items,e);if(r&&!t)this.items.splice(this.items.indexOf(r),1);else if(!r&&t)this.items.push(new Kt.Pair(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,r){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,r);else throw Error("Set items must all have null values")}static from(e,t,r){let{replacer:n}=r,i=new this(e);if(t&&Symbol.iterator in Object(t))for(let o of t){if(typeof n==="function")o=n.call(t,o,o);i.items.push(Kt.createPair(o,null,r))}return i}}be.tag="tag:yaml.org,2002:set";var bf={collection:"map",identify:(e)=>e instanceof Set,nodeClass:be,default:!1,tag:"tag:yaml.org,2002:set",createNode:(e,t,r)=>be.from(e,t,r),resolve(e,t){if(Yt.isMap(e))if(e.hasAllNullValues(!0))return Object.assign(new be,e);else t("Set items must all have null values");else t("Expected a mapping for this tag");return e}};Cf.YAMLSet=be;Cf.set=bf});var ln=m(function(Rf){var wf=Pe();function an(e,t){let r=e[0],n=r==="-"||r==="+"?e.substring(1):e,i=(s)=>t?BigInt(s):Number(s),o=n.replace(/_/g,"").split(":").reduce((s,a)=>s*i(60)+i(a),i(0));return r==="-"?i(-1)*o:o}function go(e){let{value:t}=e,r=(s)=>s;if(typeof t==="bigint")r=(s)=>BigInt(s);else if(isNaN(t)||!isFinite(t))return wf.stringifyNumber(e);let n="";if(t<0)n="-",t*=r(-1);let i=r(60),o=[t%i];if(t<60)o.unshift(0);else if(t=(t-o[0])/i,o.unshift(t%i),t>=60)t=(t-o[0])/i,o.unshift(t);return n+o.map((s)=>String(s).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}var xf={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:r})=>an(e,r),stringify:go},If={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)=>an(e,!1),stringify:go},mo={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(mo.test);if(!t)throw Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,r,n,i,o,s,a]=t.map(Number),l=t[7]?Number((t[7]+"00").substr(1,3)):0,c=Date.UTC(r,n-1,i,o||0,s||0,a||0,l),d=t[8];if(d&&d!=="Z"){let u=an(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$/,"")??""};Rf.floatTime=If;Rf.intTime=xf;Rf.timestamp=mo});var yo=m(function($f){var Ef=Ae(),Nf=Mt(),Tf=ve(),Of=Ge(),Df=Zr(),ho=co(),cn=uo(),Gt=fo(),Lf=Nt(),qf=rn(),_f=Vt(),Ff=sn(),un=ln(),Mf=[Ef.map,Tf.seq,Of.string,Nf.nullTag,ho.trueTag,ho.falseTag,Gt.intBin,Gt.intOct,Gt.int,Gt.intHex,cn.floatNaN,cn.floatExp,cn.float,Df.binary,Lf.merge,qf.omap,_f.pairs,Ff.set,un.intTime,un.floatTime,un.timestamp];$f.schema=Mf});var vo=m(function(zf){var ko=Ae(),jf=Mt(),wo=ve(),Vf=Ge(),Uf=Hr(),dn=Gr(),pn=Wr(),Kf=Qi(),Hf=eo(),xo=Zr(),Xe=Nt(),Io=rn(),Ro=Vt(),bo=yo(),Ao=sn(),zt=ln(),Co=new Map([["core",Kf.schema],["failsafe",[ko.map,wo.seq,Vf.string]],["json",Hf.schema],["yaml11",bo.schema],["yaml-1.1",bo.schema]]),So={binary:xo.binary,bool:Uf.boolTag,float:dn.float,floatExp:dn.floatExp,floatNaN:dn.floatNaN,floatTime:zt.floatTime,int:pn.int,intHex:pn.intHex,intOct:pn.intOct,intTime:zt.intTime,map:ko.map,merge:Xe.merge,null:jf.nullTag,omap:Io.omap,pairs:Ro.pairs,seq:wo.seq,set:Ao.set,timestamp:zt.timestamp},Yf={"tag:yaml.org,2002:binary":xo.binary,"tag:yaml.org,2002:merge":Xe.merge,"tag:yaml.org,2002:omap":Io.omap,"tag:yaml.org,2002:pairs":Ro.pairs,"tag:yaml.org,2002:set":Ao.set,"tag:yaml.org,2002:timestamp":zt.timestamp};function Gf(e,t,r){let n=Co.get(t);if(n&&!e)return r&&!n.includes(Xe.merge)?n.concat(Xe.merge):n.slice();let i=n;if(!i)if(Array.isArray(e))i=[];else{let o=Array.from(Co.keys()).filter((s)=>s!=="yaml11").map((s)=>JSON.stringify(s)).join(", ");throw Error(`Unknown schema "${t}"; use one of ${o} or define customTags array`)}if(Array.isArray(e))for(let o of e)i=i.concat(o);else if(typeof e==="function")i=e(i.slice());if(r)i=i.concat(Xe.merge);return i.reduce((o,s)=>{let a=typeof s==="string"?So[s]:s;if(!a){let l=JSON.stringify(s),c=Object.keys(So).map((d)=>JSON.stringify(d)).join(", ");throw Error(`Unknown custom tag ${l}; use one of ${c}`)}if(!o.includes(a))o.push(a);return o},[])}zf.coreKnownTags=Yf;zf.getTags=Gf});var mn=m(function(tg){var fn=P(),Xf=Ae(),Qf=ve(),Zf=Ge(),Wt=vo(),eg=(e,t)=>e.key<t.key?-1:e.key>t.key?1:0;class gn{constructor({compat:e,customTags:t,merge:r,resolveKnownTags:n,schema:i,sortMapEntries:o,toStringDefaults:s}){this.compat=Array.isArray(e)?Wt.getTags(e,"compat"):e?Wt.getTags(null,e):null,this.name=typeof i==="string"&&i||"core",this.knownTags=n?Wt.coreKnownTags:{},this.tags=Wt.getTags(t,this.name,r),this.toStringOptions=s??null,Object.defineProperty(this,fn.MAP,{value:Xf.map}),Object.defineProperty(this,fn.SCALAR,{value:Zf.string}),Object.defineProperty(this,fn.SEQ,{value:Qf.seq}),this.sortMapEntries=typeof o==="function"?o:o===!0?eg:null}clone(){let e=Object.create(gn.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}}tg.Schema=gn});var Po=m(function(og){var ng=P(),hn=Ke(),Qe=je();function ig(e,t){let r=[],n=t.directives===!0;if(t.directives!==!1&&e.directives){let l=e.directives.toString(e);if(l)r.push(l),n=!0;else if(e.directives.docStart)n=!0}if(n)r.push("---");let i=hn.createStringifyContext(e,t),{commentString:o}=i.options;if(e.commentBefore){if(r.length!==1)r.unshift("");let l=o(e.commentBefore);r.unshift(Qe.indentComment(l,""))}let s=!1,a=null;if(e.contents){if(ng.isNode(e.contents)){if(e.contents.spaceBefore&&n)r.push("");if(e.contents.commentBefore){let d=o(e.contents.commentBefore);r.push(Qe.indentComment(d,""))}i.forceBlockIndent=!!e.comment,a=e.contents.comment}let l=a?void 0:()=>s=!0,c=hn.stringify(e.contents,i,()=>a=null,l);if(a)c+=Qe.lineComment(c,"",o(a));if((c[0]==="|"||c[0]===">")&&r[r.length-1]==="---")r[r.length-1]=`--- ${c}`;else r.push(c)}else r.push(hn.stringify(e.contents,i));if(e.directives?.docEnd)if(e.comment){let l=o(e.comment);if(l.includes(`
55
+ ${o.comment}`:n.comment}n=i}e.items[r]=jt.isPair(n)?n:new en.Pair(n)}else t("Expected a sequence for this tag");return e}function no(e,t,r){let{replacer:n}=r,i=new jp.YAMLSeq(e);i.tag="tag:yaml.org,2002:pairs";let o=0;if(t&&Symbol.iterator in Object(t))for(let s of t){if(typeof n==="function")s=n.call(t,String(o++),s);let a,l;if(Array.isArray(s))if(s.length===2)a=s[0],l=s[1];else throw TypeError(`Expected [key, value] tuple: ${s}`);else if(s&&s instanceof Object){let c=Object.keys(s);if(c.length===1)a=c[0],l=s[a];else throw TypeError(`Expected tuple with one key, not ${c.length} keys`)}else a=s;i.items.push(en.createPair(a,l,r))}return i}var Vp={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:ro,createNode:no};Up.createPairs=no;Up.pairs=Vp;Up.resolvePairs=ro});var rn=m(function(Wp){var io=P(),tn=ie(),We=ce(),Gp=ue(),oo=Vt();class ye extends Gp.YAMLSeq{constructor(){super();this.add=We.YAMLMap.prototype.add.bind(this),this.delete=We.YAMLMap.prototype.delete.bind(this),this.get=We.YAMLMap.prototype.get.bind(this),this.has=We.YAMLMap.prototype.has.bind(this),this.set=We.YAMLMap.prototype.set.bind(this),this.tag=ye.tag}toJSON(e,t){if(!t)return super.toJSON(e);let r=new Map;if(t?.onCreate)t.onCreate(r);for(let n of this.items){let i,o;if(io.isPair(n))i=tn.toJS(n.key,"",t),o=tn.toJS(n.value,i,t);else i=tn.toJS(n,"",t);if(r.has(i))throw Error("Ordered maps must not include duplicate keys");r.set(i,o)}return r}static from(e,t,r){let n=oo.createPairs(e,t,r),i=new this;return i.items=n.items,i}}ye.tag="tag:yaml.org,2002:omap";var Yp={collection:"seq",identify:(e)=>e instanceof Map,nodeClass:ye,default:!1,tag:"tag:yaml.org,2002:omap",resolve(e,t){let r=oo.resolvePairs(e,t),n=[];for(let{key:i}of r.items)if(io.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 ye,r)},createNode:(e,t,r)=>ye.from(e,t,r)};Wp.YAMLOMap=ye;Wp.omap=Yp});var uo=m(function(Qp){var so=N();function ao({value:e,source:t},r){if(t&&(e?lo:co).test.test(t))return t;return e?r.options.trueStr:r.options.falseStr}var lo={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 so.Scalar(!0),stringify:ao},co={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 so.Scalar(!1),stringify:ao};Qp.falseTag=co;Qp.trueTag=lo});var po=m(function(sf){var tf=N(),nn=Pe(),rf={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:nn.stringifyNumber},nf={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():nn.stringifyNumber(e)}},of={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 tf.Scalar(parseFloat(e.replace(/_/g,""))),r=e.indexOf(".");if(r!==-1){let n=e.substring(r+1).replace(/_/g,"");if(n[n.length-1]==="0")t.minFractionDigits=n.length}return t},stringify:nn.stringifyNumber};sf.float=of;sf.floatExp=nf;sf.floatNaN=rf});var go=m(function(gf){var fo=Pe(),Je=(e)=>typeof e==="bigint"||Number.isInteger(e);function Ut(e,t,r,{intAsBigInt:n}){let i=e[0];if(i==="-"||i==="+")t+=1;if(e=e.substring(t).replace(/_/g,""),n){switch(r){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`;break}let s=BigInt(e);return i==="-"?BigInt(-1)*s:s}let o=parseInt(e,r);return i==="-"?-1*o:o}function on(e,t,r){let{value:n}=e;if(Je(n)){let i=n.toString(t);return n<0?"-"+r+i.substr(1):r+i}return fo.stringifyNumber(e)}var uf={identify:Je,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,r)=>Ut(e,2,2,r),stringify:(e)=>on(e,2,"0b")},df={identify:Je,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,r)=>Ut(e,1,8,r),stringify:(e)=>on(e,8,"0")},pf={identify:Je,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,r)=>Ut(e,0,10,r),stringify:fo.stringifyNumber},ff={identify:Je,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,r)=>Ut(e,2,16,r),stringify:(e)=>on(e,16,"0x")};gf.int=pf;gf.intBin=uf;gf.intHex=ff;gf.intOct=df});var sn=m(function(Cf){var zt=P(),Kt=ae(),Ht=ce();class be extends Ht.YAMLMap{constructor(e){super(e);this.tag=be.tag}add(e){let t;if(zt.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(!Ht.findPair(this.items,t.key))this.items.push(t)}get(e,t){let r=Ht.findPair(this.items,e);return!t&&zt.isPair(r)?zt.isScalar(r.key)?r.key.value:r.key:r}set(e,t){if(typeof t!=="boolean")throw Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);let r=Ht.findPair(this.items,e);if(r&&!t)this.items.splice(this.items.indexOf(r),1);else if(!r&&t)this.items.push(new Kt.Pair(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,r){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,r);else throw Error("Set items must all have null values")}static from(e,t,r){let{replacer:n}=r,i=new this(e);if(t&&Symbol.iterator in Object(t))for(let o of t){if(typeof n==="function")o=n.call(t,o,o);i.items.push(Kt.createPair(o,null,r))}return i}}be.tag="tag:yaml.org,2002:set";var Sf={collection:"map",identify:(e)=>e instanceof Set,nodeClass:be,default:!1,tag:"tag:yaml.org,2002:set",createNode:(e,t,r)=>be.from(e,t,r),resolve(e,t){if(zt.isMap(e))if(e.hasAllNullValues(!0))return Object.assign(new be,e);else t("Set items must all have null values");else t("Expected a mapping for this tag");return e}};Cf.YAMLSet=be;Cf.set=Sf});var ln=m(function(Af){var xf=Pe();function an(e,t){let r=e[0],n=r==="-"||r==="+"?e.substring(1):e,i=(s)=>t?BigInt(s):Number(s),o=n.replace(/_/g,"").split(":").reduce((s,a)=>s*i(60)+i(a),i(0));return r==="-"?i(-1)*o:o}function mo(e){let{value:t}=e,r=(s)=>s;if(typeof t==="bigint")r=(s)=>BigInt(s);else if(isNaN(t)||!isFinite(t))return xf.stringifyNumber(e);let n="";if(t<0)n="-",t*=r(-1);let i=r(60),o=[t%i];if(t<60)o.unshift(0);else if(t=(t-o[0])/i,o.unshift(t%i),t>=60)t=(t-o[0])/i,o.unshift(t);return n+o.map((s)=>String(s).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}var If={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:r})=>an(e,r),stringify:mo},vf={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)=>an(e,!1),stringify:mo},ho={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(ho.test);if(!t)throw Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,r,n,i,o,s,a]=t.map(Number),l=t[7]?Number((t[7]+"00").substr(1,3)):0,c=Date.UTC(r,n-1,i,o||0,s||0,a||0,l),d=t[8];if(d&&d!=="Z"){let u=an(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$/,"")??""};Af.floatTime=vf;Af.intTime=If;Af.timestamp=ho});var bo=m(function($f){var Of=Ae(),Tf=Mt(),Nf=Re(),Df=Ge(),Lf=Zr(),yo=uo(),cn=po(),Gt=go(),qf=Ot(),_f=rn(),Ff=Vt(),Mf=sn(),un=ln(),Bf=[Of.map,Nf.seq,Df.string,Tf.nullTag,yo.trueTag,yo.falseTag,Gt.intBin,Gt.intOct,Gt.int,Gt.intHex,cn.floatNaN,cn.floatExp,cn.float,Lf.binary,qf.merge,_f.omap,Ff.pairs,Mf.set,un.intTime,un.floatTime,un.timestamp];$f.schema=Bf});var Po=m(function(Wf){var wo=Ae(),Vf=Mt(),xo=Re(),Uf=Ge(),Kf=Hr(),dn=Gr(),pn=Wr(),Hf=Zi(),zf=to(),Io=Zr(),Xe=Ot(),vo=rn(),Ao=Vt(),So=bo(),Ro=sn(),Yt=ln(),Co=new Map([["core",Hf.schema],["failsafe",[wo.map,xo.seq,Uf.string]],["json",zf.schema],["yaml11",So.schema],["yaml-1.1",So.schema]]),ko={binary:Io.binary,bool:Kf.boolTag,float:dn.float,floatExp:dn.floatExp,floatNaN:dn.floatNaN,floatTime:Yt.floatTime,int:pn.int,intHex:pn.intHex,intOct:pn.intOct,intTime:Yt.intTime,map:wo.map,merge:Xe.merge,null:Vf.nullTag,omap:vo.omap,pairs:Ao.pairs,seq:xo.seq,set:Ro.set,timestamp:Yt.timestamp},Gf={"tag:yaml.org,2002:binary":Io.binary,"tag:yaml.org,2002:merge":Xe.merge,"tag:yaml.org,2002:omap":vo.omap,"tag:yaml.org,2002:pairs":Ao.pairs,"tag:yaml.org,2002:set":Ro.set,"tag:yaml.org,2002:timestamp":Yt.timestamp};function Yf(e,t,r){let n=Co.get(t);if(n&&!e)return r&&!n.includes(Xe.merge)?n.concat(Xe.merge):n.slice();let i=n;if(!i)if(Array.isArray(e))i=[];else{let o=Array.from(Co.keys()).filter((s)=>s!=="yaml11").map((s)=>JSON.stringify(s)).join(", ");throw Error(`Unknown schema "${t}"; use one of ${o} or define customTags array`)}if(Array.isArray(e))for(let o of e)i=i.concat(o);else if(typeof e==="function")i=e(i.slice());if(r)i=i.concat(Xe.merge);return i.reduce((o,s)=>{let a=typeof s==="string"?ko[s]:s;if(!a){let l=JSON.stringify(s),c=Object.keys(ko).map((d)=>JSON.stringify(d)).join(", ");throw Error(`Unknown custom tag ${l}; use one of ${c}`)}if(!o.includes(a))o.push(a);return o},[])}Wf.coreKnownTags=Gf;Wf.getTags=Yf});var mn=m(function(rg){var fn=P(),Qf=Ae(),Zf=Re(),eg=Ge(),Wt=Po(),tg=(e,t)=>e.key<t.key?-1:e.key>t.key?1:0;class gn{constructor({compat:e,customTags:t,merge:r,resolveKnownTags:n,schema:i,sortMapEntries:o,toStringDefaults:s}){this.compat=Array.isArray(e)?Wt.getTags(e,"compat"):e?Wt.getTags(null,e):null,this.name=typeof i==="string"&&i||"core",this.knownTags=n?Wt.coreKnownTags:{},this.tags=Wt.getTags(t,this.name,r),this.toStringOptions=s??null,Object.defineProperty(this,fn.MAP,{value:Qf.map}),Object.defineProperty(this,fn.SCALAR,{value:eg.string}),Object.defineProperty(this,fn.SEQ,{value:Zf.seq}),this.sortMapEntries=typeof o==="function"?o:o===!0?tg:null}clone(){let e=Object.create(gn.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}}rg.Schema=gn});var Eo=m(function(sg){var ig=P(),hn=Ke(),Qe=je();function og(e,t){let r=[],n=t.directives===!0;if(t.directives!==!1&&e.directives){let l=e.directives.toString(e);if(l)r.push(l),n=!0;else if(e.directives.docStart)n=!0}if(n)r.push("---");let i=hn.createStringifyContext(e,t),{commentString:o}=i.options;if(e.commentBefore){if(r.length!==1)r.unshift("");let l=o(e.commentBefore);r.unshift(Qe.indentComment(l,""))}let s=!1,a=null;if(e.contents){if(ig.isNode(e.contents)){if(e.contents.spaceBefore&&n)r.push("");if(e.contents.commentBefore){let d=o(e.contents.commentBefore);r.push(Qe.indentComment(d,""))}i.forceBlockIndent=!!e.comment,a=e.contents.comment}let l=a?void 0:()=>s=!0,c=hn.stringify(e.contents,i,()=>a=null,l);if(a)c+=Qe.lineComment(c,"",o(a));if((c[0]==="|"||c[0]===">")&&r[r.length-1]==="---")r[r.length-1]=`--- ${c}`;else r.push(c)}else r.push(hn.stringify(e.contents,i));if(e.directives?.docEnd)if(e.comment){let l=o(e.comment);if(l.includes(`
56
56
  `))r.push("..."),r.push(Qe.indentComment(l,""));else r.push(`... ${l}`)}else r.push("...");else{let l=e.comment;if(l&&s)l=l.replace(/^\n+/,"");if(l){if((!s||a)&&r[r.length-1]!=="")r.push("");r.push(Qe.indentComment(o(l),""))}}return r.join(`
57
57
  `)+`
58
- `}og.stringifyDocument=ig});var Ze=m(function(gg){var ag=$e(),Ee=xt(),U=P(),lg=ae(),cg=ie(),ug=mn(),dg=Po(),yn=St(),pg=qr(),fg=Be(),bn=Lr();class Cn{constructor(e,t,r){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,U.NODE_TYPE,{value:U.DOC});let n=null;if(typeof t==="function"||Array.isArray(t))n=t;else if(r===void 0&&t)r=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"},r);this.options=i;let{version:o}=i;if(r?._directives){if(this.directives=r._directives.atDocument(),this.directives.yaml.explicit)o=this.directives.yaml.version}else this.directives=new bn.Directives({version:o});this.setSchema(o,r),this.contents=e===void 0?null:this.createNode(e,n,r)}clone(){let e=Object.create(Cn.prototype,{[U.NODE_TYPE]:{value:U.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=U.isNode(this.contents)?this.contents.clone(e.schema):this.contents,this.range)e.range=this.range.slice();return e}add(e){if(Ne(this.contents))this.contents.add(e)}addIn(e,t){if(Ne(this.contents))this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){let r=yn.anchorNames(this);e.anchor=!t||r.has(t)?yn.findNewAnchor(t||"a",r):t}return new ag.Alias(e.anchor)}createNode(e,t,r){let n=void 0;if(typeof t==="function")e=t.call({"":e},"",e),n=t;else if(Array.isArray(t)){let g=(b)=>typeof b==="number"||b instanceof String||b instanceof Number,h=t.filter(g).map(String);if(h.length>0)t=t.concat(h);n=t}else if(r===void 0&&t)r=t,t=void 0;let{aliasDuplicateObjects:i,anchorPrefix:o,flow:s,keepUndefined:a,onTagObj:l,tag:c}=r??{},{onAnchor:d,setAnchors:u,sourceObjects:p}=yn.createNodeAnchors(this,o||"a"),f={aliasDuplicateObjects:i??!0,keepUndefined:a??!1,onAnchor:d,onTagObj:l,replacer:n,schema:this.schema,sourceObjects:p},y=fg.createNode(e,c,f);if(s&&U.isCollection(y))y.flow=!0;return u(),y}createPair(e,t,r={}){let n=this.createNode(e,null,r),i=this.createNode(t,null,r);return new lg.Pair(n,i)}delete(e){return Ne(this.contents)?this.contents.delete(e):!1}deleteIn(e){if(Ee.isEmptyPath(e)){if(this.contents==null)return!1;return this.contents=null,!0}return Ne(this.contents)?this.contents.deleteIn(e):!1}get(e,t){return U.isCollection(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){if(Ee.isEmptyPath(e))return!t&&U.isScalar(this.contents)?this.contents.value:this.contents;return U.isCollection(this.contents)?this.contents.getIn(e,t):void 0}has(e){return U.isCollection(this.contents)?this.contents.has(e):!1}hasIn(e){if(Ee.isEmptyPath(e))return this.contents!==void 0;return U.isCollection(this.contents)?this.contents.hasIn(e):!1}set(e,t){if(this.contents==null)this.contents=Ee.collectionFromPath(this.schema,[e],t);else if(Ne(this.contents))this.contents.set(e,t)}setIn(e,t){if(Ee.isEmptyPath(e))this.contents=t;else if(this.contents==null)this.contents=Ee.collectionFromPath(this.schema,Array.from(e),t);else if(Ne(this.contents))this.contents.setIn(e,t)}setSchema(e,t={}){if(typeof e==="number")e=String(e);let r;switch(e){case"1.1":if(this.directives)this.directives.yaml.version="1.1";else this.directives=new bn.Directives({version:"1.1"});r={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":if(this.directives)this.directives.yaml.version=e;else this.directives=new bn.Directives({version:e});r={resolveKnownTags:!0,schema:"core"};break;case null:if(this.directives)delete this.directives;r=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(r)this.schema=new ug.Schema(Object.assign(r,t));else throw Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:t,mapAsMap:r,maxAliasCount:n,onAnchor:i,reviver:o}={}){let s={anchors:new Map,doc:this,keep:!e,mapAsMap:r===!0,mapKeyWarned:!1,maxAliasCount:typeof n==="number"?n:100},a=cg.toJS(this.contents,t??"",s);if(typeof i==="function")for(let{count:l,res:c}of s.anchors.values())i(c,l);return typeof o==="function"?pg.applyReviver(o,{"":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 dg.stringifyDocument(this,e)}}function Ne(e){if(U.isCollection(e))return!0;throw Error("Expected a YAML collection as document contents")}gg.Document=Cn});var et=m(function(yg){class Jt extends Error{constructor(e,t,r,n){super();this.name=e,this.code=r,this.message=n,this.pos=t}}class Eo extends Jt{constructor(e,t,r){super("YAMLParseError",e,t,r)}}class No extends Jt{constructor(e,t,r){super("YAMLWarning",e,t,r)}}var hg=(e,t)=>(r)=>{if(r.pos[0]===-1)return;r.linePos=r.pos.map((a)=>t.linePos(a));let{line:n,col:i}=r.linePos[0];r.message+=` at line ${n}, column ${i}`;let o=i-1,s=e.substring(t.lineStarts[n-1],t.lineStarts[n]).replace(/[\n\r]+$/,"");if(o>=60&&s.length>80){let a=Math.min(o-39,s.length-79);s="\u2026"+s.substring(a),o-=a-1}if(s.length>80)s=s.substring(0,79)+"\u2026";if(n>1&&/^ *$/.test(s.substring(0,o))){let a=e.substring(t.lineStarts[n-2],t.lineStarts[n-1]);if(a.length>80)a=a.substring(0,79)+`\u2026
58
+ `}sg.stringifyDocument=og});var Ze=m(function(mg){var lg=Be(),Ee=xt(),U=P(),cg=ae(),ug=ie(),dg=mn(),pg=Eo(),yn=Ct(),fg=qr(),gg=$e(),bn=Lr();class Sn{constructor(e,t,r){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,U.NODE_TYPE,{value:U.DOC});let n=null;if(typeof t==="function"||Array.isArray(t))n=t;else if(r===void 0&&t)r=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"},r);this.options=i;let{version:o}=i;if(r?._directives){if(this.directives=r._directives.atDocument(),this.directives.yaml.explicit)o=this.directives.yaml.version}else this.directives=new bn.Directives({version:o});this.setSchema(o,r),this.contents=e===void 0?null:this.createNode(e,n,r)}clone(){let e=Object.create(Sn.prototype,{[U.NODE_TYPE]:{value:U.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=U.isNode(this.contents)?this.contents.clone(e.schema):this.contents,this.range)e.range=this.range.slice();return e}add(e){if(Oe(this.contents))this.contents.add(e)}addIn(e,t){if(Oe(this.contents))this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){let r=yn.anchorNames(this);e.anchor=!t||r.has(t)?yn.findNewAnchor(t||"a",r):t}return new lg.Alias(e.anchor)}createNode(e,t,r){let n=void 0;if(typeof t==="function")e=t.call({"":e},"",e),n=t;else if(Array.isArray(t)){let g=(b)=>typeof b==="number"||b instanceof String||b instanceof Number,h=t.filter(g).map(String);if(h.length>0)t=t.concat(h);n=t}else if(r===void 0&&t)r=t,t=void 0;let{aliasDuplicateObjects:i,anchorPrefix:o,flow:s,keepUndefined:a,onTagObj:l,tag:c}=r??{},{onAnchor:d,setAnchors:u,sourceObjects:p}=yn.createNodeAnchors(this,o||"a"),f={aliasDuplicateObjects:i??!0,keepUndefined:a??!1,onAnchor:d,onTagObj:l,replacer:n,schema:this.schema,sourceObjects:p},y=gg.createNode(e,c,f);if(s&&U.isCollection(y))y.flow=!0;return u(),y}createPair(e,t,r={}){let n=this.createNode(e,null,r),i=this.createNode(t,null,r);return new cg.Pair(n,i)}delete(e){return Oe(this.contents)?this.contents.delete(e):!1}deleteIn(e){if(Ee.isEmptyPath(e)){if(this.contents==null)return!1;return this.contents=null,!0}return Oe(this.contents)?this.contents.deleteIn(e):!1}get(e,t){return U.isCollection(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){if(Ee.isEmptyPath(e))return!t&&U.isScalar(this.contents)?this.contents.value:this.contents;return U.isCollection(this.contents)?this.contents.getIn(e,t):void 0}has(e){return U.isCollection(this.contents)?this.contents.has(e):!1}hasIn(e){if(Ee.isEmptyPath(e))return this.contents!==void 0;return U.isCollection(this.contents)?this.contents.hasIn(e):!1}set(e,t){if(this.contents==null)this.contents=Ee.collectionFromPath(this.schema,[e],t);else if(Oe(this.contents))this.contents.set(e,t)}setIn(e,t){if(Ee.isEmptyPath(e))this.contents=t;else if(this.contents==null)this.contents=Ee.collectionFromPath(this.schema,Array.from(e),t);else if(Oe(this.contents))this.contents.setIn(e,t)}setSchema(e,t={}){if(typeof e==="number")e=String(e);let r;switch(e){case"1.1":if(this.directives)this.directives.yaml.version="1.1";else this.directives=new bn.Directives({version:"1.1"});r={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":if(this.directives)this.directives.yaml.version=e;else this.directives=new bn.Directives({version:e});r={resolveKnownTags:!0,schema:"core"};break;case null:if(this.directives)delete this.directives;r=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(r)this.schema=new dg.Schema(Object.assign(r,t));else throw Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:t,mapAsMap:r,maxAliasCount:n,onAnchor:i,reviver:o}={}){let s={anchors:new Map,doc:this,keep:!e,mapAsMap:r===!0,mapKeyWarned:!1,maxAliasCount:typeof n==="number"?n:100},a=ug.toJS(this.contents,t??"",s);if(typeof i==="function")for(let{count:l,res:c}of s.anchors.values())i(c,l);return typeof o==="function"?fg.applyReviver(o,{"":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 pg.stringifyDocument(this,e)}}function Oe(e){if(U.isCollection(e))return!0;throw Error("Expected a YAML collection as document contents")}mg.Document=Sn});var et=m(function(bg){class Jt extends Error{constructor(e,t,r,n){super();this.name=e,this.code=r,this.message=n,this.pos=t}}class Oo extends Jt{constructor(e,t,r){super("YAMLParseError",e,t,r)}}class To extends Jt{constructor(e,t,r){super("YAMLWarning",e,t,r)}}var yg=(e,t)=>(r)=>{if(r.pos[0]===-1)return;r.linePos=r.pos.map((a)=>t.linePos(a));let{line:n,col:i}=r.linePos[0];r.message+=` at line ${n}, column ${i}`;let o=i-1,s=e.substring(t.lineStarts[n-1],t.lineStarts[n]).replace(/[\n\r]+$/,"");if(o>=60&&s.length>80){let a=Math.min(o-39,s.length-79);s="\u2026"+s.substring(a),o-=a-1}if(s.length>80)s=s.substring(0,79)+"\u2026";if(n>1&&/^ *$/.test(s.substring(0,o))){let a=e.substring(t.lineStarts[n-2],t.lineStarts[n-1]);if(a.length>80)a=a.substring(0,79)+`\u2026
59
59
  `;s=a+s}if(/[^ ]/.test(s)){let a=1,l=r.linePos[1];if(l?.line===n&&l.col>i)a=Math.max(1,Math.min(l.col-i,80-o));let c=" ".repeat(o)+"^".repeat(a);r.message+=`:
60
60
 
61
61
  ${s}
62
62
  ${c}
63
- `}};yg.YAMLError=Jt;yg.YAMLParseError=Eo;yg.YAMLWarning=No;yg.prettifyError=hg});var tt=m(function(xg){function wg(e,{flow:t,indicator:r,next:n,offset:i,onError:o,parentIndent:s,startOnNewline:a}){let l=!1,c=a,d=a,u="",p="",f=!1,y=!1,g=null,h=null,b=null,k=null,w=null,I=null,A=null;for(let x of e){if(y){if(x.type!=="space"&&x.type!=="newline"&&x.type!=="comma")o(x.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space");y=!1}if(g){if(c&&x.type!=="comment"&&x.type!=="newline")o(g,"TAB_AS_INDENT","Tabs are not allowed as indentation");g=null}switch(x.type){case"space":if(!t&&(r!=="doc-start"||n?.type!=="flow-collection")&&x.source.includes("\t"))g=x;d=!0;break;case"comment":{if(!d)o(x,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let D=x.source.substring(1)||" ";if(!u)u=D;else u+=p+D;p="",c=!1;break}case"newline":if(c){if(u)u+=x.source;else if(!I||r!=="seq-item-ind")l=!0}else p+=x.source;if(c=!0,f=!0,h||b)k=x;d=!0;break;case"anchor":if(h)o(x,"MULTIPLE_ANCHORS","A node can have at most one anchor");if(x.source.endsWith(":"))o(x.offset+x.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0);h=x,A??(A=x.offset),c=!1,d=!1,y=!0;break;case"tag":{if(b)o(x,"MULTIPLE_TAGS","A node can have at most one tag");b=x,A??(A=x.offset),c=!1,d=!1,y=!0;break}case r:if(h||b)o(x,"BAD_PROP_ORDER",`Anchors and tags must be after the ${x.source} indicator`);if(I)o(x,"UNEXPECTED_TOKEN",`Unexpected ${x.source} in ${t??"collection"}`);I=x,c=r==="seq-item-ind"||r==="explicit-key-ind",d=!1;break;case"comma":if(t){if(w)o(x,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`);w=x,c=!1,d=!1;break}default:o(x,"UNEXPECTED_TOKEN",`Unexpected ${x.type} token`),c=!1,d=!1}}let R=e[e.length-1],E=R?R.offset+R.source.length:i;if(y&&n&&n.type!=="space"&&n.type!=="newline"&&n.type!=="comma"&&(n.type!=="scalar"||n.source!==""))o(n.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space");if(g&&(c&&g.indent<=s||n?.type==="block-map"||n?.type==="block-seq"))o(g,"TAB_AS_INDENT","Tabs are not allowed as indentation");return{comma:w,found:I,spaceBefore:l,comment:u,hasNewline:f,anchor:h,tag:b,newlineAfterProp:k,end:E,start:A??E}}xg.resolveProps=wg});var Xt=m(function(Rg){function Sn(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 r of t.start)if(r.type==="newline")return!0;if(t.sep){for(let r of t.sep)if(r.type==="newline")return!0}if(Sn(t.key)||Sn(t.value))return!0}return!1;default:return!0}}Rg.containsNewline=Sn});var kn=m(function(Eg){var vg=Xt();function Pg(e,t,r){if(t?.type==="flow-collection"){let n=t.end[0];if(n.indent===e&&(n.source==="]"||n.source==="}")&&vg.containsNewline(t))r(n,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}Eg.flowIndentCheck=Pg});var wn=m(function(Og){var To=P();function Tg(e,t,r){let{uniqueKeys:n}=e.options;if(n===!1)return!1;let i=typeof n==="function"?n:(o,s)=>o===s||To.isScalar(o)&&To.isScalar(s)&&o.value===s.value;return t.some((o)=>i(o.key,r))}Og.mapIncludes=Tg});var _o=m(function(Mg){var Oo=ae(),Lg=ce(),Do=tt(),qg=Xt(),Lo=kn(),_g=wn(),qo="All mapping items must start at the same column";function Fg({composeNode:e,composeEmptyNode:t},r,n,i,o){let a=new(o?.nodeClass??Lg.YAMLMap)(r.schema);if(r.atRoot)r.atRoot=!1;let l=n.offset,c=null;for(let d of n.items){let{start:u,key:p,sep:f,value:y}=d,g=Do.resolveProps(u,{indicator:"explicit-key-ind",next:p??f?.[0],offset:l,onError:i,parentIndent:n.indent,startOnNewline:!0}),h=!g.found;if(h){if(p){if(p.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 p&&p.indent!==n.indent)i(l,"BAD_INDENT",qo)}if(!g.anchor&&!g.tag&&!f){if(c=g.end,g.comment)if(a.comment)a.comment+=`
65
- `+g.comment;else a.comment=g.comment;continue}if(g.newlineAfterProp||qg.containsNewline(p))i(p??u[u.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else if(g.found?.indent!==n.indent)i(l,"BAD_INDENT",qo);r.atKey=!0;let b=g.end,k=p?e(r,p,g,i):t(r,b,u,null,g,i);if(r.schema.compat)Lo.flowIndentCheck(n.indent,p,i);if(r.atKey=!1,_g.mapIncludes(r,a.items,k))i(b,"DUPLICATE_KEY","Map keys must be unique");let w=Do.resolveProps(f??[],{indicator:"map-value-ind",next:y,offset:k.range[2],onError:i,parentIndent:n.indent,startOnNewline:!p||p.type==="block-scalar"});if(l=w.end,w.found){if(h){if(y?.type==="block-map"&&!w.hasNewline)i(l,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings");if(r.options.strict&&g.start<w.found.offset-1024)i(k.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key")}let I=y?e(r,y,w,i):t(r,l,f,null,w,i);if(r.schema.compat)Lo.flowIndentCheck(n.indent,y,i);l=I.range[2];let A=new Oo.Pair(k,I);if(r.options.keepSourceTokens)A.srcToken=d;a.items.push(A)}else{if(h)i(k.range,"MISSING_CHAR","Implicit map keys need to be followed by map values");if(w.comment)if(k.comment)k.comment+=`
66
- `+w.comment;else k.comment=w.comment;let I=new Oo.Pair(k);if(r.options.keepSourceTokens)I.srcToken=d;a.items.push(I)}}if(c&&c<l)i(c,"IMPOSSIBLE","Map comment with trailing content");return a.range=[n.offset,l,c??l],a}Mg.resolveBlockMap=Fg});var Fo=m(function(Kg){var Bg=ue(),jg=tt(),Vg=kn();function Ug({composeNode:e,composeEmptyNode:t},r,n,i,o){let a=new(o?.nodeClass??Bg.YAMLSeq)(r.schema);if(r.atRoot)r.atRoot=!1;if(r.atKey)r.atKey=!1;let l=n.offset,c=null;for(let{start:d,value:u}of n.items){let p=jg.resolveProps(d,{indicator:"seq-item-ind",next:u,offset:l,onError:i,parentIndent:n.indent,startOnNewline:!0});if(!p.found)if(p.anchor||p.tag||u)if(u?.type==="block-seq")i(p.end,"BAD_INDENT","All sequence items must start at the same column");else i(l,"MISSING_CHAR","Sequence item without - indicator");else{if(c=p.end,p.comment)a.comment=p.comment;continue}let f=u?e(r,u,p,i):t(r,p.end,d,null,p,i);if(r.schema.compat)Vg.flowIndentCheck(n.indent,u,i);l=f.range[2],a.items.push(f)}return a.range=[n.offset,l,c??l],a}Kg.resolveBlockSeq=Ug});var Te=m(function(Gg){function Yg(e,t,r,n){let i="";if(e){let o=!1,s="";for(let a of e){let{source:l,type:c}=a;switch(c){case"space":o=!0;break;case"comment":{if(r&&!o)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+=s+d;s="";break}case"newline":if(i)s+=l;o=!0;break;default:n(a,"UNEXPECTED_TOKEN",`Unexpected ${c} at node end`)}t+=l.length}}return{comment:i,offset:t}}Gg.resolveEnd=Yg});var Bo=m(function(rm){var Wg=P(),Jg=ae(),Mo=ce(),Xg=ue(),Qg=Te(),$o=tt(),Zg=Xt(),em=wn(),xn="Block collections are not allowed within flow collections",In=(e)=>e&&(e.type==="block-map"||e.type==="block-seq");function tm({composeNode:e,composeEmptyNode:t},r,n,i,o){let s=n.start.source==="{",a=s?"flow map":"flow sequence",c=new(o?.nodeClass??(s?Mo.YAMLMap:Xg.YAMLSeq))(r.schema);c.flow=!0;let d=r.atRoot;if(d)r.atRoot=!1;if(r.atKey)r.atKey=!1;let u=n.offset+n.start.source.length;for(let h=0;h<n.items.length;++h){let b=n.items[h],{start:k,key:w,sep:I,value:A}=b,R=$o.resolveProps(k,{flow:a,indicator:"explicit-key-ind",next:w??I?.[0],offset:u,onError:i,parentIndent:n.indent,startOnNewline:!1});if(!R.found){if(!R.anchor&&!R.tag&&!I&&!A){if(h===0&&R.comma)i(R.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`);else if(h<n.items.length-1)i(R.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${a}`);if(R.comment)if(c.comment)c.comment+=`
67
- `+R.comment;else c.comment=R.comment;u=R.end;continue}if(!s&&r.options.strict&&Zg.containsNewline(w))i(w,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(h===0){if(R.comma)i(R.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`)}else{if(!R.comma)i(R.start,"MISSING_CHAR",`Missing , between ${a} items`);if(R.comment){let E="";e:for(let x of k)switch(x.type){case"comma":case"space":break;case"comment":E=x.source.substring(1);break e;default:break e}if(E){let x=c.items[c.items.length-1];if(Wg.isPair(x))x=x.value??x.key;if(x.comment)x.comment+=`
68
- `+E;else x.comment=E;R.comment=R.comment.substring(E.length+1)}}}if(!s&&!I&&!R.found){let E=A?e(r,A,R,i):t(r,R.end,I,null,R,i);if(c.items.push(E),u=E.range[2],In(A))i(E.range,"BLOCK_IN_FLOW",xn)}else{r.atKey=!0;let E=R.end,x=w?e(r,w,R,i):t(r,E,k,null,R,i);if(In(w))i(x.range,"BLOCK_IN_FLOW",xn);r.atKey=!1;let D=$o.resolveProps(I??[],{flow:a,indicator:"map-value-ind",next:A,offset:x.range[2],onError:i,parentIndent:n.indent,startOnNewline:!1});if(D.found){if(!s&&!R.found&&r.options.strict){if(I)for(let L of I){if(L===D.found)break;if(L.type==="newline"){i(L,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}if(R.start<D.found.offset-1024)i(D.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else if(A)if("source"in A&&A.source?.[0]===":")i(A,"MISSING_CHAR",`Missing space after : in ${a}`);else i(D.start,"MISSING_CHAR",`Missing , or : between ${a} items`);let ne=A?e(r,A,D,i):D.found?t(r,D.end,I,null,D,i):null;if(ne){if(In(A))i(ne.range,"BLOCK_IN_FLOW",xn)}else if(D.comment)if(x.comment)x.comment+=`
69
- `+D.comment;else x.comment=D.comment;let ke=new Jg.Pair(x,ne);if(r.options.keepSourceTokens)ke.srcToken=b;if(s){let L=c;if(em.mapIncludes(r,L.items,x))i(E,"DUPLICATE_KEY","Map keys must be unique");L.items.push(ke)}else{let L=new Mo.YAMLMap(r.schema);L.flow=!0,L.items.push(ke);let li=(ne??x).range;L.range=[x.range[0],li[1],li[2]],c.items.push(L)}u=ne?ne.range[2]:D.end}}let p=s?"}":"]",[f,...y]=n.end,g=u;if(f?.source===p)g=f.offset+f.source.length;else{let h=a[0].toUpperCase()+a.substring(1),b=d?`${h} must end with a ${p}`:`${h} in block collection must be sufficiently indented and end with a ${p}`;if(i(u,d?"MISSING_CHAR":"BAD_INDENT",b),f&&f.source.length!==1)y.unshift(f)}if(y.length>0){let h=Qg.resolveEnd(y,g,r.options.strict,i);if(h.comment)if(c.comment)c.comment+=`
70
- `+h.comment;else c.comment=h.comment;c.range=[n.offset,g,h.offset]}else c.range=[n.offset,g,g];return c}rm.resolveFlowCollection=tm});var jo=m(function(pm){var im=P(),om=O(),sm=ce(),am=ue(),lm=_o(),cm=Fo(),um=Bo();function Rn(e,t,r,n,i,o){let s=r.type==="block-map"?lm.resolveBlockMap(e,t,r,n,o):r.type==="block-seq"?cm.resolveBlockSeq(e,t,r,n,o):um.resolveFlowCollection(e,t,r,n,o),a=s.constructor;if(i==="!"||i===a.tagName)return s.tag=a.tagName,s;if(i)s.tag=i;return s}function dm(e,t,r,n,i){let o=n.tag,s=!o?null:t.directives.tagName(o.source,(p)=>i(o,"TAG_RESOLVE_FAILED",p));if(r.type==="block-seq"){let{anchor:p,newlineAfterProp:f}=n,y=p&&o?p.offset>o.offset?p:o:p??o;if(y&&(!f||f.offset<y.offset))i(y,"MISSING_CHAR","Missing newline after block sequence props")}let a=r.type==="block-map"?"map":r.type==="block-seq"?"seq":r.start.source==="{"?"map":"seq";if(!o||!s||s==="!"||s===sm.YAMLMap.tagName&&a==="map"||s===am.YAMLSeq.tagName&&a==="seq")return Rn(e,t,r,i,s);let l=t.schema.tags.find((p)=>p.tag===s&&p.collection===a);if(!l){let p=t.schema.knownTags[s];if(p?.collection===a)t.schema.tags.push(Object.assign({},p,{default:!1})),l=p;else{if(p)i(o,"BAD_COLLECTION_TYPE",`${p.tag} used for ${a} collection, but expects ${p.collection??"scalar"}`,!0);else i(o,"TAG_RESOLVE_FAILED",`Unresolved tag: ${s}`,!0);return Rn(e,t,r,i,s)}}let c=Rn(e,t,r,i,s,l),d=l.resolve?.(c,(p)=>i(o,"TAG_RESOLVE_FAILED",p),t.options)??c,u=im.isNode(d)?d:new om.Scalar(d);if(u.range=c.range,u.tag=s,l?.format)u.format=l.format;return u}pm.composeCollection=dm});var vn=m(function(ym){var An=O();function gm(e,t,r){let n=t.offset,i=mm(t,e.options.strict,r);if(!i)return{value:"",type:null,comment:"",range:[n,n,n]};let o=i.mode===">"?An.Scalar.BLOCK_FOLDED:An.Scalar.BLOCK_LITERAL,s=t.source?hm(t.source):[],a=s.length;for(let g=s.length-1;g>=0;--g){let h=s[g][1];if(h===""||h==="\r")a=g;else break}if(a===0){let g=i.chomp==="+"&&s.length>0?`
63
+ `}};bg.YAMLError=Jt;bg.YAMLParseError=Oo;bg.YAMLWarning=To;bg.prettifyError=yg});var tt=m(function(Ig){function xg(e,{flow:t,indicator:r,next:n,offset:i,onError:o,parentIndent:s,startOnNewline:a}){let l=!1,c=a,d=a,u="",p="",f=!1,y=!1,g=null,h=null,b=null,k=null,w=null,I=null,A=null;for(let x of e){if(y){if(x.type!=="space"&&x.type!=="newline"&&x.type!=="comma")o(x.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space");y=!1}if(g){if(c&&x.type!=="comment"&&x.type!=="newline")o(g,"TAB_AS_INDENT","Tabs are not allowed as indentation");g=null}switch(x.type){case"space":if(!t&&(r!=="doc-start"||n?.type!=="flow-collection")&&x.source.includes("\t"))g=x;d=!0;break;case"comment":{if(!d)o(x,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let D=x.source.substring(1)||" ";if(!u)u=D;else u+=p+D;p="",c=!1;break}case"newline":if(c){if(u)u+=x.source;else if(!I||r!=="seq-item-ind")l=!0}else p+=x.source;if(c=!0,f=!0,h||b)k=x;d=!0;break;case"anchor":if(h)o(x,"MULTIPLE_ANCHORS","A node can have at most one anchor");if(x.source.endsWith(":"))o(x.offset+x.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0);h=x,A??(A=x.offset),c=!1,d=!1,y=!0;break;case"tag":{if(b)o(x,"MULTIPLE_TAGS","A node can have at most one tag");b=x,A??(A=x.offset),c=!1,d=!1,y=!0;break}case r:if(h||b)o(x,"BAD_PROP_ORDER",`Anchors and tags must be after the ${x.source} indicator`);if(I)o(x,"UNEXPECTED_TOKEN",`Unexpected ${x.source} in ${t??"collection"}`);I=x,c=r==="seq-item-ind"||r==="explicit-key-ind",d=!1;break;case"comma":if(t){if(w)o(x,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`);w=x,c=!1,d=!1;break}default:o(x,"UNEXPECTED_TOKEN",`Unexpected ${x.type} token`),c=!1,d=!1}}let v=e[e.length-1],E=v?v.offset+v.source.length:i;if(y&&n&&n.type!=="space"&&n.type!=="newline"&&n.type!=="comma"&&(n.type!=="scalar"||n.source!==""))o(n.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space");if(g&&(c&&g.indent<=s||n?.type==="block-map"||n?.type==="block-seq"))o(g,"TAB_AS_INDENT","Tabs are not allowed as indentation");return{comma:w,found:I,spaceBefore:l,comment:u,hasNewline:f,anchor:h,tag:b,newlineAfterProp:k,end:E,start:A??E}}Ig.resolveProps=xg});var Xt=m(function(Ag){function Cn(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 r of t.start)if(r.type==="newline")return!0;if(t.sep){for(let r of t.sep)if(r.type==="newline")return!0}if(Cn(t.key)||Cn(t.value))return!0}return!1;default:return!0}}Ag.containsNewline=Cn});var kn=m(function(Og){var Pg=Xt();function Eg(e,t,r){if(t?.type==="flow-collection"){let n=t.end[0];if(n.indent===e&&(n.source==="]"||n.source==="}")&&Pg.containsNewline(t))r(n,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}Og.flowIndentCheck=Eg});var wn=m(function(Dg){var No=P();function Ng(e,t,r){let{uniqueKeys:n}=e.options;if(n===!1)return!1;let i=typeof n==="function"?n:(o,s)=>o===s||No.isScalar(o)&&No.isScalar(s)&&o.value===s.value;return t.some((o)=>i(o.key,r))}Dg.mapIncludes=Ng});var Fo=m(function(Bg){var Do=ae(),qg=ce(),Lo=tt(),_g=Xt(),qo=kn(),Fg=wn(),_o="All mapping items must start at the same column";function Mg({composeNode:e,composeEmptyNode:t},r,n,i,o){let a=new(o?.nodeClass??qg.YAMLMap)(r.schema);if(r.atRoot)r.atRoot=!1;let l=n.offset,c=null;for(let d of n.items){let{start:u,key:p,sep:f,value:y}=d,g=Lo.resolveProps(u,{indicator:"explicit-key-ind",next:p??f?.[0],offset:l,onError:i,parentIndent:n.indent,startOnNewline:!0}),h=!g.found;if(h){if(p){if(p.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 p&&p.indent!==n.indent)i(l,"BAD_INDENT",_o)}if(!g.anchor&&!g.tag&&!f){if(c=g.end,g.comment)if(a.comment)a.comment+=`
65
+ `+g.comment;else a.comment=g.comment;continue}if(g.newlineAfterProp||_g.containsNewline(p))i(p??u[u.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else if(g.found?.indent!==n.indent)i(l,"BAD_INDENT",_o);r.atKey=!0;let b=g.end,k=p?e(r,p,g,i):t(r,b,u,null,g,i);if(r.schema.compat)qo.flowIndentCheck(n.indent,p,i);if(r.atKey=!1,Fg.mapIncludes(r,a.items,k))i(b,"DUPLICATE_KEY","Map keys must be unique");let w=Lo.resolveProps(f??[],{indicator:"map-value-ind",next:y,offset:k.range[2],onError:i,parentIndent:n.indent,startOnNewline:!p||p.type==="block-scalar"});if(l=w.end,w.found){if(h){if(y?.type==="block-map"&&!w.hasNewline)i(l,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings");if(r.options.strict&&g.start<w.found.offset-1024)i(k.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key")}let I=y?e(r,y,w,i):t(r,l,f,null,w,i);if(r.schema.compat)qo.flowIndentCheck(n.indent,y,i);l=I.range[2];let A=new Do.Pair(k,I);if(r.options.keepSourceTokens)A.srcToken=d;a.items.push(A)}else{if(h)i(k.range,"MISSING_CHAR","Implicit map keys need to be followed by map values");if(w.comment)if(k.comment)k.comment+=`
66
+ `+w.comment;else k.comment=w.comment;let I=new Do.Pair(k);if(r.options.keepSourceTokens)I.srcToken=d;a.items.push(I)}}if(c&&c<l)i(c,"IMPOSSIBLE","Map comment with trailing content");return a.range=[n.offset,l,c??l],a}Bg.resolveBlockMap=Mg});var Mo=m(function(Hg){var jg=ue(),Vg=tt(),Ug=kn();function Kg({composeNode:e,composeEmptyNode:t},r,n,i,o){let a=new(o?.nodeClass??jg.YAMLSeq)(r.schema);if(r.atRoot)r.atRoot=!1;if(r.atKey)r.atKey=!1;let l=n.offset,c=null;for(let{start:d,value:u}of n.items){let p=Vg.resolveProps(d,{indicator:"seq-item-ind",next:u,offset:l,onError:i,parentIndent:n.indent,startOnNewline:!0});if(!p.found)if(p.anchor||p.tag||u)if(u?.type==="block-seq")i(p.end,"BAD_INDENT","All sequence items must start at the same column");else i(l,"MISSING_CHAR","Sequence item without - indicator");else{if(c=p.end,p.comment)a.comment=p.comment;continue}let f=u?e(r,u,p,i):t(r,p.end,d,null,p,i);if(r.schema.compat)Ug.flowIndentCheck(n.indent,u,i);l=f.range[2],a.items.push(f)}return a.range=[n.offset,l,c??l],a}Hg.resolveBlockSeq=Kg});var Te=m(function(Yg){function Gg(e,t,r,n){let i="";if(e){let o=!1,s="";for(let a of e){let{source:l,type:c}=a;switch(c){case"space":o=!0;break;case"comment":{if(r&&!o)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+=s+d;s="";break}case"newline":if(i)s+=l;o=!0;break;default:n(a,"UNEXPECTED_TOKEN",`Unexpected ${c} at node end`)}t+=l.length}}return{comment:i,offset:t}}Yg.resolveEnd=Gg});var jo=m(function(nm){var Jg=P(),Xg=ae(),Bo=ce(),Qg=ue(),Zg=Te(),$o=tt(),em=Xt(),tm=wn(),xn="Block collections are not allowed within flow collections",In=(e)=>e&&(e.type==="block-map"||e.type==="block-seq");function rm({composeNode:e,composeEmptyNode:t},r,n,i,o){let s=n.start.source==="{",a=s?"flow map":"flow sequence",c=new(o?.nodeClass??(s?Bo.YAMLMap:Qg.YAMLSeq))(r.schema);c.flow=!0;let d=r.atRoot;if(d)r.atRoot=!1;if(r.atKey)r.atKey=!1;let u=n.offset+n.start.source.length;for(let h=0;h<n.items.length;++h){let b=n.items[h],{start:k,key:w,sep:I,value:A}=b,v=$o.resolveProps(k,{flow:a,indicator:"explicit-key-ind",next:w??I?.[0],offset:u,onError:i,parentIndent:n.indent,startOnNewline:!1});if(!v.found){if(!v.anchor&&!v.tag&&!I&&!A){if(h===0&&v.comma)i(v.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`);else if(h<n.items.length-1)i(v.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${a}`);if(v.comment)if(c.comment)c.comment+=`
67
+ `+v.comment;else c.comment=v.comment;u=v.end;continue}if(!s&&r.options.strict&&em.containsNewline(w))i(w,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(h===0){if(v.comma)i(v.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`)}else{if(!v.comma)i(v.start,"MISSING_CHAR",`Missing , between ${a} items`);if(v.comment){let E="";e:for(let x of k)switch(x.type){case"comma":case"space":break;case"comment":E=x.source.substring(1);break e;default:break e}if(E){let x=c.items[c.items.length-1];if(Jg.isPair(x))x=x.value??x.key;if(x.comment)x.comment+=`
68
+ `+E;else x.comment=E;v.comment=v.comment.substring(E.length+1)}}}if(!s&&!I&&!v.found){let E=A?e(r,A,v,i):t(r,v.end,I,null,v,i);if(c.items.push(E),u=E.range[2],In(A))i(E.range,"BLOCK_IN_FLOW",xn)}else{r.atKey=!0;let E=v.end,x=w?e(r,w,v,i):t(r,E,k,null,v,i);if(In(w))i(x.range,"BLOCK_IN_FLOW",xn);r.atKey=!1;let D=$o.resolveProps(I??[],{flow:a,indicator:"map-value-ind",next:A,offset:x.range[2],onError:i,parentIndent:n.indent,startOnNewline:!1});if(D.found){if(!s&&!v.found&&r.options.strict){if(I)for(let L of I){if(L===D.found)break;if(L.type==="newline"){i(L,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}if(v.start<D.found.offset-1024)i(D.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else if(A)if("source"in A&&A.source?.[0]===":")i(A,"MISSING_CHAR",`Missing space after : in ${a}`);else i(D.start,"MISSING_CHAR",`Missing , or : between ${a} items`);let ne=A?e(r,A,D,i):D.found?t(r,D.end,I,null,D,i):null;if(ne){if(In(A))i(ne.range,"BLOCK_IN_FLOW",xn)}else if(D.comment)if(x.comment)x.comment+=`
69
+ `+D.comment;else x.comment=D.comment;let ke=new Xg.Pair(x,ne);if(r.options.keepSourceTokens)ke.srcToken=b;if(s){let L=c;if(tm.mapIncludes(r,L.items,x))i(E,"DUPLICATE_KEY","Map keys must be unique");L.items.push(ke)}else{let L=new Bo.YAMLMap(r.schema);L.flow=!0,L.items.push(ke);let li=(ne??x).range;L.range=[x.range[0],li[1],li[2]],c.items.push(L)}u=ne?ne.range[2]:D.end}}let p=s?"}":"]",[f,...y]=n.end,g=u;if(f?.source===p)g=f.offset+f.source.length;else{let h=a[0].toUpperCase()+a.substring(1),b=d?`${h} must end with a ${p}`:`${h} in block collection must be sufficiently indented and end with a ${p}`;if(i(u,d?"MISSING_CHAR":"BAD_INDENT",b),f&&f.source.length!==1)y.unshift(f)}if(y.length>0){let h=Zg.resolveEnd(y,g,r.options.strict,i);if(h.comment)if(c.comment)c.comment+=`
70
+ `+h.comment;else c.comment=h.comment;c.range=[n.offset,g,h.offset]}else c.range=[n.offset,g,g];return c}nm.resolveFlowCollection=rm});var Vo=m(function(fm){var om=P(),sm=N(),am=ce(),lm=ue(),cm=Fo(),um=Mo(),dm=jo();function vn(e,t,r,n,i,o){let s=r.type==="block-map"?cm.resolveBlockMap(e,t,r,n,o):r.type==="block-seq"?um.resolveBlockSeq(e,t,r,n,o):dm.resolveFlowCollection(e,t,r,n,o),a=s.constructor;if(i==="!"||i===a.tagName)return s.tag=a.tagName,s;if(i)s.tag=i;return s}function pm(e,t,r,n,i){let o=n.tag,s=!o?null:t.directives.tagName(o.source,(p)=>i(o,"TAG_RESOLVE_FAILED",p));if(r.type==="block-seq"){let{anchor:p,newlineAfterProp:f}=n,y=p&&o?p.offset>o.offset?p:o:p??o;if(y&&(!f||f.offset<y.offset))i(y,"MISSING_CHAR","Missing newline after block sequence props")}let a=r.type==="block-map"?"map":r.type==="block-seq"?"seq":r.start.source==="{"?"map":"seq";if(!o||!s||s==="!"||s===am.YAMLMap.tagName&&a==="map"||s===lm.YAMLSeq.tagName&&a==="seq")return vn(e,t,r,i,s);let l=t.schema.tags.find((p)=>p.tag===s&&p.collection===a);if(!l){let p=t.schema.knownTags[s];if(p?.collection===a)t.schema.tags.push(Object.assign({},p,{default:!1})),l=p;else{if(p)i(o,"BAD_COLLECTION_TYPE",`${p.tag} used for ${a} collection, but expects ${p.collection??"scalar"}`,!0);else i(o,"TAG_RESOLVE_FAILED",`Unresolved tag: ${s}`,!0);return vn(e,t,r,i,s)}}let c=vn(e,t,r,i,s,l),d=l.resolve?.(c,(p)=>i(o,"TAG_RESOLVE_FAILED",p),t.options)??c,u=om.isNode(d)?d:new sm.Scalar(d);if(u.range=c.range,u.tag=s,l?.format)u.format=l.format;return u}fm.composeCollection=pm});var Rn=m(function(bm){var An=N();function mm(e,t,r){let n=t.offset,i=hm(t,e.options.strict,r);if(!i)return{value:"",type:null,comment:"",range:[n,n,n]};let o=i.mode===">"?An.Scalar.BLOCK_FOLDED:An.Scalar.BLOCK_LITERAL,s=t.source?ym(t.source):[],a=s.length;for(let g=s.length-1;g>=0;--g){let h=s[g][1];if(h===""||h==="\r")a=g;else break}if(a===0){let g=i.chomp==="+"&&s.length>0?`
71
71
  `.repeat(Math.max(1,s.length-1)):"",h=n+i.length;if(t.source)h+=t.source.length;return{value:g,type:o,comment:i.comment,range:[n,h,h]}}let l=t.indent+i.indent,c=t.offset+i.length,d=0;for(let g=0;g<a;++g){let[h,b]=s[g];if(b===""||b==="\r"){if(i.indent===0&&h.length>l)l=h.length}else{if(h.length<l)r(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=g,l===0&&!e.atRoot)r(c,"BAD_INDENT","Block scalar values in collections must be indented");break}c+=h.length+b.length+1}for(let g=s.length-1;g>=a;--g)if(s[g][0].length>l)a=g+1;let u="",p="",f=!1;for(let g=0;g<d;++g)u+=s[g][0].slice(l)+`
72
72
  `;for(let g=d;g<a;++g){let[h,b]=s[g];c+=h.length+b.length+1;let k=b[b.length-1]==="\r";if(k)b=b.slice(0,-1);if(b&&h.length<l){let I=`Block scalar lines must not be less indented than their ${i.indent?"explicit indentation indicator":"first line"}`;r(c-b.length-(k?2:1),"BAD_INDENT",I),h=""}if(o===An.Scalar.BLOCK_LITERAL)u+=p+h.slice(l)+b,p=`
73
73
  `;else if(h.length>l||b[0]==="\t"){if(p===" ")p=`
@@ -82,44 +82,44 @@ ${c}
82
82
  `+s[g][0].slice(l);if(u[u.length-1]!==`
83
83
  `)u+=`
84
84
  `;break;default:u+=`
85
- `}let y=n+i.length+t.source.length;return{value:u,type:o,comment:i.comment,range:[n,y,y]}}function mm({offset:e,props:t},r,n){if(t[0].type!=="block-scalar-header")return n(t[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:i}=t[0],o=i[0],s=0,a="",l=-1;for(let p=1;p<i.length;++p){let f=i[p];if(!a&&(f==="-"||f==="+"))a=f;else{let y=Number(f);if(!s&&y)s=y;else if(l===-1)l=e+p}}if(l!==-1)n(l,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${i}`);let c=!1,d="",u=i.length;for(let p=1;p<t.length;++p){let f=t[p];switch(f.type){case"space":c=!0;case"newline":u+=f.source.length;break;case"comment":if(r&&!c)n(f,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");u+=f.source.length,d=f.source.substring(1);break;case"error":n(f,"UNEXPECTED_TOKEN",f.message),u+=f.source.length;break;default:{let y=`Unexpected token in block scalar header: ${f.type}`;n(f,"UNEXPECTED_TOKEN",y);let g=f.source;if(g&&typeof g==="string")u+=g.length}}}return{mode:o,indent:s,chomp:a,comment:d,length:u}}function hm(e){let t=e.split(/\n( *)/),r=t[0],n=r.match(/^( *)/),o=[n?.[1]?[n[1],r.slice(n[1].length)]:["",r]];for(let s=1;s<t.length;s+=2)o.push([t[s],t[s+1]]);return o}ym.resolveBlockScalar=gm});var En=m(function(vm){var Pn=O(),Cm=Te();function Sm(e,t,r){let{offset:n,type:i,source:o,end:s}=e,a,l,c=(p,f,y)=>r(n+p,f,y);switch(i){case"scalar":a=Pn.Scalar.PLAIN,l=km(o,c);break;case"single-quoted-scalar":a=Pn.Scalar.QUOTE_SINGLE,l=wm(o,c);break;case"double-quoted-scalar":a=Pn.Scalar.QUOTE_DOUBLE,l=xm(o,c);break;default:return r(e,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${i}`),{value:"",type:null,comment:"",range:[n,n+o.length,n+o.length]}}let d=n+o.length,u=Cm.resolveEnd(s,d,t,r);return{value:l,type:a,comment:u.comment,range:[n,d,u.offset]}}function km(e,t){let r="";switch(e[0]){case"\t":r="a tab character";break;case",":r="flow indicator character ,";break;case"%":r="directive indicator character %";break;case"|":case">":{r=`block scalar indicator ${e[0]}`;break}case"@":case"`":{r=`reserved character ${e[0]}`;break}}if(r)t(0,"BAD_SCALAR_START",`Plain value cannot start with ${r}`);return Vo(e)}function wm(e,t){if(e[e.length-1]!=="'"||e.length===1)t(e.length,"MISSING_CHAR","Missing closing 'quote");return Vo(e.slice(1,-1)).replace(/''/g,"'")}function Vo(e){let t=/(.*?)\r?\n/sy,r=t.exec(e);if(!r)return e;let n,i;try{n=new RegExp("(?<![ \t])[ \t]+$"),i=new RegExp("^[ \t]+|(?<![ \t])[ \t]+$","g")}catch{n=/[ \t]+$/,i=/^[ \t]+|[ \t]+$/g}let o=r[1].replace(n,""),s=" ",a=t.lastIndex;while(r=t.exec(e)){let c=r[1].replace(i,"");if(c==="")if(s===`
85
+ `}let y=n+i.length+t.source.length;return{value:u,type:o,comment:i.comment,range:[n,y,y]}}function hm({offset:e,props:t},r,n){if(t[0].type!=="block-scalar-header")return n(t[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:i}=t[0],o=i[0],s=0,a="",l=-1;for(let p=1;p<i.length;++p){let f=i[p];if(!a&&(f==="-"||f==="+"))a=f;else{let y=Number(f);if(!s&&y)s=y;else if(l===-1)l=e+p}}if(l!==-1)n(l,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${i}`);let c=!1,d="",u=i.length;for(let p=1;p<t.length;++p){let f=t[p];switch(f.type){case"space":c=!0;case"newline":u+=f.source.length;break;case"comment":if(r&&!c)n(f,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");u+=f.source.length,d=f.source.substring(1);break;case"error":n(f,"UNEXPECTED_TOKEN",f.message),u+=f.source.length;break;default:{let y=`Unexpected token in block scalar header: ${f.type}`;n(f,"UNEXPECTED_TOKEN",y);let g=f.source;if(g&&typeof g==="string")u+=g.length}}}return{mode:o,indent:s,chomp:a,comment:d,length:u}}function ym(e){let t=e.split(/\n( *)/),r=t[0],n=r.match(/^( *)/),o=[n?.[1]?[n[1],r.slice(n[1].length)]:["",r]];for(let s=1;s<t.length;s+=2)o.push([t[s],t[s+1]]);return o}bm.resolveBlockScalar=mm});var En=m(function(Pm){var Pn=N(),Cm=Te();function km(e,t,r){let{offset:n,type:i,source:o,end:s}=e,a,l,c=(p,f,y)=>r(n+p,f,y);switch(i){case"scalar":a=Pn.Scalar.PLAIN,l=wm(o,c);break;case"single-quoted-scalar":a=Pn.Scalar.QUOTE_SINGLE,l=xm(o,c);break;case"double-quoted-scalar":a=Pn.Scalar.QUOTE_DOUBLE,l=Im(o,c);break;default:return r(e,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${i}`),{value:"",type:null,comment:"",range:[n,n+o.length,n+o.length]}}let d=n+o.length,u=Cm.resolveEnd(s,d,t,r);return{value:l,type:a,comment:u.comment,range:[n,d,u.offset]}}function wm(e,t){let r="";switch(e[0]){case"\t":r="a tab character";break;case",":r="flow indicator character ,";break;case"%":r="directive indicator character %";break;case"|":case">":{r=`block scalar indicator ${e[0]}`;break}case"@":case"`":{r=`reserved character ${e[0]}`;break}}if(r)t(0,"BAD_SCALAR_START",`Plain value cannot start with ${r}`);return Uo(e)}function xm(e,t){if(e[e.length-1]!=="'"||e.length===1)t(e.length,"MISSING_CHAR","Missing closing 'quote");return Uo(e.slice(1,-1)).replace(/''/g,"'")}function Uo(e){let t=/(.*?)\r?\n/sy,r=t.exec(e);if(!r)return e;let n,i;try{n=new RegExp("(?<![ \t])[ \t]+$"),i=new RegExp("^[ \t]+|(?<![ \t])[ \t]+$","g")}catch{n=/[ \t]+$/,i=/^[ \t]+|[ \t]+$/g}let o=r[1].replace(n,""),s=" ",a=t.lastIndex;while(r=t.exec(e)){let c=r[1].replace(i,"");if(c==="")if(s===`
86
86
  `)o+=s;else s=`
87
- `;else o+=s+c,s=" ";a=t.lastIndex}let l=/[ \t]*(.*)/sy;return l.lastIndex=a,r=l.exec(e),o+s+(r?.[1]??"")}function xm(e,t){let r="";for(let n=1;n<e.length-1;++n){let i=e[n];if(i==="\r"&&e[n+1]===`
87
+ `;else o+=s+c,s=" ";a=t.lastIndex}let l=/[ \t]*(.*)/sy;return l.lastIndex=a,r=l.exec(e),o+s+(r?.[1]??"")}function Im(e,t){let r="";for(let n=1;n<e.length-1;++n){let i=e[n];if(i==="\r"&&e[n+1]===`
88
88
  `)continue;if(i===`
89
- `){let{fold:o,offset:s}=Im(e,n);r+=o,n=s}else if(i==="\\"){let o=e[++n],s=Rm[o];if(s)r+=s;else if(o===`
89
+ `){let{fold:o,offset:s}=vm(e,n);r+=o,n=s}else if(i==="\\"){let o=e[++n],s=Am[o];if(s)r+=s;else if(o===`
90
90
  `){o=e[n+1];while(o===" "||o==="\t")o=e[++n+1]}else if(o==="\r"&&e[n+1]===`
91
- `){o=e[++n+1];while(o===" "||o==="\t")o=e[++n+1]}else if(o==="x"||o==="u"||o==="U"){let a=o==="x"?2:o==="u"?4:8;r+=Am(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}`),r+=a}}else if(i===" "||i==="\t"){let o=n,s=e[n+1];while(s===" "||s==="\t")s=e[++n+1];if(s!==`
91
+ `){o=e[++n+1];while(o===" "||o==="\t")o=e[++n+1]}else if(o==="x"||o==="u"||o==="U"){let a=o==="x"?2:o==="u"?4:8;r+=Rm(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}`),r+=a}}else if(i===" "||i==="\t"){let o=n,s=e[n+1];while(s===" "||s==="\t")s=e[++n+1];if(s!==`
92
92
  `&&!(s==="\r"&&e[n+2]===`
93
- `))r+=n>o?e.slice(o,n+1):i}else r+=i}if(e[e.length-1]!=='"'||e.length===1)t(e.length,"MISSING_CHAR",'Missing closing "quote');return r}function Im(e,t){let r="",n=e[t+1];while(n===" "||n==="\t"||n===`
93
+ `))r+=n>o?e.slice(o,n+1):i}else r+=i}if(e[e.length-1]!=='"'||e.length===1)t(e.length,"MISSING_CHAR",'Missing closing "quote');return r}function vm(e,t){let r="",n=e[t+1];while(n===" "||n==="\t"||n===`
94
94
  `||n==="\r"){if(n==="\r"&&e[t+2]!==`
95
95
  `)break;if(n===`
96
96
  `)r+=`
97
- `;t+=1,n=e[t+1]}if(!r)r=" ";return{fold:r,offset:t}}var Rm={"0":"\x00",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
98
- `,r:"\r",t:"\t",v:"\v",N:"\x85",_:"\xA0",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\","\t":"\t"};function Am(e,t,r,n){let i=e.substr(t,r),s=i.length===r&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;try{return String.fromCodePoint(s)}catch{let a=e.substr(t-2,r+2);return n(t-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),a}}vm.resolveFlowScalar=Sm});var Ko=m(function(Lm){var Ce=P(),Uo=O(),Em=vn(),Nm=En();function Tm(e,t,r,n){let{value:i,type:o,comment:s,range:a}=t.type==="block-scalar"?Em.resolveBlockScalar(e,t,n):Nm.resolveFlowScalar(t,e.options.strict,n),l=r?e.directives.tagName(r.source,(u)=>n(r,"TAG_RESOLVE_FAILED",u)):null,c;if(e.options.stringKeys&&e.atKey)c=e.schema[Ce.SCALAR];else if(l)c=Om(e.schema,i,l,r,n);else if(t.type==="scalar")c=Dm(e,i,t,n);else c=e.schema[Ce.SCALAR];let d;try{let u=c.resolve(i,(p)=>n(r??t,"TAG_RESOLVE_FAILED",p),e.options);d=Ce.isScalar(u)?u:new Uo.Scalar(u)}catch(u){let p=u instanceof Error?u.message:String(u);n(r??t,"TAG_RESOLVE_FAILED",p),d=new Uo.Scalar(i)}if(d.range=a,d.source=i,o)d.type=o;if(l)d.tag=l;if(c.format)d.format=c.format;if(s)d.comment=s;return d}function Om(e,t,r,n,i){if(r==="!")return e[Ce.SCALAR];let o=[];for(let a of e.tags)if(!a.collection&&a.tag===r)if(a.default&&a.test)o.push(a);else return a;for(let a of o)if(a.test?.test(t))return a;let s=e.knownTags[r];if(s&&!s.collection)return e.tags.push(Object.assign({},s,{default:!1,test:void 0})),s;return i(n,"TAG_RESOLVE_FAILED",`Unresolved tag: ${r}`,r!=="tag:yaml.org,2002:str"),e[Ce.SCALAR]}function Dm({atKey:e,directives:t,schema:r},n,i,o){let s=r.tags.find((a)=>(a.default===!0||e&&a.default==="key")&&a.test?.test(n))||r[Ce.SCALAR];if(r.compat){let a=r.compat.find((l)=>l.default&&l.test?.test(n))??r[Ce.SCALAR];if(s.tag!==a.tag){let l=t.tagString(s.tag),c=t.tagString(a.tag),d=`Value may be parsed as either ${l} or ${c}`;o(i,"TAG_RESOLVE_FAILED",d,!0)}}return s}Lm.composeScalar=Tm});var Ho=m(function(Fm){function _m(e,t,r){if(t){r??(r=t.length);for(let n=r-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}Fm.emptyScalarPosition=_m});var zo=m(function(Ym){var $m=$e(),Bm=P(),jm=jo(),Yo=Ko(),Vm=Te(),Um=Ho(),Km={composeNode:Go,composeEmptyNode:Nn};function Go(e,t,r,n){let i=e.atKey,{spaceBefore:o,comment:s,anchor:a,tag:l}=r,c,d=!0;switch(t.type){case"alias":if(c=Hm(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=Yo.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=jm.composeCollection(Km,e,t,r,n),a)c.anchor=a.source.substring(1)}catch(u){let p=u instanceof Error?u.message:String(u);n(t,"RESOURCE_EXHAUSTION",p)}break;default:{let u=t.type==="error"?t.message:`Unsupported token (type: ${t.type})`;n(t,"UNEXPECTED_TOKEN",u),d=!1}}if(c??(c=Nn(e,t.offset,void 0,null,r,n)),a&&c.anchor==="")n(a,"BAD_ALIAS","Anchor cannot be an empty string");if(i&&e.options.stringKeys&&(!Bm.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(o)c.spaceBefore=!0;if(s)if(t.type==="scalar"&&t.source==="")c.comment=s;else c.commentBefore=s;if(e.options.keepSourceTokens&&d)c.srcToken=t;return c}function Nn(e,t,r,n,{spaceBefore:i,comment:o,anchor:s,tag:a,end:l},c){let d={type:"scalar",offset:Um.emptyScalarPosition(t,r,n),indent:-1,source:""},u=Yo.composeScalar(e,d,a,c);if(s){if(u.anchor=s.source.substring(1),u.anchor==="")c(s,"BAD_ALIAS","Anchor cannot be an empty string")}if(i)u.spaceBefore=!0;if(o)u.comment=o,u.range[2]=l;return u}function Hm({options:e},{offset:t,source:r,end:n},i){let o=new $m.Alias(r.substring(1));if(o.source==="")i(t,"BAD_ALIAS","Alias cannot be an empty string");if(o.source.endsWith(":"))i(t+r.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let s=t+r.length,a=Vm.resolveEnd(n,s,e.strict,i);if(o.range=[t,s,a.offset],a.comment)o.comment=a.comment;return o}Ym.composeEmptyNode=Nn;Ym.composeNode=Go});var Jo=m(function(Zm){var Wm=Ze(),Wo=zo(),Jm=Te(),Xm=tt();function Qm(e,t,{offset:r,start:n,value:i,end:o},s){let a=Object.assign({_directives:t},e),l=new Wm.Document(void 0,a),c={atKey:!1,atRoot:!0,directives:l.directives,options:l.options,schema:l.schema},d=Xm.resolveProps(n,{indicator:"doc-start",next:i??o?.[0],offset:r,onError:s,parentIndent:0,startOnNewline:!0});if(d.found){if(l.directives.docStart=!0,i&&(i.type==="block-map"||i.type==="block-seq")&&!d.hasNewline)s(d.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")}l.contents=i?Wo.composeNode(c,i,d,s):Wo.composeEmptyNode(c,d.end,n,null,d,s);let u=l.contents.range[2],p=Jm.resolveEnd(o,u,!1,s);if(p.comment)l.comment=p.comment;return l.range=[r,u,p.offset],l}Zm.composeDoc=Qm});var Tn=m(function(sh){var th=mt("process"),rh=Lr(),nh=Ze(),rt=et(),Xo=P(),ih=Jo(),oh=Te();function nt(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:r}=e;return[t,t+(typeof r==="string"?r.length:1)]}function Qo(e){let t="",r=!1,n=!1;for(let i=0;i<e.length;++i){let o=e[i];switch(o[0]){case"#":t+=(t===""?"":n?`
97
+ `;t+=1,n=e[t+1]}if(!r)r=" ";return{fold:r,offset:t}}var Am={"0":"\x00",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
98
+ `,r:"\r",t:"\t",v:"\v",N:"\x85",_:"\xA0",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\","\t":"\t"};function Rm(e,t,r,n){let i=e.substr(t,r),s=i.length===r&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;try{return String.fromCodePoint(s)}catch{let a=e.substr(t-2,r+2);return n(t-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),a}}Pm.resolveFlowScalar=km});var Ho=m(function(qm){var Se=P(),Ko=N(),Om=Rn(),Tm=En();function Nm(e,t,r,n){let{value:i,type:o,comment:s,range:a}=t.type==="block-scalar"?Om.resolveBlockScalar(e,t,n):Tm.resolveFlowScalar(t,e.options.strict,n),l=r?e.directives.tagName(r.source,(u)=>n(r,"TAG_RESOLVE_FAILED",u)):null,c;if(e.options.stringKeys&&e.atKey)c=e.schema[Se.SCALAR];else if(l)c=Dm(e.schema,i,l,r,n);else if(t.type==="scalar")c=Lm(e,i,t,n);else c=e.schema[Se.SCALAR];let d;try{let u=c.resolve(i,(p)=>n(r??t,"TAG_RESOLVE_FAILED",p),e.options);d=Se.isScalar(u)?u:new Ko.Scalar(u)}catch(u){let p=u instanceof Error?u.message:String(u);n(r??t,"TAG_RESOLVE_FAILED",p),d=new Ko.Scalar(i)}if(d.range=a,d.source=i,o)d.type=o;if(l)d.tag=l;if(c.format)d.format=c.format;if(s)d.comment=s;return d}function Dm(e,t,r,n,i){if(r==="!")return e[Se.SCALAR];let o=[];for(let a of e.tags)if(!a.collection&&a.tag===r)if(a.default&&a.test)o.push(a);else return a;for(let a of o)if(a.test?.test(t))return a;let s=e.knownTags[r];if(s&&!s.collection)return e.tags.push(Object.assign({},s,{default:!1,test:void 0})),s;return i(n,"TAG_RESOLVE_FAILED",`Unresolved tag: ${r}`,r!=="tag:yaml.org,2002:str"),e[Se.SCALAR]}function Lm({atKey:e,directives:t,schema:r},n,i,o){let s=r.tags.find((a)=>(a.default===!0||e&&a.default==="key")&&a.test?.test(n))||r[Se.SCALAR];if(r.compat){let a=r.compat.find((l)=>l.default&&l.test?.test(n))??r[Se.SCALAR];if(s.tag!==a.tag){let l=t.tagString(s.tag),c=t.tagString(a.tag),d=`Value may be parsed as either ${l} or ${c}`;o(i,"TAG_RESOLVE_FAILED",d,!0)}}return s}qm.composeScalar=Nm});var zo=m(function(Mm){function Fm(e,t,r){if(t){r??(r=t.length);for(let n=r-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}Mm.emptyScalarPosition=Fm});var Wo=m(function(Gm){var $m=Be(),jm=P(),Vm=Vo(),Go=Ho(),Um=Te(),Km=zo(),Hm={composeNode:Yo,composeEmptyNode:On};function Yo(e,t,r,n){let i=e.atKey,{spaceBefore:o,comment:s,anchor:a,tag:l}=r,c,d=!0;switch(t.type){case"alias":if(c=zm(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=Go.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=Vm.composeCollection(Hm,e,t,r,n),a)c.anchor=a.source.substring(1)}catch(u){let p=u instanceof Error?u.message:String(u);n(t,"RESOURCE_EXHAUSTION",p)}break;default:{let u=t.type==="error"?t.message:`Unsupported token (type: ${t.type})`;n(t,"UNEXPECTED_TOKEN",u),d=!1}}if(c??(c=On(e,t.offset,void 0,null,r,n)),a&&c.anchor==="")n(a,"BAD_ALIAS","Anchor cannot be an empty string");if(i&&e.options.stringKeys&&(!jm.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(o)c.spaceBefore=!0;if(s)if(t.type==="scalar"&&t.source==="")c.comment=s;else c.commentBefore=s;if(e.options.keepSourceTokens&&d)c.srcToken=t;return c}function On(e,t,r,n,{spaceBefore:i,comment:o,anchor:s,tag:a,end:l},c){let d={type:"scalar",offset:Km.emptyScalarPosition(t,r,n),indent:-1,source:""},u=Go.composeScalar(e,d,a,c);if(s){if(u.anchor=s.source.substring(1),u.anchor==="")c(s,"BAD_ALIAS","Anchor cannot be an empty string")}if(i)u.spaceBefore=!0;if(o)u.comment=o,u.range[2]=l;return u}function zm({options:e},{offset:t,source:r,end:n},i){let o=new $m.Alias(r.substring(1));if(o.source==="")i(t,"BAD_ALIAS","Alias cannot be an empty string");if(o.source.endsWith(":"))i(t+r.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let s=t+r.length,a=Um.resolveEnd(n,s,e.strict,i);if(o.range=[t,s,a.offset],a.comment)o.comment=a.comment;return o}Gm.composeEmptyNode=On;Gm.composeNode=Yo});var Xo=m(function(eh){var Jm=Ze(),Jo=Wo(),Xm=Te(),Qm=tt();function Zm(e,t,{offset:r,start:n,value:i,end:o},s){let a=Object.assign({_directives:t},e),l=new Jm.Document(void 0,a),c={atKey:!1,atRoot:!0,directives:l.directives,options:l.options,schema:l.schema},d=Qm.resolveProps(n,{indicator:"doc-start",next:i??o?.[0],offset:r,onError:s,parentIndent:0,startOnNewline:!0});if(d.found){if(l.directives.docStart=!0,i&&(i.type==="block-map"||i.type==="block-seq")&&!d.hasNewline)s(d.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")}l.contents=i?Jo.composeNode(c,i,d,s):Jo.composeEmptyNode(c,d.end,n,null,d,s);let u=l.contents.range[2],p=Xm.resolveEnd(o,u,!1,s);if(p.comment)l.comment=p.comment;return l.range=[r,u,p.offset],l}eh.composeDoc=Zm});var Tn=m(function(ah){var rh=mt("process"),nh=Lr(),ih=Ze(),rt=et(),Qo=P(),oh=Xo(),sh=Te();function nt(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:r}=e;return[t,t+(typeof r==="string"?r.length:1)]}function Zo(e){let t="",r=!1,n=!1;for(let i=0;i<e.length;++i){let o=e[i];switch(o[0]){case"#":t+=(t===""?"":n?`
99
99
 
100
100
  `:`
101
- `)+(o.substring(1)||" "),r=!0,n=!1;break;case"%":if(e[i+1]?.[0]!=="#")i+=1;r=!1;break;default:if(!r)n=!0;r=!1}}return{comment:t,afterEmptyLine:n}}class Zo{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(t,r,n,i)=>{let o=nt(t);if(i)this.warnings.push(new rt.YAMLWarning(o,r,n));else this.errors.push(new rt.YAMLParseError(o,r,n))},this.directives=new rh.Directives({version:e.version||"1.2"}),this.options=e}decorate(e,t){let{comment:r,afterEmptyLine:n}=Qo(this.prelude);if(r){let i=e.contents;if(t)e.comment=e.comment?`${e.comment}
102
- ${r}`:r;else if(n||e.directives.docStart||!i)e.commentBefore=r;else if(Xo.isCollection(i)&&!i.flow&&i.items.length>0){let o=i.items[0];if(Xo.isPair(o))o=o.key;let s=o.commentBefore;o.commentBefore=s?`${r}
101
+ `)+(o.substring(1)||" "),r=!0,n=!1;break;case"%":if(e[i+1]?.[0]!=="#")i+=1;r=!1;break;default:if(!r)n=!0;r=!1}}return{comment:t,afterEmptyLine:n}}class es{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(t,r,n,i)=>{let o=nt(t);if(i)this.warnings.push(new rt.YAMLWarning(o,r,n));else this.errors.push(new rt.YAMLParseError(o,r,n))},this.directives=new nh.Directives({version:e.version||"1.2"}),this.options=e}decorate(e,t){let{comment:r,afterEmptyLine:n}=Zo(this.prelude);if(r){let i=e.contents;if(t)e.comment=e.comment?`${e.comment}
102
+ ${r}`:r;else if(n||e.directives.docStart||!i)e.commentBefore=r;else if(Qo.isCollection(i)&&!i.flow&&i.items.length>0){let o=i.items[0];if(Qo.isPair(o))o=o.key;let s=o.commentBefore;o.commentBefore=s?`${r}
103
103
  ${s}`:r}else{let o=i.commentBefore;i.commentBefore=o?`${r}
104
- ${o}`:r}}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:Qo(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,r=-1){for(let n of e)yield*this.next(n);yield*this.end(t,r)}*next(e){if(th.env.LOG_STREAM)console.dir(e,{depth:null});switch(e.type){case"directive":this.directives.add(e.source,(t,r,n)=>{let i=nt(e);i[0]+=t,this.onError(i,"BAD_DIRECTIVE",r,n)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{let t=ih.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,r=new rt.YAMLParseError(nt(e),"UNEXPECTED_TOKEN",t);if(this.atDirectives||!this.doc)this.errors.push(r);else this.doc.errors.push(r);break}case"doc-end":{if(!this.doc){this.errors.push(new rt.YAMLParseError(nt(e),"UNEXPECTED_TOKEN","Unexpected doc-end without preceding document"));break}this.doc.directives.docEnd=!0;let t=oh.resolveEnd(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){let r=this.doc.comment;this.doc.comment=r?`${r}
105
- ${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new rt.YAMLParseError(nt(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 r=Object.assign({_directives:this.directives},this.options),n=new nh.Document(void 0,r);if(this.atDirectives)this.onError(t,"MISSING_CHAR","Missing directives-end indicator line");n.range=[0,t,t],this.decorate(n,!1),yield n}}}sh.Composer=Zo});var rs=m(function(mh){var lh=vn(),ch=En(),uh=et(),es=Ue();function dh(e,t=!0,r){if(e){let n=(i,o,s)=>{let a=typeof i==="number"?i:Array.isArray(i)?i[0]:i.offset;if(r)r(a,o,s);else throw new uh.YAMLParseError([a,a+1],o,s)};switch(e.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return ch.resolveFlowScalar(e,t,n);case"block-scalar":return lh.resolveBlockScalar({options:{strict:t}},e,n)}}return null}function ph(e,t){let{implicitKey:r=!1,indent:n,inFlow:i=!1,offset:o=-1,type:s="PLAIN"}=t,a=es.stringifyString({type:s,value:e},{implicitKey:r,indent:n>0?" ".repeat(n):"",inFlow:i,options:{blockQuote:!0,lineWidth:-1}}),l=t.end??[{type:"newline",offset:-1,indent:n,source:`
104
+ ${o}`:r}}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:Zo(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,r=-1){for(let n of e)yield*this.next(n);yield*this.end(t,r)}*next(e){if(rh.env.LOG_STREAM)console.dir(e,{depth:null});switch(e.type){case"directive":this.directives.add(e.source,(t,r,n)=>{let i=nt(e);i[0]+=t,this.onError(i,"BAD_DIRECTIVE",r,n)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{let t=oh.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,r=new rt.YAMLParseError(nt(e),"UNEXPECTED_TOKEN",t);if(this.atDirectives||!this.doc)this.errors.push(r);else this.doc.errors.push(r);break}case"doc-end":{if(!this.doc){this.errors.push(new rt.YAMLParseError(nt(e),"UNEXPECTED_TOKEN","Unexpected doc-end without preceding document"));break}this.doc.directives.docEnd=!0;let t=sh.resolveEnd(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){let r=this.doc.comment;this.doc.comment=r?`${r}
105
+ ${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new rt.YAMLParseError(nt(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 r=Object.assign({_directives:this.directives},this.options),n=new ih.Document(void 0,r);if(this.atDirectives)this.onError(t,"MISSING_CHAR","Missing directives-end indicator line");n.range=[0,t,t],this.decorate(n,!1),yield n}}}ah.Composer=es});var ns=m(function(hh){var ch=Rn(),uh=En(),dh=et(),ts=Ue();function ph(e,t=!0,r){if(e){let n=(i,o,s)=>{let a=typeof i==="number"?i:Array.isArray(i)?i[0]:i.offset;if(r)r(a,o,s);else throw new dh.YAMLParseError([a,a+1],o,s)};switch(e.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return uh.resolveFlowScalar(e,t,n);case"block-scalar":return ch.resolveBlockScalar({options:{strict:t}},e,n)}}return null}function fh(e,t){let{implicitKey:r=!1,indent:n,inFlow:i=!1,offset:o=-1,type:s="PLAIN"}=t,a=ts.stringifyString({type:s,value:e},{implicitKey:r,indent:n>0?" ".repeat(n):"",inFlow:i,options:{blockQuote:!0,lineWidth:-1}}),l=t.end??[{type:"newline",offset:-1,indent:n,source:`
106
106
  `}];switch(a[0]){case"|":case">":{let c=a.indexOf(`
107
107
  `),d=a.substring(0,c),u=a.substring(c+1)+`
108
- `,p=[{type:"block-scalar-header",offset:o,indent:n,source:d}];if(!ts(p,l))p.push({type:"newline",offset:-1,indent:n,source:`
109
- `});return{type:"block-scalar",offset:o,indent:n,props:p,source:u}}case'"':return{type:"double-quoted-scalar",offset:o,indent:n,source:a,end:l};case"'":return{type:"single-quoted-scalar",offset:o,indent:n,source:a,end:l};default:return{type:"scalar",offset:o,indent:n,source:a,end:l}}}function fh(e,t,r={}){let{afterKey:n=!1,implicitKey:i=!1,inFlow:o=!1,type:s}=r,a="indent"in e?e.indent:null;if(n&&typeof a==="number")a+=2;if(!s)switch(e.type){case"single-quoted-scalar":s="QUOTE_SINGLE";break;case"double-quoted-scalar":s="QUOTE_DOUBLE";break;case"block-scalar":{let c=e.props[0];if(c.type!=="block-scalar-header")throw Error("Invalid block scalar header");s=c.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:s="PLAIN"}let l=es.stringifyString({type:s,value:t},{implicitKey:i||a===null,indent:a!==null&&a>0?" ".repeat(a):"",inFlow:o,options:{blockQuote:!0,lineWidth:-1}});switch(l[0]){case"|":case">":gh(e,l);break;case'"':On(e,l,"double-quoted-scalar");break;case"'":On(e,l,"single-quoted-scalar");break;default:On(e,l,"scalar")}}function gh(e,t){let r=t.indexOf(`
108
+ `,p=[{type:"block-scalar-header",offset:o,indent:n,source:d}];if(!rs(p,l))p.push({type:"newline",offset:-1,indent:n,source:`
109
+ `});return{type:"block-scalar",offset:o,indent:n,props:p,source:u}}case'"':return{type:"double-quoted-scalar",offset:o,indent:n,source:a,end:l};case"'":return{type:"single-quoted-scalar",offset:o,indent:n,source:a,end:l};default:return{type:"scalar",offset:o,indent:n,source:a,end:l}}}function gh(e,t,r={}){let{afterKey:n=!1,implicitKey:i=!1,inFlow:o=!1,type:s}=r,a="indent"in e?e.indent:null;if(n&&typeof a==="number")a+=2;if(!s)switch(e.type){case"single-quoted-scalar":s="QUOTE_SINGLE";break;case"double-quoted-scalar":s="QUOTE_DOUBLE";break;case"block-scalar":{let c=e.props[0];if(c.type!=="block-scalar-header")throw Error("Invalid block scalar header");s=c.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:s="PLAIN"}let l=ts.stringifyString({type:s,value:t},{implicitKey:i||a===null,indent:a!==null&&a>0?" ".repeat(a):"",inFlow:o,options:{blockQuote:!0,lineWidth:-1}});switch(l[0]){case"|":case">":mh(e,l);break;case'"':Nn(e,l,"double-quoted-scalar");break;case"'":Nn(e,l,"single-quoted-scalar");break;default:Nn(e,l,"scalar")}}function mh(e,t){let r=t.indexOf(`
110
110
  `),n=t.substring(0,r),i=t.substring(r+1)+`
111
- `;if(e.type==="block-scalar"){let o=e.props[0];if(o.type!=="block-scalar-header")throw Error("Invalid block scalar header");o.source=n,e.source=i}else{let{offset:o}=e,s="indent"in e?e.indent:-1,a=[{type:"block-scalar-header",offset:o,indent:s,source:n}];if(!ts(a,"end"in e?e.end:void 0))a.push({type:"newline",offset:-1,indent:s,source:`
112
- `});for(let l of Object.keys(e))if(l!=="type"&&l!=="offset")delete e[l];Object.assign(e,{type:"block-scalar",indent:s,props:a,source:i})}}function ts(e,t){if(t)for(let r of t)switch(r.type){case"space":case"comment":e.push(r);break;case"newline":return e.push(r),!0}return!1}function On(e,t,r){switch(e.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":e.type=r,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 o of n)o.offset+=i;delete e.props,Object.assign(e,{type:r,source:t,end:n});break}case"block-map":case"block-seq":{let i={type:"newline",offset:e.offset+t.length,indent:e.indent,source:`
113
- `};delete e.items,Object.assign(e,{type:r,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((o)=>o.type==="space"||o.type==="comment"||o.type==="newline"):[];for(let o of Object.keys(e))if(o!=="type"&&o!=="offset")delete e[o];Object.assign(e,{type:r,indent:n,source:t,end:i})}}}mh.createScalarToken=ph;mh.resolveAsScalar=dh;mh.setScalarValue=fh});var ns=m(function(Sh){var Ch=(e)=>("type"in e)?Zt(e):Qt(e);function Zt(e){switch(e.type){case"block-scalar":{let t="";for(let r of e.props)t+=Zt(r);return t+e.source}case"block-map":case"block-seq":{let t="";for(let r of e.items)t+=Qt(r);return t}case"flow-collection":{let t=e.start.source;for(let r of e.items)t+=Qt(r);for(let r of e.end)t+=r.source;return t}case"document":{let t=Qt(e);if(e.end)for(let r of e.end)t+=r.source;return t}default:{let t=e.source;if("end"in e&&e.end)for(let r of e.end)t+=r.source;return t}}}function Qt({start:e,key:t,sep:r,value:n}){let i="";for(let o of e)i+=o.source;if(t)i+=Zt(t);if(r)for(let o of r)i+=o.source;if(n)i+=Zt(n);return i}Sh.stringify=Ch});var ss=m(function(xh){var Dn=Symbol("break visit"),wh=Symbol("skip children"),is=Symbol("remove item");function Se(e,t){if("type"in e&&e.type==="document")e={start:e.start,value:e.value};os(Object.freeze([]),e,t)}Se.BREAK=Dn;Se.SKIP=wh;Se.REMOVE=is;Se.itemAtPath=(e,t)=>{let r=e;for(let[n,i]of t){let o=r?.[n];if(o&&"items"in o)r=o.items[i];else return}return r};Se.parentCollection=(e,t)=>{let r=Se.itemAtPath(e,t.slice(0,-1)),n=t[t.length-1][0],i=r?.[n];if(i&&"items"in i)return i;throw Error("Parent collection not found")};function os(e,t,r){let n=r(t,e);if(typeof n==="symbol")return n;for(let i of["key","value"]){let o=t[i];if(o&&"items"in o){for(let s=0;s<o.items.length;++s){let a=os(Object.freeze(e.concat([[i,s]])),o.items[s],r);if(typeof a==="number")s=a-1;else if(a===Dn)return Dn;else if(a===is)o.items.splice(s,1),s-=1}if(typeof n==="function"&&i==="key")n=n(t,e)}}return typeof n==="function"?n(t,e):n}xh.visit=Se});var er=m(function(Th){var Ln=rs(),Rh=ns(),Ah=ss(),qn="\uFEFF",_n="\x02",Fn="\x18",Mn="\x1F",vh=(e)=>!!e&&("items"in e),Ph=(e)=>!!e&&(e.type==="scalar"||e.type==="single-quoted-scalar"||e.type==="double-quoted-scalar"||e.type==="block-scalar");function Eh(e){switch(e){case qn:return"<BOM>";case _n:return"<DOC>";case Fn:return"<FLOW_END>";case Mn:return"<SCALAR>";default:return JSON.stringify(e)}}function Nh(e){switch(e){case qn:return"byte-order-mark";case _n:return"doc-mode";case Fn:return"flow-error-end";case Mn:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
111
+ `;if(e.type==="block-scalar"){let o=e.props[0];if(o.type!=="block-scalar-header")throw Error("Invalid block scalar header");o.source=n,e.source=i}else{let{offset:o}=e,s="indent"in e?e.indent:-1,a=[{type:"block-scalar-header",offset:o,indent:s,source:n}];if(!rs(a,"end"in e?e.end:void 0))a.push({type:"newline",offset:-1,indent:s,source:`
112
+ `});for(let l of Object.keys(e))if(l!=="type"&&l!=="offset")delete e[l];Object.assign(e,{type:"block-scalar",indent:s,props:a,source:i})}}function rs(e,t){if(t)for(let r of t)switch(r.type){case"space":case"comment":e.push(r);break;case"newline":return e.push(r),!0}return!1}function Nn(e,t,r){switch(e.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":e.type=r,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 o of n)o.offset+=i;delete e.props,Object.assign(e,{type:r,source:t,end:n});break}case"block-map":case"block-seq":{let i={type:"newline",offset:e.offset+t.length,indent:e.indent,source:`
113
+ `};delete e.items,Object.assign(e,{type:r,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((o)=>o.type==="space"||o.type==="comment"||o.type==="newline"):[];for(let o of Object.keys(e))if(o!=="type"&&o!=="offset")delete e[o];Object.assign(e,{type:r,indent:n,source:t,end:i})}}}hh.createScalarToken=fh;hh.resolveAsScalar=ph;hh.setScalarValue=gh});var is=m(function(kh){var Ch=(e)=>("type"in e)?Zt(e):Qt(e);function Zt(e){switch(e.type){case"block-scalar":{let t="";for(let r of e.props)t+=Zt(r);return t+e.source}case"block-map":case"block-seq":{let t="";for(let r of e.items)t+=Qt(r);return t}case"flow-collection":{let t=e.start.source;for(let r of e.items)t+=Qt(r);for(let r of e.end)t+=r.source;return t}case"document":{let t=Qt(e);if(e.end)for(let r of e.end)t+=r.source;return t}default:{let t=e.source;if("end"in e&&e.end)for(let r of e.end)t+=r.source;return t}}}function Qt({start:e,key:t,sep:r,value:n}){let i="";for(let o of e)i+=o.source;if(t)i+=Zt(t);if(r)for(let o of r)i+=o.source;if(n)i+=Zt(n);return i}kh.stringify=Ch});var as=m(function(Ih){var Dn=Symbol("break visit"),xh=Symbol("skip children"),os=Symbol("remove item");function Ce(e,t){if("type"in e&&e.type==="document")e={start:e.start,value:e.value};ss(Object.freeze([]),e,t)}Ce.BREAK=Dn;Ce.SKIP=xh;Ce.REMOVE=os;Ce.itemAtPath=(e,t)=>{let r=e;for(let[n,i]of t){let o=r?.[n];if(o&&"items"in o)r=o.items[i];else return}return r};Ce.parentCollection=(e,t)=>{let r=Ce.itemAtPath(e,t.slice(0,-1)),n=t[t.length-1][0],i=r?.[n];if(i&&"items"in i)return i;throw Error("Parent collection not found")};function ss(e,t,r){let n=r(t,e);if(typeof n==="symbol")return n;for(let i of["key","value"]){let o=t[i];if(o&&"items"in o){for(let s=0;s<o.items.length;++s){let a=ss(Object.freeze(e.concat([[i,s]])),o.items[s],r);if(typeof a==="number")s=a-1;else if(a===Dn)return Dn;else if(a===os)o.items.splice(s,1),s-=1}if(typeof n==="function"&&i==="key")n=n(t,e)}}return typeof n==="function"?n(t,e):n}Ih.visit=Ce});var er=m(function(Nh){var Ln=ns(),Ah=is(),Rh=as(),qn="\uFEFF",_n="\x02",Fn="\x18",Mn="\x1F",Ph=(e)=>!!e&&("items"in e),Eh=(e)=>!!e&&(e.type==="scalar"||e.type==="single-quoted-scalar"||e.type==="double-quoted-scalar"||e.type==="block-scalar");function Oh(e){switch(e){case qn:return"<BOM>";case _n:return"<DOC>";case Fn:return"<FLOW_END>";case Mn:return"<SCALAR>";default:return JSON.stringify(e)}}function Th(e){switch(e){case qn:return"byte-order-mark";case _n:return"doc-mode";case Fn:return"flow-error-end";case Mn:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
114
114
  `:case`\r
115
- `: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}Th.createScalarToken=Ln.createScalarToken;Th.resolveAsScalar=Ln.resolveAsScalar;Th.setScalarValue=Ln.setScalarValue;Th.stringify=Rh.stringify;Th.visit=Ah.visit;Th.BOM=qn;Th.DOCUMENT=_n;Th.FLOW_END=Fn;Th.SCALAR=Mn;Th.isCollection=vh;Th.isScalar=Ph;Th.prettyToken=Eh;Th.tokenType=Nh});var Bn=m(function(Gh){var it=er();function G(e){switch(e){case void 0:case" ":case`
116
- `:case"\r":case"\t":return!0;default:return!1}}var as=new Set("0123456789ABCDEFabcdef"),Hh=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),tr=new Set(",[]{}"),Yh=new Set(` ,[]{}
117
- \r `),$n=(e)=>!e||Yh.has(e);class ls{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 r=this.next??"stream";while(r&&(t||this.hasChars(1)))r=yield*this.parseNext(r)}atLineEnd(){let e=this.pos,t=this.buffer[e];while(t===" "||t==="\t")t=this.buffer[++e];if(!t||t==="#"||t===`
115
+ `: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}Nh.createScalarToken=Ln.createScalarToken;Nh.resolveAsScalar=Ln.resolveAsScalar;Nh.setScalarValue=Ln.setScalarValue;Nh.stringify=Ah.stringify;Nh.visit=Rh.visit;Nh.BOM=qn;Nh.DOCUMENT=_n;Nh.FLOW_END=Fn;Nh.SCALAR=Mn;Nh.isCollection=Ph;Nh.isScalar=Eh;Nh.prettyToken=Oh;Nh.tokenType=Th});var $n=m(function(Yh){var it=er();function G(e){switch(e){case void 0:case" ":case`
116
+ `:case"\r":case"\t":return!0;default:return!1}}var ls=new Set("0123456789ABCDEFabcdef"),zh=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),tr=new Set(",[]{}"),Gh=new Set(` ,[]{}
117
+ \r `),Bn=(e)=>!e||Gh.has(e);class cs{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 r=this.next??"stream";while(r&&(t||this.hasChars(1)))r=yield*this.parseNext(r)}atLineEnd(){let e=this.pos,t=this.buffer[e];while(t===" "||t==="\t")t=this.buffer[++e];if(!t||t==="#"||t===`
118
118
  `)return!0;if(t==="\r")return this.buffer[e+1]===`
119
119
  `;return!1}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let t=this.buffer[e];if(this.indentNext>0){let r=0;while(t===" ")t=this.buffer[++r+e];if(t==="\r"){let n=this.buffer[r+e+1];if(n===`
120
120
  `||!n&&!this.atEnd)return e+r+1}return t===`
121
121
  `||r>=this.indentNext||!t&&!this.atEnd?e+r:-1}if(t==="-"||t==="."){let r=this.buffer.substr(e,3);if((r==="---"||r==="...")&&G(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(`
122
- `,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]===it.BOM)yield*this.pushCount(1),e=e.substring(1);if(e[0]==="%"){let t=e.length,r=e.indexOf("#");while(r!==-1){let i=e[r-1];if(i===" "||i==="\t"){t=r-1;break}else r=e.indexOf("#",r+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 it.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==="...")&&G(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&&!G(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===":")&&G(t)){let r=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=r,"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($n),"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,r=-1;do{if(e=yield*this.pushNewline(),e>0)t=yield*this.pushSpaces(!1),this.indentValue=r=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(r!==-1&&r<this.indentNext&&n[0]!=="#"||r===0&&(n.startsWith("---")||n.startsWith("..."))&&G(n[3])){if(!(r===this.indentNext-1&&this.flowLevel===1&&(n[0]==="]"||n[0]==="}")))return this.flowLevel=0,yield it.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($n),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let o=this.charAt(1);if(this.flowKey||G(o)||o===",")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 r=this.buffer.substring(0,t),n=r.indexOf(`
122
+ `,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]===it.BOM)yield*this.pushCount(1),e=e.substring(1);if(e[0]==="%"){let t=e.length,r=e.indexOf("#");while(r!==-1){let i=e[r-1];if(i===" "||i==="\t"){t=r-1;break}else r=e.indexOf("#",r+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 it.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==="...")&&G(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&&!G(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===":")&&G(t)){let r=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=r,"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(Bn),"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,r=-1;do{if(e=yield*this.pushNewline(),e>0)t=yield*this.pushSpaces(!1),this.indentValue=r=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(r!==-1&&r<this.indentNext&&n[0]!=="#"||r===0&&(n.startsWith("---")||n.startsWith("..."))&&G(n[3])){if(!(r===this.indentNext-1&&this.flowLevel===1&&(n[0]==="]"||n[0]==="}")))return this.flowLevel=0,yield it.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(Bn),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let o=this.charAt(1);if(this.flowKey||G(o)||o===",")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 r=this.buffer.substring(0,t),n=r.indexOf(`
123
123
  `,this.pos);if(n!==-1){while(n!==-1){let i=this.continueScalar(n+1);if(i===-1)break;n=r.indexOf(`
124
124
  `,i)}if(n!==-1)t=n-(r[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)=>G(t)||t==="#")}*parseBlockScalar(){let e=this.pos-1,t=0,r;e:for(let i=this.pos;r=this.buffer[i];++i)switch(r){case" ":t+=1;break;case`
125
125
  `:e=i,t=0;break;case"\r":{let o=this.buffer[i+1];if(!o&&!this.atEnd)return this.setNext("block-scalar");if(o===`
@@ -129,26 +129,26 @@ ${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.pus
129
129
  `&&i>=this.pos&&i+1+t>s)e=i;else break}while(!0);return yield it.SCALAR,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e=this.flowLevel>0,t=this.pos-1,r=this.pos-1,n;while(n=this.buffer[++r])if(n===":"){let i=this.buffer[r+1];if(G(i)||e&&tr.has(i))break;t=r}else if(G(n)){let i=this.buffer[r+1];if(n==="\r")if(i===`
130
130
  `)r+=1,n=`
131
131
  `,i=this.buffer[r+1];else t=r;if(i==="#"||e&&tr.has(i))break;if(n===`
132
- `){let o=this.continueScalar(r+1);if(o===-1)break;r=Math.max(r,o-2)}}else{if(e&&tr.has(n))break;t=r}if(!n&&!this.atEnd)return this.setNext("plain-scalar");return yield it.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 r=this.buffer.slice(this.pos,e);if(r)return yield r,this.pos+=r.length,r.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($n),e+=yield*this.pushSpaces(!0);continue e;case"-":case"?":case":":{let t=this.flowLevel>0,r=this.charAt(1);if(G(r)||t&&tr.has(r)){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(!G(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(Hh.has(t))t=this.buffer[++e];else if(t==="%"&&as.has(this.buffer[e+1])&&as.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===`
132
+ `){let o=this.continueScalar(r+1);if(o===-1)break;r=Math.max(r,o-2)}}else{if(e&&tr.has(n))break;t=r}if(!n&&!this.atEnd)return this.setNext("plain-scalar");return yield it.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 r=this.buffer.slice(this.pos,e);if(r)return yield r,this.pos+=r.length,r.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(Bn),e+=yield*this.pushSpaces(!0);continue e;case"-":case"?":case":":{let t=this.flowLevel>0,r=this.charAt(1);if(G(r)||t&&tr.has(r)){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(!G(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(zh.has(t))t=this.buffer[++e];else if(t==="%"&&ls.has(this.buffer[e+1])&&ls.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===`
133
133
  `)return yield*this.pushCount(1);else if(e==="\r"&&this.charAt(1)===`
134
- `)return yield*this.pushCount(2);else return 0}*pushSpaces(e){let t=this.pos-1,r;do r=this.buffer[++t];while(r===" "||e&&r==="\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,r=this.buffer[t];while(!e(r))r=this.buffer[++t];return yield*this.pushToIndex(t,!1)}}Gh.Lexer=ls});var jn=m(function(Wh){class cs{constructor(){this.lineStarts=[],this.addNewLine=(e)=>this.lineStarts.push(e),this.linePos=(e)=>{let t=0,r=this.lineStarts.length;while(t<r){let i=t+r>>1;if(this.lineStarts[i]<e)t=i+1;else r=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}}}}Wh.LineCounter=cs});var Vn=m(function(Zh){var Xh=mt("process"),us=er(),Qh=Bn();function de(e,t){for(let r=0;r<e.length;++r)if(e[r].type===t)return!0;return!1}function ds(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 fs(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 rr(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 Oe(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 nr(e,t){if(t.length<1e5)Array.prototype.push.apply(e,t);else for(let r=0;r<t.length;++r)e.push(t[r])}function ps(e){if(e.start.type==="flow-seq-start"){for(let t of e.items)if(t.sep&&!t.value&&!de(t.start,"explicit-key-ind")&&!de(t.sep,"map-value-ind")){if(t.key)t.value=t.key;if(delete t.key,fs(t.value))if(t.value.end)nr(t.value.end,t.sep);else t.value.end=t.sep;else nr(t.start,t.sep);delete t.sep}}}class gs{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 Qh.Lexer,this.onNewLine=e}*parse(e,t=!1){if(this.onNewLine&&this.offset===0)this.onNewLine(0);for(let r of this.lexer.lex(e,t))yield*this.next(r);if(!t)yield*this.end()}*next(e){if(this.source=e,Xh.env.LOG_TOKENS)console.log("|",us.prettyToken(e));if(this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}let t=us.tokenType(e);if(!t){let r=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:r,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 r=this.peek(1);if(t.type==="block-scalar")t.indent="indent"in r?r.indent:0;else if(t.type==="flow-collection"&&r.type==="document")t.indent=0;if(t.type==="flow-collection")ps(t);switch(r.type){case"document":r.value=t;break;case"block-scalar":r.props.push(t);break;case"block-map":{let n=r.items[r.items.length-1];if(n.value){r.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=r.items[r.items.length-1];if(n.value)r.items.push({start:[],value:t});else n.value=t;break}case"flow-collection":{let n=r.items[r.items.length-1];if(!n||n.value)r.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((r.type==="document"||r.type==="block-map"||r.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&&ds(n.start)===-1&&(t.indent===0||n.start.every((i)=>i.type!=="comment"||i.indent<t.indent))){if(r.type==="document")r.end=n.start;else r.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(ds(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=rr(this.peek(2)),r=Oe(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:r,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(`
134
+ `)return yield*this.pushCount(2);else return 0}*pushSpaces(e){let t=this.pos-1,r;do r=this.buffer[++t];while(r===" "||e&&r==="\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,r=this.buffer[t];while(!e(r))r=this.buffer[++t];return yield*this.pushToIndex(t,!1)}}Yh.Lexer=cs});var jn=m(function(Jh){class us{constructor(){this.lineStarts=[],this.addNewLine=(e)=>this.lineStarts.push(e),this.linePos=(e)=>{let t=0,r=this.lineStarts.length;while(t<r){let i=t+r>>1;if(this.lineStarts[i]<e)t=i+1;else r=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}}}}Jh.LineCounter=us});var Vn=m(function(ey){var Qh=mt("process"),ds=er(),Zh=$n();function de(e,t){for(let r=0;r<e.length;++r)if(e[r].type===t)return!0;return!1}function ps(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 gs(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 rr(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 Ne(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 nr(e,t){if(t.length<1e5)Array.prototype.push.apply(e,t);else for(let r=0;r<t.length;++r)e.push(t[r])}function fs(e){if(e.start.type==="flow-seq-start"){for(let t of e.items)if(t.sep&&!t.value&&!de(t.start,"explicit-key-ind")&&!de(t.sep,"map-value-ind")){if(t.key)t.value=t.key;if(delete t.key,gs(t.value))if(t.value.end)nr(t.value.end,t.sep);else t.value.end=t.sep;else nr(t.start,t.sep);delete t.sep}}}class ms{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 Zh.Lexer,this.onNewLine=e}*parse(e,t=!1){if(this.onNewLine&&this.offset===0)this.onNewLine(0);for(let r of this.lexer.lex(e,t))yield*this.next(r);if(!t)yield*this.end()}*next(e){if(this.source=e,Qh.env.LOG_TOKENS)console.log("|",ds.prettyToken(e));if(this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}let t=ds.tokenType(e);if(!t){let r=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:r,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 r=this.peek(1);if(t.type==="block-scalar")t.indent="indent"in r?r.indent:0;else if(t.type==="flow-collection"&&r.type==="document")t.indent=0;if(t.type==="flow-collection")fs(t);switch(r.type){case"document":r.value=t;break;case"block-scalar":r.props.push(t);break;case"block-map":{let n=r.items[r.items.length-1];if(n.value){r.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=r.items[r.items.length-1];if(n.value)r.items.push({start:[],value:t});else n.value=t;break}case"flow-collection":{let n=r.items[r.items.length-1];if(!n||n.value)r.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((r.type==="document"||r.type==="block-map"||r.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&&ps(n.start)===-1&&(t.indent===0||n.start.every((i)=>i.type!=="comment"||i.indent<t.indent))){if(r.type==="document")r.end=n.start;else r.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(ps(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=rr(this.peek(2)),r=Ne(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:r,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(`
135
135
  `)+1;while(t!==0)this.onNewLine(this.offset+t),t=this.source.indexOf(`
136
- `,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 r="end"in t.value?t.value.end:void 0;if((Array.isArray(r)?r[r.length-1]:void 0)?.type==="comment")r?.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)){nr(n,t.start),n.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let r=!this.onKeyLine&&this.indent===e.indent,n=r&&(t.sep||t.explicitKey)&&this.type!=="seq-item-ind",i=[];if(n&&t.sep&&!t.value){let o=[];for(let s=0;s<t.sep.length;++s){let a=t.sep[s];switch(a.type){case"newline":o.push(s);break;case"space":break;case"comment":if(a.indent>e.indent)o.length=0;break;default:o.length=0}}if(o.length>=2)i=t.sep.splice(o[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(de(t.start,"newline"))Object.assign(t,{key:null,sep:[this.sourceToken]});else{let o=Oe(t.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:null,sep:[this.sourceToken]}]})}else if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(de(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(fs(t.key)&&!de(t.sep,"newline")){let o=Oe(t.start),{key:s,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:o,key:s,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(de(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 o=this.flowScalar(this.type);if(n||t.value)e.items.push({start:i,key:o,sep:[]}),this.onKeyLine=!0;else if(t.sep)this.stack.push(o);else Object.assign(t,{key:o,sep:[]}),this.onKeyLine=!0;return}default:{let o=this.startBlockValue(e);if(o){if(o.type==="block-seq"){if(!t.explicitKey&&t.sep&&!de(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(r)e.items.push({start:i});this.stack.push(o);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 r="end"in t.value?t.value.end:void 0;if((Array.isArray(r)?r[r.length-1]:void 0)?.type==="comment")r?.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)){nr(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||de(t.start,"seq-item-ind"))e.items.push({start:[this.sourceToken]});else t.start.push(this.sourceToken);return}if(this.indent>e.indent){let r=this.startBlockValue(e);if(r){this.stack.push(r);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){let t=e.items[e.items.length-1];if(this.type==="flow-error-end"){let r;do yield*this.pop(),r=this.peek(1);while(r?.type==="flow-collection")}else if(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 r=this.startBlockValue(e);if(r)this.stack.push(r);else yield*this.pop(),yield*this.step()}else{let r=this.peek(2);if(r.type==="block-map"&&(this.type==="map-value-ind"&&r.indent===e.indent||this.type==="newline"&&!r.items[r.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&r.type!=="flow-collection"){let n=rr(r),i=Oe(n);ps(e);let o=e.end.splice(1,e.end.length);o.push(this.sourceToken);let s={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:i,key:e,sep:o}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=s}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let t=this.source.indexOf(`
136
+ `,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 r="end"in t.value?t.value.end:void 0;if((Array.isArray(r)?r[r.length-1]:void 0)?.type==="comment")r?.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)){nr(n,t.start),n.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let r=!this.onKeyLine&&this.indent===e.indent,n=r&&(t.sep||t.explicitKey)&&this.type!=="seq-item-ind",i=[];if(n&&t.sep&&!t.value){let o=[];for(let s=0;s<t.sep.length;++s){let a=t.sep[s];switch(a.type){case"newline":o.push(s);break;case"space":break;case"comment":if(a.indent>e.indent)o.length=0;break;default:o.length=0}}if(o.length>=2)i=t.sep.splice(o[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(de(t.start,"newline"))Object.assign(t,{key:null,sep:[this.sourceToken]});else{let o=Ne(t.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:null,sep:[this.sourceToken]}]})}else if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(de(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(gs(t.key)&&!de(t.sep,"newline")){let o=Ne(t.start),{key:s,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:o,key:s,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(de(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 o=this.flowScalar(this.type);if(n||t.value)e.items.push({start:i,key:o,sep:[]}),this.onKeyLine=!0;else if(t.sep)this.stack.push(o);else Object.assign(t,{key:o,sep:[]}),this.onKeyLine=!0;return}default:{let o=this.startBlockValue(e);if(o){if(o.type==="block-seq"){if(!t.explicitKey&&t.sep&&!de(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(r)e.items.push({start:i});this.stack.push(o);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 r="end"in t.value?t.value.end:void 0;if((Array.isArray(r)?r[r.length-1]:void 0)?.type==="comment")r?.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)){nr(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||de(t.start,"seq-item-ind"))e.items.push({start:[this.sourceToken]});else t.start.push(this.sourceToken);return}if(this.indent>e.indent){let r=this.startBlockValue(e);if(r){this.stack.push(r);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){let t=e.items[e.items.length-1];if(this.type==="flow-error-end"){let r;do yield*this.pop(),r=this.peek(1);while(r?.type==="flow-collection")}else if(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 r=this.startBlockValue(e);if(r)this.stack.push(r);else yield*this.pop(),yield*this.step()}else{let r=this.peek(2);if(r.type==="block-map"&&(this.type==="map-value-ind"&&r.indent===e.indent||this.type==="newline"&&!r.items[r.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&r.type!=="flow-collection"){let n=rr(r),i=Ne(n);fs(e);let o=e.end.splice(1,e.end.length);o.push(this.sourceToken);let s={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:i,key:e,sep:o}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=s}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let t=this.source.indexOf(`
137
137
  `)+1;while(t!==0)this.onNewLine(this.offset+t),t=this.source.indexOf(`
138
- `,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=rr(e),r=Oe(t);return r.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let t=rr(e),r=Oe(t);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,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((r)=>r.type==="newline"||r.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()}}}Zh.Parser=gs});var Cs=m(function(ly){var ms=Tn(),ty=Ze(),ot=et(),ry=Br(),ny=P(),iy=jn(),hs=Vn();function ys(e){let t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new iy.LineCounter||null,prettyErrors:t}}function oy(e,t={}){let{lineCounter:r,prettyErrors:n}=ys(t),i=new hs.Parser(r?.addNewLine),o=new ms.Composer(t),s=Array.from(o.compose(i.parse(e)));if(n&&r)for(let a of s)a.errors.forEach(ot.prettifyError(e,r)),a.warnings.forEach(ot.prettifyError(e,r));if(s.length>0)return s;return Object.assign([],{empty:!0},o.streamInfo())}function bs(e,t={}){let{lineCounter:r,prettyErrors:n}=ys(t),i=new hs.Parser(r?.addNewLine),o=new ms.Composer(t),s=null;for(let a of o.compose(i.parse(e),!0,e.length))if(!s)s=a;else if(s.options.logLevel!=="silent"){s.errors.push(new ot.YAMLParseError(a.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}if(n&&r)s.errors.forEach(ot.prettifyError(e,r)),s.warnings.forEach(ot.prettifyError(e,r));return s}function sy(e,t,r){let n=void 0;if(typeof t==="function")n=t;else if(r===void 0&&t&&typeof t==="object")r=t;let i=bs(e,r);if(!i)return null;if(i.warnings.forEach((o)=>ry.warn(i.options.logLevel,o)),i.errors.length>0)if(i.options.logLevel!=="silent")throw i.errors[0];else i.errors=[];return i.toJS(Object.assign({reviver:n},r))}function ay(e,t,r){let n=null;if(typeof t==="function"||Array.isArray(t))n=t;else if(r===void 0&&t)r=t;if(typeof r==="string")r=r.length;if(typeof r==="number"){let i=Math.round(r);r=i<1?void 0:i>8?{indent:8}:{indent:i}}if(e===void 0){let{keepUndefined:i}=r??t??{};if(!i)return}if(ny.isDocument(e)&&!n)return e.toString(r);return new ty.Document(e,n,r).toString(r)}ly.parse=sy;ly.parseAllDocuments=oy;ly.parseDocument=bs;ly.stringify=ay});var Le=m(function(tA,Hs){var wb=Number.MAX_SAFE_INTEGER||9007199254740991,xb=["major","premajor","minor","preminor","patch","prepatch","prerelease"];Hs.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:wb,RELEASE_TYPES:xb,SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var lt=m(function(rA,Ys){var Ib=typeof process==="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};Ys.exports=Ib});var qe=m(function(Q,Gs){var{MAX_SAFE_COMPONENT_LENGTH:zn,MAX_SAFE_BUILD_LENGTH:Rb,MAX_LENGTH:Ab}=Le(),vb=lt();Q=Gs.exports={};var Pb=Q.re=[],Eb=Q.safeRe=[],C=Q.src=[],Nb=Q.safeSrc=[],S=Q.t={},Tb=0,Wn="[a-zA-Z0-9-]",Ob=[["\\s",1],["\\d",Ab],[Wn,Rb]],Db=(e)=>{for(let[t,r]of Ob)e=e.split(`${t}*`).join(`${t}{0,${r}}`).split(`${t}+`).join(`${t}{1,${r}}`);return e},v=(e,t,r)=>{let n=Db(t),i=Tb++;vb(e,i,t),S[e]=i,C[i]=t,Nb[i]=n,Pb[i]=new RegExp(t,r?"g":void 0),Eb[i]=new RegExp(n,r?"g":void 0)};v("NUMERICIDENTIFIER","0|[1-9]\\d*");v("NUMERICIDENTIFIERLOOSE","\\d+");v("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${Wn}*`);v("MAINVERSION",`(${C[S.NUMERICIDENTIFIER]})\\.(${C[S.NUMERICIDENTIFIER]})\\.(${C[S.NUMERICIDENTIFIER]})`);v("MAINVERSIONLOOSE",`(${C[S.NUMERICIDENTIFIERLOOSE]})\\.(${C[S.NUMERICIDENTIFIERLOOSE]})\\.(${C[S.NUMERICIDENTIFIERLOOSE]})`);v("PRERELEASEIDENTIFIER",`(?:${C[S.NONNUMERICIDENTIFIER]}|${C[S.NUMERICIDENTIFIER]})`);v("PRERELEASEIDENTIFIERLOOSE",`(?:${C[S.NONNUMERICIDENTIFIER]}|${C[S.NUMERICIDENTIFIERLOOSE]})`);v("PRERELEASE",`(?:-(${C[S.PRERELEASEIDENTIFIER]}(?:\\.${C[S.PRERELEASEIDENTIFIER]})*))`);v("PRERELEASELOOSE",`(?:-?(${C[S.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${C[S.PRERELEASEIDENTIFIERLOOSE]})*))`);v("BUILDIDENTIFIER",`${Wn}+`);v("BUILD",`(?:\\+(${C[S.BUILDIDENTIFIER]}(?:\\.${C[S.BUILDIDENTIFIER]})*))`);v("FULLPLAIN",`v?${C[S.MAINVERSION]}${C[S.PRERELEASE]}?${C[S.BUILD]}?`);v("FULL",`^${C[S.FULLPLAIN]}$`);v("LOOSEPLAIN",`[v=\\s]*${C[S.MAINVERSIONLOOSE]}${C[S.PRERELEASELOOSE]}?${C[S.BUILD]}?`);v("LOOSE",`^${C[S.LOOSEPLAIN]}$`);v("GTLT","((?:<|>)?=?)");v("XRANGEIDENTIFIERLOOSE",`${C[S.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);v("XRANGEIDENTIFIER",`${C[S.NUMERICIDENTIFIER]}|x|X|\\*`);v("XRANGEPLAIN",`[v=\\s]*(${C[S.XRANGEIDENTIFIER]})(?:\\.(${C[S.XRANGEIDENTIFIER]})(?:\\.(${C[S.XRANGEIDENTIFIER]})(?:${C[S.PRERELEASE]})?${C[S.BUILD]}?)?)?`);v("XRANGEPLAINLOOSE",`[v=\\s]*(${C[S.XRANGEIDENTIFIERLOOSE]})(?:\\.(${C[S.XRANGEIDENTIFIERLOOSE]})(?:\\.(${C[S.XRANGEIDENTIFIERLOOSE]})(?:${C[S.PRERELEASELOOSE]})?${C[S.BUILD]}?)?)?`);v("XRANGE",`^${C[S.GTLT]}\\s*${C[S.XRANGEPLAIN]}$`);v("XRANGELOOSE",`^${C[S.GTLT]}\\s*${C[S.XRANGEPLAINLOOSE]}$`);v("COERCEPLAIN",`(^|[^\\d])(\\d{1,${zn}})(?:\\.(\\d{1,${zn}}))?(?:\\.(\\d{1,${zn}}))?`);v("COERCE",`${C[S.COERCEPLAIN]}(?:$|[^\\d])`);v("COERCEFULL",C[S.COERCEPLAIN]+`(?:${C[S.PRERELEASE]})?(?:${C[S.BUILD]})?(?:$|[^\\d])`);v("COERCERTL",C[S.COERCE],!0);v("COERCERTLFULL",C[S.COERCEFULL],!0);v("LONETILDE","(?:~>?)");v("TILDETRIM",`(\\s*)${C[S.LONETILDE]}\\s+`,!0);Q.tildeTrimReplace="$1~";v("TILDE",`^${C[S.LONETILDE]}${C[S.XRANGEPLAIN]}$`);v("TILDELOOSE",`^${C[S.LONETILDE]}${C[S.XRANGEPLAINLOOSE]}$`);v("LONECARET","(?:\\^)");v("CARETTRIM",`(\\s*)${C[S.LONECARET]}\\s+`,!0);Q.caretTrimReplace="$1^";v("CARET",`^${C[S.LONECARET]}${C[S.XRANGEPLAIN]}$`);v("CARETLOOSE",`^${C[S.LONECARET]}${C[S.XRANGEPLAINLOOSE]}$`);v("COMPARATORLOOSE",`^${C[S.GTLT]}\\s*(${C[S.LOOSEPLAIN]})$|^$`);v("COMPARATOR",`^${C[S.GTLT]}\\s*(${C[S.FULLPLAIN]})$|^$`);v("COMPARATORTRIM",`(\\s*)${C[S.GTLT]}\\s*(${C[S.LOOSEPLAIN]}|${C[S.XRANGEPLAIN]})`,!0);Q.comparatorTrimReplace="$1$2$3";v("HYPHENRANGE",`^\\s*(${C[S.XRANGEPLAIN]})\\s+-\\s+(${C[S.XRANGEPLAIN]})\\s*$`);v("HYPHENRANGELOOSE",`^\\s*(${C[S.XRANGEPLAINLOOSE]})\\s+-\\s+(${C[S.XRANGEPLAINLOOSE]})\\s*$`);v("STAR","(<|>)?=?\\s*\\*");v("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");v("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var mr=m(function(nA,zs){var Lb=Object.freeze({loose:!0}),qb=Object.freeze({}),_b=(e)=>{if(!e)return qb;if(typeof e!=="object")return Lb;return e};zs.exports=_b});var Jn=m(function(iA,Xs){var Ws=/^[0-9]+$/,Js=(e,t)=>{if(typeof e==="number"&&typeof t==="number")return e===t?0:e<t?-1:1;let r=Ws.test(e),n=Ws.test(t);if(r&&n)e=+e,t=+t;return e===t?0:r&&!n?-1:n&&!r?1:e<t?-1:1},Fb=(e,t)=>Js(t,e);Xs.exports={compareIdentifiers:Js,rcompareIdentifiers:Fb}});var F=m(function(oA,Zs){var hr=lt(),{MAX_LENGTH:Qs,MAX_SAFE_INTEGER:yr}=Le(),{safeRe:br,t:Cr}=qe(),Mb=mr(),{compareIdentifiers:Xn}=Jn(),$b=(e,t)=>{let r=t.split(".");if(r.length>e.length)return!1;for(let n=0;n<r.length;n++)if(Xn(e[n],r[n])!==0)return!1;return!0};class z{constructor(e,t){if(t=Mb(t),e instanceof z)if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;else e=e.version;else if(typeof e!=="string")throw TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>Qs)throw TypeError(`version is longer than ${Qs} characters`);hr("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;let r=e.trim().match(t.loose?br[Cr.LOOSE]:br[Cr.FULL]);if(!r)throw TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>yr||this.major<0)throw TypeError("Invalid major version");if(this.minor>yr||this.minor<0)throw TypeError("Invalid minor version");if(this.patch>yr||this.patch<0)throw TypeError("Invalid patch version");if(!r[4])this.prerelease=[];else this.prerelease=r[4].split(".").map((n)=>{if(/^[0-9]+$/.test(n)){let i=+n;if(i>=0&&i<yr)return i}return n});this.build=r[5]?r[5].split("."):[],this.format()}format(){if(this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length)this.version+=`-${this.prerelease.join(".")}`;return this.version}toString(){return this.version}compare(e){if(hr("SemVer.compare",this.version,this.options,e),!(e instanceof z)){if(typeof e==="string"&&e===this.version)return 0;e=new z(e,this.options)}if(e.version===this.version)return 0;return this.compareMain(e)||this.comparePre(e)}compareMain(e){if(!(e instanceof z))e=new z(e,this.options);if(this.major<e.major)return-1;if(this.major>e.major)return 1;if(this.minor<e.minor)return-1;if(this.minor>e.minor)return 1;if(this.patch<e.patch)return-1;if(this.patch>e.patch)return 1;return 0}comparePre(e){if(!(e instanceof z))e=new z(e,this.options);if(this.prerelease.length&&!e.prerelease.length)return-1;else if(!this.prerelease.length&&e.prerelease.length)return 1;else if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{let r=this.prerelease[t],n=e.prerelease[t];if(hr("prerelease compare",t,r,n),r===void 0&&n===void 0)return 0;else if(n===void 0)return 1;else if(r===void 0)return-1;else if(r===n)continue;else return Xn(r,n)}while(++t)}compareBuild(e){if(!(e instanceof z))e=new z(e,this.options);let t=0;do{let r=this.build[t],n=e.build[t];if(hr("build compare",t,r,n),r===void 0&&n===void 0)return 0;else if(n===void 0)return 1;else if(r===void 0)return-1;else if(r===n)continue;else return Xn(r,n)}while(++t)}inc(e,t,r){if(e.startsWith("pre")){if(!t&&r===!1)throw Error("invalid increment argument: identifier is empty");if(t){let n=`-${t}`.match(this.options.loose?br[Cr.PRERELEASELOOSE]:br[Cr.PRERELEASE]);if(!n||n[1]!==t)throw Error(`invalid identifier: ${t}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,r),this.inc("pre",t,r);break;case"prerelease":if(this.prerelease.length===0)this.inc("patch",t,r);this.inc("pre",t,r);break;case"release":if(this.prerelease.length===0)throw Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":if(this.minor!==0||this.patch!==0||this.prerelease.length===0)this.major++;this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":if(this.patch!==0||this.prerelease.length===0)this.minor++;this.patch=0,this.prerelease=[];break;case"patch":if(this.prerelease.length===0)this.patch++;this.prerelease=[];break;case"pre":{let n=Number(r)?1:0;if(this.prerelease.length===0)this.prerelease=[n];else{let i=this.prerelease.length;while(--i>=0)if(typeof this.prerelease[i]==="number")this.prerelease[i]++,i=-2;if(i===-1){if(t===this.prerelease.join(".")&&r===!1)throw Error("invalid increment argument: identifier already exists");this.prerelease.push(n)}}if(t){let i=[t,n];if(r===!1)i=[t];if($b(this.prerelease,t)){let o=this.prerelease[t.split(".").length];if(isNaN(o))this.prerelease=i}else this.prerelease=i}break}default:throw Error(`invalid increment argument: ${e}`)}if(this.raw=this.format(),this.build.length)this.raw+=`+${this.build.join(".")}`;return this}}Zs.exports=z});var fe=m(function(sA,ta){var ea=F(),Bb=(e,t,r=!1)=>{if(e instanceof ea)return e;try{return new ea(e,t)}catch(n){if(!r)return null;throw n}};ta.exports=Bb});var na=m(function(aA,ra){var jb=fe(),Vb=(e,t)=>{let r=jb(e,t);return r?r.version:null};ra.exports=Vb});var oa=m(function(lA,ia){var Ub=fe(),Kb=(e,t)=>{let r=Ub(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null};ia.exports=Kb});var la=m(function(cA,aa){var sa=F(),Hb=(e,t,r,n,i)=>{if(typeof r==="string")i=n,n=r,r=void 0;try{return new sa(e instanceof sa?e.version:e,r).inc(t,n,i).version}catch(o){return null}};aa.exports=Hb});var da=m(function(uA,ua){var ca=fe(),Yb=(e,t)=>{let r=ca(e,null,!0),n=ca(t,null,!0),i=r.compare(n);if(i===0)return null;let o=i>0,s=o?r:n,a=o?n:r,l=!!s.prerelease.length;if(!!a.prerelease.length&&!l){if(!a.patch&&!a.minor)return"major";if(a.compareMain(s)===0){if(a.minor&&!a.patch)return"minor";return"patch"}}let d=l?"pre":"";if(r.major!==n.major)return d+"major";if(r.minor!==n.minor)return d+"minor";if(r.patch!==n.patch)return d+"patch";return"prerelease"};ua.exports=Yb});var fa=m(function(dA,pa){var Gb=F(),zb=(e,t)=>new Gb(e,t).major;pa.exports=zb});var ma=m(function(pA,ga){var Wb=F(),Jb=(e,t)=>new Wb(e,t).minor;ga.exports=Jb});var ya=m(function(fA,ha){var Xb=F(),Qb=(e,t)=>new Xb(e,t).patch;ha.exports=Qb});var Ca=m(function(gA,ba){var Zb=fe(),eC=(e,t)=>{let r=Zb(e,t);return r&&r.prerelease.length?r.prerelease:null};ba.exports=eC});var K=m(function(mA,ka){var Sa=F(),tC=(e,t,r)=>new Sa(e,r).compare(new Sa(t,r));ka.exports=tC});var xa=m(function(hA,wa){var rC=K(),nC=(e,t,r)=>rC(t,e,r);wa.exports=nC});var Ra=m(function(yA,Ia){var iC=K(),oC=(e,t)=>iC(e,t,!0);Ia.exports=oC});var Sr=m(function(bA,va){var Aa=F(),sC=(e,t,r)=>{let n=new Aa(e,r),i=new Aa(t,r);return n.compare(i)||n.compareBuild(i)};va.exports=sC});var Ea=m(function(CA,Pa){var aC=Sr(),lC=(e,t)=>e.sort((r,n)=>aC(r,n,t));Pa.exports=lC});var Ta=m(function(SA,Na){var cC=Sr(),uC=(e,t)=>e.sort((r,n)=>cC(n,r,t));Na.exports=uC});var ct=m(function(kA,Oa){var dC=K(),pC=(e,t,r)=>dC(e,t,r)>0;Oa.exports=pC});var kr=m(function(wA,Da){var fC=K(),gC=(e,t,r)=>fC(e,t,r)<0;Da.exports=gC});var Qn=m(function(xA,La){var mC=K(),hC=(e,t,r)=>mC(e,t,r)===0;La.exports=hC});var Zn=m(function(IA,qa){var yC=K(),bC=(e,t,r)=>yC(e,t,r)!==0;qa.exports=bC});var wr=m(function(RA,_a){var CC=K(),SC=(e,t,r)=>CC(e,t,r)>=0;_a.exports=SC});var xr=m(function(AA,Fa){var kC=K(),wC=(e,t,r)=>kC(e,t,r)<=0;Fa.exports=wC});var ei=m(function(vA,Ma){var xC=Qn(),IC=Zn(),RC=ct(),AC=wr(),vC=kr(),PC=xr(),EC=(e,t,r,n)=>{switch(t){case"===":if(typeof e==="object")e=e.version;if(typeof r==="object")r=r.version;return e===r;case"!==":if(typeof e==="object")e=e.version;if(typeof r==="object")r=r.version;return e!==r;case"":case"=":case"==":return xC(e,r,n);case"!=":return IC(e,r,n);case">":return RC(e,r,n);case">=":return AC(e,r,n);case"<":return vC(e,r,n);case"<=":return PC(e,r,n);default:throw TypeError(`Invalid operator: ${t}`)}};Ma.exports=EC});var Ba=m(function(PA,$a){var NC=F(),TC=fe(),{safeRe:Ir,t:Rr}=qe(),OC=(e,t)=>{if(e instanceof NC)return e;if(typeof e==="number")e=String(e);if(typeof e!=="string")return null;t=t||{};let r=null;if(!t.rtl)r=e.match(t.includePrerelease?Ir[Rr.COERCEFULL]:Ir[Rr.COERCE]);else{let l=t.includePrerelease?Ir[Rr.COERCERTLFULL]:Ir[Rr.COERCERTL],c;while((c=l.exec(e))&&(!r||r.index+r[0].length!==e.length)){if(!r||c.index+c[0].length!==r.index+r[0].length)r=c;l.lastIndex=c.index+c[1].length+c[2].length}l.lastIndex=-1}if(r===null)return null;let n=r[2],i=r[3]||"0",o=r[4]||"0",s=t.includePrerelease&&r[5]?`-${r[5]}`:"",a=t.includePrerelease&&r[6]?`+${r[6]}`:"";return TC(`${n}.${i}.${o}${s}${a}`,t)};$a.exports=OC});var Ua=m(function(EA,Va){var DC=fe(),ja=Le(),LC=F(),qC=(e,t,r)=>{if(!ja.RELEASE_TYPES.includes(t))return null;let n=_C(e,r);return n&&FC(n,t)},_C=(e,t)=>{let r=e instanceof LC?e.version:e;return DC(r,t)},FC=(e,t)=>{if(MC(t))return e.version;switch(e.prerelease=[],t){case"major":e.minor=0,e.patch=0;break;case"minor":e.patch=0;break}return e.format()},MC=(e)=>e.startsWith("pre");Va.exports=qC});var Ya=m(function(NA,Ha){class Ka{constructor(){this.max=1000,this.map=new Map}get(e){let t=this.map.get(e);if(t===void 0)return;else return this.map.delete(e),this.map.set(e,t),t}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&t!==void 0){if(this.map.size>=this.max){let n=this.map.keys().next().value;this.delete(n)}this.map.set(e,t)}return this}}Ha.exports=Ka});var H=m(function(TA,Ja){var $C=/\s+/g;class ut{constructor(e,t){if(t=jC(t),e instanceof ut)if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;else return new ut(e.raw,t);if(e instanceof Ar)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().replace($C," "),this.set=this.raw.split("||").map((r)=>this.parseRange(r.trim())).filter((r)=>r.length),!this.set.length)throw TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let r=this.set[0];if(this.set=this.set.filter((n)=>!za(n[0])),this.set.length===0)this.set=[r];else if(this.set.length>1){for(let n of this.set)if(n.length===1&&JC(n[0])){this.set=[n];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let e=0;e<this.set.length;e++){if(e>0)this.formatted+="||";let t=this.set[e];for(let r=0;r<t.length;r++){if(r>0)this.formatted+=" ";this.formatted+=t[r].toString().trim()}}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){e=e.replace(WC,"");let r=((this.options.includePrerelease&&GC)|(this.options.loose&&zC))+":"+e,n=Ga.get(r);if(n)return n;let i=this.options.loose,o=i?B[M.HYPHENRANGELOOSE]:B[M.HYPHENRANGE];e=e.replace(o,aS(this.options.includePrerelease)),N("hyphen replace",e),e=e.replace(B[M.COMPARATORTRIM],KC),N("comparator trim",e),e=e.replace(B[M.TILDETRIM],HC),N("tilde trim",e),e=e.replace(B[M.CARETTRIM],YC),N("caret trim",e);let s=e.split(" ").map((d)=>XC(d,this.options)).join(" ").split(/\s+/).map((d)=>sS(d,this.options));if(i)s=s.filter((d)=>(N("loose invalid filter",d,this.options),!!d.match(B[M.COMPARATORLOOSE])));N("range list",s);let a=new Map,l=s.map((d)=>new Ar(d,this.options));for(let d of l){if(za(d))return[d];a.set(d.value,d)}if(a.size>1&&a.has(""))a.delete("");let c=[...a.values()];return Ga.set(r,c),c}intersects(e,t){if(!(e instanceof ut))throw TypeError("a Range is required");return this.set.some((r)=>Wa(r,t)&&e.set.some((n)=>Wa(n,t)&&r.every((i)=>n.every((o)=>i.intersects(o,t)))))}test(e){if(!e)return!1;if(typeof e==="string")try{e=new VC(e,this.options)}catch(t){return!1}for(let t=0;t<this.set.length;t++)if(lS(this.set[t],e,this.options))return!0;return!1}}Ja.exports=ut;var BC=Ya(),Ga=new BC,jC=mr(),Ar=dt(),N=lt(),VC=F(),{safeRe:B,src:UC,t:M,comparatorTrimReplace:KC,tildeTrimReplace:HC,caretTrimReplace:YC}=qe(),{FLAG_INCLUDE_PRERELEASE:GC,FLAG_LOOSE:zC}=Le(),WC=new RegExp(UC[M.BUILD],"g"),za=(e)=>e.value==="<0.0.0-0",JC=(e)=>e.value==="",Wa=(e,t)=>{let r=!0,n=e.slice(),i=n.pop();while(r&&n.length)r=n.every((o)=>i.intersects(o,t)),i=n.pop();return r},XC=(e,t)=>(e=e.replace(B[M.BUILD],""),N("comp",e,t),e=tS(e,t),N("caret",e),e=ZC(e,t),N("tildes",e),e=nS(e,t),N("xrange",e),e=oS(e,t),N("stars",e),e),_=(e)=>!e||e.toLowerCase()==="x"||e==="*",QC=(e,t,r)=>_(e)&&!_(t)||_(t)&&r&&!_(r),ZC=(e,t)=>e.trim().split(/\s+/).map((r)=>eS(r,t)).join(" "),eS=(e,t)=>{let r=t.loose?B[M.TILDELOOSE]:B[M.TILDE],n=t.includePrerelease?"-0":"";return e.replace(r,(i,o,s,a,l)=>{N("tilde",e,i,o,s,a,l);let c;if(_(o))c="";else if(_(s))c=`>=${o}.0.0${n} <${+o+1}.0.0-0`;else if(_(a))c=`>=${o}.${s}.0${n} <${o}.${+s+1}.0-0`;else if(l)N("replaceTilde pr",l),c=`>=${o}.${s}.${a}-${l} <${o}.${+s+1}.0-0`;else c=`>=${o}.${s}.${a} <${o}.${+s+1}.0-0`;return N("tilde return",c),c})},tS=(e,t)=>e.trim().split(/\s+/).map((r)=>rS(r,t)).join(" "),rS=(e,t)=>{N("caret",e,t);let r=t.loose?B[M.CARETLOOSE]:B[M.CARET],n=t.includePrerelease?"-0":"";return e.replace(r,(i,o,s,a,l)=>{N("caret",e,i,o,s,a,l);let c;if(_(o))c="";else if(_(s))c=`>=${o}.0.0${n} <${+o+1}.0.0-0`;else if(_(a))if(o==="0")c=`>=${o}.${s}.0${n} <${o}.${+s+1}.0-0`;else c=`>=${o}.${s}.0${n} <${+o+1}.0.0-0`;else if(l)if(N("replaceCaret pr",l),o==="0")if(s==="0")c=`>=${o}.${s}.${a}-${l} <${o}.${s}.${+a+1}-0`;else c=`>=${o}.${s}.${a}-${l} <${o}.${+s+1}.0-0`;else c=`>=${o}.${s}.${a}-${l} <${+o+1}.0.0-0`;else if(N("no pr"),o==="0")if(s==="0")c=`>=${o}.${s}.${a} <${o}.${s}.${+a+1}-0`;else c=`>=${o}.${s}.${a} <${o}.${+s+1}.0-0`;else c=`>=${o}.${s}.${a} <${+o+1}.0.0-0`;return N("caret return",c),c})},nS=(e,t)=>(N("replaceXRanges",e,t),e.split(/\s+/).map((r)=>iS(r,t)).join(" ")),iS=(e,t)=>{e=e.trim();let r=t.loose?B[M.XRANGELOOSE]:B[M.XRANGE];return e.replace(r,(n,i,o,s,a,l)=>{if(N("xRange",e,n,i,o,s,a,l),QC(o,s,a))return e;let c=_(o),d=c||_(s),u=d||_(a),p=u;if(i==="="&&p)i="";if(l=t.includePrerelease?"-0":"",c)if(i===">"||i==="<")n="<0.0.0-0";else n="*";else if(i&&p){if(d)s=0;if(a=0,i===">")if(i=">=",d)o=+o+1,s=0,a=0;else s=+s+1,a=0;else if(i==="<=")if(i="<",d)o=+o+1;else s=+s+1;if(i==="<")l="-0";n=`${i+o}.${s}.${a}${l}`}else if(d)n=`>=${o}.0.0${l} <${+o+1}.0.0-0`;else if(u)n=`>=${o}.${s}.0${l} <${o}.${+s+1}.0-0`;return N("xRange return",n),n})},oS=(e,t)=>(N("replaceStars",e,t),e.trim().replace(B[M.STAR],"")),sS=(e,t)=>(N("replaceGTE0",e,t),e.trim().replace(B[t.includePrerelease?M.GTE0PRE:M.GTE0],"")),aS=(e)=>(t,r,n,i,o,s,a,l,c,d,u,p)=>{if(_(n))r="";else if(_(i))r=`>=${n}.0.0${e?"-0":""}`;else if(_(o))r=`>=${n}.${i}.0${e?"-0":""}`;else if(s)r=`>=${r}`;else r=`>=${r}${e?"-0":""}`;if(_(c))l="";else if(_(d))l=`<${+c+1}.0.0-0`;else if(_(u))l=`<${c}.${+d+1}.0-0`;else if(p)l=`<=${c}.${d}.${u}-${p}`;else if(e)l=`<${c}.${d}.${+u+1}-0`;else l=`<=${l}`;return`${r} ${l}`.trim()},lS=(e,t,r)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(let n=0;n<e.length;n++){if(N(e[n].semver),e[n].semver===Ar.ANY)continue;if(e[n].semver.prerelease.length>0){let i=e[n].semver;if(i.major===t.major&&i.minor===t.minor&&i.patch===t.patch)return!0}}return!1}return!0}});var dt=m(function(OA,rl){var pt=Symbol("SemVer ANY");class vr{static get ANY(){return pt}constructor(e,t){if(t=Xa(t),e instanceof vr)if(e.loose===!!t.loose)return e;else e=e.value;if(e=e.trim().split(/\s+/).join(" "),ri("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===pt)this.value="";else this.value=this.operator+this.semver.version;ri("comp",this)}parse(e){let t=this.options.loose?Qa[Za.COMPARATORLOOSE]:Qa[Za.COMPARATOR],r=e.match(t);if(!r)throw TypeError(`Invalid comparator: ${e}`);if(this.operator=r[1]!==void 0?r[1]:"",this.operator==="=")this.operator="";if(!r[2])this.semver=pt;else this.semver=new el(r[2],this.options.loose)}toString(){return this.value}test(e){if(ri("Comparator.test",e,this.options.loose),this.semver===pt||e===pt)return!0;if(typeof e==="string")try{e=new el(e,this.options)}catch(t){return!1}return ti(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof vr))throw TypeError("a Comparator is required");if(this.operator===""){if(this.value==="")return!0;return new tl(e.value,t).test(this.value)}else if(e.operator===""){if(e.value==="")return!0;return new tl(this.value,t).test(e.semver)}if(t=Xa(t),t.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0"))return!1;if(!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0")))return!1;if(this.operator.startsWith(">")&&e.operator.startsWith(">"))return!0;if(this.operator.startsWith("<")&&e.operator.startsWith("<"))return!0;if(this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("="))return!0;if(ti(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))return!0;if(ti(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">"))return!0;return!1}}rl.exports=vr;var Xa=mr(),{safeRe:Qa,t:Za}=qe(),ti=ei(),ri=lt(),el=F(),tl=H()});var ft=m(function(DA,nl){var cS=H(),uS=(e,t,r)=>{try{t=new cS(t,r)}catch(n){return!1}return t.test(e)};nl.exports=uS});var ol=m(function(LA,il){var dS=H(),pS=(e,t)=>new dS(e,t).set.map((r)=>r.map((n)=>n.value).join(" ").trim().split(" "));il.exports=pS});var al=m(function(qA,sl){var fS=F(),gS=H(),mS=(e,t,r)=>{let n=null,i=null,o=null;try{o=new gS(t,r)}catch(s){return null}return e.forEach((s)=>{if(o.test(s)){if(!n||i.compare(s)===-1)n=s,i=new fS(n,r)}}),n};sl.exports=mS});var cl=m(function(_A,ll){var hS=F(),yS=H(),bS=(e,t,r)=>{let n=null,i=null,o=null;try{o=new yS(t,r)}catch(s){return null}return e.forEach((s)=>{if(o.test(s)){if(!n||i.compare(s)===1)n=s,i=new hS(n,r)}}),n};ll.exports=bS});var pl=m(function(FA,dl){var ni=F(),CS=H(),ul=ct(),SS=(e,t)=>{e=new CS(e,t);let r=new ni("0.0.0");if(e.test(r))return r;if(r=new ni("0.0.0-0"),e.test(r))return r;r=null;for(let n=0;n<e.set.length;++n){let i=e.set[n],o=null;if(i.forEach((s)=>{let a=new ni(s.semver.version);switch(s.operator){case">":if(a.prerelease.length===0)a.patch++;else a.prerelease.push(0);a.raw=a.format();case"":case">=":if(!o||ul(a,o))o=a;break;case"<":case"<=":break;default:throw Error(`Unexpected operation: ${s.operator}`)}}),o&&(!r||ul(r,o)))r=o}if(r&&e.test(r))return r;return null};dl.exports=SS});var gl=m(function(MA,fl){var kS=H(),wS=(e,t)=>{try{return new kS(e,t).range||"*"}catch(r){return null}};fl.exports=wS});var Pr=m(function($A,bl){var xS=F(),yl=dt(),{ANY:IS}=yl,RS=H(),AS=ft(),ml=ct(),hl=kr(),vS=xr(),PS=wr(),ES=(e,t,r,n)=>{e=new xS(e,n),t=new RS(t,n);let i,o,s,a,l;switch(r){case">":i=ml,o=vS,s=hl,a=">",l=">=";break;case"<":i=hl,o=PS,s=ml,a="<",l="<=";break;default:throw TypeError('Must provide a hilo val of "<" or ">"')}if(AS(e,t,n))return!1;for(let c=0;c<t.set.length;++c){let d=t.set[c],u=null,p=null;if(d.forEach((f)=>{if(f.semver===IS)f=new yl(">=0.0.0");if(u=u||f,p=p||f,i(f.semver,u.semver,n))u=f;else if(s(f.semver,p.semver,n))p=f}),u.operator===a||u.operator===l)return!1;if((!p.operator||p.operator===a)&&o(e,p.semver))return!1;else if(p.operator===l&&s(e,p.semver))return!1}return!0};bl.exports=ES});var Sl=m(function(BA,Cl){var NS=Pr(),TS=(e,t,r)=>NS(e,t,">",r);Cl.exports=TS});var wl=m(function(jA,kl){var OS=Pr(),DS=(e,t,r)=>OS(e,t,"<",r);kl.exports=DS});var Rl=m(function(VA,Il){var xl=H(),LS=(e,t,r)=>(e=new xl(e,r),t=new xl(t,r),e.intersects(t,r));Il.exports=LS});var vl=m(function(UA,Al){var qS=ft(),_S=K();Al.exports=(e,t,r)=>{let n=[],i=null,o=null,s=e.sort((d,u)=>_S(d,u,r));for(let d of s)if(qS(d,t,r)){if(o=d,!i)i=d}else{if(o)n.push([i,o]);o=null,i=null}if(i)n.push([i,null]);let a=[];for(let[d,u]of n)if(d===u)a.push(d);else if(!u&&d===s[0])a.push("*");else if(!u)a.push(`>=${d}`);else if(d===s[0])a.push(`<=${u}`);else a.push(`${d} - ${u}`);let l=a.join(" || "),c=typeof t.raw==="string"?t.raw:String(t);return l.length<c.length?l:t}});var Dl=m(function(KA,Ol){var Pl=H(),si=dt(),{ANY:ii}=si,oi=ft(),ai=K(),FS=(e,t,r={})=>{if(e===t)return!0;e=new Pl(e,r),t=new Pl(t,r);let n=!1;e:for(let i of e.set){for(let o of t.set){let s=$S(i,o,r);if(n=n||s!==null,s)continue e}if(n)return!1}return!0},MS=[new si(">=0.0.0-0")],El=[new si(">=0.0.0")],$S=(e,t,r)=>{if(e===t)return!0;if(e.length===1&&e[0].semver===ii)if(t.length===1&&t[0].semver===ii)return!0;else if(r.includePrerelease)e=MS;else e=El;if(t.length===1&&t[0].semver===ii)if(r.includePrerelease)return!0;else t=El;let n=new Set,i,o;for(let f of e)if(f.operator===">"||f.operator===">=")i=Nl(i,f,r);else if(f.operator==="<"||f.operator==="<=")o=Tl(o,f,r);else n.add(f.semver);if(n.size>1)return null;let s;if(i&&o){if(s=ai(i.semver,o.semver,r),s>0)return null;else if(s===0&&(i.operator!==">="||o.operator!=="<="))return null}for(let f of n){if(i&&!oi(f,String(i),r))return null;if(o&&!oi(f,String(o),r))return null;for(let y of t)if(!oi(f,String(y),r))return!1;return!0}let a,l,c,d,u=o&&!r.includePrerelease&&o.semver.prerelease.length?o.semver:!1,p=i&&!r.includePrerelease&&i.semver.prerelease.length?i.semver:!1;if(u&&u.prerelease.length===1&&o.operator==="<"&&u.prerelease[0]===0)u=!1;for(let f of t){if(d=d||f.operator===">"||f.operator===">=",c=c||f.operator==="<"||f.operator==="<=",i){if(p){if(f.semver.prerelease&&f.semver.prerelease.length&&f.semver.major===p.major&&f.semver.minor===p.minor&&f.semver.patch===p.patch)p=!1}if(f.operator===">"||f.operator===">="){if(a=Nl(i,f,r),a===f&&a!==i)return!1}else if(i.operator===">="&&!f.test(i.semver))return!1}if(o){if(u){if(f.semver.prerelease&&f.semver.prerelease.length&&f.semver.major===u.major&&f.semver.minor===u.minor&&f.semver.patch===u.patch)u=!1}if(f.operator==="<"||f.operator==="<="){if(l=Tl(o,f,r),l===f&&l!==o)return!1}else if(o.operator==="<="&&!f.test(o.semver))return!1}if(!f.operator&&(o||i)&&s!==0)return!1}if(i&&c&&!o&&s!==0)return!1;if(o&&d&&!i&&s!==0)return!1;if(p||u)return!1;return!0},Nl=(e,t,r)=>{if(!e)return t;let n=ai(e.semver,t.semver,r);return n>0?e:n<0?t:t.operator===">"&&e.operator===">="?t:e},Tl=(e,t,r)=>{if(!e)return t;let n=ai(e.semver,t.semver,r);return n<0?e:n>0?t:t.operator==="<"&&e.operator==="<="?t:e};Ol.exports=FS});var ql=m(function(HA,Ll){var _e=qe(),Er=Le(),BS=F(),Nr=Jn(),jS=fe(),VS=na(),US=oa(),KS=la(),HS=da(),YS=fa(),GS=ma(),zS=ya(),WS=Ca(),JS=K(),XS=xa(),QS=Ra(),ZS=Sr(),ek=Ea(),tk=Ta(),rk=ct(),nk=kr(),ik=Qn(),ok=Zn(),sk=wr(),ak=xr(),lk=ei(),ck=Ba(),uk=Ua(),dk=dt(),pk=H(),fk=ft(),gk=ol(),mk=al(),hk=cl(),yk=pl(),bk=gl(),Ck=Pr(),Sk=Sl(),kk=wl(),wk=Rl(),xk=vl(),Ik=Dl();Ll.exports={parse:jS,valid:VS,clean:US,inc:KS,diff:HS,major:YS,minor:GS,patch:zS,prerelease:WS,compare:JS,rcompare:XS,compareLoose:QS,compareBuild:ZS,sort:ek,rsort:tk,gt:rk,lt:nk,eq:ik,neq:ok,gte:sk,lte:ak,cmp:lk,coerce:ck,truncate:uk,Comparator:dk,Range:pk,satisfies:fk,toComparators:gk,maxSatisfying:mk,minSatisfying:hk,minVersion:yk,validRange:bk,outside:Ck,gtr:Sk,ltr:kk,intersects:wk,simplifyRange:xk,subset:Ik,SemVer:BS,re:_e.re,src:_e.src,tokens:_e.t,SEMVER_SPEC_VERSION:Er.SEMVER_SPEC_VERSION,RELEASE_TYPES:Er.RELEASE_TYPES,compareIdentifiers:Nr.compareIdentifiers,rcompareIdentifiers:Nr.rcompareIdentifiers}});var Tr=["contract","page-recipe","html-artifact","design-system"];var Ql={spec:["html","markdown","zip"],prototype:["html","zip"],deck:["html","pptx","zip"],poster:["html","zip"]},Pw=Array.from(new Set(Object.values(Ql).flat()));var Tw=Object.freeze([Object.freeze({name:"manifest",summary:"Describe query operations and list the derived resource index.",positionals:Object.freeze([]),options:Object.freeze([])}),Object.freeze({name:"search",summary:"Search resources with deterministic bilingual ranking and reasons.",positionals:Object.freeze([Object.freeze({name:"text",property:"text",type:"string",required:!1})]),options:Object.freeze([...[["function","functions"],["scenario","scenarios"],["unit","units"],["industry","industries"]].map(([e,t])=>Object.freeze({name:e,property:t,type:"string",multiple:!0,cliEncoding:"comma-separated"})),Object.freeze({name:"kind",property:"kinds",type:"resource-kind",multiple:!0,cliEncoding:"comma-separated"}),Object.freeze({name:"tag",property:"tags",type:"string",multiple:!0,cliEncoding:"comma-separated"}),Object.freeze({name:"category",property:"categories",type:"string",multiple:!0,cliEncoding:"comma-separated"}),Object.freeze({name:"capability",property:"capabilities",type:"string",multiple:!0,cliEncoding:"comma-separated"}),Object.freeze({name:"maturity",property:"maturities",type:"resource-maturity",multiple:!0,cliEncoding:"comma-separated"}),Object.freeze({name:"limit",property:"limit",type:"positive-integer"})])}),Object.freeze({name:"get",summary:"Resolve one canonical resource id or unambiguous alias.",positionals:Object.freeze([Object.freeze({name:"id-or-alias",property:"id",type:"string",required:!0})]),options:Object.freeze([])}),Object.freeze({name:"build",summary:"Plan dependency closure and gaps without writing or installing.",positionals:Object.freeze([Object.freeze({name:"root",property:"roots",type:"string",required:!0,variadic:!0})]),options:Object.freeze([])}),Object.freeze({name:"docs",summary:"Read curated public documentation for one resource.",positionals:Object.freeze([Object.freeze({name:"id-or-alias",property:"id",type:"string",required:!0})]),options:Object.freeze([{name:"locale",property:"locale",type:"string"},{name:"page",property:"page",type:"positive-integer"}])}),Object.freeze({name:"examples",summary:"Read one bounded page of examples and exact dependencies. Follow nextPage for complete source.",positionals:Object.freeze([Object.freeze({name:"id-or-alias",property:"id",type:"string",required:!0})]),options:Object.freeze([{name:"page",property:"page",type:"positive-integer"}])}),Object.freeze({name:"install-plan",summary:"Describe distribution channels and fixed snapshot identity/closure without installing or writing.",positionals:Object.freeze([Object.freeze({name:"id-or-alias",property:"id",type:"string",required:!0})]),options:Object.freeze([])})]);var Zl=["background","foreground","card","card-foreground","popover","popover-foreground","primary","primary-foreground","secondary","secondary-foreground","muted","muted-foreground","accent","accent-foreground","border","input","ring","destructive","destructive-foreground","success","success-foreground","warning","warning-foreground"],Lw=[...Zl,"radius","font-display","font-body","font-mono"];var fy=Tn(),gy=Ze(),my=mn(),Un=et(),hy=$e(),pe=P(),yy=ae(),by=O(),Cy=ce(),Sy=ue(),RR=er(),ky=Bn(),wy=jn(),xy=Vn(),ir=Cs(),Ss=Fe();var Iy=fy.Composer,Ry=gy.Document,Ay=my.Schema,{YAMLError:vy,YAMLParseError:Py,YAMLWarning:Ey}=Un,Ny=hy.Alias,{isAlias:Ty,isCollection:Oy,isDocument:Dy,isMap:Ly,isNode:qy,isPair:_y,isScalar:Fy,isSeq:My}=pe,$y=yy.Pair,By=by.Scalar,jy=Cy.YAMLMap,Vy=Sy.YAMLSeq;var Uy=ky.Lexer,Ky=wy.LineCounter,Hy=xy.Parser,{parse:Kn,parseAllDocuments:Yy,parseDocument:Gy,stringify:zy}=ir,{visit:Wy,visitAsync:Jy}=Ss;function or(e){let t=e.match(/^---\r?\n([\s\S]*?)\r?\n---\r?\n?([\s\S]*)$/);if(!t)return{meta:"",body:e.trim()};return{meta:(t[1]??"").trim(),body:(t[2]??"").trim()}}function Hn(e){let{meta:t}=or(e);if(!t)throw Error("SKILL.md is missing YAML frontmatter");let r=Kn(t);if(!r||typeof r!=="object")throw Error("SKILL.md frontmatter must be a YAML object");let n=T(r.id)??T(r.name);if(!n)throw Error("SKILL.md frontmatter must include a non-empty 'id' or 'name' field");let i=T(r.title)??T(r.name)??n,o=T(r.version)??"0.1.0",s=X(r.triggers);if(s.length===0)s.push(n,i);let a={id:n,title:i,version:o,triggers:s,tags:X(r.tags)},l=T(r.category);if(l)if(Tr.includes(l))a.category=l;else console.warn(`[skills] ${n}: unknown category "${l}" (expected ${Tr.join(" | ")}); ignoring`);if(Array.isArray(r.allowedCapabilities))a.allowedCapabilities=r.allowedCapabilities;if(Array.isArray(r.authors))a.authors=r.authors;let c=Qy(r);if(c)a.artifact=c;if(r.creationDesign!==void 0){let d=te(r.creationDesign),u=X(d?.formats),p=X(d?.lanes);if(!d||!Array.isArray(d.formats)||u.length!==d.formats.length||!Array.isArray(d.lanes)||p.length!==d.lanes.length||!u.length||!p.length||u.some((f)=>!["html","spec"].includes(f))||p.some((f)=>!["website","application","presentation"].includes(f)))throw Error("Invalid creationDesign formats or lanes");a.creationDesign={formats:u,lanes:p}}return a}function T(e){return typeof e==="string"&&e.trim()?e.trim():void 0}function X(e){return Array.isArray(e)?e.filter((t)=>typeof t==="string"&&t.trim().length>0):[]}function Xy(e){return typeof e==="number"&&Number.isFinite(e)?e:void 0}function st(e){return typeof e==="boolean"?e:void 0}function te(e){return e&&typeof e==="object"&&!Array.isArray(e)?e:void 0}function ks(e){if(!Array.isArray(e))return[];return e.map((t)=>{if(typeof t==="string")return t;let r=te(t);return r?T(r.name):void 0}).filter((t)=>Boolean(t))}function Qy(e){let t=te(e.artifact),r=te(e.od),n=t??r;if(!n)return;let i=te(n.preview),o=te(n.outputs),s=te(n.design_system)??te(n.designSystem),a=te(n.craft),l={},c=T(n.mode);if(c)l.mode=c;let d=T(n.surface);if(d)l.surface=d;let u=T(n.scenario);if(u)l.scenario=u;if(i)l.preview={...T(i.type)?{type:T(i.type)}:{},...T(i.entry)?{entry:T(i.entry)}:{},...T(i.reload)?{reload:T(i.reload)}:{}};if(o)l.outputs={...T(o.primary)?{primary:T(o.primary)}:{},...X(o.secondary).length>0?{secondary:X(o.secondary)}:{}};let p=st(n.designSystemRequired)??st(s?.requires);if(p!==void 0)l.designSystemRequired=p;let f=X(s?.sections);if(f.length>0)l.designSystemSections=f;let y=X(a?.requires);if(y.length>0)l.craftRequires=y;let g=ks(n.inputs);if(g.length>0)l.inputNames=g;let h=ks(n.parameters);if(h.length>0)l.parameterNames=h;let b=X(n.capabilities_required);if(b.length===0)b.push(...X(n.requiredCapabilities));if(b.length>0)l.requiredCapabilities=b;let k=st(n.speakerNotes)??st(n.speaker_notes);if(k!==void 0)l.speakerNotes=k;let w=st(n.animations);if(w!==void 0)l.animations=w;let I=T(n.examplePrompt)??T(n.example_prompt);if(I)l.examplePrompt=I;let A=T(n.upstream);if(A)l.upstream=A;let R=Xy(n.featured);if(R!==void 0)l.featured=R;return Object.keys(l).length>0?l:void 0}import{readFileSync as Zy}from"fs";class sr extends Error{filePath;constructor(e,t){super(e);this.filePath=t;this.name="SkillLoadError"}}function Yn(e){let t;try{t=Zy(e,"utf-8")}catch(r){throw new sr(`Failed to read file: ${r.message}`,e)}try{let{body:r}=or(t);return{frontmatter:Hn(t),body:r,filePath:e}}catch(r){throw new sr(`Failed to parse SKILL.md: ${r.message}`,e)}}class ar{skills=new Map;register(e){this.skills.set(e.frontmatter.id,e)}list(){return[...this.skills.values()]}get(e){return this.skills.get(e)}addAll(e){for(let t of e)this.register(t)}size(){return this.skills.size}}import{existsSync as ws,readdirSync as eb,statSync as tb}from"fs";import{join as Gn}from"path";function lr(e){let t=Gn(e,".uibot","skills");if(!ws(t))return[];let r=[],n;try{n=eb(t)}catch(i){return console.warn(`[skills] failed to read skills directory ${t}: ${i.message}`),[]}for(let i of n){let o=Gn(t,i);try{if(!tb(o).isDirectory())continue}catch{continue}let s=Gn(o,"SKILL.md");if(!ws(s)){console.warn(`[skills] no SKILL.md found in ${o}, skipping`);continue}try{r.push(Yn(s))}catch(a){console.warn(`[skills] skipping ${s}: ${a.message}`)}}return r}function rb(e,t){let r=lr(e);t.addAll(r)}import{createHash as nb}from"crypto";import{cpSync as cr,existsSync as De,mkdirSync as xs,readFileSync as Rs,readdirSync as As,statSync as vs,writeFileSync as ib}from"fs";import{fileURLToPath as ob}from"url";import{join as re}from"path";var Ps=ob(new URL("../content",import.meta.url)),Es=["skills","agents","craft"],sb="builtin-pack.json";function ab(e){return vs(e).isDirectory()?As(e).sort():[""]}function Is(e,t){let r=nb("sha256");for(let n of t){let i=n?re(e,n):e;if(!De(i))return null;r.update(`${n}\x00`).update(Rs(i))}return r.digest("hex")}function lb(e){try{let t=JSON.parse(Rs(e,"utf8"));return t.entries&&typeof t.entries==="object"?t.entries:{}}catch{return{}}}function cb(e,t=Ps,r={}){let n={seeded:[],kept:[],upgraded:[],modified:[],legacy:[],replaced:[]},i=new Set(r.replace??[]);if(!De(t))return n;let o=re(e,".uibot",sb),s=lb(o),a=!1;for(let l of Es){let c=re(t,l);if(!De(c))continue;let d=re(e,".uibot",l);for(let u of As(c).sort()){if(u.startsWith("."))continue;let p=re(c,u),f=re(d,u),y=`${l}/${u}`,g=vs(p).isDirectory(),h=ab(p),b=Is(p,h);if(!b)continue;if(!(g&&l==="skills"?De(re(f,"SKILL.md")):De(f))){xs(d,{recursive:!0}),cr(p,f,{recursive:g,force:!1,errorOnExist:!1}),s[y]=b,a=!0,n.seeded.push(y);continue}let w=Is(f,h);if(w===b){if(s[y]!==b)s[y]=b,a=!0;n.kept.push(y);continue}let I=s[y];if(i.has(y)||I===void 0&&i.has("legacy")){let R=g?re(f,"SKILL.md"):f;if(De(R))cr(R,`${R}.pre-upgrade`,{force:!0});cr(p,f,{recursive:g,force:!0}),s[y]=b,a=!0,n.replaced.push(y)}else if(I===void 0)n.legacy.push(y);else if(w===I)cr(p,f,{recursive:g,force:!0}),s[y]=b,a=!0,n.upgraded.push(y);else if(I!==b)n.modified.push(y);else n.kept.push(y)}}if(a)xs(re(e,".uibot"),{recursive:!0}),ib(o,`${JSON.stringify({version:1,entries:s},null,2)}
139
- `);return n}var ub=/[\u0080-\uffff]/;function db(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ns(e,t){let r=t.trim().toLowerCase();if(!r)return!1;if(ub.test(r))return e.includes(r);return new RegExp(`(?<![a-z0-9])${db(r)}(?![a-z0-9])`).test(e)}function ur(e,t){let r=t.toLowerCase(),n=0;for(let i of e.frontmatter.triggers)if(Ns(r,i))n+=1+Math.min(i.trim().length,12)/12;return n}function pb(e){return Math.ceil(e.length/4)}class dr{registry;constructor(e){this.registry=e}select(e){let{intent:t,tags:r,categories:n,maxTokens:i}=e,o=this.registry.list().filter((c)=>!e.creationDesign||c.frontmatter.creationDesign?.formats.includes(e.creationDesign.format)&&c.frontmatter.creationDesign.lanes.includes(e.creationDesign.lane)).map((c)=>({skill:c,score:ur(c,t)})).filter(({score:c})=>c>0||e.creationDesign).sort((c,d)=>d.score-c.score).map(({skill:c})=>c);if(r&&r.length>0){let c=new Set(r.map((d)=>d.toLowerCase()));o=o.filter((d)=>(d.frontmatter.tags??[]).some((p)=>c.has(p.toLowerCase())))}if(n&&n.length>0){let c=new Set(n);o=o.filter((d)=>d.frontmatter.category&&c.has(d.frontmatter.category))}let s=!1;if(o=o.filter((c)=>{if(c.frontmatter.category!=="html-artifact")return!0;if(s)return!1;return s=!0,!0}),i===void 0)return o;let a=[],l=0;for(let c of o){let d=pb(c.body);if(l+d>i)continue;a.push(c),l+=d}return a}score(e){return this.registry.list().map((t)=>({skill:t,score:ur(t,e)})).sort((t,r)=>r.score-t.score).map(({skill:t})=>t)}}import{appendFileSync as fb,existsSync as pr,mkdirSync as Ts,readFileSync as Os,writeFileSync as gb}from"fs";import{join as at}from"path";var mb="1.0.0";function fr(e,t){return at(e,".uibot","skills",t)}function Ds(e){return{skillId:e,version:mb,usageCount:0,successCount:0,failureCount:0,avgScore:0.5,lastUpdated:new Date().toISOString()}}class Ls{options;constructor(e){this.options=e}recordInvocation(e,t){let r=fr(this.options.rootDir,e);if(!pr(r))Ts(r,{recursive:!0});let n=at(r,"usage.jsonl");fb(n,JSON.stringify(t)+`
140
- `,"utf-8")}updateScoring(e,t){let r=fr(this.options.rootDir,e);if(!pr(r))Ts(r,{recursive:!0});let n=this.getScoring(e);if(n.usageCount+=1,t==="render-ok"||t==="user-thumb-up")n.successCount+=1;else n.failureCount+=1;n.avgScore=(n.successCount+1)/(n.usageCount+2),n.lastUpdated=new Date().toISOString();let i=at(r,"scoring.json");gb(i,JSON.stringify(n,null,2)+`
141
- `,"utf-8")}recentScores(e,t=30){let r=at(fr(this.options.rootDir,e),"usage.jsonl");if(!pr(r))return[];try{let n=Os(r,"utf-8").split(`
142
- `).filter(Boolean),i=[];for(let o of n.slice(-t))try{let s=JSON.parse(o);i.push(s.signal==="render-ok"||s.signal==="user-thumb-up"?1:0)}catch{}return i}catch{return[]}}getScoring(e){let t=at(fr(this.options.rootDir,e),"scoring.json");if(!pr(t))return Ds(e);try{let r=Os(t,"utf-8");return JSON.parse(r)}catch{return Ds(e)}}}import{appendFileSync as hb,existsSync as qs,mkdirSync as yb,readFileSync as bb}from"fs";import{join as Fs}from"path";function Ms(e,t){return Fs(e,".uibot","skills",t)}function _s(e,t){return Fs(Ms(e,t),"reflections.jsonl")}class $s{options;constructor(e){this.options=e}append(e){let t=Ms(this.options.rootDir,e.skillId);if(!qs(t))yb(t,{recursive:!0});hb(_s(this.options.rootDir,e.skillId),JSON.stringify(e)+`
143
- `,"utf-8")}list(e){let t=_s(this.options.rootDir,e);if(!qs(t))return[];try{return bb(t,"utf-8").split(`
144
- `).filter(Boolean).map((r)=>{try{return JSON.parse(r)}catch{return null}}).filter((r)=>r!==null)}catch{return[]}}recent(e,t=10){return this.list(e).slice(-t).reverse()}}import{appendFileSync as Cb,existsSync as Bs,mkdirSync as Sb,readFileSync as kb,writeFileSync as js}from"fs";import{join as Vs}from"path";function Us(e,t){return Vs(e,".uibot","skills",t)}function gr(e,t){return Vs(Us(e,t),"regressions.jsonl")}class Ks{options;constructor(e){this.options=e}append(e){let t=Us(this.options.rootDir,e.skillId);if(!Bs(t))Sb(t,{recursive:!0});Cb(gr(this.options.rootDir,e.skillId),JSON.stringify(e)+`
145
- `,"utf-8")}list(e){let t=gr(this.options.rootDir,e);if(!Bs(t))return[];try{return kb(t,"utf-8").split(`
146
- `).filter(Boolean).map((r)=>{try{return JSON.parse(r)}catch{return null}}).filter((r)=>r!==null)}catch{return[]}}active(e){return this.list(e).filter((t)=>t.status==="active")}markResolved(e,t,r){if(t.length===0)return;let n=this.list(e);if(n.length===0)return;let i=new Set(t),o=new Date().toISOString(),s=n.map((l)=>{if(i.has(l.id)&&l.status==="active")return{...l,status:"resolved",resolvedBy:r,resolvedAt:o};return l}),a=gr(this.options.rootDir,e);js(a,s.map((l)=>JSON.stringify(l)).join(`
138
+ `,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=rr(e),r=Ne(t);return r.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let t=rr(e),r=Ne(t);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,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((r)=>r.type==="newline"||r.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()}}}ey.Parser=ms});var Cs=m(function(cy){var hs=Tn(),ry=Ze(),ot=et(),ny=$r(),iy=P(),oy=jn(),ys=Vn();function bs(e){let t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new oy.LineCounter||null,prettyErrors:t}}function sy(e,t={}){let{lineCounter:r,prettyErrors:n}=bs(t),i=new ys.Parser(r?.addNewLine),o=new hs.Composer(t),s=Array.from(o.compose(i.parse(e)));if(n&&r)for(let a of s)a.errors.forEach(ot.prettifyError(e,r)),a.warnings.forEach(ot.prettifyError(e,r));if(s.length>0)return s;return Object.assign([],{empty:!0},o.streamInfo())}function Ss(e,t={}){let{lineCounter:r,prettyErrors:n}=bs(t),i=new ys.Parser(r?.addNewLine),o=new hs.Composer(t),s=null;for(let a of o.compose(i.parse(e),!0,e.length))if(!s)s=a;else if(s.options.logLevel!=="silent"){s.errors.push(new ot.YAMLParseError(a.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}if(n&&r)s.errors.forEach(ot.prettifyError(e,r)),s.warnings.forEach(ot.prettifyError(e,r));return s}function ay(e,t,r){let n=void 0;if(typeof t==="function")n=t;else if(r===void 0&&t&&typeof t==="object")r=t;let i=Ss(e,r);if(!i)return null;if(i.warnings.forEach((o)=>ny.warn(i.options.logLevel,o)),i.errors.length>0)if(i.options.logLevel!=="silent")throw i.errors[0];else i.errors=[];return i.toJS(Object.assign({reviver:n},r))}function ly(e,t,r){let n=null;if(typeof t==="function"||Array.isArray(t))n=t;else if(r===void 0&&t)r=t;if(typeof r==="string")r=r.length;if(typeof r==="number"){let i=Math.round(r);r=i<1?void 0:i>8?{indent:8}:{indent:i}}if(e===void 0){let{keepUndefined:i}=r??t??{};if(!i)return}if(iy.isDocument(e)&&!n)return e.toString(r);return new ry.Document(e,n,r).toString(r)}cy.parse=ay;cy.parseAllDocuments=sy;cy.parseDocument=Ss;cy.stringify=ly});var Le=m(function(bA,zs){var xb=Number.MAX_SAFE_INTEGER||9007199254740991,Ib=["major","premajor","minor","preminor","patch","prepatch","prerelease"];zs.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:xb,RELEASE_TYPES:Ib,SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var lt=m(function(SA,Gs){var vb=typeof process==="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};Gs.exports=vb});var qe=m(function(Q,Ys){var{MAX_SAFE_COMPONENT_LENGTH:Yn,MAX_SAFE_BUILD_LENGTH:Ab,MAX_LENGTH:Rb}=Le(),Pb=lt();Q=Ys.exports={};var Eb=Q.re=[],Ob=Q.safeRe=[],S=Q.src=[],Tb=Q.safeSrc=[],C=Q.t={},Nb=0,Wn="[a-zA-Z0-9-]",Db=[["\\s",1],["\\d",Rb],[Wn,Ab]],Lb=(e)=>{for(let[t,r]of Db)e=e.split(`${t}*`).join(`${t}{0,${r}}`).split(`${t}+`).join(`${t}{1,${r}}`);return e},R=(e,t,r)=>{let n=Lb(t),i=Nb++;Pb(e,i,t),C[e]=i,S[i]=t,Tb[i]=n,Eb[i]=new RegExp(t,r?"g":void 0),Ob[i]=new RegExp(n,r?"g":void 0)};R("NUMERICIDENTIFIER","0|[1-9]\\d*");R("NUMERICIDENTIFIERLOOSE","\\d+");R("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${Wn}*`);R("MAINVERSION",`(${S[C.NUMERICIDENTIFIER]})\\.(${S[C.NUMERICIDENTIFIER]})\\.(${S[C.NUMERICIDENTIFIER]})`);R("MAINVERSIONLOOSE",`(${S[C.NUMERICIDENTIFIERLOOSE]})\\.(${S[C.NUMERICIDENTIFIERLOOSE]})\\.(${S[C.NUMERICIDENTIFIERLOOSE]})`);R("PRERELEASEIDENTIFIER",`(?:${S[C.NONNUMERICIDENTIFIER]}|${S[C.NUMERICIDENTIFIER]})`);R("PRERELEASEIDENTIFIERLOOSE",`(?:${S[C.NONNUMERICIDENTIFIER]}|${S[C.NUMERICIDENTIFIERLOOSE]})`);R("PRERELEASE",`(?:-(${S[C.PRERELEASEIDENTIFIER]}(?:\\.${S[C.PRERELEASEIDENTIFIER]})*))`);R("PRERELEASELOOSE",`(?:-?(${S[C.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${S[C.PRERELEASEIDENTIFIERLOOSE]})*))`);R("BUILDIDENTIFIER",`${Wn}+`);R("BUILD",`(?:\\+(${S[C.BUILDIDENTIFIER]}(?:\\.${S[C.BUILDIDENTIFIER]})*))`);R("FULLPLAIN",`v?${S[C.MAINVERSION]}${S[C.PRERELEASE]}?${S[C.BUILD]}?`);R("FULL",`^${S[C.FULLPLAIN]}$`);R("LOOSEPLAIN",`[v=\\s]*${S[C.MAINVERSIONLOOSE]}${S[C.PRERELEASELOOSE]}?${S[C.BUILD]}?`);R("LOOSE",`^${S[C.LOOSEPLAIN]}$`);R("GTLT","((?:<|>)?=?)");R("XRANGEIDENTIFIERLOOSE",`${S[C.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);R("XRANGEIDENTIFIER",`${S[C.NUMERICIDENTIFIER]}|x|X|\\*`);R("XRANGEPLAIN",`[v=\\s]*(${S[C.XRANGEIDENTIFIER]})(?:\\.(${S[C.XRANGEIDENTIFIER]})(?:\\.(${S[C.XRANGEIDENTIFIER]})(?:${S[C.PRERELEASE]})?${S[C.BUILD]}?)?)?`);R("XRANGEPLAINLOOSE",`[v=\\s]*(${S[C.XRANGEIDENTIFIERLOOSE]})(?:\\.(${S[C.XRANGEIDENTIFIERLOOSE]})(?:\\.(${S[C.XRANGEIDENTIFIERLOOSE]})(?:${S[C.PRERELEASELOOSE]})?${S[C.BUILD]}?)?)?`);R("XRANGE",`^${S[C.GTLT]}\\s*${S[C.XRANGEPLAIN]}$`);R("XRANGELOOSE",`^${S[C.GTLT]}\\s*${S[C.XRANGEPLAINLOOSE]}$`);R("COERCEPLAIN",`(^|[^\\d])(\\d{1,${Yn}})(?:\\.(\\d{1,${Yn}}))?(?:\\.(\\d{1,${Yn}}))?`);R("COERCE",`${S[C.COERCEPLAIN]}(?:$|[^\\d])`);R("COERCEFULL",S[C.COERCEPLAIN]+`(?:${S[C.PRERELEASE]})?(?:${S[C.BUILD]})?(?:$|[^\\d])`);R("COERCERTL",S[C.COERCE],!0);R("COERCERTLFULL",S[C.COERCEFULL],!0);R("LONETILDE","(?:~>?)");R("TILDETRIM",`(\\s*)${S[C.LONETILDE]}\\s+`,!0);Q.tildeTrimReplace="$1~";R("TILDE",`^${S[C.LONETILDE]}${S[C.XRANGEPLAIN]}$`);R("TILDELOOSE",`^${S[C.LONETILDE]}${S[C.XRANGEPLAINLOOSE]}$`);R("LONECARET","(?:\\^)");R("CARETTRIM",`(\\s*)${S[C.LONECARET]}\\s+`,!0);Q.caretTrimReplace="$1^";R("CARET",`^${S[C.LONECARET]}${S[C.XRANGEPLAIN]}$`);R("CARETLOOSE",`^${S[C.LONECARET]}${S[C.XRANGEPLAINLOOSE]}$`);R("COMPARATORLOOSE",`^${S[C.GTLT]}\\s*(${S[C.LOOSEPLAIN]})$|^$`);R("COMPARATOR",`^${S[C.GTLT]}\\s*(${S[C.FULLPLAIN]})$|^$`);R("COMPARATORTRIM",`(\\s*)${S[C.GTLT]}\\s*(${S[C.LOOSEPLAIN]}|${S[C.XRANGEPLAIN]})`,!0);Q.comparatorTrimReplace="$1$2$3";R("HYPHENRANGE",`^\\s*(${S[C.XRANGEPLAIN]})\\s+-\\s+(${S[C.XRANGEPLAIN]})\\s*$`);R("HYPHENRANGELOOSE",`^\\s*(${S[C.XRANGEPLAINLOOSE]})\\s+-\\s+(${S[C.XRANGEPLAINLOOSE]})\\s*$`);R("STAR","(<|>)?=?\\s*\\*");R("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");R("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var mr=m(function(CA,Ws){var qb=Object.freeze({loose:!0}),_b=Object.freeze({}),Fb=(e)=>{if(!e)return _b;if(typeof e!=="object")return qb;return e};Ws.exports=Fb});var Jn=m(function(kA,Qs){var Js=/^[0-9]+$/,Xs=(e,t)=>{if(typeof e==="number"&&typeof t==="number")return e===t?0:e<t?-1:1;let r=Js.test(e),n=Js.test(t);if(r&&n)e=+e,t=+t;return e===t?0:r&&!n?-1:n&&!r?1:e<t?-1:1},Mb=(e,t)=>Xs(t,e);Qs.exports={compareIdentifiers:Xs,rcompareIdentifiers:Mb}});var F=m(function(wA,ea){var hr=lt(),{MAX_LENGTH:Zs,MAX_SAFE_INTEGER:yr}=Le(),{safeRe:br,t:Sr}=qe(),Bb=mr(),{compareIdentifiers:Xn}=Jn(),$b=(e,t)=>{let r=t.split(".");if(r.length>e.length)return!1;for(let n=0;n<r.length;n++)if(Xn(e[n],r[n])!==0)return!1;return!0};class Y{constructor(e,t){if(t=Bb(t),e instanceof Y)if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;else e=e.version;else if(typeof e!=="string")throw TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>Zs)throw TypeError(`version is longer than ${Zs} characters`);hr("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;let r=e.trim().match(t.loose?br[Sr.LOOSE]:br[Sr.FULL]);if(!r)throw TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>yr||this.major<0)throw TypeError("Invalid major version");if(this.minor>yr||this.minor<0)throw TypeError("Invalid minor version");if(this.patch>yr||this.patch<0)throw TypeError("Invalid patch version");if(!r[4])this.prerelease=[];else this.prerelease=r[4].split(".").map((n)=>{if(/^[0-9]+$/.test(n)){let i=+n;if(i>=0&&i<yr)return i}return n});this.build=r[5]?r[5].split("."):[],this.format()}format(){if(this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length)this.version+=`-${this.prerelease.join(".")}`;return this.version}toString(){return this.version}compare(e){if(hr("SemVer.compare",this.version,this.options,e),!(e instanceof Y)){if(typeof e==="string"&&e===this.version)return 0;e=new Y(e,this.options)}if(e.version===this.version)return 0;return this.compareMain(e)||this.comparePre(e)}compareMain(e){if(!(e instanceof Y))e=new Y(e,this.options);if(this.major<e.major)return-1;if(this.major>e.major)return 1;if(this.minor<e.minor)return-1;if(this.minor>e.minor)return 1;if(this.patch<e.patch)return-1;if(this.patch>e.patch)return 1;return 0}comparePre(e){if(!(e instanceof Y))e=new Y(e,this.options);if(this.prerelease.length&&!e.prerelease.length)return-1;else if(!this.prerelease.length&&e.prerelease.length)return 1;else if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{let r=this.prerelease[t],n=e.prerelease[t];if(hr("prerelease compare",t,r,n),r===void 0&&n===void 0)return 0;else if(n===void 0)return 1;else if(r===void 0)return-1;else if(r===n)continue;else return Xn(r,n)}while(++t)}compareBuild(e){if(!(e instanceof Y))e=new Y(e,this.options);let t=0;do{let r=this.build[t],n=e.build[t];if(hr("build compare",t,r,n),r===void 0&&n===void 0)return 0;else if(n===void 0)return 1;else if(r===void 0)return-1;else if(r===n)continue;else return Xn(r,n)}while(++t)}inc(e,t,r){if(e.startsWith("pre")){if(!t&&r===!1)throw Error("invalid increment argument: identifier is empty");if(t){let n=`-${t}`.match(this.options.loose?br[Sr.PRERELEASELOOSE]:br[Sr.PRERELEASE]);if(!n||n[1]!==t)throw Error(`invalid identifier: ${t}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,r),this.inc("pre",t,r);break;case"prerelease":if(this.prerelease.length===0)this.inc("patch",t,r);this.inc("pre",t,r);break;case"release":if(this.prerelease.length===0)throw Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":if(this.minor!==0||this.patch!==0||this.prerelease.length===0)this.major++;this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":if(this.patch!==0||this.prerelease.length===0)this.minor++;this.patch=0,this.prerelease=[];break;case"patch":if(this.prerelease.length===0)this.patch++;this.prerelease=[];break;case"pre":{let n=Number(r)?1:0;if(this.prerelease.length===0)this.prerelease=[n];else{let i=this.prerelease.length;while(--i>=0)if(typeof this.prerelease[i]==="number")this.prerelease[i]++,i=-2;if(i===-1){if(t===this.prerelease.join(".")&&r===!1)throw Error("invalid increment argument: identifier already exists");this.prerelease.push(n)}}if(t){let i=[t,n];if(r===!1)i=[t];if($b(this.prerelease,t)){let o=this.prerelease[t.split(".").length];if(isNaN(o))this.prerelease=i}else this.prerelease=i}break}default:throw Error(`invalid increment argument: ${e}`)}if(this.raw=this.format(),this.build.length)this.raw+=`+${this.build.join(".")}`;return this}}ea.exports=Y});var fe=m(function(xA,ra){var ta=F(),jb=(e,t,r=!1)=>{if(e instanceof ta)return e;try{return new ta(e,t)}catch(n){if(!r)return null;throw n}};ra.exports=jb});var ia=m(function(IA,na){var Vb=fe(),Ub=(e,t)=>{let r=Vb(e,t);return r?r.version:null};na.exports=Ub});var sa=m(function(vA,oa){var Kb=fe(),Hb=(e,t)=>{let r=Kb(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null};oa.exports=Hb});var ca=m(function(AA,la){var aa=F(),zb=(e,t,r,n,i)=>{if(typeof r==="string")i=n,n=r,r=void 0;try{return new aa(e instanceof aa?e.version:e,r).inc(t,n,i).version}catch(o){return null}};la.exports=zb});var pa=m(function(RA,da){var ua=fe(),Gb=(e,t)=>{let r=ua(e,null,!0),n=ua(t,null,!0),i=r.compare(n);if(i===0)return null;let o=i>0,s=o?r:n,a=o?n:r,l=!!s.prerelease.length;if(!!a.prerelease.length&&!l){if(!a.patch&&!a.minor)return"major";if(a.compareMain(s)===0){if(a.minor&&!a.patch)return"minor";return"patch"}}let d=l?"pre":"";if(r.major!==n.major)return d+"major";if(r.minor!==n.minor)return d+"minor";if(r.patch!==n.patch)return d+"patch";return"prerelease"};da.exports=Gb});var ga=m(function(PA,fa){var Yb=F(),Wb=(e,t)=>new Yb(e,t).major;fa.exports=Wb});var ha=m(function(EA,ma){var Jb=F(),Xb=(e,t)=>new Jb(e,t).minor;ma.exports=Xb});var ba=m(function(OA,ya){var Qb=F(),Zb=(e,t)=>new Qb(e,t).patch;ya.exports=Zb});var Ca=m(function(TA,Sa){var eS=fe(),tS=(e,t)=>{let r=eS(e,t);return r&&r.prerelease.length?r.prerelease:null};Sa.exports=tS});var K=m(function(NA,wa){var ka=F(),rS=(e,t,r)=>new ka(e,r).compare(new ka(t,r));wa.exports=rS});var Ia=m(function(DA,xa){var nS=K(),iS=(e,t,r)=>nS(t,e,r);xa.exports=iS});var Aa=m(function(LA,va){var oS=K(),sS=(e,t)=>oS(e,t,!0);va.exports=sS});var Cr=m(function(qA,Pa){var Ra=F(),aS=(e,t,r)=>{let n=new Ra(e,r),i=new Ra(t,r);return n.compare(i)||n.compareBuild(i)};Pa.exports=aS});var Oa=m(function(_A,Ea){var lS=Cr(),cS=(e,t)=>e.sort((r,n)=>lS(r,n,t));Ea.exports=cS});var Na=m(function(FA,Ta){var uS=Cr(),dS=(e,t)=>e.sort((r,n)=>uS(n,r,t));Ta.exports=dS});var ct=m(function(MA,Da){var pS=K(),fS=(e,t,r)=>pS(e,t,r)>0;Da.exports=fS});var kr=m(function(BA,La){var gS=K(),mS=(e,t,r)=>gS(e,t,r)<0;La.exports=mS});var Qn=m(function($A,qa){var hS=K(),yS=(e,t,r)=>hS(e,t,r)===0;qa.exports=yS});var Zn=m(function(jA,_a){var bS=K(),SS=(e,t,r)=>bS(e,t,r)!==0;_a.exports=SS});var wr=m(function(VA,Fa){var CS=K(),kS=(e,t,r)=>CS(e,t,r)>=0;Fa.exports=kS});var xr=m(function(UA,Ma){var wS=K(),xS=(e,t,r)=>wS(e,t,r)<=0;Ma.exports=xS});var ei=m(function(KA,Ba){var IS=Qn(),vS=Zn(),AS=ct(),RS=wr(),PS=kr(),ES=xr(),OS=(e,t,r,n)=>{switch(t){case"===":if(typeof e==="object")e=e.version;if(typeof r==="object")r=r.version;return e===r;case"!==":if(typeof e==="object")e=e.version;if(typeof r==="object")r=r.version;return e!==r;case"":case"=":case"==":return IS(e,r,n);case"!=":return vS(e,r,n);case">":return AS(e,r,n);case">=":return RS(e,r,n);case"<":return PS(e,r,n);case"<=":return ES(e,r,n);default:throw TypeError(`Invalid operator: ${t}`)}};Ba.exports=OS});var ja=m(function(HA,$a){var TS=F(),NS=fe(),{safeRe:Ir,t:vr}=qe(),DS=(e,t)=>{if(e instanceof TS)return e;if(typeof e==="number")e=String(e);if(typeof e!=="string")return null;t=t||{};let r=null;if(!t.rtl)r=e.match(t.includePrerelease?Ir[vr.COERCEFULL]:Ir[vr.COERCE]);else{let l=t.includePrerelease?Ir[vr.COERCERTLFULL]:Ir[vr.COERCERTL],c;while((c=l.exec(e))&&(!r||r.index+r[0].length!==e.length)){if(!r||c.index+c[0].length!==r.index+r[0].length)r=c;l.lastIndex=c.index+c[1].length+c[2].length}l.lastIndex=-1}if(r===null)return null;let n=r[2],i=r[3]||"0",o=r[4]||"0",s=t.includePrerelease&&r[5]?`-${r[5]}`:"",a=t.includePrerelease&&r[6]?`+${r[6]}`:"";return NS(`${n}.${i}.${o}${s}${a}`,t)};$a.exports=DS});var Ka=m(function(zA,Ua){var LS=fe(),Va=Le(),qS=F(),_S=(e,t,r)=>{if(!Va.RELEASE_TYPES.includes(t))return null;let n=FS(e,r);return n&&MS(n,t)},FS=(e,t)=>{let r=e instanceof qS?e.version:e;return LS(r,t)},MS=(e,t)=>{if(BS(t))return e.version;switch(e.prerelease=[],t){case"major":e.minor=0,e.patch=0;break;case"minor":e.patch=0;break}return e.format()},BS=(e)=>e.startsWith("pre");Ua.exports=_S});var Ga=m(function(GA,za){class Ha{constructor(){this.max=1000,this.map=new Map}get(e){let t=this.map.get(e);if(t===void 0)return;else return this.map.delete(e),this.map.set(e,t),t}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&t!==void 0){if(this.map.size>=this.max){let n=this.map.keys().next().value;this.delete(n)}this.map.set(e,t)}return this}}za.exports=Ha});var H=m(function(YA,Xa){var $S=/\s+/g;class ut{constructor(e,t){if(t=VS(t),e instanceof ut)if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;else return new ut(e.raw,t);if(e instanceof Ar)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().replace($S," "),this.set=this.raw.split("||").map((r)=>this.parseRange(r.trim())).filter((r)=>r.length),!this.set.length)throw TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let r=this.set[0];if(this.set=this.set.filter((n)=>!Wa(n[0])),this.set.length===0)this.set=[r];else if(this.set.length>1){for(let n of this.set)if(n.length===1&&XS(n[0])){this.set=[n];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let e=0;e<this.set.length;e++){if(e>0)this.formatted+="||";let t=this.set[e];for(let r=0;r<t.length;r++){if(r>0)this.formatted+=" ";this.formatted+=t[r].toString().trim()}}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){e=e.replace(JS,"");let r=((this.options.includePrerelease&&YS)|(this.options.loose&&WS))+":"+e,n=Ya.get(r);if(n)return n;let i=this.options.loose,o=i?B[M.HYPHENRANGELOOSE]:B[M.HYPHENRANGE];e=e.replace(o,lC(this.options.includePrerelease)),O("hyphen replace",e),e=e.replace(B[M.COMPARATORTRIM],HS),O("comparator trim",e),e=e.replace(B[M.TILDETRIM],zS),O("tilde trim",e),e=e.replace(B[M.CARETTRIM],GS),O("caret trim",e);let s=e.split(" ").map((d)=>QS(d,this.options)).join(" ").split(/\s+/).map((d)=>aC(d,this.options));if(i)s=s.filter((d)=>(O("loose invalid filter",d,this.options),!!d.match(B[M.COMPARATORLOOSE])));O("range list",s);let a=new Map,l=s.map((d)=>new Ar(d,this.options));for(let d of l){if(Wa(d))return[d];a.set(d.value,d)}if(a.size>1&&a.has(""))a.delete("");let c=[...a.values()];return Ya.set(r,c),c}intersects(e,t){if(!(e instanceof ut))throw TypeError("a Range is required");return this.set.some((r)=>Ja(r,t)&&e.set.some((n)=>Ja(n,t)&&r.every((i)=>n.every((o)=>i.intersects(o,t)))))}test(e){if(!e)return!1;if(typeof e==="string")try{e=new US(e,this.options)}catch(t){return!1}for(let t=0;t<this.set.length;t++)if(cC(this.set[t],e,this.options))return!0;return!1}}Xa.exports=ut;var jS=Ga(),Ya=new jS,VS=mr(),Ar=dt(),O=lt(),US=F(),{safeRe:B,src:KS,t:M,comparatorTrimReplace:HS,tildeTrimReplace:zS,caretTrimReplace:GS}=qe(),{FLAG_INCLUDE_PRERELEASE:YS,FLAG_LOOSE:WS}=Le(),JS=new RegExp(KS[M.BUILD],"g"),Wa=(e)=>e.value==="<0.0.0-0",XS=(e)=>e.value==="",Ja=(e,t)=>{let r=!0,n=e.slice(),i=n.pop();while(r&&n.length)r=n.every((o)=>i.intersects(o,t)),i=n.pop();return r},QS=(e,t)=>(e=e.replace(B[M.BUILD],""),O("comp",e,t),e=rC(e,t),O("caret",e),e=eC(e,t),O("tildes",e),e=iC(e,t),O("xrange",e),e=sC(e,t),O("stars",e),e),_=(e)=>!e||e.toLowerCase()==="x"||e==="*",ZS=(e,t,r)=>_(e)&&!_(t)||_(t)&&r&&!_(r),eC=(e,t)=>e.trim().split(/\s+/).map((r)=>tC(r,t)).join(" "),tC=(e,t)=>{let r=t.loose?B[M.TILDELOOSE]:B[M.TILDE],n=t.includePrerelease?"-0":"";return e.replace(r,(i,o,s,a,l)=>{O("tilde",e,i,o,s,a,l);let c;if(_(o))c="";else if(_(s))c=`>=${o}.0.0${n} <${+o+1}.0.0-0`;else if(_(a))c=`>=${o}.${s}.0${n} <${o}.${+s+1}.0-0`;else if(l)O("replaceTilde pr",l),c=`>=${o}.${s}.${a}-${l} <${o}.${+s+1}.0-0`;else c=`>=${o}.${s}.${a} <${o}.${+s+1}.0-0`;return O("tilde return",c),c})},rC=(e,t)=>e.trim().split(/\s+/).map((r)=>nC(r,t)).join(" "),nC=(e,t)=>{O("caret",e,t);let r=t.loose?B[M.CARETLOOSE]:B[M.CARET],n=t.includePrerelease?"-0":"";return e.replace(r,(i,o,s,a,l)=>{O("caret",e,i,o,s,a,l);let c;if(_(o))c="";else if(_(s))c=`>=${o}.0.0${n} <${+o+1}.0.0-0`;else if(_(a))if(o==="0")c=`>=${o}.${s}.0${n} <${o}.${+s+1}.0-0`;else c=`>=${o}.${s}.0${n} <${+o+1}.0.0-0`;else if(l)if(O("replaceCaret pr",l),o==="0")if(s==="0")c=`>=${o}.${s}.${a}-${l} <${o}.${s}.${+a+1}-0`;else c=`>=${o}.${s}.${a}-${l} <${o}.${+s+1}.0-0`;else c=`>=${o}.${s}.${a}-${l} <${+o+1}.0.0-0`;else if(O("no pr"),o==="0")if(s==="0")c=`>=${o}.${s}.${a} <${o}.${s}.${+a+1}-0`;else c=`>=${o}.${s}.${a} <${o}.${+s+1}.0-0`;else c=`>=${o}.${s}.${a} <${+o+1}.0.0-0`;return O("caret return",c),c})},iC=(e,t)=>(O("replaceXRanges",e,t),e.split(/\s+/).map((r)=>oC(r,t)).join(" ")),oC=(e,t)=>{e=e.trim();let r=t.loose?B[M.XRANGELOOSE]:B[M.XRANGE];return e.replace(r,(n,i,o,s,a,l)=>{if(O("xRange",e,n,i,o,s,a,l),ZS(o,s,a))return e;let c=_(o),d=c||_(s),u=d||_(a),p=u;if(i==="="&&p)i="";if(l=t.includePrerelease?"-0":"",c)if(i===">"||i==="<")n="<0.0.0-0";else n="*";else if(i&&p){if(d)s=0;if(a=0,i===">")if(i=">=",d)o=+o+1,s=0,a=0;else s=+s+1,a=0;else if(i==="<=")if(i="<",d)o=+o+1;else s=+s+1;if(i==="<")l="-0";n=`${i+o}.${s}.${a}${l}`}else if(d)n=`>=${o}.0.0${l} <${+o+1}.0.0-0`;else if(u)n=`>=${o}.${s}.0${l} <${o}.${+s+1}.0-0`;return O("xRange return",n),n})},sC=(e,t)=>(O("replaceStars",e,t),e.trim().replace(B[M.STAR],"")),aC=(e,t)=>(O("replaceGTE0",e,t),e.trim().replace(B[t.includePrerelease?M.GTE0PRE:M.GTE0],"")),lC=(e)=>(t,r,n,i,o,s,a,l,c,d,u,p)=>{if(_(n))r="";else if(_(i))r=`>=${n}.0.0${e?"-0":""}`;else if(_(o))r=`>=${n}.${i}.0${e?"-0":""}`;else if(s)r=`>=${r}`;else r=`>=${r}${e?"-0":""}`;if(_(c))l="";else if(_(d))l=`<${+c+1}.0.0-0`;else if(_(u))l=`<${c}.${+d+1}.0-0`;else if(p)l=`<=${c}.${d}.${u}-${p}`;else if(e)l=`<${c}.${d}.${+u+1}-0`;else l=`<=${l}`;return`${r} ${l}`.trim()},cC=(e,t,r)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(let n=0;n<e.length;n++){if(O(e[n].semver),e[n].semver===Ar.ANY)continue;if(e[n].semver.prerelease.length>0){let i=e[n].semver;if(i.major===t.major&&i.minor===t.minor&&i.patch===t.patch)return!0}}return!1}return!0}});var dt=m(function(WA,nl){var pt=Symbol("SemVer ANY");class Rr{static get ANY(){return pt}constructor(e,t){if(t=Qa(t),e instanceof Rr)if(e.loose===!!t.loose)return e;else e=e.value;if(e=e.trim().split(/\s+/).join(" "),ri("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===pt)this.value="";else this.value=this.operator+this.semver.version;ri("comp",this)}parse(e){let t=this.options.loose?Za[el.COMPARATORLOOSE]:Za[el.COMPARATOR],r=e.match(t);if(!r)throw TypeError(`Invalid comparator: ${e}`);if(this.operator=r[1]!==void 0?r[1]:"",this.operator==="=")this.operator="";if(!r[2])this.semver=pt;else this.semver=new tl(r[2],this.options.loose)}toString(){return this.value}test(e){if(ri("Comparator.test",e,this.options.loose),this.semver===pt||e===pt)return!0;if(typeof e==="string")try{e=new tl(e,this.options)}catch(t){return!1}return ti(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof Rr))throw TypeError("a Comparator is required");if(this.operator===""){if(this.value==="")return!0;return new rl(e.value,t).test(this.value)}else if(e.operator===""){if(e.value==="")return!0;return new rl(this.value,t).test(e.semver)}if(t=Qa(t),t.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0"))return!1;if(!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0")))return!1;if(this.operator.startsWith(">")&&e.operator.startsWith(">"))return!0;if(this.operator.startsWith("<")&&e.operator.startsWith("<"))return!0;if(this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("="))return!0;if(ti(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))return!0;if(ti(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">"))return!0;return!1}}nl.exports=Rr;var Qa=mr(),{safeRe:Za,t:el}=qe(),ti=ei(),ri=lt(),tl=F(),rl=H()});var ft=m(function(JA,il){var uC=H(),dC=(e,t,r)=>{try{t=new uC(t,r)}catch(n){return!1}return t.test(e)};il.exports=dC});var sl=m(function(XA,ol){var pC=H(),fC=(e,t)=>new pC(e,t).set.map((r)=>r.map((n)=>n.value).join(" ").trim().split(" "));ol.exports=fC});var ll=m(function(QA,al){var gC=F(),mC=H(),hC=(e,t,r)=>{let n=null,i=null,o=null;try{o=new mC(t,r)}catch(s){return null}return e.forEach((s)=>{if(o.test(s)){if(!n||i.compare(s)===-1)n=s,i=new gC(n,r)}}),n};al.exports=hC});var ul=m(function(ZA,cl){var yC=F(),bC=H(),SC=(e,t,r)=>{let n=null,i=null,o=null;try{o=new bC(t,r)}catch(s){return null}return e.forEach((s)=>{if(o.test(s)){if(!n||i.compare(s)===1)n=s,i=new yC(n,r)}}),n};cl.exports=SC});var fl=m(function(eR,pl){var ni=F(),CC=H(),dl=ct(),kC=(e,t)=>{e=new CC(e,t);let r=new ni("0.0.0");if(e.test(r))return r;if(r=new ni("0.0.0-0"),e.test(r))return r;r=null;for(let n=0;n<e.set.length;++n){let i=e.set[n],o=null;if(i.forEach((s)=>{let a=new ni(s.semver.version);switch(s.operator){case">":if(a.prerelease.length===0)a.patch++;else a.prerelease.push(0);a.raw=a.format();case"":case">=":if(!o||dl(a,o))o=a;break;case"<":case"<=":break;default:throw Error(`Unexpected operation: ${s.operator}`)}}),o&&(!r||dl(r,o)))r=o}if(r&&e.test(r))return r;return null};pl.exports=kC});var ml=m(function(tR,gl){var wC=H(),xC=(e,t)=>{try{return new wC(e,t).range||"*"}catch(r){return null}};gl.exports=xC});var Pr=m(function(rR,Sl){var IC=F(),bl=dt(),{ANY:vC}=bl,AC=H(),RC=ft(),hl=ct(),yl=kr(),PC=xr(),EC=wr(),OC=(e,t,r,n)=>{e=new IC(e,n),t=new AC(t,n);let i,o,s,a,l;switch(r){case">":i=hl,o=PC,s=yl,a=">",l=">=";break;case"<":i=yl,o=EC,s=hl,a="<",l="<=";break;default:throw TypeError('Must provide a hilo val of "<" or ">"')}if(RC(e,t,n))return!1;for(let c=0;c<t.set.length;++c){let d=t.set[c],u=null,p=null;if(d.forEach((f)=>{if(f.semver===vC)f=new bl(">=0.0.0");if(u=u||f,p=p||f,i(f.semver,u.semver,n))u=f;else if(s(f.semver,p.semver,n))p=f}),u.operator===a||u.operator===l)return!1;if((!p.operator||p.operator===a)&&o(e,p.semver))return!1;else if(p.operator===l&&s(e,p.semver))return!1}return!0};Sl.exports=OC});var kl=m(function(nR,Cl){var TC=Pr(),NC=(e,t,r)=>TC(e,t,">",r);Cl.exports=NC});var xl=m(function(iR,wl){var DC=Pr(),LC=(e,t,r)=>DC(e,t,"<",r);wl.exports=LC});var Al=m(function(oR,vl){var Il=H(),qC=(e,t,r)=>(e=new Il(e,r),t=new Il(t,r),e.intersects(t,r));vl.exports=qC});var Pl=m(function(sR,Rl){var _C=ft(),FC=K();Rl.exports=(e,t,r)=>{let n=[],i=null,o=null,s=e.sort((d,u)=>FC(d,u,r));for(let d of s)if(_C(d,t,r)){if(o=d,!i)i=d}else{if(o)n.push([i,o]);o=null,i=null}if(i)n.push([i,null]);let a=[];for(let[d,u]of n)if(d===u)a.push(d);else if(!u&&d===s[0])a.push("*");else if(!u)a.push(`>=${d}`);else if(d===s[0])a.push(`<=${u}`);else a.push(`${d} - ${u}`);let l=a.join(" || "),c=typeof t.raw==="string"?t.raw:String(t);return l.length<c.length?l:t}});var Ll=m(function(aR,Dl){var El=H(),si=dt(),{ANY:ii}=si,oi=ft(),ai=K(),MC=(e,t,r={})=>{if(e===t)return!0;e=new El(e,r),t=new El(t,r);let n=!1;e:for(let i of e.set){for(let o of t.set){let s=$C(i,o,r);if(n=n||s!==null,s)continue e}if(n)return!1}return!0},BC=[new si(">=0.0.0-0")],Ol=[new si(">=0.0.0")],$C=(e,t,r)=>{if(e===t)return!0;if(e.length===1&&e[0].semver===ii)if(t.length===1&&t[0].semver===ii)return!0;else if(r.includePrerelease)e=BC;else e=Ol;if(t.length===1&&t[0].semver===ii)if(r.includePrerelease)return!0;else t=Ol;let n=new Set,i,o;for(let f of e)if(f.operator===">"||f.operator===">=")i=Tl(i,f,r);else if(f.operator==="<"||f.operator==="<=")o=Nl(o,f,r);else n.add(f.semver);if(n.size>1)return null;let s;if(i&&o){if(s=ai(i.semver,o.semver,r),s>0)return null;else if(s===0&&(i.operator!==">="||o.operator!=="<="))return null}for(let f of n){if(i&&!oi(f,String(i),r))return null;if(o&&!oi(f,String(o),r))return null;for(let y of t)if(!oi(f,String(y),r))return!1;return!0}let a,l,c,d,u=o&&!r.includePrerelease&&o.semver.prerelease.length?o.semver:!1,p=i&&!r.includePrerelease&&i.semver.prerelease.length?i.semver:!1;if(u&&u.prerelease.length===1&&o.operator==="<"&&u.prerelease[0]===0)u=!1;for(let f of t){if(d=d||f.operator===">"||f.operator===">=",c=c||f.operator==="<"||f.operator==="<=",i){if(p){if(f.semver.prerelease&&f.semver.prerelease.length&&f.semver.major===p.major&&f.semver.minor===p.minor&&f.semver.patch===p.patch)p=!1}if(f.operator===">"||f.operator===">="){if(a=Tl(i,f,r),a===f&&a!==i)return!1}else if(i.operator===">="&&!f.test(i.semver))return!1}if(o){if(u){if(f.semver.prerelease&&f.semver.prerelease.length&&f.semver.major===u.major&&f.semver.minor===u.minor&&f.semver.patch===u.patch)u=!1}if(f.operator==="<"||f.operator==="<="){if(l=Nl(o,f,r),l===f&&l!==o)return!1}else if(o.operator==="<="&&!f.test(o.semver))return!1}if(!f.operator&&(o||i)&&s!==0)return!1}if(i&&c&&!o&&s!==0)return!1;if(o&&d&&!i&&s!==0)return!1;if(p||u)return!1;return!0},Tl=(e,t,r)=>{if(!e)return t;let n=ai(e.semver,t.semver,r);return n>0?e:n<0?t:t.operator===">"&&e.operator===">="?t:e},Nl=(e,t,r)=>{if(!e)return t;let n=ai(e.semver,t.semver,r);return n<0?e:n>0?t:t.operator==="<"&&e.operator==="<="?t:e};Dl.exports=MC});var _l=m(function(lR,ql){var _e=qe(),Er=Le(),jC=F(),Or=Jn(),VC=fe(),UC=ia(),KC=sa(),HC=ca(),zC=pa(),GC=ga(),YC=ha(),WC=ba(),JC=Ca(),XC=K(),QC=Ia(),ZC=Aa(),ek=Cr(),tk=Oa(),rk=Na(),nk=ct(),ik=kr(),ok=Qn(),sk=Zn(),ak=wr(),lk=xr(),ck=ei(),uk=ja(),dk=Ka(),pk=dt(),fk=H(),gk=ft(),mk=sl(),hk=ll(),yk=ul(),bk=fl(),Sk=ml(),Ck=Pr(),kk=kl(),wk=xl(),xk=Al(),Ik=Pl(),vk=Ll();ql.exports={parse:VC,valid:UC,clean:KC,inc:HC,diff:zC,major:GC,minor:YC,patch:WC,prerelease:JC,compare:XC,rcompare:QC,compareLoose:ZC,compareBuild:ek,sort:tk,rsort:rk,gt:nk,lt:ik,eq:ok,neq:sk,gte:ak,lte:lk,cmp:ck,coerce:uk,truncate:dk,Comparator:pk,Range:fk,satisfies:gk,toComparators:mk,maxSatisfying:hk,minSatisfying:yk,minVersion:bk,validRange:Sk,outside:Ck,gtr:kk,ltr:wk,intersects:xk,simplifyRange:Ik,subset:vk,SemVer:jC,re:_e.re,src:_e.src,tokens:_e.t,SEMVER_SPEC_VERSION:Er.SEMVER_SPEC_VERSION,RELEASE_TYPES:Er.RELEASE_TYPES,compareIdentifiers:Or.compareIdentifiers,rcompareIdentifiers:Or.rcompareIdentifiers}});var Tr=["contract","page-recipe","html-artifact","design-system"];var Zl={spec:["html","markdown","zip"],prototype:["html","zip"],deck:["html","pptx","zip"],poster:["html","zip"]},Ew=Array.from(new Set(Object.values(Zl).flat()));var Nw=Object.freeze([Object.freeze({name:"manifest",summary:"Describe query operations and list the derived resource index.",positionals:Object.freeze([]),options:Object.freeze([])}),Object.freeze({name:"search",summary:"Search resources with deterministic bilingual ranking and reasons.",positionals:Object.freeze([Object.freeze({name:"text",property:"text",type:"string",required:!1})]),options:Object.freeze([...[["function","functions"],["scenario","scenarios"],["unit","units"],["industry","industries"]].map(([e,t])=>Object.freeze({name:e,property:t,type:"string",multiple:!0,cliEncoding:"comma-separated"})),Object.freeze({name:"kind",property:"kinds",type:"resource-kind",multiple:!0,cliEncoding:"comma-separated"}),Object.freeze({name:"tag",property:"tags",type:"string",multiple:!0,cliEncoding:"comma-separated"}),Object.freeze({name:"category",property:"categories",type:"string",multiple:!0,cliEncoding:"comma-separated"}),Object.freeze({name:"capability",property:"capabilities",type:"string",multiple:!0,cliEncoding:"comma-separated"}),Object.freeze({name:"maturity",property:"maturities",type:"resource-maturity",multiple:!0,cliEncoding:"comma-separated"}),Object.freeze({name:"limit",property:"limit",type:"positive-integer"})])}),Object.freeze({name:"get",summary:"Resolve one canonical resource id or unambiguous alias.",positionals:Object.freeze([Object.freeze({name:"id-or-alias",property:"id",type:"string",required:!0})]),options:Object.freeze([])}),Object.freeze({name:"build",summary:"Plan dependency closure and gaps without writing or installing.",positionals:Object.freeze([Object.freeze({name:"root",property:"roots",type:"string",required:!0,variadic:!0})]),options:Object.freeze([])}),Object.freeze({name:"docs",summary:"Read curated public documentation for one resource.",positionals:Object.freeze([Object.freeze({name:"id-or-alias",property:"id",type:"string",required:!0})]),options:Object.freeze([{name:"locale",property:"locale",type:"string"},{name:"page",property:"page",type:"positive-integer"}])}),Object.freeze({name:"examples",summary:"Read one bounded page of examples and exact dependencies. Follow nextPage for complete source.",positionals:Object.freeze([Object.freeze({name:"id-or-alias",property:"id",type:"string",required:!0})]),options:Object.freeze([{name:"page",property:"page",type:"positive-integer"}])}),Object.freeze({name:"install-plan",summary:"Describe distribution channels and fixed snapshot identity/closure without installing or writing.",positionals:Object.freeze([Object.freeze({name:"id-or-alias",property:"id",type:"string",required:!0})]),options:Object.freeze([])})]);var ec=["background","foreground","card","card-foreground","popover","popover-foreground","primary","primary-foreground","secondary","secondary-foreground","muted","muted-foreground","accent","accent-foreground","border","input","ring","destructive","destructive-foreground","success","success-foreground","warning","warning-foreground"],qw=[...ec,"radius","font-display","font-body","font-mono"];var gy=Tn(),my=Ze(),hy=mn(),Un=et(),yy=Be(),pe=P(),by=ae(),Sy=N(),Cy=ce(),ky=ue(),Vv=er(),wy=$n(),xy=jn(),Iy=Vn(),ir=Cs(),ks=Fe();var vy=gy.Composer,Ay=my.Document,Ry=hy.Schema,{YAMLError:Py,YAMLParseError:Ey,YAMLWarning:Oy}=Un,Ty=yy.Alias,{isAlias:Ny,isCollection:Dy,isDocument:Ly,isMap:qy,isNode:_y,isPair:Fy,isScalar:My,isSeq:By}=pe,$y=by.Pair,jy=Sy.Scalar,Vy=Cy.YAMLMap,Uy=ky.YAMLSeq;var Ky=wy.Lexer,Hy=xy.LineCounter,zy=Iy.Parser,{parse:Kn,parseAllDocuments:Gy,parseDocument:Yy,stringify:Wy}=ir,{visit:Jy,visitAsync:Xy}=ks;function or(e){let t=e.match(/^---\r?\n([\s\S]*?)\r?\n---\r?\n?([\s\S]*)$/);if(!t)return{meta:"",body:e.trim()};return{meta:(t[1]??"").trim(),body:(t[2]??"").trim()}}function Hn(e){let{meta:t}=or(e);if(!t)throw Error("SKILL.md is missing YAML frontmatter");let r=Kn(t);if(!r||typeof r!=="object")throw Error("SKILL.md frontmatter must be a YAML object");let n=T(r.id)??T(r.name);if(!n)throw Error("SKILL.md frontmatter must include a non-empty 'id' or 'name' field");let i=T(r.title)??T(r.name)??n,o=T(r.version)??"0.1.0",s=X(r.triggers);if(s.length===0)s.push(n,i);let a={id:n,title:i,version:o,triggers:s,tags:X(r.tags)},l=T(r.category);if(l)if(Tr.includes(l))a.category=l;else console.warn(`[skills] ${n}: unknown category "${l}" (expected ${Tr.join(" | ")}); ignoring`);if(Array.isArray(r.allowedCapabilities))a.allowedCapabilities=r.allowedCapabilities;if(Array.isArray(r.authors))a.authors=r.authors;let c=Zy(r);if(c)a.artifact=c;if(r.creationDesign!==void 0){let d=te(r.creationDesign),u=X(d?.formats),p=X(d?.lanes);if(!d||!Array.isArray(d.formats)||u.length!==d.formats.length||!Array.isArray(d.lanes)||p.length!==d.lanes.length||!u.length||!p.length||u.some((f)=>!["html","spec"].includes(f))||p.some((f)=>!["website","application","presentation"].includes(f)))throw Error("Invalid creationDesign formats or lanes");a.creationDesign={formats:u,lanes:p}}return a}function T(e){return typeof e==="string"&&e.trim()?e.trim():void 0}function X(e){return Array.isArray(e)?e.filter((t)=>typeof t==="string"&&t.trim().length>0):[]}function Qy(e){return typeof e==="number"&&Number.isFinite(e)?e:void 0}function st(e){return typeof e==="boolean"?e:void 0}function te(e){return e&&typeof e==="object"&&!Array.isArray(e)?e:void 0}function ws(e){if(!Array.isArray(e))return[];return e.map((t)=>{if(typeof t==="string")return t;let r=te(t);return r?T(r.name):void 0}).filter((t)=>Boolean(t))}function Zy(e){let t=te(e.artifact),r=te(e.od),n=t??r;if(!n)return;let i=te(n.preview),o=te(n.outputs),s=te(n.design_system)??te(n.designSystem),a=te(n.craft),l={},c=T(n.mode);if(c)l.mode=c;let d=T(n.surface);if(d)l.surface=d;let u=T(n.scenario);if(u)l.scenario=u;if(i)l.preview={...T(i.type)?{type:T(i.type)}:{},...T(i.entry)?{entry:T(i.entry)}:{},...T(i.reload)?{reload:T(i.reload)}:{}};if(o)l.outputs={...T(o.primary)?{primary:T(o.primary)}:{},...X(o.secondary).length>0?{secondary:X(o.secondary)}:{}};let p=st(n.designSystemRequired)??st(s?.requires);if(p!==void 0)l.designSystemRequired=p;let f=X(s?.sections);if(f.length>0)l.designSystemSections=f;let y=X(a?.requires);if(y.length>0)l.craftRequires=y;let g=ws(n.inputs);if(g.length>0)l.inputNames=g;let h=ws(n.parameters);if(h.length>0)l.parameterNames=h;let b=X(n.capabilities_required);if(b.length===0)b.push(...X(n.requiredCapabilities));if(b.length>0)l.requiredCapabilities=b;let k=st(n.speakerNotes)??st(n.speaker_notes);if(k!==void 0)l.speakerNotes=k;let w=st(n.animations);if(w!==void 0)l.animations=w;let I=T(n.examplePrompt)??T(n.example_prompt);if(I)l.examplePrompt=I;let A=T(n.upstream);if(A)l.upstream=A;let v=Qy(n.featured);if(v!==void 0)l.featured=v;return Object.keys(l).length>0?l:void 0}import{readFileSync as eb}from"fs";class sr extends Error{filePath;constructor(e,t){super(e);this.filePath=t;this.name="SkillLoadError"}}function zn(e){let t;try{t=eb(e,"utf-8")}catch(r){throw new sr(`Failed to read file: ${r.message}`,e)}try{let{body:r}=or(t);return{frontmatter:Hn(t),body:r,filePath:e}}catch(r){throw new sr(`Failed to parse SKILL.md: ${r.message}`,e)}}class ar{skills=new Map;register(e){this.skills.set(e.frontmatter.id,e)}list(){return[...this.skills.values()]}get(e){return this.skills.get(e)}addAll(e){for(let t of e)this.register(t)}size(){return this.skills.size}}import{existsSync as xs,readdirSync as tb,statSync as rb}from"fs";import{join as Gn}from"path";function lr(e){let t=Gn(e,".uibot","skills");if(!xs(t))return[];let r=[],n;try{n=tb(t)}catch(i){return console.warn(`[skills] failed to read skills directory ${t}: ${i.message}`),[]}for(let i of n){let o=Gn(t,i);try{if(!rb(o).isDirectory())continue}catch{continue}let s=Gn(o,"SKILL.md");if(!xs(s)){console.warn(`[skills] no SKILL.md found in ${o}, skipping`);continue}try{r.push(zn(s))}catch(a){console.warn(`[skills] skipping ${s}: ${a.message}`)}}return r}function nb(e,t){let r=lr(e);t.addAll(r)}import{createHash as ib}from"crypto";import{cpSync as cr,existsSync as De,mkdirSync as Is,readFileSync as As,readdirSync as Rs,statSync as Ps,writeFileSync as ob}from"fs";import{fileURLToPath as sb}from"url";import{join as re}from"path";var Es=sb(new URL("../content",import.meta.url)),Os=["skills","agents","craft"],ab="builtin-pack.json";function lb(e){return Ps(e).isDirectory()?Rs(e).sort():[""]}function vs(e,t){let r=ib("sha256");for(let n of t){let i=n?re(e,n):e;if(!De(i))return null;r.update(`${n}\x00`).update(As(i))}return r.digest("hex")}function cb(e){try{let t=JSON.parse(As(e,"utf8"));return t.entries&&typeof t.entries==="object"?t.entries:{}}catch{return{}}}function ub(e,t=Es,r={}){let n={seeded:[],kept:[],upgraded:[],modified:[],legacy:[],replaced:[]},i=new Set(r.replace??[]);if(!De(t))return n;let o=re(e,".uibot",ab),s=cb(o),a=!1;for(let l of Os){let c=re(t,l);if(!De(c))continue;let d=re(e,".uibot",l);for(let u of Rs(c).sort()){if(u.startsWith("."))continue;let p=re(c,u),f=re(d,u),y=`${l}/${u}`,g=Ps(p).isDirectory(),h=lb(p),b=vs(p,h);if(!b)continue;if(!(g&&l==="skills"?De(re(f,"SKILL.md")):De(f))){Is(d,{recursive:!0}),cr(p,f,{recursive:g,force:!1,errorOnExist:!1}),s[y]=b,a=!0,n.seeded.push(y);continue}let w=vs(f,h);if(w===b){if(s[y]!==b)s[y]=b,a=!0;n.kept.push(y);continue}let I=s[y];if(i.has(y)||I===void 0&&i.has("legacy")){let v=g?re(f,"SKILL.md"):f;if(De(v))cr(v,`${v}.pre-upgrade`,{force:!0});cr(p,f,{recursive:g,force:!0}),s[y]=b,a=!0,n.replaced.push(y)}else if(I===void 0)n.legacy.push(y);else if(w===I)cr(p,f,{recursive:g,force:!0}),s[y]=b,a=!0,n.upgraded.push(y);else if(I!==b)n.modified.push(y);else n.kept.push(y)}}if(a)Is(re(e,".uibot"),{recursive:!0}),ob(o,`${JSON.stringify({version:1,entries:s},null,2)}
139
+ `);return n}var db=/[\u0080-\uffff]/;function pb(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ts(e,t){let r=t.trim().toLowerCase();if(!r)return!1;if(db.test(r))return e.includes(r);return new RegExp(`(?<![a-z0-9])${pb(r)}(?![a-z0-9])`).test(e)}function ur(e,t){let r=t.toLowerCase(),n=0;for(let i of e.frontmatter.triggers)if(Ts(r,i))n+=1+Math.min(i.trim().length,12)/12;return n}function fb(e){return Math.ceil(e.length/4)}class dr{registry;constructor(e){this.registry=e}select(e){let{intent:t,tags:r,categories:n,maxTokens:i}=e,o=this.registry.list().filter((c)=>!e.creationDesign||c.frontmatter.creationDesign?.formats.includes(e.creationDesign.format)&&c.frontmatter.creationDesign.lanes.includes(e.creationDesign.lane)).map((c)=>({skill:c,score:ur(c,t)})).filter(({score:c})=>c>0||e.creationDesign).sort((c,d)=>d.score-c.score).map(({skill:c})=>c);if(r&&r.length>0){let c=new Set(r.map((d)=>d.toLowerCase()));o=o.filter((d)=>(d.frontmatter.tags??[]).some((p)=>c.has(p.toLowerCase())))}if(n&&n.length>0){let c=new Set(n);o=o.filter((d)=>d.frontmatter.category&&c.has(d.frontmatter.category))}let s=!1;if(o=o.filter((c)=>{if(c.frontmatter.category!=="html-artifact")return!0;if(s)return!1;return s=!0,!0}),i===void 0)return o;let a=[],l=0;for(let c of o){let d=fb(c.body);if(l+d>i)continue;a.push(c),l+=d}return a}score(e){return this.registry.list().map((t)=>({skill:t,score:ur(t,e)})).sort((t,r)=>r.score-t.score).map(({skill:t})=>t)}}import{appendFileSync as gb,existsSync as pr,mkdirSync as Ns,readFileSync as Ds,writeFileSync as mb}from"fs";import{join as at}from"path";var hb="1.0.0";function fr(e,t){return at(e,".uibot","skills",t)}function Ls(e){return{skillId:e,version:hb,usageCount:0,successCount:0,failureCount:0,avgScore:0.5,lastUpdated:new Date().toISOString()}}class qs{options;constructor(e){this.options=e}recordInvocation(e,t){let r=fr(this.options.rootDir,e);if(!pr(r))Ns(r,{recursive:!0});let n=at(r,"usage.jsonl");gb(n,JSON.stringify(t)+`
140
+ `,"utf-8")}updateScoring(e,t){let r=fr(this.options.rootDir,e);if(!pr(r))Ns(r,{recursive:!0});let n=this.getScoring(e);if(n.usageCount+=1,t==="render-ok"||t==="user-thumb-up")n.successCount+=1;else n.failureCount+=1;n.avgScore=(n.successCount+1)/(n.usageCount+2),n.lastUpdated=new Date().toISOString();let i=at(r,"scoring.json");mb(i,JSON.stringify(n,null,2)+`
141
+ `,"utf-8")}recentScores(e,t=30){let r=at(fr(this.options.rootDir,e),"usage.jsonl");if(!pr(r))return[];try{let n=Ds(r,"utf-8").split(`
142
+ `).filter(Boolean),i=[];for(let o of n.slice(-t))try{let s=JSON.parse(o);i.push(s.signal==="render-ok"||s.signal==="user-thumb-up"?1:0)}catch{}return i}catch{return[]}}getScoring(e){let t=at(fr(this.options.rootDir,e),"scoring.json");if(!pr(t))return Ls(e);try{let r=Ds(t,"utf-8");return JSON.parse(r)}catch{return Ls(e)}}}import{appendFileSync as yb,existsSync as _s,mkdirSync as bb,readFileSync as Sb}from"fs";import{join as Ms}from"path";function Bs(e,t){return Ms(e,".uibot","skills",t)}function Fs(e,t){return Ms(Bs(e,t),"reflections.jsonl")}class $s{options;constructor(e){this.options=e}append(e){let t=Bs(this.options.rootDir,e.skillId);if(!_s(t))bb(t,{recursive:!0});yb(Fs(this.options.rootDir,e.skillId),JSON.stringify(e)+`
143
+ `,"utf-8")}list(e){let t=Fs(this.options.rootDir,e);if(!_s(t))return[];try{return Sb(t,"utf-8").split(`
144
+ `).filter(Boolean).map((r)=>{try{return JSON.parse(r)}catch{return null}}).filter((r)=>r!==null)}catch{return[]}}recent(e,t=10){return this.list(e).slice(-t).reverse()}}import{appendFileSync as Cb,existsSync as js,mkdirSync as kb,readFileSync as wb,writeFileSync as Vs}from"fs";import{join as Us}from"path";function Ks(e,t){return Us(e,".uibot","skills",t)}function gr(e,t){return Us(Ks(e,t),"regressions.jsonl")}class Hs{options;constructor(e){this.options=e}append(e){let t=Ks(this.options.rootDir,e.skillId);if(!js(t))kb(t,{recursive:!0});Cb(gr(this.options.rootDir,e.skillId),JSON.stringify(e)+`
145
+ `,"utf-8")}list(e){let t=gr(this.options.rootDir,e);if(!js(t))return[];try{return wb(t,"utf-8").split(`
146
+ `).filter(Boolean).map((r)=>{try{return JSON.parse(r)}catch{return null}}).filter((r)=>r!==null)}catch{return[]}}active(e){return this.list(e).filter((t)=>t.status==="active")}markResolved(e,t,r){if(t.length===0)return;let n=this.list(e);if(n.length===0)return;let i=new Set(t),o=new Date().toISOString(),s=n.map((l)=>{if(i.has(l.id)&&l.status==="active")return{...l,status:"resolved",resolvedBy:r,resolvedAt:o};return l}),a=gr(this.options.rootDir,e);Vs(a,s.map((l)=>JSON.stringify(l)).join(`
147
147
  `)+`
148
- `,"utf-8")}markActive(e,t,r){if(t.length===0)return;let n=this.list(e);if(n.length===0)return;let i=new Set(t),o=new Date().toISOString(),s=n.map((l)=>{if(i.has(l.id)&&l.status==="resolved")return{...l,status:"active",context:[l.context,`reactivated@${o}: ${r}`].filter(Boolean).join(" | ")};return l}),a=gr(this.options.rootDir,e);js(a,s.map((l)=>JSON.stringify(l)).join(`
148
+ `,"utf-8")}markActive(e,t,r){if(t.length===0)return;let n=this.list(e);if(n.length===0)return;let i=new Set(t),o=new Date().toISOString(),s=n.map((l)=>{if(i.has(l.id)&&l.status==="resolved")return{...l,status:"active",context:[l.context,`reactivated@${o}: ${r}`].filter(Boolean).join(" | ")};return l}),a=gr(this.options.rootDir,e);Vs(a,s.map((l)=>JSON.stringify(l)).join(`
149
149
  `)+`
150
- `,"utf-8")}resolved(e){return this.list(e).filter((t)=>t.status==="resolved")}}var Rk=Wl(ql(),1);function _l(e){return e}function Fl(e){return e}function Ak(e){return e}function Ml(e){return Ak({id:`skill:definition:${e.frontmatter.id}`,type:"skill:definition",description:`Skill definition: ${e.frontmatter.title}`,contribution:e})}function vk(e={}){let t=e.dir??process.cwd(),r=new ar;r.addAll(lr(t));let n=Fl({manifest:_l({pluginId:"uibot.skills",version:"0.1.0",displayName:"UIBot Skills",description:"Loads SKILL.md skill definitions from the filesystem and registers them as skill:definition capabilities.",sdkRange:"^0.1.0",engineRange:"^0.1.0",capabilities:r.list().map((i)=>({id:`skill:definition:${i.frontmatter.id}`,type:"skill:definition",description:`Skill: ${i.frontmatter.title} (v${i.frontmatter.version})`})),permissions:[]}),register(i){for(let o of r.list())i.addCapability(Ml(o))}});return Object.assign(n,{registry:r,createSelector(){return new dr(r)}})}import{existsSync as $l,mkdirSync as Pk,readdirSync as Ek,readFileSync as Nk,statSync as Tk,writeFileSync as Ok}from"fs";import{join as gt}from"path";function Bl(e,t){return gt(e,".uibot","skills",t)}function jl(e,t){return gt(Bl(e,t),"proposals")}function Dk(e){if(!$l(e))return 0;let t=Nk(e,"utf-8").split(`
151
- `).filter(Boolean).map((n)=>{try{return JSON.parse(n)}catch{return null}}).filter(Boolean),r=0;for(let n=t.length-1;n>=0;n--){let i=t[n].signal;if(i==="render-fail"||i==="user-thumb-down")r++;else break}return r}function Lk(e,t){let r=jl(e,t);if(!$l(r))return null;let n=Ek(r).filter((i)=>i.endsWith(".json"));if(n.length===0)return null;return n.map((i)=>{try{return Tk(gt(r,i)).mtimeMs}catch{return 0}}).reduce((i,o)=>Math.max(i,o),0)||null}class Vl{options;failureThreshold;cooldownMs;constructor(e){this.options=e;this.failureThreshold=e.failureThreshold??10,this.cooldownMs=e.cooldownMs??86400000}async reflectOnFailure(e,t,r,n=""){if(!this.options.generateReflection||!this.options.reflectionStore)return;let i=r.get(e);if(!i)return;try{let s=(await this.options.generateReflection({skillId:e,skillBody:i.body,trigger:t,context:n})).trim();if(!s)return;this.options.reflectionStore.append({skillId:e,trigger:t,timestamp:new Date().toISOString(),reflection:s,...n?{context:n}:{}})}catch(o){console.warn(`[evolver] reflection failed for ${e}: ${o instanceof Error?o.message:String(o)}`)}}async poll(e,t,r){let n=t.get(e);if(!n)return null;let i=Bl(this.options.rootDir,e),o=gt(i,"usage.jsonl"),s=Dk(o);if(s<this.failureThreshold)return null;let a=Lk(this.options.rootDir,e),l=Date.now();if(a!==null&&l-a<this.cooldownMs)return null;let c=`Skill "${e}" has ${s} consecutive failures.`;if(this.options.reflectionStore){let b=this.options.reflectionStore.recent(e,this.options.reflectionLimit??10);if(b.length>0)c+=`
150
+ `,"utf-8")}resolved(e){return this.list(e).filter((t)=>t.status==="resolved")}}var Ak=Jl(_l(),1);function Fl(e){return e}function Ml(e){return e}function Rk(e){return e}function Bl(e){return Rk({id:`skill:definition:${e.frontmatter.id}`,type:"skill:definition",description:`Skill definition: ${e.frontmatter.title}`,contribution:e})}function Pk(e={}){let t=e.dir??process.cwd(),r=new ar;r.addAll(lr(t));let n=Ml({manifest:Fl({pluginId:"uibot.skills",version:"0.1.0",displayName:"UIBot Skills",description:"Loads SKILL.md skill definitions from the filesystem and registers them as skill:definition capabilities.",sdkRange:"^0.1.0",engineRange:"^0.1.0",capabilities:r.list().map((i)=>({id:`skill:definition:${i.frontmatter.id}`,type:"skill:definition",description:`Skill: ${i.frontmatter.title} (v${i.frontmatter.version})`})),permissions:[]}),register(i){for(let o of r.list())i.addCapability(Bl(o))}});return Object.assign(n,{registry:r,createSelector(){return new dr(r)}})}import{existsSync as $l,mkdirSync as Ek,readdirSync as Ok,readFileSync as Tk,statSync as Nk,writeFileSync as Dk}from"fs";import{join as gt}from"path";function jl(e,t){return gt(e,".uibot","skills",t)}function Vl(e,t){return gt(jl(e,t),"proposals")}function Lk(e){if(!$l(e))return 0;let t=Tk(e,"utf-8").split(`
151
+ `).filter(Boolean).map((n)=>{try{return JSON.parse(n)}catch{return null}}).filter(Boolean),r=0;for(let n=t.length-1;n>=0;n--){let i=t[n].signal;if(i==="render-fail"||i==="user-thumb-down")r++;else break}return r}function qk(e,t){let r=Vl(e,t);if(!$l(r))return null;let n=Ok(r).filter((i)=>i.endsWith(".json"));if(n.length===0)return null;return n.map((i)=>{try{return Nk(gt(r,i)).mtimeMs}catch{return 0}}).reduce((i,o)=>Math.max(i,o),0)||null}class Ul{options;failureThreshold;cooldownMs;constructor(e){this.options=e;this.failureThreshold=e.failureThreshold??10,this.cooldownMs=e.cooldownMs??86400000}async reflectOnFailure(e,t,r,n=""){if(!this.options.generateReflection||!this.options.reflectionStore)return;let i=r.get(e);if(!i)return;try{let s=(await this.options.generateReflection({skillId:e,skillBody:i.body,trigger:t,context:n})).trim();if(!s)return;this.options.reflectionStore.append({skillId:e,trigger:t,timestamp:new Date().toISOString(),reflection:s,...n?{context:n}:{}})}catch(o){console.warn(`[evolver] reflection failed for ${e}: ${o instanceof Error?o.message:String(o)}`)}}async poll(e,t,r){let n=t.get(e);if(!n)return null;let i=jl(this.options.rootDir,e),o=gt(i,"usage.jsonl"),s=Lk(o);if(s<this.failureThreshold)return null;let a=qk(this.options.rootDir,e),l=Date.now();if(a!==null&&l-a<this.cooldownMs)return null;let c=`Skill "${e}" has ${s} consecutive failures.`;if(this.options.reflectionStore){let b=this.options.reflectionStore.recent(e,this.options.reflectionLimit??10);if(b.length>0)c+=`
152
152
 
153
153
  Recent diagnoses (most recent first):
154
154
  `,c+=b.map((k)=>`- [${k.trigger}] ${k.reflection}`).join(`
@@ -158,5 +158,5 @@ Address these systemic issues in your improvement.`}c+=`
158
158
 
159
159
  Current body:
160
160
 
161
- ${n.body}`;let d=Math.max(1,this.options.populationSize??1),u,p,f;if(d===1)u=await this.options.generateImprovedBody({currentBody:n.body,failureContext:c});else{let b=await Promise.all(Array.from({length:d},()=>this.options.generateImprovedBody({currentBody:n.body,failureContext:c})));if(!this.options.evaluateCandidate)console.warn(`[evolver] populationSize=${d} but evaluateCandidate is not configured; picking first candidate`),u=b[0],f=0,p=b.map((k,w)=>w===0?0:Number.NEGATIVE_INFINITY);else{let k=this.options.evaluateCandidate;p=await Promise.all(b.map(async(I,A)=>{try{return await k({skillId:e,currentBody:n.body,candidateBody:I,candidateIndex:A})}catch(R){return console.warn(`[evolver] evaluateCandidate threw for candidate ${A}: ${R instanceof Error?R.message:String(R)}`),Number.NEGATIVE_INFINITY}}));let w=p;f=w.reduce((I,A,R)=>A>w[I]?R:I,0),u=b[f]}}let y=new Date().toISOString().replace(/[:.]/g,"-"),g={id:y,skillId:e,fromVersion:n.frontmatter.version,proposedBody:u,status:"pending",createdAt:new Date().toISOString(),failureTriggerCount:s,...d>1?{populationSize:d}:{},...p?{populationScores:p}:{},...f!==void 0?{winnerIndex:f}:{}},h=jl(this.options.rootDir,e);return Pk(h,{recursive:!0}),Ok(gt(h,`${y}.json`),JSON.stringify(g,null,2)+`
162
- `,"utf-8"),g}}export{Ps as BUILTIN_PACK_DIR,Es as BUILTIN_PACK_KINDS,$s as ReflectionStore,Ks as RegressionStore,Vl as SkillEvolver,sr as SkillLoadError,ar as SkillRegistry,dr as SkillSelectorImpl,Ls as SkillUsageStore,vk as createUIBotSkillsPlugin,rb as loadFromFs,Yn as loadSkillFile,Hn as parseSkillFrontmatter,lr as scanSkillsDir,ur as scoreSkillMatch,cb as seedBuiltinPack,or as splitFrontmatter,Ns as triggerMatches};
161
+ ${n.body}`;let d=Math.max(1,this.options.populationSize??1),u,p,f;if(d===1)u=await this.options.generateImprovedBody({currentBody:n.body,failureContext:c});else{let b=await Promise.all(Array.from({length:d},()=>this.options.generateImprovedBody({currentBody:n.body,failureContext:c})));if(!this.options.evaluateCandidate)console.warn(`[evolver] populationSize=${d} but evaluateCandidate is not configured; picking first candidate`),u=b[0],f=0,p=b.map((k,w)=>w===0?0:Number.NEGATIVE_INFINITY);else{let k=this.options.evaluateCandidate;p=await Promise.all(b.map(async(I,A)=>{try{return await k({skillId:e,currentBody:n.body,candidateBody:I,candidateIndex:A})}catch(v){return console.warn(`[evolver] evaluateCandidate threw for candidate ${A}: ${v instanceof Error?v.message:String(v)}`),Number.NEGATIVE_INFINITY}}));let w=p;f=w.reduce((I,A,v)=>A>w[I]?v:I,0),u=b[f]}}let y=new Date().toISOString().replace(/[:.]/g,"-"),g={id:y,skillId:e,fromVersion:n.frontmatter.version,proposedBody:u,status:"pending",createdAt:new Date().toISOString(),failureTriggerCount:s,...d>1?{populationSize:d}:{},...p?{populationScores:p}:{},...f!==void 0?{winnerIndex:f}:{}},h=Vl(this.options.rootDir,e);return Ek(h,{recursive:!0}),Dk(gt(h,`${y}.json`),JSON.stringify(g,null,2)+`
162
+ `,"utf-8"),g}}export{Es as BUILTIN_PACK_DIR,Os as BUILTIN_PACK_KINDS,$s as ReflectionStore,Hs as RegressionStore,Ul as SkillEvolver,sr as SkillLoadError,ar as SkillRegistry,dr as SkillSelectorImpl,qs as SkillUsageStore,Pk as createUIBotSkillsPlugin,nb as loadFromFs,zn as loadSkillFile,Hn as parseSkillFrontmatter,lr as scanSkillsDir,ur as scoreSkillMatch,ub as seedBuiltinPack,or as splitFrontmatter,Ts as triggerMatches};