From 5613de964602b2460f88110e79d02e40c88dae65 Mon Sep 17 00:00:00 2001 From: "P. L. Lim" <2090236+pllim@users.noreply.github.com> Date: Fri, 17 May 2024 19:17:52 -0400 Subject: [PATCH 1/4] Post-APE 22 listing Co-authored-by: Tom Donaldson --- affiliated/index.html | 116 +++++++++++++++++++++++++++++++-- js/yaml_parse_bundle.js | 138 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 247 insertions(+), 7 deletions(-) create mode 100644 js/yaml_parse_bundle.js diff --git a/affiliated/index.html b/affiliated/index.html index 54fa92c7..c4b54fe5 100644 --- a/affiliated/index.html +++ b/affiliated/index.html @@ -166,16 +166,46 @@

Coordinated Packages

Affiliated Packages RegistryΒΆ

The following table lists all currently registered affiliated packages.

-

NOTE: The listing is currently empty because Astropy has just accepted +

NOTE: The listing is currently minimal because Astropy has just accepted APE 22 in January 2024. We are in the midst of transitioning to the new process in partnership with pyOpenSci, so we really appreciate your patience.

- +

Total number of post-APE 22 affiliated packages:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Loading...    
  
+ + @@ -344,13 +374,85 @@

I am a new reviewer - - + + + + +

diff --git a/js/yaml_parse_bundle.js b/js/yaml_parse_bundle.js new file mode 100644 index 00000000..bce10c7a --- /dev/null +++ b/js/yaml_parse_bundle.js @@ -0,0 +1,138 @@ +(()=>{var an=Object.defineProperty;var as=(s,e)=>{for(var t in e)an(s,t,{get:e[t],enumerable:!0})};var ls={};as(ls,{Alias:()=>ee,CST:()=>ns,Composer:()=>be,Document:()=>se,Lexer:()=>Me,LineCounter:()=>Be,Pair:()=>C,Parser:()=>we,Scalar:()=>y,Schema:()=>Ce,YAMLError:()=>$e,YAMLMap:()=>$,YAMLParseError:()=>q,YAMLSeq:()=>M,YAMLWarning:()=>_e,isAlias:()=>F,isCollection:()=>T,isDocument:()=>X,isMap:()=>R,isNode:()=>L,isPair:()=>A,isScalar:()=>O,isSeq:()=>U,parse:()=>rn,parseAllDocuments:()=>nn,parseDocument:()=>os,stringify:()=>on,visit:()=>V,visitAsync:()=>je});var et=Symbol.for("yaml.alias"),tt=Symbol.for("yaml.document"),Q=Symbol.for("yaml.map"),Mt=Symbol.for("yaml.pair"),x=Symbol.for("yaml.scalar"),re=Symbol.for("yaml.seq"),j=Symbol.for("yaml.node.type"),F=s=>!!s&&typeof s=="object"&&s[j]===et,X=s=>!!s&&typeof s=="object"&&s[j]===tt,R=s=>!!s&&typeof s=="object"&&s[j]===Q,A=s=>!!s&&typeof s=="object"&&s[j]===Mt,O=s=>!!s&&typeof s=="object"&&s[j]===x,U=s=>!!s&&typeof s=="object"&&s[j]===re;function T(s){if(s&&typeof s=="object")switch(s[j]){case Q:case re:return!0}return!1}function L(s){if(s&&typeof s=="object")switch(s[j]){case et:case Q:case x:case re:return!0}return!1}var cs=s=>(O(s)||T(s))&&!!s.anchor;var K=Symbol("break visit"),fs=Symbol("skip children"),z=Symbol("remove node");function V(s,e){let t=us(e);X(s)?ke(null,s.contents,t,Object.freeze([s]))===z&&(s.contents=null):ke(null,s,t,Object.freeze([]))}V.BREAK=K;V.SKIP=fs;V.REMOVE=z;function ke(s,e,t,n){let i=hs(s,e,t,n);if(L(i)||A(i))return ps(s,n,i),ke(s,i,t,n);if(typeof i!="symbol"){if(T(e)){n=Object.freeze(n.concat(e));for(let r=0;rs.replace(/[!,[\]{}]/g,e=>cn[e]),Z=class s{constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},s.defaultYaml,e),this.tags=Object.assign({},s.defaultTags,t)}clone(){let e=new s(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){let e=new s(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:s.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},s.defaultTags);break}return e}add(e,t){this.atNextDocument&&(this.yaml={explicit:s.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},s.defaultTags),this.atNextDocument=!1);let n=e.trim().split(/[ \t]+/),i=n.shift();switch(i){case"%TAG":{if(n.length!==2&&(t(0,"%TAG directive should contain exactly two parts"),n.length<2))return!1;let[r,o]=n;return this.tags[r]=o,!0}case"%YAML":{if(this.yaml.explicit=!0,n.length!==1)return t(0,"%YAML directive should contain exactly one part"),!1;let[r]=n;if(r==="1.1"||r==="1.2")return this.yaml.version=r,!0;{let o=/^\d+\.\d+$/.test(r);return t(6,`Unsupported YAML version ${r}`,o),!1}}default:return t(0,`Unknown directive ${i}`,!0),!1}}tagName(e,t){if(e==="!")return"!";if(e[0]!=="!")return t(`Not a valid tag: ${e}`),null;if(e[1]==="<"){let o=e.slice(2,-1);return o==="!"||o==="!!"?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==">"&&t("Verbatim tags must end with a >"),o)}let[,n,i]=e.match(/^(.*!)([^!]*)$/s);i||t(`The ${e} tag has no suffix`);let r=this.tags[n];if(r)try{return r+decodeURIComponent(i)}catch(o){return t(String(o)),null}return n==="!"?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[t,n]of Object.entries(this.tags))if(e.startsWith(n))return t+fn(e.substring(n.length));return e[0]==="!"?e:`!<${e}>`}toString(e){let t=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],n=Object.entries(this.tags),i;if(e&&n.length>0&&L(e.contents)){let r={};V(e.contents,(o,l)=>{L(l)&&l.tag&&(r[l.tag]=!0)}),i=Object.keys(r)}else i=[];for(let[r,o]of n)r==="!!"&&o==="tag:yaml.org,2002:"||(!e||i.some(l=>l.startsWith(o)))&&t.push(`%TAG ${r} ${o}`);return t.join(` +`)}};Z.defaultYaml={explicit:!1,version:"1.2"};Z.defaultTags={"!!":"tag:yaml.org,2002:"};function st(s){if(/[\x00-\x19\s,[\]{}]/.test(s)){let t=`Anchor must not contain whitespace or control characters: ${JSON.stringify(s)}`;throw new Error(t)}return!0}function Bt(s){let e=new Set;return V(s,{Value(t,n){n.anchor&&e.add(n.anchor)}}),e}function Dt(s,e){for(let t=1;;++t){let n=`${s}${t}`;if(!e.has(n))return n}}function ms(s,e){let t=[],n=new Map,i=null;return{onAnchor:r=>{t.push(r),i||(i=Bt(s));let o=Dt(e,i);return i.add(o),o},setAnchors:()=>{for(let r of t){let o=n.get(r);if(typeof o=="object"&&o.anchor&&(O(o.node)||T(o.node)))o.node.anchor=o.anchor;else{let l=new Error("Failed to resolve repeated object (this should not happen)");throw l.source=r,l}}},sourceObjects:n}}function ce(s,e,t,n){if(n&&typeof n=="object")if(Array.isArray(n))for(let i=0,r=n.length;i_(n,String(i),t));if(s&&typeof s.toJSON=="function"){if(!t||!cs(s))return s.toJSON(e,t);let n={aliasCount:0,count:1,res:void 0};t.anchors.set(s,n),t.onCreate=r=>{n.res=r,delete t.onCreate};let i=s.toJSON(e,t);return t.onCreate&&t.onCreate(i),i}return typeof s=="bigint"&&!t?.keep?Number(s):s}var fe=class{constructor(e){Object.defineProperty(this,j,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:n,onAnchor:i,reviver:r}={}){if(!X(e))throw new TypeError("A document argument is required");let o={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof n=="number"?n:100},l=_(this,"",o);if(typeof i=="function")for(let{count:a,res:c}of o.anchors.values())i(c,a);return typeof r=="function"?ce(r,{"":l},"",l):l}};var ee=class extends fe{constructor(e){super(et),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e){let t;return V(e,{Node:(n,i)=>{if(i===this)return V.BREAK;i.anchor===this.source&&(t=i)}}),t}toJSON(e,t){if(!t)return{source:this.source};let{anchors:n,doc:i,maxAliasCount:r}=t,o=this.resolve(i);if(!o){let a=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(a)}let l=n.get(o);if(l||(_(o,null,t),l=n.get(o)),!l||l.res===void 0){let a="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(a)}if(r>=0&&(l.count+=1,l.aliasCount===0&&(l.aliasCount=nt(i,o,n)),l.count*l.aliasCount>r)){let a="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(a)}return l.res}toString(e,t,n){let i=`*${this.source}`;if(e){if(st(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let r=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(r)}if(e.implicitKey)return`${i} `}return i}};function nt(s,e,t){if(F(e)){let n=e.resolve(s),i=t&&n&&t.get(n);return i?i.count*i.aliasCount:0}else if(T(e)){let n=0;for(let i of e.items){let r=nt(s,i,t);r>n&&(n=r)}return n}else if(A(e)){let n=nt(s,e.key,t),i=nt(s,e.value,t);return Math.max(n,i)}return 1}var it=s=>!s||typeof s!="function"&&typeof s!="object",y=class extends fe{constructor(e){super(x),this.value=e}toJSON(e,t){return t?.keep?this.value:_(this.value,e,t)}toString(){return String(this.value)}};y.BLOCK_FOLDED="BLOCK_FOLDED";y.BLOCK_LITERAL="BLOCK_LITERAL";y.PLAIN="PLAIN";y.QUOTE_DOUBLE="QUOTE_DOUBLE";y.QUOTE_SINGLE="QUOTE_SINGLE";var un="tag:yaml.org,2002:";function hn(s,e,t){if(e){let n=t.filter(r=>r.tag===e),i=n.find(r=>!r.format)??n[0];if(!i)throw new Error(`Tag ${e} not found`);return i}return t.find(n=>n.identify?.(s)&&!n.format)}function oe(s,e,t){if(X(s)&&(s=s.contents),L(s))return s;if(A(s)){let f=t.schema[Q].createNode?.(t.schema,null,t);return f.items.push(s),f}(s instanceof String||s instanceof Number||s instanceof Boolean||typeof BigInt<"u"&&s instanceof BigInt)&&(s=s.valueOf());let{aliasDuplicateObjects:n,onAnchor:i,onTagObj:r,schema:o,sourceObjects:l}=t,a;if(n&&s&&typeof s=="object"){if(a=l.get(s),a)return a.anchor||(a.anchor=i(s)),new ee(a.anchor);a={anchor:null,node:null},l.set(s,a)}e?.startsWith("!!")&&(e=un+e.slice(2));let c=hn(s,e,o.tags);if(!c){if(s&&typeof s.toJSON=="function"&&(s=s.toJSON()),!s||typeof s!="object"){let f=new y(s);return a&&(a.node=f),f}c=s instanceof Map?o[Q]:Symbol.iterator in Object(s)?o[re]:o[Q]}r&&(r(c),delete t.onTagObj);let p=c?.createNode?c.createNode(t.schema,s,t):typeof c?.nodeClass?.from=="function"?c.nodeClass.from(t.schema,s,t):new y(s);return e?p.tag=e:c.default||(p.tag=c.tag),a&&(a.node=p),p}function Ke(s,e,t){let n=t;for(let i=e.length-1;i>=0;--i){let r=e[i];if(typeof r=="number"&&Number.isInteger(r)&&r>=0){let o=[];o[r]=n,n=o}else n=new Map([[r,n]])}return oe(n,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:s,sourceObjects:new Map})}var Oe=s=>s==null||typeof s=="object"&&!!s[Symbol.iterator]().next().done,ge=class extends fe{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){let t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map(n=>L(n)||A(n)?n.clone(e):n),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(Oe(e))this.add(t);else{let[n,...i]=e,r=this.get(n,!0);if(T(r))r.addIn(i,t);else if(r===void 0&&this.schema)this.set(n,Ke(this.schema,i,t));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${i}`)}}deleteIn(e){let[t,...n]=e;if(n.length===0)return this.delete(t);let i=this.get(t,!0);if(T(i))return i.deleteIn(n);throw new Error(`Expected YAML collection at ${t}. Remaining path: ${n}`)}getIn(e,t){let[n,...i]=e,r=this.get(n,!0);return i.length===0?!t&&O(r)?r.value:r:T(r)?r.getIn(i,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!A(t))return!1;let n=t.value;return n==null||e&&O(n)&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn(e){let[t,...n]=e;if(n.length===0)return this.has(t);let i=this.get(t,!0);return T(i)?i.hasIn(n):!1}setIn(e,t){let[n,...i]=e;if(i.length===0)this.set(n,t);else{let r=this.get(n,!0);if(T(r))r.setIn(i,t);else if(r===void 0&&this.schema)this.set(n,Ke(this.schema,i,t));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${i}`)}}};ge.maxFlowStringSingleLineLength=60;var ds=s=>s.replace(/^(?!$)(?: $)?/gm,"#");function Y(s,e){return/^\n+$/.test(s)?s.substring(1):e?s.replace(/^(?! *$)/gm,e):s}var te=(s,e,t)=>s.endsWith(` +`)?Y(t,e):t.includes(` +`)?` +`+Y(t,e):(s.endsWith(" ")?"":" ")+t;var jt="flow",rt="block",qe="quoted";function xe(s,e,t="flow",{indentAtStart:n,lineWidth:i=80,minContentWidth:r=20,onFold:o,onOverflow:l}={}){if(!i||i<0)return s;let a=Math.max(1+r,1+i-e.length);if(s.length<=a)return s;let c=[],p={},f=i-e.length;typeof n=="number"&&(n>i-Math.max(2,r)?c.push(0):f=i-n);let h,d,b=!1,u=-1,m=-1,S=-1;t===rt&&(u=gs(s,u,e.length),u!==-1&&(f=u+a));for(let k;k=s[u+=1];){if(t===qe&&k==="\\"){switch(m=u,s[u+1]){case"x":u+=3;break;case"u":u+=5;break;case"U":u+=9;break;default:u+=1}S=u}if(k===` +`)t===rt&&(u=gs(s,u,e.length)),f=u+e.length+a,h=void 0;else{if(k===" "&&d&&d!==" "&&d!==` +`&&d!==" "){let N=s[u+1];N&&N!==" "&&N!==` +`&&N!==" "&&(h=u)}if(u>=f)if(h)c.push(h),f=h+a,h=void 0;else if(t===qe){for(;d===" "||d===" ";)d=k,k=s[u+=1],b=!0;let N=u>S+1?u-2:m-1;if(p[N])return s;c.push(N),p[N]=!0,f=N+a,h=void 0}else b=!0}d=k}if(b&&l&&l(),c.length===0)return s;o&&o();let w=s.slice(0,c[0]);for(let k=0;k({indentAtStart:e?s.indent.length:s.indentAtStart,lineWidth:s.options.lineWidth,minContentWidth:s.options.minContentWidth}),at=s=>/^(%|---|\.\.\.)/m.test(s);function pn(s,e,t){if(!e||e<0)return!1;let n=e-t,i=s.length;if(i<=n)return!1;for(let r=0,o=0;rn)return!0;if(o=r+1,i-o<=n)return!1}return!0}function Fe(s,e){let t=JSON.stringify(s);if(e.options.doubleQuotedAsJSON)return t;let{implicitKey:n}=e,i=e.options.doubleQuotedMinMultiLineLength,r=e.indent||(at(s)?" ":""),o="",l=0;for(let a=0,c=t[a];c;c=t[++a])if(c===" "&&t[a+1]==="\\"&&t[a+2]==="n"&&(o+=t.slice(l,a)+"\\ ",a+=1,l=a,c="\\"),c==="\\")switch(t[a+1]){case"u":{o+=t.slice(l,a);let p=t.substr(a+2,4);switch(p){case"0000":o+="\\0";break;case"0007":o+="\\a";break;case"000b":o+="\\v";break;case"001b":o+="\\e";break;case"0085":o+="\\N";break;case"00a0":o+="\\_";break;case"2028":o+="\\L";break;case"2029":o+="\\P";break;default:p.substr(0,2)==="00"?o+="\\x"+p.substr(2):o+=t.substr(a,6)}a+=5,l=a+1}break;case"n":if(n||t[a+2]==='"'||t.length +`;let f,h;for(h=t.length;h>0;--h){let g=t[h-1];if(g!==` +`&&g!==" "&&g!==" ")break}let d=t.substring(h),b=d.indexOf(` +`);b===-1?f="-":t===d||b!==d.length-1?(f="+",r&&r()):f="",d&&(t=t.slice(0,-d.length),d[d.length-1]===` +`&&(d=d.slice(0,-1)),d=d.replace(qt,`$&${c}`));let u=!1,m,S=-1;for(m=0;m")+(u?c?"2":"1":"")+f;if(s&&(N+=" "+l(s.replace(/ ?[\r\n]+/g," ")),i&&i()),p)return t=t.replace(/\n+/g,`$&${c}`),`${N} +${c}${w}${t}${d}`;t=t.replace(/\n+/g,` +$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${c}`);let E=xe(`${w}${t}${d}`,c,rt,lt(n,!0));return`${N} +${c}${E}`}function mn(s,e,t,n){let{type:i,value:r}=s,{actualString:o,implicitKey:l,indent:a,indentStep:c,inFlow:p}=e;if(l&&r.includes(` +`)||p&&/[[\]{},]/.test(r))return Ae(r,e);if(!r||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(r))return l||p||!r.includes(` +`)?Ae(r,e):ot(s,e,t,n);if(!l&&!p&&i!==y.PLAIN&&r.includes(` +`))return ot(s,e,t,n);if(at(r)){if(a==="")return e.forceBlockIndent=!0,ot(s,e,t,n);if(l&&a===c)return Ae(r,e)}let f=r.replace(/\n+/g,`$& +${a}`);if(o){let h=u=>u.default&&u.tag!=="tag:yaml.org,2002:str"&&u.test?.test(f),{compat:d,tags:b}=e.doc.schema;if(b.some(h)||d?.some(h))return Ae(r,e)}return l?f:xe(f,a,jt,lt(e,!1))}function le(s,e,t,n){let{implicitKey:i,inFlow:r}=e,o=typeof s.value=="string"?s:Object.assign({},s,{value:String(s.value)}),{type:l}=s;l!==y.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value)&&(l=y.QUOTE_DOUBLE);let a=p=>{switch(p){case y.BLOCK_FOLDED:case y.BLOCK_LITERAL:return i||r?Ae(o.value,e):ot(o,e,t,n);case y.QUOTE_DOUBLE:return Fe(o.value,e);case y.QUOTE_SINGLE:return Kt(o.value,e);case y.PLAIN:return mn(o,e,t,n);default:return null}},c=a(l);if(c===null){let{defaultKeyType:p,defaultStringType:f}=e.options,h=i&&p||f;if(c=a(h),c===null)throw new Error(`Unsupported default string type ${h}`)}return c}function ct(s,e){let t=Object.assign({blockQuote:!0,commentString:ds,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trueStr:"true",verifyAliasOrder:!0},s.schema.toStringOptions,e),n;switch(t.collectionStyle){case"block":n=!1;break;case"flow":n=!0;break;default:n=null}return{anchors:new Set,doc:s,flowCollectionPadding:t.flowCollectionPadding?" ":"",indent:"",indentStep:typeof t.indent=="number"?" ".repeat(t.indent):" ",inFlow:n,options:t}}function dn(s,e){if(e.tag){let i=s.filter(r=>r.tag===e.tag);if(i.length>0)return i.find(r=>r.format===e.format)??i[0]}let t,n;if(O(e)){n=e.value;let i=s.filter(r=>r.identify?.(n));t=i.find(r=>r.format===e.format)??i.find(r=>!r.format)}else n=e,t=s.find(i=>i.nodeClass&&n instanceof i.nodeClass);if(!t){let i=n?.constructor?.name??typeof n;throw new Error(`Tag not resolved for ${i} value`)}return t}function gn(s,e,{anchors:t,doc:n}){if(!n.directives)return"";let i=[],r=(O(s)||T(s))&&s.anchor;r&&st(r)&&(t.add(r),i.push(`&${r}`));let o=s.tag?s.tag:e.default?null:e.tag;return o&&i.push(n.directives.tagString(o)),i.join(" ")}function ae(s,e,t,n){if(A(s))return s.toString(e,t,n);if(F(s)){if(e.doc.directives)return s.toString(e);if(e.resolvedAliases?.has(s))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(s):e.resolvedAliases=new Set([s]),s=s.resolve(e.doc)}let i,r=L(s)?s:e.doc.createNode(s,{onTagObj:a=>i=a});i||(i=dn(e.doc.schema.tags,r));let o=gn(r,i,e);o.length>0&&(e.indentAtStart=(e.indentAtStart??0)+o.length+1);let l=typeof i.stringify=="function"?i.stringify(r,e,t,n):O(r)?le(r,e,t,n):r.toString(e,t,n);return o?O(r)||l[0]==="{"||l[0]==="["?`${o} ${l}`:`${o} +${e.indent}${l}`:l}function ys({key:s,value:e},t,n,i){let{allNullValues:r,doc:o,indent:l,indentStep:a,options:{commentString:c,indentSeq:p,simpleKeys:f}}=t,h=L(s)&&s.comment||null;if(f){if(h)throw new Error("With simple keys, key nodes cannot have comments");if(T(s)){let I="With simple keys, collection cannot be used as a key value";throw new Error(I)}}let d=!f&&(!s||h&&e==null&&!t.inFlow||T(s)||(O(s)?s.type===y.BLOCK_FOLDED||s.type===y.BLOCK_LITERAL:typeof s=="object"));t=Object.assign({},t,{allNullValues:!1,implicitKey:!d&&(f||!r),indent:l+a});let b=!1,u=!1,m=ae(s,t,()=>b=!0,()=>u=!0);if(!d&&!t.inFlow&&m.length>1024){if(f)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");d=!0}if(t.inFlow){if(r||e==null)return b&&n&&n(),m===""?"?":d?`? ${m}`:m}else if(r&&!f||e==null&&d)return m=`? ${m}`,h&&!b?m+=te(m,t.indent,c(h)):u&&i&&i(),m;b&&(h=null),d?(h&&(m+=te(m,t.indent,c(h))),m=`? ${m} +${l}:`):(m=`${m}:`,h&&(m+=te(m,t.indent,c(h))));let S,w,k;L(e)?(S=!!e.spaceBefore,w=e.commentBefore,k=e.comment):(S=!1,w=null,k=null,e&&typeof e=="object"&&(e=o.createNode(e))),t.implicitKey=!1,!d&&!h&&O(e)&&(t.indentAtStart=m.length+1),u=!1,!p&&a.length>=2&&!t.inFlow&&!d&&U(e)&&!e.flow&&!e.tag&&!e.anchor&&(t.indent=t.indent.substring(2));let N=!1,E=ae(e,t,()=>N=!0,()=>u=!0),g=" ";if(h||S||w){if(g=S?` +`:"",w){let I=c(w);g+=` +${Y(I,t.indent)}`}E===""&&!t.inFlow?g===` +`&&(g=` + +`):g+=` +${t.indent}`}else if(!d&&T(e)){let I=E[0],v=E.indexOf(` +`),B=v!==-1,de=t.inFlow??e.flow??e.items.length===0;if(B||!de){let Se=!1;if(B&&(I==="&"||I==="!")){let P=E.indexOf(" ");I==="&"&&P!==-1&&Ps===bs||O(s)&&s.value===bs&&(!s.type||s.type===y.PLAIN);function xt(s,e,t){let n=s&&F(t)?t.resolve(s.doc):t;if(!R(n))throw new Error("Merge sources must be maps or map aliases");let i=n.toJSON(null,s,Map);for(let[r,o]of i)e instanceof Map?e.has(r)||e.set(r,o):e instanceof Set?e.add(r):Object.prototype.hasOwnProperty.call(e,r)||Object.defineProperty(e,r,{value:o,writable:!0,enumerable:!0,configurable:!0});return e}function bn(s,e,t){if(e===null)return"";if(typeof e!="object")return String(e);if(L(s)&&t?.doc){let n=ct(t.doc,{});n.anchors=new Set;for(let r of t.anchors.keys())n.anchors.add(r.anchor);n.inFlow=!0,n.inStringifyKey=!0;let i=s.toString(n);if(!t.mapKeyWarned){let r=JSON.stringify(i);r.length>40&&(r=r.substring(0,36)+'..."'),ft(t.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${r}. Set mapAsMap: true to use object keys.`),t.mapKeyWarned=!0}return i}return JSON.stringify(e)}function Ee(s,e,t){let n=oe(s,void 0,t),i=oe(e,void 0,t);return new C(n,i)}var C=class s{constructor(e,t=null){Object.defineProperty(this,j,{value:Mt}),this.key=e,this.value=t}clone(e){let{key:t,value:n}=this;return L(t)&&(t=t.clone(e)),L(n)&&(n=n.clone(e)),new s(t,n)}toJSON(e,t){let n=t?.mapAsMap?new Map:{};return ut(t,n,this)}toString(e,t,n){return e?.doc?ys(this,e,t,n):JSON.stringify(this)}};function pt(s,e,t){return(e.inFlow??s.flow?Sn:wn)(s,e,t)}function wn({comment:s,items:e},t,{blockItemPrefix:n,flowChars:i,itemIndent:r,onChompKeep:o,onComment:l}){let{indent:a,options:{commentString:c}}=t,p=Object.assign({},t,{indent:r,type:null}),f=!1,h=[];for(let b=0;bm=null,()=>f=!0);m&&(S+=te(S,r,c(m))),f&&m&&(f=!1),h.push(n+S)}let d;if(h.length===0)d=i.start+i.end;else{d=h[0];for(let b=1;bm=null);bp||S.includes(` +`))&&(c=!0),f.push(S),p=f.length}let{start:h,end:d}=t;if(f.length===0)return h+d;if(!c){let b=f.reduce((u,m)=>u+m.length+2,2);c=e.options.lineWidth>0&&b>e.options.lineWidth}if(c){let b=h;for(let u of f)b+=u?` +${r}${i}${u}`:` +`;return`${b} +${i}${d}`}else return`${h}${o}${f.join(" ")}${o}${d}`}function ht({indent:s,options:{commentString:e}},t,n,i){if(n&&i&&(n=n.replace(/^\n+/,"")),n){let r=Y(e(n),s);t.push(r.trimStart())}}function ue(s,e){let t=O(e)?e.value:e;for(let n of s)if(A(n)&&(n.key===e||n.key===t||O(n.key)&&n.key.value===t))return n}var $=class extends ge{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(Q,e),this.items=[]}static from(e,t,n){let{keepUndefined:i,replacer:r}=n,o=new this(e),l=(a,c)=>{if(typeof r=="function")c=r.call(t,a,c);else if(Array.isArray(r)&&!r.includes(a))return;(c!==void 0||i)&&o.items.push(Ee(a,c,n))};if(t instanceof Map)for(let[a,c]of t)l(a,c);else if(t&&typeof t=="object")for(let a of Object.keys(t))l(a,t[a]);return typeof e.sortMapEntries=="function"&&o.items.sort(e.sortMapEntries),o}add(e,t){let n;A(e)?n=e:!e||typeof e!="object"||!("key"in e)?n=new C(e,e?.value):n=new C(e.key,e.value);let i=ue(this.items,n.key),r=this.schema?.sortMapEntries;if(i){if(!t)throw new Error(`Key ${n.key} already set`);O(i.value)&&it(n.value)?i.value.value=n.value:i.value=n.value}else if(r){let o=this.items.findIndex(l=>r(n,l)<0);o===-1?this.items.push(n):this.items.splice(o,0,n)}else this.items.push(n)}delete(e){let t=ue(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){let i=ue(this.items,e)?.value;return(!t&&O(i)?i.value:i)??void 0}has(e){return!!ue(this.items,e)}set(e,t){this.add(new C(e,t),!0)}toJSON(e,t,n){let i=n?new n:t?.mapAsMap?new Map:{};t?.onCreate&&t.onCreate(i);for(let r of this.items)ut(t,i,r);return i}toString(e,t,n){if(!e)return JSON.stringify(this);for(let i of this.items)if(!A(i))throw new Error(`Map items must all be pairs; found ${JSON.stringify(i)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),pt(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:n,onComment:t})}};var G={collection:"map",default:!0,nodeClass:$,tag:"tag:yaml.org,2002:map",resolve(s,e){return R(s)||e("Expected a mapping for this tag"),s},createNode:(s,e,t)=>$.from(s,e,t)};var M=class extends ge{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(re,e),this.items=[]}add(e){this.items.push(e)}delete(e){let t=mt(e);return typeof t!="number"?!1:this.items.splice(t,1).length>0}get(e,t){let n=mt(e);if(typeof n!="number")return;let i=this.items[n];return!t&&O(i)?i.value:i}has(e){let t=mt(e);return typeof t=="number"&&t=0?e:null}var W={collection:"seq",default:!0,nodeClass:M,tag:"tag:yaml.org,2002:seq",resolve(s,e){return U(s)||e("Expected a sequence for this tag"),s},createNode:(s,e,t)=>M.from(s,e,t)};var he={identify:s=>typeof s=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:s=>s,stringify(s,e,t,n){return e=Object.assign({actualString:!0},e),le(s,e,t,n)}};var ye={identify:s=>s==null,createNode:()=>new y(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new y(null),stringify:({source:s},e)=>typeof s=="string"&&ye.test.test(s)?s:e.options.nullStr};var Re={identify:s=>typeof s=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:s=>new y(s[0]==="t"||s[0]==="T"),stringify({source:s,value:e},t){if(s&&Re.test.test(s)){let n=s[0]==="t"||s[0]==="T";if(e===n)return s}return e?t.options.trueStr:t.options.falseStr}};function D({format:s,minFractionDigits:e,tag:t,value:n}){if(typeof n=="bigint")return String(n);let i=typeof n=="number"?n:Number(n);if(!isFinite(i))return isNaN(i)?".nan":i<0?"-.inf":".inf";let r=JSON.stringify(n);if(!s&&e&&(!t||t==="tag:yaml.org,2002:float")&&/^\d/.test(r)){let o=r.indexOf(".");o<0&&(o=r.length,r+=".");let l=e-(r.length-o-1);for(;l-- >0;)r+="0"}return r}var dt={identify:s=>typeof s=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF|nan|NaN|NAN))$/,resolve:s=>s.slice(-3).toLowerCase()==="nan"?NaN:s[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:D},gt={identify:s=>typeof s=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:s=>parseFloat(s),stringify(s){let e=Number(s.value);return isFinite(e)?e.toExponential():D(s)}},yt={identify:s=>typeof s=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(s){let e=new y(parseFloat(s)),t=s.indexOf(".");return t!==-1&&s[s.length-1]==="0"&&(e.minFractionDigits=s.length-t-1),e},stringify:D};var bt=s=>typeof s=="bigint"||Number.isInteger(s),Ft=(s,e,t,{intAsBigInt:n})=>n?BigInt(s):parseInt(s.substring(e),t);function ws(s,e,t){let{value:n}=s;return bt(n)&&n>=0?t+n.toString(e):D(s)}var wt={identify:s=>bt(s)&&s>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(s,e,t)=>Ft(s,2,8,t),stringify:s=>ws(s,8,"0o")},St={identify:bt,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(s,e,t)=>Ft(s,0,10,t),stringify:D},kt={identify:s=>bt(s)&&s>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(s,e,t)=>Ft(s,2,16,t),stringify:s=>ws(s,16,"0x")};var Ss=[G,W,he,ye,Re,wt,St,kt,dt,gt,yt];function ks(s){return typeof s=="bigint"||Number.isInteger(s)}var Nt=({value:s})=>JSON.stringify(s),kn=[{identify:s=>typeof s=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:s=>s,stringify:Nt},{identify:s=>s==null,createNode:()=>new y(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:Nt},{identify:s=>typeof s=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true|false$/,resolve:s=>s==="true",stringify:Nt},{identify:ks,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(s,e,{intAsBigInt:t})=>t?BigInt(s):parseInt(s,10),stringify:({value:s})=>ks(s)?s.toString():JSON.stringify(s)},{identify:s=>typeof s=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:s=>parseFloat(s),stringify:Nt}],Nn={default:!0,tag:"",test:/^/,resolve(s,e){return e(`Unresolved plain scalar ${JSON.stringify(s)}`),s}},Ns=[G,W].concat(kn,Nn);var Ue={identify:s=>s instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(s,e){if(typeof Buffer=="function")return Buffer.from(s,"base64");if(typeof atob=="function"){let t=atob(s.replace(/[\n\r]/g,"")),n=new Uint8Array(t.length);for(let i=0;i1&&e("Each pair must have its own sequence indicator");let i=n.items[0]||new C(new y(null));if(n.commentBefore&&(i.key.commentBefore=i.key.commentBefore?`${n.commentBefore} +${i.key.commentBefore}`:n.commentBefore),n.comment){let r=i.value??i.key;r.comment=r.comment?`${n.comment} +${r.comment}`:n.comment}n=i}s.items[t]=A(n)?n:new C(n)}}else e("Expected a sequence for this tag");return s}function Ut(s,e,t){let{replacer:n}=t,i=new M(s);i.tag="tag:yaml.org,2002:pairs";let r=0;if(e&&Symbol.iterator in Object(e))for(let o of e){typeof n=="function"&&(o=n.call(e,String(r++),o));let l,a;if(Array.isArray(o))if(o.length===2)l=o[0],a=o[1];else throw new TypeError(`Expected [key, value] tuple: ${o}`);else if(o&&o instanceof Object){let c=Object.keys(o);if(c.length===1)l=c[0],a=o[l];else throw new TypeError(`Expected tuple with one key, not ${c.length} keys`)}else l=o;i.items.push(Ee(l,a,t))}return i}var Ve={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:Rt,createNode:Ut};var Le=class s extends M{constructor(){super(),this.add=$.prototype.add.bind(this),this.delete=$.prototype.delete.bind(this),this.get=$.prototype.get.bind(this),this.has=$.prototype.has.bind(this),this.set=$.prototype.set.bind(this),this.tag=s.tag}toJSON(e,t){if(!t)return super.toJSON(e);let n=new Map;t?.onCreate&&t.onCreate(n);for(let i of this.items){let r,o;if(A(i)?(r=_(i.key,"",t),o=_(i.value,r,t)):r=_(i,"",t),n.has(r))throw new Error("Ordered maps must not include duplicate keys");n.set(r,o)}return n}static from(e,t,n){let i=Ut(e,t,n),r=new this;return r.items=i.items,r}};Le.tag="tag:yaml.org,2002:omap";var Ye={collection:"seq",identify:s=>s instanceof Map,nodeClass:Le,default:!1,tag:"tag:yaml.org,2002:omap",resolve(s,e){let t=Rt(s,e),n=[];for(let{key:i}of t.items)O(i)&&(n.includes(i.value)?e(`Ordered maps must not include duplicate keys: ${i.value}`):n.push(i.value));return Object.assign(new Le,t)},createNode:(s,e,t)=>Le.from(s,e,t)};function Os({value:s,source:e},t){return e&&(s?Vt:Yt).test.test(e)?e:s?t.options.trueStr:t.options.falseStr}var Vt={identify:s=>s===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new y(!0),stringify:Os},Yt={identify:s=>s===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new y(!1),stringify:Os};var As={identify:s=>typeof s=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?\.(?:inf|Inf|INF|nan|NaN|NAN)$/,resolve:s=>s.slice(-3).toLowerCase()==="nan"?NaN:s[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:D},Es={identify:s=>typeof s=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:s=>parseFloat(s.replace(/_/g,"")),stringify(s){let e=Number(s.value);return isFinite(e)?e.toExponential():D(s)}},Ls={identify:s=>typeof s=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(s){let e=new y(parseFloat(s.replace(/_/g,""))),t=s.indexOf(".");if(t!==-1){let n=s.substring(t+1).replace(/_/g,"");n[n.length-1]==="0"&&(e.minFractionDigits=n.length)}return e},stringify:D};var Je=s=>typeof s=="bigint"||Number.isInteger(s);function Ot(s,e,t,{intAsBigInt:n}){let i=s[0];if((i==="-"||i==="+")&&(e+=1),s=s.substring(e).replace(/_/g,""),n){switch(t){case 2:s=`0b${s}`;break;case 8:s=`0o${s}`;break;case 16:s=`0x${s}`;break}let o=BigInt(s);return i==="-"?BigInt(-1)*o:o}let r=parseInt(s,t);return i==="-"?-1*r:r}function Jt(s,e,t){let{value:n}=s;if(Je(n)){let i=n.toString(e);return n<0?"-"+t+i.substr(1):t+i}return D(s)}var Ts={identify:Je,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(s,e,t)=>Ot(s,2,2,t),stringify:s=>Jt(s,2,"0b")},Is={identify:Je,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(s,e,t)=>Ot(s,1,8,t),stringify:s=>Jt(s,8,"0")},Cs={identify:Je,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(s,e,t)=>Ot(s,0,10,t),stringify:D},vs={identify:Je,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(s,e,t)=>Ot(s,2,16,t),stringify:s=>Jt(s,16,"0x")};var Te=class s extends ${constructor(e){super(e),this.tag=s.tag}add(e){let t;A(e)?t=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?t=new C(e.key,null):t=new C(e,null),ue(this.items,t.key)||this.items.push(t)}get(e,t){let n=ue(this.items,e);return!t&&A(n)?O(n.key)?n.key.value:n.key:n}set(e,t){if(typeof t!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);let n=ue(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new C(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,n);throw new Error("Set items must all have null values")}static from(e,t,n){let{replacer:i}=n,r=new this(e);if(t&&Symbol.iterator in Object(t))for(let o of t)typeof i=="function"&&(o=i.call(t,o,o)),r.items.push(Ee(o,null,n));return r}};Te.tag="tag:yaml.org,2002:set";var Qe={collection:"map",identify:s=>s instanceof Set,nodeClass:Te,default:!1,tag:"tag:yaml.org,2002:set",createNode:(s,e,t)=>Te.from(s,e,t),resolve(s,e){if(R(s)){if(s.hasAllNullValues(!0))return Object.assign(new Te,s);e("Set items must all have null values")}else e("Expected a mapping for this tag");return s}};function Qt(s,e){let t=s[0],n=t==="-"||t==="+"?s.substring(1):s,i=o=>e?BigInt(o):Number(o),r=n.replace(/_/g,"").split(":").reduce((o,l)=>o*i(60)+i(l),i(0));return t==="-"?i(-1)*r:r}function $s(s){let{value:e}=s,t=o=>o;if(typeof e=="bigint")t=o=>BigInt(o);else if(isNaN(e)||!isFinite(e))return D(s);let n="";e<0&&(n="-",e*=t(-1));let i=t(60),r=[e%i];return e<60?r.unshift(0):(e=(e-r[0])/i,r.unshift(e%i),e>=60&&(e=(e-r[0])/i,r.unshift(e))),n+r.map(o=>String(o).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}var At={identify:s=>typeof s=="bigint"||Number.isInteger(s),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(s,e,{intAsBigInt:t})=>Qt(s,t),stringify:$s},Et={identify:s=>typeof s=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:s=>Qt(s,!1),stringify:$s},Ie={identify:s=>s instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(s){let e=s.match(Ie.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,t,n,i,r,o,l]=e.map(Number),a=e[7]?Number((e[7]+"00").substr(1,3)):0,c=Date.UTC(t,n-1,i,r||0,o||0,l||0,a),p=e[8];if(p&&p!=="Z"){let f=Qt(p,!1);Math.abs(f)<30&&(f*=60),c-=6e4*f}return new Date(c)},stringify:({value:s})=>s.toISOString().replace(/((T00:00)?:00)?\.000Z$/,"")};var Gt=[G,W,he,ye,Vt,Yt,Ts,Is,Cs,vs,As,Es,Ls,Ue,Ye,Ve,Qe,At,Et,Ie];var _s=new Map([["core",Ss],["failsafe",[G,W,he]],["json",Ns],["yaml11",Gt],["yaml-1.1",Gt]]),Ps={binary:Ue,bool:Re,float:yt,floatExp:gt,floatNaN:dt,floatTime:Et,int:St,intHex:kt,intOct:wt,intTime:At,map:G,null:ye,omap:Ye,pairs:Ve,seq:W,set:Qe,timestamp:Ie},Ms={"tag:yaml.org,2002:binary":Ue,"tag:yaml.org,2002:omap":Ye,"tag:yaml.org,2002:pairs":Ve,"tag:yaml.org,2002:set":Qe,"tag:yaml.org,2002:timestamp":Ie};function Lt(s,e){let t=_s.get(e);if(!t)if(Array.isArray(s))t=[];else{let n=Array.from(_s.keys()).filter(i=>i!=="yaml11").map(i=>JSON.stringify(i)).join(", ");throw new Error(`Unknown schema "${e}"; use one of ${n} or define customTags array`)}if(Array.isArray(s))for(let n of s)t=t.concat(n);else typeof s=="function"&&(t=s(t.slice()));return t.map(n=>{if(typeof n!="string")return n;let i=Ps[n];if(i)return i;let r=Object.keys(Ps).map(o=>JSON.stringify(o)).join(", ");throw new Error(`Unknown custom tag "${n}"; use one of ${r}`)})}var On=(s,e)=>s.keye.key?1:0,Ce=class s{constructor({compat:e,customTags:t,merge:n,resolveKnownTags:i,schema:r,sortMapEntries:o,toStringDefaults:l}){this.compat=Array.isArray(e)?Lt(e,"compat"):e?Lt(null,e):null,this.merge=!!n,this.name=typeof r=="string"&&r||"core",this.knownTags=i?Ms:{},this.tags=Lt(t,this.name),this.toStringOptions=l??null,Object.defineProperty(this,Q,{value:G}),Object.defineProperty(this,x,{value:he}),Object.defineProperty(this,re,{value:W}),this.sortMapEntries=typeof o=="function"?o:o===!0?On:null}clone(){let e=Object.create(s.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}};function Bs(s,e){let t=[],n=e.directives===!0;if(e.directives!==!1&&s.directives){let a=s.directives.toString(s);a?(t.push(a),n=!0):s.directives.docStart&&(n=!0)}n&&t.push("---");let i=ct(s,e),{commentString:r}=i.options;if(s.commentBefore){t.length!==1&&t.unshift("");let a=r(s.commentBefore);t.unshift(Y(a,""))}let o=!1,l=null;if(s.contents){if(L(s.contents)){if(s.contents.spaceBefore&&n&&t.push(""),s.contents.commentBefore){let p=r(s.contents.commentBefore);t.push(Y(p,""))}i.forceBlockIndent=!!s.comment,l=s.contents.comment}let a=l?void 0:()=>o=!0,c=ae(s.contents,i,()=>l=null,a);l&&(c+=te(c,"",r(l))),(c[0]==="|"||c[0]===">")&&t[t.length-1]==="---"?t[t.length-1]=`--- ${c}`:t.push(c)}else t.push(ae(s.contents,i));if(s.directives?.docEnd)if(s.comment){let a=r(s.comment);a.includes(` +`)?(t.push("..."),t.push(Y(a,""))):t.push(`... ${a}`)}else t.push("...");else{let a=s.comment;a&&o&&(a=a.replace(/^\n+/,"")),a&&((!o||l)&&t[t.length-1]!==""&&t.push(""),t.push(Y(r(a),"")))}return t.join(` +`)+` +`}var se=class s{constructor(e,t,n){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,j,{value:tt});let i=null;typeof t=="function"||Array.isArray(t)?i=t:n===void 0&&t&&(n=t,t=void 0);let r=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,uniqueKeys:!0,version:"1.2"},n);this.options=r;let{version:o}=r;n?._directives?(this.directives=n._directives.atDocument(),this.directives.yaml.explicit&&(o=this.directives.yaml.version)):this.directives=new Z({version:o}),this.setSchema(o,n),this.contents=e===void 0?null:this.createNode(e,i,n)}clone(){let e=Object.create(s.prototype,{[j]:{value:tt}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=L(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){ve(this.contents)&&this.contents.add(e)}addIn(e,t){ve(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){let n=Bt(this);e.anchor=!t||n.has(t)?Dt(t||"a",n):t}return new ee(e.anchor)}createNode(e,t,n){let i;if(typeof t=="function")e=t.call({"":e},"",e),i=t;else if(Array.isArray(t)){let m=w=>typeof w=="number"||w instanceof String||w instanceof Number,S=t.filter(m).map(String);S.length>0&&(t=t.concat(S)),i=t}else n===void 0&&t&&(n=t,t=void 0);let{aliasDuplicateObjects:r,anchorPrefix:o,flow:l,keepUndefined:a,onTagObj:c,tag:p}=n??{},{onAnchor:f,setAnchors:h,sourceObjects:d}=ms(this,o||"a"),b={aliasDuplicateObjects:r??!0,keepUndefined:a??!1,onAnchor:f,onTagObj:c,replacer:i,schema:this.schema,sourceObjects:d},u=oe(e,p,b);return l&&T(u)&&(u.flow=!0),h(),u}createPair(e,t,n={}){let i=this.createNode(e,null,n),r=this.createNode(t,null,n);return new C(i,r)}delete(e){return ve(this.contents)?this.contents.delete(e):!1}deleteIn(e){return Oe(e)?this.contents==null?!1:(this.contents=null,!0):ve(this.contents)?this.contents.deleteIn(e):!1}get(e,t){return T(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return Oe(e)?!t&&O(this.contents)?this.contents.value:this.contents:T(this.contents)?this.contents.getIn(e,t):void 0}has(e){return T(this.contents)?this.contents.has(e):!1}hasIn(e){return Oe(e)?this.contents!==void 0:T(this.contents)?this.contents.hasIn(e):!1}set(e,t){this.contents==null?this.contents=Ke(this.schema,[e],t):ve(this.contents)&&this.contents.set(e,t)}setIn(e,t){Oe(e)?this.contents=t:this.contents==null?this.contents=Ke(this.schema,Array.from(e),t):ve(this.contents)&&this.contents.setIn(e,t)}setSchema(e,t={}){typeof e=="number"&&(e=String(e));let n;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new Z({version:"1.1"}),n={merge:!0,resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new Z({version:e}),n={merge:!1,resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,n=null;break;default:{let i=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${i}`)}}if(t.schema instanceof Object)this.schema=t.schema;else if(n)this.schema=new Ce(Object.assign(n,t));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:t,mapAsMap:n,maxAliasCount:i,onAnchor:r,reviver:o}={}){let l={anchors:new Map,doc:this,keep:!e,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof i=="number"?i:100},a=_(this.contents,t??"",l);if(typeof r=="function")for(let{count:c,res:p}of l.anchors.values())r(p,c);return typeof o=="function"?ce(o,{"":a},"",a):a}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){let t=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${t}`)}return Bs(this,e)}};function ve(s){if(T(s))return!0;throw new Error("Expected a YAML collection as document contents")}var $e=class extends Error{constructor(e,t,n,i){super(),this.name=e,this.code=n,this.message=i,this.pos=t}},q=class extends $e{constructor(e,t,n){super("YAMLParseError",e,t,n)}},_e=class extends $e{constructor(e,t,n){super("YAMLWarning",e,t,n)}},Ge=(s,e)=>t=>{if(t.pos[0]===-1)return;t.linePos=t.pos.map(l=>e.linePos(l));let{line:n,col:i}=t.linePos[0];t.message+=` at line ${n}, column ${i}`;let r=i-1,o=s.substring(e.lineStarts[n-1],e.lineStarts[n]).replace(/[\n\r]+$/,"");if(r>=60&&o.length>80){let l=Math.min(r-39,o.length-79);o="\u2026"+o.substring(l),r-=l-1}if(o.length>80&&(o=o.substring(0,79)+"\u2026"),n>1&&/^ *$/.test(o.substring(0,r))){let l=s.substring(e.lineStarts[n-2],e.lineStarts[n-1]);l.length>80&&(l=l.substring(0,79)+`\u2026 +`),o=l+o}if(/[^ ]/.test(o)){let l=1,a=t.linePos[1];a&&a.line===n&&a.col>i&&(l=Math.max(1,Math.min(a.col-i,80-r)));let c=" ".repeat(r)+"^".repeat(l);t.message+=`: + +${o} +${c} +`}};function ne(s,{flow:e,indicator:t,next:n,offset:i,onError:r,startOnNewline:o}){let l=!1,a=o,c=o,p="",f="",h=!1,d=!1,b=!1,u=null,m=null,S=null,w=null,k=null;for(let g of s)switch(b&&(g.type!=="space"&&g.type!=="newline"&&g.type!=="comma"&&r(g.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),b=!1),g.type){case"space":!e&&a&&t!=="doc-start"&&g.source[0]===" "&&r(g,"TAB_AS_INDENT","Tabs are not allowed as indentation"),c=!0;break;case"comment":{c||r(g,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let I=g.source.substring(1)||" ";p?p+=f+I:p=I,f="",a=!1;break}case"newline":a?p?p+=g.source:l=!0:f+=g.source,a=!0,h=!0,(u||m)&&(d=!0),c=!0;break;case"anchor":u&&r(g,"MULTIPLE_ANCHORS","A node can have at most one anchor"),g.source.endsWith(":")&&r(g.offset+g.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),u=g,k===null&&(k=g.offset),a=!1,c=!1,b=!0;break;case"tag":{m&&r(g,"MULTIPLE_TAGS","A node can have at most one tag"),m=g,k===null&&(k=g.offset),a=!1,c=!1,b=!0;break}case t:(u||m)&&r(g,"BAD_PROP_ORDER",`Anchors and tags must be after the ${g.source} indicator`),w&&r(g,"UNEXPECTED_TOKEN",`Unexpected ${g.source} in ${e??"collection"}`),w=g,a=!1,c=!1;break;case"comma":if(e){S&&r(g,"UNEXPECTED_TOKEN",`Unexpected , in ${e}`),S=g,a=!1,c=!1;break}default:r(g,"UNEXPECTED_TOKEN",`Unexpected ${g.type} token`),a=!1,c=!1}let N=s[s.length-1],E=N?N.offset+N.source.length:i;return b&&n&&n.type!=="space"&&n.type!=="newline"&&n.type!=="comma"&&(n.type!=="scalar"||n.source!=="")&&r(n.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),{comma:S,found:w,spaceBefore:l,comment:p,hasNewline:h,hasNewlineAfterProp:d,anchor:u,tag:m,end:E,start:k??E}}function pe(s){if(!s)return null;switch(s.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(s.source.includes(` +`))return!0;if(s.end){for(let e of s.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(let e of s.items){for(let t of e.start)if(t.type==="newline")return!0;if(e.sep){for(let t of e.sep)if(t.type==="newline")return!0}if(pe(e.key)||pe(e.value))return!0}return!1;default:return!0}}function We(s,e,t){if(e?.type==="flow-collection"){let n=e.end[0];n.indent===s&&(n.source==="]"||n.source==="}")&&pe(e)&&t(n,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function Tt(s,e,t){let{uniqueKeys:n}=s.options;if(n===!1)return!1;let i=typeof n=="function"?n:(r,o)=>r===o||O(r)&&O(o)&&r.value===o.value&&!(r.value==="<<"&&s.schema.merge);return e.some(r=>i(r.key,t))}var Ds="All mapping items must start at the same column";function js({composeNode:s,composeEmptyNode:e},t,n,i,r){let o=r?.nodeClass??$,l=new o(t.schema);t.atRoot&&(t.atRoot=!1);let a=n.offset,c=null;for(let p of n.items){let{start:f,key:h,sep:d,value:b}=p,u=ne(f,{indicator:"explicit-key-ind",next:h??d?.[0],offset:a,onError:i,startOnNewline:!0}),m=!u.found;if(m){if(h&&(h.type==="block-seq"?i(a,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in h&&h.indent!==n.indent&&i(a,"BAD_INDENT",Ds)),!u.anchor&&!u.tag&&!d){c=u.end,u.comment&&(l.comment?l.comment+=` +`+u.comment:l.comment=u.comment);continue}(u.hasNewlineAfterProp||pe(h))&&i(h??f[f.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else u.found?.indent!==n.indent&&i(a,"BAD_INDENT",Ds);let S=u.end,w=h?s(t,h,u,i):e(t,S,f,null,u,i);t.schema.compat&&We(n.indent,h,i),Tt(t,l.items,w)&&i(S,"DUPLICATE_KEY","Map keys must be unique");let k=ne(d??[],{indicator:"map-value-ind",next:b,offset:w.range[2],onError:i,startOnNewline:!h||h.type==="block-scalar"});if(a=k.end,k.found){m&&(b?.type==="block-map"&&!k.hasNewline&&i(a,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),t.options.strict&&u.starts&&(s.type==="block-map"||s.type==="block-seq");function qs({composeNode:s,composeEmptyNode:e},t,n,i,r){let o=n.start.source==="{",l=o?"flow map":"flow sequence",a=r?.nodeClass??(o?$:M),c=new a(t.schema);c.flow=!0;let p=t.atRoot;p&&(t.atRoot=!1);let f=n.offset+n.start.source.length;for(let m=0;m0){let m=ie(b,u,t.options.strict,i);m.comment&&(c.comment?c.comment+=` +`+m.comment:c.comment=m.comment),c.range=[n.offset,u,m.offset]}else c.range=[n.offset,u,u];return c}function Xt(s,e,t,n,i,r){let o=t.type==="block-map"?js(s,e,t,n,r):t.type==="block-seq"?Ks(s,e,t,n,r):qs(s,e,t,n,r),l=o.constructor;return i==="!"||i===l.tagName?(o.tag=l.tagName,o):(i&&(o.tag=i),o)}function xs(s,e,t,n,i){let r=n?e.directives.tagName(n.source,f=>i(n,"TAG_RESOLVE_FAILED",f)):null,o=t.type==="block-map"?"map":t.type==="block-seq"?"seq":t.start.source==="{"?"map":"seq";if(!n||!r||r==="!"||r===$.tagName&&o==="map"||r===M.tagName&&o==="seq"||!o)return Xt(s,e,t,i,r);let l=e.schema.tags.find(f=>f.tag===r&&f.collection===o);if(!l){let f=e.schema.knownTags[r];if(f&&f.collection===o)e.schema.tags.push(Object.assign({},f,{default:!1})),l=f;else return f?.collection?i(n,"BAD_COLLECTION_TYPE",`${f.tag} used for ${o} collection, but expects ${f.collection}`,!0):i(n,"TAG_RESOLVE_FAILED",`Unresolved tag: ${r}`,!0),Xt(s,e,t,i,r)}let a=Xt(s,e,t,i,r,l),c=l.resolve?.(a,f=>i(n,"TAG_RESOLVE_FAILED",f),e.options)??a,p=L(c)?c:new y(c);return p.range=a.range,p.tag=r,l?.format&&(p.format=l.format),p}function It(s,e,t){let n=s.offset,i=An(s,e,t);if(!i)return{value:"",type:null,comment:"",range:[n,n,n]};let r=i.mode===">"?y.BLOCK_FOLDED:y.BLOCK_LITERAL,o=s.source?En(s.source):[],l=o.length;for(let u=o.length-1;u>=0;--u){let m=o[u][1];if(m===""||m==="\r")l=u;else break}if(l===0){let u=i.chomp==="+"&&o.length>0?` +`.repeat(Math.max(1,o.length-1)):"",m=n+i.length;return s.source&&(m+=s.source.length),{value:u,type:r,comment:i.comment,range:[n,m,m]}}let a=s.indent+i.indent,c=s.offset+i.length,p=0;for(let u=0;ua&&(a=m.length);else{m.length=l;--u)o[u][0].length>a&&(l=u+1);let f="",h="",d=!1;for(let u=0;ua||S[0]===" "?(h===" "?h=` +`:!d&&h===` +`&&(h=` + +`),f+=h+m.slice(a)+S,h=` +`,d=!0):S===""?h===` +`?f+=` +`:h=` +`:(f+=h+S,h=" ",d=!1)}switch(i.chomp){case"-":break;case"+":for(let u=l;ut(n+h,d,b);switch(i){case"scalar":l=y.PLAIN,a=Ln(r,c);break;case"single-quoted-scalar":l=y.QUOTE_SINGLE,a=Tn(r,c);break;case"double-quoted-scalar":l=y.QUOTE_DOUBLE,a=In(r,c);break;default:return t(s,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${i}`),{value:"",type:null,comment:"",range:[n,n+r.length,n+r.length]}}let p=n+r.length,f=ie(o,p,e,t);return{value:a,type:l,comment:f.comment,range:[n,p,f.offset]}}function Ln(s,e){let t="";switch(s[0]){case" ":t="a tab character";break;case",":t="flow indicator character ,";break;case"%":t="directive indicator character %";break;case"|":case">":{t=`block scalar indicator ${s[0]}`;break}case"@":case"`":{t=`reserved character ${s[0]}`;break}}return t&&e(0,"BAD_SCALAR_START",`Plain value cannot start with ${t}`),Fs(s)}function Tn(s,e){return(s[s.length-1]!=="'"||s.length===1)&&e(s.length,"MISSING_CHAR","Missing closing 'quote"),Fs(s.slice(1,-1)).replace(/''/g,"'")}function Fs(s){let e,t;try{e=new RegExp(`(.*?)(?r?s.slice(r,n+1):i)}else t+=i}return(s[s.length-1]!=='"'||s.length===1)&&e(s.length,"MISSING_CHAR",'Missing closing "quote'),t}function Cn(s,e){let t="",n=s[e+1];for(;(n===" "||n===" "||n===` +`||n==="\r")&&!(n==="\r"&&s[e+2]!==` +`);)n===` +`&&(t+=` +`),e+=1,n=s[e+1];return t||(t=" "),{fold:t,offset:e}}var vn={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:` +`,r:"\r",t:" ",v:"\v",N:"\x85",_:"\xA0",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function $n(s,e,t,n){let i=s.substr(e,t),o=i.length===t&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;if(isNaN(o)){let l=s.substr(e-2,t+2);return n(e-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${l}`),l}return String.fromCodePoint(o)}function zt(s,e,t,n){let{value:i,type:r,comment:o,range:l}=e.type==="block-scalar"?It(e,s.options.strict,n):Ct(e,s.options.strict,n),a=t?s.directives.tagName(t.source,f=>n(t,"TAG_RESOLVE_FAILED",f)):null,c=t&&a?_n(s.schema,i,a,t,n):e.type==="scalar"?Pn(s,i,e,n):s.schema[x],p;try{let f=c.resolve(i,h=>n(t??e,"TAG_RESOLVE_FAILED",h),s.options);p=O(f)?f:new y(f)}catch(f){let h=f instanceof Error?f.message:String(f);n(t??e,"TAG_RESOLVE_FAILED",h),p=new y(i)}return p.range=l,p.source=i,r&&(p.type=r),a&&(p.tag=a),c.format&&(p.format=c.format),o&&(p.comment=o),p}function _n(s,e,t,n,i){if(t==="!")return s[x];let r=[];for(let l of s.tags)if(!l.collection&&l.tag===t)if(l.default&&l.test)r.push(l);else return l;for(let l of r)if(l.test?.test(e))return l;let o=s.knownTags[t];return o&&!o.collection?(s.tags.push(Object.assign({},o,{default:!1,test:void 0})),o):(i(n,"TAG_RESOLVE_FAILED",`Unresolved tag: ${t}`,t!=="tag:yaml.org,2002:str"),s[x])}function Pn({directives:s,schema:e},t,n,i){let r=e.tags.find(o=>o.default&&o.test?.test(t))||e[x];if(e.compat){let o=e.compat.find(l=>l.default&&l.test?.test(t))??e[x];if(r.tag!==o.tag){let l=s.tagString(r.tag),a=s.tagString(o.tag),c=`Value may be parsed as either ${l} or ${a}`;i(n,"TAG_RESOLVE_FAILED",c,!0)}}return r}function Rs(s,e,t){if(e){t===null&&(t=e.length);for(let n=t-1;n>=0;--n){let i=e[n];switch(i.type){case"space":case"comment":case"newline":s-=i.source.length;continue}for(i=e[++n];i?.type==="space";)s+=i.source.length,i=e[++n];break}}return s}var Mn={composeNode:Zt,composeEmptyNode:vt};function Zt(s,e,t,n){let{spaceBefore:i,comment:r,anchor:o,tag:l}=t,a,c=!0;switch(e.type){case"alias":a=Bn(s,e,n),(o||l)&&n(e,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":a=zt(s,e,l,n),o&&(a.anchor=o.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":a=xs(Mn,s,e,l,n),o&&(a.anchor=o.source.substring(1));break;default:{let p=e.type==="error"?e.message:`Unsupported token (type: ${e.type})`;n(e,"UNEXPECTED_TOKEN",p),a=vt(s,e.offset,void 0,null,t,n),c=!1}}return o&&a.anchor===""&&n(o,"BAD_ALIAS","Anchor cannot be an empty string"),i&&(a.spaceBefore=!0),r&&(e.type==="scalar"&&e.source===""?a.comment=r:a.commentBefore=r),s.options.keepSourceTokens&&c&&(a.srcToken=e),a}function vt(s,e,t,n,{spaceBefore:i,comment:r,anchor:o,tag:l,end:a},c){let p={type:"scalar",offset:Rs(e,t,n),indent:-1,source:""},f=zt(s,p,l,c);return o&&(f.anchor=o.source.substring(1),f.anchor===""&&c(o,"BAD_ALIAS","Anchor cannot be an empty string")),i&&(f.spaceBefore=!0),r&&(f.comment=r,f.range[2]=a),f}function Bn({options:s},{offset:e,source:t,end:n},i){let r=new ee(t.substring(1));r.source===""&&i(e,"BAD_ALIAS","Alias cannot be an empty string"),r.source.endsWith(":")&&i(e+t.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let o=e+t.length,l=ie(n,o,s.strict,i);return r.range=[e,o,l.offset],l.comment&&(r.comment=l.comment),r}function Us(s,e,{offset:t,start:n,value:i,end:r},o){let l=Object.assign({_directives:e},s),a=new se(void 0,l),c={atRoot:!0,directives:a.directives,options:a.options,schema:a.schema},p=ne(n,{indicator:"doc-start",next:i??r?.[0],offset:t,onError:o,startOnNewline:!0});p.found&&(a.directives.docStart=!0,i&&(i.type==="block-map"||i.type==="block-seq")&&!p.hasNewline&&o(p.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),a.contents=i?Zt(c,i,p,o):vt(c,p.end,n,null,p,o);let f=a.contents.range[2],h=ie(r,f,!1,o);return h.comment&&(a.comment=h.comment),a.range=[t,f,h.offset],a}function He(s){if(typeof s=="number")return[s,s+1];if(Array.isArray(s))return s.length===2?s:[s[0],s[1]];let{offset:e,source:t}=s;return[e,e+(typeof t=="string"?t.length:1)]}function Vs(s){let e="",t=!1,n=!1;for(let i=0;i{let o=He(t);r?this.warnings.push(new _e(o,n,i)):this.errors.push(new q(o,n,i))},this.directives=new Z({version:e.version||"1.2"}),this.options=e}decorate(e,t){let{comment:n,afterEmptyLine:i}=Vs(this.prelude);if(n){let r=e.contents;if(t)e.comment=e.comment?`${e.comment} +${n}`:n;else if(i||e.directives.docStart||!r)e.commentBefore=n;else if(T(r)&&!r.flow&&r.items.length>0){let o=r.items[0];A(o)&&(o=o.key);let l=o.commentBefore;o.commentBefore=l?`${n} +${l}`:n}else{let o=r.commentBefore;r.commentBefore=o?`${n} +${o}`:n}}t?(Array.prototype.push.apply(e.errors,this.errors),Array.prototype.push.apply(e.warnings,this.warnings)):(e.errors=this.errors,e.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:Vs(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,n=-1){for(let i of e)yield*this.next(i);yield*this.end(t,n)}*next(e){switch(e.type){case"directive":this.directives.add(e.source,(t,n,i)=>{let r=He(e);r[0]+=t,this.onError(r,"BAD_DIRECTIVE",n,i)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{let t=Us(this.options,this.directives,e,this.onError);this.atDirectives&&!t.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(t,!1),this.doc&&(yield this.doc),this.doc=t,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{let t=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,n=new q(He(e),"UNEXPECTED_TOKEN",t);this.atDirectives||!this.doc?this.errors.push(n):this.doc.errors.push(n);break}case"doc-end":{if(!this.doc){let n="Unexpected doc-end without preceding document";this.errors.push(new q(He(e),"UNEXPECTED_TOKEN",n));break}this.doc.directives.docEnd=!0;let t=ie(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){let n=this.doc.comment;this.doc.comment=n?`${n} +${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new q(He(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){let n=Object.assign({_directives:this.directives},this.options),i=new se(void 0,n);this.atDirectives&&this.onError(t,"MISSING_CHAR","Missing directives-end indicator line"),i.range=[0,t,t],this.decorate(i,!1),yield i}}};var ns={};as(ns,{BOM:()=>Xe,DOCUMENT:()=>ze,FLOW_END:()=>Ze,SCALAR:()=>Pe,createScalarToken:()=>Js,isCollection:()=>Kn,isScalar:()=>qn,prettyToken:()=>xn,resolveAsScalar:()=>Ys,setScalarValue:()=>Qs,stringify:()=>Ws,tokenType:()=>ss,visit:()=>me});function Ys(s,e=!0,t){if(s){let n=(i,r,o)=>{let l=typeof i=="number"?i:Array.isArray(i)?i[0]:i.offset;if(t)t(l,r,o);else throw new q([l,l+1],r,o)};switch(s.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return Ct(s,e,n);case"block-scalar":return It(s,e,n)}}return null}function Js(s,e){let{implicitKey:t=!1,indent:n,inFlow:i=!1,offset:r=-1,type:o="PLAIN"}=e,l=le({type:o,value:s},{implicitKey:t,indent:n>0?" ".repeat(n):"",inFlow:i,options:{blockQuote:!0,lineWidth:-1}}),a=e.end??[{type:"newline",offset:-1,indent:n,source:` +`}];switch(l[0]){case"|":case">":{let c=l.indexOf(` +`),p=l.substring(0,c),f=l.substring(c+1)+` +`,h=[{type:"block-scalar-header",offset:r,indent:n,source:p}];return Gs(h,a)||h.push({type:"newline",offset:-1,indent:n,source:` +`}),{type:"block-scalar",offset:r,indent:n,props:h,source:f}}case'"':return{type:"double-quoted-scalar",offset:r,indent:n,source:l,end:a};case"'":return{type:"single-quoted-scalar",offset:r,indent:n,source:l,end:a};default:return{type:"scalar",offset:r,indent:n,source:l,end:a}}}function Qs(s,e,t={}){let{afterKey:n=!1,implicitKey:i=!1,inFlow:r=!1,type:o}=t,l="indent"in s?s.indent:null;if(n&&typeof l=="number"&&(l+=2),!o)switch(s.type){case"single-quoted-scalar":o="QUOTE_SINGLE";break;case"double-quoted-scalar":o="QUOTE_DOUBLE";break;case"block-scalar":{let c=s.props[0];if(c.type!=="block-scalar-header")throw new Error("Invalid block scalar header");o=c.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:o="PLAIN"}let a=le({type:o,value:e},{implicitKey:i||l===null,indent:l!==null&&l>0?" ".repeat(l):"",inFlow:r,options:{blockQuote:!0,lineWidth:-1}});switch(a[0]){case"|":case">":Dn(s,a);break;case'"':es(s,a,"double-quoted-scalar");break;case"'":es(s,a,"single-quoted-scalar");break;default:es(s,a,"scalar")}}function Dn(s,e){let t=e.indexOf(` +`),n=e.substring(0,t),i=e.substring(t+1)+` +`;if(s.type==="block-scalar"){let r=s.props[0];if(r.type!=="block-scalar-header")throw new Error("Invalid block scalar header");r.source=n,s.source=i}else{let{offset:r}=s,o="indent"in s?s.indent:-1,l=[{type:"block-scalar-header",offset:r,indent:o,source:n}];Gs(l,"end"in s?s.end:void 0)||l.push({type:"newline",offset:-1,indent:o,source:` +`});for(let a of Object.keys(s))a!=="type"&&a!=="offset"&&delete s[a];Object.assign(s,{type:"block-scalar",indent:o,props:l,source:i})}}function Gs(s,e){if(e)for(let t of e)switch(t.type){case"space":case"comment":s.push(t);break;case"newline":return s.push(t),!0}return!1}function es(s,e,t){switch(s.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":s.type=t,s.source=e;break;case"block-scalar":{let n=s.props.slice(1),i=e.length;s.props[0].type==="block-scalar-header"&&(i-=s.props[0].source.length);for(let r of n)r.offset+=i;delete s.props,Object.assign(s,{type:t,source:e,end:n});break}case"block-map":case"block-seq":{let i={type:"newline",offset:s.offset+e.length,indent:s.indent,source:` +`};delete s.items,Object.assign(s,{type:t,source:e,end:[i]});break}default:{let n="indent"in s?s.indent:-1,i="end"in s&&Array.isArray(s.end)?s.end.filter(r=>r.type==="space"||r.type==="comment"||r.type==="newline"):[];for(let r of Object.keys(s))r!=="type"&&r!=="offset"&&delete s[r];Object.assign(s,{type:t,indent:n,source:e,end:i})}}}var Ws=s=>"type"in s?_t(s):$t(s);function _t(s){switch(s.type){case"block-scalar":{let e="";for(let t of s.props)e+=_t(t);return e+s.source}case"block-map":case"block-seq":{let e="";for(let t of s.items)e+=$t(t);return e}case"flow-collection":{let e=s.start.source;for(let t of s.items)e+=$t(t);for(let t of s.end)e+=t.source;return e}case"document":{let e=$t(s);if(s.end)for(let t of s.end)e+=t.source;return e}default:{let e=s.source;if("end"in s&&s.end)for(let t of s.end)e+=t.source;return e}}}function $t({start:s,key:e,sep:t,value:n}){let i="";for(let r of s)i+=r.source;if(e&&(i+=_t(e)),t)for(let r of t)i+=r.source;return n&&(i+=_t(n)),i}var ts=Symbol("break visit"),jn=Symbol("skip children"),Hs=Symbol("remove item");function me(s,e){"type"in s&&s.type==="document"&&(s={start:s.start,value:s.value}),Xs(Object.freeze([]),s,e)}me.BREAK=ts;me.SKIP=jn;me.REMOVE=Hs;me.itemAtPath=(s,e)=>{let t=s;for(let[n,i]of e){let r=t?.[n];if(r&&"items"in r)t=r.items[i];else return}return t};me.parentCollection=(s,e)=>{let t=me.itemAtPath(s,e.slice(0,-1)),n=e[e.length-1][0],i=t?.[n];if(i&&"items"in i)return i;throw new Error("Parent collection not found")};function Xs(s,e,t){let n=t(e,s);if(typeof n=="symbol")return n;for(let i of["key","value"]){let r=e[i];if(r&&"items"in r){for(let o=0;o!!s&&"items"in s,qn=s=>!!s&&(s.type==="scalar"||s.type==="single-quoted-scalar"||s.type==="double-quoted-scalar"||s.type==="block-scalar");function xn(s){switch(s){case Xe:return"";case ze:return"";case Ze:return"";case Pe:return"";default:return JSON.stringify(s)}}function ss(s){switch(s){case Xe:return"byte-order-mark";case ze:return"doc-mode";case Ze:return"flow-error-end";case Pe:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case` +`:case`\r +`:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(s[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}function J(s){switch(s){case void 0:case" ":case` +`:case"\r":case" ":return!0;default:return!1}}var zs="0123456789ABCDEFabcdef".split(""),Fn="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()".split(""),is=",[]{}".split(""),Rn=` ,[]{} +\r `.split(""),rs=s=>!s||Rn.includes(s),Me=class{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,t=!1){e&&(this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null),this.atEnd=!t;let n=this.next??"stream";for(;n&&(t||this.hasChars(1));)n=yield*this.parseNext(n)}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;t===" "||t===" ";)t=this.buffer[++e];return!t||t==="#"||t===` +`?!0:t==="\r"?this.buffer[e+1]===` +`:!1}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let t=this.buffer[e];if(this.indentNext>0){let n=0;for(;t===" ";)t=this.buffer[++n+e];if(t==="\r"){let i=this.buffer[n+e+1];if(i===` +`||!i&&!this.atEnd)return e+n+1}return t===` +`||n>=this.indentNext||!t&&!this.atEnd?e+n:-1}if(t==="-"||t==="."){let n=this.buffer.substr(e,3);if((n==="---"||n==="...")&&J(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return(typeof e!="number"||e!==-1&&ethis.indentValue&&!J(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[e,t]=this.peek(2);if(!t&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&J(t)){let n=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=n,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let e=this.getLine();if(e===null)return this.setNext("doc");let t=yield*this.pushIndicators();switch(e[t]){case"#":yield*this.pushCount(e.length-t);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(rs),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return t+=yield*this.parseBlockScalarHeader(),t+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-t),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,t,n=-1;do e=yield*this.pushNewline(),e>0?(t=yield*this.pushSpaces(!1),this.indentValue=n=t):t=0,t+=yield*this.pushSpaces(!0);while(e+t>0);let i=this.getLine();if(i===null)return this.setNext("flow");if((n!==-1&&n"0"&&t<="9")this.blockScalarIndent=Number(t)-1;else if(t!=="-")break}return yield*this.pushUntil(t=>J(t)||t==="#")}*parseBlockScalar(){let e=this.pos-1,t=0,n;e:for(let i=this.pos;n=this.buffer[i];++i)switch(n){case" ":t+=1;break;case` +`:e=i,t=0;break;case"\r":{let r=this.buffer[i+1];if(!r&&!this.atEnd)return this.setNext("block-scalar");if(r===` +`)break}default:break e}if(!n&&!this.atEnd)return this.setNext("block-scalar");if(t>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=t:this.indentNext+=this.blockScalarIndent;do{let i=this.continueScalar(e+1);if(i===-1)break;e=this.buffer.indexOf(` +`,i)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext("block-scalar");e=this.buffer.length}}if(!this.blockScalarKeep)do{let i=e-1,r=this.buffer[i];r==="\r"&&(r=this.buffer[--i]);let o=i;for(;r===" "||r===" ";)r=this.buffer[--i];if(r===` +`&&i>=this.pos&&i+1+t>o)e=i;else break}while(!0);return yield Pe,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e=this.flowLevel>0,t=this.pos-1,n=this.pos-1,i;for(;i=this.buffer[++n];)if(i===":"){let r=this.buffer[n+1];if(J(r)||e&&r===",")break;t=n}else if(J(i)){let r=this.buffer[n+1];if(i==="\r"&&(r===` +`?(n+=1,i=` +`,r=this.buffer[n+1]):t=n),r==="#"||e&&is.includes(r))break;if(i===` +`){let o=this.continueScalar(n+1);if(o===-1)break;n=Math.max(n,o-2)}}else{if(e&&is.includes(i))break;t=n}return!i&&!this.atEnd?this.setNext("plain-scalar"):(yield Pe,yield*this.pushToIndex(t+1,!0),e?"flow":"doc")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,t){let n=this.buffer.slice(this.pos,e);return n?(yield n,this.pos+=n.length,n.length):(t&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(rs))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{let e=this.flowLevel>0,t=this.charAt(1);if(J(t)||e&&is.includes(t))return e?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if(this.charAt(1)==="<"){let e=this.pos+2,t=this.buffer[e];for(;!J(t)&&t!==">";)t=this.buffer[++e];return yield*this.pushToIndex(t===">"?e+1:e,!1)}else{let e=this.pos+1,t=this.buffer[e];for(;t;)if(Fn.includes(t))t=this.buffer[++e];else if(t==="%"&&zs.includes(this.buffer[e+1])&&zs.includes(this.buffer[e+2]))t=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){let e=this.buffer[this.pos];return e===` +`?yield*this.pushCount(1):e==="\r"&&this.charAt(1)===` +`?yield*this.pushCount(2):0}*pushSpaces(e){let t=this.pos-1,n;do n=this.buffer[++t];while(n===" "||e&&n===" ");let i=t-this.pos;return i>0&&(yield this.buffer.substr(this.pos,i),this.pos=t),i}*pushUntil(e){let t=this.pos,n=this.buffer[t];for(;!e(n);)n=this.buffer[++t];return yield*this.pushToIndex(t,!1)}};var Be=class{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,n=this.lineStarts.length;for(;t>1;this.lineStarts[r]=0;)switch(s[e].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;s[++e]?.type==="space";);return s.splice(e,s.length)}function en(s){if(s.start.type==="flow-seq-start")for(let e of s.items)e.sep&&!e.value&&!H(e.start,"explicit-key-ind")&&!H(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,tn(e.value)?e.value.end?Array.prototype.push.apply(e.value.end,e.sep):e.value.end=e.sep:Array.prototype.push.apply(e.start,e.sep),delete e.sep)}var we=class{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new Me,this.onNewLine=e}*parse(e,t=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(let n of this.lexer.lex(e,t))yield*this.next(n);t||(yield*this.end())}*next(e){if(this.source=e,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}let t=ss(e);if(t)if(t==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=t,yield*this.step(),t){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case"space":this.atNewLine&&e[0]===" "&&(this.indent+=e.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=e.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}else{let n=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:n,source:e}),this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let e=this.peek(1);if(this.type==="doc-end"&&(!e||e.type!=="doc-end")){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){let t=e??this.stack.pop();if(!t)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield t;else{let n=this.peek(1);switch(t.type==="block-scalar"?t.indent="indent"in n?n.indent:0:t.type==="flow-collection"&&n.type==="document"&&(t.indent=0),t.type==="flow-collection"&&en(t),n.type){case"document":n.value=t;break;case"block-scalar":n.props.push(t);break;case"block-map":{let i=n.items[n.items.length-1];if(i.value){n.items.push({start:[],key:t,sep:[]}),this.onKeyLine=!0;return}else if(i.sep)i.value=t;else{Object.assign(i,{key:t,sep:[]}),this.onKeyLine=!H(i.start,"explicit-key-ind");return}break}case"block-seq":{let i=n.items[n.items.length-1];i.value?n.items.push({start:[],value:t}):i.value=t;break}case"flow-collection":{let i=n.items[n.items.length-1];!i||i.value?n.items.push({start:[],key:t,sep:[]}):i.sep?i.value=t:Object.assign(i,{key:t,sep:[]});return}default:yield*this.pop(),yield*this.pop(t)}if((n.type==="document"||n.type==="block-map"||n.type==="block-seq")&&(t.type==="block-map"||t.type==="block-seq")){let i=t.items[t.items.length-1];i&&!i.sep&&!i.value&&i.start.length>0&&Zs(i.start)===-1&&(t.indent===0||i.start.every(r=>r.type!=="comment"||r.indent=e.indent){let n=!this.onKeyLine&&this.indent===e.indent&&t.sep&&this.type!=="seq-item-ind",i=[];if(n&&t.sep&&!t.value){let r=[];for(let o=0;oe.indent&&(r.length=0);break;default:r.length=0}}r.length>=2&&(i=t.sep.splice(r[1]))}switch(this.type){case"anchor":case"tag":n||t.value?(i.push(this.sourceToken),e.items.push({start:i}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"explicit-key-ind":!t.sep&&!H(t.start,"explicit-key-ind")?t.start.push(this.sourceToken):n||t.value?(i.push(this.sourceToken),e.items.push({start:i})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]}),this.onKeyLine=!0;return;case"map-value-ind":if(H(t.start,"explicit-key-ind"))if(t.sep)if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(H(t.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,key:null,sep:[this.sourceToken]}]});else if(tn(t.key)&&!H(t.sep,"newline")){let r=De(t.start),o=t.key,l=t.sep;l.push(this.sourceToken),delete t.key,delete t.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:o,sep:l}]})}else i.length>0?t.sep=t.sep.concat(i,this.sourceToken):t.sep.push(this.sourceToken);else if(H(t.start,"newline"))Object.assign(t,{key:null,sep:[this.sourceToken]});else{let r=De(t.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]})}else t.sep?t.value||n?e.items.push({start:i,key:null,sep:[this.sourceToken]}):H(t.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let r=this.flowScalar(this.type);n||t.value?(e.items.push({start:i,key:r,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(r):(Object.assign(t,{key:r,sep:[]}),this.onKeyLine=!0);return}default:{let r=this.startBlockValue(e);if(r){n&&r.type!=="block-seq"&&H(t.start,"explicit-key-ind")&&e.items.push({start:i}),this.stack.push(r);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){let t=e.items[e.items.length-1];switch(this.type){case"newline":if(t.value){let n="end"in t.value?t.value.end:void 0;(Array.isArray(n)?n[n.length-1]:void 0)?.type==="comment"?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(t.start,e.indent)){let i=e.items[e.items.length-2]?.value?.end;if(Array.isArray(i)){Array.prototype.push.apply(i,t.start),i.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return;case"anchor":case"tag":if(t.value||this.indent<=e.indent)break;t.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;t.value||H(t.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return}if(this.indent>e.indent){let n=this.startBlockValue(e);if(n){this.stack.push(n);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){let t=e.items[e.items.length-1];if(this.type==="flow-error-end"){let n;do yield*this.pop(),n=this.peek(1);while(n&&n.type==="flow-collection")}else if(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!t||t.sep?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return;case"map-value-ind":!t||t.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!t||t.value?e.items.push({start:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let i=this.flowScalar(this.type);!t||t.value?e.items.push({start:[],key:i,sep:[]}):t.sep?this.stack.push(i):Object.assign(t,{key:i,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}let n=this.startBlockValue(e);n?this.stack.push(n):(yield*this.pop(),yield*this.step())}else{let n=this.peek(2);if(n.type==="block-map"&&(this.type==="map-value-ind"&&n.indent===e.indent||this.type==="newline"&&!n.items[n.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&n.type!=="flow-collection"){let i=Pt(n),r=De(i);en(e);let o=e.end.splice(1,e.end.length);o.push(this.sourceToken);let l={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:r,key:e,sep:o}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=l}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let t=this.source.indexOf(` +`)+1;for(;t!==0;)this.onNewLine(this.offset+t),t=this.source.indexOf(` +`,t)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let t=Pt(e),n=De(t);return n.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:n}]}}case"map-value-ind":{this.onKeyLine=!0;let t=Pt(e),n=De(t);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:n,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return this.type!=="comment"||this.indent<=t?!1:e.every(n=>n.type==="newline"||n.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}};function sn(s){let e=s.prettyErrors!==!1;return{lineCounter:s.lineCounter||e&&new Be||null,prettyErrors:e}}function nn(s,e={}){let{lineCounter:t,prettyErrors:n}=sn(e),i=new we(t?.addNewLine),r=new be(e),o=Array.from(r.compose(i.parse(s)));if(n&&t)for(let l of o)l.errors.forEach(Ge(s,t)),l.warnings.forEach(Ge(s,t));return o.length>0?o:Object.assign([],{empty:!0},r.streamInfo())}function os(s,e={}){let{lineCounter:t,prettyErrors:n}=sn(e),i=new we(t?.addNewLine),r=new be(e),o=null;for(let l of r.compose(i.parse(s),!0,s.length))if(!o)o=l;else if(o.options.logLevel!=="silent"){o.errors.push(new q(l.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return n&&t&&(o.errors.forEach(Ge(s,t)),o.warnings.forEach(Ge(s,t))),o}function rn(s,e,t){let n;typeof e=="function"?n=e:t===void 0&&e&&typeof e=="object"&&(t=e);let i=os(s,t);if(!i)return null;if(i.warnings.forEach(r=>ft(i.options.logLevel,r)),i.errors.length>0){if(i.options.logLevel!=="silent")throw i.errors[0];i.errors=[]}return i.toJS(Object.assign({reviver:n},t))}function on(s,e,t){let n=null;if(typeof e=="function"||Array.isArray(e)?n=e:t===void 0&&e&&(t=e),typeof t=="string"&&(t=t.length),typeof t=="number"){let i=Math.round(t);t=i<1?void 0:i>8?{indent:8}:{indent:i}}if(s===void 0){let{keepUndefined:i}=t??e??{};if(!i)return}return new se(s,n,t).toString(t)}var ln=ls;window.yaml=ln;})(); From cc008dce170358e4275eecd8d8df6b34393d043f Mon Sep 17 00:00:00 2001 From: "P. L. Lim" <2090236+pllim@users.noreply.github.com> Date: Mon, 20 May 2024 15:26:54 -0400 Subject: [PATCH 2/4] Assume package_name is also pypi_name and make GH username a link for maintainer full name. --- affiliated/index.html | 4 ++-- js/functions.js | 11 ++++++++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/affiliated/index.html b/affiliated/index.html index c4b54fe5..d7ca940e 100644 --- a/affiliated/index.html +++ b/affiliated/index.html @@ -423,7 +423,7 @@

I am a new reviewerI am a new reviewer' + 'PyPI' + ''; } } @@ -263,6 +263,15 @@ function bool_translator(stable) { } } +function ghuser_translator(fullname, ghname) { + if (fullname === undefined || ghname === undefined) { + return 'None'; + } else { + var urltext = 'https://github.com/' + ghname; + return '' + fullname + ''; + } +} + var _email_regex_str = '[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}'; var _email_regex = new RegExp(_email_regex_str, 'i'); var _email_with_name_regex = new RegExp('(.+)<(' + _email_regex_str + ')>', 'i'); From 1e4e08ac8336f4e8e1939dd277888921ee9d5b64 Mon Sep 17 00:00:00 2001 From: "P. L. Lim" <2090236+pllim@users.noreply.github.com> Date: Mon, 20 May 2024 15:34:56 -0400 Subject: [PATCH 3/4] Replace HTTP with HTTPS on affiliated page and add a generic link back to pyOpenSci --- affiliated/index.html | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/affiliated/index.html b/affiliated/index.html index d7ca940e..9c5a933b 100644 --- a/affiliated/index.html +++ b/affiliated/index.html @@ -1,5 +1,5 @@ - + @@ -23,7 +23,7 @@