noskills 4.1.39 → 4.1.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +41 -13
- package/chunks/approve-R5UDYN3P.js +1 -0
- package/chunks/block-P7TM5EPZ.js +1 -0
- package/chunks/cancel-TU3C6MKE.js +1 -0
- package/chunks/{chunk-KJH7Q57A.js → chunk-CIYGCZTM.js} +1 -1
- package/chunks/chunk-GBSAQ2FM.js +3 -0
- package/chunks/chunk-KDWUWWE5.js +81 -0
- package/chunks/chunk-M7KSO4EF.js +1 -0
- package/chunks/chunk-RIME26D6.js +144 -0
- package/chunks/chunk-U2T4X5EN.js +11 -0
- package/chunks/{concern-FGNG32KU.js → concern-E56E2MFL.js} +1 -1
- package/chunks/done-NQMUXJYO.js +1 -0
- package/chunks/{init-M7SJOVPZ.js → init-3O7FXLIZ.js} +1 -1
- package/chunks/{invoke-hook-VXIVDDQG.js → invoke-hook-MPDIOIHR.js} +3 -3
- package/chunks/next-5LH223G2.js +8 -0
- package/chunks/{purge-6DEK2ZSI.js → purge-6T4L2FXI.js} +1 -1
- package/chunks/reopen-JIHLM3KX.js +1 -0
- package/chunks/reset-4RHO7MSF.js +1 -0
- package/chunks/{rule-OVSBPSYO.js → rule-UDTLRXFA.js} +1 -1
- package/chunks/run-77R3ANIQ.js +3 -0
- package/chunks/spec-DPDGDRW2.js +1 -0
- package/chunks/status-4YV2X73D.js +1 -0
- package/chunks/{sync-MWQWXN2C.js → sync-QYUBOAMK.js} +1 -1
- package/chunks/watch-XVGIYX6X.js +8 -0
- package/chunks/wontfix-VCV45TPJ.js +1 -0
- package/noskills.js +1 -1
- package/package.json +1 -1
- package/chunks/approve-GSSSUQWC.js +0 -1
- package/chunks/block-LVQNJU4P.js +0 -1
- package/chunks/chunk-4XOSXARZ.js +0 -9
- package/chunks/chunk-EMHZF6ZY.js +0 -144
- package/chunks/chunk-IAR3DEWR.js +0 -1
- package/chunks/chunk-RYQPPQNO.js +0 -3
- package/chunks/chunk-XADY6SXR.js +0 -67
- package/chunks/done-5IX2F6V7.js +0 -1
- package/chunks/next-GGVR6JM2.js +0 -8
- package/chunks/reset-JEIUVTWV.js +0 -1
- package/chunks/run-7MZATQML.js +0 -3
- package/chunks/spec-J7KC4VFM.js +0 -1
- package/chunks/status-BISV6DFB.js +0 -1
- package/chunks/watch-AP5GGXG6.js +0 -8
package/chunks/chunk-EMHZF6ZY.js
DELETED
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
import{b as T}from"./chunk-MNEZ5QGX.js";import{a as tt,c as y,e as La}from"./chunk-OTRBRRIO.js";var q=y($=>{"use strict";var ts=Symbol.for("yaml.alias"),Fi=Symbol.for("yaml.document"),st=Symbol.for("yaml.map"),Ki=Symbol.for("yaml.pair"),ss=Symbol.for("yaml.scalar"),it=Symbol.for("yaml.seq"),R=Symbol.for("yaml.node.type"),Ia=s=>!!s&&typeof s=="object"&&s[R]===ts,Pa=s=>!!s&&typeof s=="object"&&s[R]===Fi,$a=s=>!!s&&typeof s=="object"&&s[R]===st,Ma=s=>!!s&&typeof s=="object"&&s[R]===Ki,ji=s=>!!s&&typeof s=="object"&&s[R]===ss,Da=s=>!!s&&typeof s=="object"&&s[R]===it;function Ri(s){if(s&&typeof s=="object")switch(s[R]){case st:case it:return!0}return!1}function _a(s){if(s&&typeof s=="object")switch(s[R]){case ts:case st:case ss:case it:return!0}return!1}var Ba=s=>(ji(s)||Ri(s))&&!!s.anchor;$.ALIAS=ts;$.DOC=Fi;$.MAP=st;$.NODE_TYPE=R;$.PAIR=Ki;$.SCALAR=ss;$.SEQ=it;$.hasAnchor=Ba;$.isAlias=Ia;$.isCollection=Ri;$.isDocument=Pa;$.isMap=$a;$.isNode=_a;$.isPair=Ma;$.isScalar=ji;$.isSeq=Da});var ke=y(is=>{"use strict";var P=q(),M=Symbol("break visit"),Ui=Symbol("skip children"),K=Symbol("remove node");function nt(s,e){let t=Yi(e);P.isDocument(s)?ce(null,s.contents,t,Object.freeze([s]))===K&&(s.contents=null):ce(null,s,t,Object.freeze([]))}nt.BREAK=M;nt.SKIP=Ui;nt.REMOVE=K;function ce(s,e,t,i){let n=xi(s,e,t,i);if(P.isNode(n)||P.isPair(n))return Vi(s,i,n),ce(s,n,t,i);if(typeof n!="symbol"){if(P.isCollection(e)){i=Object.freeze(i.concat(e));for(let r=0;r<e.items.length;++r){let a=ce(r,e.items[r],t,i);if(typeof a=="number")r=a-1;else{if(a===M)return M;a===K&&(e.items.splice(r,1),r-=1)}}}else if(P.isPair(e)){i=Object.freeze(i.concat(e));let r=ce("key",e.key,t,i);if(r===M)return M;r===K&&(e.key=null);let a=ce("value",e.value,t,i);if(a===M)return M;a===K&&(e.value=null)}}return n}async function rt(s,e){let t=Yi(e);P.isDocument(s)?await fe(null,s.contents,t,Object.freeze([s]))===K&&(s.contents=null):await fe(null,s,t,Object.freeze([]))}rt.BREAK=M;rt.SKIP=Ui;rt.REMOVE=K;async function fe(s,e,t,i){let n=await xi(s,e,t,i);if(P.isNode(n)||P.isPair(n))return Vi(s,i,n),fe(s,n,t,i);if(typeof n!="symbol"){if(P.isCollection(e)){i=Object.freeze(i.concat(e));for(let r=0;r<e.items.length;++r){let a=await fe(r,e.items[r],t,i);if(typeof a=="number")r=a-1;else{if(a===M)return M;a===K&&(e.items.splice(r,1),r-=1)}}}else if(P.isPair(e)){i=Object.freeze(i.concat(e));let r=await fe("key",e.key,t,i);if(r===M)return M;r===K&&(e.key=null);let a=await fe("value",e.value,t,i);if(a===M)return M;a===K&&(e.value=null)}}return n}function Yi(s){return typeof s=="object"&&(s.Collection||s.Node||s.Value)?Object.assign({Alias:s.Node,Map:s.Node,Scalar:s.Node,Seq:s.Node},s.Value&&{Map:s.Value,Scalar:s.Value,Seq:s.Value},s.Collection&&{Map:s.Collection,Seq:s.Collection},s):s}function xi(s,e,t,i){if(typeof t=="function")return t(s,e,i);if(P.isMap(e))return t.Map?.(s,e,i);if(P.isSeq(e))return t.Seq?.(s,e,i);if(P.isPair(e))return t.Pair?.(s,e,i);if(P.isScalar(e))return t.Scalar?.(s,e,i);if(P.isAlias(e))return t.Alias?.(s,e,i)}function Vi(s,e,t){let i=e[e.length-1];if(P.isCollection(i))i.items[s]=t;else if(P.isPair(i))s==="key"?i.key=t:i.value=t;else if(P.isDocument(i))i.contents=t;else{let n=P.isAlias(i)?"alias":"scalar";throw new Error(`Cannot replace node with ${n} parent`)}}is.visit=nt;is.visitAsync=rt});var ns=y(Gi=>{"use strict";var Ji=q(),Fa=ke(),Ka={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},ja=s=>s.replace(/[!,[\]{}]/g,e=>Ka[e]),Ne=class s{constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},s.defaultYaml,e),this.tags=Object.assign({},s.defaultTags,t)}clone(){let e=new s(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){let e=new s(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:s.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},s.defaultTags);break}return e}add(e,t){this.atNextDocument&&(this.yaml={explicit:s.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},s.defaultTags),this.atNextDocument=!1);let i=e.trim().split(/[ \t]+/),n=i.shift();switch(n){case"%TAG":{if(i.length!==2&&(t(0,"%TAG directive should contain exactly two parts"),i.length<2))return!1;let[r,a]=i;return this.tags[r]=a,!0}case"%YAML":{if(this.yaml.explicit=!0,i.length!==1)return t(0,"%YAML directive should contain exactly one part"),!1;let[r]=i;if(r==="1.1"||r==="1.2")return this.yaml.version=r,!0;{let a=/^\d+\.\d+$/.test(r);return t(6,`Unsupported YAML version ${r}`,a),!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 a=e.slice(2,-1);return a==="!"||a==="!!"?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==">"&&t("Verbatim tags must end with a >"),a)}let[,i,n]=e.match(/^(.*!)([^!]*)$/s);n||t(`The ${e} tag has no suffix`);let r=this.tags[i];if(r)try{return r+decodeURIComponent(n)}catch(a){return t(String(a)),null}return i==="!"?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[t,i]of Object.entries(this.tags))if(e.startsWith(i))return t+ja(e.substring(i.length));return e[0]==="!"?e:`!<${e}>`}toString(e){let t=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],i=Object.entries(this.tags),n;if(e&&i.length>0&&Ji.isNode(e.contents)){let r={};Fa.visit(e.contents,(a,o)=>{Ji.isNode(o)&&o.tag&&(r[o.tag]=!0)}),n=Object.keys(r)}else n=[];for(let[r,a]of i)r==="!!"&&a==="tag:yaml.org,2002:"||(!e||n.some(o=>o.startsWith(a)))&&t.push(`%TAG ${r} ${a}`);return t.join(`
|
|
2
|
-
`)}};Ne.defaultYaml={explicit:!1,version:"1.2"};Ne.defaultTags={"!!":"tag:yaml.org,2002:"};Gi.Directives=Ne});var at=y(Ae=>{"use strict";var Wi=q(),Ra=ke();function Ua(s){if(/[\x00-\x19\s,[\]{}]/.test(s)){let t=`Anchor must not contain whitespace or control characters: ${JSON.stringify(s)}`;throw new Error(t)}return!0}function Qi(s){let e=new Set;return Ra.visit(s,{Value(t,i){i.anchor&&e.add(i.anchor)}}),e}function Hi(s,e){for(let t=1;;++t){let i=`${s}${t}`;if(!e.has(i))return i}}function Ya(s,e){let t=[],i=new Map,n=null;return{onAnchor:r=>{t.push(r),n??(n=Qi(s));let a=Hi(e,n);return n.add(a),a},setAnchors:()=>{for(let r of t){let a=i.get(r);if(typeof a=="object"&&a.anchor&&(Wi.isScalar(a.node)||Wi.isCollection(a.node)))a.node.anchor=a.anchor;else{let o=new Error("Failed to resolve repeated object (this should not happen)");throw o.source=r,o}}},sourceObjects:i}}Ae.anchorIsValid=Ua;Ae.anchorNames=Qi;Ae.createNodeAnchors=Ya;Ae.findNewAnchor=Hi});var rs=y(Xi=>{"use strict";function qe(s,e,t,i){if(i&&typeof i=="object")if(Array.isArray(i))for(let n=0,r=i.length;n<r;++n){let a=i[n],o=qe(s,i,String(n),a);o===void 0?delete i[n]:o!==a&&(i[n]=o)}else if(i instanceof Map)for(let n of Array.from(i.keys())){let r=i.get(n),a=qe(s,i,n,r);a===void 0?i.delete(n):a!==r&&i.set(n,a)}else if(i instanceof Set)for(let n of Array.from(i)){let r=qe(s,i,n,n);r===void 0?i.delete(n):r!==n&&(i.delete(n),i.add(r))}else for(let[n,r]of Object.entries(i)){let a=qe(s,i,n,r);a===void 0?delete i[n]:a!==r&&(i[n]=a)}return s.call(e,t,i)}Xi.applyReviver=qe});var V=y(Zi=>{"use strict";var xa=q();function zi(s,e,t){if(Array.isArray(s))return s.map((i,n)=>zi(i,String(n),t));if(s&&typeof s.toJSON=="function"){if(!t||!xa.hasAnchor(s))return s.toJSON(e,t);let i={aliasCount:0,count:1,res:void 0};t.anchors.set(s,i),t.onCreate=r=>{i.res=r,delete t.onCreate};let n=s.toJSON(e,t);return t.onCreate&&t.onCreate(n),n}return typeof s=="bigint"&&!t?.keep?Number(s):s}Zi.toJS=zi});var ot=y(tn=>{"use strict";var Va=rs(),en=q(),Ja=V(),as=class{constructor(e){Object.defineProperty(this,en.NODE_TYPE,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:i,onAnchor:n,reviver:r}={}){if(!en.isDocument(e))throw new TypeError("A document argument is required");let a={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof i=="number"?i:100},o=Ja.toJS(this,"",a);if(typeof n=="function")for(let{count:l,res:c}of a.anchors.values())n(c,l);return typeof r=="function"?Va.applyReviver(r,{"":o},"",o):o}};tn.NodeBase=as});var Oe=y(sn=>{"use strict";var Ga=at(),Wa=ke(),ue=q(),Qa=ot(),Ha=V(),os=class extends Qa.NodeBase{constructor(e){super(ue.ALIAS),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e,t){let i;t?.aliasResolveCache?i=t.aliasResolveCache:(i=[],Wa.visit(e,{Node:(r,a)=>{(ue.isAlias(a)||ue.hasAnchor(a))&&i.push(a)}}),t&&(t.aliasResolveCache=i));let n;for(let r of i){if(r===this)break;r.anchor===this.source&&(n=r)}return n}toJSON(e,t){if(!t)return{source:this.source};let{anchors:i,doc:n,maxAliasCount:r}=t,a=this.resolve(n,t);if(!a){let l=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(l)}let o=i.get(a);if(o||(Ha.toJS(a,null,t),o=i.get(a)),o?.res===void 0){let l="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(l)}if(r>=0&&(o.count+=1,o.aliasCount===0&&(o.aliasCount=lt(n,a,i)),o.count*o.aliasCount>r)){let l="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(l)}return o.res}toString(e,t,i){let n=`*${this.source}`;if(e){if(Ga.anchorIsValid(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let r=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(r)}if(e.implicitKey)return`${n} `}return n}};function lt(s,e,t){if(ue.isAlias(e)){let i=e.resolve(s),n=t&&i&&t.get(i);return n?n.count*n.aliasCount:0}else if(ue.isCollection(e)){let i=0;for(let n of e.items){let r=lt(s,n,t);r>i&&(i=r)}return i}else if(ue.isPair(e)){let i=lt(s,e.key,t),n=lt(s,e.value,t);return Math.max(i,n)}return 1}sn.Alias=os});var L=y(ls=>{"use strict";var Xa=q(),za=ot(),Za=V(),eo=s=>!s||typeof s!="function"&&typeof s!="object",J=class extends za.NodeBase{constructor(e){super(Xa.SCALAR),this.value=e}toJSON(e,t){return t?.keep?this.value:Za.toJS(this.value,e,t)}toString(){return String(this.value)}};J.BLOCK_FOLDED="BLOCK_FOLDED";J.BLOCK_LITERAL="BLOCK_LITERAL";J.PLAIN="PLAIN";J.QUOTE_DOUBLE="QUOTE_DOUBLE";J.QUOTE_SINGLE="QUOTE_SINGLE";ls.Scalar=J;ls.isScalarValue=eo});var Ee=y(rn=>{"use strict";var to=Oe(),te=q(),nn=L(),so="tag:yaml.org,2002:";function io(s,e,t){if(e){let i=t.filter(r=>r.tag===e),n=i.find(r=>!r.format)??i[0];if(!n)throw new Error(`Tag ${e} not found`);return n}return t.find(i=>i.identify?.(s)&&!i.format)}function no(s,e,t){if(te.isDocument(s)&&(s=s.contents),te.isNode(s))return s;if(te.isPair(s)){let f=t.schema[te.MAP].createNode?.(t.schema,null,t);return f.items.push(s),f}(s instanceof String||s instanceof Number||s instanceof Boolean||typeof BigInt<"u"&&s instanceof BigInt)&&(s=s.valueOf());let{aliasDuplicateObjects:i,onAnchor:n,onTagObj:r,schema:a,sourceObjects:o}=t,l;if(i&&s&&typeof s=="object"){if(l=o.get(s),l)return l.anchor??(l.anchor=n(s)),new to.Alias(l.anchor);l={anchor:null,node:null},o.set(s,l)}e?.startsWith("!!")&&(e=so+e.slice(2));let c=io(s,e,a.tags);if(!c){if(s&&typeof s.toJSON=="function"&&(s=s.toJSON()),!s||typeof s!="object"){let f=new nn.Scalar(s);return l&&(l.node=f),f}c=s instanceof Map?a[te.MAP]:Symbol.iterator in Object(s)?a[te.SEQ]:a[te.MAP]}r&&(r(c),delete t.onTagObj);let d=c?.createNode?c.createNode(t.schema,s,t):typeof c?.nodeClass?.from=="function"?c.nodeClass.from(t.schema,s,t):new nn.Scalar(s);return e?d.tag=e:c.default||(d.tag=c.tag),l&&(l.node=d),d}rn.createNode=no});var ft=y(ct=>{"use strict";var ro=Ee(),j=q(),ao=ot();function cs(s,e,t){let i=t;for(let n=e.length-1;n>=0;--n){let r=e[n];if(typeof r=="number"&&Number.isInteger(r)&&r>=0){let a=[];a[r]=i,i=a}else i=new Map([[r,i]])}return ro.createNode(i,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:s,sourceObjects:new Map})}var an=s=>s==null||typeof s=="object"&&!!s[Symbol.iterator]().next().done,fs=class extends ao.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));return e&&(t.schema=e),t.items=t.items.map(i=>j.isNode(i)||j.isPair(i)?i.clone(e):i),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(an(e))this.add(t);else{let[i,...n]=e,r=this.get(i,!0);if(j.isCollection(r))r.addIn(n,t);else if(r===void 0&&this.schema)this.set(i,cs(this.schema,n,t));else throw new Error(`Expected YAML collection at ${i}. Remaining path: ${n}`)}}deleteIn(e){let[t,...i]=e;if(i.length===0)return this.delete(t);let n=this.get(t,!0);if(j.isCollection(n))return n.deleteIn(i);throw new Error(`Expected YAML collection at ${t}. Remaining path: ${i}`)}getIn(e,t){let[i,...n]=e,r=this.get(i,!0);return n.length===0?!t&&j.isScalar(r)?r.value:r:j.isCollection(r)?r.getIn(n,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!j.isPair(t))return!1;let i=t.value;return i==null||e&&j.isScalar(i)&&i.value==null&&!i.commentBefore&&!i.comment&&!i.tag})}hasIn(e){let[t,...i]=e;if(i.length===0)return this.has(t);let n=this.get(t,!0);return j.isCollection(n)?n.hasIn(i):!1}setIn(e,t){let[i,...n]=e;if(n.length===0)this.set(i,t);else{let r=this.get(i,!0);if(j.isCollection(r))r.setIn(n,t);else if(r===void 0&&this.schema)this.set(i,cs(this.schema,n,t));else throw new Error(`Expected YAML collection at ${i}. Remaining path: ${n}`)}}};ct.Collection=fs;ct.collectionFromPath=cs;ct.isEmptyPath=an});var Te=y(ut=>{"use strict";var oo=s=>s.replace(/^(?!$)(?: $)?/gm,"#");function us(s,e){return/^\n+$/.test(s)?s.substring(1):e?s.replace(/^(?! *$)/gm,e):s}var lo=(s,e,t)=>s.endsWith(`
|
|
3
|
-
`)?us(t,e):t.includes(`
|
|
4
|
-
`)?`
|
|
5
|
-
`+us(t,e):(s.endsWith(" ")?"":" ")+t;ut.indentComment=us;ut.lineComment=lo;ut.stringifyComment=oo});var ln=y(Le=>{"use strict";var co="flow",hs="block",ht="quoted";function fo(s,e,t="flow",{indentAtStart:i,lineWidth:n=80,minContentWidth:r=20,onFold:a,onOverflow:o}={}){if(!n||n<0)return s;n<r&&(r=0);let l=Math.max(1+r,1+n-e.length);if(s.length<=l)return s;let c=[],d={},f=n-e.length;typeof i=="number"&&(i>n-Math.max(2,r)?c.push(0):f=n-i);let u,m,g=!1,h=-1,p=-1,S=-1;t===hs&&(h=on(s,h,e.length),h!==-1&&(f=h+l));for(let v;v=s[h+=1];){if(t===ht&&v==="\\"){switch(p=h,s[h+1]){case"x":h+=3;break;case"u":h+=5;break;case"U":h+=9;break;default:h+=1}S=h}if(v===`
|
|
6
|
-
`)t===hs&&(h=on(s,h,e.length)),f=h+e.length+l,u=void 0;else{if(v===" "&&m&&m!==" "&&m!==`
|
|
7
|
-
`&&m!==" "){let k=s[h+1];k&&k!==" "&&k!==`
|
|
8
|
-
`&&k!==" "&&(u=h)}if(h>=f)if(u)c.push(u),f=u+l,u=void 0;else if(t===ht){for(;m===" "||m===" ";)m=v,v=s[h+=1],g=!0;let k=h>S+1?h-2:p-1;if(d[k])return s;c.push(k),d[k]=!0,f=k+l,u=void 0}else g=!0}m=v}if(g&&o&&o(),c.length===0)return s;a&&a();let w=s.slice(0,c[0]);for(let v=0;v<c.length;++v){let k=c[v],N=c[v+1]||s.length;k===0?w=`
|
|
9
|
-
${e}${s.slice(0,N)}`:(t===ht&&d[k]&&(w+=`${s[k]}\\`),w+=`
|
|
10
|
-
${e}${s.slice(k+1,N)}`)}return w}function on(s,e,t){let i=e,n=e+1,r=s[n];for(;r===" "||r===" ";)if(e<n+t)r=s[++e];else{do r=s[++e];while(r&&r!==`
|
|
11
|
-
`);i=e,n=e+1,r=s[n]}return i}Le.FOLD_BLOCK=hs;Le.FOLD_FLOW=co;Le.FOLD_QUOTED=ht;Le.foldFlowLines=fo});var Ie=y(cn=>{"use strict";var B=L(),G=ln(),pt=(s,e)=>({indentAtStart:e?s.indent.length:s.indentAtStart,lineWidth:s.options.lineWidth,minContentWidth:s.options.minContentWidth}),mt=s=>/^(%|---|\.\.\.)/m.test(s);function uo(s,e,t){if(!e||e<0)return!1;let i=e-t,n=s.length;if(n<=i)return!1;for(let r=0,a=0;r<n;++r)if(s[r]===`
|
|
12
|
-
`){if(r-a>i)return!0;if(a=r+1,n-a<=i)return!1}return!0}function Ce(s,e){let t=JSON.stringify(s);if(e.options.doubleQuotedAsJSON)return t;let{implicitKey:i}=e,n=e.options.doubleQuotedMinMultiLineLength,r=e.indent||(mt(s)?" ":""),a="",o=0;for(let l=0,c=t[l];c;c=t[++l])if(c===" "&&t[l+1]==="\\"&&t[l+2]==="n"&&(a+=t.slice(o,l)+"\\ ",l+=1,o=l,c="\\"),c==="\\")switch(t[l+1]){case"u":{a+=t.slice(o,l);let d=t.substr(l+2,4);switch(d){case"0000":a+="\\0";break;case"0007":a+="\\a";break;case"000b":a+="\\v";break;case"001b":a+="\\e";break;case"0085":a+="\\N";break;case"00a0":a+="\\_";break;case"2028":a+="\\L";break;case"2029":a+="\\P";break;default:d.substr(0,2)==="00"?a+="\\x"+d.substr(2):a+=t.substr(l,6)}l+=5,o=l+1}break;case"n":if(i||t[l+2]==='"'||t.length<n)l+=1;else{for(a+=t.slice(o,l)+`
|
|
13
|
-
|
|
14
|
-
`;t[l+2]==="\\"&&t[l+3]==="n"&&t[l+4]!=='"';)a+=`
|
|
15
|
-
`,l+=2;a+=r,t[l+2]===" "&&(a+="\\"),l+=1,o=l+1}break;default:l+=1}return a=o?a+t.slice(o):t,i?a:G.foldFlowLines(a,r,G.FOLD_QUOTED,pt(e,!1))}function ds(s,e){if(e.options.singleQuote===!1||e.implicitKey&&s.includes(`
|
|
16
|
-
`)||/[ \t]\n|\n[ \t]/.test(s))return Ce(s,e);let t=e.indent||(mt(s)?" ":""),i="'"+s.replace(/'/g,"''").replace(/\n+/g,`$&
|
|
17
|
-
${t}`)+"'";return e.implicitKey?i:G.foldFlowLines(i,t,G.FOLD_FLOW,pt(e,!1))}function he(s,e){let{singleQuote:t}=e.options,i;if(t===!1)i=Ce;else{let n=s.includes('"'),r=s.includes("'");n&&!r?i=ds:r&&!n?i=Ce:i=t?ds:Ce}return i(s,e)}var ps;try{ps=new RegExp(`(^|(?<!
|
|
18
|
-
))
|
|
19
|
-
+(?!
|
|
20
|
-
|$)`,"g")}catch{ps=/\n+(?!\n|$)/g}function dt({comment:s,type:e,value:t},i,n,r){let{blockQuote:a,commentString:o,lineWidth:l}=i.options;if(!a||/\n[\t ]+$/.test(t))return he(t,i);let c=i.indent||(i.forceBlockIndent||mt(t)?" ":""),d=a==="literal"?!0:a==="folded"||e===B.Scalar.BLOCK_FOLDED?!1:e===B.Scalar.BLOCK_LITERAL?!0:!uo(t,l,c.length);if(!t)return d?`|
|
|
21
|
-
`:`>
|
|
22
|
-
`;let f,u;for(u=t.length;u>0;--u){let N=t[u-1];if(N!==`
|
|
23
|
-
`&&N!==" "&&N!==" ")break}let m=t.substring(u),g=m.indexOf(`
|
|
24
|
-
`);g===-1?f="-":t===m||g!==m.length-1?(f="+",r&&r()):f="",m&&(t=t.slice(0,-m.length),m[m.length-1]===`
|
|
25
|
-
`&&(m=m.slice(0,-1)),m=m.replace(ps,`$&${c}`));let h=!1,p,S=-1;for(p=0;p<t.length;++p){let N=t[p];if(N===" ")h=!0;else if(N===`
|
|
26
|
-
`)S=p;else break}let w=t.substring(0,S<p?S+1:p);w&&(t=t.substring(w.length),w=w.replace(/\n+/g,`$&${c}`));let k=(h?c?"2":"1":"")+f;if(s&&(k+=" "+o(s.replace(/ ?[\r\n]+/g," ")),n&&n()),!d){let N=t.replace(/\n+/g,`
|
|
27
|
-
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${c}`),A=!1,E=pt(i,!0);a!=="folded"&&e!==B.Scalar.BLOCK_FOLDED&&(E.onOverflow=()=>{A=!0});let b=G.foldFlowLines(`${w}${N}${m}`,c,G.FOLD_BLOCK,E);if(!A)return`>${k}
|
|
28
|
-
${c}${b}`}return t=t.replace(/\n+/g,`$&${c}`),`|${k}
|
|
29
|
-
${c}${w}${t}${m}`}function ho(s,e,t,i){let{type:n,value:r}=s,{actualString:a,implicitKey:o,indent:l,indentStep:c,inFlow:d}=e;if(o&&r.includes(`
|
|
30
|
-
`)||d&&/[[\]{},]/.test(r))return he(r,e);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(r))return o||d||!r.includes(`
|
|
31
|
-
`)?he(r,e):dt(s,e,t,i);if(!o&&!d&&n!==B.Scalar.PLAIN&&r.includes(`
|
|
32
|
-
`))return dt(s,e,t,i);if(mt(r)){if(l==="")return e.forceBlockIndent=!0,dt(s,e,t,i);if(o&&l===c)return he(r,e)}let f=r.replace(/\n+/g,`$&
|
|
33
|
-
${l}`);if(a){let u=h=>h.default&&h.tag!=="tag:yaml.org,2002:str"&&h.test?.test(f),{compat:m,tags:g}=e.doc.schema;if(g.some(u)||m?.some(u))return he(r,e)}return o?f:G.foldFlowLines(f,l,G.FOLD_FLOW,pt(e,!1))}function po(s,e,t,i){let{implicitKey:n,inFlow:r}=e,a=typeof s.value=="string"?s:Object.assign({},s,{value:String(s.value)}),{type:o}=s;o!==B.Scalar.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(a.value)&&(o=B.Scalar.QUOTE_DOUBLE);let l=d=>{switch(d){case B.Scalar.BLOCK_FOLDED:case B.Scalar.BLOCK_LITERAL:return n||r?he(a.value,e):dt(a,e,t,i);case B.Scalar.QUOTE_DOUBLE:return Ce(a.value,e);case B.Scalar.QUOTE_SINGLE:return ds(a.value,e);case B.Scalar.PLAIN:return ho(a,e,t,i);default:return null}},c=l(o);if(c===null){let{defaultKeyType:d,defaultStringType:f}=e.options,u=n&&d||f;if(c=l(u),c===null)throw new Error(`Unsupported default string type ${u}`)}return c}cn.stringifyString=po});var Pe=y(ms=>{"use strict";var mo=at(),W=q(),yo=Te(),go=Ie();function bo(s,e){let t=Object.assign({blockQuote:!0,commentString:yo.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,trueStr:"true",verifyAliasOrder:!0},s.schema.toStringOptions,e),i;switch(t.collectionStyle){case"block":i=!1;break;case"flow":i=!0;break;default:i=null}return{anchors:new Set,doc:s,flowCollectionPadding:t.flowCollectionPadding?" ":"",indent:"",indentStep:typeof t.indent=="number"?" ".repeat(t.indent):" ",inFlow:i,options:t}}function So(s,e){if(e.tag){let n=s.filter(r=>r.tag===e.tag);if(n.length>0)return n.find(r=>r.format===e.format)??n[0]}let t,i;if(W.isScalar(e)){i=e.value;let n=s.filter(r=>r.identify?.(i));if(n.length>1){let r=n.filter(a=>a.test);r.length>0&&(n=r)}t=n.find(r=>r.format===e.format)??n.find(r=>!r.format)}else i=e,t=s.find(n=>n.nodeClass&&i instanceof n.nodeClass);if(!t){let n=i?.constructor?.name??(i===null?"null":typeof i);throw new Error(`Tag not resolved for ${n} value`)}return t}function wo(s,e,{anchors:t,doc:i}){if(!i.directives)return"";let n=[],r=(W.isScalar(s)||W.isCollection(s))&&s.anchor;r&&mo.anchorIsValid(r)&&(t.add(r),n.push(`&${r}`));let a=s.tag??(e.default?null:e.tag);return a&&n.push(i.directives.tagString(a)),n.join(" ")}function vo(s,e,t,i){if(W.isPair(s))return s.toString(e,t,i);if(W.isAlias(s)){if(e.doc.directives)return s.toString(e);if(e.resolvedAliases?.has(s))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(s):e.resolvedAliases=new Set([s]),s=s.resolve(e.doc)}let n,r=W.isNode(s)?s:e.doc.createNode(s,{onTagObj:l=>n=l});n??(n=So(e.doc.schema.tags,r));let a=wo(r,n,e);a.length>0&&(e.indentAtStart=(e.indentAtStart??0)+a.length+1);let o=typeof n.stringify=="function"?n.stringify(r,e,t,i):W.isScalar(r)?go.stringifyString(r,e,t,i):r.toString(e,t,i);return a?W.isScalar(r)||o[0]==="{"||o[0]==="["?`${a} ${o}`:`${a}
|
|
34
|
-
${e.indent}${o}`:o}ms.createStringifyContext=bo;ms.stringify=vo});var dn=y(hn=>{"use strict";var U=q(),fn=L(),un=Pe(),$e=Te();function ko({key:s,value:e},t,i,n){let{allNullValues:r,doc:a,indent:o,indentStep:l,options:{commentString:c,indentSeq:d,simpleKeys:f}}=t,u=U.isNode(s)&&s.comment||null;if(f){if(u)throw new Error("With simple keys, key nodes cannot have comments");if(U.isCollection(s)||!U.isNode(s)&&typeof s=="object"){let E="With simple keys, collection cannot be used as a key value";throw new Error(E)}}let m=!f&&(!s||u&&e==null&&!t.inFlow||U.isCollection(s)||(U.isScalar(s)?s.type===fn.Scalar.BLOCK_FOLDED||s.type===fn.Scalar.BLOCK_LITERAL:typeof s=="object"));t=Object.assign({},t,{allNullValues:!1,implicitKey:!m&&(f||!r),indent:o+l});let g=!1,h=!1,p=un.stringify(s,t,()=>g=!0,()=>h=!0);if(!m&&!t.inFlow&&p.length>1024){if(f)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");m=!0}if(t.inFlow){if(r||e==null)return g&&i&&i(),p===""?"?":m?`? ${p}`:p}else if(r&&!f||e==null&&m)return p=`? ${p}`,u&&!g?p+=$e.lineComment(p,t.indent,c(u)):h&&n&&n(),p;g&&(u=null),m?(u&&(p+=$e.lineComment(p,t.indent,c(u))),p=`? ${p}
|
|
35
|
-
${o}:`):(p=`${p}:`,u&&(p+=$e.lineComment(p,t.indent,c(u))));let S,w,v;U.isNode(e)?(S=!!e.spaceBefore,w=e.commentBefore,v=e.comment):(S=!1,w=null,v=null,e&&typeof e=="object"&&(e=a.createNode(e))),t.implicitKey=!1,!m&&!u&&U.isScalar(e)&&(t.indentAtStart=p.length+1),h=!1,!d&&l.length>=2&&!t.inFlow&&!m&&U.isSeq(e)&&!e.flow&&!e.tag&&!e.anchor&&(t.indent=t.indent.substring(2));let k=!1,N=un.stringify(e,t,()=>k=!0,()=>h=!0),A=" ";if(u||S||w){if(A=S?`
|
|
36
|
-
`:"",w){let E=c(w);A+=`
|
|
37
|
-
${$e.indentComment(E,t.indent)}`}N===""&&!t.inFlow?A===`
|
|
38
|
-
`&&v&&(A=`
|
|
39
|
-
|
|
40
|
-
`):A+=`
|
|
41
|
-
${t.indent}`}else if(!m&&U.isCollection(e)){let E=N[0],b=N.indexOf(`
|
|
42
|
-
`),C=b!==-1,x=t.inFlow??e.flow??e.items.length===0;if(C||!x){let le=!1;if(C&&(E==="&"||E==="!")){let I=N.indexOf(" ");E==="&"&&I!==-1&&I<b&&N[I+1]==="!"&&(I=N.indexOf(" ",I+1)),(I===-1||b<I)&&(le=!0)}le||(A=`
|
|
43
|
-
${t.indent}`)}}else(N===""||N[0]===`
|
|
44
|
-
`)&&(A="");return p+=A+N,t.inFlow?k&&i&&i():v&&!k?p+=$e.lineComment(p,t.indent,c(v)):h&&n&&n(),p}hn.stringifyPair=ko});var gs=y(ys=>{"use strict";var pn=tt("process");function No(s,...e){s==="debug"&&console.log(...e)}function Ao(s,e){(s==="debug"||s==="warn")&&(typeof pn.emitWarning=="function"?pn.emitWarning(e):console.warn(e))}ys.debug=No;ys.warn=Ao});var St=y(bt=>{"use strict";var Me=q(),mn=L(),yt="<<",gt={identify:s=>s===yt||typeof s=="symbol"&&s.description===yt,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new mn.Scalar(Symbol(yt)),{addToJSMap:yn}),stringify:()=>yt},qo=(s,e)=>(gt.identify(e)||Me.isScalar(e)&&(!e.type||e.type===mn.Scalar.PLAIN)&>.identify(e.value))&&s?.doc.schema.tags.some(t=>t.tag===gt.tag&&t.default);function yn(s,e,t){if(t=s&&Me.isAlias(t)?t.resolve(s.doc):t,Me.isSeq(t))for(let i of t.items)bs(s,e,i);else if(Array.isArray(t))for(let i of t)bs(s,e,i);else bs(s,e,t)}function bs(s,e,t){let i=s&&Me.isAlias(t)?t.resolve(s.doc):t;if(!Me.isMap(i))throw new Error("Merge sources must be maps or map aliases");let n=i.toJSON(null,s,Map);for(let[r,a]of n)e instanceof Map?e.has(r)||e.set(r,a):e instanceof Set?e.add(r):Object.prototype.hasOwnProperty.call(e,r)||Object.defineProperty(e,r,{value:a,writable:!0,enumerable:!0,configurable:!0});return e}bt.addMergeToJSMap=yn;bt.isMergeKey=qo;bt.merge=gt});var ws=y(Sn=>{"use strict";var Oo=gs(),gn=St(),Eo=Pe(),bn=q(),Ss=V();function To(s,e,{key:t,value:i}){if(bn.isNode(t)&&t.addToJSMap)t.addToJSMap(s,e,i);else if(gn.isMergeKey(s,t))gn.addMergeToJSMap(s,e,i);else{let n=Ss.toJS(t,"",s);if(e instanceof Map)e.set(n,Ss.toJS(i,n,s));else if(e instanceof Set)e.add(n);else{let r=Lo(t,n,s),a=Ss.toJS(i,r,s);r in e?Object.defineProperty(e,r,{value:a,writable:!0,enumerable:!0,configurable:!0}):e[r]=a}}return e}function Lo(s,e,t){if(e===null)return"";if(typeof e!="object")return String(e);if(bn.isNode(s)&&t?.doc){let i=Eo.createStringifyContext(t.doc,{});i.anchors=new Set;for(let r of t.anchors.keys())i.anchors.add(r.anchor);i.inFlow=!0,i.inStringifyKey=!0;let n=s.toString(i);if(!t.mapKeyWarned){let r=JSON.stringify(n);r.length>40&&(r=r.substring(0,36)+'..."'),Oo.warn(t.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${r}. Set mapAsMap: true to use object keys.`),t.mapKeyWarned=!0}return n}return JSON.stringify(e)}Sn.addPairToJSMap=To});var Q=y(vs=>{"use strict";var wn=Ee(),Co=dn(),Io=ws(),wt=q();function Po(s,e,t){let i=wn.createNode(s,void 0,t),n=wn.createNode(e,void 0,t);return new vt(i,n)}var vt=class s{constructor(e,t=null){Object.defineProperty(this,wt.NODE_TYPE,{value:wt.PAIR}),this.key=e,this.value=t}clone(e){let{key:t,value:i}=this;return wt.isNode(t)&&(t=t.clone(e)),wt.isNode(i)&&(i=i.clone(e)),new s(t,i)}toJSON(e,t){let i=t?.mapAsMap?new Map:{};return Io.addPairToJSMap(t,i,this)}toString(e,t,i){return e?.doc?Co.stringifyPair(this,e,t,i):JSON.stringify(this)}};vs.Pair=vt;vs.createPair=Po});var ks=y(kn=>{"use strict";var se=q(),vn=Pe(),kt=Te();function $o(s,e,t){return(e.inFlow??s.flow?Do:Mo)(s,e,t)}function Mo({comment:s,items:e},t,{blockItemPrefix:i,flowChars:n,itemIndent:r,onChompKeep:a,onComment:o}){let{indent:l,options:{commentString:c}}=t,d=Object.assign({},t,{indent:r,type:null}),f=!1,u=[];for(let g=0;g<e.length;++g){let h=e[g],p=null;if(se.isNode(h))!f&&h.spaceBefore&&u.push(""),Nt(t,u,h.commentBefore,f),h.comment&&(p=h.comment);else if(se.isPair(h)){let w=se.isNode(h.key)?h.key:null;w&&(!f&&w.spaceBefore&&u.push(""),Nt(t,u,w.commentBefore,f))}f=!1;let S=vn.stringify(h,d,()=>p=null,()=>f=!0);p&&(S+=kt.lineComment(S,r,c(p))),f&&p&&(f=!1),u.push(i+S)}let m;if(u.length===0)m=n.start+n.end;else{m=u[0];for(let g=1;g<u.length;++g){let h=u[g];m+=h?`
|
|
45
|
-
${l}${h}`:`
|
|
46
|
-
`}}return s?(m+=`
|
|
47
|
-
`+kt.indentComment(c(s),l),o&&o()):f&&a&&a(),m}function Do({items:s},e,{flowChars:t,itemIndent:i}){let{indent:n,indentStep:r,flowCollectionPadding:a,options:{commentString:o}}=e;i+=r;let l=Object.assign({},e,{indent:i,inFlow:!0,type:null}),c=!1,d=0,f=[];for(let g=0;g<s.length;++g){let h=s[g],p=null;if(se.isNode(h))h.spaceBefore&&f.push(""),Nt(e,f,h.commentBefore,!1),h.comment&&(p=h.comment);else if(se.isPair(h)){let w=se.isNode(h.key)?h.key:null;w&&(w.spaceBefore&&f.push(""),Nt(e,f,w.commentBefore,!1),w.comment&&(c=!0));let v=se.isNode(h.value)?h.value:null;v?(v.comment&&(p=v.comment),v.commentBefore&&(c=!0)):h.value==null&&w?.comment&&(p=w.comment)}p&&(c=!0);let S=vn.stringify(h,l,()=>p=null);g<s.length-1&&(S+=","),p&&(S+=kt.lineComment(S,i,o(p))),!c&&(f.length>d||S.includes(`
|
|
48
|
-
`))&&(c=!0),f.push(S),d=f.length}let{start:u,end:m}=t;if(f.length===0)return u+m;if(!c){let g=f.reduce((h,p)=>h+p.length+2,2);c=e.options.lineWidth>0&&g>e.options.lineWidth}if(c){let g=u;for(let h of f)g+=h?`
|
|
49
|
-
${r}${n}${h}`:`
|
|
50
|
-
`;return`${g}
|
|
51
|
-
${n}${m}`}else return`${u}${a}${f.join(" ")}${a}${m}`}function Nt({indent:s,options:{commentString:e}},t,i,n){if(i&&n&&(i=i.replace(/^\n+/,"")),i){let r=kt.indentComment(e(i),s);t.push(r.trimStart())}}kn.stringifyCollection=$o});var X=y(As=>{"use strict";var _o=ks(),Bo=ws(),Fo=ft(),H=q(),At=Q(),Ko=L();function De(s,e){let t=H.isScalar(e)?e.value:e;for(let i of s)if(H.isPair(i)&&(i.key===e||i.key===t||H.isScalar(i.key)&&i.key.value===t))return i}var Ns=class extends Fo.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(H.MAP,e),this.items=[]}static from(e,t,i){let{keepUndefined:n,replacer:r}=i,a=new this(e),o=(l,c)=>{if(typeof r=="function")c=r.call(t,l,c);else if(Array.isArray(r)&&!r.includes(l))return;(c!==void 0||n)&&a.items.push(At.createPair(l,c,i))};if(t instanceof Map)for(let[l,c]of t)o(l,c);else if(t&&typeof t=="object")for(let l of Object.keys(t))o(l,t[l]);return typeof e.sortMapEntries=="function"&&a.items.sort(e.sortMapEntries),a}add(e,t){let i;H.isPair(e)?i=e:!e||typeof e!="object"||!("key"in e)?i=new At.Pair(e,e?.value):i=new At.Pair(e.key,e.value);let n=De(this.items,i.key),r=this.schema?.sortMapEntries;if(n){if(!t)throw new Error(`Key ${i.key} already set`);H.isScalar(n.value)&&Ko.isScalarValue(i.value)?n.value.value=i.value:n.value=i.value}else if(r){let a=this.items.findIndex(o=>r(i,o)<0);a===-1?this.items.push(i):this.items.splice(a,0,i)}else this.items.push(i)}delete(e){let t=De(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){let n=De(this.items,e)?.value;return(!t&&H.isScalar(n)?n.value:n)??void 0}has(e){return!!De(this.items,e)}set(e,t){this.add(new At.Pair(e,t),!0)}toJSON(e,t,i){let n=i?new i:t?.mapAsMap?new Map:{};t?.onCreate&&t.onCreate(n);for(let r of this.items)Bo.addPairToJSMap(t,n,r);return n}toString(e,t,i){if(!e)return JSON.stringify(this);for(let n of this.items)if(!H.isPair(n))throw new Error(`Map items must all be pairs; found ${JSON.stringify(n)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),_o.stringifyCollection(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:i,onComment:t})}};As.YAMLMap=Ns;As.findPair=De});var de=y(An=>{"use strict";var jo=q(),Nn=X(),Ro={collection:"map",default:!0,nodeClass:Nn.YAMLMap,tag:"tag:yaml.org,2002:map",resolve(s,e){return jo.isMap(s)||e("Expected a mapping for this tag"),s},createNode:(s,e,t)=>Nn.YAMLMap.from(s,e,t)};An.map=Ro});var z=y(qn=>{"use strict";var Uo=Ee(),Yo=ks(),xo=ft(),Ot=q(),Vo=L(),Jo=V(),qs=class extends xo.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(Ot.SEQ,e),this.items=[]}add(e){this.items.push(e)}delete(e){let t=qt(e);return typeof t!="number"?!1:this.items.splice(t,1).length>0}get(e,t){let i=qt(e);if(typeof i!="number")return;let n=this.items[i];return!t&&Ot.isScalar(n)?n.value:n}has(e){let t=qt(e);return typeof t=="number"&&t<this.items.length}set(e,t){let i=qt(e);if(typeof i!="number")throw new Error(`Expected a valid index, not ${e}.`);let n=this.items[i];Ot.isScalar(n)&&Vo.isScalarValue(t)?n.value=t:this.items[i]=t}toJSON(e,t){let i=[];t?.onCreate&&t.onCreate(i);let n=0;for(let r of this.items)i.push(Jo.toJS(r,String(n++),t));return i}toString(e,t,i){return e?Yo.stringifyCollection(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:i,onComment:t}):JSON.stringify(this)}static from(e,t,i){let{replacer:n}=i,r=new this(e);if(t&&Symbol.iterator in Object(t)){let a=0;for(let o of t){if(typeof n=="function"){let l=t instanceof Set?o:String(a++);o=n.call(t,l,o)}r.items.push(Uo.createNode(o,void 0,i))}}return r}};function qt(s){let e=Ot.isScalar(s)?s.value:s;return e&&typeof e=="string"&&(e=Number(e)),typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}qn.YAMLSeq=qs});var pe=y(En=>{"use strict";var Go=q(),On=z(),Wo={collection:"seq",default:!0,nodeClass:On.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve(s,e){return Go.isSeq(s)||e("Expected a sequence for this tag"),s},createNode:(s,e,t)=>On.YAMLSeq.from(s,e,t)};En.seq=Wo});var _e=y(Tn=>{"use strict";var Qo=Ie(),Ho={identify:s=>typeof s=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:s=>s,stringify(s,e,t,i){return e=Object.assign({actualString:!0},e),Qo.stringifyString(s,e,t,i)}};Tn.string=Ho});var Et=y(In=>{"use strict";var Ln=L(),Cn={identify:s=>s==null,createNode:()=>new Ln.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new Ln.Scalar(null),stringify:({source:s},e)=>typeof s=="string"&&Cn.test.test(s)?s:e.options.nullStr};In.nullTag=Cn});var Os=y($n=>{"use strict";var Xo=L(),Pn={identify:s=>typeof s=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:s=>new Xo.Scalar(s[0]==="t"||s[0]==="T"),stringify({source:s,value:e},t){if(s&&Pn.test.test(s)){let i=s[0]==="t"||s[0]==="T";if(e===i)return s}return e?t.options.trueStr:t.options.falseStr}};$n.boolTag=Pn});var me=y(Mn=>{"use strict";function zo({format:s,minFractionDigits:e,tag:t,value:i}){if(typeof i=="bigint")return String(i);let n=typeof i=="number"?i:Number(i);if(!isFinite(n))return isNaN(n)?".nan":n<0?"-.inf":".inf";let r=Object.is(i,-0)?"-0":JSON.stringify(i);if(!s&&e&&(!t||t==="tag:yaml.org,2002:float")&&/^\d/.test(r)){let a=r.indexOf(".");a<0&&(a=r.length,r+=".");let o=e-(r.length-a-1);for(;o-- >0;)r+="0"}return r}Mn.stringifyNumber=zo});var Ts=y(Tt=>{"use strict";var Zo=L(),Es=me(),el={identify:s=>typeof s=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:s=>s.slice(-3).toLowerCase()==="nan"?NaN:s[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Es.stringifyNumber},tl={identify:s=>typeof s=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:s=>parseFloat(s),stringify(s){let e=Number(s.value);return isFinite(e)?e.toExponential():Es.stringifyNumber(s)}},sl={identify:s=>typeof s=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(s){let e=new Zo.Scalar(parseFloat(s)),t=s.indexOf(".");return t!==-1&&s[s.length-1]==="0"&&(e.minFractionDigits=s.length-t-1),e},stringify:Es.stringifyNumber};Tt.float=sl;Tt.floatExp=tl;Tt.floatNaN=el});var Cs=y(Ct=>{"use strict";var Dn=me(),Lt=s=>typeof s=="bigint"||Number.isInteger(s),Ls=(s,e,t,{intAsBigInt:i})=>i?BigInt(s):parseInt(s.substring(e),t);function _n(s,e,t){let{value:i}=s;return Lt(i)&&i>=0?t+i.toString(e):Dn.stringifyNumber(s)}var il={identify:s=>Lt(s)&&s>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(s,e,t)=>Ls(s,2,8,t),stringify:s=>_n(s,8,"0o")},nl={identify:Lt,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(s,e,t)=>Ls(s,0,10,t),stringify:Dn.stringifyNumber},rl={identify:s=>Lt(s)&&s>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(s,e,t)=>Ls(s,2,16,t),stringify:s=>_n(s,16,"0x")};Ct.int=nl;Ct.intHex=rl;Ct.intOct=il});var Fn=y(Bn=>{"use strict";var al=de(),ol=Et(),ll=pe(),cl=_e(),fl=Os(),Is=Ts(),Ps=Cs(),ul=[al.map,ll.seq,cl.string,ol.nullTag,fl.boolTag,Ps.intOct,Ps.int,Ps.intHex,Is.floatNaN,Is.floatExp,Is.float];Bn.schema=ul});var Rn=y(jn=>{"use strict";var hl=L(),dl=de(),pl=pe();function Kn(s){return typeof s=="bigint"||Number.isInteger(s)}var It=({value:s})=>JSON.stringify(s),ml=[{identify:s=>typeof s=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:s=>s,stringify:It},{identify:s=>s==null,createNode:()=>new hl.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:It},{identify:s=>typeof s=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:s=>s==="true",stringify:It},{identify:Kn,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(s,e,{intAsBigInt:t})=>t?BigInt(s):parseInt(s,10),stringify:({value:s})=>Kn(s)?s.toString():JSON.stringify(s)},{identify:s=>typeof s=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:s=>parseFloat(s),stringify:It}],yl={default:!0,tag:"",test:/^/,resolve(s,e){return e(`Unresolved plain scalar ${JSON.stringify(s)}`),s}},gl=[dl.map,pl.seq].concat(ml,yl);jn.schema=gl});var Ms=y(Un=>{"use strict";var Be=tt("buffer"),$s=L(),bl=Ie(),Sl={identify:s=>s instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(s,e){if(typeof Be.Buffer=="function")return Be.Buffer.from(s,"base64");if(typeof atob=="function"){let t=atob(s.replace(/[\n\r]/g,"")),i=new Uint8Array(t.length);for(let n=0;n<t.length;++n)i[n]=t.charCodeAt(n);return i}else return e("This environment does not support reading binary tags; either Buffer or atob is required"),s},stringify({comment:s,type:e,value:t},i,n,r){if(!t)return"";let a=t,o;if(typeof Be.Buffer=="function")o=a instanceof Be.Buffer?a.toString("base64"):Be.Buffer.from(a.buffer).toString("base64");else if(typeof btoa=="function"){let l="";for(let c=0;c<a.length;++c)l+=String.fromCharCode(a[c]);o=btoa(l)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(e??(e=$s.Scalar.BLOCK_LITERAL),e!==$s.Scalar.QUOTE_DOUBLE){let l=Math.max(i.options.lineWidth-i.indent.length,i.options.minContentWidth),c=Math.ceil(o.length/l),d=new Array(c);for(let f=0,u=0;f<c;++f,u+=l)d[f]=o.substr(u,l);o=d.join(e===$s.Scalar.BLOCK_LITERAL?`
|
|
52
|
-
`:" ")}return bl.stringifyString({comment:s,type:e,value:o},i,n,r)}};Un.binary=Sl});var Mt=y($t=>{"use strict";var Pt=q(),Ds=Q(),wl=L(),vl=z();function Yn(s,e){if(Pt.isSeq(s))for(let t=0;t<s.items.length;++t){let i=s.items[t];if(!Pt.isPair(i)){if(Pt.isMap(i)){i.items.length>1&&e("Each pair must have its own sequence indicator");let n=i.items[0]||new Ds.Pair(new wl.Scalar(null));if(i.commentBefore&&(n.key.commentBefore=n.key.commentBefore?`${i.commentBefore}
|
|
53
|
-
${n.key.commentBefore}`:i.commentBefore),i.comment){let r=n.value??n.key;r.comment=r.comment?`${i.comment}
|
|
54
|
-
${r.comment}`:i.comment}i=n}s.items[t]=Pt.isPair(i)?i:new Ds.Pair(i)}}else e("Expected a sequence for this tag");return s}function xn(s,e,t){let{replacer:i}=t,n=new vl.YAMLSeq(s);n.tag="tag:yaml.org,2002:pairs";let r=0;if(e&&Symbol.iterator in Object(e))for(let a of e){typeof i=="function"&&(a=i.call(e,String(r++),a));let o,l;if(Array.isArray(a))if(a.length===2)o=a[0],l=a[1];else throw new TypeError(`Expected [key, value] tuple: ${a}`);else if(a&&a instanceof Object){let c=Object.keys(a);if(c.length===1)o=c[0],l=a[o];else throw new TypeError(`Expected tuple with one key, not ${c.length} keys`)}else o=a;n.items.push(Ds.createPair(o,l,t))}return n}var kl={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:Yn,createNode:xn};$t.createPairs=xn;$t.pairs=kl;$t.resolvePairs=Yn});var Fs=y(Bs=>{"use strict";var Vn=q(),_s=V(),Fe=X(),Nl=z(),Jn=Mt(),ie=class s extends Nl.YAMLSeq{constructor(){super(),this.add=Fe.YAMLMap.prototype.add.bind(this),this.delete=Fe.YAMLMap.prototype.delete.bind(this),this.get=Fe.YAMLMap.prototype.get.bind(this),this.has=Fe.YAMLMap.prototype.has.bind(this),this.set=Fe.YAMLMap.prototype.set.bind(this),this.tag=s.tag}toJSON(e,t){if(!t)return super.toJSON(e);let i=new Map;t?.onCreate&&t.onCreate(i);for(let n of this.items){let r,a;if(Vn.isPair(n)?(r=_s.toJS(n.key,"",t),a=_s.toJS(n.value,r,t)):r=_s.toJS(n,"",t),i.has(r))throw new Error("Ordered maps must not include duplicate keys");i.set(r,a)}return i}static from(e,t,i){let n=Jn.createPairs(e,t,i),r=new this;return r.items=n.items,r}};ie.tag="tag:yaml.org,2002:omap";var Al={collection:"seq",identify:s=>s instanceof Map,nodeClass:ie,default:!1,tag:"tag:yaml.org,2002:omap",resolve(s,e){let t=Jn.resolvePairs(s,e),i=[];for(let{key:n}of t.items)Vn.isScalar(n)&&(i.includes(n.value)?e(`Ordered maps must not include duplicate keys: ${n.value}`):i.push(n.value));return Object.assign(new ie,t)},createNode:(s,e,t)=>ie.from(s,e,t)};Bs.YAMLOMap=ie;Bs.omap=Al});var Xn=y(Ks=>{"use strict";var Gn=L();function Wn({value:s,source:e},t){return e&&(s?Qn:Hn).test.test(e)?e:s?t.options.trueStr:t.options.falseStr}var Qn={identify:s=>s===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new Gn.Scalar(!0),stringify:Wn},Hn={identify:s=>s===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new Gn.Scalar(!1),stringify:Wn};Ks.falseTag=Hn;Ks.trueTag=Qn});var zn=y(Dt=>{"use strict";var ql=L(),js=me(),Ol={identify:s=>typeof s=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:s=>s.slice(-3).toLowerCase()==="nan"?NaN:s[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:js.stringifyNumber},El={identify:s=>typeof s=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:s=>parseFloat(s.replace(/_/g,"")),stringify(s){let e=Number(s.value);return isFinite(e)?e.toExponential():js.stringifyNumber(s)}},Tl={identify:s=>typeof s=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(s){let e=new ql.Scalar(parseFloat(s.replace(/_/g,""))),t=s.indexOf(".");if(t!==-1){let i=s.substring(t+1).replace(/_/g,"");i[i.length-1]==="0"&&(e.minFractionDigits=i.length)}return e},stringify:js.stringifyNumber};Dt.float=Tl;Dt.floatExp=El;Dt.floatNaN=Ol});var er=y(je=>{"use strict";var Zn=me(),Ke=s=>typeof s=="bigint"||Number.isInteger(s);function _t(s,e,t,{intAsBigInt:i}){let n=s[0];if((n==="-"||n==="+")&&(e+=1),s=s.substring(e).replace(/_/g,""),i){switch(t){case 2:s=`0b${s}`;break;case 8:s=`0o${s}`;break;case 16:s=`0x${s}`;break}let a=BigInt(s);return n==="-"?BigInt(-1)*a:a}let r=parseInt(s,t);return n==="-"?-1*r:r}function Rs(s,e,t){let{value:i}=s;if(Ke(i)){let n=i.toString(e);return i<0?"-"+t+n.substr(1):t+n}return Zn.stringifyNumber(s)}var Ll={identify:Ke,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(s,e,t)=>_t(s,2,2,t),stringify:s=>Rs(s,2,"0b")},Cl={identify:Ke,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(s,e,t)=>_t(s,1,8,t),stringify:s=>Rs(s,8,"0")},Il={identify:Ke,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(s,e,t)=>_t(s,0,10,t),stringify:Zn.stringifyNumber},Pl={identify:Ke,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(s,e,t)=>_t(s,2,16,t),stringify:s=>Rs(s,16,"0x")};je.int=Il;je.intBin=Ll;je.intHex=Pl;je.intOct=Cl});var Ys=y(Us=>{"use strict";var Kt=q(),Bt=Q(),Ft=X(),ne=class s extends Ft.YAMLMap{constructor(e){super(e),this.tag=s.tag}add(e){let t;Kt.isPair(e)?t=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?t=new Bt.Pair(e.key,null):t=new Bt.Pair(e,null),Ft.findPair(this.items,t.key)||this.items.push(t)}get(e,t){let i=Ft.findPair(this.items,e);return!t&&Kt.isPair(i)?Kt.isScalar(i.key)?i.key.value:i.key:i}set(e,t){if(typeof t!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);let i=Ft.findPair(this.items,e);i&&!t?this.items.splice(this.items.indexOf(i),1):!i&&t&&this.items.push(new Bt.Pair(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,i){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,i);throw new Error("Set items must all have null values")}static from(e,t,i){let{replacer:n}=i,r=new this(e);if(t&&Symbol.iterator in Object(t))for(let a of t)typeof n=="function"&&(a=n.call(t,a,a)),r.items.push(Bt.createPair(a,null,i));return r}};ne.tag="tag:yaml.org,2002:set";var $l={collection:"map",identify:s=>s instanceof Set,nodeClass:ne,default:!1,tag:"tag:yaml.org,2002:set",createNode:(s,e,t)=>ne.from(s,e,t),resolve(s,e){if(Kt.isMap(s)){if(s.hasAllNullValues(!0))return Object.assign(new ne,s);e("Set items must all have null values")}else e("Expected a mapping for this tag");return s}};Us.YAMLSet=ne;Us.set=$l});var Vs=y(jt=>{"use strict";var Ml=me();function xs(s,e){let t=s[0],i=t==="-"||t==="+"?s.substring(1):s,n=a=>e?BigInt(a):Number(a),r=i.replace(/_/g,"").split(":").reduce((a,o)=>a*n(60)+n(o),n(0));return t==="-"?n(-1)*r:r}function tr(s){let{value:e}=s,t=a=>a;if(typeof e=="bigint")t=a=>BigInt(a);else if(isNaN(e)||!isFinite(e))return Ml.stringifyNumber(s);let i="";e<0&&(i="-",e*=t(-1));let n=t(60),r=[e%n];return e<60?r.unshift(0):(e=(e-r[0])/n,r.unshift(e%n),e>=60&&(e=(e-r[0])/n,r.unshift(e))),i+r.map(a=>String(a).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}var Dl={identify:s=>typeof s=="bigint"||Number.isInteger(s),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(s,e,{intAsBigInt:t})=>xs(s,t),stringify:tr},_l={identify:s=>typeof s=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:s=>xs(s,!1),stringify:tr},sr={identify:s=>s 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(s){let e=s.match(sr.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,t,i,n,r,a,o]=e.map(Number),l=e[7]?Number((e[7]+"00").substr(1,3)):0,c=Date.UTC(t,i-1,n,r||0,a||0,o||0,l),d=e[8];if(d&&d!=="Z"){let f=xs(d,!1);Math.abs(f)<30&&(f*=60),c-=6e4*f}return new Date(c)},stringify:({value:s})=>s?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};jt.floatTime=_l;jt.intTime=Dl;jt.timestamp=sr});var rr=y(nr=>{"use strict";var Bl=de(),Fl=Et(),Kl=pe(),jl=_e(),Rl=Ms(),ir=Xn(),Js=zn(),Rt=er(),Ul=St(),Yl=Fs(),xl=Mt(),Vl=Ys(),Gs=Vs(),Jl=[Bl.map,Kl.seq,jl.string,Fl.nullTag,ir.trueTag,ir.falseTag,Rt.intBin,Rt.intOct,Rt.int,Rt.intHex,Js.floatNaN,Js.floatExp,Js.float,Rl.binary,Ul.merge,Yl.omap,xl.pairs,Vl.set,Gs.intTime,Gs.floatTime,Gs.timestamp];nr.schema=Jl});var mr=y(Hs=>{"use strict";var cr=de(),Gl=Et(),fr=pe(),Wl=_e(),Ql=Os(),Ws=Ts(),Qs=Cs(),Hl=Fn(),Xl=Rn(),ur=Ms(),Re=St(),hr=Fs(),dr=Mt(),ar=rr(),pr=Ys(),Ut=Vs(),or=new Map([["core",Hl.schema],["failsafe",[cr.map,fr.seq,Wl.string]],["json",Xl.schema],["yaml11",ar.schema],["yaml-1.1",ar.schema]]),lr={binary:ur.binary,bool:Ql.boolTag,float:Ws.float,floatExp:Ws.floatExp,floatNaN:Ws.floatNaN,floatTime:Ut.floatTime,int:Qs.int,intHex:Qs.intHex,intOct:Qs.intOct,intTime:Ut.intTime,map:cr.map,merge:Re.merge,null:Gl.nullTag,omap:hr.omap,pairs:dr.pairs,seq:fr.seq,set:pr.set,timestamp:Ut.timestamp},zl={"tag:yaml.org,2002:binary":ur.binary,"tag:yaml.org,2002:merge":Re.merge,"tag:yaml.org,2002:omap":hr.omap,"tag:yaml.org,2002:pairs":dr.pairs,"tag:yaml.org,2002:set":pr.set,"tag:yaml.org,2002:timestamp":Ut.timestamp};function Zl(s,e,t){let i=or.get(e);if(i&&!s)return t&&!i.includes(Re.merge)?i.concat(Re.merge):i.slice();let n=i;if(!n)if(Array.isArray(s))n=[];else{let r=Array.from(or.keys()).filter(a=>a!=="yaml11").map(a=>JSON.stringify(a)).join(", ");throw new Error(`Unknown schema "${e}"; use one of ${r} or define customTags array`)}if(Array.isArray(s))for(let r of s)n=n.concat(r);else typeof s=="function"&&(n=s(n.slice()));return t&&(n=n.concat(Re.merge)),n.reduce((r,a)=>{let o=typeof a=="string"?lr[a]:a;if(!o){let l=JSON.stringify(a),c=Object.keys(lr).map(d=>JSON.stringify(d)).join(", ");throw new Error(`Unknown custom tag ${l}; use one of ${c}`)}return r.includes(o)||r.push(o),r},[])}Hs.coreKnownTags=zl;Hs.getTags=Zl});var Zs=y(yr=>{"use strict";var Xs=q(),ec=de(),tc=pe(),sc=_e(),Yt=mr(),ic=(s,e)=>s.key<e.key?-1:s.key>e.key?1:0,zs=class s{constructor({compat:e,customTags:t,merge:i,resolveKnownTags:n,schema:r,sortMapEntries:a,toStringDefaults:o}){this.compat=Array.isArray(e)?Yt.getTags(e,"compat"):e?Yt.getTags(null,e):null,this.name=typeof r=="string"&&r||"core",this.knownTags=n?Yt.coreKnownTags:{},this.tags=Yt.getTags(t,this.name,i),this.toStringOptions=o??null,Object.defineProperty(this,Xs.MAP,{value:ec.map}),Object.defineProperty(this,Xs.SCALAR,{value:sc.string}),Object.defineProperty(this,Xs.SEQ,{value:tc.seq}),this.sortMapEntries=typeof a=="function"?a:a===!0?ic:null}clone(){let e=Object.create(s.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}};yr.Schema=zs});var br=y(gr=>{"use strict";var nc=q(),ei=Pe(),Ue=Te();function rc(s,e){let t=[],i=e.directives===!0;if(e.directives!==!1&&s.directives){let l=s.directives.toString(s);l?(t.push(l),i=!0):s.directives.docStart&&(i=!0)}i&&t.push("---");let n=ei.createStringifyContext(s,e),{commentString:r}=n.options;if(s.commentBefore){t.length!==1&&t.unshift("");let l=r(s.commentBefore);t.unshift(Ue.indentComment(l,""))}let a=!1,o=null;if(s.contents){if(nc.isNode(s.contents)){if(s.contents.spaceBefore&&i&&t.push(""),s.contents.commentBefore){let d=r(s.contents.commentBefore);t.push(Ue.indentComment(d,""))}n.forceBlockIndent=!!s.comment,o=s.contents.comment}let l=o?void 0:()=>a=!0,c=ei.stringify(s.contents,n,()=>o=null,l);o&&(c+=Ue.lineComment(c,"",r(o))),(c[0]==="|"||c[0]===">")&&t[t.length-1]==="---"?t[t.length-1]=`--- ${c}`:t.push(c)}else t.push(ei.stringify(s.contents,n));if(s.directives?.docEnd)if(s.comment){let l=r(s.comment);l.includes(`
|
|
55
|
-
`)?(t.push("..."),t.push(Ue.indentComment(l,""))):t.push(`... ${l}`)}else t.push("...");else{let l=s.comment;l&&a&&(l=l.replace(/^\n+/,"")),l&&((!a||o)&&t[t.length-1]!==""&&t.push(""),t.push(Ue.indentComment(r(l),"")))}return t.join(`
|
|
56
|
-
`)+`
|
|
57
|
-
`}gr.stringifyDocument=rc});var Ye=y(Sr=>{"use strict";var ac=Oe(),ye=ft(),_=q(),oc=Q(),lc=V(),cc=Zs(),fc=br(),ti=at(),uc=rs(),hc=Ee(),si=ns(),ii=class s{constructor(e,t,i){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,_.NODE_TYPE,{value:_.DOC});let n=null;typeof t=="function"||Array.isArray(t)?n=t:i===void 0&&t&&(i=t,t=void 0);let r=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},i);this.options=r;let{version:a}=r;i?._directives?(this.directives=i._directives.atDocument(),this.directives.yaml.explicit&&(a=this.directives.yaml.version)):this.directives=new si.Directives({version:a}),this.setSchema(a,i),this.contents=e===void 0?null:this.createNode(e,n,i)}clone(){let e=Object.create(s.prototype,{[_.NODE_TYPE]:{value:_.DOC}});return 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()),e.schema=this.schema.clone(),e.contents=_.isNode(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){ge(this.contents)&&this.contents.add(e)}addIn(e,t){ge(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){let i=ti.anchorNames(this);e.anchor=!t||i.has(t)?ti.findNewAnchor(t||"a",i):t}return new ac.Alias(e.anchor)}createNode(e,t,i){let n;if(typeof t=="function")e=t.call({"":e},"",e),n=t;else if(Array.isArray(t)){let p=w=>typeof w=="number"||w instanceof String||w instanceof Number,S=t.filter(p).map(String);S.length>0&&(t=t.concat(S)),n=t}else i===void 0&&t&&(i=t,t=void 0);let{aliasDuplicateObjects:r,anchorPrefix:a,flow:o,keepUndefined:l,onTagObj:c,tag:d}=i??{},{onAnchor:f,setAnchors:u,sourceObjects:m}=ti.createNodeAnchors(this,a||"a"),g={aliasDuplicateObjects:r??!0,keepUndefined:l??!1,onAnchor:f,onTagObj:c,replacer:n,schema:this.schema,sourceObjects:m},h=hc.createNode(e,d,g);return o&&_.isCollection(h)&&(h.flow=!0),u(),h}createPair(e,t,i={}){let n=this.createNode(e,null,i),r=this.createNode(t,null,i);return new oc.Pair(n,r)}delete(e){return ge(this.contents)?this.contents.delete(e):!1}deleteIn(e){return ye.isEmptyPath(e)?this.contents==null?!1:(this.contents=null,!0):ge(this.contents)?this.contents.deleteIn(e):!1}get(e,t){return _.isCollection(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return ye.isEmptyPath(e)?!t&&_.isScalar(this.contents)?this.contents.value:this.contents:_.isCollection(this.contents)?this.contents.getIn(e,t):void 0}has(e){return _.isCollection(this.contents)?this.contents.has(e):!1}hasIn(e){return ye.isEmptyPath(e)?this.contents!==void 0:_.isCollection(this.contents)?this.contents.hasIn(e):!1}set(e,t){this.contents==null?this.contents=ye.collectionFromPath(this.schema,[e],t):ge(this.contents)&&this.contents.set(e,t)}setIn(e,t){ye.isEmptyPath(e)?this.contents=t:this.contents==null?this.contents=ye.collectionFromPath(this.schema,Array.from(e),t):ge(this.contents)&&this.contents.setIn(e,t)}setSchema(e,t={}){typeof e=="number"&&(e=String(e));let i;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new si.Directives({version:"1.1"}),i={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new si.Directives({version:e}),i={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,i=null;break;default:{let n=JSON.stringify(e);throw new 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(i)this.schema=new cc.Schema(Object.assign(i,t));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:t,mapAsMap:i,maxAliasCount:n,onAnchor:r,reviver:a}={}){let o={anchors:new Map,doc:this,keep:!e,mapAsMap:i===!0,mapKeyWarned:!1,maxAliasCount:typeof n=="number"?n:100},l=lc.toJS(this.contents,t??"",o);if(typeof r=="function")for(let{count:c,res:d}of o.anchors.values())r(d,c);return typeof a=="function"?uc.applyReviver(a,{"":l},"",l):l}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw new 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 new Error(`"indent" option must be a positive integer, not ${t}`)}return fc.stringifyDocument(this,e)}};function ge(s){if(_.isCollection(s))return!0;throw new Error("Expected a YAML collection as document contents")}Sr.Document=ii});var Je=y(Ve=>{"use strict";var xe=class extends Error{constructor(e,t,i,n){super(),this.name=e,this.code=i,this.message=n,this.pos=t}},ni=class extends xe{constructor(e,t,i){super("YAMLParseError",e,t,i)}},ri=class extends xe{constructor(e,t,i){super("YAMLWarning",e,t,i)}},dc=(s,e)=>t=>{if(t.pos[0]===-1)return;t.linePos=t.pos.map(o=>e.linePos(o));let{line:i,col:n}=t.linePos[0];t.message+=` at line ${i}, column ${n}`;let r=n-1,a=s.substring(e.lineStarts[i-1],e.lineStarts[i]).replace(/[\n\r]+$/,"");if(r>=60&&a.length>80){let o=Math.min(r-39,a.length-79);a="\u2026"+a.substring(o),r-=o-1}if(a.length>80&&(a=a.substring(0,79)+"\u2026"),i>1&&/^ *$/.test(a.substring(0,r))){let o=s.substring(e.lineStarts[i-2],e.lineStarts[i-1]);o.length>80&&(o=o.substring(0,79)+`\u2026
|
|
58
|
-
`),a=o+a}if(/[^ ]/.test(a)){let o=1,l=t.linePos[1];l?.line===i&&l.col>n&&(o=Math.max(1,Math.min(l.col-n,80-r)));let c=" ".repeat(r)+"^".repeat(o);t.message+=`:
|
|
59
|
-
|
|
60
|
-
${a}
|
|
61
|
-
${c}
|
|
62
|
-
`}};Ve.YAMLError=xe;Ve.YAMLParseError=ni;Ve.YAMLWarning=ri;Ve.prettifyError=dc});var Ge=y(wr=>{"use strict";function pc(s,{flow:e,indicator:t,next:i,offset:n,onError:r,parentIndent:a,startOnNewline:o}){let l=!1,c=o,d=o,f="",u="",m=!1,g=!1,h=null,p=null,S=null,w=null,v=null,k=null,N=null;for(let b of s)switch(g&&(b.type!=="space"&&b.type!=="newline"&&b.type!=="comma"&&r(b.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),g=!1),h&&(c&&b.type!=="comment"&&b.type!=="newline"&&r(h,"TAB_AS_INDENT","Tabs are not allowed as indentation"),h=null),b.type){case"space":!e&&(t!=="doc-start"||i?.type!=="flow-collection")&&b.source.includes(" ")&&(h=b),d=!0;break;case"comment":{d||r(b,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let C=b.source.substring(1)||" ";f?f+=u+C:f=C,u="",c=!1;break}case"newline":c?f?f+=b.source:(!k||t!=="seq-item-ind")&&(l=!0):u+=b.source,c=!0,m=!0,(p||S)&&(w=b),d=!0;break;case"anchor":p&&r(b,"MULTIPLE_ANCHORS","A node can have at most one anchor"),b.source.endsWith(":")&&r(b.offset+b.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),p=b,N??(N=b.offset),c=!1,d=!1,g=!0;break;case"tag":{S&&r(b,"MULTIPLE_TAGS","A node can have at most one tag"),S=b,N??(N=b.offset),c=!1,d=!1,g=!0;break}case t:(p||S)&&r(b,"BAD_PROP_ORDER",`Anchors and tags must be after the ${b.source} indicator`),k&&r(b,"UNEXPECTED_TOKEN",`Unexpected ${b.source} in ${e??"collection"}`),k=b,c=t==="seq-item-ind"||t==="explicit-key-ind",d=!1;break;case"comma":if(e){v&&r(b,"UNEXPECTED_TOKEN",`Unexpected , in ${e}`),v=b,c=!1,d=!1;break}default:r(b,"UNEXPECTED_TOKEN",`Unexpected ${b.type} token`),c=!1,d=!1}let A=s[s.length-1],E=A?A.offset+A.source.length:n;return g&&i&&i.type!=="space"&&i.type!=="newline"&&i.type!=="comma"&&(i.type!=="scalar"||i.source!=="")&&r(i.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),h&&(c&&h.indent<=a||i?.type==="block-map"||i?.type==="block-seq")&&r(h,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:v,found:k,spaceBefore:l,comment:f,hasNewline:m,anchor:p,tag:S,newlineAfterProp:w,end:E,start:N??E}}wr.resolveProps=pc});var xt=y(vr=>{"use strict";function ai(s){if(!s)return null;switch(s.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(s.source.includes(`
|
|
63
|
-
`))return!0;if(s.end){for(let e of s.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(let e of s.items){for(let t of e.start)if(t.type==="newline")return!0;if(e.sep){for(let t of e.sep)if(t.type==="newline")return!0}if(ai(e.key)||ai(e.value))return!0}return!1;default:return!0}}vr.containsNewline=ai});var oi=y(kr=>{"use strict";var mc=xt();function yc(s,e,t){if(e?.type==="flow-collection"){let i=e.end[0];i.indent===s&&(i.source==="]"||i.source==="}")&&mc.containsNewline(e)&&t(i,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}kr.flowIndentCheck=yc});var li=y(Ar=>{"use strict";var Nr=q();function gc(s,e,t){let{uniqueKeys:i}=s.options;if(i===!1)return!1;let n=typeof i=="function"?i:(r,a)=>r===a||Nr.isScalar(r)&&Nr.isScalar(a)&&r.value===a.value;return e.some(r=>n(r.key,t))}Ar.mapIncludes=gc});var Cr=y(Lr=>{"use strict";var qr=Q(),bc=X(),Or=Ge(),Sc=xt(),Er=oi(),wc=li(),Tr="All mapping items must start at the same column";function vc({composeNode:s,composeEmptyNode:e},t,i,n,r){let a=r?.nodeClass??bc.YAMLMap,o=new a(t.schema);t.atRoot&&(t.atRoot=!1);let l=i.offset,c=null;for(let d of i.items){let{start:f,key:u,sep:m,value:g}=d,h=Or.resolveProps(f,{indicator:"explicit-key-ind",next:u??m?.[0],offset:l,onError:n,parentIndent:i.indent,startOnNewline:!0}),p=!h.found;if(p){if(u&&(u.type==="block-seq"?n(l,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in u&&u.indent!==i.indent&&n(l,"BAD_INDENT",Tr)),!h.anchor&&!h.tag&&!m){c=h.end,h.comment&&(o.comment?o.comment+=`
|
|
64
|
-
`+h.comment:o.comment=h.comment);continue}(h.newlineAfterProp||Sc.containsNewline(u))&&n(u??f[f.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else h.found?.indent!==i.indent&&n(l,"BAD_INDENT",Tr);t.atKey=!0;let S=h.end,w=u?s(t,u,h,n):e(t,S,f,null,h,n);t.schema.compat&&Er.flowIndentCheck(i.indent,u,n),t.atKey=!1,wc.mapIncludes(t,o.items,w)&&n(S,"DUPLICATE_KEY","Map keys must be unique");let v=Or.resolveProps(m??[],{indicator:"map-value-ind",next:g,offset:w.range[2],onError:n,parentIndent:i.indent,startOnNewline:!u||u.type==="block-scalar"});if(l=v.end,v.found){p&&(g?.type==="block-map"&&!v.hasNewline&&n(l,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),t.options.strict&&h.start<v.found.offset-1024&&n(w.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));let k=g?s(t,g,v,n):e(t,l,m,null,v,n);t.schema.compat&&Er.flowIndentCheck(i.indent,g,n),l=k.range[2];let N=new qr.Pair(w,k);t.options.keepSourceTokens&&(N.srcToken=d),o.items.push(N)}else{p&&n(w.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),v.comment&&(w.comment?w.comment+=`
|
|
65
|
-
`+v.comment:w.comment=v.comment);let k=new qr.Pair(w);t.options.keepSourceTokens&&(k.srcToken=d),o.items.push(k)}}return c&&c<l&&n(c,"IMPOSSIBLE","Map comment with trailing content"),o.range=[i.offset,l,c??l],o}Lr.resolveBlockMap=vc});var Pr=y(Ir=>{"use strict";var kc=z(),Nc=Ge(),Ac=oi();function qc({composeNode:s,composeEmptyNode:e},t,i,n,r){let a=r?.nodeClass??kc.YAMLSeq,o=new a(t.schema);t.atRoot&&(t.atRoot=!1),t.atKey&&(t.atKey=!1);let l=i.offset,c=null;for(let{start:d,value:f}of i.items){let u=Nc.resolveProps(d,{indicator:"seq-item-ind",next:f,offset:l,onError:n,parentIndent:i.indent,startOnNewline:!0});if(!u.found)if(u.anchor||u.tag||f)f?.type==="block-seq"?n(u.end,"BAD_INDENT","All sequence items must start at the same column"):n(l,"MISSING_CHAR","Sequence item without - indicator");else{c=u.end,u.comment&&(o.comment=u.comment);continue}let m=f?s(t,f,u,n):e(t,u.end,d,null,u,n);t.schema.compat&&Ac.flowIndentCheck(i.indent,f,n),l=m.range[2],o.items.push(m)}return o.range=[i.offset,l,c??l],o}Ir.resolveBlockSeq=qc});var be=y($r=>{"use strict";function Oc(s,e,t,i){let n="";if(s){let r=!1,a="";for(let o of s){let{source:l,type:c}=o;switch(c){case"space":r=!0;break;case"comment":{t&&!r&&i(o,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let d=l.substring(1)||" ";n?n+=a+d:n=d,a="";break}case"newline":n&&(a+=l),r=!0;break;default:i(o,"UNEXPECTED_TOKEN",`Unexpected ${c} at node end`)}e+=l.length}}return{comment:n,offset:e}}$r.resolveEnd=Oc});var Br=y(_r=>{"use strict";var Ec=q(),Tc=Q(),Mr=X(),Lc=z(),Cc=be(),Dr=Ge(),Ic=xt(),Pc=li(),ci="Block collections are not allowed within flow collections",fi=s=>s&&(s.type==="block-map"||s.type==="block-seq");function $c({composeNode:s,composeEmptyNode:e},t,i,n,r){let a=i.start.source==="{",o=a?"flow map":"flow sequence",l=r?.nodeClass??(a?Mr.YAMLMap:Lc.YAMLSeq),c=new l(t.schema);c.flow=!0;let d=t.atRoot;d&&(t.atRoot=!1),t.atKey&&(t.atKey=!1);let f=i.offset+i.start.source.length;for(let p=0;p<i.items.length;++p){let S=i.items[p],{start:w,key:v,sep:k,value:N}=S,A=Dr.resolveProps(w,{flow:o,indicator:"explicit-key-ind",next:v??k?.[0],offset:f,onError:n,parentIndent:i.indent,startOnNewline:!1});if(!A.found){if(!A.anchor&&!A.tag&&!k&&!N){p===0&&A.comma?n(A.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${o}`):p<i.items.length-1&&n(A.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${o}`),A.comment&&(c.comment?c.comment+=`
|
|
66
|
-
`+A.comment:c.comment=A.comment),f=A.end;continue}!a&&t.options.strict&&Ic.containsNewline(v)&&n(v,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(p===0)A.comma&&n(A.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${o}`);else if(A.comma||n(A.start,"MISSING_CHAR",`Missing , between ${o} items`),A.comment){let E="";e:for(let b of w)switch(b.type){case"comma":case"space":break;case"comment":E=b.source.substring(1);break e;default:break e}if(E){let b=c.items[c.items.length-1];Ec.isPair(b)&&(b=b.value??b.key),b.comment?b.comment+=`
|
|
67
|
-
`+E:b.comment=E,A.comment=A.comment.substring(E.length+1)}}if(!a&&!k&&!A.found){let E=N?s(t,N,A,n):e(t,A.end,k,null,A,n);c.items.push(E),f=E.range[2],fi(N)&&n(E.range,"BLOCK_IN_FLOW",ci)}else{t.atKey=!0;let E=A.end,b=v?s(t,v,A,n):e(t,E,w,null,A,n);fi(v)&&n(b.range,"BLOCK_IN_FLOW",ci),t.atKey=!1;let C=Dr.resolveProps(k??[],{flow:o,indicator:"map-value-ind",next:N,offset:b.range[2],onError:n,parentIndent:i.indent,startOnNewline:!1});if(C.found){if(!a&&!A.found&&t.options.strict){if(k)for(let I of k){if(I===C.found)break;if(I.type==="newline"){n(I,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}A.start<C.found.offset-1024&&n(C.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else N&&("source"in N&&N.source?.[0]===":"?n(N,"MISSING_CHAR",`Missing space after : in ${o}`):n(C.start,"MISSING_CHAR",`Missing , or : between ${o} items`));let x=N?s(t,N,C,n):C.found?e(t,C.end,k,null,C,n):null;x?fi(N)&&n(x.range,"BLOCK_IN_FLOW",ci):C.comment&&(b.comment?b.comment+=`
|
|
68
|
-
`+C.comment:b.comment=C.comment);let le=new Tc.Pair(b,x);if(t.options.keepSourceTokens&&(le.srcToken=S),a){let I=c;Pc.mapIncludes(t,I.items,b)&&n(E,"DUPLICATE_KEY","Map keys must be unique"),I.items.push(le)}else{let I=new Mr.YAMLMap(t.schema);I.flow=!0,I.items.push(le);let Bi=(x??b).range;I.range=[b.range[0],Bi[1],Bi[2]],c.items.push(I)}f=x?x.range[2]:C.end}}let u=a?"}":"]",[m,...g]=i.end,h=f;if(m?.source===u)h=m.offset+m.source.length;else{let p=o[0].toUpperCase()+o.substring(1),S=d?`${p} must end with a ${u}`:`${p} in block collection must be sufficiently indented and end with a ${u}`;n(f,d?"MISSING_CHAR":"BAD_INDENT",S),m&&m.source.length!==1&&g.unshift(m)}if(g.length>0){let p=Cc.resolveEnd(g,h,t.options.strict,n);p.comment&&(c.comment?c.comment+=`
|
|
69
|
-
`+p.comment:c.comment=p.comment),c.range=[i.offset,h,p.offset]}else c.range=[i.offset,h,h];return c}_r.resolveFlowCollection=$c});var Kr=y(Fr=>{"use strict";var Mc=q(),Dc=L(),_c=X(),Bc=z(),Fc=Cr(),Kc=Pr(),jc=Br();function ui(s,e,t,i,n,r){let a=t.type==="block-map"?Fc.resolveBlockMap(s,e,t,i,r):t.type==="block-seq"?Kc.resolveBlockSeq(s,e,t,i,r):jc.resolveFlowCollection(s,e,t,i,r),o=a.constructor;return n==="!"||n===o.tagName?(a.tag=o.tagName,a):(n&&(a.tag=n),a)}function Rc(s,e,t,i,n){let r=i.tag,a=r?e.directives.tagName(r.source,u=>n(r,"TAG_RESOLVE_FAILED",u)):null;if(t.type==="block-seq"){let{anchor:u,newlineAfterProp:m}=i,g=u&&r?u.offset>r.offset?u:r:u??r;g&&(!m||m.offset<g.offset)&&n(g,"MISSING_CHAR","Missing newline after block sequence props")}let o=t.type==="block-map"?"map":t.type==="block-seq"?"seq":t.start.source==="{"?"map":"seq";if(!r||!a||a==="!"||a===_c.YAMLMap.tagName&&o==="map"||a===Bc.YAMLSeq.tagName&&o==="seq")return ui(s,e,t,n,a);let l=e.schema.tags.find(u=>u.tag===a&&u.collection===o);if(!l){let u=e.schema.knownTags[a];if(u?.collection===o)e.schema.tags.push(Object.assign({},u,{default:!1})),l=u;else return u?n(r,"BAD_COLLECTION_TYPE",`${u.tag} used for ${o} collection, but expects ${u.collection??"scalar"}`,!0):n(r,"TAG_RESOLVE_FAILED",`Unresolved tag: ${a}`,!0),ui(s,e,t,n,a)}let c=ui(s,e,t,n,a,l),d=l.resolve?.(c,u=>n(r,"TAG_RESOLVE_FAILED",u),e.options)??c,f=Mc.isNode(d)?d:new Dc.Scalar(d);return f.range=c.range,f.tag=a,l?.format&&(f.format=l.format),f}Fr.composeCollection=Rc});var di=y(jr=>{"use strict";var hi=L();function Uc(s,e,t){let i=e.offset,n=Yc(e,s.options.strict,t);if(!n)return{value:"",type:null,comment:"",range:[i,i,i]};let r=n.mode===">"?hi.Scalar.BLOCK_FOLDED:hi.Scalar.BLOCK_LITERAL,a=e.source?xc(e.source):[],o=a.length;for(let h=a.length-1;h>=0;--h){let p=a[h][1];if(p===""||p==="\r")o=h;else break}if(o===0){let h=n.chomp==="+"&&a.length>0?`
|
|
70
|
-
`.repeat(Math.max(1,a.length-1)):"",p=i+n.length;return e.source&&(p+=e.source.length),{value:h,type:r,comment:n.comment,range:[i,p,p]}}let l=e.indent+n.indent,c=e.offset+n.length,d=0;for(let h=0;h<o;++h){let[p,S]=a[h];if(S===""||S==="\r")n.indent===0&&p.length>l&&(l=p.length);else{p.length<l&&t(c+p.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),n.indent===0&&(l=p.length),d=h,l===0&&!s.atRoot&&t(c,"BAD_INDENT","Block scalar values in collections must be indented");break}c+=p.length+S.length+1}for(let h=a.length-1;h>=o;--h)a[h][0].length>l&&(o=h+1);let f="",u="",m=!1;for(let h=0;h<d;++h)f+=a[h][0].slice(l)+`
|
|
71
|
-
`;for(let h=d;h<o;++h){let[p,S]=a[h];c+=p.length+S.length+1;let w=S[S.length-1]==="\r";if(w&&(S=S.slice(0,-1)),S&&p.length<l){let k=`Block scalar lines must not be less indented than their ${n.indent?"explicit indentation indicator":"first line"}`;t(c-S.length-(w?2:1),"BAD_INDENT",k),p=""}r===hi.Scalar.BLOCK_LITERAL?(f+=u+p.slice(l)+S,u=`
|
|
72
|
-
`):p.length>l||S[0]===" "?(u===" "?u=`
|
|
73
|
-
`:!m&&u===`
|
|
74
|
-
`&&(u=`
|
|
75
|
-
|
|
76
|
-
`),f+=u+p.slice(l)+S,u=`
|
|
77
|
-
`,m=!0):S===""?u===`
|
|
78
|
-
`?f+=`
|
|
79
|
-
`:u=`
|
|
80
|
-
`:(f+=u+S,u=" ",m=!1)}switch(n.chomp){case"-":break;case"+":for(let h=o;h<a.length;++h)f+=`
|
|
81
|
-
`+a[h][0].slice(l);f[f.length-1]!==`
|
|
82
|
-
`&&(f+=`
|
|
83
|
-
`);break;default:f+=`
|
|
84
|
-
`}let g=i+n.length+e.source.length;return{value:f,type:r,comment:n.comment,range:[i,g,g]}}function Yc({offset:s,props:e},t,i){if(e[0].type!=="block-scalar-header")return i(e[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:n}=e[0],r=n[0],a=0,o="",l=-1;for(let u=1;u<n.length;++u){let m=n[u];if(!o&&(m==="-"||m==="+"))o=m;else{let g=Number(m);!a&&g?a=g:l===-1&&(l=s+u)}}l!==-1&&i(l,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${n}`);let c=!1,d="",f=n.length;for(let u=1;u<e.length;++u){let m=e[u];switch(m.type){case"space":c=!0;case"newline":f+=m.source.length;break;case"comment":t&&!c&&i(m,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),f+=m.source.length,d=m.source.substring(1);break;case"error":i(m,"UNEXPECTED_TOKEN",m.message),f+=m.source.length;break;default:{let g=`Unexpected token in block scalar header: ${m.type}`;i(m,"UNEXPECTED_TOKEN",g);let h=m.source;h&&typeof h=="string"&&(f+=h.length)}}}return{mode:r,indent:a,chomp:o,comment:d,length:f}}function xc(s){let e=s.split(/\n( *)/),t=e[0],i=t.match(/^( *)/),r=[i?.[1]?[i[1],t.slice(i[1].length)]:["",t]];for(let a=1;a<e.length;a+=2)r.push([e[a],e[a+1]]);return r}jr.resolveBlockScalar=Uc});var mi=y(Ur=>{"use strict";var pi=L(),Vc=be();function Jc(s,e,t){let{offset:i,type:n,source:r,end:a}=s,o,l,c=(u,m,g)=>t(i+u,m,g);switch(n){case"scalar":o=pi.Scalar.PLAIN,l=Gc(r,c);break;case"single-quoted-scalar":o=pi.Scalar.QUOTE_SINGLE,l=Wc(r,c);break;case"double-quoted-scalar":o=pi.Scalar.QUOTE_DOUBLE,l=Qc(r,c);break;default:return t(s,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${n}`),{value:"",type:null,comment:"",range:[i,i+r.length,i+r.length]}}let d=i+r.length,f=Vc.resolveEnd(a,d,e,t);return{value:l,type:o,comment:f.comment,range:[i,d,f.offset]}}function Gc(s,e){let t="";switch(s[0]){case" ":t="a tab character";break;case",":t="flow indicator character ,";break;case"%":t="directive indicator character %";break;case"|":case">":{t=`block scalar indicator ${s[0]}`;break}case"@":case"`":{t=`reserved character ${s[0]}`;break}}return t&&e(0,"BAD_SCALAR_START",`Plain value cannot start with ${t}`),Rr(s)}function Wc(s,e){return(s[s.length-1]!=="'"||s.length===1)&&e(s.length,"MISSING_CHAR","Missing closing 'quote"),Rr(s.slice(1,-1)).replace(/''/g,"'")}function Rr(s){let e,t;try{e=new RegExp(`(.*?)(?<![ ])[ ]*\r?
|
|
85
|
-
`,"sy"),t=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
|
|
86
|
-
`,"sy")}catch{e=/(.*?)[ \t]*\r?\n/sy,t=/[ \t]*(.*?)[ \t]*\r?\n/sy}let i=e.exec(s);if(!i)return s;let n=i[1],r=" ",a=e.lastIndex;for(t.lastIndex=a;i=t.exec(s);)i[1]===""?r===`
|
|
87
|
-
`?n+=r:r=`
|
|
88
|
-
`:(n+=r+i[1],r=" "),a=t.lastIndex;let o=/[ \t]*(.*)/sy;return o.lastIndex=a,i=o.exec(s),n+r+(i?.[1]??"")}function Qc(s,e){let t="";for(let i=1;i<s.length-1;++i){let n=s[i];if(!(n==="\r"&&s[i+1]===`
|
|
89
|
-
`))if(n===`
|
|
90
|
-
`){let{fold:r,offset:a}=Hc(s,i);t+=r,i=a}else if(n==="\\"){let r=s[++i],a=Xc[r];if(a)t+=a;else if(r===`
|
|
91
|
-
`)for(r=s[i+1];r===" "||r===" ";)r=s[++i+1];else if(r==="\r"&&s[i+1]===`
|
|
92
|
-
`)for(r=s[++i+1];r===" "||r===" ";)r=s[++i+1];else if(r==="x"||r==="u"||r==="U"){let o={x:2,u:4,U:8}[r];t+=zc(s,i+1,o,e),i+=o}else{let o=s.substr(i-1,2);e(i-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${o}`),t+=o}}else if(n===" "||n===" "){let r=i,a=s[i+1];for(;a===" "||a===" ";)a=s[++i+1];a!==`
|
|
93
|
-
`&&!(a==="\r"&&s[i+2]===`
|
|
94
|
-
`)&&(t+=i>r?s.slice(r,i+1):n)}else t+=n}return(s[s.length-1]!=='"'||s.length===1)&&e(s.length,"MISSING_CHAR",'Missing closing "quote'),t}function Hc(s,e){let t="",i=s[e+1];for(;(i===" "||i===" "||i===`
|
|
95
|
-
`||i==="\r")&&!(i==="\r"&&s[e+2]!==`
|
|
96
|
-
`);)i===`
|
|
97
|
-
`&&(t+=`
|
|
98
|
-
`),e+=1,i=s[e+1];return t||(t=" "),{fold:t,offset:e}}var Xc={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
|
|
99
|
-
`,r:"\r",t:" ",v:"\v",N:"\x85",_:"\xA0",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function zc(s,e,t,i){let n=s.substr(e,t),a=n.length===t&&/^[0-9a-fA-F]+$/.test(n)?parseInt(n,16):NaN;if(isNaN(a)){let o=s.substr(e-2,t+2);return i(e-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${o}`),o}return String.fromCodePoint(a)}Ur.resolveFlowScalar=Jc});var Vr=y(xr=>{"use strict";var re=q(),Yr=L(),Zc=di(),ef=mi();function tf(s,e,t,i){let{value:n,type:r,comment:a,range:o}=e.type==="block-scalar"?Zc.resolveBlockScalar(s,e,i):ef.resolveFlowScalar(e,s.options.strict,i),l=t?s.directives.tagName(t.source,f=>i(t,"TAG_RESOLVE_FAILED",f)):null,c;s.options.stringKeys&&s.atKey?c=s.schema[re.SCALAR]:l?c=sf(s.schema,n,l,t,i):e.type==="scalar"?c=nf(s,n,e,i):c=s.schema[re.SCALAR];let d;try{let f=c.resolve(n,u=>i(t??e,"TAG_RESOLVE_FAILED",u),s.options);d=re.isScalar(f)?f:new Yr.Scalar(f)}catch(f){let u=f instanceof Error?f.message:String(f);i(t??e,"TAG_RESOLVE_FAILED",u),d=new Yr.Scalar(n)}return d.range=o,d.source=n,r&&(d.type=r),l&&(d.tag=l),c.format&&(d.format=c.format),a&&(d.comment=a),d}function sf(s,e,t,i,n){if(t==="!")return s[re.SCALAR];let r=[];for(let o of s.tags)if(!o.collection&&o.tag===t)if(o.default&&o.test)r.push(o);else return o;for(let o of r)if(o.test?.test(e))return o;let a=s.knownTags[t];return a&&!a.collection?(s.tags.push(Object.assign({},a,{default:!1,test:void 0})),a):(n(i,"TAG_RESOLVE_FAILED",`Unresolved tag: ${t}`,t!=="tag:yaml.org,2002:str"),s[re.SCALAR])}function nf({atKey:s,directives:e,schema:t},i,n,r){let a=t.tags.find(o=>(o.default===!0||s&&o.default==="key")&&o.test?.test(i))||t[re.SCALAR];if(t.compat){let o=t.compat.find(l=>l.default&&l.test?.test(i))??t[re.SCALAR];if(a.tag!==o.tag){let l=e.tagString(a.tag),c=e.tagString(o.tag),d=`Value may be parsed as either ${l} or ${c}`;r(n,"TAG_RESOLVE_FAILED",d,!0)}}return a}xr.composeScalar=tf});var Gr=y(Jr=>{"use strict";function rf(s,e,t){if(e){t??(t=e.length);for(let i=t-1;i>=0;--i){let n=e[i];switch(n.type){case"space":case"comment":case"newline":s-=n.source.length;continue}for(n=e[++i];n?.type==="space";)s+=n.source.length,n=e[++i];break}}return s}Jr.emptyScalarPosition=rf});var Hr=y(gi=>{"use strict";var af=Oe(),of=q(),lf=Kr(),Wr=Vr(),cf=be(),ff=Gr(),uf={composeNode:Qr,composeEmptyNode:yi};function Qr(s,e,t,i){let n=s.atKey,{spaceBefore:r,comment:a,anchor:o,tag:l}=t,c,d=!0;switch(e.type){case"alias":c=hf(s,e,i),(o||l)&&i(e,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":c=Wr.composeScalar(s,e,l,i),o&&(c.anchor=o.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":c=lf.composeCollection(uf,s,e,t,i),o&&(c.anchor=o.source.substring(1));break;default:{let f=e.type==="error"?e.message:`Unsupported token (type: ${e.type})`;i(e,"UNEXPECTED_TOKEN",f),c=yi(s,e.offset,void 0,null,t,i),d=!1}}return o&&c.anchor===""&&i(o,"BAD_ALIAS","Anchor cannot be an empty string"),n&&s.options.stringKeys&&(!of.isScalar(c)||typeof c.value!="string"||c.tag&&c.tag!=="tag:yaml.org,2002:str")&&i(l??e,"NON_STRING_KEY","With stringKeys, all keys must be strings"),r&&(c.spaceBefore=!0),a&&(e.type==="scalar"&&e.source===""?c.comment=a:c.commentBefore=a),s.options.keepSourceTokens&&d&&(c.srcToken=e),c}function yi(s,e,t,i,{spaceBefore:n,comment:r,anchor:a,tag:o,end:l},c){let d={type:"scalar",offset:ff.emptyScalarPosition(e,t,i),indent:-1,source:""},f=Wr.composeScalar(s,d,o,c);return a&&(f.anchor=a.source.substring(1),f.anchor===""&&c(a,"BAD_ALIAS","Anchor cannot be an empty string")),n&&(f.spaceBefore=!0),r&&(f.comment=r,f.range[2]=l),f}function hf({options:s},{offset:e,source:t,end:i},n){let r=new af.Alias(t.substring(1));r.source===""&&n(e,"BAD_ALIAS","Alias cannot be an empty string"),r.source.endsWith(":")&&n(e+t.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let a=e+t.length,o=cf.resolveEnd(i,a,s.strict,n);return r.range=[e,a,o.offset],o.comment&&(r.comment=o.comment),r}gi.composeEmptyNode=yi;gi.composeNode=Qr});var Zr=y(zr=>{"use strict";var df=Ye(),Xr=Hr(),pf=be(),mf=Ge();function yf(s,e,{offset:t,start:i,value:n,end:r},a){let o=Object.assign({_directives:e},s),l=new df.Document(void 0,o),c={atKey:!1,atRoot:!0,directives:l.directives,options:l.options,schema:l.schema},d=mf.resolveProps(i,{indicator:"doc-start",next:n??r?.[0],offset:t,onError:a,parentIndent:0,startOnNewline:!0});d.found&&(l.directives.docStart=!0,n&&(n.type==="block-map"||n.type==="block-seq")&&!d.hasNewline&&a(d.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),l.contents=n?Xr.composeNode(c,n,d,a):Xr.composeEmptyNode(c,d.end,i,null,d,a);let f=l.contents.range[2],u=pf.resolveEnd(r,f,!1,a);return u.comment&&(l.comment=u.comment),l.range=[t,f,u.offset],l}zr.composeDoc=yf});var Si=y(sa=>{"use strict";var gf=tt("process"),bf=ns(),Sf=Ye(),We=Je(),ea=q(),wf=Zr(),vf=be();function Qe(s){if(typeof s=="number")return[s,s+1];if(Array.isArray(s))return s.length===2?s:[s[0],s[1]];let{offset:e,source:t}=s;return[e,e+(typeof t=="string"?t.length:1)]}function ta(s){let e="",t=!1,i=!1;for(let n=0;n<s.length;++n){let r=s[n];switch(r[0]){case"#":e+=(e===""?"":i?`
|
|
100
|
-
|
|
101
|
-
`:`
|
|
102
|
-
`)+(r.substring(1)||" "),t=!0,i=!1;break;case"%":s[n+1]?.[0]!=="#"&&(n+=1),t=!1;break;default:t||(i=!0),t=!1}}return{comment:e,afterEmptyLine:i}}var bi=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(t,i,n,r)=>{let a=Qe(t);r?this.warnings.push(new We.YAMLWarning(a,i,n)):this.errors.push(new We.YAMLParseError(a,i,n))},this.directives=new bf.Directives({version:e.version||"1.2"}),this.options=e}decorate(e,t){let{comment:i,afterEmptyLine:n}=ta(this.prelude);if(i){let r=e.contents;if(t)e.comment=e.comment?`${e.comment}
|
|
103
|
-
${i}`:i;else if(n||e.directives.docStart||!r)e.commentBefore=i;else if(ea.isCollection(r)&&!r.flow&&r.items.length>0){let a=r.items[0];ea.isPair(a)&&(a=a.key);let o=a.commentBefore;a.commentBefore=o?`${i}
|
|
104
|
-
${o}`:i}else{let a=r.commentBefore;r.commentBefore=a?`${i}
|
|
105
|
-
${a}`:i}}t?(Array.prototype.push.apply(e.errors,this.errors),Array.prototype.push.apply(e.warnings,this.warnings)):(e.errors=this.errors,e.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:ta(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,i=-1){for(let n of e)yield*this.next(n);yield*this.end(t,i)}*next(e){switch(gf.env.LOG_STREAM&&console.dir(e,{depth:null}),e.type){case"directive":this.directives.add(e.source,(t,i,n)=>{let r=Qe(e);r[0]+=t,this.onError(r,"BAD_DIRECTIVE",i,n)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{let t=wf.composeDoc(this.options,this.directives,e,this.onError);this.atDirectives&&!t.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),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,i=new We.YAMLParseError(Qe(e),"UNEXPECTED_TOKEN",t);this.atDirectives||!this.doc?this.errors.push(i):this.doc.errors.push(i);break}case"doc-end":{if(!this.doc){let i="Unexpected doc-end without preceding document";this.errors.push(new We.YAMLParseError(Qe(e),"UNEXPECTED_TOKEN",i));break}this.doc.directives.docEnd=!0;let t=vf.resolveEnd(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){let i=this.doc.comment;this.doc.comment=i?`${i}
|
|
106
|
-
${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new We.YAMLParseError(Qe(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 i=Object.assign({_directives:this.directives},this.options),n=new Sf.Document(void 0,i);this.atDirectives&&this.onError(t,"MISSING_CHAR","Missing directives-end indicator line"),n.range=[0,t,t],this.decorate(n,!1),yield n}}};sa.Composer=bi});var ra=y(Vt=>{"use strict";var kf=di(),Nf=mi(),Af=Je(),ia=Ie();function qf(s,e=!0,t){if(s){let i=(n,r,a)=>{let o=typeof n=="number"?n:Array.isArray(n)?n[0]:n.offset;if(t)t(o,r,a);else throw new Af.YAMLParseError([o,o+1],r,a)};switch(s.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return Nf.resolveFlowScalar(s,e,i);case"block-scalar":return kf.resolveBlockScalar({options:{strict:e}},s,i)}}return null}function Of(s,e){let{implicitKey:t=!1,indent:i,inFlow:n=!1,offset:r=-1,type:a="PLAIN"}=e,o=ia.stringifyString({type:a,value:s},{implicitKey:t,indent:i>0?" ".repeat(i):"",inFlow:n,options:{blockQuote:!0,lineWidth:-1}}),l=e.end??[{type:"newline",offset:-1,indent:i,source:`
|
|
107
|
-
`}];switch(o[0]){case"|":case">":{let c=o.indexOf(`
|
|
108
|
-
`),d=o.substring(0,c),f=o.substring(c+1)+`
|
|
109
|
-
`,u=[{type:"block-scalar-header",offset:r,indent:i,source:d}];return na(u,l)||u.push({type:"newline",offset:-1,indent:i,source:`
|
|
110
|
-
`}),{type:"block-scalar",offset:r,indent:i,props:u,source:f}}case'"':return{type:"double-quoted-scalar",offset:r,indent:i,source:o,end:l};case"'":return{type:"single-quoted-scalar",offset:r,indent:i,source:o,end:l};default:return{type:"scalar",offset:r,indent:i,source:o,end:l}}}function Ef(s,e,t={}){let{afterKey:i=!1,implicitKey:n=!1,inFlow:r=!1,type:a}=t,o="indent"in s?s.indent:null;if(i&&typeof o=="number"&&(o+=2),!a)switch(s.type){case"single-quoted-scalar":a="QUOTE_SINGLE";break;case"double-quoted-scalar":a="QUOTE_DOUBLE";break;case"block-scalar":{let c=s.props[0];if(c.type!=="block-scalar-header")throw new Error("Invalid block scalar header");a=c.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:a="PLAIN"}let l=ia.stringifyString({type:a,value:e},{implicitKey:n||o===null,indent:o!==null&&o>0?" ".repeat(o):"",inFlow:r,options:{blockQuote:!0,lineWidth:-1}});switch(l[0]){case"|":case">":Tf(s,l);break;case'"':wi(s,l,"double-quoted-scalar");break;case"'":wi(s,l,"single-quoted-scalar");break;default:wi(s,l,"scalar")}}function Tf(s,e){let t=e.indexOf(`
|
|
111
|
-
`),i=e.substring(0,t),n=e.substring(t+1)+`
|
|
112
|
-
`;if(s.type==="block-scalar"){let r=s.props[0];if(r.type!=="block-scalar-header")throw new Error("Invalid block scalar header");r.source=i,s.source=n}else{let{offset:r}=s,a="indent"in s?s.indent:-1,o=[{type:"block-scalar-header",offset:r,indent:a,source:i}];na(o,"end"in s?s.end:void 0)||o.push({type:"newline",offset:-1,indent:a,source:`
|
|
113
|
-
`});for(let l of Object.keys(s))l!=="type"&&l!=="offset"&&delete s[l];Object.assign(s,{type:"block-scalar",indent:a,props:o,source:n})}}function na(s,e){if(e)for(let t of e)switch(t.type){case"space":case"comment":s.push(t);break;case"newline":return s.push(t),!0}return!1}function wi(s,e,t){switch(s.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":s.type=t,s.source=e;break;case"block-scalar":{let i=s.props.slice(1),n=e.length;s.props[0].type==="block-scalar-header"&&(n-=s.props[0].source.length);for(let r of i)r.offset+=n;delete s.props,Object.assign(s,{type:t,source:e,end:i});break}case"block-map":case"block-seq":{let n={type:"newline",offset:s.offset+e.length,indent:s.indent,source:`
|
|
114
|
-
`};delete s.items,Object.assign(s,{type:t,source:e,end:[n]});break}default:{let i="indent"in s?s.indent:-1,n="end"in s&&Array.isArray(s.end)?s.end.filter(r=>r.type==="space"||r.type==="comment"||r.type==="newline"):[];for(let r of Object.keys(s))r!=="type"&&r!=="offset"&&delete s[r];Object.assign(s,{type:t,indent:i,source:e,end:n})}}}Vt.createScalarToken=Of;Vt.resolveAsScalar=qf;Vt.setScalarValue=Ef});var oa=y(aa=>{"use strict";var Lf=s=>"type"in s?Gt(s):Jt(s);function Gt(s){switch(s.type){case"block-scalar":{let e="";for(let t of s.props)e+=Gt(t);return e+s.source}case"block-map":case"block-seq":{let e="";for(let t of s.items)e+=Jt(t);return e}case"flow-collection":{let e=s.start.source;for(let t of s.items)e+=Jt(t);for(let t of s.end)e+=t.source;return e}case"document":{let e=Jt(s);if(s.end)for(let t of s.end)e+=t.source;return e}default:{let e=s.source;if("end"in s&&s.end)for(let t of s.end)e+=t.source;return e}}}function Jt({start:s,key:e,sep:t,value:i}){let n="";for(let r of s)n+=r.source;if(e&&(n+=Gt(e)),t)for(let r of t)n+=r.source;return i&&(n+=Gt(i)),n}aa.stringify=Lf});var ua=y(fa=>{"use strict";var vi=Symbol("break visit"),Cf=Symbol("skip children"),la=Symbol("remove item");function ae(s,e){"type"in s&&s.type==="document"&&(s={start:s.start,value:s.value}),ca(Object.freeze([]),s,e)}ae.BREAK=vi;ae.SKIP=Cf;ae.REMOVE=la;ae.itemAtPath=(s,e)=>{let t=s;for(let[i,n]of e){let r=t?.[i];if(r&&"items"in r)t=r.items[n];else return}return t};ae.parentCollection=(s,e)=>{let t=ae.itemAtPath(s,e.slice(0,-1)),i=e[e.length-1][0],n=t?.[i];if(n&&"items"in n)return n;throw new Error("Parent collection not found")};function ca(s,e,t){let i=t(e,s);if(typeof i=="symbol")return i;for(let n of["key","value"]){let r=e[n];if(r&&"items"in r){for(let a=0;a<r.items.length;++a){let o=ca(Object.freeze(s.concat([[n,a]])),r.items[a],t);if(typeof o=="number")a=o-1;else{if(o===vi)return vi;o===la&&(r.items.splice(a,1),a-=1)}}typeof i=="function"&&n==="key"&&(i=i(e,s))}}return typeof i=="function"?i(e,s):i}fa.visit=ae});var Wt=y(D=>{"use strict";var ki=ra(),If=oa(),Pf=ua(),Ni="\uFEFF",Ai="",qi="",Oi="",$f=s=>!!s&&"items"in s,Mf=s=>!!s&&(s.type==="scalar"||s.type==="single-quoted-scalar"||s.type==="double-quoted-scalar"||s.type==="block-scalar");function Df(s){switch(s){case Ni:return"<BOM>";case Ai:return"<DOC>";case qi:return"<FLOW_END>";case Oi:return"<SCALAR>";default:return JSON.stringify(s)}}function _f(s){switch(s){case Ni:return"byte-order-mark";case Ai:return"doc-mode";case qi:return"flow-error-end";case Oi:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
|
|
115
|
-
`:case`\r
|
|
116
|
-
`: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(s[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}D.createScalarToken=ki.createScalarToken;D.resolveAsScalar=ki.resolveAsScalar;D.setScalarValue=ki.setScalarValue;D.stringify=If.stringify;D.visit=Pf.visit;D.BOM=Ni;D.DOCUMENT=Ai;D.FLOW_END=qi;D.SCALAR=Oi;D.isCollection=$f;D.isScalar=Mf;D.prettyToken=Df;D.tokenType=_f});var Li=y(da=>{"use strict";var He=Wt();function F(s){switch(s){case void 0:case" ":case`
|
|
117
|
-
`:case"\r":case" ":return!0;default:return!1}}var ha=new Set("0123456789ABCDEFabcdef"),Bf=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),Qt=new Set(",[]{}"),Ff=new Set(` ,[]{}
|
|
118
|
-
\r `),Ei=s=>!s||Ff.has(s),Ti=class{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 i=this.next??"stream";for(;i&&(t||this.hasChars(1));)i=yield*this.parseNext(i)}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;t===" "||t===" ";)t=this.buffer[++e];return!t||t==="#"||t===`
|
|
119
|
-
`?!0:t==="\r"?this.buffer[e+1]===`
|
|
120
|
-
`:!1}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let t=this.buffer[e];if(this.indentNext>0){let i=0;for(;t===" ";)t=this.buffer[++i+e];if(t==="\r"){let n=this.buffer[i+e+1];if(n===`
|
|
121
|
-
`||!n&&!this.atEnd)return e+i+1}return t===`
|
|
122
|
-
`||i>=this.indentNext||!t&&!this.atEnd?e+i:-1}if(t==="-"||t==="."){let i=this.buffer.substr(e,3);if((i==="---"||i==="...")&&F(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return(typeof e!="number"||e!==-1&&e<this.pos)&&(e=this.buffer.indexOf(`
|
|
123
|
-
`,this.pos),this.lineEndPos=e),e===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[e-1]==="\r"&&(e-=1),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]===He.BOM&&(yield*this.pushCount(1),e=e.substring(1)),e[0]==="%"){let t=e.length,i=e.indexOf("#");for(;i!==-1;){let r=e[i-1];if(r===" "||r===" "){t=i-1;break}else i=e.indexOf("#",i+1)}for(;;){let r=e[t-1];if(r===" "||r===" ")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 He.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==="...")&&F(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,t==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!F(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[e,t]=this.peek(2);if(!t&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&F(t)){let i=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=i,yield*this.parseBlockStart()}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(Ei),"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,i=-1;do e=yield*this.pushNewline(),e>0?(t=yield*this.pushSpaces(!1),this.indentValue=i=t):t=0,t+=yield*this.pushSpaces(!0);while(e+t>0);let n=this.getLine();if(n===null)return this.setNext("flow");if((i!==-1&&i<this.indentNext&&n[0]!=="#"||i===0&&(n.startsWith("---")||n.startsWith("..."))&&F(n[3]))&&!(i===this.indentNext-1&&this.flowLevel===1&&(n[0]==="]"||n[0]==="}")))return this.flowLevel=0,yield He.FLOW_END,yield*this.parseLineStart();let r=0;for(;n[r]===",";)r+=yield*this.pushCount(1),r+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(r+=yield*this.pushIndicators(),n[r]){case void 0:return"flow";case"#":return yield*this.pushCount(n.length-r),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(Ei),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let a=this.charAt(1);if(this.flowKey||F(a)||a===",")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==="'")for(;t!==-1&&this.buffer[t+1]==="'";)t=this.buffer.indexOf("'",t+2);else for(;t!==-1;){let r=0;for(;this.buffer[t-1-r]==="\\";)r+=1;if(r%2===0)break;t=this.buffer.indexOf('"',t+1)}let i=this.buffer.substring(0,t),n=i.indexOf(`
|
|
124
|
-
`,this.pos);if(n!==-1){for(;n!==-1;){let r=this.continueScalar(n+1);if(r===-1)break;n=i.indexOf(`
|
|
125
|
-
`,r)}n!==-1&&(t=n-(i[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;for(;;){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=>F(t)||t==="#")}*parseBlockScalar(){let e=this.pos-1,t=0,i;e:for(let r=this.pos;i=this.buffer[r];++r)switch(i){case" ":t+=1;break;case`
|
|
126
|
-
`:e=r,t=0;break;case"\r":{let a=this.buffer[r+1];if(!a&&!this.atEnd)return this.setNext("block-scalar");if(a===`
|
|
127
|
-
`)break}default:break e}if(!i&&!this.atEnd)return this.setNext("block-scalar");if(t>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=t:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{let r=this.continueScalar(e+1);if(r===-1)break;e=this.buffer.indexOf(`
|
|
128
|
-
`,r)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext("block-scalar");e=this.buffer.length}}let n=e+1;for(i=this.buffer[n];i===" ";)i=this.buffer[++n];if(i===" "){for(;i===" "||i===" "||i==="\r"||i===`
|
|
129
|
-
`;)i=this.buffer[++n];e=n-1}else if(!this.blockScalarKeep)do{let r=e-1,a=this.buffer[r];a==="\r"&&(a=this.buffer[--r]);let o=r;for(;a===" ";)a=this.buffer[--r];if(a===`
|
|
130
|
-
`&&r>=this.pos&&r+1+t>o)e=r;else break}while(!0);return yield He.SCALAR,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e=this.flowLevel>0,t=this.pos-1,i=this.pos-1,n;for(;n=this.buffer[++i];)if(n===":"){let r=this.buffer[i+1];if(F(r)||e&&Qt.has(r))break;t=i}else if(F(n)){let r=this.buffer[i+1];if(n==="\r"&&(r===`
|
|
131
|
-
`?(i+=1,n=`
|
|
132
|
-
`,r=this.buffer[i+1]):t=i),r==="#"||e&&Qt.has(r))break;if(n===`
|
|
133
|
-
`){let a=this.continueScalar(i+1);if(a===-1)break;i=Math.max(i,a-2)}}else{if(e&&Qt.has(n))break;t=i}return!n&&!this.atEnd?this.setNext("plain-scalar"):(yield He.SCALAR,yield*this.pushToIndex(t+1,!0),e?"flow":"doc")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,t){let i=this.buffer.slice(this.pos,e);return i?(yield i,this.pos+=i.length,i.length):(t&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(Ei))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{let e=this.flowLevel>0,t=this.charAt(1);if(F(t)||e&&Qt.has(t))return e?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if(this.charAt(1)==="<"){let e=this.pos+2,t=this.buffer[e];for(;!F(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];for(;t;)if(Bf.has(t))t=this.buffer[++e];else if(t==="%"&&ha.has(this.buffer[e+1])&&ha.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];return e===`
|
|
134
|
-
`?yield*this.pushCount(1):e==="\r"&&this.charAt(1)===`
|
|
135
|
-
`?yield*this.pushCount(2):0}*pushSpaces(e){let t=this.pos-1,i;do i=this.buffer[++t];while(i===" "||e&&i===" ");let n=t-this.pos;return n>0&&(yield this.buffer.substr(this.pos,n),this.pos=t),n}*pushUntil(e){let t=this.pos,i=this.buffer[t];for(;!e(i);)i=this.buffer[++t];return yield*this.pushToIndex(t,!1)}};da.Lexer=Ti});var Ii=y(pa=>{"use strict";var Ci=class{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,i=this.lineStarts.length;for(;t<i;){let r=t+i>>1;this.lineStarts[r]<e?t=r+1:i=r}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}}}};pa.LineCounter=Ci});var $i=y(Sa=>{"use strict";var Kf=tt("process"),ma=Wt(),jf=Li();function Z(s,e){for(let t=0;t<s.length;++t)if(s[t].type===e)return!0;return!1}function ya(s){for(let e=0;e<s.length;++e)switch(s[e].type){case"space":case"comment":case"newline":break;default:return e}return-1}function ba(s){switch(s?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function Ht(s){switch(s.type){case"document":return s.start;case"block-map":{let e=s.items[s.items.length-1];return e.sep??e.start}case"block-seq":return s.items[s.items.length-1].start;default:return[]}}function Se(s){if(s.length===0)return[];let e=s.length;e:for(;--e>=0;)switch(s[e].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;s[++e]?.type==="space";);return s.splice(e,s.length)}function ga(s){if(s.start.type==="flow-seq-start")for(let e of s.items)e.sep&&!e.value&&!Z(e.start,"explicit-key-ind")&&!Z(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,ba(e.value)?e.value.end?Array.prototype.push.apply(e.value.end,e.sep):e.value.end=e.sep:Array.prototype.push.apply(e.start,e.sep),delete e.sep)}var Pi=class{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 jf.Lexer,this.onNewLine=e}*parse(e,t=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(let i of this.lexer.lex(e,t))yield*this.next(i);t||(yield*this.end())}*next(e){if(this.source=e,Kf.env.LOG_TOKENS&&console.log("|",ma.prettyToken(e)),this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}let t=ma.tokenType(e);if(t)if(t==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=t,yield*this.step(),t){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case"space":this.atNewLine&&e[0]===" "&&(this.indent+=e.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=e.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}else{let i=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:i,source:e}),this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let e=this.peek(1);if(this.type==="doc-end"&&e?.type!=="doc-end"){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!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 i=this.peek(1);switch(t.type==="block-scalar"?t.indent="indent"in i?i.indent:0:t.type==="flow-collection"&&i.type==="document"&&(t.indent=0),t.type==="flow-collection"&&ga(t),i.type){case"document":i.value=t;break;case"block-scalar":i.props.push(t);break;case"block-map":{let n=i.items[i.items.length-1];if(n.value){i.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=i.items[i.items.length-1];n.value?i.items.push({start:[],value:t}):n.value=t;break}case"flow-collection":{let n=i.items[i.items.length-1];!n||n.value?i.items.push({start:[],key:t,sep:[]}):n.sep?n.value=t:Object.assign(n,{key:t,sep:[]});return}default:yield*this.pop(),yield*this.pop(t)}if((i.type==="document"||i.type==="block-map"||i.type==="block-seq")&&(t.type==="block-map"||t.type==="block-seq")){let n=t.items[t.items.length-1];n&&!n.sep&&!n.value&&n.start.length>0&&ya(n.start)===-1&&(t.indent===0||n.start.every(r=>r.type!=="comment"||r.indent<t.indent))&&(i.type==="document"?i.end=n.start:i.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:[]};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":{ya(e.start)!==-1?(yield*this.pop(),yield*this.step()):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);t?this.stack.push(t):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=Ht(this.peek(2)),i=Se(t),n;e.end?(n=e.end,n.push(this.sourceToken),delete e.end):n=[this.sourceToken];let r={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:i,key:e,sep:n}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=r}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(`
|
|
136
|
-
`)+1;for(;t!==0;)this.onNewLine(this.offset+t),t=this.source.indexOf(`
|
|
137
|
-
`,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 i="end"in t.value?t.value.end:void 0;(Array.isArray(i)?i[i.length-1]:void 0)?.type==="comment"?i?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.sep?t.sep.push(this.sourceToken):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)){Array.prototype.push.apply(n,t.start),n.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let i=!this.onKeyLine&&this.indent===e.indent,n=i&&(t.sep||t.explicitKey)&&this.type!=="seq-item-ind",r=[];if(n&&t.sep&&!t.value){let a=[];for(let o=0;o<t.sep.length;++o){let l=t.sep[o];switch(l.type){case"newline":a.push(o);break;case"space":break;case"comment":l.indent>e.indent&&(a.length=0);break;default:a.length=0}}a.length>=2&&(r=t.sep.splice(a[1]))}switch(this.type){case"anchor":case"tag":n||t.value?(r.push(this.sourceToken),e.items.push({start:r}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"explicit-key-ind":!t.sep&&!t.explicitKey?(t.start.push(this.sourceToken),t.explicitKey=!0):n||t.value?(r.push(this.sourceToken),e.items.push({start:r,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(t.explicitKey)if(t.sep)if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(Z(t.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]});else if(ba(t.key)&&!Z(t.sep,"newline")){let a=Se(t.start),o=t.key,l=t.sep;l.push(this.sourceToken),delete t.key,delete t.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:a,key:o,sep:l}]})}else r.length>0?t.sep=t.sep.concat(r,this.sourceToken):t.sep.push(this.sourceToken);else if(Z(t.start,"newline"))Object.assign(t,{key:null,sep:[this.sourceToken]});else{let a=Se(t.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:a,key:null,sep:[this.sourceToken]}]})}else t.sep?t.value||n?e.items.push({start:r,key:null,sep:[this.sourceToken]}):Z(t.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let a=this.flowScalar(this.type);n||t.value?(e.items.push({start:r,key:a,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(a):(Object.assign(t,{key:a,sep:[]}),this.onKeyLine=!0);return}default:{let a=this.startBlockValue(e);if(a){if(a.type==="block-seq"){if(!t.explicitKey&&t.sep&&!Z(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 i&&e.items.push({start:r});this.stack.push(a);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 i="end"in t.value?t.value.end:void 0;(Array.isArray(i)?i[i.length-1]:void 0)?.type==="comment"?i?.push(this.sourceToken):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)){Array.prototype.push.apply(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;t.value||Z(t.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return}if(this.indent>e.indent){let i=this.startBlockValue(e);if(i){this.stack.push(i);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){let t=e.items[e.items.length-1];if(this.type==="flow-error-end"){let i;do yield*this.pop(),i=this.peek(1);while(i?.type==="flow-collection")}else if(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!t||t.sep?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return;case"map-value-ind":!t||t.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!t||t.value?e.items.push({start:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let n=this.flowScalar(this.type);!t||t.value?e.items.push({start:[],key:n,sep:[]}):t.sep?this.stack.push(n):Object.assign(t,{key:n,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}let i=this.startBlockValue(e);i?this.stack.push(i):(yield*this.pop(),yield*this.step())}else{let i=this.peek(2);if(i.type==="block-map"&&(this.type==="map-value-ind"&&i.indent===e.indent||this.type==="newline"&&!i.items[i.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&i.type!=="flow-collection"){let n=Ht(i),r=Se(n);ga(e);let a=e.end.splice(1,e.end.length);a.push(this.sourceToken);let o={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:r,key:e,sep:a}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=o}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let t=this.source.indexOf(`
|
|
138
|
-
`)+1;for(;t!==0;)this.onNewLine(this.offset+t),t=this.source.indexOf(`
|
|
139
|
-
`,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=Ht(e),i=Se(t);return i.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let t=Ht(e),i=Se(t);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return this.type!=="comment"||this.indent<=t?!1:e.every(i=>i.type==="newline"||i.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],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:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}};Sa.Parser=Pi});var Aa=y(ze=>{"use strict";var wa=Si(),Rf=Ye(),Xe=Je(),Uf=gs(),Yf=q(),xf=Ii(),va=$i();function ka(s){let e=s.prettyErrors!==!1;return{lineCounter:s.lineCounter||e&&new xf.LineCounter||null,prettyErrors:e}}function Vf(s,e={}){let{lineCounter:t,prettyErrors:i}=ka(e),n=new va.Parser(t?.addNewLine),r=new wa.Composer(e),a=Array.from(r.compose(n.parse(s)));if(i&&t)for(let o of a)o.errors.forEach(Xe.prettifyError(s,t)),o.warnings.forEach(Xe.prettifyError(s,t));return a.length>0?a:Object.assign([],{empty:!0},r.streamInfo())}function Na(s,e={}){let{lineCounter:t,prettyErrors:i}=ka(e),n=new va.Parser(t?.addNewLine),r=new wa.Composer(e),a=null;for(let o of r.compose(n.parse(s),!0,s.length))if(!a)a=o;else if(a.options.logLevel!=="silent"){a.errors.push(new Xe.YAMLParseError(o.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return i&&t&&(a.errors.forEach(Xe.prettifyError(s,t)),a.warnings.forEach(Xe.prettifyError(s,t))),a}function Jf(s,e,t){let i;typeof e=="function"?i=e:t===void 0&&e&&typeof e=="object"&&(t=e);let n=Na(s,t);if(!n)return null;if(n.warnings.forEach(r=>Uf.warn(n.options.logLevel,r)),n.errors.length>0){if(n.options.logLevel!=="silent")throw n.errors[0];n.errors=[]}return n.toJS(Object.assign({reviver:i},t))}function Gf(s,e,t){let i=null;if(typeof e=="function"||Array.isArray(e)?i=e:t===void 0&&e&&(t=e),typeof t=="string"&&(t=t.length),typeof t=="number"){let n=Math.round(t);t=n<1?void 0:n>8?{indent:8}:{indent:n}}if(s===void 0){let{keepUndefined:n}=t??e??{};if(!n)return}return Yf.isDocument(s)&&!i?s.toString(t):new Rf.Document(s,i,t).toString(t)}ze.parse=Jf;ze.parseAllDocuments=Vf;ze.parseDocument=Na;ze.stringify=Gf});var Oa=y(O=>{"use strict";var Wf=Si(),Qf=Ye(),Hf=Zs(),Mi=Je(),Xf=Oe(),ee=q(),zf=Q(),Zf=L(),eu=X(),tu=z(),su=Wt(),iu=Li(),nu=Ii(),ru=$i(),Xt=Aa(),qa=ke();O.Composer=Wf.Composer;O.Document=Qf.Document;O.Schema=Hf.Schema;O.YAMLError=Mi.YAMLError;O.YAMLParseError=Mi.YAMLParseError;O.YAMLWarning=Mi.YAMLWarning;O.Alias=Xf.Alias;O.isAlias=ee.isAlias;O.isCollection=ee.isCollection;O.isDocument=ee.isDocument;O.isMap=ee.isMap;O.isNode=ee.isNode;O.isPair=ee.isPair;O.isScalar=ee.isScalar;O.isSeq=ee.isSeq;O.Pair=zf.Pair;O.Scalar=Zf.Scalar;O.YAMLMap=eu.YAMLMap;O.YAMLSeq=tu.YAMLSeq;O.CST=su;O.Lexer=iu.Lexer;O.LineCounter=nu.LineCounter;O.Parser=ru.Parser;O.parse=Xt.parse;O.parseAllDocuments=Xt.parseAllDocuments;O.parseDocument=Xt.parseDocument;O.stringify=Xt.stringify;O.visit=qa.visit;O.visitAsync=qa.visitAsync});var es=()=>({version:"0.1.0",phase:"IDLE",spec:null,branch:null,discovery:{answers:[],completed:!1,currentQuestion:0,audience:"human"},specState:{path:null,status:"none"},execution:{iteration:0,lastProgress:null,modifiedFiles:[],lastVerification:null,awaitingStatusReport:!1,debt:null,completedTasks:[],debtCounter:0,naItems:[]},decisions:[],lastCalledAt:null,classification:null}),fu=(s,e,t,i)=>({concerns:s,tools:e,providers:t,project:i,maxIterationsBeforeRestart:15,verifyCommand:null,allowGit:!1,command:"npx eser@latest noskills"});var oe=La(Oa(),1);var Y=".eser",we=`${Y}/.state`,_i=`${we}/state.json`,Zt=`${Y}/manifest.yml`,Ze=`${Y}/concerns`,Ea=`${Y}/rules`,zt=`${Y}/specs`,Ta=`${Y}/workflows`,et=`${we}/specs`,au=`${we}/active.json`,ve={eserDir:Y,stateDir:we,stateFile:_i,manifestFile:Zt,concernsDir:Ze,rulesDir:Ea,specsDir:zt,workflowsDir:Ta,specStatesDir:et,activeFile:au,specDir:s=>`${zt}/${s}`,specFile:s=>`${zt}/${s}/spec.md`,specStateFile:s=>`${et}/${s}.json`,concernFile:s=>`${Ze}/${s}.json`,eserGitignore:`${Y}/.gitignore`},Di=async s=>{let e=`${s}/${_i}`;try{let t=await T.fs.readTextFile(e);return JSON.parse(t)}catch{return es()}},Ch=async(s,e)=>{if(e==null)return Di(s);let t=`${s}/${ve.specDir(e)}`;try{await T.fs.stat(t)}catch{throw new Error(`Spec '${e}' not found. Run \`noskills spec list\` to see available specs.`)}let i=await lu(s,e);if(i.spec===e)return i;let n=await Di(s);return n.spec===e?n:{...i,spec:e}},Ih=s=>{if(s===void 0)return null;for(let e of s)if(e.startsWith("--spec="))return e.slice(7);return null},ou=async(s,e)=>{let t=`${s}/${we}`,i=`${s}/${_i}`;await T.fs.mkdir(t,{recursive:!0}),await T.fs.writeTextFile(i,JSON.stringify(e,null,2)+`
|
|
140
|
-
`)},Ph=async s=>(await Di(s)).spec;var lu=async(s,e)=>{let t=`${s}/${ve.specStateFile(e)}`;try{let i=await T.fs.readTextFile(t);return JSON.parse(i)}catch{return es()}},cu=async(s,e,t)=>{let i=`${s}/${et}`,n=`${s}/${ve.specStateFile(e)}`;await T.fs.mkdir(i,{recursive:!0}),await T.fs.writeTextFile(n,JSON.stringify(t,null,2)+`
|
|
141
|
-
`)},$h=async s=>{let e=`${s}/${et}`,t=[];try{for await(let i of T.fs.readDir(e))if(i.isFile&&i.name.endsWith(".json")){let n=i.name.replace(/\.json$/,""),r=await T.fs.readTextFile(`${e}/${i.name}`);t.push({name:n,state:JSON.parse(r)})}}catch{}return t},Mh=async s=>{let e=`${s}/${Zt}`;try{let t=await T.fs.readTextFile(e),i=oe.parse(t);return i?.noskills===void 0?null:i.noskills}catch{return null}},Dh=async(s,e)=>{let t=`${s}/${Zt}`,i;try{let r=await T.fs.readTextFile(t);i=oe.parseDocument(r)}catch{i=new oe.Document({})}let n=i.createNode(e);n.commentBefore=" noskills orchestrator \u2014 inline comments in this section won't be preserved on next write",i.set("noskills",n),await T.fs.writeTextFile(t,i.toString())},_h=async(s,e)=>{let t=`${s}/${ve.concernFile(e)}`;try{let i=await T.fs.readTextFile(t);return JSON.parse(i)}catch{return null}},Bh=async(s,e)=>{let t=`${s}/${Ze}`,i=`${s}/${ve.concernFile(e.id)}`;await T.fs.mkdir(t,{recursive:!0}),await T.fs.writeTextFile(i,JSON.stringify(e,null,2)+`
|
|
142
|
-
`)},Fh=async s=>{let e=`${s}/${Ze}`,t=[];try{for await(let i of T.fs.readDir(e))if(i.isFile&&i.name.endsWith(".json")){let n=await T.fs.readTextFile(`${e}/${i.name}`);t.push(JSON.parse(n))}}catch{}return t},Kh=async s=>{let e=[Y,we,et,Ze,Ea,zt,Ta];for(let i of e)await T.fs.mkdir(`${s}/${i}`,{recursive:!0});let t=`${s}/${ve.eserGitignore}`;try{await T.fs.stat(t)}catch{await T.fs.writeTextFile(t,`# eser toolchain runtime state \u2014 not tracked by git
|
|
143
|
-
.state/
|
|
144
|
-
`)}},jh=async(s,e)=>{await ou(s,e),e.spec!==null&&await cu(s,e.spec,e)},Rh=async s=>{try{let e=await T.fs.readTextFile(`${s}/${Zt}`);return oe.parse(e)?.noskills!==void 0}catch{return!1}};export{es as a,fu as b,Oa as c,ve as d,Di as e,Ch as f,Ih as g,ou as h,Ph as i,lu as j,cu as k,$h as l,Mh as m,Dh as n,_h as o,Bh as p,Fh as q,Kh as r,jh as s,Rh as t};
|
package/chunks/chunk-IAR3DEWR.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as n}from"./chunk-EMHZF6ZY.js";var i={UNINITIALIZED:["IDLE"],IDLE:["DISCOVERY"],DISCOVERY:["DISCOVERY_REVIEW"],DISCOVERY_REVIEW:["DISCOVERY_REVIEW","SPEC_DRAFT"],SPEC_DRAFT:["SPEC_DRAFT","SPEC_APPROVED"],SPEC_APPROVED:["EXECUTING"],EXECUTING:["DONE","BLOCKED"],BLOCKED:["EXECUTING"],DONE:["IDLE"]},c=(e,s)=>i[e].includes(s),t=(e,s)=>{if(!c(e,s))throw new Error(`Invalid phase transition: ${e} \u2192 ${s}. Allowed: ${i[e].join(", ")}`)},p=(e,s)=>(t(e.phase,s),{...e,phase:s}),u=(e,s,a)=>(t(e.phase,"DISCOVERY"),{...e,phase:"DISCOVERY",spec:s,branch:a,discovery:{answers:[],completed:!1,currentQuestion:0,audience:"human"},specState:{path:null,status:"none"},execution:{iteration:0,lastProgress:null,modifiedFiles:[],lastVerification:null,awaitingStatusReport:!1,debt:null,completedTasks:[],debtCounter:0,naItems:[]},decisions:[]}),E=(e,s,a)=>{if(e.phase!=="DISCOVERY"&&e.phase!=="DISCOVERY_REVIEW")throw new Error(`Cannot add discovery answer in phase: ${e.phase}`);let r=[...e.discovery.answers.filter(o=>o.questionId!==s),{questionId:s,answer:a}];return{...e,discovery:{...e.discovery,answers:r}}},d=e=>{if(e.phase!=="DISCOVERY")throw new Error(`Cannot complete discovery in phase: ${e.phase}`);return{...e,phase:"DISCOVERY_REVIEW",discovery:{...e.discovery,completed:!0},specState:{path:n.specFile(e.spec),status:"draft"}}},S=e=>(t(e.phase,"SPEC_DRAFT"),{...e,phase:"SPEC_DRAFT"}),m=e=>{if(e.phase!=="DISCOVERY")throw new Error(`Cannot advance discovery question in phase: ${e.phase}`);return{...e,discovery:{...e.discovery,currentQuestion:e.discovery.currentQuestion+1}}},D=e=>(t(e.phase,"SPEC_APPROVED"),{...e,phase:"SPEC_APPROVED",specState:{...e.specState,status:"approved"}}),C=e=>(t(e.phase,"EXECUTING"),{...e,phase:"EXECUTING",discovery:{answers:[],completed:!0,currentQuestion:0,audience:"human"},execution:{iteration:0,lastProgress:null,modifiedFiles:[],lastVerification:null,awaitingStatusReport:!1,debt:null,completedTasks:[],debtCounter:0,naItems:[]}});var I=(e,s)=>(t(e.phase,"BLOCKED"),{...e,phase:"BLOCKED",execution:{...e.execution,lastProgress:`BLOCKED: ${s}`}}),F=(e,s)=>({...e,decisions:[...e.decisions,s]}),R=e=>({...e,phase:"IDLE",spec:null,branch:null,discovery:{answers:[],completed:!1,currentQuestion:0,audience:"human"},specState:{path:null,status:"none"},execution:{iteration:0,lastProgress:null,modifiedFiles:[],lastVerification:null,awaitingStatusReport:!1,debt:null,completedTasks:[],debtCounter:0,naItems:[]},decisions:[],classification:null});export{p as a,u as b,E as c,d,S as e,m as f,D as g,C as h,I as i,F as j,R as k};
|
package/chunks/chunk-RYQPPQNO.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{b as f}from"./chunk-VPXOI7CR.js";import{d as h}from"./chunk-EMHZF6ZY.js";import{b as d}from"./chunk-MNEZ5QGX.js";var m=l=>{let i=l.split(/\n/).flatMap(t=>t.trim().length>0?[t.trim()]:[]);return i.length>1?i:l.split(/\.\s+|;\s+/).map(t=>t.trim()).filter(t=>t.length>5)},w=(l,i=[])=>{let t=[],r=l.find(e=>e.questionId==="ambition");if(r!==void 0){let e=r.answer,a=e.match(/10[- ]?star[:\s]+(.+)/i),p=a!==null?a[1].trim():e,u=p.split(/\n/).map(n=>n.trim()).filter(n=>n.length>0),s;u.length>1?s=u.map(n=>n.replace(/^\s*[-\u2022*]\s*/,"").trim()).filter(n=>n.length>3):s=p.split(/\.\s+/).map(n=>n.replace(/^\s*[-\u2022*]\s*/,"").trim()).filter(n=>n.length>3);for(let n of s){let c=n.replace(/^(the|a|an|with|plus|also)\s+/i,"").trim();c=c.replace(/^(the\s+)?(target|goal|objective)[:\s]+/i,"").trim(),c=c.charAt(0).toUpperCase()+c.slice(1),c=c.replace(/[.\u2026]+$/,"").trim();let v=/^[A-Z][a-z]+\s/.test(c)&&/^(Add|Create|Build|Implement|Set up|Configure|Enable|Update|Remove|Refactor|Extract|Fix|Write|Design|Integrate|Support|Replace|Migrate)\s/i.test(c);c.length>100&&!v&&(c=`Implement ${c.charAt(0).toLowerCase()}${c.slice(1)}`,c.length>140&&(c=c.slice(0,137)+"...")),c.length>3&&t.push(c)}}let o=l.find(e=>e.questionId==="verification");if(o!==void 0){let e=o.answer.split(/\n/).map(a=>a.replace(/^\s*[-\u2022*]\s*/,"").trim()).filter(a=>a.length>0);for(let a of e)t.push(a)}for(let e of i){let a=e.choice.toLowerCase();if(a.includes("accepted")||a.includes("add to scope")){let p=e.question.replace(/^should\s+(we|i)\s+/i,"").replace(/\?+$/,"").trim(),u=p.charAt(0).toUpperCase()+p.slice(1);t.push(u)}}return t.length===0&&t.push("_Tasks need to be defined before execution. Add tasks manually or run discovery with more detail._"),t},S=(l,i)=>{let t={};if(i===null){for(let r of l.specSections)t[r]=!1;return t}for(let r of l.specSections){let o=r.toLowerCase();o.includes("design")||o.includes("mobile")||o.includes("layout")||o.includes("interaction")?t[r]=i.involvesWebUI:o.includes("contributor")||o.includes("public api")||o.includes("api surface")?t[r]=i.involvesPublicAPI:o.includes("migration")||o.includes("deprecation")||o.includes("backward")||o.includes("compatibility")?t[r]=i.involvesMigration:o.includes("audit")||o.includes("access control")||o.includes("data handling")?t[r]=i.involvesDataHandling:t[r]=!0}return t},g=(l,i,t,r,o)=>{let e=[];e.push(`# Spec: ${l}`),e.push(""),e.push("## Status: draft"),e.push(""),t.length>0&&(e.push(`## Concerns: ${t.map(s=>s.id).join(", ")}`),e.push("")),e.push("## Discovery Answers"),e.push("");for(let s of i)e.push(`### ${s.questionId}`),e.push(""),e.push(s.answer),e.push("");for(let s of t)if(s.specSections.length>0){let n=S(s,o??null);for(let c of s.specSections)n[c]!==!1&&(e.push(`## ${c} (${s.id})`),e.push(""),e.push("_To be addressed during execution._"),e.push(""))}if(r.length>0){e.push("## Decisions"),e.push(""),e.push("| # | Decision | Choice | Promoted |"),e.push("|---|----------|--------|----------|");for(let s=0;s<r.length;s++){let n=r[s];e.push(`| ${s+1} | ${n.question} | ${n.choice} | ${n.promoted?"yes":"no"} |`)}e.push("")}let a=i.find(s=>s.questionId==="scope_boundary");if(a!==void 0){e.push("## Out of Scope"),e.push("");let s=m(a.answer);for(let n of s)e.push(`- ${n}`);e.push("")}let p=w(i,r);e.push("## Tasks"),e.push("");for(let s=0;s<p.length;s++)e.push(`- [ ] task-${s+1}: ${p[s]}`);e.push("");let u=i.find(s=>s.questionId==="verification");if(e.push("## Verification"),e.push(""),u!==void 0){let s=m(u.answer);for(let n of s)e.push(`- ${n}`)}else e.push("_To be defined._");return e.push(""),e.join(`
|
|
2
|
-
`)};var D=async(l,i,t)=>{if(i.spec===null)throw new Error("No active spec");let r=`${l}/${h.specDir(i.spec)}`,o=`${l}/${h.specFile(i.spec)}`;await d.fs.mkdir(r,{recursive:!0});let e=g(i.spec,i.discovery.answers,t,i.decisions,i.classification);await d.fs.writeTextFile(o,e);let a=f(i.spec,e),p=`${r}/progress.json`,u={spec:i.spec,status:"draft",tasks:a.tasks.map(s=>({id:s.id,title:s.title,status:"pending"})),decisions:i.decisions.map(s=>({question:s.question,choice:s.choice,promoted:s.promoted})),debt:[],updatedAt:new Date().toISOString()};return await d.fs.writeTextFile(p,JSON.stringify(u,null,2)+`
|
|
3
|
-
`),o};export{D as a};
|
package/chunks/chunk-XADY6SXR.js
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import{a as h}from"./chunk-YK6UG66R.js";import{d}from"./chunk-EMHZF6ZY.js";import{b as n}from"./chunk-MNEZ5QGX.js";var p="<!-- noskills:start -->",u="<!-- noskills:end -->",v=(t,o,s="npx eser noskills")=>{let e=[p,"## noskills orchestrator","","This project uses noskills for state-driven orchestration.","Do NOT read `.eser/rules/`, `.eser/specs/`, or concern files directly.","noskills gives you exactly what you need via JSON output.","","### Protocol","",` ${s} next # get current instruction`,` ${s} next --answer="your response" # submit result and advance`,"","### When to call noskills next","",`You MUST call \`${s} next\` in these situations:`,"","1. At the **START** of every conversation (first thing you do)","2. **BEFORE** creating or modifying any file (to verify you have an active task)","3. **AFTER** completing a logical unit of work (to report progress)","4. When you encounter a **DECISION** that affects architecture or scope","5. When you are **UNSURE** what to do next","","NEVER proceed with implementation without checking noskills first.","NEVER make architectural decisions independently \u2014 noskills routes them to the user."];if((o?.allowGit??!1)||e.push("","### Git is read-only","","You MUST NOT run git write commands: commit, add, push, checkout, stash,","reset, merge, rebase, cherry-pick. The user controls git. You control files.","You MAY read from git: log, diff, status, show, blame."),e.push("","### Convention discovery","","When you discover a pattern, receive a correction, or identify a recurring",'preference from the user, ask: "Should this be a permanent rule for this',`project, or just for this task?" If permanent, run: \`${s} rule add`,'"<description>"`. If just this task, note it and move on.',"Never write to `.eser/rules/` directly.","","### Decision principle: Explicit > Clever","","You NEVER skip steps, bypass questions, or make assumptions on behalf of the user.","- Discovery questions \u2192 ask the user, don't answer yourself","- Classification \u2192 ask the user, don't infer","- Spec approval \u2192 ask the user, don't auto-approve","- Task refinement \u2192 ask the user, don't self-assign","- Rule promotion \u2192 ask the user, don't decide",`If you think something can be skipped, ASK "would you like to skip this?" \u2014 don't skip it.`,"","### Command execution","","When told to run a noskills command, execute it IMMEDIATELY. Do not explore,","research, read source code, or plan first. The command output contains all the","context you need. Exploring noskills internals wastes tokens and delays the user.","","### JSON output","","noskills returns JSON with a `phase` field and phase-specific instructions.","The `meta` block contains resume context - use it to orient yourself,","especially after compaction or at the start of a new session.","Follow the `instruction` field. Use `transition` commands to advance state."),t.length>0){e.push("","### Active Rules","");for(let i of t)e.push(`- ${i}`)}return e.push(u),e.join(`
|
|
2
|
-
`)},f=async(t,o,s,e="npx eser noskills")=>{let i=`${t}/CLAUDE.md`,a=v(o,s,e),r;try{r=await n.fs.readTextFile(i);let c=r.indexOf(p),l=r.indexOf(u);c!==-1&&l!==-1?r=r.slice(0,c)+a+r.slice(l+u.length):r=r.trimEnd()+`
|
|
3
|
-
|
|
4
|
-
`+a+`
|
|
5
|
-
`}catch{r=a+`
|
|
6
|
-
`}await n.fs.writeTextFile(i,r)};var m=async(t,o,s="npx eser noskills")=>{let e=["# Generated by noskills \u2014 do not edit manually","","## noskills orchestrator","","This project uses noskills for state-driven orchestration.","Do NOT read `.eser/specs/` or `.eser/rules/` directly. noskills gives you what you need.","",`Run \`${s} next\` to get your current instruction.`,`Submit results with \`${s} next --answer="..."\``,"","## When to call noskills next","","1. At the START of every conversation","2. BEFORE creating or modifying any file","3. AFTER completing a logical unit of work","4. When you encounter a DECISION that affects architecture","5. When you are UNSURE what to do next","","NEVER proceed with implementation without checking noskills first.",""];if(o.length>0){e.push("## Rules","");for(let i of o)e.push(`- ${i}`);e.push("")}await n.fs.writeTextFile(`${t}/.cursorrules`,e.join(`
|
|
7
|
-
`))};var y=async(t,o,s="npx eser noskills")=>{let e=["# Generated by noskills \u2014 do not edit manually","","## noskills orchestrator","","This project uses noskills for state-driven orchestration.","Do NOT read `.eser/specs/` or `.eser/rules/` directly. noskills gives you what you need.","",`Run \`${s} next\` to get your current instruction.`,`Submit results with \`${s} next --answer="..."\``,"","## When to call noskills next","","1. At the START of every conversation","2. BEFORE creating or modifying any file","3. AFTER completing a logical unit of work","4. When you encounter a DECISION that affects architecture","5. When you are UNSURE what to do next","","NEVER proceed with implementation without checking noskills first.",""];if(o.length>0){e.push("## Rules","");for(let i of o)e.push(`- ${i}`);e.push("")}await n.fs.mkdir(`${t}/.kiro/steering`,{recursive:!0}),await n.fs.writeTextFile(`${t}/.kiro/steering/conventions.md`,e.join(`
|
|
8
|
-
`))};var k=async(t,o,s="npx eser noskills")=>{let e=["# Generated by noskills \u2014 do not edit manually","","## noskills orchestrator","","This project uses noskills for state-driven orchestration.","Do NOT read `.eser/specs/` or `.eser/rules/` directly. noskills gives you what you need.","",`Run \`${s} next\` to get your current instruction.`,`Submit results with \`${s} next --answer="..."\``,"","## When to call noskills next","","1. At the START of every conversation","2. BEFORE creating or modifying any file","3. AFTER completing a logical unit of work","4. When you encounter a DECISION that affects architecture","5. When you are UNSURE what to do next","","NEVER proceed with implementation without checking noskills first.",""];if(o.length>0){e.push("## Rules","");for(let i of o)e.push(`- ${i}`);e.push("")}await n.fs.mkdir(`${t}/.github`,{recursive:!0}),await n.fs.writeTextFile(`${t}/.github/copilot-instructions.md`,e.join(`
|
|
9
|
-
`))};var g=async(t,o,s="npx eser noskills")=>{let e=["# Generated by noskills \u2014 do not edit manually","","## noskills orchestrator","","This project uses noskills for state-driven orchestration.","Do NOT read `.eser/specs/` or `.eser/rules/` directly. noskills gives you what you need.","",`Run \`${s} next\` to get your current instruction.`,`Submit results with \`${s} next --answer="..."\``,"","## When to call noskills next","","1. At the START of every conversation","2. BEFORE creating or modifying any file","3. AFTER completing a logical unit of work","4. When you encounter a DECISION that affects architecture","5. When you are UNSURE what to do next","","NEVER proceed with implementation without checking noskills first.",""];if(o.length>0){e.push("## Rules","");for(let i of o)e.push(`- ${i}`);e.push("")}await n.fs.writeTextFile(`${t}/.windsurfrules`,e.join(`
|
|
10
|
-
`))};var N=t=>({hooks:{PreToolUse:[{matcher:"Write|Edit|MultiEdit|Bash",hooks:[{type:"command",command:`${t} invoke-hook pre-tool-use`,timeout:5}]}],PostToolUse:[{matcher:"Write|Edit|MultiEdit",hooks:[{type:"command",command:`${t} invoke-hook post-file-write`,timeout:3}]},{matcher:"Bash",hooks:[{type:"command",command:`${t} invoke-hook post-bash`,timeout:3}]}],Stop:[{hooks:[{type:"command",command:`${t} invoke-hook stop`,timeout:10}]}],SessionStart:[{hooks:[{type:"command",command:`${t} invoke-hook session-start`,timeout:5}]}]}}),w=async(t,o="npx eser@latest noskills")=>{let s=`${t}/.claude/settings.json`,e={};try{let r=await n.fs.readTextFile(s);e=JSON.parse(r)}catch{}let i=N(o),a={...e,...i};await n.fs.mkdir(`${t}/.claude`,{recursive:!0}),await n.fs.writeTextFile(s,JSON.stringify(a,null,2)+`
|
|
11
|
-
`)};var O=async t=>{let o=`${t}/${d.rulesDir}`,s=[];try{for await(let e of n.fs.readDir(o))if(e.isFile&&(e.name.endsWith(".md")||e.name.endsWith(".txt"))){let i=await n.fs.readTextFile(`${o}/${e.name}`),a=i.trim().split(`
|
|
12
|
-
`)[0]??i.trim();s.push(a)}}catch{}return s},b={cursor:m,kiro:y,copilot:k,windsurf:g},P=async(t,o,s)=>{let e=await O(t),i=[],a={allowGit:s?.allowGit??!1},r=s?.command??"npx eser@latest noskills";h(r);for(let c of o){if(c==="claude-code"){await f(t,e,a,r),i.push(c);continue}let l=b[c];l!==void 0&&(await l(t,e,r),i.push(c))}return o.includes("claude-code")&&(await w(t,r),await A(t,r),await F(t,r),i.push("hooks")),i},A=async(t,o)=>{let s=`${t}/.claude/agents`;await n.fs.mkdir(s,{recursive:!0});let e=`---
|
|
13
|
-
name: noskills-executor
|
|
14
|
-
description: "Executes a single noskills task."
|
|
15
|
-
tools: Read, Edit, MultiEdit, Write, Bash, Grep, Glob, LS
|
|
16
|
-
---
|
|
17
|
-
|
|
18
|
-
You are executing a single task from a noskills spec.
|
|
19
|
-
Your ONLY job is to complete the task described in the prompt.
|
|
20
|
-
Follow all behavioral rules provided in the prompt.
|
|
21
|
-
Do NOT start new tasks, explore unrelated code, or make architectural decisions.
|
|
22
|
-
If the task is too vague to execute, say so immediately.
|
|
23
|
-
|
|
24
|
-
## Self-Verification
|
|
25
|
-
After completing the task, you MUST verify your own work before reporting:
|
|
26
|
-
1. Run type check: \`deno check\` on all modified files
|
|
27
|
-
2. Run test suite: \`deno test\` on the relevant test files
|
|
28
|
-
3. If type check or tests fail, fix the issues before reporting
|
|
29
|
-
|
|
30
|
-
## Reporting
|
|
31
|
-
When finished, provide a structured JSON summary:
|
|
32
|
-
\\\`\\\`\\\`json
|
|
33
|
-
{"completed": ["<item IDs done>"], "remaining": ["<item IDs not done>"], "blocked": ["<item IDs needing decisions>"], "filesModified": ["<paths>"], "verification": {"typeCheck": "pass|fail", "tests": "pass|fail (N passed, M failed)"}}
|
|
34
|
-
\\\`\\\`\\\`
|
|
35
|
-
|
|
36
|
-
Do NOT return raw test output \u2014 summarize it in the verification field.
|
|
37
|
-
The orchestrator will submit this to \`${o} next --answer\` on your behalf.
|
|
38
|
-
`;await n.fs.writeTextFile(`${s}/noskills-executor.md`,e)},F=async(t,o)=>{let s=`${t}/.claude/agents`;await n.fs.mkdir(s,{recursive:!0}),await n.fs.writeTextFile(`${s}/noskills-verifier.md`,`---
|
|
39
|
-
name: noskills-verifier
|
|
40
|
-
description: "Independently verifies completed task work. Read-only. Never sees the executor's context."
|
|
41
|
-
tools: Read, Bash, Grep, Glob, LS
|
|
42
|
-
---
|
|
43
|
-
|
|
44
|
-
You are verifying another agent's work. You have NO context about how it was done.
|
|
45
|
-
Read the changed files. Run the test suite. Check each acceptance criterion independently.
|
|
46
|
-
|
|
47
|
-
For each acceptance criterion:
|
|
48
|
-
- PASS: with evidence \u2014 show the grep result, the test output, or the file content that proves it
|
|
49
|
-
- FAIL: with specific reason \u2014 what's missing, what's wrong, what doesn't match
|
|
50
|
-
|
|
51
|
-
Be skeptical. Don't assume anything works \u2014 verify it yourself.
|
|
52
|
-
You CANNOT edit files. Read-only access only.
|
|
53
|
-
|
|
54
|
-
## Verification Steps
|
|
55
|
-
1. Read each modified file and verify the changes are correct
|
|
56
|
-
2. Run type check: \\\`deno check\\\` on modified files
|
|
57
|
-
3. Run tests: \\\`deno test\\\` on relevant test files
|
|
58
|
-
4. Check each acceptance criterion against actual file contents
|
|
59
|
-
|
|
60
|
-
## Report Format
|
|
61
|
-
When finished, provide a structured JSON summary:
|
|
62
|
-
\\\`\\\`\\\`json
|
|
63
|
-
{"results": [{"id": "ac-1", "status": "PASS", "evidence": "..."}, {"id": "ac-2", "status": "FAIL", "reason": "..."}]}
|
|
64
|
-
\\\`\\\`\\\`
|
|
65
|
-
|
|
66
|
-
The orchestrator will use this report for the noskills status report.
|
|
67
|
-
`)};export{O as a,P as b};
|
package/chunks/done-5IX2F6V7.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as C,d as U}from"./chunk-KJH7Q57A.js";import{c as S}from"./chunk-YK6UG66R.js";import{a as E}from"./chunk-IAR3DEWR.js";import{f,g as h,h as g}from"./chunk-EMHZF6ZY.js";import{c as n,d as i,f as l,g as m,o as d,q as w,r as u}from"./chunk-Y6AFIAJP.js";import{a,b as p}from"./chunk-2N4GTHXQ.js";import{b as c}from"./chunk-MNEZ5QGX.js";import"./chunk-DHMCIRLT.js";import"./chunk-4BH6CF3J.js";import"./chunk-OTRBRRIO.js";var A=async $=>{let e=d({renderer:u.ansi(),sink:w.stdout()}),s=c.process.cwd(),k=h($),t=await f(s,k);if(t.phase!=="EXECUTING")return e.writeln(l(`Cannot complete in phase: ${t.phase}`)),e.writeln(i("Only EXECUTING phase can transition to DONE.")),await e.close(),p({exitCode:1});let r=E(t,"DONE");if(await g(s,r),r.spec!==null&&(await C(s,r.spec,"done"),await U(s,r.spec,"done")),e.writeln(m("\u2714")," Spec completed!"),e.writeln(""),e.writeln(" Spec: ",n(t.spec??"unknown")),e.writeln(` Iterations: ${t.execution.iteration}`),e.writeln(` Decisions: ${t.decisions.length}`),t.decisions.length>0){let o=t.decisions.filter(y=>y.promoted);o.length>0&&e.writeln(i(` Promoted to rules: ${o.length}`))}return e.writeln(""),e.writeln("Start a new spec with: ",n(`${S('spec new "..."')}`)),await e.close(),a(void 0)};export{A as main};
|
package/chunks/next-GGVR6JM2.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import{b as ee}from"./chunk-VK7L5SMS.js";import{a as H,b as X,c as Y,d as V}from"./chunk-4XOSXARZ.js";import"./chunk-2WH262CW.js";import{a as j}from"./chunk-XADY6SXR.js";import{a as K,b as Z,d as I}from"./chunk-TJZAIUKM.js";import{a as ae}from"./chunk-RYQPPQNO.js";import{a as ce,b as le,c as de,d as ue}from"./chunk-KJH7Q57A.js";import{a as T}from"./chunk-VPXOI7CR.js";import{c as z}from"./chunk-YK6UG66R.js";import{a as te,c as E,d as se,e as ne,f as ie,h as re,j as oe}from"./chunk-IAR3DEWR.js";import{d as L,f as M,g as J,l as Q,m as _,q as G,s as P,t as B}from"./chunk-EMHZF6ZY.js";import{a as U,b as N}from"./chunk-2N4GTHXQ.js";import{b as h}from"./chunk-MNEZ5QGX.js";import"./chunk-DHMCIRLT.js";import"./chunk-4BH6CF3J.js";import"./chunk-OTRBRRIO.js";var fe=r=>r.split(`
|
|
2
|
-
`).map(e=>e.replace(/^[-*]\s+/,"").trim()).filter(e=>e.length>0&&!e.startsWith("#")),ge=async(r,e)=>{let o=[],i=(e.startsWith(r)?e.slice(r.length+1):e).split("/");i.pop();for(let t=i.length;t>=0;t--){let s=`${t===0?r:`${r}/${i.slice(0,t).join("/")}`}/.folder-rules.md`,a=t===0?".":i.slice(0,t).join("/");try{let p=await h.fs.readTextFile(s),u=fe(p);for(let d of u)o.push({folder:a,rule:d})}catch{}}return o},q=async(r,e)=>{let o=new Set,c=[];for(let i of e){let t=await ge(r,i);for(let n of t){let s=`${n.folder}::${n.rule}`;o.has(s)||(o.add(s),c.push(n))}}return c};var Ne=async r=>{let e=h.process.cwd(),o=K(r),c=Z(r);if(!await B(e))return await I({error:`noskills not initialized. Run: ${z("init")}`},o),N({exitCode:1});let i=null;for(let m of c)m.startsWith("--answer=")&&(i=m.slice(9));let t=J(c),n=await M(e,t),s=await _(e);if(s?.command!==void 0){let{setCommandPrefix:m}=await import("./cmd-RST2ZPA6.js");m(s.command)}if(s===null)return await I({error:"No config found"},o),N({exitCode:1});let a=ee(c,s);n.phase==="DISCOVERY"&&n.discovery.audience!==a&&(n={...n,discovery:{...n.discovery,audience:a}});let u=(await G(e)).filter(m=>s.concerns.includes(m.id));if(i!==null){let m=await we(e,n,s,u,i);await P(e,m);let l={...m,lastCalledAt:new Date().toISOString()};await P(e,l);let F=await j(e),S=l.spec!==null?await T(e,l.spec):null,x=await pe(e,l),A=await q(e,x),k=V(l,u,F,s,S,A);return await I(k,o),U(void 0)}let d={...n,lastCalledAt:new Date().toISOString()};await P(e,d);let w=await j(e),v=d.spec!==null?await T(e,d.spec):null,C=await pe(e,d),b=await q(e,C),R;d.phase==="IDLE"&&(R={existingSpecs:(await Q(e)).map(l=>({name:l.name,phase:l.state.phase,iteration:l.state.execution.iteration,detail:l.state.phase==="EXECUTING"?`${l.state.execution.completedTasks.length} tasks done, iteration ${l.state.execution.iteration}`:l.state.phase==="SPEC_DRAFT"?"awaiting approval":l.state.phase==="DONE"?"completed":void 0})),rulesCount:w.length});let D=V(d,u,w,s,v,b,R);return await I(D,o),U(void 0)},we=async(r,e,o,c,i)=>{switch(e.phase){case"DISCOVERY":{let t=e.discovery.audience==="agent",n=null;try{let a=JSON.parse(i);typeof a=="object"&&a!==null&&!Array.isArray(a)&&(t?H.map(d=>d.id).every(d=>d in a)&&(n=a):n=a)}catch{}let s=e;if(n!==null)for(let[a,p]of Object.entries(n))typeof p=="string"&&p.length>0&&(s=E(s,a,p));else{let a=X(c),p=s.discovery.currentQuestion,u=a[p];if(u===void 0)return e;s=E(s,u.id,i),s=ie(s)}return Y(s.discovery.answers)&&(s=se(s)),s}case"DISCOVERY_REVIEW":{if(i.trim().toLowerCase()==="approve")return ne(e);try{let t=JSON.parse(i);if(typeof t.revise=="object"&&t.revise!==null){let n=e;for(let[s,a]of Object.entries(t.revise))typeof a=="string"&&a.length>0&&(n=E(n,s,a));return n}}catch{}return e}case"SPEC_DRAFT":{if(e.classification===null){let t;try{let s=JSON.parse(i);t={involvesWebUI:s.involvesWebUI===!0||s.involvesUI===!0,involvesCLI:s.involvesCLI===!0||s.involvesUI===!0,involvesPublicAPI:s.involvesPublicAPI===!0,involvesMigration:s.involvesMigration===!0,involvesDataHandling:s.involvesDataHandling===!0}}catch{t={involvesWebUI:!1,involvesCLI:!1,involvesPublicAPI:!1,involvesMigration:!1,involvesDataHandling:!1}}let n={...e,classification:t};try{await ae(r,n,c)}catch{}return n}try{let t=JSON.parse(i);if(typeof t.refinement=="string"&&t.refinement.length>0){let n=t.refinement;if(e.spec!==null){let s=`${r}/${L.specFile(e.spec)}`,a=await h.fs.readTextFile(s);if(n.includes("task-")){let u=Se(n).map(v=>`- [ ] ${v}`).join(`
|
|
3
|
-
`),d=/## Tasks\n\n([\s\S]*?)(?=\n## |\n*$)/,w=a.replace(d,`## Tasks
|
|
4
|
-
|
|
5
|
-
${u}
|
|
6
|
-
`);await h.fs.writeTextFile(s,w)}}return e}}catch{}return e}case"SPEC_APPROVED":{let t=re(e);return t.spec!==null&&(await ce(r,t.spec,"executing"),await ue(r,t.spec,"executing")),t}case"EXECUTING":{if(!e.execution.awaitingStatusReport){let t={...e,execution:{...e.execution,lastProgress:i}};if(o.verifyCommand!==null&&o.verifyCommand!==void 0&&o.verifyCommand.length>0){let n=await ve(r,o.verifyCommand);if(t={...t,execution:{...t.execution,lastVerification:n}},!n.passed)return t}return t={...t,execution:{...t.execution,awaitingStatusReport:!0}},t}return await ye(r,e,i,c)}case"BLOCKED":{let t=e.execution.lastProgress??"Unknown",n={id:`d${e.decisions.length+1}`,question:t.replace(/^BLOCKED:\s*/,""),choice:i,promoted:!1,timestamp:new Date().toISOString()},s=oe(e,n);return s=te(s,"EXECUTING"),s={...s,execution:{...s.execution,lastProgress:`Resolved: ${i}`}},s}default:return e}},Se=r=>r.split(/(?=task-\d+:)/).map(e=>e.replace(/[,;\n\s]+$/,"").trim()).filter(e=>/^task-\d+:/.test(e)),ye=async(r,e,o,c)=>{let i;try{i=JSON.parse(o)}catch{return{...e,execution:{...e.execution,lastProgress:o,awaitingStatusReport:!1}}}let t=e;if(e.execution.debt!==null&&e.execution.debt.items.length>0&&typeof e.execution.debt.items[0]=="string"){let y=e.execution.debt.items.map((O,me)=>({id:`legacy-${me+1}`,text:O,since:e.execution.debt.fromIteration}));t={...e,execution:{...e.execution,debt:{...e.execution.debt,items:y}}};let $=new TextEncoder,g=h.process.stderr.getWriter();await g.write($.encode(`noskills: migrated legacy string[] debt to DebtItem[] format
|
|
7
|
-
`)),g.releaseLock()}let n=i.completed??[],s=new Set(n),a=i.na??[],p=new Set(a),u=i.newIssues??[],d=i.remaining??[],w=i.blocked??[],v=t.execution.debt?.unaddressedIterations??0,C=t.execution.debt!==null?t.execution.debt.items.filter(f=>!s.has(f.id)&&!p.has(f.id)):[],b=t.execution.debtCounter??0,R=u.map((f,y)=>({id:`debt-${b+y+1}`,text:f,since:t.execution.iteration})),D=[...C,...R],l=d.length===0&&w.length===0&&u.length===0||D.length===0?null:{items:D,fromIteration:t.execution.debt?.fromIteration??t.execution.iteration,unaddressedIterations:C.length>0?v+1:1},F=[...new Set([...t.execution.naItems??[],...a])],S=[];n.length>0&&S.push(`Completed: ${n.join(", ")}`),a.length>0&&S.push(`N/A: ${a.join(", ")}`);let x=S.length>0?S.join("; "):"Status report submitted",A=t.execution.lastVerification===null||t.execution.lastVerification.passed===!0,k=l===null&&A,W=b+u.length;if(k&&t.spec!==null){let f=await T(r,t.spec);if(f!==null){let y=t.execution.completedTasks??[],$=new Set(y),g=f.tasks.find(O=>!$.has(O.id));if(g!==void 0)return await le(r,t.spec,g.id),await de(r,t.spec,g.id,"done"),{...t,execution:{...t.execution,lastProgress:`Task ${g.id} accepted: ${x}`,awaitingStatusReport:!1,debt:l,completedTasks:[...y,g.id],debtCounter:W,naItems:F}}}}return{...t,execution:{...t.execution,lastProgress:k?x:`Task not accepted \u2014 remaining items must be addressed first. ${x}`,awaitingStatusReport:!1,debt:l,debtCounter:W,naItems:F}}},ve=async(r,e)=>{try{let{execSync:o}=await import("node:child_process"),c=o(e,{cwd:r,encoding:"utf-8",timeout:6e4,stdio:["pipe","pipe","pipe"]});return{passed:!0,output:String(c).slice(0,4e3),timestamp:new Date().toISOString()}}catch(o){let c=o,i=((c.stdout??"")+(c.stderr??"")).slice(0,4e3);return c.status!==void 0?{passed:!1,output:i||"Verification failed with no output",timestamp:new Date().toISOString()}:{passed:!1,output:`Verification command failed to execute: ${o instanceof Error?o.message:String(o)}`,timestamp:new Date().toISOString()}}},pe=async(r,e)=>{let o=[...e.execution.modifiedFiles??[]],c=await xe(r);return[...new Set([...o,...c])]},xe=async r=>{let e=`${r}/${L.stateDir}/files-changed.jsonl`;try{let c=(await h.fs.readTextFile(e)).trim().split(`
|
|
8
|
-
`).filter(Boolean),i=[];for(let t of c)try{let n=JSON.parse(t);i.includes(n.file)||i.push(n.file)}catch{}return i}catch{return[]}};export{we as handleAnswer,Ne as main,Se as parseRefinementTasks};
|
package/chunks/reset-JEIUVTWV.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{k as f}from"./chunk-IAR3DEWR.js";import{f as c,g as d,h as u}from"./chunk-EMHZF6ZY.js";import{d as a,g as o,o as p,q as l,r as m}from"./chunk-Y6AFIAJP.js";import{a as r}from"./chunk-2N4GTHXQ.js";import{b as i}from"./chunk-MNEZ5QGX.js";import"./chunk-DHMCIRLT.js";import"./chunk-4BH6CF3J.js";import"./chunk-OTRBRRIO.js";var v=async w=>{let e=p({renderer:m.ansi(),sink:l.stdout()}),n=i.process.cwd(),g=d(w),s=await c(n,g);if(s.phase==="IDLE"||s.phase==="UNINITIALIZED")return e.writeln(a("Already idle. Nothing to reset.")),await e.close(),r(void 0);let t=s.spec,h=f(s);return await u(n,h),e.writeln(o("\u2714")," Reset to IDLE."),t!==null&&e.writeln(a(`Spec "${t}" state cleared. Files in .eser/specs/${t}/ preserved.`)),await e.close(),r(void 0)};export{v as main};
|