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.
Files changed (41) hide show
  1. package/README.md +41 -13
  2. package/chunks/approve-R5UDYN3P.js +1 -0
  3. package/chunks/block-P7TM5EPZ.js +1 -0
  4. package/chunks/cancel-TU3C6MKE.js +1 -0
  5. package/chunks/{chunk-KJH7Q57A.js → chunk-CIYGCZTM.js} +1 -1
  6. package/chunks/chunk-GBSAQ2FM.js +3 -0
  7. package/chunks/chunk-KDWUWWE5.js +81 -0
  8. package/chunks/chunk-M7KSO4EF.js +1 -0
  9. package/chunks/chunk-RIME26D6.js +144 -0
  10. package/chunks/chunk-U2T4X5EN.js +11 -0
  11. package/chunks/{concern-FGNG32KU.js → concern-E56E2MFL.js} +1 -1
  12. package/chunks/done-NQMUXJYO.js +1 -0
  13. package/chunks/{init-M7SJOVPZ.js → init-3O7FXLIZ.js} +1 -1
  14. package/chunks/{invoke-hook-VXIVDDQG.js → invoke-hook-MPDIOIHR.js} +3 -3
  15. package/chunks/next-5LH223G2.js +8 -0
  16. package/chunks/{purge-6DEK2ZSI.js → purge-6T4L2FXI.js} +1 -1
  17. package/chunks/reopen-JIHLM3KX.js +1 -0
  18. package/chunks/reset-4RHO7MSF.js +1 -0
  19. package/chunks/{rule-OVSBPSYO.js → rule-UDTLRXFA.js} +1 -1
  20. package/chunks/run-77R3ANIQ.js +3 -0
  21. package/chunks/spec-DPDGDRW2.js +1 -0
  22. package/chunks/status-4YV2X73D.js +1 -0
  23. package/chunks/{sync-MWQWXN2C.js → sync-QYUBOAMK.js} +1 -1
  24. package/chunks/watch-XVGIYX6X.js +8 -0
  25. package/chunks/wontfix-VCV45TPJ.js +1 -0
  26. package/noskills.js +1 -1
  27. package/package.json +1 -1
  28. package/chunks/approve-GSSSUQWC.js +0 -1
  29. package/chunks/block-LVQNJU4P.js +0 -1
  30. package/chunks/chunk-4XOSXARZ.js +0 -9
  31. package/chunks/chunk-EMHZF6ZY.js +0 -144
  32. package/chunks/chunk-IAR3DEWR.js +0 -1
  33. package/chunks/chunk-RYQPPQNO.js +0 -3
  34. package/chunks/chunk-XADY6SXR.js +0 -67
  35. package/chunks/done-5IX2F6V7.js +0 -1
  36. package/chunks/next-GGVR6JM2.js +0 -8
  37. package/chunks/reset-JEIUVTWV.js +0 -1
  38. package/chunks/run-7MZATQML.js +0 -3
  39. package/chunks/spec-J7KC4VFM.js +0 -1
  40. package/chunks/status-BISV6DFB.js +0 -1
  41. package/chunks/watch-AP5GGXG6.js +0 -8
@@ -0,0 +1,144 @@
1
+ import{b as T}from"./chunk-MNEZ5QGX.js";import{a as tt,c as y,e as Ca}from"./chunk-OTRBRRIO.js";var q=y($=>{"use strict";var ts=Symbol.for("yaml.alias"),Kn=Symbol.for("yaml.document"),st=Symbol.for("yaml.map"),jn=Symbol.for("yaml.pair"),ss=Symbol.for("yaml.scalar"),nt=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]===Kn,$a=s=>!!s&&typeof s=="object"&&s[R]===st,Ma=s=>!!s&&typeof s=="object"&&s[R]===jn,Rn=s=>!!s&&typeof s=="object"&&s[R]===ss,Da=s=>!!s&&typeof s=="object"&&s[R]===nt;function Un(s){if(s&&typeof s=="object")switch(s[R]){case st:case nt:return!0}return!1}function _a(s){if(s&&typeof s=="object")switch(s[R]){case ts:case st:case ss:case nt:return!0}return!1}var Ba=s=>(Rn(s)||Un(s))&&!!s.anchor;$.ALIAS=ts;$.DOC=Kn;$.MAP=st;$.NODE_TYPE=R;$.PAIR=jn;$.SCALAR=ss;$.SEQ=nt;$.hasAnchor=Ba;$.isAlias=Ia;$.isCollection=Un;$.isDocument=Pa;$.isMap=$a;$.isNode=_a;$.isPair=Ma;$.isScalar=Rn;$.isSeq=Da});var ke=y(ns=>{"use strict";var P=q(),M=Symbol("break visit"),Yn=Symbol("skip children"),K=Symbol("remove node");function it(s,e){let t=xn(e);P.isDocument(s)?ce(null,s.contents,t,Object.freeze([s]))===K&&(s.contents=null):ce(null,s,t,Object.freeze([]))}it.BREAK=M;it.SKIP=Yn;it.REMOVE=K;function ce(s,e,t,n){let i=Vn(s,e,t,n);if(P.isNode(i)||P.isPair(i))return Jn(s,n,i),ce(s,i,t,n);if(typeof i!="symbol"){if(P.isCollection(e)){n=Object.freeze(n.concat(e));for(let r=0;r<e.items.length;++r){let a=ce(r,e.items[r],t,n);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)){n=Object.freeze(n.concat(e));let r=ce("key",e.key,t,n);if(r===M)return M;r===K&&(e.key=null);let a=ce("value",e.value,t,n);if(a===M)return M;a===K&&(e.value=null)}}return i}async function rt(s,e){let t=xn(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=Yn;rt.REMOVE=K;async function fe(s,e,t,n){let i=await Vn(s,e,t,n);if(P.isNode(i)||P.isPair(i))return Jn(s,n,i),fe(s,i,t,n);if(typeof i!="symbol"){if(P.isCollection(e)){n=Object.freeze(n.concat(e));for(let r=0;r<e.items.length;++r){let a=await fe(r,e.items[r],t,n);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)){n=Object.freeze(n.concat(e));let r=await fe("key",e.key,t,n);if(r===M)return M;r===K&&(e.key=null);let a=await fe("value",e.value,t,n);if(a===M)return M;a===K&&(e.value=null)}}return i}function xn(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 Vn(s,e,t,n){if(typeof t=="function")return t(s,e,n);if(P.isMap(e))return t.Map?.(s,e,n);if(P.isSeq(e))return t.Seq?.(s,e,n);if(P.isPair(e))return t.Pair?.(s,e,n);if(P.isScalar(e))return t.Scalar?.(s,e,n);if(P.isAlias(e))return t.Alias?.(s,e,n)}function Jn(s,e,t){let n=e[e.length-1];if(P.isCollection(n))n.items[s]=t;else if(P.isPair(n))s==="key"?n.key=t:n.value=t;else if(P.isDocument(n))n.contents=t;else{let i=P.isAlias(n)?"alias":"scalar";throw new Error(`Cannot replace node with ${i} parent`)}}ns.visit=it;ns.visitAsync=rt});var is=y(Wn=>{"use strict";var Gn=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 n=e.trim().split(/[ \t]+/),i=n.shift();switch(i){case"%TAG":{if(n.length!==2&&(t(0,"%TAG directive should contain exactly two parts"),n.length<2))return!1;let[r,a]=n;return this.tags[r]=a,!0}case"%YAML":{if(this.yaml.explicit=!0,n.length!==1)return t(0,"%YAML directive should contain exactly one part"),!1;let[r]=n;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 ${i}`,!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[,n,i]=e.match(/^(.*!)([^!]*)$/s);i||t(`The ${e} tag has no suffix`);let r=this.tags[n];if(r)try{return r+decodeURIComponent(i)}catch(a){return t(String(a)),null}return n==="!"?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[t,n]of Object.entries(this.tags))if(e.startsWith(n))return t+ja(e.substring(n.length));return e[0]==="!"?e:`!<${e}>`}toString(e){let t=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],n=Object.entries(this.tags),i;if(e&&n.length>0&&Gn.isNode(e.contents)){let r={};Fa.visit(e.contents,(a,o)=>{Gn.isNode(o)&&o.tag&&(r[o.tag]=!0)}),i=Object.keys(r)}else i=[];for(let[r,a]of n)r==="!!"&&a==="tag:yaml.org,2002:"||(!e||i.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:"};Wn.Directives=Ne});var at=y(Ae=>{"use strict";var Qn=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 Hn(s){let e=new Set;return Ra.visit(s,{Value(t,n){n.anchor&&e.add(n.anchor)}}),e}function Xn(s,e){for(let t=1;;++t){let n=`${s}${t}`;if(!e.has(n))return n}}function Ya(s,e){let t=[],n=new Map,i=null;return{onAnchor:r=>{t.push(r),i??(i=Hn(s));let a=Xn(e,i);return i.add(a),a},setAnchors:()=>{for(let r of t){let a=n.get(r);if(typeof a=="object"&&a.anchor&&(Qn.isScalar(a.node)||Qn.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:n}}Ae.anchorIsValid=Ua;Ae.anchorNames=Hn;Ae.createNodeAnchors=Ya;Ae.findNewAnchor=Xn});var rs=y(zn=>{"use strict";function qe(s,e,t,n){if(n&&typeof n=="object")if(Array.isArray(n))for(let i=0,r=n.length;i<r;++i){let a=n[i],o=qe(s,n,String(i),a);o===void 0?delete n[i]:o!==a&&(n[i]=o)}else if(n instanceof Map)for(let i of Array.from(n.keys())){let r=n.get(i),a=qe(s,n,i,r);a===void 0?n.delete(i):a!==r&&n.set(i,a)}else if(n instanceof Set)for(let i of Array.from(n)){let r=qe(s,n,i,i);r===void 0?n.delete(i):r!==i&&(n.delete(i),n.add(r))}else for(let[i,r]of Object.entries(n)){let a=qe(s,n,i,r);a===void 0?delete n[i]:a!==r&&(n[i]=a)}return s.call(e,t,n)}zn.applyReviver=qe});var V=y(ei=>{"use strict";var xa=q();function Zn(s,e,t){if(Array.isArray(s))return s.map((n,i)=>Zn(n,String(i),t));if(s&&typeof s.toJSON=="function"){if(!t||!xa.hasAnchor(s))return s.toJSON(e,t);let n={aliasCount:0,count:1,res:void 0};t.anchors.set(s,n),t.onCreate=r=>{n.res=r,delete t.onCreate};let i=s.toJSON(e,t);return t.onCreate&&t.onCreate(i),i}return typeof s=="bigint"&&!t?.keep?Number(s):s}ei.toJS=Zn});var ot=y(si=>{"use strict";var Va=rs(),ti=q(),Ja=V(),as=class{constructor(e){Object.defineProperty(this,ti.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:n,onAnchor:i,reviver:r}={}){if(!ti.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 n=="number"?n:100},o=Ja.toJS(this,"",a);if(typeof i=="function")for(let{count:l,res:c}of a.anchors.values())i(c,l);return typeof r=="function"?Va.applyReviver(r,{"":o},"",o):o}};si.NodeBase=as});var Oe=y(ni=>{"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 n;t?.aliasResolveCache?n=t.aliasResolveCache:(n=[],Wa.visit(e,{Node:(r,a)=>{(ue.isAlias(a)||ue.hasAnchor(a))&&n.push(a)}}),t&&(t.aliasResolveCache=n));let i;for(let r of n){if(r===this)break;r.anchor===this.source&&(i=r)}return i}toJSON(e,t){if(!t)return{source:this.source};let{anchors:n,doc:i,maxAliasCount:r}=t,a=this.resolve(i,t);if(!a){let l=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(l)}let o=n.get(a);if(o||(Ha.toJS(a,null,t),o=n.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(i,a,n)),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,n){let i=`*${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`${i} `}return i}};function lt(s,e,t){if(ue.isAlias(e)){let n=e.resolve(s),i=t&&n&&t.get(n);return i?i.count*i.aliasCount:0}else if(ue.isCollection(e)){let n=0;for(let i of e.items){let r=lt(s,i,t);r>n&&(n=r)}return n}else if(ue.isPair(e)){let n=lt(s,e.key,t),i=lt(s,e.value,t);return Math.max(n,i)}return 1}ni.Alias=os});var C=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(ri=>{"use strict";var to=Oe(),te=q(),ii=C(),so="tag:yaml.org,2002:";function no(s,e,t){if(e){let n=t.filter(r=>r.tag===e),i=n.find(r=>!r.format)??n[0];if(!i)throw new Error(`Tag ${e} not found`);return i}return t.find(n=>n.identify?.(s)&&!n.format)}function io(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:n,onAnchor:i,onTagObj:r,schema:a,sourceObjects:o}=t,l;if(n&&s&&typeof s=="object"){if(l=o.get(s),l)return l.anchor??(l.anchor=i(s)),new to.Alias(l.anchor);l={anchor:null,node:null},o.set(s,l)}e?.startsWith("!!")&&(e=so+e.slice(2));let c=no(s,e,a.tags);if(!c){if(s&&typeof s.toJSON=="function"&&(s=s.toJSON()),!s||typeof s!="object"){let f=new ii.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 ii.Scalar(s);return e?d.tag=e:c.default||(d.tag=c.tag),l&&(l.node=d),d}ri.createNode=io});var ft=y(ct=>{"use strict";var ro=Ee(),j=q(),ao=ot();function cs(s,e,t){let n=t;for(let i=e.length-1;i>=0;--i){let r=e[i];if(typeof r=="number"&&Number.isInteger(r)&&r>=0){let a=[];a[r]=n,n=a}else n=new Map([[r,n]])}return ro.createNode(n,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:s,sourceObjects:new Map})}var ai=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(n=>j.isNode(n)||j.isPair(n)?n.clone(e):n),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(ai(e))this.add(t);else{let[n,...i]=e,r=this.get(n,!0);if(j.isCollection(r))r.addIn(i,t);else if(r===void 0&&this.schema)this.set(n,cs(this.schema,i,t));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${i}`)}}deleteIn(e){let[t,...n]=e;if(n.length===0)return this.delete(t);let i=this.get(t,!0);if(j.isCollection(i))return i.deleteIn(n);throw new Error(`Expected YAML collection at ${t}. Remaining path: ${n}`)}getIn(e,t){let[n,...i]=e,r=this.get(n,!0);return i.length===0?!t&&j.isScalar(r)?r.value:r:j.isCollection(r)?r.getIn(i,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!j.isPair(t))return!1;let n=t.value;return n==null||e&&j.isScalar(n)&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn(e){let[t,...n]=e;if(n.length===0)return this.has(t);let i=this.get(t,!0);return j.isCollection(i)?i.hasIn(n):!1}setIn(e,t){let[n,...i]=e;if(i.length===0)this.set(n,t);else{let r=this.get(n,!0);if(j.isCollection(r))r.setIn(i,t);else if(r===void 0&&this.schema)this.set(n,cs(this.schema,i,t));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${i}`)}}};ct.Collection=fs;ct.collectionFromPath=cs;ct.isEmptyPath=ai});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 li=y(Ce=>{"use strict";var co="flow",hs="block",ht="quoted";function fo(s,e,t="flow",{indentAtStart:n,lineWidth:i=80,minContentWidth:r=20,onFold:a,onOverflow:o}={}){if(!i||i<0)return s;i<r&&(r=0);let l=Math.max(1+r,1+i-e.length);if(s.length<=l)return s;let c=[],d={},f=i-e.length;typeof n=="number"&&(n>i-Math.max(2,r)?c.push(0):f=i-n);let u,m,g=!1,h=-1,p=-1,S=-1;t===hs&&(h=oi(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=oi(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 oi(s,e,t){let n=e,i=e+1,r=s[i];for(;r===" "||r===" ";)if(e<i+t)r=s[++e];else{do r=s[++e];while(r&&r!==`
11
+ `);n=e,i=e+1,r=s[i]}return n}Ce.FOLD_BLOCK=hs;Ce.FOLD_FLOW=co;Ce.FOLD_QUOTED=ht;Ce.foldFlowLines=fo});var Ie=y(ci=>{"use strict";var B=C(),G=li(),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 n=e-t,i=s.length;if(i<=n)return!1;for(let r=0,a=0;r<i;++r)if(s[r]===`
12
+ `){if(r-a>n)return!0;if(a=r+1,i-a<=n)return!1}return!0}function Le(s,e){let t=JSON.stringify(s);if(e.options.doubleQuotedAsJSON)return t;let{implicitKey:n}=e,i=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(n||t[l+2]==='"'||t.length<i)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,n?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 Le(s,e);let t=e.indent||(mt(s)?" ":""),n="'"+s.replace(/'/g,"''").replace(/\n+/g,`$&
17
+ ${t}`)+"'";return e.implicitKey?n:G.foldFlowLines(n,t,G.FOLD_FLOW,pt(e,!1))}function he(s,e){let{singleQuote:t}=e.options,n;if(t===!1)n=Le;else{let i=s.includes('"'),r=s.includes("'");i&&!r?n=ds:r&&!i?n=Le:n=t?ds:Le}return n(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},n,i,r){let{blockQuote:a,commentString:o,lineWidth:l}=n.options;if(!a||/\n[\t ]+$/.test(t))return he(t,n);let c=n.indent||(n.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," ")),i&&i()),!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(n,!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,n){let{type:i,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,n);if(!o&&!d&&i!==B.Scalar.PLAIN&&r.includes(`
32
+ `))return dt(s,e,t,n);if(mt(r)){if(l==="")return e.forceBlockIndent=!0,dt(s,e,t,n);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,n){let{implicitKey:i,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 i||r?he(a.value,e):dt(a,e,t,n);case B.Scalar.QUOTE_DOUBLE:return Le(a.value,e);case B.Scalar.QUOTE_SINGLE:return ds(a.value,e);case B.Scalar.PLAIN:return ho(a,e,t,n);default:return null}},c=l(o);if(c===null){let{defaultKeyType:d,defaultStringType:f}=e.options,u=i&&d||f;if(c=l(u),c===null)throw new Error(`Unsupported default string type ${u}`)}return c}ci.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),n;switch(t.collectionStyle){case"block":n=!1;break;case"flow":n=!0;break;default:n=null}return{anchors:new Set,doc:s,flowCollectionPadding:t.flowCollectionPadding?" ":"",indent:"",indentStep:typeof t.indent=="number"?" ".repeat(t.indent):" ",inFlow:n,options:t}}function So(s,e){if(e.tag){let i=s.filter(r=>r.tag===e.tag);if(i.length>0)return i.find(r=>r.format===e.format)??i[0]}let t,n;if(W.isScalar(e)){n=e.value;let i=s.filter(r=>r.identify?.(n));if(i.length>1){let r=i.filter(a=>a.test);r.length>0&&(i=r)}t=i.find(r=>r.format===e.format)??i.find(r=>!r.format)}else n=e,t=s.find(i=>i.nodeClass&&n instanceof i.nodeClass);if(!t){let i=n?.constructor?.name??(n===null?"null":typeof n);throw new Error(`Tag not resolved for ${i} value`)}return t}function wo(s,e,{anchors:t,doc:n}){if(!n.directives)return"";let i=[],r=(W.isScalar(s)||W.isCollection(s))&&s.anchor;r&&mo.anchorIsValid(r)&&(t.add(r),i.push(`&${r}`));let a=s.tag??(e.default?null:e.tag);return a&&i.push(n.directives.tagString(a)),i.join(" ")}function vo(s,e,t,n){if(W.isPair(s))return s.toString(e,t,n);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 i,r=W.isNode(s)?s:e.doc.createNode(s,{onTagObj:l=>i=l});i??(i=So(e.doc.schema.tags,r));let a=wo(r,i,e);a.length>0&&(e.indentAtStart=(e.indentAtStart??0)+a.length+1);let o=typeof i.stringify=="function"?i.stringify(r,e,t,n):W.isScalar(r)?go.stringifyString(r,e,t,n):r.toString(e,t,n);return a?W.isScalar(r)||o[0]==="{"||o[0]==="["?`${a} ${o}`:`${a}
34
+ ${e.indent}${o}`:o}ms.createStringifyContext=bo;ms.stringify=vo});var di=y(hi=>{"use strict";var U=q(),fi=C(),ui=Pe(),$e=Te();function ko({key:s,value:e},t,n,i){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===fi.Scalar.BLOCK_FOLDED||s.type===fi.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=ui.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&&n&&n(),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&&i&&i(),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=ui.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
+ `),L=b!==-1,x=t.inFlow??e.flow??e.items.length===0;if(L||!x){let le=!1;if(L&&(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&&n&&n():v&&!k?p+=$e.lineComment(p,t.indent,c(v)):h&&i&&i(),p}hi.stringifyPair=ko});var gs=y(ys=>{"use strict";var pi=tt("process");function No(s,...e){s==="debug"&&console.log(...e)}function Ao(s,e){(s==="debug"||s==="warn")&&(typeof pi.emitWarning=="function"?pi.emitWarning(e):console.warn(e))}ys.debug=No;ys.warn=Ao});var St=y(bt=>{"use strict";var Me=q(),mi=C(),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 mi.Scalar(Symbol(yt)),{addToJSMap:yi}),stringify:()=>yt},qo=(s,e)=>(gt.identify(e)||Me.isScalar(e)&&(!e.type||e.type===mi.Scalar.PLAIN)&&gt.identify(e.value))&&s?.doc.schema.tags.some(t=>t.tag===gt.tag&&t.default);function yi(s,e,t){if(t=s&&Me.isAlias(t)?t.resolve(s.doc):t,Me.isSeq(t))for(let n of t.items)bs(s,e,n);else if(Array.isArray(t))for(let n of t)bs(s,e,n);else bs(s,e,t)}function bs(s,e,t){let n=s&&Me.isAlias(t)?t.resolve(s.doc):t;if(!Me.isMap(n))throw new Error("Merge sources must be maps or map aliases");let i=n.toJSON(null,s,Map);for(let[r,a]of i)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=yi;bt.isMergeKey=qo;bt.merge=gt});var ws=y(Si=>{"use strict";var Oo=gs(),gi=St(),Eo=Pe(),bi=q(),Ss=V();function To(s,e,{key:t,value:n}){if(bi.isNode(t)&&t.addToJSMap)t.addToJSMap(s,e,n);else if(gi.isMergeKey(s,t))gi.addMergeToJSMap(s,e,n);else{let i=Ss.toJS(t,"",s);if(e instanceof Map)e.set(i,Ss.toJS(n,i,s));else if(e instanceof Set)e.add(i);else{let r=Co(t,i,s),a=Ss.toJS(n,r,s);r in e?Object.defineProperty(e,r,{value:a,writable:!0,enumerable:!0,configurable:!0}):e[r]=a}}return e}function Co(s,e,t){if(e===null)return"";if(typeof e!="object")return String(e);if(bi.isNode(s)&&t?.doc){let n=Eo.createStringifyContext(t.doc,{});n.anchors=new Set;for(let r of t.anchors.keys())n.anchors.add(r.anchor);n.inFlow=!0,n.inStringifyKey=!0;let i=s.toString(n);if(!t.mapKeyWarned){let r=JSON.stringify(i);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 i}return JSON.stringify(e)}Si.addPairToJSMap=To});var Q=y(vs=>{"use strict";var wi=Ee(),Lo=di(),Io=ws(),wt=q();function Po(s,e,t){let n=wi.createNode(s,void 0,t),i=wi.createNode(e,void 0,t);return new vt(n,i)}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:n}=this;return wt.isNode(t)&&(t=t.clone(e)),wt.isNode(n)&&(n=n.clone(e)),new s(t,n)}toJSON(e,t){let n=t?.mapAsMap?new Map:{};return Io.addPairToJSMap(t,n,this)}toString(e,t,n){return e?.doc?Lo.stringifyPair(this,e,t,n):JSON.stringify(this)}};vs.Pair=vt;vs.createPair=Po});var ks=y(ki=>{"use strict";var se=q(),vi=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:n,flowChars:i,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=vi.stringify(h,d,()=>p=null,()=>f=!0);p&&(S+=kt.lineComment(S,r,c(p))),f&&p&&(f=!1),u.push(n+S)}let m;if(u.length===0)m=i.start+i.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:n}){let{indent:i,indentStep:r,flowCollectionPadding:a,options:{commentString:o}}=e;n+=r;let l=Object.assign({},e,{indent:n,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=vi.stringify(h,l,()=>p=null);g<s.length-1&&(S+=","),p&&(S+=kt.lineComment(S,n,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}${i}${h}`:`
50
+ `;return`${g}
51
+ ${i}${m}`}else return`${u}${a}${f.join(" ")}${a}${m}`}function Nt({indent:s,options:{commentString:e}},t,n,i){if(n&&i&&(n=n.replace(/^\n+/,"")),n){let r=kt.indentComment(e(n),s);t.push(r.trimStart())}}ki.stringifyCollection=$o});var X=y(As=>{"use strict";var _o=ks(),Bo=ws(),Fo=ft(),H=q(),At=Q(),Ko=C();function De(s,e){let t=H.isScalar(e)?e.value:e;for(let n of s)if(H.isPair(n)&&(n.key===e||n.key===t||H.isScalar(n.key)&&n.key.value===t))return n}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,n){let{keepUndefined:i,replacer:r}=n,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||i)&&a.items.push(At.createPair(l,c,n))};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 n;H.isPair(e)?n=e:!e||typeof e!="object"||!("key"in e)?n=new At.Pair(e,e?.value):n=new At.Pair(e.key,e.value);let i=De(this.items,n.key),r=this.schema?.sortMapEntries;if(i){if(!t)throw new Error(`Key ${n.key} already set`);H.isScalar(i.value)&&Ko.isScalarValue(n.value)?i.value.value=n.value:i.value=n.value}else if(r){let a=this.items.findIndex(o=>r(n,o)<0);a===-1?this.items.push(n):this.items.splice(a,0,n)}else this.items.push(n)}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 i=De(this.items,e)?.value;return(!t&&H.isScalar(i)?i.value:i)??void 0}has(e){return!!De(this.items,e)}set(e,t){this.add(new At.Pair(e,t),!0)}toJSON(e,t,n){let i=n?new n:t?.mapAsMap?new Map:{};t?.onCreate&&t.onCreate(i);for(let r of this.items)Bo.addPairToJSMap(t,i,r);return i}toString(e,t,n){if(!e)return JSON.stringify(this);for(let i of this.items)if(!H.isPair(i))throw new Error(`Map items must all be pairs; found ${JSON.stringify(i)} 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:n,onComment:t})}};As.YAMLMap=Ns;As.findPair=De});var de=y(Ai=>{"use strict";var jo=q(),Ni=X(),Ro={collection:"map",default:!0,nodeClass:Ni.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)=>Ni.YAMLMap.from(s,e,t)};Ai.map=Ro});var z=y(qi=>{"use strict";var Uo=Ee(),Yo=ks(),xo=ft(),Ot=q(),Vo=C(),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 n=qt(e);if(typeof n!="number")return;let i=this.items[n];return!t&&Ot.isScalar(i)?i.value:i}has(e){let t=qt(e);return typeof t=="number"&&t<this.items.length}set(e,t){let n=qt(e);if(typeof n!="number")throw new Error(`Expected a valid index, not ${e}.`);let i=this.items[n];Ot.isScalar(i)&&Vo.isScalarValue(t)?i.value=t:this.items[n]=t}toJSON(e,t){let n=[];t?.onCreate&&t.onCreate(n);let i=0;for(let r of this.items)n.push(Jo.toJS(r,String(i++),t));return n}toString(e,t,n){return e?Yo.stringifyCollection(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:n,onComment:t}):JSON.stringify(this)}static from(e,t,n){let{replacer:i}=n,r=new this(e);if(t&&Symbol.iterator in Object(t)){let a=0;for(let o of t){if(typeof i=="function"){let l=t instanceof Set?o:String(a++);o=i.call(t,l,o)}r.items.push(Uo.createNode(o,void 0,n))}}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}qi.YAMLSeq=qs});var pe=y(Ei=>{"use strict";var Go=q(),Oi=z(),Wo={collection:"seq",default:!0,nodeClass:Oi.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)=>Oi.YAMLSeq.from(s,e,t)};Ei.seq=Wo});var _e=y(Ti=>{"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,n){return e=Object.assign({actualString:!0},e),Qo.stringifyString(s,e,t,n)}};Ti.string=Ho});var Et=y(Ii=>{"use strict";var Ci=C(),Li={identify:s=>s==null,createNode:()=>new Ci.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new Ci.Scalar(null),stringify:({source:s},e)=>typeof s=="string"&&Li.test.test(s)?s:e.options.nullStr};Ii.nullTag=Li});var Os=y($i=>{"use strict";var Xo=C(),Pi={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&&Pi.test.test(s)){let n=s[0]==="t"||s[0]==="T";if(e===n)return s}return e?t.options.trueStr:t.options.falseStr}};$i.boolTag=Pi});var me=y(Mi=>{"use strict";function zo({format:s,minFractionDigits:e,tag:t,value:n}){if(typeof n=="bigint")return String(n);let i=typeof n=="number"?n:Number(n);if(!isFinite(i))return isNaN(i)?".nan":i<0?"-.inf":".inf";let r=Object.is(n,-0)?"-0":JSON.stringify(n);if(!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}Mi.stringifyNumber=zo});var Ts=y(Tt=>{"use strict";var Zo=C(),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 Ls=y(Lt=>{"use strict";var Di=me(),Ct=s=>typeof s=="bigint"||Number.isInteger(s),Cs=(s,e,t,{intAsBigInt:n})=>n?BigInt(s):parseInt(s.substring(e),t);function _i(s,e,t){let{value:n}=s;return Ct(n)&&n>=0?t+n.toString(e):Di.stringifyNumber(s)}var nl={identify:s=>Ct(s)&&s>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(s,e,t)=>Cs(s,2,8,t),stringify:s=>_i(s,8,"0o")},il={identify:Ct,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(s,e,t)=>Cs(s,0,10,t),stringify:Di.stringifyNumber},rl={identify:s=>Ct(s)&&s>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(s,e,t)=>Cs(s,2,16,t),stringify:s=>_i(s,16,"0x")};Lt.int=il;Lt.intHex=rl;Lt.intOct=nl});var Fi=y(Bi=>{"use strict";var al=de(),ol=Et(),ll=pe(),cl=_e(),fl=Os(),Is=Ts(),Ps=Ls(),ul=[al.map,ll.seq,cl.string,ol.nullTag,fl.boolTag,Ps.intOct,Ps.int,Ps.intHex,Is.floatNaN,Is.floatExp,Is.float];Bi.schema=ul});var Ri=y(ji=>{"use strict";var hl=C(),dl=de(),pl=pe();function Ki(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:Ki,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})=>Ki(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);ji.schema=gl});var Ms=y(Ui=>{"use strict";var Be=tt("buffer"),$s=C(),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,"")),n=new Uint8Array(t.length);for(let i=0;i<t.length;++i)n[i]=t.charCodeAt(i);return n}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},n,i,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(n.options.lineWidth-n.indent.length,n.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},n,i,r)}};Ui.binary=Sl});var Mt=y($t=>{"use strict";var Pt=q(),Ds=Q(),wl=C(),vl=z();function Yi(s,e){if(Pt.isSeq(s))for(let t=0;t<s.items.length;++t){let n=s.items[t];if(!Pt.isPair(n)){if(Pt.isMap(n)){n.items.length>1&&e("Each pair must have its own sequence indicator");let i=n.items[0]||new Ds.Pair(new wl.Scalar(null));if(n.commentBefore&&(i.key.commentBefore=i.key.commentBefore?`${n.commentBefore}
53
+ ${i.key.commentBefore}`:n.commentBefore),n.comment){let r=i.value??i.key;r.comment=r.comment?`${n.comment}
54
+ ${r.comment}`:n.comment}n=i}s.items[t]=Pt.isPair(n)?n:new Ds.Pair(n)}}else e("Expected a sequence for this tag");return s}function xi(s,e,t){let{replacer:n}=t,i=new vl.YAMLSeq(s);i.tag="tag:yaml.org,2002:pairs";let r=0;if(e&&Symbol.iterator in Object(e))for(let a of e){typeof n=="function"&&(a=n.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;i.items.push(Ds.createPair(o,l,t))}return i}var kl={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:Yi,createNode:xi};$t.createPairs=xi;$t.pairs=kl;$t.resolvePairs=Yi});var Fs=y(Bs=>{"use strict";var Vi=q(),_s=V(),Fe=X(),Nl=z(),Ji=Mt(),ne=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 n=new Map;t?.onCreate&&t.onCreate(n);for(let i of this.items){let r,a;if(Vi.isPair(i)?(r=_s.toJS(i.key,"",t),a=_s.toJS(i.value,r,t)):r=_s.toJS(i,"",t),n.has(r))throw new Error("Ordered maps must not include duplicate keys");n.set(r,a)}return n}static from(e,t,n){let i=Ji.createPairs(e,t,n),r=new this;return r.items=i.items,r}};ne.tag="tag:yaml.org,2002:omap";var Al={collection:"seq",identify:s=>s instanceof Map,nodeClass:ne,default:!1,tag:"tag:yaml.org,2002:omap",resolve(s,e){let t=Ji.resolvePairs(s,e),n=[];for(let{key:i}of t.items)Vi.isScalar(i)&&(n.includes(i.value)?e(`Ordered maps must not include duplicate keys: ${i.value}`):n.push(i.value));return Object.assign(new ne,t)},createNode:(s,e,t)=>ne.from(s,e,t)};Bs.YAMLOMap=ne;Bs.omap=Al});var Xi=y(Ks=>{"use strict";var Gi=C();function Wi({value:s,source:e},t){return e&&(s?Qi:Hi).test.test(e)?e:s?t.options.trueStr:t.options.falseStr}var Qi={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 Gi.Scalar(!0),stringify:Wi},Hi={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 Gi.Scalar(!1),stringify:Wi};Ks.falseTag=Hi;Ks.trueTag=Qi});var zi=y(Dt=>{"use strict";var ql=C(),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 n=s.substring(t+1).replace(/_/g,"");n[n.length-1]==="0"&&(e.minFractionDigits=n.length)}return e},stringify:js.stringifyNumber};Dt.float=Tl;Dt.floatExp=El;Dt.floatNaN=Ol});var er=y(je=>{"use strict";var Zi=me(),Ke=s=>typeof s=="bigint"||Number.isInteger(s);function _t(s,e,t,{intAsBigInt:n}){let i=s[0];if((i==="-"||i==="+")&&(e+=1),s=s.substring(e).replace(/_/g,""),n){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 i==="-"?BigInt(-1)*a:a}let r=parseInt(s,t);return i==="-"?-1*r:r}function Rs(s,e,t){let{value:n}=s;if(Ke(n)){let i=n.toString(e);return n<0?"-"+t+i.substr(1):t+i}return Zi.stringifyNumber(s)}var Cl={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")},Ll={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:Zi.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=Cl;je.intHex=Pl;je.intOct=Ll});var Ys=y(Us=>{"use strict";var Kt=q(),Bt=Q(),Ft=X(),ie=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 n=Ft.findPair(this.items,e);return!t&&Kt.isPair(n)?Kt.isScalar(n.key)?n.key.value:n.key:n}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 n=Ft.findPair(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new Bt.Pair(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,n);throw new Error("Set items must all have null values")}static from(e,t,n){let{replacer:i}=n,r=new this(e);if(t&&Symbol.iterator in Object(t))for(let a of t)typeof i=="function"&&(a=i.call(t,a,a)),r.items.push(Bt.createPair(a,null,n));return r}};ie.tag="tag:yaml.org,2002:set";var $l={collection:"map",identify:s=>s instanceof Set,nodeClass:ie,default:!1,tag:"tag:yaml.org,2002:set",createNode:(s,e,t)=>ie.from(s,e,t),resolve(s,e){if(Kt.isMap(s)){if(s.hasAllNullValues(!0))return Object.assign(new ie,s);e("Set items must all have null values")}else e("Expected a mapping for this tag");return s}};Us.YAMLSet=ie;Us.set=$l});var Vs=y(jt=>{"use strict";var Ml=me();function xs(s,e){let t=s[0],n=t==="-"||t==="+"?s.substring(1):s,i=a=>e?BigInt(a):Number(a),r=n.replace(/_/g,"").split(":").reduce((a,o)=>a*i(60)+i(o),i(0));return t==="-"?i(-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 n="";e<0&&(n="-",e*=t(-1));let i=t(60),r=[e%i];return e<60?r.unshift(0):(e=(e-r[0])/i,r.unshift(e%i),e>=60&&(e=(e-r[0])/i,r.unshift(e))),n+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,n,i,r,a,o]=e.map(Number),l=e[7]?Number((e[7]+"00").substr(1,3)):0,c=Date.UTC(t,n-1,i,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(ir=>{"use strict";var Bl=de(),Fl=Et(),Kl=pe(),jl=_e(),Rl=Ms(),nr=Xi(),Js=zi(),Rt=er(),Ul=St(),Yl=Fs(),xl=Mt(),Vl=Ys(),Gs=Vs(),Jl=[Bl.map,Kl.seq,jl.string,Fl.nullTag,nr.trueTag,nr.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];ir.schema=Jl});var mr=y(Hs=>{"use strict";var cr=de(),Gl=Et(),fr=pe(),Wl=_e(),Ql=Os(),Ws=Ts(),Qs=Ls(),Hl=Fi(),Xl=Ri(),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 n=or.get(e);if(n&&!s)return t&&!n.includes(Re.merge)?n.concat(Re.merge):n.slice();let i=n;if(!i)if(Array.isArray(s))i=[];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)i=i.concat(r);else typeof s=="function"&&(i=s(i.slice()));return t&&(i=i.concat(Re.merge)),i.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(),nc=(s,e)=>s.key<e.key?-1:s.key>e.key?1:0,zs=class s{constructor({compat:e,customTags:t,merge:n,resolveKnownTags:i,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=i?Yt.coreKnownTags:{},this.tags=Yt.getTags(t,this.name,n),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?nc: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 ic=q(),en=Pe(),Ue=Te();function rc(s,e){let t=[],n=e.directives===!0;if(e.directives!==!1&&s.directives){let l=s.directives.toString(s);l?(t.push(l),n=!0):s.directives.docStart&&(n=!0)}n&&t.push("---");let i=en.createStringifyContext(s,e),{commentString:r}=i.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(ic.isNode(s.contents)){if(s.contents.spaceBefore&&n&&t.push(""),s.contents.commentBefore){let d=r(s.contents.commentBefore);t.push(Ue.indentComment(d,""))}i.forceBlockIndent=!!s.comment,o=s.contents.comment}let l=o?void 0:()=>a=!0,c=en.stringify(s.contents,i,()=>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(en.stringify(s.contents,i));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(),tn=at(),uc=rs(),hc=Ee(),sn=is(),nn=class s{constructor(e,t,n){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,_.NODE_TYPE,{value:_.DOC});let i=null;typeof t=="function"||Array.isArray(t)?i=t:n===void 0&&t&&(n=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"},n);this.options=r;let{version:a}=r;n?._directives?(this.directives=n._directives.atDocument(),this.directives.yaml.explicit&&(a=this.directives.yaml.version)):this.directives=new sn.Directives({version:a}),this.setSchema(a,n),this.contents=e===void 0?null:this.createNode(e,i,n)}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 n=tn.anchorNames(this);e.anchor=!t||n.has(t)?tn.findNewAnchor(t||"a",n):t}return new ac.Alias(e.anchor)}createNode(e,t,n){let i;if(typeof t=="function")e=t.call({"":e},"",e),i=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)),i=t}else n===void 0&&t&&(n=t,t=void 0);let{aliasDuplicateObjects:r,anchorPrefix:a,flow:o,keepUndefined:l,onTagObj:c,tag:d}=n??{},{onAnchor:f,setAnchors:u,sourceObjects:m}=tn.createNodeAnchors(this,a||"a"),g={aliasDuplicateObjects:r??!0,keepUndefined:l??!1,onAnchor:f,onTagObj:c,replacer:i,schema:this.schema,sourceObjects:m},h=hc.createNode(e,d,g);return o&&_.isCollection(h)&&(h.flow=!0),u(),h}createPair(e,t,n={}){let i=this.createNode(e,null,n),r=this.createNode(t,null,n);return new oc.Pair(i,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 n;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new sn.Directives({version:"1.1"}),n={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new sn.Directives({version:e}),n={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,n=null;break;default:{let i=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${i}`)}}if(t.schema instanceof Object)this.schema=t.schema;else if(n)this.schema=new cc.Schema(Object.assign(n,t));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:t,mapAsMap:n,maxAliasCount:i,onAnchor:r,reviver:a}={}){let o={anchors:new Map,doc:this,keep:!e,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof i=="number"?i: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=nn});var Je=y(Ve=>{"use strict";var xe=class extends Error{constructor(e,t,n,i){super(),this.name=e,this.code=n,this.message=i,this.pos=t}},rn=class extends xe{constructor(e,t,n){super("YAMLParseError",e,t,n)}},an=class extends xe{constructor(e,t,n){super("YAMLWarning",e,t,n)}},dc=(s,e)=>t=>{if(t.pos[0]===-1)return;t.linePos=t.pos.map(o=>e.linePos(o));let{line:n,col:i}=t.linePos[0];t.message+=` at line ${n}, column ${i}`;let r=i-1,a=s.substring(e.lineStarts[n-1],e.lineStarts[n]).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"),n>1&&/^ *$/.test(a.substring(0,r))){let o=s.substring(e.lineStarts[n-2],e.lineStarts[n-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===n&&l.col>i&&(o=Math.max(1,Math.min(l.col-i,80-r)));let c=" ".repeat(r)+"^".repeat(o);t.message+=`:
59
+
60
+ ${a}
61
+ ${c}
62
+ `}};Ve.YAMLError=xe;Ve.YAMLParseError=rn;Ve.YAMLWarning=an;Ve.prettifyError=dc});var Ge=y(wr=>{"use strict";function pc(s,{flow:e,indicator:t,next:n,offset:i,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"||n?.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 L=b.source.substring(1)||" ";f?f+=u+L:f=L,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:i;return g&&n&&n.type!=="space"&&n.type!=="newline"&&n.type!=="comma"&&(n.type!=="scalar"||n.source!=="")&&r(n.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),h&&(c&&h.indent<=a||n?.type==="block-map"||n?.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 on(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(on(e.key)||on(e.value))return!0}return!1;default:return!0}}vr.containsNewline=on});var ln=y(kr=>{"use strict";var mc=xt();function yc(s,e,t){if(e?.type==="flow-collection"){let n=e.end[0];n.indent===s&&(n.source==="]"||n.source==="}")&&mc.containsNewline(e)&&t(n,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}kr.flowIndentCheck=yc});var cn=y(Ar=>{"use strict";var Nr=q();function gc(s,e,t){let{uniqueKeys:n}=s.options;if(n===!1)return!1;let i=typeof n=="function"?n:(r,a)=>r===a||Nr.isScalar(r)&&Nr.isScalar(a)&&r.value===a.value;return e.some(r=>i(r.key,t))}Ar.mapIncludes=gc});var Lr=y(Cr=>{"use strict";var qr=Q(),bc=X(),Or=Ge(),Sc=xt(),Er=ln(),wc=cn(),Tr="All mapping items must start at the same column";function vc({composeNode:s,composeEmptyNode:e},t,n,i,r){let a=r?.nodeClass??bc.YAMLMap,o=new a(t.schema);t.atRoot&&(t.atRoot=!1);let l=n.offset,c=null;for(let d of n.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:i,parentIndent:n.indent,startOnNewline:!0}),p=!h.found;if(p){if(u&&(u.type==="block-seq"?i(l,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in u&&u.indent!==n.indent&&i(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))&&i(u??f[f.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else h.found?.indent!==n.indent&&i(l,"BAD_INDENT",Tr);t.atKey=!0;let S=h.end,w=u?s(t,u,h,i):e(t,S,f,null,h,i);t.schema.compat&&Er.flowIndentCheck(n.indent,u,i),t.atKey=!1,wc.mapIncludes(t,o.items,w)&&i(S,"DUPLICATE_KEY","Map keys must be unique");let v=Or.resolveProps(m??[],{indicator:"map-value-ind",next:g,offset:w.range[2],onError:i,parentIndent:n.indent,startOnNewline:!u||u.type==="block-scalar"});if(l=v.end,v.found){p&&(g?.type==="block-map"&&!v.hasNewline&&i(l,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),t.options.strict&&h.start<v.found.offset-1024&&i(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,i):e(t,l,m,null,v,i);t.schema.compat&&Er.flowIndentCheck(n.indent,g,i),l=k.range[2];let N=new qr.Pair(w,k);t.options.keepSourceTokens&&(N.srcToken=d),o.items.push(N)}else{p&&i(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&&i(c,"IMPOSSIBLE","Map comment with trailing content"),o.range=[n.offset,l,c??l],o}Cr.resolveBlockMap=vc});var Pr=y(Ir=>{"use strict";var kc=z(),Nc=Ge(),Ac=ln();function qc({composeNode:s,composeEmptyNode:e},t,n,i,r){let a=r?.nodeClass??kc.YAMLSeq,o=new a(t.schema);t.atRoot&&(t.atRoot=!1),t.atKey&&(t.atKey=!1);let l=n.offset,c=null;for(let{start:d,value:f}of n.items){let u=Nc.resolveProps(d,{indicator:"seq-item-ind",next:f,offset:l,onError:i,parentIndent:n.indent,startOnNewline:!0});if(!u.found)if(u.anchor||u.tag||f)f?.type==="block-seq"?i(u.end,"BAD_INDENT","All sequence items must start at the same column"):i(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,i):e(t,u.end,d,null,u,i);t.schema.compat&&Ac.flowIndentCheck(n.indent,f,i),l=m.range[2],o.items.push(m)}return o.range=[n.offset,l,c??l],o}Ir.resolveBlockSeq=qc});var be=y($r=>{"use strict";function Oc(s,e,t,n){let i="";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&&n(o,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let d=l.substring(1)||" ";i?i+=a+d:i=d,a="";break}case"newline":i&&(a+=l),r=!0;break;default:n(o,"UNEXPECTED_TOKEN",`Unexpected ${c} at node end`)}e+=l.length}}return{comment:i,offset:e}}$r.resolveEnd=Oc});var Br=y(_r=>{"use strict";var Ec=q(),Tc=Q(),Mr=X(),Cc=z(),Lc=be(),Dr=Ge(),Ic=xt(),Pc=cn(),fn="Block collections are not allowed within flow collections",un=s=>s&&(s.type==="block-map"||s.type==="block-seq");function $c({composeNode:s,composeEmptyNode:e},t,n,i,r){let a=n.start.source==="{",o=a?"flow map":"flow sequence",l=r?.nodeClass??(a?Mr.YAMLMap:Cc.YAMLSeq),c=new l(t.schema);c.flow=!0;let d=t.atRoot;d&&(t.atRoot=!1),t.atKey&&(t.atKey=!1);let f=n.offset+n.start.source.length;for(let p=0;p<n.items.length;++p){let S=n.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:i,parentIndent:n.indent,startOnNewline:!1});if(!A.found){if(!A.anchor&&!A.tag&&!k&&!N){p===0&&A.comma?i(A.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${o}`):p<n.items.length-1&&i(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)&&i(v,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(p===0)A.comma&&i(A.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${o}`);else if(A.comma||i(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,i):e(t,A.end,k,null,A,i);c.items.push(E),f=E.range[2],un(N)&&i(E.range,"BLOCK_IN_FLOW",fn)}else{t.atKey=!0;let E=A.end,b=v?s(t,v,A,i):e(t,E,w,null,A,i);un(v)&&i(b.range,"BLOCK_IN_FLOW",fn),t.atKey=!1;let L=Dr.resolveProps(k??[],{flow:o,indicator:"map-value-ind",next:N,offset:b.range[2],onError:i,parentIndent:n.indent,startOnNewline:!1});if(L.found){if(!a&&!A.found&&t.options.strict){if(k)for(let I of k){if(I===L.found)break;if(I.type==="newline"){i(I,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}A.start<L.found.offset-1024&&i(L.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]===":"?i(N,"MISSING_CHAR",`Missing space after : in ${o}`):i(L.start,"MISSING_CHAR",`Missing , or : between ${o} items`));let x=N?s(t,N,L,i):L.found?e(t,L.end,k,null,L,i):null;x?un(N)&&i(x.range,"BLOCK_IN_FLOW",fn):L.comment&&(b.comment?b.comment+=`
68
+ `+L.comment:b.comment=L.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)&&i(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 Fn=(x??b).range;I.range=[b.range[0],Fn[1],Fn[2]],c.items.push(I)}f=x?x.range[2]:L.end}}let u=a?"}":"]",[m,...g]=n.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}`;i(f,d?"MISSING_CHAR":"BAD_INDENT",S),m&&m.source.length!==1&&g.unshift(m)}if(g.length>0){let p=Lc.resolveEnd(g,h,t.options.strict,i);p.comment&&(c.comment?c.comment+=`
69
+ `+p.comment:c.comment=p.comment),c.range=[n.offset,h,p.offset]}else c.range=[n.offset,h,h];return c}_r.resolveFlowCollection=$c});var Kr=y(Fr=>{"use strict";var Mc=q(),Dc=C(),_c=X(),Bc=z(),Fc=Lr(),Kc=Pr(),jc=Br();function hn(s,e,t,n,i,r){let a=t.type==="block-map"?Fc.resolveBlockMap(s,e,t,n,r):t.type==="block-seq"?Kc.resolveBlockSeq(s,e,t,n,r):jc.resolveFlowCollection(s,e,t,n,r),o=a.constructor;return i==="!"||i===o.tagName?(a.tag=o.tagName,a):(i&&(a.tag=i),a)}function Rc(s,e,t,n,i){let r=n.tag,a=r?e.directives.tagName(r.source,u=>i(r,"TAG_RESOLVE_FAILED",u)):null;if(t.type==="block-seq"){let{anchor:u,newlineAfterProp:m}=n,g=u&&r?u.offset>r.offset?u:r:u??r;g&&(!m||m.offset<g.offset)&&i(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 hn(s,e,t,i,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?i(r,"BAD_COLLECTION_TYPE",`${u.tag} used for ${o} collection, but expects ${u.collection??"scalar"}`,!0):i(r,"TAG_RESOLVE_FAILED",`Unresolved tag: ${a}`,!0),hn(s,e,t,i,a)}let c=hn(s,e,t,i,a,l),d=l.resolve?.(c,u=>i(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 pn=y(jr=>{"use strict";var dn=C();function Uc(s,e,t){let n=e.offset,i=Yc(e,s.options.strict,t);if(!i)return{value:"",type:null,comment:"",range:[n,n,n]};let r=i.mode===">"?dn.Scalar.BLOCK_FOLDED:dn.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=i.chomp==="+"&&a.length>0?`
70
+ `.repeat(Math.max(1,a.length-1)):"",p=n+i.length;return e.source&&(p+=e.source.length),{value:h,type:r,comment:i.comment,range:[n,p,p]}}let l=e.indent+i.indent,c=e.offset+i.length,d=0;for(let h=0;h<o;++h){let[p,S]=a[h];if(S===""||S==="\r")i.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"),i.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 ${i.indent?"explicit indentation indicator":"first line"}`;t(c-S.length-(w?2:1),"BAD_INDENT",k),p=""}r===dn.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(i.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=n+i.length+e.source.length;return{value:f,type:r,comment:i.comment,range:[n,g,g]}}function Yc({offset:s,props:e},t,n){if(e[0].type!=="block-scalar-header")return n(e[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:i}=e[0],r=i[0],a=0,o="",l=-1;for(let u=1;u<i.length;++u){let m=i[u];if(!o&&(m==="-"||m==="+"))o=m;else{let g=Number(m);!a&&g?a=g:l===-1&&(l=s+u)}}l!==-1&&n(l,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${i}`);let c=!1,d="",f=i.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&&n(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":n(m,"UNEXPECTED_TOKEN",m.message),f+=m.source.length;break;default:{let g=`Unexpected token in block scalar header: ${m.type}`;n(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],n=t.match(/^( *)/),r=[n?.[1]?[n[1],t.slice(n[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 yn=y(Ur=>{"use strict";var mn=C(),Vc=be();function Jc(s,e,t){let{offset:n,type:i,source:r,end:a}=s,o,l,c=(u,m,g)=>t(n+u,m,g);switch(i){case"scalar":o=mn.Scalar.PLAIN,l=Gc(r,c);break;case"single-quoted-scalar":o=mn.Scalar.QUOTE_SINGLE,l=Wc(r,c);break;case"double-quoted-scalar":o=mn.Scalar.QUOTE_DOUBLE,l=Qc(r,c);break;default:return t(s,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${i}`),{value:"",type:null,comment:"",range:[n,n+r.length,n+r.length]}}let d=n+r.length,f=Vc.resolveEnd(a,d,e,t);return{value:l,type:o,comment:f.comment,range:[n,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 n=e.exec(s);if(!n)return s;let i=n[1],r=" ",a=e.lastIndex;for(t.lastIndex=a;n=t.exec(s);)n[1]===""?r===`
87
+ `?i+=r:r=`
88
+ `:(i+=r+n[1],r=" "),a=t.lastIndex;let o=/[ \t]*(.*)/sy;return o.lastIndex=a,n=o.exec(s),i+r+(n?.[1]??"")}function Qc(s,e){let t="";for(let n=1;n<s.length-1;++n){let i=s[n];if(!(i==="\r"&&s[n+1]===`
89
+ `))if(i===`
90
+ `){let{fold:r,offset:a}=Hc(s,n);t+=r,n=a}else if(i==="\\"){let r=s[++n],a=Xc[r];if(a)t+=a;else if(r===`
91
+ `)for(r=s[n+1];r===" "||r===" ";)r=s[++n+1];else if(r==="\r"&&s[n+1]===`
92
+ `)for(r=s[++n+1];r===" "||r===" ";)r=s[++n+1];else if(r==="x"||r==="u"||r==="U"){let o={x:2,u:4,U:8}[r];t+=zc(s,n+1,o,e),n+=o}else{let o=s.substr(n-1,2);e(n-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${o}`),t+=o}}else if(i===" "||i===" "){let r=n,a=s[n+1];for(;a===" "||a===" ";)a=s[++n+1];a!==`
93
+ `&&!(a==="\r"&&s[n+2]===`
94
+ `)&&(t+=n>r?s.slice(r,n+1):i)}else t+=i}return(s[s.length-1]!=='"'||s.length===1)&&e(s.length,"MISSING_CHAR",'Missing closing "quote'),t}function Hc(s,e){let t="",n=s[e+1];for(;(n===" "||n===" "||n===`
95
+ `||n==="\r")&&!(n==="\r"&&s[e+2]!==`
96
+ `);)n===`
97
+ `&&(t+=`
98
+ `),e+=1,n=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,n){let i=s.substr(e,t),a=i.length===t&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;if(isNaN(a)){let o=s.substr(e-2,t+2);return n(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=C(),Zc=pn(),ef=yn();function tf(s,e,t,n){let{value:i,type:r,comment:a,range:o}=e.type==="block-scalar"?Zc.resolveBlockScalar(s,e,n):ef.resolveFlowScalar(e,s.options.strict,n),l=t?s.directives.tagName(t.source,f=>n(t,"TAG_RESOLVE_FAILED",f)):null,c;s.options.stringKeys&&s.atKey?c=s.schema[re.SCALAR]:l?c=sf(s.schema,i,l,t,n):e.type==="scalar"?c=nf(s,i,e,n):c=s.schema[re.SCALAR];let d;try{let f=c.resolve(i,u=>n(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);n(t??e,"TAG_RESOLVE_FAILED",u),d=new Yr.Scalar(i)}return d.range=o,d.source=i,r&&(d.type=r),l&&(d.tag=l),c.format&&(d.format=c.format),a&&(d.comment=a),d}function sf(s,e,t,n,i){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):(i(n,"TAG_RESOLVE_FAILED",`Unresolved tag: ${t}`,t!=="tag:yaml.org,2002:str"),s[re.SCALAR])}function nf({atKey:s,directives:e,schema:t},n,i,r){let a=t.tags.find(o=>(o.default===!0||s&&o.default==="key")&&o.test?.test(n))||t[re.SCALAR];if(t.compat){let o=t.compat.find(l=>l.default&&l.test?.test(n))??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(i,"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 n=t-1;n>=0;--n){let i=e[n];switch(i.type){case"space":case"comment":case"newline":s-=i.source.length;continue}for(i=e[++n];i?.type==="space";)s+=i.source.length,i=e[++n];break}}return s}Jr.emptyScalarPosition=rf});var Hr=y(bn=>{"use strict";var af=Oe(),of=q(),lf=Kr(),Wr=Vr(),cf=be(),ff=Gr(),uf={composeNode:Qr,composeEmptyNode:gn};function Qr(s,e,t,n){let i=s.atKey,{spaceBefore:r,comment:a,anchor:o,tag:l}=t,c,d=!0;switch(e.type){case"alias":c=hf(s,e,n),(o||l)&&n(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,n),o&&(c.anchor=o.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":c=lf.composeCollection(uf,s,e,t,n),o&&(c.anchor=o.source.substring(1));break;default:{let f=e.type==="error"?e.message:`Unsupported token (type: ${e.type})`;n(e,"UNEXPECTED_TOKEN",f),c=gn(s,e.offset,void 0,null,t,n),d=!1}}return o&&c.anchor===""&&n(o,"BAD_ALIAS","Anchor cannot be an empty string"),i&&s.options.stringKeys&&(!of.isScalar(c)||typeof c.value!="string"||c.tag&&c.tag!=="tag:yaml.org,2002:str")&&n(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 gn(s,e,t,n,{spaceBefore:i,comment:r,anchor:a,tag:o,end:l},c){let d={type:"scalar",offset:ff.emptyScalarPosition(e,t,n),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")),i&&(f.spaceBefore=!0),r&&(f.comment=r,f.range[2]=l),f}function hf({options:s},{offset:e,source:t,end:n},i){let r=new af.Alias(t.substring(1));r.source===""&&i(e,"BAD_ALIAS","Alias cannot be an empty string"),r.source.endsWith(":")&&i(e+t.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let a=e+t.length,o=cf.resolveEnd(n,a,s.strict,i);return r.range=[e,a,o.offset],o.comment&&(r.comment=o.comment),r}bn.composeEmptyNode=gn;bn.composeNode=Qr});var Zr=y(zr=>{"use strict";var df=Ye(),Xr=Hr(),pf=be(),mf=Ge();function yf(s,e,{offset:t,start:n,value:i,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(n,{indicator:"doc-start",next:i??r?.[0],offset:t,onError:a,parentIndent:0,startOnNewline:!0});d.found&&(l.directives.docStart=!0,i&&(i.type==="block-map"||i.type==="block-seq")&&!d.hasNewline&&a(d.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),l.contents=i?Xr.composeNode(c,i,d,a):Xr.composeEmptyNode(c,d.end,n,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 wn=y(sa=>{"use strict";var gf=tt("process"),bf=is(),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,n=!1;for(let i=0;i<s.length;++i){let r=s[i];switch(r[0]){case"#":e+=(e===""?"":n?`
100
+
101
+ `:`
102
+ `)+(r.substring(1)||" "),t=!0,n=!1;break;case"%":s[i+1]?.[0]!=="#"&&(i+=1),t=!1;break;default:t||(n=!0),t=!1}}return{comment:e,afterEmptyLine:n}}var Sn=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(t,n,i,r)=>{let a=Qe(t);r?this.warnings.push(new We.YAMLWarning(a,n,i)):this.errors.push(new We.YAMLParseError(a,n,i))},this.directives=new bf.Directives({version:e.version||"1.2"}),this.options=e}decorate(e,t){let{comment:n,afterEmptyLine:i}=ta(this.prelude);if(n){let r=e.contents;if(t)e.comment=e.comment?`${e.comment}
103
+ ${n}`:n;else if(i||e.directives.docStart||!r)e.commentBefore=n;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?`${n}
104
+ ${o}`:n}else{let a=r.commentBefore;r.commentBefore=a?`${n}
105
+ ${a}`:n}}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,n=-1){for(let i of e)yield*this.next(i);yield*this.end(t,n)}*next(e){switch(gf.env.LOG_STREAM&&console.dir(e,{depth:null}),e.type){case"directive":this.directives.add(e.source,(t,n,i)=>{let r=Qe(e);r[0]+=t,this.onError(r,"BAD_DIRECTIVE",n,i)}),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,n=new We.YAMLParseError(Qe(e),"UNEXPECTED_TOKEN",t);this.atDirectives||!this.doc?this.errors.push(n):this.doc.errors.push(n);break}case"doc-end":{if(!this.doc){let n="Unexpected doc-end without preceding document";this.errors.push(new We.YAMLParseError(Qe(e),"UNEXPECTED_TOKEN",n));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 n=this.doc.comment;this.doc.comment=n?`${n}
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 n=Object.assign({_directives:this.directives},this.options),i=new Sf.Document(void 0,n);this.atDirectives&&this.onError(t,"MISSING_CHAR","Missing directives-end indicator line"),i.range=[0,t,t],this.decorate(i,!1),yield i}}};sa.Composer=Sn});var ra=y(Vt=>{"use strict";var kf=pn(),Nf=yn(),Af=Je(),na=Ie();function qf(s,e=!0,t){if(s){let n=(i,r,a)=>{let o=typeof i=="number"?i:Array.isArray(i)?i[0]:i.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,n);case"block-scalar":return kf.resolveBlockScalar({options:{strict:e}},s,n)}}return null}function Of(s,e){let{implicitKey:t=!1,indent:n,inFlow:i=!1,offset:r=-1,type:a="PLAIN"}=e,o=na.stringifyString({type:a,value:s},{implicitKey:t,indent:n>0?" ".repeat(n):"",inFlow:i,options:{blockQuote:!0,lineWidth:-1}}),l=e.end??[{type:"newline",offset:-1,indent:n,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:n,source:d}];return ia(u,l)||u.push({type:"newline",offset:-1,indent:n,source:`
110
+ `}),{type:"block-scalar",offset:r,indent:n,props:u,source:f}}case'"':return{type:"double-quoted-scalar",offset:r,indent:n,source:o,end:l};case"'":return{type:"single-quoted-scalar",offset:r,indent:n,source:o,end:l};default:return{type:"scalar",offset:r,indent:n,source:o,end:l}}}function Ef(s,e,t={}){let{afterKey:n=!1,implicitKey:i=!1,inFlow:r=!1,type:a}=t,o="indent"in s?s.indent:null;if(n&&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=na.stringifyString({type:a,value:e},{implicitKey:i||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'"':vn(s,l,"double-quoted-scalar");break;case"'":vn(s,l,"single-quoted-scalar");break;default:vn(s,l,"scalar")}}function Tf(s,e){let t=e.indexOf(`
111
+ `),n=e.substring(0,t),i=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=n,s.source=i}else{let{offset:r}=s,a="indent"in s?s.indent:-1,o=[{type:"block-scalar-header",offset:r,indent:a,source:n}];ia(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:i})}}function ia(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 vn(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 n=s.props.slice(1),i=e.length;s.props[0].type==="block-scalar-header"&&(i-=s.props[0].source.length);for(let r of n)r.offset+=i;delete s.props,Object.assign(s,{type:t,source:e,end:n});break}case"block-map":case"block-seq":{let i={type:"newline",offset:s.offset+e.length,indent:s.indent,source:`
114
+ `};delete s.items,Object.assign(s,{type:t,source:e,end:[i]});break}default:{let n="indent"in s?s.indent:-1,i="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:n,source:e,end:i})}}}Vt.createScalarToken=Of;Vt.resolveAsScalar=qf;Vt.setScalarValue=Ef});var oa=y(aa=>{"use strict";var Cf=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:n}){let i="";for(let r of s)i+=r.source;if(e&&(i+=Gt(e)),t)for(let r of t)i+=r.source;return n&&(i+=Gt(n)),i}aa.stringify=Cf});var ua=y(fa=>{"use strict";var kn=Symbol("break visit"),Lf=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=kn;ae.SKIP=Lf;ae.REMOVE=la;ae.itemAtPath=(s,e)=>{let t=s;for(let[n,i]of e){let r=t?.[n];if(r&&"items"in r)t=r.items[i];else return}return t};ae.parentCollection=(s,e)=>{let t=ae.itemAtPath(s,e.slice(0,-1)),n=e[e.length-1][0],i=t?.[n];if(i&&"items"in i)return i;throw new Error("Parent collection not found")};function ca(s,e,t){let n=t(e,s);if(typeof n=="symbol")return n;for(let i of["key","value"]){let r=e[i];if(r&&"items"in r){for(let a=0;a<r.items.length;++a){let o=ca(Object.freeze(s.concat([[i,a]])),r.items[a],t);if(typeof o=="number")a=o-1;else{if(o===kn)return kn;o===la&&(r.items.splice(a,1),a-=1)}}typeof n=="function"&&i==="key"&&(n=n(e,s))}}return typeof n=="function"?n(e,s):n}fa.visit=ae});var Wt=y(D=>{"use strict";var Nn=ra(),If=oa(),Pf=ua(),An="\uFEFF",qn="",On="",En="",$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 An:return"<BOM>";case qn:return"<DOC>";case On:return"<FLOW_END>";case En:return"<SCALAR>";default:return JSON.stringify(s)}}function _f(s){switch(s){case An:return"byte-order-mark";case qn:return"doc-mode";case On:return"flow-error-end";case En: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=Nn.createScalarToken;D.resolveAsScalar=Nn.resolveAsScalar;D.setScalarValue=Nn.setScalarValue;D.stringify=If.stringify;D.visit=Pf.visit;D.BOM=An;D.DOCUMENT=qn;D.FLOW_END=On;D.SCALAR=En;D.isCollection=$f;D.isScalar=Mf;D.prettyToken=Df;D.tokenType=_f});var Ln=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 `),Tn=s=>!s||Ff.has(s),Cn=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 n=this.next??"stream";for(;n&&(t||this.hasChars(1));)n=yield*this.parseNext(n)}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 n=0;for(;t===" ";)t=this.buffer[++n+e];if(t==="\r"){let i=this.buffer[n+e+1];if(i===`
121
+ `||!i&&!this.atEnd)return e+n+1}return t===`
122
+ `||n>=this.indentNext||!t&&!this.atEnd?e+n:-1}if(t==="-"||t==="."){let n=this.buffer.substr(e,3);if((n==="---"||n==="...")&&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,n=e.indexOf("#");for(;n!==-1;){let r=e[n-1];if(r===" "||r===" "){t=n-1;break}else n=e.indexOf("#",n+1)}for(;;){let r=e[t-1];if(r===" "||r===" ")t-=1;else break}let i=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-i),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 n=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=n,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(Tn),"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,n=-1;do e=yield*this.pushNewline(),e>0?(t=yield*this.pushSpaces(!1),this.indentValue=n=t):t=0,t+=yield*this.pushSpaces(!0);while(e+t>0);let i=this.getLine();if(i===null)return this.setNext("flow");if((n!==-1&&n<this.indentNext&&i[0]!=="#"||n===0&&(i.startsWith("---")||i.startsWith("..."))&&F(i[3]))&&!(n===this.indentNext-1&&this.flowLevel===1&&(i[0]==="]"||i[0]==="}")))return this.flowLevel=0,yield He.FLOW_END,yield*this.parseLineStart();let r=0;for(;i[r]===",";)r+=yield*this.pushCount(1),r+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(r+=yield*this.pushIndicators(),i[r]){case void 0:return"flow";case"#":return yield*this.pushCount(i.length-r),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(Tn),"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 n=this.buffer.substring(0,t),i=n.indexOf(`
124
+ `,this.pos);if(i!==-1){for(;i!==-1;){let r=this.continueScalar(i+1);if(r===-1)break;i=n.indexOf(`
125
+ `,r)}i!==-1&&(t=i-(n[i-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,n;e:for(let r=this.pos;n=this.buffer[r];++r)switch(n){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(!n&&!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 i=e+1;for(n=this.buffer[i];n===" ";)n=this.buffer[++i];if(n===" "){for(;n===" "||n===" "||n==="\r"||n===`
129
+ `;)n=this.buffer[++i];e=i-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,n=this.pos-1,i;for(;i=this.buffer[++n];)if(i===":"){let r=this.buffer[n+1];if(F(r)||e&&Qt.has(r))break;t=n}else if(F(i)){let r=this.buffer[n+1];if(i==="\r"&&(r===`
131
+ `?(n+=1,i=`
132
+ `,r=this.buffer[n+1]):t=n),r==="#"||e&&Qt.has(r))break;if(i===`
133
+ `){let a=this.continueScalar(n+1);if(a===-1)break;n=Math.max(n,a-2)}}else{if(e&&Qt.has(i))break;t=n}return!i&&!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 n=this.buffer.slice(this.pos,e);return n?(yield n,this.pos+=n.length,n.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(Tn))+(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,n;do n=this.buffer[++t];while(n===" "||e&&n===" ");let i=t-this.pos;return i>0&&(yield this.buffer.substr(this.pos,i),this.pos=t),i}*pushUntil(e){let t=this.pos,n=this.buffer[t];for(;!e(n);)n=this.buffer[++t];return yield*this.pushToIndex(t,!1)}};da.Lexer=Cn});var Pn=y(pa=>{"use strict";var In=class{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,n=this.lineStarts.length;for(;t<n;){let r=t+n>>1;this.lineStarts[r]<e?t=r+1:n=r}if(this.lineStarts[t]===e)return{line:t+1,col:1};if(t===0)return{line:0,col:e};let i=this.lineStarts[t-1];return{line:t,col:e-i+1}}}};pa.LineCounter=In});var Mn=y(Sa=>{"use strict";var Kf=tt("process"),ma=Wt(),jf=Ln();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 $n=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 n of this.lexer.lex(e,t))yield*this.next(n);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 n=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:n,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 n=this.peek(1);switch(t.type==="block-scalar"?t.indent="indent"in n?n.indent:0:t.type==="flow-collection"&&n.type==="document"&&(t.indent=0),t.type==="flow-collection"&&ga(t),n.type){case"document":n.value=t;break;case"block-scalar":n.props.push(t);break;case"block-map":{let i=n.items[n.items.length-1];if(i.value){n.items.push({start:[],key:t,sep:[]}),this.onKeyLine=!0;return}else if(i.sep)i.value=t;else{Object.assign(i,{key:t,sep:[]}),this.onKeyLine=!i.explicitKey;return}break}case"block-seq":{let i=n.items[n.items.length-1];i.value?n.items.push({start:[],value:t}):i.value=t;break}case"flow-collection":{let i=n.items[n.items.length-1];!i||i.value?n.items.push({start:[],key:t,sep:[]}):i.sep?i.value=t:Object.assign(i,{key:t,sep:[]});return}default:yield*this.pop(),yield*this.pop(t)}if((n.type==="document"||n.type==="block-map"||n.type==="block-seq")&&(t.type==="block-map"||t.type==="block-seq")){let i=t.items[t.items.length-1];i&&!i.sep&&!i.value&&i.start.length>0&&ya(i.start)===-1&&(t.indent===0||i.start.every(r=>r.type!=="comment"||r.indent<t.indent))&&(n.type==="document"?n.end=i.start:n.items.push({start:i.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)),n=Se(t),i;e.end?(i=e.end,i.push(this.sourceToken),delete e.end):i=[this.sourceToken];let r={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:n,key:e,sep:i}]};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 n="end"in t.value?t.value.end:void 0;(Array.isArray(n)?n[n.length-1]:void 0)?.type==="comment"?n?.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 i=e.items[e.items.length-2]?.value?.end;if(Array.isArray(i)){Array.prototype.push.apply(i,t.start),i.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let n=!this.onKeyLine&&this.indent===e.indent,i=n&&(t.sep||t.explicitKey)&&this.type!=="seq-item-ind",r=[];if(i&&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":i||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):i||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||i?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);i||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 n&&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 n="end"in t.value?t.value.end:void 0;(Array.isArray(n)?n[n.length-1]:void 0)?.type==="comment"?n?.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 i=e.items[e.items.length-2]?.value?.end;if(Array.isArray(i)){Array.prototype.push.apply(i,t.start),i.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 n=this.startBlockValue(e);if(n){this.stack.push(n);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){let t=e.items[e.items.length-1];if(this.type==="flow-error-end"){let n;do yield*this.pop(),n=this.peek(1);while(n?.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 i=this.flowScalar(this.type);!t||t.value?e.items.push({start:[],key:i,sep:[]}):t.sep?this.stack.push(i):Object.assign(t,{key:i,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}let n=this.startBlockValue(e);n?this.stack.push(n):(yield*this.pop(),yield*this.step())}else{let n=this.peek(2);if(n.type==="block-map"&&(this.type==="map-value-ind"&&n.indent===e.indent||this.type==="newline"&&!n.items[n.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&n.type!=="flow-collection"){let i=Ht(n),r=Se(i);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),n=Se(t);return n.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:n,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let t=Ht(e),n=Se(t);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:n,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return this.type!=="comment"||this.indent<=t?!1:e.every(n=>n.type==="newline"||n.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=$n});var Aa=y(ze=>{"use strict";var wa=wn(),Rf=Ye(),Xe=Je(),Uf=gs(),Yf=q(),xf=Pn(),va=Mn();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:n}=ka(e),i=new va.Parser(t?.addNewLine),r=new wa.Composer(e),a=Array.from(r.compose(i.parse(s)));if(n&&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:n}=ka(e),i=new va.Parser(t?.addNewLine),r=new wa.Composer(e),a=null;for(let o of r.compose(i.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 n&&t&&(a.errors.forEach(Xe.prettifyError(s,t)),a.warnings.forEach(Xe.prettifyError(s,t))),a}function Jf(s,e,t){let n;typeof e=="function"?n=e:t===void 0&&e&&typeof e=="object"&&(t=e);let i=Na(s,t);if(!i)return null;if(i.warnings.forEach(r=>Uf.warn(i.options.logLevel,r)),i.errors.length>0){if(i.options.logLevel!=="silent")throw i.errors[0];i.errors=[]}return i.toJS(Object.assign({reviver:n},t))}function Gf(s,e,t){let n=null;if(typeof e=="function"||Array.isArray(e)?n=e:t===void 0&&e&&(t=e),typeof t=="string"&&(t=t.length),typeof t=="number"){let i=Math.round(t);t=i<1?void 0:i>8?{indent:8}:{indent:i}}if(s===void 0){let{keepUndefined:i}=t??e??{};if(!i)return}return Yf.isDocument(s)&&!n?s.toString(t):new Rf.Document(s,n,t).toString(t)}ze.parse=Jf;ze.parseAllDocuments=Vf;ze.parseDocument=Na;ze.stringify=Gf});var Oa=y(O=>{"use strict";var Wf=wn(),Qf=Ye(),Hf=Zs(),Dn=Je(),Xf=Oe(),ee=q(),zf=Q(),Zf=C(),eu=X(),tu=z(),su=Wt(),nu=Ln(),iu=Pn(),ru=Mn(),Xt=Aa(),qa=ke();O.Composer=Wf.Composer;O.Document=Qf.Document;O.Schema=Hf.Schema;O.YAMLError=Dn.YAMLError;O.YAMLParseError=Dn.YAMLParseError;O.YAMLWarning=Dn.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=nu.Lexer;O.LineCounter=iu.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,completionReason:null,completedAt:null,completionNote:null,reopenedFrom:null}),fu=(s,e,t,n)=>({concerns:s,tools:e,providers:t,project:n,maxIterationsBeforeRestart:15,verifyCommand:null,allowGit:!1,command:"npx eser@latest noskills"});var oe=Ca(Oa(),1);var Y=".eser",we=`${Y}/.state`,Bn=`${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:Bn,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`},_n=async s=>{let e=`${s}/${Bn}`;try{let t=await T.fs.readTextFile(e);return JSON.parse(t)}catch{return es()}},Lh=async(s,e)=>{if(e==null)return _n(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 n=await lu(s,e);if(n.spec===e)return n;let i=await _n(s);return i.spec===e?i:{...n,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}`,n=`${s}/${Bn}`;await T.fs.mkdir(t,{recursive:!0}),await T.fs.writeTextFile(n,JSON.stringify(e,null,2)+`
140
+ `)},Ph=async s=>(await _n(s)).spec;var lu=async(s,e)=>{let t=`${s}/${ve.specStateFile(e)}`;try{let n=await T.fs.readTextFile(t);return JSON.parse(n)}catch{return es()}},cu=async(s,e,t)=>{let n=`${s}/${et}`,i=`${s}/${ve.specStateFile(e)}`;await T.fs.mkdir(n,{recursive:!0}),await T.fs.writeTextFile(i,JSON.stringify(t,null,2)+`
141
+ `)},$h=async s=>{let e=`${s}/${et}`,t=[];try{for await(let n of T.fs.readDir(e))if(n.isFile&&n.name.endsWith(".json")){let i=n.name.replace(/\.json$/,""),r=await T.fs.readTextFile(`${e}/${n.name}`);t.push({name:i,state:JSON.parse(r)})}}catch{}return t},Mh=async s=>{let e=`${s}/${Zt}`;try{let t=await T.fs.readTextFile(e),n=oe.parse(t);return n?.noskills===void 0?null:n.noskills}catch{return null}},Dh=async(s,e)=>{let t=`${s}/${Zt}`,n;try{let r=await T.fs.readTextFile(t);n=oe.parseDocument(r)}catch{n=new oe.Document({})}let i=n.createNode(e);i.commentBefore=" noskills orchestrator \u2014 inline comments in this section won't be preserved on next write",n.set("noskills",i),await T.fs.writeTextFile(t,n.toString())},_h=async(s,e)=>{let t=`${s}/${ve.concernFile(e)}`;try{let n=await T.fs.readTextFile(t);return JSON.parse(n)}catch{return null}},Bh=async(s,e)=>{let t=`${s}/${Ze}`,n=`${s}/${ve.concernFile(e.id)}`;await T.fs.mkdir(t,{recursive:!0}),await T.fs.writeTextFile(n,JSON.stringify(e,null,2)+`
142
+ `)},Fh=async s=>{let e=`${s}/${Ze}`,t=[];try{for await(let n of T.fs.readDir(e))if(n.isFile&&n.name.endsWith(".json")){let i=await T.fs.readTextFile(`${e}/${n.name}`);t.push(JSON.parse(i))}}catch{}return t},Kh=async s=>{let e=[Y,we,et,Ze,Ea,zt,Ta];for(let n of e)await T.fs.mkdir(`${s}/${n}`,{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,_n as e,Lh 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};
@@ -0,0 +1,11 @@
1
+ import{a as D,c as R,d as x,e as O}from"./chunk-2WH262CW.js";import{c as A}from"./chunk-YK6UG66R.js";var T=[{id:"status_quo",text:"What does the user do today without this feature?",concerns:["product:status_quo","eng:replace_scope","qa:regression_risk"]},{id:"ambition",text:"Describe the 1-star and 10-star versions.",concerns:["product:scope_direction","eng:complexity_tier","qa:test_depth"]},{id:"reversibility",text:"Does this change involve an irreversible decision?",concerns:["product:one_way_door","eng:migration_strategy","qa:verification_stringency"]},{id:"user_impact",text:"Does this change affect existing users' behavior?",concerns:["product:breaking_change","eng:backward_compat","qa:regression_tests"]},{id:"verification",text:"How do you verify this works correctly?",concerns:["product:success_metric","eng:test_strategy","qa:acceptance_criteria"]},{id:"scope_boundary",text:"What should this feature NOT do?",concerns:["product:focus","eng:out_of_scope","qa:negative_tests"]}],S=e=>T.map(s=>({...s,extras:R(e,s.id)}));var P=e=>{let s=new Set(e.map(t=>t.questionId));return T.every(t=>s.has(t.id))};var n=e=>A(e),_="NEVER run git write commands (commit, add, push, checkout, stash, reset, merge, rebase, cherry-pick). Git is read-only for agents. The user controls git. You may read: git log, git diff, git status, git show, git blame.",U=(e,s,t,a)=>{let c=e.execution.iteration>=s,p="You are a senior engineer and a scrum master who takes pride in honest reporting. Your reputation depends on accuracy, not speed. You are responsible for others' toil, and you are a perfect example of a servant leader. When reporting progress: if something is NOT implemented, say so \u2014 don't hide it. If partially done, say 'partially done: [what works] / [what doesn't]'. If untested, say 'implemented but untested'. NEVER say 'done' for something you haven't verified yourself. Underpromise \u2014 4 of 6 done means '4 of 6 done, 2 remaining', not 'almost done'.",i="Never skip steps or make decisions without asking the user. If you think something can be skipped or inferred, ask first. Explicit > Clever.",g="At every decision point (discovery questions, classification, spec approval, expansion proposals, architectural decisions, rule promotion), you MUST use AskUserQuestion to get the user's input. You MUST NOT make decisions, infer preferences, or assume the user's intent. If you're unsure whether something is a decision point, it is \u2014 ask.",l="At every decision point where you present options to the user, share your recommendation BEFORE asking. Say what you think and why, then ask if the user agrees. Format: 'I'd recommend X because [reason]. Agree, or would you prefer Y?' The user always has the final word, but you save them cognitive load by proposing first.",o=t?[p,i,g,l]:[_,p,i,g,l],u=a?.outOfScope??[];switch(e.phase){case"IDLE":return{rules:[...o,"When interactiveOptions are present, pass them DIRECTLY as the `options` array in AskUserQuestion \u2014 they are already in the correct {label, description} format. You MUST also provide a `header` field (max 12 chars, e.g. 'Action') and a `question` field. When the user picks an option, look up its label in the `commandMap` object to find the command to execute.","For availableConcerns: use AskUserQuestion with multiSelect:true. AskUserQuestion supports max 4 options per question and max 4 questions per call. If there are more than 4 concerns, split them across two questions within the same AskUserQuestion call (e.g., first 3 in question 1, remaining in question 2). NEVER silently drop concerns \u2014 present ALL available concerns to the user, even if it requires multiple questions.","Do not take action without the user choosing an option first.","When the user wants to create a new spec, they can provide anything: a one-line description, a full task list, meeting notes, a kanban card, a customer email, or a detailed requirements document. Accept whatever format they provide. If it's long, summarize it into a spec title for the slug but preserve the full text as context for discovery.","After running spec new, ask the user if they want full discovery, quick discovery, or skip to spec draft. Full discovery: pre-scan, premise challenge, 6 questions, expansions, architecture, error map, synthesis. Quick discovery: only questions relevant to active concerns, skip expansions and error map. Skip to spec draft: classification \u2192 approve \u2192 execute. Never skip discovery without asking."],tone:"Welcoming. Present choices, then wait."};case"DISCOVERY":return{modeOverride:"You are in plan mode. Behave exactly as you would in Claude Code's native plan mode. Do not attempt to create, edit, or write any files. Do not run any shell commands that modify state. You can read files and run read-only commands to understand the codebase. Your ONLY job right now is to have a thorough conversation with the user \u2014 ask probing questions, challenge vague answers, explore alternatives, understand the problem deeply. The quality of everything that follows depends on this conversation.",rules:[...o,"You MUST ask each discovery question using AskUserQuestion tool. You MUST NOT answer questions yourself or infer answers from the spec description. You MUST NOT submit discovery answers without the user explicitly providing each answer through AskUserQuestion. Each question \u2192 one AskUserQuestion call \u2192 user answers \u2192 next question. If the user already gave a detailed description in spec new, you may PRE-FILL suggested answers as option descriptions in AskUserQuestion \u2014 but the user must still confirm or override each one. If the user provided a fully formed plan, you may skip Phase 2 (questions) but you MUST still run premise challenge and alternatives. Never skip premise challenge.","DO NOT create, edit, or write any files.","DO NOT run shell commands that modify state.","You MAY read files and run read-only commands (cat, ls, grep, git log, git diff).","BEFORE asking any discovery questions, conduct a pre-discovery codebase scan: read the project README, CLAUDE.md, and any design docs; check the last 20 git commits (git log --oneline -20); look for TODO files, open issue references, and existing specs; scan the directory structure to understand the project shape. Then present a brief 'Pre-discovery audit' summary: stack detected, recent work themes, open TODOs, existing specs. This gives you CONTEXT to ask INFORMED questions, not blind ones.","After the pre-discovery codebase scan and BEFORE starting questions, ask the user: 'What kind of discovery do you need? A) Explore scope \u2014 I'll help expand, find opportunities, think bigger. B) Technical depth \u2014 I'll focus on architecture, error handling, implementation strategy. C) Validate my plan \u2014 I already know what I want, challenge my assumptions. D) Ship fast \u2014 minimal scope, cut the fat, get to tasks quickly.' Adapt your discovery emphasis accordingly: Explore \u2192 heavy on expansion proposals and dream state; Technical \u2192 heavy on architectural decisions and error/rescue map; Validate \u2192 heavy on premise challenge and pushback; Ship fast \u2192 minimal questions, skip expansions, go direct to classification and tasks.","Before starting discovery questions, challenge the user's initial spec description against what you learned from the codebase scan. Look for: hidden complexity they haven't mentioned, conflicts with existing code, scope that's bigger or smaller than they think, existing modules that overlap with what they're asking for. Share your observations and ask clarifying follow-ups, then proceed to questions.","When asking discovery questions, use your codebase knowledge to offer concrete options alongside the open-ended question. For example, instead of just 'What does the user do today?' present: 'Based on the codebase, I see three likely scenarios: A) ... B) ... C) ... D) Something else \u2014 describe it. Which is closest?' The user can always pick 'something else' but concrete options speed up the conversation and force specificity.","Ask one question at a time using your interactive question tool.","Push back on vague answers \u2014 you will be the one executing this spec, vague answers make your job harder.","When the user gives a short answer, follow up: 'Can you be more specific?'","After collecting discovery answers, synthesize a CURRENT STATE \u2192 THIS SPEC \u2192 6-MONTH IDEAL vision before generating the spec. Show three columns: where the project is now, what this spec achieves, and where it could go in 6 months. Note: 'This spec moves you from column 1 to column 2. Column 3 is out of scope but worth knowing \u2014 every decision in this spec should keep column 3 possible.' This helps the user see if the scope is right.","When you spot expansion opportunities during discovery (from codebase scan, TODOs, concern requirements, synergies with the current plan), present each as a numbered proposal (1/N, 2/N...). Every proposal MUST include: clear description of WHAT and WHY (how it connects to the current plan); effort estimate as S/M/L/XL with human time and CC time estimates (e.g., 'S (human: ~1 day / CC: ~15 min)' \u2014 not just 'small'); risk assessment as Low/Low-Med/Med/Med-High/High naming the specific risk factor; completeness delta showing X/10 without this and Y/10 with this. Every proposal gets three options: A) Add to scope B) Defer to future spec C) Skip \u2014 not interested, plus 'Chat about this' and 'Skip remaining proposals' escape hatches.","After discovery questions and expansion proposals, identify architectural decisions that must be resolved before implementation. These are decisions where choosing A vs B changes the shape of multiple tasks, the data model, the API surface, or system boundaries. Present each as a concrete technical question with options, a RECOMMENDATION with reasoning, and completeness scores. Show how each option affects downstream work (e.g., 'If you choose B, tasks 3 and 4 need a job queue setup step added'). Only surface decisions that BLOCK implementation \u2014 not preferences or nice-to-haves. If the user says 'I don't know yet', mark it as a risk: 'UNRESOLVED: [decision] TBD. Tasks X-Y may change.' Never allow implementation to start with unresolved architectural decisions \u2014 flag them prominently in the spec.","Before finalizing, map error and rescue paths for every significant codepath in the planned work. Create a table: codepath | what can go wrong | how it's handled. Identify CRITICAL GAPS \u2014 failure modes that the plan doesn't address. Present each critical gap as a decision with options, a recommendation, and completeness scores, just like architectural decisions. Resolved gaps become tasks or acceptance criteria. Unresolved gaps become risk flags. Think like an SRE reviewing a design doc \u2014 what fails at 3am?","After all discovery questions, expansion proposals, architectural decisions, and error mapping are complete, present a DISCOVERY SUMMARY for the user to review: intent, ambition, reversibility, impact, verification, out of scope, the dream state table (current \u2192 this spec \u2192 future), accepted/deferred/skipped expansions, resolved architectural decisions, and the error/rescue map. Ask for confirmation before generating the spec. This is the last chance to catch misunderstandings.","Once you have a substantive answer for each question, collect all answers and submit them together in a single `noskills next --answer` call as a JSON object."],tone:"Curious interviewer who has a stake in the answers and comes PREPARED. You've read the codebase before asking. Challenge assumptions, offer concrete options, think about architecture and failure modes. Think deeply before asking each question."};case"DISCOVERY_REVIEW":return{modeOverride:"You are in plan mode. Do not create, edit, or write any files. Present the discovery answers to the user for review and confirmation.",rules:[...o,"DO NOT create, edit, or write any files.","Present ALL discovery answers to the user clearly, one by one.","Use AskUserQuestion to ask: 'Are these answers correct, or would you like to revise any?'","If the user approves, run the approve command.","If the user wants to revise, collect their corrections and submit them.","You MUST NOT approve on behalf of the user. The user must explicitly confirm."],tone:"Careful reviewer. The user must confirm every answer."};case"SPEC_DRAFT":return{modeOverride:"You are in plan mode. Behave exactly as you would in Claude Code's native plan mode. Do not attempt to create, edit, or write any files. Your job is to review the generated spec with the user \u2014 identify gaps, suggest improvements, check if tasks are concrete enough to execute.",rules:[...o,"DO NOT create, edit, or write any files.","Read the spec and present a summary to the user.","Flag any tasks that are too vague to execute.","Flag any missing acceptance criteria.","Ask the user if they want to refine before approving.","When presenting classification options, use AskUserQuestion with multiSelect:true. Do NOT infer classification yourself.","If you identify issues in the spec (vague tasks, irrelevant sections, missing acceptance criteria), submit a refinement via: `"+n(`next --answer='{"refinement":"task-1: Add upload endpoint, task-2: Add validation middleware, task-3: Write integration tests"}'`)+"`. The spec will be updated and you can review again."],tone:"Thoughtful reviewer preparing to hand off to an implementer."};case"SPEC_APPROVED":return{rules:[...o,"The spec is approved but execution has not started.","Do not start coding until the user triggers execution.","If the user wants changes, they must reset and re-spec.","Before starting execution, show the spec summary to the user and ask for final confirmation via AskUserQuestion."],tone:"Patient. Wait for the go signal."};case"EXECUTING":{let h=[...o,"Do not explore the codebase beyond what the current task requires.","Do not refactor, improve, or modify code outside this task's scope.","Do not add features, tests, or documentation not specified in the spec.","If you need to read files to understand context, timebox it \u2014 then write code.","The deliverable is working code, not a plan or analysis.","Complete the task, then report progress. The user handles git.",`When you receive a task from noskills next, do NOT execute it yourself. Spawn the noskills-executor sub-agent using the Agent tool. Pass it: the task title, description, acceptance criteria (with IDs), behavioral rules, out-of-scope constraints, concern reminders, and relevant file paths. When the sub-agent completes, review its results briefly, then report to noskills via \`${n(`next --answer='{"completed":[...],"remaining":[...],"blocked":[...]}'`)}\`. You are the orchestrator \u2014 the sub-agent is the implementer.`,"If the sub-agent fails, errors out, or returns no results, fall back to executing the task directly yourself. Report the sub-agent failure in your next status report so it can be investigated.","After the noskills-executor sub-agent completes a task, spawn a noskills-verifier sub-agent to independently verify the work. Pass it: the list of changed files, the acceptance criteria, and the test commands. The verifier reports PASS/FAIL per criterion with evidence. Use the verifier's report as your status report to noskills. Do NOT submit status reports based solely on the executor's self-report.",`After spawning sub-agents, ALWAYS present a dispatch table showing the FULL pipeline \u2014 not just executors, but also verification and test steps:
2
+
3
+ | Step | Agent | Files | Tasks | Est. Time |
4
+ |------|-------|-------|-------|-----------|
5
+ | 1. Implement | noskills-executor | purge.ts | Tasks 1-6 | ~3 min |
6
+ | 2. Verify | noskills-verifier | purge.ts (read-only) | Validate ACs | ~1 min |
7
+ | 3. Write tests | noskills-executor | purge.test.ts | Task 7 | ~2 min |
8
+
9
+ When agents complete, update with actual time and status (Done / Failed / Found N issues). The user should see the complete plan upfront.
10
+
11
+ Estimate: S ~1min, M ~2min, L ~5min, XL ~10min.`,"The agent that writes implementation code must NOT write tests for that code. Spawn a SEPARATE sub-agent for test writing. This prevents the implementer from writing tests that only confirm what it already knows. The test writer reads the code fresh and tests what it actually does, not what the implementer intended.","When deciding how to split work across sub-agents: if all tasks touch the same file or tightly coupled files, batch them into one executor. If tasks touch independent files or modules, spawn parallel executors. Always err toward smaller, focused sub-agents over large batched ones \u2014 fresh context per task is better than accumulated context across tasks.",`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: \`${n('rule add "<description>"')}\`. If just this task, note it and move on. Never write to \`.eser/rules/\` directly.`];e.execution.lastVerification?.passed===!1&&h.push("Tests are failing. Fix ONLY the failing tests. Do not refactor passing code.");let r={rules:h,tone:"Direct. No preamble. Start coding immediately.",outOfScope:u.length>0?u:void 0};return c?{...r,urgency:`You have been in this session for ${e.execution.iteration}+ iterations. Your context is degrading. Finish the current task and recommend the user start a fresh session. Do not start new tasks.`}:r}case"BLOCKED":return{rules:[...o,"Present the decision to the user exactly as described.","Do not suggest a preferred option unless the user asks for your opinion.","After the user decides, relay the answer immediately. Do not elaborate."],tone:"Brief. The user is making a decision, not having a discussion."};case"COMPLETED":return{rules:[...o,"Report the completion summary. Do not start new work.","If the user wants to continue, they start a new spec."],tone:"Concise. Celebrate briefly, then stop."};default:return{rules:[...o,`Run \`${n("next")}\` to get your instructions.`,"Do not take action without noskills guidance."],tone:"Neutral. Waiting for direction."}}},$=5*60*1e3,F=(e,s)=>{let t;switch(e.phase){case"IDLE":t=`No active spec. Start one with: \`${n("spec new")}\``;break;case"DISCOVERY":t=`Discovery in progress for "${e.spec}". ${e.discovery.answers.length} questions answered so far.`;break;case"DISCOVERY_REVIEW":t=`Discovery answers ready for review. ${e.discovery.answers.length} answers collected. Waiting for user confirmation.`;break;case"SPEC_DRAFT":t=`Spec draft ready for review at ${e.specState.path}. Waiting for approval.`;break;case"SPEC_APPROVED":t=`Spec "${e.spec}" is approved. Waiting to start execution.`;break;case"EXECUTING":t=e.execution.lastProgress!==null?`Executing "${e.spec}", iteration ${e.execution.iteration}. Last progress: ${e.execution.lastProgress}. Continue with the current task.`:`Executing "${e.spec}", iteration ${e.execution.iteration}. Start the first task.`;break;case"BLOCKED":t=`Execution blocked: ${e.execution.lastProgress}. Ask the user to resolve.`;break;case"COMPLETED":t=`Spec "${e.spec}" completed in ${e.execution.iteration} iterations.`;break;default:t=`Run \`${n("next")}\` to get started.`}return{protocol:`Run \`${n('next --answer="..."')}\` to submit results and advance`,spec:e.spec,branch:e.branch,iteration:e.execution.iteration,lastProgress:e.execution.lastProgress,activeConcerns:s.map(a=>a.id),resumeHint:t}},B=e=>{if(e.lastCalledAt===null)return{what:"noskills orchestrates your work: IDLE \u2192 DISCOVERY \u2192 DISCOVERY_REVIEW \u2192 SPEC_DRAFT \u2192 SPEC_APPROVED \u2192 EXECUTING \u2192 COMPLETED",how:`Run \`${n("next")}\` for instructions. Submit results with \`${n('next --answer="..."')}\`. Never make architectural decisions without asking.`,currentPhase:e.phase};let s=new Date(e.lastCalledAt).getTime();if(Date.now()-s>$)return{what:"noskills orchestrates your work: IDLE \u2192 DISCOVERY \u2192 DISCOVERY_REVIEW \u2192 SPEC_DRAFT \u2192 SPEC_APPROVED \u2192 EXECUTING \u2192 COMPLETED",how:`Run \`${n("next")}\` for instructions. Submit results with \`${n('next --answer="..."')}\`. Never make architectural decisions without asking.`,currentPhase:e.phase}},ee=(e,s,t,a,c,p,i)=>{let g=F(e,s),l=a?.maxIterationsBeforeRestart??15,o=a?.allowGit??!1,u=U(e,l,o,c),h=B(e),r;switch(e.phase){case"IDLE":r=q(s,D,t.length,i);break;case"DISCOVERY":r=M(e,s,t);break;case"DISCOVERY_REVIEW":r=V(e,s);break;case"SPEC_DRAFT":r=Q(e);break;case"SPEC_APPROVED":r=j(e);break;case"EXECUTING":r=H(e,s,t,l,c,p);break;case"BLOCKED":r=K(e);break;case"COMPLETED":r=z(e);break;default:r=q(s,D,t.length,i)}let d={...r,meta:g,behavioral:u};h!==void 0&&(d={...d,protocolGuide:h});let y=Y(e,s,i);if(y.length>0){let E=y.map(({label:w,description:C})=>({label:w,description:C})),v={};for(let w of y)v[w.label]=w.command;d={...d,interactiveOptions:E,commandMap:v}}return d},Y=(e,s,t)=>{switch(e.phase){case"IDLE":{let a=[],p=(t?.existingSpecs??[]).filter(i=>i.phase!=="COMPLETED");s.length===0&&a.push({label:"Add concerns (Recommended)",description:"Shape how discovery and specs work by adding project concerns",command:n("concern add <id> [<id2> ...]")}),a.push({label:"Start a new spec",description:"Begin discovery questions for a new feature",command:n('spec new "description"')});for(let i of p.slice(0,2))a.push({label:`Continue: ${i.name} (${i.phase})`,description:i.detail??`Iteration ${i.iteration}`,command:n(`spec switch ${i.name}`)});return s.length>0&&a.push({label:"Edit concerns",description:`Currently: ${s.map(i=>i.id).join(", ")}`,command:n("concern list")}),a.slice(0,4)}case"DISCOVERY_REVIEW":return[{label:"Approve all answers",description:"Answers look correct \u2014 generate the spec",command:n('next --answer="approve"')},{label:"Revise answers",description:"Correct one or more discovery answers",command:n(`next --answer='{"revise":{...}}'`)}];case"SPEC_DRAFT":return[{label:"Approve spec",description:"Review looks good \u2014 approve and move to execution",command:n("approve")},{label:"Refine spec",description:"Submit refinements to improve tasks or sections",command:n(`next --answer='{"refinement":"..."}'`)},{label:"Start over",description:"Reset the spec and start fresh",command:n("reset")}];case"SPEC_APPROVED":return[{label:"Start execution",description:"Begin implementing the tasks",command:n('next --answer="start"')},{label:"Not yet",description:'Save for later \u2014 resume with noskills next --answer="start"',command:""}];case"EXECUTING":return[];case"BLOCKED":return[{label:"Resolve block",description:"Provide a resolution to unblock execution",command:n('next --answer="resolution"')},{label:"Reset spec",description:"Abandon this spec and start over",command:n("reset")}];case"COMPLETED":return[{label:"New spec",description:"Start a new feature spec",command:n('spec new "description"')},{label:"Reopen spec",description:"Reopen this spec for revision",command:n("reopen")},{label:"Check status",description:"Review completed spec summary",command:n("status")}];default:return[]}},W="noskills is a state-machine orchestrator that acts as a scrum master for both you and your agent \u2014 keeping work focused, decisions in your hands, and tokens efficient.",q=(e,s,t,a)=>({phase:"IDLE",instruction:"Present the welcome dashboard and interactive options to the user. Show existing specs if any, then present choices. IMPORTANT: Present ALL available concerns to the user \u2014 never truncate the list. Split across multiple AskUserQuestion calls if needed.",welcome:W,existingSpecs:a?.existingSpecs??[],availableConcerns:s.map(c=>({id:c.id,description:c.description})),activeConcerns:e.map(c=>c.id),activeRulesCount:a?.rulesCount??t,hint:e.length===0?"No concerns active. Consider adding concerns first \u2014 they shape discovery questions and specs.":void 0}),M=(e,s,t)=>{let a=S(s),c=e.discovery.answers.length,p=P(e.discovery.answers),i=e.discovery.audience==="agent";if(p)return{phase:"DISCOVERY",instruction:`All discovery questions answered. Run: \`${n("approve")}\``,questions:[],answeredCount:c,context:{rules:t,concernReminders:[]},transition:{onComplete:n("approve")}};if(i){let o=e.discovery.currentQuestion,u=a[o];if(u===void 0)return{phase:"DISCOVERY",instruction:`All discovery questions answered. Run: \`${n("approve")}\``,questions:[],answeredCount:c,context:{rules:t,concernReminders:[]},transition:{onComplete:n("approve")}};let h={id:u.id,text:u.text,concerns:[...u.concerns],extras:u.extras.map(r=>r.text)};return{phase:"DISCOVERY",instruction:`Ask this question to the user using AskUserQuestion. Submit the answer with: \`${n('next --agent --answer="<answer>"')}\``,questions:[h],answeredCount:c,currentQuestion:o,totalQuestions:a.length,context:{rules:t,concernReminders:x(s)},transition:{onComplete:`${n('next --agent --answer="<answer>"')}`}}}let g=new Set(e.discovery.answers.map(o=>o.questionId));return{phase:"DISCOVERY",instruction:"Conduct a thorough discovery conversation. FIRST: perform a pre-discovery codebase scan (README, CLAUDE.md, recent git log, TODOs, directory structure) and present a brief audit summary. THEN: challenge the user's spec description against your findings. THEN: ask the discovery questions one at a time, offering concrete options based on codebase knowledge. AFTER questions: present a dream state table (current \u2192 this spec \u2192 future), scored expansion proposals, architectural decisions, and an error/rescue map. FINALLY: present a complete discovery synthesis for user confirmation before submitting answers as a JSON object.",questions:a.filter(o=>!g.has(o.id)).map(o=>({id:o.id,text:o.text,concerns:[...o.concerns],extras:o.extras.map(u=>u.text)})),answeredCount:c,context:{rules:t,concernReminders:x(s)},transition:{onComplete:`${n(`next --answer='{"status_quo":"...","ambition":"...",...}'`)}`}}},V=(e,s)=>{let t=S(s);return{phase:"DISCOVERY_REVIEW",instruction:"Present ALL discovery answers to the user for review. The user must confirm or correct each answer before the spec can be generated. Use AskUserQuestion to ask for confirmation.",answers:e.discovery.answers.map(c=>{let p=t.find(i=>i.id===c.questionId);return{questionId:c.questionId,question:p?.text??c.questionId,answer:c.answer}}),transition:{onApprove:n('next --answer="approve"'),onRevise:n(`next --answer='{"revise":{"status_quo":"corrected answer"}}'`)}}},Q=e=>e.classification===null?{phase:"SPEC_DRAFT",instruction:"Before generating the spec, classify what this spec involves. Ask the user to select all that apply.",specPath:e.specState.path??"",transition:{onApprove:`${n(`next --answer='{"involvesWebUI":false,"involvesCLI":false,"involvesPublicAPI":false,"involvesMigration":false,"involvesDataHandling":false}'`)}`},classificationRequired:!0,classificationPrompt:{options:[{id:"involvesWebUI",label:"Web/Mobile UI \u2014 layouts, responsive design, visual components"},{id:"involvesCLI",label:"CLI/Terminal UI \u2014 spinners, progress bars, interactive prompts"},{id:"involvesPublicAPI",label:"Public API changes"},{id:"involvesMigration",label:"Data migration or schema changes"},{id:"involvesDataHandling",label:"Data handling or privacy"}],instruction:"Select all that apply. Submit as JSON: `"+n(`next --answer='{"involvesWebUI":true,"involvesCLI":false,"involvesPublicAPI":false,...}'`)+"`"}}:{phase:"SPEC_DRAFT",instruction:"Spec draft is ready for review. Ask the user to review and approve.",specPath:e.specState.path??"",transition:{onApprove:n("approve")}},j=e=>({phase:"SPEC_APPROVED",instruction:"Spec is approved and ready. When the user is ready to start, begin execution.",specPath:e.specState.path??"",transition:{onStart:`${n('next --answer="start"')}`}}),G=(e,s)=>{if(s===null)return!1;let t=e.toLowerCase();return t.includes("mobile")||t.includes("layout")||t.includes("interaction design")?s.involvesWebUI:t.includes("ui state")||t.includes("skeleton ui")?s.involvesWebUI||s.involvesCLI:t.includes("api doc")||t.includes("public api")?s.involvesPublicAPI:t.includes("migration")||t.includes("backward compat")||t.includes("deprecat")?s.involvesMigration:t.includes("audit trail")||t.includes("access control")||t.includes("data handling")||t.includes("data retention")?s.involvesDataHandling:!0},X=(e,s,t,a,c,p,i,g)=>{let l=[],o=new Set(g??[]),u=0,h=()=>`ac-${++u}`;if(a!==null)for(let r of a.items)o.has(r.id)||l.push({id:r.id,text:`[DEBT from iteration ${r.since}] ${r.text}`});if(s&&l.push({id:h(),text:`[FAILED] Tests \u2014 fix this first: ${t.slice(0,200)}`}),p!=null)for(let r of p.verification){let d=h();o.has(d)||l.push({id:d,text:r})}for(let r of e)if(r.acceptanceCriteria!==void 0&&r.acceptanceCriteria.length>0)for(let d of r.acceptanceCriteria){if(!G(d,c))continue;let y=h();o.has(y)||l.push({id:y,text:`(${r.id}) ${d}`})}if(i!==void 0)for(let r of i){let d=h();o.has(d)||l.push({id:d,text:`(folder: ${r.folder}) ${r.rule}`})}return l},H=(e,s,t,a,c,p)=>{let i=O(s),g=e.execution.iteration>=a,l=e.execution.lastVerification?.passed===!1,o=e.execution.lastVerification?.output??"",u=c?.tasks??[],h=e.execution.completedTasks??[],r=new Set(h),d=u.find(m=>!r.has(m.id))??null,y=d!==null?{id:d.id,title:d.title,totalTasks:u.length,completedTasks:h.length}:void 0;if(e.execution.awaitingStatusReport){let m=X(s,l,o,e.execution.debt,e.classification,c,p,e.execution.naItems),k={phase:"EXECUTING",instruction:"Before this task is accepted, report your completion status against these acceptance criteria.",context:{rules:t,concernReminders:x(s)},transition:{onComplete:`${n(`next --answer='{"completed":[...],"remaining":[...],"blocked":[...]}'`)}`,onBlocked:`${n('block "reason"')}`,iteration:e.execution.iteration},statusReportRequired:!0,statusReport:{criteria:m,reportFormat:{completed:"list item IDs you finished (e.g., ['debt-1', 'ac-3']) with evidence",remaining:"list item IDs not yet done",blocked:"list item IDs that need a decision from the user",na:"(optional) list item IDs that are not applicable to this task \u2014 they will be removed from future criteria",newIssues:"(optional) list NEW issues discovered during implementation \u2014 free text, will be assigned debt IDs automatically"}}};return l&&(k={...k,verificationFailed:!0,verificationOutput:o.slice(0,2e3)}),k}let E=(e.execution.lastProgress??"").includes("Task not accepted"),v=e.execution.debt?.items??[],w=e.execution.debt?.unaddressedIterations??0,C=y!==void 0?`Execute task ${y.id}: ${y.title} (${y.completedTasks}/${y.totalTasks} completed)`:"All tasks completed. Run `"+n("done")+"` to finish.",I;if(l)I="Verification FAILED. Fix the failing tests before continuing.";else if(E&&v.length>0){let m=w>=3?` These items have been outstanding for ${w} iterations.`:"";I=`Task not accepted \u2014 ${v.length} remaining item(s) must be addressed before this task can be completed.${m} Address them, then submit a new status report.`}else I=C;let f={phase:"EXECUTING",instruction:I,task:y,context:{rules:t,concernReminders:x(s)},transition:{onComplete:`${n('next --answer="..."')}`,onBlocked:`${n('block "reason"')}`,iteration:e.execution.iteration}};if(E&&v.length>0&&(f={...f,taskRejected:!0,rejectionReason:`${v.length} remaining item(s) must be addressed.`,rejectionRemaining:v.map(m=>m.text)}),e.execution.debt!==null&&e.execution.debt.items.length>0){let m=e.execution.debt.unaddressedIterations??0,k=m>=3?`URGENT: These items have been unaddressed for ${m} iterations. Address them IMMEDIATELY before any new work.`:"These were not completed in a previous iteration. Address them BEFORE starting new work.";f={...f,previousIterationDebt:{fromIteration:e.execution.debt.fromIteration,items:e.execution.debt.items,note:k}}}if(l){let m=o.slice(0,2e3);f={...f,verificationFailed:!0,verificationOutput:m}}i.length>0&&(f={...f,concernTensions:i}),g&&(f={...f,restartRecommended:!0,restartInstruction:`Context may be getting large after ${e.execution.iteration} iterations. Consider starting a new conversation and running \`${n("next")}\` to resume - your progress is saved.`});let b=[...e.decisions].reverse().find(m=>!m.promoted);return b!==void 0&&e.execution.lastProgress?.startsWith("Resolved:")&&(f={...f,promotePrompt:{decisionId:b.id,question:b.question,choice:b.choice,prompt:`You just resolved a decision: "${b.choice}". Ask the user: "Should this be a permanent rule for future specs too?" If yes, run: \`${n(`rule add "${b.choice}"`)}\``}}),f},K=e=>({phase:"BLOCKED",instruction:"A decision is needed. Ask the user.",reason:e.execution.lastProgress??"Unknown",transition:{onResolved:`${n('next --answer="..."')}`}}),z=e=>({phase:"COMPLETED",summary:{spec:e.spec,iterations:e.execution.iteration,decisionsCount:e.decisions.length,completionReason:e.completionReason,completionNote:e.completionNote}});export{T as a,S as b,P as c,ee as d};
@@ -1 +1 @@
1
- import{b as A}from"./chunk-2WH262CW.js";import{b as $,c as b}from"./chunk-YK6UG66R.js";import{m as k,n as y,o as x,p as P}from"./chunk-EMHZF6ZY.js";import{c as d,d as c,f as u,g as C,o as m,q as w,r as g}from"./chunk-Y6AFIAJP.js";import{a as l,b as p}from"./chunk-2N4GTHXQ.js";import{b as v}from"./chunk-MNEZ5QGX.js";import"./chunk-DHMCIRLT.js";import"./chunk-4BH6CF3J.js";import"./chunk-OTRBRRIO.js";var q=async s=>{let e=s?.[0];if(e==="add")return await I(s?.slice(1));if(e==="remove")return await M(s?.slice(1));if(e==="list")return await R();let r=$(),n=m({renderer:g.ansi(),sink:w.stdout()});return n.writeln(`Usage: ${r} concern <add <id> | remove <id> | list>`),await n.close(),l(void 0)},I=async s=>{let e=m({renderer:g.ansi(),sink:w.stdout()}),r=v.process.cwd(),n=(s??[]).filter(i=>!i.startsWith("-")),t=await k(r);if(n.length===0)return e.writeln(u("Please provide concern ID(s): "),d(b("concern add open-source beautiful-product"))),await e.close(),p({exitCode:1});if(t===null)return e.writeln(u("noskills not initialized.")),await e.close(),p({exitCode:1});let a=await A(),o=[];for(let i of n){let f=await x(r,i);if(f===null&&(f=a.find(h=>h.id===i)??null,f!==null&&await P(r,f)),f===null){e.writeln(u(`Unknown concern: ${i}`)),e.writeln(c(` Available: ${a.map(h=>h.id).join(", ")}`));continue}if(t.concerns.includes(i)||o.includes(i)){e.writeln(c(`Concern "${i}" is already active.`));continue}o.push(i)}if(o.length>0){let i={...t,concerns:[...t.concerns,...o]};await y(r,i),e.writeln(C("\u2714"),` Activated concerns: ${o.join(", ")}`)}return await e.close(),l(void 0)},M=async s=>{let e=m({renderer:g.ansi(),sink:w.stdout()}),r=v.process.cwd(),n=s?.[0],t=await k(r);if(n===void 0||n.length===0)return e.writeln(u("Please provide a concern ID: "),d(b("concern remove move-fast"))),await e.close(),p({exitCode:1});if(t===null)return e.writeln(u("noskills not initialized.")),await e.close(),p({exitCode:1});if(!t.concerns.includes(n))return e.writeln(c(`Concern "${n}" is not active.`)),await e.close(),l(void 0);let a={...t,concerns:t.concerns.filter(o=>o!==n)};return await y(r,a),e.writeln(C("\u2714")," Deactivated concern: ",d(n)),await e.close(),l(void 0)},R=async()=>{let s=m({renderer:g.ansi(),sink:w.stdout()}),e=v.process.cwd(),r=await k(e),n=await A(),t=r?.concerns??[];if(s.writeln(d("Concerns")),s.writeln(""),n.length===0)s.writeln(c(" No concerns defined."));else for(let a of n){let o=t.includes(a.id);s.writeln(" ",o?C("\u25CF"):c("\u25CB")," ",o?d(a.id):c(a.id),c(` ${a.description.slice(0,60)}...`))}return await s.close(),l(void 0)};export{q as main};
1
+ import{b as A}from"./chunk-2WH262CW.js";import{b as $,c as b}from"./chunk-YK6UG66R.js";import{m as k,n as y,o as x,p as P}from"./chunk-RIME26D6.js";import{c as d,d as c,f as u,g as C,o as m,q as w,r as g}from"./chunk-Y6AFIAJP.js";import{a as l,b as p}from"./chunk-2N4GTHXQ.js";import{b as v}from"./chunk-MNEZ5QGX.js";import"./chunk-DHMCIRLT.js";import"./chunk-4BH6CF3J.js";import"./chunk-OTRBRRIO.js";var q=async s=>{let e=s?.[0];if(e==="add")return await I(s?.slice(1));if(e==="remove")return await M(s?.slice(1));if(e==="list")return await R();let r=$(),n=m({renderer:g.ansi(),sink:w.stdout()});return n.writeln(`Usage: ${r} concern <add <id> | remove <id> | list>`),await n.close(),l(void 0)},I=async s=>{let e=m({renderer:g.ansi(),sink:w.stdout()}),r=v.process.cwd(),n=(s??[]).filter(i=>!i.startsWith("-")),t=await k(r);if(n.length===0)return e.writeln(u("Please provide concern ID(s): "),d(b("concern add open-source beautiful-product"))),await e.close(),p({exitCode:1});if(t===null)return e.writeln(u("noskills not initialized.")),await e.close(),p({exitCode:1});let a=await A(),o=[];for(let i of n){let f=await x(r,i);if(f===null&&(f=a.find(h=>h.id===i)??null,f!==null&&await P(r,f)),f===null){e.writeln(u(`Unknown concern: ${i}`)),e.writeln(c(` Available: ${a.map(h=>h.id).join(", ")}`));continue}if(t.concerns.includes(i)||o.includes(i)){e.writeln(c(`Concern "${i}" is already active.`));continue}o.push(i)}if(o.length>0){let i={...t,concerns:[...t.concerns,...o]};await y(r,i),e.writeln(C("\u2714"),` Activated concerns: ${o.join(", ")}`)}return await e.close(),l(void 0)},M=async s=>{let e=m({renderer:g.ansi(),sink:w.stdout()}),r=v.process.cwd(),n=s?.[0],t=await k(r);if(n===void 0||n.length===0)return e.writeln(u("Please provide a concern ID: "),d(b("concern remove move-fast"))),await e.close(),p({exitCode:1});if(t===null)return e.writeln(u("noskills not initialized.")),await e.close(),p({exitCode:1});if(!t.concerns.includes(n))return e.writeln(c(`Concern "${n}" is not active.`)),await e.close(),l(void 0);let a={...t,concerns:t.concerns.filter(o=>o!==n)};return await y(r,a),e.writeln(C("\u2714")," Deactivated concern: ",d(n)),await e.close(),l(void 0)},R=async()=>{let s=m({renderer:g.ansi(),sink:w.stdout()}),e=v.process.cwd(),r=await k(e),n=await A(),t=r?.concerns??[];if(s.writeln(d("Concerns")),s.writeln(""),n.length===0)s.writeln(c(" No concerns defined."));else for(let a of n){let o=t.includes(a.id);s.writeln(" ",o?C("\u25CF"):c("\u25CB")," ",o?d(a.id):c(a.id),c(` ${a.description.slice(0,60)}...`))}return await s.close(),l(void 0)};export{q as main};
@@ -0,0 +1 @@
1
+ import{a as E,d as y}from"./chunk-CIYGCZTM.js";import{c as $}from"./chunk-YK6UG66R.js";import{k as C}from"./chunk-M7KSO4EF.js";import{d as f,f as h,g,h as S}from"./chunk-RIME26D6.js";import{c as p,d as i,f as c,g as m,o as d,q as w,r as u}from"./chunk-Y6AFIAJP.js";import{a as l,b as o}from"./chunk-2N4GTHXQ.js";import{b as a}from"./chunk-MNEZ5QGX.js";import"./chunk-DHMCIRLT.js";import"./chunk-4BH6CF3J.js";import"./chunk-OTRBRRIO.js";var G=async k=>{let e=d({renderer:u.ansi(),sink:w.stdout()}),s=a.process.cwd(),D=g(k),t=await h(s,D);if(t.phase!=="EXECUTING")return e.writeln(c(`Cannot complete in phase: ${t.phase}`)),e.writeln(i("Only EXECUTING phase can transition to COMPLETED.")),await e.close(),o({exitCode:1});if(t.spec!==null){let n=`${s}/${f.specDir(t.spec)}`;try{await a.fs.stat(n)}catch{return e.writeln(c(`Active spec '${t.spec}' directory not found.`)),e.writeln(i("Run `noskills reset` to return to IDLE.")),await e.close(),o({exitCode:1})}}let r=C(t,"done");if(await S(s,r),r.spec!==null&&(await E(s,r.spec,"completed"),await y(s,r.spec,"completed")),e.writeln(m("\u2714")," Spec completed!"),e.writeln(""),e.writeln(" Spec: ",p(t.spec??"unknown")),e.writeln(` Iterations: ${t.execution.iteration}`),e.writeln(` Decisions: ${t.decisions.length}`),t.decisions.length>0){let n=t.decisions.filter(U=>U.promoted);n.length>0&&e.writeln(i(` Promoted to rules: ${n.length}`))}return e.writeln(""),e.writeln("Start a new spec with: ",p(`${$('spec new "..."')}`)),await e.close(),l(void 0)};export{G as main};
@@ -1 +1 @@
1
- import{a as T,b as J,e as B,f as N,g as q,h as G,i as U,j as h,k as r,l as y}from"./chunk-73EEM3FY.js";import{a as se,b as ie,c as ne}from"./chunk-VK7L5SMS.js";import{d as Z}from"./chunk-4XOSXARZ.js";import{b as I}from"./chunk-2WH262CW.js";import{a as ee,b as te}from"./chunk-XADY6SXR.js";import{d as oe}from"./chunk-TJZAIUKM.js";import{a as X,c as A,d as Y}from"./chunk-YK6UG66R.js";import{a as W,b as z,h as _,n as H,p as K,r as V,t as Q}from"./chunk-EMHZF6ZY.js";import"./chunk-AGPCY6XP.js";import{a as k}from"./chunk-ERX4HONR.js";import"./chunk-Y6AFIAJP.js";import"./chunk-5MN3MWQN.js";import"./chunk-OLM5RTFK.js";import{a as F}from"./chunk-ALZM4JXG.js";import{a as S}from"./chunk-2N4GTHXQ.js";import"./chunk-BBKSV2RO.js";import{b as g}from"./chunk-MNEZ5QGX.js";import"./chunk-DHMCIRLT.js";import"./chunk-4BH6CF3J.js";import"./chunk-OTRBRRIO.js";var me=new F({description:"AI provider interface \u2014 ask questions, generate content",modules:{ask:{description:"Send a prompt to an AI provider",load:()=>import("./ask-F4XM2EEC.js")},list:{description:"List available AI providers",load:()=>import("./list-3RK7TPGG.js")}}});var re=k;var ye=async t=>{try{return await g.fs.stat(t),!0}catch{return!1}},we=[{id:"claude-code",paths:["CLAUDE.md",".claude"]},{id:"cursor",paths:[".cursorrules",".cursor"]},{id:"kiro",paths:[".kiro"]},{id:"copilot",paths:[".github/copilot-instructions.md"]},{id:"windsurf",paths:[".windsurfrules"]}],ae=async t=>{let e=[];for(let i of we)for(let o of i.paths)if(await ye(`${t}/${o}`)){e.push(i.id);break}return e};var a=async t=>{try{return await g.fs.stat(t),!0}catch{return!1}},le=async(t,e)=>{try{let i=await g.fs.readTextFile(t);return JSON.parse(i)[e]??null}catch{return null}},ve=async t=>{let e=[];return(await a(`${t}/package.json`)||await a(`${t}/deno.json`))&&e.push("typescript"),await a(`${t}/go.mod`)&&e.push("go"),await a(`${t}/Cargo.toml`)&&e.push("rust"),(await a(`${t}/pyproject.toml`)||await a(`${t}/setup.py`))&&e.push("python"),e},Ce=async t=>{let e=[],i=await le(`${t}/package.json`,"dependencies");return i!==null&&("react"in i&&e.push("react"),"vue"in i&&e.push("vue"),"svelte"in i&&e.push("svelte"),"next"in i&&e.push("nextjs"),"express"in i&&e.push("express"),"hono"in i&&e.push("hono")),e},xe=async t=>{let e=[];return await a(`${t}/.github/workflows`)&&e.push("github-actions"),await a(`${t}/.gitlab-ci.yml`)&&e.push("gitlab-ci"),await a(`${t}/Jenkinsfile`)&&e.push("jenkins"),await a(`${t}/.circleci`)&&e.push("circleci"),e},Pe=async t=>{if(await a(`${t}/deno.json`))return"deno";let e=await le(`${t}/package.json`,"devDependencies");if(e!==null){if("vitest"in e)return"vitest";if("jest"in e)return"jest";if("playwright"in e)return"playwright"}return null},ce=async t=>{let[e,i,o,d]=await Promise.all([ve(t),Ce(t),xe(t),Pe(t)]);return{languages:e,frameworks:i,ci:o,testRunner:d}};var Bt=async t=>{let e=g.process.cwd(),i=ie(t),o=J({target:i==="agent"?"non-interactive":"interactive"}),d=ne(t),w=de(d,"--concerns"),m=de(d,"--tools"),p=d.includes("--non-interactive")||i==="agent";if(await Q(e))return r.warn(o,"noskills is already initialized in this project."),r.info(o,`Run \`${A("sync")}\` to regenerate tool files.`),S(void 0);N(o,"noskills init");let D=y(o,"Scanning project...");D.start();let f=await ce(e);D.succeed("Project scanned");for(let s of f.languages)r.step(o,` ${s}`);for(let s of f.frameworks)r.step(o,` ${s}`);for(let s of f.ci)r.step(o,` ${s}`);f.testRunner!==null&&r.step(o,` test runner: ${f.testRunner}`),h(o);let R=y(o,"Detecting coding tools...");R.start();let $=await ae(e),b=se(),M=b!==null&&!$.includes(b)?[b]:[],v=[...new Set([...M,...$])];R.succeed(`${v.length} coding tool(s) detected`);for(let s of v){let n=s===b?" (current)":"";r.step(o,` ${s}${n}`)}let u;if(m!==null){let s=["claude-code","cursor","kiro","copilot","windsurf"],n=m.filter(c=>s.includes(c));u=[...new Set([...M,...n])]}else p?u=[...v]:(h(o),u=await Be(o,v,b));h(o);let E=y(o,"Detecting AI providers...");E.start();let C=(await re()).filter(s=>s.available).map(s=>s.name);E.succeed(`${C.length} provider(s) detected`),h(o);let x=await I(),l;if(w!==null){let s=x.map(n=>n.id);l=w.filter(n=>s.includes(n)).sort((n,c)=>s.indexOf(n)-s.indexOf(c))}else if(p)l=[];else{let s=x.map(c=>({value:c.id,label:c.name,hint:c.description.slice(0,60)})),n=await B(o,{message:"What kind of project is this? (space to toggle, enter to confirm)",options:s});l=T(n)?[]:[...n]}l.length>0?r.success(o,` Concerns: ${l.join(", ")}`):r.info(o,"No concerns selected. Add later with `concern add <id> [<id2> ...]`."),h(o);let j=y(o,"Initializing...");j.start(),await V(e);let pe=x.filter(s=>l.includes(s.id));for(let s of pe)await K(e,s);let L=await Y();X(L);let P={...z(l,u,C,f),command:L};await H(e,P);let O=W();if(await _(e,O),j.succeed("Scaffolded `.eser/`"),u.length>0){let s=y(o,"Syncing tool files...");s.start();let n=await te(e,u,P);s.succeed(`Synced ${n.length} tool(s)`)}else r.warn(o,"No tools selected. noskills will work in agentless CLI mode only."),r.info(o,"Add tools later with `noskills sync`.");if(q(o,`Done. ${u.length} tool(s), ${C.length} provider(s), ${l.length} concern(s).`),i==="agent"){let n=(await I()).filter(ge=>l.includes(ge.id)),c=await ee(e),ue=Z(O,n,c,P);await oe(ue,"json")}else G(o),U(o,`Start a spec with: ${A('spec new "..."')}`);return S(void 0)},Te=[{value:"claude-code",label:"Claude Code"},{value:"cursor",label:"Cursor"},{value:"kiro",label:"Kiro"},{value:"copilot",label:"GitHub Copilot"},{value:"windsurf",label:"Windsurf"}],Be=async(t,e,i)=>{let o=e.length===0?"No coding tools detected. Which tools do you use? (space to toggle)":"Any additional tools? (space to toggle, enter to skip)",d=new Set(e),w=await B(t,{message:o,options:Te.map(p=>({...p,hint:p.value===i?"you're running inside it":d.has(p.value)?"detected":void 0,disabled:p.value===i})),initialValues:[...e],required:!1});if(T(w))return[...e];let m=[...w];return i!==null&&!m.includes(i)&&m.unshift(i),m},de=(t,e)=>{if(t===void 0)return null;for(let i of t)if(i.startsWith(`${e}=`))return i.slice(e.length+1).split(",").map(o=>o.trim()).filter(Boolean);return null};export{Bt as main};
1
+ import{a as T,b as J,e as B,f as N,g as q,h as G,i as U,j as h,k as r,l as y}from"./chunk-73EEM3FY.js";import{a as se,b as ie,c as ne}from"./chunk-VK7L5SMS.js";import{d as Z}from"./chunk-U2T4X5EN.js";import{b as I}from"./chunk-2WH262CW.js";import{a as ee,b as te}from"./chunk-KDWUWWE5.js";import{d as oe}from"./chunk-TJZAIUKM.js";import{a as X,c as A,d as Y}from"./chunk-YK6UG66R.js";import{a as W,b as z,h as _,n as H,p as K,r as V,t as Q}from"./chunk-RIME26D6.js";import"./chunk-AGPCY6XP.js";import{a as k}from"./chunk-ERX4HONR.js";import"./chunk-Y6AFIAJP.js";import"./chunk-5MN3MWQN.js";import"./chunk-OLM5RTFK.js";import{a as F}from"./chunk-ALZM4JXG.js";import{a as S}from"./chunk-2N4GTHXQ.js";import"./chunk-BBKSV2RO.js";import{b as g}from"./chunk-MNEZ5QGX.js";import"./chunk-DHMCIRLT.js";import"./chunk-4BH6CF3J.js";import"./chunk-OTRBRRIO.js";var me=new F({description:"AI provider interface \u2014 ask questions, generate content",modules:{ask:{description:"Send a prompt to an AI provider",load:()=>import("./ask-F4XM2EEC.js")},list:{description:"List available AI providers",load:()=>import("./list-3RK7TPGG.js")}}});var re=k;var ye=async t=>{try{return await g.fs.stat(t),!0}catch{return!1}},we=[{id:"claude-code",paths:["CLAUDE.md",".claude"]},{id:"cursor",paths:[".cursorrules",".cursor"]},{id:"kiro",paths:[".kiro"]},{id:"copilot",paths:[".github/copilot-instructions.md"]},{id:"windsurf",paths:[".windsurfrules"]}],ae=async t=>{let e=[];for(let i of we)for(let o of i.paths)if(await ye(`${t}/${o}`)){e.push(i.id);break}return e};var a=async t=>{try{return await g.fs.stat(t),!0}catch{return!1}},le=async(t,e)=>{try{let i=await g.fs.readTextFile(t);return JSON.parse(i)[e]??null}catch{return null}},ve=async t=>{let e=[];return(await a(`${t}/package.json`)||await a(`${t}/deno.json`))&&e.push("typescript"),await a(`${t}/go.mod`)&&e.push("go"),await a(`${t}/Cargo.toml`)&&e.push("rust"),(await a(`${t}/pyproject.toml`)||await a(`${t}/setup.py`))&&e.push("python"),e},Ce=async t=>{let e=[],i=await le(`${t}/package.json`,"dependencies");return i!==null&&("react"in i&&e.push("react"),"vue"in i&&e.push("vue"),"svelte"in i&&e.push("svelte"),"next"in i&&e.push("nextjs"),"express"in i&&e.push("express"),"hono"in i&&e.push("hono")),e},xe=async t=>{let e=[];return await a(`${t}/.github/workflows`)&&e.push("github-actions"),await a(`${t}/.gitlab-ci.yml`)&&e.push("gitlab-ci"),await a(`${t}/Jenkinsfile`)&&e.push("jenkins"),await a(`${t}/.circleci`)&&e.push("circleci"),e},Pe=async t=>{if(await a(`${t}/deno.json`))return"deno";let e=await le(`${t}/package.json`,"devDependencies");if(e!==null){if("vitest"in e)return"vitest";if("jest"in e)return"jest";if("playwright"in e)return"playwright"}return null},ce=async t=>{let[e,i,o,d]=await Promise.all([ve(t),Ce(t),xe(t),Pe(t)]);return{languages:e,frameworks:i,ci:o,testRunner:d}};var Bt=async t=>{let e=g.process.cwd(),i=ie(t),o=J({target:i==="agent"?"non-interactive":"interactive"}),d=ne(t),w=de(d,"--concerns"),m=de(d,"--tools"),p=d.includes("--non-interactive")||i==="agent";if(await Q(e))return r.warn(o,"noskills is already initialized in this project."),r.info(o,`Run \`${A("sync")}\` to regenerate tool files.`),S(void 0);N(o,"noskills init");let D=y(o,"Scanning project...");D.start();let f=await ce(e);D.succeed("Project scanned");for(let s of f.languages)r.step(o,` ${s}`);for(let s of f.frameworks)r.step(o,` ${s}`);for(let s of f.ci)r.step(o,` ${s}`);f.testRunner!==null&&r.step(o,` test runner: ${f.testRunner}`),h(o);let R=y(o,"Detecting coding tools...");R.start();let $=await ae(e),b=se(),M=b!==null&&!$.includes(b)?[b]:[],v=[...new Set([...M,...$])];R.succeed(`${v.length} coding tool(s) detected`);for(let s of v){let n=s===b?" (current)":"";r.step(o,` ${s}${n}`)}let u;if(m!==null){let s=["claude-code","cursor","kiro","copilot","windsurf"],n=m.filter(c=>s.includes(c));u=[...new Set([...M,...n])]}else p?u=[...v]:(h(o),u=await Be(o,v,b));h(o);let E=y(o,"Detecting AI providers...");E.start();let C=(await re()).filter(s=>s.available).map(s=>s.name);E.succeed(`${C.length} provider(s) detected`),h(o);let x=await I(),l;if(w!==null){let s=x.map(n=>n.id);l=w.filter(n=>s.includes(n)).sort((n,c)=>s.indexOf(n)-s.indexOf(c))}else if(p)l=[];else{let s=x.map(c=>({value:c.id,label:c.name,hint:c.description.slice(0,60)})),n=await B(o,{message:"What kind of project is this? (space to toggle, enter to confirm)",options:s});l=T(n)?[]:[...n]}l.length>0?r.success(o,` Concerns: ${l.join(", ")}`):r.info(o,"No concerns selected. Add later with `concern add <id> [<id2> ...]`."),h(o);let j=y(o,"Initializing...");j.start(),await V(e);let pe=x.filter(s=>l.includes(s.id));for(let s of pe)await K(e,s);let L=await Y();X(L);let P={...z(l,u,C,f),command:L};await H(e,P);let O=W();if(await _(e,O),j.succeed("Scaffolded `.eser/`"),u.length>0){let s=y(o,"Syncing tool files...");s.start();let n=await te(e,u,P);s.succeed(`Synced ${n.length} tool(s)`)}else r.warn(o,"No tools selected. noskills will work in agentless CLI mode only."),r.info(o,"Add tools later with `noskills sync`.");if(q(o,`Done. ${u.length} tool(s), ${C.length} provider(s), ${l.length} concern(s).`),i==="agent"){let n=(await I()).filter(ge=>l.includes(ge.id)),c=await ee(e),ue=Z(O,n,c,P);await oe(ue,"json")}else G(o),U(o,`Start a spec with: ${A('spec new "..."')}`);return S(void 0)},Te=[{value:"claude-code",label:"Claude Code"},{value:"cursor",label:"Cursor"},{value:"kiro",label:"Kiro"},{value:"copilot",label:"GitHub Copilot"},{value:"windsurf",label:"Windsurf"}],Be=async(t,e,i)=>{let o=e.length===0?"No coding tools detected. Which tools do you use? (space to toggle)":"Any additional tools? (space to toggle, enter to skip)",d=new Set(e),w=await B(t,{message:o,options:Te.map(p=>({...p,hint:p.value===i?"you're running inside it":d.has(p.value)?"detected":void 0,disabled:p.value===i})),initialValues:[...e],required:!1});if(T(w))return[...e];let m=[...w];return i!==null&&!m.includes(i)&&m.unshift(i),m},de=(t,e)=>{if(t===void 0)return null;for(let i of t)if(i.startsWith(`${e}=`))return i.slice(e.length+1).split(",").map(o=>o.trim()).filter(Boolean);return null};export{Bt as main};