faf-cli 7.2.0 → 7.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,151 +1,151 @@
1
- import{createRequire as FZ}from"node:module";var IZ=Object.defineProperty;var R=($,Z)=>()=>(Z||$((Z={exports:{}}).exports,Z),Z.exports);var DZ=($)=>$;function RZ($,Z){this[$]=DZ.bind(null,Z)}var MZ=($,Z)=>{for(var X in Z)IZ($,X,{get:Z[X],enumerable:!0,configurable:!0,set:RZ.bind(Z,X)})};var p0=FZ(import.meta.url);var b=R((mZ)=>{var K1=Symbol.for("yaml.alias"),U9=Symbol.for("yaml.document"),K$=Symbol.for("yaml.map"),z9=Symbol.for("yaml.pair"),A1=Symbol.for("yaml.scalar"),A$=Symbol.for("yaml.seq"),r=Symbol.for("yaml.node.type"),yZ=($)=>!!$&&typeof $==="object"&&$[r]===K1,fZ=($)=>!!$&&typeof $==="object"&&$[r]===U9,hZ=($)=>!!$&&typeof $==="object"&&$[r]===K$,xZ=($)=>!!$&&typeof $==="object"&&$[r]===z9,Q9=($)=>!!$&&typeof $==="object"&&$[r]===A1,uZ=($)=>!!$&&typeof $==="object"&&$[r]===A$;function J9($){if($&&typeof $==="object")switch($[r]){case K$:case A$:return!0}return!1}function kZ($){if($&&typeof $==="object")switch($[r]){case K1:case K$:case A1:case A$:return!0}return!1}var vZ=($)=>(Q9($)||J9($))&&!!$.anchor;mZ.ALIAS=K1;mZ.DOC=U9;mZ.MAP=K$;mZ.NODE_TYPE=r;mZ.PAIR=z9;mZ.SCALAR=A1;mZ.SEQ=A$;mZ.hasAnchor=vZ;mZ.isAlias=yZ;mZ.isCollection=J9;mZ.isDocument=fZ;mZ.isMap=hZ;mZ.isNode=kZ;mZ.isPair=xZ;mZ.isScalar=Q9;mZ.isSeq=uZ});var s0=R((z6)=>{var y=b(),u=Symbol("break visit"),H9=Symbol("skip children"),i=Symbol("remove node");function N$($,Z){let X=q9(Z);if(y.isDocument($)){if(K0(null,$.contents,X,Object.freeze([$]))===i)$.contents=null}else K0(null,$,X,Object.freeze([]))}N$.BREAK=u;N$.SKIP=H9;N$.REMOVE=i;function K0($,Z,X,U){let z=G9($,Z,X,U);if(y.isNode(z)||y.isPair(z))return _9($,U,z),K0($,z,X,U);if(typeof z!=="symbol"){if(y.isCollection(Z)){U=Object.freeze(U.concat(Z));for(let Q=0;Q<Z.items.length;++Q){let J=K0(Q,Z.items[Q],X,U);if(typeof J==="number")Q=J-1;else if(J===u)return u;else if(J===i)Z.items.splice(Q,1),Q-=1}}else if(y.isPair(Z)){U=Object.freeze(U.concat(Z));let Q=K0("key",Z.key,X,U);if(Q===u)return u;else if(Q===i)Z.key=null;let J=K0("value",Z.value,X,U);if(J===u)return u;else if(J===i)Z.value=null}}return z}async function w$($,Z){let X=q9(Z);if(y.isDocument($)){if(await A0(null,$.contents,X,Object.freeze([$]))===i)$.contents=null}else await A0(null,$,X,Object.freeze([]))}w$.BREAK=u;w$.SKIP=H9;w$.REMOVE=i;async function A0($,Z,X,U){let z=await G9($,Z,X,U);if(y.isNode(z)||y.isPair(z))return _9($,U,z),A0($,z,X,U);if(typeof z!=="symbol"){if(y.isCollection(Z)){U=Object.freeze(U.concat(Z));for(let Q=0;Q<Z.items.length;++Q){let J=await A0(Q,Z.items[Q],X,U);if(typeof J==="number")Q=J-1;else if(J===u)return u;else if(J===i)Z.items.splice(Q,1),Q-=1}}else if(y.isPair(Z)){U=Object.freeze(U.concat(Z));let Q=await A0("key",Z.key,X,U);if(Q===u)return u;else if(Q===i)Z.key=null;let J=await A0("value",Z.value,X,U);if(J===u)return u;else if(J===i)Z.value=null}}return z}function q9($){if(typeof $==="object"&&($.Collection||$.Node||$.Value))return Object.assign({Alias:$.Node,Map:$.Node,Scalar:$.Node,Seq:$.Node},$.Value&&{Map:$.Value,Scalar:$.Value,Seq:$.Value},$.Collection&&{Map:$.Collection,Seq:$.Collection},$);return $}function G9($,Z,X,U){if(typeof X==="function")return X($,Z,U);if(y.isMap(Z))return X.Map?.($,Z,U);if(y.isSeq(Z))return X.Seq?.($,Z,U);if(y.isPair(Z))return X.Pair?.($,Z,U);if(y.isScalar(Z))return X.Scalar?.($,Z,U);if(y.isAlias(Z))return X.Alias?.($,Z,U);return}function _9($,Z,X){let U=Z[Z.length-1];if(y.isCollection(U))U.items[$]=X;else if(y.isPair(U))if($==="key")U.key=X;else U.value=X;else if(y.isDocument(U))U.contents=X;else{let z=y.isAlias(U)?"alias":"scalar";throw Error(`Cannot replace node with ${z} parent`)}}z6.visit=N$;z6.visitAsync=w$});var N1=R((_6)=>{var Y9=b(),H6=s0(),q6={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},G6=($)=>$.replace(/[!,[\]{}]/g,(Z)=>q6[Z]);class k{constructor($,Z){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},k.defaultYaml,$),this.tags=Object.assign({},k.defaultTags,Z)}clone(){let $=new k(this.yaml,this.tags);return $.docStart=this.docStart,$}atDocument(){let $=new k(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:k.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},k.defaultTags);break}return $}add($,Z){if(this.atNextDocument)this.yaml={explicit:k.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},k.defaultTags),this.atNextDocument=!1;let X=$.trim().split(/[ \t]+/),U=X.shift();switch(U){case"%TAG":{if(X.length!==2){if(Z(0,"%TAG directive should contain exactly two parts"),X.length<2)return!1}let[z,Q]=X;return this.tags[z]=Q,!0}case"%YAML":{if(this.yaml.explicit=!0,X.length!==1)return Z(0,"%YAML directive should contain exactly one part"),!1;let[z]=X;if(z==="1.1"||z==="1.2")return this.yaml.version=z,!0;else{let Q=/^\d+\.\d+$/.test(z);return Z(6,`Unsupported YAML version ${z}`,Q),!1}}default:return Z(0,`Unknown directive ${U}`,!0),!1}}tagName($,Z){if($==="!")return"!";if($[0]!=="!")return Z(`Not a valid tag: ${$}`),null;if($[1]==="<"){let Q=$.slice(2,-1);if(Q==="!"||Q==="!!")return Z(`Verbatim tags aren't resolved, so ${$} is invalid.`),null;if($[$.length-1]!==">")Z("Verbatim tags must end with a >");return Q}let[,X,U]=$.match(/^(.*!)([^!]*)$/s);if(!U)Z(`The ${$} tag has no suffix`);let z=this.tags[X];if(z)try{return z+decodeURIComponent(U)}catch(Q){return Z(String(Q)),null}if(X==="!")return $;return Z(`Could not resolve tag: ${$}`),null}tagString($){for(let[Z,X]of Object.entries(this.tags))if($.startsWith(X))return Z+G6($.substring(X.length));return $[0]==="!"?$:`!<${$}>`}toString($){let Z=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],X=Object.entries(this.tags),U;if($&&X.length>0&&Y9.isNode($.contents)){let z={};H6.visit($.contents,(Q,J)=>{if(Y9.isNode(J)&&J.tag)z[J.tag]=!0}),U=Object.keys(z)}else U=[];for(let[z,Q]of X){if(z==="!!"&&Q==="tag:yaml.org,2002:")continue;if(!$||U.some((J)=>J.startsWith(Q)))Z.push(`%TAG ${z} ${Q}`)}return Z.join(`
2
- `)}}k.defaultYaml={explicit:!1,version:"1.2"};k.defaultTags={"!!":"tag:yaml.org,2002:"};_6.Directives=k});var b$=R((W6)=>{var B9=b(),B6=s0();function V6($){if(/[\x00-\x19\s,[\]{}]/.test($)){let X=`Anchor must not contain whitespace or control characters: ${JSON.stringify($)}`;throw Error(X)}return!0}function V9($){let Z=new Set;return B6.visit($,{Value(X,U){if(U.anchor)Z.add(U.anchor)}}),Z}function O9($,Z){for(let X=1;;++X){let U=`${$}${X}`;if(!Z.has(U))return U}}function O6($,Z){let X=[],U=new Map,z=null;return{onAnchor:(Q)=>{X.push(Q),z??(z=V9($));let J=O9(Z,z);return z.add(J),J},setAnchors:()=>{for(let Q of X){let J=U.get(Q);if(typeof J==="object"&&J.anchor&&(B9.isScalar(J.node)||B9.isCollection(J.node)))J.node.anchor=J.anchor;else{let H=Error("Failed to resolve repeated object (this should not happen)");throw H.source=Q,H}}},sourceObjects:U}}W6.anchorIsValid=V6;W6.anchorNames=V9;W6.createNodeAnchors=O6;W6.findNewAnchor=O9});var w1=R((M6)=>{function a0($,Z,X,U){if(U&&typeof U==="object")if(Array.isArray(U))for(let z=0,Q=U.length;z<Q;++z){let J=U[z],H=a0($,U,String(z),J);if(H===void 0)delete U[z];else if(H!==J)U[z]=H}else if(U instanceof Map)for(let z of Array.from(U.keys())){let Q=U.get(z),J=a0($,U,z,Q);if(J===void 0)U.delete(z);else if(J!==Q)U.set(z,J)}else if(U instanceof Set)for(let z of Array.from(U)){let Q=a0($,U,z,z);if(Q===void 0)U.delete(z);else if(Q!==z)U.delete(z),U.add(Q)}else for(let[z,Q]of Object.entries(U)){let J=a0($,U,z,Q);if(J===void 0)delete U[z];else if(J!==Q)U[z]=J}return $.call(Z,X,U)}M6.applyReviver=a0});var $0=R((T6)=>{var P6=b();function W9($,Z,X){if(Array.isArray($))return $.map((U,z)=>W9(U,String(z),X));if($&&typeof $.toJSON==="function"){if(!X||!P6.hasAnchor($))return $.toJSON(Z,X);let U={aliasCount:0,count:1,res:void 0};X.anchors.set($,U),X.onCreate=(Q)=>{U.res=Q,delete X.onCreate};let z=$.toJSON(Z,X);if(X.onCreate)X.onCreate(z);return z}if(typeof $==="bigint"&&!X?.keep)return Number($);return $}T6.toJS=W9});var C$=R((w6)=>{var A6=w1(),L9=b(),N6=$0();class I9{constructor($){Object.defineProperty(this,L9.NODE_TYPE,{value:$})}clone(){let $=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));if(this.range)$.range=this.range.slice();return $}toJS($,{mapAsMap:Z,maxAliasCount:X,onAnchor:U,reviver:z}={}){if(!L9.isDocument($))throw TypeError("A document argument is required");let Q={anchors:new Map,doc:$,keep:!0,mapAsMap:Z===!0,mapKeyWarned:!1,maxAliasCount:typeof X==="number"?X:100},J=N6.toJS(this,"",Q);if(typeof U==="function")for(let{count:H,res:q}of Q.anchors.values())U(q,H);return typeof z==="function"?A6.applyReviver(z,{"":J},"",J):J}}w6.NodeBase=I9});var r0=R((g6)=>{var C6=b$(),j6=s0(),N0=b(),S6=C$(),E6=$0();class D9 extends S6.NodeBase{constructor($){super(N0.ALIAS);this.source=$,Object.defineProperty(this,"tag",{set(){throw Error("Alias nodes cannot have tags")}})}resolve($,Z){let X;if(Z?.aliasResolveCache)X=Z.aliasResolveCache;else if(X=[],j6.visit($,{Node:(z,Q)=>{if(N0.isAlias(Q)||N0.hasAnchor(Q))X.push(Q)}}),Z)Z.aliasResolveCache=X;let U=void 0;for(let z of X){if(z===this)break;if(z.anchor===this.source)U=z}return U}toJSON($,Z){if(!Z)return{source:this.source};let{anchors:X,doc:U,maxAliasCount:z}=Z,Q=this.resolve(U,Z);if(!Q){let H=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw ReferenceError(H)}let J=X.get(Q);if(!J)E6.toJS(Q,null,Z),J=X.get(Q);if(J?.res===void 0)throw ReferenceError("This should not happen: Alias anchor was not resolved?");if(z>=0){if(J.count+=1,J.aliasCount===0)J.aliasCount=j$(U,Q,X);if(J.count*J.aliasCount>z)throw ReferenceError("Excessive alias count indicates a resource exhaustion attack")}return J.res}toString($,Z,X){let U=`*${this.source}`;if($){if(C6.anchorIsValid(this.source),$.options.verifyAliasOrder&&!$.anchors.has(this.source)){let z=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw Error(z)}if($.implicitKey)return`${U} `}return U}}function j$($,Z,X){if(N0.isAlias(Z)){let U=Z.resolve($),z=X&&U&&X.get(U);return z?z.count*z.aliasCount:0}else if(N0.isCollection(Z)){let U=0;for(let z of Z.items){let Q=j$($,z,X);if(Q>U)U=Q}return U}else if(N0.isPair(Z)){let U=j$($,Z.key,X),z=j$($,Z.value,X);return Math.max(U,z)}return 1}g6.Alias=D9});var g=R((k6)=>{var f6=b(),h6=C$(),x6=$0(),u6=($)=>!$||typeof $!=="function"&&typeof $!=="object";class Y0 extends h6.NodeBase{constructor($){super(f6.SCALAR);this.value=$}toJSON($,Z){return Z?.keep?this.value:x6.toJS(this.value,$,Z)}toString(){return String(this.value)}}Y0.BLOCK_FOLDED="BLOCK_FOLDED";Y0.BLOCK_LITERAL="BLOCK_LITERAL";Y0.PLAIN="PLAIN";Y0.QUOTE_DOUBLE="QUOTE_DOUBLE";Y0.QUOTE_SINGLE="QUOTE_SINGLE";k6.Scalar=Y0;k6.isScalarValue=u6});var n0=R((i6)=>{var p6=r0(),B0=b(),R9=g(),l6="tag:yaml.org,2002:";function d6($,Z,X){if(Z){let U=X.filter((Q)=>Q.tag===Z),z=U.find((Q)=>!Q.format)??U[0];if(!z)throw Error(`Tag ${Z} not found`);return z}return X.find((U)=>U.identify?.($)&&!U.format)}function c6($,Z,X){if(B0.isDocument($))$=$.contents;if(B0.isNode($))return $;if(B0.isPair($)){let _=X.schema[B0.MAP].createNode?.(X.schema,null,X);return _.items.push($),_}if($ instanceof String||$ instanceof Number||$ instanceof Boolean||typeof BigInt<"u"&&$ instanceof BigInt)$=$.valueOf();let{aliasDuplicateObjects:U,onAnchor:z,onTagObj:Q,schema:J,sourceObjects:H}=X,q=void 0;if(U&&$&&typeof $==="object")if(q=H.get($),q)return q.anchor??(q.anchor=z($)),new p6.Alias(q.anchor);else q={anchor:null,node:null},H.set($,q);if(Z?.startsWith("!!"))Z=l6+Z.slice(2);let G=d6($,Z,J.tags);if(!G){if($&&typeof $.toJSON==="function")$=$.toJSON();if(!$||typeof $!=="object"){let _=new R9.Scalar($);if(q)q.node=_;return _}G=$ instanceof Map?J[B0.MAP]:(Symbol.iterator in Object($))?J[B0.SEQ]:J[B0.MAP]}if(Q)Q(G),delete X.onTagObj;let B=G?.createNode?G.createNode(X.schema,$,X):typeof G?.nodeClass?.from==="function"?G.nodeClass.from(X.schema,$,X):new R9.Scalar($);if(Z)B.tag=Z;else if(!G.default)B.tag=G.tag;if(q)q.node=B;return B}i6.createNode=c6});var S$=R((n6)=>{var a6=n0(),s=b(),r6=C$();function b1($,Z,X){let U=X;for(let z=Z.length-1;z>=0;--z){let Q=Z[z];if(typeof Q==="number"&&Number.isInteger(Q)&&Q>=0){let J=[];J[Q]=U,U=J}else U=new Map([[Q,U]])}return a6.createNode(U,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw Error("This should not happen, please report a bug.")},schema:$,sourceObjects:new Map})}var M9=($)=>$==null||typeof $==="object"&&!!$[Symbol.iterator]().next().done;class F9 extends r6.NodeBase{constructor($,Z){super($);Object.defineProperty(this,"schema",{value:Z,configurable:!0,enumerable:!1,writable:!0})}clone($){let Z=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));if($)Z.schema=$;if(Z.items=Z.items.map((X)=>s.isNode(X)||s.isPair(X)?X.clone($):X),this.range)Z.range=this.range.slice();return Z}addIn($,Z){if(M9($))this.add(Z);else{let[X,...U]=$,z=this.get(X,!0);if(s.isCollection(z))z.addIn(U,Z);else if(z===void 0&&this.schema)this.set(X,b1(this.schema,U,Z));else throw Error(`Expected YAML collection at ${X}. Remaining path: ${U}`)}}deleteIn($){let[Z,...X]=$;if(X.length===0)return this.delete(Z);let U=this.get(Z,!0);if(s.isCollection(U))return U.deleteIn(X);else throw Error(`Expected YAML collection at ${Z}. Remaining path: ${X}`)}getIn($,Z){let[X,...U]=$,z=this.get(X,!0);if(U.length===0)return!Z&&s.isScalar(z)?z.value:z;else return s.isCollection(z)?z.getIn(U,Z):void 0}hasAllNullValues($){return this.items.every((Z)=>{if(!s.isPair(Z))return!1;let X=Z.value;return X==null||$&&s.isScalar(X)&&X.value==null&&!X.commentBefore&&!X.comment&&!X.tag})}hasIn($){let[Z,...X]=$;if(X.length===0)return this.has(Z);let U=this.get(Z,!0);return s.isCollection(U)?U.hasIn(X):!1}setIn($,Z){let[X,...U]=$;if(U.length===0)this.set(X,Z);else{let z=this.get(X,!0);if(s.isCollection(z))z.setIn(U,Z);else if(z===void 0&&this.schema)this.set(X,b1(this.schema,U,Z));else throw Error(`Expected YAML collection at ${X}. Remaining path: ${U}`)}}}n6.Collection=F9;n6.collectionFromPath=b1;n6.isEmptyPath=M9});var o0=R((X4)=>{var $4=($)=>$.replace(/^(?!$)(?: $)?/gm,"#");function C1($,Z){if(/^\n+$/.test($))return $.substring(1);return Z?$.replace(/^(?! *$)/gm,Z):$}var Z4=($,Z,X)=>$.endsWith(`
3
- `)?C1(X,Z):X.includes(`
1
+ import{createRequire as C6}from"node:module";var A6=Object.defineProperty;var D=($,Z)=>()=>(Z||$((Z={exports:{}}).exports,Z),Z.exports);var N6=($)=>$;function w6($,Z){this[$]=N6.bind(null,Z)}var b6=($,Z)=>{for(var z in Z)A6($,z,{get:Z[z],enumerable:!0,configurable:!0,set:w6.bind(Z,z)})};var p0=C6(import.meta.url);var b=D((r6)=>{var w1=Symbol.for("yaml.alias"),H3=Symbol.for("yaml.document"),T$=Symbol.for("yaml.map"),G3=Symbol.for("yaml.pair"),b1=Symbol.for("yaml.scalar"),A$=Symbol.for("yaml.seq"),r=Symbol.for("yaml.node.type"),p6=($)=>!!$&&typeof $==="object"&&$[r]===w1,l6=($)=>!!$&&typeof $==="object"&&$[r]===H3,d6=($)=>!!$&&typeof $==="object"&&$[r]===T$,c6=($)=>!!$&&typeof $==="object"&&$[r]===G3,_3=($)=>!!$&&typeof $==="object"&&$[r]===b1,i6=($)=>!!$&&typeof $==="object"&&$[r]===A$;function Y3($){if($&&typeof $==="object")switch($[r]){case T$:case A$:return!0}return!1}function s6($){if($&&typeof $==="object")switch($[r]){case w1:case T$:case b1:case A$:return!0}return!1}var a6=($)=>(_3($)||Y3($))&&!!$.anchor;r6.ALIAS=w1;r6.DOC=H3;r6.MAP=T$;r6.NODE_TYPE=r;r6.PAIR=G3;r6.SCALAR=b1;r6.SEQ=A$;r6.hasAnchor=a6;r6.isAlias=p6;r6.isCollection=Y3;r6.isDocument=l6;r6.isMap=d6;r6.isNode=s6;r6.isPair=c6;r6.isScalar=_3;r6.isSeq=i6});var s0=D((BZ)=>{var f=b(),u=Symbol("break visit"),q3=Symbol("skip children"),i=Symbol("remove node");function N$($,Z){let z=B3(Z);if(f.isDocument($)){if(T0(null,$.contents,z,Object.freeze([$]))===i)$.contents=null}else T0(null,$,z,Object.freeze([]))}N$.BREAK=u;N$.SKIP=q3;N$.REMOVE=i;function T0($,Z,z,X){let U=V3($,Z,z,X);if(f.isNode(U)||f.isPair(U))return O3($,X,U),T0($,U,z,X);if(typeof U!=="symbol"){if(f.isCollection(Z)){X=Object.freeze(X.concat(Z));for(let Q=0;Q<Z.items.length;++Q){let J=T0(Q,Z.items[Q],z,X);if(typeof J==="number")Q=J-1;else if(J===u)return u;else if(J===i)Z.items.splice(Q,1),Q-=1}}else if(f.isPair(Z)){X=Object.freeze(X.concat(Z));let Q=T0("key",Z.key,z,X);if(Q===u)return u;else if(Q===i)Z.key=null;let J=T0("value",Z.value,z,X);if(J===u)return u;else if(J===i)Z.value=null}}return U}async function w$($,Z){let z=B3(Z);if(f.isDocument($)){if(await A0(null,$.contents,z,Object.freeze([$]))===i)$.contents=null}else await A0(null,$,z,Object.freeze([]))}w$.BREAK=u;w$.SKIP=q3;w$.REMOVE=i;async function A0($,Z,z,X){let U=await V3($,Z,z,X);if(f.isNode(U)||f.isPair(U))return O3($,X,U),A0($,U,z,X);if(typeof U!=="symbol"){if(f.isCollection(Z)){X=Object.freeze(X.concat(Z));for(let Q=0;Q<Z.items.length;++Q){let J=await A0(Q,Z.items[Q],z,X);if(typeof J==="number")Q=J-1;else if(J===u)return u;else if(J===i)Z.items.splice(Q,1),Q-=1}}else if(f.isPair(Z)){X=Object.freeze(X.concat(Z));let Q=await A0("key",Z.key,z,X);if(Q===u)return u;else if(Q===i)Z.key=null;let J=await A0("value",Z.value,z,X);if(J===u)return u;else if(J===i)Z.value=null}}return U}function B3($){if(typeof $==="object"&&($.Collection||$.Node||$.Value))return Object.assign({Alias:$.Node,Map:$.Node,Scalar:$.Node,Seq:$.Node},$.Value&&{Map:$.Value,Scalar:$.Value,Seq:$.Value},$.Collection&&{Map:$.Collection,Seq:$.Collection},$);return $}function V3($,Z,z,X){if(typeof z==="function")return z($,Z,X);if(f.isMap(Z))return z.Map?.($,Z,X);if(f.isSeq(Z))return z.Seq?.($,Z,X);if(f.isPair(Z))return z.Pair?.($,Z,X);if(f.isScalar(Z))return z.Scalar?.($,Z,X);if(f.isAlias(Z))return z.Alias?.($,Z,X);return}function O3($,Z,z){let X=Z[Z.length-1];if(f.isCollection(X))X.items[$]=z;else if(f.isPair(X))if($==="key")X.key=z;else X.value=z;else if(f.isDocument(X))X.contents=z;else{let U=f.isAlias(X)?"alias":"scalar";throw Error(`Cannot replace node with ${U} parent`)}}BZ.visit=N$;BZ.visitAsync=w$});var C1=D((DZ)=>{var W3=b(),WZ=s0(),IZ={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},LZ=($)=>$.replace(/[!,[\]{}]/g,(Z)=>IZ[Z]);class k{constructor($,Z){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},k.defaultYaml,$),this.tags=Object.assign({},k.defaultTags,Z)}clone(){let $=new k(this.yaml,this.tags);return $.docStart=this.docStart,$}atDocument(){let $=new k(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:k.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},k.defaultTags);break}return $}add($,Z){if(this.atNextDocument)this.yaml={explicit:k.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},k.defaultTags),this.atNextDocument=!1;let z=$.trim().split(/[ \t]+/),X=z.shift();switch(X){case"%TAG":{if(z.length!==2){if(Z(0,"%TAG directive should contain exactly two parts"),z.length<2)return!1}let[U,Q]=z;return this.tags[U]=Q,!0}case"%YAML":{if(this.yaml.explicit=!0,z.length!==1)return Z(0,"%YAML directive should contain exactly one part"),!1;let[U]=z;if(U==="1.1"||U==="1.2")return this.yaml.version=U,!0;else{let Q=/^\d+\.\d+$/.test(U);return Z(6,`Unsupported YAML version ${U}`,Q),!1}}default:return Z(0,`Unknown directive ${X}`,!0),!1}}tagName($,Z){if($==="!")return"!";if($[0]!=="!")return Z(`Not a valid tag: ${$}`),null;if($[1]==="<"){let Q=$.slice(2,-1);if(Q==="!"||Q==="!!")return Z(`Verbatim tags aren't resolved, so ${$} is invalid.`),null;if($[$.length-1]!==">")Z("Verbatim tags must end with a >");return Q}let[,z,X]=$.match(/^(.*!)([^!]*)$/s);if(!X)Z(`The ${$} tag has no suffix`);let U=this.tags[z];if(U)try{return U+decodeURIComponent(X)}catch(Q){return Z(String(Q)),null}if(z==="!")return $;return Z(`Could not resolve tag: ${$}`),null}tagString($){for(let[Z,z]of Object.entries(this.tags))if($.startsWith(z))return Z+LZ($.substring(z.length));return $[0]==="!"?$:`!<${$}>`}toString($){let Z=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],z=Object.entries(this.tags),X;if($&&z.length>0&&W3.isNode($.contents)){let U={};WZ.visit($.contents,(Q,J)=>{if(W3.isNode(J)&&J.tag)U[J.tag]=!0}),X=Object.keys(U)}else X=[];for(let[U,Q]of z){if(U==="!!"&&Q==="tag:yaml.org,2002:")continue;if(!$||X.some((J)=>J.startsWith(Q)))Z.push(`%TAG ${U} ${Q}`)}return Z.join(`
2
+ `)}}k.defaultYaml={explicit:!1,version:"1.2"};k.defaultTags={"!!":"tag:yaml.org,2002:"};DZ.Directives=k});var b$=D((PZ)=>{var I3=b(),FZ=s0();function MZ($){if(/[\x00-\x19\s,[\]{}]/.test($)){let z=`Anchor must not contain whitespace or control characters: ${JSON.stringify($)}`;throw Error(z)}return!0}function L3($){let Z=new Set;return FZ.visit($,{Value(z,X){if(X.anchor)Z.add(X.anchor)}}),Z}function D3($,Z){for(let z=1;;++z){let X=`${$}${z}`;if(!Z.has(X))return X}}function KZ($,Z){let z=[],X=new Map,U=null;return{onAnchor:(Q)=>{z.push(Q),U??(U=L3($));let J=D3(Z,U);return U.add(J),J},setAnchors:()=>{for(let Q of z){let J=X.get(Q);if(typeof J==="object"&&J.anchor&&(I3.isScalar(J.node)||I3.isCollection(J.node)))J.node.anchor=J.anchor;else{let H=Error("Failed to resolve repeated object (this should not happen)");throw H.source=Q,H}}},sourceObjects:X}}PZ.anchorIsValid=MZ;PZ.anchorNames=L3;PZ.createNodeAnchors=KZ;PZ.findNewAnchor=D3});var j1=D((bZ)=>{function a0($,Z,z,X){if(X&&typeof X==="object")if(Array.isArray(X))for(let U=0,Q=X.length;U<Q;++U){let J=X[U],H=a0($,X,String(U),J);if(H===void 0)delete X[U];else if(H!==J)X[U]=H}else if(X instanceof Map)for(let U of Array.from(X.keys())){let Q=X.get(U),J=a0($,X,U,Q);if(J===void 0)X.delete(U);else if(J!==Q)X.set(U,J)}else if(X instanceof Set)for(let U of Array.from(X)){let Q=a0($,X,U,U);if(Q===void 0)X.delete(U);else if(Q!==U)X.delete(U),X.add(Q)}else for(let[U,Q]of Object.entries(X)){let J=a0($,X,U,Q);if(J===void 0)delete X[U];else if(J!==Q)X[U]=J}return $.call(Z,z,X)}bZ.applyReviver=a0});var $0=D((SZ)=>{var jZ=b();function R3($,Z,z){if(Array.isArray($))return $.map((X,U)=>R3(X,String(U),z));if($&&typeof $.toJSON==="function"){if(!z||!jZ.hasAnchor($))return $.toJSON(Z,z);let X={aliasCount:0,count:1,res:void 0};z.anchors.set($,X),z.onCreate=(Q)=>{X.res=Q,delete z.onCreate};let U=$.toJSON(Z,z);if(z.onCreate)z.onCreate(U);return U}if(typeof $==="bigint"&&!z?.keep)return Number($);return $}SZ.toJS=R3});var C$=D((yZ)=>{var gZ=j1(),F3=b(),fZ=$0();class M3{constructor($){Object.defineProperty(this,F3.NODE_TYPE,{value:$})}clone(){let $=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));if(this.range)$.range=this.range.slice();return $}toJS($,{mapAsMap:Z,maxAliasCount:z,onAnchor:X,reviver:U}={}){if(!F3.isDocument($))throw TypeError("A document argument is required");let Q={anchors:new Map,doc:$,keep:!0,mapAsMap:Z===!0,mapKeyWarned:!1,maxAliasCount:typeof z==="number"?z:100},J=fZ.toJS(this,"",Q);if(typeof X==="function")for(let{count:H,res:G}of Q.anchors.values())X(G,H);return typeof U==="function"?gZ.applyReviver(U,{"":J},"",J):J}}yZ.NodeBase=M3});var r0=D((mZ)=>{var xZ=b$(),uZ=s0(),N0=b(),kZ=C$(),vZ=$0();class K3 extends kZ.NodeBase{constructor($){super(N0.ALIAS);this.source=$,Object.defineProperty(this,"tag",{set(){throw Error("Alias nodes cannot have tags")}})}resolve($,Z){let z;if(Z?.aliasResolveCache)z=Z.aliasResolveCache;else if(z=[],uZ.visit($,{Node:(U,Q)=>{if(N0.isAlias(Q)||N0.hasAnchor(Q))z.push(Q)}}),Z)Z.aliasResolveCache=z;let X=void 0;for(let U of z){if(U===this)break;if(U.anchor===this.source)X=U}return X}toJSON($,Z){if(!Z)return{source:this.source};let{anchors:z,doc:X,maxAliasCount:U}=Z,Q=this.resolve(X,Z);if(!Q){let H=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw ReferenceError(H)}let J=z.get(Q);if(!J)vZ.toJS(Q,null,Z),J=z.get(Q);if(J?.res===void 0)throw ReferenceError("This should not happen: Alias anchor was not resolved?");if(U>=0){if(J.count+=1,J.aliasCount===0)J.aliasCount=j$(X,Q,z);if(J.count*J.aliasCount>U)throw ReferenceError("Excessive alias count indicates a resource exhaustion attack")}return J.res}toString($,Z,z){let X=`*${this.source}`;if($){if(xZ.anchorIsValid(this.source),$.options.verifyAliasOrder&&!$.anchors.has(this.source)){let U=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw Error(U)}if($.implicitKey)return`${X} `}return X}}function j$($,Z,z){if(N0.isAlias(Z)){let X=Z.resolve($),U=z&&X&&z.get(X);return U?U.count*U.aliasCount:0}else if(N0.isCollection(Z)){let X=0;for(let U of Z.items){let Q=j$($,U,z);if(Q>X)X=Q}return X}else if(N0.isPair(Z)){let X=j$($,Z.key,z),U=j$($,Z.value,z);return Math.max(X,U)}return 1}mZ.Alias=K3});var g=D((sZ)=>{var lZ=b(),dZ=C$(),cZ=$0(),iZ=($)=>!$||typeof $!=="function"&&typeof $!=="object";class q0 extends dZ.NodeBase{constructor($){super(lZ.SCALAR);this.value=$}toJSON($,Z){return Z?.keep?this.value:cZ.toJS(this.value,$,Z)}toString(){return String(this.value)}}q0.BLOCK_FOLDED="BLOCK_FOLDED";q0.BLOCK_LITERAL="BLOCK_LITERAL";q0.PLAIN="PLAIN";q0.QUOTE_DOUBLE="QUOTE_DOUBLE";q0.QUOTE_SINGLE="QUOTE_SINGLE";sZ.Scalar=q0;sZ.isScalarValue=iZ});var n0=D(($4)=>{var nZ=r0(),B0=b(),P3=g(),oZ="tag:yaml.org,2002:";function tZ($,Z,z){if(Z){let X=z.filter((Q)=>Q.tag===Z),U=X.find((Q)=>!Q.format)??X[0];if(!U)throw Error(`Tag ${Z} not found`);return U}return z.find((X)=>X.identify?.($)&&!X.format)}function eZ($,Z,z){if(B0.isDocument($))$=$.contents;if(B0.isNode($))return $;if(B0.isPair($)){let Y=z.schema[B0.MAP].createNode?.(z.schema,null,z);return Y.items.push($),Y}if($ instanceof String||$ instanceof Number||$ instanceof Boolean||typeof BigInt<"u"&&$ instanceof BigInt)$=$.valueOf();let{aliasDuplicateObjects:X,onAnchor:U,onTagObj:Q,schema:J,sourceObjects:H}=z,G=void 0;if(X&&$&&typeof $==="object")if(G=H.get($),G)return G.anchor??(G.anchor=U($)),new nZ.Alias(G.anchor);else G={anchor:null,node:null},H.set($,G);if(Z?.startsWith("!!"))Z=oZ+Z.slice(2);let _=tZ($,Z,J.tags);if(!_){if($&&typeof $.toJSON==="function")$=$.toJSON();if(!$||typeof $!=="object"){let Y=new P3.Scalar($);if(G)G.node=Y;return Y}_=$ instanceof Map?J[B0.MAP]:(Symbol.iterator in Object($))?J[B0.SEQ]:J[B0.MAP]}if(Q)Q(_),delete z.onTagObj;let B=_?.createNode?_.createNode(z.schema,$,z):typeof _?.nodeClass?.from==="function"?_.nodeClass.from(z.schema,$,z):new P3.Scalar($);if(Z)B.tag=Z;else if(!_.default)B.tag=_.tag;if(G)G.node=B;return B}$4.createNode=eZ});var S$=D((U4)=>{var z4=n0(),s=b(),X4=C$();function S1($,Z,z){let X=z;for(let U=Z.length-1;U>=0;--U){let Q=Z[U];if(typeof Q==="number"&&Number.isInteger(Q)&&Q>=0){let J=[];J[Q]=X,X=J}else X=new Map([[Q,X]])}return z4.createNode(X,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw Error("This should not happen, please report a bug.")},schema:$,sourceObjects:new Map})}var T3=($)=>$==null||typeof $==="object"&&!!$[Symbol.iterator]().next().done;class A3 extends X4.NodeBase{constructor($,Z){super($);Object.defineProperty(this,"schema",{value:Z,configurable:!0,enumerable:!1,writable:!0})}clone($){let Z=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));if($)Z.schema=$;if(Z.items=Z.items.map((z)=>s.isNode(z)||s.isPair(z)?z.clone($):z),this.range)Z.range=this.range.slice();return Z}addIn($,Z){if(T3($))this.add(Z);else{let[z,...X]=$,U=this.get(z,!0);if(s.isCollection(U))U.addIn(X,Z);else if(U===void 0&&this.schema)this.set(z,S1(this.schema,X,Z));else throw Error(`Expected YAML collection at ${z}. Remaining path: ${X}`)}}deleteIn($){let[Z,...z]=$;if(z.length===0)return this.delete(Z);let X=this.get(Z,!0);if(s.isCollection(X))return X.deleteIn(z);else throw Error(`Expected YAML collection at ${Z}. Remaining path: ${z}`)}getIn($,Z){let[z,...X]=$,U=this.get(z,!0);if(X.length===0)return!Z&&s.isScalar(U)?U.value:U;else return s.isCollection(U)?U.getIn(X,Z):void 0}hasAllNullValues($){return this.items.every((Z)=>{if(!s.isPair(Z))return!1;let z=Z.value;return z==null||$&&s.isScalar(z)&&z.value==null&&!z.commentBefore&&!z.comment&&!z.tag})}hasIn($){let[Z,...z]=$;if(z.length===0)return this.has(Z);let X=this.get(Z,!0);return s.isCollection(X)?X.hasIn(z):!1}setIn($,Z){let[z,...X]=$;if(X.length===0)this.set(z,Z);else{let U=this.get(z,!0);if(s.isCollection(U))U.setIn(X,Z);else if(U===void 0&&this.schema)this.set(z,S1(this.schema,X,Z));else throw Error(`Expected YAML collection at ${z}. Remaining path: ${X}`)}}}U4.Collection=A3;U4.collectionFromPath=S1;U4.isEmptyPath=T3});var o0=D((Y4)=>{var G4=($)=>$.replace(/^(?!$)(?: $)?/gm,"#");function E1($,Z){if(/^\n+$/.test($))return $.substring(1);return Z?$.replace(/^(?! *$)/gm,Z):$}var _4=($,Z,z)=>$.endsWith(`
3
+ `)?E1(z,Z):z.includes(`
4
4
  `)?`
5
- `+C1(X,Z):($.endsWith(" ")?"":" ")+X;X4.indentComment=C1;X4.lineComment=Z4;X4.stringifyComment=$4});var T9=R((H4)=>{function J4($,Z,X="flow",{indentAtStart:U,lineWidth:z=80,minContentWidth:Q=20,onFold:J,onOverflow:H}={}){if(!z||z<0)return $;if(z<Q)Q=0;let q=Math.max(1+Q,1+z-Z.length);if($.length<=q)return $;let G=[],B={},_=z-Z.length;if(typeof U==="number")if(U>z-Math.max(2,Q))G.push(0);else _=z-U;let Y=void 0,O=void 0,L=!1,V=-1,W=-1,D=-1;if(X==="block"){if(V=P9($,V,Z.length),V!==-1)_=V+q}for(let T;T=$[V+=1];){if(X==="quoted"&&T==="\\"){switch(W=V,$[V+1]){case"x":V+=3;break;case"u":V+=5;break;case"U":V+=9;break;default:V+=1}D=V}if(T===`
6
- `){if(X==="block")V=P9($,V,Z.length);_=V+Z.length+q,Y=void 0}else{if(T===" "&&O&&O!==" "&&O!==`
7
- `&&O!=="\t"){let A=$[V+1];if(A&&A!==" "&&A!==`
8
- `&&A!=="\t")Y=V}if(V>=_)if(Y)G.push(Y),_=Y+q,Y=void 0;else if(X==="quoted"){while(O===" "||O==="\t")O=T,T=$[V+=1],L=!0;let A=V>D+1?V-2:W-1;if(B[A])return $;G.push(A),B[A]=!0,_=A+q,Y=void 0}else L=!0}O=T}if(L&&H)H();if(G.length===0)return $;if(J)J();let M=$.slice(0,G[0]);for(let T=0;T<G.length;++T){let A=G[T],K=G[T+1]||$.length;if(A===0)M=`
9
- ${Z}${$.slice(0,K)}`;else{if(X==="quoted"&&B[A])M+=`${$[A]}\\`;M+=`
10
- ${Z}${$.slice(A+1,K)}`}}return M}function P9($,Z,X){let U=Z,z=Z+1,Q=$[z];while(Q===" "||Q==="\t")if(Z<z+X)Q=$[++Z];else{do Q=$[++Z];while(Q&&Q!==`
11
- `);U=Z,z=Z+1,Q=$[z]}return U}H4.FOLD_BLOCK="block";H4.FOLD_FLOW="flow";H4.FOLD_QUOTED="quoted";H4.foldFlowLines=J4});var e0=R((W4)=>{var m=g(),Z0=T9(),g$=($,Z)=>({indentAtStart:Z?$.indent.length:$.indentAtStart,lineWidth:$.options.lineWidth,minContentWidth:$.options.minContentWidth}),y$=($)=>/^(%|---|\.\.\.)/m.test($);function B4($,Z,X){if(!Z||Z<0)return!1;let U=Z-X,z=$.length;if(z<=U)return!1;for(let Q=0,J=0;Q<z;++Q)if($[Q]===`
12
- `){if(Q-J>U)return!0;if(J=Q+1,z-J<=U)return!1}return!0}function t0($,Z){let X=JSON.stringify($);if(Z.options.doubleQuotedAsJSON)return X;let{implicitKey:U}=Z,z=Z.options.doubleQuotedMinMultiLineLength,Q=Z.indent||(y$($)?" ":""),J="",H=0;for(let q=0,G=X[q];G;G=X[++q]){if(G===" "&&X[q+1]==="\\"&&X[q+2]==="n")J+=X.slice(H,q)+"\\ ",q+=1,H=q,G="\\";if(G==="\\")switch(X[q+1]){case"u":{J+=X.slice(H,q);let B=X.substr(q+2,4);switch(B){case"0000":J+="\\0";break;case"0007":J+="\\a";break;case"000b":J+="\\v";break;case"001b":J+="\\e";break;case"0085":J+="\\N";break;case"00a0":J+="\\_";break;case"2028":J+="\\L";break;case"2029":J+="\\P";break;default:if(B.substr(0,2)==="00")J+="\\x"+B.substr(2);else J+=X.substr(q,6)}q+=5,H=q+1}break;case"n":if(U||X[q+2]==='"'||X.length<z)q+=1;else{J+=X.slice(H,q)+`
5
+ `+E1(z,Z):($.endsWith(" ")?"":" ")+z;Y4.indentComment=E1;Y4.lineComment=_4;Y4.stringifyComment=G4});var w3=D((W4)=>{function O4($,Z,z="flow",{indentAtStart:X,lineWidth:U=80,minContentWidth:Q=20,onFold:J,onOverflow:H}={}){if(!U||U<0)return $;if(U<Q)Q=0;let G=Math.max(1+Q,1+U-Z.length);if($.length<=G)return $;let _=[],B={},Y=U-Z.length;if(typeof X==="number")if(X>U-Math.max(2,Q))_.push(0);else Y=U-X;let q=void 0,W=void 0,I=!1,V=-1,O=-1,L=-1;if(z==="block"){if(V=N3($,V,Z.length),V!==-1)Y=V+G}for(let K;K=$[V+=1];){if(z==="quoted"&&K==="\\"){switch(O=V,$[V+1]){case"x":V+=3;break;case"u":V+=5;break;case"U":V+=9;break;default:V+=1}L=V}if(K===`
6
+ `){if(z==="block")V=N3($,V,Z.length);Y=V+Z.length+G,q=void 0}else{if(K===" "&&W&&W!==" "&&W!==`
7
+ `&&W!=="\t"){let N=$[V+1];if(N&&N!==" "&&N!==`
8
+ `&&N!=="\t")q=V}if(V>=Y)if(q)_.push(q),Y=q+G,q=void 0;else if(z==="quoted"){while(W===" "||W==="\t")W=K,K=$[V+=1],I=!0;let N=V>L+1?V-2:O-1;if(B[N])return $;_.push(N),B[N]=!0,Y=N+G,q=void 0}else I=!0}W=K}if(I&&H)H();if(_.length===0)return $;if(J)J();let R=$.slice(0,_[0]);for(let K=0;K<_.length;++K){let N=_[K],A=_[K+1]||$.length;if(N===0)R=`
9
+ ${Z}${$.slice(0,A)}`;else{if(z==="quoted"&&B[N])R+=`${$[N]}\\`;R+=`
10
+ ${Z}${$.slice(N+1,A)}`}}return R}function N3($,Z,z){let X=Z,U=Z+1,Q=$[U];while(Q===" "||Q==="\t")if(Z<U+z)Q=$[++Z];else{do Q=$[++Z];while(Q&&Q!==`
11
+ `);X=Z,U=Z+1,Q=$[U]}return X}W4.FOLD_BLOCK="block";W4.FOLD_FLOW="flow";W4.FOLD_QUOTED="quoted";W4.foldFlowLines=O4});var e0=D((P4)=>{var m=g(),Z0=w3(),g$=($,Z)=>({indentAtStart:Z?$.indent.length:$.indentAtStart,lineWidth:$.options.lineWidth,minContentWidth:$.options.minContentWidth}),f$=($)=>/^(%|---|\.\.\.)/m.test($);function F4($,Z,z){if(!Z||Z<0)return!1;let X=Z-z,U=$.length;if(U<=X)return!1;for(let Q=0,J=0;Q<U;++Q)if($[Q]===`
12
+ `){if(Q-J>X)return!0;if(J=Q+1,U-J<=X)return!1}return!0}function t0($,Z){let z=JSON.stringify($);if(Z.options.doubleQuotedAsJSON)return z;let{implicitKey:X}=Z,U=Z.options.doubleQuotedMinMultiLineLength,Q=Z.indent||(f$($)?" ":""),J="",H=0;for(let G=0,_=z[G];_;_=z[++G]){if(_===" "&&z[G+1]==="\\"&&z[G+2]==="n")J+=z.slice(H,G)+"\\ ",G+=1,H=G,_="\\";if(_==="\\")switch(z[G+1]){case"u":{J+=z.slice(H,G);let B=z.substr(G+2,4);switch(B){case"0000":J+="\\0";break;case"0007":J+="\\a";break;case"000b":J+="\\v";break;case"001b":J+="\\e";break;case"0085":J+="\\N";break;case"00a0":J+="\\_";break;case"2028":J+="\\L";break;case"2029":J+="\\P";break;default:if(B.substr(0,2)==="00")J+="\\x"+B.substr(2);else J+=z.substr(G,6)}G+=5,H=G+1}break;case"n":if(X||z[G+2]==='"'||z.length<U)G+=1;else{J+=z.slice(H,G)+`
13
13
 
14
- `;while(X[q+2]==="\\"&&X[q+3]==="n"&&X[q+4]!=='"')J+=`
15
- `,q+=2;if(J+=Q,X[q+2]===" ")J+="\\";q+=1,H=q+1}break;default:q+=1}}return J=H?J+X.slice(H):X,U?J:Z0.foldFlowLines(J,Q,Z0.FOLD_QUOTED,g$(Z,!1))}function j1($,Z){if(Z.options.singleQuote===!1||Z.implicitKey&&$.includes(`
16
- `)||/[ \t]\n|\n[ \t]/.test($))return t0($,Z);let X=Z.indent||(y$($)?" ":""),U="'"+$.replace(/'/g,"''").replace(/\n+/g,`$&
17
- ${X}`)+"'";return Z.implicitKey?U:Z0.foldFlowLines(U,X,Z0.FOLD_FLOW,g$(Z,!1))}function w0($,Z){let{singleQuote:X}=Z.options,U;if(X===!1)U=t0;else{let z=$.includes('"'),Q=$.includes("'");if(z&&!Q)U=j1;else if(Q&&!z)U=t0;else U=X?j1:t0}return U($,Z)}var S1;try{S1=new RegExp(`(^|(?<!
14
+ `;while(z[G+2]==="\\"&&z[G+3]==="n"&&z[G+4]!=='"')J+=`
15
+ `,G+=2;if(J+=Q,z[G+2]===" ")J+="\\";G+=1,H=G+1}break;default:G+=1}}return J=H?J+z.slice(H):z,X?J:Z0.foldFlowLines(J,Q,Z0.FOLD_QUOTED,g$(Z,!1))}function g1($,Z){if(Z.options.singleQuote===!1||Z.implicitKey&&$.includes(`
16
+ `)||/[ \t]\n|\n[ \t]/.test($))return t0($,Z);let z=Z.indent||(f$($)?" ":""),X="'"+$.replace(/'/g,"''").replace(/\n+/g,`$&
17
+ ${z}`)+"'";return Z.implicitKey?X:Z0.foldFlowLines(X,z,Z0.FOLD_FLOW,g$(Z,!1))}function w0($,Z){let{singleQuote:z}=Z.options,X;if(z===!1)X=t0;else{let U=$.includes('"'),Q=$.includes("'");if(U&&!Q)X=g1;else if(Q&&!U)X=t0;else X=z?g1:t0}return X($,Z)}var f1;try{f1=new RegExp(`(^|(?<!
18
18
  ))
19
19
  +(?!
20
- |$)`,"g")}catch{S1=/\n+(?!\n|$)/g}function E$({comment:$,type:Z,value:X},U,z,Q){let{blockQuote:J,commentString:H,lineWidth:q}=U.options;if(!J||/\n[\t ]+$/.test(X))return w0(X,U);let G=U.indent||(U.forceBlockIndent||y$(X)?" ":""),B=J==="literal"?!0:J==="folded"||Z===m.Scalar.BLOCK_FOLDED?!1:Z===m.Scalar.BLOCK_LITERAL?!0:!B4(X,q,G.length);if(!X)return B?`|
20
+ |$)`,"g")}catch{f1=/\n+(?!\n|$)/g}function E$({comment:$,type:Z,value:z},X,U,Q){let{blockQuote:J,commentString:H,lineWidth:G}=X.options;if(!J||/\n[\t ]+$/.test(z))return w0(z,X);let _=X.indent||(X.forceBlockIndent||f$(z)?" ":""),B=J==="literal"?!0:J==="folded"||Z===m.Scalar.BLOCK_FOLDED?!1:Z===m.Scalar.BLOCK_LITERAL?!0:!F4(z,G,_.length);if(!z)return B?`|
21
21
  `:`>
22
- `;let _,Y;for(Y=X.length;Y>0;--Y){let K=X[Y-1];if(K!==`
23
- `&&K!=="\t"&&K!==" ")break}let O=X.substring(Y),L=O.indexOf(`
24
- `);if(L===-1)_="-";else if(X===O||L!==O.length-1){if(_="+",Q)Q()}else _="";if(O){if(X=X.slice(0,-O.length),O[O.length-1]===`
25
- `)O=O.slice(0,-1);O=O.replace(S1,`$&${G}`)}let V=!1,W,D=-1;for(W=0;W<X.length;++W){let K=X[W];if(K===" ")V=!0;else if(K===`
26
- `)D=W;else break}let M=X.substring(0,D<W?D+1:W);if(M)X=X.substring(M.length),M=M.replace(/\n+/g,`$&${G}`);let A=(V?G?"2":"1":"")+_;if($){if(A+=" "+H($.replace(/ ?[\r\n]+/g," ")),z)z()}if(!B){let K=X.replace(/\n+/g,`
27
- $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${G}`),N=!1,C=g$(U,!0);if(J!=="folded"&&Z!==m.Scalar.BLOCK_FOLDED)C.onOverflow=()=>{N=!0};let I=Z0.foldFlowLines(`${M}${K}${O}`,G,Z0.FOLD_BLOCK,C);if(!N)return`>${A}
28
- ${G}${I}`}return X=X.replace(/\n+/g,`$&${G}`),`|${A}
29
- ${G}${M}${X}${O}`}function V4($,Z,X,U){let{type:z,value:Q}=$,{actualString:J,implicitKey:H,indent:q,indentStep:G,inFlow:B}=Z;if(H&&Q.includes(`
22
+ `;let Y,q;for(q=z.length;q>0;--q){let A=z[q-1];if(A!==`
23
+ `&&A!=="\t"&&A!==" ")break}let W=z.substring(q),I=W.indexOf(`
24
+ `);if(I===-1)Y="-";else if(z===W||I!==W.length-1){if(Y="+",Q)Q()}else Y="";if(W){if(z=z.slice(0,-W.length),W[W.length-1]===`
25
+ `)W=W.slice(0,-1);W=W.replace(f1,`$&${_}`)}let V=!1,O,L=-1;for(O=0;O<z.length;++O){let A=z[O];if(A===" ")V=!0;else if(A===`
26
+ `)L=O;else break}let R=z.substring(0,L<O?L+1:O);if(R)z=z.substring(R.length),R=R.replace(/\n+/g,`$&${_}`);let N=(V?_?"2":"1":"")+Y;if($){if(N+=" "+H($.replace(/ ?[\r\n]+/g," ")),U)U()}if(!B){let A=z.replace(/\n+/g,`
27
+ $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${_}`),w=!1,C=g$(X,!0);if(J!=="folded"&&Z!==m.Scalar.BLOCK_FOLDED)C.onOverflow=()=>{w=!0};let P=Z0.foldFlowLines(`${R}${A}${W}`,_,Z0.FOLD_BLOCK,C);if(!w)return`>${N}
28
+ ${_}${P}`}return z=z.replace(/\n+/g,`$&${_}`),`|${N}
29
+ ${_}${R}${z}${W}`}function M4($,Z,z,X){let{type:U,value:Q}=$,{actualString:J,implicitKey:H,indent:G,indentStep:_,inFlow:B}=Z;if(H&&Q.includes(`
30
30
  `)||B&&/[[\]{},]/.test(Q))return w0(Q,Z);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(Q))return H||B||!Q.includes(`
31
- `)?w0(Q,Z):E$($,Z,X,U);if(!H&&!B&&z!==m.Scalar.PLAIN&&Q.includes(`
32
- `))return E$($,Z,X,U);if(y$(Q)){if(q==="")return Z.forceBlockIndent=!0,E$($,Z,X,U);else if(H&&q===G)return w0(Q,Z)}let _=Q.replace(/\n+/g,`$&
33
- ${q}`);if(J){let Y=(V)=>V.default&&V.tag!=="tag:yaml.org,2002:str"&&V.test?.test(_),{compat:O,tags:L}=Z.doc.schema;if(L.some(Y)||O?.some(Y))return w0(Q,Z)}return H?_:Z0.foldFlowLines(_,q,Z0.FOLD_FLOW,g$(Z,!1))}function O4($,Z,X,U){let{implicitKey:z,inFlow:Q}=Z,J=typeof $.value==="string"?$:Object.assign({},$,{value:String($.value)}),{type:H}=$;if(H!==m.Scalar.QUOTE_DOUBLE){if(/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(J.value))H=m.Scalar.QUOTE_DOUBLE}let q=(B)=>{switch(B){case m.Scalar.BLOCK_FOLDED:case m.Scalar.BLOCK_LITERAL:return z||Q?w0(J.value,Z):E$(J,Z,X,U);case m.Scalar.QUOTE_DOUBLE:return t0(J.value,Z);case m.Scalar.QUOTE_SINGLE:return j1(J.value,Z);case m.Scalar.PLAIN:return V4(J,Z,X,U);default:return null}},G=q(H);if(G===null){let{defaultKeyType:B,defaultStringType:_}=Z.options,Y=z&&B||_;if(G=q(Y),G===null)throw Error(`Unsupported default string type ${Y}`)}return G}W4.stringifyString=O4});var $$=R((K4)=>{var I4=b$(),X0=b(),D4=o0(),R4=e0();function M4($,Z){let X=Object.assign({blockQuote:!0,commentString:D4.stringifyComment,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:"true",verifyAliasOrder:!0},$.schema.toStringOptions,Z),U;switch(X.collectionStyle){case"block":U=!1;break;case"flow":U=!0;break;default:U=null}return{anchors:new Set,doc:$,flowCollectionPadding:X.flowCollectionPadding?" ":"",indent:"",indentStep:typeof X.indent==="number"?" ".repeat(X.indent):" ",inFlow:U,options:X}}function F4($,Z){if(Z.tag){let z=$.filter((Q)=>Q.tag===Z.tag);if(z.length>0)return z.find((Q)=>Q.format===Z.format)??z[0]}let X=void 0,U;if(X0.isScalar(Z)){U=Z.value;let z=$.filter((Q)=>Q.identify?.(U));if(z.length>1){let Q=z.filter((J)=>J.test);if(Q.length>0)z=Q}X=z.find((Q)=>Q.format===Z.format)??z.find((Q)=>!Q.format)}else U=Z,X=$.find((z)=>z.nodeClass&&U instanceof z.nodeClass);if(!X){let z=U?.constructor?.name??(U===null?"null":typeof U);throw Error(`Tag not resolved for ${z} value`)}return X}function P4($,Z,{anchors:X,doc:U}){if(!U.directives)return"";let z=[],Q=(X0.isScalar($)||X0.isCollection($))&&$.anchor;if(Q&&I4.anchorIsValid(Q))X.add(Q),z.push(`&${Q}`);let J=$.tag??(Z.default?null:Z.tag);if(J)z.push(U.directives.tagString(J));return z.join(" ")}function T4($,Z,X,U){if(X0.isPair($))return $.toString(Z,X,U);if(X0.isAlias($)){if(Z.doc.directives)return $.toString(Z);if(Z.resolvedAliases?.has($))throw TypeError("Cannot stringify circular structure without alias nodes");else{if(Z.resolvedAliases)Z.resolvedAliases.add($);else Z.resolvedAliases=new Set([$]);$=$.resolve(Z.doc)}}let z=void 0,Q=X0.isNode($)?$:Z.doc.createNode($,{onTagObj:(q)=>z=q});z??(z=F4(Z.doc.schema.tags,Q));let J=P4(Q,z,Z);if(J.length>0)Z.indentAtStart=(Z.indentAtStart??0)+J.length+1;let H=typeof z.stringify==="function"?z.stringify(Q,Z,X,U):X0.isScalar(Q)?R4.stringifyString(Q,Z,X,U):Q.toString(Z,X,U);if(!J)return H;return X0.isScalar(Q)||H[0]==="{"||H[0]==="["?`${J} ${H}`:`${J}
34
- ${Z.indent}${H}`}K4.createStringifyContext=M4;K4.stringify=T4});var N9=R((b4)=>{var n=b(),K9=g(),A9=$$(),Z$=o0();function w4({key:$,value:Z},X,U,z){let{allNullValues:Q,doc:J,indent:H,indentStep:q,options:{commentString:G,indentSeq:B,simpleKeys:_}}=X,Y=n.isNode($)&&$.comment||null;if(_){if(Y)throw Error("With simple keys, key nodes cannot have comments");if(n.isCollection($)||!n.isNode($)&&typeof $==="object")throw Error("With simple keys, collection cannot be used as a key value")}let O=!_&&(!$||Y&&Z==null&&!X.inFlow||n.isCollection($)||(n.isScalar($)?$.type===K9.Scalar.BLOCK_FOLDED||$.type===K9.Scalar.BLOCK_LITERAL:typeof $==="object"));X=Object.assign({},X,{allNullValues:!1,implicitKey:!O&&(_||!Q),indent:H+q});let L=!1,V=!1,W=A9.stringify($,X,()=>L=!0,()=>V=!0);if(!O&&!X.inFlow&&W.length>1024){if(_)throw Error("With simple keys, single line scalar must not span more than 1024 characters");O=!0}if(X.inFlow){if(Q||Z==null){if(L&&U)U();return W===""?"?":O?`? ${W}`:W}}else if(Q&&!_||Z==null&&O){if(W=`? ${W}`,Y&&!L)W+=Z$.lineComment(W,X.indent,G(Y));else if(V&&z)z();return W}if(L)Y=null;if(O){if(Y)W+=Z$.lineComment(W,X.indent,G(Y));W=`? ${W}
35
- ${H}:`}else if(W=`${W}:`,Y)W+=Z$.lineComment(W,X.indent,G(Y));let D,M,T;if(n.isNode(Z))D=!!Z.spaceBefore,M=Z.commentBefore,T=Z.comment;else if(D=!1,M=null,T=null,Z&&typeof Z==="object")Z=J.createNode(Z);if(X.implicitKey=!1,!O&&!Y&&n.isScalar(Z))X.indentAtStart=W.length+1;if(V=!1,!B&&q.length>=2&&!X.inFlow&&!O&&n.isSeq(Z)&&!Z.flow&&!Z.tag&&!Z.anchor)X.indent=X.indent.substring(2);let A=!1,K=A9.stringify(Z,X,()=>A=!0,()=>V=!0),N=" ";if(Y||D||M){if(N=D?`
36
- `:"",M){let C=G(M);N+=`
37
- ${Z$.indentComment(C,X.indent)}`}if(K===""&&!X.inFlow){if(N===`
38
- `&&T)N=`
31
+ `)?w0(Q,Z):E$($,Z,z,X);if(!H&&!B&&U!==m.Scalar.PLAIN&&Q.includes(`
32
+ `))return E$($,Z,z,X);if(f$(Q)){if(G==="")return Z.forceBlockIndent=!0,E$($,Z,z,X);else if(H&&G===_)return w0(Q,Z)}let Y=Q.replace(/\n+/g,`$&
33
+ ${G}`);if(J){let q=(V)=>V.default&&V.tag!=="tag:yaml.org,2002:str"&&V.test?.test(Y),{compat:W,tags:I}=Z.doc.schema;if(I.some(q)||W?.some(q))return w0(Q,Z)}return H?Y:Z0.foldFlowLines(Y,G,Z0.FOLD_FLOW,g$(Z,!1))}function K4($,Z,z,X){let{implicitKey:U,inFlow:Q}=Z,J=typeof $.value==="string"?$:Object.assign({},$,{value:String($.value)}),{type:H}=$;if(H!==m.Scalar.QUOTE_DOUBLE){if(/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(J.value))H=m.Scalar.QUOTE_DOUBLE}let G=(B)=>{switch(B){case m.Scalar.BLOCK_FOLDED:case m.Scalar.BLOCK_LITERAL:return U||Q?w0(J.value,Z):E$(J,Z,z,X);case m.Scalar.QUOTE_DOUBLE:return t0(J.value,Z);case m.Scalar.QUOTE_SINGLE:return g1(J.value,Z);case m.Scalar.PLAIN:return M4(J,Z,z,X);default:return null}},_=G(H);if(_===null){let{defaultKeyType:B,defaultStringType:Y}=Z.options,q=U&&B||Y;if(_=G(q),_===null)throw Error(`Unsupported default string type ${q}`)}return _}P4.stringifyString=K4});var $$=D((E4)=>{var A4=b$(),z0=b(),N4=o0(),w4=e0();function b4($,Z){let z=Object.assign({blockQuote:!0,commentString:N4.stringifyComment,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:"true",verifyAliasOrder:!0},$.schema.toStringOptions,Z),X;switch(z.collectionStyle){case"block":X=!1;break;case"flow":X=!0;break;default:X=null}return{anchors:new Set,doc:$,flowCollectionPadding:z.flowCollectionPadding?" ":"",indent:"",indentStep:typeof z.indent==="number"?" ".repeat(z.indent):" ",inFlow:X,options:z}}function C4($,Z){if(Z.tag){let U=$.filter((Q)=>Q.tag===Z.tag);if(U.length>0)return U.find((Q)=>Q.format===Z.format)??U[0]}let z=void 0,X;if(z0.isScalar(Z)){X=Z.value;let U=$.filter((Q)=>Q.identify?.(X));if(U.length>1){let Q=U.filter((J)=>J.test);if(Q.length>0)U=Q}z=U.find((Q)=>Q.format===Z.format)??U.find((Q)=>!Q.format)}else X=Z,z=$.find((U)=>U.nodeClass&&X instanceof U.nodeClass);if(!z){let U=X?.constructor?.name??(X===null?"null":typeof X);throw Error(`Tag not resolved for ${U} value`)}return z}function j4($,Z,{anchors:z,doc:X}){if(!X.directives)return"";let U=[],Q=(z0.isScalar($)||z0.isCollection($))&&$.anchor;if(Q&&A4.anchorIsValid(Q))z.add(Q),U.push(`&${Q}`);let J=$.tag??(Z.default?null:Z.tag);if(J)U.push(X.directives.tagString(J));return U.join(" ")}function S4($,Z,z,X){if(z0.isPair($))return $.toString(Z,z,X);if(z0.isAlias($)){if(Z.doc.directives)return $.toString(Z);if(Z.resolvedAliases?.has($))throw TypeError("Cannot stringify circular structure without alias nodes");else{if(Z.resolvedAliases)Z.resolvedAliases.add($);else Z.resolvedAliases=new Set([$]);$=$.resolve(Z.doc)}}let U=void 0,Q=z0.isNode($)?$:Z.doc.createNode($,{onTagObj:(G)=>U=G});U??(U=C4(Z.doc.schema.tags,Q));let J=j4(Q,U,Z);if(J.length>0)Z.indentAtStart=(Z.indentAtStart??0)+J.length+1;let H=typeof U.stringify==="function"?U.stringify(Q,Z,z,X):z0.isScalar(Q)?w4.stringifyString(Q,Z,z,X):Q.toString(Z,z,X);if(!J)return H;return z0.isScalar(Q)||H[0]==="{"||H[0]==="["?`${J} ${H}`:`${J}
34
+ ${Z.indent}${H}`}E4.createStringifyContext=b4;E4.stringify=S4});var j3=D((h4)=>{var n=b(),b3=g(),C3=$$(),Z$=o0();function y4({key:$,value:Z},z,X,U){let{allNullValues:Q,doc:J,indent:H,indentStep:G,options:{commentString:_,indentSeq:B,simpleKeys:Y}}=z,q=n.isNode($)&&$.comment||null;if(Y){if(q)throw Error("With simple keys, key nodes cannot have comments");if(n.isCollection($)||!n.isNode($)&&typeof $==="object")throw Error("With simple keys, collection cannot be used as a key value")}let W=!Y&&(!$||q&&Z==null&&!z.inFlow||n.isCollection($)||(n.isScalar($)?$.type===b3.Scalar.BLOCK_FOLDED||$.type===b3.Scalar.BLOCK_LITERAL:typeof $==="object"));z=Object.assign({},z,{allNullValues:!1,implicitKey:!W&&(Y||!Q),indent:H+G});let I=!1,V=!1,O=C3.stringify($,z,()=>I=!0,()=>V=!0);if(!W&&!z.inFlow&&O.length>1024){if(Y)throw Error("With simple keys, single line scalar must not span more than 1024 characters");W=!0}if(z.inFlow){if(Q||Z==null){if(I&&X)X();return O===""?"?":W?`? ${O}`:O}}else if(Q&&!Y||Z==null&&W){if(O=`? ${O}`,q&&!I)O+=Z$.lineComment(O,z.indent,_(q));else if(V&&U)U();return O}if(I)q=null;if(W){if(q)O+=Z$.lineComment(O,z.indent,_(q));O=`? ${O}
35
+ ${H}:`}else if(O=`${O}:`,q)O+=Z$.lineComment(O,z.indent,_(q));let L,R,K;if(n.isNode(Z))L=!!Z.spaceBefore,R=Z.commentBefore,K=Z.comment;else if(L=!1,R=null,K=null,Z&&typeof Z==="object")Z=J.createNode(Z);if(z.implicitKey=!1,!W&&!q&&n.isScalar(Z))z.indentAtStart=O.length+1;if(V=!1,!B&&G.length>=2&&!z.inFlow&&!W&&n.isSeq(Z)&&!Z.flow&&!Z.tag&&!Z.anchor)z.indent=z.indent.substring(2);let N=!1,A=C3.stringify(Z,z,()=>N=!0,()=>V=!0),w=" ";if(q||L||R){if(w=L?`
36
+ `:"",R){let C=_(R);w+=`
37
+ ${Z$.indentComment(C,z.indent)}`}if(A===""&&!z.inFlow){if(w===`
38
+ `&&K)w=`
39
39
 
40
- `}else N+=`
41
- ${X.indent}`}else if(!O&&n.isCollection(Z)){let C=K[0],I=K.indexOf(`
42
- `),w=I!==-1,d=X.inFlow??Z.flow??Z.items.length===0;if(w||!d){let c=!1;if(w&&(C==="&"||C==="!")){let E=K.indexOf(" ");if(C==="&"&&E!==-1&&E<I&&K[E+1]==="!")E=K.indexOf(" ",E+1);if(E===-1||I<E)c=!0}if(!c)N=`
43
- ${X.indent}`}}else if(K===""||K[0]===`
44
- `)N="";if(W+=N+K,X.inFlow){if(A&&U)U()}else if(T&&!A)W+=Z$.lineComment(W,X.indent,G(T));else if(V&&z)z();return W}b4.stringifyPair=w4});var E1=R((E4)=>{var w9=p0("process");function j4($,...Z){if($==="debug")console.log(...Z)}function S4($,Z){if($==="debug"||$==="warn")if(typeof w9.emitWarning==="function")w9.emitWarning(Z);else console.warn(Z)}E4.debug=j4;E4.warn=S4});var x$=R((h4)=>{var X$=b(),b9=g(),f$="<<",h$={identify:($)=>$===f$||typeof $==="symbol"&&$.description===f$,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new b9.Scalar(Symbol(f$)),{addToJSMap:C9}),stringify:()=>f$},f4=($,Z)=>(h$.identify(Z)||X$.isScalar(Z)&&(!Z.type||Z.type===b9.Scalar.PLAIN)&&h$.identify(Z.value))&&$?.doc.schema.tags.some((X)=>X.tag===h$.tag&&X.default);function C9($,Z,X){if(X=$&&X$.isAlias(X)?X.resolve($.doc):X,X$.isSeq(X))for(let U of X.items)g1($,Z,U);else if(Array.isArray(X))for(let U of X)g1($,Z,U);else g1($,Z,X)}function g1($,Z,X){let U=$&&X$.isAlias(X)?X.resolve($.doc):X;if(!X$.isMap(U))throw Error("Merge sources must be maps or map aliases");let z=U.toJSON(null,$,Map);for(let[Q,J]of z)if(Z instanceof Map){if(!Z.has(Q))Z.set(Q,J)}else if(Z instanceof Set)Z.add(Q);else if(!Object.prototype.hasOwnProperty.call(Z,Q))Object.defineProperty(Z,Q,{value:J,writable:!0,enumerable:!0,configurable:!0});return Z}h4.addMergeToJSMap=C9;h4.isMergeKey=f4;h4.merge=h$});var f1=R((d4)=>{var v4=E1(),j9=x$(),m4=$$(),S9=b(),y1=$0();function p4($,Z,{key:X,value:U}){if(S9.isNode(X)&&X.addToJSMap)X.addToJSMap($,Z,U);else if(j9.isMergeKey($,X))j9.addMergeToJSMap($,Z,U);else{let z=y1.toJS(X,"",$);if(Z instanceof Map)Z.set(z,y1.toJS(U,z,$));else if(Z instanceof Set)Z.add(z);else{let Q=l4(X,z,$),J=y1.toJS(U,Q,$);if(Q in Z)Object.defineProperty(Z,Q,{value:J,writable:!0,enumerable:!0,configurable:!0});else Z[Q]=J}}return Z}function l4($,Z,X){if(Z===null)return"";if(typeof Z!=="object")return String(Z);if(S9.isNode($)&&X?.doc){let U=m4.createStringifyContext(X.doc,{});U.anchors=new Set;for(let Q of X.anchors.keys())U.anchors.add(Q.anchor);U.inFlow=!0,U.inStringifyKey=!0;let z=$.toString(U);if(!X.mapKeyWarned){let Q=JSON.stringify(z);if(Q.length>40)Q=Q.substring(0,36)+'..."';v4.warn(X.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${Q}. Set mapAsMap: true to use object keys.`),X.mapKeyWarned=!0}return z}return JSON.stringify(Z)}d4.addPairToJSMap=p4});var U0=R((r4)=>{var E9=n0(),i4=N9(),s4=f1(),u$=b();function a4($,Z,X){let U=E9.createNode($,void 0,X),z=E9.createNode(Z,void 0,X);return new k$(U,z)}class k${constructor($,Z=null){Object.defineProperty(this,u$.NODE_TYPE,{value:u$.PAIR}),this.key=$,this.value=Z}clone($){let{key:Z,value:X}=this;if(u$.isNode(Z))Z=Z.clone($);if(u$.isNode(X))X=X.clone($);return new k$(Z,X)}toJSON($,Z){let X=Z?.mapAsMap?new Map:{};return s4.addPairToJSMap(Z,X,this)}toString($,Z,X){return $?.doc?i4.stringifyPair(this,$,Z,X):JSON.stringify(this)}}r4.Pair=k$;r4.createPair=a4});var h1=R((Z5)=>{var V0=b(),g9=$$(),v$=o0();function t4($,Z,X){return(Z.inFlow??$.flow?$5:e4)($,Z,X)}function e4({comment:$,items:Z},X,{blockItemPrefix:U,flowChars:z,itemIndent:Q,onChompKeep:J,onComment:H}){let{indent:q,options:{commentString:G}}=X,B=Object.assign({},X,{indent:Q,type:null}),_=!1,Y=[];for(let L=0;L<Z.length;++L){let V=Z[L],W=null;if(V0.isNode(V)){if(!_&&V.spaceBefore)Y.push("");if(m$(X,Y,V.commentBefore,_),V.comment)W=V.comment}else if(V0.isPair(V)){let M=V0.isNode(V.key)?V.key:null;if(M){if(!_&&M.spaceBefore)Y.push("");m$(X,Y,M.commentBefore,_)}}_=!1;let D=g9.stringify(V,B,()=>W=null,()=>_=!0);if(W)D+=v$.lineComment(D,Q,G(W));if(_&&W)_=!1;Y.push(U+D)}let O;if(Y.length===0)O=z.start+z.end;else{O=Y[0];for(let L=1;L<Y.length;++L){let V=Y[L];O+=V?`
45
- ${q}${V}`:`
46
- `}}if($){if(O+=`
47
- `+v$.indentComment(G($),q),H)H()}else if(_&&J)J();return O}function $5({items:$},Z,{flowChars:X,itemIndent:U}){let{indent:z,indentStep:Q,flowCollectionPadding:J,options:{commentString:H}}=Z;U+=Q;let q=Object.assign({},Z,{indent:U,inFlow:!0,type:null}),G=!1,B=0,_=[];for(let L=0;L<$.length;++L){let V=$[L],W=null;if(V0.isNode(V)){if(V.spaceBefore)_.push("");if(m$(Z,_,V.commentBefore,!1),V.comment)W=V.comment}else if(V0.isPair(V)){let M=V0.isNode(V.key)?V.key:null;if(M){if(M.spaceBefore)_.push("");if(m$(Z,_,M.commentBefore,!1),M.comment)G=!0}let T=V0.isNode(V.value)?V.value:null;if(T){if(T.comment)W=T.comment;if(T.commentBefore)G=!0}else if(V.value==null&&M?.comment)W=M.comment}if(W)G=!0;let D=g9.stringify(V,q,()=>W=null);if(G||(G=_.length>B||D.includes(`
48
- `)),L<$.length-1)D+=",";else if(Z.options.trailingComma){if(Z.options.lineWidth>0)G||(G=_.reduce((M,T)=>M+T.length+2,2)+(D.length+2)>Z.options.lineWidth);if(G)D+=","}if(W)D+=v$.lineComment(D,U,H(W));_.push(D),B=_.length}let{start:Y,end:O}=X;if(_.length===0)return Y+O;else{if(!G){let L=_.reduce((V,W)=>V+W.length+2,2);G=Z.options.lineWidth>0&&L>Z.options.lineWidth}if(G){let L=Y;for(let V of _)L+=V?`
49
- ${Q}${z}${V}`:`
50
- `;return`${L}
51
- ${z}${O}`}else return`${Y}${J}${_.join(" ")}${J}${O}`}}function m$({indent:$,options:{commentString:Z}},X,U,z){if(U&&z)U=U.replace(/^\n+/,"");if(U){let Q=v$.indentComment(Z(U),$);X.push(Q.trimStart())}}Z5.stringifyCollection=t4});var Q0=R((H5)=>{var U5=h1(),z5=f1(),Q5=S$(),z0=b(),p$=U0(),J5=g();function U$($,Z){let X=z0.isScalar(Z)?Z.value:Z;for(let U of $)if(z0.isPair(U)){if(U.key===Z||U.key===X)return U;if(z0.isScalar(U.key)&&U.key.value===X)return U}return}class y9 extends Q5.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor($){super(z0.MAP,$);this.items=[]}static from($,Z,X){let{keepUndefined:U,replacer:z}=X,Q=new this($),J=(H,q)=>{if(typeof z==="function")q=z.call(Z,H,q);else if(Array.isArray(z)&&!z.includes(H))return;if(q!==void 0||U)Q.items.push(p$.createPair(H,q,X))};if(Z instanceof Map)for(let[H,q]of Z)J(H,q);else if(Z&&typeof Z==="object")for(let H of Object.keys(Z))J(H,Z[H]);if(typeof $.sortMapEntries==="function")Q.items.sort($.sortMapEntries);return Q}add($,Z){let X;if(z0.isPair($))X=$;else if(!$||typeof $!=="object"||!("key"in $))X=new p$.Pair($,$?.value);else X=new p$.Pair($.key,$.value);let U=U$(this.items,X.key),z=this.schema?.sortMapEntries;if(U){if(!Z)throw Error(`Key ${X.key} already set`);if(z0.isScalar(U.value)&&J5.isScalarValue(X.value))U.value.value=X.value;else U.value=X.value}else if(z){let Q=this.items.findIndex((J)=>z(X,J)<0);if(Q===-1)this.items.push(X);else this.items.splice(Q,0,X)}else this.items.push(X)}delete($){let Z=U$(this.items,$);if(!Z)return!1;return this.items.splice(this.items.indexOf(Z),1).length>0}get($,Z){let U=U$(this.items,$)?.value;return(!Z&&z0.isScalar(U)?U.value:U)??void 0}has($){return!!U$(this.items,$)}set($,Z){this.add(new p$.Pair($,Z),!0)}toJSON($,Z,X){let U=X?new X:Z?.mapAsMap?new Map:{};if(Z?.onCreate)Z.onCreate(U);for(let z of this.items)z5.addPairToJSMap(Z,U,z);return U}toString($,Z,X){if(!$)return JSON.stringify(this);for(let U of this.items)if(!z0.isPair(U))throw Error(`Map items must all be pairs; found ${JSON.stringify(U)} instead`);if(!$.allNullValues&&this.hasAllNullValues(!1))$=Object.assign({},$,{allNullValues:!0});return U5.stringifyCollection(this,$,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:$.indent||"",onChompKeep:X,onComment:Z})}}H5.YAMLMap=y9;H5.findPair=U$});var b0=R((B5)=>{var _5=b(),f9=Q0(),Y5={collection:"map",default:!0,nodeClass:f9.YAMLMap,tag:"tag:yaml.org,2002:map",resolve($,Z){if(!_5.isMap($))Z("Expected a mapping for this tag");return $},createNode:($,Z,X)=>f9.YAMLMap.from($,Z,X)};B5.map=Y5});var J0=R((R5)=>{var O5=n0(),W5=h1(),L5=S$(),d$=b(),I5=g(),D5=$0();class h9 extends L5.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor($){super(d$.SEQ,$);this.items=[]}add($){this.items.push($)}delete($){let Z=l$($);if(typeof Z!=="number")return!1;return this.items.splice(Z,1).length>0}get($,Z){let X=l$($);if(typeof X!=="number")return;let U=this.items[X];return!Z&&d$.isScalar(U)?U.value:U}has($){let Z=l$($);return typeof Z==="number"&&Z<this.items.length}set($,Z){let X=l$($);if(typeof X!=="number")throw Error(`Expected a valid index, not ${$}.`);let U=this.items[X];if(d$.isScalar(U)&&I5.isScalarValue(Z))U.value=Z;else this.items[X]=Z}toJSON($,Z){let X=[];if(Z?.onCreate)Z.onCreate(X);let U=0;for(let z of this.items)X.push(D5.toJS(z,String(U++),Z));return X}toString($,Z,X){if(!$)return JSON.stringify(this);return W5.stringifyCollection(this,$,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:($.indent||"")+" ",onChompKeep:X,onComment:Z})}static from($,Z,X){let{replacer:U}=X,z=new this($);if(Z&&Symbol.iterator in Object(Z)){let Q=0;for(let J of Z){if(typeof U==="function"){let H=Z instanceof Set?J:String(Q++);J=U.call(Z,H,J)}z.items.push(O5.createNode(J,void 0,X))}}return z}}function l$($){let Z=d$.isScalar($)?$.value:$;if(Z&&typeof Z==="string")Z=Number(Z);return typeof Z==="number"&&Number.isInteger(Z)&&Z>=0?Z:null}R5.YAMLSeq=h9});var C0=R((T5)=>{var F5=b(),x9=J0(),P5={collection:"seq",default:!0,nodeClass:x9.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve($,Z){if(!F5.isSeq($))Z("Expected a sequence for this tag");return $},createNode:($,Z,X)=>x9.YAMLSeq.from($,Z,X)};T5.seq=P5});var z$=R((w5)=>{var A5=e0(),N5={identify:($)=>typeof $==="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:($)=>$,stringify($,Z,X,U){return Z=Object.assign({actualString:!0},Z),A5.stringifyString($,Z,X,U)}};w5.string=N5});var c$=R((C5)=>{var u9=g(),k9={identify:($)=>$==null,createNode:()=>new u9.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new u9.Scalar(null),stringify:({source:$},Z)=>typeof $==="string"&&k9.test.test($)?$:Z.options.nullStr};C5.nullTag=k9});var x1=R((E5)=>{var S5=g(),v9={identify:($)=>typeof $==="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:($)=>new S5.Scalar($[0]==="t"||$[0]==="T"),stringify({source:$,value:Z},X){if($&&v9.test.test($)){let U=$[0]==="t"||$[0]==="T";if(Z===U)return $}return Z?X.options.trueStr:X.options.falseStr}};E5.boolTag=v9});var j0=R((f5)=>{function y5({format:$,minFractionDigits:Z,tag:X,value:U}){if(typeof U==="bigint")return String(U);let z=typeof U==="number"?U:Number(U);if(!isFinite(z))return isNaN(z)?".nan":z<0?"-.inf":".inf";let Q=Object.is(U,-0)?"-0":JSON.stringify(U);if(!$&&Z&&(!X||X==="tag:yaml.org,2002:float")&&/^\d/.test(Q)){let J=Q.indexOf(".");if(J<0)J=Q.length,Q+=".";let H=Z-(Q.length-J-1);while(H-- >0)Q+="0"}return Q}f5.stringifyNumber=y5});var k1=R((m5)=>{var x5=g(),u1=j0(),u5={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:($)=>$.slice(-3).toLowerCase()==="nan"?NaN:$[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:u1.stringifyNumber},k5={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:($)=>parseFloat($),stringify($){let Z=Number($.value);return isFinite(Z)?Z.toExponential():u1.stringifyNumber($)}},v5={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve($){let Z=new x5.Scalar(parseFloat($)),X=$.indexOf(".");if(X!==-1&&$[$.length-1]==="0")Z.minFractionDigits=$.length-X-1;return Z},stringify:u1.stringifyNumber};m5.float=v5;m5.floatExp=k5;m5.floatNaN=u5});var m1=R((a5)=>{var m9=j0(),i$=($)=>typeof $==="bigint"||Number.isInteger($),v1=($,Z,X,{intAsBigInt:U})=>U?BigInt($):parseInt($.substring(Z),X);function p9($,Z,X){let{value:U}=$;if(i$(U)&&U>=0)return X+U.toString(Z);return m9.stringifyNumber($)}var c5={identify:($)=>i$($)&&$>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:($,Z,X)=>v1($,2,8,X),stringify:($)=>p9($,8,"0o")},i5={identify:i$,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:($,Z,X)=>v1($,0,10,X),stringify:m9.stringifyNumber},s5={identify:($)=>i$($)&&$>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:($,Z,X)=>v1($,2,16,X),stringify:($)=>p9($,16,"0x")};a5.int=i5;a5.intHex=s5;a5.intOct=c5});var l9=R((z7)=>{var t5=b0(),e5=c$(),$7=C0(),Z7=z$(),X7=x1(),p1=k1(),l1=m1(),U7=[t5.map,$7.seq,Z7.string,e5.nullTag,X7.boolTag,l1.intOct,l1.int,l1.intHex,p1.floatNaN,p1.floatExp,p1.float];z7.schema=U7});var c9=R((B7)=>{var J7=g(),H7=b0(),q7=C0();function d9($){return typeof $==="bigint"||Number.isInteger($)}var s$=({value:$})=>JSON.stringify($),G7=[{identify:($)=>typeof $==="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:($)=>$,stringify:s$},{identify:($)=>$==null,createNode:()=>new J7.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:s$},{identify:($)=>typeof $==="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:($)=>$==="true",stringify:s$},{identify:d9,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:($,Z,{intAsBigInt:X})=>X?BigInt($):parseInt($,10),stringify:({value:$})=>d9($)?$.toString():JSON.stringify($)},{identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:($)=>parseFloat($),stringify:s$}],_7={default:!0,tag:"",test:/^/,resolve($,Z){return Z(`Unresolved plain scalar ${JSON.stringify($)}`),$}},Y7=[H7.map,q7.seq].concat(G7,_7);B7.schema=Y7});var c1=R((L7)=>{var Q$=p0("buffer"),d1=g(),O7=e0(),W7={identify:($)=>$ instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve($,Z){if(typeof Q$.Buffer==="function")return Q$.Buffer.from($,"base64");else if(typeof atob==="function"){let X=atob($.replace(/[\n\r]/g,"")),U=new Uint8Array(X.length);for(let z=0;z<X.length;++z)U[z]=X.charCodeAt(z);return U}else return Z("This environment does not support reading binary tags; either Buffer or atob is required"),$},stringify({comment:$,type:Z,value:X},U,z,Q){if(!X)return"";let J=X,H;if(typeof Q$.Buffer==="function")H=J instanceof Q$.Buffer?J.toString("base64"):Q$.Buffer.from(J.buffer).toString("base64");else if(typeof btoa==="function"){let q="";for(let G=0;G<J.length;++G)q+=String.fromCharCode(J[G]);H=btoa(q)}else throw Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(Z??(Z=d1.Scalar.BLOCK_LITERAL),Z!==d1.Scalar.QUOTE_DOUBLE){let q=Math.max(U.options.lineWidth-U.indent.length,U.options.minContentWidth),G=Math.ceil(H.length/q),B=Array(G);for(let _=0,Y=0;_<G;++_,Y+=q)B[_]=H.substr(Y,q);H=B.join(Z===d1.Scalar.BLOCK_LITERAL?`
52
- `:" ")}return O7.stringifyString({comment:$,type:Z,value:H},U,z,Q)}};L7.binary=W7});var r$=R((F7)=>{var a$=b(),i1=U0(),D7=g(),R7=J0();function i9($,Z){if(a$.isSeq($))for(let X=0;X<$.items.length;++X){let U=$.items[X];if(a$.isPair(U))continue;else if(a$.isMap(U)){if(U.items.length>1)Z("Each pair must have its own sequence indicator");let z=U.items[0]||new i1.Pair(new D7.Scalar(null));if(U.commentBefore)z.key.commentBefore=z.key.commentBefore?`${U.commentBefore}
53
- ${z.key.commentBefore}`:U.commentBefore;if(U.comment){let Q=z.value??z.key;Q.comment=Q.comment?`${U.comment}
54
- ${Q.comment}`:U.comment}U=z}$.items[X]=a$.isPair(U)?U:new i1.Pair(U)}else Z("Expected a sequence for this tag");return $}function s9($,Z,X){let{replacer:U}=X,z=new R7.YAMLSeq($);z.tag="tag:yaml.org,2002:pairs";let Q=0;if(Z&&Symbol.iterator in Object(Z))for(let J of Z){if(typeof U==="function")J=U.call(Z,String(Q++),J);let H,q;if(Array.isArray(J))if(J.length===2)H=J[0],q=J[1];else throw TypeError(`Expected [key, value] tuple: ${J}`);else if(J&&J instanceof Object){let G=Object.keys(J);if(G.length===1)H=G[0],q=J[H];else throw TypeError(`Expected tuple with one key, not ${G.length} keys`)}else H=J;z.items.push(i1.createPair(H,q,X))}return z}var M7={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:i9,createNode:s9};F7.createPairs=s9;F7.pairs=M7;F7.resolvePairs=i9});var a1=R((w7)=>{var a9=b(),s1=$0(),J$=Q0(),A7=J0(),r9=r$();class O0 extends A7.YAMLSeq{constructor(){super();this.add=J$.YAMLMap.prototype.add.bind(this),this.delete=J$.YAMLMap.prototype.delete.bind(this),this.get=J$.YAMLMap.prototype.get.bind(this),this.has=J$.YAMLMap.prototype.has.bind(this),this.set=J$.YAMLMap.prototype.set.bind(this),this.tag=O0.tag}toJSON($,Z){if(!Z)return super.toJSON($);let X=new Map;if(Z?.onCreate)Z.onCreate(X);for(let U of this.items){let z,Q;if(a9.isPair(U))z=s1.toJS(U.key,"",Z),Q=s1.toJS(U.value,z,Z);else z=s1.toJS(U,"",Z);if(X.has(z))throw Error("Ordered maps must not include duplicate keys");X.set(z,Q)}return X}static from($,Z,X){let U=r9.createPairs($,Z,X),z=new this;return z.items=U.items,z}}O0.tag="tag:yaml.org,2002:omap";var N7={collection:"seq",identify:($)=>$ instanceof Map,nodeClass:O0,default:!1,tag:"tag:yaml.org,2002:omap",resolve($,Z){let X=r9.resolvePairs($,Z),U=[];for(let{key:z}of X.items)if(a9.isScalar(z))if(U.includes(z.value))Z(`Ordered maps must not include duplicate keys: ${z.value}`);else U.push(z.value);return Object.assign(new O0,X)},createNode:($,Z,X)=>O0.from($,Z,X)};w7.YAMLOMap=O0;w7.omap=N7});var $3=R((j7)=>{var n9=g();function o9({value:$,source:Z},X){if(Z&&($?t9:e9).test.test(Z))return Z;return $?X.options.trueStr:X.options.falseStr}var t9={identify:($)=>$===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new n9.Scalar(!0),stringify:o9},e9={identify:($)=>$===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new n9.Scalar(!1),stringify:o9};j7.falseTag=e9;j7.trueTag=t9});var Z3=R((x7)=>{var g7=g(),r1=j0(),y7={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:($)=>$.slice(-3).toLowerCase()==="nan"?NaN:$[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:r1.stringifyNumber},f7={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:($)=>parseFloat($.replace(/_/g,"")),stringify($){let Z=Number($.value);return isFinite(Z)?Z.toExponential():r1.stringifyNumber($)}},h7={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve($){let Z=new g7.Scalar(parseFloat($.replace(/_/g,""))),X=$.indexOf(".");if(X!==-1){let U=$.substring(X+1).replace(/_/g,"");if(U[U.length-1]==="0")Z.minFractionDigits=U.length}return Z},stringify:r1.stringifyNumber};x7.float=h7;x7.floatExp=f7;x7.floatNaN=y7});var U3=R((c7)=>{var X3=j0(),H$=($)=>typeof $==="bigint"||Number.isInteger($);function n$($,Z,X,{intAsBigInt:U}){let z=$[0];if(z==="-"||z==="+")Z+=1;if($=$.substring(Z).replace(/_/g,""),U){switch(X){case 2:$=`0b${$}`;break;case 8:$=`0o${$}`;break;case 16:$=`0x${$}`;break}let J=BigInt($);return z==="-"?BigInt(-1)*J:J}let Q=parseInt($,X);return z==="-"?-1*Q:Q}function n1($,Z,X){let{value:U}=$;if(H$(U)){let z=U.toString(Z);return U<0?"-"+X+z.substr(1):X+z}return X3.stringifyNumber($)}var m7={identify:H$,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:($,Z,X)=>n$($,2,2,X),stringify:($)=>n1($,2,"0b")},p7={identify:H$,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:($,Z,X)=>n$($,1,8,X),stringify:($)=>n1($,8,"0")},l7={identify:H$,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:($,Z,X)=>n$($,0,10,X),stringify:X3.stringifyNumber},d7={identify:H$,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:($,Z,X)=>n$($,2,16,X),stringify:($)=>n1($,16,"0x")};c7.int=l7;c7.intBin=m7;c7.intHex=d7;c7.intOct=p7});var o1=R((o7)=>{var e$=b(),o$=U0(),t$=Q0();class W0 extends t$.YAMLMap{constructor($){super($);this.tag=W0.tag}add($){let Z;if(e$.isPair($))Z=$;else if($&&typeof $==="object"&&"key"in $&&"value"in $&&$.value===null)Z=new o$.Pair($.key,null);else Z=new o$.Pair($,null);if(!t$.findPair(this.items,Z.key))this.items.push(Z)}get($,Z){let X=t$.findPair(this.items,$);return!Z&&e$.isPair(X)?e$.isScalar(X.key)?X.key.value:X.key:X}set($,Z){if(typeof Z!=="boolean")throw Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof Z}`);let X=t$.findPair(this.items,$);if(X&&!Z)this.items.splice(this.items.indexOf(X),1);else if(!X&&Z)this.items.push(new o$.Pair($))}toJSON($,Z){return super.toJSON($,Z,Set)}toString($,Z,X){if(!$)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},$,{allNullValues:!0}),Z,X);else throw Error("Set items must all have null values")}static from($,Z,X){let{replacer:U}=X,z=new this($);if(Z&&Symbol.iterator in Object(Z))for(let Q of Z){if(typeof U==="function")Q=U.call(Z,Q,Q);z.items.push(o$.createPair(Q,null,X))}return z}}W0.tag="tag:yaml.org,2002:set";var n7={collection:"map",identify:($)=>$ instanceof Set,nodeClass:W0,default:!1,tag:"tag:yaml.org,2002:set",createNode:($,Z,X)=>W0.from($,Z,X),resolve($,Z){if(e$.isMap($))if($.hasAllNullValues(!0))return Object.assign(new W0,$);else Z("Set items must all have null values");else Z("Expected a mapping for this tag");return $}};o7.YAMLSet=W0;o7.set=n7});var e1=R((UX)=>{var $X=j0();function t1($,Z){let X=$[0],U=X==="-"||X==="+"?$.substring(1):$,z=(J)=>Z?BigInt(J):Number(J),Q=U.replace(/_/g,"").split(":").reduce((J,H)=>J*z(60)+z(H),z(0));return X==="-"?z(-1)*Q:Q}function z3($){let{value:Z}=$,X=(J)=>J;if(typeof Z==="bigint")X=(J)=>BigInt(J);else if(isNaN(Z)||!isFinite(Z))return $X.stringifyNumber($);let U="";if(Z<0)U="-",Z*=X(-1);let z=X(60),Q=[Z%z];if(Z<60)Q.unshift(0);else if(Z=(Z-Q[0])/z,Q.unshift(Z%z),Z>=60)Z=(Z-Q[0])/z,Q.unshift(Z);return U+Q.map((J)=>String(J).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}var ZX={identify:($)=>typeof $==="bigint"||Number.isInteger($),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:($,Z,{intAsBigInt:X})=>t1($,X),stringify:z3},XX={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:($)=>t1($,!1),stringify:z3},Q3={identify:($)=>$ instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve($){let Z=$.match(Q3.test);if(!Z)throw Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,X,U,z,Q,J,H]=Z.map(Number),q=Z[7]?Number((Z[7]+"00").substr(1,3)):0,G=Date.UTC(X,U-1,z,Q||0,J||0,H||0,q),B=Z[8];if(B&&B!=="Z"){let _=t1(B,!1);if(Math.abs(_)<30)_*=60;G-=60000*_}return new Date(G)},stringify:({value:$})=>$?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};UX.floatTime=XX;UX.intTime=ZX;UX.timestamp=Q3});var H3=R((IX)=>{var HX=b0(),qX=c$(),GX=C0(),_X=z$(),YX=c1(),J3=$3(),$2=Z3(),$1=U3(),BX=x$(),VX=a1(),OX=r$(),WX=o1(),Z2=e1(),LX=[HX.map,GX.seq,_X.string,qX.nullTag,J3.trueTag,J3.falseTag,$1.intBin,$1.intOct,$1.int,$1.intHex,$2.floatNaN,$2.floatExp,$2.float,YX.binary,BX.merge,VX.omap,OX.pairs,WX.set,Z2.intTime,Z2.floatTime,Z2.timestamp];IX.schema=LX});var I3=R((NX)=>{var Y3=b0(),RX=c$(),B3=C0(),MX=z$(),FX=x1(),X2=k1(),U2=m1(),PX=l9(),TX=c9(),V3=c1(),q$=x$(),O3=a1(),W3=r$(),q3=H3(),L3=o1(),Z1=e1(),G3=new Map([["core",PX.schema],["failsafe",[Y3.map,B3.seq,MX.string]],["json",TX.schema],["yaml11",q3.schema],["yaml-1.1",q3.schema]]),_3={binary:V3.binary,bool:FX.boolTag,float:X2.float,floatExp:X2.floatExp,floatNaN:X2.floatNaN,floatTime:Z1.floatTime,int:U2.int,intHex:U2.intHex,intOct:U2.intOct,intTime:Z1.intTime,map:Y3.map,merge:q$.merge,null:RX.nullTag,omap:O3.omap,pairs:W3.pairs,seq:B3.seq,set:L3.set,timestamp:Z1.timestamp},KX={"tag:yaml.org,2002:binary":V3.binary,"tag:yaml.org,2002:merge":q$.merge,"tag:yaml.org,2002:omap":O3.omap,"tag:yaml.org,2002:pairs":W3.pairs,"tag:yaml.org,2002:set":L3.set,"tag:yaml.org,2002:timestamp":Z1.timestamp};function AX($,Z,X){let U=G3.get(Z);if(U&&!$)return X&&!U.includes(q$.merge)?U.concat(q$.merge):U.slice();let z=U;if(!z)if(Array.isArray($))z=[];else{let Q=Array.from(G3.keys()).filter((J)=>J!=="yaml11").map((J)=>JSON.stringify(J)).join(", ");throw Error(`Unknown schema "${Z}"; use one of ${Q} or define customTags array`)}if(Array.isArray($))for(let Q of $)z=z.concat(Q);else if(typeof $==="function")z=$(z.slice());if(X)z=z.concat(q$.merge);return z.reduce((Q,J)=>{let H=typeof J==="string"?_3[J]:J;if(!H){let q=JSON.stringify(J),G=Object.keys(_3).map((B)=>JSON.stringify(B)).join(", ");throw Error(`Unknown custom tag ${q}; use one of ${G}`)}if(!Q.includes(H))Q.push(H);return Q},[])}NX.coreKnownTags=KX;NX.getTags=AX});var J2=R((gX)=>{var z2=b(),CX=b0(),jX=C0(),SX=z$(),X1=I3(),EX=($,Z)=>$.key<Z.key?-1:$.key>Z.key?1:0;class Q2{constructor({compat:$,customTags:Z,merge:X,resolveKnownTags:U,schema:z,sortMapEntries:Q,toStringDefaults:J}){this.compat=Array.isArray($)?X1.getTags($,"compat"):$?X1.getTags(null,$):null,this.name=typeof z==="string"&&z||"core",this.knownTags=U?X1.coreKnownTags:{},this.tags=X1.getTags(Z,this.name,X),this.toStringOptions=J??null,Object.defineProperty(this,z2.MAP,{value:CX.map}),Object.defineProperty(this,z2.SCALAR,{value:SX.string}),Object.defineProperty(this,z2.SEQ,{value:jX.seq}),this.sortMapEntries=typeof Q==="function"?Q:Q===!0?EX:null}clone(){let $=Object.create(Q2.prototype,Object.getOwnPropertyDescriptors(this));return $.tags=this.tags.slice(),$}}gX.Schema=Q2});var D3=R((xX)=>{var fX=b(),H2=$$(),G$=o0();function hX($,Z){let X=[],U=Z.directives===!0;if(Z.directives!==!1&&$.directives){let q=$.directives.toString($);if(q)X.push(q),U=!0;else if($.directives.docStart)U=!0}if(U)X.push("---");let z=H2.createStringifyContext($,Z),{commentString:Q}=z.options;if($.commentBefore){if(X.length!==1)X.unshift("");let q=Q($.commentBefore);X.unshift(G$.indentComment(q,""))}let J=!1,H=null;if($.contents){if(fX.isNode($.contents)){if($.contents.spaceBefore&&U)X.push("");if($.contents.commentBefore){let B=Q($.contents.commentBefore);X.push(G$.indentComment(B,""))}z.forceBlockIndent=!!$.comment,H=$.contents.comment}let q=H?void 0:()=>J=!0,G=H2.stringify($.contents,z,()=>H=null,q);if(H)G+=G$.lineComment(G,"",Q(H));if((G[0]==="|"||G[0]===">")&&X[X.length-1]==="---")X[X.length-1]=`--- ${G}`;else X.push(G)}else X.push(H2.stringify($.contents,z));if($.directives?.docEnd)if($.comment){let q=Q($.comment);if(q.includes(`
55
- `))X.push("..."),X.push(G$.indentComment(q,""));else X.push(`... ${q}`)}else X.push("...");else{let q=$.comment;if(q&&J)q=q.replace(/^\n+/,"");if(q){if((!J||H)&&X[X.length-1]!=="")X.push("");X.push(G$.indentComment(Q(q),""))}}return X.join(`
40
+ `}else w+=`
41
+ ${z.indent}`}else if(!W&&n.isCollection(Z)){let C=A[0],P=A.indexOf(`
42
+ `),T=P!==-1,d=z.inFlow??Z.flow??Z.items.length===0;if(T||!d){let c=!1;if(T&&(C==="&"||C==="!")){let E=A.indexOf(" ");if(C==="&"&&E!==-1&&E<P&&A[E+1]==="!")E=A.indexOf(" ",E+1);if(E===-1||P<E)c=!0}if(!c)w=`
43
+ ${z.indent}`}}else if(A===""||A[0]===`
44
+ `)w="";if(O+=w+A,z.inFlow){if(N&&X)X()}else if(K&&!N)O+=Z$.lineComment(O,z.indent,_(K));else if(V&&U)U();return O}h4.stringifyPair=y4});var y1=D((v4)=>{var S3=p0("process");function u4($,...Z){if($==="debug")console.log(...Z)}function k4($,Z){if($==="debug"||$==="warn")if(typeof S3.emitWarning==="function")S3.emitWarning(Z);else console.warn(Z)}v4.debug=u4;v4.warn=k4});var x$=D((d4)=>{var z$=b(),E3=g(),y$="<<",h$={identify:($)=>$===y$||typeof $==="symbol"&&$.description===y$,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new E3.Scalar(Symbol(y$)),{addToJSMap:g3}),stringify:()=>y$},l4=($,Z)=>(h$.identify(Z)||z$.isScalar(Z)&&(!Z.type||Z.type===E3.Scalar.PLAIN)&&h$.identify(Z.value))&&$?.doc.schema.tags.some((z)=>z.tag===h$.tag&&z.default);function g3($,Z,z){if(z=$&&z$.isAlias(z)?z.resolve($.doc):z,z$.isSeq(z))for(let X of z.items)h1($,Z,X);else if(Array.isArray(z))for(let X of z)h1($,Z,X);else h1($,Z,z)}function h1($,Z,z){let X=$&&z$.isAlias(z)?z.resolve($.doc):z;if(!z$.isMap(X))throw Error("Merge sources must be maps or map aliases");let U=X.toJSON(null,$,Map);for(let[Q,J]of U)if(Z instanceof Map){if(!Z.has(Q))Z.set(Q,J)}else if(Z instanceof Set)Z.add(Q);else if(!Object.prototype.hasOwnProperty.call(Z,Q))Object.defineProperty(Z,Q,{value:J,writable:!0,enumerable:!0,configurable:!0});return Z}d4.addMergeToJSMap=g3;d4.isMergeKey=l4;d4.merge=h$});var u1=D((t4)=>{var a4=y1(),f3=x$(),r4=$$(),y3=b(),x1=$0();function n4($,Z,{key:z,value:X}){if(y3.isNode(z)&&z.addToJSMap)z.addToJSMap($,Z,X);else if(f3.isMergeKey($,z))f3.addMergeToJSMap($,Z,X);else{let U=x1.toJS(z,"",$);if(Z instanceof Map)Z.set(U,x1.toJS(X,U,$));else if(Z instanceof Set)Z.add(U);else{let Q=o4(z,U,$),J=x1.toJS(X,Q,$);if(Q in Z)Object.defineProperty(Z,Q,{value:J,writable:!0,enumerable:!0,configurable:!0});else Z[Q]=J}}return Z}function o4($,Z,z){if(Z===null)return"";if(typeof Z!=="object")return String(Z);if(y3.isNode($)&&z?.doc){let X=r4.createStringifyContext(z.doc,{});X.anchors=new Set;for(let Q of z.anchors.keys())X.anchors.add(Q.anchor);X.inFlow=!0,X.inStringifyKey=!0;let U=$.toString(X);if(!z.mapKeyWarned){let Q=JSON.stringify(U);if(Q.length>40)Q=Q.substring(0,36)+'..."';a4.warn(z.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${Q}. Set mapAsMap: true to use object keys.`),z.mapKeyWarned=!0}return U}return JSON.stringify(Z)}t4.addPairToJSMap=n4});var X0=D((X5)=>{var h3=n0(),$5=j3(),Z5=u1(),u$=b();function z5($,Z,z){let X=h3.createNode($,void 0,z),U=h3.createNode(Z,void 0,z);return new k$(X,U)}class k${constructor($,Z=null){Object.defineProperty(this,u$.NODE_TYPE,{value:u$.PAIR}),this.key=$,this.value=Z}clone($){let{key:Z,value:z}=this;if(u$.isNode(Z))Z=Z.clone($);if(u$.isNode(z))z=z.clone($);return new k$(Z,z)}toJSON($,Z){let z=Z?.mapAsMap?new Map:{};return Z5.addPairToJSMap(Z,z,this)}toString($,Z,z){return $?.doc?$5.stringifyPair(this,$,Z,z):JSON.stringify(this)}}X5.Pair=k$;X5.createPair=z5});var k1=D((_5)=>{var V0=b(),x3=$$(),v$=o0();function J5($,Z,z){return(Z.inFlow??$.flow?G5:H5)($,Z,z)}function H5({comment:$,items:Z},z,{blockItemPrefix:X,flowChars:U,itemIndent:Q,onChompKeep:J,onComment:H}){let{indent:G,options:{commentString:_}}=z,B=Object.assign({},z,{indent:Q,type:null}),Y=!1,q=[];for(let I=0;I<Z.length;++I){let V=Z[I],O=null;if(V0.isNode(V)){if(!Y&&V.spaceBefore)q.push("");if(m$(z,q,V.commentBefore,Y),V.comment)O=V.comment}else if(V0.isPair(V)){let R=V0.isNode(V.key)?V.key:null;if(R){if(!Y&&R.spaceBefore)q.push("");m$(z,q,R.commentBefore,Y)}}Y=!1;let L=x3.stringify(V,B,()=>O=null,()=>Y=!0);if(O)L+=v$.lineComment(L,Q,_(O));if(Y&&O)Y=!1;q.push(X+L)}let W;if(q.length===0)W=U.start+U.end;else{W=q[0];for(let I=1;I<q.length;++I){let V=q[I];W+=V?`
45
+ ${G}${V}`:`
46
+ `}}if($){if(W+=`
47
+ `+v$.indentComment(_($),G),H)H()}else if(Y&&J)J();return W}function G5({items:$},Z,{flowChars:z,itemIndent:X}){let{indent:U,indentStep:Q,flowCollectionPadding:J,options:{commentString:H}}=Z;X+=Q;let G=Object.assign({},Z,{indent:X,inFlow:!0,type:null}),_=!1,B=0,Y=[];for(let I=0;I<$.length;++I){let V=$[I],O=null;if(V0.isNode(V)){if(V.spaceBefore)Y.push("");if(m$(Z,Y,V.commentBefore,!1),V.comment)O=V.comment}else if(V0.isPair(V)){let R=V0.isNode(V.key)?V.key:null;if(R){if(R.spaceBefore)Y.push("");if(m$(Z,Y,R.commentBefore,!1),R.comment)_=!0}let K=V0.isNode(V.value)?V.value:null;if(K){if(K.comment)O=K.comment;if(K.commentBefore)_=!0}else if(V.value==null&&R?.comment)O=R.comment}if(O)_=!0;let L=x3.stringify(V,G,()=>O=null);if(_||(_=Y.length>B||L.includes(`
48
+ `)),I<$.length-1)L+=",";else if(Z.options.trailingComma){if(Z.options.lineWidth>0)_||(_=Y.reduce((R,K)=>R+K.length+2,2)+(L.length+2)>Z.options.lineWidth);if(_)L+=","}if(O)L+=v$.lineComment(L,X,H(O));Y.push(L),B=Y.length}let{start:q,end:W}=z;if(Y.length===0)return q+W;else{if(!_){let I=Y.reduce((V,O)=>V+O.length+2,2);_=Z.options.lineWidth>0&&I>Z.options.lineWidth}if(_){let I=q;for(let V of Y)I+=V?`
49
+ ${Q}${U}${V}`:`
50
+ `;return`${I}
51
+ ${U}${W}`}else return`${q}${J}${Y.join(" ")}${J}${W}`}}function m$({indent:$,options:{commentString:Z}},z,X,U){if(X&&U)X=X.replace(/^\n+/,"");if(X){let Q=v$.indentComment(Z(X),$);z.push(Q.trimStart())}}_5.stringifyCollection=J5});var Q0=D((W5)=>{var q5=k1(),B5=u1(),V5=S$(),U0=b(),p$=X0(),O5=g();function X$($,Z){let z=U0.isScalar(Z)?Z.value:Z;for(let X of $)if(U0.isPair(X)){if(X.key===Z||X.key===z)return X;if(U0.isScalar(X.key)&&X.key.value===z)return X}return}class u3 extends V5.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor($){super(U0.MAP,$);this.items=[]}static from($,Z,z){let{keepUndefined:X,replacer:U}=z,Q=new this($),J=(H,G)=>{if(typeof U==="function")G=U.call(Z,H,G);else if(Array.isArray(U)&&!U.includes(H))return;if(G!==void 0||X)Q.items.push(p$.createPair(H,G,z))};if(Z instanceof Map)for(let[H,G]of Z)J(H,G);else if(Z&&typeof Z==="object")for(let H of Object.keys(Z))J(H,Z[H]);if(typeof $.sortMapEntries==="function")Q.items.sort($.sortMapEntries);return Q}add($,Z){let z;if(U0.isPair($))z=$;else if(!$||typeof $!=="object"||!("key"in $))z=new p$.Pair($,$?.value);else z=new p$.Pair($.key,$.value);let X=X$(this.items,z.key),U=this.schema?.sortMapEntries;if(X){if(!Z)throw Error(`Key ${z.key} already set`);if(U0.isScalar(X.value)&&O5.isScalarValue(z.value))X.value.value=z.value;else X.value=z.value}else if(U){let Q=this.items.findIndex((J)=>U(z,J)<0);if(Q===-1)this.items.push(z);else this.items.splice(Q,0,z)}else this.items.push(z)}delete($){let Z=X$(this.items,$);if(!Z)return!1;return this.items.splice(this.items.indexOf(Z),1).length>0}get($,Z){let X=X$(this.items,$)?.value;return(!Z&&U0.isScalar(X)?X.value:X)??void 0}has($){return!!X$(this.items,$)}set($,Z){this.add(new p$.Pair($,Z),!0)}toJSON($,Z,z){let X=z?new z:Z?.mapAsMap?new Map:{};if(Z?.onCreate)Z.onCreate(X);for(let U of this.items)B5.addPairToJSMap(Z,X,U);return X}toString($,Z,z){if(!$)return JSON.stringify(this);for(let X of this.items)if(!U0.isPair(X))throw Error(`Map items must all be pairs; found ${JSON.stringify(X)} instead`);if(!$.allNullValues&&this.hasAllNullValues(!1))$=Object.assign({},$,{allNullValues:!0});return q5.stringifyCollection(this,$,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:$.indent||"",onChompKeep:z,onComment:Z})}}W5.YAMLMap=u3;W5.findPair=X$});var b0=D((F5)=>{var D5=b(),k3=Q0(),R5={collection:"map",default:!0,nodeClass:k3.YAMLMap,tag:"tag:yaml.org,2002:map",resolve($,Z){if(!D5.isMap($))Z("Expected a mapping for this tag");return $},createNode:($,Z,z)=>k3.YAMLMap.from($,Z,z)};F5.map=R5});var J0=D((w5)=>{var K5=n0(),P5=k1(),T5=S$(),d$=b(),A5=g(),N5=$0();class v3 extends T5.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor($){super(d$.SEQ,$);this.items=[]}add($){this.items.push($)}delete($){let Z=l$($);if(typeof Z!=="number")return!1;return this.items.splice(Z,1).length>0}get($,Z){let z=l$($);if(typeof z!=="number")return;let X=this.items[z];return!Z&&d$.isScalar(X)?X.value:X}has($){let Z=l$($);return typeof Z==="number"&&Z<this.items.length}set($,Z){let z=l$($);if(typeof z!=="number")throw Error(`Expected a valid index, not ${$}.`);let X=this.items[z];if(d$.isScalar(X)&&A5.isScalarValue(Z))X.value=Z;else this.items[z]=Z}toJSON($,Z){let z=[];if(Z?.onCreate)Z.onCreate(z);let X=0;for(let U of this.items)z.push(N5.toJS(U,String(X++),Z));return z}toString($,Z,z){if(!$)return JSON.stringify(this);return P5.stringifyCollection(this,$,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:($.indent||"")+" ",onChompKeep:z,onComment:Z})}static from($,Z,z){let{replacer:X}=z,U=new this($);if(Z&&Symbol.iterator in Object(Z)){let Q=0;for(let J of Z){if(typeof X==="function"){let H=Z instanceof Set?J:String(Q++);J=X.call(Z,H,J)}U.items.push(K5.createNode(J,void 0,z))}}return U}}function l$($){let Z=d$.isScalar($)?$.value:$;if(Z&&typeof Z==="string")Z=Number(Z);return typeof Z==="number"&&Number.isInteger(Z)&&Z>=0?Z:null}w5.YAMLSeq=v3});var C0=D((S5)=>{var C5=b(),m3=J0(),j5={collection:"seq",default:!0,nodeClass:m3.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve($,Z){if(!C5.isSeq($))Z("Expected a sequence for this tag");return $},createNode:($,Z,z)=>m3.YAMLSeq.from($,Z,z)};S5.seq=j5});var U$=D((y5)=>{var g5=e0(),f5={identify:($)=>typeof $==="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:($)=>$,stringify($,Z,z,X){return Z=Object.assign({actualString:!0},Z),g5.stringifyString($,Z,z,X)}};y5.string=f5});var c$=D((x5)=>{var p3=g(),l3={identify:($)=>$==null,createNode:()=>new p3.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new p3.Scalar(null),stringify:({source:$},Z)=>typeof $==="string"&&l3.test.test($)?$:Z.options.nullStr};x5.nullTag=l3});var v1=D((v5)=>{var k5=g(),d3={identify:($)=>typeof $==="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:($)=>new k5.Scalar($[0]==="t"||$[0]==="T"),stringify({source:$,value:Z},z){if($&&d3.test.test($)){let X=$[0]==="t"||$[0]==="T";if(Z===X)return $}return Z?z.options.trueStr:z.options.falseStr}};v5.boolTag=d3});var j0=D((l5)=>{function p5({format:$,minFractionDigits:Z,tag:z,value:X}){if(typeof X==="bigint")return String(X);let U=typeof X==="number"?X:Number(X);if(!isFinite(U))return isNaN(U)?".nan":U<0?"-.inf":".inf";let Q=Object.is(X,-0)?"-0":JSON.stringify(X);if(!$&&Z&&(!z||z==="tag:yaml.org,2002:float")&&/^\d/.test(Q)){let J=Q.indexOf(".");if(J<0)J=Q.length,Q+=".";let H=Z-(Q.length-J-1);while(H-- >0)Q+="0"}return Q}l5.stringifyNumber=p5});var p1=D((r5)=>{var c5=g(),m1=j0(),i5={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:($)=>$.slice(-3).toLowerCase()==="nan"?NaN:$[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:m1.stringifyNumber},s5={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:($)=>parseFloat($),stringify($){let Z=Number($.value);return isFinite(Z)?Z.toExponential():m1.stringifyNumber($)}},a5={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve($){let Z=new c5.Scalar(parseFloat($)),z=$.indexOf(".");if(z!==-1&&$[$.length-1]==="0")Z.minFractionDigits=$.length-z-1;return Z},stringify:m1.stringifyNumber};r5.float=a5;r5.floatExp=s5;r5.floatNaN=i5});var d1=D((zz)=>{var c3=j0(),i$=($)=>typeof $==="bigint"||Number.isInteger($),l1=($,Z,z,{intAsBigInt:X})=>X?BigInt($):parseInt($.substring(Z),z);function i3($,Z,z){let{value:X}=$;if(i$(X)&&X>=0)return z+X.toString(Z);return c3.stringifyNumber($)}var e5={identify:($)=>i$($)&&$>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:($,Z,z)=>l1($,2,8,z),stringify:($)=>i3($,8,"0o")},$z={identify:i$,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:($,Z,z)=>l1($,0,10,z),stringify:c3.stringifyNumber},Zz={identify:($)=>i$($)&&$>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:($,Z,z)=>l1($,2,16,z),stringify:($)=>i3($,16,"0x")};zz.int=$z;zz.intHex=Zz;zz.intOct=e5});var s3=D((Bz)=>{var Jz=b0(),Hz=c$(),Gz=C0(),_z=U$(),Yz=v1(),c1=p1(),i1=d1(),qz=[Jz.map,Gz.seq,_z.string,Hz.nullTag,Yz.boolTag,i1.intOct,i1.int,i1.intHex,c1.floatNaN,c1.floatExp,c1.float];Bz.schema=qz});var r3=D((Fz)=>{var Oz=g(),Wz=b0(),Iz=C0();function a3($){return typeof $==="bigint"||Number.isInteger($)}var s$=({value:$})=>JSON.stringify($),Lz=[{identify:($)=>typeof $==="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:($)=>$,stringify:s$},{identify:($)=>$==null,createNode:()=>new Oz.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:s$},{identify:($)=>typeof $==="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:($)=>$==="true",stringify:s$},{identify:a3,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:($,Z,{intAsBigInt:z})=>z?BigInt($):parseInt($,10),stringify:({value:$})=>a3($)?$.toString():JSON.stringify($)},{identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:($)=>parseFloat($),stringify:s$}],Dz={default:!0,tag:"",test:/^/,resolve($,Z){return Z(`Unresolved plain scalar ${JSON.stringify($)}`),$}},Rz=[Wz.map,Iz.seq].concat(Lz,Dz);Fz.schema=Rz});var a1=D((Tz)=>{var Q$=p0("buffer"),s1=g(),Kz=e0(),Pz={identify:($)=>$ instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve($,Z){if(typeof Q$.Buffer==="function")return Q$.Buffer.from($,"base64");else if(typeof atob==="function"){let z=atob($.replace(/[\n\r]/g,"")),X=new Uint8Array(z.length);for(let U=0;U<z.length;++U)X[U]=z.charCodeAt(U);return X}else return Z("This environment does not support reading binary tags; either Buffer or atob is required"),$},stringify({comment:$,type:Z,value:z},X,U,Q){if(!z)return"";let J=z,H;if(typeof Q$.Buffer==="function")H=J instanceof Q$.Buffer?J.toString("base64"):Q$.Buffer.from(J.buffer).toString("base64");else if(typeof btoa==="function"){let G="";for(let _=0;_<J.length;++_)G+=String.fromCharCode(J[_]);H=btoa(G)}else throw Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(Z??(Z=s1.Scalar.BLOCK_LITERAL),Z!==s1.Scalar.QUOTE_DOUBLE){let G=Math.max(X.options.lineWidth-X.indent.length,X.options.minContentWidth),_=Math.ceil(H.length/G),B=Array(_);for(let Y=0,q=0;Y<_;++Y,q+=G)B[Y]=H.substr(q,G);H=B.join(Z===s1.Scalar.BLOCK_LITERAL?`
52
+ `:" ")}return Kz.stringifyString({comment:$,type:Z,value:H},X,U,Q)}};Tz.binary=Pz});var r$=D((Cz)=>{var a$=b(),r1=X0(),Nz=g(),wz=J0();function n3($,Z){if(a$.isSeq($))for(let z=0;z<$.items.length;++z){let X=$.items[z];if(a$.isPair(X))continue;else if(a$.isMap(X)){if(X.items.length>1)Z("Each pair must have its own sequence indicator");let U=X.items[0]||new r1.Pair(new Nz.Scalar(null));if(X.commentBefore)U.key.commentBefore=U.key.commentBefore?`${X.commentBefore}
53
+ ${U.key.commentBefore}`:X.commentBefore;if(X.comment){let Q=U.value??U.key;Q.comment=Q.comment?`${X.comment}
54
+ ${Q.comment}`:X.comment}X=U}$.items[z]=a$.isPair(X)?X:new r1.Pair(X)}else Z("Expected a sequence for this tag");return $}function o3($,Z,z){let{replacer:X}=z,U=new wz.YAMLSeq($);U.tag="tag:yaml.org,2002:pairs";let Q=0;if(Z&&Symbol.iterator in Object(Z))for(let J of Z){if(typeof X==="function")J=X.call(Z,String(Q++),J);let H,G;if(Array.isArray(J))if(J.length===2)H=J[0],G=J[1];else throw TypeError(`Expected [key, value] tuple: ${J}`);else if(J&&J instanceof Object){let _=Object.keys(J);if(_.length===1)H=_[0],G=J[H];else throw TypeError(`Expected tuple with one key, not ${_.length} keys`)}else H=J;U.items.push(r1.createPair(H,G,z))}return U}var bz={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:n3,createNode:o3};Cz.createPairs=o3;Cz.pairs=bz;Cz.resolvePairs=n3});var o1=D((yz)=>{var t3=b(),n1=$0(),J$=Q0(),gz=J0(),e3=r$();class O0 extends gz.YAMLSeq{constructor(){super();this.add=J$.YAMLMap.prototype.add.bind(this),this.delete=J$.YAMLMap.prototype.delete.bind(this),this.get=J$.YAMLMap.prototype.get.bind(this),this.has=J$.YAMLMap.prototype.has.bind(this),this.set=J$.YAMLMap.prototype.set.bind(this),this.tag=O0.tag}toJSON($,Z){if(!Z)return super.toJSON($);let z=new Map;if(Z?.onCreate)Z.onCreate(z);for(let X of this.items){let U,Q;if(t3.isPair(X))U=n1.toJS(X.key,"",Z),Q=n1.toJS(X.value,U,Z);else U=n1.toJS(X,"",Z);if(z.has(U))throw Error("Ordered maps must not include duplicate keys");z.set(U,Q)}return z}static from($,Z,z){let X=e3.createPairs($,Z,z),U=new this;return U.items=X.items,U}}O0.tag="tag:yaml.org,2002:omap";var fz={collection:"seq",identify:($)=>$ instanceof Map,nodeClass:O0,default:!1,tag:"tag:yaml.org,2002:omap",resolve($,Z){let z=e3.resolvePairs($,Z),X=[];for(let{key:U}of z.items)if(t3.isScalar(U))if(X.includes(U.value))Z(`Ordered maps must not include duplicate keys: ${U.value}`);else X.push(U.value);return Object.assign(new O0,z)},createNode:($,Z,z)=>O0.from($,Z,z)};yz.YAMLOMap=O0;yz.omap=fz});var U8=D((uz)=>{var $8=g();function Z8({value:$,source:Z},z){if(Z&&($?z8:X8).test.test(Z))return Z;return $?z.options.trueStr:z.options.falseStr}var z8={identify:($)=>$===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new $8.Scalar(!0),stringify:Z8},X8={identify:($)=>$===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new $8.Scalar(!1),stringify:Z8};uz.falseTag=X8;uz.trueTag=z8});var Q8=D((cz)=>{var mz=g(),t1=j0(),pz={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:($)=>$.slice(-3).toLowerCase()==="nan"?NaN:$[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:t1.stringifyNumber},lz={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:($)=>parseFloat($.replace(/_/g,"")),stringify($){let Z=Number($.value);return isFinite(Z)?Z.toExponential():t1.stringifyNumber($)}},dz={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve($){let Z=new mz.Scalar(parseFloat($.replace(/_/g,""))),z=$.indexOf(".");if(z!==-1){let X=$.substring(z+1).replace(/_/g,"");if(X[X.length-1]==="0")Z.minFractionDigits=X.length}return Z},stringify:t1.stringifyNumber};cz.float=dz;cz.floatExp=lz;cz.floatNaN=pz});var H8=D((ez)=>{var J8=j0(),H$=($)=>typeof $==="bigint"||Number.isInteger($);function n$($,Z,z,{intAsBigInt:X}){let U=$[0];if(U==="-"||U==="+")Z+=1;if($=$.substring(Z).replace(/_/g,""),X){switch(z){case 2:$=`0b${$}`;break;case 8:$=`0o${$}`;break;case 16:$=`0x${$}`;break}let J=BigInt($);return U==="-"?BigInt(-1)*J:J}let Q=parseInt($,z);return U==="-"?-1*Q:Q}function e1($,Z,z){let{value:X}=$;if(H$(X)){let U=X.toString(Z);return X<0?"-"+z+U.substr(1):z+U}return J8.stringifyNumber($)}var rz={identify:H$,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:($,Z,z)=>n$($,2,2,z),stringify:($)=>e1($,2,"0b")},nz={identify:H$,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:($,Z,z)=>n$($,1,8,z),stringify:($)=>e1($,8,"0")},oz={identify:H$,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:($,Z,z)=>n$($,0,10,z),stringify:J8.stringifyNumber},tz={identify:H$,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:($,Z,z)=>n$($,2,16,z),stringify:($)=>e1($,16,"0x")};ez.int=oz;ez.intBin=rz;ez.intHex=tz;ez.intOct=nz});var $2=D((Q7)=>{var e$=b(),o$=X0(),t$=Q0();class W0 extends t$.YAMLMap{constructor($){super($);this.tag=W0.tag}add($){let Z;if(e$.isPair($))Z=$;else if($&&typeof $==="object"&&"key"in $&&"value"in $&&$.value===null)Z=new o$.Pair($.key,null);else Z=new o$.Pair($,null);if(!t$.findPair(this.items,Z.key))this.items.push(Z)}get($,Z){let z=t$.findPair(this.items,$);return!Z&&e$.isPair(z)?e$.isScalar(z.key)?z.key.value:z.key:z}set($,Z){if(typeof Z!=="boolean")throw Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof Z}`);let z=t$.findPair(this.items,$);if(z&&!Z)this.items.splice(this.items.indexOf(z),1);else if(!z&&Z)this.items.push(new o$.Pair($))}toJSON($,Z){return super.toJSON($,Z,Set)}toString($,Z,z){if(!$)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},$,{allNullValues:!0}),Z,z);else throw Error("Set items must all have null values")}static from($,Z,z){let{replacer:X}=z,U=new this($);if(Z&&Symbol.iterator in Object(Z))for(let Q of Z){if(typeof X==="function")Q=X.call(Z,Q,Q);U.items.push(o$.createPair(Q,null,z))}return U}}W0.tag="tag:yaml.org,2002:set";var U7={collection:"map",identify:($)=>$ instanceof Set,nodeClass:W0,default:!1,tag:"tag:yaml.org,2002:set",createNode:($,Z,z)=>W0.from($,Z,z),resolve($,Z){if(e$.isMap($))if($.hasAllNullValues(!0))return Object.assign(new W0,$);else Z("Set items must all have null values");else Z("Expected a mapping for this tag");return $}};Q7.YAMLSet=W0;Q7.set=U7});var z2=D((q7)=>{var G7=j0();function Z2($,Z){let z=$[0],X=z==="-"||z==="+"?$.substring(1):$,U=(J)=>Z?BigInt(J):Number(J),Q=X.replace(/_/g,"").split(":").reduce((J,H)=>J*U(60)+U(H),U(0));return z==="-"?U(-1)*Q:Q}function G8($){let{value:Z}=$,z=(J)=>J;if(typeof Z==="bigint")z=(J)=>BigInt(J);else if(isNaN(Z)||!isFinite(Z))return G7.stringifyNumber($);let X="";if(Z<0)X="-",Z*=z(-1);let U=z(60),Q=[Z%U];if(Z<60)Q.unshift(0);else if(Z=(Z-Q[0])/U,Q.unshift(Z%U),Z>=60)Z=(Z-Q[0])/U,Q.unshift(Z);return X+Q.map((J)=>String(J).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}var _7={identify:($)=>typeof $==="bigint"||Number.isInteger($),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:($,Z,{intAsBigInt:z})=>Z2($,z),stringify:G8},Y7={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:($)=>Z2($,!1),stringify:G8},_8={identify:($)=>$ instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve($){let Z=$.match(_8.test);if(!Z)throw Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,z,X,U,Q,J,H]=Z.map(Number),G=Z[7]?Number((Z[7]+"00").substr(1,3)):0,_=Date.UTC(z,X-1,U,Q||0,J||0,H||0,G),B=Z[8];if(B&&B!=="Z"){let Y=Z2(B,!1);if(Math.abs(Y)<30)Y*=60;_-=60000*Y}return new Date(_)},stringify:({value:$})=>$?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};q7.floatTime=Y7;q7.intTime=_7;q7.timestamp=_8});var q8=D((A7)=>{var W7=b0(),I7=c$(),L7=C0(),D7=U$(),R7=a1(),Y8=U8(),X2=Q8(),$1=H8(),F7=x$(),M7=o1(),K7=r$(),P7=$2(),U2=z2(),T7=[W7.map,L7.seq,D7.string,I7.nullTag,Y8.trueTag,Y8.falseTag,$1.intBin,$1.intOct,$1.int,$1.intHex,X2.floatNaN,X2.floatExp,X2.float,R7.binary,F7.merge,M7.omap,K7.pairs,P7.set,U2.intTime,U2.floatTime,U2.timestamp];A7.schema=T7});var M8=D((f7)=>{var W8=b0(),w7=c$(),I8=C0(),b7=U$(),C7=v1(),Q2=p1(),J2=d1(),j7=s3(),S7=r3(),L8=a1(),G$=x$(),D8=o1(),R8=r$(),B8=q8(),F8=$2(),Z1=z2(),V8=new Map([["core",j7.schema],["failsafe",[W8.map,I8.seq,b7.string]],["json",S7.schema],["yaml11",B8.schema],["yaml-1.1",B8.schema]]),O8={binary:L8.binary,bool:C7.boolTag,float:Q2.float,floatExp:Q2.floatExp,floatNaN:Q2.floatNaN,floatTime:Z1.floatTime,int:J2.int,intHex:J2.intHex,intOct:J2.intOct,intTime:Z1.intTime,map:W8.map,merge:G$.merge,null:w7.nullTag,omap:D8.omap,pairs:R8.pairs,seq:I8.seq,set:F8.set,timestamp:Z1.timestamp},E7={"tag:yaml.org,2002:binary":L8.binary,"tag:yaml.org,2002:merge":G$.merge,"tag:yaml.org,2002:omap":D8.omap,"tag:yaml.org,2002:pairs":R8.pairs,"tag:yaml.org,2002:set":F8.set,"tag:yaml.org,2002:timestamp":Z1.timestamp};function g7($,Z,z){let X=V8.get(Z);if(X&&!$)return z&&!X.includes(G$.merge)?X.concat(G$.merge):X.slice();let U=X;if(!U)if(Array.isArray($))U=[];else{let Q=Array.from(V8.keys()).filter((J)=>J!=="yaml11").map((J)=>JSON.stringify(J)).join(", ");throw Error(`Unknown schema "${Z}"; use one of ${Q} or define customTags array`)}if(Array.isArray($))for(let Q of $)U=U.concat(Q);else if(typeof $==="function")U=$(U.slice());if(z)U=U.concat(G$.merge);return U.reduce((Q,J)=>{let H=typeof J==="string"?O8[J]:J;if(!H){let G=JSON.stringify(J),_=Object.keys(O8).map((B)=>JSON.stringify(B)).join(", ");throw Error(`Unknown custom tag ${G}; use one of ${_}`)}if(!Q.includes(H))Q.push(H);return Q},[])}f7.coreKnownTags=E7;f7.getTags=g7});var _2=D((m7)=>{var H2=b(),x7=b0(),u7=C0(),k7=U$(),z1=M8(),v7=($,Z)=>$.key<Z.key?-1:$.key>Z.key?1:0;class G2{constructor({compat:$,customTags:Z,merge:z,resolveKnownTags:X,schema:U,sortMapEntries:Q,toStringDefaults:J}){this.compat=Array.isArray($)?z1.getTags($,"compat"):$?z1.getTags(null,$):null,this.name=typeof U==="string"&&U||"core",this.knownTags=X?z1.coreKnownTags:{},this.tags=z1.getTags(Z,this.name,z),this.toStringOptions=J??null,Object.defineProperty(this,H2.MAP,{value:x7.map}),Object.defineProperty(this,H2.SCALAR,{value:k7.string}),Object.defineProperty(this,H2.SEQ,{value:u7.seq}),this.sortMapEntries=typeof Q==="function"?Q:Q===!0?v7:null}clone(){let $=Object.create(G2.prototype,Object.getOwnPropertyDescriptors(this));return $.tags=this.tags.slice(),$}}m7.Schema=G2});var K8=D((c7)=>{var l7=b(),Y2=$$(),_$=o0();function d7($,Z){let z=[],X=Z.directives===!0;if(Z.directives!==!1&&$.directives){let G=$.directives.toString($);if(G)z.push(G),X=!0;else if($.directives.docStart)X=!0}if(X)z.push("---");let U=Y2.createStringifyContext($,Z),{commentString:Q}=U.options;if($.commentBefore){if(z.length!==1)z.unshift("");let G=Q($.commentBefore);z.unshift(_$.indentComment(G,""))}let J=!1,H=null;if($.contents){if(l7.isNode($.contents)){if($.contents.spaceBefore&&X)z.push("");if($.contents.commentBefore){let B=Q($.contents.commentBefore);z.push(_$.indentComment(B,""))}U.forceBlockIndent=!!$.comment,H=$.contents.comment}let G=H?void 0:()=>J=!0,_=Y2.stringify($.contents,U,()=>H=null,G);if(H)_+=_$.lineComment(_,"",Q(H));if((_[0]==="|"||_[0]===">")&&z[z.length-1]==="---")z[z.length-1]=`--- ${_}`;else z.push(_)}else z.push(Y2.stringify($.contents,U));if($.directives?.docEnd)if($.comment){let G=Q($.comment);if(G.includes(`
55
+ `))z.push("..."),z.push(_$.indentComment(G,""));else z.push(`... ${G}`)}else z.push("...");else{let G=$.comment;if(G&&J)G=G.replace(/^\n+/,"");if(G){if((!J||H)&&z[z.length-1]!=="")z.push("");z.push(_$.indentComment(Q(G),""))}}return z.join(`
56
56
  `)+`
57
- `}xX.stringifyDocument=hX});var _$=R((iX)=>{var kX=r0(),S0=S$(),v=b(),vX=U0(),mX=$0(),pX=J2(),lX=D3(),q2=b$(),dX=w1(),cX=n0(),G2=N1();class _2{constructor($,Z,X){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,v.NODE_TYPE,{value:v.DOC});let U=null;if(typeof Z==="function"||Array.isArray(Z))U=Z;else if(X===void 0&&Z)X=Z,Z=void 0;let z=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},X);this.options=z;let{version:Q}=z;if(X?._directives){if(this.directives=X._directives.atDocument(),this.directives.yaml.explicit)Q=this.directives.yaml.version}else this.directives=new G2.Directives({version:Q});this.setSchema(Q,X),this.contents=$===void 0?null:this.createNode($,U,X)}clone(){let $=Object.create(_2.prototype,{[v.NODE_TYPE]:{value:v.DOC}});if($.commentBefore=this.commentBefore,$.comment=this.comment,$.errors=this.errors.slice(),$.warnings=this.warnings.slice(),$.options=Object.assign({},this.options),this.directives)$.directives=this.directives.clone();if($.schema=this.schema.clone(),$.contents=v.isNode(this.contents)?this.contents.clone($.schema):this.contents,this.range)$.range=this.range.slice();return $}add($){if(E0(this.contents))this.contents.add($)}addIn($,Z){if(E0(this.contents))this.contents.addIn($,Z)}createAlias($,Z){if(!$.anchor){let X=q2.anchorNames(this);$.anchor=!Z||X.has(Z)?q2.findNewAnchor(Z||"a",X):Z}return new kX.Alias($.anchor)}createNode($,Z,X){let U=void 0;if(typeof Z==="function")$=Z.call({"":$},"",$),U=Z;else if(Array.isArray(Z)){let V=(D)=>typeof D==="number"||D instanceof String||D instanceof Number,W=Z.filter(V).map(String);if(W.length>0)Z=Z.concat(W);U=Z}else if(X===void 0&&Z)X=Z,Z=void 0;let{aliasDuplicateObjects:z,anchorPrefix:Q,flow:J,keepUndefined:H,onTagObj:q,tag:G}=X??{},{onAnchor:B,setAnchors:_,sourceObjects:Y}=q2.createNodeAnchors(this,Q||"a"),O={aliasDuplicateObjects:z??!0,keepUndefined:H??!1,onAnchor:B,onTagObj:q,replacer:U,schema:this.schema,sourceObjects:Y},L=cX.createNode($,G,O);if(J&&v.isCollection(L))L.flow=!0;return _(),L}createPair($,Z,X={}){let U=this.createNode($,null,X),z=this.createNode(Z,null,X);return new vX.Pair(U,z)}delete($){return E0(this.contents)?this.contents.delete($):!1}deleteIn($){if(S0.isEmptyPath($)){if(this.contents==null)return!1;return this.contents=null,!0}return E0(this.contents)?this.contents.deleteIn($):!1}get($,Z){return v.isCollection(this.contents)?this.contents.get($,Z):void 0}getIn($,Z){if(S0.isEmptyPath($))return!Z&&v.isScalar(this.contents)?this.contents.value:this.contents;return v.isCollection(this.contents)?this.contents.getIn($,Z):void 0}has($){return v.isCollection(this.contents)?this.contents.has($):!1}hasIn($){if(S0.isEmptyPath($))return this.contents!==void 0;return v.isCollection(this.contents)?this.contents.hasIn($):!1}set($,Z){if(this.contents==null)this.contents=S0.collectionFromPath(this.schema,[$],Z);else if(E0(this.contents))this.contents.set($,Z)}setIn($,Z){if(S0.isEmptyPath($))this.contents=Z;else if(this.contents==null)this.contents=S0.collectionFromPath(this.schema,Array.from($),Z);else if(E0(this.contents))this.contents.setIn($,Z)}setSchema($,Z={}){if(typeof $==="number")$=String($);let X;switch($){case"1.1":if(this.directives)this.directives.yaml.version="1.1";else this.directives=new G2.Directives({version:"1.1"});X={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":if(this.directives)this.directives.yaml.version=$;else this.directives=new G2.Directives({version:$});X={resolveKnownTags:!0,schema:"core"};break;case null:if(this.directives)delete this.directives;X=null;break;default:{let U=JSON.stringify($);throw Error(`Expected '1.1', '1.2' or null as first argument, but found: ${U}`)}}if(Z.schema instanceof Object)this.schema=Z.schema;else if(X)this.schema=new pX.Schema(Object.assign(X,Z));else throw Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:$,jsonArg:Z,mapAsMap:X,maxAliasCount:U,onAnchor:z,reviver:Q}={}){let J={anchors:new Map,doc:this,keep:!$,mapAsMap:X===!0,mapKeyWarned:!1,maxAliasCount:typeof U==="number"?U:100},H=mX.toJS(this.contents,Z??"",J);if(typeof z==="function")for(let{count:q,res:G}of J.anchors.values())z(G,q);return typeof Q==="function"?dX.applyReviver(Q,{"":H},"",H):H}toJSON($,Z){return this.toJS({json:!0,jsonArg:$,mapAsMap:!1,onAnchor:Z})}toString($={}){if(this.errors.length>0)throw Error("Document with errors cannot be stringified");if("indent"in $&&(!Number.isInteger($.indent)||Number($.indent)<=0)){let Z=JSON.stringify($.indent);throw Error(`"indent" option must be a positive integer, not ${Z}`)}return lX.stringifyDocument(this,$)}}function E0($){if(v.isCollection($))return!0;throw Error("Expected a YAML collection as document contents")}iX.Document=_2});var Y$=R((rX)=>{class U1 extends Error{constructor($,Z,X,U){super();this.name=$,this.code=X,this.message=U,this.pos=Z}}class R3 extends U1{constructor($,Z,X){super("YAMLParseError",$,Z,X)}}class M3 extends U1{constructor($,Z,X){super("YAMLWarning",$,Z,X)}}var aX=($,Z)=>(X)=>{if(X.pos[0]===-1)return;X.linePos=X.pos.map((H)=>Z.linePos(H));let{line:U,col:z}=X.linePos[0];X.message+=` at line ${U}, column ${z}`;let Q=z-1,J=$.substring(Z.lineStarts[U-1],Z.lineStarts[U]).replace(/[\n\r]+$/,"");if(Q>=60&&J.length>80){let H=Math.min(Q-39,J.length-79);J="…"+J.substring(H),Q-=H-1}if(J.length>80)J=J.substring(0,79)+"…";if(U>1&&/^ *$/.test(J.substring(0,Q))){let H=$.substring(Z.lineStarts[U-2],Z.lineStarts[U-1]);if(H.length>80)H=H.substring(0,79)+`…
58
- `;J=H+J}if(/[^ ]/.test(J)){let H=1,q=X.linePos[1];if(q?.line===U&&q.col>z)H=Math.max(1,Math.min(q.col-z,80-Q));let G=" ".repeat(Q)+"^".repeat(H);X.message+=`:
57
+ `}c7.stringifyDocument=d7});var Y$=D(($X)=>{var s7=r0(),S0=S$(),v=b(),a7=X0(),r7=$0(),n7=_2(),o7=K8(),q2=b$(),t7=j1(),e7=n0(),B2=C1();class V2{constructor($,Z,z){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,v.NODE_TYPE,{value:v.DOC});let X=null;if(typeof Z==="function"||Array.isArray(Z))X=Z;else if(z===void 0&&Z)z=Z,Z=void 0;let U=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},z);this.options=U;let{version:Q}=U;if(z?._directives){if(this.directives=z._directives.atDocument(),this.directives.yaml.explicit)Q=this.directives.yaml.version}else this.directives=new B2.Directives({version:Q});this.setSchema(Q,z),this.contents=$===void 0?null:this.createNode($,X,z)}clone(){let $=Object.create(V2.prototype,{[v.NODE_TYPE]:{value:v.DOC}});if($.commentBefore=this.commentBefore,$.comment=this.comment,$.errors=this.errors.slice(),$.warnings=this.warnings.slice(),$.options=Object.assign({},this.options),this.directives)$.directives=this.directives.clone();if($.schema=this.schema.clone(),$.contents=v.isNode(this.contents)?this.contents.clone($.schema):this.contents,this.range)$.range=this.range.slice();return $}add($){if(E0(this.contents))this.contents.add($)}addIn($,Z){if(E0(this.contents))this.contents.addIn($,Z)}createAlias($,Z){if(!$.anchor){let z=q2.anchorNames(this);$.anchor=!Z||z.has(Z)?q2.findNewAnchor(Z||"a",z):Z}return new s7.Alias($.anchor)}createNode($,Z,z){let X=void 0;if(typeof Z==="function")$=Z.call({"":$},"",$),X=Z;else if(Array.isArray(Z)){let V=(L)=>typeof L==="number"||L instanceof String||L instanceof Number,O=Z.filter(V).map(String);if(O.length>0)Z=Z.concat(O);X=Z}else if(z===void 0&&Z)z=Z,Z=void 0;let{aliasDuplicateObjects:U,anchorPrefix:Q,flow:J,keepUndefined:H,onTagObj:G,tag:_}=z??{},{onAnchor:B,setAnchors:Y,sourceObjects:q}=q2.createNodeAnchors(this,Q||"a"),W={aliasDuplicateObjects:U??!0,keepUndefined:H??!1,onAnchor:B,onTagObj:G,replacer:X,schema:this.schema,sourceObjects:q},I=e7.createNode($,_,W);if(J&&v.isCollection(I))I.flow=!0;return Y(),I}createPair($,Z,z={}){let X=this.createNode($,null,z),U=this.createNode(Z,null,z);return new a7.Pair(X,U)}delete($){return E0(this.contents)?this.contents.delete($):!1}deleteIn($){if(S0.isEmptyPath($)){if(this.contents==null)return!1;return this.contents=null,!0}return E0(this.contents)?this.contents.deleteIn($):!1}get($,Z){return v.isCollection(this.contents)?this.contents.get($,Z):void 0}getIn($,Z){if(S0.isEmptyPath($))return!Z&&v.isScalar(this.contents)?this.contents.value:this.contents;return v.isCollection(this.contents)?this.contents.getIn($,Z):void 0}has($){return v.isCollection(this.contents)?this.contents.has($):!1}hasIn($){if(S0.isEmptyPath($))return this.contents!==void 0;return v.isCollection(this.contents)?this.contents.hasIn($):!1}set($,Z){if(this.contents==null)this.contents=S0.collectionFromPath(this.schema,[$],Z);else if(E0(this.contents))this.contents.set($,Z)}setIn($,Z){if(S0.isEmptyPath($))this.contents=Z;else if(this.contents==null)this.contents=S0.collectionFromPath(this.schema,Array.from($),Z);else if(E0(this.contents))this.contents.setIn($,Z)}setSchema($,Z={}){if(typeof $==="number")$=String($);let z;switch($){case"1.1":if(this.directives)this.directives.yaml.version="1.1";else this.directives=new B2.Directives({version:"1.1"});z={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":if(this.directives)this.directives.yaml.version=$;else this.directives=new B2.Directives({version:$});z={resolveKnownTags:!0,schema:"core"};break;case null:if(this.directives)delete this.directives;z=null;break;default:{let X=JSON.stringify($);throw Error(`Expected '1.1', '1.2' or null as first argument, but found: ${X}`)}}if(Z.schema instanceof Object)this.schema=Z.schema;else if(z)this.schema=new n7.Schema(Object.assign(z,Z));else throw Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:$,jsonArg:Z,mapAsMap:z,maxAliasCount:X,onAnchor:U,reviver:Q}={}){let J={anchors:new Map,doc:this,keep:!$,mapAsMap:z===!0,mapKeyWarned:!1,maxAliasCount:typeof X==="number"?X:100},H=r7.toJS(this.contents,Z??"",J);if(typeof U==="function")for(let{count:G,res:_}of J.anchors.values())U(_,G);return typeof Q==="function"?t7.applyReviver(Q,{"":H},"",H):H}toJSON($,Z){return this.toJS({json:!0,jsonArg:$,mapAsMap:!1,onAnchor:Z})}toString($={}){if(this.errors.length>0)throw Error("Document with errors cannot be stringified");if("indent"in $&&(!Number.isInteger($.indent)||Number($.indent)<=0)){let Z=JSON.stringify($.indent);throw Error(`"indent" option must be a positive integer, not ${Z}`)}return o7.stringifyDocument(this,$)}}function E0($){if(v.isCollection($))return!0;throw Error("Expected a YAML collection as document contents")}$X.Document=V2});var q$=D((XX)=>{class X1 extends Error{constructor($,Z,z,X){super();this.name=$,this.code=z,this.message=X,this.pos=Z}}class P8 extends X1{constructor($,Z,z){super("YAMLParseError",$,Z,z)}}class T8 extends X1{constructor($,Z,z){super("YAMLWarning",$,Z,z)}}var zX=($,Z)=>(z)=>{if(z.pos[0]===-1)return;z.linePos=z.pos.map((H)=>Z.linePos(H));let{line:X,col:U}=z.linePos[0];z.message+=` at line ${X}, column ${U}`;let Q=U-1,J=$.substring(Z.lineStarts[X-1],Z.lineStarts[X]).replace(/[\n\r]+$/,"");if(Q>=60&&J.length>80){let H=Math.min(Q-39,J.length-79);J="…"+J.substring(H),Q-=H-1}if(J.length>80)J=J.substring(0,79)+"…";if(X>1&&/^ *$/.test(J.substring(0,Q))){let H=$.substring(Z.lineStarts[X-2],Z.lineStarts[X-1]);if(H.length>80)H=H.substring(0,79)+`…
58
+ `;J=H+J}if(/[^ ]/.test(J)){let H=1,G=z.linePos[1];if(G?.line===X&&G.col>U)H=Math.max(1,Math.min(G.col-U,80-Q));let _=" ".repeat(Q)+"^".repeat(H);z.message+=`:
59
59
 
60
60
  ${J}
61
- ${G}
62
- `}};rX.YAMLError=U1;rX.YAMLParseError=R3;rX.YAMLWarning=M3;rX.prettifyError=aX});var B$=R((ZU)=>{function $U($,{flow:Z,indicator:X,next:U,offset:z,onError:Q,parentIndent:J,startOnNewline:H}){let q=!1,G=H,B=H,_="",Y="",O=!1,L=!1,V=null,W=null,D=null,M=null,T=null,A=null,K=null;for(let I of $){if(L){if(I.type!=="space"&&I.type!=="newline"&&I.type!=="comma")Q(I.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space");L=!1}if(V){if(G&&I.type!=="comment"&&I.type!=="newline")Q(V,"TAB_AS_INDENT","Tabs are not allowed as indentation");V=null}switch(I.type){case"space":if(!Z&&(X!=="doc-start"||U?.type!=="flow-collection")&&I.source.includes("\t"))V=I;B=!0;break;case"comment":{if(!B)Q(I,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let w=I.source.substring(1)||" ";if(!_)_=w;else _+=Y+w;Y="",G=!1;break}case"newline":if(G){if(_)_+=I.source;else if(!A||X!=="seq-item-ind")q=!0}else Y+=I.source;if(G=!0,O=!0,W||D)M=I;B=!0;break;case"anchor":if(W)Q(I,"MULTIPLE_ANCHORS","A node can have at most one anchor");if(I.source.endsWith(":"))Q(I.offset+I.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0);W=I,K??(K=I.offset),G=!1,B=!1,L=!0;break;case"tag":{if(D)Q(I,"MULTIPLE_TAGS","A node can have at most one tag");D=I,K??(K=I.offset),G=!1,B=!1,L=!0;break}case X:if(W||D)Q(I,"BAD_PROP_ORDER",`Anchors and tags must be after the ${I.source} indicator`);if(A)Q(I,"UNEXPECTED_TOKEN",`Unexpected ${I.source} in ${Z??"collection"}`);A=I,G=X==="seq-item-ind"||X==="explicit-key-ind",B=!1;break;case"comma":if(Z){if(T)Q(I,"UNEXPECTED_TOKEN",`Unexpected , in ${Z}`);T=I,G=!1,B=!1;break}default:Q(I,"UNEXPECTED_TOKEN",`Unexpected ${I.type} token`),G=!1,B=!1}}let N=$[$.length-1],C=N?N.offset+N.source.length:z;if(L&&U&&U.type!=="space"&&U.type!=="newline"&&U.type!=="comma"&&(U.type!=="scalar"||U.source!==""))Q(U.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space");if(V&&(G&&V.indent<=J||U?.type==="block-map"||U?.type==="block-seq"))Q(V,"TAB_AS_INDENT","Tabs are not allowed as indentation");return{comma:T,found:A,spaceBefore:q,comment:_,hasNewline:O,anchor:W,tag:D,newlineAfterProp:M,end:C,start:K??C}}ZU.resolveProps=$U});var z1=R((UU)=>{function Y2($){if(!$)return null;switch($.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if($.source.includes(`
63
- `))return!0;if($.end){for(let Z of $.end)if(Z.type==="newline")return!0}return!1;case"flow-collection":for(let Z of $.items){for(let X of Z.start)if(X.type==="newline")return!0;if(Z.sep){for(let X of Z.sep)if(X.type==="newline")return!0}if(Y2(Z.key)||Y2(Z.value))return!0}return!1;default:return!0}}UU.containsNewline=Y2});var B2=R((HU)=>{var QU=z1();function JU($,Z,X){if(Z?.type==="flow-collection"){let U=Z.end[0];if(U.indent===$&&(U.source==="]"||U.source==="}")&&QU.containsNewline(Z))X(U,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}HU.flowIndentCheck=JU});var V2=R((_U)=>{var F3=b();function GU($,Z,X){let{uniqueKeys:U}=$.options;if(U===!1)return!1;let z=typeof U==="function"?U:(Q,J)=>Q===J||F3.isScalar(Q)&&F3.isScalar(J)&&Q.value===J.value;return Z.some((Q)=>z(Q.key,X))}_U.mapIncludes=GU});var N3=R((LU)=>{var P3=U0(),BU=Q0(),T3=B$(),VU=z1(),K3=B2(),OU=V2(),A3="All mapping items must start at the same column";function WU({composeNode:$,composeEmptyNode:Z},X,U,z,Q){let H=new(Q?.nodeClass??BU.YAMLMap)(X.schema);if(X.atRoot)X.atRoot=!1;let q=U.offset,G=null;for(let B of U.items){let{start:_,key:Y,sep:O,value:L}=B,V=T3.resolveProps(_,{indicator:"explicit-key-ind",next:Y??O?.[0],offset:q,onError:z,parentIndent:U.indent,startOnNewline:!0}),W=!V.found;if(W){if(Y){if(Y.type==="block-seq")z(q,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key");else if("indent"in Y&&Y.indent!==U.indent)z(q,"BAD_INDENT",A3)}if(!V.anchor&&!V.tag&&!O){if(G=V.end,V.comment)if(H.comment)H.comment+=`
64
- `+V.comment;else H.comment=V.comment;continue}if(V.newlineAfterProp||VU.containsNewline(Y))z(Y??_[_.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else if(V.found?.indent!==U.indent)z(q,"BAD_INDENT",A3);X.atKey=!0;let D=V.end,M=Y?$(X,Y,V,z):Z(X,D,_,null,V,z);if(X.schema.compat)K3.flowIndentCheck(U.indent,Y,z);if(X.atKey=!1,OU.mapIncludes(X,H.items,M))z(D,"DUPLICATE_KEY","Map keys must be unique");let T=T3.resolveProps(O??[],{indicator:"map-value-ind",next:L,offset:M.range[2],onError:z,parentIndent:U.indent,startOnNewline:!Y||Y.type==="block-scalar"});if(q=T.end,T.found){if(W){if(L?.type==="block-map"&&!T.hasNewline)z(q,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings");if(X.options.strict&&V.start<T.found.offset-1024)z(M.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key")}let A=L?$(X,L,T,z):Z(X,q,O,null,T,z);if(X.schema.compat)K3.flowIndentCheck(U.indent,L,z);q=A.range[2];let K=new P3.Pair(M,A);if(X.options.keepSourceTokens)K.srcToken=B;H.items.push(K)}else{if(W)z(M.range,"MISSING_CHAR","Implicit map keys need to be followed by map values");if(T.comment)if(M.comment)M.comment+=`
65
- `+T.comment;else M.comment=T.comment;let A=new P3.Pair(M);if(X.options.keepSourceTokens)A.srcToken=B;H.items.push(A)}}if(G&&G<q)z(G,"IMPOSSIBLE","Map comment with trailing content");return H.range=[U.offset,q,G??q],H}LU.resolveBlockMap=WU});var w3=R((PU)=>{var DU=J0(),RU=B$(),MU=B2();function FU({composeNode:$,composeEmptyNode:Z},X,U,z,Q){let H=new(Q?.nodeClass??DU.YAMLSeq)(X.schema);if(X.atRoot)X.atRoot=!1;if(X.atKey)X.atKey=!1;let q=U.offset,G=null;for(let{start:B,value:_}of U.items){let Y=RU.resolveProps(B,{indicator:"seq-item-ind",next:_,offset:q,onError:z,parentIndent:U.indent,startOnNewline:!0});if(!Y.found)if(Y.anchor||Y.tag||_)if(_?.type==="block-seq")z(Y.end,"BAD_INDENT","All sequence items must start at the same column");else z(q,"MISSING_CHAR","Sequence item without - indicator");else{if(G=Y.end,Y.comment)H.comment=Y.comment;continue}let O=_?$(X,_,Y,z):Z(X,Y.end,B,null,Y,z);if(X.schema.compat)MU.flowIndentCheck(U.indent,_,z);q=O.range[2],H.items.push(O)}return H.range=[U.offset,q,G??q],H}PU.resolveBlockSeq=FU});var g0=R((AU)=>{function KU($,Z,X,U){let z="";if($){let Q=!1,J="";for(let H of $){let{source:q,type:G}=H;switch(G){case"space":Q=!0;break;case"comment":{if(X&&!Q)U(H,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let B=q.substring(1)||" ";if(!z)z=B;else z+=J+B;J="";break}case"newline":if(z)J+=q;Q=!0;break;default:U(H,"UNEXPECTED_TOKEN",`Unexpected ${G} at node end`)}Z+=q.length}}return{comment:z,offset:Z}}AU.resolveEnd=KU});var j3=R((yU)=>{var wU=b(),bU=U0(),b3=Q0(),CU=J0(),jU=g0(),C3=B$(),SU=z1(),EU=V2(),O2="Block collections are not allowed within flow collections",W2=($)=>$&&($.type==="block-map"||$.type==="block-seq");function gU({composeNode:$,composeEmptyNode:Z},X,U,z,Q){let J=U.start.source==="{",H=J?"flow map":"flow sequence",G=new(Q?.nodeClass??(J?b3.YAMLMap:CU.YAMLSeq))(X.schema);G.flow=!0;let B=X.atRoot;if(B)X.atRoot=!1;if(X.atKey)X.atKey=!1;let _=U.offset+U.start.source.length;for(let W=0;W<U.items.length;++W){let D=U.items[W],{start:M,key:T,sep:A,value:K}=D,N=C3.resolveProps(M,{flow:H,indicator:"explicit-key-ind",next:T??A?.[0],offset:_,onError:z,parentIndent:U.indent,startOnNewline:!1});if(!N.found){if(!N.anchor&&!N.tag&&!A&&!K){if(W===0&&N.comma)z(N.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${H}`);else if(W<U.items.length-1)z(N.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${H}`);if(N.comment)if(G.comment)G.comment+=`
66
- `+N.comment;else G.comment=N.comment;_=N.end;continue}if(!J&&X.options.strict&&SU.containsNewline(T))z(T,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(W===0){if(N.comma)z(N.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${H}`)}else{if(!N.comma)z(N.start,"MISSING_CHAR",`Missing , between ${H} items`);if(N.comment){let C="";$:for(let I of M)switch(I.type){case"comma":case"space":break;case"comment":C=I.source.substring(1);break $;default:break $}if(C){let I=G.items[G.items.length-1];if(wU.isPair(I))I=I.value??I.key;if(I.comment)I.comment+=`
67
- `+C;else I.comment=C;N.comment=N.comment.substring(C.length+1)}}}if(!J&&!A&&!N.found){let C=K?$(X,K,N,z):Z(X,N.end,A,null,N,z);if(G.items.push(C),_=C.range[2],W2(K))z(C.range,"BLOCK_IN_FLOW",O2)}else{X.atKey=!0;let C=N.end,I=T?$(X,T,N,z):Z(X,C,M,null,N,z);if(W2(T))z(I.range,"BLOCK_IN_FLOW",O2);X.atKey=!1;let w=C3.resolveProps(A??[],{flow:H,indicator:"map-value-ind",next:K,offset:I.range[2],onError:z,parentIndent:U.indent,startOnNewline:!1});if(w.found){if(!J&&!N.found&&X.options.strict){if(A)for(let E of A){if(E===w.found)break;if(E.type==="newline"){z(E,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}if(N.start<w.found.offset-1024)z(w.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else if(K)if("source"in K&&K.source?.[0]===":")z(K,"MISSING_CHAR",`Missing space after : in ${H}`);else z(w.start,"MISSING_CHAR",`Missing , or : between ${H} items`);let d=K?$(X,K,w,z):w.found?Z(X,w.end,A,null,w,z):null;if(d){if(W2(K))z(d.range,"BLOCK_IN_FLOW",O2)}else if(w.comment)if(I.comment)I.comment+=`
68
- `+w.comment;else I.comment=w.comment;let c=new bU.Pair(I,d);if(X.options.keepSourceTokens)c.srcToken=D;if(J){let E=G;if(EU.mapIncludes(X,E.items,I))z(C,"DUPLICATE_KEY","Map keys must be unique");E.items.push(c)}else{let E=new b3.YAMLMap(X.schema);E.flow=!0,E.items.push(c);let m0=(d??I).range;E.range=[I.range[0],m0[1],m0[2]],G.items.push(E)}_=d?d.range[2]:w.end}}let Y=J?"}":"]",[O,...L]=U.end,V=_;if(O?.source===Y)V=O.offset+O.source.length;else{let W=H[0].toUpperCase()+H.substring(1),D=B?`${W} must end with a ${Y}`:`${W} in block collection must be sufficiently indented and end with a ${Y}`;if(z(_,B?"MISSING_CHAR":"BAD_INDENT",D),O&&O.source.length!==1)L.unshift(O)}if(L.length>0){let W=jU.resolveEnd(L,V,X.options.strict,z);if(W.comment)if(G.comment)G.comment+=`
69
- `+W.comment;else G.comment=W.comment;G.range=[U.offset,V,W.offset]}else G.range=[U.offset,V,V];return G}yU.resolveFlowCollection=gU});var S3=R((dU)=>{var hU=b(),xU=g(),uU=Q0(),kU=J0(),vU=N3(),mU=w3(),pU=j3();function L2($,Z,X,U,z,Q){let J=X.type==="block-map"?vU.resolveBlockMap($,Z,X,U,Q):X.type==="block-seq"?mU.resolveBlockSeq($,Z,X,U,Q):pU.resolveFlowCollection($,Z,X,U,Q),H=J.constructor;if(z==="!"||z===H.tagName)return J.tag=H.tagName,J;if(z)J.tag=z;return J}function lU($,Z,X,U,z){let Q=U.tag,J=!Q?null:Z.directives.tagName(Q.source,(Y)=>z(Q,"TAG_RESOLVE_FAILED",Y));if(X.type==="block-seq"){let{anchor:Y,newlineAfterProp:O}=U,L=Y&&Q?Y.offset>Q.offset?Y:Q:Y??Q;if(L&&(!O||O.offset<L.offset))z(L,"MISSING_CHAR","Missing newline after block sequence props")}let H=X.type==="block-map"?"map":X.type==="block-seq"?"seq":X.start.source==="{"?"map":"seq";if(!Q||!J||J==="!"||J===uU.YAMLMap.tagName&&H==="map"||J===kU.YAMLSeq.tagName&&H==="seq")return L2($,Z,X,z,J);let q=Z.schema.tags.find((Y)=>Y.tag===J&&Y.collection===H);if(!q){let Y=Z.schema.knownTags[J];if(Y?.collection===H)Z.schema.tags.push(Object.assign({},Y,{default:!1})),q=Y;else{if(Y)z(Q,"BAD_COLLECTION_TYPE",`${Y.tag} used for ${H} collection, but expects ${Y.collection??"scalar"}`,!0);else z(Q,"TAG_RESOLVE_FAILED",`Unresolved tag: ${J}`,!0);return L2($,Z,X,z,J)}}let G=L2($,Z,X,z,J,q),B=q.resolve?.(G,(Y)=>z(Q,"TAG_RESOLVE_FAILED",Y),Z.options)??G,_=hU.isNode(B)?B:new xU.Scalar(B);if(_.range=G.range,_.tag=J,q?.format)_.format=q.format;return _}dU.composeCollection=lU});var D2=R((rU)=>{var I2=g();function iU($,Z,X){let U=Z.offset,z=sU(Z,$.options.strict,X);if(!z)return{value:"",type:null,comment:"",range:[U,U,U]};let Q=z.mode===">"?I2.Scalar.BLOCK_FOLDED:I2.Scalar.BLOCK_LITERAL,J=Z.source?aU(Z.source):[],H=J.length;for(let V=J.length-1;V>=0;--V){let W=J[V][1];if(W===""||W==="\r")H=V;else break}if(H===0){let V=z.chomp==="+"&&J.length>0?`
70
- `.repeat(Math.max(1,J.length-1)):"",W=U+z.length;if(Z.source)W+=Z.source.length;return{value:V,type:Q,comment:z.comment,range:[U,W,W]}}let q=Z.indent+z.indent,G=Z.offset+z.length,B=0;for(let V=0;V<H;++V){let[W,D]=J[V];if(D===""||D==="\r"){if(z.indent===0&&W.length>q)q=W.length}else{if(W.length<q)X(G+W.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator");if(z.indent===0)q=W.length;if(B=V,q===0&&!$.atRoot)X(G,"BAD_INDENT","Block scalar values in collections must be indented");break}G+=W.length+D.length+1}for(let V=J.length-1;V>=H;--V)if(J[V][0].length>q)H=V+1;let _="",Y="",O=!1;for(let V=0;V<B;++V)_+=J[V][0].slice(q)+`
71
- `;for(let V=B;V<H;++V){let[W,D]=J[V];G+=W.length+D.length+1;let M=D[D.length-1]==="\r";if(M)D=D.slice(0,-1);if(D&&W.length<q){let A=`Block scalar lines must not be less indented than their ${z.indent?"explicit indentation indicator":"first line"}`;X(G-D.length-(M?2:1),"BAD_INDENT",A),W=""}if(Q===I2.Scalar.BLOCK_LITERAL)_+=Y+W.slice(q)+D,Y=`
72
- `;else if(W.length>q||D[0]==="\t"){if(Y===" ")Y=`
73
- `;else if(!O&&Y===`
74
- `)Y=`
61
+ ${_}
62
+ `}};XX.YAMLError=X1;XX.YAMLParseError=P8;XX.YAMLWarning=T8;XX.prettifyError=zX});var B$=D((_X)=>{function GX($,{flow:Z,indicator:z,next:X,offset:U,onError:Q,parentIndent:J,startOnNewline:H}){let G=!1,_=H,B=H,Y="",q="",W=!1,I=!1,V=null,O=null,L=null,R=null,K=null,N=null,A=null;for(let P of $){if(I){if(P.type!=="space"&&P.type!=="newline"&&P.type!=="comma")Q(P.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space");I=!1}if(V){if(_&&P.type!=="comment"&&P.type!=="newline")Q(V,"TAB_AS_INDENT","Tabs are not allowed as indentation");V=null}switch(P.type){case"space":if(!Z&&(z!=="doc-start"||X?.type!=="flow-collection")&&P.source.includes("\t"))V=P;B=!0;break;case"comment":{if(!B)Q(P,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let T=P.source.substring(1)||" ";if(!Y)Y=T;else Y+=q+T;q="",_=!1;break}case"newline":if(_){if(Y)Y+=P.source;else if(!N||z!=="seq-item-ind")G=!0}else q+=P.source;if(_=!0,W=!0,O||L)R=P;B=!0;break;case"anchor":if(O)Q(P,"MULTIPLE_ANCHORS","A node can have at most one anchor");if(P.source.endsWith(":"))Q(P.offset+P.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0);O=P,A??(A=P.offset),_=!1,B=!1,I=!0;break;case"tag":{if(L)Q(P,"MULTIPLE_TAGS","A node can have at most one tag");L=P,A??(A=P.offset),_=!1,B=!1,I=!0;break}case z:if(O||L)Q(P,"BAD_PROP_ORDER",`Anchors and tags must be after the ${P.source} indicator`);if(N)Q(P,"UNEXPECTED_TOKEN",`Unexpected ${P.source} in ${Z??"collection"}`);N=P,_=z==="seq-item-ind"||z==="explicit-key-ind",B=!1;break;case"comma":if(Z){if(K)Q(P,"UNEXPECTED_TOKEN",`Unexpected , in ${Z}`);K=P,_=!1,B=!1;break}default:Q(P,"UNEXPECTED_TOKEN",`Unexpected ${P.type} token`),_=!1,B=!1}}let w=$[$.length-1],C=w?w.offset+w.source.length:U;if(I&&X&&X.type!=="space"&&X.type!=="newline"&&X.type!=="comma"&&(X.type!=="scalar"||X.source!==""))Q(X.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space");if(V&&(_&&V.indent<=J||X?.type==="block-map"||X?.type==="block-seq"))Q(V,"TAB_AS_INDENT","Tabs are not allowed as indentation");return{comma:K,found:N,spaceBefore:G,comment:Y,hasNewline:W,anchor:O,tag:L,newlineAfterProp:R,end:C,start:A??C}}_X.resolveProps=GX});var U1=D((qX)=>{function O2($){if(!$)return null;switch($.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if($.source.includes(`
63
+ `))return!0;if($.end){for(let Z of $.end)if(Z.type==="newline")return!0}return!1;case"flow-collection":for(let Z of $.items){for(let z of Z.start)if(z.type==="newline")return!0;if(Z.sep){for(let z of Z.sep)if(z.type==="newline")return!0}if(O2(Z.key)||O2(Z.value))return!0}return!1;default:return!0}}qX.containsNewline=O2});var W2=D((WX)=>{var VX=U1();function OX($,Z,z){if(Z?.type==="flow-collection"){let X=Z.end[0];if(X.indent===$&&(X.source==="]"||X.source==="}")&&VX.containsNewline(Z))z(X,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}WX.flowIndentCheck=OX});var I2=D((DX)=>{var A8=b();function LX($,Z,z){let{uniqueKeys:X}=$.options;if(X===!1)return!1;let U=typeof X==="function"?X:(Q,J)=>Q===J||A8.isScalar(Q)&&A8.isScalar(J)&&Q.value===J.value;return Z.some((Q)=>U(Q.key,z))}DX.mapIncludes=LX});var j8=D((TX)=>{var N8=X0(),FX=Q0(),w8=B$(),MX=U1(),b8=W2(),KX=I2(),C8="All mapping items must start at the same column";function PX({composeNode:$,composeEmptyNode:Z},z,X,U,Q){let H=new(Q?.nodeClass??FX.YAMLMap)(z.schema);if(z.atRoot)z.atRoot=!1;let G=X.offset,_=null;for(let B of X.items){let{start:Y,key:q,sep:W,value:I}=B,V=w8.resolveProps(Y,{indicator:"explicit-key-ind",next:q??W?.[0],offset:G,onError:U,parentIndent:X.indent,startOnNewline:!0}),O=!V.found;if(O){if(q){if(q.type==="block-seq")U(G,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key");else if("indent"in q&&q.indent!==X.indent)U(G,"BAD_INDENT",C8)}if(!V.anchor&&!V.tag&&!W){if(_=V.end,V.comment)if(H.comment)H.comment+=`
64
+ `+V.comment;else H.comment=V.comment;continue}if(V.newlineAfterProp||MX.containsNewline(q))U(q??Y[Y.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else if(V.found?.indent!==X.indent)U(G,"BAD_INDENT",C8);z.atKey=!0;let L=V.end,R=q?$(z,q,V,U):Z(z,L,Y,null,V,U);if(z.schema.compat)b8.flowIndentCheck(X.indent,q,U);if(z.atKey=!1,KX.mapIncludes(z,H.items,R))U(L,"DUPLICATE_KEY","Map keys must be unique");let K=w8.resolveProps(W??[],{indicator:"map-value-ind",next:I,offset:R.range[2],onError:U,parentIndent:X.indent,startOnNewline:!q||q.type==="block-scalar"});if(G=K.end,K.found){if(O){if(I?.type==="block-map"&&!K.hasNewline)U(G,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings");if(z.options.strict&&V.start<K.found.offset-1024)U(R.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key")}let N=I?$(z,I,K,U):Z(z,G,W,null,K,U);if(z.schema.compat)b8.flowIndentCheck(X.indent,I,U);G=N.range[2];let A=new N8.Pair(R,N);if(z.options.keepSourceTokens)A.srcToken=B;H.items.push(A)}else{if(O)U(R.range,"MISSING_CHAR","Implicit map keys need to be followed by map values");if(K.comment)if(R.comment)R.comment+=`
65
+ `+K.comment;else R.comment=K.comment;let N=new N8.Pair(R);if(z.options.keepSourceTokens)N.srcToken=B;H.items.push(N)}}if(_&&_<G)U(_,"IMPOSSIBLE","Map comment with trailing content");return H.range=[X.offset,G,_??G],H}TX.resolveBlockMap=PX});var S8=D((jX)=>{var NX=J0(),wX=B$(),bX=W2();function CX({composeNode:$,composeEmptyNode:Z},z,X,U,Q){let H=new(Q?.nodeClass??NX.YAMLSeq)(z.schema);if(z.atRoot)z.atRoot=!1;if(z.atKey)z.atKey=!1;let G=X.offset,_=null;for(let{start:B,value:Y}of X.items){let q=wX.resolveProps(B,{indicator:"seq-item-ind",next:Y,offset:G,onError:U,parentIndent:X.indent,startOnNewline:!0});if(!q.found)if(q.anchor||q.tag||Y)if(Y?.type==="block-seq")U(q.end,"BAD_INDENT","All sequence items must start at the same column");else U(G,"MISSING_CHAR","Sequence item without - indicator");else{if(_=q.end,q.comment)H.comment=q.comment;continue}let W=Y?$(z,Y,q,U):Z(z,q.end,B,null,q,U);if(z.schema.compat)bX.flowIndentCheck(X.indent,Y,U);G=W.range[2],H.items.push(W)}return H.range=[X.offset,G,_??G],H}jX.resolveBlockSeq=CX});var g0=D((gX)=>{function EX($,Z,z,X){let U="";if($){let Q=!1,J="";for(let H of $){let{source:G,type:_}=H;switch(_){case"space":Q=!0;break;case"comment":{if(z&&!Q)X(H,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let B=G.substring(1)||" ";if(!U)U=B;else U+=J+B;J="";break}case"newline":if(U)J+=G;Q=!0;break;default:X(H,"UNEXPECTED_TOKEN",`Unexpected ${_} at node end`)}Z+=G.length}}return{comment:U,offset:Z}}gX.resolveEnd=EX});var f8=D((pX)=>{var yX=b(),hX=X0(),E8=Q0(),xX=J0(),uX=g0(),g8=B$(),kX=U1(),vX=I2(),L2="Block collections are not allowed within flow collections",D2=($)=>$&&($.type==="block-map"||$.type==="block-seq");function mX({composeNode:$,composeEmptyNode:Z},z,X,U,Q){let J=X.start.source==="{",H=J?"flow map":"flow sequence",_=new(Q?.nodeClass??(J?E8.YAMLMap:xX.YAMLSeq))(z.schema);_.flow=!0;let B=z.atRoot;if(B)z.atRoot=!1;if(z.atKey)z.atKey=!1;let Y=X.offset+X.start.source.length;for(let O=0;O<X.items.length;++O){let L=X.items[O],{start:R,key:K,sep:N,value:A}=L,w=g8.resolveProps(R,{flow:H,indicator:"explicit-key-ind",next:K??N?.[0],offset:Y,onError:U,parentIndent:X.indent,startOnNewline:!1});if(!w.found){if(!w.anchor&&!w.tag&&!N&&!A){if(O===0&&w.comma)U(w.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${H}`);else if(O<X.items.length-1)U(w.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${H}`);if(w.comment)if(_.comment)_.comment+=`
66
+ `+w.comment;else _.comment=w.comment;Y=w.end;continue}if(!J&&z.options.strict&&kX.containsNewline(K))U(K,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(O===0){if(w.comma)U(w.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${H}`)}else{if(!w.comma)U(w.start,"MISSING_CHAR",`Missing , between ${H} items`);if(w.comment){let C="";$:for(let P of R)switch(P.type){case"comma":case"space":break;case"comment":C=P.source.substring(1);break $;default:break $}if(C){let P=_.items[_.items.length-1];if(yX.isPair(P))P=P.value??P.key;if(P.comment)P.comment+=`
67
+ `+C;else P.comment=C;w.comment=w.comment.substring(C.length+1)}}}if(!J&&!N&&!w.found){let C=A?$(z,A,w,U):Z(z,w.end,N,null,w,U);if(_.items.push(C),Y=C.range[2],D2(A))U(C.range,"BLOCK_IN_FLOW",L2)}else{z.atKey=!0;let C=w.end,P=K?$(z,K,w,U):Z(z,C,R,null,w,U);if(D2(K))U(P.range,"BLOCK_IN_FLOW",L2);z.atKey=!1;let T=g8.resolveProps(N??[],{flow:H,indicator:"map-value-ind",next:A,offset:P.range[2],onError:U,parentIndent:X.indent,startOnNewline:!1});if(T.found){if(!J&&!w.found&&z.options.strict){if(N)for(let E of N){if(E===T.found)break;if(E.type==="newline"){U(E,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}if(w.start<T.found.offset-1024)U(T.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else if(A)if("source"in A&&A.source?.[0]===":")U(A,"MISSING_CHAR",`Missing space after : in ${H}`);else U(T.start,"MISSING_CHAR",`Missing , or : between ${H} items`);let d=A?$(z,A,T,U):T.found?Z(z,T.end,N,null,T,U):null;if(d){if(D2(A))U(d.range,"BLOCK_IN_FLOW",L2)}else if(T.comment)if(P.comment)P.comment+=`
68
+ `+T.comment;else P.comment=T.comment;let c=new hX.Pair(P,d);if(z.options.keepSourceTokens)c.srcToken=L;if(J){let E=_;if(vX.mapIncludes(z,E.items,P))U(C,"DUPLICATE_KEY","Map keys must be unique");E.items.push(c)}else{let E=new E8.YAMLMap(z.schema);E.flow=!0,E.items.push(c);let m0=(d??P).range;E.range=[P.range[0],m0[1],m0[2]],_.items.push(E)}Y=d?d.range[2]:T.end}}let q=J?"}":"]",[W,...I]=X.end,V=Y;if(W?.source===q)V=W.offset+W.source.length;else{let O=H[0].toUpperCase()+H.substring(1),L=B?`${O} must end with a ${q}`:`${O} in block collection must be sufficiently indented and end with a ${q}`;if(U(Y,B?"MISSING_CHAR":"BAD_INDENT",L),W&&W.source.length!==1)I.unshift(W)}if(I.length>0){let O=uX.resolveEnd(I,V,z.options.strict,U);if(O.comment)if(_.comment)_.comment+=`
69
+ `+O.comment;else _.comment=O.comment;_.range=[X.offset,V,O.offset]}else _.range=[X.offset,V,V];return _}pX.resolveFlowCollection=mX});var y8=D((tX)=>{var dX=b(),cX=g(),iX=Q0(),sX=J0(),aX=j8(),rX=S8(),nX=f8();function R2($,Z,z,X,U,Q){let J=z.type==="block-map"?aX.resolveBlockMap($,Z,z,X,Q):z.type==="block-seq"?rX.resolveBlockSeq($,Z,z,X,Q):nX.resolveFlowCollection($,Z,z,X,Q),H=J.constructor;if(U==="!"||U===H.tagName)return J.tag=H.tagName,J;if(U)J.tag=U;return J}function oX($,Z,z,X,U){let Q=X.tag,J=!Q?null:Z.directives.tagName(Q.source,(q)=>U(Q,"TAG_RESOLVE_FAILED",q));if(z.type==="block-seq"){let{anchor:q,newlineAfterProp:W}=X,I=q&&Q?q.offset>Q.offset?q:Q:q??Q;if(I&&(!W||W.offset<I.offset))U(I,"MISSING_CHAR","Missing newline after block sequence props")}let H=z.type==="block-map"?"map":z.type==="block-seq"?"seq":z.start.source==="{"?"map":"seq";if(!Q||!J||J==="!"||J===iX.YAMLMap.tagName&&H==="map"||J===sX.YAMLSeq.tagName&&H==="seq")return R2($,Z,z,U,J);let G=Z.schema.tags.find((q)=>q.tag===J&&q.collection===H);if(!G){let q=Z.schema.knownTags[J];if(q?.collection===H)Z.schema.tags.push(Object.assign({},q,{default:!1})),G=q;else{if(q)U(Q,"BAD_COLLECTION_TYPE",`${q.tag} used for ${H} collection, but expects ${q.collection??"scalar"}`,!0);else U(Q,"TAG_RESOLVE_FAILED",`Unresolved tag: ${J}`,!0);return R2($,Z,z,U,J)}}let _=R2($,Z,z,U,J,G),B=G.resolve?.(_,(q)=>U(Q,"TAG_RESOLVE_FAILED",q),Z.options)??_,Y=dX.isNode(B)?B:new cX.Scalar(B);if(Y.range=_.range,Y.tag=J,G?.format)Y.format=G.format;return Y}tX.composeCollection=oX});var M2=D((XU)=>{var F2=g();function $U($,Z,z){let X=Z.offset,U=ZU(Z,$.options.strict,z);if(!U)return{value:"",type:null,comment:"",range:[X,X,X]};let Q=U.mode===">"?F2.Scalar.BLOCK_FOLDED:F2.Scalar.BLOCK_LITERAL,J=Z.source?zU(Z.source):[],H=J.length;for(let V=J.length-1;V>=0;--V){let O=J[V][1];if(O===""||O==="\r")H=V;else break}if(H===0){let V=U.chomp==="+"&&J.length>0?`
70
+ `.repeat(Math.max(1,J.length-1)):"",O=X+U.length;if(Z.source)O+=Z.source.length;return{value:V,type:Q,comment:U.comment,range:[X,O,O]}}let G=Z.indent+U.indent,_=Z.offset+U.length,B=0;for(let V=0;V<H;++V){let[O,L]=J[V];if(L===""||L==="\r"){if(U.indent===0&&O.length>G)G=O.length}else{if(O.length<G)z(_+O.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator");if(U.indent===0)G=O.length;if(B=V,G===0&&!$.atRoot)z(_,"BAD_INDENT","Block scalar values in collections must be indented");break}_+=O.length+L.length+1}for(let V=J.length-1;V>=H;--V)if(J[V][0].length>G)H=V+1;let Y="",q="",W=!1;for(let V=0;V<B;++V)Y+=J[V][0].slice(G)+`
71
+ `;for(let V=B;V<H;++V){let[O,L]=J[V];_+=O.length+L.length+1;let R=L[L.length-1]==="\r";if(R)L=L.slice(0,-1);if(L&&O.length<G){let N=`Block scalar lines must not be less indented than their ${U.indent?"explicit indentation indicator":"first line"}`;z(_-L.length-(R?2:1),"BAD_INDENT",N),O=""}if(Q===F2.Scalar.BLOCK_LITERAL)Y+=q+O.slice(G)+L,q=`
72
+ `;else if(O.length>G||L[0]==="\t"){if(q===" ")q=`
73
+ `;else if(!W&&q===`
74
+ `)q=`
75
75
 
76
- `;_+=Y+W.slice(q)+D,Y=`
77
- `,O=!0}else if(D==="")if(Y===`
78
- `)_+=`
79
- `;else Y=`
80
- `;else _+=Y+D,Y=" ",O=!1}switch(z.chomp){case"-":break;case"+":for(let V=H;V<J.length;++V)_+=`
81
- `+J[V][0].slice(q);if(_[_.length-1]!==`
82
- `)_+=`
83
- `;break;default:_+=`
84
- `}let L=U+z.length+Z.source.length;return{value:_,type:Q,comment:z.comment,range:[U,L,L]}}function sU({offset:$,props:Z},X,U){if(Z[0].type!=="block-scalar-header")return U(Z[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:z}=Z[0],Q=z[0],J=0,H="",q=-1;for(let Y=1;Y<z.length;++Y){let O=z[Y];if(!H&&(O==="-"||O==="+"))H=O;else{let L=Number(O);if(!J&&L)J=L;else if(q===-1)q=$+Y}}if(q!==-1)U(q,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${z}`);let G=!1,B="",_=z.length;for(let Y=1;Y<Z.length;++Y){let O=Z[Y];switch(O.type){case"space":G=!0;case"newline":_+=O.source.length;break;case"comment":if(X&&!G)U(O,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");_+=O.source.length,B=O.source.substring(1);break;case"error":U(O,"UNEXPECTED_TOKEN",O.message),_+=O.source.length;break;default:{let L=`Unexpected token in block scalar header: ${O.type}`;U(O,"UNEXPECTED_TOKEN",L);let V=O.source;if(V&&typeof V==="string")_+=V.length}}}return{mode:Q,indent:J,chomp:H,comment:B,length:_}}function aU($){let Z=$.split(/\n( *)/),X=Z[0],U=X.match(/^( *)/),Q=[U?.[1]?[U[1],X.slice(U[1].length)]:["",X]];for(let J=1;J<Z.length;J+=2)Q.push([Z[J],Z[J+1]]);return Q}rU.resolveBlockScalar=iU});var M2=R((Qz)=>{var R2=g(),oU=g0();function tU($,Z,X){let{offset:U,type:z,source:Q,end:J}=$,H,q,G=(Y,O,L)=>X(U+Y,O,L);switch(z){case"scalar":H=R2.Scalar.PLAIN,q=eU(Q,G);break;case"single-quoted-scalar":H=R2.Scalar.QUOTE_SINGLE,q=$z(Q,G);break;case"double-quoted-scalar":H=R2.Scalar.QUOTE_DOUBLE,q=Zz(Q,G);break;default:return X($,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${z}`),{value:"",type:null,comment:"",range:[U,U+Q.length,U+Q.length]}}let B=U+Q.length,_=oU.resolveEnd(J,B,Z,X);return{value:q,type:H,comment:_.comment,range:[U,B,_.offset]}}function eU($,Z){let X="";switch($[0]){case"\t":X="a tab character";break;case",":X="flow indicator character ,";break;case"%":X="directive indicator character %";break;case"|":case">":{X=`block scalar indicator ${$[0]}`;break}case"@":case"`":{X=`reserved character ${$[0]}`;break}}if(X)Z(0,"BAD_SCALAR_START",`Plain value cannot start with ${X}`);return E3($)}function $z($,Z){if($[$.length-1]!=="'"||$.length===1)Z($.length,"MISSING_CHAR","Missing closing 'quote");return E3($.slice(1,-1)).replace(/''/g,"'")}function E3($){let Z,X;try{Z=new RegExp(`(.*?)(?<![ ])[ ]*\r?
85
- `,"sy"),X=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
86
- `,"sy")}catch{Z=/(.*?)[ \t]*\r?\n/sy,X=/[ \t]*(.*?)[ \t]*\r?\n/sy}let U=Z.exec($);if(!U)return $;let z=U[1],Q=" ",J=Z.lastIndex;X.lastIndex=J;while(U=X.exec($)){if(U[1]==="")if(Q===`
87
- `)z+=Q;else Q=`
88
- `;else z+=Q+U[1],Q=" ";J=X.lastIndex}let H=/[ \t]*(.*)/sy;return H.lastIndex=J,U=H.exec($),z+Q+(U?.[1]??"")}function Zz($,Z){let X="";for(let U=1;U<$.length-1;++U){let z=$[U];if(z==="\r"&&$[U+1]===`
89
- `)continue;if(z===`
90
- `){let{fold:Q,offset:J}=Xz($,U);X+=Q,U=J}else if(z==="\\"){let Q=$[++U],J=Uz[Q];if(J)X+=J;else if(Q===`
91
- `){Q=$[U+1];while(Q===" "||Q==="\t")Q=$[++U+1]}else if(Q==="\r"&&$[U+1]===`
92
- `){Q=$[++U+1];while(Q===" "||Q==="\t")Q=$[++U+1]}else if(Q==="x"||Q==="u"||Q==="U"){let H={x:2,u:4,U:8}[Q];X+=zz($,U+1,H,Z),U+=H}else{let H=$.substr(U-1,2);Z(U-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${H}`),X+=H}}else if(z===" "||z==="\t"){let Q=U,J=$[U+1];while(J===" "||J==="\t")J=$[++U+1];if(J!==`
93
- `&&!(J==="\r"&&$[U+2]===`
94
- `))X+=U>Q?$.slice(Q,U+1):z}else X+=z}if($[$.length-1]!=='"'||$.length===1)Z($.length,"MISSING_CHAR",'Missing closing "quote');return X}function Xz($,Z){let X="",U=$[Z+1];while(U===" "||U==="\t"||U===`
95
- `||U==="\r"){if(U==="\r"&&$[Z+2]!==`
96
- `)break;if(U===`
97
- `)X+=`
98
- `;Z+=1,U=$[Z+1]}if(!X)X=" ";return{fold:X,offset:Z}}var Uz={"0":"\x00",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
99
- `,r:"\r",t:"\t",v:"\v",N:"…",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\","\t":"\t"};function zz($,Z,X,U){let z=$.substr(Z,X),J=z.length===X&&/^[0-9a-fA-F]+$/.test(z)?parseInt(z,16):NaN;if(isNaN(J)){let H=$.substr(Z-2,X+2);return U(Z-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${H}`),H}return String.fromCodePoint(J)}Qz.resolveFlowScalar=tU});var y3=R((Bz)=>{var L0=b(),g3=g(),Hz=D2(),qz=M2();function Gz($,Z,X,U){let{value:z,type:Q,comment:J,range:H}=Z.type==="block-scalar"?Hz.resolveBlockScalar($,Z,U):qz.resolveFlowScalar(Z,$.options.strict,U),q=X?$.directives.tagName(X.source,(_)=>U(X,"TAG_RESOLVE_FAILED",_)):null,G;if($.options.stringKeys&&$.atKey)G=$.schema[L0.SCALAR];else if(q)G=_z($.schema,z,q,X,U);else if(Z.type==="scalar")G=Yz($,z,Z,U);else G=$.schema[L0.SCALAR];let B;try{let _=G.resolve(z,(Y)=>U(X??Z,"TAG_RESOLVE_FAILED",Y),$.options);B=L0.isScalar(_)?_:new g3.Scalar(_)}catch(_){let Y=_ instanceof Error?_.message:String(_);U(X??Z,"TAG_RESOLVE_FAILED",Y),B=new g3.Scalar(z)}if(B.range=H,B.source=z,Q)B.type=Q;if(q)B.tag=q;if(G.format)B.format=G.format;if(J)B.comment=J;return B}function _z($,Z,X,U,z){if(X==="!")return $[L0.SCALAR];let Q=[];for(let H of $.tags)if(!H.collection&&H.tag===X)if(H.default&&H.test)Q.push(H);else return H;for(let H of Q)if(H.test?.test(Z))return H;let J=$.knownTags[X];if(J&&!J.collection)return $.tags.push(Object.assign({},J,{default:!1,test:void 0})),J;return z(U,"TAG_RESOLVE_FAILED",`Unresolved tag: ${X}`,X!=="tag:yaml.org,2002:str"),$[L0.SCALAR]}function Yz({atKey:$,directives:Z,schema:X},U,z,Q){let J=X.tags.find((H)=>(H.default===!0||$&&H.default==="key")&&H.test?.test(U))||X[L0.SCALAR];if(X.compat){let H=X.compat.find((q)=>q.default&&q.test?.test(U))??X[L0.SCALAR];if(J.tag!==H.tag){let q=Z.tagString(J.tag),G=Z.tagString(H.tag),B=`Value may be parsed as either ${q} or ${G}`;Q(z,"TAG_RESOLVE_FAILED",B,!0)}}return J}Bz.composeScalar=Gz});var f3=R((Wz)=>{function Oz($,Z,X){if(Z){X??(X=Z.length);for(let U=X-1;U>=0;--U){let z=Z[U];switch(z.type){case"space":case"comment":case"newline":$-=z.source.length;continue}z=Z[++U];while(z?.type==="space")$+=z.source.length,z=Z[++U];break}}return $}Wz.emptyScalarPosition=Oz});var u3=R((Kz)=>{var Iz=r0(),Dz=b(),Rz=S3(),h3=y3(),Mz=g0(),Fz=f3(),Pz={composeNode:x3,composeEmptyNode:F2};function x3($,Z,X,U){let z=$.atKey,{spaceBefore:Q,comment:J,anchor:H,tag:q}=X,G,B=!0;switch(Z.type){case"alias":if(G=Tz($,Z,U),H||q)U(Z,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":if(G=h3.composeScalar($,Z,q,U),H)G.anchor=H.source.substring(1);break;case"block-map":case"block-seq":case"flow-collection":try{if(G=Rz.composeCollection(Pz,$,Z,X,U),H)G.anchor=H.source.substring(1)}catch(_){let Y=_ instanceof Error?_.message:String(_);U(Z,"RESOURCE_EXHAUSTION",Y)}break;default:{let _=Z.type==="error"?Z.message:`Unsupported token (type: ${Z.type})`;U(Z,"UNEXPECTED_TOKEN",_),B=!1}}if(G??(G=F2($,Z.offset,void 0,null,X,U)),H&&G.anchor==="")U(H,"BAD_ALIAS","Anchor cannot be an empty string");if(z&&$.options.stringKeys&&(!Dz.isScalar(G)||typeof G.value!=="string"||G.tag&&G.tag!=="tag:yaml.org,2002:str"))U(q??Z,"NON_STRING_KEY","With stringKeys, all keys must be strings");if(Q)G.spaceBefore=!0;if(J)if(Z.type==="scalar"&&Z.source==="")G.comment=J;else G.commentBefore=J;if($.options.keepSourceTokens&&B)G.srcToken=Z;return G}function F2($,Z,X,U,{spaceBefore:z,comment:Q,anchor:J,tag:H,end:q},G){let B={type:"scalar",offset:Fz.emptyScalarPosition(Z,X,U),indent:-1,source:""},_=h3.composeScalar($,B,H,G);if(J){if(_.anchor=J.source.substring(1),_.anchor==="")G(J,"BAD_ALIAS","Anchor cannot be an empty string")}if(z)_.spaceBefore=!0;if(Q)_.comment=Q,_.range[2]=q;return _}function Tz({options:$},{offset:Z,source:X,end:U},z){let Q=new Iz.Alias(X.substring(1));if(Q.source==="")z(Z,"BAD_ALIAS","Alias cannot be an empty string");if(Q.source.endsWith(":"))z(Z+X.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let J=Z+X.length,H=Mz.resolveEnd(U,J,$.strict,z);if(Q.range=[Z,J,H.offset],H.comment)Q.comment=H.comment;return Q}Kz.composeEmptyNode=F2;Kz.composeNode=x3});var v3=R((Sz)=>{var wz=_$(),k3=u3(),bz=g0(),Cz=B$();function jz($,Z,{offset:X,start:U,value:z,end:Q},J){let H=Object.assign({_directives:Z},$),q=new wz.Document(void 0,H),G={atKey:!1,atRoot:!0,directives:q.directives,options:q.options,schema:q.schema},B=Cz.resolveProps(U,{indicator:"doc-start",next:z??Q?.[0],offset:X,onError:J,parentIndent:0,startOnNewline:!0});if(B.found){if(q.directives.docStart=!0,z&&(z.type==="block-map"||z.type==="block-seq")&&!B.hasNewline)J(B.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")}q.contents=z?k3.composeNode(G,z,B,J):k3.composeEmptyNode(G,B.end,U,null,B,J);let _=q.contents.range[2],Y=bz.resolveEnd(Q,_,!1,J);if(Y.comment)q.comment=Y.comment;return q.range=[X,_,Y.offset],q}Sz.composeDoc=jz});var P2=R((uz)=>{var gz=p0("process"),yz=N1(),fz=_$(),V$=Y$(),m3=b(),hz=v3(),xz=g0();function O$($){if(typeof $==="number")return[$,$+1];if(Array.isArray($))return $.length===2?$:[$[0],$[1]];let{offset:Z,source:X}=$;return[Z,Z+(typeof X==="string"?X.length:1)]}function p3($){let Z="",X=!1,U=!1;for(let z=0;z<$.length;++z){let Q=$[z];switch(Q[0]){case"#":Z+=(Z===""?"":U?`
76
+ `;Y+=q+O.slice(G)+L,q=`
77
+ `,W=!0}else if(L==="")if(q===`
78
+ `)Y+=`
79
+ `;else q=`
80
+ `;else Y+=q+L,q=" ",W=!1}switch(U.chomp){case"-":break;case"+":for(let V=H;V<J.length;++V)Y+=`
81
+ `+J[V][0].slice(G);if(Y[Y.length-1]!==`
82
+ `)Y+=`
83
+ `;break;default:Y+=`
84
+ `}let I=X+U.length+Z.source.length;return{value:Y,type:Q,comment:U.comment,range:[X,I,I]}}function ZU({offset:$,props:Z},z,X){if(Z[0].type!=="block-scalar-header")return X(Z[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:U}=Z[0],Q=U[0],J=0,H="",G=-1;for(let q=1;q<U.length;++q){let W=U[q];if(!H&&(W==="-"||W==="+"))H=W;else{let I=Number(W);if(!J&&I)J=I;else if(G===-1)G=$+q}}if(G!==-1)X(G,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${U}`);let _=!1,B="",Y=U.length;for(let q=1;q<Z.length;++q){let W=Z[q];switch(W.type){case"space":_=!0;case"newline":Y+=W.source.length;break;case"comment":if(z&&!_)X(W,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");Y+=W.source.length,B=W.source.substring(1);break;case"error":X(W,"UNEXPECTED_TOKEN",W.message),Y+=W.source.length;break;default:{let I=`Unexpected token in block scalar header: ${W.type}`;X(W,"UNEXPECTED_TOKEN",I);let V=W.source;if(V&&typeof V==="string")Y+=V.length}}}return{mode:Q,indent:J,chomp:H,comment:B,length:Y}}function zU($){let Z=$.split(/\n( *)/),z=Z[0],X=z.match(/^( *)/),Q=[X?.[1]?[X[1],z.slice(X[1].length)]:["",z]];for(let J=1;J<Z.length;J+=2)Q.push([Z[J],Z[J+1]]);return Q}XU.resolveBlockScalar=$U});var P2=D((VU)=>{var K2=g(),QU=g0();function JU($,Z,z){let{offset:X,type:U,source:Q,end:J}=$,H,G,_=(q,W,I)=>z(X+q,W,I);switch(U){case"scalar":H=K2.Scalar.PLAIN,G=HU(Q,_);break;case"single-quoted-scalar":H=K2.Scalar.QUOTE_SINGLE,G=GU(Q,_);break;case"double-quoted-scalar":H=K2.Scalar.QUOTE_DOUBLE,G=_U(Q,_);break;default:return z($,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${U}`),{value:"",type:null,comment:"",range:[X,X+Q.length,X+Q.length]}}let B=X+Q.length,Y=QU.resolveEnd(J,B,Z,z);return{value:G,type:H,comment:Y.comment,range:[X,B,Y.offset]}}function HU($,Z){let z="";switch($[0]){case"\t":z="a tab character";break;case",":z="flow indicator character ,";break;case"%":z="directive indicator character %";break;case"|":case">":{z=`block scalar indicator ${$[0]}`;break}case"@":case"`":{z=`reserved character ${$[0]}`;break}}if(z)Z(0,"BAD_SCALAR_START",`Plain value cannot start with ${z}`);return h8($)}function GU($,Z){if($[$.length-1]!=="'"||$.length===1)Z($.length,"MISSING_CHAR","Missing closing 'quote");return h8($.slice(1,-1)).replace(/''/g,"'")}function h8($){let Z,z;try{Z=new RegExp(`(.*?)(?<![ ])[ ]*\r?
85
+ `,"sy"),z=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
86
+ `,"sy")}catch{Z=/(.*?)[ \t]*\r?\n/sy,z=/[ \t]*(.*?)[ \t]*\r?\n/sy}let X=Z.exec($);if(!X)return $;let U=X[1],Q=" ",J=Z.lastIndex;z.lastIndex=J;while(X=z.exec($)){if(X[1]==="")if(Q===`
87
+ `)U+=Q;else Q=`
88
+ `;else U+=Q+X[1],Q=" ";J=z.lastIndex}let H=/[ \t]*(.*)/sy;return H.lastIndex=J,X=H.exec($),U+Q+(X?.[1]??"")}function _U($,Z){let z="";for(let X=1;X<$.length-1;++X){let U=$[X];if(U==="\r"&&$[X+1]===`
89
+ `)continue;if(U===`
90
+ `){let{fold:Q,offset:J}=YU($,X);z+=Q,X=J}else if(U==="\\"){let Q=$[++X],J=qU[Q];if(J)z+=J;else if(Q===`
91
+ `){Q=$[X+1];while(Q===" "||Q==="\t")Q=$[++X+1]}else if(Q==="\r"&&$[X+1]===`
92
+ `){Q=$[++X+1];while(Q===" "||Q==="\t")Q=$[++X+1]}else if(Q==="x"||Q==="u"||Q==="U"){let H={x:2,u:4,U:8}[Q];z+=BU($,X+1,H,Z),X+=H}else{let H=$.substr(X-1,2);Z(X-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${H}`),z+=H}}else if(U===" "||U==="\t"){let Q=X,J=$[X+1];while(J===" "||J==="\t")J=$[++X+1];if(J!==`
93
+ `&&!(J==="\r"&&$[X+2]===`
94
+ `))z+=X>Q?$.slice(Q,X+1):U}else z+=U}if($[$.length-1]!=='"'||$.length===1)Z($.length,"MISSING_CHAR",'Missing closing "quote');return z}function YU($,Z){let z="",X=$[Z+1];while(X===" "||X==="\t"||X===`
95
+ `||X==="\r"){if(X==="\r"&&$[Z+2]!==`
96
+ `)break;if(X===`
97
+ `)z+=`
98
+ `;Z+=1,X=$[Z+1]}if(!z)z=" ";return{fold:z,offset:Z}}var qU={"0":"\x00",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
99
+ `,r:"\r",t:"\t",v:"\v",N:"…",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\","\t":"\t"};function BU($,Z,z,X){let U=$.substr(Z,z),J=U.length===z&&/^[0-9a-fA-F]+$/.test(U)?parseInt(U,16):NaN;if(isNaN(J)){let H=$.substr(Z-2,z+2);return X(Z-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${H}`),H}return String.fromCodePoint(J)}VU.resolveFlowScalar=JU});var u8=D((FU)=>{var I0=b(),x8=g(),WU=M2(),IU=P2();function LU($,Z,z,X){let{value:U,type:Q,comment:J,range:H}=Z.type==="block-scalar"?WU.resolveBlockScalar($,Z,X):IU.resolveFlowScalar(Z,$.options.strict,X),G=z?$.directives.tagName(z.source,(Y)=>X(z,"TAG_RESOLVE_FAILED",Y)):null,_;if($.options.stringKeys&&$.atKey)_=$.schema[I0.SCALAR];else if(G)_=DU($.schema,U,G,z,X);else if(Z.type==="scalar")_=RU($,U,Z,X);else _=$.schema[I0.SCALAR];let B;try{let Y=_.resolve(U,(q)=>X(z??Z,"TAG_RESOLVE_FAILED",q),$.options);B=I0.isScalar(Y)?Y:new x8.Scalar(Y)}catch(Y){let q=Y instanceof Error?Y.message:String(Y);X(z??Z,"TAG_RESOLVE_FAILED",q),B=new x8.Scalar(U)}if(B.range=H,B.source=U,Q)B.type=Q;if(G)B.tag=G;if(_.format)B.format=_.format;if(J)B.comment=J;return B}function DU($,Z,z,X,U){if(z==="!")return $[I0.SCALAR];let Q=[];for(let H of $.tags)if(!H.collection&&H.tag===z)if(H.default&&H.test)Q.push(H);else return H;for(let H of Q)if(H.test?.test(Z))return H;let J=$.knownTags[z];if(J&&!J.collection)return $.tags.push(Object.assign({},J,{default:!1,test:void 0})),J;return U(X,"TAG_RESOLVE_FAILED",`Unresolved tag: ${z}`,z!=="tag:yaml.org,2002:str"),$[I0.SCALAR]}function RU({atKey:$,directives:Z,schema:z},X,U,Q){let J=z.tags.find((H)=>(H.default===!0||$&&H.default==="key")&&H.test?.test(X))||z[I0.SCALAR];if(z.compat){let H=z.compat.find((G)=>G.default&&G.test?.test(X))??z[I0.SCALAR];if(J.tag!==H.tag){let G=Z.tagString(J.tag),_=Z.tagString(H.tag),B=`Value may be parsed as either ${G} or ${_}`;Q(U,"TAG_RESOLVE_FAILED",B,!0)}}return J}FU.composeScalar=LU});var k8=D((PU)=>{function KU($,Z,z){if(Z){z??(z=Z.length);for(let X=z-1;X>=0;--X){let U=Z[X];switch(U.type){case"space":case"comment":case"newline":$-=U.source.length;continue}U=Z[++X];while(U?.type==="space")$+=U.source.length,U=Z[++X];break}}return $}PU.emptyScalarPosition=KU});var p8=D((EU)=>{var AU=r0(),NU=b(),wU=y8(),v8=u8(),bU=g0(),CU=k8(),jU={composeNode:m8,composeEmptyNode:T2};function m8($,Z,z,X){let U=$.atKey,{spaceBefore:Q,comment:J,anchor:H,tag:G}=z,_,B=!0;switch(Z.type){case"alias":if(_=SU($,Z,X),H||G)X(Z,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":if(_=v8.composeScalar($,Z,G,X),H)_.anchor=H.source.substring(1);break;case"block-map":case"block-seq":case"flow-collection":try{if(_=wU.composeCollection(jU,$,Z,z,X),H)_.anchor=H.source.substring(1)}catch(Y){let q=Y instanceof Error?Y.message:String(Y);X(Z,"RESOURCE_EXHAUSTION",q)}break;default:{let Y=Z.type==="error"?Z.message:`Unsupported token (type: ${Z.type})`;X(Z,"UNEXPECTED_TOKEN",Y),B=!1}}if(_??(_=T2($,Z.offset,void 0,null,z,X)),H&&_.anchor==="")X(H,"BAD_ALIAS","Anchor cannot be an empty string");if(U&&$.options.stringKeys&&(!NU.isScalar(_)||typeof _.value!=="string"||_.tag&&_.tag!=="tag:yaml.org,2002:str"))X(G??Z,"NON_STRING_KEY","With stringKeys, all keys must be strings");if(Q)_.spaceBefore=!0;if(J)if(Z.type==="scalar"&&Z.source==="")_.comment=J;else _.commentBefore=J;if($.options.keepSourceTokens&&B)_.srcToken=Z;return _}function T2($,Z,z,X,{spaceBefore:U,comment:Q,anchor:J,tag:H,end:G},_){let B={type:"scalar",offset:CU.emptyScalarPosition(Z,z,X),indent:-1,source:""},Y=v8.composeScalar($,B,H,_);if(J){if(Y.anchor=J.source.substring(1),Y.anchor==="")_(J,"BAD_ALIAS","Anchor cannot be an empty string")}if(U)Y.spaceBefore=!0;if(Q)Y.comment=Q,Y.range[2]=G;return Y}function SU({options:$},{offset:Z,source:z,end:X},U){let Q=new AU.Alias(z.substring(1));if(Q.source==="")U(Z,"BAD_ALIAS","Alias cannot be an empty string");if(Q.source.endsWith(":"))U(Z+z.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let J=Z+z.length,H=bU.resolveEnd(X,J,$.strict,U);if(Q.range=[Z,J,H.offset],H.comment)Q.comment=H.comment;return Q}EU.composeEmptyNode=T2;EU.composeNode=m8});var d8=D((kU)=>{var yU=Y$(),l8=p8(),hU=g0(),xU=B$();function uU($,Z,{offset:z,start:X,value:U,end:Q},J){let H=Object.assign({_directives:Z},$),G=new yU.Document(void 0,H),_={atKey:!1,atRoot:!0,directives:G.directives,options:G.options,schema:G.schema},B=xU.resolveProps(X,{indicator:"doc-start",next:U??Q?.[0],offset:z,onError:J,parentIndent:0,startOnNewline:!0});if(B.found){if(G.directives.docStart=!0,U&&(U.type==="block-map"||U.type==="block-seq")&&!B.hasNewline)J(B.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")}G.contents=U?l8.composeNode(_,U,B,J):l8.composeEmptyNode(_,B.end,X,null,B,J);let Y=G.contents.range[2],q=hU.resolveEnd(Q,Y,!1,J);if(q.comment)G.comment=q.comment;return G.range=[z,Y,q.offset],G}kU.composeDoc=uU});var A2=D((iU)=>{var mU=p0("process"),pU=C1(),lU=Y$(),V$=q$(),c8=b(),dU=d8(),cU=g0();function O$($){if(typeof $==="number")return[$,$+1];if(Array.isArray($))return $.length===2?$:[$[0],$[1]];let{offset:Z,source:z}=$;return[Z,Z+(typeof z==="string"?z.length:1)]}function i8($){let Z="",z=!1,X=!1;for(let U=0;U<$.length;++U){let Q=$[U];switch(Q[0]){case"#":Z+=(Z===""?"":X?`
100
100
 
101
101
  `:`
102
- `)+(Q.substring(1)||" "),X=!0,U=!1;break;case"%":if($[z+1]?.[0]!=="#")z+=1;X=!1;break;default:if(!X)U=!0;X=!1}}return{comment:Z,afterEmptyLine:U}}class l3{constructor($={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(Z,X,U,z)=>{let Q=O$(Z);if(z)this.warnings.push(new V$.YAMLWarning(Q,X,U));else this.errors.push(new V$.YAMLParseError(Q,X,U))},this.directives=new yz.Directives({version:$.version||"1.2"}),this.options=$}decorate($,Z){let{comment:X,afterEmptyLine:U}=p3(this.prelude);if(X){let z=$.contents;if(Z)$.comment=$.comment?`${$.comment}
103
- ${X}`:X;else if(U||$.directives.docStart||!z)$.commentBefore=X;else if(m3.isCollection(z)&&!z.flow&&z.items.length>0){let Q=z.items[0];if(m3.isPair(Q))Q=Q.key;let J=Q.commentBefore;Q.commentBefore=J?`${X}
104
- ${J}`:X}else{let Q=z.commentBefore;z.commentBefore=Q?`${X}
105
- ${Q}`:X}}if(Z)Array.prototype.push.apply($.errors,this.errors),Array.prototype.push.apply($.warnings,this.warnings);else $.errors=this.errors,$.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:p3(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose($,Z=!1,X=-1){for(let U of $)yield*this.next(U);yield*this.end(Z,X)}*next($){if(gz.env.LOG_STREAM)console.dir($,{depth:null});switch($.type){case"directive":this.directives.add($.source,(Z,X,U)=>{let z=O$($);z[0]+=Z,this.onError(z,"BAD_DIRECTIVE",X,U)}),this.prelude.push($.source),this.atDirectives=!0;break;case"document":{let Z=hz.composeDoc(this.options,this.directives,$,this.onError);if(this.atDirectives&&!Z.directives.docStart)this.onError($,"MISSING_CHAR","Missing directives-end/doc-start indicator line");if(this.decorate(Z,!1),this.doc)yield this.doc;this.doc=Z,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push($.source);break;case"error":{let Z=$.source?`${$.message}: ${JSON.stringify($.source)}`:$.message,X=new V$.YAMLParseError(O$($),"UNEXPECTED_TOKEN",Z);if(this.atDirectives||!this.doc)this.errors.push(X);else this.doc.errors.push(X);break}case"doc-end":{if(!this.doc){this.errors.push(new V$.YAMLParseError(O$($),"UNEXPECTED_TOKEN","Unexpected doc-end without preceding document"));break}this.doc.directives.docEnd=!0;let Z=xz.resolveEnd($.end,$.offset+$.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),Z.comment){let X=this.doc.comment;this.doc.comment=X?`${X}
106
- ${Z.comment}`:Z.comment}this.doc.range[2]=Z.offset;break}default:this.errors.push(new V$.YAMLParseError(O$($),"UNEXPECTED_TOKEN",`Unsupported token ${$.type}`))}}*end($=!1,Z=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if($){let X=Object.assign({_directives:this.directives},this.options),U=new fz.Document(void 0,X);if(this.atDirectives)this.onError(Z,"MISSING_CHAR","Missing directives-end indicator line");U.range=[0,Z,Z],this.decorate(U,!1),yield U}}}uz.Composer=l3});var i3=R((sz)=>{var vz=D2(),mz=M2(),pz=Y$(),d3=e0();function lz($,Z=!0,X){if($){let U=(z,Q,J)=>{let H=typeof z==="number"?z:Array.isArray(z)?z[0]:z.offset;if(X)X(H,Q,J);else throw new pz.YAMLParseError([H,H+1],Q,J)};switch($.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return mz.resolveFlowScalar($,Z,U);case"block-scalar":return vz.resolveBlockScalar({options:{strict:Z}},$,U)}}return null}function dz($,Z){let{implicitKey:X=!1,indent:U,inFlow:z=!1,offset:Q=-1,type:J="PLAIN"}=Z,H=d3.stringifyString({type:J,value:$},{implicitKey:X,indent:U>0?" ".repeat(U):"",inFlow:z,options:{blockQuote:!0,lineWidth:-1}}),q=Z.end??[{type:"newline",offset:-1,indent:U,source:`
107
- `}];switch(H[0]){case"|":case">":{let G=H.indexOf(`
108
- `),B=H.substring(0,G),_=H.substring(G+1)+`
109
- `,Y=[{type:"block-scalar-header",offset:Q,indent:U,source:B}];if(!c3(Y,q))Y.push({type:"newline",offset:-1,indent:U,source:`
110
- `});return{type:"block-scalar",offset:Q,indent:U,props:Y,source:_}}case'"':return{type:"double-quoted-scalar",offset:Q,indent:U,source:H,end:q};case"'":return{type:"single-quoted-scalar",offset:Q,indent:U,source:H,end:q};default:return{type:"scalar",offset:Q,indent:U,source:H,end:q}}}function cz($,Z,X={}){let{afterKey:U=!1,implicitKey:z=!1,inFlow:Q=!1,type:J}=X,H="indent"in $?$.indent:null;if(U&&typeof H==="number")H+=2;if(!J)switch($.type){case"single-quoted-scalar":J="QUOTE_SINGLE";break;case"double-quoted-scalar":J="QUOTE_DOUBLE";break;case"block-scalar":{let G=$.props[0];if(G.type!=="block-scalar-header")throw Error("Invalid block scalar header");J=G.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:J="PLAIN"}let q=d3.stringifyString({type:J,value:Z},{implicitKey:z||H===null,indent:H!==null&&H>0?" ".repeat(H):"",inFlow:Q,options:{blockQuote:!0,lineWidth:-1}});switch(q[0]){case"|":case">":iz($,q);break;case'"':T2($,q,"double-quoted-scalar");break;case"'":T2($,q,"single-quoted-scalar");break;default:T2($,q,"scalar")}}function iz($,Z){let X=Z.indexOf(`
111
- `),U=Z.substring(0,X),z=Z.substring(X+1)+`
112
- `;if($.type==="block-scalar"){let Q=$.props[0];if(Q.type!=="block-scalar-header")throw Error("Invalid block scalar header");Q.source=U,$.source=z}else{let{offset:Q}=$,J="indent"in $?$.indent:-1,H=[{type:"block-scalar-header",offset:Q,indent:J,source:U}];if(!c3(H,"end"in $?$.end:void 0))H.push({type:"newline",offset:-1,indent:J,source:`
113
- `});for(let q of Object.keys($))if(q!=="type"&&q!=="offset")delete $[q];Object.assign($,{type:"block-scalar",indent:J,props:H,source:z})}}function c3($,Z){if(Z)for(let X of Z)switch(X.type){case"space":case"comment":$.push(X);break;case"newline":return $.push(X),!0}return!1}function T2($,Z,X){switch($.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":$.type=X,$.source=Z;break;case"block-scalar":{let U=$.props.slice(1),z=Z.length;if($.props[0].type==="block-scalar-header")z-=$.props[0].source.length;for(let Q of U)Q.offset+=z;delete $.props,Object.assign($,{type:X,source:Z,end:U});break}case"block-map":case"block-seq":{let z={type:"newline",offset:$.offset+Z.length,indent:$.indent,source:`
114
- `};delete $.items,Object.assign($,{type:X,source:Z,end:[z]});break}default:{let U="indent"in $?$.indent:-1,z="end"in $&&Array.isArray($.end)?$.end.filter((Q)=>Q.type==="space"||Q.type==="comment"||Q.type==="newline"):[];for(let Q of Object.keys($))if(Q!=="type"&&Q!=="offset")delete $[Q];Object.assign($,{type:X,indent:U,source:Z,end:z})}}}sz.createScalarToken=dz;sz.resolveAsScalar=lz;sz.setScalarValue=cz});var s3=R((tz)=>{var oz=($)=>("type"in $)?J1($):Q1($);function J1($){switch($.type){case"block-scalar":{let Z="";for(let X of $.props)Z+=J1(X);return Z+$.source}case"block-map":case"block-seq":{let Z="";for(let X of $.items)Z+=Q1(X);return Z}case"flow-collection":{let Z=$.start.source;for(let X of $.items)Z+=Q1(X);for(let X of $.end)Z+=X.source;return Z}case"document":{let Z=Q1($);if($.end)for(let X of $.end)Z+=X.source;return Z}default:{let Z=$.source;if("end"in $&&$.end)for(let X of $.end)Z+=X.source;return Z}}}function Q1({start:$,key:Z,sep:X,value:U}){let z="";for(let Q of $)z+=Q.source;if(Z)z+=J1(Z);if(X)for(let Q of X)z+=Q.source;if(U)z+=J1(U);return z}tz.stringify=oz});var n3=R((ZQ)=>{var K2=Symbol("break visit"),$Q=Symbol("skip children"),a3=Symbol("remove item");function I0($,Z){if("type"in $&&$.type==="document")$={start:$.start,value:$.value};r3(Object.freeze([]),$,Z)}I0.BREAK=K2;I0.SKIP=$Q;I0.REMOVE=a3;I0.itemAtPath=($,Z)=>{let X=$;for(let[U,z]of Z){let Q=X?.[U];if(Q&&"items"in Q)X=Q.items[z];else return}return X};I0.parentCollection=($,Z)=>{let X=I0.itemAtPath($,Z.slice(0,-1)),U=Z[Z.length-1][0],z=X?.[U];if(z&&"items"in z)return z;throw Error("Parent collection not found")};function r3($,Z,X){let U=X(Z,$);if(typeof U==="symbol")return U;for(let z of["key","value"]){let Q=Z[z];if(Q&&"items"in Q){for(let J=0;J<Q.items.length;++J){let H=r3(Object.freeze($.concat([[z,J]])),Q.items[J],X);if(typeof H==="number")J=H-1;else if(H===K2)return K2;else if(H===a3)Q.items.splice(J,1),J-=1}if(typeof U==="function"&&z==="key")U=U(Z,$)}}return typeof U==="function"?U(Z,$):U}ZQ.visit=I0});var H1=R((GQ)=>{var A2=i3(),UQ=s3(),zQ=n3(),N2="\uFEFF",w2="\x02",b2="\x18",C2="\x1F",QQ=($)=>!!$&&("items"in $),JQ=($)=>!!$&&($.type==="scalar"||$.type==="single-quoted-scalar"||$.type==="double-quoted-scalar"||$.type==="block-scalar");function HQ($){switch($){case N2:return"<BOM>";case w2:return"<DOC>";case b2:return"<FLOW_END>";case C2:return"<SCALAR>";default:return JSON.stringify($)}}function qQ($){switch($){case N2:return"byte-order-mark";case w2:return"doc-mode";case b2:return"flow-error-end";case C2:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
102
+ `)+(Q.substring(1)||" "),z=!0,X=!1;break;case"%":if($[U+1]?.[0]!=="#")U+=1;z=!1;break;default:if(!z)X=!0;z=!1}}return{comment:Z,afterEmptyLine:X}}class s8{constructor($={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(Z,z,X,U)=>{let Q=O$(Z);if(U)this.warnings.push(new V$.YAMLWarning(Q,z,X));else this.errors.push(new V$.YAMLParseError(Q,z,X))},this.directives=new pU.Directives({version:$.version||"1.2"}),this.options=$}decorate($,Z){let{comment:z,afterEmptyLine:X}=i8(this.prelude);if(z){let U=$.contents;if(Z)$.comment=$.comment?`${$.comment}
103
+ ${z}`:z;else if(X||$.directives.docStart||!U)$.commentBefore=z;else if(c8.isCollection(U)&&!U.flow&&U.items.length>0){let Q=U.items[0];if(c8.isPair(Q))Q=Q.key;let J=Q.commentBefore;Q.commentBefore=J?`${z}
104
+ ${J}`:z}else{let Q=U.commentBefore;U.commentBefore=Q?`${z}
105
+ ${Q}`:z}}if(Z)Array.prototype.push.apply($.errors,this.errors),Array.prototype.push.apply($.warnings,this.warnings);else $.errors=this.errors,$.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:i8(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose($,Z=!1,z=-1){for(let X of $)yield*this.next(X);yield*this.end(Z,z)}*next($){if(mU.env.LOG_STREAM)console.dir($,{depth:null});switch($.type){case"directive":this.directives.add($.source,(Z,z,X)=>{let U=O$($);U[0]+=Z,this.onError(U,"BAD_DIRECTIVE",z,X)}),this.prelude.push($.source),this.atDirectives=!0;break;case"document":{let Z=dU.composeDoc(this.options,this.directives,$,this.onError);if(this.atDirectives&&!Z.directives.docStart)this.onError($,"MISSING_CHAR","Missing directives-end/doc-start indicator line");if(this.decorate(Z,!1),this.doc)yield this.doc;this.doc=Z,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push($.source);break;case"error":{let Z=$.source?`${$.message}: ${JSON.stringify($.source)}`:$.message,z=new V$.YAMLParseError(O$($),"UNEXPECTED_TOKEN",Z);if(this.atDirectives||!this.doc)this.errors.push(z);else this.doc.errors.push(z);break}case"doc-end":{if(!this.doc){this.errors.push(new V$.YAMLParseError(O$($),"UNEXPECTED_TOKEN","Unexpected doc-end without preceding document"));break}this.doc.directives.docEnd=!0;let Z=cU.resolveEnd($.end,$.offset+$.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),Z.comment){let z=this.doc.comment;this.doc.comment=z?`${z}
106
+ ${Z.comment}`:Z.comment}this.doc.range[2]=Z.offset;break}default:this.errors.push(new V$.YAMLParseError(O$($),"UNEXPECTED_TOKEN",`Unsupported token ${$.type}`))}}*end($=!1,Z=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if($){let z=Object.assign({_directives:this.directives},this.options),X=new lU.Document(void 0,z);if(this.atDirectives)this.onError(Z,"MISSING_CHAR","Missing directives-end indicator line");X.range=[0,Z,Z],this.decorate(X,!1),yield X}}}iU.Composer=s8});var n8=D((ZQ)=>{var aU=M2(),rU=P2(),nU=q$(),a8=e0();function oU($,Z=!0,z){if($){let X=(U,Q,J)=>{let H=typeof U==="number"?U:Array.isArray(U)?U[0]:U.offset;if(z)z(H,Q,J);else throw new nU.YAMLParseError([H,H+1],Q,J)};switch($.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return rU.resolveFlowScalar($,Z,X);case"block-scalar":return aU.resolveBlockScalar({options:{strict:Z}},$,X)}}return null}function tU($,Z){let{implicitKey:z=!1,indent:X,inFlow:U=!1,offset:Q=-1,type:J="PLAIN"}=Z,H=a8.stringifyString({type:J,value:$},{implicitKey:z,indent:X>0?" ".repeat(X):"",inFlow:U,options:{blockQuote:!0,lineWidth:-1}}),G=Z.end??[{type:"newline",offset:-1,indent:X,source:`
107
+ `}];switch(H[0]){case"|":case">":{let _=H.indexOf(`
108
+ `),B=H.substring(0,_),Y=H.substring(_+1)+`
109
+ `,q=[{type:"block-scalar-header",offset:Q,indent:X,source:B}];if(!r8(q,G))q.push({type:"newline",offset:-1,indent:X,source:`
110
+ `});return{type:"block-scalar",offset:Q,indent:X,props:q,source:Y}}case'"':return{type:"double-quoted-scalar",offset:Q,indent:X,source:H,end:G};case"'":return{type:"single-quoted-scalar",offset:Q,indent:X,source:H,end:G};default:return{type:"scalar",offset:Q,indent:X,source:H,end:G}}}function eU($,Z,z={}){let{afterKey:X=!1,implicitKey:U=!1,inFlow:Q=!1,type:J}=z,H="indent"in $?$.indent:null;if(X&&typeof H==="number")H+=2;if(!J)switch($.type){case"single-quoted-scalar":J="QUOTE_SINGLE";break;case"double-quoted-scalar":J="QUOTE_DOUBLE";break;case"block-scalar":{let _=$.props[0];if(_.type!=="block-scalar-header")throw Error("Invalid block scalar header");J=_.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:J="PLAIN"}let G=a8.stringifyString({type:J,value:Z},{implicitKey:U||H===null,indent:H!==null&&H>0?" ".repeat(H):"",inFlow:Q,options:{blockQuote:!0,lineWidth:-1}});switch(G[0]){case"|":case">":$Q($,G);break;case'"':N2($,G,"double-quoted-scalar");break;case"'":N2($,G,"single-quoted-scalar");break;default:N2($,G,"scalar")}}function $Q($,Z){let z=Z.indexOf(`
111
+ `),X=Z.substring(0,z),U=Z.substring(z+1)+`
112
+ `;if($.type==="block-scalar"){let Q=$.props[0];if(Q.type!=="block-scalar-header")throw Error("Invalid block scalar header");Q.source=X,$.source=U}else{let{offset:Q}=$,J="indent"in $?$.indent:-1,H=[{type:"block-scalar-header",offset:Q,indent:J,source:X}];if(!r8(H,"end"in $?$.end:void 0))H.push({type:"newline",offset:-1,indent:J,source:`
113
+ `});for(let G of Object.keys($))if(G!=="type"&&G!=="offset")delete $[G];Object.assign($,{type:"block-scalar",indent:J,props:H,source:U})}}function r8($,Z){if(Z)for(let z of Z)switch(z.type){case"space":case"comment":$.push(z);break;case"newline":return $.push(z),!0}return!1}function N2($,Z,z){switch($.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":$.type=z,$.source=Z;break;case"block-scalar":{let X=$.props.slice(1),U=Z.length;if($.props[0].type==="block-scalar-header")U-=$.props[0].source.length;for(let Q of X)Q.offset+=U;delete $.props,Object.assign($,{type:z,source:Z,end:X});break}case"block-map":case"block-seq":{let U={type:"newline",offset:$.offset+Z.length,indent:$.indent,source:`
114
+ `};delete $.items,Object.assign($,{type:z,source:Z,end:[U]});break}default:{let X="indent"in $?$.indent:-1,U="end"in $&&Array.isArray($.end)?$.end.filter((Q)=>Q.type==="space"||Q.type==="comment"||Q.type==="newline"):[];for(let Q of Object.keys($))if(Q!=="type"&&Q!=="offset")delete $[Q];Object.assign($,{type:z,indent:X,source:Z,end:U})}}}ZQ.createScalarToken=tU;ZQ.resolveAsScalar=oU;ZQ.setScalarValue=eU});var o8=D((JQ)=>{var QQ=($)=>("type"in $)?J1($):Q1($);function J1($){switch($.type){case"block-scalar":{let Z="";for(let z of $.props)Z+=J1(z);return Z+$.source}case"block-map":case"block-seq":{let Z="";for(let z of $.items)Z+=Q1(z);return Z}case"flow-collection":{let Z=$.start.source;for(let z of $.items)Z+=Q1(z);for(let z of $.end)Z+=z.source;return Z}case"document":{let Z=Q1($);if($.end)for(let z of $.end)Z+=z.source;return Z}default:{let Z=$.source;if("end"in $&&$.end)for(let z of $.end)Z+=z.source;return Z}}}function Q1({start:$,key:Z,sep:z,value:X}){let U="";for(let Q of $)U+=Q.source;if(Z)U+=J1(Z);if(z)for(let Q of z)U+=Q.source;if(X)U+=J1(X);return U}JQ.stringify=QQ});var $9=D((_Q)=>{var w2=Symbol("break visit"),GQ=Symbol("skip children"),t8=Symbol("remove item");function L0($,Z){if("type"in $&&$.type==="document")$={start:$.start,value:$.value};e8(Object.freeze([]),$,Z)}L0.BREAK=w2;L0.SKIP=GQ;L0.REMOVE=t8;L0.itemAtPath=($,Z)=>{let z=$;for(let[X,U]of Z){let Q=z?.[X];if(Q&&"items"in Q)z=Q.items[U];else return}return z};L0.parentCollection=($,Z)=>{let z=L0.itemAtPath($,Z.slice(0,-1)),X=Z[Z.length-1][0],U=z?.[X];if(U&&"items"in U)return U;throw Error("Parent collection not found")};function e8($,Z,z){let X=z(Z,$);if(typeof X==="symbol")return X;for(let U of["key","value"]){let Q=Z[U];if(Q&&"items"in Q){for(let J=0;J<Q.items.length;++J){let H=e8(Object.freeze($.concat([[U,J]])),Q.items[J],z);if(typeof H==="number")J=H-1;else if(H===w2)return w2;else if(H===t8)Q.items.splice(J,1),J-=1}if(typeof X==="function"&&U==="key")X=X(Z,$)}}return typeof X==="function"?X(Z,$):X}_Q.visit=L0});var H1=D((LQ)=>{var b2=n8(),qQ=o8(),BQ=$9(),C2="\uFEFF",j2="\x02",S2="\x18",E2="\x1F",VQ=($)=>!!$&&("items"in $),OQ=($)=>!!$&&($.type==="scalar"||$.type==="single-quoted-scalar"||$.type==="double-quoted-scalar"||$.type==="block-scalar");function WQ($){switch($){case C2:return"<BOM>";case j2:return"<DOC>";case S2:return"<FLOW_END>";case E2:return"<SCALAR>";default:return JSON.stringify($)}}function IQ($){switch($){case C2:return"byte-order-mark";case j2:return"doc-mode";case S2:return"flow-error-end";case E2:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
115
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($[0]){case" ":case"\t":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}GQ.createScalarToken=A2.createScalarToken;GQ.resolveAsScalar=A2.resolveAsScalar;GQ.setScalarValue=A2.setScalarValue;GQ.stringify=UQ.stringify;GQ.visit=zQ.visit;GQ.BOM=N2;GQ.DOCUMENT=w2;GQ.FLOW_END=b2;GQ.SCALAR=C2;GQ.isCollection=QQ;GQ.isScalar=JQ;GQ.prettyToken=HQ;GQ.tokenType=qQ});var S2=R((AQ)=>{var W$=H1();function p($){switch($){case void 0:case" ":case`
117
- `:case"\r":case"\t":return!0;default:return!1}}var o3=new Set("0123456789ABCDEFabcdef"),TQ=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),q1=new Set(",[]{}"),KQ=new Set(` ,[]{}
118
- \r `),j2=($)=>!$||KQ.has($);class t3{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($,Z=!1){if($){if(typeof $!=="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+$:$,this.lineEndPos=null}this.atEnd=!Z;let X=this.next??"stream";while(X&&(Z||this.hasChars(1)))X=yield*this.parseNext(X)}atLineEnd(){let $=this.pos,Z=this.buffer[$];while(Z===" "||Z==="\t")Z=this.buffer[++$];if(!Z||Z==="#"||Z===`
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($[0]){case" ":case"\t":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}LQ.createScalarToken=b2.createScalarToken;LQ.resolveAsScalar=b2.resolveAsScalar;LQ.setScalarValue=b2.setScalarValue;LQ.stringify=qQ.stringify;LQ.visit=BQ.visit;LQ.BOM=C2;LQ.DOCUMENT=j2;LQ.FLOW_END=S2;LQ.SCALAR=E2;LQ.isCollection=VQ;LQ.isScalar=OQ;LQ.prettyToken=WQ;LQ.tokenType=IQ});var f2=D((gQ)=>{var W$=H1();function p($){switch($){case void 0:case" ":case`
117
+ `:case"\r":case"\t":return!0;default:return!1}}var Z9=new Set("0123456789ABCDEFabcdef"),SQ=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),G1=new Set(",[]{}"),EQ=new Set(` ,[]{}
118
+ \r `),g2=($)=>!$||EQ.has($);class z9{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($,Z=!1){if($){if(typeof $!=="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+$:$,this.lineEndPos=null}this.atEnd=!Z;let z=this.next??"stream";while(z&&(Z||this.hasChars(1)))z=yield*this.parseNext(z)}atLineEnd(){let $=this.pos,Z=this.buffer[$];while(Z===" "||Z==="\t")Z=this.buffer[++$];if(!Z||Z==="#"||Z===`
119
119
  `)return!0;if(Z==="\r")return this.buffer[$+1]===`
120
- `;return!1}charAt($){return this.buffer[this.pos+$]}continueScalar($){let Z=this.buffer[$];if(this.indentNext>0){let X=0;while(Z===" ")Z=this.buffer[++X+$];if(Z==="\r"){let U=this.buffer[X+$+1];if(U===`
121
- `||!U&&!this.atEnd)return $+X+1}return Z===`
122
- `||X>=this.indentNext||!Z&&!this.atEnd?$+X:-1}if(Z==="-"||Z==="."){let X=this.buffer.substr($,3);if((X==="---"||X==="...")&&p(this.buffer[$+3]))return-1}return $}getLine(){let $=this.lineEndPos;if(typeof $!=="number"||$!==-1&&$<this.pos)$=this.buffer.indexOf(`
123
- `,this.pos),this.lineEndPos=$;if($===-1)return this.atEnd?this.buffer.substring(this.pos):null;if(this.buffer[$-1]==="\r")$-=1;return this.buffer.substring(this.pos,$)}hasChars($){return this.pos+$<=this.buffer.length}setNext($){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=$,null}peek($){return this.buffer.substr(this.pos,$)}*parseNext($){switch($){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let $=this.getLine();if($===null)return this.setNext("stream");if($[0]===W$.BOM)yield*this.pushCount(1),$=$.substring(1);if($[0]==="%"){let Z=$.length,X=$.indexOf("#");while(X!==-1){let z=$[X-1];if(z===" "||z==="\t"){Z=X-1;break}else X=$.indexOf("#",X+1)}while(!0){let z=$[Z-1];if(z===" "||z==="\t")Z-=1;else break}let U=(yield*this.pushCount(Z))+(yield*this.pushSpaces(!0));return yield*this.pushCount($.length-U),this.pushNewline(),"stream"}if(this.atLineEnd()){let Z=yield*this.pushSpaces(!0);return yield*this.pushCount($.length-Z),yield*this.pushNewline(),"stream"}return yield W$.DOCUMENT,yield*this.parseLineStart()}*parseLineStart(){let $=this.charAt(0);if(!$&&!this.atEnd)return this.setNext("line-start");if($==="-"||$==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");let Z=this.peek(3);if((Z==="---"||Z==="...")&&p(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,Z==="---"?"doc":"stream"}if(this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!p(this.charAt(1)))this.indentNext=this.indentValue;return yield*this.parseBlockStart()}*parseBlockStart(){let[$,Z]=this.peek(2);if(!Z&&!this.atEnd)return this.setNext("block-start");if(($==="-"||$==="?"||$===":")&&p(Z)){let X=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=X,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let $=this.getLine();if($===null)return this.setNext("doc");let Z=yield*this.pushIndicators();switch($[Z]){case"#":yield*this.pushCount($.length-Z);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(j2),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return Z+=yield*this.parseBlockScalarHeader(),Z+=yield*this.pushSpaces(!0),yield*this.pushCount($.length-Z),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let $,Z,X=-1;do{if($=yield*this.pushNewline(),$>0)Z=yield*this.pushSpaces(!1),this.indentValue=X=Z;else Z=0;Z+=yield*this.pushSpaces(!0)}while($+Z>0);let U=this.getLine();if(U===null)return this.setNext("flow");if(X!==-1&&X<this.indentNext&&U[0]!=="#"||X===0&&(U.startsWith("---")||U.startsWith("..."))&&p(U[3])){if(!(X===this.indentNext-1&&this.flowLevel===1&&(U[0]==="]"||U[0]==="}")))return this.flowLevel=0,yield W$.FLOW_END,yield*this.parseLineStart()}let z=0;while(U[z]===",")z+=yield*this.pushCount(1),z+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(z+=yield*this.pushIndicators(),U[z]){case void 0:return"flow";case"#":return yield*this.pushCount(U.length-z),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(j2),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let Q=this.charAt(1);if(this.flowKey||p(Q)||Q===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let $=this.charAt(0),Z=this.buffer.indexOf($,this.pos+1);if($==="'")while(Z!==-1&&this.buffer[Z+1]==="'")Z=this.buffer.indexOf("'",Z+2);else while(Z!==-1){let z=0;while(this.buffer[Z-1-z]==="\\")z+=1;if(z%2===0)break;Z=this.buffer.indexOf('"',Z+1)}let X=this.buffer.substring(0,Z),U=X.indexOf(`
124
- `,this.pos);if(U!==-1){while(U!==-1){let z=this.continueScalar(U+1);if(z===-1)break;U=X.indexOf(`
125
- `,z)}if(U!==-1)Z=U-(X[U-1]==="\r"?2:1)}if(Z===-1){if(!this.atEnd)return this.setNext("quoted-scalar");Z=this.buffer.length}return yield*this.pushToIndex(Z+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let $=this.pos;while(!0){let Z=this.buffer[++$];if(Z==="+")this.blockScalarKeep=!0;else if(Z>"0"&&Z<="9")this.blockScalarIndent=Number(Z)-1;else if(Z!=="-")break}return yield*this.pushUntil((Z)=>p(Z)||Z==="#")}*parseBlockScalar(){let $=this.pos-1,Z=0,X;$:for(let z=this.pos;X=this.buffer[z];++z)switch(X){case" ":Z+=1;break;case`
126
- `:$=z,Z=0;break;case"\r":{let Q=this.buffer[z+1];if(!Q&&!this.atEnd)return this.setNext("block-scalar");if(Q===`
127
- `)break}default:break $}if(!X&&!this.atEnd)return this.setNext("block-scalar");if(Z>=this.indentNext){if(this.blockScalarIndent===-1)this.indentNext=Z;else this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{let z=this.continueScalar($+1);if(z===-1)break;$=this.buffer.indexOf(`
128
- `,z)}while($!==-1);if($===-1){if(!this.atEnd)return this.setNext("block-scalar");$=this.buffer.length}}let U=$+1;X=this.buffer[U];while(X===" ")X=this.buffer[++U];if(X==="\t"){while(X==="\t"||X===" "||X==="\r"||X===`
129
- `)X=this.buffer[++U];$=U-1}else if(!this.blockScalarKeep)do{let z=$-1,Q=this.buffer[z];if(Q==="\r")Q=this.buffer[--z];let J=z;while(Q===" ")Q=this.buffer[--z];if(Q===`
130
- `&&z>=this.pos&&z+1+Z>J)$=z;else break}while(!0);return yield W$.SCALAR,yield*this.pushToIndex($+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let $=this.flowLevel>0,Z=this.pos-1,X=this.pos-1,U;while(U=this.buffer[++X])if(U===":"){let z=this.buffer[X+1];if(p(z)||$&&q1.has(z))break;Z=X}else if(p(U)){let z=this.buffer[X+1];if(U==="\r")if(z===`
131
- `)X+=1,U=`
132
- `,z=this.buffer[X+1];else Z=X;if(z==="#"||$&&q1.has(z))break;if(U===`
133
- `){let Q=this.continueScalar(X+1);if(Q===-1)break;X=Math.max(X,Q-2)}}else{if($&&q1.has(U))break;Z=X}if(!U&&!this.atEnd)return this.setNext("plain-scalar");return yield W$.SCALAR,yield*this.pushToIndex(Z+1,!0),$?"flow":"doc"}*pushCount($){if($>0)return yield this.buffer.substr(this.pos,$),this.pos+=$,$;return 0}*pushToIndex($,Z){let X=this.buffer.slice(this.pos,$);if(X)return yield X,this.pos+=X.length,X.length;else if(Z)yield"";return 0}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(j2))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{let $=this.flowLevel>0,Z=this.charAt(1);if(p(Z)||$&&q1.has(Z)){if(!$)this.indentNext=this.indentValue+1;else if(this.flowKey)this.flowKey=!1;return(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}}return 0}*pushTag(){if(this.charAt(1)==="<"){let $=this.pos+2,Z=this.buffer[$];while(!p(Z)&&Z!==">")Z=this.buffer[++$];return yield*this.pushToIndex(Z===">"?$+1:$,!1)}else{let $=this.pos+1,Z=this.buffer[$];while(Z)if(TQ.has(Z))Z=this.buffer[++$];else if(Z==="%"&&o3.has(this.buffer[$+1])&&o3.has(this.buffer[$+2]))Z=this.buffer[$+=3];else break;return yield*this.pushToIndex($,!1)}}*pushNewline(){let $=this.buffer[this.pos];if($===`
120
+ `;return!1}charAt($){return this.buffer[this.pos+$]}continueScalar($){let Z=this.buffer[$];if(this.indentNext>0){let z=0;while(Z===" ")Z=this.buffer[++z+$];if(Z==="\r"){let X=this.buffer[z+$+1];if(X===`
121
+ `||!X&&!this.atEnd)return $+z+1}return Z===`
122
+ `||z>=this.indentNext||!Z&&!this.atEnd?$+z:-1}if(Z==="-"||Z==="."){let z=this.buffer.substr($,3);if((z==="---"||z==="...")&&p(this.buffer[$+3]))return-1}return $}getLine(){let $=this.lineEndPos;if(typeof $!=="number"||$!==-1&&$<this.pos)$=this.buffer.indexOf(`
123
+ `,this.pos),this.lineEndPos=$;if($===-1)return this.atEnd?this.buffer.substring(this.pos):null;if(this.buffer[$-1]==="\r")$-=1;return this.buffer.substring(this.pos,$)}hasChars($){return this.pos+$<=this.buffer.length}setNext($){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=$,null}peek($){return this.buffer.substr(this.pos,$)}*parseNext($){switch($){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let $=this.getLine();if($===null)return this.setNext("stream");if($[0]===W$.BOM)yield*this.pushCount(1),$=$.substring(1);if($[0]==="%"){let Z=$.length,z=$.indexOf("#");while(z!==-1){let U=$[z-1];if(U===" "||U==="\t"){Z=z-1;break}else z=$.indexOf("#",z+1)}while(!0){let U=$[Z-1];if(U===" "||U==="\t")Z-=1;else break}let X=(yield*this.pushCount(Z))+(yield*this.pushSpaces(!0));return yield*this.pushCount($.length-X),this.pushNewline(),"stream"}if(this.atLineEnd()){let Z=yield*this.pushSpaces(!0);return yield*this.pushCount($.length-Z),yield*this.pushNewline(),"stream"}return yield W$.DOCUMENT,yield*this.parseLineStart()}*parseLineStart(){let $=this.charAt(0);if(!$&&!this.atEnd)return this.setNext("line-start");if($==="-"||$==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");let Z=this.peek(3);if((Z==="---"||Z==="...")&&p(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,Z==="---"?"doc":"stream"}if(this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!p(this.charAt(1)))this.indentNext=this.indentValue;return yield*this.parseBlockStart()}*parseBlockStart(){let[$,Z]=this.peek(2);if(!Z&&!this.atEnd)return this.setNext("block-start");if(($==="-"||$==="?"||$===":")&&p(Z)){let z=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=z,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let $=this.getLine();if($===null)return this.setNext("doc");let Z=yield*this.pushIndicators();switch($[Z]){case"#":yield*this.pushCount($.length-Z);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(g2),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return Z+=yield*this.parseBlockScalarHeader(),Z+=yield*this.pushSpaces(!0),yield*this.pushCount($.length-Z),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let $,Z,z=-1;do{if($=yield*this.pushNewline(),$>0)Z=yield*this.pushSpaces(!1),this.indentValue=z=Z;else Z=0;Z+=yield*this.pushSpaces(!0)}while($+Z>0);let X=this.getLine();if(X===null)return this.setNext("flow");if(z!==-1&&z<this.indentNext&&X[0]!=="#"||z===0&&(X.startsWith("---")||X.startsWith("..."))&&p(X[3])){if(!(z===this.indentNext-1&&this.flowLevel===1&&(X[0]==="]"||X[0]==="}")))return this.flowLevel=0,yield W$.FLOW_END,yield*this.parseLineStart()}let U=0;while(X[U]===",")U+=yield*this.pushCount(1),U+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(U+=yield*this.pushIndicators(),X[U]){case void 0:return"flow";case"#":return yield*this.pushCount(X.length-U),"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(g2),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let Q=this.charAt(1);if(this.flowKey||p(Q)||Q===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let $=this.charAt(0),Z=this.buffer.indexOf($,this.pos+1);if($==="'")while(Z!==-1&&this.buffer[Z+1]==="'")Z=this.buffer.indexOf("'",Z+2);else while(Z!==-1){let U=0;while(this.buffer[Z-1-U]==="\\")U+=1;if(U%2===0)break;Z=this.buffer.indexOf('"',Z+1)}let z=this.buffer.substring(0,Z),X=z.indexOf(`
124
+ `,this.pos);if(X!==-1){while(X!==-1){let U=this.continueScalar(X+1);if(U===-1)break;X=z.indexOf(`
125
+ `,U)}if(X!==-1)Z=X-(z[X-1]==="\r"?2:1)}if(Z===-1){if(!this.atEnd)return this.setNext("quoted-scalar");Z=this.buffer.length}return yield*this.pushToIndex(Z+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let $=this.pos;while(!0){let Z=this.buffer[++$];if(Z==="+")this.blockScalarKeep=!0;else if(Z>"0"&&Z<="9")this.blockScalarIndent=Number(Z)-1;else if(Z!=="-")break}return yield*this.pushUntil((Z)=>p(Z)||Z==="#")}*parseBlockScalar(){let $=this.pos-1,Z=0,z;$:for(let U=this.pos;z=this.buffer[U];++U)switch(z){case" ":Z+=1;break;case`
126
+ `:$=U,Z=0;break;case"\r":{let Q=this.buffer[U+1];if(!Q&&!this.atEnd)return this.setNext("block-scalar");if(Q===`
127
+ `)break}default:break $}if(!z&&!this.atEnd)return this.setNext("block-scalar");if(Z>=this.indentNext){if(this.blockScalarIndent===-1)this.indentNext=Z;else this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{let U=this.continueScalar($+1);if(U===-1)break;$=this.buffer.indexOf(`
128
+ `,U)}while($!==-1);if($===-1){if(!this.atEnd)return this.setNext("block-scalar");$=this.buffer.length}}let X=$+1;z=this.buffer[X];while(z===" ")z=this.buffer[++X];if(z==="\t"){while(z==="\t"||z===" "||z==="\r"||z===`
129
+ `)z=this.buffer[++X];$=X-1}else if(!this.blockScalarKeep)do{let U=$-1,Q=this.buffer[U];if(Q==="\r")Q=this.buffer[--U];let J=U;while(Q===" ")Q=this.buffer[--U];if(Q===`
130
+ `&&U>=this.pos&&U+1+Z>J)$=U;else break}while(!0);return yield W$.SCALAR,yield*this.pushToIndex($+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let $=this.flowLevel>0,Z=this.pos-1,z=this.pos-1,X;while(X=this.buffer[++z])if(X===":"){let U=this.buffer[z+1];if(p(U)||$&&G1.has(U))break;Z=z}else if(p(X)){let U=this.buffer[z+1];if(X==="\r")if(U===`
131
+ `)z+=1,X=`
132
+ `,U=this.buffer[z+1];else Z=z;if(U==="#"||$&&G1.has(U))break;if(X===`
133
+ `){let Q=this.continueScalar(z+1);if(Q===-1)break;z=Math.max(z,Q-2)}}else{if($&&G1.has(X))break;Z=z}if(!X&&!this.atEnd)return this.setNext("plain-scalar");return yield W$.SCALAR,yield*this.pushToIndex(Z+1,!0),$?"flow":"doc"}*pushCount($){if($>0)return yield this.buffer.substr(this.pos,$),this.pos+=$,$;return 0}*pushToIndex($,Z){let z=this.buffer.slice(this.pos,$);if(z)return yield z,this.pos+=z.length,z.length;else if(Z)yield"";return 0}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(g2))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{let $=this.flowLevel>0,Z=this.charAt(1);if(p(Z)||$&&G1.has(Z)){if(!$)this.indentNext=this.indentValue+1;else if(this.flowKey)this.flowKey=!1;return(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}}return 0}*pushTag(){if(this.charAt(1)==="<"){let $=this.pos+2,Z=this.buffer[$];while(!p(Z)&&Z!==">")Z=this.buffer[++$];return yield*this.pushToIndex(Z===">"?$+1:$,!1)}else{let $=this.pos+1,Z=this.buffer[$];while(Z)if(SQ.has(Z))Z=this.buffer[++$];else if(Z==="%"&&Z9.has(this.buffer[$+1])&&Z9.has(this.buffer[$+2]))Z=this.buffer[$+=3];else break;return yield*this.pushToIndex($,!1)}}*pushNewline(){let $=this.buffer[this.pos];if($===`
134
134
  `)return yield*this.pushCount(1);else if($==="\r"&&this.charAt(1)===`
135
- `)return yield*this.pushCount(2);else return 0}*pushSpaces($){let Z=this.pos-1,X;do X=this.buffer[++Z];while(X===" "||$&&X==="\t");let U=Z-this.pos;if(U>0)yield this.buffer.substr(this.pos,U),this.pos=Z;return U}*pushUntil($){let Z=this.pos,X=this.buffer[Z];while(!$(X))X=this.buffer[++Z];return yield*this.pushToIndex(Z,!1)}}AQ.Lexer=t3});var E2=R((wQ)=>{class e3{constructor(){this.lineStarts=[],this.addNewLine=($)=>this.lineStarts.push($),this.linePos=($)=>{let Z=0,X=this.lineStarts.length;while(Z<X){let z=Z+X>>1;if(this.lineStarts[z]<$)Z=z+1;else X=z}if(this.lineStarts[Z]===$)return{line:Z+1,col:1};if(Z===0)return{line:0,col:$};let U=this.lineStarts[Z-1];return{line:Z,col:$-U+1}}}}wQ.LineCounter=e3});var g2=R((SQ)=>{var CQ=p0("process"),$8=H1(),jQ=S2();function H0($,Z){for(let X=0;X<$.length;++X)if($[X].type===Z)return!0;return!1}function Z8($){for(let Z=0;Z<$.length;++Z)switch($[Z].type){case"space":case"comment":case"newline":break;default:return Z}return-1}function U8($){switch($?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function G1($){switch($.type){case"document":return $.start;case"block-map":{let Z=$.items[$.items.length-1];return Z.sep??Z.start}case"block-seq":return $.items[$.items.length-1].start;default:return[]}}function y0($){if($.length===0)return[];let Z=$.length;$:while(--Z>=0)switch($[Z].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break $}while($[++Z]?.type==="space");return $.splice(Z,$.length)}function X8($){if($.start.type==="flow-seq-start"){for(let Z of $.items)if(Z.sep&&!Z.value&&!H0(Z.start,"explicit-key-ind")&&!H0(Z.sep,"map-value-ind")){if(Z.key)Z.value=Z.key;if(delete Z.key,U8(Z.value))if(Z.value.end)Array.prototype.push.apply(Z.value.end,Z.sep);else Z.value.end=Z.sep;else Array.prototype.push.apply(Z.start,Z.sep);delete Z.sep}}}class z8{constructor($){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new jQ.Lexer,this.onNewLine=$}*parse($,Z=!1){if(this.onNewLine&&this.offset===0)this.onNewLine(0);for(let X of this.lexer.lex($,Z))yield*this.next(X);if(!Z)yield*this.end()}*next($){if(this.source=$,CQ.env.LOG_TOKENS)console.log("|",$8.prettyToken($));if(this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=$.length;return}let Z=$8.tokenType($);if(!Z){let X=`Not a YAML token: ${$}`;yield*this.pop({type:"error",offset:this.offset,message:X,source:$}),this.offset+=$.length}else if(Z==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=Z,yield*this.step(),Z){case"newline":if(this.atNewLine=!0,this.indent=0,this.onNewLine)this.onNewLine(this.offset+$.length);break;case"space":if(this.atNewLine&&$[0]===" ")this.indent+=$.length;break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":if(this.atNewLine)this.indent+=$.length;break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=$.length}}*end(){while(this.stack.length>0)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let $=this.peek(1);if(this.type==="doc-end"&&$?.type!=="doc-end"){while(this.stack.length>0)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!$)return yield*this.stream();switch($.type){case"document":return yield*this.document($);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar($);case"block-scalar":return yield*this.blockScalar($);case"block-map":return yield*this.blockMap($);case"block-seq":return yield*this.blockSequence($);case"flow-collection":return yield*this.flowCollection($);case"doc-end":return yield*this.documentEnd($)}yield*this.pop()}peek($){return this.stack[this.stack.length-$]}*pop($){let Z=$??this.stack.pop();if(!Z)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield Z;else{let X=this.peek(1);if(Z.type==="block-scalar")Z.indent="indent"in X?X.indent:0;else if(Z.type==="flow-collection"&&X.type==="document")Z.indent=0;if(Z.type==="flow-collection")X8(Z);switch(X.type){case"document":X.value=Z;break;case"block-scalar":X.props.push(Z);break;case"block-map":{let U=X.items[X.items.length-1];if(U.value){X.items.push({start:[],key:Z,sep:[]}),this.onKeyLine=!0;return}else if(U.sep)U.value=Z;else{Object.assign(U,{key:Z,sep:[]}),this.onKeyLine=!U.explicitKey;return}break}case"block-seq":{let U=X.items[X.items.length-1];if(U.value)X.items.push({start:[],value:Z});else U.value=Z;break}case"flow-collection":{let U=X.items[X.items.length-1];if(!U||U.value)X.items.push({start:[],key:Z,sep:[]});else if(U.sep)U.value=Z;else Object.assign(U,{key:Z,sep:[]});return}default:yield*this.pop(),yield*this.pop(Z)}if((X.type==="document"||X.type==="block-map"||X.type==="block-seq")&&(Z.type==="block-map"||Z.type==="block-seq")){let U=Z.items[Z.items.length-1];if(U&&!U.sep&&!U.value&&U.start.length>0&&Z8(U.start)===-1&&(Z.indent===0||U.start.every((z)=>z.type!=="comment"||z.indent<Z.indent))){if(X.type==="document")X.end=U.start;else X.items.push({start:U.start});Z.items.splice(-1,1)}}}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{let $={type:"document",offset:this.offset,start:[]};if(this.type==="doc-start")$.start.push(this.sourceToken);this.stack.push($);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document($){if($.value)return yield*this.lineEnd($);switch(this.type){case"doc-start":{if(Z8($.start)!==-1)yield*this.pop(),yield*this.step();else $.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":$.start.push(this.sourceToken);return}let Z=this.startBlockValue($);if(Z)this.stack.push(Z);else yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar($){if(this.type==="map-value-ind"){let Z=G1(this.peek(2)),X=y0(Z),U;if($.end)U=$.end,U.push(this.sourceToken),delete $.end;else U=[this.sourceToken];let z={type:"block-map",offset:$.offset,indent:$.indent,items:[{start:X,key:$,sep:U}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=z}else yield*this.lineEnd($)}*blockScalar($){switch(this.type){case"space":case"comment":case"newline":$.props.push(this.sourceToken);return;case"scalar":if($.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let Z=this.source.indexOf(`
135
+ `)return yield*this.pushCount(2);else return 0}*pushSpaces($){let Z=this.pos-1,z;do z=this.buffer[++Z];while(z===" "||$&&z==="\t");let X=Z-this.pos;if(X>0)yield this.buffer.substr(this.pos,X),this.pos=Z;return X}*pushUntil($){let Z=this.pos,z=this.buffer[Z];while(!$(z))z=this.buffer[++Z];return yield*this.pushToIndex(Z,!1)}}gQ.Lexer=z9});var y2=D((yQ)=>{class X9{constructor(){this.lineStarts=[],this.addNewLine=($)=>this.lineStarts.push($),this.linePos=($)=>{let Z=0,z=this.lineStarts.length;while(Z<z){let U=Z+z>>1;if(this.lineStarts[U]<$)Z=U+1;else z=U}if(this.lineStarts[Z]===$)return{line:Z+1,col:1};if(Z===0)return{line:0,col:$};let X=this.lineStarts[Z-1];return{line:Z,col:$-X+1}}}}yQ.LineCounter=X9});var h2=D((kQ)=>{var xQ=p0("process"),U9=H1(),uQ=f2();function H0($,Z){for(let z=0;z<$.length;++z)if($[z].type===Z)return!0;return!1}function Q9($){for(let Z=0;Z<$.length;++Z)switch($[Z].type){case"space":case"comment":case"newline":break;default:return Z}return-1}function H9($){switch($?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function _1($){switch($.type){case"document":return $.start;case"block-map":{let Z=$.items[$.items.length-1];return Z.sep??Z.start}case"block-seq":return $.items[$.items.length-1].start;default:return[]}}function f0($){if($.length===0)return[];let Z=$.length;$:while(--Z>=0)switch($[Z].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break $}while($[++Z]?.type==="space");return $.splice(Z,$.length)}function J9($){if($.start.type==="flow-seq-start"){for(let Z of $.items)if(Z.sep&&!Z.value&&!H0(Z.start,"explicit-key-ind")&&!H0(Z.sep,"map-value-ind")){if(Z.key)Z.value=Z.key;if(delete Z.key,H9(Z.value))if(Z.value.end)Array.prototype.push.apply(Z.value.end,Z.sep);else Z.value.end=Z.sep;else Array.prototype.push.apply(Z.start,Z.sep);delete Z.sep}}}class G9{constructor($){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new uQ.Lexer,this.onNewLine=$}*parse($,Z=!1){if(this.onNewLine&&this.offset===0)this.onNewLine(0);for(let z of this.lexer.lex($,Z))yield*this.next(z);if(!Z)yield*this.end()}*next($){if(this.source=$,xQ.env.LOG_TOKENS)console.log("|",U9.prettyToken($));if(this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=$.length;return}let Z=U9.tokenType($);if(!Z){let z=`Not a YAML token: ${$}`;yield*this.pop({type:"error",offset:this.offset,message:z,source:$}),this.offset+=$.length}else if(Z==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=Z,yield*this.step(),Z){case"newline":if(this.atNewLine=!0,this.indent=0,this.onNewLine)this.onNewLine(this.offset+$.length);break;case"space":if(this.atNewLine&&$[0]===" ")this.indent+=$.length;break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":if(this.atNewLine)this.indent+=$.length;break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=$.length}}*end(){while(this.stack.length>0)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let $=this.peek(1);if(this.type==="doc-end"&&$?.type!=="doc-end"){while(this.stack.length>0)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!$)return yield*this.stream();switch($.type){case"document":return yield*this.document($);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar($);case"block-scalar":return yield*this.blockScalar($);case"block-map":return yield*this.blockMap($);case"block-seq":return yield*this.blockSequence($);case"flow-collection":return yield*this.flowCollection($);case"doc-end":return yield*this.documentEnd($)}yield*this.pop()}peek($){return this.stack[this.stack.length-$]}*pop($){let Z=$??this.stack.pop();if(!Z)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield Z;else{let z=this.peek(1);if(Z.type==="block-scalar")Z.indent="indent"in z?z.indent:0;else if(Z.type==="flow-collection"&&z.type==="document")Z.indent=0;if(Z.type==="flow-collection")J9(Z);switch(z.type){case"document":z.value=Z;break;case"block-scalar":z.props.push(Z);break;case"block-map":{let X=z.items[z.items.length-1];if(X.value){z.items.push({start:[],key:Z,sep:[]}),this.onKeyLine=!0;return}else if(X.sep)X.value=Z;else{Object.assign(X,{key:Z,sep:[]}),this.onKeyLine=!X.explicitKey;return}break}case"block-seq":{let X=z.items[z.items.length-1];if(X.value)z.items.push({start:[],value:Z});else X.value=Z;break}case"flow-collection":{let X=z.items[z.items.length-1];if(!X||X.value)z.items.push({start:[],key:Z,sep:[]});else if(X.sep)X.value=Z;else Object.assign(X,{key:Z,sep:[]});return}default:yield*this.pop(),yield*this.pop(Z)}if((z.type==="document"||z.type==="block-map"||z.type==="block-seq")&&(Z.type==="block-map"||Z.type==="block-seq")){let X=Z.items[Z.items.length-1];if(X&&!X.sep&&!X.value&&X.start.length>0&&Q9(X.start)===-1&&(Z.indent===0||X.start.every((U)=>U.type!=="comment"||U.indent<Z.indent))){if(z.type==="document")z.end=X.start;else z.items.push({start:X.start});Z.items.splice(-1,1)}}}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{let $={type:"document",offset:this.offset,start:[]};if(this.type==="doc-start")$.start.push(this.sourceToken);this.stack.push($);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document($){if($.value)return yield*this.lineEnd($);switch(this.type){case"doc-start":{if(Q9($.start)!==-1)yield*this.pop(),yield*this.step();else $.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":$.start.push(this.sourceToken);return}let Z=this.startBlockValue($);if(Z)this.stack.push(Z);else yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar($){if(this.type==="map-value-ind"){let Z=_1(this.peek(2)),z=f0(Z),X;if($.end)X=$.end,X.push(this.sourceToken),delete $.end;else X=[this.sourceToken];let U={type:"block-map",offset:$.offset,indent:$.indent,items:[{start:z,key:$,sep:X}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=U}else yield*this.lineEnd($)}*blockScalar($){switch(this.type){case"space":case"comment":case"newline":$.props.push(this.sourceToken);return;case"scalar":if($.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let Z=this.source.indexOf(`
136
136
  `)+1;while(Z!==0)this.onNewLine(this.offset+Z),Z=this.source.indexOf(`
137
- `,Z)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap($){let Z=$.items[$.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,Z.value){let X="end"in Z.value?Z.value.end:void 0;if((Array.isArray(X)?X[X.length-1]:void 0)?.type==="comment")X?.push(this.sourceToken);else $.items.push({start:[this.sourceToken]})}else if(Z.sep)Z.sep.push(this.sourceToken);else Z.start.push(this.sourceToken);return;case"space":case"comment":if(Z.value)$.items.push({start:[this.sourceToken]});else if(Z.sep)Z.sep.push(this.sourceToken);else{if(this.atIndentedComment(Z.start,$.indent)){let U=$.items[$.items.length-2]?.value?.end;if(Array.isArray(U)){Array.prototype.push.apply(U,Z.start),U.push(this.sourceToken),$.items.pop();return}}Z.start.push(this.sourceToken)}return}if(this.indent>=$.indent){let X=!this.onKeyLine&&this.indent===$.indent,U=X&&(Z.sep||Z.explicitKey)&&this.type!=="seq-item-ind",z=[];if(U&&Z.sep&&!Z.value){let Q=[];for(let J=0;J<Z.sep.length;++J){let H=Z.sep[J];switch(H.type){case"newline":Q.push(J);break;case"space":break;case"comment":if(H.indent>$.indent)Q.length=0;break;default:Q.length=0}}if(Q.length>=2)z=Z.sep.splice(Q[1])}switch(this.type){case"anchor":case"tag":if(U||Z.value)z.push(this.sourceToken),$.items.push({start:z}),this.onKeyLine=!0;else if(Z.sep)Z.sep.push(this.sourceToken);else Z.start.push(this.sourceToken);return;case"explicit-key-ind":if(!Z.sep&&!Z.explicitKey)Z.start.push(this.sourceToken),Z.explicitKey=!0;else if(U||Z.value)z.push(this.sourceToken),$.items.push({start:z,explicitKey:!0});else this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]});this.onKeyLine=!0;return;case"map-value-ind":if(Z.explicitKey)if(!Z.sep)if(H0(Z.start,"newline"))Object.assign(Z,{key:null,sep:[this.sourceToken]});else{let Q=y0(Z.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:Q,key:null,sep:[this.sourceToken]}]})}else if(Z.value)$.items.push({start:[],key:null,sep:[this.sourceToken]});else if(H0(Z.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:z,key:null,sep:[this.sourceToken]}]});else if(U8(Z.key)&&!H0(Z.sep,"newline")){let Q=y0(Z.start),J=Z.key,H=Z.sep;H.push(this.sourceToken),delete Z.key,delete Z.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:Q,key:J,sep:H}]})}else if(z.length>0)Z.sep=Z.sep.concat(z,this.sourceToken);else Z.sep.push(this.sourceToken);else if(!Z.sep)Object.assign(Z,{key:null,sep:[this.sourceToken]});else if(Z.value||U)$.items.push({start:z,key:null,sep:[this.sourceToken]});else if(H0(Z.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]});else Z.sep.push(this.sourceToken);this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let Q=this.flowScalar(this.type);if(U||Z.value)$.items.push({start:z,key:Q,sep:[]}),this.onKeyLine=!0;else if(Z.sep)this.stack.push(Q);else Object.assign(Z,{key:Q,sep:[]}),this.onKeyLine=!0;return}default:{let Q=this.startBlockValue($);if(Q){if(Q.type==="block-seq"){if(!Z.explicitKey&&Z.sep&&!H0(Z.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else if(X)$.items.push({start:z});this.stack.push(Q);return}}}}yield*this.pop(),yield*this.step()}*blockSequence($){let Z=$.items[$.items.length-1];switch(this.type){case"newline":if(Z.value){let X="end"in Z.value?Z.value.end:void 0;if((Array.isArray(X)?X[X.length-1]:void 0)?.type==="comment")X?.push(this.sourceToken);else $.items.push({start:[this.sourceToken]})}else Z.start.push(this.sourceToken);return;case"space":case"comment":if(Z.value)$.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(Z.start,$.indent)){let U=$.items[$.items.length-2]?.value?.end;if(Array.isArray(U)){Array.prototype.push.apply(U,Z.start),U.push(this.sourceToken),$.items.pop();return}}Z.start.push(this.sourceToken)}return;case"anchor":case"tag":if(Z.value||this.indent<=$.indent)break;Z.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==$.indent)break;if(Z.value||H0(Z.start,"seq-item-ind"))$.items.push({start:[this.sourceToken]});else Z.start.push(this.sourceToken);return}if(this.indent>$.indent){let X=this.startBlockValue($);if(X){this.stack.push(X);return}}yield*this.pop(),yield*this.step()}*flowCollection($){let Z=$.items[$.items.length-1];if(this.type==="flow-error-end"){let X;do yield*this.pop(),X=this.peek(1);while(X?.type==="flow-collection")}else if($.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":if(!Z||Z.sep)$.items.push({start:[this.sourceToken]});else Z.start.push(this.sourceToken);return;case"map-value-ind":if(!Z||Z.value)$.items.push({start:[],key:null,sep:[this.sourceToken]});else if(Z.sep)Z.sep.push(this.sourceToken);else Object.assign(Z,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":if(!Z||Z.value)$.items.push({start:[this.sourceToken]});else if(Z.sep)Z.sep.push(this.sourceToken);else Z.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let U=this.flowScalar(this.type);if(!Z||Z.value)$.items.push({start:[],key:U,sep:[]});else if(Z.sep)this.stack.push(U);else Object.assign(Z,{key:U,sep:[]});return}case"flow-map-end":case"flow-seq-end":$.end.push(this.sourceToken);return}let X=this.startBlockValue($);if(X)this.stack.push(X);else yield*this.pop(),yield*this.step()}else{let X=this.peek(2);if(X.type==="block-map"&&(this.type==="map-value-ind"&&X.indent===$.indent||this.type==="newline"&&!X.items[X.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&X.type!=="flow-collection"){let U=G1(X),z=y0(U);X8($);let Q=$.end.splice(1,$.end.length);Q.push(this.sourceToken);let J={type:"block-map",offset:$.offset,indent:$.indent,items:[{start:z,key:$,sep:Q}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=J}else yield*this.lineEnd($)}}flowScalar($){if(this.onNewLine){let Z=this.source.indexOf(`
137
+ `,Z)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap($){let Z=$.items[$.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,Z.value){let z="end"in Z.value?Z.value.end:void 0;if((Array.isArray(z)?z[z.length-1]:void 0)?.type==="comment")z?.push(this.sourceToken);else $.items.push({start:[this.sourceToken]})}else if(Z.sep)Z.sep.push(this.sourceToken);else Z.start.push(this.sourceToken);return;case"space":case"comment":if(Z.value)$.items.push({start:[this.sourceToken]});else if(Z.sep)Z.sep.push(this.sourceToken);else{if(this.atIndentedComment(Z.start,$.indent)){let X=$.items[$.items.length-2]?.value?.end;if(Array.isArray(X)){Array.prototype.push.apply(X,Z.start),X.push(this.sourceToken),$.items.pop();return}}Z.start.push(this.sourceToken)}return}if(this.indent>=$.indent){let z=!this.onKeyLine&&this.indent===$.indent,X=z&&(Z.sep||Z.explicitKey)&&this.type!=="seq-item-ind",U=[];if(X&&Z.sep&&!Z.value){let Q=[];for(let J=0;J<Z.sep.length;++J){let H=Z.sep[J];switch(H.type){case"newline":Q.push(J);break;case"space":break;case"comment":if(H.indent>$.indent)Q.length=0;break;default:Q.length=0}}if(Q.length>=2)U=Z.sep.splice(Q[1])}switch(this.type){case"anchor":case"tag":if(X||Z.value)U.push(this.sourceToken),$.items.push({start:U}),this.onKeyLine=!0;else if(Z.sep)Z.sep.push(this.sourceToken);else Z.start.push(this.sourceToken);return;case"explicit-key-ind":if(!Z.sep&&!Z.explicitKey)Z.start.push(this.sourceToken),Z.explicitKey=!0;else if(X||Z.value)U.push(this.sourceToken),$.items.push({start:U,explicitKey:!0});else this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]});this.onKeyLine=!0;return;case"map-value-ind":if(Z.explicitKey)if(!Z.sep)if(H0(Z.start,"newline"))Object.assign(Z,{key:null,sep:[this.sourceToken]});else{let Q=f0(Z.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:Q,key:null,sep:[this.sourceToken]}]})}else if(Z.value)$.items.push({start:[],key:null,sep:[this.sourceToken]});else if(H0(Z.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:U,key:null,sep:[this.sourceToken]}]});else if(H9(Z.key)&&!H0(Z.sep,"newline")){let Q=f0(Z.start),J=Z.key,H=Z.sep;H.push(this.sourceToken),delete Z.key,delete Z.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:Q,key:J,sep:H}]})}else if(U.length>0)Z.sep=Z.sep.concat(U,this.sourceToken);else Z.sep.push(this.sourceToken);else if(!Z.sep)Object.assign(Z,{key:null,sep:[this.sourceToken]});else if(Z.value||X)$.items.push({start:U,key:null,sep:[this.sourceToken]});else if(H0(Z.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]});else Z.sep.push(this.sourceToken);this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let Q=this.flowScalar(this.type);if(X||Z.value)$.items.push({start:U,key:Q,sep:[]}),this.onKeyLine=!0;else if(Z.sep)this.stack.push(Q);else Object.assign(Z,{key:Q,sep:[]}),this.onKeyLine=!0;return}default:{let Q=this.startBlockValue($);if(Q){if(Q.type==="block-seq"){if(!Z.explicitKey&&Z.sep&&!H0(Z.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else if(z)$.items.push({start:U});this.stack.push(Q);return}}}}yield*this.pop(),yield*this.step()}*blockSequence($){let Z=$.items[$.items.length-1];switch(this.type){case"newline":if(Z.value){let z="end"in Z.value?Z.value.end:void 0;if((Array.isArray(z)?z[z.length-1]:void 0)?.type==="comment")z?.push(this.sourceToken);else $.items.push({start:[this.sourceToken]})}else Z.start.push(this.sourceToken);return;case"space":case"comment":if(Z.value)$.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(Z.start,$.indent)){let X=$.items[$.items.length-2]?.value?.end;if(Array.isArray(X)){Array.prototype.push.apply(X,Z.start),X.push(this.sourceToken),$.items.pop();return}}Z.start.push(this.sourceToken)}return;case"anchor":case"tag":if(Z.value||this.indent<=$.indent)break;Z.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==$.indent)break;if(Z.value||H0(Z.start,"seq-item-ind"))$.items.push({start:[this.sourceToken]});else Z.start.push(this.sourceToken);return}if(this.indent>$.indent){let z=this.startBlockValue($);if(z){this.stack.push(z);return}}yield*this.pop(),yield*this.step()}*flowCollection($){let Z=$.items[$.items.length-1];if(this.type==="flow-error-end"){let z;do yield*this.pop(),z=this.peek(1);while(z?.type==="flow-collection")}else if($.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":if(!Z||Z.sep)$.items.push({start:[this.sourceToken]});else Z.start.push(this.sourceToken);return;case"map-value-ind":if(!Z||Z.value)$.items.push({start:[],key:null,sep:[this.sourceToken]});else if(Z.sep)Z.sep.push(this.sourceToken);else Object.assign(Z,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":if(!Z||Z.value)$.items.push({start:[this.sourceToken]});else if(Z.sep)Z.sep.push(this.sourceToken);else Z.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let X=this.flowScalar(this.type);if(!Z||Z.value)$.items.push({start:[],key:X,sep:[]});else if(Z.sep)this.stack.push(X);else Object.assign(Z,{key:X,sep:[]});return}case"flow-map-end":case"flow-seq-end":$.end.push(this.sourceToken);return}let z=this.startBlockValue($);if(z)this.stack.push(z);else yield*this.pop(),yield*this.step()}else{let z=this.peek(2);if(z.type==="block-map"&&(this.type==="map-value-ind"&&z.indent===$.indent||this.type==="newline"&&!z.items[z.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&z.type!=="flow-collection"){let X=_1(z),U=f0(X);J9($);let Q=$.end.splice(1,$.end.length);Q.push(this.sourceToken);let J={type:"block-map",offset:$.offset,indent:$.indent,items:[{start:U,key:$,sep:Q}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=J}else yield*this.lineEnd($)}}flowScalar($){if(this.onNewLine){let Z=this.source.indexOf(`
138
138
  `)+1;while(Z!==0)this.onNewLine(this.offset+Z),Z=this.source.indexOf(`
139
- `,Z)+1}return{type:$,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue($){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let Z=G1($),X=y0(Z);return X.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:X,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let Z=G1($),X=y0(Z);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:X,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment($,Z){if(this.type!=="comment")return!1;if(this.indent<=Z)return!1;return $.every((X)=>X.type==="newline"||X.type==="space")}*documentEnd($){if(this.type!=="doc-mode"){if($.end)$.end.push(this.sourceToken);else $.end=[this.sourceToken];if(this.type==="newline")yield*this.pop()}}*lineEnd($){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:if($.end)$.end.push(this.sourceToken);else $.end=[this.sourceToken];if(this.type==="newline")yield*this.pop()}}}SQ.Parser=z8});var G8=R((vQ)=>{var Q8=P2(),gQ=_$(),L$=Y$(),yQ=E1(),fQ=b(),hQ=E2(),J8=g2();function H8($){let Z=$.prettyErrors!==!1;return{lineCounter:$.lineCounter||Z&&new hQ.LineCounter||null,prettyErrors:Z}}function xQ($,Z={}){let{lineCounter:X,prettyErrors:U}=H8(Z),z=new J8.Parser(X?.addNewLine),Q=new Q8.Composer(Z),J=Array.from(Q.compose(z.parse($)));if(U&&X)for(let H of J)H.errors.forEach(L$.prettifyError($,X)),H.warnings.forEach(L$.prettifyError($,X));if(J.length>0)return J;return Object.assign([],{empty:!0},Q.streamInfo())}function q8($,Z={}){let{lineCounter:X,prettyErrors:U}=H8(Z),z=new J8.Parser(X?.addNewLine),Q=new Q8.Composer(Z),J=null;for(let H of Q.compose(z.parse($),!0,$.length))if(!J)J=H;else if(J.options.logLevel!=="silent"){J.errors.push(new L$.YAMLParseError(H.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}if(U&&X)J.errors.forEach(L$.prettifyError($,X)),J.warnings.forEach(L$.prettifyError($,X));return J}function uQ($,Z,X){let U=void 0;if(typeof Z==="function")U=Z;else if(X===void 0&&Z&&typeof Z==="object")X=Z;let z=q8($,X);if(!z)return null;if(z.warnings.forEach((Q)=>yQ.warn(z.options.logLevel,Q)),z.errors.length>0)if(z.options.logLevel!=="silent")throw z.errors[0];else z.errors=[];return z.toJS(Object.assign({reviver:U},X))}function kQ($,Z,X){let U=null;if(typeof Z==="function"||Array.isArray(Z))U=Z;else if(X===void 0&&Z)X=Z;if(typeof X==="string")X=X.length;if(typeof X==="number"){let z=Math.round(X);X=z<1?void 0:z>8?{indent:8}:{indent:z}}if($===void 0){let{keepUndefined:z}=X??Z??{};if(!z)return}if(fQ.isDocument($)&&!U)return $.toString(X);return new gQ.Document($,U,X).toString(X)}vQ.parse=uQ;vQ.parseAllDocuments=xQ;vQ.parseDocument=q8;vQ.stringify=kQ});var f=[{index:1,path:"project.name",label:"Name",description:"Project name",category:"project"},{index:2,path:"project.goal",label:"Goal",description:"Goal (use case)",category:"project"},{index:3,path:"project.main_language",label:"Language",description:"Primary language",category:"project"},{index:4,path:"human_context.who",label:"Who",description:"Who is this for?",category:"human"},{index:5,path:"human_context.what",label:"What",description:"What are they building",category:"human"},{index:6,path:"human_context.why",label:"Why",description:"Why does it exist",category:"human"},{index:7,path:"human_context.where",label:"Where",description:"Where does it run",category:"human"},{index:8,path:"human_context.when",label:"When",description:"When was it started / timeline",category:"human"},{index:9,path:"human_context.how",label:"How",description:"How is it built",category:"human"},{index:10,path:"stack.frontend",canonical:"stack.framework",label:"Framework",description:"Framework (React, Svelte, etc.)",category:"frontend"},{index:11,path:"stack.css_framework",canonical:"stack.css",label:"CSS",description:"CSS framework",category:"frontend"},{index:12,path:"stack.ui_library",label:"UI Library",description:"UI component library",category:"frontend"},{index:13,path:"stack.state_management",canonical:"stack.state",label:"State",description:"State management",category:"frontend"},{index:14,path:"stack.backend",label:"Backend",description:"Backend framework",category:"backend"},{index:15,path:"stack.api_type",canonical:"stack.api",label:"API",description:"API style (REST, GraphQL, etc.)",category:"backend"},{index:16,path:"stack.runtime",label:"Runtime",description:"Runtime (Node, Bun, Python, etc.)",category:"backend"},{index:17,path:"stack.database",canonical:"stack.db",label:"Database",description:"Database",category:"backend"},{index:18,path:"stack.connection",label:"Connection",description:"Connection method (Prisma, etc.)",category:"backend"},{index:19,path:"stack.hosting",label:"Hosting",description:"Hosting platform",category:"universal"},{index:20,path:"stack.build",label:"Build",description:"Build tool",category:"universal"},{index:21,path:"stack.cicd",label:"CI/CD",description:"CI/CD",category:"universal"},{index:22,path:"stack.monorepo_tool",label:"Monorepo",description:"Monorepo tool",category:"enterprise_infra"},{index:23,path:"stack.package_manager",canonical:"stack.pkg_manager",label:"Package Manager",description:"Package manager",category:"enterprise_infra"},{index:24,path:"stack.workspaces",label:"Workspaces",description:"Workspace configuration",category:"enterprise_infra"},{index:25,path:"monorepo.packages_count",label:"Packages",description:"Number of packages",category:"enterprise_infra"},{index:26,path:"monorepo.build_orchestrator",label:"Build Orchestrator",description:"Build orchestration tool",category:"enterprise_infra"},{index:27,path:"stack.admin",label:"Admin",description:"Admin panel",category:"enterprise_app"},{index:28,path:"stack.cache",label:"Cache",description:"Caching layer",category:"enterprise_app"},{index:29,path:"stack.search",label:"Search",description:"Search engine",category:"enterprise_app"},{index:30,path:"stack.storage",label:"Storage",description:"Object storage",category:"enterprise_app"},{index:31,path:"monorepo.versioning_strategy",label:"Versioning",description:"Version strategy",category:"enterprise_ops"},{index:32,path:"monorepo.shared_configs",label:"Shared Configs",description:"Shared configs",category:"enterprise_ops"},{index:33,path:"monorepo.remote_cache",label:"Remote Cache",description:"Remote build cache",category:"enterprise_ops"}],l0=new Map(f.flatMap(($)=>$.canonical?[[$.path,$],[$.canonical,$]]:[[$.path,$]])),fq=new Map(f.filter(($)=>$.canonical).map(($)=>[$.canonical,$.path])),hq=new Map(f.filter(($)=>$.canonical).map(($)=>[$.path,$.canonical]));function Z9($,Z){let X=(z)=>{let Q=z.split("."),J=$;for(let H of Q)if(J&&typeof J==="object"&&H in J)J=J[H];else return;return J},U=X(Z.path);if(U!==void 0)return U;if(Z.canonical)return X(Z.canonical);return}function PZ($){return f.filter((Z)=>Z.category===$)}var TZ=f.filter(($)=>$.index<=21),KZ=f,F$=new Set(["describe your project goal","development teams","cloud platform","null","none","unknown","n/a","not applicable"]);function _0($){if($===null||$===void 0||$==="")return!0;if(typeof $==="string")return F$.has($.toLowerCase().trim());if(Array.isArray($)&&$.length===0)return!0;if(typeof $==="object"&&Object.keys($).length===0)return!0;return!1}var P0={about:[],documentation:["project","human"],intent:["project","human"],encyclopedia:["project","human"],cli:["project","human","universal"],library:["project","human","universal"],sdk:["project","human","universal"],wasm:["project","human","universal"],html:["project","human","universal"],"server-card":["project","human","universal"],frontend:["project","frontend","human","universal"],website:["project","frontend","human","universal"],mobile:["project","frontend","human","universal"],extension:["project","frontend","human","universal"],mcp:["project","backend","human","universal"],backend:["project","backend","universal","human"],"data-science":["project","backend","human","universal"],fullstack:["project","frontend","backend","universal","human"],svelte:["project","frontend","backend","universal","human"],framework:["project","frontend","backend","universal","human"],"monorepo-root":["project","human","enterprise_infra","enterprise_app","enterprise_ops"],mcpaas:["project","backend","universal","human","enterprise_app","enterprise_ops"],saas:["project","frontend","backend","universal","human","enterprise_app"],enterprise:["project","frontend","backend","universal","human","enterprise_infra","enterprise_app","enterprise_ops"]};var D1=($)=>(Z)=>`\x1B[${$}m${Z}\x1B[0m`,P$=D1("1"),d0=D1("2"),uq=D1("3"),c0={cyan:"#00D4D4",cyanDeep:"#0E8C8C",orange:"#FF6B35"},T$=($)=>`\x1B[38;2;0;212;212m${$}\x1B[0m`,R1=($)=>`\x1B[38;2;14;140;140m${$}\x1B[0m`,T0=($)=>`\x1B[38;5;208m${$}\x1B[0m`;var a=[{name:"TROPHY",indicator:`${T0("\uD83C\uDFC6")} ${T0("TROPHY")}`,threshold:100},{name:"GOLD",indicator:`${T0(P$("★"))} ${T0("GOLD")}`,threshold:99},{name:"SILVER",indicator:`${T$("◆")} ${T$("SILVER")}`,threshold:95},{name:"BRONZE",indicator:`${R1("◇")} ${R1("BRONZE")}`,threshold:85},{name:"GREEN",indicator:`${P$("●")} GREEN`,threshold:70},{name:"YELLOW",indicator:`${d0("●")} YELLOW`,threshold:55},{name:"RED",indicator:`${d0("○")} RED`,threshold:1},{name:"WHITE",indicator:`${d0("♡")}`,threshold:0}];function i0($){for(let Z of a)if($>=Z.threshold)return Z;return a[a.length-1]}function AZ($){let Z=i0($),X=a.indexOf(Z);return X>0?a[X-1]:null}var P1={};MZ(P1,{validate:()=>wZ,sdkVersion:()=>EZ,scoreFafb:()=>SZ,scoreEnterprise:()=>NZ,score:()=>F1,fafbInfo:()=>jZ,decompile:()=>CZ,compile:()=>bZ});var M1=null;function e(){if(M1)return M1;try{let $=p0("faf-scoring-kernel");return M1=$,$}catch{throw Error(`faf-scoring-kernel not installed.
139
+ `,Z)+1}return{type:$,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue($){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let Z=_1($),z=f0(Z);return z.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:z,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let Z=_1($),z=f0(Z);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:z,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment($,Z){if(this.type!=="comment")return!1;if(this.indent<=Z)return!1;return $.every((z)=>z.type==="newline"||z.type==="space")}*documentEnd($){if(this.type!=="doc-mode"){if($.end)$.end.push(this.sourceToken);else $.end=[this.sourceToken];if(this.type==="newline")yield*this.pop()}}*lineEnd($){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:if($.end)$.end.push(this.sourceToken);else $.end=[this.sourceToken];if(this.type==="newline")yield*this.pop()}}}kQ.Parser=G9});var V9=D((aQ)=>{var _9=A2(),mQ=Y$(),I$=q$(),pQ=y1(),lQ=b(),dQ=y2(),Y9=h2();function q9($){let Z=$.prettyErrors!==!1;return{lineCounter:$.lineCounter||Z&&new dQ.LineCounter||null,prettyErrors:Z}}function cQ($,Z={}){let{lineCounter:z,prettyErrors:X}=q9(Z),U=new Y9.Parser(z?.addNewLine),Q=new _9.Composer(Z),J=Array.from(Q.compose(U.parse($)));if(X&&z)for(let H of J)H.errors.forEach(I$.prettifyError($,z)),H.warnings.forEach(I$.prettifyError($,z));if(J.length>0)return J;return Object.assign([],{empty:!0},Q.streamInfo())}function B9($,Z={}){let{lineCounter:z,prettyErrors:X}=q9(Z),U=new Y9.Parser(z?.addNewLine),Q=new _9.Composer(Z),J=null;for(let H of Q.compose(U.parse($),!0,$.length))if(!J)J=H;else if(J.options.logLevel!=="silent"){J.errors.push(new I$.YAMLParseError(H.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}if(X&&z)J.errors.forEach(I$.prettifyError($,z)),J.warnings.forEach(I$.prettifyError($,z));return J}function iQ($,Z,z){let X=void 0;if(typeof Z==="function")X=Z;else if(z===void 0&&Z&&typeof Z==="object")z=Z;let U=B9($,z);if(!U)return null;if(U.warnings.forEach((Q)=>pQ.warn(U.options.logLevel,Q)),U.errors.length>0)if(U.options.logLevel!=="silent")throw U.errors[0];else U.errors=[];return U.toJS(Object.assign({reviver:X},z))}function sQ($,Z,z){let X=null;if(typeof Z==="function"||Array.isArray(Z))X=Z;else if(z===void 0&&Z)z=Z;if(typeof z==="string")z=z.length;if(typeof z==="number"){let U=Math.round(z);z=U<1?void 0:U>8?{indent:8}:{indent:U}}if($===void 0){let{keepUndefined:U}=z??Z??{};if(!U)return}if(lQ.isDocument($)&&!X)return $.toString(z);return new mQ.Document($,X,z).toString(z)}aQ.parse=iQ;aQ.parseAllDocuments=cQ;aQ.parseDocument=B9;aQ.stringify=sQ});var y=[{index:1,path:"project.name",label:"Name",description:"Project name",category:"project"},{index:2,path:"project.goal",label:"Goal",description:"Goal (use case)",category:"project"},{index:3,path:"project.main_language",label:"Language",description:"Primary language",category:"project"},{index:4,path:"human_context.who",label:"Who",description:"Who is this for?",category:"human"},{index:5,path:"human_context.what",label:"What",description:"What are they building",category:"human"},{index:6,path:"human_context.why",label:"Why",description:"Why does it exist",category:"human"},{index:7,path:"human_context.where",label:"Where",description:"Where does it run",category:"human"},{index:8,path:"human_context.when",label:"When",description:"When was it started / timeline",category:"human"},{index:9,path:"human_context.how",label:"How",description:"How is it built",category:"human"},{index:10,path:"stack.frontend",canonical:"stack.framework",label:"Framework",description:"Framework (React, Svelte, etc.)",category:"frontend"},{index:11,path:"stack.css_framework",canonical:"stack.css",label:"CSS",description:"CSS framework",category:"frontend"},{index:12,path:"stack.ui_library",label:"UI Library",description:"UI component library",category:"frontend"},{index:13,path:"stack.state_management",canonical:"stack.state",label:"State",description:"State management",category:"frontend"},{index:14,path:"stack.backend",label:"Backend",description:"Backend framework",category:"backend"},{index:15,path:"stack.api_type",canonical:"stack.api",label:"API",description:"API style (REST, GraphQL, etc.)",category:"backend"},{index:16,path:"stack.runtime",label:"Runtime",description:"Runtime (Node, Bun, Python, etc.)",category:"backend"},{index:17,path:"stack.database",canonical:"stack.db",label:"Database",description:"Database",category:"backend"},{index:18,path:"stack.connection",label:"Connection",description:"Connection method (Prisma, etc.)",category:"backend"},{index:19,path:"stack.hosting",label:"Hosting",description:"Hosting platform",category:"universal"},{index:20,path:"stack.build",label:"Build",description:"Build tool",category:"universal"},{index:21,path:"stack.cicd",label:"CI/CD",description:"CI/CD",category:"universal"},{index:22,path:"stack.monorepo_tool",label:"Monorepo",description:"Monorepo tool",category:"enterprise_infra"},{index:23,path:"stack.package_manager",canonical:"stack.pkg_manager",label:"Package Manager",description:"Package manager",category:"enterprise_infra"},{index:24,path:"stack.workspaces",label:"Workspaces",description:"Workspace configuration",category:"enterprise_infra"},{index:25,path:"monorepo.packages_count",label:"Packages",description:"Number of packages",category:"enterprise_infra"},{index:26,path:"monorepo.build_orchestrator",label:"Build Orchestrator",description:"Build orchestration tool",category:"enterprise_infra"},{index:27,path:"stack.admin",label:"Admin",description:"Admin panel",category:"enterprise_app"},{index:28,path:"stack.cache",label:"Cache",description:"Caching layer",category:"enterprise_app"},{index:29,path:"stack.search",label:"Search",description:"Search engine",category:"enterprise_app"},{index:30,path:"stack.storage",label:"Storage",description:"Object storage",category:"enterprise_app"},{index:31,path:"monorepo.versioning_strategy",label:"Versioning",description:"Version strategy",category:"enterprise_ops"},{index:32,path:"monorepo.shared_configs",label:"Shared Configs",description:"Shared configs",category:"enterprise_ops"},{index:33,path:"monorepo.remote_cache",label:"Remote Cache",description:"Remote build cache",category:"enterprise_ops"}],l0=new Map(y.flatMap(($)=>$.canonical?[[$.path,$],[$.canonical,$]]:[[$.path,$]])),eG=new Map(y.filter(($)=>$.canonical).map(($)=>[$.canonical,$.path])),$_=new Map(y.filter(($)=>$.canonical).map(($)=>[$.path,$.canonical]));function Q3($,Z){let z=(U)=>{let Q=U.split("."),J=$;for(let H of Q)if(J&&typeof J==="object"&&H in J)J=J[H];else return;return J},X=z(Z.path);if(X!==void 0)return X;if(Z.canonical)return z(Z.canonical);return}function j6($){return y.filter((Z)=>Z.category===$)}var S6=y.filter(($)=>$.index<=21),E6=y,M$=new Set(["describe your project goal","development teams","cloud platform","null","none","unknown","n/a","not applicable"]);function Y0($){if($===null||$===void 0||$==="")return!0;if(typeof $==="string")return M$.has($.toLowerCase().trim());if(Array.isArray($)&&$.length===0)return!0;if(typeof $==="object"&&Object.keys($).length===0)return!0;return!1}var K0={about:[],documentation:["project","human"],intent:["project","human"],encyclopedia:["project","human"],cli:["project","human","universal"],library:["project","human","universal"],sdk:["project","human","universal"],wasm:["project","human","universal"],html:["project","human","universal"],"server-card":["project","human","universal"],frontend:["project","frontend","human","universal"],website:["project","frontend","human","universal"],mobile:["project","frontend","human","universal"],extension:["project","frontend","human","universal"],mcp:["project","backend","human","universal"],backend:["project","backend","universal","human"],"data-science":["project","backend","human","universal"],fullstack:["project","frontend","backend","universal","human"],svelte:["project","frontend","backend","universal","human"],framework:["project","frontend","backend","universal","human"],"monorepo-root":["project","human","enterprise_infra","enterprise_app","enterprise_ops"],mcpaas:["project","backend","universal","human","enterprise_app","enterprise_ops"],saas:["project","frontend","backend","universal","human","enterprise_app"],enterprise:["project","frontend","backend","universal","human","enterprise_infra","enterprise_app","enterprise_ops"]};var M1=($)=>(Z)=>`\x1B[${$}m${Z}\x1B[0m`,K$=M1("1"),d0=M1("2"),z_=M1("3"),c0={cyan:"#00D4D4",cyanDeep:"#0E8C8C",orange:"#FF6B35"},P$=($)=>`\x1B[38;2;0;212;212m${$}\x1B[0m`,K1=($)=>`\x1B[38;2;14;140;140m${$}\x1B[0m`,P0=($)=>`\x1B[38;5;208m${$}\x1B[0m`;var a=[{name:"TROPHY",indicator:`${P0("✪")} ${P0("TROPHY")}`,threshold:100},{name:"GOLD",indicator:`${P0(K$("★"))} ${P0("GOLD")}`,threshold:99},{name:"SILVER",indicator:`${P$("◆")} ${P$("SILVER")}`,threshold:95},{name:"BRONZE",indicator:`${K1("◇")} ${K1("BRONZE")}`,threshold:85},{name:"GREEN",indicator:`${K$("●")} GREEN`,threshold:70},{name:"YELLOW",indicator:`${d0("●")} YELLOW`,threshold:55},{name:"RED",indicator:`${d0("○")} RED`,threshold:1},{name:"WHITE",indicator:`${d0("♡")}`,threshold:0}];function i0($){for(let Z of a)if($>=Z.threshold)return Z;return a[a.length-1]}function g6($){let Z=i0($),z=a.indexOf(Z);return z>0?a[z-1]:null}var A1={};b6(A1,{validate:()=>y6,sdkVersion:()=>v6,scoreFafb:()=>k6,scoreEnterprise:()=>f6,score:()=>T1,fafbInfo:()=>u6,decompile:()=>x6,compile:()=>h6});var P1=null;function e(){if(P1)return P1;try{let $=p0("faf-scoring-kernel");return P1=$,$}catch{throw Error(`faf-scoring-kernel not installed.
140
140
 
141
141
  Run: npm install faf-scoring-kernel
142
- `)}}function F1($){return JSON.parse(e().score_faf($))}function NZ($){return JSON.parse(e().score_faf_enterprise($))}function wZ($){return e().validate_faf($)}function bZ($){return e().compile_fafb($)}function CZ($){return JSON.parse(e().decompile_fafb($))}function jZ($){return JSON.parse(e().fafb_info($))}function SZ($){return JSON.parse(e().score_fafb($))}function EZ(){return e().sdk_version()}function X9($){return{score:$.score,tier:i0($.score),populated:$.populated,empty:$.empty,ignored:$.ignored,active:$.active,total:$.total,slots:$.slots}}function T1($){if(/^\s*app_type:\s*about\s*$/m.test($)){let X=$.match(/^\s+source_score:\s*(\d+)\s*$/m),U=X?parseInt(X[1],10):-1,z=U>=0&&U<=100?U:-1,Q=$.match(/^\s+represents:\s*(\S+)\s*$/m),J=Q?Q[1]:void 0;return{score:z,tier:z>=0?i0(z):a[a.length-1],populated:0,empty:0,ignored:0,active:0,total:0,slots:{},inherited:!0,represents:J}}return X9(F1($))}function gZ($){let Z=[];if(!$||typeof $!=="object")return Z.push("File is not a valid YAML mapping"),{valid:!1,errors:Z};let X=$;if(!X.faf_version)Z.push("Missing required field: faf_version");if(!X.project?.name)Z.push("Missing required field: project.name");if(X.app_type==="about"){if(!X.about?.represents)Z.push("app_type 'about' requires about.represents (owner/repo of the source codebase)");else if(!/^[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+$/.test(X.about.represents))Z.push(`about.represents must be "owner/repo" format (got: ${X.about.represents})`);if(X.about?.source_score!==void 0){let U=X.about.source_score;if(typeof U!=="number"||U<0||U>100)Z.push(`about.source_score must be a number 0-100 (got: ${U})`)}}return{valid:Z.length===0,errors:Z}}import{readFileSync as V8,writeFileSync as Y_,existsSync as Y8}from"fs";import{join as B8,dirname as bJ,basename as V_}from"path";var cQ=P2(),iQ=_$(),sQ=J2(),y2=Y$(),aQ=r0(),q0=b(),rQ=U0(),nQ=g(),oQ=Q0(),tQ=J0(),q_=H1(),eQ=S2(),$J=E2(),ZJ=g2(),_1=G8(),_8=s0();var XJ=cQ.Composer,UJ=iQ.Document,zJ=sQ.Schema,QJ=y2.YAMLError,JJ=y2.YAMLParseError,HJ=y2.YAMLWarning,qJ=aQ.Alias,GJ=q0.isAlias,_J=q0.isCollection,YJ=q0.isDocument,BJ=q0.isMap,VJ=q0.isNode,OJ=q0.isPair,WJ=q0.isScalar,LJ=q0.isSeq,IJ=rQ.Pair,DJ=nQ.Scalar,RJ=oQ.YAMLMap,MJ=tQ.YAMLSeq;var FJ=eQ.Lexer,PJ=$J.LineCounter,TJ=ZJ.Parser,o=_1.parse,KJ=_1.parseAllDocuments,AJ=_1.parseDocument,Y1=_1.stringify,NJ=_8.visit,wJ=_8.visitAsync;function CJ($){let Z=V8($,"utf-8");return o(Z)}function O8($){return V8($,"utf-8")}function W8($=process.cwd()){let Z=["project.faf",".faf"];for(let U of Z){let z=B8($,U);if(Y8(z))return z}let X=bJ($);if(X!==$)for(let U of Z){let z=B8(X,U);if(Y8(z))return z}return null}import{writeFileSync as jJ}from"fs";import{join as SJ}from"path";var L8=c0.orange,EJ=c0.cyan,gJ=c0.cyanDeep,yJ="#FF9500",fJ="#FF3B30",hJ="#E6EDF3",xJ="#6E7681",I8={TROPHY:{glyph:"\uD83C\uDFC6",color:L8},GOLD:{glyph:"★",color:L8},SILVER:{glyph:"◆",color:EJ},BRONZE:{glyph:"◇",color:gJ},GREEN:{glyph:"●",color:hJ},YELLOW:{glyph:"●",color:yJ},RED:{glyph:"○",color:fJ},WHITE:{glyph:"♡",color:xJ}};function f0($){return String($??"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}var D8=["who","what","why","where","when","how"];function B1($){return $.filter(([,Z])=>Z!==void 0&&Z!==null&&String(Z).trim()!=="").map(([Z,X])=>`<div class="row"><div class="k">${f0(Z)}</div><div class="v">${f0(X)}</div></div>`).join(`
143
- `)}function R8($,Z,X="project.faf"){let U=f0($.project?.name??"Project"),z=Z.tier?.name??"WHITE",Q=I8[z]??I8.WHITE,J=Z.inherited?Z.represents?`inherited from ${f0(Z.represents)}`:"inherited":`${Z.score}%`,H=z==="TROPHY"&&!Z.inherited,q=$.human_context??{},G=D8.map((V)=>[V,q[V]]),B=Object.entries(q).filter(([V])=>!D8.includes(V)),_=[["goal",$.project?.goal],["main_language",$.project?.main_language],["type",$.project?.type],["framework",$.project?.framework],["faf_version",$.faf_version]],Y=Object.entries($.stack??{}),O=Y.filter(([,V])=>V&&V!=="slotignored"&&String(V).trim()!==""),L=Y.filter(([,V])=>V==="slotignored").length;return`<!DOCTYPE html>
142
+ `)}}function T1($){return JSON.parse(e().score_faf($))}function f6($){return JSON.parse(e().score_faf_enterprise($))}function y6($){return e().validate_faf($)}function h6($){return e().compile_fafb($)}function x6($){return JSON.parse(e().decompile_fafb($))}function u6($){return JSON.parse(e().fafb_info($))}function k6($){return JSON.parse(e().score_fafb($))}function v6(){return e().sdk_version()}function J3($){return{score:$.score,tier:i0($.score),populated:$.populated,empty:$.empty,ignored:$.ignored,active:$.active,total:$.total,slots:$.slots}}function N1($){if(/^\s*app_type:\s*about\s*$/m.test($)){let z=$.match(/^\s+source_score:\s*(\d+)\s*$/m),X=z?parseInt(z[1],10):-1,U=X>=0&&X<=100?X:-1,Q=$.match(/^\s+represents:\s*(\S+)\s*$/m),J=Q?Q[1]:void 0;return{score:U,tier:U>=0?i0(U):a[a.length-1],populated:0,empty:0,ignored:0,active:0,total:0,slots:{},inherited:!0,represents:J}}return J3(T1($))}function m6($){let Z=[];if(!$||typeof $!=="object")return Z.push("File is not a valid YAML mapping"),{valid:!1,errors:Z};let z=$;if(!z.faf_version)Z.push("Missing required field: faf_version");if(!z.project?.name)Z.push("Missing required field: project.name");if(z.app_type==="about"){if(!z.about?.represents)Z.push("app_type 'about' requires about.represents (owner/repo of the source codebase)");else if(!/^[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+$/.test(z.about.represents))Z.push(`about.represents must be "owner/repo" format (got: ${z.about.represents})`);if(z.about?.source_score!==void 0){let X=z.about.source_score;if(typeof X!=="number"||X<0||X>100)Z.push(`about.source_score must be a number 0-100 (got: ${X})`)}}return{valid:Z.length===0,errors:Z}}import{readFileSync as L9,writeFileSync as CY,existsSync as W9}from"fs";import{join as I9,dirname as hJ,basename as SY}from"path";var eQ=A2(),$J=Y$(),ZJ=_2(),x2=q$(),zJ=r0(),G0=b(),XJ=X0(),UJ=g(),QJ=Q0(),JJ=J0(),NY=H1(),HJ=f2(),GJ=y2(),_J=h2(),Y1=V9(),O9=s0();var YJ=eQ.Composer,qJ=$J.Document,BJ=ZJ.Schema,VJ=x2.YAMLError,OJ=x2.YAMLParseError,WJ=x2.YAMLWarning,IJ=zJ.Alias,LJ=G0.isAlias,DJ=G0.isCollection,RJ=G0.isDocument,FJ=G0.isMap,MJ=G0.isNode,KJ=G0.isPair,PJ=G0.isScalar,TJ=G0.isSeq,AJ=XJ.Pair,NJ=UJ.Scalar,wJ=QJ.YAMLMap,bJ=JJ.YAMLSeq;var CJ=HJ.Lexer,jJ=GJ.LineCounter,SJ=_J.Parser,o=Y1.parse,EJ=Y1.parseAllDocuments,gJ=Y1.parseDocument,q1=Y1.stringify,fJ=O9.visit,yJ=O9.visitAsync;function xJ($){let Z=L9($,"utf-8");return o(Z)}function D9($){return L9($,"utf-8")}function R9($=process.cwd()){let Z=["project.faf",".faf"];for(let X of Z){let U=I9($,X);if(W9(U))return U}let z=hJ($);if(z!==$)for(let X of Z){let U=I9(z,X);if(W9(U))return U}return null}import{writeFileSync as uJ}from"fs";import{join as kJ}from"path";var F9=c0.orange,vJ=c0.cyan,mJ=c0.cyanDeep,pJ="#FF9500",lJ="#FF3B30",dJ="#E6EDF3",cJ="#6E7681",M9={TROPHY:{glyph:"✪",color:F9},GOLD:{glyph:"★",color:F9},SILVER:{glyph:"◆",color:vJ},BRONZE:{glyph:"◇",color:mJ},GREEN:{glyph:"●",color:dJ},YELLOW:{glyph:"●",color:pJ},RED:{glyph:"○",color:lJ},WHITE:{glyph:"♡",color:cJ}};function y0($){return String($??"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}var K9=["who","what","why","where","when","how"];function B1($){return $.filter(([,Z])=>Z!==void 0&&Z!==null&&String(Z).trim()!=="").map(([Z,z])=>`<div class="row"><div class="k">${y0(Z)}</div><div class="v">${y0(z)}</div></div>`).join(`
143
+ `)}function P9($,Z,z="project.faf"){let X=y0($.project?.name??"Project"),U=Z.tier?.name??"WHITE",Q=M9[U]??M9.WHITE,J=Z.inherited?Z.represents?`inherited from ${y0(Z.represents)}`:"inherited":`${Z.score}%`,H=U==="TROPHY"&&!Z.inherited,G=$.human_context??{},_=K9.map((V)=>[V,G[V]]),B=Object.entries(G).filter(([V])=>!K9.includes(V)),Y=[["goal",$.project?.goal],["main_language",$.project?.main_language],["type",$.project?.type],["framework",$.project?.framework],["faf_version",$.faf_version]],q=Object.entries($.stack??{}),W=q.filter(([,V])=>V&&V!=="slotignored"&&String(V).trim()!==""),I=q.filter(([,V])=>V==="slotignored").length;return`<!DOCTYPE html>
144
144
  <html lang="en">
145
145
  <head>
146
146
  <meta charset="UTF-8">
147
147
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
148
- <title>${U} — project.faf</title>
148
+ <title>${X} — project.faf</title>
149
149
  <meta name="description" content="Visual render of project.faf. Authored by faf — humans like visuals, we gave them one.">
150
150
  <meta name="robots" content="index,follow">
151
151
  <style>
@@ -180,47 +180,48 @@ footer strong{color:#e6edf3}
180
180
  <div class="bar"></div>
181
181
  <div class="eyebrow">project.faf · visual render</div>
182
182
  <header>
183
- <h1>${U}</h1>
184
- <span class="badge">${Q.glyph} ${f0(z)}</span>
183
+ <h1>${X}</h1>
184
+ <span class="badge">${Q.glyph} ${y0(U)}</span>
185
185
  <span class="score">${J}</span>
186
186
  </header>
187
187
  <div class="meter"><span></span></div>
188
- ${H?'<p class="award statline"><span class="awd-pre">✅ All Required slots filled.</span> <span class="awd-win">100% Trophy \uD83C\uDFC6 Awarded</span></p>':`<p class="muted statline">${Z.populated}/${Z.active} slots populated · ${Z.total} total${L?` · ${L} N/A`:""}</p>`}
188
+ ${H?'<p class="award statline"><span class="awd-pre">✅ All Required slots filled.</span> <span class="awd-win">100% Trophy ✪ Awarded</span></p>':`<p class="muted statline">${Z.populated}/${Z.active} slots populated · ${Z.total} total${I?` · ${I} N/A`:""}</p>`}
189
189
 
190
190
  <section>
191
191
  <h2>The 6 W's</h2>
192
- ${B1(G)||'<p class="muted">No human_context yet.</p>'}
192
+ ${B1(_)||'<p class="muted">No human_context yet.</p>'}
193
193
  ${B.length?B1(B):""}
194
194
  </section>
195
195
 
196
196
  <section>
197
197
  <h2>Project</h2>
198
- ${B1(_)||'<p class="muted">—</p>'}
198
+ ${B1(Y)||'<p class="muted">—</p>'}
199
199
  </section>
200
200
 
201
201
  <section>
202
202
  <h2>Stack</h2>
203
- ${O.length?B1(O):'<p class="muted">No active stack slots.</p>'}
203
+ ${W.length?B1(W):'<p class="muted">No active stack slots.</p>'}
204
204
  </section>
205
205
 
206
206
  <footer>
207
- Rendered on-demand from your current <strong>${f0(X)}</strong><br>
207
+ Rendered on-demand from your current <strong>${y0(z)}</strong><br>
208
208
  <strong>Humans like visuals. <span style="color:#00D4D4">We gave them one.</span></strong>
209
209
  </footer>
210
210
  </div>
211
211
  </body>
212
212
  </html>
213
- `}function uJ($,Z,X,U="project.faf"){jJ(SJ($,"project.html"),R8(Z,X,U),"utf-8")}import{writeFileSync as kJ}from"fs";import{join as vJ}from"path";var M8="application/vnd.faf+yaml",mJ="https://static.modelcontextprotocol.io/schemas/v1/server-card.schema.json",pJ=/^[a-zA-Z0-9.-]+\/[a-zA-Z0-9._-]+$/;function P8($){let Z=String($.project?.name??"project").trim();if(Z.includes("/")&&pJ.test(Z))return Z;let X=$.project?.homepage??$.project?.website??$.project?.url,U="local";if(X)try{U=new URL(X).hostname.replace(/^www\./,"").split(".").reverse().join(".")}catch{}let z=Z.replace(/[^a-zA-Z0-9._-]/g,"-").replace(/^-+|-+$/g,"")||"project";return`${U}/${z}`}function lJ($){let Z=String($.project?.goal??$.context??$.project?.name??"MCP server").replace(/\s+/g," ").trim();if(!Z)return"MCP server";return Z.length<=100?Z:`${Z.slice(0,97).trimEnd()}...`}function f2($,Z={}){return{faf:Z.fafPointer??"./project.faf",mediaType:M8,iana:`https://www.iana.org/assignments/media-types/${M8}`,deterministic:!0,...Z.scoreEndpoint?{scoreEndpoint:Z.scoreEndpoint}:{},generated:$.generated??Z.now??new Date().toISOString()}}function T8($,Z={}){let X={$schema:mJ,name:P8($),version:String($.project?.version??"0.1.0"),description:lJ($)},U=iJ($)??$.project?.name;if(U&&U.length<=100)X.title=U;let z=$.project?.homepage??$.project?.website??$.project?.url;if(z)X.websiteUrl=z;if(Z.remoteUrl)X.remotes=[{type:"streamable-http",url:Z.remoteUrl}];return X._meta={"one.faf/context":f2($,Z)},X}var K8="io.modelcontextprotocol.registry/publisher-provided",F8=4096;function dJ($,Z={}){let X={"one.faf/context":f2($,Z)},U=new TextEncoder().encode(JSON.stringify(X)).length;if(U>F8)throw Error(`publisher-provided _meta is ${U}B — exceeds the registry ${F8}B cap`);return{[K8]:X}}function cJ($){return P8($)}function iJ($){let Z=$.project?.title;if(typeof Z==="string"){let X=Z.trim();if(X&&X.length<=100)return X}return}function sJ($,Z,X={}){let U=T8(Z,X),z=vJ($,"server-card");return kJ(z,`${JSON.stringify(U,null,2)}
214
- `,"utf-8"),z}var h2=["ephemeral","standard","high","critical"],G0=Object.fromEntries(h2.map(($,Z)=>[$,Z])),V1=new Set(["user","feedback","project","reference"]),x2=new Set(["version","profile","namepoint","created","last_etched","retention","index","memory"]),u2=new Set(["facts","sessions","preferences","custom"]),k2={low:"ephemeral",medium:"standard"};import{readFileSync as aJ,writeFileSync as rJ,existsSync as nJ}from"fs";function h0(){return new Date().toISOString().replace(/\.\d{3}Z$/,"Z")}function x($){return $===null||$===void 0}function I$($){if(x($))return"standard";if(k2[$])return k2[$];if($ in G0)return $;return"standard"}var oJ=new Set(["text","id","type","priority","tags","links","timestamp","source"]);function A8($){if(typeof $==="string")return{text:$,id:null,type:null,priority:"standard",tags:[],links:[],timestamp:null,source:null,extra:{}};if(!$||typeof $!=="object"||!("text"in $))throw Error(`fact must be a string or a mapping with 'text': ${JSON.stringify($)}`);let Z=$,X={};for(let[U,z]of Object.entries(Z))if(!oJ.has(U))X[U]=z;return{text:String(Z.text),id:Z.id??null,type:Z.type??null,priority:I$(Z.priority),tags:Array.isArray(Z.tags)?Z.tags.slice():[],links:Array.isArray(Z.links)?Z.links.slice():[],timestamp:Z.timestamp??null,source:Z.source??null,extra:X}}function N8($){if(x($.id)&&x($.type)&&$.tags.length===0&&$.links.length===0&&x($.timestamp)&&x($.source)&&Object.keys($.extra).length===0&&$.priority==="standard")return $.text;let X={text:$.text};if(!x($.id))X.id=$.id;if(!x($.type))X.type=$.type;if(X.priority=$.priority,$.tags.length)X.tags=$.tags;if($.links.length)X.links=$.links;if(!x($.timestamp))X.timestamp=$.timestamp;if(!x($.source))X.source=$.source;return Object.assign(X,$.extra),X}class D0{namepoint;profile;retention;created;last_etched;_facts;_byId;_index;_sessions;_preferences;_custom;_extra;_memoryExtra;constructor($,Z={}){this.namepoint=$,this.profile=Z.profile??"knowledge",this.retention=Z.retention??"forever",this.created=Z.created??h0(),this.last_etched=this.created,this._facts=Z.facts?Z.facts.slice():[],this._byId=new Map,this._facts.forEach((X,U)=>{if(!x(X.id))this._byId.set(X.id,U)}),this._index=Z.index?Z.index.slice():[],this._sessions=Z.sessions?structuredClone(Z.sessions):[],this._preferences=Z.preferences?{...Z.preferences}:{},this._custom=Z.custom?{...Z.custom}:{},this._extra=Z.extra?{...Z.extra}:{},this._memoryExtra=Z.memoryExtra?{...Z.memoryExtra}:{}}get facts(){return this._facts}get index(){return this._index}get sessions(){return this._sessions}get preferences(){return this._preferences}get custom(){return this._custom}get extra(){return this._extra}get memoryExtra(){return this._memoryExtra}static load($){if(!nJ($))throw Error(`soul file not found: ${$}`);let Z=aJ($,"utf-8"),X=o(Z);if(!X||typeof X!=="object")throw Error("soul is not a YAML mapping");let U=X.memory&&typeof X.memory==="object"?X.memory:{},z=Array.isArray(U.facts)?U.facts:[],Q={};for(let[q,G]of Object.entries(X))if(!x2.has(q))Q[q]=structuredClone(G);let J={};for(let[q,G]of Object.entries(U))if(!u2.has(q))J[q]=structuredClone(G);let H=new D0(String(X.namepoint??$.replace(/.*\//,"").replace(/\.fafm$/,"")),{profile:String(X.profile??"voice"),facts:z.map(A8),retention:String(X.retention??"forever"),created:X.created??null,index:Array.isArray(X.index)?X.index.slice():[],sessions:Array.isArray(U.sessions)?structuredClone(U.sessions):[],preferences:U.preferences&&typeof U.preferences==="object"?structuredClone(U.preferences):{},custom:U.custom&&typeof U.custom==="object"?structuredClone(U.custom):{},extra:Q,memoryExtra:J});return H.last_etched=String(X.last_etched??H.created),H}static fromFile($){return D0.load($)}toDoc(){let $={facts:this._facts.map(N8),sessions:structuredClone(this._sessions),preferences:structuredClone(this._preferences),custom:structuredClone(this._custom)};for(let[X,U]of Object.entries(this._memoryExtra))if(!u2.has(X))$[X]=structuredClone(U);let Z={version:"1.1",profile:this.profile,namepoint:this.namepoint,created:this.created,last_etched:this.last_etched,retention:this.retention,index:this._index.slice(),memory:$};for(let[X,U]of Object.entries(this._extra))if(!x2.has(X))Z[X]=structuredClone(U);return Z}toYaml(){return Y1(this.toDoc(),{lineWidth:100})}rebuildIndex($=80){return this._index=this._facts.map((Z)=>`${Z.id??"?"} — ${Z.text.slice(0,$)}`),this._index}save($,Z={}){if(Z.reindex!==!1)this.rebuildIndex();return rJ($,this.toYaml(),"utf-8"),$}toFile($,Z={}){return this.save($,Z)}add($){if(!x($.id)&&this._byId.has($.id)){let Z=this._byId.get($.id);if(Z!==void 0)this._facts[Z]=$}else if(this._facts.push($),!x($.id))this._byId.set($.id,this._facts.length-1);if($.timestamp&&$.timestamp>(this.last_etched||""))this.last_etched=$.timestamp;return $}etch($,Z={}){return this.add({text:$,id:Z.id??null,type:Z.type??null,priority:I$(Z.priority),tags:Z.tags?Z.tags.slice():[],links:Z.links?Z.links.slice():[],timestamp:h0(),source:Z.source??null,extra:{}})}recall($,Z={}){let X=G0[I$(Z.minPriority??"ephemeral")]??0,U=($??"").toLowerCase(),z=new Set(Z.tags??[]),Q=[];this._facts.forEach((H,q)=>{if(U&&!H.text.toLowerCase().includes(U))return;if(z.size>0&&![...z].some((G)=>H.tags.includes(G)))return;if(!x(Z.type)&&H.type!==Z.type)return;if((G0[H.priority]??1)<X)return;Q.push([q,H])}),Q.sort((H,q)=>{let G=G0[H[1].priority]??1,B=G0[q[1].priority]??1;if(B!==G)return B-G;let _=H[1].timestamp??"",Y=q[1].timestamp??"";if(Y!==_)return Y<_?-1:Y>_?1:0;return q[0]-H[0]});let J=Q.map(([,H])=>H);if(!x(Z.limit))return J.slice(0,Z.limit);return J}getFact($){let Z=this._byId.get($);return Z===void 0?null:this._facts[Z]}deleteFact($){let Z=this._byId.get($);if(Z===void 0)return!1;return this._facts.splice(Z,1),this._byId.clear(),this._facts.forEach((X,U)=>{if(!x(X.id))this._byId.set(X.id,U)}),!0}}import{readdirSync as tJ,readFileSync as eJ,statSync as w8,existsSync as $H}from"fs";import{join as ZH,basename as b8,resolve as XH}from"path";var C8=new Set(["MEMORY.md","MEMORY-FULL.md","README.md"]),UH=/\[\[([^\]]+)\]\]/g;function zH($){let Z=w8($).mtimeMs;return new Date(Z).toISOString().replace(/\.\d{3}Z$/,"Z")}function QH($){if(!$.startsWith("---"))return{fm:null,body:$};let Z=$.split("---");if(Z.length<3)return{fm:null,body:$};try{let X=o(Z[1]);if(!X||typeof X!=="object")return{fm:null,body:Z.slice(2).join("---").trim()};return{fm:X,body:Z.slice(2).join("---").trim()}}catch{return{fm:null,body:$}}}function JH($,Z,X){if(!X.name)return null;let U=X.metadata&&typeof X.metadata==="object"?X.metadata:{},z=U.type;if(typeof z!=="string"||!V1.has(z))return null;let Q=String(X.name).trim(),H=(X.description!==void 0&&X.description!==null&&String(X.description).trim()?String(X.description).trim():"")||Q,q={};if(U.originSessionId)q.provenance=[`session:${U.originSessionId}`];let G=[...new Set([...Z.matchAll(UH)].map((B)=>B[1]))].sort();return{text:H,id:Q,type:z,priority:"standard",tags:[],links:G,timestamp:zH($),source:`claude-code memory: ${b8($)}`,extra:q}}function j8($,Z={}){let X=XH($);if(!$H(X))throw Error(`Claude memory directory not found: ${X}`);if(!w8(X).isDirectory())throw Error(`Claude memory path is not a directory: ${X}`);let U=Z.skip??C8,z=Z.namepoint??`@claude-code:${b8(X)}`,Q=[],J=tJ(X).filter((_)=>_.endsWith(".md")).sort();for(let _ of J){if(U.has(_))continue;let Y=ZH(X,_),O;try{O=eJ(Y,"utf-8")}catch{continue}let{fm:L,body:V}=QH(O);if(!L)continue;let W=JH(Y,V,L);if(W)Q.push(W)}let H=Q.map((_)=>_.timestamp).filter(Boolean),q=H.length?H.reduce((_,Y)=>_<Y?_:Y):h0(),G=H.length?H.reduce((_,Y)=>_>Y?_:Y):q,B=new D0(z,{profile:"knowledge",facts:Q,created:q});return B.last_etched=G,B.rebuildIndex(),B}var f8="faf-interview/1",x0="(terse — 3-4 words)",v2=[{path:"project.name",question:"What is the name of this project?",header:"Name",type:"text",required:!0},{path:"project.goal",question:"What does this project do? (one sentence)",header:"Goal",type:"text",required:!0},{path:"human_context.who",question:`Who is this for? ${x0}`,header:"Who",type:"text",required:!0},{path:"human_context.what",question:`What are they building? ${x0}`,header:"What",type:"text",required:!0},{path:"human_context.why",question:`Why does it exist? ${x0}`,header:"Why",type:"text",required:!0},{path:"human_context.where",question:`Where does it run or ship? ${x0}`,header:"Where",type:"text",required:!0},{path:"human_context.when",question:`When — timeline or stage? ${x0}`,header:"When",type:"text",required:!0},{path:"human_context.how",question:`How is it built or used? ${x0}`,header:"How",type:"text",required:!0}],h8=[{path:"project.main_language",question:"What is the primary programming language?",header:"Language",type:"select",required:!0,options:[{label:"TypeScript",value:"TypeScript",description:"JavaScript with types"},{label:"JavaScript",value:"JavaScript",description:"Vanilla JS or Node.js"},{label:"Python",value:"Python",description:"Python 3.x"},{label:"Rust",value:"Rust",description:"Systems programming"},{label:"Go",value:"Go",description:"Golang"},{label:"Other",value:"Other",description:"Specify manually"}]},{path:"stack.frontend",question:"What frontend framework does it use?",header:"Frontend",type:"select",required:!1,options:[{label:"React",value:"React",description:"React.js"},{label:"Vue",value:"Vue",description:"Vue.js"},{label:"Svelte",value:"Svelte",description:"Svelte/SvelteKit"},{label:"Next.js",value:"Next.js",description:"React framework"},{label:"None",value:"None",description:"No frontend"},{label:"Other",value:"Other",description:"Specify manually"}]},{path:"stack.backend",question:"What backend framework does it use?",header:"Backend",type:"select",required:!1,options:[{label:"Express",value:"Express",description:"Node.js Express"},{label:"Fastify",value:"Fastify",description:"Node.js Fastify"},{label:"Django",value:"Django",description:"Python Django"},{label:"FastAPI",value:"FastAPI",description:"Python FastAPI"},{label:"None",value:"None",description:"No backend"},{label:"Other",value:"Other",description:"Specify manually"}]},{path:"stack.database",question:"What database does it use?",header:"Database",type:"select",required:!1,options:[{label:"PostgreSQL",value:"PostgreSQL",description:"Postgres"},{label:"MySQL",value:"MySQL",description:"MySQL/MariaDB"},{label:"SQLite",value:"SQLite",description:"Embedded SQL"},{label:"MongoDB",value:"MongoDB",description:"Document store"},{label:"None",value:"None",description:"No database"},{label:"Other",value:"Other",description:"Specify manually"}]},{path:"stack.runtime",question:"What runtime does it run on?",header:"Runtime",type:"text",required:!1},{path:"stack.hosting",question:"Where is it hosted or distributed?",header:"Hosting",type:"text",required:!1},{path:"stack.build",question:"What is the build tool?",header:"Build",type:"text",required:!1},{path:"stack.cicd",question:"What CI/CD does it use?",header:"CI/CD",type:"text",required:!1}],u0=[...v2,...h8],x8=new Map(u0.map(($)=>[$.path,$])),HH=Object.fromEntries(u0.map(($)=>[$.path,$]));function m2($){let Z=x8.get($);if(Z)return Z.question;let X=l0.get($)??f.find((U)=>U.canonical===$);return X?`${X.description}?`.replace(/\?\?$/,"?"):`${$}?`}function qH($,Z){return u0.filter((X)=>{let U=X.path.split("."),z=$;for(let Q of U)if(z&&typeof z==="object"&&Q in z)z=z[Q];else{z=void 0;break}if(z==="slotignored")return!1;return Z(z)})}var GH=new Set(["developers","development teams","development team","teams","development","cloud platform","web platform","platform","best practices","improve development efficiency","development efficiency","modern development practices","modern development","test-driven development","production/stable","production","stable","app","project","tool"]),_H=[["npm",/\bnpm\b/i],["PyPI",/\bpypi\b/i],["crates.io",/\bcrates\.io\b/i],["Homebrew",/\bhomebrew\b/i],["Docker",/\bdocker\b/i],["Cloudflare",/\bcloudflare\b/i],["Vercel",/\bvercel\b/i],["Netlify",/\bnetlify\b/i],["AWS",/\baws\b/i],["Cloud Run",/\bcloud run\b/i],["edge",/\bedge\b/i],["browser",/\bbrowser\b/i],["WASM",/\bwasm\b/i],["GitHub",/\bgithub\b/i],["MCP Registry",/\bmcp registry\b/i],["Chrome Web Store",/\bchrome web store\b/i],["Smithery",/\bsmithery\b/i]],S8=($)=>GH.has($.toLowerCase().trim()),YH=/^(?:with|and|or|using|for|to|that|who|whom|whose|the|a|an|in|on|of|via|by|&)$/i;function E8($,Z=5){let X=$.trim().split(/\s+/).filter(Boolean).slice(0,Z);while(X.length&&YH.test(X[X.length-1].replace(/[.,;:]+$/,"")))X.pop();return X.join(" ")}function u8($){let Z={};if(!$||typeof $!=="string")return Z;let X=$.trim(),U=X.replace(/^[^A-Za-z0-9]+/,"").split(/\s+(?:for|that|which|to)\s+|\s+[—–]\s+|\s-\s|:\s|\.\s|,\s/)[0].trim(),z=E8(U);if(z.split(/\s+/).filter(Boolean).length>=2&&!S8(z))Z.what=z;let Q=_H.filter(([,q])=>q.test(X)).map(([q])=>q);if(Q.length)Z.where=Q.slice(0,4).join(", ");let J=X.match(/\bfor ((?:[A-Za-z][\w./+-]* )?(?:any |all )?(?:developers?|teams?|engineers?|builders?|users?|integrators?)\b[^.,;:—]*)/i),H=E8((J?.[1]||"").trim().replace(/\s+/g," "));if(H&&!S8(H))Z.who=H;return Z}function g8($,Z){let X=$;for(let U of Z.split("."))if(X&&typeof X==="object"&&U in X)X=X[U];else return;return X}function y8($){if(typeof $!=="string")return!1;let Z=$.trim();if(!Z||Z==="slotignored")return!1;return!_0(Z)}function BH($,Z={}){let X=$&&typeof $==="object"?$:{},U=g8(X,"project.goal"),z=(y8(U)?String(U).trim():"")||(Z.goal??"").trim(),Q=u8(z),J=Z.detailed??{},H={"project.goal":z||void 0,"human_context.what":Q.what,"human_context.where":Q.where,"human_context.who":Q.who},q=(O)=>{let L=H[O];if(L)return{value:L,source:"project goal",confidence:0.9};let V=O.startsWith("human_context.")?O.slice(14):"",W=V?J[V]:void 0;return W?{value:W.value,source:W.source,confidence:W.confidence}:void 0},G=v2.map((O,L)=>{let V={n:L+1,path:O.path,header:O.header,question:O.question},W=g8(X,O.path);if(y8(W))return{...V,value:String(W).trim(),status:"filled",seeded:!1};let D=q(O.path);if(D)return{...V,value:D.value,status:"seeded",seeded:!0,source:D.source,confidence:D.confidence};return{...V,value:"",status:"empty",seeded:!1}}),B=G.filter((O)=>O.status==="filled").length,_=G.filter((O)=>O.status==="seeded").length,Y=G.filter((O)=>O.status==="empty").length;return{version:f8,rows:G,filledCount:B,seededCount:_,emptyCount:Y,complete:Y===0}}function O1($){if($===null||$===void 0)return!0;if(typeof $==="string"){let Z=$.trim();return Z===""||_0(Z)}return!1}function VH($,Z){let X=$;for(let U of Z.split("."))if(X&&typeof X==="object"&&U in X)X=X[U];else return;return X}function k8($){if($==="project.goal")return!0;return l0.get($)?.category==="human"}function v8($,Z=O1){let X=[],U=[];for(let z of u0){let Q=VH($,z.path);if(Q==="slotignored")continue;if(!Z(Q))continue;(k8(z.path)?X:U).push(z.path)}return{human:X,sourceable:U}}function m8($,Z,X=O1){let U=v8(Z,X),z;if($>=100||U.human.length===0&&U.sourceable.length===0)z="done";else if(U.sourceable.length>0)z="can-source";else z="needs-human";let Q=z==="needs-human"?p2(U):[];return{status:z,score:$,gaps:U,ask:Q}}function p2($){return $.human.map((Z)=>({path:Z,question:m2(Z)}))}function OH($,Z={}){let X=Math.max(1,Z.maxRounds??5),U=Z.isEmpty??O1,z=[],Q=0;for(let H=0;H<=X;H++){let q=$.read();if(!q)return{status:"no-faf",score:0,rounds:Q,history:z,ask:[]};let G=$.score(q.yaml);z.push(G);let B=m8(G,q.data,U);if(B.status==="done")return{status:"done",score:G,rounds:Q,history:z,ask:[]};if(B.status==="needs-human")return{status:"needs-human",score:G,rounds:Q,history:z,ask:B.ask};if(z.length>=2&&G<=z[z.length-2])return B.gaps.human.length?{status:"needs-human",score:G,rounds:Q,history:z,ask:p2(B.gaps)}:{status:"stuck",score:G,rounds:Q,history:z,ask:[]};if(Q>=X)return{status:"capped",score:G,rounds:Q,history:z,ask:p2(B.gaps)};$.runAuto(),Q++}return{status:"capped",score:z[z.length-1]??0,rounds:Q,history:z,ask:[]}}import{createHash as l8}from"crypto";var l2="faf-bench/1",WH={"project.name":"What is the project's name?","project.goal":"What is the project's goal — what is it for?","project.main_language":"What is the primary programming language?","human_context.who":"Who is this project for?","human_context.what":"What are they building?","human_context.why":"Why does this project exist?","human_context.where":"Where does it run or get distributed?","human_context.when":"When — what is the project's timeline or stage?","human_context.how":"How is it built or used?"};function LH($,Z){return WH[$]??`What is the project's ${Z.replace(/\s*\(.*\)$/,"").toLowerCase()}?`}var d8=[["typescript","ts"],["javascript","js"],["python","py","python3"],["node","nodejs","node js","node.js"],["github actions","gh actions","actions"],["postgresql","postgres","pg"],["kubernetes","k8s"],["npm","npm registry"],["cloudflare workers","cf workers","workers"],["google cloud run","cloud run","gcp cloud run"]],D$=new Map;d8.forEach(($,Z)=>$.forEach((X)=>D$.set(X,Z)));var IH=new Set(["a","an","the","and","or","of","for","to","in","on","with","is","it","its","their","your","via","by","using","use","used"]);function W1($){return $.toLowerCase().replace(/[^a-z0-9\s.+#-]/g," ").replace(/\.(?=\s|$)/g," ").replace(/\s+/g," ").trim()}function p8($){return W1($).split(" ").filter((Z)=>Z&&!IH.has(Z))}function c8($,Z){let X=W1($),U=W1(Z);if(!X||!U)return!1;if(X===U)return!0;let z=D$.get(X);if(z!==void 0&&D$.get(U)===z)return!0;let Q=p8($);if(Q.length===0)return!1;let J=new Set(p8(Z));return Q.every((H)=>{if(J.has(H))return!0;let q=D$.get(H);return q!==void 0&&[...J].some((G)=>D$.get(G)===q)})}function DH($){let Z=T1($),X=o($),U=[],z={},Q=0;for(let q of f){if(Z.slots[q.path]!=="populated")continue;let G=Z9(X,q);if(typeof G!=="string")continue;let B=G.trim();if(!B||F$.has(B.toLowerCase()))continue;Q+=1,U.push({n:Q,path:q.path,question:LH(q.path,q.description)}),z[Q]=B}let J=JSON.stringify({v:l2,q:U.map((q)=>[q.path,q.question])}),H=l8("sha256").update(J).digest("hex").slice(0,12);return{version:l2,qsetHash:H,questions:U,answers:z}}function RH($){return{version:$.version,qsetHash:$.qsetHash,questions:$.questions}}function MH($,Z){let X=$.questions.map((z)=>{let Q=Z[String(z.n)]??Z[z.path]??"";return{n:z.n,path:z.path,ok:typeof Q==="string"&&Q.trim()!==""&&c8($.answers[z.n],Q)}}),U=$.questions.filter((z)=>!X[z.n-1].ok);return{correct:X.filter((z)=>z.ok).length,total:$.questions.length,misses:U,perQuestion:X}}function FH($,Z){let X=JSON.stringify({v:$.version,repo:Z??null,qset:$.qsetHash,protocol:$.protocol,cold:$.cold??null,faf:$.faf??null});return{projection:X,hash:l8("sha256").update(X).digest("hex")}}import{existsSync as SH,readdirSync as s8,readFileSync as EH}from"fs";import{join as i2,dirname as gH,extname as yH,resolve as fH}from"path";var d2={"package.json":{frameworks:["Node.js","JavaScript","TypeScript"],slots:{packageManager:"npm/yarn/pnpm",mainLanguage:"JavaScript/TypeScript"},priority:35,intelligence:"ultra-high"},"README.md":{frameworks:[],slots:{targetUser:"developers",coreProblem:"understanding project",missionPurpose:"project documentation"},priority:25,intelligence:"high"},"requirements.txt":{frameworks:["Python"],slots:{packageManager:"pip",mainLanguage:"Python"},priority:35,intelligence:"ultra-high"},Pipfile:{frameworks:["Python"],slots:{packageManager:"pipenv",mainLanguage:"Python"},priority:35,intelligence:"ultra-high"},"pyproject.toml":{frameworks:["Python"],slots:{mainLanguage:"Python",runtime:"Python",backend:"Python"},priority:36,intelligence:"ultra-high"},Gemfile:{frameworks:["Ruby","Rails"],slots:{packageManager:"bundler",mainLanguage:"Ruby"},priority:35,intelligence:"ultra-high"},"composer.json":{frameworks:["PHP","Laravel","Symfony"],slots:{packageManager:"composer",mainLanguage:"PHP"},priority:35,intelligence:"ultra-high"},"Cargo.toml":{frameworks:["Rust"],slots:{packageManager:"cargo",mainLanguage:"Rust",buildTool:"cargo"},priority:36,intelligence:"ultra-high"},"go.mod":{frameworks:["Go"],slots:{packageManager:"go modules",mainLanguage:"Go",buildTool:"go build"},priority:36,intelligence:"ultra-high"},"pubspec.yaml":{frameworks:["Dart"],slots:{packageManager:"pub",mainLanguage:"Dart"},priority:35,intelligence:"ultra-high"},"pom.xml":{frameworks:["Java","Spring","Maven"],slots:{packageManager:"maven",mainLanguage:"Java",buildTool:"maven"},priority:35,intelligence:"ultra-high"},"build.gradle":{frameworks:["Java","Kotlin","Spring","Gradle"],slots:{packageManager:"gradle",mainLanguage:"Java/Kotlin",buildTool:"gradle"},priority:35,intelligence:"ultra-high"},"next.config.js":{frameworks:["Next.js"],slots:{framework:"Next.js",runtime:"Node.js",buildTool:"Next.js",mainLanguage:"JavaScript",server:"Node.js"},priority:30,intelligence:"high"},"next.config.mjs":{frameworks:["Next.js"],slots:{framework:"Next.js",runtime:"Node.js",buildTool:"Next.js",mainLanguage:"JavaScript",server:"Node.js"},priority:30,intelligence:"high"},"next.config.ts":{frameworks:["Next.js 13+"],slots:{framework:"Next.js 13+",runtime:"Node.js",buildTool:"Next.js",mainLanguage:"TypeScript",server:"Node.js"},priority:30,intelligence:"high"},"nuxt.config.js":{frameworks:["Nuxt 2"],slots:{framework:"Nuxt 2",runtime:"Node.js",buildTool:"Nuxt",mainLanguage:"JavaScript",server:"Node.js"},priority:30,intelligence:"high"},"nuxt.config.ts":{frameworks:["Nuxt 3"],slots:{framework:"Nuxt 3",runtime:"Node.js",buildTool:"Nuxt",mainLanguage:"TypeScript",server:"Node.js"},priority:30,intelligence:"high"},"svelte.config.js":{frameworks:["SvelteKit"],slots:{framework:"SvelteKit",buildTool:"Vite",mainLanguage:"JavaScript",server:"Node.js"},priority:30,intelligence:"high"},"angular.json":{frameworks:["Angular"],slots:{framework:"Angular",buildTool:"Angular CLI",mainLanguage:"TypeScript",server:"Node.js"},priority:30,intelligence:"high"},"manifest.json":{frameworks:["Chrome Extension","Browser Extension"],slots:{framework:"Chrome Extension",runtime:"Chrome/Browser",mainLanguage:"JavaScript",hosting:"Chrome Web Store",apiType:"Chrome APIs"},priority:35,intelligence:"ultra-high",confirmWith:["popup.html","background.js","content.js"]},"vue.config.js":{frameworks:["Vue"],slots:{framework:"Vue",buildTool:"Vue CLI",mainLanguage:"JavaScript"},priority:30,intelligence:"high"},"remix.config.js":{frameworks:["Remix"],slots:{framework:"Remix",runtime:"Node.js",mainLanguage:"JavaScript",server:"Node.js"},priority:30,intelligence:"high"},"gatsby-config.js":{frameworks:["Gatsby"],slots:{framework:"Gatsby",buildTool:"Gatsby",mainLanguage:"JavaScript",server:"Node.js"},priority:30,intelligence:"high"},"gatsby-config.ts":{frameworks:["Gatsby"],slots:{framework:"Gatsby",buildTool:"Gatsby",mainLanguage:"TypeScript",server:"Node.js"},priority:30,intelligence:"high"},"astro.config.mjs":{frameworks:["Astro"],slots:{framework:"Astro",buildTool:"Vite",mainLanguage:"JavaScript",server:"Node.js"},priority:30,intelligence:"high"},"redwood.toml":{frameworks:["RedwoodJS"],slots:{framework:"RedwoodJS",buildTool:"Webpack",mainLanguage:"JavaScript/TypeScript",server:"Node.js",database:"Prisma"},priority:30,intelligence:"high"},"blitz.config.ts":{frameworks:["Blitz.js"],slots:{framework:"Blitz.js",buildTool:"Next.js",mainLanguage:"TypeScript",server:"Node.js",database:"Prisma"},priority:30,intelligence:"high"},"qwik.config.ts":{frameworks:["Qwik"],slots:{framework:"Qwik",buildTool:"Vite",mainLanguage:"TypeScript",server:"Node.js"},priority:30,intelligence:"high"},"manage.py":{frameworks:["Django"],slots:{framework:"Django",backend:"Django",mainLanguage:"Python",server:"Django",apiType:"Django Views"},priority:30,intelligence:"high"},artisan:{frameworks:["Laravel"],slots:{framework:"Laravel",backend:"Laravel",mainLanguage:"PHP",server:"PHP",apiType:"Laravel Routes"},priority:30,intelligence:"high"},"mix.exs":{frameworks:["Phoenix","Elixir"],slots:{framework:"Phoenix",backend:"Phoenix",mainLanguage:"Elixir",server:"BEAM"},priority:30,intelligence:"high"},"nest-cli.json":{frameworks:["NestJS"],slots:{framework:"NestJS",backend:"NestJS",mainLanguage:"TypeScript",server:"Node.js",apiType:"REST API"},priority:30,intelligence:"high"},"strapi.config.js":{frameworks:["Strapi"],slots:{backend:"Strapi",apiType:"REST API",database:"Required",server:"Node.js"},priority:30,intelligence:"high"},Dockerfile:{frameworks:["Docker"],slots:{hosting:"Docker",connection:"Containerized"},priority:30,intelligence:"high"},"docker-compose.yml":{frameworks:["Docker Compose"],slots:{hosting:"Docker",connection:"Multi-container"},priority:30,intelligence:"high"},"docker-compose.yaml":{frameworks:["Docker Compose"],slots:{hosting:"Docker",connection:"Multi-container"},priority:30,intelligence:"high"},"kubernetes.yml":{frameworks:["Kubernetes"],slots:{hosting:"Kubernetes",connection:"Orchestrated"},priority:30,intelligence:"high"},"k8s.yaml":{frameworks:["Kubernetes"],slots:{hosting:"Kubernetes",connection:"Orchestrated"},priority:30,intelligence:"high"},"vercel.json":{frameworks:["Vercel"],slots:{hosting:"Vercel",cicd:"Vercel"},priority:30,intelligence:"high"},"netlify.toml":{frameworks:["Netlify"],slots:{hosting:"Netlify",cicd:"Netlify"},priority:30,intelligence:"high"},"render.yaml":{frameworks:["Render"],slots:{hosting:"Render",cicd:"Render"},priority:30,intelligence:"high"},"fly.toml":{frameworks:["Fly.io"],slots:{hosting:"Fly.io",cicd:"Fly.io"},priority:30,intelligence:"high"},"railway.json":{frameworks:["Railway"],slots:{hosting:"Railway",cicd:"Railway"},priority:30,intelligence:"high"},"railway.toml":{frameworks:["Railway"],slots:{hosting:"Railway",cicd:"Railway"},priority:30,intelligence:"high"},"app.yaml":{frameworks:["Google App Engine"],slots:{hosting:"Google Cloud",cicd:"Google Cloud"},priority:30,intelligence:"high"},Procfile:{frameworks:["Heroku"],slots:{hosting:"Heroku",cicd:"Heroku"},priority:30,intelligence:"high"},"vite.config.js":{frameworks:["Vite"],slots:{buildTool:"Vite"},priority:25,intelligence:"medium"},"vite.config.ts":{frameworks:["Vite"],slots:{buildTool:"Vite",mainLanguage:"TypeScript"},priority:25,intelligence:"medium"},"webpack.config.js":{frameworks:["Webpack"],slots:{buildTool:"Webpack"},priority:25,intelligence:"medium"},"rollup.config.js":{frameworks:["Rollup"],slots:{buildTool:"Rollup"},priority:25,intelligence:"medium"},"esbuild.config.js":{frameworks:["esbuild"],slots:{buildTool:"esbuild"},priority:25,intelligence:"medium"},"parcel.config.js":{frameworks:["Parcel"],slots:{buildTool:"Parcel"},priority:25,intelligence:"medium"},"snowpack.config.js":{frameworks:["Snowpack"],slots:{buildTool:"Snowpack"},priority:25,intelligence:"medium"},"tsconfig.json":{frameworks:["TypeScript"],slots:{mainLanguage:"TypeScript"},priority:25,intelligence:"medium"},"jsconfig.json":{frameworks:["JavaScript"],slots:{mainLanguage:"JavaScript"},priority:20,intelligence:"medium"},"babel.config.js":{frameworks:["Babel"],slots:{buildTool:"Babel"},priority:20,intelligence:"medium"},".babelrc":{frameworks:["Babel"],slots:{buildTool:"Babel"},priority:20,intelligence:"medium"},"jest.config.js":{frameworks:["Jest"],slots:{cicd:"Jest"},priority:25,intelligence:"medium"},"jest.config.ts":{frameworks:["Jest"],slots:{cicd:"Jest",mainLanguage:"TypeScript"},priority:25,intelligence:"medium"},"vitest.config.ts":{frameworks:["Vitest"],slots:{cicd:"Vitest",mainLanguage:"TypeScript"},priority:25,intelligence:"medium"},"cypress.config.js":{frameworks:["Cypress"],slots:{cicd:"Cypress"},priority:25,intelligence:"medium"},"playwright.config.ts":{frameworks:["Playwright"],slots:{cicd:"Playwright",mainLanguage:"TypeScript"},priority:25,intelligence:"medium"},"karma.conf.js":{frameworks:["Karma"],slots:{cicd:"Karma"},priority:20,intelligence:"medium"},"mocha.opts":{frameworks:["Mocha"],slots:{cicd:"Mocha"},priority:20,intelligence:"medium"},".rspec":{frameworks:["RSpec"],slots:{cicd:"RSpec",mainLanguage:"Ruby"},priority:25,intelligence:"medium"},"pytest.ini":{frameworks:["Pytest"],slots:{cicd:"Pytest",mainLanguage:"Python"},priority:25,intelligence:"medium"},"phpunit.xml":{frameworks:["PHPUnit"],slots:{cicd:"PHPUnit",mainLanguage:"PHP"},priority:25,intelligence:"medium"},"schema.prisma":{frameworks:["Prisma"],slots:{database:"Prisma ORM",connection:"Prisma"},priority:25,intelligence:"medium"},"drizzle.config.ts":{frameworks:["Drizzle"],slots:{database:"Drizzle ORM",connection:"Drizzle",mainLanguage:"TypeScript"},priority:25,intelligence:"medium"},"ormconfig.js":{frameworks:["TypeORM"],slots:{database:"TypeORM",connection:"TypeORM"},priority:25,intelligence:"medium"},"knexfile.js":{frameworks:["Knex.js"],slots:{database:"Knex.js",connection:"Knex.js"},priority:25,intelligence:"medium"},"sequelize.config.js":{frameworks:["Sequelize"],slots:{database:"Sequelize",connection:"Sequelize"},priority:25,intelligence:"medium"},"alembic.ini":{frameworks:["Alembic"],slots:{database:"Alembic",mainLanguage:"Python"},priority:25,intelligence:"medium"},".github/workflows":{frameworks:["GitHub Actions"],slots:{cicd:"GitHub Actions"},priority:25,intelligence:"medium"},".gitlab-ci.yml":{frameworks:["GitLab CI"],slots:{cicd:"GitLab CI"},priority:25,intelligence:"medium"},Jenkinsfile:{frameworks:["Jenkins"],slots:{cicd:"Jenkins"},priority:25,intelligence:"medium"},".circleci/config.yml":{frameworks:["CircleCI"],slots:{cicd:"CircleCI"},priority:25,intelligence:"medium"},".travis.yml":{frameworks:["Travis CI"],slots:{cicd:"Travis CI"},priority:25,intelligence:"medium"},"azure-pipelines.yml":{frameworks:["Azure DevOps"],slots:{cicd:"Azure DevOps"},priority:25,intelligence:"medium"},"bitbucket-pipelines.yml":{frameworks:["Bitbucket Pipelines"],slots:{cicd:"Bitbucket Pipelines"},priority:25,intelligence:"medium"},"tailwind.config.js":{frameworks:["Tailwind CSS"],slots:{cssFramework:"Tailwind CSS"},priority:20,intelligence:"medium"},"tailwind.config.ts":{frameworks:["Tailwind CSS"],slots:{cssFramework:"Tailwind CSS",mainLanguage:"TypeScript"},priority:20,intelligence:"medium"},"postcss.config.js":{frameworks:["PostCSS"],slots:{cssFramework:"PostCSS"},priority:20,intelligence:"medium"},"uno.config.ts":{frameworks:["UnoCSS"],slots:{cssFramework:"UnoCSS",mainLanguage:"TypeScript"},priority:20,intelligence:"medium"},"styled-components.config.js":{frameworks:["styled-components"],slots:{cssFramework:"styled-components",uiLibrary:"styled-components"},priority:20,intelligence:"medium"},"emotion.config.js":{frameworks:["Emotion"],slots:{cssFramework:"Emotion",uiLibrary:"Emotion"},priority:20,intelligence:"medium"},"metro.config.js":{frameworks:["React Native"],slots:{framework:"React Native",mainLanguage:"JavaScript"},priority:25,intelligence:"medium"},"expo.config.js":{frameworks:["Expo"],slots:{framework:"React Native",buildTool:"Expo"},priority:25,intelligence:"medium"},"app.json":{frameworks:["React Native","Expo"],slots:{framework:"React Native"},priority:20,intelligence:"medium",confirmWith:["expo"]},"capacitor.config.ts":{frameworks:["Capacitor"],slots:{framework:"Capacitor",mainLanguage:"TypeScript"},priority:25,intelligence:"medium"},"ionic.config.json":{frameworks:["Ionic"],slots:{framework:"Ionic",uiLibrary:"Ionic"},priority:25,intelligence:"medium"},"nx.json":{frameworks:["Nx"],slots:{buildTool:"Nx"},priority:25,intelligence:"medium"},"turbo.json":{frameworks:["Turborepo"],slots:{buildTool:"Turborepo"},priority:25,intelligence:"medium"},"lerna.json":{frameworks:["Lerna"],slots:{buildTool:"Lerna"},priority:25,intelligence:"medium"},"rush.json":{frameworks:["Rush"],slots:{buildTool:"Rush"},priority:25,intelligence:"medium"},"pnpm-workspace.yaml":{frameworks:["pnpm workspaces"],slots:{packageManager:"pnpm",buildTool:"pnpm workspaces"},priority:25,intelligence:"medium"},"*.svelte":{frameworks:["Svelte","SvelteKit"],slots:{framework:"Svelte"},priority:15,intelligence:"low"},"*.vue":{frameworks:["Vue"],slots:{framework:"Vue"},priority:15,intelligence:"low"},"*.jsx":{frameworks:["React"],slots:{framework:"React",mainLanguage:"JavaScript"},priority:15,intelligence:"low"},"*.ts":{frameworks:["TypeScript"],slots:{mainLanguage:"TypeScript"},priority:15,intelligence:"low"},"*.tsx":{frameworks:["React","TypeScript"],slots:{framework:"React",mainLanguage:"TypeScript"},priority:15,intelligence:"low"},"*.py":{frameworks:["Python"],slots:{mainLanguage:"Python"},priority:15,intelligence:"low"},"*.rb":{frameworks:["Ruby"],slots:{mainLanguage:"Ruby"},priority:15,intelligence:"low"},"*.php":{frameworks:["PHP"],slots:{mainLanguage:"PHP"},priority:15,intelligence:"low"},"*.java":{frameworks:["Java"],slots:{mainLanguage:"Java"},priority:15,intelligence:"low"},"*.kt":{frameworks:["Kotlin"],slots:{mainLanguage:"Kotlin"},priority:15,intelligence:"low"},"*.swift":{frameworks:["Swift"],slots:{mainLanguage:"Swift"},priority:15,intelligence:"low"},"*.go":{frameworks:["Go"],slots:{mainLanguage:"Go"},priority:15,intelligence:"low"},"*.rs":{frameworks:["Rust"],slots:{mainLanguage:"Rust"},priority:15,intelligence:"low"},"*.dart":{frameworks:["Flutter","Dart"],slots:{mainLanguage:"Dart"},priority:15,intelligence:"low"},"*.ex":{frameworks:["Elixir"],slots:{mainLanguage:"Elixir"},priority:15,intelligence:"low"},"*.exs":{frameworks:["Elixir"],slots:{mainLanguage:"Elixir"},priority:15,intelligence:"low"},"*.scala":{frameworks:["Scala"],slots:{mainLanguage:"Scala"},priority:15,intelligence:"low"},"*.clj":{frameworks:["Clojure"],slots:{mainLanguage:"Clojure"},priority:15,intelligence:"low"},"*.lua":{frameworks:["Lua"],slots:{mainLanguage:"Lua"},priority:15,intelligence:"low"},"*.r":{frameworks:["R"],slots:{mainLanguage:"R"},priority:15,intelligence:"low"},"*.R":{frameworks:["R"],slots:{mainLanguage:"R"},priority:15,intelligence:"low"},"*.jl":{frameworks:["Julia"],slots:{mainLanguage:"Julia"},priority:15,intelligence:"low"},"*.nim":{frameworks:["Nim"],slots:{mainLanguage:"Nim"},priority:15,intelligence:"low"},"*.zig":{frameworks:["Zig"],slots:{mainLanguage:"Zig"},priority:15,intelligence:"low"},"build.zig":{frameworks:["Zig"],slots:{packageManager:"Zig Package Manager",mainLanguage:"Zig",buildTool:"zig build",framework:"Zig",build:"zig build"},priority:35,intelligence:"ultra-high"},"openapi.json":{frameworks:["OpenAPI"],slots:{apiType:"REST API",backend:"API Server"},priority:30,intelligence:"high"},"openapi.yaml":{frameworks:["OpenAPI"],slots:{apiType:"REST API",backend:"API Server"},priority:30,intelligence:"high"},"swagger.json":{frameworks:["Swagger"],slots:{apiType:"REST API",backend:"API Server"},priority:30,intelligence:"high"},"graphql.schema":{frameworks:["GraphQL"],slots:{apiType:"GraphQL",backend:"GraphQL Server"},priority:30,intelligence:"high"},"schema.graphql":{frameworks:["GraphQL"],slots:{apiType:"GraphQL",backend:"GraphQL Server"},priority:30,intelligence:"high"},".graphqlconfig":{frameworks:["GraphQL"],slots:{apiType:"GraphQL"},priority:25,intelligence:"medium"},"redux.config.js":{frameworks:["Redux"],slots:{stateManagement:"Redux"},priority:20,intelligence:"medium"},"mobx.config.js":{frameworks:["MobX"],slots:{stateManagement:"MobX"},priority:20,intelligence:"medium"},"vuex.config.js":{frameworks:["Vuex"],slots:{stateManagement:"Vuex",framework:"Vue"},priority:20,intelligence:"medium"},"pinia.config.js":{frameworks:["Pinia"],slots:{stateManagement:"Pinia",framework:"Vue"},priority:20,intelligence:"medium"},"zustand.config.js":{frameworks:["Zustand"],slots:{stateManagement:"Zustand"},priority:20,intelligence:"medium"},".eslintrc.js":{frameworks:["ESLint"],slots:{},priority:15,intelligence:"low"},".eslintrc.json":{frameworks:["ESLint"],slots:{},priority:15,intelligence:"low"},".prettierrc":{frameworks:["Prettier"],slots:{},priority:15,intelligence:"low"},".prettierrc.json":{frameworks:["Prettier"],slots:{},priority:15,intelligence:"low"},"biome.json":{frameworks:["Biome"],slots:{},priority:15,intelligence:"low"},".editorconfig":{frameworks:["EditorConfig"],slots:{},priority:10,intelligence:"low"},"serverless.yml":{frameworks:["Serverless Framework"],slots:{hosting:"AWS Lambda/Azure/GCP",backend:"Serverless",apiType:"API Gateway"},priority:30,intelligence:"high"},"serverless.yaml":{frameworks:["Serverless Framework"],slots:{hosting:"AWS Lambda/Azure/GCP",backend:"Serverless",apiType:"API Gateway"},priority:30,intelligence:"high"},"sam.yaml":{frameworks:["AWS SAM"],slots:{hosting:"AWS Lambda",backend:"AWS SAM",cicd:"AWS SAM CLI"},priority:30,intelligence:"high"},"template.yaml":{frameworks:["AWS SAM","CloudFormation"],slots:{hosting:"AWS",backend:"AWS SAM/CloudFormation",cicd:"AWS"},priority:25,intelligence:"medium",confirmWith:["samconfig.toml"]},"amplify.yml":{frameworks:["AWS Amplify"],slots:{hosting:"AWS Amplify",backend:"AWS Amplify",cicd:"AWS Amplify"},priority:30,intelligence:"high"},Podfile:{frameworks:["CocoaPods","iOS"],slots:{packageManager:"CocoaPods",mainLanguage:"Swift/Objective-C",framework:"iOS Native"},priority:30,intelligence:"high"},"build.gradle.kts":{frameworks:["Gradle Kotlin DSL","Android","Kotlin"],slots:{packageManager:"Gradle",mainLanguage:"Kotlin",buildTool:"Gradle Kotlin DSL",framework:"Android"},priority:30,intelligence:"high"},"*.ipynb":{frameworks:["Jupyter","Python"],slots:{mainLanguage:"Python",framework:"Jupyter Notebook"},priority:30,intelligence:"high"},MLproject:{frameworks:["MLflow"],slots:{mainLanguage:"Python",framework:"MLflow",backend:"MLflow",cicd:"MLflow"},priority:30,intelligence:"high"},"dvc.yaml":{frameworks:["DVC","Data Version Control"],slots:{mainLanguage:"Python",framework:"DVC",cicd:"DVC Pipelines"},priority:30,intelligence:"high"},"dvc.lock":{frameworks:["DVC"],slots:{framework:"DVC"},priority:20,intelligence:"medium"},"wrangler.toml":{frameworks:["Cloudflare Workers","Cloudflare"],slots:{hosting:"Cloudflare Workers",backend:"Cloudflare Workers",runtime:"V8 Isolates"},priority:30,intelligence:"high"},"deno.json":{frameworks:["Deno"],slots:{runtime:"Deno",mainLanguage:"TypeScript",packageManager:"Deno"},priority:30,intelligence:"high"},"bun.lockb":{frameworks:["Bun"],slots:{runtime:"Bun",packageManager:"Bun",mainLanguage:"TypeScript/JavaScript"},priority:30,intelligence:"high"},"codecov.yml":{frameworks:["Codecov"],slots:{cicd:"Codecov"},priority:25,intelligence:"high"},"dependabot.yml":{frameworks:["Dependabot","GitHub"],slots:{cicd:"Dependabot"},priority:25,intelligence:"high"},"renovate.json":{frameworks:["Renovate"],slots:{cicd:"Renovate"},priority:25,intelligence:"high"},Makefile:{frameworks:["Make","GNU Make"],slots:{buildTool:"Make"},priority:30,intelligence:"high"},"CMakeLists.txt":{frameworks:["CMake","C","C++"],slots:{buildTool:"CMake",mainLanguage:"C/C++"},priority:30,intelligence:"high"},"meson.build":{frameworks:["Meson","C","C++"],slots:{buildTool:"Meson",mainLanguage:"C/C++"},priority:30,intelligence:"high"},"*.c":{frameworks:["C"],slots:{mainLanguage:"C"},priority:30,intelligence:"high"},"*.cpp":{frameworks:["C++"],slots:{mainLanguage:"C++"},priority:30,intelligence:"high"},"*.cc":{frameworks:["C++"],slots:{mainLanguage:"C++"},priority:30,intelligence:"high"},"*.cxx":{frameworks:["C++"],slots:{mainLanguage:"C++"},priority:25,intelligence:"high"},"*.h":{frameworks:["C","C++"],slots:{mainLanguage:"C/C++"},priority:25,intelligence:"high"},"*.hpp":{frameworks:["C++"],slots:{mainLanguage:"C++"},priority:25,intelligence:"high"},"*.hxx":{frameworks:["C++"],slots:{mainLanguage:"C++"},priority:20,intelligence:"medium"},".env":{frameworks:[],slots:{},priority:20,intelligence:"medium"},".env.example":{frameworks:[],slots:{},priority:25,intelligence:"high"},".env.local":{frameworks:[],slots:{},priority:20,intelligence:"medium"},".env.development":{frameworks:[],slots:{},priority:20,intelligence:"medium"},".env.production":{frameworks:[],slots:{},priority:20,intelligence:"medium"},"skaffold.yaml":{frameworks:["Skaffold","Kubernetes"],slots:{hosting:"Kubernetes",cicd:"Skaffold"},priority:30,intelligence:"high"},"Chart.yaml":{frameworks:["Helm","Kubernetes"],slots:{hosting:"Kubernetes",backend:"Helm"},priority:30,intelligence:"high"},"values.yaml":{frameworks:["Helm","Kubernetes"],slots:{hosting:"Kubernetes"},priority:25,intelligence:"high",confirmWith:["Chart.yaml"]},"pulumi.yaml":{frameworks:["Pulumi"],slots:{hosting:"Cloud",cicd:"Pulumi"},priority:30,intelligence:"high"},"Pulumi.yaml":{frameworks:["Pulumi"],slots:{hosting:"Cloud",cicd:"Pulumi"},priority:30,intelligence:"high"},"terragrunt.hcl":{frameworks:["Terragrunt","Terraform"],slots:{hosting:"Cloud",cicd:"Terragrunt"},priority:30,intelligence:"high"},"ansible.yml":{frameworks:["Ansible"],slots:{cicd:"Ansible"},priority:30,intelligence:"high"},"playbook.yml":{frameworks:["Ansible"],slots:{cicd:"Ansible"},priority:25,intelligence:"high"},"*.cs":{frameworks:["C#",".NET","Unity"],slots:{mainLanguage:"C#"},priority:30,intelligence:"high"},"*.m":{frameworks:["Objective-C","iOS"],slots:{mainLanguage:"Objective-C"},priority:25,intelligence:"high"},".nvmrc":{frameworks:["Node.js","nvm"],slots:{runtime:"Node.js"},priority:25,intelligence:"high"},".tool-versions":{frameworks:["asdf"],slots:{},priority:25,intelligence:"high"},".ruby-version":{frameworks:["Ruby","rbenv"],slots:{mainLanguage:"Ruby",runtime:"Ruby"},priority:25,intelligence:"high"},".python-version":{frameworks:["Python","pyenv"],slots:{mainLanguage:"Python",runtime:"Python"},priority:25,intelligence:"high"},".dockerignore":{frameworks:["Docker"],slots:{},priority:20,intelligence:"medium"},".gitattributes":{frameworks:["Git"],slots:{},priority:15,intelligence:"low"},".npmrc":{frameworks:["npm","Node.js"],slots:{packageManager:"npm"},priority:20,intelligence:"medium"},"sonar-project.properties":{frameworks:["SonarQube","SonarCloud"],slots:{cicd:"SonarQube"},priority:25,intelligence:"high"},"*.fs":{frameworks:["F#",".NET"],slots:{mainLanguage:"F#"},priority:25,intelligence:"high"},"*.mm":{frameworks:["Objective-C++","iOS","macOS"],slots:{mainLanguage:"Objective-C++"},priority:25,intelligence:"high"},"build.zig.zon":{frameworks:["Zig"],slots:{mainLanguage:"Zig",packageManager:"Zig Package Manager",buildTool:"zig build"},priority:35,intelligence:"ultra-high"},"gleam.toml":{frameworks:["Gleam","BEAM","Erlang"],slots:{mainLanguage:"Gleam",runtime:"BEAM",packageManager:"Gleam"},priority:30,intelligence:"high"},"bunfig.toml":{frameworks:["Bun"],slots:{runtime:"Bun",packageManager:"Bun",buildTool:"Bun"},priority:30,intelligence:"high"},"mise.toml":{frameworks:["mise"],slots:{},priority:25,intelligence:"high"},".mise.toml":{frameworks:["mise"],slots:{},priority:25,intelligence:"high"},"manifest.toml":{frameworks:["Flox","Nix"],slots:{},priority:25,intelligence:"high",confirmWith:[".flox"]},justfile:{frameworks:["Just"],slots:{buildTool:"Just"},priority:25,intelligence:"high"},".pre-commit-config.yaml":{frameworks:["pre-commit"],slots:{cicd:"pre-commit"},priority:25,intelligence:"high"},"CLAUDE.md":{frameworks:["Claude Code"],slots:{},priority:30,intelligence:"high",confirmWith:[".claude"]}};import{existsSync as i8,readFileSync as TH,readdirSync as KH}from"fs";import{join as c2}from"path";var k0={version:1,_doc:"SINGLE SOURCE of Dart/Flutter detection KNOWLEDGE (A+B hybrid, the Truth-is-faf-cli spec). faf-cli imports this directly; faf-python-sdk vendors a synced copy (phase 2); MCPs consume the SDK (phase 3). To bolster Dart/Flutter support — a new state library, server framework, MCP dep — edit THIS file and every engine inherits it. The thin per-language LOGIC (pubspec parse, app-vs-package heuristic, priority branching) lives in code, not here.",flutterDeps:["flutter"],mcpDeps:["dart_mcp","mcp_server","mcp_dart","dart_mcp_server","mcp"],serverFrameworks:[["serverpod","Serverpod"],["dart_frog","Dart Frog"],["conduit","Conduit"],["angel3_framework","Angel3"],["alfred","Alfred"],["shelf","Shelf"]],stateManagement:[["flutter_riverpod","Riverpod"],["hooks_riverpod","Riverpod"],["riverpod","Riverpod"],["flutter_bloc","Bloc"],["bloc","Bloc"],["provider","Provider"],["get","GetX"],["flutter_mobx","MobX"],["mobx","MobX"],["signals","Signals"]],routing:[["go_router","go_router"],["auto_route","auto_route"]]};var AH=k0.flutterDeps,NH=k0.mcpDeps,wH=k0.serverFrameworks,bH=k0.stateManagement,CH=k0.routing;function jH($){let Z=new Set,X=!1;for(let U of $.split(`
215
- `)){if(/^(dependencies|dev_dependencies|dependency_overrides):\s*$/.test(U)){X=!0;continue}if(/^\S/.test(U))X=!1;if(X){let z=U.match(/^\s{2}([a-zA-Z0-9_]+):/);if(z)Z.add(z[1].toLowerCase())}}return Z}function L1($){let Z=c2($,"pubspec.yaml");if(!i8(Z))return null;let X;try{X=TH(Z,"utf-8")}catch{return null}let U=jH(X),z=(T)=>U.has(T.toLowerCase()),Q=AH.some(z)||/^flutter:\s*$/m.test(X)||/\bsdk:\s*flutter\b/.test(X),J=NH.find(z),H=wH.find(([T])=>z(T)),q=bH.find(([T])=>z(T)),G=q?q[1]:"",B=CH.find(([T])=>z(T)),_=B?B[1]:"",Y=z("flutter_test")?"flutter_test":z("test")?"test":"",O=/^executables:\s*$/m.test(X),L=!1;try{L=KH(c2($,"bin")).some((T)=>T.endsWith(".dart"))}catch{}let V=O||L,W,D="",M;if(Q)if(D="Flutter",i8(c2($,"lib","main.dart"))||/^publish_to:\s*['"]?none\b/m.test(X))W="mobile",M="pubspec.yaml (Flutter app)";else W="library",M="pubspec.yaml (Flutter package)";else if(J)W="mcp",M=`pubspec.yaml + ${J} (Dart MCP server)`;else if(H)W="backend",D=H[1],M=`pubspec.yaml + ${H[0]} (Dart backend)`;else if(V)W="cli",M=O?"pubspec.yaml executables: (Dart CLI)":"pubspec.yaml + bin/*.dart (Dart CLI)";else W="library",M="pubspec.yaml (Dart package)";return{appType:W,isFlutter:Q,framework:D,stateManagement:G,routing:_,testing:Y,found:M}}var hH=new Set(["node_modules",".git","dist","build","venv",".venv","__pycache__","target","coverage",".next",".svelte-kit","vendor"]),xH=new Set([".py",".ts",".tsx",".js",".jsx",".svelte",".vue",".rb",".go",".rs",".php",".java",".kt",".swift"]),uH={mainLanguage:["project","main_language"],main_language:["project","main_language"],framework:["stack","frontend"],cssFramework:["stack","css_framework"],css:["stack","css_framework"],uiLibrary:["stack","ui_library"],ui_library:["stack","ui_library"],stateManagement:["stack","state_management"],state:["stack","state_management"],backend:["stack","backend"],apiType:["stack","api_type"],api:["stack","api_type"],runtime:["stack","runtime"],database:["stack","database"],db:["stack","database"],connection:["stack","connection"],hosting:["stack","hosting"],buildTool:["stack","build"],build_tool:["stack","build"],build:["stack","build"],packageManager:["stack","package_manager"],pkg_manager:["stack","package_manager"],cicd:["stack","cicd"]},kH=[["packageManager","package-manager"],["pkg_manager","package-manager"],["mainLanguage","language"],["main_language","language"],["framework","framework"],["backend","backend"],["database","database"],["db","database"],["cicd","ci-cd"],["hosting","hosting"],["buildTool","build"],["build_tool","build"],["build","build"],["runtime","runtime"],["cssFramework","css"],["css","css"],["uiLibrary","ui-library"],["stateManagement","state-management"],["apiType","api"],["api","api"]];function vH($,Z){for(let[X,U]of kH)if(X in $)return U;return Z.length>0?"framework":"config"}function mH($){try{let Z=JSON.parse(EH($,"utf-8")),X=["background","content_scripts","action","browser_action","permissions"].some((U)=>(U in Z));if(typeof Z.manifest_version==="number"&&X)return"chrome";return"other"}catch{return"other"}}function pH($){let Z=[],X=fH($),U=SH(i2($,".git"));for(let z=0;z<10;z++){let Q;try{Q=s8(X)}catch{break}for(let H of Q){let q=d2[H];if(!q)continue;if(H==="manifest.json"&&mH(i2(X,H))!=="chrome")continue;if(H==="pubspec.yaml"){let G=L1(X);if(G){let B={mainLanguage:"Dart",packageManager:"pub"};if(G.isFlutter){if(B.framework="Flutter",G.stateManagement)B.stateManagement=G.stateManagement}else if(G.appType==="backend"&&G.framework)B.backend=G.framework;else if(G.appType==="mcp")B.apiType="MCP";Z.push({slots:B,priority:q.priority,frameworks:G.isFlutter?["Flutter","Dart"]:["Dart"],fileName:H});continue}}Z.push({slots:q.slots||{},priority:q.priority,frameworks:q.frameworks,fileName:H})}if(U&&z===0)break;let J=gH(X);if(J===X)break;X=J}return Z}function lH($){let Z=[];for(let X of r8($,2,{count:0})){let U=d2[`*${X}`],z=U?.slots?.mainLanguage;if(z)Z.push({slots:{mainLanguage:z},priority:U.priority,frameworks:U.frameworks})}return Z}function a8($){let Z=[...pH($),...lH($)],X={},U={},z=new Set;for(let G of Z){G.frameworks.forEach((B)=>z.add(B));for(let[B,_]of Object.entries(G.slots))if(_&&!_.includes("/")&&(!(B in X)||G.priority>U[B]))X[B]=_,U[B]=G.priority}let Q=new Map;for(let G of Z){if(!G.fileName)continue;if(!Q.has(G.fileName))Q.set(G.fileName,{fileName:G.fileName,category:vH(G.slots,G.frameworks),priority:G.priority})}let J=[...Q.values()].sort((G,B)=>B.priority-G.priority||G.fileName.localeCompare(B.fileName)),H=[];if(X.mainLanguage)H.push(X.mainLanguage.toLowerCase());if(X.framework)H.push(X.framework.toLowerCase());let q=H.length>0?H.join("-"):"unknown-stack";return{slotFills:X,frameworks:[...z],confirmedCount:Z.length,discoveredFormats:J,stackSignature:q}}function s2($){let{slotFills:Z}=a8($),X={};for(let[U,z]of Object.entries(Z)){let Q=uH[U];if(!Q||!z)continue;let[J,H]=Q;if(J==="project")(X.project??={})[H]=z;else(X.stack??={})[H]=z}return X}function r8($,Z,X){let U=new Set;if(Z<0||X.count>400)return U;let z;try{z=s8($,{withFileTypes:!0})}catch{return U}for(let Q of z){if(X.count++>400)break;if(!Q.isDirectory()){let J=yH(Q.name);if(xH.has(J))U.add(J);continue}if(hH.has(Q.name)||Q.name.startsWith("."))continue;for(let J of r8(i2($,Q.name),Z-1,X))U.add(J)}return U}import{existsSync as n8,readFileSync as o8}from"fs";import{join as t8}from"path";var h=($,Z,X)=>({value:$,source:Z,confidence:X});function e8($){let Z=dH($),X=cH($),U={},z=(Q,J)=>{if(J)U[Q]=J};return z("what",iH(Z,X)),z("who",sH(X)),z("why",aH(X)),z("where",rH(Z,X)),z("when",nH(X)),z("how",oH(Z,X)),U}function a2($){let Z=e8($),X={};return Object.keys(Z).forEach((U)=>{let z=Z[U];if(z)X[U]=z.value}),X}function dH($){let Z=t8($,"package.json");if(!n8(Z))return null;try{return JSON.parse(o8(Z,"utf-8"))}catch{return null}}function cH($){let Z=t8($,"README.md");if(!n8(Z))return"";let X;try{X=o8(Z,"utf-8")}catch{return""}return X.split(`
216
- `).filter((U)=>!/^\s*\[!\[/.test(U)&&!/^\s*!\[/.test(U)).join(`
217
- `).replace(/<[^>]+>/g,"").replace(/!\[[^\]]*\]\([^)]*\)/g,"").trim()}function R0($){return $.replace(/\s+/g," ").replace(/[#*`>]/g,"").trim().slice(0,280)}function v0($,Z){let X=new RegExp(`##?\\s+(${Z})\\s*\\n+([\\s\\S]+?)(?:\\n\\n|\\n##?|$)`,"i"),U=$.match(X);return U&&U[2]&&U[2].trim().length>20?{body:R0(U[2]),heading:U[1].trim()}:null}function R$($,Z,X=30){for(let U of Z){let z=$.match(U);if(z&&z[1]&&z[1].trim().length>=X)return R0(z[1])}return null}function iH($,Z){if($?.description&&$.description.length>20)return h(R0($.description),"package.json:description",0.95);let X=v0(Z,"Purpose|What|About|Overview|Description");if(X)return h(X.body,`README:## ${X.heading}`,0.8);let U=Z.split(/\n\s*\n/).map((Q)=>Q.trim()).find((Q)=>Q.length>30&&!Q.startsWith("#"));if(U)return h(R0(U),"README:first-paragraph",0.5);let z=R$(Z,[/(?:core|main|primary)\s+(?:problem|challenge)(?:\s+is)?\s*:?\s*([^.\n]{30,})/i,/solves?\s+(?:the\s+)?(?:problem\s+of\s+)?([^.\n]{30,})/i]);return z?h(z,"README:problem-heuristic",0.6):null}function sH($){let Z=v0($,"Audience|Who|Who is this for|Who it.s for");if(Z)return h(Z.body,`README:## ${Z.heading}`,0.8);let X=R$($,[/\b(?:designed|built|made)\s+for\s+((?:[a-z][a-z-]*\s+)?(?:developers?|teams?|engineers?|builders?|founders?)[^.\n]{0,80})/i,/\bfor\s+((?:[a-z][a-z-]*\s+)?(?:developers?|teams?|engineers?|builders?|founders?)[^.\n]{0,80})/i],8);return X?h(X,"README:audience-heuristic",0.6):null}function aH($){let Z=v0($,"Why|Mission|Motivation|Rationale|Vision");if(Z)return h(Z.body,`README:## ${Z.heading}`,0.8);let X=R$($,[/(?:our\s+|the\s+)?(?:mission|purpose|goal)\s+is\s+([^.\n]{30,})/i,/\b(?:mission|purpose|goal)\s*:\s*([^.\n]{30,})/i,/(?:built|created|designed)\s+(?:because|to)\s+([^.\n]{30,})/i]);return X?h(X,"README:mission-heuristic",0.6):null}function rH($,Z){let X=typeof $?.repository==="string"?$.repository:$?.repository?.url;if(X)return h(R0(X.replace(/^git\+/,"").replace(/\.git$/,"")),"package.json:repository",0.95);if($?.homepage)return h(R0($.homepage),"package.json:homepage",0.9);let U=R$(Z,[/\b(?:deployed|hosted|available|published)\s+(?:on|at|via)\s+([^.\n]{3,80})/i],3);return U?h(U,"README:deploy-heuristic",0.6):null}function nH($){let Z=v0($,"Timeline|Status|Release|Roadmap");if(Z)return h(Z.body,`README:## ${Z.heading}`,0.8);let X=R$($,[/\b(production\s+since\s+[^.\n]{4,60})/i,/\b((?:in\s+)?(?:production|beta|alpha|development)\s+since\s+[^.\n]{4,60})/i,/\bsince\s+((?:[A-Z][a-z]+\s+)?\d{4}[^.\n]{0,40})/],4);return X?h(X,"README:since-heuristic",0.6):null}function oH($,Z){let X=$?.scripts?Object.keys($.scripts):[],U=["start","dev","build"].filter((J)=>X.includes(J));if(U.length)return h(R0(U.map((J)=>`npm run ${J}`).join(", ")),"package.json:scripts",0.9);let z=v0(Z,"Usage|Getting Started|Install|Installation|Quick Start");if(z)return h(z.body,`README:## ${z.heading}`,0.8);let Q=v0(Z,"Architecture|Approach|How it works|Methodology|How");return Q?h(Q.body,`README:## ${Q.heading}`,0.7):null}var $Z="3.0";import{existsSync as P,readFileSync as t,readdirSync as XZ}from"fs";import{join as F}from"path";var ZZ=[{name:"Next.js",slug:"nextjs",category:"frontend",signals:[{type:"dependency",key:"next"},{type:"file",pattern:"next.config.*"}]},{name:"React",slug:"react",category:"frontend",signals:[{type:"dependency",key:"react"}]},{name:"SvelteKit",slug:"sveltekit",category:"frontend",signals:[{type:"dependency",key:"@sveltejs/kit"},{type:"file",pattern:"svelte.config.*"}]},{name:"Svelte",slug:"svelte",category:"frontend",signals:[{type:"dependency",key:"svelte"},{type:"devDependency",key:"svelte"}]},{name:"Vue.js",slug:"vue",category:"frontend",signals:[{type:"dependency",key:"vue"}]},{name:"Nuxt",slug:"nuxt",category:"frontend",signals:[{type:"dependency",key:"nuxt"},{type:"file",pattern:"nuxt.config.*"}]},{name:"Angular",slug:"angular",category:"frontend",signals:[{type:"dependency",key:"@angular/core"},{type:"file",pattern:"angular.json"}]},{name:"Astro",slug:"astro",category:"frontend",signals:[{type:"dependency",key:"astro"},{type:"file",pattern:"astro.config.*"}]},{name:"Solid",slug:"solid",category:"frontend",signals:[{type:"dependency",key:"solid-js"}]},{name:"Remix",slug:"remix",category:"frontend",signals:[{type:"dependency",key:"@remix-run/react"}]},{name:"Gatsby",slug:"gatsby",category:"frontend",signals:[{type:"dependency",key:"gatsby"},{type:"file",pattern:"gatsby-config.*"}]},{name:"Qwik",slug:"qwik",category:"frontend",signals:[{type:"dependency",key:"@builder.io/qwik"}]},{name:"Vercel (SvelteKit)",slug:"adapter-vercel",category:"hosting",signals:[{type:"dependency",key:"@sveltejs/adapter-vercel"},{type:"devDependency",key:"@sveltejs/adapter-vercel"}]},{name:"Node (SvelteKit)",slug:"adapter-node",category:"hosting",signals:[{type:"dependency",key:"@sveltejs/adapter-node"},{type:"devDependency",key:"@sveltejs/adapter-node"}]},{name:"Static (SvelteKit)",slug:"adapter-static",category:"hosting",signals:[{type:"dependency",key:"@sveltejs/adapter-static"},{type:"devDependency",key:"@sveltejs/adapter-static"}]},{name:"Cloudflare (SvelteKit)",slug:"adapter-cloudflare",category:"hosting",signals:[{type:"dependency",key:"@sveltejs/adapter-cloudflare"},{type:"devDependency",key:"@sveltejs/adapter-cloudflare"}]},{name:"Netlify (SvelteKit)",slug:"adapter-netlify",category:"hosting",signals:[{type:"dependency",key:"@sveltejs/adapter-netlify"},{type:"devDependency",key:"@sveltejs/adapter-netlify"}]},{name:"Tailwind CSS",slug:"tailwind",category:"css",signals:[{type:"dependency",key:"tailwindcss"},{type:"devDependency",key:"tailwindcss"},{type:"file",pattern:"tailwind.config.*"}]},{name:"Bootstrap",slug:"bootstrap",category:"css",signals:[{type:"dependency",key:"bootstrap"}]},{name:"Styled Components",slug:"styled-components",category:"css",signals:[{type:"dependency",key:"styled-components"}]},{name:"shadcn/ui",slug:"shadcn",category:"ui",signals:[{type:"file",pattern:"components.json"},{type:"dependency",key:"@radix-ui/react-dialog"}]},{name:"Material UI",slug:"mui",category:"ui",signals:[{type:"dependency",key:"@mui/material"}]},{name:"Chakra UI",slug:"chakra",category:"ui",signals:[{type:"dependency",key:"@chakra-ui/react"}]},{name:"Ant Design",slug:"antd",category:"ui",signals:[{type:"dependency",key:"antd"}]},{name:"Redux",slug:"redux",category:"state",signals:[{type:"dependency",key:"@reduxjs/toolkit"}]},{name:"Zustand",slug:"zustand",category:"state",signals:[{type:"dependency",key:"zustand"}]},{name:"Jotai",slug:"jotai",category:"state",signals:[{type:"dependency",key:"jotai"}]},{name:"Pinia",slug:"pinia",category:"state",signals:[{type:"dependency",key:"pinia"}]},{name:"Express",slug:"express",category:"backend",signals:[{type:"dependency",key:"express"}]},{name:"Fastify",slug:"fastify",category:"backend",signals:[{type:"dependency",key:"fastify"}]},{name:"Hono",slug:"hono",category:"backend",signals:[{type:"dependency",key:"hono"}]},{name:"Elysia",slug:"elysia",category:"backend",signals:[{type:"dependency",key:"elysia"}]},{name:"NestJS",slug:"nestjs",category:"backend",signals:[{type:"dependency",key:"@nestjs/core"}]},{name:"Koa",slug:"koa",category:"backend",signals:[{type:"dependency",key:"koa"}]},{name:"Django",slug:"django",category:"backend",signals:[{type:"file",pattern:"manage.py"},{type:"file",pattern:"settings.py"}]},{name:"Flask",slug:"flask",category:"backend",signals:[{type:"file",pattern:"app.py"}]},{name:"FastAPI",slug:"fastapi",category:"backend",signals:[{type:"file",pattern:"main.py"}]},{name:"Rails",slug:"rails",category:"backend",signals:[{type:"file",pattern:"Gemfile"},{type:"file",pattern:"config/routes.rb"}]},{name:"Spring Boot",slug:"spring",category:"backend",signals:[{type:"file",pattern:"pom.xml"},{type:"file",pattern:"build.gradle"}]},{name:"Prisma",slug:"prisma",category:"database",signals:[{type:"dependency",key:"prisma"},{type:"devDependency",key:"prisma"},{type:"file",pattern:"prisma/schema.prisma"}]},{name:"Drizzle",slug:"drizzle",category:"database",signals:[{type:"dependency",key:"drizzle-orm"},{type:"file",pattern:"drizzle.config.*"}]},{name:"TypeORM",slug:"typeorm",category:"database",signals:[{type:"dependency",key:"typeorm"}]},{name:"Mongoose",slug:"mongoose",category:"database",signals:[{type:"dependency",key:"mongoose"}]},{name:"Vite",slug:"vite",category:"build",signals:[{type:"dependency",key:"vite"},{type:"devDependency",key:"vite"},{type:"file",pattern:"vite.config.*"}]},{name:"webpack",slug:"webpack",category:"build",signals:[{type:"dependency",key:"webpack"},{type:"devDependency",key:"webpack"},{type:"file",pattern:"webpack.config.*"}]},{name:"esbuild",slug:"esbuild",category:"build",signals:[{type:"dependency",key:"esbuild"},{type:"devDependency",key:"esbuild"}]},{name:"Turbopack",slug:"turbopack",category:"build",signals:[{type:"file",pattern:"turbo.json"}]},{name:"Jest",slug:"jest",category:"testing",signals:[{type:"devDependency",key:"jest"},{type:"file",pattern:"jest.config.*"}]},{name:"Vitest",slug:"vitest",category:"testing",signals:[{type:"devDependency",key:"vitest"}]},{name:"Playwright",slug:"playwright",category:"testing",signals:[{type:"devDependency",key:"@playwright/test"},{type:"file",pattern:"playwright.config.*"}]},{name:"Cypress",slug:"cypress",category:"testing",signals:[{type:"devDependency",key:"cypress"},{type:"file",pattern:"cypress.config.*"}]},{name:"Turborepo",slug:"turborepo",category:"monorepo",signals:[{type:"devDependency",key:"turbo"},{type:"file",pattern:"turbo.json"}]},{name:"Nx",slug:"nx",category:"monorepo",signals:[{type:"devDependency",key:"nx"},{type:"file",pattern:"nx.json"}]},{name:"Lerna",slug:"lerna",category:"monorepo",signals:[{type:"devDependency",key:"lerna"},{type:"file",pattern:"lerna.json"}]},{name:"MCP SDK",slug:"mcp",category:"ai",signals:[{type:"dependency",key:"@modelcontextprotocol/sdk"}]},{name:"Anthropic SDK",slug:"anthropic",category:"ai",signals:[{type:"dependency",key:"@anthropic-ai/sdk"}]},{name:"OpenAI SDK",slug:"openai",category:"ai",signals:[{type:"dependency",key:"openai"}]},{name:"LangChain",slug:"langchain",category:"ai",signals:[{type:"dependency",key:"langchain"}]},{name:"Vercel",slug:"vercel",category:"hosting",signals:[{type:"file",pattern:"vercel.json"}]},{name:"Netlify",slug:"netlify",category:"hosting",signals:[{type:"file",pattern:"netlify.toml"}]},{name:"Docker",slug:"docker",category:"hosting",signals:[{type:"file",pattern:"Dockerfile"},{type:"file",pattern:"docker-compose.yml"}]},{name:"Cloudflare Workers",slug:"cloudflare",category:"hosting",signals:[{type:"file",pattern:"wrangler.toml"},{type:"dependency",key:"wrangler"}]},{name:"GitHub Actions",slug:"github-actions",category:"cicd",signals:[{type:"file",pattern:".github/workflows/*.yml"}]},{name:"Commander.js",slug:"commander",category:"cli",signals:[{type:"dependency",key:"commander"}]}];function tH($){let Z=F($,"Cargo.toml");if(!P(Z))return null;try{let U=t(Z,"utf-8").match(/^\s*\[package\][\s\S]*?^\s*name\s*=\s*"([^"]+)"/m);return U?U[1]:null}catch{return null}}function eH($){let Z=F($,"Cargo.toml");if(!P(Z))return!1;try{let X=t(Z,"utf-8");return/^\s*\[\[bin\]\]/m.test(X)}catch{return!1}}function $q($,Z){if(Z?.keywords?.some((U)=>/^sdk(?:\s|-|$)|-sdk$/i.test(U)))return'package.json keywords contains "sdk"';if(Z?.name&&/(?:^|[-_/])sdk(?:[-_/]|$)/i.test(Z.name))return`package.json name "${Z.name}" → sdk`;let X=tH($);if(X&&/(?:^|[-_])sdk(?:[-_]|$)/i.test(X))return`Cargo.toml name "${X}" → sdk`;return null}function Zq($){let Z=["manifest.json","public/manifest.json","src/manifest.json","app/manifest.json","extension/manifest.json","dist/manifest.json"];for(let X of Z){let U=F($,X);if(!P(U))continue;try{let z=JSON.parse(t(U,"utf-8"));if(typeof z.manifest_version==="number")return`${X} manifest_version ${z.manifest_version} (browser extension)`}catch{}}return null}function Xq($){let Z=/(numpy|pandas|jupyter|scikit-learn|sklearn|pytorch|tensorflow|matplotlib|scipy)/i,X=F($,"pyproject.toml");if(P(X))try{let Q=t(X,"utf-8").match(Z);if(Q)return`pyproject.toml depends on ${Q[1]}`}catch{}let U=F($,"requirements.txt");if(P(U))try{let Q=t(U,"utf-8").match(Z);if(Q)return`requirements.txt contains ${Q[1]}`}catch{}return null}function Uq($,Z){let X=["react-native","expo","@capacitor/core","@ionic/core"];if(Z){for(let U of X)if(Z.dependencies?.[U]||Z.devDependencies?.[U])return`${U} dependency`}if(P(F($,"ios"))&&P(F($,"android")))return"ios/ + android/ dirs";return null}function zq($,Z){let X=F($,"Cargo.toml");if(P(X))try{let z=t(X,"utf-8");if(/crate-type\s*=\s*\[[^\]]*"cdylib"/.test(z))return'Cargo.toml crate-type = ["cdylib"]';if(/wasm-bindgen|wasm-pack/i.test(z))return"Cargo.toml wasm-bindgen/wasm-pack"}catch{}let U=F($,"build.zig");if(P(U))try{let z=t(U,"utf-8");if(/\.wasm\b|wasm32|setOutputFormat\(\.wasm/i.test(z))return"build.zig wasm target"}catch{}if(Z?.keywords?.some((z)=>/^wasm(?:-|$)|webassembly/i.test(z)))return'package.json keywords contains "wasm"';return null}function Qq($,Z){if(!P(F($,"index.html")))return null;if(Z?.dependencies||Z?.devDependencies){let X={...Z.dependencies??{},...Z.devDependencies??{}};if(["react","vue","svelte","@sveltejs/kit","next","nuxt","astro","gatsby","solid-js","qwik"].some((z)=>X[z]))return null}return"index.html (vanilla, no frontend framework)"}function Jq($,Z){if(Z?.name&&/specification|^@.*\/spec/i.test(Z.name))return`package name "${Z.name}" → documentation`;if(Z?.keywords?.some((X)=>/^(specification|format-spec|standard)$/i.test(X)))return'package keywords contains "specification"';if(Z?.bin)return null;if(Z?.files&&Z.files.length>0){let X=/^(dist|src|lib|build|bin)(\/|$)|\/(dist|src|lib|build|bin)(\/|$)|(\.|\/)(js|ts|tsx|jsx|mjs|cjs|py|rs|go)$/,U=Z.files.some((Q)=>X.test(Q)),z=Z.files.some((Q)=>/\.(md|MD)$|examples?\//.test(Q)||Q==="README.md"||Q==="docs"||Q==="docs/");if(!U&&z)return"package.json files = docs/examples only (no source)"}return null}function Hq($,Z,X){let U=X.find((z)=>z.slug==="astro"||z.slug==="gatsby");if(U)return`${U.name} (static-site framework)`;if(Z?.keywords?.some((z)=>/^(website|marketing|landing|brochure|portfolio)$/i.test(z)))return'package keywords contains "website"/"marketing"/"landing"';return null}function qq($,Z){if(!Z)return null;let X={...Z.dependencies??{},...Z.devDependencies??{}},U=["@clerk/nextjs","@clerk/clerk-react","next-auth","@auth/core","auth0","@auth0/nextjs-auth0"],z=["stripe","@stripe/stripe-js","lemonsqueezy"],Q=U.some((H)=>X[H]),J=z.some((H)=>X[H]);if(Q&&J)return"auth + payment dependencies";return null}function Gq($,Z,X){if(Z?.keywords?.some((Q)=>/mcpaas/i.test(Q)))return'package keywords contains "mcpaas"';if(Z?.name&&/mcpaas/i.test(Z.name))return`package name "${Z.name}" → mcpaas`;let U=X.some((Q)=>Q.slug==="mcp"),z=X.some((Q)=>Q.category==="database");if(U&&z&&Z?.dependencies&&Object.keys(Z.dependencies).length>10)return"MCP + database + complex deps (platform shape)";return null}function _q($,Z){if(!Z?.private)return null;if(!(!!Z.workspaces||P(F($,"pnpm-workspace.yaml"))))return null;return"private workspace + multi-package"}function M0($){let Z=F($,"package.json");if(!P(Z))return null;try{return JSON.parse(t(Z,"utf-8"))}catch{return null}}function Yq($,Z){if(!Z.includes("*"))return P(F($,Z));let X=Z.split("/");if(X.length===1){let H=Z.split("*")[0];try{return XZ($).some((q)=>q.startsWith(H))}catch{return!1}}let U=F($,...X.slice(0,-1)),z=X[X.length-1],Q=z.split("*")[0],J=z.split("*")[1]||"";try{return XZ(U).some((H)=>H.startsWith(Q)&&H.endsWith(J))}catch{return!1}}function Bq($,Z,X){switch($.type){case"dependency":return!!Z?.dependencies?.[$.key];case"devDependency":return!!Z?.devDependencies?.[$.key];case"file":return Yq(X,$.pattern);default:return!1}}function r2($){let Z=M0($);return ZZ.map((X)=>{let z=X.signals.filter((Q)=>Bq(Q,Z,$)).length/X.signals.length;return{name:X.name,slug:X.slug,category:X.category,confidence:z}}).filter((X)=>X.confidence>0).sort((X,U)=>U.confidence-X.confidence)}function UZ($){let Z=M0($);if(Z?.devDependencies?.typescript||Z?.dependencies?.typescript)return"TypeScript";if(P(F($,"tsconfig.json")))return"TypeScript";if(P(F($,"Cargo.toml")))return"Rust";if(P(F($,"go.mod")))return"Go";if(P(F($,"pyproject.toml"))||P(F($,"setup.py")))return"Python";if(P(F($,"Gemfile")))return"Ruby";if(P(F($,"pom.xml"))||P(F($,"build.gradle")))return"Java";if(P(F($,"Package.swift")))return"Swift";if(P(F($,"build.zig")))return"Zig";if(P(F($,"pubspec.yaml")))return"Dart";if(Z)return"JavaScript";return"Unknown"}function zZ($){let Z=M0($),X=r2($),U=[],z=Jq($,Z);if(z)return U.push(z),{type:"documentation",found:U};let Q=$q($,Z);if(Q)return U.push(Q),{type:"sdk",found:U};let J=Zq($);if(J)return U.push(J),{type:"extension",found:U};let H=Gq($,Z,X);if(H)return U.push(H),{type:"mcpaas",found:U};let q=qq($,Z);if(q)return U.push(q),{type:"saas",found:U};let G=zq($,Z);if(G)return U.push(G),{type:"wasm",found:U};let B=L1($);if(B)return U.push(B.found),{type:B.appType,found:U};let _=Uq($,Z);if(_)return U.push(_),{type:"mobile",found:U};if(X.some((I)=>I.slug==="mcp"))return U.push("MCP SDK signal"),{type:"mcp",found:U};if(Z?.bin)return U.push("package.json bin"),{type:"cli",found:U};if(eH($))return U.push("Cargo.toml [[bin]]"),{type:"cli",found:U};if(P(F($,"build.zig"))){if(U.push("build.zig"),P(F($,"src/main.zig")))return U.push("src/main.zig"),{type:"cli",found:U};if(P(F($,"src/root.zig")))return U.push("src/root.zig"),{type:"library",found:U}}let O=X.some((I)=>I.slug==="svelte"||I.slug==="sveltekit");if(Z?.private===!0&&(P(F($,"pnpm-workspace.yaml"))||Z?.workspaces!==void 0)&&O)return U.push("private workspace","Svelte"),{type:"framework",found:U};if(O)return U.push("Svelte/SvelteKit"),{type:"svelte",found:U};let V=X.some((I)=>I.category==="frontend"),W=X.some((I)=>I.category==="backend");if(Z?.private&&(Z.workspaces||P(F($,"pnpm-workspace.yaml")))&&V&&W)return U.push("private workspace + frontend + backend frameworks"),{type:"enterprise",found:U};let D=_q($,Z);if(D)return U.push(D),{type:"monorepo-root",found:U};let M=Hq($,Z,X);if(M)return U.push(M),{type:"website",found:U};if(X.some((I)=>I.slug==="nextjs"||I.slug==="nuxt"))return U.push(X.find((I)=>I.slug==="nextjs")?"Next.js":"Nuxt"),{type:"fullstack",found:U};let A=X.some((I)=>I.category==="frontend"),K=X.some((I)=>I.category==="backend");if(A&&K)return U.push("frontend framework","backend framework"),{type:"fullstack",found:U};if(A)return U.push("frontend framework"),{type:"frontend",found:U};if(K)return U.push("backend framework"),{type:"backend",found:U};let N=Xq($);if(N)return U.push(N),{type:"data-science",found:U};let C=Qq($,Z);if(C)return U.push(C),{type:"html",found:U};if(Z?.main&&!Z?.bin)return U.push("package.json main (no bin)"),{type:"library",found:U};return U.push("no classifying signals — fallback"),{type:"library",found:U}}function QZ($){if(P(F($,"bunfig.toml")))return"Bun";if(P(F($,"deno.json"))||P(F($,"deno.jsonc")))return"Deno";if(M0($))return"Node.js";if(P(F($,"Cargo.toml")))return"Rust";if(P(F($,"go.mod")))return"Go";if(P(F($,"pubspec.yaml")))return"Dart";return"Unknown"}function JZ($){if(P(F($,"pubspec.yaml")))return"pub";if(P(F($,"bun.lockb"))||P(F($,"bun.lock")))return"bun";if(P(F($,"pnpm-lock.yaml")))return"pnpm";if(P(F($,"yarn.lock")))return"yarn";if(P(F($,"package-lock.json")))return"npm";return"npm"}function HZ($){if(P(F($,".github/workflows")))return"GitHub Actions";if(P(F($,".gitlab-ci.yml")))return"GitLab CI";if(P(F($,".circleci")))return"CircleCI";if(P(F($,"Jenkinsfile")))return"Jenkins";return null}function qZ($){if(P(F($,"vercel.json")))return"Vercel";if(P(F($,"netlify.toml")))return"Netlify";if(P(F($,"wrangler.toml")))return"Cloudflare";if(P(F($,"Dockerfile")))return"Docker";if(P(F($,"fly.toml")))return"Fly.io";if(P(F($,"render.yaml")))return"Render";return null}function GZ($){let Z=F($,"svelte.config.js");if(!P(Z))return null;try{let U=t(Z,"utf-8").match(/@sveltejs\/adapter-(\w+)/);if(U){let z=U[1];switch(z){case"vercel":return"Vercel";case"node":return"Node";case"static":return"Static";case"cloudflare":return"Cloudflare";case"netlify":return"Netlify";case"auto":return"Auto";default:return z}}return null}catch{return null}}function _Z($){let Z=M0($);if(Z?.devDependencies?.vite||Z?.dependencies?.vite)return"Vite";if(Z?.devDependencies?.webpack||Z?.dependencies?.webpack)return"webpack";if(Z?.devDependencies?.esbuild||Z?.dependencies?.esbuild)return"esbuild";if(P(F($,"tsconfig.json"))&&Z?.devDependencies?.typescript)return"TypeScript (tsc)";return null}function YZ($){return["package.json","Cargo.toml","pyproject.toml","go.mod","build.zig","build.zig.zon","src/index.ts","src/index.js","src/main.ts","src/cli.ts","src/main.rs","src/lib.rs","src/main.zig","src/root.zig","src/__init__.py","main.py","__main__.py","main.go","cmd/main.go","README.md","SPECIFICATION.md","BINARY-FORMAT.md","tsconfig.json","wrangler.toml","vercel.json"].filter((X)=>P(F($,X)))}function BZ($,Z){let X={};if(Z?.scripts){for(let U of["build","test","lint","dev","start"])if(Z.scripts[U]){let z=P(F($,"bun.lock"))||P(F($,"bun.lockb"))?"bun run":"npm run";X[U]=`${z} ${U}`}}if(P(F($,"Cargo.toml"))){if(!X.build)X.build="cargo build --release";if(!X.test)X.test="cargo test";if(!X.lint)X.lint="cargo clippy"}if(P(F($,"build.zig"))){if(!X.build)X.build="zig build";if(!X.test)X.test="zig build test"}if(P(F($,"go.mod"))){if(!X.build)X.build="go build ./...";if(!X.test)X.test="go test ./..."}if(P(F($,"pyproject.toml"))||P(F($,"pytest.ini"))){if(!X.test)X.test="pytest"}return X}function VZ($,Z,X,U){let z=[];if(U&&U!=="Unknown")z.push(U);let Q=new Set(["frontend","backend","database","build","css","state","monorepo"]);for(let J of X)if(Q.has(J.category))z.push(J.name);if(P(F($,"bunfig.toml")))z.push("Bun");else if(P(F($,"deno.json"))||P(F($,"deno.jsonc")))z.push("Deno");if(z.length<3&&Z?.dependencies){let J=Object.keys(Z.dependencies).slice(0,5);for(let H of J)if(!z.some((q)=>q.toLowerCase().includes(H.toLowerCase())))z.push(H)}return z}function OZ($){let Z=M0($),X=r2($),U=UZ($),z=zZ($),Q=z.type,J=QZ($),H=JZ($),q=HZ($),G=qZ($),B=_Z($),_=X.find((j)=>j.category==="frontend"),Y=X.find((j)=>j.category==="css"),O=X.find((j)=>j.category==="ui"),L=X.find((j)=>j.category==="state"),V=X.find((j)=>j.category==="backend"),W=X.find((j)=>j.category==="database"),D=P0[Q]||P0.library,M=Q==="framework",T=X.some((j)=>j.slug==="svelte"||j.slug==="sveltekit"),A=M&&T?"svelte":M?null:null,K=Q==="svelte"||A==="svelte",N=K?GZ($):null,C=K&&X.some((j)=>j.slug==="sveltekit"),I=new Set(["css_framework","ui_library","database","connection","hosting"]),w={},d=f.filter((j)=>j.path.startsWith("stack."));for(let j of d){let S=j.path.replace("stack.","");if(!D.includes(j.category)){w[S]="slotignored";continue}if(M&&I.has(S)){w[S]="slotignored";continue}switch(S){case"frontend":w[S]=_?.name??(Q==="cli"?"CLI":"");break;case"css_framework":w[S]=Y?.name??"";break;case"ui_library":w[S]=O?.name??"";break;case"state_management":w[S]=K?L?.name??"Runes":L?.name??"";break;case"backend":w[S]=K?C?"SvelteKit":V?.name??"":V?.name??"";break;case"api_type":w[S]=C?"Server Routes":"";break;case"runtime":w[S]=J!=="Unknown"?J:"";break;case"database":w[S]=W?.name??"";break;case"connection":w[S]=W?.name??"";break;case"hosting":if(K&&N)w[S]=N;else w[S]=G??"";break;case"build":w[S]=K?"Vite":B??"";break;case"cicd":w[S]=q??"";break;case"package_manager":w[S]=H;break;default:w[S]="";break}}let c={},E=f.filter((j)=>j.path.startsWith("monorepo."));for(let j of E){let S=j.path.replace("monorepo.","");if(!D.includes(j.category))c[S]="slotignored";else c[S]=""}let m0={name:Z?.name??$.split("/").pop()??"project",goal:Z?.description??"",main_language:U,type:Q};if(M&&A)m0.framework=A;let t2=VZ($,Z,X,U),e2=YZ($),$9=BZ($,Z),M$={faf_version:$Z,project:m0,stack:w,human_context:{who:"",what:Z?.description??"",why:"",where:"",when:"",how:""},monorepo:c,_meta:{found:z.found}};if(t2.length>0)M$.tech_stack=t2;if(e2.length>0)M$.key_files=e2;if(Object.keys($9).length>0)M$.commands=$9;return M$}import{existsSync as Oq,readFileSync as Wq}from"fs";import{join as Lq}from"path";var WZ={MIN_LENGTH:8,MAX_LENGTH:280},Vq=[/^(see|see\s+the?)\s+readme/i,/^(tbd|todo|fixme|coming\s+soon)\b/i,/^(software|application|app|project|tool|library|framework)\.?$/i,/^(for\s+users|for\s+developers)\.?$/i,/^(description|goal|name|title)\.?$/i,/^lorem\s+ipsum/i,/^example(\s+\w+)?\.?$/i];function l($){let Z=$.trim();if(Z.length<WZ.MIN_LENGTH)return!1;if(Z.length>WZ.MAX_LENGTH)return!1;if(Vq.some((X)=>X.test(Z)))return!1;if(/^[\s|\-*+]/.test(Z))return!1;if(Z.split(`
218
- `).length>4)return!1;return!0}function Iq($){let Z=$.split(`
219
- `),X=0;while(X<Z.length&&/^(#\s|$)/.test(Z[X].trim()))X++;while(X<Z.length){let U=Z[X].trim();if(/^\[!\[/.test(U)){X++;continue}if(/^!\[/.test(U)){X++;continue}if(/^<img\s/i.test(U)){X++;continue}if(U===""){X++;continue}break}return Z.slice(X).join(`
220
- `)}function Dq($){let X=Iq($).split(`
221
- `),U=[];for(let z of X){let Q=z.trim();if(Q===""){if(U.length>0)break;continue}if(/^(#|>|```|---|\||\s*[-*+]\s|\d+\.\s)/.test(Q))break;if(/^\*\*[^*]+\*\*\s*$/.test(Q)&&U.length===0)continue;U.push(Q)}if(U.length===0)return null;return U.join(" ").trim()}function F0($,Z){let X=$.split(`
222
- `),U=0;while(U<X.length){let Q=X[U].trim().match(/^(#{1,6})\s+(.+)$/);if(Q&&Z.test(Q[2])){let J=Q[1].length,H=[];U++;while(U<X.length){let q=X[U].trim(),G=q.match(/^(#{1,6})\s+/);if(G&&G[1].length<=J)break;if(q===""){if(H.length>0)break;U++;continue}if(/^(>|```|---|\||\s*[-*+]\s|\d+\.\s)/.test(q))break;H.push(q),U++}if(H.length===0)return null;return H.join(" ").trim()}U++}return null}function Rq($){let Z=F0($,/^(use\s+cases?|goal)\b/i);if(Z&&l(Z))return Z;let X=Dq($);if(X&&l(X))return X;return}function Mq($){let Z=F0($,/^(about|description|overview|what(\s+is\s+this)?)\b/i);if(Z&&l(Z))return Z;return}function Fq($){let Z=F0($,/^(audience|users?|for\s+whom|who(\s+is\s+this\s+for)?)\b/i);if(Z&&l(Z))return Z;return}function Pq($){let Z=F0($,/^(why|motivation|problem|rationale)\b/i);if(Z&&l(Z))return Z;return}function Tq($){let Z=F0($,/^(deployment|where(\s+it\s+runs)?|hosting)\b/i);if(Z&&l(Z))return Z;return}function Kq($){let Z=F0($,/^(status|history|timeline|since|launched)\b/i);if(Z&&l(Z))return Z;return}function Aq($){let Z=F0($,/^(architecture|how(\s+it\s+works)?|approach|design)\b/i);if(Z&&l(Z))return Z;return}function n2($){let Z=["README.md","README.MD","Readme.md","readme.md"],X=null;for(let O of Z){let L=Lq($,O);if(Oq(L)){X=L;break}}if(!X)return{};let U;try{U=Wq(X,"utf-8")}catch{return{}}let z={},Q=Rq(U);if(Q)z.project={goal:Q};let J={},H=Mq(U);if(H)J.what=H;let q=Fq(U);if(q)J.who=q;let G=Pq(U);if(G)J.why=G;let B=Tq(U);if(B)J.where=B;let _=Kq(U);if(_)J.when=_;let Y=Aq(U);if(Y)J.how=Y;if(Object.keys(J).length>0)z.human_context=J;return z}import{existsSync as Nq,readFileSync as wq}from"fs";import{join as bq}from"path";function Cq($,Z){let X=$.split(`
223
- `),U=!1;for(let z of X){let Q=z.trim();if(/^\[/.test(Q)){U=Q==="[package]";continue}if(!U)continue;let J=Q.match(new RegExp(`^${Z}\\s*=\\s*(.+)$`));if(J){let H=J[1].trim();H=H.replace(/\s*#.*$/,"").trim();let q=H.match(/^"((?:[^"\\]|\\.)*)"$/)||H.match(/^'((?:[^'\\]|\\.)*)'$/);if(q)return q[1];return H}}return null}function o2($){let Z=bq($,"Cargo.toml");if(!Nq(Z))return{};let X;try{X=wq(Z,"utf-8")}catch{return{}}let U=Cq(X,"description");if(U&&l(U))return{project:{goal:U}};return{}}function jq($,Z){let X={project:{...Z.project??{},...$.project??{}},human_context:{...Z.human_context??{},...$.human_context??{}}};if(X.project&&Object.keys(X.project).length===0)delete X.project;if(X.human_context&&Object.keys(X.human_context).length===0)delete X.human_context;return X}function LZ($){return jq(n2($),o2($))}function Sq($){let Z=OZ($),X=LZ($),U=I1(Z,X);Eq(U);let z=I1(U,s2($));return I1(z,{human_context:a2($)})}function Eq($){let Z=$.project?.type??"library",X=P0[Z]||P0.library;for(let U of f){if(X.includes(U.category))continue;let[z,Q]=U.path.split(".");if(z==="stack"&&$.stack)$.stack[Q]="slotignored";if(z==="monorepo"&&$.monorepo)$.monorepo[Q]="slotignored"}}function I1($,Z){let X={...$};for(let[U,z]of Object.entries(Z)){let Q=X[U];if(_0(Q))X[U]=z;else if(typeof z==="object"&&z!==null&&!Array.isArray(z)&&typeof Q==="object"&&Q!==null&&!Array.isArray(Q))X[U]=I1(Q,z)}return X}export{sJ as writeServerCard,uJ as writeProjectHtml,gZ as validateFaf,h0 as utcNow,s2 as turboCatSlots,a8 as turboCatScan,PZ as slotsByCategory,u8 as seedSixWsFromGoal,T1 as scoreFafYaml,OH as runLoop,e8 as relentlessContextDetailed,a2 as relentlessContext,cJ as registryName,dJ as registryMeta,O8 as readFafRaw,CJ as readFaf,m2 as questionForSlot,RH as publicQuestions,W1 as normalizeAnswer,m8 as loopVerdict,P1 as kernel,_0 as isPlaceholder,k8 as isHumanSlot,O1 as isEmptyValue,qH as interviewForMissing,MH as gradeAnswers,i0 as getTier,AZ as getNextTier,T8 as generateServerCard,R8 as generateProjectHtml,j8 as fromClaudeDir,W8 as findFafFile,f2 as fafContextBlock,X9 as enrichScore,DH as deriveQuestionSet,v8 as classifyGaps,I$ as canonicalPriority,BH as buildTableOf8,FH as buildReceipt,Sq as assembleFreshFaf,c8 as answersMatch,a as TIERS,h8 as STACK_INTERVIEW,l0 as SLOT_BY_PATH,f as SLOTS,v2 as SIX_WS_INTERVIEW,K8 as REGISTRY_PUBLISHER_KEY,G0 as PRIORITY_RANK,h2 as PRIORITY_ORDER,F$ as PLACEHOLDERS,V1 as KNOWLEDGE_TYPES,f8 as INTERVIEW_VERSION,HH as INTERVIEW_PATHS,x8 as INTERVIEW_BY_PATH,u0 as INTERVIEW,D0 as FafmSoul,c0 as FAF_HEX,KZ as ENTERPRISE_SLOTS,l2 as BENCH_VERSION,TZ as BASE_SLOTS,d8 as ALIAS_GROUPS};
213
+ `}function iJ($,Z,z,X="project.faf"){uJ(kJ($,"project.html"),P9(Z,z,X),"utf-8")}import{writeFileSync as sJ}from"fs";import{join as aJ}from"path";var T9="application/vnd.faf+yaml",rJ="https://static.modelcontextprotocol.io/schemas/v1/server-card.schema.json",nJ=/^[a-zA-Z0-9.-]+\/[a-zA-Z0-9._-]+$/;function N9($){let Z=String($.project?.name??"project").trim();if(Z.includes("/")&&nJ.test(Z))return Z;let z=$.project?.homepage??$.project?.website??$.project?.url,X="local";if(z)try{X=new URL(z).hostname.replace(/^www\./,"").split(".").reverse().join(".")}catch{}let U=Z.replace(/[^a-zA-Z0-9._-]/g,"-").replace(/^-+|-+$/g,"")||"project";return`${X}/${U}`}function oJ($){let Z=String($.project?.goal??$.context??$.project?.name??"MCP server").replace(/\s+/g," ").trim();if(!Z)return"MCP server";return Z.length<=100?Z:`${Z.slice(0,97).trimEnd()}...`}function u2($,Z={}){return{faf:Z.fafPointer??"./project.faf",mediaType:T9,iana:`https://www.iana.org/assignments/media-types/${T9}`,deterministic:!0,...Z.scoreEndpoint?{scoreEndpoint:Z.scoreEndpoint}:{},generated:$.generated??Z.now??new Date().toISOString()}}function w9($,Z={}){let z={$schema:rJ,name:N9($),version:String($.project?.version??"0.1.0"),description:oJ($)},X=$H($)??$.project?.name;if(X&&X.length<=100)z.title=X;let U=$.project?.homepage??$.project?.website??$.project?.url;if(U)z.websiteUrl=U;if(Z.remoteUrl)z.remotes=[{type:"streamable-http",url:Z.remoteUrl}];return z._meta={"one.faf/context":u2($,Z)},z}var b9="io.modelcontextprotocol.registry/publisher-provided",A9=4096;function tJ($,Z={}){let z={"one.faf/context":u2($,Z)},X=new TextEncoder().encode(JSON.stringify(z)).length;if(X>A9)throw Error(`publisher-provided _meta is ${X}B — exceeds the registry ${A9}B cap`);return{[b9]:z}}function eJ($){return N9($)}function $H($){let Z=$.project?.title;if(typeof Z==="string"){let z=Z.trim();if(z&&z.length<=100)return z}return}function ZH($,Z,z={}){let X=w9(Z,z),U=aJ($,"server-card");return sJ(U,`${JSON.stringify(X,null,2)}
214
+ `,"utf-8"),U}var k2=["ephemeral","standard","high","critical"],_0=Object.fromEntries(k2.map(($,Z)=>[$,Z])),V1=new Set(["user","feedback","project","reference"]),v2=new Set(["version","profile","namepoint","created","last_etched","retention","index","memory"]),m2=new Set(["facts","sessions","preferences","custom"]),p2={low:"ephemeral",medium:"standard"};import{readFileSync as zH,writeFileSync as XH,existsSync as UH}from"fs";function h0(){return new Date().toISOString().replace(/\.\d{3}Z$/,"Z")}function x($){return $===null||$===void 0}function L$($){if(x($))return"standard";if(p2[$])return p2[$];if($ in _0)return $;return"standard"}var QH=new Set(["text","id","type","priority","tags","links","timestamp","source"]);function C9($){if(typeof $==="string")return{text:$,id:null,type:null,priority:"standard",tags:[],links:[],timestamp:null,source:null,extra:{}};if(!$||typeof $!=="object"||!("text"in $))throw Error(`fact must be a string or a mapping with 'text': ${JSON.stringify($)}`);let Z=$,z={};for(let[X,U]of Object.entries(Z))if(!QH.has(X))z[X]=U;return{text:String(Z.text),id:Z.id??null,type:Z.type??null,priority:L$(Z.priority),tags:Array.isArray(Z.tags)?Z.tags.slice():[],links:Array.isArray(Z.links)?Z.links.slice():[],timestamp:Z.timestamp??null,source:Z.source??null,extra:z}}function j9($){if(x($.id)&&x($.type)&&$.tags.length===0&&$.links.length===0&&x($.timestamp)&&x($.source)&&Object.keys($.extra).length===0&&$.priority==="standard")return $.text;let z={text:$.text};if(!x($.id))z.id=$.id;if(!x($.type))z.type=$.type;if(z.priority=$.priority,$.tags.length)z.tags=$.tags;if($.links.length)z.links=$.links;if(!x($.timestamp))z.timestamp=$.timestamp;if(!x($.source))z.source=$.source;return Object.assign(z,$.extra),z}class D0{namepoint;profile;retention;created;last_etched;_facts;_byId;_index;_sessions;_preferences;_custom;_extra;_memoryExtra;constructor($,Z={}){this.namepoint=$,this.profile=Z.profile??"knowledge",this.retention=Z.retention??"forever",this.created=Z.created??h0(),this.last_etched=this.created,this._facts=Z.facts?Z.facts.slice():[],this._byId=new Map,this._facts.forEach((z,X)=>{if(!x(z.id))this._byId.set(z.id,X)}),this._index=Z.index?Z.index.slice():[],this._sessions=Z.sessions?structuredClone(Z.sessions):[],this._preferences=Z.preferences?{...Z.preferences}:{},this._custom=Z.custom?{...Z.custom}:{},this._extra=Z.extra?{...Z.extra}:{},this._memoryExtra=Z.memoryExtra?{...Z.memoryExtra}:{}}get facts(){return this._facts}get index(){return this._index}get sessions(){return this._sessions}get preferences(){return this._preferences}get custom(){return this._custom}get extra(){return this._extra}get memoryExtra(){return this._memoryExtra}static load($){if(!UH($))throw Error(`soul file not found: ${$}`);let Z=zH($,"utf-8"),z=o(Z);if(!z||typeof z!=="object")throw Error("soul is not a YAML mapping");let X=z.memory&&typeof z.memory==="object"?z.memory:{},U=Array.isArray(X.facts)?X.facts:[],Q={};for(let[G,_]of Object.entries(z))if(!v2.has(G))Q[G]=structuredClone(_);let J={};for(let[G,_]of Object.entries(X))if(!m2.has(G))J[G]=structuredClone(_);let H=new D0(String(z.namepoint??$.replace(/.*\//,"").replace(/\.fafm$/,"")),{profile:String(z.profile??"voice"),facts:U.map(C9),retention:String(z.retention??"forever"),created:z.created??null,index:Array.isArray(z.index)?z.index.slice():[],sessions:Array.isArray(X.sessions)?structuredClone(X.sessions):[],preferences:X.preferences&&typeof X.preferences==="object"?structuredClone(X.preferences):{},custom:X.custom&&typeof X.custom==="object"?structuredClone(X.custom):{},extra:Q,memoryExtra:J});return H.last_etched=String(z.last_etched??H.created),H}static fromFile($){return D0.load($)}toDoc(){let $={facts:this._facts.map(j9),sessions:structuredClone(this._sessions),preferences:structuredClone(this._preferences),custom:structuredClone(this._custom)};for(let[z,X]of Object.entries(this._memoryExtra))if(!m2.has(z))$[z]=structuredClone(X);let Z={version:"1.1",profile:this.profile,namepoint:this.namepoint,created:this.created,last_etched:this.last_etched,retention:this.retention,index:this._index.slice(),memory:$};for(let[z,X]of Object.entries(this._extra))if(!v2.has(z))Z[z]=structuredClone(X);return Z}toYaml(){return q1(this.toDoc(),{lineWidth:100})}rebuildIndex($=80){return this._index=this._facts.map((Z)=>`${Z.id??"?"} — ${Z.text.slice(0,$)}`),this._index}save($,Z={}){if(Z.reindex!==!1)this.rebuildIndex();return XH($,this.toYaml(),"utf-8"),$}toFile($,Z={}){return this.save($,Z)}add($){if(!x($.id)&&this._byId.has($.id)){let Z=this._byId.get($.id);if(Z!==void 0)this._facts[Z]=$}else if(this._facts.push($),!x($.id))this._byId.set($.id,this._facts.length-1);if($.timestamp&&$.timestamp>(this.last_etched||""))this.last_etched=$.timestamp;return $}etch($,Z={}){return this.add({text:$,id:Z.id??null,type:Z.type??null,priority:L$(Z.priority),tags:Z.tags?Z.tags.slice():[],links:Z.links?Z.links.slice():[],timestamp:h0(),source:Z.source??null,extra:{}})}recall($,Z={}){let z=_0[L$(Z.minPriority??"ephemeral")]??0,X=($??"").toLowerCase(),U=new Set(Z.tags??[]),Q=[];this._facts.forEach((H,G)=>{if(X&&!H.text.toLowerCase().includes(X))return;if(U.size>0&&![...U].some((_)=>H.tags.includes(_)))return;if(!x(Z.type)&&H.type!==Z.type)return;if((_0[H.priority]??1)<z)return;Q.push([G,H])}),Q.sort((H,G)=>{let _=_0[H[1].priority]??1,B=_0[G[1].priority]??1;if(B!==_)return B-_;let Y=H[1].timestamp??"",q=G[1].timestamp??"";if(q!==Y)return q<Y?-1:q>Y?1:0;return G[0]-H[0]});let J=Q.map(([,H])=>H);if(!x(Z.limit))return J.slice(0,Z.limit);return J}getFact($){let Z=this._byId.get($);return Z===void 0?null:this._facts[Z]}deleteFact($){let Z=this._byId.get($);if(Z===void 0)return!1;return this._facts.splice(Z,1),this._byId.clear(),this._facts.forEach((z,X)=>{if(!x(z.id))this._byId.set(z.id,X)}),!0}}import{readdirSync as JH,readFileSync as HH,statSync as S9,existsSync as GH}from"fs";import{join as _H,basename as E9,resolve as YH}from"path";var g9=new Set(["MEMORY.md","MEMORY-FULL.md","README.md"]),qH=/\[\[([^\]]+)\]\]/g;function BH($){let Z=S9($).mtimeMs;return new Date(Z).toISOString().replace(/\.\d{3}Z$/,"Z")}function VH($){if(!$.startsWith("---"))return{fm:null,body:$};let Z=$.split("---");if(Z.length<3)return{fm:null,body:$};try{let z=o(Z[1]);if(!z||typeof z!=="object")return{fm:null,body:Z.slice(2).join("---").trim()};return{fm:z,body:Z.slice(2).join("---").trim()}}catch{return{fm:null,body:$}}}function OH($,Z,z){if(!z.name)return null;let X=z.metadata&&typeof z.metadata==="object"?z.metadata:{},U=X.type;if(typeof U!=="string"||!V1.has(U))return null;let Q=String(z.name).trim(),H=(z.description!==void 0&&z.description!==null&&String(z.description).trim()?String(z.description).trim():"")||Q,G={};if(X.originSessionId)G.provenance=[`session:${X.originSessionId}`];let _=[...new Set([...Z.matchAll(qH)].map((B)=>B[1]))].sort();return{text:H,id:Q,type:U,priority:"standard",tags:[],links:_,timestamp:BH($),source:`claude-code memory: ${E9($)}`,extra:G}}function f9($,Z={}){let z=YH($);if(!GH(z))throw Error(`Claude memory directory not found: ${z}`);if(!S9(z).isDirectory())throw Error(`Claude memory path is not a directory: ${z}`);let X=Z.skip??g9,U=Z.namepoint??`@claude-code:${E9(z)}`,Q=[],J=JH(z).filter((Y)=>Y.endsWith(".md")).sort();for(let Y of J){if(X.has(Y))continue;let q=_H(z,Y),W;try{W=HH(q,"utf-8")}catch{continue}let{fm:I,body:V}=VH(W);if(!I)continue;let O=OH(q,V,I);if(O)Q.push(O)}let H=Q.map((Y)=>Y.timestamp).filter(Boolean),G=H.length?H.reduce((Y,q)=>Y<q?Y:q):h0(),_=H.length?H.reduce((Y,q)=>Y>q?Y:q):G,B=new D0(U,{profile:"knowledge",facts:Q,created:G});return B.last_etched=_,B.rebuildIndex(),B}var k9="faf-interview/1",x0="(terse — 3-4 words)",l2=[{path:"project.name",question:"What is the name of this project?",header:"Name",type:"text",required:!0},{path:"project.goal",question:"What does this project do? (one sentence)",header:"Goal",type:"text",required:!0},{path:"human_context.who",question:`Who is this for? ${x0}`,header:"Who",type:"text",required:!0},{path:"human_context.what",question:`What are they building? ${x0}`,header:"What",type:"text",required:!0},{path:"human_context.why",question:`Why does it exist? ${x0}`,header:"Why",type:"text",required:!0},{path:"human_context.where",question:`Where does it run or ship? ${x0}`,header:"Where",type:"text",required:!0},{path:"human_context.when",question:`When — timeline or stage? ${x0}`,header:"When",type:"text",required:!0},{path:"human_context.how",question:`How is it built or used? ${x0}`,header:"How",type:"text",required:!0}],v9=[{path:"project.main_language",question:"What is the primary programming language?",header:"Language",type:"select",required:!0,options:[{label:"TypeScript",value:"TypeScript",description:"JavaScript with types"},{label:"JavaScript",value:"JavaScript",description:"Vanilla JS or Node.js"},{label:"Python",value:"Python",description:"Python 3.x"},{label:"Rust",value:"Rust",description:"Systems programming"},{label:"Go",value:"Go",description:"Golang"},{label:"Other",value:"Other",description:"Specify manually"}]},{path:"stack.frontend",question:"What frontend framework does it use?",header:"Frontend",type:"select",required:!1,options:[{label:"React",value:"React",description:"React.js"},{label:"Vue",value:"Vue",description:"Vue.js"},{label:"Svelte",value:"Svelte",description:"Svelte/SvelteKit"},{label:"Next.js",value:"Next.js",description:"React framework"},{label:"None",value:"None",description:"No frontend"},{label:"Other",value:"Other",description:"Specify manually"}]},{path:"stack.backend",question:"What backend framework does it use?",header:"Backend",type:"select",required:!1,options:[{label:"Express",value:"Express",description:"Node.js Express"},{label:"Fastify",value:"Fastify",description:"Node.js Fastify"},{label:"Django",value:"Django",description:"Python Django"},{label:"FastAPI",value:"FastAPI",description:"Python FastAPI"},{label:"None",value:"None",description:"No backend"},{label:"Other",value:"Other",description:"Specify manually"}]},{path:"stack.database",question:"What database does it use?",header:"Database",type:"select",required:!1,options:[{label:"PostgreSQL",value:"PostgreSQL",description:"Postgres"},{label:"MySQL",value:"MySQL",description:"MySQL/MariaDB"},{label:"SQLite",value:"SQLite",description:"Embedded SQL"},{label:"MongoDB",value:"MongoDB",description:"Document store"},{label:"None",value:"None",description:"No database"},{label:"Other",value:"Other",description:"Specify manually"}]},{path:"stack.runtime",question:"What runtime does it run on?",header:"Runtime",type:"text",required:!1},{path:"stack.hosting",question:"Where is it hosted or distributed?",header:"Hosting",type:"text",required:!1},{path:"stack.build",question:"What is the build tool?",header:"Build",type:"text",required:!1},{path:"stack.cicd",question:"What CI/CD does it use?",header:"CI/CD",type:"text",required:!1}],u0=[...l2,...v9],m9=new Map(u0.map(($)=>[$.path,$])),WH=Object.fromEntries(u0.map(($)=>[$.path,$]));function d2($){let Z=m9.get($);if(Z)return Z.question;let z=l0.get($)??y.find((X)=>X.canonical===$);return z?`${z.description}?`.replace(/\?\?$/,"?"):`${$}?`}function IH($,Z){return u0.filter((z)=>{let X=z.path.split("."),U=$;for(let Q of X)if(U&&typeof U==="object"&&Q in U)U=U[Q];else{U=void 0;break}if(U==="slotignored")return!1;return Z(U)})}var LH=new Set(["developers","development teams","development team","teams","development","cloud platform","web platform","platform","best practices","improve development efficiency","development efficiency","modern development practices","modern development","test-driven development","production/stable","production","stable","app","project","tool"]),DH=[["npm",/\bnpm\b/i],["PyPI",/\bpypi\b/i],["crates.io",/\bcrates\.io\b/i],["Homebrew",/\bhomebrew\b/i],["Docker",/\bdocker\b/i],["Cloudflare",/\bcloudflare\b/i],["Vercel",/\bvercel\b/i],["Netlify",/\bnetlify\b/i],["AWS",/\baws\b/i],["Cloud Run",/\bcloud run\b/i],["edge",/\bedge\b/i],["browser",/\bbrowser\b/i],["WASM",/\bwasm\b/i],["GitHub",/\bgithub\b/i],["MCP Registry",/\bmcp registry\b/i],["Chrome Web Store",/\bchrome web store\b/i],["Smithery",/\bsmithery\b/i]],y9=($)=>LH.has($.toLowerCase().trim()),RH=/^(?:with|and|or|using|for|to|that|who|whom|whose|the|a|an|in|on|of|via|by|&)$/i;function h9($,Z=5){let z=$.trim().split(/\s+/).filter(Boolean).slice(0,Z);while(z.length&&RH.test(z[z.length-1].replace(/[.,;:]+$/,"")))z.pop();return z.join(" ")}function p9($){let Z={};if(!$||typeof $!=="string")return Z;let z=$.trim(),X=z.replace(/^[^A-Za-z0-9]+/,"").split(/\s+(?:for|that|which|to)\s+|\s+[—–]\s+|\s-\s|:\s|\.\s|,\s/)[0].trim(),U=h9(X);if(U.split(/\s+/).filter(Boolean).length>=2&&!y9(U))Z.what=U;let Q=DH.filter(([,G])=>G.test(z)).map(([G])=>G);if(Q.length)Z.where=Q.slice(0,4).join(", ");let J=z.match(/\bfor ((?:[A-Za-z][\w./+-]* )?(?:any |all )?(?:developers?|teams?|engineers?|builders?|users?|integrators?)\b[^.,;:—]*)/i),H=h9((J?.[1]||"").trim().replace(/\s+/g," "));if(H&&!y9(H))Z.who=H;return Z}function x9($,Z){let z=$;for(let X of Z.split("."))if(z&&typeof z==="object"&&X in z)z=z[X];else return;return z}function u9($){if(typeof $!=="string")return!1;let Z=$.trim();if(!Z||Z==="slotignored")return!1;return!Y0(Z)}function FH($,Z={}){let z=$&&typeof $==="object"?$:{},X=x9(z,"project.goal"),U=(u9(X)?String(X).trim():"")||(Z.goal??"").trim(),Q=p9(U),J=Z.detailed??{},H={"project.goal":U||void 0,"human_context.what":Q.what,"human_context.where":Q.where,"human_context.who":Q.who},G=(W)=>{let I=H[W];if(I)return{value:I,source:"project goal",confidence:0.9};let V=W.startsWith("human_context.")?W.slice(14):"",O=V?J[V]:void 0;return O?{value:O.value,source:O.source,confidence:O.confidence}:void 0},_=l2.map((W,I)=>{let V={n:I+1,path:W.path,header:W.header,question:W.question},O=x9(z,W.path);if(u9(O))return{...V,value:String(O).trim(),status:"filled",seeded:!1};let L=G(W.path);if(L)return{...V,value:L.value,status:"seeded",seeded:!0,source:L.source,confidence:L.confidence};return{...V,value:"",status:"empty",seeded:!1}}),B=_.filter((W)=>W.status==="filled").length,Y=_.filter((W)=>W.status==="seeded").length,q=_.filter((W)=>W.status==="empty").length;return{version:k9,rows:_,filledCount:B,seededCount:Y,emptyCount:q,complete:q===0}}function O1($){if($===null||$===void 0)return!0;if(typeof $==="string"){let Z=$.trim();return Z===""||Y0(Z)}return!1}function MH($,Z){let z=$;for(let X of Z.split("."))if(z&&typeof z==="object"&&X in z)z=z[X];else return;return z}function l9($){if($==="project.goal")return!0;return l0.get($)?.category==="human"}function d9($,Z=O1){let z=[],X=[];for(let U of u0){let Q=MH($,U.path);if(Q==="slotignored")continue;if(!Z(Q))continue;(l9(U.path)?z:X).push(U.path)}return{human:z,sourceable:X}}function c9($,Z,z=O1){let X=d9(Z,z),U;if($>=100||X.human.length===0&&X.sourceable.length===0)U="done";else if(X.sourceable.length>0)U="can-source";else U="needs-human";let Q=U==="needs-human"?c2(X):[];return{status:U,score:$,gaps:X,ask:Q}}function c2($){return $.human.map((Z)=>({path:Z,question:d2(Z)}))}function KH($,Z={}){let z=Math.max(1,Z.maxRounds??5),X=Z.isEmpty??O1,U=[],Q=0;for(let H=0;H<=z;H++){let G=$.read();if(!G)return{status:"no-faf",score:0,rounds:Q,history:U,ask:[]};let _=$.score(G.yaml);U.push(_);let B=c9(_,G.data,X);if(B.status==="done")return{status:"done",score:_,rounds:Q,history:U,ask:[]};if(B.status==="needs-human")return{status:"needs-human",score:_,rounds:Q,history:U,ask:B.ask};if(U.length>=2&&_<=U[U.length-2])return B.gaps.human.length?{status:"needs-human",score:_,rounds:Q,history:U,ask:c2(B.gaps)}:{status:"stuck",score:_,rounds:Q,history:U,ask:[]};if(Q>=z)return{status:"capped",score:_,rounds:Q,history:U,ask:c2(B.gaps)};$.runAuto(),Q++}return{status:"capped",score:U[U.length-1]??0,rounds:Q,history:U,ask:[]}}import{createHash as s9}from"crypto";var i2="faf-bench/1",PH={"project.name":"What is the project's name?","project.goal":"What is the project's goal — what is it for?","project.main_language":"What is the primary programming language?","human_context.who":"Who is this project for?","human_context.what":"What are they building?","human_context.why":"Why does this project exist?","human_context.where":"Where does it run or get distributed?","human_context.when":"When — what is the project's timeline or stage?","human_context.how":"How is it built or used?"};function TH($,Z){return PH[$]??`What is the project's ${Z.replace(/\s*\(.*\)$/,"").toLowerCase()}?`}var a9=[["typescript","ts"],["javascript","js"],["python","py","python3"],["node","nodejs","node js","node.js"],["github actions","gh actions","actions"],["postgresql","postgres","pg"],["kubernetes","k8s"],["npm","npm registry"],["cloudflare workers","cf workers","workers"],["google cloud run","cloud run","gcp cloud run"]],D$=new Map;a9.forEach(($,Z)=>$.forEach((z)=>D$.set(z,Z)));var AH=new Set(["a","an","the","and","or","of","for","to","in","on","with","is","it","its","their","your","via","by","using","use","used"]);function W1($){return $.toLowerCase().replace(/[^a-z0-9\s.+#-]/g," ").replace(/\.(?=\s|$)/g," ").replace(/\s+/g," ").trim()}function i9($){return W1($).split(" ").filter((Z)=>Z&&!AH.has(Z))}function r9($,Z){let z=W1($),X=W1(Z);if(!z||!X)return!1;if(z===X)return!0;let U=D$.get(z);if(U!==void 0&&D$.get(X)===U)return!0;let Q=i9($);if(Q.length===0)return!1;let J=new Set(i9(Z));return Q.every((H)=>{if(J.has(H))return!0;let G=D$.get(H);return G!==void 0&&[...J].some((_)=>D$.get(_)===G)})}function NH($){let Z=N1($),z=o($),X=[],U={},Q=0;for(let G of y){if(Z.slots[G.path]!=="populated")continue;let _=Q3(z,G);if(typeof _!=="string")continue;let B=_.trim();if(!B||M$.has(B.toLowerCase()))continue;Q+=1,X.push({n:Q,path:G.path,question:TH(G.path,G.description)}),U[Q]=B}let J=JSON.stringify({v:i2,q:X.map((G)=>[G.path,G.question])}),H=s9("sha256").update(J).digest("hex").slice(0,12);return{version:i2,qsetHash:H,questions:X,answers:U}}function wH($){return{version:$.version,qsetHash:$.qsetHash,questions:$.questions}}function bH($,Z){let z=$.questions.map((U)=>{let Q=Z[String(U.n)]??Z[U.path]??"";return{n:U.n,path:U.path,ok:typeof Q==="string"&&Q.trim()!==""&&r9($.answers[U.n],Q)}}),X=$.questions.filter((U)=>!z[U.n-1].ok);return{correct:z.filter((U)=>U.ok).length,total:$.questions.length,misses:X,perQuestion:z}}function CH($,Z){let z=JSON.stringify({v:$.version,repo:Z??null,qset:$.qsetHash,protocol:$.protocol,cold:$.cold??null,faf:$.faf??null});return{projection:z,hash:s9("sha256").update(z).digest("hex")}}import{existsSync as rH,readdirSync as Z6,readFileSync as nH}from"fs";import{join as n2,dirname as oH,extname as tH,resolve as eH}from"path";var s2={"package.json":{frameworks:["Node.js","JavaScript","TypeScript"],slots:{packageManager:"npm/yarn/pnpm",mainLanguage:"JavaScript/TypeScript"},priority:35,intelligence:"ultra-high"},"README.md":{frameworks:[],slots:{targetUser:"developers",coreProblem:"understanding project",missionPurpose:"project documentation"},priority:25,intelligence:"high"},"requirements.txt":{frameworks:["Python"],slots:{packageManager:"pip",mainLanguage:"Python"},priority:35,intelligence:"ultra-high"},Pipfile:{frameworks:["Python"],slots:{packageManager:"pipenv",mainLanguage:"Python"},priority:35,intelligence:"ultra-high"},"pyproject.toml":{frameworks:["Python"],slots:{mainLanguage:"Python",runtime:"Python",backend:"Python"},priority:36,intelligence:"ultra-high"},Gemfile:{frameworks:["Ruby","Rails"],slots:{packageManager:"bundler",mainLanguage:"Ruby"},priority:35,intelligence:"ultra-high"},"composer.json":{frameworks:["PHP","Laravel","Symfony"],slots:{packageManager:"composer",mainLanguage:"PHP"},priority:35,intelligence:"ultra-high"},"Cargo.toml":{frameworks:["Rust"],slots:{packageManager:"cargo",mainLanguage:"Rust",buildTool:"cargo"},priority:36,intelligence:"ultra-high"},"go.mod":{frameworks:["Go"],slots:{packageManager:"go modules",mainLanguage:"Go",buildTool:"go build"},priority:36,intelligence:"ultra-high"},"pubspec.yaml":{frameworks:["Dart"],slots:{packageManager:"pub",mainLanguage:"Dart"},priority:35,intelligence:"ultra-high"},"pom.xml":{frameworks:["Java","Spring","Maven"],slots:{packageManager:"maven",mainLanguage:"Java",buildTool:"maven"},priority:35,intelligence:"ultra-high"},"build.gradle":{frameworks:["Java","Kotlin","Spring","Gradle"],slots:{packageManager:"gradle",mainLanguage:"Java/Kotlin",buildTool:"gradle"},priority:35,intelligence:"ultra-high"},"next.config.js":{frameworks:["Next.js"],slots:{framework:"Next.js",runtime:"Node.js",buildTool:"Next.js",mainLanguage:"JavaScript",server:"Node.js"},priority:30,intelligence:"high"},"next.config.mjs":{frameworks:["Next.js"],slots:{framework:"Next.js",runtime:"Node.js",buildTool:"Next.js",mainLanguage:"JavaScript",server:"Node.js"},priority:30,intelligence:"high"},"next.config.ts":{frameworks:["Next.js 13+"],slots:{framework:"Next.js 13+",runtime:"Node.js",buildTool:"Next.js",mainLanguage:"TypeScript",server:"Node.js"},priority:30,intelligence:"high"},"nuxt.config.js":{frameworks:["Nuxt 2"],slots:{framework:"Nuxt 2",runtime:"Node.js",buildTool:"Nuxt",mainLanguage:"JavaScript",server:"Node.js"},priority:30,intelligence:"high"},"nuxt.config.ts":{frameworks:["Nuxt 3"],slots:{framework:"Nuxt 3",runtime:"Node.js",buildTool:"Nuxt",mainLanguage:"TypeScript",server:"Node.js"},priority:30,intelligence:"high"},"svelte.config.js":{frameworks:["SvelteKit"],slots:{framework:"SvelteKit",buildTool:"Vite",mainLanguage:"JavaScript",server:"Node.js"},priority:30,intelligence:"high"},"angular.json":{frameworks:["Angular"],slots:{framework:"Angular",buildTool:"Angular CLI",mainLanguage:"TypeScript",server:"Node.js"},priority:30,intelligence:"high"},"manifest.json":{frameworks:["Chrome Extension","Browser Extension"],slots:{framework:"Chrome Extension",runtime:"Chrome/Browser",mainLanguage:"JavaScript",hosting:"Chrome Web Store",apiType:"Chrome APIs"},priority:35,intelligence:"ultra-high",confirmWith:["popup.html","background.js","content.js"]},"vue.config.js":{frameworks:["Vue"],slots:{framework:"Vue",buildTool:"Vue CLI",mainLanguage:"JavaScript"},priority:30,intelligence:"high"},"remix.config.js":{frameworks:["Remix"],slots:{framework:"Remix",runtime:"Node.js",mainLanguage:"JavaScript",server:"Node.js"},priority:30,intelligence:"high"},"gatsby-config.js":{frameworks:["Gatsby"],slots:{framework:"Gatsby",buildTool:"Gatsby",mainLanguage:"JavaScript",server:"Node.js"},priority:30,intelligence:"high"},"gatsby-config.ts":{frameworks:["Gatsby"],slots:{framework:"Gatsby",buildTool:"Gatsby",mainLanguage:"TypeScript",server:"Node.js"},priority:30,intelligence:"high"},"astro.config.mjs":{frameworks:["Astro"],slots:{framework:"Astro",buildTool:"Vite",mainLanguage:"JavaScript",server:"Node.js"},priority:30,intelligence:"high"},"redwood.toml":{frameworks:["RedwoodJS"],slots:{framework:"RedwoodJS",buildTool:"Webpack",mainLanguage:"JavaScript/TypeScript",server:"Node.js",database:"Prisma"},priority:30,intelligence:"high"},"blitz.config.ts":{frameworks:["Blitz.js"],slots:{framework:"Blitz.js",buildTool:"Next.js",mainLanguage:"TypeScript",server:"Node.js",database:"Prisma"},priority:30,intelligence:"high"},"qwik.config.ts":{frameworks:["Qwik"],slots:{framework:"Qwik",buildTool:"Vite",mainLanguage:"TypeScript",server:"Node.js"},priority:30,intelligence:"high"},"manage.py":{frameworks:["Django"],slots:{framework:"Django",backend:"Django",mainLanguage:"Python",server:"Django",apiType:"Django Views"},priority:30,intelligence:"high"},artisan:{frameworks:["Laravel"],slots:{framework:"Laravel",backend:"Laravel",mainLanguage:"PHP",server:"PHP",apiType:"Laravel Routes"},priority:30,intelligence:"high"},"mix.exs":{frameworks:["Phoenix","Elixir"],slots:{framework:"Phoenix",backend:"Phoenix",mainLanguage:"Elixir",server:"BEAM"},priority:30,intelligence:"high"},"nest-cli.json":{frameworks:["NestJS"],slots:{framework:"NestJS",backend:"NestJS",mainLanguage:"TypeScript",server:"Node.js",apiType:"REST API"},priority:30,intelligence:"high"},"strapi.config.js":{frameworks:["Strapi"],slots:{backend:"Strapi",apiType:"REST API",database:"Required",server:"Node.js"},priority:30,intelligence:"high"},Dockerfile:{frameworks:["Docker"],slots:{hosting:"Docker",connection:"Containerized"},priority:30,intelligence:"high"},"docker-compose.yml":{frameworks:["Docker Compose"],slots:{hosting:"Docker",connection:"Multi-container"},priority:30,intelligence:"high"},"docker-compose.yaml":{frameworks:["Docker Compose"],slots:{hosting:"Docker",connection:"Multi-container"},priority:30,intelligence:"high"},"kubernetes.yml":{frameworks:["Kubernetes"],slots:{hosting:"Kubernetes",connection:"Orchestrated"},priority:30,intelligence:"high"},"k8s.yaml":{frameworks:["Kubernetes"],slots:{hosting:"Kubernetes",connection:"Orchestrated"},priority:30,intelligence:"high"},"vercel.json":{frameworks:["Vercel"],slots:{hosting:"Vercel",cicd:"Vercel"},priority:30,intelligence:"high"},"netlify.toml":{frameworks:["Netlify"],slots:{hosting:"Netlify",cicd:"Netlify"},priority:30,intelligence:"high"},"render.yaml":{frameworks:["Render"],slots:{hosting:"Render",cicd:"Render"},priority:30,intelligence:"high"},"fly.toml":{frameworks:["Fly.io"],slots:{hosting:"Fly.io",cicd:"Fly.io"},priority:30,intelligence:"high"},"railway.json":{frameworks:["Railway"],slots:{hosting:"Railway",cicd:"Railway"},priority:30,intelligence:"high"},"railway.toml":{frameworks:["Railway"],slots:{hosting:"Railway",cicd:"Railway"},priority:30,intelligence:"high"},"app.yaml":{frameworks:["Google App Engine"],slots:{hosting:"Google Cloud",cicd:"Google Cloud"},priority:30,intelligence:"high"},Procfile:{frameworks:["Heroku"],slots:{hosting:"Heroku",cicd:"Heroku"},priority:30,intelligence:"high"},"vite.config.js":{frameworks:["Vite"],slots:{buildTool:"Vite"},priority:25,intelligence:"medium"},"vite.config.ts":{frameworks:["Vite"],slots:{buildTool:"Vite",mainLanguage:"TypeScript"},priority:25,intelligence:"medium"},"webpack.config.js":{frameworks:["Webpack"],slots:{buildTool:"Webpack"},priority:25,intelligence:"medium"},"rollup.config.js":{frameworks:["Rollup"],slots:{buildTool:"Rollup"},priority:25,intelligence:"medium"},"esbuild.config.js":{frameworks:["esbuild"],slots:{buildTool:"esbuild"},priority:25,intelligence:"medium"},"parcel.config.js":{frameworks:["Parcel"],slots:{buildTool:"Parcel"},priority:25,intelligence:"medium"},"snowpack.config.js":{frameworks:["Snowpack"],slots:{buildTool:"Snowpack"},priority:25,intelligence:"medium"},"tsconfig.json":{frameworks:["TypeScript"],slots:{mainLanguage:"TypeScript"},priority:25,intelligence:"medium"},"jsconfig.json":{frameworks:["JavaScript"],slots:{mainLanguage:"JavaScript"},priority:20,intelligence:"medium"},"babel.config.js":{frameworks:["Babel"],slots:{buildTool:"Babel"},priority:20,intelligence:"medium"},".babelrc":{frameworks:["Babel"],slots:{buildTool:"Babel"},priority:20,intelligence:"medium"},"jest.config.js":{frameworks:["Jest"],slots:{cicd:"Jest"},priority:25,intelligence:"medium"},"jest.config.ts":{frameworks:["Jest"],slots:{cicd:"Jest",mainLanguage:"TypeScript"},priority:25,intelligence:"medium"},"vitest.config.ts":{frameworks:["Vitest"],slots:{cicd:"Vitest",mainLanguage:"TypeScript"},priority:25,intelligence:"medium"},"cypress.config.js":{frameworks:["Cypress"],slots:{cicd:"Cypress"},priority:25,intelligence:"medium"},"playwright.config.ts":{frameworks:["Playwright"],slots:{cicd:"Playwright",mainLanguage:"TypeScript"},priority:25,intelligence:"medium"},"karma.conf.js":{frameworks:["Karma"],slots:{cicd:"Karma"},priority:20,intelligence:"medium"},"mocha.opts":{frameworks:["Mocha"],slots:{cicd:"Mocha"},priority:20,intelligence:"medium"},".rspec":{frameworks:["RSpec"],slots:{cicd:"RSpec",mainLanguage:"Ruby"},priority:25,intelligence:"medium"},"pytest.ini":{frameworks:["Pytest"],slots:{cicd:"Pytest",mainLanguage:"Python"},priority:25,intelligence:"medium"},"phpunit.xml":{frameworks:["PHPUnit"],slots:{cicd:"PHPUnit",mainLanguage:"PHP"},priority:25,intelligence:"medium"},"schema.prisma":{frameworks:["Prisma"],slots:{database:"Prisma ORM",connection:"Prisma"},priority:25,intelligence:"medium"},"drizzle.config.ts":{frameworks:["Drizzle"],slots:{database:"Drizzle ORM",connection:"Drizzle",mainLanguage:"TypeScript"},priority:25,intelligence:"medium"},"ormconfig.js":{frameworks:["TypeORM"],slots:{database:"TypeORM",connection:"TypeORM"},priority:25,intelligence:"medium"},"knexfile.js":{frameworks:["Knex.js"],slots:{database:"Knex.js",connection:"Knex.js"},priority:25,intelligence:"medium"},"sequelize.config.js":{frameworks:["Sequelize"],slots:{database:"Sequelize",connection:"Sequelize"},priority:25,intelligence:"medium"},"alembic.ini":{frameworks:["Alembic"],slots:{database:"Alembic",mainLanguage:"Python"},priority:25,intelligence:"medium"},".github/workflows":{frameworks:["GitHub Actions"],slots:{cicd:"GitHub Actions"},priority:25,intelligence:"medium"},".gitlab-ci.yml":{frameworks:["GitLab CI"],slots:{cicd:"GitLab CI"},priority:25,intelligence:"medium"},Jenkinsfile:{frameworks:["Jenkins"],slots:{cicd:"Jenkins"},priority:25,intelligence:"medium"},".circleci/config.yml":{frameworks:["CircleCI"],slots:{cicd:"CircleCI"},priority:25,intelligence:"medium"},".travis.yml":{frameworks:["Travis CI"],slots:{cicd:"Travis CI"},priority:25,intelligence:"medium"},"azure-pipelines.yml":{frameworks:["Azure DevOps"],slots:{cicd:"Azure DevOps"},priority:25,intelligence:"medium"},"bitbucket-pipelines.yml":{frameworks:["Bitbucket Pipelines"],slots:{cicd:"Bitbucket Pipelines"},priority:25,intelligence:"medium"},"tailwind.config.js":{frameworks:["Tailwind CSS"],slots:{cssFramework:"Tailwind CSS"},priority:20,intelligence:"medium"},"tailwind.config.ts":{frameworks:["Tailwind CSS"],slots:{cssFramework:"Tailwind CSS",mainLanguage:"TypeScript"},priority:20,intelligence:"medium"},"postcss.config.js":{frameworks:["PostCSS"],slots:{cssFramework:"PostCSS"},priority:20,intelligence:"medium"},"uno.config.ts":{frameworks:["UnoCSS"],slots:{cssFramework:"UnoCSS",mainLanguage:"TypeScript"},priority:20,intelligence:"medium"},"styled-components.config.js":{frameworks:["styled-components"],slots:{cssFramework:"styled-components",uiLibrary:"styled-components"},priority:20,intelligence:"medium"},"emotion.config.js":{frameworks:["Emotion"],slots:{cssFramework:"Emotion",uiLibrary:"Emotion"},priority:20,intelligence:"medium"},"metro.config.js":{frameworks:["React Native"],slots:{framework:"React Native",mainLanguage:"JavaScript"},priority:25,intelligence:"medium"},"expo.config.js":{frameworks:["Expo"],slots:{framework:"React Native",buildTool:"Expo"},priority:25,intelligence:"medium"},"app.json":{frameworks:["React Native","Expo"],slots:{framework:"React Native"},priority:20,intelligence:"medium",confirmWith:["expo"]},"capacitor.config.ts":{frameworks:["Capacitor"],slots:{framework:"Capacitor",mainLanguage:"TypeScript"},priority:25,intelligence:"medium"},"ionic.config.json":{frameworks:["Ionic"],slots:{framework:"Ionic",uiLibrary:"Ionic"},priority:25,intelligence:"medium"},"nx.json":{frameworks:["Nx"],slots:{buildTool:"Nx"},priority:25,intelligence:"medium"},"turbo.json":{frameworks:["Turborepo"],slots:{buildTool:"Turborepo"},priority:25,intelligence:"medium"},"lerna.json":{frameworks:["Lerna"],slots:{buildTool:"Lerna"},priority:25,intelligence:"medium"},"rush.json":{frameworks:["Rush"],slots:{buildTool:"Rush"},priority:25,intelligence:"medium"},"pnpm-workspace.yaml":{frameworks:["pnpm workspaces"],slots:{packageManager:"pnpm",buildTool:"pnpm workspaces"},priority:25,intelligence:"medium"},"*.svelte":{frameworks:["Svelte","SvelteKit"],slots:{framework:"Svelte"},priority:15,intelligence:"low"},"*.vue":{frameworks:["Vue"],slots:{framework:"Vue"},priority:15,intelligence:"low"},"*.jsx":{frameworks:["React"],slots:{framework:"React",mainLanguage:"JavaScript"},priority:15,intelligence:"low"},"*.ts":{frameworks:["TypeScript"],slots:{mainLanguage:"TypeScript"},priority:15,intelligence:"low"},"*.tsx":{frameworks:["React","TypeScript"],slots:{framework:"React",mainLanguage:"TypeScript"},priority:15,intelligence:"low"},"*.py":{frameworks:["Python"],slots:{mainLanguage:"Python"},priority:15,intelligence:"low"},"*.rb":{frameworks:["Ruby"],slots:{mainLanguage:"Ruby"},priority:15,intelligence:"low"},"*.php":{frameworks:["PHP"],slots:{mainLanguage:"PHP"},priority:15,intelligence:"low"},"*.java":{frameworks:["Java"],slots:{mainLanguage:"Java"},priority:15,intelligence:"low"},"*.kt":{frameworks:["Kotlin"],slots:{mainLanguage:"Kotlin"},priority:15,intelligence:"low"},"*.swift":{frameworks:["Swift"],slots:{mainLanguage:"Swift"},priority:15,intelligence:"low"},"*.go":{frameworks:["Go"],slots:{mainLanguage:"Go"},priority:15,intelligence:"low"},"*.rs":{frameworks:["Rust"],slots:{mainLanguage:"Rust"},priority:15,intelligence:"low"},"*.dart":{frameworks:["Flutter","Dart"],slots:{mainLanguage:"Dart"},priority:15,intelligence:"low"},"*.ex":{frameworks:["Elixir"],slots:{mainLanguage:"Elixir"},priority:15,intelligence:"low"},"*.exs":{frameworks:["Elixir"],slots:{mainLanguage:"Elixir"},priority:15,intelligence:"low"},"*.scala":{frameworks:["Scala"],slots:{mainLanguage:"Scala"},priority:15,intelligence:"low"},"*.clj":{frameworks:["Clojure"],slots:{mainLanguage:"Clojure"},priority:15,intelligence:"low"},"*.lua":{frameworks:["Lua"],slots:{mainLanguage:"Lua"},priority:15,intelligence:"low"},"*.r":{frameworks:["R"],slots:{mainLanguage:"R"},priority:15,intelligence:"low"},"*.R":{frameworks:["R"],slots:{mainLanguage:"R"},priority:15,intelligence:"low"},"*.jl":{frameworks:["Julia"],slots:{mainLanguage:"Julia"},priority:15,intelligence:"low"},"*.nim":{frameworks:["Nim"],slots:{mainLanguage:"Nim"},priority:15,intelligence:"low"},"*.zig":{frameworks:["Zig"],slots:{mainLanguage:"Zig"},priority:15,intelligence:"low"},"build.zig":{frameworks:["Zig"],slots:{packageManager:"Zig Package Manager",mainLanguage:"Zig",buildTool:"zig build",framework:"Zig",build:"zig build"},priority:35,intelligence:"ultra-high"},"openapi.json":{frameworks:["OpenAPI"],slots:{apiType:"REST API",backend:"API Server"},priority:30,intelligence:"high"},"openapi.yaml":{frameworks:["OpenAPI"],slots:{apiType:"REST API",backend:"API Server"},priority:30,intelligence:"high"},"swagger.json":{frameworks:["Swagger"],slots:{apiType:"REST API",backend:"API Server"},priority:30,intelligence:"high"},"graphql.schema":{frameworks:["GraphQL"],slots:{apiType:"GraphQL",backend:"GraphQL Server"},priority:30,intelligence:"high"},"schema.graphql":{frameworks:["GraphQL"],slots:{apiType:"GraphQL",backend:"GraphQL Server"},priority:30,intelligence:"high"},".graphqlconfig":{frameworks:["GraphQL"],slots:{apiType:"GraphQL"},priority:25,intelligence:"medium"},"redux.config.js":{frameworks:["Redux"],slots:{stateManagement:"Redux"},priority:20,intelligence:"medium"},"mobx.config.js":{frameworks:["MobX"],slots:{stateManagement:"MobX"},priority:20,intelligence:"medium"},"vuex.config.js":{frameworks:["Vuex"],slots:{stateManagement:"Vuex",framework:"Vue"},priority:20,intelligence:"medium"},"pinia.config.js":{frameworks:["Pinia"],slots:{stateManagement:"Pinia",framework:"Vue"},priority:20,intelligence:"medium"},"zustand.config.js":{frameworks:["Zustand"],slots:{stateManagement:"Zustand"},priority:20,intelligence:"medium"},".eslintrc.js":{frameworks:["ESLint"],slots:{},priority:15,intelligence:"low"},".eslintrc.json":{frameworks:["ESLint"],slots:{},priority:15,intelligence:"low"},".prettierrc":{frameworks:["Prettier"],slots:{},priority:15,intelligence:"low"},".prettierrc.json":{frameworks:["Prettier"],slots:{},priority:15,intelligence:"low"},"biome.json":{frameworks:["Biome"],slots:{},priority:15,intelligence:"low"},".editorconfig":{frameworks:["EditorConfig"],slots:{},priority:10,intelligence:"low"},"serverless.yml":{frameworks:["Serverless Framework"],slots:{hosting:"AWS Lambda/Azure/GCP",backend:"Serverless",apiType:"API Gateway"},priority:30,intelligence:"high"},"serverless.yaml":{frameworks:["Serverless Framework"],slots:{hosting:"AWS Lambda/Azure/GCP",backend:"Serverless",apiType:"API Gateway"},priority:30,intelligence:"high"},"sam.yaml":{frameworks:["AWS SAM"],slots:{hosting:"AWS Lambda",backend:"AWS SAM",cicd:"AWS SAM CLI"},priority:30,intelligence:"high"},"template.yaml":{frameworks:["AWS SAM","CloudFormation"],slots:{hosting:"AWS",backend:"AWS SAM/CloudFormation",cicd:"AWS"},priority:25,intelligence:"medium",confirmWith:["samconfig.toml"]},"amplify.yml":{frameworks:["AWS Amplify"],slots:{hosting:"AWS Amplify",backend:"AWS Amplify",cicd:"AWS Amplify"},priority:30,intelligence:"high"},Podfile:{frameworks:["CocoaPods","iOS"],slots:{packageManager:"CocoaPods",mainLanguage:"Swift/Objective-C",framework:"iOS Native"},priority:30,intelligence:"high"},"build.gradle.kts":{frameworks:["Gradle Kotlin DSL","Android","Kotlin"],slots:{packageManager:"Gradle",mainLanguage:"Kotlin",buildTool:"Gradle Kotlin DSL",framework:"Android"},priority:30,intelligence:"high"},"*.ipynb":{frameworks:["Jupyter","Python"],slots:{mainLanguage:"Python",framework:"Jupyter Notebook"},priority:30,intelligence:"high"},MLproject:{frameworks:["MLflow"],slots:{mainLanguage:"Python",framework:"MLflow",backend:"MLflow",cicd:"MLflow"},priority:30,intelligence:"high"},"dvc.yaml":{frameworks:["DVC","Data Version Control"],slots:{mainLanguage:"Python",framework:"DVC",cicd:"DVC Pipelines"},priority:30,intelligence:"high"},"dvc.lock":{frameworks:["DVC"],slots:{framework:"DVC"},priority:20,intelligence:"medium"},"wrangler.toml":{frameworks:["Cloudflare Workers","Cloudflare"],slots:{hosting:"Cloudflare Workers",backend:"Cloudflare Workers",runtime:"V8 Isolates"},priority:30,intelligence:"high"},"deno.json":{frameworks:["Deno"],slots:{runtime:"Deno",mainLanguage:"TypeScript",packageManager:"Deno"},priority:30,intelligence:"high"},"bun.lockb":{frameworks:["Bun"],slots:{runtime:"Bun",packageManager:"Bun",mainLanguage:"TypeScript/JavaScript"},priority:30,intelligence:"high"},"codecov.yml":{frameworks:["Codecov"],slots:{cicd:"Codecov"},priority:25,intelligence:"high"},"dependabot.yml":{frameworks:["Dependabot","GitHub"],slots:{cicd:"Dependabot"},priority:25,intelligence:"high"},"renovate.json":{frameworks:["Renovate"],slots:{cicd:"Renovate"},priority:25,intelligence:"high"},Makefile:{frameworks:["Make","GNU Make"],slots:{buildTool:"Make"},priority:30,intelligence:"high"},"CMakeLists.txt":{frameworks:["CMake","C","C++"],slots:{buildTool:"CMake",mainLanguage:"C/C++"},priority:30,intelligence:"high"},"meson.build":{frameworks:["Meson","C","C++"],slots:{buildTool:"Meson",mainLanguage:"C/C++"},priority:30,intelligence:"high"},"*.c":{frameworks:["C"],slots:{mainLanguage:"C"},priority:30,intelligence:"high"},"*.cpp":{frameworks:["C++"],slots:{mainLanguage:"C++"},priority:30,intelligence:"high"},"*.cc":{frameworks:["C++"],slots:{mainLanguage:"C++"},priority:30,intelligence:"high"},"*.cxx":{frameworks:["C++"],slots:{mainLanguage:"C++"},priority:25,intelligence:"high"},"*.h":{frameworks:["C","C++"],slots:{mainLanguage:"C/C++"},priority:25,intelligence:"high"},"*.hpp":{frameworks:["C++"],slots:{mainLanguage:"C++"},priority:25,intelligence:"high"},"*.hxx":{frameworks:["C++"],slots:{mainLanguage:"C++"},priority:20,intelligence:"medium"},".env":{frameworks:[],slots:{},priority:20,intelligence:"medium"},".env.example":{frameworks:[],slots:{},priority:25,intelligence:"high"},".env.local":{frameworks:[],slots:{},priority:20,intelligence:"medium"},".env.development":{frameworks:[],slots:{},priority:20,intelligence:"medium"},".env.production":{frameworks:[],slots:{},priority:20,intelligence:"medium"},"skaffold.yaml":{frameworks:["Skaffold","Kubernetes"],slots:{hosting:"Kubernetes",cicd:"Skaffold"},priority:30,intelligence:"high"},"Chart.yaml":{frameworks:["Helm","Kubernetes"],slots:{hosting:"Kubernetes",backend:"Helm"},priority:30,intelligence:"high"},"values.yaml":{frameworks:["Helm","Kubernetes"],slots:{hosting:"Kubernetes"},priority:25,intelligence:"high",confirmWith:["Chart.yaml"]},"pulumi.yaml":{frameworks:["Pulumi"],slots:{hosting:"Cloud",cicd:"Pulumi"},priority:30,intelligence:"high"},"Pulumi.yaml":{frameworks:["Pulumi"],slots:{hosting:"Cloud",cicd:"Pulumi"},priority:30,intelligence:"high"},"terragrunt.hcl":{frameworks:["Terragrunt","Terraform"],slots:{hosting:"Cloud",cicd:"Terragrunt"},priority:30,intelligence:"high"},"ansible.yml":{frameworks:["Ansible"],slots:{cicd:"Ansible"},priority:30,intelligence:"high"},"playbook.yml":{frameworks:["Ansible"],slots:{cicd:"Ansible"},priority:25,intelligence:"high"},"*.cs":{frameworks:["C#",".NET","Unity"],slots:{mainLanguage:"C#"},priority:30,intelligence:"high"},"*.m":{frameworks:["Objective-C","iOS"],slots:{mainLanguage:"Objective-C"},priority:25,intelligence:"high"},".nvmrc":{frameworks:["Node.js","nvm"],slots:{runtime:"Node.js"},priority:25,intelligence:"high"},".tool-versions":{frameworks:["asdf"],slots:{},priority:25,intelligence:"high"},".ruby-version":{frameworks:["Ruby","rbenv"],slots:{mainLanguage:"Ruby",runtime:"Ruby"},priority:25,intelligence:"high"},".python-version":{frameworks:["Python","pyenv"],slots:{mainLanguage:"Python",runtime:"Python"},priority:25,intelligence:"high"},".dockerignore":{frameworks:["Docker"],slots:{},priority:20,intelligence:"medium"},".gitattributes":{frameworks:["Git"],slots:{},priority:15,intelligence:"low"},".npmrc":{frameworks:["npm","Node.js"],slots:{packageManager:"npm"},priority:20,intelligence:"medium"},"sonar-project.properties":{frameworks:["SonarQube","SonarCloud"],slots:{cicd:"SonarQube"},priority:25,intelligence:"high"},"*.fs":{frameworks:["F#",".NET"],slots:{mainLanguage:"F#"},priority:25,intelligence:"high"},"*.mm":{frameworks:["Objective-C++","iOS","macOS"],slots:{mainLanguage:"Objective-C++"},priority:25,intelligence:"high"},"build.zig.zon":{frameworks:["Zig"],slots:{mainLanguage:"Zig",packageManager:"Zig Package Manager",buildTool:"zig build"},priority:35,intelligence:"ultra-high"},"gleam.toml":{frameworks:["Gleam","BEAM","Erlang"],slots:{mainLanguage:"Gleam",runtime:"BEAM",packageManager:"Gleam"},priority:30,intelligence:"high"},"bunfig.toml":{frameworks:["Bun"],slots:{runtime:"Bun",packageManager:"Bun",buildTool:"Bun"},priority:30,intelligence:"high"},"mise.toml":{frameworks:["mise"],slots:{},priority:25,intelligence:"high"},".mise.toml":{frameworks:["mise"],slots:{},priority:25,intelligence:"high"},"manifest.toml":{frameworks:["Flox","Nix"],slots:{},priority:25,intelligence:"high",confirmWith:[".flox"]},justfile:{frameworks:["Just"],slots:{buildTool:"Just"},priority:25,intelligence:"high"},".pre-commit-config.yaml":{frameworks:["pre-commit"],slots:{cicd:"pre-commit"},priority:25,intelligence:"high"},"CLAUDE.md":{frameworks:["Claude Code"],slots:{},priority:30,intelligence:"high",confirmWith:[".claude"]}};import{existsSync as n9,readFileSync as SH,readdirSync as EH}from"fs";import{join as a2}from"path";var k0={version:2,_doc:"SINGLE SOURCE of Dart/Flutter detection KNOWLEDGE (A+B hybrid, the Truth-is-faf-cli spec). faf-cli imports this directly; faf-python-sdk vendors a synced copy (phase 2); MCPs compose it. Bolster Dart/Flutter by editing THIS file. Logic stays in dart.ts. Refreshed 2026-08-01 (knowledge v2) — community receipt on top of 6.13.0 Dart Edition.",flutterDeps:["flutter"],mcpDeps:["dart_mcp","mcp_server","mcp_dart","dart_mcp_server","mcp","dart_mcpserver"],serverFrameworks:[["serverpod","Serverpod"],["dart_frog","Dart Frog"],["conduit","Conduit"],["angel3_framework","Angel3"],["alfred","Alfred"],["shelf","Shelf"],["jaspr","Jaspr"],["relic","Relic"]],stateManagement:[["flutter_riverpod","Riverpod"],["hooks_riverpod","Riverpod"],["riverpod_annotation","Riverpod"],["riverpod","Riverpod"],["flutter_bloc","Bloc"],["bloc","Bloc"],["provider","Provider"],["get","GetX"],["flutter_mobx","MobX"],["mobx","MobX"],["signals","Signals"],["flutter_hooks","Hooks"]],routing:[["go_router","go_router"],["auto_route","auto_route"],["beamer","Beamer"],["routemaster","Routemaster"]]};var gH=k0.flutterDeps,fH=k0.mcpDeps,yH=k0.serverFrameworks,hH=k0.stateManagement,xH=k0.routing;function uH($){let Z=new Set,z=!1;for(let X of $.split(`
215
+ `)){if(/^(dependencies|dev_dependencies|dependency_overrides):\s*$/.test(X)){z=!0;continue}if(/^\S/.test(X))z=!1;if(z){let U=X.match(/^\s{2}([a-zA-Z0-9_]+):/);if(U)Z.add(U[1].toLowerCase())}}return Z}function I1($){let Z=a2($,"pubspec.yaml");if(!n9(Z))return null;let z;try{z=SH(Z,"utf-8")}catch{return null}let X=uH(z),U=(K)=>X.has(K.toLowerCase()),Q=gH.some(U)||/^flutter:\s*$/m.test(z)||/\bsdk:\s*flutter\b/.test(z),J=fH.find(U),H=yH.find(([K])=>U(K)),G=hH.find(([K])=>U(K)),_=G?G[1]:"",B=xH.find(([K])=>U(K)),Y=B?B[1]:"",q=U("flutter_test")?"flutter_test":U("test")?"test":"",W=/^executables:\s*$/m.test(z),I=!1;try{I=EH(a2($,"bin")).some((K)=>K.endsWith(".dart"))}catch{}let V=W||I,O,L="",R;if(Q)if(L="Flutter",n9(a2($,"lib","main.dart"))||/^publish_to:\s*['"]?none\b/m.test(z))O="mobile",R="pubspec.yaml (Flutter app)";else O="library",R="pubspec.yaml (Flutter package)";else if(J)O="mcp",R=`pubspec.yaml + ${J} (Dart MCP server)`;else if(H)O="backend",L=H[1],R=`pubspec.yaml + ${H[0]} (Dart backend)`;else if(V)O="cli",R=W?"pubspec.yaml executables: (Dart CLI)":"pubspec.yaml + bin/*.dart (Dart CLI)";else O="library",R="pubspec.yaml (Dart package)";return{appType:O,isFlutter:Q,framework:L,stateManagement:_,routing:Y,testing:q,found:R}}import{existsSync as r2,readFileSync as e9,readdirSync as o9,statSync as vH}from"fs";import{join as D1}from"path";var L1={version:1,_doc:"SINGLE SOURCE of Go detection KNOWLEDGE (A+B hybrid, Truth-is-faf-cli). faf-cli imports this directly; SDKs/MCPs compose it. Bolster Go by editing THIS file. Logic stays in go.ts. Content-aware: go.mod ≠ one bucket — backend · CLI · MCP · library. 2026-08-01 initial (Dart composition pattern).",mcpModules:["github.com/mark3labs/mcp-go","github.com/modelcontextprotocol/go-sdk","github.com/metoro-io/mcp-golang","github.com/ThinkInAIXYZ/go-mcp"],serverFrameworks:[["github.com/gin-gonic/gin","Gin"],["github.com/labstack/echo","Echo"],["github.com/labstack/echo/v4","Echo"],["github.com/gofiber/fiber","Fiber"],["github.com/gofiber/fiber/v2","Fiber"],["github.com/go-chi/chi","Chi"],["github.com/go-chi/chi/v5","Chi"],["github.com/gorilla/mux","Gorilla Mux"],["github.com/gofiber/fiber/v3","Fiber"],["google.golang.org/grpc","gRPC"],["connectrpc.com/connect","Connect"],["github.com/go-kratos/kratos","Kratos"],["github.com/go-kratos/kratos/v2","Kratos"],["github.com/zeromicro/go-zero","go-zero"],["github.com/cloudwego/hertz","Hertz"]],cliFrameworks:[["github.com/spf13/cobra","Cobra"],["github.com/urfave/cli","urfave/cli"],["github.com/urfave/cli/v2","urfave/cli"],["github.com/alecthomas/kingpin","Kingpin"],["github.com/alecthomas/kong","Kong"]]};var mH=L1.mcpModules,pH=L1.serverFrameworks,lH=L1.cliFrameworks;function dH($){let Z=new Set,z=!1;for(let X of $.split(`
216
+ `)){let U=X.replace(/\/\/.*$/,"").trim();if(!U)continue;if(/^require\s*\(\s*$/.test(U)){z=!0;continue}if(z){if(U===")"){z=!1;continue}let J=U.match(/^(\S+)/);if(J)Z.add(J[1].toLowerCase());continue}let Q=U.match(/^require\s+(\S+)/);if(Q&&Q[1]!=="(")Z.add(Q[1].toLowerCase())}return Z}function $6($,Z){let z=Z.toLowerCase();for(let X of $)if(X===z||X.startsWith(`${z}/`))return!0;return!1}function t9($,Z){let z;for(let X of Z){if(!$6($,X[0]))continue;if(!z||X[0].length>z[0].length)z=X}return z}function cH($,Z){let z;for(let X of Z){if(!$6($,X))continue;if(!z||X.length>z.length)z=X}return z}function iH($){let Z=$.match(/^module\s+(\S+)/m);return Z?Z[1]:""}function sH($){let Z=D1($,"cmd");if(!r2(Z))return!1;try{for(let z of o9(Z)){let X=D1(Z,z);try{if(vH(X).isDirectory()){if(o9(X).some((Q)=>Q.endsWith(".go")))return!0}else if(z.endsWith(".go"))return!0}catch{}}}catch{}return!1}function aH($){let Z=D1($,"main.go");if(!r2(Z))return!1;try{let z=e9(Z,"utf-8");return/^package\s+main\b/m.test(z)}catch{return!1}}function R1($){let Z=D1($,"go.mod");if(!r2(Z))return null;let z;try{z=e9(Z,"utf-8")}catch{return null}let X=iH(z),U=dH(z),Q=cH(U,mH),J=t9(U,pH),H=t9(U,lH),G=sH($),_=aH($),B,Y="",q;if(Q)B="mcp",q=`go.mod + ${Q} (Go MCP server)`;else if(J)B="backend",Y=J[1],q=`go.mod + ${J[0]} (Go backend)`;else if(H)B="cli",Y=H[1],q=`go.mod + ${H[0]} (Go CLI)`;else if(G)B="cli",q="go.mod + cmd/ (Go CLI layout)";else if(_&&!J)B="cli",q="go.mod + main.go package main (Go CLI)";else B="library",q="go.mod (Go module)";return{appType:B,modulePath:X,framework:Y,found:q}}var $G=new Set(["node_modules",".git","dist","build","venv",".venv","__pycache__","target","coverage",".next",".svelte-kit","vendor"]),ZG=new Set([".py",".ts",".tsx",".js",".jsx",".svelte",".vue",".rb",".go",".rs",".php",".java",".kt",".swift"]),zG={mainLanguage:["project","main_language"],main_language:["project","main_language"],framework:["stack","frontend"],cssFramework:["stack","css_framework"],css:["stack","css_framework"],uiLibrary:["stack","ui_library"],ui_library:["stack","ui_library"],stateManagement:["stack","state_management"],state:["stack","state_management"],backend:["stack","backend"],apiType:["stack","api_type"],api:["stack","api_type"],runtime:["stack","runtime"],database:["stack","database"],db:["stack","database"],connection:["stack","connection"],hosting:["stack","hosting"],buildTool:["stack","build"],build_tool:["stack","build"],build:["stack","build"],packageManager:["stack","package_manager"],pkg_manager:["stack","package_manager"],cicd:["stack","cicd"]},XG=[["packageManager","package-manager"],["pkg_manager","package-manager"],["mainLanguage","language"],["main_language","language"],["framework","framework"],["backend","backend"],["database","database"],["db","database"],["cicd","ci-cd"],["hosting","hosting"],["buildTool","build"],["build_tool","build"],["build","build"],["runtime","runtime"],["cssFramework","css"],["css","css"],["uiLibrary","ui-library"],["stateManagement","state-management"],["apiType","api"],["api","api"]];function UG($,Z){for(let[z,X]of XG)if(z in $)return X;return Z.length>0?"framework":"config"}function QG($){try{let Z=JSON.parse(nH($,"utf-8")),z=["background","content_scripts","action","browser_action","permissions"].some((X)=>(X in Z));if(typeof Z.manifest_version==="number"&&z)return"chrome";return"other"}catch{return"other"}}function JG($){let Z=[],z=eH($),X=rH(n2($,".git"));for(let U=0;U<10;U++){let Q;try{Q=Z6(z)}catch{break}for(let H of Q){let G=s2[H];if(!G)continue;if(H==="manifest.json"&&QG(n2(z,H))!=="chrome")continue;if(H==="pubspec.yaml"){let _=I1(z);if(_){let B={mainLanguage:"Dart",packageManager:"pub"};if(_.isFlutter){if(B.framework="Flutter",_.stateManagement)B.stateManagement=_.stateManagement}else if(_.appType==="backend"&&_.framework)B.backend=_.framework;else if(_.appType==="mcp")B.apiType="MCP";Z.push({slots:B,priority:G.priority,frameworks:_.isFlutter?["Flutter","Dart"]:["Dart"],fileName:H});continue}}if(H==="go.mod"){let _=R1(z);if(_){let B={mainLanguage:"Go",packageManager:"go modules",buildTool:"go build"};if(_.appType==="backend"&&_.framework)B.backend=_.framework;else if(_.appType==="cli"&&_.framework)B.framework=_.framework;else if(_.appType==="mcp")B.apiType="MCP";let Y=_.framework?[_.framework,"Go"]:["Go"];Z.push({slots:B,priority:G.priority,frameworks:Y,fileName:H});continue}}Z.push({slots:G.slots||{},priority:G.priority,frameworks:G.frameworks,fileName:H})}if(X&&U===0)break;let J=oH(z);if(J===z)break;z=J}return Z}function HG($){let Z=[];for(let z of X6($,2,{count:0})){let X=s2[`*${z}`],U=X?.slots?.mainLanguage;if(U)Z.push({slots:{mainLanguage:U},priority:X.priority,frameworks:X.frameworks})}return Z}function z6($){let Z=[...JG($),...HG($)],z={},X={},U=new Set;for(let _ of Z){_.frameworks.forEach((B)=>U.add(B));for(let[B,Y]of Object.entries(_.slots))if(Y&&!Y.includes("/")&&(!(B in z)||_.priority>X[B]))z[B]=Y,X[B]=_.priority}let Q=new Map;for(let _ of Z){if(!_.fileName)continue;if(!Q.has(_.fileName))Q.set(_.fileName,{fileName:_.fileName,category:UG(_.slots,_.frameworks),priority:_.priority})}let J=[...Q.values()].sort((_,B)=>B.priority-_.priority||_.fileName.localeCompare(B.fileName)),H=[];if(z.mainLanguage)H.push(z.mainLanguage.toLowerCase());if(z.framework)H.push(z.framework.toLowerCase());let G=H.length>0?H.join("-"):"unknown-stack";return{slotFills:z,frameworks:[...U],confirmedCount:Z.length,discoveredFormats:J,stackSignature:G}}function o2($){let{slotFills:Z}=z6($),z={};for(let[X,U]of Object.entries(Z)){let Q=zG[X];if(!Q||!U)continue;let[J,H]=Q;if(J==="project")(z.project??={})[H]=U;else(z.stack??={})[H]=U}return z}function X6($,Z,z){let X=new Set;if(Z<0||z.count>400)return X;let U;try{U=Z6($,{withFileTypes:!0})}catch{return X}for(let Q of U){if(z.count++>400)break;if(!Q.isDirectory()){let J=tH(Q.name);if(ZG.has(J))X.add(J);continue}if($G.has(Q.name)||Q.name.startsWith("."))continue;for(let J of X6(n2($,Q.name),Z-1,z))X.add(J)}return X}import{existsSync as U6,readFileSync as Q6}from"fs";import{join as J6}from"path";var h=($,Z,z)=>({value:$,source:Z,confidence:z});function H6($){let Z=GG($),z=_G($),X={},U=(Q,J)=>{if(J)X[Q]=J};return U("what",YG(Z,z)),U("who",qG(z)),U("why",BG(z)),U("where",VG(Z,z)),U("when",OG(z)),U("how",WG(Z,z)),X}function t2($){let Z=H6($),z={};return Object.keys(Z).forEach((X)=>{let U=Z[X];if(U)z[X]=U.value}),z}function GG($){let Z=J6($,"package.json");if(!U6(Z))return null;try{return JSON.parse(Q6(Z,"utf-8"))}catch{return null}}function _G($){let Z=J6($,"README.md");if(!U6(Z))return"";let z;try{z=Q6(Z,"utf-8")}catch{return""}return z.split(`
217
+ `).filter((X)=>!/^\s*\[!\[/.test(X)&&!/^\s*!\[/.test(X)).join(`
218
+ `).replace(/<[^>]+>/g,"").replace(/!\[[^\]]*\]\([^)]*\)/g,"").trim()}function R0($){return $.replace(/\s+/g," ").replace(/[#*`>]/g,"").trim().slice(0,280)}function v0($,Z){let z=new RegExp(`##?\\s+(${Z})\\s*\\n+([\\s\\S]+?)(?:\\n\\n|\\n##?|$)`,"i"),X=$.match(z);return X&&X[2]&&X[2].trim().length>20?{body:R0(X[2]),heading:X[1].trim()}:null}function R$($,Z,z=30){for(let X of Z){let U=$.match(X);if(U&&U[1]&&U[1].trim().length>=z)return R0(U[1])}return null}function YG($,Z){if($?.description&&$.description.length>20)return h(R0($.description),"package.json:description",0.95);let z=v0(Z,"Purpose|What|About|Overview|Description");if(z)return h(z.body,`README:## ${z.heading}`,0.8);let X=Z.split(/\n\s*\n/).map((Q)=>Q.trim()).find((Q)=>Q.length>30&&!Q.startsWith("#"));if(X)return h(R0(X),"README:first-paragraph",0.5);let U=R$(Z,[/(?:core|main|primary)\s+(?:problem|challenge)(?:\s+is)?\s*:?\s*([^.\n]{30,})/i,/solves?\s+(?:the\s+)?(?:problem\s+of\s+)?([^.\n]{30,})/i]);return U?h(U,"README:problem-heuristic",0.6):null}function qG($){let Z=v0($,"Audience|Who|Who is this for|Who it.s for");if(Z)return h(Z.body,`README:## ${Z.heading}`,0.8);let z=R$($,[/\b(?:designed|built|made)\s+for\s+((?:[a-z][a-z-]*\s+)?(?:developers?|teams?|engineers?|builders?|founders?)[^.\n]{0,80})/i,/\bfor\s+((?:[a-z][a-z-]*\s+)?(?:developers?|teams?|engineers?|builders?|founders?)[^.\n]{0,80})/i],8);return z?h(z,"README:audience-heuristic",0.6):null}function BG($){let Z=v0($,"Why|Mission|Motivation|Rationale|Vision");if(Z)return h(Z.body,`README:## ${Z.heading}`,0.8);let z=R$($,[/(?:our\s+|the\s+)?(?:mission|purpose|goal)\s+is\s+([^.\n]{30,})/i,/\b(?:mission|purpose|goal)\s*:\s*([^.\n]{30,})/i,/(?:built|created|designed)\s+(?:because|to)\s+([^.\n]{30,})/i]);return z?h(z,"README:mission-heuristic",0.6):null}function VG($,Z){let z=typeof $?.repository==="string"?$.repository:$?.repository?.url;if(z)return h(R0(z.replace(/^git\+/,"").replace(/\.git$/,"")),"package.json:repository",0.95);if($?.homepage)return h(R0($.homepage),"package.json:homepage",0.9);let X=R$(Z,[/\b(?:deployed|hosted|available|published)\s+(?:on|at|via)\s+([^.\n]{3,80})/i],3);return X?h(X,"README:deploy-heuristic",0.6):null}function OG($){let Z=v0($,"Timeline|Status|Release|Roadmap");if(Z)return h(Z.body,`README:## ${Z.heading}`,0.8);let z=R$($,[/\b(production\s+since\s+[^.\n]{4,60})/i,/\b((?:in\s+)?(?:production|beta|alpha|development)\s+since\s+[^.\n]{4,60})/i,/\bsince\s+((?:[A-Z][a-z]+\s+)?\d{4}[^.\n]{0,40})/],4);return z?h(z,"README:since-heuristic",0.6):null}function WG($,Z){let z=$?.scripts?Object.keys($.scripts):[],X=["start","dev","build"].filter((J)=>z.includes(J));if(X.length)return h(R0(X.map((J)=>`npm run ${J}`).join(", ")),"package.json:scripts",0.9);let U=v0(Z,"Usage|Getting Started|Install|Installation|Quick Start");if(U)return h(U.body,`README:## ${U.heading}`,0.8);let Q=v0(Z,"Architecture|Approach|How it works|Methodology|How");return Q?h(Q.body,`README:## ${Q.heading}`,0.7):null}var G6="3.0";import{existsSync as M,readFileSync as t,readdirSync as Y6}from"fs";import{join as F}from"path";var _6=[{name:"Next.js",slug:"nextjs",category:"frontend",signals:[{type:"dependency",key:"next"},{type:"file",pattern:"next.config.*"}]},{name:"React",slug:"react",category:"frontend",signals:[{type:"dependency",key:"react"}]},{name:"SvelteKit",slug:"sveltekit",category:"frontend",signals:[{type:"dependency",key:"@sveltejs/kit"},{type:"file",pattern:"svelte.config.*"}]},{name:"Svelte",slug:"svelte",category:"frontend",signals:[{type:"dependency",key:"svelte"},{type:"devDependency",key:"svelte"}]},{name:"Vue.js",slug:"vue",category:"frontend",signals:[{type:"dependency",key:"vue"}]},{name:"Nuxt",slug:"nuxt",category:"frontend",signals:[{type:"dependency",key:"nuxt"},{type:"file",pattern:"nuxt.config.*"}]},{name:"Angular",slug:"angular",category:"frontend",signals:[{type:"dependency",key:"@angular/core"},{type:"file",pattern:"angular.json"}]},{name:"Astro",slug:"astro",category:"frontend",signals:[{type:"dependency",key:"astro"},{type:"file",pattern:"astro.config.*"}]},{name:"Solid",slug:"solid",category:"frontend",signals:[{type:"dependency",key:"solid-js"}]},{name:"Remix",slug:"remix",category:"frontend",signals:[{type:"dependency",key:"@remix-run/react"}]},{name:"Gatsby",slug:"gatsby",category:"frontend",signals:[{type:"dependency",key:"gatsby"},{type:"file",pattern:"gatsby-config.*"}]},{name:"Qwik",slug:"qwik",category:"frontend",signals:[{type:"dependency",key:"@builder.io/qwik"}]},{name:"Vercel (SvelteKit)",slug:"adapter-vercel",category:"hosting",signals:[{type:"dependency",key:"@sveltejs/adapter-vercel"},{type:"devDependency",key:"@sveltejs/adapter-vercel"}]},{name:"Node (SvelteKit)",slug:"adapter-node",category:"hosting",signals:[{type:"dependency",key:"@sveltejs/adapter-node"},{type:"devDependency",key:"@sveltejs/adapter-node"}]},{name:"Static (SvelteKit)",slug:"adapter-static",category:"hosting",signals:[{type:"dependency",key:"@sveltejs/adapter-static"},{type:"devDependency",key:"@sveltejs/adapter-static"}]},{name:"Cloudflare (SvelteKit)",slug:"adapter-cloudflare",category:"hosting",signals:[{type:"dependency",key:"@sveltejs/adapter-cloudflare"},{type:"devDependency",key:"@sveltejs/adapter-cloudflare"}]},{name:"Netlify (SvelteKit)",slug:"adapter-netlify",category:"hosting",signals:[{type:"dependency",key:"@sveltejs/adapter-netlify"},{type:"devDependency",key:"@sveltejs/adapter-netlify"}]},{name:"Tailwind CSS",slug:"tailwind",category:"css",signals:[{type:"dependency",key:"tailwindcss"},{type:"devDependency",key:"tailwindcss"},{type:"file",pattern:"tailwind.config.*"}]},{name:"Bootstrap",slug:"bootstrap",category:"css",signals:[{type:"dependency",key:"bootstrap"}]},{name:"Styled Components",slug:"styled-components",category:"css",signals:[{type:"dependency",key:"styled-components"}]},{name:"shadcn/ui",slug:"shadcn",category:"ui",signals:[{type:"file",pattern:"components.json"},{type:"dependency",key:"@radix-ui/react-dialog"}]},{name:"Material UI",slug:"mui",category:"ui",signals:[{type:"dependency",key:"@mui/material"}]},{name:"Chakra UI",slug:"chakra",category:"ui",signals:[{type:"dependency",key:"@chakra-ui/react"}]},{name:"Ant Design",slug:"antd",category:"ui",signals:[{type:"dependency",key:"antd"}]},{name:"Redux",slug:"redux",category:"state",signals:[{type:"dependency",key:"@reduxjs/toolkit"}]},{name:"Zustand",slug:"zustand",category:"state",signals:[{type:"dependency",key:"zustand"}]},{name:"Jotai",slug:"jotai",category:"state",signals:[{type:"dependency",key:"jotai"}]},{name:"Pinia",slug:"pinia",category:"state",signals:[{type:"dependency",key:"pinia"}]},{name:"Express",slug:"express",category:"backend",signals:[{type:"dependency",key:"express"}]},{name:"Fastify",slug:"fastify",category:"backend",signals:[{type:"dependency",key:"fastify"}]},{name:"Hono",slug:"hono",category:"backend",signals:[{type:"dependency",key:"hono"}]},{name:"Elysia",slug:"elysia",category:"backend",signals:[{type:"dependency",key:"elysia"}]},{name:"NestJS",slug:"nestjs",category:"backend",signals:[{type:"dependency",key:"@nestjs/core"}]},{name:"Koa",slug:"koa",category:"backend",signals:[{type:"dependency",key:"koa"}]},{name:"Django",slug:"django",category:"backend",signals:[{type:"file",pattern:"manage.py"},{type:"file",pattern:"settings.py"}]},{name:"Flask",slug:"flask",category:"backend",signals:[{type:"file",pattern:"app.py"}]},{name:"FastAPI",slug:"fastapi",category:"backend",signals:[{type:"file",pattern:"main.py"}]},{name:"Rails",slug:"rails",category:"backend",signals:[{type:"file",pattern:"Gemfile"},{type:"file",pattern:"config/routes.rb"}]},{name:"Spring Boot",slug:"spring",category:"backend",signals:[{type:"file",pattern:"pom.xml"},{type:"file",pattern:"build.gradle"}]},{name:"Prisma",slug:"prisma",category:"database",signals:[{type:"dependency",key:"prisma"},{type:"devDependency",key:"prisma"},{type:"file",pattern:"prisma/schema.prisma"}]},{name:"Drizzle",slug:"drizzle",category:"database",signals:[{type:"dependency",key:"drizzle-orm"},{type:"file",pattern:"drizzle.config.*"}]},{name:"TypeORM",slug:"typeorm",category:"database",signals:[{type:"dependency",key:"typeorm"}]},{name:"Mongoose",slug:"mongoose",category:"database",signals:[{type:"dependency",key:"mongoose"}]},{name:"Vite",slug:"vite",category:"build",signals:[{type:"dependency",key:"vite"},{type:"devDependency",key:"vite"},{type:"file",pattern:"vite.config.*"}]},{name:"webpack",slug:"webpack",category:"build",signals:[{type:"dependency",key:"webpack"},{type:"devDependency",key:"webpack"},{type:"file",pattern:"webpack.config.*"}]},{name:"esbuild",slug:"esbuild",category:"build",signals:[{type:"dependency",key:"esbuild"},{type:"devDependency",key:"esbuild"}]},{name:"Turbopack",slug:"turbopack",category:"build",signals:[{type:"file",pattern:"turbo.json"}]},{name:"Jest",slug:"jest",category:"testing",signals:[{type:"devDependency",key:"jest"},{type:"file",pattern:"jest.config.*"}]},{name:"Vitest",slug:"vitest",category:"testing",signals:[{type:"devDependency",key:"vitest"}]},{name:"Playwright",slug:"playwright",category:"testing",signals:[{type:"devDependency",key:"@playwright/test"},{type:"file",pattern:"playwright.config.*"}]},{name:"Cypress",slug:"cypress",category:"testing",signals:[{type:"devDependency",key:"cypress"},{type:"file",pattern:"cypress.config.*"}]},{name:"Turborepo",slug:"turborepo",category:"monorepo",signals:[{type:"devDependency",key:"turbo"},{type:"file",pattern:"turbo.json"}]},{name:"Nx",slug:"nx",category:"monorepo",signals:[{type:"devDependency",key:"nx"},{type:"file",pattern:"nx.json"}]},{name:"Lerna",slug:"lerna",category:"monorepo",signals:[{type:"devDependency",key:"lerna"},{type:"file",pattern:"lerna.json"}]},{name:"MCP SDK",slug:"mcp",category:"ai",signals:[{type:"dependency",key:"@modelcontextprotocol/sdk"}]},{name:"Anthropic SDK",slug:"anthropic",category:"ai",signals:[{type:"dependency",key:"@anthropic-ai/sdk"}]},{name:"OpenAI SDK",slug:"openai",category:"ai",signals:[{type:"dependency",key:"openai"}]},{name:"LangChain",slug:"langchain",category:"ai",signals:[{type:"dependency",key:"langchain"}]},{name:"Vercel",slug:"vercel",category:"hosting",signals:[{type:"file",pattern:"vercel.json"}]},{name:"Netlify",slug:"netlify",category:"hosting",signals:[{type:"file",pattern:"netlify.toml"}]},{name:"Docker",slug:"docker",category:"hosting",signals:[{type:"file",pattern:"Dockerfile"},{type:"file",pattern:"docker-compose.yml"}]},{name:"Cloudflare Workers",slug:"cloudflare",category:"hosting",signals:[{type:"file",pattern:"wrangler.toml"},{type:"dependency",key:"wrangler"}]},{name:"GitHub Actions",slug:"github-actions",category:"cicd",signals:[{type:"file",pattern:".github/workflows/*.yml"}]},{name:"Commander.js",slug:"commander",category:"cli",signals:[{type:"dependency",key:"commander"}]}];function IG($){let Z=F($,"Cargo.toml");if(!M(Z))return null;try{let X=t(Z,"utf-8").match(/^\s*\[package\][\s\S]*?^\s*name\s*=\s*"([^"]+)"/m);return X?X[1]:null}catch{return null}}function LG($){let Z=F($,"Cargo.toml");if(!M(Z))return!1;try{let z=t(Z,"utf-8");return/^\s*\[\[bin\]\]/m.test(z)}catch{return!1}}function DG($,Z){if(Z?.keywords?.some((X)=>/^sdk(?:\s|-|$)|-sdk$/i.test(X)))return'package.json keywords contains "sdk"';if(Z?.name&&/(?:^|[-_/])sdk(?:[-_/]|$)/i.test(Z.name))return`package.json name "${Z.name}" → sdk`;let z=IG($);if(z&&/(?:^|[-_])sdk(?:[-_]|$)/i.test(z))return`Cargo.toml name "${z}" → sdk`;return null}function RG($){let Z=["manifest.json","public/manifest.json","src/manifest.json","app/manifest.json","extension/manifest.json","dist/manifest.json"];for(let z of Z){let X=F($,z);if(!M(X))continue;try{let U=JSON.parse(t(X,"utf-8"));if(typeof U.manifest_version==="number")return`${z} manifest_version ${U.manifest_version} (browser extension)`}catch{}}return null}function FG($){let Z=/(numpy|pandas|jupyter|scikit-learn|sklearn|pytorch|tensorflow|matplotlib|scipy)/i,z=F($,"pyproject.toml");if(M(z))try{let Q=t(z,"utf-8").match(Z);if(Q)return`pyproject.toml depends on ${Q[1]}`}catch{}let X=F($,"requirements.txt");if(M(X))try{let Q=t(X,"utf-8").match(Z);if(Q)return`requirements.txt contains ${Q[1]}`}catch{}return null}function MG($,Z){let z=["react-native","expo","@capacitor/core","@ionic/core"];if(Z){for(let X of z)if(Z.dependencies?.[X]||Z.devDependencies?.[X])return`${X} dependency`}if(M(F($,"ios"))&&M(F($,"android")))return"ios/ + android/ dirs";return null}function KG($,Z){let z=F($,"Cargo.toml");if(M(z))try{let U=t(z,"utf-8");if(/crate-type\s*=\s*\[[^\]]*"cdylib"/.test(U))return'Cargo.toml crate-type = ["cdylib"]';if(/wasm-bindgen|wasm-pack/i.test(U))return"Cargo.toml wasm-bindgen/wasm-pack"}catch{}let X=F($,"build.zig");if(M(X))try{let U=t(X,"utf-8");if(/\.wasm\b|wasm32|setOutputFormat\(\.wasm/i.test(U))return"build.zig wasm target"}catch{}if(Z?.keywords?.some((U)=>/^wasm(?:-|$)|webassembly/i.test(U)))return'package.json keywords contains "wasm"';return null}function PG($,Z){if(!M(F($,"index.html")))return null;if(Z?.dependencies||Z?.devDependencies){let z={...Z.dependencies??{},...Z.devDependencies??{}};if(["react","vue","svelte","@sveltejs/kit","next","nuxt","astro","gatsby","solid-js","qwik"].some((U)=>z[U]))return null}return"index.html (vanilla, no frontend framework)"}function TG($,Z){if(Z?.name&&/specification|^@.*\/spec/i.test(Z.name))return`package name "${Z.name}" → documentation`;if(Z?.keywords?.some((z)=>/^(specification|format-spec|standard)$/i.test(z)))return'package keywords contains "specification"';if(Z?.bin)return null;if(Z?.files&&Z.files.length>0){let z=/^(dist|src|lib|build|bin)(\/|$)|\/(dist|src|lib|build|bin)(\/|$)|(\.|\/)(js|ts|tsx|jsx|mjs|cjs|py|rs|go)$/,X=Z.files.some((Q)=>z.test(Q)),U=Z.files.some((Q)=>/\.(md|MD)$|examples?\//.test(Q)||Q==="README.md"||Q==="docs"||Q==="docs/");if(!X&&U)return"package.json files = docs/examples only (no source)"}return null}function AG($,Z,z){let X=z.find((U)=>U.slug==="astro"||U.slug==="gatsby");if(X)return`${X.name} (static-site framework)`;if(Z?.keywords?.some((U)=>/^(website|marketing|landing|brochure|portfolio)$/i.test(U)))return'package keywords contains "website"/"marketing"/"landing"';return null}function NG($,Z){if(!Z)return null;let z={...Z.dependencies??{},...Z.devDependencies??{}},X=["@clerk/nextjs","@clerk/clerk-react","next-auth","@auth/core","auth0","@auth0/nextjs-auth0"],U=["stripe","@stripe/stripe-js","lemonsqueezy"],Q=X.some((H)=>z[H]),J=U.some((H)=>z[H]);if(Q&&J)return"auth + payment dependencies";return null}function wG($,Z,z){if(Z?.keywords?.some((Q)=>/mcpaas/i.test(Q)))return'package keywords contains "mcpaas"';if(Z?.name&&/mcpaas/i.test(Z.name))return`package name "${Z.name}" → mcpaas`;let X=z.some((Q)=>Q.slug==="mcp"),U=z.some((Q)=>Q.category==="database");if(X&&U&&Z?.dependencies&&Object.keys(Z.dependencies).length>10)return"MCP + database + complex deps (platform shape)";return null}function bG($,Z){if(!Z?.private)return null;if(!(!!Z.workspaces||M(F($,"pnpm-workspace.yaml"))))return null;return"private workspace + multi-package"}function F0($){let Z=F($,"package.json");if(!M(Z))return null;try{return JSON.parse(t(Z,"utf-8"))}catch{return null}}function CG($,Z){if(!Z.includes("*"))return M(F($,Z));let z=Z.split("/");if(z.length===1){let H=Z.split("*")[0];try{return Y6($).some((G)=>G.startsWith(H))}catch{return!1}}let X=F($,...z.slice(0,-1)),U=z[z.length-1],Q=U.split("*")[0],J=U.split("*")[1]||"";try{return Y6(X).some((H)=>H.startsWith(Q)&&H.endsWith(J))}catch{return!1}}function jG($,Z,z){switch($.type){case"dependency":return!!Z?.dependencies?.[$.key];case"devDependency":return!!Z?.devDependencies?.[$.key];case"file":return CG(z,$.pattern);default:return!1}}function e2($){let Z=F0($);return _6.map((z)=>{let U=z.signals.filter((Q)=>jG(Q,Z,$)).length/z.signals.length;return{name:z.name,slug:z.slug,category:z.category,confidence:U}}).filter((z)=>z.confidence>0).sort((z,X)=>X.confidence-z.confidence)}function q6($){let Z=F0($);if(Z?.devDependencies?.typescript||Z?.dependencies?.typescript)return"TypeScript";if(M(F($,"tsconfig.json")))return"TypeScript";if(M(F($,"Cargo.toml")))return"Rust";if(M(F($,"go.mod")))return"Go";if(M(F($,"pyproject.toml"))||M(F($,"setup.py")))return"Python";if(M(F($,"Gemfile")))return"Ruby";if(M(F($,"pom.xml"))||M(F($,"build.gradle")))return"Java";if(M(F($,"Package.swift")))return"Swift";if(M(F($,"build.zig")))return"Zig";if(M(F($,"pubspec.yaml")))return"Dart";if(Z)return"JavaScript";return"Unknown"}function B6($){let Z=F0($),z=e2($),X=[],U=TG($,Z);if(U)return X.push(U),{type:"documentation",found:X};let Q=DG($,Z);if(Q)return X.push(Q),{type:"sdk",found:X};let J=RG($);if(J)return X.push(J),{type:"extension",found:X};let H=wG($,Z,z);if(H)return X.push(H),{type:"mcpaas",found:X};let G=NG($,Z);if(G)return X.push(G),{type:"saas",found:X};let _=KG($,Z);if(_)return X.push(_),{type:"wasm",found:X};let B=I1($);if(B)return X.push(B.found),{type:B.appType,found:X};let Y=R1($);if(Y)return X.push(Y.found),{type:Y.appType,found:X};let q=MG($,Z);if(q)return X.push(q),{type:"mobile",found:X};if(z.some((T)=>T.slug==="mcp"))return X.push("MCP SDK signal"),{type:"mcp",found:X};if(Z?.bin)return X.push("package.json bin"),{type:"cli",found:X};if(LG($))return X.push("Cargo.toml [[bin]]"),{type:"cli",found:X};if(M(F($,"build.zig"))){if(X.push("build.zig"),M(F($,"src/main.zig")))return X.push("src/main.zig"),{type:"cli",found:X};if(M(F($,"src/root.zig")))return X.push("src/root.zig"),{type:"library",found:X}}let I=z.some((T)=>T.slug==="svelte"||T.slug==="sveltekit");if(Z?.private===!0&&(M(F($,"pnpm-workspace.yaml"))||Z?.workspaces!==void 0)&&I)return X.push("private workspace","Svelte"),{type:"framework",found:X};if(I)return X.push("Svelte/SvelteKit"),{type:"svelte",found:X};let O=z.some((T)=>T.category==="frontend"),L=z.some((T)=>T.category==="backend");if(Z?.private&&(Z.workspaces||M(F($,"pnpm-workspace.yaml")))&&O&&L)return X.push("private workspace + frontend + backend frameworks"),{type:"enterprise",found:X};let R=bG($,Z);if(R)return X.push(R),{type:"monorepo-root",found:X};let K=AG($,Z,z);if(K)return X.push(K),{type:"website",found:X};if(z.some((T)=>T.slug==="nextjs"||T.slug==="nuxt"))return X.push(z.find((T)=>T.slug==="nextjs")?"Next.js":"Nuxt"),{type:"fullstack",found:X};let A=z.some((T)=>T.category==="frontend"),w=z.some((T)=>T.category==="backend");if(A&&w)return X.push("frontend framework","backend framework"),{type:"fullstack",found:X};if(A)return X.push("frontend framework"),{type:"frontend",found:X};if(w)return X.push("backend framework"),{type:"backend",found:X};let C=FG($);if(C)return X.push(C),{type:"data-science",found:X};let P=PG($,Z);if(P)return X.push(P),{type:"html",found:X};if(Z?.main&&!Z?.bin)return X.push("package.json main (no bin)"),{type:"library",found:X};return X.push("no classifying signals — fallback"),{type:"library",found:X}}function V6($){if(M(F($,"bunfig.toml")))return"Bun";if(M(F($,"deno.json"))||M(F($,"deno.jsonc")))return"Deno";if(F0($))return"Node.js";if(M(F($,"Cargo.toml")))return"Rust";if(M(F($,"go.mod")))return"Go";if(M(F($,"pubspec.yaml")))return"Dart";return"Unknown"}function O6($){if(M(F($,"pubspec.yaml")))return"pub";if(M(F($,"go.mod")))return"go modules";if(M(F($,"bun.lockb"))||M(F($,"bun.lock")))return"bun";if(M(F($,"pnpm-lock.yaml")))return"pnpm";if(M(F($,"yarn.lock")))return"yarn";if(M(F($,"package-lock.json")))return"npm";return"npm"}function W6($){if(M(F($,".github/workflows")))return"GitHub Actions";if(M(F($,".gitlab-ci.yml")))return"GitLab CI";if(M(F($,".circleci")))return"CircleCI";if(M(F($,"Jenkinsfile")))return"Jenkins";return null}function I6($){if(M(F($,"vercel.json")))return"Vercel";if(M(F($,"netlify.toml")))return"Netlify";if(M(F($,"wrangler.toml")))return"Cloudflare";if(M(F($,"Dockerfile")))return"Docker";if(M(F($,"fly.toml")))return"Fly.io";if(M(F($,"render.yaml")))return"Render";return null}function L6($){let Z=F($,"svelte.config.js");if(!M(Z))return null;try{let X=t(Z,"utf-8").match(/@sveltejs\/adapter-(\w+)/);if(X){let U=X[1];switch(U){case"vercel":return"Vercel";case"node":return"Node";case"static":return"Static";case"cloudflare":return"Cloudflare";case"netlify":return"Netlify";case"auto":return"Auto";default:return U}}return null}catch{return null}}function D6($){let Z=F0($);if(Z?.devDependencies?.vite||Z?.dependencies?.vite)return"Vite";if(Z?.devDependencies?.webpack||Z?.dependencies?.webpack)return"webpack";if(Z?.devDependencies?.esbuild||Z?.dependencies?.esbuild)return"esbuild";if(M(F($,"tsconfig.json"))&&Z?.devDependencies?.typescript)return"TypeScript (tsc)";return null}function R6($){return["package.json","Cargo.toml","pyproject.toml","go.mod","build.zig","build.zig.zon","src/index.ts","src/index.js","src/main.ts","src/cli.ts","src/main.rs","src/lib.rs","src/main.zig","src/root.zig","src/__init__.py","main.py","__main__.py","main.go","cmd/main.go","README.md","SPECIFICATION.md","BINARY-FORMAT.md","tsconfig.json","wrangler.toml","vercel.json"].filter((z)=>M(F($,z)))}function F6($,Z){let z={};if(Z?.scripts){for(let X of["build","test","lint","dev","start"])if(Z.scripts[X]){let U=M(F($,"bun.lock"))||M(F($,"bun.lockb"))?"bun run":"npm run";z[X]=`${U} ${X}`}}if(M(F($,"Cargo.toml"))){if(!z.build)z.build="cargo build --release";if(!z.test)z.test="cargo test";if(!z.lint)z.lint="cargo clippy"}if(M(F($,"build.zig"))){if(!z.build)z.build="zig build";if(!z.test)z.test="zig build test"}if(M(F($,"go.mod"))){if(!z.build)z.build="go build ./...";if(!z.test)z.test="go test ./..."}if(M(F($,"pyproject.toml"))||M(F($,"pytest.ini"))){if(!z.test)z.test="pytest"}return z}function M6($,Z,z,X){let U=[];if(X&&X!=="Unknown")U.push(X);let Q=new Set(["frontend","backend","database","build","css","state","monorepo"]);for(let J of z)if(Q.has(J.category))U.push(J.name);if(M(F($,"bunfig.toml")))U.push("Bun");else if(M(F($,"deno.json"))||M(F($,"deno.jsonc")))U.push("Deno");if(U.length<3&&Z?.dependencies){let J=Object.keys(Z.dependencies).slice(0,5);for(let H of J)if(!U.some((G)=>G.toLowerCase().includes(H.toLowerCase())))U.push(H)}return U}function K6($){let Z=F0($),z=e2($),X=q6($),U=B6($),Q=U.type,J=V6($),H=O6($),G=W6($),_=I6($),B=D6($),Y=z.find((j)=>j.category==="frontend"),q=z.find((j)=>j.category==="css"),W=z.find((j)=>j.category==="ui"),I=z.find((j)=>j.category==="state"),V=z.find((j)=>j.category==="backend"),O=z.find((j)=>j.category==="database"),L=K0[Q]||K0.library,R=Q==="framework",K=z.some((j)=>j.slug==="svelte"||j.slug==="sveltekit"),N=R&&K?"svelte":R?null:null,A=Q==="svelte"||N==="svelte",w=A?L6($):null,C=A&&z.some((j)=>j.slug==="sveltekit"),P=new Set(["css_framework","ui_library","database","connection","hosting"]),T={},d=y.filter((j)=>j.path.startsWith("stack."));for(let j of d){let S=j.path.replace("stack.","");if(!L.includes(j.category)){T[S]="slotignored";continue}if(R&&P.has(S)){T[S]="slotignored";continue}switch(S){case"frontend":T[S]=Y?.name??(Q==="cli"?"CLI":"");break;case"css_framework":T[S]=q?.name??"";break;case"ui_library":T[S]=W?.name??"";break;case"state_management":T[S]=A?I?.name??"Runes":I?.name??"";break;case"backend":T[S]=A?C?"SvelteKit":V?.name??"":V?.name??"";break;case"api_type":T[S]=C?"Server Routes":"";break;case"runtime":T[S]=J!=="Unknown"?J:"";break;case"database":T[S]=O?.name??"";break;case"connection":T[S]=O?.name??"";break;case"hosting":if(A&&w)T[S]=w;else T[S]=_??"";break;case"build":T[S]=A?"Vite":B??"";break;case"cicd":T[S]=G??"";break;case"package_manager":T[S]=H;break;default:T[S]="";break}}let c={},E=y.filter((j)=>j.path.startsWith("monorepo."));for(let j of E){let S=j.path.replace("monorepo.","");if(!L.includes(j.category))c[S]="slotignored";else c[S]=""}let m0={name:Z?.name??$.split("/").pop()??"project",goal:Z?.description??"",main_language:X,type:Q};if(R&&N)m0.framework=N;let z3=M6($,Z,z,X),X3=R6($),U3=F6($,Z),F$={faf_version:G6,project:m0,stack:T,human_context:{who:"",what:Z?.description??"",why:"",where:"",when:"",how:""},monorepo:c,_meta:{found:U.found}};if(z3.length>0)F$.tech_stack=z3;if(X3.length>0)F$.key_files=X3;if(Object.keys(U3).length>0)F$.commands=U3;return F$}import{existsSync as EG,readFileSync as gG}from"fs";import{join as fG}from"path";var P6={MIN_LENGTH:8,MAX_LENGTH:280},SG=[/^(see|see\s+the?)\s+readme/i,/^(tbd|todo|fixme|coming\s+soon)\b/i,/^(software|application|app|project|tool|library|framework)\.?$/i,/^(for\s+users|for\s+developers)\.?$/i,/^(description|goal|name|title)\.?$/i,/^lorem\s+ipsum/i,/^example(\s+\w+)?\.?$/i];function l($){let Z=$.trim();if(Z.length<P6.MIN_LENGTH)return!1;if(Z.length>P6.MAX_LENGTH)return!1;if(SG.some((z)=>z.test(Z)))return!1;if(/^[\s|\-*+]/.test(Z))return!1;if(Z.split(`
219
+ `).length>4)return!1;return!0}function yG($){let Z=$.split(`
220
+ `),z=0;while(z<Z.length&&/^(#\s|$)/.test(Z[z].trim()))z++;while(z<Z.length){let X=Z[z].trim();if(/^\[!\[/.test(X)){z++;continue}if(/^!\[/.test(X)){z++;continue}if(/^<img\s/i.test(X)){z++;continue}if(X===""){z++;continue}break}return Z.slice(z).join(`
221
+ `)}function hG($){let z=yG($).split(`
222
+ `),X=[];for(let U of z){let Q=U.trim();if(Q===""){if(X.length>0)break;continue}if(/^(#|>|```|---|\||\s*[-*+]\s|\d+\.\s)/.test(Q))break;if(/^\*\*[^*]+\*\*\s*$/.test(Q)&&X.length===0)continue;X.push(Q)}if(X.length===0)return null;return X.join(" ").trim()}function M0($,Z){let z=$.split(`
223
+ `),X=0;while(X<z.length){let Q=z[X].trim().match(/^(#{1,6})\s+(.+)$/);if(Q&&Z.test(Q[2])){let J=Q[1].length,H=[];X++;while(X<z.length){let G=z[X].trim(),_=G.match(/^(#{1,6})\s+/);if(_&&_[1].length<=J)break;if(G===""){if(H.length>0)break;X++;continue}if(/^(>|```|---|\||\s*[-*+]\s|\d+\.\s)/.test(G))break;H.push(G),X++}if(H.length===0)return null;return H.join(" ").trim()}X++}return null}function xG($){let Z=M0($,/^(use\s+cases?|goal)\b/i);if(Z&&l(Z))return Z;let z=hG($);if(z&&l(z))return z;return}function uG($){let Z=M0($,/^(about|description|overview|what(\s+is\s+this)?)\b/i);if(Z&&l(Z))return Z;return}function kG($){let Z=M0($,/^(audience|users?|for\s+whom|who(\s+is\s+this\s+for)?)\b/i);if(Z&&l(Z))return Z;return}function vG($){let Z=M0($,/^(why|motivation|problem|rationale)\b/i);if(Z&&l(Z))return Z;return}function mG($){let Z=M0($,/^(deployment|where(\s+it\s+runs)?|hosting)\b/i);if(Z&&l(Z))return Z;return}function pG($){let Z=M0($,/^(status|history|timeline|since|launched)\b/i);if(Z&&l(Z))return Z;return}function lG($){let Z=M0($,/^(architecture|how(\s+it\s+works)?|approach|design)\b/i);if(Z&&l(Z))return Z;return}function $3($){let Z=["README.md","README.MD","Readme.md","readme.md"],z=null;for(let W of Z){let I=fG($,W);if(EG(I)){z=I;break}}if(!z)return{};let X;try{X=gG(z,"utf-8")}catch{return{}}let U={},Q=xG(X);if(Q)U.project={goal:Q};let J={},H=uG(X);if(H)J.what=H;let G=kG(X);if(G)J.who=G;let _=vG(X);if(_)J.why=_;let B=mG(X);if(B)J.where=B;let Y=pG(X);if(Y)J.when=Y;let q=lG(X);if(q)J.how=q;if(Object.keys(J).length>0)U.human_context=J;return U}import{existsSync as dG,readFileSync as cG}from"fs";import{join as iG}from"path";function sG($,Z){let z=$.split(`
224
+ `),X=!1;for(let U of z){let Q=U.trim();if(/^\[/.test(Q)){X=Q==="[package]";continue}if(!X)continue;let J=Q.match(new RegExp(`^${Z}\\s*=\\s*(.+)$`));if(J){let H=J[1].trim();H=H.replace(/\s*#.*$/,"").trim();let G=H.match(/^"((?:[^"\\]|\\.)*)"$/)||H.match(/^'((?:[^'\\]|\\.)*)'$/);if(G)return G[1];return H}}return null}function Z3($){let Z=iG($,"Cargo.toml");if(!dG(Z))return{};let z;try{z=cG(Z,"utf-8")}catch{return{}}let X=sG(z,"description");if(X&&l(X))return{project:{goal:X}};return{}}function aG($,Z){let z={project:{...Z.project??{},...$.project??{}},human_context:{...Z.human_context??{},...$.human_context??{}}};if(z.project&&Object.keys(z.project).length===0)delete z.project;if(z.human_context&&Object.keys(z.human_context).length===0)delete z.human_context;return z}function T6($){return aG($3($),Z3($))}function rG($){let Z=K6($),z=T6($),X=F1(Z,z);nG(X);let U=F1(X,o2($));return F1(U,{human_context:t2($)})}function nG($){let Z=$.project?.type??"library",z=K0[Z]||K0.library;for(let X of y){if(z.includes(X.category))continue;let[U,Q]=X.path.split(".");if(U==="stack"&&$.stack)$.stack[Q]="slotignored";if(U==="monorepo"&&$.monorepo)$.monorepo[Q]="slotignored"}}function F1($,Z){let z={...$};for(let[X,U]of Object.entries(Z)){let Q=z[X];if(Y0(Q))z[X]=U;else if(typeof U==="object"&&U!==null&&!Array.isArray(U)&&typeof Q==="object"&&Q!==null&&!Array.isArray(Q))z[X]=F1(Q,U)}return z}export{ZH as writeServerCard,iJ as writeProjectHtml,m6 as validateFaf,h0 as utcNow,o2 as turboCatSlots,z6 as turboCatScan,j6 as slotsByCategory,p9 as seedSixWsFromGoal,N1 as scoreFafYaml,KH as runLoop,H6 as relentlessContextDetailed,t2 as relentlessContext,eJ as registryName,tJ as registryMeta,D9 as readFafRaw,xJ as readFaf,d2 as questionForSlot,wH as publicQuestions,W1 as normalizeAnswer,c9 as loopVerdict,A1 as kernel,Y0 as isPlaceholder,l9 as isHumanSlot,O1 as isEmptyValue,IH as interviewForMissing,bH as gradeAnswers,i0 as getTier,g6 as getNextTier,w9 as generateServerCard,P9 as generateProjectHtml,f9 as fromClaudeDir,R9 as findFafFile,u2 as fafContextBlock,J3 as enrichScore,NH as deriveQuestionSet,d9 as classifyGaps,L$ as canonicalPriority,FH as buildTableOf8,CH as buildReceipt,rG as assembleFreshFaf,r9 as answersMatch,a as TIERS,v9 as STACK_INTERVIEW,l0 as SLOT_BY_PATH,y as SLOTS,l2 as SIX_WS_INTERVIEW,b9 as REGISTRY_PUBLISHER_KEY,_0 as PRIORITY_RANK,k2 as PRIORITY_ORDER,M$ as PLACEHOLDERS,V1 as KNOWLEDGE_TYPES,k9 as INTERVIEW_VERSION,WH as INTERVIEW_PATHS,m9 as INTERVIEW_BY_PATH,u0 as INTERVIEW,D0 as FafmSoul,c0 as FAF_HEX,E6 as ENTERPRISE_SLOTS,i2 as BENCH_VERSION,S6 as BASE_SLOTS,a9 as ALIAS_GROUPS};
224
225
 
225
- //# debugId=CAEDE5D14B7DD50C64756E2164756E21
226
+ //# debugId=E34BAE7E29E0A4C664756E2164756E21
226
227
  //# sourceMappingURL=index.js.map