PageSourceSearch

https://www.selloutcrowds.com/_next/static/chunks/9022.c4934926540d7987.js

js selloutcrowds.com collected 2026-09-24 14:03:41 UTC 118,183 bytes, 25 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9022],{31771:(e,t,n)=>{n.d(t,{L:()=>ei});var i=n(7620),s=n(44614),r=n(35097);let o=e=>{if(e)return"web"===s.A.OS?e:(0,r.A)(e)??void 0},l=30,a="#111827",c=24,u="#111827",h=20,f="#111827",d=18,p="#111827",m=16,g="#374151",y=14,b="#4B5563",k='system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',w='ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, "DejaVu Sans Mono", monospace',v="#1F2937",S={fontFamily:k,fontWeight:"bold",marginTop:0,marginBottom:8,textAlign:"auto"},x=Object.freeze({paragraph:{fontSize:16,fontFamily:k,fontWeight:"",color:v,lineHeight:26,marginTop:0,marginBottom:16,textAlign:"auto"},h1:{...S,fontSize:l,color:a,lineHeight:38},h2:{...S,fontSize:c,color:u,lineHeight:32},h3:{...S,fontSize:h,color:f,lineHeight:28},h4:{...S,fontSize:d,color:p,lineHeight:26},h5:{...S,fontSize:m,color:g,lineHeight:24},h6:{...S,fontSize:y,color:b,lineHeight:22},blockquote:{fontSize:16,fontFamily:k,fontWeight:"",color:"#4B5563",lineHeight:26,marginTop:0,marginBottom:16,borderColor:"#D1D5DB",borderWidth:3,gapWidth:16,backgroundColor:"#F9FAFB",borderRadius:0,padding:0},list:{fontSize:16,fontFamily:k,fontWeight:"",color:v,lineHeight:26,marginTop:0,marginBottom:16,bulletColor:"#6B7280",bulletSize:6,markerMinWidth:0,markerColor:"#6B7280",markerFontWeight:"500",gapWidth:12,marginLeft:24,itemSpacing:0},codeBlock:{fontSize:14,fontFamily:w,fontWeight:"",color:"#F3F4F6",lineHeight:22,marginTop:0,marginBottom:16,backgroundColor:"#1F2937",borderColor:"#374151",borderRadius:8,borderWidth:1,padding:16,syntaxColors:{keyword:"#FF7B72",operatorColor:"#F3F4F6",punctuation:"#F3F4F6",string:"#A5D6FF",number:"#79C0FF",constant:"#79C0FF",comment:"#8B949E",function:"#D2A8FF",type:"#FFA657",variable:"#F3F4F6",property:"#79C0FF",tag:"#7EE787",attribute:"#79C0FF",embedded:"#F3F4F6"}},link:{fontFamily:"",color:"#2563EB",underline:!0,backgroundColor:"transparent"},linkVariants:[],strong:{fontFamily:"",fontWeight:"bold",color:void 0},em:{fontFamily:"",fontStyle:"italic",color:void 0},strikethrough:{color:"#9CA3AF"},underline:{color:v},code:{fontFamily:w,fontSize:0,color:"#E01E5A",backgroundColor:"#FDF2F4",borderColor:"#F8D7DA"},image:{height:200,maxHeight:0,aspectRatio:0,resizeMode:"",borderRadius:8,marginTop:0,marginBottom:16},inlineImage:{size:20},thematicBreak:{color:"#E5E7EB",height:1,marginTop:24,marginBottom:24},table:{fontSize:14,fontFamily:k,fontWeight:"",color:v,marginTop:0,marginBottom:16,lineHeight:22,headerFontFamily:"",headerBackgroundColor:"#F3F4F6",headerTextColor:"#111827",rowEvenBackgroundColor:"#FFFFFF",rowOddBackgroundColor:"#F9FAFB",borderColor:"#E5E7EB",borderWidth:1,borderRadius:6,cellPaddingHorizontal:12,cellPaddingVertical:8,horizontalOverflow:0,align:""},math:{fontSize:20,color:v,backgroundColor:"#F3F4F6",padding:12,marginTop:0,marginBottom:16,textAlign:"center"},inlineMath:{color:v},taskList:{checkedColor:"#007AFF",borderColor:"#9E9E9E",checkboxSize:14,checkboxBorderRadius:3,checkmarkColor:"#FFFFFF",checkedTextColor:"#000000",checkedStrikethrough:!1},spoiler:{color:"#374151",particles:{density:8,speed:20},solid:{borderRadius:4}},superscript:{fontScale:.75,baselineOffsetScale:.35},subscript:{fontScale:.75,baselineOffsetScale:.2},highlight:{color:v,backgroundColor:"#FEF08A"}}),E=new WeakMap,N=[],T=Object.keys(x),O=new Set(["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"]),A=e=>{if(e&&O.has(e))return e},C=e=>"auto"===e?void 0:e;function I(e){return"center"===e||"right"===e?e:"left"}function $(e){let t=Math.max(1,Math.min(6,parseInt(e,10)||1));return`h${t}`}function L(e){return{fontSize:e.fontSize,fontFamily:e.fontFamily||void 0,fontWeight:A(e.fontWeight),color:e.color,lineHeight:`${e.lineHeight}px`,marginTop:e.marginTop,marginBottom:e.marginBottom,textAlign:C(e.textAlign)}}function B(e,t){return L(e[$(t)])}function j(e,t=!1){let n=e.list;return{listStylePosition:"outside",fontSize:n.fontSize,fontFamily:n.fontFamily||void 0,fontWeight:A(n.fontWeight),color:n.color,lineHeight:`${n.lineHeight}px`,marginTop:n.marginTop,marginBottom:n.marginBottom,paddingInlineStart:t?0:n.marginLeft}}let F={contain:"contain",cover:"cover",stretch:"fill",center:"scale-down",none:"none"},_=new WeakMap;function M(e){let t=e.taskList;return{width:t.checkboxSize,height:t.checkboxSize,borderRadius:t.checkboxBorderRadius,marginInlineEnd:6,accentColor:t.checkedColor,verticalAlign:"middle"}}function D(e,t){let n=e.table;
1return{backgroundColor:n.headerBackgroundColor,color:n.headerTextColor,fontFamily:(n.headerFontFamily||void 0)??(n.fontFamily||void 0),fontWeight:"bold",padding:`${n.cellPaddingVertical}px ${n.cellPaddingHorizontal}px`,border:`${n.borderWidth}px solid ${n.borderColor}`,textAlign:I(t)}}function K(e,t){let n=e.table;return{padding:`${n.cellPaddingVertical}px ${n.cellPaddingHorizontal}px`,border:`${n.borderWidth}px solid ${n.borderColor}`,textAlign:I(t)}}let P={whiteSpace:"pre-wrap",margin:0},R=new WeakMap;function q(e){var t,n;let i,s,r,o,l,a,c,u,h,f,d,p,m=R.get(e);if(m)return m;let g={fontSize:(i=e.codeBlock).fontSize,fontFamily:i.fontFamily||void 0,fontWeight:A(i.fontWeight),color:i.color,lineHeight:`${i.lineHeight}px`,backgroundColor:i.backgroundColor,border:`${i.borderWidth}px solid ${i.borderColor}`,borderRadius:i.borderRadius,padding:i.padding,margin:0,marginTop:i.marginTop,marginBottom:i.marginBottom,overflowX:"auto",direction:"ltr"},y={paragraph:L(e.paragraph),paragraphInBlockquote:{...L(e.paragraph),marginTop:0,marginBottom:0},h1:B(e,"1"),h2:B(e,"2"),h3:B(e,"3"),h4:B(e,"4"),h5:B(e,"5"),h6:B(e,"6"),blockquote:{fontSize:(s=e.blockquote).fontSize,fontFamily:s.fontFamily||void 0,fontWeight:A(s.fontWeight),color:s.color,lineHeight:`${s.lineHeight}px`,marginTop:s.marginTop,marginBottom:s.marginBottom,marginInlineStart:0,marginInlineEnd:0,paddingInlineStart:s.gapWidth,paddingInlineEnd:s.padding,paddingTop:s.padding,paddingBottom:s.padding,borderInlineStart:`${s.borderWidth}px solid ${s.borderColor}`,borderRadius:s.borderRadius,backgroundColor:s.backgroundColor},list:j(e),listNested:{...j(e),marginTop:Math.max(0,e.list.itemSpacing),marginBottom:0},listTask:j(e,!0),codeBlock:g,codeBlockFont:{fontFamily:g.fontFamily},thematicBreak:(u=e.thematicBreak,{border:"none",borderTop:`${u.height}px solid ${u.color}`,marginTop:u.marginTop,marginBottom:u.marginBottom,width:"100%"}),image:function(e){let t=e.image,n={borderRadius:t.borderRadius,marginTop:t.marginTop,marginBottom:t.marginBottom,maxWidth:"100%",display:"block"};if(""===t.resizeMode)return{...n,height:t.height};let i=F[t.resizeMode]??"cover";return t.aspectRatio>0?{...n,width:"100%",aspectRatio:t.aspectRatio,objectFit:i}:t.maxHeight>0?{...n,width:"100%",height:"auto",maxHeight:t.maxHeight,objectFit:i}:{...n,width:"100%",height:t.height,objectFit:i}}(e),inlineImage:{width:h=e.inlineImage.size,height:h,verticalAlign:"middle",display:"inline"},strong:{fontFamily:(r=(t=e).strong).fontFamily||void 0,fontWeight:A(r.fontWeight)||"bold",color:r.color??t.paragraph.color},emphasis:{fontFamily:(o=(n=e).em).fontFamily||void 0,fontStyle:o.fontStyle||"italic",color:o.color??n.paragraph.color},code:{fontFamily:(l=e.code).fontFamily||void 0,fontSize:l.fontSize||void 0,color:l.color,backgroundColor:l.backgroundColor,border:`1px solid ${l.borderColor}`,borderRadius:3,padding:"1px 4px",direction:"ltr",unicodeBidi:"embed"},link:{color:(a=e.link).color,fontFamily:a.fontFamily||void 0,textDecoration:a.underline?"underline":"none"},strikethrough:{textDecorationLine:"line-through",textDecorationColor:e.strikethrough.color},underline:{textDecorationLine:"underline",textDecorationColor:e.underline.color},superscript:function(e){let{fontScale:t,baselineOffsetScale:n}=e.superscript;return{fontSize:`${t}em`,verticalAlign:`${n}em`,lineHeight:0}}(e),subscript:function(e){let{fontScale:t,baselineOffsetScale:n}=e.subscript;return{fontSize:`${t}em`,verticalAlign:`-${n}em`,lineHeight:0}}(e),highlight:{backgroundColor:e.highlight.backgroundColor,color:e.highlight.color!==e.paragraph.color?e.highlight.color:"inherit"},mathInline:{color:e.inlineMath.color},mathDisplay:{fontSize:(f=e.math).fontSize,color:f.color,backgroundColor:f.backgroundColor,padding:f.padding,marginTop:f.marginTop,marginBottom:f.marginBottom,textAlign:C(f.textAlign),overflowX:"auto"},table:{borderCollapse:"collapse",width:"100%",fontSize:(c=e.table).fontSize,fontFamily:c.fontFamily||void 0,fontWeight:A(c.fontWeight),color:c.color,lineHeight:`${c.lineHeight}px`,border:`${c.borderWidth}px solid ${c.borderColor}`},tableWrapper:(p=(d=e.table).align?{width:"fit-content",maxWidth:"100%",marginLeft:"left"===d.align?0:"auto",marginRight:"right"===d.align?0:"auto"}:{},{overflowX:"auto",overflowY:"hidden",marginTop:d.marginTop,marginBottom:
1d.marginBottom,...p,borderRadius:d.borderRadius}),tableHeaderCell:{left:D(e,"left"),center:D(e,"center"),right:D(e,"right"),default:D(e,"default")},tableCell:{left:K(e,"left"),center:K(e,"center"),right:K(e,"right"),default:K(e,"default")},taskCheckbox:M(e),taskCheckboxDisabled:{...M(e),pointerEvents:"none",cursor:"default"}};return R.set(e,y),y}let U=null;async function W(e,{underline:t=!1,latexMath:i=!0,superscript:s=!1,subscript:r=!1,highlight:o=!1,hardSoftBreaks:l=!1}={}){let a=JSON.parse((await (!U&&(U=n.e(6469).then(n.t.bind(n,56469,19)).then(e=>e.default()).then(e=>e.cwrap("parseMarkdown","string",["string","number","number","number","number","number","number"])).catch(e=>{throw U=null,e})),U))(e,+!!t,+!!i,+!!s,+!!r,+!!o,+!!l));if(!("object"==typeof a&&null!==a&&"type"in a&&"string"==typeof a.type))throw Error("WASM parser returned invalid AST");return a}function H(e){return"SoftBreak"===e.type||"LineBreak"===e.type?" ":void 0!==e.content?e.content:e.children?.map(H).join("")??""}var z=n(54568);function V({content:e,katex:t,displayMode:n,style:s}){let r=n?"$$":"$",o=(0,i.useMemo)(()=>t?t.renderToString(e,{output:"mathml",displayMode:n,throwOnError:!1,trust:!1}):null,[t,e,n]),l=n?{...s,display:"block",whiteSpace:"pre-wrap"}:s;return o?(0,z.jsx)("span",{role:"math","aria-label":e,style:l,dangerouslySetInnerHTML:{__html:o}}):(0,z.jsx)("span",{role:"math","aria-label":e,style:l,children:`${r}${e}${r}`})}let J=new Set(["UnorderedList","OrderedList"]);function G({node:e,styles:t,parentType:n,renderChildren:i,listTag:s}){let r="ListItem"===n,o=!r&&e.children?.some(e=>e.attributes?.isTask==="true"),l=r?t.listNested:o?t.listTask:t.list;return(0,z.jsx)(s,{style:l,children:i(e)})}function Y(e){return J.has(e.type)}let Q={Paragraph:function({node:e,styles:t,parentType:n,renderChildren:i}){return e.children?.length===1&&e.children[0]?.type==="Image"?(0,z.jsx)(z.Fragment,{children:i(e)}):"Blockquote"===n?(0,z.jsx)("p",{style:t.paragraphInBlockquote,children:i(e)}):"ListItem"===n?(0,z.jsx)("span",{children:i(e)}):(0,z.jsx)("p",{style:t.paragraph,children:i(e)})},Heading:function({node:e,styles:t,renderChildren:n}){let i=$(e.attributes?.level??"1");return(0,z.jsx)(i,{style:t[i],children:n(e)})},Blockquote:function({node:e,styles:t,renderChildren:n}){return(0,z.jsx)("blockquote",{style:t.blockquote,children:n(e)})},CodeBlock:function({node:e,styles:t,renderChildren:n}){let i=e.attributes?.language,s=i?`Code block: ${i}`:"Code block";return(0,z.jsx)("pre",{style:t.codeBlock,"aria-label":s,children:(0,z.jsx)("code",{style:t.codeBlockFont,children:n(e)})})},ThematicBreak:function({styles:e}){return(0,z.jsx)("hr",{style:e.thematicBreak})},Image:function({node:e,styles:t}){let n=e.attributes?.url;if(!n)return null;let i=e.attributes?.title,s=H(e)||i||function(e){try{return(new URL(e,"https://placeholder").pathname.split("/").pop()??"").replace(/\.[^.]+$/,"")}catch{return""}}(n)||"Image",r=e.attributes?.isInline?t.inlineImage:t.image;return(0,z.jsx)("img",{src:n,alt:s,title:i,style:r})},LatexMathDisplay:function({node:e,styles:t,capabilities:n}){let i=H(e);return(0,z.jsx)(V,{content:i,katex:n.katex,displayMode:!0,style:t.mathDisplay})},Text:function({node:e}){return(0,z.jsx)(z.Fragment,{children:e.content??""})},LineBreak:function(e){return(0,z.jsx)("br",{})},SoftBreak:function(e){return(0,z.jsx)(z.Fragment,{children:" "})},Strong:function({node:e,styles:t,renderChildren:n}){return(0,z.jsx)("strong",{style:t.strong,children:n(e)})},Emphasis:function({node:e,styles:t,renderChildren:n}){return(0,z.jsx)("em",{style:t.emphasis,children:n(e)})},Strikethrough:function({node:e,styles:t,renderChildren:n}){return(0,z.jsx)("s",{style:t.strikethrough,children:n(e)})},Underline:function({node:e,styles:t,renderChildren:n}){return(0,z.jsx)("u",{style:t.underline,children:n(e)})},Superscript:function({node:e,styles:t,renderChildren:n}){return(0,z.jsx)("sup",{style:t.superscript,children:n(e)})},Subscript:function({node:e,styles:t,renderChildren:n}){return(0,z.jsx)("sub",{style:t.subscript,children:n(e)})},Highlight:function({node:e,styles:t,renderChildren:n}){return(0,z.jsx)("mark",{style:t.highlight,children:n(e)})},Code:function({node:e,styles:t,renderChildren:n}){return(0,z.jsx)("code",{style:t.code,children:e.content??n(e)})},Link:function({node:e,style:t,callbacks:n,renderChildren:i}){var s,r,o;let l,a,c,u,h,f=e.attributes?.url;return f?(0,z.jsx)("a",{href:f,style:(s=t,r=f,a=s.link,h=(u=-1!==(c=(o=s.linkVariants,!(l=_.get(o))&&(l=o.map(e=>{try{return new RegExp(e.pattern)}catch{return null}}),_.set(o,l)),l).findIndex(e=>null!==e&&e.test(r)))?s.linkVariants[c]:a).backgroundColor,{color:u.color,fontFamily:a.fontFamily||void 0,textDecoration:u.underline?"underline":"none",...h&&"transparent"!==h?{backgroundColor:h}:void 0}),target:"_blank",rel:"noopener noreferrer",onClick:e=>{n.onLinkPress&&(e.preventDefault(),n.onLinkPress({url:f}))},onContextMenu:e=>{n.onLinkLongPress&&(e.preventDefault(),n.onLinkLongPress({url:f}))},children:i(e)}):(0,z.jsx)(z.Fragment,{children:i(e)})},LatexMathInline:function({node:e,styles:t,capabilities:n}){let i=H(e);return(0,z.jsx)(V,{content:i,katex:n.katex,displayMode:!1,style:t.mathInline})},UnorderedList:function(e){return(0,z.jsx)(G,{...e,listTag:"ul"})},OrderedList:function(e){return(0,z.jsx)(G,{...e,listTag:"ol"})},ListItem:function({node:e,style:t,styles:n,index:s,callbacks:r,capabilities:o,renderChildren:l}){let a,c=e.attributes?.isTask==="true",u=e.attributes?.taskChecked==="true",h=c?H(e):"",[f,d]=(0,i.useState)(u);(0,i.useEffect)(()=>{d(u)},[u]);let p=e.children?.some(Y),m=c&&f?{color:(a=t.taskList).checkedTextColor||void 0,textDecorationLine:a.checkedStrikethrough?"line-through":void 0}:void 0,g=p?{...e,children:e.children?.filter(e=>!Y(e))}:e,y=p?{...e,children:e.children?.filter(Y)}:null;return(0,z.jsxs)("li",{style:function(e,t,n){let{itemSpacing:i}=e.list,s=!n&&i>0?i:void 0;return t?{listStyle:"none",marginTop:s}:void 0!==s?{marginTop:s}:void 0}(t,c,(s??0)===0),children:[(0,z.jsxs)("span",{style:m,children:[c&&(0,z.jsx)("input",{type:"checkbox",checked:f,onChange:()=>{if(!o.enableTaskListItemToggle)return;let t=e.attributes?.taskIndex;if(void 0===t)return;let n=!f;d(n),r.onTaskListItemPress?.({index:t,checked:n,text:h})},readOnly:!o.enableTaskListItemToggle,"aria-disabled":!o.enableTaskListItemToggle||void 0,style:o.enableTaskListItemToggle?n.taskCheckbox:n.taskCheckboxDisabled,"aria-label":`Task: ${h}`}),l(g)]}),y&&l(y)]})},Table:function({node:e,styles:t,renderChildren:n}){return(0,z.jsx)("div",{style:t.tableWrapper,children:(0,z.jsx)("table",{style:t.table,children:n(e)})})},TableHead:function({node:e,renderChildren:t}){return(0,z.jsx)("thead",{children:t(e)})},TableBody:function({node:e,style:t,renderChildren:n}){return(0,z.jsx)("tbody",{children:e.children?.map((e,i)=>{let s;return(0,z.jsx)("tr",{style:(s=t.table,{backgroundColor:i%2==0?s.rowEvenBackgroun
1dColor:s.rowOddBackgroundColor}),children:n(e)},`row-${i}`)})})},TableRow:function({node:e,renderChildren:t}){return(0,z.jsx)("tr",{children:t(e)})},TableHeaderCell:function({node:e,styles:t,renderChildren:n}){return(0,z.jsx)("th",{style:t.tableHeaderCell[e.attributes?.align??"default"],children:n(e)})},TableCell:function({node:e,styles:t,renderChildren:n}){return(0,z.jsx)("td",{style:t.tableCell[e.attributes?.align??"default"],children:n(e)})}};function X({node:e,style:t,styles:n,callbacks:i,capabilities:s,parentType:r,index:o}){let l=Q[e.type];return l?(0,z.jsx)(l,{node:e,style:t,styles:n,parentType:r,index:o,callbacks:i,capabilities:s,renderChildren:e=>e.children?.map((r,o)=>(0,z.jsx)(X,{node:r,style:t,styles:n,callbacks:i,capabilities:s,parentType:e.type,index:o},function(e,t){if("ListItem"===e.type&&e.attributes?.isTask==="true"){let n=e.attributes.taskIndex??t;return`task-${n}-${e.attributes.taskChecked}`}return t}(r,o)))??null}):null}let Z=null,ee=(e,t)=>{if("u"<typeof document||null!=document.getElementById(e))return;let n=document.createElement("style");n.id=e,n.textContent=t,document.head.appendChild(n)},et="enrm-text",en="--enrm-selection-bg";for(let[e,t]of[["enrm-selection-style",`.${et} ::selection { background-color: var(${en}); }`]])ee(e,t);let ei=({markdown:e,markdownStyle:t={},md4cFlags:n={},onLinkPress:s,onLinkLongPress:r,onTaskListItemPress:l,enableTaskListItemToggle:a=!0,allowTrailingMargin:c=!1,containerStyle:u,selectable:h=!0,dir:f,selectionColor:d,...p})=>{let m=(0,i.useMemo)(()=>(e=>{if(!e||0===Object.keys(e).length)return x;let t=E.get(e);if(t)return t;let n=N.findIndex(t=>(function(e,t,n){for(let i of n){let n=e[i],s=t[i];if(n!==s&&(!n||!s||!function(e,t){let n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(let i of n){let n=e[i],s=t[i];if(n!==s){if("object"==typeof n&&null!==n&&"object"==typeof s&&null!==s){let e=Object.keys(n),t=Object.keys(s);if(e.length!==t.length)return!1;for(let t of e)if(n[t]!==s[t])return!1;continue}return!1}}return!0}(n,s)))return!1}return!0})(t.style,e,T));if(-1!==n){let t=N.splice(n,1)[0];return N.unshift(t),E.set(e,t.result),t.result}let i={};Object.keys(x).forEach(t=>{if(Array.isArray(x[t]))return;let n=e[t];i[t]=function(e,t){if(!t)return e;let n={...e,...t};for(let i in n){let s=e[i],r=t[i];"object"!=typeof s||null===s||Array.isArray(s)||"object"!=typeof r||null===r||Array.isArray(r)||(n[i]={...s,...r}),i.toLowerCase().includes("color")&&"string"==typeof n[i]&&(n[i]=o(n[i]))}return n}(x[t],n)});let s=i.link;if(i.linkVariants=Object.entries(e.linkVariants??{}).sort(([e],[t])=>t.length-e.length).filter(([e])=>{try{RegExp(e)}catch{return!1}return!0}).map(([e,t])=>({pattern:e,color:t.color??s.color,underline:t.underline??s.underline,backgroundColor:t.backgroundColor??"transparent"})),e.taskList?.checkboxSize===void 0){let e=i.list.fontSize;i.taskList.checkboxSize=Math.round(.9*e)}let r=i.image;if(!r.resizeMode&&(r.maxHeight>0||r.aspectRatio>0)&&(i.image.resizeMode="cover"),!e.highlight?.color){let e=i.paragraph.color;i.highlight.color=e}let l=i.codeBlock.syntaxColors;l&&"operator"in l&&(l.operatorColor=l.operator,delete l.operator);let a=Object.freeze(i);return E.set(e,a),N.unshift({style:e,result:a}),N.length>8&&N.pop(),a})(t),[t]),[g,y]=(0,i.useState)(null),[b,k]=(0,i.useState)(null),[w,v]=(0,i.useState)(!1),{underline:S=!1,latexMath:O=!0,superscript:A=!1,subscript:C=!1,highlight:I=!1,hardSoftBreaks:$=!1}=n;(0,i.useEffect)(()=>{let t=!1,n=O?function(){if(!Z){let e=null;try{let t=require("katex"),n=t?.default??t;"function"==typeof n?.renderToString&&(e=n)}catch{}Z=Promise.resolve(e)}return Z}():Promise.resolve(null);return Promise.all([W(e,{underline:S,latexMath:O,superscript:A,subscript:C,highlight:I,hardSoftBreaks:$}),n]).then(([e,n])=>{t||(!function e(t,n={value:0}){"ListItem"===t.type&&t.attributes?.isTask==="true"&&(t.attributes.taskIndex=n.value++),t.children?.forEach(t=>e(t,n))}(e),function e(t){if("Paragraph"===t.type&&t.children&&t.children.some(e=>"Image"!==e.type))for(let e of t.children)"Image"===e.type&&(e.attributes={...e.attributes,isInline:!0});t.children?.forEach(e)}(e),v(!1),k(n),y(e))}).catch(e=>{t||(v(!0),y(null),k(null))}),()=>{t=!0}},[e,S,O,A,C,I,$]);let L=(0,i.useMemo)(()=>({onLinkPress:s,onLinkLongPress:r,onTaskListItemPress:l}),[s,r,l]),B=(0,i.useMemo)(()=>({katex:b,enableTaskListItemToggle:a}),[b,a]),j=(0,i.useMemo)(()=>c?m:{...m,paragraph:{...m.paragraph,marginBottom:0},h1:{...m.h1,marginBottom:0},h2:{...m.h2,marginBottom:0},h3:{...m.h3,marginBottom:0},h4:{...m.h4,marginBottom:0},h5:{...m.h5,marginBottom:0},h6:{...m.h6,marginBottom:0},blockquote:{...m.blockquote,marginBottom:0},list:{...m.list,marginBottom:0},codeBlock:{...m.codeBlock,marginBottom:0},thematicBreak:{...m.thematicBreak,marginBottom:0},image:{...m.image,marginBottom:0},math:{...m.math,marginBottom:0},table:{...m.table,marginBottom:0}},[m,c]),F=(0,i.useMemo)(()=>q(m),[m]),_=(0,i.useMemo)(()=>q(j),[j]),M=(0,i.useMemo)(()=>({display:"flex",flexDirection:"column",...u,...h?void 0:{userSelect:"none"},...d?{[en]:d}:null}),[u,h,d]);if(w)return(0,z.jsx)("div",{className:et,style:M,dir:f,...p,children:(0,z.jsx)("pre",{style:P,children:e})});if(!g)return null;let D=g.children??[],K=D.length-1;return(0,z.jsx)("div",{className:et,style:M,dir:f,...p,children:D.map((e,t)=>(0,z.jsx)(X,{node:e,style:t===K?j:m,styles:t===K?_:F,callbacks:L,capabilities:B},`${e.type}-${t}`))})}},55696:(e,t,n)=>{n.d(t,{$:()=>c});var i=n(7620),s=n(78411),r=n(49060),o=n(81913);let l=n(67321).n,a=(e,t)=>{let n=Array.isArray(e)?e.map(e=>l(e,t)):l(e,t);
1return Array.isArray(n)&&n.forEach((e,t)=>{}),n},c=e=>{let t=(0,r.t)(),[n,l]=(0,i.useState)(a(e,t)),c=(0,i.useRef)(e);return(0,i.useLayoutEffect)(()=>{if(Array.isArray(e)&&Array.isArray(c.current)){var n;if(n=c.current,e.length===n.length&&e.every((e,t)=>e===n[t]))return;l(a(e,t)),c.current=e;return}e!==c.current&&(l(a(e,t)),c.current=e)},[e]),(0,i.useLayoutEffect)(()=>o.r.subscribe(()=>l(a(c.current,t)),[s.x7.Theme,s.x7.Variables]),[t]),n}},86347:(e,t,n)=>{let i;n.d(t,{Tp:()=>tz});let s=Symbol.for("yaml.alias"),r=Symbol.for("yaml.document"),o=Symbol.for("yaml.map"),l=Symbol.for("yaml.pair"),a=Symbol.for("yaml.scalar"),c=Symbol.for("yaml.seq"),u=Symbol.for("yaml.node.type"),h=e=>!!e&&"object"==typeof e&&e[u]===s,f=e=>!!e&&"object"==typeof e&&e[u]===r,d=e=>!!e&&"object"==typeof e&&e[u]===o,p=e=>!!e&&"object"==typeof e&&e[u]===l,m=e=>!!e&&"object"==typeof e&&e[u]===a,g=e=>!!e&&"object"==typeof e&&e[u]===c;function y(e){if(e&&"object"==typeof e)switch(e[u]){case o:case c:return!0}return!1}function b(e){if(e&&"object"==typeof e)switch(e[u]){case s:case o:case a:case c:return!0}return!1}let k=e=>(m(e)||y(e))&&!!e.anchor,w=Symbol("break visit"),v=Symbol("skip children"),S=Symbol("remove node");function x(e,t){let n=O(t);f(e)?E(null,e.contents,n,Object.freeze([e]))===S&&(e.contents=null):E(null,e,n,Object.freeze([]))}function E(e,t,n,i){let s=A(e,t,n,i);if(b(s)||p(s))return C(e,i,s),E(e,s,n,i);if("symbol"!=typeof s){if(y(t)){i=Object.freeze(i.concat(t));for(let e=0;e<t.items.length;++e){let s=E(e,t.items[e],n,i);if("number"==typeof s)e=s-1;else{if(s===w)return w;s===S&&(t.items.splice(e,1),e-=1)}}}else if(p(t)){i=Object.freeze(i.concat(t));let e=E("key",t.key,n,i);if(e===w)return w;e===S&&(t.key=null);let s=E("value",t.value,n,i);if(s===w)return w;s===S&&(t.value=null)}}return s}async function N(e,t){let n=O(t);f(e)?await T(null,e.contents,n,Object.freeze([e]))===S&&(e.contents=null):await T(null,e,n,Object.freeze([]))}async function T(e,t,n,i){let s=await A(e,t,n,i);if(b(s)||p(s))return C(e,i,s),T(e,s,n,i);if("symbol"!=typeof s){if(y(t)){i=Object.freeze(i.concat(t));for(let e=0;e<t.items.length;++e){let s=await T(e,t.items[e],n,i);if("number"==typeof s)e=s-1;else{if(s===w)return w;s===S&&(t.items.splice(e,1),e-=1)}}}else if(p(t)){i=Object.freeze(i.concat(t));let e=await T("key",t.key,n,i);if(e===w)return w;e===S&&(t.key=null);let s=await T("value",t.value,n,i);if(s===w)return w;s===S&&(t.value=null)}}return s}function O(e){return"object"==typeof e&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function A(e,t,n,i){return"function"==typeof n?n(e,t,i):d(t)?n.Map?.(e,t,i):g(t)?n.Seq?.(e,t,i):p(t)?n.Pair?.(e,t,i):m(t)?n.Scalar?.(e,t,i):h(t)?n.Alias?.(e,t,i):void 0}function C(e,t,n){let i=t[t.length-1];if(y(i))i.items[e]=n;else if(p(i))"key"===e?i.key=n:i.value=n;else if(f(i))i.contents=n;else{let e=h(i)?"alias":"scalar";throw Error(`Cannot replace node with ${e} parent`)}}x.BREAK=w,x.SKIP=v,x.REMOVE=S,N.BREAK=w,N.SKIP=v,N.REMOVE=S;let I={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},$=e=>e.replace(/[!,[\]{}]/g,e=>I[e]);class L{constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},L.defaultYaml,e),this.tags=Object.assign({},L.defaultTags,t)}clone(){let e=new L(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){let e=new L(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:L.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},L.defaultTags)}return e}add(e,t){this.atNextDocument&&(this.yaml={explicit:L.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},L.defaultTags),this.atNextDocument=!1);let n=e.trim().split(/[ \t]+/),i=n.shift();switch(i){case"%TAG":{if(2!==n.length&&(t(0,"%TAG directive should contain exactly two parts"),n.length<2))return!1;let[e,i]=n;return this.tags[e]=i,!0}case"%YAML":{if(this.yaml.explicit=!0,1!==n.length)return t(0,"%YAML directive should contain exactly one part"),!1;let[e]=n;if("1.1"===e||"1.2"===e)return this.yaml.version=e,!0;{let n=/^\d+\.\d+$/.test(e);return t(6,`Unsupported YAML version ${e}`,n),!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 n=e.slice(2,-1);return"!"===n||"!!"===n?(t(`Verbatim tags aren't resolved, so ${e}
1 is invalid.`),null):(">"!==e[e.length-1]&&t("Verbatim tags must end with a >"),n)}let[,n,i]=e.match(/^(.*!)([^!]*)$/s);i||t(`The ${e} tag has no suffix`);let s=this.tags[n];if(s)try{return s+decodeURIComponent(i)}catch(e){return t(String(e)),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+$(e.substring(n.length));return"!"===e[0]?e:`!<${e}>`}toString(e){let t,n=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],i=Object.entries(this.tags);if(e&&i.length>0&&b(e.contents)){let n={};x(e.contents,(e,t)=>{b(t)&&t.tag&&(n[t.tag]=!0)}),t=Object.keys(n)}else t=[];for(let[s,r]of i)("!!"!==s||"tag:yaml.org,2002:"!==r)&&(!e||t.some(e=>e.startsWith(r)))&&n.push(`%TAG ${s} ${r}`);return n.join("\n")}}function B(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){let t=JSON.stringify(e);throw Error(`Anchor must not contain whitespace or control characters: ${t}`)}return!0}function j(e){let t=new Set;return x(e,{Value(e,n){n.anchor&&t.add(n.anchor)}}),t}function F(e,t){for(let n=1;;++n){let i=`${e}${n}`;if(!t.has(i))return i}}function _(e,t,n,i){if(i&&"object"==typeof i)if(Array.isArray(i))for(let t=0,n=i.length;t<n;++t){let n=i[t],s=_(e,i,String(t),n);void 0===s?delete i[t]:s!==n&&(i[t]=s)}else if(i instanceof Map)for(let t of Array.from(i.keys())){let n=i.get(t),s=_(e,i,t,n);void 0===s?i.delete(t):s!==n&&i.set(t,s)}else if(i instanceof Set)for(let t of Array.from(i)){let n=_(e,i,t,t);void 0===n?i.delete(t):n!==t&&(i.delete(t),i.add(n))}else for(let[t,n]of Object.entries(i)){let s=_(e,i,t,n);void 0===s?delete i[t]:s!==n&&(i[t]=s)}return e.call(t,n,i)}function M(e,t,n){if(Array.isArray(e))return e.map((e,t)=>M(e,String(t),n));if(e&&"function"==typeof e.toJSON){if(!n||!k(e))return e.toJSON(t,n);let i={aliasCount:0,count:1,res:void 0};n.anchors.set(e,i),n.onCreate=e=>{i.res=e,delete n.onCreate};let s=e.toJSON(t,n);return n.onCreate&&n.onCreate(s),s}return"bigint"!=typeof e||n?.keep?e:Number(e)}L.defaultYaml={explicit:!1,version:"1.2"},L.defaultTags={"!!":"tag:yaml.org,2002:"};class D{constructor(e){Object.defineProperty(this,u,{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:s}={}){if(!f(e))throw TypeError("A document argument is required");let r={anchors:new Map,doc:e,keep:!0,mapAsMap:!0===t,mapKeyWarned:!1,maxAliasCount:"number"==typeof n?n:100},o=M(this,"",r);if("function"==typeof i)for(let{count:e,res:t}of r.anchors.values())i(t,e);return"function"==typeof s?_(s,{"":o},"",o):o}}class K extends D{constructor(e){super(s),this.source=e,Object.defineProperty(this,"tag",{set(){throw Error("Alias nodes cannot have tags")}})}resolve(e,t){let n,i;if(t?.maxAliasCount===0)throw ReferenceError("Alias resolution is disabled");for(let s of(t?.aliasResolveCache?n=t.aliasResolveCache:(n=[],x(e,{Node:(e,t)=>{(h(t)||k(t))&&n.push(t)}}),t&&(t.aliasResolveCache=n)),n)){if(s===this)break;s.anchor===this.source&&(i=s)}return i}toJSON(e,t){if(!t)return{source:this.source};let{anchors:n,doc:i,maxAliasCount:s}=t,r=this.resolve(i,t);if(!r)throw ReferenceError(`Unresolved alias (the anchor must be set before the alias): ${this.source}`);let o=n.get(r);if(o||(M(r,null,t),o=n.get(r)),o?.res===void 0)throw ReferenceError("This should not happen: Alias anchor was not resolved?");if(s>=0&&(o.count+=1,0===o.aliasCount&&(o.aliasCount=function e(t,n,i){if(h(n)){let e=n.resolve(t),s=i&&e&&i.get(e);return s?s.count*s.aliasCount:0}if(y(n)){let s=0;for(let r of n.items){let n=e(t,r,i);n>s&&(s=n)}return s}return p(n)?Math.max(e(t,n.key,i),e(t,n.value,i)):1}(i,r,n)),o.count*o.aliasCount>s))throw ReferenceError("Excessive alias count indicates a resource exh
1austion attack");return o.res}toString(e,t,n){let i=`*${this.source}`;if(e){if(B(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source))throw Error(`Unresolved alias (the anchor must be set before the alias): ${this.source}`);if(e.implicitKey)return`${i} `}return i}}let P=e=>!e||"function"!=typeof e&&"object"!=typeof e;class R extends D{constructor(e){super(a),this.value=e}toJSON(e,t){return t?.keep?this.value:M(this.value,e,t)}toString(){return String(this.value)}}function q(e,t,n){let i;if(f(e)&&(e=e.contents),b(e))return e;if(p(e)){let t=n.schema[o].createNode?.(n.schema,null,n);return t.items.push(e),t}(e instanceof String||e instanceof Number||e instanceof Boolean||"u">typeof BigInt&&e instanceof BigInt)&&(e=e.valueOf());let{aliasDuplicateObjects:s,onAnchor:r,onTagObj:l,schema:a,sourceObjects:u}=n;if(s&&e&&"object"==typeof e){if(i=u.get(e))return i.anchor??(i.anchor=r(e)),new K(i.anchor);i={anchor:null,node:null},u.set(e,i)}t?.startsWith("!!")&&(t="tag:yaml.org,2002:"+t.slice(2));let h=function(e,t,n){if(t){let e=n.filter(e=>e.tag===t),i=e.find(e=>!e.format)??e[0];if(!i)throw Error(`Tag ${t} not found`);return i}return n.find(t=>t.identify?.(e)&&!t.format)}(e,t,a.tags);if(!h){if(e&&"function"==typeof e.toJSON&&(e=e.toJSON()),!e||"object"!=typeof e){let t=new R(e);return i&&(i.node=t),t}h=e instanceof Map?a[o]:Symbol.iterator in Object(e)?a[c]:a[o]}l&&(l(h),delete n.onTagObj);let d=h?.createNode?h.createNode(n.schema,e,n):"function"==typeof h?.nodeClass?.from?h.nodeClass.from(n.schema,e,n):new R(e);return t?d.tag=t:h.default||(d.tag=h.tag),i&&(i.node=d),d}function U(e,t,n){let i=n;for(let e=t.length-1;e>=0;--e){let n=t[e];if("number"==typeof n&&Number.isInteger(n)&&n>=0){let e=[];e[n]=i,i=e}else i=new Map([[n,i]])}return q(i,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}R.BLOCK_FOLDED="BLOCK_FOLDED",R.BLOCK_LITERAL="BLOCK_LITERAL",R.PLAIN="PLAIN",R.QUOTE_DOUBLE="QUOTE_DOUBLE",R.QUOTE_SINGLE="QUOTE_SINGLE";let W=e=>null==e||"object"==typeof e&&!!e[Symbol.iterator]().next().done;class H extends D{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(t=>b(t)||p(t)?t.clone(e):t),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(W(e))this.add(t);else{let[n,...i]=e,s=this.get(n,!0);if(y(s))s.addIn(i,t);else if(void 0===s&&this.schema)this.set(n,U(this.schema,i,t));else throw Error(`Expected YAML collection at ${n}. Remaining path: ${i}`)}}deleteIn(e){let[t,...n]=e;if(0===n.length)return this.delete(t);let i=this.get(t,!0);if(y(i))return i.deleteIn(n);throw Error(`Expected YAML collection at ${t}. Remaining path: ${n}`)}getIn(e,t){let[n,...i]=e,s=this.get(n,!0);return 0===i.length?!t&&m(s)?s.value:s:y(s)?s.getIn(i,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!p(t))return!1;let n=t.value;return null==n||e&&m(n)&&null==n.value&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn(e){let[t,...n]=e;if(0===n.length)return this.has(t);let i=this.get(t,!0);return!!y(i)&&i.hasIn(n)}setIn(e,t){let[n,...i]=e;if(0===i.length)this.set(n,t);else{let e=this.get(n,!0);if(y(e))e.setIn(i,t);else if(void 0===e&&this.schema)this.set(n,U(this.schema,i,t));else throw Error(`Expected YAML collection at ${n}. Remaining path: ${i}`)}}}let z=e=>e.replace(/^(?!$)(?: $)?/gm,"#");function V(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}let J=(e,t,n)=>e.endsWith("\n")?V(n,t):n.includes("\n")?"\n"+V(n,t):(e.endsWith(" ")?"":" ")+n,G="flow",Y="block",Q="quoted";function X(e,t,n="flow",{indentAtStart:i,lineWidth:s=80,minContentWidth:r=20,onFold:o,onOverflow:l}={}){let a,c,u;if(!s||s<0)return e;s<r&&(r=0);let h=Math.max(1+r,1+s-t.length);if(e.length<=h)return e;let f=[],d={},p=s-t.length;"number"==typeof i&&(i>s-Math.max(2,r)?f.push(0):p=s-i);let m=!1,g=-1,y=-1,b=-1;for(n===Y&&-1!==(g=Z(e,g,t.length))&&(p=g+h);u=e[g+=1];){if(n===Q&&"\\"===u){switch(y=g,e[g+1]){case"x":g+=3;break;case"u":g+=5;break;case"U":g+=9;break;default:g+=1}b=g}if("\n"===u)n===Y&&(g=Z(e,g,t.length)),p=g+t.length+h,a=void 0;else{if(" "===u&&c&&" "!==c&&"\n"!==c&&"	"!==c){let t=e[g+1];
1t&&" "!==t&&"\n"!==t&&"	"!==t&&(a=g)}if(g>=p)if(a)f.push(a),p=a+h,a=void 0;else if(n===Q){for(;" "===c||"	"===c;)c=u,u=e[g+=1],m=!0;let t=g>b+1?g-2:y-1;if(d[t])return e;f.push(t),d[t]=!0,p=t+h,a=void 0}else m=!0}c=u}if(m&&l&&l(),0===f.length)return e;o&&o();let k=e.slice(0,f[0]);for(let i=0;i<f.length;++i){let s=f[i],r=f[i+1]||e.length;0===s?k=`
2${t}${e.slice(0,r)}`:(n===Q&&d[s]&&(k+=`${e[s]}\\`),k+=`
3${t}${e.slice(s+1,r)}`)}return k}function Z(e,t,n){let i=t,s=t+1,r=e[s];for(;" "===r||"	"===r;)if(t<s+n)r=e[++t];else{do r=e[++t];while(r&&"\n"!==r);i=t,r=e[s=t+1]}return i}let ee=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth});function et(e,t){let n=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return n;let{implicitKey:i}=t,s=t.options.doubleQuotedMinMultiLineLength,r=t.indent||(/^(%|---|\.\.\.)/m.test(e)?"  ":""),o="",l=0;for(let e=0,t=n[e];t;t=n[++e])if(" "===t&&"\\"===n[e+1]&&"n"===n[e+2]&&(o+=n.slice(l,e)+"\\ ",e+=1,l=e,t="\\"),"\\"===t)switch(n[e+1]){case"u":{o+=n.slice(l,e);let t=n.substr(e+2,4);switch(t){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:"00"===t.substr(0,2)?o+="\\x"+t.substr(2):o+=n.substr(e,6)}e+=5,l=e+1}break;case"n":if(i||'"'===n[e+2]||n.length<s)e+=1;else{for(o+=n.slice(l,e)+"\n\n";"\\"===n[e+2]&&"n"===n[e+3]&&'"'!==n[e+4];)o+="\n",e+=2;o+=r," "===n[e+2]&&(o+="\\"),e+=1,l=e+1}break;default:e+=1}return o=l?o+n.slice(l):n,i?o:X(o,r,Q,ee(t,!1))}function en(e,t){if(!1===t.options.singleQuote||t.implicitKey&&e.includes("\n")||/[ \t]\n|\n[ \t]/.test(e))return et(e,t);let n=t.indent||(/^(%|---|\.\.\.)/m.test(e)?"  ":""),i="'"+e.replace(/'/g,"''").replace(/\n+/g,`$&
4${n}`)+"'";return t.implicitKey?i:X(i,n,G,ee(t,!1))}function ei(e,t){let n,{singleQuote:i}=t.options;if(!1===i)n=et;else{let t=e.includes('"'),s=e.includes("'");n=t&&!s?en:s&&!t?et:i?en:et}return n(e,t)}try{i=RegExp("(^|(?<!\n))\n+(?!\n|$)","g")}catch{i=/\n+(?!\n|$)/g}function es({comment:e,type:t,value:n},s,r,o){let l,a,c,u,{blockQuote:h,commentString:f,lineWidth:d}=s.options;if(!h||/\n[\t ]+$/.test(n))return ei(n,s);let p=s.indent||(s.forceBlockIndent||(u=n,/^(%|---|\.\.\.)/m.test(u))?"  ":""),m="literal"===h||"folded"!==h&&t!==R.BLOCK_FOLDED&&(t===R.BLOCK_LITERAL||!function(e,t,n){if(!t||t<0)return!1;let i=t-n,s=e.length;if(s<=i)return!1;for(let t=0,n=0;t<s;++t)if("\n"===e[t]){if(t-n>i)return!0;if(s-(n=t+1)<=i)return!1}return!0}(n,d,p.length));if(!n)return m?"|\n":">\n";for(a=n.length;a>0;--a){let e=n[a-1];if("\n"!==e&&"	"!==e&&" "!==e)break}let g=n.substring(a),y=g.indexOf("\n");-1===y?l="-":n===g||y!==g.length-1?(l="+",o&&o()):l="",g&&(n=n.slice(0,-g.length),"\n"===g[g.length-1]&&(g=g.slice(0,-1)),g=g.replace(i,`$&${p}`));let b=!1,k=-1;for(c=0;c<n.length;++c){let e=n[c];if(" "===e)b=!0;else if("\n"===e)k=c;else break}let w=n.substring(0,k<c?k+1:c);w&&(n=n.substring(w.length),w=w.replace(/\n+/g,`$&${p}`));let v=p?"2":"1",S=(b?v:"")+l;if(e&&(S+=" "+f(e.replace(/ ?[\r\n]+/g," ")),r&&r()),!m){let e=n.replace(/\n+/g,"\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${p}`),i=!1,r=ee(s,!0);"folded"!==h&&t!==R.BLOCK_FOLDED&&(r.onOverflow=()=>{i=!0});let o=X(`${w}${e}${g}`,p,Y,r);if(!i)return`>${S}
5${p}${o}`}return n=n.replace(/\n+/g,`$&${p}`),`|${S}
6${p}${w}${n}${g}`}function er(e,t,n,i){let{implicitKey:s,inFlow:r}=t,o="string"==typeof e.value?e:Object.assign({},e,{value:String(e.value)}),{type:l}=e;l!==R.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value)&&(l=R.QUOTE_DOUBLE);let a=e=>{switch(e){case R.BLOCK_FOLDED:case R.BLOCK_LITERAL:return s||r?ei(o.value,t):es(o,t,n,i);case R.QUOTE_DOUBLE:return et(o.value,t);case R.QUOTE_SINGLE:return en(o.value,t);case R.PLAIN:return function(e,t,n,i){let{type:s,value:r}=e,{actualString:o,implicitKey:l,indent:a,indentStep:c,inFlow:u}=t;if(l&&r.includes("\n")||u&&/[[\]{},]/.test(r))return ei(r,t);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(r))return l||u||!r.includes("\n")?ei(r,t):es(e,t,n,i);if(!l&&!u&&s!==R.PLAIN&&r.includes("\n"))return es(e,t,n,i);if(/^(%|---|\.\.\.)/m.test(r)){if(""===a)return t.forceBlockIndent=!0,es(e,t,n,i);else if(l&&a===c)return ei(r,t)}let h=r.replace(/\n+/g,`$&
7${a}`);if(o){let e=e=>e.default&&"tag:yaml.org,2002:str"!==e.tag&&e.test?.test(h),{compat:n,tags:i}=t.doc.schema;if(i.some(e)||n?.some(e))return ei(r,t)}return l?h:X(h,a,G,ee(t,!1))}(o,t,n,i);default:return null}},c=a(l);if(null===c){let{defaultKeyType:e,defaultStringType:n}=t.options,i=s&&e||n;if(null===(c=a(i)))throw Error(`Unsupported default string type ${i}`)}return c}function eo(e,t){let n,i=Object.assign({blockQuote:!0,commentString:z,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:"true",verifyAliasOrder:!0},e.schema.toStringOptions,t);switch(i.collectionStyle){case"block":n=!1;break;case"flow":n=!0;break;default:n=null}return{anchors:new Set,doc:e,flowCollectionPadding:i.flowCollectionPadding?" ":"",indent:"",indentStep:"number"==typeof i.indent?" ".repeat(i.indent):"  ",inFlow:n,options:i}}function el(e,t,n,i){let s;if(p(e))return e.toString(t,n,i);if(h(e)){if(t.doc.directives)return e.toString(t);if(t.resolvedAliases?.has(e))throw TypeError("Cannot stringify circular structure without alias nodes");t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let r=b(e)?e:t.doc.createNode(e,{onTagObj:e=>s=e});s??(s=function(e,t){let n,i;if(t.tag){let n=e.filter(e=>e.tag===t.tag);if(n.length>0)return n.find(e=>e.format===t.format)??n[0]}if(m(t)){n=t.value;let s=e.filter(e=>e.identify?.(n));if(s.length>1){let e=s.filter(e=>e.test);e.length>0&&(s=e)}i=s.find(e=>e.format===t.format)??s.find(e=>!e.format)}else n=t,i=e.find(e=>e.nodeClass&&n instanceof e.nodeClass);if(!i){let e=n?.constructor?.name??(null===n?"null":typeof n);throw Error(`Tag not resolved for ${e} value`)}return i}(t.doc.schema.tags,r));let o=function(e,t,{anchors:n,doc:i}){if(!i.directives)return"";let s=[],r=(m(e)||y(e))&&e.anchor;r&&B(r)&&(n.add(r),s.push(`&${r}`));let o=e.tag??(t.default?null:t.tag);return o&&s.push(i.directives.tagString(o)),s.join(" ")}(r,s,t);o.length>0&&(t.indentAtStart=(t.indentAtStart??0)+o.length+1);let l="function"==typeof s.stringify?s.stringify(r,t,n,i):m(r)?er(r,t,n,i):r.toString(t,n,i);return o?m(r)||"{"===l[0]||"["===l[0]?`${o} ${l}`:`${o}
8${t.indent}${l}
8`:l}let ea={identify:e=>"<<"===e||"symbol"==typeof e&&"<<"===e.description,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new R(Symbol("<<")),{addToJSMap:ec}),stringify:()=>"<<"};function ec(e,t,n){let i=eh(e,n);if(g(i))for(let n of i.items)eu(e,t,n);else if(Array.isArray(i))for(let n of i)eu(e,t,n);else eu(e,t,i)}function eu(e,t,n){let i=eh(e,n);if(!d(i))throw Error("Merge sources must be maps or map aliases");for(let[n,s]of i.toJSON(null,e,Map))t instanceof Map?t.has(n)||t.set(n,s):t instanceof Set?t.add(n):Object.prototype.hasOwnProperty.call(t,n)||Object.defineProperty(t,n,{value:s,writable:!0,enumerable:!0,configurable:!0});return t}function eh(e,t){return e&&h(t)?t.resolve(e.doc,e):t}function ef(e,t,{key:n,value:i}){if(b(n)&&n.addToJSMap)n.addToJSMap(e,t,i);else if((ea.identify(n)||m(n)&&(!n.type||n.type===R.PLAIN)&&ea.identify(n.value))&&e?.doc.schema.tags.some(e=>e.tag===ea.tag&&e.default))ec(e,t,i);else{let s=M(n,"",e);if(t instanceof Map)t.set(s,M(i,s,e));else if(t instanceof Set)t.add(s);else{let r=function(e,t,n){if(null===t)return"";if("object"!=typeof t)return String(t);if(b(e)&&n?.doc){let t=eo(n.doc,{});for(let e of(t.anchors=new Set,n.anchors.keys()))t.anchors.add(e.anchor);t.inFlow=!0,t.inStringifyKey=!0;let r=e.toString(t);if(!n.mapKeyWarned){var i,s;let e=JSON.stringify(r);e.length>40&&(e=e.substring(0,36)+'..."'),i=n.doc.options.logLevel,s=`Keys with collection values will be stringified due to JS Object restrictions: ${e}. Set mapAsMap: true to use object keys.`,("debug"===i||"warn"===i)&&console.warn(s),n.mapKeyWarned=!0}return r}return JSON.stringify(t)}(n,s,e),o=M(i,r,e);r in t?Object.defineProperty(t,r,{value:o,writable:!0,enumerable:!0,configurable:!0}):t[r]=o}}return t}function ed(e,t,n){return new ep(q(e,void 0,n),q(t,void 0,n))}class ep{constructor(e,t=null){Object.defineProperty(this,u,{value:l}),this.key=e,this.value=t}clone(e){let{key:t,value:n}=this;return b(t)&&(t=t.clone(e)),b(n)&&(n=n.clone(e)),new ep(t,n)}toJSON(e,t){let n=t?.mapAsMap?new Map:{};return ef(t,n,this)}toString(e,t,n){return e?.doc?function({key:e,value:t},n,i,s){let r,o,l,{allNullValues:a,doc:c,indent:u,indentStep:h,options:{commentString:f,indentSeq:d,simpleKeys:p}}=n,k=b(e)&&e.comment||null;if(p){if(k)throw Error("With simple keys, key nodes cannot have comments");if(y(e)||!b(e)&&"object"==typeof e)throw Error("With simple keys, collection cannot be used as a key value")}let w=!p&&(!e||k&&null==t&&!n.inFlow||y(e)||(m(e)?e.type===R.BLOCK_FOLDED||e.type===R.BLOCK_LITERAL:"object"==typeof e));n=Object.assign({},n,{allNullValues:!1,implicitKey:!w&&(p||!a),indent:u+h});let v=!1,S=!1,x=el(e,n,()=>v=!0,()=>S=!0);if(!w&&!n.inFlow&&x.length>1024){if(p)throw Error("With simple keys, single line scalar must not span more than 1024 characters");w=!0}if(n.inFlow){if(a||null==t)return v&&i&&i(),""===x?"?":w?`? ${x}`:x}else if(a&&!p||null==t&&w)return x=`? ${x}`,k&&!v?x+=J(x,n.indent,f(k)):S&&s&&s(),x;v&&(k=null),w?(k&&(x+=J(x,n.indent,f(k))),x=`? ${x}
9${u}:`):(x=`${x}:`,k&&(x+=J(x,n.indent,f(k)))),b(t)?(r=!!t.spaceBefore,o=t.commentBefore,l=t.comment):(r=!1,o=null,l=null,t&&"object"==typeof t&&(t=c.createNode(t))),n.implicitKey=!1,!w&&!k&&m(t)&&(n.indentAtStart=x.length+1),S=!1,!(!d&&h.length>=2&&!n.inFlow&&!w&&g(t))||t.flow||t.tag||t.anchor||(n.indent=n.indent.substring(2));let E=!1,N=el(t,n,()=>E=!0,()=>S=!0),T=" ";if(k||r||o){if(T=r?"\n":"",o){let e=f(o);T+=`
10${V(e,n.indent)}`}""!==N||n.inFlow?T+=`
11${n.indent}`:"\n"===T&&l&&(T="\n\n")}else if(!w&&y(t)){let e=N[0],i=N.indexOf("\n"),s=-1!==i,r=n.inFlow??t.flow??0===t.items.length;if(s||!r){let t=!1;if(s&&("&"===e||"!"===e)){let n=N.indexOf(" ");"&"===e&&-1!==n&&n<i&&"!"===N[n+1]&&(n=N.indexOf(" ",n+1)),(-1===n||i<n)&&(t=!0)}t||(T=`
12${n.indent}`)}}else(""===N||"\n"===N[0])&&(T="");return x+=T+N,n.inFlow?E&&i&&i():l&&!E?x+=J(x,n.indent,f(l)):S&&s&&s(),x}(this,e,t,n):JSON.stringify(this)}}function em(e,t,n){return(t.inFlow??e.flow?function({items:e},t,{flowChars:n,itemIndent:i}){let{indent:s,indentStep:r,flowCollectionPadding:o,options:{commentString:l}}=t,a=Object.assign({},t,{indent:i+=r,inFlow:!0,type:null}),c=!1,u=0,h=[];for(let n=0;n<e.length;++n){let s=e[n],r=null;if(b(s))s.spaceBefore&&h.push(""),eg(t,h,s.commentBefore,!1),s.comment&&(r=s.comment);else if(p(s)){let e=b(s.key)?s.key:null;e&&(e.spaceBefore&&h.push(""),eg(t,h,e.commentBefore,!1),e.comment&&(c=!0));let n=b(s.value)?s.value:null;n?(n.comment&&(r=n.comment),n.commentBefore&&(c=!0)):null==s.value&&e?.comment&&(r=e.comment)}r&&(c=!0);
12let o=el(s,a,()=>r=null);c||(c=h.length>u||o.includes("\n")),n<e.length-1?o+=",":t.options.trailingComma&&(t.options.lineWidth>0&&(c||(c=h.reduce((e,t)=>e+t.length+2,2)+(o.length+2)>t.options.lineWidth)),c&&(o+=",")),r&&(o+=J(o,i,l(r))),h.push(o),u=h.length}let{start:f,end:d}=n;if(0===h.length)return f+d;if(!c){let e=h.reduce((e,t)=>e+t.length+2,2);c=t.options.lineWidth>0&&e>t.options.lineWidth}if(!c)return`${f}${o}${h.join(" ")}${o}${d}`;{let e=f;for(let t of h)e+=t?`
13${r}${s}${t}`:"\n";return`${e}
14${s}${d}`}}:function({comment:e,items:t},n,{blockItemPrefix:i,flowChars:s,itemIndent:r,onChompKeep:o,onComment:l}){let a,{indent:c,options:{commentString:u}}=n,h=Object.assign({},n,{indent:r,type:null}),f=!1,d=[];for(let e=0;e<t.length;++e){let s=t[e],o=null;if(b(s))!f&&s.spaceBefore&&d.push(""),eg(n,d,s.commentBefore,f),s.comment&&(o=s.comment);else if(p(s)){let e=b(s.key)?s.key:null;e&&(!f&&e.spaceBefore&&d.push(""),eg(n,d,e.commentBefore,f))}f=!1;let l=el(s,h,()=>o=null,()=>f=!0);o&&(l+=J(l,r,u(o))),f&&o&&(f=!1),d.push(i+l)}if(0===d.length)a=s.start+s.end;else{a=d[0];for(let e=1;e<d.length;++e){let t=d[e];a+=t?`
15${c}${t}`:"\n"}}return e?(a+="\n"+V(u(e),c),l&&l()):f&&o&&o(),a})(e,t,n)}function eg({indent:e,options:{commentString:t}},n,i,s){if(i&&s&&(i=i.replace(/^\n+/,"")),i){let s=V(t(i),e);n.push(s.trimStart())}}function ey(e,t){let n=m(t)?t.value:t;for(let i of e)if(p(i)&&(i.key===t||i.key===n||m(i.key)&&i.key.value===n))return i}class eb extends H{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(o,e),this.items=[]}static from(e,t,n){let{keepUndefined:i,replacer:s}=n,r=new this(e),o=(e,o)=>{if("function"==typeof s)o=s.call(t,e,o);else if(Array.isArray(s)&&!s.includes(e))return;(void 0!==o||i)&&r.items.push(ed(e,o,n))};if(t instanceof Map)for(let[e,n]of t)o(e,n);else if(t&&"object"==typeof t)for(let e of Object.keys(t))o(e,t[e]);return"function"==typeof e.sortMapEntries&&r.items.sort(e.sortMapEntries),r}add(e,t){let n;n=p(e)?e:e&&"object"==typeof e&&"key"in e?new ep(e.key,e.value):new ep(e,e?.value);let i=ey(this.items,n.key),s=this.schema?.sortMapEntries;if(i){if(!t)throw Error(`Key ${n.key} already set`);m(i.value)&&P(n.value)?i.value.value=n.value:i.value=n.value}else if(s){let e=this.items.findIndex(e=>0>s(n,e));-1===e?this.items.push(n):this.items.splice(e,0,n)}else this.items.push(n)}delete(e){let t=ey(this.items,e);return!!t&&this.items.splice(this.items.indexOf(t),1).length>0}get(e,t){let n=ey(this.items,e),i=n?.value;return(!t&&m(i)?i.value:i)??void 0}has(e){return!!ey(this.items,e)}set(e,t){this.add(new ep(e,t),!0)}toJSON(e,t,n){let i=n?new n:t?.mapAsMap?new Map:{};for(let e of(t?.onCreate&&t.onCreate(i),this.items))ef(t,i,e);return i}toString(e,t,n){if(!e)return JSON.stringify(this);for(let e of this.items)if(!p(e))throw Error(`Map items must all be pairs; found ${JSON.stringify(e)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),em(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:n,onComment:t})}}let ek={collection:"map",default:!0,nodeClass:eb,tag:"tag:yaml.org,2002:map",resolve:(e,t)=>(d(e)||t("Expected a mapping for this tag"),e),createNode:(e,t,n)=>eb.from(e,t,n)};class ew extends H{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(c,e),this.items=[]}add(e){this.items.push(e)}delete(e){let t=ev(e);return"number"==typeof t&&this.items.splice(t,1).length>0}get(e,t){let n=ev(e);
15if("number"!=typeof n)return;let i=this.items[n];return!t&&m(i)?i.value:i}has(e){let t=ev(e);return"number"==typeof t&&t<this.items.length}set(e,t){let n=ev(e);if("number"!=typeof n)throw Error(`Expected a valid index, not ${e}.`);let i=this.items[n];m(i)&&P(t)?i.value=t:this.items[n]=t}toJSON(e,t){let n=[];t?.onCreate&&t.onCreate(n);let i=0;for(let e of this.items)n.push(M(e,String(i++),t));return n}toString(e,t,n){return e?em(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+"  ",onChompKeep:n,onComment:t}):JSON.stringify(this)}static from(e,t,n){let{replacer:i}=n,s=new this(e);if(t&&Symbol.iterator in Object(t)){let e=0;for(let r of t){if("function"==typeof i){let n=t instanceof Set?r:String(e++);r=i.call(t,n,r)}s.items.push(q(r,void 0,n))}}return s}}function ev(e){let t=m(e)?e.value:e;return t&&"string"==typeof t&&(t=Number(t)),"number"==typeof t&&Number.isInteger(t)&&t>=0?t:null}let eS={collection:"seq",default:!0,nodeClass:ew,tag:"tag:yaml.org,2002:seq",resolve:(e,t)=>(g(e)||t("Expected a sequence for this tag"),e),createNode:(e,t,n)=>ew.from(e,t,n)},ex={identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:(e,t,n,i)=>er(e,t=Object.assign({actualString:!0},t),n,i)},eE={identify:e=>null==e,createNode:()=>new R(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new R(null),stringify:({source:e},t)=>"string"==typeof e&&eE.test.test(e)?e:t.options.nullStr},eN={identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new R("t"===e[0]||"T"===e[0]),stringify:({source:e,value:t},n)=>e&&eN.test.test(e)&&t===("t"===e[0]||"T"===e[0])?e:t?n.options.trueStr:n.options.falseStr};function eT({format:e,minFractionDigits:t,tag:n,value:i}){if("bigint"==typeof i)return String(i);let s="number"==typeof i?i:Number(i);if(!isFinite(s))return isNaN(s)?".nan":s<0?"-.inf":".inf";let r=Object.is(i,-0)?"-0":JSON.stringify(i);if(!e&&t&&(!n||"tag:yaml.org,2002:float"===n)&&/^-?\d/.test(r)&&!r.includes("e")){let e=r.indexOf(".");e<0&&(e=r.length,r+=".");let n=t-(r.length-e-1);for(;n-- >0;)r+="0"}return r}let eO={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>"nan"===e.slice(-3).toLowerCase()?NaN:"-"===e[0]?-1/0:1/0,stringify:eT},eA={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),stringify(e){let t=Number(e.value);return isFinite(t)?t.toExponential():eT(e)}},eC={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(e){let t=new R(parseFloat(e)),n=e.indexOf(".");return -1!==n&&"0"===e[e.length-1]&&(t.minFractionDigits=e.length-n-1),t},stringify:eT},eI=e=>"bigint"==typeof e||Number.isInteger(e),e$=(e,t,n,{intAsBigInt:i})=>i?BigInt(e):parseInt(e.substring(t),n);
15function eL(e,t,n){let{value:i}=e;return eI(i)&&i>=0?n+i.toString(t):eT(e)}let eB={identify:e=>eI(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,n)=>e$(e,2,8,n),stringify:e=>eL(e,8,"0o")},ej={identify:eI,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,n)=>e$(e,0,10,n),stringify:eT},eF={identify:e=>eI(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,n)=>e$(e,2,16,n),stringify:e=>eL(e,16,"0x")},e_=[ek,eS,ex,eE,eN,eB,ej,eF,eO,eA,eC];function eM(e){return"bigint"==typeof e||Number.isInteger(e)}let eD=({value:e})=>JSON.stringify(e),eK=[ek,eS].concat([{identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:eD},{identify:e=>null==e,createNode:()=>new R(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:eD},{identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:e=>"true"===e,stringify:eD},{identify:eM,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:n})=>n?BigInt(e):parseInt(e,10),stringify:({value:e})=>eM(e)?e.toString():JSON.stringify(e)},{identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:eD}],{default:!0,tag:"",test:/^/,resolve:(e,t)=>(t(`Unresolved plain scalar ${JSON.stringify(e)}`),e)}),eP={identify:e=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(e,t){if("function"!=typeof atob)return t("This environment does not support reading binary tags; either Buffer or atob is required"),e;{let t=atob(e.replace(/[\n\r]/g,"")),n=new Uint8Array(t.length);for(let e=0;e<t.length;++e)n[e]=t.charCodeAt(e);return n}},stringify({comment:e,type:t,value:n},i,s,r){let o;if(!n)return"";if("function"==typeof btoa){let e="";for(let t=0;t<n.length;++t)e+=String.fromCharCode(n[t]);o=btoa(e)}else throw Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(t??(t=R.BLOCK_LITERAL),t!==R.QUOTE_DOUBLE){let e=Math.max(i.options.lineWidth-i.indent.length,i.options.minContentWidth),n=Math.ceil(o.length/e),s=Array(n);for(let t=0,i=0;t<n;++t,i+=e)s[t]=o.substr(i,e);o=s.join(t===R.BLOCK_LITERAL?"\n":" ")}return er({comment:e,type:t,value:o},i,s,r)}};function eR(e,t){if(g(e))for(let n=0;n<e.items.length;++n){let i=e.items[n];if(!p(i)){if(d(i)){i.items.length>1&&t("Each pair must have its own sequence indicator");let e=i.items[0]||new ep(new R(null));if(i.commentBefore&&(e.key.commentBefore=e.key.commentBefore?`${i.commentBefore}
16${e.key.commentBefore}`:i.commentBefore),i.comment){let t=e.value??e.key;t.comment=t.comment?`${i.comment}
17${t.comment}`:i.comment}i=e}e.items[n]=p(i)?i:new ep(i)}}else t("Expected a sequence for this tag");return e}function eq(e,t,n){let{replacer:i}=n,s=new ew(e);s.tag="tag:yaml.org,2002:pairs";let r=0;if(t&&Symbol.iterator in Object(t))for(let e of t){let o,l;if("function"==typeof i&&(e=i.call(t,String(r++),e)),Array.isArray(e))if(2===e.length)o=e[0],l=e[1];else throw TypeError(`Expected [key, value] tuple: ${e}`);else if(e&&e instanceof Object){let t=Object.keys(e);if(1===t.length)l=e[o=t[0]];else throw TypeError(`Expected tuple with one key, not ${t.length} keys`)}else o=e;s.items.push(ed(o,l,n))}return s}let eU={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:eR,createNode:eq};class eW extends ew{constructor(){super(),this.add=eb.prototype.add.bind(this),this.delete=eb.prototype.delete.bind(this),this.get=eb.prototype.get.bind(this),this.has=eb.prototype.has.bind(this),this.set=eb.prototype.set.bind(this),this.tag=eW.tag}toJSON(e,t){if(!t)return super.toJSON(e);let n=new Map;for(let e of(t?.onCreate&&t.onCreate(n),this.items)){let i,s;if(p(e)?(i=M(e.key,"",t),s=M(e.value,i,t)):i=M(e,"",t),n.has(i))throw Error("Ordered maps must not include duplicate keys");n.set(i,s)}return n}static from(e,t,n){let i=eq(e,t,n),s=new this;return s.items=i.items,s}}eW.tag="tag:yaml.org,2002:omap";let eH={collection:"seq",identify:e=>e instanceof Map,nodeClass:eW,default:!1,tag:"tag:yaml.org,2002:omap",resolve(e,t){let n=eR(e,t),i=[];for(let{key:e}of n.items)m(e)&&(i.includes(e.value)?t(`Ordered maps must not include duplicate keys: ${e.value}`):i.push(e.value));return Object.assign(new eW,n)},createNode:(e,t,n)=>eW.from(e,t,n)};function ez({value:e,source:t},n){return t&&(e?eV:eJ).test.test(t)?t:e?n.options.trueStr:n.options.falseStr}let eV={identify:e=>!0===e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>
17new R(!0),stringify:ez},eJ={identify:e=>!1===e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new R(!1),stringify:ez},eG=e=>"bigint"==typeof e||Number.isInteger(e);function eY(e,t,n,{intAsBigInt:i}){let s=e[0];if(("-"===s||"+"===s)&&(t+=1),e=e.substring(t).replace(/_/g,""),i){switch(n){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`}let t=BigInt(e);return"-"===s?BigInt(-1)*t:t}let r=parseInt(e,n);return"-"===s?-1*r:r}function eQ(e,t,n){let{value:i}=e;if(eG(i)){let e=i.toString(t);return i<0?"-"+n+e.substr(1):n+e}return eT(e)}class eX extends eb{constructor(e){super(e),this.tag=eX.tag}add(e){let t;t=p(e)?e:e&&"object"==typeof e&&"key"in e&&"value"in e&&null===e.value?new ep(e.key,null):new ep(e,null),ey(this.items,t.key)||this.items.push(t)}get(e,t){let n=ey(this.items,e);return!t&&p(n)?m(n.key)?n.key.value:n.key:n}set(e,t){if("boolean"!=typeof t)throw Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);let n=ey(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new ep(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 Error("Set items must all have null values")}static from(e,t,n){let{replacer:i}=n,s=new this(e);if(t&&Symbol.iterator in Object(t))for(let e of t)"function"==typeof i&&(e=i.call(t,e,e)),s.items.push(ed(e,null,n));return s}}eX.tag="tag:yaml.org,2002:set";let eZ={collection:"map",identify:e=>e instanceof Set,nodeClass:eX,default:!1,tag:"tag:yaml.org,2002:set",createNode:(e,t,n)=>eX.from(e,t,n),resolve(e,t){if(d(e))if(e.hasAllNullValues(!0))return Object.assign(new eX,e);else t("Set items must all have null values");else t("Expected a mapping for this tag");return e}};function e0(e,t){let n=e[0],i="-"===n||"+"===n?e.substring(1):e,s=e=>t?BigInt(e):Number(e),r=i.replace(/_/g,"").split(":").reduce((e,t)=>e*s(60)+s(t),s(0));return"-"===n?s(-1)*r:r}function e1(e){let{value:t}=e,n=e=>e;if("bigint"==typeof t)n=e=>BigInt(e);else if(isNaN(t)||!isFinite(t))return eT(e);let i="";t<0&&(i="-",t*=n(-1));let s=n(60),r=[t%s];return t<60?r.unshift(0):(t=(t-r[0])/s,r.unshift(t%s),t>=60&&(t=(t-r[0])/s,r.unshift(t))),i+r.map(e=>String(e).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}let e2={identify:e=>"bigint"==typeof e||Number.isInteger(e),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(e,t,{intAsBigInt:n})=>e0(e,n),stringify:e1},e9={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:e=>e0(e,!1),stringify:e1},e6={identify:e=>e instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(e){let t=e.match(e6.test);if(!t)throw Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,n,i,s,r,o,l]=t.map(Number),a=Date.UTC(n,i-1,s,r||0,o||0,l||0,t[7]?Number((t[7]+"00").substr(1,3)):0),c=t[8];if(c&&"Z"!==c){let e=e0(c,!1);30>Math.abs(e)&&(e*=60),a-=6e4*e}return new Date(a)},stringify:({value:e})=>e?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""},e4=[ek,eS,ex,eE,eV,eJ,{identify:eG,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,n)=>eY(e,2,2,n),stringify:e=>eQ(e,2,"0b")},{identify:eG,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,n)=>eY(e,1,8,n),stringify:e=>eQ(e,8,"0")},{identify:eG,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,n)=>eY(e,0,10,n),stringify:eT},{identify:eG,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,n)=>eY(e,2,16,n),stringify:e=>eQ(e,16,"0x")},{identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>"nan"===e.slice(-3).toLowerCase()?NaN:"-"===e[0]?-1/0:1/0,stringify:eT},{identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,"")),stringify(e){let t=Number(e.value);return isFinite(t)?t.toExponential():eT(e)}},{identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(e){let t=new R(parseFloat(e.replace(/_/g,""))),n=e.indexOf(".");if(-1!==n){let i=e.substring(n+1).replace(/_/g,"");"0"===i[i.length-1]&&(t.minFractionDigits=i.length)}return t},stringify:eT},eP,ea,eH,eU,eZ,e2,e9,e6],e7=new Map([["core",e_],["failsafe",[ek,eS,ex]],["json",eK],["yaml11",e4],["yaml-1.1",e4]]),e3={binary:eP,bool:eN,float:eC,floatExp:eA,floatNaN:eO,floatTime:e9,int:ej,intHex:eF,intOct:eB,intTime:e2,map:ek,merge:ea,null:eE,omap:eH,pairs:eU,seq:eS,set:eZ,timestamp:e6},e8={"tag:yaml.org,2002:binary":eP,"tag:yaml.org,2002:merge":ea,"tag:yaml.org,2002:omap":eH,"tag:yaml.org,2002:pairs":eU,"tag:yaml.org,2002:set":eZ,"tag:yaml.org,2002:timestamp":e6};function e5(e,t,n){let i=e7.get(t);if(i&&!e)return n&&!i.includes(ea)?i.concat(ea):i.slice();let s=i;if(!s)if(Array.isArray(e))s=[];else{let e=Array.from(e7.keys()).filter(e=>"yaml11"!==e).map(e=>JSON.stringify(e)).join(", ");throw Error(`Unknown schema "${t}"; use one of ${e} or define customTags array`)}if(Array.isArray(e))for(let t of e)s=s.concat(t);else"function"==typeof e&&(s=e(s.slice()));return n&&(s=s.concat(ea)),s.reduce((e,t)=>
17{let n="string"==typeof t?e3[t]:t;if(!n){let e=JSON.stringify(t),n=Object.keys(e3).map(e=>JSON.stringify(e)).join(", ");throw Error(`Unknown custom tag ${e}; use one of ${n}`)}return e.includes(n)||e.push(n),e},[])}let te=(e,t)=>e.key<t.key?-1:+(e.key>t.key);class tt{constructor({compat:e,customTags:t,merge:n,resolveKnownTags:i,schema:s,sortMapEntries:r,toStringDefaults:l}){this.compat=Array.isArray(e)?e5(e,"compat"):e?e5(null,e):null,this.name="string"==typeof s&&s||"core",this.knownTags=i?e8:{},this.tags=e5(t,this.name,n),this.toStringOptions=l??null,Object.defineProperty(this,o,{value:ek}),Object.defineProperty(this,a,{value:ex}),Object.defineProperty(this,c,{value:eS}),this.sortMapEntries="function"==typeof r?r:!0===r?te:null}clone(){let e=Object.create(tt.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}}class tn{constructor(e,t,n){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,u,{value:r});let i=null;"function"==typeof t||Array.isArray(t)?i=t:void 0===n&&t&&(n=t,t=void 0);const s=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},n);this.options=s;let{version:o}=s;n?._directives?(this.directives=n._directives.atDocument(),this.directives.yaml.explicit&&(o=this.directives.yaml.version)):this.directives=new L({version:o}),this.setSchema(o,n),this.contents=void 0===e?null:this.createNode(e,i,n)}clone(){let e=Object.create(tn.prototype,{[u]:{value:r}});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=b(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){ti(this.contents)&&this.contents.add(e)}addIn(e,t){ti(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){let n=j(this);e.anchor=!t||n.has(t)?F(t||"a",n):t}return new K(e.anchor)}createNode(e,t,n){var i,s;let r,o,l,a;if("function"==typeof t)e=t.call({"":e},"",e),r=t;else if(Array.isArray(t)){let e=t.filter(e=>"number"==typeof e||e instanceof String||e instanceof Number).map(String);e.length>0&&(t=t.concat(e)),r=t}else void 0===n&&t&&(n=t,t=void 0);let{aliasDuplicateObjects:c,anchorPrefix:u,flow:h,keepUndefined:f,onTagObj:d,tag:p}=n??{},{onAnchor:g,setAnchors:b,sourceObjects:k}=(i=this,s=u||"a",o=[],l=new Map,a=null,{onAnchor:e=>{o.push(e),a??(a=j(i));let t=F(s,a);return a.add(t),t},setAnchors:()=>{for(let e of o){let t=l.get(e);if("object"==typeof t&&t.anchor&&(m(t.node)||y(t.node)))t.node.anchor=t.anchor;else{let t=Error("Failed to resolve repeated object (this should not happen)");throw t.source=e,t}}},sourceObjects:l}),w={aliasDuplicateObjects:c??!0,keepUndefined:f??!1,onAnchor:g,onTagObj:d,replacer:r,schema:this.schema,sourceObjects:k},v=q(e,p,w);return h&&y(v)&&(v.flow=!0),b(),v}createPair(e,t,n={}){return new ep(this.createNode(e,null,n),this.createNode(t,null,n))}delete(e){return!!ti(this.contents)&&this.contents.delete(e)}deleteIn(e){return W(e)?null!=this.contents&&(this.contents=null,!0):!!ti(this.contents)&&this.contents.deleteIn(e)}get(e,t){return y(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return W(e)?!t&&m(this.contents)?this.contents.value:this.contents:y(this.contents)?this.contents.getIn(e,t):void 0}has(e){return!!y(this.contents)&&this.contents.has(e)}hasIn(e){return W(e)?void 0!==this.contents:!!y(this.contents)&&this.contents.hasIn(e)}set(e,t){null==this.contents?this.contents=U(this.schema,[e],t):ti(this.contents)&&this.contents.set(e,t)}setIn(e,t){W(e)?this.contents=t:null==this.contents?this.contents=U(this.schema,Array.from(e),t):ti(this.contents)&&this.contents.setIn(e,t)}setSchema(e,t={}){let n;switch("number"==typeof e&&(e=String(e)),e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new L({version:"1.1"}),n={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new L({version:e}),n={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,n=null;break;default:{let t=JSON.stringify(e);throw Error(`Expected '1.1', '1.2' or null as first argument, but found: ${t}`)}}if(t.schema instanceof Object)this.schema=t.schema;else if(n)this.schema=new tt(Object.assign(n,t));else throw Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:t,mapAsMap:n,maxAliasCount:i,onAnchor:s,reviver:r}={}){let o={anchors:new Map,doc:this,keep:!e,mapAsMap:!0===n,mapKeyWarned:!1,maxAliasCount:"number"==typeof i?i:100},l=M(this.contents,t??"",o);if("function"==typeof s)for(let{count:e,res:t}
17of o.anchors.values())s(t,e);return"function"==typeof r?_(r,{"":l},"",l):l}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||0>=Number(e.indent))){let t=JSON.stringify(e.indent);throw Error(`"indent" option must be a positive integer, not ${t}`)}return function(e,t){let n=[],i=!0===t.directives;if(!1!==t.directives&&e.directives){let t=e.directives.toString(e);t?(n.push(t),i=!0):e.directives.docStart&&(i=!0)}i&&n.push("---");let s=eo(e,t),{commentString:r}=s.options;if(e.commentBefore){1!==n.length&&n.unshift("");let t=r(e.commentBefore);n.unshift(V(t,""))}let o=!1,l=null;if(e.contents){if(b(e.contents)){if(e.contents.spaceBefore&&i&&n.push(""),e.contents.commentBefore){let t=r(e.contents.commentBefore);n.push(V(t,""))}s.forceBlockIndent=!!e.comment,l=e.contents.comment}let t=l?void 0:()=>o=!0,a=el(e.contents,s,()=>l=null,t);l&&(a+=J(a,"",r(l))),("|"===a[0]||">"===a[0])&&"---"===n[n.length-1]?n[n.length-1]=`--- ${a}`:n.push(a)}else n.push(el(e.contents,s));if(e.directives?.docEnd)if(e.comment){let t=r(e.comment);t.includes("\n")?(n.push("..."),n.push(V(t,""))):n.push(`... ${t}`)}else n.push("...");else{let t=e.comment;t&&o&&(t=t.replace(/^\n+/,"")),t&&((!o||l)&&""!==n[n.length-1]&&n.push(""),n.push(V(r(t),"")))}return n.join("\n")+"\n"}(this,e)}}function ti(e){if(y(e))return!0;throw Error("Expected a YAML collection as document contents")}class ts extends Error{constructor(e,t,n,i){super(),this.name=e,this.code=n,this.message=i,this.pos=t}}class tr extends ts{constructor(e,t,n){super("YAMLParseError",e,t,n)}}class to extends ts{constructor(e,t,n){super("YAMLWarning",e,t,n)}}let tl=(e,t)=>n=>{if(-1===n.pos[0])return;n.linePos=n.pos.map(e=>t.linePos(e));let{line:i,col:s}=n.linePos[0];n.message+=` at line ${i}, column ${s}`;let r=s-1,o=e.substring(t.lineStarts[i-1],t.lineStarts[i]).replace(/[\n\r]+$/,"");if(r>=60&&o.length>80){let e=Math.min(r-39,o.length-79);o="…"+o.substring(e),r-=e-1}if(o.length>80&&(o=o.substring(0,79)+"…"),i>1&&/^ *$/.test(o.substring(0,r))){let n=e.substring(t.lineStarts[i-2],t.lineStarts[i-1]);n.length>80&&(n=n.substring(0,79)+"…\n"),o=n+o}if(/[^ ]/.test(o)){let e=1,t=n.linePos[1];t?.line===i&&t.col>s&&(e=Math.max(1,Math.min(t.col-s,80-r)));let l=" ".repeat(r)+"^".repeat(e);n.message+=`:
18
19${o}
20${l}
21`}};function ta(e,{flow:t,indicator:n,next:i,offset:s,onError:r,parentIndent:o,startOnNewline:l}){let a=!1,c=l,u=l,h="",f="",d=!1,p=!1,m=null,g=null,y=null,b=null,k=null,w=null,v=null;for(let s of e)switch(p&&("space"!==s.type&&"newline"!==s.type&&"comma"!==s.type&&r(s.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),p=!1),m&&(c&&"comment"!==s.type&&"newline"!==s.type&&r(m,"TAB_AS_INDENT","Tabs are not allowed as indentation"),m=null),s.type){case"space":!t&&("doc-start"!==n||i?.type!=="flow-collection")&&s.source.includes("	")&&(m=s),u=!0;break;case"comment":{u||r(s,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let e=s.source.substring(1)||" ";h?h+=f+e:h=e,f="",c=!1;break}case"newline":c?h?h+=s.source:w&&"seq-item-ind"===n||(a=!0):f+=s.source,c=!0,d=!0,(g||y)&&(b=s),u=!0;break;case"anchor":g&&r(s,"MULTIPLE_ANCHORS","A node can have at most one anchor"),s.source.endsWith(":")&&r(s.offset+s.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),g=s,v??(v=s.offset),c=!1,u=!1,p=!0;break;case"tag":y&&r(s,"MULTIPLE_TAGS","A node can have at most one tag"),y=s,v??(v=s.offset),c=!1,u=!1,p=!0;break;case n:(g||y)&&r(s,"BAD_PROP_ORDER",`Anchors and tags must be after the ${s.source} indicator`),w&&r(s,"UNEXPECTED_TOKEN",`Unexpected ${s.source} in ${t??"collection"}`),w=s,c="seq-item-ind"===n||"explicit-key-ind"===n,u=!1;break;case"comma":if(t){k&&r(s,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`),k=s,c=!1,u=!1;break}default:r(s,"UNEXPECTED_TOKEN",`Unexpected ${s.type} token`),c=!1,u=!1}let S=e[e.length-1],x=S?S.offset+S.source.length:s;
21return p&&i&&"space"!==i.type&&"newline"!==i.type&&"comma"!==i.type&&("scalar"!==i.type||""!==i.source)&&r(i.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),m&&(c&&m.indent<=o||i?.type==="block-map"||i?.type==="block-seq")&&r(m,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:k,found:w,spaceBefore:a,comment:h,hasNewline:d,anchor:g,tag:y,newlineAfterProp:b,end:x,start:v??x}}function tc(e){if(!e)return null;switch(e.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(e.source.includes("\n"))return!0;if(e.end){for(let t of e.end)if("newline"===t.type)return!0}return!1;case"flow-collection":for(let t of e.items){for(let e of t.start)if("newline"===e.type)return!0;if(t.sep){for(let e of t.sep)if("newline"===e.type)return!0}if(tc(t.key)||tc(t.value))return!0}return!1;default:return!0}}function tu(e,t,n){if(t?.type==="flow-collection"){let i=t.end[0];i.indent===e&&("]"===i.source||"}"===i.source)&&tc(t)&&n(i,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function th(e,t,n){let{uniqueKeys:i}=e.options;if(!1===i)return!1;let s="function"==typeof i?i:(e,t)=>e===t||m(e)&&m(t)&&e.value===t.value;return t.some(e=>s(e.key,n))}let tf="All mapping items must start at the same column";function td(e,t,n,i){let s="";if(e){let r=!1,o="";for(let l of e){let{source:e,type:a}=l;switch(a){case"space":r=!0;break;case"comment":{n&&!r&&i(l,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let t=e.substring(1)||" ";s?s+=o+t:s=t,o="";break}case"newline":s&&(o+=e),r=!0;break;default:i(l,"UNEXPECTED_TOKEN",`Unexpected ${a} at node end`)}t+=e.length}}return{comment:s,offset:t}}let tp="Block collections are not allowed within flow collections",tm=e=>e&&("block-map"===e.type||"block-seq"===e.type);function tg(e,t,n,i,s,r){let o="block-map"===n.type?function({composeNode:e,composeEmptyNode:t},n,i,s,r){let o=new(r?.nodeClass??eb)(n.schema);n.atRoot&&(n.atRoot=!1);let l=i.offset,a=null;for(let r of i.items){let{start:c,key:u,sep:h,value:f}=r,d=ta(c,{indicator:"explicit-key-ind",next:u??h?.[0],offset:l,onError:s,parentIndent:i.indent,startOnNewline:!0}),p=!d.found;if(p){if(u&&("block-seq"===u.type?s(l,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in u&&u.indent!==i.indent&&s(l,"BAD_INDENT",tf)),!d.anchor&&!d.tag&&!h){a=d.end,d.comment&&(o.comment?o.comment+="\n"+d.comment:o.comment=d.comment);continue}(d.newlineAfterProp||tc(u))&&s(u??c[c.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else d.found?.indent!==i.indent&&s(l,"BAD_INDENT",tf);n.atKey=!0;let m=d.end,g=u?e(n,u,d,s):t(n,m,c,null,d,s);n.schema.compat&&tu(i.indent,u,s),n.atKey=!1,th(n,o.items,g)&&s(m,"DUPLICATE_KEY","Map keys must be unique");let y=ta(h??[],{indicator:"map-value-ind",next:f,offset:g.range[2],onError:s,parentIndent:i.indent,startOnNewline:!u||"block-scalar"===u.type});if(l=y.end,y.found){p&&(f?.type!=="block-map"||y.hasNewline||s(l,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),n.options.strict&&d.start<y.found.offset-1024&&s(g.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));let a=f?e(n,f,y,s):t(n,l,h,null,y,s);n.schema.compat&&tu(i.indent,f,s),l=a.range[2];let c=new ep(g,a);n.options.keepSourceTokens&&(c.srcToken=r),o.items.push(c)}else{p&&s(g.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),y.comment&&(g.comment?g.comment+="\n"+y.comment:g.comment=y.comment);let e=new ep(g);n.options.keepSourceTokens&&(e.srcToken=r),o.items.push(e)}}return a&&a<l&&s(a,"IMPOSSIBLE","Map comment with trailing content"),o.range=[i.offset,l,a??l],o}(e,t,n,i,r):"block-seq"===n.type?function({composeNode:e,composeEmptyNode:t},n,i,s,r){let o=new(r?.nodeClass??ew)(n.schema);n.atRoot&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let l=i.offset,a=null;for(let{start:r,value:c}of i.items){let u=ta(r,{indicator:"seq-item-ind",next:c,offset:l,onError:s,parentIndent:i.indent,startOnNewline:!0});if(!u.found)if(u.anchor||u.tag||c)c?.type==="block-seq"?s(u.end,"BAD_INDENT","All sequence items must start at the same column"):s(l,"MISSING_CHAR","Sequence item without - indicator");else{a=u.end,u.comment&&(o.comment=u.comment);continue}let h=c?e(n,c,u,s):t(n,u.end,r,null,u,s);n.schema.compat&&tu(i.indent,c,s),l=h.range[2],o.items.push(h)}return o.range=[i.offset,l,a??l],o}(e,t,n,i,r):function({composeNode:e,composeEmptyNode:t},n,i,s,r){let o="{"===i.start.source,l=o?"flow map":"flow sequence",a=new(r?.nodeClass??
21(o?eb:ew))(n.schema);a.flow=!0;let c=n.atRoot;c&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let u=i.offset+i.start.source.length;for(let r=0;r<i.items.length;++r){let c=i.items[r],{start:h,key:f,sep:d,value:m}=c,g=ta(h,{flow:l,indicator:"explicit-key-ind",next:f??d?.[0],offset:u,onError:s,parentIndent:i.indent,startOnNewline:!1});if(!g.found){if(!g.anchor&&!g.tag&&!d&&!m){0===r&&g.comma?s(g.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${l}`):r<i.items.length-1&&s(g.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${l}`),g.comment&&(a.comment?a.comment+="\n"+g.comment:a.comment=g.comment),u=g.end;continue}!o&&n.options.strict&&tc(f)&&s(f,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(0===r)g.comma&&s(g.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${l}`);else if(g.comma||s(g.start,"MISSING_CHAR",`Missing , between ${l} items`),g.comment){let e="";e:for(let t of h)switch(t.type){case"comma":case"space":break;case"comment":e=t.source.substring(1);break e;default:break e}if(e){let t=a.items[a.items.length-1];p(t)&&(t=t.value??t.key),t.comment?t.comment+="\n"+e:t.comment=e,g.comment=g.comment.substring(e.length+1)}}if(o||d||g.found){n.atKey=!0;let r=g.end,p=f?e(n,f,g,s):t(n,r,h,null,g,s);tm(f)&&s(p.range,"BLOCK_IN_FLOW",tp),n.atKey=!1;let y=ta(d??[],{flow:l,indicator:"map-value-ind",next:m,offset:p.range[2],onError:s,parentIndent:i.indent,startOnNewline:!1});if(y.found){if(!o&&!g.found&&n.options.strict){if(d)for(let e of d){if(e===y.found)break;if("newline"===e.type){s(e,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}g.start<y.found.offset-1024&&s(y.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else m&&("source"in m&&m.source?.[0]===":"?s(m,"MISSING_CHAR",`Missing space after : in ${l}`):s(y.start,"MISSING_CHAR",`Missing , or : between ${l} items`));let b=m?e(n,m,y,s):y.found?t(n,y.end,d,null,y,s):null;b?tm(m)&&s(b.range,"BLOCK_IN_FLOW",tp):y.comment&&(p.comment?p.comment+="\n"+y.comment:p.comment=y.comment);let k=new ep(p,b);if(n.options.keepSourceTokens&&(k.srcToken=c),o)th(n,a.items,p)&&s(r,"DUPLICATE_KEY","Map keys must be unique"),a.items.push(k);else{let e=new eb(n.schema);e.flow=!0,e.items.push(k);let t=(b??p).range;e.range=[p.range[0],t[1],t[2]],a.items.push(e)}u=b?b.range[2]:y.end}else{let i=m?e(n,m,g,s):t(n,g.end,d,null,g,s);a.items.push(i),u=i.range[2],tm(m)&&s(i.range,"BLOCK_IN_FLOW",tp)}}let h=o?"}":"]",[f,...d]=i.end,m=u;if(f?.source===h)m=f.offset+f.source.length;else{let e=l[0].toUpperCase()+l.substring(1),t=c?`${e} must end with a ${h}`:`${e} in block collection must be sufficiently indented and end with a ${h}`;s(u,c?"MISSING_CHAR":"BAD_INDENT",t),f&&1!==f.source.length&&d.unshift(f)}if(d.length>0){let e=td(d,m,n.options.strict,s);e.comment&&(a.comment?a.comment+="\n"+e.comment:a.comment=e.comment),a.range=[i.offset,m,e.offset]}else a.range=[i.offset,m,m];return a}(e,t,n,i,r),l=o.constructor;return"!"===s||s===l.tagName?o.tag=l.tagName:s&&(o.tag=s),o}function ty(e){let t,n;try{t=RegExp("(.*?)(?<![ 	])[ 	]*\r?\n","sy"),n=RegExp("[ 	]*(.*?)(?:(?<![ 	])[ 	]*)?\r?\n","sy")}catch{t=/(.*?)[ \t]*\r?\n/sy,n=/[ \t]*(.*?)[ \t]*\r?\n/sy}let i=t.exec(e);if(!i)return e;let s=i[1],r=" ",o=t.lastIndex;for(n.lastIndex=o;i=n.exec(e);)""===i[1]?"\n"===r?s+=r:r="\n":(s+=r+i[1],r=" "),o=n.lastIndex;let l=/[ \t]*(.*)/sy;return l.lastIndex=o,i=l.exec(e),s+r+(i?.[1]??"")}let tb={0:"\0",a:"\x07",b:"\b",e:"\x1b",f:"\f",n:"\n",r:"\r",t:"	",v:"\v",N:"\x85",_:"\xa0",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\","	":"	"};function tk(e,t,n,i){let s,r,{value:o,type:l,comment:c,range:u}="block-scalar"===t.type?function(e,t,n){let i=t.offset,s=function({offset:e,props:t},n,i){if("block-scalar-header"!==t[0].type)return i(t[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:s}=t[0],r=s[0],o=0,l="",a=-1;for(let t=1;t<s.length;++t){let n=s[t];if(l||"-"!==n&&"+"!==n){let i=Number(n);!o&&i?o=i:-1===a&&(a=e+t)}else l=n}-1!==a&&i(a,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${s}`);let c=!1,u="",h=s.length;for(let e=1;e<t.length;++e){let s=t[e];switch(s.type){case"space":c=!0;case"newline":h+=s.source.length;break;case"comment":n&&!c&&i(s,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),h+=s.source.length,u=s.source.substring(1);break;case"error":i(s,"UNEXPECTED_TOKEN",s.message),h+=s.source.length;break;default:{let e=`Unexpected token in block scalar header: ${s.type}`;i(s,"UNEXPECTED_TOKEN",e);let t=s.source;t&&"string"==typeof t&&(h+=t.length)}}}return{mode:r,indent:o,chomp:l,comment:u,length:h}}(t,e.options.strict,n);if(!s)return{value:"",type:null,comment:"",range:[i,i,i]};let r=">"===s.mode?R.BLOCK_FOLDED:R.BLOCK_LITERAL,o=t.source?function(e){let t=e.split(/\n( *)/),n=t[0],i=n.match(/^( *)/),s=[i?.[1]?[i[1],n.slice(i[1].length)]:["",n]];for(let e=1;e<t.length;e+=2)s.push([t[e],t[e+1]]);return s}(t.source):[],l=o.length;for(let e=o.length-1;e>=0;--e){let t=o[e][1];if(""===t||"\r"===t)l=e;else break}if(0===l){let e="+"===s.chomp&&o.length>0?"\n".repeat(Math.max(1,o.length-1)):"",n=i+s.length;return t.source&&(n+=t.source.length),{value:e,type:r,comment:s.comment,range:[i,n,n]}}let a=t.indent+s.indent,c=t.offset+s.length,u=0;for(let t=0;t<l;++t){let[i,r]=o[t];if(""===r||"\r"===r)0===s.indent&&i.length>a&&(a=i.length);else{i.length<a&&n(c+i.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),0===s.indent&&(a=i.length),u=t,0!==a||e.atRoot||n(c,"BAD_INDENT","Block scalar values in collections must be indented");break}c+=i.length+r.length+1}for(let e=o.length-1;e>=l;--e)o[e][0].length>a&&(l=e+1);let h="",f="",d=!1;for(let e=0;e<u;++e)h+=o[e][0].slice(a)+"\n";for(let e=u;e<l;++e){let[t,i]=o[e];c+=t.length+i.length+1;let l="\r"===i[i.length-1];if(l&&(i=i.slice(0,-1)),i&&t.length<a){let e=s.indent?"explicit indentation indicator":"first line",r=`Block scalar lines must not be less indented than their ${e}`;n(c-i.length-(l?2:1),"BAD_INDENT",r),t=""}r===R.BLOCK_LITERAL?(h+=f+t.slice(a)+i,f="\n"):t.length>a||"	"===i[0]?(" "===f?f="\n":d||"\n"!==f||(f="\n\n"),h+=f+t.slice(a)+i,f="\n",d=!0):""===i?"\n"===f?h+="\n":f="\n":(h+=f+i,f=" ",d=!1)}switch(s.chomp){case"-":break;case"+":for(let e=l;e<o.length;++e)h+="\n"+o[e][0].slice(a);"\n"!==h[h.length-1]&&(h+="\n");break;default:h+="\n"}let p=i+s.length+t.source.length;return{value:h,type:r,comment:s.comment,range:[i,p,p]}}(e,t,i):function(e,t,n){let i,s,{offset:r,type:o,source:l,end:a}=e,c=(e,t,i)=>n(r+e,t,i);switch(o){case"scalar":i=R.PLAIN,s=function(e,t){let n="";switch(e[0]){case"	":n="a tab character";break;case",":n="flow indicator character ,";break;case"%":n="directive indicator character %";break;case"|":case">":n=`block scalar indicator ${e[0]}`;break;case"@":case"`":n=`reserved character ${e[0]}`}return n&&t(0,"BAD_SCALAR_START",`Plain value cannot start with ${n}`),ty(e)}(l,c);break;case"single-quoted-scalar":var u,h;i=R.QUOTE_SINGLE,u=l,h=c,("'"!==u[u.length-1]||1===u.length)&&h(u.length,"MISSING_CHAR","Missing closing 'quote"),s=ty(u.slice(1,-1)).replace(/''/g,"'");break;case"double-quoted-scalar":i=R.QUOTE_DOUBLE,s=function(e,t){let n="";for(let i=1;i<e.length-1;++i){let s=e[i];if("\r"!==s||"\n"!==e[i+1])if("\n"===s){let{fold:t,offset:s}=function(e,t){let n="",i=e[t+1];for(;(" "===i||"	"===i||"\n"===i||"\r"===i)&&("\r"!==i||"\n"===e[t+2]);)"\n"===i&&(n+="\n"),t+=1,i=e[t+1];return n||(n=" "),{fold:n,offset:t}}(e,i);n+=t,i=s}else if("\\"===s){let s=e[++i],r=tb[s];if(r)n+=r;else if("\n"===s)for(s=e[i+1];" "===s||"	"===s;)s=e[++i+1];else if("\r"===s&&"\n"===e[i+1])for(s=e[++i+1];" "===s||"	"===s;)s=e[++i+1];else if("x"===s||"u"===s||"U"===s){let r="x"===s?2:"u"===s?4:8;n+=function(e,t,n,i){let s=e.substr(t,n),r=s.length===n&&/^[0-9a-fA-F]+$/.test(s)?parseInt(s,16):NaN;try{return String.fromCodePoint(r)}catch{let s=e.substr(t-2,n+2);return i(t-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${s}`),s}}(e,i+1,r,t),i+=r}else{let s=e.substr(i-1,2);t(i-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${s}`),n+=s}}else if(" "===s||"	"===s){let t=i,r=e[i+1];for(;" "===r||"	"===r;)r=e[++i+1];"\n"!==r&&("\r"!==r||"\n"!==e[i+2])&&(n+=i>t?e.slice(t,i+1):s)}else n+=s}return('"'!==e[e.length-1]||1===e.length)&&t(e.length,"MISSING_CHAR",'Missing closing "quote'),n}(l,c);break;default:return n(e,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${o}`),{value:"",type:null,comment:"",range:[r,r+l.length,r+l.length]}}let f=r+l.length,d=td(a,f,t,n);return{value:s,type:i,comment:d.comment,range:[r,f,d.offset]}}(t,e.options.strict,i),h=n?e.directives.tagName(n.source,e=>i(n,"TAG_RESOLVE_FAILED",e)):null;s=e.options.stringKeys&&e.atKey?e.schema[a]:h?function(e,t,n,i,s){if("!"===n)return e[a];let r=[];for(let t of e.tags)if(!t.collection&&t.tag===n)if(!t.default||!t.test)return t;else r.push(t);for(let e of r)if(e.test?.test(t))return e;let o=e.knownTags[n];return o&&!o.collection?(e.tags.push(Object.assign({},o,{default:!1,test:void 0})),o):(s(i,"TAG_RESOLVE_FAILED",`Unresolved tag: ${n}`,"tag:yaml.org,2002:str"!==n),e[a])}(e.schema,o,h,n,i):"scalar"===t.type?function({atKey:e,directives:t,schema:n},i,s,r){let o=n.tags.find(t=>(!0===t.default||e&&"key"===t.default)&&t.test?.test(i))||n[a];if(n.compat){let e=n.compat.find(e=>e.default&&e.test?.test(i))??n[a];if(o.tag!==e.tag){let n=t.tagString(o.tag),i=t.tagString(e.tag);r(s,"TAG_RESOLVE_FAILED",`Value may be parsed as either ${n} or ${i}`,!0)}}return o}(e,o,t,i):e.schema[a];try{let l=s.resolve(o,e=>i(n??t,"TAG_RESOLVE_FAILED",e),e.options);r=m(l)?l:new R(l)}catch(e){i(n??t,"TAG_RESOLVE_FAILED",e instanceof Error?e.message:String(e)),r=new R(o)}return r.range=u,r.source=o,l&&(r.type=l),h&&(r.tag=h),s.format&&(r.format=s.format),c&&(r.comment=c),r}let tw={composeNode:tv,composeEmptyNode:tS};function tv(e,t,n,i){let s,r=e.atKey,{spaceBefore:o,comment:l,anchor:a,tag:c}=n,u=!0;switch(t.type){case"alias":s=function({options:e},{offset:t,source:n,end:i},s){let r=new K(n.substring(1));""===r.source&&s(t,"BAD_ALIAS","Alias cannot be an empty string"),r.source.endsWith(":")&&s(t+n.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let o=t+n.length,l=td(i,o,e.strict,s);return r.range=[t,o,l.offset],l.comment&&(r.comment=l.comment),r}(e,t,i),(a||c)&&i(t,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":s=tk(e,t,c,i),a&&(s.anchor=a.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{s=function(e,t,n,i,s){let r=i.tag,o=r?t.directives.tagName(r.source,e=>s(r,"TAG_RESOLVE_FAILED",e)):null;if("block-seq"===n.type){let{anchor:e,newlineAfterProp:t}=i,n=e&&r?e.offset>r.offset?e:r:e??r;n&&(!t||t.offset<n.offset)&&s(n,"MISSING_CHAR","Missing newline after block sequence props")}let l="block-map"===n.type?"map":"block-seq"===n.type?"seq":"{"===n.start.source?"map":"seq";if(!r||!o||"!"===o||o===eb.tagName&&"map"===l||o===ew.tagName&&"seq"===l)return tg(e,t,n,s,o);let a=t.schema.tags.find(e=>e.tag===o&&e.collection===l);if(!a){let i=t.schema.knownTags[o];if(i?.collection!==l)return i?s(r,"BAD_COLLECTION_TYPE",`${i.tag} used for ${l} collection, but expects ${i.collection??"scalar"}`,!0):s(r,"TAG_RESOLVE_FAILED",`Unresolved tag: ${o}`,!0),tg(e,t,n,s,o);t.schema.tags.push(Object.assign({},i,{default:!1})),a=i}let c=tg(e,t,n,s,o,a),u=a.resolve?.(c,e=>s(r,"TAG_RESOLVE_FAILED",e),t.options)??c,h=b(u)?u:new R(u);return h.range=c.range,h.tag=o,a?.format&&(h.format=a.format),h}(tw,e,t,n,i),a&&(s.anchor=a.source.substring(1))}catch(e){i(t,"RESOURCE_EXHAUSTION",e instanceof Error?e.message:String(e))}break;default:{let e="error"===t.type?t.message:`Unsupported token (type: ${t.type})`;i(t,"UNEXPECTED_TOKEN",e),u=!1}}return s??(s=tS(e,t.offset,void 0,null,n,i)),a&&""===s.anchor&&i(a,"BAD_ALIAS","Anchor cannot be an empty string"),r&&e.options.stringKeys&&(!m(s)||"string"!=typeof s.value||s.tag&&"tag:yaml.org,2002:str"!==s.tag)&&i(c??t,"NON_STRING_KEY","With stringKeys, all keys must be strings"),o&&(s.spaceBefore=!0),l&&("scalar"===t.type&&""===t.source?s.comment=l:s.commentBefore=l),e.options.keepSourceTokens&&u&&(s.srcToken=t),s}
21function tS(e,t,n,i,{spaceBefore:s,comment:r,anchor:o,tag:l,end:a},c){let u=tk(e,{type:"scalar",offset:function(e,t,n){if(t){n??(n=t.length);for(let i=n-1;i>=0;--i){let n=t[i];switch(n.type){case"space":case"comment":case"newline":e-=n.source.length;continue}for(n=t[++i];n?.type==="space";)e+=n.source.length,n=t[++i];break}}return e}(t,n,i),indent:-1,source:""},l,c);return o&&(u.anchor=o.source.substring(1),""===u.anchor&&c(o,"BAD_ALIAS","Anchor cannot be an empty string")),s&&(u.spaceBefore=!0),r&&(u.comment=r,u.range[2]=a),u}function tx(e){if("number"==typeof e)return[e,e+1];if(Array.isArray(e))return 2===e.length?e:[e[0],e[1]];let{offset:t,source:n}=e;return[t,t+("string"==typeof n?n.length:1)]}function tE(e){let t="",n=!1,i=!1;for(let s=0;s<e.length;++s){let r=e[s];switch(r[0]){case"#":t+=(""===t?"":i?"\n\n":"\n")+(r.substring(1)||" "),n=!0,i=!1;break;case"%":e[s+1]?.[0]!=="#"&&(s+=1),n=!1;break;default:n||(i=!0),n=!1}}return{comment:t,afterEmptyLine:i}}class tN{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(e,t,n,i)=>{let s=tx(e);i?this.warnings.push(new to(s,t,n)):this.errors.push(new tr(s,t,n))},this.directives=new L({version:e.version||"1.2"}),this.options=e}decorate(e,t){let{comment:n,afterEmptyLine:i}=tE(this.prelude);if(n){let s=e.contents;if(t)e.comment=e.comment?`${e.comment}
22${n}`:n;else if(i||e.directives.docStart||!s)e.commentBefore=n;else if(y(s)&&!s.flow&&s.items.length>0){let e=s.items[0];p(e)&&(e=e.key);let t=e.commentBefore;e.commentBefore=t?`${n}
23${t}`:n}else{let e=s.commentBefore;s.commentBefore=e?`${n}
24${e}`:n}}if(t){for(let t=0;t<this.errors.length;++t)e.errors.push(this.errors[t]);for(let t=0;t<this.warnings.length;++t)e.warnings.push(this.warnings[t])}else e.errors=this.errors,e.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:tE(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,n=-1){for(let t of e)yield*this.next(t);yield*this.end(t,n)}*next(e){switch(e.type){case"directive":this.directives.add(e.source,(t,n,i)=>{let s=tx(e);s[0]+=t,this.onError(s,"BAD_DIRECTIVE",n,i)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{let t=function(e,t,{offset:n,start:i,value:s,end:r},o){let l=new tn(void 0,Object.assign({_directives:t},e)),a={atKey:!1,atRoot:!0,directives:l.directives,options:l.options,schema:l.schema},c=ta(i,{indicator:"doc-start",next:s??r?.[0],offset:n,onError:o,parentIndent:0,startOnNewline:!0});c.found&&(l.directives.docStart=!0,s&&("block-map"===s.type||"block-seq"===s.type)&&!c.hasNewline&&o(c.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),l.contents=s?tv(a,s,c,o):tS(a,c.end,i,null,c,o);let u=l.contents.range[2],h=td(r,u,!1,o);return h.comment&&(l.comment=h.comment),l.range=[n,u,h.offset],l}(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 tr(tx(e),"UNEXPECTED_TOKEN",t);this.atDirectives||!this.doc?this.errors.push(n):this.doc.errors.push(n);break}case"doc-end":{if(!this.doc){this.errors.push(new tr(tx(e),"UNEXPECTED_TOKEN","Unexpected doc-end without preceding document"));break}this.doc.directives.docEnd=!0;let t=td(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){let e=this.doc.comment;this.doc.comment=e?`${e}
25${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new tr(tx(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 e=new tn(void 0,Object.assign({_directives:this.directives},this.options));this.atDirectives&&this.onError(t,"MISSING_CHAR","Missing directives-end indicator line"),e.range=[0,t,t],this.decorate(e,!1),yield e}}}let tT=Symbol("break visit"),tO=Symbol("skip children"),tA=Symbol("remove item");function tC(e,t){"type"in e&&"document"===e.type&&(e={start:e.start,value:e.value}),function e(t,n,i){let s=i(n,t);if("symbol"==typeof s)return s;for(let r of["key","value"]){let o=n[r];if(o&&"items"in o){for(let n=0;n<o.items.length;++n){let s=e(Object.freeze(t.concat([[r,n]])),o.items[n],i);if("number"==typeof s)n=s-1;else{if(s===tT)return tT;s===tA&&(o.items.splice(n,1),n-=1)}}"function"==typeof s&&"key"===r&&(s=s(n,t))}}return"function"==typeof s?s(n,t):s}(Object.freeze([]),e,t)}function tI(e){switch(e){case void 0:case" ":case"\n":case"\r":case"	":return!0;default:return!1}}tC.BREAK=tT,tC.SKIP=tO,tC.REMOVE=tA,tC.itemAtPath=(e,t)=>{let n=e;for(let[e,i]of t){let t=n?.[e];if(!t||!("items"in t))return;n=t.items[i]}return n},tC.parentCollection=(e,t)=>{let n=tC.itemAtPath(e,t.slice(0,-1)),i=t[t.length-1][0],s=n?.[i];if(s&&"items"in s)return s;throw Error("Parent collection not found")};let t$=new Set("0123456789ABCDEFabcdef"),tL=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),tB=new Set(",[]{}"),tj=new Set(" ,[]{}\n\r	"),tF=e=>!e||tj.has(e);class t_{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,t=!1){if(e){if("string"!=typeof e)throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!t;let n=this.next??"stream";for(;n&&(t||this.hasChars(1));)n=yield*this.parseNext(n)}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;" "===t||"	"===t;)t=this.buffer[++e];return!t||"#"===t||"\n"===t||"\r"===t&&"\n"===this.buffer[e+1]}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let t=this.buffer[e];
25if(this.indentNext>0){let n=0;for(;" "===t;)t=this.buffer[++n+e];if("\r"===t){let t=this.buffer[n+e+1];if("\n"===t||!t&&!this.atEnd)return e+n+1}return"\n"!==t&&!(n>=this.indentNext)&&(t||this.atEnd)?-1:e+n}if("-"===t||"."===t){let t=this.buffer.substr(e,3);if(("---"===t||"..."===t)&&tI(this.buffer[e+3]))return -1}return e}getLine(){let e=this.lineEndPos;return(("number"!=typeof e||-1!==e&&e<this.pos)&&(e=this.buffer.indexOf("\n",this.pos),this.lineEndPos=e),-1===e)?this.atEnd?this.buffer.substring(this.pos):null:("\r"===this.buffer[e-1]&&(e-=1),this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(null===e)return this.setNext("stream");if("\uFEFF"===e[0]&&(yield*this.pushCount(1),e=e.substring(1)),"%"===e[0]){let t=e.length,n=e.indexOf("#");for(;-1!==n;){let i=e[n-1];if(" "===i||"	"===i){t=n-1;break}n=e.indexOf("#",n+1)}for(;;){let n=e[t-1];if(" "===n||"	"===n)t-=1;else break}let i=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-i),this.pushNewline(),"stream"}if(this.atLineEnd()){let t=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-t),yield*this.pushNewline(),"stream"}return yield"\x02",yield*this.parseLineStart()}*parseLineStart(){let e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext("line-start");if("-"===e||"."===e){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");let e=this.peek(3);if(("---"===e||"..."===e)&&tI(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,"---"===e?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!tI(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)&&tI(t)){let e=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=e,"block-start"}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let e=this.getLine();if(null===e)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(tF),"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())>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(null===i)return this.setNext("flow");if((-1!==n&&n<this.indentNext&&"#"!==i[0]||0===n&&(i.startsWith("---")||i.startsWith("..."))&&tI(i[3]))&&(n!==this.indentNext-1||1!==this.flowLevel||"]"!==i[0]&&"}"!==i[0]))return this.flowLevel=0,yield"\x18",yield*this.parseLineStart();let s=0;for(;","===i[s];)s+=yield*this.pushCount(1),s+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(i[s+=yield*this.pushIndicators()]){case void 0:return"flow";case"#":return yield*this.pushCount(i.length-s),"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(tF),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let e=this.charAt(1);if(this.flowKey||tI(e)||","===e)return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let e=this.charAt(0),t=this.buffer.indexOf(e,this.pos+1);if("'"===e)for(;-1!==t&&"'"===this.buffer[t+1];)t=this.buffer.indexOf("'",t+2);else for(;-1!==t;){let e=0;for(;"\\"===this.buffer[t-1-e];)e+=1;if(e%2==0)break;t=this.buffer.indexOf('"',t+1)}let n=this.buffer.substring(0,t),i=n.indexOf("\n",this.pos);if(-1!==i){for(;-1!==i;){let e=this.continueScalar(i+1);if(-1===e)break;i=n.indexOf("\n",e)}
25-1!==i&&(t=i-("\r"===n[i-1]?2:1))}if(-1===t){if(!this.atEnd)return this.setNext("quoted-scalar");t=this.buffer.length}return yield*this.pushToIndex(t+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){let t=this.buffer[++e];if("+"===t)this.blockScalarKeep=!0;else if(t>"0"&&t<="9")this.blockScalarIndent=Number(t)-1;else if("-"!==t)break}return yield*this.pushUntil(e=>tI(e)||"#"===e)}*parseBlockScalar(){let e,t=this.pos-1,n=0;e:for(let i=this.pos;e=this.buffer[i];++i)switch(e){case" ":n+=1;break;case"\n":t=i,n=0;break;case"\r":{let e=this.buffer[i+1];if(!e&&!this.atEnd)return this.setNext("block-scalar");if("\n"===e)break}default:break e}if(!e&&!this.atEnd)return this.setNext("block-scalar");if(n>=this.indentNext){-1===this.blockScalarIndent?this.indentNext=n:this.indentNext=this.blockScalarIndent+(0===this.indentNext?1:this.indentNext);do{let e=this.continueScalar(t+1);if(-1===e)break;t=this.buffer.indexOf("\n",e)}while(-1!==t);if(-1===t){if(!this.atEnd)return this.setNext("block-scalar");t=this.buffer.length}}let i=t+1;for(e=this.buffer[i];" "===e;)e=this.buffer[++i];if("	"===e){for(;"	"===e||" "===e||"\r"===e||"\n"===e;)e=this.buffer[++i];t=i-1}else if(!this.blockScalarKeep)for(;;){let e=t-1,i=this.buffer[e];"\r"===i&&(i=this.buffer[--e]);let s=e;for(;" "===i;)i=this.buffer[--e];if("\n"===i&&e>=this.pos&&e+1+n>s)t=e;else break}return yield"\x1f",yield*this.pushToIndex(t+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e,t=this.flowLevel>0,n=this.pos-1,i=this.pos-1;for(;e=this.buffer[++i];)if(":"===e){let e=this.buffer[i+1];if(tI(e)||t&&tB.has(e))break;n=i}else if(tI(e)){let s=this.buffer[i+1];if("\r"===e&&("\n"===s?(i+=1,e="\n",s=this.buffer[i+1]):n=i),"#"===s||t&&tB.has(s))break;if("\n"===e){let e=this.continueScalar(i+1);if(-1===e)break;i=Math.max(i,e-2)}}else{if(t&&tB.has(e))break;n=i}return e||this.atEnd?(yield"\x1f",yield*this.pushToIndex(n+1,!0),t?"flow":"doc"):this.setNext("plain-scalar")}*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(){let e=0;for(;;){switch(this.charAt(0)){case"!":e+=yield*this.pushTag(),e+=yield*this.pushSpaces(!0);continue;case"&":e+=yield*this.pushUntil(tF),e+=yield*this.pushSpaces(!0);continue;case"-":case"?":case":":{let t=this.flowLevel>0,n=this.charAt(1);if(tI(n)||t&&tB.has(n)){t?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,e+=yield*this.pushCount(1),e+=yield*this.pushSpaces(!0);continue}}}break}return e}*pushTag(){if("<"===this.charAt(1)){let e=this.pos+2,t=this.buffer[e];for(;!tI(t)&&">"!==t;)t=this.buffer[++e];return yield*this.pushToIndex(">"===t?e+1:e,!1)}{let e=this.pos+1,t=this.buffer[e];for(;t;)if(tL.has(t))t=this.buffer[++e];else if("%"===t&&t$.has(this.buffer[e+1])&&t$.has(this.buffer[e+2]))t=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){let e=this.buffer[this.pos];return"\n"===e?yield*this.pushCount(1):"\r"===e&&"\n"===this.charAt(1)?yield*this.pushCount(2):0}*pushSpaces(e){let t,n=this.pos-1;do t=this.buffer[++n];while(" "===t||e&&"	"===t);let i=n-this.pos;return i>0&&(yield this.buffer.substr(this.pos,i),this.pos=n),i}*pushUntil(e){let t=this.pos,n=this.buffer[t];for(;!e(n);)n=this.buffer[++t];return yield*this.pushToIndex(t,!1)}}function tM(e,t){for(let n=0;n<e.length;++n)if(e[n].type===t)return!0;return!1}function tD(e){for(let t=0;t<e.length;++t)switch(e[t].type){case"space":case"comment":case"newline":break;default:return t}return -1}function tK(e){switch(e?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function tP(e){switch(e.type){case"document":return e.start;case"block-map":{let t=e.items[e.items.length-1];return t.sep??t.start}case"block-seq":return e.items[e.items.length-1].start;default:return[]}}function tR(e){if(0===e.length)return[];let t=e.length;e:for(;--t>=0;)switch(e[t].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;e[++t]?.type==="space";);return e.splice(t,e.length)}function tq(e,t){if(t.length<1e5)Array.prototype.push.apply(e,t);else for(let n=0;n<t.length;++n)e.push(t[n])}function tU(e){if("flow-seq-start"===e.start.type)for(let t of e.items)!t.sep||t.value||tM(t.start,"explicit-key-ind")||tM(t.sep,"map-value-ind")||(t.key&&(t.value=t.key),delete t.key,t
25K(t.value)?t.value.end?tq(t.value.end,t.sep):t.value.end=t.sep:tq(t.start,t.sep),delete t.sep)}class tW{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 t_,this.onNewLine=e}*parse(e,t=!1){for(let n of(this.onNewLine&&0===this.offset&&this.onNewLine(0),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=function(e){switch(e){case"\uFEFF":return"byte-order-mark";case"\x02":return"doc-mode";case"\x18":return"flow-error-end";case"\x1f":return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case"\n":case"\r\n":return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(e[0]){case" ":case"	":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}(e);if(t)if("scalar"===t)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 t=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:t,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("doc-end"===this.type&&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)if(0===this.stack.length)yield t;else{let e=this.peek(1);switch("block-scalar"===t.type?t.indent="indent"in e?e.indent:0:"flow-collection"===t.type&&"document"===e.type&&(t.indent=0),"flow-collection"===t.type&&tU(t),e.type){case"document":e.value=t;break;case"block-scalar":e.props.push(t);break;case"block-map":{let n=e.items[e.items.length-1];if(n.value){e.items.push({start:[],key:t,sep:[]}),this.onKeyLine=!0;return}if(n.sep)n.value=t;else{Object.assign(n,{key:t,sep:[]}),this.onKeyLine=!n.explicitKey;return}break}case"block-seq":{let n=e.items[e.items.length-1];n.value?e.items.push({start:[],value:t}):n.value=t;break}case"flow-collection":{let n=e.items[e.items.length-1];!n||n.value?e.items.push({start:[],key:t,sep:[]}):n.sep?n.value=t:Object.assign(n,{key:t,sep:[]});return}default:yield*this.pop(),yield*this.pop(t)}if(("document"===e.type||"block-map"===e.type||"block-seq"===e.type)&&("block-map"===t.type||"block-seq"===t.type)){let n=t.items[t.items.length-1];n&&!n.sep&&!n.value&&n.start.length>0&&-1===tD(n.start)&&(0===t.indent||n.start.every(e=>"comment"!==e.type||e.indent<t.indent))&&("document"===e.type?e.end=n.start:e.items.push({start:n.start}),t.items.splice(-1,1))}}else yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{let e={type:"document",offset:this.offset,start:[]};"doc-start"===this.type&&e.start.push(this.sourceToken),this.stack.push(e);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(e){if(e.value)return yield*this.lineEnd(e);switch(this.type){case"doc-start":-1!==tD(e.start)?(yield*this.pop(),yield*this.step()):e.start.push(this.sourceToken);return;case"anchor":case"tag":case"space":case"comment":case"newline":e.start.push(this.sourceToken);return}let t=this.startBlockValue(e);t?this.stack.push(t):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}
25*scalar(e){if("map-value-ind"===this.type){let t,n=tR(tP(this.peek(2)));e.end?((t=e.end).push(this.sourceToken),delete e.end):t=[this.sourceToken];let i={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:n,key:e,sep:t}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=i}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case"space":case"comment":case"newline":e.props.push(this.sourceToken);return;case"scalar":if(e.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let e=this.source.indexOf("\n")+1;for(;0!==e;)this.onNewLine(this.offset+e),e=this.source.indexOf("\n",e)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){let t=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,t.value){let n="end"in t.value?t.value.end:void 0,i=Array.isArray(n)?n[n.length-1]:void 0;i?.type==="comment"?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else{if(this.atIndentedComment(t.start,e.indent)){let n=e.items[e.items.length-2],i=n?.value?.end;if(Array.isArray(i)){tq(i,t.start),i.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let n=!this.onKeyLine&&this.indent===e.indent,i=n&&(t.sep||t.explicitKey)&&"seq-item-ind"!==this.type,s=[];if(i&&t.sep&&!t.value){let n=[];for(let i=0;i<t.sep.length;++i){let s=t.sep[i];switch(s.type){case"newline":n.push(i);break;case"space":break;case"comment":s.indent>e.indent&&(n.length=0);break;default:n.length=0}}n.length>=2&&(s=t.sep.splice(n[1]))}switch(this.type){case"anchor":case"tag":i||t.value?(s.push(this.sourceToken),e.items.push({start:s}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"explicit-key-ind":t.sep||t.explicitKey?i||t.value?(s.push(this.sourceToken),e.items.push({start:s,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}):(t.start.push(this.sourceToken),t.explicitKey=!0),this.onKeyLine=!0;return;case"map-value-ind":if(t.explicitKey)if(t.sep)if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(tM(t.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:null,sep:[this.sourceToken]}]});else if(tK(t.key)&&!tM(t.sep,"newline")){let e=tR(t.start),n=t.key,i=t.sep;i.push(this.sourceToken),delete t.key,delete t.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:e,key:n,sep:i}]})}else s.length>0?t.sep=t.sep.concat(s,this.sourceToken):t.sep.push(this.sourceToken);else if(tM(t.start,"newline"))Object.assign(t,{key:null,sep:[this.sourceToken]});else{let e=tR(t.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:e,key:null,sep:[this.sourceToken]}]})}else t.sep?t.value||i?e.items.push({start:s,key:null,sep:[this.sourceToken]}):tM(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 n=this.flowScalar(this.type);i||t.value?(e.items.push({start:s,key:n,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(n):(Object.assign(t,{key:n,sep:[]}),this.onKeyLine=!0);return}default:{let i=this.startBlockValue(e);if(i){if("block-seq"===i.type){if(!t.explicitKey&&t.sep&&!tM(t.sep,"newline"))return void(yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source}))}else n&&e.items.push({start:s});this.stack.push(i);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,i=Array.isArray(n)?n[n.length-1]:void 0;i?.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 n=e.items[e.items.length-2],i=n?.value?.end;if(Array.isArray(i)){tq(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||tM(t.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return}if(this.indent>e.indent){let t=this.startBlockValue(e);if(t)return void this.stack.push(t)}yield*this.pop(),yield*this.step()}*flowCollection(e){let t=e.items[e.items.length-1];if("flow-error-end"===this.type){let e;do yield*this.pop(),e=this.peek(1);while(e?.type==="flow-collection")}else if(0===e.end.length){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,
25sep:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!t||t.value?e.items.push({start:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let n=this.flowScalar(this.type);!t||t.value?e.items.push({start:[],key:n,sep:[]}):t.sep?this.stack.push(n):Object.assign(t,{key:n,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}let n=this.startBlockValue(e);n?this.stack.push(n):(yield*this.pop(),yield*this.step())}else{let t=this.peek(2);if("block-map"!==t.type||("map-value-ind"!==this.type||t.indent!==e.indent)&&("newline"!==this.type||t.items[t.items.length-1].sep))if("map-value-ind"===this.type&&"flow-collection"!==t.type){let n=tR(tP(t));tU(e);let i=e.end.splice(1,e.end.length);i.push(this.sourceToken);let s={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:n,key:e,sep:i}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=s}else yield*this.lineEnd(e);else yield*this.pop(),yield*this.step()}}flowScalar(e){if(this.onNewLine){let e=this.source.indexOf("\n")+1;for(;0!==e;)this.onNewLine(this.offset+e),e=this.source.indexOf("\n",e)+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=tR(tP(e));return t.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:t,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let t=tR(tP(e));return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:t,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return"comment"===this.type&&!(this.indent<=t)&&e.every(e=>"newline"===e.type||"space"===e.type)}*documentEnd(e){"doc-mode"!==this.type&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],"newline"===this.type&&(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;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],"newline"===this.type&&(yield*this.pop())}}}class tH{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,n=this.lineStarts.length;for(;t<n;){let i=t+n>>1;this.lineStarts[i]<e?t=i+1:n=i}if(this.lineStarts[t]===e)return{line:t+1,col:1};if(0===t)return{line:0,col:e};let i=this.lineStarts[t-1];return{line:t,col:e-i+1}}}}function tz(e,t={}){let n,{lineCounter:i,prettyErrors:s}=(n=!1!==t.prettyErrors,{lineCounter:t.lineCounter||n&&new tH||null,prettyErrors:n}),r=new tW(i?.addNewLine),o=new tN(t),l=null;for(let t of o.compose(r.parse(e),!0,e.length))if(l){if("silent"!==l.options.logLevel){l.errors.push(new tr(t.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}}else l=t;
25return s&&i&&(l.errors.forEach(tl(e,i)),l.warnings.forEach(tl(e,i))),l}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.